@ynput/ayon-frontend-shared 0.9.0 → 0.10.0

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