fix imports

This commit is contained in:
Sebastian 2022-11-04 10:24:29 -03:00
parent 66460e5650
commit e6a95d246d
No known key found for this signature in database
GPG Key ID: BE4FF68352439FC1
131 changed files with 509 additions and 494 deletions

View File

@ -28,3 +28,4 @@ our_configure=build-system/taler-build-scripts/configure
copy_configure "$our_configure" ./configure
copy_configure "$our_configure" ./packages/taler-wallet-cli/configure
copy_configure "$our_configure" ./packages/demobank-ui/configure
copy_configure "$our_configure" ./packages/merchant-backoffice-ui/configure

View File

@ -0,0 +1,17 @@
# This Makefile has been placed in the public domain
# Settings from "./configure"
include .config.mk
all:
@echo run \'make install\' to install
spa_dir=$(prefix)/share/taler/demobank-ui
install:
pnpm install --frozen-lockfile --filter @gnu-taler/demobank-ui...
pnpm run check
pnpm run build
install -d $(spa_dir)
install ./dist/* $(spa_dir)

View File

@ -15,8 +15,8 @@
*/
import { h, VNode } from "preact";
import Router, { route, Route } from "preact-router";
import InstanceCreatePage from "./paths/admin/create";
import InstanceListPage from './paths/admin/list';
import InstanceCreatePage from "./paths/admin/create/index.js";
import InstanceListPage from './paths/admin/list/index.js';
export enum AdminPaths {

View File

@ -20,13 +20,13 @@
*/
import { Fragment, h, VNode } from "preact";
import Router, { Route, route } from "preact-router";
import { useBackendContext } from "./context/backend";
import { useBackendInstancesTestForAdmin } from "./hooks/backend";
import { InstanceRoutes } from "./InstanceRoutes";
import LoginPage from "./paths/login";
import { INSTANCE_ID_LOOKUP } from "./utils/constants";
import { NotYetReadyAppMenu, Menu, NotificationCard } from "./components/menu";
import { useTranslator } from "./i18n";
import { useBackendContext } from "./context/backend.js";
import { useBackendInstancesTestForAdmin } from "./hooks/backend.js";
import { InstanceRoutes } from "./InstanceRoutes.js";
import LoginPage from "./paths/login/index.js";
import { INSTANCE_ID_LOOKUP } from "./utils/constants.js";
import { NotYetReadyAppMenu, NotificationCard } from "./components/menu/index.js";
import { useTranslator } from "./i18n/index.js";
import { createHashHistory } from "history";
import { useState } from "preact/hooks";

View File

@ -22,39 +22,39 @@
import { Fragment, FunctionComponent, h, VNode } from "preact";
import { Route, route, Router } from "preact-router";
import { useCallback, useEffect, useMemo, useState } from "preact/hooks";
import { Loading } from "./components/exception/loading";
import { Menu, NotificationCard } from "./components/menu";
import { useBackendContext } from "./context/backend";
import { InstanceContextProvider } from "./context/instance";
import { Loading } from "./components/exception/loading.js";
import { Menu, NotificationCard } from "./components/menu/index.js";
import { useBackendContext } from "./context/backend.js";
import { InstanceContextProvider } from "./context/instance.js";
import {
useBackendDefaultToken,
useBackendInstanceToken,
useLocalStorage,
} from "./hooks";
import { HttpError } from "./hooks/backend";
import { Translate, useTranslator } from "./i18n";
import InstanceCreatePage from "./paths/admin/create";
import InstanceListPage from "./paths/admin/list";
import OrderCreatePage from "./paths/instance/orders/create";
import OrderDetailsPage from "./paths/instance/orders/details";
import OrderListPage from "./paths/instance/orders/list";
import ProductCreatePage from "./paths/instance/products/create";
import ProductListPage from "./paths/instance/products/list";
import ProductUpdatePage from "./paths/instance/products/update";
import TransferListPage from "./paths/instance/transfers/list";
import TransferCreatePage from "./paths/instance/transfers/create";
import ReservesCreatePage from "./paths/instance/reserves/create";
import ReservesDetailsPage from "./paths/instance/reserves/details";
import ReservesListPage from "./paths/instance/reserves/list";
import ListKYCPage from "./paths/instance/kyc/list";
} from "./hooks/index.js";
import { HttpError } from "./hooks/backend.js";
import { Translate, useTranslator } from "./i18n/index.js";
import InstanceCreatePage from "./paths/admin/create/index.js";
import InstanceListPage from "./paths/admin/list/index.js";
import OrderCreatePage from "./paths/instance/orders/create/index.js";
import OrderDetailsPage from "./paths/instance/orders/details/index.js";
import OrderListPage from "./paths/instance/orders/list/index.js";
import ProductCreatePage from "./paths/instance/products/create/index.js";
import ProductListPage from "./paths/instance/products/list/index.js";
import ProductUpdatePage from "./paths/instance/products/update/index.js";
import TransferListPage from "./paths/instance/transfers/list/index.js";
import TransferCreatePage from "./paths/instance/transfers/create/index.js";
import ReservesCreatePage from "./paths/instance/reserves/create/index.js";
import ReservesDetailsPage from "./paths/instance/reserves/details/index.js";
import ReservesListPage from "./paths/instance/reserves/list/index.js";
import ListKYCPage from "./paths/instance/kyc/list/index.js";
import InstanceUpdatePage, {
Props as InstanceUpdatePageProps,
AdminUpdate as InstanceAdminUpdatePage,
} from "./paths/instance/update";
import LoginPage from "./paths/login";
import NotFoundPage from "./paths/notfound";
import { Notification } from "./utils/types";
import { useInstanceKYCDetails } from "./hooks/instance";
} from "./paths/instance/update/index.js";
import LoginPage from "./paths/login/index.js";
import NotFoundPage from "./paths/notfound/index.js";
import { Notification } from "./utils/types.js";
import { useInstanceKYCDetails } from "./hooks/instance.js";
import { format } from "date-fns";
export enum InstancePaths {

View File

@ -20,8 +20,8 @@
*/
import { ComponentChildren, h } from "preact";
import { LoadingModal } from "../modal";
import { useAsync } from "../../hooks/async";
import { LoadingModal } from "../modal.js";
import { useAsync } from "../../hooks/async.js";
import { Translate } from "../../i18n";
type Props = {

View File

@ -21,10 +21,10 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { useBackendContext } from "../../context/backend";
import { useInstanceContext } from "../../context/instance";
import { useBackendContext } from "../../context/backend.js";
import { useInstanceContext } from "../../context/instance.js";
import { Translate, useTranslator } from "../../i18n";
import { Notification } from "../../utils/types";
import { Notification } from "../../utils/types.js";
interface Props {
withMessage?: Notification;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { ComponentChildren, h, VNode } from "preact";
import { useField, InputProps } from "./useField";
import { useField, InputProps } from "./useField.js";
interface Props<T> extends InputProps<T> {
inputType?: 'text' | 'number' | 'multiline' | 'password';

View File

@ -20,8 +20,8 @@
*/
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Translate, useTranslator } from "../../i18n";
import { InputProps, useField } from "./useField";
import { Translate, useTranslator } from "../../i18n/index.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
isValid?: (e: any) => boolean;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { h, VNode } from "preact";
import { InputProps, useField } from "./useField";
import { InputProps, useField } from "./useField.js";
interface Props<T> extends InputProps<T> {
name: T;

View File

@ -19,10 +19,10 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { ComponentChildren, h } from "preact";
import { useConfigContext } from "../../context/config";
import { Amount } from "../../declaration";
import { InputWithAddon } from "./InputWithAddon";
import { InputProps } from "./useField";
import { useConfigContext } from "../../context/config.js";
import { Amount } from "../../declaration.js";
import { InputWithAddon } from "./InputWithAddon.js";
import { InputProps } from "./useField.js";
export interface Props<T> extends InputProps<T> {
expand?: boolean;

View File

@ -21,9 +21,9 @@
import { format } from "date-fns";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Translate, useTranslator } from "../../i18n";
import { DatePicker } from "../picker/DatePicker";
import { InputProps, useField } from "./useField";
import { Translate, useTranslator } from "../../i18n/index.js";
import { DatePicker } from "../picker/DatePicker.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
readonly?: boolean;

View File

@ -21,10 +21,10 @@
import { intervalToDuration, formatDuration } from "date-fns";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Translate, useTranslator } from "../../i18n";
import { SimpleModal } from "../modal";
import { DurationPicker } from "../picker/DurationPicker";
import { InputProps, useField } from "./useField";
import { Translate, useTranslator } from "../../i18n/index.js";
import { SimpleModal } from "../modal/index.js";
import { DurationPicker } from "../picker/DurationPicker.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
expand?: boolean;

View File

@ -20,7 +20,7 @@
*/
import { ComponentChildren, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { useGroupField } from "./useGroupField";
import { useGroupField } from "./useGroupField.js";
export interface Props<T> {
name: T;

View File

@ -20,10 +20,9 @@
*/
import { ComponentChildren, h, VNode } from "preact";
import { useRef, useState } from "preact/hooks";
import emptyImage from "../../assets/empty.png";
import { Translate } from "../../i18n";
import { MAX_IMAGE_SIZE as MAX_IMAGE_UPLOAD_SIZE } from "../../utils/constants";
import { InputProps, useField } from "./useField";
import { Translate } from "../../i18n/index.js";
import { MAX_IMAGE_SIZE as MAX_IMAGE_UPLOAD_SIZE } from "../../utils/constants.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
expand?: boolean;

View File

@ -19,8 +19,8 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { Fragment, h } from "preact";
import { useTranslator } from "../../i18n";
import { Input } from "./Input";
import { useTranslator } from "../../i18n/index.js";
import { Input } from "./Input.js";
export function InputLocation({name}:{name:string}) {
const i18n = useTranslator()

View File

@ -19,8 +19,8 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { ComponentChildren, h } from "preact";
import { InputWithAddon } from "./InputWithAddon";
import { InputProps } from "./useField";
import { InputWithAddon } from "./InputWithAddon.js";
import { InputProps } from "./useField.js";
export interface Props<T> extends InputProps<T> {
readonly?: boolean;

View File

@ -19,9 +19,9 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { h, VNode } from "preact";
import { InputArray } from "./InputArray";
import { PAYTO_REGEX } from "../../utils/constants";
import { InputProps } from "./useField";
import { InputArray } from "./InputArray.js";
import { PAYTO_REGEX } from "../../utils/constants.js";
import { InputProps } from "./useField.js";
export type Props<T> = InputProps<T>;

View File

@ -20,13 +20,13 @@
*/
import { h, VNode, Fragment } from "preact";
import { useCallback, useState } from "preact/hooks";
import { Translate, Translator, useTranslator } from "../../i18n";
import { COUNTRY_TABLE } from "../../utils/constants";
import { FormErrors, FormProvider } from "./FormProvider";
import { Input } from "./Input";
import { InputGroup } from "./InputGroup";
import { InputSelector } from "./InputSelector";
import { InputProps, useField } from "./useField";
import { Translate, Translator, useTranslator } from "../../i18n.js";
import { COUNTRY_TABLE } from "../../utils/constants.js";
import { FormErrors, FormProvider } from "./FormProvider.js";
import { Input } from "./Input.js";
import { InputGroup } from "./InputGroup.js";
import { InputSelector } from "./InputSelector.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
isValid?: (e: any) => boolean;
@ -217,7 +217,7 @@ export function InputPaytoForm<T>({
};
const hasErrors = Object.keys(errors).some(
(k) => (errors as any)[k] !== undefined
(k) => (errors as any)[k] !== undefined,
);
const submit = useCallback((): void => {

View File

@ -21,11 +21,10 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import emptyImage from "../../assets/empty.png";
import { MerchantBackend, WithId } from "../../declaration";
import { useInstanceProducts } from "../../hooks/product";
import { Translate, useTranslator } from "../../i18n";
import { FormErrors, FormProvider } from "./FormProvider";
import { InputWithAddon } from "./InputWithAddon";
import { MerchantBackend, WithId } from "../../declaration.js";
import { Translate, useTranslator } from "../../i18n/index.js";
import { FormErrors, FormProvider } from "./FormProvider.js";
import { InputWithAddon } from "./InputWithAddon.js";
type Entity = MerchantBackend.Products.ProductDetail & WithId

View File

@ -21,8 +21,8 @@
import { h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { FormProvider } from "./FormProvider";
import { InputSecured } from './InputSecured';
import { FormProvider } from "./FormProvider.js";
import { InputSecured } from './InputSecured.js';
export default {
title: 'Components/Form/InputSecured',

View File

@ -20,8 +20,8 @@
*/
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Translate, useTranslator } from "../../i18n";
import { InputProps, useField } from "./useField";
import { Translate, useTranslator } from "../../i18n/index.js";
import { InputProps, useField } from "./useField.js";
export type Props<T> = InputProps<T>;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { h, VNode } from "preact";
import { InputProps, useField } from "./useField";
import { InputProps, useField } from "./useField.js";
interface Props<T> extends InputProps<T> {
readonly?: boolean;

View File

@ -22,8 +22,8 @@
import { addDays } from "date-fns";
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { FormProvider } from "./FormProvider";
import { InputStock, Stock } from "./InputStock";
import { FormProvider } from "./FormProvider.js";
import { InputStock, Stock } from "./InputStock.js";
export default {
title: "Components/Form/InputStock",

View File

@ -19,16 +19,16 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { Fragment, h } from "preact";
import { MerchantBackend, Timestamp } from "../../declaration";
import { InputProps, useField } from "./useField";
import { FormProvider, FormErrors } from "./FormProvider";
import { MerchantBackend, Timestamp } from "../../declaration.js";
import { InputProps, useField } from "./useField.js";
import { FormProvider, FormErrors } from "./FormProvider.js";
import { useLayoutEffect, useState } from "preact/hooks";
import { Input } from "./Input";
import { InputGroup } from "./InputGroup";
import { InputNumber } from "./InputNumber";
import { InputDate } from "./InputDate";
import { Input } from "./Input.js";
import { InputGroup } from "./InputGroup.js";
import { InputNumber } from "./InputNumber.js";
import { InputDate } from "./InputDate.js";
import { Translate, useTranslator } from "../../i18n";
import { InputLocation } from "./InputLocation";
import { InputLocation } from "./InputLocation.js";
export interface Props<T> extends InputProps<T> {
alreadyExist?: boolean;

View File

@ -21,13 +21,13 @@
import { h, VNode } from "preact";
import { useCallback, useState } from "preact/hooks";
import * as yup from 'yup';
import { MerchantBackend } from "../../declaration";
import { MerchantBackend } from "../../declaration.js";
import { Translate, useTranslator } from "../../i18n";
import { TaxSchema as schema } from '../../schemas';
import { FormErrors, FormProvider } from "./FormProvider";
import { Input } from "./Input";
import { InputGroup } from "./InputGroup";
import { InputProps, useField } from "./useField";
import { TaxSchema as schema } from "../../schemas.js";
import { FormErrors, FormProvider } from "./FormProvider.js";
import { Input } from "./Input.js";
import { InputGroup } from "./InputGroup.js";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
isValid?: (e: any) => boolean;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { ComponentChildren, h, VNode } from "preact";
import { InputProps, useField } from "./useField";
import { InputProps, useField } from "./useField.js";
export interface Props<T> extends InputProps<T> {
expand?: boolean;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { ComponentChildren, h, VNode } from "preact";
import { useField, InputProps } from "./useField";
import { useField, InputProps } from "./useField.js";
interface Props<T> extends InputProps<T> {
inputType?: 'text' | 'number' | 'multiline' | 'password';

View File

@ -20,7 +20,7 @@
*/
import { ComponentChildren, VNode } from "preact";
import { useFormContext } from "./FormProvider";
import { useFormContext } from "./FormProvider.js";
interface Use<V> {
error?: string;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { useFormContext } from "./FormProvider";
import { useFormContext } from "./FormProvider.js";
interface Use {
hasError?: boolean;

View File

@ -20,17 +20,17 @@
*/
import { Fragment, h, VNode } from "preact";
import { useBackendContext } from "../../context/backend";
import { useBackendContext } from "../../context/backend.js";
import { useTranslator } from "../../i18n";
import { Entity } from "../../paths/admin/create/CreatePage";
import { Input } from "../form/Input";
import { InputCurrency } from "../form/InputCurrency";
import { InputDuration } from "../form/InputDuration";
import { InputGroup } from "../form/InputGroup";
import { InputImage } from "../form/InputImage";
import { InputLocation } from "../form/InputLocation";
import { InputPaytoForm } from "../form/InputPaytoForm";
import { InputWithAddon } from "../form/InputWithAddon";
import { Entity } from "../../paths/admin/create/CreatePage.js";
import { Input } from "../form/Input.js";
import { InputCurrency } from "../form/InputCurrency.js";
import { InputDuration } from "../form/InputDuration.js";
import { InputGroup } from "../form/InputGroup.js";
import { InputImage } from "../form/InputImage.js";
import { InputLocation } from "../form/InputLocation.js";
import { InputPaytoForm } from "../form/InputPaytoForm.js";
import { InputWithAddon } from "../form/InputWithAddon.js";
export function DefaultInstanceFormFields({
readonlyId,

View File

@ -22,7 +22,7 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import langIcon from '../../assets/icons/languageicon.svg';
import { useTranslationContext } from "../../context/translation";
import { useTranslationContext } from "../../context/translation.js";
import { strings as messages } from '../../i18n/strings'
type LangsNames = {

View File

@ -21,7 +21,7 @@
import { h, VNode } from 'preact';
import logo from '../../assets/logo.jpeg';
import { LangSelector } from './LangSelector';
import { LangSelector } from "./LangSelector.js";
interface Props {
onMobileMenu: () => void;

View File

@ -21,12 +21,12 @@
import { Fragment, h, VNode } from "preact";
import { useCallback } from "preact/hooks";
import { useBackendContext } from "../../context/backend";
import { useConfigContext } from "../../context/config";
import { useInstanceContext } from "../../context/instance";
import { useInstanceKYCDetails } from "../../hooks/instance";
import { useBackendContext } from "../../context/backend.js";
import { useConfigContext } from "../../context/config.js";
import { useInstanceContext } from "../../context/instance.js";
import { useInstanceKYCDetails } from "../../hooks/instance.js";
import { Translate } from "../../i18n";
import { LangSelector } from "./LangSelector";
import { LangSelector } from "./LangSelector.js";
interface Props {
onLogout: () => void;

View File

@ -17,11 +17,11 @@
import { ComponentChildren, Fragment, h, VNode } from "preact";
import Match from "preact-router/match";
import { useEffect, useState } from "preact/hooks";
import { AdminPaths } from "../../AdminRoutes";
import { InstancePaths } from "../../InstanceRoutes";
import { Notification } from "../../utils/types";
import { NavigationBar } from "./NavigationBar";
import { Sidebar } from "./SideBar";
import { AdminPaths } from "../../AdminRoutes.js";
import { InstancePaths } from "../../InstanceRoutes.js";
import { Notification } from "../../utils/types.js";
import { NavigationBar } from "./NavigationBar.js";
import { Sidebar } from "./SideBar.js";
function getInstanceTitle(path: string, id: string): string {
switch (path) {

View File

@ -22,12 +22,12 @@
import { ComponentChildren, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { useInstanceContext } from "../../context/instance";
import { useInstanceContext } from "../../context/instance.js";
import { Translate, useTranslator } from "../../i18n";
import { DEFAULT_REQUEST_TIMEOUT } from "../../utils/constants";
import { Loading, Spinner } from "../exception/loading";
import { FormProvider } from "../form/FormProvider";
import { Input } from "../form/Input";
import { DEFAULT_REQUEST_TIMEOUT } from "../../utils/constants.js";
import { Loading, Spinner } from "../exception/loading.js";
import { FormProvider } from "../form/FormProvider.js";
import { Input } from "../form/Input.js";
interface Props {
active?: boolean;

View File

@ -20,7 +20,7 @@
*/
import { h } from 'preact';
import { Notifications } from './index';
import { Notifications } from "./index.js";
export default {

View File

@ -20,7 +20,7 @@
*/
import { h, VNode } from "preact";
import { MessageType, Notification } from "../../utils/types";
import { MessageType, Notification } from "../../utils/types.js";
interface Props {
notifications: Notification[];

View File

@ -21,7 +21,7 @@
import { h, FunctionalComponent } from 'preact';
import { useState } from 'preact/hooks';
import { DurationPicker as TestedComponent } from './DurationPicker';
import { DurationPicker as TestedComponent } from "./DurationPicker.js";
export default {

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { InventoryProductForm as TestedComponent } from './InventoryProductForm';
import { InventoryProductForm as TestedComponent } from "./InventoryProductForm.js";
export default {

View File

@ -15,12 +15,12 @@
*/
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { FormProvider, FormErrors } from "../form/FormProvider";
import { InputNumber } from "../form/InputNumber";
import { InputSearchProduct } from "../form/InputSearchProduct";
import { MerchantBackend, WithId } from "../../declaration";
import { FormProvider, FormErrors } from "../form/FormProvider.js";
import { InputNumber } from "../form/InputNumber.js";
import { InputSearchProduct } from "../form/InputSearchProduct.js";
import { MerchantBackend, WithId } from "../../declaration.js";
import { Translate, useTranslator } from "../../i18n";
import { ProductMap } from "../../paths/instance/orders/create/CreatePage";
import { ProductMap } from "../../paths/instance/orders/create/CreatePage.js";
type Form = {
product: MerchantBackend.Products.ProductDetail & WithId,

View File

@ -16,18 +16,18 @@
import { Fragment, h, VNode } from "preact";
import { useCallback, useEffect, useState } from "preact/hooks";
import * as yup from 'yup';
import { FormErrors, FormProvider } from "../form/FormProvider";
import { Input } from "../form/Input";
import { InputCurrency } from "../form/InputCurrency";
import { InputImage } from "../form/InputImage";
import { InputNumber } from "../form/InputNumber";
import { InputTaxes } from "../form/InputTaxes";
import { MerchantBackend } from "../../declaration";
import { useListener } from "../../hooks/listener";
import { FormErrors, FormProvider } from "../form/FormProvider.js";
import { Input } from "../form/Input.js";
import { InputCurrency } from "../form/InputCurrency.js";
import { InputImage } from "../form/InputImage.js";
import { InputNumber } from "../form/InputNumber.js";
import { InputTaxes } from "../form/InputTaxes.js";
import { MerchantBackend } from "../../declaration.js";
import { useListener } from "../../hooks/listener.js";
import { Translate, useTranslator } from "../../i18n";
import {
NonInventoryProductSchema as schema
} from '../../schemas';
} from "../../schemas.js";
type Entity = MerchantBackend.Product

View File

@ -22,21 +22,21 @@
import { h } from "preact";
import { useCallback, useEffect, useState } from "preact/hooks";
import * as yup from "yup";
import { useBackendContext } from "../../context/backend";
import { MerchantBackend } from "../../declaration";
import { useBackendContext } from "../../context/backend.js";
import { MerchantBackend } from "../../declaration.js";
import { useTranslator } from "../../i18n";
import {
ProductCreateSchema as createSchema,
ProductUpdateSchema as updateSchema,
} from "../../schemas";
import { FormProvider, FormErrors } from "../form/FormProvider";
import { Input } from "../form/Input";
import { InputCurrency } from "../form/InputCurrency";
import { InputImage } from "../form/InputImage";
import { InputNumber } from "../form/InputNumber";
import { InputStock, Stock } from "../form/InputStock";
import { InputTaxes } from "../form/InputTaxes";
import { InputWithAddon } from "../form/InputWithAddon";
} from "../../schemas.js";
import { FormProvider, FormErrors } from "../form/FormProvider.js";
import { Input } from "../form/Input.js";
import { InputCurrency } from "../form/InputCurrency.js";
import { InputImage } from "../form/InputImage.js";
import { InputNumber } from "../form/InputNumber.js";
import { InputStock, Stock } from "../form/InputStock.js";
import { InputTaxes } from "../form/InputTaxes.js";
import { InputWithAddon } from "../form/InputWithAddon.js";
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string };

View File

@ -16,7 +16,7 @@
import { Amounts } from "@gnu-taler/taler-util";
import { h, VNode } from "preact";
import emptyImage from "../../assets/empty.png";
import { MerchantBackend } from "../../declaration";
import { MerchantBackend } from "../../declaration.js";
import { Translate } from "../../i18n";
interface Props {

View File

@ -21,7 +21,7 @@
import { createContext, h, VNode } from 'preact'
import { useCallback, useContext, useState } from 'preact/hooks'
import { useBackendDefaultToken, useBackendURL } from '../hooks';
import { useBackendDefaultToken, useBackendURL } from "../hooks.js";
interface BackendContextType {
url: string;

View File

@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { useState } from "preact/hooks";
import { cancelPendingRequest } from "./backend";
import { cancelPendingRequest } from "./backend.js";
export interface Options {
slowTolerance: number,

View File

@ -21,11 +21,11 @@
import { useSWRConfig } from "swr";
import axios, { AxiosError, AxiosResponse } from "axios";
import { MerchantBackend } from "../declaration";
import { useBackendContext } from "../context/backend";
import { MerchantBackend } from "../declaration.js";
import { useBackendContext } from "../context/backend.js";
import { useEffect, useState } from "preact/hooks";
import { DEFAULT_REQUEST_TIMEOUT } from "../utils/constants";
import { axiosHandler, removeAxiosCancelToken } from "../utils/switchableAxios";
import { DEFAULT_REQUEST_TIMEOUT } from "../utils/constants.js";
import { axiosHandler, removeAxiosCancelToken } from "../utils/switchableAxios.js";
export function useMatchMutate(): (
re: RegExp,

View File

@ -20,7 +20,7 @@
*/
import { StateUpdater, useCallback, useState } from "preact/hooks";
import { ValueOrFunction } from '../utils/types';
import { ValueOrFunction } from "../utils/types.js";
const calculateRootPath = () => {

View File

@ -14,9 +14,9 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import useSWR, { useSWRConfig } from "swr";
import { useBackendContext } from "../context/backend";
import { useInstanceContext } from "../context/instance";
import { MerchantBackend } from "../declaration";
import { useBackendContext } from "../context/backend.js";
import { useInstanceContext } from "../context/instance.js";
import { MerchantBackend } from "../declaration.js";
import {
fetcher,
HttpError,
@ -24,7 +24,7 @@ import {
HttpResponseOk,
request,
useMatchMutate,
} from "./backend";
} from "./backend.js";
interface InstanceAPI {
updateInstance: (

View File

@ -20,7 +20,7 @@
*/
import { useState } from "preact/hooks";
import { Notification } from '../utils/types';
import { Notification } from "../utils/types.js";
interface Result {
notifications: Notification[];

View File

@ -15,10 +15,10 @@
*/
import { useEffect, useState } from "preact/hooks";
import useSWR, { useSWRConfig } from "swr";
import { useBackendContext } from "../context/backend";
import { useInstanceContext } from "../context/instance";
import { MerchantBackend } from "../declaration";
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants";
import { useBackendContext } from "../context/backend.js";
import { useInstanceContext } from "../context/instance.js";
import { MerchantBackend } from "../declaration.js";
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants.js";
import {
fetcher,
HttpError,
@ -27,7 +27,7 @@ import {
HttpResponsePaginated,
request,
useMatchMutate,
} from "./backend";
} from "./backend.js";
export interface OrderAPI {
//FIXME: add OutOfStockResponse on 410

View File

@ -14,9 +14,9 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import useSWR, { useSWRConfig } from "swr";
import { useBackendContext } from "../context/backend";
import { useInstanceContext } from "../context/instance";
import { MerchantBackend, WithId } from "../declaration";
import { useBackendContext } from "../context/backend.js";
import { useInstanceContext } from "../context/instance.js";
import { MerchantBackend, WithId } from "../declaration.js";
import {
fetcher,
HttpError,
@ -25,7 +25,7 @@ import {
multiFetcher,
request,
useMatchMutate
} from "./backend";
} from "./backend.js";
export interface ProductAPI {
createProduct: (

View File

@ -14,9 +14,9 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import useSWR, { useSWRConfig } from "swr";
import { useBackendContext } from "../context/backend";
import { useInstanceContext } from "../context/instance";
import { MerchantBackend } from "../declaration";
import { useBackendContext } from "../context/backend.js";
import { useInstanceContext } from "../context/instance.js";
import { MerchantBackend } from "../declaration.js";
import {
fetcher,
HttpError,
@ -24,7 +24,7 @@ import {
HttpResponseOk,
request,
useMatchMutate,
} from "./backend";
} from "./backend.js";
export function useReservesAPI(): ReserveMutateAPI {
const mutateAll = useMatchMutate();

View File

@ -13,8 +13,8 @@
You should have received a copy of the GNU General Public License along with
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import { MerchantBackend } from "../declaration";
import { useBackendContext } from "../context/backend";
import { MerchantBackend } from "../declaration.js";
import { useBackendContext } from "../context/backend.js";
import {
request,
HttpResponse,
@ -22,10 +22,10 @@ import {
HttpResponseOk,
HttpResponsePaginated,
useMatchMutate,
} from "./backend";
} from "./backend.js";
import useSWR from "swr";
import { useInstanceContext } from "../context/instance";
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants";
import { useInstanceContext } from "../context/instance.js";
import { MAX_RESULT_SIZE, PAGE_SIZE } from "../utils/constants.js";
import { useEffect, useState } from "preact/hooks";
async function transferFetcher<T>(

View File

@ -23,7 +23,7 @@
*/
import { ComponentChild, ComponentChildren, h, Fragment, VNode } from "preact";
import { useTranslationContext } from "../context/translation";
import { useTranslationContext } from "../context/translation.js";
export type Translator = (
stringSeq: TemplateStringsArray,

View File

@ -22,16 +22,15 @@
import { h, VNode } from 'preact';
import { route } from 'preact-router';
import { useMemo } from "preact/hooks";
import { ApplicationReadyRoutes } from "./ApplicationReadyRoutes";
import { Loading } from "./components/exception/loading";
import { NotificationCard, NotYetReadyAppMenu } from "./components/menu";
import { BackendContextProvider, useBackendContext } from './context/backend';
import { ConfigContextProvider } from './context/config';
import { FetchContextProvider } from './context/fetch';
import { TranslationProvider } from './context/translation';
import { useBackendConfig } from "./hooks/backend";
import { useTranslator } from './i18n';
import LoginPage from './paths/login';
import { ApplicationReadyRoutes } from "./ApplicationReadyRoutes.js";
import { Loading } from "./components/exception/loading.js";
import { NotificationCard, NotYetReadyAppMenu } from "./components/menu/index.js";
import { BackendContextProvider, useBackendContext } from './context/backend.js';
import { ConfigContextProvider } from './context/config.js';
import { TranslationProvider } from './context/translation.js';
import { useBackendConfig } from "./hooks/backend.js";
import { useTranslator } from './i18n/index.js';
import LoginPage from './paths/login/index.js';
import "./scss/main.scss";
export default function Application(): VNode {

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { CreatePage as TestedComponent } from './CreatePage';
import { CreatePage as TestedComponent } from "./CreatePage.js";
export default {

View File

@ -22,16 +22,16 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import * as yup from "yup";
import { AsyncButton } from "../../../components/exception/AsyncButton";
import { AsyncButton } from "../../../components/exception/AsyncButton.js";
import {
FormErrors,
FormProvider,
} from "../../../components/form/FormProvider";
import { SetTokenNewInstanceModal } from "../../../components/modal";
import { MerchantBackend } from "../../../declaration";
} from "../../../components/form/FormProvider.js";
import { SetTokenNewInstanceModal } from "../../../components/modal.js";
import { MerchantBackend } from "../../../declaration.js";
import { Translate, useTranslator } from "../../../i18n";
import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields";
import { INSTANCE_ID_REGEX, PAYTO_REGEX } from "../../../utils/constants";
import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields.js";
import { INSTANCE_ID_REGEX, PAYTO_REGEX } from "../../../utils/constants.js";
import { Amounts } from "@gnu-taler/taler-util";
export type Entity = MerchantBackend.Instances.InstanceConfigurationMessage & {

View File

@ -18,8 +18,8 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { h, VNode } from "preact";
import { CreatedSuccessfully } from "../../../components/notifications/CreatedSuccessfully";
import { Entity } from "./index";
import { CreatedSuccessfully } from "../../../components/notifications/CreatedSuccessfully.js";
import { Entity } from "./index.js";
export function InstanceCreatedSuccessfully({ entity, onConfirm }: { entity: Entity; onConfirm: () => void; }): VNode {
return <CreatedSuccessfully onConfirm={onConfirm}>

View File

@ -19,13 +19,13 @@
*/
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { NotificationCard } from "../../../components/menu";
import { MerchantBackend } from "../../../declaration";
import { useAdminAPI } from "../../../hooks/instance";
import { NotificationCard } from "../../../components/menu.js";
import { MerchantBackend } from "../../../declaration.js";
import { useAdminAPI } from "../../../hooks/instance.js";
import { useTranslator } from "../../../i18n";
import { Notification } from "../../../utils/types";
import { CreatePage } from "./CreatePage";
import { InstanceCreatedSuccessfully } from "./InstanceCreatedSuccessfully";
import { Notification } from "../../../utils/types.js";
import { CreatePage } from "./CreatePage.js";
import { InstanceCreatedSuccessfully } from "./InstanceCreatedSuccessfully.js";
interface Props {
onBack?: () => void;

View File

@ -21,7 +21,7 @@
import { h, VNode } from "preact";
import { StateUpdater, useEffect, useState } from "preact/hooks";
import { MerchantBackend } from "../../../declaration";
import { MerchantBackend } from "../../../declaration.js";
import { Translate, useTranslator } from "../../../i18n";
interface Props {

View File

@ -20,7 +20,7 @@
*/
import { h } from 'preact';
import { View } from './View';
import { View } from "./View.js";
export default {

View File

@ -20,8 +20,8 @@
*/
import { h, VNode } from "preact";
import { MerchantBackend } from "../../../declaration";
import { CardTable as CardTableActive } from './TableActive';
import { MerchantBackend } from "../../../declaration.js";
import { CardTable as CardTableActive } from "./TableActive.js";
import { useState } from 'preact/hooks';
import { Translate, useTranslator } from "../../../i18n";

View File

@ -21,15 +21,15 @@
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../components/exception/loading";
import { NotificationCard } from "../../../components/menu";
import { DeleteModal, PurgeModal } from "../../../components/modal";
import { MerchantBackend } from "../../../declaration";
import { HttpError } from "../../../hooks/backend";
import { useAdminAPI, useBackendInstances } from "../../../hooks/instance";
import { Loading } from "../../../components/exception/loading.js";
import { NotificationCard } from "../../../components/menu.js";
import { DeleteModal, PurgeModal } from "../../../components/modal.js";
import { MerchantBackend } from "../../../declaration.js";
import { HttpError } from "../../../hooks/backend.js";
import { useAdminAPI, useBackendInstances } from "../../../hooks/instance.js";
import { useTranslator } from "../../../i18n";
import { Notification } from "../../../utils/types";
import { View } from "./View";
import { Notification } from "../../../utils/types.js";
import { View } from "./View.js";
interface Props {
onCreate: () => void;

View File

@ -21,9 +21,9 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { FormProvider } from "../../../components/form/FormProvider";
import { Input } from "../../../components/form/Input";
import { MerchantBackend } from "../../../declaration";
import { FormProvider } from "../../../components/form/FormProvider.js";
import { Input } from "../../../components/form/Input.js";
import { MerchantBackend } from "../../../declaration.js";
import { useTranslator } from "../../../i18n";
type Entity = MerchantBackend.Instances.InstanceReconfigurationMessage;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from "preact";
import { DetailPage as TestedComponent } from "./DetailPage";
import { DetailPage as TestedComponent } from "./DetailPage.js";
export default {
title: "Pages/Instance/Detail",

View File

@ -15,12 +15,12 @@
*/
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../components/exception/loading";
import { DeleteModal } from "../../../components/modal";
import { useInstanceContext } from "../../../context/instance";
import { HttpError } from "../../../hooks/backend";
import { useInstanceAPI, useInstanceDetails } from "../../../hooks/instance";
import { DetailPage } from "./DetailPage";
import { Loading } from "../../../components/exception/loading.js";
import { DeleteModal } from "../../../components/modal.js";
import { useInstanceContext } from "../../../context/instance.js";
import { HttpError } from "../../../hooks/backend.js";
import { useInstanceAPI, useInstanceDetails } from "../../../hooks/instance.js";
import { DetailPage } from "./DetailPage.js";
interface Props {
onUnauthorized: () => VNode;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode } from "preact";
import { MerchantBackend } from "../../../../declaration";
import { MerchantBackend } from "../../../../declaration.js";
import { Translate, useTranslator } from "../../../../i18n";
export interface Props {

View File

@ -20,10 +20,10 @@
*/
import { h, VNode } from "preact";
import { Loading } from "../../../../components/exception/loading";
import { HttpError } from "../../../../hooks/backend";
import { useInstanceKYCDetails } from "../../../../hooks/instance";
import { ListPage } from "./ListPage";
import { Loading } from "../../../../components/exception/loading.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useInstanceKYCDetails } from "../../../../hooks/instance.js";
import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from "preact";
import { CreatePage as TestedComponent } from "./CreatePage";
import { CreatePage as TestedComponent } from "./CreatePage.js";
export default {
title: "Pages/Order/Create",

View File

@ -26,22 +26,22 @@ import { useEffect, useState } from "preact/hooks";
import {
FormProvider,
FormErrors,
} from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { InputDate } from "../../../../components/form/InputDate";
import { InputGroup } from "../../../../components/form/InputGroup";
import { InputLocation } from "../../../../components/form/InputLocation";
import { ProductList } from "../../../../components/product/ProductList";
import { useConfigContext } from "../../../../context/config";
import { Duration, MerchantBackend, WithId } from "../../../../declaration";
} from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputDate } from "../../../../components/form/InputDate.js";
import { InputGroup } from "../../../../components/form/InputGroup.js";
import { InputLocation } from "../../../../components/form/InputLocation.js";
import { ProductList } from "../../../../components/product/ProductList.js";
import { useConfigContext } from "../../../../context/config.js";
import { Duration, MerchantBackend, WithId } from "../../../../declaration.js";
import { Translate, useTranslator } from "../../../../i18n";
import { OrderCreateSchema as schema } from "../../../../schemas/index";
import { rate } from "../../../../utils/amount";
import { InventoryProductForm } from "../../../../components/product/InventoryProductForm";
import { NonInventoryProductFrom } from "../../../../components/product/NonInventoryProductForm";
import { InputNumber } from "../../../../components/form/InputNumber";
import { InputBoolean } from "../../../../components/form/InputBoolean";
import { OrderCreateSchema as schema } from "../../../../schemas/index.js";
import { rate } from "../../../../utils/amount.js";
import { InventoryProductForm } from "../../../../components/product/InventoryProductForm.js";
import { NonInventoryProductFrom } from "../../../../components/product/NonInventoryProductForm.js";
import { InputNumber } from "../../../../components/form/InputNumber.js";
import { InputBoolean } from "../../../../components/form/InputBoolean.js";
interface Props {
onCreate: (d: MerchantBackend.Orders.PostOrderRequest) => void;

View File

@ -15,10 +15,10 @@
*/
import { h, VNode } from "preact";
import { useEffect, useState } from "preact/hooks";
import { CreatedSuccessfully } from "../../../../components/notifications/CreatedSuccessfully";
import { useOrderAPI } from "../../../../hooks/order";
import { CreatedSuccessfully } from "../../../../components/notifications/CreatedSuccessfully.js";
import { useOrderAPI } from "../../../../hooks/order.js";
import { Translate } from "../../../../i18n";
import { Entity } from "./index";
import { Entity } from "./index.js";
interface Props {
entity: Entity;

View File

@ -21,16 +21,16 @@
import { Fragment, h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { Loading } from '../../../../components/exception/loading';
import { NotificationCard } from '../../../../components/menu';
import { MerchantBackend } from '../../../../declaration';
import { HttpError } from '../../../../hooks/backend';
import { useInstanceDetails } from '../../../../hooks/instance';
import { useOrderAPI } from '../../../../hooks/order';
import { useInstanceProducts } from '../../../../hooks/product';
import { Notification } from '../../../../utils/types';
import { CreatePage } from './CreatePage';
import { OrderCreatedSuccessfully } from './OrderCreatedSuccessfully';
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend } from "../../../../declaration.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useInstanceDetails } from "../../../../hooks/instance.js";
import { useOrderAPI } from "../../../../hooks/order.js";
import { useInstanceProducts } from "../../../../hooks/product.js";
import { Notification } from "../../../../utils/types.js";
import { CreatePage } from "./CreatePage.js";
import { OrderCreatedSuccessfully } from "./OrderCreatedSuccessfully.js";
export type Entity = {
request: MerchantBackend.Orders.PostOrderRequest,

View File

@ -21,8 +21,8 @@
import { addDays } from "date-fns";
import { h, VNode, FunctionalComponent } from "preact";
import { MerchantBackend } from "../../../../declaration";
import { DetailPage as TestedComponent } from "./DetailPage";
import { MerchantBackend } from "../../../../declaration.js";
import { DetailPage as TestedComponent } from "./DetailPage.js";
export default {
title: "Pages/Order/Detail",

View File

@ -23,21 +23,21 @@ import { AmountJson, Amounts } from "@gnu-taler/taler-util";
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { FormProvider } from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { InputDate } from "../../../../components/form/InputDate";
import { InputDuration } from "../../../../components/form/InputDuration";
import { InputGroup } from "../../../../components/form/InputGroup";
import { InputLocation } from "../../../../components/form/InputLocation";
import { TextField } from "../../../../components/form/TextField";
import { ProductList } from "../../../../components/product/ProductList";
import { useBackendContext } from "../../../../context/backend";
import { MerchantBackend } from "../../../../declaration";
import { FormProvider } from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputDate } from "../../../../components/form/InputDate.js";
import { InputDuration } from "../../../../components/form/InputDuration.js";
import { InputGroup } from "../../../../components/form/InputGroup.js";
import { InputLocation } from "../../../../components/form/InputLocation.js";
import { TextField } from "../../../../components/form/TextField.js";
import { ProductList } from "../../../../components/product/ProductList.js";
import { useBackendContext } from "../../../../context/backend.js";
import { MerchantBackend } from "../../../../declaration.js";
import { Translate, useTranslator } from "../../../../i18n";
import { mergeRefunds } from "../../../../utils/amount";
import { RefundModal } from "../list/Table";
import { Event, Timeline } from "./Timeline";
import { mergeRefunds } from "../../../../utils/amount.js";
import { RefundModal } from "../list/Table.js";
import { Event, Timeline } from "./Timeline.js";
type Entity = MerchantBackend.Orders.MerchantOrderStatusResponse;
type CT = MerchantBackend.ContractTerms;

View File

@ -15,13 +15,13 @@
*/
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { Loading } from "../../../../components/exception/loading";
import { NotificationCard } from "../../../../components/menu";
import { HttpError } from "../../../../hooks/backend";
import { useOrderDetails, useOrderAPI } from "../../../../hooks/order";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useOrderDetails, useOrderAPI } from "../../../../hooks/order.js";
import { useTranslator } from "../../../../i18n";
import { Notification } from "../../../../utils/types";
import { DetailPage } from "./DetailPage";
import { Notification } from "../../../../utils/types.js";
import { DetailPage } from "./DetailPage.js";
export interface Props {
oid: string;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from "preact";
import { ListPage as TestedComponent } from "./ListPage";
import { ListPage as TestedComponent } from "./ListPage.js";
export default {
title: "Pages/Order/List",

View File

@ -22,10 +22,10 @@
import { format } from 'date-fns';
import { h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { DatePicker } from '../../../../components/picker/DatePicker';
import { MerchantBackend, WithId } from '../../../../declaration';
import { DatePicker } from "../../../../components/picker/DatePicker.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import { Translate, useTranslator } from '../../../../i18n';
import { CardTable } from './Table';
import { CardTable } from "./Table.js";
export interface ListPageProps {
errorOrderId: string | undefined,

View File

@ -26,16 +26,16 @@ import { StateUpdater, useState } from "preact/hooks";
import {
FormErrors,
FormProvider,
} from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { InputGroup } from "../../../../components/form/InputGroup";
import { InputSelector } from "../../../../components/form/InputSelector";
import { ConfirmModal } from "../../../../components/modal";
import { useConfigContext } from "../../../../context/config";
import { MerchantBackend, WithId } from "../../../../declaration";
} from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputGroup } from "../../../../components/form/InputGroup.js";
import { InputSelector } from "../../../../components/form/InputSelector.js";
import { ConfirmModal } from "../../../../components/modal.js";
import { useConfigContext } from "../../../../context/config.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import { Translate, useTranslator } from "../../../../i18n";
import { mergeRefunds } from "../../../../utils/amount";
import { mergeRefunds } from "../../../../utils/amount.js";
type Entity = MerchantBackend.Orders.OrderHistoryEntry & WithId;
interface Props {

View File

@ -21,15 +21,15 @@
import { h, VNode, Fragment } from 'preact';
import { useState } from 'preact/hooks';
import { Loading } from '../../../../components/exception/loading';
import { NotificationCard } from '../../../../components/menu';
import { MerchantBackend, WithId } from '../../../../declaration';
import { HttpError } from '../../../../hooks/backend';
import { InstanceOrderFilter, useInstanceOrders, useOrderAPI, useOrderDetails } from '../../../../hooks/order';
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import { HttpError } from "../../../../hooks/backend.js";
import { InstanceOrderFilter, useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../../hooks/order.js";
import { useTranslator } from '../../../../i18n';
import { Notification } from '../../../../utils/types';
import { RefundModal } from './Table';
import { ListPage } from './ListPage';
import { Notification } from "../../../../utils/types.js";
import { RefundModal } from "./Table.js";
import { ListPage } from "./ListPage.js";
interface Props {
onUnauthorized: () => VNode;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { CreatePage as TestedComponent } from './CreatePage';
import { CreatePage as TestedComponent } from "./CreatePage.js";
export default {

View File

@ -20,10 +20,10 @@
*/
import { h, VNode } from "preact";
import { AsyncButton } from "../../../../components/exception/AsyncButton";
import { ProductForm } from "../../../../components/product/ProductForm";
import { MerchantBackend } from "../../../../declaration";
import { useListener } from "../../../../hooks/listener";
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
import { ProductForm } from "../../../../components/product/ProductForm.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useListener } from "../../../../hooks/listener.js";
import { Translate, useTranslator } from "../../../../i18n";
type Entity = MerchantBackend.Products.ProductAddDetail & { product_id: string}

View File

@ -14,8 +14,8 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
import { h, VNode } from "preact";
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully";
import { Entity } from "./index";
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully.js";
import { Entity } from "./index.js";
import emptyImage from "../../assets/empty.png";
interface Props {

View File

@ -21,12 +21,12 @@
import { Fragment, h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { NotificationCard } from '../../../../components/menu';
import { MerchantBackend } from '../../../../declaration';
import { useProductAPI } from '../../../../hooks/product';
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useProductAPI } from "../../../../hooks/product.js";
import { useTranslator } from '../../../../i18n';
import { Notification } from '../../../../utils/types';
import { CreatePage } from './CreatePage';
import { Notification } from "../../../../utils/types.js";
import { CreatePage } from "./CreatePage.js";
export type Entity = MerchantBackend.Products.ProductAddDetail
interface Props {

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { CardTable as TestedComponent } from './Table';
import { CardTable as TestedComponent } from "./Table.js";
export default {

View File

@ -25,10 +25,10 @@ import { StateUpdater, useState } from "preact/hooks";
import {
FormProvider,
FormErrors,
} from "../../../../components/form/FormProvider";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { InputNumber } from "../../../../components/form/InputNumber";
import { MerchantBackend, WithId } from "../../../../declaration";
} from "../../../../components/form/FormProvider.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputNumber } from "../../../../components/form/InputNumber.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import emptyImage from "../../../../assets/empty.png";
import { Translate, useTranslator } from "../../../../i18n";
import { Amounts } from "@gnu-taler/taler-util";

View File

@ -21,14 +21,14 @@
import { h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { Loading } from '../../../../components/exception/loading';
import { NotificationCard } from '../../../../components/menu';
import { MerchantBackend, WithId } from '../../../../declaration';
import { HttpError } from '../../../../hooks/backend';
import { useInstanceProducts, useProductAPI } from "../../../../hooks/product";
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useInstanceProducts, useProductAPI } from "../../../../hooks/product.js";
import { useTranslator } from '../../../../i18n';
import { Notification } from '../../../../utils/types';
import { CardTable } from './Table';
import { Notification } from "../../../../utils/types.js";
import { CardTable } from "./Table.js";
interface Props {
onUnauthorized: () => VNode;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { UpdatePage as TestedComponent } from './UpdatePage';
import { UpdatePage as TestedComponent } from "./UpdatePage.js";
export default {

View File

@ -20,10 +20,10 @@
*/
import { h, VNode } from "preact";
import { AsyncButton } from "../../../../components/exception/AsyncButton";
import { ProductForm } from "../../../../components/product/ProductForm";
import { MerchantBackend, WithId } from "../../../../declaration";
import { useListener } from "../../../../hooks/listener";
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
import { ProductForm } from "../../../../components/product/ProductForm.js";
import { MerchantBackend, WithId } from "../../../../declaration.js";
import { useListener } from "../../../../hooks/listener.js";
import { Translate, useTranslator } from "../../../../i18n";
type Entity = MerchantBackend.Products.ProductDetail & { product_id: string }

View File

@ -21,14 +21,14 @@
import { Fragment, h, VNode } from 'preact';
import { useState } from 'preact/hooks';
import { Loading } from '../../../../components/exception/loading';
import { NotificationCard } from '../../../../components/menu';
import { MerchantBackend } from '../../../../declaration';
import { HttpError } from '../../../../hooks/backend';
import { useProductAPI, useProductDetails } from '../../../../hooks/product';
import { Loading } from "../../../../components/exception/loading.js";
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend } from "../../../../declaration.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useProductAPI, useProductDetails } from "../../../../hooks/product.js";
import { useTranslator } from '../../../../i18n';
import { Notification } from '../../../../utils/types';
import { UpdatePage } from './UpdatePage';
import { Notification } from "../../../../utils/types.js";
import { UpdatePage } from "./UpdatePage.js";
export type Entity = MerchantBackend.Products.ProductAddDetail
interface Props {

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { CreatePage as TestedComponent } from './CreatePage';
import { CreatePage as TestedComponent } from "./CreatePage.js";
export default {

View File

@ -21,16 +21,16 @@
import { Fragment, h, VNode } from "preact";
import { StateUpdater, useEffect, useState } from "preact/hooks";
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { ExchangeBackend, MerchantBackend } from "../../../../declaration";
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { ExchangeBackend, MerchantBackend } from "../../../../declaration.js";
import { Translate, useTranslator } from "../../../../i18n";
import { AsyncButton } from "../../../../components/exception/AsyncButton";
import { AsyncButton } from "../../../../components/exception/AsyncButton.js";
import { canonicalizeBaseUrl, ExchangeKeysJson } from "@gnu-taler/taler-util"
import { PAYTO_WIRE_METHOD_LOOKUP, URL_REGEX } from "../../../../utils/constants";
import { request } from "../../../../hooks/backend";
import { InputSelector } from "../../../../components/form/InputSelector";
import { PAYTO_WIRE_METHOD_LOOKUP, URL_REGEX } from "../../../../utils/constants.js";
import { request } from "../../../../hooks/backend.js";
import { InputSelector } from "../../../../components/form/InputSelector.js";
type Entity = MerchantBackend.Tips.ReserveCreateRequest

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from 'preact';
import { CreatedSuccessfully as TestedComponent } from './CreatedSuccessfully';
import { CreatedSuccessfully as TestedComponent } from "./CreatedSuccessfully.js";
export default {

View File

@ -15,10 +15,10 @@
*/
import { h, VNode } from "preact";
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully";
import { MerchantBackend } from "../../../../declaration";
import { CreatedSuccessfully as Template } from "../../../../components/notifications/CreatedSuccessfully.js";
import { MerchantBackend } from "../../../../declaration.js";
import { Translate } from "../../../../i18n";
import { QR } from "../../../../components/exception/QR";
import { QR } from "../../../../components/exception/QR.js";
type Entity = { request: MerchantBackend.Tips.ReserveCreateRequest, response: MerchantBackend.Tips.ReserveCreateConfirmation };

View File

@ -21,13 +21,13 @@
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { NotificationCard } from "../../../../components/menu";
import { MerchantBackend } from "../../../../declaration";
import { useReservesAPI } from "../../../../hooks/reserves";
import { NotificationCard } from "../../../../components/menu.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useReservesAPI } from "../../../../hooks/reserves.js";
import { useTranslator } from "../../../../i18n";
import { Notification } from "../../../../utils/types";
import { CreatedSuccessfully } from "./CreatedSuccessfully";
import { CreatePage } from "./CreatePage";
import { Notification } from "../../../../utils/types.js";
import { CreatedSuccessfully } from "./CreatedSuccessfully.js";
import { CreatePage } from "./CreatePage.js";
interface Props {
onBack: () => void;
onConfirm: () => void;

View File

@ -23,17 +23,17 @@ import { Amounts } from "@gnu-taler/taler-util";
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
import { useState } from "preact/hooks";
import { QR } from "../../../../components/exception/QR";
import { FormProvider } from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { InputDate } from "../../../../components/form/InputDate";
import { TextField } from "../../../../components/form/TextField";
import { ContinueModal, SimpleModal } from "../../../../components/modal";
import { MerchantBackend } from "../../../../declaration";
import { useTipDetails } from "../../../../hooks/reserves";
import { QR } from "../../../../components/exception/QR.js";
import { FormProvider } from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { InputDate } from "../../../../components/form/InputDate.js";
import { TextField } from "../../../../components/form/TextField.js";
import { ContinueModal, SimpleModal } from "../../../../components/modal.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useTipDetails } from "../../../../hooks/reserves.js";
import { Translate, useTranslator } from "../../../../i18n";
import { TipInfo } from "./TipInfo";
import { TipInfo } from "./TipInfo.js";
type Entity = MerchantBackend.Tips.ReserveDetail;
type CT = MerchantBackend.ContractTerms;

View File

@ -20,7 +20,7 @@
*/
import { h, VNode, FunctionalComponent } from "preact";
import { DetailPage as TestedComponent } from "./DetailPage";
import { DetailPage as TestedComponent } from "./DetailPage.js";
export default {
title: "Pages/Reserve/Detail",

View File

@ -15,8 +15,8 @@
*/
import { format } from "date-fns";
import { Fragment, h, VNode } from "preact";
import { useBackendContext } from "../../../../context/backend";
import { MerchantBackend } from "../../../../declaration";
import { useBackendContext } from "../../../../context/backend.js";
import { MerchantBackend } from "../../../../declaration.js";
type Entity = MerchantBackend.Tips.TipDetails;

View File

@ -20,10 +20,10 @@
*/
import { Fragment, h, VNode } from "preact";
import { Loading } from "../../../../components/exception/loading";
import { HttpError } from "../../../../hooks/backend";
import { useReserveDetails } from "../../../../hooks/reserves";
import { DetailPage } from "./DetailPage";
import { Loading } from "../../../../components/exception/loading.js";
import { HttpError } from "../../../../hooks/backend.js";
import { useReserveDetails } from "../../../../hooks/reserves.js";
import { DetailPage } from "./DetailPage.js";
interface Props {
rid: string;

View File

@ -21,14 +21,14 @@
import { h, VNode } from "preact";
import { useState } from "preact/hooks";
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider";
import { Input } from "../../../../components/form/Input";
import { InputCurrency } from "../../../../components/form/InputCurrency";
import { ConfirmModal, ContinueModal } from "../../../../components/modal";
import { MerchantBackend } from "../../../../declaration";
import { FormErrors, FormProvider } from "../../../../components/form/FormProvider.js";
import { Input } from "../../../../components/form/Input.js";
import { InputCurrency } from "../../../../components/form/InputCurrency.js";
import { ConfirmModal, ContinueModal } from "../../../../components/modal.js";
import { MerchantBackend } from "../../../../declaration.js";
import { useTranslator } from "../../../../i18n";
import { AuthorizeTipSchema } from "../../../../schemas";
import { CreatedSuccessfully } from "./CreatedSuccessfully";
import { AuthorizeTipSchema } from "../../../../schemas.js";
import { CreatedSuccessfully } from "./CreatedSuccessfully.js";
import * as yup from 'yup';
interface AuthorizeTipModalProps {

Some files were not shown because too many files have changed in this diff Show More