@formio/js 5.1.0-dev.5981.6282823 → 5.1.0-dev.5982.b1aad89
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/lib/cjs/Wizard.js +1 -1
- package/lib/cjs/components/form/Form.js +5 -15
- package/lib/cjs/widgets/CalendarWidget.js +0 -14
- package/lib/mjs/Wizard.js +1 -1
- package/lib/mjs/components/form/Form.js +5 -15
- package/lib/mjs/widgets/CalendarWidget.js +0 -14
- 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();
|
671
671
|
return Promise.all(pages.map((page) => {
|
672
672
|
page.options.beforeSubmit = true;
|
673
673
|
return page.beforeSubmit();
|
@@ -587,21 +587,11 @@ 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
|
-
|
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
|
-
}
|
590
|
+
return this.submitSubForm(false)
|
591
|
+
.then(() => {
|
592
|
+
return this.dataValue;
|
593
|
+
})
|
594
|
+
.then(() => super.beforeSubmit());
|
605
595
|
}
|
606
596
|
isSubFormLazyLoad() {
|
607
597
|
var _a, _b;
|
@@ -93,8 +93,6 @@ class CalendarWidget extends InputWidget_1.default {
|
|
93
93
|
this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';
|
94
94
|
this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';
|
95
95
|
this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';
|
96
|
-
this.settings.wasDefaultValueChanged = false;
|
97
|
-
this.settings.defaultValue = '';
|
98
96
|
this.settings.manualInputValue = '';
|
99
97
|
this.settings.isManuallyOverriddenValue = false;
|
100
98
|
this.settings.currentValue = '';
|
@@ -115,10 +113,6 @@ class CalendarWidget extends InputWidget_1.default {
|
|
115
113
|
this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
|
116
114
|
this.emit('update');
|
117
115
|
}
|
118
|
-
if (this.settings.wasDefaultValueChanged) {
|
119
|
-
this.calendar._input.value = this.settings.defaultValue;
|
120
|
-
this.settings.wasDefaultValueChanged = false;
|
121
|
-
}
|
122
116
|
if (this.calendar) {
|
123
117
|
this.emit('blur');
|
124
118
|
}
|
@@ -360,14 +354,6 @@ class CalendarWidget extends InputWidget_1.default {
|
|
360
354
|
this.settings.currentValue = event.target.value;
|
361
355
|
this.emit('update');
|
362
356
|
}
|
363
|
-
if (event.target.value === '' && this.calendar.selectedDates.length > 0) {
|
364
|
-
this.settings.wasDefaultValueChanged = true;
|
365
|
-
this.settings.defaultValue = event.target.value;
|
366
|
-
this.calendar.clear();
|
367
|
-
}
|
368
|
-
else {
|
369
|
-
this.settings.wasDefaultValueChanged = false;
|
370
|
-
}
|
371
357
|
});
|
372
358
|
if (this.calendar.daysContainer) {
|
373
359
|
this.calendar.daysContainer.addEventListener('click', () => {
|
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();
|
661
661
|
return Promise.all(pages.map((page) => {
|
662
662
|
page.options.beforeSubmit = true;
|
663
663
|
return page.beforeSubmit();
|
@@ -580,21 +580,11 @@ 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
|
-
|
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
|
-
}
|
583
|
+
return this.submitSubForm(false)
|
584
|
+
.then(() => {
|
585
|
+
return this.dataValue;
|
586
|
+
})
|
587
|
+
.then(() => super.beforeSubmit());
|
598
588
|
}
|
599
589
|
isSubFormLazyLoad() {
|
600
590
|
return this.root?._form?.display === 'wizard' && this.component.lazyLoad;
|
@@ -87,8 +87,6 @@ export default class CalendarWidget extends InputWidget {
|
|
87
87
|
this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';
|
88
88
|
this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';
|
89
89
|
this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';
|
90
|
-
this.settings.wasDefaultValueChanged = false;
|
91
|
-
this.settings.defaultValue = '';
|
92
90
|
this.settings.manualInputValue = '';
|
93
91
|
this.settings.isManuallyOverriddenValue = false;
|
94
92
|
this.settings.currentValue = '';
|
@@ -109,10 +107,6 @@ export default class CalendarWidget extends InputWidget {
|
|
109
107
|
this.calendar._input.value = this.settings.isManuallyOverriddenValue ? this.settings.manualInputValue : this.calendar.altInput.value;
|
110
108
|
this.emit('update');
|
111
109
|
}
|
112
|
-
if (this.settings.wasDefaultValueChanged) {
|
113
|
-
this.calendar._input.value = this.settings.defaultValue;
|
114
|
-
this.settings.wasDefaultValueChanged = false;
|
115
|
-
}
|
116
110
|
if (this.calendar) {
|
117
111
|
this.emit('blur');
|
118
112
|
}
|
@@ -351,14 +345,6 @@ export default class CalendarWidget extends InputWidget {
|
|
351
345
|
this.settings.currentValue = event.target.value;
|
352
346
|
this.emit('update');
|
353
347
|
}
|
354
|
-
if (event.target.value === '' && this.calendar.selectedDates.length > 0) {
|
355
|
-
this.settings.wasDefaultValueChanged = true;
|
356
|
-
this.settings.defaultValue = event.target.value;
|
357
|
-
this.calendar.clear();
|
358
|
-
}
|
359
|
-
else {
|
360
|
-
this.settings.wasDefaultValueChanged = false;
|
361
|
-
}
|
362
348
|
});
|
363
349
|
if (this.calendar.daysContainer) {
|
364
350
|
this.calendar.daysContainer.addEventListener('click', () => {
|