@aemforms/af-core 0.22.26 → 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.
- package/lib/cjs/index.cjs +345 -1886
- package/lib/esm/BaseNode-d78cc1b0.js +478 -0
- package/lib/esm/BaseNode.d.ts +1 -1
- package/lib/esm/BaseNode.js +26 -454
- package/lib/esm/Checkbox.js +37 -1
- package/lib/esm/CheckboxGroup.js +38 -1
- package/lib/esm/Container.d.ts +6 -1
- package/lib/esm/Container.js +108 -19
- package/lib/esm/DateField.js +38 -2
- package/lib/esm/Field.d.ts +2 -2
- package/lib/esm/Field.js +62 -26
- package/lib/esm/Fieldset.js +36 -3
- package/lib/esm/FileObject.js +23 -1
- package/lib/esm/FileUpload.js +34 -1
- package/lib/esm/Form.d.ts +1 -1
- package/lib/esm/Form.js +40 -8
- package/lib/esm/FormInstance.js +53 -5
- package/lib/esm/FormMetaData.js +26 -1
- package/lib/esm/InstanceManager.js +35 -8
- package/lib/esm/Node.js +25 -1
- package/lib/esm/Scriptable.js +29 -2
- package/lib/esm/controller/EventQueue.js +23 -1
- package/lib/esm/controller/Events.d.ts +1 -1
- package/lib/esm/controller/Events.js +41 -19
- package/lib/esm/controller/Logger.d.ts +2 -2
- package/lib/esm/controller/Logger.js +23 -1
- package/lib/esm/data/DataGroup.js +24 -1
- package/lib/esm/data/DataValue.js +23 -1
- package/lib/esm/data/EmptyDataValue.js +23 -1
- package/lib/esm/index.js +55 -21
- package/lib/esm/rules/FunctionRuntime.d.ts +3 -3
- package/lib/esm/rules/FunctionRuntime.js +31 -6
- package/lib/esm/rules/RuleEngine.js +30 -1
- package/lib/esm/types/Json.d.ts +16 -16
- package/lib/esm/types/Json.js +24 -2
- package/lib/esm/types/Model.d.ts +4 -4
- package/lib/esm/types/Model.js +23 -1
- package/lib/esm/types/index.js +22 -2
- package/lib/esm/utils/DataRefParser.d.ts +2 -2
- package/lib/esm/utils/DataRefParser.js +31 -6
- package/lib/esm/utils/Fetch.d.ts +1 -1
- package/lib/esm/utils/Fetch.js +24 -2
- package/lib/esm/utils/FormCreationUtils.js +40 -2
- package/lib/esm/utils/FormUtils.js +33 -8
- package/lib/esm/utils/JsonUtils.js +34 -11
- package/lib/esm/utils/LogUtils.js +23 -1
- package/lib/esm/utils/SchemaUtils.js +24 -2
- package/lib/esm/utils/TranslationUtils.d.ts +1 -1
- package/lib/esm/utils/TranslationUtils.js +32 -9
- package/lib/esm/utils/ValidationUtils.d.ts +4 -4
- package/lib/esm/utils/ValidationUtils.js +30 -4
- package/package.json +14 -2
- package/lib/browser/afb-events.js +0 -151
- package/lib/browser/afb-runtime.js +0 -3620
package/lib/esm/FormInstance.js
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
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
|
+
|
|
1
21
|
import Form from './Form.js';
|
|
2
22
|
import { jsonString } from './utils/JsonUtils.js';
|
|
3
23
|
import { request } from './utils/Fetch.js';
|
|
@@ -6,7 +26,33 @@ import EventQueue from './controller/EventQueue.js';
|
|
|
6
26
|
import { Logger } from './controller/Logger.js';
|
|
7
27
|
import { FormFieldFactory } from './utils/FormCreationUtils.js';
|
|
8
28
|
import { FunctionRuntime } from './rules/FunctionRuntime.js';
|
|
9
|
-
|
|
29
|
+
import './Container.js';
|
|
30
|
+
import './BaseNode-d78cc1b0.js';
|
|
31
|
+
import './controller/Events.js';
|
|
32
|
+
import './utils/DataRefParser.js';
|
|
33
|
+
import './data/DataGroup.js';
|
|
34
|
+
import './data/DataValue.js';
|
|
35
|
+
import './data/EmptyDataValue.js';
|
|
36
|
+
import './Scriptable.js';
|
|
37
|
+
import './types/Json.js';
|
|
38
|
+
import './utils/SchemaUtils.js';
|
|
39
|
+
import './FormMetaData.js';
|
|
40
|
+
import './Node.js';
|
|
41
|
+
import './utils/FormUtils.js';
|
|
42
|
+
import './FileObject.js';
|
|
43
|
+
import '@adobe/json-formula';
|
|
44
|
+
import './InstanceManager.js';
|
|
45
|
+
import './Fieldset.js';
|
|
46
|
+
import './FileUpload.js';
|
|
47
|
+
import './Field.js';
|
|
48
|
+
import './types/Model.js';
|
|
49
|
+
import './utils/ValidationUtils.js';
|
|
50
|
+
import '@aemforms/af-formatters';
|
|
51
|
+
import './Checkbox.js';
|
|
52
|
+
import './CheckboxGroup.js';
|
|
53
|
+
import './DateField.js';
|
|
54
|
+
|
|
55
|
+
const createFormInstance = (formModel, callback, logLevel = 'error', fModel = undefined) => {
|
|
10
56
|
try {
|
|
11
57
|
let f = fModel;
|
|
12
58
|
if (f == null) {
|
|
@@ -27,7 +73,7 @@ export const createFormInstance = (formModel, callback, logLevel = 'error', fMod
|
|
|
27
73
|
throw new Error(e);
|
|
28
74
|
}
|
|
29
75
|
};
|
|
30
|
-
|
|
76
|
+
const validateFormInstance = (formModel, data) => {
|
|
31
77
|
try {
|
|
32
78
|
const f = new Form({ ...formModel }, FormFieldFactory, new RuleEngine());
|
|
33
79
|
if (data) {
|
|
@@ -39,7 +85,7 @@ export const validateFormInstance = (formModel, data) => {
|
|
|
39
85
|
throw new Error(e);
|
|
40
86
|
}
|
|
41
87
|
};
|
|
42
|
-
|
|
88
|
+
const validateFormData = (formModel, data) => {
|
|
43
89
|
try {
|
|
44
90
|
const f = new Form({ ...formModel }, FormFieldFactory, new RuleEngine());
|
|
45
91
|
if (data) {
|
|
@@ -55,7 +101,7 @@ export const validateFormData = (formModel, data) => {
|
|
|
55
101
|
throw new Error(e);
|
|
56
102
|
}
|
|
57
103
|
};
|
|
58
|
-
|
|
104
|
+
const fetchForm = (url, headers = {}) => {
|
|
59
105
|
const headerObj = new Headers();
|
|
60
106
|
Object.entries(headers).forEach(([key, value]) => {
|
|
61
107
|
headerObj.append(key, value);
|
|
@@ -76,6 +122,8 @@ export const fetchForm = (url, headers = {}) => {
|
|
|
76
122
|
});
|
|
77
123
|
});
|
|
78
124
|
};
|
|
79
|
-
|
|
125
|
+
const registerFunctions = (functions) => {
|
|
80
126
|
FunctionRuntime.registerFunctions(functions);
|
|
81
127
|
};
|
|
128
|
+
|
|
129
|
+
export { createFormInstance, fetchForm, registerFunctions, validateFormData, validateFormInstance };
|
package/lib/esm/FormMetaData.js
CHANGED
|
@@ -1,4 +1,28 @@
|
|
|
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
|
+
|
|
1
21
|
import Node from './Node.js';
|
|
22
|
+
import './utils/JsonUtils.js';
|
|
23
|
+
import './types/Json.js';
|
|
24
|
+
import './utils/SchemaUtils.js';
|
|
25
|
+
|
|
2
26
|
class FormMetaData extends Node {
|
|
3
27
|
get version() {
|
|
4
28
|
return this.getP('version', '');
|
|
@@ -7,4 +31,5 @@ class FormMetaData extends Node {
|
|
|
7
31
|
return this.getP('grammar', '');
|
|
8
32
|
}
|
|
9
33
|
}
|
|
10
|
-
|
|
34
|
+
|
|
35
|
+
export { FormMetaData as default };
|
|
@@ -1,12 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 { _ as __decorate, d as dependencyTracked } from './BaseNode-d78cc1b0.js';
|
|
7
22
|
import { Fieldset } from './Fieldset.js';
|
|
8
|
-
import
|
|
9
|
-
|
|
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 './Container.js';
|
|
29
|
+
import './utils/JsonUtils.js';
|
|
30
|
+
import './types/Json.js';
|
|
31
|
+
import './utils/SchemaUtils.js';
|
|
32
|
+
import './Scriptable.js';
|
|
33
|
+
|
|
34
|
+
class InstanceManager extends Fieldset {
|
|
10
35
|
get maxOccur() {
|
|
11
36
|
return this._jsonModel.maxItems;
|
|
12
37
|
}
|
|
@@ -29,3 +54,5 @@ __decorate([
|
|
|
29
54
|
__decorate([
|
|
30
55
|
dependencyTracked()
|
|
31
56
|
], InstanceManager.prototype, "minOccur", null);
|
|
57
|
+
|
|
58
|
+
export { InstanceManager };
|
package/lib/esm/Node.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
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
|
+
|
|
1
21
|
import { getProperty } from './utils/JsonUtils.js';
|
|
22
|
+
import './types/Json.js';
|
|
23
|
+
import './utils/SchemaUtils.js';
|
|
24
|
+
|
|
2
25
|
class Node {
|
|
3
26
|
_jsonModel;
|
|
4
27
|
constructor(inputModel) {
|
|
@@ -13,4 +36,5 @@ class Node {
|
|
|
13
36
|
return false;
|
|
14
37
|
}
|
|
15
38
|
}
|
|
16
|
-
|
|
39
|
+
|
|
40
|
+
export { Node as default };
|
package/lib/esm/Scriptable.js
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
|
-
|
|
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 { B as BaseNode, a as editableProperties } from './BaseNode-d78cc1b0.js';
|
|
22
|
+
import './controller/Events.js';
|
|
23
|
+
import './utils/DataRefParser.js';
|
|
24
|
+
import './data/DataGroup.js';
|
|
25
|
+
import './data/DataValue.js';
|
|
26
|
+
import './data/EmptyDataValue.js';
|
|
27
|
+
|
|
2
28
|
class Scriptable extends BaseNode {
|
|
3
29
|
_events = {};
|
|
4
30
|
_rules = {};
|
|
@@ -160,4 +186,5 @@ class Scriptable extends BaseNode {
|
|
|
160
186
|
this.notifyDependents(action);
|
|
161
187
|
}
|
|
162
188
|
}
|
|
163
|
-
|
|
189
|
+
|
|
190
|
+
export { Scriptable as default };
|
|
@@ -1,4 +1,25 @@
|
|
|
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
|
+
|
|
1
21
|
import { Logger } from './Logger.js';
|
|
22
|
+
|
|
2
23
|
class EventNode {
|
|
3
24
|
_node;
|
|
4
25
|
_event;
|
|
@@ -83,4 +104,5 @@ class EventQueue {
|
|
|
83
104
|
this._isProcessing = false;
|
|
84
105
|
}
|
|
85
106
|
}
|
|
86
|
-
|
|
107
|
+
|
|
108
|
+
export { EventQueue as default };
|
|
@@ -1,3 +1,23 @@
|
|
|
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
|
+
|
|
1
21
|
class ActionImpl {
|
|
2
22
|
_metadata;
|
|
3
23
|
_type;
|
|
@@ -37,7 +57,7 @@ class ActionImpl {
|
|
|
37
57
|
return JSON.stringify(this.toJson());
|
|
38
58
|
}
|
|
39
59
|
}
|
|
40
|
-
|
|
60
|
+
class Change extends ActionImpl {
|
|
41
61
|
constructor(payload, dispatch = false) {
|
|
42
62
|
super(payload, 'change', { dispatch });
|
|
43
63
|
}
|
|
@@ -45,22 +65,22 @@ export class Change extends ActionImpl {
|
|
|
45
65
|
return new Change(this.payload.changes.concat(change.payload.changes), this.metadata);
|
|
46
66
|
}
|
|
47
67
|
}
|
|
48
|
-
|
|
68
|
+
class Invalid extends ActionImpl {
|
|
49
69
|
constructor(payload = {}) {
|
|
50
70
|
super(payload, 'invalid', {});
|
|
51
71
|
}
|
|
52
72
|
}
|
|
53
|
-
|
|
73
|
+
class Valid extends ActionImpl {
|
|
54
74
|
constructor(payload = {}) {
|
|
55
75
|
super(payload, 'valid', {});
|
|
56
76
|
}
|
|
57
77
|
}
|
|
58
|
-
|
|
78
|
+
class ExecuteRule extends ActionImpl {
|
|
59
79
|
constructor(payload = {}, dispatch = false) {
|
|
60
80
|
super(payload, 'executeRule', { dispatch });
|
|
61
81
|
}
|
|
62
82
|
}
|
|
63
|
-
|
|
83
|
+
const propertyChange = (propertyName, currentValue, prevValue) => {
|
|
64
84
|
return new Change({
|
|
65
85
|
changes: [
|
|
66
86
|
{
|
|
@@ -71,47 +91,47 @@ export const propertyChange = (propertyName, currentValue, prevValue) => {
|
|
|
71
91
|
]
|
|
72
92
|
});
|
|
73
93
|
};
|
|
74
|
-
|
|
94
|
+
class Initialize extends ActionImpl {
|
|
75
95
|
constructor(payload, dispatch = false) {
|
|
76
96
|
super(payload, 'initialize', { dispatch });
|
|
77
97
|
}
|
|
78
98
|
}
|
|
79
|
-
|
|
99
|
+
class FormLoad extends ActionImpl {
|
|
80
100
|
constructor() {
|
|
81
101
|
super({}, 'load', { dispatch: false });
|
|
82
102
|
}
|
|
83
103
|
}
|
|
84
|
-
|
|
104
|
+
class Click extends ActionImpl {
|
|
85
105
|
constructor(payload, dispatch = false) {
|
|
86
106
|
super(payload, 'click', { dispatch });
|
|
87
107
|
}
|
|
88
108
|
}
|
|
89
|
-
|
|
109
|
+
class Blur extends ActionImpl {
|
|
90
110
|
constructor(payload, dispatch = false) {
|
|
91
111
|
super(payload, 'blur', { dispatch });
|
|
92
112
|
}
|
|
93
113
|
}
|
|
94
|
-
|
|
114
|
+
class ValidationComplete extends ActionImpl {
|
|
95
115
|
constructor(payload, dispatch = false) {
|
|
96
116
|
super(payload, 'validationComplete', { dispatch });
|
|
97
117
|
}
|
|
98
118
|
}
|
|
99
|
-
|
|
119
|
+
class Focus extends ActionImpl {
|
|
100
120
|
constructor() {
|
|
101
121
|
super({}, 'focus', { dispatch: false });
|
|
102
122
|
}
|
|
103
123
|
}
|
|
104
|
-
|
|
124
|
+
class Submit extends ActionImpl {
|
|
105
125
|
constructor(payload, dispatch = false) {
|
|
106
126
|
super(payload, 'submit', { dispatch });
|
|
107
127
|
}
|
|
108
128
|
}
|
|
109
|
-
|
|
129
|
+
class Reset extends ActionImpl {
|
|
110
130
|
constructor(payload, dispatch = false) {
|
|
111
131
|
super(payload, 'reset', { dispatch });
|
|
112
132
|
}
|
|
113
133
|
}
|
|
114
|
-
|
|
134
|
+
class FieldChanged extends ActionImpl {
|
|
115
135
|
constructor(changes, field) {
|
|
116
136
|
super({
|
|
117
137
|
field,
|
|
@@ -119,7 +139,7 @@ export class FieldChanged extends ActionImpl {
|
|
|
119
139
|
}, 'fieldChanged');
|
|
120
140
|
}
|
|
121
141
|
}
|
|
122
|
-
|
|
142
|
+
class CustomEvent extends ActionImpl {
|
|
123
143
|
constructor(eventName, payload = {}, dispatch = false) {
|
|
124
144
|
super(payload, eventName, { dispatch });
|
|
125
145
|
}
|
|
@@ -127,23 +147,25 @@ export class CustomEvent extends ActionImpl {
|
|
|
127
147
|
return true;
|
|
128
148
|
}
|
|
129
149
|
}
|
|
130
|
-
|
|
150
|
+
class AddItem extends ActionImpl {
|
|
131
151
|
constructor(payload) {
|
|
132
152
|
super(payload, 'addItem');
|
|
133
153
|
}
|
|
134
154
|
}
|
|
135
|
-
|
|
155
|
+
class RemoveItem extends ActionImpl {
|
|
136
156
|
constructor(payload) {
|
|
137
157
|
super(payload, 'removeItem');
|
|
138
158
|
}
|
|
139
159
|
}
|
|
140
|
-
|
|
160
|
+
class AddInstance extends ActionImpl {
|
|
141
161
|
constructor(payload) {
|
|
142
162
|
super(payload, 'addInstance');
|
|
143
163
|
}
|
|
144
164
|
}
|
|
145
|
-
|
|
165
|
+
class RemoveInstance extends ActionImpl {
|
|
146
166
|
constructor(payload) {
|
|
147
167
|
super(payload, 'removeInstance');
|
|
148
168
|
}
|
|
149
169
|
}
|
|
170
|
+
|
|
171
|
+
export { AddInstance, AddItem, Blur, Change, Click, CustomEvent, ExecuteRule, FieldChanged, Focus, FormLoad, Initialize, Invalid, RemoveInstance, RemoveItem, Reset, Submit, Valid, ValidationComplete, propertyChange };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type LogFunction = 'info' | 'warn' | 'error' | 'debug';
|
|
2
|
+
export type LogLevel = 'off' | LogFunction;
|
|
3
3
|
export declare class Logger {
|
|
4
4
|
debug(msg: string): void;
|
|
5
5
|
info(msg: string): void;
|
|
@@ -1,3 +1,23 @@
|
|
|
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
|
+
|
|
1
21
|
const levels = {
|
|
2
22
|
off: 0,
|
|
3
23
|
debug: 1,
|
|
@@ -5,7 +25,7 @@ const levels = {
|
|
|
5
25
|
warn: 3,
|
|
6
26
|
error: 4
|
|
7
27
|
};
|
|
8
|
-
|
|
28
|
+
class Logger {
|
|
9
29
|
debug(msg) {
|
|
10
30
|
this.log(msg, 'debug');
|
|
11
31
|
}
|
|
@@ -28,3 +48,5 @@ export class Logger {
|
|
|
28
48
|
this.logLevel = levels[logLevel];
|
|
29
49
|
}
|
|
30
50
|
}
|
|
51
|
+
|
|
52
|
+
export { Logger };
|
|
@@ -1,6 +1,27 @@
|
|
|
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
|
+
|
|
1
21
|
import DataValue from './DataValue.js';
|
|
2
22
|
import NullDataValue from './EmptyDataValue.js';
|
|
3
|
-
|
|
23
|
+
|
|
24
|
+
class DataGroup extends DataValue {
|
|
4
25
|
$_items;
|
|
5
26
|
createEntry(key, value) {
|
|
6
27
|
const t = value instanceof Array ? 'array' : typeof value;
|
|
@@ -75,3 +96,5 @@ export default class DataGroup extends DataValue {
|
|
|
75
96
|
return true;
|
|
76
97
|
}
|
|
77
98
|
}
|
|
99
|
+
|
|
100
|
+
export { DataGroup as default };
|
|
@@ -1,4 +1,24 @@
|
|
|
1
|
-
|
|
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 {
|
|
2
22
|
$_name;
|
|
3
23
|
$_value;
|
|
4
24
|
$_type;
|
|
@@ -44,3 +64,5 @@ export default class DataValue {
|
|
|
44
64
|
return false;
|
|
45
65
|
}
|
|
46
66
|
}
|
|
67
|
+
|
|
68
|
+
export { DataValue as default };
|
|
@@ -1,4 +1,25 @@
|
|
|
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
|
+
|
|
1
21
|
import DataValue from './DataValue.js';
|
|
22
|
+
|
|
2
23
|
const value = Symbol('NullValue');
|
|
3
24
|
class NullDataValueClass extends DataValue {
|
|
4
25
|
constructor() {
|
|
@@ -26,4 +47,5 @@ class NullDataValueClass extends DataValue {
|
|
|
26
47
|
}
|
|
27
48
|
}
|
|
28
49
|
const NullDataValue = new NullDataValueClass();
|
|
29
|
-
|
|
50
|
+
|
|
51
|
+
export { NullDataValue as default };
|