@aemforms/af-core 0.22.19 → 0.22.20
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/browser/afb-events.js +151 -0
- package/lib/browser/afb-runtime.js +3620 -0
- package/lib/cjs/index.cjs +8886 -0
- package/lib/{BaseNode.d.ts → esm/BaseNode.d.ts} +10 -69
- package/lib/{BaseNode.js → esm/BaseNode.js} +84 -184
- package/lib/esm/Checkbox.d.ts +79 -0
- package/lib/esm/Checkbox.js +27 -0
- package/lib/{CheckboxGroup.d.ts → esm/CheckboxGroup.d.ts} +2 -14
- package/lib/esm/CheckboxGroup.js +23 -0
- package/lib/{Container.d.ts → esm/Container.d.ts} +12 -59
- package/lib/{Container.js → esm/Container.js} +54 -116
- package/lib/{DateField.d.ts → esm/DateField.d.ts} +1 -1
- package/lib/esm/DateField.js +21 -0
- package/lib/{Field.d.ts → esm/Field.d.ts} +39 -104
- package/lib/{Field.js → esm/Field.js} +142 -208
- package/lib/esm/Fieldset.d.ts +16 -0
- package/lib/esm/Fieldset.js +45 -0
- package/lib/{FileObject.d.ts → esm/FileObject.d.ts} +1 -4
- package/lib/esm/FileObject.js +26 -0
- package/lib/{FileUpload.d.ts → esm/FileUpload.d.ts} +3 -18
- package/lib/esm/FileUpload.js +108 -0
- package/lib/{Form.d.ts → esm/Form.d.ts} +19 -85
- package/lib/esm/Form.js +176 -0
- package/lib/esm/FormInstance.d.ts +13 -0
- package/lib/esm/FormInstance.js +81 -0
- package/lib/esm/FormMetaData.d.ts +7 -0
- package/lib/esm/FormMetaData.js +10 -0
- package/lib/esm/InstanceManager.d.ts +9 -0
- package/lib/esm/InstanceManager.js +31 -0
- package/lib/esm/Node.d.ts +7 -0
- package/lib/esm/Node.js +16 -0
- package/lib/esm/Scriptable.d.ts +17 -0
- package/lib/{Scriptable.js → esm/Scriptable.js} +11 -54
- package/lib/{controller → esm/controller}/EventQueue.d.ts +3 -11
- package/lib/{controller → esm/controller}/EventQueue.js +10 -26
- package/lib/esm/controller/Events.d.ts +85 -0
- package/lib/esm/controller/Events.js +149 -0
- package/lib/{controller → esm/controller}/Logger.d.ts +0 -6
- package/lib/{controller → esm/controller}/Logger.js +5 -11
- package/lib/{data → esm/data}/DataGroup.d.ts +1 -7
- package/lib/{data → esm/data}/DataGroup.js +15 -34
- package/lib/{data → esm/data}/DataValue.d.ts +1 -7
- package/lib/esm/data/DataValue.js +46 -0
- package/lib/{data → esm/data}/EmptyDataValue.d.ts +1 -1
- package/lib/esm/data/EmptyDataValue.js +29 -0
- package/lib/esm/index.d.ts +21 -0
- package/lib/esm/index.js +21 -0
- package/lib/{rules → esm/rules}/FunctionRuntime.d.ts +2 -24
- package/lib/{rules → esm/rules}/FunctionRuntime.js +41 -117
- package/lib/esm/rules/RuleEngine.d.ts +12 -0
- package/lib/esm/rules/RuleEngine.js +47 -0
- package/lib/{types → esm/types}/Json.d.ts +3 -22
- package/lib/esm/types/Json.js +7 -0
- package/lib/esm/types/Model.d.ts +131 -0
- package/lib/esm/types/Model.js +8 -0
- package/lib/esm/types/index.d.ts +2 -0
- package/lib/esm/types/index.js +2 -0
- package/lib/{utils → esm/utils}/DataRefParser.d.ts +2 -5
- package/lib/{utils → esm/utils}/DataRefParser.js +22 -49
- package/lib/{utils → esm/utils}/Fetch.d.ts +0 -6
- package/lib/esm/utils/Fetch.js +61 -0
- package/lib/esm/utils/FormCreationUtils.d.ts +9 -0
- package/lib/esm/utils/FormCreationUtils.js +74 -0
- package/lib/esm/utils/FormUtils.d.ts +12 -0
- package/lib/esm/utils/FormUtils.js +187 -0
- package/lib/esm/utils/JsonUtils.d.ts +11 -0
- package/lib/esm/utils/JsonUtils.js +76 -0
- package/lib/{utils → esm/utils}/LogUtils.d.ts +1 -4
- package/lib/esm/utils/LogUtils.js +6 -0
- package/lib/esm/utils/SchemaUtils.d.ts +3 -0
- package/lib/esm/utils/SchemaUtils.js +71 -0
- package/lib/esm/utils/TranslationUtils.d.ts +11 -0
- package/lib/esm/utils/TranslationUtils.js +115 -0
- package/lib/esm/utils/ValidationUtils.d.ts +19 -0
- package/lib/{utils → esm/utils}/ValidationUtils.js +29 -187
- package/package.json +17 -10
- package/lib/Checkbox.d.ts +0 -88
- package/lib/Checkbox.js +0 -49
- package/lib/CheckboxGroup.js +0 -43
- package/lib/DateField.js +0 -35
- package/lib/Fieldset.d.ts +0 -24
- package/lib/Fieldset.js +0 -74
- package/lib/FileObject.js +0 -39
- package/lib/FileUpload.js +0 -155
- package/lib/Form.js +0 -252
- package/lib/FormInstance.d.ts +0 -38
- package/lib/FormInstance.js +0 -127
- package/lib/FormMetaData.d.ts +0 -11
- package/lib/FormMetaData.js +0 -28
- package/lib/InstanceManager.d.ts +0 -16
- package/lib/InstanceManager.js +0 -53
- package/lib/Node.d.ts +0 -12
- package/lib/Node.js +0 -27
- package/lib/Scriptable.d.ts +0 -31
- package/lib/controller/Controller.d.ts +0 -255
- package/lib/controller/Controller.js +0 -328
- package/lib/controller/index.d.ts +0 -1
- package/lib/controller/index.js +0 -24
- package/lib/data/DataValue.js +0 -56
- package/lib/data/EmptyDataValue.js +0 -46
- package/lib/index.d.ts +0 -28
- package/lib/index.js +0 -63
- package/lib/rules/RuleEngine.d.ts +0 -23
- package/lib/rules/RuleEngine.js +0 -62
- package/lib/types/Json.js +0 -19
- package/lib/types/Model.d.ts +0 -393
- package/lib/types/Model.js +0 -20
- package/lib/types/index.d.ts +0 -2
- package/lib/types/index.js +0 -25
- package/lib/utils/Fetch.js +0 -87
- package/lib/utils/FormCreationUtils.d.ts +0 -11
- package/lib/utils/FormCreationUtils.js +0 -83
- package/lib/utils/FormUtils.d.ts +0 -47
- package/lib/utils/FormUtils.js +0 -257
- package/lib/utils/JsonUtils.d.ts +0 -63
- package/lib/utils/JsonUtils.js +0 -157
- package/lib/utils/LogUtils.js +0 -17
- package/lib/utils/SchemaUtils.d.ts +0 -16
- package/lib/utils/SchemaUtils.js +0 -92
- package/lib/utils/TranslationUtils.d.ts +0 -41
- package/lib/utils/TranslationUtils.js +0 -185
- package/lib/utils/ValidationUtils.d.ts +0 -170
package/lib/Fieldset.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2022 Adobe, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Your access and use of this software is governed by the Adobe Customer Feedback Program Terms and Conditions or other Beta License Agreement signed by your employer and Adobe, Inc.. This software is NOT open source and may not be used without one of the foregoing licenses. Even with a foregoing license, your access and use of this file is limited to the earlier of (a) 180 days, (b) general availability of the product(s) which utilize this software (i.e. AEM Forms), (c) January 1, 2023, (d) Adobe providing notice to you that you may no longer use the software or that your beta trial has otherwise ended.
|
|
6
|
-
*
|
|
7
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ADOBE NOR ITS THIRD PARTY PROVIDERS AND PARTNERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.Fieldset = void 0;
|
|
14
|
-
const Container_1 = __importDefault(require("./Container"));
|
|
15
|
-
const controller_1 = require("./controller");
|
|
16
|
-
const FormCreationUtils_1 = require("./utils/FormCreationUtils");
|
|
17
|
-
const defaults = {
|
|
18
|
-
visible: true
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Defines a field set class which extends from {@link Container | container}
|
|
22
|
-
*/
|
|
23
|
-
class Fieldset extends Container_1.default {
|
|
24
|
-
/**
|
|
25
|
-
* @param params
|
|
26
|
-
* @param _options
|
|
27
|
-
* @private
|
|
28
|
-
*/
|
|
29
|
-
constructor(params, _options) {
|
|
30
|
-
super(params, _options);
|
|
31
|
-
this._applyDefaults();
|
|
32
|
-
this.queueEvent(new controller_1.Initialize());
|
|
33
|
-
this.queueEvent(new controller_1.ExecuteRule());
|
|
34
|
-
}
|
|
35
|
-
_applyDefaults() {
|
|
36
|
-
Object.entries(defaults).map(([key, value]) => {
|
|
37
|
-
//@ts-ignore
|
|
38
|
-
if (this._jsonModel[key] === undefined) {
|
|
39
|
-
//@ts-ignore
|
|
40
|
-
this._jsonModel[key] = value;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (this._jsonModel.dataRef && this._jsonModel.type === undefined) {
|
|
44
|
-
this._jsonModel.type = 'object';
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
get type() {
|
|
48
|
-
const ret = super.type;
|
|
49
|
-
if (ret === 'array' || ret === 'object') {
|
|
50
|
-
return ret;
|
|
51
|
-
}
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
54
|
-
_createChild(child, options) {
|
|
55
|
-
const { parent = this } = options;
|
|
56
|
-
return (0, FormCreationUtils_1.createChild)(child, { form: this.form, parent: parent });
|
|
57
|
-
}
|
|
58
|
-
get items() {
|
|
59
|
-
return super.items;
|
|
60
|
-
}
|
|
61
|
-
get value() {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
get fieldType() {
|
|
65
|
-
return 'panel';
|
|
66
|
-
}
|
|
67
|
-
get enabled() {
|
|
68
|
-
return this._jsonModel.enabled;
|
|
69
|
-
}
|
|
70
|
-
set enabled(e) {
|
|
71
|
-
this._setProperty('enabled', e);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
exports.Fieldset = Fieldset;
|
package/lib/FileObject.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2022 Adobe, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Your access and use of this software is governed by the Adobe Customer Feedback Program Terms and Conditions or other Beta License Agreement signed by your employer and Adobe, Inc.. This software is NOT open source and may not be used without one of the foregoing licenses. Even with a foregoing license, your access and use of this file is limited to the earlier of (a) 180 days, (b) general availability of the product(s) which utilize this software (i.e. AEM Forms), (c) January 1, 2023, (d) Adobe providing notice to you that you may no longer use the software or that your beta trial has otherwise ended.
|
|
6
|
-
*
|
|
7
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ADOBE NOR ITS THIRD PARTY PROVIDERS AND PARTNERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.FileObject = void 0;
|
|
11
|
-
/**
|
|
12
|
-
* Defines a file object which implements the {@link IFileObject | file object interface}
|
|
13
|
-
*/
|
|
14
|
-
class FileObject {
|
|
15
|
-
constructor(init) {
|
|
16
|
-
this.mediaType = 'application/octet-stream';
|
|
17
|
-
this.name = 'unknown';
|
|
18
|
-
this.size = 0;
|
|
19
|
-
Object.assign(this, init);
|
|
20
|
-
}
|
|
21
|
-
get type() {
|
|
22
|
-
return this.mediaType;
|
|
23
|
-
}
|
|
24
|
-
toJSON() {
|
|
25
|
-
return {
|
|
26
|
-
'name': this.name,
|
|
27
|
-
'size': this.size,
|
|
28
|
-
'mediaType': this.mediaType,
|
|
29
|
-
'data': this.data.toString()
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
equals(obj) {
|
|
33
|
-
return (this.data === obj.data &&
|
|
34
|
-
this.mediaType === obj.mediaType &&
|
|
35
|
-
this.name === obj.name &&
|
|
36
|
-
this.size === obj.size);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
exports.FileObject = FileObject;
|
package/lib/FileUpload.js
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2022 Adobe, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Your access and use of this software is governed by the Adobe Customer Feedback Program Terms and Conditions or other Beta License Agreement signed by your employer and Adobe, Inc.. This software is NOT open source and may not be used without one of the foregoing licenses. Even with a foregoing license, your access and use of this file is limited to the earlier of (a) 180 days, (b) general availability of the product(s) which utilize this software (i.e. AEM Forms), (c) January 1, 2023, (d) Adobe providing notice to you that you may no longer use the software or that your beta trial has otherwise ended.
|
|
6
|
-
*
|
|
7
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ADOBE NOR ITS THIRD PARTY PROVIDERS AND PARTNERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
*/
|
|
9
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
11
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
13
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
14
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
15
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
-
};
|
|
21
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
const Controller_1 = require("./controller/Controller");
|
|
23
|
-
const Field_1 = __importDefault(require("./Field"));
|
|
24
|
-
const FormUtils_1 = require("./utils/FormUtils");
|
|
25
|
-
const FileObject_1 = require("./FileObject");
|
|
26
|
-
const ValidationUtils_1 = require("./utils/ValidationUtils");
|
|
27
|
-
function addNameToDataURL(dataURL, name) {
|
|
28
|
-
return dataURL.replace(';base64', `;name=${encodeURIComponent(name)};base64`);
|
|
29
|
-
}
|
|
30
|
-
function processFiles(files) {
|
|
31
|
-
return Promise.all([].map.call(files, processFile));
|
|
32
|
-
}
|
|
33
|
-
function processFile(file) {
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const { name, size, type } = file;
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
37
|
-
const fileObj = yield new Promise((resolve, reject) => {
|
|
38
|
-
const reader = new FileReader();
|
|
39
|
-
reader.onload = event => {
|
|
40
|
-
resolve(new FileObject_1.FileObject({
|
|
41
|
-
// @ts-ignore
|
|
42
|
-
data: addNameToDataURL(event.target.result, name),
|
|
43
|
-
type,
|
|
44
|
-
name,
|
|
45
|
-
size
|
|
46
|
-
}));
|
|
47
|
-
};
|
|
48
|
-
reader.readAsDataURL(file.data);
|
|
49
|
-
});
|
|
50
|
-
return fileObj;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Implementation of FileUpload runtime model which extends from {@link Field | field}
|
|
55
|
-
*/
|
|
56
|
-
class FileUpload extends Field_1.default {
|
|
57
|
-
//private _files: FileObject[];
|
|
58
|
-
_getDefaults() {
|
|
59
|
-
return Object.assign(Object.assign({}, super._getDefaults()), { accept: ['audio/*', 'video/*', 'image/*', 'text/*', 'application/pdf'], maxFileSize: '2MB' });
|
|
60
|
-
}
|
|
61
|
-
_getFallbackType() {
|
|
62
|
-
return 'file';
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Returns the max file size in bytes as per IEC specification
|
|
66
|
-
*/
|
|
67
|
-
get maxFileSize() {
|
|
68
|
-
return (0, FormUtils_1.getFileSizeInBytes)(this._jsonModel.maxFileSize);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Returns the list of mime types which file attachment can accept
|
|
72
|
-
*/
|
|
73
|
-
get accept() {
|
|
74
|
-
return this._jsonModel.accept;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Checks whether there are any updates in the properties
|
|
78
|
-
* @param propNames
|
|
79
|
-
* @param updates
|
|
80
|
-
* @private
|
|
81
|
-
*/
|
|
82
|
-
_applyUpdates(propNames, updates) {
|
|
83
|
-
return propNames.reduce((acc, propertyName) => {
|
|
84
|
-
//@ts-ignore
|
|
85
|
-
const prevValue = this._jsonModel[propertyName];
|
|
86
|
-
const currentValue = updates[propertyName];
|
|
87
|
-
if (currentValue !== prevValue) {
|
|
88
|
-
acc[propertyName] = {
|
|
89
|
-
propertyName,
|
|
90
|
-
currentValue,
|
|
91
|
-
prevValue
|
|
92
|
-
};
|
|
93
|
-
if (prevValue instanceof FileObject_1.FileObject && typeof currentValue === 'object' && propertyName === 'value') {
|
|
94
|
-
// @ts-ignore
|
|
95
|
-
this._jsonModel[propertyName] = new FileObject_1.FileObject(Object.assign(Object.assign({}, prevValue), { 'data': currentValue.data }));
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
// @ts-ignore
|
|
99
|
-
this._jsonModel[propertyName] = currentValue;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return acc;
|
|
103
|
-
}, {});
|
|
104
|
-
}
|
|
105
|
-
getInternalType() {
|
|
106
|
-
var _a;
|
|
107
|
-
return ((_a = this.type) === null || _a === void 0 ? void 0 : _a.endsWith('[]')) ? 'file[]' : 'file';
|
|
108
|
-
}
|
|
109
|
-
getDataNodeValue(typedValue) {
|
|
110
|
-
var _a;
|
|
111
|
-
let dataNodeValue = typedValue;
|
|
112
|
-
if (dataNodeValue != null) {
|
|
113
|
-
if (this.type === 'string') {
|
|
114
|
-
dataNodeValue = (_a = dataNodeValue.data) === null || _a === void 0 ? void 0 : _a.toString();
|
|
115
|
-
}
|
|
116
|
-
else if (this.type === 'string[]') {
|
|
117
|
-
dataNodeValue = dataNodeValue instanceof Array ? dataNodeValue : [dataNodeValue];
|
|
118
|
-
dataNodeValue = dataNodeValue.map((_) => { var _a; return (_a = _ === null || _ === void 0 ? void 0 : _.data) === null || _a === void 0 ? void 0 : _a.toString(); });
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
return dataNodeValue;
|
|
122
|
-
}
|
|
123
|
-
_serialize() {
|
|
124
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
const val = this._jsonModel.value;
|
|
126
|
-
if (val === undefined) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
// @ts-ignore
|
|
130
|
-
const filesInfo = yield processFiles(val instanceof Array ? val : [val]);
|
|
131
|
-
return filesInfo;
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
importData(dataModel) {
|
|
135
|
-
this._bindToDataModel(dataModel);
|
|
136
|
-
const dataNode = this.getDataNode();
|
|
137
|
-
if (dataNode !== undefined) {
|
|
138
|
-
const value = dataNode === null || dataNode === void 0 ? void 0 : dataNode.$value;
|
|
139
|
-
// only if not undefined, proceed further
|
|
140
|
-
if (value != null) {
|
|
141
|
-
const res = ValidationUtils_1.Constraints.type(this.getInternalType(), value);
|
|
142
|
-
if (!res.valid) {
|
|
143
|
-
this.form.logger.error(`unable to bind ${this.name} to data`);
|
|
144
|
-
}
|
|
145
|
-
// is this needed ?
|
|
146
|
-
this.form.getEventQueue().queue(this, (0, Controller_1.propertyChange)('value', res.value, this._jsonModel.value));
|
|
147
|
-
this._jsonModel.value = res.value;
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
this._jsonModel.value = null;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
exports.default = FileUpload;
|
package/lib/Form.js
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2022 Adobe, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Your access and use of this software is governed by the Adobe Customer Feedback Program Terms and Conditions or other Beta License Agreement signed by your employer and Adobe, Inc.. This software is NOT open source and may not be used without one of the foregoing licenses. Even with a foregoing license, your access and use of this file is limited to the earlier of (a) 180 days, (b) general availability of the product(s) which utilize this software (i.e. AEM Forms), (c) January 1, 2023, (d) Adobe providing notice to you that you may no longer use the software or that your beta trial has otherwise ended.
|
|
6
|
-
*
|
|
7
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ADOBE NOR ITS THIRD PARTY PROVIDERS AND PARTNERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const Container_1 = __importDefault(require("./Container"));
|
|
14
|
-
const FormMetaData_1 = __importDefault(require("./FormMetaData"));
|
|
15
|
-
const EventQueue_1 = __importDefault(require("./controller/EventQueue"));
|
|
16
|
-
const Logger_1 = require("./controller/Logger");
|
|
17
|
-
const FormUtils_1 = require("./utils/FormUtils");
|
|
18
|
-
const FormCreationUtils_1 = require("./utils/FormCreationUtils");
|
|
19
|
-
const DataGroup_1 = __importDefault(require("./data/DataGroup"));
|
|
20
|
-
const FunctionRuntime_1 = require("./rules/FunctionRuntime");
|
|
21
|
-
const controller_1 = require("./controller");
|
|
22
|
-
/**
|
|
23
|
-
* Defines `form model` which implements {@link FormModel | form model}
|
|
24
|
-
*/
|
|
25
|
-
class Form extends Container_1.default {
|
|
26
|
-
/**
|
|
27
|
-
* @param n
|
|
28
|
-
* @param _ruleEngine
|
|
29
|
-
* @param _eventQueue
|
|
30
|
-
* @param logLevel
|
|
31
|
-
* @private
|
|
32
|
-
*/
|
|
33
|
-
constructor(n, _ruleEngine, _eventQueue = new EventQueue_1.default(), logLevel = 'off') {
|
|
34
|
-
//@ts-ignore
|
|
35
|
-
super(n, {});
|
|
36
|
-
this._ruleEngine = _ruleEngine;
|
|
37
|
-
this._eventQueue = _eventQueue;
|
|
38
|
-
/**
|
|
39
|
-
* @private
|
|
40
|
-
*/
|
|
41
|
-
this._fields = {};
|
|
42
|
-
/**
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
this._invalidFields = [];
|
|
46
|
-
this.dataRefRegex = /("[^"]+?"|[^.]+?)(?:\.|$)/g;
|
|
47
|
-
this._logger = new Logger_1.Logger(logLevel);
|
|
48
|
-
this.queueEvent(new controller_1.Initialize());
|
|
49
|
-
this.queueEvent(new controller_1.ExecuteRule());
|
|
50
|
-
this._ids = (0, FormUtils_1.IdGenerator)();
|
|
51
|
-
this._bindToDataModel(new DataGroup_1.default('$form', {}));
|
|
52
|
-
this._initialize();
|
|
53
|
-
this.queueEvent(new controller_1.FormLoad());
|
|
54
|
-
}
|
|
55
|
-
get logger() {
|
|
56
|
-
return this._logger;
|
|
57
|
-
}
|
|
58
|
-
get metaData() {
|
|
59
|
-
const metaData = this._jsonModel.metadata || {};
|
|
60
|
-
return new FormMetaData_1.default(metaData);
|
|
61
|
-
}
|
|
62
|
-
get action() {
|
|
63
|
-
return this._jsonModel.action;
|
|
64
|
-
}
|
|
65
|
-
_createChild(child) {
|
|
66
|
-
return (0, FormCreationUtils_1.createChild)(child, { form: this, parent: this });
|
|
67
|
-
}
|
|
68
|
-
importData(dataModel) {
|
|
69
|
-
this._bindToDataModel(new DataGroup_1.default('$form', dataModel));
|
|
70
|
-
this.syncDataAndFormModel(this.getDataNode());
|
|
71
|
-
this._eventQueue.runPendingQueue();
|
|
72
|
-
}
|
|
73
|
-
exportData() {
|
|
74
|
-
var _a;
|
|
75
|
-
return (_a = this.getDataNode()) === null || _a === void 0 ? void 0 : _a.$value;
|
|
76
|
-
}
|
|
77
|
-
setFocus(field) {
|
|
78
|
-
const parent = field.parent;
|
|
79
|
-
const currentField = field;
|
|
80
|
-
while (parent != null && parent.activeChild != currentField) {
|
|
81
|
-
parent.activeChild = currentField;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Returns the current state of the form
|
|
86
|
-
*
|
|
87
|
-
* To access the form data and attachments, one needs to use the `data` and `attachments` property.
|
|
88
|
-
* For example,
|
|
89
|
-
* ```
|
|
90
|
-
* const data = form.getState().data
|
|
91
|
-
* const attachments = form.getState().attachments
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
getState() {
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
96
|
-
const self = this;
|
|
97
|
-
const res = super.getState();
|
|
98
|
-
res.id = '$form';
|
|
99
|
-
Object.defineProperty(res, 'data', {
|
|
100
|
-
get: function () {
|
|
101
|
-
return self.exportData();
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
Object.defineProperty(res, 'attachments', {
|
|
105
|
-
get: function () {
|
|
106
|
-
return (0, FormUtils_1.getAttachments)(self);
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
return res;
|
|
110
|
-
}
|
|
111
|
-
get type() {
|
|
112
|
-
return 'object';
|
|
113
|
-
}
|
|
114
|
-
isTransparent() {
|
|
115
|
-
return false;
|
|
116
|
-
}
|
|
117
|
-
get form() {
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
get ruleEngine() {
|
|
121
|
-
return this._ruleEngine;
|
|
122
|
-
}
|
|
123
|
-
getUniqueId() {
|
|
124
|
-
if (this._ids == null) {
|
|
125
|
-
return '';
|
|
126
|
-
}
|
|
127
|
-
return this._ids.next().value;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @param field
|
|
131
|
-
* @private
|
|
132
|
-
*/
|
|
133
|
-
fieldAdded(field) {
|
|
134
|
-
this._fields[field.id] = field;
|
|
135
|
-
field.subscribe((action) => {
|
|
136
|
-
if (this._invalidFields.indexOf(action.target.id) === -1) {
|
|
137
|
-
this._invalidFields.push(action.target.id);
|
|
138
|
-
}
|
|
139
|
-
}, 'invalid');
|
|
140
|
-
field.subscribe((action) => {
|
|
141
|
-
const index = this._invalidFields.indexOf(action.target.id);
|
|
142
|
-
if (index > -1) {
|
|
143
|
-
this._invalidFields.splice(index, 1);
|
|
144
|
-
}
|
|
145
|
-
}, 'valid');
|
|
146
|
-
field.subscribe((action) => {
|
|
147
|
-
//@ts-ignore
|
|
148
|
-
const field = action.target.getState();
|
|
149
|
-
if (field) {
|
|
150
|
-
const fieldChangedAction = new controller_1.FieldChanged(action.payload.changes, field);
|
|
151
|
-
this.dispatch(fieldChangedAction);
|
|
152
|
-
}
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* visits each element in the form
|
|
157
|
-
* @param callBack a function which is invoked on each form element
|
|
158
|
-
* (including container type elements) visited
|
|
159
|
-
*/
|
|
160
|
-
visit(callBack) {
|
|
161
|
-
this.traverseChild(this, callBack);
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
*
|
|
165
|
-
* @param container
|
|
166
|
-
* @param callBack
|
|
167
|
-
* @private
|
|
168
|
-
*/
|
|
169
|
-
traverseChild(container, callBack) {
|
|
170
|
-
container.items.forEach((field) => {
|
|
171
|
-
if (field.isContainer) {
|
|
172
|
-
this.traverseChild(field, callBack);
|
|
173
|
-
}
|
|
174
|
-
callBack(field);
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
validate() {
|
|
178
|
-
const validationErrors = super.validate();
|
|
179
|
-
// trigger event on form so that user's can customize their application
|
|
180
|
-
this.dispatch(new controller_1.ValidationComplete(validationErrors));
|
|
181
|
-
return validationErrors;
|
|
182
|
-
}
|
|
183
|
-
/**
|
|
184
|
-
* Checks if the given form is valid or not
|
|
185
|
-
* @returns `true`, if form is valid, `false` otherwise
|
|
186
|
-
*/
|
|
187
|
-
isValid() {
|
|
188
|
-
return this._invalidFields.length === 0;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* @param field
|
|
192
|
-
* @private
|
|
193
|
-
*/
|
|
194
|
-
dispatch(action) {
|
|
195
|
-
if (action.type === 'submit') {
|
|
196
|
-
super.queueEvent(action);
|
|
197
|
-
this._eventQueue.runPendingQueue();
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
super.dispatch(action);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
/**
|
|
204
|
-
* @param action
|
|
205
|
-
* @private
|
|
206
|
-
*/
|
|
207
|
-
executeAction(action) {
|
|
208
|
-
if ((action.type !== 'submit') || this._invalidFields.length === 0) {
|
|
209
|
-
super.executeAction(action);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @param action
|
|
214
|
-
* @param context
|
|
215
|
-
* @private
|
|
216
|
-
*/
|
|
217
|
-
submit(action, context) {
|
|
218
|
-
// if no errors, only then submit
|
|
219
|
-
if (this.validate().length === 0) {
|
|
220
|
-
const payload = (action === null || action === void 0 ? void 0 : action.payload) || {};
|
|
221
|
-
(0, FunctionRuntime_1.submit)(context, payload === null || payload === void 0 ? void 0 : payload.success, payload === null || payload === void 0 ? void 0 : payload.error, payload === null || payload === void 0 ? void 0 : payload.submit_as, payload === null || payload === void 0 ? void 0 : payload.data);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
getElement(id) {
|
|
225
|
-
if (id == this.id) {
|
|
226
|
-
return this;
|
|
227
|
-
}
|
|
228
|
-
return this._fields[id];
|
|
229
|
-
}
|
|
230
|
-
get qualifiedName() {
|
|
231
|
-
return '$form';
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* @private
|
|
235
|
-
*/
|
|
236
|
-
getEventQueue() {
|
|
237
|
-
return this._eventQueue;
|
|
238
|
-
}
|
|
239
|
-
get name() {
|
|
240
|
-
return '$form';
|
|
241
|
-
}
|
|
242
|
-
get value() {
|
|
243
|
-
return null;
|
|
244
|
-
}
|
|
245
|
-
get id() {
|
|
246
|
-
return '$form';
|
|
247
|
-
}
|
|
248
|
-
get title() {
|
|
249
|
-
return this._jsonModel.title || '';
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
exports.default = Form;
|
package/lib/FormInstance.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { FormModel } from './types';
|
|
2
|
-
import { LogLevel } from './controller/Logger';
|
|
3
|
-
/**
|
|
4
|
-
* Creates form instance using form model definition as per `adaptive form specification`
|
|
5
|
-
* @param formModel form model definition
|
|
6
|
-
* @param callback a callback that recieves the FormModel instance that gets executed before any event in the Form
|
|
7
|
-
* is executed
|
|
8
|
-
* @param logLevel Logging Level for the form. Setting it off will disable the logging
|
|
9
|
-
* @param fModel existing form model, this is additional optimization to prevent creation of form instance
|
|
10
|
-
* @returns {@link FormModel | form model}
|
|
11
|
-
*/
|
|
12
|
-
export declare const createFormInstance: (formModel: any, callback?: ((f: FormModel) => any) | undefined, logLevel?: LogLevel, fModel?: any) => FormModel;
|
|
13
|
-
/**
|
|
14
|
-
* Validates Form model definition with the given data
|
|
15
|
-
* @param formModel form model definition
|
|
16
|
-
* @param data form data
|
|
17
|
-
* @deprecated use validateFormData
|
|
18
|
-
* @returns `true`, if form is valid against the given form data, `false` otherwise
|
|
19
|
-
*/
|
|
20
|
-
export declare const validateFormInstance: (formModel: any, data: any) => boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Validates Form model definition with the given data
|
|
23
|
-
* @param formModel form model definition
|
|
24
|
-
* @param data form data
|
|
25
|
-
* @deprecated use validateFormData
|
|
26
|
-
* @returns {messages: [], valid: boolean}
|
|
27
|
-
*/
|
|
28
|
-
export declare const validateFormData: (formModel: any, data: any) => {
|
|
29
|
-
messages: any[];
|
|
30
|
-
valid: boolean;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Helper API to fetch form model definition from an AEM instance
|
|
34
|
-
* @param url URL of the instance
|
|
35
|
-
* @param headers HTTP headers to pass to the aem instance
|
|
36
|
-
* @returns promise which resolves to the form model definition
|
|
37
|
-
*/
|
|
38
|
-
export declare const fetchForm: (url: string, headers?: any) => Promise<string>;
|
package/lib/FormInstance.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2022 Adobe, Inc.
|
|
4
|
-
*
|
|
5
|
-
* Your access and use of this software is governed by the Adobe Customer Feedback Program Terms and Conditions or other Beta License Agreement signed by your employer and Adobe, Inc.. This software is NOT open source and may not be used without one of the foregoing licenses. Even with a foregoing license, your access and use of this file is limited to the earlier of (a) 180 days, (b) general availability of the product(s) which utilize this software (i.e. AEM Forms), (c) January 1, 2023, (d) Adobe providing notice to you that you may no longer use the software or that your beta trial has otherwise ended.
|
|
6
|
-
*
|
|
7
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ADOBE NOR ITS THIRD PARTY PROVIDERS AND PARTNERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.fetchForm = exports.validateFormData = exports.validateFormInstance = exports.createFormInstance = void 0;
|
|
14
|
-
const Form_1 = __importDefault(require("./Form"));
|
|
15
|
-
const JsonUtils_1 = require("./utils/JsonUtils");
|
|
16
|
-
const Fetch_1 = require("./utils/Fetch");
|
|
17
|
-
const RuleEngine_1 = __importDefault(require("./rules/RuleEngine"));
|
|
18
|
-
const EventQueue_1 = __importDefault(require("./controller/EventQueue"));
|
|
19
|
-
const Logger_1 = require("./controller/Logger");
|
|
20
|
-
/**
|
|
21
|
-
* Creates form instance using form model definition as per `adaptive form specification`
|
|
22
|
-
* @param formModel form model definition
|
|
23
|
-
* @param callback a callback that recieves the FormModel instance that gets executed before any event in the Form
|
|
24
|
-
* is executed
|
|
25
|
-
* @param logLevel Logging Level for the form. Setting it off will disable the logging
|
|
26
|
-
* @param fModel existing form model, this is additional optimization to prevent creation of form instance
|
|
27
|
-
* @returns {@link FormModel | form model}
|
|
28
|
-
*/
|
|
29
|
-
const createFormInstance = (formModel, callback, logLevel = 'error', fModel = undefined) => {
|
|
30
|
-
try {
|
|
31
|
-
let f = fModel;
|
|
32
|
-
if (f == null) {
|
|
33
|
-
f = new Form_1.default(Object.assign({}, formModel), new RuleEngine_1.default(), new EventQueue_1.default(new Logger_1.Logger(logLevel)), logLevel);
|
|
34
|
-
}
|
|
35
|
-
const formData = formModel === null || formModel === void 0 ? void 0 : formModel.data;
|
|
36
|
-
if (formData) {
|
|
37
|
-
f.importData(formData);
|
|
38
|
-
}
|
|
39
|
-
if (typeof callback === 'function') {
|
|
40
|
-
callback(f);
|
|
41
|
-
}
|
|
42
|
-
// Once the field or panel is initialized, execute the initialization script
|
|
43
|
-
// this means initialization happens after prefill and restore
|
|
44
|
-
// Before execution of calcExp, visibleExp, enabledExp, validate, options, navigationChange, we execute init script
|
|
45
|
-
//f.queueEvent(new Initialize(undefined, true));
|
|
46
|
-
//f.queueEvent(new ExecuteRule(undefined, true));
|
|
47
|
-
f.getEventQueue().runPendingQueue();
|
|
48
|
-
return f;
|
|
49
|
-
}
|
|
50
|
-
catch (e) {
|
|
51
|
-
console.error(`Unable to create an instance of the Form ${e}`);
|
|
52
|
-
throw new Error(e);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
exports.createFormInstance = createFormInstance;
|
|
56
|
-
/**
|
|
57
|
-
* Validates Form model definition with the given data
|
|
58
|
-
* @param formModel form model definition
|
|
59
|
-
* @param data form data
|
|
60
|
-
* @deprecated use validateFormData
|
|
61
|
-
* @returns `true`, if form is valid against the given form data, `false` otherwise
|
|
62
|
-
*/
|
|
63
|
-
const validateFormInstance = (formModel, data) => {
|
|
64
|
-
try {
|
|
65
|
-
const f = new Form_1.default(Object.assign({}, formModel), new RuleEngine_1.default());
|
|
66
|
-
if (data) {
|
|
67
|
-
f.importData(data);
|
|
68
|
-
}
|
|
69
|
-
return f.validate().length === 0;
|
|
70
|
-
}
|
|
71
|
-
catch (e) {
|
|
72
|
-
throw new Error(e);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
exports.validateFormInstance = validateFormInstance;
|
|
76
|
-
/**
|
|
77
|
-
* Validates Form model definition with the given data
|
|
78
|
-
* @param formModel form model definition
|
|
79
|
-
* @param data form data
|
|
80
|
-
* @deprecated use validateFormData
|
|
81
|
-
* @returns {messages: [], valid: boolean}
|
|
82
|
-
*/
|
|
83
|
-
const validateFormData = (formModel, data) => {
|
|
84
|
-
try {
|
|
85
|
-
const f = new Form_1.default(Object.assign({}, formModel), new RuleEngine_1.default());
|
|
86
|
-
if (data) {
|
|
87
|
-
f.importData(data);
|
|
88
|
-
}
|
|
89
|
-
const res = f.validate();
|
|
90
|
-
return {
|
|
91
|
-
messages: res,
|
|
92
|
-
valid: res.length === 0
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
catch (e) {
|
|
96
|
-
throw new Error(e);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
exports.validateFormData = validateFormData;
|
|
100
|
-
/**
|
|
101
|
-
* Helper API to fetch form model definition from an AEM instance
|
|
102
|
-
* @param url URL of the instance
|
|
103
|
-
* @param headers HTTP headers to pass to the aem instance
|
|
104
|
-
* @returns promise which resolves to the form model definition
|
|
105
|
-
*/
|
|
106
|
-
const fetchForm = (url, headers = {}) => {
|
|
107
|
-
const headerObj = new Headers();
|
|
108
|
-
Object.entries(headers).forEach(([key, value]) => {
|
|
109
|
-
headerObj.append(key, value);
|
|
110
|
-
});
|
|
111
|
-
return new Promise((resolve, reject) => {
|
|
112
|
-
(0, Fetch_1.request)(`${url}.model.json`, null, { headers }).then((response) => {
|
|
113
|
-
if (response.status !== 200) {
|
|
114
|
-
reject('Not Found');
|
|
115
|
-
}
|
|
116
|
-
else {
|
|
117
|
-
let formObj = response.body;
|
|
118
|
-
if ('model' in formObj) {
|
|
119
|
-
const { model } = formObj;
|
|
120
|
-
formObj = model;
|
|
121
|
-
}
|
|
122
|
-
resolve((0, JsonUtils_1.jsonString)(formObj));
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
};
|
|
127
|
-
exports.fetchForm = fetchForm;
|