@feedmepos/mf-report 5.14.0 → 5.14.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.
Files changed (22) hide show
  1. package/dist/{App-BNArBRtV.js → App-BSFklEEa.js} +3 -3
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js → BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js} +474 -451
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BuLc4McY.js → Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js} +1 -1
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-AUYQMBzZ.js +1593 -0
  5. package/dist/{InsightView-BwjdIi3p.js → InsightView-CMmAT2rl.js} +2 -2
  6. package/dist/{Integration-DwLrVkip.js → Integration-DrGnZU7Q.js} +1782 -1748
  7. package/dist/{Layout-ncN7DY5t.js → Layout-mIWpWnCL.js} +1 -1
  8. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-dzy_j_cA.js +361 -0
  9. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-EbtoF2G2.js → NavigationTab.vue_vue_type_script_setup_true_lang-euNq77f5.js} +3 -2
  10. package/dist/{OverviewView-D0kwfHlr.js → OverviewView-DDXR_j2B.js} +4 -4
  11. package/dist/{Report-BRdPTrEZ.js → Report-BBtxkvJ6.js} +2 -2
  12. package/dist/{ReportEditor-Cc3xFhAb.js → ReportEditor-fhkMIuBz.js} +360 -364
  13. package/dist/{ReportView-CiT_Gipx.js → ReportView-DeKcGdcr.js} +5 -5
  14. package/dist/{Setting-p_CQ_uCA.js → Setting-BbkhsS8O.js} +2 -2
  15. package/dist/{TileEditor-DtdB1JVB.js → TileEditor-Bm2N-CGt.js} +3 -3
  16. package/dist/{TransitionFade-B7X9MlFK.js → TransitionFade-SBrSUfhd.js} +2 -2
  17. package/dist/app.js +10 -10
  18. package/dist/assets/{formatChartData.worker-BteOciBT.js → formatChartData.worker-CzUhzs-5.js} +2 -2
  19. package/dist/style.css +1 -1
  20. package/package.json +1 -1
  21. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-FhZDnXkv.js +0 -1497
  22. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-D0UI760k.js +0 -352
@@ -1,16 +1,16 @@
1
- import { defineComponent as G, mergeModels as L, useModel as j, ref as q, computed as U, resolveComponent as g, createBlock as $, openBlock as s, withCtx as u, createElementVNode as _, createVNode as t, unref as e, normalizeClass as oe, createTextVNode as pe, toDisplayString as E, createElementBlock as S, Fragment as J, renderSlot as Ce, createCommentVNode as Q, watch as ve, renderList as X, resolveDynamicComponent as Ue, isRef as ke, normalizeStyle as fe, onMounted as Be } from "vue";
2
- import { W as De, _ as We, i as Ie, S as ye, d as we, T as Re, a as qe } from "./TransitionFade-B7X9MlFK.js";
3
- import { c as Ee, D as le, C as _e, a as Ve, b as He, v as te } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js";
4
- import { storeToRefs as re } from "pinia";
1
+ import { defineComponent as G, mergeModels as L, useModel as j, ref as q, computed as U, resolveComponent as f, createBlock as $, openBlock as i, withCtx as s, createElementVNode as w, createVNode as t, unref as l, normalizeClass as oe, createTextVNode as ce, toDisplayString as P, createElementBlock as S, Fragment as J, renderSlot as Ce, createCommentVNode as Q, watch as pe, renderList as X, resolveDynamicComponent as Ue, isRef as ke, normalizeStyle as ve, onMounted as Be } from "vue";
2
+ import { W as De, _ as We, i as Ie, S as ye, d as _e, T as Re, a as qe } from "./TransitionFade-SBrSUfhd.js";
3
+ import { c as Pe, D as le, C as we, a as Ve, b as Ee, v as te } from "./BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js";
4
+ import { storeToRefs as fe } from "pinia";
5
5
  import { useRouter as Se, useRoute as $e } from "vue-router";
6
- import { useBreakpoints as se, useSnackbar as Oe, FmButtonColorThemeVariant as Z } from "@feedmepos/ui-library";
6
+ import { useBreakpoints as ie, useSnackbar as Oe, FmButtonColorThemeVariant as Z } from "@feedmepos/ui-library";
7
7
  import { u as Te } from "./message-dialog-UoMWOnil.js";
8
- import { u as ae, j as de, f as Pe } from "./vue-i18n-DG0DIzwC.js";
9
- import { _ as me } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-FhZDnXkv.js";
10
- import { _ as ce } from "./NoData.vue_vue_type_script_setup_true_lang-j8BlZPPp.js";
11
- import { r as ie } from "./i18n-Cif1I9J2.js";
8
+ import { u as ae, j as ue, f as ze } from "./vue-i18n-DG0DIzwC.js";
9
+ import { _ as de } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-AUYQMBzZ.js";
10
+ import { _ as me } from "./NoData.vue_vue_type_script_setup_true_lang-j8BlZPPp.js";
11
+ import { r as re } from "./i18n-Cif1I9J2.js";
12
12
  import { _ as Fe } from "./SelectComponent.vue_vue_type_script_setup_true_lang-kzXPr73e.js";
13
- const ze = /* @__PURE__ */ G({
13
+ const He = /* @__PURE__ */ G({
14
14
  __name: "WidgetDialog",
15
15
  props: /* @__PURE__ */ L({
16
16
  isOpen: { type: Boolean }
@@ -19,40 +19,40 @@ const ze = /* @__PURE__ */ G({
19
19
  modelModifiers: {}
20
20
  }),
21
21
  emits: /* @__PURE__ */ L(["update:isOpen"], ["update:modelValue"]),
22
- setup(k, { emit: d }) {
23
- const { t: n } = ae(), { breakpoints: r } = se(), y = j(k, "modelValue"), p = k, x = d;
24
- function f() {
22
+ setup(k, { emit: u }) {
23
+ const { t: n } = ae(), { breakpoints: r } = ie(), y = j(k, "modelValue"), c = k, x = u;
24
+ function v() {
25
25
  x("update:isOpen", !1);
26
26
  }
27
27
  function V() {
28
- m.value && (y.value = m.value, m.value = void 0, x("update:isOpen", !1));
28
+ d.value && (y.value = d.value, d.value = void 0, x("update:isOpen", !1));
29
29
  }
30
- const m = q(), B = U(() => !m.value);
30
+ const d = q(), B = U(() => !d.value);
31
31
  return (D, W) => {
32
- const I = g("FmButton"), w = g("FmDialog");
33
- return s(), $(w, {
34
- "model-value": p.isOpen
32
+ const I = f("FmButton"), _ = f("FmDialog");
33
+ return i(), $(_, {
34
+ "model-value": c.isOpen
35
35
  }, {
36
- "dialog-header": u(() => [
37
- pe(E(e(n)("report.widget.type")), 1)
36
+ "dialog-header": s(() => [
37
+ ce(P(l(n)("report.widget.type")), 1)
38
38
  ]),
39
- default: u(() => [
39
+ default: s(() => [
40
40
  t(De, {
41
- modelValue: m.value,
42
- "onUpdate:modelValue": W[0] || (W[0] = (N) => m.value = N),
43
- class: oe(`grid ${e(r).lg || e(r).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
41
+ modelValue: d.value,
42
+ "onUpdate:modelValue": W[0] || (W[0] = (N) => d.value = N),
43
+ class: oe(`grid ${l(r).lg || l(r).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
44
44
  "child-class": "p-[8px] flex flex-col"
45
45
  }, null, 8, ["modelValue", "class"])
46
46
  ]),
47
- "dialog-footer": u(() => [
48
- W[1] || (W[1] = _("div", { class: "grow" }, null, -1)),
47
+ "dialog-footer": s(() => [
48
+ W[1] || (W[1] = w("div", { class: "grow" }, null, -1)),
49
49
  t(I, {
50
- label: e(n)("report.common.cancel"),
50
+ label: l(n)("report.common.cancel"),
51
51
  variant: "tertiary",
52
- onClick: f
52
+ onClick: v
53
53
  }, null, 8, ["label"]),
54
54
  t(I, {
55
- label: e(n)("report.common.confirm"),
55
+ label: l(n)("report.common.confirm"),
56
56
  disabled: B.value,
57
57
  onClick: V
58
58
  }, null, 8, ["label", "disabled"])
@@ -74,15 +74,15 @@ const ze = /* @__PURE__ */ G({
74
74
  }),
75
75
  emits: ["update:modelValue"],
76
76
  setup(k) {
77
- const { t: d } = ae(), n = j(k, "modelValue"), r = k;
78
- return (y, p) => {
79
- const x = g("FmIcon");
80
- return s(), S("div", {
77
+ const { t: u } = ae(), n = j(k, "modelValue"), r = k;
78
+ return (y, c) => {
79
+ const x = f("FmIcon");
80
+ return i(), S("div", {
81
81
  class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
82
- onClick: p[0] || (p[0] = (f) => n.value = !n.value)
82
+ onClick: c[0] || (c[0] = (v) => n.value = !n.value)
83
83
  }, [
84
- _("p", Je, E(e(d)("report.editor.customizeReport")), 1),
85
- p[1] || (p[1] = _("div", { class: "grow" }, null, -1)),
84
+ w("p", Je, P(l(u)("report.editor.customizeReport")), 1),
85
+ c[1] || (c[1] = w("div", { class: "grow" }, null, -1)),
86
86
  t(x, {
87
87
  name: r.icon
88
88
  }, null, 8, ["name"])
@@ -97,11 +97,11 @@ const ze = /* @__PURE__ */ G({
97
97
  },
98
98
  emits: ["update:modelValue"],
99
99
  setup(k) {
100
- const d = j(k, "modelValue");
101
- return (n, r) => (s(), S(J, null, [
100
+ const u = j(k, "modelValue");
101
+ return (n, r) => (i(), S(J, null, [
102
102
  t(ge, {
103
- modelValue: d.value,
104
- "onUpdate:modelValue": r[0] || (r[0] = (y) => d.value = y),
103
+ modelValue: u.value,
104
+ "onUpdate:modelValue": r[0] || (r[0] = (y) => u.value = y),
105
105
  icon: "keyboard_double_arrow_left"
106
106
  }, null, 8, ["modelValue"]),
107
107
  Ce(n.$slots, "default")
@@ -115,28 +115,28 @@ const ze = /* @__PURE__ */ G({
115
115
  },
116
116
  emits: ["update:modelValue"],
117
117
  setup(k) {
118
- const d = j(k, "modelValue");
118
+ const u = j(k, "modelValue");
119
119
  return (n, r) => {
120
- const y = g("FmTopSheet"), p = g("FmCard");
121
- return s(), $(p, { class: "fixed bottom-0 w-full" }, {
122
- default: u(() => [
120
+ const y = f("FmTopSheet"), c = f("FmCard");
121
+ return i(), $(c, { class: "fixed bottom-0 w-full" }, {
122
+ default: s(() => [
123
123
  t(ge, {
124
- modelValue: d.value,
125
- "onUpdate:modelValue": r[0] || (r[0] = (x) => d.value = x),
124
+ modelValue: u.value,
125
+ "onUpdate:modelValue": r[0] || (r[0] = (x) => u.value = x),
126
126
  icon: "keyboard_double_arrow_up"
127
127
  }, null, 8, ["modelValue"]),
128
128
  t(y, {
129
- modelValue: d.value,
130
- "onUpdate:modelValue": r[2] || (r[2] = (x) => d.value = x),
129
+ modelValue: u.value,
130
+ "onUpdate:modelValue": r[2] || (r[2] = (x) => u.value = x),
131
131
  "fullscreen-size": "sm"
132
132
  }, {
133
- default: u(() => [
133
+ default: s(() => [
134
134
  t(ge, {
135
- modelValue: d.value,
136
- "onUpdate:modelValue": r[1] || (r[1] = (x) => d.value = x),
135
+ modelValue: u.value,
136
+ "onUpdate:modelValue": r[1] || (r[1] = (x) => u.value = x),
137
137
  icon: "keyboard_double_arrow_down"
138
138
  }, null, 8, ["modelValue"]),
139
- d.value ? Ce(n.$slots, "default", { key: 0 }) : Q("", !0)
139
+ u.value ? Ce(n.$slots, "default", { key: 0 }) : Q("", !0)
140
140
  ]),
141
141
  _: 3
142
142
  }, 8, ["modelValue"])
@@ -169,139 +169,139 @@ const ze = /* @__PURE__ */ G({
169
169
  }),
170
170
  emits: ["update:globalFilter", "update:isOpen"],
171
171
  setup(k) {
172
- const { t: d, te: n } = ae(), r = j(k, "globalFilter"), y = j(k, "isOpen"), p = Oe(), x = k, f = q(), V = q(), m = q(), B = q([]), D = q([]);
173
- ve(y, (v) => {
174
- var o, h, a, l;
175
- v && (f.value = ((o = r.value) == null ? void 0 : o.label) || "", V.value = x.schemas.find(
172
+ const { t: u, te: n } = ae(), r = j(k, "globalFilter"), y = j(k, "isOpen"), c = Oe(), x = k, v = q(), V = q(), d = q(), B = q([]), D = q([]);
173
+ pe(y, (p) => {
174
+ var o, g, a, e;
175
+ p && (v.value = ((o = r.value) == null ? void 0 : o.label) || "", V.value = x.schemas.find(
176
176
  (C) => {
177
- var i;
178
- return C.name === ((i = r.value) == null ? void 0 : i.schemaName);
177
+ var h;
178
+ return C.name === ((h = r.value) == null ? void 0 : h.schemaName);
179
179
  }
180
- ), m.value = (h = I.value.find(
180
+ ), d.value = (g = I.value.find(
181
181
  (C) => {
182
- var i;
183
- return C.value.name === ((i = r.value) == null ? void 0 : i.name);
182
+ var h;
183
+ return C.value.name === ((h = r.value) == null ? void 0 : h.name);
184
184
  }
185
- )) == null ? void 0 : h.value, B.value = ((a = r.value) == null ? void 0 : a.tileIds) || [], D.value = ((l = r.value) == null ? void 0 : l.filters) || []);
185
+ )) == null ? void 0 : g.value, B.value = ((a = r.value) == null ? void 0 : a.tileIds) || [], D.value = ((e = r.value) == null ? void 0 : e.filters) || []);
186
186
  });
187
187
  const W = U(
188
- () => x.schemas.map((v) => ({
189
- label: v.label || v.name,
190
- value: v
188
+ () => x.schemas.map((p) => ({
189
+ label: p.label || p.name,
190
+ value: p
191
191
  }))
192
192
  ), I = U(() => {
193
- var v;
194
- return (((v = V.value) == null ? void 0 : v.fields) || []).map((o) => ({
193
+ var p;
194
+ return (((p = V.value) == null ? void 0 : p.fields) || []).map((o) => ({
195
195
  label: o.label,
196
196
  value: o
197
197
  }));
198
- }), w = U(() => x.tiles.reduce((v, o, h) => {
199
- var C, i;
200
- const a = o.widget.config.schemaNames ?? [], l = (o.widget.config.joinDatasources ?? []).flatMap(
201
- (c) => c.schemaNames ?? []
198
+ }), _ = U(() => x.tiles.reduce((p, o, g) => {
199
+ var C, h;
200
+ const a = o.widget.config.schemaNames ?? [], e = (o.widget.config.joinDatasources ?? []).flatMap(
201
+ (m) => m.schemaNames ?? []
202
202
  );
203
- return [...a, ...l].includes(((C = V.value) == null ? void 0 : C.name) || "") && v.push({
204
- label: (i = o == null ? void 0 : o.widget.title) != null && i.trim() ? o.widget.title : `Widget ${h + 1}`,
203
+ return [...a, ...e].includes(((C = V.value) == null ? void 0 : C.name) || "") && p.push({
204
+ label: (h = o == null ? void 0 : o.widget.title) != null && h.trim() ? o.widget.title : `Widget ${g + 1}`,
205
205
  value: o.id
206
- }), v;
206
+ }), p;
207
207
  }, [])), N = U(
208
208
  () => x.schemas.flatMap(
209
- (v) => (v.fields ?? []).map((o) => ({
209
+ (p) => (p.fields ?? []).map((o) => ({
210
210
  ...o,
211
211
  labels: [
212
- ie(d, n, v.label, "schema"),
213
- ie(d, n, o.label || o.name, "other")
212
+ re(u, n, p.label, "schema"),
213
+ re(u, n, o.label || o.name, "other")
214
214
  ]
215
215
  }))
216
216
  )
217
217
  );
218
- function A(v) {
218
+ function A(p) {
219
219
  var o;
220
- v.name !== ((o = V.value) == null ? void 0 : o.name) && (V.value = v, m.value = void 0);
220
+ p.name !== ((o = V.value) == null ? void 0 : o.name) && (V.value = p, d.value = void 0);
221
221
  }
222
- function O(v) {
223
- m.value = v;
222
+ function O(p) {
223
+ d.value = p;
224
224
  }
225
- function H(v) {
226
- switch (v) {
225
+ function E(p) {
226
+ switch (p) {
227
227
  case le.Timestamp:
228
- return _e.Between;
228
+ return we.Between;
229
229
  case le.Bool:
230
230
  case le.String:
231
231
  case le.Numeric:
232
- return _e.Equal;
232
+ return we.Equal;
233
233
  default:
234
- throw new Error(`Unsupported data type: ${v}`);
234
+ throw new Error(`Unsupported data type: ${p}`);
235
235
  }
236
236
  }
237
237
  function b() {
238
238
  if (!V.value) {
239
- p.open({ message: "Invalid schema", type: "error" });
239
+ c.open({ message: "Invalid schema", type: "error" });
240
240
  return;
241
241
  }
242
- m.value || p.open({ message: "Invalid dimension", type: "error" }), r.value = {
242
+ d.value || c.open({ message: "Invalid dimension", type: "error" }), r.value = {
243
243
  schemaName: V.value.name,
244
- name: m.value.name,
245
- label: f.value || name,
246
- operator: H(m.value.type),
247
- option: m.value.type === le.Timestamp ? Ee.DateTime : null,
244
+ name: d.value.name,
245
+ label: v.value || name,
246
+ operator: E(d.value.type),
247
+ option: d.value.type === le.Timestamp ? Pe.DateTime : null,
248
248
  tileIds: [...B.value],
249
249
  filters: JSON.parse(JSON.stringify(D.value))
250
250
  }, y.value = !1;
251
251
  }
252
- function P() {
252
+ function z() {
253
253
  y.value = !1;
254
254
  }
255
255
  const K = U(() => {
256
- var v;
256
+ var p;
257
257
  return [
258
- (v = V.value) == null ? void 0 : v.name,
258
+ (p = V.value) == null ? void 0 : p.name,
259
259
  ...D.value.map((o) => o.schemaName)
260
260
  ];
261
261
  });
262
- function Y(v) {
263
- var C, i, c, M;
264
- const o = x.tiles.find((R) => R.id === v.value), h = ((i = (C = o == null ? void 0 : o.widget) == null ? void 0 : C.config) == null ? void 0 : i.schemaNames) ?? [], a = (((M = (c = o == null ? void 0 : o.widget) == null ? void 0 : c.config) == null ? void 0 : M.joinDatasources) ?? []).flatMap(
262
+ function Y(p) {
263
+ var C, h, m, M;
264
+ const o = x.tiles.find((R) => R.id === p.value), g = ((h = (C = o == null ? void 0 : o.widget) == null ? void 0 : C.config) == null ? void 0 : h.schemaNames) ?? [], a = (((M = (m = o == null ? void 0 : o.widget) == null ? void 0 : m.config) == null ? void 0 : M.joinDatasources) ?? []).flatMap(
265
265
  (R) => R.schemaNames ?? []
266
- ), l = [...h, ...a];
267
- return K.value.filter((R) => !!R).some((R) => !l.includes(R));
266
+ ), e = [...g, ...a];
267
+ return K.value.filter((R) => !!R).some((R) => !e.includes(R));
268
268
  }
269
- return (v, o) => {
270
- const h = g("FmTextField"), a = g("FmLabel"), l = g("FmCheckbox"), C = g("FmIcon"), i = g("FmTooltip"), c = g("FmForm"), M = g("FmButton"), R = g("FmDialog");
271
- return s(), $(R, {
269
+ return (p, o) => {
270
+ const g = f("FmTextField"), a = f("FmLabel"), e = f("FmCheckbox"), C = f("FmIcon"), h = f("FmTooltip"), m = f("FmForm"), M = f("FmButton"), R = f("FmDialog");
271
+ return i(), $(R, {
272
272
  modelValue: y.value,
273
273
  "onUpdate:modelValue": o[5] || (o[5] = (T) => y.value = T),
274
274
  overlay: !0,
275
275
  "z-index": 10
276
276
  }, {
277
- "dialog-header": u(() => [
278
- pe(E(e(d)("report.section.filter.globalFilter")), 1)
277
+ "dialog-header": s(() => [
278
+ ce(P(l(u)("report.section.filter.globalFilter")), 1)
279
279
  ]),
280
- default: u(() => [
281
- t(c, {
280
+ default: s(() => [
281
+ t(m, {
282
282
  ref: "form",
283
283
  class: "flex flex-col gap-2 w-[490px]"
284
284
  }, {
285
- default: u(() => [
286
- t(h, {
287
- modelValue: f.value,
288
- "onUpdate:modelValue": o[0] || (o[0] = (T) => f.value = T),
289
- placeholder: e(d)("report.section.filter.displayName"),
290
- label: e(d)("report.section.filter.displayName"),
285
+ default: s(() => [
286
+ t(g, {
287
+ modelValue: v.value,
288
+ "onUpdate:modelValue": o[0] || (o[0] = (T) => v.value = T),
289
+ placeholder: l(u)("report.section.filter.displayName"),
290
+ label: l(u)("report.section.filter.displayName"),
291
291
  class: "mb-2"
292
292
  }, null, 8, ["modelValue", "placeholder", "label"]),
293
293
  t(Fe, {
294
294
  "model-value": V.value,
295
295
  items: W.value,
296
- placeholder: e(d)("report.section.schema.title"),
297
- label: e(d)("report.section.schema.title"),
296
+ placeholder: l(u)("report.section.schema.title"),
297
+ label: l(u)("report.section.schema.title"),
298
298
  "onUpdate:modelValue": o[1] || (o[1] = (T) => A(T))
299
299
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
300
300
  t(Fe, {
301
- "model-value": m.value,
301
+ "model-value": d.value,
302
302
  items: I.value,
303
- placeholder: e(d)("report.section.dimension.Dimension"),
304
- label: e(d)("report.section.dimension.Dimension"),
303
+ placeholder: l(u)("report.section.dimension.Dimension"),
304
+ label: l(u)("report.section.dimension.Dimension"),
305
305
  "onUpdate:modelValue": o[2] || (o[2] = (T) => O(T))
306
306
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
307
307
  t(We, {
@@ -310,29 +310,29 @@ const ze = /* @__PURE__ */ G({
310
310
  options: N.value
311
311
  }, null, 8, ["modelValue", "options"]),
312
312
  t(a, { class: "mt-2 fm-typo-en-body-lg-600" }, {
313
- default: u(() => [
314
- pe(E(e(d)("report.section.filter.applyWidget")), 1)
313
+ default: s(() => [
314
+ ce(P(l(u)("report.section.filter.applyWidget")), 1)
315
315
  ]),
316
316
  _: 1
317
317
  }),
318
- k.tiles.length > 0 ? (s(), S("div", Ge, [
319
- (s(!0), S(J, null, X(w.value, (T) => (s(), S("div", {
318
+ k.tiles.length > 0 ? (i(), S("div", Ge, [
319
+ (i(!0), S(J, null, X(_.value, (T) => (i(), S("div", {
320
320
  key: T.value,
321
321
  class: "flex items-center"
322
322
  }, [
323
- t(l, {
323
+ t(e, {
324
324
  modelValue: B.value,
325
325
  "onUpdate:modelValue": o[4] || (o[4] = (ne) => B.value = ne),
326
326
  label: T.label,
327
327
  value: T.value
328
328
  }, null, 8, ["modelValue", "label", "value"]),
329
- Y(T) ? (s(), $(i, {
329
+ Y(T) ? (i(), $(h, {
330
330
  key: 0,
331
- content: e(d)("report.section.filter.missingFilterSchema"),
331
+ content: l(u)("report.section.filter.missingFilterSchema"),
332
332
  "z-index": 99,
333
333
  class: "ml-2"
334
334
  }, {
335
- default: u(() => [
335
+ default: s(() => [
336
336
  t(C, {
337
337
  name: "warning",
338
338
  class: "text-fm-color-system-error-300"
@@ -341,24 +341,24 @@ const ze = /* @__PURE__ */ G({
341
341
  _: 1
342
342
  }, 8, ["content"])) : Q("", !0)
343
343
  ]))), 128))
344
- ])) : (s(), $(a, {
344
+ ])) : (i(), $(a, {
345
345
  key: 1,
346
346
  class: "fm-typo-en-body-lg-400",
347
- label: e(d)("report.section.filter.noWidget")
347
+ label: l(u)("report.section.filter.noWidget")
348
348
  }, null, 8, ["label"]))
349
349
  ]),
350
350
  _: 1
351
351
  }, 512)
352
352
  ]),
353
- "dialog-footer": u(() => [
354
- o[6] || (o[6] = _("div", { class: "grow" }, null, -1)),
353
+ "dialog-footer": s(() => [
354
+ o[6] || (o[6] = w("div", { class: "grow" }, null, -1)),
355
355
  t(M, {
356
- label: e(d)("report.common.cancel"),
356
+ label: l(u)("report.common.cancel"),
357
357
  variant: "tertiary",
358
- onClick: P
358
+ onClick: z
359
359
  }, null, 8, ["label"]),
360
360
  t(M, {
361
- label: e(d)("report.common.confirm"),
361
+ label: l(u)("report.common.confirm"),
362
362
  onClick: b
363
363
  }, null, 8, ["label"])
364
364
  ]),
@@ -378,44 +378,44 @@ const ze = /* @__PURE__ */ G({
378
378
  modelModifiers: {}
379
379
  }),
380
380
  emits: /* @__PURE__ */ L(["hideConfiguration"], ["update:modelValue"]),
381
- setup(k, { emit: d }) {
382
- const n = j(k, "modelValue"), { breakpoints: r } = se(), y = k, p = d, x = Se(), f = $e(), V = q(), {
383
- currentSelectWidgetType: m,
381
+ setup(k, { emit: u }) {
382
+ const n = j(k, "modelValue"), { breakpoints: r } = ie(), y = k, c = u, x = Se(), v = $e(), V = q(), {
383
+ currentSelectWidgetType: d,
384
384
  categories: B,
385
385
  editingTile: D,
386
386
  editingTileIndex: W,
387
387
  editingGlobalFilter: I,
388
- editingGlobalFilterIndex: w
389
- } = re(Ve()), { schemas: N } = re(He()), { promptMessage: A } = Te(), O = q(!1), H = q(!1), { t: b, te: P } = ae(), K = q(void 0), Y = U(() => {
390
- const a = n.value.tiles.flatMap((l) => {
391
- var c;
392
- const C = l.widget.config.schemaNames ?? [], i = ((c = l.widget.config.joinDatasources) == null ? void 0 : c.flatMap((M) => M.schemaNames ?? [])) ?? [];
393
- return [...C, ...i];
388
+ editingGlobalFilterIndex: _
389
+ } = fe(Ve()), { schemas: N } = fe(Ee()), { promptMessage: A } = Te(), O = q(!1), E = q(!1), { t: b, te: z } = ae(), K = q(void 0), Y = U(() => {
390
+ const a = n.value.tiles.flatMap((e) => {
391
+ var m;
392
+ const C = e.widget.config.schemaNames ?? [], h = ((m = e.widget.config.joinDatasources) == null ? void 0 : m.flatMap((M) => M.schemaNames ?? [])) ?? [];
393
+ return [...C, ...h];
394
394
  });
395
- return [...new Set(a)].reduce((l, C) => {
396
- const i = N.value.find((c) => c.name === C);
397
- return i && l.push(i), l;
395
+ return [...new Set(a)].reduce((e, C) => {
396
+ const h = N.value.find((m) => m.name === C);
397
+ return h && e.push(h), e;
398
398
  }, []);
399
399
  });
400
- ve(
401
- () => m.value,
400
+ pe(
401
+ () => d.value,
402
402
  () => {
403
- m.value !== void 0 && (K.value = Ie(m.value), D.value = K.value, W.value = -1, x.push({
403
+ d.value !== void 0 && (K.value = Ie(d.value), D.value = K.value, W.value = -1, x.push({
404
404
  name: "tileEditor",
405
- query: f.query
405
+ query: v.query
406
406
  }));
407
407
  },
408
408
  { immediate: !0 }
409
- ), ve(
409
+ ), pe(
410
410
  () => n.value.tiles,
411
411
  (a) => {
412
- a.forEach((l) => {
413
- l.id || (l.id = te());
412
+ a.forEach((e) => {
413
+ e.id || (e.id = te());
414
414
  });
415
415
  },
416
416
  { immediate: !0, deep: !0 }
417
417
  );
418
- const v = [
418
+ const p = [
419
419
  {
420
420
  label: b("report.common.edit"),
421
421
  selected: !1,
@@ -423,7 +423,7 @@ const ze = /* @__PURE__ */ G({
423
423
  onClick: (a) => {
424
424
  W.value = a, D.value = JSON.parse(JSON.stringify(n.value.tiles[a])), x.push({
425
425
  name: "tileEditor",
426
- query: f.query
426
+ query: v.query
427
427
  });
428
428
  }
429
429
  },
@@ -432,11 +432,11 @@ const ze = /* @__PURE__ */ G({
432
432
  selected: !1,
433
433
  variant: "tertiary",
434
434
  onClick: (a) => {
435
- const l = {
435
+ const e = {
436
436
  ...JSON.parse(JSON.stringify(n.value.tiles[a])),
437
437
  id: te()
438
438
  };
439
- n.value.tiles.push(l);
439
+ n.value.tiles.push(e);
440
440
  }
441
441
  },
442
442
  {
@@ -451,9 +451,9 @@ const ze = /* @__PURE__ */ G({
451
451
  })
452
452
  })) {
453
453
  const C = n.value.tiles[a].id;
454
- n.value.tiles.splice(a, 1), n.value.globalFilters && n.value.globalFilters.forEach((i) => {
455
- var c;
456
- i.tileIds = (c = i.tileIds) == null ? void 0 : c.filter((M) => M !== C);
454
+ n.value.tiles.splice(a, 1), n.value.globalFilters && n.value.globalFilters.forEach((h) => {
455
+ var m;
456
+ h.tileIds = (m = h.tileIds) == null ? void 0 : m.filter((M) => M !== C);
457
457
  });
458
458
  }
459
459
  }
@@ -464,8 +464,8 @@ const ze = /* @__PURE__ */ G({
464
464
  selected: !1,
465
465
  variant: "tertiary",
466
466
  onClick: (a) => {
467
- var l;
468
- w.value = a, I.value = JSON.parse(JSON.stringify((l = n.value.globalFilters) == null ? void 0 : l[a])), O.value = !0;
467
+ var e;
468
+ _.value = a, I.value = JSON.parse(JSON.stringify((e = n.value.globalFilters) == null ? void 0 : e[a])), O.value = !0;
469
469
  }
470
470
  },
471
471
  {
@@ -473,68 +473,68 @@ const ze = /* @__PURE__ */ G({
473
473
  selected: !1,
474
474
  variant: "destructive",
475
475
  onClick: async (a) => {
476
- var i, c;
477
- const l = (i = n.value.globalFilters) == null ? void 0 : i[a];
478
- if (!l) return;
476
+ var h, m;
477
+ const e = (h = n.value.globalFilters) == null ? void 0 : h[a];
478
+ if (!e) return;
479
479
  await A({
480
480
  title: b("report.editor.deleteWidget"),
481
481
  message: b("report.editor.deleteWidgetConfirm", {
482
- title: de(l)
482
+ title: ue(e)
483
483
  })
484
- }) && ((c = n.value.globalFilters) == null || c.splice(a, 1));
484
+ }) && ((m = n.value.globalFilters) == null || m.splice(a, 1));
485
485
  }
486
486
  }
487
- ], h = U(() => B.value.map((a) => ({
487
+ ], g = U(() => B.value.map((a) => ({
488
488
  label: b(`report.category.${a.name}`),
489
489
  value: a.id
490
490
  })));
491
- return (a, l) => {
492
- const C = g("FmTextField"), i = g("FmSelect"), c = g("FmButton"), M = g("FmIcon"), R = g("FmTooltip"), T = g("FmMenuItem"), ne = g("FmMenu"), be = g("FmListItem"), he = g("FmList"), Ne = g("FmForm");
493
- return s(), $(Ue(e(r).lg || e(r).md ? Le : je), {
491
+ return (a, e) => {
492
+ const C = f("FmTextField"), h = f("FmSelect"), m = f("FmButton"), M = f("FmIcon"), R = f("FmTooltip"), T = f("FmMenuItem"), ne = f("FmMenu"), be = f("FmListItem"), he = f("FmList"), Ne = f("FmForm");
493
+ return i(), $(Ue(l(r).lg || l(r).md ? Le : je), {
494
494
  "model-value": y.hideConfiguration,
495
- "onUpdate:modelValue": l[8] || (l[8] = (F) => p("hideConfiguration", F))
495
+ "onUpdate:modelValue": e[8] || (e[8] = (F) => c("hideConfiguration", F))
496
496
  }, {
497
- default: u(() => [
497
+ default: s(() => [
498
498
  t(Ae, {
499
499
  "is-open": O.value,
500
- "onUpdate:isOpen": l[0] || (l[0] = (F) => O.value = F),
501
- "global-filter": e(I),
500
+ "onUpdate:isOpen": e[0] || (e[0] = (F) => O.value = F),
501
+ "global-filter": l(I),
502
502
  tiles: n.value.tiles,
503
503
  schemas: Y.value,
504
- "onUpdate:globalFilter": l[1] || (l[1] = (F) => {
505
- F && (n.value.globalFilters || (n.value.globalFilters = []), typeof e(w) == "number" && e(w) >= 0 ? n.value.globalFilters[e(w)] = F : n.value.globalFilters.push(F));
504
+ "onUpdate:globalFilter": e[1] || (e[1] = (F) => {
505
+ F && (n.value.globalFilters || (n.value.globalFilters = []), typeof l(_) == "number" && l(_) >= 0 ? n.value.globalFilters[l(_)] = F : n.value.globalFilters.push(F));
506
506
  })
507
507
  }, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
508
- t(ze, {
509
- modelValue: e(m),
510
- "onUpdate:modelValue": l[2] || (l[2] = (F) => ke(m) ? m.value = F : null),
511
- "is-open": H.value,
512
- "onUpdate:isOpen": l[3] || (l[3] = (F) => H.value = F)
508
+ t(He, {
509
+ modelValue: l(d),
510
+ "onUpdate:modelValue": e[2] || (e[2] = (F) => ke(d) ? d.value = F : null),
511
+ "is-open": E.value,
512
+ "onUpdate:isOpen": e[3] || (e[3] = (F) => E.value = F)
513
513
  }, null, 8, ["modelValue", "is-open"]),
514
514
  t(Ne, {
515
515
  ref_key: "form",
516
516
  ref: V,
517
517
  class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
518
518
  }, {
519
- default: u(() => [
519
+ default: s(() => [
520
520
  t(ye, { class: "border-solid" }, {
521
- header: u(() => [
522
- _("p", null, E(e(b)("report.editor.reportInfo")), 1),
523
- l[9] || (l[9] = _("div", { class: "grow" }, null, -1))
521
+ header: s(() => [
522
+ w("p", null, P(l(b)("report.editor.reportInfo")), 1),
523
+ e[9] || (e[9] = w("div", { class: "grow" }, null, -1))
524
524
  ]),
525
- content: u(() => [
526
- _("div", Ke, [
525
+ content: s(() => [
526
+ w("div", Ke, [
527
527
  t(C, {
528
528
  modelValue: n.value.name,
529
- "onUpdate:modelValue": l[4] || (l[4] = (F) => n.value.name = F),
530
- label: e(b)("report.editor.reportTitle"),
531
- placeholder: e(b)("report.editor.placeholder")
529
+ "onUpdate:modelValue": e[4] || (e[4] = (F) => n.value.name = F),
530
+ label: l(b)("report.editor.reportTitle"),
531
+ placeholder: l(b)("report.editor.placeholder")
532
532
  }, null, 8, ["modelValue", "label", "placeholder"]),
533
- t(i, {
533
+ t(h, {
534
534
  modelValue: n.value.category,
535
- "onUpdate:modelValue": l[5] || (l[5] = (F) => n.value.category = F),
536
- label: e(b)("report.common.category"),
537
- items: h.value
535
+ "onUpdate:modelValue": e[5] || (e[5] = (F) => n.value.category = F),
536
+ label: l(b)("report.common.category"),
537
+ items: g.value
538
538
  }, null, 8, ["modelValue", "label", "items"])
539
539
  ])
540
540
  ]),
@@ -544,57 +544,57 @@ const ze = /* @__PURE__ */ G({
544
544
  class: "border-solid",
545
545
  "is-open": !1
546
546
  }, {
547
- header: u(() => [
548
- _("p", null, E(e(b)("report.section.filter.globalFilter")), 1),
549
- l[10] || (l[10] = _("div", { class: "grow" }, null, -1))
547
+ header: s(() => [
548
+ w("p", null, P(l(b)("report.section.filter.globalFilter")), 1),
549
+ e[10] || (e[10] = w("div", { class: "grow" }, null, -1))
550
550
  ]),
551
- content: u(() => [
552
- _("div", Qe, [
553
- t(c, {
554
- label: e(b)("report.section.filter.addGlobalFilter"),
551
+ content: s(() => [
552
+ w("div", Qe, [
553
+ t(m, {
554
+ label: l(b)("report.section.filter.addGlobalFilter"),
555
555
  variant: "secondary",
556
556
  icon: "add",
557
557
  "icon-position": "prepend",
558
- "border-color": e(Z).ColorPrimary,
559
- "text-color": e(Z).ColorPrimary,
560
- onClick: l[6] || (l[6] = () => {
561
- w.value = null, I.value = null, O.value = !0;
558
+ "border-color": l(Z).ColorPrimary,
559
+ "text-color": l(Z).ColorPrimary,
560
+ onClick: e[6] || (e[6] = () => {
561
+ _.value = null, I.value = null, O.value = !0;
562
562
  })
563
563
  }, null, 8, ["label", "border-color", "text-color"]),
564
564
  t(he, null, {
565
- default: u(() => [
566
- t(e(we), {
565
+ default: s(() => [
566
+ t(l(_e), {
567
567
  list: n.value.globalFilters,
568
568
  "item-key": "`${element.schemaName}-${element.name}`",
569
569
  class: "flex flex-col gap-2 cursor-grab",
570
570
  handle: ".handle"
571
571
  }, {
572
- item: u(({ element: F, index: ee }) => [
572
+ item: s(({ element: F, index: ee }) => [
573
573
  t(be, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
574
- default: u(() => [
574
+ default: s(() => [
575
575
  t(M, {
576
576
  name: "drag_handle",
577
577
  class: "handle"
578
578
  }),
579
- _("div", Xe, [
579
+ w("div", Xe, [
580
580
  t(R, {
581
581
  "z-index": 99,
582
- content: e(de)(F),
582
+ content: l(ue)(F),
583
583
  class: "handle"
584
584
  }, {
585
- default: u(() => [
586
- _("p", Ye, E(e(de)(F)), 1)
585
+ default: s(() => [
586
+ w("p", Ye, P(l(ue)(F)), 1)
587
587
  ]),
588
588
  _: 2
589
589
  }, 1032, ["content"]),
590
590
  Y.value.find(
591
- (z) => z.name === F.schemaName
592
- ) ? Q("", !0) : (s(), $(R, {
591
+ (H) => H.name === F.schemaName
592
+ ) ? Q("", !0) : (i(), $(R, {
593
593
  key: 0,
594
- content: e(b)("report.section.filter.missingSchema"),
594
+ content: l(b)("report.section.filter.missingSchema"),
595
595
  "z-index": 99
596
596
  }, {
597
- default: u(() => [
597
+ default: s(() => [
598
598
  t(M, {
599
599
  name: "warning",
600
600
  class: "text-fm-color-system-error-300"
@@ -603,29 +603,29 @@ const ze = /* @__PURE__ */ G({
603
603
  _: 1
604
604
  }, 8, ["content"]))
605
605
  ]),
606
- l[11] || (l[11] = _("div", { class: "grow" }, null, -1)),
606
+ e[11] || (e[11] = w("div", { class: "grow" }, null, -1)),
607
607
  t(ne, {
608
608
  trigger: "click",
609
609
  shift: !0,
610
610
  "stop-click-propagation": !0
611
611
  }, {
612
- "menu-button": u(() => [
613
- t(c, {
612
+ "menu-button": s(() => [
613
+ t(m, {
614
614
  "append-icon": "more_vert",
615
615
  variant: "tertiary"
616
616
  })
617
617
  ]),
618
- default: u(() => [
619
- (s(), S(J, null, X(o, (z, ue) => t(T, {
620
- key: ue,
621
- onClick: (Me) => z.onClick(ee)
618
+ default: s(() => [
619
+ (i(), S(J, null, X(o, (H, se) => t(T, {
620
+ key: se,
621
+ onClick: (Me) => H.onClick(ee)
622
622
  }, {
623
- label: u(() => [
624
- _("p", {
623
+ label: s(() => [
624
+ w("p", {
625
625
  class: oe(
626
- z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
626
+ H.variant === "destructive" ? " text-fm-color-system-error-300" : ""
627
627
  )
628
- }, E(z.label), 3)
628
+ }, P(H.label), 3)
629
629
  ]),
630
630
  _: 2
631
631
  }, 1032, ["onClick"])), 64))
@@ -645,63 +645,63 @@ const ze = /* @__PURE__ */ G({
645
645
  ]),
646
646
  _: 1
647
647
  }),
648
- _("div", Ze, [
649
- t(c, {
650
- label: e(b)("report.editor.addWidget"),
648
+ w("div", Ze, [
649
+ t(m, {
650
+ label: l(b)("report.editor.addWidget"),
651
651
  variant: "secondary",
652
652
  icon: "add",
653
653
  "icon-position": "prepend",
654
- "border-color": e(Z).ColorPrimary,
655
- "text-color": e(Z).ColorPrimary,
656
- onClick: l[7] || (l[7] = (F) => H.value = !0)
654
+ "border-color": l(Z).ColorPrimary,
655
+ "text-color": l(Z).ColorPrimary,
656
+ onClick: e[7] || (e[7] = (F) => E.value = !0)
657
657
  }, null, 8, ["label", "border-color", "text-color"]),
658
658
  t(he, null, {
659
- default: u(() => [
660
- t(e(we), {
659
+ default: s(() => [
660
+ t(l(_e), {
661
661
  list: n.value.tiles,
662
662
  "item-key": "id",
663
663
  class: "flex flex-col gap-2 cursor-grab",
664
664
  handle: ".handle"
665
665
  }, {
666
- item: u(({ element: F, index: ee }) => [
666
+ item: s(({ element: F, index: ee }) => [
667
667
  t(be, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
668
- default: u(() => [
668
+ default: s(() => [
669
669
  t(M, {
670
670
  name: "drag_handle",
671
671
  class: "handle"
672
672
  }),
673
673
  t(R, {
674
- content: F.widget.title ? e(ie)(e(b), e(P), F.widget.title, "other") : e(b)("report.editor.widget", { index: ee + 1 }),
674
+ content: F.widget.title ? l(re)(l(b), l(z), F.widget.title, "other") : l(b)("report.editor.widget", { index: ee + 1 }),
675
675
  class: "handle"
676
676
  }, {
677
- default: u(() => [
678
- _("p", el, E(F.widget.title ? e(ie)(e(b), e(P), F.widget.title, "other") : e(b)("report.editor.widget", { index: ee + 1 })), 1)
677
+ default: s(() => [
678
+ w("p", el, P(F.widget.title ? l(re)(l(b), l(z), F.widget.title, "other") : l(b)("report.editor.widget", { index: ee + 1 })), 1)
679
679
  ]),
680
680
  _: 2
681
681
  }, 1032, ["content"]),
682
- l[12] || (l[12] = _("div", { class: "grow" }, null, -1)),
682
+ e[12] || (e[12] = w("div", { class: "grow" }, null, -1)),
683
683
  t(ne, {
684
684
  trigger: "click",
685
685
  shift: !0,
686
686
  "stop-click-propagation": !0
687
687
  }, {
688
- "menu-button": u(() => [
689
- t(c, {
688
+ "menu-button": s(() => [
689
+ t(m, {
690
690
  "append-icon": "more_vert",
691
691
  variant: "tertiary"
692
692
  })
693
693
  ]),
694
- default: u(() => [
695
- (s(), S(J, null, X(v, (z, ue) => t(T, {
696
- key: ue,
697
- onClick: (Me) => z.onClick(ee)
694
+ default: s(() => [
695
+ (i(), S(J, null, X(p, (H, se) => t(T, {
696
+ key: se,
697
+ onClick: (Me) => H.onClick(ee)
698
698
  }, {
699
- label: u(() => [
700
- _("p", {
699
+ label: s(() => [
700
+ w("p", {
701
701
  class: oe(
702
- z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
702
+ H.variant === "destructive" ? " text-fm-color-system-error-300" : ""
703
703
  )
704
- }, E(z.label), 3)
704
+ }, P(H.label), 3)
705
705
  ]),
706
706
  _: 2
707
707
  }, 1032, ["onClick"])), 64))
@@ -755,37 +755,37 @@ const ze = /* @__PURE__ */ G({
755
755
  modelModifiers: {}
756
756
  }),
757
757
  emits: /* @__PURE__ */ L(["hideConfiguration"], ["update:modelValue"]),
758
- setup(k, { emit: d }) {
759
- const { breakpoints: n } = se(), r = j(k, "modelValue"), y = k, p = U(() => y.previewWidth > 0 && y.previewHeight > 0), x = U(() => n.value.sm || n.value.xs), f = d;
760
- return (V, m) => {
761
- const B = g("FmCircularProgress"), D = g("FmButton"), W = g("FmMenuDivider"), I = g("FmCard");
762
- return s(), S("div", ll, [
763
- r.value ? (s(), S(J, { key: 1 }, [
764
- p.value ? Q("", !0) : (s(), $(Re, {
758
+ setup(k, { emit: u }) {
759
+ const { breakpoints: n } = ie(), r = j(k, "modelValue"), y = k, c = U(() => y.previewWidth > 0 && y.previewHeight > 0), x = U(() => n.value.sm || n.value.xs), v = u;
760
+ return (V, d) => {
761
+ const B = f("FmCircularProgress"), D = f("FmButton"), W = f("FmMenuDivider"), I = f("FmCard");
762
+ return i(), S("div", ll, [
763
+ r.value ? (i(), S(J, { key: 1 }, [
764
+ c.value ? Q("", !0) : (i(), $(Re, {
765
765
  key: 0,
766
766
  "model-value": !y.hideConfiguration
767
767
  }, {
768
- right: u(() => [
769
- _("div", tl, [
770
- r.value ? (s(), $(xe, {
768
+ right: s(() => [
769
+ w("div", tl, [
770
+ r.value ? (i(), $(xe, {
771
771
  key: 0,
772
772
  modelValue: r.value,
773
- "onUpdate:modelValue": m[0] || (m[0] = (w) => r.value = w),
773
+ "onUpdate:modelValue": d[0] || (d[0] = (_) => r.value = _),
774
774
  "hide-configuration": y.hideConfiguration,
775
- onHideConfiguration: m[1] || (m[1] = (w) => f("hideConfiguration", w))
775
+ onHideConfiguration: d[1] || (d[1] = (_) => v("hideConfiguration", _))
776
776
  }, null, 8, ["modelValue", "hide-configuration"])) : Q("", !0)
777
777
  ])
778
778
  ]),
779
- left: u(() => [
780
- _("div", ol, [
779
+ left: s(() => [
780
+ w("div", ol, [
781
781
  t(D, {
782
782
  variant: "secondary",
783
783
  icon: "keyboard_double_arrow_right",
784
- "border-color": e(Z).ColorPrimary,
785
- "text-color": e(Z).ColorPrimary,
784
+ "border-color": l(Z).ColorPrimary,
785
+ "text-color": l(Z).ColorPrimary,
786
786
  class: "m-24 my-16",
787
787
  size: "md",
788
- onClick: m[2] || (m[2] = (w) => f("hideConfiguration", !y.hideConfiguration))
788
+ onClick: d[2] || (d[2] = (_) => v("hideConfiguration", !y.hideConfiguration))
789
789
  }, null, 8, ["border-color", "text-color"])
790
790
  ])
791
791
  ]),
@@ -795,190 +795,186 @@ const ze = /* @__PURE__ */ G({
795
795
  vertical: "",
796
796
  style: { margin: "0px" }
797
797
  }),
798
- !x.value && !p.value ? (s(), S("div", al, [
799
- r.value.tiles.length > 0 ? (s(), S("div", nl, [
800
- (s(!0), S(J, null, X(r.value.tiles, (w, N) => (s(), $(me, {
801
- key: `${e(te)()}_${N}`,
802
- "model-value": w,
798
+ !x.value && !c.value ? (i(), S("div", al, [
799
+ r.value.tiles.length > 0 ? (i(), S("div", nl, [
800
+ (i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
801
+ key: `${l(te)()}_${N}`,
802
+ "model-value": _,
803
803
  index: N,
804
804
  "hide-export": !0
805
805
  }, null, 8, ["model-value", "index"]))), 128))
806
- ])) : (s(), $(ce, { key: 1 }))
807
- ])) : x.value && !p.value ? (s(), S("div", rl, [
806
+ ])) : (i(), $(me, { key: 1 }))
807
+ ])) : x.value && !c.value ? (i(), S("div", rl, [
808
808
  t(I, { class: "px-5 pb-28" }, {
809
- default: u(() => [
810
- r.value.tiles.length > 0 ? (s(), S("div", il, [
811
- (s(!0), S(J, null, X(r.value.tiles, (w, N) => (s(), $(me, {
812
- key: `${e(te)()}_${N}`,
813
- "model-value": w,
809
+ default: s(() => [
810
+ r.value.tiles.length > 0 ? (i(), S("div", il, [
811
+ (i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
812
+ key: `${l(te)()}_${N}`,
813
+ "model-value": _,
814
814
  index: N,
815
815
  "hide-export": !0
816
816
  }, null, 8, ["model-value", "index"]))), 128))
817
- ])) : (s(), $(ce, { key: 1 }))
817
+ ])) : (i(), $(me, { key: 1 }))
818
818
  ]),
819
819
  _: 1
820
820
  }),
821
- r.value ? (s(), $(xe, {
821
+ r.value ? (i(), $(xe, {
822
822
  key: 0,
823
823
  modelValue: r.value,
824
- "onUpdate:modelValue": m[3] || (m[3] = (w) => r.value = w),
824
+ "onUpdate:modelValue": d[3] || (d[3] = (_) => r.value = _),
825
825
  "hide-configuration": y.hideConfiguration,
826
- onHideConfiguration: m[4] || (m[4] = (w) => {
827
- f("hideConfiguration", w);
826
+ onHideConfiguration: d[4] || (d[4] = (_) => {
827
+ v("hideConfiguration", _);
828
828
  })
829
829
  }, null, 8, ["modelValue", "hide-configuration"])) : Q("", !0)
830
- ])) : (s(), S("div", sl, [
831
- _("div", {
832
- style: fe({
830
+ ])) : (i(), S("div", sl, [
831
+ w("div", {
832
+ style: ve({
833
833
  transformOrigin: "top center",
834
834
  transform: `scale(${y.previewScale})`
835
835
  })
836
836
  }, [
837
- _("div", {
837
+ w("div", {
838
838
  class: "overflow-y-auto bg-white rounded-lg",
839
- style: fe({
839
+ style: ve({
840
840
  width: y.previewWidth + "px",
841
841
  height: y.previewHeight + "px"
842
842
  })
843
843
  }, [
844
- r.value.tiles.length > 0 ? (s(), S("div", ul, [
845
- (s(!0), S(J, null, X(r.value.tiles, (w, N) => (s(), $(me, {
846
- key: `${e(te)()}_${N}`,
847
- "model-value": w,
844
+ r.value.tiles.length > 0 ? (i(), S("div", ul, [
845
+ (i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
846
+ key: `${l(te)()}_${N}`,
847
+ "model-value": _,
848
848
  index: N,
849
849
  "hide-export": !0,
850
850
  "custom-screen-width": y.previewWidth
851
851
  }, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
852
- ])) : (s(), $(ce, { key: 1 }))
852
+ ])) : (i(), $(me, { key: 1 }))
853
853
  ], 4)
854
854
  ], 4)
855
855
  ]))
856
- ], 64)) : (s(), $(B, { key: 0 }))
856
+ ], 64)) : (i(), $(B, { key: 0 }))
857
857
  ]);
858
858
  };
859
859
  }
860
860
  }), ml = { class: "flex items-center gap-4" }, cl = { class: "flex justify-center items-center gap-2 w-full" }, pl = { class: "flex gap-4" }, Vl = /* @__PURE__ */ G({
861
861
  __name: "ReportEditor",
862
862
  setup(k) {
863
- const d = Se(), n = $e(), r = Ve(), { promptLoader: y } = Pe(), { t: p } = ae(), { currentReport: x, editingReport: f } = re(r), { breakpoints: V } = se(), m = U(() => {
864
- var h;
865
- return !((h = f.value) != null && h.editable);
863
+ const u = Se(), n = $e(), r = Ve(), { promptLoader: y } = ze(), { t: c } = ae(), { currentReport: x, editingReport: v } = fe(r), { breakpoints: V } = ie(), d = U(() => {
864
+ var g;
865
+ return !((g = v.value) != null && g.editable);
866
866
  }), B = U(() => {
867
- var h;
868
- return ((h = f.value) == null ? void 0 : h.name) ?? p("report.editor.newReport");
867
+ var g;
868
+ return ((g = v.value) == null ? void 0 : g.name) ?? c("report.editor.newReport");
869
869
  }), D = Oe(), { promptMessage: W } = Te(), I = q(!1);
870
- async function w() {
871
- if (!f.value || f.value.tiles.length === 0) {
872
- D.open({ message: p("report.messages.noWidget"), type: "error" });
870
+ async function _() {
871
+ if (!v.value || v.value.tiles.length === 0) {
872
+ D.open({ message: c("report.messages.noWidget"), type: "error" });
873
873
  return;
874
874
  }
875
- const { defaultChartWidth: h, defaultChartHeight: a } = re(r);
876
- f.value.tiles.forEach((i) => {
877
- i.widget.config.chartWidth == null && (i.widget.config.chartWidth = h.value), i.widget.config.chartHeight == null && (i.widget.config.chartHeight = a.value);
878
- });
879
- const l = m.value ? p("report.common.clone") : p("report.common.save");
875
+ const g = d.value ? c("report.common.clone") : c("report.common.save");
880
876
  if (await W({
881
- title: `${p("report.messages.saveReport")}`,
882
- message: p("report.messages.confirmAction", { action: l, name: B.value })
877
+ title: `${c("report.messages.saveReport")}`,
878
+ message: c("report.messages.confirmAction", { action: g, name: B.value })
883
879
  }))
884
880
  try {
885
881
  await y(async () => {
886
- if (m.value) {
887
- const i = JSON.parse(JSON.stringify(f.value));
888
- i.editable = !0, i.id = "", i.name = `${i.name} ${p("report.common.duplicate")}`, await r.createOrUpdateReport(i);
882
+ if (d.value) {
883
+ const e = JSON.parse(JSON.stringify(v.value));
884
+ e.editable = !0, e.id = "", e.name = `${e.name} ${c("report.common.duplicate")}`, await r.createOrUpdateReport(e);
889
885
  } else
890
- f.value && await r.createOrUpdateReport(f.value);
891
- d.push({
886
+ v.value && await r.createOrUpdateReport(v.value);
887
+ u.push({
892
888
  name: "reportView",
893
889
  query: n.query
894
890
  });
895
891
  });
896
- } catch (i) {
897
- console.log(i), D.open({
898
- message: p("report.messages.failedToAction", { action: l }),
892
+ } catch (e) {
893
+ console.log(e), D.open({
894
+ message: c("report.messages.failedToAction", { action: g }),
899
895
  type: "error"
900
896
  });
901
897
  }
902
898
  }
903
899
  async function N() {
904
900
  var a;
905
- if (!f.value) return;
901
+ if (!v.value) return;
906
902
  await W({
907
- title: p("report.common.report", 1),
908
- message: p("report.editor.notSaved", { name: (a = f.value) == null ? void 0 : a.name })
909
- }) && (f.value = JSON.parse(JSON.stringify(x.value)), d.back());
903
+ title: c("report.common.report", 1),
904
+ message: c("report.editor.notSaved", { name: (a = v.value) == null ? void 0 : a.name })
905
+ }) && (v.value = JSON.parse(JSON.stringify(x.value)), u.back());
910
906
  }
911
907
  Be(() => {
912
- f.value || d.push({ name: "reports" });
908
+ v.value || u.push({ name: "reports" });
913
909
  });
914
910
  const A = [
915
911
  {
916
- label: p("report.common.default"),
912
+ label: c("report.common.default"),
917
913
  width: void 0,
918
914
  height: void 0
919
915
  },
920
916
  {
921
- label: p("report.editor.devices.desktop"),
917
+ label: c("report.editor.devices.desktop"),
922
918
  width: 1920,
923
919
  height: 1080
924
920
  },
925
921
  {
926
- label: p("report.editor.devices.tablet"),
922
+ label: c("report.editor.devices.tablet"),
927
923
  width: 820,
928
924
  height: 1180
929
925
  },
930
926
  {
931
- label: p("report.editor.devices.phone"),
927
+ label: c("report.editor.devices.phone"),
932
928
  width: 390,
933
929
  height: 859
934
930
  }
935
- ], O = q(A[0]), H = q(!1), b = U(() => H.value ? Math.max(O.value.width || 0, O.value.height || 0) : Math.min(O.value.width || 0, O.value.height || 0)), P = U(() => H.value ? Math.min(O.value.width || 0, O.value.height || 0) : Math.max(O.value.width || 0, O.value.height || 0)), K = U(() => window.innerHeight - 72 - 56), Y = U(() => {
931
+ ], O = q(A[0]), E = q(!1), b = U(() => E.value ? Math.max(O.value.width || 0, O.value.height || 0) : Math.min(O.value.width || 0, O.value.height || 0)), z = U(() => E.value ? Math.min(O.value.width || 0, O.value.height || 0) : Math.max(O.value.width || 0, O.value.height || 0)), K = U(() => window.innerHeight - 72 - 56), Y = U(() => {
936
932
  if (!b.value) return 1;
937
- let h = (K.value - 48) / b.value, a = P.value * h;
938
- return a > window.innerWidth && (h = window.innerWidth / P.value, a = P.value * h), h > 1 ? 1 : h;
933
+ let g = (K.value - 48) / b.value, a = z.value * g;
934
+ return a > window.innerWidth && (g = window.innerWidth / z.value, a = z.value * g), g > 1 ? 1 : g;
939
935
  });
940
- function v(h) {
941
- O.value = h;
936
+ function p(g) {
937
+ O.value = g;
942
938
  }
943
939
  function o() {
944
- H.value = !H.value;
940
+ E.value = !E.value;
945
941
  }
946
- return (h, a) => {
947
- const l = g("FmTooltip"), C = g("FmButton"), i = g("FmPageHead");
948
- return s(), $(qe, null, {
949
- default: u(() => [
950
- t(i, {
942
+ return (g, a) => {
943
+ const e = f("FmTooltip"), C = f("FmButton"), h = f("FmPageHead");
944
+ return i(), $(qe, null, {
945
+ default: s(() => [
946
+ t(h, {
951
947
  actions: [
952
- { label: e(p)("report.common.cancel"), value: "cancel", isPrimary: !1 },
948
+ { label: l(c)("report.common.cancel"), value: "cancel", isPrimary: !1 },
953
949
  { label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
954
950
  ],
955
- "onClick:action": a[0] || (a[0] = (c) => {
956
- c === "cancel" && N(), c === "save" && w();
951
+ "onClick:action": a[0] || (a[0] = (m) => {
952
+ m === "cancel" && N(), m === "save" && _();
957
953
  })
958
954
  }, {
959
- title: u(() => [
960
- _("div", ml, [
961
- t(l, {
955
+ title: s(() => [
956
+ w("div", ml, [
957
+ t(e, {
962
958
  content: B.value,
963
959
  placement: "bottom"
964
960
  }, {
965
- default: u(() => [
966
- _("p", {
967
- class: oe(`${e(V).sm || e(V).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
968
- }, E(B.value), 3)
961
+ default: s(() => [
962
+ w("p", {
963
+ class: oe(`${l(V).sm || l(V).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
964
+ }, P(B.value), 3)
969
965
  ]),
970
966
  _: 1
971
967
  }, 8, ["content"]),
972
- _("div", cl, [
973
- _("div", pl, [
974
- (s(), S(J, null, X(A, (c) => {
968
+ w("div", cl, [
969
+ w("div", pl, [
970
+ (i(), S(J, null, X(A, (m) => {
975
971
  var M;
976
972
  return t(C, {
977
- key: c.label,
978
- label: c.label,
979
- variant: ((M = O.value) == null ? void 0 : M.label) === c.label ? "primary" : "secondary",
973
+ key: m.label,
974
+ label: m.label,
975
+ variant: ((M = O.value) == null ? void 0 : M.label) === m.label ? "primary" : "secondary",
980
976
  size: "md",
981
- onClick: (R) => v(c)
977
+ onClick: (R) => p(m)
982
978
  }, null, 8, ["label", "variant", "onClick"]);
983
979
  }), 64))
984
980
  ]),
@@ -994,17 +990,17 @@ const ze = /* @__PURE__ */ G({
994
990
  ]),
995
991
  _: 1
996
992
  }, 8, ["actions"]),
997
- e(f) ? (s(), $(dl, {
993
+ l(v) ? (i(), $(dl, {
998
994
  key: 0,
999
- modelValue: e(f),
1000
- "onUpdate:modelValue": a[1] || (a[1] = (c) => ke(f) ? f.value = c : null),
1001
- style: fe({ height: K.value + "px" }),
1002
- class: oe(e(V).lg || e(V).md ? "flex" : ""),
995
+ modelValue: l(v),
996
+ "onUpdate:modelValue": a[1] || (a[1] = (m) => ke(v) ? v.value = m : null),
997
+ style: ve({ height: K.value + "px" }),
998
+ class: oe(l(V).lg || l(V).md ? "flex" : ""),
1003
999
  "hide-configuration": I.value,
1004
- "preview-width": P.value,
1000
+ "preview-width": z.value,
1005
1001
  "preview-height": b.value,
1006
1002
  "preview-scale": Y.value,
1007
- onHideConfiguration: a[2] || (a[2] = (c) => I.value = c)
1003
+ onHideConfiguration: a[2] || (a[2] = (m) => I.value = m)
1008
1004
  }, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : Q("", !0)
1009
1005
  ]),
1010
1006
  _: 1