@ynput/ayon-frontend-shared 0.4.7 → 0.6.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 (77) hide show
  1. package/dist/DetailsPanel.es.js +684 -649
  2. package/dist/Feed.es.js +22 -22
  3. package/dist/ListTable.es.js +78 -67
  4. package/dist/ProjectTreeTable.es.js +2185 -2132
  5. package/dist/Slicer.es.js +152 -120
  6. package/dist/Views.es.js +1 -1
  7. package/dist/api.es.js +332 -329
  8. package/dist/chunks/Actions.es.js +7 -7
  9. package/dist/chunks/ColumnDropIndicator.es.js +127 -241
  10. package/dist/chunks/DeleteEntitiesContext.es.js +109 -109
  11. package/dist/chunks/DetailsDialog.es.js +3 -3
  12. package/dist/chunks/DetailsPanelContext.es.js +155 -0
  13. package/dist/chunks/EntityPath.es.js +40 -40
  14. package/dist/chunks/EntityPickerDialog.es.js +1 -1
  15. package/dist/chunks/EntityTooltip.es.js +3 -3
  16. package/dist/chunks/EntityUpdatesContext.es.js +1 -1
  17. package/dist/chunks/Feed.es.js +2208 -2611
  18. package/dist/chunks/FilterErrorActions.es.js +5 -5
  19. package/dist/chunks/GlobalContext.es.js +21 -21
  20. package/dist/chunks/InfoMessage.es.js +146 -0
  21. package/dist/chunks/Menu.es.js +6 -6
  22. package/dist/chunks/MenuContext.es.js +51 -240
  23. package/dist/chunks/MenuItem.es.js +1 -1
  24. package/dist/chunks/MetaWidget.es.js +3211 -3761
  25. package/dist/chunks/NewEntityContext.es.js +539 -544
  26. package/dist/chunks/PlayableIcon.es.js +4261 -1163
  27. package/dist/chunks/ProjectContext.es.js +2 -2
  28. package/dist/chunks/ProjectFoldersContext.es.js +84 -76
  29. package/dist/chunks/RepresentationsList.es.js +3 -3
  30. package/dist/chunks/ReviewablesSelector.es.js +396 -384
  31. package/dist/chunks/SimpleForm.es.js +9 -9
  32. package/dist/chunks/SimpleTable.es.js +286 -283
  33. package/dist/chunks/Slicer.es.js +1129 -689
  34. package/dist/chunks/TableSettingsFallback.es.js +6 -6
  35. package/dist/chunks/ThumbnailSimple.es.js +410 -61
  36. package/dist/chunks/VersionUploadContext.es.js +30 -30
  37. package/dist/chunks/ViewsContext.es.js +97 -97
  38. package/dist/chunks/Watchers.es.js +628 -598
  39. package/dist/chunks/entityDefinitions.es.js +276 -134
  40. package/dist/chunks/expandRelativeDates.es.js +27 -0
  41. package/dist/chunks/getBundleMode.es.js +16 -61
  42. package/dist/chunks/getUris.es.js +329 -322
  43. package/dist/chunks/queryFilterToClientFilter.es.js +11 -10
  44. package/dist/chunks/searchTerms.es.js +186 -173
  45. package/dist/chunks/uriUtils.es.js +48 -0
  46. package/dist/chunks/useAttributeEnums.es.js +69 -61
  47. package/dist/chunks/useColumnDragRestriction.es.js +37 -27
  48. package/dist/chunks/useDateRangeFilter.es.js +3 -3
  49. package/dist/chunks/useLocalStorage.es.js +8 -8
  50. package/dist/chunks/useSessionStorage.es.js +61 -0
  51. package/dist/chunks/viewUpdateHelper.es.js +8 -8
  52. package/dist/components.es.js +199 -194
  53. package/dist/context.es.js +60 -58
  54. package/dist/hooks.es.js +108 -101
  55. package/dist/index.es.js +20 -14
  56. package/dist/types/Actions.d.ts +16 -16
  57. package/dist/types/ContextMenu.d.ts +16 -16
  58. package/dist/types/DetailsPanel.d.ts +22 -16
  59. package/dist/types/EntityPickerDialog.d.ts +16 -16
  60. package/dist/types/Feed.d.ts +16 -16
  61. package/dist/types/ListTable.d.ts +16 -16
  62. package/dist/types/NewEntity.d.ts +16 -16
  63. package/dist/types/ProjectTreeTable.d.ts +48 -22
  64. package/dist/types/RepresentationsList.d.ts +19 -16
  65. package/dist/types/SimpleTable.d.ts +17 -16
  66. package/dist/types/Slicer.d.ts +119 -34
  67. package/dist/types/Views.d.ts +17 -17
  68. package/dist/types/api.d.ts +404 -95
  69. package/dist/types/components.d.ts +86 -25
  70. package/dist/types/context.d.ts +60 -17
  71. package/dist/types/hooks.d.ts +16 -16
  72. package/dist/types/index.d.ts +16 -16
  73. package/dist/types/util.d.ts +16 -16
  74. package/dist/util.es.js +108 -97
  75. package/package.json +26 -13
  76. package/dist/chunks/mentionTypeOptions.es.js +0 -15
  77. package/dist/chunks/useSlicerSplitter.es.js +0 -18
@@ -1,17 +1,17 @@
1
- import { jsxs as ae, jsx as v } from "react/jsx-runtime";
1
+ import { jsxs as ae, jsx as m } from "react/jsx-runtime";
2
2
  import { forwardRef as Z, useMemo as F, useCallback as b, useRef as De, useState as Y, createContext as Ie, useContext as Ee } from "react";
3
3
  import "./searchTerms.es.js";
4
- import { aO as j, bp as Me, d0 as N, b2 as ne, dq as ce, dt as M, S as J, cd as Pe, cR as _e, cy as We, bl as oe, cw as Re } from "./getUris.es.js";
4
+ import { aP as j, br as Pe, d2 as N, b3 as ne, ds as ce, dv as P, S as J, cf as Me, cT as _e, cA as We, bn as oe, cy as Re } from "./getUris.es.js";
5
5
  import { confirmDialog as Fe } from "primereact/confirmdialog";
6
6
  import { Button as Oe, theme as le, Icon as de } from "@ynput/ayon-react-components";
7
- import P from "styled-components";
7
+ import M from "styled-components";
8
8
  import K from "clsx";
9
9
  import { a as qe, K as re } from "./platform.es.js";
10
10
  import "lodash";
11
- import { toast as m } from "react-toastify";
11
+ import { toast as v } from "react-toastify";
12
12
  import { v4 as Ge } from "uuid";
13
13
  import { u as Qe } from "./GlobalContext.es.js";
14
- import { u as ue, a as Ue, e as Ke } from "./useLocalStorage.es.js";
14
+ import { a as ue, u as Ue, e as Ke } from "./useLocalStorage.es.js";
15
15
  import { useDispatch as He } from "react-redux";
16
16
  const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
17
17
  id: ze(),
@@ -25,7 +25,7 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
25
25
  "lists",
26
26
  "reviews",
27
27
  "reports"
28
- ], ge = "_working_", Lt = "_new_view_", Ve = "__base__", Ae = P.li`
28
+ ], ge = "_working_", Lt = "_new_view_", fe = "__base__", Ae = M.li`
29
29
  position: relative;
30
30
  padding: 4px 6px 4px 12px;
31
31
  user-select: none;
@@ -78,7 +78,7 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
78
78
  display: flex;
79
79
  }
80
80
  }
81
- `, X = P(Oe)`
81
+ `, X = M(Oe)`
82
82
  &.hasIcon {
83
83
  padding: 2px;
84
84
  }
@@ -105,10 +105,10 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
105
105
  isSelected: o,
106
106
  isEditable: d,
107
107
  isSaveable: u,
108
- highlighted: V,
108
+ highlighted: f,
109
109
  onEdit: g,
110
110
  onSave: i,
111
- onResetView: f,
111
+ onResetView: V,
112
112
  className: x,
113
113
  ...$
114
114
  }, w) => {
@@ -128,34 +128,34 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
128
128
  ref: w,
129
129
  children: [
130
130
  n && n,
131
- /* @__PURE__ */ v("span", { className: "label", children: t }),
132
- f && /* @__PURE__ */ v(
131
+ /* @__PURE__ */ m("span", { className: "label", children: t }),
132
+ V && /* @__PURE__ */ m(
133
133
  X,
134
134
  {
135
135
  icon: "restart_alt",
136
136
  variant: "text",
137
137
  className: "reset",
138
- onClick: f,
138
+ onClick: V,
139
139
  "data-tooltip": "Reset to Default",
140
140
  "data-shortcut": qe("0", [re.Shift, re.Ctrl])
141
141
  }
142
142
  ),
143
- d && u && !o && /* @__PURE__ */ v(
143
+ d && u && !o && /* @__PURE__ */ m(
144
144
  X,
145
145
  {
146
146
  icon: "save",
147
147
  variant: "text",
148
- className: K("save", { active: V === "save" }),
149
- onClick: (a) => c(a, V !== "save"),
148
+ className: K("save", { active: f === "save" }),
149
+ onClick: (a) => c(a, f !== "save"),
150
150
  "data-tooltip": `Save ${l} settings from current ${l}`
151
151
  }
152
152
  ),
153
- d && g && /* @__PURE__ */ v(
153
+ d && g && /* @__PURE__ */ m(
154
154
  X,
155
155
  {
156
156
  variant: "text",
157
157
  icon: "more_horiz",
158
- className: K("more", { active: V === "edit" }),
158
+ className: K("more", { active: f === "edit" }),
159
159
  onClick: (a) => g(a, e),
160
160
  "data-tooltip": `Edit ${l}`
161
161
  }
@@ -165,10 +165,10 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
165
165
  }
166
166
  );
167
167
  }
168
- ), Xe = P.div`
168
+ ), Xe = M.div`
169
169
  overflow: auto;
170
170
  max-height: 40vh;
171
- `, Ye = P.ul`
171
+ `, Ye = M.ul`
172
172
  /* reset defaults */
173
173
  margin: 0;
174
174
  padding: 0;
@@ -178,16 +178,16 @@ const ze = () => Ge().replace(/-/g, ""), we = (e = {}) => ({
178
178
  flex-direction: column;
179
179
  gap: var(--base-gap-small);
180
180
  margin-bottom: var(--padding-s);
181
- `, Ze = P.li`
181
+ `, Ze = M.li`
182
182
  height: 1px;
183
183
  background-color: var(--md-sys-color-outline-variant);
184
184
  margin: 4px 0;
185
185
  `;
186
- P.li`
186
+ M.li`
187
187
  ${le.labelSmall}
188
188
  color: var(--md-sys-color-outline);
189
189
  `;
190
- const je = P.li`
190
+ const je = M.li`
191
191
  ${le.labelSmall}
192
192
  color: var(--md-sys-color-outline);
193
193
  user-select: none;
@@ -231,14 +231,14 @@ const je = P.li`
231
231
  className: K("views-section-header", { collapsed: t }, n),
232
232
  ref: o,
233
233
  children: [
234
- /* @__PURE__ */ v("span", { children: e }),
235
- /* @__PURE__ */ v("span", { className: "spacer" }),
236
- /* @__PURE__ */ v(de, { className: "icon", icon: "expand_more" })
234
+ /* @__PURE__ */ m("span", { children: e }),
235
+ /* @__PURE__ */ m("span", { className: "spacer" }),
236
+ /* @__PURE__ */ m(de, { className: "icon", icon: "expand_more" })
237
237
  ]
238
238
  }
239
239
  )
240
240
  ), Te = "_divider_", et = (e) => typeof e == "object" && e !== null && "type" in e && e.type === "section", Bt = Z(
241
- ({ items: e, selected: t, ...n }, s) => /* @__PURE__ */ v(Xe, { children: /* @__PURE__ */ v(Ye, { ...n, ref: s, children: e.map((o, d) => o === "_divider_" ? /* @__PURE__ */ v(Ze, {}, d) : et(o) ? /* @__PURE__ */ v(
241
+ ({ items: e, selected: t, ...n }, s) => /* @__PURE__ */ m(Xe, { children: /* @__PURE__ */ m(Ye, { ...n, ref: s, children: e.map((o, d) => o === "_divider_" ? /* @__PURE__ */ m(Ze, {}, d) : et(o) ? /* @__PURE__ */ m(
242
242
  Ne,
243
243
  {
244
244
  id: o.id,
@@ -247,7 +247,7 @@ const je = P.li`
247
247
  onClick: o.onToggle
248
248
  },
249
249
  o.id
250
- ) : /* @__PURE__ */ v(
250
+ ) : /* @__PURE__ */ m(
251
251
  Je,
252
252
  {
253
253
  tabIndex: 0,
@@ -258,13 +258,13 @@ const je = P.li`
258
258
  (o.id || "") + d.toString()
259
259
  )) }) })
260
260
  ), tt = (e) => {
261
- const { viewsList: t, onEdit: n, onSelect: s, onSave: o } = e, d = (i, f = {}) => ({
261
+ const { viewsList: t, onEdit: n, onSelect: s, onSave: o } = e, d = (i, V = {}) => ({
262
262
  id: i.id,
263
263
  label: i.label,
264
264
  isSelected: !1,
265
265
  highlighted: i.highlighted,
266
266
  onClick: () => s(i.id),
267
- ...f
267
+ ...V
268
268
  }), u = t.filter((i) => i.visibility === "private" && i.isOwner && !i.working).map(
269
269
  (i) => d(i, {
270
270
  isEditable: !0,
@@ -272,7 +272,7 @@ const je = P.li`
272
272
  onEdit: () => n(i.id),
273
273
  onSave: () => o(i.id)
274
274
  })
275
- ), V = t.filter((i) => i.visibility === "public" && !i.working).map(
275
+ ), f = t.filter((i) => i.visibility === "public" && !i.working).map(
276
276
  (i) => d(i, {
277
277
  isEditable: i.isOwner,
278
278
  isSaveable: i.isOwner,
@@ -289,7 +289,7 @@ const je = P.li`
289
289
  );
290
290
  return {
291
291
  myViews: u,
292
- sharedViews: V,
292
+ sharedViews: f,
293
293
  allPrivateViews: g
294
294
  };
295
295
  }, st = ({
@@ -300,10 +300,10 @@ const je = P.li`
300
300
  projectName: o,
301
301
  currentUser: d,
302
302
  useWorkingView: u,
303
- editingViewId: V,
303
+ editingViewId: f,
304
304
  collapsed: g,
305
305
  setCollapsed: i,
306
- onSelect: f,
306
+ onSelect: V,
307
307
  onEdit: x,
308
308
  onSave: $,
309
309
  onResetWorkingView: w,
@@ -313,13 +313,13 @@ const je = P.li`
313
313
  () => e.map((r) => ({
314
314
  ...r,
315
315
  isOwner: r.owner === d?.name,
316
- highlighted: V === r.id ? "save" : void 0
316
+ highlighted: f === r.id ? "save" : void 0
317
317
  })),
318
- [e, d, V]
318
+ [e, d, f]
319
319
  ), y = {
320
320
  id: ge,
321
321
  label: u ? `Personal ${s.toLowerCase()}` : `Working ${s.toLowerCase()}`,
322
- startContent: u && /* @__PURE__ */ v(de, { icon: "person" }),
322
+ startContent: u && /* @__PURE__ */ m(de, { icon: "person" }),
323
323
  isEditable: !1
324
324
  }, D = b(async () => {
325
325
  let r = t?.id;
@@ -333,14 +333,14 @@ const je = P.li`
333
333
  projectName: o
334
334
  }).unwrap(), r = C.id;
335
335
  } catch (C) {
336
- m.error(`Failed to create working ${s}: ${C}`);
336
+ v.error(`Failed to create working ${s}: ${C}`);
337
337
  }
338
- f(r);
339
- }, [t, n, a, o, f]), _ = async (r) => {
338
+ V(r);
339
+ }, [t, n, a, o, V]), _ = async (r) => {
340
340
  try {
341
- await $(r), f(r);
341
+ await $(r), V(r);
342
342
  } catch (C) {
343
- m.error(C);
343
+ v.error(C);
344
344
  }
345
345
  }, [W, { isLoading: R }] = Ue({
346
346
  addon: "powerpack",
@@ -352,7 +352,7 @@ const je = P.li`
352
352
  }), { myViews: S, sharedViews: I, allPrivateViews: k } = W({
353
353
  viewsList: h,
354
354
  onEdit: x,
355
- onSelect: f,
355
+ onSelect: V,
356
356
  onSave: _
357
357
  }), E = b(
358
358
  (r) => {
@@ -397,7 +397,7 @@ const je = P.li`
397
397
  }), r;
398
398
  }, [L, O, g, E, l, c]);
399
399
  }, it = ({ viewType: e, projectName: t }) => {
400
- const { currentData: n, isLoading: s } = Me(
400
+ const { currentData: n, isLoading: s } = Pe(
401
401
  { viewType: e, projectName: t },
402
402
  { skip: !e }
403
403
  ), [o] = N(), d = De({}), u = d.current[e];
@@ -413,7 +413,7 @@ const je = P.li`
413
413
  projectName: t
414
414
  }).unwrap();
415
415
  } catch (i) {
416
- m.warn(`Failed to set default view: ${i}`);
416
+ v.warn(`Failed to set default view: ${i}`);
417
417
  }
418
418
  }, u, s];
419
419
  }, ot = ({
@@ -424,12 +424,12 @@ const je = P.li`
424
424
  onDelete: o,
425
425
  onUpdate: d
426
426
  }) => {
427
- const u = He(), [V] = j(), [g] = ne(), [i] = ce(), [f] = N(), x = b(
427
+ const u = He(), [f] = j(), [g] = ne(), [i] = ce(), [V] = N(), x = b(
428
428
  async (c, a) => {
429
429
  if (!e)
430
430
  throw new Error("viewType are required for creating a view");
431
431
  try {
432
- await V({
432
+ await f({
433
433
  viewType: e,
434
434
  projectName: a ? void 0 : t,
435
435
  payload: c
@@ -438,7 +438,7 @@ const je = P.li`
438
438
  throw h;
439
439
  }
440
440
  },
441
- [V, e, t, s]
441
+ [f, e, t, s]
442
442
  ), $ = b(
443
443
  async (c, a, h) => {
444
444
  if (!e)
@@ -477,13 +477,13 @@ const je = P.li`
477
477
  throw new Error("viewType are required for resetting a view");
478
478
  try {
479
479
  u(
480
- M.util.invalidateTags([
480
+ P.util.invalidateTags([
481
481
  { type: "Views", id: `base-${e}-${t}` },
482
482
  { type: "Views", id: `base-${e}` }
483
483
  ])
484
484
  );
485
485
  const S = (await u(
486
- M.endpoints.getBaseView.initiate(
486
+ P.endpoints.getBaseView.initiate(
487
487
  { viewType: e, projectName: t },
488
488
  { subscribe: !1, forceRefetch: !0 }
489
489
  )
@@ -493,7 +493,7 @@ const je = P.li`
493
493
  I = S.settings, k = "project";
494
494
  else {
495
495
  const r = (await u(
496
- M.endpoints.getBaseView.initiate(
496
+ P.endpoints.getBaseView.initiate(
497
497
  { viewType: e },
498
498
  { subscribe: !1, forceRefetch: !0 }
499
499
  )
@@ -506,7 +506,7 @@ const je = P.li`
506
506
  viewType: e,
507
507
  projectName: t,
508
508
  payload: { settings: I }
509
- }).unwrap() : await V({
509
+ }).unwrap() : await f({
510
510
  viewType: e,
511
511
  projectName: t,
512
512
  payload: {
@@ -515,20 +515,20 @@ const je = P.li`
515
515
  working: !0,
516
516
  settings: I
517
517
  }
518
- }).unwrap(), await f({
518
+ }).unwrap(), await V({
519
519
  viewType: e,
520
520
  projectName: t,
521
521
  setDefaultViewRequestModel: { viewId: E }
522
522
  }).unwrap(), y && y(E), D && D(!1), _) {
523
523
  const L = k === "project" ? "View reset to project default view" : k === "studio" ? "View reset to studio default view" : "View reset to default settings";
524
- m.success(L);
524
+ v.success(L);
525
525
  }
526
526
  return E;
527
527
  } catch (W) {
528
- throw _ && m.error("Failed to reset view to default"), W;
528
+ throw _ && v.error("Failed to reset view to default"), W;
529
529
  }
530
530
  },
531
- [V, i, f, e, t, u]
531
+ [f, i, V, e, t, u]
532
532
  );
533
533
  return {
534
534
  onCreateView: x,
@@ -543,12 +543,12 @@ const je = P.li`
543
543
  workingView: s,
544
544
  dispatch: o
545
545
  }) => {
546
- const [d] = j(), [u] = ce(), [V] = ne(), [g] = N(), i = b(
546
+ const [d] = j(), [u] = ce(), [f] = ne(), [g] = N(), i = b(
547
547
  async (w) => {
548
548
  try {
549
549
  const a = await d({
550
550
  payload: {
551
- label: Ve,
551
+ label: fe,
552
552
  working: !1,
553
553
  settings: n || {}
554
554
  },
@@ -556,20 +556,20 @@ const je = P.li`
556
556
  projectName: w ? void 0 : t
557
557
  }).unwrap();
558
558
  o(
559
- M.util.invalidateTags([
559
+ P.util.invalidateTags([
560
560
  { type: "view", id: a.id },
561
561
  J(e, w ? void 0 : t)
562
562
  ])
563
563
  );
564
564
  const h = w ? "Studio" : "Project";
565
- m.success(`${h} default view created successfully`);
565
+ v.success(`${h} default view created successfully`);
566
566
  } catch (l) {
567
567
  const c = w ? "studio" : "project";
568
- m.error(`Failed to create ${c} base view: ${l?.message || l}`);
568
+ v.error(`Failed to create ${c} base view: ${l?.message || l}`);
569
569
  }
570
570
  },
571
571
  [d, e, t, n, o]
572
- ), f = b(
572
+ ), V = b(
573
573
  async (w, l) => {
574
574
  try {
575
575
  await u({
@@ -578,47 +578,47 @@ const je = P.li`
578
578
  projectName: l ? void 0 : t,
579
579
  payload: { settings: n || {} }
580
580
  }).unwrap(), o(
581
- M.util.invalidateTags([
581
+ P.util.invalidateTags([
582
582
  { type: "view", id: w },
583
583
  J(e, l ? void 0 : t)
584
584
  ])
585
585
  );
586
586
  const a = l ? "Studio" : "Project";
587
- m.success(`${a} default view updated successfully`);
587
+ v.success(`${a} default view updated successfully`);
588
588
  } catch (c) {
589
589
  const a = l ? "studio" : "project";
590
- m.error(`Failed to update ${a} base view: ${c?.message || c}`);
590
+ v.error(`Failed to update ${a} base view: ${c?.message || c}`);
591
591
  }
592
592
  },
593
593
  [u, e, t, n, o]
594
594
  ), x = b(
595
595
  async (w, l) => {
596
596
  try {
597
- await V({
597
+ await f({
598
598
  viewId: w,
599
599
  viewType: e,
600
600
  projectName: l ? void 0 : t
601
601
  }).unwrap(), o(
602
- M.util.invalidateTags([
602
+ P.util.invalidateTags([
603
603
  { type: "view", id: w },
604
604
  J(e, l ? void 0 : t)
605
605
  ])
606
606
  );
607
607
  const c = l ? "Studio" : "Project";
608
- m.success(`${c} default view removed successfully`);
608
+ v.success(`${c} default view removed successfully`);
609
609
  } catch (c) {
610
610
  const a = l ? "studio" : "project";
611
- m.error(`Failed to remove ${a} base view: ${c?.message || c}`);
611
+ v.error(`Failed to remove ${a} base view: ${c?.message || c}`);
612
612
  }
613
613
  },
614
- [V, e, t, o]
614
+ [f, e, t, o]
615
615
  ), $ = b(
616
616
  async (w) => {
617
617
  try {
618
618
  if (!s?.id)
619
619
  throw new Error("No working view available to update");
620
620
  const a = (await o(
621
- M.endpoints.getBaseView.initiate(
621
+ P.endpoints.getBaseView.initiate(
622
622
  {
623
623
  viewType: e,
624
624
  projectName: w ? void 0 : t
@@ -639,21 +639,21 @@ const je = P.li`
639
639
  setDefaultViewRequestModel: { viewId: s.id }
640
640
  }).unwrap();
641
641
  const h = w ? "Studio" : "Project";
642
- m.success(`Loaded ${h} default view to working view`);
642
+ v.success(`Loaded ${h} default view to working view`);
643
643
  } catch (l) {
644
644
  const c = w ? "studio" : "project";
645
- m.error(`Failed to load ${c} base view: ${l?.message || l}`);
645
+ v.error(`Failed to load ${c} base view: ${l?.message || l}`);
646
646
  }
647
647
  },
648
648
  [s, u, g, e, t, o]
649
649
  );
650
650
  return {
651
651
  onCreateBaseView: i,
652
- onUpdateBaseView: f,
652
+ onUpdateBaseView: V,
653
653
  onDeleteBaseView: x,
654
654
  onLoadBaseView: $
655
655
  };
656
- }, fe = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, at = ({
656
+ }, Ve = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, at = ({
657
657
  viewType: e,
658
658
  projectName: t,
659
659
  viewsList: n,
@@ -671,10 +671,10 @@ const je = P.li`
671
671
  {
672
672
  settings: s
673
673
  },
674
- fe(u, n)
675
- ), m.success("View settings saved");
676
- } catch (V) {
677
- const g = typeof V == "string" ? "Failed to save view settings: " + V : "Failed to save view settings";
674
+ Ve(u, n)
675
+ ), v.success("View settings saved");
676
+ } catch (f) {
677
+ const g = typeof f == "string" ? "Failed to save view settings: " + f : "Failed to save view settings";
678
678
  throw console.error(g), g;
679
679
  }
680
680
  },
@@ -699,7 +699,7 @@ const je = P.li`
699
699
  }) => {
700
700
  let { powerLicense: u } = ue();
701
701
  d?.powerLicense !== void 0 && (console.warn("Using debug power license:", d.powerLicense), u = d.powerLicense);
702
- const { user: V } = Qe(), [g, i] = Y(!1), [f, x] = Y(null), $ = "viewsMenuCollapsed", [w, l] = Ke(
702
+ const { user: f } = Qe(), [g, i] = Y(!1), [V, x] = Y(null), $ = "viewsMenuCollapsed", [w, l] = Ke(
703
703
  $,
704
704
  {}
705
705
  ), c = (p) => {
@@ -708,9 +708,9 @@ const je = P.li`
708
708
  const ie = { ...w };
709
709
  ie[U] = !1, l(ie);
710
710
  }
711
- }, { data: a } = Pe(
711
+ }, { data: a } = Me(
712
712
  { projectName: s },
713
- { skip: !u || !f }
713
+ { skip: !u || !V }
714
714
  ), [h, y, D, _] = it({
715
715
  viewType: t,
716
716
  projectName: s
@@ -721,7 +721,7 @@ const je = P.li`
721
721
  { skip: !t }
722
722
  ), k = F(
723
723
  () => S.filter(
724
- (p) => p.label !== Ve && !(s && p.working && p.scope === "studio")
724
+ (p) => p.label !== fe && !(s && p.working && p.scope === "studio")
725
725
  ),
726
726
  [S]
727
727
  ), { onCreateView: E, onDeleteView: O, onUpdateView: L, onResetWorkingView: q } = ot({
@@ -742,16 +742,16 @@ const je = P.li`
742
742
  ), { currentData: H, isLoading: pe } = oe(
743
743
  { projectName: void 0, viewType: t },
744
744
  { skip: !t }
745
- ), me = I || _ || C || Q || pe, T = r?.settings, z = h?.id === ge ? T : h?.settings, ee = h?.id === r?.id, te = W && ee && D && D !== r?.id ? D : void 0, { currentData: A, isFetching: ve } = Re(
745
+ ), ve = I || _ || C || Q || pe, T = r?.settings, z = h?.id === ge ? T : h?.settings, ee = h?.id === r?.id, te = W && ee && D && D !== r?.id ? D : void 0, { currentData: A, isFetching: me } = Re(
746
746
  {
747
- viewId: f,
748
- projectName: fe(f, k) ? void 0 : s,
747
+ viewId: V,
748
+ projectName: Ve(V, k) ? void 0 : s,
749
749
  viewType: t
750
750
  },
751
- { skip: typeof f != "string" || !u }
751
+ { skip: typeof V != "string" || !u }
752
752
  ), be = F(
753
- () => f === A?.id ? A : void 0,
754
- [f, A]
753
+ () => V === A?.id ? A : void 0,
754
+ [V, A]
755
755
  ), { onSaveViewFromCurrent: ke } = at({
756
756
  viewType: t,
757
757
  projectName: s,
@@ -791,7 +791,7 @@ const je = P.li`
791
791
  viewType: t,
792
792
  viewAlias: n,
793
793
  projectName: s,
794
- currentUser: V,
794
+ currentUser: f,
795
795
  useWorkingView: !u,
796
796
  editingViewId: te,
797
797
  selectedId: h?.id,
@@ -808,12 +808,12 @@ const je = P.li`
808
808
  viewAlias: n,
809
809
  projectName: s,
810
810
  isMenuOpen: g,
811
- editingView: f,
812
- currentUser: V,
811
+ editingView: V,
812
+ currentUser: f,
813
813
  selectedView: h,
814
814
  viewSettings: z,
815
815
  editingViewData: be,
816
- isLoadingEditingViewData: ve,
816
+ isLoadingEditingViewData: me,
817
817
  viewsList: k,
818
818
  // Working view
819
819
  workingSettings: T,
@@ -830,7 +830,7 @@ const je = P.li`
830
830
  onLoadBaseView: Se,
831
831
  editingViewId: te,
832
832
  viewMenuItems: Be,
833
- isLoadingViews: me,
833
+ isLoadingViews: ve,
834
834
  isErrorWorkingView: B,
835
835
  // data
836
836
  shareOptions: a,
@@ -845,10 +845,10 @@ const je = P.li`
845
845
  // shared actions
846
846
  resetWorkingView: se,
847
847
  // api
848
- api: M,
848
+ api: P,
849
849
  dispatch: o
850
850
  };
851
- return /* @__PURE__ */ v(he.Provider, { value: $e, children: e });
851
+ return /* @__PURE__ */ m(he.Provider, { value: $e, children: e });
852
852
  }, lt = () => {
853
853
  const e = Ee(he);
854
854
  if (!e)
@@ -856,7 +856,7 @@ const je = P.li`
856
856
  return e;
857
857
  };
858
858
  export {
859
- Ve as B,
859
+ fe as B,
860
860
  Lt as N,
861
861
  Ne as S,
862
862
  Bt as V,
@@ -869,7 +869,7 @@ export {
869
869
  rt as f,
870
870
  we as g,
871
871
  st as h,
872
- fe as i,
872
+ Ve as i,
873
873
  at as j,
874
874
  it as k,
875
875
  ot as l,