@formio/js 5.0.0-dev.5829.167a315 → 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 +13 -13
- package/dist/formio.form.min.js +1 -1
- package/dist/formio.full.js +13 -13
- package/dist/formio.full.min.js +1 -1
- package/dist/formio.js +1 -1
- package/dist/formio.min.js +1 -1
- package/dist/formio.utils.js +10 -10
- package/dist/formio.utils.min.js +1 -1
- package/lib/cjs/Wizard.d.ts +1 -0
- package/lib/cjs/Wizard.js +12 -1
- package/lib/cjs/components/_classes/component/Component.d.ts +0 -5
- package/lib/cjs/components/_classes/component/Component.js +1 -8
- package/lib/cjs/components/textarea/TextArea.js +0 -3
- package/lib/mjs/Wizard.d.ts +1 -0
- package/lib/mjs/Wizard.js +12 -1
- package/lib/mjs/components/_classes/component/Component.d.ts +0 -5
- package/lib/mjs/components/_classes/component/Component.js +1 -8
- package/lib/mjs/components/textarea/TextArea.js +0 -3
- package/package.json +2 -2
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) {
|
|
@@ -881,11 +881,6 @@ declare class Component extends Element {
|
|
|
881
881
|
* @returns {boolean} - If the value changed.
|
|
882
882
|
*/
|
|
883
883
|
setValue(value: any, flags?: any): boolean;
|
|
884
|
-
/**
|
|
885
|
-
* Returns if the value (e.g. array) should be divided between several inputs
|
|
886
|
-
* @returns {boolean}
|
|
887
|
-
*/
|
|
888
|
-
isSingleInputValue(): boolean;
|
|
889
884
|
/**
|
|
890
885
|
* Set the value at a specific index.
|
|
891
886
|
* @param {number} index - The index to set the value at.
|
|
@@ -2586,18 +2586,11 @@ class Component extends Element_1.default {
|
|
|
2586
2586
|
}
|
|
2587
2587
|
for (const i in this.refs.input) {
|
|
2588
2588
|
if (this.refs.input.hasOwnProperty(i)) {
|
|
2589
|
-
this.setValueAt(i, isArray
|
|
2589
|
+
this.setValueAt(i, isArray ? value[i] : value, flags);
|
|
2590
2590
|
}
|
|
2591
2591
|
}
|
|
2592
2592
|
return changed;
|
|
2593
2593
|
}
|
|
2594
|
-
/**
|
|
2595
|
-
* Returns if the value (e.g. array) should be divided between several inputs
|
|
2596
|
-
* @returns {boolean}
|
|
2597
|
-
*/
|
|
2598
|
-
isSingleInputValue() {
|
|
2599
|
-
return false;
|
|
2600
|
-
}
|
|
2601
2594
|
/**
|
|
2602
2595
|
* Set the value at a specific index.
|
|
2603
2596
|
* @param {number} index - The index to set the value at.
|
|
@@ -309,9 +309,6 @@ class TextAreaComponent extends TextField_1.default {
|
|
|
309
309
|
get isJsonValue() {
|
|
310
310
|
return this.component.as && this.component.as === 'json';
|
|
311
311
|
}
|
|
312
|
-
isSingleInputValue() {
|
|
313
|
-
return !this.component.multiple;
|
|
314
|
-
}
|
|
315
312
|
setConvertedValue(value, index) {
|
|
316
313
|
if (this.isJsonValue && !lodash_1.default.isNil(value)) {
|
|
317
314
|
try {
|
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) {
|
|
@@ -881,11 +881,6 @@ declare class Component extends Element {
|
|
|
881
881
|
* @returns {boolean} - If the value changed.
|
|
882
882
|
*/
|
|
883
883
|
setValue(value: any, flags?: any): boolean;
|
|
884
|
-
/**
|
|
885
|
-
* Returns if the value (e.g. array) should be divided between several inputs
|
|
886
|
-
* @returns {boolean}
|
|
887
|
-
*/
|
|
888
|
-
isSingleInputValue(): boolean;
|
|
889
884
|
/**
|
|
890
885
|
* Set the value at a specific index.
|
|
891
886
|
* @param {number} index - The index to set the value at.
|
|
@@ -2552,18 +2552,11 @@ export default class Component extends Element {
|
|
|
2552
2552
|
}
|
|
2553
2553
|
for (const i in this.refs.input) {
|
|
2554
2554
|
if (this.refs.input.hasOwnProperty(i)) {
|
|
2555
|
-
this.setValueAt(i, isArray
|
|
2555
|
+
this.setValueAt(i, isArray ? value[i] : value, flags);
|
|
2556
2556
|
}
|
|
2557
2557
|
}
|
|
2558
2558
|
return changed;
|
|
2559
2559
|
}
|
|
2560
|
-
/**
|
|
2561
|
-
* Returns if the value (e.g. array) should be divided between several inputs
|
|
2562
|
-
* @returns {boolean}
|
|
2563
|
-
*/
|
|
2564
|
-
isSingleInputValue() {
|
|
2565
|
-
return false;
|
|
2566
|
-
}
|
|
2567
2560
|
/**
|
|
2568
2561
|
* Set the value at a specific index.
|
|
2569
2562
|
* @param {number} index - The index to set the value at.
|
|
@@ -304,9 +304,6 @@ export default class TextAreaComponent extends TextFieldComponent {
|
|
|
304
304
|
get isJsonValue() {
|
|
305
305
|
return this.component.as && this.component.as === 'json';
|
|
306
306
|
}
|
|
307
|
-
isSingleInputValue() {
|
|
308
|
-
return !this.component.multiple;
|
|
309
|
-
}
|
|
310
307
|
setConvertedValue(value, index) {
|
|
311
308
|
if (this.isJsonValue && !_.isNil(value)) {
|
|
312
309
|
try {
|
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.5830.bf15879",
|
|
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.146.e57530c",
|
|
86
86
|
"@formio/text-mask-addons": "^3.8.0-formio.2",
|
|
87
87
|
"@formio/vanilla-text-mask": "^5.1.1-formio.1",
|
|
88
88
|
"abortcontroller-polyfill": "^1.7.5",
|