@feedmepos/mf-report 5.5.10 → 5.5.11-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 (30) hide show
  1. package/dist/{App-CI59NhMr.js → App-BCCZItsv.js} +42 -42
  2. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-C3Dsnzzo.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CN3UKRaQ.js} +2 -2
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-HE3jlz2q.js → Default.vue_vue_type_script_setup_true_lang-D7TqpbQ9.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js +1082 -0
  5. package/dist/{InsightView-CArL6hDD.js → InsightView-bZx6j8q5.js} +6 -6
  6. package/dist/{Integration-CYsx29Kj.js → Integration-CoavOChV.js} +3 -3
  7. package/dist/{Integrations-RluH7jrn.js → Integrations-B6ACZi86.js} +3 -3
  8. package/dist/{Layout-BhKNg55v.js → Layout-CVsorGV9.js} +1 -1
  9. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B_N9ULY9.js → MenuTab.vue_vue_type_script_setup_true_lang-AopNmaX1.js} +3 -3
  10. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DULwCyXt.js → NavigationTab.vue_vue_type_script_setup_true_lang-4LIEfrJG.js} +5 -5
  11. package/dist/{NoData.vue_vue_type_script_setup_true_lang-CCA1l-Cz.js → NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js} +1 -1
  12. package/dist/{OverviewView-CQGrtNQb.js → OverviewView-D7wq9voi.js} +5 -5
  13. package/dist/{Report-Cl-cAzXC.js → Report-St-N-XGu.js} +90 -89
  14. package/dist/{ReportEditor-CWjNbjr_.js → ReportEditor-BhaqAf-H.js} +176 -175
  15. package/dist/ReportView-BqHk2OOl.js +190 -0
  16. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-CXYvLXnR.js → SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js} +1 -1
  17. package/dist/{Setting-DC_StvBp.js → Setting-CF6M_Gb2.js} +4 -4
  18. package/dist/TileEditor-Dh1OSYsO.js +2538 -0
  19. package/dist/{TransitionFade-DdNpeVds.js → TransitionFade-z9aoIr9s.js} +5 -5
  20. package/dist/app.js +1616 -71
  21. package/dist/{global-loader-KvOGLx9k.js → global-loader-BqFQzk46.js} +1 -1
  22. package/dist/i18n-Cif1I9J2.js +11 -0
  23. package/dist/{index-CW2xYO89.js → index-DqqTHE7n.js} +1 -1
  24. package/dist/{report-schema-Zw8e6-XZ.js → report-schema-OJAFh4P6.js} +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/{v4-CHk_oNmT.js → v4-HCTsB306.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DxpesBb1.js +0 -1074
  29. package/dist/ReportView-ChiQMhSH.js +0 -180
  30. package/dist/TileEditor-DNuK7pwX.js +0 -2514
@@ -1,14 +1,15 @@
1
- import { defineComponent as S, mergeModels as $, useModel as M, ref as N, computed as P, resolveComponent as c, createBlock as b, openBlock as s, withCtx as m, createElementVNode as C, createVNode as a, unref as o, normalizeClass as E, createTextVNode as fe, toDisplayString as O, createElementBlock as x, Fragment as q, renderSlot as j, createCommentVNode as U, watch as ve, resolveDynamicComponent as K, isRef as Q, renderList as H, onMounted as ge, normalizeStyle as _e } from "vue";
2
- import { W as ye, i as Ce, S as be, d as Ve, T as ke, _ as Fe } from "./TransitionFade-DdNpeVds.js";
3
- import { a as X, v as Y } from "./v4-CHk_oNmT.js";
4
- import { storeToRefs as Z } from "pinia";
5
- import { useRouter as ee, useRoute as oe } from "vue-router";
6
- import { useBreakpoints as A, FmButtonColorThemeVariant as W, useSnackbar as xe } from "@feedmepos/ui-library";
7
- import { u as te } from "./message-dialog-UoMWOnil.js";
8
- import { _ as le } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DxpesBb1.js";
9
- import { _ as re } from "./NoData.vue_vue_type_script_setup_true_lang-CCA1l-Cz.js";
10
- import { u as I, f as he } from "./global-loader-KvOGLx9k.js";
11
- const we = /* @__PURE__ */ S({
1
+ import { defineComponent as S, mergeModels as $, useModel as M, ref as N, computed as P, resolveComponent as c, createBlock as C, openBlock as s, withCtx as m, createElementVNode as y, createVNode as a, unref as e, normalizeClass as E, createTextVNode as ge, toDisplayString as O, createElementBlock as h, Fragment as q, renderSlot as Q, createCommentVNode as U, watch as _e, resolveDynamicComponent as X, isRef as Y, renderList as H, onMounted as ye, normalizeStyle as Ce } from "vue";
2
+ import { W as be, i as Ve, S as ke, d as Fe, T as xe, _ as he } from "./TransitionFade-z9aoIr9s.js";
3
+ import { a as Z, v as ee } from "./v4-HCTsB306.js";
4
+ import { storeToRefs as oe } from "pinia";
5
+ import { useRouter as te, useRoute as le } from "vue-router";
6
+ import { useBreakpoints as A, FmButtonColorThemeVariant as I, useSnackbar as we } from "@feedmepos/ui-library";
7
+ import { u as re } from "./message-dialog-UoMWOnil.js";
8
+ import { _ as ne } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js";
9
+ import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
10
+ import { u as L, f as $e } from "./global-loader-BqFQzk46.js";
11
+ import { r as K } from "./i18n-Cif1I9J2.js";
12
+ const Se = /* @__PURE__ */ S({
12
13
  __name: "WidgetDialog",
13
14
  props: /* @__PURE__ */ $({
14
15
  isOpen: { type: Boolean }
@@ -18,40 +19,40 @@ const we = /* @__PURE__ */ S({
18
19
  }),
19
20
  emits: /* @__PURE__ */ $(["isOpen"], ["update:modelValue"]),
20
21
  setup(p, { emit: u }) {
21
- const { t: e } = I(), { breakpoints: l } = A(), g = M(p, "modelValue"), i = p, r = u;
22
+ const { t: o } = L(), { breakpoints: l } = A(), g = M(p, "modelValue"), i = p, r = u;
22
23
  function n() {
23
24
  r("isOpen", !1);
24
25
  }
25
26
  function v() {
26
27
  t.value && (g.value = t.value, t.value = void 0, r("isOpen", !1));
27
28
  }
28
- const t = N(), V = P(() => !t.value);
29
- return (B, h) => {
29
+ const t = N(), k = P(() => !t.value);
30
+ return (B, w) => {
30
31
  const R = c("FmButton"), T = c("FmDialog");
31
- return s(), b(T, {
32
+ return s(), C(T, {
32
33
  "model-value": i.isOpen
33
34
  }, {
34
35
  "dialog-header": m(() => [
35
- fe(O(o(e)("report.widget.type")), 1)
36
+ ge(O(e(o)("report.widget.type")), 1)
36
37
  ]),
37
38
  default: m(() => [
38
- a(ye, {
39
+ a(be, {
39
40
  modelValue: t.value,
40
- "onUpdate:modelValue": h[0] || (h[0] = (_) => t.value = _),
41
- class: E(`grid ${o(l).lg || o(l).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
41
+ "onUpdate:modelValue": w[0] || (w[0] = (f) => t.value = f),
42
+ class: E(`grid ${e(l).lg || e(l).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
42
43
  "child-class": "p-[8px] flex flex-col"
43
44
  }, null, 8, ["modelValue", "class"])
44
45
  ]),
45
46
  "dialog-footer": m(() => [
46
- h[1] || (h[1] = C("div", { class: "grow" }, null, -1)),
47
+ w[1] || (w[1] = y("div", { class: "grow" }, null, -1)),
47
48
  a(R, {
48
- label: o(e)("report.common.cancel"),
49
+ label: e(o)("report.common.cancel"),
49
50
  variant: "tertiary",
50
51
  onClick: n
51
52
  }, null, 8, ["label"]),
52
53
  a(R, {
53
- label: o(e)("report.common.confirm"),
54
- disabled: V.value,
54
+ label: e(o)("report.common.confirm"),
55
+ disabled: k.value,
55
56
  onClick: v
56
57
  }, null, 8, ["label", "disabled"])
57
58
  ]),
@@ -59,7 +60,7 @@ const we = /* @__PURE__ */ S({
59
60
  }, 8, ["model-value"]);
60
61
  };
61
62
  }
62
- }), $e = { class: "fm-typo-en-body-lg-600" }, z = /* @__PURE__ */ S({
63
+ }), Re = { class: "fm-typo-en-body-lg-600" }, z = /* @__PURE__ */ S({
63
64
  __name: "ReportEditorTabHeader",
64
65
  props: /* @__PURE__ */ $({
65
66
  icon: {
@@ -72,22 +73,22 @@ const we = /* @__PURE__ */ S({
72
73
  }),
73
74
  emits: ["update:modelValue"],
74
75
  setup(p) {
75
- const { t: u } = I(), e = M(p, "modelValue"), l = p;
76
+ const { t: u } = L(), o = M(p, "modelValue"), l = p;
76
77
  return (g, i) => {
77
78
  const r = c("FmIcon");
78
- return s(), x("div", {
79
+ return s(), h("div", {
79
80
  class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
80
- onClick: i[0] || (i[0] = (n) => e.value = !e.value)
81
+ onClick: i[0] || (i[0] = (n) => o.value = !o.value)
81
82
  }, [
82
- C("p", $e, O(o(u)("report.editor.customizeReport")), 1),
83
- i[1] || (i[1] = C("div", { class: "grow" }, null, -1)),
83
+ y("p", Re, O(e(u)("report.editor.customizeReport")), 1),
84
+ i[1] || (i[1] = y("div", { class: "grow" }, null, -1)),
84
85
  a(r, {
85
86
  name: l.icon
86
87
  }, null, 8, ["name"])
87
88
  ]);
88
89
  };
89
90
  }
90
- }), Se = /* @__PURE__ */ S({
91
+ }), Te = /* @__PURE__ */ S({
91
92
  __name: "ReportEditorTabDesktop",
92
93
  props: {
93
94
  modelValue: { required: !0, default: !1 },
@@ -96,16 +97,16 @@ const we = /* @__PURE__ */ S({
96
97
  emits: ["update:modelValue"],
97
98
  setup(p) {
98
99
  const u = M(p, "modelValue");
99
- return (e, l) => (s(), x(q, null, [
100
+ return (o, l) => (s(), h(q, null, [
100
101
  a(z, {
101
102
  modelValue: u.value,
102
103
  "onUpdate:modelValue": l[0] || (l[0] = (g) => u.value = g),
103
104
  icon: "keyboard_double_arrow_left"
104
105
  }, null, 8, ["modelValue"]),
105
- j(e.$slots, "default")
106
+ Q(o.$slots, "default")
106
107
  ], 64));
107
108
  }
108
- }), Re = /* @__PURE__ */ S({
109
+ }), Me = /* @__PURE__ */ S({
109
110
  __name: "ReportEditorTabMobile",
110
111
  props: {
111
112
  modelValue: { required: !0, default: !1 },
@@ -114,9 +115,9 @@ const we = /* @__PURE__ */ S({
114
115
  emits: ["update:modelValue"],
115
116
  setup(p) {
116
117
  const u = M(p, "modelValue");
117
- return (e, l) => {
118
+ return (o, l) => {
118
119
  const g = c("FmTopSheet"), i = c("FmCard");
119
- return s(), b(i, { class: "fixed bottom-0 w-full" }, {
120
+ return s(), C(i, { class: "fixed bottom-0 w-full" }, {
120
121
  default: m(() => [
121
122
  a(z, {
122
123
  modelValue: u.value,
@@ -134,7 +135,7 @@ const we = /* @__PURE__ */ S({
134
135
  "onUpdate:modelValue": l[1] || (l[1] = (r) => u.value = r),
135
136
  icon: "keyboard_double_arrow_down"
136
137
  }, null, 8, ["modelValue"]),
137
- u.value ? j(e.$slots, "default", { key: 0 }) : U("", !0)
138
+ u.value ? Q(o.$slots, "default", { key: 0 }) : U("", !0)
138
139
  ]),
139
140
  _: 3
140
141
  }, 8, ["modelValue"])
@@ -143,7 +144,7 @@ const we = /* @__PURE__ */ S({
143
144
  });
144
145
  };
145
146
  }
146
- }), Te = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Me = { class: "flex flex-col gap-24" }, Be = { class: "line-clamp-2 overflow-hidden" }, ne = /* @__PURE__ */ S({
147
+ }), Be = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Oe = { class: "flex flex-col gap-24" }, qe = { class: "line-clamp-2 overflow-hidden" }, ie = /* @__PURE__ */ S({
147
148
  __name: "ReportEditorTab",
148
149
  props: /* @__PURE__ */ $({
149
150
  hideConfiguration: {
@@ -156,153 +157,153 @@ const we = /* @__PURE__ */ S({
156
157
  }),
157
158
  emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
158
159
  setup(p, { emit: u }) {
159
- const e = M(p, "modelValue"), { breakpoints: l } = A(), g = p, i = u, r = ee(), n = oe(), v = N(), { currentSelectWidgetType: t, categories: V, editingTile: B, editingIndex: h } = Z(X()), { promptMessage: R } = te(), T = N(!1), { t: _ } = I();
160
- ve(
160
+ const o = M(p, "modelValue"), { breakpoints: l } = A(), g = p, i = u, r = te(), n = le(), v = N(), { currentSelectWidgetType: t, categories: k, editingTile: B, editingIndex: w } = oe(Z()), { promptMessage: R } = re(), T = N(!1), { t: f, te: b } = L();
161
+ _e(
161
162
  () => t.value,
162
163
  () => {
163
- t.value !== void 0 && (e.value.tiles.push(Ce(t.value)), h.value = e.value.tiles.length - 1, B.value = e.value.tiles[e.value.tiles.length - 1], r.push({
164
+ t.value !== void 0 && (o.value.tiles.push(Ve(t.value)), w.value = o.value.tiles.length - 1, B.value = o.value.tiles[o.value.tiles.length - 1], r.push({
164
165
  name: "tileEditor",
165
166
  query: n.query
166
167
  }));
167
168
  },
168
169
  { immediate: !0 }
169
170
  );
170
- const k = [
171
+ const F = [
171
172
  {
172
- label: _("report.common.edit"),
173
+ label: f("report.common.edit"),
173
174
  selected: !1,
174
175
  variant: "tertiary",
175
- onClick: (d) => {
176
- h.value = d, B.value = JSON.parse(JSON.stringify(e.value.tiles[d])), r.push({
176
+ onClick: (V) => {
177
+ w.value = V, B.value = JSON.parse(JSON.stringify(o.value.tiles[V])), r.push({
177
178
  name: "tileEditor",
178
179
  query: n.query
179
180
  });
180
181
  }
181
182
  },
182
183
  {
183
- label: _("report.common.duplicate"),
184
+ label: f("report.common.duplicate"),
184
185
  selected: !1,
185
186
  variant: "tertiary",
186
- onClick: (d) => {
187
- e.value.tiles.push(JSON.parse(JSON.stringify(e.value.tiles[d])));
187
+ onClick: (V) => {
188
+ o.value.tiles.push(JSON.parse(JSON.stringify(o.value.tiles[V])));
188
189
  }
189
190
  },
190
191
  {
191
- label: _("report.common.remove"),
192
+ label: f("report.common.remove"),
192
193
  selected: !1,
193
194
  variant: "destructive",
194
- onClick: async (d) => {
195
+ onClick: async (V) => {
195
196
  await R({
196
- title: _("report.editor.deleteWidget"),
197
- message: _("report.editor.deleteWidgetConfirm", {
198
- title: e.value.tiles[d].widget.title
197
+ title: f("report.editor.deleteWidget"),
198
+ message: f("report.editor.deleteWidgetConfirm", {
199
+ title: o.value.tiles[V].widget.title
199
200
  })
200
- }) && (e.value.tiles = e.value.tiles.filter((w, D) => D !== d));
201
+ }) && (o.value.tiles = o.value.tiles.filter((G, W) => W !== V));
201
202
  }
202
203
  }
203
- ], F = P(() => V.value.map((d) => ({
204
- label: _(`report.category.${d.name}`),
205
- value: d.id
204
+ ], x = P(() => k.value.map((V) => ({
205
+ label: f(`report.category.${V.name}`),
206
+ value: V.id
206
207
  })));
207
- return (d, f) => {
208
- const w = c("FmTextField"), D = c("FmSelect"), G = c("FmButton"), ae = c("FmIcon"), ie = c("FmTooltip"), se = c("FmMenuItem"), ue = c("FmMenu"), de = c("FmListItem"), me = c("FmList"), ce = c("FmForm");
209
- return s(), b(K(o(l).lg || o(l).md ? Se : Re), {
208
+ return (V, d) => {
209
+ const G = c("FmTextField"), W = c("FmSelect"), j = c("FmButton"), se = c("FmIcon"), ue = c("FmTooltip"), de = c("FmMenuItem"), me = c("FmMenu"), ce = c("FmListItem"), pe = c("FmList"), fe = c("FmForm");
210
+ return s(), C(X(e(l).lg || e(l).md ? Te : Me), {
210
211
  "model-value": g.hideConfiguration,
211
- "onUpdate:modelValue": f[5] || (f[5] = (y) => i("hideConfiguration", y))
212
+ "onUpdate:modelValue": d[5] || (d[5] = (_) => i("hideConfiguration", _))
212
213
  }, {
213
214
  default: m(() => [
214
- a(we, {
215
- modelValue: o(t),
216
- "onUpdate:modelValue": f[0] || (f[0] = (y) => Q(t) ? t.value = y : null),
215
+ a(Se, {
216
+ modelValue: e(t),
217
+ "onUpdate:modelValue": d[0] || (d[0] = (_) => Y(t) ? t.value = _ : null),
217
218
  "is-open": T.value,
218
- onIsOpen: f[1] || (f[1] = (y) => T.value = y)
219
+ onIsOpen: d[1] || (d[1] = (_) => T.value = _)
219
220
  }, null, 8, ["modelValue", "is-open"]),
220
- a(ce, {
221
+ a(fe, {
221
222
  ref_key: "form",
222
223
  ref: v,
223
224
  class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
224
225
  }, {
225
226
  default: m(() => [
226
- a(be, { class: "border-solid" }, {
227
+ a(ke, { class: "border-solid" }, {
227
228
  header: m(() => [
228
- C("p", null, O(o(_)("report.editor.reportInfo")), 1),
229
- f[6] || (f[6] = C("div", { class: "grow" }, null, -1))
229
+ y("p", null, O(e(f)("report.editor.reportInfo")), 1),
230
+ d[6] || (d[6] = y("div", { class: "grow" }, null, -1))
230
231
  ]),
231
232
  content: m(() => [
232
- C("div", Te, [
233
- a(w, {
234
- modelValue: e.value.name,
235
- "onUpdate:modelValue": f[2] || (f[2] = (y) => e.value.name = y),
236
- label: o(_)("report.editor.reportTitle"),
237
- placeholder: o(_)("report.editor.placeholder")
233
+ y("div", Be, [
234
+ a(G, {
235
+ modelValue: o.value.name,
236
+ "onUpdate:modelValue": d[2] || (d[2] = (_) => o.value.name = _),
237
+ label: e(f)("report.editor.reportTitle"),
238
+ placeholder: e(f)("report.editor.placeholder")
238
239
  }, null, 8, ["modelValue", "label", "placeholder"]),
239
- a(D, {
240
- modelValue: e.value.category,
241
- "onUpdate:modelValue": f[3] || (f[3] = (y) => e.value.category = y),
242
- label: o(_)("report.common.category"),
243
- items: F.value
240
+ a(W, {
241
+ modelValue: o.value.category,
242
+ "onUpdate:modelValue": d[3] || (d[3] = (_) => o.value.category = _),
243
+ label: e(f)("report.common.category"),
244
+ items: x.value
244
245
  }, null, 8, ["modelValue", "label", "items"])
245
246
  ])
246
247
  ]),
247
248
  _: 1
248
249
  }),
249
- C("div", Me, [
250
- a(G, {
251
- label: o(_)("report.editor.addWidget"),
250
+ y("div", Oe, [
251
+ a(j, {
252
+ label: e(f)("report.editor.addWidget"),
252
253
  variant: "secondary",
253
254
  icon: "add",
254
255
  "icon-position": "prepend",
255
- "border-color": o(W).ColorPrimary,
256
- "text-color": o(W).ColorPrimary,
257
- onClick: f[4] || (f[4] = (y) => T.value = !0)
256
+ "border-color": e(I).ColorPrimary,
257
+ "text-color": e(I).ColorPrimary,
258
+ onClick: d[4] || (d[4] = (_) => T.value = !0)
258
259
  }, null, 8, ["label", "border-color", "text-color"]),
259
- a(me, null, {
260
+ a(pe, null, {
260
261
  default: m(() => [
261
- a(o(Ve), {
262
- list: e.value.tiles,
262
+ a(e(Fe), {
263
+ list: o.value.tiles,
263
264
  "item-key": "id",
264
265
  class: "flex flex-col gap-2 cursor-grab",
265
266
  handle: ".handle"
266
267
  }, {
267
- item: m(({ element: y, index: J }) => [
268
- a(de, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
268
+ item: m(({ element: _, index: D }) => [
269
+ a(ce, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
269
270
  default: m(() => [
270
- a(ae, {
271
+ a(se, {
271
272
  name: "drag_handle",
272
273
  class: "handle"
273
274
  }),
274
- a(ie, {
275
- content: y.widget.title.length <= 0 ? `Widget ${J}` : y.widget.title,
275
+ a(ue, {
276
+ content: _.widget.title ? e(K)(e(f), e(b), _.widget.title, "other") : e(f)("report.editor.widget", { index: D + 1 }),
276
277
  class: "handle"
277
278
  }, {
278
279
  default: m(() => [
279
- C("p", Be, O(y.widget.title.length <= 0 ? `Widget ${J}` : y.widget.title), 1)
280
+ y("p", qe, O(_.widget.title ? e(K)(e(f), e(b), _.widget.title, "other") : e(f)("report.editor.widget", { index: D + 1 })), 1)
280
281
  ]),
281
282
  _: 2
282
283
  }, 1032, ["content"]),
283
- f[7] || (f[7] = C("div", { class: "grow" }, null, -1)),
284
- a(ue, {
284
+ d[7] || (d[7] = y("div", { class: "grow" }, null, -1)),
285
+ a(me, {
285
286
  trigger: "click",
286
287
  shift: !0,
287
288
  "stop-click-propagation": !0
288
289
  }, {
289
290
  "menu-button": m(() => [
290
- a(G, {
291
+ a(j, {
291
292
  "append-icon": "more_vert",
292
293
  variant: "tertiary"
293
294
  })
294
295
  ]),
295
296
  default: m(() => [
296
- (s(), x(q, null, H(k, (L, pe) => a(se, {
297
- key: pe,
298
- onClick: (Ie) => L.onClick(J)
297
+ (s(), h(q, null, H(F, (J, ve) => a(de, {
298
+ key: ve,
299
+ onClick: (De) => J.onClick(D)
299
300
  }, {
300
301
  label: m(() => [
301
- C("p", {
302
+ y("p", {
302
303
  class: E(
303
- L.variant === "destructive" ? " text-fm-color-system-error-300" : ""
304
+ J.variant === "destructive" ? " text-fm-color-system-error-300" : ""
304
305
  )
305
- }, O(L.label), 3)
306
+ }, O(J.label), 3)
306
307
  ]),
307
308
  _: 2
308
309
  }, 1032, ["onClick"])), 64))
@@ -327,11 +328,11 @@ const we = /* @__PURE__ */ S({
327
328
  }, 8, ["model-value"]);
328
329
  };
329
330
  }
330
- }), Oe = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, qe = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Ue = { class: "w-full overflow-y-auto" }, Ne = {
331
+ }), Ue = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, Ne = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Pe = { class: "w-full overflow-y-auto" }, Ee = {
331
332
  key: 0,
332
333
  class: "w-full grid grid-cols-12 gap-[24px] p-24",
333
334
  style: { backgroundColor: "#F6F8FC" }
334
- }, Pe = /* @__PURE__ */ S({
335
+ }, Ie = /* @__PURE__ */ S({
335
336
  __name: "ReportEditorDesktop",
336
337
  props: /* @__PURE__ */ $({
337
338
  hideConfiguration: { type: Boolean, required: !0, default: !1 }
@@ -342,20 +343,20 @@ const we = /* @__PURE__ */ S({
342
343
  }),
343
344
  emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
344
345
  setup(p, { emit: u }) {
345
- const e = M(p, "modelValue"), l = p, g = u;
346
+ const o = M(p, "modelValue"), l = p, g = u;
346
347
  return (i, r) => {
347
348
  const n = c("FmCircularProgress"), v = c("FmButton");
348
- return s(), x("div", null, [
349
- e.value ? (s(), x(q, { key: 1 }, [
350
- a(ke, {
349
+ return s(), h("div", null, [
350
+ o.value ? (s(), h(q, { key: 1 }, [
351
+ a(xe, {
351
352
  "model-value": !l.hideConfiguration
352
353
  }, {
353
354
  right: m(() => [
354
- C("div", Oe, [
355
- e.value ? (s(), b(ne, {
355
+ y("div", Ue, [
356
+ o.value ? (s(), C(ie, {
356
357
  key: 0,
357
- modelValue: e.value,
358
- "onUpdate:modelValue": r[0] || (r[0] = (t) => e.value = t),
358
+ modelValue: o.value,
359
+ "onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
359
360
  "hide-configuration": l.hideConfiguration,
360
361
  onHideConfiguration: r[1] || (r[1] = (t) => {
361
362
  g("hideConfiguration", t);
@@ -364,12 +365,12 @@ const we = /* @__PURE__ */ S({
364
365
  ])
365
366
  ]),
366
367
  left: m(() => [
367
- C("div", qe, [
368
+ y("div", Ne, [
368
369
  a(v, {
369
370
  variant: "secondary",
370
371
  icon: "keyboard_double_arrow_right",
371
- "border-color": o(W).ColorPrimary,
372
- "text-color": o(W).ColorPrimary,
372
+ "border-color": e(I).ColorPrimary,
373
+ "text-color": e(I).ColorPrimary,
373
374
  class: "m-24 my-16",
374
375
  size: "md",
375
376
  onClick: r[2] || (r[2] = (t) => g("hideConfiguration", !l.hideConfiguration))
@@ -378,21 +379,21 @@ const we = /* @__PURE__ */ S({
378
379
  ]),
379
380
  _: 1
380
381
  }, 8, ["model-value"]),
381
- C("div", Ue, [
382
- e.value.tiles.length > 0 ? (s(), x("div", Ne, [
383
- (s(!0), x(q, null, H(e.value.tiles, (t, V) => (s(), b(le, {
384
- key: `${o(Y)()}_${V}`,
382
+ y("div", Pe, [
383
+ o.value.tiles.length > 0 ? (s(), h("div", Ee, [
384
+ (s(!0), h(q, null, H(o.value.tiles, (t, k) => (s(), C(ne, {
385
+ key: `${e(ee)()}_${k}`,
385
386
  "model-value": t,
386
- index: V,
387
+ index: k,
387
388
  "hide-export": !0
388
389
  }, null, 8, ["model-value", "index"]))), 128))
389
- ])) : (s(), b(re, { key: 1 }))
390
+ ])) : (s(), C(ae, { key: 1 }))
390
391
  ])
391
- ], 64)) : (s(), b(n, { key: 0 }))
392
+ ], 64)) : (s(), C(n, { key: 0 }))
392
393
  ]);
393
394
  };
394
395
  }
395
- }), Ee = {
396
+ }), Le = {
396
397
  key: 0,
397
398
  class: "grid grid-cols-12 gap-[16px]"
398
399
  }, We = /* @__PURE__ */ S({
@@ -406,120 +407,120 @@ const we = /* @__PURE__ */ S({
406
407
  }),
407
408
  emits: /* @__PURE__ */ $(["hideConfiguration"], ["update:modelValue"]),
408
409
  setup(p, { emit: u }) {
409
- const e = M(p, "modelValue"), l = p, g = u;
410
+ const o = M(p, "modelValue"), l = p, g = u;
410
411
  return (i, r) => {
411
412
  const n = c("FmCircularProgress"), v = c("FmCard");
412
- return s(), x("div", null, [
413
- e.value ? (s(), x(q, { key: 1 }, [
413
+ return s(), h("div", null, [
414
+ o.value ? (s(), h(q, { key: 1 }, [
414
415
  a(v, { class: "px-5 pb-28" }, {
415
416
  default: m(() => [
416
- e.value.tiles.length > 0 ? (s(), x("div", Ee, [
417
- (s(!0), x(q, null, H(e.value.tiles, (t, V) => (s(), b(le, {
418
- key: `${o(Y)()}_${V}`,
417
+ o.value.tiles.length > 0 ? (s(), h("div", Le, [
418
+ (s(!0), h(q, null, H(o.value.tiles, (t, k) => (s(), C(ne, {
419
+ key: `${e(ee)()}_${k}`,
419
420
  "model-value": t,
420
- index: V,
421
+ index: k,
421
422
  "hide-export": !0
422
423
  }, null, 8, ["model-value", "index"]))), 128))
423
- ])) : (s(), b(re, { key: 1 }))
424
+ ])) : (s(), C(ae, { key: 1 }))
424
425
  ]),
425
426
  _: 1
426
427
  }),
427
- e.value ? (s(), b(ne, {
428
+ o.value ? (s(), C(ie, {
428
429
  key: 0,
429
- modelValue: e.value,
430
- "onUpdate:modelValue": r[0] || (r[0] = (t) => e.value = t),
430
+ modelValue: o.value,
431
+ "onUpdate:modelValue": r[0] || (r[0] = (t) => o.value = t),
431
432
  "hide-configuration": l.hideConfiguration,
432
433
  onHideConfiguration: r[1] || (r[1] = (t) => {
433
434
  g("hideConfiguration", t);
434
435
  })
435
436
  }, null, 8, ["modelValue", "hide-configuration"])) : U("", !0)
436
- ], 64)) : (s(), b(n, { key: 0 }))
437
+ ], 64)) : (s(), C(n, { key: 0 }))
437
438
  ]);
438
439
  };
439
440
  }
440
- }), Xe = /* @__PURE__ */ S({
441
+ }), eo = /* @__PURE__ */ S({
441
442
  __name: "ReportEditor",
442
443
  setup(p) {
443
- const u = ee(), e = oe(), l = X(), { promptLoader: g } = he(), { t: i } = I(), { currentReport: r, editingReport: n } = Z(l), { breakpoints: v } = A(), t = P(() => {
444
- var k;
445
- return !((k = n.value) != null && k.editable);
446
- }), V = P(() => {
447
- var k;
448
- return ((k = n.value) == null ? void 0 : k.name) ?? i("report.editor.newReport");
449
- }), B = xe(), { promptMessage: h } = te(), R = N(!1);
444
+ const u = te(), o = le(), l = Z(), { promptLoader: g } = $e(), { t: i } = L(), { currentReport: r, editingReport: n } = oe(l), { breakpoints: v } = A(), t = P(() => {
445
+ var b;
446
+ return !((b = n.value) != null && b.editable);
447
+ }), k = P(() => {
448
+ var b;
449
+ return ((b = n.value) == null ? void 0 : b.name) ?? i("report.editor.newReport");
450
+ }), B = we(), { promptMessage: w } = re(), R = N(!1);
450
451
  async function T() {
451
452
  if (!n.value || n.value.tiles.length === 0) {
452
453
  B.open({ message: i("report.messages.noWidget"), type: "error" });
453
454
  return;
454
455
  }
455
- const k = t.value ? i("report.common.clone") : i("report.common.save");
456
- if (await h({
456
+ const b = t.value ? i("report.common.clone") : i("report.common.save");
457
+ if (await w({
457
458
  title: `${i("report.messages.saveReport")}`,
458
- message: i("report.messages.confirmAction", { action: k, name: V.value })
459
+ message: i("report.messages.confirmAction", { action: b, name: k.value })
459
460
  }))
460
461
  try {
461
462
  await g(async () => {
462
463
  if (t.value) {
463
- const d = JSON.parse(JSON.stringify(n.value));
464
- d.editable = !0, d.id = "", d.name = `${d.name} ${i("report.common.duplicate")}`, await l.createOrUpdateReport(d);
464
+ const x = JSON.parse(JSON.stringify(n.value));
465
+ x.editable = !0, x.id = "", x.name = `${x.name} ${i("report.common.duplicate")}`, await l.createOrUpdateReport(x);
465
466
  } else
466
467
  n.value && await l.createOrUpdateReport(n.value);
467
468
  u.push({
468
469
  name: "reportView",
469
- query: e.query
470
+ query: o.query
470
471
  });
471
472
  });
472
- } catch (d) {
473
- console.log(d), B.open({
474
- message: i("report.messages.failedToAction", { action: k }),
473
+ } catch (x) {
474
+ console.log(x), B.open({
475
+ message: i("report.messages.failedToAction", { action: b }),
475
476
  type: "error"
476
477
  });
477
478
  }
478
479
  }
479
- async function _() {
480
+ async function f() {
480
481
  var F;
481
482
  if (!n.value) return;
482
- await h({
483
+ await w({
483
484
  title: i("report.common.report", 1),
484
485
  message: i("report.editor.notSaved", { name: (F = n.value) == null ? void 0 : F.name })
485
486
  }) && (n.value = JSON.parse(JSON.stringify(r.value)), u.back());
486
487
  }
487
- return ge(() => {
488
+ return ye(() => {
488
489
  n.value || u.push({ name: "reports" });
489
- }), (k, F) => {
490
- const d = c("FmChip"), f = c("FmPageHead");
491
- return s(), b(Fe, null, {
490
+ }), (b, F) => {
491
+ const x = c("FmChip"), V = c("FmPageHead");
492
+ return s(), C(he, null, {
492
493
  default: m(() => [
493
- a(f, {
494
+ a(V, {
494
495
  actions: [
495
- { label: o(i)("report.common.cancel"), value: "cancel", isPrimary: !1 },
496
+ { label: e(i)("report.common.cancel"), value: "cancel", isPrimary: !1 },
496
497
  { label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
497
498
  ],
498
- "onClick:action": F[0] || (F[0] = (w) => {
499
- w === "cancel" && _(), w === "save" && T();
499
+ "onClick:action": F[0] || (F[0] = (d) => {
500
+ d === "cancel" && f(), d === "save" && T();
500
501
  })
501
502
  }, {
502
503
  title: m(() => [
503
- C("p", {
504
- class: E(`${o(v).sm || o(v).xs ? "hidden" : ""} fm-typo-en-title-md-600`)
505
- }, O(V.value), 3),
506
- !o(n) || o(n).tiles.length <= 0 ? (s(), b(d, {
504
+ y("p", {
505
+ class: E(`${e(v).sm || e(v).xs ? "hidden" : ""} fm-typo-en-title-md-600`)
506
+ }, O(k.value), 3),
507
+ !e(n) || e(n).tiles.length <= 0 ? (s(), C(x, {
507
508
  key: 0,
508
- label: o(i)("report.editor.draft"),
509
+ label: e(i)("report.editor.draft"),
509
510
  icon: "hexagon",
510
511
  selectable: !1
511
512
  }, null, 8, ["label"])) : U("", !0)
512
513
  ]),
513
514
  _: 1
514
515
  }, 8, ["actions"]),
515
- o(n) ? (s(), b(K(o(v).lg || o(v).md ? Pe : We), {
516
+ e(n) ? (s(), C(X(e(v).lg || e(v).md ? Ie : We), {
516
517
  key: 0,
517
- modelValue: o(n),
518
- "onUpdate:modelValue": F[1] || (F[1] = (w) => Q(n) ? n.value = w : null),
519
- class: E(`${o(v).lg || o(v).md ? "flex" : ""} w-full`),
520
- style: _e({ height: `calc( 100% - ${o(v).lg || o(v).md ? 72 : 64}px)` }),
518
+ modelValue: e(n),
519
+ "onUpdate:modelValue": F[1] || (F[1] = (d) => Y(n) ? n.value = d : null),
520
+ class: E(`${e(v).lg || e(v).md ? "flex" : ""} w-full`),
521
+ style: Ce({ height: `calc( 100% - ${e(v).lg || e(v).md ? 72 : 64}px)` }),
521
522
  "hide-configuration": R.value,
522
- onHideConfiguration: F[2] || (F[2] = (w) => R.value = w)
523
+ onHideConfiguration: F[2] || (F[2] = (d) => R.value = d)
523
524
  }, null, 40, ["modelValue", "class", "style", "hide-configuration"])) : U("", !0)
524
525
  ]),
525
526
  _: 1
@@ -528,5 +529,5 @@ const we = /* @__PURE__ */ S({
528
529
  }
529
530
  });
530
531
  export {
531
- Xe as default
532
+ eo as default
532
533
  };