@feedmepos/mf-report 5.20.0-beta.0 → 5.21.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. package/dist/{App-BdDt90_S.js → App-H4qTrOhm.js} +3 -3
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js → BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js} +5 -6
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BdqhFB8u.js → Default.vue_vue_type_script_setup_true_lang-DPYuS630.js} +1 -1
  4. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js → FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.js} +88 -88
  5. package/dist/{InsightView-DT-uBPVt.js → InsightView-A2RMHh9M.js} +2 -2
  6. package/dist/{Layout-B_Ac7nYA.js → Layout-DypUMIa7.js} +1 -1
  7. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Bs-m2m-I.js → MenuTab.vue_vue_type_script_setup_true_lang-DDk9OhF-.js} +3 -3
  8. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DvIiZm-J.js → NavigationTab.vue_vue_type_script_setup_true_lang-C4NFUekp.js} +1 -1
  9. package/dist/{OverviewView-ByPB0h3-.js → OverviewView-DBWJ04u3.js} +4 -4
  10. package/dist/{Report-BB76YTf7.js → Report-CzdpyMiY.js} +100 -92
  11. package/dist/{ReportEditor-BzIQcu_6.js → ReportEditor-DozloMSJ.js} +205 -199
  12. package/dist/{ReportView-C6-SKiiL.js → ReportView-C9-upOW0.js} +5 -5
  13. package/dist/{Setting-DsU_Tn9Y.js → Setting-DJRh5073.js} +2 -2
  14. package/dist/{TileEditor-CryYSc8X.js → TileEditor-BRVBRjwj.js} +3 -3
  15. package/dist/{TransitionFade-CZ_9hsfO.js → TransitionFade-CbhV6xur.js} +2 -2
  16. package/dist/app.js +17 -17
  17. package/dist/assets/{formatChartData.worker-BQkqrr7j.js → formatChartData.worker-CJVlLdXW.js} +2 -2
  18. package/dist/assets/{processTableData.worker-DFxLNXJc.js → processTableData.worker-DRkxI8qA.js} +2 -2
  19. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
- import { defineComponent as X, mergeModels as K, useModel as Q, ref as I, computed as D, resolveComponent as c, createBlock as k, openBlock as i, withCtx as u, createElementVNode as h, createVNode as o, unref as t, normalizeClass as ie, createTextVNode as _e, toDisplayString as H, createElementBlock as T, Fragment as G, renderSlot as $e, createCommentVNode as A, watch as de, renderList as ee, resolveDynamicComponent as Ie, isRef as Te, normalizeStyle as we, onMounted as Re } from "vue";
2
- import { W as We, g as qe, _ as Ee, i as Pe, S as xe, d as ke, T as Je, a as ze } from "./TransitionFade-CZ_9hsfO.js";
3
- import { D as j, c as ue, C as ge, a as Oe, b as He, v as re } from "./BaseDialog.vue_vue_type_script_setup_true_lang-B_DRp5Jk.js";
1
+ import { defineComponent as X, mergeModels as K, useModel as Q, ref as I, computed as D, resolveComponent as p, createBlock as V, openBlock as i, withCtx as u, createElementVNode as h, createVNode as o, unref as t, normalizeClass as ie, createTextVNode as _e, toDisplayString as H, createElementBlock as T, Fragment as G, renderSlot as $e, createCommentVNode as A, watch as de, renderList as ee, resolveDynamicComponent as Ie, isRef as Te, normalizeStyle as we, onMounted as Re } from "vue";
2
+ import { W as We, g as qe, _ as Ee, i as Pe, S as xe, d as ke, T as Je, a as ze } from "./TransitionFade-CbhV6xur.js";
3
+ import { D as j, c as ue, C as ge, a as Oe, b as He, v as re } from "./BaseDialog.vue_vue_type_script_setup_true_lang-PrNxsye6.js";
4
4
  import { storeToRefs as me } from "pinia";
5
5
  import { useRouter as Ne, useRoute as Me } from "vue-router";
6
6
  import { useBreakpoints as pe, useSnackbar as De, FmButtonColorThemeVariant as oe } from "@feedmepos/ui-library";
7
7
  import { u as Ue } from "./message-dialog-UoMWOnil.js";
8
8
  import { u as se, b as Le, i as be, f as je } from "./vue-i18n-BJW_sJot.js";
9
- import { a as Ce, _ as he } from "./FilterSelector.vue_vue_type_script_setup_true_lang-CutuEMyo.js";
9
+ import { a as Ve, _ as he } from "./FilterSelector.vue_vue_type_script_setup_true_lang-lhcRFv_m.js";
10
10
  import { _ as ye } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js";
11
11
  import { r as ce } from "./i18n-DQxDgiLO.js";
12
- import { _ as Ve } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
12
+ import { _ as Ce } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
13
13
  const Ge = /* @__PURE__ */ X({
14
14
  __name: "WidgetDialog",
15
15
  props: /* @__PURE__ */ K({
@@ -20,41 +20,41 @@ const Ge = /* @__PURE__ */ X({
20
20
  }),
21
21
  emits: /* @__PURE__ */ K(["update:isOpen"], ["update:modelValue"]),
22
22
  setup(x, { emit: r }) {
23
- const { t: n } = se(), { breakpoints: a } = pe(), y = Q(x, "modelValue"), m = x, _ = r;
24
- function p() {
23
+ const { t: a } = se(), { breakpoints: n } = pe(), y = Q(x, "modelValue"), m = x, _ = r;
24
+ function f() {
25
25
  _("update:isOpen", !1);
26
26
  }
27
- function V() {
27
+ function C() {
28
28
  s.value && (y.value = s.value, s.value = void 0, _("update:isOpen", !1));
29
29
  }
30
30
  const s = I(), U = D(() => !s.value);
31
31
  return (q, S) => {
32
- const B = c("FmButton"), v = c("FmDialog");
33
- return i(), k(v, {
32
+ const B = p("FmButton"), g = p("FmDialog");
33
+ return i(), V(g, {
34
34
  "model-value": m.isOpen
35
35
  }, {
36
36
  "dialog-header": u(() => [
37
- _e(H(t(n)("report.widget.type")), 1)
37
+ _e(H(t(a)("report.widget.type")), 1)
38
38
  ]),
39
39
  default: u(() => [
40
40
  o(We, {
41
41
  modelValue: s.value,
42
42
  "onUpdate:modelValue": S[0] || (S[0] = (N) => s.value = N),
43
- class: ie(`grid ${t(a).lg || t(a).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
43
+ class: ie(`grid ${t(n).lg || t(n).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
47
  "dialog-footer": u(() => [
48
48
  S[1] || (S[1] = h("div", { class: "grow" }, null, -1)),
49
49
  o(B, {
50
- label: t(n)("report.common.cancel"),
50
+ label: t(a)("report.common.cancel"),
51
51
  variant: "tertiary",
52
- onClick: p
52
+ onClick: f
53
53
  }, null, 8, ["label"]),
54
54
  o(B, {
55
- label: t(n)("report.common.confirm"),
55
+ label: t(a)("report.common.confirm"),
56
56
  disabled: U.value,
57
- onClick: V
57
+ onClick: C
58
58
  }, null, 8, ["label", "disabled"])
59
59
  ]),
60
60
  _: 1
@@ -74,17 +74,17 @@ const Ge = /* @__PURE__ */ X({
74
74
  }),
75
75
  emits: ["update:modelValue"],
76
76
  setup(x) {
77
- const { t: r } = se(), n = Q(x, "modelValue"), a = x;
77
+ const { t: r } = se(), a = Q(x, "modelValue"), n = x;
78
78
  return (y, m) => {
79
- const _ = c("FmIcon");
79
+ const _ = p("FmIcon");
80
80
  return i(), T("div", {
81
81
  class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
82
- onClick: m[0] || (m[0] = (p) => n.value = !n.value)
82
+ onClick: m[0] || (m[0] = (f) => a.value = !a.value)
83
83
  }, [
84
84
  h("p", Ae, H(t(r)("report.editor.customizeReport")), 1),
85
85
  m[1] || (m[1] = h("div", { class: "grow" }, null, -1)),
86
86
  o(_, {
87
- name: a.icon
87
+ name: n.icon
88
88
  }, null, 8, ["name"])
89
89
  ]);
90
90
  };
@@ -98,13 +98,13 @@ const Ge = /* @__PURE__ */ X({
98
98
  emits: ["update:modelValue"],
99
99
  setup(x) {
100
100
  const r = Q(x, "modelValue");
101
- return (n, a) => (i(), T(G, null, [
101
+ return (a, n) => (i(), T(G, null, [
102
102
  o(Fe, {
103
103
  modelValue: r.value,
104
- "onUpdate:modelValue": a[0] || (a[0] = (y) => r.value = y),
104
+ "onUpdate:modelValue": n[0] || (n[0] = (y) => r.value = y),
105
105
  icon: "keyboard_double_arrow_left"
106
106
  }, null, 8, ["modelValue"]),
107
- $e(n.$slots, "default")
107
+ $e(a.$slots, "default")
108
108
  ], 64));
109
109
  }
110
110
  }), Qe = /* @__PURE__ */ X({
@@ -116,27 +116,27 @@ const Ge = /* @__PURE__ */ X({
116
116
  emits: ["update:modelValue"],
117
117
  setup(x) {
118
118
  const r = Q(x, "modelValue");
119
- return (n, a) => {
120
- const y = c("FmTopSheet"), m = c("FmCard");
121
- return i(), k(m, { class: "fixed bottom-0 w-full" }, {
119
+ return (a, n) => {
120
+ const y = p("FmTopSheet"), m = p("FmCard");
121
+ return i(), V(m, { class: "fixed bottom-0 w-full" }, {
122
122
  default: u(() => [
123
123
  o(Fe, {
124
124
  modelValue: r.value,
125
- "onUpdate:modelValue": a[0] || (a[0] = (_) => r.value = _),
125
+ "onUpdate:modelValue": n[0] || (n[0] = (_) => r.value = _),
126
126
  icon: "keyboard_double_arrow_up"
127
127
  }, null, 8, ["modelValue"]),
128
128
  o(y, {
129
129
  modelValue: r.value,
130
- "onUpdate:modelValue": a[2] || (a[2] = (_) => r.value = _),
130
+ "onUpdate:modelValue": n[2] || (n[2] = (_) => r.value = _),
131
131
  "fullscreen-size": "sm"
132
132
  }, {
133
133
  default: u(() => [
134
134
  o(Fe, {
135
135
  modelValue: r.value,
136
- "onUpdate:modelValue": a[1] || (a[1] = (_) => r.value = _),
136
+ "onUpdate:modelValue": n[1] || (n[1] = (_) => r.value = _),
137
137
  icon: "keyboard_double_arrow_down"
138
138
  }, null, 8, ["modelValue"]),
139
- r.value ? $e(n.$slots, "default", { key: 0 }) : A("", !0)
139
+ r.value ? $e(a.$slots, "default", { key: 0 }) : A("", !0)
140
140
  ]),
141
141
  _: 3
142
142
  }, 8, ["modelValue"])
@@ -169,20 +169,20 @@ const Ge = /* @__PURE__ */ X({
169
169
  }),
170
170
  emits: ["update:globalFilter", "update:isOpen"],
171
171
  setup(x) {
172
- const { t: r, te: n } = se(), a = Q(x, "globalFilter"), y = Q(x, "isOpen"), m = De(), _ = x, p = I(), V = I(), s = I(), U = I(), q = I([]), S = I([]), B = I(""), v = I(!1);
172
+ const { t: r, te: a } = se(), n = Q(x, "globalFilter"), y = Q(x, "isOpen"), m = De(), _ = x, f = I(), C = I(), s = I(), U = I(), q = I([]), S = I([]), B = I(""), g = I(!1);
173
173
  de(y, (l) => {
174
- var e, C, d, b, $, W, E;
175
- l && (p.value = ((e = a.value) == null ? void 0 : e.label) || "", V.value = _.schemas.find(
174
+ var e, k, d, b, $, W, E;
175
+ l && (f.value = ((e = n.value) == null ? void 0 : e.label) || "", C.value = _.schemas.find(
176
176
  (J) => {
177
177
  var O;
178
- return J.name === ((O = a.value) == null ? void 0 : O.schemaName);
178
+ return J.name === ((O = n.value) == null ? void 0 : O.schemaName);
179
179
  }
180
- ), s.value = (C = Y.value.find(
180
+ ), s.value = (k = Y.value.find(
181
181
  (J) => {
182
182
  var O;
183
- return J.value.name === ((O = a.value) == null ? void 0 : O.name);
183
+ return J.value.name === ((O = n.value) == null ? void 0 : O.name);
184
184
  }
185
- )) == null ? void 0 : C.value, U.value = (d = a.value) == null ? void 0 : d.option, q.value = ((b = a.value) == null ? void 0 : b.tileIds) || [], S.value = (($ = a.value) == null ? void 0 : $.filters) || [], v.value = !!((W = a.value) != null && W.dataFormula), B.value = ((E = a.value) == null ? void 0 : E.dataFormula) || "");
185
+ )) == null ? void 0 : k.value, U.value = (d = n.value) == null ? void 0 : d.option, q.value = ((b = n.value) == null ? void 0 : b.tileIds) || [], S.value = (($ = n.value) == null ? void 0 : $.filters) || [], g.value = !!((W = n.value) != null && W.dataFormula), B.value = ((E = n.value) == null ? void 0 : E.dataFormula) || "");
186
186
  });
187
187
  const N = D(
188
188
  () => _.schemas.map((l) => ({
@@ -191,20 +191,20 @@ const Ge = /* @__PURE__ */ X({
191
191
  }))
192
192
  ), Y = D(() => {
193
193
  var l;
194
- return (((l = V.value) == null ? void 0 : l.fields) || []).map((e) => ({
194
+ return (((l = C.value) == null ? void 0 : l.fields) || []).map((e) => ({
195
195
  label: e.label || e.name,
196
196
  value: e
197
197
  }));
198
198
  }), R = D(() => {
199
199
  var l;
200
200
  return ((l = s.value) == null ? void 0 : l.type) !== j.Timestamp ? [] : qe(r);
201
- }), P = D(() => _.tiles.reduce((l, e, C) => {
201
+ }), P = D(() => _.tiles.reduce((l, e, k) => {
202
202
  var $, W;
203
203
  const d = e.widget.config.schemaNames ?? [], b = (e.widget.config.joinDatasources ?? []).flatMap(
204
204
  (E) => E.schemaNames ?? []
205
205
  );
206
- return [...d, ...b].includes((($ = V.value) == null ? void 0 : $.name) || "") && l.push({
207
- label: (W = e == null ? void 0 : e.widget.title) != null && W.trim() ? e.widget.title : `Widget ${C + 1}`,
206
+ return [...d, ...b].includes((($ = C.value) == null ? void 0 : $.name) || "") && l.push({
207
+ label: (W = e == null ? void 0 : e.widget.title) != null && W.trim() ? e.widget.title : `Widget ${k + 1}`,
208
208
  value: e.id
209
209
  }), l;
210
210
  }, [])), L = D(
@@ -212,15 +212,15 @@ const Ge = /* @__PURE__ */ X({
212
212
  (l) => (l.fields ?? []).map((e) => ({
213
213
  ...e,
214
214
  labels: [
215
- ce(r, n, l.label, "schema"),
216
- ce(r, n, e.label || e.name, "other")
215
+ ce(r, a, l.label, "schema"),
216
+ ce(r, a, e.label || e.name, "other")
217
217
  ]
218
218
  }))
219
219
  )
220
220
  );
221
- function g(l) {
221
+ function v(l) {
222
222
  var e;
223
- l.name !== ((e = V.value) == null ? void 0 : e.name) && (V.value = l, s.value = void 0);
223
+ l.name !== ((e = C.value) == null ? void 0 : e.name) && (C.value = l, s.value = void 0);
224
224
  }
225
225
  function Z(l) {
226
226
  s.value = l, U.value = l.type === j.Timestamp ? ue.DateTime : void 0;
@@ -238,7 +238,7 @@ const Ge = /* @__PURE__ */ X({
238
238
  }
239
239
  }
240
240
  function te() {
241
- if (!V.value) {
241
+ if (!C.value) {
242
242
  m.open({ message: "Invalid schema", type: "error" });
243
243
  return;
244
244
  }
@@ -256,10 +256,10 @@ const Ge = /* @__PURE__ */ X({
256
256
  });
257
257
  return;
258
258
  }
259
- a.value = {
260
- schemaName: V.value.name,
259
+ n.value = {
260
+ schemaName: C.value.name,
261
261
  name: s.value.name,
262
- label: p.value,
262
+ label: f.value,
263
263
  operator: le(
264
264
  s.value.type,
265
265
  s.value.type === j.Timestamp ? U.value ?? ue.DateTime : null
@@ -268,7 +268,7 @@ const Ge = /* @__PURE__ */ X({
268
268
  values: [],
269
269
  tileIds: [...q.value],
270
270
  filters: JSON.parse(JSON.stringify(S.value)),
271
- dataFormula: v.value ? B.value : void 0
271
+ dataFormula: g.value ? B.value : void 0
272
272
  }, y.value = !1;
273
273
  }
274
274
  function ae() {
@@ -277,22 +277,22 @@ const Ge = /* @__PURE__ */ X({
277
277
  const F = D(() => {
278
278
  var l;
279
279
  return [
280
- (l = V.value) == null ? void 0 : l.name,
280
+ (l = C.value) == null ? void 0 : l.name,
281
281
  ...S.value.map((e) => e.schemaName)
282
282
  ];
283
283
  });
284
284
  function M(l) {
285
285
  var $, W, E, J;
286
- const e = _.tiles.find((O) => O.id === l.value), C = ((W = ($ = e == null ? void 0 : e.widget) == null ? void 0 : $.config) == null ? void 0 : W.schemaNames) ?? [], d = (((J = (E = e == null ? void 0 : e.widget) == null ? void 0 : E.config) == null ? void 0 : J.joinDatasources) ?? []).flatMap(
286
+ const e = _.tiles.find((O) => O.id === l.value), k = ((W = ($ = e == null ? void 0 : e.widget) == null ? void 0 : $.config) == null ? void 0 : W.schemaNames) ?? [], d = (((J = (E = e == null ? void 0 : e.widget) == null ? void 0 : E.config) == null ? void 0 : J.joinDatasources) ?? []).flatMap(
287
287
  (O) => O.schemaNames ?? []
288
- ), b = [...C, ...d];
288
+ ), b = [...k, ...d];
289
289
  return F.value.filter((O) => !!O).some((O) => !b.includes(O));
290
290
  }
291
291
  return (l, e) => {
292
- const C = c("FmTextField"), d = c("FmSelect"), b = c("FmCheckbox"), $ = c("FmTextarea"), W = c("FmLabel"), E = c("FmIcon"), J = c("FmTooltip"), O = c("FmForm"), ne = c("FmButton"), ve = c("FmDialog");
293
- return i(), k(ve, {
292
+ const k = p("FmTextField"), d = p("FmSelect"), b = p("FmCheckbox"), $ = p("FmTextarea"), W = p("FmLabel"), E = p("FmIcon"), J = p("FmTooltip"), O = p("FmForm"), ne = p("FmButton"), ve = p("FmDialog");
293
+ return i(), V(ve, {
294
294
  modelValue: y.value,
295
- "onUpdate:modelValue": e[8] || (e[8] = (f) => y.value = f),
295
+ "onUpdate:modelValue": e[8] || (e[8] = (c) => y.value = c),
296
296
  overlay: !0,
297
297
  "z-index": 10
298
298
  }, {
@@ -305,30 +305,30 @@ const Ge = /* @__PURE__ */ X({
305
305
  class: "flex flex-col gap-2 w-[490px]"
306
306
  }, {
307
307
  default: u(() => {
308
- var f;
308
+ var c;
309
309
  return [
310
- o(C, {
311
- modelValue: p.value,
312
- "onUpdate:modelValue": e[0] || (e[0] = (w) => p.value = w),
310
+ o(k, {
311
+ modelValue: f.value,
312
+ "onUpdate:modelValue": e[0] || (e[0] = (w) => f.value = w),
313
313
  placeholder: t(r)("report.section.filter.displayName"),
314
314
  label: t(r)("report.section.filter.displayName"),
315
315
  class: "mb-2"
316
316
  }, null, 8, ["modelValue", "placeholder", "label"]),
317
- o(Ve, {
318
- "model-value": V.value,
317
+ o(Ce, {
318
+ "model-value": C.value,
319
319
  items: N.value,
320
320
  placeholder: t(r)("report.section.schema.title"),
321
321
  label: t(r)("report.section.schema.title"),
322
- "onUpdate:modelValue": e[1] || (e[1] = (w) => g(w))
322
+ "onUpdate:modelValue": e[1] || (e[1] = (w) => v(w))
323
323
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
324
- o(Ve, {
324
+ o(Ce, {
325
325
  "model-value": s.value,
326
326
  items: Y.value,
327
327
  placeholder: t(r)("report.section.dimension.Dimension"),
328
328
  label: t(r)("report.section.dimension.Dimension"),
329
329
  "onUpdate:modelValue": e[2] || (e[2] = (w) => Z(w))
330
330
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
331
- ((f = s.value) == null ? void 0 : f.type) === t(j).Timestamp ? (i(), k(d, {
331
+ ((c = s.value) == null ? void 0 : c.type) === t(j).Timestamp ? (i(), V(d, {
332
332
  key: 0,
333
333
  modelValue: U.value,
334
334
  "onUpdate:modelValue": e[3] || (e[3] = (w) => U.value = w),
@@ -337,12 +337,12 @@ const Ge = /* @__PURE__ */ X({
337
337
  label: t(r)("report.section.filter.timeFormatter")
338
338
  }, null, 8, ["modelValue", "items", "placeholder", "label"])) : A("", !0),
339
339
  o(b, {
340
- modelValue: v.value,
341
- "onUpdate:modelValue": e[4] || (e[4] = (w) => v.value = w),
340
+ modelValue: g.value,
341
+ "onUpdate:modelValue": e[4] || (e[4] = (w) => g.value = w),
342
342
  label: t(r)("report.section.filter.advance"),
343
343
  value: !0
344
344
  }, null, 8, ["modelValue", "label"]),
345
- v.value ? (i(), k($, {
345
+ g.value ? (i(), V($, {
346
346
  key: 1,
347
347
  modelValue: B.value,
348
348
  "onUpdate:modelValue": e[5] || (e[5] = (w) => B.value = w),
@@ -370,7 +370,7 @@ const Ge = /* @__PURE__ */ X({
370
370
  label: w.label,
371
371
  value: w.value
372
372
  }, null, 8, ["modelValue", "label", "value"]),
373
- M(w) ? (i(), k(J, {
373
+ M(w) ? (i(), V(J, {
374
374
  key: 0,
375
375
  content: t(r)("report.section.filter.missingFilterSchema"),
376
376
  "z-index": 99,
@@ -385,7 +385,7 @@ const Ge = /* @__PURE__ */ X({
385
385
  _: 1
386
386
  }, 8, ["content"])) : A("", !0)
387
387
  ]))), 128))
388
- ])) : (i(), k(W, {
388
+ ])) : (i(), V(W, {
389
389
  key: 3,
390
390
  class: "fm-typo-en-body-lg-400",
391
391
  label: t(r)("report.section.filter.noWidget")
@@ -424,21 +424,21 @@ const Ge = /* @__PURE__ */ X({
424
424
  }),
425
425
  emits: /* @__PURE__ */ K(["hideConfiguration"], ["update:modelValue"]),
426
426
  setup(x, { emit: r }) {
427
- const n = Q(x, "modelValue"), { breakpoints: a } = pe(), y = x, m = r, _ = Ne(), p = Me(), V = I(), {
427
+ const a = Q(x, "modelValue"), { breakpoints: n } = pe(), y = x, m = r, _ = Ne(), f = Me(), C = I(), {
428
428
  currentSelectWidgetType: s,
429
429
  categories: U,
430
430
  editingTile: q,
431
431
  editingTileIndex: S,
432
432
  editingGlobalFilter: B,
433
- editingGlobalFilterIndex: v
434
- } = me(Oe()), { schemas: N } = me(He()), { globalFilters: Y } = me(Le()), { promptMessage: R } = Ue(), P = I(!1), L = I(!1), { t: g, te: Z } = se(), le = I(void 0), te = D(() => {
435
- const l = n.value.tiles.flatMap((e) => {
433
+ editingGlobalFilterIndex: g
434
+ } = me(Oe()), { schemas: N } = me(He()), { globalFilters: Y } = me(Le()), { promptMessage: R } = Ue(), P = I(!1), L = I(!1), { t: v, te: Z } = se(), le = I(void 0), te = D(() => {
435
+ const l = a.value.tiles.flatMap((e) => {
436
436
  var b;
437
- const C = e.widget.config.schemaNames ?? [], d = ((b = e.widget.config.joinDatasources) == null ? void 0 : b.flatMap(($) => $.schemaNames ?? [])) ?? [];
438
- return [...C, ...d];
437
+ const k = e.widget.config.schemaNames ?? [], d = ((b = e.widget.config.joinDatasources) == null ? void 0 : b.flatMap(($) => $.schemaNames ?? [])) ?? [];
438
+ return [...k, ...d];
439
439
  });
440
- return [...new Set(l)].reduce((e, C) => {
441
- const d = N.value.find((b) => b.name === C);
440
+ return [...new Set(l)].reduce((e, k) => {
441
+ const d = N.value.find((b) => b.name === k);
442
442
  return d && e.push(d), e;
443
443
  }, []);
444
444
  });
@@ -447,12 +447,12 @@ const Ge = /* @__PURE__ */ X({
447
447
  () => {
448
448
  s.value !== void 0 && (le.value = Pe(s.value), q.value = le.value, S.value = -1, _.push({
449
449
  name: "tileEditor",
450
- query: p.query
450
+ query: f.query
451
451
  }));
452
452
  },
453
453
  { immediate: !0 }
454
454
  ), de(
455
- () => n.value.tiles,
455
+ () => a.value.tiles,
456
456
  (l) => {
457
457
  l.forEach((e) => {
458
458
  e.id || (e.id = re());
@@ -462,131 +462,137 @@ const Ge = /* @__PURE__ */ X({
462
462
  );
463
463
  const ae = [
464
464
  {
465
- label: g("report.common.edit"),
465
+ label: v("report.common.edit"),
466
466
  selected: !1,
467
467
  variant: "tertiary",
468
468
  onClick: (l) => {
469
- S.value = l, q.value = JSON.parse(JSON.stringify(n.value.tiles[l])), _.push({
469
+ S.value = l, q.value = JSON.parse(JSON.stringify(a.value.tiles[l])), _.push({
470
470
  name: "tileEditor",
471
- query: p.query
471
+ query: f.query
472
472
  });
473
473
  }
474
474
  },
475
475
  {
476
- label: g("report.common.duplicate"),
476
+ label: v("report.common.duplicate"),
477
477
  selected: !1,
478
478
  variant: "tertiary",
479
479
  onClick: (l) => {
480
480
  const e = {
481
- ...JSON.parse(JSON.stringify(n.value.tiles[l])),
481
+ ...JSON.parse(JSON.stringify(a.value.tiles[l])),
482
482
  id: re()
483
483
  };
484
- n.value.tiles.push(e);
484
+ a.value.tiles.push(e);
485
485
  }
486
486
  },
487
487
  {
488
- label: g("report.common.remove"),
488
+ label: v("report.common.remove"),
489
489
  selected: !1,
490
490
  variant: "destructive",
491
491
  onClick: async (l) => {
492
492
  if (await R({
493
- title: g("report.editor.deleteWidget"),
494
- message: g("report.editor.deleteWidgetConfirm", {
495
- title: n.value.tiles[l].widget.title
493
+ title: v("report.editor.deleteWidget"),
494
+ message: v("report.editor.deleteWidgetConfirm", {
495
+ title: a.value.tiles[l].widget.title
496
496
  })
497
497
  })) {
498
- const C = n.value.tiles[l].id;
499
- n.value.tiles.splice(l, 1), n.value.globalFilters && n.value.globalFilters.forEach((d) => {
498
+ const k = a.value.tiles[l].id;
499
+ a.value.tiles.splice(l, 1), a.value.globalFilters && a.value.globalFilters.forEach((d) => {
500
500
  var b;
501
- d.tileIds = (b = d.tileIds) == null ? void 0 : b.filter(($) => $ !== C);
501
+ d.tileIds = (b = d.tileIds) == null ? void 0 : b.filter(($) => $ !== k);
502
502
  });
503
503
  }
504
504
  }
505
505
  }
506
506
  ], F = [
507
507
  {
508
- label: g("report.common.edit"),
508
+ label: v("report.common.edit"),
509
509
  selected: !1,
510
510
  variant: "tertiary",
511
511
  onClick: (l) => {
512
512
  var e;
513
- v.value = l, B.value = JSON.parse(JSON.stringify((e = n.value.globalFilters) == null ? void 0 : e[l])), P.value = !0;
513
+ g.value = l, B.value = JSON.parse(JSON.stringify((e = a.value.globalFilters) == null ? void 0 : e[l])), P.value = !0;
514
514
  }
515
515
  },
516
516
  {
517
- label: g("report.common.remove"),
517
+ label: v("report.common.remove"),
518
518
  selected: !1,
519
519
  variant: "destructive",
520
520
  onClick: async (l) => {
521
521
  var d, b;
522
- const e = (d = n.value.globalFilters) == null ? void 0 : d[l];
522
+ const e = (d = a.value.globalFilters) == null ? void 0 : d[l];
523
523
  if (!e) return;
524
524
  await R({
525
- title: g("report.editor.deleteWidget"),
526
- message: g("report.editor.deleteWidgetConfirm", {
525
+ title: v("report.editor.deleteWidget"),
526
+ message: v("report.editor.deleteWidgetConfirm", {
527
527
  title: be(e)
528
528
  })
529
- }) && ((b = n.value.globalFilters) == null || b.splice(l, 1));
529
+ }) && ((b = a.value.globalFilters) == null || b.splice(l, 1));
530
530
  }
531
531
  }
532
532
  ], M = D(() => U.value.map((l) => ({
533
- label: g(`report.category.${l.name}`),
533
+ label: v(`report.category.${l.name}`),
534
534
  value: l.id
535
535
  })));
536
536
  return de(
537
- () => n.value.globalFilters,
537
+ () => a.value.globalFilters,
538
538
  (l) => {
539
539
  Y.value = JSON.parse(JSON.stringify(l || []));
540
540
  },
541
541
  { deep: !0, immediate: !0 }
542
542
  ), (l, e) => {
543
- const C = c("FmTextField"), d = c("FmSelect"), b = c("FmButton"), $ = c("FmIcon"), W = c("FmTooltip"), E = c("FmMenuItem"), J = c("FmMenu"), O = c("FmListItem"), ne = c("FmList"), ve = c("FmForm");
544
- return i(), k(Ie(t(a).lg || t(a).md ? Ke : Qe), {
543
+ const k = p("FmTextField"), d = p("FmSelect"), b = p("FmButton"), $ = p("FmIcon"), W = p("FmTooltip"), E = p("FmMenuItem"), J = p("FmMenu"), O = p("FmListItem"), ne = p("FmList"), ve = p("FmForm");
544
+ return i(), V(Ie(t(n).lg || t(n).md ? Ke : Qe), {
545
545
  "model-value": y.hideConfiguration,
546
- "onUpdate:modelValue": e[8] || (e[8] = (f) => m("hideConfiguration", f))
546
+ "onUpdate:modelValue": e[9] || (e[9] = (c) => m("hideConfiguration", c))
547
547
  }, {
548
548
  default: u(() => [
549
549
  o(Ye, {
550
550
  "is-open": P.value,
551
- "onUpdate:isOpen": e[0] || (e[0] = (f) => P.value = f),
551
+ "onUpdate:isOpen": e[0] || (e[0] = (c) => P.value = c),
552
552
  "global-filter": t(B),
553
- tiles: n.value.tiles,
553
+ tiles: a.value.tiles,
554
554
  schemas: te.value,
555
- "onUpdate:globalFilter": e[1] || (e[1] = (f) => {
556
- f && (n.value.globalFilters || (n.value.globalFilters = []), typeof t(v) == "number" && t(v) >= 0 ? n.value.globalFilters[t(v)] = f : n.value.globalFilters.push(f));
555
+ "onUpdate:globalFilter": e[1] || (e[1] = (c) => {
556
+ c && (a.value.globalFilters || (a.value.globalFilters = []), typeof t(g) == "number" && t(g) >= 0 ? a.value.globalFilters[t(g)] = c : a.value.globalFilters.push(c));
557
557
  })
558
558
  }, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
559
559
  o(Ge, {
560
560
  modelValue: t(s),
561
- "onUpdate:modelValue": e[2] || (e[2] = (f) => Te(s) ? s.value = f : null),
561
+ "onUpdate:modelValue": e[2] || (e[2] = (c) => Te(s) ? s.value = c : null),
562
562
  "is-open": L.value,
563
- "onUpdate:isOpen": e[3] || (e[3] = (f) => L.value = f)
563
+ "onUpdate:isOpen": e[3] || (e[3] = (c) => L.value = c)
564
564
  }, null, 8, ["modelValue", "is-open"]),
565
565
  o(ve, {
566
566
  ref_key: "form",
567
- ref: V,
567
+ ref: C,
568
568
  class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
569
569
  }, {
570
570
  default: u(() => [
571
571
  o(xe, { class: "border-solid" }, {
572
572
  header: u(() => [
573
- h("p", null, H(t(g)("report.editor.reportInfo")), 1),
574
- e[9] || (e[9] = h("div", { class: "grow" }, null, -1))
573
+ h("p", null, H(t(v)("report.editor.reportInfo")), 1),
574
+ e[10] || (e[10] = h("div", { class: "grow" }, null, -1))
575
575
  ]),
576
576
  content: u(() => [
577
577
  h("div", Ze, [
578
- o(C, {
579
- modelValue: n.value.name,
580
- "onUpdate:modelValue": e[4] || (e[4] = (f) => n.value.name = f),
581
- label: t(g)("report.editor.reportTitle"),
582
- placeholder: t(g)("report.editor.placeholder")
578
+ o(k, {
579
+ modelValue: a.value.name,
580
+ "onUpdate:modelValue": e[4] || (e[4] = (c) => a.value.name = c),
581
+ label: t(v)("report.common.name"),
582
+ placeholder: t(v)("report.common.name")
583
583
  }, null, 8, ["modelValue", "label", "placeholder"]),
584
584
  o(d, {
585
- modelValue: n.value.category,
586
- "onUpdate:modelValue": e[5] || (e[5] = (f) => n.value.category = f),
587
- label: t(g)("report.common.category"),
585
+ modelValue: a.value.category,
586
+ "onUpdate:modelValue": e[5] || (e[5] = (c) => a.value.category = c),
587
+ label: t(v)("report.common.category"),
588
588
  items: M.value
589
- }, null, 8, ["modelValue", "label", "items"])
589
+ }, null, 8, ["modelValue", "label", "items"]),
590
+ o(k, {
591
+ modelValue: a.value.description,
592
+ "onUpdate:modelValue": e[6] || (e[6] = (c) => a.value.description = c),
593
+ label: t(v)("report.common.description"),
594
+ placeholder: t(v)("report.common.description")
595
+ }, null, 8, ["modelValue", "label", "placeholder"])
590
596
  ])
591
597
  ]),
592
598
  _: 1
@@ -596,31 +602,31 @@ const Ge = /* @__PURE__ */ X({
596
602
  "is-open": !1
597
603
  }, {
598
604
  header: u(() => [
599
- h("p", null, H(t(g)("report.section.filter.globalFilter")), 1),
600
- e[10] || (e[10] = h("div", { class: "grow" }, null, -1))
605
+ h("p", null, H(t(v)("report.section.filter.globalFilter")), 1),
606
+ e[11] || (e[11] = h("div", { class: "grow" }, null, -1))
601
607
  ]),
602
608
  content: u(() => [
603
609
  h("div", el, [
604
610
  o(b, {
605
- label: t(g)("report.section.filter.addGlobalFilter"),
611
+ label: t(v)("report.section.filter.addGlobalFilter"),
606
612
  variant: "secondary",
607
613
  icon: "add",
608
614
  "icon-position": "prepend",
609
615
  "border-color": t(oe).ColorPrimary,
610
616
  "text-color": t(oe).ColorPrimary,
611
- onClick: e[6] || (e[6] = () => {
612
- v.value = null, B.value = null, P.value = !0;
617
+ onClick: e[7] || (e[7] = () => {
618
+ g.value = null, B.value = null, P.value = !0;
613
619
  })
614
620
  }, null, 8, ["label", "border-color", "text-color"]),
615
621
  o(ne, null, {
616
622
  default: u(() => [
617
623
  o(t(ke), {
618
- list: n.value.globalFilters,
624
+ list: a.value.globalFilters,
619
625
  "item-key": "`${element.schemaName}-${element.name}`",
620
626
  class: "flex flex-col gap-2 cursor-grab",
621
627
  handle: ".handle"
622
628
  }, {
623
- item: u(({ element: f, index: w }) => [
629
+ item: u(({ element: c, index: w }) => [
624
630
  o(O, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
625
631
  default: u(() => [
626
632
  o($, {
@@ -630,19 +636,19 @@ const Ge = /* @__PURE__ */ X({
630
636
  h("div", ll, [
631
637
  o(W, {
632
638
  "z-index": 99,
633
- content: t(be)(f),
639
+ content: t(be)(c),
634
640
  class: "handle"
635
641
  }, {
636
642
  default: u(() => [
637
- h("p", tl, H(t(be)(f)), 1)
643
+ h("p", tl, H(t(be)(c)), 1)
638
644
  ]),
639
645
  _: 2
640
646
  }, 1032, ["content"]),
641
647
  te.value.find(
642
- (z) => z.name === f.schemaName
643
- ) ? A("", !0) : (i(), k(W, {
648
+ (z) => z.name === c.schemaName
649
+ ) ? A("", !0) : (i(), V(W, {
644
650
  key: 0,
645
- content: t(g)("report.section.filter.missingSchema"),
651
+ content: t(v)("report.section.filter.missingSchema"),
646
652
  "z-index": 99
647
653
  }, {
648
654
  default: u(() => [
@@ -654,7 +660,7 @@ const Ge = /* @__PURE__ */ X({
654
660
  _: 1
655
661
  }, 8, ["content"]))
656
662
  ]),
657
- e[11] || (e[11] = h("div", { class: "grow" }, null, -1)),
663
+ e[12] || (e[12] = h("div", { class: "grow" }, null, -1)),
658
664
  o(J, {
659
665
  trigger: "click",
660
666
  shift: !0,
@@ -698,23 +704,23 @@ const Ge = /* @__PURE__ */ X({
698
704
  }),
699
705
  h("div", ol, [
700
706
  o(b, {
701
- label: t(g)("report.editor.addWidget"),
707
+ label: t(v)("report.editor.addWidget"),
702
708
  variant: "secondary",
703
709
  icon: "add",
704
710
  "icon-position": "prepend",
705
711
  "border-color": t(oe).ColorPrimary,
706
712
  "text-color": t(oe).ColorPrimary,
707
- onClick: e[7] || (e[7] = (f) => L.value = !0)
713
+ onClick: e[8] || (e[8] = (c) => L.value = !0)
708
714
  }, null, 8, ["label", "border-color", "text-color"]),
709
715
  o(ne, null, {
710
716
  default: u(() => [
711
717
  o(t(ke), {
712
- list: n.value.tiles,
718
+ list: a.value.tiles,
713
719
  "item-key": "id",
714
720
  class: "flex flex-col gap-2 cursor-grab",
715
721
  handle: ".handle"
716
722
  }, {
717
- item: u(({ element: f, index: w }) => [
723
+ item: u(({ element: c, index: w }) => [
718
724
  o(O, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
719
725
  default: u(() => [
720
726
  o($, {
@@ -722,15 +728,15 @@ const Ge = /* @__PURE__ */ X({
722
728
  class: "handle"
723
729
  }),
724
730
  o(W, {
725
- content: f.widget.title ? t(ce)(t(g), t(Z), f.widget.title, "other") : t(g)("report.editor.widget", { index: w + 1 }),
731
+ content: c.widget.title ? t(ce)(t(v), t(Z), c.widget.title, "other") : t(v)("report.editor.widget", { index: w + 1 }),
726
732
  class: "handle"
727
733
  }, {
728
734
  default: u(() => [
729
- h("p", al, H(f.widget.title ? t(ce)(t(g), t(Z), f.widget.title, "other") : t(g)("report.editor.widget", { index: w + 1 })), 1)
735
+ h("p", al, H(c.widget.title ? t(ce)(t(v), t(Z), c.widget.title, "other") : t(v)("report.editor.widget", { index: w + 1 })), 1)
730
736
  ]),
731
737
  _: 2
732
738
  }, 1032, ["content"]),
733
- e[12] || (e[12] = h("div", { class: "grow" }, null, -1)),
739
+ e[13] || (e[13] = h("div", { class: "grow" }, null, -1)),
734
740
  o(J, {
735
741
  trigger: "click",
736
742
  shift: !0,
@@ -807,23 +813,23 @@ const Ge = /* @__PURE__ */ X({
807
813
  }),
808
814
  emits: /* @__PURE__ */ K(["hideConfiguration"], ["update:modelValue"]),
809
815
  setup(x, { emit: r }) {
810
- const { breakpoints: n } = pe(), a = Q(x, "modelValue"), y = x, m = D(() => y.previewWidth > 0 && y.previewHeight > 0), _ = D(() => n.value.sm || n.value.xs), p = r;
811
- return (V, s) => {
812
- const U = c("FmCircularProgress"), q = c("FmButton"), S = c("FmMenuDivider"), B = c("FmCard");
816
+ const { breakpoints: a } = pe(), n = Q(x, "modelValue"), y = x, m = D(() => y.previewWidth > 0 && y.previewHeight > 0), _ = D(() => a.value.sm || a.value.xs), f = r;
817
+ return (C, s) => {
818
+ const U = p("FmCircularProgress"), q = p("FmButton"), S = p("FmMenuDivider"), B = p("FmCard");
813
819
  return i(), T("div", nl, [
814
- a.value ? (i(), T(G, { key: 1 }, [
815
- m.value ? A("", !0) : (i(), k(Je, {
820
+ n.value ? (i(), T(G, { key: 1 }, [
821
+ m.value ? A("", !0) : (i(), V(Je, {
816
822
  key: 0,
817
823
  "model-value": !y.hideConfiguration
818
824
  }, {
819
825
  right: u(() => [
820
826
  h("div", rl, [
821
- a.value ? (i(), k(Se, {
827
+ n.value ? (i(), V(Se, {
822
828
  key: 0,
823
- modelValue: a.value,
824
- "onUpdate:modelValue": s[0] || (s[0] = (v) => a.value = v),
829
+ modelValue: n.value,
830
+ "onUpdate:modelValue": s[0] || (s[0] = (g) => n.value = g),
825
831
  "hide-configuration": y.hideConfiguration,
826
- onHideConfiguration: s[1] || (s[1] = (v) => p("hideConfiguration", v))
832
+ onHideConfiguration: s[1] || (s[1] = (g) => f("hideConfiguration", g))
827
833
  }, null, 8, ["modelValue", "hide-configuration"])) : A("", !0)
828
834
  ])
829
835
  ]),
@@ -836,7 +842,7 @@ const Ge = /* @__PURE__ */ X({
836
842
  "text-color": t(oe).ColorPrimary,
837
843
  class: "m-24 my-16",
838
844
  size: "md",
839
- onClick: s[2] || (s[2] = (v) => p("hideConfiguration", !y.hideConfiguration))
845
+ onClick: s[2] || (s[2] = (g) => f("hideConfiguration", !y.hideConfiguration))
840
846
  }, null, 8, ["border-color", "text-color"])
841
847
  ])
842
848
  ]),
@@ -847,41 +853,41 @@ const Ge = /* @__PURE__ */ X({
847
853
  style: { margin: "0px" }
848
854
  }),
849
855
  !_.value && !m.value ? (i(), T("div", sl, [
850
- a.value.tiles.length > 0 ? (i(), T("div", ul, [
856
+ n.value.tiles.length > 0 ? (i(), T("div", ul, [
851
857
  h("div", dl, [
852
- o(Ce)
858
+ o(Ve)
853
859
  ]),
854
- (i(!0), T(G, null, ee(a.value.tiles, (v, N) => (i(), k(he, {
860
+ (i(!0), T(G, null, ee(n.value.tiles, (g, N) => (i(), V(he, {
855
861
  key: `${t(re)()}_${N}`,
856
- "model-value": v,
862
+ "model-value": g,
857
863
  index: N,
858
864
  "hide-export": !0
859
865
  }, null, 8, ["model-value", "index"]))), 128))
860
- ])) : (i(), k(ye, { key: 1 }))
866
+ ])) : (i(), V(ye, { key: 1 }))
861
867
  ])) : _.value && !m.value ? (i(), T("div", ml, [
862
868
  o(B, { class: "px-5 pb-28" }, {
863
869
  default: u(() => [
864
- a.value.tiles.length > 0 ? (i(), T("div", cl, [
870
+ n.value.tiles.length > 0 ? (i(), T("div", cl, [
865
871
  h("div", pl, [
866
- o(Ce)
872
+ o(Ve)
867
873
  ]),
868
- (i(!0), T(G, null, ee(a.value.tiles, (v, N) => (i(), k(he, {
874
+ (i(!0), T(G, null, ee(n.value.tiles, (g, N) => (i(), V(he, {
869
875
  key: `${t(re)()}_${N}`,
870
- "model-value": v,
876
+ "model-value": g,
871
877
  index: N,
872
878
  "hide-export": !0
873
879
  }, null, 8, ["model-value", "index"]))), 128))
874
- ])) : (i(), k(ye, { key: 1 }))
880
+ ])) : (i(), V(ye, { key: 1 }))
875
881
  ]),
876
882
  _: 1
877
883
  }),
878
- a.value ? (i(), k(Se, {
884
+ n.value ? (i(), V(Se, {
879
885
  key: 0,
880
- modelValue: a.value,
881
- "onUpdate:modelValue": s[3] || (s[3] = (v) => a.value = v),
886
+ modelValue: n.value,
887
+ "onUpdate:modelValue": s[3] || (s[3] = (g) => n.value = g),
882
888
  "hide-configuration": y.hideConfiguration,
883
- onHideConfiguration: s[4] || (s[4] = (v) => {
884
- p("hideConfiguration", v);
889
+ onHideConfiguration: s[4] || (s[4] = (g) => {
890
+ f("hideConfiguration", g);
885
891
  })
886
892
  }, null, 8, ["modelValue", "hide-configuration"])) : A("", !0)
887
893
  ])) : (i(), T("div", vl, [
@@ -898,34 +904,34 @@ const Ge = /* @__PURE__ */ X({
898
904
  height: y.previewHeight + "px"
899
905
  })
900
906
  }, [
901
- a.value.tiles.length > 0 ? (i(), T("div", fl, [
902
- (i(!0), T(G, null, ee(a.value.tiles, (v, N) => (i(), k(he, {
907
+ n.value.tiles.length > 0 ? (i(), T("div", fl, [
908
+ (i(!0), T(G, null, ee(n.value.tiles, (g, N) => (i(), V(he, {
903
909
  key: `${t(re)()}_${N}`,
904
- "model-value": v,
910
+ "model-value": g,
905
911
  index: N,
906
912
  "hide-export": !0,
907
913
  "custom-screen-width": y.previewWidth
908
914
  }, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
909
- ])) : (i(), k(ye, { key: 1 }))
915
+ ])) : (i(), V(ye, { key: 1 }))
910
916
  ], 4)
911
917
  ], 4)
912
918
  ]))
913
- ], 64)) : (i(), k(U, { key: 0 }))
919
+ ], 64)) : (i(), V(U, { key: 0 }))
914
920
  ]);
915
921
  };
916
922
  }
917
923
  }), bl = { class: "flex items-center gap-4" }, hl = { class: "flex justify-center items-center gap-2 w-full" }, yl = { class: "flex gap-4" }, Ml = /* @__PURE__ */ X({
918
924
  __name: "ReportEditor",
919
925
  setup(x) {
920
- const r = Ne(), n = Me(), a = Oe(), { promptLoader: y } = je(), { t: m } = se(), { currentReport: _, editingReport: p } = me(a), { breakpoints: V } = pe(), s = D(() => {
926
+ const r = Ne(), a = Me(), n = Oe(), { promptLoader: y } = je(), { t: m } = se(), { currentReport: _, editingReport: f } = me(n), { breakpoints: C } = pe(), s = D(() => {
921
927
  var F;
922
- return !((F = p.value) != null && F.editable);
928
+ return !((F = f.value) != null && F.editable);
923
929
  }), U = D(() => {
924
930
  var F;
925
- return ((F = p.value) == null ? void 0 : F.name) ?? m("report.editor.newReport");
931
+ return ((F = f.value) == null ? void 0 : F.name) ?? m("report.editor.newReport");
926
932
  }), q = De(), { promptMessage: S } = Ue(), B = I(!1);
927
- async function v() {
928
- if (!p.value || p.value.tiles.length === 0) {
933
+ async function g() {
934
+ if (!f.value || f.value.tiles.length === 0) {
929
935
  q.open({ message: m("report.messages.noWidget"), type: "error" });
930
936
  return;
931
937
  }
@@ -937,13 +943,13 @@ const Ge = /* @__PURE__ */ X({
937
943
  try {
938
944
  await y(async () => {
939
945
  if (s.value) {
940
- const l = JSON.parse(JSON.stringify(p.value));
941
- l.editable = !0, l.id = "", l.name = `${l.name} ${m("report.common.duplicate")}`, await a.createOrUpdateReport(l);
946
+ const l = JSON.parse(JSON.stringify(f.value));
947
+ l.editable = !0, l.id = "", l.name = `${l.name} ${m("report.common.duplicate")}`, await n.createOrUpdateReport(l);
942
948
  } else
943
- p.value && await a.createOrUpdateReport(p.value);
949
+ f.value && await n.createOrUpdateReport(f.value);
944
950
  r.push({
945
951
  name: "reportView",
946
- query: n.query
952
+ query: a.query
947
953
  });
948
954
  });
949
955
  } catch (l) {
@@ -955,14 +961,14 @@ const Ge = /* @__PURE__ */ X({
955
961
  }
956
962
  async function N() {
957
963
  var M;
958
- if (!p.value) return;
964
+ if (!f.value) return;
959
965
  await S({
960
966
  title: m("report.common.report", 1),
961
- message: m("report.editor.notSaved", { name: (M = p.value) == null ? void 0 : M.name })
962
- }) && (p.value = JSON.parse(JSON.stringify(_.value)), r.back());
967
+ message: m("report.editor.notSaved", { name: (M = f.value) == null ? void 0 : M.name })
968
+ }) && (f.value = JSON.parse(JSON.stringify(_.value)), r.back());
963
969
  }
964
970
  Re(() => {
965
- p.value || r.push({ name: "reports" });
971
+ f.value || r.push({ name: "reports" });
966
972
  });
967
973
  const Y = [
968
974
  {
@@ -985,10 +991,10 @@ const Ge = /* @__PURE__ */ X({
985
991
  width: 390,
986
992
  height: 859
987
993
  }
988
- ], R = I(Y[0]), P = I(!1), L = D(() => P.value ? Math.max(R.value.width || 0, R.value.height || 0) : Math.min(R.value.width || 0, R.value.height || 0)), g = D(() => P.value ? Math.min(R.value.width || 0, R.value.height || 0) : Math.max(R.value.width || 0, R.value.height || 0)), Z = D(() => window.innerHeight - 72 - 56), le = D(() => {
994
+ ], R = I(Y[0]), P = I(!1), L = D(() => P.value ? Math.max(R.value.width || 0, R.value.height || 0) : Math.min(R.value.width || 0, R.value.height || 0)), v = D(() => P.value ? Math.min(R.value.width || 0, R.value.height || 0) : Math.max(R.value.width || 0, R.value.height || 0)), Z = D(() => window.innerHeight - 72 - 56), le = D(() => {
989
995
  if (!L.value) return 1;
990
- let F = (Z.value - 48) / L.value, M = g.value * F;
991
- return M > window.innerWidth && (F = window.innerWidth / g.value, M = g.value * F), F > 1 ? 1 : F;
996
+ let F = (Z.value - 48) / L.value, M = v.value * F;
997
+ return M > window.innerWidth && (F = window.innerWidth / v.value, M = v.value * F), F > 1 ? 1 : F;
992
998
  });
993
999
  function te(F) {
994
1000
  R.value = F;
@@ -997,16 +1003,16 @@ const Ge = /* @__PURE__ */ X({
997
1003
  P.value = !P.value;
998
1004
  }
999
1005
  return (F, M) => {
1000
- const l = c("FmTooltip"), e = c("FmButton"), C = c("FmPageHead");
1001
- return i(), k(ze, null, {
1006
+ const l = p("FmTooltip"), e = p("FmButton"), k = p("FmPageHead");
1007
+ return i(), V(ze, null, {
1002
1008
  default: u(() => [
1003
- o(C, {
1009
+ o(k, {
1004
1010
  actions: [
1005
1011
  { label: t(m)("report.common.cancel"), value: "cancel", isPrimary: !1 },
1006
1012
  { label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
1007
1013
  ],
1008
1014
  "onClick:action": M[0] || (M[0] = (d) => {
1009
- d === "cancel" && N(), d === "save" && v();
1015
+ d === "cancel" && N(), d === "save" && g();
1010
1016
  })
1011
1017
  }, {
1012
1018
  title: u(() => [
@@ -1017,7 +1023,7 @@ const Ge = /* @__PURE__ */ X({
1017
1023
  }, {
1018
1024
  default: u(() => [
1019
1025
  h("p", {
1020
- class: ie(`${t(V).sm || t(V).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
1026
+ class: ie(`${t(C).sm || t(C).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
1021
1027
  }, H(U.value), 3)
1022
1028
  ]),
1023
1029
  _: 1
@@ -1047,14 +1053,14 @@ const Ge = /* @__PURE__ */ X({
1047
1053
  ]),
1048
1054
  _: 1
1049
1055
  }, 8, ["actions"]),
1050
- t(p) ? (i(), k(gl, {
1056
+ t(f) ? (i(), V(gl, {
1051
1057
  key: 0,
1052
- modelValue: t(p),
1053
- "onUpdate:modelValue": M[1] || (M[1] = (d) => Te(p) ? p.value = d : null),
1058
+ modelValue: t(f),
1059
+ "onUpdate:modelValue": M[1] || (M[1] = (d) => Te(f) ? f.value = d : null),
1054
1060
  style: we({ height: Z.value + "px" }),
1055
- class: ie(t(V).lg || t(V).md ? "flex" : ""),
1061
+ class: ie(t(C).lg || t(C).md ? "flex" : ""),
1056
1062
  "hide-configuration": B.value,
1057
- "preview-width": g.value,
1063
+ "preview-width": v.value,
1058
1064
  "preview-height": L.value,
1059
1065
  "preview-scale": le.value,
1060
1066
  onHideConfiguration: M[2] || (M[2] = (d) => B.value = d)