@ynput/ayon-frontend-shared 0.8.1 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DetailsPanel.es.js +39 -39
- package/dist/ListTable.es.js +738 -651
- package/dist/NewEntity.es.js +4 -2
- package/dist/ProjectTreeTable.es.js +4208 -4185
- package/dist/ProjectsTable.es.js +5 -4
- package/dist/Slicer.es.js +327 -294
- package/dist/Views.es.js +725 -713
- package/dist/chunks/ColumnDropIndicator.es.js +33 -27
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +44 -38
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +112 -110
- package/dist/chunks/FilmstripEntityCard.es.js +2 -2
- package/dist/chunks/GroupSettingsFallback.es.js +3 -2
- package/dist/chunks/MetaWidget.es.js +828 -809
- package/dist/chunks/NewEntityContextInstance.es.js +6 -5
- package/dist/chunks/ReviewablesSelector.es.js +76 -76
- package/dist/chunks/SimpleTable.es.js +151 -149
- package/dist/chunks/Slicer.es.js +637 -617
- package/dist/chunks/TableExportContextInstance.es.js +415 -471
- package/dist/chunks/ThumbnailSimple.es.js +11 -11
- package/dist/chunks/Watchers.es.js +46 -46
- package/dist/chunks/getUris.es.js +1069 -1057
- package/dist/chunks/searchTerms.es.js +617 -581
- package/dist/chunks/useCreateContextMenu.es.js +15 -13
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +916 -884
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/index.es.js +11 -10
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +18 -17
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +18 -17
- package/dist/types/ListTable.d.ts +28 -18
- package/dist/types/NewEntity.d.ts +19 -16
- package/dist/types/ProjectTreeTable.d.ts +62 -19
- package/dist/types/ProjectsTable.d.ts +18 -17
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +18 -17
- package/dist/types/Slicer.d.ts +24 -17
- package/dist/types/Views.d.ts +23 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +64 -18
- package/dist/types/context.d.ts +28 -18
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +38 -16
- package/dist/util.es.js +116 -113
- package/package.json +2 -2
package/dist/Slicer.es.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { S as
|
|
3
|
-
import { jsx as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { b as X, r as
|
|
6
|
-
import { S as
|
|
7
|
-
import { e as
|
|
1
|
+
import { r as ge } from "./chunks/Slicer.es.js";
|
|
2
|
+
import { S as St, a as ft, b as ht, c as yt, d as pt, e as mt, f as Et, g as It, h as gt, i as Pt, j as Tt, k as wt, s as vt, u as xt, l as kt, m as Lt, n as Rt, o as bt } from "./chunks/Slicer.es.js";
|
|
3
|
+
import { jsx as Pe } from "react/jsx-runtime";
|
|
4
|
+
import { useState as F, useEffect as O, useRef as z, useCallback as P, useMemo as R } from "react";
|
|
5
|
+
import { b as X, r as q, w as Se, l as Te, n as we } from "./chunks/TableExportContextInstance.es.js";
|
|
6
|
+
import { S as ve, c as xe, d as ke } from "./chunks/MetaWidget.es.js";
|
|
7
|
+
import { e as _t, u as Ct } from "./chunks/MetaWidget.es.js";
|
|
8
8
|
import "@module-federation/enhanced/runtime";
|
|
9
9
|
import "@ynput/ayon-addon/host";
|
|
10
10
|
import "react-toastify";
|
|
11
11
|
import "@ynput/ayon-react-components";
|
|
12
|
-
import { aI as U, az as
|
|
12
|
+
import { aI as U, az as Le, bz as Re } from "./chunks/searchTerms.es.js";
|
|
13
13
|
import "./chunks/getUris.es.js";
|
|
14
14
|
import "primereact/confirmdialog";
|
|
15
15
|
import "lodash";
|
|
16
16
|
import "uuid";
|
|
17
17
|
import "axios";
|
|
18
|
-
import { u as
|
|
18
|
+
import { u as fe } from "./chunks/useLoadModule.es.js";
|
|
19
19
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
20
20
|
import "clsx";
|
|
21
21
|
import "react-dom";
|
|
22
22
|
import "react-router-dom";
|
|
23
23
|
import "semver";
|
|
24
|
-
import { useDispatch as
|
|
25
|
-
import { u as
|
|
26
|
-
const
|
|
24
|
+
import { useDispatch as be } from "react-redux";
|
|
25
|
+
import { u as Ot } from "./chunks/useHierarchySelection.es.js";
|
|
26
|
+
const Fe = () => {
|
|
27
27
|
const o = () => ({
|
|
28
28
|
formatStatuses: () => [],
|
|
29
29
|
formatTaskTypes: () => [],
|
|
@@ -32,373 +32,379 @@ const ve = () => {
|
|
|
32
32
|
formatAttribute: () => [],
|
|
33
33
|
formatProductTypes: () => [],
|
|
34
34
|
formatAuthors: () => []
|
|
35
|
-
}), { powerLicense: e, isLoading: s } = X(), [
|
|
35
|
+
}), { powerLicense: e, isLoading: s } = X(), [l, { isLoading: c }] = fe({
|
|
36
36
|
addon: "powerpack",
|
|
37
37
|
remote: "slicer",
|
|
38
38
|
module: "useExtraSlices",
|
|
39
39
|
fallback: o,
|
|
40
40
|
skip: !e
|
|
41
41
|
// skip loading if powerpack license is not available
|
|
42
|
-
}), [d] =
|
|
42
|
+
}), [d] = fe({
|
|
43
43
|
addon: "powerpack",
|
|
44
44
|
remote: "slicer",
|
|
45
45
|
module: "SlicerDropdown",
|
|
46
|
-
fallback:
|
|
46
|
+
fallback: ve,
|
|
47
47
|
skip: !e
|
|
48
48
|
// skip loading if powerpack license is not available
|
|
49
49
|
});
|
|
50
50
|
return {
|
|
51
|
-
useExtraSlices:
|
|
52
|
-
isLoadingExtraSlices: s ||
|
|
51
|
+
useExtraSlices: l,
|
|
52
|
+
isLoadingExtraSlices: s || c,
|
|
53
53
|
SlicerDropdown: d
|
|
54
54
|
};
|
|
55
|
-
},
|
|
55
|
+
}, _e = ["slicer-selection-", "slicer-expanded-"], he = (o, e, s) => s === "hierarchy" ? `slicer-selection-hierarchy-${o}` : `slicer-selection-${o}-${e}-${s}`, ye = (o, e, s) => s === "hierarchy" ? `slicer-expanded-hierarchy-${o}` : `slicer-expanded-${o}-${e}-${s}`, Ce = ({
|
|
56
56
|
sliceTypes: o,
|
|
57
57
|
page: e,
|
|
58
58
|
projectName: s,
|
|
59
|
-
...
|
|
59
|
+
...l
|
|
60
60
|
}) => {
|
|
61
|
-
const [
|
|
62
|
-
|
|
63
|
-
const t = (
|
|
64
|
-
const
|
|
65
|
-
|
|
61
|
+
const [c, d] = F(0);
|
|
62
|
+
O(() => {
|
|
63
|
+
const t = (a) => {
|
|
64
|
+
const S = a.detail?.key ?? ("key" in a ? a.key : void 0);
|
|
65
|
+
S && !_e.some((u) => S.startsWith(u)) || d((u) => u + 1);
|
|
66
66
|
};
|
|
67
67
|
return window.addEventListener("session-storage", t), window.addEventListener("storage", t), () => {
|
|
68
68
|
window.removeEventListener("session-storage", t), window.removeEventListener("storage", t);
|
|
69
69
|
};
|
|
70
70
|
}, []);
|
|
71
|
-
const
|
|
72
|
-
const
|
|
73
|
-
if (
|
|
74
|
-
const
|
|
75
|
-
return
|
|
76
|
-
}, []), r = o[0],
|
|
77
|
-
(t) =>
|
|
71
|
+
const p = z(/* @__PURE__ */ new Map()), f = P((t, a) => {
|
|
72
|
+
const S = typeof window > "u" ? null : sessionStorage.getItem(t), u = p.current.get(t);
|
|
73
|
+
if (u && u.raw === S) return u.value;
|
|
74
|
+
const b = q(t, a);
|
|
75
|
+
return p.current.set(t, { raw: S, value: b }), b;
|
|
76
|
+
}, []), r = o[0], h = P(
|
|
77
|
+
(t) => l.rowSelection !== void 0 && t === r ? l.rowSelection : f(he(s, e, t), {}),
|
|
78
78
|
// storageVersion invalidates memoized reads when any bucket changes
|
|
79
|
-
[
|
|
80
|
-
),
|
|
81
|
-
(t,
|
|
82
|
-
if (
|
|
83
|
-
|
|
79
|
+
[l.rowSelection, r, s, e, f, c]
|
|
80
|
+
), y = P(
|
|
81
|
+
(t, a) => {
|
|
82
|
+
if (l.setRowSelection && t === r) {
|
|
83
|
+
l.setRowSelection(a);
|
|
84
84
|
return;
|
|
85
85
|
}
|
|
86
|
-
const
|
|
87
|
-
|
|
86
|
+
const S = he(s, e, t), u = typeof a == "function" ? a(f(S, {})) : a;
|
|
87
|
+
Se(S, u);
|
|
88
88
|
},
|
|
89
|
-
[
|
|
90
|
-
),
|
|
91
|
-
(t) =>
|
|
92
|
-
[
|
|
93
|
-
), i =
|
|
94
|
-
(t,
|
|
95
|
-
if (
|
|
96
|
-
|
|
89
|
+
[l.setRowSelection, r, s, e, f]
|
|
90
|
+
), I = P(
|
|
91
|
+
(t) => l.expanded !== void 0 && t === r ? l.expanded : f(ye(s, e, t), {}),
|
|
92
|
+
[l.expanded, r, s, e, f, c]
|
|
93
|
+
), i = P(
|
|
94
|
+
(t, a) => {
|
|
95
|
+
if (l.setExpanded && t === r) {
|
|
96
|
+
l.setExpanded(a);
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
99
|
+
const S = ye(s, e, t), u = typeof a == "function" ? a(f(S, {})) : a;
|
|
100
|
+
Se(S, u);
|
|
101
101
|
},
|
|
102
|
-
[
|
|
103
|
-
),
|
|
104
|
-
(t,
|
|
105
|
-
[
|
|
106
|
-
),
|
|
107
|
-
(t,
|
|
102
|
+
[l.setExpanded, r, s, e, f]
|
|
103
|
+
), T = h(r), E = P(
|
|
104
|
+
(t, a = r) => y(a, t),
|
|
105
|
+
[y, r]
|
|
106
|
+
), k = I(r), w = P(
|
|
107
|
+
(t, a = r) => i(a, t),
|
|
108
108
|
[i, r]
|
|
109
109
|
);
|
|
110
110
|
return {
|
|
111
|
-
rowSelection:
|
|
112
|
-
setRowSelection:
|
|
113
|
-
expanded:
|
|
114
|
-
setExpanded:
|
|
115
|
-
getPanelSelection:
|
|
116
|
-
setPanelSelection:
|
|
117
|
-
getPanelExpanded:
|
|
111
|
+
rowSelection: T,
|
|
112
|
+
setRowSelection: E,
|
|
113
|
+
expanded: k,
|
|
114
|
+
setExpanded: w,
|
|
115
|
+
getPanelSelection: h,
|
|
116
|
+
setPanelSelection: y,
|
|
117
|
+
getPanelExpanded: I,
|
|
118
118
|
setPanelExpanded: i
|
|
119
119
|
};
|
|
120
|
-
},
|
|
120
|
+
}, pe = ["overview", "products"], it = ({
|
|
121
121
|
children: o,
|
|
122
122
|
page: e,
|
|
123
123
|
projectName: s,
|
|
124
|
-
viewSettings:
|
|
125
|
-
isLoadingViews:
|
|
124
|
+
viewSettings: l,
|
|
125
|
+
isLoadingViews: c,
|
|
126
126
|
updateViewSettings: d,
|
|
127
|
-
onOpenViewer:
|
|
128
|
-
onAddToList:
|
|
127
|
+
onOpenViewer: p,
|
|
128
|
+
onAddToList: f,
|
|
129
129
|
...r
|
|
130
130
|
}) => {
|
|
131
|
-
const [
|
|
131
|
+
const [h, y] = Te(
|
|
132
132
|
`slicer-pinned-slice-${e}`,
|
|
133
133
|
null
|
|
134
|
-
), { powerLicense:
|
|
134
|
+
), { powerLicense: I } = X(), i = l, T = i?.sliceTypes, E = i?.sliceType, k = T?.length ? E && E !== T[0] ? [E, ...T.slice(1)] : T : [E ?? "hierarchy"], w = pe.includes(e) && !r.sliceType && !T?.length && k[0] !== "hierarchy" && h?.sliceType === "hierarchy" && Object.values(h.rowSelection || {}).some(Boolean), t = R(
|
|
135
135
|
() => [
|
|
136
136
|
...new Set(
|
|
137
|
-
r.sliceType ? [r.sliceType] :
|
|
137
|
+
r.sliceType ? [r.sliceType] : w ? [...k, "hierarchy"] : k
|
|
138
138
|
)
|
|
139
139
|
],
|
|
140
|
-
[r.sliceType,
|
|
141
|
-
),
|
|
140
|
+
[r.sliceType, k.join("|"), w]
|
|
141
|
+
), a = i?.collapsedSliceTypes, S = R(() => a ?? [], [a?.join("|")]), u = R(
|
|
142
142
|
() => t.map((n) => ({ id: n, sliceType: n })),
|
|
143
143
|
[t]
|
|
144
|
-
),
|
|
145
|
-
rowSelection:
|
|
146
|
-
setRowSelection:
|
|
147
|
-
expanded:
|
|
148
|
-
setExpanded:
|
|
149
|
-
getPanelSelection:
|
|
150
|
-
setPanelSelection:
|
|
144
|
+
), b = u[0].sliceType, {
|
|
145
|
+
rowSelection: H,
|
|
146
|
+
setRowSelection: v,
|
|
147
|
+
expanded: C,
|
|
148
|
+
setExpanded: M,
|
|
149
|
+
getPanelSelection: $,
|
|
150
|
+
setPanelSelection: D,
|
|
151
151
|
getPanelExpanded: J,
|
|
152
|
-
setPanelExpanded:
|
|
153
|
-
} =
|
|
152
|
+
setPanelExpanded: A
|
|
153
|
+
} = Ce({
|
|
154
154
|
sliceTypes: t,
|
|
155
155
|
page: e,
|
|
156
156
|
projectName: s,
|
|
157
157
|
...r
|
|
158
|
-
}), Q =
|
|
158
|
+
}), Q = P(
|
|
159
159
|
(n) => {
|
|
160
|
-
|
|
160
|
+
v(n);
|
|
161
161
|
},
|
|
162
|
-
[
|
|
163
|
-
),
|
|
164
|
-
(n,
|
|
165
|
-
const
|
|
162
|
+
[v]
|
|
163
|
+
), x = P(
|
|
164
|
+
(n, g) => {
|
|
165
|
+
const m = () => {
|
|
166
166
|
};
|
|
167
167
|
d(
|
|
168
168
|
{
|
|
169
169
|
sliceTypes: n,
|
|
170
170
|
sliceType: n[0],
|
|
171
|
-
collapsedSliceTypes: (
|
|
171
|
+
collapsedSliceTypes: (g ?? S).filter((_) => n.includes(_))
|
|
172
172
|
},
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
m,
|
|
174
|
+
m,
|
|
175
175
|
{}
|
|
176
176
|
);
|
|
177
177
|
},
|
|
178
|
-
[d,
|
|
179
|
-
), K = i?.sliceSorts, Z =
|
|
180
|
-
(n) =>
|
|
178
|
+
[d, S]
|
|
179
|
+
), K = i?.sliceSorts, Z = P(
|
|
180
|
+
(n) => ge(n, K?.[n]),
|
|
181
181
|
[K]
|
|
182
|
-
), j =
|
|
183
|
-
(n,
|
|
184
|
-
const
|
|
182
|
+
), j = P(
|
|
183
|
+
(n, g) => {
|
|
184
|
+
const m = () => {
|
|
185
185
|
};
|
|
186
|
-
d({ sliceSorts: { ...K, [n]:
|
|
186
|
+
d({ sliceSorts: { ...K, [n]: g } }, m, m, {});
|
|
187
187
|
},
|
|
188
188
|
[d, K]
|
|
189
|
-
), V =
|
|
189
|
+
), V = P(
|
|
190
190
|
(n) => {
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const g = S.includes(n) ? S.filter((m) => m !== n) : [...S, n];
|
|
192
|
+
x(t, g);
|
|
193
193
|
},
|
|
194
|
-
[
|
|
195
|
-
),
|
|
196
|
-
|
|
197
|
-
!
|
|
198
|
-
}, [
|
|
199
|
-
const ee =
|
|
200
|
-
|
|
201
|
-
if (ee.current.has(
|
|
194
|
+
[S, x, t]
|
|
195
|
+
), B = `${s}-${e}`, N = z(/* @__PURE__ */ new Set());
|
|
196
|
+
O(() => {
|
|
197
|
+
!w || c || N.current.has(B) || (N.current.add(B), Object.keys($("hierarchy")).length || (D("hierarchy", h.rowSelection), A("hierarchy", h.expanded)), x(t));
|
|
198
|
+
}, [w, c, B]);
|
|
199
|
+
const ee = z(/* @__PURE__ */ new Set());
|
|
200
|
+
O(() => {
|
|
201
|
+
if (ee.current.has(B) || c || r.sliceType || r.rowSelection || r.setRowSelection || T?.length)
|
|
202
202
|
return;
|
|
203
|
-
ee.current.add(
|
|
204
|
-
const n = `slicer-selection-${s}-${e}`,
|
|
205
|
-
if (
|
|
206
|
-
const
|
|
207
|
-
if (
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
(
|
|
203
|
+
ee.current.add(B);
|
|
204
|
+
const n = `slicer-selection-${s}-${e}`, g = `slicer-expanded-${s}-${e}`, m = k[0];
|
|
205
|
+
if (m !== "hierarchy") {
|
|
206
|
+
const _ = q(n, null);
|
|
207
|
+
if (_ && Object.keys(_).length) {
|
|
208
|
+
D(
|
|
209
|
+
m,
|
|
210
|
+
(ue) => Object.keys(ue).length ? ue : _
|
|
211
211
|
);
|
|
212
|
-
const
|
|
213
|
-
|
|
212
|
+
const L = q(g, null);
|
|
213
|
+
L && A(m, L);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
sessionStorage.removeItem(n), sessionStorage.removeItem(
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
}, [e, r.sliceType,
|
|
220
|
-
const te =
|
|
221
|
-
(n,
|
|
222
|
-
if (
|
|
223
|
-
r.onSliceTypeChange ? r.onSliceTypeChange(n,
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
sliceType:
|
|
227
|
-
rowSelection:
|
|
228
|
-
expanded:
|
|
216
|
+
sessionStorage.removeItem(n), sessionStorage.removeItem(g);
|
|
217
|
+
}, [c, T, B]), O(() => {
|
|
218
|
+
pe.includes(e) && !r.sliceType && !c && h && !w && y(null);
|
|
219
|
+
}, [e, r.sliceType, c, h, w, y]);
|
|
220
|
+
const te = P(
|
|
221
|
+
(n, g) => {
|
|
222
|
+
if (I && t.slice(1).includes(n)) return;
|
|
223
|
+
r.onSliceTypeChange ? r.onSliceTypeChange(n, g) : x([n, ...t.slice(1).filter((L) => L !== n)]);
|
|
224
|
+
const m = (L) => r.setRowSelection ? r.setRowSelection(L) : v(L, n), _ = (L) => r.setExpanded ? r.setExpanded(L) : M(L, n);
|
|
225
|
+
h && n === h.sliceType ? (m(h.rowSelection), _(h.expanded), y(null)) : n !== "hierarchy" && (m({}), _({})), g && y({
|
|
226
|
+
sliceType: b,
|
|
227
|
+
rowSelection: H,
|
|
228
|
+
expanded: C
|
|
229
229
|
});
|
|
230
230
|
},
|
|
231
231
|
[
|
|
232
|
-
|
|
232
|
+
x,
|
|
233
233
|
t,
|
|
234
|
-
D,
|
|
235
|
-
M,
|
|
236
|
-
y,
|
|
237
|
-
p,
|
|
238
|
-
G,
|
|
239
234
|
H,
|
|
235
|
+
v,
|
|
236
|
+
h,
|
|
237
|
+
y,
|
|
238
|
+
C,
|
|
239
|
+
M,
|
|
240
240
|
r.setRowSelection,
|
|
241
241
|
r.setExpanded,
|
|
242
|
-
|
|
242
|
+
I
|
|
243
243
|
]
|
|
244
|
-
), W =
|
|
244
|
+
), W = P(
|
|
245
245
|
(n) => {
|
|
246
|
-
n !== "hierarchy" && (
|
|
246
|
+
n !== "hierarchy" && (D(n, {}), A(n, {}));
|
|
247
247
|
},
|
|
248
|
-
[
|
|
249
|
-
), se =
|
|
248
|
+
[D, A]
|
|
249
|
+
), se = P(
|
|
250
250
|
(n) => {
|
|
251
|
-
!n || t.includes(n) || (
|
|
251
|
+
!n || t.includes(n) || (x([...t, n]), W(n));
|
|
252
252
|
},
|
|
253
|
-
[t,
|
|
254
|
-
), ne =
|
|
253
|
+
[t, x, W]
|
|
254
|
+
), ne = P(
|
|
255
255
|
(n) => {
|
|
256
256
|
if (t.length <= 1 || !t.includes(n)) return;
|
|
257
|
-
const
|
|
258
|
-
|
|
257
|
+
const g = t.filter((m) => m !== n);
|
|
258
|
+
x(g, g.length > 1 ? void 0 : []);
|
|
259
259
|
},
|
|
260
|
-
[t,
|
|
261
|
-
), oe =
|
|
262
|
-
(n,
|
|
263
|
-
!t.includes(n) || t.includes(
|
|
264
|
-
t.map((
|
|
265
|
-
|
|
266
|
-
), W(
|
|
260
|
+
[t, x]
|
|
261
|
+
), oe = P(
|
|
262
|
+
(n, g) => {
|
|
263
|
+
!t.includes(n) || t.includes(g) || (x(
|
|
264
|
+
t.map((m) => m === n ? g : m),
|
|
265
|
+
S.map((m) => m === n ? g : m)
|
|
266
|
+
), W(g));
|
|
267
267
|
},
|
|
268
|
-
[t,
|
|
269
|
-
), re =
|
|
268
|
+
[t, x, W, S]
|
|
269
|
+
), re = P(
|
|
270
270
|
(n) => {
|
|
271
|
-
|
|
271
|
+
M(n);
|
|
272
272
|
},
|
|
273
|
-
[
|
|
274
|
-
), { useExtraSlices:
|
|
273
|
+
[M]
|
|
274
|
+
), [ie, me] = F({}), [ce, Ee] = F({}), { useExtraSlices: le, isLoadingExtraSlices: de, SlicerDropdown: ae } = Fe(), Ie = R(
|
|
275
275
|
() => ({
|
|
276
276
|
projectName: s,
|
|
277
277
|
page: e,
|
|
278
|
-
useExtraSlices:
|
|
279
|
-
isLoadingExtraSlices:
|
|
280
|
-
SlicerDropdown:
|
|
278
|
+
useExtraSlices: le,
|
|
279
|
+
isLoadingExtraSlices: de,
|
|
280
|
+
SlicerDropdown: ae,
|
|
281
281
|
// SLICE TYPE
|
|
282
|
-
sliceType:
|
|
282
|
+
sliceType: b,
|
|
283
283
|
onSliceTypeChange: te,
|
|
284
284
|
// SLICE PANELS
|
|
285
|
-
slices:
|
|
285
|
+
slices: u,
|
|
286
286
|
addSlicePanel: se,
|
|
287
287
|
removeSlicePanel: ne,
|
|
288
288
|
setPanelSliceType: oe,
|
|
289
|
-
getPanelSelection:
|
|
290
|
-
setPanelSelection:
|
|
289
|
+
getPanelSelection: $,
|
|
290
|
+
setPanelSelection: D,
|
|
291
291
|
getPanelExpanded: J,
|
|
292
|
-
setPanelExpanded:
|
|
293
|
-
collapsedPanels:
|
|
292
|
+
setPanelExpanded: A,
|
|
293
|
+
collapsedPanels: S,
|
|
294
294
|
togglePanelCollapsed: V,
|
|
295
|
+
searchByPanel: ie,
|
|
296
|
+
setSearchByPanel: me,
|
|
297
|
+
searchMatchesByPanel: ce,
|
|
298
|
+
setSearchMatchesByPanel: Ee,
|
|
295
299
|
getSliceSort: Z,
|
|
296
300
|
setSliceSort: j,
|
|
297
301
|
// ROW SELECTION
|
|
298
|
-
rowSelection:
|
|
302
|
+
rowSelection: H,
|
|
299
303
|
onRowSelectionChange: Q,
|
|
300
304
|
// PINNED SLICE
|
|
301
|
-
pinnedSlice:
|
|
302
|
-
setPinnedSlice:
|
|
303
|
-
expanded:
|
|
305
|
+
pinnedSlice: h,
|
|
306
|
+
setPinnedSlice: y,
|
|
307
|
+
expanded: C,
|
|
304
308
|
onExpandedChange: re,
|
|
305
309
|
// loading state
|
|
306
|
-
isViewSyncPending:
|
|
307
|
-
onOpenViewer:
|
|
308
|
-
onAddToList:
|
|
310
|
+
isViewSyncPending: c,
|
|
311
|
+
onOpenViewer: p,
|
|
312
|
+
onAddToList: f
|
|
309
313
|
}),
|
|
310
314
|
[
|
|
311
315
|
e,
|
|
312
|
-
ie,
|
|
313
|
-
ce,
|
|
314
316
|
le,
|
|
315
|
-
|
|
317
|
+
de,
|
|
318
|
+
ae,
|
|
319
|
+
b,
|
|
316
320
|
te,
|
|
317
|
-
|
|
318
|
-
|
|
321
|
+
u,
|
|
322
|
+
S,
|
|
319
323
|
V,
|
|
324
|
+
ie,
|
|
325
|
+
ce,
|
|
320
326
|
Z,
|
|
321
327
|
j,
|
|
322
328
|
se,
|
|
323
329
|
ne,
|
|
324
330
|
oe,
|
|
325
|
-
|
|
326
|
-
C,
|
|
327
|
-
J,
|
|
328
|
-
b,
|
|
331
|
+
$,
|
|
329
332
|
D,
|
|
333
|
+
J,
|
|
334
|
+
A,
|
|
335
|
+
H,
|
|
330
336
|
Q,
|
|
337
|
+
h,
|
|
331
338
|
y,
|
|
332
|
-
|
|
333
|
-
G,
|
|
339
|
+
C,
|
|
334
340
|
re,
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
341
|
+
c,
|
|
342
|
+
p,
|
|
343
|
+
f
|
|
338
344
|
]
|
|
339
345
|
);
|
|
340
|
-
return /* @__PURE__ */
|
|
341
|
-
},
|
|
346
|
+
return /* @__PURE__ */ Pe(xe.Provider, { value: Ie, children: o });
|
|
347
|
+
}, ct = ({
|
|
342
348
|
sliceFilter: o,
|
|
343
349
|
persistedHierarchySelection: e,
|
|
344
350
|
filters: s,
|
|
345
|
-
merge:
|
|
351
|
+
merge: l = !0
|
|
346
352
|
}) => R(() => {
|
|
347
|
-
const d = (
|
|
353
|
+
const d = (p) => ({
|
|
348
354
|
id: "hierarchy",
|
|
349
355
|
label: "Folder",
|
|
350
356
|
type: "list_of_strings",
|
|
351
|
-
values: Object.keys(
|
|
357
|
+
values: Object.keys(p).filter((f) => p[f]).map((f) => ({ id: f, label: f })),
|
|
352
358
|
isCustom: !0,
|
|
353
359
|
singleSelect: !0,
|
|
354
360
|
fieldType: "folder",
|
|
355
361
|
operator: "OR",
|
|
356
362
|
isReadonly: !0
|
|
357
363
|
});
|
|
358
|
-
return o && e ?
|
|
359
|
-
}, [o, e, s]),
|
|
360
|
-
const
|
|
361
|
-
return o.taskIds.length &&
|
|
364
|
+
return o && e ? l ? [d(e), ...s] : [d(e)] : s;
|
|
365
|
+
}, [o, e, s]), Me = async (o, e, s) => {
|
|
366
|
+
const l = new Set(o.folderIds), c = new Set(o.taskIds), d = new Set(o.versionIds), p = new Set(o.productIds), f = {}, r = {}, h = {}, y = [];
|
|
367
|
+
return o.taskIds.length && y.push(
|
|
362
368
|
s(
|
|
363
369
|
U.endpoints.GetTasksList.initiate({
|
|
364
370
|
projectName: e,
|
|
365
371
|
taskIds: o.taskIds,
|
|
366
372
|
first: o.taskIds.length
|
|
367
373
|
})
|
|
368
|
-
).unwrap().then((
|
|
369
|
-
for (const i of
|
|
370
|
-
i.folderId && (
|
|
374
|
+
).unwrap().then((I) => {
|
|
375
|
+
for (const i of I.tasks)
|
|
376
|
+
i.folderId && (l.add(i.folderId), f[i.id] = i.folderId);
|
|
371
377
|
})
|
|
372
|
-
), o.versionIds.length &&
|
|
378
|
+
), o.versionIds.length && y.push(
|
|
373
379
|
s(
|
|
374
380
|
U.endpoints.GetVersions.initiate({
|
|
375
381
|
projectName: e,
|
|
376
382
|
versionIds: o.versionIds,
|
|
377
383
|
first: o.versionIds.length
|
|
378
384
|
})
|
|
379
|
-
).unwrap().then((
|
|
380
|
-
for (const i of
|
|
381
|
-
i.task?.id &&
|
|
385
|
+
).unwrap().then((I) => {
|
|
386
|
+
for (const i of I.versions)
|
|
387
|
+
i.task?.id && c.add(i.task.id), i.product?.id && p.add(i.product.id), i.product?.folder?.id && (l.add(i.product.folder.id), r[i.id] = i.product.folder.id, i.product?.id && (h[i.product.id] = i.product.folder.id));
|
|
382
388
|
})
|
|
383
|
-
), o.productIds.length &&
|
|
389
|
+
), o.productIds.length && y.push(
|
|
384
390
|
s(
|
|
385
391
|
U.endpoints.GetProducts.initiate({
|
|
386
392
|
projectName: e,
|
|
387
393
|
productIds: o.productIds,
|
|
388
394
|
first: o.productIds.length
|
|
389
395
|
})
|
|
390
|
-
).unwrap().then((
|
|
391
|
-
for (const i of
|
|
392
|
-
i.folderId && (
|
|
396
|
+
).unwrap().then((I) => {
|
|
397
|
+
for (const i of I.products)
|
|
398
|
+
i.folderId && (l.add(i.folderId), h[i.id] = i.folderId);
|
|
393
399
|
})
|
|
394
|
-
), await Promise.all(
|
|
395
|
-
folderIds: [...
|
|
396
|
-
taskIds: [...
|
|
400
|
+
), await Promise.all(y), {
|
|
401
|
+
folderIds: [...l],
|
|
402
|
+
taskIds: [...c],
|
|
397
403
|
versionIds: [...d],
|
|
398
|
-
productIds: [...
|
|
399
|
-
parentMaps: { taskFolderIds:
|
|
404
|
+
productIds: [...p],
|
|
405
|
+
parentMaps: { taskFolderIds: f, versionFolderIds: r, productFolderIds: h }
|
|
400
406
|
};
|
|
401
|
-
},
|
|
407
|
+
}, G = {
|
|
402
408
|
folderIds: [],
|
|
403
409
|
taskIds: [],
|
|
404
410
|
versionIds: [],
|
|
@@ -407,18 +413,18 @@ const ve = () => {
|
|
|
407
413
|
taskFolderIds: {},
|
|
408
414
|
versionFolderIds: {},
|
|
409
415
|
productFolderIds: {}
|
|
410
|
-
},
|
|
416
|
+
}, Oe = (o) => {
|
|
411
417
|
const e = {
|
|
412
418
|
folder: /* @__PURE__ */ new Set(),
|
|
413
419
|
task: /* @__PURE__ */ new Set(),
|
|
414
420
|
version: /* @__PURE__ */ new Set(),
|
|
415
421
|
product: /* @__PURE__ */ new Set()
|
|
416
422
|
};
|
|
417
|
-
for (const { entityType: s, entityIds:
|
|
418
|
-
const
|
|
419
|
-
if (
|
|
420
|
-
for (const d of
|
|
421
|
-
|
|
423
|
+
for (const { entityType: s, entityIds: l } of o) {
|
|
424
|
+
const c = e[s];
|
|
425
|
+
if (c)
|
|
426
|
+
for (const d of l)
|
|
427
|
+
c.add(d);
|
|
422
428
|
}
|
|
423
429
|
return {
|
|
424
430
|
folderIds: [...e.folder],
|
|
@@ -426,49 +432,49 @@ const ve = () => {
|
|
|
426
432
|
versionIds: [...e.version],
|
|
427
433
|
productIds: [...e.product]
|
|
428
434
|
};
|
|
429
|
-
},
|
|
435
|
+
}, lt = ({
|
|
430
436
|
slices: o,
|
|
431
437
|
projectName: e
|
|
432
438
|
}) => {
|
|
433
|
-
const s =
|
|
434
|
-
() => Object.keys(
|
|
435
|
-
[
|
|
436
|
-
),
|
|
437
|
-
return
|
|
438
|
-
if (!
|
|
439
|
-
|
|
439
|
+
const s = be(), [l, c] = F(G), [d, p] = F(G), [f, r] = F(Y), [h, y] = F(""), I = o.find((E) => E.sliceType === "entityList")?.rowSelection, i = R(
|
|
440
|
+
() => Object.keys(I ?? {}).filter((E) => I?.[E] && !E.startsWith("folder-")).sort(),
|
|
441
|
+
[I]
|
|
442
|
+
), T = i.length && e ? `${e}|${i}` : "";
|
|
443
|
+
return O(() => {
|
|
444
|
+
if (!T) {
|
|
445
|
+
c(G), p(G), r(Y), y("");
|
|
440
446
|
return;
|
|
441
447
|
}
|
|
442
|
-
let
|
|
448
|
+
let E = !1;
|
|
443
449
|
return (async () => {
|
|
444
450
|
try {
|
|
445
|
-
const
|
|
451
|
+
const w = await Promise.all(
|
|
446
452
|
i.map(
|
|
447
|
-
(
|
|
448
|
-
|
|
453
|
+
(u) => s(
|
|
454
|
+
Le.endpoints.getListEntities.initiate({
|
|
449
455
|
projectName: e,
|
|
450
|
-
entityListId:
|
|
456
|
+
entityListId: u
|
|
451
457
|
})
|
|
452
458
|
).unwrap()
|
|
453
459
|
)
|
|
454
|
-
), t =
|
|
455
|
-
|
|
456
|
-
const { parentMaps:
|
|
460
|
+
), t = Oe(w);
|
|
461
|
+
E || p(t);
|
|
462
|
+
const { parentMaps: a, ...S } = await Me(
|
|
457
463
|
t,
|
|
458
464
|
e,
|
|
459
465
|
s
|
|
460
466
|
);
|
|
461
|
-
|
|
462
|
-
} catch (
|
|
463
|
-
console.error("Error fetching entity list IDs:",
|
|
467
|
+
E || (c(S), r(a));
|
|
468
|
+
} catch (w) {
|
|
469
|
+
console.error("Error fetching entity list IDs:", w), E || (c(G), p(G), r(Y));
|
|
464
470
|
} finally {
|
|
465
|
-
|
|
471
|
+
E || y(T);
|
|
466
472
|
}
|
|
467
473
|
})(), () => {
|
|
468
|
-
|
|
474
|
+
E = !0;
|
|
469
475
|
};
|
|
470
|
-
}, [
|
|
471
|
-
},
|
|
476
|
+
}, [T, i, e, s]), { entityIds: l, rawEntityIds: d, parentMaps: f, isLoading: T !== h };
|
|
477
|
+
}, $e = ({ slice: o, attribFields: e }) => {
|
|
472
478
|
const s = {
|
|
473
479
|
assignees: "list_of_strings",
|
|
474
480
|
status: "string",
|
|
@@ -477,74 +483,101 @@ const ve = () => {
|
|
|
477
483
|
author: "string",
|
|
478
484
|
hierarchy: void 0,
|
|
479
485
|
entityList: void 0,
|
|
480
|
-
...e.reduce((
|
|
486
|
+
...e.reduce((c, d) => (c["attrib." + d.name] = d.data.type, c), {})
|
|
481
487
|
};
|
|
482
488
|
return (() => {
|
|
483
489
|
if (!o) return null;
|
|
484
|
-
const
|
|
485
|
-
id:
|
|
486
|
-
label:
|
|
490
|
+
const c = s[o?.sliceType], d = Object.entries(o.rowSelection).filter(([p, f]) => !!p && f).map(([p]) => ({
|
|
491
|
+
id: p,
|
|
492
|
+
label: p
|
|
487
493
|
}));
|
|
488
494
|
return {
|
|
489
495
|
id: o?.sliceType,
|
|
490
496
|
label: o?.sliceType,
|
|
491
|
-
type:
|
|
497
|
+
type: c,
|
|
492
498
|
inverted: !1,
|
|
493
499
|
operator: "OR",
|
|
494
500
|
values: d
|
|
495
501
|
};
|
|
496
502
|
})();
|
|
497
|
-
},
|
|
503
|
+
}, De = ({
|
|
498
504
|
slices: o,
|
|
499
505
|
attribFields: e
|
|
500
|
-
}) => o.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) =>
|
|
501
|
-
const
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
}) => o.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) => $e({ slice: s, attribFields: e })).filter((s) => !!s), Ae = (o, e) => {
|
|
507
|
+
const s = Object.keys(o).filter((d) => o[d]), l = new Set(e), c = s.length ? s.filter((d) => l.has(d)) : e;
|
|
508
|
+
return c.length ? Object.fromEntries(c.map((d) => [d, !0])) : null;
|
|
509
|
+
}, dt = (o) => {
|
|
510
|
+
const { slices: e, getPanelSelection: s, searchByPanel: l, searchMatchesByPanel: c } = ke(), { folders: d } = we(), { powerLicense: p, isLoading: f } = X(), [r, h] = F(c);
|
|
511
|
+
O(() => {
|
|
512
|
+
const u = setTimeout(() => h(c), 300);
|
|
513
|
+
return () => clearTimeout(u);
|
|
514
|
+
}, [c]);
|
|
515
|
+
const { sliceSelections: y, emptySearchSliceTypes: I } = R(() => {
|
|
516
|
+
const u = p ? e : e.slice(0, 1), b = [];
|
|
517
|
+
return { sliceSelections: u.map((v) => {
|
|
518
|
+
const C = s(v.id), M = v.sliceType === "hierarchy" ? void 0 : r[v.id];
|
|
519
|
+
if (!M) return { sliceType: v.sliceType, rowSelection: C };
|
|
520
|
+
const $ = Ae(C, M);
|
|
521
|
+
return $ || b.push(v.sliceType), { sliceType: v.sliceType, rowSelection: $ ?? {} };
|
|
522
|
+
}), emptySearchSliceTypes: b };
|
|
523
|
+
}, [e, s, p, r]), i = R(
|
|
524
|
+
() => De({ slices: y, attribFields: o }),
|
|
525
|
+
[y, o]
|
|
526
|
+
), T = y.some((u) => u.sliceType === "hierarchy") ? l.hierarchy : void 0, [E, k] = F(T);
|
|
527
|
+
O(() => {
|
|
528
|
+
const u = setTimeout(() => k(T), 300);
|
|
529
|
+
return () => clearTimeout(u);
|
|
530
|
+
}, [T]);
|
|
531
|
+
const w = R(
|
|
532
|
+
// folders still loading: no restriction yet rather than an empty table
|
|
533
|
+
() => E && d.length ? Re(d, E) : null,
|
|
534
|
+
[d, E]
|
|
535
|
+
), t = I.length > 0, a = R(
|
|
536
|
+
() => t ? [] : w,
|
|
537
|
+
[t, w]
|
|
538
|
+
), S = P(
|
|
539
|
+
(u) => I.length === 1 && I[0] === u ? w : a,
|
|
540
|
+
[I, w, a]
|
|
510
541
|
);
|
|
511
542
|
return {
|
|
512
|
-
sliceSelections:
|
|
513
|
-
sliceFilters:
|
|
514
|
-
|
|
543
|
+
sliceSelections: y,
|
|
544
|
+
sliceFilters: i,
|
|
545
|
+
searchFolderIds: a,
|
|
546
|
+
getCountsSearchFolderIds: S,
|
|
547
|
+
isLicensePending: e.length > 1 && f
|
|
515
548
|
};
|
|
516
549
|
};
|
|
517
550
|
export {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
551
|
+
St as SLICER_DEFAULT_PANEL_HEIGHT,
|
|
552
|
+
ft as SLICER_MIN_PANEL_HEIGHT,
|
|
553
|
+
_t as SLICER_PAGES_CONFIG,
|
|
554
|
+
ht as SLICER_SPLITTER_PANEL_CONFIG,
|
|
555
|
+
yt as SLICER_SPLITTER_STATE_KEY,
|
|
556
|
+
pt as SLICE_DEFAULT_ORDER,
|
|
557
|
+
mt as Slicer,
|
|
558
|
+
xe as SlicerContext,
|
|
559
|
+
it as SlicerProvider,
|
|
560
|
+
Et as buildListFolderRowId,
|
|
561
|
+
It as clampDraggedHeights,
|
|
562
|
+
$e as createFilterFromSlicer,
|
|
563
|
+
De as createFiltersFromSlicer,
|
|
564
|
+
gt as defaultSliceOptions,
|
|
565
|
+
Pt as getDefaultSliceSort,
|
|
566
|
+
Tt as getSliceSortOptions,
|
|
567
|
+
wt as resolvePanelLayout,
|
|
568
|
+
ge as resolveSliceSort,
|
|
569
|
+
vt as sortSliceRows,
|
|
570
|
+
xt as useEntityListsSlice,
|
|
571
|
+
ct as useFiltersWithHierarchy,
|
|
572
|
+
kt as useHierarchyContextMenuItems,
|
|
573
|
+
Ot as useHierarchySelection,
|
|
574
|
+
Ct as useOptionalSlicerContext,
|
|
575
|
+
lt as useSelectedEntityIds,
|
|
576
|
+
ke as useSlicerContext,
|
|
577
|
+
Lt as useSlicerCounts,
|
|
578
|
+
Rt as useSlicerPanelHeights,
|
|
579
|
+
dt as useSlicerPanelSelections,
|
|
580
|
+
Fe as useSlicerRemotes,
|
|
581
|
+
Ce as useSlicerRowSelection,
|
|
582
|
+
bt as useSlicerSplitter
|
|
550
583
|
};
|