@ynput/ayon-frontend-shared 0.7.2 → 0.7.4
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/LICENSE +105 -0
- package/dist/DetailsPanel.es.js +1088 -969
- package/dist/ListTable.es.js +70 -67
- package/dist/NewEntity.es.js +8 -5
- package/dist/ProjectTreeTable.es.js +4134 -3825
- package/dist/ProjectsTable.es.js +526 -0
- package/dist/Slicer.es.js +75 -73
- package/dist/Views.es.js +86 -84
- package/dist/chunks/Actions.es.js +4 -2
- package/dist/chunks/ColumnDropIndicator.es.js +21 -18
- package/dist/chunks/ColumnDropIndicator.styled.es.js +14 -13
- package/dist/chunks/ColumnHeaderMenuUI.es.js +9 -7
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +12 -11
- package/dist/chunks/EmptyPlaceholder.es.js +9 -8
- package/dist/chunks/EntityPath.es.js +15 -14
- package/dist/chunks/EntityPickerDialog.es.js +5 -3
- package/dist/chunks/EntityTooltip.es.js +10 -8
- package/dist/chunks/EntityUpdatesContext.es.js +13 -12
- package/dist/chunks/Feed.es.js +12 -11
- package/dist/chunks/FilterErrorActions.es.js +6 -4
- package/dist/chunks/GroupSettingsFallback.es.js +75 -0
- package/dist/chunks/JsonViewer.es.js +3 -2
- package/dist/chunks/Menu.es.js +105 -103
- package/dist/chunks/MetaWidget.es.js +278 -275
- package/dist/chunks/PlayableIcon.es.js +868 -862
- package/dist/chunks/ProjectContext.es.js +5 -4
- package/dist/chunks/RepresentationsList.es.js +3 -2
- package/dist/chunks/ReviewablesSelector.es.js +3471 -2067
- package/dist/chunks/SimpleTable.es.js +492 -402
- package/dist/chunks/Slicer.es.js +936 -896
- package/dist/chunks/TableExportContextInstance.es.js +437 -339
- package/dist/chunks/TableSettingsFallback.es.js +5 -3
- package/dist/chunks/ThumbnailSimple.es.js +15 -13
- package/dist/chunks/VideoPlayer.es.js +14 -12
- package/dist/chunks/Watchers.es.js +97 -95
- package/dist/chunks/getProjectDisplayName.es.js +4 -0
- package/dist/chunks/getUris.es.js +375 -374
- package/dist/chunks/useHierarchySelection.es.js +5 -3
- package/dist/chunks/useLoadModule.es.js +10 -8
- package/dist/chunks/viewUpdateHelper.es.js +12 -10
- package/dist/components.es.js +1488 -1186
- package/dist/context.es.js +589 -539
- package/dist/hooks.es.js +169 -212
- package/dist/index.es.js +17 -12
- package/dist/types/Actions.d.ts +17 -14
- package/dist/types/ContextMenu.d.ts +17 -14
- package/dist/types/DetailsPanel.d.ts +17 -14
- package/dist/types/EntityPickerDialog.d.ts +17 -14
- package/dist/types/Feed.d.ts +17 -14
- package/dist/types/ListTable.d.ts +17 -14
- package/dist/types/NewEntity.d.ts +17 -14
- package/dist/types/ProjectTreeTable.d.ts +749 -15
- package/dist/types/ProjectsTable.d.ts +228 -0
- package/dist/types/RepresentationsList.d.ts +17 -14
- package/dist/types/SimpleTable.d.ts +31 -14
- package/dist/types/Slicer.d.ts +18 -14
- package/dist/types/Views.d.ts +17 -14
- package/dist/types/api.d.ts +17 -14
- package/dist/types/components.d.ts +822 -25
- package/dist/types/context.d.ts +53 -15
- package/dist/types/hooks.d.ts +17 -14
- package/dist/types/index.d.ts +17 -14
- package/dist/types/util.d.ts +21 -14
- package/dist/util.es.js +152 -144
- package/package.json +16 -9
- /package/dist/{ContextMenuContextInstance.css → style.css} +0 -0
package/dist/Slicer.es.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { r as pe } from "./chunks/Slicer.es.js";
|
|
2
|
-
import { S as
|
|
2
|
+
import { S as rt, a as it, b as ct, c as lt, d as dt, e as at, f as ut, g as ft, h as St, i as yt, j as ht, k as pt, s as Et, u as It, l as mt, m as gt, n as wt, o as Pt } from "./chunks/Slicer.es.js";
|
|
3
3
|
import { jsx as Ee } from "react/jsx-runtime";
|
|
4
4
|
import { useState as O, useEffect as A, useRef as q, useCallback as I, useMemo as L } from "react";
|
|
5
|
-
import {
|
|
6
|
-
import { S as
|
|
7
|
-
import {
|
|
5
|
+
import { b as X, p as z, s as ae, o as Ie } from "./chunks/TableExportContextInstance.es.js";
|
|
6
|
+
import { S as me, d as ge, e as we } from "./chunks/MetaWidget.es.js";
|
|
7
|
+
import { f as vt, u as kt } from "./chunks/MetaWidget.es.js";
|
|
8
8
|
import "@module-federation/enhanced/runtime";
|
|
9
|
+
import "@ynput/ayon-addon/host";
|
|
9
10
|
import "react-toastify";
|
|
10
11
|
import "@ynput/ayon-react-components";
|
|
11
12
|
import { aI as U, az as Pe } from "./chunks/searchTerms.es.js";
|
|
@@ -13,6 +14,7 @@ import "./chunks/getUris.es.js";
|
|
|
13
14
|
import "primereact/confirmdialog";
|
|
14
15
|
import "lodash";
|
|
15
16
|
import "uuid";
|
|
17
|
+
import "axios";
|
|
16
18
|
import { u as ue } from "./chunks/useLoadModule.es.js";
|
|
17
19
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
18
20
|
import "clsx";
|
|
@@ -20,7 +22,7 @@ import "react-dom";
|
|
|
20
22
|
import { useDispatch as xe } from "react-redux";
|
|
21
23
|
import "react-router-dom";
|
|
22
24
|
import "semver";
|
|
23
|
-
import { u as
|
|
25
|
+
import { u as Rt } from "./chunks/useHierarchySelection.es.js";
|
|
24
26
|
const ve = () => {
|
|
25
27
|
const o = () => ({
|
|
26
28
|
formatStatuses: () => [],
|
|
@@ -41,7 +43,7 @@ const ve = () => {
|
|
|
41
43
|
addon: "powerpack",
|
|
42
44
|
remote: "slicer",
|
|
43
45
|
module: "SlicerDropdown",
|
|
44
|
-
fallback:
|
|
46
|
+
fallback: me,
|
|
45
47
|
skip: !e
|
|
46
48
|
// skip loading if powerpack license is not available
|
|
47
49
|
});
|
|
@@ -60,15 +62,15 @@ const ve = () => {
|
|
|
60
62
|
A(() => {
|
|
61
63
|
const t = (u) => {
|
|
62
64
|
const f = u.detail?.key ?? ("key" in u ? u.key : void 0);
|
|
63
|
-
f && !ke.some((
|
|
65
|
+
f && !ke.some((g) => f.startsWith(g)) || d((g) => g + 1);
|
|
64
66
|
};
|
|
65
67
|
return window.addEventListener("session-storage", t), window.addEventListener("storage", t), () => {
|
|
66
68
|
window.removeEventListener("session-storage", t), window.removeEventListener("storage", t);
|
|
67
69
|
};
|
|
68
70
|
}, []);
|
|
69
71
|
const S = q(/* @__PURE__ */ new Map()), a = I((t, u) => {
|
|
70
|
-
const f = typeof window > "u" ? null : sessionStorage.getItem(t),
|
|
71
|
-
if (
|
|
72
|
+
const f = typeof window > "u" ? null : sessionStorage.getItem(t), g = S.current.get(t);
|
|
73
|
+
if (g && g.raw === f) return g.value;
|
|
72
74
|
const _ = z(t, u);
|
|
73
75
|
return S.current.set(t, { raw: f, value: _ }), _;
|
|
74
76
|
}, []), r = o[0], y = I(
|
|
@@ -81,8 +83,8 @@ const ve = () => {
|
|
|
81
83
|
c.setRowSelection(u);
|
|
82
84
|
return;
|
|
83
85
|
}
|
|
84
|
-
const f = fe(s, e, t),
|
|
85
|
-
ae(f,
|
|
86
|
+
const f = fe(s, e, t), g = typeof u == "function" ? u(a(f, {})) : u;
|
|
87
|
+
ae(f, g);
|
|
86
88
|
},
|
|
87
89
|
[c.setRowSelection, r, s, e, a]
|
|
88
90
|
), w = I(
|
|
@@ -94,11 +96,11 @@ const ve = () => {
|
|
|
94
96
|
c.setExpanded(u);
|
|
95
97
|
return;
|
|
96
98
|
}
|
|
97
|
-
const f = Se(s, e, t),
|
|
98
|
-
ae(f,
|
|
99
|
+
const f = Se(s, e, t), g = typeof u == "function" ? u(a(f, {})) : u;
|
|
100
|
+
ae(f, g);
|
|
99
101
|
},
|
|
100
102
|
[c.setExpanded, r, s, e, a]
|
|
101
|
-
), P = y(r),
|
|
103
|
+
), P = y(r), m = I(
|
|
102
104
|
(t, u = r) => p(u, t),
|
|
103
105
|
[p, r]
|
|
104
106
|
), T = w(r), x = I(
|
|
@@ -107,7 +109,7 @@ const ve = () => {
|
|
|
107
109
|
);
|
|
108
110
|
return {
|
|
109
111
|
rowSelection: P,
|
|
110
|
-
setRowSelection:
|
|
112
|
+
setRowSelection: m,
|
|
111
113
|
expanded: T,
|
|
112
114
|
setExpanded: x,
|
|
113
115
|
getPanelSelection: y,
|
|
@@ -115,7 +117,7 @@ const ve = () => {
|
|
|
115
117
|
getPanelExpanded: w,
|
|
116
118
|
setPanelExpanded: i
|
|
117
119
|
};
|
|
118
|
-
}, ye = ["overview", "products"],
|
|
120
|
+
}, ye = ["overview", "products"], Ne = ({
|
|
119
121
|
children: o,
|
|
120
122
|
page: e,
|
|
121
123
|
projectName: s,
|
|
@@ -129,17 +131,17 @@ const ve = () => {
|
|
|
129
131
|
const [y, p] = Ie(
|
|
130
132
|
`slicer-pinned-slice-${e}`,
|
|
131
133
|
null
|
|
132
|
-
), { powerLicense: w } = X(), i = c, P = i?.sliceTypes,
|
|
134
|
+
), { powerLicense: w } = X(), i = c, P = i?.sliceTypes, m = i?.sliceType, T = P?.length ? m && m !== P[0] ? [m, ...P.slice(1)] : P : [m ?? "hierarchy"], x = ye.includes(e) && !r.sliceType && !P?.length && T[0] !== "hierarchy" && y?.sliceType === "hierarchy" && Object.values(y.rowSelection || {}).some(Boolean), t = L(
|
|
133
135
|
() => [
|
|
134
136
|
...new Set(
|
|
135
137
|
r.sliceType ? [r.sliceType] : x ? [...T, "hierarchy"] : T
|
|
136
138
|
)
|
|
137
139
|
],
|
|
138
140
|
[r.sliceType, T.join("|"), x]
|
|
139
|
-
), u = i?.collapsedSliceTypes, f = L(() => u ?? [], [u?.join("|")]),
|
|
141
|
+
), u = i?.collapsedSliceTypes, f = L(() => u ?? [], [u?.join("|")]), g = L(
|
|
140
142
|
() => t.map((n) => ({ id: n, sliceType: n })),
|
|
141
143
|
[t]
|
|
142
|
-
), _ =
|
|
144
|
+
), _ = g[0].sliceType, {
|
|
143
145
|
rowSelection: D,
|
|
144
146
|
setRowSelection: M,
|
|
145
147
|
expanded: G,
|
|
@@ -147,7 +149,7 @@ const ve = () => {
|
|
|
147
149
|
getPanelSelection: B,
|
|
148
150
|
setPanelSelection: C,
|
|
149
151
|
getPanelExpanded: J,
|
|
150
|
-
setPanelExpanded:
|
|
152
|
+
setPanelExpanded: b
|
|
151
153
|
} = Te({
|
|
152
154
|
sliceTypes: t,
|
|
153
155
|
page: e,
|
|
@@ -190,15 +192,15 @@ const ve = () => {
|
|
|
190
192
|
v(t, E);
|
|
191
193
|
},
|
|
192
194
|
[f, v, t]
|
|
193
|
-
),
|
|
195
|
+
), F = `${s}-${e}`, N = q(/* @__PURE__ */ new Set());
|
|
194
196
|
A(() => {
|
|
195
|
-
!x || l || N.current.has(
|
|
196
|
-
}, [x, l,
|
|
197
|
+
!x || l || N.current.has(F) || (N.current.add(F), Object.keys(B("hierarchy")).length || (C("hierarchy", y.rowSelection), b("hierarchy", y.expanded)), v(t));
|
|
198
|
+
}, [x, l, F]);
|
|
197
199
|
const ee = q(/* @__PURE__ */ new Set());
|
|
198
200
|
A(() => {
|
|
199
|
-
if (ee.current.has(
|
|
201
|
+
if (ee.current.has(F) || l || r.sliceType || r.rowSelection || r.setRowSelection || P?.length)
|
|
200
202
|
return;
|
|
201
|
-
ee.current.add(
|
|
203
|
+
ee.current.add(F);
|
|
202
204
|
const n = `slicer-selection-${s}-${e}`, E = `slicer-expanded-${s}-${e}`, h = T[0];
|
|
203
205
|
if (h !== "hierarchy") {
|
|
204
206
|
const R = z(n, null);
|
|
@@ -208,11 +210,11 @@ const ve = () => {
|
|
|
208
210
|
(de) => Object.keys(de).length ? de : R
|
|
209
211
|
);
|
|
210
212
|
const k = z(E, null);
|
|
211
|
-
k &&
|
|
213
|
+
k && b(h, k);
|
|
212
214
|
}
|
|
213
215
|
}
|
|
214
216
|
sessionStorage.removeItem(n), sessionStorage.removeItem(E);
|
|
215
|
-
}, [l, P,
|
|
217
|
+
}, [l, P, F]), A(() => {
|
|
216
218
|
ye.includes(e) && !r.sliceType && !l && y && !x && p(null);
|
|
217
219
|
}, [e, r.sliceType, l, y, x, p]);
|
|
218
220
|
const te = I(
|
|
@@ -241,9 +243,9 @@ const ve = () => {
|
|
|
241
243
|
]
|
|
242
244
|
), W = I(
|
|
243
245
|
(n) => {
|
|
244
|
-
n !== "hierarchy" && (C(n, {}),
|
|
246
|
+
n !== "hierarchy" && (C(n, {}), b(n, {}));
|
|
245
247
|
},
|
|
246
|
-
[C,
|
|
248
|
+
[C, b]
|
|
247
249
|
), se = I(
|
|
248
250
|
(n) => {
|
|
249
251
|
!n || t.includes(n) || (v([...t, n]), W(n));
|
|
@@ -280,14 +282,14 @@ const ve = () => {
|
|
|
280
282
|
sliceType: _,
|
|
281
283
|
onSliceTypeChange: te,
|
|
282
284
|
// SLICE PANELS
|
|
283
|
-
slices:
|
|
285
|
+
slices: g,
|
|
284
286
|
addSlicePanel: se,
|
|
285
287
|
removeSlicePanel: ne,
|
|
286
288
|
setPanelSliceType: oe,
|
|
287
289
|
getPanelSelection: B,
|
|
288
290
|
setPanelSelection: C,
|
|
289
291
|
getPanelExpanded: J,
|
|
290
|
-
setPanelExpanded:
|
|
292
|
+
setPanelExpanded: b,
|
|
291
293
|
collapsedPanels: f,
|
|
292
294
|
togglePanelCollapsed: V,
|
|
293
295
|
getSliceSort: Z,
|
|
@@ -312,7 +314,7 @@ const ve = () => {
|
|
|
312
314
|
le,
|
|
313
315
|
_,
|
|
314
316
|
te,
|
|
315
|
-
|
|
317
|
+
g,
|
|
316
318
|
f,
|
|
317
319
|
V,
|
|
318
320
|
Z,
|
|
@@ -323,7 +325,7 @@ const ve = () => {
|
|
|
323
325
|
B,
|
|
324
326
|
C,
|
|
325
327
|
J,
|
|
326
|
-
|
|
328
|
+
b,
|
|
327
329
|
D,
|
|
328
330
|
Q,
|
|
329
331
|
y,
|
|
@@ -335,8 +337,8 @@ const ve = () => {
|
|
|
335
337
|
a
|
|
336
338
|
]
|
|
337
339
|
);
|
|
338
|
-
return /* @__PURE__ */ Ee(
|
|
339
|
-
},
|
|
340
|
+
return /* @__PURE__ */ Ee(ge.Provider, { value: he, children: o });
|
|
341
|
+
}, et = ({
|
|
340
342
|
sliceFilter: o,
|
|
341
343
|
persistedHierarchySelection: e,
|
|
342
344
|
filters: s,
|
|
@@ -424,12 +426,12 @@ const ve = () => {
|
|
|
424
426
|
versionIds: [...e.version],
|
|
425
427
|
productIds: [...e.product]
|
|
426
428
|
};
|
|
427
|
-
},
|
|
429
|
+
}, tt = ({
|
|
428
430
|
slices: o,
|
|
429
431
|
projectName: e
|
|
430
432
|
}) => {
|
|
431
|
-
const s = xe(), [c, l] = O($), [d, S] = O($), [a, r] = O(Y), [y, p] = O(""), w = o.find((
|
|
432
|
-
() => Object.keys(w ?? {}).filter((
|
|
433
|
+
const s = xe(), [c, l] = O($), [d, S] = O($), [a, r] = O(Y), [y, p] = O(""), w = o.find((m) => m.sliceType === "entityList")?.rowSelection, i = L(
|
|
434
|
+
() => Object.keys(w ?? {}).filter((m) => w?.[m] && !m.startsWith("folder-")).sort(),
|
|
433
435
|
[w]
|
|
434
436
|
), P = i.length && e ? `${e}|${i}` : "";
|
|
435
437
|
return A(() => {
|
|
@@ -437,30 +439,30 @@ const ve = () => {
|
|
|
437
439
|
l($), S($), r(Y), p("");
|
|
438
440
|
return;
|
|
439
441
|
}
|
|
440
|
-
let
|
|
442
|
+
let m = !1;
|
|
441
443
|
return (async () => {
|
|
442
444
|
try {
|
|
443
445
|
const x = await Promise.all(
|
|
444
446
|
i.map(
|
|
445
|
-
(
|
|
446
|
-
Pe.endpoints.getListEntities.initiate({ projectName: e, listId:
|
|
447
|
+
(g) => s(
|
|
448
|
+
Pe.endpoints.getListEntities.initiate({ projectName: e, listId: g })
|
|
447
449
|
).unwrap()
|
|
448
450
|
)
|
|
449
451
|
), t = Le(x);
|
|
450
|
-
|
|
452
|
+
m || S(t);
|
|
451
453
|
const { parentMaps: u, ...f } = await Re(
|
|
452
454
|
t,
|
|
453
455
|
e,
|
|
454
456
|
s
|
|
455
457
|
);
|
|
456
|
-
|
|
458
|
+
m || (l(f), r(u));
|
|
457
459
|
} catch (x) {
|
|
458
|
-
console.error("Error fetching entity list IDs:", x),
|
|
460
|
+
console.error("Error fetching entity list IDs:", x), m || (l($), S($), r(Y));
|
|
459
461
|
} finally {
|
|
460
|
-
|
|
462
|
+
m || p(P);
|
|
461
463
|
}
|
|
462
464
|
})(), () => {
|
|
463
|
-
|
|
465
|
+
m = !0;
|
|
464
466
|
};
|
|
465
467
|
}, [P, i, e, s]), { entityIds: c, rawEntityIds: d, parentMaps: a, isLoading: P !== y };
|
|
466
468
|
}, _e = ({ slice: o, attribFields: e }) => {
|
|
@@ -492,7 +494,7 @@ const ve = () => {
|
|
|
492
494
|
}, Ce = ({
|
|
493
495
|
slices: o,
|
|
494
496
|
attribFields: e
|
|
495
|
-
}) => o.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) => _e({ slice: s, attribFields: e })).filter((s) => !!s),
|
|
497
|
+
}) => o.filter((s) => s.sliceType !== "hierarchy" && s.sliceType !== "entityList").map((s) => _e({ slice: s, attribFields: e })).filter((s) => !!s), st = (o) => {
|
|
496
498
|
const { slices: e, getPanelSelection: s } = we(), { powerLicense: c, isLoading: l } = X(), d = L(() => {
|
|
497
499
|
const a = e.map((r) => ({
|
|
498
500
|
sliceType: r.sliceType,
|
|
@@ -510,36 +512,36 @@ const ve = () => {
|
|
|
510
512
|
};
|
|
511
513
|
};
|
|
512
514
|
export {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
515
|
+
rt as SLICER_DEFAULT_PANEL_HEIGHT,
|
|
516
|
+
it as SLICER_MIN_PANEL_HEIGHT,
|
|
517
|
+
vt as SLICER_PAGES_CONFIG,
|
|
518
|
+
ct as SLICER_SPLITTER_PANEL_CONFIG,
|
|
519
|
+
lt as SLICER_SPLITTER_STATE_KEY,
|
|
520
|
+
dt as SLICE_DEFAULT_ORDER,
|
|
521
|
+
at as Slicer,
|
|
522
|
+
ge as SlicerContext,
|
|
523
|
+
Ne as SlicerProvider,
|
|
524
|
+
ut as buildListFolderRowId,
|
|
525
|
+
ft as clampDraggedHeights,
|
|
524
526
|
_e as createFilterFromSlicer,
|
|
525
527
|
Ce as createFiltersFromSlicer,
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
528
|
+
St as defaultSliceOptions,
|
|
529
|
+
yt as getDefaultSliceSort,
|
|
530
|
+
ht as getSliceSortOptions,
|
|
531
|
+
pt as resolvePanelLayout,
|
|
530
532
|
pe as resolveSliceSort,
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
533
|
+
Et as sortSliceRows,
|
|
534
|
+
It as useEntityListsSlice,
|
|
535
|
+
et as useFiltersWithHierarchy,
|
|
536
|
+
mt as useHierarchyContextMenuItems,
|
|
537
|
+
Rt as useHierarchySelection,
|
|
538
|
+
kt as useOptionalSlicerContext,
|
|
539
|
+
tt as useSelectedEntityIds,
|
|
538
540
|
we as useSlicerContext,
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
541
|
+
gt as useSlicerCounts,
|
|
542
|
+
wt as useSlicerPanelHeights,
|
|
543
|
+
st as useSlicerPanelSelections,
|
|
542
544
|
ve as useSlicerRemotes,
|
|
543
545
|
Te as useSlicerRowSelection,
|
|
544
|
-
|
|
546
|
+
Pt as useSlicerSplitter
|
|
545
547
|
};
|