@formio/js 5.0.0-dev.5809.36e6e3c → 5.0.0-dev.5811.fd4868a

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
@@ -715,7 +715,7 @@ class Wizard extends Webform_1.default {
715
715
  }
716
716
  else {
717
717
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
718
- this.scrollIntoView(this.element, true);
718
+ this.scrollIntoView(this.element);
719
719
  return Promise.reject(this.showErrors(errors, true));
720
720
  }
721
721
  }
@@ -1075,7 +1075,7 @@ declare class Component extends Element {
1075
1075
  */
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
- scrollIntoView(element: any, verticalOnly: any): void;
1078
+ scrollIntoView(element?: any): void;
1079
1079
  focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
@@ -2646,9 +2646,6 @@ class Component extends Element_1.default {
2646
2646
  * @returns {*} - The normalized value.
2647
2647
  */
2648
2648
  normalizeValue(value) {
2649
- if (this.component.multiple && !Array.isArray(value)) {
2650
- value = value ? [value] : [];
2651
- }
2652
2649
  return value;
2653
2650
  }
2654
2651
  /**
@@ -3456,12 +3453,12 @@ class Component extends Element_1.default {
3456
3453
  this.on('render', () => this.focus(), true);
3457
3454
  }
3458
3455
  }
3459
- scrollIntoView(element = this.element, verticalOnly) {
3456
+ scrollIntoView(element = this.element) {
3460
3457
  if (!element) {
3461
3458
  return;
3462
3459
  }
3463
3460
  const { left, top } = element.getBoundingClientRect();
3464
- window.scrollTo(verticalOnly ? window.scrollX : left + window.scrollX, top + window.scrollY);
3461
+ window.scrollTo(left + window.scrollX, top + window.scrollY);
3465
3462
  }
3466
3463
  focus(index) {
3467
3464
  var _a, _b, _c;
@@ -34,6 +34,9 @@ class Multivalue extends Field_1.default {
34
34
  }
35
35
  else {
36
36
  if (Array.isArray(value) && !underlyingValueShouldBeArray) {
37
+ if (core_1.Utils.getModelType(this.component) === 'any') {
38
+ return super.normalizeValue(value, flags);
39
+ }
37
40
  if (this.component.storeas === 'string') {
38
41
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
39
42
  }
package/lib/mjs/Wizard.js CHANGED
@@ -705,7 +705,7 @@ export default class Wizard extends Webform {
705
705
  }
706
706
  else {
707
707
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
708
- this.scrollIntoView(this.element, true);
708
+ this.scrollIntoView(this.element);
709
709
  return Promise.reject(this.showErrors(errors, true));
710
710
  }
711
711
  }
@@ -1075,7 +1075,7 @@ declare class Component extends Element {
1075
1075
  */
1076
1076
  elementInfo(): any;
1077
1077
  autofocus(): void;
1078
- scrollIntoView(element: any, verticalOnly: any): void;
1078
+ scrollIntoView(element?: any): void;
1079
1079
  focus(index: any): void;
1080
1080
  /**
1081
1081
  * Get `Formio` instance for working with files
@@ -2612,9 +2612,6 @@ export default class Component extends Element {
2612
2612
  * @returns {*} - The normalized value.
2613
2613
  */
2614
2614
  normalizeValue(value) {
2615
- if (this.component.multiple && !Array.isArray(value)) {
2616
- value = value ? [value] : [];
2617
- }
2618
2615
  return value;
2619
2616
  }
2620
2617
  /**
@@ -3418,12 +3415,12 @@ export default class Component extends Element {
3418
3415
  this.on('render', () => this.focus(), true);
3419
3416
  }
3420
3417
  }
3421
- scrollIntoView(element = this.element, verticalOnly) {
3418
+ scrollIntoView(element = this.element) {
3422
3419
  if (!element) {
3423
3420
  return;
3424
3421
  }
3425
3422
  const { left, top } = element.getBoundingClientRect();
3426
- window.scrollTo(verticalOnly ? window.scrollX : left + window.scrollX, top + window.scrollY);
3423
+ window.scrollTo(left + window.scrollX, top + window.scrollY);
3427
3424
  }
3428
3425
  focus(index) {
3429
3426
  if ('beforeFocus' in this.parent) {
@@ -29,6 +29,9 @@ export default class Multivalue extends Field {
29
29
  }
30
30
  else {
31
31
  if (Array.isArray(value) && !underlyingValueShouldBeArray) {
32
+ if (Utils.getModelType(this.component) === 'any') {
33
+ return super.normalizeValue(value, flags);
34
+ }
32
35
  if (this.component.storeas === 'string') {
33
36
  return super.normalizeValue(value.join(this.delimiter || ''), flags);
34
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5809.36e6e3c",
3
+ "version": "5.0.0-dev.5811.fd4868a",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {