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