@ynput/ayon-frontend-shared 0.6.6 → 0.6.7

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 (42) hide show
  1. package/dist/DetailsPanel.es.js +3 -3
  2. package/dist/NewEntity.es.js +15 -15
  3. package/dist/ProjectTreeTable.es.js +500 -495
  4. package/dist/Slicer.es.js +11 -11
  5. package/dist/Views.es.js +213 -206
  6. package/dist/chunks/CodeEditor.es.js +30 -0
  7. package/dist/chunks/ColumnDropIndicator.styled.es.js +24 -24
  8. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  9. package/dist/chunks/DeleteEntitiesContextInstance.es.js +103 -103
  10. package/dist/chunks/EntityPath.es.js +2 -2
  11. package/dist/chunks/EntityTooltip.es.js +1 -1
  12. package/dist/chunks/Feed.es.js +1875 -1857
  13. package/dist/chunks/JsonViewer.es.js +1 -1
  14. package/dist/chunks/Menu.es.js +1 -1
  15. package/dist/chunks/MenuItem.es.js +25 -25
  16. package/dist/chunks/MetaWidget.es.js +1537 -1516
  17. package/dist/chunks/PlayableIcon.es.js +127 -127
  18. package/dist/chunks/ReviewablesSelector.es.js +199 -196
  19. package/dist/chunks/SimpleTable.es.js +110 -110
  20. package/dist/chunks/Slicer.es.js +22 -22
  21. package/dist/chunks/TableSettingsFallback.es.js +1 -1
  22. package/dist/chunks/ThumbnailSimple.es.js +2 -2
  23. package/dist/chunks/VideoPlayer.es.js +1 -1
  24. package/dist/chunks/Watchers.es.js +19 -19
  25. package/dist/chunks/afterStartup.es.js +13 -0
  26. package/dist/chunks/getUris.es.js +790 -827
  27. package/dist/chunks/searchTerms.es.js +1 -3
  28. package/dist/chunks/useHierarchySelection.es.js +2 -2
  29. package/dist/chunks/useLoadModule.es.js +24 -23
  30. package/dist/components.es.js +202 -200
  31. package/dist/context.es.js +521 -492
  32. package/dist/hooks.es.js +190 -166
  33. package/dist/types/ContextMenu.d.ts +1 -0
  34. package/dist/types/ProjectTreeTable.d.ts +1 -0
  35. package/dist/types/Views.d.ts +11 -0
  36. package/dist/types/api.d.ts +198 -1174
  37. package/dist/types/components.d.ts +5 -1
  38. package/dist/types/context.d.ts +1 -0
  39. package/dist/types/hooks.d.ts +25 -1
  40. package/dist/types/util.d.ts +10 -0
  41. package/dist/util.es.js +44 -41
  42. package/package.json +2 -2
package/dist/Views.es.js CHANGED
@@ -1,24 +1,24 @@
1
- import { jsx as b, jsxs as A, Fragment as j } from "react/jsx-runtime";
2
- import { useMemo as _, useCallback as h, useRef as te, useState as W, useEffect as U } from "react";
1
+ import { jsx as b, jsxs as A, Fragment as X } from "react/jsx-runtime";
2
+ import { useMemo as _, useCallback as h, useRef as se, useState as W, useEffect as U } from "react";
3
3
  import { createPortal as we } from "react-dom";
4
4
  import "./chunks/searchTerms.es.js";
5
- import { aQ as se, bs as _e, d4 as oe, b4 as ge, du as fe, dx as q, U as T, ch as qe, cV as Ae, cC as Ge, bo as de, cA as He } from "./chunks/getUris.es.js";
5
+ import { aQ as oe, bs as ge, d4 as ie, b4 as fe, du as Ve, dx as q, U as ee, ch as He, cV as me, cC as pe, bo as Y, cA as Ge } from "./chunks/getUris.es.js";
6
6
  import { confirmDialog as Qe } from "primereact/confirmdialog";
7
- import { a as Q, ae as Je, d as Ve, p as me, af as Ke, e as G, ag as ze, ah as Xe, ai as je } from "./chunks/DeleteEntitiesContextInstance.es.js";
8
- import { Icon as J, Button as pe, Dialog as Ye } from "@ynput/ayon-react-components";
7
+ import { a as Q, ae as Je, d as he, s as ve, af as Ke, e as H, ag as ze, ah as je, ai as Xe } from "./chunks/DeleteEntitiesContextInstance.es.js";
8
+ import { Icon as J, Button as ye, Dialog as Ye } from "@ynput/ayon-react-components";
9
9
  import "uuid";
10
10
  import { toast as x } from "react-toastify";
11
11
  import "@module-federation/enhanced/runtime";
12
12
  import "lodash";
13
13
  import "./chunks/ContextMenuContextInstance.es.js";
14
- import he from "clsx";
14
+ import ke from "clsx";
15
15
  import { useDispatch as Ze } from "react-redux";
16
16
  import "semver";
17
- import H from "styled-components";
18
- import { u as ve } from "./chunks/useLoadModule.es.js";
19
- import { g as ye, a as ke } from "./chunks/viewUpdateHelper.es.js";
20
- import { c as Xt, b as jt, u as Yt } from "./chunks/viewUpdateHelper.es.js";
21
- import { c as Ce, a as ee } from "./chunks/columnConfigConverter.es.js";
17
+ import G from "styled-components";
18
+ import { u as Ce } from "./chunks/useLoadModule.es.js";
19
+ import { g as be, a as Le } from "./chunks/viewUpdateHelper.es.js";
20
+ import { c as Xt, b as Yt, u as Zt } from "./chunks/viewUpdateHelper.es.js";
21
+ import { c as Be, a as te } from "./chunks/columnConfigConverter.es.js";
22
22
  const qt = [
23
23
  "overview",
24
24
  "taskProgress",
@@ -26,32 +26,32 @@ const qt = [
26
26
  "lists",
27
27
  "reviews",
28
28
  "reports"
29
- ], ie = "_working_", Ne = "_new_view_", be = "__base__", Te = (e) => {
30
- const { viewsList: t, onEdit: i, onSelect: s, onSave: c } = e, n = (o, V = {}) => ({
31
- id: o.id,
32
- label: o.label,
29
+ ], ne = "_working_", Ne = "_new_view_", De = "__base__", Te = (e) => {
30
+ const { viewsList: t, onEdit: o, onSelect: s, onSave: c } = e, n = (i, V = {}) => ({
31
+ id: i.id,
32
+ label: i.label,
33
33
  isSelected: !1,
34
- highlighted: o.highlighted,
35
- onClick: () => s(o.id),
34
+ highlighted: i.highlighted,
35
+ onClick: () => s(i.id),
36
36
  ...V
37
- }), r = t.filter((o) => o.visibility === "private" && o.isOwner && !o.working).map(
38
- (o) => n(o, {
37
+ }), r = t.filter((i) => i.visibility === "private" && i.isOwner && !i.working).map(
38
+ (i) => n(i, {
39
39
  isEditable: !0,
40
40
  isSaveable: !0,
41
- onEdit: () => i(o.id),
42
- onSave: () => c(o.id)
41
+ onEdit: () => o(i.id),
42
+ onSave: () => c(i.id)
43
43
  })
44
- ), w = t.filter((o) => o.visibility === "public" && !o.working).map(
45
- (o) => n(o, {
46
- isEditable: o.isOwner,
47
- isSaveable: o.isOwner,
48
- ...o.isOwner && {
49
- onEdit: () => i(o.id),
50
- onSave: () => c(o.id)
44
+ ), w = t.filter((i) => i.visibility === "public" && !i.working).map(
45
+ (i) => n(i, {
46
+ isEditable: i.isOwner,
47
+ isSaveable: i.isOwner,
48
+ ...i.isOwner && {
49
+ onEdit: () => o(i.id),
50
+ onSave: () => c(i.id)
51
51
  }
52
52
  })
53
- ), g = t.filter((o) => o.visibility === "private" && !o.isOwner && !o.working).map(
54
- (o) => n(o, {
53
+ ), g = t.filter((i) => i.visibility === "private" && !i.isOwner && !i.working).map(
54
+ (i) => n(i, {
55
55
  isEditable: !1,
56
56
  isSaveable: !1
57
57
  })
@@ -64,21 +64,21 @@ const qt = [
64
64
  }, et = ({
65
65
  viewsList: e,
66
66
  workingView: t,
67
- viewType: i,
67
+ viewType: o,
68
68
  viewAlias: s,
69
69
  projectName: c,
70
70
  currentUser: n,
71
71
  useWorkingView: r,
72
72
  editingViewId: w,
73
73
  collapsed: g,
74
- setCollapsed: o,
74
+ setCollapsed: i,
75
75
  onSelect: V,
76
76
  onEdit: v,
77
77
  onSave: p,
78
78
  onResetWorkingView: d,
79
79
  selectedId: l
80
80
  }) => {
81
- const { powerLicense: a } = Q(), [u] = se(), y = _(
81
+ const { powerLicense: a } = Q(), [u] = oe(), y = _(
82
82
  () => e.map((f) => ({
83
83
  ...f,
84
84
  isOwner: f.owner === n?.name,
@@ -86,7 +86,7 @@ const qt = [
86
86
  })),
87
87
  [e, n, w]
88
88
  ), B = {
89
- id: ie,
89
+ id: ne,
90
90
  label: r ? `Personal ${s.toLowerCase()}` : `Working ${s.toLowerCase()}`,
91
91
  startContent: r && /* @__PURE__ */ b(J, { icon: "person" }),
92
92
  isEditable: !1
@@ -95,29 +95,29 @@ const qt = [
95
95
  if (!t)
96
96
  try {
97
97
  console.warn(`No working ${s.toLowerCase()} found, creating a new one`);
98
- const O = ye();
98
+ const O = be();
99
99
  await u({
100
100
  payload: O,
101
- viewType: i,
101
+ viewType: o,
102
102
  projectName: c
103
103
  }).unwrap(), f = O.id;
104
104
  } catch (O) {
105
105
  x.error(`Failed to create working ${s}: ${O}`);
106
106
  }
107
107
  V(f);
108
- }, [t, i, u, c, V]), M = async (f) => {
108
+ }, [t, o, u, c, V]), M = async (f) => {
109
109
  try {
110
110
  await p(f), V(f);
111
111
  } catch (O) {
112
112
  x.error(O);
113
113
  }
114
- }, [P, { isLoading: m }] = ve({
114
+ }, [P, { isLoading: m }] = Ce({
115
115
  addon: "powerpack",
116
116
  remote: "views",
117
117
  module: "getCustomViews",
118
118
  fallback: Te,
119
119
  // minVersion: minVersion,
120
- skip: !i || !a
120
+ skip: !o || !a
121
121
  }), { myViews: k, sharedViews: L, allPrivateViews: C } = P({
122
122
  viewsList: y,
123
123
  onEdit: v,
@@ -125,9 +125,9 @@ const qt = [
125
125
  onSave: M
126
126
  }), E = h(
127
127
  (f) => {
128
- o({ ...g, [f]: !g[f] });
128
+ i({ ...g, [f]: !g[f] });
129
129
  },
130
- [g, o]
130
+ [g, i]
131
131
  ), S = _(() => [
132
132
  { id: "myViews", title: `My ${s.toLowerCase()}s`, items: k },
133
133
  {
@@ -160,19 +160,19 @@ const qt = [
160
160
  }), !K)
161
161
  f.push(...R.items);
162
162
  else if (l) {
163
- const z = R.items.find((Y) => Y.id === l);
163
+ const z = R.items.find((Z) => Z.id === l);
164
164
  z && f.push(z);
165
165
  }
166
166
  }), f;
167
167
  }, [F, S, g, E, l, a]);
168
168
  }, tt = ({ viewType: e, projectName: t }) => {
169
- const { currentData: i, isLoading: s } = _e(
169
+ const { currentData: o, isLoading: s } = ge(
170
170
  { viewType: e, projectName: t },
171
171
  { skip: !e }
172
- ), [c] = oe(), n = te({}), r = n.current[e];
173
- return [i, async (g) => {
172
+ ), [c] = ie(), n = se({}), r = n.current[e];
173
+ return [o, async (g) => {
174
174
  if (!e) throw "No view type provided for setting default view";
175
- i?.id && i.id !== g && (n.current[e] = i.id);
175
+ o?.id && o.id !== g && (n.current[e] = o.id);
176
176
  try {
177
177
  await c({
178
178
  setDefaultViewRequestModel: {
@@ -181,19 +181,19 @@ const qt = [
181
181
  viewType: e,
182
182
  projectName: t
183
183
  }).unwrap();
184
- } catch (o) {
185
- x.warn(`Failed to set default view: ${o}`);
184
+ } catch (i) {
185
+ x.warn(`Failed to set default view: ${i}`);
186
186
  }
187
187
  }, r, s];
188
188
  }, st = ({
189
189
  viewType: e,
190
190
  projectName: t,
191
- viewsList: i,
191
+ viewsList: o,
192
192
  onCreate: s,
193
193
  onDelete: c,
194
194
  onUpdate: n
195
195
  }) => {
196
- const r = Ze(), [w] = se(), [g] = ge(), [o] = fe(), [V] = oe(), v = h(
196
+ const r = Ze(), [w] = oe(), [g] = fe(), [i] = Ve(), [V] = ie(), v = h(
197
197
  async (a, u) => {
198
198
  if (!e)
199
199
  throw new Error("viewType are required for creating a view");
@@ -213,7 +213,7 @@ const qt = [
213
213
  if (!e)
214
214
  throw new Error("viewType are required for updating a view");
215
215
  try {
216
- await o({
216
+ await i({
217
217
  viewId: a,
218
218
  viewType: e,
219
219
  projectName: y ? void 0 : t,
@@ -223,7 +223,7 @@ const qt = [
223
223
  throw B;
224
224
  }
225
225
  },
226
- [o, e, t, n]
226
+ [i, e, t, n]
227
227
  ), d = h(
228
228
  async (a, u) => {
229
229
  if (!e)
@@ -269,8 +269,8 @@ const qt = [
269
269
  )).data;
270
270
  f && f.settings && Object.keys(f.settings).length > 0 && (L = f.settings, C = "studio");
271
271
  }
272
- const E = u ?? ye().id;
273
- if (u ? await o({
272
+ const E = u ?? be().id;
273
+ if (u ? await i({
274
274
  viewId: u,
275
275
  viewType: e,
276
276
  projectName: t,
@@ -297,7 +297,7 @@ const qt = [
297
297
  throw M && x.error("Failed to reset view to default"), P;
298
298
  }
299
299
  },
300
- [w, o, V, e, t, r]
300
+ [w, i, V, e, t, r]
301
301
  );
302
302
  return {
303
303
  onCreateView: v,
@@ -308,18 +308,18 @@ const qt = [
308
308
  }, ot = ({
309
309
  viewType: e,
310
310
  projectName: t,
311
- viewSettings: i,
311
+ viewSettings: o,
312
312
  workingView: s,
313
313
  dispatch: c
314
314
  }) => {
315
- const [n] = se(), [r] = fe(), [w] = ge(), [g] = oe(), o = h(
315
+ const [n] = oe(), [r] = Ve(), [w] = fe(), [g] = ie(), i = h(
316
316
  async (d) => {
317
317
  try {
318
318
  const u = await n({
319
319
  payload: {
320
- label: be,
320
+ label: De,
321
321
  working: !1,
322
- settings: i || {}
322
+ settings: o || {}
323
323
  },
324
324
  viewType: e,
325
325
  projectName: d ? void 0 : t
@@ -327,7 +327,7 @@ const qt = [
327
327
  c(
328
328
  q.util.invalidateTags([
329
329
  { type: "view", id: u.id },
330
- T(e, d ? void 0 : t)
330
+ ee(e, d ? void 0 : t)
331
331
  ])
332
332
  );
333
333
  const y = d ? "Studio" : "Project";
@@ -337,7 +337,7 @@ const qt = [
337
337
  x.error(`Failed to create ${a} base view: ${l?.message || l}`);
338
338
  }
339
339
  },
340
- [n, e, t, i, c]
340
+ [n, e, t, o, c]
341
341
  ), V = h(
342
342
  async (d, l) => {
343
343
  try {
@@ -345,11 +345,11 @@ const qt = [
345
345
  viewId: d,
346
346
  viewType: e,
347
347
  projectName: l ? void 0 : t,
348
- payload: { settings: i || {} }
348
+ payload: { settings: o || {} }
349
349
  }).unwrap(), c(
350
350
  q.util.invalidateTags([
351
351
  { type: "view", id: d },
352
- T(e, l ? void 0 : t)
352
+ ee(e, l ? void 0 : t)
353
353
  ])
354
354
  );
355
355
  const u = l ? "Studio" : "Project";
@@ -359,7 +359,7 @@ const qt = [
359
359
  x.error(`Failed to update ${u} base view: ${a?.message || a}`);
360
360
  }
361
361
  },
362
- [r, e, t, i, c]
362
+ [r, e, t, o, c]
363
363
  ), v = h(
364
364
  async (d, l) => {
365
365
  try {
@@ -370,7 +370,7 @@ const qt = [
370
370
  }).unwrap(), c(
371
371
  q.util.invalidateTags([
372
372
  { type: "view", id: d },
373
- T(e, l ? void 0 : t)
373
+ ee(e, l ? void 0 : t)
374
374
  ])
375
375
  );
376
376
  const a = l ? "Studio" : "Project";
@@ -417,15 +417,15 @@ const qt = [
417
417
  [s, r, g, e, t, c]
418
418
  );
419
419
  return {
420
- onCreateBaseView: o,
420
+ onCreateBaseView: i,
421
421
  onUpdateBaseView: V,
422
422
  onDeleteBaseView: v,
423
423
  onLoadBaseView: p
424
424
  };
425
- }, Le = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, it = ({
425
+ }, Ee = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, it = ({
426
426
  viewType: e,
427
427
  projectName: t,
428
- viewsList: i,
428
+ viewsList: o,
429
429
  sourceSettings: s,
430
430
  onUpdateView: c
431
431
  }) => ({ onSaveViewFromCurrent: h(
@@ -440,7 +440,7 @@ const qt = [
440
440
  {
441
441
  settings: s
442
442
  },
443
- Le(r, i)
443
+ Ee(r, o)
444
444
  ), x.success("View settings saved");
445
445
  } catch (w) {
446
446
  const g = typeof w == "string" ? "Failed to save view settings: " + w : "Failed to save view settings";
@@ -451,33 +451,33 @@ const qt = [
451
451
  ) }), nt = ({
452
452
  viewType: e
453
453
  }) => {
454
- const [t, i] = W({}), s = h(
454
+ const [t, o] = W({}), s = h(
455
455
  (n) => {
456
- e && i((r) => ({ ...r, [e]: n }));
456
+ e && o((r) => ({ ...r, [e]: n }));
457
457
  },
458
- [e, i]
458
+ [e, o]
459
459
  );
460
460
  return [e ? t[e] : !1, s];
461
461
  }, rt = "view", At = ({
462
462
  children: e,
463
463
  viewType: t,
464
- viewAlias: i = rt,
464
+ viewAlias: o = rt,
465
465
  projectName: s,
466
466
  dispatch: c,
467
467
  debug: n
468
468
  }) => {
469
469
  let { powerLicense: r } = Q();
470
470
  n?.powerLicense !== void 0 && (console.warn("Using debug power license:", n.powerLicense), r = n.powerLicense);
471
- const { user: w } = Ve(), [g, o] = W(!1), [V, v] = W(null), p = "viewsMenuCollapsed", [d, l] = me(
471
+ const { user: w } = he(), [g, i] = W(!1), [V, v] = W(null), p = "viewsMenuCollapsed", [d, l] = ve(
472
472
  p,
473
473
  {}
474
474
  ), a = (I) => {
475
- const X = I.visibility === "private" ? "myViews" : "sharedViews";
476
- if (d[X]) {
477
- const le = { ...d };
478
- le[X] = !1, l(le);
475
+ const j = I.visibility === "private" ? "myViews" : "sharedViews";
476
+ if (d[j]) {
477
+ const de = { ...d };
478
+ de[j] = !1, l(de);
479
479
  }
480
- }, { data: u } = qe(
480
+ }, { data: u } = He(
481
481
  { projectName: s },
482
482
  { skip: !r || !V }
483
483
  ), [y, B, D, M] = tt({
@@ -485,12 +485,12 @@ const qt = [
485
485
  projectName: s
486
486
  }), [P, m] = nt({
487
487
  viewType: t
488
- }), { currentData: k = [], isLoading: L } = Ae(
488
+ }), { currentData: k = [], isLoading: L } = me(
489
489
  { projectName: s, viewType: t },
490
490
  { skip: !t }
491
491
  ), C = _(
492
492
  () => k.filter(
493
- (I) => I.label !== be && !(s && I.working && I.scope === "studio")
493
+ (I) => I.label !== De && !(s && I.working && I.scope === "studio")
494
494
  ),
495
495
  [k]
496
496
  ), { onCreateView: E, onDeleteView: S, onUpdateView: F, onResetWorkingView: $ } = st({
@@ -502,47 +502,47 @@ const qt = [
502
502
  currentData: f,
503
503
  isLoading: O,
504
504
  isError: R
505
- } = Ge(
505
+ } = pe(
506
506
  { projectName: s, viewType: t },
507
507
  { skip: !t }
508
- ), { currentData: K, isLoading: z } = de(
508
+ ), { currentData: K, isLoading: z } = Y(
509
509
  { projectName: s, viewType: t },
510
510
  { skip: !t }
511
- ), { currentData: Y, isLoading: Ee } = de(
511
+ ), { currentData: Z, isLoading: Fe } = Y(
512
512
  { projectName: void 0, viewType: t },
513
513
  { skip: !t }
514
- ), Ie = L || M || O || z || Ee, ne = f?.settings, Z = y?.id === ie ? ne : y?.settings, re = y?.id === f?.id, ae = P && re && D && D !== f?.id ? D : void 0, { currentData: N, isFetching: xe } = He(
514
+ ), Me = L || M || O || z || Fe, re = f?.settings, N = y?.id === ne ? re : y?.settings, ae = y?.id === f?.id, ce = P && ae && D && D !== f?.id ? D : void 0, { currentData: T, isFetching: Pe } = Ge(
515
515
  {
516
516
  viewId: V,
517
- projectName: Le(V, C) ? void 0 : s,
517
+ projectName: Ee(V, C) ? void 0 : s,
518
518
  viewType: t
519
519
  },
520
520
  { skip: typeof V != "string" || !r }
521
- ), Fe = _(
522
- () => V === N?.id ? N : void 0,
523
- [V, N]
524
- ), { onSaveViewFromCurrent: Me } = it({
521
+ ), Se = _(
522
+ () => V === T?.id ? T : void 0,
523
+ [V, T]
524
+ ), { onSaveViewFromCurrent: Oe } = it({
525
525
  viewType: t,
526
526
  projectName: s,
527
527
  viewsList: C,
528
- sourceSettings: Z,
528
+ sourceSettings: N,
529
529
  onUpdateView: F
530
- }), { onCreateBaseView: Pe, onUpdateBaseView: Se, onDeleteBaseView: Oe, onLoadBaseView: $e } = ot({
530
+ }), { onCreateBaseView: $e, onUpdateBaseView: Re, onDeleteBaseView: We, onLoadBaseView: Ue } = ot({
531
531
  viewType: t,
532
532
  projectName: s,
533
- viewSettings: Z,
533
+ viewSettings: N,
534
534
  workingView: f,
535
535
  dispatch: c
536
- }), Re = h(
537
- async (I, { selectView: X } = {}) => {
536
+ }), _e = h(
537
+ async (I, { selectView: j } = {}) => {
538
538
  if (!f?.id) {
539
539
  console.error("No working view to update");
540
540
  return;
541
541
  }
542
- await F(f.id, I, !s), X && B(f.id);
542
+ await F(f.id, I, !s), j && B(f.id);
543
543
  },
544
544
  [F, f]
545
- ), ce = h(async () => {
545
+ ), le = h(async () => {
546
546
  try {
547
547
  await $({
548
548
  existingWorkingViewId: f?.id,
@@ -554,56 +554,56 @@ const qt = [
554
554
  } catch (I) {
555
555
  console.error("Failed to reset view:", I);
556
556
  }
557
- }, [f, $, y, B, m]), We = et({
557
+ }, [f, $, y, B, m]), qe = et({
558
558
  viewsList: C,
559
559
  workingView: f,
560
560
  viewType: t,
561
- viewAlias: i,
561
+ viewAlias: o,
562
562
  projectName: s,
563
563
  currentUser: w,
564
564
  useWorkingView: !r,
565
- editingViewId: ae,
565
+ editingViewId: ce,
566
566
  selectedId: y?.id,
567
567
  collapsed: d,
568
568
  setCollapsed: l,
569
- onResetWorkingView: ce,
569
+ onResetWorkingView: le,
570
570
  onSelect: (I) => {
571
- B(I), m(!1), o(!1);
571
+ B(I), m(!1), i(!1);
572
572
  },
573
573
  onEdit: (I) => v(I),
574
- onSave: async (I) => Me(I)
575
- }), Ue = {
574
+ onSave: async (I) => Oe(I)
575
+ }), Ae = {
576
576
  viewType: t,
577
- viewAlias: i,
577
+ viewAlias: o,
578
578
  projectName: s,
579
579
  isMenuOpen: g,
580
580
  editingView: V,
581
581
  currentUser: w,
582
582
  selectedView: y,
583
- viewSettings: Z,
584
- editingViewData: Fe,
585
- isLoadingEditingViewData: xe,
583
+ viewSettings: N,
584
+ editingViewData: Se,
585
+ isLoadingEditingViewData: Pe,
586
586
  viewsList: C,
587
587
  // Working view
588
- workingSettings: ne,
588
+ workingSettings: re,
589
589
  workingView: f,
590
- isViewWorking: re,
591
- onUpdateWorkingView: Re,
590
+ isViewWorking: ae,
591
+ onUpdateWorkingView: _e,
592
592
  // base views
593
593
  projectBaseView: K,
594
- studioBaseView: Y,
594
+ studioBaseView: Z,
595
595
  // base view mutations
596
- onCreateBaseView: Pe,
597
- onUpdateBaseView: Se,
598
- onDeleteBaseView: Oe,
599
- onLoadBaseView: $e,
600
- editingViewId: ae,
601
- viewMenuItems: We,
602
- isLoadingViews: Ie,
596
+ onCreateBaseView: $e,
597
+ onUpdateBaseView: Re,
598
+ onDeleteBaseView: We,
599
+ onLoadBaseView: Ue,
600
+ editingViewId: ce,
601
+ viewMenuItems: qe,
602
+ isLoadingViews: Me,
603
603
  isErrorWorkingView: R,
604
604
  // data
605
605
  shareOptions: u,
606
- setIsMenuOpen: o,
606
+ setIsMenuOpen: i,
607
607
  setEditingView: v,
608
608
  setSelectedView: B,
609
609
  onSettingsChanged: m,
@@ -612,13 +612,13 @@ const qt = [
612
612
  onUpdateView: F,
613
613
  onDeleteView: S,
614
614
  // shared actions
615
- resetWorkingView: ce,
615
+ resetWorkingView: le,
616
616
  // api
617
617
  api: q,
618
618
  dispatch: c
619
619
  };
620
- return /* @__PURE__ */ b(Ke.Provider, { value: Ue, children: e });
621
- }, at = (e) => `${e}-views-portal`, Be = (e) => e ? document.getElementById(at(e)) : null, ct = H(J)`
620
+ return /* @__PURE__ */ b(Ke.Provider, { value: Ae, children: e });
621
+ }, at = (e) => `${e}-views-portal`, Ie = (e) => e ? document.getElementById(at(e)) : null, ct = G(J)`
622
622
  padding: var(--padding-s);
623
623
  border-radius: var(--border-radius-m);
624
624
  margin: -4px 0;
@@ -639,7 +639,7 @@ const qt = [
639
639
  background-color: var(--md-sys-color-primary-hover);
640
640
  }
641
641
  }
642
- `, lt = H.div`
642
+ `, lt = G.div`
643
643
  position: fixed;
644
644
  top: 0;
645
645
  left: 0;
@@ -654,13 +654,13 @@ const qt = [
654
654
  background-color: var(--md-sys-color-surface-container-high);
655
655
  border-radius: var(--border-radius-l);
656
656
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.15);
657
- `, dt = H.li`
657
+ `, dt = G.li`
658
658
  height: 1px;
659
659
  background-color: var(--md-sys-color-outline-variant);
660
660
  margin: 4px 0;
661
- `, ut = H.div`
661
+ `, ut = G.div`
662
662
  margin-left: 6px;
663
- `, wt = H(pe)`
663
+ `, wt = G(ye)`
664
664
  padding: 0 8px 0 4px !important;
665
665
  outline: 1px dashed var(--md-sys-color-outline);
666
666
  margin: 0 8px 4px 0;
@@ -699,7 +699,7 @@ const qt = [
699
699
  &.powerpack-locked {
700
700
  .icon {
701
701
  color: var(--md-sys-color-tertiary);
702
- font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 20;
702
+ font-variation-settings: 'FILL' 1;
703
703
  }
704
704
  }
705
705
  `, gt = ({
@@ -707,48 +707,48 @@ const qt = [
707
707
  fullButtonProps: t = () => ({})
708
708
  }) => {
709
709
  const {
710
- viewType: i,
710
+ viewType: o,
711
711
  viewAlias: s,
712
712
  isMenuOpen: c,
713
713
  setIsMenuOpen: n,
714
714
  selectedView: r,
715
715
  isViewWorking: w,
716
716
  editingViewId: g
717
- } = G(), o = te(null);
718
- if (!i) return null;
717
+ } = H(), i = se(null);
718
+ if (!o) return null;
719
719
  const V = (l) => {
720
720
  l.preventDefault(), l.stopPropagation(), n(!c);
721
721
  }, v = {
722
722
  icon: "view_quilt",
723
723
  onClick: V,
724
- className: he({ active: !!g, open: c }),
724
+ className: ke({ active: !!g, open: c }),
725
725
  tabIndex: 0,
726
726
  "data-tooltip": w ? `Working ${s.toLowerCase()}` : `${s}: ` + r?.label || "None",
727
727
  "data-tooltip-delay": 0,
728
728
  onKeyDown: (l) => {
729
729
  (l.key === "Enter" || l.key === " ") && V(l);
730
730
  }
731
- }, p = e ? /* @__PURE__ */ b(pe, { ...v, ...t(r) }) : /* @__PURE__ */ b(ct, { ref: o, ...v }), d = Be(i);
731
+ }, p = e ? /* @__PURE__ */ b(ye, { ...v, ...t(r) }) : /* @__PURE__ */ b(ct, { ref: i, ...v }), d = Ie(o);
732
732
  return d ? we(p, d) : null;
733
- }, ft = () => null, De = "views-dialog", Vt = ({}) => {
733
+ }, ft = () => null, xe = "views-dialog", Vt = ({}) => {
734
734
  const {
735
735
  editingView: e,
736
736
  editingViewData: t,
737
- isLoadingEditingViewData: i,
737
+ isLoadingEditingViewData: o,
738
738
  setEditingView: s,
739
739
  viewType: c,
740
740
  viewAlias: n,
741
741
  projectName: r,
742
742
  currentUser: w,
743
743
  viewSettings: g,
744
- shareOptions: o,
744
+ shareOptions: i,
745
745
  setSelectedView: V,
746
746
  onCreateView: v,
747
747
  onUpdateView: p,
748
748
  onDeleteView: d,
749
749
  api: l,
750
750
  dispatch: a
751
- } = G(), { powerLicense: u } = Q(), [y, { isLoading: B, outdated: D }] = ve({
751
+ } = H(), { powerLicense: u } = Q(), [y, { isLoading: B, outdated: D }] = Ce({
752
752
  addon: "powerpack",
753
753
  remote: "views",
754
754
  module: "ViewFormDialog",
@@ -775,13 +775,13 @@ const qt = [
775
775
  viewId: e === !0 ? void 0 : e,
776
776
  ...t || {}
777
777
  },
778
- isLoading: i,
778
+ isLoading: o,
779
779
  viewSettings: g,
780
780
  setEditingView: s,
781
781
  viewType: c,
782
782
  viewAlias: n,
783
783
  projectName: r,
784
- shareOptions: o,
784
+ shareOptions: i,
785
785
  setSelected: V,
786
786
  onCreateView: v,
787
787
  onUpdateView: p,
@@ -791,7 +791,7 @@ const qt = [
791
791
  currentUser: w,
792
792
  pt: {
793
793
  dialog: {
794
- className: De
794
+ className: xe
795
795
  }
796
796
  }
797
797
  }
@@ -799,13 +799,13 @@ const qt = [
799
799
  }, mt = ({ projectName: e }) => {
800
800
  const {
801
801
  projectBaseView: t,
802
- studioBaseView: i,
802
+ studioBaseView: o,
803
803
  onCreateBaseView: s,
804
804
  onDeleteBaseView: c,
805
805
  onLoadBaseView: n,
806
806
  viewAlias: r
807
- } = G(), { powerLicense: w, setPowerpackDialog: g } = Q(), [o, V] = me("collapsed-default-view", !1), v = async (p, d) => {
808
- const l = p ? i : t, a = !p && w === !1;
807
+ } = H(), { powerLicense: w, setPowerpackDialog: g } = Q(), [i, V] = ve("collapsed-default-view", !1), v = async (p, d) => {
808
+ const l = p ? o : t, a = !p && w === !1;
809
809
  if (a && !d) {
810
810
  g("sharedViews");
811
811
  return;
@@ -820,22 +820,22 @@ const qt = [
820
820
  }
821
821
  }) : await n(p) : await s(p);
822
822
  };
823
- return /* @__PURE__ */ A(j, { children: [
823
+ return /* @__PURE__ */ A(X, { children: [
824
824
  /* @__PURE__ */ b(
825
825
  ze,
826
826
  {
827
- onClick: () => V(!o),
828
- collapsed: o,
827
+ onClick: () => V(!i),
828
+ collapsed: i,
829
829
  id: "default-views",
830
830
  title: `Default ${r.toLowerCase()}`,
831
831
  style: { marginBottom: "10px" }
832
832
  }
833
833
  ),
834
- !o && /* @__PURE__ */ A(ut, { children: [
834
+ !i && /* @__PURE__ */ A(ut, { children: [
835
835
  /* @__PURE__ */ b(
836
836
  ue,
837
837
  {
838
- existingView: !!i,
838
+ existingView: !!o,
839
839
  label: "Studio",
840
840
  onClick: (p) => v(!0, p)
841
841
  }
@@ -854,7 +854,7 @@ const qt = [
854
854
  }, ue = ({
855
855
  existingView: e,
856
856
  onClick: t,
857
- label: i,
857
+ label: o,
858
858
  powerLicense: s = void 0
859
859
  }) => {
860
860
  const c = (r) => {
@@ -865,7 +865,7 @@ const qt = [
865
865
  return /* @__PURE__ */ A(
866
866
  wt,
867
867
  {
868
- className: he({
868
+ className: ke({
869
869
  "powerpack-locked": s === !1,
870
870
  active: e
871
871
  }),
@@ -878,58 +878,58 @@ const qt = [
878
878
  onClick: (r) => e && n(r)
879
879
  }
880
880
  ),
881
- i
881
+ o
882
882
  ]
883
883
  }
884
884
  );
885
- }, pt = H(J)`
885
+ }, pt = G(J)`
886
886
  color: var(--md-sys-color-tertiary);
887
- font-variation-settings: 'FILL' 1, 'wght' 200, 'GRAD' 200, 'opsz' 20;
887
+ font-variation-settings: 'FILL' 1;
888
888
  `, ht = () => {
889
889
  const {
890
890
  viewType: e,
891
891
  viewAlias: t,
892
- isMenuOpen: i,
892
+ isMenuOpen: o,
893
893
  setIsMenuOpen: s,
894
894
  setEditingView: c,
895
895
  selectedView: n,
896
896
  workingView: r,
897
897
  viewMenuItems: w,
898
898
  projectName: g
899
- } = G(), { powerLicense: o, setPowerpackDialog: V } = Q(), v = te(null), { user: p } = Ve(), d = (p?.uiExposureLevel || 0) >= 900, l = Be(e), a = l?.getBoundingClientRect(), y = {
899
+ } = H(), { powerLicense: i, setPowerpackDialog: V } = Q(), v = se(null), { user: p } = he(), d = (p?.uiExposureLevel || 0) >= 900, l = Ie(e), a = l?.getBoundingClientRect(), y = {
900
900
  top: a ? a.bottom + 8 : 0,
901
901
  left: a ? a.left : 0
902
902
  };
903
903
  U(() => {
904
904
  const M = (m) => {
905
- const k = m.target, L = v.current?.contains(k) || l?.contains(k), C = document.querySelector("." + De)?.contains(k), E = document.querySelector(".options")?.contains(k), S = document.querySelector(".p-confirm-dialog")?.contains(k);
906
- !L && !C && !E && !S && i && s(!1);
905
+ const k = m.target, L = v.current?.contains(k) || l?.contains(k), C = document.querySelector("." + xe)?.contains(k), E = document.querySelector(".options")?.contains(k), S = document.querySelector(".p-confirm-dialog")?.contains(k);
906
+ !L && !C && !E && !S && o && s(!1);
907
907
  }, P = (m) => {
908
- m.key === "Escape" && i && s(!1);
908
+ m.key === "Escape" && o && s(!1);
909
909
  };
910
910
  return document.addEventListener("mousedown", M), document.addEventListener("keydown", P), () => {
911
911
  document.removeEventListener("mousedown", M), document.removeEventListener("keydown", P);
912
912
  };
913
- }, [i, l, s]), U(() => {
914
- i && v.current && v.current.focus();
915
- }, [i]);
913
+ }, [o, l, s]), U(() => {
914
+ o && v.current && v.current.focus();
915
+ }, [o]);
916
916
  const B = h(() => {
917
- o ? c(!0) : V("sharedViews");
918
- }, [o, V, c, s]), D = !n || r?.id === n.id ? ie : n.id;
919
- return /* @__PURE__ */ b(j, { children: i && we(
917
+ i ? c(!0) : V("sharedViews");
918
+ }, [i, V, c, s]), D = !n || r?.id === n.id ? ne : n.id;
919
+ return /* @__PURE__ */ b(X, { children: o && we(
920
920
  /* @__PURE__ */ A(lt, { style: y, ref: v, tabIndex: 0, children: [
921
- /* @__PURE__ */ b(Xe, { items: w, selected: D }),
922
- d && /* @__PURE__ */ A(j, { children: [
921
+ /* @__PURE__ */ b(je, { items: w, selected: D }),
922
+ d && /* @__PURE__ */ A(X, { children: [
923
923
  /* @__PURE__ */ b(mt, { projectName: g }),
924
924
  /* @__PURE__ */ b(dt, {})
925
925
  ] }),
926
926
  /* @__PURE__ */ b(
927
- je,
927
+ Xe,
928
928
  {
929
929
  label: `Create new ${t.toLowerCase()}`,
930
930
  id: Ne,
931
931
  startContent: /* @__PURE__ */ b(J, { icon: "add" }),
932
- endContent: !o && /* @__PURE__ */ b(pt, { icon: "bolt" }),
932
+ endContent: !i && /* @__PURE__ */ b(pt, { icon: "bolt" }),
933
933
  onClick: B,
934
934
  tabIndex: 0
935
935
  }
@@ -938,33 +938,39 @@ const qt = [
938
938
  document.body
939
939
  ) });
940
940
  }, vt = () => {
941
- const { resetWorkingView: e } = G(), t = h(async () => {
941
+ const { resetWorkingView: e } = H(), t = h(async () => {
942
942
  await e();
943
943
  }, [e]);
944
944
  return U(() => {
945
- const i = (s) => {
945
+ const o = (s) => {
946
946
  s.target instanceof HTMLElement && (s.target.tagName === "INPUT" || s.target.tagName === "TEXTAREA" || s.target.isContentEditable || s.target.getAttribute("role") === "textbox" || s.target.closest(".block-shortcuts")) || s.shiftKey && (s.ctrlKey || s.metaKey) && s.key === "0" && (s.preventDefault(), t());
947
947
  };
948
- return window.addEventListener("keydown", i), () => {
949
- window.removeEventListener("keydown", i);
948
+ return window.addEventListener("keydown", o), () => {
949
+ window.removeEventListener("keydown", o);
950
950
  };
951
951
  }, [t]), {
952
952
  resetViewToDefault: t
953
953
  };
954
- }, Gt = () => (vt(), /* @__PURE__ */ A(j, { children: [
954
+ }, Ht = () => (vt(), /* @__PURE__ */ A(X, { children: [
955
955
  /* @__PURE__ */ b(gt, {}),
956
956
  /* @__PURE__ */ b(ht, {}),
957
957
  /* @__PURE__ */ b(Vt, {})
958
- ] })), Ht = () => {
959
- const { viewSettings: e } = G(), [t, i] = W(null), [s, c] = W(null), { updateViewSettings: n } = ke(), r = e, w = r?.filter ?? {}, g = r?.columns ?? [], o = r?.sliceType;
958
+ ] })), Gt = ({
959
+ viewType: e,
960
+ projectName: t
961
+ }) => {
962
+ const o = !e, s = { viewType: e, projectName: t };
963
+ ge(s, { skip: o }), me(s, { skip: o }), pe(s, { skip: o }), Y(s, { skip: o }), Y({ viewType: e, projectName: void 0 }, { skip: o });
964
+ }, Qt = () => {
965
+ const { viewSettings: e } = H(), [t, o] = W(null), [s, c] = W(null), { updateViewSettings: n } = Le(), r = e, w = r?.filter ?? {}, g = r?.columns ?? [], i = r?.sliceType;
960
966
  U(() => {
961
- i(null);
967
+ o(null);
962
968
  }, [JSON.stringify(e?.filter)]), U(() => {
963
969
  c(null);
964
970
  }, [JSON.stringify(e?.columns)]);
965
971
  const V = t !== null ? t : w, v = s !== null ? s : g, p = h(
966
972
  async (u) => {
967
- await n({ filter: u }, i, u, {
973
+ await n({ filter: u }, o, u, {
968
974
  errorMessage: "Failed to update filter settings"
969
975
  });
970
976
  },
@@ -990,12 +996,12 @@ const qt = [
990
996
  onUpdateFilters: p,
991
997
  columns: v,
992
998
  onUpdateColumns: d,
993
- sliceType: o,
999
+ sliceType: i,
994
1000
  onUpdateSliceType: a
995
1001
  };
996
- }, Qt = ({ viewSettings: e, updateViewSettings: t }) => {
997
- const [i, s] = W(null), [c, n] = W(null), [r, w] = W(null), g = e, o = g?.filter ?? {}, V = g?.showHierarchy ?? !0, v = g?.sliceType, p = _(
998
- () => Ce(g),
1002
+ }, Jt = ({ viewSettings: e, updateViewSettings: t }) => {
1003
+ const [o, s] = W(null), [c, n] = W(null), [r, w] = W(null), g = e, i = g?.filter ?? {}, V = g?.showHierarchy ?? !0, v = g?.sliceType, p = _(
1004
+ () => Be(g),
999
1005
  [JSON.stringify(e)]
1000
1006
  );
1001
1007
  U(() => {
@@ -1008,7 +1014,7 @@ const qt = [
1008
1014
  ]), U(() => {
1009
1015
  w(null);
1010
1016
  }, [JSON.stringify(e?.columns)]);
1011
- const d = i !== null ? i : o, l = c !== null ? c : V, a = r || p, u = h(() => {
1017
+ const d = o !== null ? o : i, l = c !== null ? c : V, a = r || p, u = h(() => {
1012
1018
  }, []), y = h(
1013
1019
  async (m) => {
1014
1020
  await t({ sliceType: m }, u, m, {
@@ -1028,7 +1034,7 @@ const qt = [
1028
1034
  if (m && a?.groupBy) {
1029
1035
  const k = { ...a, groupBy: void 0 };
1030
1036
  w(k);
1031
- const L = ee(k);
1037
+ const L = te(k);
1032
1038
  await t(
1033
1039
  { ...L, showHierarchy: !0 },
1034
1040
  n,
@@ -1052,7 +1058,7 @@ const qt = [
1052
1058
  ...Object.keys(m.columnVisibility || {}),
1053
1059
  ...m.columnPinning?.left || [],
1054
1060
  ...m.columnPinning?.right || []
1055
- ].filter(Boolean).filter((S, F, $) => $.indexOf(S) === F), C = ee(m, L), E = !!m.groupBy;
1061
+ ].filter(Boolean).filter((S, F, $) => $.indexOf(S) === F), C = te(m, L), E = !!m.groupBy;
1056
1062
  E && n(!1), await t(
1057
1063
  E ? { ...C, showHierarchy: !1 } : C,
1058
1064
  w,
@@ -1093,26 +1099,26 @@ const qt = [
1093
1099
  sliceType: v,
1094
1100
  onUpdateSliceType: y
1095
1101
  };
1096
- }, Jt = () => {
1097
- const { viewSettings: e } = G(), [t, i] = W(null), [s, c] = W(null), { updateViewSettings: n } = ke(), r = e, w = r?.filter ?? {}, g = _(
1098
- () => Ce(r),
1102
+ }, Kt = () => {
1103
+ const { viewSettings: e } = H(), [t, o] = W(null), [s, c] = W(null), { updateViewSettings: n } = Le(), r = e, w = r?.filter ?? {}, g = _(
1104
+ () => Be(r),
1099
1105
  [JSON.stringify(e)]
1100
1106
  );
1101
1107
  U(() => {
1102
- i(null);
1108
+ o(null);
1103
1109
  }, [JSON.stringify(e?.filter)]), U(() => {
1104
1110
  c(null);
1105
1111
  }, [JSON.stringify(e?.columns)]);
1106
- const o = t !== null ? t : w, V = s || g, v = h(
1112
+ const i = t !== null ? t : w, V = s || g, v = h(
1107
1113
  async (d) => {
1108
- await n({ filter: d }, i, d, {
1114
+ await n({ filter: d }, o, d, {
1109
1115
  errorMessage: "Failed to update filter settings"
1110
1116
  });
1111
1117
  },
1112
1118
  [n]
1113
1119
  ), p = h(
1114
1120
  async (d, l) => {
1115
- const a = ee(d, l);
1121
+ const a = te(d, l);
1116
1122
  await n(a, c, d, {
1117
1123
  errorMessage: "Failed to update columns"
1118
1124
  });
@@ -1120,41 +1126,42 @@ const qt = [
1120
1126
  [n]
1121
1127
  );
1122
1128
  return {
1123
- filters: o,
1129
+ filters: i,
1124
1130
  onUpdateFilters: v,
1125
1131
  columns: V,
1126
1132
  onUpdateColumns: p
1127
1133
  };
1128
1134
  };
1129
1135
  export {
1130
- be as BASE_VIEW_ID,
1136
+ De as BASE_VIEW_ID,
1131
1137
  Ne as NEW_VIEW_ID,
1132
1138
  Je as VIEW_DIVIDER,
1133
- Gt as Views,
1139
+ Ht as Views,
1134
1140
  gt as ViewsButton,
1135
1141
  Ke as ViewsContext,
1136
- Xe as ViewsMenu,
1142
+ je as ViewsMenu,
1137
1143
  ht as ViewsMenuContainer,
1138
1144
  At as ViewsProvider,
1139
- ie as WORKING_VIEW_ID,
1145
+ ne as WORKING_VIEW_ID,
1140
1146
  Xt as generateViewId,
1141
- ye as generateWorkingView,
1147
+ be as generateWorkingView,
1142
1148
  Te as getCustomViewsFallback,
1143
- Be as getViewsPortalContainer,
1149
+ Ie as getViewsPortalContainer,
1144
1150
  at as getViewsPortalId,
1145
- Le as isViewStudioScope,
1146
- jt as updateViewSettings,
1151
+ Ee as isViewStudioScope,
1152
+ Yt as updateViewSettings,
1147
1153
  ot as useBaseViewMutations,
1148
1154
  et as useBuildViewMenuItems,
1149
- Jt as useListsViewSettings,
1150
- Qt as useOverviewViewSettings,
1155
+ Kt as useListsViewSettings,
1156
+ Jt as useOverviewViewSettings,
1157
+ Gt as usePrefetchViews,
1151
1158
  it as useSaveViewFromCurrent,
1152
1159
  tt as useSelectedView,
1153
- Ht as useTaskProgressViewSettings,
1154
- ke as useViewUpdateHelper,
1155
- G as useViewsContext,
1160
+ Qt as useTaskProgressViewSettings,
1161
+ Le as useViewUpdateHelper,
1162
+ H as useViewsContext,
1156
1163
  st as useViewsMutations,
1157
1164
  vt as useViewsShortcuts,
1158
- Yt as useViewsState,
1165
+ Zt as useViewsState,
1159
1166
  qt as viewTypes
1160
1167
  };