@ynput/ayon-frontend-shared 0.7.5 → 0.8.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 (74) hide show
  1. package/dist/DetailsPanel.es.js +471 -469
  2. package/dist/Feed.es.js +1 -1
  3. package/dist/ListTable.es.js +20 -20
  4. package/dist/NewEntity.es.js +7 -7
  5. package/dist/ProjectTreeTable.es.js +2523 -2502
  6. package/dist/ProjectsTable.es.js +5 -5
  7. package/dist/Slicer.es.js +28 -25
  8. package/dist/Views.es.js +150 -151
  9. package/dist/api.es.js +166 -165
  10. package/dist/chunks/Actions.es.js +9 -10
  11. package/dist/chunks/ColumnDropIndicator.es.js +4 -4
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +4 -5
  13. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +2 -2
  14. package/dist/chunks/DetailsDialog.es.js +3 -3
  15. package/dist/chunks/EmptyPlaceholder.es.js +7 -7
  16. package/dist/chunks/EntityPath.es.js +38 -39
  17. package/dist/chunks/EntityPickerDialog.es.js +482 -462
  18. package/dist/chunks/EntityTooltip.es.js +18 -19
  19. package/dist/chunks/Feed.es.js +1382 -1355
  20. package/dist/chunks/FilmstripEntityCard.es.js +5201 -0
  21. package/dist/chunks/FilterErrorActions.es.js +3 -4
  22. package/dist/chunks/GroupSettingsFallback.es.js +4 -4
  23. package/dist/chunks/Menu.es.js +242 -240
  24. package/dist/chunks/MetaWidget.es.js +1948 -1875
  25. package/dist/chunks/ProjectFoldersContext.es.js +237 -0
  26. package/dist/chunks/RepresentationsList.es.js +1 -1
  27. package/dist/chunks/ReviewablesSelector.es.js +1260 -1190
  28. package/dist/chunks/SimpleTable.es.js +303 -297
  29. package/dist/chunks/Slicer.es.js +420 -413
  30. package/dist/chunks/TableExportContextInstance.es.js +622 -378
  31. package/dist/chunks/TableSettingsFallback.es.js +3 -4
  32. package/dist/chunks/ThumbnailSimple.es.js +114 -99
  33. package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
  34. package/dist/chunks/VideoPlayer.es.js +8 -9
  35. package/dist/chunks/Watchers.es.js +929 -872
  36. package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
  37. package/dist/chunks/expandRelativeDates.es.js +1 -1
  38. package/dist/chunks/getThumbnailUrl.es.js +33 -21
  39. package/dist/chunks/getUris.es.js +1580 -1610
  40. package/dist/chunks/queryFilterToClientFilter.es.js +1 -1
  41. package/dist/chunks/realtimeUpdatesUtils.es.js +15 -15
  42. package/dist/chunks/searchTerms.es.js +773 -696
  43. package/dist/chunks/useAttributeEnums.es.js +22 -22
  44. package/dist/chunks/useDateRangeFilter.es.js +1 -1
  45. package/dist/chunks/useHierarchySelection.es.js +3 -4
  46. package/dist/chunks/useLoadModule.es.js +3 -4
  47. package/dist/components.es.js +1391 -1253
  48. package/dist/context.es.js +645 -668
  49. package/dist/hooks.es.js +193 -171
  50. package/dist/index.es.js +4 -4
  51. package/dist/types/Actions.d.ts +10 -8
  52. package/dist/types/DetailsPanel.d.ts +54 -76
  53. package/dist/types/EntityPickerDialog.d.ts +51 -2
  54. package/dist/types/Feed.d.ts +24 -24
  55. package/dist/types/ListTable.d.ts +33 -27
  56. package/dist/types/NewEntity.d.ts +26 -39
  57. package/dist/types/ProjectTreeTable.d.ts +318 -212
  58. package/dist/types/ProjectsTable.d.ts +6 -6
  59. package/dist/types/RepresentationsList.d.ts +4 -0
  60. package/dist/types/Slicer.d.ts +63 -246
  61. package/dist/types/Views.d.ts +71 -298
  62. package/dist/types/api.d.ts +3164 -2363
  63. package/dist/types/components.d.ts +537 -497
  64. package/dist/types/context.d.ts +293 -572
  65. package/dist/types/hooks.d.ts +76 -47
  66. package/dist/types/index.d.ts +6 -0
  67. package/dist/types/util.d.ts +141 -120
  68. package/dist/util.es.js +71 -68
  69. package/package.json +6 -6
  70. package/dist/chunks/EntityUpdatesContext.es.js +0 -61
  71. package/dist/chunks/PlayableIcon.es.js +0 -5020
  72. package/dist/chunks/ProjectContext.es.js +0 -158
  73. package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
  74. package/dist/chunks/viewUpdateHelper.es.js +0 -153
@@ -1,28 +1,28 @@
1
- import { jsxs as j, jsx as x, Fragment as le } from "react/jsx-runtime";
2
- import { useState as B, useRef as Q, useCallback as N, useEffect as S, useMemo as E } from "react";
3
- import { upperFirst as U } from "lodash";
1
+ import { jsxs as B, jsx as w, Fragment as ue } from "react/jsx-runtime";
2
+ import { useState as L, useRef as z, useCallback as M, useEffect as N, useMemo as E } from "react";
3
+ import { upperFirst as Z } from "lodash";
4
4
  import "primereact/confirmdialog";
5
5
  import "react-toastify";
6
6
  import "uuid";
7
- import { bw as ce } from "./searchTerms.es.js";
7
+ import { bw as pe } from "./searchTerms.es.js";
8
8
  import "axios";
9
- import { createPortal as de } from "react-dom";
10
- import { b as X, H as q, a as ue, S as pe, e as fe } from "./SimpleTable.es.js";
11
- import { InputText as he, theme as me, Dialog as ge, SwitchButton as be, Button as A } from "@ynput/ayon-react-components";
12
- import M from "styled-components";
13
- import { E as ve } from "./EmptyPlaceholder.es.js";
14
- import { a as V, E as we } from "./EntityTooltip.es.js";
15
- import { ci as ke } from "./getUris.es.js";
9
+ import { createPortal as fe } from "react-dom";
10
+ import { b as y, H as ee, a as me, S as he, e as ge } from "./SimpleTable.es.js";
11
+ import { InputText as be, theme as ve, Dialog as we, SwitchButton as ke, Button as H } from "@ynput/ayon-react-components";
12
+ import S from "styled-components";
13
+ import { E as xe } from "./EmptyPlaceholder.es.js";
14
+ import { a as U, E as Pe } from "./EntityTooltip.es.js";
15
+ import { cj as Te } from "./getUris.es.js";
16
16
  import "@module-federation/enhanced/runtime";
17
17
  import "@ynput/ayon-addon/host";
18
- import { y as xe, x as Te } from "./TableExportContextInstance.es.js";
18
+ import { s as Ie, q as Ce, k as Fe, t as Re } from "./TableExportContextInstance.es.js";
19
19
  import "semver";
20
20
  import "./ContextMenuContextInstance.es.js";
21
21
  import "clsx";
22
- import "react-redux";
23
22
  import "react-router-dom";
24
- import { g as W } from "./getThumbnailUrl.es.js";
25
- import { g as J } from "./getEntityTypeIcon.es.js";
23
+ import { g as A } from "./getThumbnailUrl.es.js";
24
+ import { g as te } from "./getEntityTypeIcon.es.js";
25
+ import { P as je, a as X } from "./ProjectFoldersContext.es.js";
26
26
  const I = {
27
27
  folder: ["folder"],
28
28
  product: ["folder", "product"],
@@ -30,68 +30,68 @@ const I = {
30
30
  representation: ["folder", "product", "version", "representation"],
31
31
  task: ["folder", "task"],
32
32
  workfile: ["folder", "task", "workfile"]
33
- }, Pe = (t, r, o) => t.map((e) => {
34
- const i = o?.find((s) => s.name === e.subType);
33
+ }, De = (e, s, n) => e.map((t) => {
34
+ const c = n?.find((a) => a.name === t.subType);
35
35
  return {
36
- id: e.id,
37
- name: e.name,
38
- label: e.label || e.name,
39
- parents: e.parents,
40
- icon: i?.icon || J(e.entityType),
41
- iconColor: i?.color,
42
- img: e.thumbnail ? W({ projectName: r, ...e.thumbnail }) : null,
43
- badge: e.taskName,
36
+ id: t.id,
37
+ name: t.name,
38
+ label: t.label || t.name,
39
+ parents: t.parents,
40
+ icon: c?.icon || te(t.entityType),
41
+ iconColor: c?.color,
42
+ img: t.thumbnail ? A({ projectName: s, ...t.thumbnail }) : null,
43
+ badge: t.taskName,
44
44
  subRows: [],
45
45
  data: {
46
- id: e.id,
47
- name: e.name,
48
- label: e.label || e.name,
49
- entityType: e.entityType,
46
+ id: t.id,
47
+ name: t.name,
48
+ label: t.label || t.name,
49
+ entityType: t.entityType,
50
50
  // a product has no tooltip data of its own, so point at its featured version
51
- tooltip: e.entityType === "product" ? e.thumbnail : void 0
51
+ tooltip: t.entityType === "product" ? t.thumbnail : void 0
52
52
  }
53
53
  };
54
- }), Ie = (t, r, o) => t.map((e) => {
55
- const i = o.find((s) => s.name === e.folderType);
54
+ }), Oe = (e, s, n) => e.map((t) => {
55
+ const c = n.find((a) => a.name === t.folderType);
56
56
  return {
57
- id: e.id,
58
- name: e.name,
59
- label: e.label || e.name,
60
- path: "/" + e.path,
61
- icon: i?.icon || J("folder"),
62
- iconColor: i?.color,
63
- img: W({
64
- projectName: r,
57
+ id: t.id,
58
+ name: t.name,
59
+ label: t.label || t.name,
60
+ path: "/" + t.path,
61
+ icon: c?.icon || te("folder"),
62
+ iconColor: c?.color,
63
+ img: A({
64
+ projectName: s,
65
65
  entityType: "folder",
66
- entityId: e.id,
67
- thumbnailHash: e.thumbnailHash
66
+ entityId: t.id,
67
+ thumbnailHash: t.thumbnailHash
68
68
  }),
69
69
  subRows: [],
70
70
  data: {
71
- id: e.id,
72
- name: e.name,
73
- label: e.label || e.name,
74
- folderType: e.folderType,
71
+ id: t.id,
72
+ name: t.name,
73
+ label: t.label || t.name,
74
+ folderType: t.folderType,
75
75
  entityType: "folder"
76
76
  }
77
77
  };
78
- }), Ce = (t, r) => {
79
- if (!t.length || !r.length)
78
+ }), Ne = (e, s) => {
79
+ if (!e.length || !s.length)
80
80
  return {};
81
- const o = /* @__PURE__ */ new Map();
82
- for (const s of r)
83
- o.set(s.id, s);
84
- const e = /* @__PURE__ */ new Set();
85
- for (const s of t) {
86
- let l = o.get(s);
87
- for (; l?.parentId; )
88
- e.add(l.parentId), l = o.get(l.parentId);
81
+ const n = /* @__PURE__ */ new Map();
82
+ for (const a of s)
83
+ n.set(a.id, a);
84
+ const t = /* @__PURE__ */ new Set();
85
+ for (const a of e) {
86
+ let i = n.get(a);
87
+ for (; i?.parentId; )
88
+ t.add(i.parentId), i = n.get(i.parentId);
89
89
  }
90
- const i = {};
91
- for (const s of e)
92
- i[s] = !0;
93
- return i;
94
- }, De = M.div`
90
+ const c = {};
91
+ for (const a of t)
92
+ c[a] = !0;
93
+ return c;
94
+ }, Ee = S.div`
95
95
  position: relative;
96
96
  width: 100%;
97
97
  padding: 4px;
@@ -100,441 +100,450 @@ const I = {
100
100
  width: 100%;
101
101
  min-width: 0;
102
102
  }
103
- `, Re = M(X)`
103
+ `, Se = S(y)`
104
104
  position: absolute;
105
105
  top: 50%;
106
106
  right: 6px;
107
107
  transform: translateY(-50%);
108
- `, Fe = ({ value: t, onChange: r, onClose: o, className: e }) => /* @__PURE__ */ j(De, { className: e, children: [
109
- /* @__PURE__ */ x(
110
- he,
108
+ `, Me = ({ value: e, onChange: s, onClose: n, className: t }) => /* @__PURE__ */ B(Ee, { className: t, children: [
109
+ /* @__PURE__ */ w(
110
+ be,
111
111
  {
112
- value: t,
113
- onChange: (i) => r(i.target.value),
112
+ value: e,
113
+ onChange: (c) => s(c.target.value),
114
114
  placeholder: "Search",
115
115
  autoFocus: !0,
116
- onKeyDown: (i) => {
117
- i.key === "Escape" && o();
116
+ onKeyDown: (c) => {
117
+ c.key === "Escape" && n();
118
118
  }
119
119
  }
120
120
  ),
121
- /* @__PURE__ */ x(Re, { icon: "close", variant: "text", onClick: o })
122
- ] }), Oe = M(q)`
121
+ /* @__PURE__ */ w(Se, { icon: "close", variant: "text", onClick: n })
122
+ ] }), Le = S(ee)`
123
123
  flex-direction: column;
124
- `, Se = M(q)`
124
+ `, Be = S(ee)`
125
125
  padding: 0;
126
126
  border: none;
127
- `, Ee = M.span`
127
+ `, Ke = S.span`
128
128
  display: flex;
129
129
  align-items: center;
130
- ${me.labelLarge}
130
+ ${ve.labelLarge}
131
131
  height: 32px;
132
132
  padding-left: 4px;
133
133
  white-space: nowrap;
134
134
  overflow: hidden;
135
135
  width: 100%;
136
- `, Me = M.div`
136
+ `, $e = S.div`
137
137
  display: flex;
138
138
  gap: var(--base-gap-small);
139
- `, Le = ({
140
- title: t,
141
- search: r,
142
- onSearch: o,
143
- buttonLabels: e = {}
139
+ `, _e = ({
140
+ title: e,
141
+ search: s,
142
+ onSearch: n,
143
+ buttonLabels: t = {}
144
144
  }) => {
145
- const i = {
145
+ const c = {
146
146
  icon: "search",
147
147
  tooltip: "Search projects",
148
- ...e.search
148
+ ...t.search
149
149
  };
150
- return /* @__PURE__ */ j(Oe, { className: "projects-list-header", children: [
151
- /* @__PURE__ */ j(Se, { className: "projects-list-header-top", children: [
152
- /* @__PURE__ */ x(Ee, { children: t }),
153
- /* @__PURE__ */ x(Me, { className: "projects-list-header-buttons", children: /* @__PURE__ */ x(
154
- X,
150
+ return /* @__PURE__ */ B(Le, { className: "projects-list-header", children: [
151
+ /* @__PURE__ */ B(Be, { className: "projects-list-header-top", children: [
152
+ /* @__PURE__ */ w(Ke, { children: e }),
153
+ /* @__PURE__ */ w($e, { className: "projects-list-header-buttons", children: /* @__PURE__ */ w(
154
+ y,
155
155
  {
156
- icon: i.icon,
157
- "data-tooltip": i.tooltip,
158
- "data-shortcut": i.shortcut,
159
- onClick: () => typeof r != "string" && o(""),
156
+ icon: c.icon,
157
+ "data-tooltip": c.tooltip,
158
+ "data-shortcut": c.shortcut,
159
+ onClick: () => typeof s != "string" && n(""),
160
160
  className: "search-projects"
161
161
  }
162
162
  ) })
163
163
  ] }),
164
- typeof r == "string" && /* @__PURE__ */ x(Fe, { value: r, onChange: o, onClose: () => o(void 0) })
164
+ typeof s == "string" && /* @__PURE__ */ w(Me, { value: s, onChange: n, onClose: () => n(void 0) })
165
165
  ] });
166
- }, Ne = 150, Be = (t, r) => {
167
- const o = V.includes(t) || t === "product", [e, i] = B(null), s = Q(), l = N(() => clearTimeout(s.current), []), n = N(() => {
168
- l(), i(null);
169
- }, [l]), u = N(() => {
170
- l(), s.current = setTimeout(() => i(null), Ne);
171
- }, [l]);
172
- S(() => n, [n, t]), S(() => {
173
- if (e)
174
- return window.addEventListener("scroll", n, !0), () => window.removeEventListener("scroll", n, !0);
175
- }, [e, n]);
176
- const f = N(
177
- (c) => {
178
- const a = r?.find((p) => p.id === c)?.data?.tooltip || { entityType: t, entityId: c };
179
- return V.includes(a.entityType) && a.entityId ? a : null;
166
+ }, Ge = 150, We = (e, s) => {
167
+ const n = U.includes(e) || e === "product", [t, c] = L(null), a = z(), i = M(() => clearTimeout(a.current), []), o = M(() => {
168
+ i(), c(null);
169
+ }, [i]), p = M(() => {
170
+ i(), a.current = setTimeout(() => c(null), Ge);
171
+ }, [i]);
172
+ N(() => o, [o, e]), N(() => {
173
+ if (t)
174
+ return window.addEventListener("scroll", o, !0), () => window.removeEventListener("scroll", o, !0);
175
+ }, [t, o]);
176
+ const m = M(
177
+ (d) => {
178
+ const r = s?.find((u) => u.id === d)?.data?.tooltip || { entityType: e, entityId: d };
179
+ return U.includes(r.entityType) && r.entityId ? r : null;
180
180
  },
181
- [r, t]
182
- ), h = N(
183
- (c) => {
184
- if (!o) return;
185
- const g = c.currentTarget.id, a = c.target.closest(".image");
186
- if (!g || !a) return n();
187
- if (e?.rowId === g) return l();
188
- const p = f(g);
189
- if (!p) return n();
190
- const { left: k, top: w, width: P } = a.getBoundingClientRect();
191
- l(), i({ ...p, rowId: g, pos: { left: k + P / 2, top: w } });
181
+ [s, e]
182
+ ), h = M(
183
+ (d) => {
184
+ if (!n) return;
185
+ const g = d.currentTarget.id, r = d.target.closest(".image");
186
+ if (!g || !r) return o();
187
+ if (t?.rowId === g) return i();
188
+ const u = m(g);
189
+ if (!u) return o();
190
+ const { left: k, top: f, width: T } = r.getBoundingClientRect();
191
+ i(), c({ ...u, rowId: g, pos: { left: k + T / 2, top: f } });
192
192
  },
193
- [o, e, n, l, f]
193
+ [n, t, o, i, m]
194
194
  );
195
195
  return {
196
- hovered: o ? e : null,
196
+ hovered: n ? t : null,
197
197
  onMouseOver: h,
198
- onMouseLeave: u,
199
- tooltipProps: { onMouseEnter: l, onMouseLeave: n }
198
+ onMouseLeave: p,
199
+ tooltipProps: { onMouseEnter: i, onMouseLeave: o }
200
200
  };
201
- }, je = ({
202
- entityType: t,
203
- projectName: r,
204
- tableData: o,
205
- isLoading: e = !1,
206
- error: i,
207
- search: s,
208
- onSearch: l,
209
- isFolderHierarchy: n,
210
- isMultiSelect: u,
211
- onRowSubmit: f,
201
+ }, Ye = ({
202
+ entityType: e,
203
+ projectName: s,
204
+ tableData: n,
205
+ isLoading: t = !1,
206
+ error: c,
207
+ search: a,
208
+ onSearch: i,
209
+ isFolderHierarchy: o,
210
+ isMultiSelect: p,
211
+ onRowSubmit: m,
212
212
  onScrollBottom: h
213
213
  }) => {
214
- const c = Be(t, o), g = (a) => {
215
- a.preventDefault();
216
- const p = a.currentTarget.id, k = o.find((w) => w.id === p);
217
- p && !k?.isDisabled && f?.(p);
214
+ const d = We(e, n), g = (r) => {
215
+ r.preventDefault();
216
+ const u = r.currentTarget.id, k = n.find((f) => f.id === u);
217
+ u && !k?.isDisabled && m?.(u);
218
218
  };
219
- return /* @__PURE__ */ j(ue, { children: [
220
- /* @__PURE__ */ x(
221
- Le,
219
+ return /* @__PURE__ */ B(me, { children: [
220
+ /* @__PURE__ */ w(
221
+ _e,
222
222
  {
223
- search: s,
224
- onSearch: l,
225
- title: U(t) + "s"
223
+ search: a,
224
+ onSearch: i,
225
+ title: Z(e) + "s"
226
226
  }
227
227
  ),
228
- !e && !o?.length && /* @__PURE__ */ x(ve, { message: `No ${t}s found.`, error: i }),
229
- /* @__PURE__ */ x(
230
- pe,
228
+ !t && !n?.length && /* @__PURE__ */ w(xe, { message: `No ${e}s found.`, error: c }),
229
+ /* @__PURE__ */ w(
230
+ he,
231
231
  {
232
- data: o,
233
- isLoading: e,
234
- isExpandable: n,
232
+ data: n,
233
+ isLoading: t,
234
+ isExpandable: o,
235
235
  rowHeight: 34,
236
236
  imgRatio: 16 / 9,
237
237
  imgPosition: "end",
238
- isMultiSelect: u,
238
+ isMultiSelect: p,
239
239
  onScrollBottom: h,
240
240
  pt: {
241
241
  row: {
242
242
  onDoubleClick: g,
243
- onMouseOver: c.onMouseOver,
244
- onMouseLeave: c.onMouseLeave
243
+ onMouseOver: d.onMouseOver,
244
+ onMouseLeave: d.onMouseLeave
245
245
  }
246
246
  }
247
247
  }
248
248
  ),
249
- c.hovered && de(
250
- /* @__PURE__ */ x(
251
- we,
249
+ d.hovered && fe(
250
+ /* @__PURE__ */ w(
251
+ Pe,
252
252
  {
253
- entityType: c.hovered.entityType,
254
- entityId: c.hovered.entityId,
255
- projectName: r,
256
- pos: c.hovered.pos,
257
- ...c.tooltipProps
253
+ entityType: d.hovered.entityType,
254
+ entityId: d.hovered.entityId,
255
+ projectName: s,
256
+ pos: d.hovered.pos,
257
+ ...d.tooltipProps
258
258
  }
259
259
  ),
260
260
  document.body
261
261
  )
262
262
  ] });
263
- }, ye = ({
264
- projectName: t,
265
- folderTypes: r,
266
- includeColors: o = !1,
267
- includeThumbnails: e = !1
263
+ }, ze = ({
264
+ projectName: e,
265
+ folderTypes: s,
266
+ includeColors: n = !1,
267
+ includeThumbnails: t = !1
268
268
  }) => {
269
- const { folders: i, isLoading: s } = xe(), l = (a) => r.find((k) => k.name === a)?.icon || "folder", n = (a) => o ? r.find((k) => k.name === a)?.color : void 0, u = (a) => !e || !t ? null : W({
270
- projectName: t,
269
+ const { folders: c, isLoading: a } = Ie(), i = (r) => s.find((k) => k.name === r)?.icon || "folder", o = (r) => n ? s.find((k) => k.name === r)?.color : void 0, p = (r) => !t || !e ? null : A({
270
+ projectName: e,
271
271
  entityType: "folder",
272
- entityId: a.id,
273
- thumbnailHash: a.thumbnailHash
274
- }), f = (a) => ({
275
- id: a.id,
276
- parentId: a.parentId,
277
- name: a.name,
278
- label: a.label || a.name,
279
- icon: l(a.folderType),
280
- iconColor: n(a.folderType),
281
- img: u(a),
272
+ entityId: r.id,
273
+ thumbnailHash: r.thumbnailHash
274
+ }), m = (r) => ({
275
+ id: r.id,
276
+ parentId: r.parentId,
277
+ name: r.name,
278
+ label: r.label || r.name,
279
+ icon: i(r.folderType),
280
+ iconColor: o(r.folderType),
281
+ img: p(r),
282
282
  data: {
283
- id: a.id,
284
- name: a.name,
285
- label: a.label || a.name,
286
- subType: a.folderType,
287
- path: a.path,
288
- parents: a.parents
283
+ id: r.id,
284
+ name: r.name,
285
+ label: r.label || r.name,
286
+ subType: r.folderType,
287
+ path: r.path,
288
+ parents: r.parents
289
289
  }
290
- }), h = (a, p = "id", k = "parentId") => {
291
- const w = /* @__PURE__ */ new Map(), P = [], F = [...a].sort(
292
- (m, v) => (m.label || m.name).localeCompare(v.label || v.name)
290
+ }), h = (r, u = "id", k = "parentId") => {
291
+ const f = /* @__PURE__ */ new Map(), T = [], j = [...r].sort(
292
+ (b, x) => (b.label || b.name).localeCompare(x.label || x.name)
293
293
  );
294
- for (let m = 0; m < F.length; m++) {
295
- const v = F[m], C = v[p], T = {
296
- ...f(v),
294
+ for (let b = 0; b < j.length; b++) {
295
+ const x = j[b], C = x[u], P = {
296
+ ...m(x),
297
297
  subRows: []
298
298
  };
299
- w.set(C, T);
299
+ f.set(C, P);
300
300
  }
301
- for (let m = 0; m < F.length; m++) {
302
- const v = F[m], C = v[p], T = v[k], R = w.get(C);
303
- if (T) {
304
- const y = w.get(T);
305
- y && y.subRows.push(R);
301
+ for (let b = 0; b < j.length; b++) {
302
+ const x = j[b], C = x[u], P = x[k], R = f.get(C);
303
+ if (P) {
304
+ const K = f.get(P);
305
+ K && K.subRows.push(R);
306
306
  } else
307
- P.push(R);
307
+ T.push(R);
308
308
  }
309
- const D = [];
310
- for (const m of w.values())
311
- (!m.parentId || !w.has(m.parentId)) && D.push(m);
312
- for (; D.length; ) {
313
- const m = D.pop(), v = [...m.parents ?? [], m.label || ""];
314
- for (const C of m.subRows)
315
- C.parents = v, D.push(C);
309
+ const F = [];
310
+ for (const b of f.values())
311
+ (!b.parentId || !f.has(b.parentId)) && F.push(b);
312
+ for (; F.length; ) {
313
+ const b = F.pop(), x = [...b.parents ?? [], b.label || ""];
314
+ for (const C of b.subRows)
315
+ C.parents = x, F.push(C);
316
316
  }
317
- return P;
318
- }, c = E(() => !i.length || s ? [] : h(i), [i, r, s, e, t]), g = N(async () => c, [c]);
317
+ return T;
318
+ }, d = E(() => !c.length || a ? [] : h(c), [c, s, a, t, e]), g = M(async () => d, [d]);
319
319
  return {
320
- data: c,
321
- folders: i,
320
+ data: d,
321
+ folders: c,
322
322
  getData: g,
323
- isFetching: s
323
+ isFetching: a
324
324
  };
325
- }, Ke = ({
326
- projectName: t,
327
- entityType: r,
328
- search: o,
329
- selection: e,
330
- reviewablesOnly: i,
331
- includeTask: s
325
+ }, Ae = ({
326
+ projectName: e,
327
+ entityType: s,
328
+ search: n,
329
+ selection: t,
330
+ reviewablesOnly: c,
331
+ includeTask: a
332
332
  }) => {
333
- const l = I[r] || [], n = Te(), {
334
- data: u,
335
- folders: f,
333
+ const i = I[s] || [], o = Ce(), {
334
+ data: p,
335
+ folders: m,
336
336
  isFetching: h
337
- } = ye({
338
- projectName: t,
339
- folderTypes: n?.folderTypes || [],
337
+ } = ze({
338
+ projectName: e,
339
+ folderTypes: o?.folderTypes || [],
340
340
  includeColors: !0,
341
341
  includeThumbnails: !0
342
- }), c = E(
343
- () => ce(
344
- f,
345
- o.folder ?? "",
346
- (v) => [v.name, v.label, v.path].join(" ")
342
+ }), d = E(
343
+ () => pe(
344
+ m,
345
+ n.folder ?? "",
346
+ (x) => [x.name, x.label, x.path].join(" ")
347
347
  ),
348
- [f, o.folder]
348
+ [m, n.folder]
349
349
  ), g = E(
350
- () => o.folder ? Ie(c, t, n?.folderTypes || []) : u,
351
- [c, u, o.folder, n, t]
352
- ), a = {
353
- data: c,
350
+ () => n.folder ? Oe(d, e, o?.folderTypes || []) : p,
351
+ [d, p, n.folder, o, e]
352
+ ), r = {
353
+ data: d,
354
354
  table: g,
355
355
  isLoading: h
356
- }, p = (v, C = []) => {
357
- const T = e[v];
358
- return T?.length > 0 ? T : C ? C.map((R) => R.id) : void 0;
359
- }, k = { includeTask: s, hasReviewables: i || void 0 }, w = K(
360
- t,
356
+ }, u = (x, C = []) => {
357
+ const P = t[x];
358
+ return P?.length > 0 ? P : C ? C.map((R) => R.id) : void 0;
359
+ }, k = { includeTask: a, hasReviewables: c || void 0 }, f = _(
360
+ e,
361
361
  "task",
362
- o.task,
363
- !l.includes("task"),
364
- p(I.task[I.task.length - 2], c),
365
- n?.taskTypes
366
- ), P = K(
367
- t,
362
+ n.task,
363
+ !i.includes("task"),
364
+ u(I.task[I.task.length - 2], d),
365
+ o?.taskTypes
366
+ ), T = _(
367
+ e,
368
368
  "product",
369
- o.product,
370
- !l.includes("product"),
371
- p(
369
+ n.product,
370
+ !i.includes("product"),
371
+ u(
372
372
  I.product[I.product.length - 2],
373
- a.data
373
+ r.data
374
374
  ),
375
- n?.productTypes,
375
+ o?.productTypes,
376
376
  k
377
- ), F = K(
378
- t,
377
+ ), j = _(
378
+ e,
379
379
  "version",
380
- o.version,
381
- !l.includes("version"),
382
- p(
380
+ n.version,
381
+ !i.includes("version"),
382
+ u(
383
383
  I.version[I.version.length - 2],
384
- P.data
384
+ T.data
385
385
  ),
386
386
  void 0,
387
387
  k
388
- ), D = K(
389
- t,
388
+ ), F = _(
389
+ e,
390
390
  "representation",
391
- o.representation,
392
- !l.includes("representation"),
393
- p(
391
+ n.representation,
392
+ !i.includes("representation"),
393
+ u(
394
394
  I.representation[I.representation.length - 2],
395
- F.data
395
+ j.data
396
396
  )
397
- ), m = K(
398
- t,
397
+ ), b = _(
398
+ e,
399
399
  "workfile",
400
- o.workfile,
401
- !l.includes("workfile"),
402
- p(
400
+ n.workfile,
401
+ !i.includes("workfile"),
402
+ u(
403
403
  I.workfile[I.workfile.length - 2],
404
- w.data
404
+ f.data
405
405
  )
406
406
  );
407
407
  return {
408
- folder: a,
409
- task: w,
410
- product: P,
411
- version: F,
412
- representation: D,
413
- workfile: m
408
+ folder: r,
409
+ task: f,
410
+ product: T,
411
+ version: j,
412
+ representation: F,
413
+ workfile: b
414
414
  };
415
- }, K = (t, r, o, e, i, s, { includeTask: l, hasReviewables: n } = {}) => {
416
- const { data: u, isFetching: f, hasNextPage: h, fetchNextPage: c, isFetchingNextPage: g, error: a } = ke(
415
+ }, _ = (e, s, n, t, c, a, { includeTask: i, hasReviewables: o } = {}) => {
416
+ const { data: p, isFetching: m, hasNextPage: h, fetchNextPage: d, isFetchingNextPage: g, error: r } = Te(
417
417
  {
418
- projectName: t,
419
- entityType: r,
420
- search: o,
421
- parentIds: i,
422
- hasReviewables: n,
423
- includeTask: l
418
+ projectName: e,
419
+ entityType: s,
420
+ search: n,
421
+ parentIds: c,
422
+ hasReviewables: o,
423
+ includeTask: i
424
424
  },
425
425
  // skip if this is folder hierarchy (we already have the folders) or if we're waiting for parent selection
426
426
  {
427
- skip: e
427
+ skip: t
428
428
  }
429
- ), p = E(() => u?.pages.flatMap((w) => w.entities) || [], [u]), k = E(
430
- () => Pe(p, t, s),
431
- [p, t, s]
429
+ ), u = E(() => p?.pages.flatMap((f) => f.entities) || [], [p]), k = E(
430
+ () => De(u, e, a),
431
+ [u, e, a]
432
432
  );
433
433
  return {
434
- data: p,
434
+ data: u,
435
435
  table: k,
436
- isLoading: f,
436
+ isLoading: m,
437
437
  isFetchingNextPage: g,
438
438
  hasNextPage: h,
439
- fetchNextPage: c,
440
- error: a
439
+ fetchNextPage: d,
440
+ error: r
441
441
  };
442
- }, $e = ({
443
- foldersSelection: t,
444
- foldersData: r
442
+ }, Ve = ({
443
+ foldersSelection: e,
444
+ foldersData: s
445
445
  }) => {
446
- const [o, e] = B({}), i = E(() => t ? Object.keys(t).filter((u) => t[u] === !0) : [], [t]), s = E(() => r?.data, [r?.data]), [l, n] = B(!1);
447
- return S(() => {
448
- if (i.length === 0 || !s?.length || l)
446
+ const [n, t] = L({}), c = E(() => e ? Object.keys(e).filter((p) => e[p] === !0) : [], [e]), a = E(() => s?.data, [s?.data]), [i, o] = L(!1);
447
+ return N(() => {
448
+ if (c.length === 0 || !a?.length || i)
449
449
  return;
450
- const u = Ce(i, s);
451
- e(u), n(!0);
452
- }, [i, s, n, l]), [o, e];
453
- }, _e = ({
454
- entityHierarchy: t,
455
- entityData: r,
456
- rowSelection: o,
457
- setEntityRowSelection: e
450
+ const p = Ne(c, a);
451
+ t(p), o(!0);
452
+ }, [c, a, o, i]), [n, t];
453
+ }, Qe = ({
454
+ entityHierarchy: e,
455
+ entityData: s,
456
+ rowSelection: n,
457
+ setEntityRowSelection: t
458
458
  }) => {
459
- const i = Q({
459
+ const c = z({
460
460
  selectedNames: {},
461
461
  pendingNameMatches: {},
462
462
  skipDetection: !1,
463
463
  prevParentKeys: {}
464
464
  });
465
- S(() => {
466
- const s = i.current, l = {};
467
- for (let n = 0; n < t.length - 1; n++) {
468
- const u = t[n], f = o[u] || {};
469
- l[u] = Object.keys(f).filter((h) => f[h]).sort().join(",");
465
+ N(() => {
466
+ const a = c.current, i = {};
467
+ for (let o = 0; o < e.length - 1; o++) {
468
+ const p = e[o], m = n[p] || {};
469
+ i[p] = Object.keys(m).filter((h) => m[h]).sort().join(",");
470
470
  }
471
- if (s.skipDetection) {
472
- s.prevParentKeys = l, s.skipDetection = !1;
471
+ if (a.skipDetection) {
472
+ a.prevParentKeys = i, a.skipDetection = !1;
473
473
  return;
474
474
  }
475
- for (let n = 0; n < t.length - 1; n++) {
476
- const u = t[n], f = s.prevParentKeys[u];
477
- if (f !== void 0 && f !== l[u]) {
478
- if (l[u] === "")
479
- for (let c = n + 1; c < t.length; c++)
480
- s.skipDetection = !0, e({}, t[c]);
475
+ for (let o = 0; o < e.length - 1; o++) {
476
+ const p = e[o], m = a.prevParentKeys[p];
477
+ if (m !== void 0 && m !== i[p]) {
478
+ if (i[p] === "")
479
+ for (let d = o + 1; d < e.length; d++)
480
+ a.skipDetection = !0, t({}, e[d]);
481
481
  else
482
- for (let c = n + 1; c < t.length; c++) {
483
- const g = t[c], a = s.selectedNames[g];
484
- a?.length && (s.pendingNameMatches[g] = new Set(a));
482
+ for (let d = o + 1; d < e.length; d++) {
483
+ const g = e[d], r = a.selectedNames[g];
484
+ r?.length && (a.pendingNameMatches[g] = new Set(r));
485
485
  }
486
486
  break;
487
487
  }
488
488
  }
489
- s.prevParentKeys = l;
490
- }, [t, o]), S(() => {
491
- const s = i.current;
492
- for (const l of t) {
493
- const n = o[l] || {}, u = new Set(Object.keys(n).filter((h) => n[h])), f = r[l]?.data || [];
494
- s.selectedNames[l] = f.filter((h) => u.has(h.id)).map((h) => h.name);
489
+ a.prevParentKeys = i;
490
+ }, [e, n]), N(() => {
491
+ const a = c.current;
492
+ for (const i of e) {
493
+ const o = n[i] || {}, p = new Set(Object.keys(o).filter((h) => o[h])), m = s[i]?.data || [];
494
+ a.selectedNames[i] = m.filter((h) => p.has(h.id)).map((h) => h.name);
495
495
  }
496
- }, [t, o, r]), S(() => {
497
- const s = i.current, l = /* @__PURE__ */ new Set();
498
- for (const n of t) {
499
- const u = s.pendingNameMatches[n];
500
- if (!u?.size) continue;
501
- const f = t.indexOf(n);
502
- if (t.slice(0, f).some(
503
- (p) => s.pendingNameMatches[p]?.size || l.has(p)
496
+ }, [e, n, s]), N(() => {
497
+ const a = c.current, i = /* @__PURE__ */ new Set();
498
+ for (const o of e) {
499
+ const p = a.pendingNameMatches[o];
500
+ if (!p?.size) continue;
501
+ const m = e.indexOf(o);
502
+ if (e.slice(0, m).some(
503
+ (u) => a.pendingNameMatches[u]?.size || i.has(u)
504
504
  )) continue;
505
- const { isLoading: c, data: g } = r[n];
506
- if (c) continue;
507
- if (delete s.pendingNameMatches[n], l.add(n), !g?.length) {
508
- s.skipDetection = !0, e({}, n);
505
+ const { isLoading: d, data: g } = s[o];
506
+ if (d) continue;
507
+ if (delete a.pendingNameMatches[o], i.add(o), !g?.length) {
508
+ a.skipDetection = !0, t({}, o);
509
509
  continue;
510
510
  }
511
- const a = {};
512
- for (const p of g)
513
- u.has(p.name) && (a[p.id] = !0);
514
- s.skipDetection = !0, e(a, n);
511
+ const r = {};
512
+ for (const u of g)
513
+ p.has(u.name) && (r[u.id] = !0);
514
+ a.skipDetection = !0, t(r, o);
515
515
  }
516
- }, [t, r, e]);
517
- }, Ge = ({
518
- entityHierarchy: t,
519
- entityData: r,
520
- rowSelection: o,
521
- setEntityRowSelection: e
516
+ }, [e, s, t]);
517
+ }, J = (e = {}) => Object.keys(e).filter((s) => e[s]), qe = ({
518
+ entityHierarchy: e,
519
+ entityData: s,
520
+ rowSelection: n,
521
+ setEntityRowSelection: t,
522
+ initialSelection: c
522
523
  }) => {
523
- S(() => {
524
- for (const i of t) {
525
- if (i === "folder") continue;
526
- const { data: s, isLoading: l } = r[i];
527
- if (l) continue;
528
- const n = o[i] || {}, u = Object.keys(n).filter((c) => n[c]);
529
- if (!u.length) continue;
530
- const f = new Set(s.map((c) => c.id)), h = u.filter((c) => f.has(c));
531
- h.length !== u.length && e(
532
- Object.fromEntries(h.map((c) => [c, !0])),
533
- i
524
+ const a = z(null);
525
+ N(() => {
526
+ const i = a.current ??= Object.fromEntries(
527
+ e.map((o) => [o, new Set(J(c?.[o]))])
528
+ );
529
+ for (const o of e) {
530
+ if (o === "folder") continue;
531
+ const { data: p, isLoading: m } = s[o];
532
+ if (m) continue;
533
+ const h = n[o] || {}, d = J(h), g = new Set(p.map((f) => f.id)), r = i[o] ?? /* @__PURE__ */ new Set();
534
+ for (const f of r)
535
+ (g.has(f) || !h[f]) && r.delete(f);
536
+ if (!d.length) continue;
537
+ const u = e.slice(0, e.indexOf(o) + 1).some((f) => s[f].hasNextPage || s[f].isFetchingNextPage), k = d.filter(
538
+ (f) => g.has(f) || r.has(f) && u
539
+ );
540
+ k.length !== d.length && t(
541
+ Object.fromEntries(k.map((f) => [f, !0])),
542
+ o
534
543
  );
535
544
  }
536
- }, [t, r, o, e]);
537
- }, He = 600, We = M.div`
545
+ }, [e, s, n, t, c]);
546
+ }, He = 600, Ue = S.div`
538
547
  display: grid;
539
548
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
540
549
  gap: var(--base-gap-large);
@@ -551,122 +560,132 @@ const I = {
551
560
  }
552
561
  }
553
562
  }
554
- `, gt = ({
555
- projectName: t,
556
- entityType: r,
557
- initialSelection: o,
558
- isMultiSelect: e,
559
- onSubmit: i,
560
- showMoveToRoot: s,
561
- onMoveToRoot: l,
562
- disabledIds: n = [],
563
- disabledMessage: u = "Cannot select this item",
564
- getDisabledMessage: f,
563
+ `, Tt = (e) => {
564
+ const s = Fe(), n = Re(), t = /* @__PURE__ */ w(Xe, { ...e });
565
+ return s?.projectName !== e.projectName ? /* @__PURE__ */ w(je, { projectName: e.projectName, children: /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) }) : n?.projectName !== e.projectName ? /* @__PURE__ */ w(X, { projectName: e.projectName, children: t }) : t;
566
+ }, Xe = ({
567
+ projectName: e,
568
+ entityType: s,
569
+ initialSelection: n,
570
+ isMultiSelect: t,
571
+ onSubmit: c,
572
+ showMoveToRoot: a,
573
+ onMoveToRoot: i,
574
+ disabledIds: o = [],
575
+ disabledMessage: p = "Cannot select this item",
576
+ getDisabledMessage: m,
565
577
  reviewableRequired: h,
566
- showReviewablesSwitch: c,
578
+ showReviewablesSwitch: d,
567
579
  defaultReviewablesOnly: g = !1,
568
- showTaskNames: a,
569
- isLoading: p,
580
+ showTaskNames: r,
581
+ isLoading: u,
570
582
  ...k
571
583
  }) => {
572
- const w = {
573
- folder: o?.folder || {},
574
- task: o?.task || {},
575
- product: o?.product || {},
576
- version: o?.version || {},
577
- representation: o?.representation || {},
578
- workfile: o?.workfile || {}
579
- }, [P, F] = B(w), D = (d, b) => {
580
- F((O) => ({
581
- ...O,
582
- [b]: d
584
+ const f = {
585
+ folder: n?.folder || {},
586
+ task: n?.task || {},
587
+ product: n?.product || {},
588
+ version: n?.version || {},
589
+ representation: n?.representation || {},
590
+ workfile: n?.workfile || {}
591
+ }, [T, j] = L(f), F = (l, v) => {
592
+ j((D) => ({
593
+ ...D,
594
+ [v]: l
583
595
  }));
584
- }, [m, v] = B({
596
+ }, [b, x] = L({
585
597
  folder: void 0,
586
598
  task: void 0,
587
599
  product: void 0,
588
600
  version: void 0,
589
601
  representation: void 0,
590
602
  workfile: void 0
591
- }), C = (d, b) => {
592
- v((O) => ({
593
- ...O,
594
- [b]: d
603
+ }), C = (l, v) => {
604
+ x((D) => ({
605
+ ...D,
606
+ [v]: l
595
607
  }));
596
- }, T = Object.fromEntries(
597
- Object.entries(P).map(([d, b]) => [
598
- d,
599
- Object.keys(b).filter((O) => b[O])
608
+ }, P = Object.fromEntries(
609
+ Object.entries(T).map(([l, v]) => [
610
+ l,
611
+ Object.keys(v).filter((D) => v[D])
600
612
  ])
601
- ), R = I[r], y = !!c && R.includes("product"), [$, Z] = B(g), L = Ke({
602
- entityType: r,
603
- projectName: t,
604
- search: m,
605
- selection: T,
606
- reviewablesOnly: y && $,
607
- includeTask: a
608
- }), _ = h && r === "version" ? L.version.data.filter((d) => "hasReviewables" in d && d.hasReviewables === !1).map((d) => d.id) : [], G = _.length > 0 ? Array.from(/* @__PURE__ */ new Set([...n, ..._])) : n, ee = (d) => _.includes(d) ? "Version has no reviewables" : f?.(d), te = (d) => {
609
- const b = L[d];
610
- b?.hasNextPage && !b.isFetchingNextPage && b.fetchNextPage?.();
611
- }, [oe, ne] = $e({
612
- foldersSelection: w.folder,
613
- foldersData: L.folder
613
+ ), R = I[s], K = !!d && R.includes("product"), [G, oe] = L(g), O = Ae({
614
+ entityType: s,
615
+ projectName: e,
616
+ search: b,
617
+ selection: P,
618
+ reviewablesOnly: K && G,
619
+ includeTask: r
620
+ }), W = h && s === "version" ? O.version.data.filter((l) => "hasReviewables" in l && l.hasReviewables === !1).map((l) => l.id) : [], Y = W.length > 0 ? Array.from(/* @__PURE__ */ new Set([...o, ...W])) : o, ne = (l) => W.includes(l) ? "Version has no reviewables" : m?.(l), se = (l) => {
621
+ const v = O[l];
622
+ v?.hasNextPage && !v.isFetchingNextPage && v.fetchNextPage?.();
623
+ }, [re, ae] = Ve({
624
+ foldersSelection: f.folder,
625
+ foldersData: O.folder
614
626
  });
615
- _e({
627
+ Qe({
616
628
  entityHierarchy: R,
617
- entityData: L,
618
- rowSelection: P,
619
- setEntityRowSelection: D
620
- }), Ge({
629
+ entityData: O,
630
+ rowSelection: T,
631
+ setEntityRowSelection: F
632
+ }), qe({
621
633
  entityHierarchy: R,
622
- entityData: L,
623
- rowSelection: P,
624
- setEntityRowSelection: D
634
+ entityData: O,
635
+ rowSelection: T,
636
+ setEntityRowSelection: F,
637
+ initialSelection: n
625
638
  });
626
- const Y = (d, b, O) => {
627
- const H = O || b.includes(d.id), ae = H ? ee(d.id) || u : void 0, z = {
628
- ...d,
629
- isDisabled: H,
630
- disabledMessage: ae
639
+ const V = (l, v, D) => {
640
+ const $ = D || v.includes(l.id), ce = $ ? ne(l.id) || p : void 0, q = {
641
+ ...l,
642
+ isDisabled: $,
643
+ disabledMessage: ce
631
644
  };
632
- return d.subRows && d.subRows.length > 0 && (z.subRows = d.subRows.map(
633
- (ie) => Y(ie, b, H)
634
- )), z;
635
- }, se = (d) => !G || G.length === 0 ? d : d.map((b) => Y(b, G, !1)), re = () => {
636
- if (!T[r]?.length)
645
+ return l.subRows && l.subRows.length > 0 && (q.subRows = l.subRows.map(
646
+ (de) => V(de, v, $)
647
+ )), q;
648
+ }, ie = (l) => !Y || Y.length === 0 ? l : l.map((v) => V(v, Y, !1)), Q = (l) => {
649
+ const v = O[s].data;
650
+ c(
651
+ l,
652
+ l.map((D) => v.find(($) => $.id === D))
653
+ );
654
+ }, le = () => {
655
+ if (!P[s]?.length)
637
656
  return;
638
- const d = e ? T[r] : T[r].slice(0, 1);
639
- i(d);
657
+ const l = t ? P[s] : P[s].slice(0, 1);
658
+ Q(l);
640
659
  };
641
- return /* @__PURE__ */ j(
642
- ge,
660
+ return /* @__PURE__ */ B(
661
+ we,
643
662
  {
644
663
  ...k,
645
664
  className: "entity-picker-dialog block-shortcuts",
646
- header: `Select ${U(r)}`,
665
+ header: `Select ${Z(s)}`,
647
666
  isOpen: !0,
648
667
  size: "full",
649
668
  style: { height: "80vh", maxWidth: R.length * He },
650
- footer: /* @__PURE__ */ j(le, { children: [
651
- s && l && /* @__PURE__ */ x(A, { label: "Move to root", variant: "text", onClick: l }),
652
- /* @__PURE__ */ x(
653
- A,
669
+ footer: /* @__PURE__ */ B(ue, { children: [
670
+ a && i && /* @__PURE__ */ w(H, { label: "Move to root", variant: "text", onClick: i }),
671
+ /* @__PURE__ */ w(
672
+ H,
654
673
  {
655
- label: `Select ${r}${e ? "s" : ""}`,
674
+ label: `Select ${s}${t ? "s" : ""}`,
656
675
  variant: "filled",
657
- disabled: !T[r]?.length || p,
658
- loading: p,
659
- onClick: re
676
+ disabled: !P[s]?.length || u,
677
+ loading: u,
678
+ onClick: le
660
679
  }
661
680
  )
662
681
  ] }),
663
682
  children: [
664
- y && /* @__PURE__ */ x(
665
- be,
683
+ K && /* @__PURE__ */ w(
684
+ ke,
666
685
  {
667
686
  label: "Show reviewables only",
668
- value: $,
669
- onClick: () => Z(!$),
687
+ value: G,
688
+ onClick: () => oe(!G),
670
689
  style: {
671
690
  width: "fit-content",
672
691
  marginLeft: "auto",
@@ -674,37 +693,38 @@ const I = {
674
693
  }
675
694
  }
676
695
  ),
677
- /* @__PURE__ */ x(We, { children: R.map((d) => /* @__PURE__ */ x(
678
- fe,
696
+ /* @__PURE__ */ w(Ue, { children: R.map((l) => /* @__PURE__ */ w(
697
+ ge,
679
698
  {
680
- rowSelection: P[d] || {},
681
- onRowSelectionChange: (b) => D(b, d),
682
- expanded: d === "folder" ? oe : void 0,
683
- setExpanded: d === "folder" ? ne : void 0,
684
- children: /* @__PURE__ */ x(
685
- je,
699
+ rowSelection: T[l] || {},
700
+ onRowSelectionChange: (v) => F(v, l),
701
+ expanded: l === "folder" ? re : void 0,
702
+ setExpanded: l === "folder" ? ae : void 0,
703
+ children: /* @__PURE__ */ w(
704
+ Ye,
686
705
  {
687
- entityType: d,
688
- projectName: t,
689
- search: m[d],
690
- tableData: se(L[d]?.table || []),
691
- isFolderHierarchy: d === "folder" && !m.folder,
692
- onSearch: (b) => C(b, d),
693
- isMultiSelect: d === r ? !!e : !0,
694
- onRowSubmit: (b) => d === r ? i([b]) : void 0,
695
- onScrollBottom: () => te(d)
706
+ entityType: l,
707
+ projectName: e,
708
+ search: b[l],
709
+ tableData: ie(O[l]?.table || []),
710
+ isFolderHierarchy: l === "folder" && !b.folder,
711
+ onSearch: (v) => C(v, l),
712
+ isMultiSelect: l === s ? !!t : !0,
713
+ onRowSubmit: (v) => l === s ? Q([v]) : void 0,
714
+ onScrollBottom: () => se(l)
696
715
  },
697
- d
716
+ l
698
717
  )
699
718
  },
700
- d
719
+ l
701
720
  )) })
702
721
  ]
703
722
  }
704
723
  );
705
724
  };
706
725
  export {
707
- gt as E,
708
- Fe as T,
709
- ye as u
726
+ Tt as E,
727
+ Me as T,
728
+ I as e,
729
+ ze as u
710
730
  };