[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-typescript-core] branch master updated: fix gls form and imports
From: |
gnunet |
Subject: |
[taler-typescript-core] branch master updated: fix gls form and imports |
Date: |
Tue, 28 Jan 2025 20:46:26 +0100 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository taler-typescript-core.
The following commit(s) were added to refs/heads/master by this push:
new 8b20b4696 fix gls form and imports
8b20b4696 is described below
commit 8b20b46960067edf8c12616d026e3f93fbe70c5c
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Tue Jan 28 16:45:17 2025 -0300
fix gls form and imports
---
packages/web-util/src/components/Button.tsx | 10 +-
packages/web-util/src/forms/gana/GLS_Onboarding.ts | 225 +++++++++++++++++++--
packages/web-util/src/forms/gana/VQF_902_1.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_11.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_12.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_13.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_14.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_15.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_4.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_5.ts | 2 +-
packages/web-util/src/forms/gana/VQF_902_9.ts | 2 +-
.../src/forms/gana/taler_form_attributes.ts | 38 +++-
packages/web-util/src/hooks/useForm.ts | 5 +-
13 files changed, 248 insertions(+), 48 deletions(-)
diff --git a/packages/web-util/src/components/Button.tsx
b/packages/web-util/src/components/Button.tsx
index c45aeb752..18047418e 100644
--- a/packages/web-util/src/components/Button.tsx
+++ b/packages/web-util/src/components/Button.tsx
@@ -15,23 +15,15 @@
*/
import {
- AbsoluteTime,
OperationAlternative,
OperationFail,
OperationOk,
OperationResult,
- TalerError,
TranslatedString,
} from "@gnu-taler/taler-util";
-// import { NotificationMessage, notifyInfo } from
"@gnu-taler/web-util/browser";
import { Fragment, VNode, h } from "preact";
import { HTMLAttributes, useState } from "preact/compat";
-import {
- NotificationMessage,
- buildUnifiedRequestErrorMessage,
- notifyInfo,
- useTranslationContext,
-} from "../index.browser.js";
+import { useTranslationContext } from "../index.browser.js";
// import { useBankCoreApiContext } from "../context/config.js";
// function errorMap<T extends OperationFail<unknown>>(resp: T, map: (d:
T["case"]) => TranslatedString): void {
diff --git a/packages/web-util/src/forms/gana/GLS_Onboarding.ts
b/packages/web-util/src/forms/gana/GLS_Onboarding.ts
index 1af963762..8e8d7c479 100644
--- a/packages/web-util/src/forms/gana/GLS_Onboarding.ts
+++ b/packages/web-util/src/forms/gana/GLS_Onboarding.ts
@@ -1,9 +1,9 @@
import {
+ DoubleColumnFormDesign,
InternationalizationAPI,
UIHandlerId,
- SelectUiChoice,
- DoubleColumnFormDesign,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
+import { countryList } from "./VQF_902_1.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function GLS_Onboarding(
@@ -17,7 +17,7 @@ export function GLS_Onboarding(
fields: [
{
id: "PERSON_FULL_NAME" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
- label: i18n.str`Fullname`,
+ label: i18n.str`Full name`,
// gana_type: "String",
type: "text",
},
@@ -29,31 +29,34 @@ export function GLS_Onboarding(
required: true,
},
{
- id: "PERSON_LAST_NAME" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
- label: i18n.str`Last name`,
+ id: "PERSON_NATIONAL_ID" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`National ID Number`,
// gana_type: "String",
type: "text",
required: true,
},
{
- id: "PERSON_NATIONAL_ID" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
- label: i18n.str`National ID Number`,
- // gana_type: "String",
- type: "text",
+ id: "PERSON_NATIONAL_ID_SCAN" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`National ID Photo`,
+ // gana_type: "File",
+ type: "file",
required: true,
},
{
id: "PERSON_DATE_OF_BIRTH" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
label: i18n.str`Date of birth`,
- // gana_type: "String",
- type: "text",
+ // gana_type: "AbsoluteDate",
+ type: "absoluteTimeText",
+ placeholder: "dd/MM/yyyy",
+ pattern: "dd/MM/yyyy",
required: true,
},
{
- id: "PERSON_NATIONAL_ID_SCAN" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
- label: i18n.str`National ID Photo`,
- // gana_type: "File",
- type: "file",
+ id: "PERSON_NATIONALITY" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Nationality`,
+ // gana_type: "CountryCode",
+ type: "selectOne",
+ choices: countryList(i18n),
required: true,
},
],
@@ -68,6 +71,104 @@ export function GLS_Onboarding(
type: "text",
required: true,
},
+ {
+ id: "BUSINESS_TYPE" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Business type`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "BUSINESS_REGISTRATION_ID" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Registration ID`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "BUSINESS_LEGAL_JURISDICTION" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Legal jurisdiction`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "BUSINESS_REGISTRATION_DATE" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Registration date`,
+ // gana_type: "AbsoluteDate",
+ type: "absoluteTimeText",
+ placeholder: "dd/MM/yyyy",
+ pattern: "dd/MM/yyyy",
+ required: true,
+ },
+ {
+ id: "BUSINESS_IS_NON_PROFIT" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Is non profit?`,
+ // gana_type: "Boolean",
+ type: "toggle",
+ required: true,
+ },
+ {
+ id: "BUSINESS_INDUSTRY" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Industry`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "BUSINESS_LEGAL_REPRESENTATIVES" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Legal representatives`,
+ // gana_type: "GLS_BusinessRepresentative[]",
+ type: "array",
+ labelFieldId: "asd" as UIHandlerId,
+ fields: [
+ {
+ id: "GLS_REPRESENTATIVE_FULL_NAME" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`Full name`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "GLS_REPRESENTATIVE_LAST_NAME" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`Last name`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "GLS_REPRESENTATIVE_DATE_OF_BIRTH" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`Date of birth`,
+ // gana_type: "AbsoluteDate",
+ type: "absoluteTimeText",
+ placeholder: "dd/MM/yyyy",
+ pattern: "dd/MM/yyyy",
+ required: true,
+ },
+ {
+ id: "GLS_REPRESENTATIVE_NATIONALITY" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`Nationality`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "GLS_REPRESENTATIVE_NATIONAL_ID" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`National ID number`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "GLS_REPRESENTATIVE_NATIONAL_ID_SCAN" satisfies keyof
TalerFormAttributes.GLS_BusinessRepresentative as UIHandlerId,
+ label: i18n.str`National ID photo`,
+ // gana_type: "File",
+ type: "file",
+ required: true,
+ },
+ ],
+ required: true,
+ },
],
},
{
@@ -83,14 +184,14 @@ export function GLS_Onboarding(
{
id: "CONTACT_WEB_DOMAIN" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
label: i18n.str`Web site`,
- // gana_type: "Hostname",
+ // gana_type: "HttpHostnamePath",
type: "text",
required: true,
},
{
id: "CONTACT_EMAIL" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
label: i18n.str`Email`,
- // gana_type: "Hostname",
+ // gana_type: "Email",
type: "text",
required: true,
},
@@ -109,13 +210,70 @@ export function GLS_Onboarding(
{
id: "ADDRESS_COUNTRY" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
label: i18n.str`Country`,
+ // gana_type: "CountryCode",
+ type: "selectOne",
+ choices: countryList(i18n),
+ required: true,
+ },
+ {
+ id: "ADDRESS_COUNTRY_SUBDIVISION" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Country subdivision`,
// gana_type: "Hostname",
type: "text",
required: true,
},
{
id: "ADDRESS_STREET_NAME" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
- label: i18n.str`Street`,
+ label: i18n.str`Street name`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_STREET_NUMBER" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Street number`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_LINES" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Street lines`,
+ // gana_type: "String",
+ type: "textArea",
+ required: true,
+ },
+ {
+ id: "ADDRESS_BUILDING_NAME" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Building name`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_BUILDING_NUMBER" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Building number`,
+ // gana_type: "String",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_ZIPCODE" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Zipcode`,
+ // gana_type: "Hostname",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_TOWN_LOCATION" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Town location`,
+ // gana_type: "Hostname",
+ type: "text",
+ required: true,
+ },
+ {
+ id: "ADDRESS_TOWN_DISTRICT" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`Town district`,
// gana_type: "Hostname",
type: "text",
required: true,
@@ -128,8 +286,9 @@ export function GLS_Onboarding(
{
id: "TAX_COUNTRY" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
label: i18n.str`Country`,
- // gana_type: "Hostname",
- type: "text",
+ // gana_type: "CountryCode",
+ type: "selectOne",
+ choices: countryList(i18n),
required: true,
},
{
@@ -139,6 +298,30 @@ export function GLS_Onboarding(
type: "text",
required: true,
},
+ {
+ id: "TAX_IS_USA_LAW" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`under USA law?`,
+ help: i18n.str`wurde die gesellschaft in den USA oder nach
US-Recht gergrudent`,
+ // gana_type: "Boolean",
+ type: "toggle",
+ required: true,
+ },
+ {
+ id: "TAX_IS_ACTIVE" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`is economically active?`,
+ help: i18n.str`wirtschaftlich aktiv oder passiv`,
+ // gana_type: "Boolean",
+ type: "toggle",
+ required: true,
+ },
+ {
+ id: "TAX_IS_DEDUCTED" satisfies keyof
TalerFormAttributes.GLS_Onboarding as UIHandlerId,
+ label: i18n.str`entitled to deduct tax?`,
+ help: i18n.str`sind sie vorsteuerabzugsberechtigt`,
+ // gana_type: "Boolean",
+ type: "toggle",
+ required: true,
+ },
],
},
],
diff --git a/packages/web-util/src/forms/gana/VQF_902_1.ts
b/packages/web-util/src/forms/gana/VQF_902_1.ts
index 9293ef1ba..cc341d054 100644
--- a/packages/web-util/src/forms/gana/VQF_902_1.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_1.ts
@@ -3,7 +3,7 @@ import {
UIHandlerId,
SelectUiChoice,
DoubleColumnFormDesign,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function countryList(i18n: InternationalizationAPI): SelectUiChoice[] {
diff --git a/packages/web-util/src/forms/gana/VQF_902_11.ts
b/packages/web-util/src/forms/gana/VQF_902_11.ts
index 91ca694b9..b2b2c3982 100644
--- a/packages/web-util/src/forms/gana/VQF_902_11.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_11.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function VQF_902_11(
diff --git a/packages/web-util/src/forms/gana/VQF_902_12.ts
b/packages/web-util/src/forms/gana/VQF_902_12.ts
index d4b19fdcd..871a71cf8 100644
--- a/packages/web-util/src/forms/gana/VQF_902_12.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_12.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
import { countryList } from "./VQF_902_1.js";
diff --git a/packages/web-util/src/forms/gana/VQF_902_13.ts
b/packages/web-util/src/forms/gana/VQF_902_13.ts
index b40eb6b51..eac461ef3 100644
--- a/packages/web-util/src/forms/gana/VQF_902_13.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_13.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
import { countryList } from "./VQF_902_1.js";
diff --git a/packages/web-util/src/forms/gana/VQF_902_14.ts
b/packages/web-util/src/forms/gana/VQF_902_14.ts
index f93bdebec..35166905b 100644
--- a/packages/web-util/src/forms/gana/VQF_902_14.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_14.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function VQF_902_14(
diff --git a/packages/web-util/src/forms/gana/VQF_902_15.ts
b/packages/web-util/src/forms/gana/VQF_902_15.ts
index 6f53eeeaa..ede0f5945 100644
--- a/packages/web-util/src/forms/gana/VQF_902_15.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_15.ts
@@ -2,7 +2,7 @@ import {
DoubleColumnFormDesign,
InternationalizationAPI,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
import { countryList } from "./VQF_902_1.js";
diff --git a/packages/web-util/src/forms/gana/VQF_902_4.ts
b/packages/web-util/src/forms/gana/VQF_902_4.ts
index a843fe021..8c1d45ace 100644
--- a/packages/web-util/src/forms/gana/VQF_902_4.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_4.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function VQF_902_4(
diff --git a/packages/web-util/src/forms/gana/VQF_902_5.ts
b/packages/web-util/src/forms/gana/VQF_902_5.ts
index f68e2f9cc..c2e2e1485 100644
--- a/packages/web-util/src/forms/gana/VQF_902_5.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_5.ts
@@ -2,7 +2,7 @@ import {
DoubleColumnFormDesign,
InternationalizationAPI,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
export function VQF_902_5(
diff --git a/packages/web-util/src/forms/gana/VQF_902_9.ts
b/packages/web-util/src/forms/gana/VQF_902_9.ts
index 9380de2eb..cbab148ef 100644
--- a/packages/web-util/src/forms/gana/VQF_902_9.ts
+++ b/packages/web-util/src/forms/gana/VQF_902_9.ts
@@ -2,7 +2,7 @@ import {
InternationalizationAPI,
DoubleColumnFormDesign,
UIHandlerId,
-} from "@gnu-taler/web-util/browser";
+} from "../../index.browser.js";
import { TalerFormAttributes } from "./taler_form_attributes.js";
import { countryList } from "./VQF_902_1.js";
diff --git a/packages/web-util/src/forms/gana/taler_form_attributes.ts
b/packages/web-util/src/forms/gana/taler_form_attributes.ts
index 3fb8401c2..42cca198a 100644
--- a/packages/web-util/src/forms/gana/taler_form_attributes.ts
+++ b/packages/web-util/src/forms/gana/taler_form_attributes.ts
@@ -1257,11 +1257,6 @@ export namespace TalerFormAttributes {
* Required: false
*/
CONTACT_WEB_DOMAIN?: HttpHostnamePath;
- /**
- * List of natural persons that are legal representatives or shareholders.
- * Required: false
- */
- PERSON_BUSINESS_REPRESENTATIVE_TYPE?: GLS_BusinessRepresentative[];
/**
* Date of birth of an individual. Format is YYYY-MM-DD.
* Required: false
@@ -1318,7 +1313,38 @@ export namespace TalerFormAttributes {
*/
TAX_IS_USA_LAW?: Boolean;
}
- export interface GLS_BusinessRepresentative {}
+ export interface GLS_BusinessRepresentative {
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_DATE_OF_BIRTH?: AbsoluteDate;
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_FULL_NAME?: String;
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_LAST_NAME?: String;
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_NATIONALITY?: CountryCode;
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_NATIONAL_ID?: String;
+ /**
+ *
+ * Required: false
+ */
+ GLS_REPRESENTATIVE_NATIONAL_ID_SCAN?: File;
+ }
export interface AccountProperties {
/**
* Business domain of the account owner.
diff --git a/packages/web-util/src/hooks/useForm.ts
b/packages/web-util/src/hooks/useForm.ts
index b96387b6b..ca12defbf 100644
--- a/packages/web-util/src/hooks/useForm.ts
+++ b/packages/web-util/src/hooks/useForm.ts
@@ -21,13 +21,12 @@ import {
TalerExchangeApi,
TranslatedString,
} from "@gnu-taler/taler-util";
+import { useState } from "preact/hooks";
import {
FormDesign,
UIFieldHandler,
UIFormElementConfig,
- UIHandlerId,
-} from "@gnu-taler/web-util/browser";
-import { useEffect, useState } from "preact/hooks";
+} from "../index.browser.js";
export type FormHandler<T> = {
[k in keyof T]?: T[k] extends string
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-typescript-core] branch master updated: fix gls form and imports,
gnunet <=