@formio/js 5.0.0-dev.5887.811d065 → 5.0.0-dev.5891.01a1c3a
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/Changelog.md +1 -0
- package/dist/formio.form.js +12 -33
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +0 -2
- package/dist/formio.full.js +12 -33
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +0 -2
- package/dist/formio.js +4 -206
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +0 -2
- package/dist/formio.utils.js +8 -29
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +0 -2
- package/lib/cjs/Webform.js +2 -1
- package/lib/cjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/cjs/components/radio/Radio.js +4 -3
- package/lib/cjs/components/select/Select.js +1 -1
- package/lib/mjs/Webform.js +1 -1
- package/lib/mjs/components/_classes/nested/NestedComponent.js +3 -0
- package/lib/mjs/components/radio/Radio.js +4 -3
- package/lib/mjs/components/select/Select.js +1 -1
- package/package.json +2 -2
|
@@ -20,8 +20,6 @@
|
|
|
20
20
|
|
|
21
21
|
/*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
|
|
22
22
|
|
|
23
|
-
/*! @license DOMPurify 3.1.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.7/LICENSE */
|
|
24
|
-
|
|
25
23
|
/*! formiojs v5.0.0-rc.59 | https://unpkg.com/formiojs@5.0.0-rc.59/LICENSE.txt */
|
|
26
24
|
|
|
27
25
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/lib/cjs/Webform.js
CHANGED
|
@@ -738,7 +738,8 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
738
738
|
this.emit(restoreDraft ? "restoreDraftError" : "saveDraftError", errDetails || errorMessage);
|
|
739
739
|
}
|
|
740
740
|
saveDraft() {
|
|
741
|
-
|
|
741
|
+
var _a;
|
|
742
|
+
if (!this.draftEnabled || ((_a = this.parent) === null || _a === void 0 ? void 0 : _a.component.reference) === false) {
|
|
742
743
|
return;
|
|
743
744
|
}
|
|
744
745
|
if (!this.formio) {
|
|
@@ -693,6 +693,9 @@ class NestedComponent extends Field_1.default {
|
|
|
693
693
|
if (!instance) {
|
|
694
694
|
return;
|
|
695
695
|
}
|
|
696
|
+
if (!instance.component.path) {
|
|
697
|
+
instance.component.path = component.path;
|
|
698
|
+
}
|
|
696
699
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
|
697
700
|
if (instance.processOwnValidation) {
|
|
698
701
|
scope.noRecurse = true;
|
|
@@ -312,12 +312,13 @@ class RadioComponent extends ListComponent_1.default {
|
|
|
312
312
|
.then((response) => {
|
|
313
313
|
this.loading = false;
|
|
314
314
|
this.setItems(response);
|
|
315
|
-
this.optionsLoaded = true;
|
|
316
|
-
this.redraw();
|
|
317
315
|
})
|
|
318
316
|
.catch((err) => {
|
|
319
|
-
this.optionsLoaded = true;
|
|
320
317
|
this.handleLoadingError(err);
|
|
318
|
+
})
|
|
319
|
+
.finally(() => {
|
|
320
|
+
this.optionsLoaded = true;
|
|
321
|
+
this.redraw();
|
|
321
322
|
});
|
|
322
323
|
}
|
|
323
324
|
loadItemsFromMetadata() {
|
|
@@ -1216,7 +1216,7 @@ class SelectComponent extends ListComponent_1.default {
|
|
|
1216
1216
|
}
|
|
1217
1217
|
// Check to see if we need to save off the template data into our metadata.
|
|
1218
1218
|
const templateValue = this.component.reference && (value === null || value === void 0 ? void 0 : value._id) ? value._id.toString() : value;
|
|
1219
|
-
const shouldSaveData = !valueIsObject || this.component.reference;
|
|
1219
|
+
const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
|
|
1220
1220
|
if (!lodash_1.default.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submission)) {
|
|
1221
1221
|
const submission = this.root.submission;
|
|
1222
1222
|
if (!submission.metadata) {
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -742,7 +742,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
742
742
|
this.emit(restoreDraft ? "restoreDraftError" : "saveDraftError", errDetails || errorMessage);
|
|
743
743
|
}
|
|
744
744
|
saveDraft() {
|
|
745
|
-
if (!this.draftEnabled) {
|
|
745
|
+
if (!this.draftEnabled || this.parent?.component.reference === false) {
|
|
746
746
|
return;
|
|
747
747
|
}
|
|
748
748
|
if (!this.formio) {
|
|
@@ -688,6 +688,9 @@ export default class NestedComponent extends Field {
|
|
|
688
688
|
if (!instance) {
|
|
689
689
|
return;
|
|
690
690
|
}
|
|
691
|
+
if (!instance.component.path) {
|
|
692
|
+
instance.component.path = component.path;
|
|
693
|
+
}
|
|
691
694
|
instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
|
|
692
695
|
if (instance.processOwnValidation) {
|
|
693
696
|
scope.noRecurse = true;
|
|
@@ -312,12 +312,13 @@ export default class RadioComponent extends ListComponent {
|
|
|
312
312
|
.then((response) => {
|
|
313
313
|
this.loading = false;
|
|
314
314
|
this.setItems(response);
|
|
315
|
-
this.optionsLoaded = true;
|
|
316
|
-
this.redraw();
|
|
317
315
|
})
|
|
318
316
|
.catch((err) => {
|
|
319
|
-
this.optionsLoaded = true;
|
|
320
317
|
this.handleLoadingError(err);
|
|
318
|
+
})
|
|
319
|
+
.finally(() => {
|
|
320
|
+
this.optionsLoaded = true;
|
|
321
|
+
this.redraw();
|
|
321
322
|
});
|
|
322
323
|
}
|
|
323
324
|
loadItemsFromMetadata() {
|
|
@@ -1244,7 +1244,7 @@ export default class SelectComponent extends ListComponent {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
// Check to see if we need to save off the template data into our metadata.
|
|
1246
1246
|
const templateValue = this.component.reference && value?._id ? value._id.toString() : value;
|
|
1247
|
-
const shouldSaveData = !valueIsObject || this.component.reference;
|
|
1247
|
+
const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
|
|
1248
1248
|
if (!_.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && this.root?.submission) {
|
|
1249
1249
|
const submission = this.root.submission;
|
|
1250
1250
|
if (!submission.metadata) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formio/js",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.5891.01a1c3a",
|
|
4
4
|
"description": "JavaScript powered Forms with JSON Form Builder",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"dependencies": {
|
|
83
83
|
"@formio/bootstrap": "3.0.0-dev.98.17ba6ea",
|
|
84
84
|
"@formio/choices.js": "^10.2.1",
|
|
85
|
-
"@formio/core": "
|
|
85
|
+
"@formio/core": "v2.1.0-dev.174.9a3c6ec",
|
|
86
86
|
"@formio/text-mask-addons": "^3.8.0-formio.3",
|
|
87
87
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
|
88
88
|
"abortcontroller-polyfill": "^1.7.5",
|