@formio/js 5.0.0-rc.95 → 5.0.0-rc.96

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@
20
20
 
21
21
  /*! @license DOMPurify 3.1.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.1.6/LICENSE */
22
22
 
23
- /*! formiojs v5.0.0-rc.95 | https://unpkg.com/formiojs@5.0.0-rc.95/LICENSE.txt */
23
+ /*! formiojs v5.0.0-rc.96 | https://unpkg.com/formiojs@5.0.0-rc.96/LICENSE.txt */
24
24
 
25
25
  /**
26
26
  * @license
package/lib/cjs/Wizard.js CHANGED
@@ -716,7 +716,7 @@ class Wizard extends Webform_1.default {
716
716
  else {
717
717
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
718
718
  this.scrollIntoView(this.element, true);
719
- return Promise.reject(this.showErrors(errors, true));
719
+ return Promise.reject(super.showErrors(errors, true));
720
720
  }
721
721
  }
722
722
  validateCurrentPage(flags = {}) {
@@ -693,6 +693,9 @@ class NestedComponent extends Field_1.default {
693
693
  if (!instance) {
694
694
  return;
695
695
  }
696
+ if (!instance.component.path) {
697
+ instance.component.path = component.path;
698
+ }
696
699
  instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
697
700
  if (instance.processOwnValidation) {
698
701
  scope.noRecurse = true;
@@ -476,7 +476,7 @@ class FormComponent extends Component_1.default {
476
476
  checkComponentValidity(data, dirty, row, options, errors = []) {
477
477
  options = options || {};
478
478
  const silentCheck = options.silentCheck || false;
479
- if (this.subForm) {
479
+ if (this.subForm && !this.isNestedWizard) {
480
480
  return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck, errors);
481
481
  }
482
482
  return super.checkComponentValidity(data, dirty, row, options, errors);
@@ -1217,7 +1217,7 @@ class SelectComponent extends ListComponent_1.default {
1217
1217
  }
1218
1218
  // Check to see if we need to save off the template data into our metadata.
1219
1219
  const templateValue = this.component.reference && (value === null || value === void 0 ? void 0 : value._id) ? value._id.toString() : value;
1220
- const shouldSaveData = !valueIsObject || this.component.reference;
1220
+ const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
1221
1221
  if (!lodash_1.default.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && ((_a = this.root) === null || _a === void 0 ? void 0 : _a.submission)) {
1222
1222
  const submission = this.root.submission;
1223
1223
  if (!submission.metadata) {
package/lib/mjs/Wizard.js CHANGED
@@ -706,7 +706,7 @@ export default class Wizard extends Webform {
706
706
  else {
707
707
  this.currentPage.components.forEach((comp) => comp.setPristine(false));
708
708
  this.scrollIntoView(this.element, true);
709
- return Promise.reject(this.showErrors(errors, true));
709
+ return Promise.reject(super.showErrors(errors, true));
710
710
  }
711
711
  }
712
712
  validateCurrentPage(flags = {}) {
@@ -688,6 +688,9 @@ export default class NestedComponent extends Field {
688
688
  if (!instance) {
689
689
  return;
690
690
  }
691
+ if (!instance.component.path) {
692
+ instance.component.path = component.path;
693
+ }
691
694
  instance.checkComponentValidity(data, dirty, row, flags, scope.errors);
692
695
  if (instance.processOwnValidation) {
693
696
  scope.noRecurse = true;
@@ -470,7 +470,7 @@ export default class FormComponent extends Component {
470
470
  checkComponentValidity(data, dirty, row, options, errors = []) {
471
471
  options = options || {};
472
472
  const silentCheck = options.silentCheck || false;
473
- if (this.subForm) {
473
+ if (this.subForm && !this.isNestedWizard) {
474
474
  return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck, errors);
475
475
  }
476
476
  return super.checkComponentValidity(data, dirty, row, options, errors);
@@ -1245,7 +1245,7 @@ export default class SelectComponent extends ListComponent {
1245
1245
  }
1246
1246
  // Check to see if we need to save off the template data into our metadata.
1247
1247
  const templateValue = this.component.reference && value?._id ? value._id.toString() : value;
1248
- const shouldSaveData = !valueIsObject || this.component.reference;
1248
+ const shouldSaveData = (!valueIsObject || this.component.reference) && !this.inDataTable;
1249
1249
  if (!_.isNil(templateValue) && shouldSaveData && this.templateData && this.templateData[templateValue] && this.root?.submission) {
1250
1250
  const submission = this.root.submission;
1251
1251
  if (!submission.metadata) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.0.0-rc.95",
3
+ "version": "5.0.0-rc.96",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {
@@ -81,7 +81,7 @@
81
81
  "dependencies": {
82
82
  "@formio/bootstrap": "3.0.0-rc.41",
83
83
  "@formio/choices.js": "^10.2.1",
84
- "@formio/core": "2.3.0-rc.17",
84
+ "@formio/core": "2.3.0-rc.18",
85
85
  "@formio/text-mask-addons": "^3.8.0-formio.3",
86
86
  "@formio/vanilla-text-mask": "^5.1.1-formio.1",
87
87
  "abortcontroller-polyfill": "^1.7.5",