@aemforms/af-core 0.22.111 → 0.22.113
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 +9 -3
- package/esm/types/src/types/Json.d.ts +1 -1
- package/lib/Captcha.js +1 -1
- package/lib/Form.js +8 -3
- package/lib/types/Json.d.ts +1 -1
- 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() {
|
|
@@ -4749,7 +4755,7 @@ class Captcha extends Field {
|
|
|
4749
4755
|
super(params, _options);
|
|
4750
4756
|
this._captchaDisplayMode = params.captchaDisplayMode;
|
|
4751
4757
|
this._captchaProvider = params.captchaProvider;
|
|
4752
|
-
this._captchaSiteKey = params.
|
|
4758
|
+
this._captchaSiteKey = params.captchaSiteKey;
|
|
4753
4759
|
}
|
|
4754
4760
|
getDataNode() {
|
|
4755
4761
|
return undefined;
|
|
@@ -104,7 +104,7 @@ export type FieldJson = BaseJson & TranslationFieldJson & {
|
|
|
104
104
|
export type CaptchaJson = FieldJson & {
|
|
105
105
|
captchaDisplayMode?: CaptchaDisplayMode | undefined;
|
|
106
106
|
captchaProvider?: string | undefined;
|
|
107
|
-
|
|
107
|
+
captchaSiteKey?: string | undefined;
|
|
108
108
|
};
|
|
109
109
|
export type ContainerJson = BaseJson & {
|
|
110
110
|
items: Array<FieldJson | ContainerJson>;
|
package/lib/Captcha.js
CHANGED
|
@@ -9,7 +9,7 @@ class Captcha extends Field_1.default {
|
|
|
9
9
|
super(params, _options);
|
|
10
10
|
this._captchaDisplayMode = params.captchaDisplayMode;
|
|
11
11
|
this._captchaProvider = params.captchaProvider;
|
|
12
|
-
this._captchaSiteKey = params.
|
|
12
|
+
this._captchaSiteKey = params.captchaSiteKey;
|
|
13
13
|
}
|
|
14
14
|
getDataNode() {
|
|
15
15
|
return undefined;
|
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/lib/types/Json.d.ts
CHANGED
|
@@ -104,7 +104,7 @@ export declare type FieldJson = BaseJson & TranslationFieldJson & {
|
|
|
104
104
|
export declare type CaptchaJson = FieldJson & {
|
|
105
105
|
captchaDisplayMode?: CaptchaDisplayMode | undefined;
|
|
106
106
|
captchaProvider?: string | undefined;
|
|
107
|
-
|
|
107
|
+
captchaSiteKey?: string | undefined;
|
|
108
108
|
};
|
|
109
109
|
export declare type ContainerJson = BaseJson & {
|
|
110
110
|
items: Array<FieldJson | ContainerJson>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-core",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.113",
|
|
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.113"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/preset-env": "^7.20.2",
|