@feedmepos/mf-report 5.7.0 → 5.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- import { computed as h, defineComponent as U, useModel as G, ref as g, resolveComponent as F, createElementBlock as D, openBlock as x, Fragment as X, renderSlot as Z, createVNode as H, normalizeStyle as Y, unref as r, createElementVNode as A, toDisplayString as ne, withCtx as V, createBlock as M, createCommentVNode as Q, normalizeClass as me, h as je, watch as se, nextTick as xt, renderList as Ze, mergeModels as _t, onMounted as kt, onUnmounted as Rt, resolveDynamicComponent as Lt, withDirectives as Ft, vShow as Tt } from "vue";
2
- import { W as f, v as he, R as Et, g as Wt, d as Dt, q as zt } from "./v4-CJZMeb87.js";
3
- import { u as Re, b as et, a as Le } from "./global-loader-CbmVhJAK.js";
4
- import { d as Je } from "./index-BWqDfeY6.js";
1
+ import { computed as h, defineComponent as G, useModel as j, ref as y, resolveComponent as F, createElementBlock as z, openBlock as _, Fragment as U, renderSlot as Z, createVNode as H, normalizeStyle as Y, unref as r, createElementVNode as A, toDisplayString as ne, withCtx as V, createBlock as M, createCommentVNode as Q, normalizeClass as me, watch as le, nextTick as je, h as Je, renderList as et, mergeModels as xt, onMounted as kt, onUnmounted as Rt, resolveDynamicComponent as Lt, withDirectives as Ft, vShow as Et } from "vue";
2
+ import { W as v, v as he, R as Tt, g as Wt, d as zt, q as Dt } from "./v4-CJZMeb87.js";
3
+ import { u as Re, b as tt, a as Le } from "./global-loader-CbmVhJAK.js";
4
+ import { d as Ke } from "./index-BWqDfeY6.js";
5
5
  import { storeToRefs as we, defineStore as At } from "pinia";
6
6
  import { _ as Ht } from "./_plugin-vue_export-helper-CHgC5LLL.js";
7
7
  import { r as ae } from "./i18n-Cif1I9J2.js";
8
- import { _ as Ke } from "./NoData.vue_vue_type_script_setup_true_lang-CdFXBqlX.js";
8
+ import { _ as Qe } from "./NoData.vue_vue_type_script_setup_true_lang-CdFXBqlX.js";
9
9
  import { useBreakpoints as $t, useSnackbar as Pt } from "@feedmepos/ui-library";
10
- var be = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(be || {}), O = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(O || {}), Ce = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Ce || {}), Se = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Se || {}), xe = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(xe || {}), _e = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(_e || {}), ke = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(ke || {});
11
- f.Circular, f.Table, f.BarChart, f.LineChart, f.StackBarChart, f.StackLineChart, f.Scorecard, f.Spacer;
10
+ var be = /* @__PURE__ */ ((e) => (e.line = "LINE", e.bar = "BAR", e))(be || {}), O = /* @__PURE__ */ ((e) => (e.top = "TOP", e.bottom = "BOTTOM", e))(O || {}), Ce = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e))(Ce || {}), Se = /* @__PURE__ */ ((e) => (e.start = "start", e.center = "center", e.end = "end", e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(Se || {}), _e = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e))(_e || {}), xe = /* @__PURE__ */ ((e) => (e.right = "right", e.left = "left", e))(xe || {}), ke = /* @__PURE__ */ ((e) => (e.top = "top", e.bottom = "bottom", e.right = "right", e.left = "left", e.chartArea = "chartArea", e))(ke || {});
11
+ v.Circular, v.Table, v.BarChart, v.LineChart, v.StackBarChart, v.StackLineChart, v.Scorecard, v.Spacer;
12
12
  const Bt = [
13
13
  {
14
- type: f.Circular,
14
+ type: v.Circular,
15
15
  showLabel: !1,
16
16
  // TODO: temporarily removed show label as it has no function
17
17
  showDrillDimension: !0,
@@ -19,14 +19,14 @@ const Bt = [
19
19
  showSearchBar: !1
20
20
  },
21
21
  {
22
- type: f.Table,
22
+ type: v.Table,
23
23
  showLabel: !1,
24
24
  showDrillDimension: !0,
25
25
  showRollup: !0,
26
26
  showSearchBar: !0
27
27
  },
28
28
  {
29
- type: f.BarChart,
29
+ type: v.BarChart,
30
30
  showLabel: !1,
31
31
  // TODO: temporarily removed show label as it has no function
32
32
  showDrillDimension: !0,
@@ -34,7 +34,7 @@ const Bt = [
34
34
  showSearchBar: !1
35
35
  },
36
36
  {
37
- type: f.LineChart,
37
+ type: v.LineChart,
38
38
  showLabel: !1,
39
39
  // TODO: temporarily removed show label as it has no function
40
40
  showDrillDimension: !0,
@@ -42,7 +42,7 @@ const Bt = [
42
42
  showSearchBar: !1
43
43
  },
44
44
  {
45
- type: f.StackBarChart,
45
+ type: v.StackBarChart,
46
46
  showLabel: !1,
47
47
  // TODO: temporarily removed show label as it has no function
48
48
  showDrillDimension: !0,
@@ -50,7 +50,7 @@ const Bt = [
50
50
  showSearchBar: !1
51
51
  },
52
52
  {
53
- type: f.StackLineChart,
53
+ type: v.StackLineChart,
54
54
  showLabel: !1,
55
55
  // TODO: temporarily removed show label as it has no function
56
56
  showDrillDimension: !0,
@@ -58,14 +58,14 @@ const Bt = [
58
58
  showSearchBar: !1
59
59
  },
60
60
  {
61
- type: f.Scorecard,
61
+ type: v.Scorecard,
62
62
  showLabel: !1,
63
63
  showDrillDimension: !1,
64
64
  showRollup: !1,
65
65
  showSearchBar: !1
66
66
  },
67
67
  {
68
- type: f.Spacer,
68
+ type: v.Spacer,
69
69
  showLabel: !1,
70
70
  showDrillDimension: !1,
71
71
  showRollup: !1,
@@ -78,22 +78,22 @@ function ye(e) {
78
78
  }
79
79
  function Mt(e, t) {
80
80
  switch (e) {
81
- case f.BarChart:
82
- case f.LineChart:
83
- case f.StackBarChart:
84
- case f.StackLineChart:
81
+ case v.BarChart:
82
+ case v.LineChart:
83
+ case v.StackBarChart:
84
+ case v.StackLineChart:
85
85
  return Array.isArray(t == null ? void 0 : t.datasets) && Array.isArray(t == null ? void 0 : t.xAxis) && t.datasets.length > 0 && t.xAxis.length > 0;
86
- case f.Table:
86
+ case v.Table:
87
87
  return Array.isArray(t == null ? void 0 : t.rows) && Array.isArray(t == null ? void 0 : t.columns) && t.rows.length > 0 && t.columns.length > 0;
88
- case f.Circular:
88
+ case v.Circular:
89
89
  return Array.isArray(t == null ? void 0 : t.datasets) && t.datasets.length > 0;
90
- case f.Scorecard:
90
+ case v.Scorecard:
91
91
  return !0;
92
- case f.Spacer:
92
+ case v.Spacer:
93
93
  return !0;
94
94
  }
95
95
  }
96
- const Qe = [
96
+ const Ze = [
97
97
  "54, 162, 235",
98
98
  //8CE6D7
99
99
  "0, 123, 167",
@@ -118,21 +118,21 @@ const Qe = [
118
118
  function re({
119
119
  index: e,
120
120
  isCompare: t,
121
- opacity: l
121
+ opacity: o
122
122
  }) {
123
- let a = typeof l == "number" ? l : 1;
124
- return t && (a = a * 0.6), `rgba(${Qe[e % Qe.length]}, ${a})`;
123
+ let a = typeof o == "number" ? o : 1;
124
+ return t && (a = a * 0.6), `rgba(${Ze[e % Ze.length]}, ${a})`;
125
125
  }
126
- function tt(e, t, l) {
126
+ function at(e, t, o) {
127
127
  if (e === "" || t === "")
128
128
  return null;
129
- let a = (i) => i == null ? void 0 : i.replace(/,/g, "");
130
- l === "ID" && (a = (i) => i == null ? void 0 : i.replace(/\./g, "").replace(/,/g, "."));
131
- const s = Number(a(e)), c = Number(a(t));
132
- if (isNaN(s) || isNaN(c))
129
+ let a = (c) => c == null ? void 0 : c.replace(/,/g, "");
130
+ o === "ID" && (a = (c) => c == null ? void 0 : c.replace(/\./g, "").replace(/,/g, "."));
131
+ const n = Number(a(e)), i = Number(a(t));
132
+ if (isNaN(n) || isNaN(i))
133
133
  return null;
134
134
  let d = 0;
135
- c === 0 ? s === 0 ? d = 0 : d = 1 : d = (s - c) / c;
135
+ i === 0 ? n === 0 ? d = 0 : d = 1 : d = (n - i) / i;
136
136
  const u = Vt(d);
137
137
  return {
138
138
  value: isNaN(d) ? "" : `${(d * 100).toFixed(0)}%`,
@@ -164,7 +164,7 @@ function ie(e) {
164
164
  font: {
165
165
  size: e.labelFontSize
166
166
  }
167
- })), l = h(() => ({
167
+ })), o = h(() => ({
168
168
  display: e.showX,
169
169
  position: e.xPosition,
170
170
  grid: {
@@ -188,14 +188,14 @@ function ie(e) {
188
188
  size: e.yTickFontSize
189
189
  }
190
190
  }
191
- })), s = h(() => ({
191
+ })), n = h(() => ({
192
192
  display: e.showLegend,
193
193
  position: e.legendPosition,
194
194
  usePointStyle: e.usePointStyle
195
- })), c = h(() => e.isTransposed), d = h(() => e.chartWidth), u = h(() => e.chartHeight);
196
- return { datalabels: t, xCfg: l, yCfg: a, isTransposed: c, legend: s, chartWidth: d, chartHeight: u };
195
+ })), i = h(() => e.isTransposed), d = h(() => e.chartWidth), u = h(() => e.chartHeight);
196
+ return { datalabels: t, xCfg: o, yCfg: a, isTransposed: i, legend: n, chartWidth: d, chartHeight: u };
197
197
  }
198
- const qt = /* @__PURE__ */ U({
198
+ const qt = /* @__PURE__ */ G({
199
199
  __name: "WidgetBarchart",
200
200
  props: {
201
201
  modelValue: { required: !0 },
@@ -203,35 +203,35 @@ const qt = /* @__PURE__ */ U({
203
203
  },
204
204
  emits: ["update:modelValue"],
205
205
  setup(e) {
206
- const t = G(e, "modelValue"), l = h(() => {
207
- var p;
208
- return ((p = t.value.data) == null ? void 0 : p.xAxis) ?? [];
206
+ const t = j(e, "modelValue"), o = h(() => {
207
+ var f;
208
+ return ((f = t.value.data) == null ? void 0 : f.xAxis) ?? [];
209
209
  }), a = h(() => {
210
- var p;
211
- return ((p = t.value.data) == null ? void 0 : p.datasets) ?? [];
212
- }), s = g(null), { datalabels: c, xCfg: d, yCfg: u, isTransposed: i, legend: w, chartWidth: C, chartHeight: m } = ie(
210
+ var f;
211
+ return ((f = t.value.data) == null ? void 0 : f.datasets) ?? [];
212
+ }), n = y(null), { datalabels: i, xCfg: d, yCfg: u, isTransposed: c, legend: w, chartWidth: C, chartHeight: m } = ie(
213
213
  t.value
214
- ), v = h(() => a.value.length > 0 ? [
215
- ...a.value.map((p, _) => ({
216
- label: p.name,
217
- data: p.values,
218
- dash: !!p.isCompare,
219
- backgroundColor: re({ index: _, isCompare: p.isCompare })
214
+ ), g = h(() => a.value.length > 0 ? [
215
+ ...a.value.map((f, k) => ({
216
+ label: f.name,
217
+ data: f.values,
218
+ dash: !!f.isCompare,
219
+ backgroundColor: re({ index: k, isCompare: f.isCompare })
220
220
  }))
221
221
  ] : []);
222
- return (p, _) => {
223
- const T = F("FmBarChart");
224
- return x(), D(X, null, [
225
- Z(p.$slots, "menu"),
226
- H(T, {
222
+ return (f, k) => {
223
+ const E = F("FmBarChart");
224
+ return _(), z(U, null, [
225
+ Z(f.$slots, "menu"),
226
+ H(E, {
227
227
  ref_key: "chartRef",
228
- ref: s,
228
+ ref: n,
229
229
  class: "bar-chart",
230
- datasets: v.value,
231
- "x-axis": { categories: l.value },
230
+ datasets: g.value,
231
+ "x-axis": { categories: o.value },
232
232
  "x-cfg": r(d),
233
233
  "y-cfg": r(u),
234
- transpose: r(i),
234
+ transpose: r(c),
235
235
  legend: {
236
236
  display: r(w).display ?? !1,
237
237
  position: r(w).position,
@@ -239,7 +239,7 @@ const qt = /* @__PURE__ */ U({
239
239
  usePointStyle: r(w).usePointStyle ?? !0
240
240
  }
241
241
  },
242
- datalabels: r(c),
242
+ datalabels: r(i),
243
243
  "maintain-aspect-ratio": !1,
244
244
  style: Y({
245
245
  "--chart-width": r(C) !== void 0 ? r(C) + "px" : "100%",
@@ -249,7 +249,7 @@ const qt = /* @__PURE__ */ U({
249
249
  ], 64);
250
250
  };
251
251
  }
252
- }), Nt = /* @__PURE__ */ U({
252
+ }), Nt = /* @__PURE__ */ G({
253
253
  __name: "WidgetCircular",
254
254
  props: {
255
255
  modelValue: { required: !0 },
@@ -257,19 +257,19 @@ const qt = /* @__PURE__ */ U({
257
257
  },
258
258
  emits: ["update:modelValue"],
259
259
  setup(e) {
260
- const t = G(e, "modelValue"), { datalabels: l, legend: a, chartWidth: s, chartHeight: c } = ie(t.value), d = h(() => {
260
+ const t = j(e, "modelValue"), { datalabels: o, legend: a, chartWidth: n, chartHeight: i } = ie(t.value), d = h(() => {
261
261
  let u = [];
262
262
  return t.value.data.datasets && t.value.data.metrics && t.value.data.datasets.length > 0 && t.value.data.metrics.length > 0 && (u = [
263
263
  {
264
264
  label: t.value.data.metrics[0],
265
- data: t.value.data.datasets.map((i) => i.value),
266
- backgroundColor: t.value.data.datasets.map((i, w) => re({ index: w }))
265
+ data: t.value.data.datasets.map((c) => c.value),
266
+ backgroundColor: t.value.data.datasets.map((c, w) => re({ index: w }))
267
267
  }
268
268
  ]), u;
269
269
  });
270
- return (u, i) => {
270
+ return (u, c) => {
271
271
  const w = F("FmPieChart");
272
- return x(), D(X, null, [
272
+ return _(), z(U, null, [
273
273
  Z(u.$slots, "menu"),
274
274
  H(w, {
275
275
  class: "circular",
@@ -285,17 +285,17 @@ const qt = /* @__PURE__ */ U({
285
285
  usePointStyle: r(a).usePointStyle ?? !0
286
286
  }
287
287
  },
288
- datalabels: r(l),
288
+ datalabels: r(o),
289
289
  "maintain-aspect-ratio": !1,
290
290
  style: Y({
291
- "--chart-width": r(s) !== void 0 ? r(s) + "px" : "100%",
292
- "--chart-height": r(c) !== void 0 ? r(c) + "px" : "calc(100% - 36px)"
291
+ "--chart-width": r(n) !== void 0 ? r(n) + "px" : "100%",
292
+ "--chart-height": r(i) !== void 0 ? r(i) + "px" : "calc(100% - 36px)"
293
293
  })
294
294
  }, null, 8, ["datasets", "metrics", "legend", "datalabels", "style"])
295
295
  ], 64);
296
296
  };
297
297
  }
298
- }), It = { class: "flex flex-col gap-1" }, Ot = { class: "fm-typo-en-title-sm-600" }, Xt = { class: "flex gap-2" }, Yt = { key: 0 }, Ut = { key: 1 }, Gt = /* @__PURE__ */ U({
298
+ }), It = { class: "flex flex-col gap-1" }, Ot = { class: "fm-typo-en-title-sm-600" }, Xt = { class: "flex gap-2" }, Ut = { key: 0 }, Yt = { key: 1 }, Gt = /* @__PURE__ */ G({
299
299
  __name: "WidgetScorecard",
300
300
  props: {
301
301
  modelValue: { required: !0 },
@@ -303,14 +303,14 @@ const qt = /* @__PURE__ */ U({
303
303
  },
304
304
  emits: ["update:modelValue"],
305
305
  setup(e) {
306
- const t = G(e, "modelValue"), { t: l } = Re(), { compareDateRange: a, defaultDateSetting: s } = we(et()), { country: c } = Le(), d = h(() => {
306
+ const t = j(e, "modelValue"), { t: o } = Re(), { compareDateRange: a, defaultDateSetting: n } = we(tt()), { country: i } = Le(), d = h(() => {
307
307
  var m;
308
308
  return ((m = t.value.data) == null ? void 0 : m.value) || "";
309
309
  }), u = h(() => {
310
310
  const { data: m } = t.value;
311
- return m != null && m.comparison ? tt(d.value, m.comparison, c) : null;
311
+ return m != null && m.comparison ? at(d.value, m.comparison, i) : null;
312
312
  });
313
- function i(m) {
313
+ function c(m) {
314
314
  switch (m) {
315
315
  case be.bar:
316
316
  return "bar";
@@ -329,28 +329,28 @@ const qt = /* @__PURE__ */ U({
329
329
  fill: !0,
330
330
  color: "#36a2eb"
331
331
  })));
332
- return (m, v) => {
333
- var B;
334
- const p = F("FmIcon"), _ = F("FmChip"), T = F("FmTooltip"), q = F("FmLineChart");
335
- return x(), D("div", It, [
332
+ return (m, g) => {
333
+ var P;
334
+ const f = F("FmIcon"), k = F("FmChip"), E = F("FmTooltip"), q = F("FmLineChart");
335
+ return _(), z("div", It, [
336
336
  Z(m.$slots, "menu"),
337
337
  A("p", Ot, ne(d.value), 1),
338
338
  A("div", Xt, [
339
- H(T, {
340
- content: `vs. ${(B = r(s).defaultCompareType) == null ? void 0 : B.split("_").join(" ")}`,
339
+ H(E, {
340
+ content: `vs. ${(P = r(n).defaultCompareType) == null ? void 0 : P.split("_").join(" ")}`,
341
341
  placement: "right",
342
342
  "hide-arrow": "",
343
343
  variant: "plain"
344
344
  }, {
345
345
  default: V(() => [
346
- u.value ? (x(), M(_, {
346
+ u.value ? (_(), M(k, {
347
347
  key: 0,
348
348
  icon: u.value.icon.name,
349
349
  class: me(`bg-${u.value.icon.tailwind}`),
350
350
  compact: ""
351
351
  }, {
352
352
  default: V(() => [
353
- H(p, {
353
+ H(f, {
354
354
  name: u.value.icon.name,
355
355
  color: u.value.icon.color
356
356
  }, null, 8, ["name", "color"]),
@@ -361,16 +361,16 @@ const qt = /* @__PURE__ */ U({
361
361
  ]),
362
362
  _: 1
363
363
  }, 8, ["icon", "class"])) : Q("", !0),
364
- r(a).endDate !== null && r(a).startDate !== null && u.value === null ? (x(), M(_, {
364
+ r(a).endDate !== null && r(a).startDate !== null && u.value === null ? (_(), M(k, {
365
365
  key: 1,
366
366
  compact: ""
367
367
  }, {
368
368
  default: V(() => [
369
- H(p, {
369
+ H(f, {
370
370
  name: "arrow_upward",
371
371
  color: "#C7C7CC"
372
372
  }),
373
- v[0] || (v[0] = A("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
373
+ g[0] || (g[0] = A("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
374
374
  ]),
375
375
  _: 1
376
376
  })) : Q("", !0)
@@ -378,8 +378,8 @@ const qt = /* @__PURE__ */ U({
378
378
  _: 1
379
379
  }, 8, ["content"])
380
380
  ]),
381
- w.value ? (x(), D("div", Yt, [
382
- i(w.value.type) === "line" ? (x(), M(q, {
381
+ w.value ? (_(), z("div", Ut, [
382
+ c(w.value.type) === "line" ? (_(), M(q, {
383
383
  key: 0,
384
384
  class: "sparkline",
385
385
  datasets: C.value,
@@ -392,7 +392,7 @@ const qt = /* @__PURE__ */ U({
392
392
  "x-cfg": { display: !1 },
393
393
  "maintain-aspect-ratio": !1
394
394
  }, null, 8, ["datasets", "x-axis"])) : Q("", !0)
395
- ])) : (x(), D("div", Ut, v[1] || (v[1] = [
395
+ ])) : (_(), z("div", Yt, g[1] || (g[1] = [
396
396
  A("div", { class: "sparkline" }, [
397
397
  A("div", { class: "flex flex-col gap-8" }, [
398
398
  A("div"),
@@ -406,8 +406,8 @@ const qt = /* @__PURE__ */ U({
406
406
  }
407
407
  }), jt = {};
408
408
  function Jt(e, t) {
409
- const l = F("FmMenuDivider");
410
- return x(), M(l);
409
+ const o = F("FmMenuDivider");
410
+ return _(), M(o);
411
411
  }
412
412
  const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimension", Zt = At(Qt, {
413
413
  state: () => ({
@@ -419,56 +419,56 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
419
419
  updateRowHeight(e, t) {
420
420
  this.rowHeight = e, this.setRowHeights(e, t);
421
421
  },
422
- updateColWidth(e, t, l, a) {
423
- this.colWidths[e] = t, this.setColWidths(e, t, l, a);
422
+ updateColWidth(e, t, o, a) {
423
+ this.colWidths[e] = t, this.setColWidths(e, t, o, a);
424
424
  },
425
425
  setRowHeights(e, t) {
426
- const l = (t == null ? void 0 : t.querySelectorAll("thead tr")) ?? [], a = (t == null ? void 0 : t.querySelectorAll("tbody tr")) ?? [];
427
- [...l, ...a].forEach((c) => {
428
- const d = c;
426
+ const o = (t == null ? void 0 : t.querySelectorAll("thead tr")) ?? [], a = (t == null ? void 0 : t.querySelectorAll("tbody tr")) ?? [];
427
+ [...o, ...a].forEach((i) => {
428
+ const d = i;
429
429
  d && (d.style.height = `${e}px`);
430
430
  });
431
431
  },
432
- setColWidths(e, t, l, a = !1) {
433
- const s = (l == null ? void 0 : l.querySelectorAll("th")) ?? [];
432
+ setColWidths(e, t, o, a = !1) {
433
+ const n = (o == null ? void 0 : o.querySelectorAll("th")) ?? [];
434
434
  if (e === void 0) return;
435
- const c = s[e], d = a ? this.colWidths[e] : t;
436
- if (!c || d === void 0) return;
435
+ const i = n[e], d = a ? this.colWidths[e] : t;
436
+ if (!i || d === void 0) return;
437
437
  const u = () => {
438
- c.style.width = `${d}px`;
438
+ i.style.width = `${d}px`;
439
439
  };
440
440
  a ? requestAnimationFrame(u) : u();
441
441
  },
442
442
  enableEditMode() {
443
- const e = document.querySelectorAll("th"), t = document.querySelectorAll("td"), l = document.querySelector("table");
444
- l == null || l.classList.add("table-fixed"), e.forEach((a) => a.classList.add("toggleEditResize")), t.forEach((a) => a.classList.add("toggleEditResize")), this.isEditing = !0;
443
+ const e = document.querySelectorAll("th"), t = document.querySelectorAll("td"), o = document.querySelector("table");
444
+ o == null || o.classList.add("table-fixed"), e.forEach((a) => a.classList.add("toggleEditResize")), t.forEach((a) => a.classList.add("toggleEditResize")), this.isEditing = !0;
445
445
  },
446
446
  disableEditMode() {
447
- const e = document.querySelectorAll("th"), t = document.querySelectorAll("td"), l = document.querySelectorAll(".col-resize-handle"), a = document.querySelectorAll(".row-resize-handle");
448
- e.forEach((s) => s.classList.remove("toggleEditResize")), t.forEach((s) => s.classList.remove("toggleEditResize")), l.forEach((s) => s.remove()), a.forEach((s) => s.remove()), this.isEditing = !1;
447
+ const e = document.querySelectorAll("th"), t = document.querySelectorAll("td"), o = document.querySelectorAll(".col-resize-handle"), a = document.querySelectorAll(".row-resize-handle");
448
+ e.forEach((n) => n.classList.remove("toggleEditResize")), t.forEach((n) => n.classList.remove("toggleEditResize")), o.forEach((n) => n.remove()), a.forEach((n) => n.remove()), this.isEditing = !1;
449
449
  },
450
450
  resetStore() {
451
451
  this.rowHeight = 0, this.colWidths = [];
452
452
  },
453
453
  highlightCol(e, t) {
454
454
  if (t) {
455
- const l = document.querySelectorAll(`thead th:nth-child(${e + 1})`), a = document.querySelectorAll(`tbody td:nth-child(${e + 1})`);
456
- [...l, ...a].forEach((s) => {
457
- s.classList.add("highlight-hover-col");
455
+ const o = document.querySelectorAll(`thead th:nth-child(${e + 1})`), a = document.querySelectorAll(`tbody td:nth-child(${e + 1})`);
456
+ [...o, ...a].forEach((n) => {
457
+ n.classList.add("highlight-hover-col");
458
458
  });
459
459
  } else
460
460
  document.querySelectorAll(
461
461
  `thead th:nth-child(${e + 1}), tbody td:nth-child(${e + 1})`
462
- ).forEach((l) => l.classList.add("highlight-col"));
462
+ ).forEach((o) => o.classList.add("highlight-col"));
463
463
  },
464
464
  highlightRows(e) {
465
- const t = document.querySelectorAll("thead tr"), l = document.querySelectorAll("tbody tr"), a = [...t, ...l];
466
- for (const s of a)
467
- e ? s.classList.add("highlight-hover-row") : s.classList.add("highlight-row");
465
+ const t = document.querySelectorAll("thead tr"), o = document.querySelectorAll("tbody tr"), a = [...t, ...o];
466
+ for (const n of a)
467
+ e ? n.classList.add("highlight-hover-row") : n.classList.add("highlight-row");
468
468
  },
469
469
  removeRowHighlight(e) {
470
- const t = e ? ".highlight-hover-row" : ".highlight-row", l = document.querySelectorAll(t);
471
- for (const a of l)
470
+ const t = e ? ".highlight-hover-row" : ".highlight-row", o = document.querySelectorAll(t);
471
+ for (const a of o)
472
472
  a.classList.remove(t.slice(1));
473
473
  },
474
474
  removeColHighlight(e) {
@@ -477,62 +477,62 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
477
477
  }) : document.querySelectorAll(".highlight-col").forEach((t) => t.classList.remove("highlight-col"));
478
478
  },
479
479
  resizeCol(e, t) {
480
- const l = /* @__PURE__ */ new Map(), a = e.clientX, s = e.target.closest("table"), c = s == null ? void 0 : s.querySelectorAll("th")[t], d = c == null ? void 0 : c.getBoundingClientRect().width, u = l.get(t) ? this.colWidths[t.toString()] || 60 : (l.set(t, !0), d || this.colWidths[t.toString()] || 60), i = c == null ? void 0 : c.querySelector("p");
481
- if (!i) return;
482
- const w = i.textContent || "", C = window.getComputedStyle(i), m = `${C.fontWeight} ${C.fontSize} ${C.fontFamily}`, p = document.createElement("canvas").getContext("2d");
483
- if (!p) return;
484
- p.font = m;
485
- const _ = p.measureText(w), T = window.getComputedStyle(c), q = parseFloat(T.paddingLeft || "0"), B = parseFloat(T.paddingRight || "0"), n = _.width + q + B;
480
+ const o = /* @__PURE__ */ new Map(), a = e.clientX, n = e.target.closest("table"), i = n == null ? void 0 : n.querySelectorAll("th")[t], d = i == null ? void 0 : i.getBoundingClientRect().width, u = o.get(t) ? this.colWidths[t.toString()] || 60 : (o.set(t, !0), d || this.colWidths[t.toString()] || 60), c = i == null ? void 0 : i.querySelector("p");
481
+ if (!c) return;
482
+ const w = c.textContent || "", C = window.getComputedStyle(c), m = `${C.fontWeight} ${C.fontSize} ${C.fontFamily}`, f = document.createElement("canvas").getContext("2d");
483
+ if (!f) return;
484
+ f.font = m;
485
+ const k = f.measureText(w), E = window.getComputedStyle(i), q = parseFloat(E.paddingLeft || "0"), P = parseFloat(E.paddingRight || "0"), X = k.width + q + P;
486
486
  this.highlightCol(t, !1);
487
- const y = (b) => {
488
- const k = b.clientX - a, R = Math.max(n, u + k);
489
- if (s) {
490
- this.updateColWidth(t, R, s, !0);
491
- let z = 0;
492
- s.querySelectorAll("th").forEach((P, j) => {
493
- z += j === t ? R : this.colWidths[j] || P.getBoundingClientRect().width;
494
- }), s.classList.remove("w-full"), s.style.width = `${z}px`;
495
- const E = s == null ? void 0 : s.parentElement;
496
- if (E) {
497
- const P = E.scrollWidth, j = E.scrollLeft;
498
- E.offsetWidth + j >= P - 100 && (E.scrollLeft = P);
487
+ const l = (S) => {
488
+ const b = S.clientX - a, x = Math.max(X, u + b);
489
+ if (n) {
490
+ this.updateColWidth(t, x, n, !0);
491
+ let R = 0;
492
+ n.querySelectorAll("th").forEach((D, $) => {
493
+ R += $ === t ? x : this.colWidths[$] || D.getBoundingClientRect().width;
494
+ }), n.classList.remove("w-full"), n.style.width = `${R}px`;
495
+ const T = n == null ? void 0 : n.parentElement;
496
+ if (T) {
497
+ const D = T.scrollWidth, $ = T.scrollLeft;
498
+ T.offsetWidth + $ >= D - 100 && (T.scrollLeft = D);
499
499
  }
500
500
  }
501
- }, S = () => {
502
- ((s == null ? void 0 : s.querySelectorAll("th")) ?? []).forEach((k, R) => {
503
- const z = k.getBoundingClientRect().width;
504
- this.colWidths[R] = z;
505
- }), this.removeColHighlight(!1), document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", S);
501
+ }, p = () => {
502
+ ((n == null ? void 0 : n.querySelectorAll("th")) ?? []).forEach((b, x) => {
503
+ const R = b.getBoundingClientRect().width;
504
+ this.colWidths[x] = R;
505
+ }), this.removeColHighlight(!1), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", p);
506
506
  };
507
- document.addEventListener("mousemove", y), document.addEventListener("mouseup", S);
507
+ document.addEventListener("mousemove", l), document.addEventListener("mouseup", p);
508
508
  },
509
509
  resizeRow(e) {
510
- const t = e.clientY, l = e.target.closest("table"), a = this.rowHeight || 48;
510
+ const t = e.clientY, o = e.target.closest("table"), a = this.rowHeight || 48;
511
511
  this.highlightRows(!1);
512
- const s = (d) => {
512
+ const n = (d) => {
513
513
  const u = Math.max(30, a + (d.clientY - t));
514
- l && this.updateRowHeight(u, l);
515
- }, c = () => {
516
- this.removeRowHighlight(!1), document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c);
514
+ o && this.updateRowHeight(u, o);
515
+ }, i = () => {
516
+ this.removeRowHighlight(!1), document.removeEventListener("mousemove", n), document.removeEventListener("mouseup", i);
517
517
  };
518
- document.addEventListener("mousemove", s), document.addEventListener("mouseup", c);
518
+ document.addEventListener("mousemove", n), document.addEventListener("mouseup", i);
519
519
  },
520
520
  enableCellResizing() {
521
- const e = document.querySelector("thead"), t = document.querySelectorAll("thead tr"), l = document.querySelectorAll("tbody tr"), a = [...t, ...l];
521
+ const e = document.querySelector("thead"), t = document.querySelectorAll("thead tr"), o = document.querySelectorAll("tbody tr"), a = [...t, ...o];
522
522
  e && e.classList.remove("sticky");
523
- const s = (c, d) => {
523
+ const n = (i, d) => {
524
524
  const u = document.createElement("div");
525
- return u.className = `${c}-resize-handle`, c === "col" ? (u.addEventListener("mouseenter", () => this.highlightCol(d, !0)), u.addEventListener("mouseleave", () => this.removeColHighlight(!0)), u.addEventListener("mousedown", (i) => {
526
- i.stopPropagation(), this.resizeCol(i, d);
527
- })) : (u.addEventListener("mouseenter", () => this.highlightRows(!0)), u.addEventListener("mouseleave", () => this.removeRowHighlight(!0)), u.addEventListener("mousedown", (i) => {
528
- i.stopPropagation(), this.resizeRow(i);
525
+ return u.className = `${i}-resize-handle`, i === "col" ? (u.addEventListener("mouseenter", () => this.highlightCol(d, !0)), u.addEventListener("mouseleave", () => this.removeColHighlight(!0)), u.addEventListener("mousedown", (c) => {
526
+ c.stopPropagation(), this.resizeCol(c, d);
527
+ })) : (u.addEventListener("mouseenter", () => this.highlightRows(!0)), u.addEventListener("mouseleave", () => this.removeRowHighlight(!0)), u.addEventListener("mousedown", (c) => {
528
+ c.stopPropagation(), this.resizeRow(c);
529
529
  })), u;
530
530
  };
531
- a.forEach((c) => {
532
- const d = c.closest("thead") !== null;
533
- c.querySelectorAll(d ? "th" : "td").forEach((i, w) => {
534
- const C = s("col", w), m = s("row", w);
535
- i.appendChild(C), i.appendChild(m);
531
+ a.forEach((i) => {
532
+ const d = i.closest("thead") !== null;
533
+ i.querySelectorAll(d ? "th" : "td").forEach((c, w) => {
534
+ const C = n("col", w), m = n("row", w);
535
+ c.appendChild(C), c.appendChild(m);
536
536
  });
537
537
  }), this.enableEditMode();
538
538
  },
@@ -543,7 +543,7 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
543
543
  }), ea = { class: "my-4" }, ta = {
544
544
  class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
545
545
  style: { backgroundColor: "#f9f9f9" }
546
- }, aa = { class: "font-bold" }, la = { class: "text-fm-color-neutral-gray-300" }, oa = /* @__PURE__ */ U({
546
+ }, aa = { class: "font-bold" }, la = { class: "text-fm-color-neutral-gray-300" }, oa = /* @__PURE__ */ G({
547
547
  __name: "WidgetTable",
548
548
  props: {
549
549
  modelValue: { required: !0 },
@@ -551,159 +551,174 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
551
551
  },
552
552
  emits: ["update:modelValue"],
553
553
  setup(e) {
554
- const { t, te: l } = Re(), a = G(e, "modelValue"), { country: s } = Le(), c = Zt(), d = g(null), u = h(() => {
555
- var n;
556
- return ((n = a.value.data) == null ? void 0 : n.columns) || [{ label: "", key: "" }];
557
- }), i = h(() => {
558
- var n;
559
- return ((n = a.value.data) == null ? void 0 : n.rows) || [];
554
+ const { t, te: o } = Re(), a = j(e, "modelValue"), { country: n } = Le(), i = Zt(), d = y(null), u = h(() => {
555
+ var l;
556
+ return ((l = a.value.data) == null ? void 0 : l.columns) || [{ label: "", key: "" }];
557
+ }), c = h(() => {
558
+ var l;
559
+ return ((l = a.value.data) == null ? void 0 : l.rows) || [];
560
560
  }), w = h(() => a.value.filterText), C = h(() => {
561
- var n, y;
562
- if (!(w.value && w.value.trim().length > 0 || !((n = i.value[0]) != null && n.isRollup) && !((y = i.value[i.value.length - 1]) != null && y.isRollup))) {
561
+ var l, p;
562
+ if (!(w.value && w.value.trim().length > 0 || !((l = c.value[0]) != null && l.isRollup) && !((p = c.value[c.value.length - 1]) != null && p.isRollup))) {
563
563
  if (a.value.rollupPosition === O.top || a.value.rollupPosition === void 0)
564
564
  return O.top;
565
565
  if (a.value.rollupPosition === O.bottom)
566
566
  return O.bottom;
567
567
  }
568
568
  }), m = h(() => {
569
- const b = C.value !== void 0 ? 1 : 0, k = (d.value ? d.value.$el.offsetHeight : 0) - 48;
570
- return Math.floor((k - 34.5 - 32) / 48) - b;
571
- }), v = h(() => {
572
- var y, S;
573
- let n = [];
569
+ const b = C.value !== void 0 ? 1 : 0, x = (d.value ? d.value.$el.offsetHeight : 0) - 48;
570
+ return Math.floor((x - 34.5 - 32) / 48) - b;
571
+ }), g = h(() => {
572
+ var p, S;
573
+ let l = [];
574
574
  switch (C.value) {
575
575
  case O.top:
576
- n = [...((y = i.value[0]) == null ? void 0 : y.cells) || []].map((b, k) => {
576
+ l = [...((p = c.value[0]) == null ? void 0 : p.cells) || []].map((b, x) => {
577
577
  var R;
578
578
  return {
579
579
  main: b,
580
- comparison: (R = i.value[0]) == null ? void 0 : R.comparisonCells[k],
581
- rowType: u.value[k].type
580
+ comparison: (R = c.value[0]) == null ? void 0 : R.comparisonCells[x],
581
+ rowType: u.value[x].type
582
582
  };
583
583
  });
584
584
  break;
585
585
  case O.bottom:
586
- n = [...((S = i.value[i.value.length - 1]) == null ? void 0 : S.cells) || []].map((b, k) => {
586
+ l = [...((S = c.value[c.value.length - 1]) == null ? void 0 : S.cells) || []].map((b, x) => {
587
587
  var R;
588
588
  return {
589
589
  main: b,
590
- comparison: (R = i.value[0]) == null ? void 0 : R.comparisonCells[k],
591
- rowType: u.value[k].type
590
+ comparison: (R = c.value[0]) == null ? void 0 : R.comparisonCells[x],
591
+ rowType: u.value[x].type
592
592
  };
593
593
  });
594
594
  break;
595
595
  }
596
- return n.length > 0 && n[0].main === "" && (n[0].main = "Grand total"), n;
596
+ return l.length > 0 && l[0].main === "" && (l[0].main = "Grand total"), l;
597
597
  });
598
- function p(n) {
599
- const y = {};
598
+ function f(l) {
599
+ const p = {};
600
600
  for (let S = 0; S < u.value.length; S++)
601
601
  if (u.value[S].key !== "") {
602
- const b = n.comparisonCells[S];
603
- y[u.value[S].key] = {
604
- main: n.cells[S],
602
+ const b = l.comparisonCells[S];
603
+ p[u.value[S].key] = {
604
+ main: l.cells[S],
605
605
  comparison: b
606
- }, y.isRollup = n.isRollup;
606
+ }, p.isRollup = l.isRollup;
607
607
  }
608
- return y;
608
+ return p;
609
609
  }
610
- function _(n) {
611
- return [...new Array(n < 0 ? 0 : n)].map(() => {
610
+ function k(l) {
611
+ return [...new Array(l < 0 ? 0 : l)].map(() => {
612
612
  var S;
613
- const y = {};
613
+ const p = {};
614
614
  if ((S = a.value.data) != null && S.columns)
615
615
  for (let b = 0; b < a.value.data.columns.length; b++)
616
- y[a.value.data.columns[b].key] = void 0;
617
- return y;
616
+ p[a.value.data.columns[b].key] = void 0;
617
+ return p;
618
618
  });
619
619
  }
620
- function T(n) {
621
- let y = (n == null ? void 0 : n.main) || "";
622
- return y.includes("#") && !y.startsWith("#") && (y = y.split("#")[0]), !n || n.main === "" || n.comparison === "" ? {
623
- main: y
620
+ function E(l) {
621
+ let p = (l == null ? void 0 : l.main) || "";
622
+ return p.includes("#") && !p.startsWith("#") && (p = p.split("#")[0]), !l || l.main === "" || l.comparison === "" ? {
623
+ main: p
624
624
  } : {
625
- main: y,
626
- comparison: n == null ? void 0 : n.comparison,
627
- difference: tt(n.main, n.comparison, s)
625
+ main: p,
626
+ comparison: l == null ? void 0 : l.comparison,
627
+ difference: at(l.main, l.comparison, n)
628
628
  };
629
629
  }
630
630
  const q = h(() => {
631
- var k, R, z;
632
- let n = ((k = a.value.data) == null ? void 0 : k.rows) || [];
631
+ var x, R, B;
632
+ let l = ((x = a.value.data) == null ? void 0 : x.rows) || [];
633
633
  switch (C.value) {
634
634
  case O.bottom:
635
- n = (R = n[n.length - 1]) != null && R.isRollup ? n.slice(0, -1) : n;
635
+ l = (R = l[l.length - 1]) != null && R.isRollup ? l.slice(0, -1) : l;
636
636
  break;
637
637
  case O.top:
638
- n = (z = n[0]) != null && z.isRollup ? n.slice(1, n.length) : n;
638
+ l = (B = l[0]) != null && B.isRollup ? l.slice(1, l.length) : l;
639
639
  break;
640
640
  }
641
- const y = n.filter(($) => !(w.value !== "" && ($.isRollup === !0 || !$.cells.some(
642
- (E) => {
643
- var P;
644
- return ((E == null ? void 0 : E.toLowerCase()) || "").includes((P = w.value) == null ? void 0 : P.toLowerCase());
641
+ const p = l.filter((T) => !(w.value !== "" && (T.isRollup === !0 || !T.cells.some(
642
+ (D) => {
643
+ var $;
644
+ return ((D == null ? void 0 : D.toLowerCase()) || "").includes(($ = w.value) == null ? void 0 : $.toLowerCase());
645
645
  }
646
- )))).map(($) => p($)), S = y.length % m.value;
646
+ )))).map((T) => f(T)), S = p.length % m.value;
647
647
  let b = 0;
648
- return S > 0 ? b = Math.abs(S - m.value) : y.length === 0 && (b = m.value), y.push(..._(b)), y;
649
- }), B = h(() => {
650
- var y;
651
- let n = [];
652
- return (y = a.value.data) != null && y.columns && (n = [...a.value.data.columns.map((b) => {
653
- const k = ae(t, l, b.label, "other");
648
+ return S > 0 ? b = Math.abs(S - m.value) : p.length === 0 && (b = m.value), p.push(...k(b)), p;
649
+ }), P = h(() => {
650
+ var l, p;
651
+ return !!((l = a.value.colWidths) != null && l.length) || !!((p = i.colWidths) != null && p.length);
652
+ });
653
+ le(
654
+ P,
655
+ async (l) => {
656
+ l && i.isEditing && (await je(), i.enableCellResizing());
657
+ },
658
+ { immediate: !0 }
659
+ );
660
+ const X = h(() => {
661
+ var p;
662
+ let l = [];
663
+ return (p = a.value.data) != null && p.columns && (l = [...a.value.data.columns.map((b) => {
664
+ const x = ae(t, o, b.label, "other");
654
665
  return {
655
666
  accessorKey: b.key,
656
- header: () => je(
667
+ header: () => Je(
657
668
  "p",
658
669
  {
659
670
  class: `w-full ${b.type === "NUMERIC" ? "text-right" : ""} whitespace-nowrap`
660
671
  },
661
- k
672
+ x
662
673
  ),
663
674
  cell: (R) => {
664
- var E, P;
665
- const z = T(R.getValue()), $ = (P = (E = R == null ? void 0 : R.row) == null ? void 0 : E.original) == null ? void 0 : P.isRollup;
666
- return je(
675
+ var D, $;
676
+ const B = E(R.getValue()), T = ($ = (D = R == null ? void 0 : R.row) == null ? void 0 : D.original) == null ? void 0 : $.isRollup;
677
+ return Je(
667
678
  "div",
668
679
  {
669
- class: `${$ ? "fm-typo-en-body-md-600 text-fm-color-typo-secondary" : "fm-typo-en-body-md-400"} ${b.type === "NUMERIC" ? "text-right" : ""} whitespace-normal break-words line-clamp-2`
680
+ class: [
681
+ T ? "fm-typo-en-body-md-600 text-fm-color-typo-secondary" : "fm-typo-en-body-md-400",
682
+ b.type === "NUMERIC" ? "text-right" : "",
683
+ P.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
684
+ ].join(" ")
670
685
  },
671
- [z.main]
686
+ [B.main]
672
687
  );
673
688
  },
674
689
  enableSorting: !1
675
690
  };
676
- })]), n;
691
+ })]), l;
677
692
  });
678
- return se(
679
- [() => B.value],
693
+ return le(
694
+ [() => X.value],
680
695
  async () => {
681
- var R, z;
682
- await xt();
683
- const n = (R = d.value) == null ? void 0 : R.$el;
684
- if (!n) return;
685
- const y = n.querySelector("table");
686
- if (!y) return;
687
- const S = !!((z = a.value.colWidths) != null && z.length);
688
- y.classList.add(S ? "table-fixed" : "table-auto"), c.isEditing && c.enableCellResizing();
689
- const b = c.rowHeight || a.value.rowHeight;
690
- typeof b == "number" && c.setRowHeights(b, n);
691
- const k = a.value.colWidths ?? c.colWidths;
692
- k == null || k.forEach(($, E) => {
693
- c.setColWidths(E, $, n);
696
+ var R, B;
697
+ await je();
698
+ const l = (R = d.value) == null ? void 0 : R.$el;
699
+ if (!l) return;
700
+ const p = l.querySelector("table");
701
+ if (!p) return;
702
+ const S = !!((B = a.value.colWidths) != null && B.length);
703
+ p.classList.add(S ? "table-fixed" : "table-auto"), i.isEditing && i.enableCellResizing();
704
+ const b = i.rowHeight || a.value.rowHeight;
705
+ typeof b == "number" && i.setRowHeights(b, l);
706
+ const x = a.value.colWidths ?? i.colWidths;
707
+ x == null || x.forEach((T, D) => {
708
+ i.setColWidths(D, T, l);
694
709
  });
695
710
  },
696
711
  { immediate: !0 }
697
- ), (n, y) => {
712
+ ), (l, p) => {
698
713
  const S = F("FmTable");
699
- return x(), D(X, null, [
714
+ return _(), z(U, null, [
700
715
  A("div", ea, [
701
- Z(n.$slots, "menu")
716
+ Z(l.$slots, "menu")
702
717
  ]),
703
718
  H(S, {
704
719
  ref_key: "table",
705
720
  ref: d,
706
- "column-defs": B.value,
721
+ "column-defs": X.value,
707
722
  "row-data": q.value,
708
723
  "search-value": w.value,
709
724
  "page-size": m.value,
@@ -714,12 +729,16 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
714
729
  "pin-top": V(() => [
715
730
  A("tbody", null, [
716
731
  A("tr", ta, [
717
- (x(!0), D(X, null, Ze(v.value, (b, k) => (x(), D("td", {
718
- key: `${r(he)()}_${k}`,
732
+ (_(!0), z(U, null, et(g.value, (b, x) => (_(), z("td", {
733
+ key: `${r(he)()}_${x}`,
719
734
  class: "h-[48px] text-fm-color-typo-primary px-16"
720
735
  }, [
721
736
  A("span", {
722
- class: me(`items-center text-fm-color-typo-secondary gap-2 line-clamp-2 text-ellipsis ${b.rowType === "NUMERIC" ? "text-right" : ""}`)
737
+ class: me([
738
+ "items-center text-fm-color-typo-secondary gap-2",
739
+ b.rowType === "NUMERIC" ? "text-right" : "",
740
+ P.value ? "whitespace-normal break-words line-clamp-6" : "whitespace-nowrap"
741
+ ])
723
742
  }, [
724
743
  A("p", aa, ne(b.main), 1),
725
744
  A("p", la, ne(b.comparison ? `(${b.comparison})` : ""), 1)
@@ -733,7 +752,7 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
733
752
  ], 64);
734
753
  };
735
754
  }
736
- }), sa = /* @__PURE__ */ U({
755
+ }), sa = /* @__PURE__ */ G({
737
756
  __name: "WidgetStackBarChart",
738
757
  props: {
739
758
  modelValue: { required: !0 },
@@ -741,38 +760,38 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
741
760
  },
742
761
  emits: ["update:modelValue"],
743
762
  setup(e) {
744
- const t = G(e, "modelValue"), l = h(() => {
745
- var _;
746
- return ((_ = t.value.data) == null ? void 0 : _.xAxis) || [];
763
+ const t = j(e, "modelValue"), o = h(() => {
764
+ var k;
765
+ return ((k = t.value.data) == null ? void 0 : k.xAxis) || [];
747
766
  }), a = h(() => {
748
- var p;
749
- return ((p = t.value.data) == null ? void 0 : p.datasets) ?? [];
750
- }), s = g(null), { datalabels: c, xCfg: d, yCfg: u, isTransposed: i, legend: w, chartWidth: C, chartHeight: m } = ie(
767
+ var f;
768
+ return ((f = t.value.data) == null ? void 0 : f.datasets) ?? [];
769
+ }), n = y(null), { datalabels: i, xCfg: d, yCfg: u, isTransposed: c, legend: w, chartWidth: C, chartHeight: m } = ie(
751
770
  t.value
752
- ), v = h(() => a.value.length > 0 ? [
753
- ...a.value.map((p, _) => {
754
- let T = p.values;
771
+ ), g = h(() => a.value.length > 0 ? [
772
+ ...a.value.map((f, k) => {
773
+ let E = f.values;
755
774
  return {
756
- label: p.name,
757
- data: T,
758
- dash: !!p.isCompare,
759
- backgroundColor: re({ index: _, isCompare: p.isCompare })
775
+ label: f.name,
776
+ data: E,
777
+ dash: !!f.isCompare,
778
+ backgroundColor: re({ index: k, isCompare: f.isCompare })
760
779
  };
761
780
  })
762
781
  ] : []);
763
- return (p, _) => {
764
- const T = F("FmBarChart");
765
- return x(), D(X, null, [
766
- Z(p.$slots, "menu"),
767
- H(T, {
782
+ return (f, k) => {
783
+ const E = F("FmBarChart");
784
+ return _(), z(U, null, [
785
+ Z(f.$slots, "menu"),
786
+ H(E, {
768
787
  ref_key: "chartRef",
769
- ref: s,
788
+ ref: n,
770
789
  class: "bar-chart",
771
- datasets: v.value,
772
- "x-axis": { categories: l.value },
790
+ datasets: g.value,
791
+ "x-axis": { categories: o.value },
773
792
  "x-cfg": r(d),
774
793
  "y-cfg": r(u),
775
- transpose: r(i),
794
+ transpose: r(c),
776
795
  stacked: !0,
777
796
  legend: {
778
797
  display: r(w).display ?? !1,
@@ -782,7 +801,7 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
782
801
  usePointStyle: r(w).usePointStyle ?? !0
783
802
  }
784
803
  },
785
- datalabels: r(c),
804
+ datalabels: r(i),
786
805
  "maintain-aspect-ratio": !1,
787
806
  style: Y({
788
807
  "--chart-width": r(C) !== void 0 ? r(C) + "px" : "100%",
@@ -792,7 +811,7 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
792
811
  ], 64);
793
812
  };
794
813
  }
795
- }), na = /* @__PURE__ */ U({
814
+ }), na = /* @__PURE__ */ G({
796
815
  __name: "WidgetStackLineChart",
797
816
  props: {
798
817
  modelValue: { required: !0 },
@@ -800,47 +819,47 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
800
819
  },
801
820
  emits: ["update:modelValue"],
802
821
  setup(e) {
803
- const t = G(e, "modelValue"), l = h(() => {
804
- var v;
805
- return ((v = t.value.data) == null ? void 0 : v.xAxis) ?? [];
822
+ const t = j(e, "modelValue"), o = h(() => {
823
+ var g;
824
+ return ((g = t.value.data) == null ? void 0 : g.xAxis) ?? [];
806
825
  }), a = h(() => {
807
- var v;
808
- return ((v = t.value.data) == null ? void 0 : v.datasets) ?? [];
809
- }), { datalabels: s, xCfg: c, yCfg: d, isTransposed: u, legend: i, chartWidth: w, chartHeight: C } = ie(
826
+ var g;
827
+ return ((g = t.value.data) == null ? void 0 : g.datasets) ?? [];
828
+ }), { datalabels: n, xCfg: i, yCfg: d, isTransposed: u, legend: c, chartWidth: w, chartHeight: C } = ie(
810
829
  t.value
811
830
  ), m = h(() => a.value.length > 0 ? [
812
- ...a.value.map((v, p) => {
813
- let _ = v.values;
831
+ ...a.value.map((g, f) => {
832
+ let k = g.values;
814
833
  return {
815
- label: v.name,
816
- data: _,
817
- dash: v.isCompare,
834
+ label: g.name,
835
+ data: k,
836
+ dash: g.isCompare,
818
837
  fill: !1,
819
- color: re({ index: p, isCompare: v.isCompare })
838
+ color: re({ index: f, isCompare: g.isCompare })
820
839
  };
821
840
  })
822
841
  ] : []);
823
- return (v, p) => {
824
- const _ = F("FmLineChart");
825
- return x(), D(X, null, [
826
- Z(v.$slots, "menu"),
827
- H(_, {
842
+ return (g, f) => {
843
+ const k = F("FmLineChart");
844
+ return _(), z(U, null, [
845
+ Z(g.$slots, "menu"),
846
+ H(k, {
828
847
  class: "line-chart",
829
848
  datasets: m.value,
830
- "x-axis": { categories: l.value },
831
- "x-cfg": r(c),
849
+ "x-axis": { categories: o.value },
850
+ "x-cfg": r(i),
832
851
  "y-cfg": r(d),
833
852
  transpose: r(u),
834
853
  legend: {
835
- display: r(i).display ?? !1,
836
- position: r(i).position,
854
+ display: r(c).display ?? !1,
855
+ position: r(c).position,
837
856
  maxHeight: 54,
838
857
  labels: {
839
- usePointStyle: r(i).usePointStyle ?? !0
858
+ usePointStyle: r(c).usePointStyle ?? !0
840
859
  }
841
860
  },
842
861
  stacked: !0,
843
- datalabels: r(s),
862
+ datalabels: r(n),
844
863
  "maintain-aspect-ratio": !1,
845
864
  style: Y({
846
865
  "--chart-width": r(w) !== void 0 ? r(w) + "px" : "97%",
@@ -850,7 +869,7 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
850
869
  ], 64);
851
870
  };
852
871
  }
853
- }), le = [
872
+ }), oe = [
854
873
  "col-span-1",
855
874
  "col-span-2",
856
875
  "col-span-3",
@@ -865,15 +884,15 @@ const Kt = /* @__PURE__ */ Ht(jt, [["render", Jt]]), Qt = "mf-reporttable-dimens
865
884
  "col-span-12"
866
885
  ];
867
886
  function ra(e) {
868
- return e < 12 ? le[e - 1] : le[11];
887
+ return e < 12 ? oe[e - 1] : oe[11];
869
888
  }
870
889
  function ia(e) {
871
- return e < 12 ? le[Math.min(11, e * 2 - 1)] : le[11];
890
+ return e < 12 ? oe[Math.min(11, e * 2 - 1)] : oe[11];
872
891
  }
873
892
  function ca(e) {
874
- return e < 12 ? le[Math.min(11, e * 3 - 1)] : le[11];
893
+ return e < 12 ? oe[Math.min(11, e * 3 - 1)] : oe[11];
875
894
  }
876
- const ua = /* @__PURE__ */ U({
895
+ const ua = /* @__PURE__ */ G({
877
896
  __name: "WidgetLinechart",
878
897
  props: {
879
898
  modelValue: { required: !0 },
@@ -881,44 +900,44 @@ const ua = /* @__PURE__ */ U({
881
900
  },
882
901
  emits: ["update:modelValue"],
883
902
  setup(e) {
884
- const t = G(e, "modelValue"), l = h(() => {
885
- var v;
886
- return ((v = t.value.data) == null ? void 0 : v.xAxis) ?? [];
903
+ const t = j(e, "modelValue"), o = h(() => {
904
+ var g;
905
+ return ((g = t.value.data) == null ? void 0 : g.xAxis) ?? [];
887
906
  }), a = h(() => {
888
- var v;
889
- return ((v = t.value.data) == null ? void 0 : v.datasets) ?? [];
890
- }), { datalabels: s, xCfg: c, yCfg: d, isTransposed: u, legend: i, chartWidth: w, chartHeight: C } = ie(
907
+ var g;
908
+ return ((g = t.value.data) == null ? void 0 : g.datasets) ?? [];
909
+ }), { datalabels: n, xCfg: i, yCfg: d, isTransposed: u, legend: c, chartWidth: w, chartHeight: C } = ie(
891
910
  t.value
892
911
  ), m = h(() => a.value.length > 0 ? [
893
- ...a.value.map((v, p) => ({
894
- label: v.name,
895
- data: v.values,
896
- dash: !!v.isCompare,
912
+ ...a.value.map((g, f) => ({
913
+ label: g.name,
914
+ data: g.values,
915
+ dash: !!g.isCompare,
897
916
  fill: !1,
898
- color: re({ index: p, isCompare: v.isCompare })
917
+ color: re({ index: f, isCompare: g.isCompare })
899
918
  }))
900
919
  ] : []);
901
- return (v, p) => {
902
- const _ = F("FmLineChart");
903
- return x(), D(X, null, [
904
- Z(v.$slots, "menu"),
905
- H(_, {
920
+ return (g, f) => {
921
+ const k = F("FmLineChart");
922
+ return _(), z(U, null, [
923
+ Z(g.$slots, "menu"),
924
+ H(k, {
906
925
  class: "line-chart",
907
926
  datasets: m.value,
908
- "x-axis": { categories: l.value },
909
- "x-cfg": r(c),
927
+ "x-axis": { categories: o.value },
928
+ "x-cfg": r(i),
910
929
  "y-cfg": r(d),
911
930
  transpose: r(u),
912
931
  legend: {
913
- display: r(i).display ?? !1,
914
- position: r(i).position,
932
+ display: r(c).display ?? !1,
933
+ position: r(c).position,
915
934
  position: "bottom",
916
935
  maxHeight: 54,
917
936
  labels: {
918
- usePointStyle: r(i).usePointStyle ?? !0
937
+ usePointStyle: r(c).usePointStyle ?? !0
919
938
  }
920
939
  },
921
- datalabels: r(s),
940
+ datalabels: r(n),
922
941
  "maintain-aspect-ratio": !1,
923
942
  style: Y({
924
943
  "--chart-width": r(w) !== void 0 ? r(w) + "px" : "97%",
@@ -934,9 +953,9 @@ const ua = /* @__PURE__ */ U({
934
953
  }, ha = {
935
954
  key: 2,
936
955
  class: "flex"
937
- }, Sa = /* @__PURE__ */ U({
956
+ }, Sa = /* @__PURE__ */ G({
938
957
  __name: "DynamicWidget",
939
- props: /* @__PURE__ */ _t({
958
+ props: /* @__PURE__ */ xt({
940
959
  index: {
941
960
  type: Number,
942
961
  default: 0
@@ -952,81 +971,81 @@ const ua = /* @__PURE__ */ U({
952
971
  }),
953
972
  emits: ["update:modelValue"],
954
973
  setup(e) {
955
- const t = g(!0), l = G(e, "modelValue"), a = l.value.widget.config, { t: s, te: c } = Re(), d = e, u = g(null), i = g(a.rollup), w = g(he()), C = g(a.drillDimension), m = h(() => {
974
+ const t = y(!0), o = j(e, "modelValue"), a = o.value.widget.config, { t: n, te: i } = Re(), d = e, u = y(null), c = y(a.rollup), w = y(he()), C = y(a.drillDimension), m = h(() => {
956
975
  if (J.value.length > 0) {
957
- const o = J.value.findIndex(
976
+ const s = J.value.findIndex(
958
977
  (L) => L.value === C.value
959
978
  );
960
- return o >= 0 ? o : 0;
979
+ return s >= 0 ? s : 0;
961
980
  } else
962
981
  return -1;
963
- }), v = h(() => m.value !== 0), p = h(
982
+ }), g = h(() => m.value !== 0), f = h(
964
983
  () => m.value != J.value.length - 1
965
- ), _ = g(a.showTitle ?? !0), T = g(a.titleFontSize ?? 14), q = g(a.titleBold ?? !1), B = g(a.titleItalic ?? !1), n = g(a.titleUnderline ?? !1), y = g(a.chartWidth ?? void 0), S = g(a.chartHeight ?? void 0), b = g(a.showLabel ?? !1), k = g(a.labelAlign ?? Se.center), R = g(a.labelAnchor ?? Ce.center), z = g(a.labelRotation ?? 0), $ = g(a.labelOffset ?? 0), E = g(a.labelFontSize ?? 12), P = h(() => a.showSearchBar), j = g(a.showX ?? !0), pe = g(a.xPosition ?? xe.bottom), Fe = g(a.showXGrid ?? !1), Te = g(a.showXTick ?? !0), Ee = g(a.xTickFontSize ?? 12), We = g(a.showY ?? !0), De = g(a.yPosition ?? _e.left), ze = g(a.showYGrid ?? !1), Ae = g(a.showYTick ?? !0), He = g(a.yTickFontSize ?? 12), $e = g(a.showLegend ?? void 0), Pe = g(a.legendPosition ?? ke.top), Be = g(a.usePointStyle ?? !0), Me = g(a.rowHeight ?? 0), Ve = g(a.colWidths ?? []), fe = g(""), { breakpoints: N } = $t(), qe = g(), at = h(() => N.value.lg || N.value.md ? ra(l.value.size.width) : N.value.sm ? ia(l.value.size.width) : ca(l.value.size.width)), ce = h(
966
- () => Bt.find((o) => o.type === l.value.widget.type)
967
- ), ee = Je(() => {
968
- var o;
969
- qe.value = ut((o = u.value) == null ? void 0 : o.$el.offsetWidth), w.value = he();
970
- }), lt = h(() => {
984
+ ), k = y(a.showTitle ?? !0), E = y(a.titleFontSize ?? 14), q = y(a.titleBold ?? !1), P = y(a.titleItalic ?? !1), X = y(a.titleUnderline ?? !1), l = y(a.chartWidth ?? void 0), p = y(a.chartHeight ?? void 0), S = y(a.showLabel ?? !1), b = y(a.labelAlign ?? Se.center), x = y(a.labelAnchor ?? Ce.center), R = y(a.labelRotation ?? 0), B = y(a.labelOffset ?? 0), T = y(a.labelFontSize ?? 12), D = h(() => a.showSearchBar), $ = y(a.showX ?? !0), pe = y(a.xPosition ?? _e.bottom), Fe = y(a.showXGrid ?? !1), Ee = y(a.showXTick ?? !0), Te = y(a.xTickFontSize ?? 12), We = y(a.showY ?? !0), ze = y(a.yPosition ?? xe.left), De = y(a.showYGrid ?? !1), Ae = y(a.showYTick ?? !0), He = y(a.yTickFontSize ?? 12), $e = y(a.showLegend ?? void 0), Pe = y(a.legendPosition ?? ke.top), Be = y(a.usePointStyle ?? !0), Me = y(a.rowHeight ?? 0), Ve = y(a.colWidths ?? []), fe = y(""), { breakpoints: N } = $t(), qe = y(), lt = h(() => N.value.lg || N.value.md ? ra(o.value.size.width) : N.value.sm ? ia(o.value.size.width) : ca(o.value.size.width)), ce = h(
985
+ () => Bt.find((s) => s.type === o.value.widget.type)
986
+ ), ee = Ke(() => {
987
+ var s;
988
+ qe.value = dt((s = u.value) == null ? void 0 : s.$el.offsetWidth), w.value = he();
989
+ }), ot = h(() => {
971
990
  if (Mt(W.value.type, te.value))
972
- switch (l.value.widget.type) {
973
- case f.BarChart:
991
+ switch (o.value.widget.type) {
992
+ case v.BarChart:
974
993
  return qt;
975
- case f.StackBarChart:
994
+ case v.StackBarChart:
976
995
  return sa;
977
- case f.LineChart:
996
+ case v.LineChart:
978
997
  return ua;
979
- case f.StackLineChart:
998
+ case v.StackLineChart:
980
999
  return na;
981
- case f.Circular:
1000
+ case v.Circular:
982
1001
  return Nt;
983
- case f.Scorecard:
1002
+ case v.Scorecard:
984
1003
  return Gt;
985
- case f.Spacer:
1004
+ case v.Spacer:
986
1005
  return Kt;
987
- case f.Table:
1006
+ case v.Table:
988
1007
  return oa;
989
1008
  default:
990
- return Ke;
1009
+ return Qe;
991
1010
  }
992
1011
  else
993
- return Ke;
994
- }), te = g(null), { selectedLocationIds: ve, dateRange: ot, compareDateRange: st, timeRange: nt } = we(et()), { businessId: rt } = we(Le()), W = h(() => {
995
- const o = JSON.parse(JSON.stringify(l.value.widget));
1012
+ return Qe;
1013
+ }), te = y(null), { selectedLocationIds: ve, dateRange: st, compareDateRange: nt, timeRange: rt } = we(tt()), { businessId: it } = we(Le()), W = h(() => {
1014
+ const s = JSON.parse(JSON.stringify(o.value.widget));
996
1015
  return {
997
- ...o,
1016
+ ...s,
998
1017
  config: {
999
- ...o.config,
1000
- rollup: i.value,
1018
+ ...s.config,
1019
+ rollup: c.value,
1001
1020
  drillDimension: C.value,
1002
1021
  showGrandTotal: !1
1003
1022
  }
1004
1023
  };
1005
1024
  });
1006
- function it() {
1025
+ function ct() {
1007
1026
  return {
1008
1027
  data: te.value,
1009
- showTitle: _.value,
1010
- titleFontSize: T.value,
1028
+ showTitle: k.value,
1029
+ titleFontSize: E.value,
1011
1030
  titleBold: q.value,
1012
- titleItalic: B.value,
1013
- titleUnderline: n.value,
1014
- chartHeight: S.value,
1015
- chartWidth: y.value,
1016
- showLabel: b.value,
1017
- labelAnchor: R.value,
1018
- labelAlign: k.value,
1019
- labelRotation: z.value,
1020
- labelOffset: $.value,
1021
- labelFontSize: E.value,
1022
- showX: j.value,
1031
+ titleItalic: P.value,
1032
+ titleUnderline: X.value,
1033
+ chartHeight: p.value,
1034
+ chartWidth: l.value,
1035
+ showLabel: S.value,
1036
+ labelAnchor: x.value,
1037
+ labelAlign: b.value,
1038
+ labelRotation: R.value,
1039
+ labelOffset: B.value,
1040
+ labelFontSize: T.value,
1041
+ showX: $.value,
1023
1042
  xPosition: pe.value,
1024
1043
  showXGrid: Fe.value,
1025
- showXTick: Te.value,
1026
- xTickFontSize: Ee.value,
1044
+ showXTick: Ee.value,
1045
+ xTickFontSize: Te.value,
1027
1046
  showY: We.value,
1028
- yPosition: De.value,
1029
- showYGrid: ze.value,
1047
+ yPosition: ze.value,
1048
+ showYGrid: De.value,
1030
1049
  showYTick: Ae.value,
1031
1050
  yTickFontSize: He.value,
1032
1051
  isTransposed: W.value.config.isTransposed,
@@ -1035,7 +1054,7 @@ const ua = /* @__PURE__ */ U({
1035
1054
  usePointStyle: Be.value
1036
1055
  };
1037
1056
  }
1038
- function ct() {
1057
+ function ut() {
1039
1058
  return {
1040
1059
  data: te.value,
1041
1060
  filterText: fe.value,
@@ -1046,66 +1065,66 @@ const ua = /* @__PURE__ */ U({
1046
1065
  }
1047
1066
  const Ne = h(() => {
1048
1067
  switch (W.value.type) {
1049
- case f.Table:
1068
+ case v.Table:
1069
+ return ut();
1070
+ case v.BarChart:
1071
+ case v.LineChart:
1072
+ case v.StackBarChart:
1073
+ case v.StackLineChart:
1074
+ case v.Circular:
1050
1075
  return ct();
1051
- case f.BarChart:
1052
- case f.LineChart:
1053
- case f.StackBarChart:
1054
- case f.StackLineChart:
1055
- case f.Circular:
1056
- return it();
1057
1076
  default:
1058
1077
  return { data: te.value };
1059
1078
  }
1060
1079
  }), Ie = h(() => {
1061
- const { config: o } = l.value.widget;
1062
- if (o.rollup != null) {
1063
- const L = [...o.dimensions].filter((K) => !K.hide);
1080
+ const { config: s } = o.value.widget;
1081
+ if (s.rollup != null) {
1082
+ const L = [...s.dimensions].filter((K) => !K.hide);
1064
1083
  return L.sort(
1065
- (K, oe) => (o.rowIds || []).indexOf(ye(K)) - (o.rowIds || []).indexOf(ye(oe))
1084
+ (K, se) => (s.rowIds || []).indexOf(ye(K)) - (s.rowIds || []).indexOf(ye(se))
1066
1085
  ), [
1067
- { label: ae(s, c, "None", "other"), value: null },
1068
- { label: ae(s, c, "Grand Total", "other"), value: 0 },
1069
- ...[...L].slice(0, L.length - 1).map((K, oe) => ({
1070
- label: ae(s, c, K.label, "other"),
1071
- value: oe + 1
1086
+ { label: ae(n, i, "None", "other"), value: null },
1087
+ { label: ae(n, i, "Grand Total", "other"), value: 0 },
1088
+ ...[...L].slice(0, L.length - 1).map((K, se) => ({
1089
+ label: ae(n, i, K.label, "other"),
1090
+ value: se + 1
1072
1091
  }))
1073
1092
  ];
1074
1093
  }
1075
1094
  return [];
1076
1095
  }), J = h(() => {
1077
- const { config: o } = W.value;
1078
- return o.isDrillable ? o.dimensions.map((L) => ({
1079
- label: ae(s, c, L.label, "other"),
1096
+ const { config: s } = W.value;
1097
+ return s.isDrillable ? s.dimensions.map((L) => ({
1098
+ label: ae(n, i, L.label, "other"),
1080
1099
  value: ye(L)
1081
1100
  })) : [];
1082
1101
  });
1083
- se(
1084
- () => l.value.widget.config,
1085
- (o) => {
1086
- i.value = o.rollup, _.value = o.showTitle ?? !0, T.value = o.titleFontSize ?? 14, q.value = o.titleBold ?? !1, B.value = o.titleItalic ?? !1, n.value = o.titleUnderline ?? !1, S.value = o.chartHeight ?? void 0, y.value = o.chartWidth ?? void 0, b.value = o.showLabel ?? !1, k.value = o.labelAlign ?? Se.center, R.value = o.labelAnchor ?? Ce.center, z.value = o.labelRotation ?? 0, $.value = o.labelOffset ?? 0, E.value = o.labelFontSize ?? 12, j.value = o.showX ?? !0, pe.value = o.xPosition ?? xe.bottom, Fe.value = o.showXGrid ?? !1, Te.value = o.showXTick ?? !0, Ee.value = o.xTickFontSize ?? 12, We.value = o.showY ?? !0, De.value = o.yPosition ?? _e.left, ze.value = o.showYGrid ?? !1, Ae.value = o.showYTick ?? !0, He.value = o.yTickFontSize ?? 12, $e.value = o.showLegend ?? void 0, Pe.value = o.legendPosition ?? ke.top, Be.value = o.usePointStyle ?? !0, Me.value = o.rowHeight ?? 0, Ve.value = o.colWidths ?? [];
1102
+ le(
1103
+ () => o.value.widget.config,
1104
+ (s) => {
1105
+ c.value = s.rollup, k.value = s.showTitle ?? !0, E.value = s.titleFontSize ?? 14, q.value = s.titleBold ?? !1, P.value = s.titleItalic ?? !1, X.value = s.titleUnderline ?? !1, p.value = s.chartHeight ?? void 0, l.value = s.chartWidth ?? void 0, S.value = s.showLabel ?? !1, b.value = s.labelAlign ?? Se.center, x.value = s.labelAnchor ?? Ce.center, R.value = s.labelRotation ?? 0, B.value = s.labelOffset ?? 0, T.value = s.labelFontSize ?? 12, $.value = s.showX ?? !0, pe.value = s.xPosition ?? _e.bottom, Fe.value = s.showXGrid ?? !1, Ee.value = s.showXTick ?? !0, Te.value = s.xTickFontSize ?? 12, We.value = s.showY ?? !0, ze.value = s.yPosition ?? xe.left, De.value = s.showYGrid ?? !1, Ae.value = s.showYTick ?? !0, He.value = s.yTickFontSize ?? 12, $e.value = s.showLegend ?? void 0, Pe.value = s.legendPosition ?? ke.top, Be.value = s.usePointStyle ?? !0, Me.value = s.rowHeight ?? 0, Ve.value = s.colWidths ?? [];
1087
1106
  },
1088
1107
  { deep: !0 }
1089
- ), se([() => i.value], () => {
1090
- i.value !== null && (l.value.widget.config.rollup = i.value);
1091
- }), se(
1108
+ ), le([() => c.value], () => {
1109
+ c.value !== null && (o.value.widget.config.rollup = c.value);
1110
+ }), le(
1092
1111
  [
1093
1112
  () => W.value,
1094
- () => ot.value,
1095
- () => nt.value,
1096
1113
  () => st.value,
1114
+ () => rt.value,
1115
+ () => nt.value,
1097
1116
  () => ve.value,
1098
- () => rt.value
1117
+ () => it.value
1099
1118
  ],
1100
1119
  () => {
1101
- var o;
1102
- ve.value && ((o = ve.value) == null ? void 0 : o.length) > 0 && Xe();
1120
+ var s;
1121
+ ve.value && ((s = ve.value) == null ? void 0 : s.length) > 0 && Xe();
1103
1122
  },
1104
1123
  {
1105
1124
  deep: !0
1106
1125
  }
1107
- ), se(
1108
- [() => l.value.size],
1126
+ ), le(
1127
+ [() => o.value.size],
1109
1128
  () => {
1110
1129
  ee();
1111
1130
  },
@@ -1117,7 +1136,7 @@ const ua = /* @__PURE__ */ U({
1117
1136
  });
1118
1137
  const Oe = Pt();
1119
1138
  let ue;
1120
- const Xe = Je(async function() {
1139
+ const Xe = Ke(async function() {
1121
1140
  if (W.value.config.schemaNames.length <= 0 && !(W.value.config.dimensions.length <= 0 || W.value.config.metrics.length <= 0)) {
1122
1141
  Oe.open({
1123
1142
  message: "schema must not be empty and dimension or metrics must have at least 1 column",
@@ -1128,59 +1147,59 @@ const ua = /* @__PURE__ */ U({
1128
1147
  try {
1129
1148
  t.value = !0, ue && ue.abort(), ue = new AbortController();
1130
1149
  const L = ue.signal;
1131
- te.value = await zt(W.value, L), w.value = he(), t.value = !1;
1150
+ te.value = await Dt(W.value, L), w.value = he(), t.value = !1;
1132
1151
  } catch (L) {
1133
1152
  te.value = null, L.code !== "ERR_CANCELED" && (Oe.open({ message: `Invalid chart ${W.value.type}`, type: "error" }), console.log(L), t.value = !1);
1134
1153
  }
1135
1154
  });
1136
- function ut(o) {
1137
- switch (l.value.widget.type) {
1155
+ function dt(s) {
1156
+ switch (o.value.widget.type) {
1138
1157
  case "SPACER":
1139
1158
  return;
1140
1159
  case "SCORECARD":
1141
1160
  return;
1142
1161
  case "TABLE":
1143
- return `${l.value.size.height * 100 + (P.value ? 72 : 0) + 96.5}px`;
1162
+ return `${o.value.size.height * 100 + (D.value ? 72 : 0) + 96.5}px`;
1144
1163
  }
1145
- return `${Math.max(o / l.value.size.width, 90) * l.value.size.height}px`;
1146
- }
1147
- function dt() {
1148
- const o = m.value - 1;
1149
- o >= 0 && (C.value = J.value[o].value);
1164
+ return `${Math.max(s / o.value.size.width, 90) * o.value.size.height}px`;
1150
1165
  }
1151
1166
  function ht() {
1152
- const o = m.value + 1;
1153
- o >= 0 && o < J.value.length && (C.value = J.value[o].value);
1167
+ const s = m.value - 1;
1168
+ s >= 0 && (C.value = J.value[s].value);
1154
1169
  }
1155
- const mt = Object.values(Et).map((o) => ({
1156
- label: Wt(o),
1157
- value: o,
1170
+ function mt() {
1171
+ const s = m.value + 1;
1172
+ s >= 0 && s < J.value.length && (C.value = J.value[s].value);
1173
+ }
1174
+ const pt = Object.values(Tt).map((s) => ({
1175
+ label: Wt(s),
1176
+ value: s,
1158
1177
  onClick: async () => {
1159
- await Dt(o, d.index);
1178
+ await zt(s, d.index);
1160
1179
  }
1161
- })), pt = W.value.type === f.Spacer ? "flat" : "outlined", ft = W.value.type === f.Spacer ? "p-0" : "p-16";
1162
- return (o, L) => {
1163
- const K = F("FmTooltip"), oe = F("FmSearch"), vt = F("FmCheckbox"), ge = F("FmButton"), gt = F("FmSelect"), yt = F("FmMenuItem"), wt = F("FmMenu"), bt = F("FmForm"), Ct = F("FmCircularProgress"), St = F("FmCard");
1164
- return x(), M(St, {
1180
+ })), ft = W.value.type === v.Spacer ? "flat" : "outlined", vt = W.value.type === v.Spacer ? "p-0" : "p-16";
1181
+ return (s, L) => {
1182
+ const K = F("FmTooltip"), se = F("FmSearch"), gt = F("FmCheckbox"), ge = F("FmButton"), yt = F("FmSelect"), wt = F("FmMenuItem"), bt = F("FmMenu"), Ct = F("FmForm"), St = F("FmCircularProgress"), _t = F("FmCard");
1183
+ return _(), M(_t, {
1165
1184
  ref_key: "tileCard",
1166
1185
  ref: u,
1167
- class: me(`${at.value} ${r(ft)}`),
1168
- variant: r(pt)
1186
+ class: me(`${lt.value} ${r(vt)}`),
1187
+ variant: r(ft)
1169
1188
  }, {
1170
1189
  default: V(() => [
1171
- t.value ? (x(), M(Ct, { key: 1 })) : (x(), D("div", {
1190
+ t.value ? (_(), M(St, { key: 1 })) : (_(), z("div", {
1172
1191
  key: 0,
1173
1192
  style: Y({ height: qe.value })
1174
1193
  }, [
1175
- (x(), M(Lt(lt.value), {
1194
+ (_(), M(Lt(ot.value), {
1176
1195
  key: w.value,
1177
1196
  modelValue: Ne.value,
1178
1197
  "onUpdate:modelValue": L[3] || (L[3] = (de) => Ne.value = de)
1179
1198
  }, {
1180
1199
  menu: V(() => [
1181
- H(bt, { class: "flex items-center gap-2" }, {
1200
+ H(Ct, { class: "flex items-center gap-2" }, {
1182
1201
  default: V(() => {
1183
- var de, Ye, Ue, Ge;
1202
+ var de, Ue, Ye, Ge;
1184
1203
  return [
1185
1204
  H(K, {
1186
1205
  variant: "plain",
@@ -1190,58 +1209,58 @@ const ua = /* @__PURE__ */ U({
1190
1209
  disabled: !W.value.description
1191
1210
  }, {
1192
1211
  default: V(() => [
1193
- _.value !== !1 ? (x(), D("p", {
1212
+ k.value !== !1 ? (_(), z("p", {
1194
1213
  key: 0,
1195
1214
  style: Y({
1196
- fontSize: T.value + "px",
1215
+ fontSize: E.value + "px",
1197
1216
  fontWeight: q.value ? "bold" : "normal",
1198
- fontStyle: B.value ? "italic" : "normal",
1199
- textDecoration: n.value ? "underline" : "none"
1217
+ fontStyle: P.value ? "italic" : "normal",
1218
+ textDecoration: X.value ? "underline" : "none"
1200
1219
  }),
1201
1220
  class: me(["text-fm-color-typo-secondary line-clamp-1", [
1202
- T.value <= 18 ? "fm-typo-en-body-md-400" : "",
1221
+ E.value <= 18 ? "fm-typo-en-body-md-400" : "",
1203
1222
  W.value.description ? "border-b-2 border-dashed border-gray-300" : ""
1204
1223
  ]])
1205
- }, ne(r(ae)(r(s), r(c), W.value.title, "other")), 7)) : Q("", !0)
1224
+ }, ne(r(ae)(r(n), r(i), W.value.title, "other")), 7)) : Q("", !0)
1206
1225
  ]),
1207
1226
  _: 1
1208
1227
  }, 8, ["content", "disabled"]),
1209
- (de = ce.value) != null && de.showSearchBar ? (x(), M(oe, {
1228
+ (de = ce.value) != null && de.showSearchBar ? (_(), M(se, {
1210
1229
  key: 0,
1211
1230
  modelValue: fe.value,
1212
1231
  "onUpdate:modelValue": L[0] || (L[0] = (I) => fe.value = I),
1213
1232
  class: "grow"
1214
- }, null, 8, ["modelValue"])) : (x(), D("div", da)),
1215
- Ft(H(vt, {
1216
- modelValue: b.value,
1217
- "onUpdate:modelValue": L[1] || (L[1] = (I) => b.value = I),
1233
+ }, null, 8, ["modelValue"])) : (_(), z("div", da)),
1234
+ Ft(H(gt, {
1235
+ modelValue: S.value,
1236
+ "onUpdate:modelValue": L[1] || (L[1] = (I) => S.value = I),
1218
1237
  label: "Label",
1219
1238
  value: !1
1220
1239
  }, null, 8, ["modelValue"]), [
1221
- [Tt, (Ye = ce.value) == null ? void 0 : Ye.showLabel]
1240
+ [Et, (Ue = ce.value) == null ? void 0 : Ue.showLabel]
1222
1241
  ]),
1223
- (Ue = ce.value) != null && Ue.showDrillDimension && J.value.length > 0 ? (x(), D("div", ha, [
1242
+ (Ye = ce.value) != null && Ye.showDrillDimension && J.value.length > 0 ? (_(), z("div", ha, [
1224
1243
  H(ge, {
1225
1244
  icon: "arrow_upward",
1226
1245
  variant: "tertiary",
1227
- disabled: !v.value,
1228
- onClick: dt
1246
+ disabled: !g.value,
1247
+ onClick: ht
1229
1248
  }, null, 8, ["disabled"]),
1230
1249
  H(ge, {
1231
1250
  icon: "arrow_downward",
1232
1251
  variant: "tertiary",
1233
- disabled: !p.value,
1234
- onClick: ht
1252
+ disabled: !f.value,
1253
+ onClick: mt
1235
1254
  }, null, 8, ["disabled"])
1236
1255
  ])) : Q("", !0),
1237
- (Ge = ce.value) != null && Ge.showRollup && Ie.value.length > 0 ? (x(), M(gt, {
1256
+ (Ge = ce.value) != null && Ge.showRollup && Ie.value.length > 0 ? (_(), M(yt, {
1238
1257
  key: 3,
1239
- modelValue: i.value,
1240
- "onUpdate:modelValue": L[2] || (L[2] = (I) => i.value = I),
1258
+ modelValue: c.value,
1259
+ "onUpdate:modelValue": L[2] || (L[2] = (I) => c.value = I),
1241
1260
  class: "w-[150px]",
1242
1261
  items: Ie.value
1243
1262
  }, null, 8, ["modelValue", "items"])) : Q("", !0),
1244
- d.hideExport ? Q("", !0) : (x(), M(wt, {
1263
+ d.hideExport ? Q("", !0) : (_(), M(bt, {
1245
1264
  key: 4,
1246
1265
  shift: !0
1247
1266
  }, {
@@ -1252,7 +1271,7 @@ const ua = /* @__PURE__ */ U({
1252
1271
  })
1253
1272
  ]),
1254
1273
  default: V(() => [
1255
- (x(!0), D(X, null, Ze(r(mt), (I) => (x(), M(yt, {
1274
+ (_(!0), z(U, null, et(r(pt), (I) => (_(), M(wt, {
1256
1275
  key: I.value,
1257
1276
  label: I.label,
1258
1277
  onClick: I.onClick