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