@feedmepos/mf-report 5.19.8-beta.1 → 5.19.8-beta.2
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-wKSrJzZW.js → App-C1LB_Ksr.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DiBpQb7o.js → DynamicWidget.vue_vue_type_script_setup_true_lang-D_bXyyNL.js} +524 -523
- package/dist/{OverviewView-DlLFc9e_.js → OverviewView-BUtFTF9C.js} +1 -1
- package/dist/{ReportEditor-Dzj_gg3s.js → ReportEditor-BekjtFjn.js} +2 -2
- package/dist/{ReportView-CmErSwKu.js → ReportView-DgpQQiQ7.js} +1 -1
- package/dist/{TileEditor-BxxjJuUG.js → TileEditor-BslLk145.js} +2 -2
- package/dist/{TransitionFade-CfY9Tv9a.js → TransitionFade-B9nowM3U.js} +1 -1
- package/dist/app.js +5 -5
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { W as
|
|
1
|
+
import { computed as f, defineComponent as ne, mergeModels as he, useModel as se, ref as u, onMounted as we, nextTick as J, watch as G, resolveComponent as H, createElementBlock as U, openBlock as W, Fragment as ue, renderSlot as xe, createVNode as B, normalizeStyle as de, unref as o, createElementVNode as M, toDisplayString as We, withCtx as Y, createBlock as j, createCommentVNode as be, normalizeClass as Me, h as Be, renderList as _t, toRaw as ea, markRaw as ta, createTextVNode as aa, onUnmounted as la, resolveDynamicComponent as oa, withDirectives as na, vShow as sa } from "vue";
|
|
2
|
+
import { W as _, d as Ve, e as ra, S as De, v as Ie, f as ia, g as je, h as Ft, q as ca, R as Fe, i as ua } from "./BaseDialog.vue_vue_type_script_setup_true_lang-Wsp8VGv0.js";
|
|
3
3
|
import { u as Ne, b as ot, a as nt } from "./vue-i18n-B-WkKyGH.js";
|
|
4
4
|
import { a as Ct } from "./helper-BYQmOCI_.js";
|
|
5
5
|
import { storeToRefs as Ee, defineStore as da } from "pinia";
|
|
@@ -7,11 +7,11 @@ import { useBreakpoints as Rt, useSnackbar as st, components as ha } from "@feed
|
|
|
7
7
|
import { a as ma } from "./SelectComponent.vue_vue_type_script_setup_true_lang-wbYOXNgr.js";
|
|
8
8
|
import { r as Re } from "./i18n-Cif1I9J2.js";
|
|
9
9
|
import { _ as St } from "./NoData.vue_vue_type_script_setup_true_lang-CAGjM94B.js";
|
|
10
|
-
var Ze = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(Ze || {}),
|
|
11
|
-
|
|
10
|
+
var Ze = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(Ze || {}), ye = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(ye || {}), Qe = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Qe || {}), et = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(et || {}), tt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(tt || {}), at = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(at || {}), lt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(lt || {});
|
|
11
|
+
_.Circular, _.Table, _.BarChart, _.LineChart, _.StackBarChart, _.StackLineChart, _.Scorecard, _.Spacer;
|
|
12
12
|
const pa = [
|
|
13
13
|
{
|
|
14
|
-
type:
|
|
14
|
+
type: _.Circular,
|
|
15
15
|
showLabel: !1,
|
|
16
16
|
// TODO: temporarily removed show label as it has no function
|
|
17
17
|
showDrillDimension: !0,
|
|
@@ -19,14 +19,14 @@ const pa = [
|
|
|
19
19
|
showSearchBar: !1
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
type:
|
|
22
|
+
type: _.Table,
|
|
23
23
|
showLabel: !1,
|
|
24
24
|
showDrillDimension: !0,
|
|
25
25
|
showRollup: !0,
|
|
26
26
|
showSearchBar: !0
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
|
-
type:
|
|
29
|
+
type: _.BarChart,
|
|
30
30
|
showLabel: !1,
|
|
31
31
|
// TODO: temporarily removed show label as it has no function
|
|
32
32
|
showDrillDimension: !0,
|
|
@@ -34,7 +34,7 @@ const pa = [
|
|
|
34
34
|
showSearchBar: !1
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
type:
|
|
37
|
+
type: _.LineChart,
|
|
38
38
|
showLabel: !1,
|
|
39
39
|
// TODO: temporarily removed show label as it has no function
|
|
40
40
|
showDrillDimension: !0,
|
|
@@ -42,7 +42,7 @@ const pa = [
|
|
|
42
42
|
showSearchBar: !1
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
type:
|
|
45
|
+
type: _.StackBarChart,
|
|
46
46
|
showLabel: !1,
|
|
47
47
|
// TODO: temporarily removed show label as it has no function
|
|
48
48
|
showDrillDimension: !0,
|
|
@@ -50,7 +50,7 @@ const pa = [
|
|
|
50
50
|
showSearchBar: !1
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
type:
|
|
53
|
+
type: _.StackLineChart,
|
|
54
54
|
showLabel: !1,
|
|
55
55
|
// TODO: temporarily removed show label as it has no function
|
|
56
56
|
showDrillDimension: !0,
|
|
@@ -58,14 +58,14 @@ const pa = [
|
|
|
58
58
|
showSearchBar: !1
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
type:
|
|
61
|
+
type: _.Scorecard,
|
|
62
62
|
showLabel: !1,
|
|
63
63
|
showDrillDimension: !1,
|
|
64
64
|
showRollup: !1,
|
|
65
65
|
showSearchBar: !1
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
type:
|
|
68
|
+
type: _.Spacer,
|
|
69
69
|
showLabel: !1,
|
|
70
70
|
showDrillDimension: !1,
|
|
71
71
|
showRollup: !1,
|
|
@@ -78,18 +78,18 @@ function Je(e) {
|
|
|
78
78
|
}
|
|
79
79
|
function fa(e, n) {
|
|
80
80
|
switch (e) {
|
|
81
|
-
case
|
|
82
|
-
case
|
|
83
|
-
case
|
|
84
|
-
case
|
|
81
|
+
case _.BarChart:
|
|
82
|
+
case _.LineChart:
|
|
83
|
+
case _.StackBarChart:
|
|
84
|
+
case _.StackLineChart:
|
|
85
85
|
return Array.isArray(n == null ? void 0 : n.datasets) && Array.isArray(n == null ? void 0 : n.xAxis) && n.datasets.length > 0 && n.xAxis.length > 0;
|
|
86
|
-
case
|
|
86
|
+
case _.Table:
|
|
87
87
|
return Array.isArray(n == null ? void 0 : n.rows) && Array.isArray(n == null ? void 0 : n.columns) && n.rows.length > 0 && n.columns.length > 0;
|
|
88
|
-
case
|
|
88
|
+
case _.Circular:
|
|
89
89
|
return Array.isArray(n == null ? void 0 : n.datasets) && n.datasets.length > 0;
|
|
90
|
-
case
|
|
90
|
+
case _.Scorecard:
|
|
91
91
|
return !0;
|
|
92
|
-
case
|
|
92
|
+
case _.Spacer:
|
|
93
93
|
return !0;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -115,24 +115,24 @@ const kt = [
|
|
|
115
115
|
"155, 80, 70"
|
|
116
116
|
//9B5046
|
|
117
117
|
];
|
|
118
|
-
function
|
|
118
|
+
function oe({
|
|
119
119
|
index: e,
|
|
120
120
|
isCompare: n,
|
|
121
|
-
opacity:
|
|
121
|
+
opacity: m
|
|
122
122
|
}) {
|
|
123
|
-
let t = typeof
|
|
123
|
+
let t = typeof m == "number" ? m : 1;
|
|
124
124
|
return n && (t = t * 0.6), `rgba(${kt[e % kt.length]}, ${t})`;
|
|
125
125
|
}
|
|
126
|
-
function zt(e, n,
|
|
126
|
+
function zt(e, n, m) {
|
|
127
127
|
if (e === "" || n === "")
|
|
128
128
|
return null;
|
|
129
|
-
let t = (
|
|
130
|
-
|
|
131
|
-
const w = Number(t(e)),
|
|
132
|
-
if (isNaN(w) || isNaN(
|
|
129
|
+
let t = (F) => F == null ? void 0 : F.replace(/,/g, "");
|
|
130
|
+
m === "ID" && (t = (F) => F == null ? void 0 : F.replace(/\./g, "").replace(/,/g, "."));
|
|
131
|
+
const w = Number(t(e)), R = Number(t(n));
|
|
132
|
+
if (isNaN(w) || isNaN(R))
|
|
133
133
|
return null;
|
|
134
134
|
let C = 0;
|
|
135
|
-
|
|
135
|
+
R === 0 ? w === 0 ? C = 0 : C = 1 : C = (w - R) / R;
|
|
136
136
|
const S = va(C);
|
|
137
137
|
return {
|
|
138
138
|
value: isNaN(C) ? "" : `${(C * 100).toFixed(0)}%`,
|
|
@@ -160,12 +160,12 @@ function He(e) {
|
|
|
160
160
|
const r = "…";
|
|
161
161
|
let x = 0, b = c.length;
|
|
162
162
|
for (; x < b; ) {
|
|
163
|
-
const
|
|
164
|
-
s.measureText(
|
|
163
|
+
const v = Math.floor((x + b) / 2), h = c.slice(0, v) + r;
|
|
164
|
+
s.measureText(h).width <= i ? x = v + 1 : b = v;
|
|
165
165
|
}
|
|
166
166
|
return c.slice(0, x - 1) + r;
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const m = f(() => ({
|
|
169
169
|
display: e.showLabel,
|
|
170
170
|
align: e.labelAlign,
|
|
171
171
|
anchor: e.labelAnchor,
|
|
@@ -179,7 +179,7 @@ function He(e) {
|
|
|
179
179
|
return c.borderColor ? Array.isArray(c.borderColor) ? c.borderColor[s.dataIndex] : c.borderColor : c.backgroundColor ? Array.isArray(c.backgroundColor) ? c.backgroundColor[s.dataIndex] : c.backgroundColor : "#000";
|
|
180
180
|
},
|
|
181
181
|
formatter: (s) => s === 0 ? "" : s.toLocaleString("en-US")
|
|
182
|
-
})), t =
|
|
182
|
+
})), t = f(() => ({
|
|
183
183
|
display: e.showX,
|
|
184
184
|
position: e.xPosition,
|
|
185
185
|
grid: {
|
|
@@ -192,10 +192,10 @@ function He(e) {
|
|
|
192
192
|
let i = String(s);
|
|
193
193
|
const r = this;
|
|
194
194
|
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(s));
|
|
195
|
-
const x = r == null ? void 0 : r.chart, b = r == null ? void 0 : r.ctx,
|
|
196
|
-
if (b &&
|
|
195
|
+
const x = r == null ? void 0 : r.chart, b = r == null ? void 0 : r.ctx, v = x.height * 0.25;
|
|
196
|
+
if (b && v > 0) {
|
|
197
197
|
b.save();
|
|
198
|
-
const L = b.measureText(i).width >
|
|
198
|
+
const L = b.measureText(i).width > v ? n(b, i, v) : i;
|
|
199
199
|
return b.restore(), L;
|
|
200
200
|
}
|
|
201
201
|
return i;
|
|
@@ -223,7 +223,7 @@ function He(e) {
|
|
|
223
223
|
s.height > c && (s.height = c);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
})), w =
|
|
226
|
+
})), w = f(() => ({
|
|
227
227
|
display: e.showY,
|
|
228
228
|
position: e.yPosition,
|
|
229
229
|
grid: {
|
|
@@ -239,10 +239,10 @@ function He(e) {
|
|
|
239
239
|
let i = String(s);
|
|
240
240
|
const r = this;
|
|
241
241
|
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(s));
|
|
242
|
-
const x = r == null ? void 0 : r.chart, b = r == null ? void 0 : r.ctx,
|
|
243
|
-
if (b &&
|
|
242
|
+
const x = r == null ? void 0 : r.chart, b = r == null ? void 0 : r.ctx, v = x.width * 0.4;
|
|
243
|
+
if (b && v > 0) {
|
|
244
244
|
b.save();
|
|
245
|
-
const L = b.measureText(i).width >
|
|
245
|
+
const L = b.measureText(i).width > v ? n(b, i, v) : i;
|
|
246
246
|
return b.restore(), L;
|
|
247
247
|
}
|
|
248
248
|
return i;
|
|
@@ -255,7 +255,7 @@ function He(e) {
|
|
|
255
255
|
size: e.yTitleFontSize
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
})),
|
|
258
|
+
})), R = f(() => ({
|
|
259
259
|
display: e.showLegend,
|
|
260
260
|
position: e.legendPosition,
|
|
261
261
|
usePointStyle: e.usePointStyle,
|
|
@@ -269,16 +269,16 @@ function He(e) {
|
|
|
269
269
|
if (c.length === 0) return [];
|
|
270
270
|
if (c.length === 1 && Array.isArray(c[0].backgroundColor) && c[0].backgroundColor.length > 1 && Array.isArray(c[0].data)) {
|
|
271
271
|
const r = c[0];
|
|
272
|
-
return s.data.labels.map((b,
|
|
273
|
-
const
|
|
272
|
+
return s.data.labels.map((b, v) => {
|
|
273
|
+
const h = r.backgroundColor[v];
|
|
274
274
|
return {
|
|
275
275
|
text: b,
|
|
276
276
|
fontColor: "#6b6b6b",
|
|
277
|
-
fillStyle:
|
|
278
|
-
strokeStyle:
|
|
277
|
+
fillStyle: h,
|
|
278
|
+
strokeStyle: h,
|
|
279
279
|
datasetIndex: 0,
|
|
280
|
-
index:
|
|
281
|
-
hidden: s.getDataVisibility ? !s.getDataVisibility(
|
|
280
|
+
index: v,
|
|
281
|
+
hidden: s.getDataVisibility ? !s.getDataVisibility(v) : !1
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
284
|
}
|
|
@@ -295,10 +295,10 @@ function He(e) {
|
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
})), C =
|
|
299
|
-
return { datalabels:
|
|
298
|
+
})), C = f(() => e.isTransposed), S = f(() => e.chartWidth), F = f(() => e.chartHeight);
|
|
299
|
+
return { datalabels: m, xCfg: t, yCfg: w, isTransposed: C, legend: R, chartWidth: S, chartHeight: F };
|
|
300
300
|
}
|
|
301
|
-
const ga = /* @__PURE__ */
|
|
301
|
+
const ga = /* @__PURE__ */ ne({
|
|
302
302
|
__name: "WidgetBarchart",
|
|
303
303
|
props: /* @__PURE__ */ he({
|
|
304
304
|
tileIndex: {}
|
|
@@ -308,43 +308,43 @@ const ga = /* @__PURE__ */ le({
|
|
|
308
308
|
}),
|
|
309
309
|
emits: ["update:modelValue"],
|
|
310
310
|
setup(e) {
|
|
311
|
-
const n = e,
|
|
312
|
-
var
|
|
313
|
-
return ((
|
|
314
|
-
}),
|
|
315
|
-
var
|
|
316
|
-
return ((
|
|
317
|
-
}), { datalabels: C, xCfg: S, yCfg:
|
|
318
|
-
|
|
319
|
-
), x =
|
|
320
|
-
...
|
|
321
|
-
label:
|
|
322
|
-
data:
|
|
323
|
-
dash: !!
|
|
324
|
-
backgroundColor:
|
|
311
|
+
const n = e, m = se(e, "modelValue"), t = u(null), w = f(() => {
|
|
312
|
+
var h;
|
|
313
|
+
return ((h = m.value.data) == null ? void 0 : h.xAxis) ?? [];
|
|
314
|
+
}), R = f(() => {
|
|
315
|
+
var h;
|
|
316
|
+
return ((h = m.value.data) == null ? void 0 : h.datasets) ?? [];
|
|
317
|
+
}), { datalabels: C, xCfg: S, yCfg: F, isTransposed: s, legend: c, chartWidth: i, chartHeight: r } = He(
|
|
318
|
+
m.value
|
|
319
|
+
), x = f(() => R.value.length > 0 ? [
|
|
320
|
+
...R.value.map((h, L) => ({
|
|
321
|
+
label: h.name,
|
|
322
|
+
data: h.values,
|
|
323
|
+
dash: !!h.isCompare,
|
|
324
|
+
backgroundColor: oe({ index: L, isCompare: h.isCompare })
|
|
325
325
|
}))
|
|
326
326
|
] : []), b = Ve();
|
|
327
|
-
function
|
|
327
|
+
function v() {
|
|
328
328
|
return b.extractChartSize(t.value, n.tileIndex) || { width: 0, height: 0 };
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return we(() => {
|
|
331
331
|
J(() => {
|
|
332
|
-
|
|
332
|
+
v();
|
|
333
333
|
});
|
|
334
334
|
}), G([x], () => {
|
|
335
|
-
J(() =>
|
|
336
|
-
}), (
|
|
337
|
-
const
|
|
335
|
+
J(() => v());
|
|
336
|
+
}), (h, L) => {
|
|
337
|
+
const d = H("FmBarChart");
|
|
338
338
|
return W(), U(ue, null, [
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
xe(h.$slots, "menu"),
|
|
340
|
+
B(d, {
|
|
341
341
|
ref_key: "chartRef",
|
|
342
342
|
ref: t,
|
|
343
343
|
class: "bar-chart",
|
|
344
344
|
datasets: x.value,
|
|
345
345
|
"x-axis": { categories: w.value },
|
|
346
346
|
"x-cfg": o(S),
|
|
347
|
-
"y-cfg": o(
|
|
347
|
+
"y-cfg": o(F),
|
|
348
348
|
transpose: o(s),
|
|
349
349
|
legend: {
|
|
350
350
|
display: o(c).display ?? !1,
|
|
@@ -363,7 +363,7 @@ const ga = /* @__PURE__ */ le({
|
|
|
363
363
|
], 64);
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
|
-
}), ya = /* @__PURE__ */
|
|
366
|
+
}), ya = /* @__PURE__ */ ne({
|
|
367
367
|
__name: "WidgetCircular",
|
|
368
368
|
props: /* @__PURE__ */ he({
|
|
369
369
|
tileIndex: {}
|
|
@@ -373,38 +373,38 @@ const ga = /* @__PURE__ */ le({
|
|
|
373
373
|
}),
|
|
374
374
|
emits: ["update:modelValue"],
|
|
375
375
|
setup(e) {
|
|
376
|
-
const n = e,
|
|
376
|
+
const n = e, m = se(e, "modelValue"), { breakpoints: t } = Rt(), w = u(null), { datalabels: R, legend: C, chartWidth: S, chartHeight: F } = He(m.value), s = f(() => {
|
|
377
377
|
let x = [];
|
|
378
|
-
return
|
|
378
|
+
return m.value.data.datasets && m.value.data.metrics && m.value.data.datasets.length > 0 && m.value.data.metrics.length > 0 && (x = [
|
|
379
379
|
{
|
|
380
|
-
label:
|
|
381
|
-
data:
|
|
382
|
-
backgroundColor:
|
|
380
|
+
label: m.value.data.metrics[0],
|
|
381
|
+
data: m.value.data.datasets.map((b) => b.value),
|
|
382
|
+
backgroundColor: m.value.data.datasets.map((b, v) => oe({ index: v }))
|
|
383
383
|
}
|
|
384
384
|
]), x;
|
|
385
385
|
}), c = Ve();
|
|
386
386
|
function i() {
|
|
387
387
|
return c.extractChartSize(w.value, n.tileIndex) || { width: 0, height: 0 };
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
we(() => {
|
|
390
390
|
J(() => {
|
|
391
391
|
i();
|
|
392
392
|
});
|
|
393
393
|
}), G([s], () => {
|
|
394
394
|
J(() => i());
|
|
395
395
|
});
|
|
396
|
-
const r =
|
|
396
|
+
const r = f(() => t.value.lg ? 12 : 8);
|
|
397
397
|
return (x, b) => {
|
|
398
|
-
const
|
|
398
|
+
const v = H("FmPieChart");
|
|
399
399
|
return W(), U(ue, null, [
|
|
400
|
-
|
|
401
|
-
|
|
400
|
+
xe(x.$slots, "menu"),
|
|
401
|
+
B(v, {
|
|
402
402
|
ref_key: "chartRef",
|
|
403
403
|
ref: w,
|
|
404
404
|
class: "circular",
|
|
405
405
|
percentage: "70%",
|
|
406
406
|
datasets: s.value,
|
|
407
|
-
metrics:
|
|
407
|
+
metrics: m.value.data.datasets.map((h) => h.name),
|
|
408
408
|
variant: "doughnut",
|
|
409
409
|
legend: {
|
|
410
410
|
display: o(C).display ?? !0,
|
|
@@ -418,17 +418,17 @@ const ga = /* @__PURE__ */ le({
|
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
420
|
},
|
|
421
|
-
datalabels: o(
|
|
421
|
+
datalabels: o(R),
|
|
422
422
|
"maintain-aspect-ratio": !1,
|
|
423
423
|
style: de({
|
|
424
424
|
"--chart-width": o(S) !== void 0 ? o(S) + "px" : "100%",
|
|
425
|
-
"--chart-height": o(
|
|
425
|
+
"--chart-height": o(F) !== void 0 ? o(F) + "px" : "calc(100% - 36px)"
|
|
426
426
|
})
|
|
427
427
|
}, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
|
|
428
428
|
], 64);
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
}), ba = { class: "flex flex-col gap-1" }, wa = { class: "fm-typo-en-title-sm-600" }, xa = { class: "flex gap-2" }, Ca = { key: 0 }, Sa = { key: 1 }, ka = /* @__PURE__ */
|
|
431
|
+
}), ba = { class: "flex flex-col gap-1" }, wa = { class: "fm-typo-en-title-sm-600" }, xa = { class: "flex gap-2" }, Ca = { key: 0 }, Sa = { key: 1 }, ka = /* @__PURE__ */ ne({
|
|
432
432
|
__name: "WidgetScorecard",
|
|
433
433
|
props: {
|
|
434
434
|
modelValue: { required: !0 },
|
|
@@ -436,14 +436,14 @@ const ga = /* @__PURE__ */ le({
|
|
|
436
436
|
},
|
|
437
437
|
emits: ["update:modelValue"],
|
|
438
438
|
setup(e) {
|
|
439
|
-
const n =
|
|
439
|
+
const n = se(e, "modelValue"), { t: m } = Ne(), { compareDateRange: t, defaultDateSetting: w } = Ee(ot()), { country: R } = nt(), C = f(() => {
|
|
440
440
|
var i;
|
|
441
441
|
return ((i = n.value.data) == null ? void 0 : i.value) || "";
|
|
442
|
-
}), S =
|
|
442
|
+
}), S = f(() => {
|
|
443
443
|
const { data: i } = n.value;
|
|
444
|
-
return i != null && i.comparison ? zt(C.value, i.comparison,
|
|
444
|
+
return i != null && i.comparison ? zt(C.value, i.comparison, R) : null;
|
|
445
445
|
});
|
|
446
|
-
function
|
|
446
|
+
function F(i) {
|
|
447
447
|
switch (i) {
|
|
448
448
|
case Ze.bar:
|
|
449
449
|
return "bar";
|
|
@@ -453,10 +453,10 @@ const ga = /* @__PURE__ */ le({
|
|
|
453
453
|
return "line";
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
const s =
|
|
456
|
+
const s = f(() => {
|
|
457
457
|
var i;
|
|
458
458
|
return (i = n.value.data) == null ? void 0 : i.sparkline;
|
|
459
|
-
}), c =
|
|
459
|
+
}), c = f(() => s.value.datasets.map((i) => ({
|
|
460
460
|
label: i.name,
|
|
461
461
|
data: i.values,
|
|
462
462
|
fill: !0,
|
|
@@ -464,12 +464,12 @@ const ga = /* @__PURE__ */ le({
|
|
|
464
464
|
})));
|
|
465
465
|
return (i, r) => {
|
|
466
466
|
var L;
|
|
467
|
-
const x =
|
|
467
|
+
const x = H("FmIcon"), b = H("FmChip"), v = H("FmTooltip"), h = H("FmLineChart");
|
|
468
468
|
return W(), U("div", ba, [
|
|
469
|
-
|
|
470
|
-
M("p", wa,
|
|
469
|
+
xe(i.$slots, "menu"),
|
|
470
|
+
M("p", wa, We(C.value), 1),
|
|
471
471
|
M("div", xa, [
|
|
472
|
-
|
|
472
|
+
B(v, {
|
|
473
473
|
content: `vs. ${(L = o(w).defaultCompareType) == null ? void 0 : L.split("_").join(" ")}`,
|
|
474
474
|
placement: "right",
|
|
475
475
|
"hide-arrow": "",
|
|
@@ -483,36 +483,36 @@ const ga = /* @__PURE__ */ le({
|
|
|
483
483
|
compact: ""
|
|
484
484
|
}, {
|
|
485
485
|
default: Y(() => [
|
|
486
|
-
|
|
486
|
+
B(x, {
|
|
487
487
|
name: S.value.icon.name,
|
|
488
488
|
color: S.value.icon.color
|
|
489
489
|
}, null, 8, ["name", "color"]),
|
|
490
490
|
M("p", {
|
|
491
491
|
class: "fm-typo-en-body-md-600",
|
|
492
492
|
style: de({ color: S.value.icon.color })
|
|
493
|
-
},
|
|
493
|
+
}, We(S.value.value), 5)
|
|
494
494
|
]),
|
|
495
495
|
_: 1
|
|
496
|
-
}, 8, ["icon", "class"])) :
|
|
496
|
+
}, 8, ["icon", "class"])) : be("", !0),
|
|
497
497
|
o(t).endDate !== null && o(t).startDate !== null && S.value === null ? (W(), j(b, {
|
|
498
498
|
key: 1,
|
|
499
499
|
compact: ""
|
|
500
500
|
}, {
|
|
501
501
|
default: Y(() => [
|
|
502
|
-
|
|
502
|
+
B(x, {
|
|
503
503
|
name: "arrow_upward",
|
|
504
504
|
color: "#C7C7CC"
|
|
505
505
|
}),
|
|
506
506
|
r[0] || (r[0] = M("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
|
-
})) :
|
|
509
|
+
})) : be("", !0)
|
|
510
510
|
]),
|
|
511
511
|
_: 1
|
|
512
512
|
}, 8, ["content"])
|
|
513
513
|
]),
|
|
514
514
|
s.value ? (W(), U("div", Ca, [
|
|
515
|
-
|
|
515
|
+
F(s.value.type) === "line" ? (W(), j(h, {
|
|
516
516
|
key: 0,
|
|
517
517
|
class: "sparkline",
|
|
518
518
|
datasets: c.value,
|
|
@@ -524,7 +524,7 @@ const ga = /* @__PURE__ */ le({
|
|
|
524
524
|
"y-cfg": { display: !1 },
|
|
525
525
|
"x-cfg": { display: !1 },
|
|
526
526
|
"maintain-aspect-ratio": !1
|
|
527
|
-
}, null, 8, ["datasets", "x-axis"])) :
|
|
527
|
+
}, null, 8, ["datasets", "x-axis"])) : be("", !0)
|
|
528
528
|
])) : (W(), U("div", Sa, r[1] || (r[1] = [
|
|
529
529
|
M("div", { class: "sparkline" }, [
|
|
530
530
|
M("div", { class: "flex flex-col gap-8" }, [
|
|
@@ -539,153 +539,153 @@ const ga = /* @__PURE__ */ le({
|
|
|
539
539
|
}
|
|
540
540
|
}), Ta = {};
|
|
541
541
|
function _a(e, n) {
|
|
542
|
-
const
|
|
543
|
-
return W(), j(
|
|
542
|
+
const m = H("FmMenuDivider");
|
|
543
|
+
return W(), j(m);
|
|
544
544
|
}
|
|
545
545
|
const Fa = /* @__PURE__ */ ma(Ta, [["render", _a]]), Ra = "mf-reporttable-dimension", Tt = da(Ra, () => {
|
|
546
|
-
const e =
|
|
547
|
-
e.value =
|
|
548
|
-
}, w = (
|
|
549
|
-
n[
|
|
550
|
-
},
|
|
551
|
-
const y = (l == null ? void 0 : l.querySelectorAll("thead tr")) ?? [],
|
|
552
|
-
[...y, ...
|
|
553
|
-
const $ =
|
|
554
|
-
$ && ($.style.height = `${
|
|
546
|
+
const e = u(0), n = u([]), m = u(!1), t = (d, l) => {
|
|
547
|
+
e.value = d, R(d, l);
|
|
548
|
+
}, w = (d, l, y, g) => {
|
|
549
|
+
n[d] = l, n.value = [...n.value], C(d, l, y, g);
|
|
550
|
+
}, R = (d, l) => {
|
|
551
|
+
const y = (l == null ? void 0 : l.querySelectorAll("thead tr")) ?? [], g = (l == null ? void 0 : l.querySelectorAll("tbody tr")) ?? [];
|
|
552
|
+
[...y, ...g].forEach((V) => {
|
|
553
|
+
const $ = V;
|
|
554
|
+
$ && ($.style.height = `${d}px`);
|
|
555
555
|
});
|
|
556
|
-
}, C = (
|
|
556
|
+
}, C = (d, l, y, g = !1) => {
|
|
557
557
|
const k = (y == null ? void 0 : y.querySelectorAll("th")) ?? [];
|
|
558
|
-
if (
|
|
559
|
-
const
|
|
560
|
-
if (!
|
|
561
|
-
const
|
|
562
|
-
|
|
558
|
+
if (d === void 0) return;
|
|
559
|
+
const V = k[d], $ = g ? n[d] : l;
|
|
560
|
+
if (!V || $ === void 0) return;
|
|
561
|
+
const P = () => {
|
|
562
|
+
V.style.width = `${$}px`;
|
|
563
563
|
};
|
|
564
|
-
|
|
564
|
+
g ? requestAnimationFrame(P) : P();
|
|
565
565
|
}, S = () => {
|
|
566
|
-
const
|
|
567
|
-
y == null || y.classList.add("table-fixed"),
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
|
|
566
|
+
const d = document.querySelectorAll("th"), l = document.querySelectorAll("td"), y = document.querySelector("table");
|
|
567
|
+
y == null || y.classList.add("table-fixed"), d.forEach((g) => g.classList.add("toggleEditResize")), l.forEach((g) => g.classList.add("toggleEditResize")), m.value = !0;
|
|
568
|
+
}, F = () => {
|
|
569
|
+
const d = document.querySelectorAll("th"), l = document.querySelectorAll("td"), y = document.querySelectorAll(".col-resize-handle"), g = document.querySelectorAll(".row-resize-handle");
|
|
570
|
+
d.forEach((k) => k.classList.remove("toggleEditResize")), l.forEach((k) => k.classList.remove("toggleEditResize")), y.forEach((k) => k.remove()), g.forEach((k) => k.remove()), m.value = !1;
|
|
571
571
|
}, s = () => {
|
|
572
572
|
e.value = 0, n.value = [];
|
|
573
|
-
}, c = (
|
|
573
|
+
}, c = (d, l) => {
|
|
574
574
|
if (l) {
|
|
575
|
-
const y = document.querySelectorAll(`thead th:nth-child(${
|
|
576
|
-
[...y, ...
|
|
575
|
+
const y = document.querySelectorAll(`thead th:nth-child(${d + 1})`), g = document.querySelectorAll(`tbody td:nth-child(${d + 1})`);
|
|
576
|
+
[...y, ...g].forEach((k) => {
|
|
577
577
|
k.classList.add("highlight-hover-col");
|
|
578
578
|
});
|
|
579
579
|
} else
|
|
580
580
|
document.querySelectorAll(
|
|
581
|
-
`thead th:nth-child(${
|
|
581
|
+
`thead th:nth-child(${d + 1}), tbody td:nth-child(${d + 1})`
|
|
582
582
|
).forEach((y) => y.classList.add("highlight-col"));
|
|
583
|
-
}, i = (
|
|
584
|
-
const l = document.querySelectorAll("thead tr"), y = document.querySelectorAll("tbody tr"),
|
|
585
|
-
for (const k of
|
|
586
|
-
|
|
587
|
-
}, r = (
|
|
588
|
-
const l =
|
|
589
|
-
for (const
|
|
590
|
-
|
|
591
|
-
}, x = (
|
|
592
|
-
|
|
583
|
+
}, i = (d) => {
|
|
584
|
+
const l = document.querySelectorAll("thead tr"), y = document.querySelectorAll("tbody tr"), g = [...l, ...y];
|
|
585
|
+
for (const k of g)
|
|
586
|
+
d ? k.classList.add("highlight-hover-row") : k.classList.add("highlight-row");
|
|
587
|
+
}, r = (d) => {
|
|
588
|
+
const l = d ? ".highlight-hover-row" : ".highlight-row", y = document.querySelectorAll(l);
|
|
589
|
+
for (const g of y)
|
|
590
|
+
g.classList.remove(l.slice(1));
|
|
591
|
+
}, x = (d) => {
|
|
592
|
+
d ? document.querySelectorAll(".highlight-hover-col").forEach((l) => {
|
|
593
593
|
l.classList.remove("highlight-hover-col");
|
|
594
594
|
}) : document.querySelectorAll(".highlight-col").forEach((l) => l.classList.remove("highlight-col"));
|
|
595
|
-
}, b = (
|
|
596
|
-
const y = /* @__PURE__ */ new Map(),
|
|
595
|
+
}, b = (d, l) => {
|
|
596
|
+
const y = /* @__PURE__ */ new Map(), g = d.clientX, k = d.target.closest("table"), V = k == null ? void 0 : k.querySelectorAll("th")[l], $ = V == null ? void 0 : V.getBoundingClientRect().width, P = y.get(l) ? n[l.toString()] || 60 : (y.set(l, !0), $ || n[l.toString()] || 60), N = V == null ? void 0 : V.querySelector("p");
|
|
597
597
|
if (!N) return;
|
|
598
|
-
const
|
|
599
|
-
if (!
|
|
600
|
-
|
|
601
|
-
const
|
|
598
|
+
const re = N.textContent || "", Z = window.getComputedStyle(N), ie = `${Z.fontWeight} ${Z.fontSize} ${Z.fontFamily}`, ee = document.createElement("canvas").getContext("2d");
|
|
599
|
+
if (!ee) return;
|
|
600
|
+
ee.font = ie;
|
|
601
|
+
const p = ee.measureText(re), T = window.getComputedStyle(V), E = parseFloat(T.paddingLeft || "0"), A = parseFloat(T.paddingRight || "0"), D = p.width + E + A;
|
|
602
602
|
c(l, !1);
|
|
603
|
-
const
|
|
604
|
-
const
|
|
603
|
+
const z = (te) => {
|
|
604
|
+
const ae = te.clientX - g, Q = Math.max(D, P + ae);
|
|
605
605
|
if (k) {
|
|
606
|
-
w(l,
|
|
607
|
-
let
|
|
608
|
-
k.querySelectorAll("th").forEach((
|
|
609
|
-
|
|
610
|
-
}), k.classList.remove("w-full"), k.style.width = `${
|
|
606
|
+
w(l, Q, k, !0);
|
|
607
|
+
let K = 0;
|
|
608
|
+
k.querySelectorAll("th").forEach((pe, fe) => {
|
|
609
|
+
K += fe === l ? Q : n[fe] || pe.getBoundingClientRect().width;
|
|
610
|
+
}), k.classList.remove("w-full"), k.style.width = `${K}px`;
|
|
611
611
|
const ce = k == null ? void 0 : k.parentElement;
|
|
612
612
|
if (ce) {
|
|
613
|
-
const
|
|
614
|
-
ce.offsetWidth +
|
|
613
|
+
const pe = ce.scrollWidth, fe = ce.scrollLeft;
|
|
614
|
+
ce.offsetWidth + fe >= pe - 100 && (ce.scrollLeft = pe);
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
},
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
const Ce =
|
|
621
|
-
n[
|
|
622
|
-
}), n.value =
|
|
617
|
+
}, O = () => {
|
|
618
|
+
const te = (k == null ? void 0 : k.querySelectorAll("th")) ?? [], ae = [...n.value];
|
|
619
|
+
te.forEach((Q, K) => {
|
|
620
|
+
const Ce = Q.getBoundingClientRect().width;
|
|
621
|
+
n[K] = Ce, ae[K] = Ce;
|
|
622
|
+
}), n.value = ae, x(!1), document.removeEventListener("mousemove", z), document.removeEventListener("mouseup", O);
|
|
623
623
|
};
|
|
624
|
-
document.addEventListener("mousemove",
|
|
625
|
-
},
|
|
626
|
-
const l =
|
|
624
|
+
document.addEventListener("mousemove", z), document.addEventListener("mouseup", O);
|
|
625
|
+
}, v = (d) => {
|
|
626
|
+
const l = d.clientY, y = d.target.closest("table"), g = e.value || 48;
|
|
627
627
|
i(!1);
|
|
628
628
|
const k = ($) => {
|
|
629
|
-
const
|
|
630
|
-
y && t(
|
|
631
|
-
},
|
|
632
|
-
r(!1), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup",
|
|
629
|
+
const P = Math.max(30, g + ($.clientY - l));
|
|
630
|
+
y && t(P, y);
|
|
631
|
+
}, V = () => {
|
|
632
|
+
r(!1), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", V);
|
|
633
633
|
};
|
|
634
|
-
document.addEventListener("mousemove", k), document.addEventListener("mouseup",
|
|
634
|
+
document.addEventListener("mousemove", k), document.addEventListener("mouseup", V);
|
|
635
635
|
};
|
|
636
636
|
return {
|
|
637
637
|
rowHeight: e,
|
|
638
638
|
colWidths: n,
|
|
639
|
-
isEditing:
|
|
639
|
+
isEditing: m,
|
|
640
640
|
updateRowHeight: t,
|
|
641
641
|
updateColWidth: w,
|
|
642
|
-
setRowHeights:
|
|
642
|
+
setRowHeights: R,
|
|
643
643
|
setColWidths: C,
|
|
644
644
|
enableEditMode: S,
|
|
645
|
-
disableEditMode:
|
|
645
|
+
disableEditMode: F,
|
|
646
646
|
resetStore: s,
|
|
647
647
|
highlightCol: c,
|
|
648
648
|
highlightRows: i,
|
|
649
649
|
removeRowHighlight: r,
|
|
650
650
|
removeColHighlight: x,
|
|
651
651
|
resizeCol: b,
|
|
652
|
-
resizeRow:
|
|
652
|
+
resizeRow: v,
|
|
653
653
|
enableCellResizing: () => {
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
const k = (
|
|
657
|
-
const
|
|
658
|
-
return
|
|
654
|
+
const d = document.querySelector("thead"), l = document.querySelectorAll("thead tr"), y = document.querySelectorAll("tbody tr"), g = [...l, ...y];
|
|
655
|
+
d && d.classList.remove("sticky");
|
|
656
|
+
const k = (V, $) => {
|
|
657
|
+
const P = document.createElement("div");
|
|
658
|
+
return P.className = `${V}-resize-handle`, V === "col" ? (P.addEventListener("mouseenter", () => c($, !0)), P.addEventListener("mouseleave", () => x(!0)), P.addEventListener("mousedown", (N) => {
|
|
659
659
|
N.stopPropagation(), b(N, $);
|
|
660
|
-
})) : (
|
|
661
|
-
N.stopPropagation(),
|
|
662
|
-
})),
|
|
660
|
+
})) : (P.addEventListener("mouseenter", () => i(!0)), P.addEventListener("mouseleave", () => r(!0)), P.addEventListener("mousedown", (N) => {
|
|
661
|
+
N.stopPropagation(), v(N);
|
|
662
|
+
})), P;
|
|
663
663
|
};
|
|
664
|
-
|
|
665
|
-
const $ =
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
N.appendChild(
|
|
664
|
+
g.forEach((V) => {
|
|
665
|
+
const $ = V.closest("thead") !== null;
|
|
666
|
+
V.querySelectorAll($ ? "th" : "td").forEach((N, re) => {
|
|
667
|
+
const Z = k("col", re), ie = k("row", re);
|
|
668
|
+
N.appendChild(Z), N.appendChild(ie);
|
|
669
669
|
});
|
|
670
670
|
}), S();
|
|
671
671
|
},
|
|
672
672
|
cancelResizingChanges: () => {
|
|
673
|
-
|
|
673
|
+
F();
|
|
674
674
|
}
|
|
675
675
|
};
|
|
676
676
|
});
|
|
677
677
|
function Ke(e) {
|
|
678
678
|
if (e == null || e === "")
|
|
679
679
|
return "";
|
|
680
|
-
const n = String(e),
|
|
681
|
-
if (isNaN(
|
|
682
|
-
const [t, w] = n.split("."),
|
|
683
|
-
return w !== void 0 ? `${
|
|
680
|
+
const n = String(e), m = Number(n);
|
|
681
|
+
if (isNaN(m)) return n;
|
|
682
|
+
const [t, w] = n.split("."), R = new Intl.NumberFormat("en-US").format(Number(t));
|
|
683
|
+
return w !== void 0 ? `${R}.${w}` : R;
|
|
684
684
|
}
|
|
685
685
|
const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }, Aa = {
|
|
686
686
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
687
687
|
style: { backgroundColor: "#f9f9f9" }
|
|
688
|
-
},
|
|
688
|
+
}, Da = { class: "font-bold" }, Wa = { class: "text-fm-color-neutral-gray-300" }, Ea = /* @__PURE__ */ ne({
|
|
689
689
|
__name: "WidgetTable",
|
|
690
690
|
props: /* @__PURE__ */ he({
|
|
691
691
|
tileIndex: {}
|
|
@@ -695,156 +695,157 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
695
695
|
}),
|
|
696
696
|
emits: ["update:modelValue"],
|
|
697
697
|
setup(e) {
|
|
698
|
-
const { t: n, te:
|
|
699
|
-
var
|
|
700
|
-
return ((
|
|
701
|
-
}),
|
|
702
|
-
var
|
|
703
|
-
return ((
|
|
704
|
-
}), l =
|
|
705
|
-
var
|
|
706
|
-
if (!(l.value && l.value.trim().length > 0 || !((
|
|
707
|
-
if (t.value.rollupPosition ===
|
|
708
|
-
return
|
|
709
|
-
if (t.value.rollupPosition ===
|
|
710
|
-
return
|
|
698
|
+
const { t: n, te: m } = Ne(), t = se(e, "modelValue"), { country: w } = nt(), { clearTileSorts: R, setTileSorts: C } = ra(), S = st(), F = e, s = u([]), { isEditing: c, colWidths: i, rowHeight: r } = Ee(Tt()), { setColWidths: x, setRowHeights: b, enableCellResizing: v } = Tt(), h = u(null), L = f(() => {
|
|
699
|
+
var p;
|
|
700
|
+
return ((p = t.value.data) == null ? void 0 : p.columns) || [{ label: "", key: "" }];
|
|
701
|
+
}), d = f(() => {
|
|
702
|
+
var p;
|
|
703
|
+
return ((p = t.value.data) == null ? void 0 : p.rows) || [];
|
|
704
|
+
}), l = f(() => t.value.filterText), y = f(() => {
|
|
705
|
+
var p, T;
|
|
706
|
+
if (!(l.value && l.value.trim().length > 0 || !((p = d.value[0]) != null && p.isRollup) && !((T = d.value[d.value.length - 1]) != null && T.isRollup))) {
|
|
707
|
+
if (t.value.rollupPosition === ye.top || t.value.rollupPosition === void 0)
|
|
708
|
+
return ye.top;
|
|
709
|
+
if (t.value.rollupPosition === ye.bottom)
|
|
710
|
+
return ye.bottom;
|
|
711
711
|
}
|
|
712
|
-
}),
|
|
713
|
-
const A = y.value !== void 0 ? 1 : 0,
|
|
714
|
-
return Math.floor((
|
|
715
|
-
}), k =
|
|
716
|
-
var
|
|
717
|
-
let
|
|
712
|
+
}), g = f(() => {
|
|
713
|
+
const A = y.value !== void 0 ? 1 : 0, D = (h.value ? h.value.$el.offsetHeight : 0) - 48;
|
|
714
|
+
return Math.floor((D - 34.5 - 32) / 48) - A;
|
|
715
|
+
}), k = f(() => {
|
|
716
|
+
var T, E;
|
|
717
|
+
let p = [];
|
|
718
718
|
switch (y.value) {
|
|
719
|
-
case
|
|
720
|
-
|
|
719
|
+
case ye.top:
|
|
720
|
+
p = [...((T = d.value[0]) == null ? void 0 : T.cells) || []].map((A, D) => {
|
|
721
721
|
var z;
|
|
722
722
|
return {
|
|
723
723
|
main: A,
|
|
724
|
-
comparison: (z =
|
|
725
|
-
rowType: L.value[
|
|
724
|
+
comparison: (z = d.value[0]) == null ? void 0 : z.comparisonCells[D],
|
|
725
|
+
rowType: L.value[D].type
|
|
726
726
|
};
|
|
727
727
|
});
|
|
728
728
|
break;
|
|
729
|
-
case
|
|
730
|
-
|
|
729
|
+
case ye.bottom:
|
|
730
|
+
p = [...((E = d.value[d.value.length - 1]) == null ? void 0 : E.cells) || []].map((A, D) => {
|
|
731
731
|
var z;
|
|
732
732
|
return {
|
|
733
733
|
main: A,
|
|
734
|
-
comparison: (z =
|
|
735
|
-
rowType: L.value[
|
|
734
|
+
comparison: (z = d.value[0]) == null ? void 0 : z.comparisonCells[D],
|
|
735
|
+
rowType: L.value[D].type
|
|
736
736
|
};
|
|
737
737
|
});
|
|
738
738
|
break;
|
|
739
739
|
}
|
|
740
|
-
return
|
|
740
|
+
return p.length > 0 && p[0].main === "" && (p[0].main = "Grand total"), p;
|
|
741
741
|
});
|
|
742
|
-
function
|
|
743
|
-
let
|
|
744
|
-
return
|
|
745
|
-
main:
|
|
742
|
+
function V(p) {
|
|
743
|
+
let T = (p == null ? void 0 : p.main) || "";
|
|
744
|
+
return T.includes("#") && !T.startsWith("#") && (T = T.split("#")[0]), !p || p.main === "" || p.comparison === "" ? {
|
|
745
|
+
main: T
|
|
746
746
|
} : {
|
|
747
|
-
main:
|
|
748
|
-
comparison:
|
|
749
|
-
difference: zt(
|
|
747
|
+
main: T,
|
|
748
|
+
comparison: p == null ? void 0 : p.comparison,
|
|
749
|
+
difference: zt(p.main, p.comparison, w)
|
|
750
750
|
};
|
|
751
751
|
}
|
|
752
|
-
|
|
753
|
-
|
|
752
|
+
we(() => {
|
|
753
|
+
R();
|
|
754
754
|
});
|
|
755
|
-
const $ =
|
|
756
|
-
let
|
|
757
|
-
function
|
|
758
|
-
var
|
|
759
|
-
if (!((
|
|
755
|
+
const $ = u([]);
|
|
756
|
+
let P = 0, N;
|
|
757
|
+
function re() {
|
|
758
|
+
var D;
|
|
759
|
+
if (!((D = t.value) != null && D.data)) {
|
|
760
760
|
$.value = [];
|
|
761
761
|
return;
|
|
762
762
|
}
|
|
763
|
-
const
|
|
763
|
+
const p = ++P, T = (t.value.data.rows || []).map((z) => ({
|
|
764
764
|
isRollup: z.isRollup,
|
|
765
765
|
cells: Array.isArray(z.cells) ? [...z.cells] : [],
|
|
766
766
|
comparisonCells: Array.isArray(z.comparisonCells) ? [...z.comparisonCells] : []
|
|
767
|
-
})),
|
|
767
|
+
})), E = (t.value.data.columns || []).map((z) => ({
|
|
768
768
|
key: z.key,
|
|
769
769
|
type: z.type,
|
|
770
770
|
label: z.label
|
|
771
771
|
})), A = {
|
|
772
|
-
rows:
|
|
773
|
-
columns:
|
|
772
|
+
rows: T,
|
|
773
|
+
columns: E,
|
|
774
774
|
filter: l.value ?? "",
|
|
775
775
|
globalSorts: ea(s.value).map((z) => ({
|
|
776
776
|
key: z.key,
|
|
777
777
|
type: z.type
|
|
778
778
|
})),
|
|
779
779
|
grandTotalPosition: y.value,
|
|
780
|
-
pageSize:
|
|
780
|
+
pageSize: g.value
|
|
781
781
|
};
|
|
782
782
|
ia(za, A).then((z) => {
|
|
783
|
-
|
|
783
|
+
p === P && (z != null && z.error ? (S.open({ message: "Failed to process table data. Please retry.", type: "error" }), console.log(z.error), $.value = []) : $.value = ta(z.data || []));
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
G(
|
|
787
787
|
() => s.value,
|
|
788
|
-
(
|
|
789
|
-
|
|
788
|
+
(p) => {
|
|
789
|
+
F.tileIndex === void 0 || F.tileIndex === null || C(F.tileIndex, p);
|
|
790
790
|
},
|
|
791
791
|
{ immediate: !0, deep: !0 }
|
|
792
|
-
)
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
() => {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
792
|
+
);
|
|
793
|
+
const Z = f(() => {
|
|
794
|
+
var E, A;
|
|
795
|
+
const p = ((E = t.value.data) == null ? void 0 : E.rows) || [], T = ((A = t.value.data) == null ? void 0 : A.columns) || [];
|
|
796
|
+
return JSON.stringify({
|
|
797
|
+
rowsLength: p.length,
|
|
798
|
+
columns: T.map((D) => ({ key: D.key, type: D.type, label: D.label })),
|
|
799
|
+
filter: l.value ?? "",
|
|
800
|
+
globalSorts: s.value.map((D) => ({ key: D.key, type: D.type })),
|
|
801
|
+
grandTotalPosition: y.value,
|
|
802
|
+
pageSize: g.value
|
|
803
|
+
});
|
|
804
|
+
});
|
|
805
|
+
G(
|
|
806
|
+
() => Z.value,
|
|
806
807
|
() => {
|
|
807
|
-
clearTimeout(N), N = setTimeout(
|
|
808
|
+
clearTimeout(N), N = setTimeout(re, 200);
|
|
808
809
|
},
|
|
809
|
-
{ immediate: !0
|
|
810
|
+
{ immediate: !0 }
|
|
810
811
|
);
|
|
811
|
-
function
|
|
812
|
-
const
|
|
813
|
-
if (!
|
|
814
|
-
s.value.push({ key:
|
|
812
|
+
function ie(p) {
|
|
813
|
+
const T = s.value.find((E) => E.key === p);
|
|
814
|
+
if (!T) {
|
|
815
|
+
s.value.push({ key: p, type: De.Asc });
|
|
815
816
|
return;
|
|
816
817
|
}
|
|
817
|
-
|
|
818
|
+
T.type === De.Asc ? T.type = De.Desc : T.type === De.Desc && (s.value = s.value.filter((E) => E.key !== p));
|
|
818
819
|
}
|
|
819
|
-
const
|
|
820
|
+
const me = f(
|
|
820
821
|
() => {
|
|
821
|
-
var
|
|
822
|
-
return (((
|
|
822
|
+
var p;
|
|
823
|
+
return (((p = t.value.colWidths) == null ? void 0 : p.length) ?? 0) > 0 || i.value.length > 0;
|
|
823
824
|
}
|
|
824
|
-
),
|
|
825
|
-
var
|
|
826
|
-
return (
|
|
827
|
-
const
|
|
825
|
+
), ee = f(() => {
|
|
826
|
+
var p;
|
|
827
|
+
return (p = t.value.data) != null && p.columns ? t.value.data.columns.map((T) => {
|
|
828
|
+
const E = Re(n, m, T.label, "other"), A = s.value.find((O) => O.key === T.key), D = !!A, z = D ? A.type === De.Asc ? "arrow_upward" : "arrow_downward" : "unfold_more";
|
|
828
829
|
return {
|
|
829
|
-
accessorKey:
|
|
830
|
+
accessorKey: T.key,
|
|
830
831
|
header: () => {
|
|
831
|
-
const O =
|
|
832
|
-
return
|
|
832
|
+
const O = H("FmIcon");
|
|
833
|
+
return Be(
|
|
833
834
|
"button",
|
|
834
835
|
{
|
|
835
836
|
type: "button",
|
|
836
|
-
class: `w-full flex items-center gap-1 group/select-header select-none ${
|
|
837
|
-
onClick: () =>
|
|
837
|
+
class: `w-full flex items-center gap-1 group/select-header select-none ${T.type === "NUMERIC" ? "justify-end" : "justify-start"} ${D ? "text-fm-color-typo-primary" : "text-fm-color-neutral-gray-400"}`,
|
|
838
|
+
onClick: () => ie(T.key)
|
|
838
839
|
},
|
|
839
840
|
[
|
|
840
|
-
|
|
841
|
+
Be(
|
|
841
842
|
"span",
|
|
842
|
-
{ class: `${
|
|
843
|
-
|
|
843
|
+
{ class: `${T.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap` },
|
|
844
|
+
E
|
|
844
845
|
),
|
|
845
|
-
|
|
846
|
+
Be(O, {
|
|
846
847
|
name: z,
|
|
847
|
-
color:
|
|
848
|
+
color: D ? "primary" : "neutral-gray-400",
|
|
848
849
|
size: "sm",
|
|
849
850
|
class: "transition-transform",
|
|
850
851
|
style: z === "arrow_upward" ? "transform: translateY(-1px);" : ""
|
|
@@ -853,18 +854,18 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
853
854
|
);
|
|
854
855
|
},
|
|
855
856
|
cell: (O) => {
|
|
856
|
-
var Q,
|
|
857
|
-
const
|
|
858
|
-
return
|
|
857
|
+
var Q, K;
|
|
858
|
+
const te = V(O.getValue()), ae = (K = (Q = O == null ? void 0 : O.row) == null ? void 0 : Q.original) == null ? void 0 : K.isRollup;
|
|
859
|
+
return Be(
|
|
859
860
|
"div",
|
|
860
861
|
{
|
|
861
862
|
class: [
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
863
|
+
ae ? "fm-typo-en-body-md-600 text-fm-color-typo-secondary" : "fm-typo-en-body-md-400",
|
|
864
|
+
T.type === "NUMERIC" ? "text-right" : "",
|
|
865
|
+
me.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
865
866
|
].join(" ")
|
|
866
867
|
},
|
|
867
|
-
[
|
|
868
|
+
[T.type === "NUMERIC" ? Ke(te.main) : te.main]
|
|
868
869
|
);
|
|
869
870
|
},
|
|
870
871
|
enableSorting: !1
|
|
@@ -873,38 +874,38 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
873
874
|
});
|
|
874
875
|
return G(
|
|
875
876
|
() => i.value.length > 0,
|
|
876
|
-
async (
|
|
877
|
-
|
|
877
|
+
async (p) => {
|
|
878
|
+
p && c.value && (await J(), v());
|
|
878
879
|
}
|
|
879
880
|
), G(
|
|
880
|
-
[() =>
|
|
881
|
+
[() => ee.value],
|
|
881
882
|
async () => {
|
|
882
|
-
var
|
|
883
|
+
var D;
|
|
883
884
|
await J();
|
|
884
|
-
const
|
|
885
|
-
if (!
|
|
886
|
-
const
|
|
887
|
-
if (!
|
|
888
|
-
|
|
889
|
-
let
|
|
890
|
-
c.value ? (
|
|
891
|
-
x(O, z,
|
|
885
|
+
const p = (D = h.value) == null ? void 0 : D.$el;
|
|
886
|
+
if (!p) return;
|
|
887
|
+
const T = p.querySelector("table");
|
|
888
|
+
if (!T) return;
|
|
889
|
+
T.classList.add(me.value ? "table-fixed" : "table-auto");
|
|
890
|
+
let E, A;
|
|
891
|
+
c.value ? (v(), E = i.value, A = r.value) : (A = t.value.rowHeight, E = t.value.colWidths), typeof A == "number" && b(A, p), E == null || E.forEach((z, O) => {
|
|
892
|
+
x(O, z, p);
|
|
892
893
|
});
|
|
893
894
|
},
|
|
894
895
|
{ immediate: !0 }
|
|
895
|
-
), (
|
|
896
|
-
const
|
|
896
|
+
), (p, T) => {
|
|
897
|
+
const E = H("FmTable");
|
|
897
898
|
return W(), U(ue, null, [
|
|
898
899
|
M("div", La, [
|
|
899
|
-
|
|
900
|
+
xe(p.$slots, "menu")
|
|
900
901
|
]),
|
|
901
|
-
|
|
902
|
+
B(E, {
|
|
902
903
|
ref_key: "table",
|
|
903
|
-
ref:
|
|
904
|
-
"column-defs":
|
|
904
|
+
ref: h,
|
|
905
|
+
"column-defs": ee.value,
|
|
905
906
|
"row-data": $.value,
|
|
906
907
|
"search-value": l.value,
|
|
907
|
-
"page-size":
|
|
908
|
+
"page-size": g.value,
|
|
908
909
|
"shrink-at": !1,
|
|
909
910
|
"force-mobile-footer": !0,
|
|
910
911
|
class: "scrollbar-hide-table"
|
|
@@ -912,19 +913,19 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
912
913
|
"pin-top": Y(() => [
|
|
913
914
|
M("tbody", null, [
|
|
914
915
|
M("tr", Aa, [
|
|
915
|
-
(W(!0), U(ue, null, _t(k.value, (A,
|
|
916
|
-
key: `${o(Ie)()}_${
|
|
916
|
+
(W(!0), U(ue, null, _t(k.value, (A, D) => (W(), U("td", {
|
|
917
|
+
key: `${o(Ie)()}_${D}`,
|
|
917
918
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
918
919
|
}, [
|
|
919
920
|
M("span", {
|
|
920
921
|
class: Me([
|
|
921
922
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
922
923
|
A.rowType === "NUMERIC" ? "text-right" : "",
|
|
923
|
-
|
|
924
|
+
me.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
924
925
|
])
|
|
925
926
|
}, [
|
|
926
|
-
M("p",
|
|
927
|
-
M("p",
|
|
927
|
+
M("p", Da, We(A.rowType === "NUMERIC" ? o(Ke)(A.main) : A.main), 1),
|
|
928
|
+
M("p", Wa, We(A.comparison ? A.rowType === "NUMERIC" ? `(${o(Ke)(A.comparison)})` : `(${A.comparison})` : ""), 1)
|
|
928
929
|
], 2)
|
|
929
930
|
]))), 128))
|
|
930
931
|
])
|
|
@@ -935,7 +936,7 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
935
936
|
], 64);
|
|
936
937
|
};
|
|
937
938
|
}
|
|
938
|
-
}), Va = /* @__PURE__ */
|
|
939
|
+
}), Va = /* @__PURE__ */ ne({
|
|
939
940
|
__name: "WidgetStackBarChart",
|
|
940
941
|
props: /* @__PURE__ */ he({
|
|
941
942
|
tileIndex: {}
|
|
@@ -945,46 +946,46 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
945
946
|
}),
|
|
946
947
|
emits: ["update:modelValue"],
|
|
947
948
|
setup(e) {
|
|
948
|
-
const n = e,
|
|
949
|
+
const n = e, m = se(e, "modelValue"), t = u(null), w = f(() => {
|
|
949
950
|
var L;
|
|
950
|
-
return ((L =
|
|
951
|
-
}),
|
|
952
|
-
var
|
|
953
|
-
return ((
|
|
954
|
-
}), { datalabels: C, xCfg: S, yCfg:
|
|
955
|
-
|
|
956
|
-
), x =
|
|
957
|
-
...
|
|
958
|
-
let
|
|
951
|
+
return ((L = m.value.data) == null ? void 0 : L.xAxis) || [];
|
|
952
|
+
}), R = f(() => {
|
|
953
|
+
var h;
|
|
954
|
+
return ((h = m.value.data) == null ? void 0 : h.datasets) ?? [];
|
|
955
|
+
}), { datalabels: C, xCfg: S, yCfg: F, isTransposed: s, legend: c, chartWidth: i, chartHeight: r } = He(
|
|
956
|
+
m.value
|
|
957
|
+
), x = f(() => R.value.length > 0 ? [
|
|
958
|
+
...R.value.map((h, L) => {
|
|
959
|
+
let d = h.values;
|
|
959
960
|
return {
|
|
960
|
-
label:
|
|
961
|
-
data:
|
|
962
|
-
dash: !!
|
|
963
|
-
backgroundColor:
|
|
961
|
+
label: h.name,
|
|
962
|
+
data: d,
|
|
963
|
+
dash: !!h.isCompare,
|
|
964
|
+
backgroundColor: oe({ index: L, isCompare: h.isCompare })
|
|
964
965
|
};
|
|
965
966
|
})
|
|
966
967
|
] : []), b = Ve();
|
|
967
|
-
function
|
|
968
|
+
function v() {
|
|
968
969
|
return b.extractChartSize(t.value, n.tileIndex) || { width: 0, height: 0 };
|
|
969
970
|
}
|
|
970
|
-
return
|
|
971
|
+
return we(() => {
|
|
971
972
|
J(() => {
|
|
972
|
-
|
|
973
|
+
v();
|
|
973
974
|
});
|
|
974
975
|
}), G([x], () => {
|
|
975
|
-
J(() =>
|
|
976
|
-
}), (
|
|
977
|
-
const
|
|
976
|
+
J(() => v());
|
|
977
|
+
}), (h, L) => {
|
|
978
|
+
const d = H("FmBarChart");
|
|
978
979
|
return W(), U(ue, null, [
|
|
979
|
-
|
|
980
|
-
|
|
980
|
+
xe(h.$slots, "menu"),
|
|
981
|
+
B(d, {
|
|
981
982
|
ref_key: "chartRef",
|
|
982
983
|
ref: t,
|
|
983
984
|
class: "bar-chart",
|
|
984
985
|
datasets: x.value,
|
|
985
986
|
"x-axis": { categories: w.value },
|
|
986
987
|
"x-cfg": o(S),
|
|
987
|
-
"y-cfg": o(
|
|
988
|
+
"y-cfg": o(F),
|
|
988
989
|
transpose: o(s),
|
|
989
990
|
stacked: !0,
|
|
990
991
|
legend: {
|
|
@@ -1004,7 +1005,7 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
1004
1005
|
], 64);
|
|
1005
1006
|
};
|
|
1006
1007
|
}
|
|
1007
|
-
}), Ha = /* @__PURE__ */
|
|
1008
|
+
}), Ha = /* @__PURE__ */ ne({
|
|
1008
1009
|
__name: "WidgetStackLineChart",
|
|
1009
1010
|
props: /* @__PURE__ */ he({
|
|
1010
1011
|
tileIndex: {}
|
|
@@ -1014,50 +1015,50 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
1014
1015
|
}),
|
|
1015
1016
|
emits: ["update:modelValue"],
|
|
1016
1017
|
setup(e) {
|
|
1017
|
-
var
|
|
1018
|
-
const n = e,
|
|
1018
|
+
var d;
|
|
1019
|
+
const n = e, m = se(e, "modelValue"), t = ((d = m.value.data) == null ? void 0 : d.xAxis) ?? [], w = f(
|
|
1019
1020
|
() => t.length === 1 && S.value.length > 0 && S.value.every((l) => l.values.length === 1)
|
|
1020
|
-
),
|
|
1021
|
+
), R = f(() => w.value ? ["", t[0], ""] : t), C = u(null), S = f(() => {
|
|
1021
1022
|
var l;
|
|
1022
|
-
return ((l =
|
|
1023
|
-
}), { datalabels:
|
|
1024
|
-
|
|
1025
|
-
),
|
|
1023
|
+
return ((l = m.value.data) == null ? void 0 : l.datasets) ?? [];
|
|
1024
|
+
}), { datalabels: F, xCfg: s, yCfg: c, isTransposed: i, legend: r, chartWidth: x, chartHeight: b } = He(
|
|
1025
|
+
m.value
|
|
1026
|
+
), v = f(() => S.value.length > 0 ? [
|
|
1026
1027
|
...S.value.map((l, y) => {
|
|
1027
|
-
let
|
|
1028
|
-
return w.value && (
|
|
1028
|
+
let g = l.values;
|
|
1029
|
+
return w.value && (g = [NaN, g[0], NaN]), {
|
|
1029
1030
|
label: l.name,
|
|
1030
|
-
data:
|
|
1031
|
+
data: g,
|
|
1031
1032
|
dash: l.isCompare,
|
|
1032
1033
|
fill: !1,
|
|
1033
|
-
color:
|
|
1034
|
+
color: oe({ index: y, isCompare: l.isCompare }),
|
|
1034
1035
|
pointRadius: w.value ? 4 : void 0,
|
|
1035
1036
|
pointHoverRadius: w.value ? 6 : void 0,
|
|
1036
|
-
pointBackgroundColor: w.value ?
|
|
1037
|
-
pointBorderColor: w.value ?
|
|
1037
|
+
pointBackgroundColor: w.value ? oe({ index: y, isCompare: l.isCompare }) : void 0,
|
|
1038
|
+
pointBorderColor: w.value ? oe({ index: y, isCompare: l.isCompare }) : void 0,
|
|
1038
1039
|
pointBorderWidth: w.value ? 2 : void 0
|
|
1039
1040
|
};
|
|
1040
1041
|
})
|
|
1041
|
-
] : []),
|
|
1042
|
+
] : []), h = Ve();
|
|
1042
1043
|
function L() {
|
|
1043
|
-
return
|
|
1044
|
+
return h.extractChartSize(C.value, n.tileIndex) || { width: 0, height: 0 };
|
|
1044
1045
|
}
|
|
1045
|
-
return
|
|
1046
|
+
return we(() => {
|
|
1046
1047
|
J(() => {
|
|
1047
1048
|
L();
|
|
1048
1049
|
});
|
|
1049
|
-
}), G([
|
|
1050
|
+
}), G([v], () => {
|
|
1050
1051
|
J(() => L());
|
|
1051
1052
|
}), (l, y) => {
|
|
1052
|
-
const
|
|
1053
|
+
const g = H("FmLineChart");
|
|
1053
1054
|
return W(), U(ue, null, [
|
|
1054
|
-
|
|
1055
|
-
|
|
1055
|
+
xe(l.$slots, "menu"),
|
|
1056
|
+
B(g, {
|
|
1056
1057
|
ref_key: "chartRef",
|
|
1057
1058
|
ref: C,
|
|
1058
1059
|
class: "line-chart",
|
|
1059
|
-
datasets:
|
|
1060
|
-
"x-axis": { categories:
|
|
1060
|
+
datasets: v.value,
|
|
1061
|
+
"x-axis": { categories: R.value },
|
|
1061
1062
|
"x-cfg": o(s),
|
|
1062
1063
|
"y-cfg": o(c),
|
|
1063
1064
|
transpose: o(i),
|
|
@@ -1069,7 +1070,7 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
1069
1070
|
labels: o(r).labels
|
|
1070
1071
|
},
|
|
1071
1072
|
stacked: !0,
|
|
1072
|
-
datalabels: o(
|
|
1073
|
+
datalabels: o(F),
|
|
1073
1074
|
"maintain-aspect-ratio": !1,
|
|
1074
1075
|
style: de({
|
|
1075
1076
|
"--chart-width": o(x) !== void 0 ? o(x) + "px" : "100%",
|
|
@@ -1096,13 +1097,13 @@ const za = "/assets/processTableData.worker-COqO3hgX.js", La = { class: "my-4" }
|
|
|
1096
1097
|
function $a(e) {
|
|
1097
1098
|
return e < 12 ? ze[e - 1] : ze[11];
|
|
1098
1099
|
}
|
|
1099
|
-
function
|
|
1100
|
+
function Pa(e) {
|
|
1100
1101
|
return e < 12 ? ze[Math.min(11, e * 2 - 1)] : ze[11];
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function Ba(e) {
|
|
1103
1104
|
return e < 12 ? ze[Math.min(11, e * 3 - 1)] : ze[11];
|
|
1104
1105
|
}
|
|
1105
|
-
const Ia = /* @__PURE__ */
|
|
1106
|
+
const Ia = /* @__PURE__ */ ne({
|
|
1106
1107
|
__name: "WidgetLinechart",
|
|
1107
1108
|
props: /* @__PURE__ */ he({
|
|
1108
1109
|
tileIndex: {}
|
|
@@ -1112,50 +1113,50 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1112
1113
|
}),
|
|
1113
1114
|
emits: ["update:modelValue"],
|
|
1114
1115
|
setup(e) {
|
|
1115
|
-
var
|
|
1116
|
-
const n = e,
|
|
1116
|
+
var d;
|
|
1117
|
+
const n = e, m = se(e, "modelValue"), t = ((d = m.value.data) == null ? void 0 : d.xAxis) ?? [], w = f(
|
|
1117
1118
|
() => t.length === 1 && S.value.length > 0 && S.value.every((l) => l.values.length === 1)
|
|
1118
|
-
),
|
|
1119
|
+
), R = f(() => w.value ? ["", t[0], ""] : t), C = u(null), S = f(() => {
|
|
1119
1120
|
var l;
|
|
1120
|
-
return ((l =
|
|
1121
|
-
}), { datalabels:
|
|
1122
|
-
|
|
1123
|
-
),
|
|
1121
|
+
return ((l = m.value.data) == null ? void 0 : l.datasets) ?? [];
|
|
1122
|
+
}), { datalabels: F, xCfg: s, yCfg: c, isTransposed: i, legend: r, chartWidth: x, chartHeight: b } = He(
|
|
1123
|
+
m.value
|
|
1124
|
+
), v = f(() => S.value.length > 0 ? [
|
|
1124
1125
|
...S.value.map((l, y) => {
|
|
1125
|
-
let
|
|
1126
|
-
return w.value && (
|
|
1126
|
+
let g = l.values;
|
|
1127
|
+
return w.value && (g = [NaN, g[0], NaN]), {
|
|
1127
1128
|
label: l.name,
|
|
1128
|
-
data:
|
|
1129
|
+
data: g,
|
|
1129
1130
|
dash: !!l.isCompare,
|
|
1130
1131
|
fill: !1,
|
|
1131
|
-
color:
|
|
1132
|
+
color: oe({ index: y, isCompare: l.isCompare }),
|
|
1132
1133
|
pointRadius: w.value ? 4 : void 0,
|
|
1133
1134
|
pointHoverRadius: w.value ? 6 : void 0,
|
|
1134
|
-
pointBackgroundColor: w.value ?
|
|
1135
|
-
pointBorderColor: w.value ?
|
|
1135
|
+
pointBackgroundColor: w.value ? oe({ index: y, isCompare: l.isCompare }) : void 0,
|
|
1136
|
+
pointBorderColor: w.value ? oe({ index: y, isCompare: l.isCompare }) : void 0,
|
|
1136
1137
|
pointBorderWidth: w.value ? 2 : void 0
|
|
1137
1138
|
};
|
|
1138
1139
|
})
|
|
1139
|
-
] : []),
|
|
1140
|
+
] : []), h = Ve();
|
|
1140
1141
|
function L() {
|
|
1141
|
-
return
|
|
1142
|
+
return h.extractChartSize(C.value, n.tileIndex) || { width: 0, height: 0 };
|
|
1142
1143
|
}
|
|
1143
|
-
return
|
|
1144
|
+
return we(() => {
|
|
1144
1145
|
J(() => {
|
|
1145
1146
|
L();
|
|
1146
1147
|
});
|
|
1147
|
-
}), G([
|
|
1148
|
+
}), G([v], () => {
|
|
1148
1149
|
J(() => L());
|
|
1149
1150
|
}), (l, y) => {
|
|
1150
|
-
const
|
|
1151
|
+
const g = H("FmLineChart");
|
|
1151
1152
|
return W(), U(ue, null, [
|
|
1152
|
-
|
|
1153
|
-
|
|
1153
|
+
xe(l.$slots, "menu"),
|
|
1154
|
+
B(g, {
|
|
1154
1155
|
ref_key: "chartRef",
|
|
1155
1156
|
ref: C,
|
|
1156
1157
|
class: "line-chart",
|
|
1157
|
-
datasets:
|
|
1158
|
-
"x-axis": { categories:
|
|
1158
|
+
datasets: v.value,
|
|
1159
|
+
"x-axis": { categories: R.value },
|
|
1159
1160
|
"x-cfg": o(s),
|
|
1160
1161
|
"y-cfg": o(c),
|
|
1161
1162
|
transpose: o(i),
|
|
@@ -1166,7 +1167,7 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1166
1167
|
maxWidth: o(r).maxWidth,
|
|
1167
1168
|
labels: o(r).labels
|
|
1168
1169
|
},
|
|
1169
|
-
datalabels: o(
|
|
1170
|
+
datalabels: o(F),
|
|
1170
1171
|
"maintain-aspect-ratio": !1,
|
|
1171
1172
|
style: de({
|
|
1172
1173
|
"--chart-width": o(x) !== void 0 ? o(x) + "px" : "100%",
|
|
@@ -1176,7 +1177,7 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1176
1177
|
], 64);
|
|
1177
1178
|
};
|
|
1178
1179
|
}
|
|
1179
|
-
}), Ma = { class: "flex flex-col gap-16" }, Na = { class: "flex flex-row" }, qa = /* @__PURE__ */
|
|
1180
|
+
}), Ma = { class: "flex flex-col gap-16" }, Na = { class: "flex flex-row" }, qa = /* @__PURE__ */ ne({
|
|
1180
1181
|
__name: "PdfOrientationDialog",
|
|
1181
1182
|
props: /* @__PURE__ */ he({
|
|
1182
1183
|
reportType: {},
|
|
@@ -1187,10 +1188,10 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1187
1188
|
}),
|
|
1188
1189
|
emits: ["update:modelValue"],
|
|
1189
1190
|
setup(e) {
|
|
1190
|
-
const { t: n } = Ne(), { FmForm:
|
|
1191
|
+
const { t: n } = Ne(), { FmForm: m } = ha, t = e, w = u(), R = se(e, "modelValue"), C = u(!0), S = u(!1), F = st(), { selectedLocationIds: s, dateRange: c, timeRange: i } = Ee(ot()), r = u(je.PORTRAIT);
|
|
1191
1192
|
function x() {
|
|
1192
|
-
var
|
|
1193
|
-
(
|
|
1193
|
+
var v;
|
|
1194
|
+
(v = w.value) == null || v.validateInputs();
|
|
1194
1195
|
}
|
|
1195
1196
|
async function b() {
|
|
1196
1197
|
S.value = !0;
|
|
@@ -1204,41 +1205,41 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1204
1205
|
dateRange: c.value,
|
|
1205
1206
|
locationIds: s.value
|
|
1206
1207
|
});
|
|
1207
|
-
} catch (
|
|
1208
|
-
|
|
1208
|
+
} catch (v) {
|
|
1209
|
+
F.open({ message: v.message, type: "error" });
|
|
1209
1210
|
} finally {
|
|
1210
1211
|
S.value = !1;
|
|
1211
1212
|
}
|
|
1212
1213
|
}
|
|
1213
|
-
return (
|
|
1214
|
-
const L =
|
|
1214
|
+
return (v, h) => {
|
|
1215
|
+
const L = H("FmRadio"), d = H("FmRadioGroup"), l = H("FmButton"), y = H("FmDialog");
|
|
1215
1216
|
return W(), j(y, {
|
|
1216
|
-
modelValue:
|
|
1217
|
-
"onUpdate:modelValue":
|
|
1217
|
+
modelValue: R.value,
|
|
1218
|
+
"onUpdate:modelValue": h[2] || (h[2] = (g) => R.value = g),
|
|
1218
1219
|
overlay: !0,
|
|
1219
1220
|
"z-index": 10
|
|
1220
1221
|
}, {
|
|
1221
|
-
"dialog-header": Y(() =>
|
|
1222
|
+
"dialog-header": Y(() => h[3] || (h[3] = [
|
|
1222
1223
|
aa("Select Orientation")
|
|
1223
1224
|
])),
|
|
1224
1225
|
default: Y(() => [
|
|
1225
|
-
|
|
1226
|
+
B(o(m), {
|
|
1226
1227
|
ref_key: "form",
|
|
1227
1228
|
ref: w,
|
|
1228
1229
|
onValidationSuccess: b
|
|
1229
1230
|
}, {
|
|
1230
1231
|
default: Y(() => [
|
|
1231
1232
|
M("div", Ma, [
|
|
1232
|
-
|
|
1233
|
+
B(d, {
|
|
1233
1234
|
modelValue: r.value,
|
|
1234
|
-
"onUpdate:modelValue":
|
|
1235
|
+
"onUpdate:modelValue": h[0] || (h[0] = (g) => r.value = g)
|
|
1235
1236
|
}, {
|
|
1236
1237
|
default: Y(() => [
|
|
1237
|
-
|
|
1238
|
+
B(L, {
|
|
1238
1239
|
value: o(je).PORTRAIT,
|
|
1239
1240
|
label: o(n)("report.common.portrait")
|
|
1240
1241
|
}, null, 8, ["value", "label"]),
|
|
1241
|
-
|
|
1242
|
+
B(L, {
|
|
1242
1243
|
value: o(je).LANDSCAPE,
|
|
1243
1244
|
label: o(n)("report.common.landscape")
|
|
1244
1245
|
}, null, 8, ["value", "label"])
|
|
@@ -1247,14 +1248,14 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1247
1248
|
}, 8, ["modelValue"])
|
|
1248
1249
|
]),
|
|
1249
1250
|
M("div", Na, [
|
|
1250
|
-
|
|
1251
|
-
|
|
1251
|
+
h[4] || (h[4] = M("div", { class: "grow" }, null, -1)),
|
|
1252
|
+
B(l, {
|
|
1252
1253
|
label: o(n)("report.common.cancel"),
|
|
1253
1254
|
variant: "tertiary",
|
|
1254
|
-
onClick:
|
|
1255
|
+
onClick: h[1] || (h[1] = (g) => R.value = !1)
|
|
1255
1256
|
}, null, 8, ["label"]),
|
|
1256
1257
|
M("div", null, [
|
|
1257
|
-
|
|
1258
|
+
B(l, {
|
|
1258
1259
|
label: o(n)("report.common.download"),
|
|
1259
1260
|
loading: S.value,
|
|
1260
1261
|
onClick: x
|
|
@@ -1275,7 +1276,7 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1275
1276
|
}, Ua = {
|
|
1276
1277
|
key: 2,
|
|
1277
1278
|
class: "flex"
|
|
1278
|
-
}, tl = /* @__PURE__ */
|
|
1279
|
+
}, tl = /* @__PURE__ */ ne({
|
|
1279
1280
|
__name: "DynamicWidget",
|
|
1280
1281
|
props: /* @__PURE__ */ he({
|
|
1281
1282
|
index: {
|
|
@@ -1298,109 +1299,109 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1298
1299
|
}),
|
|
1299
1300
|
emits: ["update:modelValue"],
|
|
1300
1301
|
setup(e) {
|
|
1301
|
-
const n =
|
|
1302
|
-
if (
|
|
1303
|
-
const a =
|
|
1302
|
+
const n = u(!0), m = se(e, "modelValue"), t = m.value.widget.config, { t: w, te: R } = Ne(), C = e, S = u(null), F = u(t.rollup), s = u(Ie()), c = u(t.drillDimension), i = f(() => {
|
|
1303
|
+
if (ve.value.length > 0) {
|
|
1304
|
+
const a = ve.value.findIndex(
|
|
1304
1305
|
(I) => I.value === c.value
|
|
1305
1306
|
);
|
|
1306
1307
|
return a >= 0 ? a : 0;
|
|
1307
1308
|
} else
|
|
1308
1309
|
return -1;
|
|
1309
|
-
}), r =
|
|
1310
|
-
() => i.value !=
|
|
1311
|
-
), b =
|
|
1310
|
+
}), r = f(() => i.value !== 0), x = f(
|
|
1311
|
+
() => i.value != ve.value.length - 1
|
|
1312
|
+
), b = u(t.showTitle ?? !0), v = u(t.titleFontSize ?? 14), h = u(t.titleBold ?? !1), L = u(t.titleItalic ?? !1), d = u(t.titleUnderline ?? !1), l = u(t.chartWidth ?? void 0), y = u(t.chartHeight ?? void 0), g = u(t.showLabel ?? !1), k = u(t.labelAlign ?? et.center), V = u(t.labelAnchor ?? Qe.center), $ = u(t.labelRotation ?? 0), P = u(t.labelOffset ?? 0), N = u(t.labelFontSize ?? 12), re = f(() => t.showSearchBar), Z = u(t.showX ?? !0), ie = u(t.xPosition ?? tt.bottom), me = u(t.showXGrid ?? !1), ee = u(t.showXTick ?? !0), p = u(t.xTickFontSize ?? 12), T = u(t.showXTitle ?? !1), E = u(t.xTitle ?? ""), A = u(t.xTitleFontSize ?? 12), D = u(t.showY ?? !0), z = u(t.yPosition ?? at.left), O = u(t.showYGrid ?? !1), te = u(t.showYTick ?? !0), ae = u(t.yTickFontSize ?? 12), Q = u(t.showYTitle ?? !1), K = u(t.yTitle ?? ""), Ce = u(t.yTitleFontSize ?? 12), ce = u(t.showLegend ?? void 0), pe = u(t.legendPosition ?? lt.top), fe = u(t.usePointStyle ?? !0), qe = u(t.legendMaxHeight), rt = u(t.legendMaxWidth), it = u(t.rowHeight ?? 0), ct = u(t.colWidths ?? []), Oe = u(!1), Ue = u(""), { breakpoints: Se, getBreakpointsBoundary: Le } = Rt(), ut = u(), X = f(
|
|
1312
1313
|
() => C.customScreenWidth === void 0 ? window.innerWidth : C.customScreenWidth
|
|
1313
|
-
), Lt =
|
|
1314
|
+
), Lt = f(
|
|
1314
1315
|
() => (X == null ? void 0 : X.value) > Le("xs")[1] && (X == null ? void 0 : X.value) <= Le("sm")[1]
|
|
1315
|
-
), At =
|
|
1316
|
+
), At = f(
|
|
1316
1317
|
() => (X == null ? void 0 : X.value) > Le("sm")[1] && (X == null ? void 0 : X.value) <= Le("md")[1]
|
|
1317
|
-
),
|
|
1318
|
-
const a =
|
|
1319
|
-
return
|
|
1320
|
-
}), $e =
|
|
1321
|
-
() => pa.find((a) => a.type ===
|
|
1318
|
+
), Dt = f(() => (X == null ? void 0 : X.value) > Le("md")[1]), Wt = f(() => {
|
|
1319
|
+
const a = m.value.size.width;
|
|
1320
|
+
return Dt.value || At.value ? $a(a) : Lt.value ? Pa(a) : Ba(a);
|
|
1321
|
+
}), $e = f(
|
|
1322
|
+
() => pa.find((a) => a.type === m.value.widget.type)
|
|
1322
1323
|
), ke = Ct(() => {
|
|
1323
1324
|
var a;
|
|
1324
1325
|
ut.value = Mt((a = S.value) == null ? void 0 : a.$el.offsetWidth), s.value = Ie();
|
|
1325
|
-
}), Et =
|
|
1326
|
+
}), Et = f(() => {
|
|
1326
1327
|
if (fa(q.value.type, Te.value))
|
|
1327
|
-
switch (
|
|
1328
|
-
case
|
|
1328
|
+
switch (m.value.widget.type) {
|
|
1329
|
+
case _.BarChart:
|
|
1329
1330
|
return ga;
|
|
1330
|
-
case
|
|
1331
|
+
case _.StackBarChart:
|
|
1331
1332
|
return Va;
|
|
1332
|
-
case
|
|
1333
|
+
case _.LineChart:
|
|
1333
1334
|
return Ia;
|
|
1334
|
-
case
|
|
1335
|
+
case _.StackLineChart:
|
|
1335
1336
|
return Ha;
|
|
1336
|
-
case
|
|
1337
|
+
case _.Circular:
|
|
1337
1338
|
return ya;
|
|
1338
|
-
case
|
|
1339
|
+
case _.Scorecard:
|
|
1339
1340
|
return ka;
|
|
1340
|
-
case
|
|
1341
|
+
case _.Spacer:
|
|
1341
1342
|
return Fa;
|
|
1342
|
-
case
|
|
1343
|
+
case _.Table:
|
|
1343
1344
|
return Ea;
|
|
1344
1345
|
default:
|
|
1345
1346
|
return St;
|
|
1346
1347
|
}
|
|
1347
1348
|
else
|
|
1348
1349
|
return St;
|
|
1349
|
-
}), Te =
|
|
1350
|
+
}), Te = u(null), {
|
|
1350
1351
|
selectedLocationIds: Xe,
|
|
1351
1352
|
dateRange: dt,
|
|
1352
1353
|
compareDateRange: Vt,
|
|
1353
1354
|
timeRange: ht,
|
|
1354
1355
|
globalFilters: Ht,
|
|
1355
1356
|
isGlobalFiltersLoading: Ye
|
|
1356
|
-
} = Ee(ot()), { businessId: $t } = Ee(nt()),
|
|
1357
|
-
const a = JSON.parse(JSON.stringify(
|
|
1357
|
+
} = Ee(ot()), { businessId: $t } = Ee(nt()), Pt = u(!0), q = f(() => {
|
|
1358
|
+
const a = JSON.parse(JSON.stringify(m.value.widget));
|
|
1358
1359
|
return {
|
|
1359
1360
|
...a,
|
|
1360
1361
|
config: {
|
|
1361
1362
|
...a.config,
|
|
1362
|
-
rollup:
|
|
1363
|
+
rollup: F.value,
|
|
1363
1364
|
drillDimension: c.value,
|
|
1364
1365
|
showGrandTotal: !1
|
|
1365
1366
|
}
|
|
1366
1367
|
};
|
|
1367
1368
|
});
|
|
1368
|
-
function
|
|
1369
|
+
function Bt() {
|
|
1369
1370
|
return {
|
|
1370
1371
|
data: Te.value,
|
|
1371
1372
|
showTitle: b.value,
|
|
1372
|
-
titleFontSize:
|
|
1373
|
-
titleBold:
|
|
1373
|
+
titleFontSize: v.value,
|
|
1374
|
+
titleBold: h.value,
|
|
1374
1375
|
titleItalic: L.value,
|
|
1375
|
-
titleUnderline:
|
|
1376
|
+
titleUnderline: d.value,
|
|
1376
1377
|
chartHeight: y.value,
|
|
1377
1378
|
chartWidth: l.value,
|
|
1378
|
-
showLabel:
|
|
1379
|
-
labelAnchor:
|
|
1379
|
+
showLabel: g.value,
|
|
1380
|
+
labelAnchor: V.value,
|
|
1380
1381
|
labelAlign: k.value,
|
|
1381
1382
|
labelRotation: $.value,
|
|
1382
|
-
labelOffset:
|
|
1383
|
+
labelOffset: P.value,
|
|
1383
1384
|
labelFontSize: N.value,
|
|
1384
|
-
showX:
|
|
1385
|
-
xPosition:
|
|
1386
|
-
showXGrid:
|
|
1387
|
-
showXTick:
|
|
1388
|
-
xTickFontSize:
|
|
1389
|
-
showXTitle:
|
|
1390
|
-
xTitle:
|
|
1391
|
-
xTitleFontSize:
|
|
1392
|
-
showY:
|
|
1393
|
-
yPosition:
|
|
1394
|
-
showYGrid:
|
|
1395
|
-
showYTick:
|
|
1396
|
-
yTitle:
|
|
1397
|
-
showYTitle:
|
|
1385
|
+
showX: Z.value,
|
|
1386
|
+
xPosition: ie.value,
|
|
1387
|
+
showXGrid: me.value,
|
|
1388
|
+
showXTick: ee.value,
|
|
1389
|
+
xTickFontSize: p.value,
|
|
1390
|
+
showXTitle: T.value,
|
|
1391
|
+
xTitle: E.value,
|
|
1392
|
+
xTitleFontSize: A.value,
|
|
1393
|
+
showY: D.value,
|
|
1394
|
+
yPosition: z.value,
|
|
1395
|
+
showYGrid: O.value,
|
|
1396
|
+
showYTick: te.value,
|
|
1397
|
+
yTitle: K.value,
|
|
1398
|
+
showYTitle: Q.value,
|
|
1398
1399
|
yTitleFontSize: Ce.value,
|
|
1399
|
-
yTickFontSize:
|
|
1400
|
+
yTickFontSize: ae.value,
|
|
1400
1401
|
isTransposed: q.value.config.isTransposed,
|
|
1401
1402
|
showLegend: ce.value,
|
|
1402
|
-
legendPosition:
|
|
1403
|
-
usePointStyle:
|
|
1403
|
+
legendPosition: pe.value,
|
|
1404
|
+
usePointStyle: fe.value,
|
|
1404
1405
|
legendMaxHeight: qe.value,
|
|
1405
1406
|
legendMaxWidth: rt.value
|
|
1406
1407
|
};
|
|
@@ -1414,50 +1415,50 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1414
1415
|
colWidths: ct.value
|
|
1415
1416
|
};
|
|
1416
1417
|
}
|
|
1417
|
-
const mt =
|
|
1418
|
+
const mt = f(() => {
|
|
1418
1419
|
switch (q.value.type) {
|
|
1419
|
-
case
|
|
1420
|
+
case _.Table:
|
|
1420
1421
|
return It();
|
|
1421
|
-
case
|
|
1422
|
-
case
|
|
1423
|
-
case
|
|
1424
|
-
case
|
|
1425
|
-
case
|
|
1426
|
-
return
|
|
1422
|
+
case _.BarChart:
|
|
1423
|
+
case _.LineChart:
|
|
1424
|
+
case _.StackBarChart:
|
|
1425
|
+
case _.StackLineChart:
|
|
1426
|
+
case _.Circular:
|
|
1427
|
+
return Bt();
|
|
1427
1428
|
default:
|
|
1428
1429
|
return { data: Te.value };
|
|
1429
1430
|
}
|
|
1430
|
-
}), pt =
|
|
1431
|
-
const { config: a } =
|
|
1431
|
+
}), pt = f(() => {
|
|
1432
|
+
const { config: a } = m.value.widget;
|
|
1432
1433
|
if (a.rollup != null) {
|
|
1433
|
-
const I = [...a.dimensions].filter((
|
|
1434
|
+
const I = [...a.dimensions].filter((ge) => !ge.hide);
|
|
1434
1435
|
return I.sort(
|
|
1435
|
-
(
|
|
1436
|
+
(ge, Ae) => (a.rowIds || []).indexOf(Je(ge)) - (a.rowIds || []).indexOf(Je(Ae))
|
|
1436
1437
|
), [
|
|
1437
|
-
{ label: Re(w,
|
|
1438
|
-
{ label: Re(w,
|
|
1439
|
-
...[...I].slice(0, I.length - 1).map((
|
|
1440
|
-
label: Re(w,
|
|
1438
|
+
{ label: Re(w, R, "None", "other"), value: "none" },
|
|
1439
|
+
{ label: Re(w, R, "Grand Total", "other"), value: 0 },
|
|
1440
|
+
...[...I].slice(0, I.length - 1).map((ge, Ae) => ({
|
|
1441
|
+
label: Re(w, R, ge.label, "other"),
|
|
1441
1442
|
value: Ae + 1
|
|
1442
1443
|
}))
|
|
1443
1444
|
];
|
|
1444
1445
|
}
|
|
1445
1446
|
return [];
|
|
1446
|
-
}),
|
|
1447
|
+
}), ve = f(() => {
|
|
1447
1448
|
const { config: a } = q.value;
|
|
1448
1449
|
return a.isDrillable ? a.dimensions.map((I) => ({
|
|
1449
|
-
label: Re(w,
|
|
1450
|
+
label: Re(w, R, I.label, "other"),
|
|
1450
1451
|
value: Je(I)
|
|
1451
1452
|
})) : [];
|
|
1452
1453
|
});
|
|
1453
1454
|
G(
|
|
1454
|
-
() =>
|
|
1455
|
+
() => m.value.widget.config,
|
|
1455
1456
|
(a) => {
|
|
1456
|
-
|
|
1457
|
+
F.value = a.rollup, b.value = a.showTitle ?? !0, v.value = a.titleFontSize ?? 14, h.value = a.titleBold ?? !1, L.value = a.titleItalic ?? !1, d.value = a.titleUnderline ?? !1, y.value = a.chartHeight ?? void 0, l.value = a.chartWidth ?? void 0, g.value = a.showLabel ?? !1, k.value = a.labelAlign ?? et.center, V.value = a.labelAnchor ?? Qe.center, $.value = a.labelRotation ?? 0, P.value = a.labelOffset ?? 0, N.value = a.labelFontSize ?? 12, Z.value = a.showX ?? !0, ie.value = a.xPosition ?? tt.bottom, me.value = a.showXGrid ?? !1, ee.value = a.showXTick ?? !0, p.value = a.xTickFontSize ?? 12, T.value = a.showXTitle ?? !1, E.value = a.xTitle ?? "", A.value = a.xTitleFontSize ?? 12, D.value = a.showY ?? !0, z.value = a.yPosition ?? at.left, O.value = a.showYGrid ?? !1, te.value = a.showYTick ?? !0, ae.value = a.yTickFontSize ?? 12, Q.value = a.showYTitle ?? !1, K.value = a.yTitle ?? "", Ce.value = a.yTitleFontSize ?? 12, ce.value = a.showLegend ?? void 0, pe.value = a.legendPosition ?? lt.top, fe.value = a.usePointStyle ?? !0, qe.value = a.legendMaxHeight, rt.value = a.legendMaxWidth, it.value = a.rowHeight ?? 0, ct.value = a.colWidths ?? [];
|
|
1457
1458
|
},
|
|
1458
1459
|
{ deep: !0 }
|
|
1459
|
-
), G([() =>
|
|
1460
|
-
|
|
1460
|
+
), G([() => F.value], () => {
|
|
1461
|
+
F.value !== null && (m.value.widget.config.rollup = F.value);
|
|
1461
1462
|
}), G(
|
|
1462
1463
|
[
|
|
1463
1464
|
() => q.value,
|
|
@@ -1476,18 +1477,18 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1476
1477
|
deep: !0
|
|
1477
1478
|
}
|
|
1478
1479
|
), G(
|
|
1479
|
-
[() =>
|
|
1480
|
+
[() => m.value.size],
|
|
1480
1481
|
() => {
|
|
1481
1482
|
ke();
|
|
1482
1483
|
},
|
|
1483
1484
|
{ deep: !0 }
|
|
1484
|
-
),
|
|
1485
|
+
), we(() => {
|
|
1485
1486
|
ke(), Se.value.sm || Se.value.md || Se.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", ke)) : addEventListener("resize", ke), vt();
|
|
1486
1487
|
}), la(() => {
|
|
1487
1488
|
Se.value.sm || Se.value.md || Se.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", ke)) : removeEventListener("resize", ke);
|
|
1488
1489
|
});
|
|
1489
1490
|
const ft = st();
|
|
1490
|
-
let
|
|
1491
|
+
let Pe;
|
|
1491
1492
|
async function vt() {
|
|
1492
1493
|
if (Xe.value.length === 0 || Ye.value) {
|
|
1493
1494
|
n.value = !1;
|
|
@@ -1501,56 +1502,56 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1501
1502
|
return;
|
|
1502
1503
|
}
|
|
1503
1504
|
try {
|
|
1504
|
-
n.value = !0,
|
|
1505
|
-
const a =
|
|
1506
|
-
Te.value = await Ct(ca, 500)(q.value, a,
|
|
1505
|
+
n.value = !0, Pe && Pe.abort(), Pe = new AbortController();
|
|
1506
|
+
const a = Pe.signal;
|
|
1507
|
+
Te.value = await Ct(ca, 500)(q.value, a, m.value.id), s.value = Ie(), n.value = !1;
|
|
1507
1508
|
} catch (a) {
|
|
1508
1509
|
a.code !== "ERR_CANCELED" && (Te.value = null, ft.open({ message: `Invalid chart ${q.value.type}`, type: "error" }), console.log(a), n.value = !1);
|
|
1509
1510
|
}
|
|
1510
1511
|
}
|
|
1511
1512
|
function Mt(a) {
|
|
1512
|
-
switch (
|
|
1513
|
+
switch (m.value.widget.type) {
|
|
1513
1514
|
case "SPACER":
|
|
1514
1515
|
return;
|
|
1515
1516
|
case "SCORECARD":
|
|
1516
1517
|
return;
|
|
1517
1518
|
case "TABLE":
|
|
1518
|
-
return `${
|
|
1519
|
+
return `${m.value.size.height * 100 + (re.value ? 72 : 0) + 96.5}px`;
|
|
1519
1520
|
}
|
|
1520
|
-
return `${Math.max(a /
|
|
1521
|
+
return `${Math.max(a / m.value.size.width, 90) * m.value.size.height}px`;
|
|
1521
1522
|
}
|
|
1522
1523
|
function Nt() {
|
|
1523
1524
|
const a = i.value - 1;
|
|
1524
|
-
a >= 0 && (c.value =
|
|
1525
|
+
a >= 0 && (c.value = ve.value[a].value);
|
|
1525
1526
|
}
|
|
1526
1527
|
function qt() {
|
|
1527
1528
|
const a = i.value + 1;
|
|
1528
|
-
a >= 0 && a <
|
|
1529
|
+
a >= 0 && a < ve.value.length && (c.value = ve.value[a].value);
|
|
1529
1530
|
}
|
|
1530
|
-
const gt =
|
|
1531
|
+
const gt = u(Fe.EXCEL), yt = u(), Ot = Object.values(Fe).map((a) => ({
|
|
1531
1532
|
label: ua(a),
|
|
1532
1533
|
value: a,
|
|
1533
1534
|
onClick: async () => {
|
|
1534
1535
|
a === Fe.EXCEL || a === Fe.PDFFULLSIZE || a === Fe.PDFRECEIPT ? await Ft({
|
|
1535
1536
|
reportType: a,
|
|
1536
1537
|
index: C.index,
|
|
1537
|
-
isCombinedLocationLayout:
|
|
1538
|
+
isCombinedLocationLayout: Pt.value,
|
|
1538
1539
|
timeRange: ht.value,
|
|
1539
1540
|
dateRange: dt.value,
|
|
1540
1541
|
locationIds: Xe.value
|
|
1541
1542
|
}) : a === Fe.PDF && (gt.value = a, yt.value = C.index, Oe.value = !0);
|
|
1542
1543
|
}
|
|
1543
|
-
})), Ut = q.value.type ===
|
|
1544
|
+
})), Ut = q.value.type === _.Spacer ? "flat" : "outlined", Xt = q.value.type === _.Spacer ? "p-0" : "p-16";
|
|
1544
1545
|
return (a, I) => {
|
|
1545
|
-
const
|
|
1546
|
+
const ge = H("FmTooltip"), Ae = H("FmSearch"), Yt = H("FmCheckbox"), Ge = H("FmButton"), Gt = H("FmSelect"), jt = H("FmMenuItem"), Jt = H("FmMenu"), Kt = H("FmForm"), Zt = H("FmCircularProgress"), Qt = H("FmCard");
|
|
1546
1547
|
return W(), j(Qt, {
|
|
1547
1548
|
ref_key: "tileCard",
|
|
1548
1549
|
ref: S,
|
|
1549
|
-
class: Me(`${
|
|
1550
|
+
class: Me(`${Wt.value} ${o(Xt)}`),
|
|
1550
1551
|
variant: o(Ut)
|
|
1551
1552
|
}, {
|
|
1552
1553
|
default: Y(() => [
|
|
1553
|
-
|
|
1554
|
+
B(qa, {
|
|
1554
1555
|
modelValue: Oe.value,
|
|
1555
1556
|
"onUpdate:modelValue": I[0] || (I[0] = (_e) => Oe.value = _e),
|
|
1556
1557
|
"report-type": gt.value,
|
|
@@ -1567,11 +1568,11 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1567
1568
|
"tile-index": C.index
|
|
1568
1569
|
}, {
|
|
1569
1570
|
menu: Y(() => [
|
|
1570
|
-
|
|
1571
|
+
B(Kt, { class: "flex items-center gap-2" }, {
|
|
1571
1572
|
default: Y(() => {
|
|
1572
1573
|
var _e, bt, wt, xt;
|
|
1573
1574
|
return [
|
|
1574
|
-
|
|
1575
|
+
B(ge, {
|
|
1575
1576
|
variant: "plain",
|
|
1576
1577
|
placement: "right",
|
|
1577
1578
|
content: q.value.description,
|
|
@@ -1582,69 +1583,69 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1582
1583
|
b.value !== !1 ? (W(), U("p", {
|
|
1583
1584
|
key: 0,
|
|
1584
1585
|
style: de({
|
|
1585
|
-
fontSize:
|
|
1586
|
-
fontWeight:
|
|
1586
|
+
fontSize: v.value + "px",
|
|
1587
|
+
fontWeight: h.value ? "bold" : "normal",
|
|
1587
1588
|
fontStyle: L.value ? "italic" : "normal",
|
|
1588
|
-
textDecoration:
|
|
1589
|
+
textDecoration: d.value ? "underline" : "none"
|
|
1589
1590
|
}),
|
|
1590
1591
|
class: Me(["text-fm-color-typo-secondary line-clamp-1", [
|
|
1591
|
-
|
|
1592
|
+
v.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
1592
1593
|
q.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
1593
1594
|
]])
|
|
1594
|
-
},
|
|
1595
|
+
}, We(o(Re)(o(w), o(R), q.value.title, "other")), 7)) : be("", !0)
|
|
1595
1596
|
]),
|
|
1596
1597
|
_: 1
|
|
1597
1598
|
}, 8, ["content", "disabled"]),
|
|
1598
1599
|
(_e = $e.value) != null && _e.showSearchBar ? (W(), j(Ae, {
|
|
1599
1600
|
key: 0,
|
|
1600
1601
|
modelValue: Ue.value,
|
|
1601
|
-
"onUpdate:modelValue": I[1] || (I[1] = (
|
|
1602
|
+
"onUpdate:modelValue": I[1] || (I[1] = (le) => Ue.value = le),
|
|
1602
1603
|
class: "grow"
|
|
1603
1604
|
}, null, 8, ["modelValue"])) : (W(), U("div", Oa)),
|
|
1604
|
-
na(
|
|
1605
|
-
modelValue:
|
|
1606
|
-
"onUpdate:modelValue": I[2] || (I[2] = (
|
|
1605
|
+
na(B(Yt, {
|
|
1606
|
+
modelValue: g.value,
|
|
1607
|
+
"onUpdate:modelValue": I[2] || (I[2] = (le) => g.value = le),
|
|
1607
1608
|
label: "Label",
|
|
1608
1609
|
value: !1
|
|
1609
1610
|
}, null, 8, ["modelValue"]), [
|
|
1610
1611
|
[sa, (bt = $e.value) == null ? void 0 : bt.showLabel]
|
|
1611
1612
|
]),
|
|
1612
|
-
(wt = $e.value) != null && wt.showDrillDimension &&
|
|
1613
|
-
|
|
1613
|
+
(wt = $e.value) != null && wt.showDrillDimension && ve.value.length > 0 ? (W(), U("div", Ua, [
|
|
1614
|
+
B(Ge, {
|
|
1614
1615
|
icon: "arrow_upward",
|
|
1615
1616
|
variant: "tertiary",
|
|
1616
1617
|
disabled: !r.value,
|
|
1617
1618
|
onClick: Nt
|
|
1618
1619
|
}, null, 8, ["disabled"]),
|
|
1619
|
-
|
|
1620
|
+
B(Ge, {
|
|
1620
1621
|
icon: "arrow_downward",
|
|
1621
1622
|
variant: "tertiary",
|
|
1622
1623
|
disabled: !x.value,
|
|
1623
1624
|
onClick: qt
|
|
1624
1625
|
}, null, 8, ["disabled"])
|
|
1625
|
-
])) :
|
|
1626
|
+
])) : be("", !0),
|
|
1626
1627
|
(xt = $e.value) != null && xt.showRollup && pt.value.length > 0 ? (W(), j(Gt, {
|
|
1627
1628
|
key: 3,
|
|
1628
|
-
modelValue:
|
|
1629
|
-
"onUpdate:modelValue": I[3] || (I[3] = (
|
|
1629
|
+
modelValue: F.value,
|
|
1630
|
+
"onUpdate:modelValue": I[3] || (I[3] = (le) => F.value = le),
|
|
1630
1631
|
class: "w-[150px]",
|
|
1631
1632
|
items: pt.value
|
|
1632
|
-
}, null, 8, ["modelValue", "items"])) :
|
|
1633
|
-
C.hideExport ?
|
|
1633
|
+
}, null, 8, ["modelValue", "items"])) : be("", !0),
|
|
1634
|
+
C.hideExport ? be("", !0) : (W(), j(Jt, {
|
|
1634
1635
|
key: 4,
|
|
1635
1636
|
shift: !0
|
|
1636
1637
|
}, {
|
|
1637
1638
|
"menu-button": Y(() => [
|
|
1638
|
-
|
|
1639
|
+
B(Ge, {
|
|
1639
1640
|
icon: "more_vert",
|
|
1640
1641
|
variant: "tertiary"
|
|
1641
1642
|
})
|
|
1642
1643
|
]),
|
|
1643
1644
|
default: Y(() => [
|
|
1644
|
-
(W(!0), U(ue, null, _t(o(Ot), (
|
|
1645
|
-
key:
|
|
1646
|
-
label:
|
|
1647
|
-
onClick:
|
|
1645
|
+
(W(!0), U(ue, null, _t(o(Ot), (le) => (W(), j(jt, {
|
|
1646
|
+
key: le.value,
|
|
1647
|
+
label: le.label,
|
|
1648
|
+
onClick: le.onClick
|
|
1648
1649
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
1649
1650
|
]),
|
|
1650
1651
|
_: 1
|
|
@@ -1665,7 +1666,7 @@ const Ia = /* @__PURE__ */ le({
|
|
|
1665
1666
|
});
|
|
1666
1667
|
export {
|
|
1667
1668
|
et as L,
|
|
1668
|
-
|
|
1669
|
+
ye as R,
|
|
1669
1670
|
tl as _,
|
|
1670
1671
|
Qe as a,
|
|
1671
1672
|
Je as g,
|