@ynput/ayon-frontend-shared 0.9.0 → 0.10.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/DetailsPanel.es.js +39 -39
- package/dist/ListTable.es.js +738 -651
- package/dist/NewEntity.es.js +2 -2
- package/dist/ProjectTreeTable.es.js +827 -827
- package/dist/Slicer.es.js +10 -10
- package/dist/Views.es.js +36 -34
- package/dist/chunks/ColumnDropIndicator.es.js +27 -21
- package/dist/chunks/EntityPickerDialog.es.js +19 -19
- package/dist/chunks/Feed.es.js +582 -583
- package/dist/chunks/FilmstripEntityCard.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +444 -439
- package/dist/chunks/ReviewablesSelector.es.js +1 -1
- package/dist/chunks/Slicer.es.js +32 -32
- package/dist/chunks/TableExportContextInstance.es.js +408 -469
- package/dist/chunks/Watchers.es.js +1 -1
- package/dist/chunks/getUris.es.js +1625 -1602
- package/dist/chunks/searchTerms.es.js +1 -1
- package/dist/chunks/useLocalStorage.es.js +78 -0
- package/dist/components.es.js +50 -50
- package/dist/context.es.js +348 -337
- package/dist/hooks.es.js +218 -187
- package/dist/types/Actions.d.ts +17 -16
- package/dist/types/ContextMenu.d.ts +17 -16
- package/dist/types/DetailsPanel.d.ts +17 -16
- package/dist/types/EntityPickerDialog.d.ts +17 -16
- package/dist/types/Feed.d.ts +17 -16
- package/dist/types/ListTable.d.ts +27 -17
- package/dist/types/NewEntity.d.ts +17 -16
- package/dist/types/ProjectTreeTable.d.ts +18 -16
- package/dist/types/ProjectsTable.d.ts +17 -16
- package/dist/types/RepresentationsList.d.ts +17 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +17 -16
- package/dist/types/Views.d.ts +18 -17
- package/dist/types/api.d.ts +18 -17
- package/dist/types/components.d.ts +18 -17
- package/dist/types/context.d.ts +26 -17
- package/dist/types/hooks.d.ts +20 -17
- package/dist/types/index.d.ts +17 -16
- package/dist/types/util.d.ts +17 -16
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import "@ynput/ayon-addon/host";
|
|
|
22
22
|
import { toast as xr } from "react-toastify";
|
|
23
23
|
import "uuid";
|
|
24
24
|
import "axios";
|
|
25
|
-
import { c as wo, b as wr,
|
|
25
|
+
import { c as wo, b as wr, af as et, u as tt, o as ko } from "./TableExportContextInstance.es.js";
|
|
26
26
|
import "semver";
|
|
27
27
|
import "./ContextMenuContextInstance.es.js";
|
|
28
28
|
import { Link as kr } from "react-router-dom";
|
package/dist/chunks/Slicer.es.js
CHANGED
|
@@ -2,10 +2,10 @@ import { jsx as E, jsxs as W, Fragment as Ue } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as G, useCallback as F, useMemo as N, useContext as wt, useEffect as ie, forwardRef as Et, useRef as Re, useId as Dt, useImperativeHandle as Rt, useLayoutEffect as Oe } from "react";
|
|
3
3
|
import { Splitter as kt, SplitterPanel as At } from "primereact/splitter";
|
|
4
4
|
import V from "styled-components";
|
|
5
|
-
import { i as Mt, P as _t,
|
|
5
|
+
import { i as Mt, P as _t, d as Be, U as lt } from "./MetaWidget.es.js";
|
|
6
6
|
import "@module-federation/enhanced/runtime";
|
|
7
7
|
import { menuItemsAt as Pt } from "@ynput/ayon-addon/host";
|
|
8
|
-
import { toast as
|
|
8
|
+
import { toast as Je } from "react-toastify";
|
|
9
9
|
import { InputText as Ot, Button as Nt, Icon as Ft } from "@ynput/ayon-react-components";
|
|
10
10
|
import { bs as Ze, bF as jt, bD as ct, bC as $t, bI as zt, bA as Ut } from "./searchTerms.es.js";
|
|
11
11
|
import { dx as dt, cP as Bt, b_ as Vt, bE as Ht } from "./getUris.es.js";
|
|
@@ -13,13 +13,13 @@ import "primereact/confirmdialog";
|
|
|
13
13
|
import "lodash";
|
|
14
14
|
import "uuid";
|
|
15
15
|
import "axios";
|
|
16
|
-
import { l as ut,
|
|
16
|
+
import { l as ut, n as Ve, o as Te, c as Wt, b as He, m as Gt, ab as Kt, aa as qt, u as pt, ai as Yt, X as et } from "./TableExportContextInstance.es.js";
|
|
17
17
|
import "semver";
|
|
18
18
|
import "./ContextMenuContextInstance.es.js";
|
|
19
19
|
import Q from "clsx";
|
|
20
20
|
import "react-dom";
|
|
21
21
|
import "react-router-dom";
|
|
22
|
-
import { E as Qt, u as
|
|
22
|
+
import { E as Qt, u as Xt } from "./EntityPickerDialog.es.js";
|
|
23
23
|
import "./FilmstripEntityCard.es.js";
|
|
24
24
|
import "date-fns";
|
|
25
25
|
import "lexical";
|
|
@@ -32,7 +32,7 @@ import "@lexical/selection";
|
|
|
32
32
|
import "@lexical/utils";
|
|
33
33
|
import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
34
34
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
35
|
-
import { useContributions as
|
|
35
|
+
import { useContributions as Jt, prefetchPiece as Zt, runContribution as en } from "@ynput/ayon-addon";
|
|
36
36
|
import "@tanstack/react-table";
|
|
37
37
|
import "react-redux";
|
|
38
38
|
import { b as be, H as tn, a as nn, e as sn, S as on } from "./SimpleTable.es.js";
|
|
@@ -236,7 +236,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
236
236
|
const o = r.match(/name '.*?, (.+?)' already exists/);
|
|
237
237
|
r = `Cannot move "${o ? o[1] : "this folder"}" - a folder with this name already exists in the target location`;
|
|
238
238
|
}
|
|
239
|
-
|
|
239
|
+
Je.error(r);
|
|
240
240
|
} finally {
|
|
241
241
|
s();
|
|
242
242
|
}
|
|
@@ -265,7 +265,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
265
265
|
}
|
|
266
266
|
} catch (y) {
|
|
267
267
|
let i = Ze(y) || "Failed to move entities to root";
|
|
268
|
-
|
|
268
|
+
Je.error(i);
|
|
269
269
|
} finally {
|
|
270
270
|
s();
|
|
271
271
|
}
|
|
@@ -614,7 +614,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
614
614
|
data: fe,
|
|
615
615
|
getData: K,
|
|
616
616
|
isFetching: L
|
|
617
|
-
} =
|
|
617
|
+
} = Xt({
|
|
618
618
|
projectName: i || "",
|
|
619
619
|
folderTypes: ue?.folderTypes || [],
|
|
620
620
|
includeColors: !0
|
|
@@ -625,7 +625,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
625
625
|
getData: q,
|
|
626
626
|
isLoading: ve,
|
|
627
627
|
isExpandable: ke
|
|
628
|
-
} = Un(b === "entityList"), ae = L || U || A || f && b !== "hierarchy" || ve && b === "entityList" || T || ne,
|
|
628
|
+
} = Un(b === "entityList"), ae = L || U || A || f && b !== "hierarchy" || ve && b === "entityList" || T || ne, X = {
|
|
629
629
|
hierarchy: {
|
|
630
630
|
getData: K,
|
|
631
631
|
isLoading: L,
|
|
@@ -670,20 +670,20 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
672
|
for (const w of v)
|
|
673
|
-
|
|
673
|
+
X["attrib." + w.name] = {
|
|
674
674
|
getData: () => me(w),
|
|
675
675
|
isLoading: T || !!w.enumIsLoading,
|
|
676
676
|
isExpandable: !1,
|
|
677
677
|
isAttribute: !0
|
|
678
678
|
};
|
|
679
|
-
const Ie = { data: [], isExpandable: !1 }, [
|
|
680
|
-
(w) =>
|
|
679
|
+
const Ie = { data: [], isExpandable: !1 }, [J, Z] = G(Ie), M = X[b], le = r.find(
|
|
680
|
+
(w) => X[w.value] && !t.includes(w.value)
|
|
681
681
|
)?.value;
|
|
682
682
|
ie(() => {
|
|
683
683
|
ae || M || !le || y(le, !1);
|
|
684
684
|
}, [ae, M, le]);
|
|
685
685
|
const he = (w, _) => {
|
|
686
|
-
const P =
|
|
686
|
+
const P = X[w];
|
|
687
687
|
if (!P) {
|
|
688
688
|
console.warn(`Slice type ${w} not found`);
|
|
689
689
|
return;
|
|
@@ -713,8 +713,8 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
713
713
|
})();
|
|
714
714
|
}, [b, i, ae, b === "hierarchy" ? fe : null]);
|
|
715
715
|
const ge = l?.by, ee = !!l?.desc, ce = N(
|
|
716
|
-
() => ge ? Ln(
|
|
717
|
-
[
|
|
716
|
+
() => ge ? Ln(J.data, b, { by: ge, desc: ee }) : J.data,
|
|
717
|
+
[J.data, b, ge, ee]
|
|
718
718
|
), O = N(
|
|
719
719
|
() => bt(ce, a, u, c),
|
|
720
720
|
[ce, a, u, c]
|
|
@@ -730,9 +730,9 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
730
730
|
}, [O]);
|
|
731
731
|
return {
|
|
732
732
|
sliceOptions: r,
|
|
733
|
-
table: { ...
|
|
733
|
+
table: { ...J, data: O },
|
|
734
734
|
sliceMap: B,
|
|
735
|
-
isLoading:
|
|
735
|
+
isLoading: X[b] && X[b].isLoading || C || ae,
|
|
736
736
|
sliceType: b,
|
|
737
737
|
handleSliceTypeChange: he
|
|
738
738
|
};
|
|
@@ -800,7 +800,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
800
800
|
] });
|
|
801
801
|
}, ze = (e, t) => {
|
|
802
802
|
e.toggleExpanded(t), e.subRows?.forEach((s) => ze(s, t));
|
|
803
|
-
}, ot = (e) => e.map((t) => t.id).filter(Boolean),
|
|
803
|
+
}, ot = (e) => e.map((t) => t.id).filter(Boolean), Xn = (e, t, s, a) => {
|
|
804
804
|
const { onOpenNew: u } = gn(), { projectName: c } = Te(), { setEntities: p } = Gt(), h = yn(), [l] = dt(), { deleteEntities: m } = Kt(), [g, x] = G(null), f = F(
|
|
805
805
|
(r, d) => d.map((o) => t?.get(o) || (o === r.id ? r : void 0)).filter((o) => !!o),
|
|
806
806
|
[t]
|
|
@@ -963,7 +963,7 @@ const mt = "default", De = { id: "label", label: "Name", desc: !1 }, Fe = (e) =>
|
|
|
963
963
|
onSubmitRename: y,
|
|
964
964
|
onCancelRename: () => x(null)
|
|
965
965
|
};
|
|
966
|
-
},
|
|
966
|
+
}, Jn = V(Nt)`
|
|
967
967
|
/* put above the menu so it's still clickable */
|
|
968
968
|
/* NOTE: this will need fixing as this also puts it above dialogs */
|
|
969
969
|
/* z-index: 1001; */
|
|
@@ -1066,7 +1066,7 @@ const Zn = (e, t, s) => {
|
|
|
1066
1066
|
};
|
|
1067
1067
|
return /* @__PURE__ */ W(Ue, { children: [
|
|
1068
1068
|
/* @__PURE__ */ E(
|
|
1069
|
-
|
|
1069
|
+
Jn,
|
|
1070
1070
|
{
|
|
1071
1071
|
...c,
|
|
1072
1072
|
icon: "sync",
|
|
@@ -1255,7 +1255,7 @@ const Zn = (e, t, s) => {
|
|
|
1255
1255
|
if (typeof c != "function") return S;
|
|
1256
1256
|
const R = (j) => JSON.stringify([j?.entity, j?.args]), Y = R(q);
|
|
1257
1257
|
return S.filter((j) => j === e.sliceType || R(c(j)) === Y);
|
|
1258
|
-
}, [c, q, t, e.sliceType]), { counts: ke, filled: ae, complete:
|
|
1258
|
+
}, [c, q, t, e.sliceType]), { counts: ke, filled: ae, complete: X } = Kn(
|
|
1259
1259
|
q,
|
|
1260
1260
|
e.sliceType,
|
|
1261
1261
|
ve
|
|
@@ -1264,7 +1264,7 @@ const Zn = (e, t, s) => {
|
|
|
1264
1264
|
g ? C(S, R) : d(e.id, S);
|
|
1265
1265
|
},
|
|
1266
1266
|
[g, C, d, e.id]
|
|
1267
|
-
),
|
|
1267
|
+
), J = N(
|
|
1268
1268
|
() => t.filter((S) => S.id !== e.id).map((S) => S.sliceType),
|
|
1269
1269
|
[t, e.id]
|
|
1270
1270
|
), {
|
|
@@ -1276,11 +1276,11 @@ const Zn = (e, t, s) => {
|
|
|
1276
1276
|
isLoading: ce
|
|
1277
1277
|
} = Wn({
|
|
1278
1278
|
sliceFields: s,
|
|
1279
|
-
usedSliceTypes:
|
|
1279
|
+
usedSliceTypes: J,
|
|
1280
1280
|
entityTypes: a,
|
|
1281
1281
|
counts: ke,
|
|
1282
1282
|
filled: ae,
|
|
1283
|
-
countsComplete:
|
|
1283
|
+
countsComplete: X,
|
|
1284
1284
|
sliceType: e.sliceType,
|
|
1285
1285
|
onSliceTypeChange: Ie,
|
|
1286
1286
|
sort: re(e.sliceType)
|
|
@@ -1295,12 +1295,12 @@ const Zn = (e, t, s) => {
|
|
|
1295
1295
|
return delete Y[e.id], Y;
|
|
1296
1296
|
});
|
|
1297
1297
|
}, [xe, e.id, oe]);
|
|
1298
|
-
const H =
|
|
1298
|
+
const H = Xn(
|
|
1299
1299
|
p || ne,
|
|
1300
1300
|
ee,
|
|
1301
1301
|
z,
|
|
1302
1302
|
h
|
|
1303
|
-
), { contributions: Ke } =
|
|
1303
|
+
), { contributions: Ke } = Jt("slicer.menuItem"), Ae = N(
|
|
1304
1304
|
() => Ke.filter(
|
|
1305
1305
|
(S) => !S.sliceTypes?.length || S.sliceTypes.includes(M)
|
|
1306
1306
|
),
|
|
@@ -1343,14 +1343,14 @@ const Zn = (e, t, s) => {
|
|
|
1343
1343
|
[Z, t]
|
|
1344
1344
|
), Ce = !!l && Ye.length > 0, _e = N(() => {
|
|
1345
1345
|
const S = Z.map(
|
|
1346
|
-
(R) =>
|
|
1346
|
+
(R) => J.includes(R.value) ? { ...R, disabled: !0, disabledMessage: "Already used by another panel" } : R
|
|
1347
1347
|
);
|
|
1348
1348
|
return Ce && S.push({ label: "Split slicer", value: it, icon: "splitscreen_add" }), S;
|
|
1349
|
-
}, [Z,
|
|
1349
|
+
}, [Z, J, Ce]), Pe = () => {
|
|
1350
1350
|
if (!U) return fe("slicer");
|
|
1351
1351
|
y(Ye[0]);
|
|
1352
|
-
}, { menuOpen: Tt, toggleMenuOpen: Qe } = pt(), ye = `slicer-menu-${ue}-${e.id}`.replace(/[^\w-]/g, "-"), vt = Tt === ye,
|
|
1353
|
-
...Me("dropdown",
|
|
1352
|
+
}, { menuOpen: Tt, toggleMenuOpen: Qe } = pt(), ye = `slicer-menu-${ue}-${e.id}`.replace(/[^\w-]/g, "-"), vt = Tt === ye, Xe = Object.keys(K).filter((S) => K[S]), It = [
|
|
1353
|
+
...Me("dropdown", Xe, "top"),
|
|
1354
1354
|
{
|
|
1355
1355
|
id: "search",
|
|
1356
1356
|
label: `Search ${Ge}`,
|
|
@@ -1380,7 +1380,7 @@ const Zn = (e, t, s) => {
|
|
|
1380
1380
|
sort: re(M),
|
|
1381
1381
|
onChange: (S) => pe(M, S)
|
|
1382
1382
|
}),
|
|
1383
|
-
...Me("dropdown",
|
|
1383
|
+
...Me("dropdown", Xe)
|
|
1384
1384
|
], xt = (S) => {
|
|
1385
1385
|
const R = String(S[0]);
|
|
1386
1386
|
if (R === it) {
|
|
@@ -1664,7 +1664,7 @@ export {
|
|
|
1664
1664
|
ft as i,
|
|
1665
1665
|
We as j,
|
|
1666
1666
|
kn as k,
|
|
1667
|
-
|
|
1667
|
+
Xn as l,
|
|
1668
1668
|
Kn as m,
|
|
1669
1669
|
_n as n,
|
|
1670
1670
|
oo as o,
|