@feedmepos/mf-report 5.19.8-beta.2 → 5.19.9

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