@feedmepos/mf-report 5.16.0-beta.0 → 5.16.0-beta.1
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-DIZSMvTZ.js → App-BsQKS0mH.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BX62SXIc.js → Default.vue_vue_type_script_setup_true_lang-Be1zUefG.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-COSvX6Va.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BouULeLr.js} +513 -506
- package/dist/{InsightView-IxQHcCpw.js → InsightView-BMdULXxB.js} +2 -2
- package/dist/{Integration-CM0LDEnL.js → Integration-BNi4axp4.js} +200 -197
- package/dist/{Layout-DiIhDCpz.js → Layout-Bj0UH9g4.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-_jZJUe1_.js → MenuTab.vue_vue_type_script_setup_true_lang-VZzP3ioV.js} +1 -1
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-0XH1AqeY.js → NavigationTab.vue_vue_type_script_setup_true_lang-DB0u1Tyc.js} +3082 -3085
- package/dist/{OverviewView-DiPVaLOY.js → OverviewView-Bc_LHFuc.js} +3 -3
- package/dist/{Report-DR1SHUVk.js → Report-Dm5yvNtt.js} +1 -1
- package/dist/{ReportEditor-EPBd6Pkm.js → ReportEditor-CJW_8r_X.js} +2 -2
- package/dist/{ReportView-DJ6okIIK.js → ReportView-BY2yuFlE.js} +4 -4
- package/dist/{Setting-D_Iuv5ks.js → Setting-CtJiTvSy.js} +2 -2
- package/dist/{TileEditor-CAqgyGAT.js → TileEditor-RppSHYuT.js} +2 -2
- package/dist/{TransitionFade-DGa312z0.js → TransitionFade-j_XBbJri.js} +1 -1
- package/dist/app.js +10 -10
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { computed as
|
|
2
|
-
import { W as
|
|
1
|
+
import { computed as y, defineComponent as ee, mergeModels as me, useModel as te, ref as h, onMounted as ke, nextTick as X, watch as J, resolveComponent as V, createElementBlock as N, openBlock as W, Fragment as oe, renderSlot as pe, createVNode as B, normalizeStyle as ne, unref as l, createElementVNode as P, toDisplayString as Le, withCtx as q, createBlock as U, createCommentVNode as he, normalizeClass as Pe, h as bt, renderList as kt, createTextVNode as Qt, onUnmounted as ea, resolveDynamicComponent as ta, withDirectives as aa, vShow as la } from "vue";
|
|
2
|
+
import { W as F, d as Ee, v as $e, e as Ye, f as _t, q as oa, R as xe, g as na } from "./BaseDialog.vue_vue_type_script_setup_true_lang-4ProJ47u.js";
|
|
3
3
|
import { u as Me, b as at, a as lt } from "./vue-i18n-CHLsTHGb.js";
|
|
4
4
|
import { a as wt } from "./helper-DJZfVXf0.js";
|
|
5
|
-
import { storeToRefs as ze, defineStore as
|
|
6
|
-
import {
|
|
5
|
+
import { storeToRefs as ze, defineStore as sa } from "pinia";
|
|
6
|
+
import { useBreakpoints as Tt, components as ra, useSnackbar as Rt } from "@feedmepos/ui-library";
|
|
7
|
+
import { a as ia } from "./SelectComponent.vue_vue_type_script_setup_true_lang-nAU0NNg5.js";
|
|
7
8
|
import { r as Ce } from "./i18n-Cif1I9J2.js";
|
|
8
9
|
import { _ as xt } from "./NoData.vue_vue_type_script_setup_true_lang-BF1MLXsF.js";
|
|
9
|
-
import { components as ra, useSnackbar as Tt, useBreakpoints as ia } from "@feedmepos/ui-library";
|
|
10
10
|
var Je = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(Je || {}), Z = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(Z || {}), Ke = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Ke || {}), Ze = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Ze || {}), Qe = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(Qe || {}), et = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(et || {}), tt = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(tt || {});
|
|
11
|
-
|
|
11
|
+
F.Circular, F.Table, F.BarChart, F.LineChart, F.StackBarChart, F.StackLineChart, F.Scorecard, F.Spacer;
|
|
12
12
|
const ua = [
|
|
13
13
|
{
|
|
14
|
-
type:
|
|
14
|
+
type: F.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 ua = [
|
|
|
19
19
|
showSearchBar: !1
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
type:
|
|
22
|
+
type: F.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: F.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 ua = [
|
|
|
34
34
|
showSearchBar: !1
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
type:
|
|
37
|
+
type: F.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 ua = [
|
|
|
42
42
|
showSearchBar: !1
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
type:
|
|
45
|
+
type: F.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 ua = [
|
|
|
50
50
|
showSearchBar: !1
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
type:
|
|
53
|
+
type: F.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 ua = [
|
|
|
58
58
|
showSearchBar: !1
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
|
-
type:
|
|
61
|
+
type: F.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: F.Spacer,
|
|
69
69
|
showLabel: !1,
|
|
70
70
|
showDrillDimension: !1,
|
|
71
71
|
showRollup: !1,
|
|
@@ -78,18 +78,18 @@ function Ge(e) {
|
|
|
78
78
|
}
|
|
79
79
|
function ca(e, n) {
|
|
80
80
|
switch (e) {
|
|
81
|
-
case
|
|
82
|
-
case
|
|
83
|
-
case
|
|
84
|
-
case
|
|
81
|
+
case F.BarChart:
|
|
82
|
+
case F.LineChart:
|
|
83
|
+
case F.StackBarChart:
|
|
84
|
+
case F.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 F.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 F.Circular:
|
|
89
89
|
return Array.isArray(n == null ? void 0 : n.datasets) && n.datasets.length > 0;
|
|
90
|
-
case
|
|
90
|
+
case F.Scorecard:
|
|
91
91
|
return !0;
|
|
92
|
-
case
|
|
92
|
+
case F.Spacer:
|
|
93
93
|
return !0;
|
|
94
94
|
}
|
|
95
95
|
}
|
|
@@ -118,24 +118,24 @@ const Ct = [
|
|
|
118
118
|
function Q({
|
|
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(${Ct[e % Ct.length]}, ${t})`;
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ft(e, n, m) {
|
|
127
127
|
if (e === "" || n === "")
|
|
128
128
|
return null;
|
|
129
129
|
let t = (z) => z == null ? void 0 : z.replace(/,/g, "");
|
|
130
|
-
|
|
131
|
-
const x = Number(t(e)),
|
|
132
|
-
if (isNaN(x) || isNaN(
|
|
130
|
+
m === "ID" && (t = (z) => z == null ? void 0 : z.replace(/\./g, "").replace(/,/g, "."));
|
|
131
|
+
const x = Number(t(e)), L = Number(t(n));
|
|
132
|
+
if (isNaN(x) || isNaN(L))
|
|
133
133
|
return null;
|
|
134
|
-
let
|
|
135
|
-
|
|
136
|
-
const T = da(
|
|
134
|
+
let S = 0;
|
|
135
|
+
L === 0 ? x === 0 ? S = 0 : S = 1 : S = (x - L) / L;
|
|
136
|
+
const T = da(S);
|
|
137
137
|
return {
|
|
138
|
-
value: isNaN(
|
|
138
|
+
value: isNaN(S) ? "" : `${(S * 100).toFixed(0)}%`,
|
|
139
139
|
icon: T
|
|
140
140
|
};
|
|
141
141
|
}
|
|
@@ -155,17 +155,17 @@ function da(e) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
function We(e) {
|
|
158
|
-
function n(
|
|
159
|
-
if (
|
|
158
|
+
function n(u, c, i) {
|
|
159
|
+
if (u.measureText(c).width <= i) return c;
|
|
160
160
|
const r = "…";
|
|
161
|
-
let
|
|
162
|
-
for (;
|
|
163
|
-
const
|
|
164
|
-
|
|
161
|
+
let b = 0, f = c.length;
|
|
162
|
+
for (; b < f; ) {
|
|
163
|
+
const g = Math.floor((b + f) / 2), d = c.slice(0, g) + r;
|
|
164
|
+
u.measureText(d).width <= i ? b = g + 1 : f = g;
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return c.slice(0, b - 1) + r;
|
|
167
167
|
}
|
|
168
|
-
const
|
|
168
|
+
const m = y(() => ({
|
|
169
169
|
display: e.showLabel,
|
|
170
170
|
align: e.labelAlign,
|
|
171
171
|
anchor: e.labelAnchor,
|
|
@@ -174,12 +174,12 @@ function We(e) {
|
|
|
174
174
|
font: {
|
|
175
175
|
size: e.labelFontSize
|
|
176
176
|
},
|
|
177
|
-
color: (
|
|
178
|
-
const
|
|
179
|
-
return
|
|
177
|
+
color: (u) => {
|
|
178
|
+
const c = u.chart.data.datasets[u.datasetIndex];
|
|
179
|
+
return c.borderColor ? Array.isArray(c.borderColor) ? c.borderColor[u.dataIndex] : c.borderColor : c.backgroundColor ? Array.isArray(c.backgroundColor) ? c.backgroundColor[u.dataIndex] : c.backgroundColor : "#000";
|
|
180
180
|
},
|
|
181
|
-
formatter: (
|
|
182
|
-
})), t =
|
|
181
|
+
formatter: (u) => u === 0 ? "" : u.toLocaleString("en-US")
|
|
182
|
+
})), t = y(() => ({
|
|
183
183
|
display: e.showX,
|
|
184
184
|
position: e.xPosition,
|
|
185
185
|
grid: {
|
|
@@ -187,16 +187,16 @@ function We(e) {
|
|
|
187
187
|
},
|
|
188
188
|
ticks: {
|
|
189
189
|
display: e.showXTick,
|
|
190
|
-
callback: function(
|
|
191
|
-
if ((e == null ? void 0 : e.isTransposed) === !0) return String(
|
|
192
|
-
let i = String(
|
|
190
|
+
callback: function(u) {
|
|
191
|
+
if ((e == null ? void 0 : e.isTransposed) === !0) return String(u);
|
|
192
|
+
let i = String(u);
|
|
193
193
|
const r = this;
|
|
194
|
-
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(
|
|
195
|
-
const
|
|
196
|
-
if (
|
|
197
|
-
|
|
198
|
-
const E =
|
|
199
|
-
return
|
|
194
|
+
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(u));
|
|
195
|
+
const b = r == null ? void 0 : r.chart, f = r == null ? void 0 : r.ctx, g = b.height * 0.25;
|
|
196
|
+
if (f && g > 0) {
|
|
197
|
+
f.save();
|
|
198
|
+
const E = f.measureText(i).width > g ? n(f, i, g) : i;
|
|
199
|
+
return f.restore(), E;
|
|
200
200
|
}
|
|
201
201
|
return i;
|
|
202
202
|
},
|
|
@@ -211,19 +211,19 @@ function We(e) {
|
|
|
211
211
|
size: e.xTitleFontSize
|
|
212
212
|
}
|
|
213
213
|
},
|
|
214
|
-
afterBuildTicks: (
|
|
215
|
-
const
|
|
216
|
-
if (
|
|
217
|
-
const i =
|
|
218
|
-
|
|
214
|
+
afterBuildTicks: (u) => {
|
|
215
|
+
const c = Array.isArray(u == null ? void 0 : u.ticks) ? u.ticks : [];
|
|
216
|
+
if (c.length === 0) return;
|
|
217
|
+
const i = u.getLabelForValue(c[0].value), r = !isNaN(Number(i));
|
|
218
|
+
u.options.ticks.minRotation = r || c.length < 10 ? 0 : 90;
|
|
219
219
|
},
|
|
220
|
-
afterFit: (
|
|
220
|
+
afterFit: (u) => {
|
|
221
221
|
if (!(e != null && e.isTransposed)) {
|
|
222
|
-
const
|
|
223
|
-
|
|
222
|
+
const c = u.chart.height * 0.4;
|
|
223
|
+
u.height > c && (u.height = c);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
-
})), x =
|
|
226
|
+
})), x = y(() => ({
|
|
227
227
|
display: e.showY,
|
|
228
228
|
position: e.yPosition,
|
|
229
229
|
grid: {
|
|
@@ -234,16 +234,16 @@ function We(e) {
|
|
|
234
234
|
font: {
|
|
235
235
|
size: e.yTickFontSize
|
|
236
236
|
},
|
|
237
|
-
callback: function(
|
|
238
|
-
if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(
|
|
239
|
-
let i = String(
|
|
237
|
+
callback: function(u) {
|
|
238
|
+
if (!((e == null ? void 0 : e.isTransposed) === !0)) return String(u);
|
|
239
|
+
let i = String(u);
|
|
240
240
|
const r = this;
|
|
241
|
-
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(
|
|
242
|
-
const
|
|
243
|
-
if (
|
|
244
|
-
|
|
245
|
-
const E =
|
|
246
|
-
return
|
|
241
|
+
r && typeof r.getLabelForValue == "function" && (i = r.getLabelForValue(u));
|
|
242
|
+
const b = r == null ? void 0 : r.chart, f = r == null ? void 0 : r.ctx, g = b.width * 0.4;
|
|
243
|
+
if (f && g > 0) {
|
|
244
|
+
f.save();
|
|
245
|
+
const E = f.measureText(i).width > g ? n(f, i, g) : i;
|
|
246
|
+
return f.restore(), E;
|
|
247
247
|
}
|
|
248
248
|
return i;
|
|
249
249
|
}
|
|
@@ -255,7 +255,7 @@ function We(e) {
|
|
|
255
255
|
size: e.yTitleFontSize
|
|
256
256
|
}
|
|
257
257
|
}
|
|
258
|
-
})),
|
|
258
|
+
})), L = y(() => ({
|
|
259
259
|
display: e.showLegend,
|
|
260
260
|
position: e.legendPosition,
|
|
261
261
|
usePointStyle: e.usePointStyle,
|
|
@@ -263,40 +263,40 @@ function We(e) {
|
|
|
263
263
|
maxWidth: e.legendMaxWidth,
|
|
264
264
|
labels: {
|
|
265
265
|
usePointStyle: e.usePointStyle ?? !0,
|
|
266
|
-
generateLabels: (
|
|
266
|
+
generateLabels: (u) => {
|
|
267
267
|
var i;
|
|
268
|
-
const
|
|
269
|
-
if (
|
|
270
|
-
if (
|
|
271
|
-
const r =
|
|
272
|
-
return
|
|
273
|
-
const
|
|
268
|
+
const c = ((i = u == null ? void 0 : u.data) == null ? void 0 : i.datasets) || [];
|
|
269
|
+
if (c.length === 0) return [];
|
|
270
|
+
if (c.length === 1 && Array.isArray(c[0].backgroundColor) && c[0].backgroundColor.length > 1 && Array.isArray(c[0].data)) {
|
|
271
|
+
const r = c[0];
|
|
272
|
+
return u.data.labels.map((f, g) => {
|
|
273
|
+
const d = r.backgroundColor[g];
|
|
274
274
|
return {
|
|
275
|
-
text:
|
|
275
|
+
text: f,
|
|
276
276
|
fontColor: "#6b6b6b",
|
|
277
|
-
fillStyle:
|
|
278
|
-
strokeStyle:
|
|
277
|
+
fillStyle: d,
|
|
278
|
+
strokeStyle: d,
|
|
279
279
|
datasetIndex: 0,
|
|
280
|
-
index:
|
|
281
|
-
hidden:
|
|
280
|
+
index: g,
|
|
281
|
+
hidden: u.getDataVisibility ? !u.getDataVisibility(g) : !1
|
|
282
282
|
};
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
|
-
return
|
|
286
|
-
const
|
|
285
|
+
return u.data.datasets.map((r, b) => {
|
|
286
|
+
const f = r.borderColor || r.backgroundColor;
|
|
287
287
|
return {
|
|
288
288
|
text: r.label,
|
|
289
289
|
fontColor: "#6b6b6b",
|
|
290
|
-
fillStyle:
|
|
291
|
-
strokeStyle:
|
|
292
|
-
datasetIndex:
|
|
293
|
-
hidden: !
|
|
290
|
+
fillStyle: f,
|
|
291
|
+
strokeStyle: f,
|
|
292
|
+
datasetIndex: b,
|
|
293
|
+
hidden: !u.isDatasetVisible(b)
|
|
294
294
|
};
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
})),
|
|
299
|
-
return { datalabels:
|
|
298
|
+
})), S = y(() => e.isTransposed), T = y(() => e.chartWidth), z = y(() => e.chartHeight);
|
|
299
|
+
return { datalabels: m, xCfg: t, yCfg: x, isTransposed: S, legend: L, chartWidth: T, chartHeight: z };
|
|
300
300
|
}
|
|
301
301
|
const ha = /* @__PURE__ */ ee({
|
|
302
302
|
__name: "WidgetBarchart",
|
|
@@ -308,52 +308,52 @@ const ha = /* @__PURE__ */ ee({
|
|
|
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:
|
|
318
|
-
|
|
319
|
-
),
|
|
320
|
-
...
|
|
321
|
-
label:
|
|
322
|
-
data:
|
|
323
|
-
dash: !!
|
|
324
|
-
backgroundColor: Q({ index: E, isCompare:
|
|
311
|
+
const n = e, m = te(e, "modelValue"), t = h(null), x = y(() => {
|
|
312
|
+
var d;
|
|
313
|
+
return ((d = m.value.data) == null ? void 0 : d.xAxis) ?? [];
|
|
314
|
+
}), L = y(() => {
|
|
315
|
+
var d;
|
|
316
|
+
return ((d = m.value.data) == null ? void 0 : d.datasets) ?? [];
|
|
317
|
+
}), { datalabels: S, xCfg: T, yCfg: z, isTransposed: u, legend: c, chartWidth: i, chartHeight: r } = We(
|
|
318
|
+
m.value
|
|
319
|
+
), b = y(() => L.value.length > 0 ? [
|
|
320
|
+
...L.value.map((d, E) => ({
|
|
321
|
+
label: d.name,
|
|
322
|
+
data: d.values,
|
|
323
|
+
dash: !!d.isCompare,
|
|
324
|
+
backgroundColor: Q({ index: E, isCompare: d.isCompare })
|
|
325
325
|
}))
|
|
326
|
-
] : []),
|
|
327
|
-
function
|
|
328
|
-
return
|
|
326
|
+
] : []), f = Ee();
|
|
327
|
+
function g() {
|
|
328
|
+
return f.extractChartSize(t.value, n.tileIndex) || { width: 0, height: 0 };
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return ke(() => {
|
|
331
331
|
X(() => {
|
|
332
|
-
|
|
332
|
+
g();
|
|
333
333
|
});
|
|
334
|
-
}), J([
|
|
335
|
-
X(() =>
|
|
336
|
-
}), (
|
|
334
|
+
}), J([b], () => {
|
|
335
|
+
X(() => g());
|
|
336
|
+
}), (d, E) => {
|
|
337
337
|
const p = V("FmBarChart");
|
|
338
338
|
return W(), N(oe, null, [
|
|
339
|
-
pe(
|
|
339
|
+
pe(d.$slots, "menu"),
|
|
340
340
|
B(p, {
|
|
341
341
|
ref_key: "chartRef",
|
|
342
342
|
ref: t,
|
|
343
343
|
class: "bar-chart",
|
|
344
|
-
datasets:
|
|
344
|
+
datasets: b.value,
|
|
345
345
|
"x-axis": { categories: x.value },
|
|
346
346
|
"x-cfg": l(T),
|
|
347
347
|
"y-cfg": l(z),
|
|
348
|
-
transpose: l(
|
|
348
|
+
transpose: l(u),
|
|
349
349
|
legend: {
|
|
350
|
-
display: l(
|
|
351
|
-
position: l(
|
|
352
|
-
maxHeight: l(
|
|
353
|
-
maxWidth: l(
|
|
354
|
-
labels: l(
|
|
350
|
+
display: l(c).display ?? !1,
|
|
351
|
+
position: l(c).position,
|
|
352
|
+
maxHeight: l(c).maxHeight,
|
|
353
|
+
maxWidth: l(c).maxWidth,
|
|
354
|
+
labels: l(c).labels
|
|
355
355
|
},
|
|
356
|
-
datalabels: l(
|
|
356
|
+
datalabels: l(S),
|
|
357
357
|
"maintain-aspect-ratio": !1,
|
|
358
358
|
style: ne({
|
|
359
359
|
"--chart-width": l(i) !== void 0 ? l(i) + "px" : "100%",
|
|
@@ -373,49 +373,56 @@ const ha = /* @__PURE__ */ ee({
|
|
|
373
373
|
}),
|
|
374
374
|
emits: ["update:modelValue"],
|
|
375
375
|
setup(e) {
|
|
376
|
-
const n = e,
|
|
377
|
-
let
|
|
378
|
-
return
|
|
376
|
+
const n = e, m = te(e, "modelValue"), { breakpoints: t } = Tt(), x = h(null), { datalabels: L, legend: S, chartWidth: T, chartHeight: z } = We(m.value), u = y(() => {
|
|
377
|
+
let b = [];
|
|
378
|
+
return m.value.data.datasets && m.value.data.metrics && m.value.data.datasets.length > 0 && m.value.data.metrics.length > 0 && (b = [
|
|
379
379
|
{
|
|
380
|
-
label:
|
|
381
|
-
data:
|
|
382
|
-
backgroundColor:
|
|
380
|
+
label: m.value.data.metrics[0],
|
|
381
|
+
data: m.value.data.datasets.map((f) => f.value),
|
|
382
|
+
backgroundColor: m.value.data.datasets.map((f, g) => Q({ index: g }))
|
|
383
383
|
}
|
|
384
|
-
]),
|
|
384
|
+
]), b;
|
|
385
385
|
}), c = Ee();
|
|
386
|
-
function
|
|
387
|
-
return c.extractChartSize(
|
|
386
|
+
function i() {
|
|
387
|
+
return c.extractChartSize(x.value, n.tileIndex) || { width: 0, height: 0 };
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
ke(() => {
|
|
390
390
|
X(() => {
|
|
391
|
-
|
|
391
|
+
i();
|
|
392
392
|
});
|
|
393
|
-
}), J([
|
|
394
|
-
X(() =>
|
|
395
|
-
})
|
|
396
|
-
|
|
393
|
+
}), J([u], () => {
|
|
394
|
+
X(() => i());
|
|
395
|
+
});
|
|
396
|
+
const r = y(() => t.value.lg ? 12 : 8);
|
|
397
|
+
return (b, f) => {
|
|
398
|
+
const g = V("FmPieChart");
|
|
397
399
|
return W(), N(oe, null, [
|
|
398
|
-
pe(
|
|
399
|
-
B(
|
|
400
|
+
pe(b.$slots, "menu"),
|
|
401
|
+
B(g, {
|
|
400
402
|
ref_key: "chartRef",
|
|
401
|
-
ref:
|
|
403
|
+
ref: x,
|
|
402
404
|
class: "circular",
|
|
403
405
|
percentage: "70%",
|
|
404
|
-
datasets:
|
|
405
|
-
metrics:
|
|
406
|
+
datasets: u.value,
|
|
407
|
+
metrics: m.value.data.datasets.map((d) => d.name),
|
|
406
408
|
variant: "doughnut",
|
|
407
409
|
legend: {
|
|
408
410
|
display: l(S).display ?? !0,
|
|
409
411
|
position: l(S).position ?? "top",
|
|
410
|
-
maxHeight: l(S).maxHeight
|
|
412
|
+
maxHeight: l(S).maxHeight,
|
|
411
413
|
maxWidth: l(S).maxWidth,
|
|
412
|
-
labels:
|
|
414
|
+
labels: {
|
|
415
|
+
...l(S).labels,
|
|
416
|
+
font: {
|
|
417
|
+
size: r.value
|
|
418
|
+
}
|
|
419
|
+
}
|
|
413
420
|
},
|
|
414
|
-
datalabels: l(
|
|
421
|
+
datalabels: l(L),
|
|
415
422
|
"maintain-aspect-ratio": !1,
|
|
416
423
|
style: ne({
|
|
417
|
-
"--chart-width": l(
|
|
418
|
-
"--chart-height": l(
|
|
424
|
+
"--chart-width": l(T) !== void 0 ? l(T) + "px" : "100%",
|
|
425
|
+
"--chart-height": l(z) !== void 0 ? l(z) + "px" : "calc(100% - 36px)"
|
|
419
426
|
})
|
|
420
427
|
}, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
|
|
421
428
|
], 64);
|
|
@@ -429,12 +436,12 @@ const ha = /* @__PURE__ */ ee({
|
|
|
429
436
|
},
|
|
430
437
|
emits: ["update:modelValue"],
|
|
431
438
|
setup(e) {
|
|
432
|
-
const n = te(e, "modelValue"), { t:
|
|
439
|
+
const n = te(e, "modelValue"), { t: m } = Me(), { compareDateRange: t, defaultDateSetting: x } = ze(at()), { country: L } = lt(), S = y(() => {
|
|
433
440
|
var i;
|
|
434
441
|
return ((i = n.value.data) == null ? void 0 : i.value) || "";
|
|
435
|
-
}), T =
|
|
442
|
+
}), T = y(() => {
|
|
436
443
|
const { data: i } = n.value;
|
|
437
|
-
return i != null && i.comparison ?
|
|
444
|
+
return i != null && i.comparison ? Ft(S.value, i.comparison, L) : null;
|
|
438
445
|
});
|
|
439
446
|
function z(i) {
|
|
440
447
|
switch (i) {
|
|
@@ -446,10 +453,10 @@ const ha = /* @__PURE__ */ ee({
|
|
|
446
453
|
return "line";
|
|
447
454
|
}
|
|
448
455
|
}
|
|
449
|
-
const
|
|
456
|
+
const u = y(() => {
|
|
450
457
|
var i;
|
|
451
458
|
return (i = n.value.data) == null ? void 0 : i.sparkline;
|
|
452
|
-
}),
|
|
459
|
+
}), c = y(() => u.value.datasets.map((i) => ({
|
|
453
460
|
label: i.name,
|
|
454
461
|
data: i.values,
|
|
455
462
|
fill: !0,
|
|
@@ -457,26 +464,26 @@ const ha = /* @__PURE__ */ ee({
|
|
|
457
464
|
})));
|
|
458
465
|
return (i, r) => {
|
|
459
466
|
var E;
|
|
460
|
-
const
|
|
467
|
+
const b = V("FmIcon"), f = V("FmChip"), g = V("FmTooltip"), d = V("FmLineChart");
|
|
461
468
|
return W(), N("div", pa, [
|
|
462
469
|
pe(i.$slots, "menu"),
|
|
463
|
-
P("p", fa, Le(
|
|
470
|
+
P("p", fa, Le(S.value), 1),
|
|
464
471
|
P("div", va, [
|
|
465
|
-
B(
|
|
472
|
+
B(g, {
|
|
466
473
|
content: `vs. ${(E = l(x).defaultCompareType) == null ? void 0 : E.split("_").join(" ")}`,
|
|
467
474
|
placement: "right",
|
|
468
475
|
"hide-arrow": "",
|
|
469
476
|
variant: "plain"
|
|
470
477
|
}, {
|
|
471
478
|
default: q(() => [
|
|
472
|
-
T.value ? (W(), U(
|
|
479
|
+
T.value ? (W(), U(f, {
|
|
473
480
|
key: 0,
|
|
474
481
|
icon: T.value.icon.name,
|
|
475
482
|
class: Pe(`bg-${T.value.icon.tailwind}`),
|
|
476
483
|
compact: ""
|
|
477
484
|
}, {
|
|
478
485
|
default: q(() => [
|
|
479
|
-
B(
|
|
486
|
+
B(b, {
|
|
480
487
|
name: T.value.icon.name,
|
|
481
488
|
color: T.value.icon.color
|
|
482
489
|
}, null, 8, ["name", "color"]),
|
|
@@ -487,12 +494,12 @@ const ha = /* @__PURE__ */ ee({
|
|
|
487
494
|
]),
|
|
488
495
|
_: 1
|
|
489
496
|
}, 8, ["icon", "class"])) : he("", !0),
|
|
490
|
-
l(t).endDate !== null && l(t).startDate !== null && T.value === null ? (W(), U(
|
|
497
|
+
l(t).endDate !== null && l(t).startDate !== null && T.value === null ? (W(), U(f, {
|
|
491
498
|
key: 1,
|
|
492
499
|
compact: ""
|
|
493
500
|
}, {
|
|
494
501
|
default: q(() => [
|
|
495
|
-
B(
|
|
502
|
+
B(b, {
|
|
496
503
|
name: "arrow_upward",
|
|
497
504
|
color: "#C7C7CC"
|
|
498
505
|
}),
|
|
@@ -504,16 +511,16 @@ const ha = /* @__PURE__ */ ee({
|
|
|
504
511
|
_: 1
|
|
505
512
|
}, 8, ["content"])
|
|
506
513
|
]),
|
|
507
|
-
|
|
508
|
-
z(
|
|
514
|
+
u.value ? (W(), N("div", ga, [
|
|
515
|
+
z(u.value.type) === "line" ? (W(), U(d, {
|
|
509
516
|
key: 0,
|
|
510
517
|
class: "sparkline",
|
|
511
|
-
datasets:
|
|
518
|
+
datasets: c.value,
|
|
512
519
|
legend: {
|
|
513
520
|
display: !1
|
|
514
521
|
},
|
|
515
522
|
datalabels: { display: !1 },
|
|
516
|
-
"x-axis": { categories:
|
|
523
|
+
"x-axis": { categories: u.value.dimensions },
|
|
517
524
|
"y-cfg": { display: !1 },
|
|
518
525
|
"x-cfg": { display: !1 },
|
|
519
526
|
"maintain-aspect-ratio": !1
|
|
@@ -532,132 +539,132 @@ const ha = /* @__PURE__ */ ee({
|
|
|
532
539
|
}
|
|
533
540
|
}), wa = {};
|
|
534
541
|
function xa(e, n) {
|
|
535
|
-
const
|
|
536
|
-
return W(), U(
|
|
542
|
+
const m = V("FmMenuDivider");
|
|
543
|
+
return W(), U(m);
|
|
537
544
|
}
|
|
538
|
-
const Ca = /* @__PURE__ */
|
|
539
|
-
const e =
|
|
540
|
-
e.value = p,
|
|
541
|
-
}, x = (p, s, C,
|
|
542
|
-
n[p] = s, n.value = [...n.value],
|
|
543
|
-
},
|
|
544
|
-
const C = (s == null ? void 0 : s.querySelectorAll("thead tr")) ?? [],
|
|
545
|
-
[...C, ...
|
|
545
|
+
const Ca = /* @__PURE__ */ ia(wa, [["render", xa]]), Sa = "mf-reporttable-dimension", St = sa(Sa, () => {
|
|
546
|
+
const e = h(0), n = h([]), m = h(!1), t = (p, s) => {
|
|
547
|
+
e.value = p, L(p, s);
|
|
548
|
+
}, x = (p, s, C, w) => {
|
|
549
|
+
n[p] = s, n.value = [...n.value], S(p, s, C, w);
|
|
550
|
+
}, L = (p, s) => {
|
|
551
|
+
const C = (s == null ? void 0 : s.querySelectorAll("thead tr")) ?? [], w = (s == null ? void 0 : s.querySelectorAll("tbody tr")) ?? [];
|
|
552
|
+
[...C, ...w].forEach((D) => {
|
|
546
553
|
const o = D;
|
|
547
554
|
o && (o.style.height = `${p}px`);
|
|
548
555
|
});
|
|
549
|
-
},
|
|
550
|
-
const
|
|
556
|
+
}, S = (p, s, C, w = !1) => {
|
|
557
|
+
const k = (C == null ? void 0 : C.querySelectorAll("th")) ?? [];
|
|
551
558
|
if (p === void 0) return;
|
|
552
|
-
const D =
|
|
559
|
+
const D = k[p], o = w ? n[p] : s;
|
|
553
560
|
if (!D || o === void 0) return;
|
|
554
|
-
const
|
|
561
|
+
const v = () => {
|
|
555
562
|
D.style.width = `${o}px`;
|
|
556
563
|
};
|
|
557
|
-
|
|
564
|
+
w ? requestAnimationFrame(v) : v();
|
|
558
565
|
}, T = () => {
|
|
559
566
|
const p = document.querySelectorAll("th"), s = document.querySelectorAll("td"), C = document.querySelector("table");
|
|
560
|
-
C == null || C.classList.add("table-fixed"), p.forEach((
|
|
567
|
+
C == null || C.classList.add("table-fixed"), p.forEach((w) => w.classList.add("toggleEditResize")), s.forEach((w) => w.classList.add("toggleEditResize")), m.value = !0;
|
|
561
568
|
}, z = () => {
|
|
562
|
-
const p = document.querySelectorAll("th"), s = document.querySelectorAll("td"), C = document.querySelectorAll(".col-resize-handle"),
|
|
563
|
-
p.forEach((
|
|
564
|
-
},
|
|
569
|
+
const p = document.querySelectorAll("th"), s = document.querySelectorAll("td"), C = document.querySelectorAll(".col-resize-handle"), w = document.querySelectorAll(".row-resize-handle");
|
|
570
|
+
p.forEach((k) => k.classList.remove("toggleEditResize")), s.forEach((k) => k.classList.remove("toggleEditResize")), C.forEach((k) => k.remove()), w.forEach((k) => k.remove()), m.value = !1;
|
|
571
|
+
}, u = () => {
|
|
565
572
|
e.value = 0, n.value = [];
|
|
566
|
-
},
|
|
573
|
+
}, c = (p, s) => {
|
|
567
574
|
if (s) {
|
|
568
|
-
const C = document.querySelectorAll(`thead th:nth-child(${p + 1})`),
|
|
569
|
-
[...C, ...
|
|
570
|
-
|
|
575
|
+
const C = document.querySelectorAll(`thead th:nth-child(${p + 1})`), w = document.querySelectorAll(`tbody td:nth-child(${p + 1})`);
|
|
576
|
+
[...C, ...w].forEach((k) => {
|
|
577
|
+
k.classList.add("highlight-hover-col");
|
|
571
578
|
});
|
|
572
579
|
} else
|
|
573
580
|
document.querySelectorAll(
|
|
574
581
|
`thead th:nth-child(${p + 1}), tbody td:nth-child(${p + 1})`
|
|
575
582
|
).forEach((C) => C.classList.add("highlight-col"));
|
|
576
583
|
}, i = (p) => {
|
|
577
|
-
const s = document.querySelectorAll("thead tr"), C = document.querySelectorAll("tbody tr"),
|
|
578
|
-
for (const
|
|
579
|
-
p ?
|
|
584
|
+
const s = document.querySelectorAll("thead tr"), C = document.querySelectorAll("tbody tr"), w = [...s, ...C];
|
|
585
|
+
for (const k of w)
|
|
586
|
+
p ? k.classList.add("highlight-hover-row") : k.classList.add("highlight-row");
|
|
580
587
|
}, r = (p) => {
|
|
581
588
|
const s = p ? ".highlight-hover-row" : ".highlight-row", C = document.querySelectorAll(s);
|
|
582
|
-
for (const
|
|
583
|
-
|
|
584
|
-
},
|
|
589
|
+
for (const w of C)
|
|
590
|
+
w.classList.remove(s.slice(1));
|
|
591
|
+
}, b = (p) => {
|
|
585
592
|
p ? document.querySelectorAll(".highlight-hover-col").forEach((s) => {
|
|
586
593
|
s.classList.remove("highlight-hover-col");
|
|
587
594
|
}) : document.querySelectorAll(".highlight-col").forEach((s) => s.classList.remove("highlight-col"));
|
|
588
|
-
},
|
|
589
|
-
const C = /* @__PURE__ */ new Map(),
|
|
595
|
+
}, f = (p, s) => {
|
|
596
|
+
const C = /* @__PURE__ */ new Map(), w = p.clientX, k = p.target.closest("table"), D = k == null ? void 0 : k.querySelectorAll("th")[s], o = D == null ? void 0 : D.getBoundingClientRect().width, v = C.get(s) ? n[s.toString()] || 60 : (C.set(s, !0), o || n[s.toString()] || 60), R = D == null ? void 0 : D.querySelector("p");
|
|
590
597
|
if (!R) return;
|
|
591
|
-
const
|
|
598
|
+
const _ = R.textContent || "", A = window.getComputedStyle(R), H = `${A.fontWeight} ${A.fontSize} ${A.fontFamily}`, O = document.createElement("canvas").getContext("2d");
|
|
592
599
|
if (!O) return;
|
|
593
600
|
O.font = H;
|
|
594
|
-
const G = O.measureText(
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
const se = fe.clientX -
|
|
598
|
-
if (
|
|
599
|
-
x(s, re,
|
|
601
|
+
const G = O.measureText(_), j = window.getComputedStyle(D), De = parseFloat(j.paddingLeft || "0"), Ae = parseFloat(j.paddingRight || "0"), Ve = G.width + De + Ae;
|
|
602
|
+
c(s, !1);
|
|
603
|
+
const _e = (fe) => {
|
|
604
|
+
const se = fe.clientX - w, re = Math.max(Ve, v + se);
|
|
605
|
+
if (k) {
|
|
606
|
+
x(s, re, k, !0);
|
|
600
607
|
let ae = 0;
|
|
601
|
-
|
|
608
|
+
k.querySelectorAll("th").forEach((ie, ue) => {
|
|
602
609
|
ae += ue === s ? re : n[ue] || ie.getBoundingClientRect().width;
|
|
603
|
-
}),
|
|
604
|
-
const le =
|
|
610
|
+
}), k.classList.remove("w-full"), k.style.width = `${ae}px`;
|
|
611
|
+
const le = k == null ? void 0 : k.parentElement;
|
|
605
612
|
if (le) {
|
|
606
613
|
const ie = le.scrollWidth, ue = le.scrollLeft;
|
|
607
614
|
le.offsetWidth + ue >= ie - 100 && (le.scrollLeft = ie);
|
|
608
615
|
}
|
|
609
616
|
}
|
|
610
617
|
}, Te = () => {
|
|
611
|
-
const fe = (
|
|
618
|
+
const fe = (k == null ? void 0 : k.querySelectorAll("th")) ?? [], se = [...n.value];
|
|
612
619
|
fe.forEach((re, ae) => {
|
|
613
620
|
const ve = re.getBoundingClientRect().width;
|
|
614
621
|
n[ae] = ve, se[ae] = ve;
|
|
615
|
-
}), n.value = se,
|
|
622
|
+
}), n.value = se, b(!1), document.removeEventListener("mousemove", _e), document.removeEventListener("mouseup", Te);
|
|
616
623
|
};
|
|
617
|
-
document.addEventListener("mousemove",
|
|
618
|
-
},
|
|
619
|
-
const s = p.clientY, C = p.target.closest("table"),
|
|
624
|
+
document.addEventListener("mousemove", _e), document.addEventListener("mouseup", Te);
|
|
625
|
+
}, g = (p) => {
|
|
626
|
+
const s = p.clientY, C = p.target.closest("table"), w = e.value || 48;
|
|
620
627
|
i(!1);
|
|
621
|
-
const
|
|
622
|
-
const
|
|
623
|
-
C && t(
|
|
628
|
+
const k = (o) => {
|
|
629
|
+
const v = Math.max(30, w + (o.clientY - s));
|
|
630
|
+
C && t(v, C);
|
|
624
631
|
}, D = () => {
|
|
625
|
-
r(!1), document.removeEventListener("mousemove",
|
|
632
|
+
r(!1), document.removeEventListener("mousemove", k), document.removeEventListener("mouseup", D);
|
|
626
633
|
};
|
|
627
|
-
document.addEventListener("mousemove",
|
|
634
|
+
document.addEventListener("mousemove", k), document.addEventListener("mouseup", D);
|
|
628
635
|
};
|
|
629
636
|
return {
|
|
630
637
|
rowHeight: e,
|
|
631
638
|
colWidths: n,
|
|
632
|
-
isEditing:
|
|
639
|
+
isEditing: m,
|
|
633
640
|
updateRowHeight: t,
|
|
634
641
|
updateColWidth: x,
|
|
635
|
-
setRowHeights:
|
|
636
|
-
setColWidths:
|
|
642
|
+
setRowHeights: L,
|
|
643
|
+
setColWidths: S,
|
|
637
644
|
enableEditMode: T,
|
|
638
645
|
disableEditMode: z,
|
|
639
|
-
resetStore:
|
|
640
|
-
highlightCol:
|
|
646
|
+
resetStore: u,
|
|
647
|
+
highlightCol: c,
|
|
641
648
|
highlightRows: i,
|
|
642
649
|
removeRowHighlight: r,
|
|
643
|
-
removeColHighlight:
|
|
644
|
-
resizeCol:
|
|
645
|
-
resizeRow:
|
|
650
|
+
removeColHighlight: b,
|
|
651
|
+
resizeCol: f,
|
|
652
|
+
resizeRow: g,
|
|
646
653
|
enableCellResizing: () => {
|
|
647
|
-
const p = document.querySelector("thead"), s = document.querySelectorAll("thead tr"), C = document.querySelectorAll("tbody tr"),
|
|
654
|
+
const p = document.querySelector("thead"), s = document.querySelectorAll("thead tr"), C = document.querySelectorAll("tbody tr"), w = [...s, ...C];
|
|
648
655
|
p && p.classList.remove("sticky");
|
|
649
|
-
const
|
|
650
|
-
const
|
|
651
|
-
return
|
|
652
|
-
R.stopPropagation(),
|
|
653
|
-
})) : (
|
|
654
|
-
R.stopPropagation(),
|
|
655
|
-
})),
|
|
656
|
+
const k = (D, o) => {
|
|
657
|
+
const v = document.createElement("div");
|
|
658
|
+
return v.className = `${D}-resize-handle`, D === "col" ? (v.addEventListener("mouseenter", () => c(o, !0)), v.addEventListener("mouseleave", () => b(!0)), v.addEventListener("mousedown", (R) => {
|
|
659
|
+
R.stopPropagation(), f(R, o);
|
|
660
|
+
})) : (v.addEventListener("mouseenter", () => i(!0)), v.addEventListener("mouseleave", () => r(!0)), v.addEventListener("mousedown", (R) => {
|
|
661
|
+
R.stopPropagation(), g(R);
|
|
662
|
+
})), v;
|
|
656
663
|
};
|
|
657
|
-
|
|
664
|
+
w.forEach((D) => {
|
|
658
665
|
const o = D.closest("thead") !== null;
|
|
659
|
-
D.querySelectorAll(o ? "th" : "td").forEach((R,
|
|
660
|
-
const A =
|
|
666
|
+
D.querySelectorAll(o ? "th" : "td").forEach((R, _) => {
|
|
667
|
+
const A = k("col", _), H = k("row", _);
|
|
661
668
|
R.appendChild(A), R.appendChild(H);
|
|
662
669
|
});
|
|
663
670
|
}), T();
|
|
@@ -670,12 +677,12 @@ const Ca = /* @__PURE__ */ sa(wa, [["render", xa]]), Sa = "mf-reporttable-dimens
|
|
|
670
677
|
function je(e) {
|
|
671
678
|
if (e == null || e === "")
|
|
672
679
|
return "";
|
|
673
|
-
const n = String(e),
|
|
674
|
-
if (isNaN(
|
|
675
|
-
const [t, x] = n.split("."),
|
|
676
|
-
return x !== void 0 ? `${
|
|
680
|
+
const n = String(e), m = Number(n);
|
|
681
|
+
if (isNaN(m)) return n;
|
|
682
|
+
const [t, x] = n.split("."), L = new Intl.NumberFormat("en-US").format(Number(t));
|
|
683
|
+
return x !== void 0 ? `${L}.${x}` : L;
|
|
677
684
|
}
|
|
678
|
-
const
|
|
685
|
+
const ka = { class: "my-4" }, _a = {
|
|
679
686
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
680
687
|
style: { backgroundColor: "#f9f9f9" }
|
|
681
688
|
}, Ta = { class: "font-bold" }, Ra = { class: "text-fm-color-neutral-gray-300" }, Fa = /* @__PURE__ */ ee({
|
|
@@ -686,43 +693,43 @@ const _a = { class: "my-4" }, ka = {
|
|
|
686
693
|
},
|
|
687
694
|
emits: ["update:modelValue"],
|
|
688
695
|
setup(e) {
|
|
689
|
-
const { t: n, te:
|
|
696
|
+
const { t: n, te: m } = Me(), t = te(e, "modelValue"), { country: x } = lt(), { isEditing: L, colWidths: S, rowHeight: T } = ze(St()), { setColWidths: z, setRowHeights: u, enableCellResizing: c } = St(), i = h(null), r = y(() => {
|
|
690
697
|
var o;
|
|
691
698
|
return ((o = t.value.data) == null ? void 0 : o.columns) || [{ label: "", key: "" }];
|
|
692
|
-
}),
|
|
699
|
+
}), b = y(() => {
|
|
693
700
|
var o;
|
|
694
701
|
return ((o = t.value.data) == null ? void 0 : o.rows) || [];
|
|
695
|
-
}),
|
|
696
|
-
var o,
|
|
697
|
-
if (!(
|
|
702
|
+
}), f = y(() => t.value.filterText), g = y(() => {
|
|
703
|
+
var o, v;
|
|
704
|
+
if (!(f.value && f.value.trim().length > 0 || !((o = b.value[0]) != null && o.isRollup) && !((v = b.value[b.value.length - 1]) != null && v.isRollup))) {
|
|
698
705
|
if (t.value.rollupPosition === Z.top || t.value.rollupPosition === void 0)
|
|
699
706
|
return Z.top;
|
|
700
707
|
if (t.value.rollupPosition === Z.bottom)
|
|
701
708
|
return Z.bottom;
|
|
702
709
|
}
|
|
703
|
-
}),
|
|
704
|
-
const
|
|
705
|
-
return Math.floor((A - 34.5 - 32) / 48) -
|
|
706
|
-
}), E =
|
|
707
|
-
var
|
|
710
|
+
}), d = y(() => {
|
|
711
|
+
const _ = g.value !== void 0 ? 1 : 0, A = (i.value ? i.value.$el.offsetHeight : 0) - 48;
|
|
712
|
+
return Math.floor((A - 34.5 - 32) / 48) - _;
|
|
713
|
+
}), E = y(() => {
|
|
714
|
+
var v, R;
|
|
708
715
|
let o = [];
|
|
709
|
-
switch (
|
|
716
|
+
switch (g.value) {
|
|
710
717
|
case Z.top:
|
|
711
|
-
o = [...((
|
|
718
|
+
o = [...((v = b.value[0]) == null ? void 0 : v.cells) || []].map((_, A) => {
|
|
712
719
|
var H;
|
|
713
720
|
return {
|
|
714
|
-
main:
|
|
715
|
-
comparison: (H =
|
|
721
|
+
main: _,
|
|
722
|
+
comparison: (H = b.value[0]) == null ? void 0 : H.comparisonCells[A],
|
|
716
723
|
rowType: r.value[A].type
|
|
717
724
|
};
|
|
718
725
|
});
|
|
719
726
|
break;
|
|
720
727
|
case Z.bottom:
|
|
721
|
-
o = [...((R =
|
|
728
|
+
o = [...((R = b.value[b.value.length - 1]) == null ? void 0 : R.cells) || []].map((_, A) => {
|
|
722
729
|
var H;
|
|
723
730
|
return {
|
|
724
|
-
main:
|
|
725
|
-
comparison: (H =
|
|
731
|
+
main: _,
|
|
732
|
+
comparison: (H = b.value[0]) == null ? void 0 : H.comparisonCells[A],
|
|
726
733
|
rowType: r.value[A].type
|
|
727
734
|
};
|
|
728
735
|
});
|
|
@@ -731,41 +738,41 @@ const _a = { class: "my-4" }, ka = {
|
|
|
731
738
|
return o.length > 0 && o[0].main === "" && (o[0].main = "Grand total"), o;
|
|
732
739
|
});
|
|
733
740
|
function p(o) {
|
|
734
|
-
const
|
|
741
|
+
const v = {};
|
|
735
742
|
for (let R = 0; R < r.value.length; R++)
|
|
736
743
|
if (r.value[R].key !== "") {
|
|
737
|
-
const
|
|
738
|
-
|
|
744
|
+
const _ = o.comparisonCells[R];
|
|
745
|
+
v[r.value[R].key] = {
|
|
739
746
|
main: o.cells[R],
|
|
740
|
-
comparison:
|
|
741
|
-
},
|
|
747
|
+
comparison: _
|
|
748
|
+
}, v.isRollup = o.isRollup;
|
|
742
749
|
}
|
|
743
|
-
return
|
|
750
|
+
return v;
|
|
744
751
|
}
|
|
745
752
|
function s(o) {
|
|
746
753
|
return [...new Array(o < 0 ? 0 : o)].map(() => {
|
|
747
754
|
var R;
|
|
748
|
-
const
|
|
755
|
+
const v = {};
|
|
749
756
|
if ((R = t.value.data) != null && R.columns)
|
|
750
|
-
for (let
|
|
751
|
-
|
|
752
|
-
return
|
|
757
|
+
for (let _ = 0; _ < t.value.data.columns.length; _++)
|
|
758
|
+
v[t.value.data.columns[_].key] = void 0;
|
|
759
|
+
return v;
|
|
753
760
|
});
|
|
754
761
|
}
|
|
755
762
|
function C(o) {
|
|
756
|
-
let
|
|
757
|
-
return
|
|
758
|
-
main:
|
|
763
|
+
let v = (o == null ? void 0 : o.main) || "";
|
|
764
|
+
return v.includes("#") && !v.startsWith("#") && (v = v.split("#")[0]), !o || o.main === "" || o.comparison === "" ? {
|
|
765
|
+
main: v
|
|
759
766
|
} : {
|
|
760
|
-
main:
|
|
767
|
+
main: v,
|
|
761
768
|
comparison: o == null ? void 0 : o.comparison,
|
|
762
|
-
difference:
|
|
769
|
+
difference: Ft(o.main, o.comparison, x)
|
|
763
770
|
};
|
|
764
771
|
}
|
|
765
|
-
const
|
|
772
|
+
const w = y(() => {
|
|
766
773
|
var A, H, Y;
|
|
767
774
|
let o = ((A = t.value.data) == null ? void 0 : A.rows) || [];
|
|
768
|
-
switch (
|
|
775
|
+
switch (g.value) {
|
|
769
776
|
case Z.bottom:
|
|
770
777
|
o = (H = o[o.length - 1]) != null && H.isRollup ? o.slice(0, -1) : o;
|
|
771
778
|
break;
|
|
@@ -773,30 +780,30 @@ const _a = { class: "my-4" }, ka = {
|
|
|
773
780
|
o = (Y = o[0]) != null && Y.isRollup ? o.slice(1, o.length) : o;
|
|
774
781
|
break;
|
|
775
782
|
}
|
|
776
|
-
const
|
|
783
|
+
const v = o.filter((O) => !(f.value !== "" && (O.isRollup === !0 || !O.cells.some(
|
|
777
784
|
(G) => {
|
|
778
785
|
var j;
|
|
779
|
-
return ((G == null ? void 0 : G.toLowerCase()) || "").includes((j =
|
|
786
|
+
return ((G == null ? void 0 : G.toLowerCase()) || "").includes((j = f.value) == null ? void 0 : j.toLowerCase());
|
|
780
787
|
}
|
|
781
|
-
)))).map((O) => p(O)), R =
|
|
782
|
-
let
|
|
783
|
-
return R > 0 ?
|
|
784
|
-
}),
|
|
788
|
+
)))).map((O) => p(O)), R = v.length % d.value;
|
|
789
|
+
let _ = 0;
|
|
790
|
+
return R > 0 ? _ = Math.abs(R - d.value) : v.length === 0 && (_ = d.value), v.push(...s(_)), v;
|
|
791
|
+
}), k = y(
|
|
785
792
|
() => {
|
|
786
793
|
var o;
|
|
787
|
-
return (((o = t.value.colWidths) == null ? void 0 : o.length) ?? 0) > 0 ||
|
|
794
|
+
return (((o = t.value.colWidths) == null ? void 0 : o.length) ?? 0) > 0 || S.value.length > 0;
|
|
788
795
|
}
|
|
789
|
-
), D =
|
|
790
|
-
var
|
|
796
|
+
), D = y(() => {
|
|
797
|
+
var v;
|
|
791
798
|
let o = [];
|
|
792
|
-
return (
|
|
793
|
-
const A = Ce(n,
|
|
799
|
+
return (v = t.value.data) != null && v.columns && (o = [...t.value.data.columns.map((_) => {
|
|
800
|
+
const A = Ce(n, m, _.label, "other");
|
|
794
801
|
return {
|
|
795
|
-
accessorKey:
|
|
802
|
+
accessorKey: _.key,
|
|
796
803
|
header: () => bt(
|
|
797
804
|
"p",
|
|
798
805
|
{
|
|
799
|
-
class: `w-full ${
|
|
806
|
+
class: `w-full ${_.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap`
|
|
800
807
|
},
|
|
801
808
|
A
|
|
802
809
|
),
|
|
@@ -808,11 +815,11 @@ const _a = { class: "my-4" }, ka = {
|
|
|
808
815
|
{
|
|
809
816
|
class: [
|
|
810
817
|
O ? "fm-typo-en-body-md-600 text-fm-color-typo-secondary" : "fm-typo-en-body-md-400",
|
|
811
|
-
|
|
812
|
-
|
|
818
|
+
_.type === "NUMERIC" ? "text-right" : "",
|
|
819
|
+
k.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
813
820
|
].join(" ")
|
|
814
821
|
},
|
|
815
|
-
[
|
|
822
|
+
[_.type === "NUMERIC" ? je(Y.main) : Y.main]
|
|
816
823
|
);
|
|
817
824
|
},
|
|
818
825
|
enableSorting: !1
|
|
@@ -820,9 +827,9 @@ const _a = { class: "my-4" }, ka = {
|
|
|
820
827
|
})]), o;
|
|
821
828
|
});
|
|
822
829
|
return J(
|
|
823
|
-
() =>
|
|
830
|
+
() => S.value.length > 0,
|
|
824
831
|
async (o) => {
|
|
825
|
-
o &&
|
|
832
|
+
o && L.value && (await X(), c());
|
|
826
833
|
}
|
|
827
834
|
), J(
|
|
828
835
|
[() => D.value],
|
|
@@ -831,48 +838,48 @@ const _a = { class: "my-4" }, ka = {
|
|
|
831
838
|
await X();
|
|
832
839
|
const o = (A = i.value) == null ? void 0 : A.$el;
|
|
833
840
|
if (!o) return;
|
|
834
|
-
const
|
|
835
|
-
if (!
|
|
836
|
-
|
|
837
|
-
let R,
|
|
838
|
-
|
|
841
|
+
const v = o.querySelector("table");
|
|
842
|
+
if (!v) return;
|
|
843
|
+
v.classList.add(k.value ? "table-fixed" : "table-auto");
|
|
844
|
+
let R, _;
|
|
845
|
+
L.value ? (c(), R = S.value, _ = T.value) : (_ = t.value.rowHeight, R = t.value.colWidths), typeof _ == "number" && u(_, o), R == null || R.forEach((H, Y) => {
|
|
839
846
|
z(Y, H, o);
|
|
840
847
|
});
|
|
841
848
|
},
|
|
842
849
|
{ immediate: !0 }
|
|
843
|
-
), (o,
|
|
850
|
+
), (o, v) => {
|
|
844
851
|
const R = V("FmTable");
|
|
845
852
|
return W(), N(oe, null, [
|
|
846
|
-
P("div",
|
|
853
|
+
P("div", ka, [
|
|
847
854
|
pe(o.$slots, "menu")
|
|
848
855
|
]),
|
|
849
856
|
B(R, {
|
|
850
857
|
ref_key: "table",
|
|
851
858
|
ref: i,
|
|
852
859
|
"column-defs": D.value,
|
|
853
|
-
"row-data":
|
|
854
|
-
"search-value":
|
|
855
|
-
"page-size":
|
|
860
|
+
"row-data": w.value,
|
|
861
|
+
"search-value": f.value,
|
|
862
|
+
"page-size": d.value,
|
|
856
863
|
"shrink-at": !1,
|
|
857
864
|
"force-mobile-footer": !0,
|
|
858
865
|
class: "scrollbar-hide-table"
|
|
859
866
|
}, {
|
|
860
867
|
"pin-top": q(() => [
|
|
861
868
|
P("tbody", null, [
|
|
862
|
-
P("tr",
|
|
863
|
-
(W(!0), N(oe, null,
|
|
869
|
+
P("tr", _a, [
|
|
870
|
+
(W(!0), N(oe, null, kt(E.value, (_, A) => (W(), N("td", {
|
|
864
871
|
key: `${l($e)()}_${A}`,
|
|
865
872
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
866
873
|
}, [
|
|
867
874
|
P("span", {
|
|
868
875
|
class: Pe([
|
|
869
876
|
"items-center text-fm-color-typo-secondary gap-2",
|
|
870
|
-
|
|
871
|
-
|
|
877
|
+
_.rowType === "NUMERIC" ? "text-right" : "",
|
|
878
|
+
k.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
|
|
872
879
|
])
|
|
873
880
|
}, [
|
|
874
|
-
P("p", Ta, Le(
|
|
875
|
-
P("p", Ra, Le(
|
|
881
|
+
P("p", Ta, Le(_.rowType === "NUMERIC" ? l(je)(_.main) : _.main), 1),
|
|
882
|
+
P("p", Ra, Le(_.comparison ? _.rowType === "NUMERIC" ? `(${l(je)(_.comparison)})` : `(${_.comparison})` : ""), 1)
|
|
876
883
|
], 2)
|
|
877
884
|
]))), 128))
|
|
878
885
|
])
|
|
@@ -893,56 +900,56 @@ const _a = { class: "my-4" }, ka = {
|
|
|
893
900
|
}),
|
|
894
901
|
emits: ["update:modelValue"],
|
|
895
902
|
setup(e) {
|
|
896
|
-
const n = e,
|
|
903
|
+
const n = e, m = te(e, "modelValue"), t = h(null), x = y(() => {
|
|
897
904
|
var E;
|
|
898
|
-
return ((E =
|
|
899
|
-
}),
|
|
900
|
-
var
|
|
901
|
-
return ((
|
|
902
|
-
}), { datalabels:
|
|
903
|
-
|
|
904
|
-
),
|
|
905
|
-
...
|
|
906
|
-
let p =
|
|
905
|
+
return ((E = m.value.data) == null ? void 0 : E.xAxis) || [];
|
|
906
|
+
}), L = y(() => {
|
|
907
|
+
var d;
|
|
908
|
+
return ((d = m.value.data) == null ? void 0 : d.datasets) ?? [];
|
|
909
|
+
}), { datalabels: S, xCfg: T, yCfg: z, isTransposed: u, legend: c, chartWidth: i, chartHeight: r } = We(
|
|
910
|
+
m.value
|
|
911
|
+
), b = y(() => L.value.length > 0 ? [
|
|
912
|
+
...L.value.map((d, E) => {
|
|
913
|
+
let p = d.values;
|
|
907
914
|
return {
|
|
908
|
-
label:
|
|
915
|
+
label: d.name,
|
|
909
916
|
data: p,
|
|
910
|
-
dash: !!
|
|
911
|
-
backgroundColor: Q({ index: E, isCompare:
|
|
917
|
+
dash: !!d.isCompare,
|
|
918
|
+
backgroundColor: Q({ index: E, isCompare: d.isCompare })
|
|
912
919
|
};
|
|
913
920
|
})
|
|
914
|
-
] : []),
|
|
915
|
-
function
|
|
916
|
-
return
|
|
921
|
+
] : []), f = Ee();
|
|
922
|
+
function g() {
|
|
923
|
+
return f.extractChartSize(t.value, n.tileIndex) || { width: 0, height: 0 };
|
|
917
924
|
}
|
|
918
|
-
return
|
|
925
|
+
return ke(() => {
|
|
919
926
|
X(() => {
|
|
920
|
-
|
|
927
|
+
g();
|
|
921
928
|
});
|
|
922
|
-
}), J([
|
|
923
|
-
X(() =>
|
|
924
|
-
}), (
|
|
929
|
+
}), J([b], () => {
|
|
930
|
+
X(() => g());
|
|
931
|
+
}), (d, E) => {
|
|
925
932
|
const p = V("FmBarChart");
|
|
926
933
|
return W(), N(oe, null, [
|
|
927
|
-
pe(
|
|
934
|
+
pe(d.$slots, "menu"),
|
|
928
935
|
B(p, {
|
|
929
936
|
ref_key: "chartRef",
|
|
930
937
|
ref: t,
|
|
931
938
|
class: "bar-chart",
|
|
932
|
-
datasets:
|
|
939
|
+
datasets: b.value,
|
|
933
940
|
"x-axis": { categories: x.value },
|
|
934
941
|
"x-cfg": l(T),
|
|
935
942
|
"y-cfg": l(z),
|
|
936
|
-
transpose: l(
|
|
943
|
+
transpose: l(u),
|
|
937
944
|
stacked: !0,
|
|
938
945
|
legend: {
|
|
939
|
-
display: l(
|
|
940
|
-
position: l(
|
|
941
|
-
maxHeight: l(
|
|
942
|
-
maxWidth: l(
|
|
943
|
-
labels: l(
|
|
946
|
+
display: l(c).display ?? !1,
|
|
947
|
+
position: l(c).position,
|
|
948
|
+
maxHeight: l(c).maxHeight,
|
|
949
|
+
maxWidth: l(c).maxWidth,
|
|
950
|
+
labels: l(c).labels
|
|
944
951
|
},
|
|
945
|
-
datalabels: l(
|
|
952
|
+
datalabels: l(S),
|
|
946
953
|
"maintain-aspect-ratio": !1,
|
|
947
954
|
style: ne({
|
|
948
955
|
"--chart-width": l(i) !== void 0 ? l(i) + "px" : "100%",
|
|
@@ -963,19 +970,19 @@ const _a = { class: "my-4" }, ka = {
|
|
|
963
970
|
emits: ["update:modelValue"],
|
|
964
971
|
setup(e) {
|
|
965
972
|
var p;
|
|
966
|
-
const n = e,
|
|
973
|
+
const n = e, m = te(e, "modelValue"), t = ((p = m.value.data) == null ? void 0 : p.xAxis) ?? [], x = y(
|
|
967
974
|
() => t.length === 1 && T.value.length > 0 && T.value.every((s) => s.values.length === 1)
|
|
968
|
-
),
|
|
975
|
+
), L = y(() => x.value ? ["", t[0], ""] : t), S = h(null), T = y(() => {
|
|
969
976
|
var s;
|
|
970
|
-
return ((s =
|
|
971
|
-
}), { datalabels: z, xCfg:
|
|
972
|
-
|
|
973
|
-
),
|
|
977
|
+
return ((s = m.value.data) == null ? void 0 : s.datasets) ?? [];
|
|
978
|
+
}), { datalabels: z, xCfg: u, yCfg: c, isTransposed: i, legend: r, chartWidth: b, chartHeight: f } = We(
|
|
979
|
+
m.value
|
|
980
|
+
), g = y(() => T.value.length > 0 ? [
|
|
974
981
|
...T.value.map((s, C) => {
|
|
975
|
-
let
|
|
976
|
-
return x.value && (
|
|
982
|
+
let w = s.values;
|
|
983
|
+
return x.value && (w = [NaN, w[0], NaN]), {
|
|
977
984
|
label: s.name,
|
|
978
|
-
data:
|
|
985
|
+
data: w,
|
|
979
986
|
dash: s.isCompare,
|
|
980
987
|
fill: !1,
|
|
981
988
|
color: Q({ index: C, isCompare: s.isCompare }),
|
|
@@ -986,28 +993,28 @@ const _a = { class: "my-4" }, ka = {
|
|
|
986
993
|
pointBorderWidth: x.value ? 2 : void 0
|
|
987
994
|
};
|
|
988
995
|
})
|
|
989
|
-
] : []),
|
|
996
|
+
] : []), d = Ee();
|
|
990
997
|
function E() {
|
|
991
|
-
return
|
|
998
|
+
return d.extractChartSize(S.value, n.tileIndex) || { width: 0, height: 0 };
|
|
992
999
|
}
|
|
993
|
-
return
|
|
1000
|
+
return ke(() => {
|
|
994
1001
|
X(() => {
|
|
995
1002
|
E();
|
|
996
1003
|
});
|
|
997
|
-
}), J([
|
|
1004
|
+
}), J([g], () => {
|
|
998
1005
|
X(() => E());
|
|
999
1006
|
}), (s, C) => {
|
|
1000
|
-
const
|
|
1007
|
+
const w = V("FmLineChart");
|
|
1001
1008
|
return W(), N(oe, null, [
|
|
1002
1009
|
pe(s.$slots, "menu"),
|
|
1003
|
-
B(
|
|
1010
|
+
B(w, {
|
|
1004
1011
|
ref_key: "chartRef",
|
|
1005
|
-
ref:
|
|
1012
|
+
ref: S,
|
|
1006
1013
|
class: "line-chart",
|
|
1007
|
-
datasets:
|
|
1008
|
-
"x-axis": { categories:
|
|
1009
|
-
"x-cfg": l(
|
|
1010
|
-
"y-cfg": l(
|
|
1014
|
+
datasets: g.value,
|
|
1015
|
+
"x-axis": { categories: L.value },
|
|
1016
|
+
"x-cfg": l(u),
|
|
1017
|
+
"y-cfg": l(c),
|
|
1011
1018
|
transpose: l(i),
|
|
1012
1019
|
legend: {
|
|
1013
1020
|
display: l(r).display ?? !1,
|
|
@@ -1020,8 +1027,8 @@ const _a = { class: "my-4" }, ka = {
|
|
|
1020
1027
|
datalabels: l(z),
|
|
1021
1028
|
"maintain-aspect-ratio": !1,
|
|
1022
1029
|
style: ne({
|
|
1023
|
-
"--chart-width": l(
|
|
1024
|
-
"--chart-height": l(
|
|
1030
|
+
"--chart-width": l(b) !== void 0 ? l(b) + "px" : "100%",
|
|
1031
|
+
"--chart-height": l(f) !== void 0 ? l(f) + "px" : "calc(100% - 36px)"
|
|
1025
1032
|
})
|
|
1026
1033
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1027
1034
|
], 64);
|
|
@@ -1061,19 +1068,19 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1061
1068
|
emits: ["update:modelValue"],
|
|
1062
1069
|
setup(e) {
|
|
1063
1070
|
var p;
|
|
1064
|
-
const n = e,
|
|
1071
|
+
const n = e, m = te(e, "modelValue"), t = ((p = m.value.data) == null ? void 0 : p.xAxis) ?? [], x = y(
|
|
1065
1072
|
() => t.length === 1 && T.value.length > 0 && T.value.every((s) => s.values.length === 1)
|
|
1066
|
-
),
|
|
1073
|
+
), L = y(() => x.value ? ["", t[0], ""] : t), S = h(null), T = y(() => {
|
|
1067
1074
|
var s;
|
|
1068
|
-
return ((s =
|
|
1069
|
-
}), { datalabels: z, xCfg:
|
|
1070
|
-
|
|
1071
|
-
),
|
|
1075
|
+
return ((s = m.value.data) == null ? void 0 : s.datasets) ?? [];
|
|
1076
|
+
}), { datalabels: z, xCfg: u, yCfg: c, isTransposed: i, legend: r, chartWidth: b, chartHeight: f } = We(
|
|
1077
|
+
m.value
|
|
1078
|
+
), g = y(() => T.value.length > 0 ? [
|
|
1072
1079
|
...T.value.map((s, C) => {
|
|
1073
|
-
let
|
|
1074
|
-
return x.value && (
|
|
1080
|
+
let w = s.values;
|
|
1081
|
+
return x.value && (w = [NaN, w[0], NaN]), {
|
|
1075
1082
|
label: s.name,
|
|
1076
|
-
data:
|
|
1083
|
+
data: w,
|
|
1077
1084
|
dash: !!s.isCompare,
|
|
1078
1085
|
fill: !1,
|
|
1079
1086
|
color: Q({ index: C, isCompare: s.isCompare }),
|
|
@@ -1084,28 +1091,28 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1084
1091
|
pointBorderWidth: x.value ? 2 : void 0
|
|
1085
1092
|
};
|
|
1086
1093
|
})
|
|
1087
|
-
] : []),
|
|
1094
|
+
] : []), d = Ee();
|
|
1088
1095
|
function E() {
|
|
1089
|
-
return
|
|
1096
|
+
return d.extractChartSize(S.value, n.tileIndex) || { width: 0, height: 0 };
|
|
1090
1097
|
}
|
|
1091
|
-
return
|
|
1098
|
+
return ke(() => {
|
|
1092
1099
|
X(() => {
|
|
1093
1100
|
E();
|
|
1094
1101
|
});
|
|
1095
|
-
}), J([
|
|
1102
|
+
}), J([g], () => {
|
|
1096
1103
|
X(() => E());
|
|
1097
1104
|
}), (s, C) => {
|
|
1098
|
-
const
|
|
1105
|
+
const w = V("FmLineChart");
|
|
1099
1106
|
return W(), N(oe, null, [
|
|
1100
1107
|
pe(s.$slots, "menu"),
|
|
1101
|
-
B(
|
|
1108
|
+
B(w, {
|
|
1102
1109
|
ref_key: "chartRef",
|
|
1103
|
-
ref:
|
|
1110
|
+
ref: S,
|
|
1104
1111
|
class: "line-chart",
|
|
1105
|
-
datasets:
|
|
1106
|
-
"x-axis": { categories:
|
|
1107
|
-
"x-cfg": l(
|
|
1108
|
-
"y-cfg": l(
|
|
1112
|
+
datasets: g.value,
|
|
1113
|
+
"x-axis": { categories: L.value },
|
|
1114
|
+
"x-cfg": l(u),
|
|
1115
|
+
"y-cfg": l(c),
|
|
1109
1116
|
transpose: l(i),
|
|
1110
1117
|
legend: {
|
|
1111
1118
|
display: l(r).display ?? !1,
|
|
@@ -1117,8 +1124,8 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1117
1124
|
datalabels: l(z),
|
|
1118
1125
|
"maintain-aspect-ratio": !1,
|
|
1119
1126
|
style: ne({
|
|
1120
|
-
"--chart-width": l(
|
|
1121
|
-
"--chart-height": l(
|
|
1127
|
+
"--chart-width": l(b) !== void 0 ? l(b) + "px" : "100%",
|
|
1128
|
+
"--chart-height": l(f) !== void 0 ? l(f) + "px" : "calc(100% - 36px)"
|
|
1122
1129
|
})
|
|
1123
1130
|
}, null, 8, ["datasets", "x-axis", "x-cfg", "y-cfg", "transpose", "legend", "datalabels", "style"])
|
|
1124
1131
|
], 64);
|
|
@@ -1135,51 +1142,51 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1135
1142
|
}),
|
|
1136
1143
|
emits: ["update:modelValue"],
|
|
1137
1144
|
setup(e) {
|
|
1138
|
-
const { t: n } = Me(), { FmForm:
|
|
1139
|
-
function
|
|
1140
|
-
var
|
|
1141
|
-
(
|
|
1145
|
+
const { t: n } = Me(), { FmForm: m } = ra, t = e, x = h(), L = te(e, "modelValue"), S = h(!0), T = h(!1), z = Rt(), { selectedLocationIds: u, dateRange: c, timeRange: i } = ze(at()), r = h(Ye.PORTRAIT);
|
|
1146
|
+
function b() {
|
|
1147
|
+
var g;
|
|
1148
|
+
(g = x.value) == null || g.validateInputs();
|
|
1142
1149
|
}
|
|
1143
|
-
async function
|
|
1150
|
+
async function f() {
|
|
1144
1151
|
T.value = !0;
|
|
1145
1152
|
try {
|
|
1146
|
-
t.index != null && await
|
|
1153
|
+
t.index != null && await _t({
|
|
1147
1154
|
reportType: t.reportType,
|
|
1148
1155
|
index: t.index,
|
|
1149
1156
|
orientationTypes: [r.value],
|
|
1150
|
-
isCombinedLocationLayout:
|
|
1157
|
+
isCombinedLocationLayout: S.value,
|
|
1151
1158
|
timeRange: i.value,
|
|
1152
|
-
dateRange:
|
|
1153
|
-
locationIds:
|
|
1159
|
+
dateRange: c.value,
|
|
1160
|
+
locationIds: u.value
|
|
1154
1161
|
});
|
|
1155
|
-
} catch (
|
|
1156
|
-
z.open({ message:
|
|
1162
|
+
} catch (g) {
|
|
1163
|
+
z.open({ message: g.message, type: "error" });
|
|
1157
1164
|
} finally {
|
|
1158
1165
|
T.value = !1;
|
|
1159
1166
|
}
|
|
1160
1167
|
}
|
|
1161
|
-
return (
|
|
1168
|
+
return (g, d) => {
|
|
1162
1169
|
const E = V("FmRadio"), p = V("FmRadioGroup"), s = V("FmButton"), C = V("FmDialog");
|
|
1163
1170
|
return W(), U(C, {
|
|
1164
|
-
modelValue:
|
|
1165
|
-
"onUpdate:modelValue":
|
|
1171
|
+
modelValue: L.value,
|
|
1172
|
+
"onUpdate:modelValue": d[2] || (d[2] = (w) => L.value = w),
|
|
1166
1173
|
overlay: !0,
|
|
1167
1174
|
"z-index": 10
|
|
1168
1175
|
}, {
|
|
1169
|
-
"dialog-header": q(() =>
|
|
1170
|
-
|
|
1176
|
+
"dialog-header": q(() => d[3] || (d[3] = [
|
|
1177
|
+
Qt("Select Orientation")
|
|
1171
1178
|
])),
|
|
1172
1179
|
default: q(() => [
|
|
1173
|
-
B(l(
|
|
1180
|
+
B(l(m), {
|
|
1174
1181
|
ref_key: "form",
|
|
1175
1182
|
ref: x,
|
|
1176
|
-
onValidationSuccess:
|
|
1183
|
+
onValidationSuccess: f
|
|
1177
1184
|
}, {
|
|
1178
1185
|
default: q(() => [
|
|
1179
1186
|
P("div", Va, [
|
|
1180
1187
|
B(p, {
|
|
1181
1188
|
modelValue: r.value,
|
|
1182
|
-
"onUpdate:modelValue":
|
|
1189
|
+
"onUpdate:modelValue": d[0] || (d[0] = (w) => r.value = w)
|
|
1183
1190
|
}, {
|
|
1184
1191
|
default: q(() => [
|
|
1185
1192
|
B(E, {
|
|
@@ -1195,17 +1202,17 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1195
1202
|
}, 8, ["modelValue"])
|
|
1196
1203
|
]),
|
|
1197
1204
|
P("div", Ha, [
|
|
1198
|
-
|
|
1205
|
+
d[4] || (d[4] = P("div", { class: "grow" }, null, -1)),
|
|
1199
1206
|
B(s, {
|
|
1200
1207
|
label: l(n)("report.common.cancel"),
|
|
1201
1208
|
variant: "tertiary",
|
|
1202
|
-
onClick:
|
|
1209
|
+
onClick: d[1] || (d[1] = (w) => L.value = !1)
|
|
1203
1210
|
}, null, 8, ["label"]),
|
|
1204
1211
|
P("div", null, [
|
|
1205
1212
|
B(s, {
|
|
1206
1213
|
label: l(n)("report.common.download"),
|
|
1207
1214
|
loading: T.value,
|
|
1208
|
-
onClick:
|
|
1215
|
+
onClick: b
|
|
1209
1216
|
}, null, 8, ["label", "loading"])
|
|
1210
1217
|
])
|
|
1211
1218
|
])
|
|
@@ -1246,88 +1253,88 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1246
1253
|
}),
|
|
1247
1254
|
emits: ["update:modelValue"],
|
|
1248
1255
|
setup(e) {
|
|
1249
|
-
const n =
|
|
1256
|
+
const n = h(!0), m = te(e, "modelValue"), t = m.value.widget.config, { t: x, te: L } = Me(), S = e, T = h(null), z = h(t.rollup), u = h($e()), c = h(t.drillDimension), i = y(() => {
|
|
1250
1257
|
if (ce.value.length > 0) {
|
|
1251
1258
|
const a = ce.value.findIndex(
|
|
1252
|
-
($) => $.value ===
|
|
1259
|
+
($) => $.value === c.value
|
|
1253
1260
|
);
|
|
1254
1261
|
return a >= 0 ? a : 0;
|
|
1255
1262
|
} else
|
|
1256
1263
|
return -1;
|
|
1257
|
-
}), r =
|
|
1264
|
+
}), r = y(() => i.value !== 0), b = y(
|
|
1258
1265
|
() => i.value != ce.value.length - 1
|
|
1259
|
-
),
|
|
1260
|
-
() =>
|
|
1261
|
-
),
|
|
1266
|
+
), f = h(t.showTitle ?? !0), g = h(t.titleFontSize ?? 14), d = h(t.titleBold ?? !1), E = h(t.titleItalic ?? !1), p = h(t.titleUnderline ?? !1), s = h(t.chartWidth ?? void 0), C = h(t.chartHeight ?? void 0), w = h(t.showLabel ?? !1), k = h(t.labelAlign ?? Ze.center), D = h(t.labelAnchor ?? Ke.center), o = h(t.labelRotation ?? 0), v = h(t.labelOffset ?? 0), R = h(t.labelFontSize ?? 12), _ = y(() => t.showSearchBar), A = h(t.showX ?? !0), H = h(t.xPosition ?? Qe.bottom), Y = h(t.showXGrid ?? !1), O = h(t.showXTick ?? !0), G = h(t.xTickFontSize ?? 12), j = h(t.showXTitle ?? !1), De = h(t.xTitle ?? ""), Ae = h(t.xTitleFontSize ?? 12), Ve = h(t.showY ?? !0), _e = h(t.yPosition ?? et.left), Te = h(t.showYGrid ?? !1), fe = h(t.showYTick ?? !0), se = h(t.yTickFontSize ?? 12), re = h(t.showYTitle ?? !1), ae = h(t.yTitle ?? ""), ve = h(t.yTitleFontSize ?? 12), le = h(t.showLegend ?? void 0), ie = h(t.legendPosition ?? tt.top), ue = h(t.usePointStyle ?? !0), Ne = h(t.legendMaxHeight), ot = h(t.legendMaxWidth), nt = h(t.rowHeight ?? 0), st = h(t.colWidths ?? []), Ie = h(!1), qe = h(""), { breakpoints: ge, getBreakpointsBoundary: Re } = Tt(), rt = h(), I = y(
|
|
1267
|
+
() => S.customScreenWidth === void 0 ? window.innerWidth : S.customScreenWidth
|
|
1268
|
+
), Lt = y(
|
|
1262
1269
|
() => (I == null ? void 0 : I.value) > Re("xs")[1] && (I == null ? void 0 : I.value) <= Re("sm")[1]
|
|
1263
|
-
),
|
|
1270
|
+
), zt = y(
|
|
1264
1271
|
() => (I == null ? void 0 : I.value) > Re("sm")[1] && (I == null ? void 0 : I.value) <= Re("md")[1]
|
|
1265
|
-
),
|
|
1266
|
-
const a =
|
|
1267
|
-
return
|
|
1268
|
-
}), He =
|
|
1269
|
-
() => ua.find((a) => a.type ===
|
|
1272
|
+
), Et = y(() => (I == null ? void 0 : I.value) > Re("md")[1]), Wt = y(() => {
|
|
1273
|
+
const a = m.value.size.width;
|
|
1274
|
+
return Et.value || zt.value ? Ea(a) : Lt.value ? Wa(a) : Da(a);
|
|
1275
|
+
}), He = y(
|
|
1276
|
+
() => ua.find((a) => a.type === m.value.widget.type)
|
|
1270
1277
|
), ye = wt(() => {
|
|
1271
1278
|
var a;
|
|
1272
|
-
rt.value =
|
|
1273
|
-
}),
|
|
1279
|
+
rt.value = Mt((a = T.value) == null ? void 0 : a.$el.offsetWidth), u.value = $e();
|
|
1280
|
+
}), Dt = y(() => {
|
|
1274
1281
|
if (ca(M.value.type, be.value))
|
|
1275
|
-
switch (
|
|
1276
|
-
case
|
|
1282
|
+
switch (m.value.widget.type) {
|
|
1283
|
+
case F.BarChart:
|
|
1277
1284
|
return ha;
|
|
1278
|
-
case
|
|
1285
|
+
case F.StackBarChart:
|
|
1279
1286
|
return La;
|
|
1280
|
-
case
|
|
1287
|
+
case F.LineChart:
|
|
1281
1288
|
return Aa;
|
|
1282
|
-
case
|
|
1289
|
+
case F.StackLineChart:
|
|
1283
1290
|
return za;
|
|
1284
|
-
case
|
|
1291
|
+
case F.Circular:
|
|
1285
1292
|
return ma;
|
|
1286
|
-
case
|
|
1293
|
+
case F.Scorecard:
|
|
1287
1294
|
return ba;
|
|
1288
|
-
case
|
|
1295
|
+
case F.Spacer:
|
|
1289
1296
|
return Ca;
|
|
1290
|
-
case
|
|
1297
|
+
case F.Table:
|
|
1291
1298
|
return Fa;
|
|
1292
1299
|
default:
|
|
1293
1300
|
return xt;
|
|
1294
1301
|
}
|
|
1295
1302
|
else
|
|
1296
1303
|
return xt;
|
|
1297
|
-
}), be =
|
|
1304
|
+
}), be = h(null), {
|
|
1298
1305
|
selectedLocationIds: Oe,
|
|
1299
1306
|
dateRange: it,
|
|
1300
|
-
compareDateRange:
|
|
1307
|
+
compareDateRange: At,
|
|
1301
1308
|
timeRange: ut,
|
|
1302
|
-
globalFilters:
|
|
1309
|
+
globalFilters: Vt,
|
|
1303
1310
|
isGlobalFiltersLoading: Ue
|
|
1304
|
-
} = ze(at()), { businessId:
|
|
1305
|
-
const a = JSON.parse(JSON.stringify(
|
|
1311
|
+
} = ze(at()), { businessId: Ht } = ze(lt()), Bt = h(!0), M = y(() => {
|
|
1312
|
+
const a = JSON.parse(JSON.stringify(m.value.widget));
|
|
1306
1313
|
return {
|
|
1307
1314
|
...a,
|
|
1308
1315
|
config: {
|
|
1309
1316
|
...a.config,
|
|
1310
1317
|
rollup: z.value,
|
|
1311
|
-
drillDimension:
|
|
1318
|
+
drillDimension: c.value,
|
|
1312
1319
|
showGrandTotal: !1
|
|
1313
1320
|
}
|
|
1314
1321
|
};
|
|
1315
1322
|
});
|
|
1316
|
-
function
|
|
1323
|
+
function $t() {
|
|
1317
1324
|
return {
|
|
1318
1325
|
data: be.value,
|
|
1319
|
-
showTitle:
|
|
1320
|
-
titleFontSize:
|
|
1321
|
-
titleBold:
|
|
1326
|
+
showTitle: f.value,
|
|
1327
|
+
titleFontSize: g.value,
|
|
1328
|
+
titleBold: d.value,
|
|
1322
1329
|
titleItalic: E.value,
|
|
1323
1330
|
titleUnderline: p.value,
|
|
1324
1331
|
chartHeight: C.value,
|
|
1325
1332
|
chartWidth: s.value,
|
|
1326
|
-
showLabel:
|
|
1333
|
+
showLabel: w.value,
|
|
1327
1334
|
labelAnchor: D.value,
|
|
1328
|
-
labelAlign:
|
|
1335
|
+
labelAlign: k.value,
|
|
1329
1336
|
labelRotation: o.value,
|
|
1330
|
-
labelOffset:
|
|
1337
|
+
labelOffset: v.value,
|
|
1331
1338
|
labelFontSize: R.value,
|
|
1332
1339
|
showX: A.value,
|
|
1333
1340
|
xPosition: H.value,
|
|
@@ -1338,7 +1345,7 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1338
1345
|
xTitle: De.value,
|
|
1339
1346
|
xTitleFontSize: Ae.value,
|
|
1340
1347
|
showY: Ve.value,
|
|
1341
|
-
yPosition:
|
|
1348
|
+
yPosition: _e.value,
|
|
1342
1349
|
showYGrid: Te.value,
|
|
1343
1350
|
showYTick: fe.value,
|
|
1344
1351
|
yTitle: ae.value,
|
|
@@ -1353,7 +1360,7 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1353
1360
|
legendMaxWidth: ot.value
|
|
1354
1361
|
};
|
|
1355
1362
|
}
|
|
1356
|
-
function
|
|
1363
|
+
function Pt() {
|
|
1357
1364
|
return {
|
|
1358
1365
|
data: be.value,
|
|
1359
1366
|
filterText: qe.value,
|
|
@@ -1362,59 +1369,59 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1362
1369
|
colWidths: st.value
|
|
1363
1370
|
};
|
|
1364
1371
|
}
|
|
1365
|
-
const ct =
|
|
1372
|
+
const ct = y(() => {
|
|
1366
1373
|
switch (M.value.type) {
|
|
1367
|
-
case
|
|
1374
|
+
case F.Table:
|
|
1375
|
+
return Pt();
|
|
1376
|
+
case F.BarChart:
|
|
1377
|
+
case F.LineChart:
|
|
1378
|
+
case F.StackBarChart:
|
|
1379
|
+
case F.StackLineChart:
|
|
1380
|
+
case F.Circular:
|
|
1368
1381
|
return $t();
|
|
1369
|
-
case L.BarChart:
|
|
1370
|
-
case L.LineChart:
|
|
1371
|
-
case L.StackBarChart:
|
|
1372
|
-
case L.StackLineChart:
|
|
1373
|
-
case L.Circular:
|
|
1374
|
-
return Bt();
|
|
1375
1382
|
default:
|
|
1376
1383
|
return { data: be.value };
|
|
1377
1384
|
}
|
|
1378
|
-
}), dt =
|
|
1379
|
-
const { config: a } =
|
|
1385
|
+
}), dt = y(() => {
|
|
1386
|
+
const { config: a } = m.value.widget;
|
|
1380
1387
|
if (a.rollup != null) {
|
|
1381
1388
|
const $ = [...a.dimensions].filter((de) => !de.hide);
|
|
1382
1389
|
return $.sort(
|
|
1383
1390
|
(de, Fe) => (a.rowIds || []).indexOf(Ge(de)) - (a.rowIds || []).indexOf(Ge(Fe))
|
|
1384
1391
|
), [
|
|
1385
|
-
{ label: Ce(x,
|
|
1386
|
-
{ label: Ce(x,
|
|
1392
|
+
{ label: Ce(x, L, "None", "other"), value: null },
|
|
1393
|
+
{ label: Ce(x, L, "Grand Total", "other"), value: 0 },
|
|
1387
1394
|
...[...$].slice(0, $.length - 1).map((de, Fe) => ({
|
|
1388
|
-
label: Ce(x,
|
|
1395
|
+
label: Ce(x, L, de.label, "other"),
|
|
1389
1396
|
value: Fe + 1
|
|
1390
1397
|
}))
|
|
1391
1398
|
];
|
|
1392
1399
|
}
|
|
1393
1400
|
return [];
|
|
1394
|
-
}), ce =
|
|
1401
|
+
}), ce = y(() => {
|
|
1395
1402
|
const { config: a } = M.value;
|
|
1396
1403
|
return a.isDrillable ? a.dimensions.map(($) => ({
|
|
1397
|
-
label: Ce(x,
|
|
1404
|
+
label: Ce(x, L, $.label, "other"),
|
|
1398
1405
|
value: Ge($)
|
|
1399
1406
|
})) : [];
|
|
1400
1407
|
});
|
|
1401
1408
|
J(
|
|
1402
|
-
() =>
|
|
1409
|
+
() => m.value.widget.config,
|
|
1403
1410
|
(a) => {
|
|
1404
|
-
z.value = a.rollup,
|
|
1411
|
+
z.value = a.rollup, f.value = a.showTitle ?? !0, g.value = a.titleFontSize ?? 14, d.value = a.titleBold ?? !1, E.value = a.titleItalic ?? !1, p.value = a.titleUnderline ?? !1, C.value = a.chartHeight ?? void 0, s.value = a.chartWidth ?? void 0, w.value = a.showLabel ?? !1, k.value = a.labelAlign ?? Ze.center, D.value = a.labelAnchor ?? Ke.center, o.value = a.labelRotation ?? 0, v.value = a.labelOffset ?? 0, R.value = a.labelFontSize ?? 12, A.value = a.showX ?? !0, H.value = a.xPosition ?? Qe.bottom, Y.value = a.showXGrid ?? !1, O.value = a.showXTick ?? !0, G.value = a.xTickFontSize ?? 12, j.value = a.showXTitle ?? !1, De.value = a.xTitle ?? "", Ae.value = a.xTitleFontSize ?? 12, Ve.value = a.showY ?? !0, _e.value = a.yPosition ?? et.left, Te.value = a.showYGrid ?? !1, fe.value = a.showYTick ?? !0, se.value = a.yTickFontSize ?? 12, re.value = a.showYTitle ?? !1, ae.value = a.yTitle ?? "", ve.value = a.yTitleFontSize ?? 12, le.value = a.showLegend ?? void 0, ie.value = a.legendPosition ?? tt.top, ue.value = a.usePointStyle ?? !0, Ne.value = a.legendMaxHeight, ot.value = a.legendMaxWidth, nt.value = a.rowHeight ?? 0, st.value = a.colWidths ?? [];
|
|
1405
1412
|
},
|
|
1406
1413
|
{ deep: !0 }
|
|
1407
1414
|
), J([() => z.value], () => {
|
|
1408
|
-
z.value !== null && (
|
|
1415
|
+
z.value !== null && (m.value.widget.config.rollup = z.value);
|
|
1409
1416
|
}), J(
|
|
1410
1417
|
[
|
|
1411
1418
|
() => M.value,
|
|
1412
1419
|
() => it.value,
|
|
1413
1420
|
() => ut.value,
|
|
1414
|
-
() =>
|
|
1421
|
+
() => At.value,
|
|
1415
1422
|
() => Oe.value,
|
|
1423
|
+
() => Ht.value,
|
|
1416
1424
|
() => Vt.value,
|
|
1417
|
-
() => At.value,
|
|
1418
1425
|
() => Ue.value
|
|
1419
1426
|
],
|
|
1420
1427
|
() => {
|
|
@@ -1424,17 +1431,17 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1424
1431
|
deep: !0
|
|
1425
1432
|
}
|
|
1426
1433
|
), J(
|
|
1427
|
-
[() =>
|
|
1434
|
+
[() => m.value.size],
|
|
1428
1435
|
() => {
|
|
1429
1436
|
ye();
|
|
1430
1437
|
},
|
|
1431
1438
|
{ deep: !0 }
|
|
1432
|
-
),
|
|
1439
|
+
), ke(() => {
|
|
1433
1440
|
ye(), ge.value.sm || ge.value.md || ge.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", ye)) : addEventListener("resize", ye), mt();
|
|
1434
|
-
}),
|
|
1441
|
+
}), ea(() => {
|
|
1435
1442
|
ge.value.sm || ge.value.md || ge.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", ye)) : removeEventListener("resize", ye);
|
|
1436
1443
|
});
|
|
1437
|
-
const ht =
|
|
1444
|
+
const ht = Rt();
|
|
1438
1445
|
let Be;
|
|
1439
1446
|
async function mt() {
|
|
1440
1447
|
if (Oe.value.length === 0 || Ue.value) {
|
|
@@ -1451,51 +1458,51 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1451
1458
|
try {
|
|
1452
1459
|
n.value = !0, Be && Be.abort(), Be = new AbortController();
|
|
1453
1460
|
const a = Be.signal;
|
|
1454
|
-
be.value = await wt(
|
|
1461
|
+
be.value = await wt(oa, 500)(M.value, a, m.value.id), u.value = $e(), n.value = !1;
|
|
1455
1462
|
} catch (a) {
|
|
1456
1463
|
a.code !== "ERR_CANCELED" && (be.value = null, ht.open({ message: `Invalid chart ${M.value.type}`, type: "error" }), console.log(a), n.value = !1);
|
|
1457
1464
|
}
|
|
1458
1465
|
}
|
|
1459
|
-
function
|
|
1460
|
-
switch (
|
|
1466
|
+
function Mt(a) {
|
|
1467
|
+
switch (m.value.widget.type) {
|
|
1461
1468
|
case "SPACER":
|
|
1462
1469
|
return;
|
|
1463
1470
|
case "SCORECARD":
|
|
1464
1471
|
return;
|
|
1465
1472
|
case "TABLE":
|
|
1466
|
-
return `${
|
|
1473
|
+
return `${m.value.size.height * 100 + (_.value ? 72 : 0) + 96.5}px`;
|
|
1467
1474
|
}
|
|
1468
|
-
return `${Math.max(a /
|
|
1475
|
+
return `${Math.max(a / m.value.size.width, 90) * m.value.size.height}px`;
|
|
1469
1476
|
}
|
|
1470
|
-
function
|
|
1477
|
+
function Nt() {
|
|
1471
1478
|
const a = i.value - 1;
|
|
1472
|
-
a >= 0 && (
|
|
1479
|
+
a >= 0 && (c.value = ce.value[a].value);
|
|
1473
1480
|
}
|
|
1474
|
-
function
|
|
1481
|
+
function It() {
|
|
1475
1482
|
const a = i.value + 1;
|
|
1476
|
-
a >= 0 && a < ce.value.length && (
|
|
1483
|
+
a >= 0 && a < ce.value.length && (c.value = ce.value[a].value);
|
|
1477
1484
|
}
|
|
1478
|
-
const pt =
|
|
1479
|
-
label:
|
|
1485
|
+
const pt = h(xe.EXCEL), ft = h(), qt = Object.values(xe).map((a) => ({
|
|
1486
|
+
label: na(a),
|
|
1480
1487
|
value: a,
|
|
1481
1488
|
onClick: async () => {
|
|
1482
|
-
a === xe.EXCEL || a === xe.PDFFULLSIZE || a === xe.PDFRECEIPT ? await
|
|
1489
|
+
a === xe.EXCEL || a === xe.PDFFULLSIZE || a === xe.PDFRECEIPT ? await _t({
|
|
1483
1490
|
reportType: a,
|
|
1484
|
-
index:
|
|
1485
|
-
isCombinedLocationLayout:
|
|
1491
|
+
index: S.index,
|
|
1492
|
+
isCombinedLocationLayout: Bt.value,
|
|
1486
1493
|
timeRange: ut.value,
|
|
1487
1494
|
dateRange: it.value,
|
|
1488
1495
|
locationIds: Oe.value
|
|
1489
|
-
}) : a === xe.PDF && (pt.value = a, ft.value =
|
|
1496
|
+
}) : a === xe.PDF && (pt.value = a, ft.value = S.index, Ie.value = !0);
|
|
1490
1497
|
}
|
|
1491
|
-
})),
|
|
1498
|
+
})), Ot = M.value.type === F.Spacer ? "flat" : "outlined", Ut = M.value.type === F.Spacer ? "p-0" : "p-16";
|
|
1492
1499
|
return (a, $) => {
|
|
1493
|
-
const de = V("FmTooltip"), Fe = V("FmSearch"),
|
|
1494
|
-
return W(), U(
|
|
1500
|
+
const de = V("FmTooltip"), Fe = V("FmSearch"), Xt = V("FmCheckbox"), Xe = V("FmButton"), Yt = V("FmSelect"), Gt = V("FmMenuItem"), jt = V("FmMenu"), Jt = V("FmForm"), Kt = V("FmCircularProgress"), Zt = V("FmCard");
|
|
1501
|
+
return W(), U(Zt, {
|
|
1495
1502
|
ref_key: "tileCard",
|
|
1496
1503
|
ref: T,
|
|
1497
|
-
class: Pe(`${
|
|
1498
|
-
variant: l(
|
|
1504
|
+
class: Pe(`${Wt.value} ${l(Ut)}`),
|
|
1505
|
+
variant: l(Ot)
|
|
1499
1506
|
}, {
|
|
1500
1507
|
default: q(() => [
|
|
1501
1508
|
B(Ba, {
|
|
@@ -1508,14 +1515,14 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1508
1515
|
key: 0,
|
|
1509
1516
|
style: ne({ height: rt.value })
|
|
1510
1517
|
}, [
|
|
1511
|
-
(W(), U(
|
|
1512
|
-
key:
|
|
1518
|
+
(W(), U(ta(Dt.value), {
|
|
1519
|
+
key: u.value,
|
|
1513
1520
|
modelValue: ct.value,
|
|
1514
1521
|
"onUpdate:modelValue": $[4] || ($[4] = (we) => ct.value = we),
|
|
1515
|
-
"tile-index":
|
|
1522
|
+
"tile-index": S.index
|
|
1516
1523
|
}, {
|
|
1517
1524
|
menu: q(() => [
|
|
1518
|
-
B(
|
|
1525
|
+
B(Jt, { class: "flex items-center gap-2" }, {
|
|
1519
1526
|
default: q(() => {
|
|
1520
1527
|
var we, vt, gt, yt;
|
|
1521
1528
|
return [
|
|
@@ -1527,19 +1534,19 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1527
1534
|
disabled: !M.value.description
|
|
1528
1535
|
}, {
|
|
1529
1536
|
default: q(() => [
|
|
1530
|
-
|
|
1537
|
+
f.value !== !1 ? (W(), N("p", {
|
|
1531
1538
|
key: 0,
|
|
1532
1539
|
style: ne({
|
|
1533
|
-
fontSize:
|
|
1534
|
-
fontWeight:
|
|
1540
|
+
fontSize: g.value + "px",
|
|
1541
|
+
fontWeight: d.value ? "bold" : "normal",
|
|
1535
1542
|
fontStyle: E.value ? "italic" : "normal",
|
|
1536
1543
|
textDecoration: p.value ? "underline" : "none"
|
|
1537
1544
|
}),
|
|
1538
1545
|
class: Pe(["text-fm-color-typo-secondary line-clamp-1", [
|
|
1539
|
-
|
|
1546
|
+
g.value <= 18 ? "fm-typo-en-body-md-400" : "",
|
|
1540
1547
|
M.value.description ? "border-b-2 border-dashed border-gray-300" : ""
|
|
1541
1548
|
]])
|
|
1542
|
-
}, Le(l(Ce)(l(x), l(
|
|
1549
|
+
}, Le(l(Ce)(l(x), l(L), M.value.title, "other")), 7)) : he("", !0)
|
|
1543
1550
|
]),
|
|
1544
1551
|
_: 1
|
|
1545
1552
|
}, 8, ["content", "disabled"]),
|
|
@@ -1549,36 +1556,36 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1549
1556
|
"onUpdate:modelValue": $[1] || ($[1] = (K) => qe.value = K),
|
|
1550
1557
|
class: "grow"
|
|
1551
1558
|
}, null, 8, ["modelValue"])) : (W(), N("div", $a)),
|
|
1552
|
-
|
|
1553
|
-
modelValue:
|
|
1554
|
-
"onUpdate:modelValue": $[2] || ($[2] = (K) =>
|
|
1559
|
+
aa(B(Xt, {
|
|
1560
|
+
modelValue: w.value,
|
|
1561
|
+
"onUpdate:modelValue": $[2] || ($[2] = (K) => w.value = K),
|
|
1555
1562
|
label: "Label",
|
|
1556
1563
|
value: !1
|
|
1557
1564
|
}, null, 8, ["modelValue"]), [
|
|
1558
|
-
[
|
|
1565
|
+
[la, (vt = He.value) == null ? void 0 : vt.showLabel]
|
|
1559
1566
|
]),
|
|
1560
1567
|
(gt = He.value) != null && gt.showDrillDimension && ce.value.length > 0 ? (W(), N("div", Pa, [
|
|
1561
1568
|
B(Xe, {
|
|
1562
1569
|
icon: "arrow_upward",
|
|
1563
1570
|
variant: "tertiary",
|
|
1564
1571
|
disabled: !r.value,
|
|
1565
|
-
onClick:
|
|
1572
|
+
onClick: Nt
|
|
1566
1573
|
}, null, 8, ["disabled"]),
|
|
1567
1574
|
B(Xe, {
|
|
1568
1575
|
icon: "arrow_downward",
|
|
1569
1576
|
variant: "tertiary",
|
|
1570
|
-
disabled: !
|
|
1571
|
-
onClick:
|
|
1577
|
+
disabled: !b.value,
|
|
1578
|
+
onClick: It
|
|
1572
1579
|
}, null, 8, ["disabled"])
|
|
1573
1580
|
])) : he("", !0),
|
|
1574
|
-
(yt = He.value) != null && yt.showRollup && dt.value.length > 0 ? (W(), U(
|
|
1581
|
+
(yt = He.value) != null && yt.showRollup && dt.value.length > 0 ? (W(), U(Yt, {
|
|
1575
1582
|
key: 3,
|
|
1576
1583
|
modelValue: z.value,
|
|
1577
1584
|
"onUpdate:modelValue": $[3] || ($[3] = (K) => z.value = K),
|
|
1578
1585
|
class: "w-[150px]",
|
|
1579
1586
|
items: dt.value
|
|
1580
1587
|
}, null, 8, ["modelValue", "items"])) : he("", !0),
|
|
1581
|
-
|
|
1588
|
+
S.hideExport ? he("", !0) : (W(), U(jt, {
|
|
1582
1589
|
key: 4,
|
|
1583
1590
|
shift: !0
|
|
1584
1591
|
}, {
|
|
@@ -1589,7 +1596,7 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1589
1596
|
})
|
|
1590
1597
|
]),
|
|
1591
1598
|
default: q(() => [
|
|
1592
|
-
(W(!0), N(oe, null,
|
|
1599
|
+
(W(!0), N(oe, null, kt(l(qt), (K) => (W(), U(Gt, {
|
|
1593
1600
|
key: K.value,
|
|
1594
1601
|
label: K.label,
|
|
1595
1602
|
onClick: K.onClick
|
|
@@ -1604,7 +1611,7 @@ const Aa = /* @__PURE__ */ ee({
|
|
|
1604
1611
|
]),
|
|
1605
1612
|
_: 1
|
|
1606
1613
|
}, 8, ["modelValue", "tile-index"]))
|
|
1607
|
-
], 4)) : (W(), U(
|
|
1614
|
+
], 4)) : (W(), U(Kt, { key: 1 }))
|
|
1608
1615
|
]),
|
|
1609
1616
|
_: 1
|
|
1610
1617
|
}, 8, ["class", "variant"]);
|