diff options
Diffstat (limited to 'packages/aml-backoffice-ui/src/forms/index.ts')
-rw-r--r-- | packages/aml-backoffice-ui/src/forms/index.ts | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts index c449bf467..f41122bc7 100644 --- a/packages/aml-backoffice-ui/src/forms/index.ts +++ b/packages/aml-backoffice-ui/src/forms/index.ts @@ -1,6 +1,4 @@ -import type { AmountJson, TranslatedString } from "@gnu-taler/taler-util"; -import type { AmlExchangeBackend } from "../utils/types.js"; -import type { FlexibleForm, InternationalizationAPI } from "@gnu-taler/web-util/browser"; +import type { InternationalizationAPI } from "@gnu-taler/web-util/browser"; import { v1 as form_902_11e_v1 } from "./902_11e.js"; import { v1 as form_902_12e_v1 } from "./902_12e.js"; import { v1 as form_902_13e_v1 } from "./902_13e.js"; @@ -10,20 +8,7 @@ import { v1 as form_902_4e_v1 } from "./902_4e.js"; import { v1 as form_902_5e_v1 } from "./902_5e.js"; import { v1 as form_902_9e_v1 } from "./902_9e.js"; import { v1 as simplest } from "./simplest.js"; - -export interface BaseForm { - state: AmlExchangeBackend.AmlState; - threshold: AmountJson; -} - - -export type FormMetadata<T extends BaseForm> = { - label: TranslatedString, - id: string, - version: number, - impl: (current: T) => FlexibleForm<T> -} - +import { BaseForm, FormMetadata } from "./declaration.js"; const languages = (i18n: InternationalizationAPI) => [ { @@ -214,17 +199,4 @@ const currencies = (i18n: InternationalizationAPI) => [ }, ]; -interface AmlExchangeBackoffice { - currencies: typeof currencies, - languages: typeof languages, - forms: typeof forms, -} -declare global { - interface Window { - amlExchangeBackoffice?: AmlExchangeBackoffice; - } -} - -if (typeof window !== "undefined" && !window.amlExchangeBackoffice) { - window.amlExchangeBackoffice = { currencies, languages, forms } -} +globalThis.amlExchangeBackoffice = { currencies, languages, forms } |