@ynput/ayon-frontend-shared 0.8.1 → 0.10.0

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