@formio/js 5.0.0-dev.5593.4f4b210 → 5.0.0-dev.5595.8e56e8f
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/dist/formio.form.js +1 -1
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Webform.js +5 -12
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +5 -0
- package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +3 -0
- package/lib/mjs/Webform.js +5 -12
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +5 -0
- package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +3 -0
- package/package.json +1 -1
package/lib/cjs/Webform.js
CHANGED
|
@@ -291,19 +291,12 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
291
291
|
// Set language after everything is established.
|
|
292
292
|
this.language = this.i18next.language;
|
|
293
293
|
// See if we need to restore the draft from a user.
|
|
294
|
-
if (this.options.saveDraft) {
|
|
294
|
+
if (this.options.saveDraft && !this.options.skipDraftRestore) {
|
|
295
295
|
this.formReady.then(() => {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
this.restoreDraft(user._id);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
// Enable drafts
|
|
305
|
-
this.draftEnabled = true;
|
|
306
|
-
this.savingDraft = false;
|
|
296
|
+
const user = Formio_1.Formio.getUser();
|
|
297
|
+
// Only restore a draft if the submission isn't explicitly set.
|
|
298
|
+
if (user && !this.submissionSet) {
|
|
299
|
+
this.restoreDraft(user._id);
|
|
307
300
|
}
|
|
308
301
|
});
|
|
309
302
|
}
|
|
@@ -7,6 +7,9 @@ declare const _default: ({
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
|
+
validate: {
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
10
13
|
weight: number;
|
|
11
14
|
input?: undefined;
|
|
12
15
|
dataSrc?: undefined;
|
|
@@ -28,6 +31,7 @@ declare const _default: ({
|
|
|
28
31
|
custom(context: any): any[];
|
|
29
32
|
};
|
|
30
33
|
values?: undefined;
|
|
34
|
+
validate?: undefined;
|
|
31
35
|
ignore?: undefined;
|
|
32
36
|
} | {
|
|
33
37
|
key: string;
|
|
@@ -36,6 +40,7 @@ declare const _default: ({
|
|
|
36
40
|
tooltip?: undefined;
|
|
37
41
|
type?: undefined;
|
|
38
42
|
values?: undefined;
|
|
43
|
+
validate?: undefined;
|
|
39
44
|
weight?: undefined;
|
|
40
45
|
input?: undefined;
|
|
41
46
|
dataSrc?: undefined;
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -263,19 +263,12 @@ export default class Webform extends NestedDataComponent {
|
|
|
263
263
|
// Set language after everything is established.
|
|
264
264
|
this.language = this.i18next.language;
|
|
265
265
|
// See if we need to restore the draft from a user.
|
|
266
|
-
if (this.options.saveDraft) {
|
|
266
|
+
if (this.options.saveDraft && !this.options.skipDraftRestore) {
|
|
267
267
|
this.formReady.then(() => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
this.restoreDraft(user._id);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
else {
|
|
276
|
-
// Enable drafts
|
|
277
|
-
this.draftEnabled = true;
|
|
278
|
-
this.savingDraft = false;
|
|
268
|
+
const user = Formio.getUser();
|
|
269
|
+
// Only restore a draft if the submission isn't explicitly set.
|
|
270
|
+
if (user && !this.submissionSet) {
|
|
271
|
+
this.restoreDraft(user._id);
|
|
279
272
|
}
|
|
280
273
|
});
|
|
281
274
|
}
|
|
@@ -7,6 +7,9 @@ declare const _default: ({
|
|
|
7
7
|
label: string;
|
|
8
8
|
value: string;
|
|
9
9
|
}[];
|
|
10
|
+
validate: {
|
|
11
|
+
required: boolean;
|
|
12
|
+
};
|
|
10
13
|
weight: number;
|
|
11
14
|
input?: undefined;
|
|
12
15
|
dataSrc?: undefined;
|
|
@@ -28,6 +31,7 @@ declare const _default: ({
|
|
|
28
31
|
custom(context: any): any[];
|
|
29
32
|
};
|
|
30
33
|
values?: undefined;
|
|
34
|
+
validate?: undefined;
|
|
31
35
|
ignore?: undefined;
|
|
32
36
|
} | {
|
|
33
37
|
key: string;
|
|
@@ -36,6 +40,7 @@ declare const _default: ({
|
|
|
36
40
|
tooltip?: undefined;
|
|
37
41
|
type?: undefined;
|
|
38
42
|
values?: undefined;
|
|
43
|
+
validate?: undefined;
|
|
39
44
|
weight?: undefined;
|
|
40
45
|
input?: undefined;
|
|
41
46
|
dataSrc?: undefined;
|