@uides/stepwise 2.0.0-a594a958 → 2.0.0-a64dc016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +0 -0
- package/generators/componentExtractor.d.mts +1 -0
- package/generators/componentReducer.d.mts +1 -0
- package/generators/templateGenerator.d.mts +1 -0
- package/index.d.ts +2 -0
- package/index.js +7 -0
- package/package.json +6 -21
- package/schemas/action.d.ts +2366 -0
- package/schemas/action.js +196 -0
- package/schemas/application.d.ts +19 -0
- package/schemas/application.js +14 -0
- package/schemas/attributes.d.ts +16 -0
- package/schemas/attributes.js +14 -0
- package/schemas/common.d.ts +25 -0
- package/schemas/common.js +41 -0
- package/schemas/document.d.ts +395 -0
- package/schemas/document.js +79 -0
- package/schemas/edupass-healthstate.d.ts +77 -0
- package/schemas/edupass-healthstate.js +76 -0
- package/schemas/field/afm/index.d.ts +52 -0
- package/schemas/field/afm/index.js +20 -0
- package/schemas/field/amka/index.d.ts +60 -0
- package/schemas/field/amka/index.js +21 -0
- package/schemas/field/attachment/index.d.ts +68 -0
- package/schemas/field/attachment/index.js +38 -0
- package/schemas/field/captcha/index.d.ts +48 -0
- package/schemas/field/captcha/index.js +15 -0
- package/schemas/field/choice/index.d.ts +73 -0
- package/schemas/field/choice/index.js +32 -0
- package/schemas/field/common.d.ts +82 -0
- package/schemas/field/common.js +63 -0
- package/schemas/field/consent-content/index.d.ts +68 -0
- package/schemas/field/consent-content/index.js +19 -0
- package/schemas/field/date/index.d.ts +90 -0
- package/schemas/field/date/index.js +42 -0
- package/schemas/field/doc_subtitle/index.d.ts +51 -0
- package/schemas/field/doc_subtitle/index.js +14 -0
- package/schemas/field/doc_title/index.d.ts +60 -0
- package/schemas/field/doc_title/index.js +21 -0
- package/schemas/field/dynamically-filled-text/index.d.ts +85 -0
- package/schemas/field/dynamically-filled-text/index.js +36 -0
- package/schemas/field/email/index.d.ts +60 -0
- package/schemas/field/email/index.js +21 -0
- package/schemas/field/fillable-string/index.d.ts +64 -0
- package/schemas/field/fillable-string/index.js +25 -0
- package/schemas/field/five-block-date/index.d.ts +48 -0
- package/schemas/field/five-block-date/index.js +15 -0
- package/schemas/field/hidden/index.d.ts +59 -0
- package/schemas/field/hidden/index.js +25 -0
- package/schemas/field/hierarchical-selector/index.d.ts +89 -0
- package/schemas/field/hierarchical-selector/index.js +35 -0
- package/schemas/field/iban/index.d.ts +58 -0
- package/schemas/field/iban/index.js +19 -0
- package/schemas/field/image/index.d.ts +68 -0
- package/schemas/field/image/index.js +36 -0
- package/schemas/field/image-crop/index.d.ts +59 -0
- package/schemas/field/image-crop/index.js +19 -0
- package/schemas/field/index.d.ts +48 -0
- package/schemas/field/index.js +167 -0
- package/schemas/field/int/index.d.ts +60 -0
- package/schemas/field/int/index.js +21 -0
- package/schemas/field/intl_mobile_phone/index.d.ts +49 -0
- package/schemas/field/intl_mobile_phone/index.js +15 -0
- package/schemas/field/lab-results/index.d.ts +49 -0
- package/schemas/field/lab-results/index.js +12 -0
- package/schemas/field/landline_phone/index.d.ts +48 -0
- package/schemas/field/landline_phone/index.js +14 -0
- package/schemas/field/link/index.d.ts +50 -0
- package/schemas/field/link/index.js +16 -0
- package/schemas/field/mobile_phone/index.d.ts +51 -0
- package/schemas/field/mobile_phone/index.js +18 -0
- package/schemas/field/multiple-choice/index.d.ts +70 -0
- package/schemas/field/multiple-choice/index.js +31 -0
- package/schemas/field/password/index.d.ts +48 -0
- package/schemas/field/password/index.js +15 -0
- package/schemas/field/pdf-image/index.d.ts +66 -0
- package/schemas/field/pdf-image/index.js +27 -0
- package/schemas/field/phone/index.d.ts +48 -0
- package/schemas/field/phone/index.js +14 -0
- package/schemas/field/postal_code/index.d.ts +50 -0
- package/schemas/field/postal_code/index.js +17 -0
- package/schemas/field/preference-multiple-choice/index.d.ts +90 -0
- package/schemas/field/preference-multiple-choice/index.js +31 -0
- package/schemas/field/qrcode/index.d.ts +71 -0
- package/schemas/field/qrcode/index.js +30 -0
- package/schemas/field/quote/index.d.ts +63 -0
- package/schemas/field/quote/index.js +30 -0
- package/schemas/field/radio-choice/index.d.ts +67 -0
- package/schemas/field/radio-choice/index.js +31 -0
- package/schemas/field/rate/index.d.ts +60 -0
- package/schemas/field/rate/index.js +18 -0
- package/schemas/field/recipient/index.d.ts +51 -0
- package/schemas/field/recipient/index.js +20 -0
- package/schemas/field/redirect/index.d.ts +52 -0
- package/schemas/field/redirect/index.js +15 -0
- package/schemas/field/refcode/index.d.ts +68 -0
- package/schemas/field/refcode/index.js +29 -0
- package/schemas/field/string/index.d.ts +135 -0
- package/schemas/field/string/index.js +80 -0
- package/schemas/field/text/index.d.ts +85 -0
- package/schemas/field/text/index.js +45 -0
- package/schemas/field/three-block-date/index.d.ts +64 -0
- package/schemas/field/three-block-date/index.js +26 -0
- package/schemas/field/url-param/index.d.ts +57 -0
- package/schemas/field/url-param/index.js +14 -0
- package/schemas/fieldset/component-params.d.ts +102 -0
- package/schemas/fieldset/component-params.js +63 -0
- package/schemas/fieldset/display-components.d.ts +353 -0
- package/schemas/fieldset/display-components.js +36 -0
- package/schemas/fieldset/enums.d.ts +32 -0
- package/schemas/fieldset/enums.js +21 -0
- package/schemas/fieldset/index.d.ts +180 -0
- package/schemas/fieldset/index.js +11 -0
- package/schemas/index.d.ts +15 -0
- package/schemas/index.js +15 -0
- package/schemas/layout.d.ts +91 -0
- package/schemas/layout.js +43 -0
- package/schemas/outputs.d.ts +44 -0
- package/schemas/outputs.js +15 -0
- package/schemas/resolve.d.ts +5 -0
- package/schemas/resolve.js +13 -0
- package/schemas/resource/enums.d.ts +58 -0
- package/schemas/resource/enums.js +41 -0
- package/schemas/resource/field.d.ts +15 -0
- package/schemas/resource/field.js +12 -0
- package/schemas/resource/index.d.ts +5 -0
- package/schemas/resource/index.js +5 -0
- package/schemas/resource/object-action.d.ts +30 -0
- package/schemas/resource/object-action.js +24 -0
- package/schemas/resource/resource-action.d.ts +35 -0
- package/schemas/resource/resource-action.js +29 -0
- package/schemas/resource/resource.d.ts +133 -0
- package/schemas/resource/resource.js +31 -0
- package/schemas/step.d.ts +592 -0
- package/schemas/step.js +115 -0
- package/schemas/template/index.d.ts +2 -0
- package/schemas/template/index.js +2 -0
- package/schemas/template/template-base.d.ts +53 -0
- package/schemas/template/template-base.js +15 -0
- package/schemas/template/template-source.d.ts +50 -0
- package/schemas/template/template-source.js +14 -0
- package/schemas/template/template.d.ts +54 -0
- package/schemas/template/template.js +22 -0
- package/schemas/validation-context/enums.d.ts +10 -0
- package/schemas/validation-context/enums.js +7 -0
- package/schemas/validation-context/index.d.ts +2 -0
- package/schemas/validation-context/index.js +2 -0
- package/schemas/validation-context/validation-context.d.ts +131 -0
- package/schemas/validation-context/validation-context.js +55 -0
- package/src/schemas/action.ts +15 -0
- package/src/schemas/common.ts +16 -0
- package/src/schemas/field/afm/index.ts +2 -18
- package/src/schemas/field/amka/index.ts +7 -2
- package/src/schemas/field/attachment/index.ts +12 -24
- package/src/schemas/field/choice/index.ts +2 -13
- package/src/schemas/field/common.ts +75 -51
- package/src/schemas/field/consent-content/index.ts +28 -0
- package/src/schemas/field/date/index.ts +5 -32
- package/src/schemas/field/doc_subtitle/index.ts +1 -0
- package/src/schemas/field/doc_title/index.ts +9 -16
- package/src/schemas/field/dynamically-filled-text/index.ts +4 -5
- package/src/schemas/field/email/index.ts +6 -9
- package/src/schemas/field/fillable-string/index.ts +1 -1
- package/src/schemas/field/hidden/index.ts +4 -43
- package/src/schemas/field/hierarchical-selector/index.ts +3 -9
- package/src/schemas/field/image/index.ts +5 -24
- package/src/schemas/field/image-crop/index.ts +25 -0
- package/src/schemas/field/index.spec.ts +0 -42
- package/src/schemas/field/index.ts +64 -12
- package/src/schemas/field/int/index.ts +2 -0
- package/src/schemas/field/intl_mobile_phone/index.ts +19 -0
- package/src/schemas/field/lab-results/index.ts +1 -2
- package/src/schemas/field/link/index.ts +20 -0
- package/src/schemas/field/mobile_phone/index.ts +1 -12
- package/src/schemas/field/multiple-choice/index.ts +4 -3
- package/src/schemas/field/password/index.ts +18 -0
- package/src/schemas/field/pdf-image/index.ts +3 -15
- package/src/schemas/field/phone/index.ts +18 -0
- package/src/schemas/field/postal_code/index.ts +1 -1
- package/src/schemas/field/preference-multiple-choice/index.ts +41 -0
- package/src/schemas/field/qrcode/index.ts +1 -0
- package/src/schemas/field/quote/index.ts +2 -19
- package/src/schemas/field/radio-choice/index.ts +1 -7
- package/src/schemas/field/rate/index.ts +1 -9
- package/src/schemas/field/recipient/index.ts +2 -2
- package/src/schemas/field/redirect/index.ts +4 -13
- package/src/schemas/field/refcode/index.ts +10 -15
- package/src/schemas/field/string/index.ts +13 -0
- package/src/schemas/field/text/index.ts +4 -18
- package/src/schemas/field/url-param/index.ts +23 -0
- package/src/schemas/resolve.ts +3 -0
- package/src/schemas/step.ts +2 -0
- package/src/schemas/template/index.ts +0 -1
- package/src/schemas/template/template-base.ts +0 -10
- package/src/schemas/template/template.ts +1 -2
- package/src/schemas/validation-context/enums.ts +0 -16
- package/src/schemas/validation-context/validation-context.ts +2 -4
- package/src/utils/index.ts +10 -1
- package/utils/index.d.ts +6 -0
- package/utils/index.js +55 -0
- package/.prettierrc.js +0 -1
- package/.rush/temp/chunked-rush-logs/stepwise.build.chunks.jsonl +0 -6
- package/.rush/temp/package-deps_build.json +0 -185
- package/.rush/temp/shrinkwrap-deps.json +0 -303
- package/eslint.config.mjs +0 -3
- package/rush-logs/stepwise.build.log +0 -6
- package/src/schemas/field/green-pass-qrcode/index.ts +0 -27
- package/src/schemas/template/enums.ts +0 -22
- package/tsconfig.json +0 -25
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export * from './enums.js';
|
|
2
|
+
export * from './component-params.js';
|
|
3
|
+
export * from './display-components.js';
|
|
4
|
+
import * as v from 'valibot';
|
|
5
|
+
/**
|
|
6
|
+
* A set of fields
|
|
7
|
+
*
|
|
8
|
+
* In order to show fields in the UI, they must be grouped in a fieldset. This may be done,
|
|
9
|
+
* by adding the field names in the `field-order` property of the fieldset.
|
|
10
|
+
*/
|
|
11
|
+
export declare const FieldsetSchema: v.StrictObjectSchema<{
|
|
12
|
+
readonly 'field-order': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
13
|
+
readonly display: v.NullishSchema<v.UnionSchema<[v.LooseObjectSchema<{
|
|
14
|
+
readonly default: v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
15
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
16
|
+
readonly component: v.PicklistSchema<["values-list", "hidden", "form"], undefined>;
|
|
17
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
18
|
+
readonly page_break: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
19
|
+
readonly sticky_title: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
20
|
+
readonly multiplicity: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
21
|
+
readonly multiplicityLabels: v.NullishSchema<v.StrictObjectSchema<{
|
|
22
|
+
readonly addTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
23
|
+
readonly editTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
24
|
+
readonly addItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly removeItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
26
|
+
readonly editItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
27
|
+
readonly submitAdd: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
28
|
+
readonly submitEdit: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
29
|
+
readonly cancel: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
30
|
+
readonly empty: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
31
|
+
readonly emptyValueDisplay: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
32
|
+
}, undefined>, undefined>;
|
|
33
|
+
readonly required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
34
|
+
readonly fixed: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
35
|
+
readonly layout: v.NullishSchema<v.PicklistSchema<["entry", "card"], undefined>, undefined>;
|
|
36
|
+
readonly lines: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["no", "grid", "outer", "grid-round", "outer-round"], undefined>, undefined>, undefined>;
|
|
37
|
+
readonly table_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["LEFT", "CENTER", "RIGHT"], undefined>, undefined>, undefined>;
|
|
38
|
+
readonly table_width_ratio: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
39
|
+
readonly cell_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["left", "center", "right"], undefined>, undefined>, undefined>;
|
|
40
|
+
readonly cell_valign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["BOTTOM", "MIDDLE", "TOP"], undefined>, undefined>, undefined>;
|
|
41
|
+
readonly cell_height: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
42
|
+
readonly auto_columns: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
43
|
+
readonly fontSize: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
44
|
+
readonly no_split: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
45
|
+
readonly spaceBefore: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
46
|
+
readonly spaceAfter: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
47
|
+
readonly omit_empty_values: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
48
|
+
readonly background: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
49
|
+
readonly coordinates: v.NullishSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
50
|
+
readonly mirrored: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
51
|
+
readonly handler: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
52
|
+
}, undefined>, undefined>;
|
|
53
|
+
readonly layout: v.NullishSchema<v.StrictObjectSchema<{
|
|
54
|
+
readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
55
|
+
readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
56
|
+
readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
57
|
+
readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
58
|
+
readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
59
|
+
readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
60
|
+
}, undefined>, undefined>;
|
|
61
|
+
}, undefined>, undefined>;
|
|
62
|
+
}, undefined>, v.LooseObjectSchema<{
|
|
63
|
+
readonly web: v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
64
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
65
|
+
readonly component: v.PicklistSchema<["values-list", "hidden", "form"], undefined>;
|
|
66
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
67
|
+
readonly page_break: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
68
|
+
readonly sticky_title: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
69
|
+
readonly multiplicity: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
70
|
+
readonly multiplicityLabels: v.NullishSchema<v.StrictObjectSchema<{
|
|
71
|
+
readonly addTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
72
|
+
readonly editTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
73
|
+
readonly addItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
74
|
+
readonly removeItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
75
|
+
readonly editItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
76
|
+
readonly submitAdd: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
readonly submitEdit: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
78
|
+
readonly cancel: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
79
|
+
readonly empty: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
80
|
+
readonly emptyValueDisplay: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
81
|
+
}, undefined>, undefined>;
|
|
82
|
+
readonly required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
83
|
+
readonly fixed: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
84
|
+
readonly layout: v.NullishSchema<v.PicklistSchema<["entry", "card"], undefined>, undefined>;
|
|
85
|
+
readonly lines: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["no", "grid", "outer", "grid-round", "outer-round"], undefined>, undefined>, undefined>;
|
|
86
|
+
readonly table_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["LEFT", "CENTER", "RIGHT"], undefined>, undefined>, undefined>;
|
|
87
|
+
readonly table_width_ratio: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
88
|
+
readonly cell_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["left", "center", "right"], undefined>, undefined>, undefined>;
|
|
89
|
+
readonly cell_valign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["BOTTOM", "MIDDLE", "TOP"], undefined>, undefined>, undefined>;
|
|
90
|
+
readonly cell_height: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
91
|
+
readonly auto_columns: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
92
|
+
readonly fontSize: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
93
|
+
readonly no_split: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
94
|
+
readonly spaceBefore: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
95
|
+
readonly spaceAfter: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
96
|
+
readonly omit_empty_values: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
97
|
+
readonly background: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
98
|
+
readonly coordinates: v.NullishSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
99
|
+
readonly mirrored: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
100
|
+
readonly handler: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
101
|
+
}, undefined>, undefined>;
|
|
102
|
+
readonly layout: v.NullishSchema<v.StrictObjectSchema<{
|
|
103
|
+
readonly grid: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
104
|
+
readonly xs: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
105
|
+
readonly sm: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
106
|
+
readonly md: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
107
|
+
readonly lg: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
108
|
+
readonly xl: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
109
|
+
}, undefined>, undefined>;
|
|
110
|
+
}, undefined>, undefined>;
|
|
111
|
+
}, undefined>, v.LooseObjectSchema<{
|
|
112
|
+
readonly pdf: v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.VariantSchema<"component", [v.StrictObjectSchema<{
|
|
113
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
114
|
+
readonly component: v.PicklistSchema<["values-list", "table", "one-liner-table", "signature", "footnotes", "hidden", "custom"], undefined>;
|
|
115
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
116
|
+
readonly page_break: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
117
|
+
readonly sticky_title: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
118
|
+
readonly multiplicity: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
119
|
+
readonly multiplicityLabels: v.NullishSchema<v.StrictObjectSchema<{
|
|
120
|
+
readonly addTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
121
|
+
readonly editTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
+
readonly addItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
123
|
+
readonly removeItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
124
|
+
readonly editItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
125
|
+
readonly submitAdd: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
126
|
+
readonly submitEdit: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
127
|
+
readonly cancel: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
128
|
+
readonly empty: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
129
|
+
readonly emptyValueDisplay: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
130
|
+
}, undefined>, undefined>;
|
|
131
|
+
readonly required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
132
|
+
readonly fixed: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
133
|
+
readonly layout: v.NullishSchema<v.PicklistSchema<["entry", "card"], undefined>, undefined>;
|
|
134
|
+
readonly lines: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["no", "grid", "outer", "grid-round", "outer-round"], undefined>, undefined>, undefined>;
|
|
135
|
+
readonly table_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["LEFT", "CENTER", "RIGHT"], undefined>, undefined>, undefined>;
|
|
136
|
+
readonly table_width_ratio: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
137
|
+
readonly cell_halign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["left", "center", "right"], undefined>, undefined>, undefined>;
|
|
138
|
+
readonly cell_valign: v.OptionalSchema<v.NullableSchema<v.PicklistSchema<["BOTTOM", "MIDDLE", "TOP"], undefined>, undefined>, undefined>;
|
|
139
|
+
readonly cell_height: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
140
|
+
readonly auto_columns: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
141
|
+
readonly fontSize: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
142
|
+
readonly no_split: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
143
|
+
readonly spaceBefore: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
144
|
+
readonly spaceAfter: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
145
|
+
readonly omit_empty_values: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
146
|
+
readonly background: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
147
|
+
readonly coordinates: v.NullishSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, undefined>;
|
|
148
|
+
readonly mirrored: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
149
|
+
readonly handler: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
150
|
+
}, undefined>, undefined>;
|
|
151
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
152
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
153
|
+
readonly component: v.PicklistSchema<["header", "common", "plain-text"], undefined>;
|
|
154
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
155
|
+
readonly page_break: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
156
|
+
readonly sticky_title: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
157
|
+
readonly multiplicity: v.NullishSchema<v.NumberSchema<undefined>, undefined>;
|
|
158
|
+
readonly multiplicityLabels: v.NullishSchema<v.StrictObjectSchema<{
|
|
159
|
+
readonly addTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
160
|
+
readonly editTitle: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
161
|
+
readonly addItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
162
|
+
readonly removeItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
163
|
+
readonly editItem: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
164
|
+
readonly submitAdd: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
165
|
+
readonly submitEdit: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
166
|
+
readonly cancel: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
167
|
+
readonly empty: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
168
|
+
readonly emptyValueDisplay: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
169
|
+
}, undefined>, undefined>;
|
|
170
|
+
readonly required: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
171
|
+
readonly fixed: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
172
|
+
readonly layout: v.NullishSchema<v.PicklistSchema<["entry", "card"], undefined>, undefined>;
|
|
173
|
+
}, undefined>, undefined>;
|
|
174
|
+
}, undefined>], undefined>, undefined>;
|
|
175
|
+
}, undefined>], undefined>, undefined>;
|
|
176
|
+
}, undefined>;
|
|
177
|
+
export type Fieldset = v.InferOutput<typeof FieldsetSchema>;
|
|
178
|
+
export default Fieldset;
|
|
179
|
+
export type Fieldsets = Record<string, Fieldset>;
|
|
180
|
+
export declare const FieldsetsSchema: v.GenericSchema<Fieldsets, Fieldsets>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldsetDisplaySchema } from "./display-components.js";
|
|
2
|
+
import { nullish, record, strictObject, string } from "valibot";
|
|
3
|
+
export * from "./enums.js";
|
|
4
|
+
export * from "./component-params.js";
|
|
5
|
+
export * from "./display-components.js";
|
|
6
|
+
const FieldsetSchema = strictObject({
|
|
7
|
+
'field-order': nullish(string()),
|
|
8
|
+
display: nullish(FieldsetDisplaySchema)
|
|
9
|
+
});
|
|
10
|
+
const FieldsetsSchema = record(string(), FieldsetSchema);
|
|
11
|
+
export { FieldsetSchema, FieldsetsSchema };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './field/index.js';
|
|
2
|
+
export * from './fieldset/index.js';
|
|
3
|
+
export * from './resource/index.js';
|
|
4
|
+
export * from './template/index.js';
|
|
5
|
+
export * from './validation-context/index.js';
|
|
6
|
+
export * from './action.js';
|
|
7
|
+
export * from './application.js';
|
|
8
|
+
export * from './attributes.js';
|
|
9
|
+
export * from './common.js';
|
|
10
|
+
export * from './document.js';
|
|
11
|
+
export * from './edupass-healthstate.js';
|
|
12
|
+
export * from './layout.js';
|
|
13
|
+
export * from './outputs.js';
|
|
14
|
+
export * from './resolve.js';
|
|
15
|
+
export * from './step.js';
|
package/schemas/index.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./field/index.js";
|
|
2
|
+
export * from "./fieldset/index.js";
|
|
3
|
+
export * from "./resource/index.js";
|
|
4
|
+
export * from "./template/index.js";
|
|
5
|
+
export * from "./validation-context/index.js";
|
|
6
|
+
export * from "./action.js";
|
|
7
|
+
export * from "./application.js";
|
|
8
|
+
export * from "./attributes.js";
|
|
9
|
+
export * from "./common.js";
|
|
10
|
+
export * from "./document.js";
|
|
11
|
+
export * from "./edupass-healthstate.js";
|
|
12
|
+
export * from "./layout.js";
|
|
13
|
+
export * from "./outputs.js";
|
|
14
|
+
export * from "./resolve.js";
|
|
15
|
+
export * from "./step.js";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Navigation action component type.
|
|
4
|
+
*
|
|
5
|
+
* @value 'back-button' Back button.
|
|
6
|
+
* @value 'entity-name' Entity name.
|
|
7
|
+
* @value 'button-link' Button link.
|
|
8
|
+
* @value 'entity-dashboard-link' Entity dashboard link.
|
|
9
|
+
* @value 'entity-new-case-button' Entity create document button.
|
|
10
|
+
* @value 'nav-group' Navigation group.
|
|
11
|
+
* @value 'nav-link' Navigation link.
|
|
12
|
+
* @value 'nav-info' Navigation info.
|
|
13
|
+
*/
|
|
14
|
+
export declare const NavActionComponentSchema: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
15
|
+
export type NavActionComponent = v.InferOutput<typeof NavActionComponentSchema>;
|
|
16
|
+
export declare const NavActionDisplaySchema: v.StrictObjectSchema<{
|
|
17
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
18
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
19
|
+
readonly 'component-params': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
20
|
+
}, undefined>;
|
|
21
|
+
export type NavActionDisplay = v.InferOutput<typeof NavActionDisplaySchema>;
|
|
22
|
+
export declare const NavActionSchema: v.StrictObjectSchema<{
|
|
23
|
+
readonly display: v.NullishSchema<v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
24
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
26
|
+
readonly 'component-params': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
27
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
export type NavAction = v.InferOutput<typeof NavActionSchema>;
|
|
30
|
+
export declare const NavActionGroupParamsSchema: v.StrictObjectSchema<{
|
|
31
|
+
readonly expanded: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
32
|
+
readonly 'match-paths': v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
export type NavActionGroupParams = v.InferOutput<typeof NavActionGroupParamsSchema>;
|
|
35
|
+
export declare const NavActionGroupDisplaySchema: v.StrictObjectSchema<{
|
|
36
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
37
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
38
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
39
|
+
readonly expanded: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
40
|
+
readonly 'match-paths': v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
41
|
+
}, undefined>, undefined>;
|
|
42
|
+
}, undefined>;
|
|
43
|
+
export type NavActionGroupDisplay = v.InferOutput<typeof NavActionGroupDisplaySchema>;
|
|
44
|
+
export declare const NavActionGroupSchema: v.StrictObjectSchema<{
|
|
45
|
+
readonly items: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
46
|
+
readonly display: v.NullishSchema<v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
47
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
48
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
49
|
+
readonly 'component-params': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
50
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
51
|
+
}, undefined>, undefined>;
|
|
52
|
+
readonly 'item-order': v.StringSchema<undefined>;
|
|
53
|
+
readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
54
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
55
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
56
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
57
|
+
readonly expanded: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
58
|
+
readonly 'match-paths': v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
59
|
+
}, undefined>, undefined>;
|
|
60
|
+
}, undefined>, undefined>, undefined>;
|
|
61
|
+
}, undefined>;
|
|
62
|
+
export type NavActionGroup = v.InferOutput<typeof NavActionGroupSchema>;
|
|
63
|
+
export declare const LayoutSchema: v.StrictObjectSchema<{
|
|
64
|
+
readonly 'nav-action-order': v.StringSchema<undefined>;
|
|
65
|
+
readonly 'nav-actions': v.RecordSchema<v.StringSchema<undefined>, v.UnionSchema<[v.StrictObjectSchema<{
|
|
66
|
+
readonly display: v.NullishSchema<v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
67
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
68
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
69
|
+
readonly 'component-params': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
70
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
71
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
72
|
+
readonly items: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
73
|
+
readonly display: v.NullishSchema<v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
74
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
75
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
76
|
+
readonly 'component-params': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
77
|
+
}, undefined>, undefined>, undefined>, undefined>;
|
|
78
|
+
}, undefined>, undefined>;
|
|
79
|
+
readonly 'item-order': v.StringSchema<undefined>;
|
|
80
|
+
readonly display: v.RecordSchema<v.PicklistSchema<["default", "web", "pdf"], undefined>, v.RecordSchema<v.PicklistSchema<["default", "el", "en", "fr"], undefined>, v.StrictObjectSchema<{
|
|
81
|
+
readonly label: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
82
|
+
readonly component: v.PicklistSchema<["back-button", "entity-name", "button-link", "entity-dashboard-link", "entity-new-case-button", "nav-group", "nav-link", "nav-info"], undefined>;
|
|
83
|
+
readonly 'component-params': v.NullishSchema<v.StrictObjectSchema<{
|
|
84
|
+
readonly expanded: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
85
|
+
readonly 'match-paths': v.NullishSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
86
|
+
}, undefined>, undefined>;
|
|
87
|
+
}, undefined>, undefined>, undefined>;
|
|
88
|
+
}, undefined>], undefined>, undefined>;
|
|
89
|
+
readonly 'landing-url': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
90
|
+
}, undefined>;
|
|
91
|
+
export type Layout = v.InferOutput<typeof LayoutSchema>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { any, array, boolean as external_valibot_boolean, nullish, picklist, record, strictObject, string, union } from "valibot";
|
|
2
|
+
import { DisplayLangSchema, DisplayModeSchema } from "./common.js";
|
|
3
|
+
const NavActionComponentSchema = picklist([
|
|
4
|
+
'back-button',
|
|
5
|
+
'entity-name',
|
|
6
|
+
'button-link',
|
|
7
|
+
'entity-dashboard-link',
|
|
8
|
+
'entity-new-case-button',
|
|
9
|
+
'nav-group',
|
|
10
|
+
'nav-link',
|
|
11
|
+
'nav-info'
|
|
12
|
+
]);
|
|
13
|
+
const NavActionDisplaySchema = strictObject({
|
|
14
|
+
label: nullish(string()),
|
|
15
|
+
component: NavActionComponentSchema,
|
|
16
|
+
'component-params': nullish(record(string(), any()))
|
|
17
|
+
});
|
|
18
|
+
const NavActionSchema = strictObject({
|
|
19
|
+
display: nullish(record(DisplayModeSchema, record(DisplayLangSchema, NavActionDisplaySchema)))
|
|
20
|
+
});
|
|
21
|
+
const NavActionGroupParamsSchema = strictObject({
|
|
22
|
+
expanded: nullish(external_valibot_boolean()),
|
|
23
|
+
'match-paths': nullish(array(string()))
|
|
24
|
+
});
|
|
25
|
+
const NavActionGroupDisplaySchema = strictObject({
|
|
26
|
+
label: nullish(string()),
|
|
27
|
+
component: NavActionComponentSchema,
|
|
28
|
+
'component-params': nullish(NavActionGroupParamsSchema)
|
|
29
|
+
});
|
|
30
|
+
const NavActionGroupSchema = strictObject({
|
|
31
|
+
items: record(string(), NavActionSchema),
|
|
32
|
+
'item-order': string(),
|
|
33
|
+
display: record(DisplayModeSchema, record(DisplayLangSchema, NavActionGroupDisplaySchema))
|
|
34
|
+
});
|
|
35
|
+
const LayoutSchema = strictObject({
|
|
36
|
+
'nav-action-order': string(),
|
|
37
|
+
'nav-actions': record(string(), union([
|
|
38
|
+
NavActionSchema,
|
|
39
|
+
NavActionGroupSchema
|
|
40
|
+
])),
|
|
41
|
+
'landing-url': nullish(string())
|
|
42
|
+
});
|
|
43
|
+
export { LayoutSchema, NavActionComponentSchema, NavActionDisplaySchema, NavActionGroupDisplaySchema, NavActionGroupParamsSchema, NavActionGroupSchema, NavActionSchema };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* As defined in outputs/entry_schema.py
|
|
4
|
+
*/
|
|
5
|
+
export declare const EntrySchema: v.StrictObjectSchema<{
|
|
6
|
+
readonly id: v.StringSchema<undefined>;
|
|
7
|
+
readonly gate_id: v.StringSchema<undefined>;
|
|
8
|
+
readonly document: v.StrictObjectSchema<{
|
|
9
|
+
readonly displaying: v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
10
|
+
readonly display: v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
11
|
+
readonly timestamp: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
12
|
+
readonly issuer: v.StringSchema<undefined>;
|
|
13
|
+
readonly is_official: v.BooleanSchema<undefined>;
|
|
14
|
+
readonly step: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
15
|
+
readonly 'document-id': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
16
|
+
readonly 'document-title': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
17
|
+
readonly 'digest-sha256': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
18
|
+
readonly state: v.NullishSchema<v.PicklistSchema<["editing", "issued", "revoked", "extracted", "submitting"], undefined>, undefined>;
|
|
19
|
+
readonly statements: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
20
|
+
readonly attachments: v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
21
|
+
readonly filename: v.StringSchema<undefined>;
|
|
22
|
+
readonly digest_sha256: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
23
|
+
readonly 'content-encoding': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
24
|
+
readonly content: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly 'content-uri': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
26
|
+
}, undefined>, undefined>;
|
|
27
|
+
readonly template: v.StrictObjectSchema<{
|
|
28
|
+
readonly refname: v.StringSchema<undefined>;
|
|
29
|
+
readonly 'digest-sha256': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
30
|
+
}, undefined>;
|
|
31
|
+
readonly case_id: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
32
|
+
readonly 'declaration-id': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
33
|
+
}, undefined>;
|
|
34
|
+
readonly 'document-refs': v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>, undefined>;
|
|
35
|
+
}, undefined>;
|
|
36
|
+
/**
|
|
37
|
+
* As defined in outputs/permission_schema.py
|
|
38
|
+
*/
|
|
39
|
+
export declare const PermissionSchema: v.StrictObjectSchema<{
|
|
40
|
+
readonly gate_display_name: v.StringSchema<undefined>;
|
|
41
|
+
readonly gate_id: v.StringSchema<undefined>;
|
|
42
|
+
readonly afm: v.StringSchema<undefined>;
|
|
43
|
+
readonly role: v.StringSchema<undefined>;
|
|
44
|
+
}, undefined>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { any, nullish, record, strictObject, string } from "valibot";
|
|
2
|
+
import { DocumentDataSchema } from "./document.js";
|
|
3
|
+
const EntrySchema = strictObject({
|
|
4
|
+
id: string(),
|
|
5
|
+
gate_id: string(),
|
|
6
|
+
document: DocumentDataSchema,
|
|
7
|
+
'document-refs': nullish(record(string(), record(string(), any())))
|
|
8
|
+
});
|
|
9
|
+
const PermissionSchema = strictObject({
|
|
10
|
+
gate_display_name: string(),
|
|
11
|
+
gate_id: string(),
|
|
12
|
+
afm: string(),
|
|
13
|
+
role: string()
|
|
14
|
+
});
|
|
15
|
+
export { EntrySchema, PermissionSchema };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DisplayMode, DisplayLang } from './common.js';
|
|
2
|
+
type UnknownDisplay = Partial<Record<DisplayMode, Partial<Record<DisplayLang, Record<string, unknown>>>>>;
|
|
3
|
+
export declare function resolveDisplay<T extends UnknownDisplay>(mode: DisplayMode, lang: DisplayLang, display?: T): Record<string, unknown> | null;
|
|
4
|
+
export declare function resolveFieldComponent<T extends UnknownDisplay>(display: T | null | undefined, mode?: DisplayMode, lang?: DisplayLang): {};
|
|
5
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import deepmerge from "deepmerge";
|
|
2
|
+
function resolveDisplay(mode, lang, display) {
|
|
3
|
+
let mergedDisplay = display?.default?.default || {};
|
|
4
|
+
if (display?.default?.[lang]) mergedDisplay = deepmerge(mergedDisplay, display.default[lang] ?? {});
|
|
5
|
+
if (display?.[mode]?.default) mergedDisplay = deepmerge(mergedDisplay, display[mode]?.default ?? {});
|
|
6
|
+
if (display?.[mode]?.['el']) mergedDisplay = deepmerge(mergedDisplay, display[mode]?.['el'] ?? {});
|
|
7
|
+
if (display?.[mode]?.[lang]) mergedDisplay = deepmerge(mergedDisplay, display[mode]?.[lang] ?? {});
|
|
8
|
+
return Object.keys(mergedDisplay).length > 0 ? mergedDisplay : null;
|
|
9
|
+
}
|
|
10
|
+
function resolveFieldComponent(display, mode = 'default', lang = 'default') {
|
|
11
|
+
return display?.[mode]?.[lang]?.['component'] ?? 'string';
|
|
12
|
+
}
|
|
13
|
+
export { resolveDisplay, resolveFieldComponent };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
/**
|
|
3
|
+
* Resource field component type.
|
|
4
|
+
*
|
|
5
|
+
* @value `string` String.
|
|
6
|
+
* @value `boolean` Boolean.
|
|
7
|
+
* @value `int` Integer.
|
|
8
|
+
* @value `three-block-date` Three block date.
|
|
9
|
+
* @value `choice` Choice.
|
|
10
|
+
* @value `diff` Diff.
|
|
11
|
+
* @value `link` Link.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ResourceFieldComponentSchema: v.PicklistSchema<["string", "boolean", "int", "three-block-date", "choice", "diff", "link"], undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Object action component type.
|
|
16
|
+
*
|
|
17
|
+
* @value `button` Button.
|
|
18
|
+
* @value `menu-action` Menu action.
|
|
19
|
+
* @value `menu-action-show-details` Menu action showing details.
|
|
20
|
+
*/
|
|
21
|
+
export declare const ObjectActionComponentSchema: v.PicklistSchema<["button", "menu-action", "menu-action-show-details"], undefined>;
|
|
22
|
+
/**
|
|
23
|
+
* Object action handler type.
|
|
24
|
+
*
|
|
25
|
+
* @value `download` Download.
|
|
26
|
+
* @value `redirect` Redirect.
|
|
27
|
+
* @value `new-tab` New tab.
|
|
28
|
+
* @value `refresh-data` Refresh data.
|
|
29
|
+
* @value `refresh-item` Refresh item.
|
|
30
|
+
* @value `show-details` Show details.
|
|
31
|
+
* @value `show-message` Show message.
|
|
32
|
+
*/
|
|
33
|
+
export declare const ObjectActionHandlerSchema: v.PicklistSchema<["download", "redirect", "new-tab", "refresh-data", "refresh-item", "show-details", "show-message"], undefined>;
|
|
34
|
+
/**
|
|
35
|
+
* Resource action component type.
|
|
36
|
+
*
|
|
37
|
+
* @value `button` Button.
|
|
38
|
+
* @value `auto` Auto.
|
|
39
|
+
* @value `inline-form` Inline form.
|
|
40
|
+
*/
|
|
41
|
+
export declare const ResourceActionComponentSchema: v.PicklistSchema<["button", "auto", "inline-form"], undefined>;
|
|
42
|
+
/**
|
|
43
|
+
* Resource action handler type.
|
|
44
|
+
*
|
|
45
|
+
* @value `download` Download.
|
|
46
|
+
* @value `load-data` Load data.
|
|
47
|
+
* @value `refresh-data` Refresh data.
|
|
48
|
+
* @value `show-message` Show message.
|
|
49
|
+
* @value `show-modal` Show modal.
|
|
50
|
+
*/
|
|
51
|
+
export declare const ResourceActionHandlerSchema: v.PicklistSchema<["download", "load-data", "refresh-data", "show-message", "show-modal"], undefined>;
|
|
52
|
+
/**
|
|
53
|
+
* Access policy type.
|
|
54
|
+
*
|
|
55
|
+
* @value `node` Node.
|
|
56
|
+
* @value `tree` Tree.
|
|
57
|
+
*/
|
|
58
|
+
export declare const AccessPolicySchema: v.PicklistSchema<["node", "tree"], undefined>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { picklist } from "valibot";
|
|
2
|
+
const ResourceFieldComponentSchema = picklist([
|
|
3
|
+
'string',
|
|
4
|
+
'boolean',
|
|
5
|
+
'int',
|
|
6
|
+
'three-block-date',
|
|
7
|
+
'choice',
|
|
8
|
+
'diff',
|
|
9
|
+
'link'
|
|
10
|
+
]);
|
|
11
|
+
const ObjectActionComponentSchema = picklist([
|
|
12
|
+
'button',
|
|
13
|
+
'menu-action',
|
|
14
|
+
'menu-action-show-details'
|
|
15
|
+
]);
|
|
16
|
+
const ObjectActionHandlerSchema = picklist([
|
|
17
|
+
'download',
|
|
18
|
+
'redirect',
|
|
19
|
+
'new-tab',
|
|
20
|
+
'refresh-data',
|
|
21
|
+
'refresh-item',
|
|
22
|
+
'show-details',
|
|
23
|
+
'show-message'
|
|
24
|
+
]);
|
|
25
|
+
const ResourceActionComponentSchema = picklist([
|
|
26
|
+
'button',
|
|
27
|
+
'auto',
|
|
28
|
+
'inline-form'
|
|
29
|
+
]);
|
|
30
|
+
const ResourceActionHandlerSchema = picklist([
|
|
31
|
+
'download',
|
|
32
|
+
'load-data',
|
|
33
|
+
'refresh-data',
|
|
34
|
+
'show-message',
|
|
35
|
+
'show-modal'
|
|
36
|
+
]);
|
|
37
|
+
const AccessPolicySchema = picklist([
|
|
38
|
+
'node',
|
|
39
|
+
'tree'
|
|
40
|
+
]);
|
|
41
|
+
export { AccessPolicySchema, ObjectActionComponentSchema, ObjectActionHandlerSchema, ResourceActionComponentSchema, ResourceActionHandlerSchema, ResourceFieldComponentSchema };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const ResourceFieldDisplaySchema: v.StrictObjectSchema<{
|
|
3
|
+
readonly title: v.StringSchema<undefined>;
|
|
4
|
+
readonly component: v.PicklistSchema<["string", "boolean", "int", "three-block-date", "choice", "diff", "link"], undefined>;
|
|
5
|
+
readonly choices: v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
6
|
+
readonly 'choices-order': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
export declare const ResourceFieldSchema: v.StrictObjectSchema<{
|
|
9
|
+
readonly display: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
10
|
+
readonly title: v.StringSchema<undefined>;
|
|
11
|
+
readonly component: v.PicklistSchema<["string", "boolean", "int", "three-block-date", "choice", "diff", "link"], undefined>;
|
|
12
|
+
readonly choices: v.NullishSchema<v.RecordSchema<v.StringSchema<undefined>, v.AnySchema, undefined>, undefined>;
|
|
13
|
+
readonly 'choices-order': v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
14
|
+
}, undefined>, undefined>, undefined>;
|
|
15
|
+
}, undefined>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { any, nullish, record, strictObject, string } from "valibot";
|
|
2
|
+
import { ResourceFieldComponentSchema } from "./enums.js";
|
|
3
|
+
const ResourceFieldDisplaySchema = strictObject({
|
|
4
|
+
title: string(),
|
|
5
|
+
component: ResourceFieldComponentSchema,
|
|
6
|
+
choices: nullish(record(string(), any())),
|
|
7
|
+
'choices-order': nullish(string())
|
|
8
|
+
});
|
|
9
|
+
const ResourceFieldSchema = strictObject({
|
|
10
|
+
display: record(string(), record(string(), ResourceFieldDisplaySchema))
|
|
11
|
+
});
|
|
12
|
+
export { ResourceFieldDisplaySchema, ResourceFieldSchema };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as v from 'valibot';
|
|
2
|
+
export declare const ObjectActionDisplaySchema: v.StrictObjectSchema<{
|
|
3
|
+
readonly title: v.StringSchema<undefined>;
|
|
4
|
+
readonly component: v.PicklistSchema<["button", "menu-action", "menu-action-show-details"], undefined>;
|
|
5
|
+
readonly 'component-params': v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
6
|
+
readonly handler: v.NullishSchema<v.PicklistSchema<["download", "redirect", "new-tab", "refresh-data", "refresh-item", "show-details", "show-message"], undefined>, undefined>;
|
|
7
|
+
}, undefined>;
|
|
8
|
+
export declare const ObjectActionSchema: v.StrictObjectSchema<{
|
|
9
|
+
readonly display: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
10
|
+
readonly title: v.StringSchema<undefined>;
|
|
11
|
+
readonly component: v.PicklistSchema<["button", "menu-action", "menu-action-show-details"], undefined>;
|
|
12
|
+
readonly 'component-params': v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
13
|
+
readonly handler: v.NullishSchema<v.PicklistSchema<["download", "redirect", "new-tab", "refresh-data", "refresh-item", "show-details", "show-message"], undefined>, undefined>;
|
|
14
|
+
}, undefined>, undefined>, undefined>;
|
|
15
|
+
readonly arguments: v.NullishSchema<v.GenericSchema<import("../field/index.js").Fields>, undefined>;
|
|
16
|
+
readonly 'argument-order': v.StringSchema<undefined>;
|
|
17
|
+
readonly confirm: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
|
|
18
|
+
}, undefined>;
|
|
19
|
+
export declare const ObjectActionConfigDisplaySchema: v.StrictObjectSchema<{
|
|
20
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
21
|
+
readonly component: v.LiteralSchema<"menu", undefined>;
|
|
22
|
+
readonly icon: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
23
|
+
}, undefined>;
|
|
24
|
+
export declare const ObjectActionConfigSchema: v.StrictObjectSchema<{
|
|
25
|
+
readonly display: v.RecordSchema<v.StringSchema<undefined>, v.RecordSchema<v.StringSchema<undefined>, v.StrictObjectSchema<{
|
|
26
|
+
readonly title: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
27
|
+
readonly component: v.LiteralSchema<"menu", undefined>;
|
|
28
|
+
readonly icon: v.NullishSchema<v.StringSchema<undefined>, undefined>;
|
|
29
|
+
}, undefined>, undefined>, undefined>;
|
|
30
|
+
}, undefined>;
|