@icure/form 3.0.39 → 3.0.42

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 (114) hide show
  1. package/.yarn/cache/{@babel-runtime-npm-7.26.10-d01a90d446-22d2e0abb8.zip → @babel-runtime-npm-7.28.4-31bc1b0001-934b0a0460.zip} +0 -0
  2. package/.yarn/cache/{@icure-motss-app-datepicker-npm-6.0.0-rc.39-d00d21c35a-eefaed31a8.zip → @icure-motss-app-datepicker-npm-6.0.0-rc.40-ca1da7abbb-9bbe2bed34.zip} +0 -0
  3. package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.4.0-e5ef5fbeba-e267c25576.zip +0 -0
  4. package/.yarn/cache/{@lit-reactive-element-npm-2.1.0-77512b732b-fb36e9f64b.zip → @lit-reactive-element-npm-2.1.1-3875228c32-b9bbc9c089.zip} +0 -0
  5. package/.yarn/cache/{@lit-task-npm-1.0.2-01d3dd32e9-22e1265a62.zip → @lit-task-npm-1.0.3-48f265b3e9-790b6a2603.zip} +0 -0
  6. package/.yarn/cache/{lit-element-npm-4.1.1-bb20932b82-74d0f2d6fb.zip → lit-element-npm-4.2.1-b5bc114ced-5925326176.zip} +0 -0
  7. package/.yarn/cache/{lit-html-npm-3.2.1-1662fc597d-1bacd9f8b2.zip → lit-html-npm-3.3.1-e3722d4f4a-de07c66945.zip} +0 -0
  8. package/.yarn/cache/{lit-npm-3.2.1-27cb5b7782-ee22bbc53d.zip → lit-npm-3.3.1-8f683c51f1-fb88f1ff80.zip} +0 -0
  9. package/.yarn/cache/{prosemirror-commands-npm-1.7.0-212f35173c-a39225d534.zip → prosemirror-commands-npm-1.7.1-5b2afb6640-2316c40ea2.zip} +0 -0
  10. package/.yarn/cache/prosemirror-history-npm-1.5.0-e639d02880-6afb0e1d17.zip +0 -0
  11. package/.yarn/cache/prosemirror-keymap-npm-1.2.3-0e7e0c8195-0a2eed2771.zip +0 -0
  12. package/.yarn/cache/prosemirror-model-npm-1.25.4-e7ee2df3df-ab5aa609df.zip +0 -0
  13. package/.yarn/cache/prosemirror-state-npm-1.4.4-8b7e3a396c-1b5dba46c2.zip +0 -0
  14. package/.yarn/cache/prosemirror-transform-npm-1.10.5-5b3b4f5f61-6f5921e53a.zip +0 -0
  15. package/.yarn/cache/prosemirror-view-npm-1.41.4-cf361fd330-b663b8c6ce.zip +0 -0
  16. package/.yarn/install-state.gz +0 -0
  17. package/components/common/field.d.ts +0 -1
  18. package/components/common/field.js +0 -5
  19. package/components/common/field.js.map +1 -1
  20. package/components/common/metadata-buttons-bar.d.ts +1 -1
  21. package/components/common/metadata-buttons-bar.js +2 -6
  22. package/components/common/metadata-buttons-bar.js.map +1 -1
  23. package/components/icure-button/index.js +0 -4
  24. package/components/icure-button/index.js.map +1 -1
  25. package/components/icure-button-group/index.js +0 -4
  26. package/components/icure-button-group/index.js.map +1 -1
  27. package/components/icure-date-picker/index.d.ts +1 -1
  28. package/components/icure-date-picker/index.js +2 -6
  29. package/components/icure-date-picker/index.js.map +1 -1
  30. package/components/icure-dropdown-field/index.js +0 -4
  31. package/components/icure-dropdown-field/index.js.map +1 -1
  32. package/components/icure-form/fields/button-group/checkbox.d.ts +0 -1
  33. package/components/icure-form/fields/button-group/checkbox.js +2 -39
  34. package/components/icure-form/fields/button-group/checkbox.js.map +1 -1
  35. package/components/icure-form/fields/button-group/radio-button.d.ts +0 -1
  36. package/components/icure-form/fields/button-group/radio-button.js +2 -39
  37. package/components/icure-form/fields/button-group/radio-button.js.map +1 -1
  38. package/components/icure-form/fields/date-picker/date-picker.d.ts +0 -1
  39. package/components/icure-form/fields/date-picker/date-picker.js +17 -54
  40. package/components/icure-form/fields/date-picker/date-picker.js.map +1 -1
  41. package/components/icure-form/fields/date-picker/date-time-picker.d.ts +0 -1
  42. package/components/icure-form/fields/date-picker/date-time-picker.js +17 -54
  43. package/components/icure-form/fields/date-picker/date-time-picker.js.map +1 -1
  44. package/components/icure-form/fields/date-picker/time-picker.d.ts +0 -1
  45. package/components/icure-form/fields/date-picker/time-picker.js +17 -54
  46. package/components/icure-form/fields/date-picker/time-picker.js.map +1 -1
  47. package/components/icure-form/fields/dropdown/dropdown-field.d.ts +0 -1
  48. package/components/icure-form/fields/dropdown/dropdown-field.js +2 -39
  49. package/components/icure-form/fields/dropdown/dropdown-field.js.map +1 -1
  50. package/components/icure-form/fields/items-list-field/items-list-field.d.ts +0 -1
  51. package/components/icure-form/fields/items-list-field/items-list-field.js +17 -55
  52. package/components/icure-form/fields/items-list-field/items-list-field.js.map +1 -1
  53. package/components/icure-form/fields/measure-field/measure-field.d.ts +0 -1
  54. package/components/icure-form/fields/measure-field/measure-field.js +2 -39
  55. package/components/icure-form/fields/measure-field/measure-field.js.map +1 -1
  56. package/components/icure-form/fields/number-field/number-field.d.ts +0 -1
  57. package/components/icure-form/fields/number-field/number-field.js +18 -55
  58. package/components/icure-form/fields/number-field/number-field.js.map +1 -1
  59. package/components/icure-form/fields/text-field/text-field.d.ts +0 -1
  60. package/components/icure-form/fields/text-field/text-field.js +28 -65
  61. package/components/icure-form/fields/text-field/text-field.js.map +1 -1
  62. package/components/icure-form/fields/token-field/token-field.d.ts +0 -1
  63. package/components/icure-form/fields/token-field/token-field.js +17 -55
  64. package/components/icure-form/fields/token-field/token-field.js.map +1 -1
  65. package/components/icure-form/fields/utils/index.d.ts +0 -1
  66. package/components/icure-form/fields/utils/index.js +0 -2
  67. package/components/icure-form/fields/utils/index.js.map +1 -1
  68. package/components/icure-form/index.d.ts +1 -1
  69. package/components/icure-form/index.js +5 -26
  70. package/components/icure-form/index.js.map +1 -1
  71. package/components/icure-form/renderer/form/form-selection-button.js +0 -4
  72. package/components/icure-form/renderer/form/form-selection-button.js.map +1 -1
  73. package/components/icure-form/renderer/form/form.d.ts +2 -7
  74. package/components/icure-form/renderer/form/form.js +454 -618
  75. package/components/icure-form/renderer/form/form.js.map +1 -1
  76. package/components/icure-form/renderer/index.d.ts +1 -1
  77. package/components/icure-form/renderer/index.js.map +1 -1
  78. package/components/icure-label/index.js +0 -4
  79. package/components/icure-label/index.js.map +1 -1
  80. package/components/icure-text-field/index.js +11 -10
  81. package/components/icure-text-field/index.js.map +1 -1
  82. package/components/model/index.d.ts +1 -15
  83. package/components/model/index.js +2 -13
  84. package/components/model/index.js.map +1 -1
  85. package/generic/model.d.ts +6 -6
  86. package/generic/model.js.map +1 -1
  87. package/icure/form-values-container.d.ts +42 -63
  88. package/icure/form-values-container.js +151 -192
  89. package/icure/form-values-container.js.map +1 -1
  90. package/icure/icure-utils.js +12 -30
  91. package/icure/icure-utils.js.map +1 -1
  92. package/icure/model.d.ts +2 -9
  93. package/icure/model.js +1 -7
  94. package/icure/model.js.map +1 -1
  95. package/package.json +1 -2
  96. package/utils/code-utils.d.ts +2 -3
  97. package/utils/code-utils.js +6 -5
  98. package/utils/code-utils.js.map +1 -1
  99. package/.yarn/cache/@icure-cardinal-sdk-npm-1.3.0-ts-2-d77151b3e6-86e1497829.zip +0 -0
  100. package/.yarn/cache/@js-joda-core-npm-3.2.0-d2526290e9-64625c2f22.zip +0 -0
  101. package/.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.3.0-6bfa115c08-c2003e8bb6.zip +0 -0
  102. package/.yarn/cache/@lit-reactive-element-npm-2.0.4-4836436301-368d788d9e.zip +0 -0
  103. package/.yarn/cache/format-util-npm-1.0.5-a524ca953a-0c8622e54a.zip +0 -0
  104. package/.yarn/cache/prosemirror-history-npm-1.4.1-ad68c86bb7-90f9bf59bc.zip +0 -0
  105. package/.yarn/cache/prosemirror-keymap-npm-1.2.2-efb8276b00-85fe4fc303.zip +0 -0
  106. package/.yarn/cache/prosemirror-model-npm-1.25.0-0870b04e23-e311e1e36c.zip +0 -0
  107. package/.yarn/cache/prosemirror-state-npm-1.4.3-d6540e44ad-28857d935c.zip +0 -0
  108. package/.yarn/cache/prosemirror-transform-npm-1.10.3-fb23bef7a8-8cbe29501e.zip +0 -0
  109. package/.yarn/cache/prosemirror-view-npm-1.38.1-8cfb4ec84f-12f7f4d27f.zip +0 -0
  110. package/.yarn/cache/regenerator-runtime-npm-0.14.1-a6c97c609a-9f57c93277.zip +0 -0
  111. package/.yarn/cache/ws-npm-8.18.0-56f68bc4d6-91d4d35bc9.zip +0 -0
  112. package/utils/form-value-container.d.ts +0 -3
  113. package/utils/form-value-container.js +0 -30
  114. package/utils/form-value-container.js.map +0 -1
@@ -1 +1 @@
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,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,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K,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
+ {"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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,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\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,4 +1,4 @@
1
- import { FieldMetadata, Metadata as GenericMetadata } from '../components/model';
1
+ import { FieldMetadata, FieldValue } 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;
55
54
  getLabel(): string;
56
55
  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): boolean;
62
- setMetadata(metadata: Metadata, id?: string): boolean;
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;
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>, modifiedFields: GenericMetadata[]) => void): void;
67
- unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>, modifiedFields: GenericMetadata[]) => void): void;
66
+ registerChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => void): void;
67
+ unregisterChangeListener(listener: (newValue: FormValuesContainer<Value, Metadata>) => 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, 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
+ {"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,13 +1,7 @@
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, 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
- };
4
+ import { FieldMetadata, FieldValue, Validator } from '../components/model';
11
5
  /** This class is a bridge between the ICure API and the generic FormValuesContainer interface.
12
6
  * It wraps around a ContactFormValuesContainer and provides a series of services:
13
7
  * - It computes dependent values when the form is created
@@ -28,21 +22,19 @@ type Computation = {
28
22
  * This class is fairly generic and can be used as an inspiration or subclassed for other bridges
29
23
  */
30
24
  export declare class BridgedFormValuesContainer implements FormValuesContainer<FieldValue, FieldMetadata> {
31
- private readonly contact;
32
- private readonly contactFormValuesContainer;
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;
33
35
  private _id;
34
36
  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;
44
37
  toString(): string;
45
- private options;
46
38
  /**
47
39
  * Creates an instance of BridgedFormValuesContainer.
48
40
  * @param responsible The id of the data owner responsible for the creation of the values
@@ -55,56 +47,42 @@ export declare class BridgedFormValuesContainer implements FormValuesContainer<F
55
47
  * @param language The language in which the values are displayed
56
48
  * @param changeListeners The listeners that will be notified when the values change
57
49
  * @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
62
50
  */
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;
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;
89
66
  });
67
+ init(): Promise<this>;
90
68
  getLabel(): string;
91
69
  getFormId(): string | undefined;
92
70
  getContactFormValuesContainer(): ContactFormValuesContainer;
93
- registerChangeListener(listener: (newValue: BridgedFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
94
- unregisterChangeListener(listener: (newValue: BridgedFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
71
+ registerChangeListener(listener: (newValue: BridgedFormValuesContainer) => void): void;
72
+ unregisterChangeListener(listener: (newValue: BridgedFormValuesContainer) => void): void;
73
+ getDefaultValue(label: string): Promise<FieldValue | undefined>;
95
74
  getValues(revisionsFilter: (id: string, history: Version<FieldMetadata>[]) => (string | null)[]): VersionedData<FieldValue>;
96
75
  getMetadata(id: string, revisions: (string | null)[]): VersionedData<FieldMetadata>;
97
76
  private convertRawValue;
98
77
  private computeInitialValues;
99
78
  private computeDependentValues;
100
- setValue(label: string, language: string, fv?: FieldValue, id?: string, metadata?: FieldMetadata, _?: undefined, recurse?: boolean): boolean;
101
- setMetadata(meta: FieldMetadata, id?: string | undefined): boolean;
79
+ setValue(label: string, language: string, fv?: FieldValue, id?: string, metadata?: FieldMetadata): void;
80
+ setMetadata(meta: FieldMetadata, id?: string | undefined): void;
102
81
  delete(serviceId: string): void;
103
82
  private getVersionedValuesForKey;
104
83
  compute<T, S extends {
105
84
  [key: string | symbol]: unknown;
106
85
  }>(formula: string, sandbox?: S): Promise<T | undefined>;
107
- isFieldBeingComputed(label: string): boolean;
108
86
  getChildren(): Promise<FormValuesContainer<FieldValue, FieldMetadata>[]>;
109
87
  getValidationErrors(): Promise<[FieldMetadata, string][]>;
110
88
  addChild(anchorId: string, templateId: string, label: string): Promise<void>;
@@ -127,10 +105,12 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
127
105
  serviceFactory: (label: string, serviceId?: string) => DecryptedService;
128
106
  formFactory: (parentId: string, anchorId: string, formTemplateId: string, label: string) => Promise<CardinalForm>;
129
107
  formRecycler: (formId: string) => Promise<void>;
130
- changeListeners: ((newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[], recurse?: boolean) => void)[];
131
- _id: string;
108
+ changeListeners: ((newValue: ContactFormValuesContainer) => void)[];
109
+ private _id;
110
+ private _initialised;
132
111
  private indexedServices;
133
112
  toString(): string;
113
+ mustBeInitialised(): boolean;
134
114
  /**
135
115
  * Returns a contact that combines the content of the contact in this form with the content of all contents stored in the children
136
116
  */
@@ -139,23 +119,23 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
139
119
  * Returns a contact that combines the content of the contact in this form with the content of all contents stored in the children
140
120
  */
141
121
  allForms(): CardinalForm[];
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)[]);
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);
143
123
  synchronise(): this;
144
124
  registerChildFormValuesContainer(childFormValueContainer: ContactFormValuesContainer): void;
145
125
  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>;
146
126
  getLabel(): string;
147
127
  getFormId(): string | undefined;
148
- registerChangeListener(listener: (newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
149
- unregisterChangeListener(listener: (newValue: ContactFormValuesContainer, modifiedFields: GenericMetadata[]) => void): void;
128
+ registerChangeListener(listener: (newValue: ContactFormValuesContainer) => void): void;
129
+ unregisterChangeListener(listener: (newValue: ContactFormValuesContainer) => void): void;
150
130
  getChildren(): Promise<ContactFormValuesContainer[]>;
151
131
  getValidationErrors(): Promise<[FieldMetadata, string][]>;
132
+ getDefaultValue(): Promise<FieldValue | undefined>;
152
133
  getValues(revisionsFilter: (id: string, history: Version<ServiceMetadata>[]) => (string | null)[]): VersionedData<DecryptedService>;
153
134
  getMetadata(id: string, revisions: (string | null)[]): VersionedData<ServiceMetadata>;
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;
135
+ setMetadata(meta: ServiceMetadata, id?: string): void;
136
+ setValue(label: string, language: string, value?: DecryptedService, id?: string, metadata?: ServiceMetadata, changeListenersOverrider?: (fvc: ContactFormValuesContainer) => void): void;
156
137
  delete(serviceId: string): void;
157
138
  compute<T>(): Promise<T | undefined>;
158
- isFieldBeingComputed(): boolean;
159
139
  /** returns all services in history that match a selector
160
140
  *
161
141
  * @private
@@ -166,4 +146,3 @@ export declare class ContactFormValuesContainer implements FormValuesContainer<D
166
146
  private getServiceInCurrentContact;
167
147
  removeChild(container: ContactFormValuesContainer): Promise<void>;
168
148
  }
169
- export {};