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