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