@opengis/bi 1.2.34 → 1.2.35
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/README.md +10 -5
- package/dist/bi.js +1 -1
- package/dist/bi.umd.cjs +62 -62
- package/dist/{import-file-BwxPX622.js → import-file-Ds-E7FRA.js} +938 -871
- package/dist/style.css +1 -1
- package/dist/{vs-funnel-bar-BV18EA4K.js → vs-funnel-bar-CWSZGLeM.js} +1 -1
- package/dist/{vs-list-WrrWQ5KF.js → vs-list-hyfVhVWJ.js} +52 -31
- package/dist/{vs-map-CYd9vdrd.js → vs-map-Izi22DyD.js} +2 -2
- package/dist/{vs-map-cluster-5TnGPuBH.js → vs-map-cluster-Mqtz-I8h.js} +2 -2
- package/dist/{vs-number-DUeRr7uz.js → vs-number-kaERn0pu.js} +1 -1
- package/dist/{vs-table-CZJnXfUv.js → vs-table-oIk-eYt8.js} +1 -1
- package/dist/{vs-text-D3nCPkgk.js → vs-text-L9R9n3i7.js} +1 -1
- package/package.json +25 -25
- package/plugin.js +2 -2
- package/server/plugins/vite.js +81 -81
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var vs = Object.defineProperty;
|
|
2
2
|
var ws = (t, e, s) => e in t ? vs(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
3
|
var J = (t, e, s) => ws(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
-
import { h as Ue, defineComponent as be, ref as S, computed as
|
|
4
|
+
import { h as Ue, defineComponent as be, ref as S, computed as M, onUnmounted as Oe, createElementBlock as g, openBlock as u, Fragment as Y, createElementVNode as d, createCommentVNode as U, createTextVNode as oe, toDisplayString as P, renderList as ae, mergeModels as He, useModel as ts, withDirectives as Ge, normalizeClass as se, vModelCheckbox as ks, defineAsyncComponent as te, onMounted as me, watch as ie, normalizeStyle as et, withModifiers as it, createVNode as W, unref as H, createBlock as F, resolveDynamicComponent as ct, createStaticVNode as _s, mergeProps as $e, resolveComponent as ue, withCtx as G, Teleport as $s, Transition as Ds, renderSlot as Vt, getCurrentInstance as Te, onErrorCaptured as Cs, inject as ss, reactive as Ts, createApp as zs, onBeforeUnmount as Is, vShow as Ss, vModelText as Ls, vModelSelect as Es, provide as at, readonly as Ws } from "vue";
|
|
5
5
|
import { useRouter as Le, useRoute as as } from "vue-router";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-vue-next v0.577.0 - ISC
|
|
@@ -9,7 +9,7 @@ import { useRouter as Le, useRoute as as } from "vue-router";
|
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const Rs = (t) => {
|
|
13
13
|
for (const e in t)
|
|
14
14
|
if (e.startsWith("aria-") || e === "role" || e === "title")
|
|
15
15
|
return !0;
|
|
@@ -62,7 +62,7 @@ const Ns = (t) => {
|
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
64
|
*/
|
|
65
|
-
var
|
|
65
|
+
var Ee = {
|
|
66
66
|
xmlns: "http://www.w3.org/2000/svg",
|
|
67
67
|
width: 24,
|
|
68
68
|
height: 24,
|
|
@@ -86,24 +86,24 @@ const Ps = ({
|
|
|
86
86
|
"absolute-stroke-width": a,
|
|
87
87
|
strokeWidth: r,
|
|
88
88
|
"stroke-width": o,
|
|
89
|
-
size: n =
|
|
90
|
-
color: i =
|
|
89
|
+
size: n = Ee.width,
|
|
90
|
+
color: i = Ee.stroke,
|
|
91
91
|
...l
|
|
92
92
|
}, { slots: c }) => Ue(
|
|
93
93
|
"svg",
|
|
94
94
|
{
|
|
95
|
-
...
|
|
95
|
+
...Ee,
|
|
96
96
|
...l,
|
|
97
97
|
width: n,
|
|
98
98
|
height: n,
|
|
99
99
|
stroke: i,
|
|
100
|
-
"stroke-width": Nt(s) || Nt(a) || s === !0 || a === !0 ? Number(r || o ||
|
|
100
|
+
"stroke-width": Nt(s) || Nt(a) || s === !0 || a === !0 ? Number(r || o || Ee["stroke-width"]) * 24 / Number(n) : r || o || Ee["stroke-width"],
|
|
101
101
|
class: js(
|
|
102
102
|
"lucide",
|
|
103
103
|
l.class,
|
|
104
104
|
...t ? [`lucide-${Pt(Ns(t))}-icon`, `lucide-${Pt(t)}`] : ["lucide-icon"]
|
|
105
105
|
),
|
|
106
|
-
...!c.default && !
|
|
106
|
+
...!c.default && !Rs(l) && { "aria-hidden": "true" }
|
|
107
107
|
},
|
|
108
108
|
[...e.map((p) => Ue(...p)), ...c.default ? [c.default()] : []]
|
|
109
109
|
);
|
|
@@ -172,7 +172,7 @@ const rs = pe("ellipsis-vertical", [
|
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
174
|
*/
|
|
175
|
-
const
|
|
175
|
+
const Ms = pe("funnel", [
|
|
176
176
|
[
|
|
177
177
|
"path",
|
|
178
178
|
{
|
|
@@ -187,7 +187,7 @@ const Fs = pe("funnel", [
|
|
|
187
187
|
* This source code is licensed under the ISC license.
|
|
188
188
|
* See the LICENSE file in the root directory of this source tree.
|
|
189
189
|
*/
|
|
190
|
-
const
|
|
190
|
+
const Fs = pe("layout-dashboard", [
|
|
191
191
|
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
|
|
192
192
|
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
|
|
193
193
|
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
|
|
@@ -309,35 +309,35 @@ const Qs = pe("x", [
|
|
|
309
309
|
},
|
|
310
310
|
emits: ["selected"],
|
|
311
311
|
setup(t, { emit: e }) {
|
|
312
|
-
const s = t, a = e, r = S(!1), o = S(s.value ?? null), n = S(null), i =
|
|
312
|
+
const s = t, a = e, r = S(!1), o = S(s.value ?? null), n = S(null), i = M(() => {
|
|
313
313
|
const b = s.options;
|
|
314
|
-
return typeof b == "string" ? b.split(",").map((
|
|
315
|
-
}), l =
|
|
314
|
+
return typeof b == "string" ? b.split(",").map((f, v) => ({ id: v, text: f.trim() })) : Array.isArray(b) ? b : [];
|
|
315
|
+
}), l = M(() => {
|
|
316
316
|
const b = i.value.find(
|
|
317
|
-
(
|
|
317
|
+
(f) => (f.id ?? f) === o.value
|
|
318
318
|
);
|
|
319
319
|
return b ? b.text ?? String(b) : s.title ?? "";
|
|
320
320
|
}), c = (b) => {
|
|
321
|
-
const
|
|
322
|
-
o.value =
|
|
321
|
+
const f = (b == null ? void 0 : b.id) ?? b;
|
|
322
|
+
o.value = f, r.value = !1, a("selected", f), document.removeEventListener("click", p);
|
|
323
323
|
}, p = (b) => {
|
|
324
324
|
n.value && !n.value.contains(b.target) && (r.value = !1, document.removeEventListener("click", p));
|
|
325
|
-
},
|
|
325
|
+
}, h = () => {
|
|
326
326
|
r.value = !r.value, r.value ? setTimeout(() => {
|
|
327
327
|
document.addEventListener("click", p);
|
|
328
328
|
}, 200) : document.removeEventListener("click", p);
|
|
329
329
|
}, x = (b) => (rt == null ? void 0 : rt[b]) ?? b;
|
|
330
330
|
return Oe(() => {
|
|
331
331
|
document.removeEventListener("click", p);
|
|
332
|
-
}), (b,
|
|
332
|
+
}), (b, f) => (u(), g(Y, null, [
|
|
333
333
|
d("button", {
|
|
334
334
|
type: "button",
|
|
335
335
|
"aria-expanded": "true",
|
|
336
336
|
class: "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative group pr-2 -ms-2 py-1.5 pl-2.5 inline-flex shrink-0 justify-center items-center gap-x-1.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 before:absolute before:inset-0 before:z-[1] dark:text-neutral-400 dark:hover:bg-neutral-800 dark:focus:bg-neutral-700",
|
|
337
|
-
onClick:
|
|
337
|
+
onClick: h
|
|
338
338
|
}, [
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
oe(P(x(l.value)) + " ", 1),
|
|
340
|
+
f[0] || (f[0] = d("svg", {
|
|
341
341
|
class: "shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",
|
|
342
342
|
xmlns: "http://www.w3.org/2000/svg",
|
|
343
343
|
width: "16",
|
|
@@ -363,14 +363,14 @@ const Qs = pe("x", [
|
|
|
363
363
|
"aria-orientation": "vertical",
|
|
364
364
|
style: { "margin-top": "10px" }
|
|
365
365
|
}, [
|
|
366
|
-
(u(!0), g(Y, null,
|
|
366
|
+
(u(!0), g(Y, null, ae(i.value, (v) => (u(), g("div", {
|
|
367
367
|
key: v.id || v,
|
|
368
368
|
class: "cursor-pointer selected hs-selected:bg-gray-100 dark:hs-selected:bg-neutral-800 py-1.5 px-2 w-full text-[13px] text-gray-800 rounded-lg hover:bg-gray-100 focus:outline-none focus:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
369
369
|
onClick: (y) => c(v)
|
|
370
370
|
}, [
|
|
371
371
|
d("div", Js, [
|
|
372
372
|
d("span", null, P(x(v.text || v)), 1),
|
|
373
|
-
o.value === (v.id || v) ? (u(), g("span", Ks,
|
|
373
|
+
o.value === (v.id || v) ? (u(), g("span", Ks, [...f[1] || (f[1] = [
|
|
374
374
|
d("svg", {
|
|
375
375
|
class: "shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",
|
|
376
376
|
xmlns: "http:.w3.org/2000/svg",
|
|
@@ -385,10 +385,10 @@ const Qs = pe("x", [
|
|
|
385
385
|
}, [
|
|
386
386
|
d("polyline", { points: "20 6 9 17 4 12" })
|
|
387
387
|
], -1)
|
|
388
|
-
]))) :
|
|
388
|
+
])])) : U("", !0)
|
|
389
389
|
])
|
|
390
390
|
], 8, Xs))), 128))
|
|
391
|
-
], 512)) :
|
|
391
|
+
], 512)) : U("", !0)
|
|
392
392
|
], 64));
|
|
393
393
|
}
|
|
394
394
|
}), ea = { class: "flex items-center space-x-2" }, ta = /* @__PURE__ */ be({
|
|
@@ -410,10 +410,10 @@ const Qs = pe("x", [
|
|
|
410
410
|
s("update:is-enabled", a);
|
|
411
411
|
};
|
|
412
412
|
return (o, n) => (u(), g("div", ea, [
|
|
413
|
-
|
|
413
|
+
t.leftLabel ? (u(), g("div", {
|
|
414
414
|
key: 0,
|
|
415
|
-
class:
|
|
416
|
-
}, P(
|
|
415
|
+
class: se(["transition-colors", { "text-blue-500": !a.value }])
|
|
416
|
+
}, P(t.leftLabel), 3)) : U("", !0),
|
|
417
417
|
Ge(d("input", {
|
|
418
418
|
"onUpdate:modelValue": n[0] || (n[0] = (i) => a.value = i),
|
|
419
419
|
type: "checkbox",
|
|
@@ -422,10 +422,10 @@ const Qs = pe("x", [
|
|
|
422
422
|
}, null, 544), [
|
|
423
423
|
[ks, a.value]
|
|
424
424
|
]),
|
|
425
|
-
|
|
425
|
+
t.rightLabel ? (u(), g("div", {
|
|
426
426
|
key: 1,
|
|
427
|
-
class:
|
|
428
|
-
}, P(
|
|
427
|
+
class: se(["transition-colors", { "text-blue-500": a.value }])
|
|
428
|
+
}, P(t.rightLabel), 3)) : U("", !0)
|
|
429
429
|
]));
|
|
430
430
|
}
|
|
431
431
|
}), de = (t, e) => {
|
|
@@ -435,27 +435,27 @@ const Qs = pe("x", [
|
|
|
435
435
|
return s;
|
|
436
436
|
}, sa = {}, aa = { class: "flex items-center justify-center h-full" };
|
|
437
437
|
function ra(t, e) {
|
|
438
|
-
return u(), g("div", aa, e[0] || (e[0] = [
|
|
438
|
+
return u(), g("div", aa, [...e[0] || (e[0] = [
|
|
439
439
|
d("div", { class: "text-center text-gray-500" }, [
|
|
440
440
|
d("h2", { class: "text-2xl font-bold" }, "No data available")
|
|
441
441
|
], -1)
|
|
442
|
-
]));
|
|
442
|
+
])]);
|
|
443
443
|
}
|
|
444
444
|
const na = /* @__PURE__ */ de(sa, [["render", ra]]), At = {
|
|
445
|
-
"bi-bar": te(() => Promise.resolve().then(() =>
|
|
446
|
-
"bi-number": te(() => import("./vs-number-
|
|
447
|
-
"bi-text": te(() => import("./vs-text-
|
|
448
|
-
"bi-listbar": te(() => Promise.resolve().then(() =>
|
|
449
|
-
"bi-pie": te(() => Promise.resolve().then(() =>
|
|
450
|
-
"bi-donut": te(() => Promise.resolve().then(() =>
|
|
451
|
-
"bi-line": te(() => Promise.resolve().then(() =>
|
|
452
|
-
"bi-stat": te(() => Promise.resolve().then(() =>
|
|
453
|
-
"bi-pivot": te(() => Promise.resolve().then(() =>
|
|
454
|
-
"bi-progress": te(() => Promise.resolve().then(() =>
|
|
455
|
-
"bi-funnel": te(() => import("./vs-funnel-bar-
|
|
456
|
-
"bi-map": te(() => import("./vs-map-
|
|
457
|
-
"bi-cluster": te(() => import("./vs-map-cluster-
|
|
458
|
-
"bi-table": te(() => import("./vs-table-
|
|
445
|
+
"bi-bar": te(() => Promise.resolve().then(() => Ci)),
|
|
446
|
+
"bi-number": te(() => import("./vs-number-kaERn0pu.js")),
|
|
447
|
+
"bi-text": te(() => import("./vs-text-L9R9n3i7.js")),
|
|
448
|
+
"bi-listbar": te(() => Promise.resolve().then(() => Dl)),
|
|
449
|
+
"bi-pie": te(() => Promise.resolve().then(() => Vi)),
|
|
450
|
+
"bi-donut": te(() => Promise.resolve().then(() => Li)),
|
|
451
|
+
"bi-line": te(() => Promise.resolve().then(() => Bi)),
|
|
452
|
+
"bi-stat": te(() => Promise.resolve().then(() => al)),
|
|
453
|
+
"bi-pivot": te(() => Promise.resolve().then(() => Ml)),
|
|
454
|
+
"bi-progress": te(() => Promise.resolve().then(() => ml)),
|
|
455
|
+
"bi-funnel": te(() => import("./vs-funnel-bar-CWSZGLeM.js")),
|
|
456
|
+
"bi-map": te(() => import("./vs-map-Izi22DyD.js")),
|
|
457
|
+
"bi-cluster": te(() => import("./vs-map-cluster-Mqtz-I8h.js")),
|
|
458
|
+
"bi-table": te(() => import("./vs-table-oIk-eYt8.js"))
|
|
459
459
|
};
|
|
460
460
|
let os = "/api";
|
|
461
461
|
function tt(t) {
|
|
@@ -471,7 +471,7 @@ function oa(t, e) {
|
|
|
471
471
|
const n = o.toString();
|
|
472
472
|
return n ? `${r}${r.includes("?") ? "&" : "?"}${n}` : r;
|
|
473
473
|
}
|
|
474
|
-
async function
|
|
474
|
+
async function Me(t, e = {}) {
|
|
475
475
|
const { params: s, ...a } = e, r = oa(t, s), o = {
|
|
476
476
|
...a.headers
|
|
477
477
|
};
|
|
@@ -489,18 +489,18 @@ async function Fe(t, e = {}) {
|
|
|
489
489
|
return i;
|
|
490
490
|
}
|
|
491
491
|
}
|
|
492
|
-
const
|
|
492
|
+
const re = {
|
|
493
493
|
get(t, e) {
|
|
494
|
-
return
|
|
494
|
+
return Me(t, { ...e, method: "GET" });
|
|
495
495
|
},
|
|
496
496
|
post(t, e) {
|
|
497
|
-
return
|
|
497
|
+
return Me(t, { method: "POST", body: e != null ? JSON.stringify(e) : void 0 });
|
|
498
498
|
},
|
|
499
499
|
put(t, e) {
|
|
500
|
-
return
|
|
500
|
+
return Me(t, { method: "PUT", body: e != null ? JSON.stringify(e) : void 0 });
|
|
501
501
|
},
|
|
502
502
|
delete(t) {
|
|
503
|
-
return
|
|
503
|
+
return Me(t, { method: "DELETE" });
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
506
|
function Bt(t) {
|
|
@@ -514,11 +514,11 @@ function ia(t, e) {
|
|
|
514
514
|
return `${s}\r
|
|
515
515
|
${a}`;
|
|
516
516
|
}
|
|
517
|
-
function
|
|
517
|
+
function Mt(t, e, s) {
|
|
518
518
|
const a = new Blob([e], { type: `${s};charset=utf-8` }), r = URL.createObjectURL(a), o = document.createElement("a");
|
|
519
519
|
o.href = r, o.download = t, document.body.appendChild(o), o.click(), document.body.removeChild(o), URL.revokeObjectURL(r);
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function Ft(t, e) {
|
|
522
522
|
return ((t || e).replace(/[<>:"/\\|?*\u0000-\u001f]/g, "_").trim() || e).slice(0, 120);
|
|
523
523
|
}
|
|
524
524
|
function ye(t, e) {
|
|
@@ -546,7 +546,7 @@ function lt(t) {
|
|
|
546
546
|
const e = String(t).trim(), s = e.includes("T") ? e : e.replace(/^(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})/, "$1T$2"), a = new Date(s);
|
|
547
547
|
return Number.isNaN(a.getTime()) ? e : new Intl.DateTimeFormat("uk-UA", qt).format(a);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
549
|
+
function Hl(t) {
|
|
550
550
|
return Intl.NumberFormat("en").format(t ?? 0);
|
|
551
551
|
}
|
|
552
552
|
const la = {
|
|
@@ -590,16 +590,16 @@ const la = {
|
|
|
590
590
|
}
|
|
591
591
|
return m;
|
|
592
592
|
}
|
|
593
|
-
const a = t, r = e, o = S(null), n = S(null), i = S(null), l = S({}), c = S([]), p = S(!1),
|
|
593
|
+
const a = t, r = e, o = S(null), n = S(null), i = S(null), l = S({}), c = S([]), p = S(!1), h = S(null), x = M(() => {
|
|
594
594
|
const m = a.config;
|
|
595
595
|
return a.widget || (m == null ? void 0 : m.widget) || (m == null ? void 0 : m.widgetId) || (m == null ? void 0 : m.id) || (m == null ? void 0 : m.name) || "";
|
|
596
|
-
}), b =
|
|
596
|
+
}), b = M(() => {
|
|
597
597
|
const m = a.config;
|
|
598
598
|
return a.dashboard || (m == null ? void 0 : m.dashboard) || (m == null ? void 0 : m.dashboardId) || "";
|
|
599
|
-
}),
|
|
599
|
+
}), f = M(() => {
|
|
600
600
|
var m;
|
|
601
601
|
return a.prefix || ((m = a.config) == null ? void 0 : m.prefix) || "";
|
|
602
|
-
}), v =
|
|
602
|
+
}), v = M(() => a.data || a.prefetchedData || null);
|
|
603
603
|
function y(m) {
|
|
604
604
|
const _ = m.source;
|
|
605
605
|
if (Array.isArray(_) && _[0] && typeof _[0] == "object")
|
|
@@ -607,7 +607,7 @@ const la = {
|
|
|
607
607
|
const k = m.columns;
|
|
608
608
|
return Array.isArray(k) && k.length ? k.map((j) => typeof j == "string" ? j : (j == null ? void 0 : j.name) ?? "").filter(Boolean) : [];
|
|
609
609
|
}
|
|
610
|
-
const
|
|
610
|
+
const z = M(() => {
|
|
611
611
|
const m = l.value;
|
|
612
612
|
if ((m == null ? void 0 : m.status) != null && m.status >= 400) return !1;
|
|
613
613
|
const _ = m == null ? void 0 : m.source;
|
|
@@ -617,10 +617,10 @@ const la = {
|
|
|
617
617
|
p.value = !1, document.removeEventListener("click", w);
|
|
618
618
|
}
|
|
619
619
|
function w(m) {
|
|
620
|
-
const _ =
|
|
620
|
+
const _ = h.value;
|
|
621
621
|
_ && !_.contains(m.target) && $();
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function R() {
|
|
624
624
|
p.value = !p.value, p.value ? setTimeout(() => document.addEventListener("click", w), 0) : document.removeEventListener("click", w);
|
|
625
625
|
}
|
|
626
626
|
function B() {
|
|
@@ -628,10 +628,10 @@ const la = {
|
|
|
628
628
|
if (!Array.isArray(_) || !_.length) return;
|
|
629
629
|
const k = y(m);
|
|
630
630
|
if (!k.length) return;
|
|
631
|
-
const j = ia(_, k), K =
|
|
632
|
-
|
|
631
|
+
const j = ia(_, k), K = Ft(D.value || x.value || "widget", "widget");
|
|
632
|
+
Mt(`${K}.csv`, `\uFEFF${j}`, "text/csv"), $();
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function I(m, _) {
|
|
635
635
|
return m.map((k) => {
|
|
636
636
|
const j = {};
|
|
637
637
|
for (const K of _)
|
|
@@ -639,39 +639,39 @@ const la = {
|
|
|
639
639
|
return j;
|
|
640
640
|
});
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function T() {
|
|
643
643
|
const m = l.value, _ = m == null ? void 0 : m.source;
|
|
644
644
|
if (!Array.isArray(_) || !_.length) return;
|
|
645
|
-
const k = y(m), j =
|
|
646
|
-
|
|
645
|
+
const k = y(m), j = I(_, k), K = { title: D.value, widget: x.value, columns: k, source: j }, E = Ft(D.value || x.value || "widget", "widget");
|
|
646
|
+
Mt(`${E}.json`, JSON.stringify(K, null, 2), "application/json"), $();
|
|
647
647
|
}
|
|
648
|
-
const D =
|
|
648
|
+
const D = M(() => {
|
|
649
649
|
var _, k, j;
|
|
650
650
|
const m = (_ = a.dashboardWidgets) == null ? void 0 : _.find((K) => K.name === x.value);
|
|
651
651
|
return ((k = m == null ? void 0 : m.data) == null ? void 0 : k.title) ?? (m == null ? void 0 : m.title) ?? ((j = a.config) == null ? void 0 : j.title) ?? "";
|
|
652
|
-
}), V =
|
|
653
|
-
var
|
|
654
|
-
const m = s((
|
|
652
|
+
}), V = M(() => {
|
|
653
|
+
var E, we, ke;
|
|
654
|
+
const m = s((E = l.value) == null ? void 0 : E.last_update), _ = s(
|
|
655
655
|
(we = v.value) == null ? void 0 : we.last_update
|
|
656
656
|
), k = m ?? _;
|
|
657
657
|
if (k != null) return lt(k);
|
|
658
658
|
const j = (ke = a.dashboardWidgets) == null ? void 0 : ke.find((_e) => _e.name === x.value), K = s(j == null ? void 0 : j.last_update) ?? (j == null ? void 0 : j.updated_at) ?? null;
|
|
659
659
|
return lt(K);
|
|
660
|
-
}), O =
|
|
660
|
+
}), O = M(() => {
|
|
661
661
|
var k, j, K;
|
|
662
|
-
const m = (k = a.dashboardWidgets) == null ? void 0 : k.find((
|
|
662
|
+
const m = (k = a.dashboardWidgets) == null ? void 0 : k.find((E) => E.name === x.value), _ = (j = v.value) == null ? void 0 : j.type;
|
|
663
663
|
return (m == null ? void 0 : m.type) ?? ((K = a.config) == null ? void 0 : K.type) ?? _ ?? "text";
|
|
664
|
-
}), ee =
|
|
664
|
+
}), ee = M(() => {
|
|
665
665
|
var m, _, k;
|
|
666
666
|
return a.height || ((m = a.config) == null ? void 0 : m.height) || ((k = (_ = l.value) == null ? void 0 : _.style) == null ? void 0 : k.height) || 480;
|
|
667
|
-
}),
|
|
667
|
+
}), ne = M(() => {
|
|
668
668
|
var _;
|
|
669
669
|
const m = (_ = l.value) == null ? void 0 : _.controls;
|
|
670
670
|
return !m || typeof m == "boolean" ? [] : Object.keys(m).map((k) => ({
|
|
671
671
|
name: k,
|
|
672
672
|
options: m[k]
|
|
673
673
|
}));
|
|
674
|
-
}),
|
|
674
|
+
}), le = M(() => {
|
|
675
675
|
const m = O.value ? `bi-${O.value}` : "";
|
|
676
676
|
return m && m in At ? At[m] : null;
|
|
677
677
|
});
|
|
@@ -702,22 +702,22 @@ const la = {
|
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
return me(() => {
|
|
705
|
-
|
|
705
|
+
f.value && tt(f.value);
|
|
706
706
|
}), Oe(() => {
|
|
707
707
|
document.removeEventListener("click", w);
|
|
708
|
-
}),
|
|
708
|
+
}), ie(
|
|
709
709
|
() => a.filterURl,
|
|
710
710
|
(m) => {
|
|
711
711
|
var _, k;
|
|
712
712
|
m && ((k = (_ = n.value) == null ? void 0 : _.setFilter) == null || k.call(_, m));
|
|
713
713
|
}
|
|
714
|
-
),
|
|
714
|
+
), ie(
|
|
715
715
|
() => a.selectedWidget,
|
|
716
716
|
(m, _) => {
|
|
717
717
|
var k;
|
|
718
718
|
m !== _ && m === ((k = l.value) == null ? void 0 : k.id) && r("update:current-widget-data", l.value);
|
|
719
719
|
}
|
|
720
|
-
),
|
|
720
|
+
), ie(
|
|
721
721
|
l,
|
|
722
722
|
(m, _) => {
|
|
723
723
|
(m == null ? void 0 : m.id) !== (_ == null ? void 0 : _.id) && r("update:current-widget-data", m);
|
|
@@ -731,17 +731,17 @@ const la = {
|
|
|
731
731
|
class: "box-border relative p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto overflow-hidden mb-2 last:mb-0 flex flex-col min-h-0",
|
|
732
732
|
style: et({ height: ee.value + "px", maxHeight: ee.value + "px" })
|
|
733
733
|
}, [
|
|
734
|
-
["text", "cluster", "map"].includes(O.value) ? V.value ? (u(), g("p", xa, " Оновлено: " + P(V.value), 1)) :
|
|
734
|
+
["text", "cluster", "map"].includes(O.value) ? V.value ? (u(), g("p", xa, " Оновлено: " + P(V.value), 1)) : U("", !0) : (u(), g("div", la, [
|
|
735
735
|
d("div", da, [
|
|
736
736
|
d("div", ca, [
|
|
737
737
|
d("span", ua, P(D.value), 1),
|
|
738
|
-
V.value ? (u(), g("span", pa, " Оновлено: " + P(V.value), 1)) :
|
|
738
|
+
V.value ? (u(), g("span", pa, " Оновлено: " + P(V.value), 1)) : U("", !0)
|
|
739
739
|
]),
|
|
740
740
|
d("div", ha, [
|
|
741
|
-
|
|
741
|
+
z.value ? (u(), g("div", {
|
|
742
742
|
key: 0,
|
|
743
743
|
ref_key: "dataExportRootRef",
|
|
744
|
-
ref:
|
|
744
|
+
ref: h,
|
|
745
745
|
class: "relative"
|
|
746
746
|
}, [
|
|
747
747
|
d("button", {
|
|
@@ -750,9 +750,9 @@ const la = {
|
|
|
750
750
|
title: ya,
|
|
751
751
|
"aria-haspopup": "menu",
|
|
752
752
|
"aria-expanded": p.value,
|
|
753
|
-
onClick: it(
|
|
753
|
+
onClick: it(R, ["stop"])
|
|
754
754
|
}, [
|
|
755
|
-
|
|
755
|
+
W(H(rs), {
|
|
756
756
|
size: 16,
|
|
757
757
|
class: "text-gray-800"
|
|
758
758
|
})
|
|
@@ -768,46 +768,46 @@ const la = {
|
|
|
768
768
|
type: "button",
|
|
769
769
|
role: "menuitem",
|
|
770
770
|
class: "w-full text-left py-1.5 px-2 text-[13px] text-gray-800 rounded-lg hover:bg-gray-100",
|
|
771
|
-
onClick:
|
|
771
|
+
onClick: T
|
|
772
772
|
}, P(wa))
|
|
773
|
-
])) :
|
|
774
|
-
], 512)) :
|
|
773
|
+
])) : U("", !0)
|
|
774
|
+
], 512)) : U("", !0),
|
|
775
775
|
d("div", ma, [
|
|
776
|
-
(k =
|
|
777
|
-
(u(!0), g(Y, null,
|
|
778
|
-
(
|
|
779
|
-
), (
|
|
776
|
+
(k = ne.value) != null && k.length ? (u(), g("span", ba, [
|
|
777
|
+
(u(!0), g(Y, null, ae((j = ne.value) == null ? void 0 : j.filter(
|
|
778
|
+
(E) => (E == null ? void 0 : E.options) && (E == null ? void 0 : E.name) !== "export"
|
|
779
|
+
), (E) => {
|
|
780
780
|
var we, ke;
|
|
781
781
|
return u(), g("div", {
|
|
782
|
-
key:
|
|
782
|
+
key: E == null ? void 0 : E.name
|
|
783
783
|
}, [
|
|
784
|
-
Array.isArray(
|
|
784
|
+
Array.isArray(E == null ? void 0 : E.options) ? (u(), F(Ys, {
|
|
785
785
|
key: 0,
|
|
786
|
-
title:
|
|
787
|
-
options:
|
|
788
|
-
value: ((ke = (we = l.value) == null ? void 0 : we.data) == null ? void 0 : ke[
|
|
789
|
-
onSelected: (_e) => C(_e,
|
|
790
|
-
}, null, 8, ["title", "options", "value", "onSelected"])) : typeof
|
|
786
|
+
title: E == null ? void 0 : E.name,
|
|
787
|
+
options: E == null ? void 0 : E.options,
|
|
788
|
+
value: ((ke = (we = l.value) == null ? void 0 : we.data) == null ? void 0 : ke[E == null ? void 0 : E.name]) ?? null,
|
|
789
|
+
onSelected: (_e) => C(_e, E == null ? void 0 : E.name)
|
|
790
|
+
}, null, 8, ["title", "options", "value", "onSelected"])) : typeof E.options == "boolean" ? (u(), F(ta, {
|
|
791
791
|
key: 1,
|
|
792
|
-
"left-label":
|
|
793
|
-
"model-value": !!(
|
|
794
|
-
"onUpdate:isEnabled": (_e) => L(
|
|
795
|
-
}, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) :
|
|
792
|
+
"left-label": E == null ? void 0 : E.name,
|
|
793
|
+
"model-value": !!(E != null && E.options),
|
|
794
|
+
"onUpdate:isEnabled": (_e) => L(E == null ? void 0 : E.name, _e)
|
|
795
|
+
}, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) : U("", !0)
|
|
796
796
|
]);
|
|
797
797
|
}), 128)),
|
|
798
|
-
(K =
|
|
798
|
+
(K = ne.value) != null && K.some((E) => (E == null ? void 0 : E.name) === "export") ? (u(), g("button", {
|
|
799
799
|
key: 0,
|
|
800
800
|
type: "button",
|
|
801
801
|
class: "h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",
|
|
802
802
|
title: ka,
|
|
803
803
|
onClick: Z
|
|
804
804
|
}, [
|
|
805
|
-
|
|
805
|
+
W(H(Bs), {
|
|
806
806
|
size: 16,
|
|
807
807
|
class: "text-gray-800"
|
|
808
808
|
})
|
|
809
|
-
])) :
|
|
810
|
-
])) :
|
|
809
|
+
])) : U("", !0)
|
|
810
|
+
])) : U("", !0)
|
|
811
811
|
])
|
|
812
812
|
])
|
|
813
813
|
])
|
|
@@ -817,21 +817,21 @@ const la = {
|
|
|
817
817
|
onClick: _[2] || (_[2] = it(() => {
|
|
818
818
|
}, ["stop"]))
|
|
819
819
|
}, [
|
|
820
|
-
|
|
820
|
+
le.value ? (u(), F(ct(le.value), {
|
|
821
821
|
key: 0,
|
|
822
822
|
ref_key: "chartRef",
|
|
823
823
|
ref: n,
|
|
824
824
|
"current-widget": i.value,
|
|
825
|
-
"onUpdate:currentWidget": _[0] || (_[0] = (
|
|
825
|
+
"onUpdate:currentWidget": _[0] || (_[0] = (E) => i.value = E),
|
|
826
826
|
"widget-data": l.value,
|
|
827
|
-
"onUpdate:widgetData": _[1] || (_[1] = (
|
|
828
|
-
config:
|
|
827
|
+
"onUpdate:widgetData": _[1] || (_[1] = (E) => l.value = E),
|
|
828
|
+
config: t.config,
|
|
829
829
|
dashboard: b.value,
|
|
830
830
|
title: D.value,
|
|
831
831
|
widget: x.value,
|
|
832
|
-
prefix:
|
|
832
|
+
prefix: f.value,
|
|
833
833
|
"prefetched-data": v.value
|
|
834
|
-
}, null, 40, ["current-widget", "widget-data", "config", "dashboard", "title", "widget", "prefix", "prefetched-data"])) : (u(),
|
|
834
|
+
}, null, 40, ["current-widget", "widget-data", "config", "dashboard", "title", "widget", "prefix", "prefetched-data"])) : (u(), F(na, {
|
|
835
835
|
key: 1,
|
|
836
836
|
class: "w-full h-full"
|
|
837
837
|
}))
|
|
@@ -839,7 +839,7 @@ const la = {
|
|
|
839
839
|
], 4);
|
|
840
840
|
};
|
|
841
841
|
}
|
|
842
|
-
}), _a = { class: "w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit" }, $a = { class: "p-5 min-h-[500px] flex flex-col justify-center items-center text-center" }, Da = { class: "max-w-sm mx-auto mt-6" }, Ca = { class: "font-medium text-gray-800 dark:text-neutral-200" },
|
|
842
|
+
}), _a = { class: "w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit" }, $a = { class: "p-5 min-h-[500px] flex flex-col justify-center items-center text-center" }, Da = { class: "max-w-sm mx-auto mt-6" }, Ca = { class: "font-medium text-gray-800 dark:text-neutral-200" }, Ta = { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, Qe = /* @__PURE__ */ be({
|
|
843
843
|
__name: "vs-new-nodata",
|
|
844
844
|
props: {
|
|
845
845
|
title: { default: "Дані для відображення відсутні" },
|
|
@@ -851,20 +851,20 @@ const la = {
|
|
|
851
851
|
d("div", $a, [
|
|
852
852
|
s[0] || (s[0] = _s('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>', 1)),
|
|
853
853
|
d("div", Da, [
|
|
854
|
-
d("p", Ca, P(
|
|
855
|
-
d("p",
|
|
854
|
+
d("p", Ca, P(t.title), 1),
|
|
855
|
+
d("p", Ta, P(t.text), 1)
|
|
856
856
|
])
|
|
857
857
|
])
|
|
858
858
|
])
|
|
859
859
|
]));
|
|
860
860
|
}
|
|
861
|
-
}),
|
|
861
|
+
}), za = {
|
|
862
862
|
__name: "filter",
|
|
863
863
|
setup(t) {
|
|
864
|
-
return (e, s) => (u(),
|
|
864
|
+
return (e, s) => (u(), F(H(Ms), $e(e.$attrs, { size: 24 }), null, 16));
|
|
865
865
|
}
|
|
866
|
-
},
|
|
867
|
-
components: { filterIcon:
|
|
866
|
+
}, Ia = {
|
|
867
|
+
components: { filterIcon: za },
|
|
868
868
|
props: ["filterScheme"],
|
|
869
869
|
emits: ["filters:changed"]
|
|
870
870
|
}, Sa = { class: "flex items-center" }, La = {
|
|
@@ -874,17 +874,17 @@ const la = {
|
|
|
874
874
|
disabled: "",
|
|
875
875
|
title: "Фільтри вимкнено (v3-filter видалено)"
|
|
876
876
|
};
|
|
877
|
-
function
|
|
877
|
+
function Ea(t, e, s, a, r, o) {
|
|
878
878
|
const n = ue("filterIcon");
|
|
879
879
|
return u(), g("div", Sa, [
|
|
880
880
|
s.filterScheme ? (u(), g("button", La, [
|
|
881
|
-
|
|
882
|
-
e[0] || (e[0] =
|
|
883
|
-
])) :
|
|
881
|
+
W(n),
|
|
882
|
+
e[0] || (e[0] = oe(" Фільтри ", -1))
|
|
883
|
+
])) : U("", !0)
|
|
884
884
|
]);
|
|
885
885
|
}
|
|
886
|
-
const
|
|
887
|
-
components: { VsFilterHeader:
|
|
886
|
+
const Wa = /* @__PURE__ */ de(Ia, [["render", Ea]]), Ra = {
|
|
887
|
+
components: { VsFilterHeader: Wa },
|
|
888
888
|
props: {
|
|
889
889
|
dashboardData: { type: Object, default: null },
|
|
890
890
|
filters: { type: Array, default: null }
|
|
@@ -902,20 +902,20 @@ function Aa(t, e, s, a, r, o) {
|
|
|
902
902
|
return u(), g("div", ja, [
|
|
903
903
|
d("div", Va, [
|
|
904
904
|
d("h1", Na, P((i = s.dashboardData) == null ? void 0 : i.title), 1),
|
|
905
|
-
(l = s.dashboardData) != null && l.description ? (u(), g("button", Pa, P((c = s.dashboardData) == null ? void 0 : c.description), 1)) :
|
|
905
|
+
(l = s.dashboardData) != null && l.description ? (u(), g("button", Pa, P((c = s.dashboardData) == null ? void 0 : c.description), 1)) : U("", !0)
|
|
906
906
|
]),
|
|
907
907
|
s.filters ? (u(), g("div", Oa, [
|
|
908
|
-
|
|
908
|
+
W(n, {
|
|
909
909
|
filterScheme: s.filters,
|
|
910
910
|
"onFilters:changed": e[0] || (e[0] = (p) => t.$emit("filters:changed", p))
|
|
911
911
|
}, null, 8, ["filterScheme"])
|
|
912
|
-
])) :
|
|
912
|
+
])) : U("", !0)
|
|
913
913
|
]);
|
|
914
914
|
}
|
|
915
|
-
const Ba = /* @__PURE__ */ de(
|
|
915
|
+
const Ba = /* @__PURE__ */ de(Ra, [["render", Aa]]), Ma = {
|
|
916
916
|
key: 0,
|
|
917
917
|
class: "text-gray-400 shrink-0"
|
|
918
|
-
},
|
|
918
|
+
}, Fa = ["onClick"], qa = ["onClick"], Ua = {
|
|
919
919
|
key: 4,
|
|
920
920
|
class: "text-gray-900 font-medium truncate"
|
|
921
921
|
}, is = {
|
|
@@ -929,31 +929,31 @@ const Ba = /* @__PURE__ */ de(Ea, [["render", Aa]]), Fa = {
|
|
|
929
929
|
compact: { type: Boolean, default: !1 }
|
|
930
930
|
},
|
|
931
931
|
setup(t) {
|
|
932
|
-
const e = t, s = Le(), a =
|
|
932
|
+
const e = t, s = Le(), a = M(() => Array.isArray(e.items) ? e.items : []);
|
|
933
933
|
function r(o) {
|
|
934
934
|
s != null && s.push ? s.push(o) : typeof o == "string" && (window != null && window.location) && (window.location.href = o);
|
|
935
935
|
}
|
|
936
936
|
return (o, n) => {
|
|
937
937
|
const i = ue("router-link");
|
|
938
938
|
return u(), g("nav", {
|
|
939
|
-
class:
|
|
939
|
+
class: se(["flex items-center gap-2 text-sm text-gray-600", t.compact ? "py-1" : "py-6"]),
|
|
940
940
|
"aria-label": "Breadcrumb"
|
|
941
941
|
}, [
|
|
942
|
-
(u(!0), g(Y, null,
|
|
943
|
-
c > 0 ? (u(), g("span",
|
|
944
|
-
|
|
945
|
-
])) :
|
|
942
|
+
(u(!0), g(Y, null, ae(a.value, (l, c) => (u(), g(Y, { key: c }, [
|
|
943
|
+
c > 0 ? (u(), g("span", Ma, [
|
|
944
|
+
W(H(As), { class: "w-4 h-4" })
|
|
945
|
+
])) : U("", !0),
|
|
946
946
|
typeof l.onClick == "function" ? (u(), g("span", {
|
|
947
947
|
key: 1,
|
|
948
948
|
class: "hover:text-gray-900 transition-colors cursor-pointer",
|
|
949
949
|
onClick: (p) => l.onClick()
|
|
950
|
-
}, P(l.label), 9,
|
|
950
|
+
}, P(l.label), 9, Fa)) : H(s) && l.to ? (u(), F(i, {
|
|
951
951
|
key: 2,
|
|
952
952
|
to: l.to,
|
|
953
953
|
class: "hover:text-gray-900 transition-colors"
|
|
954
954
|
}, {
|
|
955
955
|
default: G(() => [
|
|
956
|
-
|
|
956
|
+
oe(P(l.label), 1)
|
|
957
957
|
]),
|
|
958
958
|
_: 2
|
|
959
959
|
}, 1032, ["to"])) : l.to ? (u(), g("span", {
|
|
@@ -1033,7 +1033,7 @@ const Ba = /* @__PURE__ */ de(Ea, [["render", Aa]]), Fa = {
|
|
|
1033
1033
|
async fetchData() {
|
|
1034
1034
|
if (!(this.data || !this.resolvedDashboardId))
|
|
1035
1035
|
try {
|
|
1036
|
-
const t = await
|
|
1036
|
+
const t = await re.get(`/bi-dashboard/${this.resolvedDashboardId}`);
|
|
1037
1037
|
this.dashboardData = t, this.error = !1;
|
|
1038
1038
|
} catch (t) {
|
|
1039
1039
|
this.error = !0, console.error(t);
|
|
@@ -1071,17 +1071,17 @@ function Qa(t, e, s, a, r, o) {
|
|
|
1071
1071
|
const n = ue("VsNewNodata"), i = ue("VsWidget");
|
|
1072
1072
|
return u(), g("div", Ga, [
|
|
1073
1073
|
d("div", Za, [
|
|
1074
|
-
r.error || !o.resolvedDashboardData ? (u(),
|
|
1074
|
+
r.error || !o.resolvedDashboardData ? (u(), F(n, {
|
|
1075
1075
|
key: 0,
|
|
1076
1076
|
class: "col-span-12"
|
|
1077
|
-
})) :
|
|
1078
|
-
(u(!0), g(Y, null,
|
|
1079
|
-
var
|
|
1077
|
+
})) : U("", !0),
|
|
1078
|
+
(u(!0), g(Y, null, ae(((l = o.resolvedDashboardData) == null ? void 0 : l.panels) || [], (c, p) => {
|
|
1079
|
+
var h, x;
|
|
1080
1080
|
return u(), g("div", {
|
|
1081
|
-
key: c.widget || ((
|
|
1082
|
-
class:
|
|
1081
|
+
key: c.widget || ((h = c.widgets) == null ? void 0 : h.join("-")) || p,
|
|
1082
|
+
class: se([`col-span-12 lg:col-span-${c.col || 12}`, "flex flex-col gap-[10px]"])
|
|
1083
1083
|
}, [
|
|
1084
|
-
(x = c.widgets) != null && x.length ? (u(!0), g(Y, { key: 0 },
|
|
1084
|
+
(x = c.widgets) != null && x.length ? (u(!0), g(Y, { key: 0 }, ae(c.widgets, (b) => (u(), F(i, {
|
|
1085
1085
|
key: b,
|
|
1086
1086
|
dashboard: o.resolvedDashboardId,
|
|
1087
1087
|
widget: b,
|
|
@@ -1089,7 +1089,7 @@ function Qa(t, e, s, a, r, o) {
|
|
|
1089
1089
|
"prefetched-data": o.getPrefetchedWidgetData(b),
|
|
1090
1090
|
"filter-u-rl": r.filterURl,
|
|
1091
1091
|
height: c.height
|
|
1092
|
-
}, null, 8, ["dashboard", "widget", "dashboard-widgets", "prefetched-data", "filter-u-rl", "height"]))), 128)) : (u(),
|
|
1092
|
+
}, null, 8, ["dashboard", "widget", "dashboard-widgets", "prefetched-data", "filter-u-rl", "height"]))), 128)) : (u(), F(i, {
|
|
1093
1093
|
key: 1,
|
|
1094
1094
|
class: "flex flex-col",
|
|
1095
1095
|
dashboard: o.resolvedDashboardId,
|
|
@@ -1104,7 +1104,7 @@ function Qa(t, e, s, a, r, o) {
|
|
|
1104
1104
|
])
|
|
1105
1105
|
]);
|
|
1106
1106
|
}
|
|
1107
|
-
const
|
|
1107
|
+
const Gl = /* @__PURE__ */ de(Ha, [["render", Qa]]);
|
|
1108
1108
|
var Xa = /* @__PURE__ */ ((t) => (t.Dashboard = "/dashboard", t.BiPlatform = "/bi-platform", t.EditorBase = "/editor", t.AllDashboards = "/dashboards", t.DashboardByName = "/dashboards/:name", t))(Xa || {}), Ut;
|
|
1109
1109
|
((t) => {
|
|
1110
1110
|
((e) => {
|
|
@@ -1129,7 +1129,7 @@ const Ja = {
|
|
|
1129
1129
|
},
|
|
1130
1130
|
emits: ["close", "update:visible"],
|
|
1131
1131
|
setup(t, { emit: e }) {
|
|
1132
|
-
const s = t, a = e, r =
|
|
1132
|
+
const s = t, a = e, r = M(() => s.size === "small" ? "md:max-w-[40%] w-full max-w-md" : s.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[80%] lg:max-w-[50%] w-full max-w-lg");
|
|
1133
1133
|
function o() {
|
|
1134
1134
|
a("update:visible", !1), a("close");
|
|
1135
1135
|
}
|
|
@@ -1140,21 +1140,21 @@ const Ja = {
|
|
|
1140
1140
|
window.addEventListener("keydown", n);
|
|
1141
1141
|
}), Oe(() => {
|
|
1142
1142
|
window.removeEventListener("keydown", n);
|
|
1143
|
-
}), (i, l) => (u(),
|
|
1143
|
+
}), (i, l) => (u(), F($s, { to: t.teleport }, [
|
|
1144
1144
|
t.visible ? (u(), g("div", Ja, [
|
|
1145
1145
|
d("div", {
|
|
1146
1146
|
class: "absolute inset-0 bg-black/50",
|
|
1147
1147
|
"aria-hidden": "true",
|
|
1148
1148
|
onMousedown: l[0] || (l[0] = (c) => t.closeClickBack && c.target === c.currentTarget && o())
|
|
1149
1149
|
}, null, 32),
|
|
1150
|
-
|
|
1150
|
+
W(Ds, {
|
|
1151
1151
|
name: "vs-modal",
|
|
1152
1152
|
appear: ""
|
|
1153
1153
|
}, {
|
|
1154
1154
|
default: G(() => [
|
|
1155
1155
|
t.visible ? (u(), g("div", {
|
|
1156
1156
|
key: 0,
|
|
1157
|
-
class:
|
|
1157
|
+
class: se(["vs-modal-panel relative flex flex-col bg-white dark:bg-[#1A1A1A] rounded-xl shadow-xl max-h-[85vh] min-w-0 border border-gray-200 dark:border-[#454545]", r.value]),
|
|
1158
1158
|
role: "dialog",
|
|
1159
1159
|
"aria-modal": "true",
|
|
1160
1160
|
onMousedown: l[1] || (l[1] = it(() => {
|
|
@@ -1167,7 +1167,7 @@ const Ja = {
|
|
|
1167
1167
|
class: "size-8 inline-flex justify-center items-center rounded-full bg-gray-100 text-gray-800 hover:bg-gray-200 dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-300",
|
|
1168
1168
|
"aria-label": "Закрити",
|
|
1169
1169
|
onClick: o
|
|
1170
|
-
}, l[2] || (l[2] = [
|
|
1170
|
+
}, [...l[2] || (l[2] = [
|
|
1171
1171
|
d("svg", {
|
|
1172
1172
|
class: "w-4 h-4",
|
|
1173
1173
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1182,25 +1182,25 @@ const Ja = {
|
|
|
1182
1182
|
d: "M6 18L18 6M6 6l12 12"
|
|
1183
1183
|
})
|
|
1184
1184
|
], -1)
|
|
1185
|
-
]))
|
|
1185
|
+
])])
|
|
1186
1186
|
]),
|
|
1187
1187
|
d("div", er, [
|
|
1188
1188
|
Vt(i.$slots, "default", {}, void 0, !0)
|
|
1189
1189
|
]),
|
|
1190
1190
|
i.$slots.footer ? (u(), g("div", tr, [
|
|
1191
1191
|
Vt(i.$slots, "footer", {}, void 0, !0)
|
|
1192
|
-
])) :
|
|
1193
|
-
], 34)) :
|
|
1192
|
+
])) : U("", !0)
|
|
1193
|
+
], 34)) : U("", !0)
|
|
1194
1194
|
]),
|
|
1195
1195
|
_: 3
|
|
1196
1196
|
})
|
|
1197
|
-
])) :
|
|
1197
|
+
])) : U("", !0)
|
|
1198
1198
|
], 8, ["to"]));
|
|
1199
1199
|
}
|
|
1200
|
-
}, Ne = /* @__PURE__ */ de(sr, [["__scopeId", "data-v-
|
|
1200
|
+
}, Ne = /* @__PURE__ */ de(sr, [["__scopeId", "data-v-1c7d97fa"]]), ar = {
|
|
1201
1201
|
__name: "icon-plus",
|
|
1202
1202
|
setup(t) {
|
|
1203
|
-
return (e, s) => (u(),
|
|
1203
|
+
return (e, s) => (u(), F(H(ns), $e(e.$attrs, { size: 24 }), null, 16));
|
|
1204
1204
|
}
|
|
1205
1205
|
}, rr = { class: "mb-4 overflow-auto scrollbar max-h-96" }, nr = {
|
|
1206
1206
|
__name: "vs-editor-create-widget",
|
|
@@ -1215,20 +1215,20 @@ const Ja = {
|
|
|
1215
1215
|
},
|
|
1216
1216
|
emits: ["update-data"],
|
|
1217
1217
|
setup(t, { expose: e, emit: s }) {
|
|
1218
|
-
var
|
|
1219
|
-
const a = te(() => import("@opengis/form")), r = (
|
|
1218
|
+
var f;
|
|
1219
|
+
const a = te(() => import("@opengis/form")), r = (f = Te().proxy) == null ? void 0 : f.$notify, o = s, n = t, i = S(!1), l = S({}), c = S();
|
|
1220
1220
|
function p() {
|
|
1221
1221
|
i.value = !0;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function h() {
|
|
1224
1224
|
i.value = !1;
|
|
1225
1225
|
}
|
|
1226
|
-
e({ open: p, close:
|
|
1226
|
+
e({ open: p, close: h });
|
|
1227
1227
|
const x = async () => {
|
|
1228
1228
|
var v;
|
|
1229
1229
|
try {
|
|
1230
1230
|
const y = (v = c.value) == null ? void 0 : v.doValidation;
|
|
1231
|
-
typeof y == "function" && await y(), await
|
|
1231
|
+
typeof y == "function" && await y(), await re.post(
|
|
1232
1232
|
`/bi-dashboard/${n.selectedDashboard}`,
|
|
1233
1233
|
l.value
|
|
1234
1234
|
), await r({
|
|
@@ -1237,15 +1237,15 @@ const Ja = {
|
|
|
1237
1237
|
message: "Віджет успішно створено"
|
|
1238
1238
|
}), await o("update-data"), l.value = {}, i.value = !1;
|
|
1239
1239
|
} catch (y) {
|
|
1240
|
-
const
|
|
1240
|
+
const z = (y == null ? void 0 : y.message) || "При спробі створити віджет сталася помилка. Перевірте обов'язкові поля (зокрема Type).";
|
|
1241
1241
|
r == null || r({
|
|
1242
1242
|
type: "error",
|
|
1243
1243
|
title: "Помилка!",
|
|
1244
|
-
message:
|
|
1244
|
+
message: z
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
|
-
}, b =
|
|
1248
|
-
var v, y,
|
|
1247
|
+
}, b = M(() => {
|
|
1248
|
+
var v, y, z, $;
|
|
1249
1249
|
return {
|
|
1250
1250
|
title: {
|
|
1251
1251
|
type: "text",
|
|
@@ -1261,10 +1261,10 @@ const Ja = {
|
|
|
1261
1261
|
validators: ["required"],
|
|
1262
1262
|
options: (y = (v = n.columns) == null ? void 0 : v.filter(
|
|
1263
1263
|
(w) => (w == null ? void 0 : w.type) == "text" || (w == null ? void 0 : w.type) === "date" || (w == null ? void 0 : w.type) === "timestamp without time zone" || (w == null ? void 0 : w.type) === "boolean" || (w == null ? void 0 : w.type) === "integer"
|
|
1264
|
-
)) == null ? void 0 : y.map(({ name: w, type:
|
|
1264
|
+
)) == null ? void 0 : y.map(({ name: w, type: R }) => ({
|
|
1265
1265
|
id: w,
|
|
1266
1266
|
text: w,
|
|
1267
|
-
type:
|
|
1267
|
+
type: R
|
|
1268
1268
|
}))
|
|
1269
1269
|
},
|
|
1270
1270
|
metric: {
|
|
@@ -1275,10 +1275,10 @@ const Ja = {
|
|
|
1275
1275
|
style: { size: "xs" },
|
|
1276
1276
|
options: [
|
|
1277
1277
|
{ id: "count", label: "count" },
|
|
1278
|
-
...($ = (
|
|
1278
|
+
...($ = (z = n.columns) == null ? void 0 : z.filter((w) => (w == null ? void 0 : w.type) === "numeric" || (w == null ? void 0 : w.type) === "double precision")) == null ? void 0 : $.map(({ name: w, type: R }) => ({
|
|
1279
1279
|
id: w,
|
|
1280
1280
|
text: w,
|
|
1281
|
-
type:
|
|
1281
|
+
type: R
|
|
1282
1282
|
}))
|
|
1283
1283
|
]
|
|
1284
1284
|
},
|
|
@@ -1385,9 +1385,9 @@ const Ja = {
|
|
|
1385
1385
|
};
|
|
1386
1386
|
});
|
|
1387
1387
|
return (v, y) => {
|
|
1388
|
-
const
|
|
1388
|
+
const z = ue("VsPopover");
|
|
1389
1389
|
return u(), g("div", null, [
|
|
1390
|
-
t.inline ?
|
|
1390
|
+
t.inline ? U("", !0) : (u(), F(z, {
|
|
1391
1391
|
key: 0,
|
|
1392
1392
|
placement: "right",
|
|
1393
1393
|
trigger: "hover"
|
|
@@ -1398,7 +1398,7 @@ const Ja = {
|
|
|
1398
1398
|
class: "z-50 flex items-center justify-center h-[50px] !w-[50px] text-2xl text-white transition-colors bg-blue-500 rounded-full cursor-pointer hover:bg-blue-700",
|
|
1399
1399
|
onClick: p
|
|
1400
1400
|
}, [
|
|
1401
|
-
|
|
1401
|
+
W(ar, {
|
|
1402
1402
|
height: "20",
|
|
1403
1403
|
width: "20"
|
|
1404
1404
|
})
|
|
@@ -1406,21 +1406,21 @@ const Ja = {
|
|
|
1406
1406
|
])
|
|
1407
1407
|
]),
|
|
1408
1408
|
default: G(() => [
|
|
1409
|
-
y[1] || (y[1] =
|
|
1409
|
+
y[1] || (y[1] = oe(" Створити віджет ", -1))
|
|
1410
1410
|
]),
|
|
1411
1411
|
_: 1
|
|
1412
1412
|
})),
|
|
1413
|
-
|
|
1413
|
+
W(Ne, {
|
|
1414
1414
|
teleport: "#modal",
|
|
1415
1415
|
visible: i.value,
|
|
1416
1416
|
title: "Створити віджет",
|
|
1417
|
-
onClose:
|
|
1417
|
+
onClose: h
|
|
1418
1418
|
}, {
|
|
1419
1419
|
footer: G(() => [
|
|
1420
1420
|
d("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
|
|
1421
1421
|
d("button", {
|
|
1422
1422
|
style: { border: "1px solid #000" },
|
|
1423
|
-
onClick:
|
|
1423
|
+
onClick: h,
|
|
1424
1424
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
|
|
1425
1425
|
}, " Скасувати "),
|
|
1426
1426
|
d("button", {
|
|
@@ -1431,7 +1431,7 @@ const Ja = {
|
|
|
1431
1431
|
]),
|
|
1432
1432
|
default: G(() => [
|
|
1433
1433
|
d("div", rr, [
|
|
1434
|
-
|
|
1434
|
+
W(H(a), {
|
|
1435
1435
|
ref_key: "form",
|
|
1436
1436
|
ref: c,
|
|
1437
1437
|
schema: b.value,
|
|
@@ -1448,12 +1448,12 @@ const Ja = {
|
|
|
1448
1448
|
}, ls = {
|
|
1449
1449
|
__name: "delete",
|
|
1450
1450
|
setup(t) {
|
|
1451
|
-
return (e, s) => (u(),
|
|
1451
|
+
return (e, s) => (u(), F(H(Zs), $e(e.$attrs, { size: 24 }), null, 16));
|
|
1452
1452
|
}
|
|
1453
1453
|
}, ds = {
|
|
1454
1454
|
__name: "edit",
|
|
1455
1455
|
setup(t) {
|
|
1456
|
-
return (e, s) => (u(),
|
|
1456
|
+
return (e, s) => (u(), F(H(Us), $e(e.$attrs, { size: 24 }), null, 16));
|
|
1457
1457
|
}
|
|
1458
1458
|
}, or = { class: "space-y-4" }, ir = {
|
|
1459
1459
|
__name: "vs-editor-form-style",
|
|
@@ -1465,8 +1465,8 @@ const Ja = {
|
|
|
1465
1465
|
},
|
|
1466
1466
|
emits: ["update-dashboard"],
|
|
1467
1467
|
setup(t, { expose: e, emit: s }) {
|
|
1468
|
-
var
|
|
1469
|
-
const a = te(() => import("@opengis/form")), { $notify: r } =
|
|
1468
|
+
var R, B, I, T;
|
|
1469
|
+
const a = te(() => import("@opengis/form")), { $notify: r } = Te().proxy, o = s, n = t, i = S(null), l = M(() => n.dashboardId || i.value), c = ((R = n.data) == null ? void 0 : R.type) || ((I = (B = n.data) == null ? void 0 : B.data) == null ? void 0 : I.type), h = {
|
|
1470
1470
|
pie: { label: !1, legend: !0, tooltip: !0 },
|
|
1471
1471
|
donut: { label: !1, legend: !0, tooltip: !0 },
|
|
1472
1472
|
bar: { label: !1, legend: !1, tooltip: !0 },
|
|
@@ -1484,30 +1484,30 @@ const Ja = {
|
|
|
1484
1484
|
type: "switcher",
|
|
1485
1485
|
title: "Показати тултіп"
|
|
1486
1486
|
}
|
|
1487
|
-
},
|
|
1488
|
-
|
|
1487
|
+
}, f = (T = n.data) == null ? void 0 : T.style, v = S(
|
|
1488
|
+
f != null && f.label ? { ...f.label } : { show: h.label }
|
|
1489
1489
|
), y = S(
|
|
1490
|
-
|
|
1491
|
-
),
|
|
1492
|
-
|
|
1490
|
+
f != null && f.legend ? { ...f.legend } : { show: h.legend }
|
|
1491
|
+
), z = S(
|
|
1492
|
+
f != null && f.tooltip ? { ...f.tooltip } : { show: h.tooltip }
|
|
1493
1493
|
), $ = () => {
|
|
1494
1494
|
const D = new CustomEvent(`update-style-${n.widgetName}`);
|
|
1495
1495
|
D.chartId = n.widgetName, D.options = {
|
|
1496
1496
|
options: {
|
|
1497
1497
|
legend: y.value,
|
|
1498
|
-
tooltip:
|
|
1498
|
+
tooltip: z.value,
|
|
1499
1499
|
label: v.value
|
|
1500
1500
|
},
|
|
1501
1501
|
seriesOptions: v.value
|
|
1502
1502
|
}, window.dispatchEvent(D);
|
|
1503
1503
|
};
|
|
1504
|
-
|
|
1504
|
+
ie(v, $, { deep: !0 }), ie(y, $, { deep: !0 }), ie(z, $, { deep: !0 });
|
|
1505
1505
|
const w = async () => {
|
|
1506
1506
|
try {
|
|
1507
|
-
await
|
|
1507
|
+
await re.put(`/bi-dashboard/${l.value}/${n.widgetName}`, {
|
|
1508
1508
|
style: {
|
|
1509
1509
|
legend: y.value,
|
|
1510
|
-
tooltip:
|
|
1510
|
+
tooltip: z.value,
|
|
1511
1511
|
label: v.value
|
|
1512
1512
|
}
|
|
1513
1513
|
});
|
|
@@ -1515,7 +1515,7 @@ const Ja = {
|
|
|
1515
1515
|
D.chartId = n.widgetName, D.options = {
|
|
1516
1516
|
options: {
|
|
1517
1517
|
legend: y.value,
|
|
1518
|
-
tooltip:
|
|
1518
|
+
tooltip: z.value,
|
|
1519
1519
|
label: v.value
|
|
1520
1520
|
},
|
|
1521
1521
|
seriesOptions: v.value
|
|
@@ -1536,16 +1536,16 @@ const Ja = {
|
|
|
1536
1536
|
const D = new URLSearchParams(window.top.location.search);
|
|
1537
1537
|
i.value = D.get("dashboard"), $();
|
|
1538
1538
|
}), e({ requestUpdateWidget: w }), (D, V) => (u(), g("div", or, [
|
|
1539
|
-
|
|
1539
|
+
W(H(a), {
|
|
1540
1540
|
schema: x,
|
|
1541
1541
|
values: y.value,
|
|
1542
1542
|
"onUpdate:values": V[0] || (V[0] = (O) => y.value = O),
|
|
1543
1543
|
class: "p-0"
|
|
1544
1544
|
}, null, 8, ["values"]),
|
|
1545
|
-
|
|
1545
|
+
W(H(a), {
|
|
1546
1546
|
schema: b,
|
|
1547
|
-
values:
|
|
1548
|
-
"onUpdate:values": V[1] || (V[1] = (O) =>
|
|
1547
|
+
values: z.value,
|
|
1548
|
+
"onUpdate:values": V[1] || (V[1] = (O) => z.value = O),
|
|
1549
1549
|
class: "p-0"
|
|
1550
1550
|
}, null, 8, ["values"])
|
|
1551
1551
|
]));
|
|
@@ -1565,9 +1565,9 @@ function pt() {
|
|
|
1565
1565
|
walkTokens: null
|
|
1566
1566
|
};
|
|
1567
1567
|
}
|
|
1568
|
-
let
|
|
1568
|
+
let ze = pt();
|
|
1569
1569
|
function cs(t) {
|
|
1570
|
-
|
|
1570
|
+
ze = t;
|
|
1571
1571
|
}
|
|
1572
1572
|
const us = /[&<>"']/, lr = new RegExp(us.source, "g"), ps = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, dr = new RegExp(ps.source, "g"), cr = {
|
|
1573
1573
|
"&": "&",
|
|
@@ -1624,7 +1624,7 @@ function Zt(t, e) {
|
|
|
1624
1624
|
a[r] = a[r].trim().replace(/\\\|/g, "|");
|
|
1625
1625
|
return a;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function We(t, e, s) {
|
|
1628
1628
|
const a = t.length;
|
|
1629
1629
|
if (a === 0)
|
|
1630
1630
|
return "";
|
|
@@ -1690,7 +1690,7 @@ class Xe {
|
|
|
1690
1690
|
J(this, "rules");
|
|
1691
1691
|
// set by the lexer
|
|
1692
1692
|
J(this, "lexer");
|
|
1693
|
-
this.options = e ||
|
|
1693
|
+
this.options = e || ze;
|
|
1694
1694
|
}
|
|
1695
1695
|
space(e) {
|
|
1696
1696
|
const s = this.rules.block.newline.exec(e);
|
|
@@ -1708,7 +1708,7 @@ class Xe {
|
|
|
1708
1708
|
type: "code",
|
|
1709
1709
|
raw: s[0],
|
|
1710
1710
|
codeBlockStyle: "indented",
|
|
1711
|
-
text: this.options.pedantic ? a :
|
|
1711
|
+
text: this.options.pedantic ? a : We(a, `
|
|
1712
1712
|
`)
|
|
1713
1713
|
};
|
|
1714
1714
|
}
|
|
@@ -1730,7 +1730,7 @@ class Xe {
|
|
|
1730
1730
|
if (s) {
|
|
1731
1731
|
let a = s[2].trim();
|
|
1732
1732
|
if (/#$/.test(a)) {
|
|
1733
|
-
const r =
|
|
1733
|
+
const r = We(a, "#");
|
|
1734
1734
|
(this.options.pedantic || !r || / $/.test(r)) && (a = r.trim());
|
|
1735
1735
|
}
|
|
1736
1736
|
return {
|
|
@@ -1747,14 +1747,14 @@ class Xe {
|
|
|
1747
1747
|
if (s)
|
|
1748
1748
|
return {
|
|
1749
1749
|
type: "hr",
|
|
1750
|
-
raw:
|
|
1750
|
+
raw: We(s[0], `
|
|
1751
1751
|
`)
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
1754
|
blockquote(e) {
|
|
1755
1755
|
const s = this.rules.block.blockquote.exec(e);
|
|
1756
1756
|
if (s) {
|
|
1757
|
-
let a =
|
|
1757
|
+
let a = We(s[0], `
|
|
1758
1758
|
`).split(`
|
|
1759
1759
|
`), r = "", o = "";
|
|
1760
1760
|
const n = [];
|
|
@@ -1771,28 +1771,28 @@ class Xe {
|
|
|
1771
1771
|
break;
|
|
1772
1772
|
a = a.slice(c);
|
|
1773
1773
|
const p = l.join(`
|
|
1774
|
-
`),
|
|
1774
|
+
`), h = p.replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g, `
|
|
1775
1775
|
$1`).replace(/^ {0,3}>[ \t]?/gm, "");
|
|
1776
1776
|
r = r ? `${r}
|
|
1777
1777
|
${p}` : p, o = o ? `${o}
|
|
1778
|
-
${
|
|
1778
|
+
${h}` : h;
|
|
1779
1779
|
const x = this.lexer.state.top;
|
|
1780
|
-
if (this.lexer.state.top = !0, this.lexer.blockTokens(
|
|
1780
|
+
if (this.lexer.state.top = !0, this.lexer.blockTokens(h, n, !0), this.lexer.state.top = x, a.length === 0)
|
|
1781
1781
|
break;
|
|
1782
1782
|
const b = n[n.length - 1];
|
|
1783
1783
|
if ((b == null ? void 0 : b.type) === "code")
|
|
1784
1784
|
break;
|
|
1785
1785
|
if ((b == null ? void 0 : b.type) === "blockquote") {
|
|
1786
|
-
const
|
|
1786
|
+
const f = b, v = f.raw + `
|
|
1787
1787
|
` + a.join(`
|
|
1788
1788
|
`), y = this.blockquote(v);
|
|
1789
|
-
n[n.length - 1] = y, r = r.substring(0, r.length -
|
|
1789
|
+
n[n.length - 1] = y, r = r.substring(0, r.length - f.raw.length) + y.raw, o = o.substring(0, o.length - f.text.length) + y.text;
|
|
1790
1790
|
break;
|
|
1791
1791
|
} else if ((b == null ? void 0 : b.type) === "list") {
|
|
1792
|
-
const
|
|
1792
|
+
const f = b, v = f.raw + `
|
|
1793
1793
|
` + a.join(`
|
|
1794
1794
|
`), y = this.list(v);
|
|
1795
|
-
n[n.length - 1] = y, r = r.substring(0, r.length - b.raw.length) + y.raw, o = o.substring(0, o.length -
|
|
1795
|
+
n[n.length - 1] = y, r = r.substring(0, r.length - b.raw.length) + y.raw, o = o.substring(0, o.length - f.raw.length) + y.raw, a = v.substring(n[n.length - 1].raw.length).split(`
|
|
1796
1796
|
`);
|
|
1797
1797
|
continue;
|
|
1798
1798
|
}
|
|
@@ -1825,29 +1825,29 @@ ${f}` : f;
|
|
|
1825
1825
|
if (!(s = n.exec(e)) || this.rules.block.hr.test(e))
|
|
1826
1826
|
break;
|
|
1827
1827
|
c = s[0], e = e.substring(c.length);
|
|
1828
|
-
let
|
|
1829
|
-
`, 1)[0].replace(/^\t+/, (
|
|
1830
|
-
`, 1)[0], b = !
|
|
1831
|
-
if (this.options.pedantic ? (
|
|
1828
|
+
let h = s[2].split(`
|
|
1829
|
+
`, 1)[0].replace(/^\t+/, (z) => " ".repeat(3 * z.length)), x = e.split(`
|
|
1830
|
+
`, 1)[0], b = !h.trim(), f = 0;
|
|
1831
|
+
if (this.options.pedantic ? (f = 2, p = h.trimStart()) : b ? f = s[1].length + 1 : (f = s[2].search(/[^ ]/), f = f > 4 ? 1 : f, p = h.slice(f), f += s[1].length), b && /^[ \t]*$/.test(x) && (c += x + `
|
|
1832
1832
|
`, e = e.substring(x.length + 1), l = !0), !l) {
|
|
1833
|
-
const
|
|
1833
|
+
const z = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), $ = new RegExp(`^ {0,${Math.min(3, f - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), w = new RegExp(`^ {0,${Math.min(3, f - 1)}}(?:\`\`\`|~~~)`), R = new RegExp(`^ {0,${Math.min(3, f - 1)}}#`), B = new RegExp(`^ {0,${Math.min(3, f - 1)}}<(?:[a-z].*>|!--)`, "i");
|
|
1834
1834
|
for (; e; ) {
|
|
1835
|
-
const
|
|
1835
|
+
const I = e.split(`
|
|
1836
1836
|
`, 1)[0];
|
|
1837
|
-
let
|
|
1838
|
-
if (x =
|
|
1837
|
+
let T;
|
|
1838
|
+
if (x = I, this.options.pedantic ? (x = x.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), T = x) : T = x.replace(/\t/g, " "), w.test(x) || R.test(x) || B.test(x) || z.test(x) || $.test(x))
|
|
1839
1839
|
break;
|
|
1840
|
-
if (
|
|
1840
|
+
if (T.search(/[^ ]/) >= f || !x.trim())
|
|
1841
1841
|
p += `
|
|
1842
|
-
` +
|
|
1842
|
+
` + T.slice(f);
|
|
1843
1843
|
else {
|
|
1844
|
-
if (b ||
|
|
1844
|
+
if (b || h.replace(/\t/g, " ").search(/[^ ]/) >= 4 || w.test(h) || R.test(h) || $.test(h))
|
|
1845
1845
|
break;
|
|
1846
1846
|
p += `
|
|
1847
1847
|
` + x;
|
|
1848
1848
|
}
|
|
1849
|
-
!b && !x.trim() && (b = !0), c +=
|
|
1850
|
-
`, e = e.substring(
|
|
1849
|
+
!b && !x.trim() && (b = !0), c += I + `
|
|
1850
|
+
`, e = e.substring(I.length + 1), h = T.slice(f);
|
|
1851
1851
|
}
|
|
1852
1852
|
}
|
|
1853
1853
|
o.loose || (i ? o.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(c) && (i = !0));
|
|
@@ -1865,7 +1865,7 @@ ${f}` : f;
|
|
|
1865
1865
|
o.items[o.items.length - 1].raw = o.items[o.items.length - 1].raw.trimEnd(), o.items[o.items.length - 1].text = o.items[o.items.length - 1].text.trimEnd(), o.raw = o.raw.trimEnd();
|
|
1866
1866
|
for (let l = 0; l < o.items.length; l++)
|
|
1867
1867
|
if (this.lexer.state.top = !1, o.items[l].tokens = this.lexer.blockTokens(o.items[l].text, []), !o.loose) {
|
|
1868
|
-
const c = o.items[l].tokens.filter((
|
|
1868
|
+
const c = o.items[l].tokens.filter((h) => h.type === "space"), p = c.length > 0 && c.some((h) => /\n.*\n/.test(h.raw));
|
|
1869
1869
|
o.loose = p;
|
|
1870
1870
|
}
|
|
1871
1871
|
if (o.loose)
|
|
@@ -1992,7 +1992,7 @@ ${f}` : f;
|
|
|
1992
1992
|
if (!this.options.pedantic && /^</.test(a)) {
|
|
1993
1993
|
if (!/>$/.test(a))
|
|
1994
1994
|
return;
|
|
1995
|
-
const n =
|
|
1995
|
+
const n = We(a.slice(0, -1), "\\");
|
|
1996
1996
|
if ((a.length - n.length) % 2 === 0)
|
|
1997
1997
|
return;
|
|
1998
1998
|
} else {
|
|
@@ -2036,8 +2036,8 @@ ${f}` : f;
|
|
|
2036
2036
|
if (!(r[1] || r[2] || "") || !a || this.rules.inline.punctuation.exec(a)) {
|
|
2037
2037
|
const n = [...r[0]].length - 1;
|
|
2038
2038
|
let i, l, c = n, p = 0;
|
|
2039
|
-
const
|
|
2040
|
-
for (
|
|
2039
|
+
const h = r[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
2040
|
+
for (h.lastIndex = 0, s = s.slice(-1 * e.length + n); (r = h.exec(s)) != null; ) {
|
|
2041
2041
|
if (i = r[1] || r[2] || r[3] || r[4] || r[5] || r[6], !i)
|
|
2042
2042
|
continue;
|
|
2043
2043
|
if (l = [...i].length, r[3] || r[4]) {
|
|
@@ -2060,12 +2060,12 @@ ${f}` : f;
|
|
|
2060
2060
|
tokens: this.lexer.inlineTokens(v)
|
|
2061
2061
|
};
|
|
2062
2062
|
}
|
|
2063
|
-
const
|
|
2063
|
+
const f = b.slice(2, -2);
|
|
2064
2064
|
return {
|
|
2065
2065
|
type: "strong",
|
|
2066
2066
|
raw: b,
|
|
2067
|
-
text:
|
|
2068
|
-
tokens: this.lexer.inlineTokens(
|
|
2067
|
+
text: f,
|
|
2068
|
+
tokens: this.lexer.inlineTokens(f)
|
|
2069
2069
|
};
|
|
2070
2070
|
}
|
|
2071
2071
|
}
|
|
@@ -2188,22 +2188,22 @@ const fr = /^(?:[ \t]*(?:\n|$))+/, gr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
|
|
|
2188
2188
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
2189
2189
|
paragraph: X(ht).replace("hr", Ae).replace("heading", ` *#{1,6} *[^
|
|
2190
2190
|
]`).replace("lheading", fs).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
2191
|
-
}, ms = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, bs = /^( {2,}|\\)\n(?!\s*$)/, Cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Be = "\\p{P}\\p{S}",
|
|
2191
|
+
}, ms = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Dr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, bs = /^( {2,}|\\)\n(?!\s*$)/, Cr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Be = "\\p{P}\\p{S}", Tr = X(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Be).getRegex(), zr = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, Ir = X(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Be).getRegex(), Sr = X("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Be).getRegex(), Lr = X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Be).getRegex(), Er = X(/\\([punct])/, "gu").replace(/punct/g, Be).getRegex(), Wr = X(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Rr = X(gt).replace("(?:-->|$)", "-->").getRegex(), jr = X("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Rr).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Je = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, Vr = X(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Je).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), xs = X(/^!?\[(label)\]\[(ref)\]/).replace("label", Je).replace("ref", ft).getRegex(), ys = X(/^!?\[(ref)\](?:\[\])?/).replace("ref", ft).getRegex(), Nr = X("reflink|nolink(?!\\()", "g").replace("reflink", xs).replace("nolink", ys).getRegex(), bt = {
|
|
2192
2192
|
_backpedal: je,
|
|
2193
2193
|
// only used for GFM url
|
|
2194
|
-
anyPunctuation:
|
|
2195
|
-
autolink:
|
|
2196
|
-
blockSkip:
|
|
2194
|
+
anyPunctuation: Er,
|
|
2195
|
+
autolink: Wr,
|
|
2196
|
+
blockSkip: zr,
|
|
2197
2197
|
br: bs,
|
|
2198
2198
|
code: Dr,
|
|
2199
2199
|
del: je,
|
|
2200
|
-
emStrongLDelim:
|
|
2200
|
+
emStrongLDelim: Ir,
|
|
2201
2201
|
emStrongRDelimAst: Sr,
|
|
2202
2202
|
emStrongRDelimUnd: Lr,
|
|
2203
2203
|
escape: ms,
|
|
2204
2204
|
link: Vr,
|
|
2205
2205
|
nolink: ys,
|
|
2206
|
-
punctuation:
|
|
2206
|
+
punctuation: Tr,
|
|
2207
2207
|
reflink: xs,
|
|
2208
2208
|
reflinkSearch: Nr,
|
|
2209
2209
|
tag: jr,
|
|
@@ -2224,11 +2224,11 @@ const fr = /^(?:[ \t]*(?:\n|$))+/, gr = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*
|
|
|
2224
2224
|
...dt,
|
|
2225
2225
|
br: X(bs).replace("{2,}", "*").getRegex(),
|
|
2226
2226
|
text: X(dt.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
2227
|
-
},
|
|
2227
|
+
}, Fe = {
|
|
2228
2228
|
normal: mt,
|
|
2229
2229
|
gfm: _r,
|
|
2230
2230
|
pedantic: $r
|
|
2231
|
-
},
|
|
2231
|
+
}, Re = {
|
|
2232
2232
|
normal: bt,
|
|
2233
2233
|
gfm: dt,
|
|
2234
2234
|
breaks: Or,
|
|
@@ -2241,24 +2241,24 @@ class fe {
|
|
|
2241
2241
|
J(this, "state");
|
|
2242
2242
|
J(this, "tokenizer");
|
|
2243
2243
|
J(this, "inlineQueue");
|
|
2244
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
2244
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || ze, this.options.tokenizer = this.options.tokenizer || new Xe(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
2245
2245
|
inLink: !1,
|
|
2246
2246
|
inRawBlock: !1,
|
|
2247
2247
|
top: !0
|
|
2248
2248
|
};
|
|
2249
2249
|
const s = {
|
|
2250
|
-
block:
|
|
2251
|
-
inline:
|
|
2250
|
+
block: Fe.normal,
|
|
2251
|
+
inline: Re.normal
|
|
2252
2252
|
};
|
|
2253
|
-
this.options.pedantic ? (s.block =
|
|
2253
|
+
this.options.pedantic ? (s.block = Fe.pedantic, s.inline = Re.pedantic) : this.options.gfm && (s.block = Fe.gfm, this.options.breaks ? s.inline = Re.breaks : s.inline = Re.gfm), this.tokenizer.rules = s;
|
|
2254
2254
|
}
|
|
2255
2255
|
/**
|
|
2256
2256
|
* Expose Rules
|
|
2257
2257
|
*/
|
|
2258
2258
|
static get rules() {
|
|
2259
2259
|
return {
|
|
2260
|
-
block:
|
|
2261
|
-
inline:
|
|
2260
|
+
block: Fe,
|
|
2261
|
+
inline: Re
|
|
2262
2262
|
};
|
|
2263
2263
|
}
|
|
2264
2264
|
/**
|
|
@@ -2435,10 +2435,10 @@ class fe {
|
|
|
2435
2435
|
}
|
|
2436
2436
|
if (o = e, this.options.extensions && this.options.extensions.startInline) {
|
|
2437
2437
|
let p = 1 / 0;
|
|
2438
|
-
const
|
|
2438
|
+
const h = e.slice(1);
|
|
2439
2439
|
let x;
|
|
2440
2440
|
this.options.extensions.startInline.forEach((b) => {
|
|
2441
|
-
x = b.call({ lexer: this },
|
|
2441
|
+
x = b.call({ lexer: this }, h), typeof x == "number" && x >= 0 && (p = Math.min(p, x));
|
|
2442
2442
|
}), p < 1 / 0 && p >= 0 && (o = e.substring(0, p + 1));
|
|
2443
2443
|
}
|
|
2444
2444
|
if (a = this.tokenizer.inlineText(o)) {
|
|
@@ -2462,7 +2462,7 @@ class Ke {
|
|
|
2462
2462
|
constructor(e) {
|
|
2463
2463
|
J(this, "options");
|
|
2464
2464
|
J(this, "parser");
|
|
2465
|
-
this.options = e ||
|
|
2465
|
+
this.options = e || ze;
|
|
2466
2466
|
}
|
|
2467
2467
|
space(e) {
|
|
2468
2468
|
return "";
|
|
@@ -2625,7 +2625,7 @@ class ge {
|
|
|
2625
2625
|
J(this, "options");
|
|
2626
2626
|
J(this, "renderer");
|
|
2627
2627
|
J(this, "textRenderer");
|
|
2628
|
-
this.options = e ||
|
|
2628
|
+
this.options = e || ze, this.options.renderer = this.options.renderer || new Ke(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new xt();
|
|
2629
2629
|
}
|
|
2630
2630
|
/**
|
|
2631
2631
|
* Static Parse Method
|
|
@@ -2786,7 +2786,7 @@ class Ve {
|
|
|
2786
2786
|
constructor(e) {
|
|
2787
2787
|
J(this, "options");
|
|
2788
2788
|
J(this, "block");
|
|
2789
|
-
this.options = e ||
|
|
2789
|
+
this.options = e || ze;
|
|
2790
2790
|
}
|
|
2791
2791
|
/**
|
|
2792
2792
|
* Process markdown before marked
|
|
@@ -2900,8 +2900,8 @@ class Ar {
|
|
|
2900
2900
|
continue;
|
|
2901
2901
|
const i = n, l = a.renderer[i], c = o[i];
|
|
2902
2902
|
o[i] = (...p) => {
|
|
2903
|
-
let
|
|
2904
|
-
return
|
|
2903
|
+
let h = l.apply(o, p);
|
|
2904
|
+
return h === !1 && (h = c.apply(o, p)), h || "";
|
|
2905
2905
|
};
|
|
2906
2906
|
}
|
|
2907
2907
|
r.renderer = o;
|
|
@@ -2915,8 +2915,8 @@ class Ar {
|
|
|
2915
2915
|
continue;
|
|
2916
2916
|
const i = n, l = a.tokenizer[i], c = o[i];
|
|
2917
2917
|
o[i] = (...p) => {
|
|
2918
|
-
let
|
|
2919
|
-
return
|
|
2918
|
+
let h = l.apply(o, p);
|
|
2919
|
+
return h === !1 && (h = c.apply(o, p)), h;
|
|
2920
2920
|
};
|
|
2921
2921
|
}
|
|
2922
2922
|
r.tokenizer = o;
|
|
@@ -2932,11 +2932,11 @@ class Ar {
|
|
|
2932
2932
|
Ve.passThroughHooks.has(n) ? o[i] = (p) => {
|
|
2933
2933
|
if (this.defaults.async)
|
|
2934
2934
|
return Promise.resolve(l.call(o, p)).then((x) => c.call(o, x));
|
|
2935
|
-
const
|
|
2936
|
-
return c.call(o,
|
|
2935
|
+
const h = l.call(o, p);
|
|
2936
|
+
return c.call(o, h);
|
|
2937
2937
|
} : o[i] = (...p) => {
|
|
2938
|
-
let
|
|
2939
|
-
return
|
|
2938
|
+
let h = l.apply(o, p);
|
|
2939
|
+
return h === !1 && (h = c.apply(o, p)), h;
|
|
2940
2940
|
};
|
|
2941
2941
|
}
|
|
2942
2942
|
r.hooks = o;
|
|
@@ -2977,8 +2977,8 @@ class Ar {
|
|
|
2977
2977
|
n.hooks && (a = n.hooks.preprocess(a));
|
|
2978
2978
|
let p = l(a, n);
|
|
2979
2979
|
n.hooks && (p = n.hooks.processAllTokens(p)), n.walkTokens && this.walkTokens(p, n.walkTokens);
|
|
2980
|
-
let
|
|
2981
|
-
return n.hooks && (
|
|
2980
|
+
let h = c(p, n);
|
|
2981
|
+
return n.hooks && (h = n.hooks.postprocess(h)), h;
|
|
2982
2982
|
} catch (p) {
|
|
2983
2983
|
return i(p);
|
|
2984
2984
|
}
|
|
@@ -3005,7 +3005,7 @@ Q.options = Q.setOptions = function(t) {
|
|
|
3005
3005
|
return Ce.setOptions(t), Q.defaults = Ce.defaults, cs(Q.defaults), Q;
|
|
3006
3006
|
};
|
|
3007
3007
|
Q.getDefaults = pt;
|
|
3008
|
-
Q.defaults =
|
|
3008
|
+
Q.defaults = ze;
|
|
3009
3009
|
Q.use = function(...t) {
|
|
3010
3010
|
return Ce.use(...t), Q.defaults = Ce.defaults, cs(Q.defaults), Q;
|
|
3011
3011
|
};
|
|
@@ -3029,7 +3029,7 @@ Q.walkTokens;
|
|
|
3029
3029
|
Q.parseInline;
|
|
3030
3030
|
ge.parse;
|
|
3031
3031
|
fe.lex;
|
|
3032
|
-
const Br = { class: "space-y-4" },
|
|
3032
|
+
const Br = { class: "space-y-4" }, Mr = {
|
|
3033
3033
|
__name: "vs-editor-form-data",
|
|
3034
3034
|
props: {
|
|
3035
3035
|
widgetName: { type: String },
|
|
@@ -3040,30 +3040,30 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3040
3040
|
},
|
|
3041
3041
|
emits: ["update-dashboard"],
|
|
3042
3042
|
setup(t, { expose: e, emit: s }) {
|
|
3043
|
-
var B,
|
|
3044
|
-
const a = te(() => import("@opengis/form")), { $notify: r } =
|
|
3043
|
+
var B, I, T, D, V, O, ee, ne, le, L, C, A, Z, m, _, k, j, K, E, we, ke, _e, yt, vt, wt, kt, _t, $t, Dt, Ct, Tt, zt, It, St, Lt, Et, Wt, Rt;
|
|
3044
|
+
const a = te(() => import("@opengis/form")), { $notify: r } = Te().proxy, o = s, n = t, i = typeof window < "u" ? new URLSearchParams(window.top.location.search) : null, l = S((i == null ? void 0 : i.get("dashboard")) || null), c = S([]), p = M(() => {
|
|
3045
3045
|
const N = n.columns ?? [];
|
|
3046
3046
|
return N.length ? N : c.value;
|
|
3047
|
-
}),
|
|
3047
|
+
}), h = M(() => n.dashboardId || l.value);
|
|
3048
3048
|
async function x() {
|
|
3049
3049
|
if (n.columns !== null) return;
|
|
3050
|
-
const N =
|
|
3050
|
+
const N = h.value;
|
|
3051
3051
|
if (!(p.value.length || !N || !n.widgetName))
|
|
3052
3052
|
try {
|
|
3053
|
-
const
|
|
3054
|
-
Array.isArray(
|
|
3053
|
+
const q = await re.get(`/bi-data?dashboard=${N}&widget=${n.widgetName}`);
|
|
3054
|
+
Array.isArray(q == null ? void 0 : q.columns) && q.columns.length && (c.value = q.columns);
|
|
3055
3055
|
} catch {
|
|
3056
3056
|
}
|
|
3057
3057
|
}
|
|
3058
|
-
const b = (N) => (N == null ? void 0 : N.name) != null ? { id: N.name, text: N.title || N.name } : null,
|
|
3059
|
-
const
|
|
3060
|
-
return
|
|
3061
|
-
}) : N, v =
|
|
3058
|
+
const b = (N) => (N == null ? void 0 : N.name) != null ? { id: N.name, text: N.title || N.name } : null, f = (N) => Array.isArray(N) ? [...N].sort((q, xe) => {
|
|
3059
|
+
const Ie = q.text && q.text !== q.id, jt = xe.text && xe.text !== xe.id;
|
|
3060
|
+
return Ie && !jt ? -1 : !Ie && jt ? 1 : (q.text || "").localeCompare(xe.text || "", void 0, { sensitivity: "base" });
|
|
3061
|
+
}) : N, v = M(() => {
|
|
3062
3062
|
const N = (p.value ?? []).filter(
|
|
3063
|
-
(
|
|
3063
|
+
(q) => (q == null ? void 0 : q.type) == "text" || (q == null ? void 0 : q.type) === "date" || (q == null ? void 0 : q.type) === "timestamp without time zone" || (q == null ? void 0 : q.type) === "boolean" || (q == null ? void 0 : q.type) === "integer"
|
|
3064
3064
|
).map(b).filter(Boolean);
|
|
3065
|
-
return
|
|
3066
|
-
}), y =
|
|
3065
|
+
return f(N);
|
|
3066
|
+
}), y = M(() => `${n.widgetName}-${v.value.length}-${(p.value ?? []).length}`), z = M(() => ({
|
|
3067
3067
|
text: {
|
|
3068
3068
|
type: "Text",
|
|
3069
3069
|
label: "Текст",
|
|
@@ -3108,7 +3108,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3108
3108
|
],
|
|
3109
3109
|
options: [
|
|
3110
3110
|
{ id: "count", text: "count" },
|
|
3111
|
-
...
|
|
3111
|
+
...f(
|
|
3112
3112
|
p.value.filter((N) => (N == null ? void 0 : N.type) === "numeric" || (N == null ? void 0 : N.type) === "double precision").map(b).filter(Boolean)
|
|
3113
3113
|
)
|
|
3114
3114
|
]
|
|
@@ -3130,7 +3130,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3130
3130
|
style: { size: "xs" },
|
|
3131
3131
|
options: [
|
|
3132
3132
|
{ id: "null", text: "null" },
|
|
3133
|
-
...
|
|
3133
|
+
...f(
|
|
3134
3134
|
p.value.filter(
|
|
3135
3135
|
(N) => (N == null ? void 0 : N.type) == "text" || (N == null ? void 0 : N.type) === "boolean" || (N == null ? void 0 : N.type) === "integer"
|
|
3136
3136
|
).map(b).filter(Boolean)
|
|
@@ -3142,7 +3142,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3142
3142
|
type: "checkbox",
|
|
3143
3143
|
label: "Колонки",
|
|
3144
3144
|
style: { size: "xs" },
|
|
3145
|
-
options:
|
|
3145
|
+
options: f(
|
|
3146
3146
|
(p.value ?? []).map(b).filter(Boolean)
|
|
3147
3147
|
),
|
|
3148
3148
|
conditions: ["type", "in", ["table", "map"]]
|
|
@@ -3163,30 +3163,30 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3163
3163
|
hidden: !0
|
|
3164
3164
|
}
|
|
3165
3165
|
})), $ = S({
|
|
3166
|
-
x: ((
|
|
3166
|
+
x: ((I = (B = n.data) == null ? void 0 : B.data) == null ? void 0 : I.x) || ((T = n.data) == null ? void 0 : T.x) || null,
|
|
3167
3167
|
metric: ((V = (D = n.data) == null ? void 0 : D.data) == null ? void 0 : V.metric) || ((O = n.data) == null ? void 0 : O.metric) || null,
|
|
3168
|
-
columns: ((
|
|
3168
|
+
columns: ((ne = (ee = n.data) == null ? void 0 : ee.data) == null ? void 0 : ne.columns) || ((le = n.data) == null ? void 0 : le.columns) || null,
|
|
3169
3169
|
granularity: ((C = (L = n.data) == null ? void 0 : L.data) == null ? void 0 : C.granularity) || ((A = n.data) == null ? void 0 : A.granularity) || null,
|
|
3170
3170
|
type: ((m = (Z = n.data) == null ? void 0 : Z.data) == null ? void 0 : m.type) || ((_ = n.data) == null ? void 0 : _.type) || null,
|
|
3171
3171
|
groupby: ((j = (k = n.data) == null ? void 0 : k.data) == null ? void 0 : j.groupby) || n.data.groupby || null,
|
|
3172
|
-
fx: ((
|
|
3172
|
+
fx: ((E = (K = n.data) == null ? void 0 : K.data) == null ? void 0 : E.fx) || ((we = n.data) == null ? void 0 : we.fx) || null,
|
|
3173
3173
|
query: ((_e = (ke = n.data) == null ? void 0 : ke.data) == null ? void 0 : _e.query) || ((yt = n.data) == null ? void 0 : yt.query) || null,
|
|
3174
3174
|
y_type: ((wt = (vt = n.data) == null ? void 0 : vt.data) == null ? void 0 : wt.y_type) || ((kt = n.data) == null ? void 0 : kt.y_type) || null,
|
|
3175
3175
|
tableSQL: (($t = (_t = n.data) == null ? void 0 : _t.data) == null ? void 0 : $t.tableSQL) || ((Dt = n.data) == null ? void 0 : Dt.tableSQL) || null,
|
|
3176
|
-
cls: ((
|
|
3177
|
-
text: ((St = (
|
|
3178
|
-
table: ((
|
|
3176
|
+
cls: ((Tt = (Ct = n.data) == null ? void 0 : Ct.data) == null ? void 0 : Tt.cls) || ((zt = n.data) == null ? void 0 : zt.cls) || null,
|
|
3177
|
+
text: ((St = (It = n.data) == null ? void 0 : It.data) == null ? void 0 : St.text) || ((Lt = n.data) == null ? void 0 : Lt.text) || null,
|
|
3178
|
+
table: ((Wt = (Et = n.data) == null ? void 0 : Et.data) == null ? void 0 : Wt.table) || ((Rt = n.data) == null ? void 0 : Rt.table) || null
|
|
3179
3179
|
}), w = async () => {
|
|
3180
3180
|
try {
|
|
3181
|
-
await
|
|
3181
|
+
await re.put(`/bi-dashboard/${h.value}/${n.widgetName}`, {
|
|
3182
3182
|
data: $.value
|
|
3183
3183
|
});
|
|
3184
|
-
let N = `/bi-data?dashboard=${
|
|
3185
|
-
Object.entries($.value).forEach(([xe,
|
|
3186
|
-
N += `&${xe}=${
|
|
3184
|
+
let N = `/bi-data?dashboard=${h.value}&widget=${n.widgetName}`;
|
|
3185
|
+
Object.entries($.value).forEach(([xe, Ie]) => {
|
|
3186
|
+
N += `&${xe}=${Ie}`;
|
|
3187
3187
|
});
|
|
3188
|
-
const
|
|
3189
|
-
|
|
3188
|
+
const q = new CustomEvent(`update-data-${n.widgetName}`);
|
|
3189
|
+
q.filterUrl = N, window.dispatchEvent(q), o("update-dashboard"), r({
|
|
3190
3190
|
type: "success",
|
|
3191
3191
|
title: "Успішно!",
|
|
3192
3192
|
message: "Дані успішно оновлено"
|
|
@@ -3198,14 +3198,14 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3198
3198
|
message: "При спробі оновити данні сталася помилка"
|
|
3199
3199
|
});
|
|
3200
3200
|
}
|
|
3201
|
-
},
|
|
3201
|
+
}, R = async () => {
|
|
3202
3202
|
try {
|
|
3203
|
-
let N = `/bi-data?dashboard=${
|
|
3204
|
-
Object.entries($.value).forEach(([xe,
|
|
3205
|
-
N += `&${xe}=${
|
|
3203
|
+
let N = `/bi-data?dashboard=${h.value}&widget=${n.widgetName}`;
|
|
3204
|
+
Object.entries($.value).forEach(([xe, Ie]) => {
|
|
3205
|
+
N += `&${xe}=${Ie}`;
|
|
3206
3206
|
});
|
|
3207
|
-
const
|
|
3208
|
-
|
|
3207
|
+
const q = new CustomEvent(`update-data-${n.widgetName}`);
|
|
3208
|
+
q.filterUrl = N, window.dispatchEvent(q), o("update-dashboard");
|
|
3209
3209
|
} catch {
|
|
3210
3210
|
await r({
|
|
3211
3211
|
type: "error",
|
|
@@ -3214,24 +3214,24 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3214
3214
|
});
|
|
3215
3215
|
}
|
|
3216
3216
|
};
|
|
3217
|
-
return
|
|
3218
|
-
|
|
3219
|
-
}, { deep: !0 }),
|
|
3217
|
+
return ie($, () => {
|
|
3218
|
+
R();
|
|
3219
|
+
}, { deep: !0 }), ie(
|
|
3220
3220
|
() => [n.widgetName, n.dashboardId, l.value],
|
|
3221
3221
|
() => {
|
|
3222
3222
|
c.value = [], x();
|
|
3223
3223
|
},
|
|
3224
3224
|
{ immediate: !0 }
|
|
3225
|
-
), e({ requestUpdateWidget: w }), (N,
|
|
3226
|
-
(u(),
|
|
3225
|
+
), e({ requestUpdateWidget: w }), (N, q) => (u(), g("div", Br, [
|
|
3226
|
+
(u(), F(H(a), {
|
|
3227
3227
|
key: y.value,
|
|
3228
|
-
schema:
|
|
3228
|
+
schema: z.value,
|
|
3229
3229
|
values: $.value,
|
|
3230
|
-
"onUpdate:values":
|
|
3230
|
+
"onUpdate:values": q[0] || (q[0] = (xe) => $.value = xe)
|
|
3231
3231
|
}, null, 8, ["schema", "values"]))
|
|
3232
3232
|
]));
|
|
3233
3233
|
}
|
|
3234
|
-
},
|
|
3234
|
+
}, Fr = { class: "space-y-4" }, qr = {
|
|
3235
3235
|
__name: "vs-editor-form-yaml",
|
|
3236
3236
|
props: {
|
|
3237
3237
|
yamlValue: { type: null, default: () => "" },
|
|
@@ -3242,16 +3242,16 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3242
3242
|
emits: ["update-dashboard"],
|
|
3243
3243
|
setup(t, { expose: e, emit: s }) {
|
|
3244
3244
|
const a = typeof window < "u" ? window.echarts : null, r = te(
|
|
3245
|
-
() => import("@opengis/form").then((
|
|
3246
|
-
), o = S(null), n =
|
|
3247
|
-
const
|
|
3248
|
-
...(
|
|
3249
|
-
data: y.map((D) => D[
|
|
3250
|
-
name:
|
|
3245
|
+
() => import("@opengis/form").then((f) => f.VsInputMonaco)
|
|
3246
|
+
), o = S(null), n = M(() => c.dashboardId || o.value), { $notify: i } = Te().proxy, l = s, c = t, p = (f, { dimensions: v, source: y }) => {
|
|
3247
|
+
const z = f.getOption(), { data: $, ...w } = (z == null ? void 0 : z.series)[0], [, ...R] = v || [], B = R.map((I, T) => ({
|
|
3248
|
+
...(z == null ? void 0 : z.series[T]) || {},
|
|
3249
|
+
data: y.map((D) => D[T + 1]),
|
|
3250
|
+
name: I
|
|
3251
3251
|
}));
|
|
3252
|
-
|
|
3252
|
+
f == null || f.setOption(
|
|
3253
3253
|
{
|
|
3254
|
-
...
|
|
3254
|
+
...z || {},
|
|
3255
3255
|
dataset: {
|
|
3256
3256
|
dimensions: v,
|
|
3257
3257
|
source: y
|
|
@@ -3262,22 +3262,22 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3262
3262
|
},
|
|
3263
3263
|
!0
|
|
3264
3264
|
);
|
|
3265
|
-
},
|
|
3266
|
-
const v = document.getElementById(
|
|
3265
|
+
}, h = (f) => {
|
|
3266
|
+
const v = document.getElementById(f);
|
|
3267
3267
|
if (!v) return null;
|
|
3268
3268
|
const y = a == null ? void 0 : a.getInstanceByDom(v);
|
|
3269
3269
|
return y || null;
|
|
3270
3270
|
}, x = S(c.yamlValue), b = async () => {
|
|
3271
3271
|
try {
|
|
3272
|
-
await
|
|
3272
|
+
await re.put(`/bi-dashboard/${n.value}/${c.widgetName}`, {
|
|
3273
3273
|
yml: x.value
|
|
3274
3274
|
});
|
|
3275
|
-
const
|
|
3276
|
-
if (
|
|
3277
|
-
const v = await
|
|
3275
|
+
const f = h(c.widgetName);
|
|
3276
|
+
if (f) {
|
|
3277
|
+
const v = await re.get(
|
|
3278
3278
|
`/bi-data?dashboard=${o.value}&widget=${c.widgetName}`
|
|
3279
3279
|
);
|
|
3280
|
-
p(
|
|
3280
|
+
p(f, v);
|
|
3281
3281
|
}
|
|
3282
3282
|
l("update-dashboard"), i({
|
|
3283
3283
|
type: "success",
|
|
@@ -3293,10 +3293,10 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3293
3293
|
}
|
|
3294
3294
|
};
|
|
3295
3295
|
return me(() => {
|
|
3296
|
-
const
|
|
3297
|
-
o.value =
|
|
3298
|
-
}), e({ requestUpdateWidget: b }), (
|
|
3299
|
-
|
|
3296
|
+
const f = new URLSearchParams(window.top.location.search);
|
|
3297
|
+
o.value = f.get("dashboard");
|
|
3298
|
+
}), e({ requestUpdateWidget: b }), (f, v) => (u(), g("div", Fr, [
|
|
3299
|
+
W(H(r), {
|
|
3300
3300
|
modelValue: x.value,
|
|
3301
3301
|
"onUpdate:modelValue": v[0] || (v[0] = (y) => x.value = y),
|
|
3302
3302
|
syntax: "yaml",
|
|
@@ -3317,7 +3317,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3317
3317
|
emits: ["update-dashboard"],
|
|
3318
3318
|
setup(t, { emit: e }) {
|
|
3319
3319
|
var p;
|
|
3320
|
-
const s = te(() => import("@opengis/form")), { $notify: a } =
|
|
3320
|
+
const s = te(() => import("@opengis/form")), { $notify: a } = Te().proxy, r = e, o = t, n = S(null), i = {
|
|
3321
3321
|
granularity: {
|
|
3322
3322
|
ua: "Granularity",
|
|
3323
3323
|
type: "checkbox",
|
|
@@ -3330,11 +3330,11 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3330
3330
|
groupby: {
|
|
3331
3331
|
ua: "Groupby",
|
|
3332
3332
|
type: "checkbox",
|
|
3333
|
-
options: (p = o.columns) == null ? void 0 : p.map(({ name:
|
|
3333
|
+
options: (p = o.columns) == null ? void 0 : p.map(({ name: h }) => h)
|
|
3334
3334
|
}
|
|
3335
3335
|
}, l = S(o.controls || {}), c = async () => {
|
|
3336
3336
|
try {
|
|
3337
|
-
await
|
|
3337
|
+
await re.put(`/bi-dashboard/${n.value}/${o.widgetName}`, {
|
|
3338
3338
|
controls: l.value
|
|
3339
3339
|
}), await a({
|
|
3340
3340
|
type: "success",
|
|
@@ -3350,32 +3350,32 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3350
3350
|
}
|
|
3351
3351
|
};
|
|
3352
3352
|
return me(() => {
|
|
3353
|
-
const
|
|
3354
|
-
n.value =
|
|
3355
|
-
}), (
|
|
3353
|
+
const h = new URLSearchParams(window.top.location.search);
|
|
3354
|
+
n.value = h.get("dashboard");
|
|
3355
|
+
}), (h, x) => {
|
|
3356
3356
|
const b = ue("VsButton");
|
|
3357
3357
|
return u(), g("div", Ur, [
|
|
3358
|
-
|
|
3358
|
+
W(b, {
|
|
3359
3359
|
class: "ml-[10px] mb-[10px]",
|
|
3360
3360
|
type: "plain",
|
|
3361
3361
|
onClick: c
|
|
3362
3362
|
}, {
|
|
3363
|
-
default: G(() => x[1] || (x[1] = [
|
|
3364
|
-
|
|
3365
|
-
])),
|
|
3363
|
+
default: G(() => [...x[1] || (x[1] = [
|
|
3364
|
+
oe(" Зберегти ", -1)
|
|
3365
|
+
])]),
|
|
3366
3366
|
_: 1
|
|
3367
3367
|
}),
|
|
3368
|
-
|
|
3368
|
+
W(H(s), {
|
|
3369
3369
|
schema: i,
|
|
3370
3370
|
values: l.value,
|
|
3371
|
-
"onUpdate:values": x[0] || (x[0] = (
|
|
3371
|
+
"onUpdate:values": x[0] || (x[0] = (f) => l.value = f)
|
|
3372
3372
|
}, null, 8, ["values"])
|
|
3373
3373
|
]);
|
|
3374
3374
|
};
|
|
3375
3375
|
}
|
|
3376
3376
|
}, Jt = {
|
|
3377
3377
|
"vs-editor-form-style": ir,
|
|
3378
|
-
"vs-editor-form-data":
|
|
3378
|
+
"vs-editor-form-data": Mr,
|
|
3379
3379
|
"vs-editor-form-yaml": qr,
|
|
3380
3380
|
"vs-editor-form-controls": Hr
|
|
3381
3381
|
}, Gr = {
|
|
@@ -3396,13 +3396,13 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3396
3396
|
}
|
|
3397
3397
|
e({ save: r });
|
|
3398
3398
|
const o = S(!1);
|
|
3399
|
-
return Cs((n, i, l) => (console.error("Editor tab error:", n, l), o.value = !0, !1)),
|
|
3399
|
+
return Cs((n, i, l) => (console.error("Editor tab error:", n, l), o.value = !0, !1)), ie(
|
|
3400
3400
|
() => s.tabComponent,
|
|
3401
3401
|
() => {
|
|
3402
3402
|
o.value = !1;
|
|
3403
3403
|
},
|
|
3404
3404
|
{ immediate: !0 }
|
|
3405
|
-
), (n, i) => o.value ? (u(), g("div", Gr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (u(),
|
|
3405
|
+
), (n, i) => o.value ? (u(), g("div", Gr, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (u(), F(ct(t.tabComponent), $e({
|
|
3406
3406
|
ref_key: "tabRef",
|
|
3407
3407
|
ref: a,
|
|
3408
3408
|
key: t.tabKey || "tab"
|
|
@@ -3410,7 +3410,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3410
3410
|
onUpdateDashboard: i[0] || (i[0] = (l) => n.$emit("update-dashboard"))
|
|
3411
3411
|
}), null, 16));
|
|
3412
3412
|
}
|
|
3413
|
-
}, Zr = { class: "h-full flex flex-col bg-white shrink-0
|
|
3413
|
+
}, Zr = { class: "h-full w-full max-h-[calc(100vh-260px)] md:max-h-none md:!w-[400px] flex flex-col bg-white md:shrink-0 border rounded-xl overflow-hidden border-gray-200" }, Qr = {
|
|
3414
3414
|
key: 0,
|
|
3415
3415
|
class: "flex flex-col min-h-0 flex-1"
|
|
3416
3416
|
}, Xr = { class: "flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]" }, Jr = { class: "flex items-center gap-6 min-w-0 -mb-[14px]" }, Kr = ["onClick"], Yr = {
|
|
@@ -3441,8 +3441,8 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3441
3441
|
}),
|
|
3442
3442
|
emits: /* @__PURE__ */ He(["update-data"], ["update:selectedWidget"]),
|
|
3443
3443
|
setup(t, { emit: e }) {
|
|
3444
|
-
var
|
|
3445
|
-
const s = te(() => import("@opengis/form")), a = (B = (
|
|
3444
|
+
var R, B;
|
|
3445
|
+
const s = te(() => import("@opengis/form")), a = (B = (R = Te()) == null ? void 0 : R.proxy) == null ? void 0 : B.$notify, r = Le(), o = e, n = S(null), i = t, l = S(!1), c = S(!0), p = S(!1), h = S({}), x = ts(t, "selectedWidget"), b = [
|
|
3446
3446
|
"table",
|
|
3447
3447
|
"text",
|
|
3448
3448
|
"number",
|
|
@@ -3451,9 +3451,9 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3451
3451
|
"listbar",
|
|
3452
3452
|
"map",
|
|
3453
3453
|
"pivot"
|
|
3454
|
-
],
|
|
3454
|
+
], f = S("data"), v = async () => {
|
|
3455
3455
|
try {
|
|
3456
|
-
await
|
|
3456
|
+
await re.delete(
|
|
3457
3457
|
`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`
|
|
3458
3458
|
), l.value = !1, o("update-data"), r.hasRoute(ce.EditorDashboard) ? await r.push({
|
|
3459
3459
|
name: ce.EditorDashboard,
|
|
@@ -3463,41 +3463,41 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3463
3463
|
title: "Успішно!",
|
|
3464
3464
|
message: "Віджет успішно видалено"
|
|
3465
3465
|
});
|
|
3466
|
-
} catch (
|
|
3467
|
-
console.error(
|
|
3466
|
+
} catch (I) {
|
|
3467
|
+
console.error(I), a({
|
|
3468
3468
|
type: "error",
|
|
3469
3469
|
title: "Помилка!",
|
|
3470
3470
|
message: "При спробі видалити віджет виникла помилка"
|
|
3471
3471
|
});
|
|
3472
3472
|
}
|
|
3473
|
-
}, y =
|
|
3474
|
-
const
|
|
3473
|
+
}, y = M(() => {
|
|
3474
|
+
const I = [
|
|
3475
3475
|
{ id: "data", label: "Дані" },
|
|
3476
3476
|
{ id: "style", label: "Стилі" },
|
|
3477
3477
|
{ id: "yaml", label: "{ }" }
|
|
3478
3478
|
// { id: 'controls', label: 'Контролси' },
|
|
3479
3479
|
];
|
|
3480
|
-
return
|
|
3480
|
+
return I == null ? void 0 : I.filter((T) => {
|
|
3481
3481
|
var D, V, O;
|
|
3482
|
-
return
|
|
3482
|
+
return T.id === "style" ? !(b != null && b.includes(
|
|
3483
3483
|
((D = i.selectedWidgetData) == null ? void 0 : D.type) || ((O = (V = i.selectedWidgetData) == null ? void 0 : V.data) == null ? void 0 : O.type)
|
|
3484
3484
|
)) : !0;
|
|
3485
3485
|
});
|
|
3486
|
-
}),
|
|
3487
|
-
var
|
|
3488
|
-
|
|
3489
|
-
title: (
|
|
3490
|
-
type: (
|
|
3486
|
+
}), z = () => {
|
|
3487
|
+
var I, T, D, V, O, ee, ne, le, L;
|
|
3488
|
+
h.value = {
|
|
3489
|
+
title: (I = i.selectedWidgetData) == null ? void 0 : I.title,
|
|
3490
|
+
type: (T = i.selectedWidgetData) == null ? void 0 : T.type,
|
|
3491
3491
|
table: (D = i.selectedWidgetData) == null ? void 0 : D.table_name,
|
|
3492
3492
|
query: (O = (V = i.selectedWidgetData) == null ? void 0 : V.data) == null ? void 0 : O.query,
|
|
3493
|
-
x: (
|
|
3494
|
-
cls: (L = (
|
|
3493
|
+
x: (ne = (ee = i.selectedWidgetData) == null ? void 0 : ee.data) == null ? void 0 : ne.x,
|
|
3494
|
+
cls: (L = (le = i.selectedWidgetData) == null ? void 0 : le.data) == null ? void 0 : L.cls
|
|
3495
3495
|
}, p.value = !0;
|
|
3496
3496
|
}, $ = async () => {
|
|
3497
3497
|
try {
|
|
3498
|
-
await
|
|
3498
|
+
await re.put(
|
|
3499
3499
|
`/bi-dashboard/${i.selectedDashboard}/${i.selectedWidgetData.name}`,
|
|
3500
|
-
|
|
3500
|
+
h.value
|
|
3501
3501
|
), a({
|
|
3502
3502
|
type: "success",
|
|
3503
3503
|
title: "Успішно!",
|
|
@@ -3511,7 +3511,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3511
3511
|
});
|
|
3512
3512
|
}
|
|
3513
3513
|
};
|
|
3514
|
-
|
|
3514
|
+
ie(x, () => {
|
|
3515
3515
|
c.value = !1, setTimeout(() => c.value = !0);
|
|
3516
3516
|
});
|
|
3517
3517
|
const w = {
|
|
@@ -3602,26 +3602,26 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3602
3602
|
placeholder: "Cls"
|
|
3603
3603
|
}
|
|
3604
3604
|
};
|
|
3605
|
-
return (
|
|
3606
|
-
var V, O, ee,
|
|
3605
|
+
return (I, T) => {
|
|
3606
|
+
var V, O, ee, ne, le, L, C, A, Z, m, _;
|
|
3607
3607
|
const D = ue("VsPopover");
|
|
3608
3608
|
return u(), g(Y, null, [
|
|
3609
3609
|
d("div", Zr, [
|
|
3610
3610
|
t.selectedWidgetData ? (u(), g("div", Qr, [
|
|
3611
3611
|
d("div", Xr, [
|
|
3612
3612
|
d("nav", Jr, [
|
|
3613
|
-
(u(!0), g(Y, null,
|
|
3613
|
+
(u(!0), g(Y, null, ae(y.value, (k) => (u(), g("button", {
|
|
3614
3614
|
key: k.id,
|
|
3615
3615
|
type: "button",
|
|
3616
|
-
class:
|
|
3617
|
-
onClick: (j) =>
|
|
3616
|
+
class: se(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", f.value === k.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
|
|
3617
|
+
onClick: (j) => f.value = k.id
|
|
3618
3618
|
}, [
|
|
3619
|
-
|
|
3620
|
-
|
|
3619
|
+
oe(P(k.label) + " ", 1),
|
|
3620
|
+
f.value === k.id ? (u(), g("span", Yr)) : U("", !0)
|
|
3621
3621
|
], 10, Kr))), 128))
|
|
3622
3622
|
]),
|
|
3623
3623
|
d("div", en, [
|
|
3624
|
-
|
|
3624
|
+
W(D, {
|
|
3625
3625
|
placement: "left",
|
|
3626
3626
|
trigger: "hover"
|
|
3627
3627
|
}, {
|
|
@@ -3630,20 +3630,20 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3630
3630
|
type: "button",
|
|
3631
3631
|
class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
|
|
3632
3632
|
title: "Зберегти",
|
|
3633
|
-
onClick:
|
|
3633
|
+
onClick: T[0] || (T[0] = (k) => {
|
|
3634
3634
|
var j, K;
|
|
3635
3635
|
return (K = (j = n.value) == null ? void 0 : j.save) == null ? void 0 : K.call(j);
|
|
3636
3636
|
})
|
|
3637
3637
|
}, [
|
|
3638
|
-
|
|
3638
|
+
W(H(Hs), { class: "h-4 w-4" })
|
|
3639
3639
|
])
|
|
3640
3640
|
]),
|
|
3641
3641
|
default: G(() => [
|
|
3642
|
-
|
|
3642
|
+
T[9] || (T[9] = oe(" Зберегти ", -1))
|
|
3643
3643
|
]),
|
|
3644
3644
|
_: 1
|
|
3645
3645
|
}),
|
|
3646
|
-
|
|
3646
|
+
W(D, {
|
|
3647
3647
|
placement: "left",
|
|
3648
3648
|
trigger: "hover"
|
|
3649
3649
|
}, {
|
|
@@ -3651,17 +3651,17 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3651
3651
|
d("button", {
|
|
3652
3652
|
type: "button",
|
|
3653
3653
|
class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
|
|
3654
|
-
onClick:
|
|
3654
|
+
onClick: z
|
|
3655
3655
|
}, [
|
|
3656
|
-
|
|
3656
|
+
W(ds, { class: "h-4 w-4" })
|
|
3657
3657
|
])
|
|
3658
3658
|
]),
|
|
3659
3659
|
default: G(() => [
|
|
3660
|
-
|
|
3660
|
+
T[10] || (T[10] = oe(" Редагувати віджет ", -1))
|
|
3661
3661
|
]),
|
|
3662
3662
|
_: 1
|
|
3663
3663
|
}),
|
|
3664
|
-
|
|
3664
|
+
W(D, {
|
|
3665
3665
|
placement: "left",
|
|
3666
3666
|
trigger: "hover"
|
|
3667
3667
|
}, {
|
|
@@ -3669,66 +3669,66 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3669
3669
|
d("button", {
|
|
3670
3670
|
type: "button",
|
|
3671
3671
|
class: "h-8 w-8 flex items-center justify-center rounded-lg text-gray-500 hover:text-gray-700 hover:bg-gray-100 transition-colors",
|
|
3672
|
-
onClick:
|
|
3672
|
+
onClick: T[1] || (T[1] = (k) => l.value = !0)
|
|
3673
3673
|
}, [
|
|
3674
|
-
|
|
3674
|
+
W(H(ls), { class: "h-4 w-4" })
|
|
3675
3675
|
])
|
|
3676
3676
|
]),
|
|
3677
3677
|
default: G(() => [
|
|
3678
|
-
|
|
3678
|
+
T[11] || (T[11] = oe(" Видалити віджет ", -1))
|
|
3679
3679
|
]),
|
|
3680
3680
|
_: 1
|
|
3681
3681
|
})
|
|
3682
3682
|
])
|
|
3683
3683
|
]),
|
|
3684
|
-
(V = t.currentWidgetData) != null && V.status ? (u(),
|
|
3684
|
+
(V = t.currentWidgetData) != null && V.status ? (u(), F(Qe, {
|
|
3685
3685
|
key: 0,
|
|
3686
3686
|
title: (O = t.currentWidgetData) == null ? void 0 : O.title,
|
|
3687
3687
|
text: (ee = t.currentWidgetData) == null ? void 0 : ee.message
|
|
3688
3688
|
}, null, 8, ["title", "text"])) : (u(), g("div", tn, [
|
|
3689
3689
|
c.value && t.currentWidgetData ? (u(), g("div", sn, [
|
|
3690
|
-
|
|
3690
|
+
W(Kt, {
|
|
3691
3691
|
ref_key: "tabPanelRef",
|
|
3692
3692
|
ref: n,
|
|
3693
|
-
"tab-key":
|
|
3694
|
-
"tab-component": H(Jt)["vs-editor-form-" +
|
|
3695
|
-
widgetName: (
|
|
3693
|
+
"tab-key": f.value,
|
|
3694
|
+
"tab-component": H(Jt)["vs-editor-form-" + f.value],
|
|
3695
|
+
widgetName: (ne = t.selectedWidgetData) == null ? void 0 : ne.name,
|
|
3696
3696
|
dashboardId: t.selectedDashboard,
|
|
3697
|
-
yamlValue: ((
|
|
3697
|
+
yamlValue: ((le = t.selectedWidgetData) == null ? void 0 : le.yml) || "",
|
|
3698
3698
|
data: t.selectedWidgetData,
|
|
3699
3699
|
controls: (L = t.selectedWidgetData) == null ? void 0 : L.controls,
|
|
3700
3700
|
columns: (C = t.currentWidgetData) == null ? void 0 : C.columns,
|
|
3701
|
-
onUpdateDashboard:
|
|
3701
|
+
onUpdateDashboard: T[2] || (T[2] = (k) => I.$emit("update-data"))
|
|
3702
3702
|
}, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
|
|
3703
3703
|
])) : (u(), g("div", an, [
|
|
3704
|
-
|
|
3704
|
+
W(Kt, {
|
|
3705
3705
|
ref_key: "tabPanelRef",
|
|
3706
3706
|
ref: n,
|
|
3707
|
-
"tab-key":
|
|
3708
|
-
"tab-component": H(Jt)["vs-editor-form-" +
|
|
3707
|
+
"tab-key": f.value,
|
|
3708
|
+
"tab-component": H(Jt)["vs-editor-form-" + f.value],
|
|
3709
3709
|
widgetName: (A = t.selectedWidgetData) == null ? void 0 : A.name,
|
|
3710
3710
|
dashboardId: t.selectedDashboard,
|
|
3711
3711
|
yamlValue: ((Z = t.selectedWidgetData) == null ? void 0 : Z.yml) || "",
|
|
3712
3712
|
data: t.selectedWidgetData,
|
|
3713
3713
|
controls: (m = t.selectedWidgetData) == null ? void 0 : m.controls,
|
|
3714
3714
|
columns: (_ = t.currentWidgetData) == null ? void 0 : _.columns,
|
|
3715
|
-
onUpdateDashboard:
|
|
3715
|
+
onUpdateDashboard: T[3] || (T[3] = (k) => I.$emit("update-data"))
|
|
3716
3716
|
}, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
|
|
3717
3717
|
])),
|
|
3718
|
-
|
|
3718
|
+
W(Ne, {
|
|
3719
3719
|
teleport: "#modal",
|
|
3720
3720
|
visible: l.value,
|
|
3721
3721
|
title: "Ви впевнені?",
|
|
3722
|
-
onClose:
|
|
3722
|
+
onClose: T[5] || (T[5] = (k) => l.value = !1)
|
|
3723
3723
|
}, {
|
|
3724
3724
|
default: G(() => [
|
|
3725
3725
|
d("div", rn, [
|
|
3726
|
-
|
|
3726
|
+
T[12] || (T[12] = d("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
|
|
3727
3727
|
d("div", nn, [
|
|
3728
3728
|
d("button", {
|
|
3729
3729
|
type: "button",
|
|
3730
3730
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
3731
|
-
onClick:
|
|
3731
|
+
onClick: T[4] || (T[4] = (k) => l.value = !1)
|
|
3732
3732
|
}, " Скасувати "),
|
|
3733
3733
|
d("button", {
|
|
3734
3734
|
type: "button",
|
|
@@ -3741,24 +3741,24 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3741
3741
|
_: 1
|
|
3742
3742
|
}, 8, ["visible"])
|
|
3743
3743
|
]))
|
|
3744
|
-
])) : (u(),
|
|
3744
|
+
])) : (u(), F(Qe, {
|
|
3745
3745
|
key: 1,
|
|
3746
3746
|
title: "Оберіть один з віджетів",
|
|
3747
3747
|
text: "",
|
|
3748
3748
|
class: "p-4"
|
|
3749
3749
|
}))
|
|
3750
3750
|
]),
|
|
3751
|
-
|
|
3751
|
+
W(Ne, {
|
|
3752
3752
|
teleport: "#modal",
|
|
3753
3753
|
visible: p.value,
|
|
3754
3754
|
title: "Редагувати віджет",
|
|
3755
|
-
onClose:
|
|
3755
|
+
onClose: T[8] || (T[8] = (k) => p.value = !1)
|
|
3756
3756
|
}, {
|
|
3757
3757
|
footer: G(() => [
|
|
3758
3758
|
d("div", on, [
|
|
3759
3759
|
d("button", {
|
|
3760
3760
|
style: { border: "1px solid #000" },
|
|
3761
|
-
onClick:
|
|
3761
|
+
onClick: T[7] || (T[7] = (k) => p.value = !1),
|
|
3762
3762
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg hover:bg-gray-100 duration-300"
|
|
3763
3763
|
}, " Скасувати "),
|
|
3764
3764
|
d("button", {
|
|
@@ -3768,22 +3768,22 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3768
3768
|
])
|
|
3769
3769
|
]),
|
|
3770
3770
|
default: G(() => [
|
|
3771
|
-
w ? (u(),
|
|
3771
|
+
w ? (u(), F(H(s), {
|
|
3772
3772
|
key: 0,
|
|
3773
3773
|
schema: w,
|
|
3774
|
-
values:
|
|
3775
|
-
"onUpdate:values":
|
|
3776
|
-
}, null, 8, ["values"])) :
|
|
3774
|
+
values: h.value,
|
|
3775
|
+
"onUpdate:values": T[6] || (T[6] = (k) => h.value = k)
|
|
3776
|
+
}, null, 8, ["values"])) : U("", !0)
|
|
3777
3777
|
]),
|
|
3778
3778
|
_: 1
|
|
3779
3779
|
}, 8, ["visible"])
|
|
3780
3780
|
], 64);
|
|
3781
3781
|
};
|
|
3782
3782
|
}
|
|
3783
|
-
}, dn = { class: "overflow-hidden flex flex-col min-h-[480px]" }, cn = { class: "
|
|
3783
|
+
}, dn = { class: "overflow-hidden flex flex-col min-h-[480px]" }, cn = { class: "md:hidden shrink-0 mb-3" }, un = { class: "inline-flex rounded-lg bg-gray-100 p-1" }, pn = { class: "flex-1 flex flex-col md:flex-row min-h-0 gap-4" }, hn = {
|
|
3784
3784
|
key: 1,
|
|
3785
3785
|
class: "flex items-center justify-center h-full"
|
|
3786
|
-
},
|
|
3786
|
+
}, fn = {
|
|
3787
3787
|
__name: "vs-widget-editor-panel",
|
|
3788
3788
|
props: {
|
|
3789
3789
|
selectedWidget: { type: String, default: "" },
|
|
@@ -3794,35 +3794,51 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3794
3794
|
},
|
|
3795
3795
|
emits: ["update:selectedWidget", "update-data"],
|
|
3796
3796
|
setup(t, { emit: e }) {
|
|
3797
|
-
const s = t, a = e, r = S(null);
|
|
3798
|
-
async function
|
|
3797
|
+
const s = t, a = e, r = S(null), o = S("settings");
|
|
3798
|
+
async function n() {
|
|
3799
3799
|
if (!(!s.selectedDashboard || !s.selectedWidget))
|
|
3800
3800
|
try {
|
|
3801
|
-
r.value = await
|
|
3801
|
+
r.value = await re.get(
|
|
3802
3802
|
`/bi-data?dashboard=${s.selectedDashboard}&widget=${s.selectedWidget}`
|
|
3803
3803
|
);
|
|
3804
|
-
} catch (
|
|
3805
|
-
console.error(
|
|
3804
|
+
} catch (c) {
|
|
3805
|
+
console.error(c);
|
|
3806
3806
|
}
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function i() {
|
|
3809
3809
|
a("update-data");
|
|
3810
3810
|
}
|
|
3811
|
-
|
|
3811
|
+
ie(
|
|
3812
3812
|
() => [s.selectedDashboard, s.selectedWidget],
|
|
3813
3813
|
() => {
|
|
3814
|
-
o();
|
|
3814
|
+
o.value = "settings", n();
|
|
3815
3815
|
},
|
|
3816
3816
|
{ immediate: !0 }
|
|
3817
3817
|
);
|
|
3818
|
-
const
|
|
3818
|
+
const l = M({
|
|
3819
3819
|
get: () => s.selectedWidget,
|
|
3820
|
-
set: (
|
|
3820
|
+
set: (c) => a("update:selectedWidget", c)
|
|
3821
3821
|
});
|
|
3822
|
-
return (
|
|
3822
|
+
return (c, p) => (u(), g("div", dn, [
|
|
3823
3823
|
d("div", cn, [
|
|
3824
3824
|
d("div", un, [
|
|
3825
|
-
|
|
3825
|
+
d("button", {
|
|
3826
|
+
type: "button",
|
|
3827
|
+
class: se(["px-3 py-1.5 text-sm font-medium rounded-md transition-colors", o.value === "widget" ? "bg-white text-gray-900 shadow-sm" : "text-gray-600"]),
|
|
3828
|
+
onClick: p[0] || (p[0] = (h) => o.value = "widget")
|
|
3829
|
+
}, " Віджет ", 2),
|
|
3830
|
+
d("button", {
|
|
3831
|
+
type: "button",
|
|
3832
|
+
class: se(["px-3 py-1.5 text-sm font-medium rounded-md transition-colors", o.value === "settings" ? "bg-white text-gray-900 shadow-sm" : "text-gray-600"]),
|
|
3833
|
+
onClick: p[1] || (p[1] = (h) => o.value = "settings")
|
|
3834
|
+
}, " Налаштування ", 2)
|
|
3835
|
+
])
|
|
3836
|
+
]),
|
|
3837
|
+
d("div", pn, [
|
|
3838
|
+
d("div", {
|
|
3839
|
+
class: se(["flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50 rounded-xl border border-gray-200 md:border-0 md:rounded-none", o.value === "settings" ? "hidden md:block" : ""])
|
|
3840
|
+
}, [
|
|
3841
|
+
r.value ? (u(), F(Ze, {
|
|
3826
3842
|
key: 0,
|
|
3827
3843
|
dashboard: t.selectedDashboard,
|
|
3828
3844
|
widget: t.selectedWidget,
|
|
@@ -3831,37 +3847,39 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3831
3847
|
"prefetched-data": r.value,
|
|
3832
3848
|
"filter-u-rl": void 0,
|
|
3833
3849
|
class: "max-h-full"
|
|
3834
|
-
}, null, 8, ["dashboard", "widget", "selected-widget", "dashboard-widgets", "prefetched-data"])) : (u(), g("div",
|
|
3850
|
+
}, null, 8, ["dashboard", "widget", "selected-widget", "dashboard-widgets", "prefetched-data"])) : (u(), g("div", hn, [...p[3] || (p[3] = [
|
|
3835
3851
|
d("span", { class: "text-sm text-gray-400" }, "Завантаження...", -1)
|
|
3836
|
-
])))
|
|
3837
|
-
]),
|
|
3838
|
-
d("div",
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3852
|
+
])]))
|
|
3853
|
+
], 2),
|
|
3854
|
+
d("div", {
|
|
3855
|
+
class: se(["min-w-0 flex flex-col md:w-[400px] md:shrink-0", o.value === "widget" ? "hidden md:flex" : ""])
|
|
3856
|
+
}, [
|
|
3857
|
+
W(ln, {
|
|
3858
|
+
selectedWidget: l.value,
|
|
3859
|
+
"onUpdate:selectedWidget": p[2] || (p[2] = (h) => l.value = h),
|
|
3842
3860
|
selectedWidgetData: t.selectedWidgetData,
|
|
3843
3861
|
currentWidgetData: r.value || t.currentWidgetData || { columns: [] },
|
|
3844
3862
|
selectedDashboard: t.selectedDashboard,
|
|
3845
|
-
onUpdateData:
|
|
3863
|
+
onUpdateData: i
|
|
3846
3864
|
}, null, 8, ["selectedWidget", "selectedWidgetData", "currentWidgetData", "selectedDashboard"])
|
|
3847
|
-
])
|
|
3865
|
+
], 2)
|
|
3848
3866
|
])
|
|
3849
3867
|
]));
|
|
3850
3868
|
}
|
|
3851
3869
|
}, gn = {
|
|
3852
3870
|
__name: "icon-grid",
|
|
3853
3871
|
setup(t) {
|
|
3854
|
-
return (e, s) => (u(),
|
|
3872
|
+
return (e, s) => (u(), F(H(qs), $e(e.$attrs, { size: 24 }), null, 16));
|
|
3855
3873
|
}
|
|
3856
3874
|
}, mn = {
|
|
3857
3875
|
__name: "icon-table",
|
|
3858
3876
|
setup(t) {
|
|
3859
|
-
return (e, s) => (u(),
|
|
3877
|
+
return (e, s) => (u(), F(H(Gs), $e(e.$attrs, { size: 24 }), null, 16));
|
|
3860
3878
|
}
|
|
3861
3879
|
}, bn = {
|
|
3862
3880
|
__name: "icon-more",
|
|
3863
3881
|
setup(t) {
|
|
3864
|
-
return (e, s) => (u(),
|
|
3882
|
+
return (e, s) => (u(), F(H(rs), $e(e.$attrs, { size: 24 }), null, 16));
|
|
3865
3883
|
}
|
|
3866
3884
|
}, xn = te(() => import("@opengis/form")), yn = {
|
|
3867
3885
|
components: {
|
|
@@ -3902,6 +3920,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
3902
3920
|
},
|
|
3903
3921
|
data() {
|
|
3904
3922
|
return {
|
|
3923
|
+
hoverTooltipsEnabled: !1,
|
|
3905
3924
|
isDeleteConfirm: !1,
|
|
3906
3925
|
isFormEdit: !1,
|
|
3907
3926
|
isFormGrid: !1,
|
|
@@ -4006,6 +4025,16 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
4006
4025
|
]
|
|
4007
4026
|
};
|
|
4008
4027
|
},
|
|
4028
|
+
mounted() {
|
|
4029
|
+
this._hoverTooltipsMq = window.matchMedia(
|
|
4030
|
+
"(min-width: 768px) and (hover: hover) and (pointer: fine)"
|
|
4031
|
+
), this.hoverTooltipsEnabled = this._hoverTooltipsMq.matches, this._onHoverTooltipsMq = () => {
|
|
4032
|
+
this.hoverTooltipsEnabled = this._hoverTooltipsMq.matches;
|
|
4033
|
+
}, this._hoverTooltipsMq.addEventListener("change", this._onHoverTooltipsMq);
|
|
4034
|
+
},
|
|
4035
|
+
beforeUnmount() {
|
|
4036
|
+
this._hoverTooltipsMq && this._onHoverTooltipsMq && this._hoverTooltipsMq.removeEventListener("change", this._onHoverTooltipsMq);
|
|
4037
|
+
},
|
|
4009
4038
|
props: {
|
|
4010
4039
|
selected: { type: String, default: () => "" },
|
|
4011
4040
|
dashboardData: { type: Object, default: () => {
|
|
@@ -4019,7 +4048,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
4019
4048
|
var t, e;
|
|
4020
4049
|
try {
|
|
4021
4050
|
const s = (e = (t = this.$refs) == null ? void 0 : t.formEdit) == null ? void 0 : e.validate();
|
|
4022
|
-
typeof s == "function" && await s(), await
|
|
4051
|
+
typeof s == "function" && await s(), await re.put(`/bi-dashboard/${this.selected}`, this.formEditValue), await this.$notify({
|
|
4023
4052
|
title: "Успішно!",
|
|
4024
4053
|
type: "success",
|
|
4025
4054
|
message: "Дані успішно оновлено"
|
|
@@ -4035,7 +4064,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
4035
4064
|
async editDashboardGrid() {
|
|
4036
4065
|
var t, e;
|
|
4037
4066
|
try {
|
|
4038
|
-
(e = (t = this.$refs) == null ? void 0 : t.formGrid) == null || e.doValidation(), await
|
|
4067
|
+
(e = (t = this.$refs) == null ? void 0 : t.formGrid) == null || e.doValidation(), await re.put(`/bi-dashboard/${this.selected}`, {
|
|
4039
4068
|
...this.formEditValue,
|
|
4040
4069
|
...this.formGridValue
|
|
4041
4070
|
}), await this.$notify({
|
|
@@ -4053,7 +4082,7 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
4053
4082
|
},
|
|
4054
4083
|
async deleteDashboard() {
|
|
4055
4084
|
try {
|
|
4056
|
-
await
|
|
4085
|
+
await re.delete(`/bi-dashboard/${this.selected}`), this.isDeleteConfirm = !1, this.$emit("update:selected", ""), this.$emit("update-editor"), this.$notify({
|
|
4057
4086
|
title: "Успішно!",
|
|
4058
4087
|
type: "success",
|
|
4059
4088
|
message: "Дашборд видалено успішно"
|
|
@@ -4073,49 +4102,61 @@ const Br = { class: "space-y-4" }, Fr = {
|
|
|
4073
4102
|
}, vn = {
|
|
4074
4103
|
key: 0,
|
|
4075
4104
|
class: "flex items-center gap-4"
|
|
4076
|
-
}, wn = { class: "h-[30px] w-[30px] flex items-center justify-center" }, kn = { class: "flex flex-col items-start -ml-2 -mr-2" }, _n = { class: "
|
|
4077
|
-
function
|
|
4105
|
+
}, wn = { class: "h-[30px] w-[30px] flex items-center justify-center" }, kn = { class: "flex flex-col items-start -ml-2 -mr-2" }, _n = { class: "h-[30px] w-[30px] flex items-center justify-center" }, $n = { class: "flex flex-col items-start -ml-2 -mr-2" }, Dn = { class: "p-4" }, Cn = { class: "flex justify-end mt-4 gap-x-3" }, Tn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, zn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" };
|
|
4106
|
+
function In(t, e, s, a, r, o) {
|
|
4078
4107
|
const n = ue("IconGrid"), i = ue("VsPopover"), l = ue("IconMore"), c = ue("VsModal"), p = ue("VForm");
|
|
4079
4108
|
return u(), g("div", null, [
|
|
4080
4109
|
s.selected ? (u(), g("div", vn, [
|
|
4081
|
-
|
|
4110
|
+
r.hoverTooltipsEnabled ? (u(), F(i, {
|
|
4111
|
+
key: 0,
|
|
4082
4112
|
placement: "left",
|
|
4083
4113
|
trigger: "hover"
|
|
4084
4114
|
}, {
|
|
4085
4115
|
reference: G(() => [
|
|
4086
4116
|
d("button", {
|
|
4087
4117
|
class: "h-[30px] w-[30px] flex items-center justify-center",
|
|
4088
|
-
onClick: e[0] || (e[0] = (
|
|
4118
|
+
onClick: e[0] || (e[0] = (h) => {
|
|
4119
|
+
o.closePopover(), r.isFormGrid = !0;
|
|
4120
|
+
})
|
|
4089
4121
|
}, [
|
|
4090
|
-
|
|
4122
|
+
W(n, { class: "h-[20px] text-gray-500" })
|
|
4091
4123
|
])
|
|
4092
4124
|
]),
|
|
4093
4125
|
default: G(() => [
|
|
4094
|
-
e[
|
|
4126
|
+
e[17] || (e[17] = oe(" Редагувати структуру дашборду ", -1))
|
|
4095
4127
|
]),
|
|
4096
4128
|
_: 1
|
|
4097
|
-
}),
|
|
4098
|
-
|
|
4129
|
+
})) : (u(), g("button", {
|
|
4130
|
+
key: 1,
|
|
4131
|
+
class: "h-[30px] w-[30px] flex items-center justify-center",
|
|
4132
|
+
onClick: e[1] || (e[1] = (h) => {
|
|
4133
|
+
o.closePopover(), r.isFormGrid = !0;
|
|
4134
|
+
})
|
|
4135
|
+
}, [
|
|
4136
|
+
W(n, { class: "h-[20px] text-gray-500" })
|
|
4137
|
+
])),
|
|
4138
|
+
r.hoverTooltipsEnabled ? (u(), F(i, {
|
|
4139
|
+
key: 2,
|
|
4099
4140
|
placement: "left",
|
|
4100
4141
|
trigger: "hover"
|
|
4101
4142
|
}, {
|
|
4102
4143
|
reference: G(() => [
|
|
4103
|
-
|
|
4144
|
+
W(i, { placement: "bottom-left" }, {
|
|
4104
4145
|
reference: G(() => [
|
|
4105
4146
|
d("button", wn, [
|
|
4106
|
-
|
|
4147
|
+
W(l, { class: "h-[20px]" })
|
|
4107
4148
|
])
|
|
4108
4149
|
]),
|
|
4109
4150
|
default: G(() => [
|
|
4110
4151
|
d("div", kn, [
|
|
4111
4152
|
d("button", {
|
|
4112
|
-
onClick: e[
|
|
4153
|
+
onClick: e[2] || (e[2] = (h) => {
|
|
4113
4154
|
o.closePopover(), r.isFormEdit = !0;
|
|
4114
4155
|
}),
|
|
4115
4156
|
class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
|
|
4116
4157
|
}, " Редагувати дашборд "),
|
|
4117
4158
|
d("button", {
|
|
4118
|
-
onClick: e[
|
|
4159
|
+
onClick: e[3] || (e[3] = (h) => {
|
|
4119
4160
|
o.closePopover(), r.isDeleteConfirm = !0;
|
|
4120
4161
|
}),
|
|
4121
4162
|
class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
|
|
@@ -4126,107 +4167,133 @@ function zn(t, e, s, a, r, o) {
|
|
|
4126
4167
|
})
|
|
4127
4168
|
]),
|
|
4128
4169
|
default: G(() => [
|
|
4129
|
-
e[
|
|
4170
|
+
e[18] || (e[18] = oe(" Керування дашбордом ", -1))
|
|
4171
|
+
]),
|
|
4172
|
+
_: 1
|
|
4173
|
+
})) : (u(), F(i, {
|
|
4174
|
+
key: 3,
|
|
4175
|
+
placement: "bottom-left"
|
|
4176
|
+
}, {
|
|
4177
|
+
reference: G(() => [
|
|
4178
|
+
d("button", _n, [
|
|
4179
|
+
W(l, { class: "h-[20px]" })
|
|
4180
|
+
])
|
|
4181
|
+
]),
|
|
4182
|
+
default: G(() => [
|
|
4183
|
+
d("div", $n, [
|
|
4184
|
+
d("button", {
|
|
4185
|
+
onClick: e[4] || (e[4] = (h) => {
|
|
4186
|
+
o.closePopover(), r.isFormEdit = !0;
|
|
4187
|
+
}),
|
|
4188
|
+
class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
|
|
4189
|
+
}, " Редагувати дашборд "),
|
|
4190
|
+
d("button", {
|
|
4191
|
+
onClick: e[5] || (e[5] = (h) => {
|
|
4192
|
+
o.closePopover(), r.isDeleteConfirm = !0;
|
|
4193
|
+
}),
|
|
4194
|
+
class: "px-[8px] py-[4px] hover:bg-gray-100 w-full text-start rounded-lg"
|
|
4195
|
+
}, " Видалити дашборд ")
|
|
4196
|
+
])
|
|
4130
4197
|
]),
|
|
4131
4198
|
_: 1
|
|
4132
|
-
})
|
|
4133
|
-
])) :
|
|
4134
|
-
|
|
4199
|
+
}))
|
|
4200
|
+
])) : U("", !0),
|
|
4201
|
+
W(c, {
|
|
4135
4202
|
teleport: "#modal",
|
|
4136
4203
|
visible: r.isDeleteConfirm,
|
|
4137
4204
|
size: "small",
|
|
4138
4205
|
title: "Ви впевнені?",
|
|
4139
|
-
onClose: e[
|
|
4206
|
+
onClose: e[8] || (e[8] = (h) => r.isDeleteConfirm = !1)
|
|
4140
4207
|
}, {
|
|
4141
4208
|
default: G(() => [
|
|
4142
|
-
d("div",
|
|
4143
|
-
e[
|
|
4144
|
-
d("div",
|
|
4209
|
+
d("div", Dn, [
|
|
4210
|
+
e[19] || (e[19] = d("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей дашборд? ", -1)),
|
|
4211
|
+
d("div", Cn, [
|
|
4145
4212
|
d("button", {
|
|
4146
4213
|
type: "button",
|
|
4147
4214
|
class: "inline-flex items-center px-3 py-2 text-sm font-medium text-gray-800 bg-white border border-gray-200 rounded-lg shadow-sm gap-x-2 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-300 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700",
|
|
4148
|
-
onClick: e[
|
|
4215
|
+
onClick: e[6] || (e[6] = (h) => r.isDeleteConfirm = !1)
|
|
4149
4216
|
}, " Скасувати "),
|
|
4150
4217
|
d("button", {
|
|
4151
4218
|
type: "button",
|
|
4152
4219
|
class: "inline-flex items-center px-3 py-2 text-sm font-semibold text-white bg-red-500 border border-transparent rounded-lg gap-x-2 hover:bg-red-600 disabled:opacity-50 disabled:pointer-events-none",
|
|
4153
|
-
onClick: e[
|
|
4220
|
+
onClick: e[7] || (e[7] = (...h) => o.deleteDashboard && o.deleteDashboard(...h))
|
|
4154
4221
|
}, " Так, я впевнена(ий) ")
|
|
4155
4222
|
])
|
|
4156
4223
|
])
|
|
4157
4224
|
]),
|
|
4158
4225
|
_: 1
|
|
4159
4226
|
}, 8, ["visible"]),
|
|
4160
|
-
|
|
4227
|
+
W(c, {
|
|
4161
4228
|
teleport: "#modal",
|
|
4162
4229
|
visible: r.isFormEdit,
|
|
4163
4230
|
title: "Редагувати дашборд",
|
|
4164
|
-
onClose: e[
|
|
4231
|
+
onClose: e[12] || (e[12] = (h) => r.isFormEdit = !1)
|
|
4165
4232
|
}, {
|
|
4166
4233
|
footer: G(() => [
|
|
4167
|
-
d("div",
|
|
4234
|
+
d("div", Tn, [
|
|
4168
4235
|
d("button", {
|
|
4169
4236
|
style: { border: "1px solid #000" },
|
|
4170
|
-
onClick: e[
|
|
4237
|
+
onClick: e[10] || (e[10] = (h) => r.isFormEdit = !1),
|
|
4171
4238
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
|
|
4172
4239
|
}, " Скасувати "),
|
|
4173
4240
|
d("button", {
|
|
4174
|
-
onClick: e[
|
|
4241
|
+
onClick: e[11] || (e[11] = (...h) => o.editDashboard && o.editDashboard(...h)),
|
|
4175
4242
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
4176
4243
|
}, " Зберегти ")
|
|
4177
4244
|
])
|
|
4178
4245
|
]),
|
|
4179
4246
|
default: G(() => [
|
|
4180
|
-
|
|
4247
|
+
W(p, {
|
|
4181
4248
|
ref: "formEdit",
|
|
4182
4249
|
schema: r.editDashboardScheme,
|
|
4183
4250
|
values: r.formEditValue,
|
|
4184
|
-
"onUpdate:values": e[
|
|
4251
|
+
"onUpdate:values": e[9] || (e[9] = (h) => r.formEditValue = h)
|
|
4185
4252
|
}, null, 8, ["schema", "values"])
|
|
4186
4253
|
]),
|
|
4187
4254
|
_: 1
|
|
4188
4255
|
}, 8, ["visible"]),
|
|
4189
|
-
|
|
4256
|
+
W(c, {
|
|
4190
4257
|
teleport: "#modal",
|
|
4191
4258
|
visible: r.isFormGrid,
|
|
4192
4259
|
title: "Редагувати структуру дашборду",
|
|
4193
|
-
onClose: e[
|
|
4260
|
+
onClose: e[16] || (e[16] = (h) => r.isFormGrid = !1)
|
|
4194
4261
|
}, {
|
|
4195
4262
|
footer: G(() => [
|
|
4196
|
-
d("div",
|
|
4263
|
+
d("div", zn, [
|
|
4197
4264
|
d("button", {
|
|
4198
4265
|
style: { border: "1px solid #000" },
|
|
4199
|
-
onClick: e[
|
|
4266
|
+
onClick: e[14] || (e[14] = (h) => r.isFormGrid = !1),
|
|
4200
4267
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border-gray-200 rounded-lg !border-gray-200 hover:bg-gray-100 duration-300"
|
|
4201
4268
|
}, " Скасувати "),
|
|
4202
4269
|
d("button", {
|
|
4203
|
-
onClick: e[
|
|
4270
|
+
onClick: e[15] || (e[15] = (...h) => o.editDashboardGrid && o.editDashboardGrid(...h)),
|
|
4204
4271
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"
|
|
4205
4272
|
}, " Зберегти ")
|
|
4206
4273
|
])
|
|
4207
4274
|
]),
|
|
4208
4275
|
default: G(() => [
|
|
4209
|
-
|
|
4276
|
+
W(p, {
|
|
4210
4277
|
ref: "formgrid",
|
|
4211
4278
|
schema: r.editGridScheme,
|
|
4212
4279
|
values: r.formGridValue,
|
|
4213
|
-
"onUpdate:values": e[
|
|
4280
|
+
"onUpdate:values": e[13] || (e[13] = (h) => r.formGridValue = h)
|
|
4214
4281
|
}, null, 8, ["schema", "values"])
|
|
4215
4282
|
]),
|
|
4216
4283
|
_: 1
|
|
4217
4284
|
}, 8, ["visible"])
|
|
4218
4285
|
]);
|
|
4219
4286
|
}
|
|
4220
|
-
const
|
|
4287
|
+
const Sn = /* @__PURE__ */ de(yn, [["render", In]]), Ln = { class: "flex-1 min-w-0 flex flex-col overflow-auto" }, En = { class: "max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1" }, Wn = { class: "relative z-10 shrink-0 mt-4 mb-6" }, Rn = { class: "flex items-center text-sm text-gray-600" }, jn = {
|
|
4221
4288
|
key: 0,
|
|
4222
|
-
class: "flex items-center justify-between gap-4 mt-3"
|
|
4223
|
-
},
|
|
4289
|
+
class: "flex flex-col sm:flex-row items-start md:items-center justify-between gap-4 mt-3"
|
|
4290
|
+
}, Vn = { class: "min-w-0" }, Nn = { class: "text-2xl font-bold text-gray-900" }, Pn = {
|
|
4224
4291
|
key: 0,
|
|
4225
4292
|
class: "mt-1.5 text-sm text-gray-600"
|
|
4226
|
-
},
|
|
4293
|
+
}, On = { class: "flex items-center justify-end shrink-0 w-full sm:w-auto" }, An = {
|
|
4227
4294
|
key: 1,
|
|
4228
4295
|
class: "grid flex-grow w-full grid-cols-12 gap-4 py-4 pr-[15px] min-h-0 overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"
|
|
4229
|
-
},
|
|
4296
|
+
}, Bn = {
|
|
4230
4297
|
__name: "vs-editor",
|
|
4231
4298
|
props: {
|
|
4232
4299
|
prefix: String,
|
|
@@ -4238,8 +4305,8 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4238
4305
|
setup(t, { emit: e }) {
|
|
4239
4306
|
const s = t;
|
|
4240
4307
|
tt(s.prefix || "/api");
|
|
4241
|
-
const a = e, r = Le(), o =
|
|
4242
|
-
|
|
4308
|
+
const a = e, r = Le(), o = M(() => r.hasRoute(ce.EditorWidget)), n = ss("biClearDashboard", null), i = S(s.initialDashboardId || ""), l = S(s.initialWidgetId || ""), c = S(null), p = S(null), h = S(null);
|
|
4309
|
+
ie(() => s.initialWidgetId, ($) => {
|
|
4243
4310
|
l.value = $ || "";
|
|
4244
4311
|
});
|
|
4245
4312
|
const x = async () => {
|
|
@@ -4248,20 +4315,20 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4248
4315
|
return;
|
|
4249
4316
|
}
|
|
4250
4317
|
try {
|
|
4251
|
-
const $ = await
|
|
4318
|
+
const $ = await re.get(
|
|
4252
4319
|
`/bi-dashboard/${i.value}`
|
|
4253
4320
|
);
|
|
4254
4321
|
c.value = $;
|
|
4255
4322
|
} catch ($) {
|
|
4256
4323
|
console.error($);
|
|
4257
4324
|
}
|
|
4258
|
-
}, b =
|
|
4325
|
+
}, b = M(
|
|
4259
4326
|
() => {
|
|
4260
|
-
var $, w,
|
|
4261
|
-
return (
|
|
4327
|
+
var $, w, R;
|
|
4328
|
+
return (R = Array.isArray(($ = c.value) == null ? void 0 : $.widgets) ? (w = c.value) == null ? void 0 : w.widgets : []) == null ? void 0 : R.find((B) => (B == null ? void 0 : B.name) === l.value);
|
|
4262
4329
|
}
|
|
4263
4330
|
);
|
|
4264
|
-
function
|
|
4331
|
+
function f($) {
|
|
4265
4332
|
o.value ? r.push({
|
|
4266
4333
|
name: ce.EditorWidget,
|
|
4267
4334
|
params: { dashboardId: i.value, widgetId: $ }
|
|
@@ -4276,10 +4343,10 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4276
4343
|
function y() {
|
|
4277
4344
|
o.value ? r.push({ name: ce.Editor }) : (typeof n == "function" && n(), a("back"));
|
|
4278
4345
|
}
|
|
4279
|
-
const
|
|
4280
|
-
var
|
|
4346
|
+
const z = M(() => {
|
|
4347
|
+
var R, B, I, T, D;
|
|
4281
4348
|
const w = [o.value ? { label: "Дашборди", to: { name: ce.Editor } } : { label: "Дашборди", onClick: y }];
|
|
4282
|
-
if ((
|
|
4349
|
+
if ((R = c.value) != null && R.title || i.value) {
|
|
4283
4350
|
const V = ((B = c.value) == null ? void 0 : B.title) || i.value || "Редактор";
|
|
4284
4351
|
!!l.value ? w.push(
|
|
4285
4352
|
o.value ? { label: V, to: { name: ce.EditorDashboard, params: { dashboardId: i.value } } } : { label: V, onClick: () => {
|
|
@@ -4289,49 +4356,49 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4289
4356
|
} else
|
|
4290
4357
|
w.push({ label: "Редактор" });
|
|
4291
4358
|
if (l.value && b.value) {
|
|
4292
|
-
const V = ((
|
|
4359
|
+
const V = ((T = (I = b.value) == null ? void 0 : I.data) == null ? void 0 : T.title) || ((D = b.value) == null ? void 0 : D.title) || l.value;
|
|
4293
4360
|
w.push({ label: V });
|
|
4294
4361
|
}
|
|
4295
4362
|
return w;
|
|
4296
4363
|
});
|
|
4297
|
-
return
|
|
4364
|
+
return ie(i, ($, w) => {
|
|
4298
4365
|
w && (l.value = ""), $ ? x() : (c.value = null, y());
|
|
4299
4366
|
}), me(() => {
|
|
4300
4367
|
x();
|
|
4301
4368
|
}), ($, w) => {
|
|
4302
|
-
var
|
|
4369
|
+
var R, B;
|
|
4303
4370
|
return u(), g("div", {
|
|
4304
|
-
class:
|
|
4371
|
+
class: se(["flex w-full h-full", [t.customClass]])
|
|
4305
4372
|
}, [
|
|
4306
|
-
d("div",
|
|
4307
|
-
d("div",
|
|
4308
|
-
d("div",
|
|
4309
|
-
d("div",
|
|
4310
|
-
|
|
4311
|
-
items:
|
|
4373
|
+
d("div", Ln, [
|
|
4374
|
+
d("div", En, [
|
|
4375
|
+
d("div", Wn, [
|
|
4376
|
+
d("div", Rn, [
|
|
4377
|
+
W(is, {
|
|
4378
|
+
items: z.value,
|
|
4312
4379
|
compact: ""
|
|
4313
4380
|
}, null, 8, ["items"])
|
|
4314
4381
|
]),
|
|
4315
|
-
i.value && c.value ? (u(), g("div",
|
|
4316
|
-
d("div",
|
|
4317
|
-
d("h1",
|
|
4318
|
-
c.value.description ? (u(), g("p",
|
|
4382
|
+
i.value && c.value ? (u(), g("div", jn, [
|
|
4383
|
+
d("div", Vn, [
|
|
4384
|
+
d("h1", Nn, P(c.value.title || i.value), 1),
|
|
4385
|
+
c.value.description ? (u(), g("p", Pn, P(c.value.description), 1)) : U("", !0)
|
|
4319
4386
|
]),
|
|
4320
|
-
d("div",
|
|
4387
|
+
d("div", On, [
|
|
4321
4388
|
l.value ? (u(), g("button", {
|
|
4322
4389
|
key: 0,
|
|
4323
4390
|
type: "button",
|
|
4324
4391
|
class: "flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors",
|
|
4325
4392
|
onClick: v
|
|
4326
4393
|
}, [
|
|
4327
|
-
|
|
4328
|
-
w[5] || (w[5] =
|
|
4394
|
+
W(H(Qs), { class: "w-4 h-4" }),
|
|
4395
|
+
w[5] || (w[5] = oe(" Закрити ", -1))
|
|
4329
4396
|
])) : (u(), g(Y, { key: 1 }, [
|
|
4330
|
-
|
|
4397
|
+
W(Sn, {
|
|
4331
4398
|
selected: i.value,
|
|
4332
|
-
"onUpdate:selected": w[0] || (w[0] = (
|
|
4399
|
+
"onUpdate:selected": w[0] || (w[0] = (I) => i.value = I),
|
|
4333
4400
|
dashboardData: c.value,
|
|
4334
|
-
columns: (
|
|
4401
|
+
columns: (R = c.value) == null ? void 0 : R.columns,
|
|
4335
4402
|
selectedWidgetData: b.value,
|
|
4336
4403
|
prefix: t.prefix,
|
|
4337
4404
|
onUpdateEditor: x
|
|
@@ -4339,70 +4406,70 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4339
4406
|
d("button", {
|
|
4340
4407
|
type: "button",
|
|
4341
4408
|
class: "ml-4 flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
|
|
4342
|
-
onClick: w[1] || (w[1] = (
|
|
4343
|
-
var
|
|
4344
|
-
return (D = (
|
|
4409
|
+
onClick: w[1] || (w[1] = (I) => {
|
|
4410
|
+
var T, D;
|
|
4411
|
+
return (D = (T = h.value) == null ? void 0 : T.open) == null ? void 0 : D.call(T);
|
|
4345
4412
|
})
|
|
4346
|
-
}, w[6] || (w[6] = [
|
|
4413
|
+
}, [...w[6] || (w[6] = [
|
|
4347
4414
|
d("span", { class: "leading-none" }, "+", -1),
|
|
4348
|
-
|
|
4349
|
-
])),
|
|
4350
|
-
i.value ? (u(),
|
|
4415
|
+
oe(" Створити віджет ", -1)
|
|
4416
|
+
])]),
|
|
4417
|
+
i.value ? (u(), F(nr, {
|
|
4351
4418
|
key: 0,
|
|
4352
4419
|
ref_key: "createWidgetRef",
|
|
4353
|
-
ref:
|
|
4420
|
+
ref: h,
|
|
4354
4421
|
inline: "",
|
|
4355
4422
|
columns: (B = c.value) == null ? void 0 : B.columns,
|
|
4356
4423
|
selectedDashboard: i.value,
|
|
4357
4424
|
onUpdateData: x
|
|
4358
|
-
}, null, 8, ["columns", "selectedDashboard"])) :
|
|
4425
|
+
}, null, 8, ["columns", "selectedDashboard"])) : U("", !0)
|
|
4359
4426
|
], 64))
|
|
4360
4427
|
])
|
|
4361
|
-
])) :
|
|
4428
|
+
])) : U("", !0)
|
|
4362
4429
|
]),
|
|
4363
|
-
l.value && c.value ? (u(),
|
|
4430
|
+
l.value && c.value ? (u(), F(fn, {
|
|
4364
4431
|
key: 0,
|
|
4365
4432
|
"selected-widget": l.value,
|
|
4366
|
-
"onUpdate:selectedWidget": w[2] || (w[2] = (
|
|
4433
|
+
"onUpdate:selectedWidget": w[2] || (w[2] = (I) => l.value = I),
|
|
4367
4434
|
"selected-widget-data": b.value,
|
|
4368
4435
|
"current-widget-data": p.value,
|
|
4369
4436
|
"selected-dashboard": i.value,
|
|
4370
4437
|
"dashboard-widgets": c.value.widgets || [],
|
|
4371
4438
|
onUpdateData: x
|
|
4372
|
-
}, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (u(), g("div",
|
|
4373
|
-
c.value ? (u(!0), g(Y, { key: 1 },
|
|
4439
|
+
}, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (u(), g("div", An, [
|
|
4440
|
+
c.value ? (u(!0), g(Y, { key: 1 }, ae(c.value.panels, (I, T) => {
|
|
4374
4441
|
var D, V;
|
|
4375
4442
|
return u(), g("div", {
|
|
4376
|
-
key:
|
|
4377
|
-
class:
|
|
4443
|
+
key: I.widget || ((D = I.widgets) == null ? void 0 : D.join("-")) || T,
|
|
4444
|
+
class: se([`md:col-span-${I.col || 12} col-span-12`, "flex flex-col gap-[10px]"])
|
|
4378
4445
|
}, [
|
|
4379
|
-
(V =
|
|
4380
|
-
onClick: (ee) =>
|
|
4446
|
+
(V = I.widgets) != null && V.length ? (u(!0), g(Y, { key: 0 }, ae(I.widgets, (O) => (u(), F(Ze, {
|
|
4447
|
+
onClick: (ee) => f(O),
|
|
4381
4448
|
"onUpdate:currentWidgetData": w[3] || (w[3] = (ee) => p.value = ee),
|
|
4382
4449
|
key: O,
|
|
4383
4450
|
dashboard: i.value,
|
|
4384
4451
|
widget: O,
|
|
4385
4452
|
selectedWidget: l.value,
|
|
4386
4453
|
"dashboard-widgets": c.value.widgets,
|
|
4387
|
-
height: Number(
|
|
4388
|
-
class:
|
|
4454
|
+
height: Number(I.height ?? 480),
|
|
4455
|
+
class: se({
|
|
4389
4456
|
"border border-blue-500": l.value === O
|
|
4390
4457
|
})
|
|
4391
|
-
}, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (u(),
|
|
4458
|
+
}, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height", "class"]))), 128)) : (u(), F(Ze, {
|
|
4392
4459
|
key: 1,
|
|
4393
|
-
onClick: (O) =>
|
|
4460
|
+
onClick: (O) => f(I.widget),
|
|
4394
4461
|
"onUpdate:currentWidgetData": w[4] || (w[4] = (O) => p.value = O),
|
|
4395
|
-
class:
|
|
4396
|
-
"border border-blue-500": l.value ===
|
|
4462
|
+
class: se(["flex flex-col", {
|
|
4463
|
+
"border border-blue-500": l.value === I.widget
|
|
4397
4464
|
}]),
|
|
4398
4465
|
dashboard: i.value,
|
|
4399
|
-
widget:
|
|
4466
|
+
widget: I.widget,
|
|
4400
4467
|
selectedWidget: l.value,
|
|
4401
4468
|
"dashboard-widgets": c.value.widgets,
|
|
4402
|
-
height: Number(
|
|
4469
|
+
height: Number(I.height ?? 480)
|
|
4403
4470
|
}, null, 8, ["onClick", "class", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "height"]))
|
|
4404
4471
|
], 2);
|
|
4405
|
-
}), 128)) : (u(),
|
|
4472
|
+
}), 128)) : (u(), F(Qe, {
|
|
4406
4473
|
key: 0,
|
|
4407
4474
|
class: "col-span-12"
|
|
4408
4475
|
}))
|
|
@@ -4412,7 +4479,7 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4412
4479
|
], 2);
|
|
4413
4480
|
};
|
|
4414
4481
|
}
|
|
4415
|
-
},
|
|
4482
|
+
}, Mn = /* @__PURE__ */ de(Bn, [["__scopeId", "data-v-9395dbec"]]), Fn = { class: "w-full h-screen" }, qn = /* @__PURE__ */ be({
|
|
4416
4483
|
__name: "vs-editor-page",
|
|
4417
4484
|
props: {
|
|
4418
4485
|
prefix: { default: "/api" },
|
|
@@ -4421,12 +4488,12 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4421
4488
|
},
|
|
4422
4489
|
emits: ["back"],
|
|
4423
4490
|
setup(t) {
|
|
4424
|
-
return (e, s) => (u(), g("div",
|
|
4425
|
-
|
|
4491
|
+
return (e, s) => (u(), g("div", Fn, [
|
|
4492
|
+
W(Mn, {
|
|
4426
4493
|
customClass: "h-full w-full",
|
|
4427
|
-
prefix:
|
|
4428
|
-
"initial-dashboard-id":
|
|
4429
|
-
"initial-widget-id":
|
|
4494
|
+
prefix: t.prefix,
|
|
4495
|
+
"initial-dashboard-id": t.dashboardId,
|
|
4496
|
+
"initial-widget-id": t.widgetId,
|
|
4430
4497
|
onBack: s[0] || (s[0] = (a) => e.$emit("back"))
|
|
4431
4498
|
}, null, 8, ["prefix", "initial-dashboard-id", "initial-widget-id"])
|
|
4432
4499
|
]));
|
|
@@ -4436,7 +4503,7 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4436
4503
|
for (const [a, r] of e)
|
|
4437
4504
|
s[a] = r;
|
|
4438
4505
|
return s;
|
|
4439
|
-
},
|
|
4506
|
+
}, Un = {}, Hn = {
|
|
4440
4507
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4441
4508
|
fill: "none",
|
|
4442
4509
|
viewBox: "0 0 24 24",
|
|
@@ -4444,8 +4511,8 @@ const In = /* @__PURE__ */ de(yn, [["render", zn]]), Tn = { class: "flex-1 min-w
|
|
|
4444
4511
|
stroke: "currentColor",
|
|
4445
4512
|
class: "size-6 text-green-600"
|
|
4446
4513
|
};
|
|
4447
|
-
function
|
|
4448
|
-
return u(), g("svg",
|
|
4514
|
+
function Gn(t, e) {
|
|
4515
|
+
return u(), g("svg", Hn, [...e[0] || (e[0] = [
|
|
4449
4516
|
d("path", {
|
|
4450
4517
|
"stroke-linecap": "round",
|
|
4451
4518
|
"stroke-linejoin": "round",
|
|
@@ -4453,7 +4520,7 @@ function Un(t, e) {
|
|
|
4453
4520
|
}, null, -1)
|
|
4454
4521
|
])]);
|
|
4455
4522
|
}
|
|
4456
|
-
const
|
|
4523
|
+
const Zn = /* @__PURE__ */ ve(Un, [["render", Gn]]), Qn = {}, Xn = {
|
|
4457
4524
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4458
4525
|
fill: "none",
|
|
4459
4526
|
viewBox: "0 0 24 24",
|
|
@@ -4461,8 +4528,8 @@ const Hn = /* @__PURE__ */ ve(Mn, [["render", Un]]), Gn = {}, Zn = {
|
|
|
4461
4528
|
stroke: "orange",
|
|
4462
4529
|
class: "size-6 text-orange-600"
|
|
4463
4530
|
};
|
|
4464
|
-
function
|
|
4465
|
-
return u(), g("svg",
|
|
4531
|
+
function Jn(t, e) {
|
|
4532
|
+
return u(), g("svg", Xn, [...e[0] || (e[0] = [
|
|
4466
4533
|
d("path", {
|
|
4467
4534
|
"stroke-linecap": "round",
|
|
4468
4535
|
"stroke-linejoin": "round",
|
|
@@ -4470,7 +4537,7 @@ function Qn(t, e) {
|
|
|
4470
4537
|
}, null, -1)
|
|
4471
4538
|
])]);
|
|
4472
4539
|
}
|
|
4473
|
-
const
|
|
4540
|
+
const Kn = /* @__PURE__ */ ve(Qn, [["render", Jn]]), Yn = {}, eo = {
|
|
4474
4541
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4475
4542
|
fill: "none",
|
|
4476
4543
|
viewBox: "0 0 24 24",
|
|
@@ -4478,8 +4545,8 @@ const Xn = /* @__PURE__ */ ve(Gn, [["render", Qn]]), Jn = {}, Kn = {
|
|
|
4478
4545
|
stroke: "currentColor",
|
|
4479
4546
|
class: "size-6 text-blue-600"
|
|
4480
4547
|
};
|
|
4481
|
-
function
|
|
4482
|
-
return u(), g("svg",
|
|
4548
|
+
function to(t, e) {
|
|
4549
|
+
return u(), g("svg", eo, [...e[0] || (e[0] = [
|
|
4483
4550
|
d("path", {
|
|
4484
4551
|
"stroke-linecap": "round",
|
|
4485
4552
|
"stroke-linejoin": "round",
|
|
@@ -4487,7 +4554,7 @@ function Yn(t, e) {
|
|
|
4487
4554
|
}, null, -1)
|
|
4488
4555
|
])]);
|
|
4489
4556
|
}
|
|
4490
|
-
const
|
|
4557
|
+
const so = /* @__PURE__ */ ve(Yn, [["render", to]]), ao = {}, ro = {
|
|
4491
4558
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4492
4559
|
fill: "none",
|
|
4493
4560
|
viewBox: "0 0 24 24",
|
|
@@ -4495,8 +4562,8 @@ const eo = /* @__PURE__ */ ve(Jn, [["render", Yn]]), to = {}, so = {
|
|
|
4495
4562
|
stroke: "red",
|
|
4496
4563
|
class: "size-6 text-red-600"
|
|
4497
4564
|
};
|
|
4498
|
-
function
|
|
4499
|
-
return u(), g("svg",
|
|
4565
|
+
function no(t, e) {
|
|
4566
|
+
return u(), g("svg", ro, [...e[0] || (e[0] = [
|
|
4500
4567
|
d("path", {
|
|
4501
4568
|
"stroke-linecap": "round",
|
|
4502
4569
|
"stroke-linejoin": "round",
|
|
@@ -4504,7 +4571,7 @@ function ao(t, e) {
|
|
|
4504
4571
|
}, null, -1)
|
|
4505
4572
|
])]);
|
|
4506
4573
|
}
|
|
4507
|
-
const
|
|
4574
|
+
const oo = /* @__PURE__ */ ve(ao, [["render", no]]), io = { class: "rounded-md border border-gray-300 bg-white p-4 shadow-sm" }, lo = { class: "flex items-start gap-4 opacity-100 scale-5 transition-all duration-300" }, co = { class: "flex-1" }, uo = { class: "font-medium text-gray-900" }, po = { class: "mt-0.5 text-sm text-gray-700" }, ho = /* @__PURE__ */ be({
|
|
4508
4575
|
__name: "vs-notify",
|
|
4509
4576
|
props: {
|
|
4510
4577
|
type: {},
|
|
@@ -4513,17 +4580,17 @@ const ro = /* @__PURE__ */ ve(to, [["render", ao]]), no = { class: "rounded-md b
|
|
|
4513
4580
|
},
|
|
4514
4581
|
setup(t) {
|
|
4515
4582
|
const e = {
|
|
4516
|
-
success:
|
|
4517
|
-
warning:
|
|
4518
|
-
error:
|
|
4519
|
-
info:
|
|
4583
|
+
success: Zn,
|
|
4584
|
+
warning: Kn,
|
|
4585
|
+
error: oo,
|
|
4586
|
+
info: so
|
|
4520
4587
|
};
|
|
4521
|
-
return (s, a) => (u(), g("div",
|
|
4522
|
-
d("div",
|
|
4523
|
-
(u(),
|
|
4524
|
-
d("div",
|
|
4525
|
-
d("strong",
|
|
4526
|
-
d("p",
|
|
4588
|
+
return (s, a) => (u(), g("div", io, [
|
|
4589
|
+
d("div", lo, [
|
|
4590
|
+
(u(), F(ct(e[s.type]))),
|
|
4591
|
+
d("div", co, [
|
|
4592
|
+
d("strong", uo, P(s.title), 1),
|
|
4593
|
+
d("p", po, P(s.message), 1)
|
|
4527
4594
|
]),
|
|
4528
4595
|
a[0] || (a[0] = d("button", {
|
|
4529
4596
|
class: "m-3 rounded-full p-1.5 text-gray-500 transition-colors hover:bg-gray-50 hover:text-gray-700",
|
|
@@ -4554,7 +4621,7 @@ const ro = /* @__PURE__ */ ve(to, [["render", ao]]), no = { class: "rounded-md b
|
|
|
4554
4621
|
"left-bottom": "bottom-4 left-4 transform",
|
|
4555
4622
|
"right-bottom": "bottom-4 right-4 transform",
|
|
4556
4623
|
bottom: "bottom-4 left-1/2 transform -translate-x-1/2"
|
|
4557
|
-
},
|
|
4624
|
+
}, fo = (t) => {
|
|
4558
4625
|
var l;
|
|
4559
4626
|
const {
|
|
4560
4627
|
type: e = "info",
|
|
@@ -4568,9 +4635,9 @@ const ro = /* @__PURE__ */ ve(to, [["render", ao]]), no = { class: "rounded-md b
|
|
|
4568
4635
|
}), o.classList.add(...qe[r].split(" ")));
|
|
4569
4636
|
const n = document.createElement("div");
|
|
4570
4637
|
o.appendChild(n);
|
|
4571
|
-
const i =
|
|
4638
|
+
const i = zs({
|
|
4572
4639
|
render() {
|
|
4573
|
-
return Ue(
|
|
4640
|
+
return Ue(ho, {
|
|
4574
4641
|
type: e,
|
|
4575
4642
|
title: s,
|
|
4576
4643
|
message: a,
|
|
@@ -4668,7 +4735,7 @@ be({
|
|
|
4668
4735
|
message: ((r = this.notifyOptions) == null ? void 0 : r.message) ?? t,
|
|
4669
4736
|
position: (o = this.notifyOptions) == null ? void 0 : o.position
|
|
4670
4737
|
};
|
|
4671
|
-
|
|
4738
|
+
fo(e);
|
|
4672
4739
|
}
|
|
4673
4740
|
}
|
|
4674
4741
|
});
|
|
@@ -4713,14 +4780,14 @@ be({
|
|
|
4713
4780
|
}
|
|
4714
4781
|
}
|
|
4715
4782
|
});
|
|
4716
|
-
const
|
|
4783
|
+
const go = {}, mo = {
|
|
4717
4784
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4718
4785
|
class: "w-6 h-6",
|
|
4719
4786
|
viewBox: "0 0 20 20",
|
|
4720
4787
|
fill: "currentColor"
|
|
4721
4788
|
};
|
|
4722
|
-
function
|
|
4723
|
-
return u(), g("svg",
|
|
4789
|
+
function bo(t, e) {
|
|
4790
|
+
return u(), g("svg", mo, [...e[0] || (e[0] = [
|
|
4724
4791
|
d("path", {
|
|
4725
4792
|
"fill-rule": "evenodd",
|
|
4726
4793
|
d: "M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",
|
|
@@ -4728,14 +4795,14 @@ function go(t, e) {
|
|
|
4728
4795
|
}, null, -1)
|
|
4729
4796
|
])]);
|
|
4730
4797
|
}
|
|
4731
|
-
const
|
|
4798
|
+
const xo = /* @__PURE__ */ ve(go, [["render", bo]]), yo = {}, vo = {
|
|
4732
4799
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4733
4800
|
class: "w-6 h-6",
|
|
4734
4801
|
viewBox: "0 0 20 20",
|
|
4735
4802
|
fill: "currentColor"
|
|
4736
4803
|
};
|
|
4737
|
-
function
|
|
4738
|
-
return u(), g("svg",
|
|
4804
|
+
function wo(t, e) {
|
|
4805
|
+
return u(), g("svg", vo, [...e[0] || (e[0] = [
|
|
4739
4806
|
d("path", {
|
|
4740
4807
|
"fill-rule": "evenodd",
|
|
4741
4808
|
d: "M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",
|
|
@@ -4743,7 +4810,7 @@ function yo(t, e) {
|
|
|
4743
4810
|
}, null, -1)
|
|
4744
4811
|
])]);
|
|
4745
4812
|
}
|
|
4746
|
-
const
|
|
4813
|
+
const ko = /* @__PURE__ */ ve(yo, [["render", wo]]), _o = {}, $o = {
|
|
4747
4814
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4748
4815
|
viewBox: "0 0 24 24",
|
|
4749
4816
|
fill: "none",
|
|
@@ -4755,8 +4822,8 @@ const vo = /* @__PURE__ */ ve(bo, [["render", yo]]), wo = {}, ko = {
|
|
|
4755
4822
|
height: "16",
|
|
4756
4823
|
width: "16"
|
|
4757
4824
|
};
|
|
4758
|
-
function
|
|
4759
|
-
return u(), g("svg",
|
|
4825
|
+
function Do(t, e) {
|
|
4826
|
+
return u(), g("svg", $o, [...e[0] || (e[0] = [
|
|
4760
4827
|
d("path", {
|
|
4761
4828
|
stroke: "none",
|
|
4762
4829
|
d: "M0 0h24v24H0z",
|
|
@@ -4765,7 +4832,7 @@ function _o(t, e) {
|
|
|
4765
4832
|
d("path", { d: "M6 9l6 6l6 -6" }, null, -1)
|
|
4766
4833
|
])]);
|
|
4767
4834
|
}
|
|
4768
|
-
const
|
|
4835
|
+
const Co = /* @__PURE__ */ ve(_o, [["render", Do]]), To = {}, zo = {
|
|
4769
4836
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4770
4837
|
viewBox: "0 0 24 24",
|
|
4771
4838
|
fill: "none",
|
|
@@ -4777,8 +4844,8 @@ const $o = /* @__PURE__ */ ve(wo, [["render", _o]]), Do = {}, Co = {
|
|
|
4777
4844
|
width: "14",
|
|
4778
4845
|
height: "14"
|
|
4779
4846
|
};
|
|
4780
|
-
function
|
|
4781
|
-
return u(), g("svg",
|
|
4847
|
+
function Io(t, e) {
|
|
4848
|
+
return u(), g("svg", zo, [...e[0] || (e[0] = [
|
|
4782
4849
|
d("path", {
|
|
4783
4850
|
stroke: "none",
|
|
4784
4851
|
d: "M0 0h24v24H0z",
|
|
@@ -4787,22 +4854,22 @@ function zo(t, e) {
|
|
|
4787
4854
|
d("path", { d: "M5 12l5 5l10 -10" }, null, -1)
|
|
4788
4855
|
])]);
|
|
4789
4856
|
}
|
|
4790
|
-
const
|
|
4857
|
+
const So = /* @__PURE__ */ ve(To, [["render", Io]]), Lo = { class: "flex items-center justify-between w-full" }, Eo = { class: "m-0 flex list-none justify-center gap-1 p-0 text-gray-900" }, Wo = ["onClick"], Ro = {
|
|
4791
4858
|
key: 1,
|
|
4792
4859
|
class: "flex size-7 items-center justify-center px-1 text-gray-500 select-none",
|
|
4793
4860
|
"aria-hidden": "true"
|
|
4794
|
-
},
|
|
4861
|
+
}, jo = { key: 1 }, Vo = { for: "Page" }, No = ["value", "max"], Po = {
|
|
4795
4862
|
key: 2,
|
|
4796
4863
|
class: "text-sm/8 font-medium tracking-widest"
|
|
4797
|
-
},
|
|
4864
|
+
}, Oo = {
|
|
4798
4865
|
key: 0,
|
|
4799
4866
|
class: "flex justify-center items-center gap-x-5 ml-3"
|
|
4800
|
-
},
|
|
4867
|
+
}, Ao = {
|
|
4801
4868
|
class: "hs-dropdown-menu z-50 bg-white shadow-md rounded-lg p-1 space-y-0.5 dark:bg-neutral-800 dark:border dark:border-neutral-700 right-0 dark:divide-neutral-700 absolute bottom-[100%]",
|
|
4802
4869
|
role: "menu",
|
|
4803
4870
|
"aria-orientation": "vertical",
|
|
4804
4871
|
"aria-labelledby": "dropdown-button"
|
|
4805
|
-
},
|
|
4872
|
+
}, Bo = ["onClick"], Mo = /* @__PURE__ */ be({
|
|
4806
4873
|
__name: "vs-pagination",
|
|
4807
4874
|
props: {
|
|
4808
4875
|
pageSize: {},
|
|
@@ -4817,19 +4884,19 @@ const Io = /* @__PURE__ */ ve(Do, [["render", zo]]), To = { class: "flex items-c
|
|
|
4817
4884
|
},
|
|
4818
4885
|
emits: ["update:page", "pageChange", "pageSizeChange"],
|
|
4819
4886
|
setup(t, { emit: e }) {
|
|
4820
|
-
const s = t, a = e, r = S(s.page), o =
|
|
4887
|
+
const s = t, a = e, r = S(s.page), o = M(() => Math.ceil(s.total / s.pageSize)), n = M(() => {
|
|
4821
4888
|
const y = Math.floor(s.pageRange / 2);
|
|
4822
|
-
let
|
|
4823
|
-
|
|
4889
|
+
let z = r.value - y, $ = r.value + y;
|
|
4890
|
+
z < 1 && ($ += 1 - z, z = 1), $ > o.value && (z -= $ - o.value, $ = o.value), z = Math.max(1, z);
|
|
4824
4891
|
const w = [];
|
|
4825
|
-
for (let
|
|
4826
|
-
w.push(
|
|
4892
|
+
for (let R = z; R <= $; R += 1)
|
|
4893
|
+
w.push(R);
|
|
4827
4894
|
return w;
|
|
4828
|
-
}), i =
|
|
4829
|
-
const y = n.value,
|
|
4830
|
-
if (
|
|
4831
|
-
const $ = y.length > 0 && y[0] > 1, w = y.length > 0 && y[y.length - 1] <
|
|
4832
|
-
return $ && (
|
|
4895
|
+
}), i = M(() => {
|
|
4896
|
+
const y = n.value, z = o.value;
|
|
4897
|
+
if (z <= 1) return y.map((B) => ({ type: "page", value: B }));
|
|
4898
|
+
const $ = y.length > 0 && y[0] > 1, w = y.length > 0 && y[y.length - 1] < z, R = [];
|
|
4899
|
+
return $ && (R.push({ type: "page", value: 1 }), R.push({ type: "ellipsis" })), y.forEach((B) => R.push({ type: "page", value: B })), w && (R.push({ type: "ellipsis" }), R.push({ type: "page", value: z })), R;
|
|
4833
4900
|
}), l = (y) => {
|
|
4834
4901
|
r.value = y, a("update:page", y), a("pageChange", y);
|
|
4835
4902
|
}, c = () => {
|
|
@@ -4837,87 +4904,87 @@ const Io = /* @__PURE__ */ ve(Do, [["render", zo]]), To = { class: "flex items-c
|
|
|
4837
4904
|
}, p = () => {
|
|
4838
4905
|
r.value < o.value && l(r.value + 1);
|
|
4839
4906
|
};
|
|
4840
|
-
|
|
4907
|
+
ie(() => s.page, (y) => {
|
|
4841
4908
|
r.value = y;
|
|
4842
4909
|
});
|
|
4843
|
-
const
|
|
4844
|
-
|
|
4845
|
-
|
|
4910
|
+
const h = S(s.pageSize), x = S(!1), b = S(null);
|
|
4911
|
+
ie(() => s.pageSize, (y) => {
|
|
4912
|
+
h.value = y;
|
|
4846
4913
|
});
|
|
4847
|
-
const
|
|
4848
|
-
|
|
4914
|
+
const f = (y = h.value) => {
|
|
4915
|
+
h.value = y, x.value = !1, r.value = 1, a("update:page", r.value), a("pageSizeChange", h.value);
|
|
4849
4916
|
}, v = (y) => {
|
|
4850
4917
|
if (!x.value) return;
|
|
4851
|
-
const
|
|
4852
|
-
b.value &&
|
|
4918
|
+
const z = y.target;
|
|
4919
|
+
b.value && z && !b.value.contains(z) && (x.value = !1);
|
|
4853
4920
|
};
|
|
4854
4921
|
return me(() => {
|
|
4855
4922
|
document.addEventListener("click", v);
|
|
4856
|
-
}),
|
|
4923
|
+
}), Is(() => {
|
|
4857
4924
|
document.removeEventListener("click", v);
|
|
4858
|
-
}), (y,
|
|
4859
|
-
d("ul",
|
|
4925
|
+
}), (y, z) => (u(), g("div", Lo, [
|
|
4926
|
+
d("ul", Eo, [
|
|
4860
4927
|
d("li", null, [
|
|
4861
4928
|
d("button", {
|
|
4862
|
-
class:
|
|
4929
|
+
class: se(["grid size-7 cursor-pointer place-content-center rounded border border-gray-200 transition-colors hover:bg-gray-50 rtl:rotate-180", { "opacity-50 pointer-events-none": r.value === 1 }]),
|
|
4863
4930
|
"aria-label": "Previous page",
|
|
4864
4931
|
onClick: c
|
|
4865
4932
|
}, [
|
|
4866
|
-
|
|
4933
|
+
W(xo)
|
|
4867
4934
|
], 2)
|
|
4868
4935
|
]),
|
|
4869
|
-
y.view === "button" ? (u(!0), g(Y, { key: 0 },
|
|
4936
|
+
y.view === "button" ? (u(!0), g(Y, { key: 0 }, ae(i.value, ($, w) => (u(), g(Y, {
|
|
4870
4937
|
key: $.type === "page" ? $.value : `ellipsis-${w}`
|
|
4871
4938
|
}, [
|
|
4872
4939
|
$.type === "page" ? (u(), g("li", {
|
|
4873
4940
|
key: 0,
|
|
4874
|
-
class:
|
|
4941
|
+
class: se([[
|
|
4875
4942
|
`size-${s.size} text-sm/${s.size} px-1.5`,
|
|
4876
4943
|
$.value === r.value && y.color ? `bg-[${y.color}]` : "",
|
|
4877
4944
|
$.value === r.value ? `block rounded border border-${y.color}-600 text-center font-medium text-white` : "block rounded border border-gray-200 text-center font-medium transition-colors hover:bg-gray-50"
|
|
4878
4945
|
], "cursor-pointer"]),
|
|
4879
|
-
onClick: (
|
|
4880
|
-
}, P($.value), 11,
|
|
4881
|
-
], 64))), 128)) : y.view === "input" ? (u(), g("li",
|
|
4882
|
-
d("label",
|
|
4883
|
-
|
|
4946
|
+
onClick: (R) => l($.value)
|
|
4947
|
+
}, P($.value), 11, Wo)) : (u(), g("li", Ro, " … "))
|
|
4948
|
+
], 64))), 128)) : y.view === "input" ? (u(), g("li", jo, [
|
|
4949
|
+
d("label", Vo, [
|
|
4950
|
+
z[2] || (z[2] = d("span", { class: "sr-only" }, " Page ", -1)),
|
|
4884
4951
|
d("input", {
|
|
4885
4952
|
type: "number",
|
|
4886
4953
|
id: "Page",
|
|
4887
4954
|
value: r.value,
|
|
4888
4955
|
min: "1",
|
|
4889
4956
|
max: o.value,
|
|
4890
|
-
onInput:
|
|
4957
|
+
onInput: z[0] || (z[0] = ($) => l(Number($))),
|
|
4891
4958
|
class: "pagination-input block h-8 w-16 rounded border border-gray-300 px-3 py-2 text-base leading-6 shadow-sm focus:border-indigo-500 focus:ring-indigo-500"
|
|
4892
|
-
}, null, 40,
|
|
4959
|
+
}, null, 40, No)
|
|
4893
4960
|
])
|
|
4894
|
-
])) : y.view === "xy" ? (u(), g("li",
|
|
4961
|
+
])) : y.view === "xy" ? (u(), g("li", Po, P(r.value) + "/" + P(o.value), 1)) : U("", !0),
|
|
4895
4962
|
d("li", null, [
|
|
4896
4963
|
d("button", {
|
|
4897
4964
|
onClick: p,
|
|
4898
|
-
class:
|
|
4965
|
+
class: se(["grid size-7 cursor-pointer place-content-center rounded border border-gray-200 transition-colors hover:bg-gray-50 rtl:rotate-180", { "opacity-50 pointer-events-none": r.value === o.value }]),
|
|
4899
4966
|
"aria-label": "Next page"
|
|
4900
4967
|
}, [
|
|
4901
|
-
|
|
4968
|
+
W(ko)
|
|
4902
4969
|
], 2)
|
|
4903
4970
|
])
|
|
4904
4971
|
]),
|
|
4905
|
-
y.showPageSizes ? (u(), g("div",
|
|
4972
|
+
y.showPageSizes ? (u(), g("div", Oo, [
|
|
4906
4973
|
d("div", {
|
|
4907
4974
|
class: "relative",
|
|
4908
4975
|
ref_key: "dropdownRef",
|
|
4909
4976
|
ref: b
|
|
4910
4977
|
}, [
|
|
4911
|
-
Ge(d("div",
|
|
4912
|
-
(u(!0), g(Y, null,
|
|
4978
|
+
Ge(d("div", Ao, [
|
|
4979
|
+
(u(!0), g(Y, null, ae(y.pageSizes, ($) => (u(), g("button", {
|
|
4913
4980
|
type: "button",
|
|
4914
4981
|
key: $,
|
|
4915
|
-
onClick: (w) =>
|
|
4982
|
+
onClick: (w) => f($),
|
|
4916
4983
|
class: "flex w-full items-center gap-x-3.5 rounded-lg px-3 py-2 text-sm text-gray-800 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none dark:text-neutral-400 dark:hover:bg-neutral-700 dark:hover:text-neutral-300 dark:focus:bg-neutral-700"
|
|
4917
4984
|
}, [
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
], 8,
|
|
4985
|
+
oe(P($) + " ", 1),
|
|
4986
|
+
h.value === $ ? (u(), F(So, { key: 0 })) : U("", !0)
|
|
4987
|
+
], 8, Bo))), 128))
|
|
4921
4988
|
], 512), [
|
|
4922
4989
|
[Ss, x.value]
|
|
4923
4990
|
]),
|
|
@@ -4927,31 +4994,31 @@ const Io = /* @__PURE__ */ ve(Do, [["render", zo]]), To = { class: "flex items-c
|
|
|
4927
4994
|
"aria-haspopup": "menu",
|
|
4928
4995
|
"aria-expanded": "false",
|
|
4929
4996
|
"aria-label": "Dropdown",
|
|
4930
|
-
onClick:
|
|
4997
|
+
onClick: z[1] || (z[1] = ($) => x.value = !x.value)
|
|
4931
4998
|
}, [
|
|
4932
|
-
|
|
4933
|
-
|
|
4999
|
+
oe(P(h.value) + " ", 1),
|
|
5000
|
+
W(Co)
|
|
4934
5001
|
])
|
|
4935
5002
|
], 512)
|
|
4936
|
-
])) :
|
|
5003
|
+
])) : U("", !0)
|
|
4937
5004
|
]));
|
|
4938
5005
|
}
|
|
4939
|
-
}),
|
|
4940
|
-
|
|
4941
|
-
const
|
|
5006
|
+
}), Fo = /* @__PURE__ */ ve(Mo, [["__scopeId", "data-v-36d0267f"]]);
|
|
5007
|
+
Ts({ visible: !0 });
|
|
5008
|
+
const qo = { class: "relative group h-full" }, Uo = { class: "flex items-start gap-3 flex-1 min-h-0" }, Ho = { class: "p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0" }, Go = { class: "flex-1 min-w-0 flex flex-col min-h-0" }, Zo = { class: "font-semibold text-gray-900 mb-1 truncate" }, Qo = {
|
|
4942
5009
|
key: 0,
|
|
4943
5010
|
class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"
|
|
4944
|
-
},
|
|
5011
|
+
}, Xo = {
|
|
4945
5012
|
key: 1,
|
|
4946
5013
|
class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible",
|
|
4947
5014
|
"aria-hidden": "true"
|
|
4948
|
-
},
|
|
5015
|
+
}, Jo = {
|
|
4949
5016
|
key: 2,
|
|
4950
5017
|
class: "text-sm text-gray-400 mt-1 shrink-0"
|
|
4951
|
-
},
|
|
5018
|
+
}, Ko = {
|
|
4952
5019
|
key: 3,
|
|
4953
5020
|
class: "text-xs text-gray-400 mt-2 shrink-0"
|
|
4954
|
-
},
|
|
5021
|
+
}, Yo = {
|
|
4955
5022
|
__name: "dashboard-card",
|
|
4956
5023
|
props: {
|
|
4957
5024
|
title: String,
|
|
@@ -4964,7 +5031,7 @@ const Fo = { class: "relative group h-full" }, Mo = { class: "flex items-start g
|
|
|
4964
5031
|
onOpenEditor: Function
|
|
4965
5032
|
},
|
|
4966
5033
|
setup(t) {
|
|
4967
|
-
const e = t, s =
|
|
5034
|
+
const e = t, s = M(() => lt(e.lastUpdate ?? null)), a = Le(), r = S(!1);
|
|
4968
5035
|
function o() {
|
|
4969
5036
|
e.dashboardRouteName && (a.hasRoute(ce.EditorDashboard) ? a.push({
|
|
4970
5037
|
name: ce.EditorDashboard,
|
|
@@ -4974,30 +5041,30 @@ const Fo = { class: "relative group h-full" }, Mo = { class: "flex items-start g
|
|
|
4974
5041
|
function n(i) {
|
|
4975
5042
|
i.target.closest(".dashboard-card-menu") || (r.value = !1);
|
|
4976
5043
|
}
|
|
4977
|
-
return me(() => document.addEventListener("click", n)), Oe(() => document.removeEventListener("click", n)), (i, l) => (u(), g("div",
|
|
5044
|
+
return me(() => document.addEventListener("click", n)), Oe(() => document.removeEventListener("click", n)), (i, l) => (u(), g("div", qo, [
|
|
4978
5045
|
d("button", {
|
|
4979
5046
|
type: "button",
|
|
4980
5047
|
class: "w-full h-full bg-white border border-gray-200 rounded-lg p-6 hover:shadow-md hover:border-blue-200 transition-all text-left animate-fade-in flex flex-col",
|
|
4981
5048
|
onClick: o
|
|
4982
5049
|
}, [
|
|
4983
|
-
d("div",
|
|
4984
|
-
d("div",
|
|
4985
|
-
|
|
5050
|
+
d("div", Uo, [
|
|
5051
|
+
d("div", Ho, [
|
|
5052
|
+
W(H(Fs), {
|
|
4986
5053
|
size: 24,
|
|
4987
5054
|
class: "w-5 h-5 text-blue-600"
|
|
4988
5055
|
})
|
|
4989
5056
|
]),
|
|
4990
|
-
d("div",
|
|
4991
|
-
d("h3",
|
|
4992
|
-
t.description ? (u(), g("p",
|
|
4993
|
-
t.widgetCount != null ? (u(), g("p",
|
|
4994
|
-
s.value ? (u(), g("p",
|
|
5057
|
+
d("div", Go, [
|
|
5058
|
+
d("h3", Zo, P(t.title), 1),
|
|
5059
|
+
t.description ? (u(), g("p", Qo, P(t.description), 1)) : (u(), g("p", Xo, " ")),
|
|
5060
|
+
t.widgetCount != null ? (u(), g("p", Jo, P(t.widgetCount) + " віджетів ", 1)) : U("", !0),
|
|
5061
|
+
s.value ? (u(), g("p", Ko, " Оновлено: " + P(s.value), 1)) : U("", !0)
|
|
4995
5062
|
])
|
|
4996
5063
|
])
|
|
4997
5064
|
])
|
|
4998
5065
|
]));
|
|
4999
5066
|
}
|
|
5000
|
-
},
|
|
5067
|
+
}, ei = /* @__PURE__ */ de(Yo, [["__scopeId", "data-v-6f582e09"]]), ti = [
|
|
5001
5068
|
{ type: "Text", key: "name", label: "Назва", validators: ["required"], original: { type: "Text", ua: "Назва", col: 8 } },
|
|
5002
5069
|
{ type: "Text", key: "title", label: "Заголовок", validators: ["required"], original: { type: "Text", ua: "Титул", col: 8 } },
|
|
5003
5070
|
{ type: "Text", key: "description", label: "Опис", original: { type: "Text", ua: "Назва", col: 8 } },
|
|
@@ -5007,28 +5074,28 @@ const Fo = { class: "relative group h-full" }, Mo = { class: "flex items-start g
|
|
|
5007
5074
|
{ type: "Text", key: "category", label: "Категорія", original: { type: "Text", ua: "Категорія", col: 8 } },
|
|
5008
5075
|
{ type: "Switcher", key: "public", label: "Публічний", original: { type: "Text", ua: "Назва", col: 8 } }
|
|
5009
5076
|
];
|
|
5010
|
-
function
|
|
5077
|
+
function si(t) {
|
|
5011
5078
|
return !Array.isArray(t) || t.length === 0 ? {} : t.reduce((e, s) => {
|
|
5012
5079
|
if (!s || s.key == null) return e;
|
|
5013
5080
|
const { key: a, ...r } = s;
|
|
5014
5081
|
return e[a] = r, e;
|
|
5015
5082
|
}, {});
|
|
5016
5083
|
}
|
|
5017
|
-
const
|
|
5084
|
+
const ai = { class: "flex-1 bg-gray-50" }, ri = { class: "max-w-7xl mx-auto px-6 py-8" }, ni = { class: "mb-6" }, oi = { class: "flex items-start sm:items-center justify-between mb-6 gap-2" }, ii = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, li = { class: "flex items-center space-x-4" }, di = { class: "flex-1 relative" }, ci = { class: "relative" }, ui = { class: "relative min-h-[280px]" }, pi = {
|
|
5018
5085
|
key: 0,
|
|
5019
5086
|
class: "absolute inset-0 z-10 flex items-center justify-center rounded-xl bg-white/55 backdrop-blur-[2px]",
|
|
5020
5087
|
"aria-busy": "true",
|
|
5021
5088
|
"aria-live": "polite"
|
|
5022
|
-
},
|
|
5089
|
+
}, hi = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, fi = { class: "mt-[20px]" }, gi = {
|
|
5023
5090
|
key: 2,
|
|
5024
5091
|
class: "flex flex-col items-center justify-center py-20 text-center"
|
|
5025
|
-
},
|
|
5092
|
+
}, mi = { class: "mt-1 text-sm text-gray-400" }, bi = { class: "font-medium text-gray-500" }, xi = /* @__PURE__ */ be({
|
|
5026
5093
|
__name: "all-dashboards-page",
|
|
5027
5094
|
props: {
|
|
5028
5095
|
prefix: {}
|
|
5029
5096
|
},
|
|
5030
5097
|
setup(t) {
|
|
5031
|
-
const e = te(() => import("@opengis/form")), s =
|
|
5098
|
+
const e = te(() => import("@opengis/form")), s = si(ti), a = S([]), r = S([]), o = Le(), n = as();
|
|
5032
5099
|
function i(L) {
|
|
5033
5100
|
const C = Array.isArray(L) ? L[0] : L, A = typeof C == "string" ? parseInt(C, 10) : NaN;
|
|
5034
5101
|
return !Number.isNaN(A) && A >= 1 ? A : 1;
|
|
@@ -5041,18 +5108,18 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5041
5108
|
const C = L.trim().toLowerCase();
|
|
5042
5109
|
return C ? C.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") : "";
|
|
5043
5110
|
}
|
|
5044
|
-
const p = ss("biSetDashboard", void 0),
|
|
5111
|
+
const p = ss("biSetDashboard", void 0), h = t, x = S(null), b = S(!1), f = S({}), v = S(""), y = S("title-asc"), z = S(18), $ = S(0), w = S(1), R = S(!1), B = M(() => {
|
|
5045
5112
|
const L = y.value === "title-asc" ? 1 : -1;
|
|
5046
5113
|
return [...a.value].sort((C, A) => L * C.title.localeCompare(A.title, "uk"));
|
|
5047
5114
|
});
|
|
5048
|
-
async function
|
|
5049
|
-
|
|
5115
|
+
async function I() {
|
|
5116
|
+
R.value = !0;
|
|
5050
5117
|
try {
|
|
5051
|
-
const L = c(v.value), C = await
|
|
5118
|
+
const L = c(v.value), C = await re.get("/bi-dashboard", {
|
|
5052
5119
|
params: {
|
|
5053
5120
|
type: "db",
|
|
5054
5121
|
page: w.value,
|
|
5055
|
-
limit:
|
|
5122
|
+
limit: z.value,
|
|
5056
5123
|
...L ? { search: L } : {}
|
|
5057
5124
|
}
|
|
5058
5125
|
}), A = Array.isArray(C == null ? void 0 : C.rows) ? C.rows : [];
|
|
@@ -5066,28 +5133,28 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5066
5133
|
} catch (L) {
|
|
5067
5134
|
console.error("Failed to load dashboards", L), r.value = [], a.value = [];
|
|
5068
5135
|
} finally {
|
|
5069
|
-
|
|
5136
|
+
R.value = !1;
|
|
5070
5137
|
}
|
|
5071
5138
|
}
|
|
5072
|
-
async function
|
|
5139
|
+
async function T() {
|
|
5073
5140
|
var C, A, Z;
|
|
5074
|
-
const L = (A = (C =
|
|
5141
|
+
const L = (A = (C = Te()) == null ? void 0 : C.proxy) == null ? void 0 : A.$notify;
|
|
5075
5142
|
try {
|
|
5076
5143
|
const m = (Z = x.value) == null ? void 0 : Z.validate();
|
|
5077
5144
|
typeof m == "function" && await m();
|
|
5078
|
-
const { name: _, title: k, table_name: j } =
|
|
5145
|
+
const { name: _, title: k, table_name: j } = f.value;
|
|
5079
5146
|
if (!_ || !k || !j) {
|
|
5080
5147
|
L == null || L({ type: "error", title: "Помилка!", message: "Заповніть усі обов'язкові поля" });
|
|
5081
5148
|
return;
|
|
5082
5149
|
}
|
|
5083
|
-
await
|
|
5150
|
+
await re.post("/bi-dashboard", f.value), b.value = !1, f.value = {}, L == null || L({
|
|
5084
5151
|
type: "success",
|
|
5085
5152
|
title: "Успішно!",
|
|
5086
5153
|
message: "Дашборд створено успішно"
|
|
5087
5154
|
}), o.hasRoute(ce.EditorDashboard) ? o.push({
|
|
5088
5155
|
name: ce.EditorDashboard,
|
|
5089
5156
|
params: { dashboardId: _ }
|
|
5090
|
-
}) : p ? p(_) : await
|
|
5157
|
+
}) : p ? p(_) : await I();
|
|
5091
5158
|
} catch {
|
|
5092
5159
|
L == null || L({
|
|
5093
5160
|
type: "error",
|
|
@@ -5098,8 +5165,8 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5098
5165
|
}
|
|
5099
5166
|
let D = null;
|
|
5100
5167
|
me(() => {
|
|
5101
|
-
tt(
|
|
5102
|
-
}),
|
|
5168
|
+
tt(h.prefix || "/api"), w.value = i(n.query.page), v.value = l(n.query.search), I();
|
|
5169
|
+
}), ie(v, (L) => {
|
|
5103
5170
|
D && clearTimeout(D), D = setTimeout(() => {
|
|
5104
5171
|
D = null;
|
|
5105
5172
|
const C = L.trim(), A = l(n.query.search);
|
|
@@ -5107,11 +5174,11 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5107
5174
|
const Z = { ...n.query };
|
|
5108
5175
|
C ? Z.search = C : delete Z.search, delete Z.page, o.replace({ query: Z });
|
|
5109
5176
|
}, 300);
|
|
5110
|
-
}),
|
|
5177
|
+
}), ie(
|
|
5111
5178
|
() => [n.query.page, n.query.search],
|
|
5112
5179
|
() => {
|
|
5113
5180
|
const L = i(n.query.page), C = l(n.query.search);
|
|
5114
|
-
w.value = L, v.value = C,
|
|
5181
|
+
w.value = L, v.value = C, I();
|
|
5115
5182
|
}
|
|
5116
5183
|
);
|
|
5117
5184
|
const V = S(1), O = () => {
|
|
@@ -5123,7 +5190,7 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5123
5190
|
}), Oe(() => {
|
|
5124
5191
|
D && clearTimeout(D), window.removeEventListener("resize", O);
|
|
5125
5192
|
});
|
|
5126
|
-
const ee = (L) => L ? L.trim().length > 70 ? 2 : 1 : 0,
|
|
5193
|
+
const ee = (L) => L ? L.trim().length > 70 ? 2 : 1 : 0, ne = (L) => {
|
|
5127
5194
|
const C = V.value || 1, Z = Math.floor(L / C) * C, m = Z + C, _ = B.value.slice(Z, m);
|
|
5128
5195
|
let k = 0;
|
|
5129
5196
|
for (const j of _) {
|
|
@@ -5131,14 +5198,14 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5131
5198
|
if (K > k && (k = K), k === 2) break;
|
|
5132
5199
|
}
|
|
5133
5200
|
return k;
|
|
5134
|
-
},
|
|
5201
|
+
}, le = (L) => {
|
|
5135
5202
|
const C = { ...n.query };
|
|
5136
5203
|
L === 1 ? delete C.page : C.page = String(L), o.push({ query: C });
|
|
5137
5204
|
};
|
|
5138
|
-
return (L, C) => (u(), g("div",
|
|
5139
|
-
d("div",
|
|
5140
|
-
d("div",
|
|
5141
|
-
d("div",
|
|
5205
|
+
return (L, C) => (u(), g("div", ai, [
|
|
5206
|
+
d("div", ri, [
|
|
5207
|
+
d("div", ni, [
|
|
5208
|
+
d("div", oi, [
|
|
5142
5209
|
C[7] || (C[7] = d("div", null, [
|
|
5143
5210
|
d("h1", { class: "text-3xl font-bold text-gray-900" }, "Дашборди"),
|
|
5144
5211
|
d("p", { class: "mt-2 text-gray-600" }, " Керуйте та переглядайте свої аналітичні дашборди ")
|
|
@@ -5148,21 +5215,21 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5148
5215
|
class: "flex items-center gap-2 px-4 py-2.5 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors shadow-sm font-medium",
|
|
5149
5216
|
onClick: C[0] || (C[0] = (A) => b.value = !0)
|
|
5150
5217
|
}, [
|
|
5151
|
-
|
|
5218
|
+
W(H(ns), {
|
|
5152
5219
|
size: 24,
|
|
5153
5220
|
class: "w-4 h-4"
|
|
5154
5221
|
}),
|
|
5155
|
-
C[6] || (C[6] = d("span",
|
|
5222
|
+
C[6] || (C[6] = d("span", { class: "hidden sm:block" }, "Новий дашборд", -1))
|
|
5156
5223
|
])
|
|
5157
5224
|
]),
|
|
5158
|
-
|
|
5225
|
+
W(Ne, {
|
|
5159
5226
|
teleport: "#modal",
|
|
5160
5227
|
visible: b.value,
|
|
5161
5228
|
title: "Створити дашборд",
|
|
5162
5229
|
onClose: C[3] || (C[3] = (A) => b.value = !1)
|
|
5163
5230
|
}, {
|
|
5164
5231
|
footer: G(() => [
|
|
5165
|
-
d("div",
|
|
5232
|
+
d("div", ii, [
|
|
5166
5233
|
d("button", {
|
|
5167
5234
|
type: "button",
|
|
5168
5235
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border border-gray-200 rounded-lg hover:bg-gray-100 duration-300",
|
|
@@ -5171,24 +5238,24 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5171
5238
|
d("button", {
|
|
5172
5239
|
type: "button",
|
|
5173
5240
|
class: "py-2 px-3 inline-flex items-center gap-x-2 text-[14px] font-[400] whitespace-nowrap text-white bg-blue-500 rounded-lg hover:bg-blue-700 duration-300",
|
|
5174
|
-
onClick:
|
|
5241
|
+
onClick: T
|
|
5175
5242
|
}, " Зберегти ")
|
|
5176
5243
|
])
|
|
5177
5244
|
]),
|
|
5178
5245
|
default: G(() => [
|
|
5179
|
-
|
|
5246
|
+
W(H(e), {
|
|
5180
5247
|
ref_key: "createFormRef",
|
|
5181
5248
|
ref: x,
|
|
5182
5249
|
schema: H(s),
|
|
5183
|
-
values:
|
|
5184
|
-
"onUpdate:values": C[1] || (C[1] = (A) =>
|
|
5250
|
+
values: f.value,
|
|
5251
|
+
"onUpdate:values": C[1] || (C[1] = (A) => f.value = A)
|
|
5185
5252
|
}, null, 8, ["schema", "values"])
|
|
5186
5253
|
]),
|
|
5187
5254
|
_: 1
|
|
5188
5255
|
}, 8, ["visible"]),
|
|
5189
|
-
d("div",
|
|
5190
|
-
d("div",
|
|
5191
|
-
|
|
5256
|
+
d("div", li, [
|
|
5257
|
+
d("div", di, [
|
|
5258
|
+
W(H(Ot), {
|
|
5192
5259
|
size: 24,
|
|
5193
5260
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"
|
|
5194
5261
|
}),
|
|
@@ -5201,80 +5268,80 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5201
5268
|
[Ls, v.value]
|
|
5202
5269
|
])
|
|
5203
5270
|
]),
|
|
5204
|
-
d("div",
|
|
5271
|
+
d("div", ci, [
|
|
5205
5272
|
Ge(d("select", {
|
|
5206
5273
|
"onUpdate:modelValue": C[5] || (C[5] = (A) => y.value = A),
|
|
5207
5274
|
class: "appearance-none pl-3 pr-8 py-2 border border-gray-300 rounded-lg bg-white text-sm text-gray-700 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500"
|
|
5208
|
-
}, C[8] || (C[8] = [
|
|
5275
|
+
}, [...C[8] || (C[8] = [
|
|
5209
5276
|
d("option", { value: "title-asc" }, "Назва (А → Я)", -1),
|
|
5210
5277
|
d("option", { value: "title-desc" }, "Назва (Я → А)", -1)
|
|
5211
|
-
]), 512), [
|
|
5212
|
-
[
|
|
5278
|
+
])], 512), [
|
|
5279
|
+
[Es, y.value]
|
|
5213
5280
|
]),
|
|
5214
|
-
|
|
5281
|
+
W(H(Os), {
|
|
5215
5282
|
size: 16,
|
|
5216
5283
|
class: "absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 pointer-events-none"
|
|
5217
5284
|
})
|
|
5218
5285
|
])
|
|
5219
5286
|
])
|
|
5220
5287
|
]),
|
|
5221
|
-
d("div",
|
|
5222
|
-
|
|
5288
|
+
d("div", ui, [
|
|
5289
|
+
R.value ? (u(), g("div", pi, [...C[9] || (C[9] = [
|
|
5223
5290
|
d("div", {
|
|
5224
5291
|
class: "h-11 w-11 animate-spin rounded-full border-[3px] border-blue-100 border-t-blue-600 shadow-sm",
|
|
5225
5292
|
role: "status"
|
|
5226
5293
|
}, null, -1)
|
|
5227
|
-
]))) :
|
|
5294
|
+
])])) : U("", !0),
|
|
5228
5295
|
B.value.length ? (u(), g(Y, { key: 1 }, [
|
|
5229
|
-
d("div",
|
|
5230
|
-
(u(!0), g(Y, null,
|
|
5296
|
+
d("div", hi, [
|
|
5297
|
+
(u(!0), g(Y, null, ae(B.value, (A, Z) => (u(), g("div", {
|
|
5231
5298
|
key: A.routeName,
|
|
5232
5299
|
class: "cursor-pointer h-full"
|
|
5233
5300
|
}, [
|
|
5234
|
-
|
|
5301
|
+
W(ei, {
|
|
5235
5302
|
title: A.title,
|
|
5236
5303
|
description: A.description,
|
|
5237
5304
|
"last-update": A.last_update,
|
|
5238
5305
|
name: A.name,
|
|
5239
|
-
reserveLines:
|
|
5306
|
+
reserveLines: ne(Z),
|
|
5240
5307
|
"dashboard-route-name": A.routeName,
|
|
5241
5308
|
"on-open-editor": H(p)
|
|
5242
5309
|
}, null, 8, ["title", "description", "last-update", "name", "reserveLines", "dashboard-route-name", "on-open-editor"])
|
|
5243
5310
|
]))), 128))
|
|
5244
5311
|
]),
|
|
5245
|
-
d("div",
|
|
5246
|
-
|
|
5312
|
+
d("div", fi, [
|
|
5313
|
+
W(H(Fo), {
|
|
5247
5314
|
total: $.value,
|
|
5248
5315
|
showPageSizes: !1,
|
|
5249
5316
|
page: w.value,
|
|
5250
|
-
pageSize:
|
|
5251
|
-
"onUpdate:page":
|
|
5317
|
+
pageSize: z.value,
|
|
5318
|
+
"onUpdate:page": le,
|
|
5252
5319
|
color: "#2563eb"
|
|
5253
5320
|
}, null, 8, ["total", "page", "pageSize"])
|
|
5254
5321
|
])
|
|
5255
|
-
], 64)) :
|
|
5256
|
-
|
|
5322
|
+
], 64)) : R.value ? U("", !0) : (u(), g("div", gi, [
|
|
5323
|
+
W(H(Ot), {
|
|
5257
5324
|
size: 48,
|
|
5258
5325
|
class: "text-gray-300 mb-4"
|
|
5259
5326
|
}),
|
|
5260
5327
|
C[12] || (C[12] = d("p", { class: "text-lg font-medium text-gray-500" }, "Дашбордів не знайдено", -1)),
|
|
5261
|
-
d("p",
|
|
5262
|
-
C[10] || (C[10] =
|
|
5263
|
-
d("span",
|
|
5264
|
-
C[11] || (C[11] =
|
|
5328
|
+
d("p", mi, [
|
|
5329
|
+
C[10] || (C[10] = oe(" За запитом «", -1)),
|
|
5330
|
+
d("span", bi, P(v.value), 1),
|
|
5331
|
+
C[11] || (C[11] = oe("» нічого не знайдено. Спробуйте змінити пошуковий запит. ", -1))
|
|
5265
5332
|
])
|
|
5266
5333
|
]))
|
|
5267
5334
|
])
|
|
5268
5335
|
])
|
|
5269
5336
|
]));
|
|
5270
5337
|
}
|
|
5271
|
-
}),
|
|
5338
|
+
}), Zl = /* @__PURE__ */ be({
|
|
5272
5339
|
__name: "editor-root-page",
|
|
5273
5340
|
props: {
|
|
5274
5341
|
prefix: { default: "/api" }
|
|
5275
5342
|
},
|
|
5276
5343
|
setup(t) {
|
|
5277
|
-
const e = t, s =
|
|
5344
|
+
const e = t, s = M(() => e.prefix), a = Le(), r = as(), o = M(
|
|
5278
5345
|
() => a.hasRoute(ce.EditorDashboard)
|
|
5279
5346
|
), n = S("");
|
|
5280
5347
|
me(() => {
|
|
@@ -5284,20 +5351,20 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5284
5351
|
c != null && typeof c == "string" && (n.value = c.trim());
|
|
5285
5352
|
}
|
|
5286
5353
|
});
|
|
5287
|
-
const i =
|
|
5354
|
+
const i = M(() => n.value.length > 0);
|
|
5288
5355
|
return at("biSetDashboard", (l) => {
|
|
5289
5356
|
n.value = l || "";
|
|
5290
5357
|
}), at("biClearDashboard", () => {
|
|
5291
5358
|
n.value = "";
|
|
5292
|
-
}), at("biSelectedDashboardId",
|
|
5359
|
+
}), at("biSelectedDashboardId", Ws(n)), (l, c) => {
|
|
5293
5360
|
const p = ue("router-view");
|
|
5294
|
-
return o.value ? (u(),
|
|
5295
|
-
i.value ? (u(),
|
|
5361
|
+
return o.value ? (u(), F(p, { key: 0 })) : (u(), g(Y, { key: 1 }, [
|
|
5362
|
+
i.value ? (u(), F(qn, {
|
|
5296
5363
|
key: `editor-${n.value}`,
|
|
5297
5364
|
prefix: s.value,
|
|
5298
5365
|
"dashboard-id": n.value,
|
|
5299
|
-
onBack: c[0] || (c[0] = (
|
|
5300
|
-
}, null, 8, ["prefix", "dashboard-id"])) : (u(),
|
|
5366
|
+
onBack: c[0] || (c[0] = (h) => n.value = "")
|
|
5367
|
+
}, null, 8, ["prefix", "dashboard-id"])) : (u(), F(xi, {
|
|
5301
5368
|
key: 0,
|
|
5302
5369
|
prefix: s.value
|
|
5303
5370
|
}, null, 8, ["prefix"]))
|
|
@@ -5305,7 +5372,7 @@ const ti = { class: "flex-1 bg-gray-50" }, si = { class: "max-w-7xl mx-auto px-6
|
|
|
5305
5372
|
};
|
|
5306
5373
|
}
|
|
5307
5374
|
});
|
|
5308
|
-
class
|
|
5375
|
+
class yi {
|
|
5309
5376
|
static getTooltipOptions(e = !0) {
|
|
5310
5377
|
return {
|
|
5311
5378
|
show: e,
|
|
@@ -5320,7 +5387,7 @@ class bi {
|
|
|
5320
5387
|
};
|
|
5321
5388
|
}
|
|
5322
5389
|
}
|
|
5323
|
-
const
|
|
5390
|
+
const vi = {
|
|
5324
5391
|
show_label: !1,
|
|
5325
5392
|
show_legend: !1,
|
|
5326
5393
|
label: null,
|
|
@@ -5329,14 +5396,14 @@ const xi = {
|
|
|
5329
5396
|
color: null,
|
|
5330
5397
|
title: null
|
|
5331
5398
|
};
|
|
5332
|
-
function
|
|
5399
|
+
function wi() {
|
|
5333
5400
|
const t = "0123456789ABCDEF";
|
|
5334
5401
|
let e = "#";
|
|
5335
5402
|
for (let s = 0; s < 6; s += 1)
|
|
5336
5403
|
e += t[Math.floor(Math.random() * 16)];
|
|
5337
5404
|
return e;
|
|
5338
5405
|
}
|
|
5339
|
-
function Pe(t =
|
|
5406
|
+
function Pe(t = vi) {
|
|
5340
5407
|
var s, a, r;
|
|
5341
5408
|
const e = {
|
|
5342
5409
|
label: {
|
|
@@ -5462,7 +5529,7 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5462
5529
|
},
|
|
5463
5530
|
async getDataFromURL(t) {
|
|
5464
5531
|
try {
|
|
5465
|
-
const e = await
|
|
5532
|
+
const e = await re.get(t);
|
|
5466
5533
|
this.applyResponse(e);
|
|
5467
5534
|
} catch (e) {
|
|
5468
5535
|
const s = { message: "Дані не знайдено", title: "Помилка!", type: "error", status: 400, id: this.widgetName };
|
|
@@ -5516,12 +5583,12 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5516
5583
|
}
|
|
5517
5584
|
},
|
|
5518
5585
|
async initChart(t, e, s) {
|
|
5519
|
-
var a, r, o, n, i, l, c, p,
|
|
5586
|
+
var a, r, o, n, i, l, c, p, h;
|
|
5520
5587
|
this.widgetInstance && this.widgetInstance.clear();
|
|
5521
5588
|
try {
|
|
5522
5589
|
const x = this.$refs.chart, b = Se == null ? void 0 : Se.init(x);
|
|
5523
5590
|
if (!b) return;
|
|
5524
|
-
const
|
|
5591
|
+
const f = {
|
|
5525
5592
|
tooltip: {
|
|
5526
5593
|
show: ((r = (a = this.styleData) == null ? void 0 : a.tooltip) == null ? void 0 : r.show) !== !1,
|
|
5527
5594
|
trigger: "axis",
|
|
@@ -5532,29 +5599,29 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5532
5599
|
shadowColor: "transparent",
|
|
5533
5600
|
padding: [0, 0, 0, 0],
|
|
5534
5601
|
borderWidth: 0,
|
|
5535
|
-
position: (v, y,
|
|
5536
|
-
const [
|
|
5537
|
-
let O =
|
|
5538
|
-
return O +
|
|
5602
|
+
position: (v, y, z, $, w) => {
|
|
5603
|
+
const [R, B] = v, [I, T] = w.contentSize, [D, V] = w.viewSize;
|
|
5604
|
+
let O = R + 14, ee = B - T / 2;
|
|
5605
|
+
return O + I > D && (O = R - I - 14), O < 0 && (O = 0), ee + T > V && (ee = V - T), ee < 0 && (ee = 0), [O, ee];
|
|
5539
5606
|
},
|
|
5540
5607
|
formatter: (v) => {
|
|
5541
|
-
var
|
|
5542
|
-
const
|
|
5608
|
+
var T;
|
|
5609
|
+
const z = (T = v[0]) == null ? void 0 : T.axisValue, $ = z ? this.formatDate(z) : "N/A", w = [...v].filter((D) => {
|
|
5543
5610
|
var V;
|
|
5544
5611
|
return parseFloat(D == null ? void 0 : D.data) || ((V = D == null ? void 0 : D.data) == null ? void 0 : V.value);
|
|
5545
5612
|
}).sort((D, V) => {
|
|
5546
|
-
var
|
|
5547
|
-
const O = parseFloat(((
|
|
5548
|
-
return (parseFloat(((
|
|
5549
|
-
}),
|
|
5550
|
-
let
|
|
5613
|
+
var ne, le;
|
|
5614
|
+
const O = parseFloat(((ne = D == null ? void 0 : D.data) == null ? void 0 : ne.value) ?? (D == null ? void 0 : D.data)) || 0;
|
|
5615
|
+
return (parseFloat(((le = V == null ? void 0 : V.data) == null ? void 0 : le.value) ?? (V == null ? void 0 : V.data)) || 0) - O;
|
|
5616
|
+
}), R = w.slice(0, 8), B = w.length - R.length;
|
|
5617
|
+
let I = `
|
|
5551
5618
|
<div style="background-color: rgba(255, 255, 255, 0.95)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
|
|
5552
5619
|
<div class="font-semibold text-sm border-b border-solid border-gray-200 text-gray-800 rounded-t-lg dark:bg-neutral-800 dark:border-neutral-700 dark:text-neutral-200 px-2 py-1">
|
|
5553
5620
|
${$}
|
|
5554
5621
|
</div>
|
|
5555
5622
|
`;
|
|
5556
|
-
return
|
|
5557
|
-
|
|
5623
|
+
return R.forEach((D) => {
|
|
5624
|
+
I += `
|
|
5558
5625
|
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 dark:text-neutral-400">
|
|
5559
5626
|
<span class="flex items-center">
|
|
5560
5627
|
<span class="w-2.5 h-2.5 me-1.5 rounded-sm" style="background-color: ${D.color};"></span>
|
|
@@ -5563,10 +5630,10 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5563
5630
|
<span>${this.getMetricValue(D == null ? void 0 : D.data)}</span>
|
|
5564
5631
|
</div>
|
|
5565
5632
|
`;
|
|
5566
|
-
}), B > 0 && (
|
|
5633
|
+
}), B > 0 && (I += `
|
|
5567
5634
|
<div class="text-xs px-2 py-0.5 text-gray-400 dark:text-neutral-500">
|
|
5568
5635
|
... ще ${B}
|
|
5569
|
-
</div>`),
|
|
5636
|
+
</div>`), I += "</div>", I;
|
|
5570
5637
|
}
|
|
5571
5638
|
},
|
|
5572
5639
|
xAxis: {
|
|
@@ -5576,9 +5643,9 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5576
5643
|
axisLabel: {
|
|
5577
5644
|
...Yt((i = this.styleData) == null ? void 0 : i.x_axis),
|
|
5578
5645
|
formatter: (v) => {
|
|
5579
|
-
var
|
|
5646
|
+
var z, $;
|
|
5580
5647
|
const y = this.formatDate(v);
|
|
5581
|
-
return (($ = (
|
|
5648
|
+
return (($ = (z = this.styleData) == null ? void 0 : z.x_axis) == null ? void 0 : $.overflow) === "ellipsis" && y.length > 10 ? `${y.slice(0, 10)}...` : y;
|
|
5582
5649
|
}
|
|
5583
5650
|
}
|
|
5584
5651
|
},
|
|
@@ -5596,10 +5663,10 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5596
5663
|
left: "0%",
|
|
5597
5664
|
top: "20px",
|
|
5598
5665
|
containLabel: !0,
|
|
5599
|
-
...((
|
|
5666
|
+
...((h = this.styleData) == null ? void 0 : h.grid) || {}
|
|
5600
5667
|
}
|
|
5601
5668
|
};
|
|
5602
|
-
await b.setOption(
|
|
5669
|
+
await b.setOption(f), b.resize(), this.widgetInstance = b, this.$emit("update:currentWidget", b);
|
|
5603
5670
|
} catch (x) {
|
|
5604
5671
|
console.error(x);
|
|
5605
5672
|
}
|
|
@@ -5624,7 +5691,7 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5624
5691
|
...r,
|
|
5625
5692
|
...e.options,
|
|
5626
5693
|
tooltip: {
|
|
5627
|
-
...
|
|
5694
|
+
...yi.getTooltipOptions(e.options.tooltip.show)
|
|
5628
5695
|
}
|
|
5629
5696
|
});
|
|
5630
5697
|
},
|
|
@@ -5654,7 +5721,7 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5654
5721
|
) : e;
|
|
5655
5722
|
}
|
|
5656
5723
|
}
|
|
5657
|
-
},
|
|
5724
|
+
}, ki = {
|
|
5658
5725
|
name: "VsBar",
|
|
5659
5726
|
mixins: [De],
|
|
5660
5727
|
data() {
|
|
@@ -5708,13 +5775,13 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5708
5775
|
const p = this.sourceData.filter(
|
|
5709
5776
|
(x) => parseFloat(x[this.dimensions[1]]) && x[this.dimensions[0]]
|
|
5710
5777
|
).map((x) => parseFloat(x[this.dimensions[1]]));
|
|
5711
|
-
let
|
|
5712
|
-
return ((s = this.styleData) == null ? void 0 : s.stack) !== !1 ?
|
|
5778
|
+
let h;
|
|
5779
|
+
return ((s = this.styleData) == null ? void 0 : s.stack) !== !1 ? h = this.prepareStackData() : ((a = this.styleData) == null ? void 0 : a.negative_waterfall) === !0 ? h = this.prepareNegativeWaterfall() : ((r = this.styleData) == null ? void 0 : r.waterfall) === !0 ? h = this.prepareWaterfallData(p) : ((o = this.styleData) == null ? void 0 : o.accumulative) === !0 ? h = this.prepareAccumulative(p) : h = this.dimensions.slice(1).map((b, f) => ({
|
|
5713
5780
|
name: b,
|
|
5714
5781
|
type: "bar",
|
|
5715
|
-
stack: `a${
|
|
5782
|
+
stack: `a${f}`,
|
|
5716
5783
|
data: this.sourceData.filter((v) => parseFloat(v[b]) && b).map((v) => parseFloat(v[b]))
|
|
5717
|
-
})), { series:
|
|
5784
|
+
})), { series: h, xs: l, ys: c };
|
|
5718
5785
|
} catch (n) {
|
|
5719
5786
|
return console.error(n), { series: [], xs: [], ys: [] };
|
|
5720
5787
|
}
|
|
@@ -5806,18 +5873,18 @@ const Se = typeof window < "u" ? window.echarts : null, De = {
|
|
|
5806
5873
|
];
|
|
5807
5874
|
}
|
|
5808
5875
|
}
|
|
5809
|
-
},
|
|
5810
|
-
function
|
|
5876
|
+
}, _i = ["id"];
|
|
5877
|
+
function $i(t, e, s, a, r, o) {
|
|
5811
5878
|
return u(), g("div", {
|
|
5812
5879
|
id: o.uniqueID,
|
|
5813
5880
|
ref: "chart",
|
|
5814
5881
|
class: "h-full w-full min-h-[200px]"
|
|
5815
|
-
}, null, 8,
|
|
5882
|
+
}, null, 8, _i);
|
|
5816
5883
|
}
|
|
5817
|
-
const
|
|
5884
|
+
const Di = /* @__PURE__ */ de(ki, [["render", $i]]), Ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5818
5885
|
__proto__: null,
|
|
5819
|
-
default:
|
|
5820
|
-
}, Symbol.toStringTag, { value: "Module" })), nt = typeof window < "u" ? window.echarts : null,
|
|
5886
|
+
default: Di
|
|
5887
|
+
}, Symbol.toStringTag, { value: "Module" })), nt = typeof window < "u" ? window.echarts : null, Ti = {
|
|
5821
5888
|
name: "VsPie",
|
|
5822
5889
|
props: ["currentWidget"],
|
|
5823
5890
|
mixins: [De],
|
|
@@ -5874,25 +5941,25 @@ const _i = /* @__PURE__ */ de(vi, [["render", ki]]), $i = /* @__PURE__ */ Object
|
|
|
5874
5941
|
return console.warn("No source data available"), null;
|
|
5875
5942
|
const n = Array.from(
|
|
5876
5943
|
new Set(
|
|
5877
|
-
(this.sourceData || []).map((
|
|
5944
|
+
(this.sourceData || []).map((f) => f[this.dimensions[0]])
|
|
5878
5945
|
)
|
|
5879
5946
|
), i = Array.from(
|
|
5880
5947
|
new Set(
|
|
5881
|
-
(this.sourceData || []).map((
|
|
5948
|
+
(this.sourceData || []).map((f) => f[this.dimensions[1]])
|
|
5882
5949
|
)
|
|
5883
5950
|
), l = parseInt(
|
|
5884
5951
|
(this.sourceData || []).reduce(
|
|
5885
|
-
(
|
|
5952
|
+
(f, v) => f + parseFloat((v == null ? void 0 : v.metric) || 0),
|
|
5886
5953
|
0
|
|
5887
5954
|
),
|
|
5888
5955
|
10
|
|
5889
|
-
), c = n.map((
|
|
5956
|
+
), c = n.map((f, v) => {
|
|
5890
5957
|
const y = (i[v] / l * 100).toFixed(2);
|
|
5891
5958
|
return {
|
|
5892
|
-
name: `${
|
|
5959
|
+
name: `${f} (${y}%)`,
|
|
5893
5960
|
value: i[v]
|
|
5894
5961
|
};
|
|
5895
|
-
}), p = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%",
|
|
5962
|
+
}), p = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%", h = ((s = this.styleData) == null ? void 0 : s.outerRadius) || "100%", x = [p, h];
|
|
5896
5963
|
return this.styleData.legend = Ye.getLegendOpions({
|
|
5897
5964
|
borderRadius: 10,
|
|
5898
5965
|
height: "100%",
|
|
@@ -5901,9 +5968,9 @@ const _i = /* @__PURE__ */ de(vi, [["render", ki]]), $i = /* @__PURE__ */ Object
|
|
|
5901
5968
|
type: "scroll",
|
|
5902
5969
|
itemWidth: 14,
|
|
5903
5970
|
itemHeight: 14,
|
|
5904
|
-
formatter: (
|
|
5971
|
+
formatter: (f) => {
|
|
5905
5972
|
var v;
|
|
5906
|
-
return (v =
|
|
5973
|
+
return (v = f == null ? void 0 : f.replace("null", "Не визначено")) == null ? void 0 : v.replace("NaN", "0.00");
|
|
5907
5974
|
},
|
|
5908
5975
|
...((a = this.styleData) == null ? void 0 : a.legend) || {}
|
|
5909
5976
|
}), this.styleData.label = Ye.getLabelOptions(
|
|
@@ -5978,18 +6045,18 @@ const _i = /* @__PURE__ */ de(vi, [["render", ki]]), $i = /* @__PURE__ */ Object
|
|
|
5978
6045
|
}
|
|
5979
6046
|
}
|
|
5980
6047
|
}
|
|
5981
|
-
},
|
|
5982
|
-
function
|
|
6048
|
+
}, zi = ["id"];
|
|
6049
|
+
function Ii(t, e, s, a, r, o) {
|
|
5983
6050
|
return u(), g("div", {
|
|
5984
6051
|
id: o.uniqueID,
|
|
5985
6052
|
ref: "chart",
|
|
5986
6053
|
class: "h-full min-h-[200px] flex items-center"
|
|
5987
|
-
}, null, 8,
|
|
6054
|
+
}, null, 8, zi);
|
|
5988
6055
|
}
|
|
5989
|
-
const
|
|
6056
|
+
const Si = /* @__PURE__ */ de(Ti, [["render", Ii]]), Li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5990
6057
|
__proto__: null,
|
|
5991
|
-
default:
|
|
5992
|
-
}, Symbol.toStringTag, { value: "Module" })), ot = typeof window < "u" ? window.echarts : null,
|
|
6058
|
+
default: Si
|
|
6059
|
+
}, Symbol.toStringTag, { value: "Module" })), ot = typeof window < "u" ? window.echarts : null, Ei = {
|
|
5993
6060
|
name: "VsPie",
|
|
5994
6061
|
props: ["currentWidget"],
|
|
5995
6062
|
mixins: [De],
|
|
@@ -6053,17 +6120,17 @@ const Ii = /* @__PURE__ */ de(Di, [["render", zi]]), Ti = /* @__PURE__ */ Object
|
|
|
6053
6120
|
)
|
|
6054
6121
|
), i = parseInt(
|
|
6055
6122
|
(this.sourceData || []).reduce(
|
|
6056
|
-
(b,
|
|
6123
|
+
(b, f) => b + parseFloat(f == null ? void 0 : f.metric),
|
|
6057
6124
|
0
|
|
6058
6125
|
),
|
|
6059
6126
|
10
|
|
6060
|
-
), l = o.map((b,
|
|
6061
|
-
const v = (n[
|
|
6127
|
+
), l = o.map((b, f) => {
|
|
6128
|
+
const v = (n[f] / i * 100).toFixed(2);
|
|
6062
6129
|
return {
|
|
6063
6130
|
name: `${b} (${v}%)`,
|
|
6064
|
-
value: n[
|
|
6131
|
+
value: n[f]
|
|
6065
6132
|
};
|
|
6066
|
-
}), c = ((t = this.styleData) == null ? void 0 : t.innerRadius) || "0%", p = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%",
|
|
6133
|
+
}), c = ((t = this.styleData) == null ? void 0 : t.innerRadius) || "0%", p = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%", h = [c, p];
|
|
6067
6134
|
return this.styleData.legend = Ye.getLegendOpions({
|
|
6068
6135
|
borderRadius: 10,
|
|
6069
6136
|
height: "100%",
|
|
@@ -6080,7 +6147,7 @@ const Ii = /* @__PURE__ */ de(Di, [["render", zi]]), Ti = /* @__PURE__ */ Object
|
|
|
6080
6147
|
{
|
|
6081
6148
|
name: this.titleCharts ? this.titleCharts : this.dimensions[0],
|
|
6082
6149
|
type: "pie",
|
|
6083
|
-
radius:
|
|
6150
|
+
radius: h,
|
|
6084
6151
|
center: ["50%", "60%"],
|
|
6085
6152
|
height: "75%",
|
|
6086
6153
|
...Pe(this.styleData),
|
|
@@ -6130,18 +6197,18 @@ const Ii = /* @__PURE__ */ de(Di, [["render", zi]]), Ti = /* @__PURE__ */ Object
|
|
|
6130
6197
|
}
|
|
6131
6198
|
}
|
|
6132
6199
|
}
|
|
6133
|
-
},
|
|
6134
|
-
function
|
|
6200
|
+
}, Wi = ["id"];
|
|
6201
|
+
function Ri(t, e, s, a, r, o) {
|
|
6135
6202
|
return u(), g("div", {
|
|
6136
6203
|
id: o.uniqueID,
|
|
6137
6204
|
ref: "chart",
|
|
6138
6205
|
class: "h-full min-h-[200px] flex items-center"
|
|
6139
|
-
}, null, 8,
|
|
6206
|
+
}, null, 8, Wi);
|
|
6140
6207
|
}
|
|
6141
|
-
const
|
|
6208
|
+
const ji = /* @__PURE__ */ de(Ei, [["render", Ri]]), Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6142
6209
|
__proto__: null,
|
|
6143
|
-
default:
|
|
6144
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6210
|
+
default: ji
|
|
6211
|
+
}, Symbol.toStringTag, { value: "Module" })), Ni = {
|
|
6145
6212
|
name: "VsLine",
|
|
6146
6213
|
mixins: [De],
|
|
6147
6214
|
data() {
|
|
@@ -6198,18 +6265,18 @@ const Ri = /* @__PURE__ */ de(Si, [["render", Wi]]), Ei = /* @__PURE__ */ Object
|
|
|
6198
6265
|
}
|
|
6199
6266
|
}
|
|
6200
6267
|
}
|
|
6201
|
-
},
|
|
6202
|
-
function
|
|
6268
|
+
}, Pi = ["id"];
|
|
6269
|
+
function Oi(t, e, s, a, r, o) {
|
|
6203
6270
|
return u(), g("div", {
|
|
6204
6271
|
id: r.uniqueID,
|
|
6205
6272
|
ref: "chart",
|
|
6206
6273
|
style: { height: "400px" }
|
|
6207
|
-
}, null, 8,
|
|
6274
|
+
}, null, 8, Pi);
|
|
6208
6275
|
}
|
|
6209
|
-
const
|
|
6276
|
+
const Ai = /* @__PURE__ */ de(Ni, [["render", Oi]]), Bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6210
6277
|
__proto__: null,
|
|
6211
|
-
default:
|
|
6212
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6278
|
+
default: Ai
|
|
6279
|
+
}, Symbol.toStringTag, { value: "Module" })), Mi = {
|
|
6213
6280
|
name: "VsStat",
|
|
6214
6281
|
mixins: [De],
|
|
6215
6282
|
data() {
|
|
@@ -6234,7 +6301,7 @@ const Pi = /* @__PURE__ */ de(ji, [["render", Ni]]), Oi = /* @__PURE__ */ Object
|
|
|
6234
6301
|
this.columns = Object.keys(this.sourceData[0]);
|
|
6235
6302
|
const t = this.getValues();
|
|
6236
6303
|
this.sumValue = t.reduce((e, s) => e + s, 0), this.sourceData.forEach((e, s) => {
|
|
6237
|
-
e.color = s < es.length - 1 ? es[s] :
|
|
6304
|
+
e.color = s < es.length - 1 ? es[s] : wi();
|
|
6238
6305
|
});
|
|
6239
6306
|
},
|
|
6240
6307
|
formattedValue(t) {
|
|
@@ -6242,19 +6309,19 @@ const Pi = /* @__PURE__ */ de(ji, [["render", Ni]]), Oi = /* @__PURE__ */ Object
|
|
|
6242
6309
|
return ye(e);
|
|
6243
6310
|
}
|
|
6244
6311
|
}
|
|
6245
|
-
},
|
|
6312
|
+
}, Fi = { class: "flex flex-col w-full h-full pt-[16px] rounded-xl" }, qi = { class: "flex flex-col justify-between w-full h-full" }, Ui = { class: "w-full h-full pb-6 space-y-4" }, Hi = { class: "flex w-full h-3 rounded-full gap-x-1 min-h-3 custom-x-scrollbar" }, Gi = ["onMouseover"], Zi = {
|
|
6246
6313
|
key: 0,
|
|
6247
6314
|
class: "absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"
|
|
6248
|
-
},
|
|
6249
|
-
function
|
|
6250
|
-
return u(), g("div",
|
|
6251
|
-
d("div",
|
|
6252
|
-
d("div",
|
|
6253
|
-
d("div",
|
|
6254
|
-
(u(!0), g(Y, null,
|
|
6255
|
-
var l, c, p,
|
|
6315
|
+
}, Qi = { class: "h-[calc(100%-40px)] w-full custom-scrollbar" }, Xi = { class: "grid items-center justify-between grid-cols-2 py-2 gap-x-4" }, Ji = { class: "flex items-center" }, Ki = { class: "text-sm text-gray-800" }, Yi = { class: "text-end" }, el = { class: "text-sm text-gray-500" };
|
|
6316
|
+
function tl(t, e, s, a, r, o) {
|
|
6317
|
+
return u(), g("div", Fi, [
|
|
6318
|
+
d("div", qi, [
|
|
6319
|
+
d("div", Ui, [
|
|
6320
|
+
d("div", Hi, [
|
|
6321
|
+
(u(!0), g(Y, null, ae(t.sourceData, (n, i) => {
|
|
6322
|
+
var l, c, p, h;
|
|
6256
6323
|
return u(), g("div", {
|
|
6257
|
-
class:
|
|
6324
|
+
class: se(["flex flex-col min-w-[5px] justify-center min-h-2.5 h-2.5 text-xs text-white text-center whitespace-nowrap", `bg-[${n.color}]`]),
|
|
6258
6325
|
style: et({
|
|
6259
6326
|
width: `${parseFloat(n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[1]]) / r.sumValue * 100}%`
|
|
6260
6327
|
}),
|
|
@@ -6265,22 +6332,22 @@ function Yi(t, e, s, a, r, o) {
|
|
|
6265
6332
|
onMouseover: (x) => r.showTooltip = i,
|
|
6266
6333
|
onMouseleave: e[0] || (e[0] = (x) => r.showTooltip = -1)
|
|
6267
6334
|
}, [
|
|
6268
|
-
r.showTooltip > -1 ? (u(), g("div",
|
|
6269
|
-
], 46,
|
|
6335
|
+
r.showTooltip > -1 ? (u(), g("div", Zi, P(t.sourceData[r.showTooltip][r.columns[0]]) + " " + P((parseFloat((h = (c = t.sourceData) == null ? void 0 : c[r.showTooltip]) == null ? void 0 : h[(p = r.columns) == null ? void 0 : p[1]]) / r.sumValue * 100).toFixed(2)) + "% ", 1)) : U("", !0)
|
|
6336
|
+
], 46, Gi);
|
|
6270
6337
|
}), 256))
|
|
6271
6338
|
]),
|
|
6272
|
-
d("ul",
|
|
6273
|
-
(u(!0), g(Y, null,
|
|
6339
|
+
d("ul", Qi, [
|
|
6340
|
+
(u(!0), g(Y, null, ae(t.sourceData, (n) => {
|
|
6274
6341
|
var i, l;
|
|
6275
|
-
return u(), g("li",
|
|
6276
|
-
d("div",
|
|
6342
|
+
return u(), g("li", Xi, [
|
|
6343
|
+
d("div", Ji, [
|
|
6277
6344
|
d("span", {
|
|
6278
|
-
class:
|
|
6345
|
+
class: se(["shrink-0 size-2.5 inline-block rounded-sm me-2.5 min-w-[10px] w-[10px] h-[10px] min-h-[10px]", `bg-[${n.color}]`])
|
|
6279
6346
|
}, null, 2),
|
|
6280
|
-
d("span",
|
|
6347
|
+
d("span", Ki, P((n == null ? void 0 : n[(i = r.columns) == null ? void 0 : i[0]]) || "Не визначено"), 1)
|
|
6281
6348
|
]),
|
|
6282
|
-
d("div",
|
|
6283
|
-
d("span",
|
|
6349
|
+
d("div", Yi, [
|
|
6350
|
+
d("span", el, P(o.formattedValue(n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[1]]) || "-"), 1)
|
|
6284
6351
|
])
|
|
6285
6352
|
]);
|
|
6286
6353
|
}), 256))
|
|
@@ -6289,10 +6356,10 @@ function Yi(t, e, s, a, r, o) {
|
|
|
6289
6356
|
])
|
|
6290
6357
|
]);
|
|
6291
6358
|
}
|
|
6292
|
-
const
|
|
6359
|
+
const sl = /* @__PURE__ */ de(Mi, [["render", tl]]), al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6293
6360
|
__proto__: null,
|
|
6294
|
-
default:
|
|
6295
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6361
|
+
default: sl
|
|
6362
|
+
}, Symbol.toStringTag, { value: "Module" })), rl = {
|
|
6296
6363
|
name: "VsProgressBar",
|
|
6297
6364
|
mixins: [De],
|
|
6298
6365
|
data() {
|
|
@@ -6322,24 +6389,24 @@ const el = /* @__PURE__ */ de(Ai, [["render", Yi]]), tl = /* @__PURE__ */ Object
|
|
|
6322
6389
|
return ye(t);
|
|
6323
6390
|
}
|
|
6324
6391
|
}
|
|
6325
|
-
},
|
|
6392
|
+
}, nl = {
|
|
6326
6393
|
key: 0,
|
|
6327
6394
|
class: "flex flex-col h-full pt-[16px] rounded-xl"
|
|
6328
|
-
},
|
|
6395
|
+
}, ol = { class: "h-full pt-0 pb-6 space-y-4" }, il = { class: "h-full space-y-4 custom-scrollbar" }, ll = { class: "flex items-center justify-between mr-2 gap-x-2" }, dl = { class: "grid items-center w-full grid-cols-2 gap-x-2" }, cl = { class: "text-sm text-gray-800" }, ul = {
|
|
6329
6396
|
class: "flex justify-end",
|
|
6330
6397
|
role: "progressbar",
|
|
6331
6398
|
"aria-valuenow": "100",
|
|
6332
6399
|
"aria-valuemin": "0",
|
|
6333
6400
|
"aria-valuemax": "100"
|
|
6334
|
-
},
|
|
6335
|
-
function
|
|
6336
|
-
return r.columns ? (u(), g("div",
|
|
6337
|
-
d("div",
|
|
6338
|
-
d("ul",
|
|
6339
|
-
(u(!0), g(Y, null,
|
|
6340
|
-
d("div",
|
|
6341
|
-
d("span",
|
|
6342
|
-
d("div",
|
|
6401
|
+
}, pl = { class: "min-w-[60px] text-end" }, hl = { class: "text-sm text-gray-500" };
|
|
6402
|
+
function fl(t, e, s, a, r, o) {
|
|
6403
|
+
return r.columns ? (u(), g("div", nl, [
|
|
6404
|
+
d("div", ol, [
|
|
6405
|
+
d("ul", il, [
|
|
6406
|
+
(u(!0), g(Y, null, ae(t.sourceData, (n, i) => (u(), g("li", ll, [
|
|
6407
|
+
d("div", dl, [
|
|
6408
|
+
d("span", cl, P(n[r.columns[0]]), 1),
|
|
6409
|
+
d("div", ul, [
|
|
6343
6410
|
d("div", {
|
|
6344
6411
|
class: "h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",
|
|
6345
6412
|
style: et({
|
|
@@ -6348,18 +6415,18 @@ function pl(t, e, s, a, r, o) {
|
|
|
6348
6415
|
}, null, 4)
|
|
6349
6416
|
])
|
|
6350
6417
|
]),
|
|
6351
|
-
d("div",
|
|
6352
|
-
d("span",
|
|
6418
|
+
d("div", pl, [
|
|
6419
|
+
d("span", hl, P(o.formattedValue(n[r.columns[1]])), 1)
|
|
6353
6420
|
])
|
|
6354
6421
|
]))), 256))
|
|
6355
6422
|
])
|
|
6356
6423
|
])
|
|
6357
|
-
])) :
|
|
6424
|
+
])) : U("", !0);
|
|
6358
6425
|
}
|
|
6359
|
-
const
|
|
6426
|
+
const gl = /* @__PURE__ */ de(rl, [["render", fl]]), ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6360
6427
|
__proto__: null,
|
|
6361
|
-
default:
|
|
6362
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6428
|
+
default: gl
|
|
6429
|
+
}, Symbol.toStringTag, { value: "Module" })), bl = {
|
|
6363
6430
|
name: "VsListbar",
|
|
6364
6431
|
mixins: [De],
|
|
6365
6432
|
props: ["source"],
|
|
@@ -6397,38 +6464,38 @@ const hl = /* @__PURE__ */ de(sl, [["render", pl]]), fl = /* @__PURE__ */ Object
|
|
|
6397
6464
|
return `${t / this.maxValue * 100}%`;
|
|
6398
6465
|
}
|
|
6399
6466
|
}
|
|
6400
|
-
},
|
|
6401
|
-
function
|
|
6402
|
-
return u(), g("div",
|
|
6403
|
-
d("ul",
|
|
6404
|
-
(u(!0), g(Y, null,
|
|
6467
|
+
}, xl = { class: "h-full pt-[20px] list-bar flex flex-col min-h-0" }, yl = { class: "space-y-2 custom-scrollbar flex-1 min-h-0 overflow-y-auto overflow-x-hidden" }, vl = { class: "relative w-full truncate" }, wl = { class: "relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800" }, kl = { class: "text-[14px] text-gray-500" };
|
|
6468
|
+
function _l(t, e, s, a, r, o) {
|
|
6469
|
+
return u(), g("div", xl, [
|
|
6470
|
+
d("ul", yl, [
|
|
6471
|
+
(u(!0), g(Y, null, ae(t.sourceData, (n, i) => {
|
|
6405
6472
|
var l, c, p;
|
|
6406
6473
|
return u(), g("li", {
|
|
6407
6474
|
key: i,
|
|
6408
6475
|
class: "flex items-center justify-between w-full gap-x-2"
|
|
6409
6476
|
}, [
|
|
6410
|
-
d("div",
|
|
6411
|
-
d("span",
|
|
6477
|
+
d("div", vl, [
|
|
6478
|
+
d("span", wl, P((n == null ? void 0 : n[(l = r.columns) == null ? void 0 : l[0]]) || "Без категорії"), 1),
|
|
6412
6479
|
d("div", {
|
|
6413
|
-
class:
|
|
6480
|
+
class: se(["absolute inset-y-0 h-full rounded start-0", n != null && n[(c = r.columns) == null ? void 0 : c[0]] ? "bg-indigo-100" : "bg-gray-100"]),
|
|
6414
6481
|
style: et({ width: o.getWidth(n == null ? void 0 : n[(p = r.columns) == null ? void 0 : p[1]]) })
|
|
6415
6482
|
}, null, 6)
|
|
6416
6483
|
]),
|
|
6417
|
-
(u(!0), g(Y, null,
|
|
6484
|
+
(u(!0), g(Y, null, ae(r.restDimensions, (h, x) => (u(), g("div", {
|
|
6418
6485
|
key: x,
|
|
6419
6486
|
class: "w-20 mr-2 text-end"
|
|
6420
6487
|
}, [
|
|
6421
|
-
d("span",
|
|
6488
|
+
d("span", kl, P(o.formattedValue(n == null ? void 0 : n[h])), 1)
|
|
6422
6489
|
]))), 128))
|
|
6423
6490
|
]);
|
|
6424
6491
|
}), 128))
|
|
6425
6492
|
])
|
|
6426
6493
|
]);
|
|
6427
6494
|
}
|
|
6428
|
-
const
|
|
6495
|
+
const $l = /* @__PURE__ */ de(bl, [["render", _l]]), Dl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6429
6496
|
__proto__: null,
|
|
6430
|
-
default:
|
|
6431
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
6497
|
+
default: $l
|
|
6498
|
+
}, Symbol.toStringTag, { value: "Module" })), Cl = {
|
|
6432
6499
|
name: "VsPivotTable",
|
|
6433
6500
|
mixins: [De],
|
|
6434
6501
|
data() {
|
|
@@ -6462,37 +6529,37 @@ const kl = /* @__PURE__ */ de(gl, [["render", wl]]), _l = /* @__PURE__ */ Object
|
|
|
6462
6529
|
}
|
|
6463
6530
|
}
|
|
6464
6531
|
}
|
|
6465
|
-
},
|
|
6532
|
+
}, Tl = { class: "flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar" }, zl = { class: "overflow-x-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-gray-100 [&::-webkit-scrollbar-thumb]:bg-gray-300 custom-scrollbar" }, Il = { class: "inline-block min-w-full align-middle" }, Sl = { class: "min-w-full divide-y divide-gray-200" }, Ll = { class: "space-x-2" }, El = {
|
|
6466
6533
|
scope: "col",
|
|
6467
6534
|
class: "xl:min-w-[120px] min-w-48"
|
|
6468
|
-
},
|
|
6469
|
-
function
|
|
6470
|
-
return u(), g("div",
|
|
6471
|
-
d("div",
|
|
6472
|
-
d("div",
|
|
6473
|
-
d("table",
|
|
6535
|
+
}, Wl = { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" }, Rl = { class: "divide-y divide-gray-200 text-[12px]" }, jl = { class: "py-3 size-px whitespace-nowrap" }, Vl = { class: "flex items-center gap-x-3" }, Nl = { class: "font-medium text-gray-800" }, Pl = { class: "py-3 size-px whitespace-nowrap" }, Ol = { class: "text-gray-600" };
|
|
6536
|
+
function Al(t, e, s, a, r, o) {
|
|
6537
|
+
return u(), g("div", Tl, [
|
|
6538
|
+
d("div", zl, [
|
|
6539
|
+
d("div", Il, [
|
|
6540
|
+
d("table", Sl, [
|
|
6474
6541
|
d("thead", null, [
|
|
6475
|
-
d("tr",
|
|
6542
|
+
d("tr", Ll, [
|
|
6476
6543
|
e[0] || (e[0] = d("th", {
|
|
6477
6544
|
scope: "col",
|
|
6478
6545
|
class: "min-w-[200px]"
|
|
6479
6546
|
}, [
|
|
6480
6547
|
d("div", { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" })
|
|
6481
6548
|
], -1)),
|
|
6482
|
-
(u(!0), g(Y, null,
|
|
6483
|
-
d("div",
|
|
6549
|
+
(u(!0), g(Y, null, ae(r.xs, (n) => (u(), g("th", El, [
|
|
6550
|
+
d("div", Wl, P(n), 1)
|
|
6484
6551
|
]))), 256))
|
|
6485
6552
|
])
|
|
6486
6553
|
]),
|
|
6487
|
-
(u(!0), g(Y, null,
|
|
6554
|
+
(u(!0), g(Y, null, ae(r.values, (n) => (u(), g("tbody", Rl, [
|
|
6488
6555
|
d("tr", null, [
|
|
6489
|
-
d("td",
|
|
6490
|
-
d("div",
|
|
6491
|
-
d("span",
|
|
6556
|
+
d("td", jl, [
|
|
6557
|
+
d("div", Vl, [
|
|
6558
|
+
d("span", Nl, P(n.name), 1)
|
|
6492
6559
|
])
|
|
6493
6560
|
]),
|
|
6494
|
-
(u(!0), g(Y, null,
|
|
6495
|
-
d("span",
|
|
6561
|
+
(u(!0), g(Y, null, ae(r.xs, (i, l) => (u(), g("td", Pl, [
|
|
6562
|
+
d("span", Ol, P(n.data[l]), 1)
|
|
6496
6563
|
]))), 256))
|
|
6497
6564
|
])
|
|
6498
6565
|
]))), 256))
|
|
@@ -6501,14 +6568,14 @@ function Pl(t, e, s, a, r, o) {
|
|
|
6501
6568
|
])
|
|
6502
6569
|
]);
|
|
6503
6570
|
}
|
|
6504
|
-
const
|
|
6571
|
+
const Bl = /* @__PURE__ */ de(Cl, [["render", Al]]), Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6505
6572
|
__proto__: null,
|
|
6506
|
-
default:
|
|
6573
|
+
default: Bl
|
|
6507
6574
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
6508
6575
|
export {
|
|
6509
6576
|
ce as R,
|
|
6510
6577
|
Xa as U,
|
|
6511
|
-
|
|
6578
|
+
Di as V,
|
|
6512
6579
|
Qs as X,
|
|
6513
6580
|
de as _,
|
|
6514
6581
|
Pe as a,
|
|
@@ -6516,21 +6583,21 @@ export {
|
|
|
6516
6583
|
De as c,
|
|
6517
6584
|
ye as d,
|
|
6518
6585
|
pe as e,
|
|
6519
|
-
|
|
6520
|
-
|
|
6586
|
+
Hl as f,
|
|
6587
|
+
re as g,
|
|
6521
6588
|
mn as h,
|
|
6522
6589
|
gn as i,
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6590
|
+
xi as j,
|
|
6591
|
+
qn as k,
|
|
6592
|
+
Zl as l,
|
|
6526
6593
|
Q as m,
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6594
|
+
ji as n,
|
|
6595
|
+
Ai as o,
|
|
6596
|
+
sl as p,
|
|
6597
|
+
gl as q,
|
|
6598
|
+
$l as r,
|
|
6599
|
+
Bl as s,
|
|
6600
|
+
Gl as t,
|
|
6534
6601
|
Ze as u,
|
|
6535
|
-
|
|
6602
|
+
Si as v
|
|
6536
6603
|
};
|