@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/ListTable.es.js
CHANGED
|
@@ -24,6 +24,7 @@ import "@lexical/react/LexicalBlockWithAlignableContents";
|
|
|
24
24
|
import "@lexical/react/LexicalDecoratorBlockNode";
|
|
25
25
|
import { dJ as vt, dK as Me } from "./chunks/getUris.es.js";
|
|
26
26
|
import { u as Ae } from "./chunks/TableExportContextInstance.es.js";
|
|
27
|
+
import "@ynput/ayon-addon";
|
|
27
28
|
import "@module-federation/enhanced/runtime";
|
|
28
29
|
import "@ynput/ayon-addon/host";
|
|
29
30
|
import "semver";
|
|
@@ -31,14 +32,13 @@ import { u as He } from "./chunks/useCreateContextMenu.es.js";
|
|
|
31
32
|
import "react-dom";
|
|
32
33
|
import "react-redux";
|
|
33
34
|
import "react-router-dom";
|
|
34
|
-
import "@ynput/ayon-addon";
|
|
35
35
|
import { useVirtualizer as Oe } from "@tanstack/react-virtual";
|
|
36
36
|
import { useSensors as $e, useSensor as Ct, PointerSensor as Ne, KeyboardSensor as je, DndContext as xt, closestCenter as Dt, DragOverlay as Et, defaultDropAnimationSideEffects as Rt } from "@dnd-kit/core";
|
|
37
37
|
import { restrictToHorizontalAxis as Ke, restrictToVerticalAxis as We } from "@dnd-kit/modifiers";
|
|
38
38
|
import { useSortable as Ht, sortableKeyboardCoordinates as Pe, arrayMove as Fe, SortableContext as St, horizontalListSortingStrategy as Be, verticalListSortingStrategy as Ye } from "@dnd-kit/sortable";
|
|
39
39
|
import { CSS as Ot } from "@dnd-kit/utilities";
|
|
40
40
|
import v from "styled-components";
|
|
41
|
-
import { H as Ue } from "./chunks/
|
|
41
|
+
import { H as Ue } from "./chunks/addonColumnTags.es.js";
|
|
42
42
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
43
43
|
import "./chunks/Menu.es.js";
|
|
44
44
|
import "./chunks/EmptyPlaceholder.es.js";
|
package/dist/NewEntity.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as f, Fragment as ue } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as $, forwardRef as Ue, useRef as ce, useEffect as Le, useLayoutEffect as Ve, useContext as Pe, useId as Je, useMemo as ge } from "react";
|
|
3
3
|
import { isEmpty as Ce } from "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { toast as me } from "react-toastify";
|
|
@@ -10,8 +10,8 @@ import "axios";
|
|
|
10
10
|
import { dw as Ye } from "./chunks/getUris.es.js";
|
|
11
11
|
import "@module-federation/enhanced/runtime";
|
|
12
12
|
import "@ynput/ayon-addon/host";
|
|
13
|
-
import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as je, Spacer as
|
|
14
|
-
import {
|
|
13
|
+
import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as je, Spacer as ze, theme as qe, Dialog as et, ShortcutTag as tt, Toolbar as nt, SaveButton as at } from "@ynput/ayon-react-components";
|
|
14
|
+
import { y as Ne, z as $e, M as rt } from "./chunks/TableExportContextInstance.es.js";
|
|
15
15
|
import "semver";
|
|
16
16
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
17
17
|
import Ae from "clsx";
|
|
@@ -25,6 +25,7 @@ import E from "styled-components";
|
|
|
25
25
|
import { a as ut, K as mt } from "./chunks/platform.es.js";
|
|
26
26
|
import "./chunks/PlayableIcon.es.js";
|
|
27
27
|
import "date-fns";
|
|
28
|
+
import "@ynput/ayon-addon";
|
|
28
29
|
import "lexical";
|
|
29
30
|
import "@lexical/markdown";
|
|
30
31
|
import "match-sorter";
|
|
@@ -38,7 +39,6 @@ import "@lexical/react/LexicalDecoratorBlockNode";
|
|
|
38
39
|
import { u as ht } from "./chunks/useHierarchySelection.es.js";
|
|
39
40
|
import { n as te } from "./chunks/entityDefinitions.es.js";
|
|
40
41
|
import "@tanstack/react-table";
|
|
41
|
-
import "@ynput/ayon-addon";
|
|
42
42
|
const Ee = (i, m, u) => {
|
|
43
43
|
const c = i.match(/\d+$/), w = m.match(/\d+$/), h = c ? parseInt(c[0], 10) : NaN, D = (w ? parseInt(w[0], 10) : NaN) - h;
|
|
44
44
|
if (isNaN(D)) return [];
|
|
@@ -57,7 +57,7 @@ const Ee = (i, m, u) => {
|
|
|
57
57
|
);
|
|
58
58
|
return c ? c.name : "";
|
|
59
59
|
}, kn = ({ children: i }) => {
|
|
60
|
-
const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } =
|
|
60
|
+
const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } = $e(), { attrib: n = {}, statuses: D } = u || {}, { anatomy: r } = Ne(), { entity_naming: q = { capitalization: "lower", separator: "_" } } = r, { rowSelection: v, sliceType: O } = st(), j = D?.filter((a) => a.scope?.includes("task"))?.[0]?.name || D?.[0]?.name || "none", W = D?.filter((a) => a.scope?.includes("folder"))?.[0]?.name || D?.[0]?.name || "none", [F, R] = $(null), [p, K] = $(null), L = { label: "", subType: "", name: "" }, [b, ne] = $(L), [H, J] = $({
|
|
61
61
|
active: !1,
|
|
62
62
|
increment: "",
|
|
63
63
|
length: 10,
|
|
@@ -494,7 +494,7 @@ const Ct = ({
|
|
|
494
494
|
const { base: F, increment: R, length: p, type: K, id: L, prefix: b, prefixDepth: ne, parentBases: H } = W, J = W.entityType, X = !n && D || q;
|
|
495
495
|
let ae = [];
|
|
496
496
|
F && R && p && (ae = Ee(F, R, p));
|
|
497
|
-
const [de, U] =
|
|
497
|
+
const [de, U] = $(ae), Y = ce(null), ee = ce(null), B = (s) => {
|
|
498
498
|
s?.preventDefault && s?.preventDefault();
|
|
499
499
|
let { value: S, id: _ } = s.target;
|
|
500
500
|
_ === "prefixDepth" && (S = parseInt(String(S), 10));
|
|
@@ -534,7 +534,7 @@ const Ct = ({
|
|
|
534
534
|
} : () => {
|
|
535
535
|
ee.current?.focus();
|
|
536
536
|
}, 50);
|
|
537
|
-
}, [a, d] =
|
|
537
|
+
}, [a, d] = $(!0);
|
|
538
538
|
Le(
|
|
539
539
|
() => {
|
|
540
540
|
const s = setTimeout(() => {
|
|
@@ -545,7 +545,7 @@ const Ct = ({
|
|
|
545
545
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
546
546
|
[]
|
|
547
547
|
);
|
|
548
|
-
const y = St(de, 5, b ? r : void 0), k = ce(null), [o, g] =
|
|
548
|
+
const y = St(de, 5, b ? r : void 0), k = ce(null), [o, g] = $(0);
|
|
549
549
|
return Ve(() => {
|
|
550
550
|
k.current && g(k.current.offsetWidth);
|
|
551
551
|
}, [k.current, b]), J === "task" ? /* @__PURE__ */ t(
|
|
@@ -722,7 +722,7 @@ const Ct = ({
|
|
|
722
722
|
}
|
|
723
723
|
)
|
|
724
724
|
] }),
|
|
725
|
-
/* @__PURE__ */ t(
|
|
725
|
+
/* @__PURE__ */ t(ze, {}),
|
|
726
726
|
n && /* @__PURE__ */ t(
|
|
727
727
|
fe,
|
|
728
728
|
{
|
|
@@ -840,7 +840,7 @@ const Ct = ({
|
|
|
840
840
|
labelRef: w,
|
|
841
841
|
nameInfo: h = ""
|
|
842
842
|
}) => {
|
|
843
|
-
const n = Je(), [D, r] =
|
|
843
|
+
const n = Je(), [D, r] = $(!1), [q, v] = $(void 0), O = ce(null), j = () => {
|
|
844
844
|
r(!0), u(!0), v(m.name), setTimeout(() => {
|
|
845
845
|
O.current && (O.current.focus(), O.current.select());
|
|
846
846
|
}, 0);
|
|
@@ -971,17 +971,17 @@ const Ct = ({
|
|
|
971
971
|
onOpenNew: W,
|
|
972
972
|
config: F,
|
|
973
973
|
parentFolderIds: R
|
|
974
|
-
} = ft(), [p, K] =
|
|
974
|
+
} = ft(), [p, K] = $(!1), { selectedCells: L } = it() || {}, b = ht(), { getFolderById: ne } = $e(), H = ct(), J = H?.getEntityById, X = H?.showHierarchy ?? !0, ae = ge(() => {
|
|
975
975
|
if (R !== null) return R;
|
|
976
976
|
const e = L ? Array.from(L).map((T) => dt(T)) : [], x = Array.from(
|
|
977
977
|
new Set(
|
|
978
978
|
e.filter((T) => T && T.colId !== Me).map((T) => T?.rowId).filter(Boolean)
|
|
979
979
|
)
|
|
980
|
-
),
|
|
980
|
+
), z = Array.from(
|
|
981
981
|
new Set(
|
|
982
982
|
e.filter((T) => T?.colId === Me).map((T) => T?.rowId).filter(Boolean)
|
|
983
983
|
)
|
|
984
|
-
), le = x.length > 0 ? x :
|
|
984
|
+
), le = x.length > 0 ? x : z;
|
|
985
985
|
if (le.length > 0) {
|
|
986
986
|
const T = le.map((G) => J?.(G)), ie = T.filter(
|
|
987
987
|
(G) => G?.entityType === "folder"
|
|
@@ -1002,27 +1002,27 @@ const Ct = ({
|
|
|
1002
1002
|
return { value: e, label: x?.label || x?.name || e };
|
|
1003
1003
|
}),
|
|
1004
1004
|
[U, J, ne]
|
|
1005
|
-
), [B, a] =
|
|
1005
|
+
), [B, a] = $(null);
|
|
1006
1006
|
let d = B !== null ? B : U;
|
|
1007
1007
|
d = d.filter((e) => U.includes(e)), d.length === 0 && U.length > 0 && (d = U);
|
|
1008
|
-
const y = d.map((e) => ee.find((x) => x.value === e)?.label || "").filter(Boolean), k = y[0] || "", o = Ce(U), [g, s] =
|
|
1008
|
+
const y = d.map((e) => ee.find((x) => x.value === e)?.label || "").filter(Boolean), k = y[0] || "", o = Ce(U), [g, s] = $(!1), [S, _] = $(!1), C = { label: "", subType: "", name: "" }, I = () => {
|
|
1009
1009
|
let e = "Add New ";
|
|
1010
1010
|
return o && n === "folder" && (e += "Root "), e += n ? te[n].label : "", o || (y.length > 2 ? e += " - " + y.slice(0, 2).join(", ") + ` +${y.length - 2} more` : e += " - " + y.join(", ")), e;
|
|
1011
1011
|
}, P = (n === "folder" ? h?.folderTypes : h?.taskTypes) || [], l = (e, x) => {
|
|
1012
1012
|
if (!x) return;
|
|
1013
|
-
let
|
|
1014
|
-
if (
|
|
1013
|
+
let z = { ...r };
|
|
1014
|
+
if (z[x] = e, e && x === "subType") {
|
|
1015
1015
|
const le = P.find((ie) => ie.name === r.subType), T = P.find((ie) => ie.name === e);
|
|
1016
1016
|
if (T && r.label === le?.name) {
|
|
1017
|
-
|
|
1017
|
+
z.label = T.name;
|
|
1018
1018
|
const ke = be(r.label, F);
|
|
1019
|
-
r.name === ke && (
|
|
1019
|
+
r.name === ke && (z.name = be(z.label, F));
|
|
1020
1020
|
}
|
|
1021
1021
|
setTimeout(() => {
|
|
1022
1022
|
M.current?.focus();
|
|
1023
1023
|
}, 100);
|
|
1024
|
-
} else x === "label" ? (
|
|
1025
|
-
q(
|
|
1024
|
+
} else x === "label" ? (z.label = e, S || (z.name = be(e, F))) : x === "name" && (_(!0), z.name = e);
|
|
1025
|
+
q(z);
|
|
1026
1026
|
}, Z = (e) => {
|
|
1027
1027
|
q({ ...r, label: e.base, subType: e.type }), O({
|
|
1028
1028
|
...v,
|
|
@@ -1033,14 +1033,14 @@ const Ct = ({
|
|
|
1033
1033
|
});
|
|
1034
1034
|
}, A = ce(null), M = ce(null), N = () => {
|
|
1035
1035
|
D(null), q(C), O((e) => ({ ...e, active: !1 })), _(!1), a(null);
|
|
1036
|
-
}, V = () => setTimeout(() => A.current?.open(), 180), [oe, ye] =
|
|
1036
|
+
}, V = () => setTimeout(() => A.current?.open(), 180), [oe, ye] = $(!1), se = async (e) => {
|
|
1037
1037
|
const x = Ze(r.label);
|
|
1038
1038
|
if (!x.valid) {
|
|
1039
1039
|
me.error(x.error || "Invalid label");
|
|
1040
1040
|
return;
|
|
1041
1041
|
}
|
|
1042
|
-
const { valid:
|
|
1043
|
-
if (
|
|
1042
|
+
const { valid: z, error: le } = Ge(r.name);
|
|
1043
|
+
if (!z) {
|
|
1044
1044
|
me.error(le || "Invalid name");
|
|
1045
1045
|
return;
|
|
1046
1046
|
}
|
|
@@ -1087,7 +1087,7 @@ const Ct = ({
|
|
|
1087
1087
|
);
|
|
1088
1088
|
Tt({ options: ve, onOpenNew: W, enabled: w });
|
|
1089
1089
|
const We = (e) => {
|
|
1090
|
-
const x = ve.find((
|
|
1090
|
+
const x = ve.find((z) => z.value === e);
|
|
1091
1091
|
x && !x.disabled && W(x.type, { isSequence: x.isSequence });
|
|
1092
1092
|
}, Ie = n === "task" && Ce(d), He = !r.label || !r.subType || Ie;
|
|
1093
1093
|
return /* @__PURE__ */ f(ue, { children: [
|
|
@@ -1144,7 +1144,7 @@ const Ct = ({
|
|
|
1144
1144
|
}
|
|
1145
1145
|
)
|
|
1146
1146
|
] }),
|
|
1147
|
-
/* @__PURE__ */ t(
|
|
1147
|
+
/* @__PURE__ */ t(ze, {}),
|
|
1148
1148
|
/* @__PURE__ */ t("span", { children: "Create more" }),
|
|
1149
1149
|
/* @__PURE__ */ t(
|
|
1150
1150
|
Te,
|