@ynput/ayon-frontend-shared 0.5.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 +307 -311
- package/dist/Feed.es.js +179 -50
- package/dist/ListTable.es.js +99 -92
- package/dist/NewEntity.es.js +1256 -11
- package/dist/ProjectTreeTable.es.js +4459 -2959
- package/dist/SimpleTable.es.js +8 -7
- package/dist/Slicer.es.js +451 -147
- package/dist/Views.es.js +918 -310
- package/dist/api.es.js +331 -329
- package/dist/chunks/Actions.es.js +32 -27
- 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/DetailsDialog.es.js +3 -3
- package/dist/chunks/EmptyPlaceholder.es.js +4 -4
- package/dist/chunks/EntityPath.es.js +74 -69
- package/dist/chunks/EntityPickerDialog.es.js +25 -21
- package/dist/chunks/EntityTooltip.es.js +29 -22
- package/dist/chunks/EntityUpdatesContext.es.js +38 -96
- package/dist/chunks/Feed.es.js +2321 -2668
- package/dist/chunks/FilterErrorActions.es.js +25 -229
- package/dist/chunks/Menu.es.js +21 -17
- package/dist/chunks/MenuContext.es.js +14 -256
- package/dist/chunks/MenuItem.es.js +34 -24
- package/dist/chunks/MetaWidget.es.js +2895 -4919
- package/dist/chunks/NewEntityContextInstance.es.js +11 -0
- package/dist/chunks/PlayableIcon.es.js +4215 -1179
- package/dist/chunks/ProjectContext.es.js +102 -66
- package/dist/chunks/RepresentationsList.es.js +4 -4
- package/dist/chunks/ReviewablesSelector.es.js +468 -460
- package/dist/chunks/SimpleForm.es.js +18 -18
- package/dist/chunks/SimpleTable.es.js +15 -13
- package/dist/chunks/Slicer.es.js +109 -98
- package/dist/chunks/TableSettingsFallback.es.js +22 -10
- package/dist/chunks/ThumbnailSimple.es.js +290 -52
- package/dist/chunks/VersionUploadContextInstance.es.js +12 -0
- package/dist/chunks/VideoPlayer.es.js +24 -28
- package/dist/chunks/Watchers.es.js +669 -644
- package/dist/chunks/entityDefinitions.es.js +2 -350
- package/dist/chunks/expandRelativeDates.es.js +27 -0
- package/dist/chunks/extractVersionFromFilename.es.js +28 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +737 -710
- package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
- package/dist/chunks/searchTerms.es.js +179 -174
- package/dist/chunks/useAttributeEnums.es.js +9 -9
- package/dist/chunks/useCreateContextMenu.es.js +66 -90
- package/dist/chunks/useDateRangeFilter.es.js +3 -3
- 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 +74 -57
- package/dist/components.es.js +1432 -1001
- package/dist/context.es.js +791 -78
- package/dist/hooks.es.js +95 -94
- package/dist/index.es.js +27 -26
- package/dist/types/Actions.d.ts +15 -15
- package/dist/types/ContextMenu.d.ts +19 -16
- package/dist/types/DetailsPanel.d.ts +110 -17
- package/dist/types/EntityPickerDialog.d.ts +15 -15
- package/dist/types/Feed.d.ts +19 -16
- package/dist/types/ListTable.d.ts +15 -15
- package/dist/types/NewEntity.d.ts +24 -18
- package/dist/types/ProjectTreeTable.d.ts +34 -123
- package/dist/types/RepresentationsList.d.ts +15 -15
- package/dist/types/SimpleTable.d.ts +19 -16
- package/dist/types/Slicer.d.ts +18 -15
- package/dist/types/Views.d.ts +19 -16
- package/dist/types/api.d.ts +515 -207
- package/dist/types/components.d.ts +84 -20
- package/dist/types/context.d.ts +108 -25
- package/dist/types/hooks.d.ts +15 -15
- package/dist/types/index.d.ts +15 -15
- package/dist/types/util.d.ts +20 -15
- package/dist/util.es.js +117 -105
- package/package.json +16 -4
- package/dist/chunks/DeleteEntitiesContext.es.js +0 -748
- 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/mentionTypeOptions.es.js +0 -15
- package/dist/chunks/useColumnDragRestriction.es.js +0 -148
- package/dist/chunks/useLocalStorage.es.js +0 -355
- /package/dist/{useCreateContextMenu.css → ContextMenuContextInstance.css} +0 -0
|
@@ -1,248 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Button as
|
|
1
|
+
import { jsxs as e, Fragment as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Button as i } from "@ynput/ayon-react-components";
|
|
3
3
|
import "lodash";
|
|
4
4
|
import "primereact/confirmdialog";
|
|
5
5
|
import "react-toastify";
|
|
6
|
-
import { c as
|
|
6
|
+
import { c as n } from "./copyToClipboard.es.js";
|
|
7
7
|
import "uuid";
|
|
8
8
|
import "./searchTerms.es.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
}, z = () => {
|
|
25
|
-
const e = window;
|
|
26
|
-
typeof e.Featurebase != "function" && (e.Featurebase = function() {
|
|
27
|
-
(e.Featurebase.q = e.Featurebase.q || []).push(arguments);
|
|
28
|
-
});
|
|
29
|
-
}, C = r?.version?.split("+")[0] || "unknown", S = r?.version?.split("+")[1] || "unknown", E = () => {
|
|
30
|
-
if (!o?.name || !s?.available) return;
|
|
31
|
-
const e = {
|
|
32
|
-
...s.data,
|
|
33
|
-
customFields: {
|
|
34
|
-
origin: window.location.origin,
|
|
35
|
-
serverVersion: C,
|
|
36
|
-
frontendVersion: S,
|
|
37
|
-
instanceId: d?.instanceId
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
console.log(e), window.Featurebase("identify", e, (a) => {
|
|
41
|
-
a ? console.error(a) : console.log("Featurebase identify completed");
|
|
42
|
-
});
|
|
43
|
-
}, [c, x] = l(!1), [M, P] = l(0), _ = () => {
|
|
44
|
-
const e = window;
|
|
45
|
-
if (typeof e.Featurebase == "function") {
|
|
46
|
-
if (console.log("Initializing Featurebase messenger widget"), !s?.available)
|
|
47
|
-
return console.warn("messenger verification not available, skipping messenger init");
|
|
48
|
-
e.Featurebase(
|
|
49
|
-
"boot",
|
|
50
|
-
{
|
|
51
|
-
theme: "dark",
|
|
52
|
-
...s?.data
|
|
53
|
-
},
|
|
54
|
-
(t) => {
|
|
55
|
-
t ? console.error(t) : (console.log("Featurebase messenger completed"), x(!0), e.Featurebase("onUnreadCountChange", function(a) {
|
|
56
|
-
P(a);
|
|
57
|
-
}));
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
}, I = () => {
|
|
62
|
-
const e = [];
|
|
63
|
-
if (o?.data?.isAdmin) {
|
|
64
|
-
const a = ["Server", "Addon", "Pipeline"];
|
|
65
|
-
e.push(...a);
|
|
66
|
-
} else r?.disableChangelog || e.push("Highlights");
|
|
67
|
-
const t = window;
|
|
68
|
-
return typeof t.Featurebase == "function" && t.Featurebase("init_changelog_widget", {
|
|
69
|
-
organization: "ayon",
|
|
70
|
-
dropdown: {
|
|
71
|
-
enabled: !0
|
|
72
|
-
},
|
|
73
|
-
popup: {
|
|
74
|
-
enabled: !0,
|
|
75
|
-
usersName: o?.attrib?.fullName,
|
|
76
|
-
autoOpenForNewUpdates: !0
|
|
77
|
-
},
|
|
78
|
-
category: e,
|
|
79
|
-
theme: "dark"
|
|
80
|
-
}), !1;
|
|
81
|
-
}, L = () => {
|
|
82
|
-
const e = window;
|
|
83
|
-
return typeof e.Featurebase == "function" && e.Featurebase(
|
|
84
|
-
"initialize_feedback_widget",
|
|
85
|
-
{
|
|
86
|
-
organization: "ayon",
|
|
87
|
-
theme: "dark",
|
|
88
|
-
metadata: {}
|
|
89
|
-
},
|
|
90
|
-
(t) => {
|
|
91
|
-
t && console.error("Error initializing feedback widget:", t);
|
|
92
|
-
}
|
|
93
|
-
), !1;
|
|
94
|
-
}, V = () => {
|
|
95
|
-
const e = window;
|
|
96
|
-
return typeof e.Featurebase == "function" && e.Featurebase(
|
|
97
|
-
"initialize_portal_widget",
|
|
98
|
-
{
|
|
99
|
-
organization: "ayon",
|
|
100
|
-
fullScreen: !0,
|
|
101
|
-
initialPage: "MainView"
|
|
102
|
-
},
|
|
103
|
-
(t) => t ? (console.error("Error initializing portal widget:", t), !1) : !0
|
|
104
|
-
), !1;
|
|
105
|
-
}, W = () => {
|
|
106
|
-
const e = window;
|
|
107
|
-
return typeof e.Featurebase == "function" && e.Featurebase(
|
|
108
|
-
"initialize_survey_widget",
|
|
109
|
-
{
|
|
110
|
-
organization: "ayon",
|
|
111
|
-
placement: "bottom-right",
|
|
112
|
-
theme: "dark",
|
|
113
|
-
email: o?.attrib?.email,
|
|
114
|
-
featurebaseJwt: s?.data?.featurebaseJwt,
|
|
115
|
-
locale: "en"
|
|
116
|
-
},
|
|
117
|
-
(t) => {
|
|
118
|
-
t ? console.error("Error initializing survey widget:", t) : console.log("Survey widget initialized successfully");
|
|
119
|
-
}
|
|
120
|
-
), !1;
|
|
121
|
-
};
|
|
122
|
-
u(() => {
|
|
123
|
-
o?.name && r && (r.disableFeedback || n || (v(), z(), I(), L(), V()));
|
|
124
|
-
}, [o?.name, n, r]);
|
|
125
|
-
const [F, H] = l(!1);
|
|
126
|
-
u(() => {
|
|
127
|
-
!o?.name || !d || !s || !n || F || (E(), W(), H(!0));
|
|
128
|
-
}, [
|
|
129
|
-
o?.name,
|
|
130
|
-
d?.instanceId,
|
|
131
|
-
s?.available,
|
|
132
|
-
n,
|
|
133
|
-
window.location.pathname,
|
|
134
|
-
F
|
|
135
|
-
]), u(() => {
|
|
136
|
-
m || !n || _();
|
|
137
|
-
}, [s, m, n]);
|
|
138
|
-
const N = () => {
|
|
139
|
-
window.postMessage({
|
|
140
|
-
target: "FeaturebaseWidget",
|
|
141
|
-
data: {
|
|
142
|
-
action: "openFeedbackWidget"
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
}, A = (e = "MainView", t) => {
|
|
146
|
-
window.postMessage({
|
|
147
|
-
target: "FeaturebaseWidget",
|
|
148
|
-
data: {
|
|
149
|
-
action: "changePage",
|
|
150
|
-
payload: e,
|
|
151
|
-
openWidget: !0,
|
|
152
|
-
...t && { articleId: t }
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
}, [f, b] = l(!1), h = document.getElementById("fb-messenger-root"), j = (e) => h instanceof HTMLElement && (h.style.display = e ? "block" : "none");
|
|
156
|
-
u(() => {
|
|
157
|
-
!n || !c || j(f);
|
|
158
|
-
}, [n, c, f]), u(() => {
|
|
159
|
-
if (!n || !c) return;
|
|
160
|
-
const e = window;
|
|
161
|
-
typeof e.Featurebase == "function" && e.Featurebase("onHide", function() {
|
|
162
|
-
b(!1);
|
|
163
|
-
});
|
|
164
|
-
}, [n, c]);
|
|
165
|
-
const D = (e = "Home", t) => {
|
|
166
|
-
const a = window;
|
|
167
|
-
if (typeof a.Featurebase != "function") {
|
|
168
|
-
window.alert("Featurebase SDK is not loaded yet. Please try again later."), console.warn("Featurebase SDK is not loaded yet.");
|
|
169
|
-
return;
|
|
170
|
-
}
|
|
171
|
-
if (f) {
|
|
172
|
-
a.Featurebase("hide"), b(!1);
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
switch (b(!0), e) {
|
|
176
|
-
case "Home":
|
|
177
|
-
a.Featurebase("show");
|
|
178
|
-
break;
|
|
179
|
-
case "Messages":
|
|
180
|
-
a.Featurebase("show", "messages");
|
|
181
|
-
break;
|
|
182
|
-
case "Changelog":
|
|
183
|
-
a.Featurebase("show", "changelog");
|
|
184
|
-
break;
|
|
185
|
-
case "Help":
|
|
186
|
-
a.Featurebase("show", "help");
|
|
187
|
-
break;
|
|
188
|
-
case "ShowArticle":
|
|
189
|
-
t ? a.Featurebase("showArticle", t) : a.Featurebase("show", "help");
|
|
190
|
-
break;
|
|
191
|
-
case "NewMessage":
|
|
192
|
-
a.Featurebase("showNewMessage", t);
|
|
193
|
-
break;
|
|
194
|
-
default:
|
|
195
|
-
a.Featurebase("show");
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
return /* @__PURE__ */ g(
|
|
200
|
-
w.Provider,
|
|
201
|
-
{
|
|
202
|
-
value: {
|
|
203
|
-
openSupport: D,
|
|
204
|
-
openFeedback: N,
|
|
205
|
-
openPortal: A,
|
|
206
|
-
messengerLoaded: c,
|
|
207
|
-
unreadCount: M,
|
|
208
|
-
messengerVisibility: f,
|
|
209
|
-
setMessengerVisibility: b,
|
|
210
|
-
loaded: n
|
|
211
|
-
},
|
|
212
|
-
children: i
|
|
213
|
-
}
|
|
214
|
-
);
|
|
215
|
-
}, oe = () => {
|
|
216
|
-
const i = k(w);
|
|
217
|
-
if (!i)
|
|
218
|
-
throw new Error("useFeedback must be used within a FeedbackProvider");
|
|
219
|
-
return i;
|
|
220
|
-
}, K = () => k(w), se = ({ errorMessage: i }) => {
|
|
221
|
-
const n = K();
|
|
222
|
-
if (!i) return null;
|
|
223
|
-
const p = () => n?.openSupport(
|
|
9
|
+
import "react";
|
|
10
|
+
import "./getUris.es.js";
|
|
11
|
+
import "@module-federation/enhanced/runtime";
|
|
12
|
+
import "./DeleteEntitiesContextInstance.es.js";
|
|
13
|
+
import "semver";
|
|
14
|
+
import "./ContextMenuContextInstance.es.js";
|
|
15
|
+
import "clsx";
|
|
16
|
+
import "react-dom";
|
|
17
|
+
import "react-redux";
|
|
18
|
+
import { u as a } from "./ColumnDropIndicator.styled.es.js";
|
|
19
|
+
const S = ({ errorMessage: o }) => {
|
|
20
|
+
const t = a();
|
|
21
|
+
if (!o) return null;
|
|
22
|
+
const p = () => t?.openSupport(
|
|
224
23
|
"NewMessage",
|
|
225
24
|
`I hit a filter error on ${window.location.pathname}
|
|
226
25
|
|
|
227
|
-
Error: ${
|
|
26
|
+
Error: ${o}`
|
|
228
27
|
);
|
|
229
|
-
return /* @__PURE__ */
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
-
|
|
28
|
+
return /* @__PURE__ */ e(m, { children: [
|
|
29
|
+
/* @__PURE__ */ r(
|
|
30
|
+
i,
|
|
232
31
|
{
|
|
233
32
|
variant: "text",
|
|
234
33
|
label: "Copy error message",
|
|
235
34
|
icon: "content_copy",
|
|
236
|
-
"data-tooltip":
|
|
237
|
-
onClick: () =>
|
|
35
|
+
"data-tooltip": o,
|
|
36
|
+
onClick: () => n(o)
|
|
238
37
|
}
|
|
239
38
|
),
|
|
240
|
-
|
|
39
|
+
t?.messengerLoaded && /* @__PURE__ */ r(i, { variant: "text", label: "Report issue", icon: "report", onClick: p })
|
|
241
40
|
] });
|
|
242
41
|
};
|
|
243
42
|
export {
|
|
244
|
-
|
|
245
|
-
se as a,
|
|
246
|
-
K as b,
|
|
247
|
-
oe as u
|
|
43
|
+
S as F
|
|
248
44
|
};
|
package/dist/chunks/Menu.es.js
CHANGED
|
@@ -4,17 +4,21 @@ 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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import Dt from "clsx";
|
|
11
|
-
import "lodash";
|
|
7
|
+
import "@module-federation/enhanced/runtime";
|
|
8
|
+
import "./searchTerms.es.js";
|
|
9
|
+
import "./getUris.es.js";
|
|
12
10
|
import "primereact/confirmdialog";
|
|
11
|
+
import { a as ct, u as at } from "./DeleteEntitiesContextInstance.es.js";
|
|
12
|
+
import "lodash";
|
|
13
13
|
import "react-toastify";
|
|
14
|
-
import { c as Ht } from "./copyToClipboard.es.js";
|
|
15
14
|
import "uuid";
|
|
16
|
-
import "
|
|
17
|
-
|
|
15
|
+
import "semver";
|
|
16
|
+
import "./ContextMenuContextInstance.es.js";
|
|
17
|
+
import kt from "clsx";
|
|
18
|
+
import { createPortal as Dt } from "react-dom";
|
|
19
|
+
import "react-redux";
|
|
20
|
+
import { c as Ht } from "./copyToClipboard.es.js";
|
|
21
|
+
const ie = rt(Mt)`
|
|
18
22
|
display: flex;
|
|
19
23
|
flex-direction: column;
|
|
20
24
|
justify-content: center;
|
|
@@ -32,7 +36,7 @@ const te = rt(Mt)`
|
|
|
32
36
|
h3 {
|
|
33
37
|
font-size: 18px;
|
|
34
38
|
}
|
|
35
|
-
`,
|
|
39
|
+
`, re = rt.div`
|
|
36
40
|
display: flex;
|
|
37
41
|
flex-direction: column;
|
|
38
42
|
flex-grow: 1;
|
|
@@ -232,7 +236,7 @@ function It(a, i, c = "right") {
|
|
|
232
236
|
};
|
|
233
237
|
}, [l]), { position: o, menuRef: d };
|
|
234
238
|
}
|
|
235
|
-
const it = "ayon-menu-dialog", ft = "ayon-menu-content",
|
|
239
|
+
const it = "ayon-menu-dialog", ft = "ayon-menu-content", se = ({
|
|
236
240
|
id: a,
|
|
237
241
|
target: i,
|
|
238
242
|
targetId: c = "",
|
|
@@ -281,7 +285,7 @@ const it = "ayon-menu-dialog", ft = "ayon-menu-content", ne = ({
|
|
|
281
285
|
index: s,
|
|
282
286
|
navigate: i
|
|
283
287
|
}) : t);
|
|
284
|
-
return
|
|
288
|
+
return Dt(
|
|
285
289
|
/* @__PURE__ */ L(
|
|
286
290
|
Lt,
|
|
287
291
|
{
|
|
@@ -295,7 +299,7 @@ const it = "ayon-menu-dialog", ft = "ayon-menu-content", ne = ({
|
|
|
295
299
|
{
|
|
296
300
|
id: ft,
|
|
297
301
|
style: e || { top: 0, left: 0, opacity: 0, visibility: "hidden" },
|
|
298
|
-
className:
|
|
302
|
+
className: kt(f),
|
|
299
303
|
ref: p,
|
|
300
304
|
children: m
|
|
301
305
|
}
|
|
@@ -312,7 +316,7 @@ const it = "ayon-menu-dialog", ft = "ayon-menu-content", ne = ({
|
|
|
312
316
|
}
|
|
313
317
|
}, Nt = (a, i) => a.length === i.length && a.every(
|
|
314
318
|
(c, o) => c.id === i[o].id && c.icon === i[o].icon && c.selected === i[o].selected && c.active === i[o].active
|
|
315
|
-
),
|
|
319
|
+
), le = ({ menu: a = [], onClose: i, header: c, footer: o = "" }) => {
|
|
316
320
|
const { setPowerpackDialog: f } = ct(), { setMenuOpen: d } = at(), [l, e] = lt([]), p = (t, s, u, x) => {
|
|
317
321
|
if (u) return i?.();
|
|
318
322
|
s?.(t), !x && i && i();
|
|
@@ -394,10 +398,10 @@ const it = "ayon-menu-dialog", ft = "ayon-menu-content", ne = ({
|
|
|
394
398
|
] });
|
|
395
399
|
};
|
|
396
400
|
export {
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
+
ie as E,
|
|
402
|
+
se as M,
|
|
403
|
+
le as a,
|
|
404
|
+
re as b,
|
|
401
405
|
ft as c,
|
|
402
406
|
it as d,
|
|
403
407
|
ot as e
|
|
@@ -1,265 +1,23 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "react-toastify";
|
|
7
|
-
import "uuid";
|
|
8
|
-
import { p as le, b as fe, g as ge } from "./getBundleMode.es.js";
|
|
9
|
-
import "./searchTerms.es.js";
|
|
10
|
-
import { cX as Se } from "./getUris.es.js";
|
|
11
|
-
const Me = "uri", V = N(void 0), Le = ({ children: e }) => {
|
|
12
|
-
const t = location.pathname, [n, s] = w(""), c = ["projects", "settings", "dashboard/tasks"];
|
|
13
|
-
T(() => {
|
|
14
|
-
c.some((v) => t.startsWith(`/${v}`)) || s("");
|
|
15
|
-
}, [t, s]);
|
|
16
|
-
const { type: u, entity: a, settings: i } = le(n), o = d(
|
|
17
|
-
({ projectName: l, folderPath: v, taskName: x, productName: M, versionName: L }) => {
|
|
18
|
-
const y = fe({ projectName: l, folderPath: v, taskName: x, productName: M, versionName: L });
|
|
19
|
-
s(y);
|
|
20
|
-
},
|
|
21
|
-
[s]
|
|
22
|
-
), [g] = Se(), S = d(async () => {
|
|
23
|
-
if (u !== "entity" || !n) return [];
|
|
24
|
-
try {
|
|
25
|
-
const l = await g({ resolveRequestModel: { uris: [n] } }).unwrap();
|
|
26
|
-
return console.log("Resolved entity from URI:", l), l;
|
|
27
|
-
} catch (l) {
|
|
28
|
-
return console.warn("Failed to resolve URI:", l), [];
|
|
29
|
-
}
|
|
30
|
-
}, [g, n, u]), p = {
|
|
31
|
-
uri: n,
|
|
32
|
-
uriType: u,
|
|
33
|
-
entity: a,
|
|
34
|
-
settings: i,
|
|
35
|
-
setUri: s,
|
|
36
|
-
setEntityUri: o,
|
|
37
|
-
getUriEntities: S
|
|
38
|
-
};
|
|
39
|
-
return /* @__PURE__ */ D(V.Provider, { value: p, 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
|
-
}, Ce = (e, t) => {
|
|
60
|
-
if (!(typeof window > "u"))
|
|
61
|
-
try {
|
|
62
|
-
sessionStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } }));
|
|
63
|
-
} catch (n) {
|
|
64
|
-
console.error(n);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
function W(e, t) {
|
|
68
|
-
const n = ae(t);
|
|
69
|
-
n.current = t;
|
|
70
|
-
const [s, c] = w(() => 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 g = o.detail?.key;
|
|
77
|
-
if (g && g !== e) return;
|
|
78
|
-
const S = sessionStorage.getItem(e);
|
|
79
|
-
c(U(S, n.current));
|
|
80
|
-
}
|
|
81
|
-
return window.addEventListener("session-storage", i), window.addEventListener("storage", i), () => {
|
|
82
|
-
window.removeEventListener("session-storage", i), window.removeEventListener("storage", i);
|
|
83
|
-
};
|
|
84
|
-
}, [e]);
|
|
85
|
-
const u = d(
|
|
86
|
-
(a) => {
|
|
87
|
-
try {
|
|
88
|
-
c((i) => {
|
|
89
|
-
const o = typeof a == "function" ? a(i) : a;
|
|
90
|
-
return sessionStorage.setItem(e, JSON.stringify(o)), typeof window < "u" && window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } })), o;
|
|
91
|
-
});
|
|
92
|
-
} catch (i) {
|
|
93
|
-
console.error(i);
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
[e]
|
|
97
|
-
);
|
|
98
|
-
return [s, u];
|
|
99
|
-
}
|
|
100
|
-
const Y = N(void 0), me = ["feed", "subtasks", "details", "files"], q = (e) => typeof e == "string" && me.includes(e), De = ({
|
|
101
|
-
children: e,
|
|
102
|
-
defaultTab: t = "feed",
|
|
103
|
-
hasLicense: n,
|
|
104
|
-
debug: s = {},
|
|
105
|
-
...c
|
|
106
|
-
}) => {
|
|
107
|
-
const u = c.user, a = ge(u), i = "isGuest" in s ? s.isGuest : u?.data?.isGuest, { powerLicense: o, setPowerpackDialog: g } = ue(), S = "hasLicense" in s ? s.hasLicense : !!o || n, [p, l] = w({}), [v, x] = w([]), M = d(
|
|
108
|
-
(r) => p[r] ? p[r] : !1,
|
|
109
|
-
[p]
|
|
110
|
-
), L = d(
|
|
111
|
-
(r, m) => {
|
|
112
|
-
const f = { ...p };
|
|
113
|
-
f[r] = m, l(f);
|
|
114
|
-
},
|
|
115
|
-
[p]
|
|
116
|
-
), [y, X] = W(b, {}), $ = d(
|
|
117
|
-
(r) => {
|
|
118
|
-
const m = y[r];
|
|
119
|
-
return q(m) ? m : t;
|
|
120
|
-
},
|
|
121
|
-
[y, t]
|
|
122
|
-
), [B, F] = w(null), z = d((r) => {
|
|
123
|
-
F(r);
|
|
124
|
-
}, []), j = d(() => {
|
|
125
|
-
F(null), B && C([]);
|
|
126
|
-
}, []);
|
|
127
|
-
T(() => {
|
|
128
|
-
j();
|
|
129
|
-
}, [c.useLocation().pathname]);
|
|
130
|
-
const [Q, _] = w(null), Z = d((r) => {
|
|
131
|
-
_(r);
|
|
132
|
-
}, []), k = d(() => {
|
|
133
|
-
_(null);
|
|
134
|
-
}, []), [ee, R] = w(null), [te, C] = w([]), { 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");
|
|
135
|
-
T(() => {
|
|
136
|
-
if (!(!E && !O && !I)) {
|
|
137
|
-
if (ne === "entity" && h && h.entityType !== "product") {
|
|
138
|
-
oe().then((r) => {
|
|
139
|
-
if (r.length === 0) return;
|
|
140
|
-
const m = r.find((ce) => ce.uri === se), f = m?.entities?.[0];
|
|
141
|
-
if (!m || !f) return;
|
|
142
|
-
const G = f?.projectName || h.projectName || "", K = f.representationId || f.versionId || f.productId || f.taskId || f.folderId;
|
|
143
|
-
if (!G || !K) return;
|
|
144
|
-
const re = {
|
|
145
|
-
entityType: h.entityType,
|
|
146
|
-
entities: [
|
|
147
|
-
{
|
|
148
|
-
id: K,
|
|
149
|
-
projectName: G
|
|
150
|
-
}
|
|
151
|
-
],
|
|
152
|
-
source: "uri"
|
|
153
|
-
};
|
|
154
|
-
R(re);
|
|
155
|
-
}).catch((r) => {
|
|
156
|
-
console.warn("Failed to get URI entities:", r);
|
|
157
|
-
});
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
E && O && I && (R({
|
|
161
|
-
entityType: O,
|
|
162
|
-
entities: [
|
|
163
|
-
{
|
|
164
|
-
id: I,
|
|
165
|
-
projectName: E
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
source: "url"
|
|
169
|
-
}), J && (C([J]), X({
|
|
170
|
-
...y,
|
|
171
|
-
overview: "feed"
|
|
172
|
-
})));
|
|
173
|
-
}
|
|
174
|
-
}, [E, O, I]);
|
|
175
|
-
const ie = {
|
|
176
|
-
// open state for the panel by scope
|
|
177
|
-
panelOpenByScope: p,
|
|
178
|
-
getOpenForScope: M,
|
|
179
|
-
setPanelOpen: L,
|
|
180
|
-
setPanelOpenByScope: l,
|
|
181
|
-
// tab preferences
|
|
182
|
-
tabsByScope: y,
|
|
183
|
-
getTabForScope: $,
|
|
184
|
-
// slide out state
|
|
185
|
-
slideOut: B,
|
|
186
|
-
openSlideOut: z,
|
|
187
|
-
closeSlideOut: j,
|
|
188
|
-
// highlighted activities
|
|
189
|
-
highlightedActivities: te,
|
|
190
|
-
setHighlightedActivities: C,
|
|
191
|
-
// PiP state
|
|
192
|
-
pip: Q,
|
|
193
|
-
openPip: Z,
|
|
194
|
-
closePip: k,
|
|
195
|
-
// entities state
|
|
196
|
-
entities: ee,
|
|
197
|
-
setEntities: R,
|
|
198
|
-
feedAnnotations: v,
|
|
199
|
-
setFeedAnnotations: x,
|
|
200
|
-
bundleMode: a,
|
|
201
|
-
isGuest: i,
|
|
202
|
-
hasLicense: S,
|
|
203
|
-
onPowerFeature: g,
|
|
204
|
-
...c
|
|
205
|
-
};
|
|
206
|
-
return /* @__PURE__ */ D(Y.Provider, { value: ie, children: e });
|
|
207
|
-
}, ye = () => {
|
|
208
|
-
const e = A(Y);
|
|
209
|
-
if (e === void 0)
|
|
210
|
-
throw new Error("useDetailsPanel must be used within a DetailsPanelProvider");
|
|
211
|
-
return e;
|
|
212
|
-
}, b = "details/tabs-by-scope", Ne = (e, t) => {
|
|
213
|
-
const n = de(b, {});
|
|
214
|
-
pe(b, { ...n, [e]: t });
|
|
215
|
-
}, Ae = (e) => {
|
|
216
|
-
const { getOpenForScope: t, setPanelOpen: n, getTabForScope: s } = ye(), [c, u] = W(b, {}), a = c[e], i = q(a) ? a : s(e), o = d(
|
|
217
|
-
(S) => {
|
|
218
|
-
u((p) => ({ ...p, [e]: S }));
|
|
219
|
-
},
|
|
220
|
-
[e, u]
|
|
221
|
-
), g = i === "feed";
|
|
222
|
-
return {
|
|
223
|
-
isOpen: t(e),
|
|
224
|
-
setOpen: (S) => n(e, S),
|
|
225
|
-
currentTab: i,
|
|
226
|
-
setTab: o,
|
|
227
|
-
isFeed: g
|
|
228
|
-
};
|
|
229
|
-
}, H = N(void 0), Be = ({ children: e, useNavigate: t }) => {
|
|
230
|
-
const [n, s] = w(!1), c = t(), i = {
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { M as i } from "./DeleteEntitiesContextInstance.es.js";
|
|
4
|
+
const O = ({ children: o, useNavigate: s }) => {
|
|
5
|
+
const [n, t] = p(!1), r = s(), a = {
|
|
231
6
|
menuOpen: n,
|
|
232
|
-
setMenuOpen: (
|
|
233
|
-
|
|
7
|
+
setMenuOpen: (e) => {
|
|
8
|
+
t(e);
|
|
234
9
|
},
|
|
235
|
-
toggleMenuOpen: (
|
|
236
|
-
if (!
|
|
237
|
-
|
|
10
|
+
toggleMenuOpen: (e) => {
|
|
11
|
+
if (!e) {
|
|
12
|
+
t(!1);
|
|
238
13
|
return;
|
|
239
14
|
}
|
|
240
|
-
|
|
15
|
+
t(e === n ? !1 : e);
|
|
241
16
|
},
|
|
242
|
-
navigate:
|
|
17
|
+
navigate: r
|
|
243
18
|
};
|
|
244
|
-
return /* @__PURE__ */
|
|
245
|
-
}, Fe = () => {
|
|
246
|
-
const e = A(H);
|
|
247
|
-
if (e === void 0)
|
|
248
|
-
throw new Error("useMenuContext must be used within a MenuProvider");
|
|
249
|
-
return e;
|
|
19
|
+
return /* @__PURE__ */ u(i.Provider, { value: a, children: o });
|
|
250
20
|
};
|
|
251
21
|
export {
|
|
252
|
-
|
|
253
|
-
Be as M,
|
|
254
|
-
Le as U,
|
|
255
|
-
H as a,
|
|
256
|
-
Me as b,
|
|
257
|
-
ye as c,
|
|
258
|
-
Ae as d,
|
|
259
|
-
we as e,
|
|
260
|
-
W as f,
|
|
261
|
-
Re as r,
|
|
262
|
-
Ne as s,
|
|
263
|
-
Fe as u,
|
|
264
|
-
Ce as w
|
|
22
|
+
O as M
|
|
265
23
|
};
|