@plesk/ui-library 3.40.7 → 3.40.8

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.
@@ -37,7 +37,7 @@ class Registry {
37
37
  expand() {
38
38
  let changed = false;
39
39
  for (const item of this.items) {
40
- if (this.checkItemIsCompactOrHasCompactItems(item)) {
40
+ if (item.isExpandable) {
41
41
  item.expand();
42
42
  changed = true;
43
43
  break;
@@ -53,18 +53,20 @@ class Registry {
53
53
  return isCompact;
54
54
  });
55
55
  }
56
- get hasCompactItems() {
57
- return this.items.some(this.checkItemIsCompactOrHasCompactItems);
58
- }
59
- checkItemIsCompactOrHasCompactItems(item) {
60
- return item.isCompact || 'hasCompactItems' in item && item.hasCompactItems;
56
+ get isExpandable() {
57
+ return this.items.some(_ref2 => {
58
+ let {
59
+ isExpandable
60
+ } = _ref2;
61
+ return isExpandable;
62
+ });
61
63
  }
62
64
  }
63
65
  class RegistryItem {
64
- constructor(_ref2) {
66
+ constructor(_ref3) {
65
67
  let {
66
68
  onCompactStateChange
67
- } = _ref2;
69
+ } = _ref3;
68
70
  (0, _defineProperty2.default)(this, "_isCompact", false);
69
71
  (0, _defineProperty2.default)(this, "onCompactStateChange", void 0);
70
72
  this.onCompactStateChange = onCompactStateChange;
@@ -80,6 +82,9 @@ class RegistryItem {
80
82
  get isCompact() {
81
83
  return this._isCompact;
82
84
  }
85
+ get isExpandable() {
86
+ return this._isCompact;
87
+ }
83
88
  }
84
89
  const useRegistry = () => {
85
90
  const parentRegistry = useRegistryContext();
package/cjs/index.js CHANGED
@@ -46,5 +46,5 @@ Object.keys(_components).forEach(function (key) {
46
46
  });
47
47
  });
48
48
  // Copyright 1999-2023. Plesk International GmbH. All rights reserved.
49
- const version = exports.version = "3.40.7";
49
+ const version = exports.version = "3.40.8";
50
50
  (0, _svg4everybody.default)();