@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.
- package/dist/vue-dashboard.es.js +633 -595
- package/package.json +1 -1
package/dist/vue-dashboard.es.js
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { blankDashboardConfig as
|
|
3
|
-
const
|
|
4
|
-
const s = t.widgets.filter((
|
|
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
|
-
},
|
|
7
|
-
const e =
|
|
6
|
+
}, Se = (t, s) => {
|
|
7
|
+
const e = Me(t);
|
|
8
8
|
return `${s}_${e}`;
|
|
9
|
-
},
|
|
10
|
-
const { dashboardConfig: s, widgetKey: e, parentWidgetKey:
|
|
11
|
-
if (
|
|
12
|
-
if (
|
|
13
|
-
(
|
|
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
|
|
20
|
+
const i = [
|
|
21
21
|
...s.childWidgetsConfig,
|
|
22
|
-
{ parentWidgetKey:
|
|
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:
|
|
29
|
+
childWidgetsConfig: i
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
} else {
|
|
33
|
-
if (
|
|
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
|
|
39
|
+
const i = [...s.widgets, e];
|
|
40
40
|
return {
|
|
41
41
|
success: !0,
|
|
42
42
|
updatedDashboardConfig: {
|
|
43
43
|
...s,
|
|
44
|
-
widgets:
|
|
44
|
+
widgets: i
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
},
|
|
48
|
+
}, Ne = (t, s, e) => {
|
|
49
49
|
if ((e || "").trim().length > 0) {
|
|
50
|
-
const
|
|
50
|
+
const n = t.childWidgetsConfig.filter(
|
|
51
51
|
(c) => c.parentWidgetKey !== e
|
|
52
|
-
),
|
|
52
|
+
), r = t.childWidgetsConfig.filter(
|
|
53
53
|
(c) => c.parentWidgetKey === e && c.widgetKey !== s
|
|
54
|
-
),
|
|
55
|
-
let
|
|
54
|
+
), i = [...n, ...r];
|
|
55
|
+
let l = {
|
|
56
56
|
...t,
|
|
57
|
-
childWidgetsConfig:
|
|
57
|
+
childWidgetsConfig: i
|
|
58
58
|
};
|
|
59
|
-
return `${s}`.includes("Container") && (
|
|
59
|
+
return `${s}`.includes("Container") && (l = De(l)), {
|
|
60
60
|
success: !0,
|
|
61
|
-
updatedDashboardConfig:
|
|
61
|
+
updatedDashboardConfig: l
|
|
62
62
|
};
|
|
63
63
|
} else {
|
|
64
|
-
const
|
|
65
|
-
(
|
|
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:
|
|
72
|
-
childWidgetsConfig:
|
|
71
|
+
widgets: n,
|
|
72
|
+
childWidgetsConfig: r
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
},
|
|
77
|
-
if ((
|
|
78
|
-
const
|
|
79
|
-
(
|
|
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
|
|
82
|
-
(
|
|
81
|
+
let i = t.childWidgetsConfig.filter(
|
|
82
|
+
(p) => p.parentWidgetKey === n
|
|
83
83
|
);
|
|
84
|
-
const
|
|
85
|
-
let
|
|
86
|
-
if (
|
|
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 = [...
|
|
93
|
-
return c.splice(
|
|
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: [...
|
|
97
|
+
childWidgetsConfig: [...r, ...c]
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
100
|
} else {
|
|
101
|
-
const
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
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
|
|
110
|
-
return
|
|
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:
|
|
114
|
+
widgets: m
|
|
115
115
|
}
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
|
-
},
|
|
118
|
+
}, Te = () => ({
|
|
119
119
|
isLoading: !1,
|
|
120
120
|
// Start uninitialized/not loading
|
|
121
121
|
isEditing: !1,
|
|
122
|
-
allDashboardConfigs: [
|
|
123
|
-
currentDashboardConfig:
|
|
124
|
-
}), x =
|
|
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] ||
|
|
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 =
|
|
152
|
+
const s = Ee({
|
|
153
153
|
dashboardConfig: x.currentDashboardConfig,
|
|
154
154
|
...t
|
|
155
155
|
}), e = [
|
|
156
156
|
...x.allDashboardConfigs.filter(
|
|
157
|
-
(
|
|
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 =
|
|
167
|
+
const e = Ne(x.currentDashboardConfig, t, s), n = [
|
|
168
168
|
...x.allDashboardConfigs.filter(
|
|
169
|
-
(
|
|
169
|
+
(r) => r.dashboardId !== e.updatedDashboardConfig.dashboardId
|
|
170
170
|
),
|
|
171
171
|
e.updatedDashboardConfig
|
|
172
172
|
];
|
|
173
|
-
return e.success && (x.allDashboardConfigs =
|
|
173
|
+
return e.success && (x.allDashboardConfigs = n, x.currentDashboardConfig = e.updatedDashboardConfig), {
|
|
174
174
|
...e,
|
|
175
|
-
allUpdatedDashboardConfigs:
|
|
175
|
+
allUpdatedDashboardConfigs: n
|
|
176
176
|
};
|
|
177
177
|
},
|
|
178
178
|
moveWidget: (t, s, e) => {
|
|
179
|
-
const
|
|
179
|
+
const n = Le(x.currentDashboardConfig, t, s, e), r = [
|
|
180
180
|
...x.allDashboardConfigs.filter(
|
|
181
|
-
(
|
|
181
|
+
(i) => i.dashboardId !== n.updatedDashboardConfig.dashboardId
|
|
182
182
|
),
|
|
183
|
-
|
|
183
|
+
n.updatedDashboardConfig
|
|
184
184
|
];
|
|
185
|
-
return
|
|
186
|
-
...
|
|
187
|
-
allUpdatedDashboardConfigs:
|
|
185
|
+
return n.success && (x.allDashboardConfigs = r, x.currentDashboardConfig = n.updatedDashboardConfig), {
|
|
186
|
+
...n,
|
|
187
|
+
allUpdatedDashboardConfigs: r
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
|
-
},
|
|
191
|
-
setIsLoading: (t) =>
|
|
192
|
-
setIsEditing: (t) => (t ||
|
|
193
|
-
setTargetContainerKey: (t) =>
|
|
194
|
-
setAllDashboardConfigs: (t) =>
|
|
195
|
-
setCurrentDashboardConfig: (t) =>
|
|
196
|
-
addDashboardConfig: (t) =>
|
|
197
|
-
deleteDashboardConfigById: (t) =>
|
|
198
|
-
selectDashboardById: (t) =>
|
|
199
|
-
addWidget: (t) =>
|
|
200
|
-
removeWidget: (t, s) =>
|
|
201
|
-
moveWidget: (t, s, e) =>
|
|
202
|
-
},
|
|
203
|
-
getNextContainerKey: (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
|
-
},
|
|
209
|
-
isLoading:
|
|
210
|
-
isEditing:
|
|
211
|
-
targetContainerKey:
|
|
212
|
-
currentDashboardConfig:
|
|
213
|
-
allDashboardConfigs:
|
|
214
|
-
const e = t.dashboardId === "default",
|
|
215
|
-
return e && !
|
|
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
|
-
},
|
|
218
|
-
...
|
|
219
|
-
actions:
|
|
220
|
-
getters:
|
|
221
|
-
computed:
|
|
222
|
-
},
|
|
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) =>
|
|
227
|
-
|
|
228
|
-
},
|
|
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 (
|
|
231
|
-
|
|
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),
|
|
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(
|
|
248
|
-
|
|
249
|
-
|
|
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
|
-
|
|
252
|
-
|
|
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
|
-
},
|
|
255
|
-
const
|
|
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:
|
|
258
|
-
isRedoDisabled:
|
|
257
|
+
isUndoDisabled: n,
|
|
258
|
+
isRedoDisabled: r,
|
|
259
259
|
// Optional debugging fields
|
|
260
260
|
_currentIndex: s,
|
|
261
261
|
_historyLength: e
|
|
262
262
|
};
|
|
263
|
-
},
|
|
264
|
-
initializeHistoryForDashboard:
|
|
263
|
+
}, Oe = f(() => ge()), ts = () => ({
|
|
264
|
+
initializeHistoryForDashboard: Ae,
|
|
265
265
|
resetAllHistory: () => {
|
|
266
|
-
|
|
266
|
+
E.undoHistory = {}, E.historyIndex = {};
|
|
267
267
|
},
|
|
268
|
-
addUndoEntry:
|
|
269
|
-
removeUndoHistoryForDashboard:
|
|
270
|
-
getPreviousChanges:
|
|
271
|
-
getNextChanges:
|
|
272
|
-
computedUndoStatus:
|
|
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:
|
|
274
|
+
getUndoStatus: ge,
|
|
275
275
|
// for unit tests only
|
|
276
276
|
// Expose reactive state for debugging or advanced external use (optional)
|
|
277
|
-
historyState:
|
|
277
|
+
historyState: we(E)
|
|
278
278
|
});
|
|
279
279
|
function Q(t) {
|
|
280
280
|
return {
|
|
281
|
-
removeClick: (
|
|
282
|
-
t("removeClick",
|
|
281
|
+
removeClick: (r, i) => {
|
|
282
|
+
t("removeClick", r, i);
|
|
283
283
|
},
|
|
284
|
-
moveClick: (
|
|
285
|
-
t("moveClick",
|
|
284
|
+
moveClick: (r, i, l) => {
|
|
285
|
+
t("moveClick", r, i, l);
|
|
286
286
|
},
|
|
287
|
-
selectContainer: (
|
|
288
|
-
t("selectContainer",
|
|
287
|
+
selectContainer: (r) => {
|
|
288
|
+
t("selectContainer", r);
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
}
|
|
292
|
-
const
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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
|
-
}),
|
|
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,
|
|
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
|
-
]),
|
|
929
|
-
const c = e.isIconButton || !1,
|
|
930
|
-
let
|
|
931
|
-
|
|
932
|
-
const
|
|
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
|
-
|
|
937
|
-
|
|
936
|
+
v ? "text-disabled" : `text-${y} hover:brightness-110 cursor-pointer`,
|
|
937
|
+
$ || ""
|
|
938
938
|
);
|
|
939
|
-
const
|
|
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 (
|
|
947
|
-
|
|
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
|
-
|
|
950
|
-
let
|
|
951
|
-
|
|
952
|
-
const V =
|
|
953
|
-
|
|
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
|
|
956
|
-
}),
|
|
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
|
-
})),
|
|
958
|
+
})), m = (c) => {
|
|
959
959
|
if (e.disabled) {
|
|
960
960
|
c.preventDefault();
|
|
961
961
|
return;
|
|
962
962
|
}
|
|
963
|
-
|
|
963
|
+
n("click", c);
|
|
964
964
|
};
|
|
965
|
-
return (c,
|
|
965
|
+
return (c, y) => (d(), C("button", {
|
|
966
966
|
type: "button",
|
|
967
|
-
class: h(
|
|
968
|
-
style:
|
|
967
|
+
class: h(i.value),
|
|
968
|
+
style: oe(l.value),
|
|
969
969
|
title: t.tooltip?.title,
|
|
970
970
|
disabled: t.disabled,
|
|
971
|
-
onClick:
|
|
971
|
+
onClick: j(m, ["stop"])
|
|
972
972
|
}, [
|
|
973
|
-
|
|
974
|
-
], 14,
|
|
973
|
+
A(c.$slots, "default")
|
|
974
|
+
], 14, et));
|
|
975
975
|
}
|
|
976
|
-
}),
|
|
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 =
|
|
986
|
-
const { testId:
|
|
987
|
-
return
|
|
988
|
-
}),
|
|
989
|
-
return (
|
|
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:
|
|
991
|
+
class: n.value
|
|
992
992
|
}, e.value), [
|
|
993
|
-
|
|
994
|
-
], 16,
|
|
993
|
+
A(r.$slots, "default")
|
|
994
|
+
], 16, tt));
|
|
995
995
|
}
|
|
996
|
-
}),
|
|
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 =
|
|
1007
|
-
const { classNames:
|
|
1006
|
+
const s = t, e = f(() => {
|
|
1007
|
+
const { classNames: i, direction: l, innerClass: m, ...c } = s;
|
|
1008
1008
|
return c;
|
|
1009
|
-
}),
|
|
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 (
|
|
1014
|
+
return (i, l) => (d(), S(st, G({
|
|
1015
1015
|
direction: "row",
|
|
1016
|
-
class:
|
|
1016
|
+
class: n.value
|
|
1017
1017
|
}, e.value), {
|
|
1018
1018
|
default: B(() => [
|
|
1019
1019
|
o("div", {
|
|
1020
|
-
class: h(
|
|
1020
|
+
class: h(w(r))
|
|
1021
1021
|
}, [
|
|
1022
|
-
|
|
1022
|
+
A(i.$slots, "default")
|
|
1023
1023
|
], 2)
|
|
1024
1024
|
]),
|
|
1025
1025
|
_: 3
|
|
1026
1026
|
}, 16, ["class"]));
|
|
1027
1027
|
}
|
|
1028
|
-
}),
|
|
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
|
-
`,
|
|
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,
|
|
1046
|
-
|
|
1047
|
-
},
|
|
1048
|
-
return (c,
|
|
1049
|
-
class: h(
|
|
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
|
-
},
|
|
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(
|
|
1060
|
+
class: h(m.value),
|
|
1061
1061
|
"aria-label": e.label,
|
|
1062
|
-
onInput:
|
|
1063
|
-
onKeydown:
|
|
1064
|
-
}, null, 42,
|
|
1062
|
+
onInput: r,
|
|
1063
|
+
onKeydown: y[0] || (y[0] = (p) => n("keydown", p))
|
|
1064
|
+
}, null, 42, nt)
|
|
1065
1065
|
], 2));
|
|
1066
1066
|
}
|
|
1067
|
-
}),
|
|
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,
|
|
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
|
-
},
|
|
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(${
|
|
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
|
-
})),
|
|
1101
|
-
|
|
1102
|
-
},
|
|
1103
|
-
const
|
|
1104
|
-
|
|
1105
|
-
x:
|
|
1106
|
-
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
|
-
},
|
|
1109
|
-
window.removeEventListener("mousemove",
|
|
1110
|
-
|
|
1108
|
+
}, $ = () => {
|
|
1109
|
+
window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", $), setTimeout(() => {
|
|
1110
|
+
n("draggingChange", !1);
|
|
1111
1111
|
}, 100);
|
|
1112
1112
|
};
|
|
1113
|
-
return
|
|
1114
|
-
|
|
1115
|
-
}),
|
|
1116
|
-
|
|
1117
|
-
}), (
|
|
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:
|
|
1119
|
+
ref: r,
|
|
1120
1120
|
"data-testid": e.testId || "draggable-panel",
|
|
1121
1121
|
class: h(e.className),
|
|
1122
|
-
style:
|
|
1122
|
+
style: oe(y.value)
|
|
1123
1123
|
}, [
|
|
1124
|
-
|
|
1125
|
-
], 14,
|
|
1124
|
+
A(_.$slots, "default")
|
|
1125
|
+
], 14, it));
|
|
1126
1126
|
}
|
|
1127
|
-
}),
|
|
1127
|
+
}), Ce = (t, s) => {
|
|
1128
1128
|
const e = t.__vccOpts || t;
|
|
1129
|
-
for (const [
|
|
1130
|
-
e[
|
|
1129
|
+
for (const [n, r] of s)
|
|
1130
|
+
e[n] = r;
|
|
1131
1131
|
return e;
|
|
1132
|
-
},
|
|
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
|
|
1137
|
-
return d(), C("div",
|
|
1138
|
-
|
|
1136
|
+
function ct(t, s) {
|
|
1137
|
+
return d(), C("div", lt, [
|
|
1138
|
+
A(t.$slots, "default")
|
|
1139
1139
|
]);
|
|
1140
1140
|
}
|
|
1141
|
-
const
|
|
1142
|
-
function
|
|
1143
|
-
return d(), C("div",
|
|
1144
|
-
|
|
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
|
|
1147
|
+
const hs = /* @__PURE__ */ Ce(ut, [["render", pt]]), ms = (t) => {
|
|
1148
1148
|
console.warn("showToast TODO", t);
|
|
1149
|
-
},
|
|
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 = (
|
|
1158
|
-
let
|
|
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":
|
|
1161
|
-
"--bwj-dashboard-add-cols": e(
|
|
1160
|
+
"--bwj-dashboard-transform-scale": i,
|
|
1161
|
+
"--bwj-dashboard-add-cols": e(i)
|
|
1162
1162
|
};
|
|
1163
|
-
}),
|
|
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 (
|
|
1170
|
-
class: h(
|
|
1171
|
-
style:
|
|
1169
|
+
return (i, l) => (d(), C("div", {
|
|
1170
|
+
class: h(r.value),
|
|
1171
|
+
style: oe(n.value)
|
|
1172
1172
|
}, [
|
|
1173
|
-
|
|
1173
|
+
A(i.$slots, "default")
|
|
1174
1174
|
], 6));
|
|
1175
1175
|
}
|
|
1176
|
-
}),
|
|
1176
|
+
}), ht = { key: 0 }, mt = {
|
|
1177
1177
|
key: 1,
|
|
1178
|
-
class: "flex
|
|
1179
|
-
},
|
|
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 =
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
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
|
|
1209
|
-
|
|
1210
|
-
},
|
|
1211
|
-
|
|
1212
|
-
},
|
|
1213
|
-
|
|
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 (
|
|
1216
|
-
const
|
|
1217
|
-
return d(),
|
|
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
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
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
|
-
}),
|
|
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,
|
|
1285
|
-
const
|
|
1286
|
-
let
|
|
1287
|
-
return
|
|
1288
|
-
}),
|
|
1289
|
-
const
|
|
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
|
-
|
|
1293
|
-
|
|
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
|
-
}),
|
|
1296
|
-
e.widgetKey &&
|
|
1297
|
-
}, c = (
|
|
1298
|
-
e.widgetKey &&
|
|
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 (
|
|
1301
|
-
class: h(
|
|
1338
|
+
return (y, p) => (d(), C("div", {
|
|
1339
|
+
class: h(i.value)
|
|
1302
1340
|
}, [
|
|
1303
1341
|
o("div", {
|
|
1304
|
-
class: h(
|
|
1342
|
+
class: h(l.value)
|
|
1305
1343
|
}, [
|
|
1306
|
-
o("div",
|
|
1307
|
-
o("h2",
|
|
1308
|
-
|
|
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",
|
|
1311
|
-
o("div",
|
|
1312
|
-
|
|
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",
|
|
1316
|
-
|
|
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:
|
|
1362
|
+
onClick: p[0] || (p[0] = j((v) => c(-1), ["stop"]))
|
|
1325
1363
|
}, {
|
|
1326
1364
|
default: B(() => [
|
|
1327
|
-
|
|
1328
|
-
class: h(
|
|
1365
|
+
D(w(pe), {
|
|
1366
|
+
class: h(J)
|
|
1329
1367
|
})
|
|
1330
1368
|
]),
|
|
1331
1369
|
_: 1
|
|
1332
1370
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1333
|
-
|
|
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:
|
|
1379
|
+
onClick: p[1] || (p[1] = j((v) => c(1), ["stop"]))
|
|
1342
1380
|
}, {
|
|
1343
1381
|
default: B(() => [
|
|
1344
|
-
|
|
1345
|
-
class: h(
|
|
1382
|
+
D(w(he), {
|
|
1383
|
+
class: h(J)
|
|
1346
1384
|
})
|
|
1347
1385
|
]),
|
|
1348
1386
|
_: 1
|
|
1349
1387
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1350
|
-
|
|
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:
|
|
1395
|
+
onClick: j(m, ["stop"])
|
|
1358
1396
|
}, {
|
|
1359
1397
|
default: B(() => [
|
|
1360
|
-
|
|
1361
|
-
class: h(
|
|
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",
|
|
1371
|
-
|
|
1408
|
+
o("div", kt, [
|
|
1409
|
+
A(y.$slots, "default")
|
|
1372
1410
|
])
|
|
1373
1411
|
], 2));
|
|
1374
1412
|
}
|
|
1375
|
-
}),
|
|
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,
|
|
1399
|
-
const
|
|
1400
|
-
return e.highlight ?
|
|
1401
|
-
}),
|
|
1402
|
-
const
|
|
1403
|
-
let
|
|
1404
|
-
const
|
|
1405
|
-
let
|
|
1406
|
-
["large", "xlarge"].indexOf(e.size || "") > -1 && (
|
|
1407
|
-
let
|
|
1408
|
-
return
|
|
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
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
`direction-${
|
|
1416
|
-
`border ${
|
|
1417
|
-
`${
|
|
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 =
|
|
1420
|
-
e.widgetKey &&
|
|
1421
|
-
},
|
|
1422
|
-
e.widgetKey &&
|
|
1423
|
-
},
|
|
1424
|
-
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 (
|
|
1464
|
+
return ($, _) => (d(), C("div", {
|
|
1427
1465
|
"data-testid": `container_${e.widgetKey}`,
|
|
1428
1466
|
"data-change": "asd",
|
|
1429
|
-
class: h(
|
|
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:
|
|
1474
|
+
onClick: j(v, ["stop"])
|
|
1437
1475
|
}, [
|
|
1438
|
-
o("span",
|
|
1476
|
+
o("span", It, H(e.title), 1)
|
|
1439
1477
|
]),
|
|
1440
|
-
o("div",
|
|
1441
|
-
o("div",
|
|
1442
|
-
o("div",
|
|
1443
|
-
|
|
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:
|
|
1486
|
+
onClick: j(v, ["stop"])
|
|
1449
1487
|
}, {
|
|
1450
1488
|
default: B(() => [
|
|
1451
|
-
|
|
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
|
-
|
|
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:
|
|
1503
|
+
onClick: _[0] || (_[0] = j((W) => p(-1), ["stop"]))
|
|
1466
1504
|
}, {
|
|
1467
1505
|
default: B(() => [
|
|
1468
|
-
|
|
1506
|
+
D(w(pe), {
|
|
1469
1507
|
class: h(P)
|
|
1470
1508
|
})
|
|
1471
1509
|
]),
|
|
1472
1510
|
_: 1
|
|
1473
1511
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1474
|
-
|
|
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:
|
|
1520
|
+
onClick: _[1] || (_[1] = j((W) => p(1), ["stop"]))
|
|
1483
1521
|
}, {
|
|
1484
1522
|
default: B(() => [
|
|
1485
|
-
|
|
1523
|
+
D(w(he), {
|
|
1486
1524
|
class: h(P)
|
|
1487
1525
|
})
|
|
1488
1526
|
]),
|
|
1489
1527
|
_: 1
|
|
1490
1528
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1491
|
-
|
|
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:
|
|
1533
|
+
onClick: j(y, ["stop"])
|
|
1496
1534
|
}, {
|
|
1497
1535
|
default: B(() => [
|
|
1498
|
-
|
|
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
|
-
|
|
1513
|
-
], 8,
|
|
1514
|
-
], 10,
|
|
1550
|
+
A($.$slots, "default")
|
|
1551
|
+
], 8, Kt)
|
|
1552
|
+
], 10, $t));
|
|
1515
1553
|
}
|
|
1516
|
-
}),
|
|
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,
|
|
1540
|
-
const { direction: c, ...
|
|
1541
|
-
return
|
|
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,
|
|
1544
|
-
onRemoveClick:
|
|
1545
|
-
onMoveClick:
|
|
1546
|
-
onSelectContainer:
|
|
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
|
-
|
|
1587
|
+
A(c.$slots, "default")
|
|
1550
1588
|
]),
|
|
1551
1589
|
_: 3
|
|
1552
1590
|
}, 16, ["onRemoveClick", "onMoveClick", "onSelectContainer"]));
|
|
1553
1591
|
}
|
|
1554
|
-
}),
|
|
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,
|
|
1578
|
-
const { size: c, ...
|
|
1579
|
-
return
|
|
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,
|
|
1582
|
-
onRemoveClick:
|
|
1583
|
-
onMoveClick:
|
|
1584
|
-
onSelectContainer:
|
|
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
|
-
|
|
1625
|
+
A(c.$slots, "default")
|
|
1588
1626
|
]),
|
|
1589
1627
|
_: 3
|
|
1590
1628
|
}, 16, ["onRemoveClick", "onMoveClick", "onSelectContainer"]));
|
|
1591
1629
|
}
|
|
1592
|
-
}),
|
|
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,
|
|
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
|
-
`)),
|
|
1605
|
-
c.value ||
|
|
1642
|
+
`)), p = () => {
|
|
1643
|
+
c.value || n("addWidget");
|
|
1606
1644
|
};
|
|
1607
|
-
return (
|
|
1608
|
-
class: h(
|
|
1645
|
+
return (v, $) => (d(), C("div", {
|
|
1646
|
+
class: h(y.value),
|
|
1609
1647
|
style: { width: "calc(100% - 1rem)" },
|
|
1610
|
-
onClick:
|
|
1648
|
+
onClick: p
|
|
1611
1649
|
}, [
|
|
1612
|
-
(d(),
|
|
1613
|
-
o("div",
|
|
1614
|
-
o("div",
|
|
1615
|
-
o("span",
|
|
1616
|
-
o("div",
|
|
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",
|
|
1619
|
-
o("div", null,
|
|
1656
|
+
o("div", jt, [
|
|
1657
|
+
o("div", null, H(w(l)), 1)
|
|
1620
1658
|
])
|
|
1621
1659
|
])
|
|
1622
1660
|
], 2));
|
|
1623
1661
|
}
|
|
1624
|
-
}),
|
|
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,
|
|
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
|
-
`),
|
|
1634
|
-
|
|
1671
|
+
`), m = (y) => {
|
|
1672
|
+
n("settingChanged", {
|
|
1635
1673
|
...e.item,
|
|
1636
|
-
value:
|
|
1674
|
+
value: y || ""
|
|
1637
1675
|
});
|
|
1638
|
-
}, c = (
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1676
|
+
}, c = (y) => {
|
|
1677
|
+
const p = Be.incrementOrDecrementValue(e.item, y);
|
|
1678
|
+
n("settingChanged", p);
|
|
1641
1679
|
};
|
|
1642
|
-
return (
|
|
1643
|
-
class: h(
|
|
1680
|
+
return (y, p) => (d(), C("div", {
|
|
1681
|
+
class: h(w(l)),
|
|
1644
1682
|
style: { width: "calc(100% - 1rem)" }
|
|
1645
1683
|
}, [
|
|
1646
|
-
o("div",
|
|
1647
|
-
o("div",
|
|
1648
|
-
o("span",
|
|
1684
|
+
o("div", zt, [
|
|
1685
|
+
o("div", Ht, [
|
|
1686
|
+
o("span", At, H(w(r)), 1)
|
|
1649
1687
|
]),
|
|
1650
|
-
o("div",
|
|
1651
|
-
o("div", null,
|
|
1688
|
+
o("div", Rt, [
|
|
1689
|
+
o("div", null, H(w(i)), 1)
|
|
1652
1690
|
]),
|
|
1653
1691
|
o("div", null, [
|
|
1654
|
-
|
|
1655
|
-
|
|
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":
|
|
1698
|
+
"onUpdate:modelValue": m,
|
|
1661
1699
|
onKeydown: [
|
|
1662
|
-
|
|
1663
|
-
|
|
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
|
-
}),
|
|
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
|
-
},
|
|
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 = (
|
|
1689
|
-
...
|
|
1690
|
-
...
|
|
1691
|
-
].includes(
|
|
1692
|
-
widgetKey:
|
|
1693
|
-
metaData:
|
|
1694
|
-
}))),
|
|
1695
|
-
(
|
|
1696
|
-
)),
|
|
1697
|
-
(
|
|
1698
|
-
)),
|
|
1699
|
-
(
|
|
1700
|
-
)),
|
|
1701
|
-
|
|
1702
|
-
},
|
|
1703
|
-
const
|
|
1704
|
-
return
|
|
1705
|
-
},
|
|
1706
|
-
const
|
|
1707
|
-
return
|
|
1708
|
-
},
|
|
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
|
-
|
|
1711
|
-
),
|
|
1712
|
-
|
|
1713
|
-
},
|
|
1714
|
-
const
|
|
1715
|
-
s.onSettingItemsUpdated(
|
|
1716
|
-
},
|
|
1717
|
-
|
|
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
|
|
1757
|
+
return Ie(
|
|
1720
1758
|
() => s.targetContainerKey,
|
|
1721
|
-
(
|
|
1722
|
-
if (
|
|
1723
|
-
|
|
1724
|
-
const
|
|
1725
|
-
|
|
1759
|
+
(u) => {
|
|
1760
|
+
if (u) {
|
|
1761
|
+
r.value = 0;
|
|
1762
|
+
const a = ue(u);
|
|
1763
|
+
n.value = `Editing ${a}`;
|
|
1726
1764
|
} else
|
|
1727
|
-
|
|
1765
|
+
n.value = "Editing Dashboard";
|
|
1728
1766
|
},
|
|
1729
1767
|
{ immediate: !0 }
|
|
1730
|
-
), (
|
|
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:
|
|
1778
|
+
onDraggingChange: M
|
|
1741
1779
|
}, {
|
|
1742
1780
|
default: B(() => [
|
|
1743
|
-
o("div",
|
|
1744
|
-
o("div",
|
|
1745
|
-
o("div",
|
|
1746
|
-
|
|
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(),
|
|
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:
|
|
1756
|
-
},
|
|
1793
|
+
title: $.value ? n.value : `Editing dashboard: ${t.currentDashboardConfig.dashboardName}`
|
|
1794
|
+
}, H(n.value), 9, Pt)
|
|
1757
1795
|
]),
|
|
1758
|
-
o("div",
|
|
1759
|
-
|
|
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:
|
|
1805
|
+
onClick: a[0] || (a[0] = (g) => t.onUndoOrRedo("Undo"))
|
|
1768
1806
|
}, {
|
|
1769
1807
|
default: B(() => [
|
|
1770
|
-
|
|
1808
|
+
D(w(qe), { class: "size-5" })
|
|
1771
1809
|
]),
|
|
1772
1810
|
_: 1
|
|
1773
1811
|
}, 8, ["disabled"]),
|
|
1774
|
-
|
|
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:
|
|
1820
|
+
onClick: a[1] || (a[1] = (g) => t.onUndoOrRedo("Redo"))
|
|
1783
1821
|
}, {
|
|
1784
1822
|
default: B(() => [
|
|
1785
|
-
|
|
1823
|
+
D(w(Ze), { class: "size-5" })
|
|
1786
1824
|
]),
|
|
1787
1825
|
_: 1
|
|
1788
1826
|
}, 8, ["disabled"]),
|
|
1789
|
-
|
|
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
|
-
|
|
1837
|
+
D(w(Ge), { class: "size-5" })
|
|
1800
1838
|
]),
|
|
1801
1839
|
_: 1
|
|
1802
1840
|
}, 8, ["onClick"])
|
|
1803
1841
|
])
|
|
1804
1842
|
]),
|
|
1805
|
-
o("div",
|
|
1843
|
+
o("div", qt, [
|
|
1806
1844
|
o("button", {
|
|
1807
|
-
onClick:
|
|
1808
|
-
class: h(
|
|
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:
|
|
1812
|
-
class: h(
|
|
1849
|
+
onClick: a[3] || (a[3] = (g) => r.value = 1),
|
|
1850
|
+
class: h(T(1))
|
|
1813
1851
|
}, "Charts", 2),
|
|
1814
|
-
|
|
1852
|
+
$.value ? Y("", !0) : (d(), C("button", {
|
|
1815
1853
|
key: 0,
|
|
1816
|
-
onClick:
|
|
1817
|
-
class: h(
|
|
1854
|
+
onClick: a[4] || (a[4] = (g) => r.value = 2),
|
|
1855
|
+
class: h(T(2))
|
|
1818
1856
|
}, " Containers ", 2)),
|
|
1819
|
-
|
|
1857
|
+
$.value ? Y("", !0) : (d(), C("button", {
|
|
1820
1858
|
key: 1,
|
|
1821
|
-
onClick:
|
|
1822
|
-
class: h(
|
|
1859
|
+
onClick: a[5] || (a[5] = (g) => r.value = 3),
|
|
1860
|
+
class: h(T(3))
|
|
1823
1861
|
}, [
|
|
1824
|
-
|
|
1862
|
+
D(w(Pe))
|
|
1825
1863
|
], 2))
|
|
1826
1864
|
]),
|
|
1827
|
-
o("div",
|
|
1828
|
-
|
|
1865
|
+
o("div", Zt, [
|
|
1866
|
+
D(w(fe), {
|
|
1829
1867
|
label: "Filter...",
|
|
1830
1868
|
size: "small",
|
|
1831
1869
|
class: "w-full",
|
|
1832
|
-
modelValue:
|
|
1870
|
+
modelValue: i.value,
|
|
1833
1871
|
"onUpdate:modelValue": [
|
|
1834
|
-
|
|
1835
|
-
|
|
1872
|
+
a[6] || (a[6] = (g) => i.value = g),
|
|
1873
|
+
_
|
|
1836
1874
|
]
|
|
1837
1875
|
}, null, 8, ["modelValue"])
|
|
1838
1876
|
]),
|
|
1839
|
-
o("div",
|
|
1840
|
-
|
|
1841
|
-
key:
|
|
1842
|
-
widgetKey:
|
|
1843
|
-
metaData:
|
|
1844
|
-
alreadyAdded: e(
|
|
1845
|
-
onAddWidget: () =>
|
|
1846
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) :
|
|
1847
|
-
key:
|
|
1848
|
-
widgetKey:
|
|
1849
|
-
metaData:
|
|
1850
|
-
alreadyAdded: e(
|
|
1851
|
-
onAddWidget: () =>
|
|
1852
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) :
|
|
1853
|
-
key:
|
|
1854
|
-
widgetKey:
|
|
1855
|
-
metaData:
|
|
1856
|
-
alreadyAdded: e(
|
|
1857
|
-
onAddWidget: () => t.addContainer(
|
|
1858
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) :
|
|
1859
|
-
|
|
1860
|
-
), (
|
|
1861
|
-
key:
|
|
1862
|
-
item:
|
|
1863
|
-
onSettingChanged:
|
|
1864
|
-
}, null, 8, ["item"]))), 128)) :
|
|
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",
|
|
1867
|
-
|
|
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(() => [...
|
|
1876
|
-
|
|
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
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
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
|
};
|