@formio/js 5.1.0-dev.6217.4c14467 → 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.
@@ -183,10 +183,6 @@ class WizardBuilder extends WebformBuilder_1.default {
183
183
  this.navigationDragula = null;
184
184
  super.detach();
185
185
  }
186
- destroy(all = false) {
187
- this.off('saveComponent');
188
- super.destroy(all);
189
- }
190
186
  rebuild() {
191
187
  var _a;
192
188
  const page = this.currentPage;
@@ -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');
@@ -178,10 +178,6 @@ export default class WizardBuilder extends WebformBuilder {
178
178
  this.navigationDragula = null;
179
179
  super.detach();
180
180
  }
181
- destroy(all = false) {
182
- this.off('saveComponent');
183
- super.destroy(all);
184
- }
185
181
  rebuild() {
186
182
  const page = this.currentPage;
187
183
  this.webform.setForm({
@@ -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.6217.4c14467",
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": {