@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
|
@@ -5977,7 +5977,7 @@ const Oa = PubSub, Da = (t) => !!t?.enum?.length || !!t?.enumResolver, La = (t)
|
|
|
5977
5977
|
if (!t.some((n) => n.hidden)) return t;
|
|
5978
5978
|
const a = new Set(e.map(String));
|
|
5979
5979
|
return t.filter((n) => !n.hidden || a.has(String(n.value)));
|
|
5980
|
-
}, R = ["project_name", "user"],
|
|
5980
|
+
}, Ba = (t, e = []) => t.some((a) => a.hidden) ? t.filter((a) => !a.hidden || e.includes(a.name)) : t, R = ["project_name", "user"], Ua = (t) => R.includes(t), Ha = (t) => R.filter((e) => e in (t || {})), Ka = (t, e) => {
|
|
5981
5981
|
const a = G(t), n = `${e}: ${a}`;
|
|
5982
5982
|
return K.error(n), n;
|
|
5983
5983
|
}, G = (t) => {
|
|
@@ -6001,7 +6001,7 @@ const Oa = PubSub, Da = (t) => !!t?.enum?.length || !!t?.enumResolver, La = (t)
|
|
|
6001
6001
|
([, a]) => a != null && a !== ""
|
|
6002
6002
|
);
|
|
6003
6003
|
return e.length ? Object.fromEntries(e) : void 0;
|
|
6004
|
-
}, ht = ({ enumName: t, params: e }) => JSON.stringify({ enumName: t, params: E(V(e) ?? {}) }),
|
|
6004
|
+
}, ht = ({ enumName: t, params: e }) => JSON.stringify({ enumName: t, params: E(V(e) ?? {}) }), Qa = (t, { projectName: e } = {}, a) => {
|
|
6005
6005
|
const n = {
|
|
6006
6006
|
...t?.enumResolverSettings || {}
|
|
6007
6007
|
};
|
|
@@ -6055,12 +6055,12 @@ const Oa = PubSub, Da = (t) => !!t?.enum?.length || !!t?.enumResolver, La = (t)
|
|
|
6055
6055
|
})
|
|
6056
6056
|
}),
|
|
6057
6057
|
overrideExisting: !1
|
|
6058
|
-
}),
|
|
6059
|
-
useListEnumsQuery:
|
|
6060
|
-
useLazyListEnumsQuery:
|
|
6061
|
-
useGetEnumOptionsQuery:
|
|
6062
|
-
useLazyGetEnumOptionsQuery:
|
|
6063
|
-
useGetEnumOptionsBatchQuery:
|
|
6058
|
+
}), Wa = M, {
|
|
6059
|
+
useListEnumsQuery: za,
|
|
6060
|
+
useLazyListEnumsQuery: Ya,
|
|
6061
|
+
useGetEnumOptionsQuery: Ja,
|
|
6062
|
+
useLazyGetEnumOptionsQuery: Xa,
|
|
6063
|
+
useGetEnumOptionsBatchQuery: Za
|
|
6064
6064
|
} = M, vt = C.enhanceEndpoints({
|
|
6065
6065
|
endpoints: {
|
|
6066
6066
|
deleteUser: {
|
|
@@ -6173,25 +6173,25 @@ const Oa = PubSub, Da = (t) => !!t?.enum?.length || !!t?.enumResolver, La = (t)
|
|
|
6173
6173
|
})
|
|
6174
6174
|
})
|
|
6175
6175
|
}), {
|
|
6176
|
-
useUpdateUserMutation:
|
|
6177
|
-
useUpdateUsersMutation:
|
|
6178
|
-
useUpdateUserNameMutation:
|
|
6179
|
-
useUpdateUserPasswordMutation:
|
|
6180
|
-
useAddUserMutation:
|
|
6181
|
-
useDeleteUserMutation:
|
|
6182
|
-
useDeleteAvatarMutation:
|
|
6183
|
-
useUpdateUserAPIKeyMutation:
|
|
6184
|
-
useInvalidateUserSessionMutation:
|
|
6185
|
-
useSetFrontendPreferencesMutation:
|
|
6186
|
-
useInviteUserMutation:
|
|
6187
|
-
useAcceptInviteMutation:
|
|
6188
|
-
} = Nt,
|
|
6176
|
+
useUpdateUserMutation: Aa,
|
|
6177
|
+
useUpdateUsersMutation: es,
|
|
6178
|
+
useUpdateUserNameMutation: ts,
|
|
6179
|
+
useUpdateUserPasswordMutation: as,
|
|
6180
|
+
useAddUserMutation: ss,
|
|
6181
|
+
useDeleteUserMutation: rs,
|
|
6182
|
+
useDeleteAvatarMutation: ns,
|
|
6183
|
+
useUpdateUserAPIKeyMutation: os,
|
|
6184
|
+
useInvalidateUserSessionMutation: is,
|
|
6185
|
+
useSetFrontendPreferencesMutation: ds,
|
|
6186
|
+
useInviteUserMutation: ps,
|
|
6187
|
+
useAcceptInviteMutation: cs
|
|
6188
|
+
} = Nt, ls = (t) => t.split(",").map((e) => e.trim().split(/\s+/).filter(Boolean)).filter((e) => e.length > 0), _ = (t, e) => Object.freeze({
|
|
6189
6189
|
rankedValue: "",
|
|
6190
6190
|
rank: t,
|
|
6191
6191
|
accessorIndex: -1,
|
|
6192
6192
|
accessorThreshold: k.CONTAINS,
|
|
6193
6193
|
passed: e
|
|
6194
|
-
}), Tt = _(k.NO_MATCH, !1), kt = _(k.CONTAINS, !0),
|
|
6194
|
+
}), Tt = _(k.NO_MATCH, !1), kt = _(k.CONTAINS, !0), ms = (t, e) => {
|
|
6195
6195
|
if (!e.length) return kt;
|
|
6196
6196
|
let a = null;
|
|
6197
6197
|
for (const n of e) {
|
|
@@ -6238,7 +6238,7 @@ export {
|
|
|
6238
6238
|
Ge as Z,
|
|
6239
6239
|
ne as _,
|
|
6240
6240
|
d as a,
|
|
6241
|
-
|
|
6241
|
+
Xa as a$,
|
|
6242
6242
|
Vt as a0,
|
|
6243
6243
|
zt as a1,
|
|
6244
6244
|
Ht as a2,
|
|
@@ -6268,14 +6268,14 @@ export {
|
|
|
6268
6268
|
ba as aQ,
|
|
6269
6269
|
Ia as aR,
|
|
6270
6270
|
Fa as aS,
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6271
|
+
cs as aT,
|
|
6272
|
+
ss as aU,
|
|
6273
|
+
ns as aV,
|
|
6274
|
+
rs as aW,
|
|
6275
|
+
Za as aX,
|
|
6276
|
+
Ja as aY,
|
|
6277
|
+
is as aZ,
|
|
6278
|
+
ps as a_,
|
|
6279
6279
|
Kt as aa,
|
|
6280
6280
|
Wt as ab,
|
|
6281
6281
|
Qt as ac,
|
|
@@ -6293,47 +6293,48 @@ export {
|
|
|
6293
6293
|
ia as ao,
|
|
6294
6294
|
da as ap,
|
|
6295
6295
|
pa as aq,
|
|
6296
|
-
|
|
6296
|
+
Wa as ar,
|
|
6297
6297
|
yt as as,
|
|
6298
6298
|
ca as at,
|
|
6299
6299
|
la as au,
|
|
6300
6300
|
ma as av,
|
|
6301
|
-
|
|
6301
|
+
Qa as aw,
|
|
6302
6302
|
ht as ax,
|
|
6303
6303
|
Et as ay,
|
|
6304
6304
|
Jt as az,
|
|
6305
6305
|
Ot as b,
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6306
|
+
Ya as b0,
|
|
6307
|
+
za as b1,
|
|
6308
|
+
ds as b2,
|
|
6309
|
+
os as b3,
|
|
6310
|
+
Aa as b4,
|
|
6311
|
+
ts as b5,
|
|
6312
|
+
as as b6,
|
|
6313
|
+
es as b7,
|
|
6314
6314
|
Nt as b8,
|
|
6315
6315
|
C as b9,
|
|
6316
6316
|
Ea as ba,
|
|
6317
6317
|
qa as bb,
|
|
6318
6318
|
wa as bc,
|
|
6319
6319
|
xa as bd,
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6320
|
+
Oa as be,
|
|
6321
|
+
La as bf,
|
|
6322
|
+
Ga as bg,
|
|
6323
|
+
Ra as bh,
|
|
6324
|
+
G as bi,
|
|
6325
|
+
Da as bj,
|
|
6326
|
+
Ka as bk,
|
|
6327
6327
|
R as bl,
|
|
6328
|
-
|
|
6328
|
+
Ha as bm,
|
|
6329
6329
|
ft as bn,
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6330
|
+
Ba as bo,
|
|
6331
|
+
_a as bp,
|
|
6332
|
+
Ua as bq,
|
|
6333
|
+
Ma as br,
|
|
6334
|
+
ms as bs,
|
|
6335
|
+
ls as bt,
|
|
6336
|
+
E as bu,
|
|
6337
|
+
Va as bv,
|
|
6337
6338
|
Dt as c,
|
|
6338
6339
|
Lt as d,
|
|
6339
6340
|
Rt as e,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useMemo as g, useRef as w, useEffect as x } from "react";
|
|
2
|
-
import { b1 as G,
|
|
2
|
+
import { b1 as G, bf as M, aw as N, ax as C, aX as I, bg as A, bh as O } from "./searchTerms.es.js";
|
|
3
3
|
import { W as B, ci as P, cv as q, ao as F, as as Q } from "./getUris.es.js";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import { U } from "./MetaWidget.es.js";
|
|
6
|
-
const
|
|
6
|
+
const z = [], K = 3, H = (s) => {
|
|
7
7
|
const { entity: i, groupBy: c, extraGroupBys: E, skip: p } = s, n = g(
|
|
8
8
|
() => c ? B(c, i) : null,
|
|
9
9
|
[c, i]
|
|
@@ -21,7 +21,7 @@ const j = [], z = 3, H = (s) => {
|
|
|
21
21
|
), v = q(
|
|
22
22
|
{ ...s.entity === "version" ? s.args : { projectName: m }, targets: h },
|
|
23
23
|
{ skip: u || s.entity !== "version" }
|
|
24
|
-
), e = s.entity === "task" ? k : v, r = e.data ??
|
|
24
|
+
), e = s.entity === "task" ? k : v, r = e.data ?? z, o = !!e.data, { counts: L, total: a, complete: l } = g(() => {
|
|
25
25
|
const t = F(r, n);
|
|
26
26
|
return t.ungrouped.count > 0 && t.counts.set(U, t.ungrouped), {
|
|
27
27
|
counts: o && t.counts.size > 0 ? t.counts : void 0,
|
|
@@ -40,7 +40,7 @@ const j = [], z = 3, H = (s) => {
|
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
42
|
const y = f.current.get(t) ?? 0;
|
|
43
|
-
y >=
|
|
43
|
+
y >= K || (f.current.set(t, y + 1), e.refetch());
|
|
44
44
|
}, [u, n, o, e.isFetching, l, r, e.refetch]), {
|
|
45
45
|
counts: L,
|
|
46
46
|
complete: l,
|
|
@@ -1,56 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
!s || !e.current || !c?.length || (s.preventDefault(), d(c), e.current.show(s));
|
|
10
|
-
}
|
|
11
|
-
function a() {
|
|
12
|
-
e.current && e.current.hide();
|
|
13
|
-
}
|
|
14
|
-
return /* @__PURE__ */ i(
|
|
15
|
-
w.Provider,
|
|
16
|
-
{
|
|
17
|
-
value: { openContext: u, closeContext: a, ref: e, model: o, isContextOpen: l, setIsContextOpen: n },
|
|
18
|
-
children: t
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
function z() {
|
|
23
|
-
const t = O(w);
|
|
24
|
-
if (t === void 0)
|
|
25
|
-
throw new Error("useContextMenu must be used within a ContextMenuProvider");
|
|
26
|
-
return t;
|
|
27
|
-
}
|
|
28
|
-
const P = ({
|
|
29
|
-
icon: t,
|
|
30
|
-
iconFilled: l,
|
|
1
|
+
import { jsxs as N, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as b, useMemo as D } from "react";
|
|
3
|
+
import { Icon as d, ShortcutTag as L } from "@ynput/ayon-react-components";
|
|
4
|
+
import { u as P } from "./ContextMenuContextInstance.es.js";
|
|
5
|
+
import S from "clsx";
|
|
6
|
+
const M = ({
|
|
7
|
+
icon: s,
|
|
8
|
+
iconFilled: i,
|
|
31
9
|
label: n,
|
|
32
10
|
shortcut: e,
|
|
33
11
|
command: o,
|
|
34
|
-
children:
|
|
35
|
-
contextMenuRef:
|
|
36
|
-
disabled:
|
|
37
|
-
hidden:
|
|
38
|
-
items:
|
|
39
|
-
isSave:
|
|
40
|
-
danger:
|
|
41
|
-
developer:
|
|
42
|
-
powerFeature:
|
|
12
|
+
children: f,
|
|
13
|
+
contextMenuRef: c,
|
|
14
|
+
disabled: m,
|
|
15
|
+
hidden: u,
|
|
16
|
+
items: p,
|
|
17
|
+
isSave: h,
|
|
18
|
+
danger: l,
|
|
19
|
+
developer: a,
|
|
20
|
+
powerFeature: t,
|
|
43
21
|
// if the feature requires a Powerpack license
|
|
44
|
-
powerLicense:
|
|
22
|
+
powerLicense: x,
|
|
45
23
|
// if the user has a Powerpack license
|
|
46
|
-
onPowerClick:
|
|
24
|
+
onPowerClick: g,
|
|
47
25
|
// callback to handle when they do not have a license and click the power feature
|
|
48
|
-
...
|
|
26
|
+
...C
|
|
49
27
|
}) => {
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
|
|
28
|
+
if (u) return null;
|
|
29
|
+
const w = (v) => {
|
|
30
|
+
if (c.current?.hide(), v.preventDefault(), t && !x && g) {
|
|
31
|
+
g(t);
|
|
54
32
|
return;
|
|
55
33
|
}
|
|
56
34
|
o?.({
|
|
@@ -62,26 +40,26 @@ const P = ({
|
|
|
62
40
|
shortcut: e
|
|
63
41
|
}
|
|
64
42
|
});
|
|
65
|
-
},
|
|
66
|
-
return /* @__PURE__ */
|
|
43
|
+
}, y = p && p.length === 0, I = t && !x;
|
|
44
|
+
return /* @__PURE__ */ N(
|
|
67
45
|
"a",
|
|
68
46
|
{
|
|
69
|
-
className:
|
|
70
|
-
"p-disabled":
|
|
71
|
-
danger:
|
|
72
|
-
developer:
|
|
73
|
-
save:
|
|
47
|
+
className: S("p-menuitem-link", {
|
|
48
|
+
"p-disabled": m || y,
|
|
49
|
+
danger: l,
|
|
50
|
+
developer: a,
|
|
51
|
+
save: h
|
|
74
52
|
}),
|
|
75
53
|
role: "menuitem",
|
|
76
54
|
href: "#",
|
|
77
|
-
onClick:
|
|
55
|
+
onClick: w,
|
|
78
56
|
style: {
|
|
79
|
-
...
|
|
57
|
+
...C?.style
|
|
80
58
|
},
|
|
81
|
-
...
|
|
59
|
+
...C,
|
|
82
60
|
children: [
|
|
83
|
-
|
|
84
|
-
n && /* @__PURE__ */
|
|
61
|
+
s && /* @__PURE__ */ r(d, { className: "p-menuitem-icon", icon: s, filled: i }),
|
|
62
|
+
n && /* @__PURE__ */ r(
|
|
85
63
|
"span",
|
|
86
64
|
{
|
|
87
65
|
className: "p-menuitem-text",
|
|
@@ -91,10 +69,10 @@ const P = ({
|
|
|
91
69
|
children: n
|
|
92
70
|
}
|
|
93
71
|
),
|
|
94
|
-
|
|
95
|
-
e && /* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
72
|
+
f,
|
|
73
|
+
e && /* @__PURE__ */ r("div", { className: "p-menuitem-shortcut", children: /* @__PURE__ */ r(L, { children: e }) }),
|
|
74
|
+
I && /* @__PURE__ */ r(
|
|
75
|
+
d,
|
|
98
76
|
{
|
|
99
77
|
icon: "bolt",
|
|
100
78
|
style: {
|
|
@@ -104,8 +82,8 @@ const P = ({
|
|
|
104
82
|
}
|
|
105
83
|
}
|
|
106
84
|
),
|
|
107
|
-
!!
|
|
108
|
-
|
|
85
|
+
!!p?.length && /* @__PURE__ */ r(
|
|
86
|
+
d,
|
|
109
87
|
{
|
|
110
88
|
icon: "chevron_right",
|
|
111
89
|
style: {
|
|
@@ -117,13 +95,13 @@ const P = ({
|
|
|
117
95
|
]
|
|
118
96
|
}
|
|
119
97
|
);
|
|
120
|
-
}, k = (
|
|
98
|
+
}, k = (s, i, n) => s.map((e) => {
|
|
121
99
|
const o = {
|
|
122
100
|
...e,
|
|
123
|
-
template: /* @__PURE__ */
|
|
124
|
-
|
|
101
|
+
template: /* @__PURE__ */ r(
|
|
102
|
+
M,
|
|
125
103
|
{
|
|
126
|
-
contextMenuRef:
|
|
104
|
+
contextMenuRef: i,
|
|
127
105
|
...e,
|
|
128
106
|
powerLicense: n.powerLicense,
|
|
129
107
|
onPowerClick: n.setPowerpackDialog
|
|
@@ -131,32 +109,30 @@ const P = ({
|
|
|
131
109
|
e.label
|
|
132
110
|
)
|
|
133
111
|
};
|
|
134
|
-
return o.items && (o.items = k(o.items,
|
|
135
|
-
}),
|
|
136
|
-
const { openContext: n, ref: e, isContextOpen: o, closeContext:
|
|
137
|
-
(
|
|
138
|
-
template: /* @__PURE__ */
|
|
139
|
-
|
|
112
|
+
return o.items && (o.items = k(o.items, i, n)), o;
|
|
113
|
+
}), B = (s = [], i) => {
|
|
114
|
+
const { openContext: n, ref: e, isContextOpen: o, closeContext: f } = P(), { powerLicense: c, setPowerpackDialog: m } = i || {}, u = b(
|
|
115
|
+
(l, a) => l.filter(Boolean).map((t) => ({
|
|
116
|
+
template: /* @__PURE__ */ r(
|
|
117
|
+
M,
|
|
140
118
|
{
|
|
141
|
-
contextMenuRef:
|
|
142
|
-
...
|
|
143
|
-
powerLicense:
|
|
144
|
-
onPowerClick:
|
|
119
|
+
contextMenuRef: a,
|
|
120
|
+
...t,
|
|
121
|
+
powerLicense: c,
|
|
122
|
+
onPowerClick: m
|
|
145
123
|
},
|
|
146
|
-
|
|
124
|
+
t.label
|
|
147
125
|
),
|
|
148
|
-
items:
|
|
126
|
+
items: t.items?.length ? k(t.items, a, { powerLicense: c, setPowerpackDialog: m }) : void 0
|
|
149
127
|
})),
|
|
150
|
-
[
|
|
151
|
-
),
|
|
152
|
-
return [(
|
|
153
|
-
if (!
|
|
154
|
-
let
|
|
155
|
-
|
|
156
|
-
},
|
|
128
|
+
[c, m]
|
|
129
|
+
), p = D(() => u(s, e), [s, e, u]);
|
|
130
|
+
return [(l, a) => {
|
|
131
|
+
if (!l || !e.current) return console.error("No ref or event passed to openContext");
|
|
132
|
+
let t;
|
|
133
|
+
a && (t = u(a, e)), l.preventDefault(), n(l, t || p);
|
|
134
|
+
}, f, o, e];
|
|
157
135
|
};
|
|
158
136
|
export {
|
|
159
|
-
|
|
160
|
-
G as a,
|
|
161
|
-
z as u
|
|
137
|
+
B as u
|
|
162
138
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "react";
|
|
3
|
+
import "@module-federation/enhanced/runtime";
|
|
4
|
+
import "./searchTerms.es.js";
|
|
5
|
+
import "./getUris.es.js";
|
|
6
|
+
import "primereact/confirmdialog";
|
|
7
|
+
import { a as o } from "./DeleteEntitiesContextInstance.es.js";
|
|
8
|
+
import "lodash";
|
|
9
|
+
import "react-toastify";
|
|
10
|
+
import "uuid";
|
|
11
|
+
import "semver";
|
|
12
|
+
import "@ynput/ayon-react-components";
|
|
13
|
+
import "./ContextMenuContextInstance.es.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "react-redux";
|
|
17
|
+
import { u as t } from "./MetaWidget.es.js";
|
|
18
|
+
const g = () => {
|
|
19
|
+
const i = t(), { powerLicense: e } = o();
|
|
20
|
+
return i ? (e ? i.slices : i.slices?.slice(0, 1))?.some((r) => r.sliceType === "hierarchy") ? i.getPanelSelection("hierarchy") : i.pinnedSlice?.rowSelection ?? null : null;
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
g as u
|
|
24
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as R, useEffect as z } from "react";
|
|
3
|
+
import { loadRemote as I } from "@module-federation/enhanced/runtime";
|
|
4
|
+
import "./searchTerms.es.js";
|
|
5
|
+
import "./getUris.es.js";
|
|
6
|
+
import "primereact/confirmdialog";
|
|
7
|
+
import { b as M } from "./DeleteEntitiesContextInstance.es.js";
|
|
8
|
+
import "lodash";
|
|
9
|
+
import "react-toastify";
|
|
10
|
+
import "uuid";
|
|
11
|
+
import q from "semver";
|
|
12
|
+
import "@ynput/ayon-react-components";
|
|
13
|
+
import "./ContextMenuContextInstance.es.js";
|
|
14
|
+
import "clsx";
|
|
15
|
+
import "react-dom";
|
|
16
|
+
import "react-redux";
|
|
17
|
+
const G = ({
|
|
18
|
+
addon: o,
|
|
19
|
+
remote: t,
|
|
20
|
+
module: e,
|
|
21
|
+
fallback: g,
|
|
22
|
+
minVersion: s,
|
|
23
|
+
skip: u = !1
|
|
24
|
+
}) => {
|
|
25
|
+
const { remotesInitialized: l, modules: a } = M(), [L, r] = f(!0), [d, c] = f(!1), [v, m] = f(!1), p = R(g);
|
|
26
|
+
return z(() => {
|
|
27
|
+
if (u) {
|
|
28
|
+
r(!1), c(!0);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (!l || !o || !t || !e) return;
|
|
32
|
+
const i = a.find((n) => n.addonName === o);
|
|
33
|
+
if (!i) {
|
|
34
|
+
console.log("remote not found", { addon: o, remote: t, module: e }), r(!1);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (s && !q.gte(i.addonVersion, s) && s + "-dev" !== i.addonVersion) {
|
|
38
|
+
console.log("remote version does not meet minimum requirement", {
|
|
39
|
+
addon: o,
|
|
40
|
+
remote: t,
|
|
41
|
+
module: e,
|
|
42
|
+
current: i.addonVersion,
|
|
43
|
+
required: s
|
|
44
|
+
}), m(!0), r(!1);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (m(!1), !i.modules[t])
|
|
48
|
+
return r(!1), console.log("module not found", { addon: o, remote: t, module: e });
|
|
49
|
+
if (d === e) {
|
|
50
|
+
r(!1);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
I(`${t}/${e}`, {
|
|
54
|
+
from: "runtime"
|
|
55
|
+
}).then((n) => {
|
|
56
|
+
c(e), r(!1), n && (p.current = n.default);
|
|
57
|
+
}).catch((n) => {
|
|
58
|
+
r(!1), console.error("error loading remote", t, e, n);
|
|
59
|
+
});
|
|
60
|
+
}, [d, l, a, o, t, e, s, u]), [
|
|
61
|
+
p.current,
|
|
62
|
+
{
|
|
63
|
+
isLoaded: d === e,
|
|
64
|
+
isLoading: L,
|
|
65
|
+
outdated: v ? {
|
|
66
|
+
current: a.find((i) => i.addonName === o)?.addonVersion || "unknown",
|
|
67
|
+
required: s?.replace("-dev", "") || "unknown"
|
|
68
|
+
} : void 0
|
|
69
|
+
}
|
|
70
|
+
];
|
|
71
|
+
};
|
|
72
|
+
export {
|
|
73
|
+
G as u
|
|
74
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useRef as a, useState as c, useEffect as f } from "react";
|
|
2
|
+
const g = (e, n) => {
|
|
3
|
+
const o = a(null), [u, r] = c(!1);
|
|
4
|
+
return f(() => {
|
|
5
|
+
const t = o.current;
|
|
6
|
+
!t || Object.keys(e).some((s) => t[s] !== e[s]) || Object.keys(t).some((s) => t[s] !== e[s]) ? (o.current = { ...e }, r(n)) : n || r(!1);
|
|
7
|
+
}, [Object.values(e).join(","), n]), u;
|
|
8
|
+
};
|
|
9
|
+
export {
|
|
10
|
+
g as u
|
|
11
|
+
};
|
|
@@ -1,37 +1,12 @@
|
|
|
1
1
|
import { toast as i } from "react-toastify";
|
|
2
2
|
import { camelCase as c } from "lodash";
|
|
3
|
-
|
|
4
|
-
const t = r.replace(/\.[^/.]+$/, ""), a = [
|
|
5
|
-
// Pattern: file_v001, file_v1, file_v01 (with 'v' prefix)
|
|
6
|
-
/.*[_\-\s]v(\d+)(?:[_\-\s].*|$)/i,
|
|
7
|
-
// Pattern: file_001, file_01, file_1 (at end of filename)
|
|
8
|
-
/.*[_\-\s](\d+)$/,
|
|
9
|
-
// Pattern: file_001_name, file_1_description (version in middle)
|
|
10
|
-
/.*[_\-\s](\d{2,})(?:[_\-\s].*)/,
|
|
11
|
-
// Pattern: 001_file, 1_file (at start of filename)
|
|
12
|
-
/^(\d+)[_\-\s]/,
|
|
13
|
-
// Pattern: fileV1, fileV001 (no separator)
|
|
14
|
-
/.*v(\d+)$/i,
|
|
15
|
-
// Pattern: file1, file001 (number at end, no separator)
|
|
16
|
-
/.*?(\d{2,})$/
|
|
17
|
-
];
|
|
18
|
-
for (const e of a) {
|
|
19
|
-
const o = t.match(e);
|
|
20
|
-
if (o) {
|
|
21
|
-
const n = o[1], s = parseInt(n, 10);
|
|
22
|
-
if (!isNaN(s) && s > 0)
|
|
23
|
-
return s;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
const v = (r) => c(r).replace(/[^a-zA-Z0-9_-]/g, ""), d = (r) => !r || r.trim() === "" ? { isValid: !1, error: "Name is required" } : /^[a-zA-Z0-9_]([a-zA-Z0-9_\\.\\-]*[a-zA-Z0-9_])?$/.test(r) ? { isValid: !0 } : {
|
|
3
|
+
const w = (r) => c(r).replace(/[^a-zA-Z0-9_-]/g, ""), d = (r) => !r || r.trim() === "" ? { isValid: !1, error: "Name is required" } : /^[a-zA-Z0-9_]([a-zA-Z0-9_\\.\\-]*[a-zA-Z0-9_])?$/.test(r) ? { isValid: !0 } : {
|
|
29
4
|
isValid: !1,
|
|
30
5
|
error: "Product name can only contain alphanumeric characters, underscores, dots, and dashes, and must not start or end with a dot or dash"
|
|
31
6
|
}, u = (r, t) => r < 1 ? { isValid: !1, error: "Version must be greater than 0" } : t != null && r <= t ? {
|
|
32
7
|
isValid: !1,
|
|
33
8
|
error: `Version must be greater than ${t}`
|
|
34
|
-
} : { isValid: !0 },
|
|
9
|
+
} : { isValid: !0 }, f = (r, t, a = !0) => {
|
|
35
10
|
const e = u(r.version, t);
|
|
36
11
|
if (!e.isValid)
|
|
37
12
|
return e;
|
|
@@ -66,28 +41,27 @@ const v = (r) => c(r).replace(/[^a-zA-Z0-9_-]/g, ""), d = (r) => !r || r.trim()
|
|
|
66
41
|
throw console.error("Error creating version:", e), new Error(e.message || "Failed to create version");
|
|
67
42
|
}
|
|
68
43
|
}, V = async (r, t, a, e, o) => {
|
|
69
|
-
const
|
|
44
|
+
const s = await l(r, a, e), n = await m(t, a, {
|
|
70
45
|
...o,
|
|
71
|
-
productId:
|
|
46
|
+
productId: s.id
|
|
72
47
|
});
|
|
73
48
|
return {
|
|
74
|
-
product:
|
|
75
|
-
version:
|
|
49
|
+
product: s,
|
|
50
|
+
version: n
|
|
76
51
|
};
|
|
77
|
-
},
|
|
52
|
+
}, v = (r, t) => {
|
|
78
53
|
console.error(`Error ${t}:`, r);
|
|
79
54
|
const a = r?.message || `Failed to ${t}`;
|
|
80
55
|
throw i.error(a), r;
|
|
81
|
-
},
|
|
56
|
+
}, g = (r) => r ? r.version + 1 : 1;
|
|
82
57
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
58
|
+
l as a,
|
|
59
|
+
m as b,
|
|
60
|
+
V as c,
|
|
86
61
|
d,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
w as v
|
|
62
|
+
u as e,
|
|
63
|
+
g,
|
|
64
|
+
v as h,
|
|
65
|
+
w as s,
|
|
66
|
+
f as v
|
|
93
67
|
};
|