@opengis/bi 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bi.js +8 -8
- package/dist/bi.umd.cjs +79 -8191
- package/dist/{import-file-Bfrp5GGp.js → import-file-DldGj76q.js} +1074 -1076
- package/dist/{vs-funnel-bar-Dx5DXpbd.js → vs-funnel-bar-mfZboefB.js} +1 -1
- package/dist/{vs-list-B_uR1rvK.js → vs-list-Ice6-IrN.js} +128 -86
- package/dist/{vs-map-DYoWxRug.js → vs-map-DsfKv22S.js} +2 -2
- package/dist/{vs-map-cluster-CWG-QeLK.js → vs-map-cluster-P7aMMFIb.js} +67 -52
- package/dist/{vs-number-DfeBKJ3W.js → vs-number-greu-CL0.js} +1 -1
- package/dist/{vs-table-D5K1qrTl.js → vs-table-ByP_RpUg.js} +1 -1
- package/dist/{vs-text-Upv_gMUt.js → vs-text-Qve46urW.js} +1 -1
- package/package.json +1 -1
- package/dist/form-l0sNRNKZ.js +0 -1
- package/dist/index-DaZD6RjI.js +0 -35369
- package/dist/index-W-qQIppj-CIdBATkI.js +0 -2383
- package/dist/list-DMnebJXd.js +0 -50
- package/dist/map-XeaKjxqv.js +0 -21
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { h as Xe, defineComponent as
|
|
1
|
+
var ns = Object.defineProperty;
|
|
2
|
+
var is = (s, e, t) => e in s ? ns(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var N = (s, e, t) => is(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { h as Xe, defineComponent as ge, ref as S, computed as B, onUnmounted as Be, createElementBlock as w, openBlock as h, Fragment as A, createElementVNode as d, createCommentVNode as P, createTextVNode as X, toDisplayString as R, renderList as G, mergeModels as We, useModel as Ot, withDirectives as os, normalizeClass as K, vModelCheckbox as ls, defineAsyncComponent as O, onMounted as ie, watch as ne, createBlock as F, createVNode as C, unref as L, resolveDynamicComponent as At, createStaticVNode as cs, mergeProps as de, resolveComponent as Q, inject as qe, withCtx as V, Teleport as ds, Transition as us, withModifiers as ps, renderSlot as $t, getCurrentInstance as me, onErrorCaptured as hs, provide as Ge, readonly as fs, normalizeStyle as Ye } from "vue";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const _t = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), gs = (s) => s.replace(
|
|
12
12
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
13
13
|
(e, t, r) => r ? r.toUpperCase() : t.toLowerCase()
|
|
14
|
-
),
|
|
15
|
-
const e =
|
|
14
|
+
), ms = (s) => {
|
|
15
|
+
const e = gs(s);
|
|
16
16
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
17
|
-
},
|
|
17
|
+
}, bs = (...s) => s.filter((e, t, r) => !!e && e.trim() !== "" && r.indexOf(e) === t).join(" ").trim(), Dt = (s) => s === "";
|
|
18
18
|
/**
|
|
19
19
|
* @license lucide-vue-next v0.546.0 - ISC
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
var
|
|
24
|
+
var _e = {
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
width: 24,
|
|
27
27
|
height: 24,
|
|
@@ -38,29 +38,29 @@ var $e = {
|
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const xs = ({
|
|
42
42
|
name: s,
|
|
43
43
|
iconNode: e,
|
|
44
44
|
absoluteStrokeWidth: t,
|
|
45
45
|
"absolute-stroke-width": r,
|
|
46
46
|
strokeWidth: a,
|
|
47
47
|
"stroke-width": i,
|
|
48
|
-
size: n =
|
|
49
|
-
color: o =
|
|
48
|
+
size: n = _e.width,
|
|
49
|
+
color: o = _e.stroke,
|
|
50
50
|
...l
|
|
51
51
|
}, { slots: u }) => Xe(
|
|
52
52
|
"svg",
|
|
53
53
|
{
|
|
54
|
-
|
|
54
|
+
..._e,
|
|
55
55
|
...l,
|
|
56
56
|
width: n,
|
|
57
57
|
height: n,
|
|
58
58
|
stroke: o,
|
|
59
|
-
"stroke-width":
|
|
60
|
-
class:
|
|
59
|
+
"stroke-width": Dt(t) || Dt(r) || t === !0 || r === !0 ? Number(a || i || _e["stroke-width"]) * 24 / Number(n) : a || i || _e["stroke-width"],
|
|
60
|
+
class: bs(
|
|
61
61
|
"lucide",
|
|
62
62
|
l.class,
|
|
63
|
-
...s ? [`lucide-${
|
|
63
|
+
...s ? [`lucide-${_t(ms(s))}-icon`, `lucide-${_t(s)}`] : ["lucide-icon"]
|
|
64
64
|
)
|
|
65
65
|
},
|
|
66
66
|
[...e.map((c) => Xe(...c)), ...u.default ? [u.default()] : []]
|
|
@@ -72,7 +72,7 @@ const ms = ({
|
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
73
|
*/
|
|
74
74
|
const J = (s, e) => (t, { slots: r, attrs: a }) => Xe(
|
|
75
|
-
|
|
75
|
+
xs,
|
|
76
76
|
{
|
|
77
77
|
...a,
|
|
78
78
|
...t,
|
|
@@ -87,7 +87,7 @@ const J = (s, e) => (t, { slots: r, attrs: a }) => Xe(
|
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
89
|
*/
|
|
90
|
-
const
|
|
90
|
+
const ys = J("chevron-right", [
|
|
91
91
|
["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]
|
|
92
92
|
]);
|
|
93
93
|
/**
|
|
@@ -96,7 +96,7 @@ const bs = J("chevron-right", [
|
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
98
|
*/
|
|
99
|
-
const
|
|
99
|
+
const ws = J("download", [
|
|
100
100
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
101
101
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
102
102
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
@@ -107,7 +107,7 @@ const xs = J("download", [
|
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const vs = J("ellipsis-vertical", [
|
|
111
111
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
112
112
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
113
113
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
@@ -118,7 +118,7 @@ const ys = J("ellipsis-vertical", [
|
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
120
|
*/
|
|
121
|
-
const
|
|
121
|
+
const Bt = J("funnel", [
|
|
122
122
|
[
|
|
123
123
|
"path",
|
|
124
124
|
{
|
|
@@ -133,7 +133,7 @@ const Ot = J("funnel", [
|
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
135
|
*/
|
|
136
|
-
const
|
|
136
|
+
const ks = J("layout-dashboard", [
|
|
137
137
|
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
|
|
138
138
|
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
|
|
139
139
|
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
|
|
@@ -145,7 +145,7 @@ const ws = J("layout-dashboard", [
|
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
147
|
*/
|
|
148
|
-
const
|
|
148
|
+
const $s = J("layout-grid", [
|
|
149
149
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
150
150
|
["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
|
|
151
151
|
["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
|
|
@@ -157,7 +157,7 @@ const vs = J("layout-grid", [
|
|
|
157
157
|
* This source code is licensed under the ISC license.
|
|
158
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
159
|
*/
|
|
160
|
-
const
|
|
160
|
+
const _s = J("pencil", [
|
|
161
161
|
[
|
|
162
162
|
"path",
|
|
163
163
|
{
|
|
@@ -173,7 +173,7 @@ const ks = J("pencil", [
|
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
175
|
*/
|
|
176
|
-
const
|
|
176
|
+
const qt = J("plus", [
|
|
177
177
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
178
178
|
["path", { d: "M12 5v14", key: "s699le" }]
|
|
179
179
|
]);
|
|
@@ -183,7 +183,7 @@ const At = J("plus", [
|
|
|
183
183
|
* This source code is licensed under the ISC license.
|
|
184
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
185
|
*/
|
|
186
|
-
const
|
|
186
|
+
const Ds = J("save", [
|
|
187
187
|
[
|
|
188
188
|
"path",
|
|
189
189
|
{
|
|
@@ -200,7 +200,7 @@ const $s = J("save", [
|
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
202
|
*/
|
|
203
|
-
const
|
|
203
|
+
const Cs = J("search", [
|
|
204
204
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
205
205
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
206
206
|
]);
|
|
@@ -210,7 +210,7 @@ const _s = J("search", [
|
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
212
|
*/
|
|
213
|
-
const
|
|
213
|
+
const zs = J("table-2", [
|
|
214
214
|
[
|
|
215
215
|
"path",
|
|
216
216
|
{
|
|
@@ -225,7 +225,7 @@ const Ds = J("table-2", [
|
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
227
|
*/
|
|
228
|
-
const
|
|
228
|
+
const Ss = J("trash-2", [
|
|
229
229
|
["path", { d: "M10 11v6", key: "nco0om" }],
|
|
230
230
|
["path", { d: "M14 11v6", key: "outv1u" }],
|
|
231
231
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
@@ -238,7 +238,7 @@ const Cs = J("trash-2", [
|
|
|
238
238
|
* This source code is licensed under the ISC license.
|
|
239
239
|
* See the LICENSE file in the root directory of this source tree.
|
|
240
240
|
*/
|
|
241
|
-
const
|
|
241
|
+
const Ts = J("x", [
|
|
242
242
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
243
243
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
244
244
|
]), He = {
|
|
@@ -246,7 +246,7 @@ const zs = J("x", [
|
|
|
246
246
|
month: "Місяць",
|
|
247
247
|
quarter: "Квартал",
|
|
248
248
|
year: "Рік"
|
|
249
|
-
},
|
|
249
|
+
}, Is = ["onClick"], Vs = { class: "flex items-center justify-between w-full" }, Ls = { key: 0 }, Rs = /* @__PURE__ */ ge({
|
|
250
250
|
__name: "vs-bi-dropdown",
|
|
251
251
|
props: {
|
|
252
252
|
title: {},
|
|
@@ -255,35 +255,35 @@ const zs = J("x", [
|
|
|
255
255
|
},
|
|
256
256
|
emits: ["selected"],
|
|
257
257
|
setup(s, { emit: e }) {
|
|
258
|
-
const t = s, r = e, a = S(!1), i = S(t.value ?? null), n = S(null), o =
|
|
259
|
-
const
|
|
260
|
-
return typeof
|
|
261
|
-
}), l =
|
|
262
|
-
const
|
|
263
|
-
(
|
|
258
|
+
const t = s, r = e, a = S(!1), i = S(t.value ?? null), n = S(null), o = B(() => {
|
|
259
|
+
const b = t.options;
|
|
260
|
+
return typeof b == "string" ? b.split(",").map((p, v) => ({ id: v, text: p.trim() })) : Array.isArray(b) ? b : [];
|
|
261
|
+
}), l = B(() => {
|
|
262
|
+
const b = o.value.find(
|
|
263
|
+
(p) => (p.id ?? p) === i.value
|
|
264
264
|
);
|
|
265
|
-
return
|
|
266
|
-
}), u = (
|
|
267
|
-
const
|
|
268
|
-
i.value =
|
|
269
|
-
}, c = (
|
|
270
|
-
n.value && !n.value.contains(
|
|
265
|
+
return b ? b.text ?? String(b) : t.title ?? "";
|
|
266
|
+
}), u = (b) => {
|
|
267
|
+
const p = (b == null ? void 0 : b.id) ?? b;
|
|
268
|
+
i.value = p, a.value = !1, r("selected", p), document.removeEventListener("click", c);
|
|
269
|
+
}, c = (b) => {
|
|
270
|
+
n.value && !n.value.contains(b.target) && (a.value = !1, document.removeEventListener("click", c));
|
|
271
271
|
}, f = () => {
|
|
272
272
|
a.value = !a.value, a.value ? setTimeout(() => {
|
|
273
273
|
document.addEventListener("click", c);
|
|
274
274
|
}, 200) : document.removeEventListener("click", c);
|
|
275
|
-
}, g = (
|
|
276
|
-
return
|
|
275
|
+
}, g = (b) => (He == null ? void 0 : He[b]) ?? b;
|
|
276
|
+
return Be(() => {
|
|
277
277
|
document.removeEventListener("click", c);
|
|
278
|
-
}), (
|
|
278
|
+
}), (b, p) => (h(), w(A, null, [
|
|
279
279
|
d("button", {
|
|
280
280
|
type: "button",
|
|
281
281
|
"aria-expanded": "true",
|
|
282
282
|
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",
|
|
283
283
|
onClick: f
|
|
284
284
|
}, [
|
|
285
|
-
X(
|
|
286
|
-
|
|
285
|
+
X(R(g(l.value)) + " ", 1),
|
|
286
|
+
p[0] || (p[0] = d("svg", {
|
|
287
287
|
class: "shrink-0 size-3.5 text-gray-600 dark:text-neutral-400",
|
|
288
288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
289
289
|
width: "16",
|
|
@@ -298,7 +298,7 @@ const zs = J("x", [
|
|
|
298
298
|
d("path", { d: "m6 9 6 6 6-6" })
|
|
299
299
|
], -1))
|
|
300
300
|
]),
|
|
301
|
-
a.value ? (
|
|
301
|
+
a.value ? (h(), w("div", {
|
|
302
302
|
key: 0,
|
|
303
303
|
ref_key: "biDropdown",
|
|
304
304
|
ref: n,
|
|
@@ -309,14 +309,14 @@ const zs = J("x", [
|
|
|
309
309
|
"aria-orientation": "vertical",
|
|
310
310
|
style: { "margin-top": "10px" }
|
|
311
311
|
}, [
|
|
312
|
-
(
|
|
312
|
+
(h(!0), w(A, null, G(o.value, (v) => (h(), w("div", {
|
|
313
313
|
key: v.id || v,
|
|
314
314
|
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",
|
|
315
315
|
onClick: (k) => u(v)
|
|
316
316
|
}, [
|
|
317
|
-
d("div",
|
|
318
|
-
d("span", null,
|
|
319
|
-
i.value === (v.id || v) ? (
|
|
317
|
+
d("div", Vs, [
|
|
318
|
+
d("span", null, R(g(v.text || v)), 1),
|
|
319
|
+
i.value === (v.id || v) ? (h(), w("span", Ls, p[1] || (p[1] = [
|
|
320
320
|
d("svg", {
|
|
321
321
|
class: "shrink-0 h-3.5 w-3.5 text-gray-800 dark:text-neutral-200",
|
|
322
322
|
xmlns: "http:.w3.org/2000/svg",
|
|
@@ -331,15 +331,15 @@ const zs = J("x", [
|
|
|
331
331
|
}, [
|
|
332
332
|
d("polyline", { points: "20 6 9 17 4 12" })
|
|
333
333
|
], -1)
|
|
334
|
-
]))) :
|
|
334
|
+
]))) : P("", !0)
|
|
335
335
|
])
|
|
336
|
-
], 8,
|
|
337
|
-
], 512)) :
|
|
336
|
+
], 8, Is))), 128))
|
|
337
|
+
], 512)) : P("", !0)
|
|
338
338
|
], 64));
|
|
339
339
|
}
|
|
340
|
-
}),
|
|
340
|
+
}), Fs = { class: "flex items-center space-x-2" }, Ws = /* @__PURE__ */ ge({
|
|
341
341
|
__name: "vs-bi-switch",
|
|
342
|
-
props: /* @__PURE__ */
|
|
342
|
+
props: /* @__PURE__ */ We({
|
|
343
343
|
leftLabel: {},
|
|
344
344
|
rightLabel: {},
|
|
345
345
|
modelValue: { type: Boolean }
|
|
@@ -350,65 +350,65 @@ const zs = J("x", [
|
|
|
350
350
|
},
|
|
351
351
|
modelModifiers: {}
|
|
352
352
|
}),
|
|
353
|
-
emits: /* @__PURE__ */
|
|
353
|
+
emits: /* @__PURE__ */ We(["update:is-enabled"], ["update:modelValue"]),
|
|
354
354
|
setup(s, { emit: e }) {
|
|
355
|
-
const t = e, r =
|
|
355
|
+
const t = e, r = Ot(s, "modelValue"), a = () => {
|
|
356
356
|
t("update:is-enabled", r);
|
|
357
357
|
};
|
|
358
|
-
return (i, n) => (
|
|
359
|
-
i.leftLabel ? (
|
|
358
|
+
return (i, n) => (h(), w("div", Fs, [
|
|
359
|
+
i.leftLabel ? (h(), w("div", {
|
|
360
360
|
key: 0,
|
|
361
361
|
class: K(["transition-colors", { "text-blue-500": !r.value }])
|
|
362
|
-
},
|
|
363
|
-
|
|
362
|
+
}, R(i.leftLabel), 3)) : P("", !0),
|
|
363
|
+
os(d("input", {
|
|
364
364
|
"onUpdate:modelValue": n[0] || (n[0] = (o) => r.value = o),
|
|
365
365
|
type: "checkbox",
|
|
366
366
|
class: "relative w-11 h-6 p-px bg-gray-100 border-transparent text-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:ring-blue-600 disabled:opacity-50 disabled:pointer-events-none checked:bg-none checked:text-blue-600 checked:border-blue-600 focus:checked:border-blue-600 dark:bg-neutral-800 dark:border-neutral-700 dark:checked:bg-blue-500 dark:checked:border-blue-500 dark:focus:ring-offset-gray-600 before:inline-block before:size-5 before:bg-white checked:before:bg-blue-200 before:translate-x-0 checked:before:translate-x-full before:rounded-full before:shadow before:h-5 before:w-5 before:transform before:ring-0 before:transition before:ease-in-out before:duration-200 dark:before:bg-neutral-400 dark:checked:before:bg-blue-200",
|
|
367
367
|
onChange: a
|
|
368
368
|
}, null, 544), [
|
|
369
|
-
[
|
|
369
|
+
[ls, r.value]
|
|
370
370
|
]),
|
|
371
|
-
i.rightLabel ? (
|
|
371
|
+
i.rightLabel ? (h(), w("div", {
|
|
372
372
|
key: 1,
|
|
373
373
|
class: K(["transition-colors", { "text-blue-500": r.value }])
|
|
374
|
-
},
|
|
374
|
+
}, R(i.rightLabel), 3)) : P("", !0)
|
|
375
375
|
]));
|
|
376
376
|
}
|
|
377
|
-
}),
|
|
377
|
+
}), H = (s, e) => {
|
|
378
378
|
const t = s.__vccOpts || s;
|
|
379
379
|
for (const [r, a] of e)
|
|
380
380
|
t[r] = a;
|
|
381
381
|
return t;
|
|
382
|
-
},
|
|
382
|
+
}, js = {}, Ns = { class: "flex items-center justify-center h-full" };
|
|
383
383
|
function Ps(s, e) {
|
|
384
|
-
return
|
|
384
|
+
return h(), w("div", Ns, e[0] || (e[0] = [
|
|
385
385
|
d("div", { class: "text-center text-gray-500" }, [
|
|
386
386
|
d("h2", { class: "text-2xl font-bold" }, "No data available")
|
|
387
387
|
], -1)
|
|
388
388
|
]));
|
|
389
389
|
}
|
|
390
|
-
const
|
|
391
|
-
"bi-bar":
|
|
392
|
-
"bi-number":
|
|
393
|
-
"bi-text":
|
|
394
|
-
"bi-listbar":
|
|
395
|
-
"bi-pie":
|
|
396
|
-
"bi-donut":
|
|
397
|
-
"bi-line":
|
|
398
|
-
"bi-stat":
|
|
399
|
-
"bi-pivot":
|
|
400
|
-
"bi-progress":
|
|
401
|
-
"bi-funnel":
|
|
402
|
-
"bi-map":
|
|
403
|
-
"bi-cluster":
|
|
404
|
-
"bi-table":
|
|
390
|
+
const Es = /* @__PURE__ */ H(js, [["render", Ps]]), Ct = {
|
|
391
|
+
"bi-bar": O(() => Promise.resolve().then(() => Un)),
|
|
392
|
+
"bi-number": O(() => import("./vs-number-greu-CL0.js")),
|
|
393
|
+
"bi-text": O(() => import("./vs-text-Qve46urW.js")),
|
|
394
|
+
"bi-listbar": O(() => Promise.resolve().then(() => Gi)),
|
|
395
|
+
"bi-pie": O(() => Promise.resolve().then(() => ri)),
|
|
396
|
+
"bi-donut": O(() => Promise.resolve().then(() => Yn)),
|
|
397
|
+
"bi-line": O(() => Promise.resolve().then(() => li)),
|
|
398
|
+
"bi-stat": O(() => Promise.resolve().then(() => _i)),
|
|
399
|
+
"bi-pivot": O(() => Promise.resolve().then(() => co)),
|
|
400
|
+
"bi-progress": O(() => Promise.resolve().then(() => Ni)),
|
|
401
|
+
"bi-funnel": O(() => import("./vs-funnel-bar-mfZboefB.js")),
|
|
402
|
+
"bi-map": O(() => import("./vs-map-DsfKv22S.js")),
|
|
403
|
+
"bi-cluster": O(() => import("./vs-map-cluster-P7aMMFIb.js")),
|
|
404
|
+
"bi-table": O(() => import("./vs-table-ByP_RpUg.js"))
|
|
405
405
|
};
|
|
406
|
-
let
|
|
407
|
-
function
|
|
408
|
-
|
|
406
|
+
let Mt = "/api";
|
|
407
|
+
function Me(s) {
|
|
408
|
+
Mt = s || "/api";
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
const t =
|
|
410
|
+
function Os(s, e) {
|
|
411
|
+
const t = Mt.replace(/\/$/, ""), a = s.startsWith("http") || s.startsWith("//") || t && s.startsWith(t) ? s : `${t}${s.startsWith("/") ? s : `/${s}`}`;
|
|
412
412
|
if (!e || !Object.keys(e).length) return a;
|
|
413
413
|
const i = new URLSearchParams();
|
|
414
414
|
Object.entries(e).forEach(([o, l]) => {
|
|
@@ -417,8 +417,8 @@ function Es(s, e) {
|
|
|
417
417
|
const n = i.toString();
|
|
418
418
|
return n ? `${a}${a.includes("?") ? "&" : "?"}${n}` : a;
|
|
419
419
|
}
|
|
420
|
-
async function
|
|
421
|
-
const { params: t, ...r } = e, a =
|
|
420
|
+
async function Re(s, e = {}) {
|
|
421
|
+
const { params: t, ...r } = e, a = Os(s, t), i = await fetch(a, {
|
|
422
422
|
...r,
|
|
423
423
|
headers: {
|
|
424
424
|
"Content-Type": "application/json",
|
|
@@ -437,26 +437,26 @@ async function Le(s, e = {}) {
|
|
|
437
437
|
return n;
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
const
|
|
440
|
+
const M = {
|
|
441
441
|
get(s, e) {
|
|
442
|
-
return
|
|
442
|
+
return Re(s, { ...e, method: "GET" });
|
|
443
443
|
},
|
|
444
444
|
post(s, e) {
|
|
445
|
-
return
|
|
445
|
+
return Re(s, { method: "POST", body: e != null ? JSON.stringify(e) : void 0 });
|
|
446
446
|
},
|
|
447
447
|
put(s, e) {
|
|
448
|
-
return
|
|
448
|
+
return Re(s, { method: "PUT", body: e != null ? JSON.stringify(e) : void 0 });
|
|
449
449
|
},
|
|
450
450
|
delete(s) {
|
|
451
|
-
return
|
|
451
|
+
return Re(s, { method: "DELETE" });
|
|
452
452
|
}
|
|
453
|
-
},
|
|
453
|
+
}, As = {
|
|
454
454
|
key: 0,
|
|
455
455
|
class: "text-[16px] flex max-w-full items-center min-h-0 justify-between max-h-[50px] h-fit shrink-0"
|
|
456
|
-
},
|
|
456
|
+
}, Bs = { class: "flex items-center justify-between w-full gap-2" }, qs = { class: "flex items-center gap-2 min-w-0" }, Ms = { class: "text-gray-800 max-h-[30px] inline-block line-clamp-1 font-semibold" }, Us = { class: "flex flex-col justify-end" }, Gs = {
|
|
457
457
|
key: 0,
|
|
458
458
|
class: "flex items-center justify-end w-full gap-2"
|
|
459
|
-
},
|
|
459
|
+
}, Hs = { class: "w-full h-full" }, je = /* @__PURE__ */ ge({
|
|
460
460
|
__name: "vs-widget",
|
|
461
461
|
props: {
|
|
462
462
|
dashboard: {},
|
|
@@ -468,44 +468,44 @@ const q = {
|
|
|
468
468
|
},
|
|
469
469
|
emits: ["update:current-widget-data"],
|
|
470
470
|
setup(s, { emit: e }) {
|
|
471
|
-
const t = s, r = e, a = S(null), i = S(null), n = S(null), o = S({}), l = S([]), u =
|
|
471
|
+
const t = s, r = e, a = S(null), i = S(null), n = S(null), o = S({}), l = S([]), u = B(() => {
|
|
472
472
|
var x, y;
|
|
473
|
-
const
|
|
474
|
-
return ((y =
|
|
475
|
-
}), c =
|
|
473
|
+
const m = (x = t.dashboardWidgets) == null ? void 0 : x.find((_) => _.name === t.widget);
|
|
474
|
+
return ((y = m == null ? void 0 : m.data) == null ? void 0 : y.title) ?? (m == null ? void 0 : m.title) ?? "";
|
|
475
|
+
}), c = B(() => {
|
|
476
476
|
var x;
|
|
477
|
-
const
|
|
478
|
-
return (
|
|
479
|
-
}), f =
|
|
477
|
+
const m = (x = t.dashboardWidgets) == null ? void 0 : x.find((y) => y.name === t.widget);
|
|
478
|
+
return (m == null ? void 0 : m.type) ?? "text";
|
|
479
|
+
}), f = B(() => {
|
|
480
480
|
var x;
|
|
481
|
-
const
|
|
482
|
-
return !
|
|
481
|
+
const m = (x = o.value) == null ? void 0 : x.controls;
|
|
482
|
+
return !m || typeof m == "boolean" ? [] : Object.keys(m).map((y) => ({
|
|
483
483
|
name: y,
|
|
484
|
-
options:
|
|
484
|
+
options: m[y]
|
|
485
485
|
}));
|
|
486
|
-
}), g =
|
|
487
|
-
const
|
|
488
|
-
return
|
|
486
|
+
}), g = B(() => {
|
|
487
|
+
const m = c.value ? `bi-${c.value}` : "";
|
|
488
|
+
return m && m in Ct ? Ct[m] : null;
|
|
489
489
|
});
|
|
490
|
-
function m
|
|
491
|
-
var y,
|
|
492
|
-
(
|
|
490
|
+
function b(m, x) {
|
|
491
|
+
var y, _;
|
|
492
|
+
(_ = (y = i.value) == null ? void 0 : y.changeStyle) == null || _.call(y, m, x);
|
|
493
493
|
}
|
|
494
|
-
function
|
|
495
|
-
const y = l.value.find((
|
|
496
|
-
y ? y.option =
|
|
494
|
+
function p(m, x) {
|
|
495
|
+
const y = l.value.find((_) => _.name === x);
|
|
496
|
+
y ? y.option = m : l.value.push({ name: x, option: m }), v();
|
|
497
497
|
}
|
|
498
498
|
function v() {
|
|
499
499
|
var x, y;
|
|
500
|
-
let
|
|
501
|
-
l.value.forEach((
|
|
502
|
-
|
|
503
|
-
}), (y = (x = i.value) == null ? void 0 : x.getDataFromURL) == null || y.call(x,
|
|
500
|
+
let m = `/bi-data?dashboard=${t.dashboard}&widget=${t.widget}`;
|
|
501
|
+
l.value.forEach((_) => {
|
|
502
|
+
m += `&${_.name}=${_.option}`;
|
|
503
|
+
}), (y = (x = i.value) == null ? void 0 : x.getDataFromURL) == null || y.call(x, m);
|
|
504
504
|
}
|
|
505
505
|
function k() {
|
|
506
|
-
const
|
|
507
|
-
if (
|
|
508
|
-
const x =
|
|
506
|
+
const m = n.value;
|
|
507
|
+
if (m != null && m.getDataURL) {
|
|
508
|
+
const x = m.getDataURL({
|
|
509
509
|
type: "png",
|
|
510
510
|
pixelRatio: 2,
|
|
511
511
|
backgroundColor: "#ffffff"
|
|
@@ -514,92 +514,92 @@ const q = {
|
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
return ie(() => {
|
|
517
|
-
t.prefix &&
|
|
517
|
+
t.prefix && Me(t.prefix);
|
|
518
518
|
}), ne(
|
|
519
519
|
() => t.filterURl,
|
|
520
|
-
(
|
|
520
|
+
(m) => {
|
|
521
521
|
var x, y;
|
|
522
|
-
|
|
522
|
+
m && ((y = (x = i.value) == null ? void 0 : x.setFilter) == null || y.call(x, m));
|
|
523
523
|
}
|
|
524
524
|
), ne(
|
|
525
525
|
() => t.selectedWidget,
|
|
526
|
-
(
|
|
526
|
+
(m, x) => {
|
|
527
527
|
var y;
|
|
528
|
-
|
|
528
|
+
m !== x && m === ((y = o.value) == null ? void 0 : y.id) && r("update:current-widget-data", o.value);
|
|
529
529
|
}
|
|
530
530
|
), ne(
|
|
531
531
|
o,
|
|
532
|
-
(
|
|
533
|
-
if ((
|
|
532
|
+
(m, x) => {
|
|
533
|
+
if ((m == null ? void 0 : m.id) === (x == null ? void 0 : x.id)) return;
|
|
534
534
|
const y = typeof window < "u" ? new URLSearchParams(window.top.location.search).get("widget") : null;
|
|
535
|
-
y && y === (
|
|
535
|
+
y && y === (m == null ? void 0 : m.id) && r("update:current-widget-data", m);
|
|
536
536
|
},
|
|
537
537
|
{ deep: !0 }
|
|
538
|
-
), (
|
|
539
|
-
var y,
|
|
540
|
-
return
|
|
538
|
+
), (m, x) => {
|
|
539
|
+
var y, _, T, $, E, U, Z, se, re;
|
|
540
|
+
return h(), w("div", {
|
|
541
541
|
ref_key: "widgetRef",
|
|
542
542
|
ref: a,
|
|
543
543
|
class: K(["box-border relative h-full p-4 bg-white border border-gray-200 rounded-xl shadow-sm select-auto", [
|
|
544
|
-
(
|
|
544
|
+
(_ = (y = o.value) == null ? void 0 : y.style) != null && _.height ? `max-h-[${($ = (T = o.value) == null ? void 0 : T.style) == null ? void 0 : $.height}px] h-[${(U = (E = o.value) == null ? void 0 : E.style) == null ? void 0 : U.height}px]` : "max-h-[460px]"
|
|
545
545
|
]])
|
|
546
546
|
}, [
|
|
547
|
-
["text", "cluster", "map"].includes(c.value) ?
|
|
548
|
-
d("div",
|
|
549
|
-
d("div", As, [
|
|
550
|
-
d("span", Bs, L(u.value), 1)
|
|
551
|
-
]),
|
|
547
|
+
["text", "cluster", "map"].includes(c.value) ? P("", !0) : (h(), w("div", As, [
|
|
548
|
+
d("div", Bs, [
|
|
552
549
|
d("div", qs, [
|
|
553
|
-
(
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
550
|
+
d("span", Ms, R(u.value), 1)
|
|
551
|
+
]),
|
|
552
|
+
d("div", Us, [
|
|
553
|
+
(Z = f.value) != null && Z.length ? (h(), w("span", Gs, [
|
|
554
|
+
(h(!0), w(A, null, G((se = f.value) == null ? void 0 : se.filter(
|
|
555
|
+
(D) => (D == null ? void 0 : D.options) && (D == null ? void 0 : D.name) !== "export"
|
|
556
|
+
), (D) => {
|
|
557
|
+
var ae, ue;
|
|
558
|
+
return h(), w("div", {
|
|
559
|
+
key: D == null ? void 0 : D.name
|
|
560
560
|
}, [
|
|
561
|
-
Array.isArray(
|
|
561
|
+
Array.isArray(D == null ? void 0 : D.options) ? (h(), F(Rs, {
|
|
562
562
|
key: 0,
|
|
563
|
-
title:
|
|
564
|
-
options:
|
|
565
|
-
value: ((
|
|
566
|
-
onSelected: (
|
|
567
|
-
}, null, 8, ["title", "options", "value", "onSelected"])) : typeof
|
|
563
|
+
title: D == null ? void 0 : D.name,
|
|
564
|
+
options: D == null ? void 0 : D.options,
|
|
565
|
+
value: ((ue = (ae = o.value) == null ? void 0 : ae.data) == null ? void 0 : ue[D == null ? void 0 : D.name]) ?? null,
|
|
566
|
+
onSelected: (ce) => p(ce, D == null ? void 0 : D.name)
|
|
567
|
+
}, null, 8, ["title", "options", "value", "onSelected"])) : typeof D.options == "boolean" ? (h(), F(Ws, {
|
|
568
568
|
key: 1,
|
|
569
|
-
"left-label":
|
|
570
|
-
"model-value": !!(
|
|
571
|
-
"onUpdate:isEnabled": (
|
|
572
|
-
}, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) :
|
|
569
|
+
"left-label": D == null ? void 0 : D.name,
|
|
570
|
+
"model-value": !!(D != null && D.options),
|
|
571
|
+
"onUpdate:isEnabled": (ce) => b(D == null ? void 0 : D.name, ce)
|
|
572
|
+
}, null, 8, ["left-label", "model-value", "onUpdate:isEnabled"])) : P("", !0)
|
|
573
573
|
]);
|
|
574
574
|
}), 128)),
|
|
575
|
-
(re = f.value) != null && re.some((
|
|
575
|
+
(re = f.value) != null && re.some((D) => (D == null ? void 0 : D.name) === "export") ? (h(), w("button", {
|
|
576
576
|
key: 0,
|
|
577
577
|
type: "button",
|
|
578
578
|
class: "h-[32px] w-[32px] rounded-lg hover:bg-gray-100 duration-100 flex items-center justify-center",
|
|
579
579
|
onClick: k
|
|
580
580
|
}, [
|
|
581
|
-
|
|
581
|
+
C(L(ws), {
|
|
582
582
|
size: 16,
|
|
583
583
|
class: "text-gray-800"
|
|
584
584
|
})
|
|
585
|
-
])) :
|
|
586
|
-
])) :
|
|
585
|
+
])) : P("", !0)
|
|
586
|
+
])) : P("", !0)
|
|
587
587
|
])
|
|
588
588
|
])
|
|
589
589
|
])),
|
|
590
|
-
d("div",
|
|
591
|
-
g.value ? (
|
|
590
|
+
d("div", Hs, [
|
|
591
|
+
g.value ? (h(), F(At(g.value), {
|
|
592
592
|
key: 0,
|
|
593
593
|
ref_key: "chartRef",
|
|
594
594
|
ref: i,
|
|
595
595
|
"current-widget": n.value,
|
|
596
|
-
"onUpdate:currentWidget": x[0] || (x[0] = (
|
|
596
|
+
"onUpdate:currentWidget": x[0] || (x[0] = (D) => n.value = D),
|
|
597
597
|
"widget-data": o.value,
|
|
598
|
-
"onUpdate:widgetData": x[1] || (x[1] = (
|
|
599
|
-
dashboard:
|
|
598
|
+
"onUpdate:widgetData": x[1] || (x[1] = (D) => o.value = D),
|
|
599
|
+
dashboard: m.dashboard,
|
|
600
600
|
title: u.value,
|
|
601
|
-
widget:
|
|
602
|
-
}, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget"])) : (
|
|
601
|
+
widget: m.widget
|
|
602
|
+
}, null, 40, ["current-widget", "widget-data", "dashboard", "title", "widget"])) : (h(), F(Es, {
|
|
603
603
|
key: 1,
|
|
604
604
|
class: "w-full h-full"
|
|
605
605
|
}))
|
|
@@ -607,106 +607,106 @@ const q = {
|
|
|
607
607
|
], 2);
|
|
608
608
|
};
|
|
609
609
|
}
|
|
610
|
-
}),
|
|
610
|
+
}), Zs = { class: "w-full overflow-hidden rounded vs-table-interface__table-wrp h-fit" }, Qs = { class: "p-5 min-h-[500px] flex flex-col justify-center items-center text-center" }, Xs = { class: "max-w-sm mx-auto mt-6" }, Ks = { class: "font-medium text-gray-800 dark:text-neutral-200" }, Ys = { class: "mt-2 text-sm text-gray-500 dark:text-neutral-500" }, Ne = /* @__PURE__ */ ge({
|
|
611
611
|
__name: "vs-new-nodata",
|
|
612
612
|
props: {
|
|
613
613
|
title: { default: "Дані для відображення відсутні" },
|
|
614
614
|
text: { default: "Змініть параметри пошуку або спробуйте пізніше" }
|
|
615
615
|
},
|
|
616
616
|
setup(s) {
|
|
617
|
-
return (e, t) => (
|
|
617
|
+
return (e, t) => (h(), w("div", Zs, [
|
|
618
618
|
d("div", null, [
|
|
619
|
-
d("div",
|
|
620
|
-
t[0] || (t[0] =
|
|
621
|
-
d("div",
|
|
622
|
-
d("p",
|
|
623
|
-
d("p",
|
|
619
|
+
d("div", Qs, [
|
|
620
|
+
t[0] || (t[0] = cs('<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)),
|
|
621
|
+
d("div", Xs, [
|
|
622
|
+
d("p", Ks, R(e.title), 1),
|
|
623
|
+
d("p", Ys, R(e.text), 1)
|
|
624
624
|
])
|
|
625
625
|
])
|
|
626
626
|
])
|
|
627
627
|
]));
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), Js = {
|
|
630
630
|
__name: "filter",
|
|
631
631
|
setup(s) {
|
|
632
|
-
return (e, t) => (
|
|
632
|
+
return (e, t) => (h(), F(L(Bt), de(e.$attrs, { size: 24 }), null, 16));
|
|
633
633
|
}
|
|
634
|
-
},
|
|
635
|
-
components: { filterIcon:
|
|
634
|
+
}, er = {
|
|
635
|
+
components: { filterIcon: Js },
|
|
636
636
|
props: ["filterScheme"],
|
|
637
637
|
emits: ["filters:changed"]
|
|
638
|
-
},
|
|
638
|
+
}, tr = { class: "flex items-center" }, sr = {
|
|
639
639
|
key: 0,
|
|
640
640
|
type: "button",
|
|
641
641
|
class: "py-2 px-2.5 ml-3 h-[38px] inline-flex items-center gap-x-1.5 text-xs font-medium rounded-lg border border-gray-200 bg-white text-gray-800 hover:bg-gray-50 disabled:opacity-50 disabled:pointer-events-none focus:outline-none focus:bg-gray-50 opacity-60 cursor-not-allowed",
|
|
642
642
|
disabled: "",
|
|
643
643
|
title: "Фільтри вимкнено (v3-filter видалено)"
|
|
644
644
|
};
|
|
645
|
-
function
|
|
645
|
+
function rr(s, e, t, r, a, i) {
|
|
646
646
|
const n = Q("filterIcon");
|
|
647
|
-
return
|
|
648
|
-
t.filterScheme ? (
|
|
649
|
-
|
|
647
|
+
return h(), w("div", tr, [
|
|
648
|
+
t.filterScheme ? (h(), w("button", sr, [
|
|
649
|
+
C(n),
|
|
650
650
|
e[0] || (e[0] = X(" Фільтри "))
|
|
651
|
-
])) :
|
|
651
|
+
])) : P("", !0)
|
|
652
652
|
]);
|
|
653
653
|
}
|
|
654
|
-
const
|
|
655
|
-
components: { VsFilterHeader:
|
|
654
|
+
const ar = /* @__PURE__ */ H(er, [["render", rr]]), nr = {
|
|
655
|
+
components: { VsFilterHeader: ar },
|
|
656
656
|
props: {
|
|
657
657
|
dashboardData: { type: Object, default: null },
|
|
658
658
|
filters: { type: Array, default: null }
|
|
659
659
|
}
|
|
660
|
-
},
|
|
660
|
+
}, ir = { class: "bg-white px-5 flex gap-4 h-[90px] border border-gray-200 rounded-xl mb-2 pt-[3px] justify-between items-center" }, or = { class: "grow" }, lr = { class: "text-lg font-semibold text-stone-800 dark:text-neutral-200" }, cr = {
|
|
661
661
|
key: 0,
|
|
662
662
|
class: "inline-flex items-center text-sm gap-x-2 text-stone-800 hover:text-stone-500 focus:outline-none focus:text-stone-500 dark:text-neutral-200 dark:hover:text-neutral-400 dark:focus:text-neutral-400"
|
|
663
|
-
},
|
|
663
|
+
}, dr = {
|
|
664
664
|
key: 0,
|
|
665
665
|
class: "flex items-center gap-3"
|
|
666
666
|
};
|
|
667
|
-
function
|
|
667
|
+
function ur(s, e, t, r, a, i) {
|
|
668
668
|
var o, l, u;
|
|
669
669
|
const n = Q("VsFilterHeader");
|
|
670
|
-
return
|
|
671
|
-
d("div",
|
|
672
|
-
d("h1",
|
|
673
|
-
(l = t.dashboardData) != null && l.description ? (
|
|
670
|
+
return h(), w("div", ir, [
|
|
671
|
+
d("div", or, [
|
|
672
|
+
d("h1", lr, R((o = t.dashboardData) == null ? void 0 : o.title), 1),
|
|
673
|
+
(l = t.dashboardData) != null && l.description ? (h(), w("button", cr, R((u = t.dashboardData) == null ? void 0 : u.description), 1)) : P("", !0)
|
|
674
674
|
]),
|
|
675
|
-
t.filters ? (
|
|
676
|
-
|
|
675
|
+
t.filters ? (h(), w("div", dr, [
|
|
676
|
+
C(n, {
|
|
677
677
|
filterScheme: t.filters,
|
|
678
678
|
"onFilters:changed": e[0] || (e[0] = (c) => s.$emit("filters:changed", c))
|
|
679
679
|
}, null, 8, ["filterScheme"])
|
|
680
|
-
])) :
|
|
680
|
+
])) : P("", !0)
|
|
681
681
|
]);
|
|
682
682
|
}
|
|
683
|
-
const
|
|
684
|
-
var
|
|
683
|
+
const pr = /* @__PURE__ */ H(nr, [["render", ur]]);
|
|
684
|
+
var Ut = {}, zt;
|
|
685
685
|
(function(s) {
|
|
686
686
|
s.pop = "pop", s.push = "push";
|
|
687
|
-
})(
|
|
688
|
-
var
|
|
687
|
+
})(zt || (zt = {}));
|
|
688
|
+
var St;
|
|
689
689
|
(function(s) {
|
|
690
690
|
s.back = "back", s.forward = "forward", s.unknown = "";
|
|
691
|
-
})(
|
|
692
|
-
var
|
|
691
|
+
})(St || (St = {}));
|
|
692
|
+
var Tt;
|
|
693
693
|
(function(s) {
|
|
694
694
|
s[s.aborted = 4] = "aborted", s[s.cancelled = 8] = "cancelled", s[s.duplicated = 16] = "duplicated";
|
|
695
|
-
})(
|
|
696
|
-
const
|
|
695
|
+
})(Tt || (Tt = {}));
|
|
696
|
+
const hr = Symbol(Ut.NODE_ENV !== "production" ? "router" : ""), fr = Symbol(Ut.NODE_ENV !== "production" ? "route location" : "");
|
|
697
697
|
function Je() {
|
|
698
|
-
return
|
|
698
|
+
return qe(hr);
|
|
699
699
|
}
|
|
700
|
-
function
|
|
701
|
-
return
|
|
700
|
+
function gr(s) {
|
|
701
|
+
return qe(fr);
|
|
702
702
|
}
|
|
703
|
-
const
|
|
703
|
+
const mr = {
|
|
704
704
|
key: 0,
|
|
705
705
|
class: "text-gray-400 shrink-0"
|
|
706
|
-
},
|
|
706
|
+
}, br = ["onClick"], xr = ["onClick"], yr = {
|
|
707
707
|
key: 4,
|
|
708
708
|
class: "text-gray-900 font-medium truncate"
|
|
709
|
-
},
|
|
709
|
+
}, Gt = {
|
|
710
710
|
__name: "vs-breadcrumbs",
|
|
711
711
|
props: {
|
|
712
712
|
items: {
|
|
@@ -717,44 +717,44 @@ const fr = {
|
|
|
717
717
|
compact: { type: Boolean, default: !1 }
|
|
718
718
|
},
|
|
719
719
|
setup(s) {
|
|
720
|
-
const e = s, t = Je(), r =
|
|
720
|
+
const e = s, t = Je(), r = B(() => Array.isArray(e.items) ? e.items : []);
|
|
721
721
|
function a(i) {
|
|
722
722
|
t != null && t.push ? t.push(i) : typeof i == "string" && (window != null && window.location) && (window.location.href = i);
|
|
723
723
|
}
|
|
724
724
|
return (i, n) => {
|
|
725
725
|
const o = Q("router-link");
|
|
726
|
-
return
|
|
726
|
+
return h(), w("nav", {
|
|
727
727
|
class: K(["flex items-center gap-2 text-sm text-gray-600", s.compact ? "py-1" : "py-6"]),
|
|
728
728
|
"aria-label": "Breadcrumb"
|
|
729
729
|
}, [
|
|
730
|
-
(
|
|
731
|
-
u > 0 ? (
|
|
732
|
-
|
|
733
|
-
])) :
|
|
734
|
-
typeof l.onClick == "function" ? (
|
|
730
|
+
(h(!0), w(A, null, G(r.value, (l, u) => (h(), w(A, { key: u }, [
|
|
731
|
+
u > 0 ? (h(), w("span", mr, [
|
|
732
|
+
C(L(ys), { class: "w-4 h-4" })
|
|
733
|
+
])) : P("", !0),
|
|
734
|
+
typeof l.onClick == "function" ? (h(), w("span", {
|
|
735
735
|
key: 1,
|
|
736
736
|
class: "hover:text-gray-900 transition-colors cursor-pointer",
|
|
737
737
|
onClick: (c) => l.onClick()
|
|
738
|
-
},
|
|
738
|
+
}, R(l.label), 9, br)) : L(t) && l.to ? (h(), F(o, {
|
|
739
739
|
key: 2,
|
|
740
740
|
to: l.to,
|
|
741
741
|
class: "hover:text-gray-900 transition-colors"
|
|
742
742
|
}, {
|
|
743
|
-
default:
|
|
744
|
-
X(
|
|
743
|
+
default: V(() => [
|
|
744
|
+
X(R(l.label), 1)
|
|
745
745
|
]),
|
|
746
746
|
_: 2
|
|
747
|
-
}, 1032, ["to"])) : l.to ? (
|
|
747
|
+
}, 1032, ["to"])) : l.to ? (h(), w("span", {
|
|
748
748
|
key: 3,
|
|
749
749
|
class: "hover:text-gray-900 transition-colors cursor-pointer",
|
|
750
750
|
onClick: (c) => a(l.to)
|
|
751
|
-
},
|
|
751
|
+
}, R(l.label), 9, xr)) : (h(), w("span", yr, R(l.label), 1))
|
|
752
752
|
], 64))), 128))
|
|
753
753
|
], 2);
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
},
|
|
757
|
-
components: { VsWidget:
|
|
756
|
+
}, wr = {
|
|
757
|
+
components: { VsWidget: je, VsNewNodata: Ne, VsHeader: pr, VsBreadcrumbs: Gt },
|
|
758
758
|
props: ["id", "prefix"],
|
|
759
759
|
data() {
|
|
760
760
|
return {
|
|
@@ -767,13 +767,13 @@ const fr = {
|
|
|
767
767
|
};
|
|
768
768
|
},
|
|
769
769
|
async mounted() {
|
|
770
|
-
|
|
770
|
+
Me(this.prefix || "/api"), await this.fetchData();
|
|
771
771
|
},
|
|
772
772
|
methods: {
|
|
773
773
|
async fetchData() {
|
|
774
774
|
if (this.id)
|
|
775
775
|
try {
|
|
776
|
-
const s = await
|
|
776
|
+
const s = await M.get(`/bi-dashboard/${this.id}`);
|
|
777
777
|
this.dashboardData = s;
|
|
778
778
|
} catch (s) {
|
|
779
779
|
console.error(s);
|
|
@@ -802,29 +802,29 @@ const fr = {
|
|
|
802
802
|
}), this.filterURl += e);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
},
|
|
806
|
-
function
|
|
805
|
+
}, vr = { class: "w-full pb-8 overflow-y-auto mx-auto" }, kr = { class: "grid flex-grow w-full grid-cols-12 gap-4 h-fit" };
|
|
806
|
+
function $r(s, e, t, r, a, i) {
|
|
807
807
|
var l;
|
|
808
808
|
const n = Q("VsNewNodata"), o = Q("VsWidget");
|
|
809
|
-
return
|
|
810
|
-
d("div",
|
|
811
|
-
a.error || !a.dashboardData ? (
|
|
809
|
+
return h(), w("div", vr, [
|
|
810
|
+
d("div", kr, [
|
|
811
|
+
a.error || !a.dashboardData ? (h(), F(n, {
|
|
812
812
|
key: 0,
|
|
813
813
|
class: "col-span-12"
|
|
814
|
-
})) :
|
|
815
|
-
(
|
|
814
|
+
})) : P("", !0),
|
|
815
|
+
(h(!0), w(A, null, G(((l = a.dashboardData) == null ? void 0 : l.panels) || [], (u, c) => {
|
|
816
816
|
var f;
|
|
817
|
-
return
|
|
817
|
+
return h(), w("div", {
|
|
818
818
|
key: c,
|
|
819
819
|
class: K([`col-span-${u.col || 12}`, "flex flex-col gap-[10px]"])
|
|
820
820
|
}, [
|
|
821
|
-
(f = u.widgets) != null && f.length ? (
|
|
821
|
+
(f = u.widgets) != null && f.length ? (h(!0), w(A, { key: 0 }, G(u.widgets, (g) => (h(), F(o, {
|
|
822
822
|
key: g,
|
|
823
823
|
dashboard: t.id,
|
|
824
824
|
widget: g,
|
|
825
825
|
"dashboard-widgets": a.dashboardData.widgets,
|
|
826
826
|
"filter-u-rl": a.filterURl
|
|
827
|
-
}, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))), 128)) : (
|
|
827
|
+
}, null, 8, ["dashboard", "widget", "dashboard-widgets", "filter-u-rl"]))), 128)) : (h(), F(o, {
|
|
828
828
|
key: 1,
|
|
829
829
|
class: "flex flex-col",
|
|
830
830
|
dashboard: t.id,
|
|
@@ -837,13 +837,13 @@ function vr(s, e, t, r, a, i) {
|
|
|
837
837
|
])
|
|
838
838
|
]);
|
|
839
839
|
}
|
|
840
|
-
const
|
|
840
|
+
const ho = /* @__PURE__ */ H(wr, [["render", $r]]), _r = {
|
|
841
841
|
key: 0,
|
|
842
842
|
class: "vs-modal-wrapper fixed inset-0 flex items-center justify-center p-4"
|
|
843
|
-
},
|
|
843
|
+
}, Dr = { class: "flex items-center justify-between shrink-0 py-2.5 px-4 border-b border-gray-200 dark:border-[#454545]" }, Cr = { class: "font-medium text-gray-800 dark:text-white" }, zr = { class: "vs-modal-content flex-1 min-h-0 overflow-auto p-4" }, Sr = {
|
|
844
844
|
key: 0,
|
|
845
845
|
class: "shrink-0 border-t border-gray-200 dark:border-neutral-700"
|
|
846
|
-
},
|
|
846
|
+
}, Tr = {
|
|
847
847
|
__name: "vs-modal",
|
|
848
848
|
props: {
|
|
849
849
|
visible: { type: Boolean, default: !1 },
|
|
@@ -854,7 +854,7 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
854
854
|
},
|
|
855
855
|
emits: ["close", "update:visible"],
|
|
856
856
|
setup(s, { emit: e }) {
|
|
857
|
-
const t = s, r = e, a =
|
|
857
|
+
const t = s, r = e, a = B(() => t.size === "small" ? "md:max-w-[40%] w-full max-w-md" : t.size === "lg" ? "md:max-w-[70%] w-full max-w-4xl" : "md:max-w-[50%] w-full max-w-lg");
|
|
858
858
|
function i() {
|
|
859
859
|
r("update:visible", !1), r("close");
|
|
860
860
|
}
|
|
@@ -863,30 +863,30 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
863
863
|
}
|
|
864
864
|
return ie(() => {
|
|
865
865
|
window.addEventListener("keydown", n);
|
|
866
|
-
}),
|
|
866
|
+
}), Be(() => {
|
|
867
867
|
window.removeEventListener("keydown", n);
|
|
868
|
-
}), (o, l) => (
|
|
869
|
-
s.visible ? (
|
|
868
|
+
}), (o, l) => (h(), F(ds, { to: s.teleport }, [
|
|
869
|
+
s.visible ? (h(), w("div", _r, [
|
|
870
870
|
d("div", {
|
|
871
871
|
class: "absolute inset-0 bg-black/50",
|
|
872
872
|
"aria-hidden": "true",
|
|
873
873
|
onMousedown: l[0] || (l[0] = (u) => s.closeClickBack && u.target === u.currentTarget && i())
|
|
874
874
|
}, null, 32),
|
|
875
|
-
|
|
875
|
+
C(us, {
|
|
876
876
|
name: "vs-modal",
|
|
877
877
|
appear: ""
|
|
878
878
|
}, {
|
|
879
|
-
default:
|
|
880
|
-
s.visible ? (
|
|
879
|
+
default: V(() => [
|
|
880
|
+
s.visible ? (h(), w("div", {
|
|
881
881
|
key: 0,
|
|
882
882
|
class: K(["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]", a.value]),
|
|
883
883
|
role: "dialog",
|
|
884
884
|
"aria-modal": "true",
|
|
885
|
-
onMousedown: l[1] || (l[1] =
|
|
885
|
+
onMousedown: l[1] || (l[1] = ps(() => {
|
|
886
886
|
}, ["stop"]))
|
|
887
887
|
}, [
|
|
888
|
-
d("div",
|
|
889
|
-
d("h3",
|
|
888
|
+
d("div", Dr, [
|
|
889
|
+
d("h3", Cr, R(s.title), 1),
|
|
890
890
|
d("button", {
|
|
891
891
|
type: "button",
|
|
892
892
|
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",
|
|
@@ -909,25 +909,25 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
909
909
|
], -1)
|
|
910
910
|
]))
|
|
911
911
|
]),
|
|
912
|
-
d("div",
|
|
913
|
-
|
|
912
|
+
d("div", zr, [
|
|
913
|
+
$t(o.$slots, "default", {}, void 0, !0)
|
|
914
914
|
]),
|
|
915
|
-
o.$slots.footer ? (
|
|
916
|
-
|
|
917
|
-
])) :
|
|
918
|
-
], 34)) :
|
|
915
|
+
o.$slots.footer ? (h(), w("div", Sr, [
|
|
916
|
+
$t(o.$slots, "footer", {}, void 0, !0)
|
|
917
|
+
])) : P("", !0)
|
|
918
|
+
], 34)) : P("", !0)
|
|
919
919
|
]),
|
|
920
920
|
_: 3
|
|
921
921
|
})
|
|
922
|
-
])) :
|
|
922
|
+
])) : P("", !0)
|
|
923
923
|
], 8, ["to"]));
|
|
924
924
|
}
|
|
925
|
-
},
|
|
925
|
+
}, Te = /* @__PURE__ */ H(Tr, [["__scopeId", "data-v-5722a50f"]]), Ir = {
|
|
926
926
|
__name: "icon-plus",
|
|
927
927
|
setup(s) {
|
|
928
|
-
return (e, t) => (
|
|
928
|
+
return (e, t) => (h(), F(L(qt), de(e.$attrs, { size: 24 }), null, 16));
|
|
929
929
|
}
|
|
930
|
-
},
|
|
930
|
+
}, Vr = { class: "mb-4 overflow-auto scrollbar max-h-96" }, Lr = {
|
|
931
931
|
__name: "vs-editor-create-widget",
|
|
932
932
|
props: {
|
|
933
933
|
columns: {
|
|
@@ -940,8 +940,8 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
940
940
|
},
|
|
941
941
|
emits: "update-data",
|
|
942
942
|
setup(s, { expose: e, emit: t }) {
|
|
943
|
-
var
|
|
944
|
-
const r =
|
|
943
|
+
var p;
|
|
944
|
+
const r = O(() => import("@opengis/form")), a = (p = me().proxy) == null ? void 0 : p.$notify, i = t, n = s, o = S(!1), l = S({}), u = S();
|
|
945
945
|
function c() {
|
|
946
946
|
o.value = !0;
|
|
947
947
|
}
|
|
@@ -951,7 +951,7 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
951
951
|
e({ open: c, close: f });
|
|
952
952
|
const g = async () => {
|
|
953
953
|
try {
|
|
954
|
-
await u.value.doValidation(), await
|
|
954
|
+
await u.value.doValidation(), await M.post(
|
|
955
955
|
`/bi-dashboard/${n.selectedDashboard}`,
|
|
956
956
|
l.value
|
|
957
957
|
), await a({
|
|
@@ -966,8 +966,8 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
966
966
|
message: "При спробі створити віджет сталася помилка"
|
|
967
967
|
});
|
|
968
968
|
}
|
|
969
|
-
},
|
|
970
|
-
var v, k,
|
|
969
|
+
}, b = B(() => {
|
|
970
|
+
var v, k, m, x;
|
|
971
971
|
return {
|
|
972
972
|
title: {
|
|
973
973
|
type: "text",
|
|
@@ -983,10 +983,10 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
983
983
|
validators: ["required"],
|
|
984
984
|
options: (k = (v = n.columns) == null ? void 0 : v.filter(
|
|
985
985
|
(y) => (y == null ? void 0 : y.type) == "text" || (y == null ? void 0 : y.type) === "date" || (y == null ? void 0 : y.type) === "timestamp without time zone" || (y == null ? void 0 : y.type) === "boolean" || (y == null ? void 0 : y.type) === "integer"
|
|
986
|
-
)) == null ? void 0 : k.map(({ name: y, type:
|
|
986
|
+
)) == null ? void 0 : k.map(({ name: y, type: _ }) => ({
|
|
987
987
|
id: y,
|
|
988
988
|
label: y,
|
|
989
|
-
type:
|
|
989
|
+
type: _
|
|
990
990
|
}))
|
|
991
991
|
},
|
|
992
992
|
metric: {
|
|
@@ -997,10 +997,10 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
997
997
|
style: { size: "xs" },
|
|
998
998
|
options: [
|
|
999
999
|
{ id: "count", label: "count" },
|
|
1000
|
-
...(x = (
|
|
1000
|
+
...(x = (m = n.columns) == null ? void 0 : m.filter((y) => (y == null ? void 0 : y.type) === "numeric" || (y == null ? void 0 : y.type) === "double precision")) == null ? void 0 : x.map(({ name: y, type: _ }) => ({
|
|
1001
1001
|
id: y,
|
|
1002
1002
|
label: y,
|
|
1003
|
-
type:
|
|
1003
|
+
type: _
|
|
1004
1004
|
}))
|
|
1005
1005
|
]
|
|
1006
1006
|
},
|
|
@@ -1098,38 +1098,38 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1098
1098
|
};
|
|
1099
1099
|
});
|
|
1100
1100
|
return (v, k) => {
|
|
1101
|
-
const
|
|
1102
|
-
return
|
|
1103
|
-
s.inline ?
|
|
1101
|
+
const m = Q("VsPopover");
|
|
1102
|
+
return h(), w("div", null, [
|
|
1103
|
+
s.inline ? P("", !0) : (h(), F(m, {
|
|
1104
1104
|
key: 0,
|
|
1105
1105
|
placement: "right",
|
|
1106
1106
|
trigger: "hover"
|
|
1107
1107
|
}, {
|
|
1108
|
-
reference:
|
|
1108
|
+
reference: V(() => [
|
|
1109
1109
|
d("div", null, [
|
|
1110
1110
|
d("button", {
|
|
1111
1111
|
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",
|
|
1112
1112
|
onClick: c
|
|
1113
1113
|
}, [
|
|
1114
|
-
|
|
1114
|
+
C(Ir, {
|
|
1115
1115
|
height: "20",
|
|
1116
1116
|
width: "20"
|
|
1117
1117
|
})
|
|
1118
1118
|
])
|
|
1119
1119
|
])
|
|
1120
1120
|
]),
|
|
1121
|
-
default:
|
|
1121
|
+
default: V(() => [
|
|
1122
1122
|
k[1] || (k[1] = X(" Створити віджет "))
|
|
1123
1123
|
]),
|
|
1124
1124
|
_: 1
|
|
1125
1125
|
})),
|
|
1126
|
-
|
|
1126
|
+
C(Te, {
|
|
1127
1127
|
teleport: "#modal",
|
|
1128
1128
|
visible: o.value,
|
|
1129
1129
|
title: "Створити віджет",
|
|
1130
1130
|
onClose: f
|
|
1131
1131
|
}, {
|
|
1132
|
-
footer:
|
|
1132
|
+
footer: V(() => [
|
|
1133
1133
|
d("div", { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, [
|
|
1134
1134
|
d("button", {
|
|
1135
1135
|
style: { border: "1px solid #000" },
|
|
@@ -1142,12 +1142,12 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1142
1142
|
}, " Створити ")
|
|
1143
1143
|
])
|
|
1144
1144
|
]),
|
|
1145
|
-
default:
|
|
1146
|
-
d("div",
|
|
1147
|
-
|
|
1145
|
+
default: V(() => [
|
|
1146
|
+
d("div", Vr, [
|
|
1147
|
+
C(L(r), {
|
|
1148
1148
|
ref_key: "form",
|
|
1149
1149
|
ref: u,
|
|
1150
|
-
schema:
|
|
1150
|
+
schema: b.value,
|
|
1151
1151
|
values: l.value,
|
|
1152
1152
|
"onUpdate:values": k[0] || (k[0] = (x) => l.value = x)
|
|
1153
1153
|
}, null, 8, ["schema", "values"])
|
|
@@ -1158,17 +1158,17 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1158
1158
|
]);
|
|
1159
1159
|
};
|
|
1160
1160
|
}
|
|
1161
|
-
},
|
|
1161
|
+
}, Ht = {
|
|
1162
1162
|
__name: "delete",
|
|
1163
1163
|
setup(s) {
|
|
1164
|
-
return (e, t) => (
|
|
1164
|
+
return (e, t) => (h(), F(L(Ss), de(e.$attrs, { size: 24 }), null, 16));
|
|
1165
1165
|
}
|
|
1166
|
-
},
|
|
1166
|
+
}, Zt = {
|
|
1167
1167
|
__name: "edit",
|
|
1168
1168
|
setup(s) {
|
|
1169
|
-
return (e, t) => (
|
|
1169
|
+
return (e, t) => (h(), F(L(_s), de(e.$attrs, { size: 24 }), null, 16));
|
|
1170
1170
|
}
|
|
1171
|
-
},
|
|
1171
|
+
}, Rr = { class: "space-y-4" }, Fr = {
|
|
1172
1172
|
__name: "vs-editor-form-style",
|
|
1173
1173
|
props: {
|
|
1174
1174
|
widgetName: { type: String },
|
|
@@ -1176,8 +1176,8 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1176
1176
|
} }
|
|
1177
1177
|
},
|
|
1178
1178
|
setup(s, { expose: e }) {
|
|
1179
|
-
var
|
|
1180
|
-
const t =
|
|
1179
|
+
var p, v, k, m, x, y;
|
|
1180
|
+
const t = O(() => import("@opengis/form")), { $notify: r } = me().proxy, a = s, i = S(null), n = {
|
|
1181
1181
|
show: {
|
|
1182
1182
|
label: "Label",
|
|
1183
1183
|
type: "switcher",
|
|
@@ -1223,36 +1223,36 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1223
1223
|
type: "switcher",
|
|
1224
1224
|
title: "Show tooltip"
|
|
1225
1225
|
}
|
|
1226
|
-
}, u = S({ ...((v = (
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1226
|
+
}, u = S({ ...((v = (p = a.data) == null ? void 0 : p.style) == null ? void 0 : v.label) || {} }), c = S({ ...((m = (k = a.data) == null ? void 0 : k.style) == null ? void 0 : m.legend) || {} }), f = S({ ...((y = (x = a.data) == null ? void 0 : x.style) == null ? void 0 : y.tooltip) || {} }), g = () => {
|
|
1227
|
+
const _ = new CustomEvent(`update-style-${a.widgetName}`);
|
|
1228
|
+
_.chartId = a.widgetName, _.options = {
|
|
1229
1229
|
options: {
|
|
1230
1230
|
legend: c.value,
|
|
1231
1231
|
tooltip: f.value,
|
|
1232
1232
|
label: u.value
|
|
1233
1233
|
},
|
|
1234
1234
|
seriesOptions: u.value
|
|
1235
|
-
}, window.dispatchEvent(
|
|
1235
|
+
}, window.dispatchEvent(_);
|
|
1236
1236
|
};
|
|
1237
1237
|
ne(u, g, { deep: !0 }), ne(c, g, { deep: !0 }), ne(f, g, { deep: !0 });
|
|
1238
|
-
const
|
|
1238
|
+
const b = async () => {
|
|
1239
1239
|
try {
|
|
1240
|
-
await
|
|
1240
|
+
await M.put(`/bi-dashboard/${i.value}/${a.widgetName}`, {
|
|
1241
1241
|
style: {
|
|
1242
1242
|
legend: c.value,
|
|
1243
1243
|
tooltip: f.value,
|
|
1244
1244
|
label: u.value
|
|
1245
1245
|
}
|
|
1246
1246
|
});
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1247
|
+
const _ = new CustomEvent(`update-style-${a.widgetName}`);
|
|
1248
|
+
_.chartId = a.widgetName, _.options = {
|
|
1249
1249
|
options: {
|
|
1250
1250
|
legend: c.value,
|
|
1251
1251
|
tooltip: f.value,
|
|
1252
1252
|
label: u.value
|
|
1253
1253
|
},
|
|
1254
1254
|
seriesOptions: u.value
|
|
1255
|
-
}, window.dispatchEvent(
|
|
1255
|
+
}, window.dispatchEvent(_), r({
|
|
1256
1256
|
type: "success",
|
|
1257
1257
|
title: "Успішно!",
|
|
1258
1258
|
message: "Дані успішно оновлено"
|
|
@@ -1266,22 +1266,22 @@ const uo = /* @__PURE__ */ G(xr, [["render", vr]]), kr = {
|
|
|
1266
1266
|
}
|
|
1267
1267
|
};
|
|
1268
1268
|
return ie(() => {
|
|
1269
|
-
const
|
|
1270
|
-
i.value =
|
|
1271
|
-
}), e({ requestUpdateWidget:
|
|
1272
|
-
|
|
1269
|
+
const _ = new URLSearchParams(window.top.location.search);
|
|
1270
|
+
i.value = _.get("dashboard");
|
|
1271
|
+
}), e({ requestUpdateWidget: b }), (_, T) => (h(), w("div", Rr, [
|
|
1272
|
+
C(L(t), {
|
|
1273
1273
|
schema: n,
|
|
1274
1274
|
values: u.value,
|
|
1275
1275
|
"onUpdate:values": T[0] || (T[0] = ($) => u.value = $),
|
|
1276
1276
|
class: "p-0"
|
|
1277
1277
|
}, null, 8, ["values"]),
|
|
1278
|
-
|
|
1278
|
+
C(L(t), {
|
|
1279
1279
|
schema: o,
|
|
1280
1280
|
values: c.value,
|
|
1281
1281
|
"onUpdate:values": T[1] || (T[1] = ($) => c.value = $),
|
|
1282
1282
|
class: "p-0"
|
|
1283
1283
|
}, null, 8, ["values"]),
|
|
1284
|
-
|
|
1284
|
+
C(L(t), {
|
|
1285
1285
|
schema: l,
|
|
1286
1286
|
values: f.value,
|
|
1287
1287
|
"onUpdate:values": T[2] || (T[2] = ($) => f.value = $),
|
|
@@ -1304,27 +1304,27 @@ function et() {
|
|
|
1304
1304
|
walkTokens: null
|
|
1305
1305
|
};
|
|
1306
1306
|
}
|
|
1307
|
-
let
|
|
1308
|
-
function
|
|
1309
|
-
|
|
1307
|
+
let be = et();
|
|
1308
|
+
function Qt(s) {
|
|
1309
|
+
be = s;
|
|
1310
1310
|
}
|
|
1311
|
-
const
|
|
1311
|
+
const Xt = /[&<>"']/, Wr = new RegExp(Xt.source, "g"), Kt = /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, jr = new RegExp(Kt.source, "g"), Nr = {
|
|
1312
1312
|
"&": "&",
|
|
1313
1313
|
"<": "<",
|
|
1314
1314
|
">": ">",
|
|
1315
1315
|
'"': """,
|
|
1316
1316
|
"'": "'"
|
|
1317
|
-
},
|
|
1317
|
+
}, It = (s) => Nr[s];
|
|
1318
1318
|
function Y(s, e) {
|
|
1319
1319
|
if (e) {
|
|
1320
|
-
if (
|
|
1321
|
-
return s.replace(
|
|
1322
|
-
} else if (
|
|
1323
|
-
return s.replace(
|
|
1320
|
+
if (Xt.test(s))
|
|
1321
|
+
return s.replace(Wr, It);
|
|
1322
|
+
} else if (Kt.test(s))
|
|
1323
|
+
return s.replace(jr, It);
|
|
1324
1324
|
return s;
|
|
1325
1325
|
}
|
|
1326
1326
|
const Pr = /(^|[^\[])\^/g;
|
|
1327
|
-
function
|
|
1327
|
+
function j(s, e) {
|
|
1328
1328
|
let t = typeof s == "string" ? s : s.source;
|
|
1329
1329
|
e = e || "";
|
|
1330
1330
|
const r = {
|
|
@@ -1336,7 +1336,7 @@ function W(s, e) {
|
|
|
1336
1336
|
};
|
|
1337
1337
|
return r;
|
|
1338
1338
|
}
|
|
1339
|
-
function
|
|
1339
|
+
function Vt(s) {
|
|
1340
1340
|
try {
|
|
1341
1341
|
s = encodeURI(s).replace(/%25/g, "%");
|
|
1342
1342
|
} catch {
|
|
@@ -1344,8 +1344,8 @@ function Tt(s) {
|
|
|
1344
1344
|
}
|
|
1345
1345
|
return s;
|
|
1346
1346
|
}
|
|
1347
|
-
const
|
|
1348
|
-
function
|
|
1347
|
+
const ze = { exec: () => null };
|
|
1348
|
+
function Lt(s, e) {
|
|
1349
1349
|
const t = s.replace(/\|/g, (i, n, o) => {
|
|
1350
1350
|
let l = !1, u = n;
|
|
1351
1351
|
for (; --u >= 0 && o[u] === "\\"; )
|
|
@@ -1363,7 +1363,7 @@ function It(s, e) {
|
|
|
1363
1363
|
r[a] = r[a].trim().replace(/\\\|/g, "|");
|
|
1364
1364
|
return r;
|
|
1365
1365
|
}
|
|
1366
|
-
function
|
|
1366
|
+
function De(s, e, t) {
|
|
1367
1367
|
const r = s.length;
|
|
1368
1368
|
if (r === 0)
|
|
1369
1369
|
return "";
|
|
@@ -1372,7 +1372,7 @@ function _e(s, e, t) {
|
|
|
1372
1372
|
a++;
|
|
1373
1373
|
return s.slice(0, r - a);
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Er(s, e) {
|
|
1376
1376
|
if (s.indexOf(e[1]) === -1)
|
|
1377
1377
|
return -1;
|
|
1378
1378
|
let t = 0;
|
|
@@ -1385,7 +1385,7 @@ function jr(s, e) {
|
|
|
1385
1385
|
return r;
|
|
1386
1386
|
return -1;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function Rt(s, e, t, r) {
|
|
1389
1389
|
const a = e.href, i = e.title ? Y(e.title) : null, n = s[1].replace(/\\([\[\]])/g, "$1");
|
|
1390
1390
|
if (s[0].charAt(0) !== "!") {
|
|
1391
1391
|
r.state.inLink = !0;
|
|
@@ -1407,7 +1407,7 @@ function Vt(s, e, t, r) {
|
|
|
1407
1407
|
text: Y(n)
|
|
1408
1408
|
};
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function Or(s, e) {
|
|
1411
1411
|
const t = s.match(/^(\s+)(?:```)/);
|
|
1412
1412
|
if (t === null)
|
|
1413
1413
|
return e;
|
|
@@ -1422,14 +1422,14 @@ function Er(s, e) {
|
|
|
1422
1422
|
}).join(`
|
|
1423
1423
|
`);
|
|
1424
1424
|
}
|
|
1425
|
-
class
|
|
1425
|
+
class Pe {
|
|
1426
1426
|
// set by the lexer
|
|
1427
1427
|
constructor(e) {
|
|
1428
|
-
|
|
1429
|
-
|
|
1428
|
+
N(this, "options");
|
|
1429
|
+
N(this, "rules");
|
|
1430
1430
|
// set by the lexer
|
|
1431
|
-
|
|
1432
|
-
this.options = e ||
|
|
1431
|
+
N(this, "lexer");
|
|
1432
|
+
this.options = e || be;
|
|
1433
1433
|
}
|
|
1434
1434
|
space(e) {
|
|
1435
1435
|
const t = this.rules.block.newline.exec(e);
|
|
@@ -1447,7 +1447,7 @@ class je {
|
|
|
1447
1447
|
type: "code",
|
|
1448
1448
|
raw: t[0],
|
|
1449
1449
|
codeBlockStyle: "indented",
|
|
1450
|
-
text: this.options.pedantic ? r :
|
|
1450
|
+
text: this.options.pedantic ? r : De(r, `
|
|
1451
1451
|
`)
|
|
1452
1452
|
};
|
|
1453
1453
|
}
|
|
@@ -1455,7 +1455,7 @@ class je {
|
|
|
1455
1455
|
fences(e) {
|
|
1456
1456
|
const t = this.rules.block.fences.exec(e);
|
|
1457
1457
|
if (t) {
|
|
1458
|
-
const r = t[0], a =
|
|
1458
|
+
const r = t[0], a = Or(r, t[3] || "");
|
|
1459
1459
|
return {
|
|
1460
1460
|
type: "code",
|
|
1461
1461
|
raw: r,
|
|
@@ -1469,7 +1469,7 @@ class je {
|
|
|
1469
1469
|
if (t) {
|
|
1470
1470
|
let r = t[2].trim();
|
|
1471
1471
|
if (/#$/.test(r)) {
|
|
1472
|
-
const a =
|
|
1472
|
+
const a = De(r, "#");
|
|
1473
1473
|
(this.options.pedantic || !a || / $/.test(a)) && (r = a.trim());
|
|
1474
1474
|
}
|
|
1475
1475
|
return {
|
|
@@ -1486,14 +1486,14 @@ class je {
|
|
|
1486
1486
|
if (t)
|
|
1487
1487
|
return {
|
|
1488
1488
|
type: "hr",
|
|
1489
|
-
raw:
|
|
1489
|
+
raw: De(t[0], `
|
|
1490
1490
|
`)
|
|
1491
1491
|
};
|
|
1492
1492
|
}
|
|
1493
1493
|
blockquote(e) {
|
|
1494
1494
|
const t = this.rules.block.blockquote.exec(e);
|
|
1495
1495
|
if (t) {
|
|
1496
|
-
let r =
|
|
1496
|
+
let r = De(t[0], `
|
|
1497
1497
|
`).split(`
|
|
1498
1498
|
`), a = "", i = "";
|
|
1499
1499
|
const n = [];
|
|
@@ -1518,20 +1518,20 @@ ${f}` : f;
|
|
|
1518
1518
|
const g = this.lexer.state.top;
|
|
1519
1519
|
if (this.lexer.state.top = !0, this.lexer.blockTokens(f, n, !0), this.lexer.state.top = g, r.length === 0)
|
|
1520
1520
|
break;
|
|
1521
|
-
const
|
|
1522
|
-
if ((
|
|
1521
|
+
const b = n[n.length - 1];
|
|
1522
|
+
if ((b == null ? void 0 : b.type) === "code")
|
|
1523
1523
|
break;
|
|
1524
|
-
if ((
|
|
1525
|
-
const
|
|
1524
|
+
if ((b == null ? void 0 : b.type) === "blockquote") {
|
|
1525
|
+
const p = b, v = p.raw + `
|
|
1526
1526
|
` + r.join(`
|
|
1527
1527
|
`), k = this.blockquote(v);
|
|
1528
|
-
n[n.length - 1] = k, a = a.substring(0, a.length -
|
|
1528
|
+
n[n.length - 1] = k, a = a.substring(0, a.length - p.raw.length) + k.raw, i = i.substring(0, i.length - p.text.length) + k.text;
|
|
1529
1529
|
break;
|
|
1530
|
-
} else if ((
|
|
1531
|
-
const
|
|
1530
|
+
} else if ((b == null ? void 0 : b.type) === "list") {
|
|
1531
|
+
const p = b, v = p.raw + `
|
|
1532
1532
|
` + r.join(`
|
|
1533
1533
|
`), k = this.list(v);
|
|
1534
|
-
n[n.length - 1] = k, a = a.substring(0, a.length -
|
|
1534
|
+
n[n.length - 1] = k, a = a.substring(0, a.length - b.raw.length) + k.raw, i = i.substring(0, i.length - p.raw.length) + k.raw, r = v.substring(n[n.length - 1].raw.length).split(`
|
|
1535
1535
|
`);
|
|
1536
1536
|
continue;
|
|
1537
1537
|
}
|
|
@@ -1565,28 +1565,28 @@ ${f}` : f;
|
|
|
1565
1565
|
break;
|
|
1566
1566
|
u = t[0], e = e.substring(u.length);
|
|
1567
1567
|
let f = t[2].split(`
|
|
1568
|
-
`, 1)[0].replace(/^\t+/, (
|
|
1569
|
-
`, 1)[0],
|
|
1570
|
-
if (this.options.pedantic ? (
|
|
1568
|
+
`, 1)[0].replace(/^\t+/, (m) => " ".repeat(3 * m.length)), g = e.split(`
|
|
1569
|
+
`, 1)[0], b = !f.trim(), p = 0;
|
|
1570
|
+
if (this.options.pedantic ? (p = 2, c = f.trimStart()) : b ? p = t[1].length + 1 : (p = t[2].search(/[^ ]/), p = p > 4 ? 1 : p, c = f.slice(p), p += t[1].length), b && /^[ \t]*$/.test(g) && (u += g + `
|
|
1571
1571
|
`, e = e.substring(g.length + 1), l = !0), !l) {
|
|
1572
|
-
const
|
|
1572
|
+
const m = new RegExp(`^ {0,${Math.min(3, p - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), x = new RegExp(`^ {0,${Math.min(3, p - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), y = new RegExp(`^ {0,${Math.min(3, p - 1)}}(?:\`\`\`|~~~)`), _ = new RegExp(`^ {0,${Math.min(3, p - 1)}}#`), T = new RegExp(`^ {0,${Math.min(3, p - 1)}}<(?:[a-z].*>|!--)`, "i");
|
|
1573
1573
|
for (; e; ) {
|
|
1574
1574
|
const $ = e.split(`
|
|
1575
1575
|
`, 1)[0];
|
|
1576
1576
|
let E;
|
|
1577
|
-
if (g = $, this.options.pedantic ? (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), E = g) : E = g.replace(/\t/g, " "), y.test(g) ||
|
|
1577
|
+
if (g = $, this.options.pedantic ? (g = g.replace(/^ {1,4}(?=( {4})*[^ ])/g, " "), E = g) : E = g.replace(/\t/g, " "), y.test(g) || _.test(g) || T.test(g) || m.test(g) || x.test(g))
|
|
1578
1578
|
break;
|
|
1579
|
-
if (E.search(/[^ ]/) >=
|
|
1579
|
+
if (E.search(/[^ ]/) >= p || !g.trim())
|
|
1580
1580
|
c += `
|
|
1581
|
-
` + E.slice(
|
|
1581
|
+
` + E.slice(p);
|
|
1582
1582
|
else {
|
|
1583
|
-
if (
|
|
1583
|
+
if (b || f.replace(/\t/g, " ").search(/[^ ]/) >= 4 || y.test(f) || _.test(f) || x.test(f))
|
|
1584
1584
|
break;
|
|
1585
1585
|
c += `
|
|
1586
1586
|
` + g;
|
|
1587
1587
|
}
|
|
1588
|
-
!
|
|
1589
|
-
`, e = e.substring($.length + 1), f = E.slice(
|
|
1588
|
+
!b && !g.trim() && (b = !0), u += $ + `
|
|
1589
|
+
`, e = e.substring($.length + 1), f = E.slice(p);
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
1592
|
i.loose || (o ? i.loose = !0 : /\n[ \t]*\n[ \t]*$/.test(u) && (o = !0));
|
|
@@ -1641,7 +1641,7 @@ ${f}` : f;
|
|
|
1641
1641
|
const t = this.rules.block.table.exec(e);
|
|
1642
1642
|
if (!t || !/[:|]/.test(t[2]))
|
|
1643
1643
|
return;
|
|
1644
|
-
const r =
|
|
1644
|
+
const r = Lt(t[1]), a = t[2].replace(/^\||\| *$/g, "").split("|"), i = t[3] && t[3].trim() ? t[3].replace(/\n[ \t]*$/, "").split(`
|
|
1645
1645
|
`) : [], n = {
|
|
1646
1646
|
type: "table",
|
|
1647
1647
|
raw: t[0],
|
|
@@ -1660,7 +1660,7 @@ ${f}` : f;
|
|
|
1660
1660
|
align: n.align[o]
|
|
1661
1661
|
});
|
|
1662
1662
|
for (const o of i)
|
|
1663
|
-
n.rows.push(
|
|
1663
|
+
n.rows.push(Lt(o, n.header.length).map((l, u) => ({
|
|
1664
1664
|
text: l,
|
|
1665
1665
|
tokens: this.lexer.inline(l),
|
|
1666
1666
|
header: !1,
|
|
@@ -1731,11 +1731,11 @@ ${f}` : f;
|
|
|
1731
1731
|
if (!this.options.pedantic && /^</.test(r)) {
|
|
1732
1732
|
if (!/>$/.test(r))
|
|
1733
1733
|
return;
|
|
1734
|
-
const n =
|
|
1734
|
+
const n = De(r.slice(0, -1), "\\");
|
|
1735
1735
|
if ((r.length - n.length) % 2 === 0)
|
|
1736
1736
|
return;
|
|
1737
1737
|
} else {
|
|
1738
|
-
const n =
|
|
1738
|
+
const n = Er(t[2], "()");
|
|
1739
1739
|
if (n > -1) {
|
|
1740
1740
|
const l = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + n;
|
|
1741
1741
|
t[2] = t[2].substring(0, n), t[0] = t[0].substring(0, l).trim(), t[3] = "";
|
|
@@ -1747,7 +1747,7 @@ ${f}` : f;
|
|
|
1747
1747
|
n && (a = n[1], i = n[3]);
|
|
1748
1748
|
} else
|
|
1749
1749
|
i = t[3] ? t[3].slice(1, -1) : "";
|
|
1750
|
-
return a = a.trim(), /^</.test(a) && (this.options.pedantic && !/>$/.test(r) ? a = a.slice(1) : a = a.slice(1, -1)),
|
|
1750
|
+
return a = a.trim(), /^</.test(a) && (this.options.pedantic && !/>$/.test(r) ? a = a.slice(1) : a = a.slice(1, -1)), Rt(t, {
|
|
1751
1751
|
href: a && a.replace(this.rules.inline.anyPunctuation, "$1"),
|
|
1752
1752
|
title: i && i.replace(this.rules.inline.anyPunctuation, "$1")
|
|
1753
1753
|
}, t[0], this.lexer);
|
|
@@ -1765,7 +1765,7 @@ ${f}` : f;
|
|
|
1765
1765
|
text: n
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
return
|
|
1768
|
+
return Rt(r, i, r[0], this.lexer);
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
emStrong(e, t, r = "") {
|
|
@@ -1789,22 +1789,22 @@ ${f}` : f;
|
|
|
1789
1789
|
if (u -= l, u > 0)
|
|
1790
1790
|
continue;
|
|
1791
1791
|
l = Math.min(l, l + u + c);
|
|
1792
|
-
const g = [...a[0]][0].length,
|
|
1792
|
+
const g = [...a[0]][0].length, b = e.slice(0, n + a.index + g + l);
|
|
1793
1793
|
if (Math.min(n, l) % 2) {
|
|
1794
|
-
const v =
|
|
1794
|
+
const v = b.slice(1, -1);
|
|
1795
1795
|
return {
|
|
1796
1796
|
type: "em",
|
|
1797
|
-
raw:
|
|
1797
|
+
raw: b,
|
|
1798
1798
|
text: v,
|
|
1799
1799
|
tokens: this.lexer.inlineTokens(v)
|
|
1800
1800
|
};
|
|
1801
1801
|
}
|
|
1802
|
-
const
|
|
1802
|
+
const p = b.slice(2, -2);
|
|
1803
1803
|
return {
|
|
1804
1804
|
type: "strong",
|
|
1805
|
-
raw:
|
|
1806
|
-
text:
|
|
1807
|
-
tokens: this.lexer.inlineTokens(
|
|
1805
|
+
raw: b,
|
|
1806
|
+
text: p,
|
|
1807
|
+
tokens: this.lexer.inlineTokens(p)
|
|
1808
1808
|
};
|
|
1809
1809
|
}
|
|
1810
1810
|
}
|
|
@@ -1899,105 +1899,105 @@ ${f}` : f;
|
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
}
|
|
1902
|
-
const
|
|
1903
|
-
blockquote:
|
|
1904
|
-
code:
|
|
1905
|
-
def:
|
|
1906
|
-
fences:
|
|
1907
|
-
heading:
|
|
1908
|
-
hr:
|
|
1909
|
-
html:
|
|
1910
|
-
lheading:
|
|
1911
|
-
list:
|
|
1912
|
-
newline:
|
|
1913
|
-
paragraph:
|
|
1914
|
-
table:
|
|
1915
|
-
text:
|
|
1916
|
-
},
|
|
1902
|
+
const Ar = /^(?:[ \t]*(?:\n|$))+/, Br = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, qr = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Ve = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Mr = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Yt = /(?:[*+-]|\d{1,9}[.)])/, Jt = j(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g, Yt).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).getRegex(), tt = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Ur = /^[^\n]+/, st = /(?!\s*\])(?:\\.|[^\[\]\\])+/, Gr = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", st).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Hr = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Yt).getRegex(), Ue = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", rt = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Zr = j("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", rt).replace("tag", Ue).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), es = j(tt).replace("hr", Ve).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ue).getRegex(), Qr = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", es).getRegex(), at = {
|
|
1903
|
+
blockquote: Qr,
|
|
1904
|
+
code: Br,
|
|
1905
|
+
def: Gr,
|
|
1906
|
+
fences: qr,
|
|
1907
|
+
heading: Mr,
|
|
1908
|
+
hr: Ve,
|
|
1909
|
+
html: Zr,
|
|
1910
|
+
lheading: Jt,
|
|
1911
|
+
list: Hr,
|
|
1912
|
+
newline: Ar,
|
|
1913
|
+
paragraph: es,
|
|
1914
|
+
table: ze,
|
|
1915
|
+
text: Ur
|
|
1916
|
+
}, Ft = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Ve).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ue).getRegex(), Xr = {
|
|
1917
1917
|
...at,
|
|
1918
|
-
table:
|
|
1919
|
-
paragraph:
|
|
1920
|
-
},
|
|
1918
|
+
table: Ft,
|
|
1919
|
+
paragraph: j(tt).replace("hr", Ve).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Ft).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ue).getRegex()
|
|
1920
|
+
}, Kr = {
|
|
1921
1921
|
...at,
|
|
1922
|
-
html:
|
|
1922
|
+
html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", rt).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),
|
|
1923
1923
|
def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,
|
|
1924
1924
|
heading: /^(#{1,6})(.*)(?:\n+|$)/,
|
|
1925
|
-
fences:
|
|
1925
|
+
fences: ze,
|
|
1926
1926
|
// fences not supported
|
|
1927
1927
|
lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
1928
|
-
paragraph:
|
|
1929
|
-
]`).replace("lheading",
|
|
1930
|
-
},
|
|
1931
|
-
_backpedal:
|
|
1928
|
+
paragraph: j(tt).replace("hr", Ve).replace("heading", ` *#{1,6} *[^
|
|
1929
|
+
]`).replace("lheading", Jt).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex()
|
|
1930
|
+
}, ts = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Yr = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ss = /^( {2,}|\\)\n(?!\s*$)/, Jr = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Le = "\\p{P}\\p{S}", ea = j(/^((?![*_])[\spunctuation])/, "u").replace(/punctuation/g, Le).getRegex(), ta = /\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g, sa = j(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/, "u").replace(/punct/g, Le).getRegex(), ra = j("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])", "gu").replace(/punct/g, Le).getRegex(), aa = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])", "gu").replace(/punct/g, Le).getRegex(), na = j(/\\([punct])/, "gu").replace(/punct/g, Le).getRegex(), ia = j(/^<(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(), oa = j(rt).replace("(?:-->|$)", "-->").getRegex(), la = j("^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", oa).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ee = /(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/, ca = j(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label", Ee).replace("href", /<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), rs = j(/^!?\[(label)\]\[(ref)\]/).replace("label", Ee).replace("ref", st).getRegex(), as = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", st).getRegex(), da = j("reflink|nolink(?!\\()", "g").replace("reflink", rs).replace("nolink", as).getRegex(), nt = {
|
|
1931
|
+
_backpedal: ze,
|
|
1932
1932
|
// only used for GFM url
|
|
1933
|
-
anyPunctuation:
|
|
1934
|
-
autolink:
|
|
1935
|
-
blockSkip:
|
|
1936
|
-
br:
|
|
1937
|
-
code:
|
|
1938
|
-
del:
|
|
1939
|
-
emStrongLDelim:
|
|
1940
|
-
emStrongRDelimAst:
|
|
1941
|
-
emStrongRDelimUnd:
|
|
1942
|
-
escape:
|
|
1943
|
-
link:
|
|
1944
|
-
nolink:
|
|
1945
|
-
punctuation:
|
|
1946
|
-
reflink:
|
|
1947
|
-
reflinkSearch:
|
|
1948
|
-
tag:
|
|
1949
|
-
text:
|
|
1950
|
-
url:
|
|
1951
|
-
},
|
|
1933
|
+
anyPunctuation: na,
|
|
1934
|
+
autolink: ia,
|
|
1935
|
+
blockSkip: ta,
|
|
1936
|
+
br: ss,
|
|
1937
|
+
code: Yr,
|
|
1938
|
+
del: ze,
|
|
1939
|
+
emStrongLDelim: sa,
|
|
1940
|
+
emStrongRDelimAst: ra,
|
|
1941
|
+
emStrongRDelimUnd: aa,
|
|
1942
|
+
escape: ts,
|
|
1943
|
+
link: ca,
|
|
1944
|
+
nolink: as,
|
|
1945
|
+
punctuation: ea,
|
|
1946
|
+
reflink: rs,
|
|
1947
|
+
reflinkSearch: da,
|
|
1948
|
+
tag: la,
|
|
1949
|
+
text: Jr,
|
|
1950
|
+
url: ze
|
|
1951
|
+
}, ua = {
|
|
1952
1952
|
...nt,
|
|
1953
|
-
link:
|
|
1954
|
-
reflink:
|
|
1953
|
+
link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", Ee).getRegex(),
|
|
1954
|
+
reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ee).getRegex()
|
|
1955
1955
|
}, Ke = {
|
|
1956
1956
|
...nt,
|
|
1957
|
-
escape:
|
|
1958
|
-
url:
|
|
1957
|
+
escape: j(ts).replace("])", "~|])").getRegex(),
|
|
1958
|
+
url: j(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/, "i").replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),
|
|
1959
1959
|
_backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,
|
|
1960
1960
|
del: /^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,
|
|
1961
1961
|
text: /^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/
|
|
1962
|
-
},
|
|
1962
|
+
}, pa = {
|
|
1963
1963
|
...Ke,
|
|
1964
|
-
br:
|
|
1965
|
-
text:
|
|
1966
|
-
},
|
|
1964
|
+
br: j(ss).replace("{2,}", "*").getRegex(),
|
|
1965
|
+
text: j(Ke.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
1966
|
+
}, Fe = {
|
|
1967
1967
|
normal: at,
|
|
1968
|
-
gfm:
|
|
1969
|
-
pedantic:
|
|
1970
|
-
},
|
|
1968
|
+
gfm: Xr,
|
|
1969
|
+
pedantic: Kr
|
|
1970
|
+
}, Ce = {
|
|
1971
1971
|
normal: nt,
|
|
1972
1972
|
gfm: Ke,
|
|
1973
|
-
breaks:
|
|
1974
|
-
pedantic:
|
|
1973
|
+
breaks: pa,
|
|
1974
|
+
pedantic: ua
|
|
1975
1975
|
};
|
|
1976
1976
|
class ee {
|
|
1977
1977
|
constructor(e) {
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e ||
|
|
1978
|
+
N(this, "tokens");
|
|
1979
|
+
N(this, "options");
|
|
1980
|
+
N(this, "state");
|
|
1981
|
+
N(this, "tokenizer");
|
|
1982
|
+
N(this, "inlineQueue");
|
|
1983
|
+
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e || be, this.options.tokenizer = this.options.tokenizer || new Pe(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
|
|
1984
1984
|
inLink: !1,
|
|
1985
1985
|
inRawBlock: !1,
|
|
1986
1986
|
top: !0
|
|
1987
1987
|
};
|
|
1988
1988
|
const t = {
|
|
1989
|
-
block:
|
|
1990
|
-
inline:
|
|
1989
|
+
block: Fe.normal,
|
|
1990
|
+
inline: Ce.normal
|
|
1991
1991
|
};
|
|
1992
|
-
this.options.pedantic ? (t.block =
|
|
1992
|
+
this.options.pedantic ? (t.block = Fe.pedantic, t.inline = Ce.pedantic) : this.options.gfm && (t.block = Fe.gfm, this.options.breaks ? t.inline = Ce.breaks : t.inline = Ce.gfm), this.tokenizer.rules = t;
|
|
1993
1993
|
}
|
|
1994
1994
|
/**
|
|
1995
1995
|
* Expose Rules
|
|
1996
1996
|
*/
|
|
1997
1997
|
static get rules() {
|
|
1998
1998
|
return {
|
|
1999
|
-
block:
|
|
2000
|
-
inline:
|
|
1999
|
+
block: Fe,
|
|
2000
|
+
inline: Ce
|
|
2001
2001
|
};
|
|
2002
2002
|
}
|
|
2003
2003
|
/**
|
|
@@ -2176,8 +2176,8 @@ class ee {
|
|
|
2176
2176
|
let c = 1 / 0;
|
|
2177
2177
|
const f = e.slice(1);
|
|
2178
2178
|
let g;
|
|
2179
|
-
this.options.extensions.startInline.forEach((
|
|
2180
|
-
g =
|
|
2179
|
+
this.options.extensions.startInline.forEach((b) => {
|
|
2180
|
+
g = b.call({ lexer: this }, f), typeof g == "number" && g >= 0 && (c = Math.min(c, g));
|
|
2181
2181
|
}), c < 1 / 0 && c >= 0 && (i = e.substring(0, c + 1));
|
|
2182
2182
|
}
|
|
2183
2183
|
if (r = this.tokenizer.inlineText(i)) {
|
|
@@ -2196,12 +2196,12 @@ class ee {
|
|
|
2196
2196
|
return t;
|
|
2197
2197
|
}
|
|
2198
2198
|
}
|
|
2199
|
-
class
|
|
2199
|
+
class Oe {
|
|
2200
2200
|
// set by the parser
|
|
2201
2201
|
constructor(e) {
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
this.options = e ||
|
|
2202
|
+
N(this, "options");
|
|
2203
|
+
N(this, "parser");
|
|
2204
|
+
this.options = e || be;
|
|
2205
2205
|
}
|
|
2206
2206
|
space(e) {
|
|
2207
2207
|
return "";
|
|
@@ -2310,7 +2310,7 @@ ${e}</tr>
|
|
|
2310
2310
|
return `<del>${this.parser.parseInline(e)}</del>`;
|
|
2311
2311
|
}
|
|
2312
2312
|
link({ href: e, title: t, tokens: r }) {
|
|
2313
|
-
const a = this.parser.parseInline(r), i =
|
|
2313
|
+
const a = this.parser.parseInline(r), i = Vt(e);
|
|
2314
2314
|
if (i === null)
|
|
2315
2315
|
return a;
|
|
2316
2316
|
e = i;
|
|
@@ -2318,7 +2318,7 @@ ${e}</tr>
|
|
|
2318
2318
|
return t && (n += ' title="' + t + '"'), n += ">" + a + "</a>", n;
|
|
2319
2319
|
}
|
|
2320
2320
|
image({ href: e, title: t, text: r }) {
|
|
2321
|
-
const a =
|
|
2321
|
+
const a = Vt(e);
|
|
2322
2322
|
if (a === null)
|
|
2323
2323
|
return r;
|
|
2324
2324
|
e = a;
|
|
@@ -2361,10 +2361,10 @@ class it {
|
|
|
2361
2361
|
}
|
|
2362
2362
|
class te {
|
|
2363
2363
|
constructor(e) {
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
this.options = e ||
|
|
2364
|
+
N(this, "options");
|
|
2365
|
+
N(this, "renderer");
|
|
2366
|
+
N(this, "textRenderer");
|
|
2367
|
+
this.options = e || be, this.options.renderer = this.options.renderer || new Oe(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new it();
|
|
2368
2368
|
}
|
|
2369
2369
|
/**
|
|
2370
2370
|
* Static Parse Method
|
|
@@ -2521,11 +2521,11 @@ class te {
|
|
|
2521
2521
|
return r;
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
|
-
class
|
|
2524
|
+
class Se {
|
|
2525
2525
|
constructor(e) {
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
this.options = e ||
|
|
2526
|
+
N(this, "options");
|
|
2527
|
+
N(this, "block");
|
|
2528
|
+
this.options = e || be;
|
|
2529
2529
|
}
|
|
2530
2530
|
/**
|
|
2531
2531
|
* Process markdown before marked
|
|
@@ -2558,23 +2558,23 @@ class ze {
|
|
|
2558
2558
|
return this.block ? te.parse : te.parseInline;
|
|
2559
2559
|
}
|
|
2560
2560
|
}
|
|
2561
|
-
|
|
2561
|
+
N(Se, "passThroughHooks", /* @__PURE__ */ new Set([
|
|
2562
2562
|
"preprocess",
|
|
2563
2563
|
"postprocess",
|
|
2564
2564
|
"processAllTokens"
|
|
2565
2565
|
]));
|
|
2566
|
-
class
|
|
2566
|
+
class ha {
|
|
2567
2567
|
constructor(...e) {
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2568
|
+
N(this, "defaults", et());
|
|
2569
|
+
N(this, "options", this.setOptions);
|
|
2570
|
+
N(this, "parse", this.parseMarkdown(!0));
|
|
2571
|
+
N(this, "parseInline", this.parseMarkdown(!1));
|
|
2572
|
+
N(this, "Parser", te);
|
|
2573
|
+
N(this, "Renderer", Oe);
|
|
2574
|
+
N(this, "TextRenderer", it);
|
|
2575
|
+
N(this, "Lexer", ee);
|
|
2576
|
+
N(this, "Tokenizer", Pe);
|
|
2577
|
+
N(this, "Hooks", Se);
|
|
2578
2578
|
this.use(...e);
|
|
2579
2579
|
}
|
|
2580
2580
|
/**
|
|
@@ -2631,7 +2631,7 @@ class ua {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
"childTokens" in i && i.childTokens && (t.childTokens[i.name] = i.childTokens);
|
|
2633
2633
|
}), a.extensions = t), r.renderer) {
|
|
2634
|
-
const i = this.defaults.renderer || new
|
|
2634
|
+
const i = this.defaults.renderer || new Oe(this.defaults);
|
|
2635
2635
|
for (const n in r.renderer) {
|
|
2636
2636
|
if (!(n in i))
|
|
2637
2637
|
throw new Error(`renderer '${n}' does not exist`);
|
|
@@ -2646,7 +2646,7 @@ class ua {
|
|
|
2646
2646
|
a.renderer = i;
|
|
2647
2647
|
}
|
|
2648
2648
|
if (r.tokenizer) {
|
|
2649
|
-
const i = this.defaults.tokenizer || new
|
|
2649
|
+
const i = this.defaults.tokenizer || new Pe(this.defaults);
|
|
2650
2650
|
for (const n in r.tokenizer) {
|
|
2651
2651
|
if (!(n in i))
|
|
2652
2652
|
throw new Error(`tokenizer '${n}' does not exist`);
|
|
@@ -2661,14 +2661,14 @@ class ua {
|
|
|
2661
2661
|
a.tokenizer = i;
|
|
2662
2662
|
}
|
|
2663
2663
|
if (r.hooks) {
|
|
2664
|
-
const i = this.defaults.hooks || new
|
|
2664
|
+
const i = this.defaults.hooks || new Se();
|
|
2665
2665
|
for (const n in r.hooks) {
|
|
2666
2666
|
if (!(n in i))
|
|
2667
2667
|
throw new Error(`hook '${n}' does not exist`);
|
|
2668
2668
|
if (["options", "block"].includes(n))
|
|
2669
2669
|
continue;
|
|
2670
2670
|
const o = n, l = r.hooks[o], u = i[o];
|
|
2671
|
-
|
|
2671
|
+
Se.passThroughHooks.has(n) ? i[o] = (c) => {
|
|
2672
2672
|
if (this.defaults.async)
|
|
2673
2673
|
return Promise.resolve(l.call(i, c)).then((g) => u.call(i, g));
|
|
2674
2674
|
const f = l.call(i, c);
|
|
@@ -2736,39 +2736,39 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
2736
2736
|
};
|
|
2737
2737
|
}
|
|
2738
2738
|
}
|
|
2739
|
-
const
|
|
2740
|
-
function
|
|
2741
|
-
return
|
|
2739
|
+
const fe = new ha();
|
|
2740
|
+
function W(s, e) {
|
|
2741
|
+
return fe.parse(s, e);
|
|
2742
2742
|
}
|
|
2743
|
-
|
|
2744
|
-
return
|
|
2743
|
+
W.options = W.setOptions = function(s) {
|
|
2744
|
+
return fe.setOptions(s), W.defaults = fe.defaults, Qt(W.defaults), W;
|
|
2745
2745
|
};
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
return
|
|
2746
|
+
W.getDefaults = et;
|
|
2747
|
+
W.defaults = be;
|
|
2748
|
+
W.use = function(...s) {
|
|
2749
|
+
return fe.use(...s), W.defaults = fe.defaults, Qt(W.defaults), W;
|
|
2750
2750
|
};
|
|
2751
|
-
|
|
2752
|
-
return
|
|
2751
|
+
W.walkTokens = function(s, e) {
|
|
2752
|
+
return fe.walkTokens(s, e);
|
|
2753
2753
|
};
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2754
|
+
W.parseInline = fe.parseInline;
|
|
2755
|
+
W.Parser = te;
|
|
2756
|
+
W.parser = te.parse;
|
|
2757
|
+
W.Renderer = Oe;
|
|
2758
|
+
W.TextRenderer = it;
|
|
2759
|
+
W.Lexer = ee;
|
|
2760
|
+
W.lexer = ee.lex;
|
|
2761
|
+
W.Tokenizer = Pe;
|
|
2762
|
+
W.Hooks = Se;
|
|
2763
|
+
W.parse = W;
|
|
2764
|
+
W.options;
|
|
2765
|
+
W.setOptions;
|
|
2766
|
+
W.use;
|
|
2767
|
+
W.walkTokens;
|
|
2768
|
+
W.parseInline;
|
|
2769
2769
|
te.parse;
|
|
2770
2770
|
ee.lex;
|
|
2771
|
-
const
|
|
2771
|
+
const fa = { class: "space-y-4" }, ga = {
|
|
2772
2772
|
__name: "vs-editor-form-data",
|
|
2773
2773
|
props: {
|
|
2774
2774
|
widgetName: { type: String },
|
|
@@ -2779,25 +2779,29 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2779
2779
|
},
|
|
2780
2780
|
emits: ["update-dashboard"],
|
|
2781
2781
|
setup(s, { expose: e, emit: t }) {
|
|
2782
|
-
var
|
|
2783
|
-
const r =
|
|
2784
|
-
const
|
|
2785
|
-
return
|
|
2786
|
-
}), c =
|
|
2782
|
+
var _, T, $, E, U, Z, se, re, D, ae, ue, ce, we, ve, ke, q, pe, $e, lt, ct, dt, ut, pt, ht, ft, gt, mt, bt, xt, yt, wt, vt;
|
|
2783
|
+
const r = O(() => import("@opengis/form")), { $notify: a } = me().proxy, i = t, n = s, o = S(null), l = S([]), u = B(() => {
|
|
2784
|
+
const z = n.columns ?? [];
|
|
2785
|
+
return z.length ? z : l.value;
|
|
2786
|
+
}), c = B(() => n.dashboardId || o.value);
|
|
2787
2787
|
async function f() {
|
|
2788
|
-
const
|
|
2789
|
-
if (!(u.value.length || !
|
|
2788
|
+
const z = c.value;
|
|
2789
|
+
if (!(u.value.length || !z || !n.widgetName))
|
|
2790
2790
|
try {
|
|
2791
|
-
const
|
|
2792
|
-
Array.isArray(
|
|
2791
|
+
const I = await M.get(`/bi-data?dashboard=${z}&widget=${n.widgetName}`);
|
|
2792
|
+
Array.isArray(I == null ? void 0 : I.columns) && I.columns.length && (l.value = I.columns);
|
|
2793
2793
|
} catch {
|
|
2794
2794
|
}
|
|
2795
2795
|
}
|
|
2796
|
-
const g = (
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2796
|
+
const g = (z) => (z == null ? void 0 : z.name) != null ? { id: z.name, text: z.title || z.name } : null, b = (z) => Array.isArray(z) ? [...z].sort((I, oe) => {
|
|
2797
|
+
const xe = I.text && I.text !== I.id, kt = oe.text && oe.text !== oe.id;
|
|
2798
|
+
return xe && !kt ? -1 : !xe && kt ? 1 : (I.text || "").localeCompare(oe.text || "", void 0, { sensitivity: "base" });
|
|
2799
|
+
}) : z, p = B(() => {
|
|
2800
|
+
const z = (u.value ?? []).filter(
|
|
2801
|
+
(I) => (I == null ? void 0 : I.type) == "text" || (I == null ? void 0 : I.type) === "date" || (I == null ? void 0 : I.type) === "timestamp without time zone" || (I == null ? void 0 : I.type) === "boolean" || (I == null ? void 0 : I.type) === "integer"
|
|
2802
|
+
).map(g).filter(Boolean);
|
|
2803
|
+
return b(z);
|
|
2804
|
+
}), v = B(() => `${n.widgetName}-${p.value.length}-${(u.value ?? []).length}`), k = B(() => ({
|
|
2801
2805
|
text: {
|
|
2802
2806
|
type: "Text",
|
|
2803
2807
|
label: "Text",
|
|
@@ -2808,7 +2812,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2808
2812
|
label: "X Axis",
|
|
2809
2813
|
style: { size: "xs" },
|
|
2810
2814
|
conditions: ["type", "not_in", ["text", "table", "map"]],
|
|
2811
|
-
options: [...
|
|
2815
|
+
options: [...p.value]
|
|
2812
2816
|
},
|
|
2813
2817
|
cls: {
|
|
2814
2818
|
label: "X Axis classifier",
|
|
@@ -2842,7 +2846,9 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2842
2846
|
],
|
|
2843
2847
|
options: [
|
|
2844
2848
|
{ id: "count", text: "count" },
|
|
2845
|
-
...
|
|
2849
|
+
...b(
|
|
2850
|
+
u.value.filter((z) => (z == null ? void 0 : z.type) === "numeric" || (z == null ? void 0 : z.type) === "double precision").map(g).filter(Boolean)
|
|
2851
|
+
)
|
|
2846
2852
|
]
|
|
2847
2853
|
},
|
|
2848
2854
|
fx: {
|
|
@@ -2862,9 +2868,11 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2862
2868
|
style: { size: "xs" },
|
|
2863
2869
|
options: [
|
|
2864
2870
|
{ id: "null", text: "null" },
|
|
2865
|
-
...
|
|
2866
|
-
|
|
2867
|
-
|
|
2871
|
+
...b(
|
|
2872
|
+
u.value.filter(
|
|
2873
|
+
(z) => (z == null ? void 0 : z.type) == "text" || (z == null ? void 0 : z.type) === "boolean" || (z == null ? void 0 : z.type) === "integer"
|
|
2874
|
+
).map(g).filter(Boolean)
|
|
2875
|
+
)
|
|
2868
2876
|
],
|
|
2869
2877
|
conditions: ["type", "==", "bar"]
|
|
2870
2878
|
},
|
|
@@ -2872,7 +2880,9 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2872
2880
|
type: "checkbox",
|
|
2873
2881
|
label: "Columns",
|
|
2874
2882
|
style: { size: "xs" },
|
|
2875
|
-
options: (
|
|
2883
|
+
options: b(
|
|
2884
|
+
(u.value ?? []).map(g).filter(Boolean)
|
|
2885
|
+
),
|
|
2876
2886
|
conditions: ["type", "in", ["table", "map"]]
|
|
2877
2887
|
},
|
|
2878
2888
|
granularity: {
|
|
@@ -2890,29 +2900,29 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2890
2900
|
type: "Text",
|
|
2891
2901
|
hidden: !0
|
|
2892
2902
|
}
|
|
2893
|
-
})),
|
|
2894
|
-
x: ((
|
|
2895
|
-
metric: ((
|
|
2896
|
-
columns: ((
|
|
2897
|
-
granularity: ((
|
|
2898
|
-
type: ((
|
|
2899
|
-
groupby: ((
|
|
2900
|
-
fx: ((
|
|
2901
|
-
query: ((
|
|
2902
|
-
y_type: ((
|
|
2903
|
-
tableSQL: ((
|
|
2904
|
-
cls: ((
|
|
2905
|
-
}),
|
|
2903
|
+
})), m = S({
|
|
2904
|
+
x: ((T = (_ = n.data) == null ? void 0 : _.data) == null ? void 0 : T.x) || (($ = n.data) == null ? void 0 : $.x) || null,
|
|
2905
|
+
metric: ((U = (E = n.data) == null ? void 0 : E.data) == null ? void 0 : U.metric) || ((Z = n.data) == null ? void 0 : Z.metric) || null,
|
|
2906
|
+
columns: ((re = (se = n.data) == null ? void 0 : se.data) == null ? void 0 : re.columns) || ((D = n.data) == null ? void 0 : D.columns) || null,
|
|
2907
|
+
granularity: ((ue = (ae = n.data) == null ? void 0 : ae.data) == null ? void 0 : ue.granularity) || ((ce = n.data) == null ? void 0 : ce.granularity) || null,
|
|
2908
|
+
type: ((ve = (we = n.data) == null ? void 0 : we.data) == null ? void 0 : ve.type) || ((ke = n.data) == null ? void 0 : ke.type) || null,
|
|
2909
|
+
groupby: ((pe = (q = n.data) == null ? void 0 : q.data) == null ? void 0 : pe.groupby) || n.data.groupby || null,
|
|
2910
|
+
fx: ((lt = ($e = n.data) == null ? void 0 : $e.data) == null ? void 0 : lt.fx) || ((ct = n.data) == null ? void 0 : ct.fx) || null,
|
|
2911
|
+
query: ((ut = (dt = n.data) == null ? void 0 : dt.data) == null ? void 0 : ut.query) || ((pt = n.data) == null ? void 0 : pt.query) || null,
|
|
2912
|
+
y_type: ((ft = (ht = n.data) == null ? void 0 : ht.data) == null ? void 0 : ft.y_type) || ((gt = n.data) == null ? void 0 : gt.y_type) || null,
|
|
2913
|
+
tableSQL: ((bt = (mt = n.data) == null ? void 0 : mt.data) == null ? void 0 : bt.tableSQL) || ((xt = n.data) == null ? void 0 : xt.tableSQL) || null,
|
|
2914
|
+
cls: ((wt = (yt = n.data) == null ? void 0 : yt.data) == null ? void 0 : wt.cls) || ((vt = n.data) == null ? void 0 : vt.cls) || null
|
|
2915
|
+
}), x = async () => {
|
|
2906
2916
|
try {
|
|
2907
|
-
await
|
|
2908
|
-
data:
|
|
2917
|
+
await M.put(`/bi-dashboard/${c.value}/${n.widgetName}`, {
|
|
2918
|
+
data: m.value
|
|
2909
2919
|
});
|
|
2910
|
-
let
|
|
2911
|
-
Object.entries(
|
|
2912
|
-
|
|
2920
|
+
let z = `/bi-data?dashboard=${c.value}&widget=${n.widgetName}`;
|
|
2921
|
+
Object.entries(m.value).forEach(([oe, xe]) => {
|
|
2922
|
+
z += `&${oe}=${xe}`;
|
|
2913
2923
|
});
|
|
2914
|
-
const
|
|
2915
|
-
|
|
2924
|
+
const I = new CustomEvent(`update-data-${n.widgetName}`);
|
|
2925
|
+
I.filterUrl = z, window.dispatchEvent(I), i("update-dashboard"), a({
|
|
2916
2926
|
type: "success",
|
|
2917
2927
|
title: "Успішно!",
|
|
2918
2928
|
message: "Дані успішно оновлено"
|
|
@@ -2924,14 +2934,14 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2924
2934
|
message: "При спробі оновити данні сталася помилка"
|
|
2925
2935
|
});
|
|
2926
2936
|
}
|
|
2927
|
-
},
|
|
2937
|
+
}, y = async () => {
|
|
2928
2938
|
try {
|
|
2929
|
-
let
|
|
2930
|
-
Object.entries(
|
|
2931
|
-
|
|
2939
|
+
let z = `/bi-data?dashboard=${c.value}&widget=${n.widgetName}`;
|
|
2940
|
+
Object.entries(m.value).forEach(([oe, xe]) => {
|
|
2941
|
+
z += `&${oe}=${xe}`;
|
|
2932
2942
|
});
|
|
2933
|
-
const
|
|
2934
|
-
|
|
2943
|
+
const I = new CustomEvent(`update-data-${n.widgetName}`);
|
|
2944
|
+
I.filterUrl = z, window.dispatchEvent(I), i("update-dashboard");
|
|
2935
2945
|
} catch {
|
|
2936
2946
|
await a({
|
|
2937
2947
|
type: "error",
|
|
@@ -2940,27 +2950,27 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2940
2950
|
});
|
|
2941
2951
|
}
|
|
2942
2952
|
};
|
|
2943
|
-
return ne(
|
|
2944
|
-
|
|
2953
|
+
return ne(m, () => {
|
|
2954
|
+
y();
|
|
2945
2955
|
}, { deep: !0 }), ie(() => {
|
|
2946
|
-
const
|
|
2947
|
-
o.value =
|
|
2956
|
+
const z = new URLSearchParams(window.top.location.search);
|
|
2957
|
+
o.value = z.get("dashboard"), f();
|
|
2948
2958
|
}), ne(
|
|
2949
2959
|
() => [n.widgetName, n.dashboardId, o.value],
|
|
2950
2960
|
() => {
|
|
2951
2961
|
l.value = [], f();
|
|
2952
2962
|
},
|
|
2953
2963
|
{ immediate: !0 }
|
|
2954
|
-
), e({ requestUpdateWidget:
|
|
2955
|
-
(
|
|
2956
|
-
key:
|
|
2957
|
-
schema:
|
|
2958
|
-
values:
|
|
2959
|
-
"onUpdate:values":
|
|
2964
|
+
), e({ requestUpdateWidget: x }), (z, I) => (h(), w("div", fa, [
|
|
2965
|
+
(h(), F(L(r), {
|
|
2966
|
+
key: v.value,
|
|
2967
|
+
schema: k.value,
|
|
2968
|
+
values: m.value,
|
|
2969
|
+
"onUpdate:values": I[0] || (I[0] = (oe) => m.value = oe)
|
|
2960
2970
|
}, null, 8, ["schema", "values"]))
|
|
2961
2971
|
]));
|
|
2962
2972
|
}
|
|
2963
|
-
},
|
|
2973
|
+
}, ma = { class: "space-y-4" }, ba = {
|
|
2964
2974
|
__name: "vs-editor-form-yaml",
|
|
2965
2975
|
props: {
|
|
2966
2976
|
yamlValue: { type: null, default: () => "" },
|
|
@@ -2968,20 +2978,20 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2968
2978
|
data: { type: Object }
|
|
2969
2979
|
},
|
|
2970
2980
|
setup(s, { expose: e }) {
|
|
2971
|
-
const t = typeof window < "u" ? window.echarts : null, r =
|
|
2972
|
-
() => import("
|
|
2973
|
-
), a = S(null), { $notify: i } =
|
|
2974
|
-
const
|
|
2975
|
-
...(
|
|
2976
|
-
data:
|
|
2981
|
+
const t = typeof window < "u" ? window.echarts : null, r = O(
|
|
2982
|
+
() => import("@opengis/form").then((f) => f.VsInputMonaco)
|
|
2983
|
+
), a = S(null), { $notify: i } = me().proxy, n = s, o = (f, { dimensions: g, source: b }) => {
|
|
2984
|
+
const p = f.getOption(), { data: v, ...k } = (p == null ? void 0 : p.series)[0], [, ...m] = g || [], x = m.map((y, _) => ({
|
|
2985
|
+
...(p == null ? void 0 : p.series[_]) || {},
|
|
2986
|
+
data: b.map((T) => T[_ + 1]),
|
|
2977
2987
|
name: y
|
|
2978
2988
|
}));
|
|
2979
2989
|
f == null || f.setOption(
|
|
2980
2990
|
{
|
|
2981
|
-
...
|
|
2991
|
+
...p || {},
|
|
2982
2992
|
dataset: {
|
|
2983
2993
|
dimensions: g,
|
|
2984
|
-
source:
|
|
2994
|
+
source: b
|
|
2985
2995
|
},
|
|
2986
2996
|
series: x,
|
|
2987
2997
|
xAxis: { type: "category" },
|
|
@@ -2992,16 +3002,16 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
2992
3002
|
}, l = (f) => {
|
|
2993
3003
|
const g = document.getElementById(f);
|
|
2994
3004
|
if (!g) return null;
|
|
2995
|
-
const
|
|
2996
|
-
return
|
|
3005
|
+
const b = t == null ? void 0 : t.getInstanceByDom(g);
|
|
3006
|
+
return b || null;
|
|
2997
3007
|
}, u = S(n.yamlValue), c = async () => {
|
|
2998
3008
|
try {
|
|
2999
|
-
await
|
|
3009
|
+
await M.put(`/bi-dashboard/${a.value}/${n.widgetName}`, {
|
|
3000
3010
|
yml: u.value
|
|
3001
3011
|
});
|
|
3002
3012
|
const f = l(n.widgetName);
|
|
3003
3013
|
if (f) {
|
|
3004
|
-
const g = await
|
|
3014
|
+
const g = await M.get(
|
|
3005
3015
|
`/bi-data?dashboard=${a.value}&widget=${n.widgetName}`
|
|
3006
3016
|
);
|
|
3007
3017
|
o(f, g);
|
|
@@ -3022,10 +3032,10 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3022
3032
|
return ie(() => {
|
|
3023
3033
|
const f = new URLSearchParams(window.top.location.search);
|
|
3024
3034
|
a.value = f.get("dashboard");
|
|
3025
|
-
}), e({ requestUpdateWidget: c }), (f, g) => (
|
|
3026
|
-
|
|
3035
|
+
}), e({ requestUpdateWidget: c }), (f, g) => (h(), w("div", ma, [
|
|
3036
|
+
C(L(r), {
|
|
3027
3037
|
modelValue: u.value,
|
|
3028
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
3038
|
+
"onUpdate:modelValue": g[0] || (g[0] = (b) => u.value = b),
|
|
3029
3039
|
syntax: "yaml",
|
|
3030
3040
|
theme: "vs-light",
|
|
3031
3041
|
height: 400,
|
|
@@ -3033,7 +3043,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3033
3043
|
}, null, 8, ["modelValue"])
|
|
3034
3044
|
]));
|
|
3035
3045
|
}
|
|
3036
|
-
},
|
|
3046
|
+
}, xa = { class: "pt-[10px]" }, ya = {
|
|
3037
3047
|
__name: "vs-editor-form-controls",
|
|
3038
3048
|
props: {
|
|
3039
3049
|
widgetName: { type: String },
|
|
@@ -3044,7 +3054,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3044
3054
|
emits: ["update-dashboard"],
|
|
3045
3055
|
setup(s, { emit: e }) {
|
|
3046
3056
|
var c;
|
|
3047
|
-
const t =
|
|
3057
|
+
const t = O(() => import("@opengis/form")), { $notify: r } = me().proxy, a = e, i = s, n = S(null), o = {
|
|
3048
3058
|
granularity: {
|
|
3049
3059
|
ua: "Granularity",
|
|
3050
3060
|
type: "checkbox",
|
|
@@ -3061,7 +3071,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3061
3071
|
}
|
|
3062
3072
|
}, l = S(i.controls || {}), u = async () => {
|
|
3063
3073
|
try {
|
|
3064
|
-
await
|
|
3074
|
+
await M.put(`/bi-dashboard/${n.value}/${i.widgetName}`, {
|
|
3065
3075
|
controls: l.value
|
|
3066
3076
|
}), await r({
|
|
3067
3077
|
type: "success",
|
|
@@ -3080,35 +3090,35 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3080
3090
|
const f = new URLSearchParams(window.top.location.search);
|
|
3081
3091
|
n.value = f.get("dashboard");
|
|
3082
3092
|
}), (f, g) => {
|
|
3083
|
-
const
|
|
3084
|
-
return
|
|
3085
|
-
|
|
3093
|
+
const b = Q("VsButton");
|
|
3094
|
+
return h(), w("div", xa, [
|
|
3095
|
+
C(b, {
|
|
3086
3096
|
class: "ml-[10px] mb-[10px]",
|
|
3087
3097
|
type: "plain",
|
|
3088
3098
|
onClick: u
|
|
3089
3099
|
}, {
|
|
3090
|
-
default:
|
|
3100
|
+
default: V(() => g[1] || (g[1] = [
|
|
3091
3101
|
X(" Зберегти ")
|
|
3092
3102
|
])),
|
|
3093
3103
|
_: 1
|
|
3094
3104
|
}),
|
|
3095
|
-
|
|
3105
|
+
C(L(t), {
|
|
3096
3106
|
schema: o,
|
|
3097
3107
|
values: l.value,
|
|
3098
|
-
"onUpdate:values": g[0] || (g[0] = (
|
|
3108
|
+
"onUpdate:values": g[0] || (g[0] = (p) => l.value = p)
|
|
3099
3109
|
}, null, 8, ["values"])
|
|
3100
3110
|
]);
|
|
3101
3111
|
};
|
|
3102
3112
|
}
|
|
3103
|
-
},
|
|
3104
|
-
"vs-editor-form-style":
|
|
3105
|
-
"vs-editor-form-data":
|
|
3106
|
-
"vs-editor-form-yaml":
|
|
3107
|
-
"vs-editor-form-controls":
|
|
3108
|
-
},
|
|
3113
|
+
}, Wt = {
|
|
3114
|
+
"vs-editor-form-style": Fr,
|
|
3115
|
+
"vs-editor-form-data": ga,
|
|
3116
|
+
"vs-editor-form-yaml": ba,
|
|
3117
|
+
"vs-editor-form-controls": ya
|
|
3118
|
+
}, wa = {
|
|
3109
3119
|
key: 0,
|
|
3110
3120
|
class: "p-4 text-sm text-amber-700 bg-amber-50 rounded-lg"
|
|
3111
|
-
},
|
|
3121
|
+
}, jt = {
|
|
3112
3122
|
__name: "editor-tab-error-boundary",
|
|
3113
3123
|
props: {
|
|
3114
3124
|
tabComponent: { type: Object, default: null },
|
|
@@ -3123,13 +3133,13 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3123
3133
|
}
|
|
3124
3134
|
e({ save: a });
|
|
3125
3135
|
const i = S(!1);
|
|
3126
|
-
return
|
|
3136
|
+
return hs((n, o, l) => (console.error("Editor tab error:", n, l), i.value = !0, !1)), ne(
|
|
3127
3137
|
() => t.tabComponent,
|
|
3128
3138
|
() => {
|
|
3129
3139
|
i.value = !1;
|
|
3130
3140
|
},
|
|
3131
3141
|
{ immediate: !0 }
|
|
3132
|
-
), (n, o) => i.value ? (
|
|
3142
|
+
), (n, o) => i.value ? (h(), w("div", wa, " Помилка завантаження вмісту. Переключіть таб або оновіть сторінку. ")) : (h(), F(At(s.tabComponent), de({
|
|
3133
3143
|
ref_key: "tabRef",
|
|
3134
3144
|
ref: r,
|
|
3135
3145
|
key: s.tabKey || "tab"
|
|
@@ -3137,18 +3147,18 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3137
3147
|
onUpdateDashboard: o[0] || (o[0] = (l) => n.$emit("update-dashboard"))
|
|
3138
3148
|
}), null, 16));
|
|
3139
3149
|
}
|
|
3140
|
-
},
|
|
3150
|
+
}, va = { class: "h-full flex flex-col bg-white shrink-0 !w-[400px] border rounded-xl overflow-hidden border-gray-200" }, ka = {
|
|
3141
3151
|
key: 0,
|
|
3142
3152
|
class: "flex flex-col min-h-0 flex-1"
|
|
3143
|
-
},
|
|
3153
|
+
}, $a = { class: "flex items-center border-b border-gray-200 bg-white shrink-0 px-4 h-[49px]" }, _a = { class: "flex items-center gap-6 min-w-0" }, Da = ["onClick"], Ca = {
|
|
3144
3154
|
key: 0,
|
|
3145
3155
|
class: "absolute bottom-0 left-0 right-0 h-0.5 bg-blue-600 rounded-full"
|
|
3146
|
-
},
|
|
3156
|
+
}, za = { class: "flex items-center gap-1 ml-auto shrink-0" }, Sa = {
|
|
3147
3157
|
key: 1,
|
|
3148
3158
|
class: "flex-1 min-h-0 overflow-auto px-4 py-4 [&::-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"
|
|
3149
|
-
},
|
|
3159
|
+
}, Ta = { key: 0 }, Ia = { key: 1 }, Va = { class: "p-4" }, La = { class: "flex justify-end mt-4 gap-x-3" }, Ra = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Fa = {
|
|
3150
3160
|
__name: "vs-editor-forms",
|
|
3151
|
-
props: /* @__PURE__ */
|
|
3161
|
+
props: /* @__PURE__ */ We({
|
|
3152
3162
|
selectedWidgetData: {
|
|
3153
3163
|
type: Object,
|
|
3154
3164
|
required: !1,
|
|
@@ -3166,10 +3176,10 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3166
3176
|
selectedWidget: {},
|
|
3167
3177
|
selectedWidgetModifiers: {}
|
|
3168
3178
|
}),
|
|
3169
|
-
emits: /* @__PURE__ */
|
|
3179
|
+
emits: /* @__PURE__ */ We(["update-data"], ["update:selectedWidget"]),
|
|
3170
3180
|
setup(s, { emit: e }) {
|
|
3171
|
-
var y,
|
|
3172
|
-
const t =
|
|
3181
|
+
var y, _;
|
|
3182
|
+
const t = O(() => import("@opengis/form")), r = (_ = (y = me()) == null ? void 0 : y.proxy) == null ? void 0 : _.$notify, a = e, i = S(null), n = s, o = S(!1), l = S(!0), u = S(!1), c = S({}), f = Ot(s, "selectedWidget"), g = [
|
|
3173
3183
|
"table",
|
|
3174
3184
|
"text",
|
|
3175
3185
|
"number",
|
|
@@ -3178,9 +3188,9 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3178
3188
|
"listbar",
|
|
3179
3189
|
"map",
|
|
3180
3190
|
"pivot"
|
|
3181
|
-
],
|
|
3191
|
+
], b = S("data"), p = async () => {
|
|
3182
3192
|
try {
|
|
3183
|
-
await
|
|
3193
|
+
await M.delete(
|
|
3184
3194
|
`/bi-dashboard/${n.selectedDashboard}/${n.selectedWidgetData.name}`
|
|
3185
3195
|
);
|
|
3186
3196
|
const T = new URL(window.top.location.href);
|
|
@@ -3196,7 +3206,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3196
3206
|
message: "При спробі видалити віджет виникла помилка"
|
|
3197
3207
|
});
|
|
3198
3208
|
}
|
|
3199
|
-
}, v =
|
|
3209
|
+
}, v = B(() => {
|
|
3200
3210
|
const T = [
|
|
3201
3211
|
{ id: "data", label: "Дані" },
|
|
3202
3212
|
{ id: "style", label: "Стилі" },
|
|
@@ -3204,24 +3214,24 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3204
3214
|
// { id: 'controls', label: 'Контролси' },
|
|
3205
3215
|
];
|
|
3206
3216
|
return T == null ? void 0 : T.filter(($) => {
|
|
3207
|
-
var E,
|
|
3217
|
+
var E, U, Z;
|
|
3208
3218
|
return $.id === "style" ? !(g != null && g.includes(
|
|
3209
|
-
((E = n.selectedWidgetData) == null ? void 0 : E.type) || ((
|
|
3219
|
+
((E = n.selectedWidgetData) == null ? void 0 : E.type) || ((Z = (U = n.selectedWidgetData) == null ? void 0 : U.data) == null ? void 0 : Z.type)
|
|
3210
3220
|
)) : !0;
|
|
3211
3221
|
});
|
|
3212
3222
|
}), k = () => {
|
|
3213
|
-
var T, $, E,
|
|
3223
|
+
var T, $, E, U, Z, se, re, D, ae;
|
|
3214
3224
|
c.value = {
|
|
3215
3225
|
title: (T = n.selectedWidgetData) == null ? void 0 : T.title,
|
|
3216
3226
|
type: ($ = n.selectedWidgetData) == null ? void 0 : $.type,
|
|
3217
3227
|
table: (E = n.selectedWidgetData) == null ? void 0 : E.table_name,
|
|
3218
|
-
query: (
|
|
3228
|
+
query: (Z = (U = n.selectedWidgetData) == null ? void 0 : U.data) == null ? void 0 : Z.query,
|
|
3219
3229
|
x: (re = (se = n.selectedWidgetData) == null ? void 0 : se.data) == null ? void 0 : re.x,
|
|
3220
|
-
cls: (ae = (
|
|
3230
|
+
cls: (ae = (D = n.selectedWidgetData) == null ? void 0 : D.data) == null ? void 0 : ae.cls
|
|
3221
3231
|
}, u.value = !0;
|
|
3222
|
-
},
|
|
3232
|
+
}, m = async () => {
|
|
3223
3233
|
try {
|
|
3224
|
-
await
|
|
3234
|
+
await M.put(
|
|
3225
3235
|
`/bi-dashboard/${n.selectedDashboard}/${n.selectedWidgetData.name}`,
|
|
3226
3236
|
c.value
|
|
3227
3237
|
), r({
|
|
@@ -3333,137 +3343,137 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3333
3343
|
}
|
|
3334
3344
|
};
|
|
3335
3345
|
return (T, $) => {
|
|
3336
|
-
var
|
|
3346
|
+
var U, Z, se, re, D, ae, ue, ce, we, ve, ke;
|
|
3337
3347
|
const E = Q("VsPopover");
|
|
3338
|
-
return
|
|
3339
|
-
d("div",
|
|
3340
|
-
s.selectedWidgetData ? (
|
|
3341
|
-
d("div",
|
|
3342
|
-
d("nav",
|
|
3343
|
-
(
|
|
3344
|
-
key:
|
|
3348
|
+
return h(), w(A, null, [
|
|
3349
|
+
d("div", va, [
|
|
3350
|
+
s.selectedWidgetData ? (h(), w("div", ka, [
|
|
3351
|
+
d("div", $a, [
|
|
3352
|
+
d("nav", _a, [
|
|
3353
|
+
(h(!0), w(A, null, G(v.value, (q) => (h(), w("button", {
|
|
3354
|
+
key: q.id,
|
|
3345
3355
|
type: "button",
|
|
3346
|
-
class: K(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap",
|
|
3347
|
-
onClick: (
|
|
3356
|
+
class: K(["relative pb-3 pt-1 text-sm font-medium transition-colors whitespace-nowrap", b.value === q.id ? "text-blue-600" : "text-gray-600 hover:text-gray-900"]),
|
|
3357
|
+
onClick: (pe) => b.value = q.id
|
|
3348
3358
|
}, [
|
|
3349
|
-
X(
|
|
3350
|
-
|
|
3351
|
-
], 10,
|
|
3359
|
+
X(R(q.label) + " ", 1),
|
|
3360
|
+
b.value === q.id ? (h(), w("span", Ca)) : P("", !0)
|
|
3361
|
+
], 10, Da))), 128))
|
|
3352
3362
|
]),
|
|
3353
|
-
d("div",
|
|
3354
|
-
|
|
3363
|
+
d("div", za, [
|
|
3364
|
+
C(E, {
|
|
3355
3365
|
placement: "left",
|
|
3356
3366
|
trigger: "hover"
|
|
3357
3367
|
}, {
|
|
3358
|
-
reference:
|
|
3368
|
+
reference: V(() => [
|
|
3359
3369
|
d("button", {
|
|
3360
3370
|
type: "button",
|
|
3361
3371
|
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",
|
|
3362
3372
|
title: "Зберегти",
|
|
3363
|
-
onClick: $[0] || ($[0] = (
|
|
3364
|
-
var
|
|
3365
|
-
return (
|
|
3373
|
+
onClick: $[0] || ($[0] = (q) => {
|
|
3374
|
+
var pe, $e;
|
|
3375
|
+
return ($e = (pe = i.value) == null ? void 0 : pe.save) == null ? void 0 : $e.call(pe);
|
|
3366
3376
|
})
|
|
3367
3377
|
}, [
|
|
3368
|
-
|
|
3378
|
+
C(L(Ds), { class: "h-4 w-4" })
|
|
3369
3379
|
])
|
|
3370
3380
|
]),
|
|
3371
|
-
default:
|
|
3381
|
+
default: V(() => [
|
|
3372
3382
|
$[9] || ($[9] = X(" Зберегти "))
|
|
3373
3383
|
]),
|
|
3374
3384
|
_: 1
|
|
3375
3385
|
}),
|
|
3376
|
-
|
|
3386
|
+
C(E, {
|
|
3377
3387
|
placement: "left",
|
|
3378
3388
|
trigger: "hover"
|
|
3379
3389
|
}, {
|
|
3380
|
-
reference:
|
|
3390
|
+
reference: V(() => [
|
|
3381
3391
|
d("button", {
|
|
3382
3392
|
type: "button",
|
|
3383
3393
|
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",
|
|
3384
3394
|
onClick: k
|
|
3385
3395
|
}, [
|
|
3386
|
-
|
|
3396
|
+
C(Zt, { class: "h-4 w-4" })
|
|
3387
3397
|
])
|
|
3388
3398
|
]),
|
|
3389
|
-
default:
|
|
3399
|
+
default: V(() => [
|
|
3390
3400
|
$[10] || ($[10] = X(" Редагувати віджет "))
|
|
3391
3401
|
]),
|
|
3392
3402
|
_: 1
|
|
3393
3403
|
}),
|
|
3394
|
-
|
|
3404
|
+
C(E, {
|
|
3395
3405
|
placement: "left",
|
|
3396
3406
|
trigger: "hover"
|
|
3397
3407
|
}, {
|
|
3398
|
-
reference:
|
|
3408
|
+
reference: V(() => [
|
|
3399
3409
|
d("button", {
|
|
3400
3410
|
type: "button",
|
|
3401
3411
|
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",
|
|
3402
|
-
onClick: $[1] || ($[1] = (
|
|
3412
|
+
onClick: $[1] || ($[1] = (q) => o.value = !0)
|
|
3403
3413
|
}, [
|
|
3404
|
-
|
|
3414
|
+
C(L(Ht), { class: "h-4 w-4" })
|
|
3405
3415
|
])
|
|
3406
3416
|
]),
|
|
3407
|
-
default:
|
|
3417
|
+
default: V(() => [
|
|
3408
3418
|
$[11] || ($[11] = X(" Видалити віджет "))
|
|
3409
3419
|
]),
|
|
3410
3420
|
_: 1
|
|
3411
3421
|
})
|
|
3412
3422
|
])
|
|
3413
3423
|
]),
|
|
3414
|
-
(
|
|
3424
|
+
(U = s.currentWidgetData) != null && U.status ? (h(), F(Ne, {
|
|
3415
3425
|
key: 0,
|
|
3416
|
-
title: (
|
|
3426
|
+
title: (Z = s.currentWidgetData) == null ? void 0 : Z.title,
|
|
3417
3427
|
text: (se = s.currentWidgetData) == null ? void 0 : se.message
|
|
3418
|
-
}, null, 8, ["title", "text"])) : (
|
|
3419
|
-
l.value && s.currentWidgetData ? (
|
|
3420
|
-
|
|
3428
|
+
}, null, 8, ["title", "text"])) : (h(), w("div", Sa, [
|
|
3429
|
+
l.value && s.currentWidgetData ? (h(), w("div", Ta, [
|
|
3430
|
+
C(jt, {
|
|
3421
3431
|
ref_key: "tabPanelRef",
|
|
3422
3432
|
ref: i,
|
|
3423
|
-
"tab-key":
|
|
3424
|
-
"tab-component":
|
|
3433
|
+
"tab-key": b.value,
|
|
3434
|
+
"tab-component": L(Wt)["vs-editor-form-" + b.value],
|
|
3425
3435
|
widgetName: (re = s.selectedWidgetData) == null ? void 0 : re.name,
|
|
3426
3436
|
dashboardId: s.selectedDashboard,
|
|
3427
|
-
yamlValue: ((
|
|
3437
|
+
yamlValue: ((D = s.selectedWidgetData) == null ? void 0 : D.yml) || "",
|
|
3428
3438
|
data: s.selectedWidgetData,
|
|
3429
3439
|
controls: (ae = s.selectedWidgetData) == null ? void 0 : ae.controls,
|
|
3430
|
-
columns: (
|
|
3431
|
-
onUpdateDashboard: $[2] || ($[2] = (
|
|
3440
|
+
columns: (ue = s.currentWidgetData) == null ? void 0 : ue.columns,
|
|
3441
|
+
onUpdateDashboard: $[2] || ($[2] = (q) => T.$emit("update-data"))
|
|
3432
3442
|
}, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
|
|
3433
|
-
])) : (
|
|
3434
|
-
|
|
3443
|
+
])) : (h(), w("div", Ia, [
|
|
3444
|
+
C(jt, {
|
|
3435
3445
|
ref_key: "tabPanelRef",
|
|
3436
3446
|
ref: i,
|
|
3437
|
-
"tab-key":
|
|
3438
|
-
"tab-component":
|
|
3439
|
-
widgetName: (
|
|
3447
|
+
"tab-key": b.value,
|
|
3448
|
+
"tab-component": L(Wt)["vs-editor-form-" + b.value],
|
|
3449
|
+
widgetName: (ce = s.selectedWidgetData) == null ? void 0 : ce.name,
|
|
3440
3450
|
dashboardId: s.selectedDashboard,
|
|
3441
|
-
yamlValue: ((
|
|
3451
|
+
yamlValue: ((we = s.selectedWidgetData) == null ? void 0 : we.yml) || "",
|
|
3442
3452
|
data: s.selectedWidgetData,
|
|
3443
|
-
controls: (
|
|
3444
|
-
columns: (
|
|
3445
|
-
onUpdateDashboard: $[3] || ($[3] = (
|
|
3453
|
+
controls: (ve = s.selectedWidgetData) == null ? void 0 : ve.controls,
|
|
3454
|
+
columns: (ke = s.currentWidgetData) == null ? void 0 : ke.columns,
|
|
3455
|
+
onUpdateDashboard: $[3] || ($[3] = (q) => T.$emit("update-data"))
|
|
3446
3456
|
}, null, 8, ["tab-key", "tab-component", "widgetName", "dashboardId", "yamlValue", "data", "controls", "columns"])
|
|
3447
3457
|
])),
|
|
3448
|
-
|
|
3458
|
+
C(Te, {
|
|
3449
3459
|
teleport: "#modal",
|
|
3450
3460
|
visible: o.value,
|
|
3451
3461
|
title: "Ви впевнені?",
|
|
3452
|
-
onClose: $[5] || ($[5] = (
|
|
3462
|
+
onClose: $[5] || ($[5] = (q) => o.value = !1)
|
|
3453
3463
|
}, {
|
|
3454
|
-
default:
|
|
3455
|
-
d("div",
|
|
3464
|
+
default: V(() => [
|
|
3465
|
+
d("div", Va, [
|
|
3456
3466
|
$[12] || ($[12] = d("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей віджет? ", -1)),
|
|
3457
|
-
d("div",
|
|
3467
|
+
d("div", La, [
|
|
3458
3468
|
d("button", {
|
|
3459
3469
|
type: "button",
|
|
3460
3470
|
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",
|
|
3461
|
-
onClick: $[4] || ($[4] = (
|
|
3471
|
+
onClick: $[4] || ($[4] = (q) => o.value = !1)
|
|
3462
3472
|
}, " Скасувати "),
|
|
3463
3473
|
d("button", {
|
|
3464
3474
|
type: "button",
|
|
3465
3475
|
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",
|
|
3466
|
-
onClick:
|
|
3476
|
+
onClick: p
|
|
3467
3477
|
}, " Так, я впевнена(ий) ")
|
|
3468
3478
|
])
|
|
3469
3479
|
])
|
|
@@ -3471,46 +3481,46 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3471
3481
|
_: 1
|
|
3472
3482
|
}, 8, ["visible"])
|
|
3473
3483
|
]))
|
|
3474
|
-
])) : (
|
|
3484
|
+
])) : (h(), F(Ne, {
|
|
3475
3485
|
key: 1,
|
|
3476
3486
|
title: "Оберіть один з віджетів",
|
|
3477
3487
|
text: "",
|
|
3478
3488
|
class: "p-4"
|
|
3479
3489
|
}))
|
|
3480
3490
|
]),
|
|
3481
|
-
|
|
3491
|
+
C(Te, {
|
|
3482
3492
|
teleport: "#modal",
|
|
3483
3493
|
visible: u.value,
|
|
3484
3494
|
title: "Редагувати віджет",
|
|
3485
|
-
onClose: $[8] || ($[8] = (
|
|
3495
|
+
onClose: $[8] || ($[8] = (q) => u.value = !1)
|
|
3486
3496
|
}, {
|
|
3487
|
-
footer:
|
|
3488
|
-
d("div",
|
|
3497
|
+
footer: V(() => [
|
|
3498
|
+
d("div", Ra, [
|
|
3489
3499
|
d("button", {
|
|
3490
3500
|
style: { border: "1px solid #000" },
|
|
3491
|
-
onClick: $[7] || ($[7] = (
|
|
3501
|
+
onClick: $[7] || ($[7] = (q) => u.value = !1),
|
|
3492
3502
|
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"
|
|
3493
3503
|
}, " Скасувати "),
|
|
3494
3504
|
d("button", {
|
|
3495
|
-
onClick:
|
|
3505
|
+
onClick: m,
|
|
3496
3506
|
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"
|
|
3497
3507
|
}, " Зберегти ")
|
|
3498
3508
|
])
|
|
3499
3509
|
]),
|
|
3500
|
-
default:
|
|
3501
|
-
x ? (
|
|
3510
|
+
default: V(() => [
|
|
3511
|
+
x ? (h(), F(L(t), {
|
|
3502
3512
|
key: 0,
|
|
3503
3513
|
schema: x,
|
|
3504
3514
|
values: c.value,
|
|
3505
|
-
"onUpdate:values": $[6] || ($[6] = (
|
|
3506
|
-
}, null, 8, ["values"])) :
|
|
3515
|
+
"onUpdate:values": $[6] || ($[6] = (q) => c.value = q)
|
|
3516
|
+
}, null, 8, ["values"])) : P("", !0)
|
|
3507
3517
|
]),
|
|
3508
3518
|
_: 1
|
|
3509
3519
|
}, 8, ["visible"])
|
|
3510
3520
|
], 64);
|
|
3511
3521
|
};
|
|
3512
3522
|
}
|
|
3513
|
-
},
|
|
3523
|
+
}, Wa = { class: "overflow-hidden flex flex-col min-h-[480px]" }, ja = { class: "flex-1 flex min-h-0 gap-4" }, Na = { class: "flex-1 min-w-0 pb-4 overflow-auto bg-gray-50/50" }, Pa = { class: "w-[400px] shrink-0 flex flex-col" }, Ea = {
|
|
3514
3524
|
__name: "vs-widget-editor-panel",
|
|
3515
3525
|
props: {
|
|
3516
3526
|
selectedWidget: { type: String, default: "" },
|
|
@@ -3521,14 +3531,14 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3521
3531
|
},
|
|
3522
3532
|
emits: ["update:selectedWidget", "update-data"],
|
|
3523
3533
|
setup(s, { emit: e }) {
|
|
3524
|
-
const t = s, r = e, a =
|
|
3534
|
+
const t = s, r = e, a = B({
|
|
3525
3535
|
get: () => t.selectedWidget,
|
|
3526
3536
|
set: (i) => r("update:selectedWidget", i)
|
|
3527
3537
|
});
|
|
3528
|
-
return (i, n) => (
|
|
3529
|
-
d("div",
|
|
3530
|
-
d("div",
|
|
3531
|
-
|
|
3538
|
+
return (i, n) => (h(), w("div", Wa, [
|
|
3539
|
+
d("div", ja, [
|
|
3540
|
+
d("div", Na, [
|
|
3541
|
+
C(je, {
|
|
3532
3542
|
dashboard: s.selectedDashboard,
|
|
3533
3543
|
widget: s.selectedWidget,
|
|
3534
3544
|
"selected-widget": s.selectedWidget,
|
|
@@ -3538,7 +3548,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3538
3548
|
}, null, 8, ["dashboard", "widget", "selected-widget", "dashboard-widgets"])
|
|
3539
3549
|
]),
|
|
3540
3550
|
d("div", Pa, [
|
|
3541
|
-
|
|
3551
|
+
C(Fa, {
|
|
3542
3552
|
selectedWidget: a.value,
|
|
3543
3553
|
"onUpdate:selectedWidget": n[0] || (n[0] = (o) => a.value = o),
|
|
3544
3554
|
selectedWidgetData: s.selectedWidgetData,
|
|
@@ -3550,36 +3560,36 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3550
3560
|
])
|
|
3551
3561
|
]));
|
|
3552
3562
|
}
|
|
3553
|
-
},
|
|
3563
|
+
}, Oa = {
|
|
3554
3564
|
__name: "icon-grid",
|
|
3555
3565
|
setup(s) {
|
|
3556
|
-
return (e, t) => (
|
|
3566
|
+
return (e, t) => (h(), F(L($s), de(e.$attrs, { size: 24 }), null, 16));
|
|
3557
3567
|
}
|
|
3558
|
-
},
|
|
3568
|
+
}, Aa = {
|
|
3559
3569
|
__name: "icon-filter",
|
|
3560
3570
|
setup(s) {
|
|
3561
|
-
return (e, t) => (
|
|
3571
|
+
return (e, t) => (h(), F(L(Bt), de(e.$attrs, { size: 24 }), null, 16));
|
|
3562
3572
|
}
|
|
3563
|
-
},
|
|
3573
|
+
}, Ba = {
|
|
3564
3574
|
__name: "icon-table",
|
|
3565
3575
|
setup(s) {
|
|
3566
|
-
return (e, t) => (
|
|
3576
|
+
return (e, t) => (h(), F(L(zs), de(e.$attrs, { size: 24 }), null, 16));
|
|
3567
3577
|
}
|
|
3568
|
-
},
|
|
3578
|
+
}, qa = {
|
|
3569
3579
|
__name: "icon-more",
|
|
3570
3580
|
setup(s) {
|
|
3571
|
-
return (e, t) => (
|
|
3581
|
+
return (e, t) => (h(), F(L(vs), de(e.$attrs, { size: 24 }), null, 16));
|
|
3572
3582
|
}
|
|
3573
|
-
},
|
|
3583
|
+
}, Ma = O(() => import("@opengis/form")), Ua = {
|
|
3574
3584
|
components: {
|
|
3575
|
-
VsModal:
|
|
3576
|
-
VForm:
|
|
3577
|
-
deleteIcon:
|
|
3578
|
-
editIcon:
|
|
3579
|
-
IconGrid:
|
|
3580
|
-
IconMore:
|
|
3581
|
-
IconFilter:
|
|
3582
|
-
IconTable:
|
|
3585
|
+
VsModal: Te,
|
|
3586
|
+
VForm: Ma,
|
|
3587
|
+
deleteIcon: Ht,
|
|
3588
|
+
editIcon: Zt,
|
|
3589
|
+
IconGrid: Oa,
|
|
3590
|
+
IconMore: qa,
|
|
3591
|
+
IconFilter: Aa,
|
|
3592
|
+
IconTable: Ba
|
|
3583
3593
|
},
|
|
3584
3594
|
watch: {
|
|
3585
3595
|
dashboardData: {
|
|
@@ -3733,7 +3743,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3733
3743
|
async editDashboard() {
|
|
3734
3744
|
var s, e;
|
|
3735
3745
|
try {
|
|
3736
|
-
(e = (s = this.$refs) == null ? void 0 : s.formEdit) == null || e.doValidation(), await
|
|
3746
|
+
(e = (s = this.$refs) == null ? void 0 : s.formEdit) == null || e.doValidation(), await M.put(`/bi-dashboard/${this.selected}`, this.formEditValue), await this.$notify({
|
|
3737
3747
|
title: "Успішно!",
|
|
3738
3748
|
type: "success",
|
|
3739
3749
|
message: "Дані успішно оновлено"
|
|
@@ -3749,7 +3759,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3749
3759
|
async editDashboardGrid() {
|
|
3750
3760
|
var s, e;
|
|
3751
3761
|
try {
|
|
3752
|
-
(e = (s = this.$refs) == null ? void 0 : s.formGrid) == null || e.doValidation(), await
|
|
3762
|
+
(e = (s = this.$refs) == null ? void 0 : s.formGrid) == null || e.doValidation(), await M.put(`/bi-dashboard/${this.selected}`, {
|
|
3753
3763
|
...this.formEditValue,
|
|
3754
3764
|
...this.formGridValue
|
|
3755
3765
|
}), await this.$notify({
|
|
@@ -3768,7 +3778,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3768
3778
|
async editDashboardFilters() {
|
|
3769
3779
|
var s, e;
|
|
3770
3780
|
try {
|
|
3771
|
-
(e = (s = this.$refs) == null ? void 0 : s.formFilter) == null || e.doValidation(), await
|
|
3781
|
+
(e = (s = this.$refs) == null ? void 0 : s.formFilter) == null || e.doValidation(), await M.put(`/bi-dashboard/${this.selected}`, {
|
|
3772
3782
|
...this.formEditValue,
|
|
3773
3783
|
...this.formGridValue,
|
|
3774
3784
|
...this.formFilterValue
|
|
@@ -3787,7 +3797,7 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3787
3797
|
},
|
|
3788
3798
|
async deleteDashboard() {
|
|
3789
3799
|
try {
|
|
3790
|
-
await
|
|
3800
|
+
await M.delete(`/bi-dashboard/${this.selected}`);
|
|
3791
3801
|
const s = new URL(window.top.location.href);
|
|
3792
3802
|
s.searchParams.delete("dashboard"), s.searchParams.delete("widget"), window.history.pushState({}, "", s), await this.$notify({
|
|
3793
3803
|
title: "Успішно!",
|
|
@@ -3806,61 +3816,61 @@ const pa = { class: "space-y-4" }, ha = {
|
|
|
3806
3816
|
document.body.click();
|
|
3807
3817
|
}
|
|
3808
3818
|
}
|
|
3809
|
-
},
|
|
3819
|
+
}, Ga = {
|
|
3810
3820
|
key: 0,
|
|
3811
3821
|
class: "flex items-center gap-4"
|
|
3812
|
-
},
|
|
3813
|
-
function
|
|
3822
|
+
}, Ha = { class: "h-[30px] w-[30px] flex items-center justify-center" }, Za = { class: "flex flex-col items-start -ml-2 -mr-2" }, Qa = { class: "p-4" }, Xa = { class: "flex justify-end mt-4 gap-x-3" }, Ka = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Ya = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Ja = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" };
|
|
3823
|
+
function en(s, e, t, r, a, i) {
|
|
3814
3824
|
const n = Q("IconFilter"), o = Q("VsPopover"), l = Q("IconGrid"), u = Q("IconMore"), c = Q("VsModal"), f = Q("VForm");
|
|
3815
|
-
return
|
|
3816
|
-
t.selected ? (
|
|
3817
|
-
|
|
3825
|
+
return h(), w("div", null, [
|
|
3826
|
+
t.selected ? (h(), w("div", Ga, [
|
|
3827
|
+
C(o, {
|
|
3818
3828
|
placement: "left",
|
|
3819
3829
|
trigger: "hover"
|
|
3820
3830
|
}, {
|
|
3821
|
-
reference:
|
|
3831
|
+
reference: V(() => [
|
|
3822
3832
|
d("button", {
|
|
3823
3833
|
class: "h-[30px] w-[30px] flex items-center justify-center",
|
|
3824
3834
|
onClick: e[0] || (e[0] = (g) => a.isFormFilter = !0)
|
|
3825
3835
|
}, [
|
|
3826
|
-
|
|
3836
|
+
C(n, { class: "h-[20px] text-gray-500" })
|
|
3827
3837
|
])
|
|
3828
3838
|
]),
|
|
3829
|
-
default:
|
|
3839
|
+
default: V(() => [
|
|
3830
3840
|
e[19] || (e[19] = X(" Редагувати фільтри "))
|
|
3831
3841
|
]),
|
|
3832
3842
|
_: 1
|
|
3833
3843
|
}),
|
|
3834
|
-
|
|
3844
|
+
C(o, {
|
|
3835
3845
|
placement: "left",
|
|
3836
3846
|
trigger: "hover"
|
|
3837
3847
|
}, {
|
|
3838
|
-
reference:
|
|
3848
|
+
reference: V(() => [
|
|
3839
3849
|
d("button", {
|
|
3840
3850
|
class: "h-[30px] w-[30px] flex items-center justify-center",
|
|
3841
3851
|
onClick: e[1] || (e[1] = (g) => a.isFormGrid = !0)
|
|
3842
3852
|
}, [
|
|
3843
|
-
|
|
3853
|
+
C(l, { class: "h-[20px] text-gray-500" })
|
|
3844
3854
|
])
|
|
3845
3855
|
]),
|
|
3846
|
-
default:
|
|
3856
|
+
default: V(() => [
|
|
3847
3857
|
e[20] || (e[20] = X(" Редагувати структуру дашборду "))
|
|
3848
3858
|
]),
|
|
3849
3859
|
_: 1
|
|
3850
3860
|
}),
|
|
3851
|
-
|
|
3861
|
+
C(o, {
|
|
3852
3862
|
placement: "left",
|
|
3853
3863
|
trigger: "hover"
|
|
3854
3864
|
}, {
|
|
3855
|
-
reference:
|
|
3856
|
-
|
|
3857
|
-
reference:
|
|
3858
|
-
d("button",
|
|
3859
|
-
|
|
3865
|
+
reference: V(() => [
|
|
3866
|
+
C(o, { placement: "bottom-left" }, {
|
|
3867
|
+
reference: V(() => [
|
|
3868
|
+
d("button", Ha, [
|
|
3869
|
+
C(u, { class: "h-[20px]" })
|
|
3860
3870
|
])
|
|
3861
3871
|
]),
|
|
3862
|
-
default:
|
|
3863
|
-
d("div",
|
|
3872
|
+
default: V(() => [
|
|
3873
|
+
d("div", Za, [
|
|
3864
3874
|
d("button", {
|
|
3865
3875
|
onClick: e[2] || (e[2] = (g) => {
|
|
3866
3876
|
i.closePopover(), a.isFormEdit = !0;
|
|
@@ -3878,23 +3888,23 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3878
3888
|
_: 1
|
|
3879
3889
|
})
|
|
3880
3890
|
]),
|
|
3881
|
-
default:
|
|
3891
|
+
default: V(() => [
|
|
3882
3892
|
e[21] || (e[21] = X(" Керування дашбордом "))
|
|
3883
3893
|
]),
|
|
3884
3894
|
_: 1
|
|
3885
3895
|
})
|
|
3886
|
-
])) :
|
|
3887
|
-
|
|
3896
|
+
])) : P("", !0),
|
|
3897
|
+
C(c, {
|
|
3888
3898
|
teleport: "#modal",
|
|
3889
3899
|
visible: a.isDeleteConfirm,
|
|
3890
3900
|
size: "small",
|
|
3891
3901
|
title: "Ви впевнені?",
|
|
3892
3902
|
onClose: e[6] || (e[6] = (g) => a.isDeleteConfirm = !1)
|
|
3893
3903
|
}, {
|
|
3894
|
-
default:
|
|
3895
|
-
d("div",
|
|
3904
|
+
default: V(() => [
|
|
3905
|
+
d("div", Qa, [
|
|
3896
3906
|
e[22] || (e[22] = d("p", { class: "mt-1 text-gray-500 dark:text-neutral-500" }, " Ви впевнені, що хочете видалити цей дашборд? ", -1)),
|
|
3897
|
-
d("div",
|
|
3907
|
+
d("div", Xa, [
|
|
3898
3908
|
d("button", {
|
|
3899
3909
|
type: "button",
|
|
3900
3910
|
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",
|
|
@@ -3910,14 +3920,14 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3910
3920
|
]),
|
|
3911
3921
|
_: 1
|
|
3912
3922
|
}, 8, ["visible"]),
|
|
3913
|
-
|
|
3923
|
+
C(c, {
|
|
3914
3924
|
teleport: "#modal",
|
|
3915
3925
|
visible: a.isFormEdit,
|
|
3916
3926
|
title: "Редагувати дашборд",
|
|
3917
3927
|
onClose: e[10] || (e[10] = (g) => a.isFormEdit = !1)
|
|
3918
3928
|
}, {
|
|
3919
|
-
footer:
|
|
3920
|
-
d("div",
|
|
3929
|
+
footer: V(() => [
|
|
3930
|
+
d("div", Ka, [
|
|
3921
3931
|
d("button", {
|
|
3922
3932
|
style: { border: "1px solid #000" },
|
|
3923
3933
|
onClick: e[8] || (e[8] = (g) => a.isFormEdit = !1),
|
|
@@ -3929,8 +3939,8 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3929
3939
|
}, " Зберегти ")
|
|
3930
3940
|
])
|
|
3931
3941
|
]),
|
|
3932
|
-
default:
|
|
3933
|
-
|
|
3942
|
+
default: V(() => [
|
|
3943
|
+
C(f, {
|
|
3934
3944
|
ref: "formEdit",
|
|
3935
3945
|
schema: a.editDashboardScheme,
|
|
3936
3946
|
values: a.formEditValue,
|
|
@@ -3939,14 +3949,14 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3939
3949
|
]),
|
|
3940
3950
|
_: 1
|
|
3941
3951
|
}, 8, ["visible"]),
|
|
3942
|
-
|
|
3952
|
+
C(c, {
|
|
3943
3953
|
teleport: "#modal",
|
|
3944
3954
|
visible: a.isFormGrid,
|
|
3945
3955
|
title: "Редагувати структуру дашборду",
|
|
3946
3956
|
onClose: e[14] || (e[14] = (g) => a.isFormGrid = !1)
|
|
3947
3957
|
}, {
|
|
3948
|
-
footer:
|
|
3949
|
-
d("div",
|
|
3958
|
+
footer: V(() => [
|
|
3959
|
+
d("div", Ya, [
|
|
3950
3960
|
d("button", {
|
|
3951
3961
|
style: { border: "1px solid #000" },
|
|
3952
3962
|
onClick: e[12] || (e[12] = (g) => a.isFormGrid = !1),
|
|
@@ -3958,8 +3968,8 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3958
3968
|
}, " Зберегти ")
|
|
3959
3969
|
])
|
|
3960
3970
|
]),
|
|
3961
|
-
default:
|
|
3962
|
-
|
|
3971
|
+
default: V(() => [
|
|
3972
|
+
C(f, {
|
|
3963
3973
|
ref: "formgrid",
|
|
3964
3974
|
schema: a.editGridScheme,
|
|
3965
3975
|
values: a.formGridValue,
|
|
@@ -3968,14 +3978,14 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3968
3978
|
]),
|
|
3969
3979
|
_: 1
|
|
3970
3980
|
}, 8, ["visible"]),
|
|
3971
|
-
|
|
3981
|
+
C(c, {
|
|
3972
3982
|
teleport: "#modal",
|
|
3973
3983
|
visible: a.isFormFilter,
|
|
3974
3984
|
title: "Редагувати фільтри",
|
|
3975
3985
|
onClose: e[18] || (e[18] = (g) => a.isFormFilter = !1)
|
|
3976
3986
|
}, {
|
|
3977
|
-
footer:
|
|
3978
|
-
d("div",
|
|
3987
|
+
footer: V(() => [
|
|
3988
|
+
d("div", Ja, [
|
|
3979
3989
|
d("button", {
|
|
3980
3990
|
style: { border: "1px solid #000" },
|
|
3981
3991
|
onClick: e[16] || (e[16] = (g) => a.isFormFilter = !1),
|
|
@@ -3987,8 +3997,8 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3987
3997
|
}, " Зберегти ")
|
|
3988
3998
|
])
|
|
3989
3999
|
]),
|
|
3990
|
-
default:
|
|
3991
|
-
|
|
4000
|
+
default: V(() => [
|
|
4001
|
+
C(f, {
|
|
3992
4002
|
ref: "formFilter",
|
|
3993
4003
|
schema: a.editFilterScheme,
|
|
3994
4004
|
values: a.formFilterValue,
|
|
@@ -3999,16 +4009,16 @@ function Ya(s, e, t, r, a, i) {
|
|
|
3999
4009
|
}, 8, ["visible"])
|
|
4000
4010
|
]);
|
|
4001
4011
|
}
|
|
4002
|
-
const
|
|
4012
|
+
const tn = /* @__PURE__ */ H(Ua, [["render", en]]), sn = { class: "flex-1 min-w-0 flex flex-col overflow-auto" }, rn = { class: "max-w-7xl mx-auto px-6 w-full flex flex-col min-h-0 flex-1" }, an = { class: "relative z-10 shrink-0 mt-4 mb-6" }, nn = { class: "flex items-center text-sm text-gray-600" }, on = {
|
|
4003
4013
|
key: 0,
|
|
4004
4014
|
class: "flex items-center justify-between gap-4 mt-3"
|
|
4005
|
-
},
|
|
4015
|
+
}, ln = { class: "min-w-0" }, cn = { class: "text-2xl font-bold text-gray-900" }, dn = {
|
|
4006
4016
|
key: 0,
|
|
4007
4017
|
class: "mt-1.5 text-sm text-gray-600"
|
|
4008
|
-
},
|
|
4018
|
+
}, un = { class: "flex items-center shrink-0" }, pn = {
|
|
4009
4019
|
key: 1,
|
|
4010
4020
|
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"
|
|
4011
|
-
},
|
|
4021
|
+
}, hn = {
|
|
4012
4022
|
__name: "vs-editor",
|
|
4013
4023
|
props: {
|
|
4014
4024
|
prefix: String,
|
|
@@ -4019,92 +4029,92 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4019
4029
|
emits: ["back"],
|
|
4020
4030
|
setup(s, { emit: e }) {
|
|
4021
4031
|
const t = s;
|
|
4022
|
-
|
|
4023
|
-
const r = e, a =
|
|
4032
|
+
Me(t.prefix || "/api");
|
|
4033
|
+
const r = e, a = qe("biClearDashboard", null), i = S(t.initialDashboardId || ""), n = S(""), o = S(null), l = S(null), u = S(null), c = async () => {
|
|
4024
4034
|
if (!i.value) {
|
|
4025
4035
|
o.value = null;
|
|
4026
4036
|
return;
|
|
4027
4037
|
}
|
|
4028
4038
|
try {
|
|
4029
|
-
const
|
|
4039
|
+
const b = await M.get(
|
|
4030
4040
|
`/bi-dashboard/${i.value}`
|
|
4031
4041
|
);
|
|
4032
|
-
o.value =
|
|
4033
|
-
} catch (
|
|
4034
|
-
console.error(
|
|
4042
|
+
o.value = b;
|
|
4043
|
+
} catch (b) {
|
|
4044
|
+
console.error(b);
|
|
4035
4045
|
}
|
|
4036
|
-
}, f =
|
|
4046
|
+
}, f = B(
|
|
4037
4047
|
() => {
|
|
4038
|
-
var
|
|
4039
|
-
return (v = Array.isArray((
|
|
4048
|
+
var b, p, v;
|
|
4049
|
+
return (v = Array.isArray((b = o.value) == null ? void 0 : b.widgets) ? (p = o.value) == null ? void 0 : p.widgets : []) == null ? void 0 : v.find((k) => (k == null ? void 0 : k.name) === n.value);
|
|
4040
4050
|
}
|
|
4041
|
-
), g =
|
|
4042
|
-
var v, k,
|
|
4043
|
-
const
|
|
4051
|
+
), g = B(() => {
|
|
4052
|
+
var v, k, m, x, y;
|
|
4053
|
+
const p = [a ? { label: "Дашборди", onClick: () => {
|
|
4044
4054
|
a(), r("back");
|
|
4045
4055
|
} } : { label: "Дашборди", to: "/editor" }];
|
|
4046
4056
|
if ((v = o.value) != null && v.title || i.value) {
|
|
4047
|
-
const
|
|
4048
|
-
|
|
4049
|
-
label:
|
|
4057
|
+
const _ = ((k = o.value) == null ? void 0 : k.title) || i.value || "Редактор", T = !!n.value;
|
|
4058
|
+
p.push({
|
|
4059
|
+
label: _,
|
|
4050
4060
|
...T ? { onClick: () => {
|
|
4051
4061
|
n.value = "";
|
|
4052
4062
|
} } : {}
|
|
4053
4063
|
});
|
|
4054
4064
|
} else
|
|
4055
|
-
|
|
4065
|
+
p.push({ label: "Редактор" });
|
|
4056
4066
|
if (n.value && f.value) {
|
|
4057
|
-
const
|
|
4058
|
-
|
|
4067
|
+
const _ = ((x = (m = f.value) == null ? void 0 : m.data) == null ? void 0 : x.title) || ((y = f.value) == null ? void 0 : y.title) || n.value;
|
|
4068
|
+
p.push({ label: _ });
|
|
4059
4069
|
}
|
|
4060
|
-
return
|
|
4070
|
+
return p;
|
|
4061
4071
|
});
|
|
4062
|
-
return ne(i, (
|
|
4063
|
-
var k,
|
|
4064
|
-
|
|
4072
|
+
return ne(i, (b, p) => {
|
|
4073
|
+
var k, m, x;
|
|
4074
|
+
p && (n.value = "");
|
|
4065
4075
|
const v = new URL(window.top.location.href);
|
|
4066
|
-
|
|
4076
|
+
b ? ((k = v == null ? void 0 : v.searchParams) == null || k.set("dashboard", b), (x = (m = window.top) == null ? void 0 : m.history) == null || x.pushState({}, "", v), c()) : (v == null || v.searchParams.delete("dashboard"), v == null || v.searchParams.delete("widget"));
|
|
4067
4077
|
}), ie(() => {
|
|
4068
|
-
var
|
|
4078
|
+
var b, p;
|
|
4069
4079
|
if (t.initialDashboardId)
|
|
4070
4080
|
i.value = t.initialDashboardId;
|
|
4071
4081
|
else {
|
|
4072
|
-
const v = new URLSearchParams(((
|
|
4082
|
+
const v = new URLSearchParams(((p = (b = window.top) == null ? void 0 : b.location) == null ? void 0 : p.search) || ""), k = v.get("dashboard");
|
|
4073
4083
|
k && (i.value = k), n.value = v.get("widget") || "";
|
|
4074
4084
|
}
|
|
4075
4085
|
c();
|
|
4076
|
-
}), (
|
|
4086
|
+
}), (b, p) => {
|
|
4077
4087
|
var v, k;
|
|
4078
|
-
return
|
|
4088
|
+
return h(), w("div", {
|
|
4079
4089
|
class: K(["flex w-full h-full", [s.customClass]])
|
|
4080
4090
|
}, [
|
|
4081
|
-
d("div",
|
|
4082
|
-
d("div",
|
|
4083
|
-
d("div",
|
|
4084
|
-
d("div",
|
|
4085
|
-
|
|
4091
|
+
d("div", sn, [
|
|
4092
|
+
d("div", rn, [
|
|
4093
|
+
d("div", an, [
|
|
4094
|
+
d("div", nn, [
|
|
4095
|
+
C(Gt, {
|
|
4086
4096
|
items: g.value,
|
|
4087
4097
|
compact: ""
|
|
4088
4098
|
}, null, 8, ["items"])
|
|
4089
4099
|
]),
|
|
4090
|
-
i.value && o.value ? (
|
|
4091
|
-
d("div",
|
|
4092
|
-
d("h1",
|
|
4093
|
-
o.value.description ? (
|
|
4100
|
+
i.value && o.value ? (h(), w("div", on, [
|
|
4101
|
+
d("div", ln, [
|
|
4102
|
+
d("h1", cn, R(o.value.title || i.value), 1),
|
|
4103
|
+
o.value.description ? (h(), w("p", dn, R(o.value.description), 1)) : P("", !0)
|
|
4094
4104
|
]),
|
|
4095
|
-
d("div",
|
|
4096
|
-
n.value ? (
|
|
4105
|
+
d("div", un, [
|
|
4106
|
+
n.value ? (h(), w("button", {
|
|
4097
4107
|
key: 0,
|
|
4098
4108
|
type: "button",
|
|
4099
4109
|
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",
|
|
4100
|
-
onClick:
|
|
4110
|
+
onClick: p[0] || (p[0] = (m) => n.value = "")
|
|
4101
4111
|
}, [
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
])) : (
|
|
4105
|
-
|
|
4112
|
+
C(L(Ts), { class: "w-4 h-4" }),
|
|
4113
|
+
p[6] || (p[6] = X(" Закрити "))
|
|
4114
|
+
])) : (h(), w(A, { key: 1 }, [
|
|
4115
|
+
C(tn, {
|
|
4106
4116
|
selected: i.value,
|
|
4107
|
-
"onUpdate:selected":
|
|
4117
|
+
"onUpdate:selected": p[1] || (p[1] = (m) => i.value = m),
|
|
4108
4118
|
dashboardData: o.value,
|
|
4109
4119
|
columns: (v = o.value) == null ? void 0 : v.columns,
|
|
4110
4120
|
selectedWidgetData: f.value,
|
|
@@ -4114,15 +4124,15 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4114
4124
|
d("button", {
|
|
4115
4125
|
type: "button",
|
|
4116
4126
|
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",
|
|
4117
|
-
onClick:
|
|
4127
|
+
onClick: p[2] || (p[2] = (m) => {
|
|
4118
4128
|
var x, y;
|
|
4119
4129
|
return (y = (x = u.value) == null ? void 0 : x.open) == null ? void 0 : y.call(x);
|
|
4120
4130
|
})
|
|
4121
|
-
},
|
|
4131
|
+
}, p[7] || (p[7] = [
|
|
4122
4132
|
d("span", { class: "leading-none" }, "+", -1),
|
|
4123
4133
|
X(" Створити віджет ")
|
|
4124
4134
|
])),
|
|
4125
|
-
i.value ? (
|
|
4135
|
+
i.value ? (h(), F(Lr, {
|
|
4126
4136
|
key: 0,
|
|
4127
4137
|
ref_key: "createWidgetRef",
|
|
4128
4138
|
ref: u,
|
|
@@ -4130,52 +4140,52 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4130
4140
|
columns: (k = o.value) == null ? void 0 : k.columns,
|
|
4131
4141
|
selectedDashboard: i.value,
|
|
4132
4142
|
onUpdateData: c
|
|
4133
|
-
}, null, 8, ["columns", "selectedDashboard"])) :
|
|
4143
|
+
}, null, 8, ["columns", "selectedDashboard"])) : P("", !0)
|
|
4134
4144
|
], 64))
|
|
4135
4145
|
])
|
|
4136
|
-
])) :
|
|
4146
|
+
])) : P("", !0)
|
|
4137
4147
|
]),
|
|
4138
|
-
n.value && o.value ? (
|
|
4148
|
+
n.value && o.value ? (h(), F(Ea, {
|
|
4139
4149
|
key: 0,
|
|
4140
4150
|
"selected-widget": n.value,
|
|
4141
|
-
"onUpdate:selectedWidget":
|
|
4151
|
+
"onUpdate:selectedWidget": p[3] || (p[3] = (m) => n.value = m),
|
|
4142
4152
|
"selected-widget-data": f.value,
|
|
4143
4153
|
"current-widget-data": l.value,
|
|
4144
4154
|
"selected-dashboard": i.value,
|
|
4145
4155
|
"dashboard-widgets": o.value.widgets || [],
|
|
4146
4156
|
onUpdateData: c
|
|
4147
|
-
}, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (
|
|
4148
|
-
o.value ? (
|
|
4157
|
+
}, null, 8, ["selected-widget", "selected-widget-data", "current-widget-data", "selected-dashboard", "dashboard-widgets"])) : (h(), w("div", pn, [
|
|
4158
|
+
o.value ? (h(!0), w(A, { key: 1 }, G(o.value.panels, (m, x) => {
|
|
4149
4159
|
var y;
|
|
4150
|
-
return
|
|
4160
|
+
return h(), w("div", {
|
|
4151
4161
|
key: x,
|
|
4152
|
-
class: K([`col-span-${
|
|
4162
|
+
class: K([`col-span-${m.col || 12}`, "flex flex-col gap-[10px]"])
|
|
4153
4163
|
}, [
|
|
4154
|
-
(y =
|
|
4155
|
-
onClick: (T) => n.value =
|
|
4156
|
-
"onUpdate:currentWidgetData":
|
|
4157
|
-
key:
|
|
4164
|
+
(y = m.widgets) != null && y.length ? (h(!0), w(A, { key: 0 }, G(m.widgets, (_) => (h(), F(je, {
|
|
4165
|
+
onClick: (T) => n.value = _,
|
|
4166
|
+
"onUpdate:currentWidgetData": p[4] || (p[4] = (T) => l.value = T),
|
|
4167
|
+
key: _,
|
|
4158
4168
|
dashboard: i.value,
|
|
4159
|
-
widget:
|
|
4169
|
+
widget: _,
|
|
4160
4170
|
selectedWidget: n.value,
|
|
4161
4171
|
"dashboard-widgets": o.value.widgets,
|
|
4162
4172
|
class: K({
|
|
4163
|
-
"border border-blue-500": n.value ===
|
|
4173
|
+
"border border-blue-500": n.value === _
|
|
4164
4174
|
})
|
|
4165
|
-
}, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "class"]))), 128)) : (
|
|
4175
|
+
}, null, 8, ["onClick", "dashboard", "widget", "selectedWidget", "dashboard-widgets", "class"]))), 128)) : (h(), F(je, {
|
|
4166
4176
|
key: 1,
|
|
4167
|
-
onClick: (
|
|
4168
|
-
"onUpdate:currentWidgetData":
|
|
4177
|
+
onClick: (_) => n.value = m.widget,
|
|
4178
|
+
"onUpdate:currentWidgetData": p[5] || (p[5] = (_) => l.value = _),
|
|
4169
4179
|
class: K(["flex flex-col", {
|
|
4170
|
-
"border border-blue-500": n.value ===
|
|
4180
|
+
"border border-blue-500": n.value === m.widget
|
|
4171
4181
|
}]),
|
|
4172
4182
|
dashboard: i.value,
|
|
4173
|
-
widget:
|
|
4183
|
+
widget: m.widget,
|
|
4174
4184
|
selectedWidget: n.value,
|
|
4175
4185
|
"dashboard-widgets": o.value.widgets
|
|
4176
4186
|
}, null, 8, ["onClick", "class", "dashboard", "widget", "selectedWidget", "dashboard-widgets"]))
|
|
4177
4187
|
], 2);
|
|
4178
|
-
}), 128)) : (
|
|
4188
|
+
}), 128)) : (h(), F(Ne, {
|
|
4179
4189
|
key: 0,
|
|
4180
4190
|
class: "col-span-12"
|
|
4181
4191
|
}))
|
|
@@ -4185,7 +4195,7 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4185
4195
|
], 2);
|
|
4186
4196
|
};
|
|
4187
4197
|
}
|
|
4188
|
-
},
|
|
4198
|
+
}, fn = /* @__PURE__ */ H(hn, [["__scopeId", "data-v-cc75be6a"]]), gn = { class: "w-full h-screen" }, mn = /* @__PURE__ */ ge({
|
|
4189
4199
|
__name: "vs-editor-page",
|
|
4190
4200
|
props: {
|
|
4191
4201
|
prefix: { default: "/api" },
|
|
@@ -4194,26 +4204,26 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4194
4204
|
emits: ["back"],
|
|
4195
4205
|
setup(s) {
|
|
4196
4206
|
const e = s, t = e.prefix, r = e.dashboardId;
|
|
4197
|
-
return (a, i) => (
|
|
4198
|
-
|
|
4207
|
+
return (a, i) => (h(), w("div", gn, [
|
|
4208
|
+
C(fn, {
|
|
4199
4209
|
customClass: "h-full w-full",
|
|
4200
|
-
prefix:
|
|
4201
|
-
"initial-dashboard-id":
|
|
4210
|
+
prefix: L(t),
|
|
4211
|
+
"initial-dashboard-id": L(r),
|
|
4202
4212
|
onBack: i[0] || (i[0] = (n) => a.$emit("back"))
|
|
4203
4213
|
}, null, 8, ["prefix", "initial-dashboard-id"])
|
|
4204
4214
|
]));
|
|
4205
4215
|
}
|
|
4206
|
-
}),
|
|
4216
|
+
}), bn = { class: "relative group h-full" }, xn = { class: "flex items-start gap-3 flex-1 min-h-0" }, yn = { class: "p-2 bg-blue-50 rounded-lg group-hover:bg-blue-100 transition-colors shrink-0" }, wn = { class: "flex-1 min-w-0 flex flex-col min-h-0" }, vn = { class: "font-semibold text-gray-900 mb-1 truncate" }, kn = {
|
|
4207
4217
|
key: 0,
|
|
4208
4218
|
class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10"
|
|
4209
|
-
},
|
|
4219
|
+
}, $n = {
|
|
4210
4220
|
key: 1,
|
|
4211
4221
|
class: "text-sm text-gray-600 mb-2 line-clamp-2 min-h-10 invisible",
|
|
4212
4222
|
"aria-hidden": "true"
|
|
4213
|
-
},
|
|
4223
|
+
}, _n = {
|
|
4214
4224
|
key: 2,
|
|
4215
4225
|
class: "text-sm text-gray-400 mt-1 shrink-0"
|
|
4216
|
-
},
|
|
4226
|
+
}, Dn = {
|
|
4217
4227
|
__name: "dashboard-card",
|
|
4218
4228
|
props: {
|
|
4219
4229
|
title: String,
|
|
@@ -4239,29 +4249,29 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4239
4249
|
function i(n) {
|
|
4240
4250
|
n.target.closest(".dashboard-card-menu") || (r.value = !1);
|
|
4241
4251
|
}
|
|
4242
|
-
return ie(() => document.addEventListener("click", i)),
|
|
4252
|
+
return ie(() => document.addEventListener("click", i)), Be(() => document.removeEventListener("click", i)), (n, o) => (h(), w("div", bn, [
|
|
4243
4253
|
d("button", {
|
|
4244
4254
|
type: "button",
|
|
4245
4255
|
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",
|
|
4246
4256
|
onClick: a
|
|
4247
4257
|
}, [
|
|
4248
|
-
d("div",
|
|
4249
|
-
d("div",
|
|
4250
|
-
|
|
4258
|
+
d("div", xn, [
|
|
4259
|
+
d("div", yn, [
|
|
4260
|
+
C(L(ks), {
|
|
4251
4261
|
size: 24,
|
|
4252
4262
|
class: "w-5 h-5 text-blue-600"
|
|
4253
4263
|
})
|
|
4254
4264
|
]),
|
|
4255
|
-
d("div",
|
|
4256
|
-
d("h3",
|
|
4257
|
-
s.description ? (
|
|
4258
|
-
s.widgetCount != null ? (
|
|
4265
|
+
d("div", wn, [
|
|
4266
|
+
d("h3", vn, R(s.title), 1),
|
|
4267
|
+
s.description ? (h(), w("p", kn, R(s.description), 1)) : (h(), w("p", $n, " ")),
|
|
4268
|
+
s.widgetCount != null ? (h(), w("p", _n, R(s.widgetCount) + " віджетів ", 1)) : P("", !0)
|
|
4259
4269
|
])
|
|
4260
4270
|
])
|
|
4261
4271
|
])
|
|
4262
4272
|
]));
|
|
4263
4273
|
}
|
|
4264
|
-
},
|
|
4274
|
+
}, Cn = /* @__PURE__ */ H(Dn, [["__scopeId", "data-v-cde0f33b"]]), zn = [
|
|
4265
4275
|
{ type: "Text", key: "name", label: "Назва", validators: ["required"], original: { type: "Text", ua: "Назва", col: 8 } },
|
|
4266
4276
|
{ type: "Text", key: "title", label: "Заголовок", validators: ["required"], original: { type: "Text", ua: "Титул", col: 8 } },
|
|
4267
4277
|
{ type: "Text", key: "description", label: "Опис", original: { type: "Text", ua: "Назва", col: 8 } },
|
|
@@ -4270,27 +4280,27 @@ const Ja = /* @__PURE__ */ G(qa, [["render", Ya]]), en = { class: "flex-1 min-w-
|
|
|
4270
4280
|
{ type: "Text", key: "db", label: "База даних", original: { type: "Text", ua: "Назва", col: 8 } },
|
|
4271
4281
|
{ type: "Switcher", key: "public", label: "Публічний", original: { type: "Text", ua: "Назва", col: 8 } }
|
|
4272
4282
|
];
|
|
4273
|
-
function
|
|
4283
|
+
function Sn(s) {
|
|
4274
4284
|
return !Array.isArray(s) || s.length === 0 ? {} : s.reduce((e, t) => {
|
|
4275
4285
|
if (!t || t.key == null) return e;
|
|
4276
4286
|
const { key: r, ...a } = t;
|
|
4277
4287
|
return e[r] = a, e;
|
|
4278
4288
|
}, {});
|
|
4279
4289
|
}
|
|
4280
|
-
const
|
|
4290
|
+
const Tn = { class: "flex-1 bg-gray-50" }, In = { class: "max-w-7xl mx-auto px-6 py-8" }, Vn = { class: "mb-6" }, Ln = { class: "flex items-center justify-between mb-6" }, Rn = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, Fn = { class: "flex items-center space-x-4" }, Wn = { class: "flex-1 relative" }, jn = { class: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" }, Nn = /* @__PURE__ */ ge({
|
|
4281
4291
|
__name: "all-dashboards-page",
|
|
4282
4292
|
props: {
|
|
4283
4293
|
prefix: {}
|
|
4284
4294
|
},
|
|
4285
4295
|
setup(s) {
|
|
4286
|
-
const e =
|
|
4296
|
+
const e = O(() => import("@opengis/form")), t = Sn(zn), r = S([]), a = S([]);
|
|
4287
4297
|
Je();
|
|
4288
|
-
const i =
|
|
4289
|
-
|
|
4298
|
+
const i = qe("biSetDashboard"), n = s, o = S(null), l = S(!1), u = S({});
|
|
4299
|
+
Me(n.prefix || "/api");
|
|
4290
4300
|
async function c() {
|
|
4291
4301
|
try {
|
|
4292
|
-
const k = await
|
|
4293
|
-
a.value =
|
|
4302
|
+
const k = await M.get("/bi-dashboard?type=db"), m = Array.isArray(k == null ? void 0 : k.rows) ? k.rows : [];
|
|
4303
|
+
a.value = m, r.value = m.map((x) => ({
|
|
4294
4304
|
routeName: String(x.name ?? ""),
|
|
4295
4305
|
title: x.title ?? x.name ?? "Без назви",
|
|
4296
4306
|
description: x.description ?? null,
|
|
@@ -4302,10 +4312,10 @@ const zn = { class: "flex-1 bg-gray-50" }, Sn = { class: "max-w-7xl mx-auto px-6
|
|
|
4302
4312
|
}
|
|
4303
4313
|
}
|
|
4304
4314
|
async function f() {
|
|
4305
|
-
var
|
|
4306
|
-
const k = (x = (
|
|
4315
|
+
var m, x, y;
|
|
4316
|
+
const k = (x = (m = me()) == null ? void 0 : m.proxy) == null ? void 0 : x.$notify;
|
|
4307
4317
|
try {
|
|
4308
|
-
await ((y = o.value) == null ? void 0 : y.doValidation()), await
|
|
4318
|
+
await ((y = o.value) == null ? void 0 : y.doValidation()), await M.post("/bi-dashboard", u.value), l.value = !1, u.value = {}, k == null || k({
|
|
4309
4319
|
type: "success",
|
|
4310
4320
|
title: "Успішно!",
|
|
4311
4321
|
message: "Дашборд створено успішно"
|
|
@@ -4319,56 +4329,56 @@ const zn = { class: "flex-1 bg-gray-50" }, Sn = { class: "max-w-7xl mx-auto px-6
|
|
|
4319
4329
|
}
|
|
4320
4330
|
}
|
|
4321
4331
|
ie(c);
|
|
4322
|
-
const g = S(1),
|
|
4332
|
+
const g = S(1), b = () => {
|
|
4323
4333
|
const k = window.innerWidth;
|
|
4324
4334
|
g.value = k >= 1024 ? 3 : k >= 768 ? 2 : 1;
|
|
4325
4335
|
};
|
|
4326
4336
|
ie(() => {
|
|
4327
|
-
|
|
4328
|
-
}),
|
|
4329
|
-
window.removeEventListener("resize",
|
|
4337
|
+
b(), window.addEventListener("resize", b);
|
|
4338
|
+
}), Be(() => {
|
|
4339
|
+
window.removeEventListener("resize", b);
|
|
4330
4340
|
});
|
|
4331
|
-
const
|
|
4332
|
-
const
|
|
4341
|
+
const p = (k) => k ? k.trim().length > 70 ? 2 : 1 : 0, v = (k) => {
|
|
4342
|
+
const m = g.value || 1, y = Math.floor(k / m) * m, _ = y + m, T = r.value.slice(y, _);
|
|
4333
4343
|
let $ = 0;
|
|
4334
4344
|
for (const E of T) {
|
|
4335
|
-
const
|
|
4336
|
-
if (
|
|
4345
|
+
const U = p(E.description ?? null);
|
|
4346
|
+
if (U > $ && ($ = U), $ === 2) break;
|
|
4337
4347
|
}
|
|
4338
4348
|
return $;
|
|
4339
4349
|
};
|
|
4340
|
-
return S("grid"), (k,
|
|
4341
|
-
d("div",
|
|
4342
|
-
d("div",
|
|
4343
|
-
d("div",
|
|
4344
|
-
|
|
4350
|
+
return S("grid"), (k, m) => (h(), w("div", Tn, [
|
|
4351
|
+
d("div", In, [
|
|
4352
|
+
d("div", Vn, [
|
|
4353
|
+
d("div", Ln, [
|
|
4354
|
+
m[5] || (m[5] = d("div", null, [
|
|
4345
4355
|
d("h1", { class: "text-3xl font-bold text-gray-900" }, "Дашборди"),
|
|
4346
4356
|
d("p", { class: "mt-2 text-gray-600" }, " Керуйте та переглядайте свої аналітичні дашборди ")
|
|
4347
4357
|
], -1)),
|
|
4348
4358
|
d("button", {
|
|
4349
4359
|
type: "button",
|
|
4350
4360
|
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",
|
|
4351
|
-
onClick:
|
|
4361
|
+
onClick: m[0] || (m[0] = (x) => l.value = !0)
|
|
4352
4362
|
}, [
|
|
4353
|
-
|
|
4363
|
+
C(L(qt), {
|
|
4354
4364
|
size: 24,
|
|
4355
4365
|
class: "w-4 h-4"
|
|
4356
4366
|
}),
|
|
4357
|
-
|
|
4367
|
+
m[4] || (m[4] = d("span", null, "Новий дашборд", -1))
|
|
4358
4368
|
])
|
|
4359
4369
|
]),
|
|
4360
|
-
|
|
4370
|
+
C(Te, {
|
|
4361
4371
|
teleport: "#modal",
|
|
4362
4372
|
visible: l.value,
|
|
4363
4373
|
title: "Створити дашборд",
|
|
4364
|
-
onClose:
|
|
4374
|
+
onClose: m[3] || (m[3] = (x) => l.value = !1)
|
|
4365
4375
|
}, {
|
|
4366
|
-
footer:
|
|
4367
|
-
d("div",
|
|
4376
|
+
footer: V(() => [
|
|
4377
|
+
d("div", Rn, [
|
|
4368
4378
|
d("button", {
|
|
4369
4379
|
type: "button",
|
|
4370
4380
|
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",
|
|
4371
|
-
onClick:
|
|
4381
|
+
onClick: m[2] || (m[2] = (x) => l.value = !1)
|
|
4372
4382
|
}, " Скасувати "),
|
|
4373
4383
|
d("button", {
|
|
4374
4384
|
type: "button",
|
|
@@ -4377,24 +4387,24 @@ const zn = { class: "flex-1 bg-gray-50" }, Sn = { class: "max-w-7xl mx-auto px-6
|
|
|
4377
4387
|
}, " Зберегти ")
|
|
4378
4388
|
])
|
|
4379
4389
|
]),
|
|
4380
|
-
default:
|
|
4381
|
-
|
|
4390
|
+
default: V(() => [
|
|
4391
|
+
C(L(e), {
|
|
4382
4392
|
ref_key: "createFormRef",
|
|
4383
4393
|
ref: o,
|
|
4384
|
-
schema:
|
|
4394
|
+
schema: L(t),
|
|
4385
4395
|
values: u.value,
|
|
4386
|
-
"onUpdate:values":
|
|
4396
|
+
"onUpdate:values": m[1] || (m[1] = (x) => u.value = x)
|
|
4387
4397
|
}, null, 8, ["schema", "values"])
|
|
4388
4398
|
]),
|
|
4389
4399
|
_: 1
|
|
4390
4400
|
}, 8, ["visible"]),
|
|
4391
|
-
d("div",
|
|
4392
|
-
d("div",
|
|
4393
|
-
|
|
4401
|
+
d("div", Fn, [
|
|
4402
|
+
d("div", Wn, [
|
|
4403
|
+
C(L(Cs), {
|
|
4394
4404
|
size: 24,
|
|
4395
4405
|
class: "absolute left-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400"
|
|
4396
4406
|
}),
|
|
4397
|
-
|
|
4407
|
+
m[6] || (m[6] = d("input", {
|
|
4398
4408
|
type: "text",
|
|
4399
4409
|
placeholder: "Пошук дашбордів...",
|
|
4400
4410
|
class: "w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500",
|
|
@@ -4403,55 +4413,55 @@ const zn = { class: "flex-1 bg-gray-50" }, Sn = { class: "max-w-7xl mx-auto px-6
|
|
|
4403
4413
|
])
|
|
4404
4414
|
])
|
|
4405
4415
|
]),
|
|
4406
|
-
d("div",
|
|
4407
|
-
(
|
|
4416
|
+
d("div", jn, [
|
|
4417
|
+
(h(!0), w(A, null, G(r.value, (x, y) => (h(), w("div", {
|
|
4408
4418
|
key: y,
|
|
4409
4419
|
class: "cursor-pointer h-full"
|
|
4410
4420
|
}, [
|
|
4411
|
-
|
|
4421
|
+
C(Cn, {
|
|
4412
4422
|
title: x.title,
|
|
4413
4423
|
description: x.description,
|
|
4414
4424
|
modified: x.modified,
|
|
4415
4425
|
name: x.name,
|
|
4416
4426
|
reserveLines: v(y),
|
|
4417
4427
|
"dashboard-route-name": x.routeName,
|
|
4418
|
-
"on-open-editor":
|
|
4419
|
-
"on-open-view":
|
|
4428
|
+
"on-open-editor": L(i),
|
|
4429
|
+
"on-open-view": L(i)
|
|
4420
4430
|
}, null, 8, ["title", "description", "modified", "name", "reserveLines", "dashboard-route-name", "on-open-editor", "on-open-view"])
|
|
4421
4431
|
]))), 128))
|
|
4422
4432
|
])
|
|
4423
4433
|
])
|
|
4424
4434
|
]));
|
|
4425
4435
|
}
|
|
4426
|
-
}),
|
|
4436
|
+
}), fo = /* @__PURE__ */ ge({
|
|
4427
4437
|
__name: "editor-root-page",
|
|
4428
4438
|
props: {
|
|
4429
4439
|
prefix: { default: "/api" }
|
|
4430
4440
|
},
|
|
4431
4441
|
setup(s) {
|
|
4432
|
-
const e = s, t =
|
|
4442
|
+
const e = s, t = B(() => e.prefix), r = S(""), a = gr();
|
|
4433
4443
|
ie(() => {
|
|
4434
4444
|
var o;
|
|
4435
4445
|
const n = (o = a == null ? void 0 : a.query) == null ? void 0 : o.dashboard;
|
|
4436
4446
|
n != null && typeof n == "string" && (r.value = n.trim());
|
|
4437
4447
|
});
|
|
4438
|
-
const i =
|
|
4448
|
+
const i = B(() => r.value.length > 0);
|
|
4439
4449
|
return Ge("biSetDashboard", (n) => {
|
|
4440
4450
|
r.value = n || "";
|
|
4441
4451
|
}), Ge("biClearDashboard", () => {
|
|
4442
4452
|
r.value = "";
|
|
4443
|
-
}), Ge("biSelectedDashboardId",
|
|
4453
|
+
}), Ge("biSelectedDashboardId", fs(r)), (n, o) => i.value ? (h(), F(mn, {
|
|
4444
4454
|
key: `editor-${r.value}`,
|
|
4445
4455
|
prefix: t.value,
|
|
4446
4456
|
"dashboard-id": r.value,
|
|
4447
4457
|
onBack: o[0] || (o[0] = (l) => r.value = "")
|
|
4448
|
-
}, null, 8, ["prefix", "dashboard-id"])) : (
|
|
4458
|
+
}, null, 8, ["prefix", "dashboard-id"])) : (h(), F(Nn, {
|
|
4449
4459
|
key: 0,
|
|
4450
4460
|
prefix: t.value
|
|
4451
4461
|
}, null, 8, ["prefix"]));
|
|
4452
4462
|
}
|
|
4453
4463
|
});
|
|
4454
|
-
function
|
|
4464
|
+
function le(s, e) {
|
|
4455
4465
|
const t = s && typeof s == "object" && "value" in s ? s.value : s;
|
|
4456
4466
|
if (t == null) return "";
|
|
4457
4467
|
const r = Number(t);
|
|
@@ -4462,7 +4472,7 @@ function ot(s) {
|
|
|
4462
4472
|
const [e, t, r] = s.split("T")[0].split("-");
|
|
4463
4473
|
return `${r}.${t}.${e}`;
|
|
4464
4474
|
}
|
|
4465
|
-
function
|
|
4475
|
+
function go(s) {
|
|
4466
4476
|
return Intl.NumberFormat("en").format(s ?? 0);
|
|
4467
4477
|
}
|
|
4468
4478
|
class Pn {
|
|
@@ -4478,7 +4488,7 @@ class Pn {
|
|
|
4478
4488
|
};
|
|
4479
4489
|
}
|
|
4480
4490
|
}
|
|
4481
|
-
const
|
|
4491
|
+
const En = {
|
|
4482
4492
|
show_label: !1,
|
|
4483
4493
|
show_legend: !1,
|
|
4484
4494
|
label: null,
|
|
@@ -4487,19 +4497,19 @@ const jn = {
|
|
|
4487
4497
|
color: null,
|
|
4488
4498
|
title: null
|
|
4489
4499
|
};
|
|
4490
|
-
function
|
|
4500
|
+
function On() {
|
|
4491
4501
|
const s = "0123456789ABCDEF";
|
|
4492
4502
|
let e = "#";
|
|
4493
4503
|
for (let t = 0; t < 6; t += 1)
|
|
4494
4504
|
e += s[Math.floor(Math.random() * 16)];
|
|
4495
4505
|
return e;
|
|
4496
4506
|
}
|
|
4497
|
-
function
|
|
4507
|
+
function Ie(s = En) {
|
|
4498
4508
|
var t;
|
|
4499
4509
|
const e = {
|
|
4500
4510
|
label: {
|
|
4501
4511
|
show: s == null ? void 0 : s.show_label,
|
|
4502
|
-
formatter: (s == null ? void 0 : s.formatter) ?? ((r) =>
|
|
4512
|
+
formatter: (s == null ? void 0 : s.formatter) ?? ((r) => le(r)),
|
|
4503
4513
|
...(s == null ? void 0 : s.label) || {}
|
|
4504
4514
|
},
|
|
4505
4515
|
legend: {
|
|
@@ -4513,7 +4523,7 @@ function Te(s = jn) {
|
|
|
4513
4523
|
};
|
|
4514
4524
|
return (s != null && s.colors || s != null && s.color) && (e.color = (s == null ? void 0 : s.colors) || (s == null ? void 0 : s.color) || null), e;
|
|
4515
4525
|
}
|
|
4516
|
-
function
|
|
4526
|
+
function Nt(s) {
|
|
4517
4527
|
return {
|
|
4518
4528
|
color: "#9ca3af",
|
|
4519
4529
|
fontSize: 10,
|
|
@@ -4521,7 +4531,7 @@ function Wt(s) {
|
|
|
4521
4531
|
fontWeight: 400,
|
|
4522
4532
|
label: s == null ? void 0 : s.label,
|
|
4523
4533
|
show: !0,
|
|
4524
|
-
formatter: (s == null ? void 0 : s.formatter) ?? ((e) =>
|
|
4534
|
+
formatter: (s == null ? void 0 : s.formatter) ?? ((e) => le(e)),
|
|
4525
4535
|
margin: (s == null ? void 0 : s.margin) ?? 7,
|
|
4526
4536
|
interval: (s == null ? void 0 : s.interval) ?? "auto",
|
|
4527
4537
|
rotate: (s == null ? void 0 : s.rotate) ?? 0
|
|
@@ -4539,7 +4549,7 @@ const Pt = [
|
|
|
4539
4549
|
"#d8ffc0",
|
|
4540
4550
|
"#d4f7ff"
|
|
4541
4551
|
];
|
|
4542
|
-
class
|
|
4552
|
+
class Ae {
|
|
4543
4553
|
static getLabelOptions(e = {}) {
|
|
4544
4554
|
return {
|
|
4545
4555
|
show: (e == null ? void 0 : e.show_label) || (e == null ? void 0 : e.show) || !1,
|
|
@@ -4556,7 +4566,7 @@ class Oe {
|
|
|
4556
4566
|
};
|
|
4557
4567
|
}
|
|
4558
4568
|
}
|
|
4559
|
-
const
|
|
4569
|
+
const ye = typeof window < "u" ? window.echarts : null, he = {
|
|
4560
4570
|
props: [
|
|
4561
4571
|
"source",
|
|
4562
4572
|
"style",
|
|
@@ -4606,7 +4616,7 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4606
4616
|
async getDataFromURL(s) {
|
|
4607
4617
|
var e;
|
|
4608
4618
|
try {
|
|
4609
|
-
const t = await
|
|
4619
|
+
const t = await M.get(s);
|
|
4610
4620
|
this.sourceData = (t == null ? void 0 : t.source) || [], this.$emit("update:widgetData", t), this.dimensions = Object.keys(((e = this.sourceData) == null ? void 0 : e[0]) || {}), this.titleCharts = this.style ? this.style : (t == null ? void 0 : t.title) || "", this.styleData = (t == null ? void 0 : t.style) || {};
|
|
4611
4621
|
} catch (t) {
|
|
4612
4622
|
const r = { message: "Дані не знайдено", title: "Помилка!", type: "error", status: 400, id: this.widgetName };
|
|
@@ -4656,7 +4666,7 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4656
4666
|
var r, a, i, n, o, l, u;
|
|
4657
4667
|
this.widgetInstance && this.widgetInstance.clear();
|
|
4658
4668
|
try {
|
|
4659
|
-
const c = this.$refs.chart, f =
|
|
4669
|
+
const c = this.$refs.chart, f = ye == null ? void 0 : ye.init(c);
|
|
4660
4670
|
if (!f) return;
|
|
4661
4671
|
const g = {
|
|
4662
4672
|
tooltip: {
|
|
@@ -4666,16 +4676,16 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4666
4676
|
shadowColor: "transparent",
|
|
4667
4677
|
padding: [0, 0, 0, 0],
|
|
4668
4678
|
borderWidth: 0,
|
|
4669
|
-
formatter: (
|
|
4670
|
-
var
|
|
4671
|
-
const
|
|
4679
|
+
formatter: (b) => {
|
|
4680
|
+
var m;
|
|
4681
|
+
const p = (m = b[0]) == null ? void 0 : m.axisValue;
|
|
4672
4682
|
let k = `
|
|
4673
4683
|
<div style="background-color: rgba(255, 255, 255, 0.7)" class="border border-gray-200 text-gray-800 rounded-lg shadow-md dark:bg-neutral-800 dark:border-neutral-700 min-w-28">
|
|
4674
4684
|
<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">
|
|
4675
|
-
${
|
|
4685
|
+
${p ? this.formatDate(p) : "N/A"}
|
|
4676
4686
|
</div>
|
|
4677
4687
|
`;
|
|
4678
|
-
return
|
|
4688
|
+
return b.forEach((x) => {
|
|
4679
4689
|
k += `
|
|
4680
4690
|
<div class="flex justify-between items-center text-xs px-2 py-0.5 text-gray-500 dark:text-neutral-400">
|
|
4681
4691
|
<span class="flex items-center">
|
|
@@ -4693,11 +4703,11 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4693
4703
|
type: e ? "category" : "value",
|
|
4694
4704
|
name: ((a = (r = this.styleData) == null ? void 0 : r.x_axis) == null ? void 0 : a.name) || "",
|
|
4695
4705
|
axisLabel: {
|
|
4696
|
-
...
|
|
4697
|
-
formatter: (
|
|
4706
|
+
...Nt((i = this.styleData) == null ? void 0 : i.x_axis),
|
|
4707
|
+
formatter: (b) => {
|
|
4698
4708
|
var v, k;
|
|
4699
|
-
const
|
|
4700
|
-
return ((k = (v = this.styleData) == null ? void 0 : v.x_axis) == null ? void 0 : k.overflow) === "ellipsis" &&
|
|
4709
|
+
const p = this.formatDate(b);
|
|
4710
|
+
return ((k = (v = this.styleData) == null ? void 0 : v.x_axis) == null ? void 0 : k.overflow) === "ellipsis" && p.length > 10 ? `${p.slice(0, 10)}...` : p;
|
|
4701
4711
|
}
|
|
4702
4712
|
}
|
|
4703
4713
|
},
|
|
@@ -4705,10 +4715,10 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4705
4715
|
data: t != null && t.length ? t : null,
|
|
4706
4716
|
type: t ? "category" : "value",
|
|
4707
4717
|
name: ((o = (n = this.styleData) == null ? void 0 : n.y_axis) == null ? void 0 : o.name) || "",
|
|
4708
|
-
axisLabel:
|
|
4718
|
+
axisLabel: Nt((l = this.styleData) == null ? void 0 : l.y_axis)
|
|
4709
4719
|
},
|
|
4710
4720
|
series: s != null && s.length ? s : null,
|
|
4711
|
-
...
|
|
4721
|
+
...Ie(this.styleData),
|
|
4712
4722
|
grid: {
|
|
4713
4723
|
bottom: "0%",
|
|
4714
4724
|
right: "0%",
|
|
@@ -4736,7 +4746,7 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4736
4746
|
async changeOptionsByName(s, e) {
|
|
4737
4747
|
const t = document.getElementById(s);
|
|
4738
4748
|
if (!t) return null;
|
|
4739
|
-
const r =
|
|
4749
|
+
const r = ye == null ? void 0 : ye.getInstanceByDom(t);
|
|
4740
4750
|
if (!r) return null;
|
|
4741
4751
|
const a = r.getOption();
|
|
4742
4752
|
e.seriesOptions && this.setSeriesOption(r, e.seriesOptions), r.setOption({
|
|
@@ -4766,15 +4776,15 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4766
4776
|
getMetricValue(s) {
|
|
4767
4777
|
var r;
|
|
4768
4778
|
const e = (s == null ? void 0 : s.metric) || s;
|
|
4769
|
-
return parseFloat(e) ? (r =
|
|
4779
|
+
return parseFloat(e) ? (r = le(e, { notation: "standard" })) == null ? void 0 : r.replaceAll(
|
|
4770
4780
|
",",
|
|
4771
4781
|
" "
|
|
4772
4782
|
) : e;
|
|
4773
4783
|
}
|
|
4774
4784
|
}
|
|
4775
|
-
},
|
|
4785
|
+
}, An = {
|
|
4776
4786
|
name: "VsBar",
|
|
4777
|
-
mixins: [
|
|
4787
|
+
mixins: [he],
|
|
4778
4788
|
data() {
|
|
4779
4789
|
return {
|
|
4780
4790
|
resizeObserver: null
|
|
@@ -4827,11 +4837,11 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4827
4837
|
(g) => parseFloat(g[this.dimensions[1]]) && g[this.dimensions[0]]
|
|
4828
4838
|
).map((g) => parseFloat(g[this.dimensions[1]]));
|
|
4829
4839
|
let f;
|
|
4830
|
-
return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? f = this.prepareStackData() : ((r = this.styleData) == null ? void 0 : r.negative_waterfall) === !0 ? f = this.prepareNegativeWaterfall() : ((a = this.styleData) == null ? void 0 : a.waterfall) === !0 ? f = this.prepareWaterfallData(c) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? f = this.prepareAccumulative(c) : f = this.dimensions.slice(1).map((
|
|
4831
|
-
name:
|
|
4840
|
+
return ((t = this.styleData) == null ? void 0 : t.stack) !== !1 ? f = this.prepareStackData() : ((r = this.styleData) == null ? void 0 : r.negative_waterfall) === !0 ? f = this.prepareNegativeWaterfall() : ((a = this.styleData) == null ? void 0 : a.waterfall) === !0 ? f = this.prepareWaterfallData(c) : ((i = this.styleData) == null ? void 0 : i.accumulative) === !0 ? f = this.prepareAccumulative(c) : f = this.dimensions.slice(1).map((b, p) => ({
|
|
4841
|
+
name: b,
|
|
4832
4842
|
type: "bar",
|
|
4833
|
-
stack: `a${
|
|
4834
|
-
data: this.sourceData.filter((v) => parseFloat(v[
|
|
4843
|
+
stack: `a${p}`,
|
|
4844
|
+
data: this.sourceData.filter((v) => parseFloat(v[b]) && b).map((v) => parseFloat(v[b]))
|
|
4835
4845
|
})), { series: f, xs: l, ys: u };
|
|
4836
4846
|
} catch (n) {
|
|
4837
4847
|
return console.error(n), { series: [], xs: [], ys: [] };
|
|
@@ -4924,29 +4934,29 @@ const be = typeof window < "u" ? window.echarts : null, pe = {
|
|
|
4924
4934
|
];
|
|
4925
4935
|
}
|
|
4926
4936
|
}
|
|
4927
|
-
},
|
|
4928
|
-
function
|
|
4929
|
-
return
|
|
4937
|
+
}, Bn = ["id"];
|
|
4938
|
+
function qn(s, e, t, r, a, i) {
|
|
4939
|
+
return h(), w("div", {
|
|
4930
4940
|
id: i.uniqueID,
|
|
4931
4941
|
ref: "chart",
|
|
4932
4942
|
class: "h-full w-full min-h-[200px]"
|
|
4933
|
-
}, null, 8,
|
|
4943
|
+
}, null, 8, Bn);
|
|
4934
4944
|
}
|
|
4935
|
-
const
|
|
4945
|
+
const Mn = /* @__PURE__ */ H(An, [["render", qn]]), Un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4936
4946
|
__proto__: null,
|
|
4937
|
-
default:
|
|
4947
|
+
default: Mn
|
|
4938
4948
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4939
|
-
var
|
|
4949
|
+
var Gn = /* @__PURE__ */ ((s) => (s.Dashboard = "/dashboard", s.BiPlatform = "/bi-platform", s.EditorBase = "/editor", s.AllDashboards = "/dashboards", s.DashboardByName = "/dashboards/:name", s))(Gn || {}), Et;
|
|
4940
4950
|
((s) => {
|
|
4941
4951
|
((e) => {
|
|
4942
4952
|
e.Bar = "bar", e.ListBar = "listbar", e.Number = "number", e.Text = "text", e.Pie = "pie", e.Heatmap = "heatmap", e.Calendar = "calendar", e.Line = "line", e.Stat = "stat", e.Pivot = "pivot", e.Funnel = "funnel", e.Progress = "progress";
|
|
4943
4953
|
})(s.Types || (s.Types = {}));
|
|
4944
|
-
})(
|
|
4945
|
-
var
|
|
4946
|
-
const Ze = typeof window < "u" ? window.echarts : null,
|
|
4954
|
+
})(Et || (Et = {}));
|
|
4955
|
+
var Hn = /* @__PURE__ */ ((s) => (s.AllDashboards = "all-dashboards", s.BiPlatform = "bi-platform", s.Dashboard = "dashboard", s.Erobota = "erobota", s.Datatest = "datatest", s.Sourcedate = "sourcedate", s.Widgetwidget = "widgetwidget", s.Test = "test", s.Demo = "demo", s.Crm = "crm", s.Editor = "editor", s.Editordetails = "editordetails", s.Dbtables = "dbtables", s.Biviewer = "biviewer", s.Biviewerinner = "biviewerinner", s.Bieditor = "bieditor", s.Bieditorinner = "bieditorinner", s))(Hn || {});
|
|
4956
|
+
const Ze = typeof window < "u" ? window.echarts : null, Zn = {
|
|
4947
4957
|
name: "VsPie",
|
|
4948
4958
|
props: ["currentWidget"],
|
|
4949
|
-
mixins: [
|
|
4959
|
+
mixins: [he],
|
|
4950
4960
|
data() {
|
|
4951
4961
|
return {
|
|
4952
4962
|
chartInstance: null,
|
|
@@ -4990,7 +5000,7 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
4990
5000
|
const { name: t, value: r, percent: a } = s;
|
|
4991
5001
|
return `
|
|
4992
5002
|
<div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
|
|
4993
|
-
${t == null ? void 0 : t.replace("null", "Не визначено")}: ${
|
|
5003
|
+
${t == null ? void 0 : t.replace("null", "Не визначено")}: ${le(r)} (${a}%)
|
|
4994
5004
|
</div>`;
|
|
4995
5005
|
},
|
|
4996
5006
|
prepareData() {
|
|
@@ -5000,26 +5010,26 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
5000
5010
|
return console.warn("No source data available"), null;
|
|
5001
5011
|
const n = Array.from(
|
|
5002
5012
|
new Set(
|
|
5003
|
-
(this.sourceData || []).map((
|
|
5013
|
+
(this.sourceData || []).map((p) => p[this.dimensions[0]])
|
|
5004
5014
|
)
|
|
5005
5015
|
), o = Array.from(
|
|
5006
5016
|
new Set(
|
|
5007
|
-
(this.sourceData || []).map((
|
|
5017
|
+
(this.sourceData || []).map((p) => p[this.dimensions[1]])
|
|
5008
5018
|
)
|
|
5009
5019
|
), l = parseInt(
|
|
5010
5020
|
(this.sourceData || []).reduce(
|
|
5011
|
-
(
|
|
5021
|
+
(p, v) => p + parseFloat((v == null ? void 0 : v.metric) || 0),
|
|
5012
5022
|
0
|
|
5013
5023
|
),
|
|
5014
5024
|
10
|
|
5015
|
-
), u = n.map((
|
|
5025
|
+
), u = n.map((p, v) => {
|
|
5016
5026
|
const k = (o[v] / l * 100).toFixed(2);
|
|
5017
5027
|
return {
|
|
5018
|
-
name: `${
|
|
5028
|
+
name: `${p} (${k}%)`,
|
|
5019
5029
|
value: o[v]
|
|
5020
5030
|
};
|
|
5021
5031
|
}), c = ((e = this.styleData) == null ? void 0 : e.innerRadius) || "80%", f = ((t = this.styleData) == null ? void 0 : t.outerRadius) || "100%", g = [c, f];
|
|
5022
|
-
return this.styleData.legend =
|
|
5032
|
+
return this.styleData.legend = Ae.getLegendOpions({
|
|
5023
5033
|
borderRadius: 10,
|
|
5024
5034
|
height: "100%",
|
|
5025
5035
|
padding: 10,
|
|
@@ -5027,12 +5037,12 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
5027
5037
|
type: "scroll",
|
|
5028
5038
|
itemWidth: 14,
|
|
5029
5039
|
itemHeight: 14,
|
|
5030
|
-
formatter: (
|
|
5040
|
+
formatter: (p) => {
|
|
5031
5041
|
var v;
|
|
5032
|
-
return (v =
|
|
5042
|
+
return (v = p == null ? void 0 : p.replace("null", "Не визначено")) == null ? void 0 : v.replace("NaN", "0.00");
|
|
5033
5043
|
},
|
|
5034
5044
|
...((r = this.styleData) == null ? void 0 : r.legend) || {}
|
|
5035
|
-
}), this.styleData.label =
|
|
5045
|
+
}), this.styleData.label = Ae.getLabelOptions(
|
|
5036
5046
|
(a = this.styleData) == null ? void 0 : a.label
|
|
5037
5047
|
), this.styleData.show_legend = ((i = this.styleData) == null ? void 0 : i.show_legend) ?? !0, { series: [
|
|
5038
5048
|
{
|
|
@@ -5041,7 +5051,7 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
5041
5051
|
radius: g,
|
|
5042
5052
|
center: ["50%", "60%"],
|
|
5043
5053
|
height: "75%",
|
|
5044
|
-
...
|
|
5054
|
+
...Ie(this.styleData),
|
|
5045
5055
|
data: u
|
|
5046
5056
|
}
|
|
5047
5057
|
] };
|
|
@@ -5080,9 +5090,9 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
5080
5090
|
backgroundColor: "transparent"
|
|
5081
5091
|
},
|
|
5082
5092
|
series: s,
|
|
5083
|
-
...
|
|
5093
|
+
...Ie(this.styleData || {}),
|
|
5084
5094
|
title: {
|
|
5085
|
-
text:
|
|
5095
|
+
text: le(t),
|
|
5086
5096
|
left: "center",
|
|
5087
5097
|
top: "41%",
|
|
5088
5098
|
textStyle: {
|
|
@@ -5101,21 +5111,21 @@ const Ze = typeof window < "u" ? window.echarts : null, Gn = {
|
|
|
5101
5111
|
}
|
|
5102
5112
|
}
|
|
5103
5113
|
}
|
|
5104
|
-
},
|
|
5105
|
-
function
|
|
5106
|
-
return
|
|
5114
|
+
}, Qn = ["id"];
|
|
5115
|
+
function Xn(s, e, t, r, a, i) {
|
|
5116
|
+
return h(), w("div", {
|
|
5107
5117
|
id: i.uniqueID,
|
|
5108
5118
|
ref: "chart",
|
|
5109
5119
|
class: "h-full min-h-[200px] flex items-center"
|
|
5110
|
-
}, null, 8,
|
|
5120
|
+
}, null, 8, Qn);
|
|
5111
5121
|
}
|
|
5112
|
-
const
|
|
5122
|
+
const Kn = /* @__PURE__ */ H(Zn, [["render", Xn]]), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5113
5123
|
__proto__: null,
|
|
5114
|
-
default:
|
|
5115
|
-
}, Symbol.toStringTag, { value: "Module" })), Qe = typeof window < "u" ? window.echarts : null,
|
|
5124
|
+
default: Kn
|
|
5125
|
+
}, Symbol.toStringTag, { value: "Module" })), Qe = typeof window < "u" ? window.echarts : null, Jn = {
|
|
5116
5126
|
name: "VsPie",
|
|
5117
5127
|
props: ["currentWidget"],
|
|
5118
|
-
mixins: [
|
|
5128
|
+
mixins: [he],
|
|
5119
5129
|
data() {
|
|
5120
5130
|
return {
|
|
5121
5131
|
chartInstance: null,
|
|
@@ -5159,7 +5169,7 @@ const Qn = /* @__PURE__ */ G(Gn, [["render", Zn]]), Xn = /* @__PURE__ */ Object.
|
|
|
5159
5169
|
const { name: t, value: r, percent: a } = s;
|
|
5160
5170
|
return `
|
|
5161
5171
|
<div style="background-color:${e[0]}; font-size:12px; font-family:Helvetica, Arial, sans-serif; color:#ffff; padding:5px; border-radius:5px;">
|
|
5162
|
-
${t == null ? void 0 : t.replace("null", "Не визначено")}: ${
|
|
5172
|
+
${t == null ? void 0 : t.replace("null", "Не визначено")}: ${le(r)} (${a}%)
|
|
5163
5173
|
</div>`;
|
|
5164
5174
|
},
|
|
5165
5175
|
prepareData() {
|
|
@@ -5168,36 +5178,36 @@ const Qn = /* @__PURE__ */ G(Gn, [["render", Zn]]), Xn = /* @__PURE__ */ Object.
|
|
|
5168
5178
|
this.styleData = this.styleData || {};
|
|
5169
5179
|
const i = Array.from(
|
|
5170
5180
|
new Set(
|
|
5171
|
-
(this.sourceData || []).map((
|
|
5181
|
+
(this.sourceData || []).map((b) => b[this.dimensions[0]])
|
|
5172
5182
|
)
|
|
5173
5183
|
), n = Array.from(
|
|
5174
5184
|
new Set(
|
|
5175
|
-
(this.sourceData || []).map((
|
|
5185
|
+
(this.sourceData || []).map((b) => b[this.dimensions[1]])
|
|
5176
5186
|
)
|
|
5177
5187
|
), o = parseInt(
|
|
5178
5188
|
(this.sourceData || []).reduce(
|
|
5179
|
-
(
|
|
5189
|
+
(b, p) => b + parseFloat(p == null ? void 0 : p.metric),
|
|
5180
5190
|
0
|
|
5181
5191
|
),
|
|
5182
5192
|
10
|
|
5183
|
-
), l = i.map((
|
|
5184
|
-
const v = (n[
|
|
5193
|
+
), l = i.map((b, p) => {
|
|
5194
|
+
const v = (n[p] / o * 100).toFixed(2);
|
|
5185
5195
|
return {
|
|
5186
|
-
name: `${
|
|
5187
|
-
value: n[
|
|
5196
|
+
name: `${b} (${v}%)`,
|
|
5197
|
+
value: n[p]
|
|
5188
5198
|
};
|
|
5189
5199
|
}), u = ((s = this.styleData) == null ? void 0 : s.innerRadius) || "0%", c = ((e = this.styleData) == null ? void 0 : e.outerRadius) || "100%", f = [u, c];
|
|
5190
|
-
return this.styleData.legend =
|
|
5200
|
+
return this.styleData.legend = Ae.getLegendOpions({
|
|
5191
5201
|
borderRadius: 10,
|
|
5192
5202
|
height: "100%",
|
|
5193
5203
|
padding: 10,
|
|
5194
5204
|
type: "scroll",
|
|
5195
5205
|
itemWidth: 14,
|
|
5196
5206
|
itemHeight: 14,
|
|
5197
|
-
formatter: (
|
|
5207
|
+
formatter: (b) => b == null ? void 0 : b.replace("null", "Не визначено"),
|
|
5198
5208
|
textStyle: { fontSize: "14px" },
|
|
5199
5209
|
...((t = this.styleData) == null ? void 0 : t.legend) || {}
|
|
5200
|
-
}), this.styleData.label =
|
|
5210
|
+
}), this.styleData.label = Ae.getLabelOptions(
|
|
5201
5211
|
(r = this.styleData) == null ? void 0 : r.label
|
|
5202
5212
|
), this.styleData.show_legend = ((a = this.styleData) == null ? void 0 : a.show_legend) ?? !0, { series: [
|
|
5203
5213
|
{
|
|
@@ -5206,7 +5216,7 @@ const Qn = /* @__PURE__ */ G(Gn, [["render", Zn]]), Xn = /* @__PURE__ */ Object.
|
|
|
5206
5216
|
radius: f,
|
|
5207
5217
|
center: ["50%", "60%"],
|
|
5208
5218
|
height: "75%",
|
|
5209
|
-
...
|
|
5219
|
+
...Ie(this.styleData),
|
|
5210
5220
|
data: l
|
|
5211
5221
|
}
|
|
5212
5222
|
] };
|
|
@@ -5239,7 +5249,7 @@ const Qn = /* @__PURE__ */ G(Gn, [["render", Zn]]), Xn = /* @__PURE__ */ Object.
|
|
|
5239
5249
|
backgroundColor: "transparent"
|
|
5240
5250
|
},
|
|
5241
5251
|
series: s,
|
|
5242
|
-
...
|
|
5252
|
+
...Ie(this.styleData || {})
|
|
5243
5253
|
};
|
|
5244
5254
|
this.chartInstance.setOption(t), this.$emit("update:currentWidget", this.chartInstance), this.chartInstance.resize(), window.addEventListener("resize", () => {
|
|
5245
5255
|
var r;
|
|
@@ -5250,20 +5260,20 @@ const Qn = /* @__PURE__ */ G(Gn, [["render", Zn]]), Xn = /* @__PURE__ */ Object.
|
|
|
5250
5260
|
}
|
|
5251
5261
|
}
|
|
5252
5262
|
}
|
|
5253
|
-
},
|
|
5254
|
-
function
|
|
5255
|
-
return
|
|
5263
|
+
}, ei = ["id"];
|
|
5264
|
+
function ti(s, e, t, r, a, i) {
|
|
5265
|
+
return h(), w("div", {
|
|
5256
5266
|
id: i.uniqueID,
|
|
5257
5267
|
ref: "chart",
|
|
5258
5268
|
class: "h-full min-h-[200px] flex items-center"
|
|
5259
|
-
}, null, 8,
|
|
5269
|
+
}, null, 8, ei);
|
|
5260
5270
|
}
|
|
5261
|
-
const
|
|
5271
|
+
const si = /* @__PURE__ */ H(Jn, [["render", ti]]), ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5262
5272
|
__proto__: null,
|
|
5263
|
-
default:
|
|
5264
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5273
|
+
default: si
|
|
5274
|
+
}, Symbol.toStringTag, { value: "Module" })), ai = {
|
|
5265
5275
|
name: "VsLine",
|
|
5266
|
-
mixins: [
|
|
5276
|
+
mixins: [he],
|
|
5267
5277
|
data() {
|
|
5268
5278
|
return {
|
|
5269
5279
|
chartInstance: null,
|
|
@@ -5318,20 +5328,20 @@ const ei = /* @__PURE__ */ G(Kn, [["render", Jn]]), ti = /* @__PURE__ */ Object.
|
|
|
5318
5328
|
}
|
|
5319
5329
|
}
|
|
5320
5330
|
}
|
|
5321
|
-
},
|
|
5322
|
-
function
|
|
5323
|
-
return
|
|
5331
|
+
}, ni = ["id"];
|
|
5332
|
+
function ii(s, e, t, r, a, i) {
|
|
5333
|
+
return h(), w("div", {
|
|
5324
5334
|
id: a.uniqueID,
|
|
5325
5335
|
ref: "chart",
|
|
5326
5336
|
style: { height: "400px" }
|
|
5327
|
-
}, null, 8,
|
|
5337
|
+
}, null, 8, ni);
|
|
5328
5338
|
}
|
|
5329
|
-
const
|
|
5339
|
+
const oi = /* @__PURE__ */ H(ai, [["render", ii]]), li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5330
5340
|
__proto__: null,
|
|
5331
|
-
default:
|
|
5332
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5341
|
+
default: oi
|
|
5342
|
+
}, Symbol.toStringTag, { value: "Module" })), ci = {
|
|
5333
5343
|
name: "VsStat",
|
|
5334
|
-
mixins: [
|
|
5344
|
+
mixins: [he],
|
|
5335
5345
|
data() {
|
|
5336
5346
|
return {
|
|
5337
5347
|
restDimensions: [],
|
|
@@ -5354,26 +5364,26 @@ const ni = /* @__PURE__ */ G(si, [["render", ai]]), ii = /* @__PURE__ */ Object.
|
|
|
5354
5364
|
this.columns = Object.keys(this.sourceData[0]);
|
|
5355
5365
|
const s = this.getValues();
|
|
5356
5366
|
this.sumValue = s.reduce((e, t) => e + t, 0), this.sourceData.forEach((e, t) => {
|
|
5357
|
-
e.color = t < Pt.length - 1 ? Pt[t] :
|
|
5367
|
+
e.color = t < Pt.length - 1 ? Pt[t] : On();
|
|
5358
5368
|
});
|
|
5359
5369
|
},
|
|
5360
5370
|
formattedValue(s) {
|
|
5361
5371
|
const e = parseFloat(s);
|
|
5362
|
-
return
|
|
5372
|
+
return le(e);
|
|
5363
5373
|
}
|
|
5364
5374
|
}
|
|
5365
|
-
},
|
|
5375
|
+
}, di = { class: "flex flex-col w-full h-full pt-[16px] rounded-xl" }, ui = { class: "flex flex-col justify-between w-full h-full" }, pi = { 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" }, fi = ["onMouseover"], gi = {
|
|
5366
5376
|
key: 0,
|
|
5367
5377
|
class: "absolute top-[-1] left-1/2 transform -translate-x-1/2 -translate-y-full bg-black text-white rounded px-2 py-1"
|
|
5368
|
-
},
|
|
5369
|
-
function
|
|
5370
|
-
return
|
|
5371
|
-
d("div",
|
|
5372
|
-
d("div",
|
|
5373
|
-
d("div",
|
|
5374
|
-
(
|
|
5378
|
+
}, mi = { class: "h-[calc(100%-20px)] w-full custom-scrollbar" }, bi = { class: "grid items-center justify-between grid-cols-2 py-2 gap-x-4" }, xi = { class: "flex items-center" }, yi = { class: "text-sm text-gray-800" }, wi = { class: "text-end" }, vi = { class: "text-sm text-gray-500" };
|
|
5379
|
+
function ki(s, e, t, r, a, i) {
|
|
5380
|
+
return h(), w("div", di, [
|
|
5381
|
+
d("div", ui, [
|
|
5382
|
+
d("div", pi, [
|
|
5383
|
+
d("div", hi, [
|
|
5384
|
+
(h(!0), w(A, null, G(s.sourceData, (n, o) => {
|
|
5375
5385
|
var l, u, c, f;
|
|
5376
|
-
return
|
|
5386
|
+
return h(), w("div", {
|
|
5377
5387
|
class: K(["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}]`]),
|
|
5378
5388
|
style: Ye({
|
|
5379
5389
|
width: `${parseFloat(n == null ? void 0 : n[(l = a.columns) == null ? void 0 : l[1]]) / a.sumValue * 100}%`
|
|
@@ -5385,22 +5395,22 @@ function wi(s, e, t, r, a, i) {
|
|
|
5385
5395
|
onMouseover: (g) => a.showTooltip = o,
|
|
5386
5396
|
onMouseleave: e[0] || (e[0] = (g) => a.showTooltip = -1)
|
|
5387
5397
|
}, [
|
|
5388
|
-
a.showTooltip > -1 ? (
|
|
5389
|
-
], 46,
|
|
5398
|
+
a.showTooltip > -1 ? (h(), w("div", gi, R(s.sourceData[a.showTooltip][a.columns[0]]) + " " + R((parseFloat((f = (u = s.sourceData) == null ? void 0 : u[a.showTooltip]) == null ? void 0 : f[(c = a.columns) == null ? void 0 : c[1]]) / a.sumValue * 100).toFixed(2)) + "% ", 1)) : P("", !0)
|
|
5399
|
+
], 46, fi);
|
|
5390
5400
|
}), 256))
|
|
5391
5401
|
]),
|
|
5392
|
-
d("ul",
|
|
5393
|
-
(
|
|
5402
|
+
d("ul", mi, [
|
|
5403
|
+
(h(!0), w(A, null, G(s.sourceData, (n) => {
|
|
5394
5404
|
var o, l;
|
|
5395
|
-
return
|
|
5396
|
-
d("div",
|
|
5405
|
+
return h(), w("li", bi, [
|
|
5406
|
+
d("div", xi, [
|
|
5397
5407
|
d("span", {
|
|
5398
5408
|
class: K(["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}]`])
|
|
5399
5409
|
}, null, 2),
|
|
5400
|
-
d("span",
|
|
5410
|
+
d("span", yi, R((n == null ? void 0 : n[(o = a.columns) == null ? void 0 : o[0]]) || "Не визначено"), 1)
|
|
5401
5411
|
]),
|
|
5402
|
-
d("div",
|
|
5403
|
-
d("span",
|
|
5412
|
+
d("div", wi, [
|
|
5413
|
+
d("span", vi, R(i.formattedValue(n == null ? void 0 : n[(l = a.columns) == null ? void 0 : l[1]]) || "-"), 1)
|
|
5404
5414
|
])
|
|
5405
5415
|
]);
|
|
5406
5416
|
}), 256))
|
|
@@ -5409,12 +5419,12 @@ function wi(s, e, t, r, a, i) {
|
|
|
5409
5419
|
])
|
|
5410
5420
|
]);
|
|
5411
5421
|
}
|
|
5412
|
-
const
|
|
5422
|
+
const $i = /* @__PURE__ */ H(ci, [["render", ki]]), _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5413
5423
|
__proto__: null,
|
|
5414
|
-
default:
|
|
5415
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5424
|
+
default: $i
|
|
5425
|
+
}, Symbol.toStringTag, { value: "Module" })), Di = {
|
|
5416
5426
|
name: "VsProgressBar",
|
|
5417
|
-
mixins: [
|
|
5427
|
+
mixins: [he],
|
|
5418
5428
|
data() {
|
|
5419
5429
|
return {
|
|
5420
5430
|
restDimensions: [],
|
|
@@ -5439,27 +5449,27 @@ const vi = /* @__PURE__ */ G(oi, [["render", wi]]), ki = /* @__PURE__ */ Object.
|
|
|
5439
5449
|
this.maxValue = Math.max(...s);
|
|
5440
5450
|
},
|
|
5441
5451
|
formattedValue(s) {
|
|
5442
|
-
return
|
|
5452
|
+
return le(s);
|
|
5443
5453
|
}
|
|
5444
5454
|
}
|
|
5445
|
-
},
|
|
5455
|
+
}, Ci = {
|
|
5446
5456
|
key: 0,
|
|
5447
5457
|
class: "flex flex-col h-full pt-[16px] rounded-xl"
|
|
5448
|
-
},
|
|
5458
|
+
}, zi = { class: "h-full pt-0 pb-6 space-y-4" }, Si = { class: "h-full space-y-4 custom-scrollbar" }, Ti = { class: "flex items-center justify-between mr-2 gap-x-2" }, Ii = { class: "grid items-center w-full grid-cols-2 gap-x-2" }, Vi = { class: "text-sm text-gray-800" }, Li = {
|
|
5449
5459
|
class: "flex justify-end",
|
|
5450
5460
|
role: "progressbar",
|
|
5451
5461
|
"aria-valuenow": "100",
|
|
5452
5462
|
"aria-valuemin": "0",
|
|
5453
5463
|
"aria-valuemax": "100"
|
|
5454
|
-
},
|
|
5455
|
-
function
|
|
5456
|
-
return a.columns ? (
|
|
5457
|
-
d("div",
|
|
5458
|
-
d("ul",
|
|
5459
|
-
(
|
|
5460
|
-
d("div",
|
|
5461
|
-
d("span",
|
|
5462
|
-
d("div",
|
|
5464
|
+
}, Ri = { class: "min-w-[60px] text-end" }, Fi = { class: "text-sm text-gray-500" };
|
|
5465
|
+
function Wi(s, e, t, r, a, i) {
|
|
5466
|
+
return a.columns ? (h(), w("div", Ci, [
|
|
5467
|
+
d("div", zi, [
|
|
5468
|
+
d("ul", Si, [
|
|
5469
|
+
(h(!0), w(A, null, G(s.sourceData, (n, o) => (h(), w("li", Ti, [
|
|
5470
|
+
d("div", Ii, [
|
|
5471
|
+
d("span", Vi, R(n[a.columns[0]]), 1),
|
|
5472
|
+
d("div", Li, [
|
|
5463
5473
|
d("div", {
|
|
5464
5474
|
class: "h-1.5 flex flex-col justify-center overflow-hidden bg-indigo-500 rounded-full text-xs text-white text-center whitespace-nowrap",
|
|
5465
5475
|
style: Ye({
|
|
@@ -5468,20 +5478,20 @@ function Ri(s, e, t, r, a, i) {
|
|
|
5468
5478
|
}, null, 4)
|
|
5469
5479
|
])
|
|
5470
5480
|
]),
|
|
5471
|
-
d("div",
|
|
5472
|
-
d("span",
|
|
5481
|
+
d("div", Ri, [
|
|
5482
|
+
d("span", Fi, R(i.formattedValue(n[a.columns[1]])), 1)
|
|
5473
5483
|
])
|
|
5474
5484
|
]))), 256))
|
|
5475
5485
|
])
|
|
5476
5486
|
])
|
|
5477
|
-
])) :
|
|
5487
|
+
])) : P("", !0);
|
|
5478
5488
|
}
|
|
5479
|
-
const
|
|
5489
|
+
const ji = /* @__PURE__ */ H(Di, [["render", Wi]]), Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5480
5490
|
__proto__: null,
|
|
5481
|
-
default:
|
|
5491
|
+
default: ji
|
|
5482
5492
|
}, Symbol.toStringTag, { value: "Module" })), Pi = {
|
|
5483
5493
|
name: "VsListbar",
|
|
5484
|
-
mixins: [
|
|
5494
|
+
mixins: [he],
|
|
5485
5495
|
props: ["source"],
|
|
5486
5496
|
data() {
|
|
5487
5497
|
return {
|
|
@@ -5511,46 +5521,46 @@ const Fi = /* @__PURE__ */ G($i, [["render", Ri]]), Wi = /* @__PURE__ */ Object.
|
|
|
5511
5521
|
this.maxValue = Math.max(...s || []), this.restDimensions = (r = this.columns) == null ? void 0 : r.filter((a, i) => i !== 0);
|
|
5512
5522
|
},
|
|
5513
5523
|
formattedValue(s) {
|
|
5514
|
-
return
|
|
5524
|
+
return le(s);
|
|
5515
5525
|
},
|
|
5516
5526
|
getWidth(s) {
|
|
5517
5527
|
return `${s / this.maxValue * 100}%`;
|
|
5518
5528
|
}
|
|
5519
5529
|
}
|
|
5520
|
-
},
|
|
5521
|
-
function
|
|
5522
|
-
return
|
|
5523
|
-
d("ul",
|
|
5524
|
-
(
|
|
5530
|
+
}, Ei = { class: "h-full pt-[20px] list-bar" }, Oi = { class: "space-y-2 custom-scrollbar h-full h-[calc(100%-20px)]" }, Ai = { class: "relative w-full truncate" }, Bi = { class: "relative z-[1] text-sm block py-1 px-2 w-full text-sm truncate text-gray-800" }, qi = { class: "text-[14px] text-gray-500" };
|
|
5531
|
+
function Mi(s, e, t, r, a, i) {
|
|
5532
|
+
return h(), w("div", Ei, [
|
|
5533
|
+
d("ul", Oi, [
|
|
5534
|
+
(h(!0), w(A, null, G(s.sourceData, (n, o) => {
|
|
5525
5535
|
var l, u, c;
|
|
5526
|
-
return
|
|
5536
|
+
return h(), w("li", {
|
|
5527
5537
|
key: o,
|
|
5528
5538
|
class: "flex items-center justify-between w-full gap-x-2"
|
|
5529
5539
|
}, [
|
|
5530
|
-
d("div",
|
|
5531
|
-
d("span",
|
|
5540
|
+
d("div", Ai, [
|
|
5541
|
+
d("span", Bi, R((n == null ? void 0 : n[(l = a.columns) == null ? void 0 : l[0]]) || "Без категорії"), 1),
|
|
5532
5542
|
d("div", {
|
|
5533
5543
|
class: K(["absolute inset-y-0 h-full rounded start-0", n != null && n[(u = a.columns) == null ? void 0 : u[0]] ? "bg-indigo-100" : "bg-gray-100"]),
|
|
5534
5544
|
style: Ye({ width: i.getWidth(n == null ? void 0 : n[(c = a.columns) == null ? void 0 : c[1]]) })
|
|
5535
5545
|
}, null, 6)
|
|
5536
5546
|
]),
|
|
5537
|
-
(
|
|
5547
|
+
(h(!0), w(A, null, G(a.restDimensions, (f, g) => (h(), w("div", {
|
|
5538
5548
|
key: g,
|
|
5539
5549
|
class: "w-20 mr-2 text-end"
|
|
5540
5550
|
}, [
|
|
5541
|
-
d("span",
|
|
5551
|
+
d("span", qi, R(i.formattedValue(n == null ? void 0 : n[f])), 1)
|
|
5542
5552
|
]))), 128))
|
|
5543
5553
|
]);
|
|
5544
5554
|
}), 128))
|
|
5545
5555
|
])
|
|
5546
5556
|
]);
|
|
5547
5557
|
}
|
|
5548
|
-
const
|
|
5558
|
+
const Ui = /* @__PURE__ */ H(Pi, [["render", Mi]]), Gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5549
5559
|
__proto__: null,
|
|
5550
|
-
default:
|
|
5551
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
5560
|
+
default: Ui
|
|
5561
|
+
}, Symbol.toStringTag, { value: "Module" })), Hi = {
|
|
5552
5562
|
name: "VsPivotTable",
|
|
5553
|
-
mixins: [
|
|
5563
|
+
mixins: [he],
|
|
5554
5564
|
data() {
|
|
5555
5565
|
return {
|
|
5556
5566
|
values: null,
|
|
@@ -5575,44 +5585,44 @@ const qi = /* @__PURE__ */ G(Pi, [["render", Bi]]), Mi = /* @__PURE__ */ Object.
|
|
|
5575
5585
|
);
|
|
5576
5586
|
this.dimensions[0].includes("date") ? this.xs = s.map((e) => ot(e)) : this.xs = [...s], this.products = this.dimensions.filter((e, t) => t != 0), this.values = this.products.map((e, t) => ({
|
|
5577
5587
|
name: e,
|
|
5578
|
-
data: this.sourceData.filter((r) => parseFloat(r[e])).map((r) =>
|
|
5588
|
+
data: this.sourceData.filter((r) => parseFloat(r[e])).map((r) => le(parseFloat(r[e])))
|
|
5579
5589
|
}));
|
|
5580
5590
|
} catch (s) {
|
|
5581
5591
|
console.error(s);
|
|
5582
5592
|
}
|
|
5583
5593
|
}
|
|
5584
5594
|
}
|
|
5585
|
-
},
|
|
5595
|
+
}, Zi = { class: "flex flex-col h-full p-5 space-y-4 rounded-xl custom-scrollbar" }, Qi = { 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" }, Xi = { class: "inline-block min-w-full align-middle" }, Ki = { class: "min-w-full divide-y divide-gray-200" }, Yi = { class: "space-x-2" }, Ji = {
|
|
5586
5596
|
scope: "col",
|
|
5587
5597
|
class: "xl:min-w-[120px] min-w-48"
|
|
5588
|
-
},
|
|
5589
|
-
function
|
|
5590
|
-
return
|
|
5591
|
-
d("div",
|
|
5592
|
-
d("div",
|
|
5593
|
-
d("table",
|
|
5598
|
+
}, eo = { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" }, to = { class: "divide-y divide-gray-200 text-[12px]" }, so = { class: "py-3 size-px whitespace-nowrap" }, ro = { class: "flex items-center gap-x-3" }, ao = { class: "font-medium text-gray-800" }, no = { class: "py-3 size-px whitespace-nowrap" }, io = { class: "text-gray-600" };
|
|
5599
|
+
function oo(s, e, t, r, a, i) {
|
|
5600
|
+
return h(), w("div", Zi, [
|
|
5601
|
+
d("div", Qi, [
|
|
5602
|
+
d("div", Xi, [
|
|
5603
|
+
d("table", Ki, [
|
|
5594
5604
|
d("thead", null, [
|
|
5595
|
-
d("tr",
|
|
5605
|
+
d("tr", Yi, [
|
|
5596
5606
|
e[0] || (e[0] = d("th", {
|
|
5597
5607
|
scope: "col",
|
|
5598
5608
|
class: "min-w-[200px]"
|
|
5599
5609
|
}, [
|
|
5600
5610
|
d("div", { class: "py-2.5 text-text-start flex items-center gap-x-1 text-sm font-normal text-gray-500" })
|
|
5601
5611
|
], -1)),
|
|
5602
|
-
(
|
|
5603
|
-
d("div",
|
|
5612
|
+
(h(!0), w(A, null, G(a.xs, (n) => (h(), w("th", Ji, [
|
|
5613
|
+
d("div", eo, R(n), 1)
|
|
5604
5614
|
]))), 256))
|
|
5605
5615
|
])
|
|
5606
5616
|
]),
|
|
5607
|
-
(
|
|
5617
|
+
(h(!0), w(A, null, G(a.values, (n) => (h(), w("tbody", to, [
|
|
5608
5618
|
d("tr", null, [
|
|
5609
|
-
d("td",
|
|
5610
|
-
d("div",
|
|
5611
|
-
d("span",
|
|
5619
|
+
d("td", so, [
|
|
5620
|
+
d("div", ro, [
|
|
5621
|
+
d("span", ao, R(n.name), 1)
|
|
5612
5622
|
])
|
|
5613
5623
|
]),
|
|
5614
|
-
(
|
|
5615
|
-
d("span",
|
|
5624
|
+
(h(!0), w(A, null, G(a.xs, (o, l) => (h(), w("td", no, [
|
|
5625
|
+
d("span", io, R(n.data[l]), 1)
|
|
5616
5626
|
]))), 256))
|
|
5617
5627
|
])
|
|
5618
5628
|
]))), 256))
|
|
@@ -5621,46 +5631,34 @@ function no(s, e, t, r, a, i) {
|
|
|
5621
5631
|
])
|
|
5622
5632
|
]);
|
|
5623
5633
|
}
|
|
5624
|
-
const
|
|
5634
|
+
const lo = /* @__PURE__ */ H(Hi, [["render", oo]]), co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5625
5635
|
__proto__: null,
|
|
5626
|
-
default:
|
|
5636
|
+
default: lo
|
|
5627
5637
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5628
5638
|
export {
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
Un as R,
|
|
5636
|
-
$s as S,
|
|
5637
|
-
Ds as T,
|
|
5638
|
-
Mn as U,
|
|
5639
|
-
Bn as V,
|
|
5640
|
-
zs as X,
|
|
5641
|
-
G as _,
|
|
5642
|
-
Te as a,
|
|
5639
|
+
Hn as R,
|
|
5640
|
+
Gn as U,
|
|
5641
|
+
Mn as V,
|
|
5642
|
+
Ts as X,
|
|
5643
|
+
H as _,
|
|
5644
|
+
Ie as a,
|
|
5643
5645
|
ot as b,
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
+
he as c,
|
|
5647
|
+
le as d,
|
|
5646
5648
|
J as e,
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
io as u,
|
|
5663
|
-
Qn as v,
|
|
5664
|
-
uo as w,
|
|
5665
|
-
We as x
|
|
5649
|
+
go as f,
|
|
5650
|
+
M as g,
|
|
5651
|
+
Ba as h,
|
|
5652
|
+
Oa as i,
|
|
5653
|
+
fo as j,
|
|
5654
|
+
si as k,
|
|
5655
|
+
oi as l,
|
|
5656
|
+
W as m,
|
|
5657
|
+
$i as n,
|
|
5658
|
+
ji as o,
|
|
5659
|
+
Ui as p,
|
|
5660
|
+
lo as q,
|
|
5661
|
+
ho as r,
|
|
5662
|
+
je as s,
|
|
5663
|
+
Kn as v
|
|
5666
5664
|
};
|