@formio/js 5.1.0-dev.5979.96c77b0 → 5.1.0-dev.5981.6282823
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 +3 -3
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +3 -3
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/form/Form.js +15 -5
- package/lib/cjs/providers/address/GoogleAddressProvider.js +1 -1
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/form/Form.js +15 -5
- package/lib/mjs/providers/address/GoogleAddressProvider.js +1 -1
- package/package.json +1 -1
package/lib/cjs/Wizard.js
CHANGED
@@ -667,7 +667,7 @@ class Wizard extends Webform_1.default {
|
|
667
667
|
return this.page - 1;
|
668
668
|
}
|
669
669
|
beforeSubmit() {
|
670
|
-
const pages = this.getPages();
|
670
|
+
const pages = this.getPages({ all: true });
|
671
671
|
return Promise.all(pages.map((page) => {
|
672
672
|
page.options.beforeSubmit = true;
|
673
673
|
return page.beforeSubmit();
|
@@ -587,11 +587,21 @@ class FormComponent extends Component_1.default {
|
|
587
587
|
this.dataValue = submission;
|
588
588
|
return Promise.resolve(this.dataValue);
|
589
589
|
}
|
590
|
-
|
591
|
-
.
|
592
|
-
|
593
|
-
|
594
|
-
|
590
|
+
if (this.isSubFormLazyLoad() && !this.subFormLoading) {
|
591
|
+
return this.createSubForm(true)
|
592
|
+
.then(this.submitSubForm(false))
|
593
|
+
.then(() => {
|
594
|
+
return this.dataValue;
|
595
|
+
})
|
596
|
+
.then(() => super.beforeSubmit());
|
597
|
+
}
|
598
|
+
else {
|
599
|
+
return this.submitSubForm(false)
|
600
|
+
.then(() => {
|
601
|
+
return this.dataValue;
|
602
|
+
})
|
603
|
+
.then(() => super.beforeSubmit());
|
604
|
+
}
|
595
605
|
}
|
596
606
|
isSubFormLazyLoad() {
|
597
607
|
var _a, _b;
|
@@ -195,7 +195,7 @@ class GoogleAddressProvider extends AddressProvider_1.AddressProvider {
|
|
195
195
|
*/
|
196
196
|
tryRemoveLibrary(options = {}) {
|
197
197
|
var _a, _b, _c;
|
198
|
-
if (!Formio_1.Formio.libraries[this.getLibraryName()]
|
198
|
+
if (!Formio_1.Formio.libraries[this.getLibraryName()]) {
|
199
199
|
return;
|
200
200
|
}
|
201
201
|
const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|
package/lib/mjs/Wizard.js
CHANGED
@@ -657,7 +657,7 @@ export default class Wizard extends Webform {
|
|
657
657
|
return this.page - 1;
|
658
658
|
}
|
659
659
|
beforeSubmit() {
|
660
|
-
const pages = this.getPages();
|
660
|
+
const pages = this.getPages({ all: true });
|
661
661
|
return Promise.all(pages.map((page) => {
|
662
662
|
page.options.beforeSubmit = true;
|
663
663
|
return page.beforeSubmit();
|
@@ -580,11 +580,21 @@ export default class FormComponent extends Component {
|
|
580
580
|
this.dataValue = submission;
|
581
581
|
return Promise.resolve(this.dataValue);
|
582
582
|
}
|
583
|
-
|
584
|
-
.
|
585
|
-
|
586
|
-
|
587
|
-
|
583
|
+
if (this.isSubFormLazyLoad() && !this.subFormLoading) {
|
584
|
+
return this.createSubForm(true)
|
585
|
+
.then(this.submitSubForm(false))
|
586
|
+
.then(() => {
|
587
|
+
return this.dataValue;
|
588
|
+
})
|
589
|
+
.then(() => super.beforeSubmit());
|
590
|
+
}
|
591
|
+
else {
|
592
|
+
return this.submitSubForm(false)
|
593
|
+
.then(() => {
|
594
|
+
return this.dataValue;
|
595
|
+
})
|
596
|
+
.then(() => super.beforeSubmit());
|
597
|
+
}
|
588
598
|
}
|
589
599
|
isSubFormLazyLoad() {
|
590
600
|
return this.root?._form?.display === 'wizard' && this.component.lazyLoad;
|
@@ -187,7 +187,7 @@ export class GoogleAddressProvider extends AddressProvider {
|
|
187
187
|
* @param {ProviderOptions} options - The options for the provider.
|
188
188
|
*/
|
189
189
|
tryRemoveLibrary(options = {}) {
|
190
|
-
if (!Formio.libraries[this.getLibraryName()]
|
190
|
+
if (!Formio.libraries[this.getLibraryName()]) {
|
191
191
|
return;
|
192
192
|
}
|
193
193
|
const existingScript = document.querySelector(`script[src^="${GOOGLE_MAPS_JS_URL}"]`);
|