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