@formio/js 5.0.0-dev.5716.bdb52c9 → 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.
@@ -208,8 +208,7 @@ class WebformBuilder extends Component_1.default {
208
208
  params: {
209
209
  type: 'resource',
210
210
  limit: 1000000,
211
- select: '_id,title,name,components',
212
- 'tags__ne': 'noBuilderResource'
211
+ select: '_id,title,name,components'
213
212
  }
214
213
  };
215
214
  if (this.options && this.options.resourceTag) {
@@ -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
  }
@@ -187,8 +187,7 @@ export default class WebformBuilder extends Component {
187
187
  params: {
188
188
  type: 'resource',
189
189
  limit: 1000000,
190
- select: '_id,title,name,components',
191
- 'tags__ne': 'noBuilderResource'
190
+ select: '_id,title,name,components'
192
191
  }
193
192
  };
194
193
  if (this.options && this.options.resourceTag) {
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-dev.5716.bdb52c9",
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": {