@aemforms/af-core 0.22.19 → 0.22.22

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 (124) hide show
  1. package/LICENSE +18 -4
  2. package/lib/cjs/index.cjs +7277 -0
  3. package/lib/{BaseNode.js → esm/BaseNode-dc59ab07.js} +108 -184
  4. package/lib/{BaseNode.d.ts → esm/BaseNode.d.ts} +10 -69
  5. package/lib/esm/BaseNode.js +26 -0
  6. package/lib/esm/Checkbox.d.ts +79 -0
  7. package/lib/esm/Checkbox.js +63 -0
  8. package/lib/{CheckboxGroup.d.ts → esm/CheckboxGroup.d.ts} +2 -14
  9. package/lib/esm/CheckboxGroup.js +60 -0
  10. package/lib/{Container.d.ts → esm/Container.d.ts} +12 -59
  11. package/lib/{Container.js → esm/Container.js} +81 -122
  12. package/lib/{DateField.d.ts → esm/DateField.d.ts} +1 -1
  13. package/lib/esm/DateField.js +57 -0
  14. package/lib/{Field.d.ts → esm/Field.d.ts} +41 -106
  15. package/lib/{Field.js → esm/Field.js} +186 -216
  16. package/lib/esm/Fieldset.d.ts +16 -0
  17. package/lib/esm/Fieldset.js +78 -0
  18. package/lib/{FileObject.d.ts → esm/FileObject.d.ts} +1 -4
  19. package/lib/esm/FileObject.js +48 -0
  20. package/lib/{FileUpload.d.ts → esm/FileUpload.d.ts} +3 -18
  21. package/lib/esm/FileUpload.js +141 -0
  22. package/lib/{Form.d.ts → esm/Form.d.ts} +20 -86
  23. package/lib/esm/Form.js +208 -0
  24. package/lib/esm/FormInstance.d.ts +13 -0
  25. package/lib/esm/FormInstance.js +129 -0
  26. package/lib/esm/FormMetaData.d.ts +7 -0
  27. package/lib/esm/FormMetaData.js +35 -0
  28. package/lib/esm/InstanceManager.d.ts +9 -0
  29. package/lib/esm/InstanceManager.js +58 -0
  30. package/lib/esm/Node.d.ts +7 -0
  31. package/lib/esm/Node.js +40 -0
  32. package/lib/esm/Scriptable.d.ts +17 -0
  33. package/lib/{Scriptable.js → esm/Scriptable.js} +38 -54
  34. package/lib/{controller → esm/controller}/EventQueue.d.ts +3 -11
  35. package/lib/{controller → esm/controller}/EventQueue.js +32 -26
  36. package/lib/esm/controller/Events.d.ts +85 -0
  37. package/lib/esm/controller/Events.js +171 -0
  38. package/lib/{controller → esm/controller}/Logger.d.ts +2 -8
  39. package/lib/esm/controller/Logger.js +52 -0
  40. package/lib/{data → esm/data}/DataGroup.d.ts +1 -7
  41. package/lib/{data → esm/data}/DataGroup.js +38 -34
  42. package/lib/{data → esm/data}/DataValue.d.ts +1 -7
  43. package/lib/esm/data/DataValue.js +68 -0
  44. package/lib/{data → esm/data}/EmptyDataValue.d.ts +1 -1
  45. package/lib/esm/data/EmptyDataValue.js +51 -0
  46. package/lib/esm/index.d.ts +21 -0
  47. package/lib/esm/index.js +55 -0
  48. package/lib/{rules → esm/rules}/FunctionRuntime.d.ts +3 -25
  49. package/lib/{rules → esm/rules}/FunctionRuntime.js +66 -117
  50. package/lib/esm/rules/RuleEngine.d.ts +12 -0
  51. package/lib/esm/rules/RuleEngine.js +76 -0
  52. package/lib/esm/types/Json.d.ts +119 -0
  53. package/lib/esm/types/Json.js +29 -0
  54. package/lib/esm/types/Model.d.ts +131 -0
  55. package/lib/esm/types/Model.js +30 -0
  56. package/lib/esm/types/index.d.ts +2 -0
  57. package/lib/esm/types/index.js +22 -0
  58. package/lib/{utils → esm/utils}/DataRefParser.d.ts +4 -7
  59. package/lib/{utils → esm/utils}/DataRefParser.js +42 -44
  60. package/lib/{utils → esm/utils}/Fetch.d.ts +1 -7
  61. package/lib/esm/utils/Fetch.js +83 -0
  62. package/lib/esm/utils/FormCreationUtils.d.ts +9 -0
  63. package/lib/esm/utils/FormCreationUtils.js +112 -0
  64. package/lib/esm/utils/FormUtils.d.ts +12 -0
  65. package/lib/esm/utils/FormUtils.js +212 -0
  66. package/lib/esm/utils/JsonUtils.d.ts +11 -0
  67. package/lib/esm/utils/JsonUtils.js +99 -0
  68. package/lib/{utils → esm/utils}/LogUtils.d.ts +1 -4
  69. package/lib/esm/utils/LogUtils.js +28 -0
  70. package/lib/esm/utils/SchemaUtils.d.ts +3 -0
  71. package/lib/esm/utils/SchemaUtils.js +93 -0
  72. package/lib/esm/utils/TranslationUtils.d.ts +11 -0
  73. package/lib/esm/utils/TranslationUtils.js +138 -0
  74. package/lib/esm/utils/ValidationUtils.d.ts +19 -0
  75. package/lib/{utils → esm/utils}/ValidationUtils.js +55 -187
  76. package/package.json +18 -10
  77. package/lib/Checkbox.d.ts +0 -88
  78. package/lib/Checkbox.js +0 -49
  79. package/lib/CheckboxGroup.js +0 -43
  80. package/lib/DateField.js +0 -35
  81. package/lib/Fieldset.d.ts +0 -24
  82. package/lib/Fieldset.js +0 -74
  83. package/lib/FileObject.js +0 -39
  84. package/lib/FileUpload.js +0 -155
  85. package/lib/Form.js +0 -252
  86. package/lib/FormInstance.d.ts +0 -38
  87. package/lib/FormInstance.js +0 -127
  88. package/lib/FormMetaData.d.ts +0 -11
  89. package/lib/FormMetaData.js +0 -28
  90. package/lib/InstanceManager.d.ts +0 -16
  91. package/lib/InstanceManager.js +0 -53
  92. package/lib/Node.d.ts +0 -12
  93. package/lib/Node.js +0 -27
  94. package/lib/Scriptable.d.ts +0 -31
  95. package/lib/controller/Controller.d.ts +0 -255
  96. package/lib/controller/Controller.js +0 -328
  97. package/lib/controller/Logger.js +0 -36
  98. package/lib/controller/index.d.ts +0 -1
  99. package/lib/controller/index.js +0 -24
  100. package/lib/data/DataValue.js +0 -56
  101. package/lib/data/EmptyDataValue.js +0 -46
  102. package/lib/index.d.ts +0 -28
  103. package/lib/index.js +0 -63
  104. package/lib/rules/RuleEngine.d.ts +0 -23
  105. package/lib/rules/RuleEngine.js +0 -62
  106. package/lib/types/Json.d.ts +0 -138
  107. package/lib/types/Json.js +0 -19
  108. package/lib/types/Model.d.ts +0 -393
  109. package/lib/types/Model.js +0 -20
  110. package/lib/types/index.d.ts +0 -2
  111. package/lib/types/index.js +0 -25
  112. package/lib/utils/Fetch.js +0 -87
  113. package/lib/utils/FormCreationUtils.d.ts +0 -11
  114. package/lib/utils/FormCreationUtils.js +0 -83
  115. package/lib/utils/FormUtils.d.ts +0 -47
  116. package/lib/utils/FormUtils.js +0 -257
  117. package/lib/utils/JsonUtils.d.ts +0 -63
  118. package/lib/utils/JsonUtils.js +0 -157
  119. package/lib/utils/LogUtils.js +0 -17
  120. package/lib/utils/SchemaUtils.d.ts +0 -16
  121. package/lib/utils/SchemaUtils.js +0 -92
  122. package/lib/utils/TranslationUtils.d.ts +0 -41
  123. package/lib/utils/TranslationUtils.js +0 -185
  124. package/lib/utils/ValidationUtils.d.ts +0 -170
@@ -1,13 +1,7 @@
1
- import { Action, BaseJson, BaseModel, callbackFn, ContainerModel, FormModel, Primitives, ValidationError } from './types';
2
- import DataGroup from './data/DataGroup';
3
- import DataValue from './data/DataValue';
4
- /**
5
- * Defines the properties that are editable. These properties can be modified during rule execution.
6
- */
1
+ import { Action, BaseJson, BaseModel, callbackFn, ContainerModel, FormModel, Primitives, ValidationError } from './types/index.js';
2
+ import DataGroup from './data/DataGroup.js';
3
+ import DataValue from './data/DataValue.js';
7
4
  export declare const editableProperties: string[];
8
- /**
9
- * Defines props that are dynamic and can be changed at runtime.
10
- */
11
5
  export declare const dynamicProps: string[];
12
6
  export declare const staticFields: string[];
13
7
  export declare const target: unique symbol;
@@ -15,13 +9,10 @@ export declare const qualifiedName: unique symbol;
15
9
  export declare function dependencyTracked(): (target: BaseNode<any>, propertyKey: string, descriptor: PropertyDescriptor) => void;
16
10
  export declare const include: (...fieldTypes: string[]) => (target: BaseNode<any>, propertyKey: string, descriptor: PropertyDescriptor) => void;
17
11
  export declare const exclude: (...fieldTypes: string[]) => (target: BaseNode<any>, propertyKey: string, descriptor: PropertyDescriptor) => void;
18
- /**
19
- * Defines a generic base class which all objects of form runtime model should extend from.
20
- * @typeparam T type of the form object which extends from {@link BaseJson | base type}
21
- */
22
12
  export declare abstract class BaseNode<T extends BaseJson> implements BaseModel {
23
13
  private _options;
24
14
  private _ruleNode;
15
+ private _lang?;
25
16
  private _callbacks;
26
17
  private _dependents;
27
18
  protected _jsonModel: T & {
@@ -29,12 +20,6 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
29
20
  };
30
21
  private _tokens;
31
22
  get isContainer(): boolean;
32
- /**
33
- * @constructor
34
- * @param params
35
- * @param _options
36
- * @private
37
- */
38
23
  constructor(params: T, _options: {
39
24
  form: FormModel;
40
25
  parent: ContainerModel;
@@ -42,20 +27,14 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
42
27
  abstract value: Primitives;
43
28
  abstract reset(): any;
44
29
  protected setupRuleNode(): void;
45
- /**
46
- * @private
47
- */
48
30
  ruleNodeReference(): this;
49
- /**
50
- * @private
51
- */
52
31
  getRuleNode(): any;
53
32
  private getFromRule;
54
33
  get id(): string;
55
34
  get index(): number;
56
35
  get parent(): ContainerModel;
57
36
  get type(): string | undefined;
58
- get repeatable(): boolean;
37
+ get repeatable(): any;
59
38
  get fieldType(): string;
60
39
  get ':type'(): string;
61
40
  get name(): string | undefined;
@@ -65,13 +44,10 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
65
44
  get visible(): boolean | undefined;
66
45
  set visible(v: boolean | undefined);
67
46
  get form(): FormModel;
68
- get ruleEngine(): import("./rules/RuleEngine").default;
69
- get label(): import("./types").Label | undefined;
70
- set label(l: import("./types").Label | undefined);
47
+ get ruleEngine(): import("./rules/RuleEngine.js").default;
48
+ get label(): import("./types/Json.js").Label | undefined;
49
+ set label(l: import("./types/Json.js").Label | undefined);
71
50
  get uniqueItems(): boolean | undefined;
72
- /**
73
- * Transparent form fields are meant only for creation of view. They are also not part of data
74
- */
75
51
  isTransparent(): boolean;
76
52
  getState(): T & {
77
53
  properties: {
@@ -82,49 +58,25 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
82
58
  qualifiedName: any;
83
59
  events: {};
84
60
  rules: {};
61
+ repeatable: boolean | undefined;
85
62
  ':type': string;
86
63
  id: string;
87
64
  };
88
- /**
89
- * @private
90
- */
91
65
  subscribe(callback: callbackFn, eventName?: string): {
92
66
  unsubscribe: () => void;
93
67
  };
94
- /**
95
- * @private
96
- */
97
68
  _addDependent(dependent: BaseModel): void;
98
- /**
99
- * @private
100
- */
101
69
  removeDependent(dependent: BaseModel): void;
102
70
  abstract validate(): Array<ValidationError>;
103
71
  abstract executeAction(action: Action): any;
104
- /**
105
- * @private
106
- */
107
72
  queueEvent(action: Action): void;
108
73
  dispatch(action: Action): void;
109
- /**
110
- * @private
111
- */
112
74
  notifyDependents(action: Action): void;
113
- /**
114
- * @param prop
115
- * @param newValue
116
- * @private
117
- */
118
75
  _setProperty<T>(prop: string, newValue: T, notify?: boolean): any;
119
- /**
120
- * @private
121
- */
122
76
  _bindToDataModel(contextualDataModel: DataGroup): void;
123
77
  private _data?;
124
- /**
125
- * @private
126
- */
127
78
  getDataNode(): DataValue | undefined;
79
+ get language(): string | undefined;
128
80
  get properties(): {
129
81
  [key: string]: any;
130
82
  };
@@ -134,18 +86,7 @@ export declare abstract class BaseNode<T extends BaseJson> implements BaseModel
134
86
  abstract defaultDataModel(name: string | number): DataValue | undefined;
135
87
  abstract importData(a: DataGroup): any;
136
88
  getNonTransparentParent(): ContainerModel;
137
- /**
138
- * called after the node is inserted in the parent
139
- * @private
140
- */
141
89
  _initialize(): void;
142
- /**
143
- * Checks whether there are any updates in the properties. If there are applies them to the
144
- * json model as well.
145
- * @param propNames
146
- * @param updates
147
- * @private
148
- */
149
90
  protected _applyUpdates(propNames: string[], updates: any): any;
150
91
  get qualifiedName(): any;
151
92
  focus(): void;
@@ -0,0 +1,26 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ export { B as BaseNode, d as dependencyTracked, b as dynamicProps, a as editableProperties, e as exclude, i as include, q as qualifiedName, s as staticFields, t as target } from './BaseNode-dc59ab07.js';
22
+ import './controller/Events.js';
23
+ import './utils/DataRefParser.js';
24
+ import './data/EmptyDataValue.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
@@ -0,0 +1,79 @@
1
+ import Field from './Field.js';
2
+ declare class Checkbox extends Field {
3
+ private offValue;
4
+ _getConstraintObject(): {
5
+ enum: (constraint: any, inputVal: any) => {
6
+ valid: boolean;
7
+ value: any;
8
+ };
9
+ accept: (constraint: any, inputVal: any) => {
10
+ valid: boolean;
11
+ value: any;
12
+ };
13
+ exclusiveMinimum: (constraint: any, inputVal: any) => {
14
+ valid: boolean;
15
+ value: any;
16
+ };
17
+ exclusiveMaximum: (constraint: any, inputVal: any) => {
18
+ valid: boolean;
19
+ value: any;
20
+ };
21
+ format: (constraint: any, inputVal: any) => {
22
+ valid: boolean;
23
+ value: any;
24
+ };
25
+ maxFileSize: (constraint: any, inputVal: any) => {
26
+ valid: boolean;
27
+ value: any;
28
+ };
29
+ maxLength: (constraint: any, inputVal: any) => {
30
+ valid: boolean;
31
+ value: any;
32
+ };
33
+ maximum: (constraint: any, inputVal: any) => {
34
+ valid: boolean;
35
+ value: any;
36
+ };
37
+ maxItems: (constraint: any, inputVal: any) => {
38
+ valid: boolean;
39
+ value: any;
40
+ };
41
+ minLength: (constraint: any, inputVal: any) => {
42
+ valid: boolean;
43
+ value: any;
44
+ };
45
+ minimum: (constraint: any, inputVal: any) => {
46
+ valid: boolean;
47
+ value: any;
48
+ };
49
+ minItems: (constraint: any, inputVal: any) => {
50
+ valid: boolean;
51
+ value: any;
52
+ };
53
+ pattern: (constraint: any, inputVal: any) => {
54
+ valid: boolean;
55
+ value: any;
56
+ };
57
+ required: (constraint: any, inputVal: any) => {
58
+ valid: boolean;
59
+ value: any;
60
+ };
61
+ type: (constraint: any, inputVal: any) => {
62
+ valid: boolean;
63
+ value: any;
64
+ };
65
+ uniqueItems: (constraint: any, inputVal: any) => {
66
+ valid: boolean;
67
+ value: any;
68
+ };
69
+ };
70
+ protected _getDefaults(): {
71
+ enforceEnum: boolean;
72
+ readOnly: boolean;
73
+ enabled: boolean;
74
+ visible: boolean;
75
+ type: string | undefined;
76
+ };
77
+ get enum(): any[];
78
+ }
79
+ export default Checkbox;
@@ -0,0 +1,63 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ import Field from './Field.js';
22
+ import { Constraints } from './utils/ValidationUtils.js';
23
+ import './BaseNode-dc59ab07.js';
24
+ import './controller/Events.js';
25
+ import './utils/DataRefParser.js';
26
+ import './data/DataGroup.js';
27
+ import './data/DataValue.js';
28
+ import './data/EmptyDataValue.js';
29
+ import './types/Model.js';
30
+ import './Scriptable.js';
31
+ import './utils/SchemaUtils.js';
32
+ import '@aemforms/af-formatters';
33
+ import './utils/FormUtils.js';
34
+ import './utils/JsonUtils.js';
35
+ import './types/Json.js';
36
+ import './FileObject.js';
37
+
38
+ const requiredConstraint = (offValue) => (constraint, value) => {
39
+ const valid = Constraints.required(constraint, value).valid && (!constraint || value != offValue);
40
+ return { valid, value };
41
+ };
42
+ class Checkbox extends Field {
43
+ offValue() {
44
+ const opts = this.enum;
45
+ return opts.length > 1 ? opts[1] : null;
46
+ }
47
+ _getConstraintObject() {
48
+ const baseConstraints = { ...super._getConstraintObject() };
49
+ baseConstraints.required = requiredConstraint(this.offValue());
50
+ return baseConstraints;
51
+ }
52
+ _getDefaults() {
53
+ return {
54
+ ...super._getDefaults(),
55
+ enforceEnum: true
56
+ };
57
+ }
58
+ get enum() {
59
+ return this._jsonModel.enum || [];
60
+ }
61
+ }
62
+
63
+ export { Checkbox as default };
@@ -1,22 +1,10 @@
1
- import Field from './Field';
2
- import { ContainerModel, FieldJson, FormModel } from './types';
3
- /**
4
- * Implementation of CheckBoxGroup runtime model which extends from {@link Field | field}
5
- */
1
+ import Field from './Field.js';
2
+ import { ContainerModel, FieldJson, FormModel } from './types/index.js';
6
3
  declare class CheckboxGroup extends Field {
7
- /**
8
- * @param params
9
- * @param _options
10
- * @private
11
- */
12
4
  constructor(params: FieldJson, _options: {
13
5
  form: FormModel;
14
6
  parent: ContainerModel;
15
7
  });
16
- /**
17
- * converts the fallback type, if required, to an array. Since checkbox-group has an array type
18
- * @protected
19
- */
20
8
  protected _getFallbackType(): string | undefined;
21
9
  protected _getDefaults(): {
22
10
  enforceEnum: boolean;
@@ -0,0 +1,60 @@
1
+ /*************************************************************************
2
+ * ADOBE CONFIDENTIAL
3
+ * ___________________
4
+ *
5
+ * Copyright 2022 Adobe
6
+ * All Rights Reserved.
7
+ *
8
+ * NOTICE: All information contained herein is, and remains
9
+ * the property of Adobe and its suppliers, if any. The intellectual
10
+ * and technical concepts contained herein are proprietary to Adobe
11
+ * and its suppliers and are protected by all applicable intellectual
12
+ * property laws, including trade secret and copyright laws.
13
+ * Dissemination of this information or reproduction of this material
14
+ * is strictly forbidden unless prior written permission is obtained
15
+ * from Adobe.
16
+
17
+ * Adobe permits you to use and modify this file solely in accordance with
18
+ * the terms of the Adobe license agreement accompanying it.
19
+ *************************************************************************/
20
+
21
+ import Field from './Field.js';
22
+ import './BaseNode-dc59ab07.js';
23
+ import './controller/Events.js';
24
+ import './utils/DataRefParser.js';
25
+ import './data/DataGroup.js';
26
+ import './data/DataValue.js';
27
+ import './data/EmptyDataValue.js';
28
+ import './types/Model.js';
29
+ import './utils/ValidationUtils.js';
30
+ import './utils/FormUtils.js';
31
+ import './utils/JsonUtils.js';
32
+ import './types/Json.js';
33
+ import './utils/SchemaUtils.js';
34
+ import './FileObject.js';
35
+ import './Scriptable.js';
36
+ import '@aemforms/af-formatters';
37
+
38
+ class CheckboxGroup extends Field {
39
+ constructor(params, _options) {
40
+ super(params, _options);
41
+ }
42
+ _getFallbackType() {
43
+ const fallbackType = super._getFallbackType();
44
+ if (typeof fallbackType === 'string') {
45
+ return `${fallbackType}[]`;
46
+ }
47
+ else {
48
+ return 'string[]';
49
+ }
50
+ }
51
+ _getDefaults() {
52
+ return {
53
+ ...super._getDefaults(),
54
+ enforceEnum: true,
55
+ enum: []
56
+ };
57
+ }
58
+ }
59
+
60
+ export { CheckboxGroup as default };
@@ -1,39 +1,24 @@
1
- import { Action, BaseModel, ContainerJson, ContainerModel, FieldJson, FieldModel, FieldsetJson, FieldsetModel, RulesJson } from './types';
2
- import Scriptable from './Scriptable';
3
- import DataGroup from './data/DataGroup';
4
- /**
5
- * Defines a generic container class which any form container should extend from.
6
- * @typeparam T type of the node which extends {@link ContainerJson} and {@link RulesJson}
7
- */
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';
8
4
  declare abstract class Container<T extends ContainerJson & RulesJson> extends Scriptable<T> implements ContainerModel {
9
5
  protected _children: Array<FieldModel | FieldsetModel>;
10
6
  protected _childrenReference: any;
11
7
  private _itemTemplate;
12
- protected _jsonModel: T & {
13
- id: string;
14
- items: Array<FieldJson & {
15
- id: string;
16
- } | ContainerJson & {
17
- id: string;
18
- }>;
19
- };
20
- /**
21
- * @private
22
- */
8
+ private fieldFactory;
9
+ constructor(json: T, _options: {
10
+ form: FormModel;
11
+ parent: ContainerModel;
12
+ fieldFactory: IFormFieldFactory;
13
+ });
23
14
  ruleNodeReference(): any;
24
15
  get items(): (FieldModel | FieldsetModel)[];
25
16
  get maxItems(): number;
26
17
  set maxItems(m: number);
27
18
  get minItems(): number;
28
- /**
29
- * returns whether the items in the Panel can repeat or not
30
- */
31
19
  hasDynamicItems(): boolean;
32
20
  get isContainer(): boolean;
33
21
  private _activeChild;
34
- /**
35
- * Returns the current container state
36
- */
37
22
  getState(): T & {
38
23
  items: any[];
39
24
  properties: {
@@ -44,55 +29,23 @@ declare abstract class Container<T extends ContainerJson & RulesJson> extends Sc
44
29
  qualifiedName: any;
45
30
  events: {};
46
31
  rules: {};
32
+ repeatable: boolean | undefined;
47
33
  ':type': string;
48
34
  id: string;
49
35
  };
50
- protected abstract _createChild(child: FieldsetJson | FieldJson, options: any): FieldModel | FieldsetModel;
36
+ private _createChild;
51
37
  private _addChildToRuleNode;
52
38
  private _addChild;
53
39
  indexOf(f: FieldModel | FieldsetModel): number;
54
- /**
55
- * @private
56
- */
57
40
  defaultDataModel(name: string): DataGroup | undefined;
58
- /**
59
- * @private
60
- */
61
41
  _initialize(): void;
62
- /**
63
- * @private
64
- */
65
42
  addItem(action: Action): void;
66
- /**
67
- * @private
68
- */
69
43
  removeItem(action: Action): void;
70
- /**
71
- * @private
72
- */
73
44
  queueEvent(action: Action): void;
74
- /**
75
- * @summary reset the data of all the Fields present inside this container
76
- * @method reset
77
- * @private
78
- */
79
45
  reset(): void;
80
- validate(): import("./types").ValidationError[];
81
- /**
82
- * @private
83
- */
46
+ validate(): import("./types/Model.js").ValidationError[];
84
47
  dispatch(action: Action): void;
85
- /**
86
- * @private
87
- */
88
48
  importData(contextualDataModel: DataGroup): void;
89
- /**
90
- * prefill the form with data on the given element
91
- * @param dataModel
92
- * @param contextualDataModel
93
- * @param operation
94
- * @private
95
- */
96
49
  syncDataAndFormModel(contextualDataModel?: DataGroup): void;
97
50
  get activeChild(): BaseModel | null;
98
51
  set activeChild(c: BaseModel | null);