@ynput/ayon-frontend-shared 0.6.6 → 0.6.8
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 +4 -4
- package/dist/ListTable.es.js +2 -2
- package/dist/NewEntity.es.js +49 -49
- package/dist/ProjectTreeTable.es.js +501 -496
- package/dist/Slicer.es.js +27 -27
- package/dist/Views.es.js +213 -206
- package/dist/api.es.js +362 -360
- package/dist/chunks/Actions.es.js +21 -21
- package/dist/chunks/CodeEditor.es.js +30 -0
- package/dist/chunks/ColumnDropIndicator.es.js +5 -5
- package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
- package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
- package/dist/chunks/DeleteEntitiesContextInstance.es.js +96 -96
- package/dist/chunks/EmptyPlaceholder.es.js +9 -9
- package/dist/chunks/EntityPath.es.js +3 -3
- package/dist/chunks/EntityTooltip.es.js +1 -1
- package/dist/chunks/EntityUpdatesContext.es.js +1 -1
- package/dist/chunks/Feed.es.js +1625 -1573
- package/dist/chunks/JsonViewer.es.js +1 -1
- package/dist/chunks/Menu.es.js +1 -1
- package/dist/chunks/MenuItem.es.js +25 -25
- package/dist/chunks/MetaWidget.es.js +1537 -1516
- package/dist/chunks/PlayableIcon.es.js +128 -128
- package/dist/chunks/ProjectContext.es.js +11 -11
- package/dist/chunks/ReviewablesSelector.es.js +553 -462
- package/dist/chunks/SimpleForm.es.js +7 -7
- package/dist/chunks/SimpleTable.es.js +110 -110
- package/dist/chunks/Slicer.es.js +80 -80
- package/dist/chunks/TableSettingsFallback.es.js +1 -1
- package/dist/chunks/ThumbnailSimple.es.js +17 -17
- package/dist/chunks/VideoPlayer.es.js +1 -1
- package/dist/chunks/Watchers.es.js +50 -50
- package/dist/chunks/afterStartup.es.js +13 -0
- package/dist/chunks/getBundleMode.es.js +1 -1
- package/dist/chunks/getUris.es.js +797 -827
- package/dist/chunks/searchTerms.es.js +353 -336
- package/dist/chunks/useAttributeEnums.es.js +16 -16
- package/dist/chunks/useHierarchySelection.es.js +2 -2
- package/dist/chunks/useLoadModule.es.js +24 -23
- package/dist/chunks/viewUpdateHelper.es.js +8 -8
- package/dist/components.es.js +205 -202
- package/dist/context.es.js +525 -496
- package/dist/hooks.es.js +190 -166
- package/dist/types/ContextMenu.d.ts +1 -0
- package/dist/types/ProjectTreeTable.d.ts +1 -0
- package/dist/types/Views.d.ts +11 -0
- package/dist/types/api.d.ts +823 -1427
- package/dist/types/components.d.ts +9 -1
- package/dist/types/context.d.ts +1 -0
- package/dist/types/hooks.d.ts +25 -1
- package/dist/types/util.d.ts +10 -0
- package/dist/util.es.js +45 -42
- package/package.json +2 -2
package/dist/context.es.js
CHANGED
|
@@ -1,67 +1,83 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { registerRemotes as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as D, jsxs as ge } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useRef as re, useEffect as $, useCallback as E, useMemo as T } from "react";
|
|
3
|
+
import { registerRemotes as me } from "@module-federation/enhanced/runtime";
|
|
4
|
+
import { toast as M } from "react-toastify";
|
|
5
|
+
import { d as ie, z as he, R as ye, a as ae, p as Pe, A as ve, B as be, G as we, H as Ce, I as Se, J as Ie, K as ke, L as Le, N as xe, O as Ee, Q as Fe, U as De, V as je, W as Te } from "./chunks/DeleteEntitiesContextInstance.es.js";
|
|
6
|
+
import { E as Rt, M as At, X as Mt, P as Ut, Y as Nt, Z as $t, T as Gt, _ as _t, $ as Bt, g as Wt, a0 as Qt, m as Vt, c as qt, a1 as zt, t as Ht, a2 as Yt, a3 as Kt, a4 as Jt, a5 as Xt, a6 as Zt, o as en, u as tn, n as nn, a7 as on, x as sn, y as rn, b as an, a8 as ln, a9 as cn, aa as dn, ab as un, ac as pn, ad as fn } from "./chunks/DeleteEntitiesContextInstance.es.js";
|
|
7
|
+
import { az as Oe, bj as Re } from "./chunks/searchTerms.es.js";
|
|
8
|
+
import { cT as Ae, c4 as Me, ci as Ue, bq as Ne, cV as $e, cE as Ge, bK as _e, c$ as Be, dp as We, cL as Qe } from "./chunks/getUris.es.js";
|
|
6
9
|
import "primereact/confirmdialog";
|
|
7
|
-
import { d as re, z as xe, a as ie, q as Ee, A as De, B as Fe, G as je, H as Te, I as Me, J as Oe, K as Re, L as Ue, N as Ae, O as Ne, Q as Be, U as Ge, V as _e, W as $e } from "./chunks/DeleteEntitiesContextInstance.es.js";
|
|
8
|
-
import { E as Ft, M as jt, X as Tt, P as Mt, Y as Ot, Z as Rt, T as Ut, _ as At, $ as Nt, g as Bt, a0 as Gt, m as _t, c as $t, a1 as Wt, t as qt, a2 as Qt, a3 as zt, a4 as Vt, a5 as Ht, a6 as Yt, v as Kt, u as Jt, n as Xt, a7 as Zt, x as en, y as tn, b as nn, a8 as on, a9 as sn, aa as rn, ab as an, ac as ln, ad as cn } from "./chunks/DeleteEntitiesContextInstance.es.js";
|
|
9
10
|
import "lodash";
|
|
10
|
-
import { toast as G } from "react-toastify";
|
|
11
11
|
import { v4 as J } from "uuid";
|
|
12
|
-
import { g as
|
|
13
|
-
import { u as
|
|
14
|
-
import { P as
|
|
12
|
+
import { g as Ve, p as qe, b as ze } from "./chunks/getBundleMode.es.js";
|
|
13
|
+
import { u as le } from "./chunks/useLoadModule.es.js";
|
|
14
|
+
import { P as mn, T as hn } from "./chunks/ProjectContext.es.js";
|
|
15
15
|
import "react-dom";
|
|
16
|
-
import { p as
|
|
17
|
-
import { a as
|
|
18
|
-
import { M as
|
|
19
|
-
import { u as
|
|
20
|
-
import { E as
|
|
21
|
-
const
|
|
22
|
-
const {
|
|
16
|
+
import { p as He, c as Ye, d as Ke, e as Je, b as oe } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
|
|
17
|
+
import { a as Pn } from "./chunks/DeleteEntitiesConfirmDialog.es.js";
|
|
18
|
+
import { M as bn } from "./chunks/MenuContext.es.js";
|
|
19
|
+
import { u as Xe } from "./chunks/useQueryArgumentChangeLoading.es.js";
|
|
20
|
+
import { E as Cn, F as Sn } from "./chunks/EntityUpdatesContext.es.js";
|
|
21
|
+
const vt = ({ children: d, skip: i }) => {
|
|
22
|
+
const {
|
|
23
|
+
data: r = [],
|
|
24
|
+
isLoading: t,
|
|
25
|
+
isFetching: a
|
|
26
|
+
} = Ae(void 0, {
|
|
23
27
|
skip: i
|
|
24
28
|
}), {
|
|
25
|
-
siteInfo:
|
|
26
|
-
isLoading: { siteInfo:
|
|
27
|
-
} =
|
|
28
|
-
return
|
|
29
|
-
if (
|
|
30
|
-
|
|
31
|
-
h
|
|
29
|
+
siteInfo: c,
|
|
30
|
+
isLoading: { siteInfo: f }
|
|
31
|
+
} = ie(), [y, P] = w(!1), C = re({});
|
|
32
|
+
return $(() => {
|
|
33
|
+
if (!y || a) return;
|
|
34
|
+
const l = r.filter(({ addonName: p, addonVersion: b }) => {
|
|
35
|
+
const h = C.current[p];
|
|
36
|
+
return h !== void 0 && h !== b;
|
|
37
|
+
}), e = "addon-versions-changed";
|
|
38
|
+
if (!l.length) {
|
|
39
|
+
M.dismiss(e);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
const n = l.map((p) => `${p.addonName} ${p.addonVersion}`).join(", "), u = /* @__PURE__ */ D(ye, { message: `Addons updated (${n}). Refresh to load them.` });
|
|
43
|
+
M.isActive(e) ? M.update(e, { render: u }) : M.info(u, { toastId: e, autoClose: !1, closeOnClick: !1 });
|
|
44
|
+
}, [r, a, y]), $(() => {
|
|
45
|
+
if (t || f || y) return;
|
|
46
|
+
if (!r.length) {
|
|
47
|
+
P(!0);
|
|
32
48
|
return;
|
|
33
49
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const { addonName:
|
|
37
|
-
Object.entries(
|
|
38
|
-
|
|
39
|
-
remote:
|
|
40
|
-
addon:
|
|
41
|
-
version:
|
|
42
|
-
modules:
|
|
50
|
+
const l = [];
|
|
51
|
+
r.forEach((e) => {
|
|
52
|
+
const { addonName: n, addonVersion: u, modules: p = {} } = e;
|
|
53
|
+
Object.entries(p).forEach(([b, h]) => {
|
|
54
|
+
l.push({
|
|
55
|
+
remote: b,
|
|
56
|
+
addon: n,
|
|
57
|
+
version: u,
|
|
58
|
+
modules: h
|
|
43
59
|
});
|
|
44
60
|
});
|
|
45
|
-
}),
|
|
46
|
-
|
|
47
|
-
name:
|
|
48
|
-
alias:
|
|
49
|
-
entry: `/addons/${
|
|
61
|
+
}), C.current = Object.fromEntries(l.map((e) => [e.addon, e.version])), me(
|
|
62
|
+
l.map((e) => ({
|
|
63
|
+
name: e.remote,
|
|
64
|
+
alias: e.remote,
|
|
65
|
+
entry: `/addons/${e.addon || e.remote}/${e.version}/frontend/modules/${e.remote}/remoteEntry.js?server=${c?.releaseInfo?.version || c?.releaseInfo}-${c?.releaseInfo?.buildDate}-${(/* @__PURE__ */ new Date()).getTime()}`,
|
|
50
66
|
type: "module"
|
|
51
67
|
}))
|
|
52
|
-
),
|
|
53
|
-
}, [
|
|
54
|
-
|
|
68
|
+
), P(!0);
|
|
69
|
+
}, [r, t, f, y]), /* @__PURE__ */ D(
|
|
70
|
+
he.Provider,
|
|
55
71
|
{
|
|
56
72
|
value: {
|
|
57
|
-
isLoading:
|
|
58
|
-
modules:
|
|
59
|
-
remotesInitialized:
|
|
73
|
+
isLoading: t,
|
|
74
|
+
modules: r,
|
|
75
|
+
remotesInitialized: y
|
|
60
76
|
},
|
|
61
|
-
children:
|
|
77
|
+
children: d
|
|
62
78
|
}
|
|
63
79
|
);
|
|
64
|
-
},
|
|
80
|
+
}, Ze = {
|
|
65
81
|
planner: {
|
|
66
82
|
label: "Planner",
|
|
67
83
|
icon: "calendar_month",
|
|
@@ -106,52 +122,52 @@ const mt = ({ children: f, skip: i }) => {
|
|
|
106
122
|
"dataPortability"
|
|
107
123
|
]
|
|
108
124
|
}
|
|
109
|
-
},
|
|
110
|
-
children:
|
|
125
|
+
}, bt = ({
|
|
126
|
+
children: d,
|
|
111
127
|
defaultTab: i = "feed",
|
|
112
|
-
hasLicense:
|
|
113
|
-
debug:
|
|
114
|
-
...
|
|
128
|
+
hasLicense: r,
|
|
129
|
+
debug: t = {},
|
|
130
|
+
...a
|
|
115
131
|
}) => {
|
|
116
|
-
const c =
|
|
117
|
-
(
|
|
118
|
-
[
|
|
119
|
-
),
|
|
120
|
-
(
|
|
121
|
-
const
|
|
122
|
-
|
|
132
|
+
const c = a.user, f = Ve(c), y = "isGuest" in t ? t.isGuest : c?.data?.isGuest, { powerLicense: P, setPowerpackDialog: C } = ae(), l = "hasLicense" in t ? t.hasLicense : !!P || r, [e, n] = w({}), [u, p] = w([]), [b, h] = w([]), x = E(
|
|
133
|
+
(S) => e[S] ? e[S] : !1,
|
|
134
|
+
[e]
|
|
135
|
+
), F = E(
|
|
136
|
+
(S, G) => {
|
|
137
|
+
const A = { ...e };
|
|
138
|
+
A[S] = G, n(A);
|
|
123
139
|
},
|
|
124
|
-
[
|
|
125
|
-
), [
|
|
126
|
-
(
|
|
127
|
-
const
|
|
128
|
-
return
|
|
140
|
+
[e]
|
|
141
|
+
), [g, o] = Pe(Ce, {}), m = E(
|
|
142
|
+
(S) => {
|
|
143
|
+
const G = g[S];
|
|
144
|
+
return ve(G) ? G : i;
|
|
129
145
|
},
|
|
130
|
-
[
|
|
131
|
-
), [
|
|
132
|
-
I(
|
|
133
|
-
}, []),
|
|
134
|
-
I(null),
|
|
146
|
+
[g, i]
|
|
147
|
+
), [v, I] = w(null), O = E((S) => {
|
|
148
|
+
I(S);
|
|
149
|
+
}, []), j = E(() => {
|
|
150
|
+
I(null), v && N([]);
|
|
135
151
|
}, []);
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}, [
|
|
139
|
-
const [
|
|
140
|
-
k(
|
|
141
|
-
}, []),
|
|
152
|
+
$(() => {
|
|
153
|
+
j();
|
|
154
|
+
}, [a.useLocation().pathname]);
|
|
155
|
+
const [s, k] = w(null), L = E((S) => {
|
|
156
|
+
k(S);
|
|
157
|
+
}, []), R = E(() => {
|
|
142
158
|
k(null);
|
|
143
|
-
}, []), [U, _] =
|
|
144
|
-
|
|
145
|
-
if (!(!
|
|
146
|
-
if (Y === "entity" &&
|
|
147
|
-
|
|
148
|
-
if (
|
|
149
|
-
const
|
|
150
|
-
if (!
|
|
151
|
-
const te =
|
|
159
|
+
}, []), [U, _] = w(null), [H, N] = w([]), { uriType: Y, uri: de, entity: B, getUriEntities: ue } = be(), [W] = a.useSearchParams(), Q = W.get("project"), V = W.get("type"), q = W.get("id"), X = W.get("activity");
|
|
160
|
+
$(() => {
|
|
161
|
+
if (!(!Q && !V && !q)) {
|
|
162
|
+
if (Y === "entity" && B && B.entityType !== "product") {
|
|
163
|
+
ue().then((S) => {
|
|
164
|
+
if (S.length === 0) return;
|
|
165
|
+
const G = S.find((fe) => fe.uri === de), A = G?.entities?.[0];
|
|
166
|
+
if (!G || !A) return;
|
|
167
|
+
const te = A?.projectName || B.projectName || "", ne = A.representationId || A.versionId || A.productId || A.taskId || A.folderId;
|
|
152
168
|
if (!te || !ne) return;
|
|
153
|
-
const
|
|
154
|
-
entityType:
|
|
169
|
+
const pe = {
|
|
170
|
+
entityType: B.entityType,
|
|
155
171
|
entities: [
|
|
156
172
|
{
|
|
157
173
|
id: ne,
|
|
@@ -160,138 +176,138 @@ const mt = ({ children: f, skip: i }) => {
|
|
|
160
176
|
],
|
|
161
177
|
source: "uri"
|
|
162
178
|
};
|
|
163
|
-
_(
|
|
164
|
-
}).catch((
|
|
165
|
-
console.warn("Failed to get URI entities:",
|
|
179
|
+
_(pe);
|
|
180
|
+
}).catch((S) => {
|
|
181
|
+
console.warn("Failed to get URI entities:", S);
|
|
166
182
|
});
|
|
167
183
|
return;
|
|
168
184
|
}
|
|
169
|
-
|
|
170
|
-
entityType:
|
|
185
|
+
Q && V && q && (_({
|
|
186
|
+
entityType: V,
|
|
171
187
|
entities: [
|
|
172
188
|
{
|
|
173
|
-
id:
|
|
174
|
-
projectName:
|
|
189
|
+
id: q,
|
|
190
|
+
projectName: Q
|
|
175
191
|
}
|
|
176
192
|
],
|
|
177
193
|
source: "url"
|
|
178
|
-
}), X && (
|
|
179
|
-
...
|
|
194
|
+
}), X && (N([X]), o({
|
|
195
|
+
...g,
|
|
180
196
|
overview: "feed"
|
|
181
197
|
})));
|
|
182
198
|
}
|
|
183
|
-
}, [
|
|
184
|
-
const
|
|
199
|
+
}, [Q, V, q]);
|
|
200
|
+
const z = {
|
|
185
201
|
// open state for the panel by scope
|
|
186
|
-
panelOpenByScope:
|
|
202
|
+
panelOpenByScope: e,
|
|
187
203
|
getOpenForScope: x,
|
|
188
|
-
setPanelOpen:
|
|
204
|
+
setPanelOpen: F,
|
|
189
205
|
setPanelOpenByScope: n,
|
|
190
206
|
// tab preferences
|
|
191
|
-
tabsByScope:
|
|
192
|
-
getTabForScope:
|
|
207
|
+
tabsByScope: g,
|
|
208
|
+
getTabForScope: m,
|
|
193
209
|
// slide out state
|
|
194
|
-
slideOut:
|
|
195
|
-
openSlideOut:
|
|
196
|
-
closeSlideOut:
|
|
210
|
+
slideOut: v,
|
|
211
|
+
openSlideOut: O,
|
|
212
|
+
closeSlideOut: j,
|
|
197
213
|
// highlighted activities
|
|
198
214
|
highlightedActivities: H,
|
|
199
|
-
setHighlightedActivities:
|
|
215
|
+
setHighlightedActivities: N,
|
|
200
216
|
// PiP state
|
|
201
|
-
pip:
|
|
217
|
+
pip: s,
|
|
202
218
|
openPip: L,
|
|
203
|
-
closePip:
|
|
219
|
+
closePip: R,
|
|
204
220
|
// entities state
|
|
205
221
|
entities: U,
|
|
206
222
|
setEntities: _,
|
|
207
223
|
feedAnnotations: u,
|
|
208
|
-
setFeedAnnotations:
|
|
209
|
-
feedFrameLinks:
|
|
210
|
-
setFeedFrameLinks:
|
|
211
|
-
bundleMode:
|
|
212
|
-
isGuest:
|
|
213
|
-
hasLicense:
|
|
214
|
-
onPowerFeature:
|
|
215
|
-
...
|
|
216
|
-
}, K =
|
|
217
|
-
return (ee.length !== Object.keys(Z).length || ee.some((
|
|
218
|
-
},
|
|
219
|
-
const { setPowerpackDialog: i } =
|
|
220
|
-
return
|
|
221
|
-
i({ addon: "planner", feature: "subtasks" }),
|
|
222
|
-
}, [i,
|
|
223
|
-
},
|
|
224
|
-
const [i, { outdated:
|
|
224
|
+
setFeedAnnotations: p,
|
|
225
|
+
feedFrameLinks: b,
|
|
226
|
+
setFeedFrameLinks: h,
|
|
227
|
+
bundleMode: f,
|
|
228
|
+
isGuest: y,
|
|
229
|
+
hasLicense: l,
|
|
230
|
+
onPowerFeature: C,
|
|
231
|
+
...a
|
|
232
|
+
}, K = re(z), Z = K.current, ee = Object.keys(z);
|
|
233
|
+
return (ee.length !== Object.keys(Z).length || ee.some((S) => Z[S] !== z[S])) && (K.current = z), /* @__PURE__ */ D(we.Provider, { value: K.current, children: d });
|
|
234
|
+
}, et = (d) => {
|
|
235
|
+
const { setPowerpackDialog: i } = ae();
|
|
236
|
+
return $(() => {
|
|
237
|
+
i({ addon: "planner", feature: "subtasks" }), d?.onNotFound?.();
|
|
238
|
+
}, [i, d.onNotFound]), null;
|
|
239
|
+
}, wt = ({ children: d }) => {
|
|
240
|
+
const [i, { outdated: r, isLoading: t }] = le({
|
|
225
241
|
addon: "planner",
|
|
226
242
|
remote: "planner",
|
|
227
243
|
module: "SubtasksManager",
|
|
228
|
-
fallback:
|
|
244
|
+
fallback: et
|
|
229
245
|
});
|
|
230
|
-
return /* @__PURE__ */
|
|
231
|
-
|
|
246
|
+
return /* @__PURE__ */ D(
|
|
247
|
+
Se.Provider,
|
|
232
248
|
{
|
|
233
|
-
value: { SubtasksManager: i, requiredVersion:
|
|
234
|
-
children:
|
|
249
|
+
value: { SubtasksManager: i, requiredVersion: r?.required, isLoading: t },
|
|
250
|
+
children: d
|
|
235
251
|
}
|
|
236
252
|
);
|
|
237
|
-
},
|
|
238
|
-
const [i,
|
|
239
|
-
|
|
240
|
-
},
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
},
|
|
247
|
-
|
|
253
|
+
}, Ct = ({ children: d }) => {
|
|
254
|
+
const [i, r] = w(!1), [t, a] = w(null), [c, f] = w(null), y = () => {
|
|
255
|
+
r(!0), a(null);
|
|
256
|
+
}, P = () => {
|
|
257
|
+
r(!1), a(null);
|
|
258
|
+
}, C = (n, u = null) => {
|
|
259
|
+
r((p) => !p), n && !i ? (a(n), f(u)) : (a(null), f(null));
|
|
260
|
+
}, l = (n, u = null) => {
|
|
261
|
+
a(n), f(u);
|
|
262
|
+
}, e = () => {
|
|
263
|
+
a(null), f(null);
|
|
248
264
|
};
|
|
249
|
-
return /* @__PURE__ */
|
|
250
|
-
|
|
265
|
+
return /* @__PURE__ */ D(
|
|
266
|
+
Ie.Provider,
|
|
251
267
|
{
|
|
252
268
|
value: {
|
|
253
269
|
isPanelOpen: i,
|
|
254
|
-
selectedSetting:
|
|
270
|
+
selectedSetting: t,
|
|
255
271
|
highlightedSetting: c,
|
|
256
|
-
setHighlightedSetting:
|
|
257
|
-
openPanel:
|
|
258
|
-
closePanel:
|
|
259
|
-
togglePanel:
|
|
260
|
-
selectSetting:
|
|
261
|
-
backToMainMenu:
|
|
272
|
+
setHighlightedSetting: f,
|
|
273
|
+
openPanel: y,
|
|
274
|
+
closePanel: P,
|
|
275
|
+
togglePanel: C,
|
|
276
|
+
selectSetting: l,
|
|
277
|
+
backToMainMenu: e
|
|
262
278
|
},
|
|
263
|
-
children:
|
|
279
|
+
children: d
|
|
264
280
|
}
|
|
265
281
|
);
|
|
266
282
|
};
|
|
267
|
-
function
|
|
268
|
-
const i = window.location.protocol === "https:" || window.location.hostname === "localhost",
|
|
269
|
-
|
|
270
|
-
}, [
|
|
271
|
-
async (
|
|
272
|
-
if (!
|
|
273
|
-
|
|
283
|
+
function St({ children: d }) {
|
|
284
|
+
const i = window.location.protocol === "https:" || window.location.hostname === "localhost", r = "documentPictureInPicture" in window && i, [t, a] = w(null), [c, f] = w(null), y = E(() => {
|
|
285
|
+
f(null), t != null && (t.close(), a(null));
|
|
286
|
+
}, [t, c]), P = E(
|
|
287
|
+
async (l, e) => {
|
|
288
|
+
if (!r) {
|
|
289
|
+
f(J());
|
|
274
290
|
return;
|
|
275
291
|
}
|
|
276
|
-
if (
|
|
277
|
-
console.log("pipWindow is already open"),
|
|
292
|
+
if (t != null) {
|
|
293
|
+
console.log("pipWindow is already open"), f(J());
|
|
278
294
|
return;
|
|
279
295
|
}
|
|
280
296
|
const n = await window.documentPictureInPicture.requestWindow({
|
|
281
|
-
width:
|
|
282
|
-
height:
|
|
297
|
+
width: l,
|
|
298
|
+
height: e
|
|
283
299
|
});
|
|
284
300
|
n.addEventListener("pagehide", () => {
|
|
285
|
-
|
|
286
|
-
}),
|
|
301
|
+
a(null), f(null);
|
|
302
|
+
}), a(n), f(J());
|
|
287
303
|
},
|
|
288
|
-
[
|
|
304
|
+
[t, c]
|
|
289
305
|
);
|
|
290
|
-
|
|
291
|
-
[...document.styleSheets].forEach((
|
|
306
|
+
$(() => {
|
|
307
|
+
[...document.styleSheets].forEach((l) => {
|
|
292
308
|
try {
|
|
293
|
-
const
|
|
294
|
-
n.textContent =
|
|
309
|
+
const e = [...l.cssRules].map((p) => p.cssText).join(""), n = document.createElement("style");
|
|
310
|
+
n.textContent = e, t?.document.head.appendChild(n);
|
|
295
311
|
const u = document.createElement("style");
|
|
296
312
|
u.textContent = `
|
|
297
313
|
html, body, .pipRoot {
|
|
@@ -299,276 +315,289 @@ function vt({ children: f }) {
|
|
|
299
315
|
margin: 0;
|
|
300
316
|
padding: 0;
|
|
301
317
|
overflow: hidden;
|
|
302
|
-
}`,
|
|
318
|
+
}`, t?.document.head.appendChild(u);
|
|
303
319
|
} catch {
|
|
304
320
|
const n = document.createElement("link");
|
|
305
|
-
if (
|
|
321
|
+
if (l.href == null)
|
|
306
322
|
return;
|
|
307
|
-
n.rel = "stylesheet", n.type =
|
|
323
|
+
n.rel = "stylesheet", n.type = l.type, n.media = l.media.toString(), n.href = l.href, t?.document.head.appendChild(n);
|
|
308
324
|
}
|
|
309
325
|
});
|
|
310
|
-
}, [
|
|
311
|
-
const
|
|
312
|
-
isSupported:
|
|
313
|
-
pipWindow:
|
|
326
|
+
}, [t]);
|
|
327
|
+
const C = T(() => ({
|
|
328
|
+
isSupported: r,
|
|
329
|
+
pipWindow: t,
|
|
314
330
|
pipId: c,
|
|
315
|
-
requestPipWindow:
|
|
316
|
-
closePipWindow:
|
|
317
|
-
}), [
|
|
318
|
-
return /* @__PURE__ */
|
|
331
|
+
requestPipWindow: P,
|
|
332
|
+
closePipWindow: y
|
|
333
|
+
}), [y, r, t, P]);
|
|
334
|
+
return /* @__PURE__ */ D(ke.Provider, { value: C, children: d });
|
|
319
335
|
}
|
|
320
|
-
const
|
|
321
|
-
children:
|
|
336
|
+
const It = ({
|
|
337
|
+
children: d,
|
|
322
338
|
projectName: i,
|
|
323
339
|
// utils
|
|
324
|
-
toast:
|
|
325
|
-
...
|
|
340
|
+
toast: r,
|
|
341
|
+
...t
|
|
326
342
|
}) => {
|
|
327
|
-
const { data:
|
|
343
|
+
const { data: a } = Me(
|
|
328
344
|
{ projectName: i },
|
|
329
345
|
{ skip: !i }
|
|
330
|
-
), { user: c } =
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
|
|
346
|
+
), { user: c } = ie();
|
|
347
|
+
return /* @__PURE__ */ D(
|
|
348
|
+
Le.Provider,
|
|
333
349
|
{
|
|
334
350
|
value: {
|
|
335
|
-
...
|
|
351
|
+
...t,
|
|
336
352
|
projectName: i,
|
|
337
|
-
project:
|
|
353
|
+
project: a,
|
|
338
354
|
user: c,
|
|
339
|
-
toast:
|
|
355
|
+
toast: r
|
|
340
356
|
},
|
|
341
|
-
children:
|
|
357
|
+
children: d
|
|
342
358
|
}
|
|
343
359
|
);
|
|
344
|
-
},
|
|
345
|
-
|
|
360
|
+
}, kt = ({ children: d, ...i }) => /* @__PURE__ */ D(xe.Provider, { value: { ...i }, children: d }), ce = "powerpack-license", tt = () => {
|
|
361
|
+
try {
|
|
362
|
+
const d = localStorage.getItem(ce);
|
|
363
|
+
return d === null ? null : d === "true";
|
|
364
|
+
} catch {
|
|
365
|
+
return null;
|
|
366
|
+
}
|
|
367
|
+
}, nt = (d) => {
|
|
368
|
+
try {
|
|
369
|
+
localStorage.setItem(ce, String(d));
|
|
370
|
+
} catch {
|
|
371
|
+
}
|
|
372
|
+
}, Lt = ({
|
|
373
|
+
children: d,
|
|
346
374
|
debug: i
|
|
347
375
|
}) => {
|
|
348
|
-
const [
|
|
349
|
-
o === null ? (
|
|
350
|
-
}, []),
|
|
376
|
+
const [r, t] = w(null), [a, c] = w(null), f = (o) => o !== null && typeof o == "object" && "addon" in o, y = E((o) => {
|
|
377
|
+
o === null ? (t(null), c(null)) : f(o) ? (t(null), c(o)) : (c(null), t(o));
|
|
378
|
+
}, []), P = (o) => o ? He[o] : null, C = (o) => {
|
|
351
379
|
if (!o) return null;
|
|
352
|
-
const
|
|
353
|
-
return
|
|
354
|
-
}, [
|
|
380
|
+
const m = Ze[o.addon];
|
|
381
|
+
return m ? { ...m, selectedFeature: o.feature } : null;
|
|
382
|
+
}, [l, e] = w(!1), [n] = w(tt), [u, p] = w(!0), b = async () => !1, [h, { isLoaded: x, isLoading: F }] = le({
|
|
355
383
|
addon: "powerpack",
|
|
356
384
|
remote: "license",
|
|
357
385
|
module: "checkPowerLicense",
|
|
358
|
-
fallback:
|
|
386
|
+
fallback: b
|
|
359
387
|
});
|
|
360
|
-
|
|
388
|
+
$(() => {
|
|
361
389
|
(async () => {
|
|
362
390
|
if (i?.powerLicense !== void 0)
|
|
363
|
-
console.warn("Using debug power license:", i.powerLicense),
|
|
364
|
-
else if (
|
|
391
|
+
console.warn("Using debug power license:", i.powerLicense), e(i.powerLicense), p(!1);
|
|
392
|
+
else if (x || !F) {
|
|
365
393
|
try {
|
|
366
|
-
const
|
|
367
|
-
|
|
368
|
-
} catch (
|
|
369
|
-
console.error("Error checking power license:",
|
|
394
|
+
const m = await h();
|
|
395
|
+
e(m), nt(m);
|
|
396
|
+
} catch (m) {
|
|
397
|
+
console.error("Error checking power license:", m), e(!1);
|
|
370
398
|
} finally {
|
|
371
|
-
|
|
399
|
+
p(!1);
|
|
372
400
|
}
|
|
373
|
-
|
|
401
|
+
p(!1);
|
|
374
402
|
}
|
|
375
403
|
})();
|
|
376
|
-
}, [i,
|
|
377
|
-
const
|
|
404
|
+
}, [i, x, F, h]);
|
|
405
|
+
const g = T(
|
|
378
406
|
() => ({
|
|
379
|
-
powerLicense:
|
|
380
|
-
isLoading:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
407
|
+
powerLicense: l,
|
|
408
|
+
isLoading: u,
|
|
409
|
+
storedLicense: n,
|
|
410
|
+
selectedPowerPack: r,
|
|
411
|
+
selectedAddon: a,
|
|
412
|
+
setPowerpackDialog: y,
|
|
413
|
+
powerpackDialog: P(r),
|
|
414
|
+
addonDialog: C(a)
|
|
386
415
|
}),
|
|
387
|
-
[
|
|
416
|
+
[l, r, a, y, u, n]
|
|
388
417
|
);
|
|
389
|
-
return /* @__PURE__ */
|
|
390
|
-
},
|
|
418
|
+
return /* @__PURE__ */ D(Ee.Provider, { value: g, children: d });
|
|
419
|
+
}, xt = ({ children: d, skip: i = !1 }) => {
|
|
391
420
|
const {
|
|
392
|
-
data:
|
|
393
|
-
isLoading:
|
|
394
|
-
error:
|
|
395
|
-
} =
|
|
396
|
-
data:
|
|
397
|
-
isLoading:
|
|
398
|
-
error:
|
|
399
|
-
} =
|
|
421
|
+
data: r = {},
|
|
422
|
+
isLoading: t,
|
|
423
|
+
error: a
|
|
424
|
+
} = Ue({ full: !0 }, { skip: i }), { data: c, isLoading: f, error: y } = Ne(), {
|
|
425
|
+
data: P = [],
|
|
426
|
+
isLoading: C,
|
|
427
|
+
error: l
|
|
428
|
+
} = $e({}, { skip: i }), e = T(() => P.filter((b) => b.active), [P]), {
|
|
400
429
|
data: n,
|
|
401
430
|
isLoading: u,
|
|
402
|
-
error:
|
|
403
|
-
} =
|
|
404
|
-
return /* @__PURE__ */
|
|
405
|
-
|
|
431
|
+
error: p
|
|
432
|
+
} = Ge(void 0, { skip: !c?.name });
|
|
433
|
+
return /* @__PURE__ */ D(
|
|
434
|
+
Fe.Provider,
|
|
406
435
|
{
|
|
407
436
|
value: {
|
|
408
|
-
siteInfo:
|
|
409
|
-
attributes:
|
|
437
|
+
siteInfo: r,
|
|
438
|
+
attributes: r?.attributes || [],
|
|
410
439
|
user: c,
|
|
411
440
|
cloudInfo: n,
|
|
412
441
|
projects: {
|
|
413
|
-
all:
|
|
414
|
-
active:
|
|
442
|
+
all: P,
|
|
443
|
+
active: e
|
|
415
444
|
},
|
|
416
445
|
isLoading: {
|
|
417
|
-
siteInfo:
|
|
418
|
-
user:
|
|
446
|
+
siteInfo: t,
|
|
447
|
+
user: f,
|
|
419
448
|
cloudInfo: u,
|
|
420
|
-
projects:
|
|
449
|
+
projects: C
|
|
421
450
|
},
|
|
422
451
|
error: {
|
|
423
|
-
siteInfo:
|
|
424
|
-
user:
|
|
425
|
-
cloudInfo:
|
|
426
|
-
projects:
|
|
452
|
+
siteInfo: a,
|
|
453
|
+
user: y,
|
|
454
|
+
cloudInfo: p,
|
|
455
|
+
projects: l
|
|
427
456
|
}
|
|
428
457
|
},
|
|
429
|
-
children:
|
|
458
|
+
children: d
|
|
430
459
|
}
|
|
431
460
|
);
|
|
432
|
-
},
|
|
433
|
-
projectName:
|
|
461
|
+
}, Et = ({
|
|
462
|
+
projectName: d,
|
|
434
463
|
children: i
|
|
435
464
|
}) => {
|
|
436
465
|
const {
|
|
437
|
-
data: { folders:
|
|
438
|
-
isLoading:
|
|
439
|
-
isFetching:
|
|
466
|
+
data: { folders: r = [] } = {},
|
|
467
|
+
isLoading: t,
|
|
468
|
+
isFetching: a,
|
|
440
469
|
isSuccess: c,
|
|
441
|
-
isUninitialized:
|
|
442
|
-
error:
|
|
443
|
-
refetch:
|
|
444
|
-
} =
|
|
445
|
-
const
|
|
446
|
-
for (const
|
|
447
|
-
|
|
448
|
-
return
|
|
449
|
-
}, [
|
|
450
|
-
() => (
|
|
451
|
-
if (!
|
|
452
|
-
const
|
|
453
|
-
let
|
|
454
|
-
for (; I.size > 0 &&
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
if (!
|
|
458
|
-
const k =
|
|
470
|
+
isUninitialized: f,
|
|
471
|
+
error: y,
|
|
472
|
+
refetch: P
|
|
473
|
+
} = _e({ projectName: d, attrib: !0 }), C = Xe({ projectName: d }, a || t), l = T(() => {
|
|
474
|
+
const g = /* @__PURE__ */ new Map();
|
|
475
|
+
for (const o of r)
|
|
476
|
+
g.set(o.id, o);
|
|
477
|
+
return g;
|
|
478
|
+
}, [r]), e = T(() => (g) => l.get(g), [l]), n = T(
|
|
479
|
+
() => (g, o, m = {}) => {
|
|
480
|
+
if (!o.length) return {};
|
|
481
|
+
const v = {}, I = new Set(o), O = /* @__PURE__ */ new Set();
|
|
482
|
+
let j = g;
|
|
483
|
+
for (; I.size > 0 && j && !O.has(j); ) {
|
|
484
|
+
O.add(j);
|
|
485
|
+
const s = l.get(j);
|
|
486
|
+
if (!s) break;
|
|
487
|
+
const k = s.attrib || {};
|
|
459
488
|
for (const L of Array.from(I))
|
|
460
|
-
|
|
461
|
-
([
|
|
489
|
+
s.ownAttrib?.includes(L) && L in k && (v[L] = Object.entries(k).find(
|
|
490
|
+
([R]) => R === L
|
|
462
491
|
)?.[1], I.delete(L));
|
|
463
|
-
|
|
492
|
+
j = s.parentId;
|
|
464
493
|
}
|
|
465
|
-
for (const
|
|
466
|
-
|
|
467
|
-
for (const
|
|
468
|
-
|
|
469
|
-
return
|
|
494
|
+
for (const s of Array.from(I))
|
|
495
|
+
s in m && (v[s] = m[s], I.delete(s));
|
|
496
|
+
for (const s of I)
|
|
497
|
+
v[s] = null;
|
|
498
|
+
return v;
|
|
470
499
|
},
|
|
471
|
-
[
|
|
500
|
+
[l]
|
|
472
501
|
), u = T(
|
|
473
|
-
() => (
|
|
474
|
-
const
|
|
475
|
-
let
|
|
476
|
-
for (;
|
|
477
|
-
|
|
478
|
-
const I =
|
|
502
|
+
() => (g) => {
|
|
503
|
+
const o = [], m = /* @__PURE__ */ new Set();
|
|
504
|
+
let v = g;
|
|
505
|
+
for (; v && !m.has(v); ) {
|
|
506
|
+
m.add(v);
|
|
507
|
+
const I = l.get(v);
|
|
479
508
|
if (!I?.parentId) break;
|
|
480
|
-
|
|
509
|
+
o.push(I.parentId), v = I.parentId;
|
|
481
510
|
}
|
|
482
|
-
return
|
|
511
|
+
return o;
|
|
483
512
|
},
|
|
484
|
-
[
|
|
485
|
-
),
|
|
486
|
-
() => (
|
|
487
|
-
const
|
|
488
|
-
return
|
|
513
|
+
[l]
|
|
514
|
+
), p = T(
|
|
515
|
+
() => (g) => {
|
|
516
|
+
const o = new Set(g);
|
|
517
|
+
return g.filter((m) => !u(m).some((v) => o.has(v)));
|
|
489
518
|
},
|
|
490
519
|
[u]
|
|
491
|
-
),
|
|
492
|
-
const
|
|
493
|
-
for (const
|
|
494
|
-
if (!
|
|
495
|
-
const
|
|
496
|
-
|
|
520
|
+
), b = T(() => {
|
|
521
|
+
const g = /* @__PURE__ */ new Map();
|
|
522
|
+
for (const o of r) {
|
|
523
|
+
if (!o.parentId) continue;
|
|
524
|
+
const m = g.get(o.parentId);
|
|
525
|
+
m ? m.push(o.id) : g.set(o.parentId, [o.id]);
|
|
497
526
|
}
|
|
498
|
-
return
|
|
499
|
-
}, [
|
|
500
|
-
() => (
|
|
501
|
-
const
|
|
502
|
-
for (;
|
|
503
|
-
const I =
|
|
504
|
-
for (const
|
|
505
|
-
|
|
527
|
+
return g;
|
|
528
|
+
}, [r]), h = T(
|
|
529
|
+
() => (g, o = !1) => {
|
|
530
|
+
const m = o ? [...g] : [], v = [...g];
|
|
531
|
+
for (; v.length > 0; ) {
|
|
532
|
+
const I = v.shift();
|
|
533
|
+
for (const O of b.get(I) || [])
|
|
534
|
+
m.push(O), v.push(O);
|
|
506
535
|
}
|
|
507
|
-
return
|
|
536
|
+
return m;
|
|
508
537
|
},
|
|
509
|
-
[
|
|
510
|
-
), x = () =>
|
|
538
|
+
[b]
|
|
539
|
+
), x = () => P().unwrap(), F = T(
|
|
511
540
|
() => ({
|
|
512
|
-
folders:
|
|
513
|
-
getFolderById:
|
|
541
|
+
folders: r,
|
|
542
|
+
getFolderById: e,
|
|
514
543
|
findNonInheritedValues: n,
|
|
515
544
|
getParentFolderIds: u,
|
|
516
|
-
getFolderIdsWithoutChildren:
|
|
517
|
-
getChildFolderIds:
|
|
518
|
-
isLoading:
|
|
545
|
+
getFolderIdsWithoutChildren: p,
|
|
546
|
+
getChildFolderIds: h,
|
|
547
|
+
isLoading: C,
|
|
519
548
|
// first time and when args change
|
|
520
|
-
isFetching:
|
|
549
|
+
isFetching: a,
|
|
521
550
|
// any background fetching
|
|
522
551
|
isSuccess: c,
|
|
523
|
-
isUninitialized:
|
|
524
|
-
error:
|
|
552
|
+
isUninitialized: f,
|
|
553
|
+
error: y,
|
|
525
554
|
refetch: x
|
|
526
555
|
}),
|
|
527
556
|
[
|
|
528
|
-
|
|
529
|
-
|
|
557
|
+
r,
|
|
558
|
+
e,
|
|
530
559
|
n,
|
|
531
560
|
u,
|
|
532
|
-
|
|
533
|
-
v,
|
|
534
|
-
g,
|
|
535
|
-
r,
|
|
536
|
-
c,
|
|
537
|
-
d,
|
|
561
|
+
p,
|
|
538
562
|
h,
|
|
563
|
+
C,
|
|
564
|
+
a,
|
|
565
|
+
c,
|
|
566
|
+
f,
|
|
567
|
+
y,
|
|
539
568
|
x
|
|
540
569
|
]
|
|
541
570
|
);
|
|
542
|
-
return /* @__PURE__ */
|
|
543
|
-
},
|
|
544
|
-
const i = location.pathname, [
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
}, [i,
|
|
548
|
-
const { type: c, entity:
|
|
549
|
-
({ projectName: n, folderPath: u, taskName:
|
|
550
|
-
const x =
|
|
551
|
-
|
|
571
|
+
return /* @__PURE__ */ D(De.Provider, { value: F, children: i });
|
|
572
|
+
}, Ft = "uri", Dt = ({ children: d }) => {
|
|
573
|
+
const i = location.pathname, [r, t] = w(""), a = ["projects", "settings", "dashboard/tasks"];
|
|
574
|
+
$(() => {
|
|
575
|
+
a.some((u) => i.startsWith(`/${u}`)) || t("");
|
|
576
|
+
}, [i, t]);
|
|
577
|
+
const { type: c, entity: f, settings: y } = qe(r), P = E(
|
|
578
|
+
({ projectName: n, folderPath: u, taskName: p, productName: b, versionName: h }) => {
|
|
579
|
+
const x = ze({ projectName: n, folderPath: u, taskName: p, productName: b, versionName: h });
|
|
580
|
+
t(x);
|
|
552
581
|
},
|
|
553
|
-
[
|
|
554
|
-
), [
|
|
555
|
-
if (c !== "entity" || !
|
|
582
|
+
[t]
|
|
583
|
+
), [C] = Be(), l = E(async () => {
|
|
584
|
+
if (c !== "entity" || !r) return [];
|
|
556
585
|
try {
|
|
557
|
-
const n = await
|
|
586
|
+
const n = await C({ resolveRequestModel: { uris: [r] } }).unwrap();
|
|
558
587
|
return console.log("Resolved entity from URI:", n), n;
|
|
559
588
|
} catch (n) {
|
|
560
589
|
return console.warn("Failed to resolve URI:", n), [];
|
|
561
590
|
}
|
|
562
|
-
}, [
|
|
563
|
-
uri:
|
|
591
|
+
}, [C, r, c]), e = {
|
|
592
|
+
uri: r,
|
|
564
593
|
uriType: c,
|
|
565
|
-
entity:
|
|
566
|
-
settings:
|
|
567
|
-
setUri:
|
|
568
|
-
setEntityUri:
|
|
569
|
-
getUriEntities:
|
|
594
|
+
entity: f,
|
|
595
|
+
settings: y,
|
|
596
|
+
setUri: t,
|
|
597
|
+
setEntityUri: P,
|
|
598
|
+
getUriEntities: l
|
|
570
599
|
};
|
|
571
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ D(je.Provider, { value: e, children: d });
|
|
572
601
|
}, se = [
|
|
573
602
|
"representation",
|
|
574
603
|
"version",
|
|
@@ -576,67 +605,67 @@ const bt = ({
|
|
|
576
605
|
"product",
|
|
577
606
|
"task",
|
|
578
607
|
"folder"
|
|
579
|
-
],
|
|
580
|
-
const [i] =
|
|
581
|
-
(
|
|
608
|
+
], ot = "delete-folder-with-children", jt = ({ children: d }) => {
|
|
609
|
+
const [i] = We(), [r] = Qe(), [t, a] = w(null), [c, f] = w(null), y = E(
|
|
610
|
+
(e) => new Promise((n) => f({ payload: e, resolve: n })),
|
|
582
611
|
[]
|
|
583
|
-
),
|
|
584
|
-
async (
|
|
585
|
-
if (!
|
|
586
|
-
|
|
612
|
+
), P = E(
|
|
613
|
+
async (e, n) => {
|
|
614
|
+
if (!e || e.length === 0) {
|
|
615
|
+
M.error("No entities selected");
|
|
587
616
|
return;
|
|
588
617
|
}
|
|
589
|
-
const u = /* @__PURE__ */ new Set(),
|
|
590
|
-
if (
|
|
591
|
-
|
|
618
|
+
const u = /* @__PURE__ */ new Set(), p = e.filter((s) => !s?.id || u.has(s.id) ? !1 : (u.add(s.id), !0));
|
|
619
|
+
if (p.length === 0) {
|
|
620
|
+
M.error("No entities found");
|
|
592
621
|
return;
|
|
593
622
|
}
|
|
594
|
-
const
|
|
595
|
-
if (
|
|
623
|
+
const b = new Set(p.map((s) => s.id)), h = p.filter((s) => s.entityType === "folder" && s.parentId ? !b.has(s.parentId) : (s.entityType === "task" || s.entityType === "product") && s.folderId ? !b.has(s.folderId) : !0), x = async (s, k) => {
|
|
624
|
+
if (s.length === 0) return;
|
|
596
625
|
const L = /* @__PURE__ */ new Map();
|
|
597
|
-
for (const
|
|
598
|
-
const U = L.get(
|
|
599
|
-
U.push(
|
|
626
|
+
for (const R of s) {
|
|
627
|
+
const U = L.get(R.projectName) || [];
|
|
628
|
+
U.push(R), L.set(R.projectName, U);
|
|
600
629
|
}
|
|
601
630
|
await Promise.all(
|
|
602
|
-
Array.from(L.entries()).map(([
|
|
631
|
+
Array.from(L.entries()).map(([R, U]) => {
|
|
603
632
|
const H = [...U].sort(
|
|
604
|
-
(
|
|
605
|
-
).map((
|
|
633
|
+
(N, Y) => se.indexOf(N.entityType) - se.indexOf(Y.entityType)
|
|
634
|
+
).map((N) => ({
|
|
606
635
|
type: "delete",
|
|
607
|
-
entityType:
|
|
608
|
-
entityId:
|
|
636
|
+
entityType: N.entityType,
|
|
637
|
+
entityId: N.id,
|
|
609
638
|
force: k
|
|
610
639
|
}));
|
|
611
640
|
return i({
|
|
612
641
|
operationsRequestModel: { operations: H },
|
|
613
|
-
projectName:
|
|
642
|
+
projectName: R
|
|
614
643
|
}).unwrap();
|
|
615
644
|
})
|
|
616
645
|
);
|
|
617
|
-
},
|
|
646
|
+
}, F = async () => {
|
|
618
647
|
try {
|
|
619
|
-
await x(
|
|
620
|
-
} catch (
|
|
621
|
-
throw { message:
|
|
648
|
+
await x(h, !1), n?.onSuccess?.();
|
|
649
|
+
} catch (s) {
|
|
650
|
+
throw { message: Re(s) || "Failed to delete entities", ...s };
|
|
622
651
|
}
|
|
623
|
-
},
|
|
624
|
-
|
|
652
|
+
}, g = () => x(
|
|
653
|
+
h.filter((s) => s.entityType === "folder" || s.entityType === "task"),
|
|
625
654
|
!0
|
|
626
|
-
),
|
|
627
|
-
let
|
|
628
|
-
if (
|
|
629
|
-
const
|
|
630
|
-
for (const k of
|
|
631
|
-
const L =
|
|
632
|
-
L.push(k),
|
|
655
|
+
), o = h.filter((s) => s.entityType === "folder");
|
|
656
|
+
let m = [];
|
|
657
|
+
if (o.length > 0) {
|
|
658
|
+
const s = /* @__PURE__ */ new Map();
|
|
659
|
+
for (const k of o) {
|
|
660
|
+
const L = s.get(k.projectName) || [];
|
|
661
|
+
L.push(k), s.set(k.projectName, L);
|
|
633
662
|
}
|
|
634
663
|
try {
|
|
635
|
-
|
|
636
|
-
Array.from(
|
|
637
|
-
([L,
|
|
664
|
+
m = (await Promise.all(
|
|
665
|
+
Array.from(s.entries()).map(
|
|
666
|
+
([L, R]) => r({
|
|
638
667
|
projectName: L,
|
|
639
|
-
folderIds:
|
|
668
|
+
folderIds: R.map((U) => U.id)
|
|
640
669
|
}).unwrap()
|
|
641
670
|
)
|
|
642
671
|
)).flat();
|
|
@@ -644,159 +673,159 @@ const bt = ({
|
|
|
644
673
|
console.warn("Failed to fetch folder delete info, falling back to local data", k);
|
|
645
674
|
}
|
|
646
675
|
}
|
|
647
|
-
const
|
|
648
|
-
I > 0 &&
|
|
676
|
+
const v = Ye(o, m), I = h.filter((s) => s.entityType === "product").length;
|
|
677
|
+
I > 0 && v.push(
|
|
649
678
|
I > 1 ? "Deleting these products also deletes all their versions" : "Deleting this product also deletes all its versions"
|
|
650
679
|
);
|
|
651
|
-
const
|
|
652
|
-
|
|
680
|
+
const O = Ke(h), j = h.length === 1 ? h[0] : void 0;
|
|
681
|
+
a({
|
|
653
682
|
payload: {
|
|
654
|
-
entityLabel:
|
|
655
|
-
childrenDetails:
|
|
656
|
-
expectedCounts:
|
|
657
|
-
expectedName:
|
|
683
|
+
entityLabel: O,
|
|
684
|
+
childrenDetails: v,
|
|
685
|
+
expectedCounts: Je(h, m),
|
|
686
|
+
expectedName: j && (j.label || j.name || j.id)
|
|
658
687
|
},
|
|
659
|
-
accept:
|
|
660
|
-
recover: async (
|
|
661
|
-
entityLabel:
|
|
662
|
-
message: `Are you really sure you want to delete ${
|
|
688
|
+
accept: F,
|
|
689
|
+
recover: async (s) => Oe(s).includes(ot) ? await y({
|
|
690
|
+
entityLabel: O,
|
|
691
|
+
message: `Are you really sure you want to delete ${O} and all of its dependencies? This cannot be undone. (NOT RECOMMENDED)`,
|
|
663
692
|
childrenDetails: [],
|
|
664
693
|
expectedCounts: {},
|
|
665
694
|
deleteLabel: "Force delete"
|
|
666
|
-
}) ? (await
|
|
695
|
+
}) ? (await g(), n?.onSuccess?.(), "recovered") : "cancelled" : "unhandled"
|
|
667
696
|
});
|
|
668
697
|
},
|
|
669
|
-
[i,
|
|
670
|
-
),
|
|
671
|
-
if (!
|
|
672
|
-
const { payload:
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
render: `${
|
|
698
|
+
[i, r, y]
|
|
699
|
+
), C = E(async () => {
|
|
700
|
+
if (!t) return;
|
|
701
|
+
const { payload: e, accept: n, recover: u } = t;
|
|
702
|
+
a(null);
|
|
703
|
+
const p = e.entityLabel, b = M.loading(`Deleting ${p}...`, { autoClose: !1 }), h = () => M.update(b, {
|
|
704
|
+
render: `${p} deleted`,
|
|
676
705
|
type: "success",
|
|
677
706
|
autoClose: 5e3,
|
|
678
707
|
isLoading: !1
|
|
679
708
|
});
|
|
680
709
|
try {
|
|
681
|
-
await n(),
|
|
710
|
+
await n(), h();
|
|
682
711
|
} catch (x) {
|
|
683
|
-
let
|
|
712
|
+
let F = x;
|
|
684
713
|
try {
|
|
685
|
-
const
|
|
686
|
-
if (
|
|
687
|
-
if (
|
|
688
|
-
return
|
|
689
|
-
render: `${
|
|
714
|
+
const o = await u(x);
|
|
715
|
+
if (o === "recovered") return h();
|
|
716
|
+
if (o === "cancelled")
|
|
717
|
+
return M.update(b, {
|
|
718
|
+
render: `${p} was not deleted`,
|
|
690
719
|
type: "info",
|
|
691
720
|
autoClose: 5e3,
|
|
692
721
|
isLoading: !1
|
|
693
722
|
});
|
|
694
|
-
} catch (
|
|
695
|
-
|
|
723
|
+
} catch (o) {
|
|
724
|
+
F = o;
|
|
696
725
|
}
|
|
697
|
-
const
|
|
698
|
-
|
|
699
|
-
render:
|
|
726
|
+
const g = typeof F == "string" ? F : F?.message || F?.error || `Error deleting ${p}`;
|
|
727
|
+
M.update(b, {
|
|
728
|
+
render: g,
|
|
700
729
|
type: "error",
|
|
701
730
|
autoClose: 5e3,
|
|
702
731
|
isLoading: !1
|
|
703
732
|
});
|
|
704
733
|
}
|
|
705
|
-
}, [
|
|
706
|
-
return /* @__PURE__ */
|
|
707
|
-
|
|
708
|
-
|
|
734
|
+
}, [t]), l = T(() => ({ deleteEntities: P }), [P]);
|
|
735
|
+
return /* @__PURE__ */ ge(Te.Provider, { value: l, children: [
|
|
736
|
+
d,
|
|
737
|
+
t && /* @__PURE__ */ D(
|
|
709
738
|
oe,
|
|
710
739
|
{
|
|
711
|
-
payload:
|
|
712
|
-
onConfirm:
|
|
713
|
-
onCancel: () =>
|
|
740
|
+
payload: t.payload,
|
|
741
|
+
onConfirm: C,
|
|
742
|
+
onCancel: () => a(null)
|
|
714
743
|
}
|
|
715
744
|
),
|
|
716
|
-
c && /* @__PURE__ */
|
|
745
|
+
c && /* @__PURE__ */ D(
|
|
717
746
|
oe,
|
|
718
747
|
{
|
|
719
748
|
payload: c.payload,
|
|
720
749
|
onConfirm: () => {
|
|
721
|
-
|
|
750
|
+
f(null), c.resolve(!0);
|
|
722
751
|
},
|
|
723
752
|
onCancel: () => {
|
|
724
|
-
|
|
753
|
+
f(null), c.resolve(!1);
|
|
725
754
|
}
|
|
726
755
|
}
|
|
727
756
|
)
|
|
728
757
|
] });
|
|
729
758
|
};
|
|
730
759
|
export {
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
760
|
+
xe as AddonContext,
|
|
761
|
+
Le as AddonProjectContext,
|
|
762
|
+
It as AddonProjectProvider,
|
|
763
|
+
kt as AddonProvider,
|
|
764
|
+
Te as DeleteEntitiesContext,
|
|
765
|
+
jt as DeleteEntitiesProvider,
|
|
766
|
+
we as DetailsPanelContext,
|
|
767
|
+
bt as DetailsPanelProvider,
|
|
768
|
+
Rt as EntityUpdatesContext,
|
|
769
|
+
Cn as EntityUpdatesProvider,
|
|
770
|
+
Sn as FORCE_AUTO_SYNC,
|
|
771
|
+
Fe as GlobalContext,
|
|
772
|
+
xt as GlobalProvider,
|
|
773
|
+
At as MenuContext,
|
|
774
|
+
bn as MenuProvider,
|
|
775
|
+
ke as PiPContext,
|
|
776
|
+
St as PiPProvider,
|
|
777
|
+
Mt as PiPWrapper,
|
|
778
|
+
Ee as PowerpackContext,
|
|
779
|
+
Lt as PowerpackProvider,
|
|
780
|
+
Ut as ProjectContext,
|
|
781
|
+
mn as ProjectContextProvider,
|
|
782
|
+
De as ProjectFoldersContext,
|
|
783
|
+
Et as ProjectFoldersContextProvider,
|
|
784
|
+
he as RemoteModulesContext,
|
|
785
|
+
vt as RemoteModulesProvider,
|
|
786
|
+
Ie as SettingsPanelContext,
|
|
787
|
+
Ct as SettingsPanelProvider,
|
|
788
|
+
Nt as SocketContext,
|
|
789
|
+
$t as SocketProvider,
|
|
790
|
+
Se as SubtasksModulesContext,
|
|
791
|
+
wt as SubtasksModulesProvider,
|
|
792
|
+
Ce as TABS_BY_SCOPE_KEY,
|
|
793
|
+
Gt as ThumbnailUploadContext,
|
|
794
|
+
hn as ThumbnailUploadProvider,
|
|
795
|
+
je as URIContext,
|
|
796
|
+
Dt as URIProvider,
|
|
797
|
+
Ft as URL_PARAM_ID,
|
|
798
|
+
Ze as addonConfigs,
|
|
799
|
+
_t as getActivityFrameLink,
|
|
800
|
+
Bt as getAutoSyncForTopic,
|
|
801
|
+
Wt as getUpdateType,
|
|
802
|
+
Qt as isDeletableEntityType,
|
|
803
|
+
ve as isDetailsPanelTab,
|
|
804
|
+
Vt as matchesProject,
|
|
805
|
+
qt as matchesTopic,
|
|
806
|
+
Pn as powerpackFeatureOrder,
|
|
807
|
+
He as powerpackFeatures,
|
|
808
|
+
zt as setDetailsPanelTabForScope,
|
|
809
|
+
Ht as toggleSyncAll,
|
|
810
|
+
Yt as useAddonContext,
|
|
811
|
+
Kt as useAddonProjectContext,
|
|
812
|
+
Jt as useAutoSyncSettings,
|
|
813
|
+
Xt as useDeleteEntitiesContext,
|
|
814
|
+
Zt as useDeleteEntitiesContextOptional,
|
|
815
|
+
en as useDetailsPanelContext,
|
|
816
|
+
ie as useGlobalContext,
|
|
817
|
+
tn as useMenuContext,
|
|
818
|
+
nn as useOptionalProjectContext,
|
|
819
|
+
on as usePiPWindow,
|
|
820
|
+
ae as usePowerpack,
|
|
821
|
+
sn as useProjectContext,
|
|
822
|
+
rn as useProjectFoldersContext,
|
|
823
|
+
an as useRemoteModules,
|
|
824
|
+
ln as useScopedDetailsPanel,
|
|
825
|
+
cn as useSettingsPanel,
|
|
826
|
+
dn as useSocketContext,
|
|
827
|
+
un as useSubtasksModulesContext,
|
|
828
|
+
pn as useSyncUpdates,
|
|
829
|
+
fn as useThumbnailUploadContext,
|
|
830
|
+
be as useURIContext
|
|
802
831
|
};
|