@aemforms/af-core 0.22.107 → 0.22.109
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/esm/afb-runtime.js +2 -2
- package/esm/types/src/index.d.ts +2 -2
- package/lib/data/DataValue.js +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +2 -1
- package/lib/rules/FunctionRuntime.js +1 -1
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -229,7 +229,7 @@ class DataValue {
|
|
|
229
229
|
return x;
|
|
230
230
|
}
|
|
231
231
|
});
|
|
232
|
-
if (formInFileInput && (this.$
|
|
232
|
+
if (formInFileInput && (this.$_fields.every(_ => ['string', 'string[]'].includes(_.type)))) {
|
|
233
233
|
const attachmentMap = formInFileInput.form._exportDataAttachmentMap;
|
|
234
234
|
if (attachmentMap && attachmentMap[formInFileInput.id]) {
|
|
235
235
|
const attachment = attachmentMap[formInFileInput.id];
|
|
@@ -2719,7 +2719,7 @@ const urlEncoded = (data) => {
|
|
|
2719
2719
|
const submit = async (context, success, error, submitAs = 'multipart/form-data', input_data = null, action = '', metadata = null) => {
|
|
2720
2720
|
const endpoint = action || context.form.action;
|
|
2721
2721
|
let data = input_data;
|
|
2722
|
-
const attachments = await
|
|
2722
|
+
const attachments = await readAttachments(context.form, true);
|
|
2723
2723
|
if (typeof data != 'object' || data == null) {
|
|
2724
2724
|
data = context.form.exportData(attachments);
|
|
2725
2725
|
}
|
package/esm/types/src/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from './controller/Events';
|
|
|
4
4
|
export * from './utils/TranslationUtils';
|
|
5
5
|
export * from './utils/JsonUtils';
|
|
6
6
|
export * from './utils/SchemaUtils';
|
|
7
|
-
import { getFileSizeInBytes, extractFileInfo, isEmpty } from './utils/FormUtils';
|
|
7
|
+
import { getFileSizeInBytes, extractFileInfo, isEmpty, readAttachments } from './utils/FormUtils';
|
|
8
8
|
import { BaseNode } from './BaseNode';
|
|
9
9
|
import Checkbox from './Checkbox';
|
|
10
10
|
import CheckboxGroup from './CheckboxGroup';
|
|
@@ -21,4 +21,4 @@ import Node from './Node';
|
|
|
21
21
|
import Scriptable from './Scriptable';
|
|
22
22
|
import Form from './Form';
|
|
23
23
|
import { FunctionRuntime, request } from './rules/FunctionRuntime';
|
|
24
|
-
export { Form, BaseNode, Checkbox, CheckboxGroup, Container, Field, Fieldset, FileObject, FileUpload, FormMetaData, Node, Scriptable, getFileSizeInBytes, extractFileInfo, FunctionRuntime, request, isEmpty, SubmitMetaData, EmailInput, Captcha };
|
|
24
|
+
export { Form, BaseNode, Checkbox, CheckboxGroup, Container, Field, Fieldset, FileObject, FileUpload, FormMetaData, Node, Scriptable, getFileSizeInBytes, extractFileInfo, readAttachments, FunctionRuntime, request, isEmpty, SubmitMetaData, EmailInput, Captcha };
|
package/lib/data/DataValue.js
CHANGED
|
@@ -25,7 +25,7 @@ class DataValue {
|
|
|
25
25
|
return x;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
if (formInFileInput && (this.$
|
|
28
|
+
if (formInFileInput && (this.$_fields.every(_ => ['string', 'string[]'].includes(_.type)))) {
|
|
29
29
|
const attachmentMap = formInFileInput.form._exportDataAttachmentMap;
|
|
30
30
|
if (attachmentMap && attachmentMap[formInFileInput.id]) {
|
|
31
31
|
const attachment = attachmentMap[formInFileInput.id];
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export * from './controller/Events';
|
|
|
4
4
|
export * from './utils/TranslationUtils';
|
|
5
5
|
export * from './utils/JsonUtils';
|
|
6
6
|
export * from './utils/SchemaUtils';
|
|
7
|
-
import { getFileSizeInBytes, extractFileInfo, isEmpty } from './utils/FormUtils';
|
|
7
|
+
import { getFileSizeInBytes, extractFileInfo, isEmpty, readAttachments } from './utils/FormUtils';
|
|
8
8
|
import { BaseNode } from './BaseNode';
|
|
9
9
|
import Checkbox from './Checkbox';
|
|
10
10
|
import CheckboxGroup from './CheckboxGroup';
|
|
@@ -21,4 +21,4 @@ import Node from './Node';
|
|
|
21
21
|
import Scriptable from './Scriptable';
|
|
22
22
|
import Form from './Form';
|
|
23
23
|
import { FunctionRuntime, request } from './rules/FunctionRuntime';
|
|
24
|
-
export { Form, BaseNode, Checkbox, CheckboxGroup, Container, Field, Fieldset, FileObject, FileUpload, FormMetaData, Node, Scriptable, getFileSizeInBytes, extractFileInfo, FunctionRuntime, request, isEmpty, SubmitMetaData, EmailInput, Captcha };
|
|
24
|
+
export { Form, BaseNode, Checkbox, CheckboxGroup, Container, Field, Fieldset, FileObject, FileUpload, FormMetaData, Node, Scriptable, getFileSizeInBytes, extractFileInfo, readAttachments, FunctionRuntime, request, isEmpty, SubmitMetaData, EmailInput, Captcha };
|
package/lib/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.Captcha = exports.EmailInput = exports.SubmitMetaData = exports.isEmpty = exports.request = exports.FunctionRuntime = exports.extractFileInfo = exports.getFileSizeInBytes = exports.Scriptable = exports.Node = exports.FormMetaData = exports.FileUpload = exports.FileObject = exports.Fieldset = exports.Field = exports.Container = exports.CheckboxGroup = exports.Checkbox = exports.BaseNode = exports.Form = void 0;
|
|
20
|
+
exports.Captcha = exports.EmailInput = exports.SubmitMetaData = exports.isEmpty = exports.request = exports.FunctionRuntime = exports.readAttachments = exports.extractFileInfo = exports.getFileSizeInBytes = exports.Scriptable = exports.Node = exports.FormMetaData = exports.FileUpload = exports.FileObject = exports.Fieldset = exports.Field = exports.Container = exports.CheckboxGroup = exports.Checkbox = exports.BaseNode = exports.Form = void 0;
|
|
21
21
|
__exportStar(require("./FormInstance"), exports);
|
|
22
22
|
__exportStar(require("./types/index"), exports);
|
|
23
23
|
__exportStar(require("./controller/Events"), exports);
|
|
@@ -28,6 +28,7 @@ const FormUtils_1 = require("./utils/FormUtils");
|
|
|
28
28
|
Object.defineProperty(exports, "getFileSizeInBytes", { enumerable: true, get: function () { return FormUtils_1.getFileSizeInBytes; } });
|
|
29
29
|
Object.defineProperty(exports, "extractFileInfo", { enumerable: true, get: function () { return FormUtils_1.extractFileInfo; } });
|
|
30
30
|
Object.defineProperty(exports, "isEmpty", { enumerable: true, get: function () { return FormUtils_1.isEmpty; } });
|
|
31
|
+
Object.defineProperty(exports, "readAttachments", { enumerable: true, get: function () { return FormUtils_1.readAttachments; } });
|
|
31
32
|
const BaseNode_1 = require("./BaseNode");
|
|
32
33
|
Object.defineProperty(exports, "BaseNode", { enumerable: true, get: function () { return BaseNode_1.BaseNode; } });
|
|
33
34
|
const Checkbox_1 = __importDefault(require("./Checkbox"));
|
|
@@ -95,7 +95,7 @@ const urlEncoded = (data) => {
|
|
|
95
95
|
const submit = (context, success, error, submitAs = 'multipart/form-data', input_data = null, action = '', metadata = null) => __awaiter(void 0, void 0, void 0, function* () {
|
|
96
96
|
const endpoint = action || context.form.action;
|
|
97
97
|
let data = input_data;
|
|
98
|
-
const attachments = yield (0, FormUtils_1.
|
|
98
|
+
const attachments = yield (0, FormUtils_1.readAttachments)(context.form, true);
|
|
99
99
|
if (typeof data != 'object' || data == null) {
|
|
100
100
|
data = context.form.exportData(attachments);
|
|
101
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.109",
|
|
4
4
|
"description": "Core Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/json-formula": "0.1.50",
|
|
40
|
-
"@aemforms/af-formatters": "^0.22.
|
|
40
|
+
"@aemforms/af-formatters": "^0.22.109"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|