@formio/js 5.0.0-dev.5913.cb0bb4a → 5.0.0-dev.5917.280d8f5
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 +2 -0
- package/dist/formio.form.js +5 -5
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +5 -5
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Wizard.js +2 -4
- package/lib/cjs/components/_classes/component/Component.js +1 -1
- package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -0
- package/lib/cjs/components/signature/Signature.js +3 -1
- package/lib/mjs/Wizard.js +2 -4
- package/lib/mjs/components/_classes/component/Component.js +1 -1
- package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +1 -1
- package/lib/mjs/components/selectboxes/SelectBoxes.js +1 -0
- package/lib/mjs/components/signature/Signature.js +3 -1
- package/package.json +1 -1
package/lib/cjs/Wizard.js
CHANGED
|
@@ -189,7 +189,7 @@ class Wizard extends Webform_1.default {
|
|
|
189
189
|
const ctx = this.renderContext;
|
|
190
190
|
if (this.component.key) {
|
|
191
191
|
ctx.panels.map(panel => {
|
|
192
|
-
if (panel.key === this.component.key
|
|
192
|
+
if (panel.key === this.component.key) {
|
|
193
193
|
this.currentPanel = panel;
|
|
194
194
|
ctx.wizardPageTooltip = this.getFormattedTooltip(panel.tooltip);
|
|
195
195
|
}
|
|
@@ -876,9 +876,6 @@ class Wizard extends Webform_1.default {
|
|
|
876
876
|
currentPanels = this.pages.map(page => page.component.key);
|
|
877
877
|
this.establishPages();
|
|
878
878
|
panels = this.pages.map(page => page.component.key);
|
|
879
|
-
if (panels.length !== currentPanels.length) {
|
|
880
|
-
this.setPage(this.pages.findIndex(page => page.component.title === this.currentPanel.components[0].label));
|
|
881
|
-
}
|
|
882
879
|
}
|
|
883
880
|
else {
|
|
884
881
|
currentPanels = this.currentPanels || this.pages.map(page => page.component.key);
|
|
@@ -935,6 +932,7 @@ class Wizard extends Webform_1.default {
|
|
|
935
932
|
}
|
|
936
933
|
});
|
|
937
934
|
}
|
|
935
|
+
;
|
|
938
936
|
return super.showErrors(errors, triggerEvent);
|
|
939
937
|
}
|
|
940
938
|
focusOnComponent(key) {
|
|
@@ -2516,7 +2516,7 @@ class Component extends Element_1.default {
|
|
|
2516
2516
|
}
|
|
2517
2517
|
return value;
|
|
2518
2518
|
};
|
|
2519
|
-
if (this.defaultMask) {
|
|
2519
|
+
if (Array.isArray(this.defaultMask) ? this.defaultMask.length > 0 : this.defaultMask) {
|
|
2520
2520
|
if (Array.isArray(defaultValue)) {
|
|
2521
2521
|
defaultValue = defaultValue.map(checkMask);
|
|
2522
2522
|
}
|
|
@@ -27,7 +27,7 @@ exports.default = [
|
|
|
27
27
|
weight: 100,
|
|
28
28
|
type: 'checkbox',
|
|
29
29
|
label: 'Validate When Hidden',
|
|
30
|
-
tooltip: 'Validates the component when it is hidden/conditionally hidden. Vaildation errors are displayed in the error alert on the form submission.',
|
|
30
|
+
tooltip: 'Validates the component when it is hidden/conditionally hidden. Vaildation errors are displayed in the error alert on the form submission. Use caution when enabling this setting, as it can cause a hidden component to be invalid with no way for the form user to correct it.',
|
|
31
31
|
key: 'validateWhenHidden',
|
|
32
32
|
input: true
|
|
33
33
|
},
|
package/lib/mjs/Wizard.js
CHANGED
|
@@ -179,7 +179,7 @@ export default class Wizard extends Webform {
|
|
|
179
179
|
const ctx = this.renderContext;
|
|
180
180
|
if (this.component.key) {
|
|
181
181
|
ctx.panels.map(panel => {
|
|
182
|
-
if (panel.key === this.component.key
|
|
182
|
+
if (panel.key === this.component.key) {
|
|
183
183
|
this.currentPanel = panel;
|
|
184
184
|
ctx.wizardPageTooltip = this.getFormattedTooltip(panel.tooltip);
|
|
185
185
|
}
|
|
@@ -864,9 +864,6 @@ export default class Wizard extends Webform {
|
|
|
864
864
|
currentPanels = this.pages.map(page => page.component.key);
|
|
865
865
|
this.establishPages();
|
|
866
866
|
panels = this.pages.map(page => page.component.key);
|
|
867
|
-
if (panels.length !== currentPanels.length) {
|
|
868
|
-
this.setPage(this.pages.findIndex(page => page.component.title === this.currentPanel.components[0].label));
|
|
869
|
-
}
|
|
870
867
|
}
|
|
871
868
|
else {
|
|
872
869
|
currentPanels = this.currentPanels || this.pages.map(page => page.component.key);
|
|
@@ -922,6 +919,7 @@ export default class Wizard extends Webform {
|
|
|
922
919
|
}
|
|
923
920
|
});
|
|
924
921
|
}
|
|
922
|
+
;
|
|
925
923
|
return super.showErrors(errors, triggerEvent);
|
|
926
924
|
}
|
|
927
925
|
focusOnComponent(key) {
|
|
@@ -2482,7 +2482,7 @@ export default class Component extends Element {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
return value;
|
|
2484
2484
|
};
|
|
2485
|
-
if (this.defaultMask) {
|
|
2485
|
+
if (Array.isArray(this.defaultMask) ? this.defaultMask.length > 0 : this.defaultMask) {
|
|
2486
2486
|
if (Array.isArray(defaultValue)) {
|
|
2487
2487
|
defaultValue = defaultValue.map(checkMask);
|
|
2488
2488
|
}
|
|
@@ -22,7 +22,7 @@ export default [
|
|
|
22
22
|
weight: 100,
|
|
23
23
|
type: 'checkbox',
|
|
24
24
|
label: 'Validate When Hidden',
|
|
25
|
-
tooltip: 'Validates the component when it is hidden/conditionally hidden. Vaildation errors are displayed in the error alert on the form submission.',
|
|
25
|
+
tooltip: 'Validates the component when it is hidden/conditionally hidden. Vaildation errors are displayed in the error alert on the form submission. Use caution when enabling this setting, as it can cause a hidden component to be invalid with no way for the form user to correct it.',
|
|
26
26
|
key: 'validateWhenHidden',
|
|
27
27
|
input: true
|
|
28
28
|
},
|
|
@@ -156,7 +156,9 @@ export default class SignatureComponent extends Input {
|
|
|
156
156
|
if (this.dataValue) {
|
|
157
157
|
this.setDataToSigaturePad();
|
|
158
158
|
}
|
|
159
|
-
this.
|
|
159
|
+
if (!this.disabled) {
|
|
160
|
+
this.showCanvas(true);
|
|
161
|
+
}
|
|
160
162
|
}
|
|
161
163
|
}
|
|
162
164
|
renderElement(value, index) {
|