@feedmepos/mf-report 5.21.44 → 5.21.46
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-DUh6U-OB.js +272 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DGJLHolh.js → BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js} +35 -6
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CLvbGLP1.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DMlbfzNS.js → Default.vue_vue_type_script_setup_true_lang-Cfl5Ct4b.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-DOO2XMn8.js → FilterSelector.vue_vue_type_script_setup_true_lang-DuhjAzQP.js} +1000 -988
- package/dist/{InsightView-CJkEpae0.js → InsightView-DkIcQpCD.js} +6 -6
- package/dist/{Integration-DEMkBCnc.js → Integration-C0f0Q2os.js} +3 -3
- package/dist/{Integrations-DLLGEyAZ.js → Integrations-BM_vRj0F.js} +3 -3
- package/dist/{Layout-FE1wTFZL.js → Layout-C4YVePzi.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BOUDROhL.js → MenuTab.vue_vue_type_script_setup_true_lang-a72Tflwl.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BtrX0AqU.js → NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-C7rs35Bc.js → NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js} +1 -1
- package/dist/{OverviewView-Ba29IQAU.js → OverviewView-AKRzXwKb.js} +5 -5
- package/dist/{Report-8vDCmOL4.js → Report-aKG6wWUi.js} +4 -4
- package/dist/{ReportEditor-Bk5mjleg.js → ReportEditor-ZRBQHo6K.js} +6 -6
- package/dist/{ReportView-DAVaSfNT.js → ReportView-cWqrG_Nd.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-xr4UKyXl.js → SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js} +1 -1
- package/dist/{Setting-DJNZA7nB.js → Setting-BXEPHSGB.js} +5 -5
- package/dist/TileEditor-Bqhu78EZ.js +2919 -0
- package/dist/{TransitionFade-CMqktP2C.js → TransitionFade-CXHZsIPF.js} +6 -6
- package/dist/{app-3OaaX0uN.js → app-Fb6OY58U.js} +74 -74
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-Bf22-3_a.js → formatChartData.worker-DAwFx8Qz.js} +31 -2
- package/dist/assets/{processTableData.worker-GbyPQNAF.js → processTableData.worker-CGM71S-g.js} +31 -2
- package/dist/{vue-i18n-CO895OyU.js → vue-i18n-DLsuRxx8.js} +1 -1
- package/package.json +1 -1
- package/dist/App-C4pEJKcd.js +0 -278
- package/dist/TileEditor-B9TNHzej.js +0 -2899
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { W as N, e as at, f as Ll, S as qe, v as tt, g as Rl, h as
|
|
3
|
-
import { u as nt, b as lt, a as Rt, h as
|
|
4
|
-
import { d as xt, _ as Al, a as Ml, b as Wl, c as Il } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { computed as F, defineComponent as _e, mergeModels as We, useModel as De, ref as T, onMounted as Ie, nextTick as Ce, watch as me, resolveComponent as U, createElementBlock as se, openBlock as P, Fragment as xe, renderSlot as Ne, createVNode as G, normalizeStyle as Ve, unref as d, createElementVNode as j, toDisplayString as ke, withCtx as ce, createBlock as fe, createCommentVNode as Te, normalizeClass as Ze, h as ut, renderList as dt, toRaw as Sl, markRaw as kl, createTextVNode as wt, onUnmounted as Xt, resolveDynamicComponent as Tl, withDirectives as _l, vShow as Fl, withModifiers as gt } from "vue";
|
|
2
|
+
import { W as N, e as at, f as Ll, S as qe, v as tt, g as Rl, h as yt, i as Gt, q as jt, R as Ke, j as $l, D as $e, c as ye, C as Se, a as zl, b as El, _ as Vl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js";
|
|
3
|
+
import { u as nt, b as lt, a as Rt, h as Dl } from "./vue-i18n-DLsuRxx8.js";
|
|
4
|
+
import { d as xt, _ as Al, a as Ml, b as Wl, c as Il } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js";
|
|
5
5
|
import { storeToRefs as ze, defineStore as Kt } from "pinia";
|
|
6
6
|
import { useBreakpoints as Jt, useSnackbar as $t, components as Nl } from "@feedmepos/ui-library";
|
|
7
|
-
import { _ as Pl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { _ as Pl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js";
|
|
8
8
|
import { r as Ye } from "./i18n-7InkCBCc.js";
|
|
9
|
-
import { _ as
|
|
10
|
-
import { d as Je } from "./app-
|
|
11
|
-
var
|
|
9
|
+
import { _ as Ct } from "./NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js";
|
|
10
|
+
import { d as Je } from "./app-Fb6OY58U.js";
|
|
11
|
+
var St = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(St || {}), Oe = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(Oe || {}), kt = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(kt || {}), Tt = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Tt || {}), _t = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(_t || {}), Ft = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(Ft || {}), Lt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(Lt || {});
|
|
12
12
|
N.Circular, N.Table, N.BarChart, N.LineChart, N.StackBarChart, N.StackLineChart, N.Scorecard, N.Spacer;
|
|
13
13
|
const Bl = [
|
|
14
14
|
{
|
|
@@ -73,7 +73,7 @@ const Bl = [
|
|
|
73
73
|
showSearchBar: !1
|
|
74
74
|
}
|
|
75
75
|
];
|
|
76
|
-
function
|
|
76
|
+
function bt(e) {
|
|
77
77
|
const o = [e.schemaName, e.name];
|
|
78
78
|
return "option" in e && e.option && o.push(e.option), "aggregation" in e && e.aggregation && o.push(e.aggregation), o.push(e.label.replace(/[^a-zA-Z0-9]/g, "")), o.join("_").toLowerCase();
|
|
79
79
|
}
|
|
@@ -127,17 +127,17 @@ function Ee({
|
|
|
127
127
|
function Zt(e, o, i) {
|
|
128
128
|
if (e === "" || o === "")
|
|
129
129
|
return null;
|
|
130
|
-
let s = (
|
|
131
|
-
i === "ID" && (s = (
|
|
132
|
-
const
|
|
133
|
-
if (isNaN(
|
|
130
|
+
let s = (k) => k == null ? void 0 : k.replace(/,/g, "");
|
|
131
|
+
i === "ID" && (s = (k) => k == null ? void 0 : k.replace(/\./g, "").replace(/,/g, "."));
|
|
132
|
+
const m = Number(s(e)), u = Number(s(o));
|
|
133
|
+
if (isNaN(m) || isNaN(u))
|
|
134
134
|
return null;
|
|
135
|
-
let
|
|
136
|
-
u === 0 ?
|
|
137
|
-
const
|
|
135
|
+
let C = 0;
|
|
136
|
+
u === 0 ? m === 0 ? C = 0 : C = 1 : C = (m - u) / u;
|
|
137
|
+
const _ = Ol(C);
|
|
138
138
|
return {
|
|
139
|
-
value: isNaN(
|
|
140
|
-
icon:
|
|
139
|
+
value: isNaN(C) ? "" : `${(C * 100).toFixed(0)}%`,
|
|
140
|
+
icon: _
|
|
141
141
|
};
|
|
142
142
|
}
|
|
143
143
|
function Ol(e) {
|
|
@@ -155,43 +155,43 @@ function Ol(e) {
|
|
|
155
155
|
tailwind: "fm-color-neutral-gray-100"
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function pt(e) {
|
|
159
159
|
let o = !1;
|
|
160
160
|
const i = (u) => {
|
|
161
161
|
if (typeof document > "u" || typeof window > "u")
|
|
162
162
|
return;
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
163
|
+
const C = String((u == null ? void 0 : u.id) ?? "");
|
|
164
|
+
if (!C)
|
|
165
165
|
return;
|
|
166
|
-
const
|
|
167
|
-
`#comparison-tooltip-${
|
|
166
|
+
const _ = document.querySelector(
|
|
167
|
+
`#comparison-tooltip-${C}`
|
|
168
168
|
);
|
|
169
|
-
|
|
169
|
+
_ && (_.__onViewportChange && (window.removeEventListener("scroll", _.__onViewportChange, !0), window.removeEventListener("resize", _.__onViewportChange)), _.remove());
|
|
170
170
|
}, s = (u) => {
|
|
171
|
-
var
|
|
172
|
-
return (Array.isArray((
|
|
173
|
-
},
|
|
174
|
-
var l,
|
|
171
|
+
var _;
|
|
172
|
+
return (Array.isArray((_ = u == null ? void 0 : u.data) == null ? void 0 : _.datasets) ? u.data.datasets : []).some((k) => Reflect.get(k, "dash") === !0 || Reflect.get(k, "isCompare") === !0);
|
|
173
|
+
}, m = (u) => {
|
|
174
|
+
var l, w;
|
|
175
175
|
if (e === "bar" && !s(u))
|
|
176
176
|
return;
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
177
|
+
const C = ((l = u.tooltip) == null ? void 0 : l.getActiveElements()) ?? [];
|
|
178
|
+
if (C.length === 0)
|
|
179
179
|
return;
|
|
180
|
-
const
|
|
181
|
-
if (!
|
|
180
|
+
const _ = u.scales.x, k = u.scales.y;
|
|
181
|
+
if (!_ || !k)
|
|
182
182
|
return;
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
const V = u.ctx, p = C[0], x = p.element, v = ((w = u.options) == null ? void 0 : w.indexAxis) === "y", g = v ? k : _, b = v ? x.y : x.x, L = g.getPixelForValue(p.index), c = e === "bar" ? L : b ?? L, { left: t, right: r, top: h, bottom: a } = u.chartArea;
|
|
184
|
+
V.save(), V.beginPath(), V.lineWidth = 1, V.strokeStyle = "rgba(0, 0, 0, 0.3)", V.setLineDash([5, 5]), v ? (V.moveTo(t, c), V.lineTo(r, c)) : (V.moveTo(c, h), V.lineTo(c, a)), V.stroke(), V.restore();
|
|
185
185
|
};
|
|
186
186
|
return {
|
|
187
187
|
id: "crosshair",
|
|
188
188
|
afterDatasetsDraw: (u) => {
|
|
189
|
-
|
|
189
|
+
m(u);
|
|
190
190
|
},
|
|
191
191
|
beforeTooltipDraw: (u) => {
|
|
192
|
-
var
|
|
193
|
-
const
|
|
194
|
-
(((
|
|
192
|
+
var _;
|
|
193
|
+
const C = u.ctx;
|
|
194
|
+
(((_ = u.tooltip) == null ? void 0 : _.opacity) ?? 0) > 0 && (C.save(), C.shadowColor = "rgba(17, 24, 39, 0.14)", C.shadowBlur = 12, C.shadowOffsetX = 0, C.shadowOffsetY = 4, o = !0);
|
|
195
195
|
},
|
|
196
196
|
afterTooltipDraw: (u) => {
|
|
197
197
|
o && (u.ctx.restore(), o = !1);
|
|
@@ -204,9 +204,9 @@ function ct(e) {
|
|
|
204
204
|
}
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
const i = (c) => typeof c != "string" ? [] : c.split("#").map((t) => t.trim()).filter((t) => t.length > 0), s = (c) => Reflect.get(c, "dash") === !0 || Reflect.get(c, "isCompare") === !0,
|
|
209
|
-
const t = Reflect.get(c.dataset, "label"), r = typeof t == "string" ? t : "",
|
|
207
|
+
function ot(e = !1, o = !1) {
|
|
208
|
+
const i = (c) => typeof c != "string" ? [] : c.split("#").map((t) => t.trim()).filter((t) => t.length > 0), s = (c) => Reflect.get(c, "dash") === !0 || Reflect.get(c, "isCompare") === !0, m = (c) => {
|
|
209
|
+
const t = Reflect.get(c.dataset, "label"), r = typeof t == "string" ? t : "", h = c.parsed, a = e ? h.x : h.y, l = e ? h.y : h.x;
|
|
210
210
|
return `${r}: ${(a ?? l ?? 0).toLocaleString()}`;
|
|
211
211
|
}, u = (c, t) => {
|
|
212
212
|
if (typeof c == "string") return c;
|
|
@@ -214,82 +214,82 @@ function dt(e = !1, o = !1) {
|
|
|
214
214
|
const r = c[t];
|
|
215
215
|
return typeof r == "string" ? r : void 0;
|
|
216
216
|
}
|
|
217
|
-
},
|
|
217
|
+
}, C = (c) => {
|
|
218
218
|
if (typeof c != "string") return "#9ca3af";
|
|
219
219
|
const t = c.trim();
|
|
220
220
|
return /^[-#(),.%\sa-zA-Z0-9]+$/.test(t) ? t : "#9ca3af";
|
|
221
|
-
},
|
|
221
|
+
}, _ = (c) => {
|
|
222
222
|
const t = c.replace(/\s+/g, "").toLowerCase();
|
|
223
223
|
return !!(t === "transparent" || /^rgba\([^)]*,0(?:\.0+)?\)$/.test(t) || /^hsla\([^)]*,0(?:\.0+)?\)$/.test(t) || t === "#0000" || t === "#00000000");
|
|
224
|
-
},
|
|
224
|
+
}, k = (...c) => {
|
|
225
225
|
for (const t of c) {
|
|
226
226
|
if (!t) continue;
|
|
227
|
-
const r =
|
|
228
|
-
if (!
|
|
227
|
+
const r = C(t);
|
|
228
|
+
if (!_(r))
|
|
229
229
|
return r;
|
|
230
230
|
}
|
|
231
231
|
return "#9ca3af";
|
|
232
|
-
},
|
|
233
|
-
var
|
|
232
|
+
}, V = (c) => {
|
|
233
|
+
var h, a;
|
|
234
234
|
const t = c.dataset;
|
|
235
|
-
return Reflect.get(t, "type") === "bar" ? !0 : ((a = (
|
|
236
|
-
},
|
|
237
|
-
const t = c.dataset, r = typeof c.dataIndex == "number" ? c.dataIndex : 0,
|
|
235
|
+
return Reflect.get(t, "type") === "bar" ? !0 : ((a = (h = c.chart) == null ? void 0 : h.config) == null ? void 0 : a.type) === "bar";
|
|
236
|
+
}, p = (c) => {
|
|
237
|
+
const t = c.dataset, r = typeof c.dataIndex == "number" ? c.dataIndex : 0, h = u(Reflect.get(t, "borderColor"), r), a = u(Reflect.get(t, "backgroundColor"), r), l = Reflect.get(
|
|
238
238
|
c.element,
|
|
239
239
|
"options"
|
|
240
|
-
),
|
|
240
|
+
), w = u(
|
|
241
241
|
Reflect.get(l ?? {}, "borderColor"),
|
|
242
242
|
r
|
|
243
243
|
), $ = u(
|
|
244
244
|
Reflect.get(l ?? {}, "backgroundColor"),
|
|
245
245
|
r
|
|
246
246
|
);
|
|
247
|
-
return
|
|
248
|
-
},
|
|
247
|
+
return V(c) ? k(a, $, h, w) : k(h, w, a, $);
|
|
248
|
+
}, x = (c) => c.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/\"/g, """).replace(/'/g, "'"), y = (c) => {
|
|
249
249
|
var Z;
|
|
250
|
-
const t = (Z = c[0]) == null ? void 0 : Z.label, r = i(t),
|
|
250
|
+
const t = (Z = c[0]) == null ? void 0 : Z.label, r = i(t), h = r[0] ?? (t == null ? "" : String(t)), a = r[1], l = [], w = [];
|
|
251
251
|
c.forEach((W) => {
|
|
252
|
-
const
|
|
253
|
-
text:
|
|
254
|
-
color:
|
|
255
|
-
isBar:
|
|
252
|
+
const K = W.dataset ?? {}, re = {
|
|
253
|
+
text: m(W),
|
|
254
|
+
color: p(W),
|
|
255
|
+
isBar: V(W)
|
|
256
256
|
};
|
|
257
|
-
if (a && s(
|
|
258
|
-
|
|
257
|
+
if (a && s(K)) {
|
|
258
|
+
w.push(re);
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
261
|
l.push(re);
|
|
262
262
|
});
|
|
263
|
-
const $ = (W,
|
|
263
|
+
const $ = (W, K = !1) => `<div style="font-size:13px;font-weight:600;color:#111827;text-align:left;margin:${K ? "10px" : "0"} 0 6px;">${x(W)}</div>`, A = (W) => `<div style="display:flex;align-items:center;font-size:14px;font-weight:500;color:#374151;text-align:left;line-height:1.45;margin:0 0 4px;"><span style="${W.isBar ? `display:inline-block;width:14px;height:14px;border-radius:3px;background:${W.color};border:1px solid rgba(17, 24, 39, 0.35);box-sizing:border-box;margin-right:10px;flex:0 0 auto;` : `display:inline-block;width:14px;height:14px;border-radius:9999px;background:${W.color};border:2px solid #ffffff;box-shadow:0 0 0 1px rgba(17, 24, 39, 0.35);box-sizing:border-box;margin-right:10px;flex:0 0 auto;`}"></span><span>${x(W.text)}</span></div>`;
|
|
264
264
|
let I = "";
|
|
265
|
-
return
|
|
265
|
+
return h.length > 0 && (I += $(h)), I += l.map((W) => A(W)).join(""), a && w.length > 0 && (I += $(a, I.length > 0), I += w.map((W) => A(W)).join("")), I;
|
|
266
266
|
}, v = (c) => {
|
|
267
267
|
const t = window.getComputedStyle(c);
|
|
268
|
-
return [t.overflow, t.overflowX, t.overflowY].some((
|
|
269
|
-
},
|
|
268
|
+
return [t.overflow, t.overflowX, t.overflowY].some((h) => h !== "visible");
|
|
269
|
+
}, g = (c) => {
|
|
270
270
|
let t = c.parentElement ?? c, r = t;
|
|
271
271
|
for (; r && r.parentElement && r.parentElement !== document.body && r.parentElement !== document.documentElement; )
|
|
272
272
|
v(r) && (t = r.parentElement), r = r.parentElement;
|
|
273
273
|
return window.getComputedStyle(t).position === "static" && (t.style.position = "relative"), t;
|
|
274
|
-
},
|
|
275
|
-
const l = t.getBoundingClientRect(),
|
|
274
|
+
}, b = (c, t, r, h, a) => {
|
|
275
|
+
const l = t.getBoundingClientRect(), w = r.getBoundingClientRect(), $ = r.scrollLeft, A = r.scrollTop, I = 8, Z = l.left - w.left + $ + h + 12, W = l.top - w.top + A + a - c.offsetHeight / 2, K = $ + I;
|
|
276
276
|
let re = A + I;
|
|
277
277
|
const ue = document.querySelector(
|
|
278
278
|
'[data-menu-tab="true"]'
|
|
279
279
|
);
|
|
280
280
|
if (ue) {
|
|
281
|
-
const O = ue.getBoundingClientRect().bottom -
|
|
281
|
+
const O = ue.getBoundingClientRect().bottom - w.top + A + I;
|
|
282
282
|
re = Math.max(re, O);
|
|
283
283
|
}
|
|
284
|
-
const
|
|
285
|
-
|
|
284
|
+
const S = Math.max(
|
|
285
|
+
K,
|
|
286
286
|
$ + r.clientWidth - c.offsetWidth - I
|
|
287
|
-
),
|
|
287
|
+
), E = Math.max(
|
|
288
288
|
re,
|
|
289
289
|
A + r.clientHeight - c.offsetHeight - I
|
|
290
|
-
), X = Math.min(Math.max(
|
|
290
|
+
), X = Math.min(Math.max(K, Z), S), q = Math.min(Math.max(re, W), E);
|
|
291
291
|
c.style.left = `${X}px`, c.style.top = `${q}px`;
|
|
292
|
-
},
|
|
292
|
+
}, L = {
|
|
293
293
|
mode: "index",
|
|
294
294
|
intersect: !1,
|
|
295
295
|
axis: e ? "y" : "x",
|
|
@@ -324,7 +324,7 @@ function dt(e = !1, o = !1) {
|
|
|
324
324
|
titleMarginBottom: 10
|
|
325
325
|
};
|
|
326
326
|
return o ? {
|
|
327
|
-
...
|
|
327
|
+
...L,
|
|
328
328
|
enabled: !1,
|
|
329
329
|
external: ({ chart: c, tooltip: t }) => {
|
|
330
330
|
if (typeof document > "u" || typeof window > "u")
|
|
@@ -332,9 +332,9 @@ function dt(e = !1, o = !1) {
|
|
|
332
332
|
const r = c == null ? void 0 : c.canvas;
|
|
333
333
|
if (!(r instanceof HTMLCanvasElement))
|
|
334
334
|
return;
|
|
335
|
-
const
|
|
335
|
+
const h = g(r), a = `comparison-tooltip-${String(c.id)}`;
|
|
336
336
|
let l = document.querySelector(`#${a}`);
|
|
337
|
-
if (l || (l = document.createElement("div"), l.id = a, l.style.background = "#ffffff", l.style.border = "1.2px solid #d1d5db", l.style.borderRadius = "8px", l.style.boxShadow = "0 4px 12px rgba(17, 24, 39, 0.14)", l.style.color = "#374151", l.style.left = "0", l.style.opacity = "0", l.style.maxHeight = "calc(100% - 16px)", l.style.maxWidth = "min(420px, calc(100% - 16px))", l.style.overflowY = "auto", l.style.padding = "10px 12px", l.style.pointerEvents = "none", l.style.position = "absolute", l.style.textAlign = "left", l.style.top = "0", l.style.transform = "none", l.style.whiteSpace = "normal", l.style.wordBreak = "break-word", l.style.zIndex = "9999"), l.parentElement !==
|
|
337
|
+
if (l || (l = document.createElement("div"), l.id = a, l.style.background = "#ffffff", l.style.border = "1.2px solid #d1d5db", l.style.borderRadius = "8px", l.style.boxShadow = "0 4px 12px rgba(17, 24, 39, 0.14)", l.style.color = "#374151", l.style.left = "0", l.style.opacity = "0", l.style.maxHeight = "calc(100% - 16px)", l.style.maxWidth = "min(420px, calc(100% - 16px))", l.style.overflowY = "auto", l.style.padding = "10px 12px", l.style.pointerEvents = "none", l.style.position = "absolute", l.style.textAlign = "left", l.style.top = "0", l.style.transform = "none", l.style.whiteSpace = "normal", l.style.wordBreak = "break-word", l.style.zIndex = "9999"), l.parentElement !== h && h.appendChild(l), l.__onViewportChange || (l.__onViewportChange = () => {
|
|
338
338
|
if (l.style.opacity !== "1")
|
|
339
339
|
return;
|
|
340
340
|
const I = Number(l.dataset.caretX), Z = Number(l.dataset.caretY);
|
|
@@ -342,8 +342,8 @@ function dt(e = !1, o = !1) {
|
|
|
342
342
|
l.style.opacity = "0";
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
|
-
const W =
|
|
346
|
-
l.parentElement !== W && W.appendChild(l),
|
|
345
|
+
const W = g(r);
|
|
346
|
+
l.parentElement !== W && W.appendChild(l), b(l, r, W, I, Z);
|
|
347
347
|
}, window.addEventListener("scroll", l.__onViewportChange, {
|
|
348
348
|
capture: !0,
|
|
349
349
|
passive: !0
|
|
@@ -353,43 +353,43 @@ function dt(e = !1, o = !1) {
|
|
|
353
353
|
l.style.opacity = "0";
|
|
354
354
|
return;
|
|
355
355
|
}
|
|
356
|
-
const
|
|
357
|
-
if (
|
|
356
|
+
const w = (t == null ? void 0 : t.dataPoints) ?? [];
|
|
357
|
+
if (w.length === 0) {
|
|
358
358
|
l.style.opacity = "0";
|
|
359
359
|
return;
|
|
360
360
|
}
|
|
361
|
-
l.innerHTML = y(
|
|
361
|
+
l.innerHTML = y(w);
|
|
362
362
|
const $ = typeof (t == null ? void 0 : t.caretX) == "number" ? t.caretX : 0, A = typeof (t == null ? void 0 : t.caretY) == "number" ? t.caretY : 0;
|
|
363
|
-
l.dataset.caretX = String($), l.dataset.caretY = String(A),
|
|
363
|
+
l.dataset.caretX = String($), l.dataset.caretY = String(A), b(l, r, h, $, A), l.style.opacity = "1";
|
|
364
364
|
}
|
|
365
365
|
} : {
|
|
366
|
-
...
|
|
366
|
+
...L,
|
|
367
367
|
callbacks: {
|
|
368
368
|
title: (c) => {
|
|
369
369
|
var r;
|
|
370
370
|
const t = (r = c[0]) == null ? void 0 : r.label;
|
|
371
371
|
return t == null ? "" : String(t);
|
|
372
372
|
},
|
|
373
|
-
label: (c) =>
|
|
373
|
+
label: (c) => m(c)
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
function o(
|
|
379
|
-
if (
|
|
377
|
+
function st(e) {
|
|
378
|
+
function o(p, x, y) {
|
|
379
|
+
if (p.measureText(x).width <= y) return x;
|
|
380
380
|
const v = "…";
|
|
381
|
-
let
|
|
382
|
-
for (;
|
|
383
|
-
const
|
|
384
|
-
|
|
381
|
+
let g = 0, b = x.length;
|
|
382
|
+
for (; g < b; ) {
|
|
383
|
+
const L = Math.floor((g + b) / 2), c = x.slice(0, L) + v;
|
|
384
|
+
p.measureText(c).width <= y ? g = L + 1 : b = L;
|
|
385
385
|
}
|
|
386
|
-
return
|
|
386
|
+
return x.slice(0, g - 1) + v;
|
|
387
387
|
}
|
|
388
|
-
function i(
|
|
389
|
-
const
|
|
390
|
-
return (y ??
|
|
388
|
+
function i(p) {
|
|
389
|
+
const x = p == null ? "" : String(p), [y] = x.split("#");
|
|
390
|
+
return (y ?? x).trim();
|
|
391
391
|
}
|
|
392
|
-
const s =
|
|
392
|
+
const s = F(() => ({
|
|
393
393
|
display: e.showLabel,
|
|
394
394
|
align: e.labelAlign,
|
|
395
395
|
anchor: e.labelAnchor,
|
|
@@ -398,12 +398,12 @@ function ot(e) {
|
|
|
398
398
|
font: {
|
|
399
399
|
size: e.labelFontSize
|
|
400
400
|
},
|
|
401
|
-
color: (
|
|
402
|
-
const
|
|
403
|
-
return
|
|
401
|
+
color: (p) => {
|
|
402
|
+
const x = p.chart.data.datasets[p.datasetIndex];
|
|
403
|
+
return x.borderColor ? Array.isArray(x.borderColor) ? x.borderColor[p.dataIndex] : x.borderColor : x.backgroundColor ? Array.isArray(x.backgroundColor) ? x.backgroundColor[p.dataIndex] : x.backgroundColor : "#000";
|
|
404
404
|
},
|
|
405
|
-
formatter: (
|
|
406
|
-
})),
|
|
405
|
+
formatter: (p) => p === 0 ? "" : p.toLocaleString("en-US")
|
|
406
|
+
})), m = F(() => ({
|
|
407
407
|
display: e.showX,
|
|
408
408
|
position: e.xPosition,
|
|
409
409
|
grid: {
|
|
@@ -411,16 +411,16 @@ function ot(e) {
|
|
|
411
411
|
},
|
|
412
412
|
ticks: {
|
|
413
413
|
display: e.showXTick,
|
|
414
|
-
callback: function(
|
|
415
|
-
if ((e == null ? void 0 : e.isTransposed) === !0) return i(
|
|
416
|
-
let y = String(
|
|
414
|
+
callback: function(p) {
|
|
415
|
+
if ((e == null ? void 0 : e.isTransposed) === !0) return i(p);
|
|
416
|
+
let y = String(p);
|
|
417
417
|
const v = this;
|
|
418
|
-
v && typeof v.getLabelForValue == "function" && (y = v.getLabelForValue(
|
|
419
|
-
const
|
|
420
|
-
if (
|
|
421
|
-
|
|
422
|
-
const t =
|
|
423
|
-
return
|
|
418
|
+
v && typeof v.getLabelForValue == "function" && (y = v.getLabelForValue(p)), y = i(y);
|
|
419
|
+
const g = v == null ? void 0 : v.chart, b = v == null ? void 0 : v.ctx, L = g.height * 0.25;
|
|
420
|
+
if (b && L > 0) {
|
|
421
|
+
b.save();
|
|
422
|
+
const t = b.measureText(y).width > L ? o(b, y, L) : y;
|
|
423
|
+
return b.restore(), t;
|
|
424
424
|
}
|
|
425
425
|
return y;
|
|
426
426
|
},
|
|
@@ -435,19 +435,19 @@ function ot(e) {
|
|
|
435
435
|
size: e.xTitleFontSize
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
|
-
afterBuildTicks: (
|
|
439
|
-
const
|
|
440
|
-
if (
|
|
441
|
-
const y = i(
|
|
442
|
-
|
|
438
|
+
afterBuildTicks: (p) => {
|
|
439
|
+
const x = Array.isArray(p == null ? void 0 : p.ticks) ? p.ticks : [];
|
|
440
|
+
if (x.length === 0) return;
|
|
441
|
+
const y = i(p.getLabelForValue(x[0].value)), v = !isNaN(Number(y));
|
|
442
|
+
p.options.ticks.minRotation = v || x.length < 10 ? 0 : 90;
|
|
443
443
|
},
|
|
444
|
-
afterFit: (
|
|
444
|
+
afterFit: (p) => {
|
|
445
445
|
if (!(e != null && e.isTransposed)) {
|
|
446
|
-
const
|
|
447
|
-
|
|
446
|
+
const x = p.chart.height * 0.4;
|
|
447
|
+
p.height > x && (p.height = x);
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
})), u =
|
|
450
|
+
})), u = F(() => ({
|
|
451
451
|
display: e.showY,
|
|
452
452
|
position: e.yPosition,
|
|
453
453
|
grid: {
|
|
@@ -458,16 +458,16 @@ function ot(e) {
|
|
|
458
458
|
font: {
|
|
459
459
|
size: e.yTickFontSize
|
|
460
460
|
},
|
|
461
|
-
callback: function(
|
|
462
|
-
if (!((e == null ? void 0 : e.isTransposed) === !0)) return i(
|
|
463
|
-
let y = String(
|
|
461
|
+
callback: function(p) {
|
|
462
|
+
if (!((e == null ? void 0 : e.isTransposed) === !0)) return i(p);
|
|
463
|
+
let y = String(p);
|
|
464
464
|
const v = this;
|
|
465
|
-
v && typeof v.getLabelForValue == "function" && (y = v.getLabelForValue(
|
|
466
|
-
const
|
|
467
|
-
if (
|
|
468
|
-
|
|
469
|
-
const t =
|
|
470
|
-
return
|
|
465
|
+
v && typeof v.getLabelForValue == "function" && (y = v.getLabelForValue(p)), y = i(y);
|
|
466
|
+
const g = v == null ? void 0 : v.chart, b = v == null ? void 0 : v.ctx, L = g.width * 0.4;
|
|
467
|
+
if (b && L > 0) {
|
|
468
|
+
b.save();
|
|
469
|
+
const t = b.measureText(y).width > L ? o(b, y, L) : y;
|
|
470
|
+
return b.restore(), t;
|
|
471
471
|
}
|
|
472
472
|
return y;
|
|
473
473
|
}
|
|
@@ -479,7 +479,7 @@ function ot(e) {
|
|
|
479
479
|
size: e.yTitleFontSize
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
})),
|
|
482
|
+
})), C = F(() => ({
|
|
483
483
|
display: e.showLegend,
|
|
484
484
|
position: e.legendPosition,
|
|
485
485
|
usePointStyle: e.usePointStyle,
|
|
@@ -487,42 +487,42 @@ function ot(e) {
|
|
|
487
487
|
maxWidth: e.legendMaxWidth,
|
|
488
488
|
labels: {
|
|
489
489
|
usePointStyle: e.usePointStyle ?? !0,
|
|
490
|
-
generateLabels: (
|
|
490
|
+
generateLabels: (p) => {
|
|
491
491
|
var y;
|
|
492
|
-
const
|
|
493
|
-
if (
|
|
494
|
-
if (
|
|
495
|
-
const v =
|
|
496
|
-
return
|
|
497
|
-
const c = v.backgroundColor[
|
|
492
|
+
const x = ((y = p == null ? void 0 : p.data) == null ? void 0 : y.datasets) || [];
|
|
493
|
+
if (x.length === 0) return [];
|
|
494
|
+
if (x.length === 1 && Array.isArray(x[0].backgroundColor) && x[0].backgroundColor.length > 1 && Array.isArray(x[0].data)) {
|
|
495
|
+
const v = x[0];
|
|
496
|
+
return p.data.labels.map((b, L) => {
|
|
497
|
+
const c = v.backgroundColor[L];
|
|
498
498
|
return {
|
|
499
|
-
text:
|
|
499
|
+
text: b,
|
|
500
500
|
fontColor: "#6b6b6b",
|
|
501
501
|
fillStyle: c,
|
|
502
502
|
strokeStyle: c,
|
|
503
503
|
datasetIndex: 0,
|
|
504
|
-
index:
|
|
505
|
-
hidden:
|
|
504
|
+
index: L,
|
|
505
|
+
hidden: p.getDataVisibility ? !p.getDataVisibility(L) : !1
|
|
506
506
|
};
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
-
return
|
|
510
|
-
const
|
|
509
|
+
return p.data.datasets.map((v, g) => {
|
|
510
|
+
const b = v.borderColor || v.backgroundColor;
|
|
511
511
|
return {
|
|
512
512
|
text: v.label,
|
|
513
513
|
fontColor: "#6b6b6b",
|
|
514
|
-
fillStyle:
|
|
515
|
-
strokeStyle:
|
|
516
|
-
datasetIndex:
|
|
517
|
-
hidden: !
|
|
514
|
+
fillStyle: b,
|
|
515
|
+
strokeStyle: b,
|
|
516
|
+
datasetIndex: g,
|
|
517
|
+
hidden: !p.isDatasetVisible(g)
|
|
518
518
|
};
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
|
-
})),
|
|
523
|
-
return { datalabels: s, xCfg:
|
|
522
|
+
})), _ = F(() => e.isTransposed), k = F(() => e.chartWidth), V = F(() => e.chartHeight);
|
|
523
|
+
return { datalabels: s, xCfg: m, yCfg: u, isTransposed: _, legend: C, chartWidth: k, chartHeight: V };
|
|
524
524
|
}
|
|
525
|
-
const ql = /* @__PURE__ */
|
|
525
|
+
const ql = /* @__PURE__ */ _e({
|
|
526
526
|
__name: "WidgetBarchart",
|
|
527
527
|
props: /* @__PURE__ */ We({
|
|
528
528
|
tileIndex: {}
|
|
@@ -532,64 +532,64 @@ const ql = /* @__PURE__ */ Te({
|
|
|
532
532
|
}),
|
|
533
533
|
emits: ["update:modelValue"],
|
|
534
534
|
setup(e) {
|
|
535
|
-
const o = e, i =
|
|
535
|
+
const o = e, i = De(e, "modelValue"), s = T(null), m = F(() => {
|
|
536
536
|
var t;
|
|
537
537
|
return ((t = i.value.data) == null ? void 0 : t.xAxis) ?? [];
|
|
538
|
-
}), u =
|
|
538
|
+
}), u = F(() => {
|
|
539
539
|
var t;
|
|
540
540
|
return ((t = i.value.data) == null ? void 0 : t.datasets) ?? [];
|
|
541
|
-
}), { datalabels:
|
|
541
|
+
}), { datalabels: C, xCfg: _, yCfg: k, isTransposed: V, legend: p, chartWidth: x, chartHeight: y } = st(
|
|
542
542
|
i.value
|
|
543
|
-
), v =
|
|
543
|
+
), v = F(() => ot(i.value.isTransposed === !0, !0)), g = pt("bar"), b = F(() => u.value.length > 0 ? [
|
|
544
544
|
...u.value.map((t, r) => ({
|
|
545
545
|
label: t.name,
|
|
546
546
|
data: t.values,
|
|
547
547
|
dash: !!t.isCompare,
|
|
548
548
|
backgroundColor: Ee({ index: r, isCompare: t.isCompare })
|
|
549
549
|
}))
|
|
550
|
-
] : []),
|
|
550
|
+
] : []), L = at();
|
|
551
551
|
function c() {
|
|
552
|
-
return
|
|
552
|
+
return L.extractChartSize(s.value, o.tileIndex) || { width: 0, height: 0 };
|
|
553
553
|
}
|
|
554
554
|
return Ie(() => {
|
|
555
|
-
|
|
555
|
+
Ce(() => {
|
|
556
556
|
c();
|
|
557
557
|
});
|
|
558
|
-
}), me([
|
|
559
|
-
|
|
558
|
+
}), me([b], () => {
|
|
559
|
+
Ce(() => c());
|
|
560
560
|
}), (t, r) => {
|
|
561
|
-
const
|
|
561
|
+
const h = U("FmBarChart");
|
|
562
562
|
return P(), se(xe, null, [
|
|
563
563
|
Ne(t.$slots, "menu"),
|
|
564
|
-
G(
|
|
564
|
+
G(h, {
|
|
565
565
|
ref_key: "chartRef",
|
|
566
566
|
ref: s,
|
|
567
567
|
class: "bar-chart",
|
|
568
|
-
datasets:
|
|
569
|
-
"x-axis": { categories:
|
|
570
|
-
"x-cfg": d(
|
|
571
|
-
"y-cfg": d(
|
|
572
|
-
transpose: d(
|
|
568
|
+
datasets: b.value,
|
|
569
|
+
"x-axis": { categories: m.value },
|
|
570
|
+
"x-cfg": d(_),
|
|
571
|
+
"y-cfg": d(k),
|
|
572
|
+
transpose: d(V),
|
|
573
573
|
legend: {
|
|
574
|
-
display: d(
|
|
575
|
-
position: d(
|
|
576
|
-
maxHeight: d(
|
|
577
|
-
maxWidth: d(
|
|
578
|
-
labels: d(
|
|
574
|
+
display: d(p).display ?? !1,
|
|
575
|
+
position: d(p).position,
|
|
576
|
+
maxHeight: d(p).maxHeight,
|
|
577
|
+
maxWidth: d(p).maxWidth,
|
|
578
|
+
labels: d(p).labels
|
|
579
579
|
},
|
|
580
580
|
tooltip: v.value,
|
|
581
|
-
datalabels: d(
|
|
582
|
-
plugins: [d(
|
|
581
|
+
datalabels: d(C),
|
|
582
|
+
plugins: [d(g)],
|
|
583
583
|
"maintain-aspect-ratio": !1,
|
|
584
|
-
style:
|
|
585
|
-
"--chart-width": d(
|
|
584
|
+
style: Ve({
|
|
585
|
+
"--chart-width": d(x) !== void 0 ? d(x) + "px" : "100%",
|
|
586
586
|
"--chart-height": d(y) !== void 0 ? d(y) + "px" : "calc(100% - 36px)"
|
|
587
587
|
})
|
|
588
588
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "tooltip", "datalabels", "plugins", "style"])
|
|
589
589
|
], 64);
|
|
590
590
|
};
|
|
591
591
|
}
|
|
592
|
-
}), Yl = /* @__PURE__ */
|
|
592
|
+
}), Yl = /* @__PURE__ */ _e({
|
|
593
593
|
__name: "WidgetCircular",
|
|
594
594
|
props: /* @__PURE__ */ We({
|
|
595
595
|
tileIndex: {}
|
|
@@ -599,40 +599,40 @@ const ql = /* @__PURE__ */ Te({
|
|
|
599
599
|
}),
|
|
600
600
|
emits: ["update:modelValue"],
|
|
601
601
|
setup(e) {
|
|
602
|
-
const o = e, i =
|
|
603
|
-
let
|
|
604
|
-
return i.value.data.datasets && i.value.data.metrics && i.value.data.datasets.length > 0 && i.value.data.metrics.length > 0 && (
|
|
602
|
+
const o = e, i = De(e, "modelValue"), { breakpoints: s } = Jt(), m = T(null), { datalabels: u, legend: C, chartWidth: _, chartHeight: k } = st(i.value), V = F(() => {
|
|
603
|
+
let b = [];
|
|
604
|
+
return i.value.data.datasets && i.value.data.metrics && i.value.data.datasets.length > 0 && i.value.data.metrics.length > 0 && (b = [
|
|
605
605
|
{
|
|
606
606
|
label: i.value.data.metrics[0],
|
|
607
|
-
data: i.value.data.datasets.map((
|
|
608
|
-
backgroundColor: i.value.data.datasets.map((
|
|
607
|
+
data: i.value.data.datasets.map((L) => L.value),
|
|
608
|
+
backgroundColor: i.value.data.datasets.map((L, c) => Ee({ index: c }))
|
|
609
609
|
}
|
|
610
|
-
]),
|
|
611
|
-
}),
|
|
612
|
-
function
|
|
613
|
-
return
|
|
610
|
+
]), b;
|
|
611
|
+
}), p = at();
|
|
612
|
+
function x() {
|
|
613
|
+
return p.extractChartSize(m.value, o.tileIndex) || { width: 0, height: 0 };
|
|
614
614
|
}
|
|
615
615
|
Ie(() => {
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
Ce(() => {
|
|
617
|
+
x();
|
|
618
618
|
});
|
|
619
|
-
}), me([
|
|
620
|
-
|
|
619
|
+
}), me([V], () => {
|
|
620
|
+
Ce(() => x());
|
|
621
621
|
});
|
|
622
|
-
const y =
|
|
622
|
+
const y = F(() => s.value.lg ? 12 : 8), v = F(
|
|
623
623
|
() => ({
|
|
624
|
-
display:
|
|
625
|
-
position:
|
|
626
|
-
maxHeight:
|
|
627
|
-
maxWidth:
|
|
624
|
+
display: C.value.display ?? !0,
|
|
625
|
+
position: C.value.position ?? "top",
|
|
626
|
+
maxHeight: C.value.maxHeight,
|
|
627
|
+
maxWidth: C.value.maxWidth,
|
|
628
628
|
labels: {
|
|
629
|
-
...
|
|
629
|
+
...C.value.labels,
|
|
630
630
|
font: {
|
|
631
631
|
size: y.value
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
634
|
})
|
|
635
|
-
),
|
|
635
|
+
), g = {
|
|
636
636
|
backgroundColor: "#ffffff",
|
|
637
637
|
titleColor: "#111827",
|
|
638
638
|
bodyColor: "#374151",
|
|
@@ -663,37 +663,46 @@ const ql = /* @__PURE__ */ Te({
|
|
|
663
663
|
},
|
|
664
664
|
titleMarginBottom: 10,
|
|
665
665
|
callbacks: {
|
|
666
|
-
label: (
|
|
667
|
-
const
|
|
668
|
-
return `${
|
|
666
|
+
label: (b) => {
|
|
667
|
+
const L = b.label || "", c = typeof b.parsed == "number" ? b.parsed : 0, r = (Array.isArray(b.dataset.data) ? b.dataset.data : []).reduce((a, l) => a + Number(l || 0), 0), h = r > 0 ? (c / r * 100).toFixed(1) : "0.0";
|
|
668
|
+
return `${L}: ${c.toLocaleString()} (${h}%)`;
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
};
|
|
672
|
-
return (
|
|
672
|
+
return (b, L) => {
|
|
673
673
|
const c = U("FmPieChart");
|
|
674
674
|
return P(), se(xe, null, [
|
|
675
|
-
Ne(
|
|
675
|
+
Ne(b.$slots, "menu"),
|
|
676
676
|
G(c, {
|
|
677
677
|
ref_key: "chartRef",
|
|
678
|
-
ref:
|
|
678
|
+
ref: m,
|
|
679
679
|
class: "circular",
|
|
680
680
|
percentage: "70%",
|
|
681
|
-
datasets:
|
|
681
|
+
datasets: V.value,
|
|
682
682
|
metrics: i.value.data.datasets.map((t) => t.name),
|
|
683
|
-
tooltip:
|
|
683
|
+
tooltip: g,
|
|
684
684
|
variant: "doughnut",
|
|
685
685
|
legend: v.value,
|
|
686
686
|
datalabels: d(u),
|
|
687
687
|
"maintain-aspect-ratio": !1,
|
|
688
|
-
style:
|
|
689
|
-
"--chart-width": d(
|
|
690
|
-
"--chart-height": d(
|
|
688
|
+
style: Ve({
|
|
689
|
+
"--chart-width": d(_) !== void 0 ? d(_) + "px" : "100%",
|
|
690
|
+
"--chart-height": d(k) !== void 0 ? d(k) + "px" : "calc(100% - 36px)"
|
|
691
691
|
})
|
|
692
692
|
}, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
|
|
693
693
|
], 64);
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
})
|
|
696
|
+
});
|
|
697
|
+
function ct(e) {
|
|
698
|
+
if (e == null || e === "")
|
|
699
|
+
return "";
|
|
700
|
+
const o = String(e), i = Number(o);
|
|
701
|
+
if (isNaN(i)) return o;
|
|
702
|
+
const [s, m] = o.split("."), u = new Intl.NumberFormat("en-US").format(Number(s));
|
|
703
|
+
return m !== void 0 ? `${u}.${m}` : u;
|
|
704
|
+
}
|
|
705
|
+
const Ul = { class: "flex flex-col gap-1" }, Xl = { class: "fm-typo-en-title-md-600" }, Gl = { class: "flex gap-2" }, jl = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Kl = { key: 0 }, Jl = { key: 1 }, Zl = /* @__PURE__ */ _e({
|
|
697
706
|
__name: "WidgetScorecard",
|
|
698
707
|
props: {
|
|
699
708
|
modelValue: { required: !0 },
|
|
@@ -701,262 +710,265 @@ const ql = /* @__PURE__ */ Te({
|
|
|
701
710
|
},
|
|
702
711
|
emits: ["update:modelValue"],
|
|
703
712
|
setup(e) {
|
|
704
|
-
const o =
|
|
705
|
-
var
|
|
706
|
-
return ((
|
|
707
|
-
}),
|
|
708
|
-
const { data:
|
|
709
|
-
return
|
|
713
|
+
const o = De(e, "modelValue"), { t: i } = nt(), { compareDateRange: s, defaultDateSetting: m } = ze(lt()), { country: u } = Rt(), C = F(() => {
|
|
714
|
+
var g;
|
|
715
|
+
return ((g = o.value.data) == null ? void 0 : g.value) || "";
|
|
716
|
+
}), _ = F(() => ct(C.value)), k = F(() => {
|
|
717
|
+
const { data: g } = o.value;
|
|
718
|
+
return g != null && g.comparison ? Zt(C.value, g.comparison, u) : null;
|
|
710
719
|
});
|
|
711
|
-
function
|
|
712
|
-
switch (
|
|
713
|
-
case
|
|
720
|
+
function V(g) {
|
|
721
|
+
switch (g) {
|
|
722
|
+
case St.bar:
|
|
714
723
|
return "bar";
|
|
715
|
-
case
|
|
724
|
+
case St.line:
|
|
716
725
|
return "line";
|
|
717
726
|
default:
|
|
718
727
|
return "line";
|
|
719
728
|
}
|
|
720
729
|
}
|
|
721
|
-
const
|
|
722
|
-
var
|
|
723
|
-
return (
|
|
724
|
-
}),
|
|
725
|
-
|
|
726
|
-
|
|
730
|
+
const p = F(() => {
|
|
731
|
+
var g;
|
|
732
|
+
return (g = o.value.data) == null ? void 0 : g.sparkline;
|
|
733
|
+
}), x = F(() => ({
|
|
734
|
+
display: !1,
|
|
735
|
+
beginAtZero: !1,
|
|
736
|
+
grace: "20%"
|
|
737
|
+
})), y = F(() => p.value.datasets.map((g) => ({
|
|
738
|
+
label: g.name,
|
|
739
|
+
data: g.values,
|
|
727
740
|
fill: !0,
|
|
728
741
|
color: "#36a2eb"
|
|
729
|
-
})));
|
|
730
|
-
return (
|
|
731
|
-
|
|
732
|
-
const v = U("FmIcon"), T = U("FmChip"), w = U("FmTooltip"), F = U("FmLineChart");
|
|
742
|
+
}))), v = F(() => ot(!1, !0));
|
|
743
|
+
return (g, b) => {
|
|
744
|
+
const L = U("FmIcon"), c = U("FmChip"), t = U("FmTooltip"), r = U("FmLineChart");
|
|
733
745
|
return P(), se("div", Ul, [
|
|
734
|
-
Ne(
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
G(
|
|
738
|
-
|
|
746
|
+
Ne(g.$slots, "menu"),
|
|
747
|
+
j("p", Xl, ke(_.value), 1),
|
|
748
|
+
j("div", Gl, [
|
|
749
|
+
G(t, {
|
|
750
|
+
disabled: k.value === null,
|
|
739
751
|
placement: "right",
|
|
740
752
|
"hide-arrow": "",
|
|
741
|
-
variant: "
|
|
753
|
+
variant: "rich"
|
|
742
754
|
}, {
|
|
743
|
-
|
|
744
|
-
|
|
755
|
+
content: ce(() => {
|
|
756
|
+
var h;
|
|
757
|
+
return [
|
|
758
|
+
j("span", jl, ke(`vs. ${(h = d(m).defaultCompareType) == null ? void 0 : h.split("_").join(" ")}`), 1)
|
|
759
|
+
];
|
|
760
|
+
}),
|
|
761
|
+
default: ce(() => [
|
|
762
|
+
k.value ? (P(), fe(c, {
|
|
745
763
|
key: 0,
|
|
746
|
-
icon:
|
|
747
|
-
class: Ze(`bg-${
|
|
764
|
+
icon: k.value.icon.name,
|
|
765
|
+
class: Ze(`bg-${k.value.icon.tailwind}`),
|
|
748
766
|
compact: ""
|
|
749
767
|
}, {
|
|
750
|
-
default:
|
|
751
|
-
G(
|
|
752
|
-
name:
|
|
753
|
-
color:
|
|
768
|
+
default: ce(() => [
|
|
769
|
+
G(L, {
|
|
770
|
+
name: k.value.icon.name,
|
|
771
|
+
color: k.value.icon.color
|
|
754
772
|
}, null, 8, ["name", "color"]),
|
|
755
|
-
|
|
773
|
+
j("p", {
|
|
756
774
|
class: "fm-typo-en-body-md-600",
|
|
757
|
-
style:
|
|
758
|
-
},
|
|
775
|
+
style: Ve({ color: k.value.icon.color })
|
|
776
|
+
}, ke(k.value.value), 5)
|
|
759
777
|
]),
|
|
760
778
|
_: 1
|
|
761
|
-
}, 8, ["icon", "class"])) :
|
|
762
|
-
d(s).endDate
|
|
779
|
+
}, 8, ["icon", "class"])) : Te("", !0),
|
|
780
|
+
d(s).endDate != null && d(s).startDate != null && k.value === null ? (P(), fe(c, {
|
|
763
781
|
key: 1,
|
|
782
|
+
class: "invisible pointer-events-none",
|
|
783
|
+
"aria-hidden": "true",
|
|
764
784
|
compact: ""
|
|
765
785
|
}, {
|
|
766
|
-
default:
|
|
767
|
-
G(
|
|
786
|
+
default: ce(() => [
|
|
787
|
+
G(L, {
|
|
768
788
|
name: "arrow_upward",
|
|
769
789
|
color: "#C7C7CC"
|
|
770
790
|
}),
|
|
771
|
-
|
|
791
|
+
b[0] || (b[0] = j("p", { class: "fm-typo-en-body-md-600" }, " ", -1))
|
|
772
792
|
]),
|
|
773
793
|
_: 1
|
|
774
|
-
})) :
|
|
794
|
+
})) : Te("", !0)
|
|
775
795
|
]),
|
|
776
796
|
_: 1
|
|
777
|
-
}, 8, ["
|
|
797
|
+
}, 8, ["disabled"])
|
|
778
798
|
]),
|
|
779
|
-
|
|
780
|
-
|
|
799
|
+
p.value ? (P(), se("div", Kl, [
|
|
800
|
+
V(p.value.type) === "line" ? (P(), fe(r, {
|
|
781
801
|
key: 0,
|
|
782
802
|
class: "sparkline",
|
|
783
|
-
datasets:
|
|
803
|
+
datasets: y.value,
|
|
784
804
|
legend: {
|
|
785
805
|
display: !1
|
|
786
806
|
},
|
|
787
807
|
datalabels: { display: !1 },
|
|
788
|
-
"x-axis": { categories:
|
|
789
|
-
"y-cfg":
|
|
808
|
+
"x-axis": { categories: p.value.dimensions },
|
|
809
|
+
"y-cfg": x.value,
|
|
790
810
|
"x-cfg": { display: !1 },
|
|
811
|
+
tooltip: v.value,
|
|
791
812
|
"maintain-aspect-ratio": !1
|
|
792
|
-
}, null, 8, ["datasets", "x-axis"])) :
|
|
793
|
-
])) : (P(), se("div",
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
813
|
+
}, null, 8, ["datasets", "x-axis", "y-cfg", "tooltip"])) : Te("", !0)
|
|
814
|
+
])) : (P(), se("div", Jl, b[1] || (b[1] = [
|
|
815
|
+
j("div", { class: "sparkline" }, [
|
|
816
|
+
j("div", { class: "flex flex-col gap-8" }, [
|
|
817
|
+
j("div"),
|
|
818
|
+
j("div")
|
|
798
819
|
]),
|
|
799
|
-
|
|
820
|
+
j("div", { class: "grow" })
|
|
800
821
|
], -1)
|
|
801
822
|
])))
|
|
802
823
|
]);
|
|
803
824
|
};
|
|
804
825
|
}
|
|
805
|
-
}),
|
|
806
|
-
function
|
|
826
|
+
}), Ql = {};
|
|
827
|
+
function ea(e, o) {
|
|
807
828
|
const i = U("FmMenuDivider");
|
|
808
829
|
return P(), fe(i);
|
|
809
830
|
}
|
|
810
|
-
const
|
|
811
|
-
const e =
|
|
831
|
+
const ta = /* @__PURE__ */ Pl(Ql, [["render", ea]]), la = "mf-reporttable-dimension", qt = Kt(la, () => {
|
|
832
|
+
const e = T(0), o = T([]), i = T(!1), s = (t, r) => {
|
|
812
833
|
e.value = t, u(t, r);
|
|
813
|
-
},
|
|
814
|
-
o[t] = r, o.value = [...o.value],
|
|
834
|
+
}, m = (t, r, h, a) => {
|
|
835
|
+
o[t] = r, o.value = [...o.value], C(t, r, h, a);
|
|
815
836
|
}, u = (t, r) => {
|
|
816
|
-
const
|
|
817
|
-
[...
|
|
818
|
-
const $ =
|
|
837
|
+
const h = (r == null ? void 0 : r.querySelectorAll("thead tr")) ?? [], a = (r == null ? void 0 : r.querySelectorAll("tbody tr")) ?? [];
|
|
838
|
+
[...h, ...a].forEach((w) => {
|
|
839
|
+
const $ = w;
|
|
819
840
|
$ && ($.style.height = `${t}px`);
|
|
820
841
|
});
|
|
821
|
-
},
|
|
822
|
-
const l = (
|
|
842
|
+
}, C = (t, r, h, a = !1) => {
|
|
843
|
+
const l = (h == null ? void 0 : h.querySelectorAll("th")) ?? [];
|
|
823
844
|
if (t === void 0) return;
|
|
824
|
-
const
|
|
825
|
-
if (!
|
|
845
|
+
const w = l[t], $ = a ? o[t] : r;
|
|
846
|
+
if (!w || $ === void 0) return;
|
|
826
847
|
const A = () => {
|
|
827
|
-
|
|
848
|
+
w.style.width = `${$}px`;
|
|
828
849
|
};
|
|
829
850
|
a ? requestAnimationFrame(A) : A();
|
|
830
|
-
},
|
|
831
|
-
const t = document.querySelectorAll("th"), r = document.querySelectorAll("td"),
|
|
832
|
-
|
|
833
|
-
},
|
|
834
|
-
const t = document.querySelectorAll("th"), r = document.querySelectorAll("td"),
|
|
835
|
-
t.forEach((l) => l.classList.remove("toggleEditResize")), r.forEach((l) => l.classList.remove("toggleEditResize")),
|
|
836
|
-
},
|
|
851
|
+
}, _ = () => {
|
|
852
|
+
const t = document.querySelectorAll("th"), r = document.querySelectorAll("td"), h = document.querySelector("table");
|
|
853
|
+
h == null || h.classList.add("table-fixed"), t.forEach((a) => a.classList.add("toggleEditResize")), r.forEach((a) => a.classList.add("toggleEditResize")), i.value = !0;
|
|
854
|
+
}, k = () => {
|
|
855
|
+
const t = document.querySelectorAll("th"), r = document.querySelectorAll("td"), h = document.querySelectorAll(".col-resize-handle"), a = document.querySelectorAll(".row-resize-handle");
|
|
856
|
+
t.forEach((l) => l.classList.remove("toggleEditResize")), r.forEach((l) => l.classList.remove("toggleEditResize")), h.forEach((l) => l.remove()), a.forEach((l) => l.remove()), i.value = !1;
|
|
857
|
+
}, V = () => {
|
|
837
858
|
e.value = 0, o.value = [];
|
|
838
|
-
},
|
|
859
|
+
}, p = (t, r) => {
|
|
839
860
|
if (r) {
|
|
840
|
-
const
|
|
841
|
-
[...
|
|
861
|
+
const h = document.querySelectorAll(`thead th:nth-child(${t + 1})`), a = document.querySelectorAll(`tbody td:nth-child(${t + 1})`);
|
|
862
|
+
[...h, ...a].forEach((l) => {
|
|
842
863
|
l.classList.add("highlight-hover-col");
|
|
843
864
|
});
|
|
844
865
|
} else
|
|
845
866
|
document.querySelectorAll(
|
|
846
867
|
`thead th:nth-child(${t + 1}), tbody td:nth-child(${t + 1})`
|
|
847
|
-
).forEach((
|
|
848
|
-
},
|
|
849
|
-
const r = document.querySelectorAll("thead tr"),
|
|
868
|
+
).forEach((h) => h.classList.add("highlight-col"));
|
|
869
|
+
}, x = (t) => {
|
|
870
|
+
const r = document.querySelectorAll("thead tr"), h = document.querySelectorAll("tbody tr"), a = [...r, ...h];
|
|
850
871
|
for (const l of a)
|
|
851
872
|
t ? l.classList.add("highlight-hover-row") : l.classList.add("highlight-row");
|
|
852
873
|
}, y = (t) => {
|
|
853
|
-
const r = t ? ".highlight-hover-row" : ".highlight-row",
|
|
854
|
-
for (const a of
|
|
874
|
+
const r = t ? ".highlight-hover-row" : ".highlight-row", h = document.querySelectorAll(r);
|
|
875
|
+
for (const a of h)
|
|
855
876
|
a.classList.remove(r.slice(1));
|
|
856
877
|
}, v = (t) => {
|
|
857
878
|
t ? document.querySelectorAll(".highlight-hover-col").forEach((r) => {
|
|
858
879
|
r.classList.remove("highlight-hover-col");
|
|
859
880
|
}) : document.querySelectorAll(".highlight-col").forEach((r) => r.classList.remove("highlight-col"));
|
|
860
|
-
},
|
|
861
|
-
const
|
|
881
|
+
}, g = (t, r) => {
|
|
882
|
+
const h = t.clientX, a = t.target.closest("table");
|
|
862
883
|
if (!a) return;
|
|
863
884
|
const l = a.querySelectorAll("th")[r];
|
|
864
885
|
if (!l) return;
|
|
865
|
-
const
|
|
886
|
+
const w = l.getBoundingClientRect().width || 60, $ = l.querySelector("button"), A = ($ == null ? void 0 : $.querySelector("span")) || l.querySelector("p") || l;
|
|
866
887
|
let I = 60;
|
|
867
888
|
if (A) {
|
|
868
|
-
const
|
|
889
|
+
const S = A.textContent || "", E = window.getComputedStyle(A), X = `${E.fontWeight} ${E.fontSize} ${E.fontFamily}`, B = document.createElement("canvas").getContext("2d");
|
|
869
890
|
if (B) {
|
|
870
891
|
B.font = X;
|
|
871
|
-
const O = B.measureText(
|
|
872
|
-
I = O.width +
|
|
892
|
+
const O = B.measureText(S), he = window.getComputedStyle(l), Fe = parseFloat(he.paddingLeft || "0"), Ae = parseFloat(he.paddingRight || "0");
|
|
893
|
+
I = O.width + Fe + Ae;
|
|
873
894
|
}
|
|
874
895
|
}
|
|
875
|
-
|
|
896
|
+
p(r, !1);
|
|
876
897
|
let Z = null, W = null;
|
|
877
|
-
const
|
|
898
|
+
const K = () => {
|
|
878
899
|
if (W === null) return;
|
|
879
|
-
const
|
|
880
|
-
|
|
881
|
-
let
|
|
900
|
+
const S = l;
|
|
901
|
+
S.style.width = `${W}px`;
|
|
902
|
+
let E = 0;
|
|
882
903
|
a.querySelectorAll("th").forEach((q, B) => {
|
|
883
|
-
|
|
884
|
-
}), a.classList.remove("w-full"), a.style.width = `${
|
|
885
|
-
}, re = (
|
|
886
|
-
const
|
|
887
|
-
W = Math.max(I,
|
|
904
|
+
E += B === r ? W : q.getBoundingClientRect().width;
|
|
905
|
+
}), a.classList.remove("w-full"), a.style.width = `${E}px`, Z = null;
|
|
906
|
+
}, re = (S) => {
|
|
907
|
+
const E = S.clientX - h;
|
|
908
|
+
W = Math.max(I, w + E), Z === null && (Z = requestAnimationFrame(K));
|
|
888
909
|
}, ue = () => {
|
|
889
910
|
Z !== null && cancelAnimationFrame(Z), W !== null && (l.style.width = `${W}px`);
|
|
890
|
-
const
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
}), o.value =
|
|
911
|
+
const S = a.querySelectorAll("th"), E = [];
|
|
912
|
+
S.forEach((X) => {
|
|
913
|
+
E.push(X.getBoundingClientRect().width);
|
|
914
|
+
}), o.value = E, v(!1), document.removeEventListener("mousemove", re), document.removeEventListener("mouseup", ue);
|
|
894
915
|
};
|
|
895
916
|
document.addEventListener("mousemove", re), document.addEventListener("mouseup", ue);
|
|
896
|
-
},
|
|
897
|
-
const r = t.clientY,
|
|
898
|
-
|
|
917
|
+
}, b = (t) => {
|
|
918
|
+
const r = t.clientY, h = t.target.closest("table"), a = e.value || 48;
|
|
919
|
+
x(!1);
|
|
899
920
|
const l = ($) => {
|
|
900
921
|
const A = Math.max(30, a + ($.clientY - r));
|
|
901
|
-
|
|
902
|
-
},
|
|
903
|
-
y(!1), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup",
|
|
922
|
+
h && s(A, h);
|
|
923
|
+
}, w = () => {
|
|
924
|
+
y(!1), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", w);
|
|
904
925
|
};
|
|
905
|
-
document.addEventListener("mousemove", l), document.addEventListener("mouseup",
|
|
926
|
+
document.addEventListener("mousemove", l), document.addEventListener("mouseup", w);
|
|
906
927
|
};
|
|
907
928
|
return {
|
|
908
929
|
rowHeight: e,
|
|
909
930
|
colWidths: o,
|
|
910
931
|
isEditing: i,
|
|
911
932
|
updateRowHeight: s,
|
|
912
|
-
updateColWidth:
|
|
933
|
+
updateColWidth: m,
|
|
913
934
|
setRowHeights: u,
|
|
914
|
-
setColWidths:
|
|
915
|
-
enableEditMode:
|
|
916
|
-
disableEditMode:
|
|
917
|
-
resetStore:
|
|
918
|
-
highlightCol:
|
|
919
|
-
highlightRows:
|
|
935
|
+
setColWidths: C,
|
|
936
|
+
enableEditMode: _,
|
|
937
|
+
disableEditMode: k,
|
|
938
|
+
resetStore: V,
|
|
939
|
+
highlightCol: p,
|
|
940
|
+
highlightRows: x,
|
|
920
941
|
removeRowHighlight: y,
|
|
921
942
|
removeColHighlight: v,
|
|
922
|
-
resizeCol:
|
|
923
|
-
resizeRow:
|
|
943
|
+
resizeCol: g,
|
|
944
|
+
resizeRow: b,
|
|
924
945
|
enableCellResizing: () => {
|
|
925
|
-
const t = document.querySelector("thead"), r = document.querySelectorAll("thead tr"),
|
|
946
|
+
const t = document.querySelector("thead"), r = document.querySelectorAll("thead tr"), h = document.querySelectorAll("tbody tr"), a = [...r, ...h];
|
|
926
947
|
t && t.classList.remove("sticky");
|
|
927
|
-
const l = (
|
|
948
|
+
const l = (w, $) => {
|
|
928
949
|
const A = document.createElement("div");
|
|
929
|
-
return A.className = `${
|
|
930
|
-
I.stopPropagation(),
|
|
931
|
-
})) : (A.addEventListener("mouseenter", () =>
|
|
932
|
-
I.stopPropagation(),
|
|
950
|
+
return A.className = `${w}-resize-handle`, w === "col" ? (A.addEventListener("mouseenter", () => p($, !0)), A.addEventListener("mouseleave", () => v(!0)), A.addEventListener("mousedown", (I) => {
|
|
951
|
+
I.stopPropagation(), g(I, $);
|
|
952
|
+
})) : (A.addEventListener("mouseenter", () => x(!0)), A.addEventListener("mouseleave", () => y(!0)), A.addEventListener("mousedown", (I) => {
|
|
953
|
+
I.stopPropagation(), b(I);
|
|
933
954
|
})), A;
|
|
934
955
|
};
|
|
935
|
-
a.forEach((
|
|
936
|
-
const $ =
|
|
937
|
-
|
|
938
|
-
const W = l("col", Z),
|
|
939
|
-
I.appendChild(W), I.appendChild(
|
|
956
|
+
a.forEach((w) => {
|
|
957
|
+
const $ = w.closest("thead") !== null;
|
|
958
|
+
w.querySelectorAll($ ? "th" : "td").forEach((I, Z) => {
|
|
959
|
+
const W = l("col", Z), K = l("row", Z);
|
|
960
|
+
I.appendChild(W), I.appendChild(K);
|
|
940
961
|
});
|
|
941
|
-
}),
|
|
962
|
+
}), _();
|
|
942
963
|
},
|
|
943
964
|
cancelResizingChanges: () => {
|
|
944
|
-
|
|
965
|
+
k();
|
|
945
966
|
}
|
|
946
967
|
};
|
|
947
|
-
})
|
|
948
|
-
function bt(e) {
|
|
949
|
-
if (e == null || e === "")
|
|
950
|
-
return "";
|
|
951
|
-
const o = String(e), i = Number(o);
|
|
952
|
-
if (isNaN(i)) return o;
|
|
953
|
-
const [s, p] = o.split("."), u = new Intl.NumberFormat("en-US").format(Number(s));
|
|
954
|
-
return p !== void 0 ? `${u}.${p}` : u;
|
|
955
|
-
}
|
|
956
|
-
const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }, na = {
|
|
968
|
+
}), aa = "/assets/processTableData.worker-CGM71S-g.js", na = { class: "my-4" }, oa = {
|
|
957
969
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
958
970
|
style: { backgroundColor: "#f9f9f9" }
|
|
959
|
-
},
|
|
971
|
+
}, sa = { class: "font-bold" }, ra = { class: "text-fm-color-neutral-gray-300" }, ia = /* @__PURE__ */ _e({
|
|
960
972
|
__name: "WidgetTable",
|
|
961
973
|
props: /* @__PURE__ */ We({
|
|
962
974
|
tileIndex: {}
|
|
@@ -966,29 +978,29 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
966
978
|
}),
|
|
967
979
|
emits: ["update:modelValue"],
|
|
968
980
|
setup(e) {
|
|
969
|
-
const { t: o, te: i } = nt(), s =
|
|
970
|
-
var
|
|
971
|
-
return ((
|
|
972
|
-
}), t =
|
|
973
|
-
var
|
|
974
|
-
return ((
|
|
975
|
-
}), r =
|
|
976
|
-
var
|
|
977
|
-
if (!(r.value && r.value.trim().length > 0 || !((
|
|
981
|
+
const { t: o, te: i } = nt(), s = De(e, "modelValue"), { country: m } = Rt(), { clearTileSorts: u, setTileSorts: C } = Ll(), _ = $t(), k = e, V = T([]), { isEditing: p, colWidths: x, rowHeight: y } = ze(qt()), { setColWidths: v, setRowHeights: g, enableCellResizing: b } = qt(), L = T(null), c = F(() => {
|
|
982
|
+
var S;
|
|
983
|
+
return ((S = s.value.data) == null ? void 0 : S.columns) || [{ label: "", key: "" }];
|
|
984
|
+
}), t = F(() => {
|
|
985
|
+
var S;
|
|
986
|
+
return ((S = s.value.data) == null ? void 0 : S.rows) || [];
|
|
987
|
+
}), r = F(() => s.value.filterText), h = F(() => {
|
|
988
|
+
var S, E;
|
|
989
|
+
if (!(r.value && r.value.trim().length > 0 || !((S = t.value[0]) != null && S.isRollup) && !((E = t.value[t.value.length - 1]) != null && E.isRollup))) {
|
|
978
990
|
if (s.value.rollupPosition === Oe.top || s.value.rollupPosition === void 0)
|
|
979
991
|
return Oe.top;
|
|
980
992
|
if (s.value.rollupPosition === Oe.bottom)
|
|
981
993
|
return Oe.bottom;
|
|
982
994
|
}
|
|
983
|
-
}), a =
|
|
984
|
-
const q =
|
|
995
|
+
}), a = F(() => {
|
|
996
|
+
const q = h.value !== void 0 ? 1 : 0, B = (L.value ? L.value.$el.offsetHeight : 0) - 48;
|
|
985
997
|
return Math.floor((B - 34.5 - 32) / 48) - q;
|
|
986
|
-
}), l =
|
|
987
|
-
var
|
|
988
|
-
let
|
|
989
|
-
switch (
|
|
998
|
+
}), l = F(() => {
|
|
999
|
+
var E, X;
|
|
1000
|
+
let S = [];
|
|
1001
|
+
switch (h.value) {
|
|
990
1002
|
case Oe.top:
|
|
991
|
-
|
|
1003
|
+
S = [...((E = t.value[0]) == null ? void 0 : E.cells) || []].map((q, B) => {
|
|
992
1004
|
var O;
|
|
993
1005
|
return {
|
|
994
1006
|
main: q,
|
|
@@ -998,7 +1010,7 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
998
1010
|
});
|
|
999
1011
|
break;
|
|
1000
1012
|
case Oe.bottom:
|
|
1001
|
-
|
|
1013
|
+
S = [...((X = t.value[t.value.length - 1]) == null ? void 0 : X.cells) || []].map((q, B) => {
|
|
1002
1014
|
var O;
|
|
1003
1015
|
return {
|
|
1004
1016
|
main: q,
|
|
@@ -1008,22 +1020,22 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1008
1020
|
});
|
|
1009
1021
|
break;
|
|
1010
1022
|
}
|
|
1011
|
-
return
|
|
1023
|
+
return S.length > 0 && S[0].main === "" && (S[0].main = Ye(o, i, "Grand Total", "other")), S;
|
|
1012
1024
|
});
|
|
1013
|
-
function
|
|
1014
|
-
let
|
|
1015
|
-
return !
|
|
1016
|
-
main:
|
|
1017
|
-
} : (
|
|
1018
|
-
main:
|
|
1019
|
-
comparison:
|
|
1020
|
-
difference: Zt(
|
|
1025
|
+
function w(S) {
|
|
1026
|
+
let E = (S == null ? void 0 : S.main) || "";
|
|
1027
|
+
return !S || S.main === "" || !S.comparison ? {
|
|
1028
|
+
main: E
|
|
1029
|
+
} : (E.includes("#") && !E.startsWith("#") && (E = E.split("#")[0]), {
|
|
1030
|
+
main: E,
|
|
1031
|
+
comparison: S == null ? void 0 : S.comparison,
|
|
1032
|
+
difference: Zt(S.main, S.comparison, m)
|
|
1021
1033
|
});
|
|
1022
1034
|
}
|
|
1023
1035
|
Ie(() => {
|
|
1024
1036
|
u();
|
|
1025
1037
|
});
|
|
1026
|
-
const $ =
|
|
1038
|
+
const $ = T([]);
|
|
1027
1039
|
let A = 0, I;
|
|
1028
1040
|
function Z() {
|
|
1029
1041
|
var B;
|
|
@@ -1031,7 +1043,7 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1031
1043
|
$.value = [];
|
|
1032
1044
|
return;
|
|
1033
1045
|
}
|
|
1034
|
-
const
|
|
1046
|
+
const S = ++A, E = (s.value.data.rows || []).map((O) => ({
|
|
1035
1047
|
isRollup: O.isRollup,
|
|
1036
1048
|
cells: Array.isArray(O.cells) ? [...O.cells] : [],
|
|
1037
1049
|
comparisonCells: Array.isArray(O.comparisonCells) ? [...O.comparisonCells] : []
|
|
@@ -1040,36 +1052,36 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1040
1052
|
type: O.type,
|
|
1041
1053
|
label: O.label
|
|
1042
1054
|
})), q = {
|
|
1043
|
-
rows:
|
|
1055
|
+
rows: E,
|
|
1044
1056
|
columns: X,
|
|
1045
1057
|
filter: r.value ?? "",
|
|
1046
|
-
globalSorts:
|
|
1058
|
+
globalSorts: Sl(V.value).map((O) => ({
|
|
1047
1059
|
key: O.key,
|
|
1048
1060
|
type: O.type
|
|
1049
1061
|
})),
|
|
1050
|
-
grandTotalPosition:
|
|
1062
|
+
grandTotalPosition: h.value,
|
|
1051
1063
|
pageSize: a.value
|
|
1052
1064
|
};
|
|
1053
|
-
Rl(
|
|
1054
|
-
|
|
1065
|
+
Rl(aa, q).then((O) => {
|
|
1066
|
+
S === A && (O != null && O.error ? (_.open({ message: "Failed to process table data. Please retry.", type: "error" }), console.log(O.error), $.value = []) : $.value = kl(O.data || []));
|
|
1055
1067
|
});
|
|
1056
1068
|
}
|
|
1057
1069
|
me(
|
|
1058
|
-
() =>
|
|
1059
|
-
(
|
|
1060
|
-
|
|
1070
|
+
() => V.value,
|
|
1071
|
+
(S) => {
|
|
1072
|
+
k.tileIndex === void 0 || k.tileIndex === null || C(k.tileIndex, S);
|
|
1061
1073
|
},
|
|
1062
1074
|
{ immediate: !0, deep: !0 }
|
|
1063
1075
|
);
|
|
1064
|
-
const W =
|
|
1076
|
+
const W = F(() => {
|
|
1065
1077
|
var X, q;
|
|
1066
|
-
const
|
|
1078
|
+
const S = ((X = s.value.data) == null ? void 0 : X.rows) || [], E = ((q = s.value.data) == null ? void 0 : q.columns) || [];
|
|
1067
1079
|
return JSON.stringify({
|
|
1068
|
-
rowsLength:
|
|
1069
|
-
columns:
|
|
1080
|
+
rowsLength: S.length,
|
|
1081
|
+
columns: E.map((B) => ({ key: B.key, type: B.type, label: B.label })),
|
|
1070
1082
|
filter: r.value ?? "",
|
|
1071
|
-
globalSorts:
|
|
1072
|
-
grandTotalPosition:
|
|
1083
|
+
globalSorts: V.value.map((B) => ({ key: B.key, type: B.type })),
|
|
1084
|
+
grandTotalPosition: h.value,
|
|
1073
1085
|
pageSize: a.value
|
|
1074
1086
|
});
|
|
1075
1087
|
});
|
|
@@ -1080,41 +1092,41 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1080
1092
|
},
|
|
1081
1093
|
{ immediate: !0 }
|
|
1082
1094
|
);
|
|
1083
|
-
function
|
|
1084
|
-
const
|
|
1085
|
-
if (!
|
|
1086
|
-
|
|
1095
|
+
function K(S) {
|
|
1096
|
+
const E = V.value.find((X) => X.key === S);
|
|
1097
|
+
if (!E) {
|
|
1098
|
+
V.value.push({ key: S, type: qe.Asc });
|
|
1087
1099
|
return;
|
|
1088
1100
|
}
|
|
1089
|
-
|
|
1101
|
+
E.type === qe.Asc ? E.type = qe.Desc : E.type === qe.Desc && (V.value = V.value.filter((X) => X.key !== S));
|
|
1090
1102
|
}
|
|
1091
|
-
const re =
|
|
1103
|
+
const re = F(
|
|
1092
1104
|
() => {
|
|
1093
|
-
var
|
|
1094
|
-
return (((
|
|
1105
|
+
var S;
|
|
1106
|
+
return (((S = s.value.colWidths) == null ? void 0 : S.length) ?? 0) > 0 || x.value.length > 0;
|
|
1095
1107
|
}
|
|
1096
|
-
), ue =
|
|
1097
|
-
var
|
|
1098
|
-
return (
|
|
1099
|
-
const X = Ye(o, i,
|
|
1108
|
+
), ue = F(() => {
|
|
1109
|
+
var S;
|
|
1110
|
+
return (S = s.value.data) != null && S.columns ? s.value.data.columns.map((E) => {
|
|
1111
|
+
const X = Ye(o, i, E.label, "other"), q = V.value.find((he) => he.key === E.key), B = !!q, O = B ? q.type === qe.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
|
|
1100
1112
|
return {
|
|
1101
|
-
accessorKey:
|
|
1113
|
+
accessorKey: E.key,
|
|
1102
1114
|
header: () => {
|
|
1103
1115
|
const he = U("FmIcon");
|
|
1104
|
-
return
|
|
1116
|
+
return ut(
|
|
1105
1117
|
"button",
|
|
1106
1118
|
{
|
|
1107
1119
|
type: "button",
|
|
1108
|
-
class: `w-full flex items-center gap-1 group/select-header select-none ${
|
|
1109
|
-
onClick: () =>
|
|
1120
|
+
class: `w-full flex items-center gap-1 group/select-header select-none ${E.type === "NUMERIC" ? "justify-end" : "justify-start"} ${B ? "text-fm-color-typo-primary" : "text-fm-color-neutral-gray-400"}`,
|
|
1121
|
+
onClick: () => K(E.key)
|
|
1110
1122
|
},
|
|
1111
1123
|
[
|
|
1112
|
-
|
|
1124
|
+
ut(
|
|
1113
1125
|
"span",
|
|
1114
|
-
{ class: `${
|
|
1126
|
+
{ class: `${E.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap` },
|
|
1115
1127
|
X
|
|
1116
1128
|
),
|
|
1117
|
-
|
|
1129
|
+
ut(he, {
|
|
1118
1130
|
name: O,
|
|
1119
1131
|
color: B ? "primary" : "neutral-gray-400",
|
|
1120
1132
|
size: "sm",
|
|
@@ -1126,17 +1138,17 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1126
1138
|
},
|
|
1127
1139
|
cell: (he) => {
|
|
1128
1140
|
var Pe, Me;
|
|
1129
|
-
const
|
|
1130
|
-
return
|
|
1141
|
+
const Fe = w(he.getValue()), Ae = (Me = (Pe = he == null ? void 0 : he.row) == null ? void 0 : Pe.original) == null ? void 0 : Me.isRollup;
|
|
1142
|
+
return ut(
|
|
1131
1143
|
"div",
|
|
1132
1144
|
{
|
|
1133
1145
|
class: [
|
|
1134
1146
|
Ae ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400",
|
|
1135
|
-
|
|
1147
|
+
E.type === "NUMERIC" ? "text-right" : "",
|
|
1136
1148
|
re.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
1137
1149
|
].join(" ")
|
|
1138
1150
|
},
|
|
1139
|
-
[
|
|
1151
|
+
[E.type === "NUMERIC" ? ct(Fe.main) : Fe.main]
|
|
1140
1152
|
);
|
|
1141
1153
|
},
|
|
1142
1154
|
enableSorting: !1
|
|
@@ -1144,35 +1156,35 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1144
1156
|
}) : [];
|
|
1145
1157
|
});
|
|
1146
1158
|
return me(
|
|
1147
|
-
() =>
|
|
1148
|
-
async (
|
|
1149
|
-
|
|
1159
|
+
() => x.value.length > 0,
|
|
1160
|
+
async (S) => {
|
|
1161
|
+
S && p.value && (await Ce(), b());
|
|
1150
1162
|
}
|
|
1151
1163
|
), me(
|
|
1152
1164
|
[() => ue.value],
|
|
1153
1165
|
async () => {
|
|
1154
1166
|
var B;
|
|
1155
|
-
await
|
|
1156
|
-
const
|
|
1157
|
-
if (!
|
|
1158
|
-
const
|
|
1159
|
-
if (!
|
|
1160
|
-
|
|
1167
|
+
await Ce();
|
|
1168
|
+
const S = (B = L.value) == null ? void 0 : B.$el;
|
|
1169
|
+
if (!S) return;
|
|
1170
|
+
const E = S.querySelector("table");
|
|
1171
|
+
if (!E) return;
|
|
1172
|
+
E.classList.add(re.value ? "table-fixed" : "table-auto");
|
|
1161
1173
|
let X, q;
|
|
1162
|
-
|
|
1163
|
-
v(he, O,
|
|
1174
|
+
p.value ? (b(), X = x.value, q = y.value) : (q = s.value.rowHeight, X = s.value.colWidths), typeof q == "number" && g(q, S), X == null || X.forEach((O, he) => {
|
|
1175
|
+
v(he, O, S);
|
|
1164
1176
|
});
|
|
1165
1177
|
},
|
|
1166
1178
|
{ immediate: !0 }
|
|
1167
|
-
), (
|
|
1179
|
+
), (S, E) => {
|
|
1168
1180
|
const X = U("FmTable");
|
|
1169
1181
|
return P(), se(xe, null, [
|
|
1170
|
-
|
|
1171
|
-
Ne(
|
|
1182
|
+
j("div", na, [
|
|
1183
|
+
Ne(S.$slots, "menu")
|
|
1172
1184
|
]),
|
|
1173
1185
|
G(X, {
|
|
1174
1186
|
ref_key: "table",
|
|
1175
|
-
ref:
|
|
1187
|
+
ref: L,
|
|
1176
1188
|
"column-defs": ue.value,
|
|
1177
1189
|
"row-data": $.value,
|
|
1178
1190
|
"search-value": r.value,
|
|
@@ -1183,22 +1195,22 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1183
1195
|
"pin-header-row": !0,
|
|
1184
1196
|
"auto-reset-page-index": !0
|
|
1185
1197
|
}, {
|
|
1186
|
-
"pin-top":
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
(P(!0), se(xe, null,
|
|
1198
|
+
"pin-top": ce(() => [
|
|
1199
|
+
j("tbody", null, [
|
|
1200
|
+
j("tr", oa, [
|
|
1201
|
+
(P(!0), se(xe, null, dt(l.value, (q, B) => (P(), se("td", {
|
|
1190
1202
|
key: `${d(tt)()}_${B}`,
|
|
1191
1203
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
1192
1204
|
}, [
|
|
1193
|
-
|
|
1205
|
+
j("span", {
|
|
1194
1206
|
class: Ze([
|
|
1195
1207
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
1196
1208
|
q.rowType === "NUMERIC" ? "text-right" : "",
|
|
1197
1209
|
re.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
1198
1210
|
])
|
|
1199
1211
|
}, [
|
|
1200
|
-
|
|
1201
|
-
|
|
1212
|
+
j("p", sa, ke(q.rowType === "NUMERIC" ? d(ct)(q.main) : q.main), 1),
|
|
1213
|
+
j("p", ra, ke(q.comparison ? q.rowType === "NUMERIC" ? `(${d(ct)(q.comparison)})` : `(${q.comparison})` : ""), 1)
|
|
1202
1214
|
], 2)
|
|
1203
1215
|
]))), 128))
|
|
1204
1216
|
])
|
|
@@ -1209,7 +1221,7 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1209
1221
|
], 64);
|
|
1210
1222
|
};
|
|
1211
1223
|
}
|
|
1212
|
-
}),
|
|
1224
|
+
}), ua = /* @__PURE__ */ _e({
|
|
1213
1225
|
__name: "WidgetStackBarChart",
|
|
1214
1226
|
props: /* @__PURE__ */ We({
|
|
1215
1227
|
tileIndex: {}
|
|
@@ -1219,68 +1231,68 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1219
1231
|
}),
|
|
1220
1232
|
emits: ["update:modelValue"],
|
|
1221
1233
|
setup(e) {
|
|
1222
|
-
const o = e, i =
|
|
1234
|
+
const o = e, i = De(e, "modelValue"), s = T(null), m = F(() => {
|
|
1223
1235
|
var r;
|
|
1224
1236
|
return ((r = i.value.data) == null ? void 0 : r.xAxis) || [];
|
|
1225
|
-
}), u =
|
|
1237
|
+
}), u = F(() => {
|
|
1226
1238
|
var t;
|
|
1227
1239
|
return ((t = i.value.data) == null ? void 0 : t.datasets) ?? [];
|
|
1228
|
-
}), { datalabels:
|
|
1240
|
+
}), { datalabels: C, xCfg: _, yCfg: k, isTransposed: V, legend: p, chartWidth: x, chartHeight: y } = st(
|
|
1229
1241
|
i.value
|
|
1230
|
-
), v =
|
|
1242
|
+
), v = F(() => ot(i.value.isTransposed === !0, !0)), g = pt("bar"), b = F(() => u.value.length > 0 ? [
|
|
1231
1243
|
...u.value.map((t, r) => {
|
|
1232
|
-
let
|
|
1244
|
+
let h = t.values;
|
|
1233
1245
|
return {
|
|
1234
1246
|
label: t.name,
|
|
1235
|
-
data:
|
|
1247
|
+
data: h,
|
|
1236
1248
|
dash: !!t.isCompare,
|
|
1237
1249
|
backgroundColor: Ee({ index: r, isCompare: t.isCompare })
|
|
1238
1250
|
};
|
|
1239
1251
|
})
|
|
1240
|
-
] : []),
|
|
1252
|
+
] : []), L = at();
|
|
1241
1253
|
function c() {
|
|
1242
|
-
return
|
|
1254
|
+
return L.extractChartSize(s.value, o.tileIndex) || { width: 0, height: 0 };
|
|
1243
1255
|
}
|
|
1244
1256
|
return Ie(() => {
|
|
1245
|
-
|
|
1257
|
+
Ce(() => {
|
|
1246
1258
|
c();
|
|
1247
1259
|
});
|
|
1248
|
-
}), me([
|
|
1249
|
-
|
|
1260
|
+
}), me([b], () => {
|
|
1261
|
+
Ce(() => c());
|
|
1250
1262
|
}), (t, r) => {
|
|
1251
|
-
const
|
|
1263
|
+
const h = U("FmBarChart");
|
|
1252
1264
|
return P(), se(xe, null, [
|
|
1253
1265
|
Ne(t.$slots, "menu"),
|
|
1254
|
-
G(
|
|
1266
|
+
G(h, {
|
|
1255
1267
|
ref_key: "chartRef",
|
|
1256
1268
|
ref: s,
|
|
1257
1269
|
class: "bar-chart",
|
|
1258
|
-
datasets:
|
|
1259
|
-
"x-axis": { categories:
|
|
1260
|
-
"x-cfg": d(
|
|
1261
|
-
"y-cfg": d(
|
|
1262
|
-
transpose: d(
|
|
1270
|
+
datasets: b.value,
|
|
1271
|
+
"x-axis": { categories: m.value },
|
|
1272
|
+
"x-cfg": d(_),
|
|
1273
|
+
"y-cfg": d(k),
|
|
1274
|
+
transpose: d(V),
|
|
1263
1275
|
stacked: !0,
|
|
1264
1276
|
legend: {
|
|
1265
|
-
display: d(
|
|
1266
|
-
position: d(
|
|
1267
|
-
maxHeight: d(
|
|
1268
|
-
maxWidth: d(
|
|
1269
|
-
labels: d(
|
|
1277
|
+
display: d(p).display ?? !1,
|
|
1278
|
+
position: d(p).position,
|
|
1279
|
+
maxHeight: d(p).maxHeight,
|
|
1280
|
+
maxWidth: d(p).maxWidth,
|
|
1281
|
+
labels: d(p).labels
|
|
1270
1282
|
},
|
|
1271
1283
|
tooltip: v.value,
|
|
1272
|
-
plugins: [d(
|
|
1273
|
-
datalabels: d(
|
|
1284
|
+
plugins: [d(g)],
|
|
1285
|
+
datalabels: d(C),
|
|
1274
1286
|
"maintain-aspect-ratio": !1,
|
|
1275
|
-
style:
|
|
1276
|
-
"--chart-width": d(
|
|
1287
|
+
style: Ve({
|
|
1288
|
+
"--chart-width": d(x) !== void 0 ? d(x) + "px" : "100%",
|
|
1277
1289
|
"--chart-height": d(y) !== void 0 ? d(y) + "px" : "calc(100% - 36px)"
|
|
1278
1290
|
})
|
|
1279
1291
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "tooltip", "plugins", "datalabels", "style"])
|
|
1280
1292
|
], 64);
|
|
1281
1293
|
};
|
|
1282
1294
|
}
|
|
1283
|
-
}),
|
|
1295
|
+
}), ca = /* @__PURE__ */ _e({
|
|
1284
1296
|
__name: "WidgetStackLineChart",
|
|
1285
1297
|
props: /* @__PURE__ */ We({
|
|
1286
1298
|
tileIndex: {}
|
|
@@ -1290,53 +1302,53 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1290
1302
|
}),
|
|
1291
1303
|
emits: ["update:modelValue"],
|
|
1292
1304
|
setup(e) {
|
|
1293
|
-
var
|
|
1294
|
-
const o = e, i =
|
|
1295
|
-
() => s.length === 1 &&
|
|
1296
|
-
), u =
|
|
1305
|
+
var h;
|
|
1306
|
+
const o = e, i = De(e, "modelValue"), s = ((h = i.value.data) == null ? void 0 : h.xAxis) ?? [], m = F(
|
|
1307
|
+
() => s.length === 1 && _.value.length > 0 && _.value.every((a) => a.values.length === 1)
|
|
1308
|
+
), u = F(() => m.value ? ["", s[0], ""] : s), C = T(null), _ = F(() => {
|
|
1297
1309
|
var a;
|
|
1298
1310
|
return ((a = i.value.data) == null ? void 0 : a.datasets) ?? [];
|
|
1299
|
-
}), { datalabels:
|
|
1311
|
+
}), { datalabels: k, xCfg: V, yCfg: p, isTransposed: x, legend: y, chartWidth: v, chartHeight: g } = st(
|
|
1300
1312
|
i.value
|
|
1301
|
-
),
|
|
1302
|
-
...
|
|
1303
|
-
let
|
|
1304
|
-
return
|
|
1313
|
+
), b = F(() => ot(i.value.isTransposed === !0, !0)), L = pt("line"), c = F(() => _.value.length > 0 ? [
|
|
1314
|
+
..._.value.map((a, l) => {
|
|
1315
|
+
let w = a.values;
|
|
1316
|
+
return m.value && (w = [NaN, w[0], NaN]), {
|
|
1305
1317
|
label: a.name,
|
|
1306
|
-
data:
|
|
1318
|
+
data: w,
|
|
1307
1319
|
dash: a.isCompare,
|
|
1308
1320
|
fill: !1,
|
|
1309
1321
|
color: Ee({ index: l, isCompare: a.isCompare }),
|
|
1310
|
-
pointRadius:
|
|
1311
|
-
pointHoverRadius:
|
|
1312
|
-
pointBackgroundColor:
|
|
1313
|
-
pointBorderColor:
|
|
1314
|
-
pointBorderWidth:
|
|
1322
|
+
pointRadius: m.value ? 4 : void 0,
|
|
1323
|
+
pointHoverRadius: m.value ? 6 : void 0,
|
|
1324
|
+
pointBackgroundColor: m.value ? Ee({ index: l, isCompare: a.isCompare }) : void 0,
|
|
1325
|
+
pointBorderColor: m.value ? Ee({ index: l, isCompare: a.isCompare }) : void 0,
|
|
1326
|
+
pointBorderWidth: m.value ? 2 : void 0
|
|
1315
1327
|
};
|
|
1316
1328
|
})
|
|
1317
1329
|
] : []), t = at();
|
|
1318
1330
|
function r() {
|
|
1319
|
-
return t.extractChartSize(
|
|
1331
|
+
return t.extractChartSize(C.value, o.tileIndex) || { width: 0, height: 0 };
|
|
1320
1332
|
}
|
|
1321
1333
|
return Ie(() => {
|
|
1322
|
-
|
|
1334
|
+
Ce(() => {
|
|
1323
1335
|
r();
|
|
1324
1336
|
});
|
|
1325
1337
|
}), me([c], () => {
|
|
1326
|
-
|
|
1338
|
+
Ce(() => r());
|
|
1327
1339
|
}), (a, l) => {
|
|
1328
|
-
const
|
|
1340
|
+
const w = U("FmLineChart");
|
|
1329
1341
|
return P(), se(xe, null, [
|
|
1330
1342
|
Ne(a.$slots, "menu"),
|
|
1331
|
-
G(
|
|
1343
|
+
G(w, {
|
|
1332
1344
|
ref_key: "chartRef",
|
|
1333
|
-
ref:
|
|
1345
|
+
ref: C,
|
|
1334
1346
|
class: "line-chart",
|
|
1335
1347
|
datasets: c.value,
|
|
1336
1348
|
"x-axis": { categories: u.value },
|
|
1337
|
-
"x-cfg": d(
|
|
1338
|
-
"y-cfg": d(
|
|
1339
|
-
transpose: d(
|
|
1349
|
+
"x-cfg": d(V),
|
|
1350
|
+
"y-cfg": d(p),
|
|
1351
|
+
transpose: d(x),
|
|
1340
1352
|
legend: {
|
|
1341
1353
|
display: d(y).display ?? !1,
|
|
1342
1354
|
position: d(y).position,
|
|
@@ -1344,14 +1356,14 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1344
1356
|
maxWidth: d(y).maxWidth,
|
|
1345
1357
|
labels: d(y).labels
|
|
1346
1358
|
},
|
|
1347
|
-
tooltip:
|
|
1348
|
-
plugins: [d(
|
|
1359
|
+
tooltip: b.value,
|
|
1360
|
+
plugins: [d(L)],
|
|
1349
1361
|
stacked: !0,
|
|
1350
|
-
datalabels: d(
|
|
1362
|
+
datalabels: d(k),
|
|
1351
1363
|
"maintain-aspect-ratio": !1,
|
|
1352
|
-
style:
|
|
1364
|
+
style: Ve({
|
|
1353
1365
|
"--chart-width": d(v) !== void 0 ? d(v) + "px" : "100%",
|
|
1354
|
-
"--chart-height": d(
|
|
1366
|
+
"--chart-height": d(g) !== void 0 ? d(g) + "px" : "calc(100% - 36px)"
|
|
1355
1367
|
})
|
|
1356
1368
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "tooltip", "plugins", "datalabels", "style"])
|
|
1357
1369
|
], 64);
|
|
@@ -1371,16 +1383,16 @@ const la = "/assets/processTableData.worker-GbyPQNAF.js", aa = { class: "my-4" }
|
|
|
1371
1383
|
"col-span-11",
|
|
1372
1384
|
"col-span-12"
|
|
1373
1385
|
];
|
|
1374
|
-
function
|
|
1386
|
+
function da(e) {
|
|
1375
1387
|
return e < 12 ? Qe[e - 1] : Qe[11];
|
|
1376
1388
|
}
|
|
1377
|
-
function
|
|
1389
|
+
function pa(e) {
|
|
1378
1390
|
return e < 12 ? Qe[Math.min(11, e * 2 - 1)] : Qe[11];
|
|
1379
1391
|
}
|
|
1380
|
-
function
|
|
1392
|
+
function ma(e) {
|
|
1381
1393
|
return e < 12 ? Qe[Math.min(11, e * 3 - 1)] : Qe[11];
|
|
1382
1394
|
}
|
|
1383
|
-
const
|
|
1395
|
+
const fa = /* @__PURE__ */ _e({
|
|
1384
1396
|
__name: "WidgetLinechart",
|
|
1385
1397
|
props: /* @__PURE__ */ We({
|
|
1386
1398
|
tileIndex: {}
|
|
@@ -1390,53 +1402,53 @@ const ma = /* @__PURE__ */ Te({
|
|
|
1390
1402
|
}),
|
|
1391
1403
|
emits: ["update:modelValue"],
|
|
1392
1404
|
setup(e) {
|
|
1393
|
-
var
|
|
1394
|
-
const o = e, i =
|
|
1395
|
-
() => s.length === 1 &&
|
|
1396
|
-
), u =
|
|
1405
|
+
var h;
|
|
1406
|
+
const o = e, i = De(e, "modelValue"), s = ((h = i.value.data) == null ? void 0 : h.xAxis) ?? [], m = F(
|
|
1407
|
+
() => s.length === 1 && _.value.length > 0 && _.value.every((a) => a.values.length === 1)
|
|
1408
|
+
), u = F(() => m.value ? ["", s[0], ""] : s), C = T(null), _ = F(() => {
|
|
1397
1409
|
var a;
|
|
1398
1410
|
return ((a = i.value.data) == null ? void 0 : a.datasets) ?? [];
|
|
1399
|
-
}), { datalabels:
|
|
1411
|
+
}), { datalabels: k, xCfg: V, yCfg: p, isTransposed: x, legend: y, chartWidth: v, chartHeight: g } = st(
|
|
1400
1412
|
i.value
|
|
1401
|
-
),
|
|
1402
|
-
...
|
|
1403
|
-
let
|
|
1404
|
-
return
|
|
1413
|
+
), b = F(() => ot(i.value.isTransposed === !0, !0)), L = pt("line"), c = F(() => _.value.length > 0 ? [
|
|
1414
|
+
..._.value.map((a, l) => {
|
|
1415
|
+
let w = a.values;
|
|
1416
|
+
return m.value && (w = [NaN, w[0], NaN]), {
|
|
1405
1417
|
label: a.name,
|
|
1406
|
-
data:
|
|
1418
|
+
data: w,
|
|
1407
1419
|
dash: !!a.isCompare,
|
|
1408
1420
|
fill: !1,
|
|
1409
1421
|
color: Ee({ index: l, isCompare: a.isCompare }),
|
|
1410
|
-
pointRadius:
|
|
1411
|
-
pointHoverRadius:
|
|
1412
|
-
pointBackgroundColor:
|
|
1413
|
-
pointBorderColor:
|
|
1414
|
-
pointBorderWidth:
|
|
1422
|
+
pointRadius: m.value ? 4 : void 0,
|
|
1423
|
+
pointHoverRadius: m.value ? 6 : void 0,
|
|
1424
|
+
pointBackgroundColor: m.value ? Ee({ index: l, isCompare: a.isCompare }) : void 0,
|
|
1425
|
+
pointBorderColor: m.value ? Ee({ index: l, isCompare: a.isCompare }) : void 0,
|
|
1426
|
+
pointBorderWidth: m.value ? 2 : void 0
|
|
1415
1427
|
};
|
|
1416
1428
|
})
|
|
1417
1429
|
] : []), t = at();
|
|
1418
1430
|
function r() {
|
|
1419
|
-
return t.extractChartSize(
|
|
1431
|
+
return t.extractChartSize(C.value, o.tileIndex) || { width: 0, height: 0 };
|
|
1420
1432
|
}
|
|
1421
1433
|
return Ie(() => {
|
|
1422
|
-
|
|
1434
|
+
Ce(() => {
|
|
1423
1435
|
r();
|
|
1424
1436
|
});
|
|
1425
1437
|
}), me([c], () => {
|
|
1426
|
-
|
|
1438
|
+
Ce(() => r());
|
|
1427
1439
|
}), (a, l) => {
|
|
1428
|
-
const
|
|
1440
|
+
const w = U("FmLineChart");
|
|
1429
1441
|
return P(), se(xe, null, [
|
|
1430
1442
|
Ne(a.$slots, "menu"),
|
|
1431
|
-
G(
|
|
1443
|
+
G(w, {
|
|
1432
1444
|
ref_key: "chartRef",
|
|
1433
|
-
ref:
|
|
1445
|
+
ref: C,
|
|
1434
1446
|
class: "line-chart",
|
|
1435
1447
|
datasets: c.value,
|
|
1436
1448
|
"x-axis": { categories: u.value },
|
|
1437
|
-
"x-cfg": d(
|
|
1438
|
-
"y-cfg": d(
|
|
1439
|
-
transpose: d(
|
|
1449
|
+
"x-cfg": d(V),
|
|
1450
|
+
"y-cfg": d(p),
|
|
1451
|
+
transpose: d(x),
|
|
1440
1452
|
legend: {
|
|
1441
1453
|
display: d(y).display ?? !1,
|
|
1442
1454
|
position: d(y).position,
|
|
@@ -1444,19 +1456,19 @@ const ma = /* @__PURE__ */ Te({
|
|
|
1444
1456
|
maxWidth: d(y).maxWidth,
|
|
1445
1457
|
labels: d(y).labels
|
|
1446
1458
|
},
|
|
1447
|
-
tooltip:
|
|
1448
|
-
datalabels: d(
|
|
1449
|
-
plugins: [d(
|
|
1459
|
+
tooltip: b.value,
|
|
1460
|
+
datalabels: d(k),
|
|
1461
|
+
plugins: [d(L)],
|
|
1450
1462
|
"maintain-aspect-ratio": !1,
|
|
1451
|
-
style:
|
|
1463
|
+
style: Ve({
|
|
1452
1464
|
"--chart-width": d(v) !== void 0 ? d(v) + "px" : "100%",
|
|
1453
|
-
"--chart-height": d(
|
|
1465
|
+
"--chart-height": d(g) !== void 0 ? d(g) + "px" : "calc(100% - 36px)"
|
|
1454
1466
|
})
|
|
1455
1467
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "tooltip", "datalabels", "plugins", "style"])
|
|
1456
1468
|
], 64);
|
|
1457
1469
|
};
|
|
1458
1470
|
}
|
|
1459
|
-
}),
|
|
1471
|
+
}), ha = { class: "flex flex-col gap-16" }, va = { class: "flex flex-row" }, ga = /* @__PURE__ */ _e({
|
|
1460
1472
|
__name: "PdfOrientationDialog",
|
|
1461
1473
|
props: /* @__PURE__ */ We({
|
|
1462
1474
|
reportType: {},
|
|
@@ -1467,76 +1479,76 @@ const ma = /* @__PURE__ */ Te({
|
|
|
1467
1479
|
}),
|
|
1468
1480
|
emits: ["update:modelValue"],
|
|
1469
1481
|
setup(e) {
|
|
1470
|
-
const { t: o } = nt(), { FmForm: i } = Nl, s = e,
|
|
1482
|
+
const { t: o } = nt(), { FmForm: i } = Nl, s = e, m = T(), u = De(e, "modelValue"), C = T(!0), _ = T(!1), k = $t(), { selectedLocationIds: V, dateRange: p, timeRange: x } = ze(lt()), y = T(yt.PORTRAIT);
|
|
1471
1483
|
function v() {
|
|
1472
|
-
var
|
|
1473
|
-
(
|
|
1484
|
+
var b;
|
|
1485
|
+
(b = m.value) == null || b.validateInputs();
|
|
1474
1486
|
}
|
|
1475
|
-
async function
|
|
1476
|
-
|
|
1487
|
+
async function g() {
|
|
1488
|
+
_.value = !0;
|
|
1477
1489
|
try {
|
|
1478
1490
|
s.index != null && await Gt({
|
|
1479
1491
|
reportType: s.reportType,
|
|
1480
1492
|
index: s.index,
|
|
1481
1493
|
orientationTypes: [y.value],
|
|
1482
|
-
isCombinedLocationLayout:
|
|
1483
|
-
timeRange:
|
|
1484
|
-
dateRange:
|
|
1485
|
-
locationIds:
|
|
1494
|
+
isCombinedLocationLayout: C.value,
|
|
1495
|
+
timeRange: x.value,
|
|
1496
|
+
dateRange: p.value,
|
|
1497
|
+
locationIds: V.value
|
|
1486
1498
|
});
|
|
1487
|
-
} catch (
|
|
1488
|
-
|
|
1499
|
+
} catch (b) {
|
|
1500
|
+
k.open({ message: b.message, type: "error" });
|
|
1489
1501
|
} finally {
|
|
1490
|
-
|
|
1502
|
+
_.value = !1;
|
|
1491
1503
|
}
|
|
1492
1504
|
}
|
|
1493
|
-
return (
|
|
1494
|
-
const c = U("FmRadio"), t = U("FmRadioGroup"), r = U("FmButton"),
|
|
1495
|
-
return P(), fe(
|
|
1505
|
+
return (b, L) => {
|
|
1506
|
+
const c = U("FmRadio"), t = U("FmRadioGroup"), r = U("FmButton"), h = U("FmDialog");
|
|
1507
|
+
return P(), fe(h, {
|
|
1496
1508
|
modelValue: u.value,
|
|
1497
|
-
"onUpdate:modelValue":
|
|
1509
|
+
"onUpdate:modelValue": L[2] || (L[2] = (a) => u.value = a),
|
|
1498
1510
|
overlay: !0,
|
|
1499
1511
|
"z-index": 10
|
|
1500
1512
|
}, {
|
|
1501
|
-
"dialog-header":
|
|
1513
|
+
"dialog-header": ce(() => L[3] || (L[3] = [
|
|
1502
1514
|
wt("Select Orientation")
|
|
1503
1515
|
])),
|
|
1504
|
-
default:
|
|
1516
|
+
default: ce(() => [
|
|
1505
1517
|
G(d(i), {
|
|
1506
1518
|
ref_key: "form",
|
|
1507
|
-
ref:
|
|
1508
|
-
onValidationSuccess:
|
|
1519
|
+
ref: m,
|
|
1520
|
+
onValidationSuccess: g
|
|
1509
1521
|
}, {
|
|
1510
|
-
default:
|
|
1511
|
-
|
|
1522
|
+
default: ce(() => [
|
|
1523
|
+
j("div", ha, [
|
|
1512
1524
|
G(t, {
|
|
1513
1525
|
modelValue: y.value,
|
|
1514
|
-
"onUpdate:modelValue":
|
|
1526
|
+
"onUpdate:modelValue": L[0] || (L[0] = (a) => y.value = a)
|
|
1515
1527
|
}, {
|
|
1516
|
-
default:
|
|
1528
|
+
default: ce(() => [
|
|
1517
1529
|
G(c, {
|
|
1518
|
-
value: d(
|
|
1530
|
+
value: d(yt).PORTRAIT,
|
|
1519
1531
|
label: d(o)("report.common.portrait")
|
|
1520
1532
|
}, null, 8, ["value", "label"]),
|
|
1521
1533
|
G(c, {
|
|
1522
|
-
value: d(
|
|
1534
|
+
value: d(yt).LANDSCAPE,
|
|
1523
1535
|
label: d(o)("report.common.landscape")
|
|
1524
1536
|
}, null, 8, ["value", "label"])
|
|
1525
1537
|
]),
|
|
1526
1538
|
_: 1
|
|
1527
1539
|
}, 8, ["modelValue"])
|
|
1528
1540
|
]),
|
|
1529
|
-
|
|
1530
|
-
|
|
1541
|
+
j("div", va, [
|
|
1542
|
+
L[4] || (L[4] = j("div", { class: "grow" }, null, -1)),
|
|
1531
1543
|
G(r, {
|
|
1532
1544
|
label: d(o)("report.common.cancel"),
|
|
1533
1545
|
variant: "tertiary",
|
|
1534
|
-
onClick:
|
|
1546
|
+
onClick: L[1] || (L[1] = (a) => u.value = !1)
|
|
1535
1547
|
}, null, 8, ["label"]),
|
|
1536
|
-
|
|
1548
|
+
j("div", null, [
|
|
1537
1549
|
G(r, {
|
|
1538
1550
|
label: d(o)("report.common.download"),
|
|
1539
|
-
loading:
|
|
1551
|
+
loading: _.value,
|
|
1540
1552
|
onClick: v
|
|
1541
1553
|
}, null, 8, ["label", "loading"])
|
|
1542
1554
|
])
|
|
@@ -1550,25 +1562,25 @@ const ma = /* @__PURE__ */ Te({
|
|
|
1550
1562
|
};
|
|
1551
1563
|
}
|
|
1552
1564
|
});
|
|
1553
|
-
function
|
|
1554
|
-
const { containerRef: o, stickyOffset: i =
|
|
1555
|
-
let
|
|
1556
|
-
function
|
|
1565
|
+
function ya(e) {
|
|
1566
|
+
const { containerRef: o, stickyOffset: i = T(0), enabled: s = T(!0) } = e;
|
|
1567
|
+
let m = null, u = null, C = null, _ = null, k = null, V = null;
|
|
1568
|
+
function p() {
|
|
1557
1569
|
return o.value ? o.value.querySelector("table") : null;
|
|
1558
1570
|
}
|
|
1559
|
-
function
|
|
1571
|
+
function x() {
|
|
1560
1572
|
var l;
|
|
1561
1573
|
let a = (l = o.value) == null ? void 0 : l.parentElement;
|
|
1562
1574
|
for (; a; ) {
|
|
1563
|
-
const
|
|
1564
|
-
if (
|
|
1575
|
+
const w = window.getComputedStyle(a);
|
|
1576
|
+
if (w.overflowY === "auto" || w.overflowY === "scroll")
|
|
1565
1577
|
return a;
|
|
1566
1578
|
a = a.parentElement;
|
|
1567
1579
|
}
|
|
1568
1580
|
return null;
|
|
1569
1581
|
}
|
|
1570
1582
|
function y() {
|
|
1571
|
-
var
|
|
1583
|
+
var w;
|
|
1572
1584
|
const a = [];
|
|
1573
1585
|
o.value && o.value.querySelectorAll("div,section,main,article,aside").forEach(($) => {
|
|
1574
1586
|
if ($.scrollWidth > $.clientWidth) {
|
|
@@ -1576,7 +1588,7 @@ function ga(e) {
|
|
|
1576
1588
|
(A.overflowX === "auto" || A.overflowX === "scroll") && a.push($);
|
|
1577
1589
|
}
|
|
1578
1590
|
});
|
|
1579
|
-
let l = (
|
|
1591
|
+
let l = (w = o.value) == null ? void 0 : w.parentElement;
|
|
1580
1592
|
for (; l; ) {
|
|
1581
1593
|
if (l.scrollWidth > l.clientWidth) {
|
|
1582
1594
|
const $ = window.getComputedStyle(l);
|
|
@@ -1587,8 +1599,8 @@ function ga(e) {
|
|
|
1587
1599
|
return a;
|
|
1588
1600
|
}
|
|
1589
1601
|
function v() {
|
|
1590
|
-
if (r(), !s.value || !o.value || (u =
|
|
1591
|
-
|
|
1602
|
+
if (r(), !s.value || !o.value || (u = p(), !u) || (C = u.querySelector("thead"), !C)) return;
|
|
1603
|
+
m = document.createElement("div"), m.className = "sticky-header-clone", m.style.cssText = `
|
|
1592
1604
|
position: fixed;
|
|
1593
1605
|
top: ${i.value}px;
|
|
1594
1606
|
left: 0;
|
|
@@ -1606,29 +1618,29 @@ function ga(e) {
|
|
|
1606
1618
|
border-collapse: collapse;
|
|
1607
1619
|
pointer-events: auto;
|
|
1608
1620
|
`;
|
|
1609
|
-
const l =
|
|
1610
|
-
l.style.cssText = "pointer-events: auto;",
|
|
1621
|
+
const l = C.cloneNode(!0);
|
|
1622
|
+
l.style.cssText = "pointer-events: auto;", g(C, l), a.appendChild(l), m.appendChild(a), document.body.appendChild(m), L(), c(), t(), b();
|
|
1611
1623
|
}
|
|
1612
|
-
function
|
|
1613
|
-
const
|
|
1614
|
-
|
|
1624
|
+
function g(a, l) {
|
|
1625
|
+
const w = a.querySelectorAll("th, td"), $ = l.querySelectorAll("th, td");
|
|
1626
|
+
w.forEach((A, I) => {
|
|
1615
1627
|
const Z = $[I];
|
|
1616
1628
|
if (!Z) return;
|
|
1617
|
-
const W = A,
|
|
1629
|
+
const W = A, K = window.getComputedStyle(W);
|
|
1618
1630
|
Object.assign(Z.style, {
|
|
1619
1631
|
width: `${W.offsetWidth}px`,
|
|
1620
1632
|
minWidth: `${W.offsetWidth}px`,
|
|
1621
1633
|
maxWidth: `${W.offsetWidth}px`,
|
|
1622
1634
|
height: `${W.offsetHeight}px`,
|
|
1623
|
-
padding:
|
|
1624
|
-
backgroundColor:
|
|
1625
|
-
borderBottom:
|
|
1626
|
-
fontSize:
|
|
1627
|
-
fontWeight:
|
|
1628
|
-
textAlign:
|
|
1629
|
-
verticalAlign:
|
|
1635
|
+
padding: K.padding,
|
|
1636
|
+
backgroundColor: K.backgroundColor,
|
|
1637
|
+
borderBottom: K.borderBottom,
|
|
1638
|
+
fontSize: K.fontSize,
|
|
1639
|
+
fontWeight: K.fontWeight,
|
|
1640
|
+
textAlign: K.textAlign,
|
|
1641
|
+
verticalAlign: K.verticalAlign,
|
|
1630
1642
|
boxSizing: "border-box",
|
|
1631
|
-
cursor:
|
|
1643
|
+
cursor: K.cursor || "pointer",
|
|
1632
1644
|
pointerEvents: "auto"
|
|
1633
1645
|
}), Z.onclick = (re) => {
|
|
1634
1646
|
re.preventDefault(), re.stopPropagation();
|
|
@@ -1639,52 +1651,52 @@ function ga(e) {
|
|
|
1639
1651
|
};
|
|
1640
1652
|
});
|
|
1641
1653
|
}
|
|
1642
|
-
function
|
|
1643
|
-
if (!
|
|
1644
|
-
const a = o.value.getBoundingClientRect(), l = u.getBoundingClientRect(),
|
|
1645
|
-
if (!(l.top < I && l.bottom > I +
|
|
1646
|
-
|
|
1654
|
+
function b() {
|
|
1655
|
+
if (!m || !u || !C || !o.value) return;
|
|
1656
|
+
const a = o.value.getBoundingClientRect(), l = u.getBoundingClientRect(), w = C.getBoundingClientRect(), $ = x(), A = $ == null ? void 0 : $.getBoundingClientRect(), I = i.value > 0 ? i.value : (A == null ? void 0 : A.top) ?? 0;
|
|
1657
|
+
if (!(l.top < I && l.bottom > I + w.height)) {
|
|
1658
|
+
m.style.visibility = "hidden";
|
|
1647
1659
|
return;
|
|
1648
1660
|
}
|
|
1649
|
-
|
|
1650
|
-
const W = A ?? a,
|
|
1651
|
-
|
|
1652
|
-
const
|
|
1653
|
-
|
|
1661
|
+
m.style.visibility = "visible", m.style.top = `${I}px`;
|
|
1662
|
+
const W = A ?? a, K = Math.max(a.left, W.left), ue = Math.min(a.right, W.right) - K;
|
|
1663
|
+
m.style.left = `${K}px`, m.style.width = `${ue}px`;
|
|
1664
|
+
const S = m.querySelector("table");
|
|
1665
|
+
S && (S.style.width = `${u.offsetWidth}px`, S.style.marginLeft = `${w.left - K}px`);
|
|
1654
1666
|
}
|
|
1655
|
-
function
|
|
1656
|
-
var
|
|
1657
|
-
|
|
1658
|
-
const a =
|
|
1659
|
-
a && a.addEventListener("scroll",
|
|
1660
|
-
|
|
1667
|
+
function L() {
|
|
1668
|
+
var w;
|
|
1669
|
+
k = () => requestAnimationFrame(b), window.addEventListener("scroll", k, { passive: !0 });
|
|
1670
|
+
const a = x();
|
|
1671
|
+
a && a.addEventListener("scroll", k, { passive: !0 }), y().forEach(($) => {
|
|
1672
|
+
k && $.addEventListener("scroll", k, { passive: !0 });
|
|
1661
1673
|
});
|
|
1662
|
-
let l = (
|
|
1674
|
+
let l = (w = o.value) == null ? void 0 : w.parentElement;
|
|
1663
1675
|
for (; l; )
|
|
1664
|
-
l !== a && (l.scrollHeight > l.clientHeight || l.scrollWidth > l.clientWidth) && l.addEventListener("scroll",
|
|
1676
|
+
l !== a && (l.scrollHeight > l.clientHeight || l.scrollWidth > l.clientWidth) && l.addEventListener("scroll", k, { passive: !0 }), l = l.parentElement;
|
|
1665
1677
|
}
|
|
1666
1678
|
function c() {
|
|
1667
|
-
|
|
1668
|
-
if (
|
|
1669
|
-
const a =
|
|
1670
|
-
a &&
|
|
1671
|
-
const l =
|
|
1679
|
+
_ = new ResizeObserver(() => {
|
|
1680
|
+
if (C && m) {
|
|
1681
|
+
const a = m.querySelector("thead");
|
|
1682
|
+
a && g(C, a);
|
|
1683
|
+
const l = m.querySelector("table");
|
|
1672
1684
|
l && u && (l.style.width = `${u.offsetWidth}px`);
|
|
1673
1685
|
}
|
|
1674
|
-
|
|
1675
|
-
}), o.value &&
|
|
1686
|
+
b();
|
|
1687
|
+
}), o.value && _.observe(o.value), u && _.observe(u);
|
|
1676
1688
|
}
|
|
1677
1689
|
function t() {
|
|
1678
|
-
if (!
|
|
1690
|
+
if (!C) return;
|
|
1679
1691
|
const a = xt(() => v(), 100), l = () => {
|
|
1680
|
-
if (
|
|
1681
|
-
const
|
|
1682
|
-
|
|
1692
|
+
if (C && m) {
|
|
1693
|
+
const w = m.querySelector("thead");
|
|
1694
|
+
w && g(C, w), b();
|
|
1683
1695
|
}
|
|
1684
1696
|
};
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
}),
|
|
1697
|
+
V = new MutationObserver((w) => {
|
|
1698
|
+
w.some((A) => A.type === "childList" ? A.addedNodes.length > 0 || A.removedNodes.length > 0 : !1) ? a() : l();
|
|
1699
|
+
}), V.observe(C, {
|
|
1688
1700
|
childList: !0,
|
|
1689
1701
|
subtree: !0,
|
|
1690
1702
|
attributes: !0,
|
|
@@ -1693,41 +1705,41 @@ function ga(e) {
|
|
|
1693
1705
|
}
|
|
1694
1706
|
function r() {
|
|
1695
1707
|
var a;
|
|
1696
|
-
if (
|
|
1697
|
-
window.removeEventListener("scroll",
|
|
1698
|
-
const l =
|
|
1699
|
-
l && l.removeEventListener("scroll",
|
|
1700
|
-
|
|
1708
|
+
if (m && (m.remove(), m = null), k) {
|
|
1709
|
+
window.removeEventListener("scroll", k);
|
|
1710
|
+
const l = x();
|
|
1711
|
+
l && l.removeEventListener("scroll", k), y().forEach(($) => {
|
|
1712
|
+
k && $.removeEventListener("scroll", k);
|
|
1701
1713
|
});
|
|
1702
|
-
let
|
|
1703
|
-
for (;
|
|
1704
|
-
|
|
1705
|
-
|
|
1714
|
+
let w = (a = o.value) == null ? void 0 : a.parentElement;
|
|
1715
|
+
for (; w; )
|
|
1716
|
+
w.removeEventListener("scroll", k), w = w.parentElement;
|
|
1717
|
+
k = null;
|
|
1706
1718
|
}
|
|
1707
|
-
|
|
1719
|
+
_ && (_.disconnect(), _ = null), V && (V.disconnect(), V = null), u = null, C = null;
|
|
1708
1720
|
}
|
|
1709
|
-
function
|
|
1721
|
+
function h() {
|
|
1710
1722
|
v();
|
|
1711
1723
|
}
|
|
1712
1724
|
return me(s, (a) => {
|
|
1713
1725
|
a ? v() : r();
|
|
1714
1726
|
}), me(i, () => {
|
|
1715
|
-
|
|
1727
|
+
m && (m.style.top = `${i.value}px`, b());
|
|
1716
1728
|
}), me(o, () => {
|
|
1717
1729
|
o.value && s.value && setTimeout(v, 100);
|
|
1718
1730
|
}), Ie(() => {
|
|
1719
1731
|
s.value && setTimeout(v, 100);
|
|
1720
1732
|
}), Xt(() => {
|
|
1721
1733
|
r();
|
|
1722
|
-
}), { refresh:
|
|
1734
|
+
}), { refresh: h, cleanup: r };
|
|
1723
1735
|
}
|
|
1724
|
-
const
|
|
1736
|
+
const ba = {
|
|
1725
1737
|
key: 1,
|
|
1726
1738
|
class: "grow"
|
|
1727
|
-
},
|
|
1739
|
+
}, wa = {
|
|
1728
1740
|
key: 2,
|
|
1729
1741
|
class: "flex"
|
|
1730
|
-
},
|
|
1742
|
+
}, Ga = /* @__PURE__ */ _e({
|
|
1731
1743
|
__name: "DynamicWidget",
|
|
1732
1744
|
props: /* @__PURE__ */ We({
|
|
1733
1745
|
index: {
|
|
@@ -1758,78 +1770,78 @@ const ya = {
|
|
|
1758
1770
|
}),
|
|
1759
1771
|
emits: ["update:modelValue"],
|
|
1760
1772
|
setup(e) {
|
|
1761
|
-
const o =
|
|
1762
|
-
var
|
|
1763
|
-
return (
|
|
1764
|
-
}), { refresh: y } =
|
|
1765
|
-
containerRef:
|
|
1766
|
-
stickyOffset:
|
|
1767
|
-
enabled:
|
|
1768
|
-
}), v =
|
|
1773
|
+
const o = T(!0), i = De(e, "modelValue"), s = i.value.widget.config, { t: m, te: u, locale: C } = nt(), _ = e, k = T(null), V = F(() => _.stickyHeaderOffset), p = F(() => i.value.widget.type === N.Table), x = F(() => {
|
|
1774
|
+
var f;
|
|
1775
|
+
return (f = k.value) == null ? void 0 : f.$el;
|
|
1776
|
+
}), { refresh: y } = ya({
|
|
1777
|
+
containerRef: x,
|
|
1778
|
+
stickyOffset: V,
|
|
1779
|
+
enabled: p
|
|
1780
|
+
}), v = T(s.rollup), g = T(tt()), b = T(s.drillDimension), L = F(() => {
|
|
1769
1781
|
if (He.value.length > 0) {
|
|
1770
|
-
const
|
|
1771
|
-
(ne) => ne.value ===
|
|
1782
|
+
const f = He.value.findIndex(
|
|
1783
|
+
(ne) => ne.value === b.value
|
|
1772
1784
|
);
|
|
1773
|
-
return
|
|
1785
|
+
return f >= 0 ? f : 0;
|
|
1774
1786
|
} else
|
|
1775
1787
|
return -1;
|
|
1776
|
-
}), c =
|
|
1777
|
-
() =>
|
|
1778
|
-
), r =
|
|
1779
|
-
() =>
|
|
1780
|
-
), Be =
|
|
1788
|
+
}), c = F(() => L.value !== 0), t = F(
|
|
1789
|
+
() => L.value != He.value.length - 1
|
|
1790
|
+
), r = T(s.showTitle ?? !0), h = T(s.titleFontSize ?? 14), a = T(s.titleBold ?? !1), l = T(s.titleItalic ?? !1), w = T(s.titleUnderline ?? !1), $ = T(s.chartWidth ?? void 0), A = T(s.chartHeight ?? void 0), I = T(s.showLabel ?? !1), Z = T(s.labelAlign ?? Tt.center), W = T(s.labelAnchor ?? kt.center), K = T(s.labelRotation ?? 0), re = T(s.labelOffset ?? 0), ue = T(s.labelFontSize ?? 12), S = F(() => s.showSearchBar), E = T(s.showX ?? !0), X = T(s.xPosition ?? _t.bottom), q = T(s.showXGrid ?? !1), B = T(s.showXTick ?? !0), O = T(s.xTickFontSize ?? 12), he = T(s.showXTitle ?? !1), Fe = T(s.xTitle ?? ""), Ae = T(s.xTitleFontSize ?? 12), Pe = T(s.showY ?? !0), Me = T(s.yPosition ?? Ft.left), n = T(s.showYGrid ?? !1), z = T(s.showYTick ?? !0), M = T(s.yTickFontSize ?? 12), D = T(s.showYTitle ?? !1), J = T(s.yTitle ?? ""), de = T(s.yTitleFontSize ?? 12), be = T(s.showLegend ?? void 0), ge = T(s.legendPosition ?? Lt.top), oe = T(s.usePointStyle ?? !0), H = T(s.legendMaxHeight), Y = T(s.legendMaxWidth), R = T(s.rowHeight ?? 0), Q = T(s.colWidths ?? []), ee = T(!1), pe = T(""), { breakpoints: ae, getBreakpointsBoundary: te } = Jt(), we = T(), le = F(
|
|
1791
|
+
() => _.customScreenWidth === void 0 ? window.innerWidth : _.customScreenWidth
|
|
1792
|
+
), Be = F(
|
|
1781
1793
|
() => (le == null ? void 0 : le.value) > te("xs")[1] && (le == null ? void 0 : le.value) <= te("sm")[1]
|
|
1782
|
-
),
|
|
1794
|
+
), mt = F(
|
|
1783
1795
|
() => (le == null ? void 0 : le.value) > te("sm")[1] && (le == null ? void 0 : le.value) <= te("md")[1]
|
|
1784
|
-
), ie =
|
|
1785
|
-
const
|
|
1786
|
-
return ie.value ||
|
|
1787
|
-
}),
|
|
1788
|
-
() => Bl.find((
|
|
1796
|
+
), ie = F(() => (le == null ? void 0 : le.value) > te("md")[1]), el = F(() => {
|
|
1797
|
+
const f = i.value.size.width;
|
|
1798
|
+
return ie.value || mt.value ? da(f) : Be.value ? pa(f) : ma(f);
|
|
1799
|
+
}), rt = F(
|
|
1800
|
+
() => Bl.find((f) => f.type === i.value.widget.type)
|
|
1789
1801
|
), Xe = xt(() => {
|
|
1790
|
-
var
|
|
1791
|
-
we.value = cl((
|
|
1792
|
-
}), tl =
|
|
1802
|
+
var f;
|
|
1803
|
+
we.value = cl((f = k.value) == null ? void 0 : f.$el.offsetWidth), g.value = tt();
|
|
1804
|
+
}), tl = F(() => {
|
|
1793
1805
|
if (Hl(ve.value.type, Ge.value))
|
|
1794
1806
|
switch (i.value.widget.type) {
|
|
1795
1807
|
case N.BarChart:
|
|
1796
1808
|
return ql;
|
|
1797
1809
|
case N.StackBarChart:
|
|
1798
|
-
return
|
|
1810
|
+
return ua;
|
|
1799
1811
|
case N.LineChart:
|
|
1800
|
-
return
|
|
1812
|
+
return fa;
|
|
1801
1813
|
case N.StackLineChart:
|
|
1802
|
-
return
|
|
1814
|
+
return ca;
|
|
1803
1815
|
case N.Circular:
|
|
1804
1816
|
return Yl;
|
|
1805
1817
|
case N.Scorecard:
|
|
1806
|
-
return
|
|
1818
|
+
return Zl;
|
|
1807
1819
|
case N.Spacer:
|
|
1808
|
-
return
|
|
1820
|
+
return ta;
|
|
1809
1821
|
case N.Table:
|
|
1810
|
-
return
|
|
1822
|
+
return ia;
|
|
1811
1823
|
default:
|
|
1812
|
-
return
|
|
1824
|
+
return Ct;
|
|
1813
1825
|
}
|
|
1814
1826
|
else
|
|
1815
|
-
return
|
|
1816
|
-
}), Ge =
|
|
1817
|
-
selectedLocationIds:
|
|
1827
|
+
return Ct;
|
|
1828
|
+
}), Ge = T(null), {
|
|
1829
|
+
selectedLocationIds: ft,
|
|
1818
1830
|
dateRange: zt,
|
|
1819
1831
|
compareDateRange: ll,
|
|
1820
1832
|
timeRange: Et,
|
|
1821
1833
|
globalFilters: al,
|
|
1822
|
-
isGlobalFiltersLoading:
|
|
1823
|
-
} = ze(lt()), { businessId: nl } = ze(Rt()), { businessLoadedId: ol, businessDataVersion:
|
|
1824
|
-
|
|
1825
|
-
const sl =
|
|
1826
|
-
const
|
|
1834
|
+
isGlobalFiltersLoading: Vt
|
|
1835
|
+
} = ze(lt()), { businessId: nl } = ze(Rt()), { businessLoadedId: ol, businessDataVersion: ht } = ze(lt());
|
|
1836
|
+
F(() => ol.value === nl.value && ft.value.length > 0 && !Vt.value);
|
|
1837
|
+
const sl = T(!0), ve = F(() => {
|
|
1838
|
+
const f = JSON.parse(JSON.stringify(i.value.widget));
|
|
1827
1839
|
return {
|
|
1828
|
-
...
|
|
1840
|
+
...f,
|
|
1829
1841
|
config: {
|
|
1830
|
-
...
|
|
1842
|
+
...f.config,
|
|
1831
1843
|
rollup: v.value,
|
|
1832
|
-
drillDimension:
|
|
1844
|
+
drillDimension: b.value,
|
|
1833
1845
|
showGrandTotal: !1
|
|
1834
1846
|
}
|
|
1835
1847
|
};
|
|
@@ -1838,33 +1850,33 @@ const ya = {
|
|
|
1838
1850
|
return {
|
|
1839
1851
|
data: Ge.value,
|
|
1840
1852
|
showTitle: r.value,
|
|
1841
|
-
titleFontSize:
|
|
1853
|
+
titleFontSize: h.value,
|
|
1842
1854
|
titleBold: a.value,
|
|
1843
1855
|
titleItalic: l.value,
|
|
1844
|
-
titleUnderline:
|
|
1856
|
+
titleUnderline: w.value,
|
|
1845
1857
|
chartHeight: A.value,
|
|
1846
1858
|
chartWidth: $.value,
|
|
1847
1859
|
showLabel: I.value,
|
|
1848
1860
|
labelAnchor: W.value,
|
|
1849
1861
|
labelAlign: Z.value,
|
|
1850
|
-
labelRotation:
|
|
1862
|
+
labelRotation: K.value,
|
|
1851
1863
|
labelOffset: re.value,
|
|
1852
1864
|
labelFontSize: ue.value,
|
|
1853
|
-
showX:
|
|
1865
|
+
showX: E.value,
|
|
1854
1866
|
xPosition: X.value,
|
|
1855
1867
|
showXGrid: q.value,
|
|
1856
1868
|
showXTick: B.value,
|
|
1857
1869
|
xTickFontSize: O.value,
|
|
1858
1870
|
showXTitle: he.value,
|
|
1859
|
-
xTitle:
|
|
1871
|
+
xTitle: Fe.value,
|
|
1860
1872
|
xTitleFontSize: Ae.value,
|
|
1861
1873
|
showY: Pe.value,
|
|
1862
1874
|
yPosition: Me.value,
|
|
1863
1875
|
showYGrid: n.value,
|
|
1864
|
-
showYTick:
|
|
1865
|
-
yTitle:
|
|
1866
|
-
showYTitle:
|
|
1867
|
-
yTitleFontSize:
|
|
1876
|
+
showYTick: z.value,
|
|
1877
|
+
yTitle: J.value,
|
|
1878
|
+
showYTitle: D.value,
|
|
1879
|
+
yTitleFontSize: de.value,
|
|
1868
1880
|
yTickFontSize: M.value,
|
|
1869
1881
|
isTransposed: ve.value.config.isTransposed,
|
|
1870
1882
|
showLegend: be.value,
|
|
@@ -1883,7 +1895,7 @@ const ya = {
|
|
|
1883
1895
|
colWidths: Q.value
|
|
1884
1896
|
};
|
|
1885
1897
|
}
|
|
1886
|
-
const
|
|
1898
|
+
const Dt = F(() => {
|
|
1887
1899
|
switch (ve.value.type) {
|
|
1888
1900
|
case N.Table:
|
|
1889
1901
|
return il();
|
|
@@ -1896,38 +1908,38 @@ const ya = {
|
|
|
1896
1908
|
default:
|
|
1897
1909
|
return { data: Ge.value };
|
|
1898
1910
|
}
|
|
1899
|
-
}), At =
|
|
1900
|
-
const { config:
|
|
1901
|
-
if (
|
|
1902
|
-
const ne = [...
|
|
1911
|
+
}), At = F(() => {
|
|
1912
|
+
const { config: f } = i.value.widget;
|
|
1913
|
+
if (f.rollup != null) {
|
|
1914
|
+
const ne = [...f.dimensions].filter((Le) => !Le.hide);
|
|
1903
1915
|
return ne.sort(
|
|
1904
|
-
(
|
|
1916
|
+
(Le, et) => (f.rowIds || []).indexOf(bt(Le)) - (f.rowIds || []).indexOf(bt(et))
|
|
1905
1917
|
), [
|
|
1906
|
-
{ label: Ye(
|
|
1907
|
-
{ label: Ye(
|
|
1908
|
-
...[...ne].slice(0, ne.length - 1).map((
|
|
1909
|
-
label: Ye(
|
|
1918
|
+
{ label: Ye(m, u, "None", "other"), value: "none" },
|
|
1919
|
+
{ label: Ye(m, u, "Grand Total", "other"), value: 0 },
|
|
1920
|
+
...[...ne].slice(0, ne.length - 1).map((Le, et) => ({
|
|
1921
|
+
label: Ye(m, u, Le.label, "other"),
|
|
1910
1922
|
value: et + 1
|
|
1911
1923
|
}))
|
|
1912
1924
|
];
|
|
1913
1925
|
}
|
|
1914
1926
|
return [];
|
|
1915
|
-
}), He =
|
|
1916
|
-
const { config:
|
|
1917
|
-
return
|
|
1918
|
-
label: Ye(
|
|
1919
|
-
value:
|
|
1927
|
+
}), He = F(() => {
|
|
1928
|
+
const { config: f } = ve.value;
|
|
1929
|
+
return f.isDrillable ? f.dimensions.map((ne) => ({
|
|
1930
|
+
label: Ye(m, u, ne.label, "other"),
|
|
1931
|
+
value: bt(ne)
|
|
1920
1932
|
})) : [];
|
|
1921
|
-
}), ul =
|
|
1922
|
-
const
|
|
1933
|
+
}), ul = F(() => {
|
|
1934
|
+
const f = i.value.id;
|
|
1923
1935
|
return (al.value || []).filter(
|
|
1924
|
-
(ne) => Array.isArray(ne.tileIds) && ne.tileIds.includes(
|
|
1936
|
+
(ne) => Array.isArray(ne.tileIds) && ne.tileIds.includes(f)
|
|
1925
1937
|
);
|
|
1926
1938
|
});
|
|
1927
1939
|
me(
|
|
1928
1940
|
() => i.value.widget.config,
|
|
1929
|
-
(
|
|
1930
|
-
v.value =
|
|
1941
|
+
(f) => {
|
|
1942
|
+
v.value = f.rollup, r.value = f.showTitle ?? !0, h.value = f.titleFontSize ?? 14, a.value = f.titleBold ?? !1, l.value = f.titleItalic ?? !1, w.value = f.titleUnderline ?? !1, A.value = f.chartHeight ?? void 0, $.value = f.chartWidth ?? void 0, I.value = f.showLabel ?? !1, Z.value = f.labelAlign ?? Tt.center, W.value = f.labelAnchor ?? kt.center, K.value = f.labelRotation ?? 0, re.value = f.labelOffset ?? 0, ue.value = f.labelFontSize ?? 12, E.value = f.showX ?? !0, X.value = f.xPosition ?? _t.bottom, q.value = f.showXGrid ?? !1, B.value = f.showXTick ?? !0, O.value = f.xTickFontSize ?? 12, he.value = f.showXTitle ?? !1, Fe.value = f.xTitle ?? "", Ae.value = f.xTitleFontSize ?? 12, Pe.value = f.showY ?? !0, Me.value = f.yPosition ?? Ft.left, n.value = f.showYGrid ?? !1, z.value = f.showYTick ?? !0, M.value = f.yTickFontSize ?? 12, D.value = f.showYTitle ?? !1, J.value = f.yTitle ?? "", de.value = f.yTitleFontSize ?? 12, be.value = f.showLegend ?? void 0, ge.value = f.legendPosition ?? Lt.top, oe.value = f.usePointStyle ?? !0, H.value = f.legendMaxHeight, Y.value = f.legendMaxWidth, R.value = f.rowHeight ?? 0, Q.value = f.colWidths ?? [], g.value = tt();
|
|
1931
1943
|
},
|
|
1932
1944
|
{ deep: !0 }
|
|
1933
1945
|
), me([() => v.value], () => {
|
|
@@ -1938,9 +1950,9 @@ const ya = {
|
|
|
1938
1950
|
() => zt.value,
|
|
1939
1951
|
() => Et.value,
|
|
1940
1952
|
() => ll.value,
|
|
1941
|
-
() =>
|
|
1953
|
+
() => ft.value,
|
|
1942
1954
|
() => ul.value,
|
|
1943
|
-
() =>
|
|
1955
|
+
() => ht.value
|
|
1944
1956
|
],
|
|
1945
1957
|
() => {
|
|
1946
1958
|
Wt();
|
|
@@ -1958,9 +1970,9 @@ const ya = {
|
|
|
1958
1970
|
ae.value.sm || ae.value.md || ae.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", Xe)) : removeEventListener("resize", Xe);
|
|
1959
1971
|
});
|
|
1960
1972
|
const Mt = $t();
|
|
1961
|
-
let
|
|
1973
|
+
let it;
|
|
1962
1974
|
async function Wt() {
|
|
1963
|
-
if (!
|
|
1975
|
+
if (!_.isStyleEditing) {
|
|
1964
1976
|
if (ve.value.config.schemaNames.length <= 0 && !(ve.value.config.dimensions.length <= 0 || ve.value.config.metrics.length <= 0)) {
|
|
1965
1977
|
Mt.open({
|
|
1966
1978
|
message: "schema must not be empty and dimension or metrics must have at least 1 column",
|
|
@@ -1969,78 +1981,78 @@ const ya = {
|
|
|
1969
1981
|
return;
|
|
1970
1982
|
}
|
|
1971
1983
|
try {
|
|
1972
|
-
o.value = !0,
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1975
|
-
} catch (
|
|
1976
|
-
|
|
1984
|
+
o.value = !0, it && it.abort(), it = new AbortController();
|
|
1985
|
+
const f = it.signal, ne = ht.value, Le = await xt(jt, 500)(ve.value, f, i.value.id);
|
|
1986
|
+
ht.value === ne && (Ge.value = Le, g.value = tt(), setTimeout(() => y(), 100)), o.value = !1;
|
|
1987
|
+
} catch (f) {
|
|
1988
|
+
f.code !== "ERR_CANCELED" && (Ge.value = null, Mt.open({ message: `Invalid chart ${ve.value.type}`, type: "error" }), console.log(f), o.value = !1);
|
|
1977
1989
|
}
|
|
1978
1990
|
}
|
|
1979
1991
|
}
|
|
1980
|
-
function cl(
|
|
1992
|
+
function cl(f) {
|
|
1981
1993
|
switch (i.value.widget.type) {
|
|
1982
1994
|
case "SPACER":
|
|
1983
1995
|
return;
|
|
1984
1996
|
case "SCORECARD":
|
|
1985
1997
|
return;
|
|
1986
1998
|
case "TABLE":
|
|
1987
|
-
return `${i.value.size.height * 100 + (
|
|
1999
|
+
return `${i.value.size.height * 100 + (S.value ? 72 : 0) + 96.5}px`;
|
|
1988
2000
|
}
|
|
1989
|
-
return `${Math.max(
|
|
2001
|
+
return `${Math.max(f / i.value.size.width, 90) * i.value.size.height}px`;
|
|
1990
2002
|
}
|
|
1991
2003
|
function dl() {
|
|
1992
|
-
const
|
|
1993
|
-
|
|
2004
|
+
const f = L.value - 1;
|
|
2005
|
+
f >= 0 && (b.value = He.value[f].value);
|
|
1994
2006
|
}
|
|
1995
2007
|
function pl() {
|
|
1996
|
-
const
|
|
1997
|
-
|
|
2008
|
+
const f = L.value + 1;
|
|
2009
|
+
f >= 0 && f < He.value.length && (b.value = He.value[f].value);
|
|
1998
2010
|
}
|
|
1999
|
-
const It =
|
|
2000
|
-
label: $l(
|
|
2001
|
-
value:
|
|
2011
|
+
const It = T(Ke.EXCEL), Nt = T(), ml = Object.values(Ke).map((f) => ({
|
|
2012
|
+
label: $l(f),
|
|
2013
|
+
value: f,
|
|
2002
2014
|
onClick: async () => {
|
|
2003
|
-
|
|
2004
|
-
reportType:
|
|
2005
|
-
index:
|
|
2015
|
+
f === Ke.EXCEL || f === Ke.PDFFULLSIZE || f === Ke.PDFRECEIPT ? await Gt({
|
|
2016
|
+
reportType: f,
|
|
2017
|
+
index: _.index,
|
|
2006
2018
|
isCombinedLocationLayout: sl.value,
|
|
2007
2019
|
timeRange: Et.value,
|
|
2008
2020
|
dateRange: zt.value,
|
|
2009
|
-
locationIds:
|
|
2010
|
-
}) :
|
|
2021
|
+
locationIds: ft.value
|
|
2022
|
+
}) : f === Ke.PDF && (It.value = f, Nt.value = _.index, ee.value = !0);
|
|
2011
2023
|
}
|
|
2012
2024
|
})), fl = ve.value.type === N.Spacer ? "flat" : "outlined", hl = ve.value.type === N.Spacer ? "p-0" : "p-16";
|
|
2013
|
-
return (
|
|
2014
|
-
const
|
|
2015
|
-
return P(), fe(
|
|
2025
|
+
return (f, ne) => {
|
|
2026
|
+
const Le = U("FmTooltip"), et = U("FmSearch"), vl = U("FmCheckbox"), vt = U("FmButton"), gl = U("FmSelect"), yl = U("FmMenuItem"), bl = U("FmMenu"), wl = U("FmForm"), xl = U("FmCircularProgress"), Cl = U("FmCard");
|
|
2027
|
+
return P(), fe(Cl, {
|
|
2016
2028
|
ref_key: "tileCard",
|
|
2017
|
-
ref:
|
|
2029
|
+
ref: k,
|
|
2018
2030
|
class: Ze(`${el.value} ${d(hl)}`),
|
|
2019
2031
|
variant: d(fl)
|
|
2020
2032
|
}, {
|
|
2021
|
-
default:
|
|
2022
|
-
G(
|
|
2033
|
+
default: ce(() => [
|
|
2034
|
+
G(ga, {
|
|
2023
2035
|
modelValue: ee.value,
|
|
2024
2036
|
"onUpdate:modelValue": ne[0] || (ne[0] = (je) => ee.value = je),
|
|
2025
2037
|
"report-type": It.value,
|
|
2026
2038
|
index: Nt.value
|
|
2027
2039
|
}, null, 8, ["modelValue", "report-type", "index"]),
|
|
2028
|
-
!o.value && !d(
|
|
2040
|
+
!o.value && !d(Vt) ? (P(), se("div", {
|
|
2029
2041
|
key: 0,
|
|
2030
|
-
style:
|
|
2042
|
+
style: Ve({ height: we.value })
|
|
2031
2043
|
}, [
|
|
2032
2044
|
(P(), fe(Tl(tl.value), {
|
|
2033
|
-
key:
|
|
2034
|
-
modelValue:
|
|
2035
|
-
"onUpdate:modelValue": ne[4] || (ne[4] = (je) =>
|
|
2036
|
-
"tile-index":
|
|
2045
|
+
key: g.value,
|
|
2046
|
+
modelValue: Dt.value,
|
|
2047
|
+
"onUpdate:modelValue": ne[4] || (ne[4] = (je) => Dt.value = je),
|
|
2048
|
+
"tile-index": _.index
|
|
2037
2049
|
}, {
|
|
2038
|
-
menu:
|
|
2050
|
+
menu: ce(() => [
|
|
2039
2051
|
G(wl, { class: "flex items-center gap-2" }, {
|
|
2040
|
-
default:
|
|
2052
|
+
default: ce(() => {
|
|
2041
2053
|
var je, Pt, Bt, Ht;
|
|
2042
2054
|
return [
|
|
2043
|
-
G(
|
|
2055
|
+
G(Le, {
|
|
2044
2056
|
variant: "plain",
|
|
2045
2057
|
placement: "right",
|
|
2046
2058
|
content: ve.value.description,
|
|
@@ -2048,73 +2060,73 @@ const ya = {
|
|
|
2048
2060
|
disabled: !ve.value.description,
|
|
2049
2061
|
"z-index": 99
|
|
2050
2062
|
}, {
|
|
2051
|
-
default:
|
|
2063
|
+
default: ce(() => [
|
|
2052
2064
|
r.value !== !1 ? (P(), se("p", {
|
|
2053
2065
|
key: 0,
|
|
2054
|
-
style:
|
|
2055
|
-
fontSize:
|
|
2066
|
+
style: Ve({
|
|
2067
|
+
fontSize: h.value + "px",
|
|
2056
2068
|
fontWeight: a.value ? "bold" : "normal",
|
|
2057
2069
|
fontStyle: l.value ? "italic" : "normal",
|
|
2058
|
-
textDecoration:
|
|
2070
|
+
textDecoration: w.value ? "underline" : "none"
|
|
2059
2071
|
}),
|
|
2060
2072
|
class: Ze(["text-fm-color-typo-secondary line-clamp-1", [
|
|
2061
|
-
|
|
2073
|
+
h.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
2062
2074
|
ve.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
2063
2075
|
]])
|
|
2064
|
-
},
|
|
2076
|
+
}, ke(d(Ye)(d(m), d(u), ve.value.title, "other")), 7)) : Te("", !0)
|
|
2065
2077
|
]),
|
|
2066
2078
|
_: 1
|
|
2067
2079
|
}, 8, ["content", "disabled"]),
|
|
2068
|
-
(je =
|
|
2080
|
+
(je = rt.value) != null && je.showSearchBar ? (P(), fe(et, {
|
|
2069
2081
|
key: 0,
|
|
2070
2082
|
modelValue: pe.value,
|
|
2071
|
-
"onUpdate:modelValue": ne[1] || (ne[1] = (
|
|
2083
|
+
"onUpdate:modelValue": ne[1] || (ne[1] = (Re) => pe.value = Re),
|
|
2072
2084
|
class: "grow"
|
|
2073
|
-
}, null, 8, ["modelValue"])) : (P(), se("div",
|
|
2085
|
+
}, null, 8, ["modelValue"])) : (P(), se("div", ba)),
|
|
2074
2086
|
_l(G(vl, {
|
|
2075
2087
|
modelValue: I.value,
|
|
2076
|
-
"onUpdate:modelValue": ne[2] || (ne[2] = (
|
|
2088
|
+
"onUpdate:modelValue": ne[2] || (ne[2] = (Re) => I.value = Re),
|
|
2077
2089
|
label: "Label",
|
|
2078
2090
|
value: !1
|
|
2079
2091
|
}, null, 8, ["modelValue"]), [
|
|
2080
|
-
[Fl, (Pt =
|
|
2092
|
+
[Fl, (Pt = rt.value) == null ? void 0 : Pt.showLabel]
|
|
2081
2093
|
]),
|
|
2082
|
-
(Bt =
|
|
2083
|
-
G(
|
|
2094
|
+
(Bt = rt.value) != null && Bt.showDrillDimension && He.value.length > 0 ? (P(), se("div", wa, [
|
|
2095
|
+
G(vt, {
|
|
2084
2096
|
icon: "arrow_upward",
|
|
2085
2097
|
variant: "tertiary",
|
|
2086
2098
|
disabled: !c.value,
|
|
2087
2099
|
onClick: dl
|
|
2088
2100
|
}, null, 8, ["disabled"]),
|
|
2089
|
-
G(
|
|
2101
|
+
G(vt, {
|
|
2090
2102
|
icon: "arrow_downward",
|
|
2091
2103
|
variant: "tertiary",
|
|
2092
2104
|
disabled: !t.value,
|
|
2093
2105
|
onClick: pl
|
|
2094
2106
|
}, null, 8, ["disabled"])
|
|
2095
|
-
])) :
|
|
2096
|
-
(Ht =
|
|
2097
|
-
key: `rollup-${d(
|
|
2107
|
+
])) : Te("", !0),
|
|
2108
|
+
(Ht = rt.value) != null && Ht.showRollup && At.value.length > 0 ? (P(), fe(gl, {
|
|
2109
|
+
key: `rollup-${d(C)}`,
|
|
2098
2110
|
modelValue: v.value,
|
|
2099
|
-
"onUpdate:modelValue": ne[3] || (ne[3] = (
|
|
2111
|
+
"onUpdate:modelValue": ne[3] || (ne[3] = (Re) => v.value = Re),
|
|
2100
2112
|
class: "w-[150px]",
|
|
2101
2113
|
items: At.value
|
|
2102
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
2103
|
-
|
|
2114
|
+
}, null, 8, ["modelValue", "items"])) : Te("", !0),
|
|
2115
|
+
_.hideExport ? Te("", !0) : (P(), fe(bl, {
|
|
2104
2116
|
key: 4,
|
|
2105
2117
|
shift: !0
|
|
2106
2118
|
}, {
|
|
2107
|
-
"menu-button":
|
|
2108
|
-
G(
|
|
2119
|
+
"menu-button": ce(() => [
|
|
2120
|
+
G(vt, {
|
|
2109
2121
|
icon: "more_vert",
|
|
2110
2122
|
variant: "tertiary"
|
|
2111
2123
|
})
|
|
2112
2124
|
]),
|
|
2113
|
-
default:
|
|
2114
|
-
(P(!0), se(xe, null,
|
|
2115
|
-
key:
|
|
2116
|
-
label:
|
|
2117
|
-
onClick:
|
|
2125
|
+
default: ce(() => [
|
|
2126
|
+
(P(!0), se(xe, null, dt(d(ml), (Re) => (P(), fe(yl, {
|
|
2127
|
+
key: Re.value,
|
|
2128
|
+
label: Re.label,
|
|
2129
|
+
onClick: Re.onClick
|
|
2118
2130
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
2119
2131
|
]),
|
|
2120
2132
|
_: 1
|
|
@@ -2134,22 +2146,22 @@ const ya = {
|
|
|
2134
2146
|
}
|
|
2135
2147
|
});
|
|
2136
2148
|
var Ue = /* @__PURE__ */ ((e) => (e.Select = "Select", e.TextField = "TextField", e.Timestamp = "Timestamp", e))(Ue || {});
|
|
2137
|
-
function
|
|
2149
|
+
function xa(e) {
|
|
2138
2150
|
let o = !1, i = 1;
|
|
2139
2151
|
switch (e) {
|
|
2140
|
-
case
|
|
2141
|
-
case
|
|
2142
|
-
case
|
|
2143
|
-
case
|
|
2152
|
+
case Se.Equal:
|
|
2153
|
+
case Se.NotEqual:
|
|
2154
|
+
case Se.Like:
|
|
2155
|
+
case Se.NotLike:
|
|
2144
2156
|
o = !1, i = 1;
|
|
2145
2157
|
break;
|
|
2146
|
-
case
|
|
2147
|
-
case
|
|
2148
|
-
case
|
|
2149
|
-
case
|
|
2158
|
+
case Se.GreaterThan:
|
|
2159
|
+
case Se.GreaterThanOrEqual:
|
|
2160
|
+
case Se.LessThan:
|
|
2161
|
+
case Se.LessThanOrEqual:
|
|
2150
2162
|
o = !0, i = 1;
|
|
2151
2163
|
break;
|
|
2152
|
-
case
|
|
2164
|
+
case Se.Between:
|
|
2153
2165
|
o = !0, i = 2;
|
|
2154
2166
|
break;
|
|
2155
2167
|
}
|
|
@@ -2158,34 +2170,34 @@ function wa(e) {
|
|
|
2158
2170
|
count: i
|
|
2159
2171
|
};
|
|
2160
2172
|
}
|
|
2161
|
-
function
|
|
2173
|
+
function ja({
|
|
2162
2174
|
operator: e,
|
|
2163
2175
|
dimensionOption: o,
|
|
2164
2176
|
dataType: i,
|
|
2165
2177
|
t: s
|
|
2166
2178
|
}) {
|
|
2167
|
-
const { fixed:
|
|
2179
|
+
const { fixed: m, count: u } = xa(e);
|
|
2168
2180
|
switch (i) {
|
|
2169
|
-
case
|
|
2181
|
+
case $e.String:
|
|
2170
2182
|
return {
|
|
2171
2183
|
type: "TextField",
|
|
2172
|
-
fixed:
|
|
2184
|
+
fixed: m,
|
|
2173
2185
|
count: u,
|
|
2174
2186
|
dataType: void 0,
|
|
2175
2187
|
default: ""
|
|
2176
2188
|
};
|
|
2177
|
-
case
|
|
2189
|
+
case $e.Numeric:
|
|
2178
2190
|
return {
|
|
2179
2191
|
type: "TextField",
|
|
2180
|
-
fixed:
|
|
2192
|
+
fixed: m,
|
|
2181
2193
|
count: u,
|
|
2182
2194
|
dataType: "number",
|
|
2183
2195
|
default: 0
|
|
2184
2196
|
};
|
|
2185
|
-
case
|
|
2197
|
+
case $e.Bool:
|
|
2186
2198
|
return {
|
|
2187
2199
|
type: "Select",
|
|
2188
|
-
fixed:
|
|
2200
|
+
fixed: m,
|
|
2189
2201
|
count: u,
|
|
2190
2202
|
options: [
|
|
2191
2203
|
{ label: s("report.common.yes"), value: !0 },
|
|
@@ -2193,23 +2205,23 @@ function Ga({
|
|
|
2193
2205
|
],
|
|
2194
2206
|
default: !0
|
|
2195
2207
|
};
|
|
2196
|
-
case
|
|
2208
|
+
case $e.Timestamp:
|
|
2197
2209
|
return Qt({
|
|
2198
2210
|
dimensionOption: o,
|
|
2199
|
-
fixed:
|
|
2211
|
+
fixed: m,
|
|
2200
2212
|
count: u,
|
|
2201
2213
|
t: s
|
|
2202
2214
|
});
|
|
2203
2215
|
}
|
|
2204
2216
|
return {
|
|
2205
2217
|
type: "TextField",
|
|
2206
|
-
fixed:
|
|
2218
|
+
fixed: m,
|
|
2207
2219
|
count: u,
|
|
2208
2220
|
dataType: void 0,
|
|
2209
2221
|
default: ""
|
|
2210
2222
|
};
|
|
2211
2223
|
}
|
|
2212
|
-
function
|
|
2224
|
+
function Ka(e) {
|
|
2213
2225
|
switch (e) {
|
|
2214
2226
|
case ye.HourOfDay:
|
|
2215
2227
|
return 0;
|
|
@@ -2219,7 +2231,7 @@ function ja(e) {
|
|
|
2219
2231
|
return;
|
|
2220
2232
|
}
|
|
2221
2233
|
}
|
|
2222
|
-
function
|
|
2234
|
+
function Ja(e) {
|
|
2223
2235
|
switch (e) {
|
|
2224
2236
|
case ye.HourOfDay:
|
|
2225
2237
|
return 23;
|
|
@@ -2241,7 +2253,7 @@ function Qt({
|
|
|
2241
2253
|
type: Ue.Select,
|
|
2242
2254
|
fixed: o,
|
|
2243
2255
|
count: i,
|
|
2244
|
-
options: Array.from({ length: 24 }, (
|
|
2256
|
+
options: Array.from({ length: 24 }, (m, u) => ({
|
|
2245
2257
|
label: u.toString().padStart(2, "0"),
|
|
2246
2258
|
value: u.toString()
|
|
2247
2259
|
})),
|
|
@@ -2268,7 +2280,7 @@ function Qt({
|
|
|
2268
2280
|
type: Ue.Select,
|
|
2269
2281
|
fixed: o,
|
|
2270
2282
|
count: i,
|
|
2271
|
-
options: Array.from({ length: 31 }, (
|
|
2283
|
+
options: Array.from({ length: 31 }, (m, u) => ({
|
|
2272
2284
|
label: (u + 1).toString(),
|
|
2273
2285
|
value: (u + 1).toString()
|
|
2274
2286
|
})),
|
|
@@ -2316,7 +2328,7 @@ function Yt({
|
|
|
2316
2328
|
});
|
|
2317
2329
|
return i.type !== Ue.Select ? [] : [{ label: o("report.input.unknown"), value: "" }, ...i.options];
|
|
2318
2330
|
}
|
|
2319
|
-
const
|
|
2331
|
+
const Ca = "mf-reportglobalFilter";
|
|
2320
2332
|
function Ut(e, o) {
|
|
2321
2333
|
var i;
|
|
2322
2334
|
return [
|
|
@@ -2329,64 +2341,64 @@ function Ut(e, o) {
|
|
|
2329
2341
|
((i = e.tileIds) == null ? void 0 : i.join(",")) ?? ""
|
|
2330
2342
|
].join("|");
|
|
2331
2343
|
}
|
|
2332
|
-
const Sa = Kt(
|
|
2333
|
-
const e =
|
|
2344
|
+
const Sa = Kt(Ca, () => {
|
|
2345
|
+
const e = T({}), o = T(!1), i = T(null), s = () => ({
|
|
2334
2346
|
search: "",
|
|
2335
2347
|
selectedValues: [],
|
|
2336
2348
|
keepSelection: !1,
|
|
2337
2349
|
showAdvanced: !1,
|
|
2338
2350
|
visibleCount: 50
|
|
2339
2351
|
});
|
|
2340
|
-
function
|
|
2341
|
-
const
|
|
2342
|
-
return e.value[
|
|
2352
|
+
function m(y, v) {
|
|
2353
|
+
const g = Ut(y, v);
|
|
2354
|
+
return e.value[g] || (e.value[g] = s()), e.value[g];
|
|
2343
2355
|
}
|
|
2344
|
-
const u =
|
|
2345
|
-
function
|
|
2346
|
-
|
|
2356
|
+
const u = F(() => e.value), C = (y) => i.value === y;
|
|
2357
|
+
function _(y, v, g, b) {
|
|
2358
|
+
m(y, v)[g] = b;
|
|
2347
2359
|
}
|
|
2348
|
-
function
|
|
2349
|
-
|
|
2360
|
+
function k(y, v, g = 50) {
|
|
2361
|
+
m(y, v).visibleCount += g;
|
|
2350
2362
|
}
|
|
2351
|
-
function
|
|
2363
|
+
function V(y) {
|
|
2352
2364
|
o.value = y;
|
|
2353
2365
|
}
|
|
2354
|
-
function
|
|
2366
|
+
function p(y) {
|
|
2355
2367
|
i.value = y;
|
|
2356
2368
|
}
|
|
2357
|
-
function
|
|
2369
|
+
function x() {
|
|
2358
2370
|
i.value = null;
|
|
2359
2371
|
}
|
|
2360
2372
|
return {
|
|
2361
2373
|
allStates: u,
|
|
2362
2374
|
includeUnavailable: o,
|
|
2363
2375
|
openMenuKey: i,
|
|
2364
|
-
getGlobalFilter:
|
|
2365
|
-
isMenuOpen:
|
|
2366
|
-
setGlobalFilter:
|
|
2367
|
-
showMore:
|
|
2368
|
-
setIncludeUnavailable:
|
|
2369
|
-
openMenu:
|
|
2370
|
-
closeMenu:
|
|
2376
|
+
getGlobalFilter: m,
|
|
2377
|
+
isMenuOpen: C,
|
|
2378
|
+
setGlobalFilter: _,
|
|
2379
|
+
showMore: k,
|
|
2380
|
+
setIncludeUnavailable: V,
|
|
2381
|
+
openMenu: p,
|
|
2382
|
+
closeMenu: x,
|
|
2371
2383
|
getKey: Ut
|
|
2372
2384
|
};
|
|
2373
|
-
}),
|
|
2385
|
+
}), ka = { class: "flex flex-row flex-wrap gap-2" }, Ta = { class: "inline-flex max-w-[460px]" }, _a = {
|
|
2374
2386
|
key: 0,
|
|
2375
2387
|
class: "flex justify-center my-2"
|
|
2376
|
-
},
|
|
2388
|
+
}, Fa = { class: "px-2 pb-8" }, La = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, Ra = { class: "px-2 pb-8" }, $a = { class: "flex items-start w-full" }, za = ["onClick"], Ea = { class: "fm-typo-en-body-md-400" }, Va = { key: 0 }, Da = { class: "px-12 py-3" }, Aa = { class: "flex items-center justify-between" }, Ma = { class: "text-xs max-w-[200px]" }, Wa = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Za = /* @__PURE__ */ _e({
|
|
2377
2389
|
__name: "FilterSelector",
|
|
2378
2390
|
setup(e) {
|
|
2379
|
-
const { t: o, locale: i } = nt(), { currentReport: s, editingTile:
|
|
2380
|
-
let { globalFilters: u, isGlobalFiltersLoading:
|
|
2381
|
-
const t =
|
|
2391
|
+
const { t: o, locale: i } = nt(), { currentReport: s, editingTile: m } = ze(zl());
|
|
2392
|
+
let { globalFilters: u, isGlobalFiltersLoading: C, timeRange: _, dateRange: k, selectedLocationIds: V, timezone: p } = ze(lt()), { schemas: x } = ze(El()), { showMore: y, getGlobalFilter: v, setGlobalFilter: g, setIncludeUnavailable: b, getKey: L, isMenuOpen: c } = Sa();
|
|
2393
|
+
const t = F(() => o("report.input.unknown"));
|
|
2382
2394
|
let r = null;
|
|
2383
|
-
const
|
|
2395
|
+
const h = T(!1), a = F(() => {
|
|
2384
2396
|
var n;
|
|
2385
2397
|
return ((n = s.value) == null ? void 0 : n.id) ?? "";
|
|
2386
|
-
}), l =
|
|
2387
|
-
function
|
|
2398
|
+
}), l = T([]);
|
|
2399
|
+
function w(n) {
|
|
2388
2400
|
const M = v(n.filter, a.value).selectedValues;
|
|
2389
|
-
n.selectedValues = n.keepSelection ? M : n.options.map((
|
|
2401
|
+
n.selectedValues = n.keepSelection ? M : n.options.map((D) => D.value), n.filter.values = [...n.selectedValues], g(n.filter, a.value, "selectedValues", n.selectedValues);
|
|
2390
2402
|
}
|
|
2391
2403
|
me(
|
|
2392
2404
|
() => ({
|
|
@@ -2394,15 +2406,15 @@ const Sa = Kt(xa, () => {
|
|
|
2394
2406
|
globalFilters: u.value
|
|
2395
2407
|
}),
|
|
2396
2408
|
() => {
|
|
2397
|
-
l.value = (u.value || []).map((n,
|
|
2398
|
-
const M = v(n, a.value),
|
|
2409
|
+
l.value = (u.value || []).map((n, z) => {
|
|
2410
|
+
const M = v(n, a.value), D = M.selectedValues.length ? [...M.selectedValues] : [...n.values ?? []];
|
|
2399
2411
|
return {
|
|
2400
|
-
id: `${
|
|
2412
|
+
id: `${L(n, a.value)}|${z}`,
|
|
2401
2413
|
filter: n,
|
|
2402
2414
|
search: M.search,
|
|
2403
2415
|
options: [],
|
|
2404
2416
|
type: $(n),
|
|
2405
|
-
selectedValues:
|
|
2417
|
+
selectedValues: D,
|
|
2406
2418
|
visibleCount: M.visibleCount,
|
|
2407
2419
|
keepSelection: M.keepSelection,
|
|
2408
2420
|
showAdvanced: M.showAdvanced
|
|
@@ -2411,13 +2423,13 @@ const Sa = Kt(xa, () => {
|
|
|
2411
2423
|
},
|
|
2412
2424
|
{ immediate: !0 }
|
|
2413
2425
|
), me(
|
|
2414
|
-
[
|
|
2426
|
+
[_, k, V],
|
|
2415
2427
|
async () => {
|
|
2416
2428
|
await ue();
|
|
2417
2429
|
},
|
|
2418
2430
|
{ deep: !0, immediate: !0 }
|
|
2419
2431
|
), me(
|
|
2420
|
-
[() =>
|
|
2432
|
+
[() => m.value],
|
|
2421
2433
|
async () => {
|
|
2422
2434
|
l.value.forEach((n) => {
|
|
2423
2435
|
n.options = [];
|
|
@@ -2432,57 +2444,57 @@ const Sa = Kt(xa, () => {
|
|
|
2432
2444
|
);
|
|
2433
2445
|
function $(n) {
|
|
2434
2446
|
var M;
|
|
2435
|
-
const
|
|
2436
|
-
return
|
|
2447
|
+
const z = (M = x.value.find((D) => D.name === n.schemaName)) == null ? void 0 : M.fields.find((D) => D.name === n.name);
|
|
2448
|
+
return z == null ? void 0 : z.type;
|
|
2437
2449
|
}
|
|
2438
2450
|
function A(n) {
|
|
2439
2451
|
var ge;
|
|
2440
|
-
if (!s.value && !
|
|
2441
|
-
const
|
|
2452
|
+
if (!s.value && !m.value) return [];
|
|
2453
|
+
const z = m.value ? [m.value] : [...((ge = s.value) == null ? void 0 : ge.tiles) ?? []], { name: M = "", schemaName: D = "" } = n, J = z.filter((oe) => {
|
|
2442
2454
|
var ee, pe;
|
|
2443
2455
|
const H = (ee = oe == null ? void 0 : oe.widget) == null ? void 0 : ee.config;
|
|
2444
2456
|
if (!H || (pe = n.tileIds) != null && pe.length && !n.tileIds.includes(oe.id)) return !1;
|
|
2445
2457
|
const Y = (H.dimensions ?? []).some(
|
|
2446
|
-
(ae) => ae.schemaName ===
|
|
2458
|
+
(ae) => ae.schemaName === D && ae.name === M
|
|
2447
2459
|
), R = (H.joinDatasources ?? []).some(
|
|
2448
|
-
(ae) => (ae.dimensions ?? []).some((te) => te.schemaName ===
|
|
2449
|
-
), Q = (H.schemaNames ?? []).includes(
|
|
2460
|
+
(ae) => (ae.dimensions ?? []).some((te) => te.schemaName === D && te.name === M)
|
|
2461
|
+
), Q = (H.schemaNames ?? []).includes(D);
|
|
2450
2462
|
return Y || R || Q;
|
|
2451
2463
|
});
|
|
2452
|
-
if (!
|
|
2453
|
-
const
|
|
2464
|
+
if (!J.length) return [];
|
|
2465
|
+
const de = (oe, H) => {
|
|
2454
2466
|
const Y = /* @__PURE__ */ new Map(), R = (Q) => {
|
|
2455
2467
|
const ee = `${Q.schemaName}:${Q.name}:${Q.operator}:${Q.option ?? ""}:${Q.dataFormula ?? ""}`, pe = Y.get(ee);
|
|
2456
|
-
pe ? [
|
|
2468
|
+
pe ? [Se.Like, Se.NotLike].includes(Q.operator) ? pe.values = Array.from(/* @__PURE__ */ new Set([...pe.values ?? [], ...Q.values ?? []])) : Y.set(ee, { ...Q }) : Y.set(ee, { ...Q });
|
|
2457
2469
|
};
|
|
2458
2470
|
return oe.forEach(R), H.forEach(R), Array.from(Y.values());
|
|
2459
2471
|
}, be = (oe) => {
|
|
2460
2472
|
var Y;
|
|
2461
2473
|
const H = (Y = oe.dimensions) == null ? void 0 : Y.find(
|
|
2462
|
-
(R) => R.schemaName ===
|
|
2474
|
+
(R) => R.schemaName === D && R.name === M
|
|
2463
2475
|
);
|
|
2464
2476
|
return {
|
|
2465
2477
|
name: M,
|
|
2466
|
-
schemaName:
|
|
2478
|
+
schemaName: D,
|
|
2467
2479
|
label: (H == null ? void 0 : H.label) ?? M,
|
|
2468
2480
|
hide: !1,
|
|
2469
2481
|
option: n.option ?? null,
|
|
2470
2482
|
dataFormula: H == null ? void 0 : H.dataFormula
|
|
2471
2483
|
};
|
|
2472
2484
|
};
|
|
2473
|
-
return
|
|
2485
|
+
return J.map((oe) => {
|
|
2474
2486
|
var ae, te;
|
|
2475
2487
|
const H = (ae = oe == null ? void 0 : oe.widget) == null ? void 0 : ae.config;
|
|
2476
2488
|
if (!H) return null;
|
|
2477
|
-
const Y = be(H), R = (H.dimensions ?? []).some((we) => we.schemaName ===
|
|
2489
|
+
const Y = be(H), R = (H.dimensions ?? []).some((we) => we.schemaName === D) || (H.schemaNames ?? []).includes(D), Q = de(
|
|
2478
2490
|
H.filters ?? [],
|
|
2479
2491
|
(n.filters ?? []).filter((we) => {
|
|
2480
2492
|
var le;
|
|
2481
2493
|
return (le = H.schemaNames) == null ? void 0 : le.includes(we.schemaName);
|
|
2482
2494
|
})
|
|
2483
2495
|
), ee = (te = H.joinDatasources) == null ? void 0 : te.find(
|
|
2484
|
-
(we) => (we.schemaNames ?? []).includes(
|
|
2485
|
-
), pe =
|
|
2496
|
+
(we) => (we.schemaNames ?? []).includes(D) || (we.dimensions ?? []).some((le) => le.schemaName === D)
|
|
2497
|
+
), pe = de(
|
|
2486
2498
|
(ee == null ? void 0 : ee.filters) ?? [],
|
|
2487
2499
|
(n.filters ?? []).filter((we) => {
|
|
2488
2500
|
var le;
|
|
@@ -2497,7 +2509,7 @@ const Sa = Kt(xa, () => {
|
|
|
2497
2509
|
schemas: H.schemas,
|
|
2498
2510
|
dimensions: R ? [Y] : [],
|
|
2499
2511
|
filters: Q,
|
|
2500
|
-
sorts: R ? [{ name: M, schemaName:
|
|
2512
|
+
sorts: R ? [{ name: M, schemaName: D, type: qe.Asc, aggregation: null, dimensionOption: null }] : [],
|
|
2501
2513
|
joinDatasources: !R && ee ? [
|
|
2502
2514
|
{
|
|
2503
2515
|
...ee,
|
|
@@ -2505,7 +2517,7 @@ const Sa = Kt(xa, () => {
|
|
|
2505
2517
|
sorts: [
|
|
2506
2518
|
{
|
|
2507
2519
|
name: M,
|
|
2508
|
-
schemaName:
|
|
2520
|
+
schemaName: D,
|
|
2509
2521
|
type: qe.Asc,
|
|
2510
2522
|
aggregation: null,
|
|
2511
2523
|
dimensionOption: null
|
|
@@ -2530,133 +2542,133 @@ const Sa = Kt(xa, () => {
|
|
|
2530
2542
|
}).filter(Boolean);
|
|
2531
2543
|
}
|
|
2532
2544
|
function I(n) {
|
|
2533
|
-
return n.options.every((
|
|
2545
|
+
return n.options.every((z) => {
|
|
2534
2546
|
var M;
|
|
2535
|
-
return (M = n.selectedValues) == null ? void 0 : M.includes(
|
|
2547
|
+
return (M = n.selectedValues) == null ? void 0 : M.includes(z.value);
|
|
2536
2548
|
});
|
|
2537
2549
|
}
|
|
2538
2550
|
function Z(n) {
|
|
2539
|
-
I(n) ? n.selectedValues = ["(EMPTY)"] : n.selectedValues = n.options.map((
|
|
2551
|
+
I(n) ? n.selectedValues = ["(EMPTY)"] : n.selectedValues = n.options.map((z) => z.value);
|
|
2540
2552
|
}
|
|
2541
|
-
const W =
|
|
2553
|
+
const W = F(
|
|
2542
2554
|
() => l.value.map((n) => {
|
|
2543
|
-
const
|
|
2544
|
-
return
|
|
2545
|
-
(
|
|
2555
|
+
const z = n.options, M = n.search.toLowerCase() ?? "";
|
|
2556
|
+
return z.filter(
|
|
2557
|
+
(J) => J.label.toLowerCase().includes(M.toLowerCase())
|
|
2546
2558
|
).slice(0, n.visibleCount);
|
|
2547
2559
|
})
|
|
2548
2560
|
);
|
|
2549
|
-
function
|
|
2561
|
+
function K(n) {
|
|
2550
2562
|
n.visibleCount += 50, y(n.filter, a.value, 50);
|
|
2551
2563
|
}
|
|
2552
|
-
async function re(n,
|
|
2564
|
+
async function re(n, z) {
|
|
2553
2565
|
var M;
|
|
2554
2566
|
if (!(!n.type && (n.type = $(n.filter), !n.type)))
|
|
2555
2567
|
switch (n.type) {
|
|
2556
|
-
case
|
|
2568
|
+
case $e.String:
|
|
2557
2569
|
try {
|
|
2558
|
-
const
|
|
2559
|
-
if (!
|
|
2570
|
+
const D = A(n.filter);
|
|
2571
|
+
if (!D.length) {
|
|
2560
2572
|
n.options = [];
|
|
2561
2573
|
return;
|
|
2562
2574
|
}
|
|
2563
|
-
const
|
|
2564
|
-
for (const H of
|
|
2565
|
-
const Y = await jt(H,
|
|
2566
|
-
(Y == null ? void 0 : Y.type) === N.Table &&
|
|
2575
|
+
const J = [];
|
|
2576
|
+
for (const H of D) {
|
|
2577
|
+
const Y = await jt(H, z);
|
|
2578
|
+
(Y == null ? void 0 : Y.type) === N.Table && J.push(...Y.rows.map((R) => {
|
|
2567
2579
|
var Q;
|
|
2568
2580
|
return ((Q = R.cells) == null ? void 0 : Q[0]) ?? " ";
|
|
2569
2581
|
}));
|
|
2570
2582
|
}
|
|
2571
|
-
const
|
|
2583
|
+
const de = Array.from(new Set(J)), be = (M = v(n.filter, a.value).selectedValues) != null && M.length ? v(n.filter, a.value).selectedValues : n.selectedValues || [], ge = n.keepSelection ? Array.from(/* @__PURE__ */ new Set([...de, ...be])) : de, oe = new Set(J);
|
|
2572
2584
|
n.options = ge.map((H) => ({
|
|
2573
2585
|
label: String(H).trim() === "" ? t.value : String(H),
|
|
2574
2586
|
value: H,
|
|
2575
|
-
available: n.keepSelection ? oe.has(H) : new Set(
|
|
2576
|
-
})),
|
|
2577
|
-
} catch (
|
|
2578
|
-
if ((
|
|
2587
|
+
available: n.keepSelection ? oe.has(H) : new Set(de).has(H)
|
|
2588
|
+
})), w(n);
|
|
2589
|
+
} catch (D) {
|
|
2590
|
+
if ((D == null ? void 0 : D.code) === "ERR_CANCELED" || (D == null ? void 0 : D.name) === "CanceledError")
|
|
2579
2591
|
return;
|
|
2580
|
-
throw
|
|
2592
|
+
throw D;
|
|
2581
2593
|
}
|
|
2582
2594
|
break;
|
|
2583
|
-
case
|
|
2595
|
+
case $e.Bool: {
|
|
2584
2596
|
n.options = [
|
|
2585
2597
|
{ label: o("report.common.yes"), value: !0 },
|
|
2586
2598
|
{ label: o("report.common.no"), value: !1 }
|
|
2587
|
-
],
|
|
2599
|
+
], w(n);
|
|
2588
2600
|
break;
|
|
2589
2601
|
}
|
|
2590
|
-
case
|
|
2602
|
+
case $e.Timestamp:
|
|
2591
2603
|
if (n.filter.option !== ye.DateTime && n.filter.option !== ye.TimeOfDay) {
|
|
2592
|
-
const
|
|
2593
|
-
n.options = Yt({ dimensionOption:
|
|
2604
|
+
const D = n.filter.option;
|
|
2605
|
+
n.options = Yt({ dimensionOption: D, t: o }), n.filter.values = n.options.length ? n.options.map((J) => J.value) : ["NULL"];
|
|
2594
2606
|
}
|
|
2595
|
-
|
|
2607
|
+
w(n);
|
|
2596
2608
|
break;
|
|
2597
|
-
case
|
|
2609
|
+
case $e.Numeric:
|
|
2598
2610
|
break;
|
|
2599
2611
|
}
|
|
2600
2612
|
}
|
|
2601
2613
|
async function ue(n = !1) {
|
|
2602
2614
|
if (!a.value || !l.value.length) return;
|
|
2603
2615
|
r == null || r.abort();
|
|
2604
|
-
const
|
|
2605
|
-
r =
|
|
2616
|
+
const z = new AbortController();
|
|
2617
|
+
r = z;
|
|
2606
2618
|
try {
|
|
2607
|
-
n || (
|
|
2608
|
-
l.value.map((M) => re(M,
|
|
2619
|
+
n || (C.value = !0), h.value = !0, await Promise.all(
|
|
2620
|
+
l.value.map((M) => re(M, z.signal))
|
|
2609
2621
|
);
|
|
2610
2622
|
} finally {
|
|
2611
|
-
r ===
|
|
2623
|
+
r === z && (n || (C.value = !1), h.value = !1);
|
|
2612
2624
|
}
|
|
2613
2625
|
}
|
|
2614
|
-
function
|
|
2615
|
-
var
|
|
2616
|
-
if ((
|
|
2617
|
-
let
|
|
2618
|
-
n.selectedValues =
|
|
2626
|
+
function S(n, z) {
|
|
2627
|
+
var D;
|
|
2628
|
+
if ((D = n.selectedValues) == null ? void 0 : D.includes(z)) {
|
|
2629
|
+
let J = (n.selectedValues || []).filter((de) => de !== z && de !== "(EMPTY)");
|
|
2630
|
+
n.selectedValues = J.length > 0 ? J : ["(EMPTY)"];
|
|
2619
2631
|
} else
|
|
2620
|
-
n.selectedValues = [...(n.selectedValues || []).filter((
|
|
2621
|
-
|
|
2632
|
+
n.selectedValues = [...(n.selectedValues || []).filter((J) => J !== "(EMPTY)"), z];
|
|
2633
|
+
g(n.filter, a.value, "selectedValues", n.selectedValues);
|
|
2622
2634
|
}
|
|
2623
|
-
function
|
|
2624
|
-
if (
|
|
2635
|
+
function E(n, z) {
|
|
2636
|
+
if (z === null)
|
|
2625
2637
|
n.values = [];
|
|
2626
2638
|
else {
|
|
2627
|
-
const
|
|
2628
|
-
n.values = [
|
|
2639
|
+
const D = Je(z.startDate).tz(p.value).startOf("day").utc().toISOString(), J = Je(z.endDate).tz(p.value).endOf("day").utc().toISOString();
|
|
2640
|
+
n.values = [D, J];
|
|
2629
2641
|
}
|
|
2630
|
-
const M = l.value.find((
|
|
2631
|
-
M && (M.keepSelection =
|
|
2642
|
+
const M = l.value.find((D) => D.filter === n);
|
|
2643
|
+
M && (M.keepSelection = z !== null, g(M.filter, a.value, "keepSelection", M.keepSelection));
|
|
2632
2644
|
}
|
|
2633
2645
|
function X(n) {
|
|
2634
|
-
const
|
|
2635
|
-
return `${o("report.section.filter.selectAll")} (${
|
|
2646
|
+
const z = (n.selectedValues || []).filter((M) => M !== "(EMPTY)");
|
|
2647
|
+
return `${o("report.section.filter.selectAll")} (${z.length}/${n.options.length})`;
|
|
2636
2648
|
}
|
|
2637
2649
|
function q(n) {
|
|
2638
|
-
const
|
|
2639
|
-
return `${M} (${
|
|
2650
|
+
const z = n.options.length, M = o("report.section.filter.search"), D = o("report.common.results", { count: z });
|
|
2651
|
+
return `${M} (${D})`;
|
|
2640
2652
|
}
|
|
2641
2653
|
function B(n) {
|
|
2642
|
-
var
|
|
2643
|
-
const
|
|
2644
|
-
if (n.type ===
|
|
2645
|
-
const Y = ((
|
|
2654
|
+
var de, be, ge, oe, H;
|
|
2655
|
+
const z = Dl(n.filter);
|
|
2656
|
+
if (n.type === $e.Timestamp) {
|
|
2657
|
+
const Y = ((de = n.filter.values) == null ? void 0 : de.length) === 2;
|
|
2646
2658
|
if (n.filter.option === ye.DateTime)
|
|
2647
|
-
return { preview: Y ? `${
|
|
2659
|
+
return { preview: Y ? `${z} is between ${Wl({
|
|
2648
2660
|
startDate: ((be = n.filter.values) == null ? void 0 : be[0]) || null,
|
|
2649
2661
|
endDate: ((ge = n.filter.values) == null ? void 0 : ge[1]) || null,
|
|
2650
2662
|
locale: i.value,
|
|
2651
|
-
timezone:
|
|
2652
|
-
})}` :
|
|
2663
|
+
timezone: p.value
|
|
2664
|
+
})}` : z, suffix: "" };
|
|
2653
2665
|
if (n.filter.option === ye.TimeOfDay) {
|
|
2654
|
-
const R = (oe = n.filter.values) != null && oe[0] ? Je(n.filter.values[0]).tz(
|
|
2655
|
-
return { preview: Y ? `${
|
|
2666
|
+
const R = (oe = n.filter.values) != null && oe[0] ? Je(n.filter.values[0]).tz(p.value) : null, Q = (H = n.filter.values) != null && H[1] ? Je(n.filter.values[1]).tz(p.value) : null, ee = (ae) => ae && ae.isValid() ? { hour: ae.hour(), minute: ae.minute() } : null;
|
|
2667
|
+
return { preview: Y ? `${z} is between ${Il({
|
|
2656
2668
|
startTime: ee(R),
|
|
2657
2669
|
endTime: ee(Q),
|
|
2658
2670
|
locale: i.value
|
|
2659
|
-
})}` :
|
|
2671
|
+
})}` : z, suffix: "" };
|
|
2660
2672
|
}
|
|
2661
2673
|
if (n.filter.option !== ye.DateTime && n.filter.option !== ye.TimeOfDay) {
|
|
2662
2674
|
const R = Yt({
|
|
@@ -2664,47 +2676,47 @@ const Sa = Kt(xa, () => {
|
|
|
2664
2676
|
t: o
|
|
2665
2677
|
}), Q = new Map(R.map((te) => [String(te.value), te.label])), pe = (n.selectedValues || []).filter((te) => te !== "(EMPTY)").map((te) => Q.get(String(te)) ?? String(te)), ae = pe.map((te) => te.length > 20 ? `${te.slice(0, 20)}…` : te).join(", ");
|
|
2666
2678
|
return pe.length ? {
|
|
2667
|
-
preview: `${
|
|
2679
|
+
preview: `${z}: ${ae}`,
|
|
2668
2680
|
suffix: `(${pe.length} selected)`
|
|
2669
|
-
} : { preview:
|
|
2681
|
+
} : { preview: z, suffix: "" };
|
|
2670
2682
|
}
|
|
2671
2683
|
}
|
|
2672
|
-
const
|
|
2673
|
-
return
|
|
2674
|
-
preview: `${
|
|
2675
|
-
suffix: `(${
|
|
2676
|
-
} : { preview:
|
|
2684
|
+
const D = (n.selectedValues || []).filter((Y) => Y !== "(EMPTY)").map((Y) => Y === !0 ? o("report.common.yes") || "Yes" : Y === !1 ? o("report.common.no") || "No" : String(Y).trim() === "" ? t.value : String(Y)), J = D.map((Y) => Y.length > 20 ? `${Y.slice(0, 20)}…` : Y).join(", ");
|
|
2685
|
+
return D.length ? {
|
|
2686
|
+
preview: `${z}: ${J}`,
|
|
2687
|
+
suffix: `(${D.length} selected)`
|
|
2688
|
+
} : { preview: J, suffix: `${z}` };
|
|
2677
2689
|
}
|
|
2678
2690
|
function O(n) {
|
|
2679
|
-
n.filter.values = [...n.selectedValues || []],
|
|
2691
|
+
n.filter.values = [...n.selectedValues || []], g(n.filter, a.value, "selectedValues", n.selectedValues), document.body.click();
|
|
2680
2692
|
}
|
|
2681
2693
|
function he(n) {
|
|
2682
|
-
n.selectedValues = [...n.filter.values || []],
|
|
2694
|
+
n.selectedValues = [...n.filter.values || []], g(n.filter, a.value, "selectedValues", n.selectedValues), document.body.click();
|
|
2683
2695
|
}
|
|
2684
|
-
function
|
|
2685
|
-
n.showAdvanced = !n.showAdvanced,
|
|
2696
|
+
function Fe(n) {
|
|
2697
|
+
n.showAdvanced = !n.showAdvanced, g(n.filter, a.value, "showAdvanced", n.showAdvanced);
|
|
2686
2698
|
}
|
|
2687
2699
|
function Ae(n) {
|
|
2688
|
-
n.keepSelection = !n.keepSelection,
|
|
2700
|
+
n.keepSelection = !n.keepSelection, b(n.keepSelection), g(n.filter, a.value, "keepSelection", n.keepSelection), n.options = [], ue(!0);
|
|
2689
2701
|
}
|
|
2690
|
-
function Pe(n,
|
|
2691
|
-
return n ? n.length >
|
|
2702
|
+
function Pe(n, z) {
|
|
2703
|
+
return n ? n.length > z ? `${n.slice(0, z)}…` : n : t.value;
|
|
2692
2704
|
}
|
|
2693
|
-
function Me(n,
|
|
2694
|
-
var
|
|
2695
|
-
if (
|
|
2705
|
+
function Me(n, z) {
|
|
2706
|
+
var D, J, de, be;
|
|
2707
|
+
if (z === null)
|
|
2696
2708
|
n.values = [];
|
|
2697
2709
|
else {
|
|
2698
|
-
const ge = Je().tz(
|
|
2710
|
+
const ge = Je().tz(p.value).set("hour", Number((D = z.start) == null ? void 0 : D.hour)).set("minute", Number((J = z.start) == null ? void 0 : J.minute)).toISOString(), oe = Je().tz(p.value).set("hour", Number((de = z.end) == null ? void 0 : de.hour)).set("minute", Number((be = z.end) == null ? void 0 : be.minute)).toISOString();
|
|
2699
2711
|
n.values = [ge, oe];
|
|
2700
2712
|
}
|
|
2701
2713
|
const M = l.value.find((ge) => ge.filter === n);
|
|
2702
|
-
M && (M.keepSelection =
|
|
2714
|
+
M && (M.keepSelection = z !== null, g(M.filter, a.value, "keepSelection", M.keepSelection));
|
|
2703
2715
|
}
|
|
2704
|
-
return (n,
|
|
2705
|
-
const M = U("FmCircularProgress"),
|
|
2706
|
-
return P(), se("div",
|
|
2707
|
-
(P(!0), se(xe, null,
|
|
2716
|
+
return (n, z) => {
|
|
2717
|
+
const M = U("FmCircularProgress"), D = U("FmTextField"), J = U("FmMenuItem"), de = U("FmTooltip"), be = U("FmIcon"), ge = U("FmMenuDivider"), oe = U("FmSwitch"), H = U("FmButton"), Y = U("FmMenu");
|
|
2718
|
+
return P(), se("div", ka, [
|
|
2719
|
+
(P(!0), se(xe, null, dt(l.value, (R, Q) => {
|
|
2708
2720
|
var ee, pe, ae, te, we, le;
|
|
2709
2721
|
return P(), se("div", {
|
|
2710
2722
|
key: R.id
|
|
@@ -2715,9 +2727,9 @@ const Sa = Kt(xa, () => {
|
|
|
2715
2727
|
class: "w-full",
|
|
2716
2728
|
label: B(R).preview,
|
|
2717
2729
|
removable: ((ae = R.filter.values) == null ? void 0 : ae.length) === 2,
|
|
2718
|
-
onUpdate: (Be) =>
|
|
2719
|
-
onChipClosed: () =>
|
|
2720
|
-
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : R.filter.option === d(ye).TimeOfDay ? (P(), fe(
|
|
2730
|
+
onUpdate: (Be) => E(R.filter, Be),
|
|
2731
|
+
onChipClosed: () => E(R.filter, null)
|
|
2732
|
+
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : R.filter.option === d(ye).TimeOfDay ? (P(), fe(Vl, {
|
|
2721
2733
|
key: 1,
|
|
2722
2734
|
"model-value": { start: (te = R.filter.values) == null ? void 0 : te[0], end: (we = R.filter.values) == null ? void 0 : we[1] },
|
|
2723
2735
|
class: "w-full",
|
|
@@ -2731,35 +2743,35 @@ const Sa = Kt(xa, () => {
|
|
|
2731
2743
|
shift: !0,
|
|
2732
2744
|
open: d(c)(R.id)
|
|
2733
2745
|
}, {
|
|
2734
|
-
"menu-button":
|
|
2735
|
-
|
|
2746
|
+
"menu-button": ce(() => [
|
|
2747
|
+
j("div", Ta, [
|
|
2736
2748
|
G(Ml, {
|
|
2737
2749
|
"left-icon": "filter_alt",
|
|
2738
2750
|
"trailing-icon": "expand_more",
|
|
2739
2751
|
label: B(R).preview,
|
|
2740
2752
|
class: "w-full"
|
|
2741
2753
|
}, {
|
|
2742
|
-
default:
|
|
2743
|
-
wt(
|
|
2754
|
+
default: ce(() => [
|
|
2755
|
+
wt(ke(B(R).suffix), 1)
|
|
2744
2756
|
]),
|
|
2745
2757
|
_: 2
|
|
2746
2758
|
}, 1032, ["label"])
|
|
2747
2759
|
])
|
|
2748
2760
|
]),
|
|
2749
|
-
"menu-wrapper":
|
|
2750
|
-
|
|
2761
|
+
"menu-wrapper": ce(({ maxHeight: Be, width: mt }) => [
|
|
2762
|
+
j("div", {
|
|
2751
2763
|
class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
|
|
2752
|
-
style:
|
|
2764
|
+
style: Ve({ maxHeight: `${Be}px`, width: mt })
|
|
2753
2765
|
}, [
|
|
2754
|
-
|
|
2766
|
+
h.value ? (P(), se("div", _a, [
|
|
2755
2767
|
G(M)
|
|
2756
|
-
])) : R.options.length > 0 && !d(
|
|
2757
|
-
|
|
2758
|
-
G(
|
|
2768
|
+
])) : R.options.length > 0 && !d(C) ? (P(), se(xe, { key: 1 }, [
|
|
2769
|
+
j("div", Fa, [
|
|
2770
|
+
G(D, {
|
|
2759
2771
|
modelValue: R.search,
|
|
2760
2772
|
"onUpdate:modelValue": [
|
|
2761
2773
|
(ie) => R.search = ie,
|
|
2762
|
-
(ie) => d(
|
|
2774
|
+
(ie) => d(g)(R.filter, a.value, "search", ie)
|
|
2763
2775
|
],
|
|
2764
2776
|
type: "text",
|
|
2765
2777
|
"prepend-icon": "search",
|
|
@@ -2767,30 +2779,30 @@ const Sa = Kt(xa, () => {
|
|
|
2767
2779
|
class: "border px-2 pb-8 text-sm mb-1 rounded"
|
|
2768
2780
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
2769
2781
|
]),
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
G(
|
|
2782
|
+
j("div", La, [
|
|
2783
|
+
j("div", Ra, [
|
|
2784
|
+
G(J, {
|
|
2773
2785
|
label: X(R),
|
|
2774
2786
|
"has-checkbox": !0,
|
|
2775
2787
|
"model-value": I(R),
|
|
2776
2788
|
indeterminate: !0,
|
|
2777
2789
|
onClick: (ie) => Z(R)
|
|
2778
2790
|
}, null, 8, ["label", "model-value", "onClick"]),
|
|
2779
|
-
(P(!0), se(xe, null,
|
|
2791
|
+
(P(!0), se(xe, null, dt(W.value[Q], (ie) => (P(), se(xe, {
|
|
2780
2792
|
key: ie.value
|
|
2781
2793
|
}, [
|
|
2782
|
-
ie.label && ie.label.length > 110 ? (P(), fe(
|
|
2794
|
+
ie.label && ie.label.length > 110 ? (P(), fe(de, {
|
|
2783
2795
|
key: 0,
|
|
2784
2796
|
placement: "right",
|
|
2785
2797
|
"hide-arrow": !0,
|
|
2786
2798
|
"z-index": 2e3
|
|
2787
2799
|
}, {
|
|
2788
|
-
content:
|
|
2789
|
-
wt(
|
|
2800
|
+
content: ce(() => [
|
|
2801
|
+
wt(ke(ie.label), 1)
|
|
2790
2802
|
]),
|
|
2791
|
-
default:
|
|
2792
|
-
|
|
2793
|
-
G(
|
|
2803
|
+
default: ce(() => [
|
|
2804
|
+
j("div", $a, [
|
|
2805
|
+
G(J, {
|
|
2794
2806
|
label: Pe(ie.label, 110),
|
|
2795
2807
|
"has-checkbox": !0,
|
|
2796
2808
|
"model-value": R.selectedValues.includes(ie.value),
|
|
@@ -2798,58 +2810,58 @@ const Sa = Kt(xa, () => {
|
|
|
2798
2810
|
"flex-1 text-left",
|
|
2799
2811
|
{ "bg-gray-200": ie.available === !1 }
|
|
2800
2812
|
]),
|
|
2801
|
-
onClick: () =>
|
|
2813
|
+
onClick: () => S(R, ie.value)
|
|
2802
2814
|
}, null, 8, ["label", "model-value", "class", "onClick"])
|
|
2803
2815
|
])
|
|
2804
2816
|
]),
|
|
2805
2817
|
_: 2
|
|
2806
|
-
}, 1024)) : (P(), fe(
|
|
2818
|
+
}, 1024)) : (P(), fe(J, {
|
|
2807
2819
|
key: 1,
|
|
2808
2820
|
label: ie.label,
|
|
2809
2821
|
"has-checkbox": !0,
|
|
2810
2822
|
"model-value": R.selectedValues.includes(ie.value),
|
|
2811
2823
|
class: Ze(["flex-1 text-left", { "bg-gray-100": ie.available === !1 }]),
|
|
2812
|
-
onClick: () =>
|
|
2824
|
+
onClick: () => S(R, ie.value)
|
|
2813
2825
|
}, null, 8, ["label", "model-value", "class", "onClick"]))
|
|
2814
2826
|
], 64))), 128)),
|
|
2815
|
-
W.value[Q].length < R.options.length && !R.search ? (P(), fe(
|
|
2827
|
+
W.value[Q].length < R.options.length && !R.search ? (P(), fe(J, {
|
|
2816
2828
|
key: 0,
|
|
2817
2829
|
class: "fm-typo-en-body-md-400 -ml-2",
|
|
2818
2830
|
label: d(o)("report.section.filter.loadMore"),
|
|
2819
|
-
onClick:
|
|
2831
|
+
onClick: gt((ie) => K(R), ["stop"]),
|
|
2820
2832
|
icon: "autorenew"
|
|
2821
|
-
}, null, 8, ["label", "onClick"])) :
|
|
2833
|
+
}, null, 8, ["label", "onClick"])) : Te("", !0)
|
|
2822
2834
|
])
|
|
2823
2835
|
]),
|
|
2824
|
-
|
|
2836
|
+
j("div", {
|
|
2825
2837
|
class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
|
|
2826
|
-
onClick: (ie) =>
|
|
2838
|
+
onClick: (ie) => Fe(R)
|
|
2827
2839
|
}, [
|
|
2828
2840
|
G(be, {
|
|
2829
2841
|
name: R.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2830
2842
|
size: "md",
|
|
2831
2843
|
class: ""
|
|
2832
2844
|
}, null, 8, ["name"]),
|
|
2833
|
-
|
|
2834
|
-
], 8,
|
|
2845
|
+
j("span", Ea, ke(d(o)("report.section.filter.advanced")), 1)
|
|
2846
|
+
], 8, za),
|
|
2835
2847
|
G(ge),
|
|
2836
|
-
R.showAdvanced ? (P(), se("div",
|
|
2837
|
-
|
|
2838
|
-
|
|
2848
|
+
R.showAdvanced ? (P(), se("div", Va, [
|
|
2849
|
+
j("div", Da, [
|
|
2850
|
+
j("div", Aa, [
|
|
2839
2851
|
G(oe, {
|
|
2840
2852
|
"model-value": R.keepSelection,
|
|
2841
2853
|
label: d(o)("report.section.filter.keepSelection"),
|
|
2842
2854
|
labelPlacement: "right",
|
|
2843
2855
|
"onUpdate:modelValue": () => Ae(R)
|
|
2844
2856
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
2845
|
-
G(
|
|
2857
|
+
G(de, {
|
|
2846
2858
|
placement: "top",
|
|
2847
2859
|
"z-index": 2e3
|
|
2848
2860
|
}, {
|
|
2849
|
-
content:
|
|
2850
|
-
|
|
2861
|
+
content: ce(() => [
|
|
2862
|
+
j("div", Ma, ke(d(o)("report.section.filter.keepSelectionTooltip")), 1)
|
|
2851
2863
|
]),
|
|
2852
|
-
default:
|
|
2864
|
+
default: ce(() => [
|
|
2853
2865
|
G(be, {
|
|
2854
2866
|
name: "info",
|
|
2855
2867
|
size: "md",
|
|
@@ -2860,20 +2872,20 @@ const Sa = Kt(xa, () => {
|
|
|
2860
2872
|
})
|
|
2861
2873
|
])
|
|
2862
2874
|
])
|
|
2863
|
-
])) :
|
|
2864
|
-
|
|
2875
|
+
])) : Te("", !0),
|
|
2876
|
+
j("div", Wa, [
|
|
2865
2877
|
G(H, {
|
|
2866
2878
|
variant: "tertiary",
|
|
2867
2879
|
label: d(o)("report.common.cancel"),
|
|
2868
|
-
onClick:
|
|
2880
|
+
onClick: gt((ie) => he(R), ["stop"])
|
|
2869
2881
|
}, null, 8, ["label", "onClick"]),
|
|
2870
2882
|
G(H, {
|
|
2871
2883
|
color: "primary",
|
|
2872
|
-
onClick:
|
|
2884
|
+
onClick: gt((ie) => O(R), ["stop"]),
|
|
2873
2885
|
label: d(o)("report.common.apply")
|
|
2874
2886
|
}, null, 8, ["onClick", "label"])
|
|
2875
2887
|
])
|
|
2876
|
-
], 64)) : d(
|
|
2888
|
+
], 64)) : d(C) ? Te("", !0) : (P(), fe(Ct, { key: 2 }))
|
|
2877
2889
|
], 4)
|
|
2878
2890
|
]),
|
|
2879
2891
|
_: 2
|
|
@@ -2891,13 +2903,13 @@ export {
|
|
|
2891
2903
|
Oe as R,
|
|
2892
2904
|
_t as X,
|
|
2893
2905
|
Ft as Y,
|
|
2894
|
-
|
|
2895
|
-
|
|
2906
|
+
Ga as _,
|
|
2907
|
+
Za as a,
|
|
2896
2908
|
kt as b,
|
|
2897
2909
|
Lt as c,
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2910
|
+
Ka as d,
|
|
2911
|
+
Ja as e,
|
|
2912
|
+
ja as f,
|
|
2913
|
+
bt as g,
|
|
2902
2914
|
qt as u
|
|
2903
2915
|
};
|