@formio/js 5.0.0-dev.5713.ee12658 → 5.0.0-dev.5717.a2aa09f

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.
@@ -211,11 +211,12 @@ export default class NestedComponent extends Field {
211
211
  calculateValue(data: any, flags: any, row: any): any;
212
212
  isLastPage(): boolean;
213
213
  isValid(data: any, dirty: any): any;
214
- validationProcessor({ scope, data, row, instance }: {
214
+ validationProcessor({ scope, data, row, instance, component }: {
215
215
  scope: any;
216
216
  data: any;
217
217
  row: any;
218
218
  instance: any;
219
+ component: any;
219
220
  }, flags: any): void;
220
221
  /**
221
222
  * Perform a validation on all child components of this nested component.
@@ -681,8 +681,11 @@ class NestedComponent extends Field_1.default {
681
681
  isValid(data, dirty) {
682
682
  return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));
683
683
  }
684
- validationProcessor({ scope, data, row, instance }, flags) {
684
+ validationProcessor({ scope, data, row, instance, component }, flags) {
685
685
  const { dirty } = flags;
686
+ if (this.root.hasExtraPages && this.page !== this.root.page) {
687
+ instance = this.getComponentById(component.id);
688
+ }
686
689
  if (!instance) {
687
690
  return;
688
691
  }
@@ -5,36 +5,6 @@ declare const _default: ({
5
5
  key: string;
6
6
  label: string;
7
7
  tooltip: string;
8
- conditional?: undefined;
9
- defaultValue?: undefined;
10
- ignore?: undefined;
11
- } | {
12
- type: string;
13
- input: boolean;
14
- weight: number;
15
- key: string;
16
- label: string;
17
- conditional: {
18
- show: boolean;
19
- conjunction: string;
20
- conditions: {
21
- component: string;
22
- operator: string;
23
- value: boolean;
24
- }[];
25
- };
26
- defaultValue: string;
27
- tooltip?: undefined;
28
- ignore?: undefined;
29
- } | {
30
- type: string;
31
- input: boolean;
32
- weight: number;
33
- key: string;
34
- label: string;
35
- defaultValue: string;
36
- tooltip?: undefined;
37
- conditional?: undefined;
38
8
  ignore?: undefined;
39
9
  } | {
40
10
  key: string;
@@ -44,7 +14,5 @@ declare const _default: ({
44
14
  weight?: undefined;
45
15
  label?: undefined;
46
16
  tooltip?: undefined;
47
- conditional?: undefined;
48
- defaultValue?: undefined;
49
17
  })[];
50
18
  export default _default;
@@ -9,37 +9,10 @@ exports.default = [
9
9
  label: 'Use Thousands Separator',
10
10
  tooltip: 'Separate thousands by local delimiter.'
11
11
  },
12
- {
13
- type: "textfield",
14
- input: true,
15
- weight: 80,
16
- key: "thousandsSeparator",
17
- label: "Thousands Separator",
18
- conditional: {
19
- show: true,
20
- conjunction: "all",
21
- conditions: [
22
- {
23
- component: "delimiter",
24
- operator: "isEqual",
25
- value: true
26
- }
27
- ]
28
- },
29
- defaultValue: ","
30
- },
31
- {
32
- type: "textfield",
33
- input: true,
34
- weight: 90,
35
- key: "decimalSymbol",
36
- label: "Decimal Symbol",
37
- defaultValue: "."
38
- },
39
12
  {
40
13
  type: 'number',
41
14
  input: true,
42
- weight: 100,
15
+ weight: 80,
43
16
  key: 'decimalLimit',
44
17
  label: 'Decimal Places',
45
18
  tooltip: 'The maximum number of decimal places.'
@@ -47,7 +20,7 @@ exports.default = [
47
20
  {
48
21
  type: 'checkbox',
49
22
  input: true,
50
- weight: 110,
23
+ weight: 90,
51
24
  key: 'requireDecimal',
52
25
  label: 'Require Decimal',
53
26
  tooltip: 'Always show decimals, even if trailing zeros.'
@@ -211,11 +211,12 @@ export default class NestedComponent extends Field {
211
211
  calculateValue(data: any, flags: any, row: any): any;
212
212
  isLastPage(): boolean;
213
213
  isValid(data: any, dirty: any): any;
214
- validationProcessor({ scope, data, row, instance }: {
214
+ validationProcessor({ scope, data, row, instance, component }: {
215
215
  scope: any;
216
216
  data: any;
217
217
  row: any;
218
218
  instance: any;
219
+ component: any;
219
220
  }, flags: any): void;
220
221
  /**
221
222
  * Perform a validation on all child components of this nested component.
@@ -677,8 +677,11 @@ export default class NestedComponent extends Field {
677
677
  isValid(data, dirty) {
678
678
  return this.getComponents().reduce((valid, comp) => comp.isValid(data, dirty) && valid, super.isValid(data, dirty));
679
679
  }
680
- validationProcessor({ scope, data, row, instance }, flags) {
680
+ validationProcessor({ scope, data, row, instance, component }, flags) {
681
681
  const { dirty } = flags;
682
+ if (this.root.hasExtraPages && this.page !== this.root.page) {
683
+ instance = this.getComponentById(component.id);
684
+ }
682
685
  if (!instance) {
683
686
  return;
684
687
  }
@@ -5,36 +5,6 @@ declare const _default: ({
5
5
  key: string;
6
6
  label: string;
7
7
  tooltip: string;
8
- conditional?: undefined;
9
- defaultValue?: undefined;
10
- ignore?: undefined;
11
- } | {
12
- type: string;
13
- input: boolean;
14
- weight: number;
15
- key: string;
16
- label: string;
17
- conditional: {
18
- show: boolean;
19
- conjunction: string;
20
- conditions: {
21
- component: string;
22
- operator: string;
23
- value: boolean;
24
- }[];
25
- };
26
- defaultValue: string;
27
- tooltip?: undefined;
28
- ignore?: undefined;
29
- } | {
30
- type: string;
31
- input: boolean;
32
- weight: number;
33
- key: string;
34
- label: string;
35
- defaultValue: string;
36
- tooltip?: undefined;
37
- conditional?: undefined;
38
8
  ignore?: undefined;
39
9
  } | {
40
10
  key: string;
@@ -44,7 +14,5 @@ declare const _default: ({
44
14
  weight?: undefined;
45
15
  label?: undefined;
46
16
  tooltip?: undefined;
47
- conditional?: undefined;
48
- defaultValue?: undefined;
49
17
  })[];
50
18
  export default _default;
@@ -7,37 +7,10 @@ export default [
7
7
  label: 'Use Thousands Separator',
8
8
  tooltip: 'Separate thousands by local delimiter.'
9
9
  },
10
- {
11
- type: "textfield",
12
- input: true,
13
- weight: 80,
14
- key: "thousandsSeparator",
15
- label: "Thousands Separator",
16
- conditional: {
17
- show: true,
18
- conjunction: "all",
19
- conditions: [
20
- {
21
- component: "delimiter",
22
- operator: "isEqual",
23
- value: true
24
- }
25
- ]
26
- },
27
- defaultValue: ","
28
- },
29
- {
30
- type: "textfield",
31
- input: true,
32
- weight: 90,
33
- key: "decimalSymbol",
34
- label: "Decimal Symbol",
35
- defaultValue: "."
36
- },
37
10
  {
38
11
  type: 'number',
39
12
  input: true,
40
- weight: 100,
13
+ weight: 80,
41
14
  key: 'decimalLimit',
42
15
  label: 'Decimal Places',
43
16
  tooltip: 'The maximum number of decimal places.'
@@ -45,7 +18,7 @@ export default [
45
18
  {
46
19
  type: 'checkbox',
47
20
  input: true,
48
- weight: 110,
21
+ weight: 90,
49
22
  key: 'requireDecimal',
50
23
  label: 'Require Decimal',
51
24
  tooltip: 'Always show decimals, even if trailing zeros.'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5713.ee12658",
3
+ "version": "5.0.0-dev.5717.a2aa09f",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {