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