@formio/js 5.0.0-dev.5826.02fa4d9 → 5.0.0-dev.5830.bf15879
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 +2 -2
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +2 -2
- package/dist/formio.full.min.js +1 -1
- package/lib/cjs/Webform.js +1 -1
- package/lib/cjs/Wizard.d.ts +1 -0
- package/lib/cjs/Wizard.js +12 -1
- package/lib/mjs/Webform.js +1 -1
- package/lib/mjs/Wizard.d.ts +1 -0
- package/lib/mjs/Wizard.js +12 -1
- package/package.json +1 -1
package/lib/cjs/Webform.js
CHANGED
|
@@ -1253,7 +1253,7 @@ class Webform extends NestedDataComponent_1.default {
|
|
|
1253
1253
|
const errors = shouldValidate
|
|
1254
1254
|
? this.validate(value.data, Object.assign(Object.assign({}, flags), { noValidate: false, process: 'change' }))
|
|
1255
1255
|
: [];
|
|
1256
|
-
value.isValid =
|
|
1256
|
+
value.isValid = errors.length === 0;
|
|
1257
1257
|
this.loading = false;
|
|
1258
1258
|
if (this.submitted) {
|
|
1259
1259
|
// show server errors while they are not cleaned/fixed
|
package/lib/cjs/Wizard.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ declare class Wizard extends Webform {
|
|
|
105
105
|
pageId(page: any): any;
|
|
106
106
|
onChange(flags: any, changed: any, modified: any, changes: any): void;
|
|
107
107
|
checkValidity(data: any, dirty: any, row: any, currentPageOnly: any, childErrors?: any[]): any;
|
|
108
|
+
showErrors(errors: any, triggerEvent: any): void | any[];
|
|
108
109
|
focusOnComponent(key: any): void | Promise<void>;
|
|
109
110
|
}
|
|
110
111
|
declare namespace Wizard {
|
package/lib/cjs/Wizard.js
CHANGED
|
@@ -924,6 +924,17 @@ class Wizard extends Webform_1.default {
|
|
|
924
924
|
}
|
|
925
925
|
return super.errors;
|
|
926
926
|
}
|
|
927
|
+
showErrors(errors, triggerEvent) {
|
|
928
|
+
if (this.hasExtraPages) {
|
|
929
|
+
this.subWizards.forEach((subWizard) => {
|
|
930
|
+
if (Array.isArray(subWizard.errors)) {
|
|
931
|
+
errors = [...errors, ...subWizard.errors];
|
|
932
|
+
}
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
;
|
|
936
|
+
return super.showErrors(errors, triggerEvent);
|
|
937
|
+
}
|
|
927
938
|
focusOnComponent(key) {
|
|
928
939
|
const component = this.getComponent(key);
|
|
929
940
|
if (component) {
|
|
@@ -931,7 +942,7 @@ class Wizard extends Webform_1.default {
|
|
|
931
942
|
while (!(topPanel.parent instanceof Wizard)) {
|
|
932
943
|
topPanel = topPanel.parent;
|
|
933
944
|
}
|
|
934
|
-
const pageIndex = this.pages.findIndex(page => page === topPanel);
|
|
945
|
+
const pageIndex = this.pages.findIndex(page => page.id === topPanel.id);
|
|
935
946
|
if (pageIndex >= 0) {
|
|
936
947
|
const page = this.pages[pageIndex];
|
|
937
948
|
if (page && page !== this.currentPage) {
|
package/lib/mjs/Webform.js
CHANGED
|
@@ -1259,7 +1259,7 @@ export default class Webform extends NestedDataComponent {
|
|
|
1259
1259
|
process: 'change'
|
|
1260
1260
|
})
|
|
1261
1261
|
: [];
|
|
1262
|
-
value.isValid =
|
|
1262
|
+
value.isValid = errors.length === 0;
|
|
1263
1263
|
this.loading = false;
|
|
1264
1264
|
if (this.submitted) {
|
|
1265
1265
|
// show server errors while they are not cleaned/fixed
|
package/lib/mjs/Wizard.d.ts
CHANGED
|
@@ -105,6 +105,7 @@ declare class Wizard extends Webform {
|
|
|
105
105
|
pageId(page: any): any;
|
|
106
106
|
onChange(flags: any, changed: any, modified: any, changes: any): void;
|
|
107
107
|
checkValidity(data: any, dirty: any, row: any, currentPageOnly: any, childErrors?: any[]): any;
|
|
108
|
+
showErrors(errors: any, triggerEvent: any): void | any[];
|
|
108
109
|
focusOnComponent(key: any): void | Promise<void>;
|
|
109
110
|
}
|
|
110
111
|
declare namespace Wizard {
|
package/lib/mjs/Wizard.js
CHANGED
|
@@ -911,6 +911,17 @@ export default class Wizard extends Webform {
|
|
|
911
911
|
}
|
|
912
912
|
return super.errors;
|
|
913
913
|
}
|
|
914
|
+
showErrors(errors, triggerEvent) {
|
|
915
|
+
if (this.hasExtraPages) {
|
|
916
|
+
this.subWizards.forEach((subWizard) => {
|
|
917
|
+
if (Array.isArray(subWizard.errors)) {
|
|
918
|
+
errors = [...errors, ...subWizard.errors];
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
;
|
|
923
|
+
return super.showErrors(errors, triggerEvent);
|
|
924
|
+
}
|
|
914
925
|
focusOnComponent(key) {
|
|
915
926
|
const component = this.getComponent(key);
|
|
916
927
|
if (component) {
|
|
@@ -918,7 +929,7 @@ export default class Wizard extends Webform {
|
|
|
918
929
|
while (!(topPanel.parent instanceof Wizard)) {
|
|
919
930
|
topPanel = topPanel.parent;
|
|
920
931
|
}
|
|
921
|
-
const pageIndex = this.pages.findIndex(page => page === topPanel);
|
|
932
|
+
const pageIndex = this.pages.findIndex(page => page.id === topPanel.id);
|
|
922
933
|
if (pageIndex >= 0) {
|
|
923
934
|
const page = this.pages[pageIndex];
|
|
924
935
|
if (page && page !== this.currentPage) {
|