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