@ynput/ayon-frontend-shared 0.6.9 → 0.7.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 +44 -27
- package/dist/DetailsPanel.es.js +767 -740
- package/dist/ListTable.es.js +430 -430
- package/dist/NewEntity.es.js +43 -42
- package/dist/ProjectTreeTable.es.js +3496 -3342
- package/dist/Slicer.es.js +301 -276
- package/dist/Views.es.js +537 -521
- package/dist/api.es.js +429 -412
- package/dist/chunks/Actions.es.js +19 -18
- package/dist/chunks/ColumnDropIndicator.es.js +19 -18
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
- package/dist/chunks/DetailsDialog.es.js +26 -24
- package/dist/chunks/EmptyPlaceholder.es.js +3 -3
- package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
- package/dist/chunks/EntityPath.es.js +72 -71
- package/dist/chunks/EntityPickerDialog.es.js +88 -83
- package/dist/chunks/EntityTooltip.es.js +11 -10
- package/dist/chunks/EntityUpdatesContext.es.js +11 -11
- package/dist/chunks/Feed.es.js +864 -859
- package/dist/chunks/FilterErrorActions.es.js +4 -3
- package/dist/chunks/Menu.es.js +633 -289
- package/dist/chunks/MenuContext.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +2751 -2217
- package/dist/chunks/PlayableIcon.es.js +79 -78
- package/dist/chunks/ProjectContext.es.js +7 -7
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +625 -609
- package/dist/chunks/SimpleForm.es.js +1 -1
- package/dist/chunks/SimpleTable.es.js +386 -363
- package/dist/chunks/Slicer.es.js +954 -821
- package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
- package/dist/chunks/TableSettingsFallback.es.js +4 -3
- package/dist/chunks/ThumbnailSimple.es.js +96 -95
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +850 -797
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getEntityTypeIcon.es.js +5 -4
- package/dist/chunks/getUris.es.js +3704 -3504
- package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
- package/dist/chunks/searchTerms.es.js +649 -563
- package/dist/chunks/sortLists.es.js +22 -0
- package/dist/chunks/useAttributeEnums.es.js +21 -21
- package/dist/chunks/useHierarchySelection.es.js +6 -5
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +19 -18
- package/dist/components.es.js +628 -593
- package/dist/context.es.js +525 -499
- package/dist/hooks.es.js +54 -53
- package/dist/index.es.js +4 -4
- package/dist/types/ContextMenu.d.ts +4 -1
- package/dist/types/Feed.d.ts +1 -1
- package/dist/types/ListTable.d.ts +1 -1
- package/dist/types/ProjectTreeTable.d.ts +144 -14
- package/dist/types/SimpleTable.d.ts +2 -1
- package/dist/types/Slicer.d.ts +32 -5
- package/dist/types/Views.d.ts +6 -0
- package/dist/types/api.d.ts +2252 -510
- package/dist/types/components.d.ts +52 -4
- package/dist/types/context.d.ts +96 -2
- package/dist/types/hooks.d.ts +36 -1
- package/dist/types/util.d.ts +54 -0
- package/dist/util.es.js +129 -119
- package/package.json +4 -4
- package/dist/chunks/MenuItem.es.js +0 -420
package/dist/NewEntity.es.js
CHANGED
|
@@ -3,20 +3,21 @@ import { useState as z, forwardRef as Ue, useRef as ce, useEffect as Le, useLayo
|
|
|
3
3
|
import { isEmpty as Ce } from "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { toast as me } from "react-toastify";
|
|
6
|
-
import { g as Xe, R as
|
|
6
|
+
import { g as Xe, R as Me } from "./chunks/realtimeUpdatesUtils.es.js";
|
|
7
7
|
import { p as be, c as Ze, a as Ge } from "./chunks/iconUtils.es.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { bt as Qe } from "./chunks/searchTerms.es.js";
|
|
9
|
+
import { dw as Ye } from "./chunks/getUris.es.js";
|
|
10
10
|
import "@module-federation/enhanced/runtime";
|
|
11
|
-
import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as
|
|
12
|
-
import { x as Ne, y as ze, M as rt } from "./chunks/
|
|
11
|
+
import { Dropdown as De, Icon as Q, InputText as he, Button as fe, InputSwitch as Te, InputNumber as je, Spacer as $e, theme as qe, Dialog as et, ShortcutTag as tt, Toolbar as nt, SaveButton as at } from "@ynput/ayon-react-components";
|
|
12
|
+
import { x as Ne, y as ze, M as rt } from "./chunks/TableExportContextInstance.es.js";
|
|
13
13
|
import "semver";
|
|
14
14
|
import "./chunks/ContextMenuContextInstance.es.js";
|
|
15
15
|
import Ae from "clsx";
|
|
16
16
|
import "uuid";
|
|
17
17
|
import "react-dom";
|
|
18
18
|
import "react-redux";
|
|
19
|
-
import
|
|
19
|
+
import "react-router-dom";
|
|
20
|
+
import { g as ot, d as st, C as lt, h as it, i as ct, p as dt } from "./chunks/MetaWidget.es.js";
|
|
20
21
|
import { N as pt, u as ft } from "./chunks/NewEntityContextInstance.es.js";
|
|
21
22
|
import E from "styled-components";
|
|
22
23
|
import { a as ut, K as mt } from "./chunks/platform.es.js";
|
|
@@ -42,7 +43,7 @@ const Ee = (i, m, u) => {
|
|
|
42
43
|
for (let q = 0; q < u; q++) {
|
|
43
44
|
const v = h + q * D, O = i.match(/\d+$/);
|
|
44
45
|
if (!O) return [];
|
|
45
|
-
const
|
|
46
|
+
const j = String(v).padStart(O[0].length, "0"), W = i.replace(/\d+$/, j);
|
|
46
47
|
r.push(W);
|
|
47
48
|
}
|
|
48
49
|
return r;
|
|
@@ -52,8 +53,8 @@ const Ee = (i, m, u) => {
|
|
|
52
53
|
(w) => w.name === m
|
|
53
54
|
);
|
|
54
55
|
return c ? c.name : "";
|
|
55
|
-
},
|
|
56
|
-
const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } = ze(), { attrib: n = {}, statuses: D } = u || {}, { anatomy: r } = Ne(), { entity_naming: q = { capitalization: "lower", separator: "_" } } = r, { rowSelection: v, sliceType: O } = st(),
|
|
56
|
+
}, wn = ({ children: i }) => {
|
|
57
|
+
const { projectName: m, ...u } = Ne(), { attribFields: c } = ot(), { findNonInheritedValues: w, getFolderById: h } = ze(), { 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] = z(null), [p, K] = z(null), L = { label: "", subType: "", name: "" }, [b, ne] = z(L), [H, J] = z({
|
|
57
58
|
active: !1,
|
|
58
59
|
increment: "",
|
|
59
60
|
length: 10,
|
|
@@ -122,7 +123,7 @@ const Ee = (i, m, u) => {
|
|
|
122
123
|
const o = a.filter((C) => C.entityType === "folder"), g = a.filter((C) => C.entityType === "task"), s = (C, I) => {
|
|
123
124
|
let P = [];
|
|
124
125
|
for (const l of C) {
|
|
125
|
-
const Z = I === "folder" ? l.data.parentId : l.data.folderId, A = k.get(Z) || n,
|
|
126
|
+
const Z = I === "folder" ? l.data.parentId : l.data.folderId, A = k.get(Z) || n, M = Object.keys(A).reduce((N, V) => {
|
|
126
127
|
const oe = c.find((pe) => pe.name === V);
|
|
127
128
|
if (!oe) return N;
|
|
128
129
|
const ye = oe.scope?.includes(I), se = !!oe.data.inherit;
|
|
@@ -152,7 +153,7 @@ const Ee = (i, m, u) => {
|
|
|
152
153
|
ownAttrib: [],
|
|
153
154
|
path: N,
|
|
154
155
|
tags: [],
|
|
155
|
-
attrib:
|
|
156
|
+
attrib: M,
|
|
156
157
|
links: []
|
|
157
158
|
// Add empty links object
|
|
158
159
|
}
|
|
@@ -173,7 +174,7 @@ const Ee = (i, m, u) => {
|
|
|
173
174
|
active: !0,
|
|
174
175
|
assignees: l.data.assignees || [],
|
|
175
176
|
projectName: m,
|
|
176
|
-
status: l.data.status ||
|
|
177
|
+
status: l.data.status || j,
|
|
177
178
|
folder: {
|
|
178
179
|
path: l.data.folderId ? d[l.data.folderId] : "",
|
|
179
180
|
folderType: ""
|
|
@@ -185,12 +186,12 @@ const Ee = (i, m, u) => {
|
|
|
185
186
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
186
187
|
thumbnailHash: "",
|
|
187
188
|
subtasks: [],
|
|
188
|
-
attrib:
|
|
189
|
+
attrib: M,
|
|
189
190
|
hasReviewables: !1,
|
|
190
191
|
// Add required field
|
|
191
192
|
links: [],
|
|
192
193
|
// Add empty links object
|
|
193
|
-
allAttrib: JSON.stringify(
|
|
194
|
+
allAttrib: JSON.stringify(M),
|
|
194
195
|
parents: []
|
|
195
196
|
}
|
|
196
197
|
};
|
|
@@ -313,7 +314,7 @@ const Ee = (i, m, u) => {
|
|
|
313
314
|
dataKey: "name",
|
|
314
315
|
value: i,
|
|
315
316
|
valueStyle: c,
|
|
316
|
-
onChange: (
|
|
317
|
+
onChange: (j) => u(j[0]),
|
|
317
318
|
disabled: h,
|
|
318
319
|
isChanged: D,
|
|
319
320
|
placeholder: n,
|
|
@@ -484,7 +485,7 @@ const Ct = ({
|
|
|
484
485
|
prefixDisabled: q,
|
|
485
486
|
typeSelectRef: v,
|
|
486
487
|
onLastInputKeydown: O,
|
|
487
|
-
folders:
|
|
488
|
+
folders: j,
|
|
488
489
|
...W
|
|
489
490
|
}) => {
|
|
490
491
|
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;
|
|
@@ -497,14 +498,14 @@ const Ct = ({
|
|
|
497
498
|
const C = { [_]: S }, I = { ...W, ...C };
|
|
498
499
|
if (_ === "type") {
|
|
499
500
|
let P = !1;
|
|
500
|
-
const l =
|
|
501
|
-
for (const
|
|
501
|
+
const l = j.find((M) => M.name === S);
|
|
502
|
+
for (const M of j) {
|
|
502
503
|
if (I.base === "") {
|
|
503
504
|
P = !0;
|
|
504
505
|
break;
|
|
505
506
|
}
|
|
506
|
-
for (const N in
|
|
507
|
-
if (typeof
|
|
507
|
+
for (const N in M)
|
|
508
|
+
if (typeof M[N] == "string" && I.base?.toLowerCase().includes(M[N].toLowerCase())) {
|
|
508
509
|
P = !0;
|
|
509
510
|
break;
|
|
510
511
|
}
|
|
@@ -514,7 +515,7 @@ const Ct = ({
|
|
|
514
515
|
I.base = Z + A.base, I.increment = Z + A.increment, I.length = A.length;
|
|
515
516
|
}
|
|
516
517
|
if (_ === "base") {
|
|
517
|
-
const P = Re(I.type), l = String(S), Z = l.replace(/[^a-zA-Z]/g, ""), A = l.replace(/[^0-9]/g, ""),
|
|
518
|
+
const P = Re(I.type), l = String(S), Z = l.replace(/[^a-zA-Z]/g, ""), A = l.replace(/[^0-9]/g, ""), M = parseInt(A, 10), N = A.length, V = Z + (M + P.difference).toString().padStart(N, "0");
|
|
518
519
|
I.increment = V.replace("NaN", "");
|
|
519
520
|
}
|
|
520
521
|
if (i(
|
|
@@ -558,7 +559,7 @@ const Ct = ({
|
|
|
558
559
|
{
|
|
559
560
|
value: [K],
|
|
560
561
|
onChange: (s) => B({ target: { value: s, id: "type" } }),
|
|
561
|
-
options:
|
|
562
|
+
options: j,
|
|
562
563
|
style: { width: 160 },
|
|
563
564
|
align: "right"
|
|
564
565
|
}
|
|
@@ -633,7 +634,7 @@ const Ct = ({
|
|
|
633
634
|
{
|
|
634
635
|
value: [K],
|
|
635
636
|
onChange: (s) => B({ target: { value: s, id: "type" } }),
|
|
636
|
-
options:
|
|
637
|
+
options: j,
|
|
637
638
|
style: { width: 160 },
|
|
638
639
|
align: "right",
|
|
639
640
|
ref: v
|
|
@@ -662,7 +663,7 @@ const Ct = ({
|
|
|
662
663
|
n && b && /* @__PURE__ */ f(re, { children: [
|
|
663
664
|
/* @__PURE__ */ t("label", { children: "Depth" }),
|
|
664
665
|
/* @__PURE__ */ t(
|
|
665
|
-
|
|
666
|
+
je,
|
|
666
667
|
{
|
|
667
668
|
value: ne,
|
|
668
669
|
id: "prefixDepth",
|
|
@@ -706,7 +707,7 @@ const Ct = ({
|
|
|
706
707
|
/* @__PURE__ */ f(re, { children: [
|
|
707
708
|
/* @__PURE__ */ t("label", { children: "Count" }),
|
|
708
709
|
/* @__PURE__ */ t(
|
|
709
|
-
|
|
710
|
+
je,
|
|
710
711
|
{
|
|
711
712
|
value: p,
|
|
712
713
|
id: "length",
|
|
@@ -836,7 +837,7 @@ const Ct = ({
|
|
|
836
837
|
labelRef: w,
|
|
837
838
|
nameInfo: h = ""
|
|
838
839
|
}) => {
|
|
839
|
-
const n = Je(), [D, r] = z(!1), [q, v] = z(void 0), O = ce(null),
|
|
840
|
+
const n = Je(), [D, r] = z(!1), [q, v] = z(void 0), O = ce(null), j = () => {
|
|
840
841
|
r(!0), u(!0), v(m.name), setTimeout(() => {
|
|
841
842
|
O.current && (O.current.focus(), O.current.select());
|
|
842
843
|
}, 0);
|
|
@@ -845,14 +846,14 @@ const Ct = ({
|
|
|
845
846
|
(!K || !O.current?.contains(K)) && (r(!1), u(!1), v(void 0));
|
|
846
847
|
}, F = (p) => {
|
|
847
848
|
if (p.key === "ArrowDown" && !p.altKey || p.key === "Tab") {
|
|
848
|
-
p.preventDefault(),
|
|
849
|
+
p.preventDefault(), j();
|
|
849
850
|
return;
|
|
850
851
|
}
|
|
851
852
|
c(p, !0);
|
|
852
853
|
}, R = (p) => {
|
|
853
854
|
if (p.key === "Enter" || p.key === "Escape" || p.key === "ArrowUp" && !p.altKey) {
|
|
854
855
|
if (p.stopPropagation(), p.key === "Enter" && !D)
|
|
855
|
-
return
|
|
856
|
+
return j();
|
|
856
857
|
p.key === "Escape" && q !== void 0 && i(q, "name"), r(!1), u(!1), v(void 0), setTimeout(() => {
|
|
857
858
|
w.current?.focus();
|
|
858
859
|
const K = m.label.length || 0;
|
|
@@ -888,7 +889,7 @@ const Ct = ({
|
|
|
888
889
|
onBlur: W,
|
|
889
890
|
style: { flex: 1 }
|
|
890
891
|
}
|
|
891
|
-
) : /* @__PURE__ */ f(Et, { onClick:
|
|
892
|
+
) : /* @__PURE__ */ f(Et, { onClick: j, tabIndex: 0, children: [
|
|
892
893
|
m.name,
|
|
893
894
|
" ",
|
|
894
895
|
/* @__PURE__ */ t(Q, { icon: "edit" })
|
|
@@ -933,7 +934,7 @@ const Ct = ({
|
|
|
933
934
|
align-items: center;
|
|
934
935
|
min-height: 32px;
|
|
935
936
|
color: var(--md-sys-color-outline);
|
|
936
|
-
`,
|
|
937
|
+
`, Mt = E.span`
|
|
937
938
|
display: flex;
|
|
938
939
|
align-items: center;
|
|
939
940
|
gap: var(--base-gap-small);
|
|
@@ -949,7 +950,7 @@ const Ct = ({
|
|
|
949
950
|
&.disabled {
|
|
950
951
|
opacity: 0.5;
|
|
951
952
|
}
|
|
952
|
-
`,
|
|
953
|
+
`, vn = ({
|
|
953
954
|
disabled: i,
|
|
954
955
|
onNewEntities: m,
|
|
955
956
|
showButton: u = !0,
|
|
@@ -963,7 +964,7 @@ const Ct = ({
|
|
|
963
964
|
setEntityForm: q,
|
|
964
965
|
sequenceForm: v,
|
|
965
966
|
setSequenceForm: O,
|
|
966
|
-
onCreateNew:
|
|
967
|
+
onCreateNew: j,
|
|
967
968
|
onOpenNew: W,
|
|
968
969
|
config: F,
|
|
969
970
|
parentFolderIds: R
|
|
@@ -971,11 +972,11 @@ const Ct = ({
|
|
|
971
972
|
if (R !== null) return R;
|
|
972
973
|
const e = L ? Array.from(L).map((T) => dt(T)) : [], x = Array.from(
|
|
973
974
|
new Set(
|
|
974
|
-
e.filter((T) => T && T.colId !==
|
|
975
|
+
e.filter((T) => T && T.colId !== Me).map((T) => T?.rowId).filter(Boolean)
|
|
975
976
|
)
|
|
976
977
|
), $ = Array.from(
|
|
977
978
|
new Set(
|
|
978
|
-
e.filter((T) => T?.colId ===
|
|
979
|
+
e.filter((T) => T?.colId === Me).map((T) => T?.rowId).filter(Boolean)
|
|
979
980
|
)
|
|
980
981
|
), le = x.length > 0 ? x : $;
|
|
981
982
|
if (le.length > 0) {
|
|
@@ -1015,7 +1016,7 @@ const Ct = ({
|
|
|
1015
1016
|
r.name === ke && ($.name = be($.label, F));
|
|
1016
1017
|
}
|
|
1017
1018
|
setTimeout(() => {
|
|
1018
|
-
|
|
1019
|
+
M.current?.focus();
|
|
1019
1020
|
}, 100);
|
|
1020
1021
|
} else x === "label" ? ($.label = e, S || ($.name = be(e, F))) : x === "name" && (_(!0), $.name = e);
|
|
1021
1022
|
q($);
|
|
@@ -1027,7 +1028,7 @@ const Ct = ({
|
|
|
1027
1028
|
prefix: e.prefix,
|
|
1028
1029
|
prefixDepth: e.prefixDepth
|
|
1029
1030
|
});
|
|
1030
|
-
}, A = ce(null),
|
|
1031
|
+
}, A = ce(null), M = ce(null), N = () => {
|
|
1031
1032
|
D(null), q(C), O((e) => ({ ...e, active: !1 })), _(!1), a(null);
|
|
1032
1033
|
}, V = () => setTimeout(() => A.current?.open(), 180), [oe, ye] = z(!1), se = async (e) => {
|
|
1033
1034
|
const x = Ze(r.label);
|
|
@@ -1042,8 +1043,8 @@ const Ct = ({
|
|
|
1042
1043
|
}
|
|
1043
1044
|
ye(!0);
|
|
1044
1045
|
try {
|
|
1045
|
-
const T = await
|
|
1046
|
-
m?.(T, e, d), e ? (
|
|
1046
|
+
const T = await j(d);
|
|
1047
|
+
m?.(T, e, d), e ? (M.current && (M.current.focus(), M.current.select()), _(!1)) : N();
|
|
1047
1048
|
} catch {
|
|
1048
1049
|
} finally {
|
|
1049
1050
|
ye(!1);
|
|
@@ -1098,7 +1099,7 @@ const Ct = ({
|
|
|
1098
1099
|
/* @__PURE__ */ t("span", { children: "Create" })
|
|
1099
1100
|
] }),
|
|
1100
1101
|
itemTemplate: (e) => /* @__PURE__ */ f(
|
|
1101
|
-
|
|
1102
|
+
Mt,
|
|
1102
1103
|
{
|
|
1103
1104
|
className: e.disabled ? "disabled" : void 0,
|
|
1104
1105
|
"data-tooltip": e.disabled ? e.disabledMessage : void 0,
|
|
@@ -1231,7 +1232,7 @@ const Ct = ({
|
|
|
1231
1232
|
{
|
|
1232
1233
|
handleChange: l,
|
|
1233
1234
|
entityForm: r,
|
|
1234
|
-
labelRef:
|
|
1235
|
+
labelRef: M,
|
|
1235
1236
|
setNameFocused: s,
|
|
1236
1237
|
handleKeyDown: pe,
|
|
1237
1238
|
nameInfo: `Names are auto generated from the label using the Entity Naming setting on the project anatomy. Capitalization: ${F.capitalization}. Separator: "${F.separator}"`
|
|
@@ -1249,10 +1250,10 @@ export {
|
|
|
1249
1250
|
we as InputLabel,
|
|
1250
1251
|
Oe as InputsContainer,
|
|
1251
1252
|
Nt as NameRow,
|
|
1252
|
-
|
|
1253
|
+
vn as NewEntity,
|
|
1253
1254
|
pt as NewEntityContext,
|
|
1254
1255
|
Dt as NewEntityForm,
|
|
1255
|
-
|
|
1256
|
+
wn as NewEntityProvider,
|
|
1256
1257
|
yt as generateLabel,
|
|
1257
1258
|
te as newEntityDefinitions,
|
|
1258
1259
|
ft as useNewEntityContext
|