@formio/js 5.0.0-dev.5913.cb0bb4a → 5.0.0-dev.5915.7385833
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 +4 -4
- 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/WebformBuilder.js +1 -0
- package/lib/cjs/Wizard.js +2 -4
- package/lib/cjs/components/_classes/component/Component.js +1 -1
- package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -0
- package/lib/cjs/components/signature/Signature.js +3 -1
- package/lib/mjs/WebformBuilder.js +1 -0
- package/lib/mjs/Wizard.js +2 -4
- package/lib/mjs/components/_classes/component/Component.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
|
@@ -1188,6 +1188,7 @@ class WebformBuilder extends Component_1.default {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
const rebuild = parentComponent.rebuild() || Promise.resolve();
|
|
1190
1190
|
return rebuild.then(() => {
|
|
1191
|
+
parentComponent.resetValue();
|
|
1191
1192
|
const schema = parentContainer ? parentContainer[index] : (comp ? comp.schema : []);
|
|
1192
1193
|
this.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);
|
|
1193
1194
|
this.emit('change', this.form);
|
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
|
}
|
|
@@ -1172,6 +1172,7 @@ export default class WebformBuilder extends Component {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
const rebuild = parentComponent.rebuild() || Promise.resolve();
|
|
1174
1174
|
return rebuild.then(() => {
|
|
1175
|
+
parentComponent.resetValue();
|
|
1175
1176
|
const schema = parentContainer ? parentContainer[index] : (comp ? comp.schema : []);
|
|
1176
1177
|
this.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);
|
|
1177
1178
|
this.emit('change', this.form);
|
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
|
}
|
|
@@ -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) {
|