@ynput/ayon-frontend-shared 0.6.8 → 0.7.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.
Files changed (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
package/dist/Slicer.es.js CHANGED
@@ -1,26 +1,28 @@
1
- import { S as Ve, a as je, b as Ne, c as et, d as tt, e as st, f as nt, g as ot, r as rt, u as it, h as ct, i as lt, j as dt, k as at } from "./chunks/Slicer.es.js";
2
- import { jsx as Se } from "react/jsx-runtime";
3
- import { useState as A, useEffect as M, useRef as U, useCallback as m, useMemo as L } from "react";
4
- import { a as X, r as q, w as ce, p as ye } from "./chunks/DeleteEntitiesContextInstance.es.js";
5
- import { S as he, c as pe, d as Ee } from "./chunks/MetaWidget.es.js";
6
- import { e as ft, u as St } from "./chunks/MetaWidget.es.js";
1
+ import { r as pe } from "./chunks/Slicer.es.js";
2
+ import { S as nt, a as ot, b as rt, c as it, d as ct, e as lt, f as dt, g as at, h as ut, i as ft, j as St, k as yt, s as ht, u as pt, l as Et, m as It, n as gt, o as mt } from "./chunks/Slicer.es.js";
3
+ import { jsx as Ee } from "react/jsx-runtime";
4
+ import { useState as O, useEffect as A, useRef as q, useCallback as I, useMemo as L } from "react";
5
+ import { a as X, r as z, w as ae, p as Ie } from "./chunks/TableExportContextInstance.es.js";
6
+ import { S as ge, c as me, d as we } from "./chunks/MetaWidget.es.js";
7
+ import { e as Pt, u as xt } from "./chunks/MetaWidget.es.js";
7
8
  import "@module-federation/enhanced/runtime";
8
9
  import "react-toastify";
9
10
  import "@ynput/ayon-react-components";
10
- import { aA as B, ar as Ie } from "./chunks/searchTerms.es.js";
11
+ import { aI as U, az as Pe } from "./chunks/searchTerms.es.js";
11
12
  import "./chunks/getUris.es.js";
12
13
  import "primereact/confirmdialog";
13
14
  import "lodash";
14
15
  import "uuid";
15
- import { u as le } from "./chunks/useLoadModule.es.js";
16
+ import { u as ue } from "./chunks/useLoadModule.es.js";
16
17
  import "./chunks/ContextMenuContextInstance.es.js";
17
18
  import "clsx";
18
19
  import "react-dom";
19
- import { useDispatch as ge } from "react-redux";
20
+ import { useDispatch as xe } from "react-redux";
21
+ import "react-router-dom";
20
22
  import "semver";
21
- import { u as ht } from "./chunks/useHierarchySelection.es.js";
22
- const me = () => {
23
- const n = () => ({
23
+ import { u as kt } from "./chunks/useHierarchySelection.es.js";
24
+ const ve = () => {
25
+ const o = () => ({
24
26
  formatStatuses: () => [],
25
27
  formatTaskTypes: () => [],
26
28
  formatTypes: () => [],
@@ -28,353 +30,371 @@ const me = () => {
28
30
  formatAttribute: () => [],
29
31
  formatProductTypes: () => [],
30
32
  formatAuthors: () => []
31
- }), { powerLicense: e } = X(), [s, { isLoading: c }] = le({
33
+ }), { powerLicense: e, isLoading: s } = X(), [c, { isLoading: l }] = ue({
32
34
  addon: "powerpack",
33
35
  remote: "slicer",
34
36
  module: "useExtraSlices",
35
- fallback: n,
37
+ fallback: o,
36
38
  skip: !e
37
39
  // skip loading if powerpack license is not available
38
- }), [l] = le({
40
+ }), [d] = ue({
39
41
  addon: "powerpack",
40
42
  remote: "slicer",
41
43
  module: "SlicerDropdown",
42
- fallback: he,
44
+ fallback: ge,
43
45
  skip: !e
44
46
  // skip loading if powerpack license is not available
45
47
  });
46
- return { useExtraSlices: s, isLoadingExtraSlices: c, SlicerDropdown: l };
47
- }, we = ["slicer-selection-", "slicer-expanded-"], de = (n, e, s) => s === "hierarchy" ? `slicer-selection-hierarchy-${n}` : `slicer-selection-${n}-${e}-${s}`, ae = (n, e, s) => s === "hierarchy" ? `slicer-expanded-hierarchy-${n}` : `slicer-expanded-${n}-${e}-${s}`, Pe = ({
48
- sliceTypes: n,
48
+ return {
49
+ useExtraSlices: c,
50
+ isLoadingExtraSlices: s || l,
51
+ SlicerDropdown: d
52
+ };
53
+ }, ke = ["slicer-selection-", "slicer-expanded-"], fe = (o, e, s) => s === "hierarchy" ? `slicer-selection-hierarchy-${o}` : `slicer-selection-${o}-${e}-${s}`, Se = (o, e, s) => s === "hierarchy" ? `slicer-expanded-hierarchy-${o}` : `slicer-expanded-${o}-${e}-${s}`, Te = ({
54
+ sliceTypes: o,
49
55
  page: e,
50
56
  projectName: s,
51
57
  ...c
52
58
  }) => {
53
- const [l, f] = A(0);
54
- M(() => {
55
- const t = (a) => {
56
- const u = a.detail?.key ?? ("key" in a ? a.key : void 0);
57
- u && !we.some((I) => u.startsWith(I)) || f((I) => I + 1);
59
+ const [l, d] = O(0);
60
+ A(() => {
61
+ const t = (u) => {
62
+ const f = u.detail?.key ?? ("key" in u ? u.key : void 0);
63
+ f && !ke.some((m) => f.startsWith(m)) || d((m) => m + 1);
58
64
  };
59
65
  return window.addEventListener("session-storage", t), window.addEventListener("storage", t), () => {
60
66
  window.removeEventListener("session-storage", t), window.removeEventListener("storage", t);
61
67
  };
62
68
  }, []);
63
- const S = U(/* @__PURE__ */ new Map()), d = m((t, a) => {
64
- const u = typeof window > "u" ? null : sessionStorage.getItem(t), I = S.current.get(t);
65
- if (I && I.raw === u) return I.value;
66
- const _ = q(t, a);
67
- return S.current.set(t, { raw: u, value: _ }), _;
68
- }, []), o = n[0], y = m(
69
- (t) => c.rowSelection !== void 0 && t === o ? c.rowSelection : d(de(s, e, t), {}),
69
+ const S = q(/* @__PURE__ */ new Map()), a = I((t, u) => {
70
+ const f = typeof window > "u" ? null : sessionStorage.getItem(t), m = S.current.get(t);
71
+ if (m && m.raw === f) return m.value;
72
+ const _ = z(t, u);
73
+ return S.current.set(t, { raw: f, value: _ }), _;
74
+ }, []), r = o[0], y = I(
75
+ (t) => c.rowSelection !== void 0 && t === r ? c.rowSelection : a(fe(s, e, t), {}),
70
76
  // storageVersion invalidates memoized reads when any bucket changes
71
- [c.rowSelection, o, s, e, d, l]
72
- ), h = m(
73
- (t, a) => {
74
- if (c.setRowSelection && t === o) {
75
- c.setRowSelection(a);
77
+ [c.rowSelection, r, s, e, a, l]
78
+ ), p = I(
79
+ (t, u) => {
80
+ if (c.setRowSelection && t === r) {
81
+ c.setRowSelection(u);
76
82
  return;
77
83
  }
78
- const u = de(s, e, t), I = typeof a == "function" ? a(d(u, {})) : a;
79
- ce(u, I);
84
+ const f = fe(s, e, t), m = typeof u == "function" ? u(a(f, {})) : u;
85
+ ae(f, m);
80
86
  },
81
- [c.setRowSelection, o, s, e, d]
82
- ), w = m(
83
- (t) => c.expanded !== void 0 && t === o ? c.expanded : d(ae(s, e, t), {}),
84
- [c.expanded, o, s, e, d, l]
85
- ), i = m(
86
- (t, a) => {
87
- if (c.setExpanded && t === o) {
88
- c.setExpanded(a);
87
+ [c.setRowSelection, r, s, e, a]
88
+ ), w = I(
89
+ (t) => c.expanded !== void 0 && t === r ? c.expanded : a(Se(s, e, t), {}),
90
+ [c.expanded, r, s, e, a, l]
91
+ ), i = I(
92
+ (t, u) => {
93
+ if (c.setExpanded && t === r) {
94
+ c.setExpanded(u);
89
95
  return;
90
96
  }
91
- const u = ae(s, e, t), I = typeof a == "function" ? a(d(u, {})) : a;
92
- ce(u, I);
97
+ const f = Se(s, e, t), m = typeof u == "function" ? u(a(f, {})) : u;
98
+ ae(f, m);
93
99
  },
94
- [c.setExpanded, o, s, e, d]
95
- ), P = y(o), E = m(
96
- (t, a = o) => h(a, t),
97
- [h, o]
98
- ), T = w(o), x = m(
99
- (t, a = o) => i(a, t),
100
- [i, o]
100
+ [c.setExpanded, r, s, e, a]
101
+ ), P = y(r), g = I(
102
+ (t, u = r) => p(u, t),
103
+ [p, r]
104
+ ), T = w(r), x = I(
105
+ (t, u = r) => i(u, t),
106
+ [i, r]
101
107
  );
102
108
  return {
103
109
  rowSelection: P,
104
- setRowSelection: E,
110
+ setRowSelection: g,
105
111
  expanded: T,
106
112
  setExpanded: x,
107
113
  getPanelSelection: y,
108
- setPanelSelection: h,
114
+ setPanelSelection: p,
109
115
  getPanelExpanded: w,
110
116
  setPanelExpanded: i
111
117
  };
112
- }, ue = ["overview", "products"], qe = ({
113
- children: n,
118
+ }, ye = ["overview", "products"], je = ({
119
+ children: o,
114
120
  page: e,
115
121
  projectName: s,
116
122
  viewSettings: c,
117
123
  isLoadingViews: l,
118
- updateViewSettings: f,
124
+ updateViewSettings: d,
119
125
  onOpenViewer: S,
120
- onAddToList: d,
121
- ...o
126
+ onAddToList: a,
127
+ ...r
122
128
  }) => {
123
- const [y, h] = ye(
129
+ const [y, p] = Ie(
124
130
  `slicer-pinned-slice-${e}`,
125
131
  null
126
- ), { powerLicense: w } = X(), i = c, P = i?.sliceTypes, E = i?.sliceType, T = P?.length ? E && E !== P[0] ? [E, ...P.slice(1)] : P : [E ?? "hierarchy"], x = ue.includes(e) && !o.sliceType && !P?.length && T[0] !== "hierarchy" && y?.sliceType === "hierarchy" && Object.values(y.rowSelection || {}).some(Boolean), t = L(
132
+ ), { powerLicense: w } = X(), i = c, P = i?.sliceTypes, g = i?.sliceType, T = P?.length ? g && g !== P[0] ? [g, ...P.slice(1)] : P : [g ?? "hierarchy"], x = ye.includes(e) && !r.sliceType && !P?.length && T[0] !== "hierarchy" && y?.sliceType === "hierarchy" && Object.values(y.rowSelection || {}).some(Boolean), t = L(
127
133
  () => [
128
134
  ...new Set(
129
- o.sliceType ? [o.sliceType] : x ? [...T, "hierarchy"] : T
135
+ r.sliceType ? [r.sliceType] : x ? [...T, "hierarchy"] : T
130
136
  )
131
137
  ],
132
- [o.sliceType, T.join("|"), x]
133
- ), a = i?.collapsedSliceTypes, u = L(() => a ?? [], [a?.join("|")]), I = L(
134
- () => t.map((r) => ({ id: r, sliceType: r })),
138
+ [r.sliceType, T.join("|"), x]
139
+ ), u = i?.collapsedSliceTypes, f = L(() => u ?? [], [u?.join("|")]), m = L(
140
+ () => t.map((n) => ({ id: n, sliceType: n })),
135
141
  [t]
136
- ), _ = I[0].sliceType, {
137
- rowSelection: O,
138
- setRowSelection: D,
142
+ ), _ = m[0].sliceType, {
143
+ rowSelection: D,
144
+ setRowSelection: M,
139
145
  expanded: G,
140
146
  setExpanded: H,
141
- getPanelSelection: W,
147
+ getPanelSelection: B,
142
148
  setPanelSelection: C,
143
- getPanelExpanded: z,
144
- setPanelExpanded: b
145
- } = Pe({
149
+ getPanelExpanded: J,
150
+ setPanelExpanded: F
151
+ } = Te({
146
152
  sliceTypes: t,
147
153
  page: e,
148
154
  projectName: s,
149
- ...o
150
- }), J = m(
151
- (r) => {
152
- D(r);
155
+ ...r
156
+ }), Q = I(
157
+ (n) => {
158
+ M(n);
153
159
  },
154
- [D]
155
- ), k = m(
156
- (r, g) => {
157
- const p = () => {
160
+ [M]
161
+ ), v = I(
162
+ (n, E) => {
163
+ const h = () => {
158
164
  };
159
- f(
165
+ d(
160
166
  {
161
- sliceTypes: r,
162
- sliceType: r[0],
163
- collapsedSliceTypes: (g ?? u).filter((R) => r.includes(R))
167
+ sliceTypes: n,
168
+ sliceType: n[0],
169
+ collapsedSliceTypes: (E ?? f).filter((R) => n.includes(R))
164
170
  },
165
- p,
166
- p,
171
+ h,
172
+ h,
167
173
  {}
168
174
  );
169
175
  },
170
- [f, u]
171
- ), Q = m(
172
- (r) => {
173
- const g = u.includes(r) ? u.filter((p) => p !== r) : [...u, r];
174
- k(t, g);
176
+ [d, f]
177
+ ), K = i?.sliceSorts, Z = I(
178
+ (n) => pe(n, K?.[n]),
179
+ [K]
180
+ ), j = I(
181
+ (n, E) => {
182
+ const h = () => {
183
+ };
184
+ d({ sliceSorts: { ...K, [n]: E } }, h, h, {});
175
185
  },
176
- [u, k, t]
177
- ), F = `${s}-${e}`, Z = U(/* @__PURE__ */ new Set());
178
- M(() => {
179
- !x || l || Z.current.has(F) || (Z.current.add(F), Object.keys(W("hierarchy")).length || (C("hierarchy", y.rowSelection), b("hierarchy", y.expanded)), k(t));
180
- }, [x, l, F]);
181
- const V = U(/* @__PURE__ */ new Set());
182
- M(() => {
183
- if (V.current.has(F) || l || o.sliceType || o.rowSelection || o.setRowSelection || P?.length)
186
+ [d, K]
187
+ ), V = I(
188
+ (n) => {
189
+ const E = f.includes(n) ? f.filter((h) => h !== n) : [...f, n];
190
+ v(t, E);
191
+ },
192
+ [f, v, t]
193
+ ), b = `${s}-${e}`, N = q(/* @__PURE__ */ new Set());
194
+ A(() => {
195
+ !x || l || N.current.has(b) || (N.current.add(b), Object.keys(B("hierarchy")).length || (C("hierarchy", y.rowSelection), F("hierarchy", y.expanded)), v(t));
196
+ }, [x, l, b]);
197
+ const ee = q(/* @__PURE__ */ new Set());
198
+ A(() => {
199
+ if (ee.current.has(b) || l || r.sliceType || r.rowSelection || r.setRowSelection || P?.length)
184
200
  return;
185
- V.current.add(F);
186
- const r = `slicer-selection-${s}-${e}`, g = `slicer-expanded-${s}-${e}`, p = T[0];
187
- if (p !== "hierarchy") {
188
- const R = q(r, null);
201
+ ee.current.add(b);
202
+ const n = `slicer-selection-${s}-${e}`, E = `slicer-expanded-${s}-${e}`, h = T[0];
203
+ if (h !== "hierarchy") {
204
+ const R = z(n, null);
189
205
  if (R && Object.keys(R).length) {
190
206
  C(
191
- p,
192
- (ie) => Object.keys(ie).length ? ie : R
207
+ h,
208
+ (de) => Object.keys(de).length ? de : R
193
209
  );
194
- const v = q(g, null);
195
- v && b(p, v);
210
+ const k = z(E, null);
211
+ k && F(h, k);
196
212
  }
197
213
  }
198
- sessionStorage.removeItem(r), sessionStorage.removeItem(g);
199
- }, [l, P, F]), M(() => {
200
- ue.includes(e) && !o.sliceType && !l && y && !x && h(null);
201
- }, [e, o.sliceType, l, y, x, h]);
202
- const j = m(
203
- (r, g) => {
204
- if (w && t.slice(1).includes(r)) return;
205
- o.onSliceTypeChange ? o.onSliceTypeChange(r, g) : k([r, ...t.slice(1).filter((v) => v !== r)]);
206
- const p = (v) => o.setRowSelection ? o.setRowSelection(v) : D(v, r), R = (v) => o.setExpanded ? o.setExpanded(v) : H(v, r);
207
- y && r === y.sliceType ? (p(y.rowSelection), R(y.expanded), h(null)) : r !== "hierarchy" && (p({}), R({})), g && h({
214
+ sessionStorage.removeItem(n), sessionStorage.removeItem(E);
215
+ }, [l, P, b]), A(() => {
216
+ ye.includes(e) && !r.sliceType && !l && y && !x && p(null);
217
+ }, [e, r.sliceType, l, y, x, p]);
218
+ const te = I(
219
+ (n, E) => {
220
+ if (w && t.slice(1).includes(n)) return;
221
+ r.onSliceTypeChange ? r.onSliceTypeChange(n, E) : v([n, ...t.slice(1).filter((k) => k !== n)]);
222
+ const h = (k) => r.setRowSelection ? r.setRowSelection(k) : M(k, n), R = (k) => r.setExpanded ? r.setExpanded(k) : H(k, n);
223
+ y && n === y.sliceType ? (h(y.rowSelection), R(y.expanded), p(null)) : n !== "hierarchy" && (h({}), R({})), E && p({
208
224
  sliceType: _,
209
- rowSelection: O,
225
+ rowSelection: D,
210
226
  expanded: G
211
227
  });
212
228
  },
213
229
  [
214
- k,
230
+ v,
215
231
  t,
216
- O,
217
232
  D,
233
+ M,
218
234
  y,
219
- h,
235
+ p,
220
236
  G,
221
237
  H,
222
- o.setRowSelection,
223
- o.setExpanded,
238
+ r.setRowSelection,
239
+ r.setExpanded,
224
240
  w
225
241
  ]
226
- ), K = m(
227
- (r) => {
228
- r !== "hierarchy" && (C(r, {}), b(r, {}));
242
+ ), W = I(
243
+ (n) => {
244
+ n !== "hierarchy" && (C(n, {}), F(n, {}));
229
245
  },
230
- [C, b]
231
- ), N = m(
232
- (r) => {
233
- !r || t.includes(r) || (k([...t, r]), K(r));
246
+ [C, F]
247
+ ), se = I(
248
+ (n) => {
249
+ !n || t.includes(n) || (v([...t, n]), W(n));
234
250
  },
235
- [t, k, K]
236
- ), ee = m(
237
- (r) => {
238
- if (t.length <= 1 || !t.includes(r)) return;
239
- const g = t.filter((p) => p !== r);
240
- k(g, g.length > 1 ? void 0 : []);
251
+ [t, v, W]
252
+ ), ne = I(
253
+ (n) => {
254
+ if (t.length <= 1 || !t.includes(n)) return;
255
+ const E = t.filter((h) => h !== n);
256
+ v(E, E.length > 1 ? void 0 : []);
241
257
  },
242
- [t, k]
243
- ), te = m(
244
- (r, g) => {
245
- !t.includes(r) || t.includes(g) || (k(
246
- t.map((p) => p === r ? g : p),
247
- u.map((p) => p === r ? g : p)
248
- ), K(g));
258
+ [t, v]
259
+ ), oe = I(
260
+ (n, E) => {
261
+ !t.includes(n) || t.includes(E) || (v(
262
+ t.map((h) => h === n ? E : h),
263
+ f.map((h) => h === n ? E : h)
264
+ ), W(E));
249
265
  },
250
- [t, k, K, u]
251
- ), se = m(
252
- (r) => {
253
- H(r);
266
+ [t, v, W, f]
267
+ ), re = I(
268
+ (n) => {
269
+ H(n);
254
270
  },
255
271
  [H]
256
- ), { useExtraSlices: ne, isLoadingExtraSlices: oe, SlicerDropdown: re } = me(), fe = L(
272
+ ), { useExtraSlices: ie, isLoadingExtraSlices: ce, SlicerDropdown: le } = ve(), he = L(
257
273
  () => ({
258
274
  projectName: s,
259
275
  page: e,
260
- useExtraSlices: ne,
261
- isLoadingExtraSlices: oe,
262
- SlicerDropdown: re,
276
+ useExtraSlices: ie,
277
+ isLoadingExtraSlices: ce,
278
+ SlicerDropdown: le,
263
279
  // SLICE TYPE
264
280
  sliceType: _,
265
- onSliceTypeChange: j,
281
+ onSliceTypeChange: te,
266
282
  // SLICE PANELS
267
- slices: I,
268
- addSlicePanel: N,
269
- removeSlicePanel: ee,
270
- setPanelSliceType: te,
271
- getPanelSelection: W,
283
+ slices: m,
284
+ addSlicePanel: se,
285
+ removeSlicePanel: ne,
286
+ setPanelSliceType: oe,
287
+ getPanelSelection: B,
272
288
  setPanelSelection: C,
273
- getPanelExpanded: z,
274
- setPanelExpanded: b,
275
- collapsedPanels: u,
276
- togglePanelCollapsed: Q,
289
+ getPanelExpanded: J,
290
+ setPanelExpanded: F,
291
+ collapsedPanels: f,
292
+ togglePanelCollapsed: V,
293
+ getSliceSort: Z,
294
+ setSliceSort: j,
277
295
  // ROW SELECTION
278
- rowSelection: O,
279
- onRowSelectionChange: J,
296
+ rowSelection: D,
297
+ onRowSelectionChange: Q,
280
298
  // PINNED SLICE
281
299
  pinnedSlice: y,
282
- setPinnedSlice: h,
300
+ setPinnedSlice: p,
283
301
  expanded: G,
284
- onExpandedChange: se,
302
+ onExpandedChange: re,
285
303
  // loading state
286
304
  isViewSyncPending: l,
287
305
  onOpenViewer: S,
288
- onAddToList: d
306
+ onAddToList: a
289
307
  }),
290
308
  [
291
309
  e,
292
- ne,
293
- oe,
294
- re,
310
+ ie,
311
+ ce,
312
+ le,
295
313
  _,
296
- j,
297
- I,
298
- u,
299
- Q,
300
- N,
301
- ee,
302
314
  te,
303
- W,
315
+ m,
316
+ f,
317
+ V,
318
+ Z,
319
+ j,
320
+ se,
321
+ ne,
322
+ oe,
323
+ B,
304
324
  C,
305
- z,
306
- b,
307
- O,
308
325
  J,
326
+ F,
327
+ D,
328
+ Q,
309
329
  y,
310
- h,
330
+ p,
311
331
  G,
312
- se,
332
+ re,
313
333
  l,
314
334
  S,
315
- d
335
+ a
316
336
  ]
317
337
  );
318
- return /* @__PURE__ */ Se(pe.Provider, { value: fe, children: n });
319
- }, Xe = ({
320
- sliceFilter: n,
338
+ return /* @__PURE__ */ Ee(me.Provider, { value: he, children: o });
339
+ }, Ve = ({
340
+ sliceFilter: o,
321
341
  persistedHierarchySelection: e,
322
342
  filters: s,
323
343
  merge: c = !0
324
344
  }) => L(() => {
325
- const f = (S) => ({
345
+ const d = (S) => ({
326
346
  id: "hierarchy",
327
347
  label: "Folder",
328
348
  type: "list_of_strings",
329
- values: Object.keys(S).filter((d) => S[d]).map((d) => ({ id: d, label: d })),
349
+ values: Object.keys(S).filter((a) => S[a]).map((a) => ({ id: a, label: a })),
330
350
  isCustom: !0,
331
351
  singleSelect: !0,
332
352
  fieldType: "folder",
333
353
  operator: "OR",
334
354
  isReadonly: !0
335
355
  });
336
- return n && e ? c ? [f(e), ...s] : [f(e)] : s;
337
- }, [n, e, s]), xe = async (n, e, s) => {
338
- const c = new Set(n.folderIds), l = new Set(n.taskIds), f = new Set(n.versionIds), S = new Set(n.productIds), d = {}, o = {}, y = {}, h = [];
339
- return n.taskIds.length && h.push(
356
+ return o && e ? c ? [d(e), ...s] : [d(e)] : s;
357
+ }, [o, e, s]), Re = async (o, e, s) => {
358
+ const c = new Set(o.folderIds), l = new Set(o.taskIds), d = new Set(o.versionIds), S = new Set(o.productIds), a = {}, r = {}, y = {}, p = [];
359
+ return o.taskIds.length && p.push(
340
360
  s(
341
- B.endpoints.GetTasksList.initiate({
361
+ U.endpoints.GetTasksList.initiate({
342
362
  projectName: e,
343
- taskIds: n.taskIds,
344
- first: n.taskIds.length
363
+ taskIds: o.taskIds,
364
+ first: o.taskIds.length
345
365
  })
346
366
  ).unwrap().then((w) => {
347
367
  for (const i of w.tasks)
348
- i.folderId && (c.add(i.folderId), d[i.id] = i.folderId);
368
+ i.folderId && (c.add(i.folderId), a[i.id] = i.folderId);
349
369
  })
350
- ), n.versionIds.length && h.push(
370
+ ), o.versionIds.length && p.push(
351
371
  s(
352
- B.endpoints.GetVersions.initiate({
372
+ U.endpoints.GetVersions.initiate({
353
373
  projectName: e,
354
- versionIds: n.versionIds,
355
- first: n.versionIds.length
374
+ versionIds: o.versionIds,
375
+ first: o.versionIds.length
356
376
  })
357
377
  ).unwrap().then((w) => {
358
378
  for (const i of w.versions)
359
- i.task?.id && l.add(i.task.id), i.product?.id && S.add(i.product.id), i.product?.folder?.id && (c.add(i.product.folder.id), o[i.id] = i.product.folder.id, i.product?.id && (y[i.product.id] = i.product.folder.id));
379
+ i.task?.id && l.add(i.task.id), i.product?.id && S.add(i.product.id), i.product?.folder?.id && (c.add(i.product.folder.id), r[i.id] = i.product.folder.id, i.product?.id && (y[i.product.id] = i.product.folder.id));
360
380
  })
361
- ), n.productIds.length && h.push(
381
+ ), o.productIds.length && p.push(
362
382
  s(
363
- B.endpoints.GetProducts.initiate({
383
+ U.endpoints.GetProducts.initiate({
364
384
  projectName: e,
365
- productIds: n.productIds,
366
- first: n.productIds.length
385
+ productIds: o.productIds,
386
+ first: o.productIds.length
367
387
  })
368
388
  ).unwrap().then((w) => {
369
389
  for (const i of w.products)
370
390
  i.folderId && (c.add(i.folderId), y[i.id] = i.folderId);
371
391
  })
372
- ), await Promise.all(h), {
392
+ ), await Promise.all(p), {
373
393
  folderIds: [...c],
374
394
  taskIds: [...l],
375
- versionIds: [...f],
395
+ versionIds: [...d],
376
396
  productIds: [...S],
377
- parentMaps: { taskFolderIds: d, versionFolderIds: o, productFolderIds: y }
397
+ parentMaps: { taskFolderIds: a, versionFolderIds: r, productFolderIds: y }
378
398
  };
379
399
  }, $ = {
380
400
  folderIds: [],
@@ -385,18 +405,18 @@ const me = () => {
385
405
  taskFolderIds: {},
386
406
  versionFolderIds: {},
387
407
  productFolderIds: {}
388
- }, ke = (n) => {
408
+ }, Le = (o) => {
389
409
  const e = {
390
410
  folder: /* @__PURE__ */ new Set(),
391
411
  task: /* @__PURE__ */ new Set(),
392
412
  version: /* @__PURE__ */ new Set(),
393
413
  product: /* @__PURE__ */ new Set()
394
414
  };
395
- for (const { entityType: s, entityIds: c } of n) {
415
+ for (const { entityType: s, entityIds: c } of o) {
396
416
  const l = e[s];
397
417
  if (l)
398
- for (const f of c)
399
- l.add(f);
418
+ for (const d of c)
419
+ l.add(d);
400
420
  }
401
421
  return {
402
422
  folderIds: [...e.folder],
@@ -404,46 +424,46 @@ const me = () => {
404
424
  versionIds: [...e.version],
405
425
  productIds: [...e.product]
406
426
  };
407
- }, ze = ({
408
- slices: n,
427
+ }, Ne = ({
428
+ slices: o,
409
429
  projectName: e
410
430
  }) => {
411
- const s = ge(), [c, l] = A($), [f, S] = A($), [d, o] = A(Y), [y, h] = A(""), w = n.find((E) => E.sliceType === "entityList")?.rowSelection, i = L(
412
- () => Object.keys(w ?? {}).filter((E) => w?.[E] && !E.startsWith("folder-")).sort(),
431
+ const s = xe(), [c, l] = O($), [d, S] = O($), [a, r] = O(Y), [y, p] = O(""), w = o.find((g) => g.sliceType === "entityList")?.rowSelection, i = L(
432
+ () => Object.keys(w ?? {}).filter((g) => w?.[g] && !g.startsWith("folder-")).sort(),
413
433
  [w]
414
434
  ), P = i.length && e ? `${e}|${i}` : "";
415
- return M(() => {
435
+ return A(() => {
416
436
  if (!P) {
417
- l($), S($), o(Y), h("");
437
+ l($), S($), r(Y), p("");
418
438
  return;
419
439
  }
420
- let E = !1;
440
+ let g = !1;
421
441
  return (async () => {
422
442
  try {
423
443
  const x = await Promise.all(
424
444
  i.map(
425
- (I) => s(
426
- Ie.endpoints.getListEntities.initiate({ projectName: e, listId: I })
445
+ (m) => s(
446
+ Pe.endpoints.getListEntities.initiate({ projectName: e, listId: m })
427
447
  ).unwrap()
428
448
  )
429
- ), t = ke(x);
430
- E || S(t);
431
- const { parentMaps: a, ...u } = await xe(
449
+ ), t = Le(x);
450
+ g || S(t);
451
+ const { parentMaps: u, ...f } = await Re(
432
452
  t,
433
453
  e,
434
454
  s
435
455
  );
436
- E || (l(u), o(a));
456
+ g || (l(f), r(u));
437
457
  } catch (x) {
438
- console.error("Error fetching entity list IDs:", x), E || (l($), S($), o(Y));
458
+ console.error("Error fetching entity list IDs:", x), g || (l($), S($), r(Y));
439
459
  } finally {
440
- E || h(P);
460
+ g || p(P);
441
461
  }
442
462
  })(), () => {
443
- E = !0;
463
+ g = !0;
444
464
  };
445
- }, [P, i, e, s]), { entityIds: c, rawEntityIds: f, parentMaps: d, isLoading: P !== y };
446
- }, ve = ({ slice: n, attribFields: e }) => {
465
+ }, [P, i, e, s]), { entityIds: c, rawEntityIds: d, parentMaps: a, isLoading: P !== y };
466
+ }, _e = ({ slice: o, attribFields: e }) => {
447
467
  const s = {
448
468
  assignees: "list_of_strings",
449
469
  status: "string",
@@ -452,69 +472,74 @@ const me = () => {
452
472
  author: "string",
453
473
  hierarchy: void 0,
454
474
  entityList: void 0,
455
- ...e.reduce((l, f) => (l["attrib." + f.name] = f.data.type, l), {})
475
+ ...e.reduce((l, d) => (l["attrib." + d.name] = d.data.type, l), {})
456
476
  };
457
477
  return (() => {
458
- if (!n) return null;
459
- const l = s[n?.sliceType], f = Object.entries(n.rowSelection).filter(([S, d]) => !!S && d).map(([S]) => ({
478
+ if (!o) return null;
479
+ const l = s[o?.sliceType], d = Object.entries(o.rowSelection).filter(([S, a]) => !!S && a).map(([S]) => ({
460
480
  id: S,
461
481
  label: S
462
482
  }));
463
483
  return {
464
- id: n?.sliceType,
465
- label: n?.sliceType,
484
+ id: o?.sliceType,
485
+ label: o?.sliceType,
466
486
  type: l,
467
487
  inverted: !1,
468
488
  operator: "OR",
469
- values: f
489
+ values: d
470
490
  };
471
491
  })();
472
- }, Te = ({
473
- slices: n,
492
+ }, Ce = ({
493
+ slices: o,
474
494
  attribFields: e
475
- }) => n.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) => ve({ slice: s, attribFields: e })).filter((s) => !!s), Je = (n) => {
476
- const { slices: e, getPanelSelection: s } = Ee(), { powerLicense: c, isLoading: l } = X(), f = L(() => {
477
- const d = e.map((o) => ({
478
- sliceType: o.sliceType,
479
- rowSelection: s(o.id)
495
+ }) => o.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) => _e({ slice: s, attribFields: e })).filter((s) => !!s), et = (o) => {
496
+ const { slices: e, getPanelSelection: s } = we(), { powerLicense: c, isLoading: l } = X(), d = L(() => {
497
+ const a = e.map((r) => ({
498
+ sliceType: r.sliceType,
499
+ rowSelection: s(r.id)
480
500
  }));
481
- return c ? d : d.slice(0, 1);
501
+ return c ? a : a.slice(0, 1);
482
502
  }, [e, s, c]), S = L(
483
- () => Te({ slices: f, attribFields: n }),
484
- [f, n]
503
+ () => Ce({ slices: d, attribFields: o }),
504
+ [d, o]
485
505
  );
486
506
  return {
487
- sliceSelections: f,
507
+ sliceSelections: d,
488
508
  sliceFilters: S,
489
509
  isLicensePending: e.length > 1 && l
490
510
  };
491
511
  };
492
512
  export {
493
- Ve as SLICER_DEFAULT_PANEL_HEIGHT,
494
- je as SLICER_MIN_PANEL_HEIGHT,
495
- ft as SLICER_PAGES_CONFIG,
496
- Ne as SLICER_SPLITTER_PANEL_CONFIG,
497
- et as SLICER_SPLITTER_STATE_KEY,
498
- tt as Slicer,
499
- pe as SlicerContext,
500
- qe as SlicerProvider,
501
- st as buildListFolderRowId,
502
- nt as clampDraggedHeights,
503
- ve as createFilterFromSlicer,
504
- Te as createFiltersFromSlicer,
505
- ot as defaultSliceOptions,
506
- rt as resolvePanelLayout,
507
- it as useEntityListsSlice,
508
- Xe as useFiltersWithHierarchy,
509
- ct as useHierarchyContextMenuItems,
510
- ht as useHierarchySelection,
511
- St as useOptionalSlicerContext,
512
- ze as useSelectedEntityIds,
513
- Ee as useSlicerContext,
514
- lt as useSlicerCounts,
515
- dt as useSlicerPanelHeights,
516
- Je as useSlicerPanelSelections,
517
- me as useSlicerRemotes,
518
- Pe as useSlicerRowSelection,
519
- at as useSlicerSplitter
513
+ nt as SLICER_DEFAULT_PANEL_HEIGHT,
514
+ ot as SLICER_MIN_PANEL_HEIGHT,
515
+ Pt as SLICER_PAGES_CONFIG,
516
+ rt as SLICER_SPLITTER_PANEL_CONFIG,
517
+ it as SLICER_SPLITTER_STATE_KEY,
518
+ ct as SLICE_DEFAULT_ORDER,
519
+ lt as Slicer,
520
+ me as SlicerContext,
521
+ je as SlicerProvider,
522
+ dt as buildListFolderRowId,
523
+ at as clampDraggedHeights,
524
+ _e as createFilterFromSlicer,
525
+ Ce as createFiltersFromSlicer,
526
+ ut as defaultSliceOptions,
527
+ ft as getDefaultSliceSort,
528
+ St as getSliceSortOptions,
529
+ yt as resolvePanelLayout,
530
+ pe as resolveSliceSort,
531
+ ht as sortSliceRows,
532
+ pt as useEntityListsSlice,
533
+ Ve as useFiltersWithHierarchy,
534
+ Et as useHierarchyContextMenuItems,
535
+ kt as useHierarchySelection,
536
+ xt as useOptionalSlicerContext,
537
+ Ne as useSelectedEntityIds,
538
+ we as useSlicerContext,
539
+ It as useSlicerCounts,
540
+ gt as useSlicerPanelHeights,
541
+ et as useSlicerPanelSelections,
542
+ ve as useSlicerRemotes,
543
+ Te as useSlicerRowSelection,
544
+ mt as useSlicerSplitter
520
545
  };