@feedmepos/mf-report 5.21.3 → 5.21.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-B4e_L7wY.js → App-Cs8tAfKY.js} +31 -31
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-03nmej58.js → BaseDialog.vue_vue_type_script_setup_true_lang-Ccrz29qZ.js} +2 -2
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BhMWXLug.js → Default.vue_vue_type_script_setup_true_lang-7MJTbycc.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-DkjBHicb.js → FilterSelector.vue_vue_type_script_setup_true_lang-Cq2Ssoih.js} +798 -787
- package/dist/{InsightView-DJJJmFkl.js → InsightView-CENPnVe7.js} +5 -5
- package/dist/{Integration-D93eQCHy.js → Integration-Czc6q14E.js} +2 -2
- package/dist/{Integrations-jn20KmcD.js → Integrations-DIXSWGS_.js} +3 -3
- package/dist/{Layout-B1jaac85.js → Layout-BJ7gfx7X.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CfnD40UX.js → MenuTab.vue_vue_type_script_setup_true_lang-V28xf-H0.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BZVeEoDt.js → NavigationTab.vue_vue_type_script_setup_true_lang-9PbGrSC0.js} +4 -4
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js → NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js} +1 -1
- package/dist/{OverviewView-BeFy5m4t.js → OverviewView-C-DrSun5.js} +5 -5
- package/dist/{Report-P_a1NjPi.js → Report-CrUITZYf.js} +4 -4
- package/dist/{ReportEditor-EPaJWZAo.js → ReportEditor-hyFAa6EB.js} +6 -6
- package/dist/{ReportView-DHbEuWQN.js → ReportView-Ci4mKX0q.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js → SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js} +1 -1
- package/dist/{Setting-DLnskPxP.js → Setting-BzClHxv3.js} +4 -4
- package/dist/{TileEditor-BaYT3XVi.js → TileEditor-H3XGcpji.js} +7 -7
- package/dist/{TransitionFade-CZwjkz3X.js → TransitionFade-woMemCnD.js} +5 -5
- package/dist/app.js +11 -11
- package/dist/{vue-i18n-BQN8HgvD.js → vue-i18n-BJW_sJot.js} +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { W as A, e as et, f as xl, S as Be, v as ot, g as Sl, h as dt, i as Bt, q as
|
|
3
|
-
import { u as tt, b as Qe, a as St, d as
|
|
4
|
-
import { d as Mt, _ as Ll, a as Dl, b as Rl, c as Vl } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { storeToRefs as $e, defineStore as
|
|
1
|
+
import { computed as k, defineComponent as Le, mergeModels as Ie, useModel as Me, ref as h, onMounted as Ue, nextTick as we, watch as he, resolveComponent as O, createElementBlock as te, openBlock as $, Fragment as be, renderSlot as Ne, createVNode as B, normalizeStyle as Ee, unref as s, createElementVNode as H, toDisplayString as Te, withCtx as oe, createBlock as re, createCommentVNode as Fe, normalizeClass as qe, h as st, renderList as nt, toRaw as fl, markRaw as vl, createTextVNode as ht, onUnmounted as gl, resolveDynamicComponent as yl, withDirectives as bl, vShow as wl, withModifiers as ct } from "vue";
|
|
2
|
+
import { W as A, e as et, f as xl, S as Be, v as ot, g as Sl, h as dt, i as Bt, q as Ot, R as je, j as Cl, D as ze, c as pe, C as Ce, a as kl, b as _l, _ as Tl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-Ccrz29qZ.js";
|
|
3
|
+
import { u as tt, b as Qe, a as St, d as Ke, i as Fl } from "./vue-i18n-BJW_sJot.js";
|
|
4
|
+
import { d as Mt, _ as Ll, a as Dl, b as Rl, c as Vl } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
|
|
5
|
+
import { storeToRefs as $e, defineStore as Ht } from "pinia";
|
|
6
6
|
import { useBreakpoints as qt, useSnackbar as Ct, components as zl } from "@feedmepos/ui-library";
|
|
7
|
-
import { a as $l } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
8
|
-
import { r as
|
|
9
|
-
import { _ as ft } from "./NoData.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { a as $l } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
|
|
8
|
+
import { r as Oe } from "./i18n-DQxDgiLO.js";
|
|
9
|
+
import { _ as ft } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
|
|
10
10
|
var vt = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(vt || {}), Pe = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(Pe || {}), gt = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(gt || {}), yt = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(yt || {}), bt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(bt || {}), wt = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(wt || {}), xt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(xt || {});
|
|
11
11
|
A.Circular, A.Table, A.BarChart, A.LineChart, A.StackBarChart, A.StackLineChart, A.Scorecard, A.Spacer;
|
|
12
12
|
const Al = [
|
|
@@ -118,25 +118,25 @@ const It = [
|
|
|
118
118
|
function Ae({
|
|
119
119
|
index: e,
|
|
120
120
|
isCompare: a,
|
|
121
|
-
opacity:
|
|
121
|
+
opacity: o
|
|
122
122
|
}) {
|
|
123
|
-
let l = typeof
|
|
123
|
+
let l = typeof o == "number" ? o : 1;
|
|
124
124
|
return a && (l = l * 0.6), `rgba(${It[e % It.length]}, ${l})`;
|
|
125
125
|
}
|
|
126
|
-
function Ut(e, a,
|
|
126
|
+
function Ut(e, a, o) {
|
|
127
127
|
if (e === "" || a === "")
|
|
128
128
|
return null;
|
|
129
|
-
let l = (
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
if (isNaN(
|
|
129
|
+
let l = (z) => z == null ? void 0 : z.replace(/,/g, "");
|
|
130
|
+
o === "ID" && (l = (z) => z == null ? void 0 : z.replace(/\./g, "").replace(/,/g, "."));
|
|
131
|
+
const g = Number(l(e)), _ = Number(l(a));
|
|
132
|
+
if (isNaN(g) || isNaN(_))
|
|
133
133
|
return null;
|
|
134
|
-
let
|
|
135
|
-
|
|
136
|
-
const
|
|
134
|
+
let D = 0;
|
|
135
|
+
_ === 0 ? g === 0 ? D = 0 : D = 1 : D = (g - _) / _;
|
|
136
|
+
const R = Ml(D);
|
|
137
137
|
return {
|
|
138
|
-
value: isNaN(
|
|
139
|
-
icon:
|
|
138
|
+
value: isNaN(D) ? "" : `${(D * 100).toFixed(0)}%`,
|
|
139
|
+
icon: R
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
function Ml(e) {
|
|
@@ -155,17 +155,17 @@ function Ml(e) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
function lt(e) {
|
|
158
|
-
function a(
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
for (;
|
|
163
|
-
const C = Math.floor((
|
|
164
|
-
|
|
158
|
+
function a(c, p, d) {
|
|
159
|
+
if (c.measureText(p).width <= d) return p;
|
|
160
|
+
const i = "…";
|
|
161
|
+
let w = 0, x = p.length;
|
|
162
|
+
for (; w < x; ) {
|
|
163
|
+
const C = Math.floor((w + x) / 2), y = p.slice(0, C) + i;
|
|
164
|
+
c.measureText(y).width <= d ? w = C + 1 : x = C;
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return p.slice(0, w - 1) + i;
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const o = k(() => ({
|
|
169
169
|
display: e.showLabel,
|
|
170
170
|
align: e.labelAlign,
|
|
171
171
|
anchor: e.labelAnchor,
|
|
@@ -174,12 +174,12 @@ function lt(e) {
|
|
|
174
174
|
font: {
|
|
175
175
|
size: e.labelFontSize
|
|
176
176
|
},
|
|
177
|
-
color: (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
177
|
+
color: (c) => {
|
|
178
|
+
const p = c.chart.data.datasets[c.datasetIndex];
|
|
179
|
+
return p.borderColor ? Array.isArray(p.borderColor) ? p.borderColor[c.dataIndex] : p.borderColor : p.backgroundColor ? Array.isArray(p.backgroundColor) ? p.backgroundColor[c.dataIndex] : p.backgroundColor : "#000";
|
|
180
180
|
},
|
|
181
|
-
formatter: (
|
|
182
|
-
})), l =
|
|
181
|
+
formatter: (c) => c === 0 ? "" : c.toLocaleString("en-US")
|
|
182
|
+
})), l = k(() => ({
|
|
183
183
|
display: e.showX,
|
|
184
184
|
position: e.xPosition,
|
|
185
185
|
grid: {
|
|
@@ -187,18 +187,18 @@ function lt(e) {
|
|
|
187
187
|
},
|
|
188
188
|
ticks: {
|
|
189
189
|
display: e.showXTick,
|
|
190
|
-
callback: function(
|
|
191
|
-
if ((e == null ? void 0 : e.isTransposed) === !0) return String(
|
|
192
|
-
let
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
const W =
|
|
199
|
-
return
|
|
190
|
+
callback: function(c) {
|
|
191
|
+
if ((e == null ? void 0 : e.isTransposed) === !0) return String(c);
|
|
192
|
+
let d = String(c);
|
|
193
|
+
const i = this;
|
|
194
|
+
i && typeof i.getLabelForValue == "function" && (d = i.getLabelForValue(c));
|
|
195
|
+
const w = i == null ? void 0 : i.chart, x = i == null ? void 0 : i.ctx, C = w.height * 0.25;
|
|
196
|
+
if (x && C > 0) {
|
|
197
|
+
x.save();
|
|
198
|
+
const W = x.measureText(d).width > C ? a(x, d, C) : d;
|
|
199
|
+
return x.restore(), W;
|
|
200
200
|
}
|
|
201
|
-
return
|
|
201
|
+
return d;
|
|
202
202
|
},
|
|
203
203
|
font: {
|
|
204
204
|
size: e.xTickFontSize
|
|
@@ -211,19 +211,19 @@ function lt(e) {
|
|
|
211
211
|
size: e.xTitleFontSize
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
afterBuildTicks: (
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const
|
|
218
|
-
|
|
214
|
+
afterBuildTicks: (c) => {
|
|
215
|
+
const p = Array.isArray(c == null ? void 0 : c.ticks) ? c.ticks : [];
|
|
216
|
+
if (p.length === 0) return;
|
|
217
|
+
const d = c.getLabelForValue(p[0].value), i = !isNaN(Number(d));
|
|
218
|
+
c.options.ticks.minRotation = i || p.length < 10 ? 0 : 90;
|
|
219
219
|
},
|
|
220
|
-
afterFit: (
|
|
220
|
+
afterFit: (c) => {
|
|
221
221
|
if (!(e != null && e.isTransposed)) {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const p = c.chart.height * 0.4;
|
|
223
|
+
c.height > p && (c.height = p);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
})),
|
|
226
|
+
})), g = k(() => ({
|
|
227
227
|
display: e.showY,
|
|
228
228
|
position: e.yPosition,
|
|
229
229
|
grid: {
|
|
@@ -234,18 +234,18 @@ function lt(e) {
|
|
|
234
234
|
font: {
|
|
235
235
|
size: e.yTickFontSize
|
|
236
236
|
},
|
|
237
|
-
callback: function(
|
|
238
|
-
if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(
|
|
239
|
-
let
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
const W =
|
|
246
|
-
return
|
|
237
|
+
callback: function(c) {
|
|
238
|
+
if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(c);
|
|
239
|
+
let d = String(c);
|
|
240
|
+
const i = this;
|
|
241
|
+
i && typeof i.getLabelForValue == "function" && (d = i.getLabelForValue(c));
|
|
242
|
+
const w = i == null ? void 0 : i.chart, x = i == null ? void 0 : i.ctx, C = w.width * 0.4;
|
|
243
|
+
if (x && C > 0) {
|
|
244
|
+
x.save();
|
|
245
|
+
const W = x.measureText(d).width > C ? a(x, d, C) : d;
|
|
246
|
+
return x.restore(), W;
|
|
247
247
|
}
|
|
248
|
-
return
|
|
248
|
+
return d;
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
251
|
title: {
|
|
@@ -255,7 +255,7 @@ function lt(e) {
|
|
|
255
255
|
size: e.yTitleFontSize
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
})),
|
|
258
|
+
})), _ = k(() => ({
|
|
259
259
|
display: e.showLegend,
|
|
260
260
|
position: e.legendPosition,
|
|
261
261
|
usePointStyle: e.usePointStyle,
|
|
@@ -263,40 +263,40 @@ function lt(e) {
|
|
|
263
263
|
maxWidth: e.legendMaxWidth,
|
|
264
264
|
labels: {
|
|
265
265
|
usePointStyle: e.usePointStyle ?? !0,
|
|
266
|
-
generateLabels: (
|
|
267
|
-
var
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
return
|
|
273
|
-
const
|
|
266
|
+
generateLabels: (c) => {
|
|
267
|
+
var d;
|
|
268
|
+
const p = ((d = c == null ? void 0 : c.data) == null ? void 0 : d.datasets) || [];
|
|
269
|
+
if (p.length === 0) return [];
|
|
270
|
+
if (p.length === 1 && Array.isArray(p[0].backgroundColor) && p[0].backgroundColor.length > 1 && Array.isArray(p[0].data)) {
|
|
271
|
+
const i = p[0];
|
|
272
|
+
return c.data.labels.map((x, C) => {
|
|
273
|
+
const y = i.backgroundColor[C];
|
|
274
274
|
return {
|
|
275
|
-
text:
|
|
275
|
+
text: x,
|
|
276
276
|
fontColor: "#6b6b6b",
|
|
277
|
-
fillStyle:
|
|
278
|
-
strokeStyle:
|
|
277
|
+
fillStyle: y,
|
|
278
|
+
strokeStyle: y,
|
|
279
279
|
datasetIndex: 0,
|
|
280
280
|
index: C,
|
|
281
|
-
hidden:
|
|
281
|
+
hidden: c.getDataVisibility ? !c.getDataVisibility(C) : !1
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
-
return
|
|
286
|
-
const
|
|
285
|
+
return c.data.datasets.map((i, w) => {
|
|
286
|
+
const x = i.borderColor || i.backgroundColor;
|
|
287
287
|
return {
|
|
288
|
-
text:
|
|
288
|
+
text: i.label,
|
|
289
289
|
fontColor: "#6b6b6b",
|
|
290
|
-
fillStyle:
|
|
291
|
-
strokeStyle:
|
|
292
|
-
datasetIndex:
|
|
293
|
-
hidden: !
|
|
290
|
+
fillStyle: x,
|
|
291
|
+
strokeStyle: x,
|
|
292
|
+
datasetIndex: w,
|
|
293
|
+
hidden: !c.isDatasetVisible(w)
|
|
294
294
|
};
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
})),
|
|
299
|
-
return { datalabels:
|
|
298
|
+
})), D = k(() => e.isTransposed), R = k(() => e.chartWidth), z = k(() => e.chartHeight);
|
|
299
|
+
return { datalabels: o, xCfg: l, yCfg: g, isTransposed: D, legend: _, chartWidth: R, chartHeight: z };
|
|
300
300
|
}
|
|
301
301
|
const Il = /* @__PURE__ */ Le({
|
|
302
302
|
__name: "WidgetBarchart",
|
|
@@ -308,56 +308,56 @@ const Il = /* @__PURE__ */ Le({
|
|
|
308
308
|
}),
|
|
309
309
|
emits: ["update:modelValue"],
|
|
310
310
|
setup(e) {
|
|
311
|
-
const a = e,
|
|
312
|
-
var
|
|
313
|
-
return ((
|
|
314
|
-
}),
|
|
315
|
-
var
|
|
316
|
-
return ((
|
|
317
|
-
}), { datalabels:
|
|
318
|
-
|
|
319
|
-
),
|
|
320
|
-
...
|
|
321
|
-
label:
|
|
322
|
-
data:
|
|
323
|
-
dash: !!
|
|
324
|
-
backgroundColor: Ae({ index: W, isCompare:
|
|
311
|
+
const a = e, o = Me(e, "modelValue"), l = h(null), g = k(() => {
|
|
312
|
+
var y;
|
|
313
|
+
return ((y = o.value.data) == null ? void 0 : y.xAxis) ?? [];
|
|
314
|
+
}), _ = k(() => {
|
|
315
|
+
var y;
|
|
316
|
+
return ((y = o.value.data) == null ? void 0 : y.datasets) ?? [];
|
|
317
|
+
}), { datalabels: D, xCfg: R, yCfg: z, isTransposed: c, legend: p, chartWidth: d, chartHeight: i } = lt(
|
|
318
|
+
o.value
|
|
319
|
+
), w = k(() => _.value.length > 0 ? [
|
|
320
|
+
..._.value.map((y, W) => ({
|
|
321
|
+
label: y.name,
|
|
322
|
+
data: y.values,
|
|
323
|
+
dash: !!y.isCompare,
|
|
324
|
+
backgroundColor: Ae({ index: W, isCompare: y.isCompare })
|
|
325
325
|
}))
|
|
326
|
-
] : []),
|
|
326
|
+
] : []), x = et();
|
|
327
327
|
function C() {
|
|
328
|
-
return
|
|
328
|
+
return x.extractChartSize(l.value, a.tileIndex) || { width: 0, height: 0 };
|
|
329
329
|
}
|
|
330
330
|
return Ue(() => {
|
|
331
331
|
we(() => {
|
|
332
332
|
C();
|
|
333
333
|
});
|
|
334
|
-
}), he([
|
|
334
|
+
}), he([w], () => {
|
|
335
335
|
we(() => C());
|
|
336
|
-
}), (
|
|
337
|
-
const v =
|
|
336
|
+
}), (y, W) => {
|
|
337
|
+
const v = O("FmBarChart");
|
|
338
338
|
return $(), te(be, null, [
|
|
339
|
-
Ne(
|
|
339
|
+
Ne(y.$slots, "menu"),
|
|
340
340
|
B(v, {
|
|
341
341
|
ref_key: "chartRef",
|
|
342
342
|
ref: l,
|
|
343
343
|
class: "bar-chart",
|
|
344
|
-
datasets:
|
|
345
|
-
"x-axis": { categories:
|
|
346
|
-
"x-cfg": s(
|
|
347
|
-
"y-cfg": s(
|
|
348
|
-
transpose: s(
|
|
344
|
+
datasets: w.value,
|
|
345
|
+
"x-axis": { categories: g.value },
|
|
346
|
+
"x-cfg": s(R),
|
|
347
|
+
"y-cfg": s(z),
|
|
348
|
+
transpose: s(c),
|
|
349
349
|
legend: {
|
|
350
|
-
display: s(
|
|
351
|
-
position: s(
|
|
352
|
-
maxHeight: s(
|
|
353
|
-
maxWidth: s(
|
|
354
|
-
labels: s(
|
|
350
|
+
display: s(p).display ?? !1,
|
|
351
|
+
position: s(p).position,
|
|
352
|
+
maxHeight: s(p).maxHeight,
|
|
353
|
+
maxWidth: s(p).maxWidth,
|
|
354
|
+
labels: s(p).labels
|
|
355
355
|
},
|
|
356
|
-
datalabels: s(
|
|
356
|
+
datalabels: s(D),
|
|
357
357
|
"maintain-aspect-ratio": !1,
|
|
358
358
|
style: Ee({
|
|
359
|
-
"--chart-width": s(
|
|
360
|
-
"--chart-height": s(
|
|
359
|
+
"--chart-width": s(d) !== void 0 ? s(d) + "px" : "100%",
|
|
360
|
+
"--chart-height": s(i) !== void 0 ? s(i) + "px" : "calc(100% - 36px)"
|
|
361
361
|
})
|
|
362
362
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
363
363
|
], 64);
|
|
@@ -373,62 +373,62 @@ const Il = /* @__PURE__ */ Le({
|
|
|
373
373
|
}),
|
|
374
374
|
emits: ["update:modelValue"],
|
|
375
375
|
setup(e) {
|
|
376
|
-
const a = e,
|
|
377
|
-
let
|
|
378
|
-
return
|
|
376
|
+
const a = e, o = Me(e, "modelValue"), { breakpoints: l } = qt(), g = h(null), { datalabels: _, legend: D, chartWidth: R, chartHeight: z } = lt(o.value), c = k(() => {
|
|
377
|
+
let w = [];
|
|
378
|
+
return o.value.data.datasets && o.value.data.metrics && o.value.data.datasets.length > 0 && o.value.data.metrics.length > 0 && (w = [
|
|
379
379
|
{
|
|
380
|
-
label:
|
|
381
|
-
data:
|
|
382
|
-
backgroundColor:
|
|
380
|
+
label: o.value.data.metrics[0],
|
|
381
|
+
data: o.value.data.datasets.map((x) => x.value),
|
|
382
|
+
backgroundColor: o.value.data.datasets.map((x, C) => Ae({ index: C }))
|
|
383
383
|
}
|
|
384
|
-
]),
|
|
385
|
-
}),
|
|
386
|
-
function
|
|
387
|
-
return
|
|
384
|
+
]), w;
|
|
385
|
+
}), p = et();
|
|
386
|
+
function d() {
|
|
387
|
+
return p.extractChartSize(g.value, a.tileIndex) || { width: 0, height: 0 };
|
|
388
388
|
}
|
|
389
389
|
Ue(() => {
|
|
390
390
|
we(() => {
|
|
391
|
-
|
|
391
|
+
d();
|
|
392
392
|
});
|
|
393
|
-
}), he([
|
|
394
|
-
we(() =>
|
|
393
|
+
}), he([c], () => {
|
|
394
|
+
we(() => d());
|
|
395
395
|
});
|
|
396
|
-
const
|
|
397
|
-
return (
|
|
398
|
-
const C =
|
|
396
|
+
const i = k(() => l.value.lg ? 12 : 8);
|
|
397
|
+
return (w, x) => {
|
|
398
|
+
const C = O("FmPieChart");
|
|
399
399
|
return $(), te(be, null, [
|
|
400
|
-
Ne(
|
|
400
|
+
Ne(w.$slots, "menu"),
|
|
401
401
|
B(C, {
|
|
402
402
|
ref_key: "chartRef",
|
|
403
|
-
ref:
|
|
403
|
+
ref: g,
|
|
404
404
|
class: "circular",
|
|
405
405
|
percentage: "70%",
|
|
406
|
-
datasets:
|
|
407
|
-
metrics:
|
|
406
|
+
datasets: c.value,
|
|
407
|
+
metrics: o.value.data.datasets.map((y) => y.name),
|
|
408
408
|
variant: "doughnut",
|
|
409
409
|
legend: {
|
|
410
|
-
display: s(
|
|
411
|
-
position: s(
|
|
412
|
-
maxHeight: s(
|
|
413
|
-
maxWidth: s(
|
|
410
|
+
display: s(D).display ?? !0,
|
|
411
|
+
position: s(D).position ?? "top",
|
|
412
|
+
maxHeight: s(D).maxHeight,
|
|
413
|
+
maxWidth: s(D).maxWidth,
|
|
414
414
|
labels: {
|
|
415
|
-
...s(
|
|
415
|
+
...s(D).labels,
|
|
416
416
|
font: {
|
|
417
|
-
size:
|
|
417
|
+
size: i.value
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
|
-
datalabels: s(
|
|
421
|
+
datalabels: s(_),
|
|
422
422
|
"maintain-aspect-ratio": !1,
|
|
423
423
|
style: Ee({
|
|
424
|
-
"--chart-width": s(
|
|
425
|
-
"--chart-height": s(
|
|
424
|
+
"--chart-width": s(R) !== void 0 ? s(R) + "px" : "100%",
|
|
425
|
+
"--chart-height": s(z) !== void 0 ? s(z) + "px" : "calc(100% - 36px)"
|
|
426
426
|
})
|
|
427
427
|
}, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
|
|
428
428
|
], 64);
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
}), Wl = { class: "flex flex-col gap-1" }, Pl = { class: "fm-typo-en-title-sm-600" }, Bl = { class: "flex gap-2" },
|
|
431
|
+
}), Wl = { class: "flex flex-col gap-1" }, Pl = { class: "fm-typo-en-title-sm-600" }, Bl = { class: "flex gap-2" }, Ol = { key: 0 }, Hl = { key: 1 }, ql = /* @__PURE__ */ Le({
|
|
432
432
|
__name: "WidgetScorecard",
|
|
433
433
|
props: {
|
|
434
434
|
modelValue: { required: !0 },
|
|
@@ -436,15 +436,15 @@ const Il = /* @__PURE__ */ Le({
|
|
|
436
436
|
},
|
|
437
437
|
emits: ["update:modelValue"],
|
|
438
438
|
setup(e) {
|
|
439
|
-
const a = Me(e, "modelValue"), { t:
|
|
440
|
-
var
|
|
441
|
-
return ((
|
|
442
|
-
}),
|
|
443
|
-
const { data:
|
|
444
|
-
return
|
|
439
|
+
const a = Me(e, "modelValue"), { t: o } = tt(), { compareDateRange: l, defaultDateSetting: g } = $e(Qe()), { country: _ } = St(), D = k(() => {
|
|
440
|
+
var d;
|
|
441
|
+
return ((d = a.value.data) == null ? void 0 : d.value) || "";
|
|
442
|
+
}), R = k(() => {
|
|
443
|
+
const { data: d } = a.value;
|
|
444
|
+
return d != null && d.comparison ? Ut(D.value, d.comparison, _) : null;
|
|
445
445
|
});
|
|
446
|
-
function
|
|
447
|
-
switch (
|
|
446
|
+
function z(d) {
|
|
447
|
+
switch (d) {
|
|
448
448
|
case vt.bar:
|
|
449
449
|
return "bar";
|
|
450
450
|
case vt.line:
|
|
@@ -453,57 +453,57 @@ const Il = /* @__PURE__ */ Le({
|
|
|
453
453
|
return "line";
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
var
|
|
458
|
-
return (
|
|
459
|
-
}),
|
|
460
|
-
label:
|
|
461
|
-
data:
|
|
456
|
+
const c = k(() => {
|
|
457
|
+
var d;
|
|
458
|
+
return (d = a.value.data) == null ? void 0 : d.sparkline;
|
|
459
|
+
}), p = k(() => c.value.datasets.map((d) => ({
|
|
460
|
+
label: d.name,
|
|
461
|
+
data: d.values,
|
|
462
462
|
fill: !0,
|
|
463
463
|
color: "#36a2eb"
|
|
464
464
|
})));
|
|
465
|
-
return (
|
|
465
|
+
return (d, i) => {
|
|
466
466
|
var W;
|
|
467
|
-
const
|
|
467
|
+
const w = O("FmIcon"), x = O("FmChip"), C = O("FmTooltip"), y = O("FmLineChart");
|
|
468
468
|
return $(), te("div", Wl, [
|
|
469
|
-
Ne(
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
Ne(d.$slots, "menu"),
|
|
470
|
+
H("p", Pl, Te(D.value), 1),
|
|
471
|
+
H("div", Bl, [
|
|
472
472
|
B(C, {
|
|
473
|
-
content: `vs. ${(W = s(
|
|
473
|
+
content: `vs. ${(W = s(g).defaultCompareType) == null ? void 0 : W.split("_").join(" ")}`,
|
|
474
474
|
placement: "right",
|
|
475
475
|
"hide-arrow": "",
|
|
476
476
|
variant: "plain"
|
|
477
477
|
}, {
|
|
478
478
|
default: oe(() => [
|
|
479
|
-
|
|
479
|
+
R.value ? ($(), re(x, {
|
|
480
480
|
key: 0,
|
|
481
|
-
icon:
|
|
482
|
-
class: qe(`bg-${
|
|
481
|
+
icon: R.value.icon.name,
|
|
482
|
+
class: qe(`bg-${R.value.icon.tailwind}`),
|
|
483
483
|
compact: ""
|
|
484
484
|
}, {
|
|
485
485
|
default: oe(() => [
|
|
486
|
-
B(
|
|
487
|
-
name:
|
|
488
|
-
color:
|
|
486
|
+
B(w, {
|
|
487
|
+
name: R.value.icon.name,
|
|
488
|
+
color: R.value.icon.color
|
|
489
489
|
}, null, 8, ["name", "color"]),
|
|
490
|
-
|
|
490
|
+
H("p", {
|
|
491
491
|
class: "fm-typo-en-body-md-600",
|
|
492
|
-
style: Ee({ color:
|
|
493
|
-
}, Te(
|
|
492
|
+
style: Ee({ color: R.value.icon.color })
|
|
493
|
+
}, Te(R.value.value), 5)
|
|
494
494
|
]),
|
|
495
495
|
_: 1
|
|
496
496
|
}, 8, ["icon", "class"])) : Fe("", !0),
|
|
497
|
-
s(l).endDate !== null && s(l).startDate !== null &&
|
|
497
|
+
s(l).endDate !== null && s(l).startDate !== null && R.value === null ? ($(), re(x, {
|
|
498
498
|
key: 1,
|
|
499
499
|
compact: ""
|
|
500
500
|
}, {
|
|
501
501
|
default: oe(() => [
|
|
502
|
-
B(
|
|
502
|
+
B(w, {
|
|
503
503
|
name: "arrow_upward",
|
|
504
504
|
color: "#C7C7CC"
|
|
505
505
|
}),
|
|
506
|
-
|
|
506
|
+
i[0] || (i[0] = H("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
})) : Fe("", !0)
|
|
@@ -511,27 +511,27 @@ const Il = /* @__PURE__ */ Le({
|
|
|
511
511
|
_: 1
|
|
512
512
|
}, 8, ["content"])
|
|
513
513
|
]),
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
c.value ? ($(), te("div", Ol, [
|
|
515
|
+
z(c.value.type) === "line" ? ($(), re(y, {
|
|
516
516
|
key: 0,
|
|
517
517
|
class: "sparkline",
|
|
518
|
-
datasets:
|
|
518
|
+
datasets: p.value,
|
|
519
519
|
legend: {
|
|
520
520
|
display: !1
|
|
521
521
|
},
|
|
522
522
|
datalabels: { display: !1 },
|
|
523
|
-
"x-axis": { categories:
|
|
523
|
+
"x-axis": { categories: c.value.dimensions },
|
|
524
524
|
"y-cfg": { display: !1 },
|
|
525
525
|
"x-cfg": { display: !1 },
|
|
526
526
|
"maintain-aspect-ratio": !1
|
|
527
527
|
}, null, 8, ["datasets", "x-axis"])) : Fe("", !0)
|
|
528
|
-
])) : ($(), te("div",
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
528
|
+
])) : ($(), te("div", Hl, i[1] || (i[1] = [
|
|
529
|
+
H("div", { class: "sparkline" }, [
|
|
530
|
+
H("div", { class: "flex flex-col gap-8" }, [
|
|
531
|
+
H("div"),
|
|
532
|
+
H("div")
|
|
533
533
|
]),
|
|
534
|
-
|
|
534
|
+
H("div", { class: "grow" })
|
|
535
535
|
], -1)
|
|
536
536
|
])))
|
|
537
537
|
]);
|
|
@@ -539,150 +539,150 @@ const Il = /* @__PURE__ */ Le({
|
|
|
539
539
|
}
|
|
540
540
|
}), Ul = {};
|
|
541
541
|
function Gl(e, a) {
|
|
542
|
-
const
|
|
543
|
-
return $(), re(
|
|
542
|
+
const o = O("FmMenuDivider");
|
|
543
|
+
return $(), re(o);
|
|
544
544
|
}
|
|
545
|
-
const Yl = /* @__PURE__ */ $l(Ul, [["render", Gl]]), Xl = "mf-reporttable-dimension", Nt =
|
|
546
|
-
const e =
|
|
547
|
-
e.value = v,
|
|
548
|
-
},
|
|
549
|
-
a[v] =
|
|
550
|
-
},
|
|
551
|
-
const
|
|
552
|
-
[...
|
|
553
|
-
const
|
|
554
|
-
|
|
545
|
+
const Yl = /* @__PURE__ */ $l(Ul, [["render", Gl]]), Xl = "mf-reporttable-dimension", Nt = Ht(Xl, () => {
|
|
546
|
+
const e = h(0), a = h([]), o = h(!1), l = (v, n) => {
|
|
547
|
+
e.value = v, _(v, n);
|
|
548
|
+
}, g = (v, n, T, m) => {
|
|
549
|
+
a[v] = n, a.value = [...a.value], D(v, n, T, m);
|
|
550
|
+
}, _ = (v, n) => {
|
|
551
|
+
const T = (n == null ? void 0 : n.querySelectorAll("thead tr")) ?? [], m = (n == null ? void 0 : n.querySelectorAll("tbody tr")) ?? [];
|
|
552
|
+
[...T, ...m].forEach((U) => {
|
|
553
|
+
const K = U;
|
|
554
|
+
K && (K.style.height = `${v}px`);
|
|
555
555
|
});
|
|
556
|
-
},
|
|
557
|
-
const L = (
|
|
556
|
+
}, D = (v, n, T, m = !1) => {
|
|
557
|
+
const L = (T == null ? void 0 : T.querySelectorAll("th")) ?? [];
|
|
558
558
|
if (v === void 0) return;
|
|
559
|
-
const U = L[v],
|
|
560
|
-
if (!U ||
|
|
559
|
+
const U = L[v], K = m ? a[v] : n;
|
|
560
|
+
if (!U || K === void 0) return;
|
|
561
561
|
const ee = () => {
|
|
562
|
-
U.style.width = `${
|
|
562
|
+
U.style.width = `${K}px`;
|
|
563
563
|
};
|
|
564
|
-
|
|
565
|
-
},
|
|
566
|
-
const v = document.querySelectorAll("th"),
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
const v = document.querySelectorAll("th"),
|
|
570
|
-
v.forEach((L) => L.classList.remove("toggleEditResize")),
|
|
571
|
-
},
|
|
564
|
+
m ? requestAnimationFrame(ee) : ee();
|
|
565
|
+
}, R = () => {
|
|
566
|
+
const v = document.querySelectorAll("th"), n = document.querySelectorAll("td"), T = document.querySelector("table");
|
|
567
|
+
T == null || T.classList.add("table-fixed"), v.forEach((m) => m.classList.add("toggleEditResize")), n.forEach((m) => m.classList.add("toggleEditResize")), o.value = !0;
|
|
568
|
+
}, z = () => {
|
|
569
|
+
const v = document.querySelectorAll("th"), n = document.querySelectorAll("td"), T = document.querySelectorAll(".col-resize-handle"), m = document.querySelectorAll(".row-resize-handle");
|
|
570
|
+
v.forEach((L) => L.classList.remove("toggleEditResize")), n.forEach((L) => L.classList.remove("toggleEditResize")), T.forEach((L) => L.remove()), m.forEach((L) => L.remove()), o.value = !1;
|
|
571
|
+
}, c = () => {
|
|
572
572
|
e.value = 0, a.value = [];
|
|
573
|
-
},
|
|
574
|
-
if (
|
|
575
|
-
const
|
|
576
|
-
[...
|
|
573
|
+
}, p = (v, n) => {
|
|
574
|
+
if (n) {
|
|
575
|
+
const T = document.querySelectorAll(`thead th:nth-child(${v + 1})`), m = document.querySelectorAll(`tbody td:nth-child(${v + 1})`);
|
|
576
|
+
[...T, ...m].forEach((L) => {
|
|
577
577
|
L.classList.add("highlight-hover-col");
|
|
578
578
|
});
|
|
579
579
|
} else
|
|
580
580
|
document.querySelectorAll(
|
|
581
581
|
`thead th:nth-child(${v + 1}), tbody td:nth-child(${v + 1})`
|
|
582
|
-
).forEach((
|
|
583
|
-
}, m = (v) => {
|
|
584
|
-
const o = document.querySelectorAll("thead tr"), k = document.querySelectorAll("tbody tr"), p = [...o, ...k];
|
|
585
|
-
for (const L of p)
|
|
586
|
-
v ? L.classList.add("highlight-hover-row") : L.classList.add("highlight-row");
|
|
582
|
+
).forEach((T) => T.classList.add("highlight-col"));
|
|
587
583
|
}, d = (v) => {
|
|
588
|
-
const
|
|
589
|
-
for (const
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
v ?
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
},
|
|
596
|
-
|
|
584
|
+
const n = document.querySelectorAll("thead tr"), T = document.querySelectorAll("tbody tr"), m = [...n, ...T];
|
|
585
|
+
for (const L of m)
|
|
586
|
+
v ? L.classList.add("highlight-hover-row") : L.classList.add("highlight-row");
|
|
587
|
+
}, i = (v) => {
|
|
588
|
+
const n = v ? ".highlight-hover-row" : ".highlight-row", T = document.querySelectorAll(n);
|
|
589
|
+
for (const m of T)
|
|
590
|
+
m.classList.remove(n.slice(1));
|
|
591
|
+
}, w = (v) => {
|
|
592
|
+
v ? document.querySelectorAll(".highlight-hover-col").forEach((n) => {
|
|
593
|
+
n.classList.remove("highlight-hover-col");
|
|
594
|
+
}) : document.querySelectorAll(".highlight-col").forEach((n) => n.classList.remove("highlight-col"));
|
|
595
|
+
}, x = (v, n) => {
|
|
596
|
+
const T = /* @__PURE__ */ new Map(), m = v.clientX, L = v.target.closest("table"), U = L == null ? void 0 : L.querySelectorAll("th")[n], K = U == null ? void 0 : U.getBoundingClientRect().width, ee = T.get(n) ? a[n.toString()] || 60 : (T.set(n, !0), K || a[n.toString()] || 60), se = U == null ? void 0 : U.querySelector("p");
|
|
597
597
|
if (!se) return;
|
|
598
598
|
const ke = se.textContent || "", ve = window.getComputedStyle(se), _e = `${ve.fontWeight} ${ve.fontSize} ${ve.fontFamily}`, fe = document.createElement("canvas").getContext("2d");
|
|
599
599
|
if (!fe) return;
|
|
600
600
|
fe.font = _e;
|
|
601
|
-
const b = fe.measureText(ke),
|
|
602
|
-
|
|
601
|
+
const b = fe.measureText(ke), V = window.getComputedStyle(U), G = parseFloat(V.paddingLeft || "0"), P = parseFloat(V.paddingRight || "0"), I = b.width + G + P;
|
|
602
|
+
p(n, !1);
|
|
603
603
|
const M = (xe) => {
|
|
604
|
-
const Se = xe.clientX -
|
|
604
|
+
const Se = xe.clientX - m, ge = Math.max(I, ee + Se);
|
|
605
605
|
if (L) {
|
|
606
|
-
|
|
606
|
+
g(n, ge, L, !0);
|
|
607
607
|
let t = 0;
|
|
608
|
-
L.querySelectorAll("th").forEach((
|
|
609
|
-
t += N ===
|
|
608
|
+
L.querySelectorAll("th").forEach((S, N) => {
|
|
609
|
+
t += N === n ? ge : a[N] || S.getBoundingClientRect().width;
|
|
610
610
|
}), L.classList.remove("w-full"), L.style.width = `${t}px`;
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
|
|
611
|
+
const F = L == null ? void 0 : L.parentElement;
|
|
612
|
+
if (F) {
|
|
613
|
+
const S = F.scrollWidth, N = F.scrollLeft;
|
|
614
|
+
F.offsetWidth + N >= S - 100 && (F.scrollLeft = S);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
}, ie = () => {
|
|
618
618
|
const xe = (L == null ? void 0 : L.querySelectorAll("th")) ?? [], Se = [...a.value];
|
|
619
619
|
xe.forEach((ge, t) => {
|
|
620
|
-
const
|
|
621
|
-
a[t] =
|
|
622
|
-
}), a.value = Se,
|
|
620
|
+
const f = ge.getBoundingClientRect().width;
|
|
621
|
+
a[t] = f, Se[t] = f;
|
|
622
|
+
}), a.value = Se, w(!1), document.removeEventListener("mousemove", M), document.removeEventListener("mouseup", ie);
|
|
623
623
|
};
|
|
624
624
|
document.addEventListener("mousemove", M), document.addEventListener("mouseup", ie);
|
|
625
625
|
}, C = (v) => {
|
|
626
|
-
const
|
|
627
|
-
|
|
628
|
-
const L = (
|
|
629
|
-
const ee = Math.max(30,
|
|
630
|
-
|
|
626
|
+
const n = v.clientY, T = v.target.closest("table"), m = e.value || 48;
|
|
627
|
+
d(!1);
|
|
628
|
+
const L = (K) => {
|
|
629
|
+
const ee = Math.max(30, m + (K.clientY - n));
|
|
630
|
+
T && l(ee, T);
|
|
631
631
|
}, U = () => {
|
|
632
|
-
|
|
632
|
+
i(!1), document.removeEventListener("mousemove", L), document.removeEventListener("mouseup", U);
|
|
633
633
|
};
|
|
634
634
|
document.addEventListener("mousemove", L), document.addEventListener("mouseup", U);
|
|
635
635
|
};
|
|
636
636
|
return {
|
|
637
637
|
rowHeight: e,
|
|
638
638
|
colWidths: a,
|
|
639
|
-
isEditing:
|
|
639
|
+
isEditing: o,
|
|
640
640
|
updateRowHeight: l,
|
|
641
|
-
updateColWidth:
|
|
642
|
-
setRowHeights:
|
|
643
|
-
setColWidths:
|
|
644
|
-
enableEditMode:
|
|
645
|
-
disableEditMode:
|
|
646
|
-
resetStore:
|
|
647
|
-
highlightCol:
|
|
648
|
-
highlightRows:
|
|
649
|
-
removeRowHighlight:
|
|
650
|
-
removeColHighlight:
|
|
651
|
-
resizeCol:
|
|
641
|
+
updateColWidth: g,
|
|
642
|
+
setRowHeights: _,
|
|
643
|
+
setColWidths: D,
|
|
644
|
+
enableEditMode: R,
|
|
645
|
+
disableEditMode: z,
|
|
646
|
+
resetStore: c,
|
|
647
|
+
highlightCol: p,
|
|
648
|
+
highlightRows: d,
|
|
649
|
+
removeRowHighlight: i,
|
|
650
|
+
removeColHighlight: w,
|
|
651
|
+
resizeCol: x,
|
|
652
652
|
resizeRow: C,
|
|
653
653
|
enableCellResizing: () => {
|
|
654
|
-
const v = document.querySelector("thead"),
|
|
654
|
+
const v = document.querySelector("thead"), n = document.querySelectorAll("thead tr"), T = document.querySelectorAll("tbody tr"), m = [...n, ...T];
|
|
655
655
|
v && v.classList.remove("sticky");
|
|
656
|
-
const L = (U,
|
|
656
|
+
const L = (U, K) => {
|
|
657
657
|
const ee = document.createElement("div");
|
|
658
|
-
return ee.className = `${U}-resize-handle`, U === "col" ? (ee.addEventListener("mouseenter", () =>
|
|
659
|
-
se.stopPropagation(),
|
|
660
|
-
})) : (ee.addEventListener("mouseenter", () =>
|
|
658
|
+
return ee.className = `${U}-resize-handle`, U === "col" ? (ee.addEventListener("mouseenter", () => p(K, !0)), ee.addEventListener("mouseleave", () => w(!0)), ee.addEventListener("mousedown", (se) => {
|
|
659
|
+
se.stopPropagation(), x(se, K);
|
|
660
|
+
})) : (ee.addEventListener("mouseenter", () => d(!0)), ee.addEventListener("mouseleave", () => i(!0)), ee.addEventListener("mousedown", (se) => {
|
|
661
661
|
se.stopPropagation(), C(se);
|
|
662
662
|
})), ee;
|
|
663
663
|
};
|
|
664
|
-
|
|
665
|
-
const
|
|
666
|
-
U.querySelectorAll(
|
|
664
|
+
m.forEach((U) => {
|
|
665
|
+
const K = U.closest("thead") !== null;
|
|
666
|
+
U.querySelectorAll(K ? "th" : "td").forEach((se, ke) => {
|
|
667
667
|
const ve = L("col", ke), _e = L("row", ke);
|
|
668
668
|
se.appendChild(ve), se.appendChild(_e);
|
|
669
669
|
});
|
|
670
|
-
}),
|
|
670
|
+
}), R();
|
|
671
671
|
},
|
|
672
672
|
cancelResizingChanges: () => {
|
|
673
|
-
|
|
673
|
+
z();
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
676
|
});
|
|
677
677
|
function pt(e) {
|
|
678
678
|
if (e == null || e === "")
|
|
679
679
|
return "";
|
|
680
|
-
const a = String(e),
|
|
681
|
-
if (isNaN(
|
|
682
|
-
const [l,
|
|
683
|
-
return
|
|
680
|
+
const a = String(e), o = Number(a);
|
|
681
|
+
if (isNaN(o)) return a;
|
|
682
|
+
const [l, g] = a.split("."), _ = new Intl.NumberFormat("en-US").format(Number(l));
|
|
683
|
+
return g !== void 0 ? `${_}.${g}` : _;
|
|
684
684
|
}
|
|
685
|
-
const jl = "/assets/processTableData.worker-B_-FBESg.js",
|
|
685
|
+
const jl = "/assets/processTableData.worker-B_-FBESg.js", Kl = { class: "my-4" }, Jl = {
|
|
686
686
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
687
687
|
style: { backgroundColor: "#f9f9f9" }
|
|
688
688
|
}, Zl = { class: "font-bold" }, Ql = { class: "text-fm-color-neutral-gray-300" }, ea = /* @__PURE__ */ Le({
|
|
@@ -695,29 +695,29 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
695
695
|
}),
|
|
696
696
|
emits: ["update:modelValue"],
|
|
697
697
|
setup(e) {
|
|
698
|
-
const { t: a, te:
|
|
698
|
+
const { t: a, te: o } = tt(), l = Me(e, "modelValue"), { country: g } = St(), { clearTileSorts: _, setTileSorts: D } = xl(), R = Ct(), z = e, c = h([]), { isEditing: p, colWidths: d, rowHeight: i } = $e(Nt()), { setColWidths: w, setRowHeights: x, enableCellResizing: C } = Nt(), y = h(null), W = k(() => {
|
|
699
699
|
var b;
|
|
700
700
|
return ((b = l.value.data) == null ? void 0 : b.columns) || [{ label: "", key: "" }];
|
|
701
|
-
}), v =
|
|
701
|
+
}), v = k(() => {
|
|
702
702
|
var b;
|
|
703
703
|
return ((b = l.value.data) == null ? void 0 : b.rows) || [];
|
|
704
|
-
}),
|
|
705
|
-
var b,
|
|
706
|
-
if (!(
|
|
704
|
+
}), n = k(() => l.value.filterText), T = k(() => {
|
|
705
|
+
var b, V;
|
|
706
|
+
if (!(n.value && n.value.trim().length > 0 || !((b = v.value[0]) != null && b.isRollup) && !((V = v.value[v.value.length - 1]) != null && V.isRollup))) {
|
|
707
707
|
if (l.value.rollupPosition === Pe.top || l.value.rollupPosition === void 0)
|
|
708
708
|
return Pe.top;
|
|
709
709
|
if (l.value.rollupPosition === Pe.bottom)
|
|
710
710
|
return Pe.bottom;
|
|
711
711
|
}
|
|
712
|
-
}),
|
|
713
|
-
const P =
|
|
712
|
+
}), m = k(() => {
|
|
713
|
+
const P = T.value !== void 0 ? 1 : 0, I = (y.value ? y.value.$el.offsetHeight : 0) - 48;
|
|
714
714
|
return Math.floor((I - 34.5 - 32) / 48) - P;
|
|
715
|
-
}), L =
|
|
716
|
-
var
|
|
715
|
+
}), L = k(() => {
|
|
716
|
+
var V, G;
|
|
717
717
|
let b = [];
|
|
718
|
-
switch (
|
|
718
|
+
switch (T.value) {
|
|
719
719
|
case Pe.top:
|
|
720
|
-
b = [...((
|
|
720
|
+
b = [...((V = v.value[0]) == null ? void 0 : V.cells) || []].map((P, I) => {
|
|
721
721
|
var M;
|
|
722
722
|
return {
|
|
723
723
|
main: P,
|
|
@@ -737,30 +737,30 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
737
737
|
});
|
|
738
738
|
break;
|
|
739
739
|
}
|
|
740
|
-
return b.length > 0 && b[0].main === "" && (b[0].main =
|
|
740
|
+
return b.length > 0 && b[0].main === "" && (b[0].main = Oe(a, o, "Grand Total", "other")), b;
|
|
741
741
|
});
|
|
742
742
|
function U(b) {
|
|
743
|
-
let
|
|
744
|
-
return
|
|
745
|
-
main:
|
|
743
|
+
let V = (b == null ? void 0 : b.main) || "";
|
|
744
|
+
return V.includes("#") && !V.startsWith("#") && (V = V.split("#")[0]), !b || b.main === "" || b.comparison === "" ? {
|
|
745
|
+
main: V
|
|
746
746
|
} : {
|
|
747
|
-
main:
|
|
747
|
+
main: V,
|
|
748
748
|
comparison: b == null ? void 0 : b.comparison,
|
|
749
|
-
difference: Ut(b.main, b.comparison,
|
|
749
|
+
difference: Ut(b.main, b.comparison, g)
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
752
|
Ue(() => {
|
|
753
|
-
|
|
753
|
+
_();
|
|
754
754
|
});
|
|
755
|
-
const
|
|
755
|
+
const K = h([]);
|
|
756
756
|
let ee = 0, se;
|
|
757
757
|
function ke() {
|
|
758
758
|
var I;
|
|
759
759
|
if (!((I = l.value) != null && I.data)) {
|
|
760
|
-
|
|
760
|
+
K.value = [];
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
|
-
const b = ++ee,
|
|
763
|
+
const b = ++ee, V = (l.value.data.rows || []).map((M) => ({
|
|
764
764
|
isRollup: M.isRollup,
|
|
765
765
|
cells: Array.isArray(M.cells) ? [...M.cells] : [],
|
|
766
766
|
comparisonCells: Array.isArray(M.comparisonCells) ? [...M.comparisonCells] : []
|
|
@@ -769,37 +769,37 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
769
769
|
type: M.type,
|
|
770
770
|
label: M.label
|
|
771
771
|
})), P = {
|
|
772
|
-
rows:
|
|
772
|
+
rows: V,
|
|
773
773
|
columns: G,
|
|
774
|
-
filter:
|
|
775
|
-
globalSorts: fl(
|
|
774
|
+
filter: n.value ?? "",
|
|
775
|
+
globalSorts: fl(c.value).map((M) => ({
|
|
776
776
|
key: M.key,
|
|
777
777
|
type: M.type
|
|
778
778
|
})),
|
|
779
|
-
grandTotalPosition:
|
|
780
|
-
pageSize:
|
|
779
|
+
grandTotalPosition: T.value,
|
|
780
|
+
pageSize: m.value
|
|
781
781
|
};
|
|
782
782
|
Sl(jl, P).then((M) => {
|
|
783
|
-
b === ee && (M != null && M.error ? (
|
|
783
|
+
b === ee && (M != null && M.error ? (R.open({ message: "Failed to process table data. Please retry.", type: "error" }), console.log(M.error), K.value = []) : K.value = vl(M.data || []));
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
he(
|
|
787
|
-
() =>
|
|
787
|
+
() => c.value,
|
|
788
788
|
(b) => {
|
|
789
|
-
|
|
789
|
+
z.tileIndex === void 0 || z.tileIndex === null || D(z.tileIndex, b);
|
|
790
790
|
},
|
|
791
791
|
{ immediate: !0, deep: !0 }
|
|
792
792
|
);
|
|
793
|
-
const ve =
|
|
793
|
+
const ve = k(() => {
|
|
794
794
|
var G, P;
|
|
795
|
-
const b = ((G = l.value.data) == null ? void 0 : G.rows) || [],
|
|
795
|
+
const b = ((G = l.value.data) == null ? void 0 : G.rows) || [], V = ((P = l.value.data) == null ? void 0 : P.columns) || [];
|
|
796
796
|
return JSON.stringify({
|
|
797
797
|
rowsLength: b.length,
|
|
798
|
-
columns:
|
|
799
|
-
filter:
|
|
800
|
-
globalSorts:
|
|
801
|
-
grandTotalPosition:
|
|
802
|
-
pageSize:
|
|
798
|
+
columns: V.map((I) => ({ key: I.key, type: I.type, label: I.label })),
|
|
799
|
+
filter: n.value ?? "",
|
|
800
|
+
globalSorts: c.value.map((I) => ({ key: I.key, type: I.type })),
|
|
801
|
+
grandTotalPosition: T.value,
|
|
802
|
+
pageSize: m.value
|
|
803
803
|
});
|
|
804
804
|
});
|
|
805
805
|
he(
|
|
@@ -810,37 +810,37 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
810
810
|
{ immediate: !0 }
|
|
811
811
|
);
|
|
812
812
|
function _e(b) {
|
|
813
|
-
const
|
|
814
|
-
if (!
|
|
815
|
-
|
|
813
|
+
const V = c.value.find((G) => G.key === b);
|
|
814
|
+
if (!V) {
|
|
815
|
+
c.value.push({ key: b, type: Be.Asc });
|
|
816
816
|
return;
|
|
817
817
|
}
|
|
818
|
-
|
|
818
|
+
V.type === Be.Asc ? V.type = Be.Desc : V.type === Be.Desc && (c.value = c.value.filter((G) => G.key !== b));
|
|
819
819
|
}
|
|
820
|
-
const De =
|
|
820
|
+
const De = k(
|
|
821
821
|
() => {
|
|
822
822
|
var b;
|
|
823
|
-
return (((b = l.value.colWidths) == null ? void 0 : b.length) ?? 0) > 0 ||
|
|
823
|
+
return (((b = l.value.colWidths) == null ? void 0 : b.length) ?? 0) > 0 || d.value.length > 0;
|
|
824
824
|
}
|
|
825
|
-
), fe =
|
|
825
|
+
), fe = k(() => {
|
|
826
826
|
var b;
|
|
827
|
-
return (b = l.value.data) != null && b.columns ? l.value.data.columns.map((
|
|
828
|
-
const G =
|
|
827
|
+
return (b = l.value.data) != null && b.columns ? l.value.data.columns.map((V) => {
|
|
828
|
+
const G = Oe(a, o, V.label, "other"), P = c.value.find((ie) => ie.key === V.key), I = !!P, M = I ? P.type === Be.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
|
|
829
829
|
return {
|
|
830
|
-
accessorKey:
|
|
830
|
+
accessorKey: V.key,
|
|
831
831
|
header: () => {
|
|
832
|
-
const ie =
|
|
832
|
+
const ie = O("FmIcon");
|
|
833
833
|
return st(
|
|
834
834
|
"button",
|
|
835
835
|
{
|
|
836
836
|
type: "button",
|
|
837
|
-
class: `w-full flex items-center gap-1 group/select-header select-none ${
|
|
838
|
-
onClick: () => _e(
|
|
837
|
+
class: `w-full flex items-center gap-1 group/select-header select-none ${V.type === "NUMERIC" ? "justify-end" : "justify-start"} ${I ? "text-fm-color-typo-primary" : "text-fm-color-neutral-gray-400"}`,
|
|
838
|
+
onClick: () => _e(V.key)
|
|
839
839
|
},
|
|
840
840
|
[
|
|
841
841
|
st(
|
|
842
842
|
"span",
|
|
843
|
-
{ class: `${
|
|
843
|
+
{ class: `${V.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap` },
|
|
844
844
|
G
|
|
845
845
|
),
|
|
846
846
|
st(ie, {
|
|
@@ -861,11 +861,11 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
861
861
|
{
|
|
862
862
|
class: [
|
|
863
863
|
Se ? "fm-typo-en-body-md-600 text-fm-color-typo-secondary" : "fm-typo-en-body-md-400",
|
|
864
|
-
|
|
864
|
+
V.type === "NUMERIC" ? "text-right" : "",
|
|
865
865
|
De.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
866
866
|
].join(" ")
|
|
867
867
|
},
|
|
868
|
-
[
|
|
868
|
+
[V.type === "NUMERIC" ? pt(xe.main) : xe.main]
|
|
869
869
|
);
|
|
870
870
|
},
|
|
871
871
|
enableSorting: !1
|
|
@@ -873,59 +873,59 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
873
873
|
}) : [];
|
|
874
874
|
});
|
|
875
875
|
return he(
|
|
876
|
-
() =>
|
|
876
|
+
() => d.value.length > 0,
|
|
877
877
|
async (b) => {
|
|
878
|
-
b &&
|
|
878
|
+
b && p.value && (await we(), C());
|
|
879
879
|
}
|
|
880
880
|
), he(
|
|
881
881
|
[() => fe.value],
|
|
882
882
|
async () => {
|
|
883
883
|
var I;
|
|
884
884
|
await we();
|
|
885
|
-
const b = (I =
|
|
885
|
+
const b = (I = y.value) == null ? void 0 : I.$el;
|
|
886
886
|
if (!b) return;
|
|
887
|
-
const
|
|
888
|
-
if (!
|
|
889
|
-
|
|
887
|
+
const V = b.querySelector("table");
|
|
888
|
+
if (!V) return;
|
|
889
|
+
V.classList.add(De.value ? "table-fixed" : "table-auto");
|
|
890
890
|
let G, P;
|
|
891
|
-
|
|
892
|
-
|
|
891
|
+
p.value ? (C(), G = d.value, P = i.value) : (P = l.value.rowHeight, G = l.value.colWidths), typeof P == "number" && x(P, b), G == null || G.forEach((M, ie) => {
|
|
892
|
+
w(ie, M, b);
|
|
893
893
|
});
|
|
894
894
|
},
|
|
895
895
|
{ immediate: !0 }
|
|
896
|
-
), (b,
|
|
897
|
-
const G =
|
|
896
|
+
), (b, V) => {
|
|
897
|
+
const G = O("FmTable");
|
|
898
898
|
return $(), te(be, null, [
|
|
899
|
-
|
|
899
|
+
H("div", Kl, [
|
|
900
900
|
Ne(b.$slots, "menu")
|
|
901
901
|
]),
|
|
902
902
|
B(G, {
|
|
903
903
|
ref_key: "table",
|
|
904
|
-
ref:
|
|
904
|
+
ref: y,
|
|
905
905
|
"column-defs": fe.value,
|
|
906
|
-
"row-data":
|
|
907
|
-
"search-value":
|
|
908
|
-
"page-size":
|
|
906
|
+
"row-data": K.value,
|
|
907
|
+
"search-value": n.value,
|
|
908
|
+
"page-size": m.value,
|
|
909
909
|
"shrink-at": !1,
|
|
910
910
|
"force-mobile-footer": !0,
|
|
911
911
|
class: "scrollbar-hide-table"
|
|
912
912
|
}, {
|
|
913
913
|
"pin-top": oe(() => [
|
|
914
|
-
|
|
915
|
-
|
|
914
|
+
H("tbody", null, [
|
|
915
|
+
H("tr", Jl, [
|
|
916
916
|
($(!0), te(be, null, nt(L.value, (P, I) => ($(), te("td", {
|
|
917
917
|
key: `${s(ot)()}_${I}`,
|
|
918
918
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
919
919
|
}, [
|
|
920
|
-
|
|
920
|
+
H("span", {
|
|
921
921
|
class: qe([
|
|
922
922
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
923
923
|
P.rowType === "NUMERIC" ? "text-right" : "",
|
|
924
924
|
De.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
925
925
|
])
|
|
926
926
|
}, [
|
|
927
|
-
|
|
928
|
-
|
|
927
|
+
H("p", Zl, Te(P.rowType === "NUMERIC" ? s(pt)(P.main) : P.main), 1),
|
|
928
|
+
H("p", Ql, Te(P.comparison ? P.rowType === "NUMERIC" ? `(${s(pt)(P.comparison)})` : `(${P.comparison})` : ""), 1)
|
|
929
929
|
], 2)
|
|
930
930
|
]))), 128))
|
|
931
931
|
])
|
|
@@ -946,60 +946,60 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
946
946
|
}),
|
|
947
947
|
emits: ["update:modelValue"],
|
|
948
948
|
setup(e) {
|
|
949
|
-
const a = e,
|
|
949
|
+
const a = e, o = Me(e, "modelValue"), l = h(null), g = k(() => {
|
|
950
950
|
var W;
|
|
951
|
-
return ((W =
|
|
952
|
-
}),
|
|
953
|
-
var
|
|
954
|
-
return ((
|
|
955
|
-
}), { datalabels:
|
|
956
|
-
|
|
957
|
-
),
|
|
958
|
-
...
|
|
959
|
-
let v =
|
|
951
|
+
return ((W = o.value.data) == null ? void 0 : W.xAxis) || [];
|
|
952
|
+
}), _ = k(() => {
|
|
953
|
+
var y;
|
|
954
|
+
return ((y = o.value.data) == null ? void 0 : y.datasets) ?? [];
|
|
955
|
+
}), { datalabels: D, xCfg: R, yCfg: z, isTransposed: c, legend: p, chartWidth: d, chartHeight: i } = lt(
|
|
956
|
+
o.value
|
|
957
|
+
), w = k(() => _.value.length > 0 ? [
|
|
958
|
+
..._.value.map((y, W) => {
|
|
959
|
+
let v = y.values;
|
|
960
960
|
return {
|
|
961
|
-
label:
|
|
961
|
+
label: y.name,
|
|
962
962
|
data: v,
|
|
963
|
-
dash: !!
|
|
964
|
-
backgroundColor: Ae({ index: W, isCompare:
|
|
963
|
+
dash: !!y.isCompare,
|
|
964
|
+
backgroundColor: Ae({ index: W, isCompare: y.isCompare })
|
|
965
965
|
};
|
|
966
966
|
})
|
|
967
|
-
] : []),
|
|
967
|
+
] : []), x = et();
|
|
968
968
|
function C() {
|
|
969
|
-
return
|
|
969
|
+
return x.extractChartSize(l.value, a.tileIndex) || { width: 0, height: 0 };
|
|
970
970
|
}
|
|
971
971
|
return Ue(() => {
|
|
972
972
|
we(() => {
|
|
973
973
|
C();
|
|
974
974
|
});
|
|
975
|
-
}), he([
|
|
975
|
+
}), he([w], () => {
|
|
976
976
|
we(() => C());
|
|
977
|
-
}), (
|
|
978
|
-
const v =
|
|
977
|
+
}), (y, W) => {
|
|
978
|
+
const v = O("FmBarChart");
|
|
979
979
|
return $(), te(be, null, [
|
|
980
|
-
Ne(
|
|
980
|
+
Ne(y.$slots, "menu"),
|
|
981
981
|
B(v, {
|
|
982
982
|
ref_key: "chartRef",
|
|
983
983
|
ref: l,
|
|
984
984
|
class: "bar-chart",
|
|
985
|
-
datasets:
|
|
986
|
-
"x-axis": { categories:
|
|
987
|
-
"x-cfg": s(
|
|
988
|
-
"y-cfg": s(
|
|
989
|
-
transpose: s(
|
|
985
|
+
datasets: w.value,
|
|
986
|
+
"x-axis": { categories: g.value },
|
|
987
|
+
"x-cfg": s(R),
|
|
988
|
+
"y-cfg": s(z),
|
|
989
|
+
transpose: s(c),
|
|
990
990
|
stacked: !0,
|
|
991
991
|
legend: {
|
|
992
|
-
display: s(
|
|
993
|
-
position: s(
|
|
994
|
-
maxHeight: s(
|
|
995
|
-
maxWidth: s(
|
|
996
|
-
labels: s(
|
|
992
|
+
display: s(p).display ?? !1,
|
|
993
|
+
position: s(p).position,
|
|
994
|
+
maxHeight: s(p).maxHeight,
|
|
995
|
+
maxWidth: s(p).maxWidth,
|
|
996
|
+
labels: s(p).labels
|
|
997
997
|
},
|
|
998
|
-
datalabels: s(
|
|
998
|
+
datalabels: s(D),
|
|
999
999
|
"maintain-aspect-ratio": !1,
|
|
1000
1000
|
style: Ee({
|
|
1001
|
-
"--chart-width": s(
|
|
1002
|
-
"--chart-height": s(
|
|
1001
|
+
"--chart-width": s(d) !== void 0 ? s(d) + "px" : "100%",
|
|
1002
|
+
"--chart-height": s(i) !== void 0 ? s(i) + "px" : "calc(100% - 36px)"
|
|
1003
1003
|
})
|
|
1004
1004
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1005
1005
|
], 64);
|
|
@@ -1016,32 +1016,32 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
1016
1016
|
emits: ["update:modelValue"],
|
|
1017
1017
|
setup(e) {
|
|
1018
1018
|
var v;
|
|
1019
|
-
const a = e,
|
|
1020
|
-
() => l.length === 1 &&
|
|
1021
|
-
),
|
|
1022
|
-
var
|
|
1023
|
-
return ((
|
|
1024
|
-
}), { datalabels:
|
|
1025
|
-
|
|
1026
|
-
), C =
|
|
1027
|
-
...
|
|
1028
|
-
let
|
|
1029
|
-
return
|
|
1030
|
-
label:
|
|
1031
|
-
data:
|
|
1032
|
-
dash:
|
|
1019
|
+
const a = e, o = Me(e, "modelValue"), l = ((v = o.value.data) == null ? void 0 : v.xAxis) ?? [], g = k(
|
|
1020
|
+
() => l.length === 1 && R.value.length > 0 && R.value.every((n) => n.values.length === 1)
|
|
1021
|
+
), _ = k(() => g.value ? ["", l[0], ""] : l), D = h(null), R = k(() => {
|
|
1022
|
+
var n;
|
|
1023
|
+
return ((n = o.value.data) == null ? void 0 : n.datasets) ?? [];
|
|
1024
|
+
}), { datalabels: z, xCfg: c, yCfg: p, isTransposed: d, legend: i, chartWidth: w, chartHeight: x } = lt(
|
|
1025
|
+
o.value
|
|
1026
|
+
), C = k(() => R.value.length > 0 ? [
|
|
1027
|
+
...R.value.map((n, T) => {
|
|
1028
|
+
let m = n.values;
|
|
1029
|
+
return g.value && (m = [NaN, m[0], NaN]), {
|
|
1030
|
+
label: n.name,
|
|
1031
|
+
data: m,
|
|
1032
|
+
dash: n.isCompare,
|
|
1033
1033
|
fill: !1,
|
|
1034
|
-
color: Ae({ index:
|
|
1035
|
-
pointRadius:
|
|
1036
|
-
pointHoverRadius:
|
|
1037
|
-
pointBackgroundColor:
|
|
1038
|
-
pointBorderColor:
|
|
1039
|
-
pointBorderWidth:
|
|
1034
|
+
color: Ae({ index: T, isCompare: n.isCompare }),
|
|
1035
|
+
pointRadius: g.value ? 4 : void 0,
|
|
1036
|
+
pointHoverRadius: g.value ? 6 : void 0,
|
|
1037
|
+
pointBackgroundColor: g.value ? Ae({ index: T, isCompare: n.isCompare }) : void 0,
|
|
1038
|
+
pointBorderColor: g.value ? Ae({ index: T, isCompare: n.isCompare }) : void 0,
|
|
1039
|
+
pointBorderWidth: g.value ? 2 : void 0
|
|
1040
1040
|
};
|
|
1041
1041
|
})
|
|
1042
|
-
] : []),
|
|
1042
|
+
] : []), y = et();
|
|
1043
1043
|
function W() {
|
|
1044
|
-
return
|
|
1044
|
+
return y.extractChartSize(D.value, a.tileIndex) || { width: 0, height: 0 };
|
|
1045
1045
|
}
|
|
1046
1046
|
return Ue(() => {
|
|
1047
1047
|
we(() => {
|
|
@@ -1049,38 +1049,38 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
1049
1049
|
});
|
|
1050
1050
|
}), he([C], () => {
|
|
1051
1051
|
we(() => W());
|
|
1052
|
-
}), (
|
|
1053
|
-
const
|
|
1052
|
+
}), (n, T) => {
|
|
1053
|
+
const m = O("FmLineChart");
|
|
1054
1054
|
return $(), te(be, null, [
|
|
1055
|
-
Ne(
|
|
1056
|
-
B(
|
|
1055
|
+
Ne(n.$slots, "menu"),
|
|
1056
|
+
B(m, {
|
|
1057
1057
|
ref_key: "chartRef",
|
|
1058
|
-
ref:
|
|
1058
|
+
ref: D,
|
|
1059
1059
|
class: "line-chart",
|
|
1060
1060
|
datasets: C.value,
|
|
1061
|
-
"x-axis": { categories:
|
|
1062
|
-
"x-cfg": s(
|
|
1063
|
-
"y-cfg": s(
|
|
1064
|
-
transpose: s(
|
|
1061
|
+
"x-axis": { categories: _.value },
|
|
1062
|
+
"x-cfg": s(c),
|
|
1063
|
+
"y-cfg": s(p),
|
|
1064
|
+
transpose: s(d),
|
|
1065
1065
|
legend: {
|
|
1066
|
-
display: s(
|
|
1067
|
-
position: s(
|
|
1068
|
-
maxHeight: s(
|
|
1069
|
-
maxWidth: s(
|
|
1070
|
-
labels: s(
|
|
1066
|
+
display: s(i).display ?? !1,
|
|
1067
|
+
position: s(i).position,
|
|
1068
|
+
maxHeight: s(i).maxHeight,
|
|
1069
|
+
maxWidth: s(i).maxWidth,
|
|
1070
|
+
labels: s(i).labels
|
|
1071
1071
|
},
|
|
1072
1072
|
stacked: !0,
|
|
1073
|
-
datalabels: s(
|
|
1073
|
+
datalabels: s(z),
|
|
1074
1074
|
"maintain-aspect-ratio": !1,
|
|
1075
1075
|
style: Ee({
|
|
1076
|
-
"--chart-width": s(
|
|
1077
|
-
"--chart-height": s(
|
|
1076
|
+
"--chart-width": s(w) !== void 0 ? s(w) + "px" : "100%",
|
|
1077
|
+
"--chart-height": s(x) !== void 0 ? s(x) + "px" : "calc(100% - 36px)"
|
|
1078
1078
|
})
|
|
1079
1079
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1080
1080
|
], 64);
|
|
1081
1081
|
};
|
|
1082
1082
|
}
|
|
1083
|
-
}),
|
|
1083
|
+
}), Je = [
|
|
1084
1084
|
"col-span-1",
|
|
1085
1085
|
"col-span-2",
|
|
1086
1086
|
"col-span-3",
|
|
@@ -1095,13 +1095,13 @@ const jl = "/assets/processTableData.worker-B_-FBESg.js", Jl = { class: "my-4" }
|
|
|
1095
1095
|
"col-span-12"
|
|
1096
1096
|
];
|
|
1097
1097
|
function aa(e) {
|
|
1098
|
-
return e < 12 ?
|
|
1098
|
+
return e < 12 ? Je[e - 1] : Je[11];
|
|
1099
1099
|
}
|
|
1100
1100
|
function sa(e) {
|
|
1101
|
-
return e < 12 ?
|
|
1101
|
+
return e < 12 ? Je[Math.min(11, e * 2 - 1)] : Je[11];
|
|
1102
1102
|
}
|
|
1103
1103
|
function oa(e) {
|
|
1104
|
-
return e < 12 ?
|
|
1104
|
+
return e < 12 ? Je[Math.min(11, e * 3 - 1)] : Je[11];
|
|
1105
1105
|
}
|
|
1106
1106
|
const na = /* @__PURE__ */ Le({
|
|
1107
1107
|
__name: "WidgetLinechart",
|
|
@@ -1114,32 +1114,32 @@ const na = /* @__PURE__ */ Le({
|
|
|
1114
1114
|
emits: ["update:modelValue"],
|
|
1115
1115
|
setup(e) {
|
|
1116
1116
|
var v;
|
|
1117
|
-
const a = e,
|
|
1118
|
-
() => l.length === 1 &&
|
|
1119
|
-
),
|
|
1120
|
-
var
|
|
1121
|
-
return ((
|
|
1122
|
-
}), { datalabels:
|
|
1123
|
-
|
|
1124
|
-
), C =
|
|
1125
|
-
...
|
|
1126
|
-
let
|
|
1127
|
-
return
|
|
1128
|
-
label:
|
|
1129
|
-
data:
|
|
1130
|
-
dash: !!
|
|
1117
|
+
const a = e, o = Me(e, "modelValue"), l = ((v = o.value.data) == null ? void 0 : v.xAxis) ?? [], g = k(
|
|
1118
|
+
() => l.length === 1 && R.value.length > 0 && R.value.every((n) => n.values.length === 1)
|
|
1119
|
+
), _ = k(() => g.value ? ["", l[0], ""] : l), D = h(null), R = k(() => {
|
|
1120
|
+
var n;
|
|
1121
|
+
return ((n = o.value.data) == null ? void 0 : n.datasets) ?? [];
|
|
1122
|
+
}), { datalabels: z, xCfg: c, yCfg: p, isTransposed: d, legend: i, chartWidth: w, chartHeight: x } = lt(
|
|
1123
|
+
o.value
|
|
1124
|
+
), C = k(() => R.value.length > 0 ? [
|
|
1125
|
+
...R.value.map((n, T) => {
|
|
1126
|
+
let m = n.values;
|
|
1127
|
+
return g.value && (m = [NaN, m[0], NaN]), {
|
|
1128
|
+
label: n.name,
|
|
1129
|
+
data: m,
|
|
1130
|
+
dash: !!n.isCompare,
|
|
1131
1131
|
fill: !1,
|
|
1132
|
-
color: Ae({ index:
|
|
1133
|
-
pointRadius:
|
|
1134
|
-
pointHoverRadius:
|
|
1135
|
-
pointBackgroundColor:
|
|
1136
|
-
pointBorderColor:
|
|
1137
|
-
pointBorderWidth:
|
|
1132
|
+
color: Ae({ index: T, isCompare: n.isCompare }),
|
|
1133
|
+
pointRadius: g.value ? 4 : void 0,
|
|
1134
|
+
pointHoverRadius: g.value ? 6 : void 0,
|
|
1135
|
+
pointBackgroundColor: g.value ? Ae({ index: T, isCompare: n.isCompare }) : void 0,
|
|
1136
|
+
pointBorderColor: g.value ? Ae({ index: T, isCompare: n.isCompare }) : void 0,
|
|
1137
|
+
pointBorderWidth: g.value ? 2 : void 0
|
|
1138
1138
|
};
|
|
1139
1139
|
})
|
|
1140
|
-
] : []),
|
|
1140
|
+
] : []), y = et();
|
|
1141
1141
|
function W() {
|
|
1142
|
-
return
|
|
1142
|
+
return y.extractChartSize(D.value, a.tileIndex) || { width: 0, height: 0 };
|
|
1143
1143
|
}
|
|
1144
1144
|
return Ue(() => {
|
|
1145
1145
|
we(() => {
|
|
@@ -1147,31 +1147,31 @@ const na = /* @__PURE__ */ Le({
|
|
|
1147
1147
|
});
|
|
1148
1148
|
}), he([C], () => {
|
|
1149
1149
|
we(() => W());
|
|
1150
|
-
}), (
|
|
1151
|
-
const
|
|
1150
|
+
}), (n, T) => {
|
|
1151
|
+
const m = O("FmLineChart");
|
|
1152
1152
|
return $(), te(be, null, [
|
|
1153
|
-
Ne(
|
|
1154
|
-
B(
|
|
1153
|
+
Ne(n.$slots, "menu"),
|
|
1154
|
+
B(m, {
|
|
1155
1155
|
ref_key: "chartRef",
|
|
1156
|
-
ref:
|
|
1156
|
+
ref: D,
|
|
1157
1157
|
class: "line-chart",
|
|
1158
1158
|
datasets: C.value,
|
|
1159
|
-
"x-axis": { categories:
|
|
1160
|
-
"x-cfg": s(
|
|
1161
|
-
"y-cfg": s(
|
|
1162
|
-
transpose: s(
|
|
1159
|
+
"x-axis": { categories: _.value },
|
|
1160
|
+
"x-cfg": s(c),
|
|
1161
|
+
"y-cfg": s(p),
|
|
1162
|
+
transpose: s(d),
|
|
1163
1163
|
legend: {
|
|
1164
|
-
display: s(
|
|
1165
|
-
position: s(
|
|
1166
|
-
maxHeight: s(
|
|
1167
|
-
maxWidth: s(
|
|
1168
|
-
labels: s(
|
|
1164
|
+
display: s(i).display ?? !1,
|
|
1165
|
+
position: s(i).position,
|
|
1166
|
+
maxHeight: s(i).maxHeight,
|
|
1167
|
+
maxWidth: s(i).maxWidth,
|
|
1168
|
+
labels: s(i).labels
|
|
1169
1169
|
},
|
|
1170
|
-
datalabels: s(
|
|
1170
|
+
datalabels: s(z),
|
|
1171
1171
|
"maintain-aspect-ratio": !1,
|
|
1172
1172
|
style: Ee({
|
|
1173
|
-
"--chart-width": s(
|
|
1174
|
-
"--chart-height": s(
|
|
1173
|
+
"--chart-width": s(w) !== void 0 ? s(w) + "px" : "100%",
|
|
1174
|
+
"--chart-height": s(x) !== void 0 ? s(x) + "px" : "calc(100% - 36px)"
|
|
1175
1175
|
})
|
|
1176
1176
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1177
1177
|
], 64);
|
|
@@ -1188,51 +1188,51 @@ const na = /* @__PURE__ */ Le({
|
|
|
1188
1188
|
}),
|
|
1189
1189
|
emits: ["update:modelValue"],
|
|
1190
1190
|
setup(e) {
|
|
1191
|
-
const { t: a } = tt(), { FmForm:
|
|
1192
|
-
function
|
|
1191
|
+
const { t: a } = tt(), { FmForm: o } = zl, l = e, g = h(), _ = Me(e, "modelValue"), D = h(!0), R = h(!1), z = Ct(), { selectedLocationIds: c, dateRange: p, timeRange: d } = $e(Qe()), i = h(dt.PORTRAIT);
|
|
1192
|
+
function w() {
|
|
1193
1193
|
var C;
|
|
1194
|
-
(C =
|
|
1194
|
+
(C = g.value) == null || C.validateInputs();
|
|
1195
1195
|
}
|
|
1196
|
-
async function
|
|
1197
|
-
|
|
1196
|
+
async function x() {
|
|
1197
|
+
R.value = !0;
|
|
1198
1198
|
try {
|
|
1199
1199
|
l.index != null && await Bt({
|
|
1200
1200
|
reportType: l.reportType,
|
|
1201
1201
|
index: l.index,
|
|
1202
|
-
orientationTypes: [
|
|
1203
|
-
isCombinedLocationLayout:
|
|
1204
|
-
timeRange:
|
|
1205
|
-
dateRange:
|
|
1206
|
-
locationIds:
|
|
1202
|
+
orientationTypes: [i.value],
|
|
1203
|
+
isCombinedLocationLayout: D.value,
|
|
1204
|
+
timeRange: d.value,
|
|
1205
|
+
dateRange: p.value,
|
|
1206
|
+
locationIds: c.value
|
|
1207
1207
|
});
|
|
1208
1208
|
} catch (C) {
|
|
1209
|
-
|
|
1209
|
+
z.open({ message: C.message, type: "error" });
|
|
1210
1210
|
} finally {
|
|
1211
|
-
|
|
1211
|
+
R.value = !1;
|
|
1212
1212
|
}
|
|
1213
1213
|
}
|
|
1214
|
-
return (C,
|
|
1215
|
-
const W =
|
|
1216
|
-
return $(), re(
|
|
1217
|
-
modelValue:
|
|
1218
|
-
"onUpdate:modelValue":
|
|
1214
|
+
return (C, y) => {
|
|
1215
|
+
const W = O("FmRadio"), v = O("FmRadioGroup"), n = O("FmButton"), T = O("FmDialog");
|
|
1216
|
+
return $(), re(T, {
|
|
1217
|
+
modelValue: _.value,
|
|
1218
|
+
"onUpdate:modelValue": y[2] || (y[2] = (m) => _.value = m),
|
|
1219
1219
|
overlay: !0,
|
|
1220
1220
|
"z-index": 10
|
|
1221
1221
|
}, {
|
|
1222
|
-
"dialog-header": oe(() =>
|
|
1222
|
+
"dialog-header": oe(() => y[3] || (y[3] = [
|
|
1223
1223
|
ht("Select Orientation")
|
|
1224
1224
|
])),
|
|
1225
1225
|
default: oe(() => [
|
|
1226
|
-
B(s(
|
|
1226
|
+
B(s(o), {
|
|
1227
1227
|
ref_key: "form",
|
|
1228
|
-
ref:
|
|
1229
|
-
onValidationSuccess:
|
|
1228
|
+
ref: g,
|
|
1229
|
+
onValidationSuccess: x
|
|
1230
1230
|
}, {
|
|
1231
1231
|
default: oe(() => [
|
|
1232
|
-
|
|
1232
|
+
H("div", ra, [
|
|
1233
1233
|
B(v, {
|
|
1234
|
-
modelValue:
|
|
1235
|
-
"onUpdate:modelValue":
|
|
1234
|
+
modelValue: i.value,
|
|
1235
|
+
"onUpdate:modelValue": y[0] || (y[0] = (m) => i.value = m)
|
|
1236
1236
|
}, {
|
|
1237
1237
|
default: oe(() => [
|
|
1238
1238
|
B(W, {
|
|
@@ -1247,18 +1247,18 @@ const na = /* @__PURE__ */ Le({
|
|
|
1247
1247
|
_: 1
|
|
1248
1248
|
}, 8, ["modelValue"])
|
|
1249
1249
|
]),
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
B(
|
|
1250
|
+
H("div", ia, [
|
|
1251
|
+
y[4] || (y[4] = H("div", { class: "grow" }, null, -1)),
|
|
1252
|
+
B(n, {
|
|
1253
1253
|
label: s(a)("report.common.cancel"),
|
|
1254
1254
|
variant: "tertiary",
|
|
1255
|
-
onClick:
|
|
1255
|
+
onClick: y[1] || (y[1] = (m) => _.value = !1)
|
|
1256
1256
|
}, null, 8, ["label"]),
|
|
1257
|
-
|
|
1258
|
-
B(
|
|
1257
|
+
H("div", null, [
|
|
1258
|
+
B(n, {
|
|
1259
1259
|
label: s(a)("report.common.download"),
|
|
1260
|
-
loading:
|
|
1261
|
-
onClick:
|
|
1260
|
+
loading: R.value,
|
|
1261
|
+
onClick: w
|
|
1262
1262
|
}, null, 8, ["label", "loading"])
|
|
1263
1263
|
])
|
|
1264
1264
|
])
|
|
@@ -1299,33 +1299,33 @@ const na = /* @__PURE__ */ Le({
|
|
|
1299
1299
|
}),
|
|
1300
1300
|
emits: ["update:modelValue"],
|
|
1301
1301
|
setup(e) {
|
|
1302
|
-
const a =
|
|
1302
|
+
const a = h(!0), o = Me(e, "modelValue"), l = o.value.widget.config, { t: g, te: _ } = tt(), D = e, R = h(null), z = h(l.rollup), c = h(ot()), p = h(l.drillDimension), d = k(() => {
|
|
1303
1303
|
if (We.value.length > 0) {
|
|
1304
1304
|
const r = We.value.findIndex(
|
|
1305
|
-
(Q) => Q.value ===
|
|
1305
|
+
(Q) => Q.value === p.value
|
|
1306
1306
|
);
|
|
1307
1307
|
return r >= 0 ? r : 0;
|
|
1308
1308
|
} else
|
|
1309
1309
|
return -1;
|
|
1310
|
-
}),
|
|
1311
|
-
() =>
|
|
1312
|
-
),
|
|
1313
|
-
() =>
|
|
1314
|
-
), ne =
|
|
1310
|
+
}), i = k(() => d.value !== 0), w = k(
|
|
1311
|
+
() => d.value != We.value.length - 1
|
|
1312
|
+
), x = h(l.showTitle ?? !0), C = h(l.titleFontSize ?? 14), y = h(l.titleBold ?? !1), W = h(l.titleItalic ?? !1), v = h(l.titleUnderline ?? !1), n = h(l.chartWidth ?? void 0), T = h(l.chartHeight ?? void 0), m = h(l.showLabel ?? !1), L = h(l.labelAlign ?? yt.center), U = h(l.labelAnchor ?? gt.center), K = h(l.labelRotation ?? 0), ee = h(l.labelOffset ?? 0), se = h(l.labelFontSize ?? 12), ke = k(() => l.showSearchBar), ve = h(l.showX ?? !0), _e = h(l.xPosition ?? bt.bottom), De = h(l.showXGrid ?? !1), fe = h(l.showXTick ?? !0), b = h(l.xTickFontSize ?? 12), V = h(l.showXTitle ?? !1), G = h(l.xTitle ?? ""), P = h(l.xTitleFontSize ?? 12), I = h(l.showY ?? !0), M = h(l.yPosition ?? wt.left), ie = h(l.showYGrid ?? !1), xe = h(l.showYTick ?? !0), Se = h(l.yTickFontSize ?? 12), ge = h(l.showYTitle ?? !1), t = h(l.yTitle ?? ""), f = h(l.yTitleFontSize ?? 12), F = h(l.showLegend ?? void 0), S = h(l.legendPosition ?? xt.top), N = h(l.usePointStyle ?? !0), le = h(l.legendMaxHeight), de = h(l.legendMaxWidth), me = h(l.rowHeight ?? 0), J = h(l.colWidths ?? []), E = h(!1), u = h(""), { breakpoints: X, getBreakpointsBoundary: j } = qt(), Z = h(), q = k(
|
|
1313
|
+
() => D.customScreenWidth === void 0 ? window.innerWidth : D.customScreenWidth
|
|
1314
|
+
), ne = k(
|
|
1315
1315
|
() => (q == null ? void 0 : q.value) > j("xs")[1] && (q == null ? void 0 : q.value) <= j("sm")[1]
|
|
1316
|
-
), ae =
|
|
1316
|
+
), ae = k(
|
|
1317
1317
|
() => (q == null ? void 0 : q.value) > j("sm")[1] && (q == null ? void 0 : q.value) <= j("md")[1]
|
|
1318
|
-
), ye =
|
|
1319
|
-
const r =
|
|
1318
|
+
), ye = k(() => (q == null ? void 0 : q.value) > j("md")[1]), ue = k(() => {
|
|
1319
|
+
const r = o.value.size.width;
|
|
1320
1320
|
return ye.value || ae.value ? aa(r) : ne.value ? sa(r) : oa(r);
|
|
1321
|
-
}), Ge =
|
|
1322
|
-
() => Al.find((r) => r.type ===
|
|
1321
|
+
}), Ge = k(
|
|
1322
|
+
() => Al.find((r) => r.type === o.value.widget.type)
|
|
1323
1323
|
), Y = Mt(() => {
|
|
1324
1324
|
var r;
|
|
1325
|
-
Z.value = ll((r =
|
|
1326
|
-
}), Yt =
|
|
1325
|
+
Z.value = ll((r = R.value) == null ? void 0 : r.$el.offsetWidth), c.value = ot();
|
|
1326
|
+
}), Yt = k(() => {
|
|
1327
1327
|
if (El(ce.value.type, Ye.value))
|
|
1328
|
-
switch (
|
|
1328
|
+
switch (o.value.widget.type) {
|
|
1329
1329
|
case A.BarChart:
|
|
1330
1330
|
return Il;
|
|
1331
1331
|
case A.StackBarChart:
|
|
@@ -1347,23 +1347,23 @@ const na = /* @__PURE__ */ Le({
|
|
|
1347
1347
|
}
|
|
1348
1348
|
else
|
|
1349
1349
|
return ft;
|
|
1350
|
-
}), Ye =
|
|
1350
|
+
}), Ye = h(null), {
|
|
1351
1351
|
selectedLocationIds: rt,
|
|
1352
1352
|
dateRange: kt,
|
|
1353
1353
|
compareDateRange: Xt,
|
|
1354
1354
|
timeRange: _t,
|
|
1355
1355
|
globalFilters: jt,
|
|
1356
1356
|
isGlobalFiltersLoading: Tt
|
|
1357
|
-
} = $e(Qe()), { businessId:
|
|
1358
|
-
|
|
1359
|
-
const Zt =
|
|
1360
|
-
const r = JSON.parse(JSON.stringify(
|
|
1357
|
+
} = $e(Qe()), { businessId: Kt } = $e(St()), { businessLoadedId: Jt, businessDataVersion: it } = $e(Qe());
|
|
1358
|
+
k(() => Jt.value === Kt.value && rt.value.length > 0 && !Tt.value);
|
|
1359
|
+
const Zt = h(!0), ce = k(() => {
|
|
1360
|
+
const r = JSON.parse(JSON.stringify(o.value.widget));
|
|
1361
1361
|
return {
|
|
1362
1362
|
...r,
|
|
1363
1363
|
config: {
|
|
1364
1364
|
...r.config,
|
|
1365
|
-
rollup:
|
|
1366
|
-
drillDimension:
|
|
1365
|
+
rollup: z.value,
|
|
1366
|
+
drillDimension: p.value,
|
|
1367
1367
|
showGrandTotal: !1
|
|
1368
1368
|
}
|
|
1369
1369
|
};
|
|
@@ -1371,17 +1371,17 @@ const na = /* @__PURE__ */ Le({
|
|
|
1371
1371
|
function Qt() {
|
|
1372
1372
|
return {
|
|
1373
1373
|
data: Ye.value,
|
|
1374
|
-
showTitle:
|
|
1374
|
+
showTitle: x.value,
|
|
1375
1375
|
titleFontSize: C.value,
|
|
1376
|
-
titleBold:
|
|
1376
|
+
titleBold: y.value,
|
|
1377
1377
|
titleItalic: W.value,
|
|
1378
1378
|
titleUnderline: v.value,
|
|
1379
|
-
chartHeight:
|
|
1380
|
-
chartWidth:
|
|
1381
|
-
showLabel:
|
|
1379
|
+
chartHeight: T.value,
|
|
1380
|
+
chartWidth: n.value,
|
|
1381
|
+
showLabel: m.value,
|
|
1382
1382
|
labelAnchor: U.value,
|
|
1383
1383
|
labelAlign: L.value,
|
|
1384
|
-
labelRotation:
|
|
1384
|
+
labelRotation: K.value,
|
|
1385
1385
|
labelOffset: ee.value,
|
|
1386
1386
|
labelFontSize: se.value,
|
|
1387
1387
|
showX: ve.value,
|
|
@@ -1389,7 +1389,7 @@ const na = /* @__PURE__ */ Le({
|
|
|
1389
1389
|
showXGrid: De.value,
|
|
1390
1390
|
showXTick: fe.value,
|
|
1391
1391
|
xTickFontSize: b.value,
|
|
1392
|
-
showXTitle:
|
|
1392
|
+
showXTitle: V.value,
|
|
1393
1393
|
xTitle: G.value,
|
|
1394
1394
|
xTitleFontSize: P.value,
|
|
1395
1395
|
showY: I.value,
|
|
@@ -1398,11 +1398,11 @@ const na = /* @__PURE__ */ Le({
|
|
|
1398
1398
|
showYTick: xe.value,
|
|
1399
1399
|
yTitle: t.value,
|
|
1400
1400
|
showYTitle: ge.value,
|
|
1401
|
-
yTitleFontSize:
|
|
1401
|
+
yTitleFontSize: f.value,
|
|
1402
1402
|
yTickFontSize: Se.value,
|
|
1403
1403
|
isTransposed: ce.value.config.isTransposed,
|
|
1404
|
-
showLegend:
|
|
1405
|
-
legendPosition:
|
|
1404
|
+
showLegend: F.value,
|
|
1405
|
+
legendPosition: S.value,
|
|
1406
1406
|
usePointStyle: N.value,
|
|
1407
1407
|
legendMaxHeight: le.value,
|
|
1408
1408
|
legendMaxWidth: de.value
|
|
@@ -1414,10 +1414,10 @@ const na = /* @__PURE__ */ Le({
|
|
|
1414
1414
|
filterText: u.value,
|
|
1415
1415
|
rollupPosition: ce.value.config.rollupPosition,
|
|
1416
1416
|
rowHeight: me.value,
|
|
1417
|
-
colWidths:
|
|
1417
|
+
colWidths: J.value
|
|
1418
1418
|
};
|
|
1419
1419
|
}
|
|
1420
|
-
const Ft =
|
|
1420
|
+
const Ft = k(() => {
|
|
1421
1421
|
switch (ce.value.type) {
|
|
1422
1422
|
case A.Table:
|
|
1423
1423
|
return el();
|
|
@@ -1430,42 +1430,42 @@ const na = /* @__PURE__ */ Le({
|
|
|
1430
1430
|
default:
|
|
1431
1431
|
return { data: Ye.value };
|
|
1432
1432
|
}
|
|
1433
|
-
}), Lt =
|
|
1434
|
-
const { config: r } =
|
|
1433
|
+
}), Lt = k(() => {
|
|
1434
|
+
const { config: r } = o.value.widget;
|
|
1435
1435
|
if (r.rollup != null) {
|
|
1436
1436
|
const Q = [...r.dimensions].filter((Re) => !Re.hide);
|
|
1437
1437
|
return Q.sort(
|
|
1438
1438
|
(Re, Ze) => (r.rowIds || []).indexOf(mt(Re)) - (r.rowIds || []).indexOf(mt(Ze))
|
|
1439
1439
|
), [
|
|
1440
|
-
{ label:
|
|
1441
|
-
{ label:
|
|
1440
|
+
{ label: Oe(g, _, "None", "other"), value: "none" },
|
|
1441
|
+
{ label: Oe(g, _, "Grand Total", "other"), value: 0 },
|
|
1442
1442
|
...[...Q].slice(0, Q.length - 1).map((Re, Ze) => ({
|
|
1443
|
-
label:
|
|
1443
|
+
label: Oe(g, _, Re.label, "other"),
|
|
1444
1444
|
value: Ze + 1
|
|
1445
1445
|
}))
|
|
1446
1446
|
];
|
|
1447
1447
|
}
|
|
1448
1448
|
return [];
|
|
1449
|
-
}), We =
|
|
1449
|
+
}), We = k(() => {
|
|
1450
1450
|
const { config: r } = ce.value;
|
|
1451
1451
|
return r.isDrillable ? r.dimensions.map((Q) => ({
|
|
1452
|
-
label:
|
|
1452
|
+
label: Oe(g, _, Q.label, "other"),
|
|
1453
1453
|
value: mt(Q)
|
|
1454
1454
|
})) : [];
|
|
1455
|
-
}), tl =
|
|
1456
|
-
const r =
|
|
1455
|
+
}), tl = k(() => {
|
|
1456
|
+
const r = o.value.id;
|
|
1457
1457
|
return (jt.value || []).filter(
|
|
1458
1458
|
(Q) => Array.isArray(Q.tileIds) && Q.tileIds.includes(r)
|
|
1459
1459
|
);
|
|
1460
1460
|
});
|
|
1461
1461
|
he(
|
|
1462
|
-
() =>
|
|
1462
|
+
() => o.value.widget.config,
|
|
1463
1463
|
(r) => {
|
|
1464
|
-
|
|
1464
|
+
z.value = r.rollup, x.value = r.showTitle ?? !0, C.value = r.titleFontSize ?? 14, y.value = r.titleBold ?? !1, W.value = r.titleItalic ?? !1, v.value = r.titleUnderline ?? !1, T.value = r.chartHeight ?? void 0, n.value = r.chartWidth ?? void 0, m.value = r.showLabel ?? !1, L.value = r.labelAlign ?? yt.center, U.value = r.labelAnchor ?? gt.center, K.value = r.labelRotation ?? 0, ee.value = r.labelOffset ?? 0, se.value = r.labelFontSize ?? 12, ve.value = r.showX ?? !0, _e.value = r.xPosition ?? bt.bottom, De.value = r.showXGrid ?? !1, fe.value = r.showXTick ?? !0, b.value = r.xTickFontSize ?? 12, V.value = r.showXTitle ?? !1, G.value = r.xTitle ?? "", P.value = r.xTitleFontSize ?? 12, I.value = r.showY ?? !0, M.value = r.yPosition ?? wt.left, ie.value = r.showYGrid ?? !1, xe.value = r.showYTick ?? !0, Se.value = r.yTickFontSize ?? 12, ge.value = r.showYTitle ?? !1, t.value = r.yTitle ?? "", f.value = r.yTitleFontSize ?? 12, F.value = r.showLegend ?? void 0, S.value = r.legendPosition ?? xt.top, N.value = r.usePointStyle ?? !0, le.value = r.legendMaxHeight, de.value = r.legendMaxWidth, me.value = r.rowHeight ?? 0, J.value = r.colWidths ?? [];
|
|
1465
1465
|
},
|
|
1466
1466
|
{ deep: !0 }
|
|
1467
|
-
), he([() =>
|
|
1468
|
-
|
|
1467
|
+
), he([() => z.value], () => {
|
|
1468
|
+
z.value !== null && (o.value.widget.config.rollup = z.value);
|
|
1469
1469
|
}), he(
|
|
1470
1470
|
[
|
|
1471
1471
|
() => ce.value,
|
|
@@ -1481,7 +1481,7 @@ const na = /* @__PURE__ */ Le({
|
|
|
1481
1481
|
},
|
|
1482
1482
|
{ deep: !0 }
|
|
1483
1483
|
), he(
|
|
1484
|
-
[() =>
|
|
1484
|
+
[() => o.value.size],
|
|
1485
1485
|
() => {
|
|
1486
1486
|
Y();
|
|
1487
1487
|
},
|
|
@@ -1503,50 +1503,50 @@ const na = /* @__PURE__ */ Le({
|
|
|
1503
1503
|
}
|
|
1504
1504
|
try {
|
|
1505
1505
|
a.value = !0, at && at.abort(), at = new AbortController();
|
|
1506
|
-
const r = at.signal, Q = it.value, Re = await Mt(
|
|
1507
|
-
it.value === Q && (Ye.value = Re,
|
|
1506
|
+
const r = at.signal, Q = it.value, Re = await Mt(Ot, 500)(ce.value, r, o.value.id);
|
|
1507
|
+
it.value === Q && (Ye.value = Re, c.value = ot()), a.value = !1;
|
|
1508
1508
|
} catch (r) {
|
|
1509
1509
|
r.code !== "ERR_CANCELED" && (Ye.value = null, Dt.open({ message: `Invalid chart ${ce.value.type}`, type: "error" }), console.log(r), a.value = !1);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
function ll(r) {
|
|
1513
|
-
switch (
|
|
1513
|
+
switch (o.value.widget.type) {
|
|
1514
1514
|
case "SPACER":
|
|
1515
1515
|
return;
|
|
1516
1516
|
case "SCORECARD":
|
|
1517
1517
|
return;
|
|
1518
1518
|
case "TABLE":
|
|
1519
|
-
return `${
|
|
1519
|
+
return `${o.value.size.height * 100 + (ke.value ? 72 : 0) + 96.5}px`;
|
|
1520
1520
|
}
|
|
1521
|
-
return `${Math.max(r /
|
|
1521
|
+
return `${Math.max(r / o.value.size.width, 90) * o.value.size.height}px`;
|
|
1522
1522
|
}
|
|
1523
1523
|
function al() {
|
|
1524
|
-
const r =
|
|
1525
|
-
r >= 0 && (
|
|
1524
|
+
const r = d.value - 1;
|
|
1525
|
+
r >= 0 && (p.value = We.value[r].value);
|
|
1526
1526
|
}
|
|
1527
1527
|
function sl() {
|
|
1528
|
-
const r =
|
|
1529
|
-
r >= 0 && r < We.value.length && (
|
|
1528
|
+
const r = d.value + 1;
|
|
1529
|
+
r >= 0 && r < We.value.length && (p.value = We.value[r].value);
|
|
1530
1530
|
}
|
|
1531
|
-
const Vt =
|
|
1531
|
+
const Vt = h(je.EXCEL), zt = h(), ol = Object.values(je).map((r) => ({
|
|
1532
1532
|
label: Cl(r),
|
|
1533
1533
|
value: r,
|
|
1534
1534
|
onClick: async () => {
|
|
1535
1535
|
r === je.EXCEL || r === je.PDFFULLSIZE || r === je.PDFRECEIPT ? await Bt({
|
|
1536
1536
|
reportType: r,
|
|
1537
|
-
index:
|
|
1537
|
+
index: D.index,
|
|
1538
1538
|
isCombinedLocationLayout: Zt.value,
|
|
1539
1539
|
timeRange: _t.value,
|
|
1540
1540
|
dateRange: kt.value,
|
|
1541
1541
|
locationIds: rt.value
|
|
1542
|
-
}) : r === je.PDF && (Vt.value = r, zt.value =
|
|
1542
|
+
}) : r === je.PDF && (Vt.value = r, zt.value = D.index, E.value = !0);
|
|
1543
1543
|
}
|
|
1544
1544
|
})), nl = ce.value.type === A.Spacer ? "flat" : "outlined", rl = ce.value.type === A.Spacer ? "p-0" : "p-16";
|
|
1545
1545
|
return (r, Q) => {
|
|
1546
|
-
const Re =
|
|
1546
|
+
const Re = O("FmTooltip"), Ze = O("FmSearch"), il = O("FmCheckbox"), ut = O("FmButton"), ul = O("FmSelect"), cl = O("FmMenuItem"), dl = O("FmMenu"), ml = O("FmForm"), pl = O("FmCircularProgress"), hl = O("FmCard");
|
|
1547
1547
|
return $(), re(hl, {
|
|
1548
1548
|
ref_key: "tileCard",
|
|
1549
|
-
ref:
|
|
1549
|
+
ref: R,
|
|
1550
1550
|
class: qe(`${ue.value} ${s(rl)}`),
|
|
1551
1551
|
variant: s(nl)
|
|
1552
1552
|
}, {
|
|
@@ -1562,10 +1562,10 @@ const na = /* @__PURE__ */ Le({
|
|
|
1562
1562
|
style: Ee({ height: Z.value })
|
|
1563
1563
|
}, [
|
|
1564
1564
|
($(), re(yl(Yt.value), {
|
|
1565
|
-
key:
|
|
1565
|
+
key: c.value,
|
|
1566
1566
|
modelValue: Ft.value,
|
|
1567
1567
|
"onUpdate:modelValue": Q[4] || (Q[4] = (Xe) => Ft.value = Xe),
|
|
1568
|
-
"tile-index":
|
|
1568
|
+
"tile-index": D.index
|
|
1569
1569
|
}, {
|
|
1570
1570
|
menu: oe(() => [
|
|
1571
1571
|
B(ml, { class: "flex items-center gap-2" }, {
|
|
@@ -1580,11 +1580,11 @@ const na = /* @__PURE__ */ Le({
|
|
|
1580
1580
|
disabled: !ce.value.description
|
|
1581
1581
|
}, {
|
|
1582
1582
|
default: oe(() => [
|
|
1583
|
-
|
|
1583
|
+
x.value !== !1 ? ($(), te("p", {
|
|
1584
1584
|
key: 0,
|
|
1585
1585
|
style: Ee({
|
|
1586
1586
|
fontSize: C.value + "px",
|
|
1587
|
-
fontWeight:
|
|
1587
|
+
fontWeight: y.value ? "bold" : "normal",
|
|
1588
1588
|
fontStyle: W.value ? "italic" : "normal",
|
|
1589
1589
|
textDecoration: v.value ? "underline" : "none"
|
|
1590
1590
|
}),
|
|
@@ -1592,7 +1592,7 @@ const na = /* @__PURE__ */ Le({
|
|
|
1592
1592
|
C.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
1593
1593
|
ce.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
1594
1594
|
]])
|
|
1595
|
-
}, Te(s(
|
|
1595
|
+
}, Te(s(Oe)(s(g), s(_), ce.value.title, "other")), 7)) : Fe("", !0)
|
|
1596
1596
|
]),
|
|
1597
1597
|
_: 1
|
|
1598
1598
|
}, 8, ["content", "disabled"]),
|
|
@@ -1603,8 +1603,8 @@ const na = /* @__PURE__ */ Le({
|
|
|
1603
1603
|
class: "grow"
|
|
1604
1604
|
}, null, 8, ["modelValue"])) : ($(), te("div", ca)),
|
|
1605
1605
|
bl(B(il, {
|
|
1606
|
-
modelValue:
|
|
1607
|
-
"onUpdate:modelValue": Q[2] || (Q[2] = (Ve) =>
|
|
1606
|
+
modelValue: m.value,
|
|
1607
|
+
"onUpdate:modelValue": Q[2] || (Q[2] = (Ve) => m.value = Ve),
|
|
1608
1608
|
label: "Label",
|
|
1609
1609
|
value: !1
|
|
1610
1610
|
}, null, 8, ["modelValue"]), [
|
|
@@ -1614,24 +1614,24 @@ const na = /* @__PURE__ */ Le({
|
|
|
1614
1614
|
B(ut, {
|
|
1615
1615
|
icon: "arrow_upward",
|
|
1616
1616
|
variant: "tertiary",
|
|
1617
|
-
disabled: !
|
|
1617
|
+
disabled: !i.value,
|
|
1618
1618
|
onClick: al
|
|
1619
1619
|
}, null, 8, ["disabled"]),
|
|
1620
1620
|
B(ut, {
|
|
1621
1621
|
icon: "arrow_downward",
|
|
1622
1622
|
variant: "tertiary",
|
|
1623
|
-
disabled: !
|
|
1623
|
+
disabled: !w.value,
|
|
1624
1624
|
onClick: sl
|
|
1625
1625
|
}, null, 8, ["disabled"])
|
|
1626
1626
|
])) : Fe("", !0),
|
|
1627
1627
|
(Et = Ge.value) != null && Et.showRollup && Lt.value.length > 0 ? ($(), re(ul, {
|
|
1628
1628
|
key: 3,
|
|
1629
|
-
modelValue:
|
|
1630
|
-
"onUpdate:modelValue": Q[3] || (Q[3] = (Ve) =>
|
|
1629
|
+
modelValue: z.value,
|
|
1630
|
+
"onUpdate:modelValue": Q[3] || (Q[3] = (Ve) => z.value = Ve),
|
|
1631
1631
|
class: "w-[150px]",
|
|
1632
1632
|
items: Lt.value
|
|
1633
1633
|
}, null, 8, ["modelValue", "items"])) : Fe("", !0),
|
|
1634
|
-
|
|
1634
|
+
D.hideExport ? Fe("", !0) : ($(), re(dl, {
|
|
1635
1635
|
key: 4,
|
|
1636
1636
|
shift: !0
|
|
1637
1637
|
}, {
|
|
@@ -1664,60 +1664,60 @@ const na = /* @__PURE__ */ Le({
|
|
|
1664
1664
|
};
|
|
1665
1665
|
}
|
|
1666
1666
|
});
|
|
1667
|
-
var
|
|
1667
|
+
var He = /* @__PURE__ */ ((e) => (e.Select = "Select", e.TextField = "TextField", e.Timestamp = "Timestamp", e))(He || {});
|
|
1668
1668
|
function ma(e) {
|
|
1669
|
-
let a = !1,
|
|
1669
|
+
let a = !1, o = 1;
|
|
1670
1670
|
switch (e) {
|
|
1671
1671
|
case Ce.Equal:
|
|
1672
1672
|
case Ce.NotEqual:
|
|
1673
1673
|
case Ce.Like:
|
|
1674
1674
|
case Ce.NotLike:
|
|
1675
|
-
a = !1,
|
|
1675
|
+
a = !1, o = 1;
|
|
1676
1676
|
break;
|
|
1677
1677
|
case Ce.GreaterThan:
|
|
1678
1678
|
case Ce.GreaterThanOrEqual:
|
|
1679
1679
|
case Ce.LessThan:
|
|
1680
1680
|
case Ce.LessThanOrEqual:
|
|
1681
|
-
a = !0,
|
|
1681
|
+
a = !0, o = 1;
|
|
1682
1682
|
break;
|
|
1683
1683
|
case Ce.Between:
|
|
1684
|
-
a = !0,
|
|
1684
|
+
a = !0, o = 2;
|
|
1685
1685
|
break;
|
|
1686
1686
|
}
|
|
1687
1687
|
return {
|
|
1688
1688
|
fixed: a,
|
|
1689
|
-
count:
|
|
1689
|
+
count: o
|
|
1690
1690
|
};
|
|
1691
1691
|
}
|
|
1692
1692
|
function Ba({
|
|
1693
1693
|
operator: e,
|
|
1694
1694
|
dimensionOption: a,
|
|
1695
|
-
dataType:
|
|
1695
|
+
dataType: o,
|
|
1696
1696
|
t: l
|
|
1697
1697
|
}) {
|
|
1698
|
-
const { fixed:
|
|
1699
|
-
switch (
|
|
1698
|
+
const { fixed: g, count: _ } = ma(e);
|
|
1699
|
+
switch (o) {
|
|
1700
1700
|
case ze.String:
|
|
1701
1701
|
return {
|
|
1702
1702
|
type: "TextField",
|
|
1703
|
-
fixed:
|
|
1704
|
-
count:
|
|
1703
|
+
fixed: g,
|
|
1704
|
+
count: _,
|
|
1705
1705
|
dataType: void 0,
|
|
1706
1706
|
default: ""
|
|
1707
1707
|
};
|
|
1708
1708
|
case ze.Numeric:
|
|
1709
1709
|
return {
|
|
1710
1710
|
type: "TextField",
|
|
1711
|
-
fixed:
|
|
1712
|
-
count:
|
|
1711
|
+
fixed: g,
|
|
1712
|
+
count: _,
|
|
1713
1713
|
dataType: "number",
|
|
1714
1714
|
default: 0
|
|
1715
1715
|
};
|
|
1716
1716
|
case ze.Bool:
|
|
1717
1717
|
return {
|
|
1718
1718
|
type: "Select",
|
|
1719
|
-
fixed:
|
|
1720
|
-
count:
|
|
1719
|
+
fixed: g,
|
|
1720
|
+
count: _,
|
|
1721
1721
|
options: [
|
|
1722
1722
|
{ label: l("report.common.yes"), value: !0 },
|
|
1723
1723
|
{ label: l("report.common.no"), value: !1 }
|
|
@@ -1727,20 +1727,20 @@ function Ba({
|
|
|
1727
1727
|
case ze.Timestamp:
|
|
1728
1728
|
return Gt({
|
|
1729
1729
|
dimensionOption: a,
|
|
1730
|
-
fixed:
|
|
1731
|
-
count:
|
|
1730
|
+
fixed: g,
|
|
1731
|
+
count: _,
|
|
1732
1732
|
t: l
|
|
1733
1733
|
});
|
|
1734
1734
|
}
|
|
1735
1735
|
return {
|
|
1736
1736
|
type: "TextField",
|
|
1737
|
-
fixed:
|
|
1738
|
-
count:
|
|
1737
|
+
fixed: g,
|
|
1738
|
+
count: _,
|
|
1739
1739
|
dataType: void 0,
|
|
1740
1740
|
default: ""
|
|
1741
1741
|
};
|
|
1742
1742
|
}
|
|
1743
|
-
function
|
|
1743
|
+
function Oa(e) {
|
|
1744
1744
|
switch (e) {
|
|
1745
1745
|
case pe.HourOfDay:
|
|
1746
1746
|
return 0;
|
|
@@ -1750,7 +1750,7 @@ function Ha(e) {
|
|
|
1750
1750
|
return;
|
|
1751
1751
|
}
|
|
1752
1752
|
}
|
|
1753
|
-
function
|
|
1753
|
+
function Ha(e) {
|
|
1754
1754
|
switch (e) {
|
|
1755
1755
|
case pe.HourOfDay:
|
|
1756
1756
|
return 23;
|
|
@@ -1763,26 +1763,26 @@ function Oa(e) {
|
|
|
1763
1763
|
function Gt({
|
|
1764
1764
|
dimensionOption: e,
|
|
1765
1765
|
fixed: a,
|
|
1766
|
-
count:
|
|
1766
|
+
count: o,
|
|
1767
1767
|
t: l
|
|
1768
1768
|
}) {
|
|
1769
1769
|
switch (e) {
|
|
1770
1770
|
case pe.HourOfDay:
|
|
1771
1771
|
return {
|
|
1772
|
-
type:
|
|
1772
|
+
type: He.Select,
|
|
1773
1773
|
fixed: a,
|
|
1774
|
-
count:
|
|
1775
|
-
options: Array.from({ length: 24 }, (
|
|
1776
|
-
label:
|
|
1777
|
-
value:
|
|
1774
|
+
count: o,
|
|
1775
|
+
options: Array.from({ length: 24 }, (g, _) => ({
|
|
1776
|
+
label: _.toString().padStart(2, "0"),
|
|
1777
|
+
value: _.toString()
|
|
1778
1778
|
})),
|
|
1779
1779
|
default: "0"
|
|
1780
1780
|
};
|
|
1781
1781
|
case pe.DayOfWeek:
|
|
1782
1782
|
return {
|
|
1783
|
-
type:
|
|
1783
|
+
type: He.Select,
|
|
1784
1784
|
fixed: a,
|
|
1785
|
-
count:
|
|
1785
|
+
count: o,
|
|
1786
1786
|
options: [
|
|
1787
1787
|
{ label: l("report.days.sunday"), value: "1" },
|
|
1788
1788
|
{ label: l("report.days.monday"), value: "2" },
|
|
@@ -1796,20 +1796,20 @@ function Gt({
|
|
|
1796
1796
|
};
|
|
1797
1797
|
case pe.DayOfMonth:
|
|
1798
1798
|
return {
|
|
1799
|
-
type:
|
|
1799
|
+
type: He.Select,
|
|
1800
1800
|
fixed: a,
|
|
1801
|
-
count:
|
|
1802
|
-
options: Array.from({ length: 31 }, (
|
|
1803
|
-
label: (
|
|
1804
|
-
value: (
|
|
1801
|
+
count: o,
|
|
1802
|
+
options: Array.from({ length: 31 }, (g, _) => ({
|
|
1803
|
+
label: (_ + 1).toString(),
|
|
1804
|
+
value: (_ + 1).toString()
|
|
1805
1805
|
})),
|
|
1806
1806
|
default: "1"
|
|
1807
1807
|
};
|
|
1808
1808
|
case pe.MonthOfYear:
|
|
1809
1809
|
return {
|
|
1810
|
-
type:
|
|
1810
|
+
type: He.Select,
|
|
1811
1811
|
fixed: a,
|
|
1812
|
-
count:
|
|
1812
|
+
count: o,
|
|
1813
1813
|
options: [
|
|
1814
1814
|
{ label: l("report.months.january"), value: "1" },
|
|
1815
1815
|
{ label: l("report.months.february"), value: "2" },
|
|
@@ -1828,9 +1828,9 @@ function Gt({
|
|
|
1828
1828
|
};
|
|
1829
1829
|
default:
|
|
1830
1830
|
return {
|
|
1831
|
-
type:
|
|
1831
|
+
type: He.Timestamp,
|
|
1832
1832
|
fixed: a,
|
|
1833
|
-
count:
|
|
1833
|
+
count: o,
|
|
1834
1834
|
default: (/* @__PURE__ */ new Date()).toISOString()
|
|
1835
1835
|
};
|
|
1836
1836
|
}
|
|
@@ -1839,17 +1839,17 @@ function Wt({
|
|
|
1839
1839
|
dimensionOption: e,
|
|
1840
1840
|
t: a
|
|
1841
1841
|
}) {
|
|
1842
|
-
const
|
|
1842
|
+
const o = Gt({
|
|
1843
1843
|
dimensionOption: e,
|
|
1844
1844
|
fixed: !1,
|
|
1845
1845
|
count: 1,
|
|
1846
1846
|
t: a
|
|
1847
1847
|
});
|
|
1848
|
-
return
|
|
1848
|
+
return o.type === He.Select ? o.options : [];
|
|
1849
1849
|
}
|
|
1850
1850
|
const pa = "mf-reportglobalFilter";
|
|
1851
1851
|
function Pt(e, a) {
|
|
1852
|
-
var
|
|
1852
|
+
var o;
|
|
1853
1853
|
return [
|
|
1854
1854
|
a,
|
|
1855
1855
|
e.schemaName,
|
|
@@ -1857,37 +1857,48 @@ function Pt(e, a) {
|
|
|
1857
1857
|
e.operator ?? "",
|
|
1858
1858
|
e.option ?? "",
|
|
1859
1859
|
e.dataFormula ?? "",
|
|
1860
|
-
((
|
|
1860
|
+
((o = e.tileIds) == null ? void 0 : o.join(",")) ?? ""
|
|
1861
1861
|
].join("|");
|
|
1862
1862
|
}
|
|
1863
|
-
const ha =
|
|
1864
|
-
const e =
|
|
1863
|
+
const ha = Ht(pa, () => {
|
|
1864
|
+
const e = h({}), a = h(!1), o = h(null), l = () => ({
|
|
1865
1865
|
search: "",
|
|
1866
1866
|
selectedValues: [],
|
|
1867
1867
|
keepSelection: !1,
|
|
1868
1868
|
showAdvanced: !1,
|
|
1869
1869
|
visibleCount: 50
|
|
1870
1870
|
});
|
|
1871
|
-
function
|
|
1872
|
-
const
|
|
1873
|
-
return e.value[
|
|
1871
|
+
function g(i, w) {
|
|
1872
|
+
const x = Pt(i, w);
|
|
1873
|
+
return e.value[x] || (e.value[x] = l()), e.value[x];
|
|
1874
|
+
}
|
|
1875
|
+
const _ = k(() => e.value), D = (i) => o.value === i;
|
|
1876
|
+
function R(i, w, x, C) {
|
|
1877
|
+
g(i, w)[x] = C;
|
|
1878
|
+
}
|
|
1879
|
+
function z(i, w, x = 50) {
|
|
1880
|
+
g(i, w).visibleCount += x;
|
|
1874
1881
|
}
|
|
1875
|
-
function
|
|
1876
|
-
|
|
1882
|
+
function c(i) {
|
|
1883
|
+
a.value = i;
|
|
1877
1884
|
}
|
|
1878
|
-
function
|
|
1879
|
-
|
|
1885
|
+
function p(i) {
|
|
1886
|
+
o.value = i;
|
|
1880
1887
|
}
|
|
1881
|
-
function
|
|
1882
|
-
|
|
1888
|
+
function d() {
|
|
1889
|
+
o.value = null;
|
|
1883
1890
|
}
|
|
1884
1891
|
return {
|
|
1885
|
-
allStates:
|
|
1886
|
-
getGlobalFilter: l,
|
|
1887
|
-
setGlobalFilter: y,
|
|
1888
|
-
showMore: S,
|
|
1892
|
+
allStates: _,
|
|
1889
1893
|
includeUnavailable: a,
|
|
1890
|
-
|
|
1894
|
+
openMenuKey: o,
|
|
1895
|
+
getGlobalFilter: g,
|
|
1896
|
+
isMenuOpen: D,
|
|
1897
|
+
setGlobalFilter: R,
|
|
1898
|
+
showMore: z,
|
|
1899
|
+
setIncludeUnavailable: c,
|
|
1900
|
+
openMenu: p,
|
|
1901
|
+
closeMenu: d,
|
|
1891
1902
|
getKey: Pt
|
|
1892
1903
|
};
|
|
1893
1904
|
}), fa = { class: "flex flex-row flex-wrap gap-2" }, va = { class: "inline-flex max-w-[460px]" }, ga = {
|
|
@@ -1896,55 +1907,55 @@ const ha = Ot(pa, () => {
|
|
|
1896
1907
|
}, ya = { class: "px-2 pb-8" }, ba = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, wa = { class: "px-2 pb-8" }, xa = { class: "flex items-start w-full" }, Sa = ["onClick"], Ca = { class: "fm-typo-en-body-md-400" }, ka = { key: 0 }, _a = { class: "px-12 py-3" }, Ta = { class: "flex items-center justify-between" }, Fa = ["onClick"], La = { class: "fm-typo-en-body-md-400" }, Da = { class: "text-xs max-w-[200px]" }, Ra = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, qa = /* @__PURE__ */ Le({
|
|
1897
1908
|
__name: "FilterSelector",
|
|
1898
1909
|
setup(e) {
|
|
1899
|
-
const { t: a, locale:
|
|
1900
|
-
let { globalFilters:
|
|
1901
|
-
showMore:
|
|
1902
|
-
getGlobalFilter:
|
|
1903
|
-
setGlobalFilter:
|
|
1904
|
-
setIncludeUnavailable:
|
|
1910
|
+
const { t: a, locale: o } = tt(), { currentReport: l, editingTile: g } = $e(kl());
|
|
1911
|
+
let { globalFilters: _, isGlobalFiltersLoading: D, timeRange: R, dateRange: z, selectedLocationIds: c } = $e(Qe()), { schemas: p } = $e(_l()), {
|
|
1912
|
+
showMore: d,
|
|
1913
|
+
getGlobalFilter: i,
|
|
1914
|
+
setGlobalFilter: w,
|
|
1915
|
+
setIncludeUnavailable: x,
|
|
1905
1916
|
getKey: C,
|
|
1906
|
-
isMenuOpen:
|
|
1917
|
+
isMenuOpen: y,
|
|
1907
1918
|
openMenu: W,
|
|
1908
1919
|
closeMenu: v
|
|
1909
|
-
} = ha(),
|
|
1910
|
-
const
|
|
1920
|
+
} = ha(), n = null;
|
|
1921
|
+
const T = h(!1), m = k(() => {
|
|
1911
1922
|
var t;
|
|
1912
1923
|
return ((t = l.value) == null ? void 0 : t.id) ?? "";
|
|
1913
|
-
}), L =
|
|
1924
|
+
}), L = h([]);
|
|
1914
1925
|
function U(t) {
|
|
1915
|
-
const
|
|
1916
|
-
t.selectedValues = t.keepSelection ?
|
|
1926
|
+
const F = i(t.filter, m.value).selectedValues;
|
|
1927
|
+
t.selectedValues = t.keepSelection ? F : t.options.map((S) => S.value), t.filter.values = [...t.selectedValues], w(t.filter, m.value, "selectedValues", t.selectedValues);
|
|
1917
1928
|
}
|
|
1918
1929
|
he(
|
|
1919
1930
|
() => ({
|
|
1920
|
-
reportId:
|
|
1921
|
-
globalFilters:
|
|
1931
|
+
reportId: m.value,
|
|
1932
|
+
globalFilters: _.value
|
|
1922
1933
|
}),
|
|
1923
1934
|
() => {
|
|
1924
|
-
L.value = (
|
|
1925
|
-
const
|
|
1935
|
+
L.value = (_.value || []).map((t) => {
|
|
1936
|
+
const f = i(t, m.value), F = f.selectedValues.length ? [...f.selectedValues] : [...t.values ?? []];
|
|
1926
1937
|
return {
|
|
1927
|
-
id: C(t,
|
|
1938
|
+
id: C(t, m.value),
|
|
1928
1939
|
filter: t,
|
|
1929
|
-
search:
|
|
1940
|
+
search: f.search,
|
|
1930
1941
|
options: [],
|
|
1931
|
-
type:
|
|
1932
|
-
selectedValues:
|
|
1933
|
-
visibleCount:
|
|
1934
|
-
keepSelection:
|
|
1935
|
-
showAdvanced:
|
|
1942
|
+
type: K(t),
|
|
1943
|
+
selectedValues: F,
|
|
1944
|
+
visibleCount: f.visibleCount,
|
|
1945
|
+
keepSelection: f.keepSelection,
|
|
1946
|
+
showAdvanced: f.showAdvanced
|
|
1936
1947
|
};
|
|
1937
1948
|
}), fe();
|
|
1938
1949
|
},
|
|
1939
1950
|
{ immediate: !0 }
|
|
1940
1951
|
), he(
|
|
1941
|
-
[
|
|
1952
|
+
[R, z, c],
|
|
1942
1953
|
async () => {
|
|
1943
1954
|
await fe();
|
|
1944
1955
|
},
|
|
1945
1956
|
{ deep: !0, immediate: !0 }
|
|
1946
1957
|
), he(
|
|
1947
|
-
[() =>
|
|
1958
|
+
[() => g.value],
|
|
1948
1959
|
async () => {
|
|
1949
1960
|
L.value.forEach((t) => {
|
|
1950
1961
|
t.options = [];
|
|
@@ -1952,58 +1963,58 @@ const ha = Ot(pa, () => {
|
|
|
1952
1963
|
},
|
|
1953
1964
|
{ deep: !0 }
|
|
1954
1965
|
);
|
|
1955
|
-
function
|
|
1956
|
-
var
|
|
1957
|
-
const
|
|
1958
|
-
return
|
|
1966
|
+
function K(t) {
|
|
1967
|
+
var F;
|
|
1968
|
+
const f = (F = p.value.find((S) => S.name === t.schemaName)) == null ? void 0 : F.fields.find((S) => S.name === t.name);
|
|
1969
|
+
return f == null ? void 0 : f.type;
|
|
1959
1970
|
}
|
|
1960
1971
|
function ee(t) {
|
|
1961
1972
|
var me;
|
|
1962
|
-
if (!l.value && !
|
|
1963
|
-
const
|
|
1973
|
+
if (!l.value && !g.value) return [];
|
|
1974
|
+
const f = g.value ? [g.value] : [...((me = l.value) == null ? void 0 : me.tiles) ?? []], { name: F = "", schemaName: S = "" } = t, N = f.filter((J) => {
|
|
1964
1975
|
var Z, q;
|
|
1965
|
-
const E = (Z =
|
|
1966
|
-
if (!E || (q = t.tileIds) != null && q.length && !t.tileIds.includes(
|
|
1976
|
+
const E = (Z = J == null ? void 0 : J.widget) == null ? void 0 : Z.config;
|
|
1977
|
+
if (!E || (q = t.tileIds) != null && q.length && !t.tileIds.includes(J.id)) return !1;
|
|
1967
1978
|
const u = (E.dimensions ?? []).some(
|
|
1968
|
-
(ne) => ne.schemaName ===
|
|
1979
|
+
(ne) => ne.schemaName === S && ne.name === F
|
|
1969
1980
|
), X = (E.joinDatasources ?? []).some(
|
|
1970
|
-
(ne) => (ne.dimensions ?? []).some((ae) => ae.schemaName ===
|
|
1971
|
-
), j = (E.schemaNames ?? []).includes(
|
|
1981
|
+
(ne) => (ne.dimensions ?? []).some((ae) => ae.schemaName === S && ae.name === F)
|
|
1982
|
+
), j = (E.schemaNames ?? []).includes(S);
|
|
1972
1983
|
return u || X || j;
|
|
1973
1984
|
});
|
|
1974
1985
|
if (!N.length) return [];
|
|
1975
|
-
const le = (
|
|
1986
|
+
const le = (J, E) => {
|
|
1976
1987
|
const u = /* @__PURE__ */ new Map(), X = (j) => {
|
|
1977
1988
|
const Z = `${j.schemaName}:${j.name}:${j.operator}`, q = u.get(Z);
|
|
1978
1989
|
q ? [Ce.Like, Ce.NotLike].includes(j.operator) ? q.values = Array.from(/* @__PURE__ */ new Set([...q.values ?? [], ...j.values ?? []])) : u.set(Z, { ...j }) : u.set(Z, { ...j });
|
|
1979
1990
|
};
|
|
1980
|
-
return
|
|
1981
|
-
}, de = (
|
|
1991
|
+
return J.forEach(X), E.forEach(X), Array.from(u.values());
|
|
1992
|
+
}, de = (J) => {
|
|
1982
1993
|
var u;
|
|
1983
|
-
const E = (u =
|
|
1984
|
-
(X) => X.schemaName ===
|
|
1994
|
+
const E = (u = J.dimensions) == null ? void 0 : u.find(
|
|
1995
|
+
(X) => X.schemaName === S && X.name === F
|
|
1985
1996
|
);
|
|
1986
1997
|
return {
|
|
1987
|
-
name:
|
|
1988
|
-
schemaName:
|
|
1989
|
-
label: (E == null ? void 0 : E.label) ??
|
|
1998
|
+
name: F,
|
|
1999
|
+
schemaName: S,
|
|
2000
|
+
label: (E == null ? void 0 : E.label) ?? F,
|
|
1990
2001
|
hide: !1,
|
|
1991
2002
|
option: t.option ?? null,
|
|
1992
2003
|
dataFormula: E == null ? void 0 : E.dataFormula
|
|
1993
2004
|
};
|
|
1994
2005
|
};
|
|
1995
|
-
return N.map((
|
|
2006
|
+
return N.map((J) => {
|
|
1996
2007
|
var ne, ae;
|
|
1997
|
-
const E = (ne =
|
|
2008
|
+
const E = (ne = J == null ? void 0 : J.widget) == null ? void 0 : ne.config;
|
|
1998
2009
|
if (!E) return null;
|
|
1999
|
-
const u = de(E), X = (E.dimensions ?? []).some((ye) => ye.schemaName ===
|
|
2010
|
+
const u = de(E), X = (E.dimensions ?? []).some((ye) => ye.schemaName === S) || (E.schemaNames ?? []).includes(S), j = le(
|
|
2000
2011
|
E.filters ?? [],
|
|
2001
2012
|
(t.filters ?? []).filter((ye) => {
|
|
2002
2013
|
var ue;
|
|
2003
2014
|
return (ue = E.schemaNames) == null ? void 0 : ue.includes(ye.schemaName);
|
|
2004
2015
|
})
|
|
2005
2016
|
), Z = (ae = E.joinDatasources) == null ? void 0 : ae.find(
|
|
2006
|
-
(ye) => (ye.schemaNames ?? []).includes(
|
|
2017
|
+
(ye) => (ye.schemaNames ?? []).includes(S) || (ye.dimensions ?? []).some((ue) => ue.schemaName === S)
|
|
2007
2018
|
), q = le(
|
|
2008
2019
|
(Z == null ? void 0 : Z.filters) ?? [],
|
|
2009
2020
|
(t.filters ?? []).filter((ye) => {
|
|
@@ -2019,15 +2030,15 @@ const ha = Ot(pa, () => {
|
|
|
2019
2030
|
schemas: E.schemas,
|
|
2020
2031
|
dimensions: X ? [u] : [],
|
|
2021
2032
|
filters: j,
|
|
2022
|
-
sorts: X ? [{ name:
|
|
2033
|
+
sorts: X ? [{ name: F, schemaName: S, type: Be.Asc, aggregation: null, dimensionOption: null }] : [],
|
|
2023
2034
|
joinDatasources: !X && Z ? [
|
|
2024
2035
|
{
|
|
2025
2036
|
...Z,
|
|
2026
2037
|
dimensions: [u],
|
|
2027
2038
|
sorts: [
|
|
2028
2039
|
{
|
|
2029
|
-
name:
|
|
2030
|
-
schemaName:
|
|
2040
|
+
name: F,
|
|
2041
|
+
schemaName: S,
|
|
2031
2042
|
type: Be.Asc,
|
|
2032
2043
|
aggregation: null,
|
|
2033
2044
|
dimensionOption: null
|
|
@@ -2052,54 +2063,54 @@ const ha = Ot(pa, () => {
|
|
|
2052
2063
|
}).filter(Boolean);
|
|
2053
2064
|
}
|
|
2054
2065
|
function se(t) {
|
|
2055
|
-
return t.options.every((
|
|
2056
|
-
var
|
|
2057
|
-
return (
|
|
2066
|
+
return t.options.every((f) => {
|
|
2067
|
+
var F;
|
|
2068
|
+
return (F = t.selectedValues) == null ? void 0 : F.includes(f.value);
|
|
2058
2069
|
});
|
|
2059
2070
|
}
|
|
2060
2071
|
function ke(t) {
|
|
2061
|
-
se(t) ? t.selectedValues = ["(EMPTY)"] : t.selectedValues = t.options.map((
|
|
2072
|
+
se(t) ? t.selectedValues = ["(EMPTY)"] : t.selectedValues = t.options.map((f) => f.value);
|
|
2062
2073
|
}
|
|
2063
|
-
const ve =
|
|
2074
|
+
const ve = k(
|
|
2064
2075
|
() => L.value.map((t) => {
|
|
2065
|
-
const
|
|
2066
|
-
return
|
|
2067
|
-
(N) => N.label.toLowerCase().includes(
|
|
2076
|
+
const f = t.options, F = t.search.toLowerCase() ?? "";
|
|
2077
|
+
return f.filter(
|
|
2078
|
+
(N) => N.label.toLowerCase().includes(F.toLowerCase())
|
|
2068
2079
|
).slice(0, t.visibleCount);
|
|
2069
2080
|
})
|
|
2070
2081
|
);
|
|
2071
2082
|
function _e(t) {
|
|
2072
|
-
t.visibleCount += 50,
|
|
2083
|
+
t.visibleCount += 50, d(t.filter, m.value, 50);
|
|
2073
2084
|
}
|
|
2074
|
-
async function De(t,
|
|
2075
|
-
var
|
|
2076
|
-
if (!(!t.type && (t.type =
|
|
2085
|
+
async function De(t, f) {
|
|
2086
|
+
var F;
|
|
2087
|
+
if (!(!t.type && (t.type = K(t.filter), !t.type)))
|
|
2077
2088
|
switch (t.type) {
|
|
2078
2089
|
case ze.String:
|
|
2079
2090
|
try {
|
|
2080
|
-
const
|
|
2081
|
-
if (!
|
|
2091
|
+
const S = ee(t.filter);
|
|
2092
|
+
if (!S.length) {
|
|
2082
2093
|
t.options = [];
|
|
2083
2094
|
return;
|
|
2084
2095
|
}
|
|
2085
2096
|
const N = [];
|
|
2086
|
-
for (const E of
|
|
2087
|
-
const u = await
|
|
2097
|
+
for (const E of S) {
|
|
2098
|
+
const u = await Ot(E, f);
|
|
2088
2099
|
(u == null ? void 0 : u.type) === A.Table && N.push(...u.rows.map((X) => {
|
|
2089
2100
|
var j;
|
|
2090
2101
|
return ((j = X.cells) == null ? void 0 : j[0]) ?? " ";
|
|
2091
2102
|
}));
|
|
2092
2103
|
}
|
|
2093
|
-
const le = Array.from(new Set(N)), de = (
|
|
2104
|
+
const le = Array.from(new Set(N)), de = (F = i(t.filter, m.value).selectedValues) != null && F.length ? i(t.filter, m.value).selectedValues : t.selectedValues || [], me = t.keepSelection ? Array.from(/* @__PURE__ */ new Set([...le, ...de])) : le, J = new Set(N);
|
|
2094
2105
|
t.options = me.map((E) => ({
|
|
2095
2106
|
label: String(E),
|
|
2096
2107
|
value: E,
|
|
2097
|
-
available: t.keepSelection ?
|
|
2108
|
+
available: t.keepSelection ? J.has(E) : new Set(le).has(E)
|
|
2098
2109
|
})), U(t);
|
|
2099
|
-
} catch (
|
|
2100
|
-
if ((
|
|
2110
|
+
} catch (S) {
|
|
2111
|
+
if ((S == null ? void 0 : S.code) === "ERR_CANCELED" || (S == null ? void 0 : S.name) === "CanceledError")
|
|
2101
2112
|
return;
|
|
2102
|
-
throw
|
|
2113
|
+
throw S;
|
|
2103
2114
|
}
|
|
2104
2115
|
break;
|
|
2105
2116
|
case ze.Bool: {
|
|
@@ -2111,8 +2122,8 @@ const ha = Ot(pa, () => {
|
|
|
2111
2122
|
}
|
|
2112
2123
|
case ze.Timestamp:
|
|
2113
2124
|
if (t.filter.option !== pe.DateTime && t.filter.option !== pe.TimeOfDay) {
|
|
2114
|
-
const
|
|
2115
|
-
t.options = Wt({ dimensionOption:
|
|
2125
|
+
const S = t.filter.option;
|
|
2126
|
+
t.options = Wt({ dimensionOption: S, t: a }), t.filter.values = t.options.length ? t.options.map((N) => N.value) : ["NULL"];
|
|
2116
2127
|
}
|
|
2117
2128
|
U(t);
|
|
2118
2129
|
break;
|
|
@@ -2121,63 +2132,63 @@ const ha = Ot(pa, () => {
|
|
|
2121
2132
|
}
|
|
2122
2133
|
}
|
|
2123
2134
|
async function fe(t = !1) {
|
|
2124
|
-
if (!
|
|
2125
|
-
|
|
2126
|
-
const
|
|
2127
|
-
|
|
2135
|
+
if (!m.value || !L.value.length) return;
|
|
2136
|
+
n == null || n.abort();
|
|
2137
|
+
const f = new AbortController();
|
|
2138
|
+
n = f;
|
|
2128
2139
|
try {
|
|
2129
|
-
t || (
|
|
2130
|
-
L.value.map((
|
|
2140
|
+
t || (D.value = !0), T.value = !0, await Promise.all(
|
|
2141
|
+
L.value.map((F) => De(F, f.signal))
|
|
2131
2142
|
);
|
|
2132
2143
|
} finally {
|
|
2133
|
-
|
|
2144
|
+
n === f && (t || (D.value = !1), T.value = !1);
|
|
2134
2145
|
}
|
|
2135
2146
|
}
|
|
2136
|
-
function b(t,
|
|
2137
|
-
var
|
|
2138
|
-
if ((
|
|
2139
|
-
let N = (t.selectedValues || []).filter((le) => le !==
|
|
2147
|
+
function b(t, f) {
|
|
2148
|
+
var S;
|
|
2149
|
+
if ((S = t.selectedValues) == null ? void 0 : S.includes(f)) {
|
|
2150
|
+
let N = (t.selectedValues || []).filter((le) => le !== f && le !== "(EMPTY)");
|
|
2140
2151
|
t.selectedValues = N.length > 0 ? N : ["(EMPTY)"];
|
|
2141
2152
|
} else
|
|
2142
|
-
t.selectedValues = [...(t.selectedValues || []).filter((N) => N !== "(EMPTY)"),
|
|
2143
|
-
|
|
2153
|
+
t.selectedValues = [...(t.selectedValues || []).filter((N) => N !== "(EMPTY)"), f];
|
|
2154
|
+
w(t.filter, m.value, "selectedValues", t.selectedValues);
|
|
2144
2155
|
}
|
|
2145
|
-
function
|
|
2146
|
-
if (
|
|
2156
|
+
function V(t, f) {
|
|
2157
|
+
if (f === null)
|
|
2147
2158
|
t.values = [];
|
|
2148
2159
|
else {
|
|
2149
|
-
const
|
|
2150
|
-
t.values = [
|
|
2160
|
+
const S = Ke(f.startDate).startOf("day").utc().toISOString(), N = Ke(f.endDate).endOf("day").utc().toISOString();
|
|
2161
|
+
t.values = [S, N];
|
|
2151
2162
|
}
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2163
|
+
const F = L.value.find((S) => S.id === C(t, m.value));
|
|
2164
|
+
F && (F.keepSelection = f !== null, w(F.filter, m.value, "keepSelection", F.keepSelection));
|
|
2154
2165
|
}
|
|
2155
2166
|
function G(t) {
|
|
2156
|
-
const
|
|
2157
|
-
return `${a("report.section.filter.selectAll")} (${
|
|
2167
|
+
const f = (t.selectedValues || []).filter((F) => F !== "(EMPTY)");
|
|
2168
|
+
return `${a("report.section.filter.selectAll")} (${f.length}/${t.options.length})`;
|
|
2158
2169
|
}
|
|
2159
2170
|
function P(t) {
|
|
2160
|
-
const
|
|
2161
|
-
return `${
|
|
2171
|
+
const f = t.options.length, F = a("report.section.filter.search"), S = a("report.common.results", { count: f });
|
|
2172
|
+
return `${F} (${S})`;
|
|
2162
2173
|
}
|
|
2163
2174
|
function I(t) {
|
|
2164
|
-
var le, de, me,
|
|
2165
|
-
const
|
|
2175
|
+
var le, de, me, J, E;
|
|
2176
|
+
const f = Fl(t.filter);
|
|
2166
2177
|
if (t.type === ze.Timestamp) {
|
|
2167
2178
|
const u = ((le = t.filter.values) == null ? void 0 : le.length) === 2;
|
|
2168
2179
|
if (t.filter.option === pe.DateTime)
|
|
2169
|
-
return { preview: u ? `${
|
|
2180
|
+
return { preview: u ? `${f} is between ${Rl({
|
|
2170
2181
|
startDate: ((de = t.filter.values) == null ? void 0 : de[0]) || null,
|
|
2171
2182
|
endDate: ((me = t.filter.values) == null ? void 0 : me[1]) || null,
|
|
2172
|
-
locale:
|
|
2173
|
-
})}` :
|
|
2183
|
+
locale: o.value
|
|
2184
|
+
})}` : f, suffix: "" };
|
|
2174
2185
|
if (t.filter.option === pe.TimeOfDay) {
|
|
2175
|
-
const X = (
|
|
2176
|
-
return { preview: u ? `${
|
|
2186
|
+
const X = (J = t.filter.values) != null && J[0] ? Ke(t.filter.values[0]) : null, j = (E = t.filter.values) != null && E[1] ? Ke(t.filter.values[1]) : null, Z = (ne) => ne && ne.isValid() ? { hour: ne.hour(), minute: ne.minute() } : null;
|
|
2187
|
+
return { preview: u ? `${f} is between ${Vl({
|
|
2177
2188
|
startTime: Z(X),
|
|
2178
2189
|
endTime: Z(j),
|
|
2179
|
-
locale:
|
|
2180
|
-
})}` :
|
|
2190
|
+
locale: o.value
|
|
2191
|
+
})}` : f, suffix: "" };
|
|
2181
2192
|
}
|
|
2182
2193
|
if (t.filter.option !== pe.DateTime && t.filter.option !== pe.TimeOfDay) {
|
|
2183
2194
|
const X = Wt({
|
|
@@ -2185,42 +2196,42 @@ const ha = Ot(pa, () => {
|
|
|
2185
2196
|
t: a
|
|
2186
2197
|
}), j = new Map(X.map((ae) => [String(ae.value), ae.label])), q = (t.selectedValues || []).filter((ae) => ae !== "(EMPTY)").map((ae) => j.get(String(ae)) ?? String(ae)), ne = q.map((ae) => ae.length > 20 ? `${ae.slice(0, 20)}…` : ae).join(", ");
|
|
2187
2198
|
return q.length ? {
|
|
2188
|
-
preview: `${
|
|
2199
|
+
preview: `${f}: ${ne}`,
|
|
2189
2200
|
suffix: `(${q.length} selected)`
|
|
2190
|
-
} : { preview:
|
|
2201
|
+
} : { preview: f, suffix: "" };
|
|
2191
2202
|
}
|
|
2192
2203
|
}
|
|
2193
|
-
const
|
|
2194
|
-
return
|
|
2195
|
-
preview: `${
|
|
2196
|
-
suffix: `(${
|
|
2197
|
-
} : { preview: N, suffix: `${
|
|
2204
|
+
const S = (t.selectedValues || []).filter((u) => u !== "(EMPTY)").map((u) => u === !0 ? a("report.common.yes") || "Yes" : u === !1 ? a("report.common.no") || "No" : String(u)), N = S.map((u) => u.length > 20 ? `${u.slice(0, 20)}…` : u).join(", ");
|
|
2205
|
+
return S.length ? {
|
|
2206
|
+
preview: `${f}: ${N}`,
|
|
2207
|
+
suffix: `(${S.length} selected)`
|
|
2208
|
+
} : { preview: N, suffix: `${f}` };
|
|
2198
2209
|
}
|
|
2199
2210
|
function M(t) {
|
|
2200
|
-
t.filter.values = [...t.selectedValues || []],
|
|
2211
|
+
t.filter.values = [...t.selectedValues || []], w(t.filter, m.value, "selectedValues", t.selectedValues), v();
|
|
2201
2212
|
}
|
|
2202
2213
|
function ie(t) {
|
|
2203
|
-
t.showAdvanced = !t.showAdvanced,
|
|
2214
|
+
t.showAdvanced = !t.showAdvanced, w(t.filter, m.value, "showAdvanced", t.showAdvanced);
|
|
2204
2215
|
}
|
|
2205
2216
|
function xe(t) {
|
|
2206
|
-
t.keepSelection = !t.keepSelection,
|
|
2217
|
+
t.keepSelection = !t.keepSelection, x(t.keepSelection), w(t.filter, m.value, "keepSelection", t.keepSelection), t.options = [], fe(!0);
|
|
2207
2218
|
}
|
|
2208
|
-
function Se(t,
|
|
2209
|
-
return t ? t.length >
|
|
2219
|
+
function Se(t, f) {
|
|
2220
|
+
return t ? t.length > f ? `${t.slice(0, f)}…` : t : "";
|
|
2210
2221
|
}
|
|
2211
|
-
function ge(t,
|
|
2212
|
-
var
|
|
2213
|
-
if (
|
|
2222
|
+
function ge(t, f) {
|
|
2223
|
+
var S, N, le, de;
|
|
2224
|
+
if (f === null)
|
|
2214
2225
|
t.values = [];
|
|
2215
2226
|
else {
|
|
2216
|
-
const me =
|
|
2217
|
-
t.values = [me,
|
|
2227
|
+
const me = Ke().set("hour", Number((S = f.start) == null ? void 0 : S.hour)).set("minute", Number((N = f.start) == null ? void 0 : N.minute)).toISOString(), J = Ke().set("hour", Number((le = f.end) == null ? void 0 : le.hour)).set("minute", Number((de = f.end) == null ? void 0 : de.minute)).toISOString();
|
|
2228
|
+
t.values = [me, J];
|
|
2218
2229
|
}
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2230
|
+
const F = L.value.find((me) => me.id === C(t, m.value));
|
|
2231
|
+
F && (F.keepSelection = f !== null, w(F.filter, m.value, "keepSelection", F.keepSelection));
|
|
2221
2232
|
}
|
|
2222
|
-
return (t,
|
|
2223
|
-
const
|
|
2233
|
+
return (t, f) => {
|
|
2234
|
+
const F = O("FmCircularProgress"), S = O("FmTextField"), N = O("FmMenuItem"), le = O("FmTooltip"), de = O("FmIcon"), me = O("FmMenuDivider"), J = O("FmButton"), E = O("FmMenu");
|
|
2224
2235
|
return $(), te("div", fa, [
|
|
2225
2236
|
($(!0), te(be, null, nt(L.value, (u, X) => {
|
|
2226
2237
|
var j, Z, q, ne, ae, ye;
|
|
@@ -2233,8 +2244,8 @@ const ha = Ot(pa, () => {
|
|
|
2233
2244
|
class: "w-full",
|
|
2234
2245
|
label: I(u).preview,
|
|
2235
2246
|
removable: ((q = u.filter.values) == null ? void 0 : q.length) === 2,
|
|
2236
|
-
onUpdate: (ue) =>
|
|
2237
|
-
onChipClosed: () =>
|
|
2247
|
+
onUpdate: (ue) => V(u.filter, ue),
|
|
2248
|
+
onChipClosed: () => V(u.filter, null)
|
|
2238
2249
|
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : u.filter.option === s(pe).TimeOfDay ? ($(), re(Tl, {
|
|
2239
2250
|
key: 1,
|
|
2240
2251
|
"model-value": { start: (ne = u.filter.values) == null ? void 0 : ne[0], end: (ae = u.filter.values) == null ? void 0 : ae[1] },
|
|
@@ -2247,11 +2258,11 @@ const ha = Ot(pa, () => {
|
|
|
2247
2258
|
key: 2,
|
|
2248
2259
|
"close-on-click": !1,
|
|
2249
2260
|
shift: !0,
|
|
2250
|
-
open: s(
|
|
2261
|
+
open: s(y)(u.id),
|
|
2251
2262
|
onMenuChanged: (ue) => ue ? s(W)(u.id) : s(v)()
|
|
2252
2263
|
}, {
|
|
2253
2264
|
"menu-button": oe(() => [
|
|
2254
|
-
|
|
2265
|
+
H("div", va, [
|
|
2255
2266
|
B(Dl, {
|
|
2256
2267
|
"left-icon": "filter_alt",
|
|
2257
2268
|
"trailing-icon": "expand_more",
|
|
@@ -2266,19 +2277,19 @@ const ha = Ot(pa, () => {
|
|
|
2266
2277
|
])
|
|
2267
2278
|
]),
|
|
2268
2279
|
"menu-wrapper": oe(({ maxHeight: ue, width: Ge }) => [
|
|
2269
|
-
|
|
2280
|
+
H("div", {
|
|
2270
2281
|
class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
|
|
2271
2282
|
style: Ee({ maxHeight: `${ue}px`, width: Ge })
|
|
2272
2283
|
}, [
|
|
2273
|
-
|
|
2274
|
-
B(
|
|
2275
|
-
])) : u.options.length > 0 && !s(
|
|
2276
|
-
|
|
2277
|
-
B(
|
|
2284
|
+
T.value ? ($(), te("div", ga, [
|
|
2285
|
+
B(F)
|
|
2286
|
+
])) : u.options.length > 0 && !s(D) ? ($(), te(be, { key: 1 }, [
|
|
2287
|
+
H("div", ya, [
|
|
2288
|
+
B(S, {
|
|
2278
2289
|
modelValue: u.search,
|
|
2279
2290
|
"onUpdate:modelValue": [
|
|
2280
2291
|
(Y) => u.search = Y,
|
|
2281
|
-
(Y) => s(
|
|
2292
|
+
(Y) => s(w)(u.filter, m.value, "search", Y)
|
|
2282
2293
|
],
|
|
2283
2294
|
type: "text",
|
|
2284
2295
|
"prepend-icon": "search",
|
|
@@ -2286,8 +2297,8 @@ const ha = Ot(pa, () => {
|
|
|
2286
2297
|
class: "border px-2 pb-8 text-sm mb-1 rounded"
|
|
2287
2298
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
2288
2299
|
]),
|
|
2289
|
-
|
|
2290
|
-
|
|
2300
|
+
H("div", ba, [
|
|
2301
|
+
H("div", wa, [
|
|
2291
2302
|
B(N, {
|
|
2292
2303
|
label: G(u),
|
|
2293
2304
|
"has-checkbox": !0,
|
|
@@ -2308,7 +2319,7 @@ const ha = Ot(pa, () => {
|
|
|
2308
2319
|
ht(Te(Y.label), 1)
|
|
2309
2320
|
]),
|
|
2310
2321
|
default: oe(() => [
|
|
2311
|
-
|
|
2322
|
+
H("div", xa, [
|
|
2312
2323
|
B(N, {
|
|
2313
2324
|
label: Se(Y.label, 110),
|
|
2314
2325
|
"has-checkbox": !0,
|
|
@@ -2340,7 +2351,7 @@ const ha = Ot(pa, () => {
|
|
|
2340
2351
|
}, null, 8, ["label", "onClick"])) : Fe("", !0)
|
|
2341
2352
|
])
|
|
2342
2353
|
]),
|
|
2343
|
-
|
|
2354
|
+
H("div", {
|
|
2344
2355
|
class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
|
|
2345
2356
|
onClick: (Y) => ie(u)
|
|
2346
2357
|
}, [
|
|
@@ -2349,13 +2360,13 @@ const ha = Ot(pa, () => {
|
|
|
2349
2360
|
size: "md",
|
|
2350
2361
|
class: ""
|
|
2351
2362
|
}, null, 8, ["name"]),
|
|
2352
|
-
|
|
2363
|
+
H("span", Ca, Te(s(a)("report.section.filter.advanced")), 1)
|
|
2353
2364
|
], 8, Sa),
|
|
2354
2365
|
B(me),
|
|
2355
2366
|
u.showAdvanced ? ($(), te("div", ka, [
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2367
|
+
H("div", _a, [
|
|
2368
|
+
H("div", Ta, [
|
|
2369
|
+
H("div", {
|
|
2359
2370
|
class: "flex items-center gap-2 cursor-pointer",
|
|
2360
2371
|
onClick: (Y) => xe(u)
|
|
2361
2372
|
}, [
|
|
@@ -2366,14 +2377,14 @@ const ha = Ot(pa, () => {
|
|
|
2366
2377
|
u.keepSelection ? "text-fm-color-primary" : "text-fm-color-neutral-gray-400"
|
|
2367
2378
|
)
|
|
2368
2379
|
}, null, 8, ["name", "class"]),
|
|
2369
|
-
|
|
2380
|
+
H("span", La, Te(s(a)("report.section.filter.keepSelection")), 1)
|
|
2370
2381
|
], 8, Fa),
|
|
2371
2382
|
B(le, {
|
|
2372
2383
|
placement: "top",
|
|
2373
2384
|
"z-index": 2e3
|
|
2374
2385
|
}, {
|
|
2375
2386
|
content: oe(() => [
|
|
2376
|
-
|
|
2387
|
+
H("div", Da, Te(s(a)("report.section.filter.keepSelectionTooltip")), 1)
|
|
2377
2388
|
]),
|
|
2378
2389
|
default: oe(() => [
|
|
2379
2390
|
B(de, {
|
|
@@ -2387,19 +2398,19 @@ const ha = Ot(pa, () => {
|
|
|
2387
2398
|
])
|
|
2388
2399
|
])
|
|
2389
2400
|
])) : Fe("", !0),
|
|
2390
|
-
|
|
2391
|
-
B(
|
|
2401
|
+
H("div", Ra, [
|
|
2402
|
+
B(J, {
|
|
2392
2403
|
variant: "tertiary",
|
|
2393
2404
|
label: s(a)("report.common.cancel"),
|
|
2394
|
-
onClick:
|
|
2405
|
+
onClick: f[0] || (f[0] = ct((Y) => s(v)(), ["stop"]))
|
|
2395
2406
|
}, null, 8, ["label"]),
|
|
2396
|
-
B(
|
|
2407
|
+
B(J, {
|
|
2397
2408
|
color: "primary",
|
|
2398
2409
|
onClick: ct((Y) => M(u), ["stop"]),
|
|
2399
2410
|
label: s(a)("report.common.apply")
|
|
2400
2411
|
}, null, 8, ["onClick", "label"])
|
|
2401
2412
|
])
|
|
2402
|
-
], 64)) : s(
|
|
2413
|
+
], 64)) : s(D) ? Fe("", !0) : ($(), re(ft, { key: 2 }))
|
|
2403
2414
|
], 4)
|
|
2404
2415
|
]),
|
|
2405
2416
|
_: 2
|
|
@@ -2412,14 +2423,14 @@ const ha = Ot(pa, () => {
|
|
|
2412
2423
|
}
|
|
2413
2424
|
});
|
|
2414
2425
|
export {
|
|
2415
|
-
|
|
2426
|
+
He as I,
|
|
2416
2427
|
yt as L,
|
|
2417
2428
|
Pe as R,
|
|
2418
2429
|
Pa as _,
|
|
2419
2430
|
qa as a,
|
|
2420
2431
|
gt as b,
|
|
2421
|
-
|
|
2422
|
-
|
|
2432
|
+
Oa as c,
|
|
2433
|
+
Ha as d,
|
|
2423
2434
|
Ba as e,
|
|
2424
2435
|
mt as g,
|
|
2425
2436
|
Nt as u
|