@formio/js 5.0.0-dev.5912.590e895 → 5.0.0-dev.5913.cb0bb4a
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 +46 -24
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.form.min.js.LICENSE.txt +2 -0
- package/dist/formio.full.js +46 -24
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.full.min.js.LICENSE.txt +2 -0
- package/dist/formio.js +207 -4
- package/dist/formio.min.js +1 -1
- package/dist/formio.min.js.LICENSE.txt +2 -0
- package/dist/formio.utils.js +42 -20
- package/dist/formio.utils.min.js +1 -1
- package/dist/formio.utils.min.js.LICENSE.txt +2 -0
- package/lib/cjs/Wizard.js +4 -2
- package/lib/cjs/components/_classes/component/Component.js +8 -7
- package/lib/cjs/components/selectboxes/SelectBoxes.js +0 -1
- package/lib/cjs/components/signature/Signature.js +1 -3
- package/lib/mjs/Wizard.js +4 -2
- package/lib/mjs/components/_classes/component/Component.js +8 -7
- package/lib/mjs/components/selectboxes/SelectBoxes.js +0 -1
- package/lib/mjs/components/signature/Signature.js +1 -3
- package/package.json +2 -2
|
@@ -20,6 +20,8 @@
|
|
|
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.2.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.0/LICENSE */
|
|
24
|
+
|
|
23
25
|
/*! formiojs v5.0.0-rc.59 | https://unpkg.com/formiojs@5.0.0-rc.59/LICENSE.txt */
|
|
24
26
|
|
|
25
27
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
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 && panel.title === this.component.title) {
|
|
193
193
|
this.currentPanel = panel;
|
|
194
194
|
ctx.wizardPageTooltip = this.getFormattedTooltip(panel.tooltip);
|
|
195
195
|
}
|
|
@@ -876,6 +876,9 @@ 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
|
+
}
|
|
879
882
|
}
|
|
880
883
|
else {
|
|
881
884
|
currentPanels = this.currentPanels || this.pages.map(page => page.component.key);
|
|
@@ -932,7 +935,6 @@ class Wizard extends Webform_1.default {
|
|
|
932
935
|
}
|
|
933
936
|
});
|
|
934
937
|
}
|
|
935
|
-
;
|
|
936
938
|
return super.showErrors(errors, triggerEvent);
|
|
937
939
|
}
|
|
938
940
|
focusOnComponent(key) {
|
|
@@ -3252,12 +3252,6 @@ class Component extends Element_1.default {
|
|
|
3252
3252
|
return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));
|
|
3253
3253
|
}
|
|
3254
3254
|
shouldSkipValidation(data, row, flags = {}) {
|
|
3255
|
-
const { validateWhenHidden = false } = this.component || {};
|
|
3256
|
-
const forceValidOnHidden = (!this.visible || !this.checkCondition(row, data)) && !validateWhenHidden;
|
|
3257
|
-
if (forceValidOnHidden) {
|
|
3258
|
-
// If this component is forced valid when it is hidden, then we also need to reset the errors for this component.
|
|
3259
|
-
this._errors = [];
|
|
3260
|
-
}
|
|
3261
3255
|
const rules = [
|
|
3262
3256
|
// Do not validate if the flags say not too.
|
|
3263
3257
|
() => flags.noValidate,
|
|
@@ -3268,7 +3262,14 @@ class Component extends Element_1.default {
|
|
|
3268
3262
|
// Check to see if we are editing and if so, check component persistence.
|
|
3269
3263
|
() => this.isValueHidden(),
|
|
3270
3264
|
// Force valid if component is hidden.
|
|
3271
|
-
() =>
|
|
3265
|
+
() => {
|
|
3266
|
+
if (!this.component.validateWhenHidden && (!this.visible || !this.checkCondition(row, data))) {
|
|
3267
|
+
// If this component is forced valid when it is hidden, then we also need to reset the errors for this component.
|
|
3268
|
+
this._errors = [];
|
|
3269
|
+
return true;
|
|
3270
|
+
}
|
|
3271
|
+
return false;
|
|
3272
|
+
}
|
|
3272
3273
|
];
|
|
3273
3274
|
return rules.some(pred => pred());
|
|
3274
3275
|
}
|
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 && panel.title === this.component.title) {
|
|
183
183
|
this.currentPanel = panel;
|
|
184
184
|
ctx.wizardPageTooltip = this.getFormattedTooltip(panel.tooltip);
|
|
185
185
|
}
|
|
@@ -864,6 +864,9 @@ 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
|
+
}
|
|
867
870
|
}
|
|
868
871
|
else {
|
|
869
872
|
currentPanels = this.currentPanels || this.pages.map(page => page.component.key);
|
|
@@ -919,7 +922,6 @@ export default class Wizard extends Webform {
|
|
|
919
922
|
}
|
|
920
923
|
});
|
|
921
924
|
}
|
|
922
|
-
;
|
|
923
925
|
return super.showErrors(errors, triggerEvent);
|
|
924
926
|
}
|
|
925
927
|
focusOnComponent(key) {
|
|
@@ -3214,12 +3214,6 @@ export default class Component extends Element {
|
|
|
3214
3214
|
return (this.component.protected || !this.component.persistent || (this.component.persistent === 'client-only'));
|
|
3215
3215
|
}
|
|
3216
3216
|
shouldSkipValidation(data, row, flags = {}) {
|
|
3217
|
-
const { validateWhenHidden = false } = this.component || {};
|
|
3218
|
-
const forceValidOnHidden = (!this.visible || !this.checkCondition(row, data)) && !validateWhenHidden;
|
|
3219
|
-
if (forceValidOnHidden) {
|
|
3220
|
-
// If this component is forced valid when it is hidden, then we also need to reset the errors for this component.
|
|
3221
|
-
this._errors = [];
|
|
3222
|
-
}
|
|
3223
3217
|
const rules = [
|
|
3224
3218
|
// Do not validate if the flags say not too.
|
|
3225
3219
|
() => flags.noValidate,
|
|
@@ -3230,7 +3224,14 @@ export default class Component extends Element {
|
|
|
3230
3224
|
// Check to see if we are editing and if so, check component persistence.
|
|
3231
3225
|
() => this.isValueHidden(),
|
|
3232
3226
|
// Force valid if component is hidden.
|
|
3233
|
-
() =>
|
|
3227
|
+
() => {
|
|
3228
|
+
if (!this.component.validateWhenHidden && (!this.visible || !this.checkCondition(row, data))) {
|
|
3229
|
+
// If this component is forced valid when it is hidden, then we also need to reset the errors for this component.
|
|
3230
|
+
this._errors = [];
|
|
3231
|
+
return true;
|
|
3232
|
+
}
|
|
3233
|
+
return false;
|
|
3234
|
+
}
|
|
3234
3235
|
];
|
|
3235
3236
|
return rules.some(pred => pred());
|
|
3236
3237
|
}
|
|
@@ -156,9 +156,7 @@ export default class SignatureComponent extends Input {
|
|
|
156
156
|
if (this.dataValue) {
|
|
157
157
|
this.setDataToSigaturePad();
|
|
158
158
|
}
|
|
159
|
-
|
|
160
|
-
this.showCanvas(true);
|
|
161
|
-
}
|
|
159
|
+
this.showCanvas(true);
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
renderElement(value, index) {
|
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.5913.cb0bb4a",
|
|
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": "2.1.0-dev.191.8c609ab",
|
|
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",
|