@ynput/ayon-frontend-shared 0.6.1 → 0.6.3

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.
@@ -4,20 +4,20 @@ import { Splitter as et, SplitterPanel as tt } from "primereact/splitter";
4
4
  import V from "styled-components";
5
5
  import { h as nt, P as st, d as Ie, U as ze } from "./MetaWidget.es.js";
6
6
  import "@module-federation/enhanced/runtime";
7
- import { bi as De, br as ot, bj as Ue, bp as at } from "./searchTerms.es.js";
8
- import { dl as Ve, cF as it, bS as rt, by as lt } from "./getUris.es.js";
7
+ import { bi as Re, br as ot, bj as Ue, bp as at, bu as it } from "./searchTerms.es.js";
8
+ import { dl as Ve, cF as rt, bS as lt, by as ct } from "./getUris.es.js";
9
9
  import "primereact/confirmdialog";
10
- import { q as He, y as Ce, x as ue, d as ct, a as we, v as dt, a5 as ut, a4 as pt, u as ft, ac as mt } from "./DeleteEntitiesContextInstance.es.js";
10
+ import { q as He, y as Ce, x as ue, d as dt, a as we, v as ut, a5 as pt, a4 as ft, u as mt, ac as ht } from "./DeleteEntitiesContextInstance.es.js";
11
11
  import "lodash";
12
- import { toast as Re } from "react-toastify";
12
+ import { toast as ke } from "react-toastify";
13
13
  import "uuid";
14
14
  import "semver";
15
- import { InputText as ht, Button as gt, Icon as yt } from "@ynput/ayon-react-components";
15
+ import { InputText as gt, Button as yt, Icon as bt } from "@ynput/ayon-react-components";
16
16
  import "./ContextMenuContextInstance.es.js";
17
17
  import W from "clsx";
18
18
  import "react-dom";
19
19
  import "react-redux";
20
- import { E as bt, u as St } from "./EntityPickerDialog.es.js";
20
+ import { E as St, u as Tt } from "./EntityPickerDialog.es.js";
21
21
  import "./PlayableIcon.es.js";
22
22
  import "date-fns";
23
23
  import "lexical";
@@ -32,109 +32,109 @@ import "@lexical/selection";
32
32
  import "@lexical/utils";
33
33
  import "react-router-dom";
34
34
  import "@tanstack/react-table";
35
- import { b as he, H as Tt, a as vt, e as xt, S as It } from "./SimpleTable.es.js";
35
+ import { b as he, H as vt, a as xt, e as It, S as Ct } from "./SimpleTable.es.js";
36
36
  import { g as ge } from "./getEntityTypeIcon.es.js";
37
- import { g as Ct } from "./parseHtmlToPlainTextWithLinks.es.js";
38
- import { u as wt, a as Lt } from "./useAttributeEnums.es.js";
39
- import { b as Et, s as kt } from "./buildHierarchicalTableRows.es.js";
37
+ import { g as wt } from "./parseHtmlToPlainTextWithLinks.es.js";
38
+ import { u as Lt, a as Et } from "./useAttributeEnums.es.js";
39
+ import { b as Dt, s as Rt } from "./buildHierarchicalTableRows.es.js";
40
40
  import { n as me } from "./entityDefinitions.es.js";
41
- import { a as Dt, K as Rt } from "./platform.es.js";
42
- import { u as Pt } from "./NewEntityContextInstance.es.js";
43
- import { u as Mt } from "./VersionUploadContextInstance.es.js";
41
+ import { a as kt, K as Pt } from "./platform.es.js";
42
+ import { u as Mt } from "./NewEntityContextInstance.es.js";
43
+ import { u as _t } from "./VersionUploadContextInstance.es.js";
44
44
  import { F as Pe } from "./EntityUpdatesContext.es.js";
45
45
  import "./MenuItem.es.js";
46
- const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.includes(r) ? Ge : a), Ot = (e, t, a, r) => {
47
- const d = e.reduce((p, g) => p + g, 0), l = r.filter(Boolean).length;
48
- if (!l || d === a) return e;
49
- if (d < a) {
50
- const p = (a - d) / l;
51
- return e.map((g, L) => r[L] ? g + p : g);
46
+ const At = 180, Be = 100, Ge = 34, Ot = (e, t = [], a = Be) => e.map((r) => t.includes(r) ? Ge : a), Nt = (e, t, a, r) => {
47
+ const u = e.reduce((p, h) => p + h, 0), l = r.filter(Boolean).length;
48
+ if (!l || u === a) return e;
49
+ if (u < a) {
50
+ const p = (a - u) / l;
51
+ return e.map((h, w) => r[w] ? h + p : h);
52
52
  }
53
- const f = e.map((p, g) => r[g] ? p - t[g] : 0), S = f.reduce((p, g) => p + g, 0);
54
- if (!S) return e;
55
- const m = d - a;
56
- return e.map((p, g) => p - m * (f[g] / S));
57
- }, Nt = (e, t, a = [], r = 0, d = _t) => {
53
+ const m = e.map((p, h) => r[h] ? p - t[h] : 0), b = m.reduce((p, h) => p + h, 0);
54
+ if (!b) return e;
55
+ const f = u - a;
56
+ return e.map((p, h) => p - f * (m[h] / b));
57
+ }, Ft = (e, t, a = [], r = 0, u = At) => {
58
58
  if (!t.length)
59
59
  return { heights: [], mins: [], sizes: [], minSize: 2, height: r };
60
- const l = t.filter((h) => !a.includes(h)).length, f = (t.length - l) * Ge, S = r && l ? Math.min(
61
- d,
60
+ const l = t.filter((g) => !a.includes(g)).length, m = (t.length - l) * Ge, b = r && l ? Math.min(
61
+ u,
62
62
  Math.max(
63
63
  Be,
64
- Math.floor((r - f) / l)
64
+ Math.floor((r - m) / l)
65
65
  )
66
- ) : d, m = At(t, a), p = t.map(
67
- (h, i) => a.includes(h) ? m[i] : Math.max(e[h] ?? S, m[i])
68
- ), g = t.map((h) => !a.includes(h)), L = m.reduce((h, i) => h + i, 0), u = g.some(Boolean) ? Math.max(r, L) : L, b = Ot(p, m, u, g);
66
+ ) : u, f = Ot(t, a), p = t.map(
67
+ (g, i) => a.includes(g) ? f[i] : Math.max(e[g] ?? b, f[i])
68
+ ), h = t.map((g) => !a.includes(g)), w = f.reduce((g, i) => g + i, 0), d = h.some(Boolean) ? Math.max(r, w) : w, S = Nt(p, f, d, h);
69
69
  return {
70
- heights: b,
71
- mins: m,
72
- sizes: b.map((h) => h / u * 100),
70
+ heights: S,
71
+ mins: f,
72
+ sizes: S.map((g) => g / d * 100),
73
73
  // primereact must allow the drag past the min; clampDraggedHeights puts it back
74
74
  minSize: 2,
75
- height: u
75
+ height: d
76
76
  };
77
77
  }, jt = (e, t, a) => {
78
- const r = e.map((m, p) => Math.max(m / 100 * t, a[p])), d = Math.max(
78
+ const r = e.map((f, p) => Math.max(f / 100 * t, a[p])), u = Math.max(
79
79
  t,
80
- a.reduce((m, p) => m + p, 0)
81
- ), l = r.reduce((m, p) => m + p, 0) - d;
80
+ a.reduce((f, p) => f + p, 0)
81
+ ), l = r.reduce((f, p) => f + p, 0) - u;
82
82
  if (l <= 0) return r;
83
- const f = r.map((m, p) => m - a[p]), S = f.reduce((m, p) => m + p, 0);
84
- return S ? r.map((m, p) => m - l * (f[p] / S)) : r;
85
- }, Ft = "slicer-splitter", Me = {
83
+ const m = r.map((f, p) => f - a[p]), b = m.reduce((f, p) => f + p, 0);
84
+ return b ? r.map((f, p) => f - l * (m[p] / b)) : r;
85
+ }, $t = "slicer-splitter", Me = {
86
86
  minSize: 2,
87
87
  size: 12
88
- }, rs = () => {
89
- const [e, t] = He(Ft, [
88
+ }, ls = () => {
89
+ const [e, t] = He($t, [
90
90
  Me.size,
91
91
  100 - Me.size
92
92
  ]);
93
93
  return [e, (r) => {
94
94
  t(r.sizes);
95
95
  }];
96
- }, $t = (e, t, a = [], r = 0) => {
97
- const [d, l] = He(
96
+ }, zt = (e, t, a = [], r = 0) => {
97
+ const [u, l] = He(
98
98
  `slicer-panel-heights-${e}`,
99
99
  {}
100
- ), [f, S] = U(0), m = Array.isArray(d) ? {} : d, {
100
+ ), [m, b] = U(0), f = Array.isArray(u) ? {} : u, {
101
101
  sizes: p,
102
- mins: g,
103
- minSize: L,
104
- height: u,
105
- heights: b
106
- } = Nt(m, t, a, r), h = (i) => {
107
- const c = jt(i.sizes, u, g);
102
+ mins: h,
103
+ minSize: w,
104
+ height: d,
105
+ heights: S
106
+ } = Ft(f, t, a, r), g = (i) => {
107
+ const c = jt(i.sizes, d, h);
108
108
  l({
109
- ...m,
109
+ ...f,
110
110
  ...Object.fromEntries(
111
111
  t.map((o, y) => [o, c[y]]).filter(([o]) => !a.includes(o))
112
112
  )
113
113
  }), c.some(
114
- (o, y) => Math.abs(o - i.sizes[y] / 100 * u) > 1
115
- ) && S((o) => o + 1);
114
+ (o, y) => Math.abs(o - i.sizes[y] / 100 * d) > 1
115
+ ) && b((o) => o + 1);
116
116
  };
117
117
  return {
118
118
  sizes: p,
119
- minSize: L,
120
- height: u,
121
- panelHeights: b,
122
- layoutKey: `${t.join("|")}#${a.join("|")}#${f}`,
123
- handleResizeEnd: h
119
+ minSize: w,
120
+ height: d,
121
+ panelHeights: S,
122
+ layoutKey: `${t.join("|")}#${a.join("|")}#${m}`,
123
+ handleResizeEnd: g
124
124
  };
125
- }, zt = ({
125
+ }, Ut = ({
126
126
  projectName: e,
127
127
  movingEntities: t,
128
128
  onClose: a,
129
129
  onMoveComplete: r
130
130
  }) => {
131
- const [d] = Ve(), l = nt(), { folders: f } = Ce(), S = l?.tableData || [], m = A(
132
- (h) => l?.getEntityById(h) || f.find((i) => i.id === h),
133
- [f, l]
131
+ const [u] = Ve(), l = nt(), { folders: m } = Ce(), b = l?.tableData || [], f = A(
132
+ (g) => l?.getEntityById(g) || m.find((i) => i.id === g),
133
+ [m, l]
134
134
  ), p = A(
135
- async (h) => {
136
- if (!t || h.length === 0) return;
137
- const i = h[0];
135
+ async (g) => {
136
+ if (!t || g.length === 0) return;
137
+ const i = g[0];
138
138
  try {
139
139
  const c = t.entities.map(
140
140
  (y, n) => ({
@@ -144,7 +144,7 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
144
144
  entityId: y.entityId,
145
145
  data: y.entityType === "folder" ? { parentId: i } : { folderId: i }
146
146
  })
147
- ), o = (await d({
147
+ ), o = (await u({
148
148
  projectName: e,
149
149
  operationsRequestModel: {
150
150
  operations: c
@@ -156,7 +156,7 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
156
156
  }
157
157
  r?.(i);
158
158
  } catch (c) {
159
- let s = De(c) || "Failed to move entities";
159
+ let s = Re(c) || "Failed to move entities";
160
160
  if (s.includes("already exists"))
161
161
  if (t.entities.length > 1)
162
162
  s = "Cannot move some entities - one or more entities with the same name already exist in the target location";
@@ -167,16 +167,16 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
167
167
  const y = s.match(/name '.*?, (.+?)' already exists/);
168
168
  s = `Cannot move "${y ? y[1] : "this folder"}" - a folder with this name already exists in the target location`;
169
169
  }
170
- Re.error(s);
170
+ ke.error(s);
171
171
  } finally {
172
172
  a();
173
173
  }
174
174
  },
175
- [t, e, d, a, r]
176
- ), g = A(async () => {
175
+ [t, e, u, a, r]
176
+ ), h = A(async () => {
177
177
  if (t)
178
178
  try {
179
- const h = t.entities.map(
179
+ const g = t.entities.map(
180
180
  (s, o) => ({
181
181
  id: `move-to-root-${s.entityId}-${Date.now()}-${o}`,
182
182
  type: "update",
@@ -184,170 +184,170 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
184
184
  entityId: s.entityId,
185
185
  data: s.entityType === "folder" ? { parentId: null } : { folderId: null }
186
186
  })
187
- ), c = (await d({
187
+ ), c = (await u({
188
188
  projectName: e,
189
189
  operationsRequestModel: {
190
- operations: h
190
+ operations: g
191
191
  }
192
192
  }).unwrap())?.operations?.filter((s) => s.success === !1) || [];
193
193
  if (c.length > 0) {
194
194
  const s = c.map((o) => o.detail).join(", ");
195
195
  throw new Error(s || "Some move operations failed");
196
196
  }
197
- } catch (h) {
198
- let i = De(h) || "Failed to move entities to root";
199
- Re.error(i);
197
+ } catch (g) {
198
+ let i = Re(g) || "Failed to move entities to root";
199
+ ke.error(i);
200
200
  } finally {
201
201
  a();
202
202
  }
203
- }, [t, e, d, a]), L = A(() => {
203
+ }, [t, e, u, a]), w = A(() => {
204
204
  if (!t) return [];
205
- const h = [];
205
+ const g = [];
206
206
  return t.entities.forEach((i) => {
207
- h.push(i.entityId);
208
- }), f.forEach((i) => {
207
+ g.push(i.entityId);
208
+ }), m.forEach((i) => {
209
209
  t.entities.some((s) => {
210
- const o = m(s.entityId);
211
- return o?.name ? S.filter((n) => s.entityType === "folder" ? n.entityType === "folder" && n.parentId === i.id : s.entityType === "task" ? n.entityType === "task" && n.folderId === i.id : !1).some(
210
+ const o = f(s.entityId);
211
+ return o?.name ? b.filter((n) => s.entityType === "folder" ? n.entityType === "folder" && n.parentId === i.id : s.entityType === "task" ? n.entityType === "task" && n.folderId === i.id : !1).some(
212
212
  (n) => n.name === o.name && n.entityId !== s.entityId
213
213
  ) : !1;
214
- }) && h.push(i.id);
215
- }), [...new Set(h)];
216
- }, [t, f, S, m]), u = A(
217
- (h) => {
214
+ }) && g.push(i.id);
215
+ }), [...new Set(g)];
216
+ }, [t, m, b, f]), d = A(
217
+ (g) => {
218
218
  if (!t) return;
219
219
  if (t.entities.some(
220
- (y) => y.entityType === "folder" && y.entityId === h
220
+ (y) => y.entityType === "folder" && y.entityId === g
221
221
  ))
222
222
  return "Cannot move folder to itself";
223
223
  if (t.entities.some(
224
- (y) => y.currentParentId === h
224
+ (y) => y.currentParentId === g
225
225
  ))
226
226
  return "Cannot move to the same location";
227
- const s = f.find((y) => y.id === h);
227
+ const s = m.find((y) => y.id === g);
228
228
  if (s) {
229
229
  const y = t.entities.find((n) => {
230
- const x = m(n.entityId);
231
- return x?.name ? S.filter((v) => n.entityType === "folder" ? v.entityType === "folder" && v.parentId === s.id : n.entityType === "task" ? v.entityType === "task" && v.folderId === s.id : !1).some(
230
+ const x = f(n.entityId);
231
+ return x?.name ? b.filter((v) => n.entityType === "folder" ? v.entityType === "folder" && v.parentId === s.id : n.entityType === "task" ? v.entityType === "task" && v.folderId === s.id : !1).some(
232
232
  (v) => v.name === x.name && v.entityId !== n.entityId
233
233
  ) : !1;
234
234
  });
235
235
  if (y)
236
- return `Cannot move "${m(y.entityId)?.name || "Entity"}" - an entity with the same name already exists in this folder`;
236
+ return `Cannot move "${f(y.entityId)?.name || "Entity"}" - an entity with the same name already exists in this folder`;
237
237
  }
238
238
  return t.entities.some(
239
239
  (y) => y.entityType === "folder"
240
240
  ) ? "Cannot move folder to its child" : "Cannot move to this location";
241
241
  },
242
- [t, f, S, m]
243
- ), b = O(() => t?.entities.every((h) => h.entityType === "folder") || !1, [t]);
242
+ [t, m, b, f]
243
+ ), S = O(() => t?.entities.every((g) => g.entityType === "folder") || !1, [t]);
244
244
  return {
245
245
  handleMoveSubmit: p,
246
- handleMoveToRoot: g,
247
- getDisabledFolderIds: L,
248
- getDisabledMessage: u,
249
- canMoveToRoot: b
246
+ handleMoveToRoot: h,
247
+ getDisabledFolderIds: w,
248
+ getDisabledMessage: d,
249
+ canMoveToRoot: S
250
250
  };
251
- }, Ut = ({
251
+ }, Vt = ({
252
252
  projectName: e,
253
253
  movingEntities: t,
254
254
  onClose: a,
255
255
  onMoveComplete: r
256
256
  }) => {
257
- const { handleMoveSubmit: d, handleMoveToRoot: l, getDisabledFolderIds: f, getDisabledMessage: S } = zt({
257
+ const { handleMoveSubmit: u, handleMoveToRoot: l, getDisabledFolderIds: m, getDisabledMessage: b } = Ut({
258
258
  projectName: e,
259
259
  movingEntities: t ?? null,
260
260
  onClose: a,
261
261
  onMoveComplete: r
262
262
  });
263
263
  return t?.entities.length ? /* @__PURE__ */ E(
264
- bt,
264
+ St,
265
265
  {
266
266
  projectName: e,
267
267
  entityType: "folder",
268
- onSubmit: d,
268
+ onSubmit: u,
269
269
  onClose: a,
270
270
  showMoveToRoot: t.entities.every(
271
- (m) => m.entityType === "folder"
271
+ (f) => f.entityType === "folder"
272
272
  ),
273
273
  onMoveToRoot: l,
274
- disabledIds: f(),
275
- getDisabledMessage: S
274
+ disabledIds: m(),
275
+ getDisabledMessage: b
276
276
  }
277
277
  ) : null;
278
- }, Vt = ({ projectName: e, useExtraSlices: t }) => {
279
- const [a, { isLoading: r, isFetching: d }] = it(), { formatAssignees: l } = t();
278
+ }, Ht = ({ projectName: e, useExtraSlices: t }) => {
279
+ const [a, { isLoading: r, isFetching: u }] = rt(), { formatAssignees: l } = t();
280
280
  return {
281
281
  getData: async () => {
282
- const S = await a({ projectName: e || "" }, !0).unwrap();
283
- return l(S);
282
+ const b = await a({ projectName: e || "" }, !0).unwrap();
283
+ return l(b);
284
284
  },
285
- isLoading: r || d
285
+ isLoading: r || u
286
286
  };
287
- }, Ht = ({ scopes: e, useExtraSlices: t }) => {
288
- const { isLoading: a, productTypes: r, ...d } = ue(), { formatStatuses: l, formatTaskTypes: f, formatProductTypes: S, formatTypes: m, formatAttribute: p } = t();
289
- return { project: d, getStatuses: async () => l(d, e), getTypes: async () => m(d), getTaskTypes: async () => f(d), getProductTypes: async () => S(r), getAttribute: async (i) => p ? p(i).map(
287
+ }, Bt = ({ scopes: e, useExtraSlices: t }) => {
288
+ const { isLoading: a, productTypes: r, ...u } = ue(), { formatStatuses: l, formatTaskTypes: m, formatProductTypes: b, formatTypes: f, formatAttribute: p } = t();
289
+ return { project: u, getStatuses: async () => l(u, e), getTypes: async () => f(u), getTaskTypes: async () => m(u), getProductTypes: async () => b(r), getAttribute: async (i) => p ? p(i).map(
290
290
  (c) => ot(c.icon ?? void 0) ? { ...c, icon: void 0, img: c.icon, imgShape: "circle" } : c
291
291
  ) : void 0, isLoading: a };
292
- }, Bt = ({ entityTypes: e, request: t }) => {
292
+ }, Gt = ({ entityTypes: e, request: t }) => {
293
293
  const {
294
294
  attributes: a,
295
295
  isLoading: { siteInfo: r }
296
- } = ct(), d = Ye(st), l = d?.attribFields?.length ? d.attribFields : a, { projectName: f } = ue();
297
- return { attributes: wt(l, { projectName: f, request: t ?? [] }).filter((p) => Ue(p.data)).filter((p) => e.some((g) => p.scope?.includes(g))).map(
298
- (p) => p.data.enum?.some((g) => g.hidden) ? { ...p, data: { ...p.data, enum: at(p.data.enum) } } : p
296
+ } = dt(), u = Ye(st), l = u?.attribFields?.length ? u.attribFields : a, { projectName: m } = ue();
297
+ return { attributes: Lt(l, { projectName: m, request: t ?? [] }).filter((p) => Ue(p.data)).filter((p) => e.some((h) => p.scope?.includes(h))).map(
298
+ (p) => p.data.enum?.some((h) => h.hidden) ? { ...p, data: { ...p.data, enum: at(p.data.enum) } } : p
299
299
  ), isLoading: r };
300
- }, Gt = "snippet_folder", de = "folder", Kt = (e) => `${de}-${e}`, _e = (e) => e.entityListType === "review-session" ? "subscriptions" : ge(e.entityType), ve = (e) => [...e].sort((t, a) => {
300
+ }, Kt = "snippet_folder", de = "folder", Wt = (e) => `${de}-${e}`, _e = (e) => e.entityListType === "review-session" ? "subscriptions" : ge(e.entityType), ve = (e) => [...e].sort((t, a) => {
301
301
  if (t.active && !a.active) return -1;
302
302
  if (!t.active && a.active) return 1;
303
303
  const r = new Date(t.createdAt || 0);
304
304
  return new Date(a.createdAt || 0).getTime() - r.getTime();
305
- }), Wt = (e = !0) => {
305
+ }), qt = (e = !0) => {
306
306
  const { projectName: t } = ue(), { powerLicense: a } = we(), {
307
307
  data: r,
308
- isLoading: d,
308
+ isLoading: u,
309
309
  isFetching: l
310
- } = rt(
310
+ } = lt(
311
311
  { projectName: t || "" },
312
312
  {
313
313
  initialPageParam: { cursor: "" },
314
314
  skip: !t || !e
315
315
  }
316
- ), { data: f = [], isLoading: S } = lt(
316
+ ), { data: m = [], isLoading: b } = ct(
317
317
  { projectName: t || "" },
318
318
  { skip: !t || !a || !e }
319
- ), m = O(() => {
319
+ ), f = O(() => {
320
320
  if (!r?.pages) return [];
321
- const L = r.pages.flatMap((u) => u.lists);
322
- if (a && f.length > 0) {
323
- const u = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Set();
324
- for (const n of f)
325
- u.set(n.id, {
321
+ const w = r.pages.flatMap((d) => d.lists);
322
+ if (a && m.length > 0) {
323
+ const d = /* @__PURE__ */ new Map(), S = /* @__PURE__ */ new Set();
324
+ for (const n of m)
325
+ d.set(n.id, {
326
326
  id: n.id,
327
327
  folder: n,
328
328
  children: /* @__PURE__ */ new Map(),
329
329
  items: [],
330
330
  hasAnyItems: !1
331
- }), n.parentId || b.add(n.id);
332
- for (const n of f)
333
- if (n.parentId && u.has(n.parentId)) {
334
- const x = u.get(n.parentId), T = u.get(n.id);
331
+ }), n.parentId || S.add(n.id);
332
+ for (const n of m)
333
+ if (n.parentId && d.has(n.parentId)) {
334
+ const x = d.get(n.parentId), T = d.get(n.id);
335
335
  x.children.set(n.id, T);
336
336
  }
337
- const h = [];
338
- for (const n of L) {
337
+ const g = [];
338
+ for (const n of w) {
339
339
  const x = n.entityListFolderId;
340
- if (x && u.has(x)) {
341
- const T = u.get(x);
340
+ if (x && d.has(x)) {
341
+ const T = d.get(x);
342
342
  T.items.push(n), T.hasAnyItems = !0;
343
343
  } else
344
- h.push(n);
344
+ g.push(n);
345
345
  }
346
- for (const n of u.values())
346
+ for (const n of d.values())
347
347
  if (n.hasAnyItems) {
348
348
  let x = n.folder;
349
349
  for (; x.parentId; ) {
350
- const T = u.get(x.parentId);
350
+ const T = d.get(x.parentId);
351
351
  if (T)
352
352
  T.hasAnyItems = !0, x = T.folder;
353
353
  else
@@ -369,72 +369,72 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
369
369
  listId: n.id
370
370
  }
371
371
  }), c = (n) => n.sort((x, T) => {
372
- const v = f.findIndex((H) => H.id === x.id), k = f.findIndex((H) => H.id === T.id);
373
- return v === -1 && k === -1 ? x.folder.label.localeCompare(T.folder.label) : v === -1 ? 1 : k === -1 ? -1 : v - k;
372
+ const v = m.findIndex((H) => H.id === x.id), D = m.findIndex((H) => H.id === T.id);
373
+ return v === -1 && D === -1 ? x.folder.label.localeCompare(T.folder.label) : v === -1 ? 1 : D === -1 ? -1 : v - D;
374
374
  }), s = (n) => {
375
375
  const x = n.items.map((T) => T.id);
376
376
  for (const T of n.children.values())
377
377
  x.push(...s(T));
378
378
  return x;
379
- }, o = Et({
380
- folderNodes: u,
381
- rootFolderIds: b,
379
+ }, o = Dt({
380
+ folderNodes: d,
381
+ rootFolderIds: S,
382
382
  showEmptyFolders: !1,
383
- buildFolderRowId: Kt,
383
+ buildFolderRowId: Wt,
384
384
  createItemRow: i,
385
385
  sortFolderNodes: c,
386
386
  sortItems: ve,
387
387
  getFolderLabel: (n) => n.label,
388
- getFolderIcon: (n) => n.data?.icon || Gt,
388
+ getFolderIcon: (n) => n.data?.icon || Kt,
389
389
  getFolderColor: (n) => n.data?.color,
390
390
  getItemCount: (n) => n.items.length + Array.from(n.children.values()).reduce((x, T) => x + T.items.length, 0)
391
391
  });
392
392
  for (const n of o) {
393
393
  if (n.id.startsWith(de + "-")) {
394
- const T = n.id.substring((de + "-").length), v = u.get(T);
394
+ const T = n.id.substring((de + "-").length), v = d.get(T);
395
395
  v && (n.data = { ...n.data, childListIds: s(v) });
396
396
  }
397
397
  const x = [...n.subRows || []];
398
398
  for (; x.length > 0; ) {
399
399
  const T = x.shift();
400
400
  if (T.id.startsWith(de + "-")) {
401
- const v = T.id.substring((de + "-").length), k = u.get(v);
402
- k && (T.data = { ...T.data, childListIds: s(k) });
401
+ const v = T.id.substring((de + "-").length), D = d.get(v);
402
+ D && (T.data = { ...T.data, childListIds: s(D) });
403
403
  }
404
404
  T.subRows && x.push(...T.subRows);
405
405
  }
406
406
  }
407
- const y = ve(h).map((n) => i(n));
407
+ const y = ve(g).map((n) => i(n));
408
408
  return [...o, ...y];
409
409
  }
410
- return ve(L).map((u) => ({
411
- id: u.id,
412
- name: u.label,
413
- label: u.label,
414
- icon: _e(u),
410
+ return ve(w).map((d) => ({
411
+ id: d.id,
412
+ name: d.label,
413
+ label: d.label,
414
+ icon: _e(d),
415
415
  subRows: [],
416
416
  data: {
417
- id: u.id,
418
- name: u.label,
419
- label: u.label,
420
- entityType: u.entityType,
421
- listId: u.id
417
+ id: d.id,
418
+ name: d.label,
419
+ label: d.label,
420
+ entityType: d.entityType,
421
+ listId: d.id
422
422
  }
423
423
  }));
424
- }, [r, a, f]), p = a && f.length > 0;
424
+ }, [r, a, m]), p = a && m.length > 0;
425
425
  return {
426
- getData: A(async () => m, [m]),
427
- isLoading: d || l || S,
426
+ getData: A(async () => f, [f]),
427
+ isLoading: u || l || b,
428
428
  isExpandable: p
429
429
  };
430
- }, qt = (e, t, a, r) => e.id === "noValue" ? t.get(ze)?.count ?? (r ? 0 : void 0) : e.id === "hasValue" ? r ? a : void 0 : t.get(e.id)?.count ?? (e.name ? t.get(e.name)?.count : void 0) ?? (r ? 0 : void 0), Ke = (e, t, a, r) => t ? e.map((d) => {
431
- const l = qt(d, t, a, r);
430
+ }, Qt = (e, t, a, r) => e.id === "noValue" ? t.get(ze)?.count ?? (r ? 0 : void 0) : e.id === "hasValue" ? r ? a : void 0 : t.get(e.id)?.count ?? (e.name ? t.get(e.name)?.count : void 0) ?? (r ? 0 : void 0), Ke = (e, t, a, r) => t ? e.map((u) => {
431
+ const l = Qt(u, t, a, r);
432
432
  return {
433
- ...d,
434
- badge: l != null ? String(l) : d.badge,
435
- subRows: d.subRows?.length ? Ke(d.subRows, t, a, r) : d.subRows
433
+ ...u,
434
+ badge: l != null ? String(l) : u.badge,
435
+ subRows: u.subRows?.length ? Ke(u.subRows, t, a, r) : u.subRows
436
436
  };
437
- }) : e, Qt = (e) => ({
437
+ }) : e, Yt = (e) => ({
438
438
  id: "noValue",
439
439
  name: "noValue",
440
440
  label: `No ${e}`,
@@ -443,7 +443,7 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
443
443
  data: {
444
444
  id: "noValue"
445
445
  }
446
- }), Yt = (e) => ({
446
+ }), Jt = (e) => ({
447
447
  id: "hasValue",
448
448
  name: "hasValue",
449
449
  label: `Some ${e}`,
@@ -493,28 +493,28 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
493
493
  value: "entityList",
494
494
  icon: "list_alt"
495
495
  }
496
- ], Jt = ({
496
+ ], Xt = ({
497
497
  sliceFields: e,
498
498
  usedSliceTypes: t = [],
499
499
  entityTypes: a = [],
500
500
  counts: r,
501
- filled: d = 0,
501
+ filled: u = 0,
502
502
  countsComplete: l = !1,
503
- sliceType: f,
504
- onSliceTypeChange: S
503
+ sliceType: m,
504
+ onSliceTypeChange: b
505
505
  }) => {
506
506
  const {
507
- sliceType: m,
507
+ sliceType: f,
508
508
  onSliceTypeChange: p,
509
- useExtraSlices: g,
510
- isLoadingExtraSlices: L
511
- } = Ie(), u = f ?? m, b = S ?? p, { projectName: h } = ue(), { formatAttribute: i } = g(), c = e.filter((C) => Ae.some((R) => R.value === C.value)).map((C) => ({
509
+ useExtraSlices: h,
510
+ isLoadingExtraSlices: w
511
+ } = Ie(), d = m ?? f, S = b ?? p, { projectName: g } = ue(), { formatAttribute: i } = h(), c = e.filter((C) => Ae.some((k) => k.value === C.value)).map((C) => ({
512
512
  ...Ae.find((_) => _.value === C.value),
513
513
  ...C
514
- })), s = e.some((C) => C.value === "attributes"), o = u?.startsWith("attrib.") ? u.slice(7) : void 0, y = O(
514
+ })), s = e.some((C) => C.value === "attributes"), o = d?.startsWith("attrib.") ? d.slice(7) : void 0, y = O(
515
515
  () => o ? [o] : [],
516
516
  [o]
517
- ), { attributes: n, isLoading: x } = Bt({
517
+ ), { attributes: n, isLoading: x } = Gt({
518
518
  entityTypes: a,
519
519
  request: y
520
520
  });
@@ -522,7 +522,7 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
522
522
  (C) => c.push({
523
523
  label: C.data.title || C.name,
524
524
  value: "attrib." + C.name,
525
- icon: Ct(C.name, C.data.type, Ue(C.data))
525
+ icon: wt(C.name, C.data.type, Ue(C.data))
526
526
  })
527
527
  );
528
528
  const [T, v] = U(!1), H = !!n.find((C) => C.name === o)?.enumIsLoading, {
@@ -533,22 +533,22 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
533
533
  getProductTypes: Z,
534
534
  getAttribute: ee,
535
535
  isLoading: B
536
- } = Ht({ scopes: a, useExtraSlices: g }), {
536
+ } = Bt({ scopes: a, useExtraSlices: h }), {
537
537
  data: te,
538
538
  getData: Q,
539
539
  isFetching: Y
540
- } = St({
541
- projectName: h || "",
540
+ } = Tt({
541
+ projectName: g || "",
542
542
  folderTypes: oe?.folderTypes || [],
543
543
  includeColors: !0
544
- }), { getData: I, isLoading: D } = Vt({
545
- projectName: h,
546
- useExtraSlices: g
544
+ }), { getData: I, isLoading: R } = Ht({
545
+ projectName: g,
546
+ useExtraSlices: h
547
547
  }), {
548
548
  getData: P,
549
549
  isLoading: K,
550
550
  isExpandable: re
551
- } = Wt(u === "entityList"), F = Y || B || D || L && u !== "hierarchy" || K && u === "entityList" || x || H, N = {
551
+ } = qt(d === "entityList"), j = Y || B || R || w && d !== "hierarchy" || K && d === "entityList" || x || H, N = {
552
552
  hierarchy: {
553
553
  getData: Q,
554
554
  isLoading: Y,
@@ -556,14 +556,14 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
556
556
  },
557
557
  assignees: {
558
558
  getData: I,
559
- isLoading: D,
559
+ isLoading: R,
560
560
  isExpandable: !1,
561
561
  noValue: !0,
562
562
  hasValue: !0
563
563
  },
564
564
  author: {
565
565
  getData: I,
566
- isLoading: D,
566
+ isLoading: R,
567
567
  isExpandable: !1
568
568
  },
569
569
  status: {
@@ -599,81 +599,81 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
599
599
  isExpandable: !1,
600
600
  isAttribute: !0
601
601
  };
602
- const pe = { data: [], isExpandable: !1 }, [le, fe] = U(pe), $ = N[u], ne = c.find(
602
+ const pe = { data: [], isExpandable: !1 }, [le, fe] = U(pe), $ = N[d], ne = c.find(
603
603
  (C) => N[C.value] && !t.includes(C.value)
604
604
  )?.value;
605
605
  se(() => {
606
- F || $ || !ne || b(ne, !1);
607
- }, [F, $, ne]);
608
- const z = (C, R) => {
606
+ j || $ || !ne || S(ne, !1);
607
+ }, [j, $, ne]);
608
+ const z = (C, k) => {
609
609
  const _ = N[C];
610
610
  if (!_) {
611
611
  console.warn(`Slice type ${C} not found`);
612
612
  return;
613
613
  }
614
- (_.isAttribute && s || e.some((ce) => ce.value === C)) && b(C, R);
614
+ (_.isAttribute && s || e.some((ce) => ce.value === C)) && S(C, k);
615
615
  };
616
616
  se(() => {
617
- if (F) return;
617
+ if (j) return;
618
618
  (async () => {
619
619
  try {
620
620
  if (!$) return;
621
621
  v(!0);
622
- const R = await $.getData();
623
- if (R === void 0)
622
+ const k = await $.getData();
623
+ if (k === void 0)
624
624
  throw window.alert(
625
625
  "Slice options failed to load. This likely means the PowerFeatures addon is out of date. Please update to the latest version."
626
- ), b(ne ?? "hierarchy", !1), new Error("Slice data is undefined");
627
- $.hasValue && R.unshift(Yt(u)), $.noValue && R.unshift(Qt(u)), fe({
628
- data: R,
626
+ ), S(ne ?? "hierarchy", !1), new Error("Slice data is undefined");
627
+ $.hasValue && k.unshift(Jt(d)), $.noValue && k.unshift(Yt(d)), fe({
628
+ data: k,
629
629
  isExpandable: $.isExpandable
630
630
  });
631
- } catch (R) {
632
- console.error("Error fetching slice data:", R), fe(pe);
631
+ } catch (k) {
632
+ console.error("Error fetching slice data:", k), fe(pe);
633
633
  } finally {
634
634
  v(!1);
635
635
  }
636
636
  })();
637
- }, [u, h, F, u === "hierarchy" ? te : null]);
638
- const j = O(
639
- () => Ke(le.data, r, d, l),
640
- [le.data, r, d, l]
637
+ }, [d, g, j, d === "hierarchy" ? te : null]);
638
+ const F = O(
639
+ () => Ke(le.data, r, u, l),
640
+ [le.data, r, u, l]
641
641
  ), Le = O(() => {
642
- const C = /* @__PURE__ */ new Map(), R = [...j];
643
- for (; R.length > 0; ) {
644
- const _ = R.shift();
642
+ const C = /* @__PURE__ */ new Map(), k = [...F];
643
+ for (; k.length > 0; ) {
644
+ const _ = k.shift();
645
645
  if (_ && (C.set(_.id, _), _.subRows && _.subRows.length > 0))
646
646
  for (const ce of _.subRows)
647
- R.push(ce);
647
+ k.push(ce);
648
648
  }
649
649
  return C;
650
- }, [j]);
650
+ }, [F]);
651
651
  return {
652
652
  sliceOptions: c,
653
- table: { ...le, data: j },
653
+ table: { ...le, data: F },
654
654
  sliceMap: Le,
655
- isLoading: N[u] && N[u].isLoading || T || F,
656
- sliceType: u,
655
+ isLoading: N[d] && N[d].isLoading || T || j,
656
+ sliceType: d,
657
657
  handleSliceTypeChange: z
658
658
  };
659
- }, Xt = /* @__PURE__ */ new Map(), Zt = (e, t, a, r) => {
660
- const d = O(() => ({ id: t, desc: !1 }), [t]), l = O(
661
- () => (a ?? []).filter((h) => h !== t).map((h) => ({ id: h, desc: !1 })),
659
+ }, Zt = /* @__PURE__ */ new Map(), en = (e, t, a, r) => {
660
+ const u = O(() => ({ id: t, desc: !1 }), [t]), l = O(
661
+ () => (a ?? []).filter((g) => g !== t).map((g) => ({ id: g, desc: !1 })),
662
662
  [a, t]
663
- ), f = !!r || !e, S = e?.entity === "version" ? { entity: "version", groupBy: d, extraGroupBys: l, args: e.args, skip: f } : {
663
+ ), m = !!r || !e, b = e?.entity === "version" ? { entity: "version", groupBy: u, extraGroupBys: l, args: e.args, skip: m } : {
664
664
  entity: "task",
665
- groupBy: d,
665
+ groupBy: u,
666
666
  extraGroupBys: l,
667
667
  args: e?.args ?? { projectName: "" },
668
- skip: f
669
- }, { counts: m, total: p, complete: g } = Lt(S), L = m?.get(ze)?.count ?? 0, u = Math.max(p - L, 0);
668
+ skip: m
669
+ }, { counts: f, total: p, complete: h } = Et(b), w = f?.get(ze)?.count ?? 0, d = Math.max(p - w, 0);
670
670
  return {
671
- counts: f ? void 0 : m ?? (g ? Xt : void 0),
671
+ counts: m ? void 0 : f ?? (h ? Zt : void 0),
672
672
  total: p,
673
- filled: u,
674
- complete: !f && g
673
+ filled: d,
674
+ complete: !m && h
675
675
  };
676
- }, en = V.div`
676
+ }, tn = V.div`
677
677
  display: flex;
678
678
  align-items: center;
679
679
 
@@ -681,31 +681,38 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
681
681
  flex: 1;
682
682
  min-width: 0;
683
683
  }
684
- `, tn = V(ht)`
684
+ `, nn = V(gt)`
685
685
  flex: 1;
686
686
  min-width: 0;
687
687
  height: 28px;
688
688
  min-height: 28px;
689
- `, nn = ({ open: e, value: t, subject: a, onChange: r }) => {
690
- const d = () => r(e ? void 0 : ""), l = (f) => {
691
- f.key === "Escape" && r(void 0);
689
+ `, sn = ({ open: e, value: t, subject: a, onChange: r }) => {
690
+ const u = () => r(e ? void 0 : ""), l = (b) => {
691
+ b.key === "Escape" && r(void 0);
692
+ }, m = (b) => {
693
+ const f = it(b.clipboardData.getData("text"));
694
+ if (f === null) return;
695
+ b.preventDefault();
696
+ const p = b.currentTarget, h = p.selectionStart ?? t.length, w = p.selectionEnd ?? t.length, d = h + f.length;
697
+ r(t.slice(0, h) + f + t.slice(w)), requestAnimationFrame(() => p.setSelectionRange(d, d));
692
698
  };
693
- return /* @__PURE__ */ G(en, { className: W({ open: e }), children: [
699
+ return /* @__PURE__ */ G(tn, { className: W({ open: e }), children: [
694
700
  e && /* @__PURE__ */ E(
695
- tn,
701
+ nn,
696
702
  {
697
703
  value: t,
698
- onChange: (f) => r(f.target.value),
704
+ onChange: (b) => r(b.target.value),
699
705
  placeholder: "Search",
700
706
  autoFocus: !0,
701
- onKeyDown: l
707
+ onKeyDown: l,
708
+ onPaste: m
702
709
  }
703
710
  ),
704
711
  /* @__PURE__ */ E(
705
712
  he,
706
713
  {
707
714
  icon: e ? "close" : "search",
708
- onClick: d,
715
+ onClick: u,
709
716
  className: W({ open: e }),
710
717
  "data-tooltip": e ? "Close search" : `Search ${a}`
711
718
  }
@@ -713,14 +720,14 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
713
720
  ] });
714
721
  }, xe = (e, t) => {
715
722
  e.toggleExpanded(t), e.subRows?.forEach((a) => xe(a, t));
716
- }, Oe = (e) => e.map((t) => t.id).filter(Boolean), sn = (e, t, a, r) => {
717
- const { onOpenNew: d } = Pt(), { projectName: l } = ue(), { setEntities: f } = dt(), S = Mt(), [m] = Ve(), { deleteEntities: p } = ut(), [g, L] = U(null), u = A(
723
+ }, Oe = (e) => e.map((t) => t.id).filter(Boolean), on = (e, t, a, r) => {
724
+ const { onOpenNew: u } = Mt(), { projectName: l } = ue(), { setEntities: m } = ut(), b = _t(), [f] = Ve(), { deleteEntities: p } = pt(), [h, w] = U(null), d = A(
718
725
  (c, s) => s.map((o) => t?.get(o) || (o === c.id ? c : void 0)).filter((o) => !!o),
719
726
  [t]
720
- ), b = O(
727
+ ), S = O(
721
728
  () => ({
722
729
  onShowDetails: (c, s = [c.id]) => {
723
- f({
730
+ m({
724
731
  entityType: "folder",
725
732
  entities: s.map((o) => ({ id: o, projectName: l }))
726
733
  });
@@ -735,11 +742,11 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
735
742
  }))
736
743
  });
737
744
  },
738
- onRename: (c) => L(c),
745
+ onRename: (c) => w(c),
739
746
  onOpenViewer: (c) => a?.(c, l),
740
747
  onUploadVersion: (c) => {
741
748
  const s = c.data?.entityType === "task", o = s ? c.parentId || c.data?.parentId : c.id;
742
- o && S?.onOpenVersionUpload({
749
+ o && b?.onOpenVersionUpload({
743
750
  folderId: o,
744
751
  taskId: s ? c.id : void 0
745
752
  });
@@ -765,27 +772,27 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
765
772
  a,
766
773
  r,
767
774
  l,
768
- f,
775
+ m,
769
776
  p,
770
- S
777
+ b
771
778
  ]
772
- ), h = A(
779
+ ), g = A(
773
780
  (c) => {
774
- g && (m({
781
+ h && (f({
775
782
  projectName: l,
776
783
  operationsRequestModel: {
777
784
  operations: [
778
785
  {
779
786
  type: "update",
780
- entityType: g.data?.entityType === "task" ? "task" : "folder",
781
- entityId: g.id,
787
+ entityType: h.data?.entityType === "task" ? "task" : "folder",
788
+ entityId: h.id,
782
789
  data: { label: c }
783
790
  }
784
791
  ]
785
792
  }
786
- }), L(null));
793
+ }), w(null));
787
794
  },
788
- [l, g, m]
795
+ [l, h, f]
789
796
  );
790
797
  return {
791
798
  rowContextMenuBuilders: O(
@@ -793,19 +800,19 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
793
800
  (c, { row: s, selectedRows: o }) => ({
794
801
  label: "Show details",
795
802
  icon: "dock_to_left",
796
- shortcut: Dt("click", [Rt.Alt]),
797
- command: () => b.onShowDetails(s.original, o)
803
+ shortcut: kt("click", [Pt.Alt]),
804
+ command: () => S.onShowDetails(s.original, o)
798
805
  }),
799
806
  (c, { row: s }) => ({
800
807
  label: "Rename label",
801
808
  icon: "titlecase",
802
809
  shortcut: "R",
803
- command: () => b.onRename(s.original)
810
+ command: () => S.onRename(s.original)
804
811
  }),
805
812
  (c, { row: s }) => ({
806
813
  label: "Open in viewer",
807
814
  icon: "play_circle",
808
- command: () => b.onOpenViewer(s.original),
815
+ command: () => S.onOpenViewer(s.original),
809
816
  hidden: !a
810
817
  }),
811
818
  (c, { selectedTableRows: s }) => ({
@@ -825,35 +832,35 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
825
832
  )
826
833
  }),
827
834
  (c, { row: s, selectedRows: o }) => {
828
- const y = b.onAddToList?.(s.original, o);
835
+ const y = S.onAddToList?.(s.original, o);
829
836
  return y ? Array.isArray(y) ? y : [y] : void 0;
830
837
  },
831
838
  (c, { row: s }) => ({
832
839
  label: "Upload version",
833
840
  icon: "upload",
834
- command: () => b.onUploadVersion(s.original)
841
+ command: () => S.onUploadVersion(s.original)
835
842
  }),
836
843
  (c, { row: s, selectedRows: o }) => ({
837
844
  label: "Move",
838
845
  icon: "drive_file_move",
839
- command: () => b.onMove(u(s.original, o)),
846
+ command: () => S.onMove(d(s.original, o)),
840
847
  hidden: !r
841
848
  }),
842
849
  (c, { row: s, selectedRows: o }) => ({
843
850
  label: me.folder.createLabel,
844
851
  icon: me.folder.icon,
845
- command: () => d?.("folder", {
852
+ command: () => u?.("folder", {
846
853
  parentFolderIds: Oe(
847
- u(s.original, o)
854
+ d(s.original, o)
848
855
  )
849
856
  })
850
857
  }),
851
858
  (c, { row: s, selectedRows: o }) => ({
852
859
  label: me.task.createLabel,
853
860
  icon: me.task.icon,
854
- command: () => d?.("task", {
861
+ command: () => u?.("task", {
855
862
  parentFolderIds: Oe(
856
- u(s.original, o)
863
+ d(s.original, o)
857
864
  )
858
865
  })
859
866
  }),
@@ -861,19 +868,19 @@ const _t = 180, Be = 100, Ge = 34, At = (e, t = [], a = Be) => e.map((r) => t.in
861
868
  label: "Delete",
862
869
  icon: "delete",
863
870
  danger: !0,
864
- command: () => b.onDelete(u(s.original, o))
871
+ command: () => S.onDelete(d(s.original, o))
865
872
  })
866
873
  ],
867
- [b, u, d]
874
+ [S, d, u]
868
875
  ),
869
- onOptionClick: b.onShowDetails,
870
- onRename: b.onRename,
871
- renamingRow: g,
872
- renameInitialValue: g?.label || g?.name || "",
873
- onSubmitRename: h,
874
- onCancelRename: () => L(null)
876
+ onOptionClick: S.onShowDetails,
877
+ onRename: S.onRename,
878
+ renamingRow: h,
879
+ renameInitialValue: h?.label || h?.name || "",
880
+ onSubmitRename: g,
881
+ onCancelRename: () => w(null)
875
882
  };
876
- }, on = V(gt)`
883
+ }, an = V(yt)`
877
884
  /* put above the menu so it's still clickable */
878
885
  /* NOTE: this will need fixing as this also puts it above dialogs */
879
886
  /* z-index: 1001; */
@@ -926,70 +933,70 @@ V.div`
926
933
  font-weight: 600;
927
934
  }
928
935
  `;
929
- const an = (e, t, a) => {
936
+ const rn = (e, t, a) => {
930
937
  const r = `${t}${a === 1 ? "" : "s"}`;
931
938
  return e === "created" ? `new ${r}` : e === "deleted" ? `${r} deleted` : `${a} ${r} ${e.replaceAll("_", " ")}`;
932
- }, rn = (e) => {
939
+ }, ln = (e) => {
933
940
  const t = /* @__PURE__ */ new Map();
934
941
  return e.forEach((r) => {
935
- const [, d, l] = r.topic.split(".");
936
- if (!d || !l) return;
937
- const f = `${d}.${l}`, S = t.get(f) || {
938
- entityType: d,
942
+ const [, u, l] = r.topic.split(".");
943
+ if (!u || !l) return;
944
+ const m = `${u}.${l}`, b = t.get(m) || {
945
+ entityType: u,
939
946
  updateType: l,
940
947
  ids: /* @__PURE__ */ new Set()
941
948
  };
942
- S.ids.add(r.entityId || String(r.id)), t.set(f, S);
949
+ b.ids.add(r.entityId || String(r.id)), t.set(m, b);
943
950
  }), `${Array.from(t.values()).map(
944
- ({ entityType: r, updateType: d, ids: l }) => an(d, r, l.size)
951
+ ({ entityType: r, updateType: u, ids: l }) => rn(u, r, l.size)
945
952
  ).join(", ")} since last sync`;
946
- }, ln = Je(
947
- ({ projectNames: e, topics: t, onSync: a, shouldSyncOnUpdate: r, hideWhenNoUpdates: d = !1, ...l }, f) => {
948
- const [S, m] = U(!1), [p, g] = pt(), { setMenuOpen: L } = ft(), u = ye(null), b = ye(), h = Xe();
953
+ }, cn = Je(
954
+ ({ projectNames: e, topics: t, onSync: a, shouldSyncOnUpdate: r, hideWhenNoUpdates: u = !1, ...l }, m) => {
955
+ const [b, f] = U(!1), [p, h] = ft(), { setMenuOpen: w } = mt(), d = ye(null), S = ye(), g = Xe();
949
956
  se(() => () => {
950
- const v = b.current;
951
- b.current = void 0, v !== void 0 && clearTimeout(v);
952
- }, []), Ze(f, () => u.current, []);
957
+ const v = S.current;
958
+ S.current = void 0, v !== void 0 && clearTimeout(v);
959
+ }, []), Ze(m, () => d.current, []);
953
960
  const i = async () => {
954
- m(!0);
961
+ f(!0);
955
962
  try {
956
963
  await a?.(c);
957
964
  } finally {
958
- m(!1);
965
+ f(!1);
959
966
  }
960
- }, { updates: c, hasUpdates: s } = mt({
967
+ }, { updates: c, hasUpdates: s } = ht({
961
968
  projectNames: e,
962
969
  topics: t,
963
- isSyncing: S,
970
+ isSyncing: b,
964
971
  shouldSyncOnUpdate: r
965
972
  });
966
973
  if (se(() => {
967
- const v = (k) => {
968
- k.repeat || !k.shiftKey || k.ctrlKey || k.metaKey || k.key.toLowerCase() !== "r" || kt(k) || (k.preventDefault(), k.stopPropagation(), i());
974
+ const v = (D) => {
975
+ D.repeat || !D.shiftKey || D.ctrlKey || D.metaKey || D.key.toLowerCase() !== "r" || Rt(D) || (D.preventDefault(), D.stopPropagation(), i());
969
976
  };
970
977
  return window.addEventListener("keydown", v), () => window.removeEventListener("keydown", v);
971
- }, [i]), d && !s) return null;
972
- const o = rn(c), y = Object.values(p).some(Boolean);
978
+ }, [i]), u && !s) return null;
979
+ const o = ln(c), y = Object.values(p).some(Boolean);
973
980
  Object.values(p).every(Boolean);
974
981
  const n = () => {
975
- b.current && clearTimeout(b.current);
982
+ S.current && clearTimeout(S.current);
976
983
  };
977
984
  return /* @__PURE__ */ G($e, { children: [
978
985
  /* @__PURE__ */ E(
979
- on,
986
+ an,
980
987
  {
981
988
  ...l,
982
989
  icon: "sync",
983
- ref: u,
990
+ ref: d,
984
991
  onClick: i,
985
992
  onMouseEnter: () => {
986
- n(), L(h);
993
+ n(), w(g);
987
994
  },
988
995
  onMouseLeave: () => {
989
- n(), b.current = setTimeout(() => L(!1), 100);
996
+ n(), S.current = setTimeout(() => w(!1), 100);
990
997
  },
991
998
  className: W(l.className, {
992
- syncing: S,
999
+ syncing: b,
993
1000
  "has-updates": s,
994
1001
  "auto-sync": y && !Pe
995
1002
  }),
@@ -1009,7 +1016,7 @@ const an = (e, t, a) => {
1009
1016
  flex: 1;
1010
1017
  min-width: 0;
1011
1018
  color: var(--md-sys-color-outline);
1012
- `, cn = V.span`
1019
+ `, dn = V.span`
1013
1020
  display: flex;
1014
1021
  align-items: center;
1015
1022
  gap: 2px;
@@ -1022,56 +1029,56 @@ const an = (e, t, a) => {
1022
1029
  border-radius: 50%;
1023
1030
  object-fit: cover;
1024
1031
  }
1025
- `, dn = ({ rowSelection: e, sliceMap: t }) => {
1026
- const a = ye(null), [r, d] = U(0);
1032
+ `, un = ({ rowSelection: e, sliceMap: t }) => {
1033
+ const a = ye(null), [r, u] = U(0);
1027
1034
  Te(() => {
1028
1035
  const i = a.current;
1029
1036
  if (!i) return;
1030
- const c = new ResizeObserver(([s]) => d(s.contentRect.width));
1037
+ const c = new ResizeObserver(([s]) => u(s.contentRect.width));
1031
1038
  return c.observe(i), () => c.disconnect();
1032
1039
  }, []);
1033
- const l = Object.keys(e).filter((i) => e[i]).map((i) => t.get(i)).filter((i) => !!i), f = (i) => !!i.icon || !!i.img || !!i.startContent, [S, m] = U(!0), p = l.length > 1 || !S, [g, L] = U(l.length), u = l.map((i) => i.id).join("|");
1040
+ const l = Object.keys(e).filter((i) => e[i]).map((i) => t.get(i)).filter((i) => !!i), m = (i) => !!i.icon || !!i.img || !!i.startContent, [b, f] = U(!0), p = l.length > 1 || !b, [h, w] = U(l.length), d = l.map((i) => i.id).join("|");
1034
1041
  if (Te(() => {
1035
- m(!0), L(l.length);
1036
- }, [r, u]), Te(() => {
1042
+ f(!0), w(l.length);
1043
+ }, [r, d]), Te(() => {
1037
1044
  const i = a.current;
1038
1045
  if (!i || !l.length) return;
1039
- const c = Array.from(i.querySelectorAll("[data-chip]")), s = i.querySelector("[data-overflow]")?.offsetWidth ?? 22, o = (v, k) => v.offsetLeft - i.offsetLeft + v.offsetWidth <= k;
1046
+ const c = Array.from(i.querySelectorAll("[data-chip]")), s = i.querySelector("[data-overflow]")?.offsetWidth ?? 22, o = (v, D) => v.offsetLeft - i.offsetLeft + v.offsetWidth <= D;
1040
1047
  if (l.length === 1) {
1041
- S && c[0] && !o(c[0], i.clientWidth) && f(l[0]) && m(!1);
1048
+ b && c[0] && !o(c[0], i.clientWidth) && m(l[0]) && f(!1);
1042
1049
  return;
1043
1050
  }
1044
1051
  const y = c[c.length - 1];
1045
1052
  if (y && o(y, i.clientWidth)) return;
1046
1053
  const n = i.clientWidth - s, x = c.filter((v) => o(v, n)).length, T = Math.max(1, x);
1047
- T !== g && L(T);
1054
+ T !== h && w(T);
1048
1055
  }), !l.length) return /* @__PURE__ */ E(Ne, { ref: a });
1049
- const b = l.slice(0, g), h = l.length - b.length;
1056
+ const S = l.slice(0, h), g = l.length - S.length;
1050
1057
  return /* @__PURE__ */ G(Ne, { ref: a, children: [
1051
- b.map((i) => /* @__PURE__ */ G(
1052
- cn,
1058
+ S.map((i) => /* @__PURE__ */ G(
1059
+ dn,
1053
1060
  {
1054
1061
  "data-chip": !0,
1055
1062
  title: i.label || i.name,
1056
1063
  "aria-label": i.label || i.name,
1057
1064
  children: [
1058
- i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(yt, { icon: i.icon, style: { color: i.iconColor } })),
1059
- !(p && f(i)) && /* @__PURE__ */ E("span", { children: i.label || i.name })
1065
+ i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(bt, { icon: i.icon, style: { color: i.iconColor } })),
1066
+ !(p && m(i)) && /* @__PURE__ */ E("span", { children: i.label || i.name })
1060
1067
  ]
1061
1068
  },
1062
1069
  i.id
1063
1070
  )),
1064
- h > 0 && /* @__PURE__ */ G("span", { "data-overflow": !0, children: [
1071
+ g > 0 && /* @__PURE__ */ G("span", { "data-overflow": !0, children: [
1065
1072
  "+",
1066
- h
1073
+ g
1067
1074
  ] })
1068
1075
  ] });
1069
- }, un = V.div`
1076
+ }, pn = V.div`
1070
1077
  height: 28px;
1071
1078
  border-radius: 4px;
1072
1079
  background: var(--md-sys-color-surface-container);
1073
1080
  width: 100px;
1074
- `, pn = V.div`
1081
+ `, fn = V.div`
1075
1082
  display: flex;
1076
1083
  align-items: center;
1077
1084
  gap: var(--base-gap-small);
@@ -1083,7 +1090,7 @@ const an = (e, t, a) => {
1083
1090
  flex: 1;
1084
1091
  min-width: 0;
1085
1092
  }
1086
- `, fn = V(Tt)`
1093
+ `, mn = V(vt)`
1087
1094
  .slicer-dropdown {
1088
1095
  flex: 0 1 auto;
1089
1096
  min-width: 48px;
@@ -1104,7 +1111,7 @@ const an = (e, t, a) => {
1104
1111
  .power-feature .icon {
1105
1112
  color: var(--md-sys-color-tertiary);
1106
1113
  }
1107
- `, mn = V.div`
1114
+ `, hn = V.div`
1108
1115
  display: flex;
1109
1116
  align-items: center;
1110
1117
  gap: var(--base-gap-small);
@@ -1117,24 +1124,24 @@ const an = (e, t, a) => {
1117
1124
  text-overflow: ellipsis;
1118
1125
  white-space: nowrap;
1119
1126
  }
1120
- `, je = "__splitSlicer__", Fe = ({
1127
+ `, Fe = "__splitSlicer__", je = ({
1121
1128
  panel: e,
1122
1129
  visibleSlices: t,
1123
1130
  sliceFields: a,
1124
1131
  entityTypes: r = ["task"],
1125
- pinnedSliceType: d,
1132
+ pinnedSliceType: u,
1126
1133
  countsSource: l,
1127
- onAddToList: f,
1128
- openMoveDialog: S,
1129
- splitEnabled: m,
1134
+ onAddToList: m,
1135
+ openMoveDialog: b,
1136
+ splitEnabled: f,
1130
1137
  canCollapse: p,
1131
- isPrimary: g,
1132
- search: L,
1133
- onSearchChange: u
1138
+ isPrimary: h,
1139
+ search: w,
1140
+ onSearchChange: d
1134
1141
  }) => {
1135
1142
  const {
1136
- SlicerDropdown: b,
1137
- addSlicePanel: h,
1143
+ SlicerDropdown: S,
1144
+ addSlicePanel: g,
1138
1145
  removeSlicePanel: i,
1139
1146
  collapsedPanels: c,
1140
1147
  togglePanelCollapsed: s,
@@ -1144,124 +1151,124 @@ const an = (e, t, a) => {
1144
1151
  getPanelExpanded: x,
1145
1152
  setPanelExpanded: T,
1146
1153
  onSliceTypeChange: v,
1147
- isViewSyncPending: k,
1154
+ isViewSyncPending: D,
1148
1155
  onOpenViewer: H,
1149
1156
  onAddToList: oe
1150
- } = Ie(), { refetch: ae } = Ce(), { powerLicense: q, setPowerpackDialog: ie } = we(), Z = y(e.id), ee = x(e.id), B = (w) => {
1151
- n(e.id, w);
1157
+ } = Ie(), { refetch: ae } = Ce(), { powerLicense: q, setPowerpackDialog: ie } = we(), Z = y(e.id), ee = x(e.id), B = (L) => {
1158
+ n(e.id, L);
1152
1159
  }, te = A(
1153
- (w) => T(e.id, w),
1160
+ (L) => T(e.id, L),
1154
1161
  [T, e.id]
1155
1162
  ), Q = O(
1156
1163
  () => typeof l == "function" ? l(e.sliceType) : l,
1157
1164
  [l, e.sliceType]
1158
1165
  ), Y = O(() => {
1159
- const w = t.map((X) => X.sliceType);
1160
- if (typeof l != "function") return w;
1166
+ const L = t.map((X) => X.sliceType);
1167
+ if (typeof l != "function") return L;
1161
1168
  const M = (X) => JSON.stringify([X?.entity, X?.args]), Qe = M(Q);
1162
- return w.filter((X) => X === e.sliceType || M(l(X)) === Qe);
1163
- }, [l, Q, t, e.sliceType]), { counts: I, filled: D, complete: P } = Zt(
1169
+ return L.filter((X) => X === e.sliceType || M(l(X)) === Qe);
1170
+ }, [l, Q, t, e.sliceType]), { counts: I, filled: R, complete: P } = en(
1164
1171
  Q,
1165
1172
  e.sliceType,
1166
1173
  Y
1167
1174
  ), K = A(
1168
- (w, M) => {
1169
- g ? v(w, M) : o(e.id, w);
1175
+ (L, M) => {
1176
+ h ? v(L, M) : o(e.id, L);
1170
1177
  },
1171
- [g, v, o, e.id]
1178
+ [h, v, o, e.id]
1172
1179
  ), re = O(
1173
- () => t.filter((w) => w.id !== e.id).map((w) => w.sliceType),
1180
+ () => t.filter((L) => L.id !== e.id).map((L) => L.sliceType),
1174
1181
  [t, e.id]
1175
1182
  ), {
1176
- sliceOptions: F,
1183
+ sliceOptions: j,
1177
1184
  sliceType: N,
1178
1185
  handleSliceTypeChange: pe,
1179
1186
  table: { data: le, isExpandable: fe },
1180
1187
  sliceMap: $,
1181
1188
  isLoading: ne
1182
- } = Jt({
1189
+ } = Xt({
1183
1190
  sliceFields: a,
1184
1191
  usedSliceTypes: re,
1185
1192
  entityTypes: r,
1186
1193
  counts: I,
1187
- filled: D,
1194
+ filled: R,
1188
1195
  countsComplete: P,
1189
1196
  sliceType: e.sliceType,
1190
1197
  onSliceTypeChange: K
1191
- }), z = N === "hierarchy", j = !!p && c.includes(e.id), C = F.find((w) => w.value === N)?.label || N, R = L !== void 0, _ = L ?? "", ce = z ? "Folders" : C, J = sn(
1192
- f || oe,
1198
+ }), z = N === "hierarchy", F = !!p && c.includes(e.id), C = j.find((L) => L.value === N)?.label || N, k = w !== void 0, _ = w ?? "", ce = z ? "Folders" : C, J = on(
1199
+ m || oe,
1193
1200
  $,
1194
1201
  H,
1195
- S
1202
+ b
1196
1203
  ), We = z ? J.rowContextMenuBuilders : [], Ee = O(
1197
- () => F.map((w) => w.value).filter((w) => !t.some((M) => M.sliceType === w)),
1198
- [F, t]
1199
- ), be = !!m && Ee.length > 0, Se = O(() => {
1200
- const w = F.map(
1204
+ () => j.map((L) => L.value).filter((L) => !t.some((M) => M.sliceType === L)),
1205
+ [j, t]
1206
+ ), be = !!f && Ee.length > 0, Se = O(() => {
1207
+ const L = j.map(
1201
1208
  (M) => re.includes(M.value) ? { ...M, disabled: !0, disabledMessage: "Already used by another panel" } : M
1202
1209
  );
1203
- return be && w.push({ label: "Split slicer", value: je, icon: "splitscreen_add" }), w;
1204
- }, [F, re, be]), ke = () => {
1210
+ return be && L.push({ label: "Split slicer", value: Fe, icon: "splitscreen_add" }), L;
1211
+ }, [j, re, be]), De = () => {
1205
1212
  if (!q) return ie("slicer");
1206
- h(Ee[0]);
1207
- }, qe = (w) => {
1208
- const M = String(w[0]);
1209
- if (M === je) {
1210
- ke();
1213
+ g(Ee[0]);
1214
+ }, qe = (L) => {
1215
+ const M = String(L[0]);
1216
+ if (M === Fe) {
1217
+ De();
1211
1218
  return;
1212
1219
  }
1213
- pe(M, !!g && d === N);
1220
+ pe(M, !!h && u === N);
1214
1221
  };
1215
- return /* @__PURE__ */ G(vt, { children: [
1222
+ return /* @__PURE__ */ G(xt, { children: [
1216
1223
  /* @__PURE__ */ G(
1217
- fn,
1224
+ mn,
1218
1225
  {
1219
- className: W({ collapsed: j }),
1220
- onClick: j ? () => s(e.id) : void 0,
1226
+ className: W({ collapsed: F }),
1227
+ onClick: F ? () => s(e.id) : void 0,
1221
1228
  children: [
1222
1229
  p && /* @__PURE__ */ E(
1223
1230
  he,
1224
1231
  {
1225
1232
  icon: "expand_more",
1226
- className: W("collapse-toggle", { collapsed: j }),
1227
- "data-tooltip": j ? "Expand panel" : "Collapse panel",
1233
+ className: W("collapse-toggle", { collapsed: F }),
1234
+ "data-tooltip": F ? "Expand panel" : "Collapse panel",
1228
1235
  "data-tooltip-delay": 0,
1229
1236
  onClick: () => s(e.id)
1230
1237
  }
1231
1238
  ),
1232
- j ? (
1239
+ F ? (
1233
1240
  // the dropdown cannot be used from a collapsed panel, but the dimension it
1234
1241
  // shows has to read the same as the dropdown does when open
1235
- /* @__PURE__ */ E(mn, { children: /* @__PURE__ */ E("span", { children: C }) })
1236
- ) : k ? /* @__PURE__ */ E(un, {}) : !R && /* @__PURE__ */ E(
1237
- b,
1242
+ /* @__PURE__ */ E(hn, { children: /* @__PURE__ */ E("span", { children: C }) })
1243
+ ) : D ? /* @__PURE__ */ E(pn, {}) : !k && /* @__PURE__ */ E(
1244
+ S,
1238
1245
  {
1239
1246
  options: Se,
1240
1247
  value: [N],
1241
- sliceTypes: a.map((w) => w.value),
1242
- onChange: (w) => qe(w),
1248
+ sliceTypes: a.map((L) => L.value),
1249
+ onChange: (L) => qe(L),
1243
1250
  className: W("slicer-dropdown", { "single-option": Se.length === 1 }),
1244
1251
  disableOpen: Se.length === 1
1245
1252
  }
1246
1253
  ),
1247
- j && /* @__PURE__ */ E(dn, { rowSelection: Z, sliceMap: $ }),
1254
+ F && /* @__PURE__ */ E(un, { rowSelection: Z, sliceMap: $ }),
1248
1255
  /* @__PURE__ */ G(
1249
- pn,
1256
+ fn,
1250
1257
  {
1251
- className: W({ searching: R }),
1252
- onClick: (w) => w.stopPropagation(),
1258
+ className: W({ searching: k }),
1259
+ onClick: (L) => L.stopPropagation(),
1253
1260
  children: [
1254
- !j && /* @__PURE__ */ E(
1255
- nn,
1261
+ !F && /* @__PURE__ */ E(
1262
+ sn,
1256
1263
  {
1257
- open: R,
1264
+ open: k,
1258
1265
  value: _,
1259
1266
  subject: ce,
1260
- onChange: u
1267
+ onChange: d
1261
1268
  }
1262
1269
  ),
1263
1270
  z && /* @__PURE__ */ E(
1264
- ln,
1271
+ cn,
1265
1272
  {
1266
1273
  topics: ["entity.folder.created"],
1267
1274
  onSync: async () => {
@@ -1270,17 +1277,17 @@ const an = (e, t, a) => {
1270
1277
  hideWhenNoUpdates: !0
1271
1278
  }
1272
1279
  ),
1273
- be && g && !R && /* @__PURE__ */ E(
1280
+ be && h && !k && /* @__PURE__ */ E(
1274
1281
  he,
1275
1282
  {
1276
1283
  icon: "splitscreen_add",
1277
1284
  className: W({ "power-feature": !q }),
1278
1285
  "data-tooltip": q ? "Split slicer" : "Power feature - Slicer",
1279
1286
  "data-tooltip-delay": 0,
1280
- onClick: ke
1287
+ onClick: De
1281
1288
  }
1282
1289
  ),
1283
- !g && !R && /* @__PURE__ */ E(
1290
+ !h && !k && /* @__PURE__ */ E(
1284
1291
  he,
1285
1292
  {
1286
1293
  icon: "close",
@@ -1295,8 +1302,8 @@ const an = (e, t, a) => {
1295
1302
  ]
1296
1303
  }
1297
1304
  ),
1298
- !j && /* @__PURE__ */ E(
1299
- xt,
1305
+ !F && /* @__PURE__ */ E(
1306
+ It,
1300
1307
  {
1301
1308
  rowSelection: Z,
1302
1309
  onRowSelectionChange: B,
@@ -1304,18 +1311,18 @@ const an = (e, t, a) => {
1304
1311
  setExpanded: te,
1305
1312
  data: $,
1306
1313
  children: /* @__PURE__ */ E(
1307
- It,
1314
+ Ct,
1308
1315
  {
1309
1316
  data: le,
1310
1317
  isExpandable: fe,
1311
- isLoading: ne || k,
1318
+ isLoading: ne || D,
1312
1319
  forceUpdateTable: N,
1313
1320
  globalFilter: _,
1314
1321
  rowIdPrefix: `slicer-${e.id}`,
1315
- onRename: z ? (w, M) => J.onRename(M.original) : void 0,
1322
+ onRename: z ? (L, M) => J.onRename(M.original) : void 0,
1316
1323
  renamingId: z ? J.renamingRow?.id : null,
1317
1324
  renameInitialValue: z ? J.renameInitialValue : void 0,
1318
- onSubmitRename: z ? (w, M) => J.onSubmitRename(M) : void 0,
1325
+ onSubmitRename: z ? (L, M) => J.onSubmitRename(M) : void 0,
1319
1326
  onCancelRename: z ? J.onCancelRename : void 0,
1320
1327
  onRowOptionClick: z ? J.onOptionClick : void 0,
1321
1328
  rowContextMenuBuilders: We
@@ -1324,7 +1331,7 @@ const an = (e, t, a) => {
1324
1331
  }
1325
1332
  )
1326
1333
  ] });
1327
- }, hn = V.div`
1334
+ }, gn = V.div`
1328
1335
  height: 100%;
1329
1336
  width: 100%;
1330
1337
  overflow-y: auto;
@@ -1338,77 +1345,77 @@ const an = (e, t, a) => {
1338
1345
  }
1339
1346
  `
1340
1347
  ).join("")}
1341
- `, ls = ({
1348
+ `, cs = ({
1342
1349
  sliceFields: e = [],
1343
1350
  entityTypes: t = ["task"],
1344
1351
  pinnedSliceType: a,
1345
1352
  countsSource: r,
1346
- onAddToList: d,
1353
+ onAddToList: u,
1347
1354
  enableSplit: l
1348
1355
  }) => {
1349
- const { slices: f, page: S, setPanelExpanded: m, projectName: p, collapsedPanels: g } = Ie(), { powerLicense: L } = we(), u = !!l, b = u && L ? f : f.slice(0, 1), [h, i] = U(null), c = A((I) => {
1356
+ const { slices: m, page: b, setPanelExpanded: f, projectName: p, collapsedPanels: h } = Ie(), { powerLicense: w } = we(), d = !!l, S = d && w ? m : m.slice(0, 1), [g, i] = U(null), c = A((I) => {
1350
1357
  i("entities" in I ? I : { entities: [I] });
1351
1358
  }, []), s = A(() => {
1352
1359
  i(null);
1353
1360
  }, []), { getParentFolderIds: o } = Ce(), y = A(
1354
1361
  (I) => {
1355
- const D = [I, ...o(I)];
1356
- m(
1362
+ const R = [I, ...o(I)];
1363
+ f(
1357
1364
  "hierarchy",
1358
- (P) => typeof P == "boolean" ? P || Object.fromEntries(D.map((K) => [K, !0])) : {
1365
+ (P) => typeof P == "boolean" ? P || Object.fromEntries(R.map((K) => [K, !0])) : {
1359
1366
  ...P,
1360
- ...Object.fromEntries(D.map((K) => [K, !0]))
1367
+ ...Object.fromEntries(R.map((K) => [K, !0]))
1361
1368
  }
1362
1369
  );
1363
1370
  },
1364
- [o, m]
1371
+ [o, f]
1365
1372
  ), n = ye(null), [x, T] = U(0);
1366
1373
  se(() => {
1367
1374
  const I = n.current;
1368
1375
  if (!I) return;
1369
- const D = new ResizeObserver(([P]) => T(P.contentRect.height));
1370
- return D.observe(I), () => D.disconnect();
1371
- }, [b.length]);
1372
- const v = b.map((I) => I.id), k = b.length > 1, {
1376
+ const R = new ResizeObserver(([P]) => T(P.contentRect.height));
1377
+ return R.observe(I), () => R.disconnect();
1378
+ }, [S.length]);
1379
+ const v = S.map((I) => I.id), D = S.length > 1, {
1373
1380
  sizes: H,
1374
1381
  minSize: oe,
1375
1382
  height: ae,
1376
1383
  layoutKey: q,
1377
1384
  handleResizeEnd: ie
1378
- } = $t(S, v, k ? g : [], x), Z = v.slice(0, -1).map(
1379
- (I, D) => k && (g.includes(I) || g.includes(v[D + 1])) ? D : -1
1385
+ } = zt(b, v, D ? h : [], x), Z = v.slice(0, -1).map(
1386
+ (I, R) => D && (h.includes(I) || h.includes(v[R + 1])) ? R : -1
1380
1387
  ).filter((I) => I >= 0), [ee, B] = U({}), te = A(
1381
- (I, D) => B((P) => ({ ...P, [I]: D })),
1388
+ (I, R) => B((P) => ({ ...P, [I]: R })),
1382
1389
  []
1383
1390
  ), Q = v.join("|");
1384
1391
  se(() => {
1385
1392
  B((I) => {
1386
- const D = Object.keys(I).filter((P) => v.includes(P));
1387
- return D.length === Object.keys(I).length ? I : Object.fromEntries(D.map((P) => [P, I[P]]));
1393
+ const R = Object.keys(I).filter((P) => v.includes(P));
1394
+ return R.length === Object.keys(I).length ? I : Object.fromEntries(R.map((P) => [P, I[P]]));
1388
1395
  });
1389
1396
  }, [Q]);
1390
1397
  const Y = {
1391
- visibleSlices: b,
1392
- canCollapse: k,
1398
+ visibleSlices: S,
1399
+ canCollapse: D,
1393
1400
  sliceFields: e,
1394
1401
  entityTypes: t,
1395
1402
  pinnedSliceType: a,
1396
1403
  countsSource: r,
1397
- onAddToList: d,
1404
+ onAddToList: u,
1398
1405
  openMoveDialog: c,
1399
- splitEnabled: u
1406
+ splitEnabled: d
1400
1407
  };
1401
1408
  return /* @__PURE__ */ G($e, { children: [
1402
- b.length === 1 ? /* @__PURE__ */ E(
1403
- Fe,
1409
+ S.length === 1 ? /* @__PURE__ */ E(
1410
+ je,
1404
1411
  {
1405
- panel: b[0],
1412
+ panel: S[0],
1406
1413
  isPrimary: !0,
1407
- search: ee[b[0].id],
1408
- onSearchChange: (I) => te(b[0].id, I),
1414
+ search: ee[S[0].id],
1415
+ onSearchChange: (I) => te(S[0].id, I),
1409
1416
  ...Y
1410
1417
  }
1411
- ) : /* @__PURE__ */ E(hn, { ref: n, $deadGutters: Z, children: /* @__PURE__ */ E(
1418
+ ) : /* @__PURE__ */ E(gn, { ref: n, $deadGutters: Z, children: /* @__PURE__ */ E(
1412
1419
  et,
1413
1420
  {
1414
1421
  layout: "vertical",
@@ -1418,17 +1425,17 @@ const an = (e, t, a) => {
1418
1425
  height: ae,
1419
1426
  overflow: "hidden"
1420
1427
  },
1421
- children: b.map((I, D) => /* @__PURE__ */ E(
1428
+ children: S.map((I, R) => /* @__PURE__ */ E(
1422
1429
  tt,
1423
1430
  {
1424
- size: H[D],
1431
+ size: H[R],
1425
1432
  minSize: oe,
1426
1433
  style: { overflow: "hidden" },
1427
1434
  children: /* @__PURE__ */ E(
1428
- Fe,
1435
+ je,
1429
1436
  {
1430
1437
  panel: I,
1431
- isPrimary: D === 0,
1438
+ isPrimary: R === 0,
1432
1439
  search: ee[I.id],
1433
1440
  onSearchChange: (P) => te(I.id, P),
1434
1441
  ...Y
@@ -1441,10 +1448,10 @@ const an = (e, t, a) => {
1441
1448
  q
1442
1449
  ) }),
1443
1450
  /* @__PURE__ */ E(
1444
- Ut,
1451
+ Vt,
1445
1452
  {
1446
1453
  projectName: p,
1447
- movingEntities: h,
1454
+ movingEntities: g,
1448
1455
  onClose: s,
1449
1456
  onMoveComplete: y
1450
1457
  }
@@ -1452,19 +1459,19 @@ const an = (e, t, a) => {
1452
1459
  ] });
1453
1460
  };
1454
1461
  export {
1455
- _t as S,
1462
+ At as S,
1456
1463
  Be as a,
1457
1464
  Me as b,
1458
- Ft as c,
1459
- ls as d,
1460
- Kt as e,
1465
+ $t as c,
1466
+ cs as d,
1467
+ Wt as e,
1461
1468
  jt as f,
1462
1469
  Ae as g,
1463
- sn as h,
1464
- Zt as i,
1465
- $t as j,
1466
- rs as k,
1467
- ln as l,
1468
- Nt as r,
1469
- Wt as u
1470
+ on as h,
1471
+ en as i,
1472
+ zt as j,
1473
+ ls as k,
1474
+ cn as l,
1475
+ Ft as r,
1476
+ qt as u
1470
1477
  };