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