@aemforms/af-core 0.22.112 → 0.22.114
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 +8 -2
- package/lib/Form.js +8 -3
- package/package.json +2 -2
package/esm/afb-runtime.js
CHANGED
|
@@ -3344,6 +3344,12 @@ class Form extends Container {
|
|
|
3344
3344
|
captchaInfoObj[field.qualifiedName] = field.value;
|
|
3345
3345
|
}
|
|
3346
3346
|
});
|
|
3347
|
+
const draftId = this.properties['fd:draftId'] || '';
|
|
3348
|
+
if (draftId) {
|
|
3349
|
+
this.setAdditionalSubmitMetadata({
|
|
3350
|
+
'fd:draftId': draftId
|
|
3351
|
+
});
|
|
3352
|
+
}
|
|
3347
3353
|
const options = {
|
|
3348
3354
|
lang: this.lang,
|
|
3349
3355
|
captchaInfo: captchaInfoObj,
|
|
@@ -3539,7 +3545,7 @@ class Form extends Container {
|
|
|
3539
3545
|
payload.metadata = {
|
|
3540
3546
|
'draftMetadata': {
|
|
3541
3547
|
'lang': this.lang,
|
|
3542
|
-
'draftId': this.properties
|
|
3548
|
+
'fd:draftId': this.properties['fd:draftId'] || ''
|
|
3543
3549
|
}
|
|
3544
3550
|
};
|
|
3545
3551
|
payload.success = 'custom:saveSuccess';
|
|
@@ -3553,7 +3559,7 @@ class Form extends Container {
|
|
|
3553
3559
|
const draftId = action?.payload?.body?.draftId || '';
|
|
3554
3560
|
const properties = this.properties;
|
|
3555
3561
|
if (draftId && properties) {
|
|
3556
|
-
properties
|
|
3562
|
+
properties['fd:draftId'] = draftId;
|
|
3557
3563
|
}
|
|
3558
3564
|
}
|
|
3559
3565
|
reset() {
|
package/lib/Form.js
CHANGED
|
@@ -156,6 +156,12 @@ class Form extends Container_1.default {
|
|
|
156
156
|
captchaInfoObj[field.qualifiedName] = field.value;
|
|
157
157
|
}
|
|
158
158
|
});
|
|
159
|
+
const draftId = this.properties['fd:draftId'] || '';
|
|
160
|
+
if (draftId) {
|
|
161
|
+
this.setAdditionalSubmitMetadata({
|
|
162
|
+
'fd:draftId': draftId
|
|
163
|
+
});
|
|
164
|
+
}
|
|
159
165
|
const options = Object.assign({ lang: this.lang, captchaInfo: captchaInfoObj }, this.additionalSubmitMetadata);
|
|
160
166
|
return new SubmitMetaData_1.default(options);
|
|
161
167
|
}
|
|
@@ -304,13 +310,12 @@ class Form extends Container_1.default {
|
|
|
304
310
|
}
|
|
305
311
|
}
|
|
306
312
|
save(action, context) {
|
|
307
|
-
var _a;
|
|
308
313
|
const payload = (action === null || action === void 0 ? void 0 : action.payload) || {};
|
|
309
314
|
payload.save_as = 'multipart/form-data';
|
|
310
315
|
payload.metadata = {
|
|
311
316
|
'draftMetadata': {
|
|
312
317
|
'lang': this.lang,
|
|
313
|
-
'draftId':
|
|
318
|
+
'fd:draftId': this.properties['fd:draftId'] || ''
|
|
314
319
|
}
|
|
315
320
|
};
|
|
316
321
|
payload.success = 'custom:saveSuccess';
|
|
@@ -325,7 +330,7 @@ class Form extends Container_1.default {
|
|
|
325
330
|
const draftId = ((_b = (_a = action === null || action === void 0 ? void 0 : action.payload) === null || _a === void 0 ? void 0 : _a.body) === null || _b === void 0 ? void 0 : _b.draftId) || '';
|
|
326
331
|
const properties = this.properties;
|
|
327
332
|
if (draftId && properties) {
|
|
328
|
-
properties
|
|
333
|
+
properties['fd:draftId'] = draftId;
|
|
329
334
|
}
|
|
330
335
|
}
|
|
331
336
|
reset() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.114",
|
|
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.114"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|