@aemforms/af-core 0.22.19 → 0.22.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -4
- package/lib/cjs/index.cjs +7277 -0
- package/lib/{BaseNode.js → esm/BaseNode-dc59ab07.js} +108 -184
- package/lib/{BaseNode.d.ts → esm/BaseNode.d.ts} +10 -69
- package/lib/esm/BaseNode.js +26 -0
- package/lib/esm/Checkbox.d.ts +79 -0
- package/lib/esm/Checkbox.js +63 -0
- package/lib/{CheckboxGroup.d.ts → esm/CheckboxGroup.d.ts} +2 -14
- package/lib/esm/CheckboxGroup.js +60 -0
- package/lib/{Container.d.ts → esm/Container.d.ts} +12 -59
- package/lib/{Container.js → esm/Container.js} +81 -122
- package/lib/{DateField.d.ts → esm/DateField.d.ts} +1 -1
- package/lib/esm/DateField.js +57 -0
- package/lib/{Field.d.ts → esm/Field.d.ts} +41 -106
- package/lib/{Field.js → esm/Field.js} +186 -216
- package/lib/esm/Fieldset.d.ts +16 -0
- package/lib/esm/Fieldset.js +78 -0
- package/lib/{FileObject.d.ts → esm/FileObject.d.ts} +1 -4
- package/lib/esm/FileObject.js +48 -0
- package/lib/{FileUpload.d.ts → esm/FileUpload.d.ts} +3 -18
- package/lib/esm/FileUpload.js +141 -0
- package/lib/{Form.d.ts → esm/Form.d.ts} +20 -86
- package/lib/esm/Form.js +208 -0
- package/lib/esm/FormInstance.d.ts +13 -0
- package/lib/esm/FormInstance.js +129 -0
- package/lib/esm/FormMetaData.d.ts +7 -0
- package/lib/esm/FormMetaData.js +35 -0
- package/lib/esm/InstanceManager.d.ts +9 -0
- package/lib/esm/InstanceManager.js +58 -0
- package/lib/esm/Node.d.ts +7 -0
- package/lib/esm/Node.js +40 -0
- package/lib/esm/Scriptable.d.ts +17 -0
- package/lib/{Scriptable.js → esm/Scriptable.js} +38 -54
- package/lib/{controller → esm/controller}/EventQueue.d.ts +3 -11
- package/lib/{controller → esm/controller}/EventQueue.js +32 -26
- package/lib/esm/controller/Events.d.ts +85 -0
- package/lib/esm/controller/Events.js +171 -0
- package/lib/{controller → esm/controller}/Logger.d.ts +2 -8
- package/lib/esm/controller/Logger.js +52 -0
- package/lib/{data → esm/data}/DataGroup.d.ts +1 -7
- package/lib/{data → esm/data}/DataGroup.js +38 -34
- package/lib/{data → esm/data}/DataValue.d.ts +1 -7
- package/lib/esm/data/DataValue.js +68 -0
- package/lib/{data → esm/data}/EmptyDataValue.d.ts +1 -1
- package/lib/esm/data/EmptyDataValue.js +51 -0
- package/lib/esm/index.d.ts +21 -0
- package/lib/esm/index.js +55 -0
- package/lib/{rules → esm/rules}/FunctionRuntime.d.ts +3 -25
- package/lib/{rules → esm/rules}/FunctionRuntime.js +66 -117
- package/lib/esm/rules/RuleEngine.d.ts +12 -0
- package/lib/esm/rules/RuleEngine.js +76 -0
- package/lib/esm/types/Json.d.ts +119 -0
- package/lib/esm/types/Json.js +29 -0
- package/lib/esm/types/Model.d.ts +131 -0
- package/lib/esm/types/Model.js +30 -0
- package/lib/esm/types/index.d.ts +2 -0
- package/lib/esm/types/index.js +22 -0
- package/lib/{utils → esm/utils}/DataRefParser.d.ts +4 -7
- package/lib/{utils → esm/utils}/DataRefParser.js +42 -44
- package/lib/{utils → esm/utils}/Fetch.d.ts +1 -7
- package/lib/esm/utils/Fetch.js +83 -0
- package/lib/esm/utils/FormCreationUtils.d.ts +9 -0
- package/lib/esm/utils/FormCreationUtils.js +112 -0
- package/lib/esm/utils/FormUtils.d.ts +12 -0
- package/lib/esm/utils/FormUtils.js +212 -0
- package/lib/esm/utils/JsonUtils.d.ts +11 -0
- package/lib/esm/utils/JsonUtils.js +99 -0
- package/lib/{utils → esm/utils}/LogUtils.d.ts +1 -4
- package/lib/esm/utils/LogUtils.js +28 -0
- package/lib/esm/utils/SchemaUtils.d.ts +3 -0
- package/lib/esm/utils/SchemaUtils.js +93 -0
- package/lib/esm/utils/TranslationUtils.d.ts +11 -0
- package/lib/esm/utils/TranslationUtils.js +138 -0
- package/lib/esm/utils/ValidationUtils.d.ts +19 -0
- package/lib/{utils → esm/utils}/ValidationUtils.js +55 -187
- package/package.json +18 -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/Logger.js +0 -36
- 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.d.ts +0 -138
- 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
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
+
}
|
|
22
35
|
constructor(_name, _value, _type = typeof _value) {
|
|
23
36
|
super(_name, _value, _type);
|
|
24
37
|
if (_value instanceof Array) {
|
|
@@ -32,15 +45,6 @@ class DataGroup extends DataValue_1.default {
|
|
|
32
45
|
}));
|
|
33
46
|
}
|
|
34
47
|
}
|
|
35
|
-
createEntry(key, value) {
|
|
36
|
-
const t = value instanceof Array ? 'array' : typeof value;
|
|
37
|
-
if (typeof value === 'object' && value != null) {
|
|
38
|
-
return new DataGroup(key, value, t);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
return new DataValue_1.default(key, value, t);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
48
|
get $value() {
|
|
45
49
|
const enabled = this.$_fields.find(x => x.enabled !== false);
|
|
46
50
|
if (!enabled && this.$_fields.length) {
|
|
@@ -59,10 +63,10 @@ class DataGroup extends DataValue_1.default {
|
|
|
59
63
|
return Object.entries(this.$_items).length;
|
|
60
64
|
}
|
|
61
65
|
$convertToDataValue() {
|
|
62
|
-
return new
|
|
66
|
+
return new DataValue(this.$name, this.$value, this.$type);
|
|
63
67
|
}
|
|
64
68
|
$addDataNode(name, value, override = false) {
|
|
65
|
-
if (value !==
|
|
69
|
+
if (value !== NullDataValue) {
|
|
66
70
|
if (this.$type === 'array') {
|
|
67
71
|
const index = name;
|
|
68
72
|
if (!override) {
|
|
@@ -78,7 +82,6 @@ class DataGroup extends DataValue_1.default {
|
|
|
78
82
|
}
|
|
79
83
|
}
|
|
80
84
|
$removeDataNode(name) {
|
|
81
|
-
//@ts-ignore not calling delete
|
|
82
85
|
this.$_items[name] = undefined;
|
|
83
86
|
}
|
|
84
87
|
$getDataNode(name) {
|
|
@@ -93,4 +96,5 @@ class DataGroup extends DataValue_1.default {
|
|
|
93
96
|
return true;
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
|
-
|
|
99
|
+
|
|
100
|
+
export { DataGroup as default };
|
|
@@ -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,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 };
|
package/lib/esm/index.js
ADDED
|
@@ -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-dc59ab07.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';
|
|
@@ -1,26 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Implementation of generic request API. This API can be used to make external web request
|
|
4
|
-
* @param context expression execution context(consists of current form, current field, current event)
|
|
5
|
-
* @param uri request URI
|
|
6
|
-
* @param httpVerb http verb (for example, GET or POST)
|
|
7
|
-
* @param payload request payload
|
|
8
|
-
* @param success success handler
|
|
9
|
-
* @param error error handler
|
|
10
|
-
* @param headers headers
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
1
|
+
type HTTP_VERB = 'GET' | 'POST';
|
|
13
2
|
export declare const request: (context: any, uri: string, httpVerb: HTTP_VERB, payload: any, success: string, error: string, headers: any) => Promise<void>;
|
|
14
3
|
export declare const submit: (context: any, success: string, error: string, submitAs?: 'application/json' | 'multipart/form-data', input_data?: any) => Promise<void>;
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
export type CustomFunction = Function;
|
|
5
|
+
export type FunctionDefinition = {
|
|
17
6
|
_func: CustomFunction;
|
|
18
7
|
_signature: Array<any>;
|
|
19
8
|
};
|
|
20
|
-
/**
|
|
21
|
-
* Implementation of function runtime
|
|
22
|
-
* @private
|
|
23
|
-
*/
|
|
24
9
|
declare class FunctionRuntimeImpl {
|
|
25
10
|
private customFunctions;
|
|
26
11
|
registerFunctions(functions: {
|
|
@@ -56,13 +41,6 @@ declare class FunctionRuntimeImpl {
|
|
|
56
41
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => {};
|
|
57
42
|
_signature: never[];
|
|
58
43
|
};
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
* @name dispatchEvent
|
|
62
|
-
* @param [element] element on which to trigger the event. If not defined the event will be triggered on entire form
|
|
63
|
-
* @param eventName name of the event to trigger
|
|
64
|
-
* @param payload payload to pass in the event
|
|
65
|
-
*/
|
|
66
44
|
dispatchEvent: {
|
|
67
45
|
_func: (args: Array<unknown>, data: unknown, interpreter: any) => {};
|
|
68
46
|
_signature: never[];
|