@formio/js 5.1.0-dev.6215.61ce056 → 5.1.0-dev.6218.dde7b07

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.
@@ -1206,7 +1206,6 @@ class WebformBuilder extends Component_1.default {
1206
1206
  submissionData = submissionData.componentJson || submissionData;
1207
1207
  if (submissionData.components && this.originalDefaultValue) {
1208
1208
  submissionData.components = this.originalDefaultValue.components;
1209
- this.originalDefaultValue = null;
1210
1209
  }
1211
1210
  const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];
1212
1211
  this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);
@@ -633,10 +633,13 @@ class Component extends Element_1.default {
633
633
  if (!component) {
634
634
  component = this.component;
635
635
  }
636
+ if (!this.path) {
637
+ return false;
638
+ }
636
639
  if (lodash_1.default.isArray(this.options[visibility])) {
637
- return this.options[visibility].includes(component.key);
640
+ return this.options[visibility].includes(this.path);
638
641
  }
639
- return this.options[visibility][component.key];
642
+ return this.options[visibility][this.path];
640
643
  }
641
644
  shouldForceHide(component) {
642
645
  return this.shouldForceVisibility(component, 'hide');
@@ -1188,7 +1188,6 @@ export default class WebformBuilder extends Component {
1188
1188
  submissionData = submissionData.componentJson || submissionData;
1189
1189
  if (submissionData.components && this.originalDefaultValue) {
1190
1190
  submissionData.components = this.originalDefaultValue.components;
1191
- this.originalDefaultValue = null;
1192
1191
  }
1193
1192
  const fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];
1194
1193
  this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);
@@ -620,10 +620,13 @@ export default class Component extends Element {
620
620
  if (!component) {
621
621
  component = this.component;
622
622
  }
623
+ if (!this.path) {
624
+ return false;
625
+ }
623
626
  if (_.isArray(this.options[visibility])) {
624
- return this.options[visibility].includes(component.key);
627
+ return this.options[visibility].includes(this.path);
625
628
  }
626
- return this.options[visibility][component.key];
629
+ return this.options[visibility][this.path];
627
630
  }
628
631
  shouldForceHide(component) {
629
632
  return this.shouldForceVisibility(component, 'hide');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@formio/js",
3
- "version": "5.1.0-dev.6215.61ce056",
3
+ "version": "5.1.0-dev.6218.dde7b07",
4
4
  "description": "JavaScript powered Forms with JSON Form Builder",
5
5
  "main": "lib/cjs/index.js",
6
6
  "exports": {