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