@feedmepos/mf-report 5.24.2 → 5.24.3

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-mqLN8UFM.js → App-CH45KtMi.js} +4 -4
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-C3gJtMm-.js +380 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BzVweuOL.js → Default.vue_vue_type_script_setup_true_lang-Duu-LyqL.js} +1 -1
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-CtV3BEJO.js +4661 -0
  5. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-C731Br2T.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BDXjO_Sp.js} +8299 -7427
  6. package/dist/{InsightView-ADisfb4R.js → InsightView-BWVD5IIN.js} +5 -5
  7. package/dist/{Integration-CDqNMoR0.js → Integration-BVN352PX.js} +22 -22
  8. package/dist/{Integrations-DQIv4LVI.js → Integrations-BUojqghs.js} +13 -12
  9. package/dist/{Layout-DMSB8Kfu.js → Layout-B5kumbJ0.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-2gpx86l4.js → MenuTab.vue_vue_type_script_setup_true_lang-D1-Jlcbz.js} +26 -27
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DHUUdyp2.js → NavigationTab.vue_vue_type_script_setup_true_lang-DDbNobqI.js} +6342 -6322
  12. package/dist/{OverviewView-CRg2cFuh.js → OverviewView-DJOcIDmH.js} +5 -5
  13. package/dist/{Report-BwqcLICQ.js → Report-CuZpyzTW.js} +4 -4
  14. package/dist/{ReportEditor-DGY3SxpW.js → ReportEditor-B3haFTU6.js} +571 -573
  15. package/dist/{ReportView-BIY-5Lbi.js → ReportView-4JWtTu3y.js} +16 -17
  16. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js +143 -0
  17. package/dist/{Setting-CpfDtK_s.js → Setting-Dl8HsHao.js} +4 -4
  18. package/dist/{TileEditor-D5jwVXhB.js → TileEditor-1hvqccL1.js} +325 -323
  19. package/dist/{TransitionFade-CC0PpKBo.js → TransitionFade-9A8VZ8Fm.js} +18 -18
  20. package/dist/{app-CILH73ZA.js → app-CBHDMsDR.js} +2229 -2311
  21. package/dist/app.js +1 -1
  22. package/dist/assets/{formatChartData.worker-C3U_CcDO.js → formatChartData.worker-DaLXwMTs.js} +2 -2
  23. package/dist/assets/{processTableData.worker-D_oiIvNW.js → processTableData.worker-Be0ZD94L.js} +2 -2
  24. package/dist/style.css +1 -1
  25. package/dist/{useRestaurantPermission-UJ4KkZq1.js → useRestaurantPermission-CGonMXA-.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BYxYhdsf.js +0 -286
  28. package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-LZyZxm7z.js +0 -5467
  29. package/dist/NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js +0 -38
  30. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js +0 -110
@@ -1,61 +1,59 @@
1
- import { defineComponent as he, mergeModels as be, useModel as ye, ref as R, computed as S, resolveComponent as _, createBlock as T, openBlock as s, withCtx as v, createElementVNode as h, createVNode as a, unref as o, normalizeClass as Te, createTextVNode as He, toDisplayString as X, createElementBlock as C, Fragment as le, renderSlot as Ye, createCommentVNode as G, watch as ge, renderList as pe, resolveDynamicComponent as sl, isRef as Ze, normalizeStyle as je, onMounted as ul } from "vue";
2
- import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Ge, d as Ke, T as fl, b as gl } from "./TransitionFade-CC0PpKBo.js";
3
- import { C as fe, D as Q, b as ke, u as el, a as bl, v as Oe } from "./BaseDialog.vue_vue_type_script_setup_true_lang-C731Br2T.js";
4
- import { storeToRefs as Ie } from "pinia";
1
+ import { defineComponent as ye, mergeModels as ge, useModel as be, ref as I, computed as S, resolveComponent as _, createBlock as T, openBlock as s, withCtx as p, createElementVNode as h, createVNode as a, unref as o, normalizeClass as ke, createTextVNode as Le, toDisplayString as Y, createElementBlock as C, Fragment as ee, renderSlot as Ye, createCommentVNode as A, watch as fe, renderList as ce, resolveDynamicComponent as sl, isRef as Ze, normalizeStyle as He, onMounted as ul } from "vue";
2
+ import { W as dl, g as ml, _ as cl, a as pl, i as vl, S as Ae, d as Ge, T as fl, b as gl } from "./TransitionFade-9A8VZ8Fm.js";
3
+ import { C as ve, D as X, c as Ve, g as bl, u as el, a as yl, d as Ke, v as Oe, b as Qe } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BDXjO_Sp.js";
4
+ import { storeToRefs as Re } from "pinia";
5
5
  import { useRouter as ll, useRoute as tl } from "vue-router";
6
- import { useBreakpoints as qe, useSnackbar as ol, FmButtonColorThemeVariant as Ce } from "@feedmepos/ui-library";
6
+ import { useBreakpoints as Ie, useSnackbar as ol, FmButtonColorThemeVariant as xe } from "@feedmepos/ui-library";
7
7
  import { u as al } from "./message-dialog-UoMWOnil.js";
8
- import { u as Ne, a as yl } from "./vue-i18n-DVWuTfed.js";
8
+ import { u as Ne, a as hl } from "./vue-i18n-DVWuTfed.js";
9
9
  import { r as $e } from "./i18n-CI_sQ5d_.js";
10
- import { g as hl, a as Qe, _ as Ee } from "./FilterSelector.vue_vue_type_script_setup_true_lang-LZyZxm7z.js";
11
- import { _ as Pe } from "./NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js";
12
- import { a as Je } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js";
13
- import { a as _l, i as Le } from "./app-CILH73ZA.js";
14
- import { useCoreStore as wl } from "@feedmepos/mf-common";
15
- const Fl = /* @__PURE__ */ he({
10
+ import { _ as Ee } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-CtV3BEJO.js";
11
+ import { b as Pe, _ as Je } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js";
12
+ import { useCoreStore as _l } from "@feedmepos/mf-common";
13
+ const wl = /* @__PURE__ */ ye({
16
14
  __name: "WidgetDialog",
17
- props: /* @__PURE__ */ be({
15
+ props: /* @__PURE__ */ ge({
18
16
  isOpen: { type: Boolean }
19
17
  }, {
20
18
  modelValue: {},
21
19
  modelModifiers: {}
22
20
  }),
23
- emits: /* @__PURE__ */ be(["update:isOpen"], ["update:modelValue"]),
24
- setup(M, { emit: r }) {
25
- const { t: n } = Ne(), { breakpoints: d } = qe(), x = ye(M, "modelValue"), f = M, O = r;
26
- function P() {
21
+ emits: /* @__PURE__ */ ge(["update:isOpen"], ["update:modelValue"]),
22
+ setup(B, { emit: r }) {
23
+ const { t: n } = Ne(), { breakpoints: d } = Ie(), x = be(B, "modelValue"), v = B, O = r;
24
+ function J() {
27
25
  O("update:isOpen", !1);
28
26
  }
29
27
  function F() {
30
28
  u.value && (x.value = u.value, u.value = void 0, O("update:isOpen", !1));
31
29
  }
32
- const u = R(), B = S(() => !u.value);
33
- return (Y, D) => {
34
- const J = _("FmButton"), w = _("FmDialog");
30
+ const u = I(), D = S(() => !u.value);
31
+ return (Z, R) => {
32
+ const L = _("FmButton"), w = _("FmDialog");
35
33
  return s(), T(w, {
36
- "model-value": f.isOpen
34
+ "model-value": v.isOpen
37
35
  }, {
38
- "dialog-header": v(() => [
39
- He(X(o(n)("report.widget.type")), 1)
36
+ "dialog-header": p(() => [
37
+ Le(Y(o(n)("report.widget.type")), 1)
40
38
  ]),
41
- default: v(() => [
39
+ default: p(() => [
42
40
  a(dl, {
43
41
  modelValue: u.value,
44
- "onUpdate:modelValue": D[0] || (D[0] = (V) => u.value = V),
45
- class: Te(`grid ${o(d).lg || o(d).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
42
+ "onUpdate:modelValue": R[0] || (R[0] = (V) => u.value = V),
43
+ class: ke(`grid ${o(d).lg || o(d).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
46
44
  "child-class": "p-[8px] flex flex-col"
47
45
  }, null, 8, ["modelValue", "class"])
48
46
  ]),
49
- "dialog-footer": v(() => [
50
- D[1] || (D[1] = h("div", { class: "grow" }, null, -1)),
51
- a(J, {
47
+ "dialog-footer": p(() => [
48
+ R[1] || (R[1] = h("div", { class: "grow" }, null, -1)),
49
+ a(L, {
52
50
  label: o(n)("report.common.cancel"),
53
51
  variant: "tertiary",
54
- onClick: P
52
+ onClick: J
55
53
  }, null, 8, ["label"]),
56
- a(J, {
54
+ a(L, {
57
55
  label: o(n)("report.common.confirm"),
58
- disabled: B.value,
56
+ disabled: D.value,
59
57
  onClick: F
60
58
  }, null, 8, ["label", "disabled"])
61
59
  ]),
@@ -63,9 +61,9 @@ const Fl = /* @__PURE__ */ he({
63
61
  }, 8, ["model-value"]);
64
62
  };
65
63
  }
66
- }), Vl = { class: "fm-typo-en-body-lg-600" }, Ae = /* @__PURE__ */ he({
64
+ }), Fl = { class: "fm-typo-en-body-lg-600" }, je = /* @__PURE__ */ ye({
67
65
  __name: "ReportEditorTabHeader",
68
- props: /* @__PURE__ */ be({
66
+ props: /* @__PURE__ */ ge({
69
67
  icon: {
70
68
  type: String,
71
69
  required: !0
@@ -75,33 +73,33 @@ const Fl = /* @__PURE__ */ he({
75
73
  modelModifiers: {}
76
74
  }),
77
75
  emits: ["update:modelValue"],
78
- setup(M) {
79
- const { t: r } = Ne(), n = ye(M, "modelValue"), d = M;
80
- return (x, f) => {
76
+ setup(B) {
77
+ const { t: r } = Ne(), n = be(B, "modelValue"), d = B;
78
+ return (x, v) => {
81
79
  const O = _("FmIcon");
82
80
  return s(), C("div", {
83
81
  class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
84
- onClick: f[0] || (f[0] = (P) => n.value = !n.value)
82
+ onClick: v[0] || (v[0] = (J) => n.value = !n.value)
85
83
  }, [
86
- h("p", Vl, X(o(r)("report.editor.customizeReport")), 1),
87
- f[1] || (f[1] = h("div", { class: "grow" }, null, -1)),
84
+ h("p", Fl, Y(o(r)("report.editor.customizeReport")), 1),
85
+ v[1] || (v[1] = h("div", { class: "grow" }, null, -1)),
88
86
  a(O, {
89
87
  name: d.icon
90
88
  }, null, 8, ["name"])
91
89
  ]);
92
90
  };
93
91
  }
94
- }), xl = /* @__PURE__ */ he({
92
+ }), Vl = /* @__PURE__ */ ye({
95
93
  __name: "ReportEditorTabDesktop",
96
94
  props: {
97
95
  modelValue: { required: !0, default: !1 },
98
96
  modelModifiers: {}
99
97
  },
100
98
  emits: ["update:modelValue"],
101
- setup(M) {
102
- const r = ye(M, "modelValue");
103
- return (n, d) => (s(), C(le, null, [
104
- a(Ae, {
99
+ setup(B) {
100
+ const r = be(B, "modelValue");
101
+ return (n, d) => (s(), C(ee, null, [
102
+ a(je, {
105
103
  modelValue: r.value,
106
104
  "onUpdate:modelValue": d[0] || (d[0] = (x) => r.value = x),
107
105
  icon: "keyboard_double_arrow_left"
@@ -109,20 +107,20 @@ const Fl = /* @__PURE__ */ he({
109
107
  Ye(n.$slots, "default")
110
108
  ], 64));
111
109
  }
112
- }), kl = /* @__PURE__ */ he({
110
+ }), xl = /* @__PURE__ */ ye({
113
111
  __name: "ReportEditorTabMobile",
114
112
  props: {
115
113
  modelValue: { required: !0, default: !1 },
116
114
  modelModifiers: {}
117
115
  },
118
116
  emits: ["update:modelValue"],
119
- setup(M) {
120
- const r = ye(M, "modelValue");
117
+ setup(B) {
118
+ const r = be(B, "modelValue");
121
119
  return (n, d) => {
122
- const x = _("FmTopSheet"), f = _("FmCard");
123
- return s(), T(f, { class: "fixed bottom-0 w-full" }, {
124
- default: v(() => [
125
- a(Ae, {
120
+ const x = _("FmTopSheet"), v = _("FmCard");
121
+ return s(), T(v, { class: "fixed bottom-0 w-full" }, {
122
+ default: p(() => [
123
+ a(je, {
126
124
  modelValue: r.value,
127
125
  "onUpdate:modelValue": d[0] || (d[0] = (O) => r.value = O),
128
126
  icon: "keyboard_double_arrow_up"
@@ -132,13 +130,13 @@ const Fl = /* @__PURE__ */ he({
132
130
  "onUpdate:modelValue": d[2] || (d[2] = (O) => r.value = O),
133
131
  "fullscreen-size": "sm"
134
132
  }, {
135
- default: v(() => [
136
- a(Ae, {
133
+ default: p(() => [
134
+ a(je, {
137
135
  modelValue: r.value,
138
136
  "onUpdate:modelValue": d[1] || (d[1] = (O) => r.value = O),
139
137
  icon: "keyboard_double_arrow_down"
140
138
  }, null, 8, ["modelValue"]),
141
- r.value ? Ye(n.$slots, "default", { key: 0 }) : G("", !0)
139
+ r.value ? Ye(n.$slots, "default", { key: 0 }) : A("", !0)
142
140
  ]),
143
141
  _: 3
144
142
  }, 8, ["modelValue"])
@@ -147,21 +145,21 @@ const Fl = /* @__PURE__ */ he({
147
145
  });
148
146
  };
149
147
  }
150
- }), Cl = {
148
+ }), kl = {
151
149
  key: 2,
152
150
  class: "flex flex-col gap-3 mt-2 border border-neutral-300 p-3"
153
- }, Tl = { class: "grid grid-cols-1 gap-2 rounded-md border border-neutral-300 p-2 sm:grid-cols-[1.3fr_1fr_1fr_auto] sm:items-end" }, Sl = {
151
+ }, Cl = { class: "grid grid-cols-1 gap-2 rounded-md border border-neutral-300 p-2 sm:grid-cols-[1.3fr_1fr_1fr_auto] sm:items-end" }, Tl = {
154
152
  key: 0,
155
153
  class: "flex justify-end sm:pb-[2px]"
156
- }, Ol = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, $l = { class: "pl-1" }, Nl = {
154
+ }, Sl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ol = { class: "pl-1" }, $l = {
157
155
  key: 0,
158
156
  class: "flex justify-end sm:pb-[2px]"
159
- }, Ul = {
157
+ }, Nl = {
160
158
  key: 4,
161
159
  class: "flex flex-col gap-2"
162
- }, Ml = /* @__PURE__ */ he({
160
+ }, Ul = /* @__PURE__ */ ye({
163
161
  __name: "GlobalFilterDialog",
164
- props: /* @__PURE__ */ be({
162
+ props: /* @__PURE__ */ ge({
165
163
  schemas: {
166
164
  type: Array,
167
165
  default: () => []
@@ -179,51 +177,51 @@ const Fl = /* @__PURE__ */ he({
179
177
  isOpenModifiers: {}
180
178
  }),
181
179
  emits: ["update:globalFilter", "update:isOpen"],
182
- setup(M) {
183
- const { t: r, te: n } = Ne(), d = ye(M, "globalFilter"), x = ye(M, "isOpen"), f = ol(), O = M, P = R(""), F = R(), u = R(), B = R(), Y = R([]), D = R([]), J = R(""), w = R(!1), V = R(!1), $ = R([]), U = R([]), H = R(fe.Equal);
184
- function ne(l) {
180
+ setup(B) {
181
+ const { t: r, te: n } = Ne(), d = be(B, "globalFilter"), x = be(B, "isOpen"), v = ol(), O = B, J = I(""), F = I(), u = I(), D = I(), Z = I([]), R = I([]), L = I(""), w = I(!1), V = I(!1), $ = I([]), N = I([]), K = I(ve.Equal);
182
+ function le(l) {
185
183
  return JSON.parse(JSON.stringify(l));
186
184
  }
187
- function m(l, e) {
185
+ function z(l, e) {
188
186
  return { hour: l, minute: e };
189
187
  }
190
- function te(l) {
188
+ function f(l) {
191
189
  return l ? `${String(l.hour).padStart(2, "0")}:${String(l.minute).padStart(2, "0")}` : null;
192
190
  }
193
- function _e(l) {
191
+ function se(l) {
194
192
  if (!l) return null;
195
- const [e, p] = l.split(":").map(Number);
196
- return Number.isNaN(e) || Number.isNaN(p) ? null : { hour: e, minute: p };
193
+ const [e, m] = l.split(":").map(Number);
194
+ return Number.isNaN(e) || Number.isNaN(m) ? null : { hour: e, minute: m };
197
195
  }
198
- const Z = S(() => u.value ? !(u.value.type === Q.Timestamp && B.value === ke.DateTime) : !1), K = S(
196
+ const te = S(() => u.value ? !(u.value.type === X.Timestamp && D.value === Ve.DateTime) : !1), Q = S(
199
197
  () => {
200
198
  var l;
201
- return ((l = u.value) == null ? void 0 : l.type) === Q.Timestamp && B.value === ke.TimeOfDay;
199
+ return ((l = u.value) == null ? void 0 : l.type) === X.Timestamp && D.value === Ve.TimeOfDay;
202
200
  }
203
- ), ie = S(() => {
201
+ ), ue = S(() => {
204
202
  var l;
205
- return (((l = u.value) == null ? void 0 : l.filterOperators) ?? []).filter((e) => e !== fe.And && e !== fe.Or).map((e) => ({
203
+ return (((l = u.value) == null ? void 0 : l.filterOperators) ?? []).filter((e) => e !== ve.And && e !== ve.Or).map((e) => ({
206
204
  label: r(`report.section.comparisonOperator.${e}`),
207
205
  value: e
208
206
  }));
209
207
  });
210
- function se() {
208
+ function ae() {
211
209
  var e;
212
- const l = (e = ie.value[0]) == null ? void 0 : e.value;
213
- return l || (u.value ? Se(u.value.type, B.value ?? null) : fe.Equal);
210
+ const l = (e = ue.value[0]) == null ? void 0 : e.value;
211
+ return l || (u.value ? Se(u.value.type, D.value ?? null) : ve.Equal);
214
212
  }
215
- function ve(l) {
213
+ function pe(l) {
216
214
  if (u.value)
217
- return hl({
218
- operator: l ?? se(),
215
+ return bl({
216
+ operator: l ?? ae(),
219
217
  dataType: u.value.type,
220
- dimensionOption: u.value.type === Q.Timestamp ? B.value ?? null : null,
218
+ dimensionOption: u.value.type === X.Timestamp ? D.value ?? null : null,
221
219
  t: r
222
220
  });
223
221
  }
224
- function N(l, e) {
222
+ function U(l, e) {
225
223
  if (typeof (e == null ? void 0 : e.default) == "boolean" || l.length > 0 && l.every((y) => typeof y == "boolean")) {
226
- const y = l.reduce((k, E) => (typeof E == "boolean" && k.push(E), k), []);
224
+ const y = l.reduce((k, P) => (typeof P == "boolean" && k.push(P), k), []);
227
225
  if (e)
228
226
  for (e.fixed && y.splice(e.count); y.length < e.count; )
229
227
  y.push(typeof e.default == "boolean" ? e.default : !1);
@@ -235,44 +233,44 @@ const Fl = /* @__PURE__ */ he({
235
233
  c.push(typeof e.default == "string" ? e.default : "");
236
234
  return c;
237
235
  }
238
- function I(l = H.value) {
239
- const e = ve(l), p = N(
236
+ function q(l = K.value) {
237
+ const e = pe(l), m = U(
240
238
  e ? Array(e.count).fill(e.default) : [],
241
239
  e
242
240
  );
243
241
  return {
244
242
  label: "",
245
243
  operator: l,
246
- values: p
244
+ values: m
247
245
  };
248
246
  }
249
- function L() {
247
+ function G() {
250
248
  return {
251
249
  name: "",
252
- startTime: m(0, 0),
253
- endTime: m(23, 59)
250
+ startTime: z(0, 0),
251
+ endTime: z(23, 59)
254
252
  };
255
253
  }
256
- function ue() {
257
- if (!(!Z.value || !V.value)) {
258
- if (K.value) {
259
- U.value.length === 0 && (U.value = [L()]);
254
+ function ne() {
255
+ if (!(!te.value || !V.value)) {
256
+ if (Q.value) {
257
+ N.value.length === 0 && (N.value = [G()]);
260
258
  return;
261
259
  }
262
- $.value.length === 0 && ($.value = [I()]);
260
+ $.value.length === 0 && ($.value = [q()]);
263
261
  }
264
262
  }
265
- function ee() {
266
- var p, c, y;
267
- const l = ne(((p = d.value) == null ? void 0 : p.customOptions) ?? []), e = ne(((c = d.value) == null ? void 0 : c.customTimeRanges) ?? []);
268
- H.value = ((y = l[0]) == null ? void 0 : y.operator) ?? se(), V.value = l.length > 0 || e.length > 0, $.value = l, U.value = e, ue();
263
+ function Ce() {
264
+ var m, c, y;
265
+ const l = le(((m = d.value) == null ? void 0 : m.customOptions) ?? []), e = le(((c = d.value) == null ? void 0 : c.customTimeRanges) ?? []);
266
+ K.value = ((y = l[0]) == null ? void 0 : y.operator) ?? ae(), V.value = l.length > 0 || e.length > 0, $.value = l, N.value = e, ne();
269
267
  }
270
- function W(l) {
271
- H.value = l, $.value = $.value.map((e, p) => {
272
- const c = $.value[p];
268
+ function M(l) {
269
+ K.value = l, $.value = $.value.map((e, m) => {
270
+ const c = $.value[m];
273
271
  if (!c)
274
- return I(l);
275
- const y = ve(l), k = N(
272
+ return q(l);
273
+ const y = pe(l), k = U(
276
274
  Array.isArray(c.values) ? [...c.values] : [],
277
275
  y
278
276
  );
@@ -283,105 +281,105 @@ const Fl = /* @__PURE__ */ he({
283
281
  };
284
282
  });
285
283
  }
286
- function we() {
287
- $.value = [...$.value, I()];
284
+ function he() {
285
+ $.value = [...$.value, q()];
288
286
  }
289
- function Ue(l) {
290
- $.value.length <= 1 || ($.value = $.value.filter((e, p) => p !== l));
287
+ function Te(l) {
288
+ $.value.length <= 1 || ($.value = $.value.filter((e, m) => m !== l));
291
289
  }
292
- function We() {
293
- U.value = [...U.value, L()];
290
+ function qe() {
291
+ N.value = [...N.value, G()];
294
292
  }
295
- function i(l) {
296
- U.value.length <= 1 || (U.value = U.value.filter(
297
- (e, p) => p !== l
293
+ function We(l) {
294
+ N.value.length <= 1 || (N.value = N.value.filter(
295
+ (e, m) => m !== l
298
296
  ));
299
297
  }
300
- function t(l, e, p) {
301
- const c = U.value[l];
302
- c && (U.value[l] = {
298
+ function i(l, e, m) {
299
+ const c = N.value[l];
300
+ c && (N.value[l] = {
303
301
  ...c,
304
- [e]: _e(p)
302
+ [e]: se(m)
305
303
  });
306
304
  }
307
- function z(l) {
305
+ function t(l) {
308
306
  return l.length === 0 || l.some((e) => e == null || e === "");
309
307
  }
310
- function q() {
308
+ function E() {
311
309
  if (!V.value) return !0;
312
- if (K.value) {
313
- const p = U.value.map((y) => y.name.trim()).filter(Boolean);
314
- return U.value.some(
310
+ if (Q.value) {
311
+ const m = N.value.map((y) => y.name.trim()).filter(Boolean);
312
+ return N.value.some(
315
313
  (y) => !y.name.trim() || !y.startTime || !y.endTime
316
- ) ? (f.open({
314
+ ) ? (v.open({
317
315
  message: r("report.section.filter.invalidCustomTimeRange"),
318
316
  type: "error"
319
- }), !1) : new Set(p).size !== p.length ? (f.open({
317
+ }), !1) : new Set(m).size !== m.length ? (v.open({
320
318
  message: r("report.section.filter.customTimeRangeNamesMustBeUnique"),
321
319
  type: "error"
322
320
  }), !1) : !0;
323
321
  }
324
- const l = $.value.map((p) => p.label.trim()).filter(Boolean);
322
+ const l = $.value.map((m) => m.label.trim()).filter(Boolean);
325
323
  return $.value.some(
326
- (p) => !p.label.trim() || z(p.values)
327
- ) ? (f.open({ message: r("report.section.filter.invalidCustomOption"), type: "error" }), !1) : new Set(l).size !== l.length ? (f.open({
324
+ (m) => !m.label.trim() || t(m.values)
325
+ ) ? (v.open({ message: r("report.section.filter.invalidCustomOption"), type: "error" }), !1) : new Set(l).size !== l.length ? (v.open({
328
326
  message: r("report.section.filter.customOptionLabelsMustBeUnique"),
329
327
  type: "error"
330
328
  }), !1) : !0;
331
329
  }
332
- ge(x, (l) => {
333
- var e, p, c, y, k, E, me;
334
- l && (P.value = ((e = d.value) == null ? void 0 : e.label) || "", F.value = O.schemas.find(
335
- (ce) => {
336
- var A;
337
- return ce.name === ((A = d.value) == null ? void 0 : A.schemaName);
330
+ fe(x, (l) => {
331
+ var e, m, c, y, k, P, de;
332
+ l && (J.value = ((e = d.value) == null ? void 0 : e.label) || "", F.value = O.schemas.find(
333
+ (me) => {
334
+ var j;
335
+ return me.name === ((j = d.value) == null ? void 0 : j.schemaName);
338
336
  }
339
- ), u.value = (p = oe.value.find(
340
- (ce) => {
341
- var A;
342
- return ce.value.name === ((A = d.value) == null ? void 0 : A.name);
337
+ ), u.value = (m = H.value.find(
338
+ (me) => {
339
+ var j;
340
+ return me.value.name === ((j = d.value) == null ? void 0 : j.name);
343
341
  }
344
- )) == null ? void 0 : p.value, B.value = (c = d.value) == null ? void 0 : c.option, Y.value = ((y = d.value) == null ? void 0 : y.tileIds) || [], D.value = ((k = d.value) == null ? void 0 : k.filters) || [], w.value = !!((E = d.value) != null && E.dataFormula), J.value = ((me = d.value) == null ? void 0 : me.dataFormula) || "", ee());
345
- }), ge(V, (l) => {
342
+ )) == null ? void 0 : m.value, D.value = (c = d.value) == null ? void 0 : c.option, Z.value = ((y = d.value) == null ? void 0 : y.tileIds) || [], R.value = ((k = d.value) == null ? void 0 : k.filters) || [], w.value = !!((P = d.value) != null && P.dataFormula), L.value = ((de = d.value) == null ? void 0 : de.dataFormula) || "", Ce());
343
+ }), fe(V, (l) => {
346
344
  var e;
347
- l && (H.value = ((e = $.value[0]) == null ? void 0 : e.operator) ?? se(), ue());
348
- }), ge(Z, (l) => {
345
+ l && (K.value = ((e = $.value[0]) == null ? void 0 : e.operator) ?? ae(), ne());
346
+ }), fe(te, (l) => {
349
347
  if (!l) {
350
- V.value = !1, $.value = [], U.value = [];
348
+ V.value = !1, $.value = [], N.value = [];
351
349
  return;
352
350
  }
353
- ue();
354
- }), ge(K, () => {
355
- ue();
356
- }), ge(ie, (l) => {
357
- var p;
358
- const e = (p = l[0]) == null ? void 0 : p.value;
359
- e && (l.some((c) => c.value === H.value) || W(e));
351
+ ne();
352
+ }), fe(Q, () => {
353
+ ne();
354
+ }), fe(ue, (l) => {
355
+ var m;
356
+ const e = (m = l[0]) == null ? void 0 : m.value;
357
+ e && (l.some((c) => c.value === K.value) || M(e));
360
358
  });
361
- const j = S(
359
+ const W = S(
362
360
  () => O.schemas.map((l) => ({
363
361
  label: l.label || l.name,
364
362
  value: l
365
363
  }))
366
- ), oe = S(() => {
364
+ ), H = S(() => {
367
365
  var l;
368
- return (((l = F.value) == null ? void 0 : l.fields) || []).filter((e) => e.type !== Q.Numeric).map((e) => ({
366
+ return (((l = F.value) == null ? void 0 : l.fields) || []).filter((e) => e.type !== X.Numeric).map((e) => ({
369
367
  label: e.label || e.name,
370
368
  value: e
371
369
  }));
372
- }), Ve = S(() => {
370
+ }), re = S(() => {
373
371
  var l;
374
- return ((l = u.value) == null ? void 0 : l.type) !== Q.Timestamp ? [] : ml(r);
375
- }), xe = S(() => O.tiles.reduce((l, e, p) => {
376
- var k, E;
372
+ return ((l = u.value) == null ? void 0 : l.type) !== X.Timestamp ? [] : ml(r);
373
+ }), we = S(() => O.tiles.reduce((l, e, m) => {
374
+ var k, P;
377
375
  const c = e.widget.config.schemaNames ?? [], y = (e.widget.config.joinDatasources ?? []).flatMap(
378
- (me) => me.schemaNames ?? []
376
+ (de) => de.schemaNames ?? []
379
377
  );
380
378
  return [...c, ...y].includes(((k = F.value) == null ? void 0 : k.name) || "") && l.push({
381
- label: (E = e == null ? void 0 : e.widget.title) != null && E.trim() ? e.widget.title : `Widget ${p + 1}`,
379
+ label: (P = e == null ? void 0 : e.widget.title) != null && P.trim() ? e.widget.title : `Widget ${m + 1}`,
382
380
  value: e.id
383
381
  }), l;
384
- }, [])), Me = S(
382
+ }, [])), Fe = S(
385
383
  () => O.schemas.flatMap(
386
384
  (l) => (l.fields ?? []).map((e) => ({
387
385
  ...e,
@@ -392,38 +390,38 @@ const Fl = /* @__PURE__ */ he({
392
390
  }))
393
391
  )
394
392
  );
395
- function Be(l) {
393
+ function Ue(l) {
396
394
  var e;
397
- l.name !== ((e = F.value) == null ? void 0 : e.name) && (F.value = l, u.value = void 0, H.value = fe.Equal, V.value = !1, $.value = [], U.value = []);
395
+ l.name !== ((e = F.value) == null ? void 0 : e.name) && (F.value = l, u.value = void 0, K.value = ve.Equal, V.value = !1, $.value = [], N.value = []);
398
396
  }
399
- function De(l) {
400
- u.value = l, B.value = l.type === Q.Timestamp ? ke.DateTime : void 0, H.value = se(), V.value = !1, $.value = [], U.value = [];
397
+ function Me(l) {
398
+ u.value = l, D.value = l.type === X.Timestamp ? Ve.DateTime : void 0, K.value = ae(), V.value = !1, $.value = [], N.value = [];
401
399
  }
402
400
  function Se(l, e) {
403
401
  switch (l) {
404
- case Q.Timestamp:
405
- return e === ke.DateTime || e === ke.TimeOfDay ? fe.Between : fe.Equal;
406
- case Q.Bool:
407
- case Q.String:
408
- case Q.Numeric:
409
- return fe.Equal;
402
+ case X.Timestamp:
403
+ return e === Ve.DateTime || e === Ve.TimeOfDay ? ve.Between : ve.Equal;
404
+ case X.Bool:
405
+ case X.String:
406
+ case X.Numeric:
407
+ return ve.Equal;
410
408
  default:
411
409
  throw new Error(`Unsupported data type: ${l}`);
412
410
  }
413
411
  }
414
- function ze() {
412
+ function Be() {
415
413
  if (!F.value) {
416
- f.open({ message: r("report.section.filter.invalidSchema"), type: "error" });
414
+ v.open({ message: r("report.section.filter.invalidSchema"), type: "error" });
417
415
  return;
418
416
  }
419
417
  if (!u.value) {
420
- f.open({ message: r("report.section.filter.invalidDimension"), type: "error" });
418
+ v.open({ message: r("report.section.filter.invalidDimension"), type: "error" });
421
419
  return;
422
420
  }
423
- const l = D.value.filter((c) => c ? !j.value.some((k) => k.value.name === c.schemaName) : !0);
421
+ const l = R.value.filter((c) => c ? !W.value.some((k) => k.value.name === c.schemaName) : !0);
424
422
  if (l.length > 0) {
425
423
  const c = l.filter((k) => !!k).map((k) => k.schemaName), y = l.some((k) => !k) ? `, ${r("report.section.filter.unknownFilters")}` : "";
426
- f.open({
424
+ v.open({
427
425
  message: r("report.section.filter.invalidFiltersSchemaNotFound", {
428
426
  schemas: c.join(", "),
429
427
  unknownFiltersSuffix: y
@@ -432,16 +430,16 @@ const Fl = /* @__PURE__ */ he({
432
430
  });
433
431
  return;
434
432
  }
435
- if (!q())
433
+ if (!E())
436
434
  return;
437
- const e = V.value && !K.value ? $.value.map((c) => ({
435
+ const e = V.value && !Q.value ? $.value.map((c) => ({
438
436
  label: c.label.trim(),
439
- operator: c.operator ?? se(),
440
- values: N(
437
+ operator: c.operator ?? ae(),
438
+ values: U(
441
439
  [...c.values],
442
- ve(c.operator)
440
+ pe(c.operator)
443
441
  )
444
- })) : void 0, p = V.value && K.value ? U.value.map((c) => ({
442
+ })) : void 0, m = V.value && Q.value ? N.value.map((c) => ({
445
443
  name: c.name.trim(),
446
444
  startTime: c.startTime,
447
445
  endTime: c.endTime
@@ -449,220 +447,220 @@ const Fl = /* @__PURE__ */ he({
449
447
  d.value = {
450
448
  schemaName: F.value.name,
451
449
  name: u.value.name,
452
- label: P.value,
450
+ label: J.value,
453
451
  operator: Se(
454
452
  u.value.type,
455
- u.value.type === Q.Timestamp ? B.value ?? ke.DateTime : null
453
+ u.value.type === X.Timestamp ? D.value ?? Ve.DateTime : null
456
454
  ),
457
- option: u.value.type === Q.Timestamp ? B.value : null,
455
+ option: u.value.type === X.Timestamp ? D.value : null,
458
456
  values: [],
459
- tileIds: [...Y.value],
460
- filters: ne(D.value),
461
- dataFormula: w.value ? J.value : void 0,
457
+ tileIds: [...Z.value],
458
+ filters: le(R.value),
459
+ dataFormula: w.value ? L.value : void 0,
462
460
  customOptions: e,
463
- customTimeRanges: p
461
+ customTimeRanges: m
464
462
  }, x.value = !1;
465
463
  }
466
- function g() {
464
+ function ze() {
467
465
  x.value = !1;
468
466
  }
469
- const Fe = S(() => {
467
+ const g = S(() => {
470
468
  var l;
471
469
  return [
472
470
  (l = F.value) == null ? void 0 : l.name,
473
- ...D.value.map((e) => e.schemaName)
471
+ ...R.value.map((e) => e.schemaName)
474
472
  ];
475
473
  });
476
- function de(l) {
477
- var k, E, me, ce;
478
- const e = O.tiles.find((A) => A.id === l.value), p = ((E = (k = e == null ? void 0 : e.widget) == null ? void 0 : k.config) == null ? void 0 : E.schemaNames) ?? [], c = (((ce = (me = e == null ? void 0 : e.widget) == null ? void 0 : me.config) == null ? void 0 : ce.joinDatasources) ?? []).flatMap(
479
- (A) => A.schemaNames ?? []
480
- ), y = [...p, ...c];
481
- return Fe.value.filter((A) => !!A).some((A) => !y.includes(A));
474
+ function _e(l) {
475
+ var k, P, de, me;
476
+ const e = O.tiles.find((j) => j.id === l.value), m = ((P = (k = e == null ? void 0 : e.widget) == null ? void 0 : k.config) == null ? void 0 : P.schemaNames) ?? [], c = (((me = (de = e == null ? void 0 : e.widget) == null ? void 0 : de.config) == null ? void 0 : me.joinDatasources) ?? []).flatMap(
477
+ (j) => j.schemaNames ?? []
478
+ ), y = [...m, ...c];
479
+ return g.value.filter((j) => !!j).some((j) => !y.includes(j));
482
480
  }
483
481
  return (l, e) => {
484
- const p = _("FmTextField"), c = _("FmSelect"), y = _("FmCheckbox"), k = _("FmTimePicker"), E = _("FmButton"), me = _("FmTextarea"), ce = _("FmLabel"), A = _("FmIcon"), nl = _("FmTooltip"), rl = _("FmForm"), il = _("FmDialog");
482
+ const m = _("FmTextField"), c = _("FmSelect"), y = _("FmCheckbox"), k = _("FmTimePicker"), P = _("FmButton"), de = _("FmTextarea"), me = _("FmLabel"), j = _("FmIcon"), nl = _("FmTooltip"), rl = _("FmForm"), il = _("FmDialog");
485
483
  return s(), T(il, {
486
484
  modelValue: x.value,
487
- "onUpdate:modelValue": e[11] || (e[11] = (Re) => x.value = Re),
485
+ "onUpdate:modelValue": e[11] || (e[11] = (De) => x.value = De),
488
486
  overlay: !0,
489
487
  "z-index": 10
490
488
  }, {
491
- "dialog-header": v(() => [
492
- He(X(o(r)("report.section.filter.globalFilter")), 1)
489
+ "dialog-header": p(() => [
490
+ Le(Y(o(r)("report.section.filter.globalFilter")), 1)
493
491
  ]),
494
- default: v(() => [
492
+ default: p(() => [
495
493
  a(rl, {
496
494
  ref: "form",
497
495
  class: "flex flex-col gap-2 w-[490px]"
498
496
  }, {
499
- default: v(() => {
500
- var Re;
497
+ default: p(() => {
498
+ var De;
501
499
  return [
502
- a(p, {
503
- modelValue: P.value,
504
- "onUpdate:modelValue": e[0] || (e[0] = (b) => P.value = b),
500
+ a(m, {
501
+ modelValue: J.value,
502
+ "onUpdate:modelValue": e[0] || (e[0] = (b) => J.value = b),
505
503
  placeholder: o(r)("report.section.filter.displayName"),
506
504
  label: o(r)("report.section.filter.displayName"),
507
505
  class: "mb-2"
508
506
  }, null, 8, ["modelValue", "placeholder", "label"]),
509
- a(Je, {
507
+ a(Pe, {
510
508
  "model-value": F.value,
511
- items: j.value,
509
+ items: W.value,
512
510
  placeholder: o(r)("report.section.schema.title"),
513
511
  label: o(r)("report.section.schema.title"),
514
- "onUpdate:modelValue": e[1] || (e[1] = (b) => Be(b))
512
+ "onUpdate:modelValue": e[1] || (e[1] = (b) => Ue(b))
515
513
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
516
- a(Je, {
514
+ a(Pe, {
517
515
  "model-value": u.value,
518
- items: oe.value,
516
+ items: H.value,
519
517
  placeholder: o(r)("report.section.dimension.title"),
520
518
  label: o(r)("report.section.dimension.title"),
521
- "onUpdate:modelValue": e[2] || (e[2] = (b) => De(b))
519
+ "onUpdate:modelValue": e[2] || (e[2] = (b) => Me(b))
522
520
  }, null, 8, ["model-value", "items", "placeholder", "label"]),
523
- ((Re = u.value) == null ? void 0 : Re.type) === o(Q).Timestamp ? (s(), T(c, {
521
+ ((De = u.value) == null ? void 0 : De.type) === o(X).Timestamp ? (s(), T(c, {
524
522
  key: 0,
525
- modelValue: B.value,
526
- "onUpdate:modelValue": e[3] || (e[3] = (b) => B.value = b),
527
- items: Ve.value,
523
+ modelValue: D.value,
524
+ "onUpdate:modelValue": e[3] || (e[3] = (b) => D.value = b),
525
+ items: re.value,
528
526
  placeholder: o(r)("report.section.filter.timeFormatter"),
529
527
  label: o(r)("report.section.filter.timeFormatter")
530
- }, null, 8, ["modelValue", "items", "placeholder", "label"])) : G("", !0),
531
- Z.value ? (s(), T(y, {
528
+ }, null, 8, ["modelValue", "items", "placeholder", "label"])) : A("", !0),
529
+ te.value ? (s(), T(y, {
532
530
  key: 1,
533
531
  modelValue: V.value,
534
532
  "onUpdate:modelValue": e[4] || (e[4] = (b) => V.value = b),
535
533
  label: o(r)("report.section.filter.customOptions"),
536
534
  value: !0
537
- }, null, 8, ["modelValue", "label"])) : G("", !0),
538
- Z.value && V.value ? (s(), C("div", Cl, [
539
- K.value ? (s(!0), C(le, { key: 0 }, pe(U.value, (b, re) => (s(), C("div", {
540
- key: `custom-time-range-${re}`,
535
+ }, null, 8, ["modelValue", "label"])) : A("", !0),
536
+ te.value && V.value ? (s(), C("div", kl, [
537
+ Q.value ? (s(!0), C(ee, { key: 0 }, ce(N.value, (b, ie) => (s(), C("div", {
538
+ key: `custom-time-range-${ie}`,
541
539
  class: "flex flex-col gap-2"
542
540
  }, [
543
- h("div", Tl, [
544
- a(p, {
541
+ h("div", Cl, [
542
+ a(m, {
545
543
  modelValue: b.name,
546
- "onUpdate:modelValue": (ae) => b.name = ae,
544
+ "onUpdate:modelValue": (oe) => b.name = oe,
547
545
  label: o(r)("report.section.filter.label")
548
546
  }, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
549
547
  a(k, {
550
- "model-value": te(b.startTime),
548
+ "model-value": f(b.startTime),
551
549
  label: o(r)("report.date.startingTime"),
552
- "onUpdate:modelValue": (ae) => t(re, "startTime", ae)
550
+ "onUpdate:modelValue": (oe) => i(ie, "startTime", oe)
553
551
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
554
552
  a(k, {
555
- "model-value": te(b.endTime),
553
+ "model-value": f(b.endTime),
556
554
  label: o(r)("report.date.endingTime"),
557
- "onUpdate:modelValue": (ae) => t(re, "endTime", ae)
555
+ "onUpdate:modelValue": (oe) => i(ie, "endTime", oe)
558
556
  }, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
559
- U.value.length > 1 ? (s(), C("div", Sl, [
560
- a(E, {
557
+ N.value.length > 1 ? (s(), C("div", Tl, [
558
+ a(P, {
561
559
  icon: "delete",
562
560
  variant: "tertiary",
563
- onClick: (ae) => i(re)
561
+ onClick: (oe) => We(ie)
564
562
  }, null, 8, ["onClick"])
565
- ])) : G("", !0)
563
+ ])) : A("", !0)
566
564
  ])
567
- ]))), 128)) : (s(), C(le, { key: 1 }, [
568
- h("p", Ol, X(o(r)("report.section.filter.operator")), 1),
569
- ie.value.length > 0 ? (s(), T(Je, {
565
+ ]))), 128)) : (s(), C(ee, { key: 1 }, [
566
+ h("p", Sl, Y(o(r)("report.section.filter.operator")), 1),
567
+ ue.value.length > 0 ? (s(), T(Pe, {
570
568
  key: 0,
571
- "model-value": H.value,
572
- items: ie.value,
569
+ "model-value": K.value,
570
+ items: ue.value,
573
571
  placeholder: o(r)("report.section.filter.operator"),
574
- "onUpdate:modelValue": e[5] || (e[5] = (b) => W(b))
575
- }, null, 8, ["model-value", "items", "placeholder"])) : G("", !0),
576
- (s(!0), C(le, null, pe($.value, (b, re) => (s(), C("div", {
577
- key: `custom-option-${re}`,
572
+ "onUpdate:modelValue": e[5] || (e[5] = (b) => M(b))
573
+ }, null, 8, ["model-value", "items", "placeholder"])) : A("", !0),
574
+ (s(!0), C(ee, null, ce($.value, (b, ie) => (s(), C("div", {
575
+ key: `custom-option-${ie}`,
578
576
  class: "flex flex-col gap-2"
579
577
  }, [
580
578
  h("div", {
581
- class: Te([
579
+ class: ke([
582
580
  "grid grid-cols-1 gap-2 p-2 sm:items-end text-fm-color-typo-primary fm-typo-en-body-lg-600 border-neutral-300 rounded-md border",
583
581
  "sm:grid-cols-[1fr_1.6fr_auto]"
584
582
  ])
585
583
  }, [
586
- h("span", $l, X(o(r)("report.section.filter.label")), 1),
587
- a(p, {
584
+ h("span", Ol, Y(o(r)("report.section.filter.label")), 1),
585
+ a(m, {
588
586
  modelValue: b.label,
589
- "onUpdate:modelValue": (ae) => b.label = ae
587
+ "onUpdate:modelValue": (oe) => b.label = oe
590
588
  }, null, 8, ["modelValue", "onUpdate:modelValue"]),
591
589
  (s(), T(cl, {
592
- key: `custom-option-value-${re}-${b.operator ?? ""}-${B.value ?? ""}`,
590
+ key: `custom-option-value-${ie}-${b.operator ?? ""}-${D.value ?? ""}`,
593
591
  modelValue: b.values,
594
- "onUpdate:modelValue": (ae) => b.values = ae,
595
- config: ve(b.operator),
596
- option: B.value
592
+ "onUpdate:modelValue": (oe) => b.values = oe,
593
+ config: pe(b.operator),
594
+ option: D.value
597
595
  }, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
598
- $.value.length > 1 ? (s(), C("div", Nl, [
599
- a(E, {
596
+ $.value.length > 1 ? (s(), C("div", $l, [
597
+ a(P, {
600
598
  icon: "delete",
601
599
  variant: "tertiary",
602
- onClick: (ae) => Ue(re)
600
+ onClick: (oe) => Te(ie)
603
601
  }, null, 8, ["onClick"])
604
- ])) : G("", !0)
602
+ ])) : A("", !0)
605
603
  ])
606
604
  ]))), 128))
607
605
  ], 64)),
608
- a(E, {
606
+ a(P, {
609
607
  class: "w-full",
610
608
  variant: "primary",
611
609
  icon: "add",
612
610
  "icon-position": "prepend",
613
- onClick: e[6] || (e[6] = (b) => K.value ? We() : we())
611
+ onClick: e[6] || (e[6] = (b) => Q.value ? qe() : he())
614
612
  })
615
- ])) : G("", !0),
613
+ ])) : A("", !0),
616
614
  a(y, {
617
615
  modelValue: w.value,
618
616
  "onUpdate:modelValue": e[7] || (e[7] = (b) => w.value = b),
619
617
  label: o(r)("report.section.filter.advance"),
620
618
  value: !0
621
619
  }, null, 8, ["modelValue", "label"]),
622
- w.value ? (s(), T(me, {
620
+ w.value ? (s(), T(de, {
623
621
  key: 3,
624
- modelValue: J.value,
625
- "onUpdate:modelValue": e[8] || (e[8] = (b) => J.value = b),
622
+ modelValue: L.value,
623
+ "onUpdate:modelValue": e[8] || (e[8] = (b) => L.value = b),
626
624
  placeholder: o(r)("report.section.filter.dataFormula")
627
- }, null, 8, ["modelValue", "placeholder"])) : G("", !0),
625
+ }, null, 8, ["modelValue", "placeholder"])) : A("", !0),
628
626
  a(pl, {
629
- modelValue: D.value,
630
- "onUpdate:modelValue": e[9] || (e[9] = (b) => D.value = b),
631
- options: Me.value
627
+ modelValue: R.value,
628
+ "onUpdate:modelValue": e[9] || (e[9] = (b) => R.value = b),
629
+ options: Fe.value
632
630
  }, null, 8, ["modelValue", "options"]),
633
- a(ce, { class: "mt-2 fm-typo-en-body-lg-600" }, {
634
- default: v(() => [
635
- He(X(o(r)("report.section.filter.applyWidget")), 1)
631
+ a(me, { class: "mt-2 fm-typo-en-body-lg-600" }, {
632
+ default: p(() => [
633
+ Le(Y(o(r)("report.section.filter.applyWidget")), 1)
636
634
  ]),
637
635
  _: 1
638
636
  }),
639
- M.tiles.length > 0 ? (s(), C("div", Ul, [
640
- (s(!0), C(le, null, pe(xe.value, (b) => (s(), C("div", {
637
+ B.tiles.length > 0 ? (s(), C("div", Nl, [
638
+ (s(!0), C(ee, null, ce(we.value, (b) => (s(), C("div", {
641
639
  key: b.value,
642
640
  class: "flex items-center"
643
641
  }, [
644
642
  a(y, {
645
- modelValue: Y.value,
646
- "onUpdate:modelValue": e[10] || (e[10] = (re) => Y.value = re),
643
+ modelValue: Z.value,
644
+ "onUpdate:modelValue": e[10] || (e[10] = (ie) => Z.value = ie),
647
645
  label: b.label,
648
646
  value: b.value
649
647
  }, null, 8, ["modelValue", "label", "value"]),
650
- de(b) ? (s(), T(nl, {
648
+ _e(b) ? (s(), T(nl, {
651
649
  key: 0,
652
650
  content: o(r)("report.section.filter.missingFilterSchema"),
653
651
  "z-index": 99,
654
652
  class: "ml-2"
655
653
  }, {
656
- default: v(() => [
657
- a(A, {
654
+ default: p(() => [
655
+ a(j, {
658
656
  name: "warning",
659
657
  class: "text-fm-color-system-error-300"
660
658
  })
661
659
  ]),
662
660
  _: 1
663
- }, 8, ["content"])) : G("", !0)
661
+ }, 8, ["content"])) : A("", !0)
664
662
  ]))), 128))
665
- ])) : (s(), T(ce, {
663
+ ])) : (s(), T(me, {
666
664
  key: 5,
667
665
  class: "fm-typo-en-body-lg-400",
668
666
  label: o(r)("report.section.filter.noWidget")
@@ -672,25 +670,25 @@ const Fl = /* @__PURE__ */ he({
672
670
  _: 1
673
671
  }, 512)
674
672
  ]),
675
- "dialog-footer": v(() => [
673
+ "dialog-footer": p(() => [
676
674
  e[12] || (e[12] = h("div", { class: "grow" }, null, -1)),
677
- a(E, {
675
+ a(P, {
678
676
  label: o(r)("report.common.cancel"),
679
677
  variant: "tertiary",
680
- onClick: g
678
+ onClick: ze
681
679
  }, null, 8, ["label"]),
682
- a(E, {
680
+ a(P, {
683
681
  label: o(r)("report.common.confirm"),
684
- onClick: ze
682
+ onClick: Be
685
683
  }, null, 8, ["label"])
686
684
  ]),
687
685
  _: 1
688
686
  }, 8, ["modelValue"]);
689
687
  };
690
688
  }
691
- }), Bl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Dl = { class: "flex items-center gap-8" }, Rl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Il = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, ql = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, Wl = { class: "flex flex-col gap-24" }, zl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, Xe = /* @__PURE__ */ he({
689
+ }), Ml = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Bl = { class: "flex items-center gap-8" }, Dl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Rl = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, Il = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, ql = { class: "flex flex-col gap-24" }, Wl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, Xe = /* @__PURE__ */ ye({
692
690
  __name: "ReportEditorTab",
693
- props: /* @__PURE__ */ be({
691
+ props: /* @__PURE__ */ ge({
694
692
  hideConfiguration: {
695
693
  type: Boolean,
696
694
  default: !1
@@ -699,41 +697,41 @@ const Fl = /* @__PURE__ */ he({
699
697
  modelValue: { required: !0 },
700
698
  modelModifiers: {}
701
699
  }),
702
- emits: /* @__PURE__ */ be(["hideConfiguration"], ["update:modelValue"]),
703
- setup(M, { emit: r }) {
704
- const n = ye(M, "modelValue"), { breakpoints: d } = qe(), x = M, f = r, O = ll(), P = tl(), F = R(), {
700
+ emits: /* @__PURE__ */ ge(["hideConfiguration"], ["update:modelValue"]),
701
+ setup(B, { emit: r }) {
702
+ const n = be(B, "modelValue"), { breakpoints: d } = Ie(), x = B, v = r, O = ll(), J = tl(), F = I(), {
705
703
  currentSelectWidgetType: u,
706
- categories: B,
707
- editingTile: Y,
708
- editingTileIndex: D,
709
- editingGlobalFilter: J,
704
+ categories: D,
705
+ editingTile: Z,
706
+ editingTileIndex: R,
707
+ editingGlobalFilter: L,
710
708
  editingGlobalFilterIndex: w
711
- } = Ie(el()), { schemas: V } = Ie(bl()), { globalFilters: $ } = Ie(_l()), { promptMessage: U } = al(), H = R(!1), ne = R(!1), { t: m, te, locale: _e } = Ne(), Z = R(void 0), K = S(() => {
709
+ } = Re(el()), { schemas: V } = Re(yl()), { globalFilters: $ } = Re(Ke()), { getGlobalFilterLabel: N } = Ke(), { promptMessage: K } = al(), le = I(!1), z = I(!1), { t: f, te: se, locale: te } = Ne(), Q = I(void 0), ue = S(() => {
712
710
  const i = n.value.tiles.flatMap((t) => {
713
- var j;
714
- const z = t.widget.config.schemaNames ?? [], q = ((j = t.widget.config.joinDatasources) == null ? void 0 : j.flatMap((oe) => oe.schemaNames ?? [])) ?? [];
715
- return [...z, ...q];
711
+ var H;
712
+ const E = t.widget.config.schemaNames ?? [], W = ((H = t.widget.config.joinDatasources) == null ? void 0 : H.flatMap((re) => re.schemaNames ?? [])) ?? [];
713
+ return [...E, ...W];
716
714
  });
717
- return [...new Set(i)].reduce((t, z) => {
718
- const q = V.value.find((j) => j.name === z);
719
- return q && t.push(q), t;
715
+ return [...new Set(i)].reduce((t, E) => {
716
+ const W = V.value.find((H) => H.name === E);
717
+ return W && t.push(W), t;
720
718
  }, []);
721
719
  });
722
- function ie(i) {
720
+ function ae(i) {
723
721
  if (!i) return "";
724
722
  const t = `report.widget.types.${i.toLowerCase()}`;
725
- return te(t) ? m(t) : $e(m, te, i, "other");
723
+ return se(t) ? f(t) : $e(f, se, i, "other");
726
724
  }
727
- ge(
725
+ fe(
728
726
  () => u.value,
729
727
  () => {
730
- u.value !== void 0 && (Z.value = vl(u.value), Y.value = Z.value, D.value = -1, O.push({
728
+ u.value !== void 0 && (Q.value = vl(u.value), Z.value = Q.value, R.value = -1, O.push({
731
729
  name: "tileEditor",
732
- query: P.query
730
+ query: J.query
733
731
  }));
734
732
  },
735
733
  { immediate: !0 }
736
- ), ge(
734
+ ), fe(
737
735
  () => n.value.tiles,
738
736
  (i) => {
739
737
  i.forEach((t) => {
@@ -742,15 +740,15 @@ const Fl = /* @__PURE__ */ he({
742
740
  },
743
741
  { immediate: !0, deep: !0 }
744
742
  );
745
- const se = [
743
+ const pe = [
746
744
  {
747
745
  label: "report.common.edit",
748
746
  selected: !1,
749
747
  variant: "tertiary",
750
748
  onClick: (i) => {
751
- D.value = i, Y.value = JSON.parse(JSON.stringify(n.value.tiles[i])), O.push({
749
+ R.value = i, Z.value = JSON.parse(JSON.stringify(n.value.tiles[i])), O.push({
752
750
  name: "tileEditor",
753
- query: P.query
751
+ query: J.query
754
752
  });
755
753
  }
756
754
  },
@@ -771,28 +769,28 @@ const Fl = /* @__PURE__ */ he({
771
769
  selected: !1,
772
770
  variant: "destructive",
773
771
  onClick: async (i) => {
774
- if (await U({
775
- title: m("report.editor.deleteWidget"),
776
- message: m("report.editor.deleteWidgetConfirm", {
772
+ if (await K({
773
+ title: f("report.editor.deleteWidget"),
774
+ message: f("report.editor.deleteWidgetConfirm", {
777
775
  title: n.value.tiles[i].widget.title
778
776
  })
779
777
  })) {
780
- const z = n.value.tiles[i].id;
781
- n.value.tiles.splice(i, 1), n.value.globalFilters && n.value.globalFilters.forEach((q) => {
782
- var j;
783
- q.tileIds = (j = q.tileIds) == null ? void 0 : j.filter((oe) => oe !== z);
778
+ const E = n.value.tiles[i].id;
779
+ n.value.tiles.splice(i, 1), n.value.globalFilters && n.value.globalFilters.forEach((W) => {
780
+ var H;
781
+ W.tileIds = (H = W.tileIds) == null ? void 0 : H.filter((re) => re !== E);
784
782
  });
785
783
  }
786
784
  }
787
785
  }
788
- ], ve = [
786
+ ], U = [
789
787
  {
790
788
  label: "report.common.edit",
791
789
  selected: !1,
792
790
  variant: "tertiary",
793
791
  onClick: (i) => {
794
792
  var t;
795
- w.value = i, J.value = JSON.parse(JSON.stringify((t = n.value.globalFilters) == null ? void 0 : t[i])), H.value = !0;
793
+ w.value = i, L.value = JSON.parse(JSON.stringify((t = n.value.globalFilters) == null ? void 0 : t[i])), le.value = !0;
796
794
  }
797
795
  },
798
796
  {
@@ -800,11 +798,11 @@ const Fl = /* @__PURE__ */ he({
800
798
  selected: !1,
801
799
  variant: "tertiary",
802
800
  onClick: (i) => {
803
- var q;
804
- const t = (q = n.value.globalFilters) == null ? void 0 : q[i];
801
+ var W;
802
+ const t = (W = n.value.globalFilters) == null ? void 0 : W[i];
805
803
  if (!t) return;
806
- const z = JSON.parse(JSON.stringify(t));
807
- n.value.globalFilters || (n.value.globalFilters = []), n.value.globalFilters.push(z);
804
+ const E = JSON.parse(JSON.stringify(t));
805
+ n.value.globalFilters || (n.value.globalFilters = []), n.value.globalFilters.push(E);
808
806
  }
809
807
  },
810
808
  {
@@ -812,242 +810,242 @@ const Fl = /* @__PURE__ */ he({
812
810
  selected: !1,
813
811
  variant: "destructive",
814
812
  onClick: async (i) => {
815
- var q, j;
816
- const t = (q = n.value.globalFilters) == null ? void 0 : q[i];
813
+ var W, H;
814
+ const t = (W = n.value.globalFilters) == null ? void 0 : W[i];
817
815
  if (!t) return;
818
- await U({
819
- title: m("report.editor.deleteWidget"),
820
- message: m("report.editor.deleteWidgetConfirm", {
821
- title: Le(t)
816
+ await K({
817
+ title: f("report.editor.deleteWidget"),
818
+ message: f("report.editor.deleteWidgetConfirm", {
819
+ title: N(t)
822
820
  })
823
- }) && ((j = n.value.globalFilters) == null || j.splice(i, 1));
821
+ }) && ((H = n.value.globalFilters) == null || H.splice(i, 1));
824
822
  }
825
823
  }
826
- ], N = S(() => B.value.map((i) => ({
827
- label: m(`report.category.${i.name}`),
824
+ ], q = S(() => D.value.map((i) => ({
825
+ label: f(`report.category.${i.name}`),
828
826
  value: i.id
829
- }))), { sessionUser: I } = wl(), L = S({
827
+ }))), { sessionUser: G } = _l(), ne = S({
830
828
  get: () => n.value.queryVersion === "v2",
831
829
  set: (i) => {
832
830
  n.value.queryVersion = i ? "v2" : "v1";
833
831
  }
834
- }), ue = [
835
- { label: m("report.common.noBatch"), value: "none" },
836
- { label: m("report.common.days"), value: "days" },
837
- { label: m("report.common.locations"), value: "locations" }
838
- ], ee = S({
832
+ }), Ce = [
833
+ { label: f("report.common.noBatch"), value: "none" },
834
+ { label: f("report.common.days"), value: "days" },
835
+ { label: f("report.common.locations"), value: "locations" }
836
+ ], M = S({
839
837
  get: () => {
840
838
  var i, t;
841
839
  return (i = n.value.batch) != null && i.days ? "days" : (t = n.value.batch) != null && t.locations ? "locations" : "none";
842
840
  },
843
841
  set: (i) => {
844
- var t, z;
845
- i === "none" ? n.value.batch = void 0 : i === "days" ? n.value.batch = { days: ((t = n.value.batch) == null ? void 0 : t.days) || 1 } : i === "locations" && (n.value.batch = { locations: ((z = n.value.batch) == null ? void 0 : z.locations) || 10 });
842
+ var t, E;
843
+ i === "none" ? n.value.batch = void 0 : i === "days" ? n.value.batch = { days: ((t = n.value.batch) == null ? void 0 : t.days) || 1 } : i === "locations" && (n.value.batch = { locations: ((E = n.value.batch) == null ? void 0 : E.locations) || 10 });
846
844
  }
847
- }), W = S({
845
+ }), he = S({
848
846
  get: () => {
849
847
  var i, t;
850
- if (ee.value === "days") return ((i = n.value.batch) == null ? void 0 : i.days) ?? 1;
851
- if (ee.value === "locations") return ((t = n.value.batch) == null ? void 0 : t.locations) ?? 1;
848
+ if (M.value === "days") return ((i = n.value.batch) == null ? void 0 : i.days) ?? 1;
849
+ if (M.value === "locations") return ((t = n.value.batch) == null ? void 0 : t.locations) ?? 1;
852
850
  },
853
851
  set: (i) => {
854
- i && (ee.value === "days" ? n.value.batch = { days: i } : ee.value === "locations" && (n.value.batch = { locations: i }));
852
+ i && (M.value === "days" ? n.value.batch = { days: i } : M.value === "locations" && (n.value.batch = { locations: i }));
855
853
  }
856
- }), we = S({
857
- get: () => $e(m, te, n.value.name, "other"),
854
+ }), Te = S({
855
+ get: () => $e(f, se, n.value.name, "other"),
858
856
  set: (i) => {
859
857
  n.value.name = i;
860
858
  }
861
859
  });
862
- function Ue(i) {
860
+ function qe(i) {
863
861
  var t;
864
862
  return !((t = i.tileIds) != null && t.length);
865
863
  }
866
864
  function We(i) {
867
- return !K.value.find((t) => t.name === i.schemaName);
865
+ return !ue.value.find((t) => t.name === i.schemaName);
868
866
  }
869
- return ge(
867
+ return fe(
870
868
  () => n.value.globalFilters,
871
869
  (i) => {
872
870
  $.value = JSON.parse(JSON.stringify(i || []));
873
871
  },
874
872
  { deep: !0, immediate: !0 }
875
873
  ), (i, t) => {
876
- const z = _("FmTextField"), q = _("FmSelect"), j = _("FmSwitch"), oe = _("FmButton"), Ve = _("FmIcon"), xe = _("FmTooltip"), Me = _("FmMenuItem"), Be = _("FmMenu"), De = _("FmListItem"), Se = _("FmList"), ze = _("FmForm");
877
- return s(), T(sl(o(d).lg || o(d).md ? xl : kl), {
874
+ const E = _("FmTextField"), W = _("FmSelect"), H = _("FmSwitch"), re = _("FmButton"), we = _("FmIcon"), Fe = _("FmTooltip"), Ue = _("FmMenuItem"), Me = _("FmMenu"), Se = _("FmListItem"), Be = _("FmList"), ze = _("FmForm");
875
+ return s(), T(sl(o(d).lg || o(d).md ? Vl : xl), {
878
876
  "model-value": x.hideConfiguration,
879
- "onUpdate:modelValue": t[12] || (t[12] = (g) => f("hideConfiguration", g))
877
+ "onUpdate:modelValue": t[12] || (t[12] = (g) => v("hideConfiguration", g))
880
878
  }, {
881
- default: v(() => [
882
- a(Ml, {
883
- "is-open": H.value,
884
- "onUpdate:isOpen": t[0] || (t[0] = (g) => H.value = g),
885
- "global-filter": o(J),
879
+ default: p(() => [
880
+ a(Ul, {
881
+ "is-open": le.value,
882
+ "onUpdate:isOpen": t[0] || (t[0] = (g) => le.value = g),
883
+ "global-filter": o(L),
886
884
  tiles: n.value.tiles,
887
- schemas: K.value,
885
+ schemas: ue.value,
888
886
  "onUpdate:globalFilter": t[1] || (t[1] = (g) => {
889
887
  g && (n.value.globalFilters || (n.value.globalFilters = []), typeof o(w) == "number" && o(w) >= 0 ? n.value.globalFilters[o(w)] = g : n.value.globalFilters.push(g));
890
888
  })
891
889
  }, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
892
- a(Fl, {
890
+ a(wl, {
893
891
  modelValue: o(u),
894
892
  "onUpdate:modelValue": t[2] || (t[2] = (g) => Ze(u) ? u.value = g : null),
895
- "is-open": ne.value,
896
- "onUpdate:isOpen": t[3] || (t[3] = (g) => ne.value = g)
893
+ "is-open": z.value,
894
+ "onUpdate:isOpen": t[3] || (t[3] = (g) => z.value = g)
897
895
  }, null, 8, ["modelValue", "is-open"]),
898
896
  a(ze, {
899
897
  ref_key: "form",
900
898
  ref: F,
901
899
  class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
902
900
  }, {
903
- default: v(() => [
904
- a(Ge, { class: "border-solid" }, {
905
- header: v(() => [
906
- h("p", null, X(o(m)("report.editor.reportInfo")), 1),
901
+ default: p(() => [
902
+ a(Ae, { class: "border-solid" }, {
903
+ header: p(() => [
904
+ h("p", null, Y(o(f)("report.editor.reportInfo")), 1),
907
905
  t[13] || (t[13] = h("div", { class: "grow" }, null, -1))
908
906
  ]),
909
- content: v(() => [
910
- h("div", Bl, [
911
- a(z, {
912
- modelValue: we.value,
913
- "onUpdate:modelValue": t[4] || (t[4] = (g) => we.value = g),
914
- label: o(m)("report.common.name"),
915
- placeholder: o(m)("report.common.name")
907
+ content: p(() => [
908
+ h("div", Ml, [
909
+ a(E, {
910
+ modelValue: Te.value,
911
+ "onUpdate:modelValue": t[4] || (t[4] = (g) => Te.value = g),
912
+ label: o(f)("report.common.name"),
913
+ placeholder: o(f)("report.common.name")
916
914
  }, null, 8, ["modelValue", "label", "placeholder"]),
917
- (s(), T(q, {
918
- key: `category-${o(_e)}`,
915
+ (s(), T(W, {
916
+ key: `category-${o(te)}`,
919
917
  modelValue: n.value.category,
920
918
  "onUpdate:modelValue": t[5] || (t[5] = (g) => n.value.category = g),
921
- label: o(m)("report.common.category"),
922
- items: N.value
919
+ label: o(f)("report.common.category"),
920
+ items: q.value
923
921
  }, null, 8, ["modelValue", "label", "items"])),
924
- a(z, {
922
+ a(E, {
925
923
  modelValue: n.value.description,
926
924
  "onUpdate:modelValue": t[6] || (t[6] = (g) => n.value.description = g),
927
- label: o(m)("report.common.description"),
928
- placeholder: o(m)("report.common.description")
925
+ label: o(f)("report.common.description"),
926
+ placeholder: o(f)("report.common.description")
929
927
  }, null, 8, ["modelValue", "label", "placeholder"]),
930
- h("div", Dl, [
928
+ h("div", Bl, [
931
929
  t[14] || (t[14] = h("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "V2", -1)),
932
- a(j, {
933
- modelValue: L.value,
934
- "onUpdate:modelValue": t[7] || (t[7] = (g) => L.value = g)
930
+ a(H, {
931
+ modelValue: ne.value,
932
+ "onUpdate:modelValue": t[7] || (t[7] = (g) => ne.value = g)
935
933
  }, null, 8, ["modelValue"])
936
934
  ]),
937
- a(q, {
938
- modelValue: ee.value,
939
- "onUpdate:modelValue": t[8] || (t[8] = (g) => ee.value = g),
940
- label: o(m)("report.common.batch"),
941
- items: ue
935
+ a(W, {
936
+ modelValue: M.value,
937
+ "onUpdate:modelValue": t[8] || (t[8] = (g) => M.value = g),
938
+ label: o(f)("report.common.batch"),
939
+ items: Ce
942
940
  }, null, 8, ["modelValue", "label"]),
943
- ee.value !== "none" ? (s(), T(z, {
941
+ M.value !== "none" ? (s(), T(E, {
944
942
  key: 0,
945
- modelValue: W.value,
946
- "onUpdate:modelValue": t[9] || (t[9] = (g) => W.value = g),
943
+ modelValue: he.value,
944
+ "onUpdate:modelValue": t[9] || (t[9] = (g) => he.value = g),
947
945
  modelModifiers: { number: !0 },
948
- label: ee.value === "days" ? o(m)("report.common.days") : o(m)("report.common.locations"),
946
+ label: M.value === "days" ? o(f)("report.common.days") : o(f)("report.common.locations"),
949
947
  type: "number"
950
- }, null, 8, ["modelValue", "label"])) : G("", !0)
948
+ }, null, 8, ["modelValue", "label"])) : A("", !0)
951
949
  ])
952
950
  ]),
953
951
  _: 1
954
952
  }),
955
- a(Ge, {
953
+ a(Ae, {
956
954
  class: "border-solid",
957
955
  "is-open": !1
958
956
  }, {
959
- header: v(() => [
960
- h("p", null, X(o(m)("report.section.filter.globalFilter")), 1),
957
+ header: p(() => [
958
+ h("p", null, Y(o(f)("report.section.filter.globalFilter")), 1),
961
959
  t[15] || (t[15] = h("div", { class: "grow" }, null, -1))
962
960
  ]),
963
- content: v(() => [
964
- h("div", Rl, [
965
- a(oe, {
966
- label: o(m)("report.section.filter.addGlobalFilter"),
961
+ content: p(() => [
962
+ h("div", Dl, [
963
+ a(re, {
964
+ label: o(f)("report.section.filter.addGlobalFilter"),
967
965
  variant: "secondary",
968
966
  icon: "add",
969
967
  "icon-position": "prepend",
970
- "border-color": o(Ce).ColorPrimary,
971
- "text-color": o(Ce).ColorPrimary,
968
+ "border-color": o(xe).ColorPrimary,
969
+ "text-color": o(xe).ColorPrimary,
972
970
  onClick: t[10] || (t[10] = () => {
973
- w.value = null, J.value = null, H.value = !0;
971
+ w.value = null, L.value = null, le.value = !0;
974
972
  })
975
973
  }, null, 8, ["label", "border-color", "text-color"]),
976
- a(Se, null, {
977
- default: v(() => [
978
- a(o(Ke), {
974
+ a(Be, null, {
975
+ default: p(() => [
976
+ a(o(Ge), {
979
977
  list: n.value.globalFilters,
980
978
  "item-key": "`${element.schemaName}-${element.name}`",
981
979
  class: "flex flex-col gap-2 cursor-grab",
982
980
  handle: ".handle"
983
981
  }, {
984
- item: v(({ element: g, index: Fe }) => [
985
- a(De, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
986
- default: v(() => [
987
- a(Ve, {
982
+ item: p(({ element: g, index: _e }) => [
983
+ a(Se, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
984
+ default: p(() => [
985
+ a(we, {
988
986
  name: "drag_handle",
989
987
  class: "handle"
990
988
  }),
991
- h("div", Il, [
992
- a(xe, {
989
+ h("div", Rl, [
990
+ a(Fe, {
993
991
  "z-index": 99,
994
- content: o(Le)(g),
992
+ content: o(N)(g),
995
993
  class: "handle"
996
994
  }, {
997
- default: v(() => [
998
- h("p", ql, X(o(Le)(g)), 1)
995
+ default: p(() => [
996
+ h("p", Il, Y(o(N)(g)), 1)
999
997
  ]),
1000
998
  _: 2
1001
999
  }, 1032, ["content"]),
1002
- We(g) ? (s(), T(xe, {
1000
+ We(g) ? (s(), T(Fe, {
1003
1001
  key: 0,
1004
- content: o(m)("report.section.filter.missingSchema"),
1002
+ content: o(f)("report.section.filter.missingSchema"),
1005
1003
  "z-index": 99
1006
1004
  }, {
1007
- default: v(() => [
1008
- a(Ve, {
1005
+ default: p(() => [
1006
+ a(we, {
1009
1007
  name: "warning",
1010
1008
  class: "text-fm-color-system-error-300"
1011
1009
  })
1012
1010
  ]),
1013
1011
  _: 1
1014
- }, 8, ["content"])) : Ue(g) ? (s(), T(xe, {
1012
+ }, 8, ["content"])) : qe(g) ? (s(), T(Fe, {
1015
1013
  key: 1,
1016
- content: o(m)("report.section.filter.missingTileIds"),
1014
+ content: o(f)("report.section.filter.missingTileIds"),
1017
1015
  "z-index": 99
1018
1016
  }, {
1019
- default: v(() => [
1020
- a(Ve, {
1017
+ default: p(() => [
1018
+ a(we, {
1021
1019
  name: "warning",
1022
1020
  class: "text-fm-color-system-warning-300"
1023
1021
  })
1024
1022
  ]),
1025
1023
  _: 1
1026
- }, 8, ["content"])) : G("", !0)
1024
+ }, 8, ["content"])) : A("", !0)
1027
1025
  ]),
1028
1026
  t[16] || (t[16] = h("div", { class: "grow" }, null, -1)),
1029
- a(Be, {
1027
+ a(Me, {
1030
1028
  trigger: "click",
1031
1029
  shift: !0,
1032
1030
  "stop-click-propagation": !0
1033
1031
  }, {
1034
- "menu-button": v(() => [
1035
- a(oe, {
1032
+ "menu-button": p(() => [
1033
+ a(re, {
1036
1034
  "append-icon": "more_vert",
1037
1035
  variant: "tertiary"
1038
1036
  })
1039
1037
  ]),
1040
- default: v(() => [
1041
- (s(), C(le, null, pe(ve, (de, l) => a(Me, {
1042
- key: l,
1043
- onClick: (e) => de.onClick(Fe)
1038
+ default: p(() => [
1039
+ (s(), C(ee, null, ce(U, (l, e) => a(Ue, {
1040
+ key: e,
1041
+ onClick: (m) => l.onClick(_e)
1044
1042
  }, {
1045
- label: v(() => [
1043
+ label: p(() => [
1046
1044
  h("p", {
1047
- class: Te(
1048
- de.variant === "destructive" ? " text-fm-color-system-error-300" : ""
1045
+ class: ke(
1046
+ l.variant === "destructive" ? " text-fm-color-system-error-300" : ""
1049
1047
  )
1050
- }, X(o(m)(de.label)), 3)
1048
+ }, Y(o(f)(l.label)), 3)
1051
1049
  ]),
1052
1050
  _: 2
1053
1051
  }, 1032, ["onClick"])), 64))
@@ -1067,63 +1065,63 @@ const Fl = /* @__PURE__ */ he({
1067
1065
  ]),
1068
1066
  _: 1
1069
1067
  }),
1070
- h("div", Wl, [
1071
- a(oe, {
1072
- label: o(m)("report.editor.addWidget"),
1068
+ h("div", ql, [
1069
+ a(re, {
1070
+ label: o(f)("report.editor.addWidget"),
1073
1071
  variant: "secondary",
1074
1072
  icon: "add",
1075
1073
  "icon-position": "prepend",
1076
- "border-color": o(Ce).ColorPrimary,
1077
- "text-color": o(Ce).ColorPrimary,
1078
- onClick: t[11] || (t[11] = (g) => ne.value = !0)
1074
+ "border-color": o(xe).ColorPrimary,
1075
+ "text-color": o(xe).ColorPrimary,
1076
+ onClick: t[11] || (t[11] = (g) => z.value = !0)
1079
1077
  }, null, 8, ["label", "border-color", "text-color"]),
1080
- a(Se, null, {
1081
- default: v(() => [
1082
- a(o(Ke), {
1078
+ a(Be, null, {
1079
+ default: p(() => [
1080
+ a(o(Ge), {
1083
1081
  list: n.value.tiles,
1084
1082
  "item-key": "id",
1085
1083
  class: "flex flex-col gap-2 cursor-grab",
1086
1084
  handle: ".handle"
1087
1085
  }, {
1088
- item: v(({ element: g, index: Fe }) => [
1089
- a(De, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
1090
- default: v(() => [
1091
- a(Ve, {
1086
+ item: p(({ element: g, index: _e }) => [
1087
+ a(Se, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
1088
+ default: p(() => [
1089
+ a(we, {
1092
1090
  name: "drag_handle",
1093
1091
  class: "handle"
1094
1092
  }),
1095
- a(xe, {
1096
- content: g.widget.title ? ie(g.widget.title) : o(m)("report.editor.widget", { index: Fe + 1 }),
1093
+ a(Fe, {
1094
+ content: g.widget.title ? ae(g.widget.title) : o(f)("report.editor.widget", { index: _e + 1 }),
1097
1095
  class: "handle"
1098
1096
  }, {
1099
- default: v(() => [
1100
- h("p", zl, X(g.widget.title ? ie(g.widget.title) : o(m)("report.editor.widget", { index: Fe + 1 })), 1)
1097
+ default: p(() => [
1098
+ h("p", Wl, Y(g.widget.title ? ae(g.widget.title) : o(f)("report.editor.widget", { index: _e + 1 })), 1)
1101
1099
  ]),
1102
1100
  _: 2
1103
1101
  }, 1032, ["content"]),
1104
1102
  t[17] || (t[17] = h("div", { class: "grow" }, null, -1)),
1105
- a(Be, {
1103
+ a(Me, {
1106
1104
  trigger: "click",
1107
1105
  shift: !0,
1108
1106
  "stop-click-propagation": !0
1109
1107
  }, {
1110
- "menu-button": v(() => [
1111
- a(oe, {
1108
+ "menu-button": p(() => [
1109
+ a(re, {
1112
1110
  "append-icon": "more_vert",
1113
1111
  variant: "tertiary"
1114
1112
  })
1115
1113
  ]),
1116
- default: v(() => [
1117
- (s(), C(le, null, pe(se, (de, l) => a(Me, {
1118
- key: l,
1119
- onClick: (e) => de.onClick(Fe)
1114
+ default: p(() => [
1115
+ (s(), C(ee, null, ce(pe, (l, e) => a(Ue, {
1116
+ key: e,
1117
+ onClick: (m) => l.onClick(_e)
1120
1118
  }, {
1121
- label: v(() => [
1119
+ label: p(() => [
1122
1120
  h("p", {
1123
- class: Te(
1124
- de.variant === "destructive" ? " text-fm-color-system-error-300" : ""
1121
+ class: ke(
1122
+ l.variant === "destructive" ? " text-fm-color-system-error-300" : ""
1125
1123
  )
1126
- }, X(o(m)(de.label)), 3)
1124
+ }, Y(o(f)(l.label)), 3)
1127
1125
  ]),
1128
1126
  _: 2
1129
1127
  }, 1032, ["onClick"])), 64))
@@ -1148,25 +1146,25 @@ const Fl = /* @__PURE__ */ he({
1148
1146
  }, 8, ["model-value"]);
1149
1147
  };
1150
1148
  }
1151
- }), El = { class: "h-full w-full overflow-x-hidden" }, Pl = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, Jl = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Ll = {
1149
+ }), zl = { class: "h-full w-full overflow-x-hidden" }, El = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, Pl = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Jl = {
1152
1150
  key: 1,
1153
1151
  class: "w-full overflow-y-auto"
1154
- }, Hl = {
1152
+ }, Ll = {
1155
1153
  key: 0,
1156
1154
  class: "w-full grid grid-cols-12 gap-[24px] p-24"
1157
- }, jl = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, Al = { key: 2 }, Gl = {
1155
+ }, Hl = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, jl = { key: 2 }, Al = {
1158
1156
  key: 0,
1159
1157
  class: "grid grid-cols-12 gap-[16px]"
1160
- }, Kl = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, Ql = {
1158
+ }, Gl = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, Kl = {
1161
1159
  key: 3,
1162
1160
  class: "h-full w-full flex items-start justify-center bg-fm-color-neutral-white py-24",
1163
1161
  style: { backgroundColor: "#F6F8FC" }
1164
- }, Xl = {
1162
+ }, Ql = {
1165
1163
  key: 0,
1166
1164
  class: "w-full grid grid-cols-12 gap-[24px] p-24"
1167
- }, Yl = /* @__PURE__ */ he({
1165
+ }, Xl = /* @__PURE__ */ ye({
1168
1166
  __name: "ReportEditorViewport",
1169
- props: /* @__PURE__ */ be({
1167
+ props: /* @__PURE__ */ ge({
1170
1168
  hideConfiguration: { type: Boolean, required: !1, default: !1 },
1171
1169
  previewWidth: { type: Number, required: !0 },
1172
1170
  previewHeight: { type: Number, required: !0 },
@@ -1176,73 +1174,73 @@ const Fl = /* @__PURE__ */ he({
1176
1174
  } },
1177
1175
  modelModifiers: {}
1178
1176
  }),
1179
- emits: /* @__PURE__ */ be(["hideConfiguration"], ["update:modelValue"]),
1180
- setup(M, { emit: r }) {
1181
- const { breakpoints: n } = qe(), d = ye(M, "modelValue"), x = M, f = S(() => x.previewWidth > 0 && x.previewHeight > 0), O = S(() => n.value.sm || n.value.xs), P = r;
1177
+ emits: /* @__PURE__ */ ge(["hideConfiguration"], ["update:modelValue"]),
1178
+ setup(B, { emit: r }) {
1179
+ const { breakpoints: n } = Ie(), d = be(B, "modelValue"), x = B, v = S(() => x.previewWidth > 0 && x.previewHeight > 0), O = S(() => n.value.sm || n.value.xs), J = r;
1182
1180
  return (F, u) => {
1183
- const B = _("FmCircularProgress"), Y = _("FmButton"), D = _("FmMenuDivider"), J = _("FmCard");
1184
- return s(), C("div", El, [
1185
- d.value ? (s(), C(le, { key: 1 }, [
1186
- f.value ? G("", !0) : (s(), T(fl, {
1181
+ const D = _("FmCircularProgress"), Z = _("FmButton"), R = _("FmMenuDivider"), L = _("FmCard");
1182
+ return s(), C("div", zl, [
1183
+ d.value ? (s(), C(ee, { key: 1 }, [
1184
+ v.value ? A("", !0) : (s(), T(fl, {
1187
1185
  key: 0,
1188
1186
  "model-value": !x.hideConfiguration
1189
1187
  }, {
1190
- right: v(() => [
1191
- h("div", Pl, [
1188
+ right: p(() => [
1189
+ h("div", El, [
1192
1190
  d.value ? (s(), T(Xe, {
1193
1191
  key: 0,
1194
1192
  modelValue: d.value,
1195
1193
  "onUpdate:modelValue": u[0] || (u[0] = (w) => d.value = w),
1196
1194
  "hide-configuration": x.hideConfiguration,
1197
- onHideConfiguration: u[1] || (u[1] = (w) => P("hideConfiguration", w))
1198
- }, null, 8, ["modelValue", "hide-configuration"])) : G("", !0)
1195
+ onHideConfiguration: u[1] || (u[1] = (w) => J("hideConfiguration", w))
1196
+ }, null, 8, ["modelValue", "hide-configuration"])) : A("", !0)
1199
1197
  ])
1200
1198
  ]),
1201
- left: v(() => [
1202
- h("div", Jl, [
1203
- a(Y, {
1199
+ left: p(() => [
1200
+ h("div", Pl, [
1201
+ a(Z, {
1204
1202
  variant: "secondary",
1205
1203
  icon: "keyboard_double_arrow_right",
1206
- "border-color": o(Ce).ColorPrimary,
1207
- "text-color": o(Ce).ColorPrimary,
1204
+ "border-color": o(xe).ColorPrimary,
1205
+ "text-color": o(xe).ColorPrimary,
1208
1206
  class: "m-24 my-16",
1209
1207
  size: "md",
1210
- onClick: u[2] || (u[2] = (w) => P("hideConfiguration", !x.hideConfiguration))
1208
+ onClick: u[2] || (u[2] = (w) => J("hideConfiguration", !x.hideConfiguration))
1211
1209
  }, null, 8, ["border-color", "text-color"])
1212
1210
  ])
1213
1211
  ]),
1214
1212
  _: 1
1215
1213
  }, 8, ["model-value"])),
1216
- a(D, {
1214
+ a(R, {
1217
1215
  vertical: "",
1218
1216
  style: { margin: "0px" }
1219
1217
  }),
1220
- !O.value && !f.value ? (s(), C("div", Ll, [
1221
- d.value.tiles.length > 0 ? (s(), C("div", Hl, [
1222
- h("div", jl, [
1218
+ !O.value && !v.value ? (s(), C("div", Jl, [
1219
+ d.value.tiles.length > 0 ? (s(), C("div", Ll, [
1220
+ h("div", Hl, [
1223
1221
  a(Qe)
1224
1222
  ]),
1225
- (s(!0), C(le, null, pe(d.value.tiles, (w, V) => (s(), T(Ee, {
1223
+ (s(!0), C(ee, null, ce(d.value.tiles, (w, V) => (s(), T(Ee, {
1226
1224
  key: `${o(Oe)()}_${V}`,
1227
1225
  "model-value": w,
1228
1226
  index: V,
1229
1227
  "hide-export": !0
1230
1228
  }, null, 8, ["model-value", "index"]))), 128))
1231
- ])) : (s(), T(Pe, { key: 1 }))
1232
- ])) : O.value && !f.value ? (s(), C("div", Al, [
1233
- a(J, { class: "px-5 pb-28" }, {
1234
- default: v(() => [
1235
- d.value.tiles.length > 0 ? (s(), C("div", Gl, [
1236
- h("div", Kl, [
1229
+ ])) : (s(), T(Je, { key: 1 }))
1230
+ ])) : O.value && !v.value ? (s(), C("div", jl, [
1231
+ a(L, { class: "px-5 pb-28" }, {
1232
+ default: p(() => [
1233
+ d.value.tiles.length > 0 ? (s(), C("div", Al, [
1234
+ h("div", Gl, [
1237
1235
  a(Qe)
1238
1236
  ]),
1239
- (s(!0), C(le, null, pe(d.value.tiles, (w, V) => (s(), T(Ee, {
1237
+ (s(!0), C(ee, null, ce(d.value.tiles, (w, V) => (s(), T(Ee, {
1240
1238
  key: `${o(Oe)()}_${V}`,
1241
1239
  "model-value": w,
1242
1240
  index: V,
1243
1241
  "hide-export": !0
1244
1242
  }, null, 8, ["model-value", "index"]))), 128))
1245
- ])) : (s(), T(Pe, { key: 1 }))
1243
+ ])) : (s(), T(Je, { key: 1 }))
1246
1244
  ]),
1247
1245
  _: 1
1248
1246
  }),
@@ -1252,67 +1250,67 @@ const Fl = /* @__PURE__ */ he({
1252
1250
  "onUpdate:modelValue": u[3] || (u[3] = (w) => d.value = w),
1253
1251
  "hide-configuration": x.hideConfiguration,
1254
1252
  onHideConfiguration: u[4] || (u[4] = (w) => {
1255
- P("hideConfiguration", w);
1253
+ J("hideConfiguration", w);
1256
1254
  })
1257
- }, null, 8, ["modelValue", "hide-configuration"])) : G("", !0)
1258
- ])) : (s(), C("div", Ql, [
1255
+ }, null, 8, ["modelValue", "hide-configuration"])) : A("", !0)
1256
+ ])) : (s(), C("div", Kl, [
1259
1257
  h("div", {
1260
- style: je({
1258
+ style: He({
1261
1259
  transformOrigin: "top center",
1262
1260
  transform: `scale(${x.previewScale})`
1263
1261
  })
1264
1262
  }, [
1265
1263
  h("div", {
1266
1264
  class: "overflow-y-auto bg-white rounded-lg",
1267
- style: je({
1265
+ style: He({
1268
1266
  width: x.previewWidth + "px",
1269
1267
  height: x.previewHeight + "px"
1270
1268
  })
1271
1269
  }, [
1272
- d.value.tiles.length > 0 ? (s(), C("div", Xl, [
1273
- (s(!0), C(le, null, pe(d.value.tiles, (w, V) => (s(), T(Ee, {
1270
+ d.value.tiles.length > 0 ? (s(), C("div", Ql, [
1271
+ (s(!0), C(ee, null, ce(d.value.tiles, (w, V) => (s(), T(Ee, {
1274
1272
  key: `${o(Oe)()}_${V}`,
1275
1273
  "model-value": w,
1276
1274
  index: V,
1277
1275
  "hide-export": !0,
1278
1276
  "custom-screen-width": x.previewWidth
1279
1277
  }, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
1280
- ])) : (s(), T(Pe, { key: 1 }))
1278
+ ])) : (s(), T(Je, { key: 1 }))
1281
1279
  ], 4)
1282
1280
  ], 4)
1283
1281
  ]))
1284
- ], 64)) : (s(), T(B, { key: 0 }))
1282
+ ], 64)) : (s(), T(D, { key: 0 }))
1285
1283
  ]);
1286
1284
  };
1287
1285
  }
1288
- }), Zl = { class: "flex items-center gap-4" }, et = { class: "flex justify-center items-center gap-2 w-full" }, lt = { class: "flex gap-4" }, gt = /* @__PURE__ */ he({
1286
+ }), Yl = { class: "flex items-center gap-4" }, Zl = { class: "flex justify-center items-center gap-2 w-full" }, et = { class: "flex gap-4" }, pt = /* @__PURE__ */ ye({
1289
1287
  __name: "ReportEditor",
1290
- setup(M) {
1291
- const r = ll(), n = tl(), d = el(), { promptLoader: x } = yl(), { t: f, te: O } = Ne(), { currentReport: P, editingReport: F } = Ie(d), { breakpoints: u } = qe(), B = S(() => {
1292
- var N;
1293
- return !((N = F.value) != null && N.editable);
1294
- }), Y = S(() => {
1295
- var N;
1296
- return ((N = F.value) == null ? void 0 : N.name) ?? f("report.editor.newReport");
1297
- }), D = S(() => $e(f, O, Y.value, "other")), J = ol(), { promptMessage: w } = al(), V = R(!1), $ = S(() => [
1298
- { label: f("report.common.cancel"), value: "cancel", isPrimary: !1 },
1299
- { label: f("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
1288
+ setup(B) {
1289
+ const r = ll(), n = tl(), d = el(), { promptLoader: x } = hl(), { t: v, te: O } = Ne(), { currentReport: J, editingReport: F } = Re(d), { breakpoints: u } = Ie(), D = S(() => {
1290
+ var U;
1291
+ return !((U = F.value) != null && U.editable);
1292
+ }), Z = S(() => {
1293
+ var U;
1294
+ return ((U = F.value) == null ? void 0 : U.name) ?? v("report.editor.newReport");
1295
+ }), R = S(() => $e(v, O, Z.value, "other")), L = ol(), { promptMessage: w } = al(), V = I(!1), $ = S(() => [
1296
+ { label: v("report.common.cancel"), value: "cancel", isPrimary: !1 },
1297
+ { label: v("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
1300
1298
  ]);
1301
- async function U() {
1299
+ async function N() {
1302
1300
  if (!F.value || F.value.tiles.length === 0) {
1303
- J.open({ message: f("report.messages.noWidget"), type: "error" });
1301
+ L.open({ message: v("report.messages.noWidget"), type: "error" });
1304
1302
  return;
1305
1303
  }
1306
- const N = B.value ? f("report.common.clone") : f("report.common.save");
1304
+ const U = D.value ? v("report.common.clone") : v("report.common.save");
1307
1305
  if (await w({
1308
- title: `${f("report.messages.saveReport")}`,
1309
- message: f("report.messages.confirmAction", { action: N, name: D.value })
1306
+ title: `${v("report.messages.saveReport")}`,
1307
+ message: v("report.messages.confirmAction", { action: U, name: R.value })
1310
1308
  }))
1311
1309
  try {
1312
1310
  await x(async () => {
1313
- if (B.value) {
1314
- const L = JSON.parse(JSON.stringify(F.value));
1315
- L.editable = !0, L.id = "", L.name = `${L.name} ${f("report.common.duplicate")}`, L.isDefault = !1, await d.createOrUpdateReport(L);
1311
+ if (D.value) {
1312
+ const G = JSON.parse(JSON.stringify(F.value));
1313
+ G.editable = !0, G.id = "", G.name = `${G.name} ${v("report.common.duplicate")}`, G.isDefault = !1, await d.createOrUpdateReport(G);
1316
1314
  } else
1317
1315
  F.value && await d.createOrUpdateReport(F.value);
1318
1316
  r.push({
@@ -1320,25 +1318,25 @@ const Fl = /* @__PURE__ */ he({
1320
1318
  query: n.query
1321
1319
  });
1322
1320
  });
1323
- } catch (L) {
1324
- console.log(L), J.open({
1325
- message: f("report.messages.failedToAction", { action: N }),
1321
+ } catch (G) {
1322
+ console.log(G), L.open({
1323
+ message: v("report.messages.failedToAction", { action: U }),
1326
1324
  type: "error"
1327
1325
  });
1328
1326
  }
1329
1327
  }
1330
- async function H() {
1331
- var I;
1328
+ async function K() {
1329
+ var q;
1332
1330
  if (!F.value) return;
1333
1331
  await w({
1334
- title: f("report.common.report", 1),
1335
- message: f("report.editor.notSaved", { name: (I = F.value) == null ? void 0 : I.name })
1336
- }) && (F.value = JSON.parse(JSON.stringify(P.value)), r.back());
1332
+ title: v("report.common.report", 1),
1333
+ message: v("report.editor.notSaved", { name: (q = F.value) == null ? void 0 : q.name })
1334
+ }) && (F.value = JSON.parse(JSON.stringify(J.value)), r.back());
1337
1335
  }
1338
1336
  ul(() => {
1339
1337
  F.value || r.push({ name: "reports" });
1340
1338
  });
1341
- const ne = [
1339
+ const le = [
1342
1340
  {
1343
1341
  labelKey: "report.common.default",
1344
1342
  width: void 0,
@@ -1359,78 +1357,78 @@ const Fl = /* @__PURE__ */ he({
1359
1357
  width: 390,
1360
1358
  height: 859
1361
1359
  }
1362
- ], m = R(ne[0]), te = R(!1), _e = S(() => te.value ? Math.max(m.value.width || 0, m.value.height || 0) : Math.min(m.value.width || 0, m.value.height || 0)), Z = S(() => te.value ? Math.min(m.value.width || 0, m.value.height || 0) : Math.max(m.value.width || 0, m.value.height || 0)), K = S(() => window.innerHeight - 72 - 56), ie = S(() => {
1363
- if (!_e.value) return 1;
1364
- let N = (K.value - 48) / _e.value, I = Z.value * N;
1365
- return I > window.innerWidth && (N = window.innerWidth / Z.value, I = Z.value * N), N > 1 ? 1 : N;
1360
+ ], z = I(le[0]), f = I(!1), se = S(() => f.value ? Math.max(z.value.width || 0, z.value.height || 0) : Math.min(z.value.width || 0, z.value.height || 0)), te = S(() => f.value ? Math.min(z.value.width || 0, z.value.height || 0) : Math.max(z.value.width || 0, z.value.height || 0)), Q = S(() => window.innerHeight - 72 - 56), ue = S(() => {
1361
+ if (!se.value) return 1;
1362
+ let U = (Q.value - 48) / se.value, q = te.value * U;
1363
+ return q > window.innerWidth && (U = window.innerWidth / te.value, q = te.value * U), U > 1 ? 1 : U;
1366
1364
  });
1367
- function se(N) {
1368
- m.value = N;
1365
+ function ae(U) {
1366
+ z.value = U;
1369
1367
  }
1370
- function ve() {
1371
- te.value = !te.value;
1368
+ function pe() {
1369
+ f.value = !f.value;
1372
1370
  }
1373
- return (N, I) => {
1374
- const L = _("FmTooltip"), ue = _("FmButton"), ee = _("FmPageHead");
1371
+ return (U, q) => {
1372
+ const G = _("FmTooltip"), ne = _("FmButton"), Ce = _("FmPageHead");
1375
1373
  return s(), T(gl, null, {
1376
- default: v(() => [
1377
- a(ee, {
1374
+ default: p(() => [
1375
+ a(Ce, {
1378
1376
  "data-editor-header": "true",
1379
1377
  actions: $.value,
1380
- "onClick:action": I[0] || (I[0] = (W) => {
1381
- W === "cancel" && H(), W === "save" && U();
1378
+ "onClick:action": q[0] || (q[0] = (M) => {
1379
+ M === "cancel" && K(), M === "save" && N();
1382
1380
  })
1383
1381
  }, {
1384
- title: v(() => [
1385
- h("div", Zl, [
1386
- a(L, {
1387
- content: D.value,
1382
+ title: p(() => [
1383
+ h("div", Yl, [
1384
+ a(G, {
1385
+ content: R.value,
1388
1386
  placement: "bottom"
1389
1387
  }, {
1390
- default: v(() => [
1388
+ default: p(() => [
1391
1389
  h("p", {
1392
- class: Te(`${o(u).sm || o(u).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
1393
- }, X(D.value), 3)
1390
+ class: ke(`${o(u).sm || o(u).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
1391
+ }, Y(R.value), 3)
1394
1392
  ]),
1395
1393
  _: 1
1396
1394
  }, 8, ["content"]),
1397
- h("div", et, [
1398
- h("div", lt, [
1399
- (s(), C(le, null, pe(ne, (W) => {
1400
- var we;
1401
- return a(ue, {
1402
- key: W.labelKey,
1403
- label: o(f)(W.labelKey),
1404
- variant: ((we = m.value) == null ? void 0 : we.labelKey) === W.labelKey ? "primary" : "secondary",
1395
+ h("div", Zl, [
1396
+ h("div", et, [
1397
+ (s(), C(ee, null, ce(le, (M) => {
1398
+ var he;
1399
+ return a(ne, {
1400
+ key: M.labelKey,
1401
+ label: o(v)(M.labelKey),
1402
+ variant: ((he = z.value) == null ? void 0 : he.labelKey) === M.labelKey ? "primary" : "secondary",
1405
1403
  size: "md",
1406
- onClick: (Ue) => se(W)
1404
+ onClick: (Te) => ae(M)
1407
1405
  }, null, 8, ["label", "variant", "onClick"]);
1408
1406
  }), 64))
1409
1407
  ]),
1410
- a(ue, {
1408
+ a(ne, {
1411
1409
  icon: "screen_rotation",
1412
1410
  variant: "tertiary",
1413
1411
  size: "md",
1414
1412
  class: "text-fm-color-typo-primary",
1415
- onClick: ve
1413
+ onClick: pe
1416
1414
  })
1417
1415
  ])
1418
1416
  ])
1419
1417
  ]),
1420
1418
  _: 1
1421
1419
  }, 8, ["actions"]),
1422
- o(F) ? (s(), T(Yl, {
1420
+ o(F) ? (s(), T(Xl, {
1423
1421
  key: 0,
1424
1422
  modelValue: o(F),
1425
- "onUpdate:modelValue": I[1] || (I[1] = (W) => Ze(F) ? F.value = W : null),
1426
- style: je({ height: K.value + "px" }),
1427
- class: Te(o(u).lg || o(u).md ? "flex" : ""),
1423
+ "onUpdate:modelValue": q[1] || (q[1] = (M) => Ze(F) ? F.value = M : null),
1424
+ style: He({ height: Q.value + "px" }),
1425
+ class: ke(o(u).lg || o(u).md ? "flex" : ""),
1428
1426
  "hide-configuration": V.value,
1429
- "preview-width": Z.value,
1430
- "preview-height": _e.value,
1431
- "preview-scale": ie.value,
1432
- onHideConfiguration: I[2] || (I[2] = (W) => V.value = W)
1433
- }, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : G("", !0)
1427
+ "preview-width": te.value,
1428
+ "preview-height": se.value,
1429
+ "preview-scale": ue.value,
1430
+ onHideConfiguration: q[2] || (q[2] = (M) => V.value = M)
1431
+ }, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : A("", !0)
1434
1432
  ]),
1435
1433
  _: 1
1436
1434
  });
@@ -1438,5 +1436,5 @@ const Fl = /* @__PURE__ */ he({
1438
1436
  }
1439
1437
  });
1440
1438
  export {
1441
- gt as default
1439
+ pt as default
1442
1440
  };