@ynput/ayon-frontend-shared 0.6.9 → 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 (65) hide show
  1. package/dist/ContextMenu.es.js +44 -27
  2. package/dist/DetailsPanel.es.js +225 -224
  3. package/dist/ListTable.es.js +420 -420
  4. package/dist/NewEntity.es.js +42 -41
  5. package/dist/ProjectTreeTable.es.js +3517 -3378
  6. package/dist/Slicer.es.js +301 -276
  7. package/dist/Views.es.js +366 -352
  8. package/dist/api.es.js +428 -413
  9. package/dist/chunks/Actions.es.js +18 -17
  10. package/dist/chunks/ColumnDropIndicator.es.js +19 -18
  11. package/dist/chunks/ColumnHeaderMenuUI.es.js +2 -2
  12. package/dist/chunks/ContextMenuContextInstance.es.js +4 -3
  13. package/dist/chunks/DeleteEntitiesConfirmDialog.es.js +53 -41
  14. package/dist/chunks/DetailsDialog.es.js +26 -24
  15. package/dist/chunks/EmptyPlaceholder.es.js +3 -3
  16. package/dist/chunks/EmptyPlaceholderFlex.styled.es.js +40 -0
  17. package/dist/chunks/EntityPath.es.js +60 -59
  18. package/dist/chunks/EntityPickerDialog.es.js +88 -83
  19. package/dist/chunks/EntityTooltip.es.js +15 -14
  20. package/dist/chunks/EntityUpdatesContext.es.js +11 -11
  21. package/dist/chunks/Feed.es.js +864 -859
  22. package/dist/chunks/FilterErrorActions.es.js +4 -3
  23. package/dist/chunks/Menu.es.js +633 -289
  24. package/dist/chunks/MenuContext.es.js +1 -1
  25. package/dist/chunks/MetaWidget.es.js +2457 -2196
  26. package/dist/chunks/PlayableIcon.es.js +77 -76
  27. package/dist/chunks/ProjectContext.es.js +6 -6
  28. package/dist/chunks/RepresentationsList.es.js +1 -1
  29. package/dist/chunks/ReviewablesSelector.es.js +625 -609
  30. package/dist/chunks/SimpleForm.es.js +1 -1
  31. package/dist/chunks/SimpleTable.es.js +386 -363
  32. package/dist/chunks/Slicer.es.js +954 -821
  33. package/dist/chunks/{DeleteEntitiesContextInstance.es.js → TableExportContextInstance.es.js} +190 -186
  34. package/dist/chunks/TableSettingsFallback.es.js +4 -3
  35. package/dist/chunks/ThumbnailSimple.es.js +100 -99
  36. package/dist/chunks/VideoPlayer.es.js +1 -1
  37. package/dist/chunks/Watchers.es.js +222 -221
  38. package/dist/chunks/getBundleMode.es.js +1 -1
  39. package/dist/chunks/getEntityTypeIcon.es.js +5 -4
  40. package/dist/chunks/getUris.es.js +3873 -3736
  41. package/dist/chunks/realtimeUpdatesUtils.es.js +91 -82
  42. package/dist/chunks/searchTerms.es.js +621 -499
  43. package/dist/chunks/sortLists.es.js +22 -0
  44. package/dist/chunks/useAttributeEnums.es.js +43 -43
  45. package/dist/chunks/useHierarchySelection.es.js +6 -5
  46. package/dist/chunks/useLoadModule.es.js +24 -23
  47. package/dist/chunks/viewUpdateHelper.es.js +16 -15
  48. package/dist/components.es.js +565 -531
  49. package/dist/context.es.js +529 -503
  50. package/dist/hooks.es.js +13 -13
  51. package/dist/index.es.js +4 -4
  52. package/dist/types/ContextMenu.d.ts +4 -1
  53. package/dist/types/Feed.d.ts +1 -1
  54. package/dist/types/ListTable.d.ts +1 -1
  55. package/dist/types/ProjectTreeTable.d.ts +123 -13
  56. package/dist/types/SimpleTable.d.ts +2 -1
  57. package/dist/types/Slicer.d.ts +26 -1
  58. package/dist/types/Views.d.ts +2 -0
  59. package/dist/types/api.d.ts +2359 -590
  60. package/dist/types/components.d.ts +30 -4
  61. package/dist/types/context.d.ts +94 -2
  62. package/dist/types/util.d.ts +54 -0
  63. package/dist/util.es.js +129 -119
  64. package/package.json +2 -2
  65. package/dist/chunks/MenuItem.es.js +0 -420
package/dist/Views.es.js CHANGED
@@ -1,11 +1,11 @@
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";
1
+ import { jsx as L, jsxs as A, Fragment as X } from "react/jsx-runtime";
2
+ import { useMemo as _, useCallback as h, useRef as se, useState as $, useEffect as R } from "react";
3
3
  import { createPortal as we } from "react-dom";
4
4
  import "./chunks/searchTerms.es.js";
5
- import { aQ as oe, bs as ge, d5 as ie, b4 as fe, dv as Ve, dy as q, U as ee, ch as He, cW as me, cD as pe, bo as Y, cB as Ge } from "./chunks/getUris.es.js";
6
- import { confirmDialog as Qe } from "primereact/confirmdialog";
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";
5
+ import { aT as oe, bv as ge, da as ie, b7 as fe, dA as Ve, dD as q, W as ee, cm as He, c$ as me, cI as pe, br as Y, cG as Ge } from "./chunks/getUris.es.js";
6
+ import { confirmDialog as Je } from "primereact/confirmdialog";
7
+ import { a as J, ah as Ke, d as he, s as ve, ai as Qe, e as H, aj as je, ak as ze, al as Xe } from "./chunks/TableExportContextInstance.es.js";
8
+ import { Icon as K, 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";
@@ -13,13 +13,14 @@ import "lodash";
13
13
  import "./chunks/ContextMenuContextInstance.es.js";
14
14
  import ke from "clsx";
15
15
  import { useDispatch as Ze } from "react-redux";
16
+ import "react-router-dom";
16
17
  import "semver";
17
18
  import G from "styled-components";
18
19
  import { u as Ce } from "./chunks/useLoadModule.es.js";
19
20
  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 Yt, b as Zt, u as Nt } from "./chunks/viewUpdateHelper.es.js";
21
22
  import { c as Be, a as te } from "./chunks/columnConfigConverter.es.js";
22
- const qt = [
23
+ const At = [
23
24
  "overview",
24
25
  "taskProgress",
25
26
  "versions",
@@ -27,22 +28,22 @@ const qt = [
27
28
  "reviews",
28
29
  "reports"
29
30
  ], ne = "_working_", Ne = "_new_view_", De = "__base__", Te = (e) => {
30
- const { viewsList: t, onEdit: o, onSelect: s, onSave: c } = e, n = (i, V = {}) => ({
31
+ const { viewsList: t, onEdit: o, onSelect: s, onSave: c } = e, a = (i, V = {}) => ({
31
32
  id: i.id,
32
33
  label: i.label,
33
34
  isSelected: !1,
34
35
  highlighted: i.highlighted,
35
36
  onClick: () => s(i.id),
36
37
  ...V
37
- }), r = t.filter((i) => i.visibility === "private" && i.isOwner && !i.working).map(
38
- (i) => n(i, {
38
+ }), n = t.filter((i) => i.visibility === "private" && i.isOwner && !i.working).map(
39
+ (i) => a(i, {
39
40
  isEditable: !0,
40
41
  isSaveable: !0,
41
42
  onEdit: () => o(i.id),
42
43
  onSave: () => c(i.id)
43
44
  })
44
- ), w = t.filter((i) => i.visibility === "public" && !i.working).map(
45
- (i) => n(i, {
45
+ ), d = t.filter((i) => i.visibility === "public" && !i.working).map(
46
+ (i) => a(i, {
46
47
  isEditable: i.isOwner,
47
48
  isSaveable: i.isOwner,
48
49
  ...i.isOwner && {
@@ -51,14 +52,14 @@ const qt = [
51
52
  }
52
53
  })
53
54
  ), g = t.filter((i) => i.visibility === "private" && !i.isOwner && !i.working).map(
54
- (i) => n(i, {
55
+ (i) => a(i, {
55
56
  isEditable: !1,
56
57
  isSaveable: !1
57
58
  })
58
59
  );
59
60
  return {
60
- myViews: r,
61
- sharedViews: w,
61
+ myViews: n,
62
+ sharedViews: d,
62
63
  allPrivateViews: g
63
64
  };
64
65
  }, et = ({
@@ -67,30 +68,30 @@ const qt = [
67
68
  viewType: o,
68
69
  viewAlias: s,
69
70
  projectName: c,
70
- currentUser: n,
71
- useWorkingView: r,
72
- editingViewId: w,
71
+ currentUser: a,
72
+ useWorkingView: n,
73
+ editingViewId: d,
73
74
  collapsed: g,
74
75
  setCollapsed: i,
75
76
  onSelect: V,
76
77
  onEdit: v,
77
78
  onSave: p,
78
- onResetWorkingView: d,
79
+ onResetWorkingView: w,
79
80
  selectedId: l
80
81
  }) => {
81
- const { powerLicense: a } = Q(), [u] = oe(), y = _(
82
+ const { powerLicense: r } = J(), [u] = oe(), y = _(
82
83
  () => e.map((f) => ({
83
84
  ...f,
84
- isOwner: f.owner === n?.name,
85
- highlighted: w === f.id ? "save" : void 0
85
+ isOwner: f.owner === a?.name,
86
+ highlighted: d === f.id ? "save" : void 0
86
87
  })),
87
- [e, n, w]
88
- ), B = {
88
+ [e, a, d]
89
+ ), k = {
89
90
  id: ne,
90
- label: r ? `Personal ${s.toLowerCase()}` : `Working ${s.toLowerCase()}`,
91
- startContent: r && /* @__PURE__ */ b(J, { icon: "person" }),
91
+ label: n ? `Personal ${s.toLowerCase()}` : `Working ${s.toLowerCase()}`,
92
+ startContent: n && /* @__PURE__ */ L(K, { icon: "person" }),
92
93
  isEditable: !1
93
- }, D = h(async () => {
94
+ }, B = h(async () => {
94
95
  let f = t?.id;
95
96
  if (!t)
96
97
  try {
@@ -105,7 +106,7 @@ const qt = [
105
106
  x.error(`Failed to create working ${s}: ${O}`);
106
107
  }
107
108
  V(f);
108
- }, [t, o, u, c, V]), M = async (f) => {
109
+ }, [t, o, u, c, V]), F = async (f) => {
109
110
  try {
110
111
  await p(f), V(f);
111
112
  } catch (O) {
@@ -117,62 +118,62 @@ const qt = [
117
118
  module: "getCustomViews",
118
119
  fallback: Te,
119
120
  // minVersion: minVersion,
120
- skip: !o || !a
121
- }), { myViews: k, sharedViews: L, allPrivateViews: C } = P({
121
+ skip: !o || !r
122
+ }), { myViews: C, sharedViews: D, allPrivateViews: b } = P({
122
123
  viewsList: y,
123
124
  onEdit: v,
124
125
  onSelect: V,
125
- onSave: M
126
- }), E = h(
126
+ onSave: F
127
+ }), I = h(
127
128
  (f) => {
128
129
  i({ ...g, [f]: !g[f] });
129
130
  },
130
131
  [g, i]
131
132
  ), S = _(() => [
132
- { id: "myViews", title: `My ${s.toLowerCase()}s`, items: k },
133
+ { id: "myViews", title: `My ${s.toLowerCase()}s`, items: C },
133
134
  {
134
135
  id: "sharedViews",
135
136
  title: `Shared ${s.toLowerCase()}s`,
136
- items: L
137
+ items: D
137
138
  },
138
139
  {
139
140
  id: "allPrivateViews",
140
141
  title: `All private ${s.toLowerCase()}s`,
141
- items: C
142
+ items: b
142
143
  }
143
- ], [k, L, C]), F = _(() => ({
144
- ...B,
145
- onClick: D,
144
+ ], [C, D, b]), M = _(() => ({
145
+ ...k,
146
+ onClick: B,
146
147
  // expose reset button when handler is provided
147
- isEditable: !!d,
148
- onResetView: d
149
- }), [D, d]);
148
+ isEditable: !!w,
149
+ onResetView: w
150
+ }), [B, w]);
150
151
  return _(() => {
151
- const f = [F], O = S.filter((R) => a && (R.items?.length || 0) > 0);
152
- return O.length > 0 && f.push(Je), O.forEach((R) => {
153
- const K = !!g[R.id];
152
+ const f = [M], O = S.filter((U) => r && (U.items?.length || 0) > 0);
153
+ return O.length > 0 && f.push(Ke), O.forEach((U) => {
154
+ const Q = !!g[U.id];
154
155
  if (f.push({
155
156
  type: "section",
156
- id: R.id,
157
- title: R.title,
158
- collapsed: K,
159
- onToggle: () => E(R.id)
160
- }), !K)
161
- f.push(...R.items);
157
+ id: U.id,
158
+ title: U.title,
159
+ collapsed: Q,
160
+ onToggle: () => I(U.id)
161
+ }), !Q)
162
+ f.push(...U.items);
162
163
  else if (l) {
163
- const z = R.items.find((Z) => Z.id === l);
164
- z && f.push(z);
164
+ const j = U.items.find((Z) => Z.id === l);
165
+ j && f.push(j);
165
166
  }
166
167
  }), f;
167
- }, [F, S, g, E, l, a]);
168
+ }, [M, S, g, I, l, r]);
168
169
  }, tt = ({ viewType: e, projectName: t }) => {
169
170
  const { currentData: o, isLoading: s } = ge(
170
171
  { viewType: e, projectName: t },
171
172
  { skip: !e }
172
- ), [c] = ie(), n = se({}), r = n.current[e];
173
+ ), [c] = ie(), a = se({}), n = a.current[e];
173
174
  return [o, async (g) => {
174
175
  if (!e) throw "No view type provided for setting default view";
175
- o?.id && o.id !== g && (n.current[e] = o.id);
176
+ o?.id && o.id !== g && (a.current[e] = o.id);
176
177
  try {
177
178
  await c({
178
179
  setDefaultViewRequestModel: {
@@ -184,125 +185,125 @@ const qt = [
184
185
  } catch (i) {
185
186
  x.warn(`Failed to set default view: ${i}`);
186
187
  }
187
- }, r, s];
188
+ }, n, s];
188
189
  }, st = ({
189
190
  viewType: e,
190
191
  projectName: t,
191
192
  viewsList: o,
192
193
  onCreate: s,
193
194
  onDelete: c,
194
- onUpdate: n
195
+ onUpdate: a
195
196
  }) => {
196
- const r = Ze(), [w] = oe(), [g] = fe(), [i] = Ve(), [V] = ie(), v = h(
197
- async (a, u) => {
197
+ const n = Ze(), [d] = oe(), [g] = fe(), [i] = Ve(), [V] = ie(), v = h(
198
+ async (r, u) => {
198
199
  if (!e)
199
200
  throw new Error("viewType are required for creating a view");
200
201
  try {
201
- await w({
202
+ await d({
202
203
  viewType: e,
203
204
  projectName: u ? void 0 : t,
204
- payload: a
205
- }).unwrap(), s && s(a);
205
+ payload: r
206
+ }).unwrap(), s && s(r);
206
207
  } catch (y) {
207
208
  throw y;
208
209
  }
209
210
  },
210
- [w, e, t, s]
211
+ [d, e, t, s]
211
212
  ), p = h(
212
- async (a, u, y) => {
213
+ async (r, u, y) => {
213
214
  if (!e)
214
215
  throw new Error("viewType are required for updating a view");
215
216
  try {
216
217
  await i({
217
- viewId: a,
218
+ viewId: r,
218
219
  viewType: e,
219
220
  projectName: y ? void 0 : t,
220
221
  payload: u
221
- }).unwrap(), n && n({ ...u, id: a });
222
- } catch (B) {
223
- throw B;
222
+ }).unwrap(), a && a({ ...u, id: r });
223
+ } catch (k) {
224
+ throw k;
224
225
  }
225
226
  },
226
- [i, e, t, n]
227
- ), d = h(
228
- async (a, u) => {
227
+ [i, e, t, a]
228
+ ), w = h(
229
+ async (r, u) => {
229
230
  if (!e)
230
231
  throw new Error("viewType are required for deleting a view");
231
232
  try {
232
233
  await g({
233
234
  viewType: e,
234
235
  projectName: u ? void 0 : t,
235
- viewId: a
236
- }).unwrap(), c && c(a);
236
+ viewId: r
237
+ }).unwrap(), c && c(r);
237
238
  } catch (y) {
238
239
  throw y;
239
240
  }
240
241
  },
241
242
  [g, e, t, c]
242
243
  ), l = h(
243
- async (a) => {
244
- const { existingWorkingViewId: u, selectedViewId: y, setSelectedView: B, setSettingsChanged: D, notify: M } = a || {};
244
+ async (r) => {
245
+ const { existingWorkingViewId: u, selectedViewId: y, setSelectedView: k, setSettingsChanged: B, notify: F } = r || {};
245
246
  if (!e)
246
247
  throw new Error("viewType are required for resetting a view");
247
248
  try {
248
- r(
249
+ n(
249
250
  q.util.invalidateTags([
250
251
  { type: "Views", id: `base-${e}-${t}` },
251
252
  { type: "Views", id: `base-${e}` }
252
253
  ])
253
254
  );
254
- const k = (await r(
255
+ const C = (await n(
255
256
  q.endpoints.getBaseView.initiate(
256
257
  { viewType: e, projectName: t },
257
258
  { subscribe: !1, forceRefetch: !0 }
258
259
  )
259
260
  )).data;
260
- let L = {}, C = "default";
261
- if (k && k.settings && Object.keys(k.settings).length > 0)
262
- L = k.settings, C = "project";
261
+ let D = {}, b = "default";
262
+ if (C && C.settings && Object.keys(C.settings).length > 0)
263
+ D = C.settings, b = "project";
263
264
  else {
264
- const f = (await r(
265
+ const f = (await n(
265
266
  q.endpoints.getBaseView.initiate(
266
267
  { viewType: e },
267
268
  { subscribe: !1, forceRefetch: !0 }
268
269
  )
269
270
  )).data;
270
- f && f.settings && Object.keys(f.settings).length > 0 && (L = f.settings, C = "studio");
271
+ f && f.settings && Object.keys(f.settings).length > 0 && (D = f.settings, b = "studio");
271
272
  }
272
- const E = u ?? be().id;
273
+ const I = u ?? be().id;
273
274
  if (u ? await i({
274
275
  viewId: u,
275
276
  viewType: e,
276
277
  projectName: t,
277
- payload: { settings: L }
278
- }).unwrap() : await w({
278
+ payload: { settings: D }
279
+ }).unwrap() : await d({
279
280
  viewType: e,
280
281
  projectName: t,
281
282
  payload: {
282
- id: E,
283
+ id: I,
283
284
  label: "Working",
284
285
  working: !0,
285
- settings: L
286
+ settings: D
286
287
  }
287
288
  }).unwrap(), await V({
288
289
  viewType: e,
289
290
  projectName: t,
290
- setDefaultViewRequestModel: { viewId: E }
291
- }).unwrap(), B && B(E), D && D(!1), M) {
292
- const F = C === "project" ? "View reset to project default view" : C === "studio" ? "View reset to studio default view" : "View reset to default settings";
293
- x.success(F);
291
+ setDefaultViewRequestModel: { viewId: I }
292
+ }).unwrap(), k && k(I), B && B(!1), F) {
293
+ const M = b === "project" ? "View reset to project default view" : b === "studio" ? "View reset to studio default view" : "View reset to default settings";
294
+ x.success(M);
294
295
  }
295
- return E;
296
+ return I;
296
297
  } catch (P) {
297
- throw M && x.error("Failed to reset view to default"), P;
298
+ throw F && x.error("Failed to reset view to default"), P;
298
299
  }
299
300
  },
300
- [w, i, V, e, t, r]
301
+ [d, i, V, e, t, n]
301
302
  );
302
303
  return {
303
304
  onCreateView: v,
304
305
  onUpdateView: p,
305
- onDeleteView: d,
306
+ onDeleteView: w,
306
307
  onResetWorkingView: l
307
308
  };
308
309
  }, ot = ({
@@ -312,77 +313,77 @@ const qt = [
312
313
  workingView: s,
313
314
  dispatch: c
314
315
  }) => {
315
- const [n] = oe(), [r] = Ve(), [w] = fe(), [g] = ie(), i = h(
316
- async (d) => {
316
+ const [a] = oe(), [n] = Ve(), [d] = fe(), [g] = ie(), i = h(
317
+ async (w) => {
317
318
  try {
318
- const u = await n({
319
+ const u = await a({
319
320
  payload: {
320
321
  label: De,
321
322
  working: !1,
322
323
  settings: o || {}
323
324
  },
324
325
  viewType: e,
325
- projectName: d ? void 0 : t
326
+ projectName: w ? void 0 : t
326
327
  }).unwrap();
327
328
  c(
328
329
  q.util.invalidateTags([
329
330
  { type: "view", id: u.id },
330
- ee(e, d ? void 0 : t)
331
+ ee(e, w ? void 0 : t)
331
332
  ])
332
333
  );
333
- const y = d ? "Studio" : "Project";
334
+ const y = w ? "Studio" : "Project";
334
335
  x.success(`${y} default view created successfully`);
335
336
  } catch (l) {
336
- const a = d ? "studio" : "project";
337
- x.error(`Failed to create ${a} base view: ${l?.message || l}`);
337
+ const r = w ? "studio" : "project";
338
+ x.error(`Failed to create ${r} base view: ${l?.message || l}`);
338
339
  }
339
340
  },
340
- [n, e, t, o, c]
341
+ [a, e, t, o, c]
341
342
  ), V = h(
342
- async (d, l) => {
343
+ async (w, l) => {
343
344
  try {
344
- await r({
345
- viewId: d,
345
+ await n({
346
+ viewId: w,
346
347
  viewType: e,
347
348
  projectName: l ? void 0 : t,
348
349
  payload: { settings: o || {} }
349
350
  }).unwrap(), c(
350
351
  q.util.invalidateTags([
351
- { type: "view", id: d },
352
+ { type: "view", id: w },
352
353
  ee(e, l ? void 0 : t)
353
354
  ])
354
355
  );
355
356
  const u = l ? "Studio" : "Project";
356
357
  x.success(`${u} default view updated successfully`);
357
- } catch (a) {
358
+ } catch (r) {
358
359
  const u = l ? "studio" : "project";
359
- x.error(`Failed to update ${u} base view: ${a?.message || a}`);
360
+ x.error(`Failed to update ${u} base view: ${r?.message || r}`);
360
361
  }
361
362
  },
362
- [r, e, t, o, c]
363
+ [n, e, t, o, c]
363
364
  ), v = h(
364
- async (d, l) => {
365
+ async (w, l) => {
365
366
  try {
366
- await w({
367
- viewId: d,
367
+ await d({
368
+ viewId: w,
368
369
  viewType: e,
369
370
  projectName: l ? void 0 : t
370
371
  }).unwrap(), c(
371
372
  q.util.invalidateTags([
372
- { type: "view", id: d },
373
+ { type: "view", id: w },
373
374
  ee(e, l ? void 0 : t)
374
375
  ])
375
376
  );
376
- const a = l ? "Studio" : "Project";
377
- x.success(`${a} default view removed successfully`);
378
- } catch (a) {
377
+ const r = l ? "Studio" : "Project";
378
+ x.success(`${r} default view removed successfully`);
379
+ } catch (r) {
379
380
  const u = l ? "studio" : "project";
380
- x.error(`Failed to remove ${u} base view: ${a?.message || a}`);
381
+ x.error(`Failed to remove ${u} base view: ${r?.message || r}`);
381
382
  }
382
383
  },
383
- [w, e, t, c]
384
+ [d, e, t, c]
384
385
  ), p = h(
385
- async (d) => {
386
+ async (w) => {
386
387
  try {
387
388
  if (!s?.id)
388
389
  throw new Error("No working view available to update");
@@ -390,14 +391,14 @@ const qt = [
390
391
  q.endpoints.getBaseView.initiate(
391
392
  {
392
393
  viewType: e,
393
- projectName: d ? void 0 : t
394
+ projectName: w ? void 0 : t
394
395
  },
395
396
  { subscribe: !1, forceRefetch: !0 }
396
397
  )
397
398
  )).data;
398
399
  if (!u || !u.settings)
399
400
  throw new Error("Base view not found or has no settings");
400
- await r({
401
+ await n({
401
402
  viewId: s.id,
402
403
  viewType: e,
403
404
  projectName: t,
@@ -407,14 +408,14 @@ const qt = [
407
408
  projectName: t,
408
409
  setDefaultViewRequestModel: { viewId: s.id }
409
410
  }).unwrap();
410
- const y = d ? "Studio" : "Project";
411
+ const y = w ? "Studio" : "Project";
411
412
  x.success(`Loaded ${y} default view to working view`);
412
413
  } catch (l) {
413
- const a = d ? "studio" : "project";
414
- x.error(`Failed to load ${a} base view: ${l?.message || l}`);
414
+ const r = w ? "studio" : "project";
415
+ x.error(`Failed to load ${r} base view: ${l?.message || l}`);
415
416
  }
416
417
  },
417
- [s, r, g, e, t, c]
418
+ [s, n, g, e, t, c]
418
419
  );
419
420
  return {
420
421
  onCreateBaseView: i,
@@ -422,28 +423,28 @@ const qt = [
422
423
  onDeleteBaseView: v,
423
424
  onLoadBaseView: p
424
425
  };
425
- }, Ee = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, it = ({
426
+ }, Ie = (e, t) => e ? t.find((s) => s.id === e)?.scope === "studio" : !0, it = ({
426
427
  viewType: e,
427
428
  projectName: t,
428
429
  viewsList: o,
429
430
  sourceSettings: s,
430
431
  onUpdateView: c
431
432
  }) => ({ onSaveViewFromCurrent: h(
432
- async (r) => {
433
+ async (n) => {
433
434
  if (!e)
434
435
  throw "viewType are required for saving a view from another view";
435
436
  if (!s)
436
437
  throw "sourceView is required for saving a view from another view";
437
438
  try {
438
439
  await c(
439
- r,
440
+ n,
440
441
  {
441
442
  settings: s
442
443
  },
443
- Ee(r, o)
444
+ Ie(n, o)
444
445
  ), x.success("View settings saved");
445
- } catch (w) {
446
- const g = typeof w == "string" ? "Failed to save view settings: " + w : "Failed to save view settings";
446
+ } catch (d) {
447
+ const g = typeof d == "string" ? "Failed to save view settings: " + d : "Failed to save view settings";
447
448
  throw console.error(g), g;
448
449
  }
449
450
  },
@@ -451,82 +452,82 @@ const qt = [
451
452
  ) }), nt = ({
452
453
  viewType: e
453
454
  }) => {
454
- const [t, o] = W({}), s = h(
455
- (n) => {
456
- e && o((r) => ({ ...r, [e]: n }));
455
+ const [t, o] = $({}), s = h(
456
+ (a) => {
457
+ e && o((n) => ({ ...n, [e]: a }));
457
458
  },
458
459
  [e, o]
459
460
  );
460
461
  return [e ? t[e] : !1, s];
461
- }, rt = "view", At = ({
462
+ }, rt = "view", Ht = ({
462
463
  children: e,
463
464
  viewType: t,
464
465
  viewAlias: o = rt,
465
466
  projectName: s,
466
467
  dispatch: c,
467
- debug: n
468
+ debug: a
468
469
  }) => {
469
- let { powerLicense: r } = Q();
470
- n?.powerLicense !== void 0 && (console.warn("Using debug power license:", n.powerLicense), r = n.powerLicense);
471
- const { user: w } = he(), [g, i] = W(!1), [V, v] = W(null), p = "viewsMenuCollapsed", [d, l] = ve(
470
+ let { powerLicense: n } = J();
471
+ a?.powerLicense !== void 0 && (console.warn("Using debug power license:", a.powerLicense), n = a.powerLicense);
472
+ const { user: d } = he(), [g, i] = $(!1), [V, v] = $(null), p = "viewsMenuCollapsed", [w, l] = ve(
472
473
  p,
473
474
  {}
474
- ), a = (I) => {
475
- const j = I.visibility === "private" ? "myViews" : "sharedViews";
476
- if (d[j]) {
477
- const de = { ...d };
478
- de[j] = !1, l(de);
475
+ ), r = (E) => {
476
+ const z = E.visibility === "private" ? "myViews" : "sharedViews";
477
+ if (w[z]) {
478
+ const de = { ...w };
479
+ de[z] = !1, l(de);
479
480
  }
480
481
  }, { data: u } = He(
481
482
  { projectName: s },
482
- { skip: !r || !V }
483
- ), [y, B, D, M] = tt({
483
+ { skip: !n || !V }
484
+ ), [y, k, B, F] = tt({
484
485
  viewType: t,
485
486
  projectName: s
486
487
  }), [P, m] = nt({
487
488
  viewType: t
488
- }), { currentData: k = [], isLoading: L } = me(
489
+ }), { currentData: C = [], isLoading: D } = me(
489
490
  { projectName: s, viewType: t },
490
491
  { skip: !t }
491
- ), C = _(
492
- () => k.filter(
493
- (I) => I.label !== De && !(s && I.working && I.scope === "studio")
492
+ ), b = _(
493
+ () => C.filter(
494
+ (E) => E.label !== De && !(s && E.working && E.scope === "studio")
494
495
  ),
495
- [k]
496
- ), { onCreateView: E, onDeleteView: S, onUpdateView: F, onResetWorkingView: $ } = st({
496
+ [C]
497
+ ), { onCreateView: I, onDeleteView: S, onUpdateView: M, onResetWorkingView: W } = st({
497
498
  viewType: t,
498
499
  projectName: s,
499
- viewsList: C,
500
- onCreate: a
500
+ viewsList: b,
501
+ onCreate: r
501
502
  }), {
502
503
  currentData: f,
503
504
  isLoading: O,
504
- isError: R
505
+ isError: U
505
506
  } = pe(
506
507
  { projectName: s, viewType: t },
507
508
  { skip: !t }
508
- ), { currentData: K, isLoading: z } = Y(
509
+ ), { currentData: Q, isLoading: j } = Y(
509
510
  { projectName: s, viewType: t },
510
511
  { skip: !t }
511
512
  ), { currentData: Z, isLoading: Fe } = Y(
512
513
  { projectName: void 0, viewType: t },
513
514
  { skip: !t }
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
+ ), Me = D || F || O || j || Fe, re = f?.settings, N = y?.id === ne ? re : y?.settings, ae = y?.id === f?.id, ce = P && ae && B && B !== f?.id ? B : void 0, { currentData: T, isFetching: Pe } = Ge(
515
516
  {
516
517
  viewId: V,
517
- projectName: Ee(V, C) ? void 0 : s,
518
+ projectName: Ie(V, b) ? void 0 : s,
518
519
  viewType: t
519
520
  },
520
- { skip: typeof V != "string" || !r }
521
+ { skip: typeof V != "string" || !n }
521
522
  ), Se = _(
522
523
  () => V === T?.id ? T : void 0,
523
524
  [V, T]
524
525
  ), { onSaveViewFromCurrent: Oe } = it({
525
526
  viewType: t,
526
527
  projectName: s,
527
- viewsList: C,
528
+ viewsList: b,
528
529
  sourceSettings: N,
529
- onUpdateView: F
530
+ onUpdateView: M
530
531
  }), { onCreateBaseView: $e, onUpdateBaseView: Re, onDeleteBaseView: We, onLoadBaseView: Ue } = ot({
531
532
  viewType: t,
532
533
  projectName: s,
@@ -534,63 +535,63 @@ const qt = [
534
535
  workingView: f,
535
536
  dispatch: c
536
537
  }), _e = h(
537
- async (I, { selectView: j } = {}) => {
538
+ async (E, { selectView: z } = {}) => {
538
539
  if (!f?.id) {
539
540
  console.error("No working view to update");
540
541
  return;
541
542
  }
542
- await F(f.id, I, !s), j && B(f.id);
543
+ await M(f.id, E, !s), z && k(f.id);
543
544
  },
544
- [F, f]
545
+ [M, f]
545
546
  ), le = h(async () => {
546
547
  try {
547
- await $({
548
+ await W({
548
549
  existingWorkingViewId: f?.id,
549
550
  selectedViewId: y?.id,
550
- setSelectedView: B,
551
+ setSelectedView: k,
551
552
  setSettingsChanged: m,
552
553
  notify: !0
553
554
  });
554
- } catch (I) {
555
- console.error("Failed to reset view:", I);
555
+ } catch (E) {
556
+ console.error("Failed to reset view:", E);
556
557
  }
557
- }, [f, $, y, B, m]), qe = et({
558
- viewsList: C,
558
+ }, [f, W, y, k, m]), qe = et({
559
+ viewsList: b,
559
560
  workingView: f,
560
561
  viewType: t,
561
562
  viewAlias: o,
562
563
  projectName: s,
563
- currentUser: w,
564
- useWorkingView: !r,
564
+ currentUser: d,
565
+ useWorkingView: !n,
565
566
  editingViewId: ce,
566
567
  selectedId: y?.id,
567
- collapsed: d,
568
+ collapsed: w,
568
569
  setCollapsed: l,
569
570
  onResetWorkingView: le,
570
- onSelect: (I) => {
571
- B(I), m(!1), i(!1);
571
+ onSelect: (E) => {
572
+ k(E), m(!1), i(!1);
572
573
  },
573
- onEdit: (I) => v(I),
574
- onSave: async (I) => Oe(I)
574
+ onEdit: (E) => v(E),
575
+ onSave: async (E) => Oe(E)
575
576
  }), Ae = {
576
577
  viewType: t,
577
578
  viewAlias: o,
578
579
  projectName: s,
579
580
  isMenuOpen: g,
580
581
  editingView: V,
581
- currentUser: w,
582
+ currentUser: d,
582
583
  selectedView: y,
583
584
  viewSettings: N,
584
585
  editingViewData: Se,
585
586
  isLoadingEditingViewData: Pe,
586
- viewsList: C,
587
+ viewsList: b,
587
588
  // Working view
588
589
  workingSettings: re,
589
590
  workingView: f,
590
591
  isViewWorking: ae,
591
592
  onUpdateWorkingView: _e,
592
593
  // base views
593
- projectBaseView: K,
594
+ projectBaseView: Q,
594
595
  studioBaseView: Z,
595
596
  // base view mutations
596
597
  onCreateBaseView: $e,
@@ -600,16 +601,16 @@ const qt = [
600
601
  editingViewId: ce,
601
602
  viewMenuItems: qe,
602
603
  isLoadingViews: Me,
603
- isErrorWorkingView: R,
604
+ isErrorWorkingView: U,
604
605
  // data
605
606
  shareOptions: u,
606
607
  setIsMenuOpen: i,
607
608
  setEditingView: v,
608
- setSelectedView: B,
609
+ setSelectedView: k,
609
610
  onSettingsChanged: m,
610
611
  // mutations
611
- onCreateView: E,
612
- onUpdateView: F,
612
+ onCreateView: I,
613
+ onUpdateView: M,
613
614
  onDeleteView: S,
614
615
  // shared actions
615
616
  resetWorkingView: le,
@@ -617,8 +618,8 @@ const qt = [
617
618
  api: q,
618
619
  dispatch: c
619
620
  };
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)`
621
+ return /* @__PURE__ */ L(Qe.Provider, { value: Ae, children: e });
622
+ }, at = (e) => `${e}-views-portal`, Ee = (e) => e ? document.getElementById(at(e)) : null, ct = G(K)`
622
623
  padding: var(--padding-s);
623
624
  border-radius: var(--border-radius-m);
624
625
  margin: -4px 0;
@@ -710,26 +711,26 @@ const qt = [
710
711
  viewType: o,
711
712
  viewAlias: s,
712
713
  isMenuOpen: c,
713
- setIsMenuOpen: n,
714
- selectedView: r,
715
- isViewWorking: w,
714
+ setIsMenuOpen: a,
715
+ selectedView: n,
716
+ isViewWorking: d,
716
717
  editingViewId: g
717
718
  } = H(), i = se(null);
718
719
  if (!o) return null;
719
720
  const V = (l) => {
720
- l.preventDefault(), l.stopPropagation(), n(!c);
721
+ l.preventDefault(), l.stopPropagation(), a(!c);
721
722
  }, v = {
722
723
  icon: "view_quilt",
723
724
  onClick: V,
724
725
  className: ke({ active: !!g, open: c }),
725
726
  tabIndex: 0,
726
- "data-tooltip": w ? `Working ${s.toLowerCase()}` : `${s}: ` + r?.label || "None",
727
+ "data-tooltip": d ? `Working ${s.toLowerCase()}` : `${s}: ` + n?.label || "None",
727
728
  "data-tooltip-delay": 0,
728
729
  onKeyDown: (l) => {
729
730
  (l.key === "Enter" || l.key === " ") && V(l);
730
731
  }
731
- }, p = e ? /* @__PURE__ */ b(ye, { ...v, ...t(r) }) : /* @__PURE__ */ b(ct, { ref: i, ...v }), d = Ie(o);
732
- return d ? we(p, d) : null;
732
+ }, p = e ? /* @__PURE__ */ L(ye, { ...v, ...t(n) }) : /* @__PURE__ */ L(ct, { ref: i, ...v }), w = Ee(o);
733
+ return w ? we(p, w) : null;
733
734
  }, ft = () => null, xe = "views-dialog", Vt = ({}) => {
734
735
  const {
735
736
  editingView: e,
@@ -737,18 +738,18 @@ const qt = [
737
738
  isLoadingEditingViewData: o,
738
739
  setEditingView: s,
739
740
  viewType: c,
740
- viewAlias: n,
741
- projectName: r,
742
- currentUser: w,
741
+ viewAlias: a,
742
+ projectName: n,
743
+ currentUser: d,
743
744
  viewSettings: g,
744
745
  shareOptions: i,
745
746
  setSelectedView: V,
746
747
  onCreateView: v,
747
748
  onUpdateView: p,
748
- onDeleteView: d,
749
+ onDeleteView: w,
749
750
  api: l,
750
- dispatch: a
751
- } = H(), { powerLicense: u } = Q(), [y, { isLoading: B, outdated: D }] = Ce({
751
+ dispatch: r
752
+ } = H(), { powerLicense: u } = J(), [y, { isLoading: k, outdated: B }] = Ce({
752
753
  addon: "powerpack",
753
754
  remote: "views",
754
755
  module: "ViewFormDialog",
@@ -756,7 +757,7 @@ const qt = [
756
757
  minVersion: "1.1.1",
757
758
  skip: !c || !u
758
759
  });
759
- return !c || !e ? null : e && D ? /* @__PURE__ */ b(
760
+ return !c || !e ? null : e && B ? /* @__PURE__ */ L(
760
761
  Ye,
761
762
  {
762
763
  isOpen: !0,
@@ -765,10 +766,10 @@ const qt = [
765
766
  size: "sm",
766
767
  children: /* @__PURE__ */ A("p", { children: [
767
768
  "Please update the Powerpack addon to at least ",
768
- D.required
769
+ B.required
769
770
  ] })
770
771
  }
771
- ) : /* @__PURE__ */ b(
772
+ ) : /* @__PURE__ */ L(
772
773
  y,
773
774
  {
774
775
  editingView: {
@@ -779,16 +780,16 @@ const qt = [
779
780
  viewSettings: g,
780
781
  setEditingView: s,
781
782
  viewType: c,
782
- viewAlias: n,
783
- projectName: r,
783
+ viewAlias: a,
784
+ projectName: n,
784
785
  shareOptions: i,
785
786
  setSelected: V,
786
787
  onCreateView: v,
787
788
  onUpdateView: p,
788
- onDeleteView: d,
789
+ onDeleteView: w,
789
790
  api: l,
790
- dispatch: a,
791
- currentUser: w,
791
+ dispatch: r,
792
+ currentUser: d,
792
793
  pt: {
793
794
  dialog: {
794
795
  className: xe
@@ -802,37 +803,37 @@ const qt = [
802
803
  studioBaseView: o,
803
804
  onCreateBaseView: s,
804
805
  onDeleteBaseView: c,
805
- onLoadBaseView: n,
806
- viewAlias: r
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
- if (a && !d) {
806
+ onLoadBaseView: a,
807
+ viewAlias: n
808
+ } = H(), { powerLicense: d, setPowerpackDialog: g } = J(), [i, V] = ve("collapsed-default-view", !1), v = async (p, w) => {
809
+ const l = p ? o : t, r = !p && d === !1;
810
+ if (r && !w) {
810
811
  g("sharedViews");
811
812
  return;
812
813
  }
813
- l ? d || a ? Qe({
814
- message: `Are you sure you want to remove this default ${r.toLowerCase()}?`,
815
- header: `Remove Default ${r}`,
814
+ l ? w || r ? Je({
815
+ message: `Are you sure you want to remove this default ${n.toLowerCase()}?`,
816
+ header: `Remove Default ${n}`,
816
817
  acceptLabel: "Remove",
817
818
  rejectLabel: "Cancel",
818
819
  accept: async () => {
819
820
  await c(l.id, p);
820
821
  }
821
- }) : await n(p) : await s(p);
822
+ }) : await a(p) : await s(p);
822
823
  };
823
824
  return /* @__PURE__ */ A(X, { children: [
824
- /* @__PURE__ */ b(
825
- ze,
825
+ /* @__PURE__ */ L(
826
+ je,
826
827
  {
827
828
  onClick: () => V(!i),
828
829
  collapsed: i,
829
830
  id: "default-views",
830
- title: `Default ${r.toLowerCase()}`,
831
+ title: `Default ${n.toLowerCase()}`,
831
832
  style: { marginBottom: "10px" }
832
833
  }
833
834
  ),
834
835
  !i && /* @__PURE__ */ A(ut, { children: [
835
- /* @__PURE__ */ b(
836
+ /* @__PURE__ */ L(
836
837
  ue,
837
838
  {
838
839
  existingView: !!o,
@@ -840,13 +841,13 @@ const qt = [
840
841
  onClick: (p) => v(!0, p)
841
842
  }
842
843
  ),
843
- e && /* @__PURE__ */ b(
844
+ e && /* @__PURE__ */ L(
844
845
  ue,
845
846
  {
846
847
  existingView: !!t,
847
848
  label: "Project",
848
849
  onClick: (p) => v(!1, p),
849
- powerLicense: w
850
+ powerLicense: d
850
851
  }
851
852
  )
852
853
  ] })
@@ -857,10 +858,10 @@ const qt = [
857
858
  label: o,
858
859
  powerLicense: s = void 0
859
860
  }) => {
860
- const c = (r) => {
861
- r.stopPropagation(), t();
862
- }, n = (r) => {
863
- r.stopPropagation(), t(!0);
861
+ const c = (n) => {
862
+ n.stopPropagation(), t();
863
+ }, a = (n) => {
864
+ n.stopPropagation(), t(!0);
864
865
  };
865
866
  return /* @__PURE__ */ A(
866
867
  wt,
@@ -871,18 +872,18 @@ const qt = [
871
872
  }),
872
873
  onClick: c,
873
874
  children: [
874
- /* @__PURE__ */ b(
875
- J,
875
+ /* @__PURE__ */ L(
876
+ K,
876
877
  {
877
878
  icon: s === !1 ? "bolt" : e ? "close" : "add",
878
- onClick: (r) => e && n(r)
879
+ onClick: (n) => e && a(n)
879
880
  }
880
881
  ),
881
882
  o
882
883
  ]
883
884
  }
884
885
  );
885
- }, pt = G(J)`
886
+ }, pt = G(K)`
886
887
  color: var(--md-sys-color-tertiary);
887
888
  font-variation-settings: 'FILL' 1;
888
889
  `, ht = () => {
@@ -892,45 +893,45 @@ const qt = [
892
893
  isMenuOpen: o,
893
894
  setIsMenuOpen: s,
894
895
  setEditingView: c,
895
- selectedView: n,
896
- workingView: r,
897
- viewMenuItems: w,
896
+ selectedView: a,
897
+ workingView: n,
898
+ viewMenuItems: d,
898
899
  projectName: g
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
- top: a ? a.bottom + 8 : 0,
901
- left: a ? a.left : 0
900
+ } = H(), { powerLicense: i, setPowerpackDialog: V } = J(), v = se(null), { user: p } = he(), w = (p?.uiExposureLevel || 0) >= 900, l = Ee(e), r = l?.getBoundingClientRect(), y = {
901
+ top: r ? r.bottom + 8 : 0,
902
+ left: r ? r.left : 0
902
903
  };
903
- U(() => {
904
- const M = (m) => {
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);
904
+ R(() => {
905
+ const F = (m) => {
906
+ const C = m.target, D = v.current?.contains(C) || l?.contains(C), b = document.querySelector("." + xe)?.contains(C), I = document.querySelector(".options")?.contains(C), S = document.querySelector(".p-confirm-dialog")?.contains(C);
907
+ !D && !b && !I && !S && o && s(!1);
907
908
  }, P = (m) => {
908
909
  m.key === "Escape" && o && s(!1);
909
910
  };
910
- return document.addEventListener("mousedown", M), document.addEventListener("keydown", P), () => {
911
- document.removeEventListener("mousedown", M), document.removeEventListener("keydown", P);
911
+ return document.addEventListener("mousedown", F), document.addEventListener("keydown", P), () => {
912
+ document.removeEventListener("mousedown", F), document.removeEventListener("keydown", P);
912
913
  };
913
- }, [o, l, s]), U(() => {
914
+ }, [o, l, s]), R(() => {
914
915
  o && v.current && v.current.focus();
915
916
  }, [o]);
916
- const B = h(() => {
917
+ const k = h(() => {
917
918
  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(
919
+ }, [i, V, c, s]), B = !a || n?.id === a.id ? ne : a.id;
920
+ return /* @__PURE__ */ L(X, { children: o && we(
920
921
  /* @__PURE__ */ A(lt, { style: y, ref: v, tabIndex: 0, children: [
921
- /* @__PURE__ */ b(je, { items: w, selected: D }),
922
- d && /* @__PURE__ */ A(X, { children: [
923
- /* @__PURE__ */ b(mt, { projectName: g }),
924
- /* @__PURE__ */ b(dt, {})
922
+ /* @__PURE__ */ L(ze, { items: d, selected: B }),
923
+ w && /* @__PURE__ */ A(X, { children: [
924
+ /* @__PURE__ */ L(mt, { projectName: g }),
925
+ /* @__PURE__ */ L(dt, {})
925
926
  ] }),
926
- /* @__PURE__ */ b(
927
+ /* @__PURE__ */ L(
927
928
  Xe,
928
929
  {
929
930
  label: `Create new ${t.toLowerCase()}`,
930
931
  id: Ne,
931
- startContent: /* @__PURE__ */ b(J, { icon: "add" }),
932
- endContent: !i && /* @__PURE__ */ b(pt, { icon: "bolt" }),
933
- onClick: B,
932
+ startContent: /* @__PURE__ */ L(K, { icon: "add" }),
933
+ endContent: !i && /* @__PURE__ */ L(pt, { icon: "bolt" }),
934
+ onClick: k,
934
935
  tabIndex: 0
935
936
  }
936
937
  )
@@ -941,7 +942,7 @@ const qt = [
941
942
  const { resetWorkingView: e } = H(), t = h(async () => {
942
943
  await e();
943
944
  }, [e]);
944
- return U(() => {
945
+ return R(() => {
945
946
  const o = (s) => {
946
947
  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
948
  };
@@ -951,70 +952,70 @@ const qt = [
951
952
  }, [t]), {
952
953
  resetViewToDefault: t
953
954
  };
954
- }, Ht = () => (vt(), /* @__PURE__ */ A(X, { children: [
955
- /* @__PURE__ */ b(gt, {}),
956
- /* @__PURE__ */ b(ht, {}),
957
- /* @__PURE__ */ b(Vt, {})
958
- ] })), Gt = ({
955
+ }, Gt = () => (vt(), /* @__PURE__ */ A(X, { children: [
956
+ /* @__PURE__ */ L(gt, {}),
957
+ /* @__PURE__ */ L(ht, {}),
958
+ /* @__PURE__ */ L(Vt, {})
959
+ ] })), Jt = ({
959
960
  viewType: e,
960
961
  projectName: t
961
962
  }) => {
962
963
  const o = !e, s = { viewType: e, projectName: t };
963
964
  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;
966
- U(() => {
965
+ }, Kt = () => {
966
+ const { viewSettings: e } = H(), [t, o] = $(null), [s, c] = $(null), { updateViewSettings: a } = Le(), n = e, d = n?.filter ?? {}, g = n?.columns ?? [], i = n?.sliceType;
967
+ R(() => {
967
968
  o(null);
968
- }, [JSON.stringify(e?.filter)]), U(() => {
969
+ }, [JSON.stringify(e?.filter)]), R(() => {
969
970
  c(null);
970
971
  }, [JSON.stringify(e?.columns)]);
971
- const V = t !== null ? t : w, v = s !== null ? s : g, p = h(
972
+ const V = t !== null ? t : d, v = s !== null ? s : g, p = h(
972
973
  async (u) => {
973
- await n({ filter: u }, o, u, {
974
+ await a({ filter: u }, o, u, {
974
975
  errorMessage: "Failed to update filter settings"
975
976
  });
976
977
  },
977
- [n]
978
- ), d = h(
978
+ [a]
979
+ ), w = h(
979
980
  async (u) => {
980
- await n({ columns: u }, c, u, {
981
+ await a({ columns: u }, c, u, {
981
982
  errorMessage: "Failed to update column width settings"
982
983
  });
983
984
  },
984
- [n]
985
+ [a]
985
986
  ), l = h(() => {
986
- }, []), a = h(
987
+ }, []), r = h(
987
988
  async (u) => {
988
- await n({ sliceType: u }, l, u, {
989
+ await a({ sliceType: u }, l, u, {
989
990
  errorMessage: "Failed to update slicer type"
990
991
  });
991
992
  },
992
- [n]
993
+ [a]
993
994
  );
994
995
  return {
995
996
  filters: V,
996
997
  onUpdateFilters: p,
997
998
  columns: v,
998
- onUpdateColumns: d,
999
+ onUpdateColumns: w,
999
1000
  sliceType: i,
1000
- onUpdateSliceType: a
1001
+ onUpdateSliceType: r
1001
1002
  };
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 = _(
1003
+ }, Qt = ({ viewSettings: e, updateViewSettings: t }) => {
1004
+ const [o, s] = $(null), [c, a] = $(null), [n, d] = $(null), g = e, i = g?.filter ?? {}, V = g?.showHierarchy ?? !0, v = g?.sliceType, p = _(
1004
1005
  () => Be(g),
1005
1006
  [JSON.stringify(e)]
1006
1007
  );
1007
- U(() => {
1008
+ R(() => {
1008
1009
  s(null);
1009
- }, [JSON.stringify(e?.filter)]), U(() => {
1010
- n(null);
1010
+ }, [JSON.stringify(e?.filter)]), R(() => {
1011
+ a(null);
1011
1012
  }, [
1012
1013
  e?.showHierarchy,
1013
1014
  e?.groupBy
1014
- ]), U(() => {
1015
- w(null);
1015
+ ]), R(() => {
1016
+ d(null);
1016
1017
  }, [JSON.stringify(e?.columns)]);
1017
- const d = o !== null ? o : i, l = c !== null ? c : V, a = r || p, u = h(() => {
1018
+ const w = o !== null ? o : i, l = c !== null ? c : V, r = n || p, u = h(() => {
1018
1019
  }, []), y = h(
1019
1020
  async (m) => {
1020
1021
  await t({ sliceType: m }, u, m, {
@@ -1022,22 +1023,22 @@ const qt = [
1022
1023
  });
1023
1024
  },
1024
1025
  [t]
1025
- ), B = h(
1026
+ ), k = h(
1026
1027
  async (m) => {
1027
1028
  await t({ filter: m }, s, m, {
1028
1029
  errorMessage: "Failed to update filter settings"
1029
1030
  });
1030
1031
  },
1031
1032
  [t]
1032
- ), D = h(
1033
+ ), B = h(
1033
1034
  async (m) => {
1034
- if (m && a?.groupBy) {
1035
- const k = { ...a, groupBy: void 0 };
1036
- w(k);
1037
- const L = te(k);
1035
+ if (m && r?.groupBy) {
1036
+ const C = { ...r, groupBy: void 0 };
1037
+ d(C);
1038
+ const D = te(C);
1038
1039
  await t(
1039
- { ...L, showHierarchy: !0 },
1040
- n,
1040
+ { ...D, showHierarchy: !0 },
1041
+ a,
1041
1042
  m,
1042
1043
  { errorMessage: "Failed to update hierarchy setting" }
1043
1044
  );
@@ -1045,123 +1046,136 @@ const qt = [
1045
1046
  }
1046
1047
  await t(
1047
1048
  { showHierarchy: m },
1048
- n,
1049
+ a,
1049
1050
  m,
1050
1051
  { errorMessage: "Failed to update hierarchy setting" }
1051
1052
  );
1052
1053
  },
1053
- [t, a]
1054
- ), M = h(
1055
- async (m, k) => {
1056
- const L = k || [
1054
+ [t, r]
1055
+ ), F = h(
1056
+ async (m, C) => {
1057
+ const D = C || [
1057
1058
  ...m.columnOrder || [],
1058
1059
  ...Object.keys(m.columnVisibility || {}),
1059
1060
  ...m.columnPinning?.left || [],
1060
1061
  ...m.columnPinning?.right || []
1061
- ].filter(Boolean).filter((S, F, $) => $.indexOf(S) === F), C = te(m, L), E = !!m.groupBy;
1062
- E && n(!1), await t(
1063
- E ? { ...C, showHierarchy: !1 } : C,
1064
- w,
1062
+ ].filter(Boolean).filter((S, M, W) => W.indexOf(S) === M), b = te(m, D), I = !!m.groupBy;
1063
+ I && a(!1), await t(
1064
+ I ? { ...b, showHierarchy: !1 } : b,
1065
+ d,
1065
1066
  m,
1066
1067
  { errorMessage: "Failed to update columns" }
1067
1068
  );
1068
1069
  },
1069
1070
  [t]
1070
1071
  ), P = h(
1071
- async (m, k, L) => {
1072
- const C = {
1073
- showHierarchy: k,
1072
+ async (m, C, D) => {
1073
+ const b = {
1074
+ showHierarchy: C,
1074
1075
  groupBy: m,
1075
- groupSortByDesc: m ? L ?? !1 : void 0
1076
+ groupSortByDesc: m ? D ?? !1 : void 0
1076
1077
  }, S = {
1077
- ...a,
1078
- groupBy: m ? { id: m, desc: L ?? !1 } : void 0
1078
+ ...r,
1079
+ groupBy: m ? { id: m, desc: D ?? !1 } : void 0
1079
1080
  };
1080
1081
  await t(
1081
- C,
1082
- ($) => {
1083
- $ === null ? (n(null), w(null)) : (n($.showHierarchy), w($.columns));
1082
+ b,
1083
+ (W) => {
1084
+ W === null ? (a(null), d(null)) : (a(W.showHierarchy), d(W.columns));
1084
1085
  },
1085
- { showHierarchy: k, columns: S },
1086
+ { showHierarchy: C, columns: S },
1086
1087
  { errorMessage: "Failed to update grouping" }
1087
1088
  );
1088
1089
  },
1089
- [t, a]
1090
+ [t, r]
1090
1091
  );
1091
1092
  return {
1092
- filters: d,
1093
- onUpdateFilters: B,
1093
+ filters: w,
1094
+ onUpdateFilters: k,
1094
1095
  showHierarchy: l,
1095
- onUpdateHierarchy: D,
1096
- columns: a,
1097
- onUpdateColumns: M,
1096
+ onUpdateHierarchy: B,
1097
+ columns: r,
1098
+ onUpdateColumns: F,
1098
1099
  onUpdateGroupBy: P,
1099
1100
  sliceType: v,
1100
1101
  onUpdateSliceType: y
1101
1102
  };
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),
1103
+ }, jt = () => {
1104
+ const { viewSettings: e } = H(), [t, o] = $(null), [s, c] = $(null), [a, n] = $(null), { updateViewSettings: d } = Le(), g = e, i = g?.filter ?? {}, V = _(
1105
+ () => Be(g),
1105
1106
  [JSON.stringify(e)]
1106
1107
  );
1107
- U(() => {
1108
+ R(() => {
1108
1109
  o(null);
1109
- }, [JSON.stringify(e?.filter)]), U(() => {
1110
+ }, [JSON.stringify(e?.filter)]), R(() => {
1110
1111
  c(null);
1111
1112
  }, [JSON.stringify(e?.columns)]);
1112
- const i = t !== null ? t : w, V = s || g, v = h(
1113
- async (d) => {
1114
- await n({ filter: d }, o, d, {
1113
+ const v = e?.listValues;
1114
+ R(() => {
1115
+ n(null);
1116
+ }, [JSON.stringify(v)]);
1117
+ const p = t !== null ? t : i, w = s || V, l = a ?? v, r = h(
1118
+ async (k) => {
1119
+ await d({ filter: k }, o, k, {
1115
1120
  errorMessage: "Failed to update filter settings"
1116
1121
  });
1117
1122
  },
1118
- [n]
1119
- ), p = h(
1120
- async (d, l) => {
1121
- const a = te(d, l);
1122
- await n(a, c, d, {
1123
+ [d]
1124
+ ), u = h(
1125
+ async (k, B) => {
1126
+ const F = te(k, B);
1127
+ await d(F, c, k, {
1123
1128
  errorMessage: "Failed to update columns"
1124
1129
  });
1125
1130
  },
1126
- [n]
1131
+ [d]
1132
+ ), y = h(
1133
+ async (k) => {
1134
+ await d({ listValues: k }, n, k, {
1135
+ errorMessage: "Failed to update list values settings"
1136
+ });
1137
+ },
1138
+ [d]
1127
1139
  );
1128
1140
  return {
1129
- filters: i,
1130
- onUpdateFilters: v,
1131
- columns: V,
1132
- onUpdateColumns: p
1141
+ filters: p,
1142
+ onUpdateFilters: r,
1143
+ columns: w,
1144
+ onUpdateColumns: u,
1145
+ listValues: l,
1146
+ onUpdateListValues: y
1133
1147
  };
1134
1148
  };
1135
1149
  export {
1136
1150
  De as BASE_VIEW_ID,
1137
1151
  Ne as NEW_VIEW_ID,
1138
- Je as VIEW_DIVIDER,
1139
- Ht as Views,
1152
+ Ke as VIEW_DIVIDER,
1153
+ Gt as Views,
1140
1154
  gt as ViewsButton,
1141
- Ke as ViewsContext,
1142
- je as ViewsMenu,
1155
+ Qe as ViewsContext,
1156
+ ze as ViewsMenu,
1143
1157
  ht as ViewsMenuContainer,
1144
- At as ViewsProvider,
1158
+ Ht as ViewsProvider,
1145
1159
  ne as WORKING_VIEW_ID,
1146
- Xt as generateViewId,
1160
+ Yt as generateViewId,
1147
1161
  be as generateWorkingView,
1148
1162
  Te as getCustomViewsFallback,
1149
- Ie as getViewsPortalContainer,
1163
+ Ee as getViewsPortalContainer,
1150
1164
  at as getViewsPortalId,
1151
- Ee as isViewStudioScope,
1152
- Yt as updateViewSettings,
1165
+ Ie as isViewStudioScope,
1166
+ Zt as updateViewSettings,
1153
1167
  ot as useBaseViewMutations,
1154
1168
  et as useBuildViewMenuItems,
1155
- Kt as useListsViewSettings,
1156
- Jt as useOverviewViewSettings,
1157
- Gt as usePrefetchViews,
1169
+ jt as useListsViewSettings,
1170
+ Qt as useOverviewViewSettings,
1171
+ Jt as usePrefetchViews,
1158
1172
  it as useSaveViewFromCurrent,
1159
1173
  tt as useSelectedView,
1160
- Qt as useTaskProgressViewSettings,
1174
+ Kt as useTaskProgressViewSettings,
1161
1175
  Le as useViewUpdateHelper,
1162
1176
  H as useViewsContext,
1163
1177
  st as useViewsMutations,
1164
1178
  vt as useViewsShortcuts,
1165
- Zt as useViewsState,
1166
- qt as viewTypes
1179
+ Nt as useViewsState,
1180
+ At as viewTypes
1167
1181
  };