@ynput/ayon-frontend-shared 0.4.7 → 0.6.0
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 +684 -649
- package/dist/Feed.es.js +22 -22
- package/dist/ListTable.es.js +78 -67
- package/dist/ProjectTreeTable.es.js +2185 -2132
- package/dist/Slicer.es.js +152 -120
- package/dist/Views.es.js +1 -1
- package/dist/api.es.js +332 -329
- package/dist/chunks/Actions.es.js +7 -7
- package/dist/chunks/ColumnDropIndicator.es.js +127 -241
- package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
- package/dist/chunks/DetailsDialog.es.js +3 -3
- package/dist/chunks/DetailsPanelContext.es.js +155 -0
- package/dist/chunks/EntityPath.es.js +40 -40
- package/dist/chunks/EntityPickerDialog.es.js +1 -1
- package/dist/chunks/EntityTooltip.es.js +3 -3
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +2208 -2611
- package/dist/chunks/FilterErrorActions.es.js +5 -5
- package/dist/chunks/GlobalContext.es.js +21 -21
- package/dist/chunks/InfoMessage.es.js +146 -0
- package/dist/chunks/Menu.es.js +6 -6
- package/dist/chunks/MenuContext.es.js +51 -240
- package/dist/chunks/MenuItem.es.js +1 -1
- package/dist/chunks/MetaWidget.es.js +3211 -3761
- package/dist/chunks/NewEntityContext.es.js +539 -544
- package/dist/chunks/PlayableIcon.es.js +4261 -1163
- package/dist/chunks/ProjectContext.es.js +2 -2
- package/dist/chunks/ProjectFoldersContext.es.js +84 -76
- package/dist/chunks/RepresentationsList.es.js +3 -3
- package/dist/chunks/ReviewablesSelector.es.js +396 -384
- package/dist/chunks/SimpleForm.es.js +9 -9
- package/dist/chunks/SimpleTable.es.js +286 -283
- package/dist/chunks/Slicer.es.js +1129 -689
- package/dist/chunks/TableSettingsFallback.es.js +6 -6
- package/dist/chunks/ThumbnailSimple.es.js +410 -61
- package/dist/chunks/VersionUploadContext.es.js +30 -30
- package/dist/chunks/ViewsContext.es.js +97 -97
- package/dist/chunks/Watchers.es.js +628 -598
- package/dist/chunks/entityDefinitions.es.js +276 -134
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/getBundleMode.es.js +16 -61
- package/dist/chunks/getUris.es.js +329 -322
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +186 -173
- package/dist/chunks/uriUtils.es.js +48 -0
- package/dist/chunks/useAttributeEnums.es.js +69 -61
- package/dist/chunks/useColumnDragRestriction.es.js +37 -27
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- package/dist/chunks/useLocalStorage.es.js +8 -8
- package/dist/chunks/useSessionStorage.es.js +61 -0
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +199 -194
- package/dist/context.es.js +60 -58
- package/dist/hooks.es.js +108 -101
- package/dist/index.es.js +20 -14
- package/dist/types/Actions.d.ts +16 -16
- package/dist/types/ContextMenu.d.ts +16 -16
- package/dist/types/DetailsPanel.d.ts +22 -16
- package/dist/types/EntityPickerDialog.d.ts +16 -16
- package/dist/types/Feed.d.ts +16 -16
- package/dist/types/ListTable.d.ts +16 -16
- package/dist/types/NewEntity.d.ts +16 -16
- package/dist/types/ProjectTreeTable.d.ts +48 -22
- package/dist/types/RepresentationsList.d.ts +19 -16
- package/dist/types/SimpleTable.d.ts +17 -16
- package/dist/types/Slicer.d.ts +119 -34
- package/dist/types/Views.d.ts +17 -17
- package/dist/types/api.d.ts +404 -95
- package/dist/types/components.d.ts +86 -25
- package/dist/types/context.d.ts +60 -17
- package/dist/types/hooks.d.ts +16 -16
- package/dist/types/index.d.ts +16 -16
- package/dist/types/util.d.ts +16 -16
- package/dist/util.es.js +108 -97
- package/package.json +26 -13
- package/dist/chunks/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useSlicerSplitter.es.js +0 -18
|
@@ -7,7 +7,7 @@ import { c as B } from "./copyToClipboard.es.js";
|
|
|
7
7
|
import "uuid";
|
|
8
8
|
import "./searchTerms.es.js";
|
|
9
9
|
import { useState as l, useEffect as u, useContext as k } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { bF as G } from "./getUris.es.js";
|
|
11
11
|
import { u as J } from "./GlobalContext.es.js";
|
|
12
12
|
import { F as w } from "./ColumnDropIndicator.es.js";
|
|
13
13
|
const ie = ({ children: i }) => {
|
|
@@ -152,9 +152,9 @@ const ie = ({ children: i }) => {
|
|
|
152
152
|
...t && { articleId: t }
|
|
153
153
|
}
|
|
154
154
|
});
|
|
155
|
-
}, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"),
|
|
155
|
+
}, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"), j = (e) => h instanceof HTMLElement && (h.style.display = e ? "block" : "none");
|
|
156
156
|
u(() => {
|
|
157
|
-
!n || !c ||
|
|
157
|
+
!n || !c || j(f);
|
|
158
158
|
}, [n, c, f]), u(() => {
|
|
159
159
|
if (!n || !c) return;
|
|
160
160
|
const e = window;
|
|
@@ -162,7 +162,7 @@ const ie = ({ children: i }) => {
|
|
|
162
162
|
b(!1);
|
|
163
163
|
});
|
|
164
164
|
}, [n, c]);
|
|
165
|
-
const
|
|
165
|
+
const D = (e = "Home", t) => {
|
|
166
166
|
const a = window;
|
|
167
167
|
if (typeof a.Featurebase != "function") {
|
|
168
168
|
window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
|
|
@@ -200,7 +200,7 @@ const ie = ({ children: i }) => {
|
|
|
200
200
|
w.Provider,
|
|
201
201
|
{
|
|
202
202
|
value: {
|
|
203
|
-
openSupport:
|
|
203
|
+
openSupport: D,
|
|
204
204
|
openFeedback: N,
|
|
205
205
|
openPortal: A,
|
|
206
206
|
messengerLoaded: c,
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as L } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as v, useContext as x, useMemo as I } from "react";
|
|
3
3
|
import "./searchTerms.es.js";
|
|
4
|
-
import {
|
|
4
|
+
import { cg as C, bp as G, cS as P, cB as b } from "./getUris.es.js";
|
|
5
5
|
import "primereact/confirmdialog";
|
|
6
|
-
const a = v(void 0), A = ({ children: r, skip:
|
|
6
|
+
const a = v(void 0), A = ({ children: r, skip: t = !1 }) => {
|
|
7
7
|
const {
|
|
8
|
-
data:
|
|
9
|
-
isLoading:
|
|
10
|
-
error:
|
|
11
|
-
} = C({ full: !0 }, { skip:
|
|
8
|
+
data: e = {},
|
|
9
|
+
isLoading: i,
|
|
10
|
+
error: n
|
|
11
|
+
} = C({ full: !0 }, { skip: t }), { data: s, isLoading: u, error: c } = G(), {
|
|
12
12
|
data: o = [],
|
|
13
13
|
isLoading: l,
|
|
14
14
|
error: d
|
|
15
|
-
} = P({}, { skip:
|
|
16
|
-
data:
|
|
17
|
-
isLoading:
|
|
18
|
-
error:
|
|
15
|
+
} = P({}, { skip: t }), f = I(() => o.filter((j) => j.active), [o]), {
|
|
16
|
+
data: p,
|
|
17
|
+
isLoading: m,
|
|
18
|
+
error: g
|
|
19
19
|
} = b(void 0, { skip: !s?.name });
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ L(
|
|
21
21
|
a.Provider,
|
|
22
22
|
{
|
|
23
23
|
value: {
|
|
24
|
-
siteInfo:
|
|
25
|
-
attributes:
|
|
24
|
+
siteInfo: e,
|
|
25
|
+
attributes: e?.attributes || [],
|
|
26
26
|
user: s,
|
|
27
|
-
cloudInfo:
|
|
27
|
+
cloudInfo: p,
|
|
28
28
|
projects: {
|
|
29
29
|
all: o,
|
|
30
30
|
active: f
|
|
31
31
|
},
|
|
32
32
|
isLoading: {
|
|
33
|
-
siteInfo:
|
|
33
|
+
siteInfo: i,
|
|
34
34
|
user: u,
|
|
35
|
-
cloudInfo:
|
|
35
|
+
cloudInfo: m,
|
|
36
36
|
projects: l
|
|
37
37
|
},
|
|
38
38
|
error: {
|
|
39
|
-
siteInfo:
|
|
39
|
+
siteInfo: n,
|
|
40
40
|
user: c,
|
|
41
|
-
cloudInfo:
|
|
41
|
+
cloudInfo: g,
|
|
42
42
|
projects: d
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
children: r
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
|
-
},
|
|
48
|
+
}, B = () => x(a) || {};
|
|
49
49
|
export {
|
|
50
50
|
A as G,
|
|
51
|
-
|
|
51
|
+
B as u
|
|
52
52
|
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsxs as n, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import u from "styled-components";
|
|
4
|
+
import m from "clsx";
|
|
5
|
+
import { Icon as s, Button as b } from "@ynput/ayon-react-components";
|
|
6
|
+
const v = u.div`
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
gap: 16px;
|
|
11
|
+
padding: var(--padding-m) var(--padding-l);
|
|
12
|
+
border-radius: var(--border-radius-m);
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
|
|
15
|
+
.content {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 16px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.icon {
|
|
22
|
+
font-size: 24px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.compact {
|
|
26
|
+
gap: var(--base-gap-large);
|
|
27
|
+
padding: var(--padding-s) var(--padding-s) var(--padding-s) var(--padding-m);
|
|
28
|
+
|
|
29
|
+
.content {
|
|
30
|
+
gap: var(--base-gap-large);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.icon {
|
|
34
|
+
font-size: 20px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
button {
|
|
38
|
+
&,
|
|
39
|
+
&.hasIcon {
|
|
40
|
+
padding: 2px 6px;
|
|
41
|
+
}
|
|
42
|
+
gap: 4px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* default background */
|
|
47
|
+
&.info {
|
|
48
|
+
--message-background-color: var(--md-sys-color-secondary-container);
|
|
49
|
+
--message-color: var(--md-sys-color-on-secondary-container);
|
|
50
|
+
--button-background-color: var(--md-sys-color-secondary);
|
|
51
|
+
--button-background-color-hover: var(--md-sys-color-secondary-hover);
|
|
52
|
+
--button-color: var(--md-sys-color-on-secondary);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* warning background */
|
|
56
|
+
&.warning {
|
|
57
|
+
--message-background-color: var(--md-sys-color-warning-container);
|
|
58
|
+
--message-color: var(--md-sys-color-on-warning-container);
|
|
59
|
+
--button-background-color: var(--md-sys-color-warning);
|
|
60
|
+
--button-background-color-hover: hsl(25, 100%, 80%);
|
|
61
|
+
--button-color: var(--md-sys-color-on-warning);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* error background */
|
|
65
|
+
&.error {
|
|
66
|
+
--message-background-color: var(--md-sys-color-error-container);
|
|
67
|
+
--message-color: var(--md-sys-color-on-error-container);
|
|
68
|
+
--button-background-color: var(--md-sys-color-error);
|
|
69
|
+
--button-background-color-hover: var(--md-sys-color-error-hover);
|
|
70
|
+
--button-color: var(--md-sys-color-on-error);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* success background */
|
|
74
|
+
&.success {
|
|
75
|
+
--message-background-color: var(--md-sys-color-tertiary-container);
|
|
76
|
+
--message-color: var(--md-sys-color-on-tertiary-container);
|
|
77
|
+
--button-background-color: var(--md-sys-color-tertiary);
|
|
78
|
+
--button-background-color-hover: var(--md-sys-color-tertiary-hover);
|
|
79
|
+
--button-color: var(--md-sys-color-on-tertiary);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
background-color: var(--message-background-color);
|
|
83
|
+
&,
|
|
84
|
+
.icon {
|
|
85
|
+
color: var(--message-color);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
button {
|
|
89
|
+
&,
|
|
90
|
+
&.hasIcon {
|
|
91
|
+
padding: 4px;
|
|
92
|
+
}
|
|
93
|
+
background-color: var(--button-background-color);
|
|
94
|
+
&,
|
|
95
|
+
.icon {
|
|
96
|
+
color: var(--button-color);
|
|
97
|
+
}
|
|
98
|
+
&:hover {
|
|
99
|
+
background-color: var(--button-background-color-hover);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`, w = g(
|
|
103
|
+
({ variant: r = "info", message: e, icon: t, action: o, compact: d, ...a }, l) => /* @__PURE__ */ n(
|
|
104
|
+
v,
|
|
105
|
+
{
|
|
106
|
+
...a,
|
|
107
|
+
className: m("message", a.className, r, { compact: d }),
|
|
108
|
+
ref: l,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ n("div", { className: "content", children: [
|
|
111
|
+
/* @__PURE__ */ c(s, { icon: t || p(r) }),
|
|
112
|
+
e
|
|
113
|
+
] }),
|
|
114
|
+
o && /* @__PURE__ */ n(
|
|
115
|
+
b,
|
|
116
|
+
{
|
|
117
|
+
icon: o.iconPosition === "right" ? void 0 : o.icon,
|
|
118
|
+
onClick: (i) => {
|
|
119
|
+
i.stopPropagation(), o.callback();
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
o.label,
|
|
123
|
+
o.iconPosition === "right" && /* @__PURE__ */ c(s, { icon: o.icon })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
), p = (r) => {
|
|
131
|
+
switch (r) {
|
|
132
|
+
case "info":
|
|
133
|
+
return "info";
|
|
134
|
+
case "warning":
|
|
135
|
+
return "warning";
|
|
136
|
+
case "error":
|
|
137
|
+
return "error";
|
|
138
|
+
case "success":
|
|
139
|
+
return "done_all";
|
|
140
|
+
default:
|
|
141
|
+
return "info";
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
export {
|
|
145
|
+
w as I
|
|
146
|
+
};
|
package/dist/chunks/Menu.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx as L, jsxs as Q, Fragment as yt } from "react/jsx-runtime";
|
|
|
4
4
|
import X, { useRef as Z, useEffect as U, useLayoutEffect as st, useState as lt, useCallback as bt } from "react";
|
|
5
5
|
import { M as xt, a as Et, b as Pt, c as K, D as $, d as Lt, e as Rt, S as Ct, F as St } from "./MenuItem.es.js";
|
|
6
6
|
import { Icon as Tt, Button as Ot } from "@ynput/ayon-react-components";
|
|
7
|
-
import {
|
|
7
|
+
import { a as ct } from "./useLocalStorage.es.js";
|
|
8
8
|
import { u as at } from "./MenuContext.es.js";
|
|
9
9
|
import { createPortal as kt } from "react-dom";
|
|
10
10
|
import Dt from "clsx";
|
|
@@ -395,10 +395,10 @@ const it = "ayon-menu-dialog", ft = "ayon-menu-content", ne = ({
|
|
|
395
395
|
};
|
|
396
396
|
export {
|
|
397
397
|
te as E,
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
398
|
+
ne as M,
|
|
399
|
+
oe as a,
|
|
400
|
+
ee as b,
|
|
401
|
+
ft as c,
|
|
402
|
+
it as d,
|
|
403
403
|
ot as e
|
|
404
404
|
};
|
|
@@ -1,263 +1,74 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { u as ue, r as pe, w as de } from "./useLocalStorage.es.js";
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as p, useState as f, useEffect as P, useCallback as v, useContext as U } from "react";
|
|
4
3
|
import "lodash";
|
|
5
4
|
import "primereact/confirmdialog";
|
|
6
5
|
import "react-toastify";
|
|
7
6
|
import "uuid";
|
|
8
|
-
import { p as
|
|
7
|
+
import { p as b, b as E } from "./uriUtils.es.js";
|
|
9
8
|
import "./searchTerms.es.js";
|
|
10
|
-
import {
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, [
|
|
16
|
-
const { type:
|
|
17
|
-
({ projectName:
|
|
18
|
-
const
|
|
19
|
-
|
|
9
|
+
import { cY as I } from "./getUris.es.js";
|
|
10
|
+
const L = "uri", x = p(void 0), N = ({ children: e }) => {
|
|
11
|
+
const r = location.pathname, [o, t] = f(""), a = ["projects", "settings", "dashboard/tasks"];
|
|
12
|
+
P(() => {
|
|
13
|
+
a.some((u) => r.startsWith(`/${u}`)) || t("");
|
|
14
|
+
}, [r, t]);
|
|
15
|
+
const { type: i, entity: l, settings: c } = b(o), s = v(
|
|
16
|
+
({ projectName: n, folderPath: u, taskName: h, productName: C, versionName: w }) => {
|
|
17
|
+
const y = E({ projectName: n, folderPath: u, taskName: h, productName: C, versionName: w });
|
|
18
|
+
t(y);
|
|
20
19
|
},
|
|
21
|
-
[
|
|
22
|
-
), [
|
|
23
|
-
if (
|
|
20
|
+
[t]
|
|
21
|
+
), [m] = I(), g = v(async () => {
|
|
22
|
+
if (i !== "entity" || !o) return [];
|
|
24
23
|
try {
|
|
25
|
-
const
|
|
26
|
-
return console.log("Resolved entity from URI:",
|
|
27
|
-
} catch (l) {
|
|
28
|
-
return console.warn("Failed to resolve URI:", l), [];
|
|
29
|
-
}
|
|
30
|
-
}, [S, n, u]), d = {
|
|
31
|
-
uri: n,
|
|
32
|
-
uriType: u,
|
|
33
|
-
entity: a,
|
|
34
|
-
settings: i,
|
|
35
|
-
setUri: s,
|
|
36
|
-
setEntityUri: o,
|
|
37
|
-
getUriEntities: w
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ C(V.Provider, { value: d, children: e });
|
|
40
|
-
}, we = () => {
|
|
41
|
-
const e = A(V);
|
|
42
|
-
if (e === void 0)
|
|
43
|
-
throw new Error("useURIContext must be used within a URIProvider");
|
|
44
|
-
return e;
|
|
45
|
-
}, U = (e, t = null) => {
|
|
46
|
-
if (!e) return t;
|
|
47
|
-
try {
|
|
48
|
-
return JSON.parse(e);
|
|
49
|
-
} catch {
|
|
50
|
-
return t;
|
|
51
|
-
}
|
|
52
|
-
}, Re = (e, t) => {
|
|
53
|
-
if (typeof window > "u") return t;
|
|
54
|
-
try {
|
|
55
|
-
return U(sessionStorage.getItem(e), t);
|
|
56
|
-
} catch {
|
|
57
|
-
return t;
|
|
58
|
-
}
|
|
59
|
-
}, De = (e, t) => {
|
|
60
|
-
if (!(typeof window > "u"))
|
|
61
|
-
try {
|
|
62
|
-
sessionStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new Event("session-storage"));
|
|
24
|
+
const n = await m({ resolveRequestModel: { uris: [o] } }).unwrap();
|
|
25
|
+
return console.log("Resolved entity from URI:", n), n;
|
|
63
26
|
} catch (n) {
|
|
64
|
-
console.
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
function Y(e, t) {
|
|
68
|
-
const n = ae(t);
|
|
69
|
-
n.current = t;
|
|
70
|
-
const [s, c] = g(() => typeof window > "u" ? t : U(sessionStorage.getItem(e), t));
|
|
71
|
-
T(() => {
|
|
72
|
-
const a = sessionStorage.getItem(e);
|
|
73
|
-
c(U(a, n.current)), a || sessionStorage.setItem(e, JSON.stringify(n.current));
|
|
74
|
-
function i(o) {
|
|
75
|
-
if ("key" in o && o.key && o.key !== e) return;
|
|
76
|
-
const S = sessionStorage.getItem(e);
|
|
77
|
-
c(U(S, n.current));
|
|
78
|
-
}
|
|
79
|
-
return window.addEventListener("session-storage", i), window.addEventListener("storage", i), () => {
|
|
80
|
-
window.removeEventListener("session-storage", i), window.removeEventListener("storage", i);
|
|
81
|
-
};
|
|
82
|
-
}, [e]);
|
|
83
|
-
const u = p(
|
|
84
|
-
(a) => {
|
|
85
|
-
try {
|
|
86
|
-
c((i) => {
|
|
87
|
-
const o = typeof a == "function" ? a(i) : a;
|
|
88
|
-
return sessionStorage.setItem(e, JSON.stringify(o)), typeof window < "u" && window.dispatchEvent(new Event("session-storage")), o;
|
|
89
|
-
});
|
|
90
|
-
} catch (i) {
|
|
91
|
-
console.error(i);
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
[e]
|
|
95
|
-
);
|
|
96
|
-
return [s, u];
|
|
97
|
-
}
|
|
98
|
-
const q = N(void 0), ye = ["feed", "subtasks", "details", "files"], H = (e) => typeof e == "string" && ye.includes(e), Ce = ({
|
|
99
|
-
children: e,
|
|
100
|
-
defaultTab: t = "feed",
|
|
101
|
-
hasLicense: n,
|
|
102
|
-
debug: s = {},
|
|
103
|
-
...c
|
|
104
|
-
}) => {
|
|
105
|
-
const u = c.user, a = ge(u), i = "isGuest" in s ? s.isGuest : u?.data?.isGuest, { powerLicense: o, setPowerpackDialog: S } = ue(), w = "hasLicense" in s ? s.hasLicense : !!o || n, [d, l] = g({}), [v, x] = g([]), M = p(
|
|
106
|
-
(r) => d[r] ? d[r] : !1,
|
|
107
|
-
[d]
|
|
108
|
-
), L = p(
|
|
109
|
-
(r, y) => {
|
|
110
|
-
const f = { ...d };
|
|
111
|
-
f[r] = y, l(f);
|
|
112
|
-
},
|
|
113
|
-
[d]
|
|
114
|
-
), [m, $] = Y(b, {}), z = p(
|
|
115
|
-
(r) => {
|
|
116
|
-
const y = m[r];
|
|
117
|
-
return H(y) ? y : t;
|
|
118
|
-
},
|
|
119
|
-
[m, t]
|
|
120
|
-
), [B, F] = g(null), Q = p((r) => {
|
|
121
|
-
F(r);
|
|
122
|
-
}, []), j = p(() => {
|
|
123
|
-
F(null), B && D([]);
|
|
124
|
-
}, []);
|
|
125
|
-
T(() => {
|
|
126
|
-
j();
|
|
127
|
-
}, [c.useLocation().pathname]);
|
|
128
|
-
const [X, _] = g(null), Z = p((r) => {
|
|
129
|
-
_(r);
|
|
130
|
-
}, []), k = p(() => {
|
|
131
|
-
_(null);
|
|
132
|
-
}, []), [ee, R] = g(null), [te, D] = g([]), { uriType: ne, uri: se, entity: h, getUriEntities: oe } = we(), [P] = c.useSearchParams(), E = P.get("project"), O = P.get("type"), I = P.get("id"), J = P.get("activity");
|
|
133
|
-
T(() => {
|
|
134
|
-
if (!(!E && !O && !I)) {
|
|
135
|
-
if (ne === "entity" && h && h.entityType !== "product") {
|
|
136
|
-
oe().then((r) => {
|
|
137
|
-
if (r.length === 0) return;
|
|
138
|
-
const y = r.find((ce) => ce.uri === se), f = y?.entities?.[0];
|
|
139
|
-
if (!y || !f) return;
|
|
140
|
-
const G = f?.projectName || h.projectName || "", W = f.representationId || f.versionId || f.productId || f.taskId || f.folderId;
|
|
141
|
-
if (!G || !W) return;
|
|
142
|
-
const re = {
|
|
143
|
-
entityType: h.entityType,
|
|
144
|
-
entities: [
|
|
145
|
-
{
|
|
146
|
-
id: W,
|
|
147
|
-
projectName: G
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
source: "uri"
|
|
151
|
-
};
|
|
152
|
-
R(re);
|
|
153
|
-
}).catch((r) => {
|
|
154
|
-
console.warn("Failed to get URI entities:", r);
|
|
155
|
-
});
|
|
156
|
-
return;
|
|
157
|
-
}
|
|
158
|
-
E && O && I && (R({
|
|
159
|
-
entityType: O,
|
|
160
|
-
entities: [
|
|
161
|
-
{
|
|
162
|
-
id: I,
|
|
163
|
-
projectName: E
|
|
164
|
-
}
|
|
165
|
-
],
|
|
166
|
-
source: "url"
|
|
167
|
-
}), J && (D([J]), $({
|
|
168
|
-
...m,
|
|
169
|
-
overview: "feed"
|
|
170
|
-
})));
|
|
27
|
+
return console.warn("Failed to resolve URI:", n), [];
|
|
171
28
|
}
|
|
172
|
-
}, [
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
tabsByScope: m,
|
|
181
|
-
getTabForScope: z,
|
|
182
|
-
// slide out state
|
|
183
|
-
slideOut: B,
|
|
184
|
-
openSlideOut: Q,
|
|
185
|
-
closeSlideOut: j,
|
|
186
|
-
// highlighted activities
|
|
187
|
-
highlightedActivities: te,
|
|
188
|
-
setHighlightedActivities: D,
|
|
189
|
-
// PiP state
|
|
190
|
-
pip: X,
|
|
191
|
-
openPip: Z,
|
|
192
|
-
closePip: k,
|
|
193
|
-
// entities state
|
|
194
|
-
entities: ee,
|
|
195
|
-
setEntities: R,
|
|
196
|
-
feedAnnotations: v,
|
|
197
|
-
setFeedAnnotations: x,
|
|
198
|
-
bundleMode: a,
|
|
199
|
-
isGuest: i,
|
|
200
|
-
hasLicense: w,
|
|
201
|
-
onPowerFeature: S,
|
|
202
|
-
...c
|
|
29
|
+
}, [m, o, i]), R = {
|
|
30
|
+
uri: o,
|
|
31
|
+
uriType: i,
|
|
32
|
+
entity: l,
|
|
33
|
+
settings: c,
|
|
34
|
+
setUri: t,
|
|
35
|
+
setEntityUri: s,
|
|
36
|
+
getUriEntities: g
|
|
203
37
|
};
|
|
204
|
-
return /* @__PURE__ */
|
|
205
|
-
},
|
|
206
|
-
const e =
|
|
38
|
+
return /* @__PURE__ */ d(x.Provider, { value: R, children: e });
|
|
39
|
+
}, T = () => {
|
|
40
|
+
const e = U(x);
|
|
207
41
|
if (e === void 0)
|
|
208
|
-
throw new Error("
|
|
42
|
+
throw new Error("useURIContext must be used within a URIProvider");
|
|
209
43
|
return e;
|
|
210
|
-
},
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
(w) => {
|
|
216
|
-
u((d) => ({ ...d, [e]: w }));
|
|
217
|
-
},
|
|
218
|
-
[e, u]
|
|
219
|
-
), S = i === "feed";
|
|
220
|
-
return {
|
|
221
|
-
isOpen: t(e),
|
|
222
|
-
setOpen: (w) => n(e, w),
|
|
223
|
-
currentTab: i,
|
|
224
|
-
setTab: o,
|
|
225
|
-
isFeed: S
|
|
226
|
-
};
|
|
227
|
-
}, K = N(void 0), Be = ({ children: e, useNavigate: t }) => {
|
|
228
|
-
const [n, s] = g(!1), c = t(), i = {
|
|
229
|
-
menuOpen: n,
|
|
230
|
-
setMenuOpen: (o) => {
|
|
231
|
-
s(o);
|
|
44
|
+
}, V = p(void 0), M = p(void 0), W = ({ children: e, useNavigate: r }) => {
|
|
45
|
+
const [o, t] = f(!1), a = r(), c = {
|
|
46
|
+
menuOpen: o,
|
|
47
|
+
setMenuOpen: (s) => {
|
|
48
|
+
t(s);
|
|
232
49
|
},
|
|
233
|
-
toggleMenuOpen: (
|
|
234
|
-
if (!
|
|
235
|
-
|
|
50
|
+
toggleMenuOpen: (s) => {
|
|
51
|
+
if (!s) {
|
|
52
|
+
t(!1);
|
|
236
53
|
return;
|
|
237
54
|
}
|
|
238
|
-
s
|
|
55
|
+
t(s === o ? !1 : s);
|
|
239
56
|
},
|
|
240
|
-
navigate:
|
|
57
|
+
navigate: a
|
|
241
58
|
};
|
|
242
|
-
return /* @__PURE__ */
|
|
243
|
-
},
|
|
244
|
-
const e =
|
|
59
|
+
return /* @__PURE__ */ d(M.Provider, { value: c, children: e });
|
|
60
|
+
}, Y = () => {
|
|
61
|
+
const e = U(M);
|
|
245
62
|
if (e === void 0)
|
|
246
63
|
throw new Error("useMenuContext must be used within a MenuProvider");
|
|
247
64
|
return e;
|
|
248
65
|
};
|
|
249
66
|
export {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
we as e,
|
|
258
|
-
Y as f,
|
|
259
|
-
Re as r,
|
|
260
|
-
Ne as s,
|
|
261
|
-
Fe as u,
|
|
262
|
-
De as w
|
|
67
|
+
V as D,
|
|
68
|
+
W as M,
|
|
69
|
+
N as U,
|
|
70
|
+
M as a,
|
|
71
|
+
L as b,
|
|
72
|
+
T as c,
|
|
73
|
+
Y as u
|
|
263
74
|
};
|
|
@@ -5,7 +5,7 @@ import r, { keyframes as z } from "styled-components";
|
|
|
5
5
|
import { isArray as E } from "lodash";
|
|
6
6
|
import { Link as L } from "react-router-dom";
|
|
7
7
|
import P from "clsx";
|
|
8
|
-
import {
|
|
8
|
+
import { a as G } from "./useLocalStorage.es.js";
|
|
9
9
|
const u = 42, S = 8, Q = u + S, V = r.dialog`
|
|
10
10
|
position: fixed;
|
|
11
11
|
margin: 0;
|