gana

GNUnet Assigned Numbers Authority
Log | Files | Refs | README | LICENSE

commit 0a763e53a0190c0c11c8c03b25e2dc435fcba2a7
parent 5cb35eeab3382fcccebe802968cb5488962d0b25
Author: Florian Dold <florian@dold.me>
Date:   Sat, 22 Mar 2025 16:30:01 +0100

put all form attributes in one namespace

Diffstat:
Mgnu-taler-form-attributes/Makefile | 40++--------------------------------------
Mgnu-taler-form-attributes/registry.rec | 18+++++++-----------
Mgnu-taler-form-attributes/ts.header | 12+++++-------
Mgnu-taler-form-attributes/ts.template | 5+----
4 files changed, 15 insertions(+), 60 deletions(-)

diff --git a/gnu-taler-form-attributes/Makefile b/gnu-taler-form-attributes/Makefile @@ -2,32 +2,6 @@ FILES=taler_form_attributes.ts \ taler_form_attributes.json \ taler_form_attributes.rst -FORMS=VQF_902_1 \ - VQF_902_11 \ - VQF_902_12 \ - VQF_902_12_beneficiary \ - VQF_902_12_founder \ - VQF_902_12_pre \ - VQF_902_12_representative \ - VQF_902_13 \ - VQF_902_13_beneficiary \ - VQF_902_13_further \ - VQF_902_13_pre \ - VQF_902_13_protector \ - VQF_902_13_settlor \ - VQF_902_14 \ - VQF_902_15 \ - VQF_902_1_founder \ - VQF_902_4 \ - VQF_902_5 \ - VQF_902_9 \ - FormMetadata \ - VQF_902_9_identity \ - GLS_Onboarding \ - GLS_BusinessRepresentative \ - AccountProperties - - all: check $(FILES) check: registry.rec @@ -41,12 +15,7 @@ clean: taler_form_attributes.ts.tmp: registry.rec ts.template ts.form-header ts.form-footer /usr/bin/truncate --size 0 $@ - - for FORM in $(FORMS); do \ - echo Name: $$FORM | recfmt -f ts.form-header >> $@; \ - ../format.sh ts.template 'Form = "'$$FORM'"' < registry.rec >> $@; \ - cat ts.form-footer >> $@; \ - done + ../format.sh ts.template < registry.rec >> $@ taler_form_attributes.ts: ts.header taler_form_attributes.ts.tmp ts.footer @@ -55,12 +24,7 @@ taler_form_attributes.ts: ts.header taler_form_attributes.ts.tmp ts.footer taler_form_attributes.json.tmp: registry.rec json.template json.form-header json.form-footer /usr/bin/truncate --size 0 $@ - - for FORM in $(FORMS); do \ - echo Name: $$FORM | recfmt -f json.form-header >> $@; \ - ../format.sh json.template 'Form = "'$$FORM'"' < registry.rec >> $@; \ - cat json.form-footer >> $@; \ - done + ../format.sh json.template < registry.rec >> $@ taler_form_attributes.json: json.header taler_form_attributes.json.tmp json.footer diff --git a/gnu-taler-form-attributes/registry.rec b/gnu-taler-form-attributes/registry.rec @@ -1,6 +1,6 @@ # -*- mode: rec -*- # -# Registry for GNU Taler attributes, as per Design document 31 +# Registry for GNU Taler form attributes # %rec: TalerAttributes %unique: Identifier @@ -16,10 +16,6 @@ %typedef: Type_t regexp !^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_'][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789 \[\]|:\.,'-/]*$! # Define for which form this form's field belongs %mandatory: Form -# True if a form submission should always contain a value. -%allowed: Required -%type: Required Required_t -%typedef: Required_t regexp /^(true|false)*$/ # Description of the usage of the field %allowed: Description %type: Description Description_t @@ -204,19 +200,19 @@ Form: VQF_902_1 # Information of the founders # Founders are natural persons who establish the business for legal entities and partnerships -Identifier: FOUNDER_LIST +Identifier: ESTABLISHER_LIST Type: Form<VQF_902_1_founder>[] -Form: VQF_902_1 +Form: vqf_902_1_customer Description: List of founder with the fields below. #Required: true -Identifier: FOUNDER_FULL_NAME +Identifier: FULL_NAME Type: String -Form: VQF_902_1_founder -#Required: true +Form: vqf_establisher -Identifier: FOUNDER_RESIDENTIAL_ADDRESS +Identifier: DOMICILE_ADDRESS Type: ResidentialAddress +Description: Domicile address. A domicile is a place where you live, an address is just a place where you receive mail. A residential address is somewhere you live but not necessarily your primary place. Form: VQF_902_1_founder #Required: true diff --git a/gnu-taler-form-attributes/ts.header b/gnu-taler-form-attributes/ts.header @@ -20,12 +20,10 @@ Note: the LGPL does not apply to all components of GNU Taler, but it does apply to this file. */ -import { UIHandlerId } from "@gnu-taler/web-util/browser"; - -type FormFieldInfo = { - id: UIHandlerId; - description: String; -} +/** + * Imports. + */ +import { UIHandlerId } from "@gnu-taler/web-util/browser"; -export namespace TalerFormAttributes { +export const TalerFormAttributes = { diff --git a/gnu-taler-form-attributes/ts.template b/gnu-taler-form-attributes/ts.template @@ -3,7 +3,4 @@ * * GANA Type: {{Type}} */ - {{Identifier}}: { - id: "{{Identifier}}" as UIHandlerId, - description: "{{Description}}", - } as FormFieldInfo, + {{Identifier}}: "{{Identifier}}" as UIHandlerId,