@icure/form 1.1.15 → 1.1.16
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/.yarn/cache/{lit-element-npm-4.0.4-95110c5931-721b877743.zip → lit-element-npm-4.0.6-bfca4f9870-4f73cd1c0d.zip} +0 -0
- package/.yarn/cache/lit-html-npm-3.1.4-58e56c5010-428593679c.zip +0 -0
- package/.yarn/cache/{lit-npm-3.1.2-d289de97da-7776fc5f17.zip → lit-npm-3.1.4-b7dcc2d5a3-c6ffa5580f.zip} +0 -0
- package/.yarn/cache/markdown-it-npm-14.1.0-e337d75bfe-07296b45eb.zip +0 -0
- package/.yarn/cache/prosemirror-model-npm-1.22.2-9238026de4-f4004a4ebe.zip +0 -0
- package/.yarn/cache/prosemirror-transform-npm-1.9.0-fd256f82f0-c2d63c1fb0.zip +0 -0
- package/.yarn/cache/prosemirror-view-npm-1.33.9-dd77e3e48f-d3bd6cef56.zip +0 -0
- package/.yarn/cache/tslib-npm-2.6.3-0fd136b3be-74fce0e100.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.1.0-c45282c865-3719735824.zip +0 -0
- package/.yarn/install-state.gz +0 -0
- package/components/common/field-with-options.d.ts +1 -1
- package/components/common/field-with-options.js.map +1 -1
- package/components/common/field.d.ts +3 -1
- package/components/common/field.js +18 -8
- package/components/common/field.js.map +1 -1
- package/components/common/utils.js.map +1 -1
- package/components/icure-button-group/index.js +8 -2
- package/components/icure-button-group/index.js.map +1 -1
- package/components/icure-date-picker/index.js +11 -4
- package/components/icure-date-picker/index.js.map +1 -1
- package/components/icure-dropdown-field/index.d.ts +3 -1
- package/components/icure-dropdown-field/index.js +42 -9
- package/components/icure-dropdown-field/index.js.map +1 -1
- package/components/icure-form/fields/button-group/checkbox.js +4 -3
- package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
- package/components/icure-form/fields/button-group/radio-button.js +5 -4
- package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/date-time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
- package/components/icure-form/fields/date-picker/time-picker.js +4 -3
- package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
- package/components/icure-form/fields/dropdown/dropdown-field.d.ts +2 -4
- package/components/icure-form/fields/dropdown/dropdown-field.js +6 -5
- package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
- package/components/icure-form/fields/items-list-field/items-list-field.js +4 -4
- package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
- package/components/icure-form/fields/label/label.js +1 -1
- package/components/icure-form/fields/label/label.js.map +1 -1
- package/components/icure-form/fields/measure-field/measure-field.js +4 -3
- package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
- package/components/icure-form/fields/number-field/number-field.js +4 -3
- package/components/icure-form/fields/number-field/number-field.js.map +1 -1
- package/components/icure-form/fields/text-field/text-field.d.ts +1 -1
- package/components/icure-form/fields/text-field/text-field.js +5 -4
- package/components/icure-form/fields/text-field/text-field.js.map +1 -1
- package/components/icure-form/fields/token-field/token-field.js +4 -4
- package/components/icure-form/fields/token-field/token-field.js.map +1 -1
- package/components/icure-form/fields/utils/index.d.ts +4 -6
- package/components/icure-form/fields/utils/index.js +1 -1
- package/components/icure-form/fields/utils/index.js.map +1 -1
- package/components/icure-form/index.d.ts +8 -8
- package/components/icure-form/index.js +17 -13
- package/components/icure-form/index.js.map +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js +1 -1
- package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
- package/components/icure-form/renderer/form/form.js +67 -58
- package/components/icure-form/renderer/form/form.js.map +1 -1
- package/components/icure-form/renderer/index.d.ts +4 -6
- package/components/icure-form/renderer/index.js.map +1 -1
- package/components/icure-label/index.js +6 -1
- package/components/icure-label/index.js.map +1 -1
- package/components/icure-text-field/index.d.ts +7 -9
- package/components/icure-text-field/index.js +118 -51
- package/components/icure-text-field/index.js.map +1 -1
- package/components/icure-text-field/plugin/caret-fix-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/mask-plugin.js.map +1 -1
- package/components/icure-text-field/plugin/regexp-plugin.js.map +1 -1
- package/components/icure-text-field/prosemirror-commands.d.ts +2 -2
- package/components/icure-text-field/prosemirror-commands.js.map +1 -1
- package/components/icure-text-field/prosemirror-utils.js.map +1 -1
- package/components/icure-text-field/schema/common-marks.js.map +1 -1
- package/components/icure-text-field/schema/measure-schema.js.map +1 -1
- package/components/icure-text-field/selection-companion.js.map +1 -1
- package/components/icure-text-field/suggestion-palette.js.map +1 -1
- package/components/model/index.d.ts +69 -137
- package/components/model/index.js +30 -103
- package/components/model/index.js.map +1 -1
- package/components/themes/icure-blue/index.d.ts +1 -0
- package/components/themes/icure-blue/index.js +321 -0
- package/components/themes/icure-blue/index.js.map +1 -0
- package/conversion/ckmeans-grouping.js.map +1 -1
- package/conversion/ckmeans.js.map +1 -1
- package/conversion/icure-convert.js.map +1 -1
- package/generic/model.d.ts +45 -1
- package/generic/model.js.map +1 -1
- package/icure/form-values-container.d.ts +42 -8
- package/icure/form-values-container.js +99 -52
- package/icure/form-values-container.js.map +1 -1
- package/icure/icure-utils.d.ts +19 -0
- package/icure/icure-utils.js +117 -0
- package/icure/icure-utils.js.map +1 -0
- package/icure/model.d.ts +1 -1
- package/icure/model.js.map +1 -1
- package/package.json +3 -4
- package/utils/code-utils.d.ts +3 -10
- package/utils/code-utils.js +3 -9
- package/utils/code-utils.js.map +1 -1
- package/utils/dates.d.ts +6 -0
- package/utils/dates.js +58 -0
- package/utils/dates.js.map +1 -0
- package/utils/fields-values-provider.d.ts +2 -1
- package/utils/fields-values-provider.js +11 -6
- package/utils/fields-values-provider.js.map +1 -1
- package/utils/form-value-container.js.map +1 -1
- package/utils/icure-utils.js.map +1 -1
- package/utils/interpreter.js +1 -2
- package/utils/interpreter.js.map +1 -1
- package/utils/languages.d.ts +1 -5
- package/utils/languages.js.map +1 -1
- package/utils/markdown.d.ts +2 -1
- package/utils/markdown.js +5 -1
- package/utils/markdown.js.map +1 -1
- package/utils/no-lodash.d.ts +3 -1
- package/utils/no-lodash.js +3 -1
- package/utils/no-lodash.js.map +1 -1
- package/utils/primitive.d.ts +0 -3
- package/utils/primitive.js +4 -59
- package/utils/primitive.js.map +1 -1
- package/.yarn/cache/@types-node-npm-18.19.15-63d17b58ca-8ebad6b0a0.zip +0 -0
- package/.yarn/cache/lit-html-npm-3.1.2-eef1e7cbd7-9a6f0326ae.zip +0 -0
- package/.yarn/cache/markdown-it-npm-14.0.0-e9aebdc7e3-f63bd8b39b.zip +0 -0
- package/.yarn/cache/tslib-npm-2.6.2-4fc8c068d9-329ea56123.zip +0 -0
- package/.yarn/cache/uc.micro-npm-2.0.0-9517366009-86e142c239.zip +0 -0
- package/.yarn/cache/undici-types-npm-5.26.5-de4f7c7bb9-3192ef6f3f.zip +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Form = exports.TranslationTable = exports.Codification = exports.Section = exports.Subform = exports.Group = exports.ActionButton = exports.Label = exports.CheckBox = exports.RadioButton = exports.DropdownField = exports.DateTimePicker = exports.TimePicker = exports.DatePicker = exports.ItemsListField = exports.TokenField = exports.NumberField = exports.MeasureField = exports.TextField = exports.Field = exports.pteq = void 0;
|
|
4
4
|
const pteq = (a, b) => {
|
|
5
5
|
if (a === b) {
|
|
6
6
|
return true;
|
|
@@ -20,12 +20,11 @@ const pteq = (a, b) => {
|
|
|
20
20
|
return false;
|
|
21
21
|
};
|
|
22
22
|
exports.pteq = pteq;
|
|
23
|
-
//todo: create abstract class for all fields + delete useless properties
|
|
24
23
|
class Field {
|
|
25
24
|
label() {
|
|
26
25
|
return this.field;
|
|
27
26
|
}
|
|
28
|
-
constructor(type, label, { shortLabel, grows, span, rowSpan, schema, tags, codifications, readonly, options, labels, value, unit, multiline, computedProperties, now, translate, width, styleOptions, }) {
|
|
27
|
+
constructor(type, label, { shortLabel, grows, span, rowSpan, schema, tags, codifications, readonly, options, labels, value, unit, multiline, computedProperties, validators, now, translate, width, styleOptions, hasOther, }) {
|
|
29
28
|
this.clazz = 'field';
|
|
30
29
|
this.field = label;
|
|
31
30
|
this.type = type;
|
|
@@ -43,10 +42,12 @@ class Field {
|
|
|
43
42
|
this.unit = unit;
|
|
44
43
|
this.multiline = multiline || false;
|
|
45
44
|
this.computedProperties = computedProperties;
|
|
45
|
+
this.validators = validators;
|
|
46
46
|
this.now = now;
|
|
47
47
|
this.translate = translate !== null && translate !== void 0 ? translate : true;
|
|
48
48
|
this.width = width;
|
|
49
49
|
this.styleOptions = styleOptions;
|
|
50
|
+
this.hasOther = hasOther;
|
|
50
51
|
}
|
|
51
52
|
static parse(json) {
|
|
52
53
|
var _a, _b, _c;
|
|
@@ -65,6 +66,7 @@ class Field {
|
|
|
65
66
|
label: () => new Label(json.field, Object.assign({}, json)),
|
|
66
67
|
})[json.type]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : new TextField(json.field, Object.assign({}, json)));
|
|
67
68
|
}
|
|
69
|
+
// noinspection JSUnusedGlobalSymbols
|
|
68
70
|
toJson() {
|
|
69
71
|
var _a;
|
|
70
72
|
return {
|
|
@@ -92,7 +94,7 @@ class Field {
|
|
|
92
94
|
}
|
|
93
95
|
exports.Field = Field;
|
|
94
96
|
class TextField extends Field {
|
|
95
|
-
constructor(label, { shortLabel, grows, span, rowSpan, schema, tags, codifications, readonly, options, labels, value, unit, multiline, computedProperties, translate, width, styleOptions, }) {
|
|
97
|
+
constructor(label, { shortLabel, grows, span, rowSpan, schema, tags, codifications, readonly, options, labels, value, unit, multiline, computedProperties, validators, translate, width, styleOptions, }) {
|
|
96
98
|
super('text-field', label, {
|
|
97
99
|
shortLabel,
|
|
98
100
|
grows,
|
|
@@ -108,6 +110,7 @@ class TextField extends Field {
|
|
|
108
110
|
unit,
|
|
109
111
|
multiline: multiline,
|
|
110
112
|
computedProperties,
|
|
113
|
+
validators,
|
|
111
114
|
translate,
|
|
112
115
|
width,
|
|
113
116
|
styleOptions,
|
|
@@ -119,7 +122,7 @@ class TextField extends Field {
|
|
|
119
122
|
}
|
|
120
123
|
exports.TextField = TextField;
|
|
121
124
|
class MeasureField extends Field {
|
|
122
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, translate, width, styleOptions, }) {
|
|
125
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, translate, width, styleOptions, }) {
|
|
123
126
|
super('measure-field', label, {
|
|
124
127
|
shortLabel,
|
|
125
128
|
grows,
|
|
@@ -133,6 +136,7 @@ class MeasureField extends Field {
|
|
|
133
136
|
value,
|
|
134
137
|
unit,
|
|
135
138
|
computedProperties,
|
|
139
|
+
validators,
|
|
136
140
|
translate,
|
|
137
141
|
width,
|
|
138
142
|
styleOptions,
|
|
@@ -144,7 +148,7 @@ class MeasureField extends Field {
|
|
|
144
148
|
}
|
|
145
149
|
exports.MeasureField = MeasureField;
|
|
146
150
|
class NumberField extends Field {
|
|
147
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, translate, width, styleOptions, }) {
|
|
151
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, translate, width, styleOptions, }) {
|
|
148
152
|
super('number-field', label, {
|
|
149
153
|
shortLabel,
|
|
150
154
|
grows,
|
|
@@ -158,6 +162,7 @@ class NumberField extends Field {
|
|
|
158
162
|
value,
|
|
159
163
|
unit,
|
|
160
164
|
computedProperties,
|
|
165
|
+
validators,
|
|
161
166
|
translate,
|
|
162
167
|
width,
|
|
163
168
|
styleOptions,
|
|
@@ -169,7 +174,7 @@ class NumberField extends Field {
|
|
|
169
174
|
}
|
|
170
175
|
exports.NumberField = NumberField;
|
|
171
176
|
class TokenField extends Field {
|
|
172
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, translate, width, styleOptions, }) {
|
|
177
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, translate, width, styleOptions, }) {
|
|
173
178
|
super('token-field', label, {
|
|
174
179
|
shortLabel,
|
|
175
180
|
grows,
|
|
@@ -183,6 +188,7 @@ class TokenField extends Field {
|
|
|
183
188
|
value,
|
|
184
189
|
unit,
|
|
185
190
|
computedProperties,
|
|
191
|
+
validators,
|
|
186
192
|
translate,
|
|
187
193
|
width,
|
|
188
194
|
styleOptions,
|
|
@@ -194,7 +200,7 @@ class TokenField extends Field {
|
|
|
194
200
|
}
|
|
195
201
|
exports.TokenField = TokenField;
|
|
196
202
|
class ItemsListField extends Field {
|
|
197
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, translate, width, styleOptions, }) {
|
|
203
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, translate, width, styleOptions, }) {
|
|
198
204
|
super('items-list-field', label, {
|
|
199
205
|
shortLabel,
|
|
200
206
|
grows,
|
|
@@ -208,6 +214,7 @@ class ItemsListField extends Field {
|
|
|
208
214
|
value,
|
|
209
215
|
unit,
|
|
210
216
|
computedProperties,
|
|
217
|
+
validators,
|
|
211
218
|
translate,
|
|
212
219
|
width,
|
|
213
220
|
styleOptions,
|
|
@@ -219,7 +226,7 @@ class ItemsListField extends Field {
|
|
|
219
226
|
}
|
|
220
227
|
exports.ItemsListField = ItemsListField;
|
|
221
228
|
class DatePicker extends Field {
|
|
222
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, now, translate, width, styleOptions, }) {
|
|
229
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, now, translate, width, styleOptions, }) {
|
|
223
230
|
super('date-picker', label, {
|
|
224
231
|
shortLabel,
|
|
225
232
|
grows,
|
|
@@ -233,6 +240,7 @@ class DatePicker extends Field {
|
|
|
233
240
|
value,
|
|
234
241
|
unit,
|
|
235
242
|
computedProperties,
|
|
243
|
+
validators,
|
|
236
244
|
now,
|
|
237
245
|
translate,
|
|
238
246
|
width,
|
|
@@ -245,7 +253,7 @@ class DatePicker extends Field {
|
|
|
245
253
|
}
|
|
246
254
|
exports.DatePicker = DatePicker;
|
|
247
255
|
class TimePicker extends Field {
|
|
248
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, now, translate, width, styleOptions, }) {
|
|
256
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, now, translate, width, styleOptions, }) {
|
|
249
257
|
super('time-picker', label, {
|
|
250
258
|
shortLabel,
|
|
251
259
|
grows,
|
|
@@ -259,6 +267,7 @@ class TimePicker extends Field {
|
|
|
259
267
|
value,
|
|
260
268
|
unit,
|
|
261
269
|
computedProperties,
|
|
270
|
+
validators,
|
|
262
271
|
now,
|
|
263
272
|
translate,
|
|
264
273
|
width,
|
|
@@ -271,7 +280,7 @@ class TimePicker extends Field {
|
|
|
271
280
|
}
|
|
272
281
|
exports.TimePicker = TimePicker;
|
|
273
282
|
class DateTimePicker extends Field {
|
|
274
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, now, translate, width, styleOptions, }) {
|
|
283
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, labels, value, unit, computedProperties, validators, now, translate, width, styleOptions, }) {
|
|
275
284
|
super('date-time-picker', label, {
|
|
276
285
|
shortLabel,
|
|
277
286
|
grows,
|
|
@@ -285,6 +294,7 @@ class DateTimePicker extends Field {
|
|
|
285
294
|
value,
|
|
286
295
|
unit,
|
|
287
296
|
computedProperties,
|
|
297
|
+
validators,
|
|
288
298
|
now,
|
|
289
299
|
translate,
|
|
290
300
|
width,
|
|
@@ -321,7 +331,7 @@ class DropdownField extends Field {
|
|
|
321
331
|
}
|
|
322
332
|
exports.DropdownField = DropdownField;
|
|
323
333
|
class RadioButton extends Field {
|
|
324
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, value, computedProperties, translate, sortOptions, width, styleOptions, }) {
|
|
334
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, value, computedProperties, validators, translate, sortOptions, width, styleOptions, }) {
|
|
325
335
|
super('radio-button', label, {
|
|
326
336
|
shortLabel,
|
|
327
337
|
grows,
|
|
@@ -333,6 +343,7 @@ class RadioButton extends Field {
|
|
|
333
343
|
options,
|
|
334
344
|
value,
|
|
335
345
|
computedProperties,
|
|
346
|
+
validators,
|
|
336
347
|
translate,
|
|
337
348
|
width,
|
|
338
349
|
styleOptions,
|
|
@@ -345,7 +356,7 @@ class RadioButton extends Field {
|
|
|
345
356
|
}
|
|
346
357
|
exports.RadioButton = RadioButton;
|
|
347
358
|
class CheckBox extends Field {
|
|
348
|
-
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, value, computedProperties, translate, sortOptions, width, styleOptions, }) {
|
|
359
|
+
constructor(label, { shortLabel, grows, span, rowSpan, tags, codifications, readonly, options, value, computedProperties, validators, translate, sortOptions, width, styleOptions, }) {
|
|
349
360
|
super('checkbox', label, {
|
|
350
361
|
shortLabel,
|
|
351
362
|
grows,
|
|
@@ -357,6 +368,7 @@ class CheckBox extends Field {
|
|
|
357
368
|
options,
|
|
358
369
|
value,
|
|
359
370
|
computedProperties,
|
|
371
|
+
validators,
|
|
360
372
|
translate,
|
|
361
373
|
width,
|
|
362
374
|
styleOptions,
|
|
@@ -405,7 +417,7 @@ class Group {
|
|
|
405
417
|
return new Group(this.group, (_a = this.fields) !== null && _a !== void 0 ? _a : [], Object.assign(Object.assign({}, this), properties));
|
|
406
418
|
}
|
|
407
419
|
static parse({ borderless, span, computedProperties, fields, group, translate, width, }) {
|
|
408
|
-
return new Group(group, (fields || []).map((s) => s['group'] ? Group.parse(s) : s['
|
|
420
|
+
return new Group(group, (fields || []).map((s) => s['group'] ? Group.parse(s) : s['forms'] ? Subform.parse(s) : Field.parse(s)), {
|
|
409
421
|
span: span,
|
|
410
422
|
borderless: borderless,
|
|
411
423
|
translate: translate,
|
|
@@ -473,7 +485,7 @@ class Section {
|
|
|
473
485
|
}
|
|
474
486
|
static parse(json) {
|
|
475
487
|
var _a, _b, _c;
|
|
476
|
-
return new Section(json.section, ((_c = (_b = (_a = json.fields) !== null && _a !== void 0 ? _a : json.groups) !== null && _b !== void 0 ? _b : json.sections) !== null && _c !== void 0 ? _c : []).map((s) => s['group'] ? Group.parse(s) : s['
|
|
488
|
+
return new Section(json.section, ((_c = (_b = (_a = json.fields) !== null && _a !== void 0 ? _a : json.groups) !== null && _b !== void 0 ? _b : json.sections) !== null && _c !== void 0 ? _c : []).map((s) => s['group'] ? Group.parse(s) : s['forms'] ? Subform.parse(s) : Field.parse(s)), json.description, json.keywords);
|
|
477
489
|
}
|
|
478
490
|
toJson() {
|
|
479
491
|
return {
|
|
@@ -493,6 +505,7 @@ class Codification {
|
|
|
493
505
|
static parse(json) {
|
|
494
506
|
return new Codification(json.type, json.codes);
|
|
495
507
|
}
|
|
508
|
+
// noinspection JSUnusedGlobalSymbols
|
|
496
509
|
toJson() {
|
|
497
510
|
return {
|
|
498
511
|
type: this.type,
|
|
@@ -509,6 +522,7 @@ class TranslationTable {
|
|
|
509
522
|
static parse(json) {
|
|
510
523
|
return new TranslationTable(json.language, json.translations);
|
|
511
524
|
}
|
|
525
|
+
// noinspection JSUnusedGlobalSymbols
|
|
512
526
|
toJson() {
|
|
513
527
|
return {
|
|
514
528
|
language: this.language,
|
|
@@ -531,6 +545,7 @@ class Form {
|
|
|
531
545
|
var _a, _b;
|
|
532
546
|
return new Form(json.form, (json.sections || []).map((s) => Section.parse(s)), json.id, json.description, json.keywords, (_a = json.codifications) === null || _a === void 0 ? void 0 : _a.map((c) => Codification.parse(c)), (_b = json.translations) === null || _b === void 0 ? void 0 : _b.map((t) => TranslationTable.parse(t)));
|
|
533
547
|
}
|
|
548
|
+
// noinspection JSUnusedGlobalSymbols
|
|
534
549
|
toJson() {
|
|
535
550
|
return {
|
|
536
551
|
form: this.form,
|
|
@@ -541,92 +556,4 @@ class Form {
|
|
|
541
556
|
}
|
|
542
557
|
}
|
|
543
558
|
exports.Form = Form;
|
|
544
|
-
/**
|
|
545
|
-
* Action part.
|
|
546
|
-
* An action is an expression that can be triggered by a launcher and that can change the state of the form.
|
|
547
|
-
* Launchers are defined by a trigger and a name. Launchers are events that will trigger the action.
|
|
548
|
-
* Expression is evaluated by an Interpreter (get from the frontend). The expression can change the state of the form or launch another action on the frontend.
|
|
549
|
-
* States are the states that can be changed by the action. States are defined by a name and a state to update.
|
|
550
|
-
* There is 3 types of Action:
|
|
551
|
-
* - Formulas: the expression is a formula that will change the value of a field.
|
|
552
|
-
* Example: OnChange of field A and B, expresion is A + B and state is value of field C.
|
|
553
|
-
* - ExternalAction: the expression is a call to an external action.
|
|
554
|
-
* Example: OnClick of button A, expression is open dialog B and state is value of field C (that will be returned by the dialog).
|
|
555
|
-
* - ExternalEvent: the launcher is an external event.
|
|
556
|
-
* Example: Frontend send an event, expression is value of the event and state is value of field A.
|
|
557
|
-
*/
|
|
558
|
-
class Action {
|
|
559
|
-
constructor(launchers, expression, states) {
|
|
560
|
-
this.launchers = launchers;
|
|
561
|
-
this.expression = expression;
|
|
562
|
-
this.states = states;
|
|
563
|
-
}
|
|
564
|
-
static parse(json) {
|
|
565
|
-
return new Action((json.launchers || []).map((l) => Launcher.parse(l)), json.expression, (json.states || []).map((s) => State.parse(s)));
|
|
566
|
-
}
|
|
567
|
-
toJson() {
|
|
568
|
-
return {
|
|
569
|
-
launchers: this.launchers.map((l) => l.toJson()),
|
|
570
|
-
expression: this.expression,
|
|
571
|
-
states: this.states.map((s) => s.toJson()),
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
exports.Action = Action;
|
|
576
|
-
class Launcher {
|
|
577
|
-
constructor(name, triggerer, shouldPassValue) {
|
|
578
|
-
this.name = name;
|
|
579
|
-
this.triggerer = triggerer;
|
|
580
|
-
this.shouldPassValue = shouldPassValue;
|
|
581
|
-
}
|
|
582
|
-
static parse(json) {
|
|
583
|
-
return new Launcher(json.name, json.triggerer, json.shouldPassValue);
|
|
584
|
-
}
|
|
585
|
-
toJson() {
|
|
586
|
-
return {
|
|
587
|
-
name: this.name,
|
|
588
|
-
triggerer: this.triggerer.toString(),
|
|
589
|
-
shouldPassValue: this.shouldPassValue,
|
|
590
|
-
};
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
exports.Launcher = Launcher;
|
|
594
|
-
var Trigger;
|
|
595
|
-
(function (Trigger) {
|
|
596
|
-
Trigger["INIT"] = "INIT";
|
|
597
|
-
Trigger["CHANGE"] = "CHANGE";
|
|
598
|
-
Trigger["SORT"] = "SORT";
|
|
599
|
-
Trigger["CLICK"] = "CLICK";
|
|
600
|
-
Trigger["VISIBLE"] = "VISIBLE";
|
|
601
|
-
Trigger["ERROR"] = "ERROR";
|
|
602
|
-
Trigger["VALID"] = "VALID";
|
|
603
|
-
Trigger["EVENT"] = "EVENT";
|
|
604
|
-
})(Trigger = exports.Trigger || (exports.Trigger = {}));
|
|
605
|
-
class State {
|
|
606
|
-
constructor(name, stateToUpdate, canLaunchLauncher) {
|
|
607
|
-
this.name = name;
|
|
608
|
-
this.stateToUpdate = stateToUpdate;
|
|
609
|
-
this.canLaunchLauncher = canLaunchLauncher;
|
|
610
|
-
}
|
|
611
|
-
static parse(json) {
|
|
612
|
-
return new State(json.name, json.stateToUpdate, json.canLaunchLauncher);
|
|
613
|
-
}
|
|
614
|
-
toJson() {
|
|
615
|
-
return {
|
|
616
|
-
name: this.name,
|
|
617
|
-
stateToUpdate: this.stateToUpdate.toString(),
|
|
618
|
-
canLaunchLauncher: this.canLaunchLauncher,
|
|
619
|
-
};
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
exports.State = State;
|
|
623
|
-
var StateToUpdate;
|
|
624
|
-
(function (StateToUpdate) {
|
|
625
|
-
StateToUpdate["VALUE"] = "VALUE";
|
|
626
|
-
StateToUpdate["VISIBLE"] = "VISIBLE";
|
|
627
|
-
StateToUpdate["OPTIONS"] = "OPTIONS";
|
|
628
|
-
StateToUpdate["READONLY"] = "READONLY";
|
|
629
|
-
StateToUpdate["CLAZZ"] = "CLAZZ";
|
|
630
|
-
StateToUpdate["REQUIRED"] = "REQUIRED";
|
|
631
|
-
})(StateToUpdate = exports.StateToUpdate || (exports.StateToUpdate = {}));
|
|
632
559
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/model/index.ts"],"names":[],"mappings":";;;AAwEO,MAAM,IAAI,GAAG,CAAC,CAA4B,EAAE,CAA4B,EAAW,EAAE;IAC3F,IAAI,CAAC,KAAK,CAAC,EAAE;QACZ,OAAO,IAAI,CAAA;KACX;IACD,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE;QACvC,OAAO,KAAK,CAAA;KACZ;IACD,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,OAAK,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,CAAA,EAAE;QACxB,OAAO,KAAK,CAAA;KACZ;IACD,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC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E,IAAI,CAAC,eAAe;SACrC,CAAA;IACF,CAAC;CACD;AApBD,4BAoBC;AAED,IAAY,OASX;AATD,WAAY,OAAO;IAClB,wBAAa,CAAA;IACb,4BAAiB,CAAA;IACjB,wBAAa,CAAA;IACb,0BAAe,CAAA;IACf,8BAAmB,CAAA;IACnB,0BAAe,CAAA;IACf,0BAAe,CAAA;IACf,0BAAe,CAAA;AAChB,CAAC,EATW,OAAO,GAAP,eAAO,KAAP,eAAO,QASlB;AAED,MAAa,KAAK;IAIjB,YAAY,IAAY,EAAE,aAA4B,EAAE,iBAA0B;QACjF,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;IAC3C,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,IAAgF;QAC5F,OAAO,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAA;IACxE,CAAC;IAED,MAAM;QACL,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE;YAC5C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SACzC,CAAA;IACF,CAAC;CACD;AApBD,sBAoBC;AAED,IAAY,aAOX;AAPD,WAAY,aAAa;IACxB,gCAAe,CAAA;IACf,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;IACf,sCAAqB,CAAA;AACtB,CAAC,EAPW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAOxB","sourcesContent":["import { DocumentSchema, InlineSchema, StyledSchema } from '../icure-text-field/schema/markdown-schema'\nimport { TokensSchema } from '../icure-text-field/schema/token-schema'\nimport { ItemsListSchema } from '../icure-text-field/schema/items-list-schema'\nimport { DateSchema, DateTimeSchema, TimeSchema } from '../icure-text-field/schema/date-time-schema'\nimport { DecimalSchema } from '../icure-text-field/schema/decimal-schema'\nimport { MeasureSchema } from '../icure-text-field/schema/measure-schema'\n\nexport interface Code {\n\tid: string\n\tlabel: { [key: string]: string }\n}\n\nexport interface FieldMetadata {\n\tlabel: string\n\tindex?: number\n\tvalueDate?: number\n\towner?: string\n\ttags?: Code[]\n}\n\nexport interface FieldValue {\n\tcontent: { [language: string]: PrimitiveType }\n\tcodes?: Code[]\n}\n\nexport type PrimitiveType = StringType | NumberType | BooleanType | TimestampType | DateTimeType | MeasureType | CompoundType\n\nexport interface StringType {\n\ttype: 'string'\n\tvalue: string\n}\n\nexport interface NumberType {\n\ttype: 'number'\n\tvalue: number\n}\n\nexport interface BooleanType {\n\ttype: 'boolean'\n\tvalue: boolean\n}\n\nexport interface TimestampType {\n\ttype: 'timestamp'\n\tvalue: number\n}\n\nexport interface DateTimeType {\n\ttype: 'datetime'\n\tvalue: number\n}\n\nexport interface MeasureType {\n\ttype: 'measure'\n\tvalue?: number\n\tunit?: string\n}\n\nexport interface CompoundType {\n\ttype: 'compound'\n\tvalue: { [label: string]: PrimitiveType }\n}\n\nexport interface Labels {\n\t[position: string]: string\n}\n\nexport interface SortOptions {\n\tsort: 'asc' | 'desc' | 'natural'\n\tpromotions?: string\n}\n\nexport const pteq = (a: PrimitiveType | undefined, b: PrimitiveType | undefined): boolean => {\n\tif (a === b) {\n\t\treturn true\n\t}\n\tif (a === undefined || b === undefined) {\n\t\treturn false\n\t}\n\tif (a?.type !== b?.type) {\n\t\treturn false\n\t}\n\tif (a.value === b.value && (a.type !== 'measure' || b.type !== 'measure' || a.unit === b.unit)) {\n\t\treturn true\n\t}\n\tif (a.type === 'compound' && b.type === 'compound') {\n\t\treturn Object.keys(a.value).every((k) => pteq(a.value[k], b.value[k]))\n\t}\n\treturn false\n}\n\nexport type IcureTextFieldSchema =\n\t| DocumentSchema\n\t| TokensSchema\n\t| ItemsListSchema\n\t| StyledSchema\n\t| InlineSchema\n\t| DateSchema\n\t| TimeSchema\n\t| DateTimeSchema\n\t| DecimalSchema\n\t| MeasureSchema\n\ntype FieldType =\n\t| 'text-field'\n\t| 'measure-field'\n\t| 'number-field'\n\t| 'token-field'\n\t| 'items-list-field'\n\t| 'date-picker'\n\t| 'time-picker'\n\t| 'date-time-picker'\n\t| 'multiple-choice'\n\t| 'dropdown-field'\n\t| 'radio-button'\n\t| 'checkbox'\n\t| 'label'\n\t| 'action'\n\n//todo: create abstract class for all fields + delete useless properties\n\nexport abstract class Field {\n\tclazz = 'field' as const\n\tfield: string\n\ttype: FieldType\n\tshortLabel?: string\n\tspan?: number\n\trowSpan?: number\n\tgrows: boolean\n\tschema?: IcureTextFieldSchema\n\ttags?: string[]\n\tcodifications?: string[]\n\treadonly?: boolean\n\toptions?: { [key: string]: unknown }\n\tlabels?: Labels\n\tvalue?: string\n\tunit?: string\n\tmultiline?: boolean\n\tcomputedProperties?: { [key: string]: string }\n\tnow?: boolean\n\ttranslate?: boolean\n\tsortOptions?: SortOptions\n\twidth?: number\n\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\n\tlabel(): string {\n\t\treturn this.field\n\t}\n\n\tprotected constructor(\n\t\ttype: FieldType,\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tschema?: IcureTextFieldSchema\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tmultiline?: boolean\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tthis.field = label\n\t\tthis.type = type\n\t\tthis.shortLabel = shortLabel\n\t\tthis.grows = grows === undefined ? true : grows\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.schema = schema\n\t\tthis.tags = tags\n\t\tthis.codifications = codifications\n\t\tthis.readonly = readonly || false\n\t\tthis.options = options\n\t\tthis.labels = labels\n\t\tthis.value = value\n\t\tthis.unit = unit\n\t\tthis.multiline = multiline || false\n\t\tthis.computedProperties = computedProperties\n\t\tthis.now = now\n\t\tthis.translate = translate ?? true\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t}\n\n\tabstract copy(properties: Partial<Field>): Field\n\n\tstatic parse(json: Field): Field {\n\t\treturn (\n\t\t\t{\n\t\t\t\t'text-field': () => new TextField(json.field, { ...json }),\n\t\t\t\t'measure-field': () => new MeasureField(json.field, { ...json }),\n\t\t\t\t'token-field': () => new TokenField(json.field, { ...json }),\n\t\t\t\t'items-list-field': () => new ItemsListField(json.field, { ...json }),\n\t\t\t\t'number-field': () => new NumberField(json.field, { ...json }),\n\t\t\t\t'date-picker': () => new DatePicker(json.field, { ...json }),\n\t\t\t\t'time-picker': () => new TimePicker(json.field, { ...json }),\n\t\t\t\t'date-time-picker': () => new DateTimePicker(json.field, { ...json }),\n\t\t\t\tdropdown: () => new DropdownField(json.field, { ...json }),\n\t\t\t\t'radio-button': () => new RadioButton(json.field, { ...json }),\n\t\t\t\tcheckbox: () => new CheckBox(json.field, { ...json }),\n\t\t\t\tlabel: () => new Label(json.field, { ...json }),\n\t\t\t}[json.type]?.() ?? new TextField(json.field, { ...json })\n\t\t)\n\t}\n\n\ttoJson(): {\n\t\tgrows: boolean | undefined\n\t\tschema: string | undefined\n\t\tspan: number | undefined\n\t\tcodifications: string[] | undefined\n\t\ttype:\n\t\t\t| 'text-field'\n\t\t\t| 'measure-field'\n\t\t\t| 'number-field'\n\t\t\t| 'token-field'\n\t\t\t| 'items-list-field'\n\t\t\t| 'date-picker'\n\t\t\t| 'time-picker'\n\t\t\t| 'date-time-picker'\n\t\t\t| 'multiple-choice'\n\t\t\t| 'dropdown-field'\n\t\t\t| 'radio-button'\n\t\t\t| 'checkbox'\n\t\t\t| 'label'\n\t\t\t| 'action'\n\t\ttranslate: boolean | undefined\n\t\ttags: string[] | undefined\n\t\tlabels: Labels | undefined\n\t\tunit: string | undefined\n\t\tfield: string\n\t\tstyleOptions: { width: number; direction: string; span: number; rows: number; alignItems: string } | undefined\n\t\tsortOptions: SortOptions | undefined\n\t\tmultiline: boolean | undefined\n\t\tnow: boolean | undefined\n\t\toptions: { [key: string]: unknown } | undefined\n\t\twidth: number | undefined\n\t\tshortLabel: string | undefined\n\t\tcomputedProperties: { [key: string]: string } | undefined\n\t\tvalue: string | undefined\n\t} {\n\t\treturn {\n\t\t\tfield: this.field,\n\t\t\ttype: this.type,\n\t\t\tshortLabel: this.shortLabel,\n\t\t\tgrows: this.grows,\n\t\t\tspan: this.span,\n\t\t\tschema: this.schema?.toString(),\n\t\t\ttags: this.tags,\n\t\t\tcodifications: this.codifications,\n\t\t\toptions: this.options,\n\t\t\tlabels: this.labels,\n\t\t\tvalue: this.value,\n\t\t\tunit: this.unit,\n\t\t\tmultiline: this.multiline,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\tnow: this.now,\n\t\t\ttranslate: this.translate,\n\t\t\tsortOptions: this.sortOptions,\n\t\t\twidth: this.width,\n\t\t\tstyleOptions: this.styleOptions,\n\t\t}\n\t}\n}\n\nexport class TextField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tschema?: IcureTextFieldSchema\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tmultiline?: boolean\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('text-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema: schema || 'styled-text-with-codes',\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline: multiline,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\n\toverride copy(properties: Partial<TextField>): TextField {\n\t\treturn new TextField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class MeasureField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('measure-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<MeasureField>): MeasureField {\n\t\treturn new MeasureField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class NumberField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('number-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<NumberField>): NumberField {\n\t\treturn new NumberField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class TokenField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('token-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<TokenField>): TokenField {\n\t\treturn new TokenField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class ItemsListField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('items-list-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<ItemsListField>): ItemsListField {\n\t\treturn new ItemsListField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DatePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('date-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<DatePicker>): DatePicker {\n\t\treturn new DatePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class TimePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('time-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<TimePicker>): TimePicker {\n\t\treturn new TimePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DateTimePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('date-time-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<DateTimePicker>): DateTimePicker {\n\t\treturn new DateTimePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DropdownField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\toptions: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('dropdown-field', label, {\n\t\t\tshortLabel: options.shortLabel,\n\t\t\tgrows: options.grows,\n\t\t\tspan: options.span,\n\t\t\ttags: options.tags,\n\t\t\tcodifications: options.codifications,\n\t\t\toptions: options.options,\n\t\t\tlabels: options.labels,\n\t\t\tvalue: options.value,\n\t\t\tcomputedProperties: options.computedProperties,\n\t\t\ttranslate: options.translate,\n\t\t\twidth: options.width,\n\t\t\tstyleOptions: options.styleOptions,\n\t\t})\n\t\tthis.sortOptions = options.sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<DropdownField>): DropdownField {\n\t\treturn new DropdownField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class RadioButton extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\tsortOptions,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('radio-button', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t\tthis.sortOptions = sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<RadioButton>): RadioButton {\n\t\treturn new RadioButton(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class CheckBox extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\tsortOptions,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [key: string]: unknown }\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('checkbox', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t\tthis.sortOptions = sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<CheckBox>): CheckBox {\n\t\treturn new CheckBox(this.field, { ...this, ...properties })\n\t}\n}\nexport class Label extends Field {\n\tconstructor(label: string, { shortLabel, grows, span }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number }) {\n\t\tsuper('label', label, { shortLabel, grows, span })\n\t}\n\toverride copy(properties: Partial<Label>): Label {\n\t\treturn new Label(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class ActionButton extends Field {\n\tconstructor(label: string, { shortLabel, grows, span }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number }) {\n\t\tsuper('action', label, { shortLabel, grows, span })\n\t}\n\toverride copy(properties: Partial<ActionButton>): ActionButton {\n\t\treturn new ActionButton(this.field, { ...this, ...properties })\n\t}\n}\nexport class Group {\n\tclazz = 'group' as const\n\tgroup: string\n\tborderless: boolean\n\ttranslate: boolean\n\tfields?: Array<Field | Group | Subform>\n\tspan?: number\n\trowSpan?: number\n\tcomputedProperties?: { [key: string]: string }\n\twidth?: number\n\tstyleOptions?: { [key: string]: unknown }\n\n\tconstructor(\n\t\ttitle: string,\n\t\tfields: Array<Field | Group | Subform>,\n\t\t{\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tborderless,\n\t\t\ttranslate,\n\t\t\tcomputedProperties,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tborderless?: boolean\n\t\t\ttranslate?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { [key: string]: unknown }\n\t\t},\n\t) {\n\t\tthis.group = title\n\t\tthis.fields = fields\n\t\tthis.borderless = borderless ?? false\n\t\tthis.translate = translate ?? true\n\t\tthis.fields = fields\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.computedProperties = computedProperties\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t}\n\n\tcopy(properties: Partial<Group>): Group {\n\t\treturn new Group(this.group, this.fields ?? [], { ...this, ...properties })\n\t}\n\n\tstatic parse({\n\t\tborderless,\n\t\tspan,\n\t\tcomputedProperties,\n\t\tfields,\n\t\tgroup,\n\t\ttranslate,\n\t\twidth,\n\t}: {\n\t\tgroup: string\n\t\tfields?: Array<Field | Group | Subform>\n\t\tborderless?: boolean\n\t\ttranslate?: boolean\n\t\tspan?: number\n\t\trowSpan?: number\n\t\tcomputedProperties?: { [key: string]: string }\n\t\twidth?: number\n\t}): Group {\n\t\treturn new Group(\n\t\t\tgroup,\n\t\t\t(fields || []).map((s: Field | Group | Subform) =>\n\t\t\t\ts['group'] ? Group.parse(s as Group) : s['subForm'] ? Subform.parse(s as Subform & { subform: string }) : Field.parse(s as Field),\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: span,\n\t\t\t\tborderless: borderless,\n\t\t\t\ttranslate: translate,\n\t\t\t\tcomputedProperties: computedProperties,\n\t\t\t\twidth: width,\n\t\t\t},\n\t\t)\n\t}\n\n\ttoJson(): any {\n\t\treturn {\n\t\t\tgroup: this.group,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\tfields: this.fields?.map((f: Field | Group) => f.toJson()),\n\t\t\tborderless: this.borderless,\n\t\t\ttranslatable: this.translate,\n\t\t\tspan: this.span,\n\t\t\twidth: this.width,\n\t\t}\n\t}\n}\n\nexport class Subform {\n\tclazz = 'subform' as const\n\tid: string\n\tshortLabel?: string\n\tforms: { [key: string]: Form }\n\tspan?: number\n\trowSpan?: number\n\tcomputedProperties?: { [key: string]: string }\n\twidth?: number\n\tstyleOptions?: { [key: string]: unknown }\n\n\tconstructor(\n\t\ttitle: string,\n\t\tforms: { [key: string]: Form },\n\t\t{\n\t\t\tshortLabel,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tcomputedProperties,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tcomputedProperties?: { [key: string]: string }\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { [key: string]: unknown }\n\t\t},\n\t) {\n\t\tthis.id = title\n\t\tthis.shortLabel = shortLabel\n\t\tthis.forms = forms\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.computedProperties = computedProperties\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t}\n\n\tcopy(properties: Partial<Subform>): Subform {\n\t\treturn new Subform(this.id, this.forms, { ...this, ...properties })\n\t}\n\n\tstatic parse(json: {\n\t\tsubform: string\n\t\tshortLabel?: string\n\t\tforms: { [key: string]: Form }\n\t\tspan?: number\n\t\trowSpan?: number\n\t\tcomputedProperties?: { [key: string]: string }\n\t\twidth?: number\n\t\tstyleOptions?: { [key: string]: unknown }\n\t}): Subform {\n\t\treturn new Subform(json.subform, json.forms, {\n\t\t\tshortLabel: json.shortLabel,\n\t\t\tspan: json.span,\n\t\t\tcomputedProperties: json.computedProperties,\n\t\t\twidth: json.width,\n\t\t\tstyleOptions: json.styleOptions,\n\t\t})\n\t}\n\n\ttoJson(): any {\n\t\treturn {\n\t\t\tsubform: this.id,\n\t\t\tshortLabel: this.shortLabel,\n\t\t\tforms: this.forms,\n\t\t\tspan: this.span,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\twidth: this.width,\n\t\t\tstyleOptions: this.styleOptions,\n\t\t}\n\t}\n}\nexport class Section {\n\tsection: string\n\tfields: Array<Field | Group | Subform>\n\tdescription?: string\n\tkeywords?: string[]\n\n\tconstructor(title: string, fields: Array<Field | Group | Subform>, description?: string, keywords?: string[]) {\n\t\tthis.section = title\n\t\tthis.fields = fields\n\t\tthis.description = description\n\t\tthis.keywords = keywords\n\t}\n\n\tstatic parse(json: {\n\t\tsection: string\n\t\tfields?: Array<Field | Group | Subform>\n\t\tgroups?: Array<Field | Group | Subform>\n\t\tsections?: Array<Field | Group | Subform>\n\t\tdescription?: string\n\t\tkeywords?: string[]\n\t}): Section {\n\t\treturn new Section(\n\t\t\tjson.section,\n\t\t\t(json.fields ?? json.groups ?? json.sections ?? []).map((s: Field | Group | Subform) =>\n\t\t\t\ts['group'] ? Group.parse(s as Group) : s['subForm'] ? Subform.parse(s as Subform & { subform: string }) : Field.parse(s as Field),\n\t\t\t),\n\t\t\tjson.description,\n\t\t\tjson.keywords,\n\t\t)\n\t}\n\n\ttoJson(): {\n\t\tsection: string\n\t\tkeywords?: string[]\n\t\tdescription?: string\n\t\tfields: (Field | Group | Subform)[]\n\t} {\n\t\treturn {\n\t\t\tsection: this.section,\n\t\t\tfields: this.fields.map((f: Field | Group | Subform) => f.toJson()),\n\t\t\tdescription: this.description,\n\t\t\tkeywords: this.keywords,\n\t\t}\n\t}\n}\n\nexport class Codification {\n\ttype: string\n\tcodes: Code[]\n\n\tconstructor(type: string, codes: Code[]) {\n\t\tthis.type = type\n\t\tthis.codes = codes\n\t}\n\n\tstatic parse(json: { type: string; codes: Code[] }): Codification {\n\t\treturn new Codification(json.type, json.codes)\n\t}\n\n\ttoJson(): { type: string; codes: Code[] } {\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tcodes: this.codes,\n\t\t}\n\t}\n}\n\nexport class TranslationTable {\n\tlanguage: string\n\ttranslations: { [key: string]: string }\n\n\tconstructor(language: string, translations: { [key: string]: string }) {\n\t\tthis.language = language\n\t\tthis.translations = translations\n\t}\n\n\tstatic parse(json: { language: string; translations: { [key: string]: string } }): TranslationTable {\n\t\treturn new TranslationTable(json.language, json.translations)\n\t}\n\n\ttoJson(): { language: string; translations: { [key: string]: string } } {\n\t\treturn {\n\t\t\tlanguage: this.language,\n\t\t\ttranslations: this.translations,\n\t\t}\n\t}\n}\n\nexport class Form {\n\tform: string\n\tsections: Section[]\n\tid?: string\n\tdescription?: string\n\tkeywords?: string[]\n\tcodifications?: Codification[]\n\ttranslations?: TranslationTable[]\n\n\tconstructor(title: string, sections: Section[], id?: string, description?: string, keywords?: string[], codifications?: Codification[], translations?: TranslationTable[]) {\n\t\tthis.form = title\n\t\tthis.description = description\n\t\tthis.id = id\n\t\tthis.keywords = keywords\n\t\tthis.sections = sections\n\t\tthis.codifications = codifications\n\t\tthis.translations = translations\n\t}\n\n\tstatic parse(json: {\n\t\tform: string\n\t\tsections: Section[]\n\t\tid?: string\n\t\tdescription?: string\n\t\tkeywords?: string[]\n\t\tcodifications?: Codification[]\n\t\ttranslations: TranslationTable[]\n\t}): Form {\n\t\treturn new Form(\n\t\t\tjson.form,\n\t\t\t(json.sections || []).map((s: Section) => Section.parse(s)),\n\t\t\tjson.id,\n\t\t\tjson.description,\n\t\t\tjson.keywords,\n\t\t\tjson.codifications?.map((c: Codification) => Codification.parse(c)),\n\t\t\tjson.translations?.map((t: TranslationTable) => TranslationTable.parse(t)),\n\t\t)\n\t}\n\n\ttoJson(): {\n\t\tform: string\n\t\tkeywords?: string[]\n\t\tdescription?: string\n\t\tsections: { section: string; keywords?: string[]; description?: string; fields: any[] }[]\n\t} {\n\t\treturn {\n\t\t\tform: this.form,\n\t\t\tsections: this.sections.map((s: Section) => s.toJson()),\n\t\t\tdescription: this.description,\n\t\t\tkeywords: this.keywords,\n\t\t}\n\t}\n}\n\n/**\n * Action part.\n * An action is an expression that can be triggered by a launcher and that can change the state of the form.\n * Launchers are defined by a trigger and a name. Launchers are events that will trigger the action.\n * Expression is evaluated by an Interpreter (get from the frontend). The expression can change the state of the form or launch another action on the frontend.\n * States are the states that can be changed by the action. States are defined by a name and a state to update.\n * There is 3 types of Action:\n * - Formulas: the expression is a formula that will change the value of a field.\n * \t\tExample: OnChange of field A and B, expresion is A + B and state is value of field C.\n * - ExternalAction: the expression is a call to an external action.\n * \t\tExample: OnClick of button A, expression is open dialog B and state is value of field C (that will be returned by the dialog).\n * - ExternalEvent: the launcher is an external event.\n * \t\tExample: Frontend send an event, expression is value of the event and state is value of field A.\n */\nexport class Action {\n\tlaunchers: Launcher[]\n\texpression: string\n\tstates: State[]\n\tconstructor(launchers: Launcher[], expression: string, states: State[]) {\n\t\tthis.launchers = launchers\n\t\tthis.expression = expression\n\t\tthis.states = states\n\t}\n\n\tstatic parse(json: { launchers: Launcher[]; expression: string; states: State[] }): Action {\n\t\treturn new Action(\n\t\t\t(json.launchers || []).map((l: Launcher) => Launcher.parse(l)),\n\t\t\tjson.expression,\n\t\t\t(json.states || []).map((s: State) => State.parse(s)),\n\t\t)\n\t}\n\n\ttoJson(): {\n\t\tlaunchers: { triggerer: string; shouldPassValue: boolean; name: string }[]\n\t\texpression: string\n\t\tstates: { stateToUpdate: string; name: string; canLaunchLauncher: boolean }[]\n\t} {\n\t\treturn {\n\t\t\tlaunchers: this.launchers.map((l: Launcher) => l.toJson()),\n\t\t\texpression: this.expression,\n\t\t\tstates: this.states.map((s: State) => s.toJson()),\n\t\t}\n\t}\n}\n\nexport class Launcher {\n\tname: string\n\ttriggerer: Trigger\n\tshouldPassValue: boolean\n\tconstructor(name: string, triggerer: Trigger, shouldPassValue: boolean) {\n\t\tthis.name = name\n\t\tthis.triggerer = triggerer\n\t\tthis.shouldPassValue = shouldPassValue\n\t}\n\tstatic parse(json: { name: string; triggerer: Trigger; shouldPassValue: boolean }): Launcher {\n\t\treturn new Launcher(json.name, json.triggerer, json.shouldPassValue)\n\t}\n\n\ttoJson(): { triggerer: string; shouldPassValue: boolean; name: string } {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttriggerer: this.triggerer.toString(),\n\t\t\tshouldPassValue: this.shouldPassValue,\n\t\t}\n\t}\n}\n\nexport enum Trigger {\n\tINIT = 'INIT',\n\tCHANGE = 'CHANGE',\n\tSORT = 'SORT',\n\tCLICK = 'CLICK',\n\tVISIBLE = 'VISIBLE',\n\tERROR = 'ERROR',\n\tVALID = 'VALID',\n\tEVENT = 'EVENT',\n}\n\nexport class State {\n\tname: string\n\tstateToUpdate: StateToUpdate\n\tcanLaunchLauncher: boolean\n\tconstructor(name: string, stateToUpdate: StateToUpdate, canLaunchLauncher: boolean) {\n\t\tthis.name = name\n\t\tthis.stateToUpdate = stateToUpdate\n\t\tthis.canLaunchLauncher = canLaunchLauncher\n\t}\n\tstatic parse(json: { name: string; stateToUpdate: StateToUpdate; canLaunchLauncher: boolean }): State {\n\t\treturn new State(json.name, json.stateToUpdate, json.canLaunchLauncher)\n\t}\n\n\ttoJson(): { stateToUpdate: string; name: string; canLaunchLauncher: boolean } {\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tstateToUpdate: this.stateToUpdate.toString(),\n\t\t\tcanLaunchLauncher: this.canLaunchLauncher,\n\t\t}\n\t}\n}\n\nexport enum StateToUpdate {\n\tVALUE = 'VALUE',\n\tVISIBLE = 'VISIBLE',\n\tOPTIONS = 'OPTIONS',\n\tREADONLY = 'READONLY',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C,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,IAQZ;;QACA,OAAO,IAAI,IAAI,CACd,IAAI,CAAC,IAAI,EACT,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,IAAI,CAAC,EAAE,EACP,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,QAAQ,EACb,MAAA,IAAI,CAAC,aAAa,0CAAE,GAAG,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACnE,MAAA,IAAI,CAAC,YAAY,0CAAE,GAAG,CAAC,CAAC,CAAmB,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAC1E,CAAA;IACF,CAAC;IAED,qCAAqC;IACrC,MAAM;QAML,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YACvD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAA;IACF,CAAC;CACD;AArDD,oBAqDC","sourcesContent":["import { DocumentSchema, InlineSchema, StyledSchema } from '../icure-text-field/schema/markdown-schema'\nimport { TokensSchema } from '../icure-text-field/schema/token-schema'\nimport { ItemsListSchema } from '../icure-text-field/schema/items-list-schema'\nimport { DateSchema, DateTimeSchema, TimeSchema } from '../icure-text-field/schema/date-time-schema'\nimport { DecimalSchema } from '../icure-text-field/schema/decimal-schema'\nimport { MeasureSchema } from '../icure-text-field/schema/measure-schema'\n\nexport interface Code {\n\tid: string\n\tlabel: { [key: string]: string }\n}\n\nexport interface FieldMetadata {\n\tlabel: string\n\tindex?: number\n\tvalueDate?: number\n\towner?: string\n\ttags?: Code[]\n}\n\nexport interface FieldValue {\n\tcontent: { [language: string]: PrimitiveType }\n\tcodes?: Code[]\n}\n\nexport type PrimitiveType = StringType | NumberType | BooleanType | TimestampType | DateTimeType | MeasureType | CompoundType\n\nexport interface StringType {\n\ttype: 'string'\n\tvalue: string\n}\n\nexport interface NumberType {\n\ttype: 'number'\n\tvalue: number\n}\n\nexport interface BooleanType {\n\ttype: 'boolean'\n\tvalue: boolean\n}\n\nexport interface TimestampType {\n\ttype: 'timestamp'\n\tvalue: number\n}\n\nexport interface DateTimeType {\n\ttype: 'datetime'\n\tvalue: number\n}\n\nexport interface MeasureType {\n\ttype: 'measure'\n\tvalue?: number\n\tunit?: string\n}\n\nexport interface CompoundType {\n\ttype: 'compound'\n\tvalue: { [label: string]: PrimitiveType }\n}\n\nexport interface Labels {\n\t[position: string]: string\n}\n\nexport interface SortOptions {\n\tsort: 'asc' | 'desc' | 'natural'\n\tpromotions?: string\n}\n\nexport const pteq = (a: PrimitiveType | undefined, b: PrimitiveType | undefined): boolean => {\n\tif (a === b) {\n\t\treturn true\n\t}\n\tif (a === undefined || b === undefined) {\n\t\treturn false\n\t}\n\tif (a?.type !== b?.type) {\n\t\treturn false\n\t}\n\tif (a.value === b.value && (a.type !== 'measure' || b.type !== 'measure' || a.unit === b.unit)) {\n\t\treturn true\n\t}\n\tif (a.type === 'compound' && b.type === 'compound') {\n\t\treturn Object.keys(a.value).every((k) => pteq(a.value[k], b.value[k]))\n\t}\n\treturn false\n}\n\nexport type IcureTextFieldSchema =\n\t| DocumentSchema\n\t| TokensSchema\n\t| ItemsListSchema\n\t| StyledSchema\n\t| InlineSchema\n\t| DateSchema\n\t| TimeSchema\n\t| DateTimeSchema\n\t| DecimalSchema\n\t| MeasureSchema\n\ntype FieldType =\n\t| 'text-field'\n\t| 'measure-field'\n\t| 'number-field'\n\t| 'token-field'\n\t| 'items-list-field'\n\t| 'date-picker'\n\t| 'time-picker'\n\t| 'date-time-picker'\n\t| 'multiple-choice'\n\t| 'dropdown-field'\n\t| 'radio-button'\n\t| 'checkbox'\n\t| 'label'\n\t| 'action'\n\nexport interface Validator {\n\tvalidation: string\n\tmessage: string\n}\n\nexport abstract class Field {\n\tclazz = 'field' as const\n\tfield: string\n\ttype: FieldType\n\tshortLabel?: string\n\tspan?: number\n\trowSpan?: number\n\tgrows: boolean\n\tschema?: IcureTextFieldSchema\n\ttags?: string[]\n\tcodifications?: string[]\n\treadonly?: boolean\n\toptions?: { [_key: string]: unknown }\n\tlabels?: Labels\n\tvalue?: string\n\tunit?: string\n\tmultiline?: boolean\n\tcomputedProperties?: { [_key: string]: string }\n\tvalidators?: Validator[]\n\tnow?: boolean\n\ttranslate?: boolean\n\tsortOptions?: SortOptions\n\twidth?: number\n\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\thasOther?: boolean\n\n\tlabel(): string {\n\t\treturn this.field\n\t}\n\n\tprotected constructor(\n\t\ttype: FieldType,\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t\thasOther,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tschema?: IcureTextFieldSchema\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tmultiline?: boolean\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t\thasOther?: boolean\n\t\t},\n\t) {\n\t\tthis.field = label\n\t\tthis.type = type\n\t\tthis.shortLabel = shortLabel\n\t\tthis.grows = grows === undefined ? true : grows\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.schema = schema\n\t\tthis.tags = tags\n\t\tthis.codifications = codifications\n\t\tthis.readonly = readonly || false\n\t\tthis.options = options\n\t\tthis.labels = labels\n\t\tthis.value = value\n\t\tthis.unit = unit\n\t\tthis.multiline = multiline || false\n\t\tthis.computedProperties = computedProperties\n\t\tthis.validators = validators\n\t\tthis.now = now\n\t\tthis.translate = translate ?? true\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t\tthis.hasOther = hasOther\n\t}\n\n\tabstract copy(properties: Partial<Field>): Field\n\n\tstatic parse(json: Field): Field {\n\t\treturn (\n\t\t\t(\n\t\t\t\t{\n\t\t\t\t\t'text-field': () => new TextField(json.field, { ...json }),\n\t\t\t\t\t'measure-field': () => new MeasureField(json.field, { ...json }),\n\t\t\t\t\t'token-field': () => new TokenField(json.field, { ...json }),\n\t\t\t\t\t'items-list-field': () => new ItemsListField(json.field, { ...json }),\n\t\t\t\t\t'number-field': () => new NumberField(json.field, { ...json }),\n\t\t\t\t\t'date-picker': () => new DatePicker(json.field, { ...json }),\n\t\t\t\t\t'time-picker': () => new TimePicker(json.field, { ...json }),\n\t\t\t\t\t'date-time-picker': () => new DateTimePicker(json.field, { ...json }),\n\t\t\t\t\tdropdown: () => new DropdownField(json.field, { ...json }),\n\t\t\t\t\t'radio-button': () => new RadioButton(json.field, { ...json }),\n\t\t\t\t\tcheckbox: () => new CheckBox(json.field, { ...json }),\n\t\t\t\t\tlabel: () => new Label(json.field, { ...json }),\n\t\t\t\t} as { [key: string]: () => Field }\n\t\t\t)[json.type as string]?.() ?? new TextField(json.field, { ...json })\n\t\t)\n\t}\n\n\t// noinspection JSUnusedGlobalSymbols\n\ttoJson(): {\n\t\tgrows: boolean | undefined\n\t\tschema: string | undefined\n\t\tspan: number | undefined\n\t\tcodifications: string[] | undefined\n\t\ttype:\n\t\t\t| 'text-field'\n\t\t\t| 'measure-field'\n\t\t\t| 'number-field'\n\t\t\t| 'token-field'\n\t\t\t| 'items-list-field'\n\t\t\t| 'date-picker'\n\t\t\t| 'time-picker'\n\t\t\t| 'date-time-picker'\n\t\t\t| 'multiple-choice'\n\t\t\t| 'dropdown-field'\n\t\t\t| 'radio-button'\n\t\t\t| 'checkbox'\n\t\t\t| 'label'\n\t\t\t| 'action'\n\t\ttranslate: boolean | undefined\n\t\ttags: string[] | undefined\n\t\tlabels: Labels | undefined\n\t\tunit: string | undefined\n\t\tfield: string\n\t\tstyleOptions: { width: number; direction: string; span: number; rows: number; alignItems: string } | undefined\n\t\tsortOptions: SortOptions | undefined\n\t\tmultiline: boolean | undefined\n\t\tnow: boolean | undefined\n\t\toptions: { [_key: string]: unknown } | undefined\n\t\twidth: number | undefined\n\t\tshortLabel: string | undefined\n\t\tcomputedProperties: { [key: string]: string } | undefined\n\t\tvalue: string | undefined\n\t} {\n\t\treturn {\n\t\t\tfield: this.field,\n\t\t\ttype: this.type,\n\t\t\tshortLabel: this.shortLabel,\n\t\t\tgrows: this.grows,\n\t\t\tspan: this.span,\n\t\t\tschema: this.schema?.toString(),\n\t\t\ttags: this.tags,\n\t\t\tcodifications: this.codifications,\n\t\t\toptions: this.options,\n\t\t\tlabels: this.labels,\n\t\t\tvalue: this.value,\n\t\t\tunit: this.unit,\n\t\t\tmultiline: this.multiline,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\tnow: this.now,\n\t\t\ttranslate: this.translate,\n\t\t\tsortOptions: this.sortOptions,\n\t\t\twidth: this.width,\n\t\t\tstyleOptions: this.styleOptions,\n\t\t}\n\t}\n}\n\nexport class TextField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tschema?: IcureTextFieldSchema\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tmultiline?: boolean\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('text-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tschema: schema || 'styled-text-with-codes',\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tmultiline: multiline,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\n\toverride copy(properties: Partial<TextField>): TextField {\n\t\treturn new TextField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class MeasureField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('measure-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<MeasureField>): MeasureField {\n\t\treturn new MeasureField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class NumberField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('number-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<NumberField>): NumberField {\n\t\treturn new NumberField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class TokenField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('token-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<TokenField>): TokenField {\n\t\treturn new TokenField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class ItemsListField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('items-list-field', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<ItemsListField>): ItemsListField {\n\t\treturn new ItemsListField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DatePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('date-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<DatePicker>): DatePicker {\n\t\treturn new DatePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class TimePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('time-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<TimePicker>): TimePicker {\n\t\treturn new TimePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DateTimePicker extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tunit?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\tnow?: boolean\n\t\t\ttranslate?: boolean\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('date-time-picker', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tlabels,\n\t\t\tvalue,\n\t\t\tunit,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\tnow,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t}\n\toverride copy(properties: Partial<DateTimePicker>): DateTimePicker {\n\t\treturn new DateTimePicker(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class DropdownField extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\toptions: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tlabels?: Labels\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('dropdown-field', label, {\n\t\t\tshortLabel: options.shortLabel,\n\t\t\tgrows: options.grows,\n\t\t\tspan: options.span,\n\t\t\ttags: options.tags,\n\t\t\tcodifications: options.codifications,\n\t\t\toptions: options.options,\n\t\t\tlabels: options.labels,\n\t\t\tvalue: options.value,\n\t\t\tcomputedProperties: options.computedProperties,\n\t\t\ttranslate: options.translate,\n\t\t\twidth: options.width,\n\t\t\tstyleOptions: options.styleOptions,\n\t\t})\n\t\tthis.sortOptions = options.sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<DropdownField>): DropdownField {\n\t\treturn new DropdownField(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class RadioButton extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\tsortOptions,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\thasOther?: boolean\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('radio-button', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t\tthis.sortOptions = sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<RadioButton>): RadioButton {\n\t\treturn new RadioButton(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class CheckBox extends Field {\n\tconstructor(\n\t\tlabel: string,\n\t\t{\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\tsortOptions,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tgrows?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\ttags?: string[]\n\t\t\tcodifications?: string[]\n\t\t\treadonly?: boolean\n\t\t\toptions?: { [_key: string]: unknown }\n\t\t\tvalue?: string\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\tvalidators?: Validator[]\n\t\t\ttranslate?: boolean\n\t\t\tsortOptions?: SortOptions\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { width: number; direction: string; span: number; rows: number; alignItems: string }\n\t\t},\n\t) {\n\t\tsuper('checkbox', label, {\n\t\t\tshortLabel,\n\t\t\tgrows,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\ttags,\n\t\t\tcodifications,\n\t\t\treadonly,\n\t\t\toptions,\n\t\t\tvalue,\n\t\t\tcomputedProperties,\n\t\t\tvalidators,\n\t\t\ttranslate,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t})\n\t\tthis.sortOptions = sortOptions ?? undefined\n\t}\n\toverride copy(properties: Partial<CheckBox>): CheckBox {\n\t\treturn new CheckBox(this.field, { ...this, ...properties })\n\t}\n}\nexport class Label extends Field {\n\tconstructor(label: string, { shortLabel, grows, span }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number }) {\n\t\tsuper('label', label, { shortLabel, grows, span })\n\t}\n\toverride copy(properties: Partial<Label>): Label {\n\t\treturn new Label(this.field, { ...this, ...properties })\n\t}\n}\n\nexport class ActionButton extends Field {\n\tconstructor(label: string, { shortLabel, grows, span }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number }) {\n\t\tsuper('action', label, { shortLabel, grows, span })\n\t}\n\toverride copy(properties: Partial<ActionButton>): ActionButton {\n\t\treturn new ActionButton(this.field, { ...this, ...properties })\n\t}\n}\nexport class Group {\n\tclazz = 'group' as const\n\tgroup: string\n\tborderless: boolean\n\ttranslate: boolean\n\tfields?: Array<Field | Group | Subform>\n\tspan?: number\n\trowSpan?: number\n\tcomputedProperties?: { [_key: string]: string }\n\twidth?: number\n\tstyleOptions?: { [_key: string]: unknown }\n\n\tconstructor(\n\t\ttitle: string,\n\t\tfields: Array<Field | Group | Subform>,\n\t\t{\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tborderless,\n\t\t\ttranslate,\n\t\t\tcomputedProperties,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tborderless?: boolean\n\t\t\ttranslate?: boolean\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { [_key: string]: unknown }\n\t\t},\n\t) {\n\t\tthis.group = title\n\t\tthis.fields = fields\n\t\tthis.borderless = borderless ?? false\n\t\tthis.translate = translate ?? true\n\t\tthis.fields = fields\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.computedProperties = computedProperties\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t}\n\n\tcopy(properties: Partial<Group>): Group {\n\t\treturn new Group(this.group, this.fields ?? [], { ...this, ...properties })\n\t}\n\n\tstatic parse({\n\t\tborderless,\n\t\tspan,\n\t\tcomputedProperties,\n\t\tfields,\n\t\tgroup,\n\t\ttranslate,\n\t\twidth,\n\t}: {\n\t\tgroup: string\n\t\tfields?: Array<Field | Group | Subform>\n\t\tborderless?: boolean\n\t\ttranslate?: boolean\n\t\tspan?: number\n\t\trowSpan?: number\n\t\tcomputedProperties?: { [_key: string]: string }\n\t\twidth?: number\n\t}): Group {\n\t\treturn new Group(\n\t\t\tgroup,\n\t\t\t(fields || []).map((s: Field | Group | Subform) =>\n\t\t\t\t(s as Group)['group'] ? Group.parse(s as Group) : (s as Subform)['forms'] ? Subform.parse(s as Subform & { subform: string }) : Field.parse(s as Field),\n\t\t\t),\n\t\t\t{\n\t\t\t\tspan: span,\n\t\t\t\tborderless: borderless,\n\t\t\t\ttranslate: translate,\n\t\t\t\tcomputedProperties: computedProperties,\n\t\t\t\twidth: width,\n\t\t\t},\n\t\t)\n\t}\n\n\ttoJson(): any {\n\t\treturn {\n\t\t\tgroup: this.group,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\tfields: this.fields?.map((f: Field | Group) => f.toJson()),\n\t\t\tborderless: this.borderless,\n\t\t\ttranslatable: this.translate,\n\t\t\tspan: this.span,\n\t\t\twidth: this.width,\n\t\t}\n\t}\n}\n\nexport class Subform {\n\tclazz = 'subform' as const\n\tid: string\n\tshortLabel?: string\n\tforms: { [key: string]: Form }\n\tspan?: number\n\trowSpan?: number\n\tcomputedProperties?: { [_key: string]: string }\n\twidth?: number\n\tstyleOptions?: { [_key: string]: unknown }\n\n\tconstructor(\n\t\ttitle: string,\n\t\tforms: { [key: string]: Form },\n\t\t{\n\t\t\tshortLabel,\n\t\t\tspan,\n\t\t\trowSpan,\n\t\t\tcomputedProperties,\n\t\t\twidth,\n\t\t\tstyleOptions,\n\t\t}: {\n\t\t\tshortLabel?: string\n\t\t\tspan?: number\n\t\t\trowSpan?: number\n\t\t\tcomputedProperties?: { [_key: string]: string }\n\t\t\twidth?: number\n\t\t\tstyleOptions?: { [_key: string]: unknown }\n\t\t},\n\t) {\n\t\tthis.id = title\n\t\tthis.shortLabel = shortLabel\n\t\tthis.forms = forms\n\t\tthis.span = span\n\t\tthis.rowSpan = rowSpan\n\t\tthis.computedProperties = computedProperties\n\t\tthis.width = width\n\t\tthis.styleOptions = styleOptions\n\t}\n\n\tcopy(properties: Partial<Subform>): Subform {\n\t\treturn new Subform(this.id, this.forms, { ...this, ...properties })\n\t}\n\n\tstatic parse(json: {\n\t\tsubform: string\n\t\tshortLabel?: string\n\t\tforms: { [key: string]: Form }\n\t\tspan?: number\n\t\trowSpan?: number\n\t\tcomputedProperties?: { [_key: string]: string }\n\t\twidth?: number\n\t\tstyleOptions?: { [_key: string]: unknown }\n\t}): Subform {\n\t\treturn new Subform(json.subform, json.forms, {\n\t\t\tshortLabel: json.shortLabel,\n\t\t\tspan: json.span,\n\t\t\tcomputedProperties: json.computedProperties,\n\t\t\twidth: json.width,\n\t\t\tstyleOptions: json.styleOptions,\n\t\t})\n\t}\n\n\ttoJson(): any {\n\t\treturn {\n\t\t\tsubform: this.id,\n\t\t\tshortLabel: this.shortLabel,\n\t\t\tforms: this.forms,\n\t\t\tspan: this.span,\n\t\t\tcomputedProperties: this.computedProperties,\n\t\t\twidth: this.width,\n\t\t\tstyleOptions: this.styleOptions,\n\t\t}\n\t}\n}\nexport class Section {\n\tsection: string\n\tfields: Array<Field | Group | Subform>\n\tdescription?: string\n\tkeywords?: string[]\n\n\tconstructor(title: string, fields: Array<Field | Group | Subform>, description?: string, keywords?: string[]) {\n\t\tthis.section = title\n\t\tthis.fields = fields\n\t\tthis.description = description\n\t\tthis.keywords = keywords\n\t}\n\n\tstatic parse(json: {\n\t\tsection: string\n\t\tfields?: Array<Field | Group | Subform>\n\t\tgroups?: Array<Field | Group | Subform>\n\t\tsections?: Array<Field | Group | Subform>\n\t\tdescription?: string\n\t\tkeywords?: string[]\n\t}): Section {\n\t\treturn new Section(\n\t\t\tjson.section,\n\t\t\t(json.fields ?? json.groups ?? json.sections ?? []).map((s: Field | Group | Subform) =>\n\t\t\t\t(s as Group)['group'] ? Group.parse(s as Group) : (s as Subform)['forms'] ? Subform.parse(s as Subform & { subform: string }) : Field.parse(s as Field),\n\t\t\t),\n\t\t\tjson.description,\n\t\t\tjson.keywords,\n\t\t)\n\t}\n\n\ttoJson(): {\n\t\tsection: string\n\t\tkeywords?: string[]\n\t\tdescription?: string\n\t\tfields: (Field | Group | Subform)[]\n\t} {\n\t\treturn {\n\t\t\tsection: this.section,\n\t\t\tfields: this.fields.map((f: Field | Group | Subform) => f.toJson()),\n\t\t\tdescription: this.description,\n\t\t\tkeywords: this.keywords,\n\t\t}\n\t}\n}\n\nexport class Codification {\n\ttype: string\n\tcodes: Code[]\n\n\tconstructor(type: string, codes: Code[]) {\n\t\tthis.type = type\n\t\tthis.codes = codes\n\t}\n\n\tstatic parse(json: { type: string; codes: Code[] }): Codification {\n\t\treturn new Codification(json.type, json.codes)\n\t}\n\n\t// noinspection JSUnusedGlobalSymbols\n\ttoJson(): { type: string; codes: Code[] } {\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tcodes: this.codes,\n\t\t}\n\t}\n}\n\nexport class TranslationTable {\n\tlanguage: string\n\ttranslations: { [key: string]: string }\n\n\tconstructor(language: string, translations: { [key: string]: string }) {\n\t\tthis.language = language\n\t\tthis.translations = translations\n\t}\n\n\tstatic parse(json: { language: string; translations: { [key: string]: string } }): TranslationTable {\n\t\treturn new TranslationTable(json.language, json.translations)\n\t}\n\n\t// noinspection JSUnusedGlobalSymbols\n\ttoJson(): { language: string; translations: { [key: string]: string } } {\n\t\treturn {\n\t\t\tlanguage: this.language,\n\t\t\ttranslations: this.translations,\n\t\t}\n\t}\n}\n\nexport class Form {\n\tform: string\n\tsections: Section[]\n\tid?: string\n\tdescription?: string\n\tkeywords?: string[]\n\tcodifications?: Codification[]\n\ttranslations?: TranslationTable[]\n\n\tconstructor(title: string, sections: Section[], id?: string, description?: string, keywords?: string[], codifications?: Codification[], translations?: TranslationTable[]) {\n\t\tthis.form = title\n\t\tthis.description = description\n\t\tthis.id = id\n\t\tthis.keywords = keywords\n\t\tthis.sections = sections\n\t\tthis.codifications = codifications\n\t\tthis.translations = translations\n\t}\n\n\tstatic parse(json: {\n\t\tform: string\n\t\tsections: Section[]\n\t\tid?: string\n\t\tdescription?: string\n\t\tkeywords?: string[]\n\t\tcodifications?: Codification[]\n\t\ttranslations: TranslationTable[]\n\t}): Form {\n\t\treturn new Form(\n\t\t\tjson.form,\n\t\t\t(json.sections || []).map((s: Section) => Section.parse(s)),\n\t\t\tjson.id,\n\t\t\tjson.description,\n\t\t\tjson.keywords,\n\t\t\tjson.codifications?.map((c: Codification) => Codification.parse(c)),\n\t\t\tjson.translations?.map((t: TranslationTable) => TranslationTable.parse(t)),\n\t\t)\n\t}\n\n\t// noinspection JSUnusedGlobalSymbols\n\ttoJson(): {\n\t\tform: string\n\t\tkeywords?: string[]\n\t\tdescription?: string\n\t\tsections: { section: string; keywords?: string[]; description?: string; fields: any[] }[]\n\t} {\n\t\treturn {\n\t\t\tform: this.form,\n\t\t\tsections: this.sections.map((s: Section) => s.toJson()),\n\t\t\tdescription: this.description,\n\t\t\tkeywords: this.keywords,\n\t\t}\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|