@ynput/ayon-frontend-shared 0.6.0 → 0.6.2

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