[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated (8090d2f1f -> df3f80c2e)
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated (8090d2f1f -> df3f80c2e) |
Date: |
Thu, 02 Jan 2025 22:22:40 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a change to branch master
in repository wallet-core.
from 8090d2f1f fix deprecated require function
new 7566e666d lang switcher in the header and single column design
new d06a60dc5 vqf forms
new b37878ab1 vqf form from gana
new df3f80c2e update deps
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
packages/aml-backoffice-ui/src/forms/ganaForms.ts | 243 +++
packages/aml-backoffice-ui/src/forms/index.ts | 94 +-
.../src/forms/taler_aml_attributes.json | 1292 +++++++++++++++
.../src/forms/taler_aml_attributes.ts | 1057 +++++++++++++
packages/aml-backoffice-ui/tsconfig.json | 1 +
packages/kyc-ui/package.json | 1 +
packages/kyc-ui/src/app.tsx | 7 +-
.../src/context/{settings.ts => notifier.ts} | 40 +-
packages/kyc-ui/src/forms/accept-tos.ts | 23 +-
packages/kyc-ui/src/forms/ganaForms.ts | 288 ++++
packages/kyc-ui/src/forms/index.ts | 7 +
.../kyc-ui/src/forms/taler_aml_attributes.json | 1661 ++++++++++++++++++++
packages/kyc-ui/src/forms/taler_aml_attributes.ts | 1047 ++++++++++++
packages/kyc-ui/src/index.html | 2 +-
packages/kyc-ui/src/pages/FillForm.tsx | 169 +-
packages/kyc-ui/src/pages/Frame.tsx | 23 +-
packages/kyc-ui/src/pages/Start.tsx | 14 +-
packages/kyc-ui/src/pages/TriggerKyc.tsx | 172 +-
packages/kyc-ui/tsconfig.json | 1 +
packages/web-util/src/components/Header.tsx | 426 +++--
packages/web-util/src/components/LangSelector.tsx | 174 +-
packages/web-util/src/forms/forms.ts | 4 +-
packages/web-util/src/forms/ui-form.ts | 14 +-
pnpm-lock.yaml | 5 +-
24 files changed, 6356 insertions(+), 409 deletions(-)
create mode 100644 packages/aml-backoffice-ui/src/forms/ganaForms.ts
create mode 100644
packages/aml-backoffice-ui/src/forms/taler_aml_attributes.json
create mode 100644 packages/aml-backoffice-ui/src/forms/taler_aml_attributes.ts
copy packages/kyc-ui/src/context/{settings.ts => notifier.ts} (57%)
create mode 100644 packages/kyc-ui/src/forms/ganaForms.ts
create mode 100644 packages/kyc-ui/src/forms/taler_aml_attributes.json
create mode 100644 packages/kyc-ui/src/forms/taler_aml_attributes.ts
diff --git a/packages/aml-backoffice-ui/src/forms/ganaForms.ts
b/packages/aml-backoffice-ui/src/forms/ganaForms.ts
new file mode 100644
index 000000000..8bce4d9fe
--- /dev/null
+++ b/packages/aml-backoffice-ui/src/forms/ganaForms.ts
@@ -0,0 +1,243 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022-2024 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 {
+ DoubleColumnForm,
+ InternationalizationAPI,
+ UIFormElementConfig,
+ UIHandlerId,
+} from "@gnu-taler/web-util/browser";
+
+import ganaForms from "./taler_aml_attributes.json";
+
+type GanaField = {
+ required: boolean;
+ section: string;
+ type: string;
+ order?: number;
+ enumeration: string[];
+};
+
+type GanaForm = { [fieldName: string]: GanaField | string };
+
+type FieldsBySection = {
+ [section: string]: (UIFormElementConfig & { order?: number })[];
+};
+
+export function VQF_902_1(i18n: InternationalizationAPI): DoubleColumnForm {
+ const fieldsBySections = convertGanaJsonToDoubleColumnFormSection(
+ ganaForms.VQF_902_1,
+ converGanaField,
+ );
+
+ return {
+ type: "double-column",
+ design: [
+ {
+ title: i18n.str`Header`,
+ fields: fieldsBySections["header"].map((f) => {
+ if ("disabled" in f) {
+ f.disabled = true;
+ }
+ return f;
+ }),
+ },
+ {
+ title: i18n.str`Information`,
+ description: i18n.str`The customer is the person with whom the member
concludes the contract with regard to the financial service provided (civil
law). Does the member act as director of a domiciliary company, this
domiciliary company is the customer.`,
+ fields: fieldsBySections["1"],
+ },
+ {
+ title: i18n.str`Information on the natural persons who establish the
business relationship for legal entities and partnerships`,
+ description: i18n.str`For legal entities and partnerships the identity
of the natural persons who establish the business relationship must be
verified.`,
+ fields: fieldsBySections["2"],
+ },
+ {
+ title: i18n.str`Acceptance of business relationship`,
+ fields: fieldsBySections["3"],
+ },
+ {
+ title: i18n.str`Information on the beneficial owner of the assets
and/or controlling person`,
+ description: i18n.str`Establishment of the beneficial owner of the
assets and/or controlling person`,
+ fields: fieldsBySections["4"],
+ },
+ {
+ title: i18n.str`Evaluation with regard to embargo procedures/terrorism
lists on establishing the business relationship`,
+ description: i18n.str`Verification whether the customer, beneficial
owners of the assets, controlling persons, authorized representatives or other
involved persons are listed on an embargo/terrorism list (date of
verification/result)`,
+ fields: fieldsBySections["5"],
+ },
+ ],
+ };
+}
+
+function isArrayType(type: string): keyof typeof ganaForms | undefined {
+ if (!type.endsWith("[]")) return undefined;
+ return type.substring(0, type.length - 2) as keyof typeof ganaForms;
+}
+
+function isFormType(type: string): keyof typeof ganaForms | undefined {
+ const start = type.indexOf("<");
+ const end = type.indexOf(">");
+
+ if (start === -1 || end === -1) return undefined;
+ return type.substring(start + 1, end) as keyof typeof ganaForms;
+}
+
+function converGanaField(
+ fieldName: string,
+ fieldInfo: GanaField,
+): UIFormElementConfig {
+ const arrayType = isArrayType(fieldInfo.type);
+ if (arrayType) {
+ const ft = isFormType(arrayType);
+ const containedType = !ft ? arrayType : ft;
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "array",
+ fields: mergeAllSections(
+ convertGanaJsonToDoubleColumnFormSection(
+ ganaForms[containedType],
+ converGanaField,
+ ),
+ ),
+ labelFieldId: "asd" as UIHandlerId,
+ };
+ }
+ const formType = isFormType(fieldInfo.type);
+ if (formType) {
+ return {
+ label: fieldName,
+ type: "group",
+ fields: mergeAllSections(
+ convertGanaJsonToDoubleColumnFormSection(
+ ganaForms[formType] as GanaForm,
+ converGanaField,
+ ),
+ ),
+ };
+ }
+
+ switch (fieldInfo.type) {
+ case "Boolean": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "toggle",
+ required: fieldInfo.required,
+ threeState: false,
+ };
+ }
+ case "File": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "file",
+ required: fieldInfo.required,
+ };
+ }
+ case "String": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "ResidentialAddress": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName + "!!!",
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "BusinessAddress": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName + "!!!",
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "CountryCode": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "selectOne",
+ choices: [
+ { label: "AR", value: "AR" },
+ { label: "DE", value: "DE" },
+ ],
+ required: fieldInfo.required,
+ };
+ }
+ case "AbsoluteTime": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "absoluteTimeText",
+ required: fieldInfo.required,
+ pattern: "dd/MM/yyyy",
+ };
+ }
+ case "Amount": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: fieldName,
+ type: "amount",
+ currency: "asd",
+ required: fieldInfo.required,
+ };
+ }
+ default: {
+ return {
+ type: "caption",
+ label: `unkown field type ${fieldInfo.type} for id ${fieldName}`,
+ };
+ }
+ }
+}
+
+function convertGanaJsonToDoubleColumnFormSection(
+ form: GanaForm,
+ convert: (name: string, info: GanaField) => UIFormElementConfig,
+): FieldsBySection {
+ const list = Object.entries(form);
+ const sections = list.reduce((prev, [key, value]) => {
+ if (typeof value === "string") {
+ return prev;
+ }
+ if (!prev[value.section]) {
+ prev[value.section] = [];
+ }
+ const d: UIFormElementConfig & { order?: number } = convert(key, value);
+ d.order = value.order;
+ prev[value.section].push(d);
+ return prev;
+ }, {} as FieldsBySection);
+
+ Object.values(sections).forEach((sec) => {
+ sec.sort((a, b) => {
+ console.log("a", a.order, b.order);
+ return (a.order ?? 0) - (b.order ?? 0);
+ });
+ });
+ return sections;
+}
+
+function mergeAllSections(fields: FieldsBySection): UIFormElementConfig[] {
+ return Object.values(fields).flatMap((d) => d);
+}
diff --git a/packages/aml-backoffice-ui/src/forms/index.ts
b/packages/aml-backoffice-ui/src/forms/index.ts
index e89a8fb10..bd17b69d3 100644
--- a/packages/aml-backoffice-ui/src/forms/index.ts
+++ b/packages/aml-backoffice-ui/src/forms/index.ts
@@ -13,8 +13,12 @@
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 { FormMetadata, InternationalizationAPI } from
"@gnu-taler/web-util/browser";
+import type {
+ FormMetadata,
+ InternationalizationAPI,
+} from "@gnu-taler/web-util/browser";
import { v1 as simplest } from "./simplest.js";
+import { VQF_902_1 } from "./ganaForms.js";
const languages = (i18n: InternationalizationAPI) => [
{
@@ -127,57 +131,58 @@ const languages = (i18n: InternationalizationAPI) => [
},
];
-
-export const preloadedForms: (i18n: InternationalizationAPI) =>
Array<FormMetadata> = (i18n) => [
+export const preloadedForms: (
+ i18n: InternationalizationAPI,
+) => Array<FormMetadata> = (i18n) => [
{
label: i18n.str`Simple comment`,
id: "__simple_comment",
version: 1,
config: simplest(i18n),
- // }, {
- // label: i18n.str`Identification form`,
- // id: "902.1e",
- // version: 1,
- // config: form_902_1e_v1(i18n),
- // }, {
- // label: i18n.str`Operational legal entity or partnership`,
- // id: "902.11e",
- // version: 1,
- // config: form_902_11e_v1(i18n),
- // }, {
- // label: i18n.str`Foundations`,
- // id: "902.12e",
- // version: 1,
- // config: form_902_12e_v1(i18n),
- // }, {
- // label: i18n.str`Declaration for trusts`,
- // id: "902.13e",
- // version: 1,
- // config: form_902_13e_v1(i18n),
- // }, {
- // label: i18n.str`Information on life insurance policies`,
- // id: "902.15e",
- // version: 1,
- // config: form_902_15e_v1(i18n),
- // }, {
- // label: i18n.str`Declaration of beneficial owner`,
- // id: "902.9e",
- // version: 1,
- // config: form_902_9e_v1(i18n),
- // }, {
- // label: i18n.str`Customer profile`,
- // id: "902.5e",
- // version: 1,
- // config: form_902_5e_v1(i18n),
- // }, {
- // label: i18n.str`Risk profile`,
- // id: "902.4e",
- // version: 1,
- // config: form_902_4e_v1(i18n),
+ },
+ {
+ label: i18n.str`Identification form`,
+ id: "vqf-902-1",
+ version: 1,
+ config: VQF_902_1(i18n),
+ // }, {
+ // label: i18n.str`Operational legal entity or partnership`,
+ // id: "902.11e",
+ // version: 1,
+ // config: form_902_11e_v1(i18n),
+ // }, {
+ // label: i18n.str`Foundations`,
+ // id: "902.12e",
+ // version: 1,
+ // config: form_902_12e_v1(i18n),
+ // }, {
+ // label: i18n.str`Declaration for trusts`,
+ // id: "902.13e",
+ // version: 1,
+ // config: form_902_13e_v1(i18n),
+ // }, {
+ // label: i18n.str`Information on life insurance policies`,
+ // id: "902.15e",
+ // version: 1,
+ // config: form_902_15e_v1(i18n),
+ // }, {
+ // label: i18n.str`Declaration of beneficial owner`,
+ // id: "902.9e",
+ // version: 1,
+ // config: form_902_9e_v1(i18n),
+ // }, {
+ // label: i18n.str`Customer profile`,
+ // id: "902.5e",
+ // version: 1,
+ // config: form_902_5e_v1(i18n),
+ // }, {
+ // label: i18n.str`Risk profile`,
+ // id: "902.4e",
+ // version: 1,
+ // config: form_902_4e_v1(i18n),
},
];
-
const currencies = (i18n: InternationalizationAPI) => [
{
label: i18n.str`United States dollar`,
@@ -204,4 +209,3 @@ const currencies = (i18n: InternationalizationAPI) => [
value: "brl",
},
];
-
diff --git a/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.json
b/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.json
new file mode 100644
index 000000000..b77b625db
--- /dev/null
+++ b/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.json
@@ -0,0 +1,1292 @@
+{
+ "VQF_902_1": {
+ "ACCEPTANCE_ADDITIONAL_INFO": {
+ "required": false,
+ "type": "String",
+ "order": 5,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_CORRESPONDENCE_SERVICE_TYPE": {
+ "required": false,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_DATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "order": 1,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_LANGUAGE": {
+ "required": false,
+ "type": "String",
+ "order": 4,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_METHOD": {
+ "required": false,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "3"
+ },
+ "CUSTOMER_ENTITY_ADDRESS": {
+ "required": true,
+ "type": "BusinessAddress",
+ "order": 14,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_COMPANY_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 13,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_CONTACT_PERSON_NAME": {
+ "required": false,
+ "type": "String",
+ "order": 15,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_EMAIL": {
+ "required": false,
+ "type": "String",
+ "order": 18,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_ID": {
+ "required": true,
+ "type": "String",
+ "order": 19,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_ID_COPY": {
+ "required": true,
+ "type": "File",
+ "order": 20,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_PHONE": {
+ "required": false,
+ "type": "String",
+ "order": 17,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "CUSTOMER_NATURAL_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 5,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_ID": {
+ "required": false,
+ "type": "String",
+ "order": 11,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_ID_COPY": {
+ "required": false,
+ "type": "File",
+ "order": 12,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_NAME": {
+ "required": false,
+ "type": "String",
+ "order": 9,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_EMAIL": {
+ "required": false,
+ "type": "String",
+ "order": 4,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "order": 6,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONAL_ID": {
+ "required": true,
+ "type": "String",
+ "order": 7,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONAL_ID_COPY": {
+ "required": true,
+ "type": "File",
+ "order": 8,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_PHONE": {
+ "required": false,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_REGISTERED_OFFICE": {
+ "required": false,
+ "type": "String",
+ "order": 10,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_RESIDENTIAL": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "order": 2,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_TYPE": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "4"
+ },
+ "EMBARGO_TERRORISM_INFO": {
+ "required": false,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "5"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FOUNDER_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_1_founder>[]",
+ "order": 1,
+ "enumeration": [],
+ "section": "2"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "RELATIONSHIP_PURPOSE": {
+ "required": false,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "6"
+ },
+ "RELATIONSHIP_TYPE": {
+ "required": false,
+ "type": "String",
+ "order": 1,
+ "enumeration": ["MONEY_EXCHANGE","MONEY_ASSET_TRANSFER","OTHER"],
+ "section": "6"
+ },
+ "RELATIONSHIP_TYPE_OTHER": {
+ "required": false,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "6"
+ },
+"":""},
+ "VQF_902_11": {
+ "CONTROLLING_ENTITY_CONTRACTING_PARTNER": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "CONTROLLING_ENTITY_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": "3"
+ },
+ "CONTROLLING_ENTITY_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "CONTROLLING_ENTITY_LEVEL": {
+ "required": true,
+ "type": "String",
+ "enumeration": ["25_MORE_RIGHTS","OTHER_WAY","DIRECTOR"],
+ "section": "2"
+ },
+ "CONTROLLING_ENTITY_THIRD_PERSON": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "4"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_12": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FOUNDATION_BENEFICIARY_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_12_beneficiary>[]",
+ "enumeration": [],
+ "section": "4"
+ },
+ "FOUNDATION_CONTRACTING_PARTNER": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "0"
+ },
+ "FOUNDATION_DISCRETIONARY": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "FOUNDATION_FOUNDER_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_12_founder>[]",
+ "enumeration": [],
+ "section": "2"
+ },
+ "FOUNDATION_KNOWN_AS": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "0"
+ },
+ "FOUNDATION_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "FOUNDATION_PRE_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_12_pre>[]",
+ "enumeration": [],
+ "section": "3"
+ },
+ "FOUNDATION_REPRESENTATIVE_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_12_representative>[]",
+ "enumeration": [],
+ "section": "5"
+ },
+ "FOUNDATION_REVOCABLE": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_12_beneficiary": {
+ "FOUNDATION_BENEFICIARY_ADDITION": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_BIRTHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_COUNTRY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_DOMICILE": {
+ "required": false,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_NATIONALITY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_RIGHT_TO_CLAIM": {
+ "required": false,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_founder": {
+ "FOUNDATION_FOUNDER_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_DEATHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_RIGHT_TO_REVOKE": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_pre": {
+ "FOUNDATION_PRE_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_COUNTRY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_DEATHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_representative": {
+ "FOUNDATION_REPRESENTATIVE_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_COUNTRY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_RIGHT_TO_REVOKE": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "TRUST_BENEFICIARY_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_13_beneficiary>[]",
+ "enumeration": [],
+ "section": "4"
+ },
+ "TRUST_CONTRACTING_PARTNER": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "0"
+ },
+ "TRUST_DISCRETIONARY": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_KNOWN_AS": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "0"
+ },
+ "TRUST_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_PRE_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_13_pre>[]",
+ "enumeration": [],
+ "section": "3"
+ },
+ "TRUST_PROTECTOR_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_13_protector>[]",
+ "enumeration": [],
+ "section": "5"
+ },
+ "TRUST_REVOCABLE": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_SETTLOR_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_13_settlor>[]",
+ "enumeration": [],
+ "section": "2"
+ },
+"":""},
+ "VQF_902_13_beneficiary": {
+ "TRUST_BENEFICIARY_ADDITION": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_BIRTHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_COUNTRY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_DOMICILE": {
+ "required": false,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_NATIONALITY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_RIGHT_TO_CLAIM": {
+ "required": false,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_further": {
+ "TRUST_FURTHER_BIRTHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_COUNTRY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_DOMICILE": {
+ "required": false,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_LIST": {
+ "required": true,
+ "type": "Form<VQF_902_13_further>[]",
+ "enumeration": [],
+ "section": "5"
+ },
+ "TRUST_FURTHER_NATIONALITY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_RIGHT_TO_REVOKE": {
+ "required": false,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_pre": {
+ "TRUST_PRE_BIRTHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_COUNTRY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_DEATHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_DOMICILE": {
+ "required": false,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_NATIONALITY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_protector": {
+ "TRUST_PROTECTOR_BIRTHDATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_COUNTRY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_DOMICILE": {
+ "required": false,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_NATIONALITY": {
+ "required": false,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_RIGHT_TO_REVOKE": {
+ "required": false,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_settlor": {
+ "TRUST_SETTLOR_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_DEATHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_RIGHT_TO_REVOKE": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_14": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "INCRISK_DOCUMENTS": {
+ "required": true,
+ "type": "File[]",
+ "enumeration": [],
+ "section": "3"
+ },
+ "INCRISK_MEANS": {
+ "required": true,
+ "type": "String",
+ "enumeration": ["GATHERING","CONSULTATION","ENQUIRIES","OTHER"],
+ "section": "2"
+ },
+ "INCRISK_MEANS_OTHER": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "2"
+ },
+ "INCRISK_REASON": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "INCRISK_RESULT": {
+ "required": true,
+ "type": "String",
+ "enumeration":
["NO_SUSPICION","REASONABLE_SUSPICION","SIMPLE_SUSPICION","OTHER"],
+ "section": "4"
+ },
+ "INCRISK_RESULT_OTHER": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "INCRISK_SUMMARY": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+"":""},
+ "VQF_902_1_founder": {
+ "FOUNDER_AUTHORIZATION_TYPE": {
+ "required": true,
+ "type": "String",
+ "order": 4,
+ "enumeration": [],
+ "section": "2"
+ },
+ "FOUNDER_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "order": 3,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_NATIONAL_ID": {
+ "required": true,
+ "type": "String",
+ "order": 5,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_POWER_OF_ATTORNEY": {
+ "required": true,
+ "type": "String",
+ "order": 6,
+ "enumeration": ["CR","MANDATE","OTHER"],
+ "section": ""
+ },
+ "FOUNDER_POWER_OF_ATTORNEY_OTHER": {
+ "required": false,
+ "type": "String",
+ "order": 7,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_RESIDENTIAL_ADDRESS": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "order": 1,
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_4": {
+ "CONTACT_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "COUNTRY_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "COUNTRY_RISK_TYPE": {
+ "required": false,
+ "type": "String",
+ "enumeration":
["NATIONALITY_CUSTOMER","NATIONALITY_OWNER","DOMICILE_CUSTOMER","DOMICILE_OWNER","DOMICILE_CONTROLLING","BUSINESS_ACTIVITY","PAYMENTS"],
+ "section": "3"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "EXTRA_CRITERA_1_RISK_DEFINITION": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_1_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_2_RISK_DEFINITION": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_2_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "HIGH_RISK_COUNTRY": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "2"
+ },
+ "HIGH_RISK__ACCEPTANCE_DATE": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "2"
+ },
+ "INDUSTRY_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration":
["TRANSPARENT","HIGH_CASH_TRANSACTION","NOT_WELL_KNOWN","HIGH_RISK_TRADE","UNKNOWN_INDUSTRY"],
+ "section": "3"
+ },
+ "INDUSTRY_RISK_TYPE": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["CUSTOMER","OWNER"],
+ "section": "3"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "PEP_ACCEPTANCE_DATE": {
+ "required": false,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_DOMESTIC": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_FOREIGN": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_INTERNATIONAL_ORGANIZATION": {
+ "required": true,
+ "type": "Boolean",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PRODUCT_RISK_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration":
["EASY","SOPHISTICATED","OFFSHORE,","COMPLEX_STRUCTURE","LARGE_NUMBER_OF_ACCOUNTS","COMPLEX_SERVICE","FREQ_TRANS_WITH_HIGH_RISK"],
+ "section": "3"
+ },
+ "RISK_CLASIFICATION_ACCEPTANCE_DATE": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "RISK_CLASIFICATION_LEVEL": {
+ "required": false,
+ "type": "String",
+ "enumeration": ["WITH","WITHOUT"],
+ "section": "3"
+ },
+"":""},
+ "VQF_902_5": {
+ "BIZREL_DEVELOPMENT": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_ADDRESS": {
+ "required": false,
+ "type": "BusinessAddress",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_BANK_ACCOUNT": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_FULL_NAME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_VOLUME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FURTHER_INFO": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "6"
+ },
+ "BIZREL_INCOME": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "2"
+ },
+ "BIZREL_ORIGIN_AMOUNT": {
+ "required": true,
+ "type": "Amount",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_CATEGORY": {
+ "required": true,
+ "type": "String",
+ "enumeration": ["SAVINGS","OWN_BUSINESS","INHERITANCE","OTHER"],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_CATEGORY_OTHER": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_DETAIL": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_PROFESSION": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "BIZREL_PURPOSE": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_THIRDPARTY_AMLA_FILES": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "5"
+ },
+ "BIZREL_THIRDPARTY_REFERENCES": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "5"
+ },
+ "BIZREL_THIRDPARTY_RELATIONSHIP": {
+ "required": false,
+ "type": "String",
+ "enumeration": [],
+ "section": "5"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+"":""},
+ "VQF_902_9": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "type": "String",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "IDENTITY_CONTRACTING_PARTNER": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": "1"
+ },
+ "IDENTITY_LIST": {
+ "required": false,
+ "type": "Form<VQF_902_9_identity>[]",
+ "enumeration": [],
+ "section": "2"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "type": "String",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_9_identity": {
+ "IDENTITY_BIRTHDATE": {
+ "required": true,
+ "type": "AbsoluteTime",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_DOMICILE": {
+ "required": true,
+ "type": "ResidentialAddress",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_FULL_NAME": {
+ "required": true,
+ "type": "String",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_NATIONALITY": {
+ "required": true,
+ "type": "CountryCode",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+"":""}
\ No newline at end of file
diff --git a/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.ts
b/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.ts
new file mode 100644
index 000000000..9eb9d7da7
--- /dev/null
+++ b/packages/aml-backoffice-ui/src/forms/taler_aml_attributes.ts
@@ -0,0 +1,1057 @@
+/*
+ This file is part of GNU Taler
+ Copyright (C) 2012-2020 Taler Systems SA
+
+ GNU Taler is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: LGPL3.0-or-later
+
+ Note: the LGPL does not apply to all components of GNU Taler,
+ but it does apply to this file.
+ */
+
+type AbsoluteTime = string;
+type CountryCode = string;
+type Amount = string;
+type ResidentialAddress = string;
+type BusinessAddress = string;
+type Form<T> = T
+
+export namespace TalerAmlAttributes {
+ export interface VQF_902_1 {
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_ADDITIONAL_INFO: String;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_CORRESPONDENCE_SERVICE_TYPE: String;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_DATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_LANGUAGE: String;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_METHOD: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ADDRESS: BusinessAddress;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_COMPANY_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_CONTACT_PERSON_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_EMAIL: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_PHONE: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_ID: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_EMAIL: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONAL_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONAL_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_PHONE: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_REGISTERED_OFFICE: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_RESIDENTIAL: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_TYPE: String;
+ /**
+ *
+ * Required:
+ */
+ EMBARGO_TERRORISM_INFO: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_LIST: Form<VQF_902_1_founder>[];
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ RELATIONSHIP_PURPOSE: String;
+ /**
+ *
+ * Required:
+ */
+ RELATIONSHIP_TYPE: String;
+ /**
+ *
+ * Required:
+ */
+ RELATIONSHIP_TYPE_OTHER: String;
+ }
+ export interface VQF_902_11 {
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_CONTRACTING_PARTNER: String;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_LEVEL: String;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_THIRD_PERSON: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteTime;
+ }
+ export interface VQF_902_12 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_BENEFICIARY_LIST: Form<VQF_902_12_beneficiary>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_CONTRACTING_PARTNER: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_DISCRETIONARY: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_LIST: Form<VQF_902_12_founder>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_KNOWN_AS: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_LIST: Form<VQF_902_12_pre>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_LIST: Form<VQF_902_12_representative>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REVOCABLE: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteTime;
+ }
+ export interface VQF_902_12_beneficiary {
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_ADDITION: String;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_RIGHT_TO_CLAIM: Boolean;
+ }
+ export interface VQF_902_12_founder {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_DEATHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_12_pre {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_DEATHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_NATIONALITY: CountryCode;
+ }
+ export interface VQF_902_12_representative {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_BENEFICIARY_LIST: Form<VQF_902_13_beneficiary>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_CONTRACTING_PARTNER: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_DISCRETIONARY: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_KNOWN_AS: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_PRE_LIST: Form<VQF_902_13_pre>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_PROTECTOR_LIST: Form<VQF_902_13_protector>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_REVOCABLE: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_LIST: Form<VQF_902_13_settlor>[];
+ }
+ export interface VQF_902_13_beneficiary {
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_ADDITION: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_RIGHT_TO_CLAIM: Boolean;
+ }
+ export interface VQF_902_13_further {
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_FURTHER_LIST: Form<VQF_902_13_further>[];
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13_pre {
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_DEATHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_NATIONALITY: CountryCode;
+ }
+ export interface VQF_902_13_protector {
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13_settlor {
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_DEATHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_14 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_DOCUMENTS: File[];
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_MEANS: String;
+ /**
+ *
+ * Required:
+ */
+ INCRISK_MEANS_OTHER: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_REASON: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_RESULT: String;
+ /**
+ *
+ * Required:
+ */
+ INCRISK_RESULT_OTHER: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_SUMMARY: String;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ }
+ export interface VQF_902_1_founder {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_AUTHORIZATION_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_NATIONAL_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_POWER_OF_ATTORNEY: String;
+ /**
+ *
+ * Required:
+ */
+ FOUNDER_POWER_OF_ATTORNEY_OTHER: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_RESIDENTIAL_ADDRESS: ResidentialAddress;
+ }
+ export interface VQF_902_4 {
+ /**
+ *
+ * Required:
+ */
+ CONTACT_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ COUNTRY_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ COUNTRY_RISK_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_1_RISK_DEFINITION: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_1_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_2_RISK_DEFINITION: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_2_RISK_LEVEL: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ HIGH_RISK_COUNTRY: Boolean;
+ /**
+ *
+ * Required:
+ */
+ HIGH_RISK__ACCEPTANCE_DATE: String;
+ /**
+ *
+ * Required:
+ */
+ INDUSTRY_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ INDUSTRY_RISK_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ PEP_ACCEPTANCE_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ PEP_DOMESTIC: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ PEP_FOREIGN: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ PEP_INTERNATIONAL_ORGANIZATION: Boolean;
+ /**
+ *
+ * Required:
+ */
+ PRODUCT_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ RISK_CLASIFICATION_ACCEPTANCE_DATE: String;
+ /**
+ *
+ * Required:
+ */
+ RISK_CLASIFICATION_LEVEL: String;
+ }
+ export interface VQF_902_5 {
+ /**
+ *
+ * Required:
+ */
+ BIZREL_DEVELOPMENT: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_ADDRESS: BusinessAddress;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_BANK_ACCOUNT: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_VOLUME: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FURTHER_INFO: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_INCOME: String;
+ /**
+ *
+ * Required: true
+ */
+ BIZREL_ORIGIN_AMOUNT: Amount;
+ /**
+ *
+ * Required: true
+ */
+ BIZREL_ORIGIN_CATEGORY: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_ORIGIN_CATEGORY_OTHER: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_ORIGIN_DETAIL: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_PROFESSION: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_PURPOSE: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_AMLA_FILES: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_REFERENCES: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_RELATIONSHIP: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ }
+ export interface VQF_902_9 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_CONTRACTING_PARTNER: String;
+ /**
+ *
+ * Required:
+ */
+ IDENTITY_LIST: Form<VQF_902_9_identity>[];
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteTime;
+ }
+ export interface VQF_902_9_identity {
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_BIRTHDATE: AbsoluteTime;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_NATIONALITY: CountryCode;
+ }
+
+
+}
diff --git a/packages/aml-backoffice-ui/tsconfig.json
b/packages/aml-backoffice-ui/tsconfig.json
index 9826fac07..a69021452 100644
--- a/packages/aml-backoffice-ui/tsconfig.json
+++ b/packages/aml-backoffice-ui/tsconfig.json
@@ -9,6 +9,7 @@
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native',
or 'react'. */,
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
+ "resolveJsonModule": true,
"noEmit": true /* Do not emit outputs. */,
// "importHelpers": true, /* Import emit helpers from
'tslib'. */
// "downlevelIteration": true, /* Provide full support for
iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.
*/
diff --git a/packages/kyc-ui/package.json b/packages/kyc-ui/package.json
index 81459cab1..71f990a7c 100644
--- a/packages/kyc-ui/package.json
+++ b/packages/kyc-ui/package.json
@@ -57,6 +57,7 @@
"dependencies": {
"swr": "2.0.3",
"@gnu-taler/taler-util": "workspace:*",
+ "date-fns": "2.29.3",
"@gnu-taler/web-util": "workspace:*",
"preact": "10.11.3"
}
diff --git a/packages/kyc-ui/src/app.tsx b/packages/kyc-ui/src/app.tsx
index 27539ac44..e78b42aa8 100644
--- a/packages/kyc-ui/src/app.tsx
+++ b/packages/kyc-ui/src/app.tsx
@@ -40,6 +40,7 @@ import { Frame } from "./pages/Frame.js";
import { KycUiSettings, fetchSettings } from "./settings.js";
import { revalidateKycInfo } from "./hooks/kyc.js";
import { fetchUiForms, UiFormsProvider } from "./context/ui-forms.js";
+import { NotifierProvider } from "./context/notifier.js";
const WITH_LOCAL_STORAGE_CACHE = false;
@@ -99,8 +100,10 @@ export function App(): VNode {
>
<TalerWalletIntegrationBrowserProvider>
<BrowserHashNavigationProvider>
- <UiFormsProvider value={forms}>
- <Routing />
+ <UiFormsProvider value={forms}>
+ <NotifierProvider>
+ <Routing />
+ </NotifierProvider>
</UiFormsProvider>
</BrowserHashNavigationProvider>
</TalerWalletIntegrationBrowserProvider>
diff --git a/packages/kyc-ui/src/context/settings.ts
b/packages/kyc-ui/src/context/notifier.ts
similarity index 57%
copy from packages/kyc-ui/src/context/settings.ts
copy to packages/kyc-ui/src/context/notifier.ts
index 1b4b6576d..84ad2940b 100644
--- a/packages/kyc-ui/src/context/settings.ts
+++ b/packages/kyc-ui/src/context/notifier.ts
@@ -14,31 +14,47 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
+import { codecForUIForms, UiForms } from "@gnu-taler/web-util/browser";
import { ComponentChildren, createContext, h, VNode } from "preact";
import { useContext } from "preact/hooks";
-import { KycUiSettings } from "../settings.js";
+import { listeners } from "process";
/**
*
* @author Sebastian Javier Marchano (sebasjm)
*/
-export type Type = KycUiSettings;
-
-const initial: KycUiSettings = {};
-const Context = createContext<Type>(initial);
-
-export const useSettingsContext = (): Type => useContext(Context);
-
-export const SettingsProvider = ({
+export type Type = Notifier;
+export type Listener = (event: Event) => void;
+export type Event = {
+ type: string;
+ payload: string;
+};
+class Notifier {
+ private listener: Listener[] = [];
+ subscribe(f: Listener) {
+ this.listener.push(f);
+ return () => {
+ const idx = this.listener.findIndex((elem) => elem == f);
+ this.listener.splice(idx, 1);
+ };
+ }
+ emit(event: Event) {
+ this.listener.forEach((l) => l(event));
+ }
+}
+
+const Context = createContext<Type>(new Notifier());
+
+export const useNotifierContext = (): Type => useContext(Context);
+
+export const NotifierProvider = ({
children,
- value,
}: {
- value: KycUiSettings;
children: ComponentChildren;
}): VNode => {
return h(Context.Provider, {
- value,
+ value: new Notifier(),
children,
});
};
diff --git a/packages/kyc-ui/src/forms/accept-tos.ts
b/packages/kyc-ui/src/forms/accept-tos.ts
index b73917426..0e05aa996 100644
--- a/packages/kyc-ui/src/forms/accept-tos.ts
+++ b/packages/kyc-ui/src/forms/accept-tos.ts
@@ -20,21 +20,26 @@ import type {
UIHandlerId,
} from "@gnu-taler/web-util/browser";
-function filterUndefined<T>(ar: Array<T|undefined>): Array<T> {
- return ar.filter((a):a is T => !!a)
+function filterUndefined<T>(ar: Array<T | undefined>): Array<T> {
+ return ar.filter((a): a is T => !!a);
}
-export const acceptTos = (i18n: InternationalizationAPI, context?: any):
DoubleColumnForm => ({
+export const acceptTos = (
+ i18n: InternationalizationAPI,
+ context?: any,
+): DoubleColumnForm => ({
type: "double-column" as const,
design: [
{
- title: i18n.str`Accept Term of Service`,
+ title: i18n.str`Accept Terms of Service`,
fields: filterUndefined([
- context?.tos_url ? {
- type: "htmlIframe",
- label: context?.provider_name ?? `Link`,
- url: context.tos_url
- } : undefined,
+ context?.tos_url
+ ? {
+ type: "htmlIframe",
+ label: context?.provider_name ?? `Link`,
+ url: context.tos_url,
+ }
+ : undefined,
{
type: "toggle",
id: "ACCEPTED_TERMS_OF_SERVICE" as UIHandlerId,
diff --git a/packages/kyc-ui/src/forms/ganaForms.ts
b/packages/kyc-ui/src/forms/ganaForms.ts
new file mode 100644
index 000000000..aec6012fc
--- /dev/null
+++ b/packages/kyc-ui/src/forms/ganaForms.ts
@@ -0,0 +1,288 @@
+/*
+ This file is part of GNU Taler
+ (C) 2022-2024 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 {
+ DoubleColumnForm,
+ InternationalizationAPI,
+ UIFormElementConfig,
+ UIFormFieldBaseConfig,
+ UIHandlerId,
+} from "@gnu-taler/web-util/browser";
+
+import ganaForms from "./taler_aml_attributes.json";
+
+type GanaField = {
+ required: boolean;
+ section: string;
+ type: string;
+ label: string;
+ order?: number;
+ enumeration: string[];
+};
+
+type GanaForm = { [fieldName: string]: GanaField | string };
+
+type FieldsBySection = {
+ [section: string]: (UIFormElementConfig & { order?: number })[];
+};
+
+export function VQF_902_1(i18n: InternationalizationAPI): DoubleColumnForm {
+ const fieldsBySections = convertGanaJsonToDoubleColumnFormSection(
+ ganaForms.VQF_902_1,
+ converGanaField,
+ );
+
+ return {
+ type: "double-column",
+ design: [
+ {
+ title: i18n.str`This form was completed by`,
+ fields: fieldsBySections["header"].map((f) => {
+ (f as UIFormFieldBaseConfig).disabled = true;
+ return f;
+ }),
+ },
+ {
+ title: i18n.str`Information`,
+ description: i18n.str`The customer is the person with whom the member
concludes the contract with regard to the financial service provided (civil
law). Does the member act as director of a domiciliary company, this
domiciliary company is the customer.`,
+ fields: fieldsBySections["1"],
+ },
+ {
+ title: i18n.str`Information on the natural persons who establish the
business relationship for legal entities and partnerships`,
+ description: i18n.str`For legal entities and partnerships the identity
of the natural persons who establish the business relationship must be
verified.`,
+ fields: fieldsBySections["2"],
+ },
+ {
+ title: i18n.str`Acceptance of business relationship`,
+ fields: fieldsBySections["3"],
+ },
+ {
+ title: i18n.str`Information on the beneficial owner of the assets
and/or controlling person`,
+ description: i18n.str`Establishment of the beneficial owner of the
assets and/or controlling person`,
+ fields: fieldsBySections["4"],
+ },
+ {
+ title: i18n.str`Evaluation with regard to embargo procedures/terrorism
lists on establishing the business relationship`,
+ description: i18n.str`Verification whether the customer, beneficial
owners of the assets, controlling persons, authorized representatives or other
involved persons are listed on an embargo/terrorism list (date of
verification/result)`,
+ fields: fieldsBySections["5"],
+ },
+ ],
+ };
+}
+
+function isArrayType(type: string): keyof typeof ganaForms | undefined {
+ if (!type.endsWith("[]")) return undefined;
+ return type.substring(0, type.length - 2) as keyof typeof ganaForms;
+}
+
+function isFormType(type: string): keyof typeof ganaForms | undefined {
+ const start = type.indexOf("<");
+ const end = type.indexOf(">");
+
+ if (start === -1 || end === -1) return undefined;
+ return type.substring(start + 1, end) as keyof typeof ganaForms;
+}
+
+function converGanaField(
+ fieldName: string,
+ fieldInfo: GanaField,
+): UIFormElementConfig {
+ const arrayType = isArrayType(fieldInfo.type);
+ if (arrayType) {
+ const ft = isFormType(arrayType);
+ const containedType = !ft ? arrayType : ft;
+ const fields = mergeAllSections(
+ convertGanaJsonToDoubleColumnFormSection(
+ ganaForms[containedType],
+ converGanaField,
+ ),
+ );
+ const f = fields.find((f) => "id" in f); //?.id;
+ const labelFieldId = f && "id" in f ? f.id : ("!!" as UIHandlerId);
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "array",
+ fields,
+ labelFieldId,
+ };
+ }
+ const formType = isFormType(fieldInfo.type);
+ if (formType) {
+ return {
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "group",
+ fields: mergeAllSections(
+ convertGanaJsonToDoubleColumnFormSection(
+ ganaForms[formType] as GanaForm,
+ converGanaField,
+ ),
+ ),
+ };
+ }
+
+ switch (fieldInfo.type) {
+ case "Boolean": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "toggle",
+ required: fieldInfo.required,
+ threeState: false,
+ };
+ }
+ case "File": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "file",
+ required: fieldInfo.required,
+ };
+ }
+ case "String": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "Email": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "Phone": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "Paragraph": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "textArea",
+ required: fieldInfo.required,
+ };
+ }
+ case "ResidentialAddress": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label + "!!!",
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "BusinessAddress": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label + "!!!",
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "CountryCode": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "selectOne",
+ choices: [
+ { label: "AR", value: "AR" },
+ { label: "DE", value: "DE" },
+ ],
+ required: fieldInfo.required,
+ };
+ }
+ case "LangCode": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "text",
+ required: fieldInfo.required,
+ };
+ }
+ case "AbsoluteDateTime": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "absoluteTimeText",
+ required: fieldInfo.required,
+ placeholder: "dd/MM/yyyy HH:mm:ss",
+ pattern: "dd/MM/yyyy HH:mm:ss",
+ };
+ }
+ case "AbsoluteDate": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "absoluteTimeText",
+ required: fieldInfo.required,
+ placeholder: "dd/MM/yyyy",
+ pattern: "dd/MM/yyyy",
+ };
+ }
+ case "Amount": {
+ return {
+ id: fieldName as UIHandlerId,
+ label: !fieldInfo.label ? fieldName : fieldInfo.label,
+ type: "amount",
+ currency: "asd",
+ required: fieldInfo.required,
+ };
+ }
+ default: {
+ return {
+ type: "caption",
+ label: `unkown field type ${fieldInfo.type} for id ${fieldName}`,
+ };
+ }
+ }
+}
+
+function convertGanaJsonToDoubleColumnFormSection(
+ form: GanaForm,
+ convert: (name: string, info: GanaField) => UIFormElementConfig,
+): FieldsBySection {
+ const list = Object.entries(form);
+ const sections = list.reduce((prev, [key, value]) => {
+ if (typeof value === "string") {
+ return prev;
+ }
+ if (!prev[value.section]) {
+ prev[value.section] = [];
+ }
+ const d: UIFormElementConfig & { order?: number } = convert(key, value);
+ d.order = value.order;
+ prev[value.section].push(d);
+ return prev;
+ }, {} as FieldsBySection);
+
+ Object.values(sections).forEach((sec) => {
+ sec.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
+ });
+ return sections;
+}
+
+function mergeAllSections(fields: FieldsBySection): UIFormElementConfig[] {
+ const list = Object.values(fields).flatMap((d) => d);
+ list.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
+ return list;
+}
diff --git a/packages/kyc-ui/src/forms/index.ts
b/packages/kyc-ui/src/forms/index.ts
index ca8b1d49d..7301b0426 100644
--- a/packages/kyc-ui/src/forms/index.ts
+++ b/packages/kyc-ui/src/forms/index.ts
@@ -21,6 +21,7 @@ import { simplest } from "./simplest.js";
import { acceptTos } from "./accept-tos.js";
import { nameAndDob } from "./nameAndBirthdate.js";
import { personalInfo } from "./personal-info.js";
+import { VQF_902_1 } from "./ganaForms.js";
export const preloadedForms: (
i18n: InternationalizationAPI,
@@ -44,6 +45,12 @@ export const preloadedForms: (
version: 1,
config: acceptTos(i18n, context),
},
+ {
+ label: i18n.str`Identification form`,
+ id: "vqf-902-1",
+ version: 1,
+ config: VQF_902_1(i18n),
+ },
{
label: i18n.str`Name and birthdate`,
id: "name_and_dob",
diff --git a/packages/kyc-ui/src/forms/taler_aml_attributes.json
b/packages/kyc-ui/src/forms/taler_aml_attributes.json
new file mode 100644
index 000000000..d980edf0a
--- /dev/null
+++ b/packages/kyc-ui/src/forms/taler_aml_attributes.json
@@ -0,0 +1,1661 @@
+{
+ "VQF_902_1": {
+ "ACCEPTANCE_CORRESPONDENCE_SERVICE_TYPE": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Type of correspondence service",
+ "order": 3,
+ "enumeration":
["TO_THE_CUSTOMER","HOLD_AT_BANK","TO_THE_MEMBER","TO_A_THIRD_PARTY"],
+ "section": "3"
+ },
+ "ACCEPTANCE_DATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "Date",
+ "order": 1,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_FURTHER_INFO": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Further information",
+ "order": 5,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_LANGUAGE": {
+ "required": false,
+ "closed": false,
+ "type": "LangCode",
+ "label": "Language",
+ "order": 4,
+ "enumeration": [],
+ "section": "3"
+ },
+ "ACCEPTANCE_METHOD": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "Accepted by",
+ "order": 2,
+ "enumeration":
["FACE_TO_FACE","AUTHENTICATED_COPY","RESIDENTIAL_ADDRESS_VALIDATED"],
+ "section": "3"
+ },
+ "CUSTOMER_ENTITY_ADDRESS": {
+ "required": true,
+ "closed": false,
+ "type": "BusinessAddress",
+ "label": "Domicile",
+ "order": 14,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_COMPANY_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Company name",
+ "order": 13,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_CONTACT_PERSON_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Contact person",
+ "order": 15,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_EMAIL": {
+ "required": false,
+ "closed": false,
+ "type": "Email",
+ "label": "E-mail",
+ "order": 18,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Identification document",
+ "order": 19,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_ID_COPY": {
+ "required": true,
+ "closed": false,
+ "type": "File",
+ "label": "Picutre of identification document",
+ "order": 20,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ENTITY_PHONE": {
+ "required": false,
+ "closed": false,
+ "type": "Phone",
+ "label": "Telephone",
+ "order": 17,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "CUSTOMER_NATURAL_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "Date of birth",
+ "order": 5,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_ID": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Company identification document",
+ "order": 11,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_ID_COPY": {
+ "required": false,
+ "closed": false,
+ "type": "File",
+ "label": "Picture of company identification document",
+ "order": 12,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_COMPANY_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Company name",
+ "order": 9,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_EMAIL": {
+ "required": false,
+ "closed": false,
+ "type": "Email",
+ "label": "E-mail",
+ "order": 4,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "Nationality",
+ "order": 6,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONAL_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Identification document",
+ "order": 7,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_NATIONAL_ID_COPY": {
+ "required": true,
+ "closed": false,
+ "type": "File",
+ "label": "Picture of identification document",
+ "order": 8,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_PHONE": {
+ "required": false,
+ "closed": false,
+ "type": "Phone",
+ "label": "Telephone",
+ "order": 3,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_REGISTERED_OFFICE": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Registered office",
+ "order": 10,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_NATURAL_RESIDENTIAL": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "Residential address",
+ "order": 2,
+ "enumeration": [],
+ "section": "1"
+ },
+ "CUSTOMER_TYPE": {
+ "required": true,
+ "closed": true,
+ "type": "String",
+ "label": "Customer type",
+ "order": 1,
+ "enumeration":
["NATURAL","LEGAL_ENTITY","FOUNDATION","TRUST","LIFE_INSURANCE","OTHER"],
+ "section": "4"
+ },
+ "EMBARGO_TERRORISM_INFO": {
+ "required": false,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "Embargo information",
+ "order": 2,
+ "enumeration": [],
+ "section": "5"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FOUNDER_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_1_founder>[]",
+ "label": "Founders",
+ "order": 1,
+ "enumeration": [],
+ "section": "2"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "RELATIONSHIP_PURPOSE": {
+ "required": false,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "Purpose of the business relationship",
+ "order": 3,
+ "enumeration": [],
+ "section": "6"
+ },
+ "RELATIONSHIP_TYPE": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "Type of business relationship",
+ "order": 1,
+ "enumeration": ["MONEY_EXCHANGE","MONEY_ASSET_TRANSFER"],
+ "section": "6"
+ },
+"":""},
+ "VQF_902_11": {
+ "CONTROLLING_ENTITY_CONTRACTING_PARTNER": {
+ "required": true,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "CONTROLLING_ENTITY_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "CONTROLLING_ENTITY_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "CONTROLLING_ENTITY_LEVEL": {
+ "required": true,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["25_MORE_RIGHTS","OTHER_WAY","DIRECTOR"],
+ "section": "2"
+ },
+ "CONTROLLING_ENTITY_THIRD_PERSON": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_12": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FOUNDATION_BENEFICIARY_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_12_beneficiary>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "FOUNDATION_CONTRACTING_PARTNER": {
+ "required": true,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "0"
+ },
+ "FOUNDATION_DISCRETIONARY": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "FOUNDATION_FOUNDER_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_12_founder>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+ "FOUNDATION_KNOWN_AS": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "0"
+ },
+ "FOUNDATION_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "FOUNDATION_PRE_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_12_pre>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "FOUNDATION_REPRESENTATIVE_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_12_representative>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "FOUNDATION_REVOCABLE": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_12_beneficiary": {
+ "FOUNDATION_BENEFICIARY_ADDITION": {
+ "required": false,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_BIRTHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_COUNTRY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_DOMICILE": {
+ "required": false,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_NATIONALITY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_BENEFICIARY_RIGHT_TO_CLAIM": {
+ "required": false,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_founder": {
+ "FOUNDATION_FOUNDER_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_DEATHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_FOUNDER_RIGHT_TO_REVOKE": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_pre": {
+ "FOUNDATION_PRE_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_COUNTRY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_DEATHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_PRE_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_12_representative": {
+ "FOUNDATION_REPRESENTATIVE_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_COUNTRY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDATION_REPRESENTATIVE_RIGHT_TO_REVOKE": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "TRUST_BENEFICIARY_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_13_beneficiary>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "TRUST_CONTRACTING_PARTNER": {
+ "required": true,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "0"
+ },
+ "TRUST_DISCRETIONARY": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_KNOWN_AS": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "0"
+ },
+ "TRUST_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_PRE_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_13_pre>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "TRUST_PROTECTOR_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_13_protector>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "TRUST_REVOCABLE": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "TRUST_SETTLOR_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_13_settlor>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+"":""},
+ "VQF_902_13_beneficiary": {
+ "TRUST_BENEFICIARY_ADDITION": {
+ "required": false,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_BIRTHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_COUNTRY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_DOMICILE": {
+ "required": false,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_NATIONALITY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_BENEFICIARY_RIGHT_TO_CLAIM": {
+ "required": false,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_further": {
+ "TRUST_FURTHER_BIRTHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_COUNTRY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_DOMICILE": {
+ "required": false,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_LIST": {
+ "required": true,
+ "closed": false,
+ "type": "Form<VQF_902_13_further>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "TRUST_FURTHER_NATIONALITY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_FURTHER_RIGHT_TO_REVOKE": {
+ "required": false,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_pre": {
+ "TRUST_PRE_BIRTHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_COUNTRY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_DEATHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_DOMICILE": {
+ "required": false,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PRE_NATIONALITY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_protector": {
+ "TRUST_PROTECTOR_BIRTHDATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_COUNTRY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_DOMICILE": {
+ "required": false,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_NATIONALITY": {
+ "required": false,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_PROTECTOR_RIGHT_TO_REVOKE": {
+ "required": false,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_13_settlor": {
+ "TRUST_SETTLOR_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_DEATHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "TRUST_SETTLOR_RIGHT_TO_REVOKE": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_14": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "INCRISK_DOCUMENTS": {
+ "required": true,
+ "closed": false,
+ "type": "File[]",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "INCRISK_MEANS": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": ["GATHERING","CONSULTATION","ENQUIRIES"],
+ "section": "2"
+ },
+ "INCRISK_REASON": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "INCRISK_RESULT": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration":
["NO_SUSPICION","REASONABLE_SUSPICION","SIMPLE_SUSPICION"],
+ "section": "4"
+ },
+ "INCRISK_SUMMARY": {
+ "required": true,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+"":""},
+ "VQF_902_1_founder": {
+ "FOUNDER_AUTHORIZATION_TYPE": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Type of authorization",
+ "order": 4,
+ "enumeration": [],
+ "section": "2"
+ },
+ "FOUNDER_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "Date of birth",
+ "order": 2,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "Nationality",
+ "order": 3,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_NATIONAL_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Identification document",
+ "order": 5,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_NATIONAL__COPY": {
+ "required": true,
+ "closed": false,
+ "type": "File",
+ "label": "Picutre of identification document",
+ "order": 6,
+ "enumeration": [],
+ "section": ""
+ },
+ "FOUNDER_POWER_OF_ATTORNEY": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Power of attorney arrangements",
+ "order": 7,
+ "enumeration": ["CR","MANDATE","OTHER"],
+ "section": ""
+ },
+ "FOUNDER_RESIDENTIAL_ADDRESS": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "Residential address",
+ "order": 1,
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+ "VQF_902_4": {
+ "CONTACT_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "COUNTRY_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "COUNTRY_RISK_TYPE": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration":
["NATIONALITY_CUSTOMER","NATIONALITY_OWNER","DOMICILE_CUSTOMER","DOMICILE_OWNER","DOMICILE_CONTROLLING","BUSINESS_ACTIVITY","PAYMENTS"],
+ "section": "3"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "EXTRA_CRITERA_1_RISK_DEFINITION": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_1_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_2_RISK_DEFINITION": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "EXTRA_CRITERA_2_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["LOW","MEDIUM","HIGH"],
+ "section": "3"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "HIGH_RISK_COUNTRY": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+ "HIGH_RISK__ACCEPTANCE_DATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+ "INDUSTRY_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration":
["TRANSPARENT","HIGH_CASH_TRANSACTION","NOT_WELL_KNOWN","HIGH_RISK_TRADE","UNKNOWN_INDUSTRY"],
+ "section": "3"
+ },
+ "INDUSTRY_RISK_TYPE": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["CUSTOMER","OWNER"],
+ "section": "3"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "PEP_ACCEPTANCE_DATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_DOMESTIC": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_FOREIGN": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PEP_INTERNATIONAL_ORGANIZATION": {
+ "required": true,
+ "closed": false,
+ "type": "Boolean",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "PRODUCT_RISK_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration":
["EASY","SOPHISTICATED","OFFSHORE,","COMPLEX_STRUCTURE","LARGE_NUMBER_OF_ACCOUNTS","COMPLEX_SERVICE","FREQ_TRANS_WITH_HIGH_RISK"],
+ "section": "3"
+ },
+ "RISK_CLASIFICATION_ACCEPTANCE_DATE": {
+ "required": false,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "RISK_CLASIFICATION_LEVEL": {
+ "required": false,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["WITH","WITHOUT"],
+ "section": "3"
+ },
+"":""},
+ "VQF_902_5": {
+ "BIZREL_DEVELOPMENT": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_ADDRESS": {
+ "required": false,
+ "closed": false,
+ "type": "BusinessAddress",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_BANK_ACCOUNT": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_BENEFICIARIES_FULL_NAME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FINANCIAL_VOLUME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_FURTHER_INFO": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "6"
+ },
+ "BIZREL_INCOME": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+ "BIZREL_ORIGIN_AMOUNT": {
+ "required": true,
+ "closed": false,
+ "type": "Amount",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_CATEGORY": {
+ "required": true,
+ "closed": true,
+ "type": "String",
+ "label": "",
+ "enumeration": ["SAVINGS","OWN_BUSINESS","INHERITANCE","OTHER"],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_CATEGORY_OTHER": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_ORIGIN_DETAIL": {
+ "required": false,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "3"
+ },
+ "BIZREL_PROFESSION": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "BIZREL_PURPOSE": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "4"
+ },
+ "BIZREL_THIRDPARTY_AMLA_FILES": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "BIZREL_THIRDPARTY_REFERENCES": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "BIZREL_THIRDPARTY_RELATIONSHIP": {
+ "required": false,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": "5"
+ },
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+"":""},
+ "VQF_902_9": {
+ "CUSTOMER_ID": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 3,
+ "enumeration": [],
+ "section": "header"
+ },
+ "FORM_FILLING_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "Date",
+ "order": 2,
+ "enumeration": [],
+ "section": "header"
+ },
+ "IDENTITY_CONTRACTING_PARTNER": {
+ "required": true,
+ "closed": false,
+ "type": "Paragraph",
+ "label": "",
+ "enumeration": [],
+ "section": "1"
+ },
+ "IDENTITY_LIST": {
+ "required": false,
+ "closed": false,
+ "type": "Form<VQF_902_9_identity>[]",
+ "label": "",
+ "enumeration": [],
+ "section": "2"
+ },
+ "OFFICER_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "Full name",
+ "order": 1,
+ "enumeration": [],
+ "section": "header"
+ },
+ "SIGNATURE": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "order": 2,
+ "enumeration": [],
+ "section": "footer"
+ },
+ "SIGN_DATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDateTime",
+ "label": "",
+ "order": 1,
+ "enumeration": [],
+ "section": "footer"
+ },
+"":""},
+ "VQF_902_9_identity": {
+ "IDENTITY_BIRTHDATE": {
+ "required": true,
+ "closed": false,
+ "type": "AbsoluteDate",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_DOMICILE": {
+ "required": true,
+ "closed": false,
+ "type": "ResidentialAddress",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_FULL_NAME": {
+ "required": true,
+ "closed": false,
+ "type": "String",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+ "IDENTITY_NATIONALITY": {
+ "required": true,
+ "closed": false,
+ "type": "CountryCode",
+ "label": "",
+ "enumeration": [],
+ "section": ""
+ },
+"":""},
+"":""}
\ No newline at end of file
diff --git a/packages/kyc-ui/src/forms/taler_aml_attributes.ts
b/packages/kyc-ui/src/forms/taler_aml_attributes.ts
new file mode 100644
index 000000000..5747a0a8a
--- /dev/null
+++ b/packages/kyc-ui/src/forms/taler_aml_attributes.ts
@@ -0,0 +1,1047 @@
+/*
+ This file is part of GNU Taler
+ Copyright (C) 2012-2020 Taler Systems SA
+
+ GNU Taler is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3 of the License,
+ 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: LGPL3.0-or-later
+
+ Note: the LGPL does not apply to all components of GNU Taler,
+ but it does apply to this file.
+ */
+
+type AbsoluteDateTime = string;
+type AbsoluteDate = string;
+type CountryCode = string;
+type Amount = string;
+type ResidentialAddress = string;
+type BusinessAddress = string;
+type Paragraph = string;
+type LangCode = string;
+type Email = string;
+type Phone = string;
+type Form<T> = T;
+
+export namespace TalerAmlAttributes {
+ export interface VQF_902_1 {
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_CORRESPONDENCE_SERVICE_TYPE: String;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_DATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_FURTHER_INFO: String;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_LANGUAGE: LangCode;
+ /**
+ *
+ * Required:
+ */
+ ACCEPTANCE_METHOD: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ADDRESS: BusinessAddress;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_COMPANY_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_CONTACT_PERSON_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_EMAIL: Email;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ENTITY_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_ENTITY_PHONE: Phone;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_ID: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_COMPANY_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_EMAIL: Email;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONAL_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_NATIONAL_ID_COPY: File;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_PHONE: Phone;
+ /**
+ *
+ * Required:
+ */
+ CUSTOMER_NATURAL_REGISTERED_OFFICE: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_NATURAL_RESIDENTIAL: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_TYPE: String;
+ /**
+ *
+ * Required:
+ */
+ EMBARGO_TERRORISM_INFO: Paragraph;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_LIST: Form<VQF_902_1_founder>[];
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ RELATIONSHIP_PURPOSE: Paragraph;
+ /**
+ *
+ * Required:
+ */
+ RELATIONSHIP_TYPE: String;
+ }
+ export interface VQF_902_11 {
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_CONTRACTING_PARTNER: Paragraph;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_LEVEL: String;
+ /**
+ *
+ * Required: true
+ */
+ CONTROLLING_ENTITY_THIRD_PERSON: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteDateTime;
+ }
+ export interface VQF_902_12 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_BENEFICIARY_LIST: Form<VQF_902_12_beneficiary>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_CONTRACTING_PARTNER: Paragraph;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_DISCRETIONARY: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_LIST: Form<VQF_902_12_founder>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_KNOWN_AS: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_LIST: Form<VQF_902_12_pre>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_LIST: Form<VQF_902_12_representative>[];
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REVOCABLE: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteDateTime;
+ }
+ export interface VQF_902_12_beneficiary {
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_ADDITION: Paragraph;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ FOUNDATION_BENEFICIARY_RIGHT_TO_CLAIM: Boolean;
+ }
+ export interface VQF_902_12_founder {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_DEATHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_FOUNDER_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_12_pre {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_DEATHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_PRE_NATIONALITY: CountryCode;
+ }
+ export interface VQF_902_12_representative {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDATION_REPRESENTATIVE_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_BENEFICIARY_LIST: Form<VQF_902_13_beneficiary>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_CONTRACTING_PARTNER: Paragraph;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_DISCRETIONARY: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_KNOWN_AS: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_PRE_LIST: Form<VQF_902_13_pre>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_PROTECTOR_LIST: Form<VQF_902_13_protector>[];
+ /**
+ *
+ * Required: true
+ */
+ TRUST_REVOCABLE: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_LIST: Form<VQF_902_13_settlor>[];
+ }
+ export interface VQF_902_13_beneficiary {
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_ADDITION: Paragraph;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_BENEFICIARY_RIGHT_TO_CLAIM: Boolean;
+ }
+ export interface VQF_902_13_further {
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_FURTHER_LIST: Form<VQF_902_13_further>[];
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_FURTHER_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13_pre {
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_DEATHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PRE_NATIONALITY: CountryCode;
+ }
+ export interface VQF_902_13_protector {
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_COUNTRY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required:
+ */
+ TRUST_PROTECTOR_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_13_settlor {
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_DEATHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ TRUST_SETTLOR_RIGHT_TO_REVOKE: Boolean;
+ }
+ export interface VQF_902_14 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_DOCUMENTS: File[];
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_MEANS: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_REASON: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_RESULT: String;
+ /**
+ *
+ * Required: true
+ */
+ INCRISK_SUMMARY: Paragraph;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ }
+ export interface VQF_902_1_founder {
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_AUTHORIZATION_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_NATIONALITY: CountryCode;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_NATIONAL_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_NATIONAL__COPY: File;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_POWER_OF_ATTORNEY: String;
+ /**
+ *
+ * Required: true
+ */
+ FOUNDER_RESIDENTIAL_ADDRESS: ResidentialAddress;
+ }
+ export interface VQF_902_4 {
+ /**
+ *
+ * Required:
+ */
+ CONTACT_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ COUNTRY_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ COUNTRY_RISK_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_1_RISK_DEFINITION: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_1_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_2_RISK_DEFINITION: String;
+ /**
+ *
+ * Required:
+ */
+ EXTRA_CRITERA_2_RISK_LEVEL: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ HIGH_RISK_COUNTRY: Boolean;
+ /**
+ *
+ * Required:
+ */
+ HIGH_RISK__ACCEPTANCE_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required:
+ */
+ INDUSTRY_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ INDUSTRY_RISK_TYPE: String;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ PEP_ACCEPTANCE_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ PEP_DOMESTIC: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ PEP_FOREIGN: Boolean;
+ /**
+ *
+ * Required: true
+ */
+ PEP_INTERNATIONAL_ORGANIZATION: Boolean;
+ /**
+ *
+ * Required:
+ */
+ PRODUCT_RISK_LEVEL: String;
+ /**
+ *
+ * Required:
+ */
+ RISK_CLASIFICATION_ACCEPTANCE_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required:
+ */
+ RISK_CLASIFICATION_LEVEL: String;
+ }
+ export interface VQF_902_5 {
+ /**
+ *
+ * Required:
+ */
+ BIZREL_DEVELOPMENT: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_ADDRESS: BusinessAddress;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_BANK_ACCOUNT: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_BENEFICIARIES_FULL_NAME: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FINANCIAL_VOLUME: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_FURTHER_INFO: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_INCOME: String;
+ /**
+ *
+ * Required: true
+ */
+ BIZREL_ORIGIN_AMOUNT: Amount;
+ /**
+ *
+ * Required: true
+ */
+ BIZREL_ORIGIN_CATEGORY: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_ORIGIN_CATEGORY_OTHER: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_ORIGIN_DETAIL: Paragraph;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_PROFESSION: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_PURPOSE: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_AMLA_FILES: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_REFERENCES: String;
+ /**
+ *
+ * Required:
+ */
+ BIZREL_THIRDPARTY_RELATIONSHIP: String;
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ }
+ export interface VQF_902_9 {
+ /**
+ *
+ * Required: true
+ */
+ CUSTOMER_ID: String;
+ /**
+ *
+ * Required: true
+ */
+ FORM_FILLING_DATE: AbsoluteDateTime;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_CONTRACTING_PARTNER: Paragraph;
+ /**
+ *
+ * Required:
+ */
+ IDENTITY_LIST: Form<VQF_902_9_identity>[];
+ /**
+ *
+ * Required: true
+ */
+ OFFICER_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGNATURE: String;
+ /**
+ *
+ * Required: true
+ */
+ SIGN_DATE: AbsoluteDateTime;
+ }
+ export interface VQF_902_9_identity {
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_BIRTHDATE: AbsoluteDate;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_DOMICILE: ResidentialAddress;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_FULL_NAME: String;
+ /**
+ *
+ * Required: true
+ */
+ IDENTITY_NATIONALITY: CountryCode;
+ }
+
+
+}
diff --git a/packages/kyc-ui/src/index.html b/packages/kyc-ui/src/index.html
index cbbf6addf..3e9a56ccd 100644
--- a/packages/kyc-ui/src/index.html
+++ b/packages/kyc-ui/src/index.html
@@ -29,7 +29,7 @@
href="data:;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD///////////////////////////////////////////////////////////////////////////////////////////////////7//v38//78/P/+/fz//vz7///+/v/+/f3//vz7///+/v/+/fz//v38///////////////////////+/v3///7+/////////////////////////////////////////////////////////v3//v79///////+/v3///////r28v/ct5//06SG/9Gffv/Xqo7/7N/V/9e2nf/bsJb/6uDW/9Sskf/euKH/+/j2///////+/v3//////+3azv+/eE3/2rWd/9Kkhv/Vr5T/48i2/8J+VP/
[...]
/>
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon" />
- <title>KYC</title>
+ <title>Customer identification</title>
<!-- Entry point for the SPA. -->
<script type="module" src="index.js"></script>
<link rel="stylesheet" href="index.css" />
diff --git a/packages/kyc-ui/src/pages/FillForm.tsx
b/packages/kyc-ui/src/pages/FillForm.tsx
index 47c0d5510..68d18e7d0 100644
--- a/packages/kyc-ui/src/pages/FillForm.tsx
+++ b/packages/kyc-ui/src/pages/FillForm.tsx
@@ -47,6 +47,8 @@ import {
import { undefinedIfEmpty } from "./Start.js";
import { useUiFormsContext } from "../context/ui-forms.js";
import { usePreferences } from "../context/preferences.js";
+import { format } from "date-fns";
+import { useNotifierContext } from "../context/notifier.js";
type Props = {
token: AccessToken;
@@ -81,6 +83,7 @@ export function FillForm({
// const { forms } = useUiFormsContext();
const [notification, withErrorHandler] = useLocalNotificationHandler();
const [preferences] = usePreferences();
+ const notifier = useNotifierContext();
const customForm =
requirement.context && "form" in requirement.context
@@ -104,36 +107,66 @@ export function FillForm({
}
const shape: Array<UIHandlerId> = [];
const requiredFields: Array<UIHandlerId> = [];
-
- theForm.config.design.forEach((section) => {
- Array.prototype.push.apply(shape, getShapeFromFields(section.fields, ""));
- Array.prototype.push.apply(
- requiredFields,
- getRequiredFields(section.fields),
- );
+ notifier.emit({
+ type: "NEW_FORM",
+ payload: theForm.label,
});
- const [form, state] = useFormState<FormType>(shape, {}, (st) => {
- const partialErrors = undefinedIfEmpty<FormErrors<FormType>>({});
+ switch (theForm.config.type) {
+ case "double-column": {
+ theForm.config.design.forEach((section) => {
+ Array.prototype.push.apply(
+ shape,
+ getShapeFromFields(section.fields, ""),
+ );
+ Array.prototype.push.apply(
+ requiredFields,
+ getRequiredFields(section.fields),
+ );
+ });
+ break;
+ }
+ case "single-column": {
+ Array.prototype.push.apply(
+ shape,
+ getShapeFromFields(theForm.config.fields, ""),
+ );
+ Array.prototype.push.apply(
+ requiredFields,
+ getRequiredFields(theForm.config.fields),
+ );
+ }
+ }
+
+ const [form, state] = useFormState<FormType>(
+ shape,
+ {
+ OFFICER_FULL_NAME: "asd",
+ FORM_FILLING_DATE: format(new Date(), "dd/MM/yyyy"),
+ CUSTOMER_ID: "123",
+ },
+ (st) => {
+ const partialErrors = undefinedIfEmpty<FormErrors<FormType>>({});
+
+ const errors = undefinedIfEmpty<FormErrors<FormType> | undefined>(
+ validateRequiredFields(partialErrors, st, requiredFields),
+ );
- const errors = undefinedIfEmpty<FormErrors<FormType> | undefined>(
- validateRequiredFields(partialErrors, st, requiredFields),
- );
+ if (errors === undefined) {
+ return {
+ status: "ok",
+ result: st as any,
+ errors: undefined,
+ };
+ }
- if (errors === undefined) {
return {
- status: "ok",
+ status: "fail",
result: st as any,
- errors: undefined,
+ errors,
};
- }
-
- return {
- status: "fail",
- result: st as any,
- errors,
- };
- });
+ },
+ );
const validatedForm = state.status !== "ok" ? undefined : state.result;
const submitHandler =
@@ -186,41 +219,65 @@ export function FillForm({
<div class="rounded-lg bg-white px-5 py-6 shadow m-4">
<LocalNotificationBanner notification={notification} />
<div class="space-y-10 divide-y -mt-5 divide-gray-900/10">
- {theForm.config.design.map((section, i) => {
- if (!section) return <Fragment />;
- return (
- <div
- key={i}
- class="grid grid-cols-1 gap-x-8 gap-y-8 pt-5 md:grid-cols-3"
- >
- <div class="px-4 sm:px-0">
- <h2 class="text-base font-semibold leading-7 text-gray-900">
- {section.title}
- </h2>
- {section.description && (
- <p class="mt-1 text-sm leading-6 text-gray-600">
- {section.description}
- </p>
- )}
- </div>
- <div class="bg-white shadow-sm ring-1 ring-gray-900/5 rounded-md
md:col-span-2">
- <div class="p-3">
- <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
- <RenderAllFieldsByUiConfig
- key={i}
- fields={convertUiField(
- i18n,
- section.fields,
- form,
- getConverterById,
+ {(function () {
+ switch (theForm.config.type) {
+ case "double-column": {
+ return theForm.config.design.map((section, i) => {
+ if (!section) return <Fragment />;
+ return (
+ <div
+ key={i}
+ class="grid grid-cols-1 gap-x-8 gap-y-8 pt-5
md:grid-cols-3"
+ >
+ <div class="px-4 sm:px-0">
+ <h2 class="text-base font-semibold leading-7
text-gray-900">
+ {section.title}
+ </h2>
+ {section.description && (
+ <p class="mt-1 text-sm leading-6 text-gray-600">
+ {section.description}
+ </p>
)}
- />
+ </div>
+ <div class="bg-white shadow-sm ring-1 ring-gray-900/5
rounded-md md:col-span-2">
+ <div class="p-3">
+ <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
+ <RenderAllFieldsByUiConfig
+ key={i}
+ fields={convertUiField(
+ i18n,
+ section.fields,
+ form,
+ getConverterById,
+ )}
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ });
+ }
+ case "single-column": {
+ return (
+ <div class="bg-white shadow-sm ring-1 ring-gray-900/5
rounded-md md:col-span-2">
+ <div class="p-3">
+ <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
+ <RenderAllFieldsByUiConfig
+ fields={convertUiField(
+ i18n,
+ theForm.config.fields,
+ form,
+ getConverterById,
+ )}
+ />
+ </div>
</div>
</div>
- </div>
- </div>
- );
- })}
+ );
+ }
+ }
+ })()}
</div>
{preferences.showDebugInfo ? (
@@ -248,7 +305,7 @@ export function FillForm({
disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
- <i18n.Translate>Confirm</i18n.Translate>
+ <i18n.Translate>Submit</i18n.Translate>
</Button>
</div>
</div>
diff --git a/packages/kyc-ui/src/pages/Frame.tsx
b/packages/kyc-ui/src/pages/Frame.tsx
index 7cfdc7ad0..ab97d23b8 100644
--- a/packages/kyc-ui/src/pages/Frame.tsx
+++ b/packages/kyc-ui/src/pages/Frame.tsx
@@ -24,7 +24,7 @@ import {
useTranslationContext,
} from "@gnu-taler/web-util/browser";
import { ComponentChildren, Fragment, VNode, h } from "preact";
-import { useEffect, useErrorBoundary } from "preact/hooks";
+import { useEffect, useErrorBoundary, useState } from "preact/hooks";
import {
getAllBooleanPreferences,
getLabelForPreferences,
@@ -32,6 +32,7 @@ import {
} from "../context/preferences.js";
import { useSettingsContext } from "../context/settings.js";
import { publicPages } from "../Routing.js";
+import { useNotifierContext } from "../context/notifier.js";
const GIT_HASH = typeof __GIT_HASH__ !== "undefined" ? __GIT_HASH__ :
undefined;
const VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : undefined;
@@ -39,7 +40,8 @@ const VERSION = typeof __VERSION__ !== "undefined" ?
__VERSION__ : undefined;
export function Frame({ children }: { children: ComponentChildren }): VNode {
const settings = useSettingsContext();
const [preferences, updatePreferences] = usePreferences();
-
+ const [title, setTitle] = useState<string>();
+ const notifier = useNotifierContext();
const [error, resetError] = useErrorBoundary();
const { i18n } = useTranslationContext();
useEffect(() => {
@@ -58,18 +60,27 @@ export function Frame({ children }: { children:
ComponentChildren }): VNode {
}
}, [error]);
+ useEffect(() => {
+ return notifier.subscribe((event) => {
+ if (event.type === "NEW_FORM") {
+ setTitle(event.payload);
+ }
+ });
+ }, []);
return (
<div
class="min-h-full flex flex-col m-0 bg-slate-200"
style="min-height: 100vh;"
>
<Header
- title="KYC"
+ title={title ?? i18n.str`Customer identification`}
onLogout={undefined}
iconLinkURL="#"
- sites={!preferences.showDebugInfo ? [] : [
- ["Test kyc", publicPages.triggerKyc.url({})]
- ]}
+ sites={
+ !preferences.showDebugInfo
+ ? []
+ : [["Test kyc", publicPages.triggerKyc.url({})]]
+ }
supportedLangs={["en"]}
>
<li>
diff --git a/packages/kyc-ui/src/pages/Start.tsx
b/packages/kyc-ui/src/pages/Start.tsx
index 3c0bb78b3..527124ccb 100644
--- a/packages/kyc-ui/src/pages/Start.tsx
+++ b/packages/kyc-ui/src/pages/Start.tsx
@@ -60,9 +60,9 @@ export function ShowReqList({
result.body.requirements.length > 0
? result.body.requirements[0]
: undefined;
- useEffect(() => {
- if (firstAccount) onFormSelected(firstAccount);
- }, [firstAccount]);
+ // useEffect(() => {
+ // if (firstAccount) onFormSelected(firstAccount);
+ // }, [firstAccount]);
if (!result) {
return <Loading />;
@@ -153,12 +153,14 @@ export function ShowReqList({
<div class="isolate bg-white px-6 py-12">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-3xl font-bold tracking-tight text-gray-900
sm:text-4xl">
- <i18n.Translate>No requirements for this account</i18n.Translate>
+ <i18n.Translate>
+ Mandatory identification requirements are satisfied
+ </i18n.Translate>
</h2>
</div>
<div class="m-8">
- <Attention title={i18n.str`Kyc completed`} type="success">
- <i18n.Translate>You can close this now</i18n.Translate>
+ <Attention title={i18n.str`Process completed`} type="success">
+ <i18n.Translate>You can close this window now.</i18n.Translate>
</Attention>
</div>
</div>
diff --git a/packages/kyc-ui/src/pages/TriggerKyc.tsx
b/packages/kyc-ui/src/pages/TriggerKyc.tsx
index ce4730011..9195ed56c 100644
--- a/packages/kyc-ui/src/pages/TriggerKyc.tsx
+++ b/packages/kyc-ui/src/pages/TriggerKyc.tsx
@@ -88,13 +88,28 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
const shape: Array<UIHandlerId> = [];
const requiredFields: Array<UIHandlerId> = [];
- theForm.config.design.forEach((section) => {
- Array.prototype.push.apply(shape, getShapeFromFields(section.fields));
- Array.prototype.push.apply(
- requiredFields,
- getRequiredFields(section.fields),
- );
- });
+ switch (theForm.config.type) {
+ case "double-column": {
+ theForm.config.design.forEach((section) => {
+ Array.prototype.push.apply(shape, getShapeFromFields(section.fields));
+ Array.prototype.push.apply(
+ requiredFields,
+ getRequiredFields(section.fields),
+ );
+ });
+ break;
+ }
+ case "single-column": {
+ Array.prototype.push.apply(
+ shape,
+ getShapeFromFields(theForm.config.fields),
+ );
+ Array.prototype.push.apply(
+ requiredFields,
+ getRequiredFields(theForm.config.fields),
+ );
+ }
+ }
const [form, state] = useFormState<FormType>(
shape,
{
@@ -173,7 +188,7 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
check();
}, [kycAccount]);
- function triggerAmount(amount:AmountJson) {
+ function triggerAmount(amount: AmountJson) {
return withErrorHandler(
async () => {
const account = await accountPromise;
@@ -201,7 +216,7 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
assertUnreachable(fail);
}
},
- )
+ );
}
const sendFormValue =
@@ -217,41 +232,65 @@ export function TriggerKyc({ onKycStarted }: Props):
VNode {
<div class="rounded-lg bg-white px-5 py-6 shadow m-4">
<LocalNotificationBanner notification={notification} />
<div class="space-y-10 divide-y -mt-5 divide-gray-900/10">
- {theForm.config.design.map((section, i) => {
- if (!section) return <Fragment />;
- return (
- <div
- key={i}
- class="grid grid-cols-1 gap-x-8 gap-y-8 pt-5 md:grid-cols-3"
- >
- <div class="px-4 sm:px-0">
- <h2 class="text-base font-semibold leading-7 text-gray-900">
- {section.title}
- </h2>
- {section.description && (
- <p class="mt-1 text-sm leading-6 text-gray-600">
- {section.description}
- </p>
- )}
- </div>
- <div class="bg-white shadow-sm ring-1 ring-gray-900/5 rounded-md
md:col-span-2">
- <div class="p-3">
- <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
- <RenderAllFieldsByUiConfig
- key={i}
- fields={convertUiField(
- i18n,
- section.fields,
- form,
- getConverterById,
+ {(function () {
+ switch (theForm.config.type) {
+ case "double-column": {
+ return theForm.config.design.map((section, i) => {
+ if (!section) return <Fragment />;
+ return (
+ <div
+ key={i}
+ class="grid grid-cols-1 gap-x-8 gap-y-8 pt-5
md:grid-cols-3"
+ >
+ <div class="px-4 sm:px-0">
+ <h2 class="text-base font-semibold leading-7
text-gray-900">
+ {section.title}
+ </h2>
+ {section.description && (
+ <p class="mt-1 text-sm leading-6 text-gray-600">
+ {section.description}
+ </p>
)}
- />
+ </div>
+ <div class="bg-white shadow-sm ring-1 ring-gray-900/5
rounded-md md:col-span-2">
+ <div class="p-3">
+ <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
+ <RenderAllFieldsByUiConfig
+ key={i}
+ fields={convertUiField(
+ i18n,
+ section.fields,
+ form,
+ getConverterById,
+ )}
+ />
+ </div>
+ </div>
+ </div>
+ </div>
+ );
+ });
+ }
+ case "single-column": {
+ return (
+ <div class="bg-white shadow-sm ring-1 ring-gray-900/5
rounded-md md:col-span-2">
+ <div class="p-3">
+ <div class="grid max-w-2xl grid-cols-1 gap-x-6 gap-y-8
sm:grid-cols-6">
+ <RenderAllFieldsByUiConfig
+ fields={convertUiField(
+ i18n,
+ theForm.config.fields,
+ form,
+ getConverterById,
+ )}
+ />
+ </div>
</div>
</div>
- </div>
- </div>
- );
- })}
+ );
+ }
+ }
+ })()}
</div>
<div class="mt-6 flex items-center justify-end gap-x-6">
@@ -267,7 +306,7 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
- <i18n.Translate>Confirm</i18n.Translate>
+ <i18n.Translate>Submit</i18n.Translate>
</Button>
</div>
@@ -282,7 +321,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000070`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000070`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -292,7 +333,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000080`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000080`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -302,7 +345,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000000`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000000`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -312,7 +357,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000010`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000010`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -322,7 +369,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000020`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000020`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -332,7 +381,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000030`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000030`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -342,7 +393,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000040`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000040`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -352,7 +405,9 @@ export function TriggerKyc({ onKycStarted }: Props): VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000050`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000050`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
@@ -362,14 +417,27 @@ export function TriggerKyc({ onKycStarted }: Props):
VNode {
<div>
<Button
type="submit"
-
handler={triggerAmount(Amounts.parseOrThrow(`${config.currency}:1000060`))}
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000060`),
+ )}
// disabled={!submitHandler}
class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
<i18n.Translate>Trigger VQF other</i18n.Translate>
</Button>
</div>
-
+ <div>
+ <Button
+ type="submit"
+ handler={triggerAmount(
+ Amounts.parseOrThrow(`${config.currency}:1000090`),
+ )}
+ // disabled={!submitHandler}
+ class="disabled:opacity-50 disabled:cursor-default rounded-md
bg-indigo-600 px-3 py-2 text-sm font-semibold text-white shadow-sm
hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2
focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
+ >
+ <i18n.Translate>Challenger test</i18n.Translate>
+ </Button>
+ </div>
</div>
</div>
);
diff --git a/packages/kyc-ui/tsconfig.json b/packages/kyc-ui/tsconfig.json
index 9826fac07..a69021452 100644
--- a/packages/kyc-ui/tsconfig.json
+++ b/packages/kyc-ui/tsconfig.json
@@ -9,6 +9,7 @@
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native',
or 'react'. */,
"jsxFactory": "h",
"jsxFragmentFactory": "Fragment",
+ "resolveJsonModule": true,
"noEmit": true /* Do not emit outputs. */,
// "importHelpers": true, /* Import emit helpers from
'tslib'. */
// "downlevelIteration": true, /* Provide full support for
iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'.
*/
diff --git a/packages/web-util/src/components/Header.tsx
b/packages/web-util/src/components/Header.tsx
index 29f4a4949..793709860 100644
--- a/packages/web-util/src/components/Header.tsx
+++ b/packages/web-util/src/components/Header.tsx
@@ -1,5 +1,9 @@
import { useState } from "preact/hooks";
-import { LangSelector, useNotifications, useTranslationContext } from
"../index.browser.js";
+import {
+ LangSelector,
+ useNotifications,
+ useTranslationContext,
+} from "../index.browser.js";
import { ComponentChildren, Fragment, VNode, h } from "preact";
import logo from "../assets/logo-2021.svg";
@@ -11,173 +15,303 @@ interface Props {
children?: ComponentChildren;
onLogout: (() => void) | undefined;
sites: Array<Array<string>>;
- supportedLangs: string[]
+ supportedLangs: string[];
}
-export function Header({ title, profileURL, notificationURL, iconLinkURL,
sites, onLogout, children }: Props): VNode {
+export function Header({
+ title,
+ profileURL,
+ notificationURL,
+ iconLinkURL,
+ sites,
+ onLogout,
+ children,
+}: Props): VNode {
const { i18n } = useTranslationContext();
- const [open, setOpen] = useState(false)
+ const [open, setOpen] = useState(false);
const ns = useNotifications();
- return <Fragment>
- <header class="bg-indigo-600 w-full mx-auto px-2 border-b
border-opacity-25 border-indigo-400">
- <div class="flex flex-row h-16 items-center ">
- <div class="flex px-2 justify-start">
- <div class="flex-shrink-0 bg-white rounded-lg">
- <a href={iconLinkURL ?? "#"} name="logo">
- <img
- class="h-8 w-auto"
- src={logo}
- alt="GNU Taler"
- style={{ height: "1.5rem", margin: ".5rem" }}
- />
- </a>
+ return (
+ <Fragment>
+ <header class="bg-indigo-600 w-full mx-auto px-2 border-b
border-opacity-25 border-indigo-400">
+ <div class="flex flex-row h-16 items-center ">
+ <div class="flex px-2 justify-start">
+ <div class="flex-shrink-0 bg-white rounded-lg">
+ <a href={iconLinkURL ?? "#"} name="logo">
+ <img
+ class="h-8 w-auto"
+ src={logo}
+ alt="GNU Taler"
+ style={{ height: "1.5rem", margin: ".5rem" }}
+ />
+ </a>
+ </div>
+ <span class="flex items-center text-white text-lg font-bold ml-4">
+ {title}
+ </span>
</div>
- <span class="flex items-center text-white text-lg font-bold ml-4">
- {title}
- </span>
- </div>
- <div class="flex-1 ml-6 ">
- <div class="flex flex-1 space-x-4">
- {sites.map((site) => {
- if (site.length !== 2) return;
- const [name, url] = site
- return <a href={url} name={`site header ${name}`} class="hidden
sm:block text-white hover:bg-indigo-500 hover:bg-opacity-75 rounded-md py-2
px-3 text-sm font-medium">{name}</a>
- })}
+ <div class="flex-1 ml-6 ">
+ <div class="flex flex-1 space-x-4">
+ {sites.map((site) => {
+ if (site.length !== 2) return;
+ const [name, url] = site;
+ return (
+ <a
+ href={url}
+ name={`site header ${name}`}
+ class="hidden sm:block text-white hover:bg-indigo-500
hover:bg-opacity-75 rounded-md py-2 px-3 text-sm font-medium"
+ >
+ {name}
+ </a>
+ );
+ })}
+ </div>
</div>
- </div>
- <div class="flex justify-end">
- {!notificationURL ? undefined :
- <a href={notificationURL} name="notifications" class="relative
inline-flex items-center justify-center rounded-md bg-indigo-600 p-1 mr-2
text-indigo-200 hover:bg-indigo-500 hover:bg-opacity-75 hover:text-white
focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2
focus:ring-offset-indigo-600" aria-controls="mobile-menu" aria-expanded="false">
- <span class="absolute -inset-0.5"></span>
- <span class="sr-only"><i18n.Translate>Show
notifications</i18n.Translate></span>
- {ns.length > 0 ?
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
fill="currentColor" class="w-10 h-10">
- <path d="M5.85 3.5a.75.75 0 0 0-1.117-1 9.719 9.719 0 0
0-2.348 4.876.75.75 0 0 0 1.479.248A8.219 8.219 0 0 1 5.85 3.5ZM19.267
2.5a.75.75 0 1 0-1.118 1 8.22 8.22 0 0 1 1.987 4.124.75.75 0 0 0 1.48-.248A9.72
9.72 0 0 0 19.266 2.5Z" />
- <path fill-rule="evenodd" d="M12 2.25A6.75 6.75 0 0 0 5.25
9v.75a8.217 8.217 0 0 1-2.119 5.52.75.75 0 0 0 .298 1.206c1.544.57 3.16.99
4.831 1.243a3.75 3.75 0 1 0 7.48 0 24.583 24.583 0 0 0 4.83-1.244.75.75 0 0 0
.298-1.205 8.217 8.217 0 0 1-2.118-5.52V9A6.75 6.75 0 0 0 12 2.25ZM9.75
18c0-.034 0-.067.002-.1a25.05 25.05 0 0 0 4.496 0l.002.1a2.25 2.25 0 1 1-4.5
0Z" clip-rule="evenodd" />
- </svg>
- :
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0
0 24 24" stroke-width="1.5" stroke="currentColor" class="w-10 h-10">
- <path stroke-linecap="round" stroke-linejoin="round"
d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6
6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455
1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" />
+ <div class="flex justify-end">
+ {!notificationURL ? undefined : (
+ <a
+ href={notificationURL}
+ name="notifications"
+ class="relative inline-flex items-center justify-center
rounded-md bg-indigo-600 p-1 mr-2 text-indigo-200 hover:bg-indigo-500
hover:bg-opacity-75 hover:text-white focus:outline-none focus:ring-2
focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600"
+ aria-controls="mobile-menu"
+ aria-expanded="false"
+ >
+ <span class="absolute -inset-0.5"></span>
+ <span class="sr-only">
+ <i18n.Translate>Show notifications</i18n.Translate>
+ </span>
+ {ns.length > 0 ? (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 24 24"
+ fill="currentColor"
+ class="w-10 h-10"
+ >
+ <path d="M5.85 3.5a.75.75 0 0 0-1.117-1 9.719 9.719 0 0
0-2.348 4.876.75.75 0 0 0 1.479.248A8.219 8.219 0 0 1 5.85 3.5ZM19.267
2.5a.75.75 0 1 0-1.118 1 8.22 8.22 0 0 1 1.987 4.124.75.75 0 0 0 1.48-.248A9.72
9.72 0 0 0 19.266 2.5Z" />
+ <path
+ fill-rule="evenodd"
+ d="M12 2.25A6.75 6.75 0 0 0 5.25 9v.75a8.217 8.217 0 0
1-2.119 5.52.75.75 0 0 0 .298 1.206c1.544.57 3.16.99 4.831 1.243a3.75 3.75 0 1
0 7.48 0 24.583 24.583 0 0 0 4.83-1.244.75.75 0 0 0 .298-1.205 8.217 8.217 0 0
1-2.118-5.52V9A6.75 6.75 0 0 0 12 2.25ZM9.75 18c0-.034 0-.067.002-.1a25.05
25.05 0 0 0 4.496 0l.002.1a2.25 2.25 0 1 1-4.5 0Z"
+ clip-rule="evenodd"
+ />
+ </svg>
+ ) : (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke-width="1.5"
+ stroke="currentColor"
+ class="w-10 h-10"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967
8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64
3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1
1-5.714 0"
+ />
+ </svg>
+ )}
+ </a>
+ )}
+ {!profileURL ? undefined : (
+ <a
+ href={profileURL}
+ name="profile"
+ class="relative inline-flex items-center justify-center
rounded-md bg-indigo-600 p-1 mr-2 text-indigo-200 hover:bg-indigo-500
hover:bg-opacity-75 hover:text-white focus:outline-none focus:ring-2
focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600"
+ aria-controls="mobile-menu"
+ aria-expanded="false"
+ >
+ <span class="absolute -inset-0.5"></span>
+ <span class="sr-only">
+ <i18n.Translate>Open profile</i18n.Translate>
+ </span>
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke-width="1.5"
+ stroke="currentColor"
+ class="w-10 h-10"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0
0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12
21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"
+ />
</svg>
- }
- </a>
- }
- {!profileURL ? undefined :
- <a href={profileURL} name="profile" class="relative inline-flex
items-center justify-center rounded-md bg-indigo-600 p-1 mr-2 text-indigo-200
hover:bg-indigo-500 hover:bg-opacity-75 hover:text-white focus:outline-none
focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600"
aria-controls="mobile-menu" aria-expanded="false">
+ </a>
+ )}
+ <LangSelector type="icon" />
+ <button
+ type="button"
+ name="toggle sidebar"
+ class="relative inline-flex items-center justify-center
rounded-md bg-indigo-600 p-1 text-indigo-200 hover:bg-indigo-500
hover:bg-opacity-75 hover:text-white focus:outline-none focus:ring-2
focus:ring-white focus:ring-offset-2 focus:ring-offset-indigo-600"
+ aria-controls="mobile-menu"
+ aria-expanded="false"
+ onClick={(e) => {
+ setOpen(!open);
+ }}
+ >
<span class="absolute -inset-0.5"></span>
- <span class="sr-only"><i18n.Translate>Open
profile</i18n.Translate></span>
- <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0
24 24" stroke-width="1.5" stroke="currentColor" class="w-10 h-10">
- <path stroke-linecap="round" stroke-linejoin="round"
d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982
2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966
0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
+ <span class="sr-only">
+ <i18n.Translate>Open settings</i18n.Translate>
+ </span>
+ <svg
+ class="block h-10 w-10"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke-width="2"
+ stroke="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"
+ />
</svg>
- </a>
- }
- <button type="button" name="toggle sidebar" class="relative
inline-flex items-center justify-center rounded-md bg-indigo-600 p-1
text-indigo-200 hover:bg-indigo-500 hover:bg-opacity-75 hover:text-white
focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2
focus:ring-offset-indigo-600" aria-controls="mobile-menu" aria-expanded="false"
- onClick={(e) => {
- setOpen(!open)
- }}>
- <span class="absolute -inset-0.5"></span>
- <span class="sr-only"><i18n.Translate>Open
settings</i18n.Translate></span>
- <svg class="block h-10 w-10" fill="none" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" aria-hidden="true">
- <path stroke-linecap="round" stroke-linejoin="round" d="M3.75
6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
- </svg>
- </button>
+ </button>
+ </div>
</div>
- </div>
- </header>
+ </header>
- {
- open &&
- <div class="relative z-10" name="sidebar overlay"
aria-labelledby="slide-over-title" role="dialog" aria-modal="true"
- onClick={() => {
- setOpen(false)
- }}>
- <div class="fixed inset-0"></div>
-
- <div class="fixed inset-0 overflow-hidden">
- <div class="absolute inset-0 overflow-hidden">
- <div class="pointer-events-none fixed inset-y-0 right-0 flex
max-w-full pl-10">
- <div class="pointer-events-auto w-screen max-w-md" >
- <div class="flex h-full flex-col overflow-y-scroll bg-white
py-6 shadow-xl" onClick={(e) => {
- //do not trigger close if clicking inside the sidebar
- e.stopPropagation();
- }}>
- <div class="px-4 sm:px-6" >
- <div class="flex items-start justify-between" >
- <h2 class="text-base font-semibold leading-6
text-gray-900" id="slide-over-title">
- <i18n.Translate>Menu</i18n.Translate>
- </h2>
- <div class="ml-3 flex h-7 items-center">
- <button type="button" name="close sidebar"
class="relative rounded-md bg-white text-gray-400 hover:text-gray-500
focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
- onClick={(e) => {
- setOpen(false)
- }}
+ {open && (
+ <div
+ class="relative z-10"
+ name="sidebar overlay"
+ aria-labelledby="slide-over-title"
+ role="dialog"
+ aria-modal="true"
+ onClick={() => {
+ setOpen(false);
+ }}
+ >
+ <div class="fixed inset-0"></div>
+ <div class="fixed inset-0 overflow-hidden">
+ <div class="absolute inset-0 overflow-hidden">
+ <div class="pointer-events-none fixed inset-y-0 right-0 flex
max-w-full pl-10">
+ <div class="pointer-events-auto w-screen max-w-md">
+ <div
+ class="flex h-full flex-col overflow-y-scroll bg-white
py-6 shadow-xl"
+ onClick={(e) => {
+ //do not trigger close if clicking inside the sidebar
+ e.stopPropagation();
+ }}
+ >
+ <div class="px-4 sm:px-6">
+ <div class="flex items-start justify-between">
+ <h2
+ class="text-base font-semibold leading-6
text-gray-900"
+ id="slide-over-title"
>
- <span class="absolute -inset-2.5"></span>
- <span class="sr-only">
- <i18n.Translate>Close panel</i18n.Translate>
- </span>
- <svg class="h-6 w-6" fill="none" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" aria-hidden="true">
- <path stroke-linecap="round"
stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
- </svg>
- </button>
+ <i18n.Translate>Menu</i18n.Translate>
+ </h2>
+ <div class="ml-3 flex h-7 items-center">
+ <button
+ type="button"
+ name="close sidebar"
+ class="relative rounded-md bg-white text-gray-400
hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500
focus:ring-offset-2"
+ onClick={(e) => {
+ setOpen(false);
+ }}
+ >
+ <span class="absolute -inset-2.5"></span>
+ <span class="sr-only">
+ <i18n.Translate>Close panel</i18n.Translate>
+ </span>
+ <svg
+ class="h-6 w-6"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke-width="1.5"
+ stroke="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ d="M6 18L18 6M6 6l12 12"
+ />
+ </svg>
+ </button>
+ </div>
</div>
</div>
- </div>
- <div class="relative mt-6 flex-1 px-4 sm:px-6">
- <nav class="flex flex-1 flex-col" aria-label="Sidebar">
- <ul role="list" class="flex flex-1 flex-col gap-y-7">
- {onLogout ?
+ <div class="relative mt-6 flex-1 px-4 sm:px-6">
+ <nav class="flex flex-1 flex-col" aria-label="Sidebar">
+ <ul role="list" class="flex flex-1 flex-col gap-y-7">
+ {onLogout ? (
+ <li>
+ <a
+ href="#"
+ name="logout"
+ class="text-gray-700 hover:text-indigo-600
hover:bg-gray-100 group flex gap-x-3 rounded-md p-2 text-sm leading-6
font-semibold"
+ onClick={() => {
+ onLogout();
+ setOpen(false);
+ }}
+ >
+ <svg
+ class="h-6 w-6 shrink-0 text-indigo-600"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke-width="1.5"
+ stroke="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ stroke-linecap="round"
+ stroke-linejoin="round"
+ d="M2.25 12l8.954-8.955c.44-.439
1.152-.439 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125
1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125
1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"
+ />
+ </svg>
+ <i18n.Translate>Log out</i18n.Translate>
+ </a>
+ </li>
+ ) : undefined}
<li>
- <a href="#"
- name="logout"
- class="text-gray-700 hover:text-indigo-600
hover:bg-gray-100 group flex gap-x-3 rounded-md p-2 text-sm leading-6
font-semibold"
- onClick={() => {
- onLogout();
- setOpen(false)
- }}
- >
- <svg class="h-6 w-6 shrink-0 text-indigo-600"
fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
aria-hidden="true">
- <path stroke-linecap="round"
stroke-linejoin="round" d="M2.25 12l8.954-8.955c.44-.439 1.152-.439 1.591
0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125
1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125
1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25" />
- </svg>
- <i18n.Translate>Log out</i18n.Translate>
- </a>
- </li>
- : undefined}
- <li>
- <LangSelector />
- </li>
- {/* CHILDREN */}
- {children}
- {/* /CHILDREN */}
- {sites.length > 0 ?
- <li class="block sm:hidden">
- <div class="text-xs font-semibold leading-6
text-gray-400">
- <i18n.Translate>Sites</i18n.Translate>
- </div>
- <ul role="list" class="space-y-1">
- {sites.map(([name, url]) => {
- return <li>
- <a href={url} name={`site ${name}`}
target="_blank" rel="noopener noreferrer" class="text-gray-700
hover:text-indigo-600 hover:bg-gray-100 group flex gap-x-3 rounded-md p-2
text-sm leading-6 font-semibold">
- <span class="flex h-6 w-6 shrink-0
items-center justify-center rounded-lg border text-[0.625rem] font-medium
bg-white text-gray-400 border-gray-200 group-hover:border-indigo-600
group-hover:text-indigo-600">></span>
- <span class="truncate">{name}</span>
- </a>
- </li>
- })}
- </ul>
+ <LangSelector />
</li>
- : undefined
- }
- </ul>
- </nav>
+ {/* CHILDREN */}
+ {children}
+ {/* /CHILDREN */}
+ {sites.length > 0 ? (
+ <li class="block sm:hidden">
+ <div class="text-xs font-semibold leading-6
text-gray-400">
+ <i18n.Translate>Sites</i18n.Translate>
+ </div>
+ <ul role="list" class="space-y-1">
+ {sites.map(([name, url]) => {
+ return (
+ <li>
+ <a
+ href={url}
+ name={`site ${name}`}
+ target="_blank"
+ rel="noopener noreferrer"
+ class="text-gray-700
hover:text-indigo-600 hover:bg-gray-100 group flex gap-x-3 rounded-md p-2
text-sm leading-6 font-semibold"
+ >
+ <span class="flex h-6 w-6 shrink-0
items-center justify-center rounded-lg border text-[0.625rem] font-medium
bg-white text-gray-400 border-gray-200 group-hover:border-indigo-600
group-hover:text-indigo-600">
+ >
+ </span>
+ <span class="truncate">{name}</span>
+ </a>
+ </li>
+ );
+ })}
+ </ul>
+ </li>
+ ) : undefined}
+ </ul>
+ </nav>
+ </div>
</div>
</div>
</div>
</div>
</div>
</div>
- </div>
- }
- </Fragment >
+ )}
+ </Fragment>
+ );
}
diff --git a/packages/web-util/src/components/LangSelector.tsx
b/packages/web-util/src/components/LangSelector.tsx
index 98b924b92..b08a1bbd2 100644
--- a/packages/web-util/src/components/LangSelector.tsx
+++ b/packages/web-util/src/components/LangSelector.tsx
@@ -46,8 +46,11 @@ function getLangName(s: keyof LangsNames | string): string {
return String(s);
}
-export function LangSelector({}: {}): VNode {
- const [updatingLang, setUpdatingLang] = useState(false);
+export function LangSelector({
+ type = "select",
+}: {
+ type?: "select" | "icon";
+}): VNode {
const { lang, changeLanguage, completeness, supportedLang } =
useTranslationContext();
const [hidden, setHidden] = useState(true);
@@ -67,78 +70,109 @@ export function LangSelector({}: {}): VNode {
};
}, []);
return (
- <div>
- <div class="relative mt-2">
- <button
- type="button"
- class="relative w-full cursor-default rounded-md bg-white py-1.5
pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300
focus:outline-none focus:ring-2 focus:ring-indigo-600 sm:text-sm sm:leading-6"
- aria-haspopup="listbox"
- aria-expanded="true"
+ <Fragment>
+ {(function () {
+ switch (type) {
+ case "select": {
+ return (
+ <button
+ type="button"
+ class="relative w-full cursor-default rounded-md bg-white
py-1.5 pl-3 pr-10 text-left text-gray-900 shadow-sm ring-1 ring-inset
ring-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-600 sm:text-sm
sm:leading-6"
+ aria-haspopup="listbox"
+ aria-expanded="true"
+ aria-labelledby="listbox-label"
+ onClick={(e) => {
+ setHidden(!hidden);
+ e.stopPropagation();
+ }}
+ >
+ <span class="flex items-center">
+ <img
+ alt="language"
+ class="h-5 w-5 flex-shrink-0 rounded-full"
+ src={langIcon}
+ />
+ <span class="ml-3 block truncate">{getLangName(lang)}</span>
+ </span>
+ <span class="pointer-events-none absolute inset-y-0 right-0
flex items-center pr-2">
+ <svg
+ class="h-5 w-5 text-gray-400"
+ viewBox="0 0 20 20"
+ fill="currentColor"
+ aria-hidden="true"
+ >
+ <path
+ fill-rule="evenodd"
+ d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1
1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76
9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75
0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z"
+ clip-rule="evenodd"
+ />
+ </svg>
+ </span>
+ </button>
+ );
+ }
+ case "icon": {
+ return (
+ <button
+ type="button"
+ class="relative w-full cursor-default rounded-md bg-white p-2
text-left text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300
focus:outline-none focus:ring-2 focus:ring-indigo-600"
+ onClick={(e) => {
+ setHidden(!hidden);
+ e.stopPropagation();
+ }}
+ >
+ <div class="flex">
+ <img
+ alt="language"
+ class="h-7 w-7 flex-shrink-0 rounded-full"
+ src={langIcon}
+ />
+ {/* {lang} */}
+ </div>
+ </button>
+ );
+ }
+ }
+ })()}
+
+ {!hidden && (
+ <ul
+ class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md
bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5
focus:outline-none sm:text-sm"
+ style={type === "icon" ? { right: 0, width: 200 } : {}}
+ tabIndex={-1}
+ role="listbox"
aria-labelledby="listbox-label"
- onClick={(e) => {
- setHidden(!hidden);
- e.stopPropagation();
- }}
+ aria-activedescendant="listbox-option-3"
>
- <span class="flex items-center">
- <img
- alt="language"
- class="h-5 w-5 flex-shrink-0 rounded-full"
- src={langIcon}
- />
- <span class="ml-3 block truncate">{getLangName(lang)}</span>
- </span>
- <span class="pointer-events-none absolute inset-y-0 right-0 flex
items-center pr-2">
- <svg
- class="h-5 w-5 text-gray-400"
- viewBox="0 0 20 20"
- fill="currentColor"
- aria-hidden="true"
- >
- <path
- fill-rule="evenodd"
- d="M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10
4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75
0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1
0l-3.25-3.5a.75.75 0 01.04-1.06z"
- clip-rule="evenodd"
- />
- </svg>
- </span>
- </button>
-
- {!hidden && (
- <ul
- class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md
bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5
focus:outline-none sm:text-sm"
- tabIndex={-1}
- role="listbox"
- aria-labelledby="listbox-label"
- aria-activedescendant="listbox-option-3"
- >
- {Object.keys(supportedLang)
- .filter((l) => l !== lang)
- .map((lang) => (
- <li
- class="text-gray-900 hover:bg-indigo-600 hover:text-white
cursor-pointer relative select-none py-2 pl-3 pr-9"
- role="option"
- onClick={() => {
- changeLanguage(lang);
- setUpdatingLang(false);
- setHidden(true);
- }}
- >
- <span class="font-normal truncate flex justify-between ">
- <span>{getLangName(lang)}</span>
- <span>{(completeness as any)[lang]}%</span>
- </span>
+ {Object.keys(supportedLang)
+ .filter((l) => l !== lang)
+ .map((lang) => (
+ <li
+ class="text-gray-900 hover:bg-indigo-600 hover:text-white
cursor-pointer relative select-none py-2 pl-3 pr-9"
+ role="option"
+ onClick={() => {
+ changeLanguage(lang);
+ setHidden(true);
+ }}
+ >
+ <span class="font-normal truncate flex justify-between ">
+ <span>{getLangName(lang)}</span>
+ <span>{(completeness as any)[lang]}%</span>
+ </span>
- <span class="text-indigo-600 absolute inset-y-0 right-0 flex
items-center pr-4">
- {/* <svg class="h-5 w-5" viewBox="0 0 20 20"
fill="currentColor" aria-hidden="true">
+ <span class="text-indigo-600 absolute inset-y-0 right-0 flex
items-center pr-4">
+ {/* <svg class="h-5 w-5" viewBox="0 0 20 20"
fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M16.704 4.153a.75.75 0
01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894
3.893 7.48-9.817a.75.75 0 011.05-.143z" clip-rule="evenodd" />
</svg> */}
- </span>
- </li>
- ))}
- </ul>
- )}
- </div>
- </div>
+ </span>
+ </li>
+ ))}
+ </ul>
+ )}
+ {/* <div>
+ <div class="relative mt-2">
+ </div>
+ </div> */}
+ </Fragment>
);
}
diff --git a/packages/web-util/src/forms/forms.ts
b/packages/web-util/src/forms/forms.ts
index 1759aa56e..e43459aa4 100644
--- a/packages/web-util/src/forms/forms.ts
+++ b/packages/web-util/src/forms/forms.ts
@@ -182,7 +182,7 @@ export function convertUiField(
type: config.type,
properties: {
...converBaseFieldsProps(i18n_, config),
- url: config.url
+ url: config.url,
},
};
return resp;
@@ -351,7 +351,7 @@ function converInputFieldsProps(
getConverterById: GetConverterById,
) {
const names = p.id.split(".");
- console.log("NAMES", names, getValueDeeper2(form, names), form)
+ // console.log("NAMES", names, getValueDeeper2(form, names), form)
return {
converter: getConverterById(p.converterId, p),
handler: getValueDeeper2(form, names),
diff --git a/packages/web-util/src/forms/ui-form.ts
b/packages/web-util/src/forms/ui-form.ts
index a3da71b32..ad5604ef7 100644
--- a/packages/web-util/src/forms/ui-form.ts
+++ b/packages/web-util/src/forms/ui-form.ts
@@ -19,7 +19,7 @@ import {
} from "@gnu-taler/taler-util";
import { InternationalizationAPI } from "../index.browser.js";
-export type FormConfiguration = DoubleColumnForm;
+export type FormConfiguration = DoubleColumnForm | SingleColumnForm;
export type DoubleColumnForm = {
type: "double-column";
@@ -27,6 +27,11 @@ export type DoubleColumnForm = {
// behavior?: (form: Partial<T>) => FormState<T>;
};
+export type SingleColumnForm = {
+ type: "single-column";
+ fields: UIFormElementConfig[];
+};
+
export type DoubleColumnFormSection = {
title: string;
description?: string;
@@ -352,10 +357,17 @@ const codecForDoubleColumnForm = ():
Codec<DoubleColumnForm> =>
.property("design", codecForList(codecForDoubleColumnFormSection()))
.build("DoubleColumnForm");
+const codecForSingleColumnForm = (): Codec<SingleColumnForm> =>
+ buildCodecForObject<SingleColumnForm>()
+ .property("type", codecForConstString("single-column"))
+ .property("fields", codecForList(codecForUiFormField()))
+ .build("SingleColumnForm");
+
const codecForFormConfiguration = (): Codec<FormConfiguration> =>
buildCodecForUnion<FormConfiguration>()
.discriminateOn("type")
.alternative("double-column", codecForDoubleColumnForm())
+ .alternative("single-column", codecForSingleColumnForm())
.build<FormConfiguration>("FormConfiguration");
const codecForFormMetadata = (): Codec<FormMetadata> =>
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5e5c95948..91d571cde 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -535,6 +535,9 @@ importers:
'@gnu-taler/web-util':
specifier: workspace:*
version: link:../web-util
+ date-fns:
+ specifier: 2.29.3
+ version: 2.29.3
preact:
specifier: 10.11.3
version: 10.11.3
@@ -5645,7 +5648,7 @@ packages:
resolution: {integrity:
sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==}
engines: {node: '>= 4.0'}
os: [darwin]
- deprecated: Upgrade to fsevents v2 to mitigate potential security issues
+ deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade
to safe fsevents v2
fsevents@2.3.3:
resolution: {integrity:
sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (8090d2f1f -> df3f80c2e),
gnunet <=