diff options
Diffstat (limited to 'packages')
130 files changed, 508 insertions, 494 deletions
diff --git a/packages/merchant-backoffice-ui/Makefile b/packages/merchant-backoffice-ui/Makefile new file mode 100644 index 000000000..3c3a3f602 --- /dev/null +++ b/packages/merchant-backoffice-ui/Makefile @@ -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) + diff --git a/packages/merchant-backoffice-ui/src/AdminRoutes.tsx b/packages/merchant-backoffice-ui/src/AdminRoutes.tsx index a3ffbe2e6..9caf8ea7a 100644 --- a/packages/merchant-backoffice-ui/src/AdminRoutes.tsx +++ b/packages/merchant-backoffice-ui/src/AdminRoutes.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/ApplicationReadyRoutes.tsx b/packages/merchant-backoffice-ui/src/ApplicationReadyRoutes.tsx index ebc3d1d95..27a1406a0 100644 --- a/packages/merchant-backoffice-ui/src/ApplicationReadyRoutes.tsx +++ b/packages/merchant-backoffice-ui/src/ApplicationReadyRoutes.tsx @@ -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"; diff --git a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx index 06f1db17c..9e1593fe5 100644 --- a/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx +++ b/packages/merchant-backoffice-ui/src/InstanceRoutes.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx b/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx index 92bab4bfb..e37362b3a 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/AsyncButton.tsx @@ -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 = { diff --git a/packages/merchant-backoffice-ui/src/components/exception/login.tsx b/packages/merchant-backoffice-ui/src/components/exception/login.tsx index 498d994ed..142b9911d 100644 --- a/packages/merchant-backoffice-ui/src/components/exception/login.tsx +++ b/packages/merchant-backoffice-ui/src/components/exception/login.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/Input.tsx b/packages/merchant-backoffice-ui/src/components/form/Input.tsx index 9a9691e9b..dc4e9ae1a 100644 --- a/packages/merchant-backoffice-ui/src/components/form/Input.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/Input.tsx @@ -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'; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx b/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx index 984c6dc49..bcefc25d9 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputArray.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputBoolean.tsx b/packages/merchant-backoffice-ui/src/components/form/InputBoolean.tsx index 2771fe483..c4ef9441c 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputBoolean.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputBoolean.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx b/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx index d3a46f483..c4c6b8ce3 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputCurrency.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx b/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx index 77199527f..ce99a02fb 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputDate.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx b/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx index d5c208e25..6abe55be0 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputDuration.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx b/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx index 8af9c7d96..b73e5c5f7 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputGroup.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputImage.tsx b/packages/merchant-backoffice-ui/src/components/form/InputImage.tsx index 6cc9b9dcc..8e2586933 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputImage.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputImage.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputLocation.tsx b/packages/merchant-backoffice-ui/src/components/form/InputLocation.tsx index 12755f47a..bc90cf128 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputLocation.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputLocation.tsx @@ -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() diff --git a/packages/merchant-backoffice-ui/src/components/form/InputNumber.tsx b/packages/merchant-backoffice-ui/src/components/form/InputNumber.tsx index 046cda59e..7b7499f2d 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputNumber.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputNumber.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPayto.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPayto.tsx index 44252317e..703792936 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputPayto.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputPayto.tsx @@ -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>; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx index 9cfef07cf..22d812971 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputPaytoForm.tsx @@ -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 => { diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSearchProduct.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSearchProduct.tsx index 51f84fd12..2b239d483 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputSearchProduct.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputSearchProduct.tsx @@ -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 diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSecured.stories.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSecured.stories.tsx index 1990eeeae..72355e242 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputSecured.stories.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputSecured.stories.tsx @@ -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', diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx index c9b0f43b9..17431fcfc 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputSecured.tsx @@ -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>; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx b/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx index 86f4de756..f2574240b 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputSelector.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.stories.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.stories.tsx index 63c7e4131..bfd607c4e 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputStock.stories.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputStock.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx index 158f44192..be578d12d 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx b/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx index 507a61242..713003a0b 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputTaxes.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx b/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx index a16ebc2e9..16fc5d611 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputWithAddon.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/form/TextField.tsx b/packages/merchant-backoffice-ui/src/components/form/TextField.tsx index 2579a27b2..3dd157b79 100644 --- a/packages/merchant-backoffice-ui/src/components/form/TextField.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/TextField.tsx @@ -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'; diff --git a/packages/merchant-backoffice-ui/src/components/form/useField.tsx b/packages/merchant-backoffice-ui/src/components/form/useField.tsx index 8479d7ad8..a6e5a01a8 100644 --- a/packages/merchant-backoffice-ui/src/components/form/useField.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/useField.tsx @@ -20,7 +20,7 @@ */ import { ComponentChildren, VNode } from "preact"; -import { useFormContext } from "./FormProvider"; +import { useFormContext } from "./FormProvider.js"; interface Use<V> { error?: string; diff --git a/packages/merchant-backoffice-ui/src/components/form/useGroupField.tsx b/packages/merchant-backoffice-ui/src/components/form/useGroupField.tsx index a73f464a1..d2bb021cf 100644 --- a/packages/merchant-backoffice-ui/src/components/form/useGroupField.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/useGroupField.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { useFormContext } from "./FormProvider"; +import { useFormContext } from "./FormProvider.js"; interface Use { hasError?: boolean; diff --git a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx index d80c65cc2..af7124a45 100644 --- a/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx +++ b/packages/merchant-backoffice-ui/src/components/instance/DefaultInstanceFormFields.tsx @@ -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, diff --git a/packages/merchant-backoffice-ui/src/components/menu/LangSelector.tsx b/packages/merchant-backoffice-ui/src/components/menu/LangSelector.tsx index 41d08a58b..4f35e3f76 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/LangSelector.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/LangSelector.tsx @@ -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 = { diff --git a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx index e1bb4c7c0..7ef446bd1 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/NavigationBar.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx index e9c5ef8ae..7dd0983a2 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/menu/index.tsx b/packages/merchant-backoffice-ui/src/components/menu/index.tsx index 0a621af56..2a2e6f819 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/index.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/index.tsx @@ -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) { diff --git a/packages/merchant-backoffice-ui/src/components/modal/index.tsx b/packages/merchant-backoffice-ui/src/components/modal/index.tsx index a7edb9e48..c8eb839bc 100644 --- a/packages/merchant-backoffice-ui/src/components/modal/index.tsx +++ b/packages/merchant-backoffice-ui/src/components/modal/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/components/notifications/Notifications.stories.tsx b/packages/merchant-backoffice-ui/src/components/notifications/Notifications.stories.tsx index 3b95295fe..15e00b790 100644 --- a/packages/merchant-backoffice-ui/src/components/notifications/Notifications.stories.tsx +++ b/packages/merchant-backoffice-ui/src/components/notifications/Notifications.stories.tsx @@ -20,7 +20,7 @@ */ import { h } from 'preact'; -import { Notifications } from './index'; +import { Notifications } from "./index.js"; export default { diff --git a/packages/merchant-backoffice-ui/src/components/notifications/index.tsx b/packages/merchant-backoffice-ui/src/components/notifications/index.tsx index 34bd40ec6..d4da7b35a 100644 --- a/packages/merchant-backoffice-ui/src/components/notifications/index.tsx +++ b/packages/merchant-backoffice-ui/src/components/notifications/index.tsx @@ -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[]; diff --git a/packages/merchant-backoffice-ui/src/components/picker/DurationPicker.stories.tsx b/packages/merchant-backoffice-ui/src/components/picker/DurationPicker.stories.tsx index 275c80fa6..81bca17ba 100644 --- a/packages/merchant-backoffice-ui/src/components/picker/DurationPicker.stories.tsx +++ b/packages/merchant-backoffice-ui/src/components/picker/DurationPicker.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.stories.tsx b/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.stories.tsx index 6504d85ba..fd87283c4 100644 --- a/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.stories.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx index 8f05c9736..c4ec73061 100644 --- a/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/InventoryProductForm.tsx @@ -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, diff --git a/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx index 397efe616..2deddb421 100644 --- a/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/NonInventoryProductForm.tsx @@ -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 diff --git a/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx index 9434d3de8..115174bf9 100644 --- a/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx @@ -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 }; diff --git a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx index ff141bb39..037e90ff4 100644 --- a/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/ProductList.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/context/backend.ts b/packages/merchant-backoffice-ui/src/context/backend.ts index 9ef7bfdea..a09996c05 100644 --- a/packages/merchant-backoffice-ui/src/context/backend.ts +++ b/packages/merchant-backoffice-ui/src/context/backend.ts @@ -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; diff --git a/packages/merchant-backoffice-ui/src/hooks/async.ts b/packages/merchant-backoffice-ui/src/hooks/async.ts index fd550043b..69cb231a4 100644 --- a/packages/merchant-backoffice-ui/src/hooks/async.ts +++ b/packages/merchant-backoffice-ui/src/hooks/async.ts @@ -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, diff --git a/packages/merchant-backoffice-ui/src/hooks/backend.ts b/packages/merchant-backoffice-ui/src/hooks/backend.ts index 789cfc81c..6262a0bca 100644 --- a/packages/merchant-backoffice-ui/src/hooks/backend.ts +++ b/packages/merchant-backoffice-ui/src/hooks/backend.ts @@ -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, diff --git a/packages/merchant-backoffice-ui/src/hooks/index.ts b/packages/merchant-backoffice-ui/src/hooks/index.ts index a647e3e6c..e61dc4c34 100644 --- a/packages/merchant-backoffice-ui/src/hooks/index.ts +++ b/packages/merchant-backoffice-ui/src/hooks/index.ts @@ -20,7 +20,7 @@ */ import { StateUpdater, useCallback, useState } from "preact/hooks"; -import { ValueOrFunction } from '../utils/types'; +import { ValueOrFunction } from "../utils/types.js"; const calculateRootPath = () => { diff --git a/packages/merchant-backoffice-ui/src/hooks/instance.ts b/packages/merchant-backoffice-ui/src/hooks/instance.ts index 748bb82af..fd78aabf6 100644 --- a/packages/merchant-backoffice-ui/src/hooks/instance.ts +++ b/packages/merchant-backoffice-ui/src/hooks/instance.ts @@ -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: ( diff --git a/packages/merchant-backoffice-ui/src/hooks/notifications.ts b/packages/merchant-backoffice-ui/src/hooks/notifications.ts index 1c0c37308..9c5e21c79 100644 --- a/packages/merchant-backoffice-ui/src/hooks/notifications.ts +++ b/packages/merchant-backoffice-ui/src/hooks/notifications.ts @@ -20,7 +20,7 @@ */ import { useState } from "preact/hooks"; -import { Notification } from '../utils/types'; +import { Notification } from "../utils/types.js"; interface Result { notifications: Notification[]; diff --git a/packages/merchant-backoffice-ui/src/hooks/order.ts b/packages/merchant-backoffice-ui/src/hooks/order.ts index d0829683d..a25d18681 100644 --- a/packages/merchant-backoffice-ui/src/hooks/order.ts +++ b/packages/merchant-backoffice-ui/src/hooks/order.ts @@ -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 diff --git a/packages/merchant-backoffice-ui/src/hooks/product.ts b/packages/merchant-backoffice-ui/src/hooks/product.ts index c99542bc9..2b6332c51 100644 --- a/packages/merchant-backoffice-ui/src/hooks/product.ts +++ b/packages/merchant-backoffice-ui/src/hooks/product.ts @@ -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: ( diff --git a/packages/merchant-backoffice-ui/src/hooks/reserves.ts b/packages/merchant-backoffice-ui/src/hooks/reserves.ts index 7a662dfbc..d1dcb0b7a 100644 --- a/packages/merchant-backoffice-ui/src/hooks/reserves.ts +++ b/packages/merchant-backoffice-ui/src/hooks/reserves.ts @@ -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(); diff --git a/packages/merchant-backoffice-ui/src/hooks/transfer.ts b/packages/merchant-backoffice-ui/src/hooks/transfer.ts index 0c12d6d4d..fddbc7cda 100644 --- a/packages/merchant-backoffice-ui/src/hooks/transfer.ts +++ b/packages/merchant-backoffice-ui/src/hooks/transfer.ts @@ -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>( diff --git a/packages/merchant-backoffice-ui/src/i18n/index.tsx b/packages/merchant-backoffice-ui/src/i18n/index.tsx index 9403de1f5..f2638fc05 100644 --- a/packages/merchant-backoffice-ui/src/i18n/index.tsx +++ b/packages/merchant-backoffice-ui/src/i18n/index.tsx @@ -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, diff --git a/packages/merchant-backoffice-ui/src/index.tsx b/packages/merchant-backoffice-ui/src/index.tsx index 26dcc3eb8..8834ada53 100644 --- a/packages/merchant-backoffice-ui/src/index.tsx +++ b/packages/merchant-backoffice-ui/src/index.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx index c1287557d..7411586a1 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/Create.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx index 1851e52f1..2494aa706 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/CreatePage.tsx @@ -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 & { diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx index 00b3f20fc..37aa7e7d6 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/InstanceCreatedSuccessfully.tsx @@ -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}> diff --git a/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx index aaed6d666..df84aa538 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/create/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx b/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx index 56b3f299c..a5d3a2f12 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/list/TableActive.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/admin/list/View.stories.tsx b/packages/merchant-backoffice-ui/src/paths/admin/list/View.stories.tsx index 3da8c2e50..f0b04aabe 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/list/View.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/list/View.stories.tsx @@ -20,7 +20,7 @@ */ import { h } from 'preact'; -import { View } from './View'; +import { View } from "./View.js"; export default { diff --git a/packages/merchant-backoffice-ui/src/paths/admin/list/View.tsx b/packages/merchant-backoffice-ui/src/paths/admin/list/View.tsx index a77a5a1bf..175ed52de 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/list/View.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/list/View.tsx @@ -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"; diff --git a/packages/merchant-backoffice-ui/src/paths/admin/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/admin/list/index.tsx index c5609fd10..05bdc1142 100644 --- a/packages/merchant-backoffice-ui/src/paths/admin/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/admin/list/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/details/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/details/DetailPage.tsx index 2561f5842..5bb3a9ae8 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/details/DetailPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/details/DetailPage.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/details/Details.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/details/Details.stories.tsx index fb7c9144c..068dd55c0 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/details/Details.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/details/Details.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx index 15675891e..08fc85a52 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/details/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx index 52363d3cd..db2a7e024 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/ListPage.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx index 5dff01994..3ef95cb34 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/kyc/list/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/Create.stories.tsx index 43df8484a..e658dff8f 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/Create.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx index c08d8ee1d..9b65b3ee0 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/CreatePage.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/OrderCreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/OrderCreatedSuccessfully.tsx index 14c5d68c3..4aaa08cf6 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/OrderCreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/OrderCreatedSuccessfully.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx index c447c4b04..b54220ad3 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/create/index.tsx @@ -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, diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Detail.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Detail.stories.tsx index 812b11a76..8c21665e6 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Detail.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/Detail.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx index 4bb7051d6..8748f6977 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/DetailPage.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx index cd4e163eb..c4900de1a 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/details/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/List.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/List.stories.tsx index 1dbb3f20d..f68c3fd2e 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/List.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/List.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/ListPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/ListPage.tsx index 032801bde..4135e75b0 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/ListPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/ListPage.tsx @@ -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, diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx index 60d5fae59..ebfda8224 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/Table.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx index 47e143fb7..bfcdc7361 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/orders/list/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx index 1d9ea53f6..b42b9f929 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/create/Create.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx index ed669f67f..e14246f01 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatePage.tsx @@ -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} diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatedSuccessfully.tsx index b56750405..9bbdc4070 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/create/CreatedSuccessfully.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx index 46454582a..85b951f73 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/create/index.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/List.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/List.stories.tsx index beae83b15..53217d051 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/List.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/List.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx index 9c85d976e..54649b3cc 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/Table.tsx @@ -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"; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx index 63e440df5..c597f10a1 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/list/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx index 3a57f7fac..f97d6d367 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/Update.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx index d7eb3d162..2185602f3 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/UpdatePage.tsx @@ -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 } diff --git a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx index a6a61c815..5fb691995 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/products/update/index.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/Create.stories.tsx index e138770a8..586881318 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/Create.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx index 2e85cf9c8..7f2a49f93 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatePage.tsx @@ -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 diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.stories.tsx index f013040ff..0cea361fd 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx index 255486d22..6be260e3e 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/CreatedSuccessfully.tsx @@ -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 }; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/index.tsx index 5c2fdaf4b..3a793db9b 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/create/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx index cbc70179b..1ad94ac43 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/DetailPage.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/Details.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/Details.stories.tsx index 98c1fa72e..48a12f02a 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/Details.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/Details.stories.tsx @@ -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", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/TipInfo.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/TipInfo.tsx index 3f384966b..02bc6f6df 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/TipInfo.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/TipInfo.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx index c2483f053..882c2adac 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/details/index.tsx @@ -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; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/AutorizeTipModal.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/AutorizeTipModal.tsx index ec468b2e9..0cee19c61 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/AutorizeTipModal.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/AutorizeTipModal.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/CreatedSuccessfully.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/CreatedSuccessfully.tsx index 1e5f0758f..92a21bfd1 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/CreatedSuccessfully.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/CreatedSuccessfully.tsx @@ -15,8 +15,8 @@ */ import { format } from "date-fns"; import { Fragment, 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"; type Entity = MerchantBackend.Tips.TipCreateConfirmation; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/List.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/List.stories.tsx index 1cb9e748c..7a4e9ff42 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/List.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/List.stories.tsx @@ -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 { title: "Pages/Reserve/List", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/Table.tsx index b3bb7b020..e44226f20 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/Table.tsx @@ -21,7 +21,7 @@ import { format } from "date-fns"; import { Fragment, h, VNode } from "preact"; -import { MerchantBackend, WithId } from "../../../../declaration"; +import { MerchantBackend, WithId } from "../../../../declaration.js"; import { Translate, useTranslator } from "../../../../i18n"; type Entity = MerchantBackend.Tips.ReserveStatusEntry & WithId; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx index f071b5635..331010bdf 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/reserves/list/index.tsx @@ -21,18 +21,18 @@ import { 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 { Loading } from "../../../../components/exception/loading.js"; +import { NotificationCard } from "../../../../components/menu.js"; +import { MerchantBackend } from "../../../../declaration.js"; +import { HttpError } from "../../../../hooks/backend.js"; import { useInstanceReserves, useReservesAPI, -} from "../../../../hooks/reserves"; +} from "../../../../hooks/reserves.js"; import { useTranslator } from "../../../../i18n"; -import { Notification } from "../../../../utils/types"; -import { CardTable } from "./Table"; -import { AuthorizeTipModal } from "./AutorizeTipModal"; +import { Notification } from "../../../../utils/types.js"; +import { CardTable } from "./Table.js"; +import { AuthorizeTipModal } from "./AutorizeTipModal.js"; interface Props { onUnauthorized: () => VNode; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/Create.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/Create.stories.tsx index 535cb1e37..a21fe8e5b 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/Create.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/Create.stories.tsx @@ -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 { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx index d0f5c5e95..8da9b3469 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/CreatePage.tsx @@ -21,15 +21,15 @@ import { h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { AsyncButton } from "../../../../components/exception/AsyncButton"; -import { FormErrors, FormProvider } from "../../../../components/form/FormProvider"; -import { Input } from "../../../../components/form/Input"; -import { InputCurrency } from "../../../../components/form/InputCurrency"; -import { InputSelector } from "../../../../components/form/InputSelector"; -import { useConfigContext } from "../../../../context/config"; -import { MerchantBackend } from "../../../../declaration"; +import { AsyncButton } from "../../../../components/exception/AsyncButton.js"; +import { FormErrors, FormProvider } from "../../../../components/form/FormProvider.js"; +import { Input } from "../../../../components/form/Input.js"; +import { InputCurrency } from "../../../../components/form/InputCurrency.js"; +import { InputSelector } from "../../../../components/form/InputSelector.js"; +import { useConfigContext } from "../../../../context/config.js"; +import { MerchantBackend } from "../../../../declaration.js"; import { Translate, useTranslator } from "../../../../i18n"; -import { CROCKFORD_BASE32_REGEX, URL_REGEX } from "../../../../utils/constants"; +import { CROCKFORD_BASE32_REGEX, URL_REGEX } from "../../../../utils/constants.js"; type Entity = MerchantBackend.Transfers.TransferInformation diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/index.tsx index d95929a0e..c6410bee3 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/create/index.tsx @@ -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 { useInstanceDetails } from '../../../../hooks/instance'; -import { useTransferAPI } from '../../../../hooks/transfer'; +import { NotificationCard } from "../../../../components/menu.js"; +import { MerchantBackend } from "../../../../declaration.js"; +import { useInstanceDetails } from "../../../../hooks/instance.js"; +import { useTransferAPI } from "../../../../hooks/transfer.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.Transfers.TransferInformation interface Props { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/List.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/List.stories.tsx index 24a791187..94d03a492 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/List.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/List.stories.tsx @@ -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/Transfer/List", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/ListPage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/ListPage.tsx index 544a720b8..a6d01c1c8 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/ListPage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/ListPage.tsx @@ -20,11 +20,11 @@ */ import { h, VNode } from 'preact'; -import { FormProvider } from '../../../../components/form/FormProvider'; -import { InputSelector } from '../../../../components/form/InputSelector'; -import { MerchantBackend } from '../../../../declaration'; +import { FormProvider } from "../../../../components/form/FormProvider.js"; +import { InputSelector } from "../../../../components/form/InputSelector.js"; +import { MerchantBackend } from "../../../../declaration.js"; import { Translate, useTranslator } from '../../../../i18n'; -import { CardTable } from './Table'; +import { CardTable } from "./Table.js"; export interface Props { transfers: MerchantBackend.Transfers.TransferDetails[]; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/Table.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/Table.tsx index 4cb04694d..9c2f9c6bd 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/Table.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/Table.tsx @@ -22,7 +22,7 @@ import { format } from "date-fns"; import { h, VNode } from "preact"; import { StateUpdater, useState } from "preact/hooks"; -import { MerchantBackend, WithId } from "../../../../declaration"; +import { MerchantBackend, WithId } from "../../../../declaration.js"; import { Translate, useTranslator } from "../../../../i18n"; type Entity = MerchantBackend.Transfers.TransferDetails & WithId; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx index d8e2f60e9..c3079c136 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/transfers/list/index.tsx @@ -21,12 +21,12 @@ import { h, VNode } from 'preact'; import { useState } from 'preact/hooks'; -import { Loading } from '../../../../components/exception/loading'; -import { MerchantBackend } from '../../../../declaration'; -import { HttpError } from '../../../../hooks/backend'; -import { useInstanceDetails } from '../../../../hooks/instance'; -import { useInstanceTransfers } from "../../../../hooks/transfer"; -import { ListPage } from './ListPage'; +import { Loading } from "../../../../components/exception/loading.js"; +import { MerchantBackend } from "../../../../declaration.js"; +import { HttpError } from "../../../../hooks/backend.js"; +import { useInstanceDetails } from "../../../../hooks/instance.js"; +import { useInstanceTransfers } from "../../../../hooks/transfer.js"; +import { ListPage } from "./ListPage.js"; interface Props { onUnauthorized: () => VNode; diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx index 3239d9c5c..8c4717275 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/update/Update.stories.tsx @@ -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 { title: "Pages/Instance/Update", diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx index 4c7a51121..b3ea3047b 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/update/UpdatePage.tsx @@ -22,18 +22,18 @@ 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 { FormProvider, FormErrors, -} from "../../../components/form/FormProvider"; -import { UpdateTokenModal } from "../../../components/modal"; -import { useInstanceContext } from "../../../context/instance"; -import { MerchantBackend } from "../../../declaration"; +} from "../../../components/form/FormProvider.js"; +import { UpdateTokenModal } from "../../../components/modal.js"; +import { useInstanceContext } from "../../../context/instance.js"; +import { MerchantBackend } from "../../../declaration.js"; import { Translate, useTranslator } from "../../../i18n"; -import { InstanceUpdateSchema as schema } from "../../../schemas"; -import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields"; -import { PAYTO_REGEX } from "../../../utils/constants"; +import { InstanceUpdateSchema as schema } from "../../../schemas.js"; +import { DefaultInstanceFormFields } from "../../../components/instance/DefaultInstanceFormFields.js"; +import { PAYTO_REGEX } from "../../../utils/constants.js"; import { Amounts } from "@gnu-taler/taler-util"; type Entity = MerchantBackend.Instances.InstanceReconfigurationMessage & { diff --git a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx index bd5f4c727..fa35612a4 100644 --- a/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/instance/update/index.tsx @@ -15,20 +15,20 @@ */ import { Fragment, h, VNode } from "preact"; import { useState } from "preact/hooks"; -import { Loading } from "../../../components/exception/loading"; -import { NotificationCard } from "../../../components/menu"; -import { useInstanceContext } from "../../../context/instance"; -import { MerchantBackend } from "../../../declaration"; -import { HttpError, HttpResponse } from "../../../hooks/backend"; +import { Loading } from "../../../components/exception/loading.js"; +import { NotificationCard } from "../../../components/menu.js"; +import { useInstanceContext } from "../../../context/instance.js"; +import { MerchantBackend } from "../../../declaration.js"; +import { HttpError, HttpResponse } from "../../../hooks/backend.js"; import { useInstanceAPI, useInstanceDetails, useManagedInstanceDetails, useManagementAPI, -} from "../../../hooks/instance"; +} from "../../../hooks/instance.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 interface Props { onBack: () => void; diff --git a/packages/merchant-backoffice-ui/src/paths/login/index.tsx b/packages/merchant-backoffice-ui/src/paths/login/index.tsx index acad7fe0b..ac75e094f 100644 --- a/packages/merchant-backoffice-ui/src/paths/login/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/login/index.tsx @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ import { h, VNode } from "preact"; -import { LoginModal } from '../../components/exception/login'; +import { LoginModal } from "../../components/exception/login.js"; interface Props { onConfirm: (url: string, token?: string) => void; diff --git a/packages/merchant-backoffice-ui/src/schemas/index.ts b/packages/merchant-backoffice-ui/src/schemas/index.ts index 00e80199a..0f705c555 100644 --- a/packages/merchant-backoffice-ui/src/schemas/index.ts +++ b/packages/merchant-backoffice-ui/src/schemas/index.ts @@ -21,7 +21,7 @@ import { isAfter, isFuture } from 'date-fns'; import * as yup from 'yup'; -import { AMOUNT_REGEX, PAYTO_REGEX } from "../utils/constants"; +import { AMOUNT_REGEX, PAYTO_REGEX } from "../utils/constants.js"; yup.setLocale({ mixed: { diff --git a/packages/merchant-backoffice-ui/src/utils/amount.ts b/packages/merchant-backoffice-ui/src/utils/amount.ts index 1cfd5c1d1..575d70d87 100644 --- a/packages/merchant-backoffice-ui/src/utils/amount.ts +++ b/packages/merchant-backoffice-ui/src/utils/amount.ts @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ import { amountFractionalBase, AmountJson, Amounts } from "@gnu-taler/taler-util"; -import { MerchantBackend } from "../declaration"; +import { MerchantBackend } from "../declaration.js"; /** * sums two prices, diff --git a/packages/merchant-backoffice-ui/src/utils/table.ts b/packages/merchant-backoffice-ui/src/utils/table.ts index 198c46543..4ebd95807 100644 --- a/packages/merchant-backoffice-ui/src/utils/table.ts +++ b/packages/merchant-backoffice-ui/src/utils/table.ts @@ -14,7 +14,7 @@ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import { WithId } from "../declaration"; +import { WithId } from "../declaration.js"; /** * diff --git a/packages/merchant-backoffice-ui/tests/axiosMock.ts b/packages/merchant-backoffice-ui/tests/axiosMock.ts index 13ddab598..5bb8694c9 100644 --- a/packages/merchant-backoffice-ui/tests/axiosMock.ts +++ b/packages/merchant-backoffice-ui/tests/axiosMock.ts @@ -19,9 +19,9 @@ * @author Sebastian Javier Marchano (sebasjm) */ import * as axios from 'axios'; -import { MerchantBackend } from '../src/declaration'; -import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from '../src/utils/switchableAxios'; -// import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/hooks/backend"; +import { MerchantBackend } from "../src/declaration.js"; +import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/utils/switchableAxios.js"; +// import { mockAxiosOnce, setAxiosRequestAsTestingEnvironment } from "../src/hooks/backend.js"; export type Query<Req, Res> = (GetQuery | PostQuery | DeleteQuery | PatchQuery) & RequestResponse<Req, Res> diff --git a/packages/merchant-backoffice-ui/tests/context/backend.test.tsx b/packages/merchant-backoffice-ui/tests/context/backend.test.tsx index b7b50fd47..5e80d4adb 100644 --- a/packages/merchant-backoffice-ui/tests/context/backend.test.tsx +++ b/packages/merchant-backoffice-ui/tests/context/backend.test.tsx @@ -22,14 +22,14 @@ import { renderHook } from "@testing-library/preact-hooks"; import { ComponentChildren, h, VNode } from "preact"; import { act } from "preact/test-utils"; -import { BackendContextProvider } from "../../src/context/backend"; -import { InstanceContextProvider } from "../../src/context/instance"; -import { MerchantBackend } from "../../src/declaration"; +import { BackendContextProvider } from "../../src/context/backend.js"; +import { InstanceContextProvider } from "../../src/context/instance.js"; +import { MerchantBackend } from "../../src/declaration.js"; import { useAdminAPI, useInstanceAPI, useManagementAPI, -} from "../../src/hooks/instance"; +} from "../../src/hooks/instance.js"; import { API_CREATE_INSTANCE, API_GET_CURRENT_INSTANCE, @@ -37,7 +37,7 @@ import { API_UPDATE_INSTANCE_AUTH_BY_ID, assertJustExpectedRequestWereMade, AxiosMockEnvironment, -} from "../axiosMock"; +} from "../axiosMock.js"; interface TestingContextProps { children?: ComponentChildren; diff --git a/packages/merchant-backoffice-ui/tests/functions/regex.test.ts b/packages/merchant-backoffice-ui/tests/functions/regex.test.ts index fc8a6a42f..ed06fb655 100644 --- a/packages/merchant-backoffice-ui/tests/functions/regex.test.ts +++ b/packages/merchant-backoffice-ui/tests/functions/regex.test.ts @@ -19,7 +19,7 @@ * @author Sebastian Javier Marchano (sebasjm) */ -import { AMOUNT_REGEX, PAYTO_REGEX } from "../../src/utils/constants"; +import { AMOUNT_REGEX, PAYTO_REGEX } from "../../src/utils/constants.js"; describe('payto uri format', () => { const valids = [ diff --git a/packages/merchant-backoffice-ui/tests/header.test.tsx b/packages/merchant-backoffice-ui/tests/header.test.tsx index f098b70d5..d855346de 100644 --- a/packages/merchant-backoffice-ui/tests/header.test.tsx +++ b/packages/merchant-backoffice-ui/tests/header.test.tsx @@ -20,12 +20,12 @@ */ import { h } from "preact"; -import { ProductList } from "../src/components/product/ProductList"; +import { ProductList } from "../src/components/product/ProductList.js"; // See: https://github.com/preactjs/enzyme-adapter-preact-pure // import { shallow } from 'enzyme'; -import * as backend from "../src/context/config"; +import * as backend from "../src/context/config.js"; import { render, findAllByText } from "@testing-library/preact"; -import * as i18n from "../src/context/translation"; +import * as i18n from "../src/context/translation.js"; import * as jedLib from "jed"; const handler = new jedLib.Jed("en"); @@ -54,7 +54,7 @@ describe("Initial Test of the Sidebar", () => { unit: "book", }, ]} - /> + />, ); expect(context.findAllByText("description of the product")).toBeDefined(); diff --git a/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts b/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts index ae34c1339..3320b044e 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/listener.test.ts @@ -20,7 +20,7 @@ */ import { renderHook, act } from '@testing-library/preact-hooks'; -import { useListener } from '../../src/hooks/listener'; +import { useListener } from "../../src/hooks/listener.js"; // jest.useFakeTimers() diff --git a/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts b/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts index 561c991ad..75cfcd015 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/notification.test.ts @@ -20,7 +20,7 @@ */ import { renderHook, act} from '@testing-library/preact-hooks'; -import { useNotifications } from '../../src/hooks/notifications'; +import { useNotifications } from "../../src/hooks/notifications.js"; jest.useFakeTimers() diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx b/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx index 44514855d..1cf9220d6 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/index.tsx @@ -21,8 +21,8 @@ import { ComponentChildren, h, VNode } from "preact"; import { SWRConfig } from "swr"; -import { BackendContextProvider } from "../../../src/context/backend"; -import { InstanceContextProvider } from "../../../src/context/instance"; +import { BackendContextProvider } from "../../../src/context/backend.js"; +import { InstanceContextProvider } from "../../../src/context/instance.js"; interface TestingContextProps { children?: ComponentChildren; diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts index 55d9fa6ee..5bc463e74 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/instance.test.ts @@ -21,8 +21,8 @@ import { renderHook } from "@testing-library/preact-hooks"; import { act } from "preact/test-utils"; -import { MerchantBackend } from "../../../src/declaration"; -import { useAdminAPI, useBackendInstances, useInstanceAPI, useInstanceDetails, useManagementAPI } from "../../../src/hooks/instance"; +import { MerchantBackend } from "../../../src/declaration.js"; +import { useAdminAPI, useBackendInstances, useInstanceAPI, useInstanceDetails, useManagementAPI } from "../../../src/hooks/instance.js"; import { API_CREATE_INSTANCE, API_DELETE_INSTANCE, @@ -34,8 +34,8 @@ import { API_UPDATE_INSTANCE_BY_ID, assertJustExpectedRequestWereMade, AxiosMockEnvironment -} from "../../axiosMock"; -import { TestingContext } from "./index"; +} from "../../axiosMock.js"; +import { TestingContext } from "./index.js"; describe("instance api interaction with details ", () => { diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts index e7f6c9334..29f117df6 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/order.test.ts @@ -22,15 +22,15 @@ import { renderHook } from "@testing-library/preact-hooks"; import { act } from "preact/test-utils"; import { TestingContext } from "."; -import { MerchantBackend } from "../../../src/declaration"; -import { useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../src/hooks/order"; +import { MerchantBackend } from "../../../src/declaration.js"; +import { useInstanceOrders, useOrderAPI, useOrderDetails } from "../../../src/hooks/order.js"; import { API_CREATE_ORDER, API_DELETE_ORDER, API_FORGET_ORDER_BY_ID, API_GET_ORDER_BY_ID, API_LIST_ORDERS, API_REFUND_ORDER_BY_ID, assertJustExpectedRequestWereMade, assertNextRequest, assertNoMoreRequestWereMade, AxiosMockEnvironment -} from "../../axiosMock"; +} from "../../axiosMock.js"; describe("order api interaction with listing", () => { diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts index 5d39a7c47..9beaec747 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/product.test.ts @@ -22,8 +22,8 @@ import { renderHook } from "@testing-library/preact-hooks"; import { act } from "preact/test-utils"; import { TestingContext } from "."; -import { MerchantBackend } from "../../../src/declaration"; -import { useInstanceProducts, useProductAPI, useProductDetails } from "../../../src/hooks/product"; +import { MerchantBackend } from "../../../src/declaration.js"; +import { useInstanceProducts, useProductAPI, useProductDetails } from "../../../src/hooks/product.js"; import { API_CREATE_PRODUCT, API_DELETE_PRODUCT, API_GET_PRODUCT_BY_ID, @@ -32,7 +32,7 @@ import { assertJustExpectedRequestWereMade, assertNextRequest, AxiosMockEnvironment -} from "../../axiosMock"; +} from "../../axiosMock.js"; describe("product api interaction with listing ", () => { it("should evict cache when creating a product", async () => { diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts index 0361c54e8..ba01b380e 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/reserve.test.ts @@ -21,13 +21,13 @@ import { renderHook } from "@testing-library/preact-hooks"; import { act } from "preact/test-utils"; -import { MerchantBackend } from "../../../src/declaration"; +import { MerchantBackend } from "../../../src/declaration.js"; import { useInstanceReserves, useReserveDetails, useReservesAPI, useTipDetails, -} from "../../../src/hooks/reserves"; +} from "../../../src/hooks/reserves.js"; import { API_AUTHORIZE_TIP, API_AUTHORIZE_TIP_FOR_RESERVE, @@ -38,8 +38,8 @@ import { API_LIST_RESERVES, assertJustExpectedRequestWereMade, AxiosMockEnvironment, -} from "../../axiosMock"; -import { TestingContext } from "./index"; +} from "../../axiosMock.js"; +import { TestingContext } from "./index.js"; describe("reserve api interaction with listing ", () => { it("should evict cache when creating a reserve", async () => { diff --git a/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts b/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts index 612cf8842..54c908629 100644 --- a/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts +++ b/packages/merchant-backoffice-ui/tests/hooks/swr/transfer.test.ts @@ -20,16 +20,16 @@ */ import { act, renderHook } from "@testing-library/preact-hooks"; -import { TestingContext } from "./index"; -import { useInstanceTransfers, useTransferAPI } from "../../../src/hooks/transfer"; +import { TestingContext } from "./index.js"; +import { useInstanceTransfers, useTransferAPI } from "../../../src/hooks/transfer.js"; import { API_INFORM_TRANSFERS, API_LIST_TRANSFERS, assertJustExpectedRequestWereMade, assertNoMoreRequestWereMade, AxiosMockEnvironment, -} from "../../axiosMock"; -import { MerchantBackend } from "../../../src/declaration"; +} from "../../axiosMock.js"; +import { MerchantBackend } from "../../../src/declaration.js"; describe("transfer api interaction with listing", () => { diff --git a/packages/merchant-backoffice-ui/tests/stories.test.tsx b/packages/merchant-backoffice-ui/tests/stories.test.tsx index 5fb3483d2..b7336efde 100644 --- a/packages/merchant-backoffice-ui/tests/stories.test.tsx +++ b/packages/merchant-backoffice-ui/tests/stories.test.tsx @@ -19,8 +19,8 @@ * @author Sebastian Javier Marchano (sebasjm) */ import { h, VNode } from "preact"; -import * as config from "../src/context/config"; -import * as i18n from "../src/context/translation"; +import * as config from "../src/context/config.js"; +import * as i18n from "../src/context/translation.js"; import { cleanup, render as originalRender } from "@testing-library/preact"; import { SWRConfig } from "swr"; @@ -49,7 +49,7 @@ function render(vnode: VNode) { }} > {vnode} - </SWRConfig> + </SWRConfig>, ); } |