@aemforms/af-core 0.22.25 → 0.22.29

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 (75) hide show
  1. package/lib/cjs/index.cjs +7345 -0
  2. package/lib/esm/BaseNode-d78cc1b0.js +478 -0
  3. package/lib/esm/BaseNode.d.ts +93 -0
  4. package/lib/esm/BaseNode.js +26 -0
  5. package/lib/esm/Checkbox.d.ts +79 -0
  6. package/lib/esm/Checkbox.js +63 -0
  7. package/lib/esm/CheckboxGroup.d.ts +18 -0
  8. package/lib/esm/CheckboxGroup.js +60 -0
  9. package/lib/esm/Container.d.ts +58 -0
  10. package/lib/esm/Container.js +379 -0
  11. package/lib/esm/DateField.d.ts +5 -0
  12. package/lib/esm/DateField.js +57 -0
  13. package/lib/esm/Field.d.ts +206 -0
  14. package/lib/esm/Field.js +692 -0
  15. package/lib/esm/Fieldset.d.ts +16 -0
  16. package/lib/esm/Fieldset.js +78 -0
  17. package/lib/esm/FileObject.d.ts +16 -0
  18. package/lib/esm/FileObject.js +48 -0
  19. package/lib/esm/FileUpload.d.ts +22 -0
  20. package/lib/esm/FileUpload.js +141 -0
  21. package/lib/esm/Form.d.ts +113 -0
  22. package/lib/esm/Form.js +208 -0
  23. package/lib/esm/FormInstance.d.ts +13 -0
  24. package/lib/esm/FormInstance.js +129 -0
  25. package/lib/esm/FormMetaData.d.ts +7 -0
  26. package/lib/esm/FormMetaData.js +35 -0
  27. package/lib/esm/InstanceManager.d.ts +9 -0
  28. package/lib/esm/InstanceManager.js +58 -0
  29. package/lib/esm/Node.d.ts +7 -0
  30. package/lib/esm/Node.js +40 -0
  31. package/lib/esm/Scriptable.d.ts +17 -0
  32. package/lib/esm/Scriptable.js +190 -0
  33. package/lib/esm/controller/EventQueue.d.ts +17 -0
  34. package/lib/esm/controller/EventQueue.js +108 -0
  35. package/lib/esm/controller/Events.d.ts +85 -0
  36. package/lib/esm/controller/Events.js +171 -0
  37. package/lib/esm/controller/Logger.d.ts +11 -0
  38. package/lib/esm/controller/Logger.js +52 -0
  39. package/lib/esm/data/DataGroup.d.ts +20 -0
  40. package/lib/esm/data/DataGroup.js +100 -0
  41. package/lib/esm/data/DataValue.d.ts +16 -0
  42. package/lib/esm/data/DataValue.js +68 -0
  43. package/lib/esm/data/EmptyDataValue.d.ts +14 -0
  44. package/lib/esm/data/EmptyDataValue.js +51 -0
  45. package/lib/esm/index.d.ts +21 -0
  46. package/lib/esm/index.js +55 -0
  47. package/lib/esm/rules/FunctionRuntime.d.ts +51 -0
  48. package/lib/esm/rules/FunctionRuntime.js +345 -0
  49. package/lib/esm/rules/RuleEngine.d.ts +12 -0
  50. package/lib/esm/rules/RuleEngine.js +76 -0
  51. package/lib/esm/types/Json.d.ts +119 -0
  52. package/lib/esm/types/Json.js +29 -0
  53. package/lib/esm/types/Model.d.ts +131 -0
  54. package/lib/esm/types/Model.js +30 -0
  55. package/lib/esm/types/index.d.ts +2 -0
  56. package/lib/esm/types/index.js +22 -0
  57. package/lib/esm/utils/DataRefParser.d.ts +27 -0
  58. package/lib/esm/utils/DataRefParser.js +247 -0
  59. package/lib/esm/utils/Fetch.d.ts +8 -0
  60. package/lib/esm/utils/Fetch.js +83 -0
  61. package/lib/esm/utils/FormCreationUtils.d.ts +9 -0
  62. package/lib/esm/utils/FormCreationUtils.js +112 -0
  63. package/lib/esm/utils/FormUtils.d.ts +12 -0
  64. package/lib/esm/utils/FormUtils.js +212 -0
  65. package/lib/esm/utils/JsonUtils.d.ts +11 -0
  66. package/lib/esm/utils/JsonUtils.js +99 -0
  67. package/lib/esm/utils/LogUtils.d.ts +4 -0
  68. package/lib/esm/utils/LogUtils.js +28 -0
  69. package/lib/esm/utils/SchemaUtils.d.ts +3 -0
  70. package/lib/esm/utils/SchemaUtils.js +93 -0
  71. package/lib/esm/utils/TranslationUtils.d.ts +11 -0
  72. package/lib/esm/utils/TranslationUtils.js +138 -0
  73. package/lib/esm/utils/ValidationUtils.d.ts +19 -0
  74. package/lib/esm/utils/ValidationUtils.js +300 -0
  75. package/package.json +14 -2
@@ -0,0 +1,85 @@
1
+ import { Action, BaseJson, FieldModel, FieldsetModel, FormModel, ValidationError } from '../types/index.js';
2
+ declare class ActionImpl implements Action {
3
+ private _metadata?;
4
+ protected _type: string;
5
+ private _payload?;
6
+ private _target;
7
+ constructor(payload: any, type: string, _metadata?: any);
8
+ get type(): string;
9
+ get payload(): any;
10
+ get metadata(): any;
11
+ get target(): FormModel | FieldModel | FieldsetModel;
12
+ get isCustomEvent(): boolean;
13
+ protected payloadToJson(): any;
14
+ toJson(): {
15
+ payload: any;
16
+ type: string;
17
+ isCustomEvent: boolean;
18
+ };
19
+ toString(): string;
20
+ }
21
+ export type ChangePayload = {
22
+ changes: Array<{
23
+ propertyName: string;
24
+ prevValue?: any;
25
+ currentValue: any;
26
+ }>;
27
+ };
28
+ export declare class Change extends ActionImpl {
29
+ constructor(payload: ChangePayload, dispatch?: boolean);
30
+ withAdditionalChange(change: Change): Change;
31
+ }
32
+ export declare class Invalid extends ActionImpl {
33
+ constructor(payload?: any);
34
+ }
35
+ export declare class Valid extends ActionImpl {
36
+ constructor(payload?: any);
37
+ }
38
+ export declare class ExecuteRule extends ActionImpl {
39
+ constructor(payload?: any, dispatch?: boolean);
40
+ }
41
+ export declare const propertyChange: (propertyName: string, currentValue: any, prevValue?: any) => Change;
42
+ export declare class Initialize extends ActionImpl {
43
+ constructor(payload?: any, dispatch?: boolean);
44
+ }
45
+ export declare class FormLoad extends ActionImpl {
46
+ constructor();
47
+ }
48
+ export declare class Click extends ActionImpl {
49
+ constructor(payload?: any, dispatch?: boolean);
50
+ }
51
+ export declare class Blur extends ActionImpl {
52
+ constructor(payload?: any, dispatch?: boolean);
53
+ }
54
+ export declare class ValidationComplete extends ActionImpl {
55
+ constructor(payload?: Array<ValidationError>, dispatch?: boolean);
56
+ }
57
+ export declare class Focus extends ActionImpl {
58
+ constructor();
59
+ }
60
+ export declare class Submit extends ActionImpl {
61
+ constructor(payload?: any, dispatch?: boolean);
62
+ }
63
+ export declare class Reset extends ActionImpl {
64
+ constructor(payload?: any, dispatch?: boolean);
65
+ }
66
+ export declare class FieldChanged extends ActionImpl {
67
+ constructor(changes: ChangePayload, field: BaseJson);
68
+ }
69
+ export declare class CustomEvent extends ActionImpl {
70
+ constructor(eventName: string, payload?: any, dispatch?: boolean);
71
+ get isCustomEvent(): boolean;
72
+ }
73
+ export declare class AddItem extends ActionImpl {
74
+ constructor(payload?: number);
75
+ }
76
+ export declare class RemoveItem extends ActionImpl {
77
+ constructor(payload?: number);
78
+ }
79
+ export declare class AddInstance extends ActionImpl {
80
+ constructor(payload?: number);
81
+ }
82
+ export declare class RemoveInstance extends ActionImpl {
83
+ constructor(payload?: number);
84
+ }
85
+ export {};
@@ -0,0 +1,171 @@
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
+ class ActionImpl {
22
+ _metadata;
23
+ _type;
24
+ _payload;
25
+ _target;
26
+ constructor(payload, type, _metadata) {
27
+ this._metadata = _metadata;
28
+ this._payload = payload;
29
+ this._type = type;
30
+ }
31
+ get type() {
32
+ return this._type;
33
+ }
34
+ get payload() {
35
+ return this._payload;
36
+ }
37
+ get metadata() {
38
+ return this._metadata;
39
+ }
40
+ get target() {
41
+ return this._target;
42
+ }
43
+ get isCustomEvent() {
44
+ return false;
45
+ }
46
+ payloadToJson() {
47
+ return this.payload;
48
+ }
49
+ toJson() {
50
+ return {
51
+ payload: this.payloadToJson(),
52
+ type: this.type,
53
+ isCustomEvent: this.isCustomEvent
54
+ };
55
+ }
56
+ toString() {
57
+ return JSON.stringify(this.toJson());
58
+ }
59
+ }
60
+ class Change extends ActionImpl {
61
+ constructor(payload, dispatch = false) {
62
+ super(payload, 'change', { dispatch });
63
+ }
64
+ withAdditionalChange(change) {
65
+ return new Change(this.payload.changes.concat(change.payload.changes), this.metadata);
66
+ }
67
+ }
68
+ class Invalid extends ActionImpl {
69
+ constructor(payload = {}) {
70
+ super(payload, 'invalid', {});
71
+ }
72
+ }
73
+ class Valid extends ActionImpl {
74
+ constructor(payload = {}) {
75
+ super(payload, 'valid', {});
76
+ }
77
+ }
78
+ class ExecuteRule extends ActionImpl {
79
+ constructor(payload = {}, dispatch = false) {
80
+ super(payload, 'executeRule', { dispatch });
81
+ }
82
+ }
83
+ const propertyChange = (propertyName, currentValue, prevValue) => {
84
+ return new Change({
85
+ changes: [
86
+ {
87
+ propertyName,
88
+ currentValue,
89
+ prevValue
90
+ }
91
+ ]
92
+ });
93
+ };
94
+ class Initialize extends ActionImpl {
95
+ constructor(payload, dispatch = false) {
96
+ super(payload, 'initialize', { dispatch });
97
+ }
98
+ }
99
+ class FormLoad extends ActionImpl {
100
+ constructor() {
101
+ super({}, 'load', { dispatch: false });
102
+ }
103
+ }
104
+ class Click extends ActionImpl {
105
+ constructor(payload, dispatch = false) {
106
+ super(payload, 'click', { dispatch });
107
+ }
108
+ }
109
+ class Blur extends ActionImpl {
110
+ constructor(payload, dispatch = false) {
111
+ super(payload, 'blur', { dispatch });
112
+ }
113
+ }
114
+ class ValidationComplete extends ActionImpl {
115
+ constructor(payload, dispatch = false) {
116
+ super(payload, 'validationComplete', { dispatch });
117
+ }
118
+ }
119
+ class Focus extends ActionImpl {
120
+ constructor() {
121
+ super({}, 'focus', { dispatch: false });
122
+ }
123
+ }
124
+ class Submit extends ActionImpl {
125
+ constructor(payload, dispatch = false) {
126
+ super(payload, 'submit', { dispatch });
127
+ }
128
+ }
129
+ class Reset extends ActionImpl {
130
+ constructor(payload, dispatch = false) {
131
+ super(payload, 'reset', { dispatch });
132
+ }
133
+ }
134
+ class FieldChanged extends ActionImpl {
135
+ constructor(changes, field) {
136
+ super({
137
+ field,
138
+ changes
139
+ }, 'fieldChanged');
140
+ }
141
+ }
142
+ class CustomEvent extends ActionImpl {
143
+ constructor(eventName, payload = {}, dispatch = false) {
144
+ super(payload, eventName, { dispatch });
145
+ }
146
+ get isCustomEvent() {
147
+ return true;
148
+ }
149
+ }
150
+ class AddItem extends ActionImpl {
151
+ constructor(payload) {
152
+ super(payload, 'addItem');
153
+ }
154
+ }
155
+ class RemoveItem extends ActionImpl {
156
+ constructor(payload) {
157
+ super(payload, 'removeItem');
158
+ }
159
+ }
160
+ class AddInstance extends ActionImpl {
161
+ constructor(payload) {
162
+ super(payload, 'addInstance');
163
+ }
164
+ }
165
+ class RemoveInstance extends ActionImpl {
166
+ constructor(payload) {
167
+ super(payload, 'removeInstance');
168
+ }
169
+ }
170
+
171
+ export { AddInstance, AddItem, Blur, Change, Click, CustomEvent, ExecuteRule, FieldChanged, Focus, FormLoad, Initialize, Invalid, RemoveInstance, RemoveItem, Reset, Submit, Valid, ValidationComplete, propertyChange };
@@ -0,0 +1,11 @@
1
+ export type LogFunction = 'info' | 'warn' | 'error' | 'debug';
2
+ export type LogLevel = 'off' | LogFunction;
3
+ export declare class Logger {
4
+ debug(msg: string): void;
5
+ info(msg: string): void;
6
+ warn(msg: string): void;
7
+ error(msg: string): void;
8
+ log(msg: string, level: LogFunction): void;
9
+ private logLevel;
10
+ constructor(logLevel?: LogLevel);
11
+ }
@@ -0,0 +1,52 @@
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
+ const levels = {
22
+ off: 0,
23
+ debug: 1,
24
+ info: 2,
25
+ warn: 3,
26
+ error: 4
27
+ };
28
+ class Logger {
29
+ debug(msg) {
30
+ this.log(msg, 'debug');
31
+ }
32
+ info(msg) {
33
+ this.log(msg, 'info');
34
+ }
35
+ warn(msg) {
36
+ this.log(msg, 'warn');
37
+ }
38
+ error(msg) {
39
+ this.log(msg, 'error');
40
+ }
41
+ log(msg, level) {
42
+ if (this.logLevel !== 0 && this.logLevel <= levels[level]) {
43
+ console[level](msg);
44
+ }
45
+ }
46
+ logLevel;
47
+ constructor(logLevel = 'off') {
48
+ this.logLevel = levels[logLevel];
49
+ }
50
+ }
51
+
52
+ export { Logger };
@@ -0,0 +1,20 @@
1
+ import DataValue from './DataValue.js';
2
+ export default class DataGroup extends DataValue {
3
+ $_items: {
4
+ [key: string]: DataValue | DataGroup;
5
+ } | DataValue[] | DataGroup[];
6
+ private createEntry;
7
+ constructor(_name: string | number, _value: {
8
+ [key: string]: any;
9
+ } | any[], _type?: string);
10
+ get $value(): Array<any> | {
11
+ [key: string]: any;
12
+ };
13
+ get $length(): number;
14
+ $convertToDataValue(): DataValue;
15
+ $addDataNode(name: string | number, value: DataGroup | DataValue, override?: boolean): void;
16
+ $removeDataNode(name: string | number): void;
17
+ $getDataNode(name: string | number): any;
18
+ $containsDataNode(name: string | number): boolean;
19
+ get $isDataGroup(): boolean;
20
+ }
@@ -0,0 +1,100 @@
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 DataValue from './DataValue.js';
22
+ import NullDataValue from './EmptyDataValue.js';
23
+
24
+ class DataGroup extends DataValue {
25
+ $_items;
26
+ createEntry(key, value) {
27
+ const t = value instanceof Array ? 'array' : typeof value;
28
+ if (typeof value === 'object' && value != null) {
29
+ return new DataGroup(key, value, t);
30
+ }
31
+ else {
32
+ return new DataValue(key, value, t);
33
+ }
34
+ }
35
+ constructor(_name, _value, _type = typeof _value) {
36
+ super(_name, _value, _type);
37
+ if (_value instanceof Array) {
38
+ this.$_items = _value.map((value, index) => {
39
+ return this.createEntry(index, value);
40
+ });
41
+ }
42
+ else {
43
+ this.$_items = Object.fromEntries(Object.entries(_value).map(([key, value]) => {
44
+ return [key, this.createEntry(key, value)];
45
+ }));
46
+ }
47
+ }
48
+ get $value() {
49
+ const enabled = this.$_fields.find(x => x.enabled !== false);
50
+ if (!enabled && this.$_fields.length) {
51
+ return this.$type === 'array' ? [] : {};
52
+ }
53
+ else if (this.$type === 'array') {
54
+ return Object.values(this.$_items).filter(x => typeof x !== 'undefined').map(x => x.$value);
55
+ }
56
+ else {
57
+ return Object.fromEntries(Object.values(this.$_items).filter(x => typeof x !== 'undefined').map(x => {
58
+ return [x.$name, x.$value];
59
+ }));
60
+ }
61
+ }
62
+ get $length() {
63
+ return Object.entries(this.$_items).length;
64
+ }
65
+ $convertToDataValue() {
66
+ return new DataValue(this.$name, this.$value, this.$type);
67
+ }
68
+ $addDataNode(name, value, override = false) {
69
+ if (value !== NullDataValue) {
70
+ if (this.$type === 'array') {
71
+ const index = name;
72
+ if (!override) {
73
+ this.$_items.splice(index, 0, value);
74
+ }
75
+ else {
76
+ this.$_items[name] = value;
77
+ }
78
+ }
79
+ else {
80
+ this.$_items[name] = value;
81
+ }
82
+ }
83
+ }
84
+ $removeDataNode(name) {
85
+ this.$_items[name] = undefined;
86
+ }
87
+ $getDataNode(name) {
88
+ if (this.$_items.hasOwnProperty(name)) {
89
+ return this.$_items[name];
90
+ }
91
+ }
92
+ $containsDataNode(name) {
93
+ return this.$_items.hasOwnProperty(name) && typeof (this.$_items[name]) !== 'undefined';
94
+ }
95
+ get $isDataGroup() {
96
+ return true;
97
+ }
98
+ }
99
+
100
+ export { DataGroup as default };
@@ -0,0 +1,16 @@
1
+ import { FieldModel } from '../types/index.js';
2
+ export default class DataValue {
3
+ private $_name;
4
+ private $_value;
5
+ private $_type;
6
+ $_fields: Array<FieldModel>;
7
+ constructor($_name: string | number, $_value: any, $_type?: string);
8
+ valueOf(): any;
9
+ get $name(): string | number;
10
+ get $value(): any;
11
+ setValue(typedValue: any, originalValue: any, fromField: FieldModel): void;
12
+ get $type(): string;
13
+ $bindToField(field: FieldModel): void;
14
+ $convertToDataValue(): DataValue;
15
+ get $isDataGroup(): boolean;
16
+ }
@@ -0,0 +1,68 @@
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
+ class DataValue {
22
+ $_name;
23
+ $_value;
24
+ $_type;
25
+ $_fields = [];
26
+ constructor($_name, $_value, $_type = typeof $_value) {
27
+ this.$_name = $_name;
28
+ this.$_value = $_value;
29
+ this.$_type = $_type;
30
+ }
31
+ valueOf() {
32
+ return this.$_value;
33
+ }
34
+ get $name() {
35
+ return this.$_name;
36
+ }
37
+ get $value() {
38
+ const enabled = this.$_fields.find(x => x.enabled !== false);
39
+ if (!enabled && this.$_fields.length) {
40
+ return undefined;
41
+ }
42
+ return this.$_value;
43
+ }
44
+ setValue(typedValue, originalValue, fromField) {
45
+ this.$_value = typedValue;
46
+ this.$_fields.forEach(x => {
47
+ if (fromField !== x) {
48
+ x.value = originalValue;
49
+ }
50
+ });
51
+ }
52
+ get $type() {
53
+ return this.$_type;
54
+ }
55
+ $bindToField(field) {
56
+ if (this.$_fields.indexOf(field) === -1) {
57
+ this.$_fields.push(field);
58
+ }
59
+ }
60
+ $convertToDataValue() {
61
+ return this;
62
+ }
63
+ get $isDataGroup() {
64
+ return false;
65
+ }
66
+ }
67
+
68
+ export { DataValue as default };
@@ -0,0 +1,14 @@
1
+ import DataValue from './DataValue.js';
2
+ declare class NullDataValueClass extends DataValue {
3
+ constructor();
4
+ setValue(): void;
5
+ $bindToField(): void;
6
+ $length(): number;
7
+ $convertToDataValue(): DataValue;
8
+ $addDataNode(): void;
9
+ $removeDataNode(): void;
10
+ $getDataNode(): this;
11
+ $containsDataNode(): boolean;
12
+ }
13
+ declare const NullDataValue: NullDataValueClass;
14
+ export default NullDataValue;
@@ -0,0 +1,51 @@
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 DataValue from './DataValue.js';
22
+
23
+ const value = Symbol('NullValue');
24
+ class NullDataValueClass extends DataValue {
25
+ constructor() {
26
+ super('', value, 'null');
27
+ }
28
+ setValue() {
29
+ }
30
+ $bindToField() {
31
+ }
32
+ $length() {
33
+ return 0;
34
+ }
35
+ $convertToDataValue() {
36
+ return this;
37
+ }
38
+ $addDataNode() {
39
+ }
40
+ $removeDataNode() {
41
+ }
42
+ $getDataNode() {
43
+ return this;
44
+ }
45
+ $containsDataNode() {
46
+ return false;
47
+ }
48
+ }
49
+ const NullDataValue = new NullDataValueClass();
50
+
51
+ export { NullDataValue as default };
@@ -0,0 +1,21 @@
1
+ export * from './FormInstance.js';
2
+ export * from './types/index.js';
3
+ export * from './controller/Events.js';
4
+ export * from './utils/TranslationUtils.js';
5
+ export * from './utils/JsonUtils.js';
6
+ export * from './utils/SchemaUtils.js';
7
+ import { getFileSizeInBytes, extractFileInfo, isEmpty } from './utils/FormUtils.js';
8
+ import { BaseNode } from './BaseNode.js';
9
+ import Checkbox from './Checkbox.js';
10
+ import CheckboxGroup from './CheckboxGroup.js';
11
+ import Container from './Container.js';
12
+ import Field from './Field.js';
13
+ import { Fieldset } from './Fieldset.js';
14
+ import { FileObject } from './FileObject.js';
15
+ import FileUpload from './FileUpload.js';
16
+ import FormMetaData from './FormMetaData.js';
17
+ import Node from './Node.js';
18
+ import Scriptable from './Scriptable.js';
19
+ import Form from './Form.js';
20
+ import { FunctionRuntime, request } from './rules/FunctionRuntime.js';
21
+ export { Form, BaseNode, Checkbox, CheckboxGroup, Container, Field, Fieldset, FileObject, FileUpload, FormMetaData, Node, Scriptable, getFileSizeInBytes, extractFileInfo, FunctionRuntime, request, isEmpty };
@@ -0,0 +1,55 @@
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 { createFormInstance, fetchForm, registerFunctions, validateFormData, validateFormInstance } from './FormInstance.js';
22
+ export { constraintProps, translationProps } from './types/Json.js';
23
+ export { ValidationError } from './types/Model.js';
24
+ export { AddInstance, AddItem, Blur, Change, Click, CustomEvent, ExecuteRule, FieldChanged, Focus, FormLoad, Initialize, Invalid, RemoveInstance, RemoveItem, Reset, Submit, Valid, ValidationComplete, propertyChange } from './controller/Events.js';
25
+ export { CUSTOM_PROPS_KEY, TRANSLATION_ID, TRANSLATION_TOKEN, addTranslationId, createTranslationObj, createTranslationObject, getOrElse, invalidateTranslation } from './utils/TranslationUtils.js';
26
+ export { checkIfConstraintsArePresent, checkIfKeyAdded, deepClone, getProperty, isCheckbox, isCheckboxGroup, isDateField, isFile, isRepeatable, jsonString } from './utils/JsonUtils.js';
27
+ export { defaultFieldTypes, exportDataSchema } from './utils/SchemaUtils.js';
28
+ export { extractFileInfo, getFileSizeInBytes, isEmpty } from './utils/FormUtils.js';
29
+ export { B as BaseNode } from './BaseNode-d78cc1b0.js';
30
+ export { default as Checkbox } from './Checkbox.js';
31
+ export { default as CheckboxGroup } from './CheckboxGroup.js';
32
+ export { default as Container } from './Container.js';
33
+ export { default as Field } from './Field.js';
34
+ export { Fieldset } from './Fieldset.js';
35
+ export { FileObject } from './FileObject.js';
36
+ export { default as FileUpload } from './FileUpload.js';
37
+ export { default as FormMetaData } from './FormMetaData.js';
38
+ export { default as Node } from './Node.js';
39
+ export { default as Scriptable } from './Scriptable.js';
40
+ export { default as Form } from './Form.js';
41
+ export { FunctionRuntime, request } from './rules/FunctionRuntime.js';
42
+ import './utils/Fetch.js';
43
+ import './rules/RuleEngine.js';
44
+ import '@adobe/json-formula';
45
+ import './controller/EventQueue.js';
46
+ import './controller/Logger.js';
47
+ import './utils/FormCreationUtils.js';
48
+ import './InstanceManager.js';
49
+ import './utils/DataRefParser.js';
50
+ import './data/DataGroup.js';
51
+ import './data/DataValue.js';
52
+ import './data/EmptyDataValue.js';
53
+ import './DateField.js';
54
+ import '@aemforms/af-formatters';
55
+ import './utils/ValidationUtils.js';