@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/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 && panel.title === this.component.title) {
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
  },
@@ -267,6 +267,7 @@ class SelectBoxesComponent extends Radio_1.default {
267
267
  else {
268
268
  return super.setCustomValidity(messages, dirty, external);
269
269
  }
270
+ ;
270
271
  }
271
272
  validateValueAvailability(setting, value) {
272
273
  if (!(0, utils_1.boolValue)(setting) || !value) {
@@ -159,7 +159,9 @@ class SignatureComponent extends Input_1.default {
159
159
  if (this.dataValue) {
160
160
  this.setDataToSigaturePad();
161
161
  }
162
- this.showCanvas(true);
162
+ if (!this.disabled) {
163
+ this.showCanvas(true);
164
+ }
163
165
  }
164
166
  }
165
167
  renderElement(value, index) {
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 && panel.title === this.component.title) {
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
  },
@@ -268,6 +268,7 @@ export default class SelectBoxesComponent extends RadioComponent {
268
268
  else {
269
269
  return super.setCustomValidity(messages, dirty, external);
270
270
  }
271
+ ;
271
272
  }
272
273
  validateValueAvailability(setting, value) {
273
274
  if (!boolValue(setting) || !value) {
@@ -156,7 +156,9 @@ export default class SignatureComponent extends Input {
156
156
  if (this.dataValue) {
157
157
  this.setDataToSigaturePad();
158
158
  }
159
- this.showCanvas(true);
159
+ if (!this.disabled) {
160
+ this.showCanvas(true);
161
+ }
160
162
  }
161
163
  }
162
164
  renderElement(value, index) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5913.cb0bb4a",
3
+ "version": "5.0.0-dev.5917.280d8f5",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {