@aemforms/af-core 0.22.25 → 0.22.26

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 (76) hide show
  1. package/lib/browser/afb-events.js +151 -0
  2. package/lib/browser/afb-runtime.js +3620 -0
  3. package/lib/cjs/index.cjs +8886 -0
  4. package/lib/esm/BaseNode.d.ts +93 -0
  5. package/lib/esm/BaseNode.js +454 -0
  6. package/lib/esm/Checkbox.d.ts +79 -0
  7. package/lib/esm/Checkbox.js +27 -0
  8. package/lib/esm/CheckboxGroup.d.ts +18 -0
  9. package/lib/esm/CheckboxGroup.js +23 -0
  10. package/lib/esm/Container.d.ts +53 -0
  11. package/lib/esm/Container.js +290 -0
  12. package/lib/esm/DateField.d.ts +5 -0
  13. package/lib/esm/DateField.js +21 -0
  14. package/lib/esm/Field.d.ts +206 -0
  15. package/lib/esm/Field.js +656 -0
  16. package/lib/esm/Fieldset.d.ts +16 -0
  17. package/lib/esm/Fieldset.js +45 -0
  18. package/lib/esm/FileObject.d.ts +16 -0
  19. package/lib/esm/FileObject.js +26 -0
  20. package/lib/esm/FileUpload.d.ts +22 -0
  21. package/lib/esm/FileUpload.js +108 -0
  22. package/lib/esm/Form.d.ts +113 -0
  23. package/lib/esm/Form.js +176 -0
  24. package/lib/esm/FormInstance.d.ts +13 -0
  25. package/lib/esm/FormInstance.js +81 -0
  26. package/lib/esm/FormMetaData.d.ts +7 -0
  27. package/lib/esm/FormMetaData.js +10 -0
  28. package/lib/esm/InstanceManager.d.ts +9 -0
  29. package/lib/esm/InstanceManager.js +31 -0
  30. package/lib/esm/Node.d.ts +7 -0
  31. package/lib/esm/Node.js +16 -0
  32. package/lib/esm/Scriptable.d.ts +17 -0
  33. package/lib/esm/Scriptable.js +163 -0
  34. package/lib/esm/controller/EventQueue.d.ts +17 -0
  35. package/lib/esm/controller/EventQueue.js +86 -0
  36. package/lib/esm/controller/Events.d.ts +85 -0
  37. package/lib/esm/controller/Events.js +149 -0
  38. package/lib/esm/controller/Logger.d.ts +11 -0
  39. package/lib/esm/controller/Logger.js +30 -0
  40. package/lib/esm/data/DataGroup.d.ts +20 -0
  41. package/lib/esm/data/DataGroup.js +77 -0
  42. package/lib/esm/data/DataValue.d.ts +16 -0
  43. package/lib/esm/data/DataValue.js +46 -0
  44. package/lib/esm/data/EmptyDataValue.d.ts +14 -0
  45. package/lib/esm/data/EmptyDataValue.js +29 -0
  46. package/lib/esm/index.d.ts +21 -0
  47. package/lib/esm/index.js +21 -0
  48. package/lib/esm/rules/FunctionRuntime.d.ts +51 -0
  49. package/lib/esm/rules/FunctionRuntime.js +320 -0
  50. package/lib/esm/rules/RuleEngine.d.ts +12 -0
  51. package/lib/esm/rules/RuleEngine.js +47 -0
  52. package/lib/esm/types/Json.d.ts +119 -0
  53. package/lib/esm/types/Json.js +7 -0
  54. package/lib/esm/types/Model.d.ts +131 -0
  55. package/lib/esm/types/Model.js +8 -0
  56. package/lib/esm/types/index.d.ts +2 -0
  57. package/lib/esm/types/index.js +2 -0
  58. package/lib/esm/utils/DataRefParser.d.ts +27 -0
  59. package/lib/esm/utils/DataRefParser.js +222 -0
  60. package/lib/esm/utils/Fetch.d.ts +8 -0
  61. package/lib/esm/utils/Fetch.js +61 -0
  62. package/lib/esm/utils/FormCreationUtils.d.ts +9 -0
  63. package/lib/esm/utils/FormCreationUtils.js +74 -0
  64. package/lib/esm/utils/FormUtils.d.ts +12 -0
  65. package/lib/esm/utils/FormUtils.js +187 -0
  66. package/lib/esm/utils/JsonUtils.d.ts +11 -0
  67. package/lib/esm/utils/JsonUtils.js +76 -0
  68. package/lib/esm/utils/LogUtils.d.ts +4 -0
  69. package/lib/esm/utils/LogUtils.js +6 -0
  70. package/lib/esm/utils/SchemaUtils.d.ts +3 -0
  71. package/lib/esm/utils/SchemaUtils.js +71 -0
  72. package/lib/esm/utils/TranslationUtils.d.ts +11 -0
  73. package/lib/esm/utils/TranslationUtils.js +115 -0
  74. package/lib/esm/utils/ValidationUtils.d.ts +19 -0
  75. package/lib/esm/utils/ValidationUtils.js +274 -0
  76. package/package.json +1 -1
@@ -0,0 +1,53 @@
1
+ import { Action, BaseModel, ContainerJson, ContainerModel, FieldModel, FieldsetModel, FormModel, IFormFieldFactory, RulesJson } from './types/index.js';
2
+ import Scriptable from './Scriptable.js';
3
+ import DataGroup from './data/DataGroup.js';
4
+ declare abstract class Container<T extends ContainerJson & RulesJson> extends Scriptable<T> implements ContainerModel {
5
+ protected _children: Array<FieldModel | FieldsetModel>;
6
+ protected _childrenReference: any;
7
+ private _itemTemplate;
8
+ private fieldFactory;
9
+ constructor(json: T, _options: {
10
+ form: FormModel;
11
+ parent: ContainerModel;
12
+ fieldFactory: IFormFieldFactory;
13
+ });
14
+ ruleNodeReference(): any;
15
+ get items(): (FieldModel | FieldsetModel)[];
16
+ get maxItems(): number;
17
+ set maxItems(m: number);
18
+ get minItems(): number;
19
+ hasDynamicItems(): boolean;
20
+ get isContainer(): boolean;
21
+ private _activeChild;
22
+ getState(): T & {
23
+ items: any[];
24
+ properties: {
25
+ [key: string]: any;
26
+ };
27
+ index: number;
28
+ parent: undefined;
29
+ qualifiedName: any;
30
+ events: {};
31
+ rules: {};
32
+ repeatable: boolean | undefined;
33
+ ':type': string;
34
+ id: string;
35
+ };
36
+ private _createChild;
37
+ private _addChildToRuleNode;
38
+ private _addChild;
39
+ indexOf(f: FieldModel | FieldsetModel): number;
40
+ defaultDataModel(name: string): DataGroup | undefined;
41
+ _initialize(): void;
42
+ addItem(action: Action): void;
43
+ removeItem(action: Action): void;
44
+ queueEvent(action: Action): void;
45
+ reset(): void;
46
+ validate(): import("./types/Model.js").ValidationError[];
47
+ dispatch(action: Action): void;
48
+ importData(contextualDataModel: DataGroup): void;
49
+ syncDataAndFormModel(contextualDataModel?: DataGroup): void;
50
+ get activeChild(): BaseModel | null;
51
+ set activeChild(c: BaseModel | null);
52
+ }
53
+ export default Container;
@@ -0,0 +1,290 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { deepClone } from './utils/JsonUtils.js';
8
+ import Scriptable from './Scriptable.js';
9
+ import { ExecuteRule, Initialize, propertyChange } from './controller/Events.js';
10
+ import DataGroup from './data/DataGroup.js';
11
+ import { dependencyTracked } from './BaseNode.js';
12
+ class Container extends Scriptable {
13
+ _children = [];
14
+ _childrenReference;
15
+ _itemTemplate = null;
16
+ fieldFactory;
17
+ constructor(json, _options) {
18
+ super(json, { form: _options.form, parent: _options.parent });
19
+ this.fieldFactory = _options.fieldFactory;
20
+ }
21
+ ruleNodeReference() {
22
+ return this._childrenReference;
23
+ }
24
+ get items() {
25
+ return this._children;
26
+ }
27
+ get maxItems() {
28
+ return this._jsonModel.maxItems;
29
+ }
30
+ set maxItems(m) {
31
+ this._jsonModel.maxItems = m;
32
+ const minItems = this._jsonModel.minItems || 1;
33
+ const itemsLength = this._children.length;
34
+ const items2Remove = Math.min(itemsLength - m, itemsLength - minItems);
35
+ if (items2Remove > 0) {
36
+ for (let i = 0; i < items2Remove; i++) {
37
+ this.getDataNode().$removeDataNode(m + i);
38
+ this._childrenReference.pop();
39
+ }
40
+ const elems = this._children.splice(m, items2Remove);
41
+ this.notifyDependents(propertyChange('items', elems, null));
42
+ }
43
+ }
44
+ get minItems() {
45
+ return this._jsonModel.minItems;
46
+ }
47
+ hasDynamicItems() {
48
+ return this._itemTemplate != null;
49
+ }
50
+ get isContainer() {
51
+ return true;
52
+ }
53
+ _activeChild = null;
54
+ getState() {
55
+ return {
56
+ ...super.getState(),
57
+ items: this._children.map(x => {
58
+ return { ...x.getState() };
59
+ })
60
+ };
61
+ }
62
+ _createChild(child, options) {
63
+ const { parent = this } = options;
64
+ return this.fieldFactory.createField(child, {
65
+ form: options.form,
66
+ parent
67
+ });
68
+ }
69
+ _addChildToRuleNode(child, options) {
70
+ const self = this;
71
+ const { parent = this } = options;
72
+ const name = parent.type == 'array' ? parent._children.length + '' : child.name || '';
73
+ if (name.length > 0) {
74
+ Object.defineProperty(parent._childrenReference, name, {
75
+ get: () => {
76
+ if (child.isContainer && child.hasDynamicItems()) {
77
+ self.ruleEngine.trackDependency(child);
78
+ }
79
+ if (self.hasDynamicItems()) {
80
+ self.ruleEngine.trackDependency(self);
81
+ if (this._children[name] !== undefined) {
82
+ return this._children[name].getRuleNode();
83
+ }
84
+ }
85
+ else {
86
+ return child.getRuleNode();
87
+ }
88
+ },
89
+ configurable: true,
90
+ enumerable: true
91
+ });
92
+ }
93
+ }
94
+ _addChild(itemJson, index, cloneIds = false) {
95
+ let nonTransparentParent = this;
96
+ while (nonTransparentParent != null && nonTransparentParent.isTransparent()) {
97
+ nonTransparentParent = nonTransparentParent.parent;
98
+ }
99
+ if (typeof index !== 'number' || index > nonTransparentParent._children.length) {
100
+ index = this._children.length;
101
+ }
102
+ const form = this.form;
103
+ const itemTemplate = {
104
+ index,
105
+ ...deepClone(itemJson, cloneIds ? () => { return form.getUniqueId(); } : undefined)
106
+ };
107
+ const retVal = this._createChild(itemTemplate, { parent: this, form: this.form });
108
+ this.form.fieldAdded(retVal);
109
+ this._addChildToRuleNode(retVal, { parent: nonTransparentParent });
110
+ if (index === this._children.length) {
111
+ this._children.push(retVal);
112
+ }
113
+ else {
114
+ this._children.splice(index, 0, retVal);
115
+ }
116
+ return retVal;
117
+ }
118
+ indexOf(f) {
119
+ return this._children.indexOf(f);
120
+ }
121
+ defaultDataModel(name) {
122
+ const type = this._jsonModel.type || undefined;
123
+ if (type === undefined) {
124
+ return undefined;
125
+ }
126
+ else {
127
+ const instance = type === 'array' ? [] : {};
128
+ return new DataGroup(name, instance, type);
129
+ }
130
+ }
131
+ _initialize() {
132
+ super._initialize();
133
+ const items = this._jsonModel.items || [];
134
+ this._jsonModel.items = [];
135
+ this._childrenReference = this._jsonModel.type == 'array' ? [] : {};
136
+ if (this._jsonModel.type == 'array' && items.length === 1 && this.getDataNode() != null) {
137
+ this._itemTemplate = deepClone(items[0]);
138
+ if (typeof (this._jsonModel.minItems) !== 'number') {
139
+ this._jsonModel.minItems = 0;
140
+ }
141
+ if (typeof (this._jsonModel.maxItems) !== 'number') {
142
+ this._jsonModel.maxItems = -1;
143
+ }
144
+ if (typeof (this._jsonModel.initialItems) !== 'number') {
145
+ this._jsonModel.initialItems = Math.max(1, this._jsonModel.minItems);
146
+ }
147
+ for (let i = 0; i < this._jsonModel.initialItems; i++) {
148
+ const child = this._addChild(this._itemTemplate);
149
+ child._initialize();
150
+ }
151
+ }
152
+ else if (items.length > 0) {
153
+ items.forEach((item) => {
154
+ const child = this._addChild(item);
155
+ child._initialize();
156
+ });
157
+ this._jsonModel.minItems = this._children.length;
158
+ this._jsonModel.maxItems = this._children.length;
159
+ this._jsonModel.initialItems = this._children.length;
160
+ }
161
+ else {
162
+ this.form.logger.warn('A container exists with no items.');
163
+ }
164
+ this.setupRuleNode();
165
+ }
166
+ addItem(action) {
167
+ if ((action.type === 'addItem' || action.type == 'addInstance') && this._itemTemplate != null) {
168
+ if ((this._jsonModel.maxItems === -1) || (this._children.length < this._jsonModel.maxItems)) {
169
+ const dataNode = this.getDataNode();
170
+ let instanceIndex = action.payload;
171
+ const retVal = this._addChild(this._itemTemplate, action.payload, true);
172
+ if (typeof instanceIndex !== 'number' || instanceIndex > this._children.length) {
173
+ instanceIndex = this._children.length;
174
+ }
175
+ const _data = retVal.defaultDataModel(instanceIndex);
176
+ if (_data) {
177
+ dataNode.$addDataNode(instanceIndex, _data);
178
+ }
179
+ retVal._initialize();
180
+ this.notifyDependents(propertyChange('items', retVal.getState(), null));
181
+ retVal.dispatch(new Initialize());
182
+ retVal.dispatch(new ExecuteRule());
183
+ for (let i = instanceIndex + 1; i < this._children.length; i++) {
184
+ this._children[i].dispatch(new ExecuteRule());
185
+ }
186
+ }
187
+ }
188
+ }
189
+ removeItem(action) {
190
+ if ((action.type === 'removeItem' || action.type == 'removeInstance') && this._itemTemplate != null) {
191
+ if (this._children.length == 0) {
192
+ return;
193
+ }
194
+ let instanceIndex = action.payload;
195
+ if (typeof instanceIndex !== 'number') {
196
+ instanceIndex = this._children.length - 1;
197
+ }
198
+ const state = this._children[instanceIndex].getState();
199
+ if (this._children.length > this._jsonModel.minItems) {
200
+ this._childrenReference.pop();
201
+ this._children.splice(instanceIndex, 1);
202
+ this.getDataNode().$removeDataNode(instanceIndex);
203
+ for (let i = instanceIndex; i < this._children.length; i++) {
204
+ this._children[i].dispatch(new ExecuteRule());
205
+ }
206
+ this.notifyDependents(propertyChange('items', null, state));
207
+ }
208
+ }
209
+ }
210
+ queueEvent(action) {
211
+ super.queueEvent(action);
212
+ if (action.metadata?.dispatch) {
213
+ this.items.forEach(x => {
214
+ x.queueEvent(action);
215
+ });
216
+ }
217
+ }
218
+ reset() {
219
+ this.items.forEach(x => {
220
+ x.reset();
221
+ });
222
+ }
223
+ validate() {
224
+ return this.items.flatMap(x => {
225
+ return x.validate();
226
+ }).filter(x => x.fieldName !== '');
227
+ }
228
+ dispatch(action) {
229
+ super.dispatch(action);
230
+ }
231
+ importData(contextualDataModel) {
232
+ this._bindToDataModel(contextualDataModel);
233
+ const dataNode = this.getDataNode() || contextualDataModel;
234
+ this.syncDataAndFormModel(dataNode);
235
+ }
236
+ syncDataAndFormModel(contextualDataModel) {
237
+ if (contextualDataModel?.$type === 'array' && this._itemTemplate != null) {
238
+ const dataLength = contextualDataModel?.$value.length;
239
+ const itemsLength = this._children.length;
240
+ const maxItems = this._jsonModel.maxItems === -1 ? dataLength : this._jsonModel.maxItems;
241
+ const minItems = this._jsonModel.minItems;
242
+ let items2Add = Math.min(dataLength - itemsLength, maxItems - itemsLength);
243
+ const items2Remove = Math.min(itemsLength - dataLength, itemsLength - minItems);
244
+ while (items2Add > 0) {
245
+ items2Add--;
246
+ const child = this._addChild(this._itemTemplate);
247
+ child._initialize();
248
+ }
249
+ if (items2Remove > 0) {
250
+ this._children.splice(dataLength, items2Remove);
251
+ for (let i = 0; i < items2Remove; i++) {
252
+ this._childrenReference.pop();
253
+ }
254
+ }
255
+ }
256
+ this._children.forEach(x => {
257
+ x.importData(contextualDataModel);
258
+ });
259
+ }
260
+ get activeChild() {
261
+ return this._activeChild;
262
+ }
263
+ set activeChild(c) {
264
+ if (c !== this._activeChild) {
265
+ let activeChild = this._activeChild;
266
+ while (activeChild instanceof Container) {
267
+ const temp = activeChild.activeChild;
268
+ activeChild.activeChild = null;
269
+ activeChild = temp;
270
+ }
271
+ const change = propertyChange('activeChild', c, this._activeChild);
272
+ this._activeChild = c;
273
+ if (this.parent && c !== null) {
274
+ this.parent.activeChild = this;
275
+ }
276
+ this._jsonModel.activeChild = c?.id;
277
+ this.notifyDependents(change);
278
+ }
279
+ }
280
+ }
281
+ __decorate([
282
+ dependencyTracked()
283
+ ], Container.prototype, "maxItems", null);
284
+ __decorate([
285
+ dependencyTracked()
286
+ ], Container.prototype, "minItems", null);
287
+ __decorate([
288
+ dependencyTracked()
289
+ ], Container.prototype, "activeChild", null);
290
+ export default Container;
@@ -0,0 +1,5 @@
1
+ import Field from './Field.js';
2
+ declare class DateField extends Field {
3
+ protected _applyDefaults(): void;
4
+ }
5
+ export default DateField;
@@ -0,0 +1,21 @@
1
+ import Field from './Field.js';
2
+ import { formatDate, parseDateSkeleton } from '@aemforms/af-formatters';
3
+ class DateField extends Field {
4
+ _applyDefaults() {
5
+ super._applyDefaults();
6
+ const locale = new Intl.DateTimeFormat().resolvedOptions().locale;
7
+ if (!this._jsonModel.editFormat) {
8
+ this._jsonModel.editFormat = 'short';
9
+ }
10
+ if (!this._jsonModel.displayFormat) {
11
+ this._jsonModel.displayFormat = this._jsonModel.editFormat;
12
+ }
13
+ if (!this._jsonModel.placeholder) {
14
+ this._jsonModel.placeholder = parseDateSkeleton(this._jsonModel.editFormat, locale);
15
+ }
16
+ if (!this._jsonModel.description) {
17
+ this._jsonModel.description = `To enter today's date use ${formatDate(new Date(), locale, this._jsonModel.editFormat)}`;
18
+ }
19
+ }
20
+ }
21
+ export default DateField;
@@ -0,0 +1,206 @@
1
+ import { ConstraintsMessages, ContainerModel, FieldJson, FieldModel, FormModel, ValidationError } from './types/index.js';
2
+ import Scriptable from './Scriptable.js';
3
+ import DataValue from './data/DataValue.js';
4
+ import DataGroup from './data/DataGroup.js';
5
+ declare class Field extends Scriptable<FieldJson> implements FieldModel {
6
+ constructor(params: FieldJson, _options: {
7
+ form: FormModel;
8
+ parent: ContainerModel;
9
+ });
10
+ private _ruleNodeReference;
11
+ _initialize(): any;
12
+ ruleNodeReference(): any;
13
+ protected _getDefaults(): {
14
+ readOnly: boolean;
15
+ enabled: boolean;
16
+ visible: boolean;
17
+ type: string | undefined;
18
+ };
19
+ protected _getFallbackType(): string | undefined;
20
+ protected _applyDefaults(): void;
21
+ private unset;
22
+ private coerceParam;
23
+ get editFormat(): string | undefined;
24
+ get displayFormat(): string | undefined;
25
+ get placeholder(): string | undefined;
26
+ get readOnly(): boolean | undefined;
27
+ set readOnly(e: boolean | undefined);
28
+ get enabled(): boolean | undefined;
29
+ set enabled(e: boolean | undefined);
30
+ get valid(): boolean | undefined;
31
+ get emptyValue(): "" | null | undefined;
32
+ get enum(): any[] | undefined;
33
+ set enum(e: any[] | undefined);
34
+ get enumNames(): string[] | undefined;
35
+ set enumNames(e: string[] | undefined);
36
+ get required(): boolean;
37
+ set required(r: boolean);
38
+ get maximum(): number | undefined;
39
+ set maximum(m: number | undefined);
40
+ get minimum(): number | undefined;
41
+ set minimum(m: number | undefined);
42
+ private isEmpty;
43
+ private withCategory;
44
+ get editValue(): any;
45
+ get displayValue(): any;
46
+ protected getDataNodeValue(typedValue: any): any;
47
+ private updateDataNodeAndTypedValue;
48
+ get value(): any;
49
+ set value(v: any);
50
+ reset(): void;
51
+ protected _updateRuleNodeReference(value: any): void;
52
+ protected getInternalType(): string | undefined;
53
+ valueOf(): any;
54
+ toString(): any;
55
+ getErrorMessage(constraint: keyof (ConstraintsMessages)): string;
56
+ get errorMessage(): string | undefined;
57
+ get screenReaderText(): string | undefined;
58
+ _getConstraintObject(): {
59
+ enum: (constraint: any, inputVal: any) => {
60
+ valid: boolean;
61
+ value: any;
62
+ };
63
+ accept: (constraint: any, inputVal: any) => {
64
+ valid: boolean;
65
+ value: any;
66
+ };
67
+ exclusiveMinimum: (constraint: any, inputVal: any) => {
68
+ valid: boolean;
69
+ value: any;
70
+ };
71
+ exclusiveMaximum: (constraint: any, inputVal: any) => {
72
+ valid: boolean;
73
+ value: any;
74
+ };
75
+ format: (constraint: any, inputVal: any) => {
76
+ valid: boolean;
77
+ value: any;
78
+ };
79
+ maxFileSize: (constraint: any, inputVal: any) => {
80
+ valid: boolean;
81
+ value: any;
82
+ };
83
+ maxLength: (constraint: any, inputVal: any) => {
84
+ valid: boolean;
85
+ value: any;
86
+ };
87
+ maximum: (constraint: any, inputVal: any) => {
88
+ valid: boolean;
89
+ value: any;
90
+ };
91
+ maxItems: (constraint: any, inputVal: any) => {
92
+ valid: boolean;
93
+ value: any;
94
+ };
95
+ minLength: (constraint: any, inputVal: any) => {
96
+ valid: boolean;
97
+ value: any;
98
+ };
99
+ minimum: (constraint: any, inputVal: any) => {
100
+ valid: boolean;
101
+ value: any;
102
+ };
103
+ minItems: (constraint: any, inputVal: any) => {
104
+ valid: boolean;
105
+ value: any;
106
+ };
107
+ pattern: (constraint: any, inputVal: any) => {
108
+ valid: boolean;
109
+ value: any;
110
+ };
111
+ required: (constraint: any, inputVal: any) => {
112
+ valid: boolean;
113
+ value: any;
114
+ };
115
+ type: (constraint: any, inputVal: any) => {
116
+ valid: boolean;
117
+ value: any;
118
+ };
119
+ uniqueItems: (constraint: any, inputVal: any) => {
120
+ valid: boolean;
121
+ value: any;
122
+ };
123
+ };
124
+ private isArrayType;
125
+ private checkEnum;
126
+ private checkStep;
127
+ private checkValidationExpression;
128
+ private getConstraints;
129
+ get format(): string | undefined;
130
+ get enforceEnum(): boolean | undefined;
131
+ get tooltip(): string | undefined;
132
+ get maxLength(): number | undefined;
133
+ get minLength(): number | undefined;
134
+ get pattern(): string | undefined;
135
+ get step(): number | undefined;
136
+ get exclusiveMinimum(): number | undefined;
137
+ set exclusiveMinimum(eM: number | undefined);
138
+ get exclusiveMaximum(): number | undefined;
139
+ set exclusiveMaximum(eM: number | undefined);
140
+ get default(): any;
141
+ private isNotEmpty;
142
+ protected evaluateConstraints(): any;
143
+ triggerValidationEvent(changes: any): void;
144
+ validate(): ValidationError[];
145
+ importData(contextualDataModel: DataGroup): void;
146
+ defaultDataModel(name: string | number): DataValue;
147
+ getState(): {
148
+ editValue: any;
149
+ displayValue: any;
150
+ description?: string | undefined;
151
+ rules: import("./types/Json.js").Items<string> & {};
152
+ events: import("./types/Json.js").Items<string | string[] | undefined> & {};
153
+ enumNames?: string[] | undefined;
154
+ enum?: any[] | undefined;
155
+ accept?: string[] | undefined;
156
+ enforceEnum?: boolean | undefined;
157
+ exclusiveMinimum?: number | undefined;
158
+ exclusiveMaximum?: number | undefined;
159
+ format?: string | undefined;
160
+ maxFileSize?: string | number | undefined;
161
+ maxLength?: number | undefined;
162
+ maximum?: number | undefined;
163
+ maxItems?: number | undefined;
164
+ minOccur?: number | undefined;
165
+ maxOccur?: number | undefined;
166
+ minLength?: number | undefined;
167
+ minimum?: number | undefined;
168
+ minItems?: number | undefined;
169
+ pattern?: string | undefined;
170
+ required?: boolean | undefined;
171
+ step?: number | undefined;
172
+ type?: string | undefined;
173
+ validationExpression?: string | undefined;
174
+ uniqueItems?: boolean | undefined;
175
+ dataRef?: string | null | undefined;
176
+ ':type': string;
177
+ label?: import("./types/Json.js").Label | undefined;
178
+ enabled?: boolean | undefined;
179
+ visible?: boolean | undefined;
180
+ name?: string | undefined;
181
+ constraintMessages?: ConstraintsMessages | undefined;
182
+ fieldType?: string | undefined;
183
+ errorMessage?: string | undefined;
184
+ properties: {
185
+ [key: string]: any;
186
+ };
187
+ repeatable: boolean | undefined;
188
+ screenReaderText?: string | undefined;
189
+ tooltip?: string | undefined;
190
+ altText?: string | undefined;
191
+ viewType?: string | undefined;
192
+ placeholder?: string | undefined;
193
+ readOnly?: boolean | undefined;
194
+ valid?: boolean | undefined;
195
+ default?: any;
196
+ value?: any;
197
+ displayFormat?: string | undefined;
198
+ editFormat?: string | undefined;
199
+ emptyValue?: "" | "undefined" | "null" | undefined;
200
+ index: number;
201
+ parent: undefined;
202
+ qualifiedName: any;
203
+ id: string;
204
+ };
205
+ }
206
+ export default Field;