@snack-uikit/list 0.11.5-preview-fa3ea861.0 → 0.11.5-preview-8bb3334c.0

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.
@@ -35,8 +35,6 @@ export type BaseItem = WithSupportProps<{
35
35
  id?: ItemId;
36
36
  /** Флаг неактивности элемента */
37
37
  disabled?: boolean;
38
- /** Флаг присутствия элемента */
39
- hidden?: boolean;
40
38
  itemRef?: RefObject<HTMLElement>;
41
39
  className?: string;
42
40
  /**
@@ -72,7 +70,6 @@ type CommonGroupItem = {
72
70
  variant?: TruncateStringProps['variant'];
73
71
  };
74
72
  mode?: 'primary' | 'secondary';
75
- hidden?: boolean;
76
73
  divider?: boolean;
77
74
  };
78
75
  export type GroupItem = CommonGroupItem & {
@@ -59,10 +59,9 @@ export function kindFlattenItems({ items, prefix, parentId }) {
59
59
  const autoChildIds = [];
60
60
  const { items } = item, rest = __rest(item, ["items"]);
61
61
  const childActiveParent = isGroupItem(item) ? parentId !== null && parentId !== void 0 ? parentId : '~main' : autoId;
62
- const filteredItems = items.filter(item => !item.hidden);
63
- for (let idx = 0; idx < filteredItems.length; idx++) {
62
+ for (let idx = 0; idx < items.length; idx++) {
64
63
  const { id, children, autoId, focusChildren } = flatten({
65
- item: filteredItems[idx],
64
+ item: items[idx],
66
65
  idx,
67
66
  prefix: itemId,
68
67
  parentId: childActiveParent,
@@ -91,9 +90,8 @@ export function kindFlattenItems({ items, prefix, parentId }) {
91
90
  const closeChildIds = [];
92
91
  const autoChildIds = [];
93
92
  let allChildIds = [];
94
- const filteredItems = items.filter(item => !item.hidden);
95
- for (let idx = 0; idx < filteredItems.length; idx++) {
96
- const { id, children, autoId } = flatten({ item: filteredItems[idx], idx, prefix, parentId });
93
+ for (let idx = 0; idx < items.length; idx++) {
94
+ const { id, children, autoId } = flatten({ item: items[idx], idx, prefix, parentId });
97
95
  autoChildIds.push(autoId);
98
96
  closeChildIds.push(id);
99
97
  allChildIds.push(id);
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "title": "List",
7
- "version": "0.11.5-preview-fa3ea861.0",
7
+ "version": "0.11.5-preview-8bb3334c.0",
8
8
  "sideEffects": [
9
9
  "*.css",
10
10
  "*.woff",
@@ -35,13 +35,13 @@
35
35
  "@snack-uikit/button": "0.17.1",
36
36
  "@snack-uikit/divider": "3.0.3",
37
37
  "@snack-uikit/dropdown": "0.2.2",
38
- "@snack-uikit/icons": "0.20.1",
39
- "@snack-uikit/info-block": "0.3.4",
38
+ "@snack-uikit/icons": "0.20.2-preview-8bb3334c.0",
39
+ "@snack-uikit/info-block": "0.3.5-preview-8bb3334c.0",
40
40
  "@snack-uikit/loaders": "0.5.2",
41
41
  "@snack-uikit/scroll": "0.5.3",
42
- "@snack-uikit/search-private": "0.2.0",
43
- "@snack-uikit/toggles": "0.9.8",
44
- "@snack-uikit/truncate-string": "0.4.13",
42
+ "@snack-uikit/search-private": "0.2.1-preview-8bb3334c.0",
43
+ "@snack-uikit/toggles": "0.9.9-preview-8bb3334c.0",
44
+ "@snack-uikit/truncate-string": "0.4.14-preview-8bb3334c.0",
45
45
  "@snack-uikit/utils": "3.3.0",
46
46
  "classnames": "2.5.1",
47
47
  "merge-refs": "1.2.2"
@@ -49,5 +49,5 @@
49
49
  "peerDependencies": {
50
50
  "@snack-uikit/locale": "*"
51
51
  },
52
- "gitHead": "f43a4ee983d921d1e1c8bdccd05a950d278c43ed"
52
+ "gitHead": "a95e68ff04c723f847fb04efffb98d18cedd6fb4"
53
53
  }
@@ -42,8 +42,6 @@ export type BaseItem = WithSupportProps<{
42
42
  id?: ItemId;
43
43
  /** Флаг неактивности элемента */
44
44
  disabled?: boolean;
45
- /** Флаг присутствия элемента */
46
- hidden?: boolean;
47
45
 
48
46
  itemRef?: RefObject<HTMLElement>;
49
47
 
@@ -92,7 +90,6 @@ type CommonGroupItem = {
92
90
  variant?: TruncateStringProps['variant'];
93
91
  };
94
92
  mode?: 'primary' | 'secondary';
95
- hidden?: boolean;
96
93
  divider?: boolean;
97
94
  };
98
95
 
@@ -94,11 +94,9 @@ export function kindFlattenItems({ items, prefix, parentId }: KindFlattenItemsPr
94
94
  const { items, ...rest } = item;
95
95
  const childActiveParent = isGroupItem(item) ? parentId ?? '~main' : autoId;
96
96
 
97
- const filteredItems = items.filter(item => !item.hidden);
98
-
99
- for (let idx = 0; idx < filteredItems.length; idx++) {
97
+ for (let idx = 0; idx < items.length; idx++) {
100
98
  const { id, children, autoId, focusChildren } = flatten({
101
- item: filteredItems[idx],
99
+ item: items[idx],
102
100
  idx,
103
101
  prefix: itemId,
104
102
  parentId: childActiveParent,
@@ -139,10 +137,8 @@ export function kindFlattenItems({ items, prefix, parentId }: KindFlattenItemsPr
139
137
  const autoChildIds: ItemId[] = [];
140
138
  let allChildIds: ItemId[] = [];
141
139
 
142
- const filteredItems = items.filter(item => !item.hidden);
143
-
144
- for (let idx = 0; idx < filteredItems.length; idx++) {
145
- const { id, children, autoId } = flatten({ item: filteredItems[idx], idx, prefix, parentId });
140
+ for (let idx = 0; idx < items.length; idx++) {
141
+ const { id, children, autoId } = flatten({ item: items[idx], idx, prefix, parentId });
146
142
 
147
143
  autoChildIds.push(autoId);
148
144
  closeChildIds.push(id);