@feedmepos/mf-report 5.24.4-beta.0 → 5.24.5-beta.0
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/{App-CJjtEvCd.js → App-D49d1Lbx.js} +4 -4
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B5DNvvB7.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DbfWX0mv.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BsPh59cR.js → Default.vue_vue_type_script_setup_true_lang-BySlhgNb.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DWft8Sie.js → DynamicWidget.vue_vue_type_script_setup_true_lang-TMYMIdbS.js} +1110 -1102
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-9lOgWzji.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-iPMIZVHW.js} +2380 -2331
- package/dist/{InsightView-DTFWoh2b.js → InsightView-BzIhi-eg.js} +4 -4
- package/dist/{Integration-syhbdF_d.js → Integration-Y3fd_Acv.js} +2445 -2422
- package/dist/{Integrations-DzQFDTzA.js → Integrations-CwEtIOmo.js} +2 -2
- package/dist/{Layout-CMjQcuy_.js → Layout-BH9O3jO2.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BUcq4EoE.js → MenuTab.vue_vue_type_script_setup_true_lang-0i4_mtgU.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BUGf_Gx0.js → NavigationTab.vue_vue_type_script_setup_true_lang-CWsylMUa.js} +7751 -7605
- package/dist/{OverviewView-Ksmn1tHX.js → OverviewView-DUIt8XZS.js} +4 -4
- package/dist/{Report-DccVLICj.js → Report-29gFPEGz.js} +3 -3
- package/dist/{ReportEditor-BpJE0vo3.js → ReportEditor-M9Zlq2k8.js} +3 -3
- package/dist/{ReportView-BC1lGzxw.js → ReportView-BGVdH7KL.js} +6 -6
- package/dist/{Setting-D2WKQ7hu.js → Setting-fkHrzc2U.js} +3 -3
- package/dist/{TileEditor-CjkX4lXZ.js → TileEditor-BQbjYz_B.js} +5 -5
- package/dist/{TransitionFade-DCnaURka.js → TransitionFade-BcRtcw3V.js} +4 -4
- package/dist/{app-BKTTPSRU.js → app-DIHhRoHJ.js} +595 -520
- package/dist/app.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-Bmw1sAa2.js → useRestaurantPermission-B3MkZBSv.js} +1 -1
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { computed as m, defineComponent as Ne, ref as D, onMounted as $e, onBeforeUnmount as Qn, resolveComponent as
|
|
2
|
-
import { W as oe, i as
|
|
3
|
-
import { h as Wo, z as Eo, i as Oo, j as Uo, a as
|
|
4
|
-
import { d as
|
|
5
|
-
import { storeToRefs as
|
|
6
|
-
import { C as
|
|
1
|
+
import { computed as m, defineComponent as Ne, ref as D, onMounted as $e, onBeforeUnmount as Qn, resolveComponent as pe, createBlock as ge, openBlock as Y, Transition as Io, withCtx as Le, createElementBlock as fe, createCommentVNode as be, createElementVNode as Q, unref as r, normalizeStyle as De, withModifiers as en, toDisplayString as Pe, createVNode as he, Fragment as Ve, renderList as zt, normalizeClass as Ie, watch as we, nextTick as Me, mergeModels as Xe, useModel as Ee, renderSlot as nt, h as Jt, createSlots as Mo, resolveDynamicComponent as eo, toRaw as Bo, markRaw as Po, createTextVNode as Fo, onUnmounted as to, withDirectives as Ao, vShow as Ro } from "vue";
|
|
2
|
+
import { W as oe, i as kt, j as zo, S as Pt, v as Rt, k as No, l as dn, m as no, d as Vo, q as $o, R as gt, n as Ho } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-iPMIZVHW.js";
|
|
3
|
+
import { h as Wo, z as Eo, i as Oo, j as Uo, a as on, u as kn } from "./app-DIHhRoHJ.js";
|
|
4
|
+
import { d as mn } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DbfWX0mv.js";
|
|
5
|
+
import { storeToRefs as it, defineStore as Ko } from "pinia";
|
|
6
|
+
import { C as pn } from "./chart-DDDh8zNk.js";
|
|
7
7
|
import { detectLocale as qo } from "@feedmepos/mf-common";
|
|
8
|
-
import { useBreakpoints as
|
|
9
|
-
import { u as
|
|
8
|
+
import { useBreakpoints as rn, useSnackbar as Tn, components as Xo } from "@feedmepos/ui-library";
|
|
9
|
+
import { u as ut } from "./vue-i18n-DVWuTfed.js";
|
|
10
10
|
import { a as oo, _ as Nn } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js";
|
|
11
|
-
import { r as
|
|
12
|
-
var
|
|
11
|
+
import { r as st } from "./i18n-CI_sQ5d_.js";
|
|
12
|
+
var vn = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(vn || {}), et = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(et || {}), gn = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(gn || {}), yn = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(yn || {}), bn = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(bn || {}), Cn = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(Cn || {}), xn = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(xn || {}), _e = /* @__PURE__ */ ((e) => (e.series = "SERIES", e.metric = "METRIC", e.breakdown = "BREAKDOWN", e))(_e || {});
|
|
13
13
|
oe.Circular, oe.Table, oe.BarChart, oe.LineChart, oe.StackBarChart, oe.ClusteredStackBarChart, oe.StackLineChart, oe.Scorecard, oe.Spacer;
|
|
14
14
|
const Yo = [
|
|
15
15
|
{
|
|
@@ -82,7 +82,7 @@ const Yo = [
|
|
|
82
82
|
showSearchBar: !1
|
|
83
83
|
}
|
|
84
84
|
];
|
|
85
|
-
function
|
|
85
|
+
function fn(e) {
|
|
86
86
|
const n = [e.schemaName, e.name];
|
|
87
87
|
return "option" in e && e.option && n.push(e.option), "aggregation" in e && e.aggregation && n.push(e.aggregation), n.push(e.label.replace(/[^\p{L}\p{N}_]+/gu, "")), n.join("_").toLowerCase();
|
|
88
88
|
}
|
|
@@ -104,7 +104,7 @@ function Go(e, n) {
|
|
|
104
104
|
return !0;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const an = [
|
|
108
108
|
"#36A2EB",
|
|
109
109
|
"#007BA7",
|
|
110
110
|
"#FF5D53",
|
|
@@ -115,8 +115,8 @@ const on = [
|
|
|
115
115
|
"#50BE9B",
|
|
116
116
|
"#8358D4",
|
|
117
117
|
"#9B5046"
|
|
118
|
-
], ul =
|
|
119
|
-
function
|
|
118
|
+
], ul = an.map(() => "solid");
|
|
119
|
+
function yt({
|
|
120
120
|
datasetIndex: e,
|
|
121
121
|
label: n
|
|
122
122
|
}) {
|
|
@@ -141,13 +141,13 @@ function Fe({
|
|
|
141
141
|
metricCount: t,
|
|
142
142
|
mode: o
|
|
143
143
|
}) {
|
|
144
|
-
if (o !==
|
|
144
|
+
if (o !== _e.metric)
|
|
145
145
|
return e;
|
|
146
146
|
const s = Number.isFinite(t) ? Number(t) : 0;
|
|
147
147
|
return s <= 0 ? e : n ? e >= s ? (e - s) % s : Math.max(0, (e - 1 + s) % s) : e % s;
|
|
148
148
|
}
|
|
149
149
|
const Zo = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
150
|
-
function
|
|
150
|
+
function Nt(e) {
|
|
151
151
|
if (!e)
|
|
152
152
|
return null;
|
|
153
153
|
const n = e.trim();
|
|
@@ -160,7 +160,7 @@ function zt(e) {
|
|
|
160
160
|
return n.toUpperCase();
|
|
161
161
|
}
|
|
162
162
|
function Qo(e) {
|
|
163
|
-
const n =
|
|
163
|
+
const n = Nt(e) ?? "#000000";
|
|
164
164
|
return {
|
|
165
165
|
red: Number.parseInt(n.slice(1, 3), 16),
|
|
166
166
|
green: Number.parseInt(n.slice(3, 5), 16),
|
|
@@ -168,14 +168,14 @@ function Qo(e) {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
function ao(e) {
|
|
171
|
-
return !Array.isArray(e) || e.length === 0 ?
|
|
171
|
+
return !Array.isArray(e) || e.length === 0 ? an : an.map((n, t) => Nt(e[t]) ?? n);
|
|
172
172
|
}
|
|
173
173
|
function ro(e, n) {
|
|
174
174
|
const { red: t, green: o, blue: s } = Qo(e);
|
|
175
175
|
return `rgba(${t}, ${o}, ${s}, ${n})`;
|
|
176
176
|
}
|
|
177
177
|
function Vn(e, n) {
|
|
178
|
-
const t =
|
|
178
|
+
const t = Nt(e) ?? "#000000", o = (s) => {
|
|
179
179
|
const i = Number.parseInt(t.slice(s, s + 2), 16);
|
|
180
180
|
return Math.round(i + (255 - i) * n).toString(16).padStart(2, "0").toUpperCase();
|
|
181
181
|
};
|
|
@@ -194,13 +194,13 @@ function tt({
|
|
|
194
194
|
let i = typeof t == "number" ? t : 1;
|
|
195
195
|
return n && (i = i * 0.6), ro(s[e % s.length], i);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function wt({
|
|
198
198
|
fallbackIndex: e,
|
|
199
199
|
metricCount: n
|
|
200
200
|
}) {
|
|
201
201
|
return Number.isInteger(n) && Number(n) > 0 ? Math.floor(e / Number(n)) : e;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Tt({
|
|
204
204
|
breakdownIndex: e,
|
|
205
205
|
metricIndex: n,
|
|
206
206
|
metricCount: t,
|
|
@@ -211,9 +211,9 @@ function _t({
|
|
|
211
211
|
colorMode: h,
|
|
212
212
|
customColors: c
|
|
213
213
|
}) {
|
|
214
|
-
const C = Number.isInteger(t) && Number(t) > 0 ? Number(t) : 1, N = Number.isInteger(n) && Number(n) >= 0 ? Number(n) : 0, $ = l !== !1, F = e * C + N, y = h === "clustered" ?
|
|
215
|
-
let
|
|
216
|
-
return o && (
|
|
214
|
+
const C = Number.isInteger(t) && Number(t) > 0 ? Number(t) : 1, N = Number.isInteger(n) && Number(n) >= 0 ? Number(n) : 0, $ = l !== !1, F = e * C + N, y = h === "clustered" ? an : ao(c), g = Nt(i == null ? void 0 : i[e * C]) ?? y[e % y.length], I = $ && N > 0 ? Vn(g, $n(N)) : Nt(i == null ? void 0 : i[F]) ?? (N > 0 ? Vn(g, $n(N)) : g);
|
|
215
|
+
let T = typeof s == "number" ? s : 1;
|
|
216
|
+
return o && (T = T * 0.6), ro(I, T);
|
|
217
217
|
}
|
|
218
218
|
function lo(e, n, t) {
|
|
219
219
|
if (e === "" || n === "")
|
|
@@ -246,7 +246,7 @@ function ea(e) {
|
|
|
246
246
|
tailwind: "fm-color-neutral-gray-100"
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function Vt(e) {
|
|
250
250
|
return Object.entries(e).map(([n, t]) => `${n}:${t}`).join(";");
|
|
251
251
|
}
|
|
252
252
|
function so(e) {
|
|
@@ -285,7 +285,7 @@ function so(e) {
|
|
|
285
285
|
titleMarginBottom: 6
|
|
286
286
|
};
|
|
287
287
|
}
|
|
288
|
-
const ta =
|
|
288
|
+
const ta = Vt({
|
|
289
289
|
display: "block",
|
|
290
290
|
padding: "0",
|
|
291
291
|
background: "none",
|
|
@@ -304,7 +304,7 @@ const ta = Nt({
|
|
|
304
304
|
"white-space": "normal",
|
|
305
305
|
"word-break": "break-word",
|
|
306
306
|
"overflow-wrap": "anywhere"
|
|
307
|
-
}, oa =
|
|
307
|
+
}, oa = Vt({
|
|
308
308
|
display: "flex",
|
|
309
309
|
"align-items": "flex-start",
|
|
310
310
|
"font-size": "13px",
|
|
@@ -314,7 +314,7 @@ const ta = Nt({
|
|
|
314
314
|
"line-height": "1.35",
|
|
315
315
|
margin: "0 0 3px",
|
|
316
316
|
overflow: "hidden"
|
|
317
|
-
}), aa =
|
|
317
|
+
}), aa = Vt({
|
|
318
318
|
flex: "1 1 auto",
|
|
319
319
|
"min-width": "0",
|
|
320
320
|
"white-space": "normal",
|
|
@@ -366,7 +366,7 @@ function Hn(e) {
|
|
|
366
366
|
);
|
|
367
367
|
t && (t.__onViewportChange && (window.removeEventListener("scroll", t.__onViewportChange, !0), window.removeEventListener("resize", t.__onViewportChange)), t.remove());
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function hn(e, n, t, o) {
|
|
370
370
|
const { left: s, right: i, top: l, bottom: h } = t;
|
|
371
371
|
e.save(), e.beginPath(), e.lineWidth = 1, e.strokeStyle = ia, e.setLineDash([5, 5]), n ? (e.moveTo(s, o), e.lineTo(i, o)) : (e.moveTo(o, l), e.lineTo(o, h)), e.stroke(), e.restore();
|
|
372
372
|
}
|
|
@@ -391,7 +391,7 @@ function ca(e, n, t) {
|
|
|
391
391
|
const o = ((g = e.options) == null ? void 0 : g.indexAxis) === "y", s = e.tooltip, i = (s == null ? void 0 : s.getActiveElements()) ?? [];
|
|
392
392
|
if (i.length === 0) {
|
|
393
393
|
const I = ua(e, o);
|
|
394
|
-
I !== void 0 &&
|
|
394
|
+
I !== void 0 && hn(e.ctx, o, e.chartArea, I);
|
|
395
395
|
return;
|
|
396
396
|
}
|
|
397
397
|
const l = e.scales.x, h = e.scales.y;
|
|
@@ -401,16 +401,16 @@ function ca(e, n, t) {
|
|
|
401
401
|
if (!c)
|
|
402
402
|
return;
|
|
403
403
|
if (n === "bar") {
|
|
404
|
-
const
|
|
405
|
-
|
|
404
|
+
const T = (o ? h : l).getPixelForValue(c.index);
|
|
405
|
+
hn(e.ctx, o, e.chartArea, T);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
408
|
if (!c.element)
|
|
409
409
|
return;
|
|
410
410
|
const C = c.element, N = o ? h : l, $ = o ? C.y : C.x, F = N.getPixelForValue(c.index), y = $ ?? F;
|
|
411
|
-
|
|
411
|
+
hn(e.ctx, o, e.chartArea, y);
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function $t(e) {
|
|
414
414
|
let n = !1, t = !1;
|
|
415
415
|
return {
|
|
416
416
|
id: "crosshair",
|
|
@@ -436,10 +436,10 @@ function Vt(e) {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
const da = Number.POSITIVE_INFINITY,
|
|
439
|
+
const da = Number.POSITIVE_INFINITY, wn = 2, fa = 1, ha = 0.2, ma = 120, { breakpoints: bt } = rn(), Ln = "report-v5:locationchange";
|
|
440
440
|
let Wn = !1;
|
|
441
441
|
function En() {
|
|
442
|
-
window.dispatchEvent(new Event(
|
|
442
|
+
window.dispatchEvent(new Event(Ln));
|
|
443
443
|
}
|
|
444
444
|
function pa() {
|
|
445
445
|
if (Wn)
|
|
@@ -454,7 +454,7 @@ function pa() {
|
|
|
454
454
|
return En(), s;
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const Ft = {
|
|
458
458
|
"en-US": Uo.report.widget.comparisonTooltip.viewBreakdown,
|
|
459
459
|
"zh-CN": Oo.report.widget.comparisonTooltip.viewBreakdown,
|
|
460
460
|
"zh-Hant": Eo.report.widget.comparisonTooltip.viewBreakdown,
|
|
@@ -462,7 +462,7 @@ const Pt = {
|
|
|
462
462
|
};
|
|
463
463
|
function io() {
|
|
464
464
|
const e = qo();
|
|
465
|
-
return e in
|
|
465
|
+
return e in Ft ? Ft[e] : e.startsWith("zh") ? Ft["zh-CN"] : e.startsWith("th") ? Ft["th-TH"] : Ft["en-US"];
|
|
466
466
|
}
|
|
467
467
|
function va(e) {
|
|
468
468
|
return e == null ? null : typeof e != "string" ? [] : e.split("#").map((n) => n.trim()).filter((n) => n.length > 0);
|
|
@@ -484,13 +484,13 @@ function xa(e, n) {
|
|
|
484
484
|
return e.type === "bar" ? !0 : n === "bar";
|
|
485
485
|
}
|
|
486
486
|
function wa(e, n, t) {
|
|
487
|
-
const o =
|
|
487
|
+
const o = At(e.borderColor, n) || At(e.color, n), s = At(e.backgroundColor, n), i = At(e.pointBorderColor, n), l = At(e.pointBackgroundColor, n);
|
|
488
488
|
return t ? On(s, l, o, i) : On(o, i, s, l);
|
|
489
489
|
}
|
|
490
490
|
function Sa(e) {
|
|
491
491
|
return e.trim().toLowerCase();
|
|
492
492
|
}
|
|
493
|
-
function
|
|
493
|
+
function At(e, n) {
|
|
494
494
|
if (typeof e == "string") return e;
|
|
495
495
|
if (Array.isArray(e)) {
|
|
496
496
|
const t = e[n];
|
|
@@ -515,24 +515,24 @@ function On(...e) {
|
|
|
515
515
|
}
|
|
516
516
|
return "#9ca3af";
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Sn(e) {
|
|
519
519
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """).replace(/'/g, "'");
|
|
520
520
|
}
|
|
521
521
|
function Ta(e) {
|
|
522
522
|
const n = typeof e == "number" ? e : typeof e == "string" ? Number(e) : Number.NaN;
|
|
523
|
-
return Number.isFinite(n) ? Math.max(
|
|
523
|
+
return Number.isFinite(n) ? Math.max(wn, Math.floor(n)) : da;
|
|
524
524
|
}
|
|
525
525
|
function La(e) {
|
|
526
|
-
return e <= 0 ? 320 :
|
|
526
|
+
return e <= 0 ? 320 : bt.value.xs || bt.value.sm || e <= 640 ? Math.max(160, Math.floor(e * 0.38)) : bt.value.md || e <= 900 ? Math.max(200, Math.floor(e * 0.46)) : bt.value.lg || e <= 1200 ? Math.max(240, Math.floor(e * 0.54)) : Math.max(280, Math.floor(e * 0.62));
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Dn(e, n) {
|
|
529
529
|
const t = window.innerHeight, o = La(t), s = n ? Math.max(120, n.clientHeight - 16) : Number.POSITIVE_INFINITY, i = Math.max(120, Math.min(o, s));
|
|
530
530
|
e.style.maxHeight = `${i}px`;
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
return
|
|
532
|
+
function Ct() {
|
|
533
|
+
return bt.value.xs || bt.value.sm;
|
|
534
534
|
}
|
|
535
|
-
function
|
|
535
|
+
function xt(e) {
|
|
536
536
|
return e.dataset.pinned === "true";
|
|
537
537
|
}
|
|
538
538
|
function uo(e, n) {
|
|
@@ -558,19 +558,19 @@ function Un(e) {
|
|
|
558
558
|
};
|
|
559
559
|
}
|
|
560
560
|
function Da(e) {
|
|
561
|
-
return
|
|
561
|
+
return Vt({
|
|
562
562
|
...na,
|
|
563
563
|
margin: `${e ? "8px" : "0"} 0 4px`
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
function Ia(e, n) {
|
|
567
|
-
return
|
|
567
|
+
return Vt({
|
|
568
568
|
...e ? ra : la,
|
|
569
569
|
background: n
|
|
570
570
|
});
|
|
571
571
|
}
|
|
572
572
|
function Ma(e) {
|
|
573
|
-
return `<button type="button" data-tooltip-full-details="true" style="${ta}">${
|
|
573
|
+
return `<button type="button" data-tooltip-full-details="true" style="${ta}">${Sn(e)}</button>`;
|
|
574
574
|
}
|
|
575
575
|
function fo(e, n, t, o, s, i, l, h) {
|
|
576
576
|
var A;
|
|
@@ -578,11 +578,11 @@ function fo(e, n, t, o, s, i, l, h) {
|
|
|
578
578
|
i.forEach((w, u) => {
|
|
579
579
|
if (g.has(u))
|
|
580
580
|
return;
|
|
581
|
-
const M = w ?? {}, W = ya(M),
|
|
582
|
-
text: Ca(W,
|
|
583
|
-
color: wa(M, l,
|
|
584
|
-
isBar:
|
|
585
|
-
value:
|
|
581
|
+
const M = w ?? {}, W = ya(M), q = ba(M, l), ee = xa(M, h), G = {
|
|
582
|
+
text: Ca(W, q),
|
|
583
|
+
color: wa(M, l, ee),
|
|
584
|
+
isBar: ee,
|
|
585
|
+
value: q,
|
|
586
586
|
datasetLabel: W,
|
|
587
587
|
matchingKey: Sa(W)
|
|
588
588
|
};
|
|
@@ -592,24 +592,24 @@ function fo(e, n, t, o, s, i, l, h) {
|
|
|
592
592
|
}
|
|
593
593
|
F.push(G);
|
|
594
594
|
});
|
|
595
|
-
const I = F.slice(0, o),
|
|
595
|
+
const I = F.slice(0, o), T = /* @__PURE__ */ new Map();
|
|
596
596
|
y.forEach((w) => {
|
|
597
|
-
const u =
|
|
597
|
+
const u = T.get(w.matchingKey);
|
|
598
598
|
if (!u) {
|
|
599
|
-
|
|
599
|
+
T.set(w.matchingKey, [w]);
|
|
600
600
|
return;
|
|
601
601
|
}
|
|
602
602
|
u.push(w);
|
|
603
603
|
});
|
|
604
604
|
const B = $ ? I.map((w) => {
|
|
605
|
-
const u =
|
|
605
|
+
const u = T.get(w.matchingKey);
|
|
606
606
|
return !u || u.length === 0 ? Un(w) : u.shift() ?? Un(w);
|
|
607
|
-
}) : [], v = F.length > I.length || y.length > B.length, f = (w, u = !1) => `<div style="${Da(u)}">${
|
|
607
|
+
}) : [], v = F.length > I.length || y.length > B.length, f = (w, u = !1) => `<div style="${Da(u)}">${Sn(w)}</div>`, k = (w) => {
|
|
608
608
|
const u = Ia(w.isBar, w.color);
|
|
609
|
-
return `<div style="${oa}"><span style="${u}"></span><span style="${aa}">${
|
|
609
|
+
return `<div style="${oa}"><span style="${u}"></span><span style="${aa}">${Sn(w.text)}</span></div>`;
|
|
610
610
|
};
|
|
611
|
-
let
|
|
612
|
-
N.length > 0 && (
|
|
611
|
+
let L = "";
|
|
612
|
+
N.length > 0 && (L += f(N)), L += I.map((w) => k(w)).join(""), $ && B.length > 0 && (L += f($, L.length > 0), L += B.map((w) => k(w)).join("")), s && v && (L += Ma(t));
|
|
613
613
|
const x = [
|
|
614
614
|
{
|
|
615
615
|
title: N,
|
|
@@ -621,7 +621,7 @@ function fo(e, n, t, o, s, i, l, h) {
|
|
|
621
621
|
}
|
|
622
622
|
].filter((w) => w.values.length > 0);
|
|
623
623
|
return {
|
|
624
|
-
html:
|
|
624
|
+
html: L,
|
|
625
625
|
detailsPayload: { sections: x },
|
|
626
626
|
hasCollapsedValues: v
|
|
627
627
|
};
|
|
@@ -629,7 +629,7 @@ function fo(e, n, t, o, s, i, l, h) {
|
|
|
629
629
|
function Kn(e) {
|
|
630
630
|
return e.scrollHeight - e.clientHeight > fa;
|
|
631
631
|
}
|
|
632
|
-
function
|
|
632
|
+
function Zt(e, n, t, o, s, i, l, h, c) {
|
|
633
633
|
const C = fo(
|
|
634
634
|
n,
|
|
635
635
|
t,
|
|
@@ -645,7 +645,7 @@ function Jt(e, n, t, o, s, i, l, h, c) {
|
|
|
645
645
|
function Ba(e, n, t, o, s, i, l, h, c) {
|
|
646
646
|
if (Number.isFinite(s))
|
|
647
647
|
return {
|
|
648
|
-
markup:
|
|
648
|
+
markup: Zt(
|
|
649
649
|
e,
|
|
650
650
|
n,
|
|
651
651
|
t,
|
|
@@ -658,8 +658,8 @@ function Ba(e, n, t, o, s, i, l, h, c) {
|
|
|
658
658
|
),
|
|
659
659
|
maxTooltipItems: s
|
|
660
660
|
};
|
|
661
|
-
const C = Math.max(
|
|
662
|
-
let N = C, $ =
|
|
661
|
+
const C = Math.max(wn, n.length);
|
|
662
|
+
let N = C, $ = Zt(
|
|
663
663
|
e,
|
|
664
664
|
n,
|
|
665
665
|
t,
|
|
@@ -675,9 +675,9 @@ function Ba(e, n, t, o, s, i, l, h, c) {
|
|
|
675
675
|
markup: $,
|
|
676
676
|
maxTooltipItems: C
|
|
677
677
|
};
|
|
678
|
-
let F =
|
|
678
|
+
let F = wn, y = C;
|
|
679
679
|
for (; F <= y; ) {
|
|
680
|
-
const I = Math.floor((F + y) / 2),
|
|
680
|
+
const I = Math.floor((F + y) / 2), T = Zt(
|
|
681
681
|
e,
|
|
682
682
|
n,
|
|
683
683
|
t,
|
|
@@ -692,10 +692,10 @@ function Ba(e, n, t, o, s, i, l, h, c) {
|
|
|
692
692
|
y = I - 1;
|
|
693
693
|
continue;
|
|
694
694
|
}
|
|
695
|
-
N = I, $ =
|
|
695
|
+
N = I, $ = T, F = I + 1;
|
|
696
696
|
}
|
|
697
697
|
return {
|
|
698
|
-
markup: N === C ? $ :
|
|
698
|
+
markup: N === C ? $ : Zt(
|
|
699
699
|
e,
|
|
700
700
|
n,
|
|
701
701
|
t,
|
|
@@ -736,7 +736,7 @@ function qn(e, n) {
|
|
|
736
736
|
}
|
|
737
737
|
return e;
|
|
738
738
|
}
|
|
739
|
-
function
|
|
739
|
+
function Qt(e, n) {
|
|
740
740
|
return typeof e == "string" ? qn(e, n) : Array.isArray(e) ? e.map(
|
|
741
741
|
(t) => typeof t == "string" ? qn(t, n) : t
|
|
742
742
|
) : e;
|
|
@@ -755,13 +755,13 @@ function Fa(e) {
|
|
|
755
755
|
}
|
|
756
756
|
function Aa(e, n) {
|
|
757
757
|
const t = e.__tooltipOriginalStyle;
|
|
758
|
-
t && (Reflect.set(e, "borderColor",
|
|
758
|
+
t && (Reflect.set(e, "borderColor", Qt(t.borderColor, n)), Reflect.set(e, "backgroundColor", Qt(t.backgroundColor, n)), Reflect.set(e, "pointBorderColor", Qt(t.pointBorderColor, n)), Reflect.set(
|
|
759
759
|
e,
|
|
760
760
|
"pointBackgroundColor",
|
|
761
|
-
|
|
761
|
+
Qt(t.pointBackgroundColor, n)
|
|
762
762
|
));
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function _n(e) {
|
|
765
765
|
var o;
|
|
766
766
|
if (!e || typeof e != "object")
|
|
767
767
|
return !1;
|
|
@@ -771,8 +771,8 @@ function Sn(e) {
|
|
|
771
771
|
const t = n.canvas;
|
|
772
772
|
return !(t != null && (!t.isConnected || !t.ownerDocument));
|
|
773
773
|
}
|
|
774
|
-
function
|
|
775
|
-
if (!
|
|
774
|
+
function tn(e, n) {
|
|
775
|
+
if (!_n(e))
|
|
776
776
|
return;
|
|
777
777
|
const t = e.data.datasets;
|
|
778
778
|
if (t.length !== 0) {
|
|
@@ -798,7 +798,7 @@ function en(e, n) {
|
|
|
798
798
|
}
|
|
799
799
|
function ho(e) {
|
|
800
800
|
const n = e, t = n == null ? void 0 : n.chart;
|
|
801
|
-
if (
|
|
801
|
+
if (_n(t))
|
|
802
802
|
return t;
|
|
803
803
|
const o = n == null ? void 0 : n.$el;
|
|
804
804
|
if (!o)
|
|
@@ -806,38 +806,38 @@ function ho(e) {
|
|
|
806
806
|
const s = o.querySelector("canvas");
|
|
807
807
|
if (!(s instanceof HTMLCanvasElement))
|
|
808
808
|
return null;
|
|
809
|
-
const i =
|
|
810
|
-
return
|
|
809
|
+
const i = pn.getChart(s);
|
|
810
|
+
return _n(i) ? i : null;
|
|
811
811
|
}
|
|
812
812
|
function Ra(e) {
|
|
813
813
|
const n = window.getComputedStyle(e);
|
|
814
814
|
return [n.overflow, n.overflowX, n.overflowY].some((o) => o !== "visible");
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function In(e) {
|
|
817
817
|
let n = e.parentElement ?? e, t = n;
|
|
818
818
|
for (; t && t.parentElement && t.parentElement !== document.body && t.parentElement !== document.documentElement; )
|
|
819
819
|
Ra(t) && (n = t.parentElement), t = t.parentElement;
|
|
820
820
|
return window.getComputedStyle(n).position === "static" && (n.style.position = "relative"), n;
|
|
821
821
|
}
|
|
822
|
-
function
|
|
822
|
+
function Mn(e, n, t, o, s, i, l = "center", h = !1) {
|
|
823
823
|
const c = n.getBoundingClientRect(), C = t.getBoundingClientRect(), N = t.scrollLeft, $ = t.scrollTop, F = t.clientWidth, y = t.clientHeight, g = e;
|
|
824
824
|
(!Number.isFinite(g.__cachedWidth) || !Number.isFinite(g.__cachedHeight) || g.__measurementHostWidth !== F || g.__measurementHostHeight !== y) && (g.__cachedWidth = e.offsetWidth, g.__cachedHeight = e.offsetHeight, g.__measurementHostWidth = F, g.__measurementHostHeight = y);
|
|
825
|
-
const
|
|
825
|
+
const T = g.__cachedWidth ?? e.offsetWidth, B = g.__cachedHeight ?? e.offsetHeight, v = 8, f = c.left - C.left + N + o, k = c.top - C.top + $ + s, L = h ? l === "left" ? f - T - v : f + v : l === "left" ? f - T - v : l === "right" ? f + v : f - T / 2, x = h ? k + v : i ? k - B / 2 : k + v, A = N + v;
|
|
826
826
|
let w = $ + v;
|
|
827
827
|
const u = document.querySelector('[data-menu-tab="true"]');
|
|
828
828
|
if (u) {
|
|
829
|
-
const
|
|
830
|
-
w = Math.max(w,
|
|
829
|
+
const ie = u.getBoundingClientRect().bottom - C.top + $ + v;
|
|
830
|
+
w = Math.max(w, ie);
|
|
831
831
|
}
|
|
832
|
-
const M = Math.max(A, N + F -
|
|
833
|
-
g.__lastLeftPx ===
|
|
832
|
+
const M = Math.max(A, N + F - T - v), W = Math.max(w, $ + y - B - v), q = Math.round(Math.min(Math.max(A, L), M)), ee = Math.round(Math.min(Math.max(w, x), W));
|
|
833
|
+
g.__lastLeftPx === q && g.__lastTopPx === ee || (g.__lastLeftPx = q, g.__lastTopPx = ee, e.style.left = `${q}px`, e.style.top = `${ee}px`);
|
|
834
834
|
}
|
|
835
835
|
function mo(e) {
|
|
836
836
|
return e.dataset.anchorDirection === "left" ? "left" : e.dataset.anchorDirection === "right" ? "right" : "center";
|
|
837
837
|
}
|
|
838
838
|
function za(e, n, t, o, s, i, l) {
|
|
839
839
|
const h = n.getBoundingClientRect(), c = o - h.left, C = s - h.top;
|
|
840
|
-
!Number.isFinite(c) || !Number.isFinite(C) || (e.dataset.cursorCanvasX = String(c), e.dataset.cursorCanvasY = String(C), e.dataset.caretX = String(c), e.dataset.caretY = String(C), e.dataset.anchorDirection = l,
|
|
840
|
+
!Number.isFinite(c) || !Number.isFinite(C) || (e.dataset.cursorCanvasX = String(c), e.dataset.cursorCanvasY = String(C), e.dataset.caretX = String(c), e.dataset.caretY = String(C), e.dataset.anchorDirection = l, Mn(
|
|
841
841
|
e,
|
|
842
842
|
n,
|
|
843
843
|
t,
|
|
@@ -850,32 +850,32 @@ function za(e, n, t, o, s, i, l) {
|
|
|
850
850
|
}
|
|
851
851
|
function Na(e) {
|
|
852
852
|
const n = document.createElement("div");
|
|
853
|
-
return n.id = e, n.dataset.comparisonTooltip = "true", n.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66))", n.style.border = "1px solid rgba(255, 255, 255, 0.58)", n.style.borderRadius = "10px", n.style.boxShadow = "0 8px 24px rgba(15, 23, 42, 0.18)", n.style.color = "#111827", n.style.left = "0", n.style.opacity = "0",
|
|
853
|
+
return n.id = e, n.dataset.comparisonTooltip = "true", n.style.background = "linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66))", n.style.border = "1px solid rgba(255, 255, 255, 0.58)", n.style.borderRadius = "10px", n.style.boxShadow = "0 8px 24px rgba(15, 23, 42, 0.18)", n.style.color = "#111827", n.style.left = "0", n.style.opacity = "0", Dn(n), n.style.maxWidth = "min(360px, calc(100% - 16px))", n.style.overflow = "hidden", n.style.padding = "8px 10px", n.style.pointerEvents = "none", n.style.position = "absolute", n.style.textAlign = "left", n.style.top = "0", n.style.transform = "none", n.style.willChange = "left, top", n.style.whiteSpace = "normal", n.style.wordBreak = "normal", n.style.overflowWrap = "normal", n.style.zIndex = "10", n;
|
|
854
854
|
}
|
|
855
855
|
function Va(e) {
|
|
856
856
|
e.__onViewportChange && (window.removeEventListener("scroll", e.__onViewportChange, !0), window.removeEventListener("resize", e.__onViewportChange));
|
|
857
857
|
}
|
|
858
858
|
function $a(e) {
|
|
859
|
-
e.__onNavigationChange && (window.removeEventListener(
|
|
859
|
+
e.__onNavigationChange && (window.removeEventListener(Ln, e.__onNavigationChange), window.removeEventListener("popstate", e.__onNavigationChange), window.removeEventListener("hashchange", e.__onNavigationChange), window.removeEventListener("beforeunload", e.__onNavigationChange));
|
|
860
860
|
}
|
|
861
861
|
function Ha(e) {
|
|
862
862
|
e.__disconnectObserver && (e.__disconnectObserver.disconnect(), e.__disconnectObserver = void 0);
|
|
863
863
|
}
|
|
864
|
-
function
|
|
865
|
-
|
|
864
|
+
function Bn(e, n) {
|
|
865
|
+
St(e), po(e), Va(e), $a(e), Ha(e), e.__onDetailsClick && e.removeEventListener("click", e.__onDetailsClick), e.__onTooltipPointerEnter && e.removeEventListener("pointerenter", e.__onTooltipPointerEnter), e.__onTooltipPointerLeave && e.removeEventListener("pointerleave", e.__onTooltipPointerLeave), n && e.__onCanvasPointerEnter && n.removeEventListener("pointerenter", e.__onCanvasPointerEnter), n && e.__onCanvasPointerMove && n.removeEventListener("pointermove", e.__onCanvasPointerMove), n && e.__onCanvasPointerLeave && n.removeEventListener("pointerleave", e.__onCanvasPointerLeave), n && e.__onCanvasClick && n.removeEventListener("click", e.__onCanvasClick), n && e.__onCanvasPointerUp && n.removeEventListener("pointerup", e.__onCanvasPointerUp), e.remove();
|
|
866
866
|
}
|
|
867
867
|
function Wa(e, n, t) {
|
|
868
868
|
e.__onNavigationChange || (pa(), e.__onNavigationChange = () => {
|
|
869
869
|
if (!t.isConnected) {
|
|
870
|
-
|
|
870
|
+
Bn(e, t);
|
|
871
871
|
return;
|
|
872
872
|
}
|
|
873
|
-
|
|
874
|
-
}, window.addEventListener(
|
|
873
|
+
qe(e, n, !0);
|
|
874
|
+
}, window.addEventListener(Ln, e.__onNavigationChange), window.addEventListener("popstate", e.__onNavigationChange), window.addEventListener("hashchange", e.__onNavigationChange), window.addEventListener("beforeunload", e.__onNavigationChange));
|
|
875
875
|
}
|
|
876
876
|
function Ea(e, n) {
|
|
877
877
|
e.__disconnectObserver || document.body && (e.__disconnectObserver = new MutationObserver(() => {
|
|
878
|
-
n.isConnected ||
|
|
878
|
+
n.isConnected || Bn(e, n);
|
|
879
879
|
}), e.__disconnectObserver.observe(document.body, {
|
|
880
880
|
childList: !0,
|
|
881
881
|
subtree: !0
|
|
@@ -885,10 +885,10 @@ function Oa(e, n, t) {
|
|
|
885
885
|
Array.from(
|
|
886
886
|
e.querySelectorAll('[data-comparison-tooltip="true"]')
|
|
887
887
|
).forEach((s) => {
|
|
888
|
-
s.id !== n &&
|
|
888
|
+
s.id !== n && Bn(s, t);
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function St(e) {
|
|
892
892
|
typeof e.__hideTimeoutId == "number" && (window.clearTimeout(e.__hideTimeoutId), e.__hideTimeoutId = void 0);
|
|
893
893
|
}
|
|
894
894
|
function po(e) {
|
|
@@ -903,7 +903,7 @@ function Xn(e, n, t, o, s) {
|
|
|
903
903
|
const i = e.__pendingCursorClientX, l = e.__pendingCursorClientY;
|
|
904
904
|
if (e.__pendingCursorClientX = void 0, e.__pendingCursorClientY = void 0, !Number.isFinite(i) || !Number.isFinite(l))
|
|
905
905
|
return;
|
|
906
|
-
const h =
|
|
906
|
+
const h = In(n);
|
|
907
907
|
e.parentElement !== h && h.appendChild(e), za(
|
|
908
908
|
e,
|
|
909
909
|
n,
|
|
@@ -915,18 +915,18 @@ function Xn(e, n, t, o, s) {
|
|
|
915
915
|
);
|
|
916
916
|
}));
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
918
|
+
function qe(e, n, t = !1) {
|
|
919
|
+
xt(e) && !t || (St(e), po(e), uo(e, !1), e.__pendingCursorClientX = void 0, e.__pendingCursorClientY = void 0, e.__detailsPayload = void 0, e.__lastLeftPx = void 0, e.__lastTopPx = void 0, delete e.dataset.cursorCanvasX, delete e.dataset.cursorCanvasY, e.__isTooltipHovered = !1, e.style.pointerEvents = "none", e.style.opacity = "0", tn(n));
|
|
920
920
|
}
|
|
921
921
|
function Yn(e, n, t = ma) {
|
|
922
|
-
e.__isTooltipHovered || (
|
|
923
|
-
e.__isTooltipHovered ||
|
|
922
|
+
e.__isTooltipHovered || (St(e), e.__hideTimeoutId = window.setTimeout(() => {
|
|
923
|
+
e.__isTooltipHovered || qe(e, n);
|
|
924
924
|
}, t));
|
|
925
925
|
}
|
|
926
926
|
function Ka(e, n, t, o, s) {
|
|
927
927
|
const { maxTooltipItems: i } = co(s);
|
|
928
928
|
e.__onCanvasPointerEnter || (e.__onCanvasPointerEnter = (l) => {
|
|
929
|
-
if (!(
|
|
929
|
+
if (!(Ct() && xt(e)) && (Xn(
|
|
930
930
|
e,
|
|
931
931
|
n,
|
|
932
932
|
o,
|
|
@@ -941,7 +941,7 @@ function Ka(e, n, t, o, s) {
|
|
|
941
941
|
}, n.addEventListener("pointerenter", e.__onCanvasPointerEnter, {
|
|
942
942
|
passive: !0
|
|
943
943
|
})), e.__onCanvasPointerMove || (e.__onCanvasPointerMove = (l) => {
|
|
944
|
-
|
|
944
|
+
Ct() && xt(e) || Xn(
|
|
945
945
|
e,
|
|
946
946
|
n,
|
|
947
947
|
o,
|
|
@@ -951,11 +951,11 @@ function Ka(e, n, t, o, s) {
|
|
|
951
951
|
}, n.addEventListener("pointermove", e.__onCanvasPointerMove, {
|
|
952
952
|
passive: !0
|
|
953
953
|
})), e.__onCanvasPointerLeave || (e.__onCanvasPointerLeave = () => {
|
|
954
|
-
|
|
954
|
+
Ct() && xt(e) || qe(e, t);
|
|
955
955
|
}, n.addEventListener("pointerleave", e.__onCanvasPointerLeave, {
|
|
956
956
|
passive: !0
|
|
957
957
|
})), e.__onCanvasClick || (e.__onCanvasClick = (l) => {
|
|
958
|
-
var
|
|
958
|
+
var T, B;
|
|
959
959
|
if (!(s != null && s.onViewFullDetails) || !e.__detailsPayload || e.style.opacity !== "1")
|
|
960
960
|
return;
|
|
961
961
|
const h = (v) => {
|
|
@@ -964,18 +964,18 @@ function Ka(e, n, t, o, s) {
|
|
|
964
964
|
return !1;
|
|
965
965
|
const f = (A = v.find(
|
|
966
966
|
(W) => typeof W.dataIndex == "number"
|
|
967
|
-
)) == null ? void 0 : A.dataIndex,
|
|
967
|
+
)) == null ? void 0 : A.dataIndex, k = ((w = t == null ? void 0 : t.data) == null ? void 0 : w.datasets) ?? [], L = (u = t == null ? void 0 : t.config) == null ? void 0 : u.type, x = fo(
|
|
968
968
|
v,
|
|
969
969
|
o,
|
|
970
970
|
(s == null ? void 0 : s.viewFullDetailsLabel) ?? io(),
|
|
971
971
|
i,
|
|
972
972
|
!0,
|
|
973
|
-
|
|
973
|
+
k,
|
|
974
974
|
f,
|
|
975
|
-
|
|
975
|
+
L
|
|
976
976
|
).detailsPayload;
|
|
977
|
-
return (M = s.onViewFullDetails) == null || M.call(s, x, t),
|
|
978
|
-
}, c = ((
|
|
977
|
+
return (M = s.onViewFullDetails) == null || M.call(s, x, t), qe(e, t), !0;
|
|
978
|
+
}, c = ((T = t == null ? void 0 : t.tooltip) == null ? void 0 : T.dataPoints) ?? [];
|
|
979
979
|
if (h(c))
|
|
980
980
|
return;
|
|
981
981
|
const C = t == null ? void 0 : t.getElementsAtEventForMode;
|
|
@@ -1011,7 +1011,7 @@ function Ka(e, n, t, o, s) {
|
|
|
1011
1011
|
const I = ((B = t == null ? void 0 : t.tooltip) == null ? void 0 : B.dataPoints) ?? [];
|
|
1012
1012
|
h(I);
|
|
1013
1013
|
}, n.addEventListener("click", e.__onCanvasClick)), e.__onCanvasPointerUp || (e.__onCanvasPointerUp = (l) => {
|
|
1014
|
-
if (
|
|
1014
|
+
if (Ct()) {
|
|
1015
1015
|
const h = t == null ? void 0 : t.getElementsAtEventForMode, c = t == null ? void 0 : t.tooltip;
|
|
1016
1016
|
if (typeof h != "function" || typeof (c == null ? void 0 : c.setActiveElements) != "function")
|
|
1017
1017
|
return;
|
|
@@ -1032,10 +1032,10 @@ function Ka(e, n, t, o, s) {
|
|
|
1032
1032
|
index: y.index
|
|
1033
1033
|
}));
|
|
1034
1034
|
if (F.length === 0) {
|
|
1035
|
-
|
|
1035
|
+
qe(e, t, !0);
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
|
-
uo(e, !0),
|
|
1038
|
+
uo(e, !0), St(e), e.dataset.cursorCanvasX = String(l.offsetX), e.dataset.cursorCanvasY = String(l.offsetY), e.dataset.caretX = String(l.offsetX), e.dataset.caretY = String(l.offsetY), c.setActiveElements(F, {
|
|
1039
1039
|
x: l.offsetX,
|
|
1040
1040
|
y: l.offsetY
|
|
1041
1041
|
});
|
|
@@ -1050,11 +1050,11 @@ function Ka(e, n, t, o, s) {
|
|
|
1050
1050
|
}, n.addEventListener("pointerup", e.__onCanvasPointerUp)), s != null && s.onViewFullDetails && (e.__onDetailsClick || (e.__onDetailsClick = (l) => {
|
|
1051
1051
|
var C;
|
|
1052
1052
|
const h = l.target;
|
|
1053
|
-
h != null && h.closest('[data-tooltip-full-details="true"]') && (l.preventDefault(), l.stopPropagation(), e.__detailsPayload && ((C = s.onViewFullDetails) == null || C.call(s, e.__detailsPayload, t),
|
|
1053
|
+
h != null && h.closest('[data-tooltip-full-details="true"]') && (l.preventDefault(), l.stopPropagation(), e.__detailsPayload && ((C = s.onViewFullDetails) == null || C.call(s, e.__detailsPayload, t), qe(e, t)));
|
|
1054
1054
|
}, e.addEventListener("click", e.__onDetailsClick)), e.__onTooltipPointerEnter || (e.__onTooltipPointerEnter = () => {
|
|
1055
|
-
e.__isTooltipHovered = !0,
|
|
1055
|
+
e.__isTooltipHovered = !0, St(e);
|
|
1056
1056
|
}, e.addEventListener("pointerenter", e.__onTooltipPointerEnter)), e.__onTooltipPointerLeave || (e.__onTooltipPointerLeave = () => {
|
|
1057
|
-
e.__isTooltipHovered = !1,
|
|
1057
|
+
e.__isTooltipHovered = !1, qe(e, t);
|
|
1058
1058
|
}, e.addEventListener("pointerleave", e.__onTooltipPointerLeave)));
|
|
1059
1059
|
}
|
|
1060
1060
|
function qa(e, n, t) {
|
|
@@ -1066,8 +1066,8 @@ function qa(e, n, t) {
|
|
|
1066
1066
|
e.style.opacity = "0";
|
|
1067
1067
|
return;
|
|
1068
1068
|
}
|
|
1069
|
-
const l =
|
|
1070
|
-
e.parentElement !== l && l.appendChild(e),
|
|
1069
|
+
const l = In(n);
|
|
1070
|
+
e.parentElement !== l && l.appendChild(e), Dn(e, l), Mn(
|
|
1071
1071
|
e,
|
|
1072
1072
|
n,
|
|
1073
1073
|
l,
|
|
@@ -1087,31 +1087,31 @@ function qa(e, n, t) {
|
|
|
1087
1087
|
function Xa(e, n) {
|
|
1088
1088
|
const { maxTooltipItems: t } = co(n);
|
|
1089
1089
|
return ({ chart: o, tooltip: s }) => {
|
|
1090
|
-
var
|
|
1090
|
+
var q, ee, G, ie;
|
|
1091
1091
|
if (typeof document > "u" || typeof window > "u")
|
|
1092
1092
|
return;
|
|
1093
1093
|
const i = o == null ? void 0 : o.canvas;
|
|
1094
1094
|
if (!(i instanceof HTMLCanvasElement))
|
|
1095
1095
|
return;
|
|
1096
|
-
const l =
|
|
1096
|
+
const l = In(i), h = `comparison-tooltip-${String(o.id)}`;
|
|
1097
1097
|
Oa(l, h, i);
|
|
1098
1098
|
let c = document.querySelector(`#${h}`);
|
|
1099
|
-
if (c || (c = Na(h)), c.parentElement !== l && l.appendChild(c),
|
|
1100
|
-
if (
|
|
1099
|
+
if (c || (c = Na(h)), c.parentElement !== l && l.appendChild(c), Dn(c, l), qa(c, i, e), Wa(c, o, i), Ea(c, i), Ka(c, i, o, e, n), ((s == null ? void 0 : s.opacity) ?? 0) === 0) {
|
|
1100
|
+
if (Ct() && xt(c))
|
|
1101
1101
|
return;
|
|
1102
|
-
n != null && n.onViewFullDetails ? Yn(c, o) :
|
|
1102
|
+
n != null && n.onViewFullDetails ? Yn(c, o) : qe(c, o);
|
|
1103
1103
|
return;
|
|
1104
1104
|
}
|
|
1105
1105
|
const C = (s == null ? void 0 : s.dataPoints) ?? [];
|
|
1106
1106
|
if (C.length === 0) {
|
|
1107
|
-
if (
|
|
1107
|
+
if (Ct() && xt(c))
|
|
1108
1108
|
return;
|
|
1109
|
-
n != null && n.onViewFullDetails ? Yn(c, o) :
|
|
1109
|
+
n != null && n.onViewFullDetails ? Yn(c, o) : qe(c, o);
|
|
1110
1110
|
return;
|
|
1111
1111
|
}
|
|
1112
|
-
|
|
1113
|
-
const N = (n == null ? void 0 : n.viewFullDetailsLabel) ?? io(), $ = !!(n != null && n.onViewFullDetails), F = (
|
|
1114
|
-
markup: { detailsPayload: I, hasCollapsedValues:
|
|
1112
|
+
St(c);
|
|
1113
|
+
const N = (n == null ? void 0 : n.viewFullDetailsLabel) ?? io(), $ = !!(n != null && n.onViewFullDetails), F = (q = C.find((J) => typeof J.dataIndex == "number")) == null ? void 0 : q.dataIndex, y = ((ee = o == null ? void 0 : o.data) == null ? void 0 : ee.datasets) ?? [], g = (G = o == null ? void 0 : o.config) == null ? void 0 : G.type, {
|
|
1114
|
+
markup: { detailsPayload: I, hasCollapsedValues: T }
|
|
1115
1115
|
} = Ba(
|
|
1116
1116
|
c,
|
|
1117
1117
|
C,
|
|
@@ -1122,14 +1122,14 @@ function Xa(e, n) {
|
|
|
1122
1122
|
y,
|
|
1123
1123
|
F,
|
|
1124
1124
|
g
|
|
1125
|
-
), B = $ &&
|
|
1125
|
+
), B = $ && T;
|
|
1126
1126
|
c.__detailsPayload = B ? I : void 0, c.style.pointerEvents = B ? "auto" : "none";
|
|
1127
|
-
const v = typeof (s == null ? void 0 : s.caretX) == "number" ? s.caretX : 0, f = Number(c.dataset.cursorCanvasX),
|
|
1128
|
-
if (!(Number.isFinite(f) && Number.isFinite(
|
|
1127
|
+
const v = typeof (s == null ? void 0 : s.caretX) == "number" ? s.caretX : 0, f = Number(c.dataset.cursorCanvasX), k = Number(c.dataset.cursorCanvasY);
|
|
1128
|
+
if (!(Number.isFinite(f) && Number.isFinite(k))) {
|
|
1129
1129
|
c.style.opacity = "0";
|
|
1130
1130
|
return;
|
|
1131
1131
|
}
|
|
1132
|
-
const x = (
|
|
1132
|
+
const x = (ie = o == null ? void 0 : o.scales) == null ? void 0 : ie.x, A = x && typeof x.getPixelForValue == "function" ? x.getPixelForValue(0) : NaN, w = e ? C.reduce((J, _) => {
|
|
1133
1133
|
const E = _ == null ? void 0 : _.element, z = E == null ? void 0 : E.x;
|
|
1134
1134
|
if (typeof z != "number" || !Number.isFinite(z))
|
|
1135
1135
|
return J;
|
|
@@ -1137,8 +1137,8 @@ function Xa(e, n) {
|
|
|
1137
1137
|
return z;
|
|
1138
1138
|
const R = Number.isFinite(A) ? A : v, P = Math.abs(J - R);
|
|
1139
1139
|
return Math.abs(z - R) > P ? z : J;
|
|
1140
|
-
}, Number.NaN) : Number.NaN, u = f, M =
|
|
1141
|
-
|
|
1140
|
+
}, Number.NaN) : Number.NaN, u = f, M = k, W = e ? Number.isFinite(A) && Number.isFinite(w) && w < A ? "left" : "right" : "center";
|
|
1141
|
+
Mn(
|
|
1142
1142
|
c,
|
|
1143
1143
|
i,
|
|
1144
1144
|
l,
|
|
@@ -1150,23 +1150,23 @@ function Xa(e, n) {
|
|
|
1150
1150
|
), c.dataset.caretX = String(u), c.dataset.caretY = String(M), c.dataset.anchorDirection = W, c.style.opacity = "1";
|
|
1151
1151
|
};
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1153
|
+
function Lt(e = !1, n) {
|
|
1154
1154
|
return {
|
|
1155
1155
|
...so(e ? "y" : "x"),
|
|
1156
1156
|
enabled: !1,
|
|
1157
1157
|
external: Xa(e, n)
|
|
1158
1158
|
};
|
|
1159
1159
|
}
|
|
1160
|
-
function
|
|
1160
|
+
function Dt(e) {
|
|
1161
1161
|
function o(y, g, I) {
|
|
1162
1162
|
if (y.measureText(g).width <= I) return g;
|
|
1163
|
-
const
|
|
1163
|
+
const T = "…";
|
|
1164
1164
|
let B = 0, v = g.length;
|
|
1165
1165
|
for (; B < v; ) {
|
|
1166
|
-
const f = Math.floor((B + v) / 2),
|
|
1167
|
-
y.measureText(
|
|
1166
|
+
const f = Math.floor((B + v) / 2), k = g.slice(0, f) + T;
|
|
1167
|
+
y.measureText(k).width <= I ? B = f + 1 : v = f;
|
|
1168
1168
|
}
|
|
1169
|
-
return g.slice(0, B - 1) +
|
|
1169
|
+
return g.slice(0, B - 1) + T;
|
|
1170
1170
|
}
|
|
1171
1171
|
function s(y) {
|
|
1172
1172
|
const g = y == null ? "" : String(y), [I] = g.split("#");
|
|
@@ -1201,13 +1201,13 @@ function Tt(e) {
|
|
|
1201
1201
|
callback: function(y) {
|
|
1202
1202
|
if ((e == null ? void 0 : e.isTransposed) === !0) return s(y);
|
|
1203
1203
|
let I = String(y);
|
|
1204
|
-
const
|
|
1205
|
-
|
|
1206
|
-
const B =
|
|
1204
|
+
const T = this;
|
|
1205
|
+
T && typeof T.getLabelForValue == "function" && (I = T.getLabelForValue(y)), I = s(I);
|
|
1206
|
+
const B = T == null ? void 0 : T.chart, v = T == null ? void 0 : T.ctx, f = B.height * 0.25;
|
|
1207
1207
|
if (v && f > 0) {
|
|
1208
1208
|
v.save();
|
|
1209
|
-
const
|
|
1210
|
-
return v.restore(),
|
|
1209
|
+
const L = v.measureText(I).width > f ? o(v, I, f) : I;
|
|
1210
|
+
return v.restore(), L;
|
|
1211
1211
|
}
|
|
1212
1212
|
return I;
|
|
1213
1213
|
},
|
|
@@ -1225,8 +1225,8 @@ function Tt(e) {
|
|
|
1225
1225
|
afterBuildTicks: (y) => {
|
|
1226
1226
|
const g = Array.isArray(y == null ? void 0 : y.ticks) ? y.ticks : [];
|
|
1227
1227
|
if (g.length === 0) return;
|
|
1228
|
-
const I = s(y.getLabelForValue(g[0].value)),
|
|
1229
|
-
y.options.ticks.minRotation =
|
|
1228
|
+
const I = s(y.getLabelForValue(g[0].value)), T = !isNaN(Number(I));
|
|
1229
|
+
y.options.ticks.minRotation = T || g.length < 10 ? 0 : 90;
|
|
1230
1230
|
},
|
|
1231
1231
|
afterFit: (y) => {
|
|
1232
1232
|
if (!(e != null && e.isTransposed)) {
|
|
@@ -1249,13 +1249,13 @@ function Tt(e) {
|
|
|
1249
1249
|
callback: function(y) {
|
|
1250
1250
|
if (!((e == null ? void 0 : e.isTransposed) === !0)) return s(y);
|
|
1251
1251
|
let I = String(y);
|
|
1252
|
-
const
|
|
1253
|
-
|
|
1254
|
-
const B =
|
|
1252
|
+
const T = this;
|
|
1253
|
+
T && typeof T.getLabelForValue == "function" && (I = T.getLabelForValue(y)), I = s(I);
|
|
1254
|
+
const B = T == null ? void 0 : T.chart, v = T == null ? void 0 : T.ctx, f = B.width * 0.4;
|
|
1255
1255
|
if (v && f > 0) {
|
|
1256
1256
|
v.save();
|
|
1257
|
-
const
|
|
1258
|
-
return v.restore(),
|
|
1257
|
+
const L = v.measureText(I).width > f ? o(v, I, f) : I;
|
|
1258
|
+
return v.restore(), L;
|
|
1259
1259
|
}
|
|
1260
1260
|
return I;
|
|
1261
1261
|
}
|
|
@@ -1280,22 +1280,22 @@ function Tt(e) {
|
|
|
1280
1280
|
size: e.legendFontSize
|
|
1281
1281
|
},
|
|
1282
1282
|
generateLabels: (y) => {
|
|
1283
|
-
var
|
|
1284
|
-
const g = e.legendColor ?? "#6b6b6b", I = ((
|
|
1283
|
+
var T;
|
|
1284
|
+
const g = e.legendColor ?? "#6b6b6b", I = ((T = y == null ? void 0 : y.data) == null ? void 0 : T.datasets) || [];
|
|
1285
1285
|
if (I.length === 0) return [];
|
|
1286
1286
|
if (I.length === 1 && Array.isArray(I[0].backgroundColor) && I[0].backgroundColor.length > 1 && Array.isArray(I[0].data)) {
|
|
1287
1287
|
const B = I[0];
|
|
1288
|
-
return y.data.labels.map((f,
|
|
1289
|
-
const
|
|
1288
|
+
return y.data.labels.map((f, k) => {
|
|
1289
|
+
const L = B.backgroundColor[k];
|
|
1290
1290
|
return {
|
|
1291
1291
|
text: f,
|
|
1292
1292
|
fontColor: g,
|
|
1293
1293
|
color: g,
|
|
1294
|
-
fillStyle:
|
|
1295
|
-
strokeStyle:
|
|
1294
|
+
fillStyle: L,
|
|
1295
|
+
strokeStyle: L,
|
|
1296
1296
|
datasetIndex: 0,
|
|
1297
|
-
index:
|
|
1298
|
-
hidden: y.getDataVisibility ? !y.getDataVisibility(
|
|
1297
|
+
index: k,
|
|
1298
|
+
hidden: y.getDataVisibility ? !y.getDataVisibility(k) : !1
|
|
1299
1299
|
};
|
|
1300
1300
|
});
|
|
1301
1301
|
}
|
|
@@ -1322,7 +1322,7 @@ const Ya = {
|
|
|
1322
1322
|
}, Ga = ["aria-label"], ja = { class: "relative z-20 flex shrink-0 items-center bg-fm-color-neutral-white justify-between sm:px-5" }, Ja = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary min-w-0 flex-1 pr-3" }, Za = { class: "flex items-center gap-1.5" }, Qa = {
|
|
1323
1323
|
key: 0,
|
|
1324
1324
|
class: "pb-2 fm-typo-en-body-lg-600 text-fm-color-typo-primary"
|
|
1325
|
-
}, er = ["onMouseenter", "onFocus"], tr = { class: "min-w-0 flex flex-1 items-center gap-2.5 pr-2" }, nr = { class: "min-w-0 break-all text-fm-color-typo-secondary" }, or = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-secondary shrink-0 text-right tabular-nums" }, Gn = 500, ar = 320,
|
|
1325
|
+
}, er = ["onMouseenter", "onFocus"], tr = { class: "min-w-0 flex flex-1 items-center gap-2.5 pr-2" }, nr = { class: "min-w-0 break-all text-fm-color-typo-secondary" }, or = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-secondary shrink-0 text-right tabular-nums" }, Gn = 500, ar = 320, Ht = /* @__PURE__ */ Ne({
|
|
1326
1326
|
__name: "TooltipDetailSidesheet",
|
|
1327
1327
|
props: {
|
|
1328
1328
|
modelValue: { type: Boolean },
|
|
@@ -1330,7 +1330,7 @@ const Ya = {
|
|
|
1330
1330
|
},
|
|
1331
1331
|
emits: ["update:modelValue", "value-hover", "value-leave"],
|
|
1332
1332
|
setup(e, { emit: n }) {
|
|
1333
|
-
const t = e, o = n, { t: s } =
|
|
1333
|
+
const t = e, o = n, { t: s } = ut(), i = D(null), l = D(Gn), h = D(!1), c = m({
|
|
1334
1334
|
get: () => t.modelValue,
|
|
1335
1335
|
set: (u) => o("update:modelValue", u)
|
|
1336
1336
|
}), C = m(() => {
|
|
@@ -1356,37 +1356,37 @@ const Ya = {
|
|
|
1356
1356
|
function I() {
|
|
1357
1357
|
g(), c.value = !1;
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1359
|
+
function T() {
|
|
1360
1360
|
return typeof window > "u" ? Gn : Math.floor(window.innerWidth * 0.94);
|
|
1361
1361
|
}
|
|
1362
1362
|
function B(u) {
|
|
1363
|
-
const M =
|
|
1363
|
+
const M = T(), W = Math.min(ar, M);
|
|
1364
1364
|
return Math.min(M, Math.max(W, Math.floor(u)));
|
|
1365
1365
|
}
|
|
1366
1366
|
function v(u) {
|
|
1367
1367
|
typeof window > "u" || (l.value = B(window.innerWidth - u));
|
|
1368
1368
|
}
|
|
1369
1369
|
function f() {
|
|
1370
|
-
h.value = !1, document.removeEventListener("pointermove",
|
|
1370
|
+
h.value = !1, document.removeEventListener("pointermove", k), document.removeEventListener("pointerup", f), document.removeEventListener("pointercancel", f);
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1372
|
+
function k(u) {
|
|
1373
1373
|
h.value && v(u.clientX);
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
c.value && (h.value = !0, v(u.clientX), document.addEventListener("pointermove",
|
|
1375
|
+
function L(u) {
|
|
1376
|
+
c.value && (h.value = !0, v(u.clientX), document.addEventListener("pointermove", k), document.addEventListener("pointerup", f), document.addEventListener("pointercancel", f));
|
|
1377
1377
|
}
|
|
1378
1378
|
function x() {
|
|
1379
1379
|
l.value = B(l.value);
|
|
1380
1380
|
}
|
|
1381
1381
|
function A(u) {
|
|
1382
|
-
var
|
|
1382
|
+
var q;
|
|
1383
1383
|
if (!c.value)
|
|
1384
1384
|
return;
|
|
1385
1385
|
const M = u.target;
|
|
1386
1386
|
if (!(M instanceof Node))
|
|
1387
1387
|
return;
|
|
1388
1388
|
const W = M instanceof Element ? M : null;
|
|
1389
|
-
W != null && W.closest('[data-tooltip-full-details="true"]') || (
|
|
1389
|
+
W != null && W.closest('[data-tooltip-full-details="true"]') || (q = i.value) != null && q.contains(M) || I();
|
|
1390
1390
|
}
|
|
1391
1391
|
function w(u) {
|
|
1392
1392
|
c.value && u.key === "Escape" && I();
|
|
@@ -1396,8 +1396,8 @@ const Ya = {
|
|
|
1396
1396
|
}), Qn(() => {
|
|
1397
1397
|
f(), document.removeEventListener("pointerdown", A, !0), document.removeEventListener("keydown", w), window.removeEventListener("resize", x);
|
|
1398
1398
|
}), (u, M) => {
|
|
1399
|
-
const W =
|
|
1400
|
-
return Y(),
|
|
1399
|
+
const W = pe("FmButton");
|
|
1400
|
+
return Y(), ge(Io, {
|
|
1401
1401
|
"enter-active-class": "transform transition duration-200 ease-out",
|
|
1402
1402
|
"enter-from-class": "translate-x-full opacity-0",
|
|
1403
1403
|
"enter-to-class": "translate-x-0 opacity-100",
|
|
@@ -1405,25 +1405,25 @@ const Ya = {
|
|
|
1405
1405
|
"leave-from-class": "translate-x-0 opacity-100",
|
|
1406
1406
|
"leave-to-class": "translate-x-full opacity-0"
|
|
1407
1407
|
}, {
|
|
1408
|
-
default:
|
|
1409
|
-
c.value ? (Y(),
|
|
1410
|
-
|
|
1408
|
+
default: Le(() => [
|
|
1409
|
+
c.value ? (Y(), fe("div", Ya, [
|
|
1410
|
+
Q("div", {
|
|
1411
1411
|
ref_key: "panelRef",
|
|
1412
1412
|
ref: i,
|
|
1413
1413
|
class: "glassmorphism pointer-events-auto relative ml-auto flex h-full flex-col px-24 py-3 overflow-hidden rounded-l-2xl border border-fm-color-border-secondary bg-fm-color-neutral-white duration-200 ease-out",
|
|
1414
|
-
style:
|
|
1414
|
+
style: De(N.value),
|
|
1415
1415
|
role: "dialog",
|
|
1416
1416
|
"aria-modal": "false",
|
|
1417
1417
|
"aria-label": r(s)("report.widget.comparisonTooltip.fullBreakdownTitle")
|
|
1418
1418
|
}, [
|
|
1419
|
-
|
|
1419
|
+
Q("div", {
|
|
1420
1420
|
class: "absolute left-0 top-0 z-40 h-full w-3 -translate-x-1/2 cursor-ew-resize",
|
|
1421
|
-
onPointerdown:
|
|
1421
|
+
onPointerdown: en(L, ["prevent"])
|
|
1422
1422
|
}, null, 32),
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1423
|
+
Q("div", ja, [
|
|
1424
|
+
Q("div", Ja, Pe(r(s)("report.widget.comparisonTooltip.fullBreakdownTitle")), 1),
|
|
1425
|
+
Q("div", Za, [
|
|
1426
|
+
he(W, {
|
|
1427
1427
|
class: "relative z-30 h-9 w-9 shrink-0",
|
|
1428
1428
|
variant: "tertiary",
|
|
1429
1429
|
icon: "close",
|
|
@@ -1432,17 +1432,17 @@ const Ya = {
|
|
|
1432
1432
|
}, null, 8, ["aria-label"])
|
|
1433
1433
|
])
|
|
1434
1434
|
]),
|
|
1435
|
-
|
|
1435
|
+
Q("div", {
|
|
1436
1436
|
class: "flex flex-1 flex-col gap-4 overflow-y-auto px-4 py-4 sm:px-5",
|
|
1437
1437
|
onMouseleave: g
|
|
1438
1438
|
}, [
|
|
1439
|
-
(Y(!0),
|
|
1440
|
-
key: `${
|
|
1439
|
+
(Y(!0), fe(Ve, null, zt(C.value, (q, ee) => (Y(), fe("div", {
|
|
1440
|
+
key: `${q.title || "section"}-${ee}`,
|
|
1441
1441
|
class: "flex flex-col gap-2 rounded-2xl bg-fm-color-neutral-white/45 py-3"
|
|
1442
1442
|
}, [
|
|
1443
|
-
|
|
1444
|
-
(Y(!0),
|
|
1445
|
-
key: `${G.text}-${
|
|
1443
|
+
q.title ? (Y(), fe("p", Qa, Pe(q.title), 1)) : be("", !0),
|
|
1444
|
+
(Y(!0), fe(Ve, null, zt(q.values, (G, ie) => (Y(), fe("button", {
|
|
1445
|
+
key: `${G.text}-${ie}`,
|
|
1446
1446
|
type: "button",
|
|
1447
1447
|
class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary flex w-full items-start justify-between gap-3 bg-transparent px-2 py-1.5 text-left transition-colors hover:bg-fm-color-opacity-sm focus-visible:bg-fm-color-opacity-sm focus-visible:outline-none",
|
|
1448
1448
|
onMouseenter: (J) => y(G),
|
|
@@ -1450,44 +1450,44 @@ const Ya = {
|
|
|
1450
1450
|
onMouseleave: g,
|
|
1451
1451
|
onBlur: g
|
|
1452
1452
|
}, [
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
class:
|
|
1453
|
+
Q("span", tr, [
|
|
1454
|
+
Q("span", {
|
|
1455
|
+
class: Ie([
|
|
1456
1456
|
"inline-block h-3 w-3 shrink-0 box-border",
|
|
1457
1457
|
G.isBar ? "rounded-sm border border-fm-color-neutral-gray-400" : "rounded-full border border-white shadow-[0_0_0_1px_rgba(17,24,39,0.28)]"
|
|
1458
1458
|
]),
|
|
1459
|
-
style:
|
|
1459
|
+
style: De({ backgroundColor: G.color })
|
|
1460
1460
|
}, null, 6),
|
|
1461
|
-
|
|
1461
|
+
Q("span", nr, Pe(F(G)), 1)
|
|
1462
1462
|
]),
|
|
1463
|
-
|
|
1463
|
+
Q("span", or, Pe($(G)), 1)
|
|
1464
1464
|
], 40, er))), 128))
|
|
1465
1465
|
]))), 128))
|
|
1466
1466
|
], 32)
|
|
1467
1467
|
], 12, Ga)
|
|
1468
|
-
])) :
|
|
1468
|
+
])) : be("", !0)
|
|
1469
1469
|
]),
|
|
1470
1470
|
_: 1
|
|
1471
1471
|
});
|
|
1472
1472
|
};
|
|
1473
1473
|
}
|
|
1474
1474
|
});
|
|
1475
|
-
function
|
|
1476
|
-
const { t } =
|
|
1475
|
+
function Wt(e, n) {
|
|
1476
|
+
const { t } = ut(), o = D(!1), s = D(null), i = D(null);
|
|
1477
1477
|
function l() {
|
|
1478
1478
|
return ho(e.value) ?? i.value;
|
|
1479
1479
|
}
|
|
1480
1480
|
function h(F) {
|
|
1481
|
-
o.value = F, !F && (s.value = null,
|
|
1481
|
+
o.value = F, !F && (s.value = null, tn(l()), i.value = null);
|
|
1482
1482
|
}
|
|
1483
1483
|
function c(F, y) {
|
|
1484
1484
|
s.value = F, i.value = y ?? l(), o.value = !0;
|
|
1485
1485
|
}
|
|
1486
1486
|
function C(F) {
|
|
1487
|
-
|
|
1487
|
+
tn(l(), F.focusTarget);
|
|
1488
1488
|
}
|
|
1489
1489
|
function N() {
|
|
1490
|
-
|
|
1490
|
+
tn(l());
|
|
1491
1491
|
}
|
|
1492
1492
|
const $ = m(() => ({
|
|
1493
1493
|
viewFullDetailsLabel: t("report.widget.comparisonTooltip.viewBreakdown"),
|
|
@@ -1531,27 +1531,29 @@ const rr = {
|
|
|
1531
1531
|
},
|
|
1532
1532
|
emits: ["toggleDatasetVisibility", "toggleDataPointVisibility"],
|
|
1533
1533
|
setup(e, { emit: n }) {
|
|
1534
|
-
const t = e, o = n, { t: s } =
|
|
1534
|
+
const t = e, o = n, { t: s } = ut(), i = D([]), l = D(0), h = D(!1), c = D(!1), C = D(0), N = D(null), $ = D(null), F = D(null), y = D(null), g = D(!1), I = D(0), T = D(0), B = D(!1), v = D(0), f = D(0), k = m(() => t.enabled !== !1), L = m(() => t.position === "left" || t.position === "right");
|
|
1535
1535
|
let x = null;
|
|
1536
1536
|
const A = m(
|
|
1537
1537
|
() => h.value && c.value && g.value
|
|
1538
1538
|
), w = m(() => ({
|
|
1539
1539
|
height: `${Math.max(0, I.value)}px`,
|
|
1540
|
-
transform: `translateY(${Math.max(0,
|
|
1540
|
+
transform: `translateY(${Math.max(0, T.value)}px)`
|
|
1541
1541
|
})), u = m(() => typeof t.textColor == "string" && t.textColor.trim().length > 0 ? t.textColor : "#6b6b6b"), M = m(() => typeof t.fontSize == "number" && Number.isFinite(t.fontSize) && t.fontSize > 0 ? t.fontSize : 12);
|
|
1542
1542
|
function W(a) {
|
|
1543
|
-
|
|
1543
|
+
q({ height: a, width: 0 });
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function q({ height: a, width: p }) {
|
|
1546
1546
|
var b;
|
|
1547
1547
|
const d = (b = t.chartRef) == null ? void 0 : b.$el;
|
|
1548
1548
|
d instanceof HTMLElement && (d.style.setProperty("--legend-panel-height", `${Math.max(0, Math.floor(a))}px`), d.style.setProperty("--legend-panel-width", `${Math.max(0, Math.floor(p))}px`));
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function ee() {
|
|
1551
1551
|
x != null && (window.clearTimeout(x), x = null);
|
|
1552
1552
|
}
|
|
1553
1553
|
function G() {
|
|
1554
|
-
const a = ho(
|
|
1554
|
+
const a = ho(
|
|
1555
|
+
t.chartRef
|
|
1556
|
+
);
|
|
1555
1557
|
if (a)
|
|
1556
1558
|
return a;
|
|
1557
1559
|
const p = N.value, d = [p == null ? void 0 : p.parentElement, p == null ? void 0 : p.closest(".h-full"), p];
|
|
@@ -1561,40 +1563,40 @@ const rr = {
|
|
|
1561
1563
|
const H = b.querySelector("canvas");
|
|
1562
1564
|
if (!(H instanceof HTMLCanvasElement))
|
|
1563
1565
|
continue;
|
|
1564
|
-
const
|
|
1565
|
-
if (
|
|
1566
|
-
return
|
|
1566
|
+
const U = pn.getChart(H);
|
|
1567
|
+
if (U)
|
|
1568
|
+
return U;
|
|
1567
1569
|
}
|
|
1568
1570
|
return null;
|
|
1569
1571
|
}
|
|
1570
|
-
function
|
|
1572
|
+
function ie() {
|
|
1571
1573
|
J();
|
|
1572
1574
|
}
|
|
1573
1575
|
function J() {
|
|
1574
1576
|
var b;
|
|
1575
1577
|
const a = (b = N.value) == null ? void 0 : b.getBoundingClientRect(), p = Number((a == null ? void 0 : a.height) ?? 0), d = Number((a == null ? void 0 : a.width) ?? 0);
|
|
1576
1578
|
if (Number.isFinite(p) && p >= 0) {
|
|
1577
|
-
|
|
1578
|
-
height:
|
|
1579
|
-
width:
|
|
1579
|
+
q({
|
|
1580
|
+
height: L.value ? 0 : p,
|
|
1581
|
+
width: L.value && Number.isFinite(d) && d >= 0 ? d : 0
|
|
1580
1582
|
});
|
|
1581
1583
|
return;
|
|
1582
1584
|
}
|
|
1583
|
-
|
|
1585
|
+
q({ height: 0, width: 0 });
|
|
1584
1586
|
}
|
|
1585
1587
|
function _() {
|
|
1586
1588
|
const a = F.value;
|
|
1587
1589
|
if (!a) {
|
|
1588
|
-
g.value = !1, I.value = 0,
|
|
1590
|
+
g.value = !1, I.value = 0, T.value = 0;
|
|
1589
1591
|
return;
|
|
1590
1592
|
}
|
|
1591
1593
|
const p = a.clientHeight, d = a.scrollHeight, b = a.scrollTop, H = d > p + 1;
|
|
1592
1594
|
if (g.value = H, !H || p <= 0) {
|
|
1593
|
-
I.value = 0,
|
|
1595
|
+
I.value = 0, T.value = 0;
|
|
1594
1596
|
return;
|
|
1595
1597
|
}
|
|
1596
|
-
const
|
|
1597
|
-
I.value = j,
|
|
1598
|
+
const U = p, j = Math.max(18, Math.round(p / d * U)), te = Math.max(0, U - j), O = Math.max(1, d - p), de = Math.round(b / O * te);
|
|
1599
|
+
I.value = j, T.value = de;
|
|
1598
1600
|
}
|
|
1599
1601
|
function E() {
|
|
1600
1602
|
_();
|
|
@@ -1603,11 +1605,11 @@ const rr = {
|
|
|
1603
1605
|
const p = F.value, d = $.value;
|
|
1604
1606
|
if (!p || !d || !g.value)
|
|
1605
1607
|
return;
|
|
1606
|
-
const b = d.getBoundingClientRect(), H = a.clientY - b.top,
|
|
1607
|
-
p.scrollTop =
|
|
1608
|
+
const b = d.getBoundingClientRect(), H = a.clientY - b.top, U = Math.max(0, H - I.value / 2), j = Math.max(1, p.clientHeight - I.value), te = Math.min(1, U / j), O = Math.max(0, p.scrollHeight - p.clientHeight);
|
|
1609
|
+
p.scrollTop = te * O, _();
|
|
1608
1610
|
}
|
|
1609
1611
|
function R(a) {
|
|
1610
|
-
g.value && (B.value = !0, v.value = a.clientY, f.value =
|
|
1612
|
+
g.value && (B.value = !0, v.value = a.clientY, f.value = T.value);
|
|
1611
1613
|
}
|
|
1612
1614
|
function P(a) {
|
|
1613
1615
|
if (!B.value)
|
|
@@ -1615,8 +1617,8 @@ const rr = {
|
|
|
1615
1617
|
const p = F.value;
|
|
1616
1618
|
if (!p)
|
|
1617
1619
|
return;
|
|
1618
|
-
const d = a.clientY - v.value, b = Math.max(1, p.clientHeight - I.value),
|
|
1619
|
-
p.scrollTop =
|
|
1620
|
+
const d = a.clientY - v.value, b = Math.max(1, p.clientHeight - I.value), U = Math.min(b, Math.max(0, f.value + d)) / b, j = Math.max(0, p.scrollHeight - p.clientHeight);
|
|
1621
|
+
p.scrollTop = U * j, _();
|
|
1620
1622
|
}
|
|
1621
1623
|
function V() {
|
|
1622
1624
|
B.value && (B.value = !1);
|
|
@@ -1640,29 +1642,29 @@ const rr = {
|
|
|
1640
1642
|
}
|
|
1641
1643
|
return null;
|
|
1642
1644
|
}
|
|
1643
|
-
function
|
|
1644
|
-
var d, b, H,
|
|
1645
|
+
function K() {
|
|
1646
|
+
var d, b, H, U;
|
|
1645
1647
|
const a = (b = (d = N.value) == null ? void 0 : d.closest(".chart-layout")) == null ? void 0 : b.parentElement;
|
|
1646
1648
|
if (a instanceof HTMLElement)
|
|
1647
1649
|
return a;
|
|
1648
1650
|
const p = (H = t.chartRef) == null ? void 0 : H.$el;
|
|
1649
1651
|
if (p instanceof HTMLElement) {
|
|
1650
|
-
const j = (
|
|
1652
|
+
const j = (U = p.closest(".chart-layout")) == null ? void 0 : U.parentElement;
|
|
1651
1653
|
if (j instanceof HTMLElement)
|
|
1652
1654
|
return j;
|
|
1653
1655
|
}
|
|
1654
1656
|
return null;
|
|
1655
1657
|
}
|
|
1656
1658
|
function X() {
|
|
1657
|
-
var d, b, H,
|
|
1658
|
-
const a = ((d = N.value) == null ? void 0 : d.closest(".chart-layout")) ?? ((
|
|
1659
|
+
var d, b, H, U;
|
|
1660
|
+
const a = ((d = N.value) == null ? void 0 : d.closest(".chart-layout")) ?? ((U = (H = (b = t.chartRef) == null ? void 0 : b.$el) == null ? void 0 : H.closest) == null ? void 0 : U.call(H, ".chart-layout")) ?? null;
|
|
1659
1661
|
if (!(a instanceof HTMLElement))
|
|
1660
1662
|
return null;
|
|
1661
1663
|
const p = Number(a.getBoundingClientRect().width);
|
|
1662
1664
|
return Number.isFinite(p) && p > 0 ? p : null;
|
|
1663
1665
|
}
|
|
1664
1666
|
function Z() {
|
|
1665
|
-
const a =
|
|
1667
|
+
const a = K();
|
|
1666
1668
|
if (a) {
|
|
1667
1669
|
const j = Number(a.getBoundingClientRect().height);
|
|
1668
1670
|
if (Number.isFinite(j) && j > 0)
|
|
@@ -1671,11 +1673,11 @@ const rr = {
|
|
|
1671
1673
|
const p = ne();
|
|
1672
1674
|
if (!p)
|
|
1673
1675
|
return null;
|
|
1674
|
-
const d = window.getComputedStyle(p), b = parseFloat(d.paddingTop) || 0, H = parseFloat(d.paddingBottom) || 0,
|
|
1675
|
-
return Number.isFinite(
|
|
1676
|
+
const d = window.getComputedStyle(p), b = parseFloat(d.paddingTop) || 0, H = parseFloat(d.paddingBottom) || 0, U = p.getBoundingClientRect().height - b - H;
|
|
1677
|
+
return Number.isFinite(U) && U > 0 ? U : null;
|
|
1676
1678
|
}
|
|
1677
|
-
function
|
|
1678
|
-
const a =
|
|
1679
|
+
function le() {
|
|
1680
|
+
const a = K();
|
|
1679
1681
|
if (a) {
|
|
1680
1682
|
const j = Number(a.getBoundingClientRect().width);
|
|
1681
1683
|
if (Number.isFinite(j) && j > 0)
|
|
@@ -1684,64 +1686,71 @@ const rr = {
|
|
|
1684
1686
|
const p = ne();
|
|
1685
1687
|
if (!p)
|
|
1686
1688
|
return null;
|
|
1687
|
-
const d = window.getComputedStyle(p), b = parseFloat(d.paddingLeft) || 0, H = parseFloat(d.paddingRight) || 0,
|
|
1688
|
-
return Number.isFinite(
|
|
1689
|
+
const d = window.getComputedStyle(p), b = parseFloat(d.paddingLeft) || 0, H = parseFloat(d.paddingRight) || 0, U = p.getBoundingClientRect().width - b - H;
|
|
1690
|
+
return Number.isFinite(U) && U > 0 ? U : null;
|
|
1689
1691
|
}
|
|
1690
1692
|
function ue() {
|
|
1691
1693
|
const a = G(), p = Number(a == null ? void 0 : a.height), d = Z();
|
|
1692
|
-
if (
|
|
1694
|
+
if (L.value)
|
|
1693
1695
|
return Number.isFinite(p) && p > 0 ? Math.max(0, Math.floor(p - Jn)) : d != null ? Math.max(0, Math.floor(d - Jn)) : 120;
|
|
1694
1696
|
if (d != null) {
|
|
1695
|
-
const b = d * 0.3, H = d - ur,
|
|
1696
|
-
return Math.max(0, Math.floor(
|
|
1697
|
+
const b = d * 0.3, H = d - ur, U = Math.min(b, H);
|
|
1698
|
+
return Math.max(0, Math.floor(U));
|
|
1697
1699
|
}
|
|
1698
1700
|
return Number.isFinite(p) && p > 0 ? Math.max(0, Math.floor(p * 0.3)) : 120;
|
|
1699
1701
|
}
|
|
1700
|
-
function
|
|
1701
|
-
var
|
|
1702
|
+
function me() {
|
|
1703
|
+
var U;
|
|
1704
|
+
if (L.value) {
|
|
1705
|
+
const j = le();
|
|
1706
|
+
if (j != null)
|
|
1707
|
+
return Math.max(0, Math.floor(j * 0.3));
|
|
1708
|
+
const te = G(), O = Number(te == null ? void 0 : te.width);
|
|
1709
|
+
return Number.isFinite(O) && O > 0 ? Math.max(0, Math.floor(O * 0.3)) : 180;
|
|
1710
|
+
}
|
|
1702
1711
|
const a = X();
|
|
1703
1712
|
if (a != null)
|
|
1704
1713
|
return Math.max(0, Math.floor(a * 0.3));
|
|
1705
|
-
const p = G(), d = Number(p == null ? void 0 : p.width), b = Number(((
|
|
1714
|
+
const p = G(), d = Number(p == null ? void 0 : p.width), b = Number(((U = N.value) == null ? void 0 : U.getBoundingClientRect().width) ?? 0);
|
|
1706
1715
|
if (Number.isFinite(d) && d > 0) {
|
|
1707
1716
|
const j = d + (Number.isFinite(b) ? b : 0);
|
|
1708
1717
|
return Math.max(0, Math.floor(j * 0.3));
|
|
1709
1718
|
}
|
|
1710
|
-
const H =
|
|
1719
|
+
const H = le();
|
|
1711
1720
|
return H != null ? Math.max(0, Math.floor(H * 0.3)) : 180;
|
|
1712
1721
|
}
|
|
1713
|
-
function
|
|
1722
|
+
function se(a, p) {
|
|
1714
1723
|
const d = t.chartColorBinding;
|
|
1715
1724
|
if (d) {
|
|
1716
|
-
const
|
|
1717
|
-
if (d ===
|
|
1718
|
-
const
|
|
1719
|
-
fallbackIndex:
|
|
1725
|
+
const U = typeof a.datasetIndex == "number" ? a.datasetIndex : p, j = Number.isInteger(t.metricCount) && Number(t.metricCount) > 0 ? Number(t.metricCount) : Math.max(1, Number(i.value.length));
|
|
1726
|
+
if (d === _e.breakdown) {
|
|
1727
|
+
const O = wt({
|
|
1728
|
+
fallbackIndex: U,
|
|
1720
1729
|
metricCount: j
|
|
1721
|
-
}),
|
|
1722
|
-
datasetIndex:
|
|
1730
|
+
}), de = Fe({
|
|
1731
|
+
datasetIndex: U,
|
|
1723
1732
|
metricCount: j,
|
|
1724
|
-
mode:
|
|
1733
|
+
mode: _e.metric
|
|
1725
1734
|
});
|
|
1726
|
-
return
|
|
1727
|
-
breakdownIndex:
|
|
1728
|
-
metricIndex:
|
|
1735
|
+
return Tt({
|
|
1736
|
+
breakdownIndex: O,
|
|
1737
|
+
metricIndex: de,
|
|
1729
1738
|
metricCount: j,
|
|
1730
1739
|
breakdownColors: t.chartBreakdownColors,
|
|
1731
1740
|
useSecondaryMetricShades: t.chartUseSecondaryMetricShades,
|
|
1732
1741
|
customColors: t.chartColors
|
|
1733
1742
|
});
|
|
1734
1743
|
}
|
|
1735
|
-
if (d ===
|
|
1736
|
-
const
|
|
1737
|
-
datasetIndex:
|
|
1744
|
+
if (d === _e.metric) {
|
|
1745
|
+
const O = Fe({
|
|
1746
|
+
datasetIndex: U,
|
|
1738
1747
|
metricCount: j,
|
|
1739
|
-
mode:
|
|
1748
|
+
mode: _e.metric
|
|
1740
1749
|
});
|
|
1741
|
-
return tt({ index:
|
|
1750
|
+
return tt({ index: O, customColors: t.chartColors });
|
|
1742
1751
|
}
|
|
1743
|
-
const
|
|
1744
|
-
return tt({ index:
|
|
1752
|
+
const te = typeof a.index == "number" ? a.index : U;
|
|
1753
|
+
return tt({ index: te, customColors: t.chartColors });
|
|
1745
1754
|
}
|
|
1746
1755
|
const b = a;
|
|
1747
1756
|
return ce(a.fillStyle) || ce(a.strokeStyle) || ce(b.color) || "#9ca3af";
|
|
@@ -1760,8 +1769,8 @@ const rr = {
|
|
|
1760
1769
|
return a;
|
|
1761
1770
|
const p = Number.isInteger(t.metricCount) && Number(t.metricCount) > 0 ? Number(t.metricCount) : 1;
|
|
1762
1771
|
return [...a.map((b, H) => {
|
|
1763
|
-
const
|
|
1764
|
-
fallbackIndex:
|
|
1772
|
+
const U = typeof b.datasetIndex == "number" ? b.datasetIndex : H, j = wt({
|
|
1773
|
+
fallbackIndex: U,
|
|
1765
1774
|
metricCount: p
|
|
1766
1775
|
});
|
|
1767
1776
|
return {
|
|
@@ -1776,41 +1785,41 @@ const rr = {
|
|
|
1776
1785
|
return a;
|
|
1777
1786
|
const p = /* @__PURE__ */ new Map(), d = [];
|
|
1778
1787
|
for (const b of a) {
|
|
1779
|
-
const H = typeof b.index == "number",
|
|
1780
|
-
if (!j || !
|
|
1788
|
+
const H = typeof b.index == "number", U = b.datasetIndex, j = typeof U == "number" && !H, te = typeof b.text == "string" ? b.text.trim() : "";
|
|
1789
|
+
if (!j || !te) {
|
|
1781
1790
|
d.push(b);
|
|
1782
1791
|
continue;
|
|
1783
1792
|
}
|
|
1784
|
-
const
|
|
1785
|
-
if (
|
|
1793
|
+
const O = te.toLowerCase(), de = p.get(O);
|
|
1794
|
+
if (de == null) {
|
|
1786
1795
|
d.push({
|
|
1787
1796
|
...b,
|
|
1788
|
-
datasetIndexes: [
|
|
1797
|
+
datasetIndexes: [U],
|
|
1789
1798
|
datasetKeys: typeof b.datasetKey == "string" && b.datasetKey.trim().length > 0 ? [b.datasetKey] : []
|
|
1790
|
-
}), p.set(
|
|
1799
|
+
}), p.set(O, d.length - 1);
|
|
1791
1800
|
continue;
|
|
1792
1801
|
}
|
|
1793
|
-
const
|
|
1794
|
-
if (!
|
|
1802
|
+
const ye = d[de];
|
|
1803
|
+
if (!ye)
|
|
1795
1804
|
continue;
|
|
1796
|
-
const
|
|
1797
|
-
Array.isArray(
|
|
1805
|
+
const Ce = new Set(
|
|
1806
|
+
Array.isArray(ye.datasetIndexes) ? ye.datasetIndexes : typeof ye.datasetIndex == "number" ? [ye.datasetIndex] : []
|
|
1798
1807
|
);
|
|
1799
|
-
|
|
1800
|
-
const
|
|
1801
|
-
Array.isArray(
|
|
1808
|
+
Ce.add(U);
|
|
1809
|
+
const re = new Set(
|
|
1810
|
+
Array.isArray(ye.datasetKeys) ? ye.datasetKeys : typeof ye.datasetKey == "string" && ye.datasetKey.trim().length > 0 ? [ye.datasetKey] : []
|
|
1802
1811
|
);
|
|
1803
|
-
typeof b.datasetKey == "string" && b.datasetKey.trim().length > 0 &&
|
|
1804
|
-
...
|
|
1805
|
-
datasetIndexes: Array.from(
|
|
1806
|
-
datasetKeys: Array.from(
|
|
1807
|
-
hidden:
|
|
1812
|
+
typeof b.datasetKey == "string" && b.datasetKey.trim().length > 0 && re.add(b.datasetKey), d[de] = {
|
|
1813
|
+
...ye,
|
|
1814
|
+
datasetIndexes: Array.from(Ce).sort((ae, Se) => ae - Se),
|
|
1815
|
+
datasetKeys: Array.from(re),
|
|
1816
|
+
hidden: ye.hidden === !0 && b.hidden === !0
|
|
1808
1817
|
};
|
|
1809
1818
|
}
|
|
1810
1819
|
return d;
|
|
1811
1820
|
}
|
|
1812
|
-
function
|
|
1813
|
-
var
|
|
1821
|
+
function Ye(a) {
|
|
1822
|
+
var O, de, ye, Ce, re, ae;
|
|
1814
1823
|
const p = a == null ? void 0 : a.legend;
|
|
1815
1824
|
if (typeof (p == null ? void 0 : p.buildLabels) == "function")
|
|
1816
1825
|
try {
|
|
@@ -1820,23 +1829,23 @@ const rr = {
|
|
|
1820
1829
|
const d = Be(p == null ? void 0 : p.legendItems);
|
|
1821
1830
|
if (d.length > 0)
|
|
1822
1831
|
return d;
|
|
1823
|
-
const b = (
|
|
1824
|
-
let
|
|
1825
|
-
typeof
|
|
1832
|
+
const b = (de = (O = a == null ? void 0 : a.options) == null ? void 0 : O.plugins) == null ? void 0 : de.legend, H = b == null ? void 0 : b.labels, U = H == null ? void 0 : H.generateLabels, j = (ae = (re = (Ce = (ye = pn.defaults) == null ? void 0 : ye.plugins) == null ? void 0 : Ce.legend) == null ? void 0 : re.labels) == null ? void 0 : ae.generateLabels;
|
|
1833
|
+
let te = Be(
|
|
1834
|
+
typeof U == "function" ? U(a) : []
|
|
1826
1835
|
);
|
|
1827
|
-
return
|
|
1836
|
+
return te.length === 0 && typeof j == "function" && (te = Be(j(a))), typeof (H == null ? void 0 : H.filter) == "function" && (te = te.filter((Se) => H.filter(Se, a.data))), typeof (H == null ? void 0 : H.sort) == "function" && (te = [...te].sort((Se, Ae) => H.sort(Se, Ae, a.data))), (b == null ? void 0 : b.reverse) === !0 && (te = [...te].reverse()), te;
|
|
1828
1837
|
}
|
|
1829
|
-
function
|
|
1838
|
+
function ct(a) {
|
|
1830
1839
|
var d;
|
|
1831
1840
|
return (Array.isArray((d = a == null ? void 0 : a.data) == null ? void 0 : d.datasets) ? a.data.datasets : []).map((b, H) => {
|
|
1832
|
-
const
|
|
1841
|
+
const U = ce((b == null ? void 0 : b.borderColor) ?? (b == null ? void 0 : b.backgroundColor)), j = yt({
|
|
1833
1842
|
datasetIndex: H,
|
|
1834
1843
|
label: b == null ? void 0 : b.label
|
|
1835
1844
|
});
|
|
1836
1845
|
return {
|
|
1837
1846
|
text: ot(b == null ? void 0 : b.label),
|
|
1838
|
-
fillStyle:
|
|
1839
|
-
strokeStyle:
|
|
1847
|
+
fillStyle: U,
|
|
1848
|
+
strokeStyle: U,
|
|
1840
1849
|
datasetIndex: H,
|
|
1841
1850
|
datasetKey: j,
|
|
1842
1851
|
hidden: Array.isArray(t.hiddenDatasetKeys) ? t.hiddenDatasetKeys.includes(j) : typeof a.isDatasetVisible == "function" ? !a.isDatasetVisible(H) : !1
|
|
@@ -1846,152 +1855,152 @@ const rr = {
|
|
|
1846
1855
|
function ot(a, p) {
|
|
1847
1856
|
return a == null ? "" : String(a).trim();
|
|
1848
1857
|
}
|
|
1849
|
-
function
|
|
1858
|
+
function Ge(a, p) {
|
|
1850
1859
|
if (!Array.isArray(a) || a.length === 0)
|
|
1851
1860
|
return [];
|
|
1852
|
-
const d = a, b = d[0], H = Array.isArray(b == null ? void 0 : b.labels) ? b.labels : [],
|
|
1853
|
-
return d.length === 1 && Array.isArray(
|
|
1854
|
-
text: j[
|
|
1855
|
-
fillStyle: ce(
|
|
1856
|
-
strokeStyle: ce(
|
|
1861
|
+
const d = a, b = d[0], H = Array.isArray(b == null ? void 0 : b.labels) ? b.labels : [], U = Array.isArray(p == null ? void 0 : p.metrics) ? p.metrics : [], j = H.length > 0 ? H : U, te = b == null ? void 0 : b.backgroundColor;
|
|
1862
|
+
return d.length === 1 && Array.isArray(te) && te.length > 1 ? te.map((O, de) => ({
|
|
1863
|
+
text: j[de] == null || String(j[de]).trim().length === 0 ? `Series ${de + 1}` : String(j[de]),
|
|
1864
|
+
fillStyle: ce(O),
|
|
1865
|
+
strokeStyle: ce(O),
|
|
1857
1866
|
datasetIndex: 0,
|
|
1858
|
-
index:
|
|
1859
|
-
hidden: xe(
|
|
1860
|
-
})) : d.map((
|
|
1861
|
-
datasetKey:
|
|
1862
|
-
datasetIndex:
|
|
1863
|
-
label:
|
|
1867
|
+
index: de,
|
|
1868
|
+
hidden: xe(de)
|
|
1869
|
+
})) : d.map((O, de) => ({
|
|
1870
|
+
datasetKey: yt({
|
|
1871
|
+
datasetIndex: de,
|
|
1872
|
+
label: O == null ? void 0 : O.label
|
|
1864
1873
|
}),
|
|
1865
|
-
text: ot(
|
|
1874
|
+
text: ot(O == null ? void 0 : O.label),
|
|
1866
1875
|
fillStyle: ce(
|
|
1867
|
-
(
|
|
1876
|
+
(O == null ? void 0 : O.color) ?? (O == null ? void 0 : O.borderColor) ?? (O == null ? void 0 : O.backgroundColor) ?? (O == null ? void 0 : O.pointBackgroundColor)
|
|
1868
1877
|
),
|
|
1869
1878
|
strokeStyle: ce(
|
|
1870
|
-
(
|
|
1879
|
+
(O == null ? void 0 : O.color) ?? (O == null ? void 0 : O.borderColor) ?? (O == null ? void 0 : O.backgroundColor) ?? (O == null ? void 0 : O.pointBorderColor)
|
|
1871
1880
|
),
|
|
1872
|
-
datasetIndex:
|
|
1881
|
+
datasetIndex: de,
|
|
1873
1882
|
hidden: Array.isArray(t.hiddenDatasetKeys) ? t.hiddenDatasetKeys.includes(
|
|
1874
|
-
|
|
1875
|
-
datasetIndex:
|
|
1876
|
-
label:
|
|
1883
|
+
yt({
|
|
1884
|
+
datasetIndex: de,
|
|
1885
|
+
label: O == null ? void 0 : O.label
|
|
1877
1886
|
})
|
|
1878
|
-
) : !!(
|
|
1887
|
+
) : !!(O != null && O.hidden)
|
|
1879
1888
|
}));
|
|
1880
1889
|
}
|
|
1881
|
-
function
|
|
1890
|
+
function Ot() {
|
|
1882
1891
|
var p;
|
|
1883
1892
|
const a = (p = t.chartRef) == null ? void 0 : p.datasets;
|
|
1884
1893
|
return Array.isArray(a) ? a : [];
|
|
1885
1894
|
}
|
|
1886
|
-
function
|
|
1895
|
+
function je(a, p) {
|
|
1887
1896
|
return typeof a.datasetKey == "string" && a.datasetKey.trim().length > 0 ? `dataset-key:${a.datasetKey}` : typeof a.datasetIndex == "number" && typeof a.index == "number" ? `dataset:${a.datasetIndex}-item:${a.index}` : typeof a.datasetIndex == "number" ? `dataset:${a.datasetIndex}` : typeof a.index == "number" ? `item:${a.index}` : typeof a.text == "string" && a.text.trim().length > 0 ? `text:${a.text.trim()}` : `fallback:${p}`;
|
|
1888
1897
|
}
|
|
1889
|
-
function
|
|
1898
|
+
function Ut() {
|
|
1890
1899
|
const a = y.value;
|
|
1891
1900
|
return a ? Math.ceil(a.getBoundingClientRect().width) : 0;
|
|
1892
1901
|
}
|
|
1893
|
-
function
|
|
1902
|
+
function Kt() {
|
|
1894
1903
|
const a = y.value;
|
|
1895
1904
|
return a ? Math.ceil(a.getBoundingClientRect().height) : 0;
|
|
1896
1905
|
}
|
|
1897
|
-
function
|
|
1898
|
-
var
|
|
1906
|
+
function qt(a, p) {
|
|
1907
|
+
var Ce;
|
|
1899
1908
|
const d = F.value;
|
|
1900
1909
|
if (!d || a.length === 0)
|
|
1901
1910
|
return 0;
|
|
1902
|
-
const b = Math.max(0, p - jn);
|
|
1903
|
-
if (
|
|
1904
|
-
const
|
|
1905
|
-
let
|
|
1906
|
-
for (let
|
|
1907
|
-
const
|
|
1908
|
-
if (!
|
|
1911
|
+
const b = Math.max(0, p - jn), H = window.getComputedStyle(d);
|
|
1912
|
+
if (H.flexDirection.startsWith("column")) {
|
|
1913
|
+
const re = Number.parseFloat(H.rowGap || H.gap || "0") || 0, ae = Kt();
|
|
1914
|
+
let Se = 0, Ae = 0;
|
|
1915
|
+
for (let Oe = 0; Oe < a.length; Oe += 1) {
|
|
1916
|
+
const Ue = a[Oe];
|
|
1917
|
+
if (!Ue)
|
|
1909
1918
|
continue;
|
|
1910
|
-
const
|
|
1911
|
-
if (
|
|
1919
|
+
const Qe = Se + (Ae > 0 ? re : 0) + Ue.offsetHeight, rt = a.length - (Oe + 1) > 0 ? re + ae : 0;
|
|
1920
|
+
if (Qe + rt > b)
|
|
1912
1921
|
break;
|
|
1913
|
-
|
|
1922
|
+
Se = Qe, Ae += 1;
|
|
1914
1923
|
}
|
|
1915
1924
|
return Ae > 0 ? Ae : 1;
|
|
1916
1925
|
}
|
|
1917
|
-
const
|
|
1918
|
-
(
|
|
1926
|
+
const j = ((Ce = a[0]) == null ? void 0 : Ce.offsetTop) ?? 0, te = a.filter(
|
|
1927
|
+
(re) => re.offsetTop - j + re.offsetHeight <= b
|
|
1919
1928
|
);
|
|
1920
|
-
if (
|
|
1929
|
+
if (te.length === 0)
|
|
1921
1930
|
return 0;
|
|
1922
|
-
if (
|
|
1923
|
-
return
|
|
1924
|
-
const
|
|
1925
|
-
if (
|
|
1926
|
-
return Math.max(1,
|
|
1927
|
-
const
|
|
1928
|
-
for (let
|
|
1929
|
-
const
|
|
1930
|
-
if (!
|
|
1931
|
+
if (te.length >= a.length)
|
|
1932
|
+
return te.length;
|
|
1933
|
+
const O = Ut();
|
|
1934
|
+
if (O <= 0)
|
|
1935
|
+
return Math.max(1, te.length - 1);
|
|
1936
|
+
const de = Number.parseFloat(H.columnGap || H.gap || "0") || 0, ye = d.clientWidth;
|
|
1937
|
+
for (let re = te.length; re > 0; re -= 1) {
|
|
1938
|
+
const ae = te.slice(0, re), Se = ae[ae.length - 1];
|
|
1939
|
+
if (!Se)
|
|
1931
1940
|
continue;
|
|
1932
|
-
if (
|
|
1933
|
-
return
|
|
1941
|
+
if (Se.offsetLeft + Se.offsetWidth + de + O <= ye)
|
|
1942
|
+
return re;
|
|
1934
1943
|
}
|
|
1935
1944
|
return 1;
|
|
1936
1945
|
}
|
|
1937
|
-
function
|
|
1946
|
+
function It() {
|
|
1938
1947
|
const a = F.value;
|
|
1939
1948
|
if (!a) {
|
|
1940
|
-
c.value = !1, C.value = 0, l.value = 0,
|
|
1949
|
+
c.value = !1, C.value = 0, l.value = 0, ie(), _();
|
|
1941
1950
|
return;
|
|
1942
1951
|
}
|
|
1943
1952
|
const p = Array.from(
|
|
1944
1953
|
a.querySelectorAll(".chart-legend-item[data-legend-data='true']")
|
|
1945
1954
|
);
|
|
1946
1955
|
if (p.length === 0) {
|
|
1947
|
-
c.value = !1, C.value = 0, l.value = 0,
|
|
1956
|
+
c.value = !1, C.value = 0, l.value = 0, ie(), _();
|
|
1948
1957
|
return;
|
|
1949
1958
|
}
|
|
1950
|
-
const d = Array.from(new Set(p.map((
|
|
1951
|
-
if ((H || C.value <= 0) && (C.value =
|
|
1952
|
-
const
|
|
1953
|
-
if (
|
|
1954
|
-
const
|
|
1955
|
-
if (
|
|
1956
|
-
const
|
|
1957
|
-
if (
|
|
1958
|
-
const
|
|
1959
|
-
if (
|
|
1959
|
+
const d = Array.from(new Set(p.map((re) => re.offsetTop))).sort((re, ae) => re - ae), b = !h.value && i.value.length > p.length, H = !h.value && !b, U = H || C.value <= 0 ? ue() : C.value;
|
|
1960
|
+
if ((H || C.value <= 0) && (C.value = U), b) {
|
|
1961
|
+
const re = ue();
|
|
1962
|
+
if (re > 0 && (C.value = re), window.getComputedStyle(a).flexDirection.startsWith("column") && l.value < i.value.length) {
|
|
1963
|
+
const Ae = Math.max(0, C.value - jn), Oe = a.scrollHeight;
|
|
1964
|
+
if (Oe + 1 < Ae) {
|
|
1965
|
+
const Ue = p.map((ke) => ke.offsetHeight).filter((ke) => Number.isFinite(ke) && ke > 0), Qe = Ue.length > 0 ? Ue.reduce((ke, rt) => ke + rt, 0) / Ue.length : 0;
|
|
1966
|
+
if (Qe > 0) {
|
|
1967
|
+
const ke = window.getComputedStyle(a), rt = Number.parseFloat(ke.rowGap || ke.gap || "0") || 0, jt = Math.max(1, Qe + rt), mt = Ae - Oe, Bt = Math.floor(mt / jt);
|
|
1968
|
+
if (Bt > 0) {
|
|
1960
1969
|
l.value = Math.min(
|
|
1961
1970
|
i.value.length,
|
|
1962
|
-
l.value +
|
|
1963
|
-
),
|
|
1971
|
+
l.value + Bt
|
|
1972
|
+
), Je();
|
|
1964
1973
|
return;
|
|
1965
1974
|
}
|
|
1966
1975
|
}
|
|
1967
1976
|
}
|
|
1968
1977
|
}
|
|
1969
|
-
c.value = !0,
|
|
1978
|
+
c.value = !0, ie(), _();
|
|
1970
1979
|
return;
|
|
1971
1980
|
}
|
|
1972
|
-
const j = d[0] ?? 0,
|
|
1973
|
-
(H || l.value <= 0) && (l.value = Math.max(0,
|
|
1981
|
+
const j = d[0] ?? 0, te = d[d.length - 1] ?? j, O = p.filter((re) => re.offsetTop === te), de = Math.max(...O.map((re) => re.offsetHeight), 0), ye = Math.max(0, te - j + de), Ce = qt(p, U);
|
|
1982
|
+
(H || l.value <= 0) && (l.value = Math.max(0, Ce)), c.value = ye > U, ie(), _();
|
|
1974
1983
|
}
|
|
1975
|
-
function
|
|
1984
|
+
function Je() {
|
|
1976
1985
|
Me(() => {
|
|
1977
|
-
|
|
1978
|
-
|
|
1986
|
+
It(), window.requestAnimationFrame(() => {
|
|
1987
|
+
It(), J(), _();
|
|
1979
1988
|
});
|
|
1980
1989
|
});
|
|
1981
1990
|
}
|
|
1982
|
-
const
|
|
1991
|
+
const Xt = m(() => {
|
|
1983
1992
|
const a = {
|
|
1984
1993
|
"--legend-text-color": u.value,
|
|
1985
1994
|
"--legend-font-size": `${M.value}px`
|
|
1986
1995
|
}, p = ue();
|
|
1987
|
-
if (
|
|
1988
|
-
const d =
|
|
1996
|
+
if (L.value) {
|
|
1997
|
+
const d = me();
|
|
1989
1998
|
return {
|
|
1990
1999
|
...a,
|
|
1991
|
-
width:
|
|
2000
|
+
width: `${d}px`,
|
|
1992
2001
|
maxWidth: `${d}px`,
|
|
1993
2002
|
maxHeight: `${p}px`,
|
|
1994
|
-
flex:
|
|
2003
|
+
flex: `0 0 ${d}px`
|
|
1995
2004
|
};
|
|
1996
2005
|
}
|
|
1997
2006
|
return {
|
|
@@ -1999,54 +2008,54 @@ const rr = {
|
|
|
1999
2008
|
maxHeight: `${p}px`,
|
|
2000
2009
|
flex: "0 0 auto"
|
|
2001
2010
|
};
|
|
2002
|
-
}),
|
|
2011
|
+
}), Yt = m(() => {
|
|
2003
2012
|
if (h.value || !c.value)
|
|
2004
2013
|
return i.value;
|
|
2005
|
-
const a = Math.max(1, l.value), p =
|
|
2014
|
+
const a = Math.max(1, l.value), p = L.value ? a : Math.max(0, a - 1);
|
|
2006
2015
|
return i.value.slice(0, Math.min(p, i.value.length));
|
|
2007
|
-
}),
|
|
2016
|
+
}), Mt = m(() => k.value ? c.value && h.value ? {
|
|
2008
2017
|
flex: "1 1 auto",
|
|
2009
2018
|
minHeight: "0",
|
|
2010
2019
|
overflowY: "auto"
|
|
2011
2020
|
} : c.value ? {
|
|
2012
2021
|
overflow: "hidden"
|
|
2013
2022
|
} : {} : {});
|
|
2014
|
-
function
|
|
2023
|
+
function dt() {
|
|
2015
2024
|
var b;
|
|
2016
|
-
if (!
|
|
2017
|
-
i.value = [], l.value = 0, h.value = !1, c.value = !1, C.value = 0,
|
|
2025
|
+
if (!k.value) {
|
|
2026
|
+
i.value = [], l.value = 0, h.value = !1, c.value = !1, C.value = 0, q({ height: 0, width: 0 });
|
|
2018
2027
|
return;
|
|
2019
2028
|
}
|
|
2020
2029
|
l.value = 0, c.value = !1, C.value = 0;
|
|
2021
2030
|
const a = G();
|
|
2022
2031
|
if (!a) {
|
|
2023
2032
|
i.value = He(
|
|
2024
|
-
|
|
2025
|
-
),
|
|
2033
|
+
Ge(t.legendUpdateKey, t.chartRef)
|
|
2034
|
+
), Je();
|
|
2026
2035
|
return;
|
|
2027
2036
|
}
|
|
2028
2037
|
try {
|
|
2029
|
-
i.value =
|
|
2038
|
+
i.value = Ye(a);
|
|
2030
2039
|
} catch {
|
|
2031
2040
|
i.value = [];
|
|
2032
2041
|
}
|
|
2033
2042
|
const p = Array.isArray((b = a == null ? void 0 : a.data) == null ? void 0 : b.datasets) ? a.data.datasets : [];
|
|
2034
|
-
i.value.length === 0 && (i.value =
|
|
2043
|
+
i.value.length === 0 && (i.value = Ge(t.legendUpdateKey, t.chartRef)), i.value.length === 0 && (i.value = ct(a)), i.value = We(He(i.value));
|
|
2035
2044
|
const d = Array.isArray(t.legendUpdateKey) && t.legendUpdateKey.length > 0 || !Array.isArray(t.legendUpdateKey) && !!t.legendUpdateKey;
|
|
2036
|
-
i.value.length === 0 && !(p.length > 0 || d) && W(0),
|
|
2045
|
+
i.value.length === 0 && !(p.length > 0 || d) && W(0), Je();
|
|
2037
2046
|
}
|
|
2038
|
-
function
|
|
2047
|
+
function Ze(a) {
|
|
2039
2048
|
return Array.isArray(a.datasetIndexes) && a.datasetIndexes.length > 0 ? a.datasetIndexes.filter((p) => Number.isInteger(p)) : typeof a.datasetIndex == "number" ? [a.datasetIndex] : [];
|
|
2040
2049
|
}
|
|
2041
2050
|
function at(a, p) {
|
|
2042
2051
|
return Array.isArray(a.datasetKeys) && a.datasetKeys.length > 0 ? a.datasetKeys.filter((d) => typeof d == "string" && d.trim().length > 0) : typeof a.datasetKey == "string" && a.datasetKey.trim().length > 0 ? [a.datasetKey] : p.map(
|
|
2043
|
-
(d) =>
|
|
2052
|
+
(d) => yt({
|
|
2044
2053
|
datasetIndex: d,
|
|
2045
2054
|
label: a.text
|
|
2046
2055
|
})
|
|
2047
2056
|
);
|
|
2048
2057
|
}
|
|
2049
|
-
function
|
|
2058
|
+
function ft(a, p) {
|
|
2050
2059
|
i.value = i.value.map(
|
|
2051
2060
|
(d) => a(d) ? {
|
|
2052
2061
|
...d,
|
|
@@ -2054,13 +2063,13 @@ const rr = {
|
|
|
2054
2063
|
} : d
|
|
2055
2064
|
);
|
|
2056
2065
|
}
|
|
2057
|
-
function
|
|
2066
|
+
function Te(a, p, d) {
|
|
2058
2067
|
var H;
|
|
2059
2068
|
typeof a.setDatasetVisibility == "function" ? a.setDatasetVisibility(p, d) : d && typeof a.show == "function" ? a.show(p) : !d && typeof a.hide == "function" && a.hide(p);
|
|
2060
2069
|
const b = Array.isArray((H = a == null ? void 0 : a.data) == null ? void 0 : H.datasets) ? a.data.datasets[p] : null;
|
|
2061
2070
|
b && typeof b == "object" && (b.hidden = !d);
|
|
2062
2071
|
}
|
|
2063
|
-
function
|
|
2072
|
+
function ln(a, p) {
|
|
2064
2073
|
var j;
|
|
2065
2074
|
if (typeof a.toggleDataVisibility == "function") {
|
|
2066
2075
|
a.toggleDataVisibility(p);
|
|
@@ -2069,85 +2078,85 @@ const rr = {
|
|
|
2069
2078
|
const d = Array.isArray((j = a == null ? void 0 : a.data) == null ? void 0 : j.datasets) ? a.data.datasets[0] : null, b = Array.isArray(d == null ? void 0 : d.data) ? d.data : [];
|
|
2070
2079
|
if (p < 0 || p >= b.length)
|
|
2071
2080
|
return;
|
|
2072
|
-
const H = typeof a.getDatasetMeta == "function" ? a.getDatasetMeta(0) : null,
|
|
2073
|
-
|
|
2081
|
+
const H = typeof a.getDatasetMeta == "function" ? a.getDatasetMeta(0) : null, U = Array.isArray(H == null ? void 0 : H.data) ? H.data[p] : null;
|
|
2082
|
+
U && typeof U.hidden == "boolean" && (U.hidden = !U.hidden);
|
|
2074
2083
|
}
|
|
2075
|
-
function
|
|
2076
|
-
|
|
2084
|
+
function Gt(a = 0) {
|
|
2085
|
+
dt();
|
|
2077
2086
|
const p = G(), d = i.value.length > 0;
|
|
2078
2087
|
if (p || d || a >= dr) {
|
|
2079
|
-
|
|
2088
|
+
ee();
|
|
2080
2089
|
return;
|
|
2081
2090
|
}
|
|
2082
|
-
|
|
2083
|
-
|
|
2091
|
+
ee(), x = window.setTimeout(() => {
|
|
2092
|
+
Gt(a + 1);
|
|
2084
2093
|
}, cr);
|
|
2085
2094
|
}
|
|
2086
|
-
function
|
|
2087
|
-
var
|
|
2088
|
-
const d = G(), b = String(((
|
|
2089
|
-
if ((H || typeof a.index == "number") && typeof
|
|
2095
|
+
function sn(a, p) {
|
|
2096
|
+
var ye;
|
|
2097
|
+
const d = G(), b = String(((ye = d == null ? void 0 : d.config) == null ? void 0 : ye.type) ?? ""), H = b === "pie" || b === "doughnut" || b === "polarArea", U = typeof a.index == "number" ? a.index : typeof p == "number" ? p : null;
|
|
2098
|
+
if ((H || typeof a.index == "number") && typeof U == "number") {
|
|
2090
2099
|
if (Array.isArray(t.hiddenDataPointIndexes)) {
|
|
2091
|
-
o("toggleDataPointVisibility", { itemIndex:
|
|
2100
|
+
o("toggleDataPointVisibility", { itemIndex: U });
|
|
2092
2101
|
return;
|
|
2093
2102
|
}
|
|
2094
|
-
d && (
|
|
2095
|
-
const
|
|
2096
|
-
|
|
2097
|
-
(
|
|
2098
|
-
|
|
2103
|
+
d && (ln(d, U), d.update());
|
|
2104
|
+
const Ce = d && typeof d.getDataVisibility == "function" ? !d.getDataVisibility(U) : a.hidden !== !0;
|
|
2105
|
+
ft(
|
|
2106
|
+
(re) => typeof re.index == "number" ? re.index === U : re.datasetIndex === a.datasetIndex && re.text === a.text,
|
|
2107
|
+
Ce
|
|
2099
2108
|
);
|
|
2100
2109
|
return;
|
|
2101
2110
|
}
|
|
2102
|
-
const
|
|
2103
|
-
if (Array.isArray(t.hiddenDatasetKeys) &&
|
|
2104
|
-
|
|
2111
|
+
const te = Ze(a), O = at(a, te);
|
|
2112
|
+
if (Array.isArray(t.hiddenDatasetKeys) && te.length > 0) {
|
|
2113
|
+
te.forEach((Ce, re) => {
|
|
2105
2114
|
o("toggleDatasetVisibility", {
|
|
2106
|
-
datasetIndex:
|
|
2107
|
-
datasetKey:
|
|
2108
|
-
datasetIndex:
|
|
2115
|
+
datasetIndex: Ce,
|
|
2116
|
+
datasetKey: O[re] ?? yt({
|
|
2117
|
+
datasetIndex: Ce,
|
|
2109
2118
|
label: a.text
|
|
2110
2119
|
})
|
|
2111
2120
|
});
|
|
2112
2121
|
});
|
|
2113
2122
|
return;
|
|
2114
2123
|
}
|
|
2115
|
-
const
|
|
2124
|
+
const de = Ot();
|
|
2116
2125
|
if (!d) {
|
|
2117
|
-
if (
|
|
2118
|
-
const
|
|
2119
|
-
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
}),
|
|
2123
|
-
(
|
|
2124
|
-
|
|
2126
|
+
if (te.length > 0) {
|
|
2127
|
+
const Ce = a.hidden !== !0;
|
|
2128
|
+
te.forEach((re) => {
|
|
2129
|
+
const ae = de[re];
|
|
2130
|
+
ae && typeof ae == "object" && (ae.hidden = Ce);
|
|
2131
|
+
}), ft(
|
|
2132
|
+
(re) => je(re, 0) === je(a, 0),
|
|
2133
|
+
Ce
|
|
2125
2134
|
);
|
|
2126
2135
|
}
|
|
2127
2136
|
return;
|
|
2128
2137
|
}
|
|
2129
|
-
if (
|
|
2130
|
-
const
|
|
2131
|
-
(
|
|
2138
|
+
if (te.length > 0) {
|
|
2139
|
+
const re = !te.every(
|
|
2140
|
+
(ae) => typeof d.isDatasetVisible == "function" ? d.isDatasetVisible(ae) : a.hidden !== !0
|
|
2132
2141
|
);
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
const
|
|
2136
|
-
|
|
2137
|
-
}), d.update(),
|
|
2138
|
-
(
|
|
2139
|
-
!
|
|
2142
|
+
te.forEach((ae) => {
|
|
2143
|
+
Te(d, ae, re);
|
|
2144
|
+
const Se = de[ae];
|
|
2145
|
+
Se && typeof Se == "object" && (Se.hidden = !re);
|
|
2146
|
+
}), d.update(), ft(
|
|
2147
|
+
(ae) => je(ae, 0) === je(a, 0),
|
|
2148
|
+
!re
|
|
2140
2149
|
);
|
|
2141
2150
|
}
|
|
2142
2151
|
}
|
|
2143
|
-
function
|
|
2144
|
-
h.value = !0,
|
|
2152
|
+
function un() {
|
|
2153
|
+
h.value = !0, Je();
|
|
2145
2154
|
}
|
|
2146
|
-
function
|
|
2147
|
-
h.value = !1, F.value && (F.value.scrollTop = 0),
|
|
2155
|
+
function ht() {
|
|
2156
|
+
h.value = !1, F.value && (F.value.scrollTop = 0), Je();
|
|
2148
2157
|
}
|
|
2149
2158
|
return $e(() => {
|
|
2150
|
-
|
|
2159
|
+
Gt(), window.addEventListener("mousemove", P), window.addEventListener("mouseup", V);
|
|
2151
2160
|
}), we(
|
|
2152
2161
|
() => [
|
|
2153
2162
|
t.enabled,
|
|
@@ -2156,106 +2165,105 @@ const rr = {
|
|
|
2156
2165
|
t.hiddenDataPointIndexes
|
|
2157
2166
|
],
|
|
2158
2167
|
() => {
|
|
2159
|
-
|
|
2168
|
+
dt();
|
|
2160
2169
|
}
|
|
2161
2170
|
), Qn(() => {
|
|
2162
|
-
B.value = !1,
|
|
2163
|
-
}), (a, p) =>
|
|
2171
|
+
B.value = !1, ee(), q({ height: 0, width: 0 }), window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", V);
|
|
2172
|
+
}), (a, p) => k.value ? (Y(), fe("div", {
|
|
2164
2173
|
key: 0,
|
|
2165
2174
|
ref_key: "legendPanelRef",
|
|
2166
2175
|
ref: N,
|
|
2167
|
-
class:
|
|
2168
|
-
"self-stretch h-full":
|
|
2169
|
-
"mb-2": !
|
|
2170
|
-
"mt-2": !
|
|
2176
|
+
class: Ie(["chart-legend-panel relative z-[2] flex min-w-0 flex-col overflow-hidden pointer-events-auto", {
|
|
2177
|
+
"self-stretch h-full pt-2": L.value,
|
|
2178
|
+
"mb-2": !L.value && a.position === "top",
|
|
2179
|
+
"mt-2": !L.value && a.position === "bottom"
|
|
2171
2180
|
}]),
|
|
2172
|
-
style:
|
|
2181
|
+
style: De(Xt.value)
|
|
2173
2182
|
}, [
|
|
2174
|
-
|
|
2183
|
+
Q("div", {
|
|
2175
2184
|
ref_key: "legendScrollShellRef",
|
|
2176
2185
|
ref: $,
|
|
2177
2186
|
class: "relative z-[2] flex flex-1 min-h-0 flex-col overflow-hidden"
|
|
2178
2187
|
}, [
|
|
2179
|
-
|
|
2188
|
+
Q("div", {
|
|
2180
2189
|
ref_key: "legendToggleMeasureRef",
|
|
2181
2190
|
ref: y,
|
|
2182
2191
|
class: "absolute invisible pointer-events-none left-0 top-0 z-[2] inline-flex max-w-full select-none"
|
|
2183
2192
|
}, [
|
|
2184
|
-
|
|
2193
|
+
Q("button", rr, Pe(r(s)("report.widget.legend.viewMore")), 1)
|
|
2185
2194
|
], 512),
|
|
2186
|
-
|
|
2195
|
+
Q("ul", {
|
|
2187
2196
|
ref_key: "legendListRef",
|
|
2188
2197
|
ref: F,
|
|
2189
|
-
class:
|
|
2190
|
-
|
|
2198
|
+
class: Ie(["chart-legend-list m-0 flex list-none p-0", [
|
|
2199
|
+
L.value ? "flex-row flex-wrap justify-start gap-x-3 gap-y-2 pt-1" : "flex-wrap justify-center gap-x-2 gap-y-1 pt-1"
|
|
2191
2200
|
]]),
|
|
2192
|
-
style:
|
|
2201
|
+
style: De(Mt.value),
|
|
2193
2202
|
onScroll: E
|
|
2194
2203
|
}, [
|
|
2195
|
-
(Y(!0),
|
|
2196
|
-
key:
|
|
2197
|
-
class:
|
|
2198
|
-
"w-full": k.value,
|
|
2204
|
+
(Y(!0), fe(Ve, null, zt(Yt.value, (d, b) => (Y(), fe("li", {
|
|
2205
|
+
key: je(d, b),
|
|
2206
|
+
class: Ie(["chart-legend-item relative z-[2] inline-flex max-w-full cursor-pointer select-none pointer-events-auto", {
|
|
2199
2207
|
"opacity-45": d.hidden
|
|
2200
2208
|
}]),
|
|
2201
2209
|
"data-legend-data": "true"
|
|
2202
2210
|
}, [
|
|
2203
|
-
|
|
2211
|
+
Q("button", {
|
|
2204
2212
|
type: "button",
|
|
2205
|
-
class:
|
|
2213
|
+
class: Ie(["inline-flex max-w-full items-center gap-1.5 border-none bg-transparent p-0", { "justify-start text-left": L.value }]),
|
|
2206
2214
|
"aria-pressed": d.hidden === !0 ? "false" : "true",
|
|
2207
|
-
onClick:
|
|
2215
|
+
onClick: en((H) => sn(d, b), ["stop"])
|
|
2208
2216
|
}, [
|
|
2209
|
-
t.usePointStyle !== !1 ? (Y(),
|
|
2217
|
+
t.usePointStyle !== !1 ? (Y(), fe("span", {
|
|
2210
2218
|
key: 0,
|
|
2211
2219
|
class: "h-5 w-5 shrink-0 rounded-full",
|
|
2212
|
-
style:
|
|
2213
|
-
}, null, 4)) : (Y(),
|
|
2220
|
+
style: De({ backgroundColor: se(d, b) })
|
|
2221
|
+
}, null, 4)) : (Y(), fe("span", {
|
|
2214
2222
|
key: 1,
|
|
2215
2223
|
class: "h-5 w-5 shrink-0 rounded-sm border border-solid border-gray-300",
|
|
2216
|
-
style:
|
|
2217
|
-
backgroundColor:
|
|
2224
|
+
style: De({
|
|
2225
|
+
backgroundColor: se(d, b),
|
|
2218
2226
|
borderColor: "#c7c7cc"
|
|
2219
2227
|
})
|
|
2220
2228
|
}, null, 4)),
|
|
2221
|
-
|
|
2222
|
-
class:
|
|
2223
|
-
"
|
|
2224
|
-
"whitespace-nowrap overflow-hidden": !
|
|
2229
|
+
Q("span", {
|
|
2230
|
+
class: Ie(["chart-legend-text leading-[1.4]", {
|
|
2231
|
+
"max-w-[120px] whitespace-nowrap overflow-hidden text-ellipsis text-left": L.value,
|
|
2232
|
+
"whitespace-nowrap overflow-hidden": !L.value,
|
|
2225
2233
|
"line-through": d.hidden
|
|
2226
2234
|
}]),
|
|
2227
2235
|
title: d.text ?? ""
|
|
2228
2236
|
}, Pe(d.text), 11, sr)
|
|
2229
2237
|
], 10, lr)
|
|
2230
2238
|
], 2))), 128)),
|
|
2231
|
-
c.value ? (Y(),
|
|
2232
|
-
|
|
2239
|
+
c.value ? (Y(), fe("li", ir, [
|
|
2240
|
+
Q("button", {
|
|
2233
2241
|
type: "button",
|
|
2234
2242
|
class: "inline-flex max-w-full cursor-pointer select-none underline items-center gap-1 rounded px-1 py-0.5 border-none bg-transparent text-fm-color-system-info-300 leading-[1.4] transition-colors hover:bg-black/5",
|
|
2235
2243
|
style: { fontSize: "var(--legend-font-size)" },
|
|
2236
|
-
onClick: p[0] || (p[0] =
|
|
2244
|
+
onClick: p[0] || (p[0] = en((d) => h.value ? ht() : un(), ["stop"]))
|
|
2237
2245
|
}, Pe(h.value ? r(s)("report.widget.legend.viewLess") : r(s)("report.widget.legend.viewMore")), 1)
|
|
2238
|
-
])) :
|
|
2246
|
+
])) : be("", !0)
|
|
2239
2247
|
], 38),
|
|
2240
|
-
A.value ? (Y(),
|
|
2248
|
+
A.value ? (Y(), fe("div", {
|
|
2241
2249
|
key: 0,
|
|
2242
2250
|
class: "absolute top-0 right-0 h-full w-2 rounded-full bg-transparent",
|
|
2243
2251
|
onMousedown: z
|
|
2244
2252
|
}, [
|
|
2245
|
-
|
|
2253
|
+
Q("div", {
|
|
2246
2254
|
class: "absolute left-0 w-full rounded-full bg-gray-500/60 cursor-pointer hover:bg-gray-500/85",
|
|
2247
|
-
style:
|
|
2248
|
-
onMousedown:
|
|
2255
|
+
style: De(w.value),
|
|
2256
|
+
onMousedown: en(R, ["stop"])
|
|
2249
2257
|
}, null, 36)
|
|
2250
|
-
], 32)) :
|
|
2258
|
+
], 32)) : be("", !0)
|
|
2251
2259
|
], 512)
|
|
2252
|
-
], 6)) :
|
|
2260
|
+
], 6)) : be("", !0);
|
|
2253
2261
|
}
|
|
2254
|
-
}), ze = /* @__PURE__ */ oo(fr, [["__scopeId", "data-v-
|
|
2255
|
-
function
|
|
2262
|
+
}), ze = /* @__PURE__ */ oo(fr, [["__scopeId", "data-v-08c94e88"]]);
|
|
2263
|
+
function Et(e) {
|
|
2256
2264
|
const n = D([]), t = m(() => new Set(n.value));
|
|
2257
2265
|
function o(l, h) {
|
|
2258
|
-
return
|
|
2266
|
+
return yt({
|
|
2259
2267
|
datasetIndex: h,
|
|
2260
2268
|
label: l == null ? void 0 : l.label
|
|
2261
2269
|
});
|
|
@@ -2288,7 +2296,7 @@ function Wt(e) {
|
|
|
2288
2296
|
}
|
|
2289
2297
|
const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
2290
2298
|
__name: "WidgetBarchart",
|
|
2291
|
-
props: /* @__PURE__ */
|
|
2299
|
+
props: /* @__PURE__ */ Xe({
|
|
2292
2300
|
tileIndex: {}
|
|
2293
2301
|
}, {
|
|
2294
2302
|
modelValue: { required: !0 },
|
|
@@ -2296,14 +2304,14 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2296
2304
|
}),
|
|
2297
2305
|
emits: ["update:modelValue"],
|
|
2298
2306
|
setup(e) {
|
|
2299
|
-
const n = e, t =
|
|
2307
|
+
const n = e, t = Ee(e, "modelValue"), o = D(null), s = m(() => t.value.maxTooltipItems), {
|
|
2300
2308
|
isTooltipDetailsSheetOpen: i,
|
|
2301
2309
|
tooltipDetailsPayload: l,
|
|
2302
2310
|
tooltipOptions: h,
|
|
2303
2311
|
handleTooltipDetailsSheetVisibility: c,
|
|
2304
2312
|
handleTooltipDetailsHover: C,
|
|
2305
2313
|
handleTooltipDetailsLeave: N
|
|
2306
|
-
} =
|
|
2314
|
+
} = Wt(o, {
|
|
2307
2315
|
maxTooltipItems: s
|
|
2308
2316
|
}), $ = m(() => {
|
|
2309
2317
|
var z;
|
|
@@ -2311,18 +2319,18 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2311
2319
|
}), F = m(() => {
|
|
2312
2320
|
var z;
|
|
2313
2321
|
return ((z = t.value.data) == null ? void 0 : z.xAxis) ?? [];
|
|
2314
|
-
}), y = m(() => F.value.length === 1 && $.value.length > 1 && $.value.every((z) => z.values.length === 1 && z.isCompare !== !0)), g = m(() => y.value ? $.value.map((z) => z.name) : F.value), { datalabels: I, xCfg:
|
|
2322
|
+
}), y = m(() => F.value.length === 1 && $.value.length > 1 && $.value.every((z) => z.values.length === 1 && z.isCompare !== !0)), g = m(() => y.value ? $.value.map((z) => z.name) : F.value), { datalabels: I, xCfg: T, yCfg: B, isTransposed: v, legend: f, chartWidth: k, chartHeight: L } = Dt(
|
|
2315
2323
|
t.value
|
|
2316
2324
|
), x = m(
|
|
2317
|
-
() =>
|
|
2318
|
-
), A =
|
|
2325
|
+
() => Lt(t.value.isTransposed === !0, h.value)
|
|
2326
|
+
), A = $t("bar"), w = m(() => {
|
|
2319
2327
|
const z = f.value.position;
|
|
2320
2328
|
return !z || z === "top" || z === "bottom" || z === "left" || z === "right";
|
|
2321
2329
|
}), u = m(() => f.value.position ?? "top"), M = m(
|
|
2322
2330
|
() => u.value === "left" || u.value === "right"
|
|
2323
2331
|
), W = m(
|
|
2324
2332
|
() => u.value === "top" || u.value === "left"
|
|
2325
|
-
),
|
|
2333
|
+
), q = m(() => $.value.length > 0 ? [
|
|
2326
2334
|
...$.value.map((z, R) => {
|
|
2327
2335
|
const P = Fe({
|
|
2328
2336
|
datasetIndex: R,
|
|
@@ -2333,21 +2341,21 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2333
2341
|
datasetIndex: R,
|
|
2334
2342
|
isCompare: z.isCompare,
|
|
2335
2343
|
metricCount: t.value.metricCount,
|
|
2336
|
-
mode:
|
|
2344
|
+
mode: _e.metric
|
|
2337
2345
|
});
|
|
2338
2346
|
let ne = z.values;
|
|
2339
2347
|
y.value && (ne = $.value.map(
|
|
2340
|
-
(
|
|
2348
|
+
(le, ue) => ue === R ? z.values[0] : NaN
|
|
2341
2349
|
));
|
|
2342
|
-
const
|
|
2350
|
+
const K = t.value.chartColorBinding === _e.breakdown, X = wt({
|
|
2343
2351
|
fallbackIndex: R,
|
|
2344
2352
|
metricCount: t.value.metricCount
|
|
2345
|
-
}), Z = ne.map((
|
|
2353
|
+
}), Z = ne.map((le) => le === null ? NaN : Number(le));
|
|
2346
2354
|
return {
|
|
2347
2355
|
label: z.name,
|
|
2348
2356
|
data: Z,
|
|
2349
2357
|
dash: !!z.isCompare,
|
|
2350
|
-
backgroundColor:
|
|
2358
|
+
backgroundColor: K ? Tt({
|
|
2351
2359
|
breakdownIndex: X,
|
|
2352
2360
|
metricIndex: V,
|
|
2353
2361
|
metricCount: t.value.metricCount,
|
|
@@ -2362,12 +2370,12 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2362
2370
|
})
|
|
2363
2371
|
};
|
|
2364
2372
|
})
|
|
2365
|
-
] : []), { hiddenDatasetKeys:
|
|
2366
|
-
() =>
|
|
2373
|
+
] : []), { hiddenDatasetKeys: ee, isDatasetHidden: G, toggleDatasetVisibility: ie } = Et(q), J = m(
|
|
2374
|
+
() => q.value.map((z, R) => ({
|
|
2367
2375
|
...z,
|
|
2368
2376
|
hidden: G(z, R)
|
|
2369
2377
|
}))
|
|
2370
|
-
), _ =
|
|
2378
|
+
), _ = kt();
|
|
2371
2379
|
function E() {
|
|
2372
2380
|
return _.extractChartSize(o.value, n.tileIndex) || { width: 0, height: 0 };
|
|
2373
2381
|
}
|
|
@@ -2378,24 +2386,24 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2378
2386
|
}), we([J], () => {
|
|
2379
2387
|
Me(() => E());
|
|
2380
2388
|
}), (z, R) => {
|
|
2381
|
-
var V, ne,
|
|
2382
|
-
const P =
|
|
2383
|
-
return Y(),
|
|
2384
|
-
|
|
2389
|
+
var V, ne, K, X, Z, le;
|
|
2390
|
+
const P = pe("FmBarChart");
|
|
2391
|
+
return Y(), fe(Ve, null, [
|
|
2392
|
+
Q("div", hr, [
|
|
2385
2393
|
nt(z.$slots, "menu"),
|
|
2386
|
-
|
|
2387
|
-
class:
|
|
2394
|
+
Q("div", {
|
|
2395
|
+
class: Ie(["chart-layout", {
|
|
2388
2396
|
"chart-layout--side": w.value && (r(f).display ?? !1) && M.value
|
|
2389
2397
|
}])
|
|
2390
2398
|
}, [
|
|
2391
|
-
w.value && (r(f).display ?? !1) && W.value ? (Y(),
|
|
2399
|
+
w.value && (r(f).display ?? !1) && W.value ? (Y(), ge(ze, {
|
|
2392
2400
|
key: 0,
|
|
2393
2401
|
"chart-ref": o.value,
|
|
2394
2402
|
enabled: r(f).display ?? !1,
|
|
2395
2403
|
position: u.value,
|
|
2396
2404
|
"max-width": r(f).maxWidth,
|
|
2397
2405
|
"text-color": (V = r(f).labels) == null ? void 0 : V.color,
|
|
2398
|
-
"font-size": (
|
|
2406
|
+
"font-size": (K = (ne = r(f).labels) == null ? void 0 : ne.font) == null ? void 0 : K.size,
|
|
2399
2407
|
"legend-update-key": J.value,
|
|
2400
2408
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
2401
2409
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -2403,16 +2411,16 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2403
2411
|
"chart-breakdown-colors": t.value.chartBreakdownColors,
|
|
2404
2412
|
"chart-use-secondary-metric-shades": t.value.chartUseSecondaryMetricShades,
|
|
2405
2413
|
"metric-count": t.value.metricCount,
|
|
2406
|
-
"hidden-dataset-keys": r(
|
|
2407
|
-
onToggleDatasetVisibility: r(
|
|
2408
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
2409
|
-
|
|
2414
|
+
"hidden-dataset-keys": r(ee),
|
|
2415
|
+
onToggleDatasetVisibility: r(ie)
|
|
2416
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0),
|
|
2417
|
+
he(P, {
|
|
2410
2418
|
ref_key: "chartRef",
|
|
2411
2419
|
ref: o,
|
|
2412
2420
|
class: "bar-chart",
|
|
2413
2421
|
datasets: J.value,
|
|
2414
2422
|
"x-axis": { categories: g.value },
|
|
2415
|
-
"x-cfg": r(
|
|
2423
|
+
"x-cfg": r(T),
|
|
2416
2424
|
"y-cfg": r(B),
|
|
2417
2425
|
transpose: r(v),
|
|
2418
2426
|
legend: {
|
|
@@ -2422,19 +2430,19 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2422
2430
|
datalabels: r(I),
|
|
2423
2431
|
plugins: [r(A)],
|
|
2424
2432
|
"maintain-aspect-ratio": !1,
|
|
2425
|
-
style:
|
|
2426
|
-
"--chart-width": w.value && (r(f).display ?? !1) && M.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(
|
|
2427
|
-
"--chart-height": w.value && (r(f).display ?? !1) && !M.value ? "calc(100% - 36px - var(--legend-panel-height, 0px))" : r(
|
|
2433
|
+
style: De({
|
|
2434
|
+
"--chart-width": w.value && (r(f).display ?? !1) && M.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(k) !== void 0 ? r(k) + "px" : "100%",
|
|
2435
|
+
"--chart-height": w.value && (r(f).display ?? !1) && !M.value ? "calc(100% - 36px - var(--legend-panel-height, 0px))" : r(L) !== void 0 ? r(L) + "px" : "100%"
|
|
2428
2436
|
})
|
|
2429
2437
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "tooltip", "datalabels", "plugins", "style"]),
|
|
2430
|
-
w.value && (r(f).display ?? !1) && !W.value ? (Y(),
|
|
2438
|
+
w.value && (r(f).display ?? !1) && !W.value ? (Y(), ge(ze, {
|
|
2431
2439
|
key: 1,
|
|
2432
2440
|
"chart-ref": o.value,
|
|
2433
2441
|
enabled: r(f).display ?? !1,
|
|
2434
2442
|
position: u.value,
|
|
2435
2443
|
"max-width": r(f).maxWidth,
|
|
2436
2444
|
"text-color": (X = r(f).labels) == null ? void 0 : X.color,
|
|
2437
|
-
"font-size": (
|
|
2445
|
+
"font-size": (le = (Z = r(f).labels) == null ? void 0 : Z.font) == null ? void 0 : le.size,
|
|
2438
2446
|
"legend-update-key": J.value,
|
|
2439
2447
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
2440
2448
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -2442,12 +2450,12 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2442
2450
|
"chart-breakdown-colors": t.value.chartBreakdownColors,
|
|
2443
2451
|
"chart-use-secondary-metric-shades": t.value.chartUseSecondaryMetricShades,
|
|
2444
2452
|
"metric-count": t.value.metricCount,
|
|
2445
|
-
"hidden-dataset-keys": r(
|
|
2446
|
-
onToggleDatasetVisibility: r(
|
|
2447
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
2453
|
+
"hidden-dataset-keys": r(ee),
|
|
2454
|
+
onToggleDatasetVisibility: r(ie)
|
|
2455
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0)
|
|
2448
2456
|
], 2)
|
|
2449
2457
|
]),
|
|
2450
|
-
|
|
2458
|
+
he(Ht, {
|
|
2451
2459
|
"model-value": r(i),
|
|
2452
2460
|
"details-payload": r(l),
|
|
2453
2461
|
"onUpdate:modelValue": r(c),
|
|
@@ -2459,7 +2467,7 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2459
2467
|
}
|
|
2460
2468
|
}), pr = { class: "widget-content" }, vr = /* @__PURE__ */ Ne({
|
|
2461
2469
|
__name: "WidgetCircular",
|
|
2462
|
-
props: /* @__PURE__ */
|
|
2470
|
+
props: /* @__PURE__ */ Xe({
|
|
2463
2471
|
tileIndex: {}
|
|
2464
2472
|
}, {
|
|
2465
2473
|
modelValue: { required: !0 },
|
|
@@ -2467,7 +2475,7 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2467
2475
|
}),
|
|
2468
2476
|
emits: ["update:modelValue"],
|
|
2469
2477
|
setup(e) {
|
|
2470
|
-
const n = e, t =
|
|
2478
|
+
const n = e, t = Ee(e, "modelValue"), { breakpoints: o } = rn(), s = D(null), i = D([]), { datalabels: l, legend: h, chartWidth: c, chartHeight: C } = Dt(t.value), N = m(() => {
|
|
2471
2479
|
const u = Array.isArray(t.value.data.datasets) ? t.value.data.datasets.map((M) => M.name) : [];
|
|
2472
2480
|
return u.length > 0 ? u : Array.isArray(t.value.data.metrics) ? t.value.data.metrics.map((M) => String(M)) : [];
|
|
2473
2481
|
}), $ = m(() => {
|
|
@@ -2477,14 +2485,14 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2477
2485
|
label: N.value[0] ?? (Array.isArray(t.value.data.metrics) && t.value.data.metrics.length > 0 ? String(t.value.data.metrics[0]) : "Series"),
|
|
2478
2486
|
labels: N.value,
|
|
2479
2487
|
data: t.value.data.datasets.map(
|
|
2480
|
-
(W,
|
|
2488
|
+
(W, q) => i.value.includes(q) ? null : W.value
|
|
2481
2489
|
),
|
|
2482
2490
|
backgroundColor: t.value.data.datasets.map(
|
|
2483
|
-
(W,
|
|
2491
|
+
(W, q) => tt({ index: q, customColors: t.value.chartColors })
|
|
2484
2492
|
)
|
|
2485
2493
|
}
|
|
2486
2494
|
]), u;
|
|
2487
|
-
}), F =
|
|
2495
|
+
}), F = kt();
|
|
2488
2496
|
function y() {
|
|
2489
2497
|
return F.extractChartSize(s.value, n.tileIndex) || { width: 0, height: 0 };
|
|
2490
2498
|
}
|
|
@@ -2498,7 +2506,7 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2498
2506
|
() => t.value.data.datasets,
|
|
2499
2507
|
(u) => {
|
|
2500
2508
|
const M = new Set(
|
|
2501
|
-
Array.isArray(u) ? u.map((W,
|
|
2509
|
+
Array.isArray(u) ? u.map((W, q) => q) : []
|
|
2502
2510
|
);
|
|
2503
2511
|
i.value = i.value.filter(
|
|
2504
2512
|
(W) => M.has(W)
|
|
@@ -2509,11 +2517,11 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2509
2517
|
const g = m(() => typeof t.value.legendFontSize == "number" ? t.value.legendFontSize : o.value.lg ? 12 : 8), I = m(() => {
|
|
2510
2518
|
const u = h.value.position;
|
|
2511
2519
|
return !u || u === "top" || u === "bottom" || u === "left" || u === "right";
|
|
2512
|
-
}),
|
|
2520
|
+
}), T = m(() => h.value.display !== !1), B = m(() => I.value && T.value), v = m(() => h.value.position ?? "top"), f = m(
|
|
2513
2521
|
() => v.value === "left" || v.value === "right"
|
|
2514
|
-
),
|
|
2522
|
+
), k = m(
|
|
2515
2523
|
() => v.value === "top" || v.value === "left"
|
|
2516
|
-
),
|
|
2524
|
+
), L = m(() => {
|
|
2517
2525
|
var M;
|
|
2518
2526
|
const u = (M = h.value.labels) == null ? void 0 : M.color;
|
|
2519
2527
|
return typeof u == "string" && u.trim().length > 0 ? u : t.value.legendColor ?? "#6b6b6b";
|
|
@@ -2528,21 +2536,21 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2528
2536
|
i.value = [...i.value, u];
|
|
2529
2537
|
}
|
|
2530
2538
|
return (u, M) => {
|
|
2531
|
-
const W =
|
|
2532
|
-
return Y(),
|
|
2539
|
+
const W = pe("FmPieChart");
|
|
2540
|
+
return Y(), fe("div", pr, [
|
|
2533
2541
|
nt(u.$slots, "menu"),
|
|
2534
|
-
|
|
2535
|
-
class:
|
|
2542
|
+
Q("div", {
|
|
2543
|
+
class: Ie(["chart-layout", {
|
|
2536
2544
|
"chart-layout--side": B.value && f.value
|
|
2537
2545
|
}])
|
|
2538
2546
|
}, [
|
|
2539
|
-
B.value &&
|
|
2547
|
+
B.value && k.value ? (Y(), ge(ze, {
|
|
2540
2548
|
key: 0,
|
|
2541
2549
|
"chart-ref": s.value,
|
|
2542
|
-
enabled:
|
|
2550
|
+
enabled: T.value,
|
|
2543
2551
|
position: v.value,
|
|
2544
2552
|
"max-width": r(h).maxWidth,
|
|
2545
|
-
"text-color":
|
|
2553
|
+
"text-color": L.value,
|
|
2546
2554
|
"font-size": x.value,
|
|
2547
2555
|
"legend-update-key": $.value,
|
|
2548
2556
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
@@ -2553,8 +2561,8 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2553
2561
|
"metric-count": t.value.metricCount,
|
|
2554
2562
|
"hidden-data-point-indexes": i.value,
|
|
2555
2563
|
onToggleDataPointVisibility: w
|
|
2556
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-data-point-indexes"])) :
|
|
2557
|
-
|
|
2564
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-data-point-indexes"])) : be("", !0),
|
|
2565
|
+
he(W, {
|
|
2558
2566
|
ref_key: "chartRef",
|
|
2559
2567
|
ref: s,
|
|
2560
2568
|
class: "circular",
|
|
@@ -2568,18 +2576,18 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2568
2576
|
},
|
|
2569
2577
|
datalabels: r(l),
|
|
2570
2578
|
"maintain-aspect-ratio": !1,
|
|
2571
|
-
style:
|
|
2579
|
+
style: De({
|
|
2572
2580
|
"--chart-width": B.value && f.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(c) !== void 0 ? r(c) + "px" : "100%",
|
|
2573
2581
|
"--chart-height": B.value && !f.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(C) !== void 0 ? r(C) + "px" : "100%"
|
|
2574
2582
|
})
|
|
2575
2583
|
}, null, 8, ["datasets", "metrics", "tooltip", "datalabels", "style"]),
|
|
2576
|
-
B.value && !
|
|
2584
|
+
B.value && !k.value ? (Y(), ge(ze, {
|
|
2577
2585
|
key: 1,
|
|
2578
2586
|
"chart-ref": s.value,
|
|
2579
|
-
enabled:
|
|
2587
|
+
enabled: T.value,
|
|
2580
2588
|
position: v.value,
|
|
2581
2589
|
"max-width": r(h).maxWidth,
|
|
2582
|
-
"text-color":
|
|
2590
|
+
"text-color": L.value,
|
|
2583
2591
|
"font-size": x.value,
|
|
2584
2592
|
"legend-update-key": $.value,
|
|
2585
2593
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
@@ -2590,13 +2598,13 @@ const hr = { class: "widget-content" }, mr = /* @__PURE__ */ Ne({
|
|
|
2590
2598
|
"metric-count": t.value.metricCount,
|
|
2591
2599
|
"hidden-data-point-indexes": i.value,
|
|
2592
2600
|
onToggleDataPointVisibility: w
|
|
2593
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-data-point-indexes"])) :
|
|
2601
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-data-point-indexes"])) : be("", !0)
|
|
2594
2602
|
], 2)
|
|
2595
2603
|
]);
|
|
2596
2604
|
};
|
|
2597
2605
|
}
|
|
2598
2606
|
});
|
|
2599
|
-
function
|
|
2607
|
+
function nn(e) {
|
|
2600
2608
|
if (e == null || e === "")
|
|
2601
2609
|
return "";
|
|
2602
2610
|
const n = String(e), t = Number(n);
|
|
@@ -2612,18 +2620,18 @@ const gr = { class: "flex flex-col gap-1" }, yr = { class: "fm-typo-en-title-md-
|
|
|
2612
2620
|
},
|
|
2613
2621
|
emits: ["update:modelValue"],
|
|
2614
2622
|
setup(e) {
|
|
2615
|
-
const n =
|
|
2623
|
+
const n = Ee(e, "modelValue"), { t } = ut(), { compareDateRange: o, defaultDateSetting: s } = it(on()), { country: i } = kn(), l = m(() => {
|
|
2616
2624
|
var g;
|
|
2617
2625
|
return ((g = n.value.data) == null ? void 0 : g.value) || "";
|
|
2618
|
-
}), h = m(() =>
|
|
2626
|
+
}), h = m(() => nn(l.value)), c = m(() => {
|
|
2619
2627
|
const { data: g } = n.value;
|
|
2620
2628
|
return g != null && g.comparison ? lo(l.value, g.comparison, i) : null;
|
|
2621
2629
|
});
|
|
2622
2630
|
function C(g) {
|
|
2623
2631
|
switch (g) {
|
|
2624
|
-
case
|
|
2632
|
+
case vn.bar:
|
|
2625
2633
|
return "bar";
|
|
2626
|
-
case
|
|
2634
|
+
case vn.line:
|
|
2627
2635
|
return "line";
|
|
2628
2636
|
default:
|
|
2629
2637
|
return "line";
|
|
@@ -2641,65 +2649,65 @@ const gr = { class: "flex flex-col gap-1" }, yr = { class: "fm-typo-en-title-md-
|
|
|
2641
2649
|
data: g.values,
|
|
2642
2650
|
fill: !0,
|
|
2643
2651
|
color: "#36a2eb"
|
|
2644
|
-
}))), y = m(() =>
|
|
2652
|
+
}))), y = m(() => Lt(!1, !0));
|
|
2645
2653
|
return (g, I) => {
|
|
2646
|
-
const
|
|
2647
|
-
return Y(),
|
|
2654
|
+
const T = pe("FmIcon"), B = pe("FmChip"), v = pe("FmTooltip"), f = pe("FmLineChart");
|
|
2655
|
+
return Y(), fe("div", gr, [
|
|
2648
2656
|
nt(g.$slots, "menu"),
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2657
|
+
Q("p", yr, Pe(h.value), 1),
|
|
2658
|
+
Q("div", br, [
|
|
2659
|
+
he(v, {
|
|
2652
2660
|
disabled: c.value === null,
|
|
2653
2661
|
placement: "right",
|
|
2654
2662
|
"hide-arrow": "",
|
|
2655
2663
|
variant: "rich"
|
|
2656
2664
|
}, {
|
|
2657
|
-
content:
|
|
2658
|
-
var
|
|
2665
|
+
content: Le(() => {
|
|
2666
|
+
var k;
|
|
2659
2667
|
return [
|
|
2660
|
-
|
|
2668
|
+
Q("span", Cr, Pe(`vs. ${(k = r(s).defaultCompareType) == null ? void 0 : k.split("_").join(" ")}`), 1)
|
|
2661
2669
|
];
|
|
2662
2670
|
}),
|
|
2663
|
-
default:
|
|
2664
|
-
c.value ? (Y(),
|
|
2671
|
+
default: Le(() => [
|
|
2672
|
+
c.value ? (Y(), ge(B, {
|
|
2665
2673
|
key: 0,
|
|
2666
2674
|
icon: c.value.icon.name,
|
|
2667
|
-
class:
|
|
2675
|
+
class: Ie(`bg-${c.value.icon.tailwind}`),
|
|
2668
2676
|
compact: ""
|
|
2669
2677
|
}, {
|
|
2670
|
-
default:
|
|
2671
|
-
|
|
2678
|
+
default: Le(() => [
|
|
2679
|
+
he(T, {
|
|
2672
2680
|
name: c.value.icon.name,
|
|
2673
2681
|
color: c.value.icon.color
|
|
2674
2682
|
}, null, 8, ["name", "color"]),
|
|
2675
|
-
|
|
2683
|
+
Q("p", {
|
|
2676
2684
|
class: "fm-typo-en-body-md-600",
|
|
2677
|
-
style:
|
|
2685
|
+
style: De({ color: c.value.icon.color })
|
|
2678
2686
|
}, Pe(c.value.value), 5)
|
|
2679
2687
|
]),
|
|
2680
2688
|
_: 1
|
|
2681
|
-
}, 8, ["icon", "class"])) :
|
|
2682
|
-
r(o).endDate != null && r(o).startDate != null && c.value === null ? (Y(),
|
|
2689
|
+
}, 8, ["icon", "class"])) : be("", !0),
|
|
2690
|
+
r(o).endDate != null && r(o).startDate != null && c.value === null ? (Y(), ge(B, {
|
|
2683
2691
|
key: 1,
|
|
2684
2692
|
class: "invisible pointer-events-none",
|
|
2685
2693
|
"aria-hidden": "true",
|
|
2686
2694
|
compact: ""
|
|
2687
2695
|
}, {
|
|
2688
|
-
default:
|
|
2689
|
-
|
|
2696
|
+
default: Le(() => [
|
|
2697
|
+
he(T, {
|
|
2690
2698
|
name: "arrow_upward",
|
|
2691
2699
|
color: "#C7C7CC"
|
|
2692
2700
|
}),
|
|
2693
|
-
I[0] || (I[0] =
|
|
2701
|
+
I[0] || (I[0] = Q("p", { class: "fm-typo-en-body-md-600" }, " ", -1))
|
|
2694
2702
|
]),
|
|
2695
2703
|
_: 1
|
|
2696
|
-
})) :
|
|
2704
|
+
})) : be("", !0)
|
|
2697
2705
|
]),
|
|
2698
2706
|
_: 1
|
|
2699
2707
|
}, 8, ["disabled"])
|
|
2700
2708
|
]),
|
|
2701
|
-
N.value ? (Y(),
|
|
2702
|
-
C(N.value.type) === "line" ? (Y(),
|
|
2709
|
+
N.value ? (Y(), fe("div", xr, [
|
|
2710
|
+
C(N.value.type) === "line" ? (Y(), ge(f, {
|
|
2703
2711
|
key: 0,
|
|
2704
2712
|
class: "sparkline",
|
|
2705
2713
|
datasets: F.value,
|
|
@@ -2712,14 +2720,14 @@ const gr = { class: "flex flex-col gap-1" }, yr = { class: "fm-typo-en-title-md-
|
|
|
2712
2720
|
"x-cfg": { display: !1 },
|
|
2713
2721
|
tooltip: y.value,
|
|
2714
2722
|
"maintain-aspect-ratio": !1
|
|
2715
|
-
}, null, 8, ["datasets", "x-axis", "y-cfg", "tooltip"])) :
|
|
2716
|
-
])) : (Y(),
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2723
|
+
}, null, 8, ["datasets", "x-axis", "y-cfg", "tooltip"])) : be("", !0)
|
|
2724
|
+
])) : (Y(), fe("div", wr, I[1] || (I[1] = [
|
|
2725
|
+
Q("div", { class: "sparkline" }, [
|
|
2726
|
+
Q("div", { class: "flex flex-col gap-8" }, [
|
|
2727
|
+
Q("div"),
|
|
2728
|
+
Q("div")
|
|
2721
2729
|
]),
|
|
2722
|
-
|
|
2730
|
+
Q("div", { class: "grow" })
|
|
2723
2731
|
], -1)
|
|
2724
2732
|
])))
|
|
2725
2733
|
]);
|
|
@@ -2727,63 +2735,63 @@ const gr = { class: "flex flex-col gap-1" }, yr = { class: "fm-typo-en-title-md-
|
|
|
2727
2735
|
}
|
|
2728
2736
|
}), _r = {};
|
|
2729
2737
|
function kr(e, n) {
|
|
2730
|
-
const t =
|
|
2731
|
-
return Y(),
|
|
2738
|
+
const t = pe("FmMenuDivider");
|
|
2739
|
+
return Y(), ge(t);
|
|
2732
2740
|
}
|
|
2733
2741
|
const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimension", Zn = Ko(Lr, () => {
|
|
2734
2742
|
const e = D(0), n = D([]), t = D(!1), o = (v, f) => {
|
|
2735
2743
|
e.value = v, i(v, f);
|
|
2736
|
-
}, s = (v, f,
|
|
2737
|
-
n[v] = f, n.value = [...n.value], l(v, f,
|
|
2744
|
+
}, s = (v, f, k, L) => {
|
|
2745
|
+
n[v] = f, n.value = [...n.value], l(v, f, k, L);
|
|
2738
2746
|
}, i = (v, f) => {
|
|
2739
|
-
const
|
|
2740
|
-
[...
|
|
2747
|
+
const k = (f == null ? void 0 : f.querySelectorAll("thead tr")) ?? [], L = (f == null ? void 0 : f.querySelectorAll("tbody tr")) ?? [];
|
|
2748
|
+
[...k, ...L].forEach((A) => {
|
|
2741
2749
|
const w = A;
|
|
2742
2750
|
w && (w.style.height = `${v}px`);
|
|
2743
2751
|
});
|
|
2744
|
-
}, l = (v, f,
|
|
2745
|
-
const x = (
|
|
2752
|
+
}, l = (v, f, k, L = !1) => {
|
|
2753
|
+
const x = (k == null ? void 0 : k.querySelectorAll("th")) ?? [];
|
|
2746
2754
|
if (v === void 0) return;
|
|
2747
|
-
const A = x[v], w =
|
|
2755
|
+
const A = x[v], w = L ? n[v] : f;
|
|
2748
2756
|
if (!A || w === void 0) return;
|
|
2749
2757
|
const u = () => {
|
|
2750
2758
|
A.style.width = `${w}px`;
|
|
2751
2759
|
};
|
|
2752
|
-
|
|
2760
|
+
L ? requestAnimationFrame(u) : u();
|
|
2753
2761
|
}, h = () => {
|
|
2754
|
-
const v = document.querySelectorAll("th"), f = document.querySelectorAll("td"),
|
|
2755
|
-
|
|
2762
|
+
const v = document.querySelectorAll("th"), f = document.querySelectorAll("td"), k = document.querySelector("table");
|
|
2763
|
+
k == null || k.classList.add("table-fixed"), v.forEach((L) => L.classList.add("toggleEditResize")), f.forEach((L) => L.classList.add("toggleEditResize")), t.value = !0;
|
|
2756
2764
|
}, c = () => {
|
|
2757
|
-
const v = document.querySelectorAll("th"), f = document.querySelectorAll("td"),
|
|
2758
|
-
v.forEach((x) => x.classList.remove("toggleEditResize")), f.forEach((x) => x.classList.remove("toggleEditResize")),
|
|
2765
|
+
const v = document.querySelectorAll("th"), f = document.querySelectorAll("td"), k = document.querySelectorAll(".col-resize-handle"), L = document.querySelectorAll(".row-resize-handle");
|
|
2766
|
+
v.forEach((x) => x.classList.remove("toggleEditResize")), f.forEach((x) => x.classList.remove("toggleEditResize")), k.forEach((x) => x.remove()), L.forEach((x) => x.remove()), t.value = !1;
|
|
2759
2767
|
}, C = () => {
|
|
2760
2768
|
e.value = 0, n.value = [];
|
|
2761
2769
|
}, N = (v, f) => {
|
|
2762
2770
|
if (f) {
|
|
2763
|
-
const
|
|
2764
|
-
[...
|
|
2771
|
+
const k = document.querySelectorAll(`thead th:nth-child(${v + 1})`), L = document.querySelectorAll(`tbody td:nth-child(${v + 1})`);
|
|
2772
|
+
[...k, ...L].forEach((x) => {
|
|
2765
2773
|
x.classList.add("highlight-hover-col");
|
|
2766
2774
|
});
|
|
2767
2775
|
} else
|
|
2768
2776
|
document.querySelectorAll(
|
|
2769
2777
|
`thead th:nth-child(${v + 1}), tbody td:nth-child(${v + 1})`
|
|
2770
|
-
).forEach((
|
|
2778
|
+
).forEach((k) => k.classList.add("highlight-col"));
|
|
2771
2779
|
}, $ = (v) => {
|
|
2772
|
-
const f = document.querySelectorAll("thead tr"),
|
|
2773
|
-
for (const x of
|
|
2780
|
+
const f = document.querySelectorAll("thead tr"), k = document.querySelectorAll("tbody tr"), L = [...f, ...k];
|
|
2781
|
+
for (const x of L)
|
|
2774
2782
|
v ? x.classList.add("highlight-hover-row") : x.classList.add("highlight-row");
|
|
2775
2783
|
}, F = (v) => {
|
|
2776
|
-
const f = v ? ".highlight-hover-row" : ".highlight-row",
|
|
2777
|
-
for (const
|
|
2778
|
-
|
|
2784
|
+
const f = v ? ".highlight-hover-row" : ".highlight-row", k = document.querySelectorAll(f);
|
|
2785
|
+
for (const L of k)
|
|
2786
|
+
L.classList.remove(f.slice(1));
|
|
2779
2787
|
}, y = (v) => {
|
|
2780
2788
|
v ? document.querySelectorAll(".highlight-hover-col").forEach((f) => {
|
|
2781
2789
|
f.classList.remove("highlight-hover-col");
|
|
2782
2790
|
}) : document.querySelectorAll(".highlight-col").forEach((f) => f.classList.remove("highlight-col"));
|
|
2783
2791
|
}, g = (v, f) => {
|
|
2784
|
-
const
|
|
2785
|
-
if (!
|
|
2786
|
-
const x =
|
|
2792
|
+
const k = v.clientX, L = v.target.closest("table");
|
|
2793
|
+
if (!L) return;
|
|
2794
|
+
const x = L.querySelectorAll("th")[f];
|
|
2787
2795
|
if (!x) return;
|
|
2788
2796
|
const A = x.getBoundingClientRect().width || 60, w = x.querySelector("button"), u = (w == null ? void 0 : w.querySelector("span")) || x.querySelector("p") || x;
|
|
2789
2797
|
let M = 60;
|
|
@@ -2791,37 +2799,37 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2791
2799
|
const J = u.textContent || "", _ = window.getComputedStyle(u), E = `${_.fontWeight} ${_.fontSize} ${_.fontFamily}`, R = document.createElement("canvas").getContext("2d");
|
|
2792
2800
|
if (R) {
|
|
2793
2801
|
R.font = E;
|
|
2794
|
-
const P = R.measureText(J), V = window.getComputedStyle(x), ne = parseFloat(V.paddingLeft || "0"),
|
|
2795
|
-
M = P.width + ne +
|
|
2802
|
+
const P = R.measureText(J), V = window.getComputedStyle(x), ne = parseFloat(V.paddingLeft || "0"), K = parseFloat(V.paddingRight || "0");
|
|
2803
|
+
M = P.width + ne + K;
|
|
2796
2804
|
}
|
|
2797
2805
|
}
|
|
2798
2806
|
N(f, !1);
|
|
2799
|
-
let W = null,
|
|
2800
|
-
const
|
|
2801
|
-
if (
|
|
2807
|
+
let W = null, q = null;
|
|
2808
|
+
const ee = () => {
|
|
2809
|
+
if (q === null) return;
|
|
2802
2810
|
const J = x;
|
|
2803
|
-
J.style.width = `${
|
|
2811
|
+
J.style.width = `${q}px`;
|
|
2804
2812
|
let _ = 0;
|
|
2805
|
-
|
|
2806
|
-
_ += R === f ?
|
|
2807
|
-
}),
|
|
2813
|
+
L.querySelectorAll("th").forEach((z, R) => {
|
|
2814
|
+
_ += R === f ? q : z.getBoundingClientRect().width;
|
|
2815
|
+
}), L.classList.remove("w-full"), L.style.width = `${_}px`, W = null;
|
|
2808
2816
|
}, G = (J) => {
|
|
2809
|
-
const _ = J.clientX -
|
|
2810
|
-
|
|
2811
|
-
},
|
|
2812
|
-
W !== null && cancelAnimationFrame(W),
|
|
2813
|
-
const J =
|
|
2817
|
+
const _ = J.clientX - k;
|
|
2818
|
+
q = Math.max(M, A + _), W === null && (W = requestAnimationFrame(ee));
|
|
2819
|
+
}, ie = () => {
|
|
2820
|
+
W !== null && cancelAnimationFrame(W), q !== null && (x.style.width = `${q}px`);
|
|
2821
|
+
const J = L.querySelectorAll("th"), _ = [];
|
|
2814
2822
|
J.forEach((E) => {
|
|
2815
2823
|
_.push(E.getBoundingClientRect().width);
|
|
2816
|
-
}), n.value = _, y(!1), document.removeEventListener("mousemove", G), document.removeEventListener("mouseup",
|
|
2824
|
+
}), n.value = _, y(!1), document.removeEventListener("mousemove", G), document.removeEventListener("mouseup", ie);
|
|
2817
2825
|
};
|
|
2818
|
-
document.addEventListener("mousemove", G), document.addEventListener("mouseup",
|
|
2826
|
+
document.addEventListener("mousemove", G), document.addEventListener("mouseup", ie);
|
|
2819
2827
|
}, I = (v) => {
|
|
2820
|
-
const f = v.clientY,
|
|
2828
|
+
const f = v.clientY, k = v.target.closest("table"), L = e.value || 48;
|
|
2821
2829
|
$(!1);
|
|
2822
2830
|
const x = (w) => {
|
|
2823
|
-
const u = Math.max(30,
|
|
2824
|
-
|
|
2831
|
+
const u = Math.max(30, L + (w.clientY - f));
|
|
2832
|
+
k && o(u, k);
|
|
2825
2833
|
}, A = () => {
|
|
2826
2834
|
F(!1), document.removeEventListener("mousemove", x), document.removeEventListener("mouseup", A);
|
|
2827
2835
|
};
|
|
@@ -2845,7 +2853,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2845
2853
|
resizeCol: g,
|
|
2846
2854
|
resizeRow: I,
|
|
2847
2855
|
enableCellResizing: () => {
|
|
2848
|
-
const v = document.querySelector("thead"), f = document.querySelectorAll("thead tr"),
|
|
2856
|
+
const v = document.querySelector("thead"), f = document.querySelectorAll("thead tr"), k = document.querySelectorAll("tbody tr"), L = [...f, ...k];
|
|
2849
2857
|
v && v.classList.remove("sticky");
|
|
2850
2858
|
const x = (A, w) => {
|
|
2851
2859
|
const u = document.createElement("div");
|
|
@@ -2855,11 +2863,11 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2855
2863
|
M.stopPropagation(), I(M);
|
|
2856
2864
|
})), u;
|
|
2857
2865
|
};
|
|
2858
|
-
|
|
2866
|
+
L.forEach((A) => {
|
|
2859
2867
|
const w = A.closest("thead") !== null;
|
|
2860
2868
|
A.querySelectorAll(w ? "th" : "td").forEach((M, W) => {
|
|
2861
|
-
const
|
|
2862
|
-
M.appendChild(
|
|
2869
|
+
const q = x("col", W), ee = x("row", W);
|
|
2870
|
+
M.appendChild(q), M.appendChild(ee);
|
|
2863
2871
|
});
|
|
2864
2872
|
}), h();
|
|
2865
2873
|
},
|
|
@@ -2872,7 +2880,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2872
2880
|
style: { backgroundColor: "#f9f9f9" }
|
|
2873
2881
|
}, Br = { class: "font-bold" }, Pr = { class: "text-fm-color-neutral-gray-300" }, Fr = /* @__PURE__ */ Ne({
|
|
2874
2882
|
__name: "WidgetTable",
|
|
2875
|
-
props: /* @__PURE__ */
|
|
2883
|
+
props: /* @__PURE__ */ Xe({
|
|
2876
2884
|
tileIndex: {}
|
|
2877
2885
|
}, {
|
|
2878
2886
|
modelValue: { required: !0 },
|
|
@@ -2880,17 +2888,17 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2880
2888
|
}),
|
|
2881
2889
|
emits: ["update:modelValue"],
|
|
2882
2890
|
setup(e) {
|
|
2883
|
-
const { t: n, te: t } =
|
|
2891
|
+
const { t: n, te: t } = ut(), o = Ee(e, "modelValue"), { country: s } = kn(), { clearTileSorts: i, setTileSorts: l } = zo(), h = Tn(), c = e, C = D([]), { isEditing: N, colWidths: $, rowHeight: F } = it(Zn()), { setColWidths: y, setRowHeights: g, enableCellResizing: I } = Zn(), T = D(null), B = m(() => {
|
|
2884
2892
|
var _;
|
|
2885
2893
|
return ((_ = o.value.data) == null ? void 0 : _.columns) || [{ label: "", key: "" }];
|
|
2886
2894
|
}), v = m(() => {
|
|
2887
2895
|
var _;
|
|
2888
2896
|
return ((_ = o.value.data) == null ? void 0 : _.rows) || [];
|
|
2889
|
-
}), f = m(() => o.value.filterText),
|
|
2897
|
+
}), f = m(() => o.value.filterText), k = m(() => {
|
|
2890
2898
|
var E;
|
|
2891
2899
|
const _ = (E = o.value.grandTotalLabel) == null ? void 0 : E.trim();
|
|
2892
|
-
return _ && _.length > 0 ? _ :
|
|
2893
|
-
}),
|
|
2900
|
+
return _ && _.length > 0 ? _ : st(n, t, "Grand total", "other");
|
|
2901
|
+
}), L = m(() => {
|
|
2894
2902
|
var _, E;
|
|
2895
2903
|
if (!(f.value && f.value.trim().length > 0 || !((_ = v.value[0]) != null && _.isRollup) && !((E = v.value[v.value.length - 1]) != null && E.isRollup))) {
|
|
2896
2904
|
if (o.value.rollupPosition === et.top || o.value.rollupPosition === void 0)
|
|
@@ -2899,12 +2907,12 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2899
2907
|
return et.bottom;
|
|
2900
2908
|
}
|
|
2901
2909
|
}), x = m(() => {
|
|
2902
|
-
const R =
|
|
2910
|
+
const R = L.value !== void 0 ? 1 : 0, P = (T.value ? T.value.$el.offsetHeight : 0) - 48;
|
|
2903
2911
|
return Math.floor((P - 34.5 - 32) / 48) - R;
|
|
2904
2912
|
}), A = m(() => {
|
|
2905
2913
|
var E, z;
|
|
2906
2914
|
let _ = [];
|
|
2907
|
-
switch (
|
|
2915
|
+
switch (L.value) {
|
|
2908
2916
|
case et.top:
|
|
2909
2917
|
_ = [...((E = v.value[0]) == null ? void 0 : E.cells) || []].map((R, P) => {
|
|
2910
2918
|
var V;
|
|
@@ -2926,7 +2934,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2926
2934
|
});
|
|
2927
2935
|
break;
|
|
2928
2936
|
}
|
|
2929
|
-
return _.length > 0 && _[0].main === "" && (_[0].main =
|
|
2937
|
+
return _.length > 0 && _[0].main === "" && (_[0].main = k.value), _;
|
|
2930
2938
|
});
|
|
2931
2939
|
function w(_) {
|
|
2932
2940
|
let E = (_ == null ? void 0 : _.main) || "";
|
|
@@ -2943,7 +2951,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2943
2951
|
});
|
|
2944
2952
|
const u = D([]);
|
|
2945
2953
|
let M = 0, W;
|
|
2946
|
-
function
|
|
2954
|
+
function q() {
|
|
2947
2955
|
var P;
|
|
2948
2956
|
if (!((P = o.value) != null && P.data)) {
|
|
2949
2957
|
u.value = [];
|
|
@@ -2965,7 +2973,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2965
2973
|
key: V.key,
|
|
2966
2974
|
type: V.type
|
|
2967
2975
|
})),
|
|
2968
|
-
grandTotalPosition:
|
|
2976
|
+
grandTotalPosition: L.value,
|
|
2969
2977
|
pageSize: x.value
|
|
2970
2978
|
};
|
|
2971
2979
|
No(Dr, R).then((V) => {
|
|
@@ -2979,7 +2987,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2979
2987
|
},
|
|
2980
2988
|
{ immediate: !0, deep: !0 }
|
|
2981
2989
|
);
|
|
2982
|
-
const
|
|
2990
|
+
const ee = m(() => {
|
|
2983
2991
|
var z, R;
|
|
2984
2992
|
const _ = ((z = o.value.data) == null ? void 0 : z.rows) || [], E = ((R = o.value.data) == null ? void 0 : R.columns) || [];
|
|
2985
2993
|
return JSON.stringify({
|
|
@@ -2987,26 +2995,26 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
2987
2995
|
columns: E.map((P) => ({ key: P.key, type: P.type, label: P.label })),
|
|
2988
2996
|
filter: f.value ?? "",
|
|
2989
2997
|
globalSorts: C.value.map((P) => ({ key: P.key, type: P.type })),
|
|
2990
|
-
grandTotalPosition:
|
|
2998
|
+
grandTotalPosition: L.value,
|
|
2991
2999
|
pageSize: x.value
|
|
2992
3000
|
});
|
|
2993
3001
|
});
|
|
2994
3002
|
we(
|
|
2995
|
-
() =>
|
|
3003
|
+
() => ee.value,
|
|
2996
3004
|
() => {
|
|
2997
|
-
clearTimeout(W), W = setTimeout(
|
|
3005
|
+
clearTimeout(W), W = setTimeout(q, 200);
|
|
2998
3006
|
},
|
|
2999
3007
|
{ immediate: !0 }
|
|
3000
3008
|
);
|
|
3001
3009
|
function G(_) {
|
|
3002
3010
|
const E = C.value.find((z) => z.key === _);
|
|
3003
3011
|
if (!E) {
|
|
3004
|
-
C.value.push({ key: _, type:
|
|
3012
|
+
C.value.push({ key: _, type: Pt.Asc });
|
|
3005
3013
|
return;
|
|
3006
3014
|
}
|
|
3007
|
-
E.type ===
|
|
3015
|
+
E.type === Pt.Asc ? E.type = Pt.Desc : E.type === Pt.Desc && (C.value = C.value.filter((z) => z.key !== _));
|
|
3008
3016
|
}
|
|
3009
|
-
const
|
|
3017
|
+
const ie = m(
|
|
3010
3018
|
() => {
|
|
3011
3019
|
var _;
|
|
3012
3020
|
return (((_ = o.value.colWidths) == null ? void 0 : _.length) ?? 0) > 0 || $.value.length > 0;
|
|
@@ -3014,12 +3022,12 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3014
3022
|
), J = m(() => {
|
|
3015
3023
|
var _;
|
|
3016
3024
|
return (_ = o.value.data) != null && _.columns ? o.value.data.columns.map((E) => {
|
|
3017
|
-
const z =
|
|
3025
|
+
const z = st(n, t, E.label, "other"), R = C.value.find((ne) => ne.key === E.key), P = !!R, V = P ? R.type === Pt.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
|
|
3018
3026
|
return {
|
|
3019
3027
|
accessorKey: E.key,
|
|
3020
3028
|
header: () => {
|
|
3021
|
-
const ne =
|
|
3022
|
-
return
|
|
3029
|
+
const ne = pe("FmIcon");
|
|
3030
|
+
return Jt(
|
|
3023
3031
|
"button",
|
|
3024
3032
|
{
|
|
3025
3033
|
type: "button",
|
|
@@ -3027,12 +3035,12 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3027
3035
|
onClick: () => G(E.key)
|
|
3028
3036
|
},
|
|
3029
3037
|
[
|
|
3030
|
-
|
|
3038
|
+
Jt(
|
|
3031
3039
|
"span",
|
|
3032
3040
|
{ class: `${E.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap` },
|
|
3033
3041
|
z
|
|
3034
3042
|
),
|
|
3035
|
-
|
|
3043
|
+
Jt(ne, {
|
|
3036
3044
|
name: V,
|
|
3037
3045
|
color: P ? "primary" : "neutral-gray-400",
|
|
3038
3046
|
size: "sm",
|
|
@@ -3043,18 +3051,18 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3043
3051
|
);
|
|
3044
3052
|
},
|
|
3045
3053
|
cell: (ne) => {
|
|
3046
|
-
var Z,
|
|
3047
|
-
const
|
|
3048
|
-
return
|
|
3054
|
+
var Z, le;
|
|
3055
|
+
const K = w(ne.getValue()), X = (le = (Z = ne == null ? void 0 : ne.row) == null ? void 0 : Z.original) == null ? void 0 : le.isRollup;
|
|
3056
|
+
return Jt(
|
|
3049
3057
|
"div",
|
|
3050
3058
|
{
|
|
3051
3059
|
class: [
|
|
3052
3060
|
X ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400",
|
|
3053
3061
|
E.type === "NUMERIC" ? "text-right" : "",
|
|
3054
|
-
|
|
3062
|
+
ie.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
3055
3063
|
].join(" ")
|
|
3056
3064
|
},
|
|
3057
|
-
[E.type === "NUMERIC" ?
|
|
3065
|
+
[E.type === "NUMERIC" ? nn(K.main) : K.main]
|
|
3058
3066
|
);
|
|
3059
3067
|
},
|
|
3060
3068
|
enableSorting: !1
|
|
@@ -3071,11 +3079,11 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3071
3079
|
async () => {
|
|
3072
3080
|
var P;
|
|
3073
3081
|
await Me();
|
|
3074
|
-
const _ = (P =
|
|
3082
|
+
const _ = (P = T.value) == null ? void 0 : P.$el;
|
|
3075
3083
|
if (!_) return;
|
|
3076
3084
|
const E = _.querySelector("table");
|
|
3077
3085
|
if (!E) return;
|
|
3078
|
-
E.classList.add(
|
|
3086
|
+
E.classList.add(ie.value ? "table-fixed" : "table-auto");
|
|
3079
3087
|
let z, R;
|
|
3080
3088
|
N.value ? (I(), z = $.value, R = F.value) : (R = o.value.rowHeight, z = o.value.colWidths), typeof R == "number" && g(R, _), z == null || z.forEach((V, ne) => {
|
|
3081
3089
|
y(ne, V, _);
|
|
@@ -3083,14 +3091,14 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3083
3091
|
},
|
|
3084
3092
|
{ immediate: !0 }
|
|
3085
3093
|
), (_, E) => {
|
|
3086
|
-
const z =
|
|
3087
|
-
return Y(),
|
|
3088
|
-
|
|
3094
|
+
const z = pe("FmTable");
|
|
3095
|
+
return Y(), fe(Ve, null, [
|
|
3096
|
+
Q("div", Ir, [
|
|
3089
3097
|
nt(_.$slots, "menu")
|
|
3090
3098
|
]),
|
|
3091
|
-
|
|
3099
|
+
he(z, {
|
|
3092
3100
|
ref_key: "table",
|
|
3093
|
-
ref:
|
|
3101
|
+
ref: T,
|
|
3094
3102
|
"column-defs": J.value,
|
|
3095
3103
|
"row-data": u.value,
|
|
3096
3104
|
"search-value": f.value,
|
|
@@ -3101,25 +3109,25 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3101
3109
|
"pin-header-row": !0,
|
|
3102
3110
|
"auto-reset-page-index": !0
|
|
3103
3111
|
}, Mo({ _: 2 }, [
|
|
3104
|
-
|
|
3112
|
+
L.value ? {
|
|
3105
3113
|
name: "pin-top",
|
|
3106
|
-
fn:
|
|
3107
|
-
(Y(),
|
|
3108
|
-
default:
|
|
3109
|
-
|
|
3110
|
-
(Y(!0),
|
|
3111
|
-
key: `${r(
|
|
3114
|
+
fn: Le(() => [
|
|
3115
|
+
(Y(), ge(eo(L.value === r(et).bottom ? "tfoot" : "tbody"), null, {
|
|
3116
|
+
default: Le(() => [
|
|
3117
|
+
Q("tr", Mr, [
|
|
3118
|
+
(Y(!0), fe(Ve, null, zt(A.value, (R, P) => (Y(), fe("td", {
|
|
3119
|
+
key: `${r(Rt)()}_${P}`,
|
|
3112
3120
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
3113
3121
|
}, [
|
|
3114
|
-
|
|
3115
|
-
class:
|
|
3122
|
+
Q("span", {
|
|
3123
|
+
class: Ie([
|
|
3116
3124
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
3117
3125
|
R.rowType === "NUMERIC" ? "text-right" : "",
|
|
3118
|
-
|
|
3126
|
+
ie.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
3119
3127
|
])
|
|
3120
3128
|
}, [
|
|
3121
|
-
|
|
3122
|
-
|
|
3129
|
+
Q("p", Br, Pe(R.rowType === "NUMERIC" ? r(nn)(R.main) : R.main), 1),
|
|
3130
|
+
Q("p", Pr, Pe(R.comparison ? R.rowType === "NUMERIC" ? `(${r(nn)(R.comparison)})` : `(${R.comparison})` : ""), 1)
|
|
3123
3131
|
], 2)
|
|
3124
3132
|
]))), 128))
|
|
3125
3133
|
])
|
|
@@ -3135,7 +3143,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3135
3143
|
}
|
|
3136
3144
|
}), Ar = { class: "widget-content" }, Rr = /* @__PURE__ */ Ne({
|
|
3137
3145
|
__name: "WidgetStackBarChart",
|
|
3138
|
-
props: /* @__PURE__ */
|
|
3146
|
+
props: /* @__PURE__ */ Xe({
|
|
3139
3147
|
tileIndex: {}
|
|
3140
3148
|
}, {
|
|
3141
3149
|
modelValue: { required: !0 },
|
|
@@ -3143,14 +3151,14 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3143
3151
|
}),
|
|
3144
3152
|
emits: ["update:modelValue"],
|
|
3145
3153
|
setup(e) {
|
|
3146
|
-
const n = e, t =
|
|
3154
|
+
const n = e, t = Ee(e, "modelValue"), o = D(null), s = m(() => t.value.maxTooltipItems), {
|
|
3147
3155
|
isTooltipDetailsSheetOpen: i,
|
|
3148
3156
|
tooltipDetailsPayload: l,
|
|
3149
3157
|
tooltipOptions: h,
|
|
3150
3158
|
handleTooltipDetailsSheetVisibility: c,
|
|
3151
3159
|
handleTooltipDetailsHover: C,
|
|
3152
3160
|
handleTooltipDetailsLeave: N
|
|
3153
|
-
} =
|
|
3161
|
+
} = Wt(o, {
|
|
3154
3162
|
maxTooltipItems: s
|
|
3155
3163
|
}), $ = m(() => {
|
|
3156
3164
|
var ne;
|
|
@@ -3158,38 +3166,38 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3158
3166
|
}), F = m(() => {
|
|
3159
3167
|
var V;
|
|
3160
3168
|
return ((V = t.value.data) == null ? void 0 : V.datasets) ?? [];
|
|
3161
|
-
}), { datalabels: y, xCfg: g, yCfg: I, isTransposed:
|
|
3169
|
+
}), { datalabels: y, xCfg: g, yCfg: I, isTransposed: T, legend: B, chartWidth: v, chartHeight: f } = Dt(
|
|
3162
3170
|
t.value
|
|
3163
|
-
),
|
|
3164
|
-
() =>
|
|
3165
|
-
),
|
|
3171
|
+
), k = m(
|
|
3172
|
+
() => Lt(t.value.isTransposed === !0, h.value)
|
|
3173
|
+
), L = $t("bar"), x = m(() => t.value.stackBarOverlap === !0), A = m(() => x.value === !1), w = m(() => {
|
|
3166
3174
|
const V = B.value.position;
|
|
3167
3175
|
return !V || V === "top" || V === "bottom" || V === "left" || V === "right";
|
|
3168
3176
|
}), u = m(() => B.value.position ?? "top"), M = m(
|
|
3169
3177
|
() => u.value === "left" || u.value === "right"
|
|
3170
3178
|
), W = m(
|
|
3171
3179
|
() => u.value === "top" || u.value === "left"
|
|
3172
|
-
),
|
|
3180
|
+
), q = m(() => ({
|
|
3173
3181
|
...g.value,
|
|
3174
3182
|
stacked: A.value
|
|
3175
|
-
})),
|
|
3183
|
+
})), ee = m(() => ({
|
|
3176
3184
|
...I.value,
|
|
3177
3185
|
stacked: A.value
|
|
3178
3186
|
}));
|
|
3179
3187
|
function G({
|
|
3180
3188
|
datasetIndex: V,
|
|
3181
3189
|
colorIndex: ne,
|
|
3182
|
-
breakdownIndex:
|
|
3190
|
+
breakdownIndex: K
|
|
3183
3191
|
}) {
|
|
3184
3192
|
var ue;
|
|
3185
|
-
const X = t.value.chartColorBinding ===
|
|
3186
|
-
return Number.isInteger(
|
|
3193
|
+
const X = t.value.chartColorBinding === _e.metric ? ne : t.value.chartColorBinding === _e.breakdown ? K : V, Z = (ue = t.value.chartColorLayers) == null ? void 0 : ue[X], le = Number(Z);
|
|
3194
|
+
return Number.isInteger(le) && le > 0 ? le : X + 1;
|
|
3187
3195
|
}
|
|
3188
|
-
const
|
|
3196
|
+
const ie = m(() => {
|
|
3189
3197
|
if (F.value.length > 0) {
|
|
3190
3198
|
let V = 0, ne = 0;
|
|
3191
|
-
const
|
|
3192
|
-
const
|
|
3199
|
+
const K = F.value.map((X, Z) => {
|
|
3200
|
+
const le = t.value.chartColorBinding === _e.metric && (t.value.metricCount ?? 0) > 0 ? X.isCompare ? ne++ % Number(t.value.metricCount) : V++ % Number(t.value.metricCount) : Fe({
|
|
3193
3201
|
datasetIndex: Z,
|
|
3194
3202
|
isCompare: X.isCompare,
|
|
3195
3203
|
metricCount: t.value.metricCount,
|
|
@@ -3198,14 +3206,14 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3198
3206
|
datasetIndex: Z,
|
|
3199
3207
|
isCompare: X.isCompare,
|
|
3200
3208
|
metricCount: t.value.metricCount,
|
|
3201
|
-
mode:
|
|
3202
|
-
}),
|
|
3209
|
+
mode: _e.metric
|
|
3210
|
+
}), me = wt({
|
|
3203
3211
|
fallbackIndex: Z,
|
|
3204
3212
|
metricCount: t.value.metricCount
|
|
3205
|
-
}),
|
|
3213
|
+
}), se = G({
|
|
3206
3214
|
datasetIndex: Z,
|
|
3207
|
-
colorIndex:
|
|
3208
|
-
breakdownIndex:
|
|
3215
|
+
colorIndex: le,
|
|
3216
|
+
breakdownIndex: me
|
|
3209
3217
|
}), xe = X.values.map((Be) => Be === null ? NaN : Number(Be));
|
|
3210
3218
|
return {
|
|
3211
3219
|
dataset: {
|
|
@@ -3213,9 +3221,9 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3213
3221
|
data: xe,
|
|
3214
3222
|
dash: !!X.isCompare,
|
|
3215
3223
|
grouped: x.value ? !1 : void 0,
|
|
3216
|
-
order: x.value ?
|
|
3217
|
-
backgroundColor: t.value.chartColorBinding ===
|
|
3218
|
-
breakdownIndex:
|
|
3224
|
+
order: x.value ? se : void 0,
|
|
3225
|
+
backgroundColor: t.value.chartColorBinding === _e.breakdown ? Tt({
|
|
3226
|
+
breakdownIndex: me,
|
|
3219
3227
|
metricIndex: ue,
|
|
3220
3228
|
metricCount: t.value.metricCount,
|
|
3221
3229
|
isCompare: X.isCompare,
|
|
@@ -3223,22 +3231,22 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3223
3231
|
useSecondaryMetricShades: t.value.chartUseSecondaryMetricShades,
|
|
3224
3232
|
customColors: t.value.chartColors
|
|
3225
3233
|
}) : tt({
|
|
3226
|
-
index:
|
|
3234
|
+
index: le,
|
|
3227
3235
|
isCompare: X.isCompare,
|
|
3228
3236
|
customColors: t.value.chartColors
|
|
3229
3237
|
})
|
|
3230
3238
|
}
|
|
3231
3239
|
};
|
|
3232
3240
|
});
|
|
3233
|
-
return x.value ?
|
|
3241
|
+
return x.value ? K.map((X) => X.dataset) : K.map((X) => X.dataset);
|
|
3234
3242
|
} else
|
|
3235
3243
|
return [];
|
|
3236
|
-
}), { hiddenDatasetKeys: J, isDatasetHidden: _, toggleDatasetVisibility: E } =
|
|
3237
|
-
() =>
|
|
3244
|
+
}), { hiddenDatasetKeys: J, isDatasetHidden: _, toggleDatasetVisibility: E } = Et(ie), z = m(
|
|
3245
|
+
() => ie.value.map((V, ne) => ({
|
|
3238
3246
|
...V,
|
|
3239
3247
|
hidden: _(V, ne)
|
|
3240
3248
|
}))
|
|
3241
|
-
), R =
|
|
3249
|
+
), R = kt();
|
|
3242
3250
|
function P() {
|
|
3243
3251
|
return R.extractChartSize(o.value, n.tileIndex) || { width: 0, height: 0 };
|
|
3244
3252
|
}
|
|
@@ -3249,24 +3257,24 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3249
3257
|
}), we([z], () => {
|
|
3250
3258
|
Me(() => P());
|
|
3251
3259
|
}), (V, ne) => {
|
|
3252
|
-
var X, Z,
|
|
3253
|
-
const
|
|
3254
|
-
return Y(),
|
|
3255
|
-
|
|
3260
|
+
var X, Z, le, ue, me, se;
|
|
3261
|
+
const K = pe("FmBarChart");
|
|
3262
|
+
return Y(), fe(Ve, null, [
|
|
3263
|
+
Q("div", Ar, [
|
|
3256
3264
|
nt(V.$slots, "menu"),
|
|
3257
|
-
|
|
3258
|
-
class:
|
|
3265
|
+
Q("div", {
|
|
3266
|
+
class: Ie(["chart-layout", {
|
|
3259
3267
|
"chart-layout--side": w.value && (r(B).display ?? !1) && M.value
|
|
3260
3268
|
}])
|
|
3261
3269
|
}, [
|
|
3262
|
-
w.value && (r(B).display ?? !1) && W.value ? (Y(),
|
|
3270
|
+
w.value && (r(B).display ?? !1) && W.value ? (Y(), ge(ze, {
|
|
3263
3271
|
key: 0,
|
|
3264
3272
|
"chart-ref": o.value,
|
|
3265
3273
|
enabled: r(B).display ?? !1,
|
|
3266
3274
|
position: u.value,
|
|
3267
3275
|
"max-width": r(B).maxWidth,
|
|
3268
3276
|
"text-color": (X = r(B).labels) == null ? void 0 : X.color,
|
|
3269
|
-
"font-size": (
|
|
3277
|
+
"font-size": (le = (Z = r(B).labels) == null ? void 0 : Z.font) == null ? void 0 : le.size,
|
|
3270
3278
|
"legend-update-key": z.value,
|
|
3271
3279
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3272
3280
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -3276,37 +3284,37 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3276
3284
|
"metric-count": t.value.metricCount,
|
|
3277
3285
|
"hidden-dataset-keys": r(J),
|
|
3278
3286
|
onToggleDatasetVisibility: r(E)
|
|
3279
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3280
|
-
|
|
3287
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0),
|
|
3288
|
+
he(K, {
|
|
3281
3289
|
ref_key: "chartRef",
|
|
3282
3290
|
ref: o,
|
|
3283
3291
|
class: "bar-chart",
|
|
3284
3292
|
datasets: z.value,
|
|
3285
3293
|
"x-axis": { categories: $.value },
|
|
3286
|
-
"x-cfg":
|
|
3287
|
-
"y-cfg":
|
|
3288
|
-
transpose: r(
|
|
3294
|
+
"x-cfg": q.value,
|
|
3295
|
+
"y-cfg": ee.value,
|
|
3296
|
+
transpose: r(T),
|
|
3289
3297
|
stacked: A.value,
|
|
3290
3298
|
legend: {
|
|
3291
3299
|
display: !1
|
|
3292
3300
|
},
|
|
3293
|
-
tooltip:
|
|
3294
|
-
plugins: [r(
|
|
3301
|
+
tooltip: k.value,
|
|
3302
|
+
plugins: [r(L)],
|
|
3295
3303
|
datalabels: r(y),
|
|
3296
3304
|
"maintain-aspect-ratio": !1,
|
|
3297
|
-
style:
|
|
3305
|
+
style: De({
|
|
3298
3306
|
"--chart-width": w.value && (r(B).display ?? !1) && M.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(v) !== void 0 ? r(v) + "px" : "100%",
|
|
3299
3307
|
"--chart-height": w.value && (r(B).display ?? !1) && !M.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(f) !== void 0 ? r(f) + "px" : "100%"
|
|
3300
3308
|
})
|
|
3301
3309
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "stacked", "tooltip", "plugins", "datalabels", "style"]),
|
|
3302
|
-
w.value && (r(B).display ?? !1) && !W.value ? (Y(),
|
|
3310
|
+
w.value && (r(B).display ?? !1) && !W.value ? (Y(), ge(ze, {
|
|
3303
3311
|
key: 1,
|
|
3304
3312
|
"chart-ref": o.value,
|
|
3305
3313
|
enabled: r(B).display ?? !1,
|
|
3306
3314
|
position: u.value,
|
|
3307
3315
|
"max-width": r(B).maxWidth,
|
|
3308
3316
|
"text-color": (ue = r(B).labels) == null ? void 0 : ue.color,
|
|
3309
|
-
"font-size": (
|
|
3317
|
+
"font-size": (se = (me = r(B).labels) == null ? void 0 : me.font) == null ? void 0 : se.size,
|
|
3310
3318
|
"legend-update-key": z.value,
|
|
3311
3319
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3312
3320
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -3316,10 +3324,10 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3316
3324
|
"metric-count": t.value.metricCount,
|
|
3317
3325
|
"hidden-dataset-keys": r(J),
|
|
3318
3326
|
onToggleDatasetVisibility: r(E)
|
|
3319
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3327
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0)
|
|
3320
3328
|
], 2)
|
|
3321
3329
|
]),
|
|
3322
|
-
|
|
3330
|
+
he(Ht, {
|
|
3323
3331
|
"model-value": r(i),
|
|
3324
3332
|
"details-payload": r(l),
|
|
3325
3333
|
"onUpdate:modelValue": r(c),
|
|
@@ -3331,7 +3339,7 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3331
3339
|
}
|
|
3332
3340
|
}), zr = { class: "widget-content" }, Nr = /* @__PURE__ */ Ne({
|
|
3333
3341
|
__name: "WidgetClusteredStackBarchart",
|
|
3334
|
-
props: /* @__PURE__ */
|
|
3342
|
+
props: /* @__PURE__ */ Xe({
|
|
3335
3343
|
tileIndex: {}
|
|
3336
3344
|
}, {
|
|
3337
3345
|
modelValue: { required: !0 },
|
|
@@ -3339,118 +3347,118 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3339
3347
|
}),
|
|
3340
3348
|
emits: ["update:modelValue"],
|
|
3341
3349
|
setup(e) {
|
|
3342
|
-
const n = e, t =
|
|
3350
|
+
const n = e, t = Ee(e, "modelValue"), o = D(null), s = m(() => t.value.maxTooltipItems), {
|
|
3343
3351
|
isTooltipDetailsSheetOpen: i,
|
|
3344
3352
|
tooltipDetailsPayload: l,
|
|
3345
3353
|
tooltipOptions: h,
|
|
3346
3354
|
handleTooltipDetailsSheetVisibility: c,
|
|
3347
3355
|
handleTooltipDetailsHover: C,
|
|
3348
3356
|
handleTooltipDetailsLeave: N
|
|
3349
|
-
} =
|
|
3357
|
+
} = Wt(o, {
|
|
3350
3358
|
maxTooltipItems: s
|
|
3351
3359
|
}), $ = m(() => {
|
|
3352
|
-
var
|
|
3353
|
-
return ((
|
|
3360
|
+
var K;
|
|
3361
|
+
return ((K = t.value.data) == null ? void 0 : K.xAxis) || [];
|
|
3354
3362
|
}), F = m(() => {
|
|
3355
|
-
var
|
|
3356
|
-
return ((
|
|
3357
|
-
}), { datalabels: y, xCfg: g, yCfg: I, isTransposed:
|
|
3363
|
+
var K;
|
|
3364
|
+
return ((K = t.value.data) == null ? void 0 : K.datasets) ?? [];
|
|
3365
|
+
}), { datalabels: y, xCfg: g, yCfg: I, isTransposed: T, legend: B, chartWidth: v, chartHeight: f } = Dt(
|
|
3358
3366
|
t.value
|
|
3359
|
-
),
|
|
3360
|
-
() =>
|
|
3361
|
-
),
|
|
3362
|
-
const
|
|
3363
|
-
return !
|
|
3367
|
+
), k = m(
|
|
3368
|
+
() => Lt(t.value.isTransposed === !0, h.value)
|
|
3369
|
+
), L = $t("bar"), x = m(() => t.value.stackBarOverlap === !0), A = m(() => x.value === !1), w = m(() => {
|
|
3370
|
+
const K = B.value.position;
|
|
3371
|
+
return !K || K === "top" || K === "bottom" || K === "left" || K === "right";
|
|
3364
3372
|
}), u = m(() => B.value.position ?? "top"), M = m(
|
|
3365
3373
|
() => u.value === "left" || u.value === "right"
|
|
3366
3374
|
), W = m(
|
|
3367
3375
|
() => u.value === "top" || u.value === "left"
|
|
3368
|
-
),
|
|
3376
|
+
), q = m(() => ({
|
|
3369
3377
|
...g.value,
|
|
3370
3378
|
stacked: A.value
|
|
3371
|
-
})),
|
|
3379
|
+
})), ee = m(() => ({
|
|
3372
3380
|
...I.value,
|
|
3373
3381
|
stacked: A.value
|
|
3374
3382
|
}));
|
|
3375
|
-
function G(
|
|
3376
|
-
const X = " - ", Z =
|
|
3383
|
+
function G(K) {
|
|
3384
|
+
const X = " - ", Z = K.lastIndexOf(X);
|
|
3377
3385
|
return Z < 0 ? {
|
|
3378
|
-
clusterKey:
|
|
3379
|
-
metricLabel:
|
|
3386
|
+
clusterKey: K,
|
|
3387
|
+
metricLabel: K
|
|
3380
3388
|
} : {
|
|
3381
|
-
clusterKey:
|
|
3382
|
-
metricLabel:
|
|
3389
|
+
clusterKey: K.slice(0, Z),
|
|
3390
|
+
metricLabel: K.slice(Z + X.length)
|
|
3383
3391
|
};
|
|
3384
3392
|
}
|
|
3385
|
-
function
|
|
3386
|
-
if (typeof
|
|
3387
|
-
const Z =
|
|
3393
|
+
function ie(K, X) {
|
|
3394
|
+
if (typeof K == "string") {
|
|
3395
|
+
const Z = K.trim();
|
|
3388
3396
|
if (Z.length > 0)
|
|
3389
3397
|
return Z;
|
|
3390
3398
|
}
|
|
3391
3399
|
return `Series ${X + 1}`;
|
|
3392
3400
|
}
|
|
3393
3401
|
function J({
|
|
3394
|
-
datasetIndex:
|
|
3402
|
+
datasetIndex: K,
|
|
3395
3403
|
colorIndex: X
|
|
3396
3404
|
}) {
|
|
3397
|
-
var
|
|
3398
|
-
const Z = t.value.chartColorBinding ===
|
|
3405
|
+
var me;
|
|
3406
|
+
const Z = t.value.chartColorBinding === _e.metric ? X : K, le = (me = t.value.chartColorLayers) == null ? void 0 : me[Z], ue = Number(le);
|
|
3399
3407
|
return Number.isInteger(ue) && ue > 0 ? ue : Z + 1;
|
|
3400
3408
|
}
|
|
3401
3409
|
const _ = m(() => {
|
|
3402
3410
|
if (F.value.length === 0)
|
|
3403
3411
|
return [];
|
|
3404
|
-
const
|
|
3405
|
-
source:
|
|
3412
|
+
const K = F.value.map((se, ce) => ({
|
|
3413
|
+
source: se,
|
|
3406
3414
|
index: ce,
|
|
3407
|
-
name:
|
|
3408
|
-
values: (
|
|
3415
|
+
name: ie(se == null ? void 0 : se.name, ce),
|
|
3416
|
+
values: (se == null ? void 0 : se.values) ?? []
|
|
3409
3417
|
})), X = /* @__PURE__ */ new Map(), Z = /* @__PURE__ */ new Map();
|
|
3410
|
-
for (const
|
|
3411
|
-
const { clusterKey: ce, metricLabel: xe } = G(
|
|
3418
|
+
for (const se of K) {
|
|
3419
|
+
const { clusterKey: ce, metricLabel: xe } = G(se.name);
|
|
3412
3420
|
Z.has(ce) || Z.set(ce, Z.size), X.has(xe) || X.set(xe, X.size);
|
|
3413
3421
|
}
|
|
3414
|
-
const
|
|
3415
|
-
return
|
|
3422
|
+
const le = Math.max(X.size, 1), ue = t.value.chartColorBinding === _e.breakdown, me = t.value.chartUseSecondaryMetricShades !== !1;
|
|
3423
|
+
return K.map((se) => {
|
|
3416
3424
|
const ce = Fe({
|
|
3417
|
-
datasetIndex:
|
|
3418
|
-
isCompare:
|
|
3425
|
+
datasetIndex: se.index,
|
|
3426
|
+
isCompare: se.source.isCompare,
|
|
3419
3427
|
metricCount: t.value.metricCount,
|
|
3420
3428
|
mode: t.value.chartColorBinding
|
|
3421
|
-
}), { clusterKey: xe, metricLabel: Be } = G(
|
|
3429
|
+
}), { clusterKey: xe, metricLabel: Be } = G(se.name), He = Z.get(xe) ?? 0, We = X.get(Be) ?? 0, Ye = ue ? Tt({
|
|
3422
3430
|
breakdownIndex: He,
|
|
3423
3431
|
metricIndex: We,
|
|
3424
|
-
metricCount:
|
|
3425
|
-
isCompare:
|
|
3432
|
+
metricCount: le,
|
|
3433
|
+
isCompare: se.source.isCompare,
|
|
3426
3434
|
breakdownColors: t.value.chartBreakdownColors,
|
|
3427
|
-
useSecondaryMetricShades:
|
|
3435
|
+
useSecondaryMetricShades: me,
|
|
3428
3436
|
colorMode: "clustered"
|
|
3429
3437
|
}) : tt({
|
|
3430
3438
|
index: ce,
|
|
3431
|
-
isCompare:
|
|
3439
|
+
isCompare: se.source.isCompare,
|
|
3432
3440
|
customColors: t.value.chartColors
|
|
3433
|
-
}),
|
|
3434
|
-
datasetIndex:
|
|
3441
|
+
}), ct = J({
|
|
3442
|
+
datasetIndex: se.index,
|
|
3435
3443
|
colorIndex: ce
|
|
3436
|
-
}), ot =
|
|
3444
|
+
}), ot = se.values.map((Ge) => Ge === null ? NaN : Number(Ge));
|
|
3437
3445
|
return {
|
|
3438
|
-
label:
|
|
3446
|
+
label: se.name,
|
|
3439
3447
|
tooltipLabel: `${xe} - ${Be}`,
|
|
3440
3448
|
data: ot,
|
|
3441
|
-
dash: !!
|
|
3449
|
+
dash: !!se.source.isCompare,
|
|
3442
3450
|
grouped: !0,
|
|
3443
|
-
order: x.value ?
|
|
3444
|
-
stack:
|
|
3445
|
-
backgroundColor:
|
|
3451
|
+
order: x.value ? ct : void 0,
|
|
3452
|
+
stack: se.source.isCompare ? `${xe}__compare` : `${xe}__main`,
|
|
3453
|
+
backgroundColor: Ye
|
|
3446
3454
|
};
|
|
3447
3455
|
});
|
|
3448
|
-
}), { hiddenDatasetKeys: E, isDatasetHidden: z, toggleDatasetVisibility: R } =
|
|
3449
|
-
() => _.value.map((
|
|
3450
|
-
...
|
|
3451
|
-
hidden: z(
|
|
3456
|
+
}), { hiddenDatasetKeys: E, isDatasetHidden: z, toggleDatasetVisibility: R } = Et(_), P = m(
|
|
3457
|
+
() => _.value.map((K, X) => ({
|
|
3458
|
+
...K,
|
|
3459
|
+
hidden: z(K, X)
|
|
3452
3460
|
}))
|
|
3453
|
-
), V =
|
|
3461
|
+
), V = kt();
|
|
3454
3462
|
function ne() {
|
|
3455
3463
|
return V.extractChartSize(o.value, n.tileIndex) || { width: 0, height: 0 };
|
|
3456
3464
|
}
|
|
@@ -3460,25 +3468,25 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3460
3468
|
});
|
|
3461
3469
|
}), we([P], () => {
|
|
3462
3470
|
Me(() => ne());
|
|
3463
|
-
}), (
|
|
3464
|
-
var
|
|
3465
|
-
const Z =
|
|
3466
|
-
return Y(),
|
|
3467
|
-
|
|
3468
|
-
nt(
|
|
3469
|
-
|
|
3470
|
-
class:
|
|
3471
|
+
}), (K, X) => {
|
|
3472
|
+
var le, ue, me, se, ce, xe;
|
|
3473
|
+
const Z = pe("FmBarChart");
|
|
3474
|
+
return Y(), fe(Ve, null, [
|
|
3475
|
+
Q("div", zr, [
|
|
3476
|
+
nt(K.$slots, "menu"),
|
|
3477
|
+
Q("div", {
|
|
3478
|
+
class: Ie(["chart-layout", {
|
|
3471
3479
|
"chart-layout--side": w.value && (r(B).display ?? !1) && M.value
|
|
3472
3480
|
}])
|
|
3473
3481
|
}, [
|
|
3474
|
-
w.value && (r(B).display ?? !1) && W.value ? (Y(),
|
|
3482
|
+
w.value && (r(B).display ?? !1) && W.value ? (Y(), ge(ze, {
|
|
3475
3483
|
key: 0,
|
|
3476
3484
|
"chart-ref": o.value,
|
|
3477
3485
|
enabled: r(B).display ?? !1,
|
|
3478
3486
|
position: u.value,
|
|
3479
3487
|
"max-width": r(B).maxWidth,
|
|
3480
|
-
"text-color": (
|
|
3481
|
-
"font-size": (
|
|
3488
|
+
"text-color": (le = r(B).labels) == null ? void 0 : le.color,
|
|
3489
|
+
"font-size": (me = (ue = r(B).labels) == null ? void 0 : ue.font) == null ? void 0 : me.size,
|
|
3482
3490
|
"legend-update-key": P.value,
|
|
3483
3491
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3484
3492
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -3488,36 +3496,36 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3488
3496
|
"metric-count": t.value.metricCount,
|
|
3489
3497
|
"hidden-dataset-keys": r(E),
|
|
3490
3498
|
onToggleDatasetVisibility: r(R)
|
|
3491
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3492
|
-
|
|
3499
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0),
|
|
3500
|
+
he(Z, {
|
|
3493
3501
|
ref_key: "chartRef",
|
|
3494
3502
|
ref: o,
|
|
3495
3503
|
class: "bar-chart",
|
|
3496
3504
|
datasets: P.value,
|
|
3497
3505
|
"x-axis": { categories: $.value },
|
|
3498
|
-
"x-cfg":
|
|
3499
|
-
"y-cfg":
|
|
3500
|
-
transpose: r(
|
|
3506
|
+
"x-cfg": q.value,
|
|
3507
|
+
"y-cfg": ee.value,
|
|
3508
|
+
transpose: r(T),
|
|
3501
3509
|
stacked: A.value,
|
|
3502
3510
|
legend: {
|
|
3503
3511
|
display: !1
|
|
3504
3512
|
},
|
|
3505
|
-
tooltip:
|
|
3506
|
-
plugins: [r(
|
|
3513
|
+
tooltip: k.value,
|
|
3514
|
+
plugins: [r(L)],
|
|
3507
3515
|
datalabels: r(y),
|
|
3508
3516
|
"maintain-aspect-ratio": !1,
|
|
3509
|
-
style:
|
|
3517
|
+
style: De({
|
|
3510
3518
|
"--chart-width": w.value && (r(B).display ?? !1) && M.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(v) !== void 0 ? r(v) + "px" : "100%",
|
|
3511
3519
|
"--chart-height": w.value && (r(B).display ?? !1) && !M.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(f) !== void 0 ? r(f) + "px" : "100%"
|
|
3512
3520
|
})
|
|
3513
3521
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "stacked", "tooltip", "plugins", "datalabels", "style"]),
|
|
3514
|
-
w.value && (r(B).display ?? !1) && !W.value ? (Y(),
|
|
3522
|
+
w.value && (r(B).display ?? !1) && !W.value ? (Y(), ge(ze, {
|
|
3515
3523
|
key: 1,
|
|
3516
3524
|
"chart-ref": o.value,
|
|
3517
3525
|
enabled: r(B).display ?? !1,
|
|
3518
3526
|
position: u.value,
|
|
3519
3527
|
"max-width": r(B).maxWidth,
|
|
3520
|
-
"text-color": (
|
|
3528
|
+
"text-color": (se = r(B).labels) == null ? void 0 : se.color,
|
|
3521
3529
|
"font-size": (xe = (ce = r(B).labels) == null ? void 0 : ce.font) == null ? void 0 : xe.size,
|
|
3522
3530
|
"legend-update-key": P.value,
|
|
3523
3531
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
@@ -3528,10 +3536,10 @@ const Tr = /* @__PURE__ */ oo(_r, [["render", kr]]), Lr = "mf-reporttable-dimens
|
|
|
3528
3536
|
"metric-count": t.value.metricCount,
|
|
3529
3537
|
"hidden-dataset-keys": r(E),
|
|
3530
3538
|
onToggleDatasetVisibility: r(R)
|
|
3531
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3539
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0)
|
|
3532
3540
|
], 2)
|
|
3533
3541
|
]),
|
|
3534
|
-
|
|
3542
|
+
he(Ht, {
|
|
3535
3543
|
"model-value": r(i),
|
|
3536
3544
|
"details-payload": r(l),
|
|
3537
3545
|
"onUpdate:modelValue": r(c),
|
|
@@ -3560,7 +3568,7 @@ function vo(e = "report-line-style-plugin") {
|
|
|
3560
3568
|
}
|
|
3561
3569
|
const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
3562
3570
|
__name: "WidgetStackLineChart",
|
|
3563
|
-
props: /* @__PURE__ */
|
|
3571
|
+
props: /* @__PURE__ */ Xe({
|
|
3564
3572
|
tileIndex: {}
|
|
3565
3573
|
}, {
|
|
3566
3574
|
modelValue: { required: !0 },
|
|
@@ -3568,14 +3576,14 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3568
3576
|
}),
|
|
3569
3577
|
emits: ["update:modelValue"],
|
|
3570
3578
|
setup(e) {
|
|
3571
|
-
const n = e, t =
|
|
3579
|
+
const n = e, t = Ee(e, "modelValue"), o = D(null), s = m(() => t.value.maxTooltipItems), {
|
|
3572
3580
|
isTooltipDetailsSheetOpen: i,
|
|
3573
3581
|
tooltipDetailsPayload: l,
|
|
3574
3582
|
tooltipOptions: h,
|
|
3575
3583
|
handleTooltipDetailsSheetVisibility: c,
|
|
3576
3584
|
handleTooltipDetailsHover: C,
|
|
3577
3585
|
handleTooltipDetailsLeave: N
|
|
3578
|
-
} =
|
|
3586
|
+
} = Wt(o, {
|
|
3579
3587
|
maxTooltipItems: s
|
|
3580
3588
|
}), $ = m(() => {
|
|
3581
3589
|
var R;
|
|
@@ -3585,23 +3593,23 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3585
3593
|
), y = m(() => F.value ? ["", $.value[0], ""] : $.value), g = m(() => {
|
|
3586
3594
|
var R;
|
|
3587
3595
|
return ((R = t.value.data) == null ? void 0 : R.datasets) ?? [];
|
|
3588
|
-
}), { datalabels: I, xCfg:
|
|
3596
|
+
}), { datalabels: I, xCfg: T, yCfg: B, isTransposed: v, legend: f, chartWidth: k, chartHeight: L } = Dt(
|
|
3589
3597
|
t.value
|
|
3590
3598
|
), x = m(
|
|
3591
|
-
() =>
|
|
3592
|
-
), A =
|
|
3599
|
+
() => Lt(t.value.isTransposed === !0, h.value)
|
|
3600
|
+
), A = $t("line"), w = vo("report-line-style-plugin-stack-line"), u = m(() => {
|
|
3593
3601
|
const R = f.value.position;
|
|
3594
3602
|
return !R || R === "top" || R === "bottom" || R === "left" || R === "right";
|
|
3595
3603
|
}), M = m(() => f.value.position ?? "top"), W = m(
|
|
3596
3604
|
() => M.value === "left" || M.value === "right"
|
|
3597
|
-
),
|
|
3605
|
+
), q = m(
|
|
3598
3606
|
() => M.value === "top" || M.value === "left"
|
|
3599
|
-
),
|
|
3607
|
+
), ee = m(() => g.value.length > 0 ? [
|
|
3600
3608
|
...g.value.map((R, P) => {
|
|
3601
3609
|
var ce;
|
|
3602
3610
|
let V = R.values;
|
|
3603
3611
|
F.value && (V = [NaN, V[0], NaN]);
|
|
3604
|
-
const ne = V.map((xe) => xe === null ? NaN : Number(xe)),
|
|
3612
|
+
const ne = V.map((xe) => xe === null ? NaN : Number(xe)), K = Fe({
|
|
3605
3613
|
datasetIndex: P,
|
|
3606
3614
|
isCompare: R.isCompare,
|
|
3607
3615
|
metricCount: t.value.metricCount,
|
|
@@ -3610,17 +3618,17 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3610
3618
|
datasetIndex: P,
|
|
3611
3619
|
isCompare: R.isCompare,
|
|
3612
3620
|
metricCount: t.value.metricCount,
|
|
3613
|
-
mode:
|
|
3621
|
+
mode: _e.metric
|
|
3614
3622
|
}), Z = Fe({
|
|
3615
3623
|
datasetIndex: P,
|
|
3616
3624
|
isCompare: R.isCompare,
|
|
3617
3625
|
metricCount: t.value.metricCount,
|
|
3618
3626
|
mode: t.value.lineStyleBinding
|
|
3619
|
-
}),
|
|
3627
|
+
}), le = (ce = t.value.lineStyles) == null ? void 0 : ce[Z], ue = t.value.chartColorBinding === _e.breakdown, me = wt({
|
|
3620
3628
|
fallbackIndex: P,
|
|
3621
3629
|
metricCount: t.value.metricCount
|
|
3622
|
-
}),
|
|
3623
|
-
breakdownIndex:
|
|
3630
|
+
}), se = ue ? Tt({
|
|
3631
|
+
breakdownIndex: me,
|
|
3624
3632
|
metricIndex: X,
|
|
3625
3633
|
metricCount: t.value.metricCount,
|
|
3626
3634
|
isCompare: R.isCompare,
|
|
@@ -3628,7 +3636,7 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3628
3636
|
useSecondaryMetricShades: t.value.chartUseSecondaryMetricShades,
|
|
3629
3637
|
customColors: t.value.chartColors
|
|
3630
3638
|
}) : tt({
|
|
3631
|
-
index:
|
|
3639
|
+
index: K,
|
|
3632
3640
|
isCompare: R.isCompare,
|
|
3633
3641
|
customColors: t.value.chartColors
|
|
3634
3642
|
});
|
|
@@ -3636,22 +3644,22 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3636
3644
|
label: R.name,
|
|
3637
3645
|
data: ne,
|
|
3638
3646
|
dash: R.isCompare,
|
|
3639
|
-
lineStyle:
|
|
3647
|
+
lineStyle: le,
|
|
3640
3648
|
fill: !0,
|
|
3641
|
-
color:
|
|
3649
|
+
color: se,
|
|
3642
3650
|
pointRadius: F.value ? 4 : void 0,
|
|
3643
3651
|
pointHoverRadius: F.value ? 6 : void 0,
|
|
3644
|
-
pointBackgroundColor: F.value ?
|
|
3645
|
-
pointBorderColor: F.value ?
|
|
3652
|
+
pointBackgroundColor: F.value ? se : void 0,
|
|
3653
|
+
pointBorderColor: F.value ? se : void 0,
|
|
3646
3654
|
pointBorderWidth: F.value ? 2 : void 0
|
|
3647
3655
|
};
|
|
3648
3656
|
})
|
|
3649
|
-
] : []), { hiddenDatasetKeys: G, isDatasetHidden:
|
|
3650
|
-
() =>
|
|
3657
|
+
] : []), { hiddenDatasetKeys: G, isDatasetHidden: ie, toggleDatasetVisibility: J } = Et(ee), _ = m(
|
|
3658
|
+
() => ee.value.map((R, P) => ({
|
|
3651
3659
|
...R,
|
|
3652
|
-
hidden:
|
|
3660
|
+
hidden: ie(R, P)
|
|
3653
3661
|
}))
|
|
3654
|
-
), E =
|
|
3662
|
+
), E = kt();
|
|
3655
3663
|
function z() {
|
|
3656
3664
|
return E.extractChartSize(o.value, n.tileIndex) || { width: 0, height: 0 };
|
|
3657
3665
|
}
|
|
@@ -3662,24 +3670,24 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3662
3670
|
}), we([_], () => {
|
|
3663
3671
|
Me(() => z());
|
|
3664
3672
|
}), (R, P) => {
|
|
3665
|
-
var ne,
|
|
3666
|
-
const V =
|
|
3667
|
-
return Y(),
|
|
3668
|
-
|
|
3673
|
+
var ne, K, X, Z, le, ue;
|
|
3674
|
+
const V = pe("FmLineChart");
|
|
3675
|
+
return Y(), fe(Ve, null, [
|
|
3676
|
+
Q("div", $r, [
|
|
3669
3677
|
nt(R.$slots, "menu"),
|
|
3670
|
-
|
|
3671
|
-
class:
|
|
3678
|
+
Q("div", {
|
|
3679
|
+
class: Ie(["chart-layout", {
|
|
3672
3680
|
"chart-layout--side": u.value && (r(f).display ?? !1) && W.value
|
|
3673
3681
|
}])
|
|
3674
3682
|
}, [
|
|
3675
|
-
u.value && (r(f).display ?? !1) &&
|
|
3683
|
+
u.value && (r(f).display ?? !1) && q.value ? (Y(), ge(ze, {
|
|
3676
3684
|
key: 0,
|
|
3677
3685
|
"chart-ref": o.value,
|
|
3678
3686
|
enabled: r(f).display ?? !1,
|
|
3679
3687
|
position: M.value,
|
|
3680
3688
|
"max-width": r(f).maxWidth,
|
|
3681
3689
|
"text-color": (ne = r(f).labels) == null ? void 0 : ne.color,
|
|
3682
|
-
"font-size": (X = (
|
|
3690
|
+
"font-size": (X = (K = r(f).labels) == null ? void 0 : K.font) == null ? void 0 : X.size,
|
|
3683
3691
|
"legend-update-key": _.value,
|
|
3684
3692
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3685
3693
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -3689,14 +3697,14 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3689
3697
|
"metric-count": t.value.metricCount,
|
|
3690
3698
|
"hidden-dataset-keys": r(G),
|
|
3691
3699
|
onToggleDatasetVisibility: r(J)
|
|
3692
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3693
|
-
|
|
3700
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0),
|
|
3701
|
+
he(V, {
|
|
3694
3702
|
ref_key: "chartRef",
|
|
3695
3703
|
ref: o,
|
|
3696
3704
|
class: "line-chart",
|
|
3697
3705
|
datasets: _.value,
|
|
3698
3706
|
"x-axis": { categories: y.value },
|
|
3699
|
-
"x-cfg": r(
|
|
3707
|
+
"x-cfg": r(T),
|
|
3700
3708
|
"y-cfg": r(B),
|
|
3701
3709
|
transpose: r(v),
|
|
3702
3710
|
legend: {
|
|
@@ -3707,19 +3715,19 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3707
3715
|
stacked: !0,
|
|
3708
3716
|
datalabels: r(I),
|
|
3709
3717
|
"maintain-aspect-ratio": !1,
|
|
3710
|
-
style:
|
|
3711
|
-
"--chart-width": u.value && (r(f).display ?? !1) && W.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(
|
|
3712
|
-
"--chart-height": u.value && (r(f).display ?? !1) && !W.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(
|
|
3718
|
+
style: De({
|
|
3719
|
+
"--chart-width": u.value && (r(f).display ?? !1) && W.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(k) !== void 0 ? r(k) + "px" : "100%",
|
|
3720
|
+
"--chart-height": u.value && (r(f).display ?? !1) && !W.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(L) !== void 0 ? r(L) + "px" : "100%"
|
|
3713
3721
|
})
|
|
3714
3722
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "tooltip", "plugins", "datalabels", "style"]),
|
|
3715
|
-
u.value && (r(f).display ?? !1) && !
|
|
3723
|
+
u.value && (r(f).display ?? !1) && !q.value ? (Y(), ge(ze, {
|
|
3716
3724
|
key: 1,
|
|
3717
3725
|
"chart-ref": o.value,
|
|
3718
3726
|
enabled: r(f).display ?? !1,
|
|
3719
3727
|
position: M.value,
|
|
3720
3728
|
"max-width": r(f).maxWidth,
|
|
3721
3729
|
"text-color": (Z = r(f).labels) == null ? void 0 : Z.color,
|
|
3722
|
-
"font-size": (ue = (
|
|
3730
|
+
"font-size": (ue = (le = r(f).labels) == null ? void 0 : le.font) == null ? void 0 : ue.size,
|
|
3723
3731
|
"legend-update-key": _.value,
|
|
3724
3732
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3725
3733
|
"chart-color-binding": t.value.chartColorBinding,
|
|
@@ -3729,10 +3737,10 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3729
3737
|
"metric-count": t.value.metricCount,
|
|
3730
3738
|
"hidden-dataset-keys": r(G),
|
|
3731
3739
|
onToggleDatasetVisibility: r(J)
|
|
3732
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) :
|
|
3740
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "use-point-style", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "onToggleDatasetVisibility"])) : be("", !0)
|
|
3733
3741
|
], 2)
|
|
3734
3742
|
]),
|
|
3735
|
-
|
|
3743
|
+
he(Ht, {
|
|
3736
3744
|
"model-value": r(i),
|
|
3737
3745
|
"details-payload": r(l),
|
|
3738
3746
|
"onUpdate:modelValue": r(c),
|
|
@@ -3742,7 +3750,7 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3742
3750
|
], 64);
|
|
3743
3751
|
};
|
|
3744
3752
|
}
|
|
3745
|
-
}),
|
|
3753
|
+
}), _t = [
|
|
3746
3754
|
"col-span-1",
|
|
3747
3755
|
"col-span-2",
|
|
3748
3756
|
"col-span-3",
|
|
@@ -3757,17 +3765,17 @@ const $r = { class: "widget-content" }, Hr = /* @__PURE__ */ Ne({
|
|
|
3757
3765
|
"col-span-12"
|
|
3758
3766
|
];
|
|
3759
3767
|
function Wr(e) {
|
|
3760
|
-
return e < 12 ?
|
|
3768
|
+
return e < 12 ? _t[e - 1] : _t[11];
|
|
3761
3769
|
}
|
|
3762
3770
|
function Er(e) {
|
|
3763
|
-
return e < 12 ?
|
|
3771
|
+
return e < 12 ? _t[Math.min(11, e * 2 - 1)] : _t[11];
|
|
3764
3772
|
}
|
|
3765
3773
|
function Or(e) {
|
|
3766
|
-
return e < 12 ?
|
|
3774
|
+
return e < 12 ? _t[Math.min(11, e * 3 - 1)] : _t[11];
|
|
3767
3775
|
}
|
|
3768
3776
|
const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
3769
3777
|
__name: "WidgetLinechart",
|
|
3770
|
-
props: /* @__PURE__ */
|
|
3778
|
+
props: /* @__PURE__ */ Xe({
|
|
3771
3779
|
tileIndex: {}
|
|
3772
3780
|
}, {
|
|
3773
3781
|
modelValue: { required: !0 },
|
|
@@ -3775,14 +3783,14 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3775
3783
|
}),
|
|
3776
3784
|
emits: ["update:modelValue"],
|
|
3777
3785
|
setup(e) {
|
|
3778
|
-
const n = e, t =
|
|
3786
|
+
const n = e, t = Ee(e, "modelValue"), o = D(null), s = m(() => t.value.maxTooltipItems), {
|
|
3779
3787
|
isTooltipDetailsSheetOpen: i,
|
|
3780
3788
|
tooltipDetailsPayload: l,
|
|
3781
3789
|
tooltipOptions: h,
|
|
3782
3790
|
handleTooltipDetailsSheetVisibility: c,
|
|
3783
3791
|
handleTooltipDetailsHover: C,
|
|
3784
3792
|
handleTooltipDetailsLeave: N
|
|
3785
|
-
} =
|
|
3793
|
+
} = Wt(o, {
|
|
3786
3794
|
maxTooltipItems: s
|
|
3787
3795
|
}), $ = m(() => {
|
|
3788
3796
|
var P;
|
|
@@ -3792,16 +3800,16 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3792
3800
|
return ((P = t.value.data) == null ? void 0 : P.xAxis) ?? [];
|
|
3793
3801
|
}), y = m(() => F.value.length === 1 && $.value.length > 1 && $.value.every((P) => P.values.length === 1 && P.isCompare !== !0)), g = m(
|
|
3794
3802
|
() => F.value.length === 1 && $.value.length > 0 && $.value.every((P) => P.values.length === 1)
|
|
3795
|
-
), I = m(() => y.value ? $.value.map((P) => P.name) : g.value ? ["", F.value[0], ""] : F.value), { datalabels:
|
|
3803
|
+
), I = m(() => y.value ? $.value.map((P) => P.name) : g.value ? ["", F.value[0], ""] : F.value), { datalabels: T, xCfg: B, yCfg: v, isTransposed: f, legend: k, chartWidth: L, chartHeight: x } = Dt(
|
|
3796
3804
|
t.value
|
|
3797
3805
|
), A = m(
|
|
3798
|
-
() =>
|
|
3799
|
-
), w =
|
|
3800
|
-
const P =
|
|
3806
|
+
() => Lt(t.value.isTransposed === !0, h.value)
|
|
3807
|
+
), w = $t("line"), u = vo("report-line-style-plugin-line"), M = m(() => {
|
|
3808
|
+
const P = k.value.position;
|
|
3801
3809
|
return !P || P === "top" || P === "bottom" || P === "left" || P === "right";
|
|
3802
|
-
}), W = m(() =>
|
|
3810
|
+
}), W = m(() => k.value.position ?? "top"), q = m(
|
|
3803
3811
|
() => W.value === "left" || W.value === "right"
|
|
3804
|
-
),
|
|
3812
|
+
), ee = m(
|
|
3805
3813
|
() => W.value === "top" || W.value === "left"
|
|
3806
3814
|
), G = m(() => $.value.length > 0 ? [
|
|
3807
3815
|
...$.value.map((P, V) => {
|
|
@@ -3811,32 +3819,32 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3811
3819
|
isCompare: P.isCompare,
|
|
3812
3820
|
metricCount: t.value.metricCount,
|
|
3813
3821
|
mode: t.value.chartColorBinding
|
|
3814
|
-
}),
|
|
3822
|
+
}), K = Fe({
|
|
3815
3823
|
datasetIndex: V,
|
|
3816
3824
|
isCompare: P.isCompare,
|
|
3817
3825
|
metricCount: t.value.metricCount,
|
|
3818
|
-
mode:
|
|
3826
|
+
mode: _e.metric
|
|
3819
3827
|
}), X = tt({
|
|
3820
3828
|
index: ne,
|
|
3821
3829
|
isCompare: P.isCompare,
|
|
3822
3830
|
customColors: t.value.chartColors
|
|
3823
|
-
}), Z = t.value.chartColorBinding ===
|
|
3831
|
+
}), Z = t.value.chartColorBinding === _e.breakdown, le = wt({
|
|
3824
3832
|
fallbackIndex: V,
|
|
3825
3833
|
metricCount: t.value.metricCount
|
|
3826
|
-
}), ue = Z ?
|
|
3827
|
-
breakdownIndex:
|
|
3828
|
-
metricIndex:
|
|
3834
|
+
}), ue = Z ? Tt({
|
|
3835
|
+
breakdownIndex: le,
|
|
3836
|
+
metricIndex: K,
|
|
3829
3837
|
metricCount: t.value.metricCount,
|
|
3830
3838
|
isCompare: P.isCompare,
|
|
3831
3839
|
breakdownColors: t.value.chartBreakdownColors,
|
|
3832
3840
|
useSecondaryMetricShades: t.value.chartUseSecondaryMetricShades,
|
|
3833
3841
|
customColors: t.value.chartColors
|
|
3834
3842
|
}) : X;
|
|
3835
|
-
let
|
|
3836
|
-
y.value ?
|
|
3837
|
-
(We,
|
|
3838
|
-
) : g.value && (
|
|
3839
|
-
const
|
|
3843
|
+
let me = P.values;
|
|
3844
|
+
y.value ? me = $.value.map(
|
|
3845
|
+
(We, Ye) => Ye === V ? P.values[0] : NaN
|
|
3846
|
+
) : g.value && (me = [NaN, me[0], NaN]);
|
|
3847
|
+
const se = me.map((We) => We === null ? NaN : Number(We)), ce = g.value || y.value, xe = Fe({
|
|
3840
3848
|
datasetIndex: V,
|
|
3841
3849
|
isCompare: P.isCompare,
|
|
3842
3850
|
metricCount: t.value.metricCount,
|
|
@@ -3844,7 +3852,7 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3844
3852
|
}), Be = (He = t.value.lineStyles) == null ? void 0 : He[xe];
|
|
3845
3853
|
return {
|
|
3846
3854
|
label: P.name,
|
|
3847
|
-
data:
|
|
3855
|
+
data: se,
|
|
3848
3856
|
dash: !!P.isCompare,
|
|
3849
3857
|
lineStyle: Be,
|
|
3850
3858
|
fill: !1,
|
|
@@ -3856,12 +3864,12 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3856
3864
|
pointBorderWidth: ce ? 2 : void 0
|
|
3857
3865
|
};
|
|
3858
3866
|
})
|
|
3859
|
-
] : []), { hiddenDatasetKeys:
|
|
3867
|
+
] : []), { hiddenDatasetKeys: ie, isDatasetHidden: J, toggleDatasetVisibility: _ } = Et(G), E = m(
|
|
3860
3868
|
() => G.value.map((P, V) => ({
|
|
3861
3869
|
...P,
|
|
3862
3870
|
hidden: J(P, V)
|
|
3863
3871
|
}))
|
|
3864
|
-
), z =
|
|
3872
|
+
), z = kt();
|
|
3865
3873
|
function R() {
|
|
3866
3874
|
return z.extractChartSize(o.value, n.tileIndex) || { width: 0, height: 0 };
|
|
3867
3875
|
}
|
|
@@ -3872,35 +3880,35 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3872
3880
|
}), we([E], () => {
|
|
3873
3881
|
Me(() => R());
|
|
3874
3882
|
}), (P, V) => {
|
|
3875
|
-
var
|
|
3876
|
-
const ne =
|
|
3877
|
-
return Y(),
|
|
3878
|
-
|
|
3883
|
+
var K, X, Z, le, ue, me;
|
|
3884
|
+
const ne = pe("FmLineChart");
|
|
3885
|
+
return Y(), fe(Ve, null, [
|
|
3886
|
+
Q("div", Ur, [
|
|
3879
3887
|
nt(P.$slots, "menu"),
|
|
3880
|
-
|
|
3881
|
-
class:
|
|
3882
|
-
"chart-layout--side": M.value && (r(
|
|
3888
|
+
Q("div", {
|
|
3889
|
+
class: Ie(["chart-layout", {
|
|
3890
|
+
"chart-layout--side": M.value && (r(k).display ?? !1) && q.value
|
|
3883
3891
|
}])
|
|
3884
3892
|
}, [
|
|
3885
|
-
M.value && (r(
|
|
3893
|
+
M.value && (r(k).display ?? !1) && ee.value ? (Y(), ge(ze, {
|
|
3886
3894
|
key: 0,
|
|
3887
3895
|
"chart-ref": o.value,
|
|
3888
|
-
enabled: r(
|
|
3896
|
+
enabled: r(k).display ?? !1,
|
|
3889
3897
|
position: W.value,
|
|
3890
|
-
"max-width": r(
|
|
3891
|
-
"text-color": (
|
|
3892
|
-
"font-size": (Z = (X = r(
|
|
3898
|
+
"max-width": r(k).maxWidth,
|
|
3899
|
+
"text-color": (K = r(k).labels) == null ? void 0 : K.color,
|
|
3900
|
+
"font-size": (Z = (X = r(k).labels) == null ? void 0 : X.font) == null ? void 0 : Z.size,
|
|
3893
3901
|
"legend-update-key": E.value,
|
|
3894
3902
|
"chart-color-binding": t.value.chartColorBinding,
|
|
3895
3903
|
"chart-colors": t.value.chartColors,
|
|
3896
3904
|
"chart-breakdown-colors": t.value.chartBreakdownColors,
|
|
3897
3905
|
"chart-use-secondary-metric-shades": t.value.chartUseSecondaryMetricShades,
|
|
3898
3906
|
"metric-count": t.value.metricCount,
|
|
3899
|
-
"hidden-dataset-keys": r(
|
|
3907
|
+
"hidden-dataset-keys": r(ie),
|
|
3900
3908
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3901
3909
|
onToggleDatasetVisibility: r(_)
|
|
3902
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "use-point-style", "onToggleDatasetVisibility"])) :
|
|
3903
|
-
|
|
3910
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "use-point-style", "onToggleDatasetVisibility"])) : be("", !0),
|
|
3911
|
+
he(ne, {
|
|
3904
3912
|
ref_key: "chartRef",
|
|
3905
3913
|
ref: o,
|
|
3906
3914
|
class: "line-chart",
|
|
@@ -3913,35 +3921,35 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3913
3921
|
display: !1
|
|
3914
3922
|
},
|
|
3915
3923
|
tooltip: A.value,
|
|
3916
|
-
datalabels: r(
|
|
3924
|
+
datalabels: r(T),
|
|
3917
3925
|
plugins: [r(w), r(u)],
|
|
3918
3926
|
"maintain-aspect-ratio": !1,
|
|
3919
|
-
style:
|
|
3920
|
-
"--chart-width": M.value && (r(
|
|
3921
|
-
"--chart-height": M.value && (r(
|
|
3927
|
+
style: De({
|
|
3928
|
+
"--chart-width": M.value && (r(k).display ?? !1) && q.value ? "calc(100% - var(--legend-panel-width, 0px))" : r(L) !== void 0 ? r(L) + "px" : "100%",
|
|
3929
|
+
"--chart-height": M.value && (r(k).display ?? !1) && !q.value ? "calc(100% - var(--legend-panel-height, 0px))" : r(x) !== void 0 ? r(x) + "px" : "100%"
|
|
3922
3930
|
})
|
|
3923
3931
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "tooltip", "datalabels", "plugins", "style"]),
|
|
3924
|
-
M.value && (r(
|
|
3932
|
+
M.value && (r(k).display ?? !1) && !ee.value ? (Y(), ge(ze, {
|
|
3925
3933
|
key: 1,
|
|
3926
3934
|
"chart-ref": o.value,
|
|
3927
|
-
enabled: r(
|
|
3935
|
+
enabled: r(k).display ?? !1,
|
|
3928
3936
|
position: W.value,
|
|
3929
|
-
"max-width": r(
|
|
3930
|
-
"text-color": (
|
|
3931
|
-
"font-size": (
|
|
3937
|
+
"max-width": r(k).maxWidth,
|
|
3938
|
+
"text-color": (le = r(k).labels) == null ? void 0 : le.color,
|
|
3939
|
+
"font-size": (me = (ue = r(k).labels) == null ? void 0 : ue.font) == null ? void 0 : me.size,
|
|
3932
3940
|
"legend-update-key": E.value,
|
|
3933
3941
|
"chart-color-binding": t.value.chartColorBinding,
|
|
3934
3942
|
"chart-colors": t.value.chartColors,
|
|
3935
3943
|
"chart-breakdown-colors": t.value.chartBreakdownColors,
|
|
3936
3944
|
"chart-use-secondary-metric-shades": t.value.chartUseSecondaryMetricShades,
|
|
3937
3945
|
"metric-count": t.value.metricCount,
|
|
3938
|
-
"hidden-dataset-keys": r(
|
|
3946
|
+
"hidden-dataset-keys": r(ie),
|
|
3939
3947
|
"use-point-style": t.value.usePointStyle ?? !0,
|
|
3940
3948
|
onToggleDatasetVisibility: r(_)
|
|
3941
|
-
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "use-point-style", "onToggleDatasetVisibility"])) :
|
|
3949
|
+
}, null, 8, ["chart-ref", "enabled", "position", "max-width", "text-color", "font-size", "legend-update-key", "chart-color-binding", "chart-colors", "chart-breakdown-colors", "chart-use-secondary-metric-shades", "metric-count", "hidden-dataset-keys", "use-point-style", "onToggleDatasetVisibility"])) : be("", !0)
|
|
3942
3950
|
], 2)
|
|
3943
3951
|
]),
|
|
3944
|
-
|
|
3952
|
+
he(Ht, {
|
|
3945
3953
|
"model-value": r(i),
|
|
3946
3954
|
"details-payload": r(l),
|
|
3947
3955
|
"onUpdate:modelValue": r(c),
|
|
@@ -3953,7 +3961,7 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3953
3961
|
}
|
|
3954
3962
|
}), qr = { class: "flex flex-col gap-16" }, Xr = { class: "flex flex-row" }, Yr = /* @__PURE__ */ Ne({
|
|
3955
3963
|
__name: "PdfOrientationDialog",
|
|
3956
|
-
props: /* @__PURE__ */
|
|
3964
|
+
props: /* @__PURE__ */ Xe({
|
|
3957
3965
|
reportType: {},
|
|
3958
3966
|
index: {}
|
|
3959
3967
|
}, {
|
|
@@ -3962,7 +3970,7 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3962
3970
|
}),
|
|
3963
3971
|
emits: ["update:modelValue"],
|
|
3964
3972
|
setup(e) {
|
|
3965
|
-
const { t: n } =
|
|
3973
|
+
const { t: n } = ut(), { FmForm: t } = Xo, o = e, s = D(), i = Ee(e, "modelValue"), l = D(!0), h = D(!1), c = Tn(), { selectedLocationIds: C, dateRange: N, timeRange: $ } = it(on()), F = D(dn.PORTRAIT);
|
|
3966
3974
|
function y() {
|
|
3967
3975
|
var I;
|
|
3968
3976
|
(I = s.value) == null || I.validateInputs();
|
|
@@ -3985,51 +3993,51 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
3985
3993
|
h.value = !1;
|
|
3986
3994
|
}
|
|
3987
3995
|
}
|
|
3988
|
-
return (I,
|
|
3989
|
-
const B =
|
|
3990
|
-
return Y(),
|
|
3996
|
+
return (I, T) => {
|
|
3997
|
+
const B = pe("FmRadio"), v = pe("FmRadioGroup"), f = pe("FmButton"), k = pe("FmDialog");
|
|
3998
|
+
return Y(), ge(k, {
|
|
3991
3999
|
modelValue: i.value,
|
|
3992
|
-
"onUpdate:modelValue":
|
|
4000
|
+
"onUpdate:modelValue": T[2] || (T[2] = (L) => i.value = L),
|
|
3993
4001
|
overlay: !0,
|
|
3994
4002
|
"z-index": 10
|
|
3995
4003
|
}, {
|
|
3996
|
-
"dialog-header":
|
|
4004
|
+
"dialog-header": Le(() => T[3] || (T[3] = [
|
|
3997
4005
|
Fo("Select Orientation")
|
|
3998
4006
|
])),
|
|
3999
|
-
default:
|
|
4000
|
-
|
|
4007
|
+
default: Le(() => [
|
|
4008
|
+
he(r(t), {
|
|
4001
4009
|
ref_key: "form",
|
|
4002
4010
|
ref: s,
|
|
4003
4011
|
onValidationSuccess: g
|
|
4004
4012
|
}, {
|
|
4005
|
-
default:
|
|
4006
|
-
|
|
4007
|
-
|
|
4013
|
+
default: Le(() => [
|
|
4014
|
+
Q("div", qr, [
|
|
4015
|
+
he(v, {
|
|
4008
4016
|
modelValue: F.value,
|
|
4009
|
-
"onUpdate:modelValue":
|
|
4017
|
+
"onUpdate:modelValue": T[0] || (T[0] = (L) => F.value = L)
|
|
4010
4018
|
}, {
|
|
4011
|
-
default:
|
|
4012
|
-
|
|
4013
|
-
value: r(
|
|
4019
|
+
default: Le(() => [
|
|
4020
|
+
he(B, {
|
|
4021
|
+
value: r(dn).PORTRAIT,
|
|
4014
4022
|
label: r(n)("report.common.portrait")
|
|
4015
4023
|
}, null, 8, ["value", "label"]),
|
|
4016
|
-
|
|
4017
|
-
value: r(
|
|
4024
|
+
he(B, {
|
|
4025
|
+
value: r(dn).LANDSCAPE,
|
|
4018
4026
|
label: r(n)("report.common.landscape")
|
|
4019
4027
|
}, null, 8, ["value", "label"])
|
|
4020
4028
|
]),
|
|
4021
4029
|
_: 1
|
|
4022
4030
|
}, 8, ["modelValue"])
|
|
4023
4031
|
]),
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4032
|
+
Q("div", Xr, [
|
|
4033
|
+
T[4] || (T[4] = Q("div", { class: "grow" }, null, -1)),
|
|
4034
|
+
he(f, {
|
|
4027
4035
|
label: r(n)("report.common.cancel"),
|
|
4028
4036
|
variant: "tertiary",
|
|
4029
|
-
onClick:
|
|
4037
|
+
onClick: T[1] || (T[1] = (L) => i.value = !1)
|
|
4030
4038
|
}, null, 8, ["label"]),
|
|
4031
|
-
|
|
4032
|
-
|
|
4039
|
+
Q("div", null, [
|
|
4040
|
+
he(f, {
|
|
4033
4041
|
label: r(n)("report.common.download"),
|
|
4034
4042
|
loading: h.value,
|
|
4035
4043
|
onClick: y
|
|
@@ -4046,7 +4054,7 @@ const Ur = { class: "widget-content" }, Kr = /* @__PURE__ */ Ne({
|
|
|
4046
4054
|
}
|
|
4047
4055
|
});
|
|
4048
4056
|
function Gr(e) {
|
|
4049
|
-
const { breakpoints: n } =
|
|
4057
|
+
const { breakpoints: n } = rn(), { containerRef: t, isTable: o = D(!0) } = e;
|
|
4050
4058
|
let s = D(1), i = null, l = null, h = null, c = null, C = null, N = null;
|
|
4051
4059
|
function $() {
|
|
4052
4060
|
return t.value ? t.value.querySelector("table") : null;
|
|
@@ -4071,7 +4079,7 @@ function Gr(e) {
|
|
|
4071
4079
|
return x;
|
|
4072
4080
|
}
|
|
4073
4081
|
function y() {
|
|
4074
|
-
if (
|
|
4082
|
+
if (k(), !o.value || !t.value || (l = $(), !l) || (h = l.querySelector("thead"), !h)) return;
|
|
4075
4083
|
i = document.createElement("div"), i.className = "sticky-header-clone", i.style.cssText = `
|
|
4076
4084
|
position: fixed;
|
|
4077
4085
|
top: ${s.value}px;
|
|
@@ -4091,19 +4099,19 @@ function Gr(e) {
|
|
|
4091
4099
|
pointer-events: auto;
|
|
4092
4100
|
`;
|
|
4093
4101
|
const A = h.cloneNode(!0);
|
|
4094
|
-
A.style.cssText = "pointer-events: auto;", g(h, A), x.appendChild(A), i.appendChild(x), document.body.appendChild(i), B(), v(), f(),
|
|
4102
|
+
A.style.cssText = "pointer-events: auto;", g(h, A), x.appendChild(A), i.appendChild(x), document.body.appendChild(i), B(), v(), f(), T();
|
|
4095
4103
|
}
|
|
4096
4104
|
function g(x, A) {
|
|
4097
4105
|
const w = x.querySelectorAll("th, td"), u = A.querySelectorAll("th, td");
|
|
4098
4106
|
w.forEach((M, W) => {
|
|
4099
|
-
const
|
|
4100
|
-
if (!
|
|
4101
|
-
const
|
|
4102
|
-
Object.assign(
|
|
4103
|
-
width: `${
|
|
4104
|
-
minWidth: `${
|
|
4105
|
-
maxWidth: `${
|
|
4106
|
-
height: `${
|
|
4107
|
+
const q = u[W];
|
|
4108
|
+
if (!q) return;
|
|
4109
|
+
const ee = M, G = window.getComputedStyle(ee);
|
|
4110
|
+
Object.assign(q.style, {
|
|
4111
|
+
width: `${ee.offsetWidth}px`,
|
|
4112
|
+
minWidth: `${ee.offsetWidth}px`,
|
|
4113
|
+
maxWidth: `${ee.offsetWidth}px`,
|
|
4114
|
+
height: `${ee.offsetHeight}px`,
|
|
4107
4115
|
padding: G.padding,
|
|
4108
4116
|
backgroundColor: G.backgroundColor,
|
|
4109
4117
|
borderBottom: G.borderBottom,
|
|
@@ -4114,12 +4122,12 @@ function Gr(e) {
|
|
|
4114
4122
|
boxSizing: "border-box",
|
|
4115
4123
|
cursor: G.cursor || "pointer",
|
|
4116
4124
|
pointerEvents: "auto"
|
|
4117
|
-
}),
|
|
4118
|
-
|
|
4119
|
-
const J =
|
|
4125
|
+
}), q.onclick = (ie) => {
|
|
4126
|
+
ie.preventDefault(), ie.stopPropagation();
|
|
4127
|
+
const J = ee.querySelector(
|
|
4120
4128
|
"button, a, [role='button']"
|
|
4121
4129
|
);
|
|
4122
|
-
J ? J.click() :
|
|
4130
|
+
J ? J.click() : ee.click();
|
|
4123
4131
|
};
|
|
4124
4132
|
});
|
|
4125
4133
|
}
|
|
@@ -4140,7 +4148,7 @@ function Gr(e) {
|
|
|
4140
4148
|
}
|
|
4141
4149
|
return s.value;
|
|
4142
4150
|
}
|
|
4143
|
-
function
|
|
4151
|
+
function T() {
|
|
4144
4152
|
if (!i || !l || !h || !t.value) return;
|
|
4145
4153
|
const x = t.value.getBoundingClientRect(), A = l.getBoundingClientRect(), w = h.getBoundingClientRect(), u = I();
|
|
4146
4154
|
if (!(A.top <= u && A.bottom >= u + w.height)) {
|
|
@@ -4148,7 +4156,7 @@ function Gr(e) {
|
|
|
4148
4156
|
return;
|
|
4149
4157
|
}
|
|
4150
4158
|
i.style.visibility = "visible", i.style.top = `${u}px`;
|
|
4151
|
-
const W = window.getComputedStyle(t.value),
|
|
4159
|
+
const W = window.getComputedStyle(t.value), q = parseFloat(W.paddingLeft) || 0, ee = parseFloat(W.paddingRight) || 0, G = x.left + q, ie = x.right - ee, J = Math.max(G, x.left), _ = Math.min(ie, x.right), E = Math.max(0, _ - J);
|
|
4152
4160
|
if (E <= 0) {
|
|
4153
4161
|
i.style.visibility = "hidden";
|
|
4154
4162
|
return;
|
|
@@ -4159,7 +4167,7 @@ function Gr(e) {
|
|
|
4159
4167
|
}
|
|
4160
4168
|
function B() {
|
|
4161
4169
|
var A;
|
|
4162
|
-
C = () => requestAnimationFrame(
|
|
4170
|
+
C = () => requestAnimationFrame(T), window.addEventListener("scroll", C, { passive: !0 }), F().forEach((w) => {
|
|
4163
4171
|
C && w.addEventListener("scroll", C, { passive: !0 });
|
|
4164
4172
|
});
|
|
4165
4173
|
let x = (A = t.value) == null ? void 0 : A.parentElement;
|
|
@@ -4174,15 +4182,15 @@ function Gr(e) {
|
|
|
4174
4182
|
const A = i.querySelector("table");
|
|
4175
4183
|
A && l && (A.style.width = `${l.offsetWidth}px`);
|
|
4176
4184
|
}
|
|
4177
|
-
|
|
4185
|
+
T();
|
|
4178
4186
|
}), t.value && c.observe(t.value), l && c.observe(l);
|
|
4179
4187
|
}
|
|
4180
4188
|
function f() {
|
|
4181
4189
|
if (!h) return;
|
|
4182
|
-
const x =
|
|
4190
|
+
const x = mn(() => y(), 100), A = () => {
|
|
4183
4191
|
if (h && i) {
|
|
4184
4192
|
const w = i.querySelector("thead");
|
|
4185
|
-
w && g(h, w),
|
|
4193
|
+
w && g(h, w), T();
|
|
4186
4194
|
}
|
|
4187
4195
|
};
|
|
4188
4196
|
N = new MutationObserver((w) => {
|
|
@@ -4194,7 +4202,7 @@ function Gr(e) {
|
|
|
4194
4202
|
characterData: !0
|
|
4195
4203
|
});
|
|
4196
4204
|
}
|
|
4197
|
-
function
|
|
4205
|
+
function k() {
|
|
4198
4206
|
var x;
|
|
4199
4207
|
if (i && (i.remove(), i = null), C) {
|
|
4200
4208
|
window.removeEventListener("scroll", C), F().forEach((w) => {
|
|
@@ -4207,20 +4215,20 @@ function Gr(e) {
|
|
|
4207
4215
|
}
|
|
4208
4216
|
c && (c.disconnect(), c = null), N && (N.disconnect(), N = null), l = null, h = null;
|
|
4209
4217
|
}
|
|
4210
|
-
function
|
|
4218
|
+
function L() {
|
|
4211
4219
|
y();
|
|
4212
4220
|
}
|
|
4213
4221
|
return we(o, (x) => {
|
|
4214
|
-
x ? y() :
|
|
4222
|
+
x ? y() : k();
|
|
4215
4223
|
}), we(s, () => {
|
|
4216
|
-
i && (i.style.top = `${s.value}px`,
|
|
4224
|
+
i && (i.style.top = `${s.value}px`, T());
|
|
4217
4225
|
}), we(t, () => {
|
|
4218
4226
|
t.value && o.value && setTimeout(y, 100);
|
|
4219
4227
|
}), $e(() => {
|
|
4220
4228
|
o.value && setTimeout(y, 100);
|
|
4221
4229
|
}), to(() => {
|
|
4222
|
-
|
|
4223
|
-
}), { refresh:
|
|
4230
|
+
k();
|
|
4231
|
+
}), { refresh: L, cleanup: k };
|
|
4224
4232
|
}
|
|
4225
4233
|
const jr = {
|
|
4226
4234
|
key: 1,
|
|
@@ -4230,7 +4238,7 @@ const jr = {
|
|
|
4230
4238
|
class: "flex"
|
|
4231
4239
|
}, cl = /* @__PURE__ */ Ne({
|
|
4232
4240
|
__name: "DynamicWidget",
|
|
4233
|
-
props: /* @__PURE__ */
|
|
4241
|
+
props: /* @__PURE__ */ Xe({
|
|
4234
4242
|
index: {
|
|
4235
4243
|
type: Number,
|
|
4236
4244
|
default: 0
|
|
@@ -4255,46 +4263,46 @@ const jr = {
|
|
|
4255
4263
|
}),
|
|
4256
4264
|
emits: ["update:modelValue"],
|
|
4257
4265
|
setup(e) {
|
|
4258
|
-
const n = D(!0), t =
|
|
4266
|
+
const n = D(!0), t = Ee(e, "modelValue"), o = t.value.widget.config, { t: s, te: i, locale: l } = ut(), h = e, c = D(null), C = m(() => t.value.widget.type === oe.Table), N = m(() => {
|
|
4259
4267
|
var S;
|
|
4260
4268
|
return (S = c.value) == null ? void 0 : S.$el;
|
|
4261
4269
|
}), { refresh: $ } = Gr({
|
|
4262
4270
|
containerRef: N,
|
|
4263
4271
|
isTable: C
|
|
4264
|
-
}), F = D(o.rollup), y = D(
|
|
4265
|
-
if (
|
|
4266
|
-
const S =
|
|
4267
|
-
(
|
|
4272
|
+
}), F = D(o.rollup), y = D(Rt()), g = D(o.drillDimension), I = m(() => {
|
|
4273
|
+
if (ke.value.length > 0) {
|
|
4274
|
+
const S = ke.value.findIndex(
|
|
4275
|
+
(ve) => ve.value === g.value
|
|
4268
4276
|
);
|
|
4269
4277
|
return S >= 0 ? S : 0;
|
|
4270
4278
|
} else
|
|
4271
4279
|
return -1;
|
|
4272
|
-
}),
|
|
4273
|
-
() => I.value !=
|
|
4274
|
-
), v = D(o.showTitle ?? !0), f = D(o.titleFontSize ?? 14),
|
|
4280
|
+
}), T = m(() => I.value !== 0), B = m(
|
|
4281
|
+
() => I.value != ke.value.length - 1
|
|
4282
|
+
), v = D(o.showTitle ?? !0), f = D(o.titleFontSize ?? 14), k = D(o.titleBold ?? !1), L = D(o.titleItalic ?? !1), x = D(o.titleUnderline ?? !1), A = D(o.chartWidth ?? void 0), w = D(o.chartHeight ?? void 0), u = D(
|
|
4275
4283
|
Array.isArray(o.chartColors) ? [...o.chartColors] : void 0
|
|
4276
4284
|
), M = D(
|
|
4277
4285
|
Array.isArray(o.chartColorLayers) ? [...o.chartColorLayers] : void 0
|
|
4278
4286
|
), W = D(
|
|
4279
4287
|
Array.isArray(o.chartBreakdownColors) ? [...o.chartBreakdownColors] : void 0
|
|
4280
|
-
),
|
|
4288
|
+
), q = D(o.chartUseSecondaryMetricShades ?? !0), ee = D(o.chartColorBinding), G = D(
|
|
4281
4289
|
Array.isArray(o.lineStyles) ? [...o.lineStyles] : void 0
|
|
4282
|
-
),
|
|
4290
|
+
), ie = D(o.lineStyleBinding), J = D(o.showLabel ?? !1), _ = D(o.labelAlign ?? yn.center), E = D(o.labelAnchor ?? gn.center), z = D(o.labelRotation ?? 0), R = D(o.labelOffset ?? 0), P = D(o.labelFontSize ?? 12), V = m(() => o.showSearchBar), ne = D(o.showX ?? !0), K = D(o.xPosition ?? bn.bottom), X = D(o.showXGrid ?? !1), Z = D(o.showXTick ?? !0), le = D(o.xTickFontSize ?? 12), ue = D(o.showXTitle ?? !1), me = D(o.xTitle ?? ""), se = D(o.xTitleFontSize ?? 12), ce = D(o.showY ?? !0), xe = D(o.yPosition ?? Cn.left), Be = D(o.showYGrid ?? !1), He = D(o.showYTick ?? !0), We = D(o.yTickFontSize ?? 12), Ye = D(o.showYTitle ?? !1), ct = D(o.yTitle ?? ""), ot = D(o.yTitleFontSize ?? 12), Ge = D(o.showLegend ?? void 0), Ot = D(o.legendPosition ?? xn.top), je = D(o.usePointStyle ?? !0), Ut = D(o.legendFontSize), Kt = D(o.legendColor ?? "#6b6b6b"), qt = D(o.legendMaxWidth), It = D(o.maxTooltipItems), Je = D(o.stackBarOverlap ?? !1), Xt = D(o.rowHeight ?? 0), Yt = D(o.colWidths ?? []), Mt = D(!1), dt = D(""), { breakpoints: Ze, getBreakpointsBoundary: at } = rn(), ft = D(), Te = m(
|
|
4283
4291
|
() => h.customScreenWidth === void 0 ? window.innerWidth : h.customScreenWidth
|
|
4284
|
-
),
|
|
4285
|
-
() => (
|
|
4286
|
-
),
|
|
4287
|
-
() => (
|
|
4288
|
-
),
|
|
4292
|
+
), ln = m(
|
|
4293
|
+
() => (Te == null ? void 0 : Te.value) > at("xs")[1] && (Te == null ? void 0 : Te.value) <= at("sm")[1]
|
|
4294
|
+
), Gt = m(
|
|
4295
|
+
() => (Te == null ? void 0 : Te.value) > at("sm")[1] && (Te == null ? void 0 : Te.value) <= at("md")[1]
|
|
4296
|
+
), sn = m(() => (Te == null ? void 0 : Te.value) > at("md")[1]), un = m(() => {
|
|
4289
4297
|
const S = t.value.size.width;
|
|
4290
|
-
return
|
|
4291
|
-
}),
|
|
4298
|
+
return sn.value || Gt.value ? Wr(S) : ln.value ? Er(S) : Or(S);
|
|
4299
|
+
}), ht = m(
|
|
4292
4300
|
() => Yo.find((S) => S.type === t.value.widget.type)
|
|
4293
|
-
), a =
|
|
4301
|
+
), a = mn(() => {
|
|
4294
4302
|
var S;
|
|
4295
|
-
|
|
4303
|
+
ft.value = go((S = c.value) == null ? void 0 : S.$el.offsetWidth), y.value = Rt();
|
|
4296
4304
|
}), p = m(() => {
|
|
4297
|
-
if (Go(
|
|
4305
|
+
if (Go(ae.value.type, d.value))
|
|
4298
4306
|
switch (t.value.widget.type) {
|
|
4299
4307
|
case oe.BarChart:
|
|
4300
4308
|
return mr;
|
|
@@ -4319,9 +4327,9 @@ const jr = {
|
|
|
4319
4327
|
}
|
|
4320
4328
|
else
|
|
4321
4329
|
return Nn;
|
|
4322
|
-
}), d = D(null), { selectedLocationIds: b, dateRange: H, compareDateRange:
|
|
4323
|
-
m(() =>
|
|
4324
|
-
const
|
|
4330
|
+
}), d = D(null), { selectedLocationIds: b, dateRange: H, compareDateRange: U, timeRange: j } = it(on()), { globalFilters: te, isGlobalFiltersLoading: O } = it(Vo()), { businessId: de } = it(kn()), { businessLoadedId: ye, businessDataVersion: Ce } = it(on());
|
|
4331
|
+
m(() => ye.value === de.value && b.value.length > 0 && !O.value);
|
|
4332
|
+
const re = D(!0), ae = m(() => {
|
|
4325
4333
|
const S = JSON.parse(JSON.stringify(t.value.widget));
|
|
4326
4334
|
return {
|
|
4327
4335
|
...S,
|
|
@@ -4332,38 +4340,38 @@ const jr = {
|
|
|
4332
4340
|
showGrandTotal: !1
|
|
4333
4341
|
}
|
|
4334
4342
|
};
|
|
4335
|
-
}),
|
|
4343
|
+
}), Se = m(() => {
|
|
4336
4344
|
var Re;
|
|
4337
|
-
const S = ((Re =
|
|
4338
|
-
if (!
|
|
4345
|
+
const S = ((Re = ae.value.config.metrics) == null ? void 0 : Re.length) ?? 0;
|
|
4346
|
+
if (!ae.value.config.isBlend)
|
|
4339
4347
|
return S;
|
|
4340
|
-
const
|
|
4341
|
-
(
|
|
4342
|
-
var
|
|
4343
|
-
return
|
|
4348
|
+
const ve = (ae.value.config.joinDatasources ?? []).reduce(
|
|
4349
|
+
(lt, cn) => {
|
|
4350
|
+
var pt;
|
|
4351
|
+
return lt + (((pt = cn.metrics) == null ? void 0 : pt.length) ?? 0);
|
|
4344
4352
|
},
|
|
4345
4353
|
0
|
|
4346
4354
|
);
|
|
4347
|
-
return S +
|
|
4355
|
+
return S + ve;
|
|
4348
4356
|
});
|
|
4349
4357
|
function Ae() {
|
|
4350
4358
|
return {
|
|
4351
4359
|
data: d.value,
|
|
4352
4360
|
showTitle: v.value,
|
|
4353
4361
|
titleFontSize: f.value,
|
|
4354
|
-
titleBold:
|
|
4355
|
-
titleItalic:
|
|
4362
|
+
titleBold: k.value,
|
|
4363
|
+
titleItalic: L.value,
|
|
4356
4364
|
titleUnderline: x.value,
|
|
4357
4365
|
chartHeight: w.value,
|
|
4358
4366
|
chartWidth: A.value,
|
|
4359
4367
|
chartColors: u.value,
|
|
4360
4368
|
chartColorLayers: M.value,
|
|
4361
4369
|
chartBreakdownColors: W.value,
|
|
4362
|
-
chartUseSecondaryMetricShades:
|
|
4363
|
-
chartColorBinding:
|
|
4364
|
-
metricCount:
|
|
4370
|
+
chartUseSecondaryMetricShades: q.value,
|
|
4371
|
+
chartColorBinding: ee.value,
|
|
4372
|
+
metricCount: Se.value,
|
|
4365
4373
|
lineStyles: G.value,
|
|
4366
|
-
lineStyleBinding:
|
|
4374
|
+
lineStyleBinding: ie.value,
|
|
4367
4375
|
showLabel: J.value,
|
|
4368
4376
|
labelAnchor: E.value,
|
|
4369
4377
|
labelAlign: _.value,
|
|
@@ -4371,46 +4379,46 @@ const jr = {
|
|
|
4371
4379
|
labelOffset: R.value,
|
|
4372
4380
|
labelFontSize: P.value,
|
|
4373
4381
|
showX: ne.value,
|
|
4374
|
-
xPosition:
|
|
4382
|
+
xPosition: K.value,
|
|
4375
4383
|
showXGrid: X.value,
|
|
4376
4384
|
showXTick: Z.value,
|
|
4377
|
-
xTickFontSize:
|
|
4385
|
+
xTickFontSize: le.value,
|
|
4378
4386
|
showXTitle: ue.value,
|
|
4379
|
-
xTitle:
|
|
4380
|
-
xTitleFontSize:
|
|
4387
|
+
xTitle: me.value,
|
|
4388
|
+
xTitleFontSize: se.value,
|
|
4381
4389
|
showY: ce.value,
|
|
4382
4390
|
yPosition: xe.value,
|
|
4383
4391
|
showYGrid: Be.value,
|
|
4384
4392
|
showYTick: He.value,
|
|
4385
|
-
yTitle:
|
|
4386
|
-
showYTitle:
|
|
4393
|
+
yTitle: ct.value,
|
|
4394
|
+
showYTitle: Ye.value,
|
|
4387
4395
|
yTitleFontSize: ot.value,
|
|
4388
4396
|
yTickFontSize: We.value,
|
|
4389
|
-
isTransposed:
|
|
4390
|
-
showLegend:
|
|
4391
|
-
legendPosition:
|
|
4392
|
-
usePointStyle:
|
|
4393
|
-
legendFontSize:
|
|
4394
|
-
legendColor:
|
|
4395
|
-
legendMaxWidth:
|
|
4396
|
-
maxTooltipItems:
|
|
4397
|
-
stackBarOverlap:
|
|
4397
|
+
isTransposed: ae.value.config.isTransposed,
|
|
4398
|
+
showLegend: Ge.value,
|
|
4399
|
+
legendPosition: Ot.value,
|
|
4400
|
+
usePointStyle: je.value,
|
|
4401
|
+
legendFontSize: Ut.value,
|
|
4402
|
+
legendColor: Kt.value,
|
|
4403
|
+
legendMaxWidth: qt.value,
|
|
4404
|
+
maxTooltipItems: It.value,
|
|
4405
|
+
stackBarOverlap: Je.value
|
|
4398
4406
|
};
|
|
4399
4407
|
}
|
|
4400
|
-
function
|
|
4408
|
+
function Oe() {
|
|
4401
4409
|
return {
|
|
4402
4410
|
data: d.value,
|
|
4403
|
-
filterText:
|
|
4404
|
-
rollupPosition:
|
|
4405
|
-
grandTotalLabel:
|
|
4406
|
-
rowHeight:
|
|
4407
|
-
colWidths:
|
|
4411
|
+
filterText: dt.value,
|
|
4412
|
+
rollupPosition: ae.value.config.rollupPosition,
|
|
4413
|
+
grandTotalLabel: ae.value.config.grandTotalLabel,
|
|
4414
|
+
rowHeight: Xt.value,
|
|
4415
|
+
colWidths: Yt.value
|
|
4408
4416
|
};
|
|
4409
4417
|
}
|
|
4410
|
-
const
|
|
4411
|
-
switch (
|
|
4418
|
+
const Ue = m(() => {
|
|
4419
|
+
switch (ae.value.type) {
|
|
4412
4420
|
case oe.Table:
|
|
4413
|
-
return
|
|
4421
|
+
return Oe();
|
|
4414
4422
|
case oe.BarChart:
|
|
4415
4423
|
case oe.LineChart:
|
|
4416
4424
|
case oe.StackBarChart:
|
|
@@ -4421,54 +4429,54 @@ const jr = {
|
|
|
4421
4429
|
default:
|
|
4422
4430
|
return { data: d.value };
|
|
4423
4431
|
}
|
|
4424
|
-
}),
|
|
4432
|
+
}), Qe = m(() => {
|
|
4425
4433
|
const { config: S } = t.value.widget;
|
|
4426
4434
|
if (S.rollup != null) {
|
|
4427
|
-
const
|
|
4428
|
-
return
|
|
4429
|
-
(Re,
|
|
4435
|
+
const ve = [...S.dimensions].filter((Re) => !Re.hide);
|
|
4436
|
+
return ve.sort(
|
|
4437
|
+
(Re, lt) => (S.rowIds || []).indexOf(fn(Re)) - (S.rowIds || []).indexOf(fn(lt))
|
|
4430
4438
|
), [
|
|
4431
|
-
{ label:
|
|
4432
|
-
{ label:
|
|
4433
|
-
...[...
|
|
4434
|
-
label:
|
|
4435
|
-
value:
|
|
4439
|
+
{ label: st(s, i, "None", "other"), value: "none" },
|
|
4440
|
+
{ label: st(s, i, "Grand Total", "other"), value: 0 },
|
|
4441
|
+
...[...ve].slice(0, ve.length - 1).map((Re, lt) => ({
|
|
4442
|
+
label: st(s, i, Re.label, "other"),
|
|
4443
|
+
value: lt + 1
|
|
4436
4444
|
}))
|
|
4437
4445
|
];
|
|
4438
4446
|
}
|
|
4439
4447
|
return [];
|
|
4440
|
-
}),
|
|
4441
|
-
const { config: S } =
|
|
4442
|
-
return S.isDrillable ? S.dimensions.map((
|
|
4443
|
-
label:
|
|
4444
|
-
value:
|
|
4448
|
+
}), ke = m(() => {
|
|
4449
|
+
const { config: S } = ae.value;
|
|
4450
|
+
return S.isDrillable ? S.dimensions.map((ve) => ({
|
|
4451
|
+
label: st(s, i, ve.label, "other"),
|
|
4452
|
+
value: fn(ve)
|
|
4445
4453
|
})) : [];
|
|
4446
|
-
}),
|
|
4454
|
+
}), rt = m(() => {
|
|
4447
4455
|
const S = t.value.id;
|
|
4448
|
-
return (
|
|
4449
|
-
(
|
|
4456
|
+
return (te.value || []).filter(
|
|
4457
|
+
(ve) => Array.isArray(ve.tileIds) && ve.tileIds.includes(S)
|
|
4450
4458
|
);
|
|
4451
4459
|
});
|
|
4452
4460
|
we(
|
|
4453
4461
|
() => t.value.widget.config,
|
|
4454
4462
|
(S) => {
|
|
4455
|
-
F.value = S.rollup, v.value = S.showTitle ?? !0, f.value = S.titleFontSize ?? 14,
|
|
4463
|
+
F.value = S.rollup, v.value = S.showTitle ?? !0, f.value = S.titleFontSize ?? 14, k.value = S.titleBold ?? !1, L.value = S.titleItalic ?? !1, x.value = S.titleUnderline ?? !1, w.value = S.chartHeight ?? void 0, A.value = S.chartWidth ?? void 0, u.value = Array.isArray(S.chartColors) ? [...S.chartColors] : void 0, M.value = Array.isArray(S.chartColorLayers) ? [...S.chartColorLayers] : void 0, W.value = Array.isArray(S.chartBreakdownColors) ? [...S.chartBreakdownColors] : void 0, q.value = S.chartUseSecondaryMetricShades ?? !0, ee.value = S.chartColorBinding, G.value = Array.isArray(S.lineStyles) ? [...S.lineStyles] : void 0, ie.value = S.lineStyleBinding, J.value = S.showLabel ?? !1, _.value = S.labelAlign ?? yn.center, E.value = S.labelAnchor ?? gn.center, z.value = S.labelRotation ?? 0, R.value = S.labelOffset ?? 0, P.value = S.labelFontSize ?? 12, ne.value = S.showX ?? !0, K.value = S.xPosition ?? bn.bottom, X.value = S.showXGrid ?? !1, Z.value = S.showXTick ?? !0, le.value = S.xTickFontSize ?? 12, ue.value = S.showXTitle ?? !1, me.value = S.xTitle ?? "", se.value = S.xTitleFontSize ?? 12, ce.value = S.showY ?? !0, xe.value = S.yPosition ?? Cn.left, Be.value = S.showYGrid ?? !0, He.value = S.showYTick ?? !0, We.value = S.yTickFontSize ?? 12, Ye.value = S.showYTitle ?? !1, ct.value = S.yTitle ?? "", ot.value = S.yTitleFontSize ?? 12, Ge.value = S.showLegend ?? void 0, Ot.value = S.legendPosition ?? xn.top, je.value = S.usePointStyle ?? !0, Ut.value = S.legendFontSize, Kt.value = S.legendColor ?? "#6b6b6b", qt.value = S.legendMaxWidth, It.value = S.maxTooltipItems, Je.value = S.stackBarOverlap ?? !1, Xt.value = S.rowHeight ?? 0, Yt.value = S.colWidths ?? [], y.value = Rt();
|
|
4456
4464
|
},
|
|
4457
4465
|
{ deep: !0 }
|
|
4458
4466
|
), we([() => F.value], () => {
|
|
4459
4467
|
F.value !== null && (t.value.widget.config.rollup = F.value);
|
|
4460
4468
|
}), we(
|
|
4461
4469
|
[
|
|
4462
|
-
() =>
|
|
4470
|
+
() => ae.value,
|
|
4463
4471
|
() => H.value,
|
|
4464
4472
|
() => j.value,
|
|
4465
|
-
() =>
|
|
4473
|
+
() => U.value,
|
|
4466
4474
|
() => b.value,
|
|
4467
|
-
() =>
|
|
4468
|
-
() =>
|
|
4475
|
+
() => rt.value,
|
|
4476
|
+
() => Ce.value
|
|
4469
4477
|
],
|
|
4470
4478
|
() => {
|
|
4471
|
-
|
|
4479
|
+
Bt();
|
|
4472
4480
|
},
|
|
4473
4481
|
{ deep: !0 }
|
|
4474
4482
|
), we(
|
|
@@ -4478,34 +4486,34 @@ const jr = {
|
|
|
4478
4486
|
},
|
|
4479
4487
|
{ deep: !0 }
|
|
4480
4488
|
), $e(() => {
|
|
4481
|
-
a(),
|
|
4489
|
+
a(), Ze.value.sm || Ze.value.md || Ze.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", a)) : addEventListener("resize", a), Bt();
|
|
4482
4490
|
}), to(() => {
|
|
4483
|
-
|
|
4491
|
+
Ze.value.sm || Ze.value.md || Ze.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", a)) : removeEventListener("resize", a);
|
|
4484
4492
|
});
|
|
4485
|
-
const
|
|
4486
|
-
let
|
|
4487
|
-
async function
|
|
4493
|
+
const jt = Tn();
|
|
4494
|
+
let mt;
|
|
4495
|
+
async function Bt() {
|
|
4488
4496
|
if (!h.isStyleEditing) {
|
|
4489
|
-
if (
|
|
4490
|
-
|
|
4497
|
+
if (ae.value.config.schemaNames.length <= 0 && !(ae.value.config.dimensions.length <= 0 || ae.value.config.metrics.length <= 0)) {
|
|
4498
|
+
jt.open({
|
|
4491
4499
|
message: "schema must not be empty and dimension or metrics must have at least 1 column",
|
|
4492
4500
|
type: "info"
|
|
4493
4501
|
}), n.value = !1;
|
|
4494
4502
|
return;
|
|
4495
4503
|
}
|
|
4496
4504
|
try {
|
|
4497
|
-
n.value = !0,
|
|
4498
|
-
const S =
|
|
4505
|
+
n.value = !0, mt && mt.abort(), mt = new AbortController();
|
|
4506
|
+
const S = mt.signal, ve = Ce.value, Re = await mn(
|
|
4499
4507
|
$o,
|
|
4500
4508
|
500
|
|
4501
4509
|
)({
|
|
4502
|
-
widget:
|
|
4510
|
+
widget: ae.value,
|
|
4503
4511
|
signal: S,
|
|
4504
4512
|
tileId: t.value.id
|
|
4505
4513
|
});
|
|
4506
|
-
|
|
4514
|
+
Ce.value === ve && (d.value = Re, y.value = Rt(), setTimeout(() => $(), 100)), n.value = !1;
|
|
4507
4515
|
} catch (S) {
|
|
4508
|
-
S.code !== "ERR_CANCELED" && (d.value = null,
|
|
4516
|
+
S.code !== "ERR_CANCELED" && (d.value = null, jt.open({ message: `Invalid chart ${ae.value.type}`, type: "error" }), console.log(S), n.value = !1);
|
|
4509
4517
|
}
|
|
4510
4518
|
}
|
|
4511
4519
|
}
|
|
@@ -4522,131 +4530,131 @@ const jr = {
|
|
|
4522
4530
|
}
|
|
4523
4531
|
function yo() {
|
|
4524
4532
|
const S = I.value - 1;
|
|
4525
|
-
S >= 0 && (g.value =
|
|
4533
|
+
S >= 0 && (g.value = ke.value[S].value);
|
|
4526
4534
|
}
|
|
4527
4535
|
function bo() {
|
|
4528
4536
|
const S = I.value + 1;
|
|
4529
|
-
S >= 0 && S <
|
|
4537
|
+
S >= 0 && S < ke.value.length && (g.value = ke.value[S].value);
|
|
4530
4538
|
}
|
|
4531
|
-
const Pn = D(
|
|
4539
|
+
const Pn = D(gt.EXCEL), Fn = D(), Co = Object.values(gt).map((S) => ({
|
|
4532
4540
|
label: Ho(S),
|
|
4533
4541
|
value: S,
|
|
4534
4542
|
onClick: async () => {
|
|
4535
|
-
S ===
|
|
4543
|
+
S === gt.EXCEL || S === gt.PDFFULLSIZE || S === gt.PDFRECEIPT ? await no({
|
|
4536
4544
|
reportType: S,
|
|
4537
4545
|
index: h.index,
|
|
4538
|
-
isCombinedLocationLayout:
|
|
4546
|
+
isCombinedLocationLayout: re.value,
|
|
4539
4547
|
timeRange: j.value,
|
|
4540
4548
|
dateRange: H.value,
|
|
4541
4549
|
locationIds: b.value
|
|
4542
|
-
}) : S ===
|
|
4550
|
+
}) : S === gt.PDF && (Pn.value = S, Fn.value = h.index, Mt.value = !0);
|
|
4543
4551
|
}
|
|
4544
|
-
})), xo =
|
|
4545
|
-
return (S,
|
|
4546
|
-
const Re =
|
|
4547
|
-
return Y(),
|
|
4552
|
+
})), xo = ae.value.type === oe.Spacer ? "flat" : "outlined", wo = ae.value.type === oe.Spacer ? "p-0" : "p-16";
|
|
4553
|
+
return (S, ve) => {
|
|
4554
|
+
const Re = pe("FmTooltip"), lt = pe("FmSearch"), cn = pe("FmCheckbox"), pt = pe("FmButton"), So = pe("FmSelect"), _o = pe("FmMenuItem"), ko = pe("FmMenu"), To = pe("FmForm"), Lo = pe("FmCircularProgress"), Do = pe("FmCard");
|
|
4555
|
+
return Y(), ge(Do, {
|
|
4548
4556
|
ref_key: "tileCard",
|
|
4549
4557
|
ref: c,
|
|
4550
|
-
class:
|
|
4558
|
+
class: Ie(`${un.value} ${r(wo)}`),
|
|
4551
4559
|
variant: r(xo)
|
|
4552
4560
|
}, {
|
|
4553
|
-
default:
|
|
4554
|
-
|
|
4555
|
-
modelValue:
|
|
4556
|
-
"onUpdate:modelValue":
|
|
4561
|
+
default: Le(() => [
|
|
4562
|
+
he(Yr, {
|
|
4563
|
+
modelValue: Mt.value,
|
|
4564
|
+
"onUpdate:modelValue": ve[0] || (ve[0] = (vt) => Mt.value = vt),
|
|
4557
4565
|
"report-type": Pn.value,
|
|
4558
4566
|
index: Fn.value
|
|
4559
4567
|
}, null, 8, ["modelValue", "report-type", "index"]),
|
|
4560
|
-
!n.value && !r(
|
|
4568
|
+
!n.value && !r(O) ? (Y(), fe("div", {
|
|
4561
4569
|
key: 0,
|
|
4562
|
-
style:
|
|
4570
|
+
style: De({ height: ft.value })
|
|
4563
4571
|
}, [
|
|
4564
|
-
(Y(),
|
|
4572
|
+
(Y(), ge(eo(p.value), {
|
|
4565
4573
|
key: y.value,
|
|
4566
|
-
modelValue:
|
|
4567
|
-
"onUpdate:modelValue":
|
|
4574
|
+
modelValue: Ue.value,
|
|
4575
|
+
"onUpdate:modelValue": ve[4] || (ve[4] = (vt) => Ue.value = vt),
|
|
4568
4576
|
"tile-index": h.index
|
|
4569
4577
|
}, {
|
|
4570
|
-
menu:
|
|
4571
|
-
|
|
4572
|
-
default:
|
|
4573
|
-
var
|
|
4578
|
+
menu: Le(() => [
|
|
4579
|
+
he(To, { class: "flex items-center gap-2" }, {
|
|
4580
|
+
default: Le(() => {
|
|
4581
|
+
var vt, An, Rn, zn;
|
|
4574
4582
|
return [
|
|
4575
|
-
|
|
4583
|
+
he(Re, {
|
|
4576
4584
|
variant: "plain",
|
|
4577
4585
|
placement: "right",
|
|
4578
|
-
content:
|
|
4586
|
+
content: ae.value.description,
|
|
4579
4587
|
"hide-arrow": !0,
|
|
4580
|
-
disabled: !
|
|
4588
|
+
disabled: !ae.value.description,
|
|
4581
4589
|
"z-index": 99
|
|
4582
4590
|
}, {
|
|
4583
|
-
default:
|
|
4584
|
-
v.value !== !1 ? (Y(),
|
|
4591
|
+
default: Le(() => [
|
|
4592
|
+
v.value !== !1 ? (Y(), fe("p", {
|
|
4585
4593
|
key: 0,
|
|
4586
|
-
style:
|
|
4594
|
+
style: De({
|
|
4587
4595
|
fontSize: f.value + "px",
|
|
4588
|
-
fontWeight:
|
|
4589
|
-
fontStyle:
|
|
4596
|
+
fontWeight: k.value ? "bold" : "normal",
|
|
4597
|
+
fontStyle: L.value ? "italic" : "normal",
|
|
4590
4598
|
textDecoration: x.value ? "underline" : "none"
|
|
4591
4599
|
}),
|
|
4592
|
-
class:
|
|
4600
|
+
class: Ie(["text-fm-color-typo-secondary line-clamp-1", [
|
|
4593
4601
|
f.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
4594
|
-
|
|
4602
|
+
ae.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
4595
4603
|
]])
|
|
4596
|
-
}, Pe(r(
|
|
4604
|
+
}, Pe(r(st)(r(s), r(i), ae.value.title, "other")), 7)) : be("", !0)
|
|
4597
4605
|
]),
|
|
4598
4606
|
_: 1
|
|
4599
4607
|
}, 8, ["content", "disabled"]),
|
|
4600
|
-
(
|
|
4608
|
+
(vt = ht.value) != null && vt.showSearchBar ? (Y(), ge(lt, {
|
|
4601
4609
|
key: 0,
|
|
4602
|
-
modelValue:
|
|
4603
|
-
"onUpdate:modelValue":
|
|
4610
|
+
modelValue: dt.value,
|
|
4611
|
+
"onUpdate:modelValue": ve[1] || (ve[1] = (Ke) => dt.value = Ke),
|
|
4604
4612
|
class: "grow"
|
|
4605
|
-
}, null, 8, ["modelValue"])) : (Y(),
|
|
4606
|
-
Ao(
|
|
4613
|
+
}, null, 8, ["modelValue"])) : (Y(), fe("div", jr)),
|
|
4614
|
+
Ao(he(cn, {
|
|
4607
4615
|
modelValue: J.value,
|
|
4608
|
-
"onUpdate:modelValue":
|
|
4616
|
+
"onUpdate:modelValue": ve[2] || (ve[2] = (Ke) => J.value = Ke),
|
|
4609
4617
|
label: "Label",
|
|
4610
4618
|
value: !1
|
|
4611
4619
|
}, null, 8, ["modelValue"]), [
|
|
4612
|
-
[Ro, (An =
|
|
4620
|
+
[Ro, (An = ht.value) == null ? void 0 : An.showLabel]
|
|
4613
4621
|
]),
|
|
4614
|
-
(Rn =
|
|
4615
|
-
|
|
4622
|
+
(Rn = ht.value) != null && Rn.showDrillDimension && ke.value.length > 0 ? (Y(), fe("div", Jr, [
|
|
4623
|
+
he(pt, {
|
|
4616
4624
|
icon: "arrow_upward",
|
|
4617
4625
|
variant: "tertiary",
|
|
4618
|
-
disabled: !
|
|
4626
|
+
disabled: !T.value,
|
|
4619
4627
|
onClick: yo
|
|
4620
4628
|
}, null, 8, ["disabled"]),
|
|
4621
|
-
|
|
4629
|
+
he(pt, {
|
|
4622
4630
|
icon: "arrow_downward",
|
|
4623
4631
|
variant: "tertiary",
|
|
4624
4632
|
disabled: !B.value,
|
|
4625
4633
|
onClick: bo
|
|
4626
4634
|
}, null, 8, ["disabled"])
|
|
4627
|
-
])) :
|
|
4628
|
-
(zn =
|
|
4635
|
+
])) : be("", !0),
|
|
4636
|
+
(zn = ht.value) != null && zn.showRollup && Qe.value.length > 0 ? (Y(), ge(So, {
|
|
4629
4637
|
key: `rollup-${r(l)}`,
|
|
4630
4638
|
modelValue: F.value,
|
|
4631
|
-
"onUpdate:modelValue":
|
|
4639
|
+
"onUpdate:modelValue": ve[3] || (ve[3] = (Ke) => F.value = Ke),
|
|
4632
4640
|
class: "w-[150px]",
|
|
4633
|
-
items:
|
|
4634
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
4635
|
-
h.hideExport ?
|
|
4641
|
+
items: Qe.value
|
|
4642
|
+
}, null, 8, ["modelValue", "items"])) : be("", !0),
|
|
4643
|
+
h.hideExport ? be("", !0) : (Y(), ge(ko, {
|
|
4636
4644
|
key: 4,
|
|
4637
4645
|
shift: !0
|
|
4638
4646
|
}, {
|
|
4639
|
-
"menu-button":
|
|
4640
|
-
|
|
4647
|
+
"menu-button": Le(() => [
|
|
4648
|
+
he(pt, {
|
|
4641
4649
|
icon: "more_vert",
|
|
4642
4650
|
variant: "tertiary"
|
|
4643
4651
|
})
|
|
4644
4652
|
]),
|
|
4645
|
-
default:
|
|
4646
|
-
(Y(!0),
|
|
4647
|
-
key:
|
|
4648
|
-
label:
|
|
4649
|
-
onClick:
|
|
4653
|
+
default: Le(() => [
|
|
4654
|
+
(Y(!0), fe(Ve, null, zt(r(Co), (Ke) => (Y(), ge(_o, {
|
|
4655
|
+
key: Ke.value,
|
|
4656
|
+
label: Ke.label,
|
|
4657
|
+
onClick: Ke.onClick
|
|
4650
4658
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
4651
4659
|
]),
|
|
4652
4660
|
_: 1
|
|
@@ -4658,7 +4666,7 @@ const jr = {
|
|
|
4658
4666
|
]),
|
|
4659
4667
|
_: 1
|
|
4660
4668
|
}, 8, ["modelValue", "tile-index"]))
|
|
4661
|
-
], 4)) : (Y(),
|
|
4669
|
+
], 4)) : (Y(), ge(Lo, { key: 1 }))
|
|
4662
4670
|
]),
|
|
4663
4671
|
_: 1
|
|
4664
4672
|
}, 8, ["class", "variant"]);
|
|
@@ -4666,16 +4674,16 @@ const jr = {
|
|
|
4666
4674
|
}
|
|
4667
4675
|
});
|
|
4668
4676
|
export {
|
|
4669
|
-
|
|
4677
|
+
yn as L,
|
|
4670
4678
|
et as R,
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4679
|
+
_e as S,
|
|
4680
|
+
bn as X,
|
|
4681
|
+
Cn as Y,
|
|
4674
4682
|
cl as _,
|
|
4675
|
-
|
|
4683
|
+
gn as a,
|
|
4676
4684
|
ul as b,
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4685
|
+
xn as c,
|
|
4686
|
+
an as d,
|
|
4687
|
+
fn as g,
|
|
4680
4688
|
Zn as u
|
|
4681
4689
|
};
|