@feedmepos/mf-report 5.21.31 → 5.21.32
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-ChGxGAvb.js → App-BVPfeKM1.js} +4 -4
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-QzLGWBvd.js → BaseDialog.vue_vue_type_script_setup_true_lang-BNTtoXSl.js} +944 -944
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CS10GX8d.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Cg6ChdaG.js} +87 -87
- package/dist/{Default.vue_vue_type_script_setup_true_lang-oPfgV8Ba.js → Default.vue_vue_type_script_setup_true_lang-BlAfWU6A.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-BEOZulO4.js → FilterSelector.vue_vue_type_script_setup_true_lang-DpUWWlZ7.js} +968 -969
- package/dist/{InsightView-B3zeWLpB.js → InsightView-D0FQmOAa.js} +5 -5
- package/dist/{Integration-Ne6z0Ue8.js → Integration-DUauFkbS.js} +2 -2
- package/dist/{Integrations-SXV9M3b-.js → Integrations-BPvh4SIF.js} +3 -3
- package/dist/{Layout-BfhdHhdb.js → Layout-DG-JKjLP.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Chon4gVE.js → MenuTab.vue_vue_type_script_setup_true_lang-BHrs_LW4.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-M3kgeSAQ.js → NavigationTab.vue_vue_type_script_setup_true_lang-Cl2n4jUd.js} +4647 -4584
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DDKbpI_N.js → NoData.vue_vue_type_script_setup_true_lang-BRz75rkR.js} +1 -1
- package/dist/{OverviewView-DYJsgAMF.js → OverviewView-DUqScbfn.js} +5 -5
- package/dist/{Report-CDyfJ8O3.js → Report-DYicrOSm.js} +4 -4
- package/dist/{ReportEditor-DtfEQ_8T.js → ReportEditor-D7GGcHre.js} +392 -376
- package/dist/{ReportView-B4LtH-DO.js → ReportView-BzZR7ZLF.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BhWCLEfp.js → SelectComponent.vue_vue_type_script_setup_true_lang-BXZkFRRh.js} +1 -1
- package/dist/{Setting-8zch0HnP.js → Setting-BCyliq0w.js} +4 -4
- package/dist/{TileEditor-lcd84uaM.js → TileEditor-DB6cd_RH.js} +7 -7
- package/dist/{TransitionFade-CP8HKs9i.js → TransitionFade-B-yJvnSS.js} +5 -5
- package/dist/app.js +20 -12
- package/dist/assets/{formatChartData.worker-B3aFFvRN.js → formatChartData.worker-DHyKAOan.js} +26 -26
- package/dist/assets/{processTableData.worker-C9Y9NVCl.js → processTableData.worker-BAeQAKT3.js} +30 -30
- package/dist/{vue-i18n-D1iec8Wy.js → vue-i18n-D4W4y-_2.js} +2151 -2219
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { W as A, e as lt, f as _l, S as qe, v as it, g as Fl, h as ft, i as Yt, q as Gt, R as Ke, j as Ll, D as Re, c as ge, C as Ce, a as Rl, b as Dl, _ as
|
|
3
|
-
import { u as at, b as tt, a as Ft, d as Je, i as $l } from "./vue-i18n-
|
|
4
|
-
import { d as bt, _ as
|
|
5
|
-
import { storeToRefs as
|
|
6
|
-
import { useBreakpoints as jt, useSnackbar as Lt, components as
|
|
7
|
-
import { _ as Il } from "./SelectComponent.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { computed as k, defineComponent as Te, mergeModels as Ne, useModel as Ee, ref as g, onMounted as Ie, nextTick as Se, watch as de, resolveComponent as B, createElementBlock as ne, openBlock as W, Fragment as xe, renderSlot as Me, createVNode as U, normalizeStyle as Ve, unref as s, createElementVNode as X, toDisplayString as De, withCtx as ie, createBlock as pe, createCommentVNode as ke, normalizeClass as Qe, h as rt, renderList as ut, toRaw as xl, markRaw as Sl, createTextVNode as yt, onUnmounted as Ut, resolveDynamicComponent as Cl, withDirectives as kl, vShow as Tl, withModifiers as ht } from "vue";
|
|
2
|
+
import { W as A, e as lt, f as _l, S as qe, v as it, g as Fl, h as ft, i as Yt, q as Gt, R as Ke, j as Ll, D as Re, c as ge, C as Ce, a as Rl, b as Dl, _ as zl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BNTtoXSl.js";
|
|
3
|
+
import { u as at, b as tt, a as Ft, d as Je, i as $l } from "./vue-i18n-D4W4y-_2.js";
|
|
4
|
+
import { d as bt, _ as Vl, a as El, b as Al, c as Wl } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-Cg6ChdaG.js";
|
|
5
|
+
import { storeToRefs as ze, defineStore as Xt } from "pinia";
|
|
6
|
+
import { useBreakpoints as jt, useSnackbar as Lt, components as Nl } from "@feedmepos/ui-library";
|
|
7
|
+
import { _ as Il } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BXZkFRRh.js";
|
|
8
8
|
import { r as Ue } from "./i18n-7InkCBCc.js";
|
|
9
|
-
import { _ as wt } from "./NoData.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { _ as wt } from "./NoData.vue_vue_type_script_setup_true_lang-BRz75rkR.js";
|
|
10
10
|
var xt = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(xt || {}), Be = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(Be || {}), St = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(St || {}), Ct = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Ct || {}), kt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(kt || {}), Tt = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(Tt || {}), _t = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(_t || {});
|
|
11
11
|
A.Circular, A.Table, A.BarChart, A.LineChart, A.StackBarChart, A.StackLineChart, A.Scorecard, A.Spacer;
|
|
12
|
-
const
|
|
12
|
+
const Ml = [
|
|
13
13
|
{
|
|
14
14
|
type: A.Circular,
|
|
15
15
|
showLabel: !1,
|
|
@@ -126,17 +126,17 @@ function $e({
|
|
|
126
126
|
function Kt(e, a, o) {
|
|
127
127
|
if (e === "" || a === "")
|
|
128
128
|
return null;
|
|
129
|
-
let l = (
|
|
130
|
-
o === "ID" && (l = (
|
|
131
|
-
const
|
|
132
|
-
if (isNaN(
|
|
129
|
+
let l = (D) => D == null ? void 0 : D.replace(/,/g, "");
|
|
130
|
+
o === "ID" && (l = (D) => D == null ? void 0 : D.replace(/\./g, "").replace(/,/g, "."));
|
|
131
|
+
const u = Number(l(e)), y = Number(l(a));
|
|
132
|
+
if (isNaN(u) || isNaN(y))
|
|
133
133
|
return null;
|
|
134
|
-
let
|
|
135
|
-
|
|
136
|
-
const
|
|
134
|
+
let T = 0;
|
|
135
|
+
y === 0 ? u === 0 ? T = 0 : T = 1 : T = (u - y) / y;
|
|
136
|
+
const _ = Hl(T);
|
|
137
137
|
return {
|
|
138
|
-
value: isNaN(
|
|
139
|
-
icon:
|
|
138
|
+
value: isNaN(T) ? "" : `${(T * 100).toFixed(0)}%`,
|
|
139
|
+
icon: _
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
function Hl(e) {
|
|
@@ -155,17 +155,17 @@ function Hl(e) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
function nt(e) {
|
|
158
|
-
function a(m,
|
|
159
|
-
if (m.measureText(
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
for (;
|
|
163
|
-
const
|
|
164
|
-
m.measureText(
|
|
158
|
+
function a(m, p, h) {
|
|
159
|
+
if (m.measureText(p).width <= h) return p;
|
|
160
|
+
const c = "…";
|
|
161
|
+
let b = 0, f = p.length;
|
|
162
|
+
for (; b < f; ) {
|
|
163
|
+
const C = Math.floor((b + f) / 2), w = p.slice(0, C) + c;
|
|
164
|
+
m.measureText(w).width <= h ? b = C + 1 : f = C;
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return p.slice(0, b - 1) + c;
|
|
167
167
|
}
|
|
168
|
-
const o =
|
|
168
|
+
const o = k(() => ({
|
|
169
169
|
display: e.showLabel,
|
|
170
170
|
align: e.labelAlign,
|
|
171
171
|
anchor: e.labelAnchor,
|
|
@@ -175,11 +175,11 @@ function nt(e) {
|
|
|
175
175
|
size: e.labelFontSize
|
|
176
176
|
},
|
|
177
177
|
color: (m) => {
|
|
178
|
-
const
|
|
179
|
-
return
|
|
178
|
+
const p = m.chart.data.datasets[m.datasetIndex];
|
|
179
|
+
return p.borderColor ? Array.isArray(p.borderColor) ? p.borderColor[m.dataIndex] : p.borderColor : p.backgroundColor ? Array.isArray(p.backgroundColor) ? p.backgroundColor[m.dataIndex] : p.backgroundColor : "#000";
|
|
180
180
|
},
|
|
181
181
|
formatter: (m) => m === 0 ? "" : m.toLocaleString("en-US")
|
|
182
|
-
})), l =
|
|
182
|
+
})), l = k(() => ({
|
|
183
183
|
display: e.showX,
|
|
184
184
|
position: e.xPosition,
|
|
185
185
|
grid: {
|
|
@@ -190,13 +190,13 @@ function nt(e) {
|
|
|
190
190
|
callback: function(m) {
|
|
191
191
|
if ((e == null ? void 0 : e.isTransposed) === !0) return String(m);
|
|
192
192
|
let h = String(m);
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
const
|
|
199
|
-
return
|
|
193
|
+
const c = this;
|
|
194
|
+
c && typeof c.getLabelForValue == "function" && (h = c.getLabelForValue(m));
|
|
195
|
+
const b = c == null ? void 0 : c.chart, f = c == null ? void 0 : c.ctx, C = b.height * 0.25;
|
|
196
|
+
if (f && C > 0) {
|
|
197
|
+
f.save();
|
|
198
|
+
const q = f.measureText(h).width > C ? a(f, h, C) : h;
|
|
199
|
+
return f.restore(), q;
|
|
200
200
|
}
|
|
201
201
|
return h;
|
|
202
202
|
},
|
|
@@ -212,18 +212,18 @@ function nt(e) {
|
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
214
|
afterBuildTicks: (m) => {
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const h = m.getLabelForValue(
|
|
218
|
-
m.options.ticks.minRotation =
|
|
215
|
+
const p = Array.isArray(m == null ? void 0 : m.ticks) ? m.ticks : [];
|
|
216
|
+
if (p.length === 0) return;
|
|
217
|
+
const h = m.getLabelForValue(p[0].value), c = !isNaN(Number(h));
|
|
218
|
+
m.options.ticks.minRotation = c || p.length < 10 ? 0 : 90;
|
|
219
219
|
},
|
|
220
220
|
afterFit: (m) => {
|
|
221
221
|
if (!(e != null && e.isTransposed)) {
|
|
222
|
-
const
|
|
223
|
-
m.height >
|
|
222
|
+
const p = m.chart.height * 0.4;
|
|
223
|
+
m.height > p && (m.height = p);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
})),
|
|
226
|
+
})), u = k(() => ({
|
|
227
227
|
display: e.showY,
|
|
228
228
|
position: e.yPosition,
|
|
229
229
|
grid: {
|
|
@@ -237,13 +237,13 @@ function nt(e) {
|
|
|
237
237
|
callback: function(m) {
|
|
238
238
|
if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(m);
|
|
239
239
|
let h = String(m);
|
|
240
|
-
const
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
const
|
|
246
|
-
return
|
|
240
|
+
const c = this;
|
|
241
|
+
c && typeof c.getLabelForValue == "function" && (h = c.getLabelForValue(m));
|
|
242
|
+
const b = c == null ? void 0 : c.chart, f = c == null ? void 0 : c.ctx, C = b.width * 0.4;
|
|
243
|
+
if (f && C > 0) {
|
|
244
|
+
f.save();
|
|
245
|
+
const q = f.measureText(h).width > C ? a(f, h, C) : h;
|
|
246
|
+
return f.restore(), q;
|
|
247
247
|
}
|
|
248
248
|
return h;
|
|
249
249
|
}
|
|
@@ -255,7 +255,7 @@ function nt(e) {
|
|
|
255
255
|
size: e.yTitleFontSize
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
})),
|
|
258
|
+
})), y = k(() => ({
|
|
259
259
|
display: e.showLegend,
|
|
260
260
|
position: e.legendPosition,
|
|
261
261
|
usePointStyle: e.usePointStyle,
|
|
@@ -265,42 +265,42 @@ function nt(e) {
|
|
|
265
265
|
usePointStyle: e.usePointStyle ?? !0,
|
|
266
266
|
generateLabels: (m) => {
|
|
267
267
|
var h;
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
271
|
-
const
|
|
272
|
-
return m.data.labels.map((
|
|
273
|
-
const
|
|
268
|
+
const p = ((h = m == null ? void 0 : m.data) == null ? void 0 : h.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 c = p[0];
|
|
272
|
+
return m.data.labels.map((f, C) => {
|
|
273
|
+
const w = c.backgroundColor[C];
|
|
274
274
|
return {
|
|
275
|
-
text:
|
|
275
|
+
text: f,
|
|
276
276
|
fontColor: "#6b6b6b",
|
|
277
|
-
fillStyle:
|
|
278
|
-
strokeStyle:
|
|
277
|
+
fillStyle: w,
|
|
278
|
+
strokeStyle: w,
|
|
279
279
|
datasetIndex: 0,
|
|
280
|
-
index:
|
|
281
|
-
hidden: m.getDataVisibility ? !m.getDataVisibility(
|
|
280
|
+
index: C,
|
|
281
|
+
hidden: m.getDataVisibility ? !m.getDataVisibility(C) : !1
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
-
return m.data.datasets.map((
|
|
286
|
-
const
|
|
285
|
+
return m.data.datasets.map((c, b) => {
|
|
286
|
+
const f = c.borderColor || c.backgroundColor;
|
|
287
287
|
return {
|
|
288
|
-
text:
|
|
288
|
+
text: c.label,
|
|
289
289
|
fontColor: "#6b6b6b",
|
|
290
|
-
fillStyle:
|
|
291
|
-
strokeStyle:
|
|
292
|
-
datasetIndex:
|
|
293
|
-
hidden: !m.isDatasetVisible(
|
|
290
|
+
fillStyle: f,
|
|
291
|
+
strokeStyle: f,
|
|
292
|
+
datasetIndex: b,
|
|
293
|
+
hidden: !m.isDatasetVisible(b)
|
|
294
294
|
};
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
})),
|
|
299
|
-
return { datalabels: o, xCfg: l, yCfg:
|
|
298
|
+
})), T = k(() => e.isTransposed), _ = k(() => e.chartWidth), D = k(() => e.chartHeight);
|
|
299
|
+
return { datalabels: o, xCfg: l, yCfg: u, isTransposed: T, legend: y, chartWidth: _, chartHeight: D };
|
|
300
300
|
}
|
|
301
301
|
const Pl = /* @__PURE__ */ Te({
|
|
302
302
|
__name: "WidgetBarchart",
|
|
303
|
-
props: /* @__PURE__ */
|
|
303
|
+
props: /* @__PURE__ */ Ne({
|
|
304
304
|
tileIndex: {}
|
|
305
305
|
}, {
|
|
306
306
|
modelValue: { required: !0 },
|
|
@@ -308,56 +308,56 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
308
308
|
}),
|
|
309
309
|
emits: ["update:modelValue"],
|
|
310
310
|
setup(e) {
|
|
311
|
-
const a = e, o =
|
|
312
|
-
var
|
|
313
|
-
return ((
|
|
314
|
-
}),
|
|
315
|
-
var
|
|
316
|
-
return ((
|
|
317
|
-
}), { datalabels:
|
|
311
|
+
const a = e, o = Ee(e, "modelValue"), l = g(null), u = k(() => {
|
|
312
|
+
var w;
|
|
313
|
+
return ((w = o.value.data) == null ? void 0 : w.xAxis) ?? [];
|
|
314
|
+
}), y = k(() => {
|
|
315
|
+
var w;
|
|
316
|
+
return ((w = o.value.data) == null ? void 0 : w.datasets) ?? [];
|
|
317
|
+
}), { datalabels: T, xCfg: _, yCfg: D, isTransposed: m, legend: p, chartWidth: h, chartHeight: c } = nt(
|
|
318
318
|
o.value
|
|
319
|
-
),
|
|
320
|
-
...
|
|
321
|
-
label:
|
|
322
|
-
data:
|
|
323
|
-
dash: !!
|
|
324
|
-
backgroundColor: $e({ index:
|
|
319
|
+
), b = k(() => y.value.length > 0 ? [
|
|
320
|
+
...y.value.map((w, q) => ({
|
|
321
|
+
label: w.name,
|
|
322
|
+
data: w.values,
|
|
323
|
+
dash: !!w.isCompare,
|
|
324
|
+
backgroundColor: $e({ index: q, isCompare: w.isCompare })
|
|
325
325
|
}))
|
|
326
|
-
] : []),
|
|
327
|
-
function
|
|
328
|
-
return
|
|
326
|
+
] : []), f = lt();
|
|
327
|
+
function C() {
|
|
328
|
+
return f.extractChartSize(l.value, a.tileIndex) || { width: 0, height: 0 };
|
|
329
329
|
}
|
|
330
330
|
return Ie(() => {
|
|
331
331
|
Se(() => {
|
|
332
|
-
|
|
332
|
+
C();
|
|
333
333
|
});
|
|
334
|
-
}),
|
|
335
|
-
Se(() =>
|
|
336
|
-
}), (
|
|
337
|
-
const
|
|
338
|
-
return
|
|
339
|
-
|
|
340
|
-
|
|
334
|
+
}), de([b], () => {
|
|
335
|
+
Se(() => C());
|
|
336
|
+
}), (w, q) => {
|
|
337
|
+
const x = B("FmBarChart");
|
|
338
|
+
return W(), ne(xe, null, [
|
|
339
|
+
Me(w.$slots, "menu"),
|
|
340
|
+
U(x, {
|
|
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(
|
|
344
|
+
datasets: b.value,
|
|
345
|
+
"x-axis": { categories: u.value },
|
|
346
|
+
"x-cfg": s(_),
|
|
347
|
+
"y-cfg": s(D),
|
|
348
348
|
transpose: s(m),
|
|
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(T),
|
|
357
357
|
"maintain-aspect-ratio": !1,
|
|
358
|
-
style:
|
|
358
|
+
style: Ve({
|
|
359
359
|
"--chart-width": s(h) !== void 0 ? s(h) + "px" : "100%",
|
|
360
|
-
"--chart-height": s(
|
|
360
|
+
"--chart-height": s(c) !== void 0 ? s(c) + "px" : "calc(100% - 36px)"
|
|
361
361
|
})
|
|
362
362
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
363
363
|
], 64);
|
|
@@ -365,7 +365,7 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
365
365
|
}
|
|
366
366
|
}), Bl = /* @__PURE__ */ Te({
|
|
367
367
|
__name: "WidgetCircular",
|
|
368
|
-
props: /* @__PURE__ */
|
|
368
|
+
props: /* @__PURE__ */ Ne({
|
|
369
369
|
tileIndex: {}
|
|
370
370
|
}, {
|
|
371
371
|
modelValue: { required: !0 },
|
|
@@ -373,56 +373,56 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
373
373
|
}),
|
|
374
374
|
emits: ["update:modelValue"],
|
|
375
375
|
setup(e) {
|
|
376
|
-
const a = e, o =
|
|
377
|
-
let
|
|
378
|
-
return o.value.data.datasets && o.value.data.metrics && o.value.data.datasets.length > 0 && o.value.data.metrics.length > 0 && (
|
|
376
|
+
const a = e, o = Ee(e, "modelValue"), { breakpoints: l } = jt(), u = g(null), { datalabels: y, legend: T, chartWidth: _, chartHeight: D } = nt(o.value), m = k(() => {
|
|
377
|
+
let b = [];
|
|
378
|
+
return o.value.data.datasets && o.value.data.metrics && o.value.data.datasets.length > 0 && o.value.data.metrics.length > 0 && (b = [
|
|
379
379
|
{
|
|
380
380
|
label: o.value.data.metrics[0],
|
|
381
|
-
data: o.value.data.datasets.map((
|
|
382
|
-
backgroundColor: o.value.data.datasets.map((
|
|
381
|
+
data: o.value.data.datasets.map((f) => f.value),
|
|
382
|
+
backgroundColor: o.value.data.datasets.map((f, C) => $e({ index: C }))
|
|
383
383
|
}
|
|
384
|
-
]),
|
|
385
|
-
}),
|
|
384
|
+
]), b;
|
|
385
|
+
}), p = lt();
|
|
386
386
|
function h() {
|
|
387
|
-
return
|
|
387
|
+
return p.extractChartSize(u.value, a.tileIndex) || { width: 0, height: 0 };
|
|
388
388
|
}
|
|
389
389
|
Ie(() => {
|
|
390
390
|
Se(() => {
|
|
391
391
|
h();
|
|
392
392
|
});
|
|
393
|
-
}),
|
|
393
|
+
}), de([m], () => {
|
|
394
394
|
Se(() => h());
|
|
395
395
|
});
|
|
396
|
-
const
|
|
397
|
-
return (
|
|
398
|
-
const
|
|
399
|
-
return
|
|
400
|
-
|
|
401
|
-
|
|
396
|
+
const c = k(() => l.value.lg ? 12 : 8);
|
|
397
|
+
return (b, f) => {
|
|
398
|
+
const C = B("FmPieChart");
|
|
399
|
+
return W(), ne(xe, null, [
|
|
400
|
+
Me(b.$slots, "menu"),
|
|
401
|
+
U(C, {
|
|
402
402
|
ref_key: "chartRef",
|
|
403
|
-
ref:
|
|
403
|
+
ref: u,
|
|
404
404
|
class: "circular",
|
|
405
405
|
percentage: "70%",
|
|
406
406
|
datasets: m.value,
|
|
407
|
-
metrics: o.value.data.datasets.map((
|
|
407
|
+
metrics: o.value.data.datasets.map((w) => w.name),
|
|
408
408
|
variant: "doughnut",
|
|
409
409
|
legend: {
|
|
410
|
-
display: s(
|
|
411
|
-
position: s(
|
|
412
|
-
maxHeight: s(
|
|
413
|
-
maxWidth: s(
|
|
410
|
+
display: s(T).display ?? !0,
|
|
411
|
+
position: s(T).position ?? "top",
|
|
412
|
+
maxHeight: s(T).maxHeight,
|
|
413
|
+
maxWidth: s(T).maxWidth,
|
|
414
414
|
labels: {
|
|
415
|
-
...s(
|
|
415
|
+
...s(T).labels,
|
|
416
416
|
font: {
|
|
417
|
-
size:
|
|
417
|
+
size: c.value
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
|
-
datalabels: s(
|
|
421
|
+
datalabels: s(y),
|
|
422
422
|
"maintain-aspect-ratio": !1,
|
|
423
|
-
style:
|
|
424
|
-
"--chart-width": s(
|
|
425
|
-
"--chart-height": s(
|
|
423
|
+
style: Ve({
|
|
424
|
+
"--chart-width": s(_) !== void 0 ? s(_) + "px" : "100%",
|
|
425
|
+
"--chart-height": s(D) !== void 0 ? s(D) + "px" : "calc(100% - 36px)"
|
|
426
426
|
})
|
|
427
427
|
}, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
|
|
428
428
|
], 64);
|
|
@@ -436,14 +436,14 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
436
436
|
},
|
|
437
437
|
emits: ["update:modelValue"],
|
|
438
438
|
setup(e) {
|
|
439
|
-
const a =
|
|
439
|
+
const a = Ee(e, "modelValue"), { t: o } = at(), { compareDateRange: l, defaultDateSetting: u } = ze(tt()), { country: y } = Ft(), T = k(() => {
|
|
440
440
|
var h;
|
|
441
441
|
return ((h = a.value.data) == null ? void 0 : h.value) || "";
|
|
442
|
-
}),
|
|
442
|
+
}), _ = k(() => {
|
|
443
443
|
const { data: h } = a.value;
|
|
444
|
-
return h != null && h.comparison ? Kt(
|
|
444
|
+
return h != null && h.comparison ? Kt(T.value, h.comparison, y) : null;
|
|
445
445
|
});
|
|
446
|
-
function
|
|
446
|
+
function D(h) {
|
|
447
447
|
switch (h) {
|
|
448
448
|
case xt.bar:
|
|
449
449
|
return "bar";
|
|
@@ -453,57 +453,57 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
453
453
|
return "line";
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const m =
|
|
456
|
+
const m = k(() => {
|
|
457
457
|
var h;
|
|
458
458
|
return (h = a.value.data) == null ? void 0 : h.sparkline;
|
|
459
|
-
}),
|
|
459
|
+
}), p = k(() => m.value.datasets.map((h) => ({
|
|
460
460
|
label: h.name,
|
|
461
461
|
data: h.values,
|
|
462
462
|
fill: !0,
|
|
463
463
|
color: "#36a2eb"
|
|
464
464
|
})));
|
|
465
|
-
return (h,
|
|
466
|
-
var
|
|
467
|
-
const
|
|
468
|
-
return
|
|
469
|
-
|
|
470
|
-
X("p", Ul, De(
|
|
465
|
+
return (h, c) => {
|
|
466
|
+
var q;
|
|
467
|
+
const b = B("FmIcon"), f = B("FmChip"), C = B("FmTooltip"), w = B("FmLineChart");
|
|
468
|
+
return W(), ne("div", ql, [
|
|
469
|
+
Me(h.$slots, "menu"),
|
|
470
|
+
X("p", Ul, De(T.value), 1),
|
|
471
471
|
X("div", Yl, [
|
|
472
|
-
|
|
473
|
-
content: `vs. ${(
|
|
472
|
+
U(C, {
|
|
473
|
+
content: `vs. ${(q = s(u).defaultCompareType) == null ? void 0 : q.split("_").join(" ")}`,
|
|
474
474
|
placement: "right",
|
|
475
475
|
"hide-arrow": "",
|
|
476
476
|
variant: "plain"
|
|
477
477
|
}, {
|
|
478
478
|
default: ie(() => [
|
|
479
|
-
|
|
479
|
+
_.value ? (W(), pe(f, {
|
|
480
480
|
key: 0,
|
|
481
|
-
icon:
|
|
482
|
-
class:
|
|
481
|
+
icon: _.value.icon.name,
|
|
482
|
+
class: Qe(`bg-${_.value.icon.tailwind}`),
|
|
483
483
|
compact: ""
|
|
484
484
|
}, {
|
|
485
485
|
default: ie(() => [
|
|
486
|
-
|
|
487
|
-
name:
|
|
488
|
-
color:
|
|
486
|
+
U(b, {
|
|
487
|
+
name: _.value.icon.name,
|
|
488
|
+
color: _.value.icon.color
|
|
489
489
|
}, null, 8, ["name", "color"]),
|
|
490
490
|
X("p", {
|
|
491
491
|
class: "fm-typo-en-body-md-600",
|
|
492
|
-
style:
|
|
493
|
-
}, De(
|
|
492
|
+
style: Ve({ color: _.value.icon.color })
|
|
493
|
+
}, De(_.value.value), 5)
|
|
494
494
|
]),
|
|
495
495
|
_: 1
|
|
496
496
|
}, 8, ["icon", "class"])) : ke("", !0),
|
|
497
|
-
s(l).endDate !== null && s(l).startDate !== null &&
|
|
497
|
+
s(l).endDate !== null && s(l).startDate !== null && _.value === null ? (W(), pe(f, {
|
|
498
498
|
key: 1,
|
|
499
499
|
compact: ""
|
|
500
500
|
}, {
|
|
501
501
|
default: ie(() => [
|
|
502
|
-
|
|
502
|
+
U(b, {
|
|
503
503
|
name: "arrow_upward",
|
|
504
504
|
color: "#C7C7CC"
|
|
505
505
|
}),
|
|
506
|
-
|
|
506
|
+
c[0] || (c[0] = X("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
})) : ke("", !0)
|
|
@@ -511,11 +511,11 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
511
511
|
_: 1
|
|
512
512
|
}, 8, ["content"])
|
|
513
513
|
]),
|
|
514
|
-
m.value ? (
|
|
515
|
-
|
|
514
|
+
m.value ? (W(), ne("div", Gl, [
|
|
515
|
+
D(m.value.type) === "line" ? (W(), pe(w, {
|
|
516
516
|
key: 0,
|
|
517
517
|
class: "sparkline",
|
|
518
|
-
datasets:
|
|
518
|
+
datasets: p.value,
|
|
519
519
|
legend: {
|
|
520
520
|
display: !1
|
|
521
521
|
},
|
|
@@ -525,7 +525,7 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
525
525
|
"x-cfg": { display: !1 },
|
|
526
526
|
"maintain-aspect-ratio": !1
|
|
527
527
|
}, null, 8, ["datasets", "x-axis"])) : ke("", !0)
|
|
528
|
-
])) : (
|
|
528
|
+
])) : (W(), ne("div", Xl, c[1] || (c[1] = [
|
|
529
529
|
X("div", { class: "sparkline" }, [
|
|
530
530
|
X("div", { class: "flex flex-col gap-8" }, [
|
|
531
531
|
X("div"),
|
|
@@ -540,143 +540,143 @@ const Pl = /* @__PURE__ */ Te({
|
|
|
540
540
|
}), Kl = {};
|
|
541
541
|
function Jl(e, a) {
|
|
542
542
|
const o = B("FmMenuDivider");
|
|
543
|
-
return
|
|
543
|
+
return W(), pe(o);
|
|
544
544
|
}
|
|
545
|
-
const
|
|
546
|
-
const e =
|
|
547
|
-
e.value =
|
|
548
|
-
},
|
|
549
|
-
a[
|
|
550
|
-
},
|
|
551
|
-
const
|
|
552
|
-
[...
|
|
553
|
-
const E =
|
|
554
|
-
E && (E.style.height = `${
|
|
545
|
+
const Ql = /* @__PURE__ */ Il(Kl, [["render", Jl]]), Zl = "mf-reporttable-dimension", Pt = Xt(Zl, () => {
|
|
546
|
+
const e = g(0), a = g([]), o = g(!1), l = (x, r) => {
|
|
547
|
+
e.value = x, y(x, r);
|
|
548
|
+
}, u = (x, r, F, n) => {
|
|
549
|
+
a[x] = r, a.value = [...a.value], T(x, r, F, n);
|
|
550
|
+
}, y = (x, r) => {
|
|
551
|
+
const F = (r == null ? void 0 : r.querySelectorAll("thead tr")) ?? [], n = (r == null ? void 0 : r.querySelectorAll("tbody tr")) ?? [];
|
|
552
|
+
[...F, ...n].forEach((V) => {
|
|
553
|
+
const E = V;
|
|
554
|
+
E && (E.style.height = `${x}px`);
|
|
555
555
|
});
|
|
556
|
-
},
|
|
557
|
-
const d = (
|
|
558
|
-
if (
|
|
559
|
-
const
|
|
560
|
-
if (
|
|
561
|
-
const
|
|
562
|
-
|
|
556
|
+
}, T = (x, r, F, n = !1) => {
|
|
557
|
+
const d = (F == null ? void 0 : F.querySelectorAll("th")) ?? [];
|
|
558
|
+
if (x === void 0) return;
|
|
559
|
+
const V = d[x], E = n ? a[x] : r;
|
|
560
|
+
if (!V || E === void 0) return;
|
|
561
|
+
const N = () => {
|
|
562
|
+
V.style.width = `${E}px`;
|
|
563
563
|
};
|
|
564
|
-
n ? requestAnimationFrame(
|
|
565
|
-
},
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
|
|
564
|
+
n ? requestAnimationFrame(N) : N();
|
|
565
|
+
}, _ = () => {
|
|
566
|
+
const x = document.querySelectorAll("th"), r = document.querySelectorAll("td"), F = document.querySelector("table");
|
|
567
|
+
F == null || F.classList.add("table-fixed"), x.forEach((n) => n.classList.add("toggleEditResize")), r.forEach((n) => n.classList.add("toggleEditResize")), o.value = !0;
|
|
568
|
+
}, D = () => {
|
|
569
|
+
const x = document.querySelectorAll("th"), r = document.querySelectorAll("td"), F = document.querySelectorAll(".col-resize-handle"), n = document.querySelectorAll(".row-resize-handle");
|
|
570
|
+
x.forEach((d) => d.classList.remove("toggleEditResize")), r.forEach((d) => d.classList.remove("toggleEditResize")), F.forEach((d) => d.remove()), n.forEach((d) => d.remove()), o.value = !1;
|
|
571
571
|
}, m = () => {
|
|
572
572
|
e.value = 0, a.value = [];
|
|
573
|
-
},
|
|
573
|
+
}, p = (x, r) => {
|
|
574
574
|
if (r) {
|
|
575
|
-
const
|
|
576
|
-
[...
|
|
575
|
+
const F = document.querySelectorAll(`thead th:nth-child(${x + 1})`), n = document.querySelectorAll(`tbody td:nth-child(${x + 1})`);
|
|
576
|
+
[...F, ...n].forEach((d) => {
|
|
577
577
|
d.classList.add("highlight-hover-col");
|
|
578
578
|
});
|
|
579
579
|
} else
|
|
580
580
|
document.querySelectorAll(
|
|
581
|
-
`thead th:nth-child(${
|
|
582
|
-
).forEach((
|
|
583
|
-
}, h = (
|
|
584
|
-
const r = document.querySelectorAll("thead tr"),
|
|
581
|
+
`thead th:nth-child(${x + 1}), tbody td:nth-child(${x + 1})`
|
|
582
|
+
).forEach((F) => F.classList.add("highlight-col"));
|
|
583
|
+
}, h = (x) => {
|
|
584
|
+
const r = document.querySelectorAll("thead tr"), F = document.querySelectorAll("tbody tr"), n = [...r, ...F];
|
|
585
585
|
for (const d of n)
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
const r =
|
|
589
|
-
for (const n of
|
|
586
|
+
x ? d.classList.add("highlight-hover-row") : d.classList.add("highlight-row");
|
|
587
|
+
}, c = (x) => {
|
|
588
|
+
const r = x ? ".highlight-hover-row" : ".highlight-row", F = document.querySelectorAll(r);
|
|
589
|
+
for (const n of F)
|
|
590
590
|
n.classList.remove(r.slice(1));
|
|
591
|
-
},
|
|
592
|
-
|
|
591
|
+
}, b = (x) => {
|
|
592
|
+
x ? document.querySelectorAll(".highlight-hover-col").forEach((r) => {
|
|
593
593
|
r.classList.remove("highlight-hover-col");
|
|
594
594
|
}) : document.querySelectorAll(".highlight-col").forEach((r) => r.classList.remove("highlight-col"));
|
|
595
|
-
},
|
|
596
|
-
const
|
|
595
|
+
}, f = (x, r) => {
|
|
596
|
+
const F = x.clientX, n = x.target.closest("table");
|
|
597
597
|
if (!n) return;
|
|
598
598
|
const d = n.querySelectorAll("th")[r];
|
|
599
599
|
if (!d) return;
|
|
600
|
-
const
|
|
600
|
+
const V = d.getBoundingClientRect().width || 60, E = d.querySelector("button"), N = (E == null ? void 0 : E.querySelector("span")) || d.querySelector("p") || d;
|
|
601
601
|
let j = 60;
|
|
602
|
-
if (
|
|
603
|
-
const
|
|
602
|
+
if (N) {
|
|
603
|
+
const v = N.textContent || "", z = window.getComputedStyle(N), Y = `${z.fontWeight} ${z.fontSize} ${z.fontFamily}`, I = document.createElement("canvas").getContext("2d");
|
|
604
604
|
if (I) {
|
|
605
605
|
I.font = Y;
|
|
606
|
-
const H = I.measureText(
|
|
606
|
+
const H = I.measureText(v), he = window.getComputedStyle(d), _e = parseFloat(he.paddingLeft || "0"), Ae = parseFloat(he.paddingRight || "0");
|
|
607
607
|
j = H.width + _e + Ae;
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
|
|
610
|
+
p(r, !1);
|
|
611
611
|
let ue = null, K = null;
|
|
612
612
|
const oe = () => {
|
|
613
613
|
if (K === null) return;
|
|
614
|
-
const
|
|
615
|
-
|
|
616
|
-
let
|
|
614
|
+
const v = d;
|
|
615
|
+
v.style.width = `${K}px`;
|
|
616
|
+
let z = 0;
|
|
617
617
|
n.querySelectorAll("th").forEach((O, I) => {
|
|
618
|
-
|
|
619
|
-
}), n.classList.remove("w-full"), n.style.width = `${
|
|
620
|
-
}, ye = (
|
|
621
|
-
const
|
|
622
|
-
K = Math.max(j,
|
|
623
|
-
},
|
|
618
|
+
z += I === r ? K : O.getBoundingClientRect().width;
|
|
619
|
+
}), n.classList.remove("w-full"), n.style.width = `${z}px`, ue = null;
|
|
620
|
+
}, ye = (v) => {
|
|
621
|
+
const z = v.clientX - F;
|
|
622
|
+
K = Math.max(j, V + z), ue === null && (ue = requestAnimationFrame(oe));
|
|
623
|
+
}, me = () => {
|
|
624
624
|
ue !== null && cancelAnimationFrame(ue), K !== null && (d.style.width = `${K}px`);
|
|
625
|
-
const
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
}), a.value =
|
|
625
|
+
const v = n.querySelectorAll("th"), z = [];
|
|
626
|
+
v.forEach((Y) => {
|
|
627
|
+
z.push(Y.getBoundingClientRect().width);
|
|
628
|
+
}), a.value = z, b(!1), document.removeEventListener("mousemove", ye), document.removeEventListener("mouseup", me);
|
|
629
629
|
};
|
|
630
|
-
document.addEventListener("mousemove", ye), document.addEventListener("mouseup",
|
|
631
|
-
},
|
|
632
|
-
const r =
|
|
630
|
+
document.addEventListener("mousemove", ye), document.addEventListener("mouseup", me);
|
|
631
|
+
}, C = (x) => {
|
|
632
|
+
const r = x.clientY, F = x.target.closest("table"), n = e.value || 48;
|
|
633
633
|
h(!1);
|
|
634
634
|
const d = (E) => {
|
|
635
|
-
const
|
|
636
|
-
|
|
637
|
-
},
|
|
638
|
-
|
|
635
|
+
const N = Math.max(30, n + (E.clientY - r));
|
|
636
|
+
F && l(N, F);
|
|
637
|
+
}, V = () => {
|
|
638
|
+
c(!1), document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", V);
|
|
639
639
|
};
|
|
640
|
-
document.addEventListener("mousemove", d), document.addEventListener("mouseup",
|
|
640
|
+
document.addEventListener("mousemove", d), document.addEventListener("mouseup", V);
|
|
641
641
|
};
|
|
642
642
|
return {
|
|
643
643
|
rowHeight: e,
|
|
644
644
|
colWidths: a,
|
|
645
645
|
isEditing: o,
|
|
646
646
|
updateRowHeight: l,
|
|
647
|
-
updateColWidth:
|
|
648
|
-
setRowHeights:
|
|
649
|
-
setColWidths:
|
|
650
|
-
enableEditMode:
|
|
651
|
-
disableEditMode:
|
|
647
|
+
updateColWidth: u,
|
|
648
|
+
setRowHeights: y,
|
|
649
|
+
setColWidths: T,
|
|
650
|
+
enableEditMode: _,
|
|
651
|
+
disableEditMode: D,
|
|
652
652
|
resetStore: m,
|
|
653
|
-
highlightCol:
|
|
653
|
+
highlightCol: p,
|
|
654
654
|
highlightRows: h,
|
|
655
|
-
removeRowHighlight:
|
|
656
|
-
removeColHighlight:
|
|
657
|
-
resizeCol:
|
|
658
|
-
resizeRow:
|
|
655
|
+
removeRowHighlight: c,
|
|
656
|
+
removeColHighlight: b,
|
|
657
|
+
resizeCol: f,
|
|
658
|
+
resizeRow: C,
|
|
659
659
|
enableCellResizing: () => {
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
const d = (
|
|
663
|
-
const
|
|
664
|
-
return
|
|
665
|
-
j.stopPropagation(),
|
|
666
|
-
})) : (
|
|
667
|
-
j.stopPropagation(),
|
|
668
|
-
})),
|
|
660
|
+
const x = document.querySelector("thead"), r = document.querySelectorAll("thead tr"), F = document.querySelectorAll("tbody tr"), n = [...r, ...F];
|
|
661
|
+
x && x.classList.remove("sticky");
|
|
662
|
+
const d = (V, E) => {
|
|
663
|
+
const N = document.createElement("div");
|
|
664
|
+
return N.className = `${V}-resize-handle`, V === "col" ? (N.addEventListener("mouseenter", () => p(E, !0)), N.addEventListener("mouseleave", () => b(!0)), N.addEventListener("mousedown", (j) => {
|
|
665
|
+
j.stopPropagation(), f(j, E);
|
|
666
|
+
})) : (N.addEventListener("mouseenter", () => h(!0)), N.addEventListener("mouseleave", () => c(!0)), N.addEventListener("mousedown", (j) => {
|
|
667
|
+
j.stopPropagation(), C(j);
|
|
668
|
+
})), N;
|
|
669
669
|
};
|
|
670
|
-
n.forEach((
|
|
671
|
-
const E =
|
|
672
|
-
|
|
670
|
+
n.forEach((V) => {
|
|
671
|
+
const E = V.closest("thead") !== null;
|
|
672
|
+
V.querySelectorAll(E ? "th" : "td").forEach((j, ue) => {
|
|
673
673
|
const K = d("col", ue), oe = d("row", ue);
|
|
674
674
|
j.appendChild(K), j.appendChild(oe);
|
|
675
675
|
});
|
|
676
|
-
}),
|
|
676
|
+
}), _();
|
|
677
677
|
},
|
|
678
678
|
cancelResizingChanges: () => {
|
|
679
|
-
|
|
679
|
+
D();
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
682
|
});
|
|
@@ -685,15 +685,15 @@ function gt(e) {
|
|
|
685
685
|
return "";
|
|
686
686
|
const a = String(e), o = Number(a);
|
|
687
687
|
if (isNaN(o)) return a;
|
|
688
|
-
const [l,
|
|
689
|
-
return
|
|
688
|
+
const [l, u] = a.split("."), y = new Intl.NumberFormat("en-US").format(Number(l));
|
|
689
|
+
return u !== void 0 ? `${y}.${u}` : y;
|
|
690
690
|
}
|
|
691
|
-
const ea = "/assets/processTableData.worker-
|
|
691
|
+
const ea = "/assets/processTableData.worker-BAeQAKT3.js", ta = { class: "my-4" }, la = {
|
|
692
692
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
693
693
|
style: { backgroundColor: "#f9f9f9" }
|
|
694
694
|
}, aa = { class: "font-bold" }, na = { class: "text-fm-color-neutral-gray-300" }, oa = /* @__PURE__ */ Te({
|
|
695
695
|
__name: "WidgetTable",
|
|
696
|
-
props: /* @__PURE__ */
|
|
696
|
+
props: /* @__PURE__ */ Ne({
|
|
697
697
|
tileIndex: {}
|
|
698
698
|
}, {
|
|
699
699
|
modelValue: { required: !0 },
|
|
@@ -701,72 +701,72 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
701
701
|
}),
|
|
702
702
|
emits: ["update:modelValue"],
|
|
703
703
|
setup(e) {
|
|
704
|
-
const { t: a, te: o } = at(), l =
|
|
705
|
-
var
|
|
706
|
-
return ((
|
|
707
|
-
}),
|
|
708
|
-
var
|
|
709
|
-
return ((
|
|
710
|
-
}), r =
|
|
711
|
-
var
|
|
712
|
-
if (!(r.value && r.value.trim().length > 0 || !((
|
|
704
|
+
const { t: a, te: o } = at(), l = Ee(e, "modelValue"), { country: u } = Ft(), { clearTileSorts: y, setTileSorts: T } = _l(), _ = Lt(), D = e, m = g([]), { isEditing: p, colWidths: h, rowHeight: c } = ze(Pt()), { setColWidths: b, setRowHeights: f, enableCellResizing: C } = Pt(), w = g(null), q = k(() => {
|
|
705
|
+
var v;
|
|
706
|
+
return ((v = l.value.data) == null ? void 0 : v.columns) || [{ label: "", key: "" }];
|
|
707
|
+
}), x = k(() => {
|
|
708
|
+
var v;
|
|
709
|
+
return ((v = l.value.data) == null ? void 0 : v.rows) || [];
|
|
710
|
+
}), r = k(() => l.value.filterText), F = k(() => {
|
|
711
|
+
var v, z;
|
|
712
|
+
if (!(r.value && r.value.trim().length > 0 || !((v = x.value[0]) != null && v.isRollup) && !((z = x.value[x.value.length - 1]) != null && z.isRollup))) {
|
|
713
713
|
if (l.value.rollupPosition === Be.top || l.value.rollupPosition === void 0)
|
|
714
714
|
return Be.top;
|
|
715
715
|
if (l.value.rollupPosition === Be.bottom)
|
|
716
716
|
return Be.bottom;
|
|
717
717
|
}
|
|
718
|
-
}), n =
|
|
719
|
-
const O =
|
|
718
|
+
}), n = k(() => {
|
|
719
|
+
const O = F.value !== void 0 ? 1 : 0, I = (w.value ? w.value.$el.offsetHeight : 0) - 48;
|
|
720
720
|
return Math.floor((I - 34.5 - 32) / 48) - O;
|
|
721
|
-
}), d =
|
|
722
|
-
var
|
|
723
|
-
let
|
|
724
|
-
switch (
|
|
721
|
+
}), d = k(() => {
|
|
722
|
+
var z, Y;
|
|
723
|
+
let v = [];
|
|
724
|
+
switch (F.value) {
|
|
725
725
|
case Be.top:
|
|
726
|
-
|
|
726
|
+
v = [...((z = x.value[0]) == null ? void 0 : z.cells) || []].map((O, I) => {
|
|
727
727
|
var H;
|
|
728
728
|
return {
|
|
729
729
|
main: O,
|
|
730
|
-
comparison: (H =
|
|
731
|
-
rowType:
|
|
730
|
+
comparison: (H = x.value[0]) == null ? void 0 : H.comparisonCells[I],
|
|
731
|
+
rowType: q.value[I].type
|
|
732
732
|
};
|
|
733
733
|
});
|
|
734
734
|
break;
|
|
735
735
|
case Be.bottom:
|
|
736
|
-
|
|
736
|
+
v = [...((Y = x.value[x.value.length - 1]) == null ? void 0 : Y.cells) || []].map((O, I) => {
|
|
737
737
|
var H;
|
|
738
738
|
return {
|
|
739
739
|
main: O,
|
|
740
|
-
comparison: (H =
|
|
741
|
-
rowType:
|
|
740
|
+
comparison: (H = x.value[0]) == null ? void 0 : H.comparisonCells[I],
|
|
741
|
+
rowType: q.value[I].type
|
|
742
742
|
};
|
|
743
743
|
});
|
|
744
744
|
break;
|
|
745
745
|
}
|
|
746
|
-
return
|
|
746
|
+
return v.length > 0 && v[0].main === "" && (v[0].main = Ue(a, o, "Grand Total", "other")), v;
|
|
747
747
|
});
|
|
748
|
-
function
|
|
749
|
-
let
|
|
750
|
-
return !
|
|
751
|
-
main:
|
|
752
|
-
} : (
|
|
753
|
-
main:
|
|
754
|
-
comparison:
|
|
755
|
-
difference: Kt(
|
|
748
|
+
function V(v) {
|
|
749
|
+
let z = (v == null ? void 0 : v.main) || "";
|
|
750
|
+
return !v || v.main === "" || !v.comparison ? {
|
|
751
|
+
main: z
|
|
752
|
+
} : (z.includes("#") && !z.startsWith("#") && (z = z.split("#")[0]), {
|
|
753
|
+
main: z,
|
|
754
|
+
comparison: v == null ? void 0 : v.comparison,
|
|
755
|
+
difference: Kt(v.main, v.comparison, u)
|
|
756
756
|
});
|
|
757
757
|
}
|
|
758
758
|
Ie(() => {
|
|
759
|
-
|
|
759
|
+
y();
|
|
760
760
|
});
|
|
761
|
-
const E =
|
|
762
|
-
let
|
|
761
|
+
const E = g([]);
|
|
762
|
+
let N = 0, j;
|
|
763
763
|
function ue() {
|
|
764
764
|
var I;
|
|
765
765
|
if (!((I = l.value) != null && I.data)) {
|
|
766
766
|
E.value = [];
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
|
-
const
|
|
769
|
+
const v = ++N, z = (l.value.data.rows || []).map((H) => ({
|
|
770
770
|
isRollup: H.isRollup,
|
|
771
771
|
cells: Array.isArray(H.cells) ? [...H.cells] : [],
|
|
772
772
|
comparisonCells: Array.isArray(H.comparisonCells) ? [...H.comparisonCells] : []
|
|
@@ -775,78 +775,78 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
775
775
|
type: H.type,
|
|
776
776
|
label: H.label
|
|
777
777
|
})), O = {
|
|
778
|
-
rows:
|
|
778
|
+
rows: z,
|
|
779
779
|
columns: Y,
|
|
780
780
|
filter: r.value ?? "",
|
|
781
781
|
globalSorts: xl(m.value).map((H) => ({
|
|
782
782
|
key: H.key,
|
|
783
783
|
type: H.type
|
|
784
784
|
})),
|
|
785
|
-
grandTotalPosition:
|
|
785
|
+
grandTotalPosition: F.value,
|
|
786
786
|
pageSize: n.value
|
|
787
787
|
};
|
|
788
788
|
console.log(O), Fl(ea, O).then((H) => {
|
|
789
|
-
|
|
789
|
+
v === N && (H != null && H.error ? (_.open({ message: "Failed to process table data. Please retry.", type: "error" }), console.log(H.error), E.value = []) : E.value = Sl(H.data || []));
|
|
790
790
|
});
|
|
791
791
|
}
|
|
792
|
-
|
|
792
|
+
de(
|
|
793
793
|
() => m.value,
|
|
794
|
-
(
|
|
795
|
-
|
|
794
|
+
(v) => {
|
|
795
|
+
D.tileIndex === void 0 || D.tileIndex === null || T(D.tileIndex, v);
|
|
796
796
|
},
|
|
797
797
|
{ immediate: !0, deep: !0 }
|
|
798
798
|
);
|
|
799
|
-
const K =
|
|
799
|
+
const K = k(() => {
|
|
800
800
|
var Y, O;
|
|
801
|
-
const
|
|
801
|
+
const v = ((Y = l.value.data) == null ? void 0 : Y.rows) || [], z = ((O = l.value.data) == null ? void 0 : O.columns) || [];
|
|
802
802
|
return JSON.stringify({
|
|
803
|
-
rowsLength:
|
|
804
|
-
columns:
|
|
803
|
+
rowsLength: v.length,
|
|
804
|
+
columns: z.map((I) => ({ key: I.key, type: I.type, label: I.label })),
|
|
805
805
|
filter: r.value ?? "",
|
|
806
806
|
globalSorts: m.value.map((I) => ({ key: I.key, type: I.type })),
|
|
807
|
-
grandTotalPosition:
|
|
807
|
+
grandTotalPosition: F.value,
|
|
808
808
|
pageSize: n.value
|
|
809
809
|
});
|
|
810
810
|
});
|
|
811
|
-
|
|
811
|
+
de(
|
|
812
812
|
() => K.value,
|
|
813
813
|
() => {
|
|
814
814
|
clearTimeout(j), j = setTimeout(ue, 200);
|
|
815
815
|
},
|
|
816
816
|
{ immediate: !0 }
|
|
817
817
|
);
|
|
818
|
-
function oe(
|
|
819
|
-
const
|
|
820
|
-
if (!
|
|
821
|
-
m.value.push({ key:
|
|
818
|
+
function oe(v) {
|
|
819
|
+
const z = m.value.find((Y) => Y.key === v);
|
|
820
|
+
if (!z) {
|
|
821
|
+
m.value.push({ key: v, type: qe.Asc });
|
|
822
822
|
return;
|
|
823
823
|
}
|
|
824
|
-
|
|
824
|
+
z.type === qe.Asc ? z.type = qe.Desc : z.type === qe.Desc && (m.value = m.value.filter((Y) => Y.key !== v));
|
|
825
825
|
}
|
|
826
|
-
const ye =
|
|
826
|
+
const ye = k(
|
|
827
827
|
() => {
|
|
828
|
-
var
|
|
829
|
-
return (((
|
|
828
|
+
var v;
|
|
829
|
+
return (((v = l.value.colWidths) == null ? void 0 : v.length) ?? 0) > 0 || h.value.length > 0;
|
|
830
830
|
}
|
|
831
|
-
),
|
|
832
|
-
var
|
|
833
|
-
return (
|
|
834
|
-
const Y = Ue(a, o,
|
|
831
|
+
), me = k(() => {
|
|
832
|
+
var v;
|
|
833
|
+
return (v = l.value.data) != null && v.columns ? l.value.data.columns.map((z) => {
|
|
834
|
+
const Y = Ue(a, o, z.label, "other"), O = m.value.find((he) => he.key === z.key), I = !!O, H = I ? O.type === qe.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
|
|
835
835
|
return {
|
|
836
|
-
accessorKey:
|
|
836
|
+
accessorKey: z.key,
|
|
837
837
|
header: () => {
|
|
838
838
|
const he = B("FmIcon");
|
|
839
839
|
return rt(
|
|
840
840
|
"button",
|
|
841
841
|
{
|
|
842
842
|
type: "button",
|
|
843
|
-
class: `w-full flex items-center gap-1 group/select-header select-none ${
|
|
844
|
-
onClick: () => oe(
|
|
843
|
+
class: `w-full flex items-center gap-1 group/select-header select-none ${z.type === "NUMERIC" ? "justify-end" : "justify-start"} ${I ? "text-fm-color-typo-primary" : "text-fm-color-neutral-gray-400"}`,
|
|
844
|
+
onClick: () => oe(z.key)
|
|
845
845
|
},
|
|
846
846
|
[
|
|
847
847
|
rt(
|
|
848
848
|
"span",
|
|
849
|
-
{ class: `${
|
|
849
|
+
{ class: `${z.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap` },
|
|
850
850
|
Y
|
|
851
851
|
),
|
|
852
852
|
rt(he, {
|
|
@@ -860,55 +860,55 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
860
860
|
);
|
|
861
861
|
},
|
|
862
862
|
cell: (he) => {
|
|
863
|
-
var Oe,
|
|
864
|
-
const _e =
|
|
863
|
+
var Oe, We;
|
|
864
|
+
const _e = V(he.getValue()), Ae = (We = (Oe = he == null ? void 0 : he.row) == null ? void 0 : Oe.original) == null ? void 0 : We.isRollup;
|
|
865
865
|
return rt(
|
|
866
866
|
"div",
|
|
867
867
|
{
|
|
868
868
|
class: [
|
|
869
869
|
Ae ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400",
|
|
870
|
-
|
|
870
|
+
z.type === "NUMERIC" ? "text-right" : "",
|
|
871
871
|
ye.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
872
872
|
].join(" ")
|
|
873
873
|
},
|
|
874
|
-
[
|
|
874
|
+
[z.type === "NUMERIC" ? gt(_e.main) : _e.main]
|
|
875
875
|
);
|
|
876
876
|
},
|
|
877
877
|
enableSorting: !1
|
|
878
878
|
};
|
|
879
879
|
}) : [];
|
|
880
880
|
});
|
|
881
|
-
return
|
|
881
|
+
return de(
|
|
882
882
|
() => h.value.length > 0,
|
|
883
|
-
async (
|
|
884
|
-
|
|
883
|
+
async (v) => {
|
|
884
|
+
v && p.value && (await Se(), C());
|
|
885
885
|
}
|
|
886
|
-
),
|
|
887
|
-
[() =>
|
|
886
|
+
), de(
|
|
887
|
+
[() => me.value],
|
|
888
888
|
async () => {
|
|
889
889
|
var I;
|
|
890
890
|
await Se();
|
|
891
|
-
const
|
|
892
|
-
if (!
|
|
893
|
-
const
|
|
894
|
-
if (!
|
|
895
|
-
|
|
891
|
+
const v = (I = w.value) == null ? void 0 : I.$el;
|
|
892
|
+
if (!v) return;
|
|
893
|
+
const z = v.querySelector("table");
|
|
894
|
+
if (!z) return;
|
|
895
|
+
z.classList.add(ye.value ? "table-fixed" : "table-auto");
|
|
896
896
|
let Y, O;
|
|
897
|
-
|
|
898
|
-
|
|
897
|
+
p.value ? (C(), Y = h.value, O = c.value) : (O = l.value.rowHeight, Y = l.value.colWidths), typeof O == "number" && f(O, v), Y == null || Y.forEach((H, he) => {
|
|
898
|
+
b(he, H, v);
|
|
899
899
|
});
|
|
900
900
|
},
|
|
901
901
|
{ immediate: !0 }
|
|
902
|
-
), (
|
|
902
|
+
), (v, z) => {
|
|
903
903
|
const Y = B("FmTable");
|
|
904
|
-
return
|
|
904
|
+
return W(), ne(xe, null, [
|
|
905
905
|
X("div", ta, [
|
|
906
|
-
|
|
906
|
+
Me(v.$slots, "menu")
|
|
907
907
|
]),
|
|
908
|
-
|
|
908
|
+
U(Y, {
|
|
909
909
|
ref_key: "table",
|
|
910
|
-
ref:
|
|
911
|
-
"column-defs":
|
|
910
|
+
ref: w,
|
|
911
|
+
"column-defs": me.value,
|
|
912
912
|
"row-data": E.value,
|
|
913
913
|
"search-value": r.value,
|
|
914
914
|
"page-size": n.value,
|
|
@@ -921,12 +921,12 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
921
921
|
"pin-top": ie(() => [
|
|
922
922
|
X("tbody", null, [
|
|
923
923
|
X("tr", la, [
|
|
924
|
-
(
|
|
924
|
+
(W(!0), ne(xe, null, ut(d.value, (O, I) => (W(), ne("td", {
|
|
925
925
|
key: `${s(it)()}_${I}`,
|
|
926
926
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
927
927
|
}, [
|
|
928
928
|
X("span", {
|
|
929
|
-
class:
|
|
929
|
+
class: Qe([
|
|
930
930
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
931
931
|
O.rowType === "NUMERIC" ? "text-right" : "",
|
|
932
932
|
ye.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
@@ -946,7 +946,7 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
946
946
|
}
|
|
947
947
|
}), sa = /* @__PURE__ */ Te({
|
|
948
948
|
__name: "WidgetStackBarChart",
|
|
949
|
-
props: /* @__PURE__ */
|
|
949
|
+
props: /* @__PURE__ */ Ne({
|
|
950
950
|
tileIndex: {}
|
|
951
951
|
}, {
|
|
952
952
|
modelValue: { required: !0 },
|
|
@@ -954,60 +954,60 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
954
954
|
}),
|
|
955
955
|
emits: ["update:modelValue"],
|
|
956
956
|
setup(e) {
|
|
957
|
-
const a = e, o =
|
|
958
|
-
var
|
|
959
|
-
return ((
|
|
960
|
-
}),
|
|
961
|
-
var
|
|
962
|
-
return ((
|
|
963
|
-
}), { datalabels:
|
|
957
|
+
const a = e, o = Ee(e, "modelValue"), l = g(null), u = k(() => {
|
|
958
|
+
var q;
|
|
959
|
+
return ((q = o.value.data) == null ? void 0 : q.xAxis) || [];
|
|
960
|
+
}), y = k(() => {
|
|
961
|
+
var w;
|
|
962
|
+
return ((w = o.value.data) == null ? void 0 : w.datasets) ?? [];
|
|
963
|
+
}), { datalabels: T, xCfg: _, yCfg: D, isTransposed: m, legend: p, chartWidth: h, chartHeight: c } = nt(
|
|
964
964
|
o.value
|
|
965
|
-
),
|
|
966
|
-
...
|
|
967
|
-
let
|
|
965
|
+
), b = k(() => y.value.length > 0 ? [
|
|
966
|
+
...y.value.map((w, q) => {
|
|
967
|
+
let x = w.values;
|
|
968
968
|
return {
|
|
969
|
-
label:
|
|
970
|
-
data:
|
|
971
|
-
dash: !!
|
|
972
|
-
backgroundColor: $e({ index:
|
|
969
|
+
label: w.name,
|
|
970
|
+
data: x,
|
|
971
|
+
dash: !!w.isCompare,
|
|
972
|
+
backgroundColor: $e({ index: q, isCompare: w.isCompare })
|
|
973
973
|
};
|
|
974
974
|
})
|
|
975
|
-
] : []),
|
|
976
|
-
function
|
|
977
|
-
return
|
|
975
|
+
] : []), f = lt();
|
|
976
|
+
function C() {
|
|
977
|
+
return f.extractChartSize(l.value, a.tileIndex) || { width: 0, height: 0 };
|
|
978
978
|
}
|
|
979
979
|
return Ie(() => {
|
|
980
980
|
Se(() => {
|
|
981
|
-
|
|
981
|
+
C();
|
|
982
982
|
});
|
|
983
|
-
}),
|
|
984
|
-
Se(() =>
|
|
985
|
-
}), (
|
|
986
|
-
const
|
|
987
|
-
return
|
|
988
|
-
|
|
989
|
-
|
|
983
|
+
}), de([b], () => {
|
|
984
|
+
Se(() => C());
|
|
985
|
+
}), (w, q) => {
|
|
986
|
+
const x = B("FmBarChart");
|
|
987
|
+
return W(), ne(xe, null, [
|
|
988
|
+
Me(w.$slots, "menu"),
|
|
989
|
+
U(x, {
|
|
990
990
|
ref_key: "chartRef",
|
|
991
991
|
ref: l,
|
|
992
992
|
class: "bar-chart",
|
|
993
|
-
datasets:
|
|
994
|
-
"x-axis": { categories:
|
|
995
|
-
"x-cfg": s(
|
|
996
|
-
"y-cfg": s(
|
|
993
|
+
datasets: b.value,
|
|
994
|
+
"x-axis": { categories: u.value },
|
|
995
|
+
"x-cfg": s(_),
|
|
996
|
+
"y-cfg": s(D),
|
|
997
997
|
transpose: s(m),
|
|
998
998
|
stacked: !0,
|
|
999
999
|
legend: {
|
|
1000
|
-
display: s(
|
|
1001
|
-
position: s(
|
|
1002
|
-
maxHeight: s(
|
|
1003
|
-
maxWidth: s(
|
|
1004
|
-
labels: s(
|
|
1000
|
+
display: s(p).display ?? !1,
|
|
1001
|
+
position: s(p).position,
|
|
1002
|
+
maxHeight: s(p).maxHeight,
|
|
1003
|
+
maxWidth: s(p).maxWidth,
|
|
1004
|
+
labels: s(p).labels
|
|
1005
1005
|
},
|
|
1006
|
-
datalabels: s(
|
|
1006
|
+
datalabels: s(T),
|
|
1007
1007
|
"maintain-aspect-ratio": !1,
|
|
1008
|
-
style:
|
|
1008
|
+
style: Ve({
|
|
1009
1009
|
"--chart-width": s(h) !== void 0 ? s(h) + "px" : "100%",
|
|
1010
|
-
"--chart-height": s(
|
|
1010
|
+
"--chart-height": s(c) !== void 0 ? s(c) + "px" : "calc(100% - 36px)"
|
|
1011
1011
|
})
|
|
1012
1012
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1013
1013
|
], 64);
|
|
@@ -1015,7 +1015,7 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
1015
1015
|
}
|
|
1016
1016
|
}), ra = /* @__PURE__ */ Te({
|
|
1017
1017
|
__name: "WidgetStackLineChart",
|
|
1018
|
-
props: /* @__PURE__ */
|
|
1018
|
+
props: /* @__PURE__ */ Ne({
|
|
1019
1019
|
tileIndex: {}
|
|
1020
1020
|
}, {
|
|
1021
1021
|
modelValue: { required: !0 },
|
|
@@ -1023,72 +1023,72 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
1023
1023
|
}),
|
|
1024
1024
|
emits: ["update:modelValue"],
|
|
1025
1025
|
setup(e) {
|
|
1026
|
-
var
|
|
1027
|
-
const a = e, o =
|
|
1028
|
-
() => l.length === 1 &&
|
|
1029
|
-
),
|
|
1026
|
+
var x;
|
|
1027
|
+
const a = e, o = Ee(e, "modelValue"), l = ((x = o.value.data) == null ? void 0 : x.xAxis) ?? [], u = k(
|
|
1028
|
+
() => l.length === 1 && _.value.length > 0 && _.value.every((r) => r.values.length === 1)
|
|
1029
|
+
), y = k(() => u.value ? ["", l[0], ""] : l), T = g(null), _ = k(() => {
|
|
1030
1030
|
var r;
|
|
1031
1031
|
return ((r = o.value.data) == null ? void 0 : r.datasets) ?? [];
|
|
1032
|
-
}), { datalabels:
|
|
1032
|
+
}), { datalabels: D, xCfg: m, yCfg: p, isTransposed: h, legend: c, chartWidth: b, chartHeight: f } = nt(
|
|
1033
1033
|
o.value
|
|
1034
|
-
),
|
|
1035
|
-
...
|
|
1034
|
+
), C = k(() => _.value.length > 0 ? [
|
|
1035
|
+
..._.value.map((r, F) => {
|
|
1036
1036
|
let n = r.values;
|
|
1037
|
-
return
|
|
1037
|
+
return u.value && (n = [NaN, n[0], NaN]), {
|
|
1038
1038
|
label: r.name,
|
|
1039
1039
|
data: n,
|
|
1040
1040
|
dash: r.isCompare,
|
|
1041
1041
|
fill: !1,
|
|
1042
|
-
color: $e({ index:
|
|
1043
|
-
pointRadius:
|
|
1044
|
-
pointHoverRadius:
|
|
1045
|
-
pointBackgroundColor:
|
|
1046
|
-
pointBorderColor:
|
|
1047
|
-
pointBorderWidth:
|
|
1042
|
+
color: $e({ index: F, isCompare: r.isCompare }),
|
|
1043
|
+
pointRadius: u.value ? 4 : void 0,
|
|
1044
|
+
pointHoverRadius: u.value ? 6 : void 0,
|
|
1045
|
+
pointBackgroundColor: u.value ? $e({ index: F, isCompare: r.isCompare }) : void 0,
|
|
1046
|
+
pointBorderColor: u.value ? $e({ index: F, isCompare: r.isCompare }) : void 0,
|
|
1047
|
+
pointBorderWidth: u.value ? 2 : void 0
|
|
1048
1048
|
};
|
|
1049
1049
|
})
|
|
1050
|
-
] : []),
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1050
|
+
] : []), w = lt();
|
|
1051
|
+
function q() {
|
|
1052
|
+
return w.extractChartSize(T.value, a.tileIndex) || { width: 0, height: 0 };
|
|
1053
1053
|
}
|
|
1054
1054
|
return Ie(() => {
|
|
1055
1055
|
Se(() => {
|
|
1056
|
-
|
|
1056
|
+
q();
|
|
1057
1057
|
});
|
|
1058
|
-
}),
|
|
1059
|
-
Se(() =>
|
|
1060
|
-
}), (r,
|
|
1058
|
+
}), de([C], () => {
|
|
1059
|
+
Se(() => q());
|
|
1060
|
+
}), (r, F) => {
|
|
1061
1061
|
const n = B("FmLineChart");
|
|
1062
|
-
return
|
|
1063
|
-
|
|
1064
|
-
|
|
1062
|
+
return W(), ne(xe, null, [
|
|
1063
|
+
Me(r.$slots, "menu"),
|
|
1064
|
+
U(n, {
|
|
1065
1065
|
ref_key: "chartRef",
|
|
1066
|
-
ref:
|
|
1066
|
+
ref: T,
|
|
1067
1067
|
class: "line-chart",
|
|
1068
|
-
datasets:
|
|
1069
|
-
"x-axis": { categories:
|
|
1068
|
+
datasets: C.value,
|
|
1069
|
+
"x-axis": { categories: y.value },
|
|
1070
1070
|
"x-cfg": s(m),
|
|
1071
|
-
"y-cfg": s(
|
|
1071
|
+
"y-cfg": s(p),
|
|
1072
1072
|
transpose: s(h),
|
|
1073
1073
|
legend: {
|
|
1074
|
-
display: s(
|
|
1075
|
-
position: s(
|
|
1076
|
-
maxHeight: s(
|
|
1077
|
-
maxWidth: s(
|
|
1078
|
-
labels: s(
|
|
1074
|
+
display: s(c).display ?? !1,
|
|
1075
|
+
position: s(c).position,
|
|
1076
|
+
maxHeight: s(c).maxHeight,
|
|
1077
|
+
maxWidth: s(c).maxWidth,
|
|
1078
|
+
labels: s(c).labels
|
|
1079
1079
|
},
|
|
1080
1080
|
stacked: !0,
|
|
1081
|
-
datalabels: s(
|
|
1081
|
+
datalabels: s(D),
|
|
1082
1082
|
"maintain-aspect-ratio": !1,
|
|
1083
|
-
style:
|
|
1084
|
-
"--chart-width": s(
|
|
1085
|
-
"--chart-height": s(
|
|
1083
|
+
style: Ve({
|
|
1084
|
+
"--chart-width": s(b) !== void 0 ? s(b) + "px" : "100%",
|
|
1085
|
+
"--chart-height": s(f) !== void 0 ? s(f) + "px" : "calc(100% - 36px)"
|
|
1086
1086
|
})
|
|
1087
1087
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1088
1088
|
], 64);
|
|
1089
1089
|
};
|
|
1090
1090
|
}
|
|
1091
|
-
}),
|
|
1091
|
+
}), Ze = [
|
|
1092
1092
|
"col-span-1",
|
|
1093
1093
|
"col-span-2",
|
|
1094
1094
|
"col-span-3",
|
|
@@ -1103,17 +1103,17 @@ const ea = "/assets/processTableData.worker-C9Y9NVCl.js", ta = { class: "my-4" }
|
|
|
1103
1103
|
"col-span-12"
|
|
1104
1104
|
];
|
|
1105
1105
|
function ia(e) {
|
|
1106
|
-
return e < 12 ?
|
|
1106
|
+
return e < 12 ? Ze[e - 1] : Ze[11];
|
|
1107
1107
|
}
|
|
1108
1108
|
function ua(e) {
|
|
1109
|
-
return e < 12 ?
|
|
1109
|
+
return e < 12 ? Ze[Math.min(11, e * 2 - 1)] : Ze[11];
|
|
1110
1110
|
}
|
|
1111
1111
|
function ca(e) {
|
|
1112
|
-
return e < 12 ?
|
|
1112
|
+
return e < 12 ? Ze[Math.min(11, e * 3 - 1)] : Ze[11];
|
|
1113
1113
|
}
|
|
1114
1114
|
const da = /* @__PURE__ */ Te({
|
|
1115
1115
|
__name: "WidgetLinechart",
|
|
1116
|
-
props: /* @__PURE__ */
|
|
1116
|
+
props: /* @__PURE__ */ Ne({
|
|
1117
1117
|
tileIndex: {}
|
|
1118
1118
|
}, {
|
|
1119
1119
|
modelValue: { required: !0 },
|
|
@@ -1121,65 +1121,65 @@ const da = /* @__PURE__ */ Te({
|
|
|
1121
1121
|
}),
|
|
1122
1122
|
emits: ["update:modelValue"],
|
|
1123
1123
|
setup(e) {
|
|
1124
|
-
var
|
|
1125
|
-
const a = e, o =
|
|
1126
|
-
() => l.length === 1 &&
|
|
1127
|
-
),
|
|
1124
|
+
var x;
|
|
1125
|
+
const a = e, o = Ee(e, "modelValue"), l = ((x = o.value.data) == null ? void 0 : x.xAxis) ?? [], u = k(
|
|
1126
|
+
() => l.length === 1 && _.value.length > 0 && _.value.every((r) => r.values.length === 1)
|
|
1127
|
+
), y = k(() => u.value ? ["", l[0], ""] : l), T = g(null), _ = k(() => {
|
|
1128
1128
|
var r;
|
|
1129
1129
|
return ((r = o.value.data) == null ? void 0 : r.datasets) ?? [];
|
|
1130
|
-
}), { datalabels:
|
|
1130
|
+
}), { datalabels: D, xCfg: m, yCfg: p, isTransposed: h, legend: c, chartWidth: b, chartHeight: f } = nt(
|
|
1131
1131
|
o.value
|
|
1132
|
-
),
|
|
1133
|
-
...
|
|
1132
|
+
), C = k(() => _.value.length > 0 ? [
|
|
1133
|
+
..._.value.map((r, F) => {
|
|
1134
1134
|
let n = r.values;
|
|
1135
|
-
return
|
|
1135
|
+
return u.value && (n = [NaN, n[0], NaN]), {
|
|
1136
1136
|
label: r.name,
|
|
1137
1137
|
data: n,
|
|
1138
1138
|
dash: !!r.isCompare,
|
|
1139
1139
|
fill: !1,
|
|
1140
|
-
color: $e({ index:
|
|
1141
|
-
pointRadius:
|
|
1142
|
-
pointHoverRadius:
|
|
1143
|
-
pointBackgroundColor:
|
|
1144
|
-
pointBorderColor:
|
|
1145
|
-
pointBorderWidth:
|
|
1140
|
+
color: $e({ index: F, isCompare: r.isCompare }),
|
|
1141
|
+
pointRadius: u.value ? 4 : void 0,
|
|
1142
|
+
pointHoverRadius: u.value ? 6 : void 0,
|
|
1143
|
+
pointBackgroundColor: u.value ? $e({ index: F, isCompare: r.isCompare }) : void 0,
|
|
1144
|
+
pointBorderColor: u.value ? $e({ index: F, isCompare: r.isCompare }) : void 0,
|
|
1145
|
+
pointBorderWidth: u.value ? 2 : void 0
|
|
1146
1146
|
};
|
|
1147
1147
|
})
|
|
1148
|
-
] : []),
|
|
1149
|
-
function
|
|
1150
|
-
return
|
|
1148
|
+
] : []), w = lt();
|
|
1149
|
+
function q() {
|
|
1150
|
+
return w.extractChartSize(T.value, a.tileIndex) || { width: 0, height: 0 };
|
|
1151
1151
|
}
|
|
1152
1152
|
return Ie(() => {
|
|
1153
1153
|
Se(() => {
|
|
1154
|
-
|
|
1154
|
+
q();
|
|
1155
1155
|
});
|
|
1156
|
-
}),
|
|
1157
|
-
Se(() =>
|
|
1158
|
-
}), (r,
|
|
1156
|
+
}), de([C], () => {
|
|
1157
|
+
Se(() => q());
|
|
1158
|
+
}), (r, F) => {
|
|
1159
1159
|
const n = B("FmLineChart");
|
|
1160
|
-
return
|
|
1161
|
-
|
|
1162
|
-
|
|
1160
|
+
return W(), ne(xe, null, [
|
|
1161
|
+
Me(r.$slots, "menu"),
|
|
1162
|
+
U(n, {
|
|
1163
1163
|
ref_key: "chartRef",
|
|
1164
|
-
ref:
|
|
1164
|
+
ref: T,
|
|
1165
1165
|
class: "line-chart",
|
|
1166
|
-
datasets:
|
|
1167
|
-
"x-axis": { categories:
|
|
1166
|
+
datasets: C.value,
|
|
1167
|
+
"x-axis": { categories: y.value },
|
|
1168
1168
|
"x-cfg": s(m),
|
|
1169
|
-
"y-cfg": s(
|
|
1169
|
+
"y-cfg": s(p),
|
|
1170
1170
|
transpose: s(h),
|
|
1171
1171
|
legend: {
|
|
1172
|
-
display: s(
|
|
1173
|
-
position: s(
|
|
1174
|
-
maxHeight: s(
|
|
1175
|
-
maxWidth: s(
|
|
1176
|
-
labels: s(
|
|
1172
|
+
display: s(c).display ?? !1,
|
|
1173
|
+
position: s(c).position,
|
|
1174
|
+
maxHeight: s(c).maxHeight,
|
|
1175
|
+
maxWidth: s(c).maxWidth,
|
|
1176
|
+
labels: s(c).labels
|
|
1177
1177
|
},
|
|
1178
|
-
datalabels: s(
|
|
1178
|
+
datalabels: s(D),
|
|
1179
1179
|
"maintain-aspect-ratio": !1,
|
|
1180
|
-
style:
|
|
1181
|
-
"--chart-width": s(
|
|
1182
|
-
"--chart-height": s(
|
|
1180
|
+
style: Ve({
|
|
1181
|
+
"--chart-width": s(b) !== void 0 ? s(b) + "px" : "100%",
|
|
1182
|
+
"--chart-height": s(f) !== void 0 ? s(f) + "px" : "calc(100% - 36px)"
|
|
1183
1183
|
})
|
|
1184
1184
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1185
1185
|
], 64);
|
|
@@ -1187,7 +1187,7 @@ const da = /* @__PURE__ */ Te({
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}), ma = { class: "flex flex-col gap-16" }, pa = { class: "flex flex-row" }, ha = /* @__PURE__ */ Te({
|
|
1189
1189
|
__name: "PdfOrientationDialog",
|
|
1190
|
-
props: /* @__PURE__ */
|
|
1190
|
+
props: /* @__PURE__ */ Ne({
|
|
1191
1191
|
reportType: {},
|
|
1192
1192
|
index: {}
|
|
1193
1193
|
}, {
|
|
@@ -1196,58 +1196,58 @@ const da = /* @__PURE__ */ Te({
|
|
|
1196
1196
|
}),
|
|
1197
1197
|
emits: ["update:modelValue"],
|
|
1198
1198
|
setup(e) {
|
|
1199
|
-
const { t: a } = at(), { FmForm: o } =
|
|
1200
|
-
function
|
|
1201
|
-
var
|
|
1202
|
-
(
|
|
1199
|
+
const { t: a } = at(), { FmForm: o } = Nl, l = e, u = g(), y = Ee(e, "modelValue"), T = g(!0), _ = g(!1), D = Lt(), { selectedLocationIds: m, dateRange: p, timeRange: h } = ze(tt()), c = g(ft.PORTRAIT);
|
|
1200
|
+
function b() {
|
|
1201
|
+
var C;
|
|
1202
|
+
(C = u.value) == null || C.validateInputs();
|
|
1203
1203
|
}
|
|
1204
|
-
async function
|
|
1205
|
-
|
|
1204
|
+
async function f() {
|
|
1205
|
+
_.value = !0;
|
|
1206
1206
|
try {
|
|
1207
1207
|
l.index != null && await Yt({
|
|
1208
1208
|
reportType: l.reportType,
|
|
1209
1209
|
index: l.index,
|
|
1210
|
-
orientationTypes: [
|
|
1211
|
-
isCombinedLocationLayout:
|
|
1210
|
+
orientationTypes: [c.value],
|
|
1211
|
+
isCombinedLocationLayout: T.value,
|
|
1212
1212
|
timeRange: h.value,
|
|
1213
|
-
dateRange:
|
|
1213
|
+
dateRange: p.value,
|
|
1214
1214
|
locationIds: m.value
|
|
1215
1215
|
});
|
|
1216
|
-
} catch (
|
|
1217
|
-
|
|
1216
|
+
} catch (C) {
|
|
1217
|
+
D.open({ message: C.message, type: "error" });
|
|
1218
1218
|
} finally {
|
|
1219
|
-
|
|
1219
|
+
_.value = !1;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
return (
|
|
1223
|
-
const
|
|
1224
|
-
return
|
|
1225
|
-
modelValue:
|
|
1226
|
-
"onUpdate:modelValue":
|
|
1222
|
+
return (C, w) => {
|
|
1223
|
+
const q = B("FmRadio"), x = B("FmRadioGroup"), r = B("FmButton"), F = B("FmDialog");
|
|
1224
|
+
return W(), pe(F, {
|
|
1225
|
+
modelValue: y.value,
|
|
1226
|
+
"onUpdate:modelValue": w[2] || (w[2] = (n) => y.value = n),
|
|
1227
1227
|
overlay: !0,
|
|
1228
1228
|
"z-index": 10
|
|
1229
1229
|
}, {
|
|
1230
|
-
"dialog-header": ie(() =>
|
|
1230
|
+
"dialog-header": ie(() => w[3] || (w[3] = [
|
|
1231
1231
|
yt("Select Orientation")
|
|
1232
1232
|
])),
|
|
1233
1233
|
default: ie(() => [
|
|
1234
|
-
|
|
1234
|
+
U(s(o), {
|
|
1235
1235
|
ref_key: "form",
|
|
1236
|
-
ref:
|
|
1237
|
-
onValidationSuccess:
|
|
1236
|
+
ref: u,
|
|
1237
|
+
onValidationSuccess: f
|
|
1238
1238
|
}, {
|
|
1239
1239
|
default: ie(() => [
|
|
1240
1240
|
X("div", ma, [
|
|
1241
|
-
|
|
1242
|
-
modelValue:
|
|
1243
|
-
"onUpdate:modelValue":
|
|
1241
|
+
U(x, {
|
|
1242
|
+
modelValue: c.value,
|
|
1243
|
+
"onUpdate:modelValue": w[0] || (w[0] = (n) => c.value = n)
|
|
1244
1244
|
}, {
|
|
1245
1245
|
default: ie(() => [
|
|
1246
|
-
q
|
|
1246
|
+
U(q, {
|
|
1247
1247
|
value: s(ft).PORTRAIT,
|
|
1248
1248
|
label: s(a)("report.common.portrait")
|
|
1249
1249
|
}, null, 8, ["value", "label"]),
|
|
1250
|
-
q
|
|
1250
|
+
U(q, {
|
|
1251
1251
|
value: s(ft).LANDSCAPE,
|
|
1252
1252
|
label: s(a)("report.common.landscape")
|
|
1253
1253
|
}, null, 8, ["value", "label"])
|
|
@@ -1256,17 +1256,17 @@ const da = /* @__PURE__ */ Te({
|
|
|
1256
1256
|
}, 8, ["modelValue"])
|
|
1257
1257
|
]),
|
|
1258
1258
|
X("div", pa, [
|
|
1259
|
-
|
|
1260
|
-
|
|
1259
|
+
w[4] || (w[4] = X("div", { class: "grow" }, null, -1)),
|
|
1260
|
+
U(r, {
|
|
1261
1261
|
label: s(a)("report.common.cancel"),
|
|
1262
1262
|
variant: "tertiary",
|
|
1263
|
-
onClick:
|
|
1263
|
+
onClick: w[1] || (w[1] = (n) => y.value = !1)
|
|
1264
1264
|
}, null, 8, ["label"]),
|
|
1265
1265
|
X("div", null, [
|
|
1266
|
-
|
|
1266
|
+
U(r, {
|
|
1267
1267
|
label: s(a)("report.common.download"),
|
|
1268
|
-
loading:
|
|
1269
|
-
onClick:
|
|
1268
|
+
loading: _.value,
|
|
1269
|
+
onClick: b
|
|
1270
1270
|
}, null, 8, ["label", "loading"])
|
|
1271
1271
|
])
|
|
1272
1272
|
])
|
|
@@ -1280,32 +1280,32 @@ const da = /* @__PURE__ */ Te({
|
|
|
1280
1280
|
}
|
|
1281
1281
|
});
|
|
1282
1282
|
function fa(e) {
|
|
1283
|
-
const { containerRef: a, stickyOffset: o =
|
|
1284
|
-
let
|
|
1285
|
-
function
|
|
1283
|
+
const { containerRef: a, stickyOffset: o = g(0), enabled: l = g(!0) } = e;
|
|
1284
|
+
let u = null, y = null, T = null, _ = null, D = null, m = null;
|
|
1285
|
+
function p() {
|
|
1286
1286
|
return a.value ? a.value.querySelector("table") : null;
|
|
1287
1287
|
}
|
|
1288
1288
|
function h() {
|
|
1289
1289
|
var d;
|
|
1290
1290
|
let n = (d = a.value) == null ? void 0 : d.parentElement;
|
|
1291
1291
|
for (; n; ) {
|
|
1292
|
-
const
|
|
1293
|
-
if (
|
|
1292
|
+
const V = window.getComputedStyle(n);
|
|
1293
|
+
if (V.overflowY === "auto" || V.overflowY === "scroll")
|
|
1294
1294
|
return n;
|
|
1295
1295
|
n = n.parentElement;
|
|
1296
1296
|
}
|
|
1297
1297
|
return null;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1300
|
-
var
|
|
1299
|
+
function c() {
|
|
1300
|
+
var V;
|
|
1301
1301
|
const n = [];
|
|
1302
1302
|
a.value && a.value.querySelectorAll("div,section,main,article,aside").forEach((E) => {
|
|
1303
1303
|
if (E.scrollWidth > E.clientWidth) {
|
|
1304
|
-
const
|
|
1305
|
-
(
|
|
1304
|
+
const N = window.getComputedStyle(E);
|
|
1305
|
+
(N.overflowX === "auto" || N.overflowX === "scroll") && n.push(E);
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
|
-
let d = (
|
|
1308
|
+
let d = (V = a.value) == null ? void 0 : V.parentElement;
|
|
1309
1309
|
for (; d; ) {
|
|
1310
1310
|
if (d.scrollWidth > d.clientWidth) {
|
|
1311
1311
|
const E = window.getComputedStyle(d);
|
|
@@ -1315,9 +1315,9 @@ function fa(e) {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
return n;
|
|
1317
1317
|
}
|
|
1318
|
-
function
|
|
1319
|
-
if (r(), !l.value || !a.value || (
|
|
1320
|
-
|
|
1318
|
+
function b() {
|
|
1319
|
+
if (r(), !l.value || !a.value || (y = p(), !y) || (T = y.querySelector("thead"), !T)) return;
|
|
1320
|
+
u = document.createElement("div"), u.className = "sticky-header-clone", u.style.cssText = `
|
|
1321
1321
|
position: fixed;
|
|
1322
1322
|
top: ${o.value}px;
|
|
1323
1323
|
left: 0;
|
|
@@ -1328,22 +1328,22 @@ function fa(e) {
|
|
|
1328
1328
|
visibility: hidden;
|
|
1329
1329
|
`;
|
|
1330
1330
|
const n = document.createElement("table");
|
|
1331
|
-
n.className =
|
|
1331
|
+
n.className = y.className, n.style.cssText = `
|
|
1332
1332
|
table-layout: fixed;
|
|
1333
|
-
width: ${
|
|
1333
|
+
width: ${y.offsetWidth}px;
|
|
1334
1334
|
margin: 0;
|
|
1335
1335
|
border-collapse: collapse;
|
|
1336
1336
|
pointer-events: auto;
|
|
1337
1337
|
`;
|
|
1338
|
-
const d =
|
|
1339
|
-
d.style.cssText = "pointer-events: auto;",
|
|
1338
|
+
const d = T.cloneNode(!0);
|
|
1339
|
+
d.style.cssText = "pointer-events: auto;", f(T, d), n.appendChild(d), u.appendChild(n), document.body.appendChild(u), w(), q(), x(), C();
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1342
|
-
const
|
|
1343
|
-
|
|
1341
|
+
function f(n, d) {
|
|
1342
|
+
const V = n.querySelectorAll("th, td"), E = d.querySelectorAll("th, td");
|
|
1343
|
+
V.forEach((N, j) => {
|
|
1344
1344
|
const ue = E[j];
|
|
1345
1345
|
if (!ue) return;
|
|
1346
|
-
const K =
|
|
1346
|
+
const K = N, oe = window.getComputedStyle(K);
|
|
1347
1347
|
Object.assign(ue.style, {
|
|
1348
1348
|
width: `${K.offsetWidth}px`,
|
|
1349
1349
|
minWidth: `${K.offsetWidth}px`,
|
|
@@ -1361,59 +1361,59 @@ function fa(e) {
|
|
|
1361
1361
|
pointerEvents: "auto"
|
|
1362
1362
|
}), ue.onclick = (ye) => {
|
|
1363
1363
|
ye.preventDefault(), ye.stopPropagation();
|
|
1364
|
-
const
|
|
1364
|
+
const me = K.querySelector(
|
|
1365
1365
|
"button, a, [role='button']"
|
|
1366
1366
|
);
|
|
1367
|
-
|
|
1367
|
+
me ? me.click() : K.click();
|
|
1368
1368
|
};
|
|
1369
1369
|
});
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1372
|
-
if (!
|
|
1373
|
-
const n = a.value.getBoundingClientRect(), d =
|
|
1374
|
-
if (!(d.top < j && d.bottom > j +
|
|
1375
|
-
|
|
1371
|
+
function C() {
|
|
1372
|
+
if (!u || !y || !T || !a.value) return;
|
|
1373
|
+
const n = a.value.getBoundingClientRect(), d = y.getBoundingClientRect(), V = T.getBoundingClientRect(), E = h(), N = E == null ? void 0 : E.getBoundingClientRect(), j = o.value > 0 ? o.value : (N == null ? void 0 : N.top) ?? 0;
|
|
1374
|
+
if (!(d.top < j && d.bottom > j + V.height)) {
|
|
1375
|
+
u.style.visibility = "hidden";
|
|
1376
1376
|
return;
|
|
1377
1377
|
}
|
|
1378
|
-
|
|
1379
|
-
const K =
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1378
|
+
u.style.visibility = "visible", u.style.top = `${j}px`;
|
|
1379
|
+
const K = N ?? n, oe = Math.max(n.left, K.left), me = Math.min(n.right, K.right) - oe;
|
|
1380
|
+
u.style.left = `${oe}px`, u.style.width = `${me}px`;
|
|
1381
|
+
const v = u.querySelector("table");
|
|
1382
|
+
v && (v.style.width = `${y.offsetWidth}px`, v.style.marginLeft = `${V.left - oe}px`);
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
var
|
|
1386
|
-
|
|
1384
|
+
function w() {
|
|
1385
|
+
var V;
|
|
1386
|
+
D = () => requestAnimationFrame(C), window.addEventListener("scroll", D, { passive: !0 });
|
|
1387
1387
|
const n = h();
|
|
1388
|
-
n && n.addEventListener("scroll",
|
|
1389
|
-
|
|
1388
|
+
n && n.addEventListener("scroll", D, { passive: !0 }), c().forEach((E) => {
|
|
1389
|
+
D && E.addEventListener("scroll", D, { passive: !0 });
|
|
1390
1390
|
});
|
|
1391
|
-
let d = (
|
|
1391
|
+
let d = (V = a.value) == null ? void 0 : V.parentElement;
|
|
1392
1392
|
for (; d; )
|
|
1393
|
-
d !== n && (d.scrollHeight > d.clientHeight || d.scrollWidth > d.clientWidth) && d.addEventListener("scroll",
|
|
1393
|
+
d !== n && (d.scrollHeight > d.clientHeight || d.scrollWidth > d.clientWidth) && d.addEventListener("scroll", D, { passive: !0 }), d = d.parentElement;
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1396
|
-
|
|
1397
|
-
if (
|
|
1398
|
-
const n =
|
|
1399
|
-
n &&
|
|
1400
|
-
const d =
|
|
1401
|
-
d &&
|
|
1395
|
+
function q() {
|
|
1396
|
+
_ = new ResizeObserver(() => {
|
|
1397
|
+
if (T && u) {
|
|
1398
|
+
const n = u.querySelector("thead");
|
|
1399
|
+
n && f(T, n);
|
|
1400
|
+
const d = u.querySelector("table");
|
|
1401
|
+
d && y && (d.style.width = `${y.offsetWidth}px`);
|
|
1402
1402
|
}
|
|
1403
|
-
|
|
1404
|
-
}), a.value &&
|
|
1403
|
+
C();
|
|
1404
|
+
}), a.value && _.observe(a.value), y && _.observe(y);
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1407
|
-
if (!
|
|
1408
|
-
const n = bt(() =>
|
|
1409
|
-
if (
|
|
1410
|
-
const
|
|
1411
|
-
|
|
1406
|
+
function x() {
|
|
1407
|
+
if (!T) return;
|
|
1408
|
+
const n = bt(() => b(), 100), d = () => {
|
|
1409
|
+
if (T && u) {
|
|
1410
|
+
const V = u.querySelector("thead");
|
|
1411
|
+
V && f(T, V), C();
|
|
1412
1412
|
}
|
|
1413
1413
|
};
|
|
1414
|
-
m = new MutationObserver((
|
|
1415
|
-
|
|
1416
|
-
}), m.observe(
|
|
1414
|
+
m = new MutationObserver((V) => {
|
|
1415
|
+
V.some((N) => N.type === "childList" ? N.addedNodes.length > 0 || N.removedNodes.length > 0 : !1) ? n() : d();
|
|
1416
|
+
}), m.observe(T, {
|
|
1417
1417
|
childList: !0,
|
|
1418
1418
|
subtree: !0,
|
|
1419
1419
|
attributes: !0,
|
|
@@ -1422,33 +1422,33 @@ function fa(e) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
function r() {
|
|
1424
1424
|
var n;
|
|
1425
|
-
if (
|
|
1426
|
-
window.removeEventListener("scroll",
|
|
1425
|
+
if (u && (u.remove(), u = null), D) {
|
|
1426
|
+
window.removeEventListener("scroll", D);
|
|
1427
1427
|
const d = h();
|
|
1428
|
-
d && d.removeEventListener("scroll",
|
|
1429
|
-
|
|
1428
|
+
d && d.removeEventListener("scroll", D), c().forEach((E) => {
|
|
1429
|
+
D && E.removeEventListener("scroll", D);
|
|
1430
1430
|
});
|
|
1431
|
-
let
|
|
1432
|
-
for (;
|
|
1433
|
-
|
|
1434
|
-
|
|
1431
|
+
let V = (n = a.value) == null ? void 0 : n.parentElement;
|
|
1432
|
+
for (; V; )
|
|
1433
|
+
V.removeEventListener("scroll", D), V = V.parentElement;
|
|
1434
|
+
D = null;
|
|
1435
1435
|
}
|
|
1436
|
-
|
|
1436
|
+
_ && (_.disconnect(), _ = null), m && (m.disconnect(), m = null), y = null, T = null;
|
|
1437
1437
|
}
|
|
1438
|
-
function
|
|
1439
|
-
|
|
1438
|
+
function F() {
|
|
1439
|
+
b();
|
|
1440
1440
|
}
|
|
1441
|
-
return
|
|
1442
|
-
n ?
|
|
1443
|
-
}),
|
|
1444
|
-
|
|
1445
|
-
}),
|
|
1446
|
-
a.value && l.value && setTimeout(
|
|
1441
|
+
return de(l, (n) => {
|
|
1442
|
+
n ? b() : r();
|
|
1443
|
+
}), de(o, () => {
|
|
1444
|
+
u && (u.style.top = `${o.value}px`, C());
|
|
1445
|
+
}), de(a, () => {
|
|
1446
|
+
a.value && l.value && setTimeout(b, 100);
|
|
1447
1447
|
}), Ie(() => {
|
|
1448
|
-
l.value && setTimeout(
|
|
1448
|
+
l.value && setTimeout(b, 100);
|
|
1449
1449
|
}), Ut(() => {
|
|
1450
1450
|
r();
|
|
1451
|
-
}), { refresh:
|
|
1451
|
+
}), { refresh: F, cleanup: r };
|
|
1452
1452
|
}
|
|
1453
1453
|
const va = {
|
|
1454
1454
|
key: 1,
|
|
@@ -1458,7 +1458,7 @@ const va = {
|
|
|
1458
1458
|
class: "flex"
|
|
1459
1459
|
}, qa = /* @__PURE__ */ Te({
|
|
1460
1460
|
__name: "DynamicWidget",
|
|
1461
|
-
props: /* @__PURE__ */
|
|
1461
|
+
props: /* @__PURE__ */ Ne({
|
|
1462
1462
|
index: {
|
|
1463
1463
|
type: Number,
|
|
1464
1464
|
default: 0
|
|
@@ -1483,38 +1483,38 @@ const va = {
|
|
|
1483
1483
|
}),
|
|
1484
1484
|
emits: ["update:modelValue"],
|
|
1485
1485
|
setup(e) {
|
|
1486
|
-
const a =
|
|
1486
|
+
const a = g(!0), o = Ee(e, "modelValue"), l = o.value.widget.config, { t: u, te: y, locale: T } = at(), _ = e, D = g(null), m = k(() => _.stickyHeaderOffset), p = k(() => o.value.widget.type === A.Table), h = k(() => {
|
|
1487
1487
|
var i;
|
|
1488
|
-
return (i =
|
|
1489
|
-
}), { refresh:
|
|
1488
|
+
return (i = D.value) == null ? void 0 : i.$el;
|
|
1489
|
+
}), { refresh: c } = fa({
|
|
1490
1490
|
containerRef: h,
|
|
1491
1491
|
stickyOffset: m,
|
|
1492
|
-
enabled:
|
|
1493
|
-
}),
|
|
1492
|
+
enabled: p
|
|
1493
|
+
}), b = g(l.rollup), f = g(it()), C = g(l.drillDimension), w = k(() => {
|
|
1494
1494
|
if (Pe.value.length > 0) {
|
|
1495
1495
|
const i = Pe.value.findIndex(
|
|
1496
|
-
(
|
|
1496
|
+
(le) => le.value === C.value
|
|
1497
1497
|
);
|
|
1498
1498
|
return i >= 0 ? i : 0;
|
|
1499
1499
|
} else
|
|
1500
1500
|
return -1;
|
|
1501
|
-
}),
|
|
1502
|
-
() =>
|
|
1503
|
-
), r =
|
|
1504
|
-
() =>
|
|
1505
|
-
), He =
|
|
1506
|
-
() => (
|
|
1507
|
-
), ct =
|
|
1508
|
-
() => (
|
|
1509
|
-
), se =
|
|
1501
|
+
}), q = k(() => w.value !== 0), x = k(
|
|
1502
|
+
() => w.value != Pe.value.length - 1
|
|
1503
|
+
), r = g(l.showTitle ?? !0), F = g(l.titleFontSize ?? 14), n = g(l.titleBold ?? !1), d = g(l.titleItalic ?? !1), V = g(l.titleUnderline ?? !1), E = g(l.chartWidth ?? void 0), N = g(l.chartHeight ?? void 0), j = g(l.showLabel ?? !1), ue = g(l.labelAlign ?? Ct.center), K = g(l.labelAnchor ?? St.center), oe = g(l.labelRotation ?? 0), ye = g(l.labelOffset ?? 0), me = g(l.labelFontSize ?? 12), v = k(() => l.showSearchBar), z = g(l.showX ?? !0), Y = g(l.xPosition ?? kt.bottom), O = g(l.showXGrid ?? !1), I = g(l.showXTick ?? !0), H = g(l.xTickFontSize ?? 12), he = g(l.showXTitle ?? !1), _e = g(l.xTitle ?? ""), Ae = g(l.xTitleFontSize ?? 12), Oe = g(l.showY ?? !0), We = g(l.yPosition ?? Tt.left), t = g(l.showYGrid ?? !1), L = g(l.showYTick ?? !0), $ = g(l.yTickFontSize ?? 12), R = g(l.showYTitle ?? !1), G = g(l.yTitle ?? ""), re = g(l.yTitleFontSize ?? 12), be = g(l.showLegend ?? void 0), ve = g(l.legendPosition ?? _t.top), ae = g(l.usePointStyle ?? !0), M = g(l.legendMaxHeight), P = g(l.legendMaxWidth), S = g(l.rowHeight ?? 0), J = g(l.colWidths ?? []), Q = g(!1), ce = g(""), { breakpoints: te, getBreakpointsBoundary: Z } = jt(), we = g(), ee = k(
|
|
1504
|
+
() => _.customScreenWidth === void 0 ? window.innerWidth : _.customScreenWidth
|
|
1505
|
+
), He = k(
|
|
1506
|
+
() => (ee == null ? void 0 : ee.value) > Z("xs")[1] && (ee == null ? void 0 : ee.value) <= Z("sm")[1]
|
|
1507
|
+
), ct = k(
|
|
1508
|
+
() => (ee == null ? void 0 : ee.value) > Z("sm")[1] && (ee == null ? void 0 : ee.value) <= Z("md")[1]
|
|
1509
|
+
), se = k(() => (ee == null ? void 0 : ee.value) > Z("md")[1]), Qt = k(() => {
|
|
1510
1510
|
const i = o.value.size.width;
|
|
1511
1511
|
return se.value || ct.value ? ia(i) : He.value ? ua(i) : ca(i);
|
|
1512
|
-
}), ot =
|
|
1513
|
-
() =>
|
|
1512
|
+
}), ot = k(
|
|
1513
|
+
() => Ml.find((i) => i.type === o.value.widget.type)
|
|
1514
1514
|
), Ge = bt(() => {
|
|
1515
1515
|
var i;
|
|
1516
|
-
we.value = il((i =
|
|
1517
|
-
}),
|
|
1516
|
+
we.value = il((i = D.value) == null ? void 0 : i.$el.offsetWidth), f.value = it();
|
|
1517
|
+
}), Zt = k(() => {
|
|
1518
1518
|
if (Ol(fe.value.type, Xe.value))
|
|
1519
1519
|
switch (o.value.widget.type) {
|
|
1520
1520
|
case A.BarChart:
|
|
@@ -1530,7 +1530,7 @@ const va = {
|
|
|
1530
1530
|
case A.Scorecard:
|
|
1531
1531
|
return jl;
|
|
1532
1532
|
case A.Spacer:
|
|
1533
|
-
return
|
|
1533
|
+
return Ql;
|
|
1534
1534
|
case A.Table:
|
|
1535
1535
|
return oa;
|
|
1536
1536
|
default:
|
|
@@ -1538,23 +1538,23 @@ const va = {
|
|
|
1538
1538
|
}
|
|
1539
1539
|
else
|
|
1540
1540
|
return wt;
|
|
1541
|
-
}), Xe =
|
|
1541
|
+
}), Xe = g(null), {
|
|
1542
1542
|
selectedLocationIds: dt,
|
|
1543
1543
|
dateRange: Rt,
|
|
1544
1544
|
compareDateRange: el,
|
|
1545
1545
|
timeRange: Dt,
|
|
1546
1546
|
globalFilters: tl,
|
|
1547
|
-
isGlobalFiltersLoading:
|
|
1548
|
-
} =
|
|
1549
|
-
|
|
1550
|
-
const nl =
|
|
1547
|
+
isGlobalFiltersLoading: zt
|
|
1548
|
+
} = ze(tt()), { businessId: ll } = ze(Ft()), { businessLoadedId: al, businessDataVersion: mt } = ze(tt());
|
|
1549
|
+
k(() => al.value === ll.value && dt.value.length > 0 && !zt.value);
|
|
1550
|
+
const nl = g(!0), fe = k(() => {
|
|
1551
1551
|
const i = JSON.parse(JSON.stringify(o.value.widget));
|
|
1552
1552
|
return {
|
|
1553
1553
|
...i,
|
|
1554
1554
|
config: {
|
|
1555
1555
|
...i.config,
|
|
1556
|
-
rollup:
|
|
1557
|
-
drillDimension:
|
|
1556
|
+
rollup: b.value,
|
|
1557
|
+
drillDimension: C.value,
|
|
1558
1558
|
showGrandTotal: !1
|
|
1559
1559
|
}
|
|
1560
1560
|
};
|
|
@@ -1563,19 +1563,19 @@ const va = {
|
|
|
1563
1563
|
return {
|
|
1564
1564
|
data: Xe.value,
|
|
1565
1565
|
showTitle: r.value,
|
|
1566
|
-
titleFontSize:
|
|
1566
|
+
titleFontSize: F.value,
|
|
1567
1567
|
titleBold: n.value,
|
|
1568
1568
|
titleItalic: d.value,
|
|
1569
|
-
titleUnderline:
|
|
1570
|
-
chartHeight:
|
|
1569
|
+
titleUnderline: V.value,
|
|
1570
|
+
chartHeight: N.value,
|
|
1571
1571
|
chartWidth: E.value,
|
|
1572
1572
|
showLabel: j.value,
|
|
1573
1573
|
labelAnchor: K.value,
|
|
1574
1574
|
labelAlign: ue.value,
|
|
1575
1575
|
labelRotation: oe.value,
|
|
1576
1576
|
labelOffset: ye.value,
|
|
1577
|
-
labelFontSize:
|
|
1578
|
-
showX:
|
|
1577
|
+
labelFontSize: me.value,
|
|
1578
|
+
showX: z.value,
|
|
1579
1579
|
xPosition: Y.value,
|
|
1580
1580
|
showXGrid: O.value,
|
|
1581
1581
|
showXTick: I.value,
|
|
@@ -1584,18 +1584,18 @@ const va = {
|
|
|
1584
1584
|
xTitle: _e.value,
|
|
1585
1585
|
xTitleFontSize: Ae.value,
|
|
1586
1586
|
showY: Oe.value,
|
|
1587
|
-
yPosition:
|
|
1587
|
+
yPosition: We.value,
|
|
1588
1588
|
showYGrid: t.value,
|
|
1589
|
-
showYTick:
|
|
1589
|
+
showYTick: L.value,
|
|
1590
1590
|
yTitle: G.value,
|
|
1591
|
-
showYTitle:
|
|
1591
|
+
showYTitle: R.value,
|
|
1592
1592
|
yTitleFontSize: re.value,
|
|
1593
|
-
yTickFontSize:
|
|
1593
|
+
yTickFontSize: $.value,
|
|
1594
1594
|
isTransposed: fe.value.config.isTransposed,
|
|
1595
1595
|
showLegend: be.value,
|
|
1596
1596
|
legendPosition: ve.value,
|
|
1597
|
-
usePointStyle:
|
|
1598
|
-
legendMaxHeight:
|
|
1597
|
+
usePointStyle: ae.value,
|
|
1598
|
+
legendMaxHeight: M.value,
|
|
1599
1599
|
legendMaxWidth: P.value
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
@@ -1604,11 +1604,11 @@ const va = {
|
|
|
1604
1604
|
data: Xe.value,
|
|
1605
1605
|
filterText: ce.value,
|
|
1606
1606
|
rollupPosition: fe.value.config.rollupPosition,
|
|
1607
|
-
rowHeight:
|
|
1608
|
-
colWidths:
|
|
1607
|
+
rowHeight: S.value,
|
|
1608
|
+
colWidths: J.value
|
|
1609
1609
|
};
|
|
1610
1610
|
}
|
|
1611
|
-
const $t =
|
|
1611
|
+
const $t = k(() => {
|
|
1612
1612
|
switch (fe.value.type) {
|
|
1613
1613
|
case A.Table:
|
|
1614
1614
|
return sl();
|
|
@@ -1621,43 +1621,43 @@ const va = {
|
|
|
1621
1621
|
default:
|
|
1622
1622
|
return { data: Xe.value };
|
|
1623
1623
|
}
|
|
1624
|
-
}),
|
|
1624
|
+
}), Vt = k(() => {
|
|
1625
1625
|
const { config: i } = o.value.widget;
|
|
1626
1626
|
if (i.rollup != null) {
|
|
1627
|
-
const
|
|
1628
|
-
return
|
|
1627
|
+
const le = [...i.dimensions].filter((Fe) => !Fe.hide);
|
|
1628
|
+
return le.sort(
|
|
1629
1629
|
(Fe, et) => (i.rowIds || []).indexOf(vt(Fe)) - (i.rowIds || []).indexOf(vt(et))
|
|
1630
1630
|
), [
|
|
1631
|
-
{ label: Ue(
|
|
1632
|
-
{ label: Ue(
|
|
1633
|
-
...[...
|
|
1634
|
-
label: Ue(
|
|
1631
|
+
{ label: Ue(u, y, "None", "other"), value: "none" },
|
|
1632
|
+
{ label: Ue(u, y, "Grand Total", "other"), value: 0 },
|
|
1633
|
+
...[...le].slice(0, le.length - 1).map((Fe, et) => ({
|
|
1634
|
+
label: Ue(u, y, Fe.label, "other"),
|
|
1635
1635
|
value: et + 1
|
|
1636
1636
|
}))
|
|
1637
1637
|
];
|
|
1638
1638
|
}
|
|
1639
1639
|
return [];
|
|
1640
|
-
}), Pe =
|
|
1640
|
+
}), Pe = k(() => {
|
|
1641
1641
|
const { config: i } = fe.value;
|
|
1642
|
-
return i.isDrillable ? i.dimensions.map((
|
|
1643
|
-
label: Ue(
|
|
1644
|
-
value: vt(
|
|
1642
|
+
return i.isDrillable ? i.dimensions.map((le) => ({
|
|
1643
|
+
label: Ue(u, y, le.label, "other"),
|
|
1644
|
+
value: vt(le)
|
|
1645
1645
|
})) : [];
|
|
1646
|
-
}), rl =
|
|
1646
|
+
}), rl = k(() => {
|
|
1647
1647
|
const i = o.value.id;
|
|
1648
1648
|
return (tl.value || []).filter(
|
|
1649
|
-
(
|
|
1649
|
+
(le) => Array.isArray(le.tileIds) && le.tileIds.includes(i)
|
|
1650
1650
|
);
|
|
1651
1651
|
});
|
|
1652
|
-
|
|
1652
|
+
de(
|
|
1653
1653
|
() => o.value.widget.config,
|
|
1654
1654
|
(i) => {
|
|
1655
|
-
|
|
1655
|
+
b.value = i.rollup, r.value = i.showTitle ?? !0, F.value = i.titleFontSize ?? 14, n.value = i.titleBold ?? !1, d.value = i.titleItalic ?? !1, V.value = i.titleUnderline ?? !1, N.value = i.chartHeight ?? void 0, E.value = i.chartWidth ?? void 0, j.value = i.showLabel ?? !1, ue.value = i.labelAlign ?? Ct.center, K.value = i.labelAnchor ?? St.center, oe.value = i.labelRotation ?? 0, ye.value = i.labelOffset ?? 0, me.value = i.labelFontSize ?? 12, z.value = i.showX ?? !0, Y.value = i.xPosition ?? kt.bottom, O.value = i.showXGrid ?? !1, I.value = i.showXTick ?? !0, H.value = i.xTickFontSize ?? 12, he.value = i.showXTitle ?? !1, _e.value = i.xTitle ?? "", Ae.value = i.xTitleFontSize ?? 12, Oe.value = i.showY ?? !0, We.value = i.yPosition ?? Tt.left, t.value = i.showYGrid ?? !1, L.value = i.showYTick ?? !0, $.value = i.yTickFontSize ?? 12, R.value = i.showYTitle ?? !1, G.value = i.yTitle ?? "", re.value = i.yTitleFontSize ?? 12, be.value = i.showLegend ?? void 0, ve.value = i.legendPosition ?? _t.top, ae.value = i.usePointStyle ?? !0, M.value = i.legendMaxHeight, P.value = i.legendMaxWidth, S.value = i.rowHeight ?? 0, J.value = i.colWidths ?? [];
|
|
1656
1656
|
},
|
|
1657
1657
|
{ deep: !0 }
|
|
1658
|
-
),
|
|
1659
|
-
|
|
1660
|
-
}),
|
|
1658
|
+
), de([() => b.value], () => {
|
|
1659
|
+
b.value !== null && (o.value.widget.config.rollup = b.value);
|
|
1660
|
+
}), de(
|
|
1661
1661
|
[
|
|
1662
1662
|
() => fe.value,
|
|
1663
1663
|
() => Rt.value,
|
|
@@ -1671,22 +1671,22 @@ const va = {
|
|
|
1671
1671
|
At();
|
|
1672
1672
|
},
|
|
1673
1673
|
{ deep: !0 }
|
|
1674
|
-
),
|
|
1674
|
+
), de(
|
|
1675
1675
|
[() => o.value.size],
|
|
1676
1676
|
() => {
|
|
1677
1677
|
Ge();
|
|
1678
1678
|
},
|
|
1679
1679
|
{ deep: !0 }
|
|
1680
1680
|
), Ie(() => {
|
|
1681
|
-
Ge(),
|
|
1681
|
+
Ge(), te.value.sm || te.value.md || te.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", Ge)) : addEventListener("resize", Ge), At();
|
|
1682
1682
|
}), Ut(() => {
|
|
1683
|
-
|
|
1683
|
+
te.value.sm || te.value.md || te.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", Ge)) : removeEventListener("resize", Ge);
|
|
1684
1684
|
});
|
|
1685
|
-
const
|
|
1685
|
+
const Et = Lt();
|
|
1686
1686
|
let st;
|
|
1687
1687
|
async function At() {
|
|
1688
1688
|
if (fe.value.config.schemaNames.length <= 0 && !(fe.value.config.dimensions.length <= 0 || fe.value.config.metrics.length <= 0)) {
|
|
1689
|
-
|
|
1689
|
+
Et.open({
|
|
1690
1690
|
message: "schema must not be empty and dimension or metrics must have at least 1 column",
|
|
1691
1691
|
type: "info"
|
|
1692
1692
|
}), a.value = !1;
|
|
@@ -1694,10 +1694,10 @@ const va = {
|
|
|
1694
1694
|
}
|
|
1695
1695
|
try {
|
|
1696
1696
|
a.value = !0, st && st.abort(), st = new AbortController();
|
|
1697
|
-
const i = st.signal,
|
|
1698
|
-
mt.value ===
|
|
1697
|
+
const i = st.signal, le = mt.value, Fe = await bt(Gt, 500)(fe.value, i, o.value.id);
|
|
1698
|
+
mt.value === le && (Xe.value = Fe, f.value = it(), setTimeout(() => c(), 100)), a.value = !1;
|
|
1699
1699
|
} catch (i) {
|
|
1700
|
-
i.code !== "ERR_CANCELED" && (Xe.value = null,
|
|
1700
|
+
i.code !== "ERR_CANCELED" && (Xe.value = null, Et.open({ message: `Invalid chart ${fe.value.type}`, type: "error" }), console.log(i), a.value = !1);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
function il(i) {
|
|
@@ -1707,63 +1707,63 @@ const va = {
|
|
|
1707
1707
|
case "SCORECARD":
|
|
1708
1708
|
return;
|
|
1709
1709
|
case "TABLE":
|
|
1710
|
-
return `${o.value.size.height * 100 + (
|
|
1710
|
+
return `${o.value.size.height * 100 + (v.value ? 72 : 0) + 96.5}px`;
|
|
1711
1711
|
}
|
|
1712
1712
|
return `${Math.max(i / o.value.size.width, 90) * o.value.size.height}px`;
|
|
1713
1713
|
}
|
|
1714
1714
|
function ul() {
|
|
1715
|
-
const i =
|
|
1716
|
-
i >= 0 && (
|
|
1715
|
+
const i = w.value - 1;
|
|
1716
|
+
i >= 0 && (C.value = Pe.value[i].value);
|
|
1717
1717
|
}
|
|
1718
1718
|
function cl() {
|
|
1719
|
-
const i =
|
|
1720
|
-
i >= 0 && i < Pe.value.length && (
|
|
1719
|
+
const i = w.value + 1;
|
|
1720
|
+
i >= 0 && i < Pe.value.length && (C.value = Pe.value[i].value);
|
|
1721
1721
|
}
|
|
1722
|
-
const
|
|
1722
|
+
const Wt = g(Ke.EXCEL), Nt = g(), dl = Object.values(Ke).map((i) => ({
|
|
1723
1723
|
label: Ll(i),
|
|
1724
1724
|
value: i,
|
|
1725
1725
|
onClick: async () => {
|
|
1726
1726
|
i === Ke.EXCEL || i === Ke.PDFFULLSIZE || i === Ke.PDFRECEIPT ? await Yt({
|
|
1727
1727
|
reportType: i,
|
|
1728
|
-
index:
|
|
1728
|
+
index: _.index,
|
|
1729
1729
|
isCombinedLocationLayout: nl.value,
|
|
1730
1730
|
timeRange: Dt.value,
|
|
1731
1731
|
dateRange: Rt.value,
|
|
1732
1732
|
locationIds: dt.value
|
|
1733
|
-
}) : i === Ke.PDF && (
|
|
1733
|
+
}) : i === Ke.PDF && (Wt.value = i, Nt.value = _.index, Q.value = !0);
|
|
1734
1734
|
}
|
|
1735
1735
|
})), ml = fe.value.type === A.Spacer ? "flat" : "outlined", pl = fe.value.type === A.Spacer ? "p-0" : "p-16";
|
|
1736
|
-
return (i,
|
|
1736
|
+
return (i, le) => {
|
|
1737
1737
|
const Fe = B("FmTooltip"), et = B("FmSearch"), hl = B("FmCheckbox"), pt = B("FmButton"), fl = B("FmSelect"), vl = B("FmMenuItem"), gl = B("FmMenu"), yl = B("FmForm"), bl = B("FmCircularProgress"), wl = B("FmCard");
|
|
1738
|
-
return
|
|
1738
|
+
return W(), pe(wl, {
|
|
1739
1739
|
ref_key: "tileCard",
|
|
1740
|
-
ref:
|
|
1741
|
-
class:
|
|
1740
|
+
ref: D,
|
|
1741
|
+
class: Qe(`${Qt.value} ${s(pl)}`),
|
|
1742
1742
|
variant: s(ml)
|
|
1743
1743
|
}, {
|
|
1744
1744
|
default: ie(() => [
|
|
1745
|
-
|
|
1746
|
-
modelValue:
|
|
1747
|
-
"onUpdate:modelValue":
|
|
1748
|
-
"report-type":
|
|
1749
|
-
index:
|
|
1745
|
+
U(ha, {
|
|
1746
|
+
modelValue: Q.value,
|
|
1747
|
+
"onUpdate:modelValue": le[0] || (le[0] = (je) => Q.value = je),
|
|
1748
|
+
"report-type": Wt.value,
|
|
1749
|
+
index: Nt.value
|
|
1750
1750
|
}, null, 8, ["modelValue", "report-type", "index"]),
|
|
1751
|
-
!a.value && !s(
|
|
1751
|
+
!a.value && !s(zt) ? (W(), ne("div", {
|
|
1752
1752
|
key: 0,
|
|
1753
|
-
style:
|
|
1753
|
+
style: Ve({ height: we.value })
|
|
1754
1754
|
}, [
|
|
1755
|
-
(
|
|
1756
|
-
key:
|
|
1755
|
+
(W(), pe(Cl(Zt.value), {
|
|
1756
|
+
key: f.value,
|
|
1757
1757
|
modelValue: $t.value,
|
|
1758
|
-
"onUpdate:modelValue":
|
|
1759
|
-
"tile-index":
|
|
1758
|
+
"onUpdate:modelValue": le[4] || (le[4] = (je) => $t.value = je),
|
|
1759
|
+
"tile-index": _.index
|
|
1760
1760
|
}, {
|
|
1761
1761
|
menu: ie(() => [
|
|
1762
|
-
|
|
1762
|
+
U(yl, { class: "flex items-center gap-2" }, {
|
|
1763
1763
|
default: ie(() => {
|
|
1764
|
-
var je, It,
|
|
1764
|
+
var je, It, Mt, Ot;
|
|
1765
1765
|
return [
|
|
1766
|
-
|
|
1766
|
+
U(Fe, {
|
|
1767
1767
|
variant: "plain",
|
|
1768
1768
|
placement: "right",
|
|
1769
1769
|
content: fe.value.description,
|
|
@@ -1772,69 +1772,69 @@ const va = {
|
|
|
1772
1772
|
"z-index": 99
|
|
1773
1773
|
}, {
|
|
1774
1774
|
default: ie(() => [
|
|
1775
|
-
r.value !== !1 ? (
|
|
1775
|
+
r.value !== !1 ? (W(), ne("p", {
|
|
1776
1776
|
key: 0,
|
|
1777
|
-
style:
|
|
1778
|
-
fontSize:
|
|
1777
|
+
style: Ve({
|
|
1778
|
+
fontSize: F.value + "px",
|
|
1779
1779
|
fontWeight: n.value ? "bold" : "normal",
|
|
1780
1780
|
fontStyle: d.value ? "italic" : "normal",
|
|
1781
|
-
textDecoration:
|
|
1781
|
+
textDecoration: V.value ? "underline" : "none"
|
|
1782
1782
|
}),
|
|
1783
|
-
class:
|
|
1784
|
-
|
|
1783
|
+
class: Qe(["text-fm-color-typo-secondary line-clamp-1", [
|
|
1784
|
+
F.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
1785
1785
|
fe.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
1786
1786
|
]])
|
|
1787
|
-
}, De(s(Ue)(s(
|
|
1787
|
+
}, De(s(Ue)(s(u), s(y), fe.value.title, "other")), 7)) : ke("", !0)
|
|
1788
1788
|
]),
|
|
1789
1789
|
_: 1
|
|
1790
1790
|
}, 8, ["content", "disabled"]),
|
|
1791
|
-
(je = ot.value) != null && je.showSearchBar ? (
|
|
1791
|
+
(je = ot.value) != null && je.showSearchBar ? (W(), pe(et, {
|
|
1792
1792
|
key: 0,
|
|
1793
1793
|
modelValue: ce.value,
|
|
1794
|
-
"onUpdate:modelValue":
|
|
1794
|
+
"onUpdate:modelValue": le[1] || (le[1] = (Le) => ce.value = Le),
|
|
1795
1795
|
class: "grow"
|
|
1796
|
-
}, null, 8, ["modelValue"])) : (
|
|
1797
|
-
kl(
|
|
1796
|
+
}, null, 8, ["modelValue"])) : (W(), ne("div", va)),
|
|
1797
|
+
kl(U(hl, {
|
|
1798
1798
|
modelValue: j.value,
|
|
1799
|
-
"onUpdate:modelValue":
|
|
1799
|
+
"onUpdate:modelValue": le[2] || (le[2] = (Le) => j.value = Le),
|
|
1800
1800
|
label: "Label",
|
|
1801
1801
|
value: !1
|
|
1802
1802
|
}, null, 8, ["modelValue"]), [
|
|
1803
1803
|
[Tl, (It = ot.value) == null ? void 0 : It.showLabel]
|
|
1804
1804
|
]),
|
|
1805
|
-
(
|
|
1806
|
-
|
|
1805
|
+
(Mt = ot.value) != null && Mt.showDrillDimension && Pe.value.length > 0 ? (W(), ne("div", ga, [
|
|
1806
|
+
U(pt, {
|
|
1807
1807
|
icon: "arrow_upward",
|
|
1808
1808
|
variant: "tertiary",
|
|
1809
|
-
disabled: !
|
|
1809
|
+
disabled: !q.value,
|
|
1810
1810
|
onClick: ul
|
|
1811
1811
|
}, null, 8, ["disabled"]),
|
|
1812
|
-
|
|
1812
|
+
U(pt, {
|
|
1813
1813
|
icon: "arrow_downward",
|
|
1814
1814
|
variant: "tertiary",
|
|
1815
|
-
disabled: !
|
|
1815
|
+
disabled: !x.value,
|
|
1816
1816
|
onClick: cl
|
|
1817
1817
|
}, null, 8, ["disabled"])
|
|
1818
1818
|
])) : ke("", !0),
|
|
1819
|
-
(Ot = ot.value) != null && Ot.showRollup &&
|
|
1820
|
-
key: `rollup-${s(
|
|
1821
|
-
modelValue:
|
|
1822
|
-
"onUpdate:modelValue":
|
|
1819
|
+
(Ot = ot.value) != null && Ot.showRollup && Vt.value.length > 0 ? (W(), pe(fl, {
|
|
1820
|
+
key: `rollup-${s(T)}`,
|
|
1821
|
+
modelValue: b.value,
|
|
1822
|
+
"onUpdate:modelValue": le[3] || (le[3] = (Le) => b.value = Le),
|
|
1823
1823
|
class: "w-[150px]",
|
|
1824
|
-
items:
|
|
1824
|
+
items: Vt.value
|
|
1825
1825
|
}, null, 8, ["modelValue", "items"])) : ke("", !0),
|
|
1826
|
-
|
|
1826
|
+
_.hideExport ? ke("", !0) : (W(), pe(gl, {
|
|
1827
1827
|
key: 4,
|
|
1828
1828
|
shift: !0
|
|
1829
1829
|
}, {
|
|
1830
1830
|
"menu-button": ie(() => [
|
|
1831
|
-
|
|
1831
|
+
U(pt, {
|
|
1832
1832
|
icon: "more_vert",
|
|
1833
1833
|
variant: "tertiary"
|
|
1834
1834
|
})
|
|
1835
1835
|
]),
|
|
1836
1836
|
default: ie(() => [
|
|
1837
|
-
(
|
|
1837
|
+
(W(!0), ne(xe, null, ut(s(dl), (Le) => (W(), pe(vl, {
|
|
1838
1838
|
key: Le.value,
|
|
1839
1839
|
label: Le.label,
|
|
1840
1840
|
onClick: Le.onClick
|
|
@@ -1849,7 +1849,7 @@ const va = {
|
|
|
1849
1849
|
]),
|
|
1850
1850
|
_: 1
|
|
1851
1851
|
}, 8, ["modelValue", "tile-index"]))
|
|
1852
|
-
], 4)) : (
|
|
1852
|
+
], 4)) : (W(), pe(bl, { key: 1 }))
|
|
1853
1853
|
]),
|
|
1854
1854
|
_: 1
|
|
1855
1855
|
}, 8, ["class", "variant"]);
|
|
@@ -1887,29 +1887,29 @@ function Ua({
|
|
|
1887
1887
|
dataType: o,
|
|
1888
1888
|
t: l
|
|
1889
1889
|
}) {
|
|
1890
|
-
const { fixed:
|
|
1890
|
+
const { fixed: u, count: y } = ya(e);
|
|
1891
1891
|
switch (o) {
|
|
1892
1892
|
case Re.String:
|
|
1893
1893
|
return {
|
|
1894
1894
|
type: "TextField",
|
|
1895
|
-
fixed:
|
|
1896
|
-
count:
|
|
1895
|
+
fixed: u,
|
|
1896
|
+
count: y,
|
|
1897
1897
|
dataType: void 0,
|
|
1898
1898
|
default: ""
|
|
1899
1899
|
};
|
|
1900
1900
|
case Re.Numeric:
|
|
1901
1901
|
return {
|
|
1902
1902
|
type: "TextField",
|
|
1903
|
-
fixed:
|
|
1904
|
-
count:
|
|
1903
|
+
fixed: u,
|
|
1904
|
+
count: y,
|
|
1905
1905
|
dataType: "number",
|
|
1906
1906
|
default: 0
|
|
1907
1907
|
};
|
|
1908
1908
|
case Re.Bool:
|
|
1909
1909
|
return {
|
|
1910
1910
|
type: "Select",
|
|
1911
|
-
fixed:
|
|
1912
|
-
count:
|
|
1911
|
+
fixed: u,
|
|
1912
|
+
count: y,
|
|
1913
1913
|
options: [
|
|
1914
1914
|
{ label: l("report.common.yes"), value: !0 },
|
|
1915
1915
|
{ label: l("report.common.no"), value: !1 }
|
|
@@ -1919,15 +1919,15 @@ function Ua({
|
|
|
1919
1919
|
case Re.Timestamp:
|
|
1920
1920
|
return Jt({
|
|
1921
1921
|
dimensionOption: a,
|
|
1922
|
-
fixed:
|
|
1923
|
-
count:
|
|
1922
|
+
fixed: u,
|
|
1923
|
+
count: y,
|
|
1924
1924
|
t: l
|
|
1925
1925
|
});
|
|
1926
1926
|
}
|
|
1927
1927
|
return {
|
|
1928
1928
|
type: "TextField",
|
|
1929
|
-
fixed:
|
|
1930
|
-
count:
|
|
1929
|
+
fixed: u,
|
|
1930
|
+
count: y,
|
|
1931
1931
|
dataType: void 0,
|
|
1932
1932
|
default: ""
|
|
1933
1933
|
};
|
|
@@ -1964,9 +1964,9 @@ function Jt({
|
|
|
1964
1964
|
type: Ye.Select,
|
|
1965
1965
|
fixed: a,
|
|
1966
1966
|
count: o,
|
|
1967
|
-
options: Array.from({ length: 24 }, (
|
|
1968
|
-
label:
|
|
1969
|
-
value:
|
|
1967
|
+
options: Array.from({ length: 24 }, (u, y) => ({
|
|
1968
|
+
label: y.toString().padStart(2, "0"),
|
|
1969
|
+
value: y.toString()
|
|
1970
1970
|
})),
|
|
1971
1971
|
default: "0"
|
|
1972
1972
|
};
|
|
@@ -1991,9 +1991,9 @@ function Jt({
|
|
|
1991
1991
|
type: Ye.Select,
|
|
1992
1992
|
fixed: a,
|
|
1993
1993
|
count: o,
|
|
1994
|
-
options: Array.from({ length: 31 }, (
|
|
1995
|
-
label: (
|
|
1996
|
-
value: (
|
|
1994
|
+
options: Array.from({ length: 31 }, (u, y) => ({
|
|
1995
|
+
label: (y + 1).toString(),
|
|
1996
|
+
value: (y + 1).toString()
|
|
1997
1997
|
})),
|
|
1998
1998
|
default: "1"
|
|
1999
1999
|
};
|
|
@@ -2037,7 +2037,7 @@ function Bt({
|
|
|
2037
2037
|
count: 1,
|
|
2038
2038
|
t: a
|
|
2039
2039
|
});
|
|
2040
|
-
return o.type
|
|
2040
|
+
return o.type !== Ye.Select ? [] : [{ label: a("report.input.unknown"), value: "" }, ...o.options];
|
|
2041
2041
|
}
|
|
2042
2042
|
const ba = "mf-reportglobalFilter";
|
|
2043
2043
|
function qt(e, a) {
|
|
@@ -2053,184 +2053,182 @@ function qt(e, a) {
|
|
|
2053
2053
|
].join("|");
|
|
2054
2054
|
}
|
|
2055
2055
|
const wa = Xt(ba, () => {
|
|
2056
|
-
const e =
|
|
2056
|
+
const e = g({}), a = g(!1), o = g(null), l = () => ({
|
|
2057
2057
|
search: "",
|
|
2058
2058
|
selectedValues: [],
|
|
2059
2059
|
keepSelection: !1,
|
|
2060
2060
|
showAdvanced: !1,
|
|
2061
2061
|
visibleCount: 50
|
|
2062
2062
|
});
|
|
2063
|
-
function c
|
|
2064
|
-
const
|
|
2065
|
-
return e.value[
|
|
2063
|
+
function u(c, b) {
|
|
2064
|
+
const f = qt(c, b);
|
|
2065
|
+
return e.value[f] || (e.value[f] = l()), e.value[f];
|
|
2066
2066
|
}
|
|
2067
|
-
const
|
|
2068
|
-
function
|
|
2069
|
-
c
|
|
2067
|
+
const y = k(() => e.value), T = (c) => o.value === c;
|
|
2068
|
+
function _(c, b, f, C) {
|
|
2069
|
+
u(c, b)[f] = C;
|
|
2070
2070
|
}
|
|
2071
|
-
function
|
|
2072
|
-
c
|
|
2071
|
+
function D(c, b, f = 50) {
|
|
2072
|
+
u(c, b).visibleCount += f;
|
|
2073
2073
|
}
|
|
2074
|
-
function m(
|
|
2075
|
-
a.value =
|
|
2074
|
+
function m(c) {
|
|
2075
|
+
a.value = c;
|
|
2076
2076
|
}
|
|
2077
|
-
function
|
|
2078
|
-
o.value =
|
|
2077
|
+
function p(c) {
|
|
2078
|
+
o.value = c;
|
|
2079
2079
|
}
|
|
2080
2080
|
function h() {
|
|
2081
2081
|
o.value = null;
|
|
2082
2082
|
}
|
|
2083
2083
|
return {
|
|
2084
|
-
allStates:
|
|
2084
|
+
allStates: y,
|
|
2085
2085
|
includeUnavailable: a,
|
|
2086
2086
|
openMenuKey: o,
|
|
2087
|
-
getGlobalFilter:
|
|
2088
|
-
isMenuOpen:
|
|
2089
|
-
setGlobalFilter:
|
|
2090
|
-
showMore:
|
|
2087
|
+
getGlobalFilter: u,
|
|
2088
|
+
isMenuOpen: T,
|
|
2089
|
+
setGlobalFilter: _,
|
|
2090
|
+
showMore: D,
|
|
2091
2091
|
setIncludeUnavailable: m,
|
|
2092
|
-
openMenu:
|
|
2092
|
+
openMenu: p,
|
|
2093
2093
|
closeMenu: h,
|
|
2094
2094
|
getKey: qt
|
|
2095
2095
|
};
|
|
2096
2096
|
}), xa = { class: "flex flex-row flex-wrap gap-2" }, Sa = { class: "inline-flex max-w-[460px]" }, Ca = {
|
|
2097
2097
|
key: 0,
|
|
2098
2098
|
class: "flex justify-center my-2"
|
|
2099
|
-
}, ka = { class: "px-2 pb-8" }, Ta = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, _a = { class: "px-2 pb-8" }, Fa = { class: "flex items-start w-full" }, La = ["onClick"], Ra = { class: "fm-typo-en-body-md-400" }, Da = { key: 0 },
|
|
2099
|
+
}, ka = { class: "px-2 pb-8" }, Ta = { class: "flex-1 overflow-y-auto overflow-x-hidden" }, _a = { class: "px-2 pb-8" }, Fa = { class: "flex items-start w-full" }, La = ["onClick"], Ra = { class: "fm-typo-en-body-md-400" }, Da = { key: 0 }, za = { class: "px-12 py-3" }, $a = { class: "flex items-center justify-between" }, Va = { class: "text-xs max-w-[200px]" }, Ea = { class: "px-4 py-3 flex flex-row justify-end gap-2 bg-white" }, Xa = /* @__PURE__ */ Te({
|
|
2100
2100
|
__name: "FilterSelector",
|
|
2101
2101
|
setup(e) {
|
|
2102
|
-
const { t: a, locale: o } = at(), { currentReport: l, editingTile:
|
|
2103
|
-
let { globalFilters:
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
setIncludeUnavailable: x,
|
|
2108
|
-
getKey: S,
|
|
2109
|
-
isMenuOpen: b,
|
|
2110
|
-
openMenu: U,
|
|
2111
|
-
closeMenu: w
|
|
2112
|
-
} = wa(), r = null;
|
|
2113
|
-
const L = v(!1), n = T(() => {
|
|
2102
|
+
const { t: a, locale: o } = at(), { currentReport: l, editingTile: u } = ze(Rl());
|
|
2103
|
+
let { globalFilters: y, isGlobalFiltersLoading: T, timeRange: _, dateRange: D, selectedLocationIds: m, timezone: p } = ze(tt()), { schemas: h } = ze(Dl()), { showMore: c, getGlobalFilter: b, setGlobalFilter: f, setIncludeUnavailable: C, getKey: w, isMenuOpen: q } = wa();
|
|
2104
|
+
const x = k(() => a("report.input.unknown"));
|
|
2105
|
+
let r = null;
|
|
2106
|
+
const F = g(!1), n = k(() => {
|
|
2114
2107
|
var t;
|
|
2115
2108
|
return ((t = l.value) == null ? void 0 : t.id) ?? "";
|
|
2116
|
-
}), d =
|
|
2117
|
-
function
|
|
2118
|
-
const
|
|
2119
|
-
t.selectedValues = t.keepSelection ?
|
|
2109
|
+
}), d = g([]);
|
|
2110
|
+
function V(t) {
|
|
2111
|
+
const $ = b(t.filter, n.value).selectedValues;
|
|
2112
|
+
t.selectedValues = t.keepSelection ? $ : t.options.map((R) => R.value), t.filter.values = [...t.selectedValues], f(t.filter, n.value, "selectedValues", t.selectedValues);
|
|
2120
2113
|
}
|
|
2121
|
-
|
|
2114
|
+
de(
|
|
2122
2115
|
() => ({
|
|
2123
2116
|
reportId: n.value,
|
|
2124
|
-
globalFilters:
|
|
2117
|
+
globalFilters: y.value
|
|
2125
2118
|
}),
|
|
2126
2119
|
() => {
|
|
2127
|
-
d.value = (
|
|
2128
|
-
const
|
|
2120
|
+
d.value = (y.value || []).map((t, L) => {
|
|
2121
|
+
const $ = b(t, n.value), R = $.selectedValues.length ? [...$.selectedValues] : [...t.values ?? []];
|
|
2129
2122
|
return {
|
|
2130
|
-
id:
|
|
2123
|
+
id: `${w(t, n.value)}|${L}`,
|
|
2131
2124
|
filter: t,
|
|
2132
|
-
search:
|
|
2125
|
+
search: $.search,
|
|
2133
2126
|
options: [],
|
|
2134
2127
|
type: E(t),
|
|
2135
|
-
selectedValues:
|
|
2136
|
-
visibleCount:
|
|
2137
|
-
keepSelection:
|
|
2138
|
-
showAdvanced:
|
|
2128
|
+
selectedValues: R,
|
|
2129
|
+
visibleCount: $.visibleCount,
|
|
2130
|
+
keepSelection: $.keepSelection,
|
|
2131
|
+
showAdvanced: $.showAdvanced
|
|
2139
2132
|
};
|
|
2140
|
-
}),
|
|
2133
|
+
}), me();
|
|
2141
2134
|
},
|
|
2142
2135
|
{ immediate: !0 }
|
|
2143
|
-
),
|
|
2144
|
-
[
|
|
2136
|
+
), de(
|
|
2137
|
+
[_, D, m],
|
|
2145
2138
|
async () => {
|
|
2146
|
-
await
|
|
2139
|
+
await me();
|
|
2147
2140
|
},
|
|
2148
2141
|
{ deep: !0, immediate: !0 }
|
|
2149
|
-
),
|
|
2150
|
-
[() =>
|
|
2142
|
+
), de(
|
|
2143
|
+
[() => u.value],
|
|
2151
2144
|
async () => {
|
|
2152
2145
|
d.value.forEach((t) => {
|
|
2153
2146
|
t.options = [];
|
|
2154
|
-
}), await
|
|
2147
|
+
}), await me();
|
|
2155
2148
|
},
|
|
2156
2149
|
{ deep: !0 }
|
|
2150
|
+
), de(
|
|
2151
|
+
() => o.value,
|
|
2152
|
+
async () => {
|
|
2153
|
+
await me(!0);
|
|
2154
|
+
}
|
|
2157
2155
|
);
|
|
2158
2156
|
function E(t) {
|
|
2159
|
-
var
|
|
2160
|
-
const
|
|
2161
|
-
return
|
|
2157
|
+
var $;
|
|
2158
|
+
const L = ($ = h.value.find((R) => R.name === t.schemaName)) == null ? void 0 : $.fields.find((R) => R.name === t.name);
|
|
2159
|
+
return L == null ? void 0 : L.type;
|
|
2162
2160
|
}
|
|
2163
|
-
function
|
|
2161
|
+
function N(t) {
|
|
2164
2162
|
var ve;
|
|
2165
|
-
if (!l.value && !
|
|
2166
|
-
const
|
|
2167
|
-
var
|
|
2168
|
-
const
|
|
2169
|
-
if (!
|
|
2170
|
-
const P = (
|
|
2171
|
-
(
|
|
2172
|
-
),
|
|
2173
|
-
(
|
|
2174
|
-
),
|
|
2175
|
-
return P ||
|
|
2163
|
+
if (!l.value && !u.value) return [];
|
|
2164
|
+
const L = u.value ? [u.value] : [...((ve = l.value) == null ? void 0 : ve.tiles) ?? []], { name: $ = "", schemaName: R = "" } = t, G = L.filter((ae) => {
|
|
2165
|
+
var Q, ce;
|
|
2166
|
+
const M = (Q = ae == null ? void 0 : ae.widget) == null ? void 0 : Q.config;
|
|
2167
|
+
if (!M || (ce = t.tileIds) != null && ce.length && !t.tileIds.includes(ae.id)) return !1;
|
|
2168
|
+
const P = (M.dimensions ?? []).some(
|
|
2169
|
+
(te) => te.schemaName === R && te.name === $
|
|
2170
|
+
), S = (M.joinDatasources ?? []).some(
|
|
2171
|
+
(te) => (te.dimensions ?? []).some((Z) => Z.schemaName === R && Z.name === $)
|
|
2172
|
+
), J = (M.schemaNames ?? []).includes(R);
|
|
2173
|
+
return P || S || J;
|
|
2176
2174
|
});
|
|
2177
2175
|
if (!G.length) return [];
|
|
2178
|
-
const re = (
|
|
2179
|
-
const P = /* @__PURE__ */ new Map(),
|
|
2180
|
-
const
|
|
2181
|
-
ce ? [Ce.Like, Ce.NotLike].includes(
|
|
2176
|
+
const re = (ae, M) => {
|
|
2177
|
+
const P = /* @__PURE__ */ new Map(), S = (J) => {
|
|
2178
|
+
const Q = `${J.schemaName}:${J.name}:${J.operator}:${J.option ?? ""}:${J.dataFormula ?? ""}`, ce = P.get(Q);
|
|
2179
|
+
ce ? [Ce.Like, Ce.NotLike].includes(J.operator) ? ce.values = Array.from(/* @__PURE__ */ new Set([...ce.values ?? [], ...J.values ?? []])) : P.set(Q, { ...J }) : P.set(Q, { ...J });
|
|
2182
2180
|
};
|
|
2183
|
-
return
|
|
2184
|
-
}, be = (
|
|
2181
|
+
return ae.forEach(S), M.forEach(S), Array.from(P.values());
|
|
2182
|
+
}, be = (ae) => {
|
|
2185
2183
|
var P;
|
|
2186
|
-
const
|
|
2187
|
-
(
|
|
2184
|
+
const M = (P = ae.dimensions) == null ? void 0 : P.find(
|
|
2185
|
+
(S) => S.schemaName === R && S.name === $
|
|
2188
2186
|
);
|
|
2189
2187
|
return {
|
|
2190
|
-
name:
|
|
2191
|
-
schemaName:
|
|
2192
|
-
label: (
|
|
2188
|
+
name: $,
|
|
2189
|
+
schemaName: R,
|
|
2190
|
+
label: (M == null ? void 0 : M.label) ?? $,
|
|
2193
2191
|
hide: !1,
|
|
2194
2192
|
option: t.option ?? null,
|
|
2195
|
-
dataFormula:
|
|
2193
|
+
dataFormula: M == null ? void 0 : M.dataFormula
|
|
2196
2194
|
};
|
|
2197
2195
|
};
|
|
2198
|
-
return G.map((
|
|
2199
|
-
var
|
|
2200
|
-
const
|
|
2201
|
-
if (!
|
|
2202
|
-
const P = be(
|
|
2203
|
-
|
|
2196
|
+
return G.map((ae) => {
|
|
2197
|
+
var te, Z;
|
|
2198
|
+
const M = (te = ae == null ? void 0 : ae.widget) == null ? void 0 : te.config;
|
|
2199
|
+
if (!M) return null;
|
|
2200
|
+
const P = be(M), S = (M.dimensions ?? []).some((we) => we.schemaName === R) || (M.schemaNames ?? []).includes(R), J = re(
|
|
2201
|
+
M.filters ?? [],
|
|
2204
2202
|
(t.filters ?? []).filter((we) => {
|
|
2205
|
-
var
|
|
2206
|
-
return (
|
|
2203
|
+
var ee;
|
|
2204
|
+
return (ee = M.schemaNames) == null ? void 0 : ee.includes(we.schemaName);
|
|
2207
2205
|
})
|
|
2208
|
-
),
|
|
2209
|
-
(we) => (we.schemaNames ?? []).includes(
|
|
2206
|
+
), Q = (Z = M.joinDatasources) == null ? void 0 : Z.find(
|
|
2207
|
+
(we) => (we.schemaNames ?? []).includes(R) || (we.dimensions ?? []).some((ee) => ee.schemaName === R)
|
|
2210
2208
|
), ce = re(
|
|
2211
|
-
(
|
|
2209
|
+
(Q == null ? void 0 : Q.filters) ?? [],
|
|
2212
2210
|
(t.filters ?? []).filter((we) => {
|
|
2213
|
-
var
|
|
2214
|
-
return (
|
|
2211
|
+
var ee;
|
|
2212
|
+
return (ee = Q == null ? void 0 : Q.schemaNames) == null ? void 0 : ee.includes(we.schemaName);
|
|
2215
2213
|
})
|
|
2216
2214
|
);
|
|
2217
2215
|
return {
|
|
2218
2216
|
type: A.Table,
|
|
2219
2217
|
title: "Global Filter",
|
|
2220
2218
|
config: {
|
|
2221
|
-
schemaNames:
|
|
2222
|
-
schemas:
|
|
2223
|
-
dimensions:
|
|
2224
|
-
filters:
|
|
2225
|
-
sorts:
|
|
2226
|
-
joinDatasources: !
|
|
2219
|
+
schemaNames: M.schemaNames,
|
|
2220
|
+
schemas: M.schemas,
|
|
2221
|
+
dimensions: S ? [P] : [],
|
|
2222
|
+
filters: J,
|
|
2223
|
+
sorts: S ? [{ name: $, schemaName: R, type: qe.Asc, aggregation: null, dimensionOption: null }] : [],
|
|
2224
|
+
joinDatasources: !S && Q ? [
|
|
2227
2225
|
{
|
|
2228
|
-
...
|
|
2226
|
+
...Q,
|
|
2229
2227
|
dimensions: [P],
|
|
2230
2228
|
sorts: [
|
|
2231
2229
|
{
|
|
2232
|
-
name:
|
|
2233
|
-
schemaName:
|
|
2230
|
+
name: $,
|
|
2231
|
+
schemaName: R,
|
|
2234
2232
|
type: qe.Asc,
|
|
2235
2233
|
aggregation: null,
|
|
2236
2234
|
dimensionOption: null
|
|
@@ -2255,216 +2253,217 @@ const wa = Xt(ba, () => {
|
|
|
2255
2253
|
}).filter(Boolean);
|
|
2256
2254
|
}
|
|
2257
2255
|
function j(t) {
|
|
2258
|
-
return t.options.every((
|
|
2259
|
-
var
|
|
2260
|
-
return (
|
|
2256
|
+
return t.options.every((L) => {
|
|
2257
|
+
var $;
|
|
2258
|
+
return ($ = t.selectedValues) == null ? void 0 : $.includes(L.value);
|
|
2261
2259
|
});
|
|
2262
2260
|
}
|
|
2263
2261
|
function ue(t) {
|
|
2264
|
-
j(t) ? t.selectedValues = ["(EMPTY)"] : t.selectedValues = t.options.map((
|
|
2262
|
+
j(t) ? t.selectedValues = ["(EMPTY)"] : t.selectedValues = t.options.map((L) => L.value);
|
|
2265
2263
|
}
|
|
2266
|
-
const K =
|
|
2264
|
+
const K = k(
|
|
2267
2265
|
() => d.value.map((t) => {
|
|
2268
|
-
const
|
|
2269
|
-
return
|
|
2270
|
-
(G) => G.label.toLowerCase().includes(
|
|
2266
|
+
const L = t.options, $ = t.search.toLowerCase() ?? "";
|
|
2267
|
+
return L.filter(
|
|
2268
|
+
(G) => G.label.toLowerCase().includes($.toLowerCase())
|
|
2271
2269
|
).slice(0, t.visibleCount);
|
|
2272
2270
|
})
|
|
2273
2271
|
);
|
|
2274
2272
|
function oe(t) {
|
|
2275
|
-
t.visibleCount += 50,
|
|
2273
|
+
t.visibleCount += 50, c(t.filter, n.value, 50);
|
|
2276
2274
|
}
|
|
2277
|
-
async function ye(t,
|
|
2278
|
-
var
|
|
2275
|
+
async function ye(t, L) {
|
|
2276
|
+
var $;
|
|
2279
2277
|
if (!(!t.type && (t.type = E(t.filter), !t.type)))
|
|
2280
2278
|
switch (t.type) {
|
|
2281
2279
|
case Re.String:
|
|
2282
2280
|
try {
|
|
2283
|
-
const
|
|
2284
|
-
if (!
|
|
2281
|
+
const R = N(t.filter);
|
|
2282
|
+
if (!R.length) {
|
|
2285
2283
|
t.options = [];
|
|
2286
2284
|
return;
|
|
2287
2285
|
}
|
|
2288
2286
|
const G = [];
|
|
2289
|
-
for (const
|
|
2290
|
-
const P = await Gt(
|
|
2291
|
-
(P == null ? void 0 : P.type) === A.Table && G.push(...P.rows.map((
|
|
2292
|
-
var
|
|
2293
|
-
return ((
|
|
2287
|
+
for (const M of R) {
|
|
2288
|
+
const P = await Gt(M, L);
|
|
2289
|
+
(P == null ? void 0 : P.type) === A.Table && G.push(...P.rows.map((S) => {
|
|
2290
|
+
var J;
|
|
2291
|
+
return ((J = S.cells) == null ? void 0 : J[0]) ?? " ";
|
|
2294
2292
|
}));
|
|
2295
2293
|
}
|
|
2296
|
-
const re = Array.from(new Set(G)), be = (
|
|
2297
|
-
t.options = ve.map((
|
|
2298
|
-
label: String(
|
|
2299
|
-
value:
|
|
2300
|
-
available: t.keepSelection ?
|
|
2301
|
-
})),
|
|
2302
|
-
} catch (
|
|
2303
|
-
if ((
|
|
2294
|
+
const re = Array.from(new Set(G)), be = ($ = b(t.filter, n.value).selectedValues) != null && $.length ? b(t.filter, n.value).selectedValues : t.selectedValues || [], ve = t.keepSelection ? Array.from(/* @__PURE__ */ new Set([...re, ...be])) : re, ae = new Set(G);
|
|
2295
|
+
t.options = ve.map((M) => ({
|
|
2296
|
+
label: String(M).trim() === "" ? x.value : String(M),
|
|
2297
|
+
value: M,
|
|
2298
|
+
available: t.keepSelection ? ae.has(M) : new Set(re).has(M)
|
|
2299
|
+
})), V(t);
|
|
2300
|
+
} catch (R) {
|
|
2301
|
+
if ((R == null ? void 0 : R.code) === "ERR_CANCELED" || (R == null ? void 0 : R.name) === "CanceledError")
|
|
2304
2302
|
return;
|
|
2305
|
-
throw
|
|
2303
|
+
throw R;
|
|
2306
2304
|
}
|
|
2307
2305
|
break;
|
|
2308
2306
|
case Re.Bool: {
|
|
2309
2307
|
t.options = [
|
|
2310
|
-
{ label: "
|
|
2311
|
-
{ label: "
|
|
2312
|
-
],
|
|
2308
|
+
{ label: a("report.common.yes"), value: !0 },
|
|
2309
|
+
{ label: a("report.common.no"), value: !1 }
|
|
2310
|
+
], V(t);
|
|
2313
2311
|
break;
|
|
2314
2312
|
}
|
|
2315
2313
|
case Re.Timestamp:
|
|
2316
2314
|
if (t.filter.option !== ge.DateTime && t.filter.option !== ge.TimeOfDay) {
|
|
2317
|
-
const
|
|
2318
|
-
t.options = Bt({ dimensionOption:
|
|
2315
|
+
const R = t.filter.option;
|
|
2316
|
+
t.options = Bt({ dimensionOption: R, t: a }), t.filter.values = t.options.length ? t.options.map((G) => G.value) : ["NULL"];
|
|
2319
2317
|
}
|
|
2320
|
-
|
|
2318
|
+
V(t);
|
|
2321
2319
|
break;
|
|
2322
2320
|
case Re.Numeric:
|
|
2323
2321
|
break;
|
|
2324
2322
|
}
|
|
2325
2323
|
}
|
|
2326
|
-
async function
|
|
2324
|
+
async function me(t = !1) {
|
|
2327
2325
|
if (!n.value || !d.value.length) return;
|
|
2328
2326
|
r == null || r.abort();
|
|
2329
|
-
const
|
|
2330
|
-
r =
|
|
2327
|
+
const L = new AbortController();
|
|
2328
|
+
r = L;
|
|
2331
2329
|
try {
|
|
2332
|
-
t || (
|
|
2333
|
-
d.value.map((
|
|
2330
|
+
t || (T.value = !0), F.value = !0, await Promise.all(
|
|
2331
|
+
d.value.map(($) => ye($, L.signal))
|
|
2334
2332
|
);
|
|
2335
2333
|
} finally {
|
|
2336
|
-
r ===
|
|
2334
|
+
r === L && (t || (T.value = !1), F.value = !1);
|
|
2337
2335
|
}
|
|
2338
2336
|
}
|
|
2339
|
-
function
|
|
2340
|
-
var
|
|
2341
|
-
if ((
|
|
2342
|
-
let G = (t.selectedValues || []).filter((re) => re !==
|
|
2337
|
+
function v(t, L) {
|
|
2338
|
+
var R;
|
|
2339
|
+
if ((R = t.selectedValues) == null ? void 0 : R.includes(L)) {
|
|
2340
|
+
let G = (t.selectedValues || []).filter((re) => re !== L && re !== "(EMPTY)");
|
|
2343
2341
|
t.selectedValues = G.length > 0 ? G : ["(EMPTY)"];
|
|
2344
2342
|
} else
|
|
2345
|
-
t.selectedValues = [...(t.selectedValues || []).filter((G) => G !== "(EMPTY)"),
|
|
2346
|
-
|
|
2343
|
+
t.selectedValues = [...(t.selectedValues || []).filter((G) => G !== "(EMPTY)"), L];
|
|
2344
|
+
f(t.filter, n.value, "selectedValues", t.selectedValues);
|
|
2347
2345
|
}
|
|
2348
|
-
function
|
|
2349
|
-
if (
|
|
2346
|
+
function z(t, L) {
|
|
2347
|
+
if (L === null)
|
|
2350
2348
|
t.values = [];
|
|
2351
2349
|
else {
|
|
2352
|
-
const
|
|
2353
|
-
t.values = [
|
|
2350
|
+
const R = Je(L.startDate).tz(p.value).startOf("day").utc().toISOString(), G = Je(L.endDate).tz(p.value).endOf("day").utc().toISOString();
|
|
2351
|
+
t.values = [R, G];
|
|
2354
2352
|
}
|
|
2355
|
-
const
|
|
2356
|
-
|
|
2353
|
+
const $ = d.value.find((R) => R.filter === t);
|
|
2354
|
+
$ && ($.keepSelection = L !== null, f($.filter, n.value, "keepSelection", $.keepSelection));
|
|
2357
2355
|
}
|
|
2358
2356
|
function Y(t) {
|
|
2359
|
-
const
|
|
2360
|
-
return `${a("report.section.filter.selectAll")} (${
|
|
2357
|
+
const L = (t.selectedValues || []).filter(($) => $ !== "(EMPTY)");
|
|
2358
|
+
return `${a("report.section.filter.selectAll")} (${L.length}/${t.options.length})`;
|
|
2361
2359
|
}
|
|
2362
2360
|
function O(t) {
|
|
2363
|
-
const
|
|
2364
|
-
return `${
|
|
2361
|
+
const L = t.options.length, $ = a("report.section.filter.search"), R = a("report.common.results", { count: L });
|
|
2362
|
+
return `${$} (${R})`;
|
|
2365
2363
|
}
|
|
2366
2364
|
function I(t) {
|
|
2367
|
-
var re, be, ve,
|
|
2368
|
-
const
|
|
2365
|
+
var re, be, ve, ae, M;
|
|
2366
|
+
const L = $l(t.filter);
|
|
2369
2367
|
if (t.type === Re.Timestamp) {
|
|
2370
2368
|
const P = ((re = t.filter.values) == null ? void 0 : re.length) === 2;
|
|
2371
2369
|
if (t.filter.option === ge.DateTime)
|
|
2372
|
-
return { preview: P ? `${
|
|
2370
|
+
return { preview: P ? `${L} is between ${Al({
|
|
2373
2371
|
startDate: ((be = t.filter.values) == null ? void 0 : be[0]) || null,
|
|
2374
2372
|
endDate: ((ve = t.filter.values) == null ? void 0 : ve[1]) || null,
|
|
2375
|
-
locale: o.value
|
|
2376
|
-
|
|
2373
|
+
locale: o.value,
|
|
2374
|
+
timezone: p.value
|
|
2375
|
+
})}` : L, suffix: "" };
|
|
2377
2376
|
if (t.filter.option === ge.TimeOfDay) {
|
|
2378
|
-
const
|
|
2379
|
-
return { preview: P ? `${
|
|
2380
|
-
startTime:
|
|
2381
|
-
endTime: J
|
|
2377
|
+
const S = (ae = t.filter.values) != null && ae[0] ? Je(t.filter.values[0]).tz(p.value) : null, J = (M = t.filter.values) != null && M[1] ? Je(t.filter.values[1]).tz(p.value) : null, Q = (te) => te && te.isValid() ? { hour: te.hour(), minute: te.minute() } : null;
|
|
2378
|
+
return { preview: P ? `${L} is between ${Wl({
|
|
2379
|
+
startTime: Q(S),
|
|
2380
|
+
endTime: Q(J),
|
|
2382
2381
|
locale: o.value
|
|
2383
|
-
})}` :
|
|
2382
|
+
})}` : L, suffix: "" };
|
|
2384
2383
|
}
|
|
2385
2384
|
if (t.filter.option !== ge.DateTime && t.filter.option !== ge.TimeOfDay) {
|
|
2386
|
-
const
|
|
2385
|
+
const S = Bt({
|
|
2387
2386
|
dimensionOption: t.filter.option,
|
|
2388
2387
|
t: a
|
|
2389
|
-
}),
|
|
2388
|
+
}), J = new Map(S.map((Z) => [String(Z.value), Z.label])), ce = (t.selectedValues || []).filter((Z) => Z !== "(EMPTY)").map((Z) => J.get(String(Z)) ?? String(Z)), te = ce.map((Z) => Z.length > 20 ? `${Z.slice(0, 20)}…` : Z).join(", ");
|
|
2390
2389
|
return ce.length ? {
|
|
2391
|
-
preview: `${
|
|
2390
|
+
preview: `${L}: ${te}`,
|
|
2392
2391
|
suffix: `(${ce.length} selected)`
|
|
2393
|
-
} : { preview:
|
|
2392
|
+
} : { preview: L, suffix: "" };
|
|
2394
2393
|
}
|
|
2395
2394
|
}
|
|
2396
|
-
const
|
|
2397
|
-
return
|
|
2398
|
-
preview: `${
|
|
2399
|
-
suffix: `(${
|
|
2400
|
-
} : { preview: G, suffix: `${
|
|
2395
|
+
const R = (t.selectedValues || []).filter((P) => P !== "(EMPTY)").map((P) => P === !0 ? a("report.common.yes") || "Yes" : P === !1 ? a("report.common.no") || "No" : String(P).trim() === "" ? x.value : String(P)), G = R.map((P) => P.length > 20 ? `${P.slice(0, 20)}…` : P).join(", ");
|
|
2396
|
+
return R.length ? {
|
|
2397
|
+
preview: `${L}: ${G}`,
|
|
2398
|
+
suffix: `(${R.length} selected)`
|
|
2399
|
+
} : { preview: G, suffix: `${L}` };
|
|
2401
2400
|
}
|
|
2402
2401
|
function H(t) {
|
|
2403
|
-
t.filter.values = [...t.selectedValues || []],
|
|
2402
|
+
t.filter.values = [...t.selectedValues || []], f(t.filter, n.value, "selectedValues", t.selectedValues), document.body.click();
|
|
2404
2403
|
}
|
|
2405
2404
|
function he(t) {
|
|
2406
|
-
t.selectedValues = [...t.filter.values || []],
|
|
2405
|
+
t.selectedValues = [...t.filter.values || []], f(t.filter, n.value, "selectedValues", t.selectedValues), document.body.click();
|
|
2407
2406
|
}
|
|
2408
2407
|
function _e(t) {
|
|
2409
|
-
t.showAdvanced = !t.showAdvanced,
|
|
2408
|
+
t.showAdvanced = !t.showAdvanced, f(t.filter, n.value, "showAdvanced", t.showAdvanced);
|
|
2410
2409
|
}
|
|
2411
2410
|
function Ae(t) {
|
|
2412
|
-
t.keepSelection = !t.keepSelection,
|
|
2411
|
+
t.keepSelection = !t.keepSelection, C(t.keepSelection), f(t.filter, n.value, "keepSelection", t.keepSelection), t.options = [], me(!0);
|
|
2413
2412
|
}
|
|
2414
|
-
function Oe(t,
|
|
2415
|
-
return t ? t.length >
|
|
2413
|
+
function Oe(t, L) {
|
|
2414
|
+
return t ? t.length > L ? `${t.slice(0, L)}…` : t : x.value;
|
|
2416
2415
|
}
|
|
2417
|
-
function
|
|
2418
|
-
var
|
|
2419
|
-
if (
|
|
2416
|
+
function We(t, L) {
|
|
2417
|
+
var R, G, re, be;
|
|
2418
|
+
if (L === null)
|
|
2420
2419
|
t.values = [];
|
|
2421
2420
|
else {
|
|
2422
|
-
const ve = Je().set("hour", Number((
|
|
2423
|
-
t.values = [ve,
|
|
2421
|
+
const ve = Je().tz(p.value).set("hour", Number((R = L.start) == null ? void 0 : R.hour)).set("minute", Number((G = L.start) == null ? void 0 : G.minute)).toISOString(), ae = Je().tz(p.value).set("hour", Number((re = L.end) == null ? void 0 : re.hour)).set("minute", Number((be = L.end) == null ? void 0 : be.minute)).toISOString();
|
|
2422
|
+
t.values = [ve, ae];
|
|
2424
2423
|
}
|
|
2425
|
-
const
|
|
2426
|
-
|
|
2424
|
+
const $ = d.value.find((ve) => ve.filter === t);
|
|
2425
|
+
$ && ($.keepSelection = L !== null, f($.filter, n.value, "keepSelection", $.keepSelection));
|
|
2427
2426
|
}
|
|
2428
|
-
return (t,
|
|
2429
|
-
const
|
|
2430
|
-
return
|
|
2431
|
-
(
|
|
2432
|
-
var
|
|
2433
|
-
return
|
|
2434
|
-
key:
|
|
2427
|
+
return (t, L) => {
|
|
2428
|
+
const $ = B("FmCircularProgress"), R = B("FmTextField"), G = B("FmMenuItem"), re = B("FmTooltip"), be = B("FmIcon"), ve = B("FmMenuDivider"), ae = B("FmSwitch"), M = B("FmButton"), P = B("FmMenu");
|
|
2429
|
+
return W(), ne("div", xa, [
|
|
2430
|
+
(W(!0), ne(xe, null, ut(d.value, (S, J) => {
|
|
2431
|
+
var Q, ce, te, Z, we, ee;
|
|
2432
|
+
return W(), ne("div", {
|
|
2433
|
+
key: S.id
|
|
2435
2434
|
}, [
|
|
2436
|
-
|
|
2435
|
+
S.filter.option === s(ge).DateTime ? (W(), pe(Vl, {
|
|
2437
2436
|
key: 0,
|
|
2438
|
-
"model-value": { startDate: (
|
|
2437
|
+
"model-value": { startDate: (Q = S.filter.values) == null ? void 0 : Q[0], endDate: (ce = S.filter.values) == null ? void 0 : ce[1] },
|
|
2439
2438
|
class: "w-full",
|
|
2440
|
-
label: I(
|
|
2441
|
-
removable: ((
|
|
2442
|
-
onUpdate: (He) =>
|
|
2443
|
-
onChipClosed: () =>
|
|
2444
|
-
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) :
|
|
2439
|
+
label: I(S).preview,
|
|
2440
|
+
removable: ((te = S.filter.values) == null ? void 0 : te.length) === 2,
|
|
2441
|
+
onUpdate: (He) => z(S.filter, He),
|
|
2442
|
+
onChipClosed: () => z(S.filter, null)
|
|
2443
|
+
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : S.filter.option === s(ge).TimeOfDay ? (W(), pe(zl, {
|
|
2445
2444
|
key: 1,
|
|
2446
|
-
"model-value": { start: (Z =
|
|
2445
|
+
"model-value": { start: (Z = S.filter.values) == null ? void 0 : Z[0], end: (we = S.filter.values) == null ? void 0 : we[1] },
|
|
2447
2446
|
class: "w-full",
|
|
2448
|
-
label: I(
|
|
2449
|
-
removable: ((
|
|
2450
|
-
onUpdate: (He) =>
|
|
2451
|
-
onChipClosed: () =>
|
|
2452
|
-
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : (
|
|
2447
|
+
label: I(S).preview,
|
|
2448
|
+
removable: ((ee = S.filter.values) == null ? void 0 : ee.length) === 2,
|
|
2449
|
+
onUpdate: (He) => We(S.filter, He),
|
|
2450
|
+
onChipClosed: () => We(S.filter, null)
|
|
2451
|
+
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : (W(), pe(P, {
|
|
2453
2452
|
key: 2,
|
|
2454
2453
|
"close-on-click": !1,
|
|
2455
2454
|
shift: !0,
|
|
2456
|
-
open: s(
|
|
2455
|
+
open: s(q)(S.id)
|
|
2457
2456
|
}, {
|
|
2458
2457
|
"menu-button": ie(() => [
|
|
2459
2458
|
X("div", Sa, [
|
|
2460
|
-
|
|
2459
|
+
U(El, {
|
|
2461
2460
|
"left-icon": "filter_alt",
|
|
2462
2461
|
"trailing-icon": "expand_more",
|
|
2463
|
-
label: I(
|
|
2462
|
+
label: I(S).preview,
|
|
2464
2463
|
class: "w-full"
|
|
2465
2464
|
}, {
|
|
2466
2465
|
default: ie(() => [
|
|
2467
|
-
yt(De(I(
|
|
2466
|
+
yt(De(I(S).suffix), 1)
|
|
2468
2467
|
]),
|
|
2469
2468
|
_: 2
|
|
2470
2469
|
}, 1032, ["label"])
|
|
@@ -2473,37 +2472,37 @@ const wa = Xt(ba, () => {
|
|
|
2473
2472
|
"menu-wrapper": ie(({ maxHeight: He, width: ct }) => [
|
|
2474
2473
|
X("div", {
|
|
2475
2474
|
class: "flex flex-col bg-fm-color-neutral-white p-2 rounded-lg shadow-light-300",
|
|
2476
|
-
style:
|
|
2475
|
+
style: Ve({ maxHeight: `${He}px`, width: ct })
|
|
2477
2476
|
}, [
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
])) :
|
|
2477
|
+
F.value ? (W(), ne("div", Ca, [
|
|
2478
|
+
U($)
|
|
2479
|
+
])) : S.options.length > 0 && !s(T) ? (W(), ne(xe, { key: 1 }, [
|
|
2481
2480
|
X("div", ka, [
|
|
2482
|
-
|
|
2483
|
-
modelValue:
|
|
2481
|
+
U(R, {
|
|
2482
|
+
modelValue: S.search,
|
|
2484
2483
|
"onUpdate:modelValue": [
|
|
2485
|
-
(se) =>
|
|
2486
|
-
(se) => s(
|
|
2484
|
+
(se) => S.search = se,
|
|
2485
|
+
(se) => s(f)(S.filter, n.value, "search", se)
|
|
2487
2486
|
],
|
|
2488
2487
|
type: "text",
|
|
2489
2488
|
"prepend-icon": "search",
|
|
2490
|
-
placeholder: O(
|
|
2489
|
+
placeholder: O(S),
|
|
2491
2490
|
class: "border px-2 pb-8 text-sm mb-1 rounded"
|
|
2492
2491
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
2493
2492
|
]),
|
|
2494
2493
|
X("div", Ta, [
|
|
2495
2494
|
X("div", _a, [
|
|
2496
|
-
|
|
2497
|
-
label: Y(
|
|
2495
|
+
U(G, {
|
|
2496
|
+
label: Y(S),
|
|
2498
2497
|
"has-checkbox": !0,
|
|
2499
|
-
"model-value": j(
|
|
2498
|
+
"model-value": j(S),
|
|
2500
2499
|
indeterminate: !0,
|
|
2501
|
-
onClick: (se) => ue(
|
|
2500
|
+
onClick: (se) => ue(S)
|
|
2502
2501
|
}, null, 8, ["label", "model-value", "onClick"]),
|
|
2503
|
-
(
|
|
2502
|
+
(W(!0), ne(xe, null, ut(K.value[J], (se) => (W(), ne(xe, {
|
|
2504
2503
|
key: se.value
|
|
2505
2504
|
}, [
|
|
2506
|
-
se.label && se.label.length > 110 ? (
|
|
2505
|
+
se.label && se.label.length > 110 ? (W(), pe(re, {
|
|
2507
2506
|
key: 0,
|
|
2508
2507
|
placement: "right",
|
|
2509
2508
|
"hide-arrow": !0,
|
|
@@ -2514,67 +2513,67 @@ const wa = Xt(ba, () => {
|
|
|
2514
2513
|
]),
|
|
2515
2514
|
default: ie(() => [
|
|
2516
2515
|
X("div", Fa, [
|
|
2517
|
-
|
|
2516
|
+
U(G, {
|
|
2518
2517
|
label: Oe(se.label, 110),
|
|
2519
2518
|
"has-checkbox": !0,
|
|
2520
|
-
"model-value":
|
|
2521
|
-
class:
|
|
2519
|
+
"model-value": S.selectedValues.includes(se.value),
|
|
2520
|
+
class: Qe([
|
|
2522
2521
|
"flex-1 text-left",
|
|
2523
2522
|
{ "bg-gray-200": se.available === !1 }
|
|
2524
2523
|
]),
|
|
2525
|
-
onClick: () =>
|
|
2524
|
+
onClick: () => v(S, se.value)
|
|
2526
2525
|
}, null, 8, ["label", "model-value", "class", "onClick"])
|
|
2527
2526
|
])
|
|
2528
2527
|
]),
|
|
2529
2528
|
_: 2
|
|
2530
|
-
}, 1024)) : (
|
|
2529
|
+
}, 1024)) : (W(), pe(G, {
|
|
2531
2530
|
key: 1,
|
|
2532
2531
|
label: se.label,
|
|
2533
2532
|
"has-checkbox": !0,
|
|
2534
|
-
"model-value":
|
|
2535
|
-
class:
|
|
2536
|
-
onClick: () =>
|
|
2533
|
+
"model-value": S.selectedValues.includes(se.value),
|
|
2534
|
+
class: Qe(["flex-1 text-left", { "bg-gray-100": se.available === !1 }]),
|
|
2535
|
+
onClick: () => v(S, se.value)
|
|
2537
2536
|
}, null, 8, ["label", "model-value", "class", "onClick"]))
|
|
2538
2537
|
], 64))), 128)),
|
|
2539
|
-
K.value[
|
|
2538
|
+
K.value[J].length < S.options.length && !S.search ? (W(), pe(G, {
|
|
2540
2539
|
key: 0,
|
|
2541
2540
|
class: "fm-typo-en-body-md-400 -ml-2",
|
|
2542
2541
|
label: s(a)("report.section.filter.loadMore"),
|
|
2543
|
-
onClick: ht((se) => oe(
|
|
2542
|
+
onClick: ht((se) => oe(S), ["stop"]),
|
|
2544
2543
|
icon: "autorenew"
|
|
2545
2544
|
}, null, 8, ["label", "onClick"])) : ke("", !0)
|
|
2546
2545
|
])
|
|
2547
2546
|
]),
|
|
2548
2547
|
X("div", {
|
|
2549
2548
|
class: "px-12 py-2 flex items-center gap-2 cursor-pointer hover:bg-fm-color-neutral-50 transition-colors",
|
|
2550
|
-
onClick: (se) => _e(
|
|
2549
|
+
onClick: (se) => _e(S)
|
|
2551
2550
|
}, [
|
|
2552
|
-
|
|
2553
|
-
name:
|
|
2551
|
+
U(be, {
|
|
2552
|
+
name: S.showAdvanced ? "keyboard_arrow_up" : "keyboard_arrow_down",
|
|
2554
2553
|
size: "md",
|
|
2555
2554
|
class: ""
|
|
2556
2555
|
}, null, 8, ["name"]),
|
|
2557
2556
|
X("span", Ra, De(s(a)("report.section.filter.advanced")), 1)
|
|
2558
2557
|
], 8, La),
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
X("div",
|
|
2558
|
+
U(ve),
|
|
2559
|
+
S.showAdvanced ? (W(), ne("div", Da, [
|
|
2560
|
+
X("div", za, [
|
|
2562
2561
|
X("div", $a, [
|
|
2563
|
-
|
|
2564
|
-
"model-value":
|
|
2562
|
+
U(ae, {
|
|
2563
|
+
"model-value": S.keepSelection,
|
|
2565
2564
|
label: s(a)("report.section.filter.keepSelection"),
|
|
2566
2565
|
labelPlacement: "right",
|
|
2567
|
-
"onUpdate:modelValue": () => Ae(
|
|
2566
|
+
"onUpdate:modelValue": () => Ae(S)
|
|
2568
2567
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
2569
|
-
|
|
2568
|
+
U(re, {
|
|
2570
2569
|
placement: "top",
|
|
2571
2570
|
"z-index": 2e3
|
|
2572
2571
|
}, {
|
|
2573
2572
|
content: ie(() => [
|
|
2574
|
-
X("div",
|
|
2573
|
+
X("div", Va, De(s(a)("report.section.filter.keepSelectionTooltip")), 1)
|
|
2575
2574
|
]),
|
|
2576
2575
|
default: ie(() => [
|
|
2577
|
-
|
|
2576
|
+
U(be, {
|
|
2578
2577
|
name: "info",
|
|
2579
2578
|
size: "md",
|
|
2580
2579
|
class: "text-fm-color-primary"
|
|
@@ -2585,26 +2584,26 @@ const wa = Xt(ba, () => {
|
|
|
2585
2584
|
])
|
|
2586
2585
|
])
|
|
2587
2586
|
])) : ke("", !0),
|
|
2588
|
-
X("div",
|
|
2589
|
-
|
|
2587
|
+
X("div", Ea, [
|
|
2588
|
+
U(M, {
|
|
2590
2589
|
variant: "tertiary",
|
|
2591
2590
|
label: s(a)("report.common.cancel"),
|
|
2592
|
-
onClick: ht((se) => he(
|
|
2591
|
+
onClick: ht((se) => he(S), ["stop"])
|
|
2593
2592
|
}, null, 8, ["label", "onClick"]),
|
|
2594
|
-
|
|
2593
|
+
U(M, {
|
|
2595
2594
|
color: "primary",
|
|
2596
|
-
onClick: ht((se) => H(
|
|
2595
|
+
onClick: ht((se) => H(S), ["stop"]),
|
|
2597
2596
|
label: s(a)("report.common.apply")
|
|
2598
2597
|
}, null, 8, ["onClick", "label"])
|
|
2599
2598
|
])
|
|
2600
|
-
], 64)) : s(
|
|
2599
|
+
], 64)) : s(T) ? ke("", !0) : (W(), pe(wt, { key: 2 }))
|
|
2601
2600
|
], 4)
|
|
2602
2601
|
]),
|
|
2603
2602
|
_: 2
|
|
2604
2603
|
}, 1032, ["open"]))
|
|
2605
2604
|
]);
|
|
2606
2605
|
}), 128)),
|
|
2607
|
-
|
|
2606
|
+
Me(t.$slots, "default")
|
|
2608
2607
|
]);
|
|
2609
2608
|
};
|
|
2610
2609
|
}
|