@tenorlab/vue-dashboard 1.6.7 → 1.6.9
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/core.es.js +77 -77
- package/dist/styles.css +1 -1
- package/dist/vue-dashboard.es.js +138 -135
- package/package.json +2 -2
package/dist/core.es.js
CHANGED
|
@@ -85,53 +85,53 @@ const W = [
|
|
|
85
85
|
* @returns the update item
|
|
86
86
|
*/
|
|
87
87
|
incrementOrDecrementValue: (e, t) => {
|
|
88
|
-
const i = e.value.match(/([\d.]+)/),
|
|
88
|
+
const i = e.value.match(/([\d.]+)/), s = i ? parseFloat(i[1]) : 0, r = e.value.match(/([^\d.]+)/), n = r ? r[1] : e.defaultUnit, a = S(n, e.step) * t, l = `${Math.max(s + a, e.minValue).toFixed(1)}${n}`;
|
|
89
89
|
return {
|
|
90
90
|
...e,
|
|
91
91
|
value: l
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
}, y = (e, t) => `dashboards_${t}_${e}`, v = async (e, t, i,
|
|
94
|
+
}, y = (e, t) => `dashboards_${t}_${e}`, v = async (e, t, i, s) => {
|
|
95
95
|
const r = localStorage.getItem(y(e, t));
|
|
96
96
|
if (r)
|
|
97
97
|
try {
|
|
98
98
|
const n = JSON.parse(r);
|
|
99
|
-
return n.length < 1 ? [
|
|
100
|
-
|
|
101
|
-
const l = (
|
|
102
|
-
(o) =>
|
|
99
|
+
return n.length < 1 ? [s] : (n.forEach((a) => {
|
|
100
|
+
a.dashboardId || (a.dashboardId = "default"), a.dashboardName || (a.dashboardName = `Dashboard ${a.dashboardId}`), a.responsiveGrid = a.responsiveGrid ?? !1, (a.widgets || []).length < 1 && (a.widgets = []);
|
|
101
|
+
const l = (a.cssSettings || []).filter(
|
|
102
|
+
(o) => s.cssSettings.some((d) => d.key === o.key)
|
|
103
103
|
);
|
|
104
104
|
if (l.length < 1)
|
|
105
|
-
|
|
105
|
+
a.cssSettings = [...s.cssSettings];
|
|
106
106
|
else {
|
|
107
107
|
l.forEach((d) => {
|
|
108
108
|
d.value = (d.value || "").replace(/NaN/g, "");
|
|
109
|
-
const c =
|
|
109
|
+
const c = s.cssSettings.find((g) => g.key === d.key);
|
|
110
110
|
c && (Object.keys(c).forEach((g) => {
|
|
111
111
|
g in d || (d[g] = c[g]);
|
|
112
112
|
}), d.step = c.step, d.minValue = c.minValue, d.defaultValue = c.defaultValue, d.defaultUnit = c.defaultUnit, /\d+/g.test(d.value) === !1 && (d.value = c ? c.value : "1.0rem"));
|
|
113
113
|
});
|
|
114
|
-
const o =
|
|
115
|
-
|
|
114
|
+
const o = s.cssSettings.filter((d) => !l.some((c) => c.key === d.key));
|
|
115
|
+
a.cssSettings = [...l, ...o];
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
a.widgets = a.widgets.filter(
|
|
118
118
|
(o) => o.includes("WidgetContainer") || i.has(o)
|
|
119
|
-
),
|
|
119
|
+
), a.childWidgetsConfig = a.childWidgetsConfig.filter(
|
|
120
120
|
(o) => i.has(o.widgetKey)
|
|
121
|
-
),
|
|
121
|
+
), a.zoomScale ? a.zoomScale < 0.7 && (a.zoomScale = 0.7) : a.zoomScale = 1;
|
|
122
122
|
}), n);
|
|
123
123
|
} catch (n) {
|
|
124
124
|
console.warn("Error parsing saved dashboard config:", n);
|
|
125
125
|
}
|
|
126
|
-
return [
|
|
127
|
-
}, $ = async (e, t, i,
|
|
126
|
+
return [s];
|
|
127
|
+
}, $ = async (e, t, i, s) => {
|
|
128
128
|
i.forEach((n) => {
|
|
129
129
|
if (n.userID = e, n.clientAppKey = t, n.responsiveGrid = n.responsiveGrid ?? !1, typeof n != "object")
|
|
130
130
|
throw new Error("Invalid dashboard configuration");
|
|
131
131
|
n.widgets = n.widgets.filter(
|
|
132
|
-
(
|
|
132
|
+
(a) => a.includes("WidgetContainer") || s.has(a)
|
|
133
133
|
), n.childWidgetsConfig = n.childWidgetsConfig.filter(
|
|
134
|
-
(
|
|
134
|
+
(a) => s.has(a.widgetKey)
|
|
135
135
|
), n.zoomScale ? n.zoomScale < 0.7 && (n.zoomScale = 0.7) : n.zoomScale = 1;
|
|
136
136
|
});
|
|
137
137
|
const r = JSON.stringify(i);
|
|
@@ -156,60 +156,60 @@ const W = [
|
|
|
156
156
|
let t = Number(e || 0);
|
|
157
157
|
return t < p && (t = p), t > h && (t = h), t;
|
|
158
158
|
}, L = (e, t) => {
|
|
159
|
-
let i = Number(Number((V * t).toFixed(2)).toFixed(2)),
|
|
160
|
-
return K(
|
|
159
|
+
let i = Number(Number((V * t).toFixed(2)).toFixed(2)), s = Number((Number(e) + i).toFixed(2));
|
|
160
|
+
return K(s);
|
|
161
161
|
}, j = (e) => {
|
|
162
162
|
let t = {
|
|
163
163
|
...e
|
|
164
164
|
};
|
|
165
165
|
return t.widgets = t.widgets.filter((i) => {
|
|
166
166
|
if (`${i}`.includes("WidgetContainer")) {
|
|
167
|
-
const
|
|
167
|
+
const s = t.childWidgetsConfig.filter(
|
|
168
168
|
(r) => r.parentWidgetKey === i
|
|
169
169
|
);
|
|
170
|
-
if (!
|
|
170
|
+
if (!s || s.length === 0)
|
|
171
171
|
return t.widgets = t.widgets.filter((r) => r !== i), !1;
|
|
172
172
|
}
|
|
173
173
|
return !0;
|
|
174
174
|
}), t;
|
|
175
175
|
}, x = (e) => {
|
|
176
|
-
const t = e.widgets.filter((
|
|
177
|
-
return t.forEach((
|
|
178
|
-
const n = `${
|
|
179
|
-
i[
|
|
180
|
-
}), e.widgets = e.widgets.map((
|
|
181
|
-
const r =
|
|
176
|
+
const t = e.widgets.filter((s) => s.includes("WidgetContainer")), i = {};
|
|
177
|
+
return t.forEach((s, r) => {
|
|
178
|
+
const n = `${s.split("_container")[0]}_container${r + 1}`;
|
|
179
|
+
i[s] = n;
|
|
180
|
+
}), e.widgets = e.widgets.map((s) => i[s] || s), e.childWidgetsConfig = e.childWidgetsConfig.map((s) => {
|
|
181
|
+
const r = s.parentWidgetKey, n = i[r];
|
|
182
182
|
return {
|
|
183
|
-
...
|
|
183
|
+
...s,
|
|
184
184
|
// If a new key exists, use it. If not, keep the original key.
|
|
185
185
|
parentWidgetKey: n || r
|
|
186
186
|
};
|
|
187
187
|
}), e;
|
|
188
188
|
}, m = (e, t) => {
|
|
189
|
-
const i = `${e}`.includes("Container"),
|
|
189
|
+
const i = `${e}`.includes("Container"), s = i ? ["Container"] : ["Widget"], r = t?.name || e, n = t?.description || (i ? "Container" : "Unknown");
|
|
190
190
|
return {
|
|
191
191
|
name: r,
|
|
192
192
|
description: n,
|
|
193
|
-
categories:
|
|
193
|
+
categories: s,
|
|
194
194
|
noDuplicatedWidgets: !0,
|
|
195
195
|
icon: void 0,
|
|
196
196
|
externalDependencies: []
|
|
197
197
|
};
|
|
198
198
|
}, M = (e, t, i) => t[e] || m(e, i), I = (e, t) => t.get(e)?.meta || m(e), k = (e, t, i) => {
|
|
199
|
-
const
|
|
199
|
+
const s = i || m(e);
|
|
200
200
|
return [
|
|
201
201
|
e,
|
|
202
202
|
{
|
|
203
203
|
key: e,
|
|
204
|
-
title:
|
|
204
|
+
title: s.name,
|
|
205
205
|
isContainer: `${e}`.includes("Container"),
|
|
206
206
|
isRemote: !1,
|
|
207
|
-
meta:
|
|
207
|
+
meta: s,
|
|
208
208
|
component: t
|
|
209
209
|
}
|
|
210
210
|
];
|
|
211
|
-
}, C = (e, t, i,
|
|
212
|
-
const r =
|
|
211
|
+
}, C = (e, t, i, s) => {
|
|
212
|
+
const r = s || m(e);
|
|
213
213
|
return [
|
|
214
214
|
e,
|
|
215
215
|
{
|
|
@@ -224,7 +224,7 @@ const W = [
|
|
|
224
224
|
}, F = (e) => {
|
|
225
225
|
const t = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
226
226
|
if (t && t[1]) {
|
|
227
|
-
const i = t[1],
|
|
227
|
+
const i = t[1], s = i.split("-"), r = `Widget${s.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join("")}`, n = s.map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
228
228
|
return {
|
|
229
229
|
key: r,
|
|
230
230
|
name: n,
|
|
@@ -232,33 +232,33 @@ const W = [
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
return null;
|
|
235
|
-
}, N = (e, t, i,
|
|
235
|
+
}, N = (e, t, i, s) => {
|
|
236
236
|
const r = `${t}/widget-${i}/meta.ts`, n = e[r];
|
|
237
237
|
if (!n)
|
|
238
238
|
return;
|
|
239
|
-
const
|
|
240
|
-
return n[
|
|
239
|
+
const a = `${s}Meta`;
|
|
240
|
+
return n[a] || void 0;
|
|
241
241
|
}, A = async (e) => new Promise(async (t, i) => {
|
|
242
|
-
const
|
|
242
|
+
const s = [];
|
|
243
243
|
try {
|
|
244
244
|
const r = await (await fetch(`${e}?${Math.random()}`)).json();
|
|
245
245
|
for (const n in r) {
|
|
246
|
-
const
|
|
246
|
+
const a = r[n], l = () => import(
|
|
247
247
|
/* @vite-ignore */
|
|
248
|
-
|
|
248
|
+
a.url
|
|
249
249
|
), o = {
|
|
250
|
-
name:
|
|
251
|
-
description:
|
|
252
|
-
categories:
|
|
253
|
-
noDuplicatedWidgets:
|
|
250
|
+
name: a.meta?.name || "Unknown",
|
|
251
|
+
description: a.meta?.description || "Remote Plugin",
|
|
252
|
+
categories: a.meta?.categories || ["Widget"],
|
|
253
|
+
noDuplicatedWidgets: a.meta?.noDuplicatedWidgets ?? !0,
|
|
254
254
|
icon: void 0,
|
|
255
255
|
// Or a logic to map a string name to a Lucide component
|
|
256
|
-
externalDependencies:
|
|
256
|
+
externalDependencies: a.meta?.externalDependencies || []
|
|
257
257
|
};
|
|
258
|
-
|
|
258
|
+
s.push(C(n, l, !0, o));
|
|
259
259
|
}
|
|
260
260
|
t({
|
|
261
|
-
entries:
|
|
261
|
+
entries: s,
|
|
262
262
|
message: "",
|
|
263
263
|
details: ""
|
|
264
264
|
});
|
|
@@ -269,22 +269,22 @@ const W = [
|
|
|
269
269
|
details: typeof r == "object" ? JSON.stringify(r) : r
|
|
270
270
|
});
|
|
271
271
|
}
|
|
272
|
-
}), R = (e, t, i,
|
|
272
|
+
}), R = (e, t, i, s = !0) => {
|
|
273
273
|
const r = [];
|
|
274
274
|
for (const n in t) {
|
|
275
|
-
const
|
|
276
|
-
if (l &&
|
|
275
|
+
const a = t[n], l = F(n);
|
|
276
|
+
if (l && a) {
|
|
277
277
|
const { key: o, name: d, folder: c } = l;
|
|
278
278
|
let g = N(i, e, c, o);
|
|
279
279
|
if (g || (g = m(o, {
|
|
280
280
|
name: d,
|
|
281
|
-
description: `Local ${
|
|
282
|
-
})),
|
|
281
|
+
description: `Local ${s ? "dynamic" : "static"} widget`
|
|
282
|
+
})), s)
|
|
283
283
|
r.push(
|
|
284
|
-
C(o,
|
|
284
|
+
C(o, a, !1, g)
|
|
285
285
|
);
|
|
286
286
|
else {
|
|
287
|
-
const f =
|
|
287
|
+
const f = a.default || a;
|
|
288
288
|
r.push(k(o, f, g));
|
|
289
289
|
}
|
|
290
290
|
}
|
|
@@ -322,10 +322,10 @@ const W = [
|
|
|
322
322
|
* @returns A {@link TCoreResponse} containing the success status and updated config.
|
|
323
323
|
*/
|
|
324
324
|
addWidget: (e) => {
|
|
325
|
-
const { dashboardConfig: t, widgetKey: i, parentWidgetKey:
|
|
326
|
-
if (
|
|
325
|
+
const { dashboardConfig: t, widgetKey: i, parentWidgetKey: s, noDuplicatedWidgets: r } = e;
|
|
326
|
+
if (s) {
|
|
327
327
|
if (r && t.childWidgetsConfig.find(
|
|
328
|
-
(
|
|
328
|
+
(a) => a.parentWidgetKey === s && a.widgetKey === i
|
|
329
329
|
))
|
|
330
330
|
return {
|
|
331
331
|
success: !1,
|
|
@@ -334,7 +334,7 @@ const W = [
|
|
|
334
334
|
};
|
|
335
335
|
const n = [
|
|
336
336
|
...t.childWidgetsConfig,
|
|
337
|
-
{ parentWidgetKey:
|
|
337
|
+
{ parentWidgetKey: s, widgetKey: i }
|
|
338
338
|
// new entry
|
|
339
339
|
];
|
|
340
340
|
return {
|
|
@@ -370,31 +370,31 @@ const W = [
|
|
|
370
370
|
* @returns {TCoreResponse<TRemoveWidgetResponse>} The response indicating success or failure and the updated dashboard configuration
|
|
371
371
|
*/
|
|
372
372
|
removeWidget: (e, t, i) => {
|
|
373
|
-
const
|
|
373
|
+
const s = `${t || ""}`.trim().toLowerCase(), r = `${i || ""}`.trim().toLowerCase();
|
|
374
374
|
if (r.length > 0) {
|
|
375
375
|
const n = e.childWidgetsConfig.filter(
|
|
376
376
|
(d) => `${d.parentWidgetKey}`.trim().toLowerCase() !== r
|
|
377
|
-
),
|
|
378
|
-
(d) => `${d.parentWidgetKey}`.trim().toLowerCase() === r && `${d.widgetKey}`.trim().toLowerCase() !==
|
|
379
|
-
), l = [...n, ...
|
|
377
|
+
), a = e.childWidgetsConfig.filter(
|
|
378
|
+
(d) => `${d.parentWidgetKey}`.trim().toLowerCase() === r && `${d.widgetKey}`.trim().toLowerCase() !== s
|
|
379
|
+
), l = [...n, ...a];
|
|
380
380
|
let o = {
|
|
381
381
|
...e,
|
|
382
382
|
childWidgetsConfig: l
|
|
383
383
|
};
|
|
384
|
-
return
|
|
384
|
+
return s.includes("container") && (o = x(o)), {
|
|
385
385
|
success: !0,
|
|
386
386
|
updatedDashboardConfig: o
|
|
387
387
|
};
|
|
388
388
|
} else {
|
|
389
|
-
const n = (e.widgets || []).filter((l) => `${l}`.trim().toLowerCase() !==
|
|
390
|
-
(l) => `${l.parentWidgetKey}`.trim().toLowerCase() !==
|
|
389
|
+
const n = (e.widgets || []).filter((l) => `${l}`.trim().toLowerCase() !== s), a = e.childWidgetsConfig.filter(
|
|
390
|
+
(l) => `${l.parentWidgetKey}`.trim().toLowerCase() !== s
|
|
391
391
|
);
|
|
392
392
|
return {
|
|
393
393
|
success: !0,
|
|
394
394
|
updatedDashboardConfig: {
|
|
395
395
|
...e,
|
|
396
396
|
widgets: n,
|
|
397
|
-
childWidgetsConfig:
|
|
397
|
+
childWidgetsConfig: a
|
|
398
398
|
}
|
|
399
399
|
};
|
|
400
400
|
}
|
|
@@ -407,10 +407,10 @@ const W = [
|
|
|
407
407
|
* @param parentWidgetKey - The container key if the widget is nested.
|
|
408
408
|
* @returns A {@link TCoreResponse} with the new array order.
|
|
409
409
|
*/
|
|
410
|
-
moveWidget: (e, t, i,
|
|
411
|
-
const r = `${i || ""}`.trim().toLowerCase(), n = `${
|
|
410
|
+
moveWidget: (e, t, i, s) => {
|
|
411
|
+
const r = `${i || ""}`.trim().toLowerCase(), n = `${s || ""}`.trim().toLowerCase();
|
|
412
412
|
if (n.length > 0) {
|
|
413
|
-
const
|
|
413
|
+
const a = e.childWidgetsConfig.filter(
|
|
414
414
|
(u) => `${u.parentWidgetKey}`.trim().toLowerCase() !== n
|
|
415
415
|
);
|
|
416
416
|
let l = e.childWidgetsConfig.filter(
|
|
@@ -431,19 +431,19 @@ const W = [
|
|
|
431
431
|
success: !0,
|
|
432
432
|
updatedDashboardConfig: {
|
|
433
433
|
...e,
|
|
434
|
-
childWidgetsConfig: [...
|
|
434
|
+
childWidgetsConfig: [...a, ...g]
|
|
435
435
|
}
|
|
436
436
|
};
|
|
437
437
|
} else {
|
|
438
|
-
const
|
|
438
|
+
const a = e.widgets || [], l = a.map((g) => `${g}`.trim().toLowerCase()).indexOf(r);
|
|
439
439
|
let o = l + t;
|
|
440
|
-
if (o = Math.max(0, o), o = Math.min(
|
|
440
|
+
if (o = Math.max(0, o), o = Math.min(a.length - 1, o), o === l)
|
|
441
441
|
return {
|
|
442
442
|
success: !1,
|
|
443
443
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${i})`,
|
|
444
444
|
updatedDashboardConfig: e
|
|
445
445
|
};
|
|
446
|
-
const d = [...
|
|
446
|
+
const d = [...a], [c] = d.splice(l, 1);
|
|
447
447
|
return d.splice(o, 0, c), {
|
|
448
448
|
success: !0,
|
|
449
449
|
updatedDashboardConfig: {
|
|
@@ -457,8 +457,8 @@ const W = [
|
|
|
457
457
|
if (typeof window > "u") return "#FFFFFF";
|
|
458
458
|
const i = document.createElement("div");
|
|
459
459
|
Array.isArray(e) ? e.forEach((r) => i.classList.add(r)) : e.split(" ").forEach((r) => i.classList.add(r)), i.style.display = "none", document.body.appendChild(i);
|
|
460
|
-
const
|
|
461
|
-
return document.body.removeChild(i),
|
|
460
|
+
const s = window.getComputedStyle(i)[t];
|
|
461
|
+
return document.body.removeChild(i), s;
|
|
462
462
|
}, G = {
|
|
463
463
|
/**
|
|
464
464
|
* @name getCssVariableValue
|
package/dist/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
html{--bwj-dashboard-num-columns: 3;--bwj-dashboard-gap: 1.25rem;--bwj-dashboard-transform-scale: 1;--bwj-dashboard-add-cols: 1;--bwj-widget-width: 21rem;--bwj-widget-border-radius: .33rem;--bwj-widget-inner-px: 1rem;--bwj-widget-inner-py: .75rem;--bwj-widget-header-px: var(--bwj-widget-inner-px);--bwj-widget-header-py: 1rem;--bwj-widget-title-size: .8rem;--bwj-widget-title-weight: 600;--bwj-dashboard-debug-container-flex-row: none;--bwj-dashboard-debug-container-flex-column: none;--bwj-dashboard-debug-container-grid-large-inner: none}html .dashboard-main-grid{width:100%;display:grid;grid-template-columns:repeat(var(--bwj-dashboard-num-columns, 4),minmax(var(--bwj-widget-width),1fr));gap:var(--bwj-dashboard-gap, 1.5rem);transform:scale(var(--bwj-dashboard-transform-scale, 1));transform-origin:top left}html .dashboard-main-grid.editing{row-gap:calc(var(--bwj-dashboard-gap) + .8rem)}html .dashboard-main-grid:not(.responsive-grid){max-width:min-content}html .dashboard-main-grid.responsive-grid{width:100%}html .dashboard-widget-container{--bwj-border-opacity: .5;flex:1 1 0%;width:100%}html .dashboard-widget-container .widget-container-header{display:none;position:absolute;height:1.85rem;inset:-1.85rem -1px auto;cursor:pointer;padding:0 .33rem}html .dashboard-widget-container .widget-container-header .actions-inner{transition:all .3s ease-in-out;width:100%;display:none;align-items:center;justify-content:space-between;font-size:.8rem}html .dashboard-widget-container.editing{border-top:none!important;border-bottom-left-radius:var(--bwj-widget-border-radius, .3rem);border-bottom-right-radius:var(--bwj-widget-border-radius, .3rem)}html .dashboard-widget-container.editing .widget-container-header{display:flex;border-bottom:none!important;border-top-left-radius:var(--bwj-widget-border-radius, .3rem);border-top-right-radius:var(--bwj-widget-border-radius, .3rem)}html .dashboard-widget-container.editing .widget-container-header>.actions-inner{display:flex!important}html .dashboard-widget-container.editing.highlight-container:before{content:"";position:absolute;inset:-1.85rem 0 0;box-shadow:0 2px 10px 6px oklch(var(--bwj-primary-okl) var(--bwj-primary-okc) var(--bwj-primary-okh) / .5);pointer-events:none}html .dashboard-widget{flex:1 1 0%;display:flex;flex-direction:column;position:relative;border-radius:var(--bwj-widget-border-radius, .3rem);
|
|
1
|
+
html{--bwj-dashboard-num-columns: 3;--bwj-dashboard-gap: 1.25rem;--bwj-dashboard-transform-scale: 1;--bwj-dashboard-add-cols: 1;--bwj-widget-width: 21rem;--bwj-widget-border-radius: .33rem;--bwj-widget-inner-px: 1rem;--bwj-widget-inner-py: .75rem;--bwj-widget-header-px: var(--bwj-widget-inner-px);--bwj-widget-header-py: 1rem;--bwj-widget-title-size: .8rem;--bwj-widget-title-weight: 600;--bwj-dashboard-debug-container-flex-row: none;--bwj-dashboard-debug-container-flex-column: none;--bwj-dashboard-debug-container-grid-large-inner: none;--bwj-widget-actions-buttons-display: none}html .dashboard-main-grid{width:100%;display:grid;grid-template-columns:repeat(var(--bwj-dashboard-num-columns, 4),minmax(var(--bwj-widget-width),1fr));gap:var(--bwj-dashboard-gap, 1.5rem);transform:scale(var(--bwj-dashboard-transform-scale, 1));transform-origin:top left}html .dashboard-main-grid.editing{row-gap:calc(var(--bwj-dashboard-gap) + .8rem)}html .dashboard-main-grid:not(.responsive-grid){max-width:min-content}html .dashboard-main-grid.responsive-grid{width:100%}html .dashboard-widget-container{--bwj-border-opacity: .5;flex:1 1 0%;width:100%}html .dashboard-widget-container .widget-container-header{display:none;position:absolute;height:1.85rem;inset:-1.85rem -1px auto;cursor:pointer;padding:0 .33rem}html .dashboard-widget-container .widget-container-header .actions-inner{transition:all .3s ease-in-out;width:100%;display:none;align-items:center;justify-content:space-between;font-size:.8rem}html .dashboard-widget-container.editing{border-top:none!important;border-bottom-left-radius:var(--bwj-widget-border-radius, .3rem);border-bottom-right-radius:var(--bwj-widget-border-radius, .3rem)}html .dashboard-widget-container.editing .widget-container-header{display:flex;border-bottom:none!important;border-top-left-radius:var(--bwj-widget-border-radius, .3rem);border-top-right-radius:var(--bwj-widget-border-radius, .3rem)}html .dashboard-widget-container.editing .widget-container-header>.actions-inner{display:flex!important}html .dashboard-widget-container.editing.highlight-container:before{content:"";position:absolute;inset:-1.85rem 0 0;box-shadow:0 2px 10px 6px oklch(var(--bwj-primary-okl) var(--bwj-primary-okc) var(--bwj-primary-okh) / .5);pointer-events:none}html .dashboard-widget{flex:1 1 0%;display:flex;flex-direction:column;position:relative;border-radius:var(--bwj-widget-border-radius, .3rem);width:100%}html .dashboard-widget.collapsed{height:min-content;flex:0}html .dashboard-widget:not(.collapsed){height:100%}html .dashboard-widget:not(.no-shadow){box-shadow:1px 2px 8px #0000001a}html .dashboard-widget.no-shadow{box-shadow:none}html .dashboard-widget.transparent-widget{background-color:transparent}html .dashboard-widget .widget-title-wrapper .widget-title{font-size:var(--bwj-widget-title-size, .75rem);font-weight:var(--bwj-widget-title-weight, 600)}html .dashboard-widget .widget-inner{display:flex;flex-direction:column;justify-content:space-between}html .dashboard-widget:not(.collapsed) .widget-inner{flex:1 1 0%}html .dashboard-widget.collapsed .widget-inner{flex:0 0 auto!important;height:0px!important;overflow:hidden!important;padding:0!important}html .dashboard-widget:not(.no-padding) .widget-inner{padding:var(--bwj-widget-inner-py, 1rem) var(--bwj-widget-inner-px, 1.5rem)}html .dashboard-widget.no-padding .widget-inner{padding:0}html .dashboard-widget .widget-header{padding:var(--bwj-widget-header-py, 1rem) var(--bwj-widget-header-px, 1.5rem)}html .dashboard-widget-container .widget-container-inner{padding:0;gap:var(--bwj-dashboard-gap, 1.5rem)}html .dashboard-widget.direction-row,html .dashboard-widget-container.direction-row.widget-container-flex{grid-column:1 / -1;width:100%;outline:var(--bwj-dashboard-debug-container-flex-row)}html .dashboard-widget-container.direction-row.widget-container-flex .widget-container-inner{display:flex;flex-direction:row;height:100%}html .dashboard-widget-container.direction-row.widget-container-flex .widget-container-inner .dashboard-widget{min-width:5%;max-width:100%}html .dashboard-widget-container.direction-column.widget-container-flex .widget-container-inner{display:flex;flex-direction:column;height:100%;outline:var(--bwj-dashboard-debug-container-flex-column)}html .dashboard-widget-container.direction-column.widget-container-flex .widget-container-inner .dashboard-widget{min-width:5%;max-width:100%}html .dashboard-widget-container.large-widget.widget-container-grid .widget-container-inner{display:grid;grid-template-columns:repeat(2,minmax(var(--bwj-widget-width),1fr));outline:var(--bwj-dashboard-debug-container-grid-large-inner)}html .dashboard-main-grid.responsive-grid .dashboard-widget-container:not(.large-widget):not(.xlarge-widget),html .dashboard-main-grid.responsive-grid .dashboard-widget:not(.large-widget):not(.xlarge-widget){min-width:20%;max-width:100%}html .dashboard-main-grid:not(.responsive-grid) .dashboard-widget-container:not(.widget-container-flex):not(.large-widget):not(.xlarge-widget),html .widget-container-flex:not(.direction-row) .dashboard-main-grid:not(.responsive-grid) .dashboard-widget:not(.large-widget):not(.xlarge-widget){min-width:var(--bwj-widget-width);max-width:var(--bwj-widget-width)}html .dashboard-widget-container.large-widget,html .dashboard-widget.large-widget{grid-column:span 2}html .dashboard-main-grid:not(.responsive-grid) .dashboard-widget-container.large-widget,html .dashboard-main-grid:not(.responsive-grid) .dashboard-widget.large-widget{max-width:calc(680px + var(--bwj-dashboard-gap, 1.5rem))}html .dashboard-widget-container.xlarge-widget,html .dashboard-widget.xlarge-widget{grid-column:span 3}html .dashboard-main-grid:not(.responsive-grid) .dashboard-widget-container.xlarge-widget,html .dashboard-main-grid:not(.responsive-grid) .dashboard-widget.xlarge-widget{max-width:calc(1020px + (var(--bwj-dashboard-gap, 1.5rem) * 2))}html .widget-header .actions-inner{display:flex;align-items:center;gap:.25rem}html .widget-header .actions-inner .actions-buttons-container{align-items:center;gap:.25rem}html .dashboard-widget.editing:hover .actions-inner{display:flex!important}html .dashboard-widget-container.editing .widget-container-header .actions-inner{display:flex}html .dashboard-widget .widget-header .actions-inner button:not(.collapse-button){display:var(--bwj-widget-actions-buttons-display, none)}html .dashboard-widget.editing:hover .widget-header .actions-inner button{display:flex!important}html .actions-buttons-container{display:flex!important;align-items:center!important;gap:.25rem!important}html .dashboard-number{font-variant-numeric:tabular-nums;font-size:2.5rem;font-weight:700}html .dashboard-number.number-xl{font-size:3.5rem}html .dashboard-number.number-lg{font-size:2.5rem}html .dashboard-number.number-base{font-size:1.5rem}html .dashboard-progress-bar{padding:0;width:100%;height:1.5rem;border-radius:.75rem}html .dashboard-progress{padding:0;height:1.25rem;border-radius:.75rem}@media(max-width:769px){html .dashboard-main-grid{display:flex;flex-direction:column;width:100%;max-width:100%!important}html .dashboard-widget-container.widget-container-flex.direction-row{max-width:100%;grid-column:auto}html .dashboard-widget-container.widget-container-flex.direction-row .widget-container-inner,html .dashboard-widget-container.large-widget.widget-container-grid .widget-container-inner{display:flex;flex-wrap:wrap;flex-direction:column!important;width:100%}}@media(min-width:770px){html .dashboard-main-grid{--bwj-dashboard-num-columns: calc(2 + var(--bwj-dashboard-add-cols))}}@media(max-width:1119px){html .dashboard-widget-container.widget-container-flex.direction-row{max-width:100%;grid-column:auto}html .dashboard-widget-container.widget-container-flex.direction-row .widget-container-inner{display:flex;flex-wrap:wrap;flex-direction:column!important;width:100%}}@media(min-width:1120px){html .dashboard-main-grid{--bwj-dashboard-num-columns: calc(3 + var(--bwj-dashboard-add-cols))}}@media(min-width:1480px){html .dashboard-main-grid{--bwj-dashboard-num-columns: calc(4 + var(--bwj-dashboard-add-cols))}}@media(min-width:1840px){html .dashboard-main-grid{--bwj-dashboard-num-columns: calc(5 + var(--bwj-dashboard-add-cols))}}@media(min-width:2220px){html .dashboard-main-grid{--bwj-dashboard-num-columns: calc(6 + var(--bwj-dashboard-add-cols))}}
|
package/dist/vue-dashboard.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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
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
3
|
const Ge = () => ({
|
|
4
4
|
isLoading: !1,
|
|
@@ -103,7 +103,7 @@ const Ge = () => ({
|
|
|
103
103
|
actions: we,
|
|
104
104
|
getters: Ze,
|
|
105
105
|
computed: Xe
|
|
106
|
-
},
|
|
106
|
+
}, Vs = () => Qe, V = ye({
|
|
107
107
|
currentDashboardId: "",
|
|
108
108
|
undoHistory: {},
|
|
109
109
|
historyIndex: {}
|
|
@@ -144,7 +144,7 @@ const Ge = () => ({
|
|
|
144
144
|
_currentIndex: s,
|
|
145
145
|
_historyLength: e
|
|
146
146
|
};
|
|
147
|
-
}, ot = v(() => $e()),
|
|
147
|
+
}, ot = v(() => $e()), Rs = () => ({
|
|
148
148
|
initializeHistoryForDashboard: Ye,
|
|
149
149
|
resetAllHistory: () => {
|
|
150
150
|
V.undoHistory = {}, V.historyIndex = {};
|
|
@@ -229,7 +229,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
229
229
|
o("path", { d: "M8 12h8" }, null, -1)
|
|
230
230
|
])], 2));
|
|
231
231
|
}
|
|
232
|
-
}),
|
|
232
|
+
}), Os = /* @__PURE__ */ b({
|
|
233
233
|
__name: "DeleteIcon",
|
|
234
234
|
props: {
|
|
235
235
|
cssClass: {}
|
|
@@ -250,7 +250,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
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
|
-
}),
|
|
253
|
+
}), Us = /* @__PURE__ */ b({
|
|
254
254
|
__name: "EditIcon",
|
|
255
255
|
props: {
|
|
256
256
|
cssClass: {}
|
|
@@ -272,7 +272,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
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
|
-
}),
|
|
275
|
+
}), Fs = /* @__PURE__ */ b({
|
|
276
276
|
__name: "RenameIcon",
|
|
277
277
|
props: {
|
|
278
278
|
cssClass: {}
|
|
@@ -293,7 +293,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
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
|
-
}),
|
|
296
|
+
}), qs = /* @__PURE__ */ b({
|
|
297
297
|
__name: "GridIcon",
|
|
298
298
|
props: {
|
|
299
299
|
cssClass: {}
|
|
@@ -340,7 +340,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
340
340
|
}, null, -1)
|
|
341
341
|
])], 2));
|
|
342
342
|
}
|
|
343
|
-
}),
|
|
343
|
+
}), Gs = /* @__PURE__ */ b({
|
|
344
344
|
__name: "ZoomInIcon",
|
|
345
345
|
props: {
|
|
346
346
|
cssClass: {}
|
|
@@ -383,7 +383,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
383
383
|
}, null, -1)
|
|
384
384
|
])], 2));
|
|
385
385
|
}
|
|
386
|
-
}),
|
|
386
|
+
}), Zs = /* @__PURE__ */ b({
|
|
387
387
|
__name: "ZoomOutIcon",
|
|
388
388
|
props: {
|
|
389
389
|
cssClass: {}
|
|
@@ -501,7 +501,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
501
501
|
o("path", { d: "m9 9 6 6" }, null, -1)
|
|
502
502
|
])], 2));
|
|
503
503
|
}
|
|
504
|
-
}),
|
|
504
|
+
}), Xs = /* @__PURE__ */ b({
|
|
505
505
|
__name: "MonitorSmartphoneIcon",
|
|
506
506
|
props: {
|
|
507
507
|
cssClass: {}
|
|
@@ -531,7 +531,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
531
531
|
}, null, -1)
|
|
532
532
|
])], 2));
|
|
533
533
|
}
|
|
534
|
-
}),
|
|
534
|
+
}), Qs = /* @__PURE__ */ b({
|
|
535
535
|
__name: "TabletSmartphoneIcon",
|
|
536
536
|
props: {
|
|
537
537
|
cssClass: {}
|
|
@@ -560,7 +560,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
560
560
|
o("path", { d: "M8 18h.01" }, null, -1)
|
|
561
561
|
])], 2));
|
|
562
562
|
}
|
|
563
|
-
}),
|
|
563
|
+
}), Ys = /* @__PURE__ */ b({
|
|
564
564
|
__name: "MonitorIcon",
|
|
565
565
|
props: {
|
|
566
566
|
cssClass: {}
|
|
@@ -756,7 +756,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
756
756
|
}, null, -1)
|
|
757
757
|
])], 2));
|
|
758
758
|
}
|
|
759
|
-
}),
|
|
759
|
+
}), Js = /* @__PURE__ */ b({
|
|
760
760
|
__name: "TargetIcon",
|
|
761
761
|
props: {
|
|
762
762
|
cssClass: {}
|
|
@@ -878,7 +878,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
878
878
|
}, null, 42, ht)
|
|
879
879
|
], 2));
|
|
880
880
|
}
|
|
881
|
-
}), ft = ["title", "disabled"],
|
|
881
|
+
}), ft = ["title", "disabled"], H = /* @__PURE__ */ b({
|
|
882
882
|
__name: "Button",
|
|
883
883
|
props: {
|
|
884
884
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -952,7 +952,7 @@ const nt = /* @__PURE__ */ b({
|
|
|
952
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
957
|
T($.$slots, "default")
|
|
958
958
|
], 14, ft));
|
|
@@ -1081,7 +1081,7 @@ const _t = {
|
|
|
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", {
|
|
@@ -1141,7 +1141,7 @@ const _t = {
|
|
|
1141
1141
|
T(a.$slots, "default")
|
|
1142
1142
|
], 16, $t));
|
|
1143
1143
|
}
|
|
1144
|
-
}),
|
|
1144
|
+
}), eo = /* @__PURE__ */ b({
|
|
1145
1145
|
__name: "ListItem",
|
|
1146
1146
|
props: {
|
|
1147
1147
|
testId: {},
|
|
@@ -1266,15 +1266,15 @@ function Pt(t, s) {
|
|
|
1266
1266
|
T(t.$slots, "default")
|
|
1267
1267
|
]);
|
|
1268
1268
|
}
|
|
1269
|
-
const
|
|
1269
|
+
const to = /* @__PURE__ */ Ee(St, [["render", Pt]]), Nt = {}, zt = { className: "w-full flex flex-col items-end" };
|
|
1270
1270
|
function Tt(t, s) {
|
|
1271
1271
|
return i(), c("div", zt, [
|
|
1272
1272
|
T(t.$slots, "default")
|
|
1273
1273
|
]);
|
|
1274
1274
|
}
|
|
1275
|
-
const
|
|
1275
|
+
const so = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), oo = (t) => {
|
|
1276
1276
|
console.warn("showToast TODO", t);
|
|
1277
|
-
},
|
|
1277
|
+
}, no = /* @__PURE__ */ b({
|
|
1278
1278
|
__name: "DashboardGrid",
|
|
1279
1279
|
props: {
|
|
1280
1280
|
isEditing: { type: Boolean },
|
|
@@ -1301,7 +1301,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1301
1301
|
T(r.$slots, "default")
|
|
1302
1302
|
], 6));
|
|
1303
1303
|
}
|
|
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: "flex flex-row gap-2 items-center justify-between" }, Vt =
|
|
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: {},
|
|
@@ -1371,7 +1371,10 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1371
1371
|
]),
|
|
1372
1372
|
o("div", Ht, [
|
|
1373
1373
|
T(C.$slots, "title", {}, () => [
|
|
1374
|
-
o("h2",
|
|
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
1379
|
T(C.$slots, "title-right")
|
|
1377
1380
|
])
|
|
@@ -1379,12 +1382,12 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
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
|
-
o("div",
|
|
1387
|
-
D(h(
|
|
1389
|
+
o("div", Ot, [
|
|
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,7 +1395,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (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
1400
|
default: M(() => [
|
|
1398
1401
|
D(h(Ie), {
|
|
@@ -1401,7 +1404,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1401
1404
|
]),
|
|
1402
1405
|
_: 1
|
|
1403
1406
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1404
|
-
D(h(
|
|
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,7 +1412,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (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
1417
|
default: M(() => [
|
|
1415
1418
|
D(h(De), {
|
|
@@ -1418,14 +1421,14 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1418
1421
|
]),
|
|
1419
1422
|
_: 1
|
|
1420
1423
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1421
|
-
D(h(
|
|
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
1433
|
default: M(() => [
|
|
1431
1434
|
D(h(Be), {
|
|
@@ -1434,7 +1437,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1434
1437
|
]),
|
|
1435
1438
|
_: 1
|
|
1436
1439
|
}, 8, ["data-testid"]),
|
|
1437
|
-
r() ? Z("", !0) : (i(), N(h(
|
|
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,7 +1446,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (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
1451
|
default: M(() => [
|
|
1449
1452
|
D(h(me), {
|
|
@@ -1458,23 +1461,23 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (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
1470
|
T(C.$slots, "default")
|
|
1468
|
-
], 8,
|
|
1471
|
+
], 8, Ut)
|
|
1469
1472
|
], 2));
|
|
1470
1473
|
}
|
|
1471
|
-
}),
|
|
1474
|
+
}), qt = { class: "p-4 border border-dashed border-danger" }, Gt = { class: "font-bold" }, Zt = {
|
|
1472
1475
|
key: 0,
|
|
1473
1476
|
class: "flex flex-col"
|
|
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
|
-
},
|
|
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: {},
|
|
@@ -1504,32 +1507,32 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1504
1507
|
emits: ["removeClick", "moveClick", "selectContainer", "savedPropsChanged"],
|
|
1505
1508
|
setup(t, { emit: s }) {
|
|
1506
1509
|
const e = t, a = Y(s), r = v(() => e.extraProps);
|
|
1507
|
-
return (d, u) => (i(), N(
|
|
1510
|
+
return (d, u) => (i(), N(Ft, Q(e, pe(h(a)), { title: "Widget Error" }), {
|
|
1508
1511
|
default: M(() => [
|
|
1509
|
-
o("div",
|
|
1510
|
-
o("span",
|
|
1511
|
-
r.value?.versionMismatch ? (i(), c("div",
|
|
1512
|
-
o("span",
|
|
1513
|
-
o("div",
|
|
1512
|
+
o("div", qt, [
|
|
1513
|
+
o("span", Gt, 'Failed to load "' + S(t.widgetKey) + '"', 1),
|
|
1514
|
+
r.value?.versionMismatch ? (i(), c("div", Zt, [
|
|
1515
|
+
o("span", Xt, "Version Mismatch: " + S(t.widgetKey), 1),
|
|
1516
|
+
o("div", Qt, [
|
|
1514
1517
|
o("span", null, "Widget requires: Vue " + S(r.value?.requiredVer) + ".", 1),
|
|
1515
1518
|
o("span", null, "Host version: " + S(r.value?.hostVer) + ".", 1)
|
|
1516
1519
|
]),
|
|
1517
|
-
o("div",
|
|
1520
|
+
o("div", Yt, [
|
|
1518
1521
|
u[0] || (u[0] = o("h5", null, "Externals:", -1)),
|
|
1519
|
-
o("dl",
|
|
1522
|
+
o("dl", Jt, [
|
|
1520
1523
|
(i(!0), c(q, null, G(r.value?.externalDependencies, ($, g) => (i(), c("dd", {
|
|
1521
1524
|
key: `dep-${g}`
|
|
1522
1525
|
}, "- " + S($), 1))), 128))
|
|
1523
1526
|
])
|
|
1524
1527
|
])
|
|
1525
|
-
])) : (i(), c("div",
|
|
1528
|
+
])) : (i(), c("div", es, [
|
|
1526
1529
|
u[2] || (u[2] = o("div", { class: "flex flex-col text-xs italic" }, [
|
|
1527
1530
|
o("span", null, "The remote plugin is unavailable.")
|
|
1528
1531
|
], -1)),
|
|
1529
1532
|
u[3] || (u[3] = o("span", { class: "font-bold text-sm" }, "Error Details:", -1)),
|
|
1530
|
-
o("div",
|
|
1533
|
+
o("div", ts, [
|
|
1531
1534
|
u[1] || (u[1] = o("h5", null, "Details:", -1)),
|
|
1532
|
-
o("div",
|
|
1535
|
+
o("div", ss, S(r.value?.errorMessage || "Unknown error occurred."), 1)
|
|
1533
1536
|
])
|
|
1534
1537
|
]))
|
|
1535
1538
|
])
|
|
@@ -1537,10 +1540,10 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1537
1540
|
_: 1
|
|
1538
1541
|
}, 16));
|
|
1539
1542
|
}
|
|
1540
|
-
}),
|
|
1543
|
+
}), os = {
|
|
1541
1544
|
key: 1,
|
|
1542
1545
|
class: "flex items-center justify-center p-8 border border-dashed border-base-300"
|
|
1543
|
-
},
|
|
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({
|
|
1544
1547
|
__name: "DynamicWidgetLoader",
|
|
1545
1548
|
props: {
|
|
1546
1549
|
index: {},
|
|
@@ -1656,12 +1659,12 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1656
1659
|
]),
|
|
1657
1660
|
key: "0"
|
|
1658
1661
|
} : void 0
|
|
1659
|
-
]), 1064, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "meta", "widgetSavedProps", "extraProps"])) : (i(), c("div",
|
|
1660
|
-
o("p",
|
|
1662
|
+
]), 1064, ["index", "maxIndex", "widgetKey", "parentWidgetKey", "widgetCatalog", "isEditing", "highlight", "title", "meta", "widgetSavedProps", "extraProps"])) : (i(), c("div", os, [
|
|
1663
|
+
o("p", ns, "Initializing " + S(t.widgetKey) + "...", 1)
|
|
1661
1664
|
]))
|
|
1662
1665
|
]),
|
|
1663
1666
|
fallback: M(() => [
|
|
1664
|
-
o("div",
|
|
1667
|
+
o("div", rs, [
|
|
1665
1668
|
D(h(Mt), {
|
|
1666
1669
|
title: `Loading ${l.value?.title || "Widget"}`
|
|
1667
1670
|
}, null, 8, ["title"]),
|
|
@@ -1673,7 +1676,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1673
1676
|
});
|
|
1674
1677
|
};
|
|
1675
1678
|
}
|
|
1676
|
-
}),
|
|
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({
|
|
1677
1680
|
__name: "WidgetContainer",
|
|
1678
1681
|
props: {
|
|
1679
1682
|
index: {},
|
|
@@ -1704,7 +1707,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1704
1707
|
setup(t, { emit: s }) {
|
|
1705
1708
|
const e = t, a = Y(s), r = v(() => e.maxIndex > -1), d = v(() => {
|
|
1706
1709
|
const B = r.value;
|
|
1707
|
-
return e.highlight ?
|
|
1710
|
+
return e.highlight ? gs : e.isEditing && !B ? ps : "border-transparent";
|
|
1708
1711
|
}), u = v(() => {
|
|
1709
1712
|
const B = e.highlight || !1, I = e.direction || "column", C = r.value, m = e.isEditing || !1;
|
|
1710
1713
|
let A = B ? "border-transparent" : m ? "border-card-invert" : "border-transparent";
|
|
@@ -1740,19 +1743,19 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1740
1743
|
}, [
|
|
1741
1744
|
o("div", {
|
|
1742
1745
|
class: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
1743
|
-
onClick:
|
|
1746
|
+
onClick: j(y, ["stop"])
|
|
1744
1747
|
}, [
|
|
1745
|
-
o("span",
|
|
1748
|
+
o("span", is, S(e.title), 1)
|
|
1746
1749
|
]),
|
|
1747
|
-
o("div",
|
|
1748
|
-
o("div",
|
|
1749
|
-
o("div",
|
|
1750
|
-
D(h(
|
|
1750
|
+
o("div", ls, [
|
|
1751
|
+
o("div", ds, [
|
|
1752
|
+
o("div", cs, [
|
|
1753
|
+
D(h(H), {
|
|
1751
1754
|
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
1752
1755
|
isIconButton: !0,
|
|
1753
1756
|
class: "whitespace-nowrap",
|
|
1754
1757
|
tooltip: { placement: "top", title: "Target this Container" },
|
|
1755
|
-
onClick:
|
|
1758
|
+
onClick: j(y, ["stop"])
|
|
1756
1759
|
}, {
|
|
1757
1760
|
default: M(() => [
|
|
1758
1761
|
D(h(ut), {
|
|
@@ -1761,7 +1764,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1761
1764
|
]),
|
|
1762
1765
|
_: 1
|
|
1763
1766
|
}, 8, ["data-testid"]),
|
|
1764
|
-
D(h(
|
|
1767
|
+
D(h(H), {
|
|
1765
1768
|
"data-testid": `move-container-left_${e.title}`,
|
|
1766
1769
|
isIconButton: !0,
|
|
1767
1770
|
disabled: e.index < 1,
|
|
@@ -1769,7 +1772,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1769
1772
|
placement: "top",
|
|
1770
1773
|
title: e.index < 1 ? "Already at min position" : "Move Container to the left/up"
|
|
1771
1774
|
},
|
|
1772
|
-
onClick: I[0] || (I[0] =
|
|
1775
|
+
onClick: I[0] || (I[0] = j((C) => l(-1), ["stop"]))
|
|
1773
1776
|
}, {
|
|
1774
1777
|
default: M(() => [
|
|
1775
1778
|
D(h(Ie), {
|
|
@@ -1778,7 +1781,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1778
1781
|
]),
|
|
1779
1782
|
_: 1
|
|
1780
1783
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1781
|
-
D(h(
|
|
1784
|
+
D(h(H), {
|
|
1782
1785
|
"data-testid": `move-container-right_${e.title}`,
|
|
1783
1786
|
isIconButton: !0,
|
|
1784
1787
|
disabled: e.index >= e.maxIndex,
|
|
@@ -1786,7 +1789,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1786
1789
|
placement: "top",
|
|
1787
1790
|
title: e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"
|
|
1788
1791
|
},
|
|
1789
|
-
onClick: I[1] || (I[1] =
|
|
1792
|
+
onClick: I[1] || (I[1] = j((C) => l(1), ["stop"]))
|
|
1790
1793
|
}, {
|
|
1791
1794
|
default: M(() => [
|
|
1792
1795
|
D(h(De), {
|
|
@@ -1795,11 +1798,11 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1795
1798
|
]),
|
|
1796
1799
|
_: 1
|
|
1797
1800
|
}, 8, ["data-testid", "disabled", "tooltip"]),
|
|
1798
|
-
D(h(
|
|
1801
|
+
D(h(H), {
|
|
1799
1802
|
"data-testid": `remove-container_${e.title}`,
|
|
1800
1803
|
isIconButton: !0,
|
|
1801
1804
|
tooltip: { placement: "top", title: "Remove Container" },
|
|
1802
|
-
onClick:
|
|
1805
|
+
onClick: j(g, ["stop"])
|
|
1803
1806
|
}, {
|
|
1804
1807
|
default: M(() => [
|
|
1805
1808
|
D(h(Be), {
|
|
@@ -1817,10 +1820,10 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1817
1820
|
class: "widget-container-inner"
|
|
1818
1821
|
}, [
|
|
1819
1822
|
T(B.$slots, "default")
|
|
1820
|
-
], 8,
|
|
1821
|
-
], 10,
|
|
1823
|
+
], 8, us)
|
|
1824
|
+
], 10, as));
|
|
1822
1825
|
}
|
|
1823
|
-
}),
|
|
1826
|
+
}), ao = /* @__PURE__ */ b({
|
|
1824
1827
|
__name: "WidgetContainerRow",
|
|
1825
1828
|
props: {
|
|
1826
1829
|
index: {},
|
|
@@ -1860,7 +1863,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1860
1863
|
_: 3
|
|
1861
1864
|
}, 16));
|
|
1862
1865
|
}
|
|
1863
|
-
}),
|
|
1866
|
+
}), io = /* @__PURE__ */ b({
|
|
1864
1867
|
__name: "WidgetContainerLarge",
|
|
1865
1868
|
props: {
|
|
1866
1869
|
index: {},
|
|
@@ -1900,7 +1903,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1900
1903
|
_: 3
|
|
1901
1904
|
}, 16));
|
|
1902
1905
|
}
|
|
1903
|
-
}),
|
|
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({
|
|
1904
1907
|
__name: "WidgetListItem",
|
|
1905
1908
|
props: {
|
|
1906
1909
|
widgetKey: {},
|
|
@@ -1923,12 +1926,12 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1923
1926
|
onClick: B
|
|
1924
1927
|
}, [
|
|
1925
1928
|
(i(), N(he(h(d)), { class: "" })),
|
|
1926
|
-
o("div",
|
|
1927
|
-
o("div",
|
|
1928
|
-
o("span",
|
|
1929
|
-
o("div",
|
|
1929
|
+
o("div", hs, [
|
|
1930
|
+
o("div", ms, [
|
|
1931
|
+
o("span", fs, S(h(u)), 1),
|
|
1932
|
+
o("div", vs, S(l.value ? "(Added)" : ""), 1)
|
|
1930
1933
|
]),
|
|
1931
|
-
o("div",
|
|
1934
|
+
o("div", ws, [
|
|
1932
1935
|
o("div", null, S(h($)), 1),
|
|
1933
1936
|
a.value && h(r)?.externalDependencies?.length > 0 ? (i(), c("div", {
|
|
1934
1937
|
key: 0,
|
|
@@ -1936,7 +1939,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1936
1939
|
onClick: I
|
|
1937
1940
|
}, [
|
|
1938
1941
|
m[0] || (m[0] = _e(" Externals: ", -1)),
|
|
1939
|
-
o("dl",
|
|
1942
|
+
o("dl", Cs, [
|
|
1940
1943
|
(i(!0), c(q, null, G(h(r)?.externalDependencies, (L, _) => (i(), c("dd", { key: _ }, "- " + S(L), 1))), 128))
|
|
1941
1944
|
])
|
|
1942
1945
|
])) : Z("", !0)
|
|
@@ -1944,7 +1947,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1944
1947
|
])
|
|
1945
1948
|
], 2));
|
|
1946
1949
|
}
|
|
1947
|
-
}),
|
|
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({
|
|
1948
1951
|
__name: "SettingListItem",
|
|
1949
1952
|
props: {
|
|
1950
1953
|
item: {}
|
|
@@ -1966,10 +1969,10 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1966
1969
|
class: p(h(d)),
|
|
1967
1970
|
style: { width: "calc(100% - 1rem)" }
|
|
1968
1971
|
}, [
|
|
1969
|
-
o("div",
|
|
1970
|
-
o("h6",
|
|
1971
|
-
o("p",
|
|
1972
|
-
o("div",
|
|
1972
|
+
o("div", xs, [
|
|
1973
|
+
o("h6", ys, S(h(a)), 1),
|
|
1974
|
+
o("p", bs, S(h(r)), 1),
|
|
1975
|
+
o("div", _s, [
|
|
1973
1976
|
D(h(We), {
|
|
1974
1977
|
label: "",
|
|
1975
1978
|
size: "small",
|
|
@@ -1977,11 +1980,11 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1977
1980
|
modelValue: t.item.value,
|
|
1978
1981
|
"onUpdate:modelValue": u,
|
|
1979
1982
|
onKeydown: [
|
|
1980
|
-
l[0] || (l[0] = ve(
|
|
1981
|
-
l[1] || (l[1] = ve(
|
|
1983
|
+
l[0] || (l[0] = ve(j((y) => $(1), ["prevent"]), ["up"])),
|
|
1984
|
+
l[1] || (l[1] = ve(j((y) => $(-1), ["prevent"]), ["down"]))
|
|
1982
1985
|
]
|
|
1983
1986
|
}, null, 8, ["modelValue"]),
|
|
1984
|
-
D(h(
|
|
1987
|
+
D(h(H), {
|
|
1985
1988
|
"data-testid": `setting-decrease_${t.item.key}`,
|
|
1986
1989
|
isIconButton: !0,
|
|
1987
1990
|
tooltip: {
|
|
@@ -1995,7 +1998,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
1995
1998
|
]),
|
|
1996
1999
|
_: 1
|
|
1997
2000
|
}, 8, ["data-testid"]),
|
|
1998
|
-
D(h(
|
|
2001
|
+
D(h(H), {
|
|
1999
2002
|
"data-testid": `setting-increase_${t.item.key}`,
|
|
2000
2003
|
isIconButton: !0,
|
|
2001
2004
|
tooltip: {
|
|
@@ -2013,13 +2016,13 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2013
2016
|
])
|
|
2014
2017
|
], 2));
|
|
2015
2018
|
}
|
|
2016
|
-
}),
|
|
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 = {
|
|
2017
2020
|
class: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
|
|
2018
2021
|
style: { "max-height": "360px" }
|
|
2019
|
-
},
|
|
2022
|
+
}, Ts = {
|
|
2020
2023
|
key: 0,
|
|
2021
2024
|
className: "hidden px-2 w-full font-semibold sm:flex"
|
|
2022
|
-
},
|
|
2025
|
+
}, As = { class: "mt-4 w-full flex flex-row justify-end pt-1" }, lo = /* @__PURE__ */ b({
|
|
2023
2026
|
__name: "WidgetsCatalogFlyout",
|
|
2024
2027
|
props: {
|
|
2025
2028
|
targetContainerKey: {},
|
|
@@ -2115,8 +2118,8 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2115
2118
|
onDraggingChange: Se
|
|
2116
2119
|
}, {
|
|
2117
2120
|
default: M(() => [
|
|
2118
|
-
o("div",
|
|
2119
|
-
o("div",
|
|
2121
|
+
o("div", $s, [
|
|
2122
|
+
o("div", Is, [
|
|
2120
2123
|
o("div", {
|
|
2121
2124
|
class: p(`handle cursor-grab flex-1 flex gap-2 w-full ${d.value ? "text-warning" : "hover:text-primary"}`)
|
|
2122
2125
|
}, [
|
|
@@ -2130,10 +2133,10 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2130
2133
|
o("h2", {
|
|
2131
2134
|
class: "flex-1 text-base margin-0 capitalize",
|
|
2132
2135
|
title: I.value ? n.value : `Editing dashboard: ${t.currentDashboardConfig.dashboardName}`
|
|
2133
|
-
}, S(n.value), 9,
|
|
2136
|
+
}, S(n.value), 9, Ds)
|
|
2134
2137
|
], 2),
|
|
2135
|
-
o("div",
|
|
2136
|
-
D(h(
|
|
2138
|
+
o("div", Bs, [
|
|
2139
|
+
D(h(H), {
|
|
2137
2140
|
"data-testid": "undo-dashboard-config-change",
|
|
2138
2141
|
isIconButton: !0,
|
|
2139
2142
|
tooltip: {
|
|
@@ -2148,7 +2151,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2148
2151
|
]),
|
|
2149
2152
|
_: 1
|
|
2150
2153
|
}, 8, ["disabled"]),
|
|
2151
|
-
D(h(
|
|
2154
|
+
D(h(H), {
|
|
2152
2155
|
"data-testid": "redo-dashboard-config-change",
|
|
2153
2156
|
isIconButton: !0,
|
|
2154
2157
|
tooltip: {
|
|
@@ -2163,7 +2166,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2163
2166
|
]),
|
|
2164
2167
|
_: 1
|
|
2165
2168
|
}, 8, ["disabled"]),
|
|
2166
|
-
D(h(
|
|
2169
|
+
D(h(H), {
|
|
2167
2170
|
"data-testid": "reset-dashboard-to-default",
|
|
2168
2171
|
isIconButton: !0,
|
|
2169
2172
|
tooltip: {
|
|
@@ -2179,7 +2182,7 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2179
2182
|
}, 8, ["onClick"])
|
|
2180
2183
|
])
|
|
2181
2184
|
]),
|
|
2182
|
-
o("div",
|
|
2185
|
+
o("div", Ks, [
|
|
2183
2186
|
(i(!0), c(q, null, G(m.value, (w) => (i(), c("button", {
|
|
2184
2187
|
key: w.id,
|
|
2185
2188
|
class: p(K(w.id, w.id === 3)),
|
|
@@ -2189,9 +2192,9 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2189
2192
|
class: p(w.hideLabel ? "sr-only" : "")
|
|
2190
2193
|
}, S(w.label), 3),
|
|
2191
2194
|
w.icon ? (i(), N(he(w.icon), { key: 0 })) : Z("", !0)
|
|
2192
|
-
], 10,
|
|
2195
|
+
], 10, Ws))), 128))
|
|
2193
2196
|
]),
|
|
2194
|
-
o("div",
|
|
2197
|
+
o("div", Es, [
|
|
2195
2198
|
D(h(kt), {
|
|
2196
2199
|
enabled: !0,
|
|
2197
2200
|
showChevron: !0,
|
|
@@ -2199,13 +2202,13 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2199
2202
|
onToggleOpen: P
|
|
2200
2203
|
}, {
|
|
2201
2204
|
icon: M(() => [
|
|
2202
|
-
o("div",
|
|
2203
|
-
o("h5",
|
|
2205
|
+
o("div", Ms, [
|
|
2206
|
+
o("h5", Ss, S(L.value), 1),
|
|
2204
2207
|
D(h(me), { class: "shrink-0 ml-1 size-4" })
|
|
2205
2208
|
])
|
|
2206
2209
|
]),
|
|
2207
2210
|
default: M(() => [
|
|
2208
|
-
o("div",
|
|
2211
|
+
o("div", Ls, [
|
|
2209
2212
|
W[3] || (W[3] = o("h6", { class: "font-semibold" }, "Category:", -1)),
|
|
2210
2213
|
(i(!0), c(q, null, G(m.value, (w) => (i(), c("button", {
|
|
2211
2214
|
key: w.id,
|
|
@@ -2216,13 +2219,13 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2216
2219
|
onClick: () => X(w.id)
|
|
2217
2220
|
}, [
|
|
2218
2221
|
o("span", null, S(w.label), 1)
|
|
2219
|
-
], 10,
|
|
2222
|
+
], 10, Ps))), 128))
|
|
2220
2223
|
])
|
|
2221
2224
|
]),
|
|
2222
2225
|
_: 1
|
|
2223
2226
|
}, 8, ["isMenuOpen"])
|
|
2224
2227
|
]),
|
|
2225
|
-
o("div",
|
|
2228
|
+
o("div", Ns, [
|
|
2226
2229
|
D(h(We), {
|
|
2227
2230
|
label: "",
|
|
2228
2231
|
placeholder: "Find...",
|
|
@@ -2235,8 +2238,8 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2235
2238
|
]
|
|
2236
2239
|
}, null, 8, ["modelValue"])
|
|
2237
2240
|
]),
|
|
2238
|
-
o("div",
|
|
2239
|
-
a.value === 3 ? (i(), c("div",
|
|
2241
|
+
o("div", zs, [
|
|
2242
|
+
a.value === 3 ? (i(), c("div", Ts, S(L.value) + ": ", 1)) : Z("", !0),
|
|
2240
2243
|
a.value === 0 ? (i(!0), c(q, { key: 1 }, G(l.value, (w) => (i(), N(ue, {
|
|
2241
2244
|
key: w.widgetKey,
|
|
2242
2245
|
widgetKey: w.widgetKey,
|
|
@@ -2255,14 +2258,14 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2255
2258
|
metaData: w.metaData,
|
|
2256
2259
|
alreadyAdded: e(w.widgetKey, t.currentDashboardConfig),
|
|
2257
2260
|
onAddWidget: () => t.addContainer(w.widgetKey)
|
|
2258
|
-
}, 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(
|
|
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, {
|
|
2259
2262
|
key: w.key,
|
|
2260
2263
|
item: w,
|
|
2261
2264
|
onSettingChanged: z
|
|
2262
2265
|
}, null, 8, ["item"]))), 128)) : Z("", !0)
|
|
2263
2266
|
]),
|
|
2264
|
-
o("div",
|
|
2265
|
-
D(h(
|
|
2267
|
+
o("div", As, [
|
|
2268
|
+
D(h(H), {
|
|
2266
2269
|
class: "bg-opacity-100",
|
|
2267
2270
|
tooltip: {
|
|
2268
2271
|
placement: "bottom",
|
|
@@ -2284,48 +2287,48 @@ const oo = /* @__PURE__ */ Ee(Nt, [["render", Tt]]), no = (t) => {
|
|
|
2284
2287
|
});
|
|
2285
2288
|
export {
|
|
2286
2289
|
nt as AddIcon,
|
|
2287
|
-
|
|
2290
|
+
H as Button,
|
|
2288
2291
|
me as ChevronDownIcon,
|
|
2289
2292
|
gt as CircleQuestionMarkIcon,
|
|
2290
2293
|
ut as CrosshairIcon,
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
+
no as DashboardGrid,
|
|
2295
|
+
Ft as DashboardWidgetBase,
|
|
2296
|
+
Os as DeleteIcon,
|
|
2294
2297
|
Bt as DraggablePanel,
|
|
2295
2298
|
kt as Dropdown,
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
+
ro as DynamicWidgetLoader,
|
|
2300
|
+
Us as EditIcon,
|
|
2301
|
+
qs as GridIcon,
|
|
2299
2302
|
Ke as HandGrabIcon,
|
|
2300
2303
|
ct as HandIcon,
|
|
2301
|
-
|
|
2304
|
+
eo as ListItem,
|
|
2302
2305
|
rt as MinusCircleIcon,
|
|
2303
|
-
|
|
2304
|
-
|
|
2306
|
+
Ys as MonitorIcon,
|
|
2307
|
+
Xs as MonitorSmartphoneIcon,
|
|
2305
2308
|
Ie as MoveLeftIcon,
|
|
2306
2309
|
De as MoveRightIcon,
|
|
2307
2310
|
nt as PlusCircleIcon,
|
|
2308
2311
|
dt as RedoIcon,
|
|
2309
|
-
|
|
2312
|
+
Fs as RenameIcon,
|
|
2310
2313
|
at as SettingsIcon,
|
|
2311
2314
|
Mt as SpinnerComponent,
|
|
2312
2315
|
It as Stack,
|
|
2313
|
-
|
|
2314
|
-
|
|
2316
|
+
Qs as TabletSmartphoneIcon,
|
|
2317
|
+
Js as TargetIcon,
|
|
2315
2318
|
We as TextField,
|
|
2316
2319
|
it as TimerResetIcon,
|
|
2317
2320
|
lt as UndoIcon,
|
|
2318
2321
|
Me as WidgetContainerColumn,
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2322
|
+
io as WidgetContainerLarge,
|
|
2323
|
+
ao as WidgetContainerRow,
|
|
2324
|
+
lo as WidgetsCatalogFlyout,
|
|
2325
|
+
to as WrapperColumnContent,
|
|
2326
|
+
so as WrapperColumnContentListItem,
|
|
2324
2327
|
Be as XCircleIcon,
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2328
|
+
Gs as ZoomInIcon,
|
|
2329
|
+
Zs as ZoomOutIcon,
|
|
2330
|
+
oo as showToast,
|
|
2331
|
+
Vs as useDashboardStore,
|
|
2332
|
+
Rs as useDashboardUndoService,
|
|
2330
2333
|
Y as useWidgetEmits
|
|
2331
2334
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tenorlab/vue-dashboard",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.9",
|
|
4
4
|
"description": "Foundation components for creating user-configurable dashboards in Vue",
|
|
5
5
|
"author": "Damiano Fusco",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"module": "./dist/vue-dashboard.es.js",
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@builtwithjavascript/use-click-outside": "^1.0.1",
|
|
54
|
-
"@tenorlab/dashboard-core": "^1.6.
|
|
54
|
+
"@tenorlab/dashboard-core": "^1.6.5",
|
|
55
55
|
"@types/node": "^24.10.1",
|
|
56
56
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
57
57
|
"prettier": "^3.7.4",
|