@beinformed/ui 1.24.1-beta.1 → 1.24.1-beta.4

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 (198) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/builder/package.json +2 -1
  3. package/constants/package.json +2 -1
  4. package/exceptions/package.json +2 -1
  5. package/hooks/package.json +2 -1
  6. package/i18n/package.json +2 -1
  7. package/models/package.json +2 -1
  8. package/modularui/package.json +2 -1
  9. package/package.json +3 -2
  10. package/react/package.json +2 -1
  11. package/react-client/package.json +2 -1
  12. package/react-server/package.json +2 -1
  13. package/react-theme/package.json +2 -1
  14. package/redux/package.json +2 -1
  15. package/types/constants/Constants.d.ts +151 -0
  16. package/types/constants/LayoutHintConfig.d.ts +241 -0
  17. package/types/constants/LayoutHints.d.ts +78 -0
  18. package/types/constants/Settings.d.ts +16 -0
  19. package/types/constants/index.d.ts +3 -0
  20. package/types/exceptions/ConfigurationException.d.ts +6 -0
  21. package/types/exceptions/FetchException.d.ts +31 -0
  22. package/types/exceptions/IllegalArgumentException.d.ts +6 -0
  23. package/types/exceptions/IllegalReturnException.d.ts +5 -0
  24. package/types/exceptions/IllegalStateException.d.ts +6 -0
  25. package/types/exceptions/JsonParseException.d.ts +6 -0
  26. package/types/exceptions/MissingPropertyException.d.ts +6 -0
  27. package/types/exceptions/NetworkException.d.ts +9 -0
  28. package/types/exceptions/NotAllowedUriException.d.ts +6 -0
  29. package/types/exceptions/NotFoundException.d.ts +10 -0
  30. package/types/exceptions/ServerRequestException.d.ts +6 -0
  31. package/types/exceptions/ThemePropertyException.d.ts +6 -0
  32. package/types/exceptions/TimeoutException.d.ts +7 -0
  33. package/types/exceptions/UnauthorizedException.d.ts +11 -0
  34. package/types/exceptions/UnsupportedOperationException.d.ts +6 -0
  35. package/types/exceptions/index.d.ts +15 -0
  36. package/types/hooks/useI18n.d.ts +9 -0
  37. package/types/i18n/Locale.d.ts +53 -0
  38. package/types/i18n/Locales.d.ts +55 -0
  39. package/types/i18n/Message.d.ts +6 -0
  40. package/types/i18n/index.d.ts +5 -0
  41. package/types/i18n/languages.d.ts +215 -0
  42. package/types/i18n/translations/beinformed_error_messages_en.nl.d.ts +97 -0
  43. package/types/i18n/translations/beinformed_error_messages_nl.nl.d.ts +97 -0
  44. package/types/i18n/types.d.ts +11 -0
  45. package/types/i18n/withMessage.d.ts +3 -0
  46. package/types/index.d.ts +6 -0
  47. package/types/models/actions/ActionCollection.d.ts +29 -0
  48. package/types/models/actions/ActionModel.d.ts +84 -0
  49. package/types/models/application/ApplicationModel.d.ts +41 -0
  50. package/types/models/attributes/AttributeCollection.d.ts +96 -0
  51. package/types/models/attributes/AttributeContent.d.ts +64 -0
  52. package/types/models/attributes/AttributeDataHelper.d.ts +67 -0
  53. package/types/models/attributes/AttributeModel.d.ts +395 -0
  54. package/types/models/attributes/AttributeSetModel.d.ts +28 -0
  55. package/types/models/attributes/BooleanAttributeModel.d.ts +65 -0
  56. package/types/models/attributes/CaptchaAttributeModel.d.ts +10 -0
  57. package/types/models/attributes/ChoiceAttributeModel.d.ts +76 -0
  58. package/types/models/attributes/ChoiceAttributeOptionCollection.d.ts +82 -0
  59. package/types/models/attributes/ChoiceAttributeOptionModel.d.ts +133 -0
  60. package/types/models/attributes/CompositeAttributeChildCollection.d.ts +56 -0
  61. package/types/models/attributes/CompositeAttributeModel.d.ts +44 -0
  62. package/types/models/attributes/DatetimeAttributeModel.d.ts +111 -0
  63. package/types/models/attributes/HelptextAttributeModel.d.ts +16 -0
  64. package/types/models/attributes/LabelAttributeModel.d.ts +12 -0
  65. package/types/models/attributes/MemoAttributeModel.d.ts +14 -0
  66. package/types/models/attributes/MoneyAttributeModel.d.ts +14 -0
  67. package/types/models/attributes/NumberAttributeModel.d.ts +49 -0
  68. package/types/models/attributes/PasswordAttributeModel.d.ts +62 -0
  69. package/types/models/attributes/StringAttributeModel.d.ts +62 -0
  70. package/types/models/attributes/UploadAttributeModel.d.ts +54 -0
  71. package/types/models/attributes/XMLAttributeModel.d.ts +10 -0
  72. package/types/models/attributes/_createAttribute.d.ts +6 -0
  73. package/types/models/attributes/input-constraints/BSNConstraint.d.ts +26 -0
  74. package/types/models/attributes/input-constraints/ConstraintCollection.d.ts +24 -0
  75. package/types/models/attributes/input-constraints/ConstraintModel.d.ts +34 -0
  76. package/types/models/attributes/input-constraints/DateBoundaryConstraint.d.ts +109 -0
  77. package/types/models/attributes/input-constraints/DateTimeDateFormatConstraint.d.ts +36 -0
  78. package/types/models/attributes/input-constraints/DateTimeTimeFormatConstraint.d.ts +36 -0
  79. package/types/models/attributes/input-constraints/DatetimeFormatConstraint.d.ts +92 -0
  80. package/types/models/attributes/input-constraints/FileExtensionConstraint.d.ts +33 -0
  81. package/types/models/attributes/input-constraints/FileSizeConstraint.d.ts +42 -0
  82. package/types/models/attributes/input-constraints/IBANConstraint.d.ts +23 -0
  83. package/types/models/attributes/input-constraints/MandatoryConstraint.d.ts +23 -0
  84. package/types/models/attributes/input-constraints/MandatoryRangeConstraint.d.ts +36 -0
  85. package/types/models/attributes/input-constraints/NumberBoundaryConstraint.d.ts +61 -0
  86. package/types/models/attributes/input-constraints/NumberFormatConstraint.d.ts +52 -0
  87. package/types/models/attributes/input-constraints/NumberGroupingConstraint.d.ts +46 -0
  88. package/types/models/attributes/input-constraints/PasswordConfirmConstraint.d.ts +36 -0
  89. package/types/models/attributes/input-constraints/PasswordLowerAndUpperCaseConstraint.d.ts +23 -0
  90. package/types/models/attributes/input-constraints/PasswordMinNumericCharactersConstraint.d.ts +32 -0
  91. package/types/models/attributes/input-constraints/PasswordMinSpecialCharactersConstraint.d.ts +32 -0
  92. package/types/models/attributes/input-constraints/PasswordThreeConsecutiveCharactersNotAllowedConstraint.d.ts +35 -0
  93. package/types/models/attributes/input-constraints/RangeConstraint.d.ts +97 -0
  94. package/types/models/attributes/input-constraints/RegexConstraint.d.ts +37 -0
  95. package/types/models/attributes/input-constraints/StringLengthConstraint.d.ts +46 -0
  96. package/types/models/attributes/input-constraints/XMLConstraint.d.ts +26 -0
  97. package/types/models/attributes/layouthint-rules/BaseLayoutHintRule.d.ts +46 -0
  98. package/types/models/attributes/layouthint-rules/DependentAttribute.d.ts +57 -0
  99. package/types/models/attributes/layouthint-rules/LayoutHintRuleCollection.d.ts +27 -0
  100. package/types/models/attributes/layouthint-rules/RemainingTotalUploadSize.d.ts +17 -0
  101. package/types/models/base/BaseCollection.d.ts +89 -0
  102. package/types/models/base/BaseModel.d.ts +58 -0
  103. package/types/models/base/ResourceCollection.d.ts +19 -0
  104. package/types/models/base/ResourceModel.d.ts +93 -0
  105. package/types/models/caseview/CaseViewModel.d.ts +45 -0
  106. package/types/models/concepts/BusinessScenarioModel.d.ts +20 -0
  107. package/types/models/concepts/ConceptDetailModel.d.ts +69 -0
  108. package/types/models/concepts/ConceptIndexModel.d.ts +36 -0
  109. package/types/models/concepts/ConceptLinkModel.d.ts +65 -0
  110. package/types/models/concepts/ConceptRelationCollection.d.ts +34 -0
  111. package/types/models/concepts/ConceptRelationModel.d.ts +43 -0
  112. package/types/models/concepts/ConceptTypeDetailModel.d.ts +39 -0
  113. package/types/models/concepts/SourceReferenceCollection.d.ts +13 -0
  114. package/types/models/concepts/SourceReferenceModel.d.ts +30 -0
  115. package/types/models/content/ContentIndexModel.d.ts +34 -0
  116. package/types/models/content/ContentLinkModel.d.ts +81 -0
  117. package/types/models/content/ContentModel.d.ts +74 -0
  118. package/types/models/content/ContentTOCModel.d.ts +37 -0
  119. package/types/models/content/ContentTypeModel.d.ts +26 -0
  120. package/types/models/content/SectionModel.d.ts +75 -0
  121. package/types/models/content/SubSectionModel.d.ts +64 -0
  122. package/types/models/contentconfiguration/ContentConfiguration.d.ts +28 -0
  123. package/types/models/contentconfiguration/ContentConfigurationElements.d.ts +47 -0
  124. package/types/models/contentconfiguration/ContentConfigurationEndResults.d.ts +16 -0
  125. package/types/models/contentconfiguration/ContentConfigurationQuestions.d.ts +22 -0
  126. package/types/models/contentconfiguration/ContentConfigurationResults.d.ts +39 -0
  127. package/types/models/detail/DetailModel.d.ts +72 -0
  128. package/types/models/error/ErrorCollection.d.ts +51 -0
  129. package/types/models/error/ErrorModel.d.ts +36 -0
  130. package/types/models/error/ErrorResponse.d.ts +148 -0
  131. package/types/models/filters/AssignmentFilterModel.d.ts +35 -0
  132. package/types/models/filters/BaseFilterModel.d.ts +85 -0
  133. package/types/models/filters/ConceptIndexFilterModel.d.ts +6 -0
  134. package/types/models/filters/FilterCollection.d.ts +48 -0
  135. package/types/models/filters/FilterModel.d.ts +5 -0
  136. package/types/models/filters/RangeFilterModel.d.ts +6 -0
  137. package/types/models/form/FormModel.d.ts +309 -0
  138. package/types/models/form/FormObjectModel.d.ts +168 -0
  139. package/types/models/grouping/GroupingModel.d.ts +85 -0
  140. package/types/models/href/Href.d.ts +17 -0
  141. package/types/models/href/ListHref.d.ts +64 -0
  142. package/types/models/index.d.ts +94 -0
  143. package/types/models/layouthint/LayoutHintCollection.d.ts +43 -0
  144. package/types/models/links/LinkCollection.d.ts +62 -0
  145. package/types/models/links/LinkModel.d.ts +92 -0
  146. package/types/models/links/normalizeLinkJSON.d.ts +9 -0
  147. package/types/models/list/ListDetailModel.d.ts +69 -0
  148. package/types/models/list/ListHeaderModel.d.ts +64 -0
  149. package/types/models/list/ListItemCollection.d.ts +21 -0
  150. package/types/models/list/ListItemModel.d.ts +34 -0
  151. package/types/models/list/ListModel.d.ts +135 -0
  152. package/types/models/lookup/LookupOptionCollection.d.ts +11 -0
  153. package/types/models/lookup/LookupOptionsModel.d.ts +19 -0
  154. package/types/models/modelcatalog/ModelCatalogModel.d.ts +18 -0
  155. package/types/models/paging/PagesizeModel.d.ts +25 -0
  156. package/types/models/paging/PagingModel.d.ts +49 -0
  157. package/types/models/panels/GroupingPanelModel.d.ts +39 -0
  158. package/types/models/parameter/Parameter.d.ts +40 -0
  159. package/types/models/process/ProcessStatusSettingsModel.d.ts +38 -0
  160. package/types/models/resolveModel.d.ts +7 -0
  161. package/types/models/search/CaseSearchModel.d.ts +14 -0
  162. package/types/models/sorting/SortOptionModel.d.ts +48 -0
  163. package/types/models/sorting/SortingModel.d.ts +42 -0
  164. package/types/models/tab/TabModel.d.ts +44 -0
  165. package/types/models/taskgroup/TaskGroupCollection.d.ts +12 -0
  166. package/types/models/taskgroup/TaskGroupModel.d.ts +15 -0
  167. package/types/models/types.d.ts +147 -0
  168. package/types/models/user/UserModel.d.ts +14 -0
  169. package/types/models/user/UserProfileModel.d.ts +12 -0
  170. package/types/models/user/UserServicesModel.d.ts +28 -0
  171. package/types/modularui/Authenticate.d.ts +42 -0
  172. package/types/modularui/ModularUIError.d.ts +10 -0
  173. package/types/modularui/ModularUIRequest.d.ts +170 -0
  174. package/types/modularui/ModularUIResponse.d.ts +56 -0
  175. package/types/modularui/index.d.ts +3 -0
  176. package/types/redux/_i18n/types.d.ts +13 -0
  177. package/types/redux/_modularui/types.d.ts +49 -0
  178. package/types/redux/_router/types.d.ts +35 -0
  179. package/types/redux/selectors/i18n.d.ts +4 -0
  180. package/types/redux/types.d.ts +105 -0
  181. package/types/utils/browser/Cache.d.ts +45 -0
  182. package/types/utils/browser/Cookies.d.ts +15 -0
  183. package/types/utils/datetime/DateTimeUtil.d.ts +164 -0
  184. package/types/utils/fetch/serverFetch.d.ts +5 -0
  185. package/types/utils/fetch/types.d.ts +38 -0
  186. package/types/utils/fetch/universalFetch.d.ts +7 -0
  187. package/types/utils/fetch/xhr.d.ts +5 -0
  188. package/types/utils/helpers/checkResource.d.ts +3 -0
  189. package/types/utils/helpers/createHash.d.ts +8 -0
  190. package/types/utils/helpers/createUUID.d.ts +4 -0
  191. package/types/utils/helpers/objects.d.ts +3 -0
  192. package/types/utils/helpers/sanitizeHtml.d.ts +9 -0
  193. package/types/utils/helpers/text.d.ts +7 -0
  194. package/types/utils/index.d.ts +16 -0
  195. package/types/utils/number/DecimalFormat.d.ts +90 -0
  196. package/types/utils/number/formatValue.d.ts +4 -0
  197. package/types/utils/number/parseNumbers.d.ts +9 -0
  198. package/utils/package.json +2 -1
@@ -0,0 +1,395 @@
1
+ /**
2
+ * Attribute model, base model for all kind of attributes
3
+ */
4
+ export default class AttributeModel extends BaseModel {
5
+ /**
6
+ */
7
+ static isApplicableModel(contributions: Object): boolean;
8
+ _label: string;
9
+ _lastModification: number;
10
+ _initvalue: any;
11
+ _inputvalue: string;
12
+ _value: any;
13
+ _errorCollection: ErrorCollection;
14
+ _serverConstraints: ConstraintCollection;
15
+ _useClientsideValidation: boolean;
16
+ _isValid: boolean;
17
+ _validatedValue: string | null;
18
+ _isEditable: boolean;
19
+ _concept: ConceptDetailModel | null;
20
+ _referenceDate: ISO_DATE;
21
+ _isResult: boolean;
22
+ _isHidden: boolean;
23
+ _readonly: boolean;
24
+ _disabled: boolean;
25
+ _mandatory: boolean;
26
+ _links: LinkCollection;
27
+ _parentKey: string | null;
28
+ _hasContentConfiguration: boolean;
29
+ _layoutHintRules: LayoutHintRuleCollection;
30
+ /**
31
+ * Retrieve initial input value
32
+ */
33
+ getInitialInputValue(value: any): any;
34
+ /**
35
+ */
36
+ getInitialChildModelLinks(): Array<LinkModel>;
37
+ /**
38
+ */
39
+ setChildModels(models: Array<ModularUIModel>): void;
40
+ /**
41
+ * Set the concept
42
+ */
43
+ set concept(arg: ConceptDetailModel);
44
+ /**
45
+ * Get concept information
46
+ */
47
+ get concept(): ConceptDetailModel;
48
+ /**
49
+ * Getting the attribute key
50
+ */
51
+ get key(): string;
52
+ /**
53
+ */
54
+ set parentKey(arg: string);
55
+ /**
56
+ */
57
+ get parentKey(): string;
58
+ /**
59
+ * Getting the attribute name
60
+ */
61
+ get name(): string;
62
+ /**
63
+ * Getting the type of the attribute
64
+ */
65
+ get type(): string;
66
+ /**
67
+ * Set the label of this attribute
68
+ */
69
+ set label(arg: string);
70
+ /**
71
+ * Getting the label of the attribute
72
+ */
73
+ get label(): string;
74
+ /**
75
+ */
76
+ set hasContentConfiguration(arg: boolean);
77
+ /**
78
+ */
79
+ get hasContentConfiguration(): boolean;
80
+ /**
81
+ */
82
+ indicateContentConfiguration(contentConfiguration: ContentConfiguration): void;
83
+ /**
84
+ * Retrieve the first permitted label to render when a concept and contentConfiguration is available
85
+ * Be aware that permission could be in place for labels from a concept.
86
+ */
87
+ getContentConfiguredLabel(contentConfiguration: ContentConfigurationElements | null): string;
88
+ /**
89
+ */
90
+ get defaultAlignment(): "center" | "left" | "right";
91
+ /**
92
+ * Handles layout hint align-left, align-center and align-right
93
+ */
94
+ get alignment(): "center" | "left" | "right";
95
+ /**
96
+ * Retrieve links of attribute
97
+ */
98
+ get links(): LinkCollection;
99
+ /**
100
+ * Retrieve link of attribute when available
101
+ */
102
+ get downloadLink(): LinkModel;
103
+ /**
104
+ * Retrieve concept link of attribute when available
105
+ */
106
+ get conceptLink(): LinkModel;
107
+ /**
108
+ * Set reference date for concepts and content
109
+ */
110
+ set referenceDate(arg: ISO_DATE);
111
+ /**
112
+ * Retrieve reference date of attribute which can be used as entryDate for content
113
+ * to get information in correct time version
114
+ */
115
+ get referenceDate(): ISO_DATE;
116
+ /**
117
+ * Initial value received from the modular ui service
118
+ */
119
+ get initvalue(): any;
120
+ /**
121
+ * Retrieve input value
122
+ */
123
+ getInputValue(): string;
124
+ /**
125
+ * Sets the input value to the value entered by the user
126
+ */
127
+ set inputvalue(arg: string);
128
+ /**
129
+ * Returns the value as entered by the user. This can differ from the internal iso value that is stored
130
+ */
131
+ get inputvalue(): string;
132
+ /**
133
+ * Value that is used when retrieving an error collection of this attribute
134
+ * Mostly this is the input value, but sometimes a different value is needed,
135
+ * for example iban and postcode need to validate length without spaces
136
+ */
137
+ get validateValue(): string;
138
+ /**
139
+ * Setting a value in the element
140
+ */
141
+ set value(arg: any);
142
+ /**
143
+ * Getting the value of the attribute
144
+ */
145
+ get value(): any;
146
+ /**
147
+ */
148
+ hasValue(): boolean;
149
+ /**
150
+ * Getting the value of the attribute
151
+ */
152
+ getValue(): any;
153
+ /**
154
+ * Getting data ready to be send to the modular ui
155
+ * Returns null when the attribute should not be send to the server
156
+ */
157
+ getFormData(): {
158
+ [string]: any;
159
+ } | null;
160
+ /**
161
+ */
162
+ get formdata(): {};
163
+ /**
164
+ */
165
+ getEmptyFormData(): {
166
+ [string]: null;
167
+ };
168
+ /**
169
+ */
170
+ formatValue(value: string): string;
171
+ /**
172
+ * Getting the readonly value, iso value converted for human reading
173
+ */
174
+ get readonlyvalue(): string;
175
+ /**
176
+ * Set mandatory status of attribute
177
+ */
178
+ set mandatory(arg: boolean);
179
+ /**
180
+ * Getting mandatory status of attribute
181
+ */
182
+ get mandatory(): boolean;
183
+ /**
184
+ */
185
+ get configuredMandatory(): boolean;
186
+ /**
187
+ */
188
+ set readonly(arg: boolean);
189
+ /**
190
+ */
191
+ get readonly(): boolean;
192
+ /**
193
+ */
194
+ set disabled(arg: boolean);
195
+ /**
196
+ */
197
+ get disabled(): boolean;
198
+ /**
199
+ */
200
+ set isResult(arg: boolean);
201
+ /**
202
+ */
203
+ get isResult(): boolean;
204
+ /**
205
+ * Getting the display and input format of a attribute
206
+ */
207
+ get format(): string;
208
+ /**
209
+ */
210
+ get formatLabel(): string;
211
+ /**
212
+ * Get minimum string length
213
+ */
214
+ get minLength(): number;
215
+ /**
216
+ * Get maximum string length
217
+ */
218
+ get maxLength(): number;
219
+ /**
220
+ */
221
+ get operator(): string;
222
+ /**
223
+ * Get assistant message
224
+ */
225
+ get assistantMessage(): string;
226
+ /**
227
+ * Get valid status
228
+ */
229
+ get isValid(): boolean;
230
+ /**
231
+ * Retrieve applicable constraint for this attribute
232
+ */
233
+ get constraintCollection(): ConstraintCollection;
234
+ /**
235
+ * Template method for class extending this model to add extra constraints
236
+ * @abstract
237
+ */
238
+ addConstraints(): ConstraintCollection;
239
+ /**
240
+ * Used to programmatically overwrite the setting USE_CLIENTSIDE_VALIDATION
241
+ */
242
+ setUseClientsideValidation(enabled: boolean): void;
243
+ /**
244
+ * Indicates if client side validation is enabled
245
+ * @returns {boolean}
246
+ */
247
+ useClientsideValidation(): boolean;
248
+ /**
249
+ * Validate input on client side constraint
250
+ */
251
+ validate(value: string): boolean;
252
+ /**
253
+ * Indicates if attribute is optional and empty
254
+ */
255
+ isOptionalAndEmpty(value: string): boolean;
256
+ /**
257
+ * Retrieve error messages of this attribute
258
+ */
259
+ get errorCollection(): ErrorCollection;
260
+ /**
261
+ * Check if attribute is in error
262
+ */
263
+ inError(): boolean;
264
+ /**
265
+ * Reset static error messages on attribute
266
+ */
267
+ resetErrors(): void;
268
+ /**
269
+ * Registers an error that was received from a server response
270
+ */
271
+ addServerError(error: FormErrorAnchor): void;
272
+ /**
273
+ */
274
+ removeServerError(id: string): void;
275
+ /**
276
+ */
277
+ hasServerErrors(): boolean;
278
+ /**
279
+ */
280
+ hasErrors(): boolean;
281
+ /**
282
+ * Registers a missing error that was received from the server
283
+ */
284
+ addMissingError(): void;
285
+ /**
286
+ */
287
+ removeMissingError(): void;
288
+ /**
289
+ */
290
+ addServerConstraint(id: string, defaultMessage?: string, parameters?: MessageParameters): void;
291
+ /**
292
+ */
293
+ formatParameters(parameters: Object): {
294
+ [string]: string | number;
295
+ };
296
+ /**
297
+ */
298
+ get hasDynamicValidationData(): boolean;
299
+ /**
300
+ */
301
+ updateValidations(errors: Array<Object>): void;
302
+ /**
303
+ * Set last modification to current timestamp
304
+ */
305
+ updateLastModification(): void;
306
+ /**
307
+ * Inidicates if attribute is changed since a given timestamp (Date.now)
308
+ */
309
+ isChangedSince(timestamp: number): boolean;
310
+ /**
311
+ * Abstract reset method which should be implemented on each attribute that has this attribute as a base class.
312
+ *
313
+ * @abstract
314
+ */
315
+ reset(): void;
316
+ /**
317
+ * Merge old attribute with the attribute from the server.
318
+ * Readonly attributes always need to show the value from the server
319
+ */
320
+ mergeAttribute(oldAttribute: AttributeType): void;
321
+ /**
322
+ * Abstract update method which should be implemented on each attribute that has this attribute as a base class.
323
+ * @abstract
324
+ */
325
+ update(value: string, changedAttribute?: AttributeType): AttributeType;
326
+ /**
327
+ * Indicate if attribute is editable
328
+ */
329
+ set isEditable(arg: boolean);
330
+ /**
331
+ * Retrieve if attribute is editable
332
+ */
333
+ get isEditable(): boolean;
334
+ /**
335
+ * Indicates if the attribute is visible
336
+ */
337
+ get isVisible(): boolean;
338
+ /**
339
+ */
340
+ set isHidden(arg: boolean);
341
+ /**
342
+ */
343
+ get isHidden(): boolean;
344
+ /**
345
+ * Explicitly toggle visibility of this attribute
346
+ */
347
+ show(): void;
348
+ /**
349
+ */
350
+ hide(): void;
351
+ /**
352
+ */
353
+ equals(otherAttribute: AttributeType): boolean;
354
+ /**
355
+ * Readonly attribute width indicates the proposed width of this attribute
356
+ */
357
+ get readonlyWidth(): $Keys<{
358
+ EXTRA_SMALL: string;
359
+ SMALL: string;
360
+ MEDIUM: string;
361
+ LARGE: string;
362
+ EXTRA_LARGE: string;
363
+ }>;
364
+ /**
365
+ */
366
+ set layoutHintRules(arg: LayoutHintRuleCollection);
367
+ /**
368
+ */
369
+ get layoutHintRules(): LayoutHintRuleCollection;
370
+ /**
371
+ */
372
+ processLayoutHintRules(attributes: AttributeCollection): void;
373
+ /**
374
+ * Indicates if content comes from the data service
375
+ */
376
+ get hasContentFromData(): boolean;
377
+ /**
378
+ */
379
+ get content(): AttributeContent;
380
+ }
381
+ import BaseModel from "../base/BaseModel";
382
+ import ErrorCollection from "../error/ErrorCollection";
383
+ import ConstraintCollection from "./input-constraints/ConstraintCollection";
384
+ import ConceptDetailModel from "../concepts/ConceptDetailModel";
385
+ import LinkCollection from "../links/LinkCollection";
386
+ import LayoutHintRuleCollection from "./layouthint-rules/LayoutHintRuleCollection";
387
+ import LinkModel from "../links/LinkModel";
388
+ import { ModularUIModel } from "../types";
389
+ import ContentConfiguration from "../contentconfiguration/ContentConfiguration";
390
+ import ContentConfigurationElements from "../contentconfiguration/ContentConfigurationElements";
391
+ import { FormErrorAnchor } from "../types";
392
+ import { MessageParameters } from "../../i18n/types";
393
+ import { AttributeType } from "../types";
394
+ import AttributeCollection from "./AttributeCollection";
395
+ import AttributeContent from "./AttributeContent";
@@ -0,0 +1,28 @@
1
+ /**
2
+ */
3
+ export default class AttributeSetModel extends BaseModel {
4
+ /**
5
+ */
6
+ constructor(key?: string, data?: Object, contributions?: Object);
7
+ _key: string;
8
+ _attributeCollection: AttributeCollection;
9
+ /**
10
+ */
11
+ set key(arg: string);
12
+ /**
13
+ */
14
+ get key(): string;
15
+ /**
16
+ */
17
+ get label(): string;
18
+ /**
19
+ * Set the attributes with a new AttributeCollection
20
+ */
21
+ set attributeCollection(arg: AttributeCollection);
22
+ /**
23
+ * Retrieve attribute collection
24
+ */
25
+ get attributeCollection(): AttributeCollection;
26
+ }
27
+ import BaseModel from "../base/BaseModel";
28
+ import AttributeCollection from "./AttributeCollection";
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Model for a boolean attribute
3
+ */
4
+ export default class BooleanAttributeModel extends AttributeModel {
5
+ _referenceDate: string;
6
+ _options: ChoiceAttributeOptionCollection;
7
+ /**
8
+ * Set reference date for concepts and content
9
+ */
10
+ set referenceDate(arg: string);
11
+ /**
12
+ * Retrieve reference date of attribute which can be used as entryDate for content
13
+ */
14
+ get referenceDate(): string;
15
+ /**
16
+ * Getting the type of choice filter. For instance checkbox, radiobutton, combobox.
17
+ */
18
+ get choicetype(): "toggle" | "checkbox" | "radiobutton" | "combobox";
19
+ /**
20
+ * Can multiple options be selected
21
+ */
22
+ get isMultiple(): boolean;
23
+ /**
24
+ * Check if options need to be rendered as tree
25
+ */
26
+ get isTree(): boolean;
27
+ /**
28
+ * Get content configuration configured on the attribute.
29
+ * Only applicable for taxonomy element and knowledge codemaps,
30
+ * content configuration for instrument questions is available on the form object
31
+ */
32
+ get contentConfiguration(): ContentConfigurationElements;
33
+ /**
34
+ * Retrieve available choice options
35
+ */
36
+ get options(): ChoiceAttributeOptionCollection;
37
+ /**
38
+ * Getting all enabled options
39
+ */
40
+ get selected(): string[];
41
+ /**
42
+ * Retrieve list of selected options, joined with comma
43
+ */
44
+ getValue(): string | null;
45
+ /**
46
+ * Setting an option selected or unselected based on the current state
47
+ */
48
+ toggleOption(code: string): void;
49
+ /**
50
+ * Enable a option
51
+ */
52
+ enableOption(code: string): void;
53
+ /**
54
+ * Disable a option
55
+ */
56
+ disableOption(code: string): void;
57
+ concept: any;
58
+ /**
59
+ * Update attribute by name and value
60
+ */
61
+ update(value: any): BooleanAttributeModel;
62
+ }
63
+ import AttributeModel from "./AttributeModel";
64
+ import ChoiceAttributeOptionCollection from "./ChoiceAttributeOptionCollection";
65
+ import ContentConfigurationElements from "../contentconfiguration/ContentConfigurationElements";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Password attribute
3
+ */
4
+ export default class CaptchaAttributeModel extends AttributeModel {
5
+ /**
6
+ * Update the attribute by name and value
7
+ */
8
+ update(value: string): this;
9
+ }
10
+ import AttributeModel from "./AttributeModel";
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Model for a choice attribute
3
+ */
4
+ export default class ChoiceAttributeModel extends AttributeModel {
5
+ _options: ChoiceAttributeOptionCollection;
6
+ concept: any;
7
+ /**
8
+ * Retrieve lookup service link
9
+ */
10
+ get lookupLink(): LinkModel;
11
+ /**
12
+ * Retrieve lookup service as list link
13
+ */
14
+ get lookupListLink(): LinkModel;
15
+ /**
16
+ */
17
+ get lookupListLabel(): string;
18
+ /**
19
+ * Retrieve available choice options
20
+ */
21
+ get options(): ChoiceAttributeOptionCollection;
22
+ /**
23
+ * Getting all enabled options
24
+ */
25
+ get selected(): string[];
26
+ /**
27
+ * Retrieve list of selected options, joined with comma
28
+ */
29
+ getValue(): string | null;
30
+ /**
31
+ * Setting an option selected or unselected based on the current state
32
+ */
33
+ toggleOption(code: string): void;
34
+ /**
35
+ * Enable a option
36
+ */
37
+ enableOption(code: string): void;
38
+ /**
39
+ * Disable a option
40
+ */
41
+ disableOption(code: string): void;
42
+ /**
43
+ * Add a new option to the collection of lookup options
44
+ */
45
+ addOption(option: Object): void;
46
+ /**
47
+ * Getting the type of choice filter. For instance checkbox, radiobutton, combobox.
48
+ */
49
+ get choicetype(): "toggle" | "table" | "list" | "checkbox" | "radiobutton" | "combobox" | "listview" | "longlist";
50
+ /**
51
+ * Can multiple options be selected
52
+ */
53
+ get isMultiple(): boolean;
54
+ /**
55
+ * Check if options need to be rendered as tree
56
+ */
57
+ get isTree(): boolean;
58
+ /**
59
+ * Update attribute by name and value
60
+ */
61
+ update(value: any): ChoiceAttributeModel;
62
+ /**
63
+ * Get content configuration configured on the attribute.
64
+ * Only applicable for taxonomy element and knowledge codemaps,
65
+ * content configuration for instrument questions is available on the form object
66
+ */
67
+ get contentConfiguration(): ContentConfigurationElements;
68
+ /**
69
+ * Get placeholder text
70
+ */
71
+ get placeholder(): string;
72
+ }
73
+ import AttributeModel from "./AttributeModel";
74
+ import ChoiceAttributeOptionCollection from "./ChoiceAttributeOptionCollection";
75
+ import LinkModel from "../links/LinkModel";
76
+ import ContentConfigurationElements from "../contentconfiguration/ContentConfigurationElements";
@@ -0,0 +1,82 @@
1
+ export default ChoiceAttributeOptionCollection;
2
+ /**
3
+ */
4
+ declare class ChoiceAttributeOptionCollection extends ResourceCollection<ChoiceAttributeOptionModel, any> {
5
+ /**
6
+ */
7
+ static create(data?: Object, contributions?: Object, referenceDate?: ISO_DATE): ChoiceAttributeOptionCollection;
8
+ constructor(initCollection?: ChoiceAttributeOptionModel[]);
9
+ _headers: Array<ListHeaderModel>;
10
+ _sortOptions: boolean;
11
+ /**
12
+ */
13
+ set sortOptions(arg: boolean);
14
+ /**
15
+ */
16
+ get sortOptions(): boolean;
17
+ /**
18
+ */
19
+ getSelectedOptions(data: Object): Array<string>;
20
+ /**
21
+ */
22
+ getOptionCount(code: string, options: Array<Object>): number | null;
23
+ /**
24
+ */
25
+ addOptions(data: Object, contributions: Object, referenceDate?: ISO_DATE): ChoiceAttributeOptionCollection;
26
+ /**
27
+ * Create options based on data and dynamischema
28
+ */
29
+ addDynamicSchema(data: Object, contributions: Object, referenceDate?: ISO_DATE): ChoiceAttributeOptionCollection;
30
+ /**
31
+ */
32
+ addBooleanOption(code: "true" | "false", defaultLabel: string, data: string | Array<string>, options?: Array<Object>): void;
33
+ /**
34
+ */
35
+ getDefaultValueForOption(value: any, contributions: Object): string;
36
+ /**
37
+ * Create two static options for true and false,
38
+ * there might be alternative labels configured for each option value
39
+ */
40
+ addBooleanOptions(value: any, contributions: Object): ChoiceAttributeOptionCollection;
41
+ /**
42
+ */
43
+ addOption(data: string | Array<string>, contributions: Object, referenceDate?: ISO_DATE): ChoiceAttributeOptionCollection;
44
+ /**
45
+ * Get all options that have selected property true
46
+ */
47
+ get selected(): ChoiceAttributeOptionModel[];
48
+ /**
49
+ * Deselect all options
50
+ */
51
+ deselectAll(): void;
52
+ /**
53
+ * Select an option by it's code
54
+ */
55
+ select(optionCode: string): void;
56
+ /**
57
+ * Deselect an option by it's code
58
+ */
59
+ deselect(optionCode: string): void;
60
+ /**
61
+ * Toggle an option by it's code
62
+ */
63
+ toggle(optionCode: string, action: "select" | "deselect"): void;
64
+ /**
65
+ */
66
+ setReferenceDate(date: ISO_DATE): Array<ChoiceAttributeOptionModel>;
67
+ /**
68
+ */
69
+ set referenceDate(arg: ISO_DATE);
70
+ /**
71
+ */
72
+ addHeaders(headers: Array<Object>): void;
73
+ /**
74
+ */
75
+ get headers(): ListHeaderModel[];
76
+ /**
77
+ */
78
+ mergeOptions(withOptions: ChoiceAttributeOptionCollection, addNotExistingOptions?: boolean): void;
79
+ }
80
+ import ChoiceAttributeOptionModel from "./ChoiceAttributeOptionModel";
81
+ import ResourceCollection from "../base/ResourceCollection";
82
+ import ListHeaderModel from "../list/ListHeaderModel";