@provoly/dashboard 0.20.5 → 0.20.7

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.
@@ -3942,7 +3942,7 @@ function getDisplayOptions(mode) {
3942
3942
  }, {})
3943
3943
  },
3944
3944
  edit_toggle: true,
3945
- widgetContextMenu: mode === ViewMode.EDITION
3945
+ widgetContextMenu: true
3946
3946
  };
3947
3947
  default:
3948
3948
  return BASE_DISPLAY_OPTIONS;
@@ -4540,7 +4540,7 @@ class ItemUtils {
4540
4540
  return (((!item.hasOwnProperty('oClass')
4541
4541
  ? item.get('attributes')[attribute.technicalName] ?? {}
4542
4542
  : item.attributes[attribute.technicalName]) ?? {}).values ?? [])
4543
- .map((v) => ({ ...v, value: v.visible ? v.value : hiddenFieldText }))
4543
+ .map((v) => ({ ...v, value: v.visible === false ? hiddenFieldText : v.value }))
4544
4544
  .sort(ItemUtils.sortAttributes);
4545
4545
  }
4546
4546
  return (!item.hasOwnProperty('oClass')
@@ -4559,10 +4559,10 @@ class ItemUtils {
4559
4559
  return ItemUtils.getAttributeValue(item, attribute).map((v) => v.value);
4560
4560
  }
4561
4561
  const value = ItemUtils.getAttributeValue(item, attribute);
4562
- return value ? (value.visible ? value.value : hiddenFieldText) : undefined;
4562
+ return value ? (value.visible === false ? hiddenFieldText : value.value) : undefined;
4563
4563
  }
4564
4564
  static sortAttributes(a, b) {
4565
- const compareVisible = (b.visible ? 1 : -1) - (a.visible ? 1 : -1);
4565
+ const compareVisible = (b.visible === false ? -1 : 1) - (a.visible === false ? -1 : 1);
4566
4566
  if (compareVisible !== 0) {
4567
4567
  return compareVisible;
4568
4568
  }