@icure/form 3.0.38 → 3.0.39

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.
Files changed (81) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/components/common/field.d.ts +1 -0
  3. package/components/common/field.js +5 -0
  4. package/components/common/field.js.map +1 -1
  5. package/components/common/metadata-buttons-bar.js +4 -0
  6. package/components/common/metadata-buttons-bar.js.map +1 -1
  7. package/components/icure-button/index.js +4 -0
  8. package/components/icure-button/index.js.map +1 -1
  9. package/components/icure-button-group/index.js +4 -0
  10. package/components/icure-button-group/index.js.map +1 -1
  11. package/components/icure-date-picker/index.js +4 -0
  12. package/components/icure-date-picker/index.js.map +1 -1
  13. package/components/icure-dropdown-field/index.js +4 -0
  14. package/components/icure-dropdown-field/index.js.map +1 -1
  15. package/components/icure-form/fields/button-group/checkbox.d.ts +1 -0
  16. package/components/icure-form/fields/button-group/checkbox.js +39 -2
  17. package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
  18. package/components/icure-form/fields/button-group/radio-button.d.ts +1 -0
  19. package/components/icure-form/fields/button-group/radio-button.js +39 -2
  20. package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
  21. package/components/icure-form/fields/date-picker/date-picker.d.ts +1 -0
  22. package/components/icure-form/fields/date-picker/date-picker.js +54 -17
  23. package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
  24. package/components/icure-form/fields/date-picker/date-time-picker.d.ts +1 -0
  25. package/components/icure-form/fields/date-picker/date-time-picker.js +54 -17
  26. package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
  27. package/components/icure-form/fields/date-picker/time-picker.d.ts +1 -0
  28. package/components/icure-form/fields/date-picker/time-picker.js +54 -17
  29. package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
  30. package/components/icure-form/fields/dropdown/dropdown-field.d.ts +1 -0
  31. package/components/icure-form/fields/dropdown/dropdown-field.js +39 -2
  32. package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
  33. package/components/icure-form/fields/items-list-field/items-list-field.d.ts +1 -0
  34. package/components/icure-form/fields/items-list-field/items-list-field.js +55 -17
  35. package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
  36. package/components/icure-form/fields/measure-field/measure-field.d.ts +1 -0
  37. package/components/icure-form/fields/measure-field/measure-field.js +39 -2
  38. package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
  39. package/components/icure-form/fields/number-field/number-field.d.ts +1 -0
  40. package/components/icure-form/fields/number-field/number-field.js +55 -18
  41. package/components/icure-form/fields/number-field/number-field.js.map +1 -1
  42. package/components/icure-form/fields/text-field/text-field.d.ts +1 -0
  43. package/components/icure-form/fields/text-field/text-field.js +65 -28
  44. package/components/icure-form/fields/text-field/text-field.js.map +1 -1
  45. package/components/icure-form/fields/token-field/token-field.d.ts +1 -0
  46. package/components/icure-form/fields/token-field/token-field.js +55 -17
  47. package/components/icure-form/fields/token-field/token-field.js.map +1 -1
  48. package/components/icure-form/fields/utils/index.d.ts +1 -0
  49. package/components/icure-form/fields/utils/index.js +2 -0
  50. package/components/icure-form/fields/utils/index.js.map +1 -1
  51. package/components/icure-form/index.d.ts +1 -1
  52. package/components/icure-form/index.js +26 -5
  53. package/components/icure-form/index.js.map +1 -1
  54. package/components/icure-form/renderer/form/form-selection-button.js +4 -0
  55. package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
  56. package/components/icure-form/renderer/form/form.d.ts +7 -2
  57. package/components/icure-form/renderer/form/form.js +618 -454
  58. package/components/icure-form/renderer/form/form.js.map +1 -1
  59. package/components/icure-form/renderer/index.d.ts +1 -1
  60. package/components/icure-form/renderer/index.js.map +1 -1
  61. package/components/icure-label/index.js +4 -0
  62. package/components/icure-label/index.js.map +1 -1
  63. package/components/icure-text-field/index.js +10 -11
  64. package/components/icure-text-field/index.js.map +1 -1
  65. package/components/model/index.d.ts +15 -1
  66. package/components/model/index.js +13 -2
  67. package/components/model/index.js.map +1 -1
  68. package/generic/model.d.ts +6 -6
  69. package/generic/model.js.map +1 -1
  70. package/icure/form-values-container.d.ts +63 -42
  71. package/icure/form-values-container.js +180 -139
  72. package/icure/form-values-container.js.map +1 -1
  73. package/icure/icure-utils.js +30 -12
  74. package/icure/icure-utils.js.map +1 -1
  75. package/icure/model.d.ts +9 -2
  76. package/icure/model.js +7 -1
  77. package/icure/model.js.map +1 -1
  78. package/package.json +1 -1
  79. package/utils/code-utils.d.ts +3 -2
  80. package/utils/code-utils.js +5 -6
  81. package/utils/code-utils.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/model/index.ts"],"names":[],"mappings":"AA2EA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAA4B,EAAE,CAA4B,EAAW,EAAE;IAC3F,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAA;IACb,CAAC;IACD,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,OAAK,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,CAAA,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACb,CAAC;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,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAChG,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CA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EAAE,CAAC;YACvD,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAA;IACF,CAAC;CACD","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\t//The metadata values that are considered as exceptional\n\tdiscordantMetadata?: () => Partial<FieldMetadata>\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 type Position = 'top' | 'left' | 'right' | 'bottom' | 'float' | 'add' | 'remove'\n\nexport type Labels = Partial<Record<Position, string>>\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 = DocumentSchema | TokensSchema | ItemsListSchema | StyledSchema | InlineSchema | DateSchema | TimeSchema | DateTimeSchema | DecimalSchema | 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\tevent?: string\n\tpayload?: unknown\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\tevent,\n\t\t\tpayload,\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\tevent?: string\n\t\t\tpayload?: unknown\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\tthis.event = event\n\t\tthis.payload = payload\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\taction: () => new Button(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\tvalidators: options.validators,\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\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\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\thasOther,\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 Button extends Field {\n\tconstructor(label: string, { shortLabel, grows, span, event, payload }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number; event?: string; payload?: unknown }) {\n\t\tsuper('action', label, { shortLabel, grows, span, event, payload })\n\t}\n\toverride copy(properties: Partial<Button>): Button {\n\t\treturn new Button(this.field, { ...this, ...properties })\n\t}\n}\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']\n\t\t\t\t\t? Group.parse(s as Group)\n\t\t\t\t\t: (s as unknown as { subform: string })['subform'] || (s as Subform)['forms'] || (s as Subform)['refs']\n\t\t\t\t\t? Subform.parse(s as Subform & { subform: string })\n\t\t\t\t\t: 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\trefs?: 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\tlabels: Labels\n\n\tconstructor(\n\t\ttitle: string,\n\t\tforms: { [key: string]: Form },\n\t\t{\n\t\t\tid,\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\trefs,\n\t\t\tlabels,\n\t\t}: {\n\t\t\tid?: string\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\trefs?: string[]\n\t\t\tlabels?: Labels\n\t\t},\n\t) {\n\t\tthis.id = 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\tthis.refs = refs\n\t\tthis.labels = labels ?? {}\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\trefs?: string[]\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\tlabels?: Labels\n\t\tid: string\n\t}): Subform {\n\t\treturn new Subform(json.subform, json.forms ?? {}, {\n\t\t\tid: json.id,\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\trefs: json.refs,\n\t\t\tlabels: json.labels,\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: Object.fromEntries(Object.entries(this.forms).map(([k, f]) => [k, f.toJson()])),\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']\n\t\t\t\t\t? Group.parse(s as Group)\n\t\t\t\t\t: (s as unknown as { subform: string })['subform'] || (s as Subform)['forms'] || (s as Subform)['refs']\n\t\t\t\t\t? Subform.parse(s as Subform & { subform: string })\n\t\t\t\t\t: 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 && f.toJson ? f.toJson() : JSON.stringify(f))),\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(\n\t\t\tjson.type,\n\t\t\tjson.codes.map((code) => {\n\t\t\t\tconst parts = code.id.split('|')\n\t\t\t\tif (parts.length === 1) {\n\t\t\t\t\treturn { ...code, id: `${json.type}|${code.id}|1` }\n\t\t\t\t} else if (parts.length === 2) {\n\t\t\t\t\treturn { ...code, id: `${code.id}|1` }\n\t\t\t\t} else {\n\t\t\t\t\treturn code\n\t\t\t\t}\n\t\t\t}),\n\t\t)\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(\n\t\tjson: {\n\t\t\tform: string\n\t\t\tsections: Section[]\n\t\t\tid?: string\n\t\t\tdescription?: string\n\t\t\tkeywords?: string[]\n\t\t\tcodifications?: Codification[]\n\t\t\ttranslations?: TranslationTable[]\n\t\t\tsubForms?: { [key: string]: Form }\n\t\t},\n\t\tlibrary: Form[] = [],\n\t\tsubforms: { [key: string]: Form } = {},\n\t): Form {\n\t\tconst parsed = 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\n\t\tconst allSubforms = { ...subforms, ...(json.subForms || {}) }\n\n\t\tconst resolveAndCheckConsistencyInSubForm = (f: Subform, seenSubformId: string[]) => {\n\t\t\tif (seenSubformId.includes(f.id)) {\n\t\t\t\tthrow new Error(`Subform ${f.id} is already declared in this form`)\n\t\t\t}\n\t\t\tseenSubformId.push(f.id)\n\t\t\tObject.entries((f as Subform).forms ?? {}).forEach(([k, subForm]) => {\n\t\t\t\tf.forms[k] = Form.parse({ ...subForm, id: k }, library, allSubforms)\n\t\t\t})\n\t\t\t;(f as Subform).refs?.forEach((r) => {\n\t\t\t\tconst subForm = allSubforms?.[r]\n\t\t\t\tconst form = subForm ? Form.parse({ ...subForm, id: r }, library, allSubforms) : library.find((f) => f.id === r)\n\t\t\t\tif (!form) {\n\t\t\t\t\tthrow new Error(`Subform ${r} not found in top subForms declarations or the provided library of forms`)\n\t\t\t\t}\n\t\t\t\tf.forms[r] = form\n\t\t\t})\n\t\t\tObject.entries(f.forms).forEach(([, f]) => resolveAndCheckConsistencyInForm(f, seenSubformId))\n\t\t}\n\n\t\tconst resolveAndCheckConsistencyInForm = (f: Form, seenSubformId: string[] = []) => {\n\t\t\tf.sections.forEach((s: Section) => {\n\t\t\t\ts.fields.forEach((f: Field | Group | Subform) => {\n\t\t\t\t\tif (f.clazz === 'group') {\n\t\t\t\t\t\tresolveAndCheckConsistencyInGroup(f, seenSubformId)\n\t\t\t\t\t} else if (f.clazz === 'subform') {\n\t\t\t\t\t\tresolveAndCheckConsistencyInSubForm(f, seenSubformId)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn f\n\t\t}\n\n\t\tconst resolveAndCheckConsistencyInGroup = (g: Group, seenSubformId: string[]) => {\n\t\t\tg.fields?.forEach((f: Field | Group | Subform) => {\n\t\t\t\tif (f.clazz === 'group') {\n\t\t\t\t\tresolveAndCheckConsistencyInGroup(f, seenSubformId)\n\t\t\t\t} else if (f.clazz === 'subform') {\n\t\t\t\t\tresolveAndCheckConsistencyInSubForm(f, seenSubformId)\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn g\n\t\t}\n\n\t\treturn resolveAndCheckConsistencyInForm(parsed, [])\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../tmp/components/model/index.ts"],"names":[],"mappings":"AAmFA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAA4B,EAAE,CAA4B,EAAW,EAAE;IAC3F,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAA;IACb,CAAC;IACD,IAAI,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,OAAK,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,IAAI,CAAA,EAAE,CAAC;QACzB,OAAO,KAAK,CAAA;IACb,CAAC;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,IAAI,KAAK,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QAChG,OAAO,IAAI,CAAA;IACZ,CAAC;IACD,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,IAAI,CAAC,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QACpD,OAAO,MAAM,CAAC,IAAI,CAAC,C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,KAAK,OAAO,EAAE,CAAC;wBACzB,iCAAiC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;oBACpD,CAAC;yBAAM,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;wBAClC,mCAAmC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;oBACtD,CAAC;gBACF,CAAC,CAAC,CAAA;YACH,CAAC,CAAC,CAAA;YACF,OAAO,CAAC,CAAA;QACT,CAAC,CAAA;QAED,MAAM,iCAAiC,GAAG,CAAC,CAAQ,EAAE,aAAuB,EAAE,EAAE;;YAC/E,MAAA,CAAC,CAAC,MAAM,0CAAE,OAAO,CAAC,CAAC,CAA0B,EAAE,EAAE;gBAChD,IAAI,CAAC,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;oBACzB,iCAAiC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;gBACpD,CAAC;qBAAM,IAAI,CAAC,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;oBAClC,mCAAmC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAA;gBACtD,CAAC;YACF,CAAC,CAAC,CAAA;YACF,OAAO,CAAC,CAAA;QACT,CAAC,CAAA;QAED,OAAO,gCAAgC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACpD,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","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\n//Most generic metadata interface\nexport interface Metadata {\n\tlabel: string\n\tindex?: number\n\tvalueDate?: number\n\ttags?: { id: string }[]\n}\n\nexport interface FieldMetadata extends Metadata {\n\tlabel: string\n\tindex?: number\n\tvalueDate?: number\n\towner?: string\n\ttags?: Code[]\n\n\t//The metadata values that are considered as exceptional\n\tdiscordantMetadata?: () => Partial<FieldMetadata>\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 type Position = 'top' | 'left' | 'right' | 'bottom' | 'float' | 'add' | 'remove'\n\nexport type Labels = Partial<Record<Position, string>>\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 = DocumentSchema | TokensSchema | ItemsListSchema | StyledSchema | InlineSchema | DateSchema | TimeSchema | DateTimeSchema | DecimalSchema | 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\tcomputedPropertiesDependencies?: { [_key: string]: string[] | undefined }\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\tevent?: string\n\tpayload?: unknown\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\tevent,\n\t\t\tpayload,\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\tevent?: string\n\t\t\tpayload?: unknown\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\t;[this.computedProperties, this.computedPropertiesDependencies] = canonizeAndComputeDependencies(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\tthis.event = event\n\t\tthis.payload = payload\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\taction: () => new Button(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\tvalidators: options.validators,\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\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\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\thasOther,\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 Button extends Field {\n\tconstructor(label: string, { shortLabel, grows, span, event, payload }: { shortLabel?: string; grows?: boolean; span?: number; rowSpan?: number; event?: string; payload?: unknown }) {\n\t\tsuper('action', label, { shortLabel, grows, span, event, payload })\n\t}\n\toverride copy(properties: Partial<Button>): Button {\n\t\treturn new Button(this.field, { ...this, ...properties })\n\t}\n}\n\nfunction canonizeAndComputeDependencies(computedProperties: { [p: string]: string } | undefined): [{ [_key: string]: string }, { [_key: string]: string[] | undefined }] {\n\treturn [\n\t\tObject.entries(computedProperties ?? {}).reduce(\n\t\t\t(acc, [key, value]) => ({\n\t\t\t\t...acc,\n\t\t\t\t[key.replace(/\\(.*\\)/, '')]: value,\n\t\t\t}),\n\t\t\t{},\n\t\t),\n\t\tObject.keys(computedProperties ?? {}).reduce(\n\t\t\t(acc, key) => ({\n\t\t\t\t...acc,\n\t\t\t\t[key.replace(/\\(.*\\)/, '')]: key.includes('(')\n\t\t\t\t\t? key\n\t\t\t\t\t\t\t.replace(/.+\\((.*)\\)/, '$1')\n\t\t\t\t\t\t\t.split(',')\n\t\t\t\t\t\t\t.filter((x) => x.length)\n\t\t\t\t\t: undefined,\n\t\t\t}),\n\t\t\t{},\n\t\t),\n\t]\n}\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\tcomputedPropertiesDependencies?: { [_key: string]: string[] | undefined }\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\t;[this.computedProperties, this.computedPropertiesDependencies] = canonizeAndComputeDependencies(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']\n\t\t\t\t\t? Group.parse(s as Group)\n\t\t\t\t\t: (s as unknown as { subform: string })['subform'] || (s as Subform)['forms'] || (s as Subform)['refs']\n\t\t\t\t\t? Subform.parse(s as Subform & { subform: string })\n\t\t\t\t\t: 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\trefs?: 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\tlabels: Labels\n\n\tconstructor(\n\t\ttitle: string,\n\t\tforms: { [key: string]: Form },\n\t\t{\n\t\t\tid,\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\trefs,\n\t\t\tlabels,\n\t\t}: {\n\t\t\tid?: string\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\trefs?: string[]\n\t\t\tlabels?: Labels\n\t\t},\n\t) {\n\t\tthis.id = 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\tthis.refs = refs\n\t\tthis.labels = labels ?? {}\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\trefs?: string[]\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\tlabels?: Labels\n\t\tid: string\n\t}): Subform {\n\t\treturn new Subform(json.subform, json.forms ?? {}, {\n\t\t\tid: json.id,\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\trefs: json.refs,\n\t\t\tlabels: json.labels,\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: Object.fromEntries(Object.entries(this.forms).map(([k, f]) => [k, f.toJson()])),\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']\n\t\t\t\t\t? Group.parse(s as Group)\n\t\t\t\t\t: (s as unknown as { subform: string })['subform'] || (s as Subform)['forms'] || (s as Subform)['refs']\n\t\t\t\t\t? Subform.parse(s as Subform & { subform: string })\n\t\t\t\t\t: 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 && f.toJson ? f.toJson() : JSON.stringify(f))),\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(\n\t\t\tjson.type,\n\t\t\tjson.codes.map((code) => {\n\t\t\t\tconst parts = code.id.split('|')\n\t\t\t\tif (parts.length === 1) {\n\t\t\t\t\treturn { ...code, id: `${json.type}|${code.id}|1` }\n\t\t\t\t} else if (parts.length === 2) {\n\t\t\t\t\treturn { ...code, id: `${code.id}|1` }\n\t\t\t\t} else {\n\t\t\t\t\treturn code\n\t\t\t\t}\n\t\t\t}),\n\t\t)\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(\n\t\tjson: {\n\t\t\tform: string\n\t\t\tsections: Section[]\n\t\t\tid?: string\n\t\t\tdescription?: string\n\t\t\tkeywords?: string[]\n\t\t\tcodifications?: Codification[]\n\t\t\ttranslations?: TranslationTable[]\n\t\t\tsubForms?: { [key: string]: Form }\n\t\t},\n\t\tlibrary: Form[] = [],\n\t\tsubforms: { [key: string]: Form } = {},\n\t): Form {\n\t\tconst parsed = 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\n\t\tconst allSubforms = { ...subforms, ...(json.subForms || {}) }\n\n\t\tconst resolveAndCheckConsistencyInSubForm = (f: Subform, seenSubformId: string[]) => {\n\t\t\tif (seenSubformId.includes(f.id)) {\n\t\t\t\tthrow new Error(`Subform ${f.id} is already declared in this form`)\n\t\t\t}\n\t\t\tseenSubformId.push(f.id)\n\t\t\tObject.entries((f as Subform).forms ?? {}).forEach(([k, subForm]) => {\n\t\t\t\tf.forms[k] = Form.parse({ ...subForm, id: k }, library, allSubforms)\n\t\t\t})\n\t\t\t;(f as Subform).refs?.forEach((r) => {\n\t\t\t\tconst subForm = allSubforms?.[r]\n\t\t\t\tconst form = subForm ? Form.parse({ ...subForm, id: r }, library, allSubforms) : library.find((f) => f.id === r)\n\t\t\t\tif (!form) {\n\t\t\t\t\tthrow new Error(`Subform ${r} not found in top subForms declarations or the provided library of forms`)\n\t\t\t\t}\n\t\t\t\tf.forms[r] = form\n\t\t\t})\n\t\t\tObject.entries(f.forms).forEach(([, f]) => resolveAndCheckConsistencyInForm(f, seenSubformId))\n\t\t}\n\n\t\tconst resolveAndCheckConsistencyInForm = (f: Form, seenSubformId: string[] = []) => {\n\t\t\tf.sections.forEach((s: Section) => {\n\t\t\t\ts.fields.forEach((f: Field | Group | Subform) => {\n\t\t\t\t\tif (f.clazz === 'group') {\n\t\t\t\t\t\tresolveAndCheckConsistencyInGroup(f, seenSubformId)\n\t\t\t\t\t} else if (f.clazz === 'subform') {\n\t\t\t\t\t\tresolveAndCheckConsistencyInSubForm(f, seenSubformId)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t\t\treturn f\n\t\t}\n\n\t\tconst resolveAndCheckConsistencyInGroup = (g: Group, seenSubformId: string[]) => {\n\t\t\tg.fields?.forEach((f: Field | Group | Subform) => {\n\t\t\t\tif (f.clazz === 'group') {\n\t\t\t\t\tresolveAndCheckConsistencyInGroup(f, seenSubformId)\n\t\t\t\t} else if (f.clazz === 'subform') {\n\t\t\t\t\tresolveAndCheckConsistencyInSubForm(f, seenSubformId)\n\t\t\t\t}\n\t\t\t})\n\t\t\treturn g\n\t\t}\n\n\t\treturn resolveAndCheckConsistencyInForm(parsed, [])\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"]}
@@ -1,4 +1,4 @@
1
- import { FieldMetadata, FieldValue } from '../components/model';
1
+ import { FieldMetadata, Metadata as GenericMetadata } from '../components/model';
2
2
  /**
3
3
  * VersionedData is a structure that contains the values of a form, organized by id and version.
4
4
  */
@@ -51,20 +51,20 @@ export interface FormValuesContainer<Value, Metadata> {
51
51
  compute<T, S extends {
52
52
  [key: string | symbol]: unknown;
53
53
  }>(formula: string, sandbox?: S): Promise<T | undefined>;
54
+ isFieldBeingComputed(label: string): boolean;
54
55
  getLabel(): string;
55
56
  getFormId(): string | undefined;
56
- getDefaultValue(label: string): Promise<FieldValue | undefined>;
57
57
  getValues(revisionsFilter: (id: string, history: Version<Metadata>[]) => (string | null)[]): VersionedData<Value>;
58
58
  getMetadata(id: string, revisions: (string | null)[]): VersionedData<Metadata>;
59
59
  getChildren(): Promise<FormValuesContainer<Value, Metadata>[]>;
60
60
  getValidationErrors(): Promise<[FieldMetadata, string][]>;
61
- setValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata, changeListenersOverrider?: (fvc: FormValuesContainer<Value, Metadata>) => void): void;
62
- setMetadata(metadata: Metadata, id?: string): void;
61
+ setValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata, changeListenersOverrider?: (fvc: FormValuesContainer<Value, Metadata>) => void): boolean;
62
+ setMetadata(metadata: Metadata, id?: string): boolean;
63
63
  delete(serviceId: string): void;
64
64
  addChild(anchorId: string, templateId: string, label: string): Promise<void>;
65
65
  removeChild(container: FormValuesContainer<Value, Metadata>): Promise<void>;
66
- registerChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void;
67
- unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void;
66
+ registerChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>, modifiedFields: GenericMetadata[]) => void): void;
67
+ unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>, modifiedFields: GenericMetadata[]) => void): void;
68
68
  synchronise(): FormValuesContainer<Value, Metadata>;
69
69
  }
70
70
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../tmp/generic/model.ts"],"names":[],"mappings":"","sourcesContent":["import { FieldMetadata, FieldValue } from '../components/model'\n\n/**\n * VersionedData is a structure that contains the values of a form, organized by id and version.\n */\nexport interface VersionedData<T> {\n\t[id: string]: Version<T>[]\n}\n\n/**\n * Version is a structure that contains a value, a revision number and a modification timestamp used to sort the versions.\n */\nexport interface Version<T> {\n\trevision: string | null //null means that the version is not saved yet\n\tmodified?: number\n\tvalue: T\n}\n\nexport type ID = string\n/**\n * FormValuesContainer is a readonly structure that provides and handle the values of a form.\n * It is a tree structure where each node is a FormValuesContainer with the same Value and Metadata types.\n *\n * The following methods are provided and must be implemented by the concrete class:\n * - `compute(formula: string, sandbox?: S): T?` : computes a formula based on the values of the form, inside a provided sandbox. If no sandbox is provided, the default sandbox is used.\n * - `getLabel(): string` : returns the label of the form values container (used to display the title of the form in hierarchical contexts)\n * - `getFormId(): string?` : returns the id of the form values container\n * - `getValues(revisionsFilter: Lambda): VersionedData<Value>` : obtains the values to be displayed in the form, using a filter\n * \t\t\tto select the desired versioned data that are to be displayed in a specific field.\n * - `getMetadata(id: string, revisions: (string | null)[]): VersionedData<Metadata>` : obtains the metadata of a specific value, for the specified revisions.\n * - `getValidationErrors(): [FieldMetadata, string][]`: returns the validation errors of the form values container for the values that are currently stored in it.\n * - `getChildren(): FormValuesContainer<Value, Metadata>[]` : returns the children of the form values container\n * - `setValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, ID>` :\n * \t\t\tmodifies the value associated to a field in the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container along with the modified value.\n * - `setMetadata(label: string, metadata: Metadata, id?: string): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, ID>` :\n * \t\t\tmodifies the metadata associated to a value in the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container along with the modified metadata.\n * - `delete(valueId: string): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, void>` :\n * \t\t\tdeletes a value from the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container without the deleted value.\n * - `addChild(anchorId: string, templateId: string, label: string): Promise<FormValuesContainerMutation<...>, FormValuesContainer<...>>>`:\n * \t\t\tadds a child to the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container with the added child.\n * - `removeChild(container: FormValuesContainer<Value, Metadata>): Promise<FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, void>>` :\n * \t\t\tremoves a child from the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container without the removed child.\n * - `registerChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void` :\n * \t\t\tregisters a listener that will be called whenever the form values container is modified.\n * - `unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void` : unregisters a listener that was previously registered.\n *\n */\nexport interface FormValuesContainer<Value, Metadata> {\n\t//information retrieval\n\tcompute<T, S extends { [key: string | symbol]: unknown }>(formula: string, sandbox?: S): Promise<T | undefined>\n\tgetLabel(): string\n\tgetFormId(): string | undefined\n\tgetDefaultValue(label: string): Promise<FieldValue | undefined>\n\tgetValues(revisionsFilter: (id: string, history: Version<Metadata>[]) => (string | null)[]): VersionedData<Value>\n\tgetMetadata(id: string, revisions: (string | null)[]): VersionedData<Metadata>\n\tgetChildren(): Promise<FormValuesContainer<Value, Metadata>[]>\n\tgetValidationErrors(): Promise<[FieldMetadata, string][]>\n\t//modification\n\tsetValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata, changeListenersOverrider?: (fvc: FormValuesContainer<Value, Metadata>) => void): void\n\tsetMetadata(metadata: Metadata, id?: string): void\n\tdelete(serviceId: string): void\n\t//hierarchy\n\taddChild(anchorId: string, templateId: string, label: string): Promise<void>\n\tremoveChild(container: FormValuesContainer<Value, Metadata>): Promise<void>\n\t//listeners\n\tregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void\n\tunregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void\n\n\tsynchronise(): FormValuesContainer<Value, Metadata>\n}\n\n/**\n * FormValuesContainerMutation is a structure that wraps a new form values container along with the modified value.\n */\nexport interface FormValuesContainerMutation<Value, Metadata, FVC extends FormValuesContainer<Value, Metadata>, Result> {\n\tresult: Result\n\tformValuesContainer: FVC\n}\n\nexport type Suggestion = { id: string; code?: string; text: string; terms: string[]; label: { [lng: string]: string } }\n"]}
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../tmp/generic/model.ts"],"names":[],"mappings":"","sourcesContent":["import { FieldMetadata, Metadata as GenericMetadata } from '../components/model'\n\n/**\n * VersionedData is a structure that contains the values of a form, organized by id and version.\n */\nexport interface VersionedData<T> {\n\t[id: string]: Version<T>[]\n}\n\n/**\n * Version is a structure that contains a value, a revision number and a modification timestamp used to sort the versions.\n */\nexport interface Version<T> {\n\trevision: string | null //null means that the version is not saved yet\n\tmodified?: number\n\tvalue: T\n}\n\nexport type ID = string\n/**\n * FormValuesContainer is a readonly structure that provides and handle the values of a form.\n * It is a tree structure where each node is a FormValuesContainer with the same Value and Metadata types.\n *\n * The following methods are provided and must be implemented by the concrete class:\n * - `compute(formula: string, sandbox?: S): T?` : computes a formula based on the values of the form, inside a provided sandbox. If no sandbox is provided, the default sandbox is used.\n * - `getLabel(): string` : returns the label of the form values container (used to display the title of the form in hierarchical contexts)\n * - `getFormId(): string?` : returns the id of the form values container\n * - `getValues(revisionsFilter: Lambda): VersionedData<Value>` : obtains the values to be displayed in the form, using a filter\n * \t\t\tto select the desired versioned data that are to be displayed in a specific field.\n * - `getMetadata(id: string, revisions: (string | null)[]): VersionedData<Metadata>` : obtains the metadata of a specific value, for the specified revisions.\n * - `getValidationErrors(): [FieldMetadata, string][]`: returns the validation errors of the form values container for the values that are currently stored in it.\n * - `getChildren(): FormValuesContainer<Value, Metadata>[]` : returns the children of the form values container\n * - `setValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, ID>` :\n * \t\t\tmodifies the value associated to a field in the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container along with the modified value.\n * - `setMetadata(label: string, metadata: Metadata, id?: string): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, ID>` :\n * \t\t\tmodifies the metadata associated to a value in the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container along with the modified metadata.\n * - `delete(valueId: string): FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, void>` :\n * \t\t\tdeletes a value from the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container without the deleted value.\n * - `addChild(anchorId: string, templateId: string, label: string): Promise<FormValuesContainerMutation<...>, FormValuesContainer<...>>>`:\n * \t\t\tadds a child to the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container with the added child.\n * - `removeChild(container: FormValuesContainer<Value, Metadata>): Promise<FormValuesContainerMutation<Value, Metadata, FormValuesContainer<Value, Metadata>, void>>` :\n * \t\t\tremoves a child from the form values container. As a form values container is immutable, this method returns a mutation wrapping\n * \t\t\ta new form values container without the removed child.\n * - `registerChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void` :\n * \t\t\tregisters a listener that will be called whenever the form values container is modified.\n * - `unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void` : unregisters a listener that was previously registered.\n *\n */\nexport interface FormValuesContainer<Value, Metadata> {\n\t//information retrieval\n\tcompute<T, S extends { [key: string | symbol]: unknown }>(formula: string, sandbox?: S): Promise<T | undefined>\n\tisFieldBeingComputed(label: string): boolean\n\n\tgetLabel(): string\n\tgetFormId(): string | undefined\n\tgetValues(revisionsFilter: (id: string, history: Version<Metadata>[]) => (string | null)[]): VersionedData<Value>\n\tgetMetadata(id: string, revisions: (string | null)[]): VersionedData<Metadata>\n\tgetChildren(): Promise<FormValuesContainer<Value, Metadata>[]>\n\tgetValidationErrors(): Promise<[FieldMetadata, string][]>\n\t//modification\n\tsetValue(label: string, language: string, data?: Value, id?: string, metadata?: Metadata, changeListenersOverrider?: (fvc: FormValuesContainer<Value, Metadata>) => void): boolean\n\tsetMetadata(metadata: Metadata, id?: string): boolean\n\tdelete(serviceId: string): void\n\t//hierarchy\n\taddChild(anchorId: string, templateId: string, label: string): Promise<void>\n\tremoveChild(container: FormValuesContainer<Value, Metadata>): Promise<void>\n\t//listeners\n\tregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>, modifiedFields: GenericMetadata[]) => void): void\n\tunregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>, modifiedFields: GenericMetadata[]) => void): void\n\n\tsynchronise(): FormValuesContainer<Value, Metadata>\n}\n\n/**\n * FormValuesContainerMutation is a structure that wraps a new form values container along with the modified value.\n */\nexport interface FormValuesContainerMutation<Value, Metadata, FVC extends FormValuesContainer<Value, Metadata>, Result> {\n\tresult: Result\n\tformValuesContainer: FVC\n}\n\nexport type Suggestion = { id: string; code?: string; text: string; terms: string[]; label: { [lng: string]: string } }\n"]}
@@ -1,7 +1,13 @@
1
1
  import { DecryptedContact, DecryptedForm as CardinalForm, DecryptedService } from '@icure/cardinal-sdk';
2
2
  import { FormValuesContainer, Version, VersionedData } from '../generic';
3
3
  import { ServiceMetadata } from './model';
4
- import { FieldMetadata, FieldValue, Validator } from '../components/model';
4
+ import { FieldMetadata, FieldValue, Metadata as GenericMetadata, Validator } from '../components/model';
5
+ type Computation = {
6
+ metadata: FieldMetadata;
7
+ revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[];
8
+ computation: Promise<unknown>;
9
+ status: 'pending' | 'resolved' | 'rejected';
10
+ };
5
11
  /** This class is a bridge between the ICure API and the generic FormValuesContainer interface.
6
12
  * It wraps around a ContactFormValuesContainer and provides a series of services:
7
13
  * - It computes dependent values when the form is created
@@ -22,19 +28,21 @@ import { FieldMetadata, FieldValue, Validator } from '../components/model';
22
28
  * This class is fairly generic and can be used as an inspiration or subclassed for other bridges
23
29
  */
24
30
  export declare class BridgedFormValuesContainer implements FormValuesContainer<FieldValue, FieldMetadata> {
25
- private responsible;
26
- private interpreter?;
27
- private initialValuesProvider;
28
- private dependentValuesProvider;
29
- private validatorsProvider;
30
- private language;
31
- private changeListeners;
32
- private interpreterContext;
33
- private contact;
34
- private contactFormValuesContainer;
31
+ private readonly contact;
32
+ private readonly contactFormValuesContainer;
35
33
  private _id;
36
34
  private readonly mutateAndNotify;
35
+ private readonly responsible;
36
+ private readonly interpreter?;
37
+ private readonly initialValuesProvider;
38
+ private readonly dependentValuesProvider;
39
+ private readonly validatorsProvider;
40
+ private readonly language;
41
+ private changeListeners;
42
+ private readonly interpreterContext;
43
+ private readonly currentComputations;
37
44
  toString(): string;
45
+ private options;
38
46
  /**
39
47
  * Creates an instance of BridgedFormValuesContainer.
40
48
  * @param responsible The id of the data owner responsible for the creation of the values
@@ -47,42 +55,56 @@ export declare class BridgedFormValuesContainer implements FormValuesContainer<F
47
55
  * @param language The language in which the values are displayed
48
56
  * @param changeListeners The listeners that will be notified when the values change
49
57
  * @param interpreterContext A map with keys that are the names of the variables and values that are the functions that return the values of the variables
58
+ * @param currentComputations A list of ongoing computations that should be observed and not recomputed when the form is created.
59
+ * @param modifiedFields A list of fields that have been modified and should be considered when computing the initial values
60
+ * @param stackLevel The stack level at which the BridgedFormValuesContainer is created, used to limit recursion induced by default values computations
61
+ * @param context A string that describes the context in which the BridgedFormValuesContainer is created, used for debugging purposes
50
62
  */
51
- constructor(responsible: string, contactFormValuesContainer: ContactFormValuesContainer, interpreter?: (<T, S extends {
52
- [key: string | symbol]: unknown;
53
- }>(formula: string, sandbox: S) => Promise<T | undefined>) | undefined, contact?: DecryptedContact, initialValuesProvider?: (anchorId?: string, templateId?: string) => {
54
- metadata: FieldMetadata;
55
- revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[];
56
- formula: string;
57
- }[], dependentValuesProvider?: (anchorId: string | undefined, templateId: string | undefined) => {
58
- metadata: FieldMetadata;
59
- revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[];
60
- formula: string;
61
- }[], validatorsProvider?: (anchorId: string | undefined, templateId: string) => {
62
- metadata: FieldMetadata;
63
- validators: Validator[];
64
- }[], language?: string, changeListeners?: ((newValue: BridgedFormValuesContainer) => void)[], interpreterContext?: {
65
- [variable: string]: () => unknown;
63
+ constructor({ responsible, contactFormValuesContainer, interpreter, contact, initialValuesProvider, dependentValuesProvider, validatorsProvider, language, changeListeners, interpreterContext, currentComputations, modifiedFields, stackLevel, context, }: {
64
+ responsible: string;
65
+ contactFormValuesContainer: ContactFormValuesContainer;
66
+ interpreter?: <T, S extends Record<string | symbol, unknown>>(formula: string, sandbox: S) => Promise<T | undefined>;
67
+ contact?: DecryptedContact;
68
+ initialValuesProvider?: (anchorId?: string, templateId?: string, modifiedFields?: GenericMetadata[]) => {
69
+ metadata: FieldMetadata;
70
+ revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[];
71
+ formula: string;
72
+ }[];
73
+ dependentValuesProvider?: (anchorId: string | undefined, templateId: string | undefined, modifiedFields?: GenericMetadata[]) => {
74
+ metadata: FieldMetadata;
75
+ revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[];
76
+ formula: string;
77
+ }[];
78
+ validatorsProvider?: (anchorId: string | undefined, templateId: string) => {
79
+ metadata: FieldMetadata;
80
+ validators: Validator[];
81
+ }[];
82
+ language?: string;
83
+ changeListeners?: ((newValue: BridgedFormValuesContainer, modifiedFields: GenericMetadata[]) => void)[];
84
+ interpreterContext?: Record<string, () => unknown>;
85
+ currentComputations?: Record<string, Computation>;
86
+ modifiedFields?: GenericMetadata[];
87
+ stackLevel?: number;
88
+ context?: string;
66
89
  });
67
- init(): Promise<this>;
68
90
  getLabel(): string;
69
91
  getFormId(): string | undefined;
70
92
  getContactFormValuesContainer(): ContactFormValuesContainer;
71
- registerChangeListener(listener: (newValue: BridgedFormValuesContainer) => void): void;
72
- unregisterChangeListener(listener: (newValue: BridgedFormValuesContainer) => void): void;
73
- getDefaultValue(label: string): Promise<FieldValue | undefined>;
93
+ registerChangeListener(listener: (newValue: BridgedFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
94
+ unregisterChangeListener(listener: (newValue: BridgedFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
74
95
  getValues(revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[]): VersionedData<FieldValue>;
75
96
  getMetadata(id: string, revisions: (string | null)[]): VersionedData<FieldMetadata>;
76
97
  private convertRawValue;
77
98
  private computeInitialValues;
78
99
  private computeDependentValues;
79
- setValue(label: string, language: string, fv?: FieldValue, id?: string, metadata?: FieldMetadata): void;
80
- setMetadata(meta: FieldMetadata, id?: string | undefined): void;
100
+ setValue(label: string, language: string, fv?: FieldValue, id?: string, metadata?: FieldMetadata, _?: undefined, recurse?: boolean): boolean;
101
+ setMetadata(meta: FieldMetadata, id?: string | undefined): boolean;
81
102
  delete(serviceId: string): void;
82
103
  private getVersionedValuesForKey;
83
104
  compute<T, S extends {
84
105
  [key: string | symbol]: unknown;
85
106
  }>(formula: string, sandbox?: S): Promise<T | undefined>;
107
+ isFieldBeingComputed(label: string): boolean;
86
108
  getChildren(): Promise<FormValuesContainer<FieldValue, FieldMetadata>[]>;
87
109
  getValidationErrors(): Promise<[FieldMetadata, string][]>;
88
110
  addChild(anchorId: string, templateId: string, label: string): Promise<void>;
@@ -105,12 +127,10 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
105
127
  serviceFactory: (label: string, serviceId?: string) => DecryptedService;
106
128
  formFactory: (parentId: string, anchorId: string, formTemplateId: string, label: string) => Promise<CardinalForm>;
107
129
  formRecycler: (formId: string) => Promise<void>;
108
- changeListeners: ((newValue: ContactFormValuesContainer) => void)[];
109
- private _id;
110
- private _initialised;
130
+ changeListeners: ((newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[], recurse?: boolean) => void)[];
131
+ _id: string;
111
132
  private indexedServices;
112
133
  toString(): string;
113
- mustBeInitialised(): boolean;
114
134
  /**
115
135
  * Returns a contact that combines the content of the contact in this form with the content of all contents stored in the children
116
136
  */
@@ -119,23 +139,23 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
119
139
  * Returns a contact that combines the content of the contact in this form with the content of all contents stored in the children
120
140
  */
121
141
  allForms(): CardinalForm[];
122
- constructor(rootForm: CardinalForm, currentContact: DecryptedContact, contactsHistory: DecryptedContact[], serviceFactory: (label: string, serviceId?: string) => DecryptedService, children: ContactFormValuesContainer[], formFactory: (parentId: string, anchorId: string, formTemplateId: string, label: string) => Promise<CardinalForm>, formRecycler: (formId: string) => Promise<void>, changeListeners?: ((newValue: ContactFormValuesContainer) => void)[], initialised?: boolean);
142
+ constructor(rootForm: CardinalForm, currentContact: DecryptedContact, contactsHistory: DecryptedContact[], serviceFactory: (label: string, serviceId?: string) => DecryptedService, children: ContactFormValuesContainer[], formFactory: (parentId: string, anchorId: string, formTemplateId: string, label: string) => Promise<CardinalForm>, formRecycler: (formId: string) => Promise<void>, changeListeners?: ((newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[]) => void)[]);
123
143
  synchronise(): this;
124
144
  registerChildFormValuesContainer(childFormValueContainer: ContactFormValuesContainer): void;
125
145
  static fromFormsHierarchy(rootForm: CardinalForm, currentContact: DecryptedContact, contactsHistory: DecryptedContact[], serviceFactory: (label: string, serviceId?: string) => DecryptedService, formChildrenProvider: (parentId: string | undefined) => Promise<CardinalForm[]>, formFactory: (parentId: string, anchorId: string, formTemplateId: string, label: string) => Promise<CardinalForm>, formRecycler: (formId: string) => Promise<void>, changeListeners?: ((newValue: ContactFormValuesContainer) => void)[]): Promise<ContactFormValuesContainer>;
126
146
  getLabel(): string;
127
147
  getFormId(): string | undefined;
128
- registerChangeListener(listener: (newValue: ContactFormValuesContainer) => void): void;
129
- unregisterChangeListener(listener: (newValue: ContactFormValuesContainer) => void): void;
148
+ registerChangeListener(listener: (newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
149
+ unregisterChangeListener(listener: (newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
130
150
  getChildren(): Promise<ContactFormValuesContainer[]>;
131
151
  getValidationErrors(): Promise<[FieldMetadata, string][]>;
132
- getDefaultValue(): Promise<FieldValue | undefined>;
133
152
  getValues(revisionsFilter: (id: string, history: Version<ServiceMetadata>[]) => (string | null)[]): VersionedData<DecryptedService>;
134
153
  getMetadata(id: string, revisions: (string | null)[]): VersionedData<ServiceMetadata>;
135
- setMetadata(meta: ServiceMetadata, id?: string): void;
136
- setValue(label: string, language: string, value?: DecryptedService, id?: string, metadata?: ServiceMetadata, changeListenersOverrider?: (fvc: ContactFormValuesContainer) => void): void;
154
+ setMetadata(meta: ServiceMetadata, id?: string): boolean;
155
+ setValue(label: string, language: string, value?: DecryptedService, id?: string, metadata?: ServiceMetadata, changeListenersOverrider?: (fvc: ContactFormValuesContainer) => void, recurse?: boolean): boolean;
137
156
  delete(serviceId: string): void;
138
157
  compute<T>(): Promise<T | undefined>;
158
+ isFieldBeingComputed(): boolean;
139
159
  /** returns all services in history that match a selector
140
160
  *
141
161
  * @private
@@ -146,3 +166,4 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
146
166
  private getServiceInCurrentContact;
147
167
  removeChild(container: ContactFormValuesContainer): Promise<void>;
148
168
  }
169
+ export {};