@ynput/ayon-frontend-shared 0.6.0 → 0.6.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 +34 -16
- package/dist/DetailsPanel.es.js +292 -298
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +32 -35
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4451 -2965
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/chunks/Actions.es.js +9 -4
- package/dist/chunks/ColumnDropIndicator.es.js +174 -328
- package/dist/chunks/ColumnDropIndicator.styled.es.js +281 -0
- package/dist/chunks/ColumnHeaderMenuUI.es.js +52 -0
- package/dist/chunks/ContextMenuContextInstance.es.js +12 -0
- package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +229 -0
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +827 -0
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +58 -53
- package/dist/chunks/EntityPickerDialog.es.js +24 -20
- package/dist/chunks/EntityTooltip.es.js +20 -13
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +1495 -1439
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -65
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2835 -4301
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +1532 -1594
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +1 -1
- package/dist/chunks/ReviewablesSelector.es.js +457 -458
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +163 -154
- package/dist/chunks/TableSettingsFallback.es.js +25 -13
- package/dist/chunks/ThumbnailSimple.es.js +150 -261
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +384 -389
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +61 -16
- package/dist/chunks/getUris.es.js +737 -712
- package/dist/chunks/searchTerms.es.js +57 -56
- package/dist/chunks/useAttributeEnums.es.js +4 -4
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useHierarchySelection.es.js +24 -0
- package/dist/chunks/useLoadModule.es.js +74 -0
- package/dist/chunks/useQueryArgumentChangeLoading.es.js +11 -0
- package/dist/chunks/versionUploadHelpers.es.js +16 -42
- package/dist/chunks/viewUpdateHelper.es.js +67 -50
- package/dist/components.es.js +1425 -999
- package/dist/context.es.js +791 -80
- package/dist/hooks.es.js +115 -120
- package/dist/index.es.js +19 -23
- package/dist/types/Actions.d.ts +7 -7
- package/dist/types/ContextMenu.d.ts +11 -8
- package/dist/types/DetailsPanel.d.ts +102 -9
- package/dist/types/EntityPickerDialog.d.ts +7 -7
- package/dist/types/Feed.d.ts +11 -8
- package/dist/types/ListTable.d.ts +7 -7
- package/dist/types/NewEntity.d.ts +16 -10
- package/dist/types/ProjectTreeTable.d.ts +22 -115
- package/dist/types/RepresentationsList.d.ts +7 -7
- package/dist/types/SimpleTable.d.ts +11 -8
- package/dist/types/Slicer.d.ts +10 -7
- package/dist/types/Views.d.ts +10 -7
- package/dist/types/api.d.ts +132 -120
- package/dist/types/components.d.ts +13 -8
- package/dist/types/context.d.ts +56 -16
- package/dist/types/hooks.d.ts +7 -7
- package/dist/types/index.d.ts +7 -7
- package/dist/types/util.d.ts +12 -7
- package/dist/util.es.js +72 -71
- package/package.json +1 -1
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- package/dist/chunks/DetailsPanelContext.es.js +0 -155
- package/dist/chunks/GlobalContext.es.js +0 -52
- package/dist/chunks/NewEntityContext.es.js +0 -1242
- package/dist/chunks/ProjectFoldersContext.es.js +0 -134
- package/dist/chunks/ProjectFoldersContextInstance.es.js +0 -7
- package/dist/chunks/VersionUploadContext.es.js +0 -232
- package/dist/chunks/ViewsContext.es.js +0 -878
- package/dist/chunks/uriUtils.es.js +0 -48
- package/dist/chunks/useColumnDragRestriction.es.js +0 -158
- package/dist/chunks/useLocalStorage.es.js +0 -355
- package/dist/chunks/useSessionStorage.es.js +0 -61
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,13 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as P } from "react/jsx-runtime";
|
|
2
|
+
import { useState as M, useCallback as u } from "react";
|
|
3
|
+
import { u as F } from "./useCreateContextMenu.es.js";
|
|
4
|
+
import { T as S, P as _ } from "./DeleteEntitiesContextInstance.es.js";
|
|
3
5
|
import "./searchTerms.es.js";
|
|
4
|
-
import { c2 as
|
|
6
|
+
import { c2 as w, b$ as B, dy as G } from "./getUris.es.js";
|
|
5
7
|
import "primereact/confirmdialog";
|
|
6
8
|
import "lodash";
|
|
7
9
|
import "react-toastify";
|
|
8
|
-
import { g as
|
|
10
|
+
import { g as m } from "./getEntityTypeIcon.es.js";
|
|
9
11
|
import "uuid";
|
|
10
|
-
const
|
|
12
|
+
const V = ({
|
|
13
|
+
children: t,
|
|
14
|
+
thumbnailInputRef: n,
|
|
15
|
+
versionsInputRef: e,
|
|
16
|
+
canUploadVersion: r = !1
|
|
17
|
+
}) => {
|
|
18
|
+
const [, a] = M(!1), [T] = F(), f = () => a(!1), d = () => {
|
|
19
|
+
n?.current && (n.current.click(), a(!0));
|
|
20
|
+
}, i = () => {
|
|
21
|
+
e?.current && (e.current.click(), a(!0));
|
|
22
|
+
}, l = (y) => {
|
|
23
|
+
const s = [
|
|
24
|
+
{
|
|
25
|
+
label: "Upload thumbnail",
|
|
26
|
+
icon: "add_photo_alternate",
|
|
27
|
+
command: d
|
|
28
|
+
},
|
|
29
|
+
...r ? [
|
|
30
|
+
{
|
|
31
|
+
label: "Upload version",
|
|
32
|
+
icon: "upload",
|
|
33
|
+
command: i
|
|
34
|
+
}
|
|
35
|
+
] : []
|
|
36
|
+
];
|
|
37
|
+
T(y, s);
|
|
38
|
+
};
|
|
39
|
+
return /* @__PURE__ */ P(
|
|
40
|
+
S.Provider,
|
|
41
|
+
{
|
|
42
|
+
value: {
|
|
43
|
+
resetFileUploadState: f,
|
|
44
|
+
triggerThumbnailUpload: d,
|
|
45
|
+
triggerVersionUpload: i,
|
|
46
|
+
canUploadVersion: r,
|
|
47
|
+
onContextMenu: l
|
|
48
|
+
},
|
|
49
|
+
children: t
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}, Q = {
|
|
11
53
|
name: "",
|
|
12
54
|
code: "",
|
|
13
55
|
productTypes: [],
|
|
@@ -25,97 +67,91 @@ const L = {
|
|
|
25
67
|
linkTypes: [],
|
|
26
68
|
ownAttrib: []
|
|
27
69
|
};
|
|
28
|
-
function
|
|
70
|
+
function j(t) {
|
|
29
71
|
if (!t)
|
|
30
72
|
return { productTypes: [], productBaseTypes: [] };
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
|
|
73
|
+
const n = t.productTypes || [], e = /* @__PURE__ */ new Map();
|
|
74
|
+
return n.forEach((r) => {
|
|
75
|
+
e.has(r.baseType) || e.set(r.baseType, {
|
|
34
76
|
name: r.baseType,
|
|
35
77
|
icon: r.icon,
|
|
36
78
|
color: r.color
|
|
37
79
|
});
|
|
38
80
|
}), {
|
|
39
|
-
productTypes:
|
|
40
|
-
productBaseTypes: Array.from(
|
|
81
|
+
productTypes: n,
|
|
82
|
+
productBaseTypes: Array.from(e.values())
|
|
41
83
|
};
|
|
42
84
|
}
|
|
43
|
-
const
|
|
85
|
+
const W = ({
|
|
44
86
|
projectName: t,
|
|
45
|
-
children:
|
|
87
|
+
children: n
|
|
46
88
|
}) => {
|
|
47
89
|
const {
|
|
48
|
-
data:
|
|
90
|
+
data: e,
|
|
49
91
|
isLoading: r,
|
|
50
|
-
isFetching:
|
|
51
|
-
isSuccess:
|
|
52
|
-
isUninitialized:
|
|
53
|
-
error:
|
|
54
|
-
refetch:
|
|
55
|
-
} =
|
|
92
|
+
isFetching: a,
|
|
93
|
+
isSuccess: T,
|
|
94
|
+
isUninitialized: f,
|
|
95
|
+
error: d,
|
|
96
|
+
refetch: i
|
|
97
|
+
} = w({ projectName: t }, { skip: !t }), { data: l = {}, refetch: y } = B(
|
|
56
98
|
{ projectName: t },
|
|
57
99
|
{ skip: !t }
|
|
58
|
-
), s =
|
|
100
|
+
), s = l.product_base_types?.default, { data: g } = G(
|
|
59
101
|
{ projectName: t },
|
|
60
102
|
{
|
|
61
103
|
skip: !t
|
|
62
104
|
}
|
|
63
|
-
), { productTypes:
|
|
64
|
-
(c) =>
|
|
65
|
-
[
|
|
66
|
-
),
|
|
67
|
-
(c) =>
|
|
68
|
-
[
|
|
69
|
-
),
|
|
105
|
+
), { productTypes: p, productBaseTypes: b } = j(g), h = u(
|
|
106
|
+
(c) => e?.folderTypes?.find((o) => o.name === c),
|
|
107
|
+
[e]
|
|
108
|
+
), k = u(
|
|
109
|
+
(c) => e?.taskTypes?.find((o) => o.name === c),
|
|
110
|
+
[e]
|
|
111
|
+
), v = u(
|
|
70
112
|
(c) => {
|
|
71
|
-
const
|
|
113
|
+
const o = p.find((C) => C.name === c);
|
|
72
114
|
return {
|
|
73
|
-
icon:
|
|
74
|
-
color:
|
|
115
|
+
icon: o?.icon || s?.icon || m("product"),
|
|
116
|
+
color: o?.color || s?.color
|
|
75
117
|
};
|
|
76
118
|
},
|
|
77
|
-
[
|
|
78
|
-
),
|
|
79
|
-
value:
|
|
80
|
-
label:
|
|
81
|
-
icon:
|
|
82
|
-
color:
|
|
83
|
-
})), [
|
|
84
|
-
|
|
85
|
-
}, [
|
|
119
|
+
[p, s]
|
|
120
|
+
), x = u(() => p.map((o) => ({
|
|
121
|
+
value: o.name,
|
|
122
|
+
label: o.name,
|
|
123
|
+
icon: o.icon || s?.icon || m("product"),
|
|
124
|
+
color: o.color || s?.color || ""
|
|
125
|
+
})), [p, s]), U = u(() => {
|
|
126
|
+
i(), y();
|
|
127
|
+
}, [i, y]), A = {
|
|
86
128
|
getFolderType: h,
|
|
87
|
-
getTaskType:
|
|
88
|
-
getProductType:
|
|
89
|
-
getProductTypeOptions:
|
|
90
|
-
refetch:
|
|
129
|
+
getTaskType: k,
|
|
130
|
+
getProductType: v,
|
|
131
|
+
getProductTypeOptions: x,
|
|
132
|
+
refetch: U
|
|
91
133
|
};
|
|
92
|
-
return /* @__PURE__ */
|
|
93
|
-
|
|
134
|
+
return /* @__PURE__ */ P(
|
|
135
|
+
_.Provider,
|
|
94
136
|
{
|
|
95
137
|
value: {
|
|
96
|
-
...
|
|
97
|
-
...
|
|
138
|
+
...Q,
|
|
139
|
+
...e,
|
|
98
140
|
projectName: t,
|
|
99
|
-
productTypes:
|
|
100
|
-
productBaseTypes:
|
|
101
|
-
anatomy:
|
|
102
|
-
isLoading: r ||
|
|
103
|
-
isSuccess:
|
|
104
|
-
isUninitialized:
|
|
105
|
-
error:
|
|
106
|
-
...
|
|
141
|
+
productTypes: p,
|
|
142
|
+
productBaseTypes: b,
|
|
143
|
+
anatomy: l,
|
|
144
|
+
isLoading: r || a,
|
|
145
|
+
isSuccess: T,
|
|
146
|
+
isUninitialized: f,
|
|
147
|
+
error: d,
|
|
148
|
+
...A
|
|
107
149
|
},
|
|
108
|
-
children:
|
|
150
|
+
children: n
|
|
109
151
|
}
|
|
110
152
|
);
|
|
111
|
-
}
|
|
112
|
-
const t = T(p);
|
|
113
|
-
if (t === void 0)
|
|
114
|
-
throw new Error("useProjectContext must be used within a ProjectContextProvider");
|
|
115
|
-
return t;
|
|
116
|
-
}, K = () => T(p);
|
|
153
|
+
};
|
|
117
154
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
K as u
|
|
155
|
+
W as P,
|
|
156
|
+
V as T
|
|
121
157
|
};
|
|
@@ -10,7 +10,7 @@ import { g as S, r as k } from "./replaceRoot.es.js";
|
|
|
10
10
|
import { c as z } from "./copyToClipboard.es.js";
|
|
11
11
|
import "uuid";
|
|
12
12
|
import "./searchTerms.es.js";
|
|
13
|
-
import {
|
|
13
|
+
import { u as E } from "./useCreateContextMenu.es.js";
|
|
14
14
|
import { D as F } from "./DetailsDialog.es.js";
|
|
15
15
|
import { b$ as H } from "./getUris.es.js";
|
|
16
16
|
const I = (d = []) => {
|