@tenorlab/vue-dashboard 1.6.6 → 1.6.8
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/styles.css +1 -1
- package/dist/vue-dashboard.es.js +567 -580
- package/package.json +2 -2
package/dist/vue-dashboard.es.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { reactive as
|
|
2
|
-
import { blankDashboardConfig as ge, dashboardStoreUtils as
|
|
3
|
-
const
|
|
1
|
+
import { reactive as ye, computed as v, readonly as Le, defineComponent as b, openBlock as i, createElementBlock as c, normalizeClass as p, createElementVNode as o, createStaticVNode as oe, toDisplayString as S, withModifiers as j, normalizeStyle as ne, renderSlot as T, ref as U, onMounted as be, withDirectives as Pe, unref as h, createBlock as N, createCommentVNode as Z, createVNode as D, Transition as Ne, withCtx as M, vShow as ze, mergeProps as Q, onUnmounted as Te, toHandlers as pe, Fragment as q, renderList as G, shallowRef as fe, watchEffect as Ae, markRaw as te, defineAsyncComponent as je, resolveComponent as He, Suspense as Ve, resolveDynamicComponent as he, createSlots as Re, createTextVNode as _e, withKeys as ve, watch as Oe } from "vue";
|
|
2
|
+
import { blankDashboardConfig as ge, dashboardStoreUtils as se, getDistinctCssClasses as R, ensureZoomScaleIsWithinRange as Ue, parseContainerTitle as ke, dashboardSettingsUtils as Fe, getWidgetMetaFromCatalog as qe } from "./core.es.js";
|
|
3
|
+
const Ge = () => ({
|
|
4
4
|
isLoading: !1,
|
|
5
5
|
// Start uninitialized/not loading
|
|
6
6
|
isEditing: !1,
|
|
7
7
|
allDashboardConfigs: [ge],
|
|
8
8
|
currentDashboardConfig: ge
|
|
9
|
-
}),
|
|
10
|
-
setIsLoading: (t) =>
|
|
11
|
-
setIsEditing: (t) =>
|
|
12
|
-
setTargetContainerKey: (t) =>
|
|
13
|
-
setAllDashboardConfigs: (t) =>
|
|
9
|
+
}), k = ye(Ge()), O = {
|
|
10
|
+
setIsLoading: (t) => k.isLoading = t,
|
|
11
|
+
setIsEditing: (t) => k.isEditing = t,
|
|
12
|
+
setTargetContainerKey: (t) => k.targetContainerKey = t,
|
|
13
|
+
setAllDashboardConfigs: (t) => k.allDashboardConfigs = t,
|
|
14
14
|
setCurrentDashboardConfig: (t) => {
|
|
15
15
|
const s = [
|
|
16
|
-
|
|
16
|
+
...k.allDashboardConfigs.filter((e) => e.dashboardId !== t.dashboardId),
|
|
17
17
|
t
|
|
18
18
|
];
|
|
19
|
-
return
|
|
19
|
+
return k.allDashboardConfigs = s, k.currentDashboardConfig = t, s;
|
|
20
20
|
},
|
|
21
21
|
addDashboardConfig: (t) => {
|
|
22
22
|
const s = [
|
|
23
|
-
|
|
23
|
+
...k.allDashboardConfigs.filter((e) => e.dashboardId !== t.dashboardId),
|
|
24
24
|
t
|
|
25
25
|
];
|
|
26
|
-
return
|
|
26
|
+
return k.allDashboardConfigs = s, k.currentDashboardConfig = t, s;
|
|
27
27
|
},
|
|
28
28
|
deleteDashboardConfigById: (t) => {
|
|
29
|
-
const s = [
|
|
30
|
-
return
|
|
29
|
+
const s = [...k.allDashboardConfigs.filter((e) => e.dashboardId !== t)];
|
|
30
|
+
return k.allDashboardConfigs = s, k.currentDashboardConfig = s[0] || ge, s;
|
|
31
31
|
},
|
|
32
32
|
selectDashboardById: (t) => {
|
|
33
|
-
const s =
|
|
34
|
-
return s && (
|
|
33
|
+
const s = k.allDashboardConfigs.find((e) => e.dashboardId === t);
|
|
34
|
+
return s && (k.currentDashboardConfig = s), s;
|
|
35
35
|
},
|
|
36
36
|
addWidget: (t) => {
|
|
37
|
-
const s =
|
|
38
|
-
dashboardConfig:
|
|
37
|
+
const s = se.addWidget({
|
|
38
|
+
dashboardConfig: k.currentDashboardConfig,
|
|
39
39
|
...t
|
|
40
40
|
}), e = [
|
|
41
|
-
|
|
41
|
+
...k.allDashboardConfigs.filter((n) => n.dashboardId !== s.updatedDashboardConfig.dashboardId),
|
|
42
42
|
s.updatedDashboardConfig
|
|
43
43
|
];
|
|
44
|
-
return s.success && (
|
|
44
|
+
return s.success && (k.allDashboardConfigs = e, k.currentDashboardConfig = s.updatedDashboardConfig), {
|
|
45
45
|
...s,
|
|
46
46
|
allUpdatedDashboardConfigs: e
|
|
47
47
|
};
|
|
48
48
|
},
|
|
49
49
|
removeWidget: (t, s) => {
|
|
50
|
-
const e =
|
|
51
|
-
|
|
50
|
+
const e = se.removeWidget(k.currentDashboardConfig, t, s), n = [
|
|
51
|
+
...k.allDashboardConfigs.filter((a) => a.dashboardId !== e.updatedDashboardConfig.dashboardId),
|
|
52
52
|
e.updatedDashboardConfig
|
|
53
53
|
];
|
|
54
|
-
return e.success && (
|
|
54
|
+
return e.success && (k.allDashboardConfigs = n, k.currentDashboardConfig = e.updatedDashboardConfig), {
|
|
55
55
|
...e,
|
|
56
56
|
allUpdatedDashboardConfigs: n
|
|
57
57
|
};
|
|
58
58
|
},
|
|
59
59
|
moveWidget: (t, s, e) => {
|
|
60
|
-
const n =
|
|
61
|
-
|
|
60
|
+
const n = se.moveWidget(
|
|
61
|
+
k.currentDashboardConfig,
|
|
62
62
|
t,
|
|
63
63
|
s,
|
|
64
64
|
e
|
|
65
65
|
), a = [
|
|
66
|
-
|
|
66
|
+
...k.allDashboardConfigs.filter((r) => r.dashboardId !== n.updatedDashboardConfig.dashboardId),
|
|
67
67
|
n.updatedDashboardConfig
|
|
68
68
|
];
|
|
69
|
-
return n.success && (
|
|
69
|
+
return n.success && (k.allDashboardConfigs = a, k.currentDashboardConfig = n.updatedDashboardConfig), {
|
|
70
70
|
...n,
|
|
71
71
|
allUpdatedDashboardConfigs: a
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, we = {
|
|
75
75
|
setIsLoading: (t) => O.setIsLoading(t),
|
|
76
76
|
setIsEditing: (t) => (t || O.setTargetContainerKey(void 0), O.setIsEditing(t), t),
|
|
77
77
|
setTargetContainerKey: (t) => O.setTargetContainerKey(t),
|
|
@@ -83,60 +83,60 @@ const qe = () => ({
|
|
|
83
83
|
addWidget: (t) => O.addWidget(t),
|
|
84
84
|
removeWidget: (t, s) => O.removeWidget(t, s),
|
|
85
85
|
moveWidget: (t, s, e) => O.moveWidget(t, s, e)
|
|
86
|
-
}, Ge = {
|
|
87
|
-
getNextContainerKey: (t) => te.getNextContainerKey($.currentDashboardConfig, t),
|
|
88
|
-
getCurrentDashboardConfig: () => $.currentDashboardConfig,
|
|
89
|
-
getCurrentDashboardId: () => $.currentDashboardConfig.dashboardId,
|
|
90
|
-
getIsResponsive: () => $.currentDashboardConfig.responsiveGrid || !1,
|
|
91
|
-
getTargetContainerKey: () => $.targetContainerKey
|
|
92
86
|
}, Ze = {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
87
|
+
getNextContainerKey: (t) => se.getNextContainerKey(k.currentDashboardConfig, t),
|
|
88
|
+
getCurrentDashboardConfig: () => k.currentDashboardConfig,
|
|
89
|
+
getCurrentDashboardId: () => k.currentDashboardConfig.dashboardId,
|
|
90
|
+
getIsResponsive: () => k.currentDashboardConfig.responsiveGrid || !1,
|
|
91
|
+
getTargetContainerKey: () => k.targetContainerKey
|
|
92
|
+
}, Xe = {
|
|
93
|
+
isLoading: v(() => k.isLoading),
|
|
94
|
+
isEditing: v(() => k.isEditing),
|
|
95
|
+
targetContainerKey: v(() => k.targetContainerKey),
|
|
96
|
+
currentDashboardConfig: v(() => k.currentDashboardConfig),
|
|
97
|
+
allDashboardConfigs: v(() => k.allDashboardConfigs.sort((t, s) => {
|
|
98
98
|
const e = t.dashboardId === "default", n = s.dashboardId === "default";
|
|
99
99
|
return e && !n ? -1 : n && !e ? 1 : t.dashboardId.localeCompare(s.dashboardId);
|
|
100
100
|
}))
|
|
101
|
-
},
|
|
102
|
-
...
|
|
103
|
-
actions:
|
|
104
|
-
getters:
|
|
105
|
-
computed:
|
|
106
|
-
},
|
|
101
|
+
}, Qe = {
|
|
102
|
+
...we,
|
|
103
|
+
actions: we,
|
|
104
|
+
getters: Ze,
|
|
105
|
+
computed: Xe
|
|
106
|
+
}, Vs = () => Qe, V = ye({
|
|
107
107
|
currentDashboardId: "",
|
|
108
108
|
undoHistory: {},
|
|
109
109
|
historyIndex: {}
|
|
110
|
-
}),
|
|
111
|
-
|
|
112
|
-
},
|
|
110
|
+
}), re = (t) => V.undoHistory[t] || [], ae = (t) => V.historyIndex[t] ?? -1, ie = (t, s) => {
|
|
111
|
+
V.historyIndex[t] = s;
|
|
112
|
+
}, Ye = (t) => {
|
|
113
113
|
const s = t.dashboardId;
|
|
114
|
-
if (
|
|
115
|
-
|
|
114
|
+
if (V.currentDashboardId !== s) {
|
|
115
|
+
V.currentDashboardId = s;
|
|
116
116
|
const e = {
|
|
117
117
|
undoIndex: 0,
|
|
118
118
|
config: t
|
|
119
119
|
};
|
|
120
|
-
ie(s, 0),
|
|
120
|
+
ie(s, 0), V.undoHistory[s] = [e];
|
|
121
121
|
}
|
|
122
|
-
},
|
|
123
|
-
const s = t.dashboardId, e =
|
|
122
|
+
}, Je = (t) => {
|
|
123
|
+
const s = t.dashboardId, e = re(s), n = ae(s), a = e.slice(0, n + 1), r = {
|
|
124
124
|
undoIndex: a.length,
|
|
125
125
|
config: t
|
|
126
126
|
}, d = [...a, r];
|
|
127
|
-
|
|
128
|
-
}, Je = (t) => {
|
|
129
|
-
delete H.undoHistory[t], delete H.historyIndex[t];
|
|
127
|
+
V.undoHistory[s] = d, ie(s, d.length - 1);
|
|
130
128
|
}, et = (t) => {
|
|
131
|
-
|
|
129
|
+
delete V.undoHistory[t], delete V.historyIndex[t];
|
|
130
|
+
}, tt = (t) => {
|
|
131
|
+
const s = re(t), e = ae(t), n = Math.max(0, e - 1);
|
|
132
132
|
if (n !== e)
|
|
133
133
|
return ie(t, n), s[n]?.config;
|
|
134
|
-
},
|
|
135
|
-
const s =
|
|
134
|
+
}, st = (t) => {
|
|
135
|
+
const s = re(t), e = s.length, n = ae(t), a = Math.min(e - 1, n + 1);
|
|
136
136
|
if (a !== n)
|
|
137
137
|
return ie(t, a), s[a]?.config;
|
|
138
|
-
},
|
|
139
|
-
const t =
|
|
138
|
+
}, $e = () => {
|
|
139
|
+
const t = V.currentDashboardId || "", s = ae(t), e = re(t).length, n = s <= 0, a = s >= e - 1;
|
|
140
140
|
return {
|
|
141
141
|
isUndoDisabled: n,
|
|
142
142
|
isRedoDisabled: a,
|
|
@@ -144,29 +144,29 @@ const qe = () => ({
|
|
|
144
144
|
_currentIndex: s,
|
|
145
145
|
_historyLength: e
|
|
146
146
|
};
|
|
147
|
-
},
|
|
148
|
-
initializeHistoryForDashboard:
|
|
147
|
+
}, ot = v(() => $e()), Rs = () => ({
|
|
148
|
+
initializeHistoryForDashboard: Ye,
|
|
149
149
|
resetAllHistory: () => {
|
|
150
|
-
|
|
150
|
+
V.undoHistory = {}, V.historyIndex = {};
|
|
151
151
|
},
|
|
152
|
-
addUndoEntry:
|
|
153
|
-
removeUndoHistoryForDashboard:
|
|
154
|
-
getPreviousChanges:
|
|
155
|
-
getNextChanges:
|
|
156
|
-
computedUndoStatus:
|
|
152
|
+
addUndoEntry: Je,
|
|
153
|
+
removeUndoHistoryForDashboard: et,
|
|
154
|
+
getPreviousChanges: tt,
|
|
155
|
+
getNextChanges: st,
|
|
156
|
+
computedUndoStatus: ot,
|
|
157
157
|
// Function that returns a Vue ComputedRef
|
|
158
|
-
getUndoStatus:
|
|
158
|
+
getUndoStatus: $e,
|
|
159
159
|
// for unit tests only
|
|
160
160
|
// Expose reactive state for debugging or advanced external use (optional)
|
|
161
|
-
historyState:
|
|
161
|
+
historyState: Le(V)
|
|
162
162
|
});
|
|
163
|
-
function
|
|
163
|
+
function Y(t) {
|
|
164
164
|
return {
|
|
165
165
|
removeClick: (r, d) => {
|
|
166
166
|
t("removeClick", r, d);
|
|
167
167
|
},
|
|
168
|
-
moveClick: (r, d,
|
|
169
|
-
t("moveClick", r, d,
|
|
168
|
+
moveClick: (r, d, u) => {
|
|
169
|
+
t("moveClick", r, d, u);
|
|
170
170
|
},
|
|
171
171
|
selectContainer: (r) => {
|
|
172
172
|
t("selectContainer", r);
|
|
@@ -176,13 +176,13 @@ function Q(t) {
|
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
178
|
}
|
|
179
|
-
const
|
|
179
|
+
const nt = /* @__PURE__ */ b({
|
|
180
180
|
__name: "PlusCircleIcon",
|
|
181
181
|
props: {
|
|
182
182
|
cssClass: {}
|
|
183
183
|
},
|
|
184
184
|
setup(t) {
|
|
185
|
-
return (s, e) => (i(),
|
|
185
|
+
return (s, e) => (i(), c("svg", {
|
|
186
186
|
xmlns: "http://www.w3.org/2000/svg",
|
|
187
187
|
width: "24",
|
|
188
188
|
height: "24",
|
|
@@ -203,13 +203,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
203
203
|
o("path", { d: "M12 8v8" }, null, -1)
|
|
204
204
|
])], 2));
|
|
205
205
|
}
|
|
206
|
-
}),
|
|
206
|
+
}), rt = /* @__PURE__ */ b({
|
|
207
207
|
__name: "MinusCircleIcon",
|
|
208
208
|
props: {
|
|
209
209
|
cssClass: {}
|
|
210
210
|
},
|
|
211
211
|
setup(t) {
|
|
212
|
-
return (s, e) => (i(),
|
|
212
|
+
return (s, e) => (i(), c("svg", {
|
|
213
213
|
xmlns: "http://www.w3.org/2000/svg",
|
|
214
214
|
width: "24",
|
|
215
215
|
height: "24",
|
|
@@ -229,13 +229,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
229
229
|
o("path", { d: "M8 12h8" }, null, -1)
|
|
230
230
|
])], 2));
|
|
231
231
|
}
|
|
232
|
-
}), Os = /* @__PURE__ */
|
|
232
|
+
}), Os = /* @__PURE__ */ b({
|
|
233
233
|
__name: "DeleteIcon",
|
|
234
234
|
props: {
|
|
235
235
|
cssClass: {}
|
|
236
236
|
},
|
|
237
237
|
setup(t) {
|
|
238
|
-
return (s, e) => (i(),
|
|
238
|
+
return (s, e) => (i(), c("svg", {
|
|
239
239
|
xmlns: "http://www.w3.org/2000/svg",
|
|
240
240
|
width: "24",
|
|
241
241
|
height: "24",
|
|
@@ -247,16 +247,16 @@ const ot = /* @__PURE__ */ k({
|
|
|
247
247
|
"stroke-linejoin": "round",
|
|
248
248
|
class: p(`lucide lucide-trash2-icon lucide-trash-2 ${t.cssClass || ""}`.trim())
|
|
249
249
|
}, [...e[0] || (e[0] = [
|
|
250
|
-
|
|
250
|
+
oe('<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)
|
|
251
251
|
])], 2));
|
|
252
252
|
}
|
|
253
|
-
}), Us = /* @__PURE__ */
|
|
253
|
+
}), Us = /* @__PURE__ */ b({
|
|
254
254
|
__name: "EditIcon",
|
|
255
255
|
props: {
|
|
256
256
|
cssClass: {}
|
|
257
257
|
},
|
|
258
258
|
setup(t) {
|
|
259
|
-
return (s, e) => (i(),
|
|
259
|
+
return (s, e) => (i(), c("svg", {
|
|
260
260
|
xmlns: "http://www.w3.org/2000/svg",
|
|
261
261
|
width: "24",
|
|
262
262
|
height: "24",
|
|
@@ -272,13 +272,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
272
272
|
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)
|
|
273
273
|
])], 2));
|
|
274
274
|
}
|
|
275
|
-
}), Fs = /* @__PURE__ */
|
|
275
|
+
}), Fs = /* @__PURE__ */ b({
|
|
276
276
|
__name: "RenameIcon",
|
|
277
277
|
props: {
|
|
278
278
|
cssClass: {}
|
|
279
279
|
},
|
|
280
280
|
setup(t) {
|
|
281
|
-
return (s, e) => (i(),
|
|
281
|
+
return (s, e) => (i(), c("svg", {
|
|
282
282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
283
283
|
width: "24",
|
|
284
284
|
height: "24",
|
|
@@ -290,16 +290,16 @@ const ot = /* @__PURE__ */ k({
|
|
|
290
290
|
"stroke-linejoin": "round",
|
|
291
291
|
class: p(`lucide lucide-text-cursor-input-icon lucide-text-cursor-input ${t.cssClass || ""}`.trim())
|
|
292
292
|
}, [...e[0] || (e[0] = [
|
|
293
|
-
|
|
293
|
+
oe('<path d="M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6"></path><path d="M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7"></path><path d="M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1"></path><path d="M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1"></path><path d="M9 6v12"></path>', 5)
|
|
294
294
|
])], 2));
|
|
295
295
|
}
|
|
296
|
-
}), qs = /* @__PURE__ */
|
|
296
|
+
}), qs = /* @__PURE__ */ b({
|
|
297
297
|
__name: "GridIcon",
|
|
298
298
|
props: {
|
|
299
299
|
cssClass: {}
|
|
300
300
|
},
|
|
301
301
|
setup(t) {
|
|
302
|
-
return (s, e) => (i(),
|
|
302
|
+
return (s, e) => (i(), c("svg", {
|
|
303
303
|
xmlns: "http://www.w3.org/2000/svg",
|
|
304
304
|
width: "24",
|
|
305
305
|
height: "24",
|
|
@@ -311,16 +311,16 @@ const ot = /* @__PURE__ */ k({
|
|
|
311
311
|
"stroke-linejoin": "round",
|
|
312
312
|
class: p(`lucide lucide-grid3x3-icon lucide-grid-3x3 ${t.cssClass || ""}`.trim())
|
|
313
313
|
}, [...e[0] || (e[0] = [
|
|
314
|
-
|
|
314
|
+
oe('<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)
|
|
315
315
|
])], 2));
|
|
316
316
|
}
|
|
317
|
-
}), at = /* @__PURE__ */
|
|
317
|
+
}), at = /* @__PURE__ */ b({
|
|
318
318
|
__name: "SettingsIcon",
|
|
319
319
|
props: {
|
|
320
320
|
cssClass: {}
|
|
321
321
|
},
|
|
322
322
|
setup(t) {
|
|
323
|
-
return (s, e) => (i(),
|
|
323
|
+
return (s, e) => (i(), c("svg", {
|
|
324
324
|
xmlns: "http://www.w3.org/2000/svg",
|
|
325
325
|
width: "24",
|
|
326
326
|
height: "24",
|
|
@@ -340,13 +340,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
340
340
|
}, null, -1)
|
|
341
341
|
])], 2));
|
|
342
342
|
}
|
|
343
|
-
}), Gs = /* @__PURE__ */
|
|
343
|
+
}), Gs = /* @__PURE__ */ b({
|
|
344
344
|
__name: "ZoomInIcon",
|
|
345
345
|
props: {
|
|
346
346
|
cssClass: {}
|
|
347
347
|
},
|
|
348
348
|
setup(t) {
|
|
349
|
-
return (s, e) => (i(),
|
|
349
|
+
return (s, e) => (i(), c("svg", {
|
|
350
350
|
xmlns: "http://www.w3.org/2000/svg",
|
|
351
351
|
width: "24",
|
|
352
352
|
height: "24",
|
|
@@ -383,13 +383,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
383
383
|
}, null, -1)
|
|
384
384
|
])], 2));
|
|
385
385
|
}
|
|
386
|
-
}), Zs = /* @__PURE__ */
|
|
386
|
+
}), Zs = /* @__PURE__ */ b({
|
|
387
387
|
__name: "ZoomOutIcon",
|
|
388
388
|
props: {
|
|
389
389
|
cssClass: {}
|
|
390
390
|
},
|
|
391
391
|
setup(t) {
|
|
392
|
-
return (s, e) => (i(),
|
|
392
|
+
return (s, e) => (i(), c("svg", {
|
|
393
393
|
xmlns: "http://www.w3.org/2000/svg",
|
|
394
394
|
width: "24",
|
|
395
395
|
height: "24",
|
|
@@ -420,13 +420,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
420
420
|
}, null, -1)
|
|
421
421
|
])], 2));
|
|
422
422
|
}
|
|
423
|
-
}),
|
|
423
|
+
}), Ie = /* @__PURE__ */ b({
|
|
424
424
|
__name: "MoveLeftIcon",
|
|
425
425
|
props: {
|
|
426
426
|
cssClass: {}
|
|
427
427
|
},
|
|
428
428
|
setup(t) {
|
|
429
|
-
return (s, e) => (i(),
|
|
429
|
+
return (s, e) => (i(), c("svg", {
|
|
430
430
|
xmlns: "http://www.w3.org/2000/svg",
|
|
431
431
|
width: "24",
|
|
432
432
|
height: "24",
|
|
@@ -447,13 +447,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
447
447
|
o("path", { d: "M16 12H8" }, null, -1)
|
|
448
448
|
])], 2));
|
|
449
449
|
}
|
|
450
|
-
}),
|
|
450
|
+
}), De = /* @__PURE__ */ b({
|
|
451
451
|
__name: "MoveRightIcon",
|
|
452
452
|
props: {
|
|
453
453
|
cssClass: {}
|
|
454
454
|
},
|
|
455
455
|
setup(t) {
|
|
456
|
-
return (s, e) => (i(),
|
|
456
|
+
return (s, e) => (i(), c("svg", {
|
|
457
457
|
xmlns: "http://www.w3.org/2000/svg",
|
|
458
458
|
width: "24",
|
|
459
459
|
height: "24",
|
|
@@ -474,13 +474,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
474
474
|
o("path", { d: "M8 12h8" }, null, -1)
|
|
475
475
|
])], 2));
|
|
476
476
|
}
|
|
477
|
-
}),
|
|
477
|
+
}), Be = /* @__PURE__ */ b({
|
|
478
478
|
__name: "XCircleIcon",
|
|
479
479
|
props: {
|
|
480
480
|
cssClass: {}
|
|
481
481
|
},
|
|
482
482
|
setup(t) {
|
|
483
|
-
return (s, e) => (i(),
|
|
483
|
+
return (s, e) => (i(), c("svg", {
|
|
484
484
|
xmlns: "http://www.w3.org/2000/svg",
|
|
485
485
|
width: "24",
|
|
486
486
|
height: "24",
|
|
@@ -501,13 +501,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
501
501
|
o("path", { d: "m9 9 6 6" }, null, -1)
|
|
502
502
|
])], 2));
|
|
503
503
|
}
|
|
504
|
-
}), Xs = /* @__PURE__ */
|
|
504
|
+
}), Xs = /* @__PURE__ */ b({
|
|
505
505
|
__name: "MonitorSmartphoneIcon",
|
|
506
506
|
props: {
|
|
507
507
|
cssClass: {}
|
|
508
508
|
},
|
|
509
509
|
setup(t) {
|
|
510
|
-
return (s, e) => (i(),
|
|
510
|
+
return (s, e) => (i(), c("svg", {
|
|
511
511
|
xmlns: "http://www.w3.org/2000/svg",
|
|
512
512
|
width: "24",
|
|
513
513
|
height: "24",
|
|
@@ -531,13 +531,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
531
531
|
}, null, -1)
|
|
532
532
|
])], 2));
|
|
533
533
|
}
|
|
534
|
-
}), Qs = /* @__PURE__ */
|
|
534
|
+
}), Qs = /* @__PURE__ */ b({
|
|
535
535
|
__name: "TabletSmartphoneIcon",
|
|
536
536
|
props: {
|
|
537
537
|
cssClass: {}
|
|
538
538
|
},
|
|
539
539
|
setup(t) {
|
|
540
|
-
return (s, e) => (i(),
|
|
540
|
+
return (s, e) => (i(), c("svg", {
|
|
541
541
|
xmlns: "http://www.w3.org/2000/svg",
|
|
542
542
|
width: "24",
|
|
543
543
|
height: "24",
|
|
@@ -560,13 +560,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
560
560
|
o("path", { d: "M8 18h.01" }, null, -1)
|
|
561
561
|
])], 2));
|
|
562
562
|
}
|
|
563
|
-
}), Ys = /* @__PURE__ */
|
|
563
|
+
}), Ys = /* @__PURE__ */ b({
|
|
564
564
|
__name: "MonitorIcon",
|
|
565
565
|
props: {
|
|
566
566
|
cssClass: {}
|
|
567
567
|
},
|
|
568
568
|
setup(t) {
|
|
569
|
-
return (s, e) => (i(),
|
|
569
|
+
return (s, e) => (i(), c("svg", {
|
|
570
570
|
xmlns: "http://www.w3.org/2000/svg",
|
|
571
571
|
width: "24",
|
|
572
572
|
height: "24",
|
|
@@ -599,13 +599,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
599
599
|
}, null, -1)
|
|
600
600
|
])], 2));
|
|
601
601
|
}
|
|
602
|
-
}),
|
|
602
|
+
}), it = /* @__PURE__ */ b({
|
|
603
603
|
__name: "TimerResetIcon",
|
|
604
604
|
props: {
|
|
605
605
|
cssClass: {}
|
|
606
606
|
},
|
|
607
607
|
setup(t) {
|
|
608
|
-
return (s, e) => (i(),
|
|
608
|
+
return (s, e) => (i(), c("svg", {
|
|
609
609
|
xmlns: "http://www.w3.org/2000/svg",
|
|
610
610
|
width: "24",
|
|
611
611
|
height: "24",
|
|
@@ -623,13 +623,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
623
623
|
o("path", { d: "M9 17H4v5" }, null, -1)
|
|
624
624
|
])], 2));
|
|
625
625
|
}
|
|
626
|
-
}),
|
|
626
|
+
}), lt = /* @__PURE__ */ b({
|
|
627
627
|
__name: "UndoIcon",
|
|
628
628
|
props: {
|
|
629
629
|
cssClass: {}
|
|
630
630
|
},
|
|
631
631
|
setup(t) {
|
|
632
|
-
return (s, e) => (i(),
|
|
632
|
+
return (s, e) => (i(), c("svg", {
|
|
633
633
|
xmlns: "http://www.w3.org/2000/svg",
|
|
634
634
|
width: "24",
|
|
635
635
|
height: "24",
|
|
@@ -645,13 +645,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
645
645
|
o("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" }, null, -1)
|
|
646
646
|
])], 2));
|
|
647
647
|
}
|
|
648
|
-
}),
|
|
648
|
+
}), dt = /* @__PURE__ */ b({
|
|
649
649
|
__name: "RedoIcon",
|
|
650
650
|
props: {
|
|
651
651
|
cssClass: {}
|
|
652
652
|
},
|
|
653
653
|
setup(t) {
|
|
654
|
-
return (s, e) => (i(),
|
|
654
|
+
return (s, e) => (i(), c("svg", {
|
|
655
655
|
xmlns: "http://www.w3.org/2000/svg",
|
|
656
656
|
width: "24",
|
|
657
657
|
height: "24",
|
|
@@ -667,13 +667,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
667
667
|
o("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" }, null, -1)
|
|
668
668
|
])], 2));
|
|
669
669
|
}
|
|
670
|
-
}),
|
|
670
|
+
}), ct = /* @__PURE__ */ b({
|
|
671
671
|
__name: "HandIcon",
|
|
672
672
|
props: {
|
|
673
673
|
cssClass: {}
|
|
674
674
|
},
|
|
675
675
|
setup(t) {
|
|
676
|
-
return (s, e) => (i(),
|
|
676
|
+
return (s, e) => (i(), c("svg", {
|
|
677
677
|
xmlns: "http://www.w3.org/2000/svg",
|
|
678
678
|
width: "24",
|
|
679
679
|
height: "24",
|
|
@@ -691,13 +691,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
691
691
|
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)
|
|
692
692
|
])], 2));
|
|
693
693
|
}
|
|
694
|
-
}),
|
|
694
|
+
}), Ke = /* @__PURE__ */ b({
|
|
695
695
|
__name: "HandGrabIcon",
|
|
696
696
|
props: {
|
|
697
697
|
cssClass: {}
|
|
698
698
|
},
|
|
699
699
|
setup(t) {
|
|
700
|
-
return (s, e) => (i(),
|
|
700
|
+
return (s, e) => (i(), c("svg", {
|
|
701
701
|
xmlns: "http://www.w3.org/2000/svg",
|
|
702
702
|
width: "24",
|
|
703
703
|
height: "24",
|
|
@@ -709,16 +709,16 @@ const ot = /* @__PURE__ */ k({
|
|
|
709
709
|
"stroke-linejoin": "round",
|
|
710
710
|
class: p(`lucide lucide-hand-grab-icon lucide-hand-grab ${t.cssClass || ""}`.trim())
|
|
711
711
|
}, [...e[0] || (e[0] = [
|
|
712
|
-
|
|
712
|
+
oe('<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)
|
|
713
713
|
])], 2));
|
|
714
714
|
}
|
|
715
|
-
}),
|
|
715
|
+
}), ut = /* @__PURE__ */ b({
|
|
716
716
|
__name: "CrosshairIcon",
|
|
717
717
|
props: {
|
|
718
718
|
cssClass: {}
|
|
719
719
|
},
|
|
720
720
|
setup(t) {
|
|
721
|
-
return (s, e) => (i(),
|
|
721
|
+
return (s, e) => (i(), c("svg", {
|
|
722
722
|
xmlns: "http://www.w3.org/2000/svg",
|
|
723
723
|
width: "24",
|
|
724
724
|
height: "24",
|
|
@@ -756,13 +756,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
756
756
|
}, null, -1)
|
|
757
757
|
])], 2));
|
|
758
758
|
}
|
|
759
|
-
}), Js = /* @__PURE__ */
|
|
759
|
+
}), Js = /* @__PURE__ */ b({
|
|
760
760
|
__name: "TargetIcon",
|
|
761
761
|
props: {
|
|
762
762
|
cssClass: {}
|
|
763
763
|
},
|
|
764
764
|
setup(t) {
|
|
765
|
-
return (s, e) => (i(),
|
|
765
|
+
return (s, e) => (i(), c("svg", {
|
|
766
766
|
xmlns: "http://www.w3.org/2000/svg",
|
|
767
767
|
width: "24",
|
|
768
768
|
height: "24",
|
|
@@ -791,13 +791,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
791
791
|
}, null, -1)
|
|
792
792
|
])], 2));
|
|
793
793
|
}
|
|
794
|
-
}),
|
|
794
|
+
}), gt = /* @__PURE__ */ b({
|
|
795
795
|
__name: "CircleQuestionMarkIcon",
|
|
796
796
|
props: {
|
|
797
797
|
cssClass: {}
|
|
798
798
|
},
|
|
799
799
|
setup(t) {
|
|
800
|
-
return (s, e) => (i(),
|
|
800
|
+
return (s, e) => (i(), c("svg", {
|
|
801
801
|
xmlns: "http://www.w3.org/2000/svg",
|
|
802
802
|
width: "24",
|
|
803
803
|
height: "24",
|
|
@@ -818,13 +818,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
818
818
|
o("path", { d: "M12 17h.01" }, null, -1)
|
|
819
819
|
])], 2));
|
|
820
820
|
}
|
|
821
|
-
}),
|
|
821
|
+
}), me = /* @__PURE__ */ b({
|
|
822
822
|
__name: "ChevronDownIcon",
|
|
823
823
|
props: {
|
|
824
824
|
cssClass: {}
|
|
825
825
|
},
|
|
826
826
|
setup(t) {
|
|
827
|
-
return (s, e) => (i(),
|
|
827
|
+
return (s, e) => (i(), c("svg", {
|
|
828
828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
829
829
|
width: "24",
|
|
830
830
|
height: "24",
|
|
@@ -839,13 +839,13 @@ const ot = /* @__PURE__ */ k({
|
|
|
839
839
|
o("path", { d: "m6 9 6 6 6-6" }, null, -1)
|
|
840
840
|
])], 2));
|
|
841
841
|
}
|
|
842
|
-
}),
|
|
842
|
+
}), pt = ["for"], ht = ["id", "value", "placeholder", "aria-label"], mt = `
|
|
843
843
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
844
844
|
bg-formfield content-formfield
|
|
845
845
|
outline-1 -outline-offset-1 outline-primary
|
|
846
846
|
placeholder:text-disabled
|
|
847
847
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
848
|
-
`,
|
|
848
|
+
`, We = /* @__PURE__ */ b({
|
|
849
849
|
__name: "TextField",
|
|
850
850
|
props: {
|
|
851
851
|
label: {},
|
|
@@ -856,29 +856,29 @@ const ot = /* @__PURE__ */ k({
|
|
|
856
856
|
},
|
|
857
857
|
emits: ["update:modelValue", "keydown"],
|
|
858
858
|
setup(t, { emit: s }) {
|
|
859
|
-
const e = t, n = s, a = (
|
|
860
|
-
n("update:modelValue",
|
|
861
|
-
}, r = v(() => e.size === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base"), d = v(() => `flex flex-col gap-1 ${e.className}`),
|
|
862
|
-
return (
|
|
859
|
+
const e = t, n = s, a = ($) => {
|
|
860
|
+
n("update:modelValue", $.target.value);
|
|
861
|
+
}, r = v(() => e.size === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base"), d = v(() => `flex flex-col gap-1 ${e.className}`), u = v(() => `${mt} ${r.value}`);
|
|
862
|
+
return ($, g) => (i(), c("div", {
|
|
863
863
|
class: p(d.value)
|
|
864
864
|
}, [
|
|
865
865
|
o("label", {
|
|
866
866
|
for: e.label,
|
|
867
867
|
class: "block text-sm/6 font-medium"
|
|
868
|
-
}, S(e.label), 9,
|
|
868
|
+
}, S(e.label), 9, pt),
|
|
869
869
|
o("input", {
|
|
870
870
|
id: e.label,
|
|
871
871
|
type: "text",
|
|
872
872
|
value: e.modelValue,
|
|
873
873
|
placeholder: e.placeholder,
|
|
874
|
-
class: p(
|
|
874
|
+
class: p(u.value),
|
|
875
875
|
"aria-label": e.label,
|
|
876
876
|
onInput: a,
|
|
877
|
-
onKeydown:
|
|
878
|
-
}, null, 42,
|
|
877
|
+
onKeydown: g[0] || (g[0] = (l) => n("keydown", l))
|
|
878
|
+
}, null, 42, ht)
|
|
879
879
|
], 2));
|
|
880
880
|
}
|
|
881
|
-
}),
|
|
881
|
+
}), ft = ["title", "disabled"], H = /* @__PURE__ */ b({
|
|
882
882
|
__name: "Button",
|
|
883
883
|
props: {
|
|
884
884
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -910,129 +910,129 @@ const ot = /* @__PURE__ */ k({
|
|
|
910
910
|
"group bg-transparent border-[category] text-[category] hover:text-[category] group-hover:text-[category] focus:outline-[category] focus:outline-offset-[category]"
|
|
911
911
|
]
|
|
912
912
|
]), r = v(() => {
|
|
913
|
-
const
|
|
913
|
+
const $ = e.isIconButton || !1, g = e.category || "primary", l = e.type || "normal", y = e.disabled || !1, B = e.className || "", I = e.font || "", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
914
914
|
let m = (e.borderColor || "").trim();
|
|
915
915
|
m = m.length > 0 ? m : "";
|
|
916
|
-
const L = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), _ = e.shadow || "sm",
|
|
917
|
-
if (
|
|
918
|
-
return
|
|
916
|
+
const L = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), _ = e.shadow || "sm", A = e.shadowHover || "md", F = (e.addCss || "").trim(), K = e.justifyCss || "justify-center";
|
|
917
|
+
if ($)
|
|
918
|
+
return R(
|
|
919
919
|
"flex flex-row items-center",
|
|
920
|
-
|
|
920
|
+
y ? "text-disabled" : `text-${g} hover:brightness-110 cursor-pointer`,
|
|
921
921
|
B || ""
|
|
922
922
|
);
|
|
923
|
-
const
|
|
923
|
+
const x = [
|
|
924
924
|
"relative cursor-pointer",
|
|
925
925
|
"rounded-sm focus:outline-none focus:ring focus:ring-offset",
|
|
926
926
|
"transition-all duration-150",
|
|
927
927
|
"text-sm",
|
|
928
928
|
`font-${I}`
|
|
929
929
|
];
|
|
930
|
-
if (
|
|
931
|
-
l === "ghost" ?
|
|
930
|
+
if (y)
|
|
931
|
+
l === "ghost" ? x.push("text-disabled border-disabled cursor-not-allowed") : x.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
932
932
|
else {
|
|
933
|
-
|
|
934
|
-
let
|
|
935
|
-
a.has(l) ?
|
|
936
|
-
const z =
|
|
937
|
-
|
|
933
|
+
x.push("cursor-pointer");
|
|
934
|
+
let E = "";
|
|
935
|
+
a.has(l) ? E = `${a.get(l)}` : E = `${a.get("normal")}`, C < 1 && (E = E.replace("border-[category]", ""));
|
|
936
|
+
const z = E.replaceAll("[category]", g).trim();
|
|
937
|
+
x.push(z);
|
|
938
938
|
}
|
|
939
|
-
return
|
|
939
|
+
return C > 0 ? (x.push(`border-[${C}px]`), x.push(`border-${m}`)) : (x.push("border-[1px]"), x.push("border-transparent")), L > 0 ? (x.push(`hover:border-[${L}px] group-hover:border-[${L}px]`), x.push(`hover:border-${m} group-hover:border-${m}`)) : x.push("hover:border-[1px] group-hover:border-[1px]"), x.push(`shadow-${_}`), x.push(`hover:shadow-${A} group-hover:shadow-${A}`), F.length > 0 && x.push(F), F.indexOf("hidden") === -1 && x.push("inline-flex"), x.push(K), x.join(" ").trim();
|
|
940
940
|
}), d = v(() => ({
|
|
941
941
|
padding: e.isIconButton ? 0 : `${e.py}rem ${e.px}rem `
|
|
942
|
-
})),
|
|
942
|
+
})), u = ($) => {
|
|
943
943
|
if (e.disabled) {
|
|
944
|
-
|
|
944
|
+
$.preventDefault();
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
947
|
-
n("click",
|
|
947
|
+
n("click", $);
|
|
948
948
|
};
|
|
949
|
-
return (
|
|
949
|
+
return ($, g) => (i(), c("button", {
|
|
950
950
|
type: "button",
|
|
951
951
|
class: p(r.value),
|
|
952
|
-
style:
|
|
952
|
+
style: ne(d.value),
|
|
953
953
|
title: t.tooltip?.title,
|
|
954
954
|
disabled: t.disabled,
|
|
955
|
-
onClick:
|
|
955
|
+
onClick: j(u, ["stop"])
|
|
956
956
|
}, [
|
|
957
|
-
T(
|
|
958
|
-
], 14,
|
|
957
|
+
T($.$slots, "default")
|
|
958
|
+
], 14, ft));
|
|
959
959
|
}
|
|
960
960
|
}), de = () => {
|
|
961
|
-
},
|
|
961
|
+
}, vt = typeof window < "u" && typeof document < "u", wt = () => {
|
|
962
962
|
var t, s;
|
|
963
|
-
return
|
|
963
|
+
return vt && ((t = window?.navigator) == null ? void 0 : t.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || // The new iPad Pro Gen3 does not identify itself as iPad, but as Macintosh.
|
|
964
964
|
// https://github.com/vueuse/vueuse/issues/3577
|
|
965
965
|
((s = window?.navigator) == null ? void 0 : s.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
966
|
-
}, Ct =
|
|
967
|
-
},
|
|
966
|
+
}, Ct = wt(), xt = () => {
|
|
967
|
+
}, yt = (t) => toString.call(t) === "[object Object]";
|
|
968
968
|
function ce(...t) {
|
|
969
969
|
let s, e, n, a;
|
|
970
|
-
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, n, a] = t, s = window) : [s, e, n, a] = t, !s) return
|
|
970
|
+
if (typeof t[0] == "string" || Array.isArray(t[0]) ? ([e, n, a] = t, s = window) : [s, e, n, a] = t, !s) return xt;
|
|
971
971
|
Array.isArray(e) || (e = [e]), Array.isArray(n) || (n = [n]);
|
|
972
972
|
const r = [], d = () => {
|
|
973
973
|
r.forEach((l) => l()), r.length = 0;
|
|
974
|
-
},
|
|
974
|
+
}, u = (l, y, B, I) => (l.addEventListener(y, B, I), () => l.removeEventListener(y, B, I)), $ = (l) => {
|
|
975
975
|
if (d(), !l)
|
|
976
976
|
return;
|
|
977
|
-
const
|
|
977
|
+
const y = yt(a) ? { ...a } : a;
|
|
978
978
|
r.push(
|
|
979
|
-
...e.flatMap((B) => n.map((I) =>
|
|
979
|
+
...e.flatMap((B) => n.map((I) => u(l, B, I, y)))
|
|
980
980
|
);
|
|
981
|
-
},
|
|
982
|
-
|
|
981
|
+
}, g = () => {
|
|
982
|
+
$(s), d();
|
|
983
983
|
};
|
|
984
|
-
return
|
|
984
|
+
return $(s), g;
|
|
985
985
|
}
|
|
986
986
|
let Ce = !1;
|
|
987
|
-
function
|
|
987
|
+
function bt(t, s, e = {}) {
|
|
988
988
|
const { ignore: n = [], capture: a = !0, detectIframe: r = !1 } = e;
|
|
989
989
|
if (!document)
|
|
990
990
|
return de;
|
|
991
|
-
Ct && !Ce && (Ce = !0, Array.from(window.document.body.children).forEach((
|
|
991
|
+
Ct && !Ce && (Ce = !0, Array.from(window.document.body.children).forEach((g) => g.addEventListener("click", de)), window.document.documentElement.addEventListener("click", de));
|
|
992
992
|
let d = !0;
|
|
993
|
-
const
|
|
993
|
+
const u = (g) => n.some((l) => {
|
|
994
994
|
if (typeof l == "string")
|
|
995
995
|
return Array.from(document.querySelectorAll(l)).some(
|
|
996
|
-
(
|
|
996
|
+
(y) => y === g.target || g.composedPath().includes(y)
|
|
997
997
|
);
|
|
998
998
|
{
|
|
999
|
-
const
|
|
1000
|
-
return
|
|
999
|
+
const y = l;
|
|
1000
|
+
return y && (g.target === y || g.composedPath().includes(y));
|
|
1001
1001
|
}
|
|
1002
|
-
}),
|
|
1003
|
-
ce(document, "click", (
|
|
1002
|
+
}), $ = [
|
|
1003
|
+
ce(document, "click", (g) => {
|
|
1004
1004
|
const l = t;
|
|
1005
|
-
if (!(!l || l ===
|
|
1006
|
-
if (
|
|
1005
|
+
if (!(!l || l === g.target || g.composedPath().includes(l))) {
|
|
1006
|
+
if (g.detail === 0 && (d = !u(g)), !d) {
|
|
1007
1007
|
d = !0;
|
|
1008
1008
|
return;
|
|
1009
1009
|
}
|
|
1010
|
-
s(
|
|
1010
|
+
s(g);
|
|
1011
1011
|
}
|
|
1012
1012
|
}, { passive: !0, capture: a }),
|
|
1013
1013
|
ce(
|
|
1014
1014
|
document,
|
|
1015
1015
|
"pointerdown",
|
|
1016
|
-
(
|
|
1016
|
+
(g) => {
|
|
1017
1017
|
const l = t;
|
|
1018
|
-
d = !
|
|
1018
|
+
d = !u(g) && !!(l && !g.composedPath().includes(l));
|
|
1019
1019
|
},
|
|
1020
1020
|
{ passive: !0 }
|
|
1021
1021
|
),
|
|
1022
|
-
r && ce(document, "blur", (
|
|
1022
|
+
r && ce(document, "blur", (g) => {
|
|
1023
1023
|
setTimeout(() => {
|
|
1024
1024
|
var l;
|
|
1025
|
-
const
|
|
1026
|
-
((l = document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !(
|
|
1025
|
+
const y = t;
|
|
1026
|
+
((l = document.activeElement) == null ? void 0 : l.tagName) === "IFRAME" && !(y != null && y.contains(document.activeElement)) && s(g);
|
|
1027
1027
|
}, 0);
|
|
1028
1028
|
})
|
|
1029
1029
|
].filter(Boolean);
|
|
1030
|
-
return () =>
|
|
1030
|
+
return () => $.forEach((g) => g());
|
|
1031
1031
|
}
|
|
1032
|
-
const
|
|
1032
|
+
const _t = {
|
|
1033
1033
|
class: "form-dropdown-menu overflow-clip flex flex-col grow rounded-md justify-center w-full h-full bg-sidebar content-sidebar bg-opacity-95",
|
|
1034
1034
|
style: { padding: "0 !important" }
|
|
1035
|
-
}, kt = /* @__PURE__ */
|
|
1035
|
+
}, kt = /* @__PURE__ */ b({
|
|
1036
1036
|
__name: "Dropdown",
|
|
1037
1037
|
props: {
|
|
1038
1038
|
testid: { default: "not-set" },
|
|
@@ -1056,22 +1056,22 @@ const bt = {
|
|
|
1056
1056
|
focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary
|
|
1057
1057
|
content-topbar
|
|
1058
1058
|
${e.enabled ? "hover:text-primary cursor-pointer" : "opacity-50"}
|
|
1059
|
-
`.trim()),
|
|
1059
|
+
`.trim()), u = `
|
|
1060
1060
|
${e.hideLabel ? "sr-only" : "hidden ml-3 text-sm font-medium lg:block"}
|
|
1061
|
-
`.trim(),
|
|
1061
|
+
`.trim(), $ = `
|
|
1062
1062
|
hidden flex-shrink-0 ml-1 size-4 lg:block
|
|
1063
|
-
`.trim(),
|
|
1063
|
+
`.trim(), g = v(() => {
|
|
1064
1064
|
const l = [
|
|
1065
1065
|
"absolute flex flex-col right-0 z-50 mt-2 w-56 origin-top-right"
|
|
1066
1066
|
//'overflow-clip',
|
|
1067
1067
|
];
|
|
1068
1068
|
return l.push("rounded-md shadow-md"), l.push("ring-1 ring-black ring-opacity-5"), l.push("focus:outline-none"), l.push("bg-formfield content-formfield"), l.join(" ").trim();
|
|
1069
1069
|
});
|
|
1070
|
-
return
|
|
1071
|
-
|
|
1070
|
+
return be(() => {
|
|
1071
|
+
bt(a.value, () => {
|
|
1072
1072
|
n("toggleOpen", !1);
|
|
1073
1073
|
});
|
|
1074
|
-
}), (l,
|
|
1074
|
+
}), (l, y) => Pe((i(), c("div", {
|
|
1075
1075
|
ref_key: "refDropdown",
|
|
1076
1076
|
ref: a,
|
|
1077
1077
|
class: "relative inline-block text-left"
|
|
@@ -1081,19 +1081,19 @@ const bt = {
|
|
|
1081
1081
|
class: p(d.value),
|
|
1082
1082
|
"aria-expanded": "true",
|
|
1083
1083
|
"aria-haspopup": "true",
|
|
1084
|
-
onClick:
|
|
1084
|
+
onClick: j(r, ["stop"])
|
|
1085
1085
|
}, [
|
|
1086
1086
|
T(l.$slots, "icon"),
|
|
1087
1087
|
o("span", {
|
|
1088
|
-
class: p(u
|
|
1088
|
+
class: p(h(u))
|
|
1089
1089
|
}, S(t.label), 3),
|
|
1090
|
-
t.showChevron ? (i(), N(
|
|
1090
|
+
t.showChevron ? (i(), N(h(me), {
|
|
1091
1091
|
key: 0,
|
|
1092
|
-
class: p(
|
|
1092
|
+
class: p(h($)),
|
|
1093
1093
|
"aria-hidden": "true"
|
|
1094
1094
|
}, null, 8, ["class"])) : Z("", !0)
|
|
1095
1095
|
], 2),
|
|
1096
|
-
D(
|
|
1096
|
+
D(Ne, {
|
|
1097
1097
|
"enter-active-class": "transition ease-out duration-100",
|
|
1098
1098
|
"enter-from-class": "transform opacity-0 scale-95",
|
|
1099
1099
|
"enter-to-class": "transform opacity-100 scale-100",
|
|
@@ -1101,16 +1101,16 @@ const bt = {
|
|
|
1101
1101
|
"leave-from-class": "transform opacity-100 scale-100",
|
|
1102
1102
|
"leave-to-class": "transform opacity-0 scale-95"
|
|
1103
1103
|
}, {
|
|
1104
|
-
default:
|
|
1105
|
-
t.isMenuOpen ? (i(),
|
|
1104
|
+
default: M(() => [
|
|
1105
|
+
t.isMenuOpen ? (i(), c("div", {
|
|
1106
1106
|
key: 0,
|
|
1107
|
-
class: p(
|
|
1107
|
+
class: p(g.value),
|
|
1108
1108
|
role: "menu",
|
|
1109
1109
|
"aria-orientation": "vertical",
|
|
1110
1110
|
"aria-labelledby": "menu-button",
|
|
1111
1111
|
tabindex: "-1"
|
|
1112
1112
|
}, [
|
|
1113
|
-
o("div",
|
|
1113
|
+
o("div", _t, [
|
|
1114
1114
|
T(l.$slots, "default")
|
|
1115
1115
|
])
|
|
1116
1116
|
], 2)) : Z("", !0)
|
|
@@ -1118,10 +1118,10 @@ const bt = {
|
|
|
1118
1118
|
_: 3
|
|
1119
1119
|
})
|
|
1120
1120
|
], 512)), [
|
|
1121
|
-
[
|
|
1121
|
+
[ze, !e.hide]
|
|
1122
1122
|
]);
|
|
1123
1123
|
}
|
|
1124
|
-
}),
|
|
1124
|
+
}), $t = ["data-testid"], It = /* @__PURE__ */ b({
|
|
1125
1125
|
__name: "Stack",
|
|
1126
1126
|
props: {
|
|
1127
1127
|
testId: {},
|
|
@@ -1131,17 +1131,17 @@ const bt = {
|
|
|
1131
1131
|
},
|
|
1132
1132
|
setup(t) {
|
|
1133
1133
|
const s = t, e = v(() => {
|
|
1134
|
-
const { testId: a, classNames: r, direction: d, ...
|
|
1135
|
-
return
|
|
1136
|
-
}), n = v(() => s.direction === "row" ?
|
|
1137
|
-
return (a, r) => (i(),
|
|
1134
|
+
const { testId: a, classNames: r, direction: d, ...u } = s;
|
|
1135
|
+
return u;
|
|
1136
|
+
}), n = v(() => s.direction === "row" ? R("flex flex-row items-center gap-2", s.classNames || "") : R("flex flex-col gap-2 w-full", s.classNames || ""));
|
|
1137
|
+
return (a, r) => (i(), c("div", Q({
|
|
1138
1138
|
"data-testid": t.testId || "not-set",
|
|
1139
1139
|
class: n.value
|
|
1140
1140
|
}, e.value), [
|
|
1141
1141
|
T(a.$slots, "default")
|
|
1142
|
-
], 16,
|
|
1142
|
+
], 16, $t));
|
|
1143
1143
|
}
|
|
1144
|
-
}), eo = /* @__PURE__ */
|
|
1144
|
+
}), eo = /* @__PURE__ */ b({
|
|
1145
1145
|
__name: "ListItem",
|
|
1146
1146
|
props: {
|
|
1147
1147
|
testId: {},
|
|
@@ -1152,20 +1152,20 @@ const bt = {
|
|
|
1152
1152
|
},
|
|
1153
1153
|
setup(t) {
|
|
1154
1154
|
const s = t, e = v(() => {
|
|
1155
|
-
const { classNames: r, direction: d, innerClass:
|
|
1156
|
-
return
|
|
1157
|
-
}), n = v(() =>
|
|
1155
|
+
const { classNames: r, direction: d, innerClass: u, ...$ } = s;
|
|
1156
|
+
return $;
|
|
1157
|
+
}), n = v(() => R(s.classNames || "", "w-full")), a = R(
|
|
1158
1158
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
1159
1159
|
rounded-md border`,
|
|
1160
1160
|
s.innerClass || ""
|
|
1161
1161
|
);
|
|
1162
|
-
return (r, d) => (i(), N(
|
|
1162
|
+
return (r, d) => (i(), N(It, Q({
|
|
1163
1163
|
direction: "row",
|
|
1164
1164
|
class: n.value
|
|
1165
1165
|
}, e.value), {
|
|
1166
|
-
default:
|
|
1166
|
+
default: M(() => [
|
|
1167
1167
|
o("div", {
|
|
1168
|
-
class: p(
|
|
1168
|
+
class: p(h(a))
|
|
1169
1169
|
}, [
|
|
1170
1170
|
T(r.$slots, "default")
|
|
1171
1171
|
], 2)
|
|
@@ -1173,7 +1173,7 @@ const bt = {
|
|
|
1173
1173
|
_: 3
|
|
1174
1174
|
}, 16, ["class"]));
|
|
1175
1175
|
}
|
|
1176
|
-
}),
|
|
1176
|
+
}), Dt = ["data-testid"], Bt = /* @__PURE__ */ b({
|
|
1177
1177
|
__name: "DraggablePanel",
|
|
1178
1178
|
props: {
|
|
1179
1179
|
testId: {},
|
|
@@ -1184,7 +1184,7 @@ const bt = {
|
|
|
1184
1184
|
},
|
|
1185
1185
|
emits: ["draggingChange"],
|
|
1186
1186
|
setup(t, { emit: s }) {
|
|
1187
|
-
const e = t, n = s, a = U(null), r = U({ x: 0, y: 0 }), d = U({ x: 0, y: 0 }),
|
|
1187
|
+
const e = t, n = s, a = U(null), r = U({ x: 0, y: 0 }), d = U({ x: 0, y: 0 }), u = U({ x: 0, y: 0 }), g = {
|
|
1188
1188
|
// 1. Take it out of the document flow
|
|
1189
1189
|
position: "fixed",
|
|
1190
1190
|
// 2. Set initial viewport position (e.g., top right)
|
|
@@ -1199,82 +1199,82 @@ const bt = {
|
|
|
1199
1199
|
borderWidth: "3px",
|
|
1200
1200
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
1201
1201
|
}, l = v(() => ({
|
|
1202
|
-
...
|
|
1202
|
+
...g,
|
|
1203
1203
|
...e.style || {},
|
|
1204
1204
|
// Override top/right with CSS transform based on position state for dragging
|
|
1205
1205
|
transform: `translate(${r.value.x}px, ${r.value.y}px)`,
|
|
1206
|
-
top:
|
|
1207
|
-
right:
|
|
1206
|
+
top: g.top,
|
|
1207
|
+
right: g.right,
|
|
1208
1208
|
// When translating, setting 'left' and 'top' to 0 helps maintain consistent behavior
|
|
1209
1209
|
left: "initial"
|
|
1210
|
-
})),
|
|
1210
|
+
})), y = (m) => "touches" in m && m.touches.length > 0 ? { x: m.touches[0].clientX, y: m.touches[0].clientY } : { x: m.clientX, y: m.clientY }, B = (m) => {
|
|
1211
1211
|
if (!m.target.closest(".handle"))
|
|
1212
1212
|
return;
|
|
1213
1213
|
m.cancelable && m.preventDefault(), n("draggingChange", !0);
|
|
1214
|
-
const _ =
|
|
1215
|
-
d.value = { x: _.x, y: _.y },
|
|
1214
|
+
const _ = y(m);
|
|
1215
|
+
d.value = { x: _.x, y: _.y }, u.value = { x: r.value.x, y: r.value.y }, window.addEventListener("mousemove", I), window.addEventListener("mouseup", C), window.addEventListener("touchmove", I, { passive: !1 }), window.addEventListener("touchend", C), window.addEventListener("touchcancel", C);
|
|
1216
1216
|
}, I = (m) => {
|
|
1217
1217
|
m.cancelable && m.preventDefault();
|
|
1218
|
-
const L =
|
|
1218
|
+
const L = y(m), _ = L.x - d.value.x, A = L.y - d.value.y;
|
|
1219
1219
|
r.value = {
|
|
1220
|
-
x:
|
|
1221
|
-
y:
|
|
1220
|
+
x: u.value.x + _,
|
|
1221
|
+
y: u.value.y + A
|
|
1222
1222
|
};
|
|
1223
|
-
},
|
|
1224
|
-
window.removeEventListener("mousemove", I), window.removeEventListener("mouseup",
|
|
1223
|
+
}, C = () => {
|
|
1224
|
+
window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", I), window.removeEventListener("touchend", C), window.removeEventListener("touchcancel", C), setTimeout(() => {
|
|
1225
1225
|
n("draggingChange", !1);
|
|
1226
1226
|
}, 100);
|
|
1227
1227
|
};
|
|
1228
|
-
return
|
|
1228
|
+
return be(() => {
|
|
1229
1229
|
a.value && (a.value.addEventListener("mousedown", B), a.value.addEventListener("touchstart", B, { passive: !1 }));
|
|
1230
|
-
}),
|
|
1231
|
-
a.value && (a.value.removeEventListener("mousedown", B), a.value.removeEventListener("touchstart", B)), window.removeEventListener("mousemove", I), window.removeEventListener("mouseup",
|
|
1232
|
-
}), (m, L) => (i(),
|
|
1230
|
+
}), Te(() => {
|
|
1231
|
+
a.value && (a.value.removeEventListener("mousedown", B), a.value.removeEventListener("touchstart", B)), window.removeEventListener("mousemove", I), window.removeEventListener("mouseup", C), window.removeEventListener("touchmove", I), window.removeEventListener("touchend", C), window.removeEventListener("touchcancel", C);
|
|
1232
|
+
}), (m, L) => (i(), c("div", {
|
|
1233
1233
|
ref_key: "panelRef",
|
|
1234
1234
|
ref: a,
|
|
1235
1235
|
"data-testid": e.testId || "draggable-panel",
|
|
1236
1236
|
class: p(e.className),
|
|
1237
|
-
style:
|
|
1237
|
+
style: ne(l.value)
|
|
1238
1238
|
}, [
|
|
1239
1239
|
T(m.$slots, "default")
|
|
1240
|
-
], 14,
|
|
1240
|
+
], 14, Dt));
|
|
1241
1241
|
}
|
|
1242
|
-
}),
|
|
1242
|
+
}), Kt = { class: "dashboard-widget" }, Wt = { class: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center" }, Et = { class: "w-full absolute opacity-100 text-primary" }, Mt = /* @__PURE__ */ b({
|
|
1243
1243
|
__name: "Spinner",
|
|
1244
1244
|
props: {
|
|
1245
1245
|
title: {}
|
|
1246
1246
|
},
|
|
1247
1247
|
setup(t) {
|
|
1248
|
-
return (s, e) => (i(),
|
|
1249
|
-
o("div",
|
|
1250
|
-
o("div",
|
|
1248
|
+
return (s, e) => (i(), c("div", Kt, [
|
|
1249
|
+
o("div", Wt, [
|
|
1250
|
+
o("div", Et, S(t.title), 1),
|
|
1251
1251
|
e[0] || (e[0] = o("div", { class: "animate-ping rounded-full h-32 w-32 border-8 border-white" }, null, -1))
|
|
1252
1252
|
])
|
|
1253
1253
|
]));
|
|
1254
1254
|
}
|
|
1255
|
-
}),
|
|
1255
|
+
}), Ee = (t, s) => {
|
|
1256
1256
|
const e = t.__vccOpts || t;
|
|
1257
1257
|
for (const [n, a] of s)
|
|
1258
1258
|
e[n] = a;
|
|
1259
1259
|
return e;
|
|
1260
|
-
},
|
|
1260
|
+
}, St = {}, Lt = {
|
|
1261
1261
|
class: "w-full h-full flex-1 flex flex-col gap-2 items-end justify-end content-end",
|
|
1262
1262
|
style: { "min-height": "140px" }
|
|
1263
1263
|
};
|
|
1264
|
-
function
|
|
1265
|
-
return i(),
|
|
1264
|
+
function Pt(t, s) {
|
|
1265
|
+
return i(), c("div", Lt, [
|
|
1266
1266
|
T(t.$slots, "default")
|
|
1267
1267
|
]);
|
|
1268
1268
|
}
|
|
1269
|
-
const to = /* @__PURE__ */
|
|
1270
|
-
function
|
|
1271
|
-
return i(),
|
|
1269
|
+
const to = /* @__PURE__ */ Ee(St, [["render", Pt]]), Nt = {}, zt = { className: "w-full flex flex-col items-end" };
|
|
1270
|
+
function Tt(t, s) {
|
|
1271
|
+
return i(), c("div", zt, [
|
|
1272
1272
|
T(t.$slots, "default")
|
|
1273
1273
|
]);
|
|
1274
1274
|
}
|
|
1275
|
-
const so = /* @__PURE__ */
|
|
1275
|
+
const so = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), oo = (t) => {
|
|
1276
1276
|
console.warn("showToast TODO", t);
|
|
1277
|
-
}, no = /* @__PURE__ */
|
|
1277
|
+
}, no = /* @__PURE__ */ b({
|
|
1278
1278
|
__name: "DashboardGrid",
|
|
1279
1279
|
props: {
|
|
1280
1280
|
isEditing: { type: Boolean },
|
|
@@ -1283,25 +1283,25 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1283
1283
|
},
|
|
1284
1284
|
setup(t) {
|
|
1285
1285
|
const s = t, e = (r) => r < 0.8 ? 1 : r <= 1 ? 0 : r > 1 ? -1 : 0, n = v(() => {
|
|
1286
|
-
let r =
|
|
1286
|
+
let r = Ue(Number(s.zoomScale || 0));
|
|
1287
1287
|
return {
|
|
1288
1288
|
"--bwj-dashboard-transform-scale": r,
|
|
1289
1289
|
"--bwj-dashboard-add-cols": e(r)
|
|
1290
1290
|
};
|
|
1291
|
-
}), a = v(() =>
|
|
1291
|
+
}), a = v(() => R(
|
|
1292
1292
|
"dashboard-main-grid w-full",
|
|
1293
1293
|
s.isEditing ? "editing" : "",
|
|
1294
1294
|
s.responsiveGrid ? "responsive-grid" : "",
|
|
1295
1295
|
`border border-dashed ${s.isEditing ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
1296
1296
|
));
|
|
1297
|
-
return (r, d) => (i(),
|
|
1297
|
+
return (r, d) => (i(), c("div", {
|
|
1298
1298
|
class: p(a.value),
|
|
1299
|
-
style:
|
|
1299
|
+
style: ne(n.value)
|
|
1300
1300
|
}, [
|
|
1301
1301
|
T(r.$slots, "default")
|
|
1302
1302
|
], 6));
|
|
1303
1303
|
}
|
|
1304
|
-
}),
|
|
1304
|
+
}), At = { class: "widget-title-wrapper group w-full flex flex-row gap-2 items-center" }, jt = { class: "drag-handle hidden cursor-pointer text-primary group-hover:flex hover:brightness-110 pointer-coarse:flex" }, Ht = { class: "w-full flex flex-row gap-2 items-center justify-between" }, Vt = ["data-testid"], Rt = { class: "actions-inner" }, Ot = { class: "actions-buttons-container" }, Ut = ["data-collapsed"], J = "size-5", Ft = /* @__PURE__ */ b({
|
|
1305
1305
|
__name: "DashboardWidgetBase",
|
|
1306
1306
|
props: {
|
|
1307
1307
|
index: {},
|
|
@@ -1331,25 +1331,25 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1331
1331
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1332
1332
|
setup(t, { emit: s }) {
|
|
1333
1333
|
const e = t, n = s, a = v(() => e.hideTitle && !e.isEditing), r = () => {
|
|
1334
|
-
const
|
|
1335
|
-
return typeof
|
|
1336
|
-
}, d = U(r() ? !1 : e.widgetSavedProps?.isCollapsed || !1),
|
|
1334
|
+
const C = e.meta?.noCollapse;
|
|
1335
|
+
return typeof C < "u" ? C : e.noCollapse || !1;
|
|
1336
|
+
}, d = U(r() ? !1 : e.widgetSavedProps?.isCollapsed || !1), u = (C) => {
|
|
1337
1337
|
if ((e.overrideCssClasses || "").trim().length > 0)
|
|
1338
1338
|
return (e.overrideCssClasses || "").trim();
|
|
1339
1339
|
const m = e.direction || "column", L = e.noBorder;
|
|
1340
|
-
let _ = `dashboard-widget ${
|
|
1340
|
+
let _ = `dashboard-widget ${C ? "collapsed" : ""}`;
|
|
1341
1341
|
return _ = `${_} direction-${m} ${e.isEditing ? "editing" : ""}`, _ = `${_} border border-solid`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (_ = `${_} ${e.size}-widget`), L ? _ = `${_} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? _ = `${_} ${e.borderCssClasses}` : _ = `${_} border-card-invert border-opacity-20`, e.noShadow && (_ = `${_} no-shadow`), e.noPadding && (_ = `${_} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? _ = `${_} ${e.backgroundCssClasses}`.trim() : _ = `${_} bg-card content-card`, (e.addCssClasses || "").trim().length > 0 && (_ = `${_} ${e.addCssClasses}`.trim()), _;
|
|
1342
|
-
},
|
|
1343
|
-
const
|
|
1344
|
-
return
|
|
1342
|
+
}, $ = v(() => R(u(d.value))), g = v(() => {
|
|
1343
|
+
const C = a.value;
|
|
1344
|
+
return R(
|
|
1345
1345
|
"widget-header",
|
|
1346
|
-
|
|
1347
|
-
|
|
1346
|
+
C ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
1347
|
+
C ? "border-opacity-0" : "border-opacity-20"
|
|
1348
1348
|
);
|
|
1349
1349
|
}), l = () => {
|
|
1350
1350
|
e.widgetKey && n("removeClick", e.widgetKey, e.parentWidgetKey);
|
|
1351
|
-
},
|
|
1352
|
-
e.widgetKey && n("moveClick",
|
|
1351
|
+
}, y = (C) => {
|
|
1352
|
+
e.widgetKey && n("moveClick", C, e.widgetKey, e.parentWidgetKey);
|
|
1353
1353
|
}, B = () => {
|
|
1354
1354
|
n("savedPropsChanged", {
|
|
1355
1355
|
parentWidgetKey: e.parentWidgetKey,
|
|
@@ -1359,32 +1359,35 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1359
1359
|
}, I = () => {
|
|
1360
1360
|
e.widgetKey && (d.value = !d.value, B());
|
|
1361
1361
|
};
|
|
1362
|
-
return (
|
|
1363
|
-
class: p(
|
|
1362
|
+
return (C, m) => (i(), c("div", {
|
|
1363
|
+
class: p($.value)
|
|
1364
1364
|
}, [
|
|
1365
1365
|
o("div", {
|
|
1366
|
-
class: p(
|
|
1366
|
+
class: p(g.value)
|
|
1367
1367
|
}, [
|
|
1368
|
-
o("div",
|
|
1369
|
-
o("div", At, [
|
|
1370
|
-
D(u(Be), { class: "size-5" })
|
|
1371
|
-
]),
|
|
1368
|
+
o("div", At, [
|
|
1372
1369
|
o("div", jt, [
|
|
1373
|
-
|
|
1374
|
-
|
|
1370
|
+
D(h(Ke), { class: "size-5" })
|
|
1371
|
+
]),
|
|
1372
|
+
o("div", Ht, [
|
|
1373
|
+
T(C.$slots, "title", {}, () => [
|
|
1374
|
+
o("h2", {
|
|
1375
|
+
class: "widget-title cursor-pointer",
|
|
1376
|
+
onClick: m[0] || (m[0] = j(() => I(), ["stop"]))
|
|
1377
|
+
}, S(t.title), 1)
|
|
1375
1378
|
]),
|
|
1376
|
-
T(
|
|
1379
|
+
T(C.$slots, "title-right")
|
|
1377
1380
|
])
|
|
1378
1381
|
]),
|
|
1379
1382
|
o("div", {
|
|
1380
1383
|
"data-testid": `collapse-and-other-actions_${t.widgetKey}_${t.index}`
|
|
1381
1384
|
}, [
|
|
1382
|
-
o("div",
|
|
1383
|
-
m[
|
|
1385
|
+
o("div", Rt, [
|
|
1386
|
+
m[4] || (m[4] = o("div", null, [
|
|
1384
1387
|
o("span", { class: "hidden" }, "Widget")
|
|
1385
1388
|
], -1)),
|
|
1386
1389
|
o("div", Ot, [
|
|
1387
|
-
D(
|
|
1390
|
+
D(h(H), {
|
|
1388
1391
|
"data-testid": `move-widget-left_${t.widgetKey}_${t.index}`,
|
|
1389
1392
|
isIconButton: !0,
|
|
1390
1393
|
disabled: t.index < 1,
|
|
@@ -1392,16 +1395,16 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1392
1395
|
placement: "top",
|
|
1393
1396
|
title: `${t.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
1394
1397
|
},
|
|
1395
|
-
onClick: m[
|
|
1398
|
+
onClick: m[1] || (m[1] = j((L) => y(-1), ["stop"]))
|
|
1396
1399
|
}, {
|
|
1397
|
-
default:
|
|
1398
|
-
D(
|
|
1399
|
-
class: p(
|
|
1400
|
+
default: M(() => [
|
|
1401
|
+
D(h(Ie), {
|
|
1402
|
+
class: p(J)
|
|
1400
1403
|
})
|
|
1401
1404
|
]),
|
|
1402
1405
|
_: 1
|
|
1403
1406
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1404
|
-
D(
|
|
1407
|
+
D(h(H), {
|
|
1405
1408
|
"data-testid": `move-widget-right_${t.widgetKey}_${t.index}`,
|
|
1406
1409
|
isIconButton: !0,
|
|
1407
1410
|
disabled: t.index >= t.maxIndex,
|
|
@@ -1409,32 +1412,32 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1409
1412
|
placement: "top",
|
|
1410
1413
|
title: `${t.index >= t.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
1411
1414
|
},
|
|
1412
|
-
onClick: m[
|
|
1415
|
+
onClick: m[2] || (m[2] = j((L) => y(1), ["stop"]))
|
|
1413
1416
|
}, {
|
|
1414
|
-
default:
|
|
1415
|
-
D(
|
|
1416
|
-
class: p(
|
|
1417
|
+
default: M(() => [
|
|
1418
|
+
D(h(De), {
|
|
1419
|
+
class: p(J)
|
|
1417
1420
|
})
|
|
1418
1421
|
]),
|
|
1419
1422
|
_: 1
|
|
1420
1423
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1421
|
-
D(
|
|
1424
|
+
D(h(H), {
|
|
1422
1425
|
"data-testid": `remove-container_${t.title}`,
|
|
1423
1426
|
isIconButton: !0,
|
|
1424
1427
|
tooltip: {
|
|
1425
1428
|
placement: "top",
|
|
1426
1429
|
title: "Remove Widget"
|
|
1427
1430
|
},
|
|
1428
|
-
onClick:
|
|
1431
|
+
onClick: j(l, ["stop"])
|
|
1429
1432
|
}, {
|
|
1430
|
-
default:
|
|
1431
|
-
D(
|
|
1432
|
-
class: p(
|
|
1433
|
+
default: M(() => [
|
|
1434
|
+
D(h(Be), {
|
|
1435
|
+
class: p(J)
|
|
1433
1436
|
})
|
|
1434
1437
|
]),
|
|
1435
1438
|
_: 1
|
|
1436
1439
|
}, 8, ["data-testid"]),
|
|
1437
|
-
r() ? Z("", !0) : (i(), N(
|
|
1440
|
+
r() ? Z("", !0) : (i(), N(h(H), {
|
|
1438
1441
|
key: 0,
|
|
1439
1442
|
"data-testid": `collapse-expand_${t.widgetKey}_${t.index}`,
|
|
1440
1443
|
className: "collapse-button",
|
|
@@ -1443,12 +1446,12 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1443
1446
|
placement: "top",
|
|
1444
1447
|
title: `${d.value ? "Expand Widget" : "Collapse Widget"}`
|
|
1445
1448
|
},
|
|
1446
|
-
onClick: m[
|
|
1449
|
+
onClick: m[3] || (m[3] = j(() => I(), ["stop"]))
|
|
1447
1450
|
}, {
|
|
1448
|
-
default:
|
|
1449
|
-
D(
|
|
1450
|
-
class: p(
|
|
1451
|
-
style:
|
|
1451
|
+
default: M(() => [
|
|
1452
|
+
D(h(me), {
|
|
1453
|
+
class: p(J),
|
|
1454
|
+
style: ne({
|
|
1452
1455
|
transform: d.value ? "rotate(0deg)" : "rotate(180deg)",
|
|
1453
1456
|
transition: "transform 0.2s ease-in-out"
|
|
1454
1457
|
})
|
|
@@ -1458,13 +1461,13 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1458
1461
|
}, 8, ["data-testid", "tooltip"]))
|
|
1459
1462
|
])
|
|
1460
1463
|
])
|
|
1461
|
-
], 8,
|
|
1464
|
+
], 8, Vt)
|
|
1462
1465
|
], 2),
|
|
1463
1466
|
o("div", {
|
|
1464
1467
|
class: "widget-inner transition-height duration-300 ease-in-out",
|
|
1465
1468
|
"data-collapsed": d.value
|
|
1466
1469
|
}, [
|
|
1467
|
-
T(
|
|
1470
|
+
T(C.$slots, "default")
|
|
1468
1471
|
], 8, Ut)
|
|
1469
1472
|
], 2));
|
|
1470
1473
|
}
|
|
@@ -1474,7 +1477,7 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1474
1477
|
}, Xt = { class: "font-bold text-sm" }, Qt = { class: "flex flex-col text-xs" }, Yt = { class: "flex flex-col mt-3" }, Jt = { class: "ml-2 flex flex-col text-xs" }, es = {
|
|
1475
1478
|
key: 1,
|
|
1476
1479
|
class: "flex flex-col"
|
|
1477
|
-
}, ts = { class: "flex flex-col mt-3" }, ss = { class: "text-xs break-all" },
|
|
1480
|
+
}, ts = { class: "flex flex-col mt-3" }, ss = { class: "text-xs break-all" }, xe = /* @__PURE__ */ b({
|
|
1478
1481
|
__name: "WidgetErrorWrapper",
|
|
1479
1482
|
props: {
|
|
1480
1483
|
index: {},
|
|
@@ -1503,53 +1506,44 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1503
1506
|
},
|
|
1504
1507
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1505
1508
|
setup(t, { emit: s }) {
|
|
1506
|
-
const e = t,
|
|
1507
|
-
return (
|
|
1508
|
-
|
|
1509
|
-
title: "Widget Error",
|
|
1510
|
-
parentWidgetKey: t.parentWidgetKey,
|
|
1511
|
-
index: t.index,
|
|
1512
|
-
maxIndex: t.maxIndex,
|
|
1513
|
-
isEditing: t.isEditing,
|
|
1514
|
-
onRemoveClick: u(a),
|
|
1515
|
-
onMoveClick: u(r)
|
|
1516
|
-
}, {
|
|
1517
|
-
default: E(() => [
|
|
1509
|
+
const e = t, a = Y(s), r = v(() => e.extraProps);
|
|
1510
|
+
return (d, u) => (i(), N(Ft, Q(e, pe(h(a)), { title: "Widget Error" }), {
|
|
1511
|
+
default: M(() => [
|
|
1518
1512
|
o("div", qt, [
|
|
1519
1513
|
o("span", Gt, 'Failed to load "' + S(t.widgetKey) + '"', 1),
|
|
1520
|
-
|
|
1514
|
+
r.value?.versionMismatch ? (i(), c("div", Zt, [
|
|
1521
1515
|
o("span", Xt, "Version Mismatch: " + S(t.widgetKey), 1),
|
|
1522
1516
|
o("div", Qt, [
|
|
1523
|
-
o("span", null, "Widget requires: Vue " + S(
|
|
1524
|
-
o("span", null, "Host version: " + S(
|
|
1517
|
+
o("span", null, "Widget requires: Vue " + S(r.value?.requiredVer) + ".", 1),
|
|
1518
|
+
o("span", null, "Host version: " + S(r.value?.hostVer) + ".", 1)
|
|
1525
1519
|
]),
|
|
1526
1520
|
o("div", Yt, [
|
|
1527
|
-
|
|
1521
|
+
u[0] || (u[0] = o("h5", null, "Externals:", -1)),
|
|
1528
1522
|
o("dl", Jt, [
|
|
1529
|
-
(i(!0),
|
|
1530
|
-
key: `dep-${
|
|
1531
|
-
}, "- " + S(
|
|
1523
|
+
(i(!0), c(q, null, G(r.value?.externalDependencies, ($, g) => (i(), c("dd", {
|
|
1524
|
+
key: `dep-${g}`
|
|
1525
|
+
}, "- " + S($), 1))), 128))
|
|
1532
1526
|
])
|
|
1533
1527
|
])
|
|
1534
|
-
])) : (i(),
|
|
1535
|
-
|
|
1528
|
+
])) : (i(), c("div", es, [
|
|
1529
|
+
u[2] || (u[2] = o("div", { class: "flex flex-col text-xs italic" }, [
|
|
1536
1530
|
o("span", null, "The remote plugin is unavailable.")
|
|
1537
1531
|
], -1)),
|
|
1538
|
-
|
|
1532
|
+
u[3] || (u[3] = o("span", { class: "font-bold text-sm" }, "Error Details:", -1)),
|
|
1539
1533
|
o("div", ts, [
|
|
1540
|
-
|
|
1541
|
-
o("div", ss, S(
|
|
1534
|
+
u[1] || (u[1] = o("h5", null, "Details:", -1)),
|
|
1535
|
+
o("div", ss, S(r.value?.errorMessage || "Unknown error occurred."), 1)
|
|
1542
1536
|
])
|
|
1543
1537
|
]))
|
|
1544
1538
|
])
|
|
1545
1539
|
]),
|
|
1546
1540
|
_: 1
|
|
1547
|
-
},
|
|
1541
|
+
}, 16));
|
|
1548
1542
|
}
|
|
1549
1543
|
}), os = {
|
|
1550
1544
|
key: 1,
|
|
1551
1545
|
class: "flex items-center justify-center p-8 border border-dashed border-base-300"
|
|
1552
|
-
}, ns = { class: "text-sm animate-pulse" },
|
|
1546
|
+
}, ns = { class: "text-sm animate-pulse" }, rs = { class: "relative min-h-12 flex flex-col items-center justify-center bg-base-200 rounded-lg" }, ro = /* @__PURE__ */ b({
|
|
1553
1547
|
__name: "DynamicWidgetLoader",
|
|
1554
1548
|
props: {
|
|
1555
1549
|
index: {},
|
|
@@ -1565,31 +1559,31 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1565
1559
|
},
|
|
1566
1560
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1567
1561
|
setup(t, { emit: s }) {
|
|
1568
|
-
const e = (K,
|
|
1569
|
-
const
|
|
1562
|
+
const e = (K, x) => {
|
|
1563
|
+
const E = (X) => X.replace(/[^0-9.]/g, ""), z = E(K).split(".").map(Number), P = E(x).split(".").map(Number);
|
|
1570
1564
|
return !(z[0] !== P[0] || z[1] < P[1]);
|
|
1571
|
-
}, n = t, r =
|
|
1565
|
+
}, n = t, r = Y(s), d = v(() => `${n.widgetKey}`.split("_")), u = v(() => d.value.length > 1), $ = v(() => u.value ? d.value[0] : n.widgetKey), g = v(() => u.value ? ke(n.widgetKey) : ""), l = v(() => n.widgetCatalog.get($.value)), y = fe(null), B = fe(null), I = v(() => B.value ? {
|
|
1572
1566
|
...n.extraProps,
|
|
1573
1567
|
...B.value
|
|
1574
1568
|
} : n.extraProps);
|
|
1575
|
-
|
|
1569
|
+
Ae(async () => {
|
|
1576
1570
|
const K = l.value;
|
|
1577
1571
|
if (!K) return;
|
|
1578
1572
|
if (B.value = null, K.component) {
|
|
1579
|
-
|
|
1573
|
+
y.value = K.component;
|
|
1580
1574
|
return;
|
|
1581
1575
|
}
|
|
1582
|
-
const
|
|
1576
|
+
const x = typeof __HOST_VUE_VERSION__ < "u" ? __HOST_VUE_VERSION__ : "3.5.26", E = K.meta?.externalDependencies || [], z = E.find((P) => P.startsWith("vue@"));
|
|
1583
1577
|
if (z) {
|
|
1584
1578
|
const P = z.split("@")[1];
|
|
1585
|
-
if (!e(
|
|
1579
|
+
if (!e(x, P)) {
|
|
1586
1580
|
B.value = {
|
|
1587
|
-
hostVer:
|
|
1581
|
+
hostVer: x,
|
|
1588
1582
|
requiredVer: P,
|
|
1589
|
-
externalDependencies:
|
|
1590
|
-
errorMessage: `Incompatible Vue version. Required: ${P}, Host: ${
|
|
1583
|
+
externalDependencies: E,
|
|
1584
|
+
errorMessage: `Incompatible Vue version. Required: ${P}, Host: ${x}`,
|
|
1591
1585
|
versionMismatch: !0
|
|
1592
|
-
},
|
|
1586
|
+
}, y.value = te(xe);
|
|
1593
1587
|
return;
|
|
1594
1588
|
}
|
|
1595
1589
|
}
|
|
@@ -1597,37 +1591,37 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1597
1591
|
try {
|
|
1598
1592
|
if (K.isRemote) {
|
|
1599
1593
|
const P = await K.loader();
|
|
1600
|
-
|
|
1594
|
+
y.value = te(P.default || P);
|
|
1601
1595
|
} else
|
|
1602
|
-
|
|
1596
|
+
y.value = je(K.loader);
|
|
1603
1597
|
} catch (P) {
|
|
1604
1598
|
console.error(`Widget Load Error [${n.widgetKey}]:`, P), B.value = {
|
|
1605
|
-
hostVer:
|
|
1599
|
+
hostVer: x,
|
|
1606
1600
|
requiredVer: z ? z.split("@")[1] : "Unknown",
|
|
1607
|
-
externalDependencies:
|
|
1601
|
+
externalDependencies: E,
|
|
1608
1602
|
errorMessage: P.message,
|
|
1609
1603
|
versionMismatch: !1
|
|
1610
|
-
},
|
|
1604
|
+
}, y.value = te(xe);
|
|
1611
1605
|
}
|
|
1612
1606
|
});
|
|
1613
|
-
const
|
|
1614
|
-
r.removeClick(K,
|
|
1615
|
-
}, L = (K,
|
|
1616
|
-
r.moveClick(K,
|
|
1607
|
+
const C = v(() => u.value ? (n.childWidgetsConfig || []).filter((K) => K.parentWidgetKey === n.widgetKey) : []), m = (K, x) => {
|
|
1608
|
+
r.removeClick(K, x);
|
|
1609
|
+
}, L = (K, x, E) => {
|
|
1610
|
+
r.moveClick(K, x, E);
|
|
1617
1611
|
}, _ = (K) => {
|
|
1618
1612
|
r.selectContainer(K);
|
|
1619
|
-
},
|
|
1613
|
+
}, A = (K) => {
|
|
1620
1614
|
r.savedPropsChanged(K);
|
|
1621
|
-
}, F = (K,
|
|
1622
|
-
(
|
|
1615
|
+
}, F = (K, x) => (x || "").trim().length > 0 ? (n.savedProps || []).find(
|
|
1616
|
+
(E) => E.parentWidgetKey === x && E.widgetKey === K
|
|
1623
1617
|
) : (n.savedProps || []).find(
|
|
1624
|
-
(
|
|
1618
|
+
(E) => (E.parentWidgetKey || "").trim().length === 0 && E.widgetKey === K
|
|
1625
1619
|
);
|
|
1626
|
-
return (K,
|
|
1627
|
-
const
|
|
1628
|
-
return i(), N(
|
|
1629
|
-
default:
|
|
1630
|
-
|
|
1620
|
+
return (K, x) => {
|
|
1621
|
+
const E = He("DynamicWidgetLoader", !0);
|
|
1622
|
+
return i(), N(Ve, null, {
|
|
1623
|
+
default: M(() => [
|
|
1624
|
+
y.value ? (i(), N(he(y.value), {
|
|
1631
1625
|
key: 0,
|
|
1632
1626
|
index: t.index,
|
|
1633
1627
|
maxIndex: t.maxIndex,
|
|
@@ -1635,23 +1629,23 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1635
1629
|
parentWidgetKey: t.parentWidgetKey,
|
|
1636
1630
|
widgetCatalog: t.widgetCatalog,
|
|
1637
1631
|
isEditing: t.isEditing,
|
|
1638
|
-
highlight:
|
|
1639
|
-
title:
|
|
1632
|
+
highlight: u.value && t.targetContainerKey === t.widgetKey || !1,
|
|
1633
|
+
title: u.value ? g.value : l.value?.meta?.name || l.value?.title,
|
|
1640
1634
|
meta: l.value?.meta,
|
|
1641
1635
|
widgetSavedProps: F(t.widgetKey, t.parentWidgetKey),
|
|
1642
1636
|
extraProps: I.value,
|
|
1643
1637
|
onRemoveClick: m,
|
|
1644
1638
|
onMoveClick: L,
|
|
1645
1639
|
onSelectContainer: _,
|
|
1646
|
-
onSavedPropsChanged:
|
|
1647
|
-
},
|
|
1648
|
-
|
|
1640
|
+
onSavedPropsChanged: A
|
|
1641
|
+
}, Re({ _: 2 }, [
|
|
1642
|
+
u.value ? {
|
|
1649
1643
|
name: "default",
|
|
1650
|
-
fn:
|
|
1651
|
-
(i(!0),
|
|
1644
|
+
fn: M(() => [
|
|
1645
|
+
(i(!0), c(q, null, G(C.value, (z, P) => (i(), N(E, {
|
|
1652
1646
|
key: `${z.widgetKey}_${P}`,
|
|
1653
1647
|
index: P,
|
|
1654
|
-
maxIndex:
|
|
1648
|
+
maxIndex: C.value.length - 1,
|
|
1655
1649
|
widgetKey: z.widgetKey,
|
|
1656
1650
|
parentWidgetKey: z.parentWidgetKey,
|
|
1657
1651
|
widgetCatalog: t.widgetCatalog,
|
|
@@ -1659,29 +1653,30 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1659
1653
|
savedProps: t.savedProps,
|
|
1660
1654
|
extraProps: t.extraProps,
|
|
1661
1655
|
onRemoveClick: m,
|
|
1662
|
-
onMoveClick: L
|
|
1656
|
+
onMoveClick: L,
|
|
1657
|
+
onSavedPropsChanged: A
|
|
1663
1658
|
}, null, 8, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "savedProps", "extraProps"]))), 128))
|
|
1664
1659
|
]),
|
|
1665
1660
|
key: "0"
|
|
1666
1661
|
} : void 0
|
|
1667
|
-
]), 1064, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "meta", "widgetSavedProps", "extraProps"])) : (i(),
|
|
1662
|
+
]), 1064, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "meta", "widgetSavedProps", "extraProps"])) : (i(), c("div", os, [
|
|
1668
1663
|
o("p", ns, "Initializing " + S(t.widgetKey) + "...", 1)
|
|
1669
1664
|
]))
|
|
1670
1665
|
]),
|
|
1671
|
-
fallback:
|
|
1672
|
-
o("div",
|
|
1673
|
-
D(
|
|
1666
|
+
fallback: M(() => [
|
|
1667
|
+
o("div", rs, [
|
|
1668
|
+
D(h(Mt), {
|
|
1674
1669
|
title: `Loading ${l.value?.title || "Widget"}`
|
|
1675
1670
|
}, null, 8, ["title"]),
|
|
1676
|
-
|
|
1677
|
-
|
|
1671
|
+
x[0] || (x[0] = o("div", { class: "animate-ping absolute h-24 w-24 rounded-full border-4 border-primary opacity-20" }, null, -1)),
|
|
1672
|
+
x[1] || (x[1] = o("div", { class: "animate-spin h-12 w-12 rounded-full border-4 border-primary border-t-transparent" }, null, -1))
|
|
1678
1673
|
])
|
|
1679
1674
|
]),
|
|
1680
1675
|
_: 1
|
|
1681
1676
|
});
|
|
1682
1677
|
};
|
|
1683
1678
|
}
|
|
1684
|
-
}),
|
|
1679
|
+
}), as = ["data-testid"], is = { class: "text-sm font-semibold capitalize" }, ls = { "data-testid": "collapse-and-other-actions" }, ds = { class: "actions-inner" }, cs = { class: "actions-buttons-container" }, us = ["data-testid"], ee = "size-5", gs = "border-transparent", ps = "border-card-invert", Me = /* @__PURE__ */ b({
|
|
1685
1680
|
__name: "WidgetContainer",
|
|
1686
1681
|
props: {
|
|
1687
1682
|
index: {},
|
|
@@ -1710,66 +1705,66 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1710
1705
|
},
|
|
1711
1706
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1712
1707
|
setup(t, { emit: s }) {
|
|
1713
|
-
const e = t, a =
|
|
1708
|
+
const e = t, a = Y(s), r = v(() => e.maxIndex > -1), d = v(() => {
|
|
1714
1709
|
const B = r.value;
|
|
1715
1710
|
return e.highlight ? gs : e.isEditing && !B ? ps : "border-transparent";
|
|
1716
|
-
}),
|
|
1717
|
-
const B = e.highlight || !1, I = e.direction || "column",
|
|
1718
|
-
let
|
|
1711
|
+
}), u = v(() => {
|
|
1712
|
+
const B = e.highlight || !1, I = e.direction || "column", C = r.value, m = e.isEditing || !1;
|
|
1713
|
+
let A = B ? "border-transparent" : m ? "border-card-invert" : "border-transparent";
|
|
1719
1714
|
const F = ["large", "xlarge"].includes(e.size || "");
|
|
1720
1715
|
let K = "";
|
|
1721
1716
|
["large", "xlarge"].indexOf(e.size || "") > -1 && (K = `${e.size}-widget`);
|
|
1722
|
-
let
|
|
1723
|
-
return I === "row" && !
|
|
1717
|
+
let x = "";
|
|
1718
|
+
return I === "row" && !C ? x = "min-h-48" : I === "column" && !C && (x = "min-h-96"), R(
|
|
1724
1719
|
"dashboard-widget-container relative ",
|
|
1725
|
-
|
|
1720
|
+
C ? "" : "has-no-children",
|
|
1726
1721
|
m ? "editing" : "",
|
|
1727
|
-
|
|
1722
|
+
x,
|
|
1728
1723
|
K,
|
|
1729
1724
|
F ? "widget-container-grid" : "widget-container-flex",
|
|
1730
1725
|
`direction-${I}`,
|
|
1731
|
-
`border ${
|
|
1732
|
-
`${B ? "highlight-container" : ""} ${
|
|
1726
|
+
`border ${A}`,
|
|
1727
|
+
`${B ? "highlight-container" : ""} ${A}`
|
|
1733
1728
|
);
|
|
1734
|
-
}),
|
|
1729
|
+
}), $ = v(() => `widget-container-header direction-${e.direction} flex items-center border ${d.value}`), g = () => {
|
|
1735
1730
|
e.widgetKey && a.removeClick(e.widgetKey);
|
|
1736
1731
|
}, l = (B) => {
|
|
1737
1732
|
e.widgetKey && a.moveClick(B, e.widgetKey, e.parentWidgetKey);
|
|
1738
|
-
},
|
|
1733
|
+
}, y = () => {
|
|
1739
1734
|
e.widgetKey && a.selectContainer(e.widgetKey);
|
|
1740
1735
|
};
|
|
1741
|
-
return (B, I) => (i(),
|
|
1736
|
+
return (B, I) => (i(), c("div", {
|
|
1742
1737
|
"data-testid": `container_${e.widgetKey}`,
|
|
1743
1738
|
"data-change": "asd",
|
|
1744
|
-
class: p(
|
|
1739
|
+
class: p(u.value)
|
|
1745
1740
|
}, [
|
|
1746
1741
|
o("div", {
|
|
1747
|
-
class: p(
|
|
1742
|
+
class: p($.value)
|
|
1748
1743
|
}, [
|
|
1749
1744
|
o("div", {
|
|
1750
1745
|
class: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
1751
|
-
onClick:
|
|
1746
|
+
onClick: j(y, ["stop"])
|
|
1752
1747
|
}, [
|
|
1753
1748
|
o("span", is, S(e.title), 1)
|
|
1754
1749
|
]),
|
|
1755
1750
|
o("div", ls, [
|
|
1756
1751
|
o("div", ds, [
|
|
1757
1752
|
o("div", cs, [
|
|
1758
|
-
D(
|
|
1753
|
+
D(h(H), {
|
|
1759
1754
|
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
1760
1755
|
isIconButton: !0,
|
|
1761
1756
|
class: "whitespace-nowrap",
|
|
1762
1757
|
tooltip: { placement: "top", title: "Target this Container" },
|
|
1763
|
-
onClick:
|
|
1758
|
+
onClick: j(y, ["stop"])
|
|
1764
1759
|
}, {
|
|
1765
|
-
default:
|
|
1766
|
-
D(
|
|
1767
|
-
class: p(`${
|
|
1760
|
+
default: M(() => [
|
|
1761
|
+
D(h(ut), {
|
|
1762
|
+
class: p(`${ee} ${e.highlight ? "text-success" : "text-disabled"}`)
|
|
1768
1763
|
}, null, 8, ["class"])
|
|
1769
1764
|
]),
|
|
1770
1765
|
_: 1
|
|
1771
1766
|
}, 8, ["data-testid"]),
|
|
1772
|
-
D(
|
|
1767
|
+
D(h(H), {
|
|
1773
1768
|
"data-testid": `move-container-left_${e.title}`,
|
|
1774
1769
|
isIconButton: !0,
|
|
1775
1770
|
disabled: e.index < 1,
|
|
@@ -1777,16 +1772,16 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1777
1772
|
placement: "top",
|
|
1778
1773
|
title: e.index < 1 ? "Already at min position" : "Move Container to the left/up"
|
|
1779
1774
|
},
|
|
1780
|
-
onClick: I[0] || (I[0] =
|
|
1775
|
+
onClick: I[0] || (I[0] = j((C) => l(-1), ["stop"]))
|
|
1781
1776
|
}, {
|
|
1782
|
-
default:
|
|
1783
|
-
D(
|
|
1784
|
-
class: p(
|
|
1777
|
+
default: M(() => [
|
|
1778
|
+
D(h(Ie), {
|
|
1779
|
+
class: p(ee)
|
|
1785
1780
|
})
|
|
1786
1781
|
]),
|
|
1787
1782
|
_: 1
|
|
1788
1783
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1789
|
-
D(
|
|
1784
|
+
D(h(H), {
|
|
1790
1785
|
"data-testid": `move-container-right_${e.title}`,
|
|
1791
1786
|
isIconButton: !0,
|
|
1792
1787
|
disabled: e.index >= e.maxIndex,
|
|
@@ -1794,24 +1789,24 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1794
1789
|
placement: "top",
|
|
1795
1790
|
title: e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"
|
|
1796
1791
|
},
|
|
1797
|
-
onClick: I[1] || (I[1] =
|
|
1792
|
+
onClick: I[1] || (I[1] = j((C) => l(1), ["stop"]))
|
|
1798
1793
|
}, {
|
|
1799
|
-
default:
|
|
1800
|
-
D(
|
|
1801
|
-
class: p(
|
|
1794
|
+
default: M(() => [
|
|
1795
|
+
D(h(De), {
|
|
1796
|
+
class: p(ee)
|
|
1802
1797
|
})
|
|
1803
1798
|
]),
|
|
1804
1799
|
_: 1
|
|
1805
1800
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1806
|
-
D(
|
|
1801
|
+
D(h(H), {
|
|
1807
1802
|
"data-testid": `remove-container_${e.title}`,
|
|
1808
1803
|
isIconButton: !0,
|
|
1809
1804
|
tooltip: { placement: "top", title: "Remove Container" },
|
|
1810
|
-
onClick:
|
|
1805
|
+
onClick: j(g, ["stop"])
|
|
1811
1806
|
}, {
|
|
1812
|
-
default:
|
|
1813
|
-
D(
|
|
1814
|
-
class: p(
|
|
1807
|
+
default: M(() => [
|
|
1808
|
+
D(h(Be), {
|
|
1809
|
+
class: p(ee)
|
|
1815
1810
|
})
|
|
1816
1811
|
]),
|
|
1817
1812
|
_: 1
|
|
@@ -1826,9 +1821,9 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1826
1821
|
}, [
|
|
1827
1822
|
T(B.$slots, "default")
|
|
1828
1823
|
], 8, us)
|
|
1829
|
-
], 10,
|
|
1824
|
+
], 10, as));
|
|
1830
1825
|
}
|
|
1831
|
-
}),
|
|
1826
|
+
}), ao = /* @__PURE__ */ b({
|
|
1832
1827
|
__name: "WidgetContainerRow",
|
|
1833
1828
|
props: {
|
|
1834
1829
|
index: {},
|
|
@@ -1857,22 +1852,18 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1857
1852
|
},
|
|
1858
1853
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1859
1854
|
setup(t, { emit: s }) {
|
|
1860
|
-
const e = t,
|
|
1861
|
-
const { direction:
|
|
1862
|
-
return
|
|
1855
|
+
const e = t, a = Y(s), r = v(() => {
|
|
1856
|
+
const { direction: d, ...u } = e;
|
|
1857
|
+
return u;
|
|
1863
1858
|
});
|
|
1864
|
-
return (
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
onSelectContainer: u(d)
|
|
1868
|
-
}), {
|
|
1869
|
-
default: E(() => [
|
|
1870
|
-
T(h.$slots, "default")
|
|
1859
|
+
return (d, u) => (i(), N(Me, Q({ direction: "row" }, r.value, pe(h(a))), {
|
|
1860
|
+
default: M(() => [
|
|
1861
|
+
T(d.$slots, "default")
|
|
1871
1862
|
]),
|
|
1872
1863
|
_: 3
|
|
1873
|
-
}, 16
|
|
1864
|
+
}, 16));
|
|
1874
1865
|
}
|
|
1875
|
-
}), io = /* @__PURE__ */
|
|
1866
|
+
}), io = /* @__PURE__ */ b({
|
|
1876
1867
|
__name: "WidgetContainerLarge",
|
|
1877
1868
|
props: {
|
|
1878
1869
|
index: {},
|
|
@@ -1901,22 +1892,18 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1901
1892
|
},
|
|
1902
1893
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1903
1894
|
setup(t, { emit: s }) {
|
|
1904
|
-
const e = t,
|
|
1905
|
-
const { size:
|
|
1906
|
-
return
|
|
1895
|
+
const e = t, a = Y(s), r = v(() => {
|
|
1896
|
+
const { size: d, ...u } = e;
|
|
1897
|
+
return u;
|
|
1907
1898
|
});
|
|
1908
|
-
return (
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
onSelectContainer: u(d)
|
|
1912
|
-
}), {
|
|
1913
|
-
default: E(() => [
|
|
1914
|
-
T(h.$slots, "default")
|
|
1899
|
+
return (d, u) => (i(), N(Me, Q({ size: "large" }, r.value, pe(h(a))), {
|
|
1900
|
+
default: M(() => [
|
|
1901
|
+
T(d.$slots, "default")
|
|
1915
1902
|
]),
|
|
1916
1903
|
_: 3
|
|
1917
|
-
}, 16
|
|
1904
|
+
}, 16));
|
|
1918
1905
|
}
|
|
1919
|
-
}), hs = { class: "w-full" }, ms = { class: "flex flex-row items-center gap-2 justify-between" }, fs = { class: "font-bold" }, vs = { class: "text-xs" },
|
|
1906
|
+
}), hs = { class: "w-full" }, ms = { class: "flex flex-row items-center gap-2 justify-between" }, fs = { class: "font-bold" }, vs = { class: "text-xs" }, ws = { class: "flex flex-col gap-2 text-xs" }, Cs = { class: "ml-2 flex flex-col text-xs" }, ue = /* @__PURE__ */ b({
|
|
1920
1907
|
__name: "WidgetListItem",
|
|
1921
1908
|
props: {
|
|
1922
1909
|
widgetKey: {},
|
|
@@ -1925,103 +1912,103 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
1925
1912
|
},
|
|
1926
1913
|
emits: ["addWidget"],
|
|
1927
1914
|
setup(t, { emit: s }) {
|
|
1928
|
-
const e = t, n = s, a = U(!1), r = e.metaData, d = r?.icon ||
|
|
1915
|
+
const e = t, n = s, a = U(!1), r = e.metaData, d = r?.icon || gt, u = r?.name || "Unknown", $ = r?.description || "---", g = r?.noDuplicatedWidgets || !1, l = v(() => g && e?.alreadyAdded), y = v(() => R(`
|
|
1929
1916
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
1930
1917
|
${l.value ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
1931
1918
|
`)), B = () => {
|
|
1932
1919
|
l.value || n("addWidget");
|
|
1933
|
-
}, I = (
|
|
1934
|
-
|
|
1920
|
+
}, I = (C) => {
|
|
1921
|
+
C.stopPropagation(), C.preventDefault(), a.value = !a.value;
|
|
1935
1922
|
};
|
|
1936
|
-
return (
|
|
1937
|
-
class: p(
|
|
1923
|
+
return (C, m) => (i(), c("div", {
|
|
1924
|
+
class: p(y.value),
|
|
1938
1925
|
style: { width: "calc(100% - 1rem)" },
|
|
1939
1926
|
onClick: B
|
|
1940
1927
|
}, [
|
|
1941
|
-
(i(), N(
|
|
1928
|
+
(i(), N(he(h(d)), { class: "" })),
|
|
1942
1929
|
o("div", hs, [
|
|
1943
1930
|
o("div", ms, [
|
|
1944
|
-
o("span", fs, S(u
|
|
1931
|
+
o("span", fs, S(h(u)), 1),
|
|
1945
1932
|
o("div", vs, S(l.value ? "(Added)" : ""), 1)
|
|
1946
1933
|
]),
|
|
1947
|
-
o("div",
|
|
1948
|
-
o("div", null, S(
|
|
1949
|
-
a.value &&
|
|
1934
|
+
o("div", ws, [
|
|
1935
|
+
o("div", null, S(h($)), 1),
|
|
1936
|
+
a.value && h(r)?.externalDependencies?.length > 0 ? (i(), c("div", {
|
|
1950
1937
|
key: 0,
|
|
1951
1938
|
class: "mt-3 cursor-pointer",
|
|
1952
1939
|
onClick: I
|
|
1953
1940
|
}, [
|
|
1954
|
-
m[0] || (m[0] =
|
|
1955
|
-
o("dl",
|
|
1956
|
-
(i(!0),
|
|
1941
|
+
m[0] || (m[0] = _e(" Externals: ", -1)),
|
|
1942
|
+
o("dl", Cs, [
|
|
1943
|
+
(i(!0), c(q, null, G(h(r)?.externalDependencies, (L, _) => (i(), c("dd", { key: _ }, "- " + S(L), 1))), 128))
|
|
1957
1944
|
])
|
|
1958
1945
|
])) : Z("", !0)
|
|
1959
1946
|
])
|
|
1960
1947
|
])
|
|
1961
1948
|
], 2));
|
|
1962
1949
|
}
|
|
1963
|
-
}), xs = { class: "w-full flex flex-col" }, ys = { class: "font-bold" }, bs = { class: "flex flex-col text-xs" },
|
|
1950
|
+
}), xs = { class: "w-full flex flex-col" }, ys = { class: "font-bold" }, bs = { class: "flex flex-col text-xs" }, _s = { class: "mt-1 flex flex-row gap-2 items-center" }, ks = /* @__PURE__ */ b({
|
|
1964
1951
|
__name: "SettingListItem",
|
|
1965
1952
|
props: {
|
|
1966
1953
|
item: {}
|
|
1967
1954
|
},
|
|
1968
1955
|
emits: ["settingChanged"],
|
|
1969
1956
|
setup(t, { emit: s }) {
|
|
1970
|
-
const e = t, n = s, a = e.item.name || "Unknown", r = e.item.description || "---", d =
|
|
1957
|
+
const e = t, n = s, a = e.item.name || "Unknown", r = e.item.description || "---", d = R(`
|
|
1971
1958
|
flex flex-row gap-2 px-2 text-sm backdrop-opacity-100
|
|
1972
|
-
`),
|
|
1959
|
+
`), u = (g) => {
|
|
1973
1960
|
n("settingChanged", {
|
|
1974
1961
|
...e.item,
|
|
1975
|
-
value:
|
|
1962
|
+
value: g || ""
|
|
1976
1963
|
});
|
|
1977
|
-
},
|
|
1978
|
-
const l =
|
|
1964
|
+
}, $ = (g) => {
|
|
1965
|
+
const l = Fe.incrementOrDecrementValue(e.item, g);
|
|
1979
1966
|
n("settingChanged", l);
|
|
1980
1967
|
};
|
|
1981
|
-
return (
|
|
1982
|
-
class: p(
|
|
1968
|
+
return (g, l) => (i(), c("div", {
|
|
1969
|
+
class: p(h(d)),
|
|
1983
1970
|
style: { width: "calc(100% - 1rem)" }
|
|
1984
1971
|
}, [
|
|
1985
1972
|
o("div", xs, [
|
|
1986
|
-
o("h6", ys, S(
|
|
1987
|
-
o("p", bs, S(
|
|
1988
|
-
o("div",
|
|
1989
|
-
D(
|
|
1973
|
+
o("h6", ys, S(h(a)), 1),
|
|
1974
|
+
o("p", bs, S(h(r)), 1),
|
|
1975
|
+
o("div", _s, [
|
|
1976
|
+
D(h(We), {
|
|
1990
1977
|
label: "",
|
|
1991
1978
|
size: "small",
|
|
1992
1979
|
class: "w-full",
|
|
1993
1980
|
modelValue: t.item.value,
|
|
1994
|
-
"onUpdate:modelValue":
|
|
1981
|
+
"onUpdate:modelValue": u,
|
|
1995
1982
|
onKeydown: [
|
|
1996
|
-
l[0] || (l[0] =
|
|
1997
|
-
l[1] || (l[1] =
|
|
1983
|
+
l[0] || (l[0] = ve(j((y) => $(1), ["prevent"]), ["up"])),
|
|
1984
|
+
l[1] || (l[1] = ve(j((y) => $(-1), ["prevent"]), ["down"]))
|
|
1998
1985
|
]
|
|
1999
1986
|
}, null, 8, ["modelValue"]),
|
|
2000
|
-
D(
|
|
1987
|
+
D(h(H), {
|
|
2001
1988
|
"data-testid": `setting-decrease_${t.item.key}`,
|
|
2002
1989
|
isIconButton: !0,
|
|
2003
1990
|
tooltip: {
|
|
2004
1991
|
placement: "top",
|
|
2005
1992
|
title: "Decrease Value"
|
|
2006
1993
|
},
|
|
2007
|
-
onClick: l[2] || (l[2] = () =>
|
|
1994
|
+
onClick: l[2] || (l[2] = () => $(-1))
|
|
2008
1995
|
}, {
|
|
2009
|
-
default:
|
|
2010
|
-
D(
|
|
1996
|
+
default: M(() => [
|
|
1997
|
+
D(h(rt))
|
|
2011
1998
|
]),
|
|
2012
1999
|
_: 1
|
|
2013
2000
|
}, 8, ["data-testid"]),
|
|
2014
|
-
D(
|
|
2001
|
+
D(h(H), {
|
|
2015
2002
|
"data-testid": `setting-increase_${t.item.key}`,
|
|
2016
2003
|
isIconButton: !0,
|
|
2017
2004
|
tooltip: {
|
|
2018
2005
|
placement: "top",
|
|
2019
2006
|
title: "Increase Value"
|
|
2020
2007
|
},
|
|
2021
|
-
onClick: l[3] || (l[3] = () =>
|
|
2008
|
+
onClick: l[3] || (l[3] = () => $(1))
|
|
2022
2009
|
}, {
|
|
2023
|
-
default:
|
|
2024
|
-
D(
|
|
2010
|
+
default: M(() => [
|
|
2011
|
+
D(h(nt))
|
|
2025
2012
|
]),
|
|
2026
2013
|
_: 1
|
|
2027
2014
|
}, 8, ["data-testid"])
|
|
@@ -2029,13 +2016,13 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2029
2016
|
])
|
|
2030
2017
|
], 2));
|
|
2031
2018
|
}
|
|
2032
|
-
}), $s = { class: "flex flex-col gap-2 p-2" }, Is = { class: "flex flex-row gap-2 justify-between" }, Ds = ["title"], Bs = { class: "flex flex-row gap-2 items-center" }, Ks = { class: "hidden sm:flex sm:flex-row sm:items-center sm:gap-1" }, Ws = ["onClick"],
|
|
2019
|
+
}), $s = { class: "flex flex-col gap-2 p-2" }, Is = { class: "flex flex-row gap-2 justify-between" }, Ds = ["title"], Bs = { class: "flex flex-row gap-2 items-center" }, Ks = { class: "hidden sm:flex sm:flex-row sm:items-center sm:gap-1" }, Ws = ["onClick"], Es = { class: "flex flex-col gap-1 sm:hidden" }, Ms = { class: "group flex items-center gap-2 text-primary group-hover:text-primary-inverse" }, Ss = { class: "py-2 font-bold" }, Ls = { class: "p-2 rounded-md border border-primary" }, Ps = ["onClick"], Ns = { className: "sm:mt-2 flex flex-col gap-1 w-full" }, zs = {
|
|
2033
2020
|
class: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
|
|
2034
2021
|
style: { "max-height": "360px" }
|
|
2035
2022
|
}, Ts = {
|
|
2036
2023
|
key: 0,
|
|
2037
2024
|
className: "hidden px-2 w-full font-semibold sm:flex"
|
|
2038
|
-
}, As = { class: "mt-4 w-full flex flex-row justify-end pt-1" }, lo = /* @__PURE__ */
|
|
2025
|
+
}, As = { class: "mt-4 w-full flex flex-row justify-end pt-1" }, lo = /* @__PURE__ */ b({
|
|
2039
2026
|
__name: "WidgetsCatalogFlyout",
|
|
2040
2027
|
props: {
|
|
2041
2028
|
targetContainerKey: {},
|
|
@@ -2054,16 +2041,16 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2054
2041
|
const s = t, e = (f, W) => [
|
|
2055
2042
|
...W.widgets.filter((le) => le.indexOf("Container") === -1),
|
|
2056
2043
|
...W.childWidgetsConfig.map((le) => le.widgetKey)
|
|
2057
|
-
].includes(f), n = U("Editing"), a = U(0), r = U(""), d = U(!1),
|
|
2044
|
+
].includes(f), n = U("Editing"), a = U(0), r = U(""), d = U(!1), u = U(!1), $ = v(() => Array.from(s.widgetsCatalog.keys())), g = v(() => $.value.map((f) => ({
|
|
2058
2045
|
widgetKey: f,
|
|
2059
|
-
metaData:
|
|
2060
|
-
}))), l = v(() =>
|
|
2061
|
-
(f) => f.metaData.categories.includes("Widget") &&
|
|
2062
|
-
)),
|
|
2063
|
-
(f) => f.metaData.categories.includes("Chart") &&
|
|
2064
|
-
)), B = v(() =>
|
|
2065
|
-
(f) => f.metaData.categories.includes("Container") &&
|
|
2066
|
-
)), I = v(() => !!s.targetContainerKey),
|
|
2046
|
+
metaData: qe(f, s.widgetsCatalog)
|
|
2047
|
+
}))), l = v(() => g.value.filter(
|
|
2048
|
+
(f) => f.metaData.categories.includes("Widget") && A(f.metaData)
|
|
2049
|
+
)), y = v(() => g.value.filter(
|
|
2050
|
+
(f) => f.metaData.categories.includes("Chart") && A(f.metaData)
|
|
2051
|
+
)), B = v(() => g.value.filter(
|
|
2052
|
+
(f) => f.metaData.categories.includes("Container") && A(f.metaData)
|
|
2053
|
+
)), I = v(() => !!s.targetContainerKey), C = () => I.value, m = v(() => {
|
|
2067
2054
|
const f = [
|
|
2068
2055
|
{
|
|
2069
2056
|
id: 0,
|
|
@@ -2074,43 +2061,43 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2074
2061
|
label: "Charts"
|
|
2075
2062
|
}
|
|
2076
2063
|
];
|
|
2077
|
-
return
|
|
2064
|
+
return C() || (f.push({
|
|
2078
2065
|
id: 2,
|
|
2079
2066
|
label: "Containers"
|
|
2080
2067
|
}), f.push({
|
|
2081
2068
|
id: 3,
|
|
2082
2069
|
label: "CSS Settings",
|
|
2083
2070
|
hideLabel: !0,
|
|
2084
|
-
icon:
|
|
2071
|
+
icon: te(at)
|
|
2085
2072
|
})), f;
|
|
2086
2073
|
}), L = v(() => m.value.find((f) => f.id === a.value)?.label || "Category..."), _ = (f) => {
|
|
2087
2074
|
r.value = f;
|
|
2088
|
-
},
|
|
2075
|
+
}, A = (f) => {
|
|
2089
2076
|
const W = r.value.trim().toLowerCase();
|
|
2090
|
-
return W.length < 1 ? !0 : f.name.trim().toLowerCase().includes(W) || f.description.toLowerCase().includes(W) || f.categories.some((
|
|
2077
|
+
return W.length < 1 ? !0 : f.name.trim().toLowerCase().includes(W) || f.description.toLowerCase().includes(W) || f.categories.some((w) => w.toLowerCase().includes(W));
|
|
2091
2078
|
}, F = (f) => {
|
|
2092
2079
|
const W = r.value.trim().toLowerCase();
|
|
2093
2080
|
return W.length < 1 ? !0 : f.name.trim().toLowerCase().includes(W) || f.description.toLowerCase().includes(W);
|
|
2094
|
-
}, K = (f, W) =>
|
|
2081
|
+
}, K = (f, W) => R(
|
|
2095
2082
|
"px-4 py-2 font-medium cursor-pointer",
|
|
2096
2083
|
`${W ? "" : "border-b-2"} border-transparent hover:border-primary focus:outline-none`,
|
|
2097
2084
|
f === a.value ? "text-primary border-primary" : ""
|
|
2098
|
-
),
|
|
2085
|
+
), x = (f) => R(
|
|
2099
2086
|
"w-full flex items-center gap-2 px-2 py-1 text-left text-sm cursor-pointer border",
|
|
2100
2087
|
f !== a.value ? "border-transparent content-topbar hover:bg-primary hover:content-primary" : "border-primary text-primary"
|
|
2101
|
-
),
|
|
2102
|
-
|
|
2088
|
+
), E = (f) => {
|
|
2089
|
+
C() ? s.addWidget(f, s.targetContainerKey) : s.addWidget(f);
|
|
2103
2090
|
}, z = (f) => {
|
|
2104
|
-
const W = (s.currentDashboardConfig.cssSettings || []).map((
|
|
2091
|
+
const W = (s.currentDashboardConfig.cssSettings || []).map((w) => w.key === f.key ? f : w);
|
|
2105
2092
|
s.onSettingItemsUpdated(W);
|
|
2106
2093
|
}, P = (f) => {
|
|
2107
|
-
|
|
2094
|
+
u.value = f;
|
|
2108
2095
|
}, X = (f) => {
|
|
2109
|
-
a.value = f,
|
|
2110
|
-
},
|
|
2096
|
+
a.value = f, u.value = !1;
|
|
2097
|
+
}, Se = (f) => {
|
|
2111
2098
|
d.value = f;
|
|
2112
2099
|
};
|
|
2113
|
-
return
|
|
2100
|
+
return Oe(
|
|
2114
2101
|
() => s.targetContainerKey,
|
|
2115
2102
|
(f) => {
|
|
2116
2103
|
if (f) {
|
|
@@ -2121,25 +2108,25 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2121
2108
|
n.value = "Widget Catalog";
|
|
2122
2109
|
},
|
|
2123
2110
|
{ immediate: !0 }
|
|
2124
|
-
), (f, W) => (i(), N(
|
|
2111
|
+
), (f, W) => (i(), N(h(Bt), {
|
|
2125
2112
|
testId: "dashboard-catalog-flyout",
|
|
2126
2113
|
className: `transition-colors duration-150 bg-body content-body bg-opacity-70 border-2 ${d.value ? "border-warning" : "border-primary"} max-w-72 sm:max-w-90`,
|
|
2127
2114
|
zIndex: t.zIndex || 99999,
|
|
2128
2115
|
style: {
|
|
2129
2116
|
backdropFilter: "blur(8px)"
|
|
2130
2117
|
},
|
|
2131
|
-
onDraggingChange:
|
|
2118
|
+
onDraggingChange: Se
|
|
2132
2119
|
}, {
|
|
2133
|
-
default:
|
|
2120
|
+
default: M(() => [
|
|
2134
2121
|
o("div", $s, [
|
|
2135
2122
|
o("div", Is, [
|
|
2136
2123
|
o("div", {
|
|
2137
2124
|
class: p(`handle cursor-grab flex-1 flex gap-2 w-full ${d.value ? "text-warning" : "hover:text-primary"}`)
|
|
2138
2125
|
}, [
|
|
2139
|
-
d.value ? (i(), N(
|
|
2126
|
+
d.value ? (i(), N(h(Ke), {
|
|
2140
2127
|
key: 0,
|
|
2141
2128
|
class: "size-5"
|
|
2142
|
-
})) : (i(), N(
|
|
2129
|
+
})) : (i(), N(h(ct), {
|
|
2143
2130
|
key: 1,
|
|
2144
2131
|
class: "size-5"
|
|
2145
2132
|
})),
|
|
@@ -2149,7 +2136,7 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2149
2136
|
}, S(n.value), 9, Ds)
|
|
2150
2137
|
], 2),
|
|
2151
2138
|
o("div", Bs, [
|
|
2152
|
-
D(
|
|
2139
|
+
D(h(H), {
|
|
2153
2140
|
"data-testid": "undo-dashboard-config-change",
|
|
2154
2141
|
isIconButton: !0,
|
|
2155
2142
|
tooltip: {
|
|
@@ -2157,14 +2144,14 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2157
2144
|
title: "Undo"
|
|
2158
2145
|
},
|
|
2159
2146
|
disabled: t.undoStatus.isUndoDisabled,
|
|
2160
|
-
onClick: W[0] || (W[0] = (
|
|
2147
|
+
onClick: W[0] || (W[0] = (w) => t.onUndoOrRedo("Undo"))
|
|
2161
2148
|
}, {
|
|
2162
|
-
default:
|
|
2163
|
-
D(
|
|
2149
|
+
default: M(() => [
|
|
2150
|
+
D(h(lt), { class: "size-5" })
|
|
2164
2151
|
]),
|
|
2165
2152
|
_: 1
|
|
2166
2153
|
}, 8, ["disabled"]),
|
|
2167
|
-
D(
|
|
2154
|
+
D(h(H), {
|
|
2168
2155
|
"data-testid": "redo-dashboard-config-change",
|
|
2169
2156
|
isIconButton: !0,
|
|
2170
2157
|
tooltip: {
|
|
@@ -2172,14 +2159,14 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2172
2159
|
title: "Redo"
|
|
2173
2160
|
},
|
|
2174
2161
|
disabled: t.undoStatus.isRedoDisabled,
|
|
2175
|
-
onClick: W[1] || (W[1] = (
|
|
2162
|
+
onClick: W[1] || (W[1] = (w) => t.onUndoOrRedo("Redo"))
|
|
2176
2163
|
}, {
|
|
2177
|
-
default:
|
|
2178
|
-
D(
|
|
2164
|
+
default: M(() => [
|
|
2165
|
+
D(h(dt), { class: "size-5" })
|
|
2179
2166
|
]),
|
|
2180
2167
|
_: 1
|
|
2181
2168
|
}, 8, ["disabled"]),
|
|
2182
|
-
D(
|
|
2169
|
+
D(h(H), {
|
|
2183
2170
|
"data-testid": "reset-dashboard-to-default",
|
|
2184
2171
|
isIconButton: !0,
|
|
2185
2172
|
tooltip: {
|
|
@@ -2188,50 +2175,50 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2188
2175
|
},
|
|
2189
2176
|
onClick: t.onResetToDefaultDashboardClick
|
|
2190
2177
|
}, {
|
|
2191
|
-
default:
|
|
2192
|
-
D(
|
|
2178
|
+
default: M(() => [
|
|
2179
|
+
D(h(it), { class: "size-5" })
|
|
2193
2180
|
]),
|
|
2194
2181
|
_: 1
|
|
2195
2182
|
}, 8, ["onClick"])
|
|
2196
2183
|
])
|
|
2197
2184
|
]),
|
|
2198
2185
|
o("div", Ks, [
|
|
2199
|
-
(i(!0),
|
|
2200
|
-
key:
|
|
2201
|
-
class: p(K(
|
|
2202
|
-
onClick: () => X(
|
|
2186
|
+
(i(!0), c(q, null, G(m.value, (w) => (i(), c("button", {
|
|
2187
|
+
key: w.id,
|
|
2188
|
+
class: p(K(w.id, w.id === 3)),
|
|
2189
|
+
onClick: () => X(w.id)
|
|
2203
2190
|
}, [
|
|
2204
2191
|
o("span", {
|
|
2205
|
-
class: p(
|
|
2206
|
-
}, S(
|
|
2207
|
-
|
|
2192
|
+
class: p(w.hideLabel ? "sr-only" : "")
|
|
2193
|
+
}, S(w.label), 3),
|
|
2194
|
+
w.icon ? (i(), N(he(w.icon), { key: 0 })) : Z("", !0)
|
|
2208
2195
|
], 10, Ws))), 128))
|
|
2209
2196
|
]),
|
|
2210
|
-
o("div",
|
|
2211
|
-
D(
|
|
2197
|
+
o("div", Es, [
|
|
2198
|
+
D(h(kt), {
|
|
2212
2199
|
enabled: !0,
|
|
2213
2200
|
showChevron: !0,
|
|
2214
|
-
isMenuOpen:
|
|
2201
|
+
isMenuOpen: u.value,
|
|
2215
2202
|
onToggleOpen: P
|
|
2216
2203
|
}, {
|
|
2217
|
-
icon:
|
|
2218
|
-
o("div",
|
|
2204
|
+
icon: M(() => [
|
|
2205
|
+
o("div", Ms, [
|
|
2219
2206
|
o("h5", Ss, S(L.value), 1),
|
|
2220
|
-
D(
|
|
2207
|
+
D(h(me), { class: "shrink-0 ml-1 size-4" })
|
|
2221
2208
|
])
|
|
2222
2209
|
]),
|
|
2223
|
-
default:
|
|
2210
|
+
default: M(() => [
|
|
2224
2211
|
o("div", Ls, [
|
|
2225
2212
|
W[3] || (W[3] = o("h6", { class: "font-semibold" }, "Category:", -1)),
|
|
2226
|
-
(i(!0),
|
|
2227
|
-
key:
|
|
2213
|
+
(i(!0), c(q, null, G(m.value, (w) => (i(), c("button", {
|
|
2214
|
+
key: w.id,
|
|
2228
2215
|
type: "button",
|
|
2229
|
-
class: p(
|
|
2216
|
+
class: p(x(w.id)),
|
|
2230
2217
|
role: "menuitem",
|
|
2231
2218
|
tabIndex: -1,
|
|
2232
|
-
onClick: () => X(
|
|
2219
|
+
onClick: () => X(w.id)
|
|
2233
2220
|
}, [
|
|
2234
|
-
o("span", null, S(
|
|
2221
|
+
o("span", null, S(w.label), 1)
|
|
2235
2222
|
], 10, Ps))), 128))
|
|
2236
2223
|
])
|
|
2237
2224
|
]),
|
|
@@ -2239,46 +2226,46 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2239
2226
|
}, 8, ["isMenuOpen"])
|
|
2240
2227
|
]),
|
|
2241
2228
|
o("div", Ns, [
|
|
2242
|
-
D(
|
|
2229
|
+
D(h(We), {
|
|
2243
2230
|
label: "",
|
|
2244
2231
|
placeholder: "Find...",
|
|
2245
2232
|
size: "small",
|
|
2246
2233
|
class: "w-full",
|
|
2247
2234
|
modelValue: r.value,
|
|
2248
2235
|
"onUpdate:modelValue": [
|
|
2249
|
-
W[2] || (W[2] = (
|
|
2236
|
+
W[2] || (W[2] = (w) => r.value = w),
|
|
2250
2237
|
_
|
|
2251
2238
|
]
|
|
2252
2239
|
}, null, 8, ["modelValue"])
|
|
2253
2240
|
]),
|
|
2254
2241
|
o("div", zs, [
|
|
2255
|
-
a.value === 3 ? (i(),
|
|
2256
|
-
a.value === 0 ? (i(!0),
|
|
2257
|
-
key:
|
|
2258
|
-
widgetKey:
|
|
2259
|
-
metaData:
|
|
2260
|
-
alreadyAdded: e(
|
|
2261
|
-
onAddWidget: () =>
|
|
2262
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 1 ? (i(!0),
|
|
2263
|
-
key:
|
|
2264
|
-
widgetKey:
|
|
2265
|
-
metaData:
|
|
2266
|
-
alreadyAdded: e(
|
|
2267
|
-
onAddWidget: () =>
|
|
2268
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 2 && !I.value ? (i(!0),
|
|
2269
|
-
key:
|
|
2270
|
-
widgetKey:
|
|
2271
|
-
metaData:
|
|
2272
|
-
alreadyAdded: e(
|
|
2273
|
-
onAddWidget: () => t.addContainer(
|
|
2274
|
-
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 3 && !I.value ? (i(!0),
|
|
2275
|
-
key:
|
|
2276
|
-
item:
|
|
2242
|
+
a.value === 3 ? (i(), c("div", Ts, S(L.value) + ": ", 1)) : Z("", !0),
|
|
2243
|
+
a.value === 0 ? (i(!0), c(q, { key: 1 }, G(l.value, (w) => (i(), N(ue, {
|
|
2244
|
+
key: w.widgetKey,
|
|
2245
|
+
widgetKey: w.widgetKey,
|
|
2246
|
+
metaData: w.metaData,
|
|
2247
|
+
alreadyAdded: e(w.widgetKey, t.currentDashboardConfig),
|
|
2248
|
+
onAddWidget: () => E(w.widgetKey)
|
|
2249
|
+
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 1 ? (i(!0), c(q, { key: 2 }, G(y.value, (w) => (i(), N(ue, {
|
|
2250
|
+
key: w.widgetKey,
|
|
2251
|
+
widgetKey: w.widgetKey,
|
|
2252
|
+
metaData: w.metaData,
|
|
2253
|
+
alreadyAdded: e(w.widgetKey, t.currentDashboardConfig),
|
|
2254
|
+
onAddWidget: () => E(w.widgetKey)
|
|
2255
|
+
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 2 && !I.value ? (i(!0), c(q, { key: 3 }, G(B.value, (w) => (i(), N(ue, {
|
|
2256
|
+
key: w.widgetKey,
|
|
2257
|
+
widgetKey: w.widgetKey,
|
|
2258
|
+
metaData: w.metaData,
|
|
2259
|
+
alreadyAdded: e(w.widgetKey, t.currentDashboardConfig),
|
|
2260
|
+
onAddWidget: () => t.addContainer(w.widgetKey)
|
|
2261
|
+
}, null, 8, ["widgetKey", "metaData", "alreadyAdded", "onAddWidget"]))), 128)) : a.value === 3 && !I.value ? (i(!0), c(q, { key: 4 }, G((t.currentDashboardConfig.cssSettings || []).filter(F), (w) => (i(), N(ks, {
|
|
2262
|
+
key: w.key,
|
|
2263
|
+
item: w,
|
|
2277
2264
|
onSettingChanged: z
|
|
2278
2265
|
}, null, 8, ["item"]))), 128)) : Z("", !0)
|
|
2279
2266
|
]),
|
|
2280
2267
|
o("div", As, [
|
|
2281
|
-
D(
|
|
2268
|
+
D(h(H), {
|
|
2282
2269
|
class: "bg-opacity-100",
|
|
2283
2270
|
tooltip: {
|
|
2284
2271
|
placement: "bottom",
|
|
@@ -2286,8 +2273,8 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2286
2273
|
},
|
|
2287
2274
|
onClick: t.onDoneClick
|
|
2288
2275
|
}, {
|
|
2289
|
-
default:
|
|
2290
|
-
|
|
2276
|
+
default: M(() => [...W[4] || (W[4] = [
|
|
2277
|
+
_e(" Done ", -1)
|
|
2291
2278
|
])]),
|
|
2292
2279
|
_: 1
|
|
2293
2280
|
}, 8, ["onClick"])
|
|
@@ -2299,49 +2286,49 @@ const so = /* @__PURE__ */ We(Pt, [["render", zt]]), oo = (t) => {
|
|
|
2299
2286
|
}
|
|
2300
2287
|
});
|
|
2301
2288
|
export {
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2289
|
+
nt as AddIcon,
|
|
2290
|
+
H as Button,
|
|
2291
|
+
me as ChevronDownIcon,
|
|
2292
|
+
gt as CircleQuestionMarkIcon,
|
|
2293
|
+
ut as CrosshairIcon,
|
|
2307
2294
|
no as DashboardGrid,
|
|
2308
2295
|
Ft as DashboardWidgetBase,
|
|
2309
2296
|
Os as DeleteIcon,
|
|
2310
|
-
|
|
2297
|
+
Bt as DraggablePanel,
|
|
2311
2298
|
kt as Dropdown,
|
|
2312
|
-
|
|
2299
|
+
ro as DynamicWidgetLoader,
|
|
2313
2300
|
Us as EditIcon,
|
|
2314
2301
|
qs as GridIcon,
|
|
2315
|
-
|
|
2316
|
-
|
|
2302
|
+
Ke as HandGrabIcon,
|
|
2303
|
+
ct as HandIcon,
|
|
2317
2304
|
eo as ListItem,
|
|
2318
|
-
|
|
2305
|
+
rt as MinusCircleIcon,
|
|
2319
2306
|
Ys as MonitorIcon,
|
|
2320
2307
|
Xs as MonitorSmartphoneIcon,
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2308
|
+
Ie as MoveLeftIcon,
|
|
2309
|
+
De as MoveRightIcon,
|
|
2310
|
+
nt as PlusCircleIcon,
|
|
2311
|
+
dt as RedoIcon,
|
|
2325
2312
|
Fs as RenameIcon,
|
|
2326
2313
|
at as SettingsIcon,
|
|
2327
2314
|
Mt as SpinnerComponent,
|
|
2328
|
-
|
|
2315
|
+
It as Stack,
|
|
2329
2316
|
Qs as TabletSmartphoneIcon,
|
|
2330
2317
|
Js as TargetIcon,
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2318
|
+
We as TextField,
|
|
2319
|
+
it as TimerResetIcon,
|
|
2320
|
+
lt as UndoIcon,
|
|
2334
2321
|
Me as WidgetContainerColumn,
|
|
2335
2322
|
io as WidgetContainerLarge,
|
|
2336
|
-
|
|
2323
|
+
ao as WidgetContainerRow,
|
|
2337
2324
|
lo as WidgetsCatalogFlyout,
|
|
2338
2325
|
to as WrapperColumnContent,
|
|
2339
2326
|
so as WrapperColumnContentListItem,
|
|
2340
|
-
|
|
2327
|
+
Be as XCircleIcon,
|
|
2341
2328
|
Gs as ZoomInIcon,
|
|
2342
2329
|
Zs as ZoomOutIcon,
|
|
2343
2330
|
oo as showToast,
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2331
|
+
Vs as useDashboardStore,
|
|
2332
|
+
Rs as useDashboardUndoService,
|
|
2333
|
+
Y as useWidgetEmits
|
|
2347
2334
|
};
|