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