@tenorlab/vue-dashboard 1.4.3 → 1.4.4

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.
@@ -1,127 +1,127 @@
1
- import { reactive as ie, computed as p, readonly as fe, defineComponent as b, createElementBlock as C, openBlock as d, normalizeClass as h, createElementVNode as o, createStaticVNode as te, withModifiers as T, normalizeStyle as se, renderSlot as z, mergeProps as G, createBlock as K, withCtx as B, unref as f, toDisplayString as E, ref as R, onMounted as Ce, onUnmounted as ve, shallowRef as we, watchEffect as ye, defineAsyncComponent as xe, resolveComponent as be, Suspense as _e, resolveDynamicComponent as ae, createCommentVNode as O, Fragment as U, renderList as F, createVNode as I, createTextVNode as re, withKeys as oe, watch as ke } from "vue";
2
- import { blankDashboardConfig as ee, ensureContainersSequence as $e, getDistinctCssClasses as L, ensureZoomScaleIsWithinRange as Ie, parseContainerTitle as de, dashboardSettingsUtils as De, getWidgetMetaFromCatalog as We } from "./core.es.js";
3
- const Be = (t) => {
4
- const s = t.widgets.filter((i) => i.includes("WidgetContainer")).map((i) => Number(i.split("_")[1].replace("container", "")));
1
+ import { reactive as de, computed as f, readonly as we, defineComponent as b, createElementBlock as C, openBlock as d, normalizeClass as h, createElementVNode as o, createStaticVNode as se, withModifiers as j, normalizeStyle as oe, renderSlot as A, mergeProps as G, createBlock as S, withCtx as B, unref as w, toDisplayString as H, ref as R, onMounted as ye, onUnmounted as xe, shallowRef as ne, watchEffect as be, markRaw as re, h as O, resolveComponent as _e, Suspense as ke, resolveDynamicComponent as le, createSlots as $e, Fragment as U, renderList as F, createVNode as D, createTextVNode as ce, withKeys as ie, watch as Ie, createCommentVNode as Y } from "vue";
2
+ import { blankDashboardConfig as te, ensureContainersSequence as De, getDistinctCssClasses as L, ensureZoomScaleIsWithinRange as We, parseContainerTitle as ue, dashboardSettingsUtils as Be, getWidgetMetaFromCatalog as Ke } from "./core.es.js";
3
+ const Me = (t) => {
4
+ const s = t.widgets.filter((n) => n.includes("WidgetContainer")).map((n) => Number(n.split("_")[1].replace("container", "")));
5
5
  return `container${s.length > 0 ? Math.max(...s) + 1 : 1}`;
6
- }, Ke = (t, s) => {
7
- const e = Be(t);
6
+ }, Se = (t, s) => {
7
+ const e = Me(t);
8
8
  return `${s}_${e}`;
9
- }, Me = (t) => {
10
- const { dashboardConfig: s, widgetKey: e, parentWidgetKey: i, noDuplicatedWidgets: n } = t;
11
- if (i) {
12
- if (n && s.childWidgetsConfig.find(
13
- (r) => r.parentWidgetKey === i && r.widgetKey === e
9
+ }, Ee = (t) => {
10
+ const { dashboardConfig: s, widgetKey: e, parentWidgetKey: n, noDuplicatedWidgets: r } = t;
11
+ if (n) {
12
+ if (r && s.childWidgetsConfig.find(
13
+ (l) => l.parentWidgetKey === n && l.widgetKey === e
14
14
  ))
15
15
  return {
16
16
  success: !1,
17
17
  message: `DashboardStore: addWidget: Widget already added (${e})`,
18
18
  updatedDashboardConfig: s
19
19
  };
20
- const a = [
20
+ const i = [
21
21
  ...s.childWidgetsConfig,
22
- { parentWidgetKey: i, widgetKey: e }
22
+ { parentWidgetKey: n, widgetKey: e }
23
23
  // new entry
24
24
  ];
25
25
  return {
26
26
  success: !0,
27
27
  updatedDashboardConfig: {
28
28
  ...s,
29
- childWidgetsConfig: a
29
+ childWidgetsConfig: i
30
30
  }
31
31
  };
32
32
  } else {
33
- if (n && s.widgets.includes(e))
33
+ if (r && s.widgets.includes(e))
34
34
  return {
35
35
  success: !1,
36
36
  message: `DashboardStore: addWidget: Widget already added (${e})`,
37
37
  updatedDashboardConfig: s
38
38
  };
39
- const a = [...s.widgets, e];
39
+ const i = [...s.widgets, e];
40
40
  return {
41
41
  success: !0,
42
42
  updatedDashboardConfig: {
43
43
  ...s,
44
- widgets: a
44
+ widgets: i
45
45
  }
46
46
  };
47
47
  }
48
- }, Se = (t, s, e) => {
48
+ }, Ne = (t, s, e) => {
49
49
  if ((e || "").trim().length > 0) {
50
- const i = t.childWidgetsConfig.filter(
50
+ const n = t.childWidgetsConfig.filter(
51
51
  (c) => c.parentWidgetKey !== e
52
- ), n = t.childWidgetsConfig.filter(
52
+ ), r = t.childWidgetsConfig.filter(
53
53
  (c) => c.parentWidgetKey === e && c.widgetKey !== s
54
- ), a = [...i, ...n];
55
- let r = {
54
+ ), i = [...n, ...r];
55
+ let l = {
56
56
  ...t,
57
- childWidgetsConfig: a
57
+ childWidgetsConfig: i
58
58
  };
59
- return `${s}`.includes("Container") && (r = $e(r)), {
59
+ return `${s}`.includes("Container") && (l = De(l)), {
60
60
  success: !0,
61
- updatedDashboardConfig: r
61
+ updatedDashboardConfig: l
62
62
  };
63
63
  } else {
64
- const i = t.widgets.filter((a) => a !== s), n = t.childWidgetsConfig.filter(
65
- (a) => a.parentWidgetKey !== s
64
+ const n = t.widgets.filter((i) => i !== s), r = t.childWidgetsConfig.filter(
65
+ (i) => i.parentWidgetKey !== s
66
66
  );
67
67
  return {
68
68
  success: !0,
69
69
  updatedDashboardConfig: {
70
70
  ...t,
71
- widgets: i,
72
- childWidgetsConfig: n
71
+ widgets: n,
72
+ childWidgetsConfig: r
73
73
  }
74
74
  };
75
75
  }
76
- }, Ee = (t, s, e, i) => {
77
- if ((i || "").trim().length > 0) {
78
- const n = t.childWidgetsConfig.filter(
79
- (u) => u.parentWidgetKey !== i
76
+ }, Le = (t, s, e, n) => {
77
+ if ((n || "").trim().length > 0) {
78
+ const r = t.childWidgetsConfig.filter(
79
+ (p) => p.parentWidgetKey !== n
80
80
  );
81
- let a = t.childWidgetsConfig.filter(
82
- (u) => u.parentWidgetKey === i
81
+ let i = t.childWidgetsConfig.filter(
82
+ (p) => p.parentWidgetKey === n
83
83
  );
84
- const r = a.indexOf(e);
85
- let w = r + s;
86
- if (w = Math.max(0, w), w = Math.min(a.length - 1, w), w === r)
84
+ const l = i.indexOf(e);
85
+ let m = l + s;
86
+ if (m = Math.max(0, m), m = Math.min(i.length - 1, m), m === l)
87
87
  return {
88
88
  success: !1,
89
89
  message: `DashboardStore: moveWidget: Widget already at min/max position (${e})`,
90
90
  updatedDashboardConfig: t
91
91
  };
92
- const c = [...a], [g] = c.splice(r, 1);
93
- return c.splice(w, 0, g), {
92
+ const c = [...i], [y] = c.splice(l, 1);
93
+ return c.splice(m, 0, y), {
94
94
  success: !0,
95
95
  updatedDashboardConfig: {
96
96
  ...t,
97
- childWidgetsConfig: [...n, ...c]
97
+ childWidgetsConfig: [...r, ...c]
98
98
  }
99
99
  };
100
100
  } else {
101
- const n = t.widgets || [], a = n.indexOf(e);
102
- let r = a + s;
103
- if (r = Math.max(0, r), r = Math.min(n.length - 1, r), r === a)
101
+ const r = t.widgets || [], i = r.indexOf(e);
102
+ let l = i + s;
103
+ if (l = Math.max(0, l), l = Math.min(r.length - 1, l), l === i)
104
104
  return {
105
105
  success: !1,
106
106
  message: `DashboardStore: moveWidget: Widget already at min/max position (${e})`,
107
107
  updatedDashboardConfig: t
108
108
  };
109
- const w = [...n], [c] = w.splice(a, 1);
110
- return w.splice(r, 0, c), {
109
+ const m = [...r], [c] = m.splice(i, 1);
110
+ return m.splice(l, 0, c), {
111
111
  success: !0,
112
112
  updatedDashboardConfig: {
113
113
  ...t,
114
- widgets: w
114
+ widgets: m
115
115
  }
116
116
  };
117
117
  }
118
- }, Le = () => ({
118
+ }, Te = () => ({
119
119
  isLoading: !1,
120
120
  // Start uninitialized/not loading
121
121
  isEditing: !1,
122
- allDashboardConfigs: [ee],
123
- currentDashboardConfig: ee
124
- }), x = ie(Le()), S = {
122
+ allDashboardConfigs: [te],
123
+ currentDashboardConfig: te
124
+ }), x = de(Te()), N = {
125
125
  setIsLoading: (t) => x.isLoading = t,
126
126
  setIsEditing: (t) => x.isEditing = t,
127
127
  setTargetContainerKey: (t) => x.targetContainerKey = t,
@@ -142,19 +142,19 @@ const Be = (t) => {
142
142
  },
143
143
  deleteDashboardConfigById: (t) => {
144
144
  const s = [...x.allDashboardConfigs.filter((e) => e.dashboardId !== t)];
145
- return x.allDashboardConfigs = s, x.currentDashboardConfig = s[0] || ee, s;
145
+ return x.allDashboardConfigs = s, x.currentDashboardConfig = s[0] || te, s;
146
146
  },
147
147
  selectDashboardById: (t) => {
148
148
  const s = x.allDashboardConfigs.find((e) => e.dashboardId === t);
149
149
  return s && (x.currentDashboardConfig = s), s;
150
150
  },
151
151
  addWidget: (t) => {
152
- const s = Me({
152
+ const s = Ee({
153
153
  dashboardConfig: x.currentDashboardConfig,
154
154
  ...t
155
155
  }), e = [
156
156
  ...x.allDashboardConfigs.filter(
157
- (i) => i.dashboardId !== s.updatedDashboardConfig.dashboardId
157
+ (n) => n.dashboardId !== s.updatedDashboardConfig.dashboardId
158
158
  ),
159
159
  s.updatedDashboardConfig
160
160
  ];
@@ -164,132 +164,132 @@ const Be = (t) => {
164
164
  };
165
165
  },
166
166
  removeWidget: (t, s) => {
167
- const e = Se(x.currentDashboardConfig, t, s), i = [
167
+ const e = Ne(x.currentDashboardConfig, t, s), n = [
168
168
  ...x.allDashboardConfigs.filter(
169
- (n) => n.dashboardId !== e.updatedDashboardConfig.dashboardId
169
+ (r) => r.dashboardId !== e.updatedDashboardConfig.dashboardId
170
170
  ),
171
171
  e.updatedDashboardConfig
172
172
  ];
173
- return e.success && (x.allDashboardConfigs = i, x.currentDashboardConfig = e.updatedDashboardConfig), {
173
+ return e.success && (x.allDashboardConfigs = n, x.currentDashboardConfig = e.updatedDashboardConfig), {
174
174
  ...e,
175
- allUpdatedDashboardConfigs: i
175
+ allUpdatedDashboardConfigs: n
176
176
  };
177
177
  },
178
178
  moveWidget: (t, s, e) => {
179
- const i = Ee(x.currentDashboardConfig, t, s, e), n = [
179
+ const n = Le(x.currentDashboardConfig, t, s, e), r = [
180
180
  ...x.allDashboardConfigs.filter(
181
- (a) => a.dashboardId !== i.updatedDashboardConfig.dashboardId
181
+ (i) => i.dashboardId !== n.updatedDashboardConfig.dashboardId
182
182
  ),
183
- i.updatedDashboardConfig
183
+ n.updatedDashboardConfig
184
184
  ];
185
- return i.success && (x.allDashboardConfigs = n, x.currentDashboardConfig = i.updatedDashboardConfig), {
186
- ...i,
187
- allUpdatedDashboardConfigs: n
185
+ return n.success && (x.allDashboardConfigs = r, x.currentDashboardConfig = n.updatedDashboardConfig), {
186
+ ...n,
187
+ allUpdatedDashboardConfigs: r
188
188
  };
189
189
  }
190
- }, ne = {
191
- setIsLoading: (t) => S.setIsLoading(t),
192
- setIsEditing: (t) => (t || S.setTargetContainerKey(void 0), S.setIsEditing(t), t),
193
- setTargetContainerKey: (t) => S.setTargetContainerKey(t),
194
- setAllDashboardConfigs: (t) => S.setAllDashboardConfigs(t),
195
- setCurrentDashboardConfig: (t) => S.setCurrentDashboardConfig(t),
196
- addDashboardConfig: (t) => S.addDashboardConfig(t),
197
- deleteDashboardConfigById: (t) => S.deleteDashboardConfigById(t),
198
- selectDashboardById: (t) => S.selectDashboardById(t),
199
- addWidget: (t) => S.addWidget(t),
200
- removeWidget: (t, s) => S.removeWidget(t, s),
201
- moveWidget: (t, s, e) => S.moveWidget(t, s, e)
202
- }, Ne = {
203
- getNextContainerKey: (t) => Ke(x.currentDashboardConfig, t),
190
+ }, ae = {
191
+ setIsLoading: (t) => N.setIsLoading(t),
192
+ setIsEditing: (t) => (t || N.setTargetContainerKey(void 0), N.setIsEditing(t), t),
193
+ setTargetContainerKey: (t) => N.setTargetContainerKey(t),
194
+ setAllDashboardConfigs: (t) => N.setAllDashboardConfigs(t),
195
+ setCurrentDashboardConfig: (t) => N.setCurrentDashboardConfig(t),
196
+ addDashboardConfig: (t) => N.addDashboardConfig(t),
197
+ deleteDashboardConfigById: (t) => N.deleteDashboardConfigById(t),
198
+ selectDashboardById: (t) => N.selectDashboardById(t),
199
+ addWidget: (t) => N.addWidget(t),
200
+ removeWidget: (t, s) => N.removeWidget(t, s),
201
+ moveWidget: (t, s, e) => N.moveWidget(t, s, e)
202
+ }, je = {
203
+ getNextContainerKey: (t) => Se(x.currentDashboardConfig, t),
204
204
  getCurrentDashboardConfig: () => x.currentDashboardConfig,
205
205
  getCurrentDashboardId: () => x.currentDashboardConfig.dashboardId,
206
206
  getIsResponsive: () => x.currentDashboardConfig.responsiveGrid || !1,
207
207
  getTargetContainerKey: () => x.targetContainerKey
208
- }, Te = {
209
- isLoading: p(() => x.isLoading),
210
- isEditing: p(() => x.isEditing),
211
- targetContainerKey: p(() => x.targetContainerKey),
212
- currentDashboardConfig: p(() => x.currentDashboardConfig),
213
- allDashboardConfigs: p(() => x.allDashboardConfigs.sort((t, s) => {
214
- const e = t.dashboardId === "default", i = s.dashboardId === "default";
215
- return e && !i ? -1 : i && !e ? 1 : t.dashboardId.localeCompare(s.dashboardId);
208
+ }, ze = {
209
+ isLoading: f(() => x.isLoading),
210
+ isEditing: f(() => x.isEditing),
211
+ targetContainerKey: f(() => x.targetContainerKey),
212
+ currentDashboardConfig: f(() => x.currentDashboardConfig),
213
+ allDashboardConfigs: f(() => x.allDashboardConfigs.sort((t, s) => {
214
+ const e = t.dashboardId === "default", n = s.dashboardId === "default";
215
+ return e && !n ? -1 : n && !e ? 1 : t.dashboardId.localeCompare(s.dashboardId);
216
216
  }))
217
- }, je = {
218
- ...ne,
219
- actions: ne,
220
- getters: Ne,
221
- computed: Te
222
- }, qt = () => je, M = ie({
217
+ }, He = {
218
+ ...ae,
219
+ actions: ae,
220
+ getters: je,
221
+ computed: ze
222
+ }, es = () => He, E = de({
223
223
  currentDashboardId: "",
224
224
  undoHistory: {},
225
225
  historyIndex: {}
226
- }), q = (t) => M.undoHistory[t] || [], Z = (t) => M.historyIndex[t] ?? -1, X = (t, s) => {
227
- M.historyIndex[t] = s;
228
- }, ze = (t) => {
226
+ }), q = (t) => E.undoHistory[t] || [], Z = (t) => E.historyIndex[t] ?? -1, X = (t, s) => {
227
+ E.historyIndex[t] = s;
228
+ }, Ae = (t) => {
229
229
  const s = t.dashboardId;
230
- if (M.currentDashboardId !== s) {
231
- M.currentDashboardId = s;
230
+ if (E.currentDashboardId !== s) {
231
+ E.currentDashboardId = s;
232
232
  const e = {
233
233
  undoIndex: 0,
234
234
  config: t
235
235
  };
236
- X(s, 0), M.undoHistory[s] = [e];
236
+ X(s, 0), E.undoHistory[s] = [e];
237
237
  }
238
- }, Ae = (t) => {
239
- const s = t.dashboardId, e = q(s), i = Z(s), n = e.slice(0, i + 1), a = {
240
- undoIndex: n.length,
241
- config: t
242
- }, r = [...n, a];
243
- M.undoHistory[s] = r, X(s, r.length - 1);
244
- }, He = (t) => {
245
- delete M.undoHistory[t], delete M.historyIndex[t];
246
238
  }, Re = (t) => {
247
- const s = q(t), e = Z(t), i = Math.max(0, e - 1);
248
- if (i !== e)
249
- return X(t, i), s[i]?.config;
239
+ const s = t.dashboardId, e = q(s), n = Z(s), r = e.slice(0, n + 1), i = {
240
+ undoIndex: r.length,
241
+ config: t
242
+ }, l = [...r, i];
243
+ E.undoHistory[s] = l, X(s, l.length - 1);
250
244
  }, Ve = (t) => {
251
- const s = q(t), e = s.length, i = Z(t), n = Math.min(e - 1, i + 1);
252
- if (n !== i)
245
+ delete E.undoHistory[t], delete E.historyIndex[t];
246
+ }, Ue = (t) => {
247
+ const s = q(t), e = Z(t), n = Math.max(0, e - 1);
248
+ if (n !== e)
253
249
  return X(t, n), s[n]?.config;
254
- }, le = () => {
255
- const t = M.currentDashboardId || "", s = Z(t), e = q(t).length, i = s <= 0, n = s >= e - 1;
250
+ }, Fe = (t) => {
251
+ const s = q(t), e = s.length, n = Z(t), r = Math.min(e - 1, n + 1);
252
+ if (r !== n)
253
+ return X(t, r), s[r]?.config;
254
+ }, ge = () => {
255
+ const t = E.currentDashboardId || "", s = Z(t), e = q(t).length, n = s <= 0, r = s >= e - 1;
256
256
  return {
257
- isUndoDisabled: i,
258
- isRedoDisabled: n,
257
+ isUndoDisabled: n,
258
+ isRedoDisabled: r,
259
259
  // Optional debugging fields
260
260
  _currentIndex: s,
261
261
  _historyLength: e
262
262
  };
263
- }, Ue = p(() => le()), Zt = () => ({
264
- initializeHistoryForDashboard: ze,
263
+ }, Oe = f(() => ge()), ts = () => ({
264
+ initializeHistoryForDashboard: Ae,
265
265
  resetAllHistory: () => {
266
- M.undoHistory = {}, M.historyIndex = {};
266
+ E.undoHistory = {}, E.historyIndex = {};
267
267
  },
268
- addUndoEntry: Ae,
269
- removeUndoHistoryForDashboard: He,
270
- getPreviousChanges: Re,
271
- getNextChanges: Ve,
272
- computedUndoStatus: Ue,
268
+ addUndoEntry: Re,
269
+ removeUndoHistoryForDashboard: Ve,
270
+ getPreviousChanges: Ue,
271
+ getNextChanges: Fe,
272
+ computedUndoStatus: Oe,
273
273
  // Function that returns a Vue ComputedRef
274
- getUndoStatus: le,
274
+ getUndoStatus: ge,
275
275
  // for unit tests only
276
276
  // Expose reactive state for debugging or advanced external use (optional)
277
- historyState: fe(M)
277
+ historyState: we(E)
278
278
  });
279
279
  function Q(t) {
280
280
  return {
281
- removeClick: (n, a) => {
282
- t("removeClick", n, a);
281
+ removeClick: (r, i) => {
282
+ t("removeClick", r, i);
283
283
  },
284
- moveClick: (n, a, r) => {
285
- t("moveClick", n, a, r);
284
+ moveClick: (r, i, l) => {
285
+ t("moveClick", r, i, l);
286
286
  },
287
- selectContainer: (n) => {
288
- t("selectContainer", n);
287
+ selectContainer: (r) => {
288
+ t("selectContainer", r);
289
289
  }
290
290
  };
291
291
  }
292
- const Xt = /* @__PURE__ */ b({
292
+ const ss = /* @__PURE__ */ b({
293
293
  __name: "AddIcon",
294
294
  props: {
295
295
  cssClass: {}
@@ -316,7 +316,7 @@ const Xt = /* @__PURE__ */ b({
316
316
  o("path", { d: "M12 8v8" }, null, -1)
317
317
  ])], 2));
318
318
  }
319
- }), Qt = /* @__PURE__ */ b({
319
+ }), os = /* @__PURE__ */ b({
320
320
  __name: "DeleteIcon",
321
321
  props: {
322
322
  cssClass: {}
@@ -334,10 +334,10 @@ const Xt = /* @__PURE__ */ b({
334
334
  "stroke-linejoin": "round",
335
335
  class: h(`lucide lucide-trash2-icon lucide-trash-2 ${t.cssClass || ""}`.trim())
336
336
  }, [...e[0] || (e[0] = [
337
- te('<path d="M10 11v6"></path><path d="M14 11v6"></path><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path><path d="M3 6h18"></path><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>', 5)
337
+ se('<path d="M10 11v6"></path><path d="M14 11v6"></path><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"></path><path d="M3 6h18"></path><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>', 5)
338
338
  ])], 2));
339
339
  }
340
- }), Yt = /* @__PURE__ */ b({
340
+ }), ns = /* @__PURE__ */ b({
341
341
  __name: "EditIcon",
342
342
  props: {
343
343
  cssClass: {}
@@ -359,7 +359,7 @@ const Xt = /* @__PURE__ */ b({
359
359
  o("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }, null, -1)
360
360
  ])], 2));
361
361
  }
362
- }), Jt = /* @__PURE__ */ b({
362
+ }), rs = /* @__PURE__ */ b({
363
363
  __name: "GridIcon",
364
364
  props: {
365
365
  cssClass: {}
@@ -377,10 +377,10 @@ const Xt = /* @__PURE__ */ b({
377
377
  "stroke-linejoin": "round",
378
378
  class: h(`lucide lucide-grid3x3-icon lucide-grid-3x3 ${t.cssClass || ""}`.trim())
379
379
  }, [...e[0] || (e[0] = [
380
- te('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>', 5)
380
+ se('<rect width="18" height="18" x="3" y="3" rx="2"></rect><path d="M3 9h18"></path><path d="M3 15h18"></path><path d="M9 3v18"></path><path d="M15 3v18"></path>', 5)
381
381
  ])], 2));
382
382
  }
383
- }), Fe = /* @__PURE__ */ b({
383
+ }), Pe = /* @__PURE__ */ b({
384
384
  __name: "SettingsIcon",
385
385
  props: {
386
386
  cssClass: {}
@@ -406,7 +406,7 @@ const Xt = /* @__PURE__ */ b({
406
406
  }, null, -1)
407
407
  ])], 2));
408
408
  }
409
- }), es = /* @__PURE__ */ b({
409
+ }), is = /* @__PURE__ */ b({
410
410
  __name: "ZoomInIcon",
411
411
  props: {
412
412
  cssClass: {}
@@ -449,7 +449,7 @@ const Xt = /* @__PURE__ */ b({
449
449
  }, null, -1)
450
450
  ])], 2));
451
451
  }
452
- }), ts = /* @__PURE__ */ b({
452
+ }), as = /* @__PURE__ */ b({
453
453
  __name: "ZoomOutIcon",
454
454
  props: {
455
455
  cssClass: {}
@@ -486,7 +486,7 @@ const Xt = /* @__PURE__ */ b({
486
486
  }, null, -1)
487
487
  ])], 2));
488
488
  }
489
- }), ce = /* @__PURE__ */ b({
489
+ }), pe = /* @__PURE__ */ b({
490
490
  __name: "MoveLeftIcon",
491
491
  props: {
492
492
  cssClass: {}
@@ -515,7 +515,7 @@ const Xt = /* @__PURE__ */ b({
515
515
  o("path", { d: "M16 12H8" }, null, -1)
516
516
  ])], 2));
517
517
  }
518
- }), ue = /* @__PURE__ */ b({
518
+ }), he = /* @__PURE__ */ b({
519
519
  __name: "MoveRightIcon",
520
520
  props: {
521
521
  cssClass: {}
@@ -544,7 +544,7 @@ const Xt = /* @__PURE__ */ b({
544
544
  o("path", { d: "M8 12h8" }, null, -1)
545
545
  ])], 2));
546
546
  }
547
- }), ge = /* @__PURE__ */ b({
547
+ }), me = /* @__PURE__ */ b({
548
548
  __name: "XCircleIcon",
549
549
  props: {
550
550
  cssClass: {}
@@ -571,7 +571,7 @@ const Xt = /* @__PURE__ */ b({
571
571
  o("path", { d: "m9 9 6 6" }, null, -1)
572
572
  ])], 2));
573
573
  }
574
- }), ss = /* @__PURE__ */ b({
574
+ }), ds = /* @__PURE__ */ b({
575
575
  __name: "MonitorSmartphoneIcon",
576
576
  props: {
577
577
  cssClass: {}
@@ -603,7 +603,7 @@ const Xt = /* @__PURE__ */ b({
603
603
  }, null, -1)
604
604
  ])], 2));
605
605
  }
606
- }), os = /* @__PURE__ */ b({
606
+ }), ls = /* @__PURE__ */ b({
607
607
  __name: "TabletSmartphoneIcon",
608
608
  props: {
609
609
  cssClass: {}
@@ -634,7 +634,7 @@ const Xt = /* @__PURE__ */ b({
634
634
  o("path", { d: "M8 18h.01" }, null, -1)
635
635
  ])], 2));
636
636
  }
637
- }), ns = /* @__PURE__ */ b({
637
+ }), cs = /* @__PURE__ */ b({
638
638
  __name: "MonitorIcon",
639
639
  props: {
640
640
  cssClass: {}
@@ -673,7 +673,7 @@ const Xt = /* @__PURE__ */ b({
673
673
  }, null, -1)
674
674
  ])], 2));
675
675
  }
676
- }), Pe = /* @__PURE__ */ b({
676
+ }), Ge = /* @__PURE__ */ b({
677
677
  __name: "TimerResetIcon",
678
678
  props: {
679
679
  cssClass: {}
@@ -697,7 +697,7 @@ const Xt = /* @__PURE__ */ b({
697
697
  o("path", { d: "M9 17H4v5" }, null, -1)
698
698
  ])], 2));
699
699
  }
700
- }), Oe = /* @__PURE__ */ b({
700
+ }), qe = /* @__PURE__ */ b({
701
701
  __name: "UndoIcon",
702
702
  props: {
703
703
  cssClass: {}
@@ -719,7 +719,7 @@ const Xt = /* @__PURE__ */ b({
719
719
  o("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }, null, -1)
720
720
  ])], 2));
721
721
  }
722
- }), Ge = /* @__PURE__ */ b({
722
+ }), Ze = /* @__PURE__ */ b({
723
723
  __name: "RedoIcon",
724
724
  props: {
725
725
  cssClass: {}
@@ -741,7 +741,7 @@ const Xt = /* @__PURE__ */ b({
741
741
  o("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" }, null, -1)
742
742
  ])], 2));
743
743
  }
744
- }), qe = /* @__PURE__ */ b({
744
+ }), Xe = /* @__PURE__ */ b({
745
745
  __name: "HandIcon",
746
746
  props: {
747
747
  cssClass: {}
@@ -765,7 +765,7 @@ const Xt = /* @__PURE__ */ b({
765
765
  o("path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" }, null, -1)
766
766
  ])], 2));
767
767
  }
768
- }), Ze = /* @__PURE__ */ b({
768
+ }), Qe = /* @__PURE__ */ b({
769
769
  __name: "HandGrabIcon",
770
770
  props: {
771
771
  cssClass: {}
@@ -783,10 +783,10 @@ const Xt = /* @__PURE__ */ b({
783
783
  "stroke-linejoin": "round",
784
784
  class: h(`lucide lucide-hand-grab-icon lucide-hand-grab ${t.cssClass || ""}`.trim())
785
785
  }, [...e[0] || (e[0] = [
786
- te('<path d="M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4"></path><path d="M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"></path><path d="M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5"></path><path d="M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2"></path><path d="M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0"></path>', 5)
786
+ se('<path d="M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4"></path><path d="M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2"></path><path d="M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5"></path><path d="M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2"></path><path d="M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0"></path>', 5)
787
787
  ])], 2));
788
788
  }
789
- }), Xe = /* @__PURE__ */ b({
789
+ }), Ye = /* @__PURE__ */ b({
790
790
  __name: "CrosshairIcon",
791
791
  props: {
792
792
  cssClass: {}
@@ -830,7 +830,7 @@ const Xt = /* @__PURE__ */ b({
830
830
  }, null, -1)
831
831
  ])], 2));
832
832
  }
833
- }), is = /* @__PURE__ */ b({
833
+ }), us = /* @__PURE__ */ b({
834
834
  __name: "TargetIcon",
835
835
  props: {
836
836
  cssClass: {}
@@ -865,7 +865,7 @@ const Xt = /* @__PURE__ */ b({
865
865
  }, null, -1)
866
866
  ])], 2));
867
867
  }
868
- }), Qe = /* @__PURE__ */ b({
868
+ }), Je = /* @__PURE__ */ b({
869
869
  __name: "CircleQuestionMarkIcon",
870
870
  props: {
871
871
  cssClass: {}
@@ -894,7 +894,7 @@ const Xt = /* @__PURE__ */ b({
894
894
  o("path", { d: "M12 17h.01" }, null, -1)
895
895
  ])], 2));
896
896
  }
897
- }), Ye = ["title", "disabled"], j = /* @__PURE__ */ b({
897
+ }), et = ["title", "disabled"], z = /* @__PURE__ */ b({
898
898
  __name: "Button",
899
899
  props: {
900
900
  disabled: { type: Boolean, default: !1 },
@@ -916,7 +916,7 @@ const Xt = /* @__PURE__ */ b({
916
916
  },
917
917
  emits: ["click"],
918
918
  setup(t, { emit: s }) {
919
- const e = t, i = s, n = /* @__PURE__ */ new Map([
919
+ const e = t, n = s, r = /* @__PURE__ */ new Map([
920
920
  [
921
921
  "normal",
922
922
  "group bg-[category] content-[category] hover:bg-[category] group-hover:bg-[category] focus:outline-[category] focus:outline-offset-[category]"
@@ -925,55 +925,55 @@ const Xt = /* @__PURE__ */ b({
925
925
  "ghost",
926
926
  "group bg-transparent border-[category] text-[category] hover:text-[category] group-hover:text-[category] focus:outline-[category] focus:outline-offset-[category]"
927
927
  ]
928
- ]), a = p(() => {
929
- const c = e.isIconButton || !1, g = e.category || "primary", u = e.type || "normal", y = e.disabled || !1, k = e.className || "", $ = e.font || "", D = Number((e.border || 0) > 0 ? e.border : 0);
930
- let _ = (e.borderColor || "").trim();
931
- _ = _.length > 0 ? _ : "";
932
- const W = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), H = e.shadow || "sm", N = e.shadowHover || "md", A = (e.addCss || "").trim(), m = e.justifyCss || "justify-center";
928
+ ]), i = f(() => {
929
+ const c = e.isIconButton || !1, y = e.category || "primary", p = e.type || "normal", v = e.disabled || !1, $ = e.className || "", _ = e.font || "", W = Number((e.border || 0) > 0 ? e.border : 0);
930
+ let K = (e.borderColor || "").trim();
931
+ K = K.length > 0 ? K : "";
932
+ const T = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), k = e.shadow || "sm", I = e.shadowHover || "md", M = (e.addCss || "").trim(), u = e.justifyCss || "justify-center";
933
933
  if (c)
934
934
  return L(
935
935
  "flex flex-row items-center",
936
- y ? "text-disabled" : `text-${g} hover:brightness-110 cursor-pointer`,
937
- k || ""
936
+ v ? "text-disabled" : `text-${y} hover:brightness-110 cursor-pointer`,
937
+ $ || ""
938
938
  );
939
- const l = [
939
+ const a = [
940
940
  "relative cursor-pointer",
941
941
  "rounded-sm focus:outline-none focus:ring focus:ring-offset",
942
942
  "transition-all duration-150",
943
943
  "text-sm",
944
- `font-${$}`
944
+ `font-${_}`
945
945
  ];
946
- if (y)
947
- u === "ghost" ? l.push("text-disabled border-disabled cursor-not-allowed") : l.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
946
+ if (v)
947
+ p === "ghost" ? a.push("text-disabled border-disabled cursor-not-allowed") : a.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
948
948
  else {
949
- l.push("cursor-pointer");
950
- let v = "";
951
- n.has(u) ? v = `${n.get(u)}` : v = `${n.get("normal")}`, D < 1 && (v = v.replace("border-[category]", ""));
952
- const V = v.replaceAll("[category]", g).trim();
953
- l.push(V);
949
+ a.push("cursor-pointer");
950
+ let g = "";
951
+ r.has(p) ? g = `${r.get(p)}` : g = `${r.get("normal")}`, W < 1 && (g = g.replace("border-[category]", ""));
952
+ const V = g.replaceAll("[category]", y).trim();
953
+ a.push(V);
954
954
  }
955
- return D > 0 ? (l.push(`border-[${D}px]`), l.push(`border-${_}`)) : (l.push("border-[1px]"), l.push("border-transparent")), W > 0 ? (l.push(`hover:border-[${W}px] group-hover:border-[${W}px]`), l.push(`hover:border-${_} group-hover:border-${_}`)) : l.push("hover:border-[1px] group-hover:border-[1px]"), l.push(`shadow-${H}`), l.push(`hover:shadow-${N} group-hover:shadow-${N}`), A.length > 0 && l.push(A), A.indexOf("hidden") === -1 && l.push("inline-flex"), l.push(m), l.join(" ").trim();
956
- }), r = p(() => ({
955
+ return W > 0 ? (a.push(`border-[${W}px]`), a.push(`border-${K}`)) : (a.push("border-[1px]"), a.push("border-transparent")), T > 0 ? (a.push(`hover:border-[${T}px] group-hover:border-[${T}px]`), a.push(`hover:border-${K} group-hover:border-${K}`)) : a.push("hover:border-[1px] group-hover:border-[1px]"), a.push(`shadow-${k}`), a.push(`hover:shadow-${I} group-hover:shadow-${I}`), M.length > 0 && a.push(M), M.indexOf("hidden") === -1 && a.push("inline-flex"), a.push(u), a.join(" ").trim();
956
+ }), l = f(() => ({
957
957
  padding: e.isIconButton ? 0 : `${e.py}rem ${e.px}rem `
958
- })), w = (c) => {
958
+ })), m = (c) => {
959
959
  if (e.disabled) {
960
960
  c.preventDefault();
961
961
  return;
962
962
  }
963
- i("click", c);
963
+ n("click", c);
964
964
  };
965
- return (c, g) => (d(), C("button", {
965
+ return (c, y) => (d(), C("button", {
966
966
  type: "button",
967
- class: h(a.value),
968
- style: se(r.value),
967
+ class: h(i.value),
968
+ style: oe(l.value),
969
969
  title: t.tooltip?.title,
970
970
  disabled: t.disabled,
971
- onClick: T(w, ["stop"])
971
+ onClick: j(m, ["stop"])
972
972
  }, [
973
- z(c.$slots, "default")
974
- ], 14, Ye));
973
+ A(c.$slots, "default")
974
+ ], 14, et));
975
975
  }
976
- }), Je = ["data-testid"], et = /* @__PURE__ */ b({
976
+ }), tt = ["data-testid"], st = /* @__PURE__ */ b({
977
977
  __name: "Stack",
978
978
  props: {
979
979
  testId: {},
@@ -982,18 +982,18 @@ const Xt = /* @__PURE__ */ b({
982
982
  style: {}
983
983
  },
984
984
  setup(t) {
985
- const s = t, e = p(() => {
986
- const { testId: n, classNames: a, direction: r, ...w } = s;
987
- return w;
988
- }), i = p(() => s.direction === "row" ? L("flex flex-row items-center gap-2", s.classNames || "") : L("flex flex-col gap-2 w-full", s.classNames || ""));
989
- return (n, a) => (d(), C("div", G({
985
+ const s = t, e = f(() => {
986
+ const { testId: r, classNames: i, direction: l, ...m } = s;
987
+ return m;
988
+ }), n = f(() => s.direction === "row" ? L("flex flex-row items-center gap-2", s.classNames || "") : L("flex flex-col gap-2 w-full", s.classNames || ""));
989
+ return (r, i) => (d(), C("div", G({
990
990
  "data-testid": t.testId || "not-set",
991
- class: i.value
991
+ class: n.value
992
992
  }, e.value), [
993
- z(n.$slots, "default")
994
- ], 16, Je));
993
+ A(r.$slots, "default")
994
+ ], 16, tt));
995
995
  }
996
- }), as = /* @__PURE__ */ b({
996
+ }), gs = /* @__PURE__ */ b({
997
997
  __name: "ListItem",
998
998
  props: {
999
999
  testId: {},
@@ -1003,35 +1003,35 @@ const Xt = /* @__PURE__ */ b({
1003
1003
  innerClass: {}
1004
1004
  },
1005
1005
  setup(t) {
1006
- const s = t, e = p(() => {
1007
- const { classNames: a, direction: r, innerClass: w, ...c } = s;
1006
+ const s = t, e = f(() => {
1007
+ const { classNames: i, direction: l, innerClass: m, ...c } = s;
1008
1008
  return c;
1009
- }), i = p(() => L(s.classNames || "", "w-full")), n = L(
1009
+ }), n = f(() => L(s.classNames || "", "w-full")), r = L(
1010
1010
  `w-full flex overflow-hidden justify-between items-center gap-0
1011
1011
  rounded-md border`,
1012
1012
  s.innerClass || ""
1013
1013
  );
1014
- return (a, r) => (d(), K(et, G({
1014
+ return (i, l) => (d(), S(st, G({
1015
1015
  direction: "row",
1016
- class: i.value
1016
+ class: n.value
1017
1017
  }, e.value), {
1018
1018
  default: B(() => [
1019
1019
  o("div", {
1020
- class: h(f(n))
1020
+ class: h(w(r))
1021
1021
  }, [
1022
- z(a.$slots, "default")
1022
+ A(i.$slots, "default")
1023
1023
  ], 2)
1024
1024
  ]),
1025
1025
  _: 3
1026
1026
  }, 16, ["class"]));
1027
1027
  }
1028
- }), tt = ["for"], st = ["id", "value", "placeholder", "aria-label"], ot = `
1028
+ }), ot = ["for"], nt = ["id", "value", "placeholder", "aria-label"], rt = `
1029
1029
  block w-full rounded-md px-3 py-1.5 text-base
1030
1030
  bg-formfield content-formfield
1031
1031
  outline-1 -outline-offset-1 outline-primary
1032
1032
  placeholder:text-disabled
1033
1033
  focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
1034
- `, he = /* @__PURE__ */ b({
1034
+ `, fe = /* @__PURE__ */ b({
1035
1035
  __name: "TextField",
1036
1036
  props: {
1037
1037
  label: {},
@@ -1042,29 +1042,29 @@ const Xt = /* @__PURE__ */ b({
1042
1042
  },
1043
1043
  emits: ["update:modelValue", "keydown"],
1044
1044
  setup(t, { emit: s }) {
1045
- const e = t, i = s, n = (c) => {
1046
- i("update:modelValue", c.target.value);
1047
- }, a = p(() => e.size === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base"), r = p(() => `flex flex-col mb-4 ${e.className}`), w = p(() => `${ot} ${a.value}`);
1048
- return (c, g) => (d(), C("div", {
1049
- class: h(r.value)
1045
+ const e = t, n = s, r = (c) => {
1046
+ n("update:modelValue", c.target.value);
1047
+ }, i = f(() => e.size === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base"), l = f(() => `flex flex-col mb-4 ${e.className}`), m = f(() => `${rt} ${i.value}`);
1048
+ return (c, y) => (d(), C("div", {
1049
+ class: h(l.value)
1050
1050
  }, [
1051
1051
  o("label", {
1052
1052
  for: e.label,
1053
1053
  class: "block text-sm/6 font-medium mb-1.5"
1054
- }, E(e.label), 9, tt),
1054
+ }, H(e.label), 9, ot),
1055
1055
  o("input", {
1056
1056
  id: e.label,
1057
1057
  type: "text",
1058
1058
  value: e.modelValue,
1059
1059
  placeholder: e.placeholder,
1060
- class: h(w.value),
1060
+ class: h(m.value),
1061
1061
  "aria-label": e.label,
1062
- onInput: n,
1063
- onKeydown: g[0] || (g[0] = (u) => i("keydown", u))
1064
- }, null, 42, st)
1062
+ onInput: r,
1063
+ onKeydown: y[0] || (y[0] = (p) => n("keydown", p))
1064
+ }, null, 42, nt)
1065
1065
  ], 2));
1066
1066
  }
1067
- }), nt = ["data-testid"], it = /* @__PURE__ */ b({
1067
+ }), it = ["data-testid"], at = /* @__PURE__ */ b({
1068
1068
  __name: "DraggablePanel",
1069
1069
  props: {
1070
1070
  testId: {},
@@ -1074,7 +1074,7 @@ const Xt = /* @__PURE__ */ b({
1074
1074
  },
1075
1075
  emits: ["draggingChange"],
1076
1076
  setup(t, { emit: s }) {
1077
- const e = t, i = s, n = R(null), a = R({ x: 0, y: 0 }), r = R({ x: 0, y: 0 }), w = R({ x: 0, y: 0 }), c = {
1077
+ const e = t, n = s, r = R(null), i = R({ x: 0, y: 0 }), l = R({ x: 0, y: 0 }), m = R({ x: 0, y: 0 }), c = {
1078
1078
  // 1. Take it out of the document flow
1079
1079
  position: "fixed",
1080
1080
  // 2. Set initial viewport position (e.g., top right)
@@ -1088,65 +1088,65 @@ const Xt = /* @__PURE__ */ b({
1088
1088
  borderStyle: "solid",
1089
1089
  borderWidth: "3px",
1090
1090
  boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
1091
- }, g = p(() => ({
1091
+ }, y = f(() => ({
1092
1092
  ...c,
1093
1093
  ...e.style || {},
1094
1094
  // Override top/right with CSS transform based on position state for dragging
1095
- transform: `translate(${a.value.x}px, ${a.value.y}px)`,
1095
+ transform: `translate(${i.value.x}px, ${i.value.y}px)`,
1096
1096
  top: c.top,
1097
1097
  right: c.right,
1098
1098
  // When translating, setting 'left' and 'top' to 0 helps maintain consistent behavior
1099
1099
  left: "initial"
1100
- })), u = ($) => {
1101
- $.target.closest(".handle") && ($.preventDefault(), i("draggingChange", !0), r.value = { x: $.clientX, y: $.clientY }, w.value = { x: a.value.x, y: a.value.y }, window.addEventListener("mousemove", y), window.addEventListener("mouseup", k));
1102
- }, y = ($) => {
1103
- const D = $.clientX - r.value.x, _ = $.clientY - r.value.y;
1104
- a.value = {
1105
- x: w.value.x + D,
1106
- y: w.value.y + _
1100
+ })), p = (_) => {
1101
+ _.target.closest(".handle") && (_.preventDefault(), n("draggingChange", !0), l.value = { x: _.clientX, y: _.clientY }, m.value = { x: i.value.x, y: i.value.y }, window.addEventListener("mousemove", v), window.addEventListener("mouseup", $));
1102
+ }, v = (_) => {
1103
+ const W = _.clientX - l.value.x, K = _.clientY - l.value.y;
1104
+ i.value = {
1105
+ x: m.value.x + W,
1106
+ y: m.value.y + K
1107
1107
  };
1108
- }, k = () => {
1109
- window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", k), setTimeout(() => {
1110
- i("draggingChange", !1);
1108
+ }, $ = () => {
1109
+ window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", $), setTimeout(() => {
1110
+ n("draggingChange", !1);
1111
1111
  }, 100);
1112
1112
  };
1113
- return Ce(() => {
1114
- n.value && n.value.addEventListener("mousedown", u);
1115
- }), ve(() => {
1116
- n.value && n.value.removeEventListener("mousedown", u), window.removeEventListener("mousemove", y), window.removeEventListener("mouseup", k);
1117
- }), ($, D) => (d(), C("div", {
1113
+ return ye(() => {
1114
+ r.value && r.value.addEventListener("mousedown", p);
1115
+ }), xe(() => {
1116
+ r.value && r.value.removeEventListener("mousedown", p), window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", $);
1117
+ }), (_, W) => (d(), C("div", {
1118
1118
  ref_key: "panelRef",
1119
- ref: n,
1119
+ ref: r,
1120
1120
  "data-testid": e.testId || "draggable-panel",
1121
1121
  class: h(e.className),
1122
- style: se(g.value)
1122
+ style: oe(y.value)
1123
1123
  }, [
1124
- z($.$slots, "default")
1125
- ], 14, nt));
1124
+ A(_.$slots, "default")
1125
+ ], 14, it));
1126
1126
  }
1127
- }), pe = (t, s) => {
1127
+ }), Ce = (t, s) => {
1128
1128
  const e = t.__vccOpts || t;
1129
- for (const [i, n] of s)
1130
- e[i] = n;
1129
+ for (const [n, r] of s)
1130
+ e[n] = r;
1131
1131
  return e;
1132
- }, at = {}, rt = {
1132
+ }, dt = {}, lt = {
1133
1133
  class: "w-full h-full flex-1 flex flex-col gap-2 items-end justify-end content-end",
1134
1134
  style: { "min-height": "140px" }
1135
1135
  };
1136
- function dt(t, s) {
1137
- return d(), C("div", rt, [
1138
- z(t.$slots, "default")
1136
+ function ct(t, s) {
1137
+ return d(), C("div", lt, [
1138
+ A(t.$slots, "default")
1139
1139
  ]);
1140
1140
  }
1141
- const rs = /* @__PURE__ */ pe(at, [["render", dt]]), lt = {}, ct = { className: "w-full flex flex-col items-end" };
1142
- function ut(t, s) {
1143
- return d(), C("div", ct, [
1144
- z(t.$slots, "default")
1141
+ const ps = /* @__PURE__ */ Ce(dt, [["render", ct]]), ut = {}, gt = { className: "w-full flex flex-col items-end" };
1142
+ function pt(t, s) {
1143
+ return d(), C("div", gt, [
1144
+ A(t.$slots, "default")
1145
1145
  ]);
1146
1146
  }
1147
- const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1147
+ const hs = /* @__PURE__ */ Ce(ut, [["render", pt]]), ms = (t) => {
1148
1148
  console.warn("showToast TODO", t);
1149
- }, cs = /* @__PURE__ */ b({
1149
+ }, fs = /* @__PURE__ */ b({
1150
1150
  __name: "DashboardGrid",
1151
1151
  props: {
1152
1152
  isEditing: { type: Boolean },
@@ -1154,29 +1154,29 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1154
1154
  responsiveGrid: { type: Boolean }
1155
1155
  },
1156
1156
  setup(t) {
1157
- const s = t, e = (a) => a < 0.8 ? 1 : a <= 1 ? 0 : a > 1 ? -1 : 0, i = p(() => {
1158
- let a = Ie(Number(s.zoomScale || 0));
1157
+ const s = t, e = (i) => i < 0.8 ? 1 : i <= 1 ? 0 : i > 1 ? -1 : 0, n = f(() => {
1158
+ let i = We(Number(s.zoomScale || 0));
1159
1159
  return {
1160
- "--bwj-dashboard-transform-scale": a,
1161
- "--bwj-dashboard-add-cols": e(a)
1160
+ "--bwj-dashboard-transform-scale": i,
1161
+ "--bwj-dashboard-add-cols": e(i)
1162
1162
  };
1163
- }), n = p(() => L(
1163
+ }), r = f(() => L(
1164
1164
  "dashboard-main-grid w-full",
1165
1165
  s.isEditing ? "editing" : "",
1166
1166
  s.responsiveGrid ? "responsive-grid" : "",
1167
1167
  `border border-dashed ${s.isEditing ? "border-primary border-opacity-50" : "border-transparent"}`
1168
1168
  ));
1169
- return (a, r) => (d(), C("div", {
1170
- class: h(n.value),
1171
- style: se(i.value)
1169
+ return (i, l) => (d(), C("div", {
1170
+ class: h(r.value),
1171
+ style: oe(n.value)
1172
1172
  }, [
1173
- z(a.$slots, "default")
1173
+ A(i.$slots, "default")
1174
1174
  ], 6));
1175
1175
  }
1176
- }), gt = {
1176
+ }), ht = { key: 0 }, mt = {
1177
1177
  key: 1,
1178
- class: "flex flex-col"
1179
- }, us = /* @__PURE__ */ b({
1178
+ class: "flex items-center justify-center p-8 border border-dashed border-base-300"
1179
+ }, ft = { class: "text-sm animate-pulse" }, Ct = { class: "relative min-h-12 flex flex-col items-center justify-center bg-base-200 rounded-lg" }, vt = { class: "z-10 text-primary font-bold mb-4" }, Cs = /* @__PURE__ */ b({
1180
1180
  __name: "DynamicWidgetLoader",
1181
1181
  props: {
1182
1182
  index: {},
@@ -1191,74 +1191,112 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1191
1191
  },
1192
1192
  emits: ["removeClick", "moveClick", "selectContainer"],
1193
1193
  setup(t, { emit: s }) {
1194
- const e = t, n = Q(s), a = p(() => `${e.widgetKey}`.split("_")), r = p(() => a.value.length > 1), w = p(() => r.value ? a.value[0] : e.widgetKey), c = p(() => r.value ? de(e.widgetKey) : ""), g = p(() => e.widgetCatalog.get(w.value)), u = we(null);
1195
- ye(async () => {
1196
- const _ = g.value;
1197
- if (_) {
1198
- if (_.component)
1199
- u.value = _.component;
1200
- else if (_.loader)
1201
- if (_.loader) {
1202
- const W = await _.loader();
1203
- u.value = W.default || W;
1204
- } else
1205
- u.value = xe(_.loader);
1194
+ const e = (k, I) => {
1195
+ const M = (g) => g.replace(/[^0-9.]/g, ""), u = M(k).split(".").map(Number), a = M(I).split(".").map(Number);
1196
+ return !(u[0] !== a[0] || u[1] < a[1]);
1197
+ }, n = t, i = Q(s), l = f(() => `${n.widgetKey}`.split("_")), m = f(() => l.value.length > 1), c = f(() => m.value ? l.value[0] : n.widgetKey), y = f(() => m.value ? ue(n.widgetKey) : ""), p = f(() => n.widgetCatalog.get(c.value)), v = ne(null), $ = ne(null);
1198
+ be(async () => {
1199
+ const k = p.value;
1200
+ if (k) {
1201
+ if ($.value = null, k.component) {
1202
+ v.value = k.component;
1203
+ return;
1204
+ }
1205
+ if (k.loader)
1206
+ try {
1207
+ const I = typeof __HOST_VUE_VERSION__ < "u" ? __HOST_VUE_VERSION__ : "3.5.0", u = (k.meta?.externalDependencies || []).find((g) => g.startsWith("vue@"));
1208
+ if (u) {
1209
+ const g = u.split("@")[1];
1210
+ if (!e(I, g))
1211
+ throw new Error(`Incompatible Vue version. Required: ${g}, Host: ${I}`);
1212
+ }
1213
+ console.log("Loading widget", n.widgetKey, k.meta);
1214
+ const a = await k.loader();
1215
+ v.value = re(a.default || a);
1216
+ } catch (I) {
1217
+ console.error(`Widget Load Error [${n.widgetKey}]:`, I), v.value = re({
1218
+ name: "WidgetErrorFallback",
1219
+ render: () => O(
1220
+ "div",
1221
+ { class: "p-4 border border-dashed border-error bg-error/10 text-error rounded" },
1222
+ [
1223
+ O("p", { class: "font-bold" }, `Failed to load "${n.widgetKey}"`),
1224
+ O(
1225
+ "p",
1226
+ { class: "text-xs italic" },
1227
+ I.message || "The remote plugin is unavailable."
1228
+ ),
1229
+ k.meta ? O(
1230
+ "pre",
1231
+ { class: "text-[10px] mt-2 opacity-70 overflow-auto" },
1232
+ JSON.stringify(k.meta, null, 2)
1233
+ ) : null
1234
+ ]
1235
+ )
1236
+ });
1237
+ }
1206
1238
  }
1207
1239
  });
1208
- const y = p(() => r.value ? (e.childWidgetsConfig || []).filter((_) => _.parentWidgetKey === e.widgetKey) : []), k = (_, W) => {
1209
- n.removeClick(_, W);
1210
- }, $ = (_, W, H) => {
1211
- n.moveClick(_, W, H);
1212
- }, D = (_) => {
1213
- n.selectContainer(_);
1240
+ const _ = f(() => m.value ? (n.childWidgetsConfig || []).filter((k) => k.parentWidgetKey === n.widgetKey) : []), W = (k, I) => {
1241
+ i.removeClick(k, I);
1242
+ }, K = (k, I, M) => {
1243
+ i.moveClick(k, I, M);
1244
+ }, T = (k) => {
1245
+ i.selectContainer(k);
1214
1246
  };
1215
- return (_, W) => {
1216
- const H = be("DynamicWidgetLoaderDEV");
1217
- return d(), K(_e, null, {
1218
- fallback: B(() => [
1219
- o("div", null, "Loading " + E(g.value?.meta?.name || g.value?.title), 1)
1220
- ]),
1247
+ return (k, I) => {
1248
+ const M = _e("DynamicWidgetLoaderDEV");
1249
+ return d(), S(ke, null, {
1221
1250
  default: B(() => [
1222
- u.value ? (d(), K(ae(u.value), {
1223
- key: 0,
1224
- index: t.index,
1225
- maxIndex: y.value.length - 1,
1226
- widgetKey: t.widgetKey,
1227
- parentWidgetKey: t.parentWidgetKey,
1228
- widgetCatalog: t.widgetCatalog,
1229
- isEditing: t.isEditing,
1230
- highlight: r.value && t.targetContainerKey === t.widgetKey || !1,
1231
- title: (r.value ? c.value : g.value?.meta?.name) || !1,
1232
- extraProps: t.extraProps,
1233
- onRemoveClick: k,
1234
- onMoveClick: $,
1235
- onSelectContainer: D
1236
- }, {
1237
- default: B(() => [
1238
- r.value ? (d(!0), C(U, { key: 0 }, F(y.value, (N, A) => (d(), K(H, {
1239
- key: `${N.widgetKey}_${A}`,
1240
- index: A,
1241
- maxIndex: y.value.length - 1,
1242
- widgetKey: N.widgetKey,
1243
- parentWidgetKey: N.parentWidgetKey,
1244
- widgetCatalog: t.widgetCatalog,
1245
- isEditing: t.isEditing,
1246
- onRemoveClick: k,
1247
- onMoveClick: $
1248
- }, null, 8, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing"]))), 128)) : O("", !0)
1249
- ]),
1250
- _: 1
1251
- }, 40, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "extraProps"])) : (d(), C("div", gt, [
1252
- W[0] || (W[0] = o("span", null, " Widget not found or loader failed: ", -1)),
1253
- o("span", null, E(g.value?.meta?.name || g.value?.title), 1),
1254
- o("span", null, E(t.widgetKey), 1)
1251
+ v.value ? (d(), C("div", ht, [
1252
+ (d(), S(le(v.value), {
1253
+ index: t.index,
1254
+ maxIndex: _.value.length - 1,
1255
+ widgetKey: t.widgetKey,
1256
+ parentWidgetKey: t.parentWidgetKey,
1257
+ widgetCatalog: t.widgetCatalog,
1258
+ isEditing: t.isEditing,
1259
+ highlight: m.value && t.targetContainerKey === t.widgetKey || !1,
1260
+ title: m.value ? y.value : p.value?.meta?.name || p.value?.title,
1261
+ extraProps: t.extraProps,
1262
+ onRemoveClick: W,
1263
+ onMoveClick: K,
1264
+ onSelectContainer: T
1265
+ }, $e({ _: 2 }, [
1266
+ m.value ? {
1267
+ name: "default",
1268
+ fn: B(() => [
1269
+ (d(!0), C(U, null, F(_.value, (u, a) => (d(), S(M, {
1270
+ key: `${u.widgetKey}_${a}`,
1271
+ index: a,
1272
+ maxIndex: _.value.length - 1,
1273
+ widgetKey: u.widgetKey,
1274
+ parentWidgetKey: u.parentWidgetKey,
1275
+ widgetCatalog: t.widgetCatalog,
1276
+ isEditing: t.isEditing,
1277
+ onRemoveClick: W,
1278
+ onMoveClick: K
1279
+ }, null, 8, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing"]))), 128))
1280
+ ]),
1281
+ key: "0"
1282
+ } : void 0
1283
+ ]), 1064, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "extraProps"]))
1284
+ ])) : (d(), C("div", mt, [
1285
+ o("p", ft, "Initializing " + H(t.widgetKey) + "...", 1)
1255
1286
  ]))
1256
1287
  ]),
1288
+ fallback: B(() => [
1289
+ o("div", Ct, [
1290
+ o("div", vt, " Loading " + H(p.value?.title || "Widget"), 1),
1291
+ I[0] || (I[0] = o("div", { class: "animate-ping absolute h-24 w-24 rounded-full border-4 border-primary opacity-20" }, null, -1)),
1292
+ I[1] || (I[1] = o("div", { class: "animate-spin h-12 w-12 rounded-full border-4 border-primary border-t-transparent" }, null, -1))
1293
+ ])
1294
+ ]),
1257
1295
  _: 1
1258
1296
  });
1259
1297
  };
1260
1298
  }
1261
- }), ht = { class: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between" }, pt = { class: "widget-title" }, mt = { "data-testid": "collapse-and-other-actions" }, ft = { class: "actions-inner" }, Ct = { class: "actions-buttons-container" }, vt = { class: "widget-inner" }, Y = "size-5", gs = /* @__PURE__ */ b({
1299
+ }), wt = { class: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between" }, yt = { class: "widget-title" }, xt = { "data-testid": "collapse-and-other-actions" }, bt = { class: "actions-inner" }, _t = { class: "actions-buttons-container" }, kt = { class: "widget-inner" }, J = "size-5", vs = /* @__PURE__ */ b({
1262
1300
  __name: "DashboardWidgetBase",
1263
1301
  props: {
1264
1302
  index: {},
@@ -1281,39 +1319,39 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1281
1319
  },
1282
1320
  emits: ["removeClick", "moveClick", "selectContainer"],
1283
1321
  setup(t, { emit: s }) {
1284
- const e = t, i = s, n = p(() => e.hideTitle && !e.isEditing), a = p(() => {
1285
- const g = e.borderCssClasses || "", u = e.noBorder;
1286
- let y = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
1287
- return u ? y = `${y} border-transparent border-opacity-0` : (g || "").trim().length > 0 ? y = `${y} ${g}` : y = `${y} border-card-invert border-opacity-20`, e.noShadow && (y = `${y} no-shadow`), e.noPadding && (y = `${y} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? y = `${y} ${e.backgroundCssClasses}` : y = `${y} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (y = `${y} ${e.size}-widget`), L(y);
1288
- }), r = p(() => {
1289
- const g = n.value;
1322
+ const e = t, n = s, r = f(() => e.hideTitle && !e.isEditing), i = f(() => {
1323
+ const y = e.borderCssClasses || "", p = e.noBorder;
1324
+ let v = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
1325
+ return p ? v = `${v} border-transparent border-opacity-0` : (y || "").trim().length > 0 ? v = `${v} ${y}` : v = `${v} border-card-invert border-opacity-20`, e.noShadow && (v = `${v} no-shadow`), e.noPadding && (v = `${v} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? v = `${v} ${e.backgroundCssClasses}` : v = `${v} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (v = `${v} ${e.size}-widget`), L(v);
1326
+ }), l = f(() => {
1327
+ const y = r.value;
1290
1328
  return L(
1291
1329
  "widget-header",
1292
- g ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
1293
- g ? "border-opacity-0" : "border-opacity-20"
1330
+ y ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
1331
+ y ? "border-opacity-0" : "border-opacity-20"
1294
1332
  );
1295
- }), w = () => {
1296
- e.widgetKey && i("removeClick", e.widgetKey, e.parentWidgetKey);
1297
- }, c = (g) => {
1298
- e.widgetKey && i("moveClick", g, e.widgetKey, e.parentWidgetKey);
1333
+ }), m = () => {
1334
+ e.widgetKey && n("removeClick", e.widgetKey, e.parentWidgetKey);
1335
+ }, c = (y) => {
1336
+ e.widgetKey && n("moveClick", y, e.widgetKey, e.parentWidgetKey);
1299
1337
  };
1300
- return (g, u) => (d(), C("div", {
1301
- class: h(a.value)
1338
+ return (y, p) => (d(), C("div", {
1339
+ class: h(i.value)
1302
1340
  }, [
1303
1341
  o("div", {
1304
- class: h(r.value)
1342
+ class: h(l.value)
1305
1343
  }, [
1306
- o("div", ht, [
1307
- o("h2", pt, E(e.title), 1),
1308
- u[2] || (u[2] = o("div", null, null, -1))
1344
+ o("div", wt, [
1345
+ o("h2", yt, H(e.title), 1),
1346
+ p[2] || (p[2] = o("div", null, null, -1))
1309
1347
  ]),
1310
- o("div", mt, [
1311
- o("div", ft, [
1312
- u[3] || (u[3] = o("div", null, [
1348
+ o("div", xt, [
1349
+ o("div", bt, [
1350
+ p[3] || (p[3] = o("div", null, [
1313
1351
  o("span", { class: "hidden" }, "Widget")
1314
1352
  ], -1)),
1315
- o("div", Ct, [
1316
- I(f(j), {
1353
+ o("div", _t, [
1354
+ D(w(z), {
1317
1355
  "data-testid": `move-widget-left_${e.title}`,
1318
1356
  isIconButton: !0,
1319
1357
  disabled: e.index < 1,
@@ -1321,16 +1359,16 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1321
1359
  placement: "top",
1322
1360
  title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
1323
1361
  },
1324
- onClick: u[0] || (u[0] = T((y) => c(-1), ["stop"]))
1362
+ onClick: p[0] || (p[0] = j((v) => c(-1), ["stop"]))
1325
1363
  }, {
1326
1364
  default: B(() => [
1327
- I(f(ce), {
1328
- class: h(Y)
1365
+ D(w(pe), {
1366
+ class: h(J)
1329
1367
  })
1330
1368
  ]),
1331
1369
  _: 1
1332
1370
  }, 8, ["data-testid", "disabled", "tooltip"]),
1333
- I(f(j), {
1371
+ D(w(z), {
1334
1372
  "data-testid": `move-widget-right_${e.title}`,
1335
1373
  isIconButton: !0,
1336
1374
  disabled: e.index >= e.maxIndex,
@@ -1338,27 +1376,27 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1338
1376
  placement: "top",
1339
1377
  title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
1340
1378
  },
1341
- onClick: u[1] || (u[1] = T((y) => c(1), ["stop"]))
1379
+ onClick: p[1] || (p[1] = j((v) => c(1), ["stop"]))
1342
1380
  }, {
1343
1381
  default: B(() => [
1344
- I(f(ue), {
1345
- class: h(Y)
1382
+ D(w(he), {
1383
+ class: h(J)
1346
1384
  })
1347
1385
  ]),
1348
1386
  _: 1
1349
1387
  }, 8, ["data-testid", "disabled", "tooltip"]),
1350
- I(f(j), {
1388
+ D(w(z), {
1351
1389
  "data-testid": `remove-container_${e.title}`,
1352
1390
  isIconButton: !0,
1353
1391
  tooltip: {
1354
1392
  placement: "top",
1355
1393
  title: "Remove Widget"
1356
1394
  },
1357
- onClick: T(w, ["stop"])
1395
+ onClick: j(m, ["stop"])
1358
1396
  }, {
1359
1397
  default: B(() => [
1360
- I(f(ge), {
1361
- class: h(Y)
1398
+ D(w(me), {
1399
+ class: h(J)
1362
1400
  })
1363
1401
  ]),
1364
1402
  _: 1
@@ -1367,12 +1405,12 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1367
1405
  ])
1368
1406
  ])
1369
1407
  ], 2),
1370
- o("div", vt, [
1371
- z(g.$slots, "default")
1408
+ o("div", kt, [
1409
+ A(y.$slots, "default")
1372
1410
  ])
1373
1411
  ], 2));
1374
1412
  }
1375
- }), wt = ["data-testid"], yt = { class: "text-sm font-semibold capitalize" }, xt = { "data-testid": "collapse-and-other-actions" }, bt = { class: "actions-inner" }, _t = { class: "actions-buttons-container" }, kt = ["data-testid"], P = "size-5", $t = "border-transparent", It = "border-card-invert", me = /* @__PURE__ */ b({
1413
+ }), $t = ["data-testid"], It = { class: "text-sm font-semibold capitalize" }, Dt = { "data-testid": "collapse-and-other-actions" }, Wt = { class: "actions-inner" }, Bt = { class: "actions-buttons-container" }, Kt = ["data-testid"], P = "size-5", Mt = "border-transparent", St = "border-card-invert", ve = /* @__PURE__ */ b({
1376
1414
  __name: "WidgetContainer",
1377
1415
  props: {
1378
1416
  index: {},
@@ -1395,66 +1433,66 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1395
1433
  },
1396
1434
  emits: ["removeClick", "moveClick", "selectContainer"],
1397
1435
  setup(t, { emit: s }) {
1398
- const e = t, n = Q(s), a = p(() => e.maxIndex > -1), r = p(() => {
1399
- const k = a.value;
1400
- return e.highlight ? $t : e.isEditing && !k ? It : "border-transparent";
1401
- }), w = p(() => {
1402
- const k = e.highlight || !1, $ = e.direction || "column", D = a.value, _ = e.isEditing || !1;
1403
- let N = k ? "border-transparent" : _ ? "border-card-invert" : "border-transparent";
1404
- const A = ["large", "xlarge"].includes(e.size || "");
1405
- let m = "";
1406
- ["large", "xlarge"].indexOf(e.size || "") > -1 && (m = `${e.size}-widget`);
1407
- let l = "";
1408
- return $ === "row" && !D ? l = "min-h-48" : $ === "column" && !D && (l = "min-h-96"), L(
1436
+ const e = t, r = Q(s), i = f(() => e.maxIndex > -1), l = f(() => {
1437
+ const $ = i.value;
1438
+ return e.highlight ? Mt : e.isEditing && !$ ? St : "border-transparent";
1439
+ }), m = f(() => {
1440
+ const $ = e.highlight || !1, _ = e.direction || "column", W = i.value, K = e.isEditing || !1;
1441
+ let I = $ ? "border-transparent" : K ? "border-card-invert" : "border-transparent";
1442
+ const M = ["large", "xlarge"].includes(e.size || "");
1443
+ let u = "";
1444
+ ["large", "xlarge"].indexOf(e.size || "") > -1 && (u = `${e.size}-widget`);
1445
+ let a = "";
1446
+ return _ === "row" && !W ? a = "min-h-48" : _ === "column" && !W && (a = "min-h-96"), L(
1409
1447
  "dashboard-widget-container relative ",
1410
- D ? "" : "has-no-children",
1411
- _ ? "editing" : "",
1412
- l,
1413
- m,
1414
- A ? "widget-container-grid" : "widget-container-flex",
1415
- `direction-${$}`,
1416
- `border ${N}`,
1417
- `${k ? "highlight-container" : ""} ${N}`
1448
+ W ? "" : "has-no-children",
1449
+ K ? "editing" : "",
1450
+ a,
1451
+ u,
1452
+ M ? "widget-container-grid" : "widget-container-flex",
1453
+ `direction-${_}`,
1454
+ `border ${I}`,
1455
+ `${$ ? "highlight-container" : ""} ${I}`
1418
1456
  );
1419
- }), c = p(() => `widget-container-header direction-${e.direction} flex items-center border ${r.value}`), g = () => {
1420
- e.widgetKey && n.removeClick(e.widgetKey);
1421
- }, u = (k) => {
1422
- e.widgetKey && n.moveClick(k, e.widgetKey, e.parentWidgetKey);
1423
- }, y = () => {
1424
- e.widgetKey && n.selectContainer(e.widgetKey);
1457
+ }), c = f(() => `widget-container-header direction-${e.direction} flex items-center border ${l.value}`), y = () => {
1458
+ e.widgetKey && r.removeClick(e.widgetKey);
1459
+ }, p = ($) => {
1460
+ e.widgetKey && r.moveClick($, e.widgetKey, e.parentWidgetKey);
1461
+ }, v = () => {
1462
+ e.widgetKey && r.selectContainer(e.widgetKey);
1425
1463
  };
1426
- return (k, $) => (d(), C("div", {
1464
+ return ($, _) => (d(), C("div", {
1427
1465
  "data-testid": `container_${e.widgetKey}`,
1428
1466
  "data-change": "asd",
1429
- class: h(w.value)
1467
+ class: h(m.value)
1430
1468
  }, [
1431
1469
  o("div", {
1432
1470
  class: h(c.value)
1433
1471
  }, [
1434
1472
  o("div", {
1435
1473
  class: "widget-title-wrapper w-full flex whitespace-nowrap",
1436
- onClick: T(y, ["stop"])
1474
+ onClick: j(v, ["stop"])
1437
1475
  }, [
1438
- o("span", yt, E(e.title), 1)
1476
+ o("span", It, H(e.title), 1)
1439
1477
  ]),
1440
- o("div", xt, [
1441
- o("div", bt, [
1442
- o("div", _t, [
1443
- I(f(j), {
1478
+ o("div", Dt, [
1479
+ o("div", Wt, [
1480
+ o("div", Bt, [
1481
+ D(w(z), {
1444
1482
  "data-testid": `open-widgets-catalog-from-container_${e.title}`,
1445
1483
  isIconButton: !0,
1446
1484
  class: "whitespace-nowrap",
1447
1485
  tooltip: { placement: "top", title: "Target this Container" },
1448
- onClick: T(y, ["stop"])
1486
+ onClick: j(v, ["stop"])
1449
1487
  }, {
1450
1488
  default: B(() => [
1451
- I(f(Xe), {
1489
+ D(w(Ye), {
1452
1490
  class: h(`${P} ${e.highlight ? "text-success" : "text-disabled"}`)
1453
1491
  }, null, 8, ["class"])
1454
1492
  ]),
1455
1493
  _: 1
1456
1494
  }, 8, ["data-testid"]),
1457
- I(f(j), {
1495
+ D(w(z), {
1458
1496
  "data-testid": `move-container-left_${e.title}`,
1459
1497
  isIconButton: !0,
1460
1498
  disabled: e.index < 1,
@@ -1462,16 +1500,16 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1462
1500
  placement: "top",
1463
1501
  title: e.index < 1 ? "Already at min position" : "Move Container to the left/up"
1464
1502
  },
1465
- onClick: $[0] || ($[0] = T((D) => u(-1), ["stop"]))
1503
+ onClick: _[0] || (_[0] = j((W) => p(-1), ["stop"]))
1466
1504
  }, {
1467
1505
  default: B(() => [
1468
- I(f(ce), {
1506
+ D(w(pe), {
1469
1507
  class: h(P)
1470
1508
  })
1471
1509
  ]),
1472
1510
  _: 1
1473
1511
  }, 8, ["data-testid", "disabled", "tooltip"]),
1474
- I(f(j), {
1512
+ D(w(z), {
1475
1513
  "data-testid": `move-container-right_${e.title}`,
1476
1514
  isIconButton: !0,
1477
1515
  disabled: e.index >= e.maxIndex,
@@ -1479,23 +1517,23 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1479
1517
  placement: "top",
1480
1518
  title: e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"
1481
1519
  },
1482
- onClick: $[1] || ($[1] = T((D) => u(1), ["stop"]))
1520
+ onClick: _[1] || (_[1] = j((W) => p(1), ["stop"]))
1483
1521
  }, {
1484
1522
  default: B(() => [
1485
- I(f(ue), {
1523
+ D(w(he), {
1486
1524
  class: h(P)
1487
1525
  })
1488
1526
  ]),
1489
1527
  _: 1
1490
1528
  }, 8, ["data-testid", "disabled", "tooltip"]),
1491
- I(f(j), {
1529
+ D(w(z), {
1492
1530
  "data-testid": `remove-container_${e.title}`,
1493
1531
  isIconButton: !0,
1494
1532
  tooltip: { placement: "top", title: "Remove Container" },
1495
- onClick: T(g, ["stop"])
1533
+ onClick: j(y, ["stop"])
1496
1534
  }, {
1497
1535
  default: B(() => [
1498
- I(f(ge), {
1536
+ D(w(me), {
1499
1537
  class: h(P)
1500
1538
  })
1501
1539
  ]),
@@ -1509,11 +1547,11 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1509
1547
  "data-testid": `childrenwrapper_${e.widgetKey}`,
1510
1548
  class: "widget-container-inner"
1511
1549
  }, [
1512
- z(k.$slots, "default")
1513
- ], 8, kt)
1514
- ], 10, wt));
1550
+ A($.$slots, "default")
1551
+ ], 8, Kt)
1552
+ ], 10, $t));
1515
1553
  }
1516
- }), hs = /* @__PURE__ */ b({
1554
+ }), ws = /* @__PURE__ */ b({
1517
1555
  __name: "WidgetContainerRow",
1518
1556
  props: {
1519
1557
  index: {},
@@ -1536,22 +1574,22 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1536
1574
  },
1537
1575
  emits: ["removeClick", "moveClick", "selectContainer"],
1538
1576
  setup(t, { emit: s }) {
1539
- const e = t, i = s, { removeClick: n, moveClick: a, selectContainer: r } = Q(i), w = p(() => {
1540
- const { direction: c, ...g } = e;
1541
- return g;
1577
+ const e = t, n = s, { removeClick: r, moveClick: i, selectContainer: l } = Q(n), m = f(() => {
1578
+ const { direction: c, ...y } = e;
1579
+ return y;
1542
1580
  });
1543
- return (c, g) => (d(), K(me, G({ direction: "row" }, w.value, {
1544
- onRemoveClick: f(n),
1545
- onMoveClick: f(a),
1546
- onSelectContainer: f(r)
1581
+ return (c, y) => (d(), S(ve, G({ direction: "row" }, m.value, {
1582
+ onRemoveClick: w(r),
1583
+ onMoveClick: w(i),
1584
+ onSelectContainer: w(l)
1547
1585
  }), {
1548
1586
  default: B(() => [
1549
- z(c.$slots, "default")
1587
+ A(c.$slots, "default")
1550
1588
  ]),
1551
1589
  _: 3
1552
1590
  }, 16, ["onRemoveClick", "onMoveClick", "onSelectContainer"]));
1553
1591
  }
1554
- }), ps = /* @__PURE__ */ b({
1592
+ }), ys = /* @__PURE__ */ b({
1555
1593
  __name: "WidgetContainerLarge",
1556
1594
  props: {
1557
1595
  index: {},
@@ -1574,22 +1612,22 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1574
1612
  },
1575
1613
  emits: ["removeClick", "moveClick", "selectContainer"],
1576
1614
  setup(t, { emit: s }) {
1577
- const e = t, i = s, { removeClick: n, moveClick: a, selectContainer: r } = Q(i), w = p(() => {
1578
- const { size: c, ...g } = e;
1579
- return g;
1615
+ const e = t, n = s, { removeClick: r, moveClick: i, selectContainer: l } = Q(n), m = f(() => {
1616
+ const { size: c, ...y } = e;
1617
+ return y;
1580
1618
  });
1581
- return (c, g) => (d(), K(me, G({ size: "large" }, w.value, {
1582
- onRemoveClick: f(n),
1583
- onMoveClick: f(a),
1584
- onSelectContainer: f(r)
1619
+ return (c, y) => (d(), S(ve, G({ size: "large" }, m.value, {
1620
+ onRemoveClick: w(r),
1621
+ onMoveClick: w(i),
1622
+ onSelectContainer: w(l)
1585
1623
  }), {
1586
1624
  default: B(() => [
1587
- z(c.$slots, "default")
1625
+ A(c.$slots, "default")
1588
1626
  ]),
1589
1627
  _: 3
1590
1628
  }, 16, ["onRemoveClick", "onMoveClick", "onSelectContainer"]));
1591
1629
  }
1592
- }), Dt = { class: "w-full" }, Wt = { class: "flex flex-row items-center gap-2 justify-between" }, Bt = { class: "font-bold" }, Kt = { class: "text-xs" }, Mt = { class: "flex flex-col gap-2 text-xs" }, J = /* @__PURE__ */ b({
1630
+ }), Et = { class: "w-full" }, Nt = { class: "flex flex-row items-center gap-2 justify-between" }, Lt = { class: "font-bold" }, Tt = { class: "text-xs" }, jt = { class: "flex flex-col gap-2 text-xs" }, ee = /* @__PURE__ */ b({
1593
1631
  __name: "WidgetListItem",
1594
1632
  props: {
1595
1633
  widgetKey: {},
@@ -1598,79 +1636,79 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1598
1636
  },
1599
1637
  emits: ["addWidget"],
1600
1638
  setup(t, { emit: s }) {
1601
- const e = t, i = s, n = e.metaData?.icon || Qe, a = e.metaData?.name || "Unknown", r = e.metaData?.description || "---", w = e.metaData?.noDuplicatedWidgets || !1, c = p(() => w && e?.alreadyAdded), g = p(() => L(`
1639
+ const e = t, n = s, r = e.metaData?.icon || Je, i = e.metaData?.name || "Unknown", l = e.metaData?.description || "---", m = e.metaData?.noDuplicatedWidgets || !1, c = f(() => m && e?.alreadyAdded), y = f(() => L(`
1602
1640
  flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
1603
1641
  ${c.value ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
1604
- `)), u = () => {
1605
- c.value || i("addWidget");
1642
+ `)), p = () => {
1643
+ c.value || n("addWidget");
1606
1644
  };
1607
- return (y, k) => (d(), C("div", {
1608
- class: h(g.value),
1645
+ return (v, $) => (d(), C("div", {
1646
+ class: h(y.value),
1609
1647
  style: { width: "calc(100% - 1rem)" },
1610
- onClick: u
1648
+ onClick: p
1611
1649
  }, [
1612
- (d(), K(ae(f(n)), { class: "" })),
1613
- o("div", Dt, [
1614
- o("div", Wt, [
1615
- o("span", Bt, E(f(a)), 1),
1616
- o("div", Kt, E(c.value ? "(Added)" : ""), 1)
1650
+ (d(), S(le(w(r)), { class: "" })),
1651
+ o("div", Et, [
1652
+ o("div", Nt, [
1653
+ o("span", Lt, H(w(i)), 1),
1654
+ o("div", Tt, H(c.value ? "(Added)" : ""), 1)
1617
1655
  ]),
1618
- o("div", Mt, [
1619
- o("div", null, E(f(r)), 1)
1656
+ o("div", jt, [
1657
+ o("div", null, H(w(l)), 1)
1620
1658
  ])
1621
1659
  ])
1622
1660
  ], 2));
1623
1661
  }
1624
- }), St = { class: "w-full" }, Et = { class: "flex flex-row items-center gap-2 justify-between" }, Lt = { class: "font-bold" }, Nt = { class: "flex flex-col gap-2 text-xs" }, Tt = /* @__PURE__ */ b({
1662
+ }), zt = { class: "w-full" }, Ht = { class: "flex flex-row items-center gap-2 justify-between" }, At = { class: "font-bold" }, Rt = { class: "flex flex-col gap-2 text-xs" }, Vt = /* @__PURE__ */ b({
1625
1663
  __name: "SettingListItem",
1626
1664
  props: {
1627
1665
  item: {}
1628
1666
  },
1629
1667
  emits: ["settingChanged"],
1630
1668
  setup(t, { emit: s }) {
1631
- const e = t, i = s, n = e.item.name || "Unknown", a = e.item.description || "---", r = L(`
1669
+ const e = t, n = s, r = e.item.name || "Unknown", i = e.item.description || "---", l = L(`
1632
1670
  flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
1633
- `), w = (g) => {
1634
- i("settingChanged", {
1671
+ `), m = (y) => {
1672
+ n("settingChanged", {
1635
1673
  ...e.item,
1636
- value: g || ""
1674
+ value: y || ""
1637
1675
  });
1638
- }, c = (g) => {
1639
- const u = De.incrementOrDecrementValue(e.item, g);
1640
- i("settingChanged", u);
1676
+ }, c = (y) => {
1677
+ const p = Be.incrementOrDecrementValue(e.item, y);
1678
+ n("settingChanged", p);
1641
1679
  };
1642
- return (g, u) => (d(), C("div", {
1643
- class: h(f(r)),
1680
+ return (y, p) => (d(), C("div", {
1681
+ class: h(w(l)),
1644
1682
  style: { width: "calc(100% - 1rem)" }
1645
1683
  }, [
1646
- o("div", St, [
1647
- o("div", Et, [
1648
- o("span", Lt, E(f(n)), 1)
1684
+ o("div", zt, [
1685
+ o("div", Ht, [
1686
+ o("span", At, H(w(r)), 1)
1649
1687
  ]),
1650
- o("div", Nt, [
1651
- o("div", null, E(f(a)), 1)
1688
+ o("div", Rt, [
1689
+ o("div", null, H(w(i)), 1)
1652
1690
  ]),
1653
1691
  o("div", null, [
1654
- u[2] || (u[2] = re(" Value: ", -1)),
1655
- I(f(he), {
1692
+ p[2] || (p[2] = ce(" Value: ", -1)),
1693
+ D(w(fe), {
1656
1694
  label: "Filter...",
1657
1695
  size: "small",
1658
1696
  class: "w-full",
1659
1697
  modelValue: t.item.value,
1660
- "onUpdate:modelValue": w,
1698
+ "onUpdate:modelValue": m,
1661
1699
  onKeydown: [
1662
- u[0] || (u[0] = oe(T((y) => c(1), ["prevent"]), ["up"])),
1663
- u[1] || (u[1] = oe(T((y) => c(-1), ["prevent"]), ["down"]))
1700
+ p[0] || (p[0] = ie(j((v) => c(1), ["prevent"]), ["up"])),
1701
+ p[1] || (p[1] = ie(j((v) => c(-1), ["prevent"]), ["down"]))
1664
1702
  ]
1665
1703
  }, null, 8, ["modelValue"])
1666
1704
  ])
1667
1705
  ])
1668
1706
  ], 2));
1669
1707
  }
1670
- }), jt = { class: "flex flex-col gap-2 p-2" }, zt = { class: "flex flex-row gap-2 justify-between" }, At = { class: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab" }, Ht = ["title"], Rt = { class: "flex flex-row gap-2 items-center" }, Vt = { class: "flex border-b border-gray-200" }, Ut = { class: "flex items-center justify-between gap-1 w-full" }, Ft = {
1708
+ }), Ut = { class: "flex flex-col gap-2 p-2" }, Ft = { class: "flex flex-row gap-2 justify-between" }, Ot = { class: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab" }, Pt = ["title"], Gt = { class: "flex flex-row gap-2 items-center" }, qt = { class: "flex border-b border-gray-200" }, Zt = { class: "flex items-center justify-between gap-1 w-full" }, Xt = {
1671
1709
  class: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
1672
1710
  style: { "max-height": "360px" }
1673
- }, Pt = { class: "mt-4 w-full flex flex-row justify-end pt-1" }, ms = /* @__PURE__ */ b({
1711
+ }, Qt = { class: "mt-4 w-full flex flex-row justify-end pt-1" }, xs = /* @__PURE__ */ b({
1674
1712
  __name: "WidgetsCatalogFlyout",
1675
1713
  props: {
1676
1714
  targetContainerKey: {},
@@ -1685,49 +1723,49 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1685
1723
  onDoneClick: { type: Function }
1686
1724
  },
1687
1725
  setup(t) {
1688
- const s = t, e = (m, l) => [
1689
- ...l.widgets.filter((V) => V.indexOf("Container") === -1),
1690
- ...l.childWidgetsConfig.map((V) => V.widgetKey)
1691
- ].includes(m), i = R("Editing"), n = R(0), a = R(""), r = R(!1), w = p(() => Array.from(s.widgetsCatalog.keys())), c = p(() => w.value.map((m) => ({
1692
- widgetKey: m,
1693
- metaData: We(m, s.widgetsCatalog)
1694
- }))), g = p(() => c.value.filter(
1695
- (m) => m.metaData.categories.includes("Widget") && D(m.metaData)
1696
- )), u = p(() => c.value.filter(
1697
- (m) => m.metaData.categories.includes("Chart") && D(m.metaData)
1698
- )), y = p(() => c.value.filter(
1699
- (m) => m.metaData.categories.includes("Container") && D(m.metaData)
1700
- )), k = p(() => !!s.targetContainerKey), $ = (m) => {
1701
- a.value = m;
1702
- }, D = (m) => {
1703
- const l = a.value.trim().toLowerCase();
1704
- return l.length < 1 ? !0 : m.name.trim().toLowerCase().includes(l) || m.description.toLowerCase().includes(l);
1705
- }, _ = (m) => {
1706
- const l = a.value.trim().toLowerCase();
1707
- return l.length < 1 ? !0 : m.name.trim().toLowerCase().includes(l) || m.description.toLowerCase().includes(l);
1708
- }, W = (m) => L(
1726
+ const s = t, e = (u, a) => [
1727
+ ...a.widgets.filter((V) => V.indexOf("Container") === -1),
1728
+ ...a.childWidgetsConfig.map((V) => V.widgetKey)
1729
+ ].includes(u), n = R("Editing"), r = R(0), i = R(""), l = R(!1), m = f(() => Array.from(s.widgetsCatalog.keys())), c = f(() => m.value.map((u) => ({
1730
+ widgetKey: u,
1731
+ metaData: Ke(u, s.widgetsCatalog)
1732
+ }))), y = f(() => c.value.filter(
1733
+ (u) => u.metaData.categories.includes("Widget") && W(u.metaData)
1734
+ )), p = f(() => c.value.filter(
1735
+ (u) => u.metaData.categories.includes("Chart") && W(u.metaData)
1736
+ )), v = f(() => c.value.filter(
1737
+ (u) => u.metaData.categories.includes("Container") && W(u.metaData)
1738
+ )), $ = f(() => !!s.targetContainerKey), _ = (u) => {
1739
+ i.value = u;
1740
+ }, W = (u) => {
1741
+ const a = i.value.trim().toLowerCase();
1742
+ return a.length < 1 ? !0 : u.name.trim().toLowerCase().includes(a) || u.description.toLowerCase().includes(a);
1743
+ }, K = (u) => {
1744
+ const a = i.value.trim().toLowerCase();
1745
+ return a.length < 1 ? !0 : u.name.trim().toLowerCase().includes(a) || u.description.toLowerCase().includes(a);
1746
+ }, T = (u) => L(
1709
1747
  "px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
1710
- m === n.value ? "text-primary border-primary" : ""
1711
- ), H = (m) => {
1712
- k.value ? s.addWidget(m, s.targetContainerKey) : s.addWidget(m);
1713
- }, N = (m) => {
1714
- const l = (s.currentDashboardConfig.cssSettings || []).map((v) => v.key === m.key ? m : v);
1715
- s.onSettingItemsUpdated(l);
1716
- }, A = (m) => {
1717
- r.value = m;
1748
+ u === r.value ? "text-primary border-primary" : ""
1749
+ ), k = (u) => {
1750
+ $.value ? s.addWidget(u, s.targetContainerKey) : s.addWidget(u);
1751
+ }, I = (u) => {
1752
+ const a = (s.currentDashboardConfig.cssSettings || []).map((g) => g.key === u.key ? u : g);
1753
+ s.onSettingItemsUpdated(a);
1754
+ }, M = (u) => {
1755
+ l.value = u;
1718
1756
  };
1719
- return ke(
1757
+ return Ie(
1720
1758
  () => s.targetContainerKey,
1721
- (m) => {
1722
- if (m) {
1723
- n.value = 0;
1724
- const l = de(m);
1725
- i.value = `Editing ${l}`;
1759
+ (u) => {
1760
+ if (u) {
1761
+ r.value = 0;
1762
+ const a = ue(u);
1763
+ n.value = `Editing ${a}`;
1726
1764
  } else
1727
- i.value = "Editing Dashboard";
1765
+ n.value = "Editing Dashboard";
1728
1766
  },
1729
1767
  { immediate: !0 }
1730
- ), (m, l) => (d(), K(f(it), {
1768
+ ), (u, a) => (d(), S(w(at), {
1731
1769
  testId: "dashboard-catalog-flyout",
1732
1770
  className: "bg-body content-body bg-opacity-70 border-2 border-primary",
1733
1771
  style: {
@@ -1737,26 +1775,26 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1737
1775
  minHeight: "360px",
1738
1776
  backdropFilter: "blur(8px)"
1739
1777
  },
1740
- onDraggingChange: A
1778
+ onDraggingChange: M
1741
1779
  }, {
1742
1780
  default: B(() => [
1743
- o("div", jt, [
1744
- o("div", zt, [
1745
- o("div", At, [
1746
- r.value ? (d(), K(f(Ze), {
1781
+ o("div", Ut, [
1782
+ o("div", Ft, [
1783
+ o("div", Ot, [
1784
+ l.value ? (d(), S(w(Qe), {
1747
1785
  key: 0,
1748
1786
  class: "size-5"
1749
- })) : (d(), K(f(qe), {
1787
+ })) : (d(), S(w(Xe), {
1750
1788
  key: 1,
1751
1789
  class: "size-5"
1752
1790
  })),
1753
1791
  o("h2", {
1754
1792
  class: "flex-1 text-base margin-0 capitalize",
1755
- title: k.value ? i.value : `Editing dashboard: ${t.currentDashboardConfig.dashboardName}`
1756
- }, E(i.value), 9, Ht)
1793
+ title: $.value ? n.value : `Editing dashboard: ${t.currentDashboardConfig.dashboardName}`
1794
+ }, H(n.value), 9, Pt)
1757
1795
  ]),
1758
- o("div", Rt, [
1759
- I(f(j), {
1796
+ o("div", Gt, [
1797
+ D(w(z), {
1760
1798
  "data-testid": "undo-dashboard-config-change",
1761
1799
  isIconButton: !0,
1762
1800
  tooltip: {
@@ -1764,14 +1802,14 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1764
1802
  title: "Undo"
1765
1803
  },
1766
1804
  disabled: t.undoStatus.isUndoDisabled,
1767
- onClick: l[0] || (l[0] = (v) => t.onUndoOrRedo("Undo"))
1805
+ onClick: a[0] || (a[0] = (g) => t.onUndoOrRedo("Undo"))
1768
1806
  }, {
1769
1807
  default: B(() => [
1770
- I(f(Oe), { class: "size-5" })
1808
+ D(w(qe), { class: "size-5" })
1771
1809
  ]),
1772
1810
  _: 1
1773
1811
  }, 8, ["disabled"]),
1774
- I(f(j), {
1812
+ D(w(z), {
1775
1813
  "data-testid": "redo-dashboard-config-change",
1776
1814
  isIconButton: !0,
1777
1815
  tooltip: {
@@ -1779,14 +1817,14 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1779
1817
  title: "Redo"
1780
1818
  },
1781
1819
  disabled: t.undoStatus.isRedoDisabled,
1782
- onClick: l[1] || (l[1] = (v) => t.onUndoOrRedo("Redo"))
1820
+ onClick: a[1] || (a[1] = (g) => t.onUndoOrRedo("Redo"))
1783
1821
  }, {
1784
1822
  default: B(() => [
1785
- I(f(Ge), { class: "size-5" })
1823
+ D(w(Ze), { class: "size-5" })
1786
1824
  ]),
1787
1825
  _: 1
1788
1826
  }, 8, ["disabled"]),
1789
- I(f(j), {
1827
+ D(w(z), {
1790
1828
  "data-testid": "reset-dashboard-to-default",
1791
1829
  isIconButton: !0,
1792
1830
  tooltip: {
@@ -1796,75 +1834,75 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1796
1834
  onClick: t.onResetToDefaultDashboardClick
1797
1835
  }, {
1798
1836
  default: B(() => [
1799
- I(f(Pe), { class: "size-5" })
1837
+ D(w(Ge), { class: "size-5" })
1800
1838
  ]),
1801
1839
  _: 1
1802
1840
  }, 8, ["onClick"])
1803
1841
  ])
1804
1842
  ]),
1805
- o("div", Vt, [
1843
+ o("div", qt, [
1806
1844
  o("button", {
1807
- onClick: l[2] || (l[2] = (v) => n.value = 0),
1808
- class: h(W(0))
1845
+ onClick: a[2] || (a[2] = (g) => r.value = 0),
1846
+ class: h(T(0))
1809
1847
  }, "Widgets", 2),
1810
1848
  o("button", {
1811
- onClick: l[3] || (l[3] = (v) => n.value = 1),
1812
- class: h(W(1))
1849
+ onClick: a[3] || (a[3] = (g) => r.value = 1),
1850
+ class: h(T(1))
1813
1851
  }, "Charts", 2),
1814
- k.value ? O("", !0) : (d(), C("button", {
1852
+ $.value ? Y("", !0) : (d(), C("button", {
1815
1853
  key: 0,
1816
- onClick: l[4] || (l[4] = (v) => n.value = 2),
1817
- class: h(W(2))
1854
+ onClick: a[4] || (a[4] = (g) => r.value = 2),
1855
+ class: h(T(2))
1818
1856
  }, " Containers ", 2)),
1819
- k.value ? O("", !0) : (d(), C("button", {
1857
+ $.value ? Y("", !0) : (d(), C("button", {
1820
1858
  key: 1,
1821
- onClick: l[5] || (l[5] = (v) => n.value = 3),
1822
- class: h(W(3))
1859
+ onClick: a[5] || (a[5] = (g) => r.value = 3),
1860
+ class: h(T(3))
1823
1861
  }, [
1824
- I(f(Fe))
1862
+ D(w(Pe))
1825
1863
  ], 2))
1826
1864
  ]),
1827
- o("div", Ut, [
1828
- I(f(he), {
1865
+ o("div", Zt, [
1866
+ D(w(fe), {
1829
1867
  label: "Filter...",
1830
1868
  size: "small",
1831
1869
  class: "w-full",
1832
- modelValue: a.value,
1870
+ modelValue: i.value,
1833
1871
  "onUpdate:modelValue": [
1834
- l[6] || (l[6] = (v) => a.value = v),
1835
- $
1872
+ a[6] || (a[6] = (g) => i.value = g),
1873
+ _
1836
1874
  ]
1837
1875
  }, null, 8, ["modelValue"])
1838
1876
  ]),
1839
- o("div", Ft, [
1840
- n.value === 0 ? (d(!0), C(U, { key: 0 }, F(g.value, (v) => (d(), K(J, {
1841
- key: v.widgetKey,
1842
- widgetKey: v.widgetKey,
1843
- metaData: v.metaData,
1844
- alreadyAdded: e(v.widgetKey, t.currentDashboardConfig),
1845
- onAddWidget: () => H(v.widgetKey)
1846
- }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : n.value === 1 ? (d(!0), C(U, { key: 1 }, F(u.value, (v) => (d(), K(J, {
1847
- key: v.widgetKey,
1848
- widgetKey: v.widgetKey,
1849
- metaData: v.metaData,
1850
- alreadyAdded: e(v.widgetKey, t.currentDashboardConfig),
1851
- onAddWidget: () => H(v.widgetKey)
1852
- }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : n.value === 2 && !k.value ? (d(!0), C(U, { key: 2 }, F(y.value, (v) => (d(), K(J, {
1853
- key: v.widgetKey,
1854
- widgetKey: v.widgetKey,
1855
- metaData: v.metaData,
1856
- alreadyAdded: e(v.widgetKey, t.currentDashboardConfig),
1857
- onAddWidget: () => t.addContainer(v.widgetKey)
1858
- }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : n.value === 3 && !k.value ? (d(!0), C(U, { key: 3 }, F((t.currentDashboardConfig.cssSettings || []).filter(
1859
- _
1860
- ), (v) => (d(), K(Tt, {
1861
- key: v.key,
1862
- item: v,
1863
- onSettingChanged: N
1864
- }, null, 8, ["item"]))), 128)) : O("", !0)
1877
+ o("div", Xt, [
1878
+ r.value === 0 ? (d(!0), C(U, { key: 0 }, F(y.value, (g) => (d(), S(ee, {
1879
+ key: g.widgetKey,
1880
+ widgetKey: g.widgetKey,
1881
+ metaData: g.metaData,
1882
+ alreadyAdded: e(g.widgetKey, t.currentDashboardConfig),
1883
+ onAddWidget: () => k(g.widgetKey)
1884
+ }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : r.value === 1 ? (d(!0), C(U, { key: 1 }, F(p.value, (g) => (d(), S(ee, {
1885
+ key: g.widgetKey,
1886
+ widgetKey: g.widgetKey,
1887
+ metaData: g.metaData,
1888
+ alreadyAdded: e(g.widgetKey, t.currentDashboardConfig),
1889
+ onAddWidget: () => k(g.widgetKey)
1890
+ }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : r.value === 2 && !$.value ? (d(!0), C(U, { key: 2 }, F(v.value, (g) => (d(), S(ee, {
1891
+ key: g.widgetKey,
1892
+ widgetKey: g.widgetKey,
1893
+ metaData: g.metaData,
1894
+ alreadyAdded: e(g.widgetKey, t.currentDashboardConfig),
1895
+ onAddWidget: () => t.addContainer(g.widgetKey)
1896
+ }, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : r.value === 3 && !$.value ? (d(!0), C(U, { key: 3 }, F((t.currentDashboardConfig.cssSettings || []).filter(
1897
+ K
1898
+ ), (g) => (d(), S(Vt, {
1899
+ key: g.key,
1900
+ item: g,
1901
+ onSettingChanged: I
1902
+ }, null, 8, ["item"]))), 128)) : Y("", !0)
1865
1903
  ]),
1866
- o("div", Pt, [
1867
- I(f(j), {
1904
+ o("div", Qt, [
1905
+ D(w(z), {
1868
1906
  class: "bg-opacity-100",
1869
1907
  tooltip: {
1870
1908
  placement: "bottom",
@@ -1872,8 +1910,8 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1872
1910
  },
1873
1911
  onClick: t.onDoneClick
1874
1912
  }, {
1875
- default: B(() => [...l[7] || (l[7] = [
1876
- re(" Done ", -1)
1913
+ default: B(() => [...a[7] || (a[7] = [
1914
+ ce(" Done ", -1)
1877
1915
  ])]),
1878
1916
  _: 1
1879
1917
  }, 8, ["onClick"])
@@ -1885,43 +1923,43 @@ const ds = /* @__PURE__ */ pe(lt, [["render", ut]]), ls = (t) => {
1885
1923
  }
1886
1924
  });
1887
1925
  export {
1888
- Xt as AddIcon,
1889
- j as Button,
1890
- Qe as CircleQuestionMarkIcon,
1891
- Xe as CrosshairIcon,
1892
- cs as DashboardGrid,
1893
- gs as DashboardWidgetBase,
1894
- Qt as DeleteIcon,
1895
- it as DraggablePanel,
1896
- us as DynamicWidgetLoader,
1897
- Yt as EditIcon,
1898
- Jt as GridIcon,
1899
- Ze as HandGrabIcon,
1900
- qe as HandIcon,
1901
- as as ListItem,
1902
- ns as MonitorIcon,
1903
- ss as MonitorSmartphoneIcon,
1904
- ce as MoveLeftIcon,
1905
- ue as MoveRightIcon,
1906
- Ge as RedoIcon,
1907
- Fe as SettingsIcon,
1908
- et as Stack,
1909
- os as TabletSmartphoneIcon,
1910
- is as TargetIcon,
1911
- he as TextField,
1912
- Pe as TimerResetIcon,
1913
- Oe as UndoIcon,
1914
- me as WidgetContainerColumn,
1915
- ps as WidgetContainerLarge,
1916
- hs as WidgetContainerRow,
1917
- ms as WidgetsCatalogFlyout,
1918
- rs as WrapperColumnContent,
1919
- ds as WrapperColumnContentListItem,
1920
- ge as XCircleIcon,
1921
- es as ZoomInIcon,
1922
- ts as ZoomOutIcon,
1923
- ls as showToast,
1924
- qt as useDashboardStore,
1925
- Zt as useDashboardUndoService,
1926
+ ss as AddIcon,
1927
+ z as Button,
1928
+ Je as CircleQuestionMarkIcon,
1929
+ Ye as CrosshairIcon,
1930
+ fs as DashboardGrid,
1931
+ vs as DashboardWidgetBase,
1932
+ os as DeleteIcon,
1933
+ at as DraggablePanel,
1934
+ Cs as DynamicWidgetLoader,
1935
+ ns as EditIcon,
1936
+ rs as GridIcon,
1937
+ Qe as HandGrabIcon,
1938
+ Xe as HandIcon,
1939
+ gs as ListItem,
1940
+ cs as MonitorIcon,
1941
+ ds as MonitorSmartphoneIcon,
1942
+ pe as MoveLeftIcon,
1943
+ he as MoveRightIcon,
1944
+ Ze as RedoIcon,
1945
+ Pe as SettingsIcon,
1946
+ st as Stack,
1947
+ ls as TabletSmartphoneIcon,
1948
+ us as TargetIcon,
1949
+ fe as TextField,
1950
+ Ge as TimerResetIcon,
1951
+ qe as UndoIcon,
1952
+ ve as WidgetContainerColumn,
1953
+ ys as WidgetContainerLarge,
1954
+ ws as WidgetContainerRow,
1955
+ xs as WidgetsCatalogFlyout,
1956
+ ps as WrapperColumnContent,
1957
+ hs as WrapperColumnContentListItem,
1958
+ me as XCircleIcon,
1959
+ is as ZoomInIcon,
1960
+ as as ZoomOutIcon,
1961
+ ms as showToast,
1962
+ es as useDashboardStore,
1963
+ ts as useDashboardUndoService,
1926
1964
  Q as useWidgetEmits
1927
1965
  };