@ynput/ayon-frontend-shared 0.6.8 → 0.7.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 (67) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/Feed.es.js +64 -58
  4. package/dist/ListTable.es.js +423 -423
  5. package/dist/NewEntity.es.js +44 -43
  6. package/dist/ProjectTreeTable.es.js +3517 -3378
  7. package/dist/Slicer.es.js +301 -276
  8. package/dist/Views.es.js +366 -352
  9. package/dist/api.es.js +428 -413
  10. package/dist/chunks/Actions.es.js +18 -17
  11. package/dist/chunks/ColumnDropIndicator.es.js +21 -20
  12. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  13. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  14. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  15. package/dist/chunks/DetailsDialog.es.js +26 -24
  16. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  17. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  18. package/dist/chunks/EntityPath.es.js +60 -59
  19. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  20. package/dist/chunks/EntityTooltip.es.js +15 -14
  21. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  22. package/dist/chunks/Feed.es.js +1072 -1088
  23. package/dist/chunks/FilterErrorActions.es.js +4 -3
  24. package/dist/chunks/Menu.es.js +633 -289
  25. package/dist/chunks/MenuContext.es.js +1 -1
  26. package/dist/chunks/MetaWidget.es.js +2449 -2199
  27. package/dist/chunks/PlayableIcon.es.js +128 -88
  28. package/dist/chunks/ProjectContext.es.js +6 -6
  29. package/dist/chunks/RepresentationsList.es.js +1 -1
  30. package/dist/chunks/ReviewablesSelector.es.js +627 -611
  31. package/dist/chunks/SimpleForm.es.js +11 -10
  32. package/dist/chunks/SimpleTable.es.js +386 -363
  33. package/dist/chunks/Slicer.es.js +956 -823
  34. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  35. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  36. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  37. package/dist/chunks/VideoPlayer.es.js +1 -1
  38. package/dist/chunks/Watchers.es.js +224 -223
  39. package/dist/chunks/getBundleMode.es.js +33 -25
  40. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  41. package/dist/chunks/getUris.es.js +3873 -3736
  42. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  43. package/dist/chunks/searchTerms.es.js +621 -499
  44. package/dist/chunks/sortLists.es.js +22 -0
  45. package/dist/chunks/useAttributeEnums.es.js +43 -43
  46. package/dist/chunks/useDateRangeFilter.es.js +85 -59
  47. package/dist/chunks/useHierarchySelection.es.js +6 -5
  48. package/dist/chunks/useLoadModule.es.js +24 -23
  49. package/dist/chunks/viewUpdateHelper.es.js +41 -40
  50. package/dist/components.es.js +963 -891
  51. package/dist/context.es.js +528 -501
  52. package/dist/hooks.es.js +15 -15
  53. package/dist/index.es.js +6 -6
  54. package/dist/types/ContextMenu.d.ts +4 -1
  55. package/dist/types/Feed.d.ts +55 -1
  56. package/dist/types/ListTable.d.ts +1 -1
  57. package/dist/types/ProjectTreeTable.d.ts +128 -15
  58. package/dist/types/SimpleTable.d.ts +2 -1
  59. package/dist/types/Slicer.d.ts +26 -1
  60. package/dist/types/Views.d.ts +2 -0
  61. package/dist/types/api.d.ts +2359 -590
  62. package/dist/types/components.d.ts +542 -4
  63. package/dist/types/context.d.ts +94 -2
  64. package/dist/types/util.d.ts +58 -0
  65. package/dist/util.es.js +141 -129
  66. package/package.json +2 -2
  67. package/dist/chunks/MenuItem.es.js +0 -420
@@ -1,59 +1,60 @@
1
- import { jsxs as k, jsx as l } from "react/jsx-runtime";
2
- import W, { createContext as g, useContext as d, useRef as S, useState as b, useEffect as v, useCallback as O, useMemo as re, forwardRef as M } from "react";
1
+ import { jsxs as R, jsx as l } from "react/jsx-runtime";
2
+ import W, { createContext as p, useContext as d, useRef as b, useState as S, useEffect as x, useCallback as O, useMemo as re, forwardRef as M } from "react";
3
3
  import { Button as $, theme as z, Icon as ae, Dialog as ie, InputText as K } from "@ynput/ayon-react-components";
4
4
  import u from "styled-components";
5
- import A from "clsx";
6
- import { a as ce, K as J } from "./platform.es.js";
7
- import { debounce as B, isEqual as le } from "lodash";
5
+ import D from "clsx";
6
+ import { a as ce, K as B } from "./platform.es.js";
7
+ import { debounce as J, isEqual as le } from "lodash";
8
8
  import { confirmDialog as de } from "primereact/confirmdialog";
9
9
  import { toast as H } from "react-toastify";
10
10
  import "uuid";
11
- import { bf as T, a as ue } from "./searchTerms.es.js";
12
- import { cO as pe } from "./getUris.es.js";
11
+ import { bp as T, a as ue } from "./searchTerms.es.js";
12
+ import { cT as pe } from "./getUris.es.js";
13
13
  import "@module-federation/enhanced/runtime";
14
14
  import "./ContextMenuContextInstance.es.js";
15
15
  import { createPortal as ge } from "react-dom";
16
16
  import { Dialog as fe } from "primereact/dialog";
17
17
  import he, { ReadyState as me } from "react-use-websocket";
18
18
  import "react-redux";
19
+ import "react-router-dom";
19
20
  import "semver";
20
- const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */ k("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
21
+ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ */ R("div", { style: { display: "flex", gap: 8, alignItems: "center" }, children: [
21
22
  e,
22
23
  /* @__PURE__ */ l($, { onClick: () => window.location.reload(), variant: "filled", children: "Refresh" })
23
- ] }), ve = g(void 0), kt = () => d(ve) || {}, xe = g({
24
+ ] }), xe = p(void 0), At = () => d(xe) || {}, ve = p({
24
25
  isLoading: !0,
25
26
  modules: [],
26
27
  remotesInitialized: !1
27
28
  }), Dt = () => {
28
- const e = d(xe);
29
+ const e = d(ve);
29
30
  if (e === void 0)
30
31
  throw new Error("useRemoteModules must be used within a RemoteModulesProvider");
31
32
  return e;
32
- }, Se = g(void 0), Rt = () => {
33
- const e = d(Se);
33
+ }, be = p(void 0), _t = () => {
34
+ const e = d(be);
34
35
  if (e === void 0)
35
36
  throw new Error("usePowerpack must be used within a PowerpackProvider");
36
37
  return e;
37
- }, be = g(void 0), At = () => {
38
- const e = d(be);
38
+ }, Se = p(void 0), Nt = () => {
39
+ const e = d(Se);
39
40
  if (e === void 0)
40
41
  throw new Error("useURIContext must be used within a URIProvider");
41
42
  return e;
42
- }, N = (e, t = null) => {
43
+ }, _ = (e, t = null) => {
43
44
  if (!e) return t;
44
45
  try {
45
46
  return JSON.parse(e);
46
47
  } catch {
47
48
  return t;
48
49
  }
49
- }, Nt = (e, t) => {
50
+ }, Ot = (e, t) => {
50
51
  if (typeof window > "u") return t;
51
52
  try {
52
- return N(sessionStorage.getItem(e), t);
53
+ return _(sessionStorage.getItem(e), t);
53
54
  } catch {
54
55
  return t;
55
56
  }
56
- }, _t = (e, t) => {
57
+ }, Lt = (e, t) => {
57
58
  if (!(typeof window > "u"))
58
59
  try {
59
60
  sessionStorage.setItem(e, JSON.stringify(t)), window.dispatchEvent(new CustomEvent("session-storage", { detail: { key: e } }));
@@ -62,18 +63,18 @@ const we = ({ message: e = "Refresh to see latest changes." }) => /* @__PURE__ *
62
63
  }
63
64
  };
64
65
  function ye(e, t) {
65
- const o = S(t);
66
+ const o = b(t);
66
67
  o.current = t;
67
- const [i, n] = b(() => typeof window > "u" ? t : N(sessionStorage.getItem(e), t));
68
- v(() => {
68
+ const [i, n] = S(() => typeof window > "u" ? t : _(sessionStorage.getItem(e), t));
69
+ x(() => {
69
70
  const s = sessionStorage.getItem(e);
70
- n(N(s, o.current)), s || sessionStorage.setItem(e, JSON.stringify(o.current));
71
+ n(_(s, o.current)), s || sessionStorage.setItem(e, JSON.stringify(o.current));
71
72
  function a(c) {
72
73
  if ("key" in c && c.key && c.key !== e) return;
73
- const p = c.detail?.key;
74
- if (p && p !== e) return;
74
+ const g = c.detail?.key;
75
+ if (g && g !== e) return;
75
76
  const f = sessionStorage.getItem(e);
76
- n(N(f, o.current));
77
+ n(_(f, o.current));
77
78
  }
78
79
  return window.addEventListener("session-storage", a), window.addEventListener("storage", a), () => {
79
80
  window.removeEventListener("session-storage", a), window.removeEventListener("storage", a);
@@ -94,7 +95,7 @@ function ye(e, t) {
94
95
  );
95
96
  return [i, r];
96
97
  }
97
- const _ = (e, t = null) => {
98
+ const N = (e, t = null) => {
98
99
  if (!e) return t;
99
100
  try {
100
101
  return JSON.parse(e);
@@ -104,7 +105,7 @@ const _ = (e, t = null) => {
104
105
  }, Ce = (e, t) => {
105
106
  if (typeof window > "u") return t;
106
107
  try {
107
- return _(localStorage.getItem(e), t);
108
+ return N(localStorage.getItem(e), t);
108
109
  } catch {
109
110
  return t;
110
111
  }
@@ -116,20 +117,20 @@ const _ = (e, t = null) => {
116
117
  console.error(o);
117
118
  }
118
119
  };
119
- function Ot(e, t) {
120
- const o = S(t);
120
+ function jt(e, t) {
121
+ const o = b(t);
121
122
  o.current = t;
122
- const [i, n] = b(() => {
123
+ const [i, n] = S(() => {
123
124
  const s = localStorage.getItem(e);
124
- return _(s, t);
125
+ return N(s, t);
125
126
  });
126
- v(() => {
127
+ x(() => {
127
128
  const s = localStorage.getItem(e);
128
- n(_(s, o.current)), s || localStorage.setItem(e, JSON.stringify(o.current));
129
+ n(N(s, o.current)), s || localStorage.setItem(e, JSON.stringify(o.current));
129
130
  function a(c) {
130
131
  if (c.key && c.key !== e) return;
131
- const p = localStorage.getItem(e);
132
- n(_(p, o.current));
132
+ const g = localStorage.getItem(e);
133
+ n(N(g, o.current));
133
134
  }
134
135
  return window.addEventListener("storage", a), () => {
135
136
  window.removeEventListener("storage", a);
@@ -152,53 +153,53 @@ function Ot(e, t) {
152
153
  );
153
154
  return [i, r];
154
155
  }
155
- const Ee = g(void 0), Ie = ["feed", "subtasks", "details", "files"], Te = (e) => typeof e == "string" && Ie.includes(e), Lt = (e) => {
156
+ const Ee = p(void 0), Ie = ["feed", "subtasks", "details", "files"], Te = (e) => typeof e == "string" && Ie.includes(e), Mt = (e) => {
156
157
  const { startFrame: t, endFrame: o } = e.activityData || {}, i = e.origin?.id ?? e.entityId;
157
158
  if (!Number.isSafeInteger(t) || !i) return null;
158
159
  const n = t, r = Number.isSafeInteger(o) ? Math.max(n, o) : n;
159
160
  return { entityId: i, startFrame: n, endFrame: r };
160
- }, ke = () => {
161
+ }, Re = () => {
161
162
  const e = d(Ee);
162
163
  if (e === void 0)
163
164
  throw new Error("useDetailsPanel must be used within a DetailsPanelProvider");
164
165
  return e;
165
- }, j = "details/tabs-by-scope", jt = (e, t) => {
166
+ }, j = "details/tabs-by-scope", $t = (e, t) => {
166
167
  const o = Ce(j, {});
167
168
  Pe(j, { ...o, [e]: t });
168
- }, Mt = (e) => {
169
- const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } = ke(), [n, r] = ye(j, {}), s = n[e], a = Te(s) ? s : i(e), c = O(
169
+ }, Ft = (e) => {
170
+ const { getOpenForScope: t, setPanelOpen: o, getTabForScope: i } = Re(), [n, r] = ye(j, {}), s = n[e], a = Te(s) ? s : i(e), c = O(
170
171
  (f) => {
171
172
  r((y) => ({ ...y, [e]: f }));
172
173
  },
173
174
  [e, r]
174
- ), p = a === "feed";
175
+ ), g = a === "feed";
175
176
  return {
176
177
  isOpen: t(e),
177
178
  setOpen: (f) => o(e, f),
178
179
  currentTab: a,
179
180
  setTab: c,
180
- isFeed: p
181
+ isFeed: g
181
182
  };
182
- }, De = g(
183
+ }, ke = p(
183
184
  void 0
184
- ), $t = () => {
185
- const e = d(De);
185
+ ), Ut = () => {
186
+ const e = d(ke);
186
187
  if (!e)
187
188
  throw new Error("useSubtasksModulesContext must be used within a SubtasksModulesProvider");
188
189
  return e;
189
- }, Re = g({}), Ft = () => {
190
- const e = d(Re);
190
+ }, Ae = p({}), Vt = () => {
191
+ const e = d(Ae);
191
192
  if (!e)
192
193
  throw new Error("useThumbnailUploadContext must be used within a ThumbnailUploadProvider");
193
194
  return e;
194
- }, Ae = g(void 0), Ut = () => {
195
- const e = d(Ae);
195
+ }, De = p(void 0), Wt = () => {
196
+ const e = d(De);
196
197
  if (e === void 0)
197
198
  throw new Error("useSettingsPanel must be used within a SettingsPanelProvider");
198
199
  return e;
199
- }, Ne = g(void 0);
200
- function _e() {
201
- const e = d(Ne);
200
+ }, _e = p(void 0);
201
+ function Ne() {
202
+ const e = d(_e);
202
203
  if (e === void 0)
203
204
  throw new Error("usePiPWindow must be used within a PiPContext");
204
205
  return e;
@@ -235,8 +236,8 @@ const Le = u(fe)`
235
236
  &:hover {
236
237
  background-color: #3d3e40;
237
238
  }
238
- `, Vt = ({ children: e }) => {
239
- const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } = _e(), r = o && W.isValidElement(e) ? W.cloneElement(e, { id: o }) : e;
239
+ `, Bt = ({ children: e }) => {
240
+ const { pipWindow: t, pipId: o, isSupported: i, closePipWindow: n } = Ne(), r = o && W.isValidElement(e) ? W.cloneElement(e, { id: o }) : e;
240
241
  return !i && o ? /* @__PURE__ */ l(
241
242
  Le,
242
243
  {
@@ -264,35 +265,35 @@ const Le = u(fe)`
264
265
  children: r
265
266
  }
266
267
  ) : t && /* @__PURE__ */ l(Oe, { pipWindow: t, children: /* @__PURE__ */ l("div", { className: "pipRoot", children: r }) });
267
- }, Me = g(void 0), Wt = () => {
268
+ }, Me = p(void 0), Jt = () => {
268
269
  const e = d(Me);
269
270
  if (!e)
270
271
  throw new Error("useAddonProjectContext must be used within a AddonProjectContext");
271
272
  return e;
272
- }, $e = g(void 0), Jt = () => {
273
+ }, $e = p(void 0), Ht = () => {
273
274
  const e = d($e);
274
275
  if (!e)
275
276
  throw new Error("useAddonContext must be used within a AddonContext");
276
277
  return e;
277
- }, Fe = g(void 0), Bt = () => {
278
+ }, Fe = p(void 0), zt = () => {
278
279
  const e = d(Fe);
279
280
  if (e === void 0)
280
281
  throw new Error("useMenuContext must be used within a MenuProvider");
281
282
  return e;
282
- }, q = g(void 0), Ht = () => {
283
+ }, q = p(void 0), Kt = () => {
283
284
  const e = d(q);
284
285
  if (e === void 0)
285
286
  throw new Error("useSocketContext must be used within a SocketProvider");
286
287
  return e;
287
- }, Ue = window.location.protocol.replace("http", "ws"), Ve = `${Ue}//${window.location.host}/ws`, zt = ({
288
+ }, Ue = window.location.protocol.replace("http", "ws"), Ve = `${Ue}//${window.location.host}/ws`, qt = ({
288
289
  children: e,
289
290
  userName: t,
290
291
  projectName: o,
291
292
  dispatch: i
292
293
  }) => {
293
- const [n, r] = b(!1), [s, a] = b([]), [c] = pe(), p = S(!1);
294
- v(() => {
295
- p.current = n;
294
+ const [n, r] = S(!1), [s, a] = S([]), [c] = pe(), g = b(!1);
295
+ x(() => {
296
+ g.current = n;
296
297
  }, [n]);
297
298
  const f = {
298
299
  shouldReconnect: () => !t || !localStorage.getItem("accessToken") ? !1 : (c({ full: !1 }).unwrap(), !0)
@@ -310,33 +311,33 @@ const Le = u(fe)`
310
311
  })
311
312
  );
312
313
  };
313
- v(() => {
314
+ x(() => {
314
315
  console.debug("Topics changed", s), m();
315
316
  }, [s, o]);
316
- const D = S(s);
317
- D.current = s;
317
+ const k = b(s);
318
+ k.current = s;
318
319
  const h = re(
319
- () => B((w) => {
320
- le(D.current, w) || (console.log("WS: Subscriptions changed"), a(w));
320
+ () => J((w) => {
321
+ le(k.current, w) || (console.log("WS: Subscriptions changed"), a(w));
321
322
  }, 200),
322
323
  []
323
324
  );
324
- v(() => (T.setOnSubscriptionsChange((w) => h(w)), h(T.getSubscriptions("")), () => {
325
+ x(() => (T.setOnSubscriptionsChange((w) => h(w)), h(T.getSubscriptions("")), () => {
325
326
  T.setOnSubscriptionsChange(null), h.cancel();
326
327
  }), [h]);
327
- const [R, X] = b(!1), [F, Z] = b(!1);
328
- v(() => {
329
- R && !F && (H.warning(/* @__PURE__ */ l(we, {}), {
328
+ const [A, Q] = S(!1), [F, Z] = S(!1);
329
+ x(() => {
330
+ A && !F && (H.warning(/* @__PURE__ */ l(we, {}), {
330
331
  autoClose: !1,
331
332
  closeButton: !1
332
333
  }), Z(!0));
333
- }, [R, F]);
334
- const E = S({ callCount: 0, lastCall: Date.now() }), ee = B(() => {
334
+ }, [A, F]);
335
+ const E = b({ callCount: 0, lastCall: Date.now() }), ee = J(() => {
335
336
  console.log("Resetting API state due to server restart"), r(!1), i(ue.util.resetApiState());
336
337
  }, 1e3), te = O(
337
338
  (w) => {
338
339
  if (E.current.callCount > 1e3)
339
- return X(!0), console.log(
340
+ return Q(!0), console.log(
340
341
  "Overload: Over 1000 messages per second. Ignoring subsequent messages."
341
342
  );
342
343
  let I;
@@ -346,22 +347,22 @@ const Le = u(fe)`
346
347
  console.error("Failed to parse websocket message:", se, w.data);
347
348
  return;
348
349
  }
349
- const { topic: x, sender: U, summary: oe, status: ne } = I || {};
350
- if (p.current && (x === "heartbeat" || x === "server.started" && ne === "finished")) {
350
+ const { topic: v, sender: U, summary: oe, status: ne } = I || {};
351
+ if (g.current && (v === "heartbeat" || v === "server.started" && ne === "finished")) {
351
352
  console.log("Server replica booted"), ee();
352
353
  return;
353
354
  }
354
- if (x === "heartbeat") return;
355
- if (x === "server.restart_requested" && (console.log("Server restart requested"), r(!0)), ["import.data"].includes(x)) {
355
+ if (v === "heartbeat") return;
356
+ if (v === "server.restart_requested" && (console.log("Server restart requested"), r(!0)), ["import.data"].includes(v)) {
356
357
  if (U !== window.senderId) return;
357
358
  } else if (U === window.senderId)
358
359
  return;
359
360
  const V = Date.now();
360
- V - E.current.lastCall < 1e3 ? E.current.callCount += 1 : E.current.callCount = 0, console.log("Event RX", I), E.current.lastCall = V, x === "shout" && I?.summary?.text && H.info(oe.text), T.publish(x, I);
361
+ V - E.current.lastCall < 1e3 ? E.current.callCount += 1 : E.current.callCount = 0, console.log("Event RX", I), E.current.lastCall = V, v === "shout" && I?.summary?.text && H.info(oe.text), T.publish(v, I);
361
362
  },
362
363
  [r]
363
364
  );
364
- return v(() => {
365
+ return x(() => {
365
366
  C === me.OPEN && (P().onmessage = te, m(), T.publish("client.connected", {
366
367
  topic: "client.connected"
367
368
  }));
@@ -376,19 +377,19 @@ const Le = u(fe)`
376
377
  children: e
377
378
  }
378
379
  );
379
- }, Y = g(void 0), Kt = () => {
380
+ }, Y = p(void 0), Yt = () => {
380
381
  const e = d(Y);
381
382
  if (e === void 0)
382
383
  throw new Error("useProjectContext must be used within a ProjectContextProvider");
383
384
  return e;
384
- }, qt = () => d(Y), We = g(
385
+ }, Gt = () => d(Y), We = p(
385
386
  void 0
386
- ), Yt = () => {
387
+ ), Xt = () => {
387
388
  const e = d(We);
388
389
  if (e === void 0)
389
390
  throw new Error("useProjectFoldersContext must be used within a ProjectFoldersContextProvider");
390
391
  return e;
391
- }, G = g(void 0), Je = (e) => ({
392
+ }, G = p(void 0), Be = (e) => ({
392
393
  created: e,
393
394
  label_changed: e,
394
395
  renamed: e,
@@ -397,7 +398,7 @@ const Le = u(fe)`
397
398
  tags_changed: e,
398
399
  attrib_changed: e,
399
400
  deleted: e
400
- }), Be = (e, t) => e === t || e.startsWith(`${t}.`), He = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), ze = (e) => {
401
+ }), Je = (e, t) => e === t || e.startsWith(`${t}.`), He = (e, t) => t.length === 0 ? !0 : t.includes(e || ""), ze = (e) => {
401
402
  const t = e.split(".").pop();
402
403
  if (t && [
403
404
  "created",
@@ -410,7 +411,7 @@ const Le = u(fe)`
410
411
  "deleted"
411
412
  ].includes(t))
412
413
  return t;
413
- }, Gt = ({
414
+ }, Qt = ({
414
415
  projectNames: e,
415
416
  topics: t,
416
417
  isSyncing: o = !1,
@@ -419,26 +420,26 @@ const Le = u(fe)`
419
420
  const n = d(G);
420
421
  if (!n)
421
422
  throw new Error("useSyncUpdates must be used within an EntityUpdatesProvider");
422
- const r = e || n.projectNames, s = S(0), a = S(!1), c = n.updates.filter(
423
- (p) => He(p.project, r) && t.some((f) => Be(p.topic, f)) && (i?.(p) ?? !0)
423
+ const r = e || n.projectNames, s = b(0), a = b(!1), c = n.updates.filter(
424
+ (g) => He(g.project, r) && t.some((f) => Je(g.topic, f)) && (i?.(g) ?? !0)
424
425
  );
425
- return v(() => {
426
+ return x(() => {
426
427
  o && !a.current ? s.current = n.getLatestId() : !o && a.current && n.acknowledge(t, r, s.current), a.current = o;
427
428
  }, [n, o, r, t]), {
428
429
  updates: c,
429
430
  hasUpdates: c.length > 0,
430
431
  updateCount: c.length
431
432
  };
432
- }, Qt = () => {
433
+ }, Zt = () => {
433
434
  const e = d(G);
434
435
  if (!e)
435
436
  throw new Error("useAutoSyncSettings must be used within an EntityUpdatesProvider");
436
437
  const { autoSyncSettings: t, setAutoSyncSettings: o } = e;
437
438
  return [t, (n) => {
438
439
  const { settings: r, global: s } = n;
439
- o(s !== void 0 ? Je(s) : (a) => ({ ...a, ...r }));
440
+ o(s !== void 0 ? Be(s) : (a) => ({ ...a, ...r }));
440
441
  }];
441
- }, Xt = (e, t) => {
442
+ }, eo = (e, t) => {
442
443
  if (!t) return !1;
443
444
  const o = ze(e);
444
445
  return o ? t[o] : !1;
@@ -524,24 +525,24 @@ const Le = u(fe)`
524
525
  isSaveable: s,
525
526
  highlighted: a,
526
527
  onEdit: c,
527
- onSave: p,
528
+ onSave: g,
528
529
  onResetView: f,
529
530
  className: y,
530
531
  ...C
531
532
  }, P) => {
532
- const { viewAlias: m } = ot(), D = (h, R) => {
533
- h.stopPropagation(), R ? de({
533
+ const { viewAlias: m } = ot(), k = (h, A) => {
534
+ h.stopPropagation(), A ? de({
534
535
  message: `Save current ${m} settings and overwrite this ${m}?`,
535
536
  header: "Confirm save",
536
- accept: () => p && p(h, e)
537
- }) : p && p(h, e);
537
+ accept: () => g && g(h, e)
538
+ }) : g && g(h, e);
538
539
  };
539
- return /* @__PURE__ */ k(
540
+ return /* @__PURE__ */ R(
540
541
  Ke,
541
542
  {
542
543
  ...C,
543
544
  id: e,
544
- className: A(y, { selected: n }),
545
+ className: D(y, { selected: n }),
545
546
  ref: P,
546
547
  children: [
547
548
  o && o,
@@ -554,7 +555,7 @@ const Le = u(fe)`
554
555
  className: "reset",
555
556
  onClick: f,
556
557
  "data-tooltip": "Reset to Default",
557
- "data-shortcut": ce("0", [J.Shift, J.Ctrl])
558
+ "data-shortcut": ce("0", [B.Shift, B.Ctrl])
558
559
  }
559
560
  ),
560
561
  r && s && !n && /* @__PURE__ */ l(
@@ -562,8 +563,8 @@ const Le = u(fe)`
562
563
  {
563
564
  icon: "save",
564
565
  variant: "text",
565
- className: A("save", { active: a === "save" }),
566
- onClick: (h) => D(h, a !== "save"),
566
+ className: D("save", { active: a === "save" }),
567
+ onClick: (h) => k(h, a !== "save"),
567
568
  "data-tooltip": `Save ${m} settings from current ${m}`
568
569
  }
569
570
  ),
@@ -572,7 +573,7 @@ const Le = u(fe)`
572
573
  {
573
574
  variant: "text",
574
575
  icon: "more_horiz",
575
- className: A("more", { active: a === "edit" }),
576
+ className: D("more", { active: a === "edit" }),
576
577
  onClick: (h) => c(h, e),
577
578
  "data-tooltip": `Edit ${m}`
578
579
  }
@@ -595,7 +596,7 @@ const Le = u(fe)`
595
596
  flex-direction: column;
596
597
  gap: var(--base-gap-small);
597
598
  margin-bottom: var(--padding-s);
598
- `, Qe = u.li`
599
+ `, Xe = u.li`
599
600
  height: 1px;
600
601
  background-color: var(--md-sys-color-outline-variant);
601
602
  margin: 4px 0;
@@ -604,7 +605,7 @@ u.li`
604
605
  ${z.labelSmall}
605
606
  color: var(--md-sys-color-outline);
606
607
  `;
607
- const Xe = u.li`
608
+ const Qe = u.li`
608
609
  ${z.labelSmall}
609
610
  color: var(--md-sys-color-outline);
610
611
  user-select: none;
@@ -641,11 +642,11 @@ const Xe = u.li`
641
642
  display: inline-flex;
642
643
  }
643
644
  `, Ze = M(
644
- ({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */ k(
645
- Xe,
645
+ ({ title: e, collapsed: t, className: o, ...i }, n) => /* @__PURE__ */ R(
646
+ Qe,
646
647
  {
647
648
  ...i,
648
- className: A("views-section-header", { collapsed: t }, o),
649
+ className: D("views-section-header", { collapsed: t }, o),
649
650
  ref: n,
650
651
  children: [
651
652
  /* @__PURE__ */ l("span", { children: e }),
@@ -654,8 +655,8 @@ const Xe = u.li`
654
655
  ]
655
656
  }
656
657
  )
657
- ), Zt = "_divider_", et = (e) => typeof e == "object" && e !== null && "type" in e && e.type === "section", eo = M(
658
- ({ items: e, selected: t, ...o }, i) => /* @__PURE__ */ l(Ye, { children: /* @__PURE__ */ l(Ge, { ...o, ref: i, children: e.map((n, r) => n === "_divider_" ? /* @__PURE__ */ l(Qe, {}, r) : et(n) ? /* @__PURE__ */ l(
658
+ ), to = "_divider_", et = (e) => typeof e == "object" && e !== null && "type" in e && e.type === "section", oo = M(
659
+ ({ items: e, selected: t, ...o }, i) => /* @__PURE__ */ l(Ye, { children: /* @__PURE__ */ l(Ge, { ...o, ref: i, children: e.map((n, r) => n === "_divider_" ? /* @__PURE__ */ l(Xe, {}, r) : et(n) ? /* @__PURE__ */ l(
659
660
  Ze,
660
661
  {
661
662
  id: n.id,
@@ -674,12 +675,12 @@ const Xe = u.li`
674
675
  },
675
676
  (n.id || "") + r.toString()
676
677
  )) }) })
677
- ), tt = g(null), ot = () => {
678
+ ), tt = p(null), ot = () => {
678
679
  const e = d(tt);
679
680
  if (!e)
680
681
  throw new Error("useViewsContext must be used within a ViewsProvider");
681
682
  return e;
682
- }, to = 1, nt = u.div`
683
+ }, no = 1, nt = u.div`
683
684
  min-width: 350px;
684
685
  `, st = u.div`
685
686
  margin-top: 12px;
@@ -692,32 +693,32 @@ const Xe = u.li`
692
693
  margin-top: 12px;
693
694
  font-weight: 600;
694
695
  color: var(--md-sys-color-error);
695
- `, oo = ({
696
+ `, so = ({
696
697
  entityLabel: e,
697
698
  childrenDetails: t,
698
699
  totalLine: o,
699
700
  message: i
700
- }) => /* @__PURE__ */ k(nt, { children: [
701
+ }) => /* @__PURE__ */ R(nt, { children: [
701
702
  /* @__PURE__ */ l("p", { children: i || `Are you sure you want to delete ${e}? This action cannot be undone.` }),
702
- t.length > 0 && /* @__PURE__ */ k(st, { children: [
703
+ t.length > 0 && /* @__PURE__ */ R(st, { children: [
703
704
  /* @__PURE__ */ l(rt, { children: "The following will also be affected:" }),
704
705
  t.map((n, r) => /* @__PURE__ */ l("p", { children: n }, r))
705
706
  ] }),
706
707
  o && /* @__PURE__ */ l(at, { children: o })
707
- ] }), no = u(ie)`
708
+ ] }), ro = u(ie)`
708
709
  max-height: min(600px, 90vh);
709
- `, so = u.div`
710
+ `, ao = u.div`
710
711
  display: flex;
711
712
  flex-direction: column;
712
713
  width: 100%;
713
- `, ro = u.label`
714
+ `, io = u.label`
714
715
  margin: 2px 0 14px 0;
715
- `, ao = u.div`
716
+ `, co = u.div`
716
717
  display: flex;
717
718
  padding-top: 14px;
718
719
  gap: 8px;
719
720
  justify-content: flex-end;
720
- `, io = u.div`
721
+ `, lo = u.div`
721
722
  display: flex;
722
723
  flex-direction: column;
723
724
  gap: 8px;
@@ -726,14 +727,14 @@ const Xe = u.li`
726
727
  /* scroll container clips the inputs' 2px focus outline — inset it, then pull back to keep alignment */
727
728
  padding: 4px;
728
729
  margin: -4px;
729
- `, co = u.label`
730
+ `, uo = u.label`
730
731
  display: flex;
731
732
  align-items: center;
732
733
  justify-content: space-between;
733
734
  gap: 12px;
734
- `, lo = u(K)`
735
+ `, po = u(K)`
735
736
  width: 180px;
736
- `, uo = u(K)`
737
+ `, go = u(K)`
737
738
  width: 100%;
738
739
  /* room for the 2px focus outline */
739
740
  margin: 2px 0;
@@ -744,84 +745,87 @@ const Xe = u.li`
744
745
  "version",
745
746
  "representation",
746
747
  "workfile"
747
- ]), po = (e) => !!e && it.has(e), Q = g(null), go = () => {
748
- const e = d(Q);
748
+ ]), fo = (e) => !!e && it.has(e), X = p(null), ho = () => {
749
+ const e = d(X);
749
750
  if (!e)
750
751
  throw new Error("useDeleteEntitiesContext must be used within a DeleteEntitiesProvider");
751
752
  return e;
752
- }, fo = () => d(Q);
753
+ }, mo = () => d(X), wo = "tableExport", ct = p(null), xo = () => d(ct);
753
754
  export {
754
- Xt as $,
755
- Te as A,
756
- At as B,
757
- uo as C,
758
- oo as D,
755
+ qt as $,
756
+ j as A,
757
+ Te as B,
758
+ go as C,
759
+ so as D,
759
760
  G as E,
760
- so as F,
761
- Ee as G,
762
- j as H,
763
- De as I,
764
- Ae as J,
765
- Ne as K,
761
+ ao as F,
762
+ Nt as G,
763
+ Ee as H,
764
+ ke as I,
765
+ De as J,
766
+ _e as K,
766
767
  Me as L,
767
768
  Fe as M,
768
769
  $e as N,
769
- Se as O,
770
+ be as O,
770
771
  Y as P,
771
- ve as Q,
772
+ xe as Q,
772
773
  we as R,
773
- no as S,
774
- Re as T,
774
+ ro as S,
775
+ Ae as T,
775
776
  We as U,
776
- be as V,
777
- Q as W,
778
- Vt as X,
779
- q as Y,
780
- zt as Z,
781
- Lt as _,
782
- Rt as a,
783
- po as a0,
784
- jt as a1,
785
- Jt as a2,
786
- Wt as a3,
787
- Qt as a4,
788
- go as a5,
789
- fo as a6,
790
- _e as a7,
791
- Mt as a8,
792
- Ut as a9,
793
- Ht as aa,
794
- $t as ab,
795
- Gt as ac,
796
- Ft as ad,
797
- Zt as ae,
798
- tt as af,
799
- Ze as ag,
800
- eo as ah,
801
- qe as ai,
802
- Dt as b,
803
- Be as c,
804
- kt as d,
777
+ Se as V,
778
+ X as W,
779
+ wo as X,
780
+ ct as Y,
781
+ Bt as Z,
782
+ q as _,
783
+ _t as a,
784
+ Mt as a0,
785
+ eo as a1,
786
+ fo as a2,
787
+ $t as a3,
788
+ Ht as a4,
789
+ Jt as a5,
790
+ Zt as a6,
791
+ ho as a7,
792
+ mo as a8,
793
+ Ne as a9,
794
+ Ft as aa,
795
+ Wt as ab,
796
+ Kt as ac,
797
+ Ut as ad,
798
+ Qt as ae,
799
+ xo as af,
800
+ Vt as ag,
801
+ to as ah,
802
+ tt as ai,
803
+ Ze as aj,
804
+ oo as ak,
805
+ qe as al,
806
+ Je as b,
807
+ Dt as c,
808
+ At as d,
805
809
  ot as e,
806
- to as f,
810
+ no as f,
807
811
  ze as g,
808
- ro as h,
809
- io as i,
810
- co as j,
811
- lo as k,
812
- ao as l,
812
+ io as h,
813
+ lo as i,
814
+ uo as j,
815
+ po as k,
816
+ co as l,
813
817
  He as m,
814
- qt as n,
815
- ke as o,
818
+ Gt as n,
819
+ Re as o,
816
820
  ye as p,
817
821
  Ce as q,
818
- Nt as r,
819
- Ot as s,
820
- Je as t,
821
- Bt as u,
822
+ Ot as r,
823
+ jt as s,
824
+ Be as t,
825
+ zt as u,
822
826
  Pe as v,
823
- _t as w,
824
- Kt as x,
825
- Yt as y,
826
- xe as z
827
+ Lt as w,
828
+ Yt as x,
829
+ Xt as y,
830
+ ve as z
827
831
  };