aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/forms
diff options
context:
space:
mode:
Diffstat (limited to 'packages/aml-backoffice-ui/src/forms')
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_11e.ts16
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_12e.ts23
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_13e.ts21
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_15e.ts15
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_1e.ts17
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_4e.ts19
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_5e.ts16
-rw-r--r--packages/aml-backoffice-ui/src/forms/902_9e.ts21
-rw-r--r--packages/aml-backoffice-ui/src/forms/declaration.ts36
-rw-r--r--packages/aml-backoffice-ui/src/forms/icons.tsx15
-rw-r--r--packages/aml-backoffice-ui/src/forms/index.ts17
-rw-r--r--packages/aml-backoffice-ui/src/forms/simplest.ts17
12 files changed, 200 insertions, 33 deletions
diff --git a/packages/aml-backoffice-ui/src/forms/902_11e.ts b/packages/aml-backoffice-ui/src/forms/902_11e.ts
index 71ca8bcf4..b1cdda6ba 100644
--- a/packages/aml-backoffice-ui/src/forms/902_11e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_11e.ts
@@ -1,4 +1,18 @@
-import type { TranslatedString } from "@gnu-taler/taler-util";
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm } from "./declaration.js";
import { resolutionSection } from "./simplest.js";
diff --git a/packages/aml-backoffice-ui/src/forms/902_12e.ts b/packages/aml-backoffice-ui/src/forms/902_12e.ts
index 0c08d274c..d5a420177 100644
--- a/packages/aml-backoffice-ui/src/forms/902_12e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_12e.ts
@@ -1,7 +1,22 @@
-import type { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { AbsoluteTime } from "@gnu-taler/taler-util";
import type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
-import { resolutionSection } from "./simplest.js";
import { BaseForm } from "./declaration.js";
+import { resolutionSection } from "./simplest.js";
export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): FlexibleForm<Form902_12.Form> => ({
design: [
@@ -360,7 +375,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
): FormState<Form902_12.Form> {
return {
founders: {
- elements: (v.founders ?? []).map((f) => {
+ elements: (v.founders ?? []).map(() => {
return {
rightToRevoke: {
hidden: v.foundation?.revocability !== "revocable",
@@ -369,7 +384,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
}),
},
withRightToNominate: {
- elements: (v.withRightToNominate ?? []).map((f) => {
+ elements: (v.withRightToNominate ?? []).map(() => {
return {
rightToRevoke: {
hidden: v.foundation?.revocability !== "revocable",
diff --git a/packages/aml-backoffice-ui/src/forms/902_13e.ts b/packages/aml-backoffice-ui/src/forms/902_13e.ts
index f69884e0e..9e05e061a 100644
--- a/packages/aml-backoffice-ui/src/forms/902_13e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_13e.ts
@@ -1,3 +1,18 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { AbsoluteTime } from "@gnu-taler/taler-util";
import type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm } from "./declaration.js";
@@ -439,7 +454,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
): FormState<Form902_13.Form> {
return {
settlors: {
- elements: (v.settlors ?? []).map((f) => {
+ elements: (v.settlors ?? []).map(() => {
return {
rightToRevoke: {
hidden: v.foundation?.revocability !== "revocable",
@@ -448,7 +463,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
}),
},
protectors: {
- elements: (v.protectors ?? []).map((f) => {
+ elements: (v.protectors ?? []).map(() => {
return {
rightToRevoke: {
hidden: v.foundation?.revocability !== "revocable",
@@ -457,7 +472,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
}),
},
furtherPersons: {
- elements: (v.furtherPersons ?? []).map((f) => {
+ elements: (v.furtherPersons ?? []).map(() => {
return {
rightToRevoke: {
hidden: v.foundation?.revocability !== "revocable",
diff --git a/packages/aml-backoffice-ui/src/forms/902_15e.ts b/packages/aml-backoffice-ui/src/forms/902_15e.ts
index 2375de389..72acf8d06 100644
--- a/packages/aml-backoffice-ui/src/forms/902_15e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_15e.ts
@@ -1,3 +1,18 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { AbsoluteTime } from "@gnu-taler/taler-util";
import type { FlexibleForm, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm } from "./declaration.js";
diff --git a/packages/aml-backoffice-ui/src/forms/902_1e.ts b/packages/aml-backoffice-ui/src/forms/902_1e.ts
index 2287db369..c6d33b9ca 100644
--- a/packages/aml-backoffice-ui/src/forms/902_1e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_1e.ts
@@ -1,4 +1,19 @@
-import type { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { AbsoluteTime } from "@gnu-taler/taler-util";
import type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm, uiForms } from "./declaration.js";
import { resolutionSection } from "./simplest.js";
diff --git a/packages/aml-backoffice-ui/src/forms/902_4e.ts b/packages/aml-backoffice-ui/src/forms/902_4e.ts
index b31a8dcba..15446bb27 100644
--- a/packages/aml-backoffice-ui/src/forms/902_4e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_4e.ts
@@ -1,9 +1,24 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
import type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { h as create } from "preact";
-import { resolutionSection } from "./simplest.js";
import { BaseForm } from "./declaration.js";
import { ArrowRightIcon, ChevronRightIcon } from "./icons.js";
+import { resolutionSection } from "./simplest.js";
export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): FlexibleForm<Form902_4.Form> => ({
design: [
@@ -716,7 +731,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
resolutionSection(current, i18n),
],
behavior: function formBehavior(
- v: Partial<Form902_4.Form>,
+ // v: Partial<Form902_4.Form>,
): FormState<Form902_4.Form> {
return {
};
diff --git a/packages/aml-backoffice-ui/src/forms/902_5e.ts b/packages/aml-backoffice-ui/src/forms/902_5e.ts
index 3af03ed22..40dd4d7ad 100644
--- a/packages/aml-backoffice-ui/src/forms/902_5e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_5e.ts
@@ -1,4 +1,18 @@
-import type { TranslatedString } from "@gnu-taler/taler-util";
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
import { BaseForm, uiForms } from "./declaration.js";
import { resolutionSection } from "./simplest.js";
diff --git a/packages/aml-backoffice-ui/src/forms/902_9e.ts b/packages/aml-backoffice-ui/src/forms/902_9e.ts
index e0e7a6d65..539e086f5 100644
--- a/packages/aml-backoffice-ui/src/forms/902_9e.ts
+++ b/packages/aml-backoffice-ui/src/forms/902_9e.ts
@@ -1,7 +1,22 @@
-import { AbsoluteTime, TranslatedString } from "@gnu-taler/taler-util";
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 { AbsoluteTime } from "@gnu-taler/taler-util";
import { FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
-import { resolutionSection } from "./simplest.js";
import { BaseForm } from "./declaration.js";
+import { resolutionSection } from "./simplest.js";
export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): FlexibleForm<Form902_9.Form> => ({
design: [
@@ -96,7 +111,7 @@ export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): Flexib
resolutionSection(current, i18n),
],
behavior: function formBehavior(
- v: Partial<Form902_9.Form>,
+ // v: Partial<Form902_9.Form>,
): FormState<Form902_9.Form> {
return {
};
diff --git a/packages/aml-backoffice-ui/src/forms/declaration.ts b/packages/aml-backoffice-ui/src/forms/declaration.ts
index ec3bc5189..d944a7a53 100644
--- a/packages/aml-backoffice-ui/src/forms/declaration.ts
+++ b/packages/aml-backoffice-ui/src/forms/declaration.ts
@@ -15,17 +15,20 @@
*/
import type { AmountJson, TranslatedString } from "@gnu-taler/taler-util";
-import type { FlexibleForm, InternationalizationAPI } from "@gnu-taler/web-util/browser";
+import type {
+ FlexibleForm,
+ InternationalizationAPI,
+} from "@gnu-taler/web-util/browser";
import { AmlExchangeBackend } from "../utils/types.js";
/**
* import entry point without hard reference.
- *
- * This file just export types and UI Forms
+ *
+ * This file just export types and UI Forms
* based on what `globalThis` contains.
- *
- * `./index.js` must be imported first before
- * so `globaThis` will have the correct value.
+ *
+ * `./index.js` must be imported first before
+ * so `globaThis` will have the correct value.
*/
export interface BaseForm {
@@ -34,21 +37,21 @@ export interface BaseForm {
}
export type FormMetadata<T extends BaseForm> = {
- label: TranslatedString,
- id: string,
- version: number,
- impl: (current: T) => FlexibleForm<T>
-}
+ label: TranslatedString;
+ id: string;
+ version: number;
+ impl: (current: T) => FlexibleForm<T>;
+};
interface LabelValue {
label: TranslatedString;
- value: string,
+ value: string;
}
export interface UiForms {
- currencies: (i18n: InternationalizationAPI) => LabelValue[],
- languages: (i18n: InternationalizationAPI) => LabelValue[],
- forms: (i18n: InternationalizationAPI) => Array<FormMetadata<BaseForm>>,
+ currencies: (i18n: InternationalizationAPI) => LabelValue[];
+ languages: (i18n: InternationalizationAPI) => LabelValue[];
+ forms: (i18n: InternationalizationAPI) => Array<FormMetadata<BaseForm>>;
}
/**
@@ -61,10 +64,11 @@ const defaultUIForms: UiForms = {
};
declare global {
+ // eslint-disable-next-line no-var
var amlExchangeBackoffice: UiForms;
}
export const uiForms: UiForms =
"amlExchangeBackoffice" in globalThis
- ? (globalThis as any).amlExchangeBackoffice
+ ? globalThis.amlExchangeBackoffice
: defaultUIForms;
diff --git a/packages/aml-backoffice-ui/src/forms/icons.tsx b/packages/aml-backoffice-ui/src/forms/icons.tsx
index 392790c9c..824f75c8f 100644
--- a/packages/aml-backoffice-ui/src/forms/icons.tsx
+++ b/packages/aml-backoffice-ui/src/forms/icons.tsx
@@ -1,3 +1,18 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 { h } from "preact";
export const ChevronRightIcon = () => <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts b/packages/aml-backoffice-ui/src/forms/index.ts
index f41122bc7..0a6c1df40 100644
--- a/packages/aml-backoffice-ui/src/forms/index.ts
+++ b/packages/aml-backoffice-ui/src/forms/index.ts
@@ -1,3 +1,18 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 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";
@@ -7,8 +22,8 @@ import { v1 as form_902_1e_v1 } from "./902_1e.js";
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";
import { BaseForm, FormMetadata } from "./declaration.js";
+import { v1 as simplest } from "./simplest.js";
const languages = (i18n: InternationalizationAPI) => [
{
diff --git a/packages/aml-backoffice-ui/src/forms/simplest.ts b/packages/aml-backoffice-ui/src/forms/simplest.ts
index 735ca9bfc..77ed4ebbb 100644
--- a/packages/aml-backoffice-ui/src/forms/simplest.ts
+++ b/packages/aml-backoffice-ui/src/forms/simplest.ts
@@ -1,11 +1,26 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022 Taler Systems S.A.
+
+ GNU Taler is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ 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 type {
TranslatedString
} from "@gnu-taler/taler-util";
import type { DoubleColumnFormSection, FlexibleForm, FormState, InternationalizationAPI } from "@gnu-taler/web-util/browser";
-import { BaseForm } from "./declaration.js";
import { amlStateConverter } from "../utils/converter.js";
import { AmlExchangeBackend } from "../utils/types.js";
+import { BaseForm } from "./declaration.js";
export const v1 = (i18n: InternationalizationAPI) => (current: BaseForm): FlexibleForm<Simplest.Form> => ({
design: [