@ynput/ayon-frontend-shared 0.7.5 → 0.7.6
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.
- package/dist/DetailsPanel.es.js +376 -380
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +26 -26
- package/dist/ProjectTreeTable.es.js +2521 -2510
- package/dist/ProjectsTable.es.js +3 -3
- package/dist/Slicer.es.js +32 -32
- package/dist/Views.es.js +1 -1
- package/dist/chunks/ColumnDropIndicator.es.js +2 -2
- package/dist/chunks/ColumnHeaderMenuUI.es.js +1 -1
- package/dist/chunks/EntityPath.es.js +1 -1
- package/dist/chunks/EntityPickerDialog.es.js +481 -460
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/Feed.es.js +11 -10
- package/dist/chunks/FilterErrorActions.es.js +1 -1
- package/dist/chunks/GroupSettingsFallback.es.js +2 -2
- package/dist/chunks/Menu.es.js +250 -247
- package/dist/chunks/MetaWidget.es.js +2 -2
- package/dist/chunks/PlayableIcon.es.js +368 -368
- package/dist/chunks/ProjectFoldersContext.es.js +237 -0
- package/dist/chunks/ReviewablesSelector.es.js +1223 -1170
- package/dist/chunks/SimpleTable.es.js +301 -296
- package/dist/chunks/Slicer.es.js +418 -410
- package/dist/chunks/TableExportContextInstance.es.js +428 -382
- package/dist/chunks/ThumbnailUploaderContext.es.js +48 -0
- package/dist/chunks/Watchers.es.js +2 -2
- package/dist/chunks/{ColumnDropIndicator.styled.es.js → addonColumnTags.es.js} +60 -47
- package/dist/components.es.js +1404 -1274
- package/dist/context.es.js +559 -657
- package/dist/hooks.es.js +2 -2
- package/dist/index.es.js +2 -2
- package/dist/types/EntityPickerDialog.d.ts +45 -2
- package/dist/types/ProjectTreeTable.d.ts +119 -17
- package/dist/types/components.d.ts +210 -23
- package/dist/types/context.d.ts +8 -0
- package/package.json +3 -3
- package/dist/chunks/ProjectContext.es.js +0 -158
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +0 -11
package/dist/chunks/Slicer.es.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as E, jsxs as G, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Splitter as
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
1
|
+
import { jsx as E, jsxs as G, Fragment as $e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as U, useCallback as O, useMemo as P, useContext as Ct, useEffect as ue, forwardRef as Lt, useRef as we, useId as wt, useImperativeHandle as Et, useLayoutEffect as _e } from "react";
|
|
3
|
+
import { Splitter as Dt, SplitterPanel as kt } from "primereact/splitter";
|
|
4
|
+
import B from "styled-components";
|
|
5
|
+
import { i as Rt, P as At, e as ze, U as it } from "./MetaWidget.es.js";
|
|
6
6
|
import "@module-federation/enhanced/runtime";
|
|
7
|
-
import { menuItemsAt as
|
|
8
|
-
import { toast as
|
|
9
|
-
import { InputText as
|
|
10
|
-
import { bt as
|
|
11
|
-
import { dw as
|
|
7
|
+
import { menuItemsAt as Mt } from "@ynput/ayon-addon/host";
|
|
8
|
+
import { toast as Qe } from "react-toastify";
|
|
9
|
+
import { InputText as _t, Button as Pt, Icon as Ot } from "@ynput/ayon-react-components";
|
|
10
|
+
import { bt as Je, bD as Nt, bB as rt, bA as Ft, bG as jt } from "./searchTerms.es.js";
|
|
11
|
+
import { dw as lt, cO as $t, bZ as zt, bD as Ut } from "./getUris.es.js";
|
|
12
12
|
import "primereact/confirmdialog";
|
|
13
|
-
import {
|
|
13
|
+
import { p as ct, z as Ue, y as be, d as Bt, b as Be, x as Vt, ac as Ht, ab as Gt, u as dt, ak as Wt } from "./TableExportContextInstance.es.js";
|
|
14
14
|
import "lodash";
|
|
15
15
|
import "uuid";
|
|
16
16
|
import "axios";
|
|
17
17
|
import "semver";
|
|
18
18
|
import "./ContextMenuContextInstance.es.js";
|
|
19
|
-
import
|
|
19
|
+
import Y from "clsx";
|
|
20
20
|
import "react-dom";
|
|
21
21
|
import "react-redux";
|
|
22
22
|
import "react-router-dom";
|
|
23
|
-
import { E as
|
|
23
|
+
import { E as Kt, u as qt } from "./EntityPickerDialog.es.js";
|
|
24
24
|
import "./PlayableIcon.es.js";
|
|
25
25
|
import "date-fns";
|
|
26
26
|
import "lexical";
|
|
@@ -33,60 +33,60 @@ import "@lexical/selection";
|
|
|
33
33
|
import "@lexical/utils";
|
|
34
34
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
35
35
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
36
|
+
import { useContributions as Yt, prefetchPiece as Qt, runContribution as Jt } from "@ynput/ayon-addon";
|
|
36
37
|
import "@tanstack/react-table";
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import { u as
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
id: dt,
|
|
38
|
+
import { b as ge, H as Xt, a as Zt, e as en, S as tn } from "./SimpleTable.es.js";
|
|
39
|
+
import { D as nn, L as sn, s as on } from "./sortLists.es.js";
|
|
40
|
+
import { a as Xe, g as Pe } from "./getEntityTypeIcon.es.js";
|
|
41
|
+
import { g as an } from "./iconUtils.es.js";
|
|
42
|
+
import { u as rn, a as ln } from "./useAttributeEnums.es.js";
|
|
43
|
+
import { b as cn, s as dn } from "./buildHierarchicalTableRows.es.js";
|
|
44
|
+
import { n as Ce } from "./entityDefinitions.es.js";
|
|
45
|
+
import { a as un, K as pn } from "./platform.es.js";
|
|
46
|
+
import { u as mn } from "./NewEntityContextInstance.es.js";
|
|
47
|
+
import { u as fn } from "./VersionUploadContextInstance.es.js";
|
|
48
|
+
import { F as Ze } from "./EntityUpdatesContext.es.js";
|
|
49
|
+
import { M as hn, a as gn } from "./Menu.es.js";
|
|
50
|
+
const ut = "default", Le = { id: "label", label: "Name", desc: !1 }, Oe = (e) => ({
|
|
51
|
+
id: ut,
|
|
52
52
|
label: e,
|
|
53
53
|
desc: !1
|
|
54
|
-
}),
|
|
55
|
-
if (e === "entityList") return
|
|
56
|
-
const [t] =
|
|
54
|
+
}), yn = ["hierarchy", "assignees", "author"], bn = ["status", "type", "taskType", "folderType"], Ve = (e) => yn.includes(e) ? [Le] : e === "entityList" ? sn : e.startsWith("attrib.") ? [Oe("Attribute order"), Le] : bn.includes(e) ? [Oe("Anatomy order"), Le] : [Oe("Default order"), Le], pt = (e) => {
|
|
55
|
+
if (e === "entityList") return nn;
|
|
56
|
+
const [t] = Ve(e);
|
|
57
57
|
return { by: t.id, desc: t.desc };
|
|
58
|
-
},
|
|
58
|
+
}, to = (e, t) => {
|
|
59
59
|
const { by: s, desc: a } = t || {};
|
|
60
|
-
return
|
|
61
|
-
},
|
|
62
|
-
const u = (l) =>
|
|
60
|
+
return Ve(e).some((u) => u.id === s) ? { by: s, desc: !!a } : pt(e);
|
|
61
|
+
}, Sn = ["noValue", "hasValue"], Tn = (e) => e.id.startsWith("folder-"), vn = new Intl.Collator(void 0, { sensitivity: "base", numeric: !0 }), Ne = (e) => e.label || e.name || "", mt = (e, t, { by: s, desc: a }) => {
|
|
62
|
+
const u = (l) => Sn.includes(l.id) || t === "entityList" && Tn(l), c = e.filter(u), p = e.filter((l) => !u(l));
|
|
63
63
|
let g;
|
|
64
64
|
if (t === "entityList")
|
|
65
|
-
g =
|
|
65
|
+
g = on(
|
|
66
66
|
p.map((l) => ({
|
|
67
67
|
row: l,
|
|
68
|
-
label:
|
|
68
|
+
label: Ne(l),
|
|
69
69
|
active: l.data?.active ?? !0,
|
|
70
70
|
createdAt: l.data?.createdAt,
|
|
71
71
|
updatedAt: l.data?.updatedAt
|
|
72
72
|
})),
|
|
73
73
|
{ by: s, desc: a }
|
|
74
74
|
).map(({ row: l }) => l);
|
|
75
|
-
else if (s ===
|
|
75
|
+
else if (s === ut)
|
|
76
76
|
g = a ? [...p].reverse() : p;
|
|
77
77
|
else {
|
|
78
78
|
const l = a ? -1 : 1;
|
|
79
79
|
g = [...p].sort(
|
|
80
|
-
(m, y) =>
|
|
80
|
+
(m, y) => vn.compare(Ne(m), Ne(y)) * l
|
|
81
81
|
);
|
|
82
82
|
}
|
|
83
83
|
return [...c, ...g].map(
|
|
84
|
-
(l) => l.subRows?.length ? { ...l, subRows:
|
|
84
|
+
(l) => l.subRows?.length ? { ...l, subRows: mt(l.subRows, t, { by: s, desc: a }) } : l
|
|
85
85
|
);
|
|
86
|
-
},
|
|
87
|
-
const a =
|
|
88
|
-
return s.by !== "label" && s.by === a.by && s.desc === a.desc ? e :
|
|
89
|
-
},
|
|
86
|
+
}, In = (e, t, s) => {
|
|
87
|
+
const a = pt(t);
|
|
88
|
+
return s.by !== "label" && s.by === a.by && s.desc === a.desc ? e : mt(e, t, s);
|
|
89
|
+
}, xn = ({
|
|
90
90
|
options: e,
|
|
91
91
|
sort: t,
|
|
92
92
|
onChange: s,
|
|
@@ -113,7 +113,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
113
113
|
] : void 0
|
|
114
114
|
};
|
|
115
115
|
})
|
|
116
|
-
}),
|
|
116
|
+
}), Cn = 180, ft = 100, ht = 34, Ln = (e, t = [], s = ft) => e.map((a) => t.includes(a) ? ht : s), wn = (e, t, s, a) => {
|
|
117
117
|
const u = e.reduce((m, y) => m + y, 0), c = a.filter(Boolean).length;
|
|
118
118
|
if (!c || u === s) return e;
|
|
119
119
|
if (u < s) {
|
|
@@ -124,18 +124,18 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
124
124
|
if (!g) return e;
|
|
125
125
|
const l = u - s;
|
|
126
126
|
return e.map((m, y) => m - l * (p[y] / g));
|
|
127
|
-
},
|
|
127
|
+
}, En = (e, t, s = [], a = 0, u = Cn) => {
|
|
128
128
|
if (!t.length)
|
|
129
129
|
return { heights: [], mins: [], sizes: [], minSize: 2, height: a };
|
|
130
|
-
const c = t.filter((b) => !s.includes(b)).length, p = (t.length - c) *
|
|
130
|
+
const c = t.filter((b) => !s.includes(b)).length, p = (t.length - c) * ht, g = a && c ? Math.min(
|
|
131
131
|
u,
|
|
132
132
|
Math.max(
|
|
133
|
-
|
|
133
|
+
ft,
|
|
134
134
|
Math.floor((a - p) / c)
|
|
135
135
|
)
|
|
136
|
-
) : u, l =
|
|
136
|
+
) : u, l = Ln(t, s), m = t.map(
|
|
137
137
|
(b, i) => s.includes(b) ? l[i] : Math.max(e[b] ?? g, l[i])
|
|
138
|
-
), y = t.map((b) => !s.includes(b)), C = l.reduce((b, i) => b + i, 0), f = y.some(Boolean) ? Math.max(a, C) : C, h =
|
|
138
|
+
), y = t.map((b) => !s.includes(b)), C = l.reduce((b, i) => b + i, 0), f = y.some(Boolean) ? Math.max(a, C) : C, h = wn(m, l, f, y);
|
|
139
139
|
return {
|
|
140
140
|
heights: h,
|
|
141
141
|
mins: l,
|
|
@@ -144,7 +144,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
144
144
|
minSize: 2,
|
|
145
145
|
height: f
|
|
146
146
|
};
|
|
147
|
-
},
|
|
147
|
+
}, Dn = (e, t, s) => {
|
|
148
148
|
const a = e.map((l, m) => Math.max(l / 100 * t, s[m])), u = Math.max(
|
|
149
149
|
t,
|
|
150
150
|
s.reduce((l, m) => l + m, 0)
|
|
@@ -152,29 +152,29 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
152
152
|
if (c <= 0) return a;
|
|
153
153
|
const p = a.map((l, m) => l - s[m]), g = p.reduce((l, m) => l + m, 0);
|
|
154
154
|
return g ? a.map((l, m) => l - c * (p[m] / g)) : a;
|
|
155
|
-
},
|
|
155
|
+
}, kn = "slicer-splitter", et = {
|
|
156
156
|
minSize: 2,
|
|
157
157
|
size: 12
|
|
158
|
-
},
|
|
159
|
-
const [e, t] =
|
|
160
|
-
|
|
161
|
-
100 -
|
|
158
|
+
}, no = () => {
|
|
159
|
+
const [e, t] = ct(kn, [
|
|
160
|
+
et.size,
|
|
161
|
+
100 - et.size
|
|
162
162
|
]);
|
|
163
163
|
return [e, (a) => {
|
|
164
164
|
t(a.sizes);
|
|
165
165
|
}];
|
|
166
|
-
},
|
|
167
|
-
const [u, c] =
|
|
166
|
+
}, Rn = (e, t, s = [], a = 0) => {
|
|
167
|
+
const [u, c] = ct(
|
|
168
168
|
`slicer-panel-heights-${e}`,
|
|
169
169
|
{}
|
|
170
|
-
), [p, g] =
|
|
170
|
+
), [p, g] = U(0), l = Array.isArray(u) ? {} : u, {
|
|
171
171
|
sizes: m,
|
|
172
172
|
mins: y,
|
|
173
173
|
minSize: C,
|
|
174
174
|
height: f,
|
|
175
175
|
heights: h
|
|
176
|
-
} =
|
|
177
|
-
const I =
|
|
176
|
+
} = En(l, t, s, a), b = (i) => {
|
|
177
|
+
const I = Dn(i.sizes, f, y);
|
|
178
178
|
c({
|
|
179
179
|
...l,
|
|
180
180
|
...Object.fromEntries(
|
|
@@ -192,13 +192,13 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
192
192
|
layoutKey: `${t.join("|")}#${s.join("|")}#${p}`,
|
|
193
193
|
handleResizeEnd: b
|
|
194
194
|
};
|
|
195
|
-
},
|
|
195
|
+
}, An = ({
|
|
196
196
|
projectName: e,
|
|
197
197
|
movingEntities: t,
|
|
198
198
|
onClose: s,
|
|
199
199
|
onMoveComplete: a
|
|
200
200
|
}) => {
|
|
201
|
-
const [u] =
|
|
201
|
+
const [u] = lt(), c = Rt(), { folders: p } = Ue(), g = c?.tableData || [], l = O(
|
|
202
202
|
(b) => c?.getEntityById(b) || p.find((i) => i.id === b),
|
|
203
203
|
[p, c]
|
|
204
204
|
), m = O(
|
|
@@ -226,7 +226,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
226
226
|
}
|
|
227
227
|
a?.(i);
|
|
228
228
|
} catch (I) {
|
|
229
|
-
let r =
|
|
229
|
+
let r = Je(I) || "Failed to move entities";
|
|
230
230
|
if (r.includes("already exists"))
|
|
231
231
|
if (t.entities.length > 1)
|
|
232
232
|
r = "Cannot move some entities - one or more entities with the same name already exist in the target location";
|
|
@@ -237,7 +237,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
237
237
|
const o = r.match(/name '.*?, (.+?)' already exists/);
|
|
238
238
|
r = `Cannot move "${o ? o[1] : "this folder"}" - a folder with this name already exists in the target location`;
|
|
239
239
|
}
|
|
240
|
-
|
|
240
|
+
Qe.error(r);
|
|
241
241
|
} finally {
|
|
242
242
|
s();
|
|
243
243
|
}
|
|
@@ -265,8 +265,8 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
265
265
|
throw new Error(r || "Some move operations failed");
|
|
266
266
|
}
|
|
267
267
|
} catch (b) {
|
|
268
|
-
let i =
|
|
269
|
-
|
|
268
|
+
let i = Je(b) || "Failed to move entities to root";
|
|
269
|
+
Qe.error(i);
|
|
270
270
|
} finally {
|
|
271
271
|
s();
|
|
272
272
|
}
|
|
@@ -310,7 +310,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
310
310
|
) ? "Cannot move folder to its child" : "Cannot move to this location";
|
|
311
311
|
},
|
|
312
312
|
[t, p, g, l]
|
|
313
|
-
), h =
|
|
313
|
+
), h = P(() => t?.entities.every((b) => b.entityType === "folder") || !1, [t]);
|
|
314
314
|
return {
|
|
315
315
|
handleMoveSubmit: m,
|
|
316
316
|
handleMoveToRoot: y,
|
|
@@ -318,20 +318,20 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
318
318
|
getDisabledMessage: f,
|
|
319
319
|
canMoveToRoot: h
|
|
320
320
|
};
|
|
321
|
-
},
|
|
321
|
+
}, Mn = ({
|
|
322
322
|
projectName: e,
|
|
323
323
|
movingEntities: t,
|
|
324
324
|
onClose: s,
|
|
325
325
|
onMoveComplete: a
|
|
326
326
|
}) => {
|
|
327
|
-
const { handleMoveSubmit: u, handleMoveToRoot: c, getDisabledFolderIds: p, getDisabledMessage: g } =
|
|
327
|
+
const { handleMoveSubmit: u, handleMoveToRoot: c, getDisabledFolderIds: p, getDisabledMessage: g } = An({
|
|
328
328
|
projectName: e,
|
|
329
329
|
movingEntities: t ?? null,
|
|
330
330
|
onClose: s,
|
|
331
331
|
onMoveComplete: a
|
|
332
332
|
});
|
|
333
333
|
return t?.entities.length ? /* @__PURE__ */ E(
|
|
334
|
-
|
|
334
|
+
Kt,
|
|
335
335
|
{
|
|
336
336
|
projectName: e,
|
|
337
337
|
entityType: "folder",
|
|
@@ -345,8 +345,8 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
345
345
|
getDisabledMessage: g
|
|
346
346
|
}
|
|
347
347
|
) : null;
|
|
348
|
-
},
|
|
349
|
-
const [s, { isLoading: a, isFetching: u }] =
|
|
348
|
+
}, _n = ({ projectName: e, useExtraSlices: t }) => {
|
|
349
|
+
const [s, { isLoading: a, isFetching: u }] = $t(), { formatAssignees: c } = t();
|
|
350
350
|
return {
|
|
351
351
|
getData: async () => {
|
|
352
352
|
const g = await s({ projectName: e || "" }, !0).unwrap();
|
|
@@ -354,39 +354,39 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
354
354
|
},
|
|
355
355
|
isLoading: a || u
|
|
356
356
|
};
|
|
357
|
-
},
|
|
358
|
-
const { isLoading: s, productTypes: a, ...u } =
|
|
357
|
+
}, Pn = ({ scopes: e, useExtraSlices: t }) => {
|
|
358
|
+
const { isLoading: s, productTypes: a, ...u } = be(), { formatStatuses: c, formatTaskTypes: p, formatProductTypes: g, formatTypes: l, formatAttribute: m } = t();
|
|
359
359
|
return { project: u, getStatuses: async () => c(u, e), getTypes: async () => l(u), getTaskTypes: async () => p(u), getProductTypes: async () => g(a), getAttribute: async (i) => m ? m(i).map(
|
|
360
|
-
(I) =>
|
|
360
|
+
(I) => Nt(I.icon ?? void 0) ? { ...I, icon: void 0, img: I.icon, imgShape: "circle" } : I
|
|
361
361
|
) : void 0, isLoading: s };
|
|
362
|
-
},
|
|
362
|
+
}, On = ({ entityTypes: e, request: t }) => {
|
|
363
363
|
const {
|
|
364
364
|
attributes: s,
|
|
365
365
|
isLoading: { siteInfo: a }
|
|
366
|
-
} =
|
|
367
|
-
return { attributes:
|
|
368
|
-
(m) => m.data.enum?.some((y) => y.hidden) ? { ...m, data: { ...m.data, enum:
|
|
366
|
+
} = Bt(), u = Ct(At), c = u?.attribFields?.length ? u.attribFields : s, { projectName: p } = be();
|
|
367
|
+
return { attributes: rn(c, { projectName: p, request: t ?? [] }).filter((m) => rt(m.data)).filter((m) => e.some((y) => m.scope?.includes(y))).map(
|
|
368
|
+
(m) => m.data.enum?.some((y) => y.hidden) ? { ...m, data: { ...m.data, enum: Ft(m.data.enum) } } : m
|
|
369
369
|
), isLoading: a };
|
|
370
|
-
},
|
|
370
|
+
}, Nn = "snippet_folder", ye = "folder", Fn = (e) => `${ye}-${e}`, Fe = (e) => [...e].sort((t, s) => {
|
|
371
371
|
if (t.active && !s.active) return -1;
|
|
372
372
|
if (!t.active && s.active) return 1;
|
|
373
373
|
const a = new Date(t.createdAt || 0);
|
|
374
374
|
return new Date(s.createdAt || 0).getTime() - a.getTime();
|
|
375
|
-
}),
|
|
376
|
-
const { projectName: t } =
|
|
375
|
+
}), jn = (e = !0) => {
|
|
376
|
+
const { projectName: t } = be(), { powerLicense: s } = Be(), {
|
|
377
377
|
data: a,
|
|
378
378
|
isLoading: u,
|
|
379
379
|
isFetching: c
|
|
380
|
-
} =
|
|
380
|
+
} = zt(
|
|
381
381
|
{ projectName: t || "" },
|
|
382
382
|
{
|
|
383
383
|
initialPageParam: { cursor: "" },
|
|
384
384
|
skip: !t || !e
|
|
385
385
|
}
|
|
386
|
-
), { data: p = [], isLoading: g } =
|
|
386
|
+
), { data: p = [], isLoading: g } = Ut(
|
|
387
387
|
{ projectName: t || "" },
|
|
388
388
|
{ skip: !t || !s || !e }
|
|
389
|
-
), l =
|
|
389
|
+
), l = P(() => {
|
|
390
390
|
if (!a?.pages) return [];
|
|
391
391
|
const C = a.pages.flatMap((f) => f.lists);
|
|
392
392
|
if (s && p.length > 0) {
|
|
@@ -429,7 +429,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
429
429
|
name: n.label,
|
|
430
430
|
label: n.label,
|
|
431
431
|
...T.length > 0 && { parents: T },
|
|
432
|
-
icon:
|
|
432
|
+
icon: Xe(n),
|
|
433
433
|
subRows: [],
|
|
434
434
|
data: {
|
|
435
435
|
id: n.id,
|
|
@@ -443,49 +443,49 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
443
443
|
updatedAt: n.updatedAt
|
|
444
444
|
}
|
|
445
445
|
}), I = (n) => n.sort((v, T) => {
|
|
446
|
-
const x = p.findIndex((
|
|
446
|
+
const x = p.findIndex((Q) => Q.id === v.id), D = p.findIndex((Q) => Q.id === T.id);
|
|
447
447
|
return x === -1 && D === -1 ? v.folder.label.localeCompare(T.folder.label) : x === -1 ? 1 : D === -1 ? -1 : x - D;
|
|
448
448
|
}), r = (n) => {
|
|
449
449
|
const v = n.items.map((T) => T.id);
|
|
450
450
|
for (const T of n.children.values())
|
|
451
451
|
v.push(...r(T));
|
|
452
452
|
return v;
|
|
453
|
-
}, d =
|
|
453
|
+
}, d = cn({
|
|
454
454
|
folderNodes: f,
|
|
455
455
|
rootFolderIds: h,
|
|
456
456
|
showEmptyFolders: !1,
|
|
457
|
-
buildFolderRowId:
|
|
457
|
+
buildFolderRowId: Fn,
|
|
458
458
|
createItemRow: i,
|
|
459
459
|
sortFolderNodes: I,
|
|
460
|
-
sortItems:
|
|
460
|
+
sortItems: Fe,
|
|
461
461
|
getFolderLabel: (n) => n.label,
|
|
462
|
-
getFolderIcon: (n) => n.data?.icon ||
|
|
462
|
+
getFolderIcon: (n) => n.data?.icon || Nn,
|
|
463
463
|
getFolderColor: (n) => n.data?.color,
|
|
464
464
|
getItemCount: (n) => n.items.length + Array.from(n.children.values()).reduce((v, T) => v + T.items.length, 0)
|
|
465
465
|
});
|
|
466
466
|
for (const n of d) {
|
|
467
|
-
if (n.id.startsWith(
|
|
468
|
-
const T = n.id.substring((
|
|
467
|
+
if (n.id.startsWith(ye + "-")) {
|
|
468
|
+
const T = n.id.substring((ye + "-").length), x = f.get(T);
|
|
469
469
|
x && (n.data = { ...n.data, childListIds: r(x) });
|
|
470
470
|
}
|
|
471
471
|
const v = [...n.subRows || []];
|
|
472
472
|
for (; v.length > 0; ) {
|
|
473
473
|
const T = v.shift();
|
|
474
|
-
if (T.id.startsWith(
|
|
475
|
-
const x = T.id.substring((
|
|
474
|
+
if (T.id.startsWith(ye + "-")) {
|
|
475
|
+
const x = T.id.substring((ye + "-").length), D = f.get(x);
|
|
476
476
|
D && (T.data = { ...T.data, childListIds: r(D) });
|
|
477
477
|
}
|
|
478
478
|
T.subRows && v.push(...T.subRows);
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
const o =
|
|
481
|
+
const o = Fe(b).map((n) => i(n));
|
|
482
482
|
return [...d, ...o];
|
|
483
483
|
}
|
|
484
|
-
return
|
|
484
|
+
return Fe(C).map((f) => ({
|
|
485
485
|
id: f.id,
|
|
486
486
|
name: f.label,
|
|
487
487
|
label: f.label,
|
|
488
|
-
icon:
|
|
488
|
+
icon: Xe(f),
|
|
489
489
|
subRows: [],
|
|
490
490
|
data: {
|
|
491
491
|
id: f.id,
|
|
@@ -504,14 +504,14 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
504
504
|
isLoading: u || c || g,
|
|
505
505
|
isExpandable: m
|
|
506
506
|
};
|
|
507
|
-
},
|
|
508
|
-
const c =
|
|
507
|
+
}, $n = (e, t, s, a) => e.id === "noValue" ? t.get(it)?.count ?? (a ? 0 : void 0) : e.id === "hasValue" ? a ? s : void 0 : t.get(e.id)?.count ?? (e.name ? t.get(e.name)?.count : void 0) ?? (a ? 0 : void 0), gt = (e, t, s, a) => t ? e.map((u) => {
|
|
508
|
+
const c = $n(u, t, s, a);
|
|
509
509
|
return {
|
|
510
510
|
...u,
|
|
511
511
|
badge: c != null ? String(c) : u.badge,
|
|
512
|
-
subRows: u.subRows?.length ?
|
|
512
|
+
subRows: u.subRows?.length ? gt(u.subRows, t, s, a) : u.subRows
|
|
513
513
|
};
|
|
514
|
-
}) : e,
|
|
514
|
+
}) : e, zn = (e) => ({
|
|
515
515
|
id: "noValue",
|
|
516
516
|
name: "noValue",
|
|
517
517
|
label: `No ${e}`,
|
|
@@ -520,7 +520,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
520
520
|
data: {
|
|
521
521
|
id: "noValue"
|
|
522
522
|
}
|
|
523
|
-
}),
|
|
523
|
+
}), Un = (e) => ({
|
|
524
524
|
id: "hasValue",
|
|
525
525
|
name: "hasValue",
|
|
526
526
|
label: `Some ${e}`,
|
|
@@ -529,7 +529,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
529
529
|
data: {
|
|
530
530
|
id: "hasValue"
|
|
531
531
|
}
|
|
532
|
-
}),
|
|
532
|
+
}), tt = [
|
|
533
533
|
{
|
|
534
534
|
label: "Hierarchy",
|
|
535
535
|
value: "hierarchy",
|
|
@@ -548,17 +548,17 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
548
548
|
{
|
|
549
549
|
label: "Task Type",
|
|
550
550
|
value: "taskType",
|
|
551
|
-
icon:
|
|
551
|
+
icon: Pe("task")
|
|
552
552
|
},
|
|
553
553
|
{
|
|
554
554
|
label: "Folder Type",
|
|
555
555
|
value: "folderType",
|
|
556
|
-
icon:
|
|
556
|
+
icon: Pe("folder")
|
|
557
557
|
},
|
|
558
558
|
{
|
|
559
559
|
label: "Product Type",
|
|
560
560
|
value: "productType",
|
|
561
|
-
icon:
|
|
561
|
+
icon: Pe("product")
|
|
562
562
|
},
|
|
563
563
|
{
|
|
564
564
|
label: "Author",
|
|
@@ -570,7 +570,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
570
570
|
value: "entityList",
|
|
571
571
|
icon: "list_alt"
|
|
572
572
|
}
|
|
573
|
-
],
|
|
573
|
+
], Bn = ({
|
|
574
574
|
sliceFields: e,
|
|
575
575
|
usedSliceTypes: t = [],
|
|
576
576
|
entityTypes: s = [],
|
|
@@ -586,13 +586,13 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
586
586
|
onSliceTypeChange: y,
|
|
587
587
|
useExtraSlices: C,
|
|
588
588
|
isLoadingExtraSlices: f
|
|
589
|
-
} =
|
|
590
|
-
...
|
|
589
|
+
} = ze(), h = p ?? m, b = g ?? y, { projectName: i } = be(), { formatAttribute: I } = C(), r = e.filter((w) => tt.some((R) => R.value === w.value)).map((w) => ({
|
|
590
|
+
...tt.find((F) => F.value === w.value),
|
|
591
591
|
...w
|
|
592
|
-
})), d = e.some((w) => w.value === "attributes"), o = h?.startsWith("attrib.") ? h.slice(7) : void 0, n =
|
|
592
|
+
})), d = e.some((w) => w.value === "attributes"), o = h?.startsWith("attrib.") ? h.slice(7) : void 0, n = P(
|
|
593
593
|
() => o ? [o] : [],
|
|
594
594
|
[o]
|
|
595
|
-
), { attributes: v, isLoading: T } =
|
|
595
|
+
), { attributes: v, isLoading: T } = On({
|
|
596
596
|
entityTypes: s,
|
|
597
597
|
request: n
|
|
598
598
|
});
|
|
@@ -600,33 +600,33 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
600
600
|
(w) => r.push({
|
|
601
601
|
label: w.data.title || w.name,
|
|
602
602
|
value: "attrib." + w.name,
|
|
603
|
-
icon:
|
|
603
|
+
icon: an(w.name, w.data.type, rt(w.data))
|
|
604
604
|
})
|
|
605
605
|
);
|
|
606
|
-
const [x, D] =
|
|
607
|
-
project:
|
|
608
|
-
getStatuses:
|
|
609
|
-
getTypes:
|
|
610
|
-
getTaskTypes:
|
|
606
|
+
const [x, D] = U(!1), pe = !!v.find((w) => w.name === o)?.enumIsLoading, {
|
|
607
|
+
project: me,
|
|
608
|
+
getStatuses: se,
|
|
609
|
+
getTypes: fe,
|
|
610
|
+
getTaskTypes: ee,
|
|
611
611
|
getProductTypes: oe,
|
|
612
|
-
getAttribute:
|
|
612
|
+
getAttribute: J,
|
|
613
613
|
isLoading: W
|
|
614
|
-
} =
|
|
615
|
-
data:
|
|
614
|
+
} = Pn({ scopes: s, useExtraSlices: C }), {
|
|
615
|
+
data: X,
|
|
616
616
|
getData: ae,
|
|
617
617
|
isFetching: L
|
|
618
|
-
} =
|
|
618
|
+
} = qt({
|
|
619
619
|
projectName: i || "",
|
|
620
|
-
folderTypes:
|
|
620
|
+
folderTypes: me?.folderTypes || [],
|
|
621
621
|
includeColors: !0
|
|
622
|
-
}), { getData: A, isLoading:
|
|
622
|
+
}), { getData: A, isLoading: k } = _n({
|
|
623
623
|
projectName: i,
|
|
624
624
|
useExtraSlices: C
|
|
625
625
|
}), {
|
|
626
|
-
getData:
|
|
627
|
-
isLoading:
|
|
628
|
-
isExpandable:
|
|
629
|
-
} =
|
|
626
|
+
getData: te,
|
|
627
|
+
isLoading: Se,
|
|
628
|
+
isExpandable: Ee
|
|
629
|
+
} = jn(h === "entityList"), ne = L || W || k || f && h !== "hierarchy" || Se && h === "entityList" || T || pe, Z = {
|
|
630
630
|
hierarchy: {
|
|
631
631
|
getData: ae,
|
|
632
632
|
isLoading: L,
|
|
@@ -634,28 +634,28 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
634
634
|
},
|
|
635
635
|
assignees: {
|
|
636
636
|
getData: A,
|
|
637
|
-
isLoading:
|
|
637
|
+
isLoading: k,
|
|
638
638
|
isExpandable: !1,
|
|
639
639
|
noValue: !0,
|
|
640
640
|
hasValue: !0
|
|
641
641
|
},
|
|
642
642
|
author: {
|
|
643
643
|
getData: A,
|
|
644
|
-
isLoading:
|
|
644
|
+
isLoading: k,
|
|
645
645
|
isExpandable: !1
|
|
646
646
|
},
|
|
647
647
|
status: {
|
|
648
|
-
getData:
|
|
648
|
+
getData: se,
|
|
649
649
|
isLoading: W,
|
|
650
650
|
isExpandable: !1
|
|
651
651
|
},
|
|
652
652
|
type: {
|
|
653
|
-
getData:
|
|
653
|
+
getData: fe,
|
|
654
654
|
isLoading: W,
|
|
655
655
|
isExpandable: !0
|
|
656
656
|
},
|
|
657
657
|
taskType: {
|
|
658
|
-
getData:
|
|
658
|
+
getData: ee,
|
|
659
659
|
isLoading: W,
|
|
660
660
|
isExpandable: !1
|
|
661
661
|
},
|
|
@@ -665,80 +665,80 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
665
665
|
isExpandable: !1
|
|
666
666
|
},
|
|
667
667
|
entityList: {
|
|
668
|
-
getData:
|
|
669
|
-
isLoading:
|
|
670
|
-
isExpandable:
|
|
668
|
+
getData: te,
|
|
669
|
+
isLoading: Se,
|
|
670
|
+
isExpandable: Ee
|
|
671
671
|
}
|
|
672
672
|
};
|
|
673
673
|
for (const w of v)
|
|
674
|
-
|
|
675
|
-
getData: () =>
|
|
674
|
+
Z["attrib." + w.name] = {
|
|
675
|
+
getData: () => J(w),
|
|
676
676
|
isLoading: T || !!w.enumIsLoading,
|
|
677
677
|
isExpandable: !1,
|
|
678
678
|
isAttribute: !0
|
|
679
679
|
};
|
|
680
|
-
const ie = { data: [], isExpandable: !1 }, [
|
|
681
|
-
(w) =>
|
|
680
|
+
const ie = { data: [], isExpandable: !1 }, [V, _] = U(ie), K = Z[h], re = r.find(
|
|
681
|
+
(w) => Z[w.value] && !t.includes(w.value)
|
|
682
682
|
)?.value;
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
}, [
|
|
686
|
-
const
|
|
687
|
-
const F =
|
|
683
|
+
ue(() => {
|
|
684
|
+
ne || K || !re || b(re, !1);
|
|
685
|
+
}, [ne, K, re]);
|
|
686
|
+
const De = (w, R) => {
|
|
687
|
+
const F = Z[w];
|
|
688
688
|
if (!F) {
|
|
689
689
|
console.warn(`Slice type ${w} not found`);
|
|
690
690
|
return;
|
|
691
691
|
}
|
|
692
|
-
(F.isAttribute && d || e.some((le) => le.value === w)) && b(w,
|
|
692
|
+
(F.isAttribute && d || e.some((le) => le.value === w)) && b(w, R);
|
|
693
693
|
};
|
|
694
|
-
|
|
695
|
-
if (
|
|
694
|
+
ue(() => {
|
|
695
|
+
if (ne) return;
|
|
696
696
|
(async () => {
|
|
697
697
|
try {
|
|
698
698
|
if (!K) return;
|
|
699
699
|
D(!0);
|
|
700
|
-
const
|
|
701
|
-
if (
|
|
700
|
+
const R = await K.getData();
|
|
701
|
+
if (R === void 0)
|
|
702
702
|
throw window.alert(
|
|
703
703
|
"Slice options failed to load. This likely means the PowerFeatures addon is out of date. Please update to the latest version."
|
|
704
704
|
), b(re ?? "hierarchy", !1), new Error("Slice data is undefined");
|
|
705
|
-
K.hasValue &&
|
|
706
|
-
data:
|
|
705
|
+
K.hasValue && R.unshift(Un(h)), K.noValue && R.unshift(zn(h)), _({
|
|
706
|
+
data: R,
|
|
707
707
|
isExpandable: K.isExpandable
|
|
708
708
|
});
|
|
709
|
-
} catch (
|
|
710
|
-
console.error("Error fetching slice data:",
|
|
709
|
+
} catch (R) {
|
|
710
|
+
console.error("Error fetching slice data:", R), _(ie);
|
|
711
711
|
} finally {
|
|
712
712
|
D(!1);
|
|
713
713
|
}
|
|
714
714
|
})();
|
|
715
|
-
}, [h, i,
|
|
716
|
-
const
|
|
717
|
-
() =>
|
|
718
|
-
[
|
|
719
|
-
), j =
|
|
720
|
-
() =>
|
|
715
|
+
}, [h, i, ne, h === "hierarchy" ? X : null]);
|
|
716
|
+
const q = l?.by, Te = !!l?.desc, N = P(
|
|
717
|
+
() => q ? In(V.data, h, { by: q, desc: Te }) : V.data,
|
|
718
|
+
[V.data, h, q, Te]
|
|
719
|
+
), j = P(
|
|
720
|
+
() => gt(N, a, u, c),
|
|
721
721
|
[N, a, u, c]
|
|
722
|
-
),
|
|
723
|
-
const w = /* @__PURE__ */ new Map(),
|
|
724
|
-
for (;
|
|
725
|
-
const F =
|
|
722
|
+
), He = P(() => {
|
|
723
|
+
const w = /* @__PURE__ */ new Map(), R = [...j];
|
|
724
|
+
for (; R.length > 0; ) {
|
|
725
|
+
const F = R.shift();
|
|
726
726
|
if (F && (w.set(F.id, F), F.subRows && F.subRows.length > 0))
|
|
727
727
|
for (const le of F.subRows)
|
|
728
|
-
|
|
728
|
+
R.push(le);
|
|
729
729
|
}
|
|
730
730
|
return w;
|
|
731
731
|
}, [j]);
|
|
732
732
|
return {
|
|
733
733
|
sliceOptions: r,
|
|
734
|
-
table: { ...
|
|
735
|
-
sliceMap:
|
|
736
|
-
isLoading:
|
|
734
|
+
table: { ...V, data: j },
|
|
735
|
+
sliceMap: He,
|
|
736
|
+
isLoading: Z[h] && Z[h].isLoading || x || ne,
|
|
737
737
|
sliceType: h,
|
|
738
|
-
handleSliceTypeChange:
|
|
738
|
+
handleSliceTypeChange: De
|
|
739
739
|
};
|
|
740
|
-
},
|
|
741
|
-
const u =
|
|
740
|
+
}, Vn = /* @__PURE__ */ new Map(), Hn = (e, t, s, a) => {
|
|
741
|
+
const u = P(() => ({ id: t, desc: !1 }), [t]), c = P(
|
|
742
742
|
() => (s ?? []).filter((b) => b !== t).map((b) => ({ id: b, desc: !1 })),
|
|
743
743
|
[s, t]
|
|
744
744
|
), p = !!a || !e, g = e?.entity === "version" ? { entity: "version", groupBy: u, extraGroupBys: c, args: e.args, skip: p } : {
|
|
@@ -747,14 +747,14 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
747
747
|
extraGroupBys: c,
|
|
748
748
|
args: e?.args ?? { projectName: "" },
|
|
749
749
|
skip: p
|
|
750
|
-
}, { counts: l, total: m, complete: y } =
|
|
750
|
+
}, { counts: l, total: m, complete: y } = ln(g), C = l?.get(it)?.count ?? 0, f = Math.max(m - C, 0);
|
|
751
751
|
return {
|
|
752
|
-
counts: p ? void 0 : l ?? (y ?
|
|
752
|
+
counts: p ? void 0 : l ?? (y ? Vn : void 0),
|
|
753
753
|
total: m,
|
|
754
754
|
filled: f,
|
|
755
755
|
complete: !p && y
|
|
756
756
|
};
|
|
757
|
-
},
|
|
757
|
+
}, Gn = B.div`
|
|
758
758
|
display: flex;
|
|
759
759
|
align-items: center;
|
|
760
760
|
|
|
@@ -762,24 +762,24 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
762
762
|
flex: 1;
|
|
763
763
|
min-width: 0;
|
|
764
764
|
}
|
|
765
|
-
`,
|
|
765
|
+
`, Wn = B(_t)`
|
|
766
766
|
flex: 1;
|
|
767
767
|
min-width: 0;
|
|
768
768
|
height: 28px;
|
|
769
769
|
min-height: 28px;
|
|
770
|
-
`,
|
|
770
|
+
`, Kn = ({ open: e, value: t, subject: s, onChange: a }) => {
|
|
771
771
|
const u = () => a(e ? void 0 : ""), c = (g) => {
|
|
772
772
|
g.key === "Escape" && a(void 0);
|
|
773
773
|
}, p = (g) => {
|
|
774
|
-
const l =
|
|
774
|
+
const l = jt(g.clipboardData.getData("text"));
|
|
775
775
|
if (l === null) return;
|
|
776
776
|
g.preventDefault();
|
|
777
777
|
const m = g.currentTarget, y = m.selectionStart ?? t.length, C = m.selectionEnd ?? t.length, f = y + l.length;
|
|
778
778
|
a(t.slice(0, y) + l + t.slice(C)), requestAnimationFrame(() => m.setSelectionRange(f, f));
|
|
779
779
|
};
|
|
780
|
-
return /* @__PURE__ */ G(
|
|
780
|
+
return /* @__PURE__ */ G(Gn, { className: Y({ open: e }), children: [
|
|
781
781
|
e && /* @__PURE__ */ E(
|
|
782
|
-
|
|
782
|
+
Wn,
|
|
783
783
|
{
|
|
784
784
|
value: t,
|
|
785
785
|
onChange: (g) => a(g.target.value),
|
|
@@ -790,22 +790,22 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
790
790
|
}
|
|
791
791
|
),
|
|
792
792
|
/* @__PURE__ */ E(
|
|
793
|
-
|
|
793
|
+
ge,
|
|
794
794
|
{
|
|
795
795
|
icon: e ? "close" : "search",
|
|
796
796
|
onClick: u,
|
|
797
|
-
className:
|
|
797
|
+
className: Y({ open: e }),
|
|
798
798
|
"data-tooltip": e ? "Close search" : `Search ${s}`
|
|
799
799
|
}
|
|
800
800
|
)
|
|
801
801
|
] });
|
|
802
|
-
},
|
|
803
|
-
e.toggleExpanded(t), e.subRows?.forEach((s) =>
|
|
804
|
-
},
|
|
805
|
-
const { onOpenNew: u } =
|
|
802
|
+
}, je = (e, t) => {
|
|
803
|
+
e.toggleExpanded(t), e.subRows?.forEach((s) => je(s, t));
|
|
804
|
+
}, nt = (e) => e.map((t) => t.id).filter(Boolean), qn = (e, t, s, a) => {
|
|
805
|
+
const { onOpenNew: u } = mn(), { projectName: c } = be(), { setEntities: p } = Vt(), g = fn(), [l] = lt(), { deleteEntities: m } = Ht(), [y, C] = U(null), f = O(
|
|
806
806
|
(r, d) => d.map((o) => t?.get(o) || (o === r.id ? r : void 0)).filter((o) => !!o),
|
|
807
807
|
[t]
|
|
808
|
-
), h =
|
|
808
|
+
), h = P(
|
|
809
809
|
() => ({
|
|
810
810
|
onShowDetails: (r, d = [r.id]) => {
|
|
811
811
|
p({
|
|
@@ -874,12 +874,12 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
874
874
|
}), C(null));
|
|
875
875
|
},
|
|
876
876
|
[c, y, l]
|
|
877
|
-
), i =
|
|
877
|
+
), i = P(
|
|
878
878
|
() => [
|
|
879
879
|
(r, { row: d, selectedRows: o }) => ({
|
|
880
880
|
label: "Show details",
|
|
881
881
|
icon: "dock_to_left",
|
|
882
|
-
shortcut:
|
|
882
|
+
shortcut: un("click", [pn.Alt]),
|
|
883
883
|
command: () => h.onShowDetails(d.original, o)
|
|
884
884
|
}),
|
|
885
885
|
(r, { row: d }) => ({
|
|
@@ -897,7 +897,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
897
897
|
(r, { selectedTableRows: d }) => ({
|
|
898
898
|
label: "Expand all children",
|
|
899
899
|
icon: "expand_all",
|
|
900
|
-
command: () => d.filter((o) => o.getCanExpand() && !o.getIsExpanded()).forEach((o) =>
|
|
900
|
+
command: () => d.filter((o) => o.getCanExpand() && !o.getIsExpanded()).forEach((o) => je(o, !0)),
|
|
901
901
|
hidden: !d.some(
|
|
902
902
|
(o) => o.getCanExpand() && !o.getIsExpanded()
|
|
903
903
|
)
|
|
@@ -905,7 +905,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
905
905
|
(r, { selectedTableRows: d }) => ({
|
|
906
906
|
label: "Collapse all children",
|
|
907
907
|
icon: "collapse_all",
|
|
908
|
-
command: () => d.filter((o) => o.getCanExpand() && o.getIsExpanded()).forEach((o) =>
|
|
908
|
+
command: () => d.filter((o) => o.getCanExpand() && o.getIsExpanded()).forEach((o) => je(o, !1)),
|
|
909
909
|
hidden: !d.some(
|
|
910
910
|
(o) => o.getCanExpand() && o.getIsExpanded()
|
|
911
911
|
)
|
|
@@ -926,19 +926,19 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
926
926
|
hidden: !a
|
|
927
927
|
}),
|
|
928
928
|
(r, { row: d, selectedRows: o }) => ({
|
|
929
|
-
label:
|
|
930
|
-
icon:
|
|
929
|
+
label: Ce.folder.createLabel,
|
|
930
|
+
icon: Ce.folder.icon,
|
|
931
931
|
command: () => u?.("folder", {
|
|
932
|
-
parentFolderIds:
|
|
932
|
+
parentFolderIds: nt(
|
|
933
933
|
f(d.original, o)
|
|
934
934
|
)
|
|
935
935
|
})
|
|
936
936
|
}),
|
|
937
937
|
(r, { row: d, selectedRows: o }) => ({
|
|
938
|
-
label:
|
|
939
|
-
icon:
|
|
938
|
+
label: Ce.task.createLabel,
|
|
939
|
+
icon: Ce.task.icon,
|
|
940
940
|
command: () => u?.("task", {
|
|
941
|
-
parentFolderIds:
|
|
941
|
+
parentFolderIds: nt(
|
|
942
942
|
f(d.original, o)
|
|
943
943
|
)
|
|
944
944
|
})
|
|
@@ -964,7 +964,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
964
964
|
onSubmitRename: b,
|
|
965
965
|
onCancelRename: () => C(null)
|
|
966
966
|
};
|
|
967
|
-
},
|
|
967
|
+
}, Yn = B(Pt)`
|
|
968
968
|
/* put above the menu so it's still clickable */
|
|
969
969
|
/* NOTE: this will need fixing as this also puts it above dialogs */
|
|
970
970
|
/* z-index: 1001; */
|
|
@@ -995,7 +995,7 @@ const dt = "default", Ie = { id: "label", label: "Name", desc: !1 }, Pe = (e) =>
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
`;
|
|
998
|
-
|
|
998
|
+
B.div`
|
|
999
999
|
display: flex;
|
|
1000
1000
|
flex-direction: column;
|
|
1001
1001
|
gap: var(--base-gap-large);
|
|
@@ -1017,10 +1017,10 @@ U.div`
|
|
|
1017
1017
|
font-weight: 600;
|
|
1018
1018
|
}
|
|
1019
1019
|
`;
|
|
1020
|
-
const
|
|
1020
|
+
const Qn = (e, t, s) => {
|
|
1021
1021
|
const a = `${t}${s === 1 ? "" : "s"}`;
|
|
1022
1022
|
return e === "created" ? `new ${a}` : e === "deleted" ? `${a} deleted` : `${s} ${a} ${e.replaceAll("_", " ")}`;
|
|
1023
|
-
},
|
|
1023
|
+
}, Jn = (e) => {
|
|
1024
1024
|
const t = /* @__PURE__ */ new Map();
|
|
1025
1025
|
return e.forEach((a) => {
|
|
1026
1026
|
const [, u, c] = a.topic.split(".");
|
|
@@ -1032,15 +1032,15 @@ const Kn = (e, t, s) => {
|
|
|
1032
1032
|
};
|
|
1033
1033
|
g.ids.add(a.entityId || String(a.id)), t.set(p, g);
|
|
1034
1034
|
}), `${Array.from(t.values()).map(
|
|
1035
|
-
({ entityType: a, updateType: u, ids: c }) =>
|
|
1035
|
+
({ entityType: a, updateType: u, ids: c }) => Qn(u, a, c.size)
|
|
1036
1036
|
).join(", ")} since last sync`;
|
|
1037
|
-
},
|
|
1037
|
+
}, Xn = Lt(
|
|
1038
1038
|
({ projectNames: e, topics: t, onSync: s, shouldSyncOnUpdate: a, hideWhenNoUpdates: u = !1, ...c }, p) => {
|
|
1039
|
-
const [g, l] =
|
|
1040
|
-
|
|
1039
|
+
const [g, l] = U(!1), [m, y] = Gt(), { setMenuOpen: C } = dt(), f = we(null), h = we(), b = wt();
|
|
1040
|
+
ue(() => () => {
|
|
1041
1041
|
const x = h.current;
|
|
1042
1042
|
h.current = void 0, x !== void 0 && clearTimeout(x);
|
|
1043
|
-
}, []),
|
|
1043
|
+
}, []), Et(p, () => f.current, []);
|
|
1044
1044
|
const i = async () => {
|
|
1045
1045
|
l(!0);
|
|
1046
1046
|
try {
|
|
@@ -1048,26 +1048,26 @@ const Kn = (e, t, s) => {
|
|
|
1048
1048
|
} finally {
|
|
1049
1049
|
l(!1);
|
|
1050
1050
|
}
|
|
1051
|
-
}, { updates: I, hasUpdates: r } =
|
|
1051
|
+
}, { updates: I, hasUpdates: r } = Wt({
|
|
1052
1052
|
projectNames: e,
|
|
1053
1053
|
topics: t,
|
|
1054
1054
|
isSyncing: g,
|
|
1055
1055
|
shouldSyncOnUpdate: a
|
|
1056
1056
|
});
|
|
1057
|
-
if (
|
|
1057
|
+
if (ue(() => {
|
|
1058
1058
|
const x = (D) => {
|
|
1059
|
-
D.repeat || !D.shiftKey || D.ctrlKey || D.metaKey || D.key.toLowerCase() !== "r" ||
|
|
1059
|
+
D.repeat || !D.shiftKey || D.ctrlKey || D.metaKey || D.key.toLowerCase() !== "r" || dn(D) || (D.preventDefault(), D.stopPropagation(), i());
|
|
1060
1060
|
};
|
|
1061
1061
|
return window.addEventListener("keydown", x), () => window.removeEventListener("keydown", x);
|
|
1062
1062
|
}, [i]), u && !r) return null;
|
|
1063
|
-
const d =
|
|
1063
|
+
const d = Jn(I), o = Object.values(m).some(Boolean);
|
|
1064
1064
|
Object.values(m).every(Boolean);
|
|
1065
1065
|
const n = () => {
|
|
1066
1066
|
h.current && clearTimeout(h.current);
|
|
1067
1067
|
};
|
|
1068
|
-
return /* @__PURE__ */ G(
|
|
1068
|
+
return /* @__PURE__ */ G($e, { children: [
|
|
1069
1069
|
/* @__PURE__ */ E(
|
|
1070
|
-
|
|
1070
|
+
Yn,
|
|
1071
1071
|
{
|
|
1072
1072
|
...c,
|
|
1073
1073
|
icon: "sync",
|
|
@@ -1079,20 +1079,20 @@ const Kn = (e, t, s) => {
|
|
|
1079
1079
|
onMouseLeave: () => {
|
|
1080
1080
|
n(), h.current = setTimeout(() => C(!1), 100);
|
|
1081
1081
|
},
|
|
1082
|
-
className:
|
|
1082
|
+
className: Y(c.className, {
|
|
1083
1083
|
syncing: g,
|
|
1084
1084
|
"has-updates": r,
|
|
1085
|
-
"auto-sync": o && !
|
|
1085
|
+
"auto-sync": o && !Ze
|
|
1086
1086
|
}),
|
|
1087
1087
|
"data-shortcut": "Shift+R",
|
|
1088
1088
|
"data-tooltip": r ? d : "Refresh data",
|
|
1089
1089
|
variant: r ? "filled" : "surface"
|
|
1090
1090
|
}
|
|
1091
1091
|
),
|
|
1092
|
-
!
|
|
1092
|
+
!Ze
|
|
1093
1093
|
] });
|
|
1094
1094
|
}
|
|
1095
|
-
),
|
|
1095
|
+
), st = B.div`
|
|
1096
1096
|
display: flex;
|
|
1097
1097
|
align-items: center;
|
|
1098
1098
|
gap: var(--base-gap-small);
|
|
@@ -1100,7 +1100,7 @@ const Kn = (e, t, s) => {
|
|
|
1100
1100
|
flex: 1;
|
|
1101
1101
|
min-width: 0;
|
|
1102
1102
|
color: var(--md-sys-color-outline);
|
|
1103
|
-
`,
|
|
1103
|
+
`, Zn = B.span`
|
|
1104
1104
|
display: flex;
|
|
1105
1105
|
align-items: center;
|
|
1106
1106
|
gap: 2px;
|
|
@@ -1113,18 +1113,18 @@ const Kn = (e, t, s) => {
|
|
|
1113
1113
|
border-radius: 50%;
|
|
1114
1114
|
object-fit: cover;
|
|
1115
1115
|
}
|
|
1116
|
-
`,
|
|
1117
|
-
const s =
|
|
1118
|
-
|
|
1116
|
+
`, es = ({ rowSelection: e, sliceMap: t }) => {
|
|
1117
|
+
const s = we(null), [a, u] = U(0);
|
|
1118
|
+
_e(() => {
|
|
1119
1119
|
const i = s.current;
|
|
1120
1120
|
if (!i) return;
|
|
1121
1121
|
const I = new ResizeObserver(([r]) => u(r.contentRect.width));
|
|
1122
1122
|
return I.observe(i), () => I.disconnect();
|
|
1123
1123
|
}, []);
|
|
1124
|
-
const c = Object.keys(e).filter((i) => e[i]).map((i) => t.get(i)).filter((i) => !!i), p = (i) => !!i.icon || !!i.img || !!i.startContent, [g, l] =
|
|
1125
|
-
if (
|
|
1124
|
+
const c = Object.keys(e).filter((i) => e[i]).map((i) => t.get(i)).filter((i) => !!i), p = (i) => !!i.icon || !!i.img || !!i.startContent, [g, l] = U(!0), m = c.length > 1 || !g, [y, C] = U(c.length), f = c.map((i) => i.id).join("|");
|
|
1125
|
+
if (_e(() => {
|
|
1126
1126
|
l(!0), C(c.length);
|
|
1127
|
-
}, [a, f]),
|
|
1127
|
+
}, [a, f]), _e(() => {
|
|
1128
1128
|
const i = s.current;
|
|
1129
1129
|
if (!i || !c.length) return;
|
|
1130
1130
|
const I = Array.from(i.querySelectorAll("[data-chip]")), r = i.querySelector("[data-overflow]")?.offsetWidth ?? 22, d = (x, D) => x.offsetLeft - i.offsetLeft + x.offsetWidth <= D;
|
|
@@ -1136,17 +1136,17 @@ const Kn = (e, t, s) => {
|
|
|
1136
1136
|
if (o && d(o, i.clientWidth)) return;
|
|
1137
1137
|
const n = i.clientWidth - r, v = I.filter((x) => d(x, n)).length, T = Math.max(1, v);
|
|
1138
1138
|
T !== y && C(T);
|
|
1139
|
-
}), !c.length) return /* @__PURE__ */ E(
|
|
1139
|
+
}), !c.length) return /* @__PURE__ */ E(st, { ref: s });
|
|
1140
1140
|
const h = c.slice(0, y), b = c.length - h.length;
|
|
1141
|
-
return /* @__PURE__ */ G(
|
|
1141
|
+
return /* @__PURE__ */ G(st, { ref: s, children: [
|
|
1142
1142
|
h.map((i) => /* @__PURE__ */ G(
|
|
1143
|
-
|
|
1143
|
+
Zn,
|
|
1144
1144
|
{
|
|
1145
1145
|
"data-chip": !0,
|
|
1146
1146
|
title: i.label || i.name,
|
|
1147
1147
|
"aria-label": i.label || i.name,
|
|
1148
1148
|
children: [
|
|
1149
|
-
i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(
|
|
1149
|
+
i.startContent ?? (i.img ? /* @__PURE__ */ E("img", { src: i.img, alt: "" }) : i.icon && /* @__PURE__ */ E(Ot, { icon: i.icon, style: { color: i.iconColor } })),
|
|
1150
1150
|
!(m && p(i)) && /* @__PURE__ */ E("span", { children: i.label || i.name })
|
|
1151
1151
|
]
|
|
1152
1152
|
},
|
|
@@ -1157,12 +1157,12 @@ const Kn = (e, t, s) => {
|
|
|
1157
1157
|
b
|
|
1158
1158
|
] })
|
|
1159
1159
|
] });
|
|
1160
|
-
},
|
|
1160
|
+
}, ts = B.div`
|
|
1161
1161
|
height: 28px;
|
|
1162
1162
|
border-radius: 4px;
|
|
1163
1163
|
background: var(--md-sys-color-surface-container);
|
|
1164
1164
|
width: 100px;
|
|
1165
|
-
`,
|
|
1165
|
+
`, ns = B.div`
|
|
1166
1166
|
display: flex;
|
|
1167
1167
|
align-items: center;
|
|
1168
1168
|
gap: var(--base-gap-small);
|
|
@@ -1174,7 +1174,7 @@ const Kn = (e, t, s) => {
|
|
|
1174
1174
|
flex: 1;
|
|
1175
1175
|
min-width: 0;
|
|
1176
1176
|
}
|
|
1177
|
-
`,
|
|
1177
|
+
`, ss = B(Xt)`
|
|
1178
1178
|
.slicer-dropdown {
|
|
1179
1179
|
flex: 0 1 auto;
|
|
1180
1180
|
min-width: 48px;
|
|
@@ -1195,7 +1195,7 @@ const Kn = (e, t, s) => {
|
|
|
1195
1195
|
.power-feature .icon {
|
|
1196
1196
|
color: var(--md-sys-color-tertiary);
|
|
1197
1197
|
}
|
|
1198
|
-
`,
|
|
1198
|
+
`, os = B.div`
|
|
1199
1199
|
display: flex;
|
|
1200
1200
|
align-items: center;
|
|
1201
1201
|
gap: var(--base-gap-small);
|
|
@@ -1208,7 +1208,7 @@ const Kn = (e, t, s) => {
|
|
|
1208
1208
|
text-overflow: ellipsis;
|
|
1209
1209
|
white-space: nowrap;
|
|
1210
1210
|
}
|
|
1211
|
-
`,
|
|
1211
|
+
`, ot = "__splitSlicer__", at = ({
|
|
1212
1212
|
panel: e,
|
|
1213
1213
|
visibleSlices: t,
|
|
1214
1214
|
sliceFields: s,
|
|
@@ -1236,115 +1236,123 @@ const Kn = (e, t, s) => {
|
|
|
1236
1236
|
setPanelExpanded: T,
|
|
1237
1237
|
onSliceTypeChange: x,
|
|
1238
1238
|
isViewSyncPending: D,
|
|
1239
|
-
onOpenViewer:
|
|
1240
|
-
onAddToList:
|
|
1241
|
-
page:
|
|
1242
|
-
getSliceSort:
|
|
1243
|
-
setSliceSort:
|
|
1244
|
-
projectName:
|
|
1245
|
-
} =
|
|
1239
|
+
onOpenViewer: Q,
|
|
1240
|
+
onAddToList: pe,
|
|
1241
|
+
page: me,
|
|
1242
|
+
getSliceSort: se,
|
|
1243
|
+
setSliceSort: fe,
|
|
1244
|
+
projectName: ee
|
|
1245
|
+
} = ze(), { refetch: oe } = Ue(), { powerLicense: J, setPowerpackDialog: W } = Be(), X = o(e.id), ae = v(e.id), L = (S) => {
|
|
1246
1246
|
n(e.id, S);
|
|
1247
1247
|
}, A = O(
|
|
1248
1248
|
(S) => T(e.id, S),
|
|
1249
1249
|
[T, e.id]
|
|
1250
|
-
),
|
|
1250
|
+
), k = P(
|
|
1251
1251
|
() => typeof c == "function" ? c(e.sliceType) : c,
|
|
1252
1252
|
[c, e.sliceType]
|
|
1253
|
-
),
|
|
1253
|
+
), te = P(() => {
|
|
1254
1254
|
const S = t.map(($) => $.sliceType);
|
|
1255
1255
|
if (typeof c != "function") return S;
|
|
1256
|
-
const M = ($) => JSON.stringify([$?.entity, $?.args]), ce = M(
|
|
1256
|
+
const M = ($) => JSON.stringify([$?.entity, $?.args]), ce = M(k);
|
|
1257
1257
|
return S.filter(($) => $ === e.sliceType || M(c($)) === ce);
|
|
1258
|
-
}, [c,
|
|
1259
|
-
|
|
1258
|
+
}, [c, k, t, e.sliceType]), { counts: Se, filled: Ee, complete: ne } = Hn(
|
|
1259
|
+
k,
|
|
1260
1260
|
e.sliceType,
|
|
1261
|
-
|
|
1262
|
-
),
|
|
1261
|
+
te
|
|
1262
|
+
), Z = O(
|
|
1263
1263
|
(S, M) => {
|
|
1264
1264
|
y ? x(S, M) : d(e.id, S);
|
|
1265
1265
|
},
|
|
1266
1266
|
[y, x, d, e.id]
|
|
1267
|
-
), ie =
|
|
1267
|
+
), ie = P(
|
|
1268
1268
|
() => t.filter((S) => S.id !== e.id).map((S) => S.sliceType),
|
|
1269
1269
|
[t, e.id]
|
|
1270
1270
|
), {
|
|
1271
|
-
sliceOptions:
|
|
1272
|
-
sliceType:
|
|
1271
|
+
sliceOptions: V,
|
|
1272
|
+
sliceType: _,
|
|
1273
1273
|
handleSliceTypeChange: K,
|
|
1274
|
-
table: { data: re, isExpandable:
|
|
1275
|
-
sliceMap:
|
|
1276
|
-
isLoading:
|
|
1277
|
-
} =
|
|
1274
|
+
table: { data: re, isExpandable: De },
|
|
1275
|
+
sliceMap: q,
|
|
1276
|
+
isLoading: Te
|
|
1277
|
+
} = Bn({
|
|
1278
1278
|
sliceFields: s,
|
|
1279
1279
|
usedSliceTypes: ie,
|
|
1280
1280
|
entityTypes: a,
|
|
1281
|
-
counts:
|
|
1282
|
-
filled:
|
|
1283
|
-
countsComplete:
|
|
1281
|
+
counts: Se,
|
|
1282
|
+
filled: Ee,
|
|
1283
|
+
countsComplete: ne,
|
|
1284
1284
|
sliceType: e.sliceType,
|
|
1285
|
-
onSliceTypeChange:
|
|
1286
|
-
sort:
|
|
1287
|
-
}), N =
|
|
1288
|
-
p ||
|
|
1289
|
-
|
|
1290
|
-
|
|
1285
|
+
onSliceTypeChange: Z,
|
|
1286
|
+
sort: se(e.sliceType)
|
|
1287
|
+
}), N = _ === "hierarchy", j = !!m && I.includes(e.id), w = V.find((S) => S.value === _)?.label || _, R = C !== void 0, F = C ?? "", le = N ? "Folders" : w, H = qn(
|
|
1288
|
+
p || pe,
|
|
1289
|
+
q,
|
|
1290
|
+
Q,
|
|
1291
1291
|
g
|
|
1292
|
-
), { contributions:
|
|
1293
|
-
() =>
|
|
1294
|
-
(S) => !S.sliceTypes?.length || S.sliceTypes.includes(
|
|
1292
|
+
), { contributions: Ge } = Yt("slicer.menuItem"), ke = P(
|
|
1293
|
+
() => Ge.filter(
|
|
1294
|
+
(S) => !S.sliceTypes?.length || S.sliceTypes.includes(_)
|
|
1295
1295
|
),
|
|
1296
|
-
[
|
|
1297
|
-
),
|
|
1296
|
+
[Ge, _]
|
|
1297
|
+
), Re = (S, M, ce = "bottom") => {
|
|
1298
1298
|
if (!M.length) return [];
|
|
1299
|
-
const $ = M.map((
|
|
1300
|
-
const
|
|
1299
|
+
const $ = _ === "hierarchy", Ie = M.map((z) => {
|
|
1300
|
+
const de = q.get(z), xe = de?.data?.entityType;
|
|
1301
1301
|
return {
|
|
1302
|
-
id:
|
|
1303
|
-
|
|
1304
|
-
|
|
1302
|
+
id: z,
|
|
1303
|
+
name: de?.name,
|
|
1304
|
+
label: de?.label || de?.name || void 0,
|
|
1305
|
+
// hierarchy rows are folders and tasks, like useHierarchyContextMenuItems reads them
|
|
1306
|
+
entityType: $ ? xe === "task" ? "task" : "folder" : xe
|
|
1305
1307
|
};
|
|
1306
|
-
}),
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1308
|
+
}), It = $ ? Ie.map(({ id: z, name: de, entityType: xe }) => ({
|
|
1309
|
+
id: z,
|
|
1310
|
+
entityType: xe,
|
|
1311
|
+
projectName: ee,
|
|
1312
|
+
name: de,
|
|
1313
|
+
label: q.get(z)?.label || void 0
|
|
1314
|
+
})) : [], xt = { projectName: ee, sliceType: _, selected: Ie, entities: It, menu: S };
|
|
1315
|
+
return Mt(ke, ce).filter((z) => !z.in?.length || z.in.includes(S)).map((z) => ({
|
|
1316
|
+
id: z.key,
|
|
1317
|
+
label: z.label,
|
|
1318
|
+
icon: z.icon,
|
|
1319
|
+
[S === "context" ? "command" : "onClick"]: () => Jt(z, xt)
|
|
1312
1320
|
}));
|
|
1313
|
-
},
|
|
1321
|
+
}, We = (S) => (M, { rowId: ce, selectedRows: $ }) => (S === "top" && ke.forEach((Ie) => Qt(Ie.run)), Re(
|
|
1314
1322
|
"context",
|
|
1315
1323
|
$.includes(ce) ? $ : [ce],
|
|
1316
1324
|
S
|
|
1317
|
-
)),
|
|
1318
|
-
|
|
1319
|
-
...N ?
|
|
1320
|
-
|
|
1321
|
-
...N ? [
|
|
1322
|
-
] : N ? [...
|
|
1323
|
-
() =>
|
|
1324
|
-
[
|
|
1325
|
-
),
|
|
1326
|
-
const S =
|
|
1325
|
+
)), yt = ke.length ? [
|
|
1326
|
+
We("top"),
|
|
1327
|
+
...N ? H.rowContextMenuBuilders : [],
|
|
1328
|
+
We("bottom"),
|
|
1329
|
+
...N ? [H.deleteContextMenuBuilder] : []
|
|
1330
|
+
] : N ? [...H.rowContextMenuBuilders, H.deleteContextMenuBuilder] : [], Ke = P(
|
|
1331
|
+
() => V.map((S) => S.value).filter((S) => !t.some((M) => M.sliceType === S)),
|
|
1332
|
+
[V, t]
|
|
1333
|
+
), ve = !!l && Ke.length > 0, Ae = P(() => {
|
|
1334
|
+
const S = V.map(
|
|
1327
1335
|
(M) => ie.includes(M.value) ? { ...M, disabled: !0, disabledMessage: "Already used by another panel" } : M
|
|
1328
1336
|
);
|
|
1329
|
-
return
|
|
1330
|
-
}, [
|
|
1331
|
-
if (!
|
|
1332
|
-
b(
|
|
1333
|
-
}, { menuOpen:
|
|
1334
|
-
...
|
|
1337
|
+
return ve && S.push({ label: "Split slicer", value: ot, icon: "splitscreen_add" }), S;
|
|
1338
|
+
}, [V, ie, ve]), Me = () => {
|
|
1339
|
+
if (!J) return W("slicer");
|
|
1340
|
+
b(Ke[0]);
|
|
1341
|
+
}, { menuOpen: bt, toggleMenuOpen: qe } = dt(), he = `slicer-menu-${me}-${e.id}`.replace(/[^\w-]/g, "-"), St = bt === he, Ye = Object.keys(X).filter((S) => X[S]), Tt = [
|
|
1342
|
+
...Re("dropdown", Ye, "top"),
|
|
1335
1343
|
{
|
|
1336
1344
|
id: "search",
|
|
1337
1345
|
label: `Search ${le}`,
|
|
1338
1346
|
icon: "search",
|
|
1339
1347
|
onClick: () => f("")
|
|
1340
1348
|
},
|
|
1341
|
-
...
|
|
1349
|
+
...ve && y ? [
|
|
1342
1350
|
{
|
|
1343
1351
|
id: "split",
|
|
1344
1352
|
label: "Split slicer",
|
|
1345
1353
|
icon: "splitscreen_add",
|
|
1346
1354
|
powerFeature: "slicer",
|
|
1347
|
-
onClick:
|
|
1355
|
+
onClick: Me
|
|
1348
1356
|
}
|
|
1349
1357
|
] : [],
|
|
1350
1358
|
...y ? [] : [
|
|
@@ -1355,33 +1363,33 @@ const Kn = (e, t, s) => {
|
|
|
1355
1363
|
onClick: () => i(e.id)
|
|
1356
1364
|
}
|
|
1357
1365
|
],
|
|
1358
|
-
|
|
1366
|
+
xn({
|
|
1359
1367
|
id: "sort",
|
|
1360
|
-
options:
|
|
1361
|
-
sort:
|
|
1362
|
-
onChange: (S) =>
|
|
1368
|
+
options: Ve(_),
|
|
1369
|
+
sort: se(_),
|
|
1370
|
+
onChange: (S) => fe(_, S)
|
|
1363
1371
|
}),
|
|
1364
|
-
...
|
|
1365
|
-
],
|
|
1372
|
+
...Re("dropdown", Ye)
|
|
1373
|
+
], vt = (S) => {
|
|
1366
1374
|
const M = String(S[0]);
|
|
1367
|
-
if (M ===
|
|
1368
|
-
|
|
1375
|
+
if (M === ot) {
|
|
1376
|
+
Me();
|
|
1369
1377
|
return;
|
|
1370
1378
|
}
|
|
1371
|
-
K(M, !!y && u ===
|
|
1379
|
+
K(M, !!y && u === _);
|
|
1372
1380
|
};
|
|
1373
|
-
return /* @__PURE__ */ G(
|
|
1381
|
+
return /* @__PURE__ */ G(Zt, { children: [
|
|
1374
1382
|
/* @__PURE__ */ G(
|
|
1375
|
-
|
|
1383
|
+
ss,
|
|
1376
1384
|
{
|
|
1377
|
-
className:
|
|
1385
|
+
className: Y({ collapsed: j }),
|
|
1378
1386
|
onClick: j ? () => r(e.id) : void 0,
|
|
1379
1387
|
children: [
|
|
1380
1388
|
m && /* @__PURE__ */ E(
|
|
1381
|
-
|
|
1389
|
+
ge,
|
|
1382
1390
|
{
|
|
1383
1391
|
icon: "expand_more",
|
|
1384
|
-
className:
|
|
1392
|
+
className: Y("collapse-toggle", { collapsed: j }),
|
|
1385
1393
|
"data-tooltip": j ? "Expand panel" : "Collapse panel",
|
|
1386
1394
|
"data-tooltip-delay": 0,
|
|
1387
1395
|
onClick: () => r(e.id)
|
|
@@ -1390,50 +1398,50 @@ const Kn = (e, t, s) => {
|
|
|
1390
1398
|
j ? (
|
|
1391
1399
|
// the dropdown cannot be used from a collapsed panel, but the dimension it
|
|
1392
1400
|
// shows has to read the same as the dropdown does when open
|
|
1393
|
-
/* @__PURE__ */ E(
|
|
1394
|
-
) : D ? /* @__PURE__ */ E(
|
|
1401
|
+
/* @__PURE__ */ E(os, { children: /* @__PURE__ */ E("span", { children: w }) })
|
|
1402
|
+
) : D ? /* @__PURE__ */ E(ts, {}) : !R && /* @__PURE__ */ E(
|
|
1395
1403
|
h,
|
|
1396
1404
|
{
|
|
1397
|
-
options:
|
|
1398
|
-
value: [
|
|
1405
|
+
options: Ae,
|
|
1406
|
+
value: [_],
|
|
1399
1407
|
sliceTypes: s.map((S) => S.value),
|
|
1400
|
-
onChange: (S) =>
|
|
1401
|
-
className:
|
|
1402
|
-
disableOpen:
|
|
1408
|
+
onChange: (S) => vt(S),
|
|
1409
|
+
className: Y("slicer-dropdown", { "single-option": Ae.length === 1 }),
|
|
1410
|
+
disableOpen: Ae.length === 1
|
|
1403
1411
|
}
|
|
1404
1412
|
),
|
|
1405
|
-
j && /* @__PURE__ */ E(
|
|
1413
|
+
j && /* @__PURE__ */ E(es, { rowSelection: X, sliceMap: q }),
|
|
1406
1414
|
/* @__PURE__ */ G(
|
|
1407
|
-
|
|
1415
|
+
ns,
|
|
1408
1416
|
{
|
|
1409
|
-
className:
|
|
1417
|
+
className: Y({ searching: R }),
|
|
1410
1418
|
onClick: (S) => S.stopPropagation(),
|
|
1411
1419
|
children: [
|
|
1412
|
-
!j && !
|
|
1420
|
+
!j && !R && /* @__PURE__ */ G($e, { children: [
|
|
1413
1421
|
/* @__PURE__ */ E(
|
|
1414
|
-
|
|
1422
|
+
ge,
|
|
1415
1423
|
{
|
|
1416
1424
|
icon: "more_horiz",
|
|
1417
|
-
id:
|
|
1418
|
-
className:
|
|
1425
|
+
id: he,
|
|
1426
|
+
className: Y("slicer-menu", { active: St }),
|
|
1419
1427
|
"data-tooltip": "More",
|
|
1420
1428
|
"data-tooltip-delay": 0,
|
|
1421
|
-
onClick: () =>
|
|
1429
|
+
onClick: () => qe(he)
|
|
1422
1430
|
}
|
|
1423
1431
|
),
|
|
1424
|
-
/* @__PURE__ */ E(
|
|
1432
|
+
/* @__PURE__ */ E(hn, { targetId: he, id: he, align: "left", children: /* @__PURE__ */ E(gn, { menu: Tt, onClose: () => qe(!1) }) })
|
|
1425
1433
|
] }),
|
|
1426
1434
|
!j && /* @__PURE__ */ E(
|
|
1427
|
-
|
|
1435
|
+
Kn,
|
|
1428
1436
|
{
|
|
1429
|
-
open:
|
|
1437
|
+
open: R,
|
|
1430
1438
|
value: F,
|
|
1431
1439
|
subject: le,
|
|
1432
1440
|
onChange: f
|
|
1433
1441
|
}
|
|
1434
1442
|
),
|
|
1435
1443
|
N && /* @__PURE__ */ E(
|
|
1436
|
-
|
|
1444
|
+
Xn,
|
|
1437
1445
|
{
|
|
1438
1446
|
topics: ["entity.folder.created"],
|
|
1439
1447
|
onSync: async () => {
|
|
@@ -1442,18 +1450,18 @@ const Kn = (e, t, s) => {
|
|
|
1442
1450
|
hideWhenNoUpdates: !0
|
|
1443
1451
|
}
|
|
1444
1452
|
),
|
|
1445
|
-
|
|
1446
|
-
|
|
1453
|
+
ve && y && !R && /* @__PURE__ */ E(
|
|
1454
|
+
ge,
|
|
1447
1455
|
{
|
|
1448
1456
|
icon: "splitscreen_add",
|
|
1449
|
-
className:
|
|
1450
|
-
"data-tooltip":
|
|
1457
|
+
className: Y({ "power-feature": !J }),
|
|
1458
|
+
"data-tooltip": J ? "Split slicer" : "Power feature - Slicer",
|
|
1451
1459
|
"data-tooltip-delay": 0,
|
|
1452
|
-
onClick:
|
|
1460
|
+
onClick: Me
|
|
1453
1461
|
}
|
|
1454
1462
|
),
|
|
1455
|
-
!y && !
|
|
1456
|
-
|
|
1463
|
+
!y && !R && /* @__PURE__ */ E(
|
|
1464
|
+
ge,
|
|
1457
1465
|
{
|
|
1458
1466
|
icon: "close",
|
|
1459
1467
|
"data-tooltip": "Remove panel",
|
|
@@ -1468,36 +1476,36 @@ const Kn = (e, t, s) => {
|
|
|
1468
1476
|
}
|
|
1469
1477
|
),
|
|
1470
1478
|
!j && /* @__PURE__ */ E(
|
|
1471
|
-
|
|
1479
|
+
en,
|
|
1472
1480
|
{
|
|
1473
|
-
rowSelection:
|
|
1481
|
+
rowSelection: X,
|
|
1474
1482
|
onRowSelectionChange: L,
|
|
1475
1483
|
expanded: ae,
|
|
1476
1484
|
setExpanded: A,
|
|
1477
|
-
data:
|
|
1485
|
+
data: q,
|
|
1478
1486
|
children: /* @__PURE__ */ E(
|
|
1479
|
-
|
|
1487
|
+
tn,
|
|
1480
1488
|
{
|
|
1481
1489
|
data: re,
|
|
1482
|
-
isExpandable:
|
|
1483
|
-
isLoading:
|
|
1484
|
-
forceUpdateTable:
|
|
1490
|
+
isExpandable: De,
|
|
1491
|
+
isLoading: Te || D,
|
|
1492
|
+
forceUpdateTable: _,
|
|
1485
1493
|
globalFilter: F,
|
|
1486
1494
|
rowIdPrefix: `slicer-${e.id}`,
|
|
1487
|
-
onRename: N ? (S, M) =>
|
|
1488
|
-
renamingId: N ?
|
|
1489
|
-
renameInitialValue: N ?
|
|
1490
|
-
onSubmitRename: N ? (S, M) =>
|
|
1491
|
-
onCancelRename: N ?
|
|
1492
|
-
onRowOptionClick: N ?
|
|
1493
|
-
rowContextMenuBuilders:
|
|
1494
|
-
addonShortcuts: { table: "slicer", projectName:
|
|
1495
|
+
onRename: N ? (S, M) => H.onRename(M.original) : void 0,
|
|
1496
|
+
renamingId: N ? H.renamingRow?.id : null,
|
|
1497
|
+
renameInitialValue: N ? H.renameInitialValue : void 0,
|
|
1498
|
+
onSubmitRename: N ? (S, M) => H.onSubmitRename(M) : void 0,
|
|
1499
|
+
onCancelRename: N ? H.onCancelRename : void 0,
|
|
1500
|
+
onRowOptionClick: N ? H.onOptionClick : void 0,
|
|
1501
|
+
rowContextMenuBuilders: yt,
|
|
1502
|
+
addonShortcuts: { table: "slicer", projectName: ee }
|
|
1495
1503
|
}
|
|
1496
1504
|
)
|
|
1497
1505
|
}
|
|
1498
1506
|
)
|
|
1499
1507
|
] });
|
|
1500
|
-
},
|
|
1508
|
+
}, as = B.div`
|
|
1501
1509
|
height: 100%;
|
|
1502
1510
|
width: 100%;
|
|
1503
1511
|
overflow-y: auto;
|
|
@@ -1511,7 +1519,7 @@ const Kn = (e, t, s) => {
|
|
|
1511
1519
|
}
|
|
1512
1520
|
`
|
|
1513
1521
|
).join("")}
|
|
1514
|
-
`,
|
|
1522
|
+
`, so = ({
|
|
1515
1523
|
sliceFields: e = [],
|
|
1516
1524
|
entityTypes: t = ["task"],
|
|
1517
1525
|
pinnedSliceType: s,
|
|
@@ -1519,47 +1527,47 @@ const Kn = (e, t, s) => {
|
|
|
1519
1527
|
onAddToList: u,
|
|
1520
1528
|
enableSplit: c
|
|
1521
1529
|
}) => {
|
|
1522
|
-
const { slices: p, page: g, setPanelExpanded: l, projectName: m, collapsedPanels: y } =
|
|
1530
|
+
const { slices: p, page: g, setPanelExpanded: l, projectName: m, collapsedPanels: y } = ze(), { powerLicense: C } = Be(), f = !!c, h = f && C ? p : p.slice(0, 1), [b, i] = U(null), I = O((L) => {
|
|
1523
1531
|
i("entities" in L ? L : { entities: [L] });
|
|
1524
1532
|
}, []), r = O(() => {
|
|
1525
1533
|
i(null);
|
|
1526
|
-
}, []), { getParentFolderIds: d } =
|
|
1534
|
+
}, []), { getParentFolderIds: d } = Ue(), o = O(
|
|
1527
1535
|
(L) => {
|
|
1528
1536
|
const A = [L, ...d(L)];
|
|
1529
1537
|
l(
|
|
1530
1538
|
"hierarchy",
|
|
1531
|
-
(
|
|
1532
|
-
...
|
|
1533
|
-
...Object.fromEntries(A.map((
|
|
1539
|
+
(k) => typeof k == "boolean" ? k || Object.fromEntries(A.map((te) => [te, !0])) : {
|
|
1540
|
+
...k,
|
|
1541
|
+
...Object.fromEntries(A.map((te) => [te, !0]))
|
|
1534
1542
|
}
|
|
1535
1543
|
);
|
|
1536
1544
|
},
|
|
1537
1545
|
[d, l]
|
|
1538
|
-
), n =
|
|
1539
|
-
|
|
1546
|
+
), n = we(null), [v, T] = U(0);
|
|
1547
|
+
ue(() => {
|
|
1540
1548
|
const L = n.current;
|
|
1541
1549
|
if (!L) return;
|
|
1542
|
-
const A = new ResizeObserver(([
|
|
1550
|
+
const A = new ResizeObserver(([k]) => T(k.contentRect.height));
|
|
1543
1551
|
return A.observe(L), () => A.disconnect();
|
|
1544
1552
|
}, [h.length]);
|
|
1545
1553
|
const x = h.map((L) => L.id), D = h.length > 1, {
|
|
1546
|
-
sizes:
|
|
1547
|
-
minSize:
|
|
1548
|
-
height:
|
|
1549
|
-
layoutKey:
|
|
1550
|
-
handleResizeEnd:
|
|
1551
|
-
} =
|
|
1554
|
+
sizes: Q,
|
|
1555
|
+
minSize: pe,
|
|
1556
|
+
height: me,
|
|
1557
|
+
layoutKey: se,
|
|
1558
|
+
handleResizeEnd: fe
|
|
1559
|
+
} = Rn(g, x, D ? y : [], v), ee = x.slice(0, -1).map(
|
|
1552
1560
|
(L, A) => D && (y.includes(L) || y.includes(x[A + 1])) ? A : -1
|
|
1553
|
-
).filter((L) => L >= 0), [oe,
|
|
1554
|
-
(L, A) =>
|
|
1561
|
+
).filter((L) => L >= 0), [oe, J] = U({}), W = O(
|
|
1562
|
+
(L, A) => J((k) => ({ ...k, [L]: A })),
|
|
1555
1563
|
[]
|
|
1556
|
-
),
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
const A = Object.keys(L).filter((
|
|
1560
|
-
return A.length === Object.keys(L).length ? L : Object.fromEntries(A.map((
|
|
1564
|
+
), X = x.join("|");
|
|
1565
|
+
ue(() => {
|
|
1566
|
+
J((L) => {
|
|
1567
|
+
const A = Object.keys(L).filter((k) => x.includes(k));
|
|
1568
|
+
return A.length === Object.keys(L).length ? L : Object.fromEntries(A.map((k) => [k, L[k]]));
|
|
1561
1569
|
});
|
|
1562
|
-
}, [
|
|
1570
|
+
}, [X]);
|
|
1563
1571
|
const ae = {
|
|
1564
1572
|
visibleSlices: h,
|
|
1565
1573
|
canCollapse: D,
|
|
@@ -1571,9 +1579,9 @@ const Kn = (e, t, s) => {
|
|
|
1571
1579
|
openMoveDialog: I,
|
|
1572
1580
|
splitEnabled: f
|
|
1573
1581
|
};
|
|
1574
|
-
return /* @__PURE__ */ G(
|
|
1582
|
+
return /* @__PURE__ */ G($e, { children: [
|
|
1575
1583
|
h.length === 1 ? /* @__PURE__ */ E(
|
|
1576
|
-
|
|
1584
|
+
at,
|
|
1577
1585
|
{
|
|
1578
1586
|
panel: h[0],
|
|
1579
1587
|
isPrimary: !0,
|
|
@@ -1581,29 +1589,29 @@ const Kn = (e, t, s) => {
|
|
|
1581
1589
|
onSearchChange: (L) => W(h[0].id, L),
|
|
1582
1590
|
...ae
|
|
1583
1591
|
}
|
|
1584
|
-
) : /* @__PURE__ */ E(
|
|
1585
|
-
|
|
1592
|
+
) : /* @__PURE__ */ E(as, { ref: n, $deadGutters: ee, children: /* @__PURE__ */ E(
|
|
1593
|
+
Dt,
|
|
1586
1594
|
{
|
|
1587
1595
|
layout: "vertical",
|
|
1588
|
-
onResizeEnd:
|
|
1596
|
+
onResizeEnd: fe,
|
|
1589
1597
|
style: {
|
|
1590
1598
|
width: "100%",
|
|
1591
|
-
height:
|
|
1599
|
+
height: me,
|
|
1592
1600
|
overflow: "hidden"
|
|
1593
1601
|
},
|
|
1594
1602
|
children: h.map((L, A) => /* @__PURE__ */ E(
|
|
1595
|
-
|
|
1603
|
+
kt,
|
|
1596
1604
|
{
|
|
1597
|
-
size:
|
|
1598
|
-
minSize:
|
|
1605
|
+
size: Q[A],
|
|
1606
|
+
minSize: pe,
|
|
1599
1607
|
style: { overflow: "hidden" },
|
|
1600
1608
|
children: /* @__PURE__ */ E(
|
|
1601
|
-
|
|
1609
|
+
at,
|
|
1602
1610
|
{
|
|
1603
1611
|
panel: L,
|
|
1604
1612
|
isPrimary: A === 0,
|
|
1605
1613
|
search: oe[L.id],
|
|
1606
|
-
onSearchChange: (
|
|
1614
|
+
onSearchChange: (k) => W(L.id, k),
|
|
1607
1615
|
...ae
|
|
1608
1616
|
}
|
|
1609
1617
|
)
|
|
@@ -1611,10 +1619,10 @@ const Kn = (e, t, s) => {
|
|
|
1611
1619
|
L.id
|
|
1612
1620
|
))
|
|
1613
1621
|
},
|
|
1614
|
-
|
|
1622
|
+
se
|
|
1615
1623
|
) }),
|
|
1616
1624
|
/* @__PURE__ */ E(
|
|
1617
|
-
|
|
1625
|
+
Mn,
|
|
1618
1626
|
{
|
|
1619
1627
|
projectName: m,
|
|
1620
1628
|
movingEntities: b,
|
|
@@ -1625,25 +1633,25 @@ const Kn = (e, t, s) => {
|
|
|
1625
1633
|
] });
|
|
1626
1634
|
};
|
|
1627
1635
|
export {
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1636
|
+
Cn as S,
|
|
1637
|
+
ft as a,
|
|
1638
|
+
et as b,
|
|
1639
|
+
kn as c,
|
|
1640
|
+
ut as d,
|
|
1641
|
+
so as e,
|
|
1642
|
+
Fn as f,
|
|
1643
|
+
Dn as g,
|
|
1644
|
+
tt as h,
|
|
1645
|
+
pt as i,
|
|
1646
|
+
Ve as j,
|
|
1647
|
+
En as k,
|
|
1648
|
+
qn as l,
|
|
1649
|
+
Hn as m,
|
|
1650
|
+
Rn as n,
|
|
1651
|
+
no as o,
|
|
1652
|
+
Xn as p,
|
|
1653
|
+
xn as q,
|
|
1654
|
+
to as r,
|
|
1655
|
+
In as s,
|
|
1656
|
+
jn as u
|
|
1649
1657
|
};
|