@feedmepos/mf-report 5.21.31 → 5.21.32
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.
- package/dist/{App-ChGxGAvb.js → App-BVPfeKM1.js} +4 -4
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-QzLGWBvd.js → BaseDialog.vue_vue_type_script_setup_true_lang-BNTtoXSl.js} +944 -944
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CS10GX8d.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-Cg6ChdaG.js} +87 -87
- package/dist/{Default.vue_vue_type_script_setup_true_lang-oPfgV8Ba.js → Default.vue_vue_type_script_setup_true_lang-BlAfWU6A.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-BEOZulO4.js → FilterSelector.vue_vue_type_script_setup_true_lang-DpUWWlZ7.js} +968 -969
- package/dist/{InsightView-B3zeWLpB.js → InsightView-D0FQmOAa.js} +5 -5
- package/dist/{Integration-Ne6z0Ue8.js → Integration-DUauFkbS.js} +2 -2
- package/dist/{Integrations-SXV9M3b-.js → Integrations-BPvh4SIF.js} +3 -3
- package/dist/{Layout-BfhdHhdb.js → Layout-DG-JKjLP.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-Chon4gVE.js → MenuTab.vue_vue_type_script_setup_true_lang-BHrs_LW4.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-M3kgeSAQ.js → NavigationTab.vue_vue_type_script_setup_true_lang-Cl2n4jUd.js} +4647 -4584
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DDKbpI_N.js → NoData.vue_vue_type_script_setup_true_lang-BRz75rkR.js} +1 -1
- package/dist/{OverviewView-DYJsgAMF.js → OverviewView-DUqScbfn.js} +5 -5
- package/dist/{Report-CDyfJ8O3.js → Report-DYicrOSm.js} +4 -4
- package/dist/{ReportEditor-DtfEQ_8T.js → ReportEditor-D7GGcHre.js} +392 -376
- package/dist/{ReportView-B4LtH-DO.js → ReportView-BzZR7ZLF.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BhWCLEfp.js → SelectComponent.vue_vue_type_script_setup_true_lang-BXZkFRRh.js} +1 -1
- package/dist/{Setting-8zch0HnP.js → Setting-BCyliq0w.js} +4 -4
- package/dist/{TileEditor-lcd84uaM.js → TileEditor-DB6cd_RH.js} +7 -7
- package/dist/{TransitionFade-CP8HKs9i.js → TransitionFade-B-yJvnSS.js} +5 -5
- package/dist/app.js +20 -12
- package/dist/assets/{formatChartData.worker-B3aFFvRN.js → formatChartData.worker-DHyKAOan.js} +26 -26
- package/dist/assets/{processTableData.worker-C9Y9NVCl.js → processTableData.worker-BAeQAKT3.js} +30 -30
- package/dist/{vue-i18n-D1iec8Wy.js → vue-i18n-D4W4y-_2.js} +2151 -2219
- package/package.json +1 -1
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { W as qe, g as Ee, _ as Pe, i as
|
|
3
|
-
import { D as H, c as
|
|
4
|
-
import { storeToRefs as
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useBreakpoints as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { a as
|
|
10
|
-
import { _ as
|
|
1
|
+
import { defineComponent as K, mergeModels as G, useModel as A, ref as I, computed as U, resolveComponent as f, createBlock as k, openBlock as u, withCtx as m, createElementVNode as y, createVNode as o, unref as l, normalizeClass as ue, createTextVNode as _e, toDisplayString as z, createElementBlock as T, Fragment as j, renderSlot as Oe, createCommentVNode as J, watch as pe, renderList as ee, resolveDynamicComponent as We, isRef as Ne, normalizeStyle as we, onMounted as Re } from "vue";
|
|
2
|
+
import { W as qe, g as Ee, _ as Pe, i as ze, S as Ve, d as Ce, T as Je, a as Le } from "./TransitionFade-B-yJvnSS.js";
|
|
3
|
+
import { D as H, c as ce, C as ge, a as Me, b as He, v as se } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BNTtoXSl.js";
|
|
4
|
+
import { storeToRefs as ve } from "pinia";
|
|
5
|
+
import { useRouter as Ue, useRoute as De } from "vue-router";
|
|
6
|
+
import { useBreakpoints as fe, useSnackbar as Be, FmButtonColorThemeVariant as re } from "@feedmepos/ui-library";
|
|
7
|
+
import { u as Ie } from "./message-dialog-UoMWOnil.js";
|
|
8
|
+
import { u as de, b as je, i as be, f as Ge } from "./vue-i18n-D4W4y-_2.js";
|
|
9
|
+
import { a as Se, _ as ye } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DpUWWlZ7.js";
|
|
10
|
+
import { _ as he } from "./NoData.vue_vue_type_script_setup_true_lang-BRz75rkR.js";
|
|
11
11
|
import { r as Fe } from "./i18n-7InkCBCc.js";
|
|
12
|
-
import { a as
|
|
13
|
-
const Ae = /* @__PURE__ */
|
|
12
|
+
import { a as $e } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BXZkFRRh.js";
|
|
13
|
+
const Ae = /* @__PURE__ */ K({
|
|
14
14
|
__name: "WidgetDialog",
|
|
15
|
-
props: /* @__PURE__ */
|
|
15
|
+
props: /* @__PURE__ */ G({
|
|
16
16
|
isOpen: { type: Boolean }
|
|
17
17
|
}, {
|
|
18
18
|
modelValue: {},
|
|
19
19
|
modelModifiers: {}
|
|
20
20
|
}),
|
|
21
|
-
emits: /* @__PURE__ */
|
|
22
|
-
setup(
|
|
23
|
-
const { t:
|
|
21
|
+
emits: /* @__PURE__ */ G(["update:isOpen"], ["update:modelValue"]),
|
|
22
|
+
setup(V, { emit: s }) {
|
|
23
|
+
const { t: r } = de(), { breakpoints: i } = fe(), h = A(V, "modelValue"), c = V, F = s;
|
|
24
24
|
function g() {
|
|
25
25
|
F("update:isOpen", !1);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
d.value && (
|
|
27
|
+
function S() {
|
|
28
|
+
d.value && (h.value = d.value, d.value = void 0, F("update:isOpen", !1));
|
|
29
29
|
}
|
|
30
|
-
const d =
|
|
31
|
-
return (
|
|
32
|
-
const B =
|
|
33
|
-
return u(),
|
|
30
|
+
const d = I(), D = U(() => !d.value);
|
|
31
|
+
return (q, $) => {
|
|
32
|
+
const B = f("FmButton"), b = f("FmDialog");
|
|
33
|
+
return u(), k(b, {
|
|
34
34
|
"model-value": c.isOpen
|
|
35
35
|
}, {
|
|
36
36
|
"dialog-header": m(() => [
|
|
37
|
-
_e(
|
|
37
|
+
_e(z(l(r)("report.widget.type")), 1)
|
|
38
38
|
]),
|
|
39
39
|
default: m(() => [
|
|
40
40
|
o(qe, {
|
|
41
41
|
modelValue: d.value,
|
|
42
|
-
"onUpdate:modelValue":
|
|
43
|
-
class:
|
|
42
|
+
"onUpdate:modelValue": $[0] || ($[0] = (N) => d.value = N),
|
|
43
|
+
class: ue(`grid ${l(i).lg || l(i).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
|
|
44
44
|
"child-class": "p-[8px] flex flex-col"
|
|
45
45
|
}, null, 8, ["modelValue", "class"])
|
|
46
46
|
]),
|
|
47
47
|
"dialog-footer": m(() => [
|
|
48
|
-
|
|
48
|
+
$[1] || ($[1] = y("div", { class: "grow" }, null, -1)),
|
|
49
49
|
o(B, {
|
|
50
|
-
label: l(
|
|
50
|
+
label: l(r)("report.common.cancel"),
|
|
51
51
|
variant: "tertiary",
|
|
52
52
|
onClick: g
|
|
53
53
|
}, null, 8, ["label"]),
|
|
54
54
|
o(B, {
|
|
55
|
-
label: l(
|
|
55
|
+
label: l(r)("report.common.confirm"),
|
|
56
56
|
disabled: D.value,
|
|
57
|
-
onClick:
|
|
57
|
+
onClick: S
|
|
58
58
|
}, null, 8, ["label", "disabled"])
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
61
|
}, 8, ["model-value"]);
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
}), Ke = { class: "fm-typo-en-body-lg-600" }, xe = /* @__PURE__ */
|
|
64
|
+
}), Ke = { class: "fm-typo-en-body-lg-600" }, xe = /* @__PURE__ */ K({
|
|
65
65
|
__name: "ReportEditorTabHeader",
|
|
66
|
-
props: /* @__PURE__ */
|
|
66
|
+
props: /* @__PURE__ */ G({
|
|
67
67
|
icon: {
|
|
68
68
|
type: String,
|
|
69
69
|
required: !0
|
|
@@ -73,59 +73,59 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
73
73
|
modelModifiers: {}
|
|
74
74
|
}),
|
|
75
75
|
emits: ["update:modelValue"],
|
|
76
|
-
setup(
|
|
77
|
-
const { t: s } =
|
|
78
|
-
return (
|
|
79
|
-
const F =
|
|
76
|
+
setup(V) {
|
|
77
|
+
const { t: s } = de(), r = A(V, "modelValue"), i = V;
|
|
78
|
+
return (h, c) => {
|
|
79
|
+
const F = f("FmIcon");
|
|
80
80
|
return u(), T("div", {
|
|
81
81
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
82
|
-
onClick: c[0] || (c[0] = (g) =>
|
|
82
|
+
onClick: c[0] || (c[0] = (g) => r.value = !r.value)
|
|
83
83
|
}, [
|
|
84
|
-
|
|
85
|
-
c[1] || (c[1] =
|
|
84
|
+
y("p", Ke, z(l(s)("report.editor.customizeReport")), 1),
|
|
85
|
+
c[1] || (c[1] = y("div", { class: "grow" }, null, -1)),
|
|
86
86
|
o(F, {
|
|
87
87
|
name: i.icon
|
|
88
88
|
}, null, 8, ["name"])
|
|
89
89
|
]);
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
|
-
}), Qe = /* @__PURE__ */
|
|
92
|
+
}), Qe = /* @__PURE__ */ K({
|
|
93
93
|
__name: "ReportEditorTabDesktop",
|
|
94
94
|
props: {
|
|
95
95
|
modelValue: { required: !0, default: !1 },
|
|
96
96
|
modelModifiers: {}
|
|
97
97
|
},
|
|
98
98
|
emits: ["update:modelValue"],
|
|
99
|
-
setup(
|
|
100
|
-
const s =
|
|
101
|
-
return (
|
|
99
|
+
setup(V) {
|
|
100
|
+
const s = A(V, "modelValue");
|
|
101
|
+
return (r, i) => (u(), T(j, null, [
|
|
102
102
|
o(xe, {
|
|
103
103
|
modelValue: s.value,
|
|
104
|
-
"onUpdate:modelValue": i[0] || (i[0] = (
|
|
104
|
+
"onUpdate:modelValue": i[0] || (i[0] = (h) => s.value = h),
|
|
105
105
|
icon: "keyboard_double_arrow_left"
|
|
106
106
|
}, null, 8, ["modelValue"]),
|
|
107
|
-
|
|
107
|
+
Oe(r.$slots, "default")
|
|
108
108
|
], 64));
|
|
109
109
|
}
|
|
110
|
-
}), Xe = /* @__PURE__ */
|
|
110
|
+
}), Xe = /* @__PURE__ */ K({
|
|
111
111
|
__name: "ReportEditorTabMobile",
|
|
112
112
|
props: {
|
|
113
113
|
modelValue: { required: !0, default: !1 },
|
|
114
114
|
modelModifiers: {}
|
|
115
115
|
},
|
|
116
116
|
emits: ["update:modelValue"],
|
|
117
|
-
setup(
|
|
118
|
-
const s =
|
|
119
|
-
return (
|
|
120
|
-
const
|
|
121
|
-
return u(),
|
|
117
|
+
setup(V) {
|
|
118
|
+
const s = A(V, "modelValue");
|
|
119
|
+
return (r, i) => {
|
|
120
|
+
const h = f("FmTopSheet"), c = f("FmCard");
|
|
121
|
+
return u(), k(c, { class: "fixed bottom-0 w-full" }, {
|
|
122
122
|
default: m(() => [
|
|
123
123
|
o(xe, {
|
|
124
124
|
modelValue: s.value,
|
|
125
125
|
"onUpdate:modelValue": i[0] || (i[0] = (F) => s.value = F),
|
|
126
126
|
icon: "keyboard_double_arrow_up"
|
|
127
127
|
}, null, 8, ["modelValue"]),
|
|
128
|
-
o(
|
|
128
|
+
o(h, {
|
|
129
129
|
modelValue: s.value,
|
|
130
130
|
"onUpdate:modelValue": i[2] || (i[2] = (F) => s.value = F),
|
|
131
131
|
"fullscreen-size": "sm"
|
|
@@ -136,7 +136,7 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
136
136
|
"onUpdate:modelValue": i[1] || (i[1] = (F) => s.value = F),
|
|
137
137
|
icon: "keyboard_double_arrow_down"
|
|
138
138
|
}, null, 8, ["modelValue"]),
|
|
139
|
-
s.value ?
|
|
139
|
+
s.value ? Oe(r.$slots, "default", { key: 0 }) : J("", !0)
|
|
140
140
|
]),
|
|
141
141
|
_: 3
|
|
142
142
|
}, 8, ["modelValue"])
|
|
@@ -148,9 +148,9 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
148
148
|
}), Ye = {
|
|
149
149
|
key: 2,
|
|
150
150
|
class: "flex flex-col gap-2"
|
|
151
|
-
}, Ze = /* @__PURE__ */
|
|
151
|
+
}, Ze = /* @__PURE__ */ K({
|
|
152
152
|
__name: "GlobalFilterDialog",
|
|
153
|
-
props: /* @__PURE__ */
|
|
153
|
+
props: /* @__PURE__ */ G({
|
|
154
154
|
schemas: {
|
|
155
155
|
type: Array,
|
|
156
156
|
default: () => []
|
|
@@ -168,67 +168,67 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
168
168
|
isOpenModifiers: {}
|
|
169
169
|
}),
|
|
170
170
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
171
|
-
setup(
|
|
172
|
-
const { t: s, te:
|
|
173
|
-
|
|
174
|
-
var e, t,
|
|
175
|
-
a && (g.value = ((e = i.value) == null ? void 0 : e.label) || "",
|
|
171
|
+
setup(V) {
|
|
172
|
+
const { t: s, te: r } = de(), i = A(V, "globalFilter"), h = A(V, "isOpen"), c = Be(), F = V, g = I(), S = I(), d = I(), D = I(), q = I([]), $ = I([]), B = I(""), b = I(!1);
|
|
173
|
+
pe(h, (a) => {
|
|
174
|
+
var e, t, v, w, _, C, R;
|
|
175
|
+
a && (g.value = ((e = i.value) == null ? void 0 : e.label) || "", S.value = F.schemas.find(
|
|
176
176
|
(P) => {
|
|
177
177
|
var O;
|
|
178
178
|
return P.name === ((O = i.value) == null ? void 0 : O.schemaName);
|
|
179
179
|
}
|
|
180
|
-
), d.value = (t =
|
|
180
|
+
), d.value = (t = Q.value.find(
|
|
181
181
|
(P) => {
|
|
182
182
|
var O;
|
|
183
183
|
return P.value.name === ((O = i.value) == null ? void 0 : O.name);
|
|
184
184
|
}
|
|
185
|
-
)) == null ? void 0 : t.value, D.value = (
|
|
185
|
+
)) == null ? void 0 : t.value, D.value = (v = i.value) == null ? void 0 : v.option, q.value = ((w = i.value) == null ? void 0 : w.tileIds) || [], $.value = ((_ = i.value) == null ? void 0 : _.filters) || [], b.value = !!((C = i.value) != null && C.dataFormula), B.value = ((R = i.value) == null ? void 0 : R.dataFormula) || "");
|
|
186
186
|
});
|
|
187
187
|
const N = U(
|
|
188
188
|
() => F.schemas.map((a) => ({
|
|
189
189
|
label: a.label || a.name,
|
|
190
190
|
value: a
|
|
191
191
|
}))
|
|
192
|
-
),
|
|
192
|
+
), Q = U(() => {
|
|
193
193
|
var a;
|
|
194
|
-
return (((a =
|
|
194
|
+
return (((a = S.value) == null ? void 0 : a.fields) || []).map((e) => ({
|
|
195
195
|
label: e.label || e.name,
|
|
196
196
|
value: e
|
|
197
197
|
}));
|
|
198
|
-
}),
|
|
198
|
+
}), W = U(() => {
|
|
199
199
|
var a;
|
|
200
200
|
return ((a = d.value) == null ? void 0 : a.type) !== H.Timestamp ? [] : Ee(s);
|
|
201
201
|
}), E = U(() => F.tiles.reduce((a, e, t) => {
|
|
202
|
-
var _,
|
|
203
|
-
const
|
|
204
|
-
(
|
|
202
|
+
var _, C;
|
|
203
|
+
const v = e.widget.config.schemaNames ?? [], w = (e.widget.config.joinDatasources ?? []).flatMap(
|
|
204
|
+
(R) => R.schemaNames ?? []
|
|
205
205
|
);
|
|
206
|
-
return [...
|
|
207
|
-
label: (
|
|
206
|
+
return [...v, ...w].includes(((_ = S.value) == null ? void 0 : _.name) || "") && a.push({
|
|
207
|
+
label: (C = e == null ? void 0 : e.widget.title) != null && C.trim() ? e.widget.title : `Widget ${t + 1}`,
|
|
208
208
|
value: e.id
|
|
209
209
|
}), a;
|
|
210
|
-
}, [])),
|
|
210
|
+
}, [])), L = U(
|
|
211
211
|
() => F.schemas.flatMap(
|
|
212
212
|
(a) => (a.fields ?? []).map((e) => ({
|
|
213
213
|
...e,
|
|
214
214
|
labels: [
|
|
215
|
-
Fe(s,
|
|
216
|
-
Fe(s,
|
|
215
|
+
Fe(s, r, a.label, "schema"),
|
|
216
|
+
Fe(s, r, e.label || e.name, "other")
|
|
217
217
|
]
|
|
218
218
|
}))
|
|
219
219
|
)
|
|
220
220
|
);
|
|
221
|
-
function
|
|
221
|
+
function p(a) {
|
|
222
222
|
var e;
|
|
223
|
-
a.name !== ((e =
|
|
223
|
+
a.name !== ((e = S.value) == null ? void 0 : e.name) && (S.value = a, d.value = void 0);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
d.value = a, D.value = a.type === H.Timestamp ?
|
|
225
|
+
function X(a) {
|
|
226
|
+
d.value = a, D.value = a.type === H.Timestamp ? ce.DateTime : void 0;
|
|
227
227
|
}
|
|
228
228
|
function le(a, e) {
|
|
229
229
|
switch (a) {
|
|
230
230
|
case H.Timestamp:
|
|
231
|
-
return e ===
|
|
231
|
+
return e === ce.DateTime || e === ce.TimeOfDay ? ge.Between : ge.Equal;
|
|
232
232
|
case H.Bool:
|
|
233
233
|
case H.String:
|
|
234
234
|
case H.Numeric:
|
|
@@ -238,7 +238,7 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function te() {
|
|
241
|
-
if (!
|
|
241
|
+
if (!S.value) {
|
|
242
242
|
c.open({ message: "Invalid schema", type: "error" });
|
|
243
243
|
return;
|
|
244
244
|
}
|
|
@@ -246,7 +246,7 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
246
246
|
c.open({ message: "Invalid dimension", type: "error" });
|
|
247
247
|
return;
|
|
248
248
|
}
|
|
249
|
-
const a =
|
|
249
|
+
const a = $.value.filter((e) => e ? !N.value.some((v) => v.value.name === e.schemaName) : !0);
|
|
250
250
|
if (a.length > 0) {
|
|
251
251
|
c.open({
|
|
252
252
|
message: `Invalid filter(s): ${a.filter((e) => !!e).map((e) => e.schemaName).join(
|
|
@@ -257,47 +257,47 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
257
257
|
return;
|
|
258
258
|
}
|
|
259
259
|
i.value = {
|
|
260
|
-
schemaName:
|
|
260
|
+
schemaName: S.value.name,
|
|
261
261
|
name: d.value.name,
|
|
262
262
|
label: g.value,
|
|
263
263
|
operator: le(
|
|
264
264
|
d.value.type,
|
|
265
|
-
d.value.type === H.Timestamp ? D.value ??
|
|
265
|
+
d.value.type === H.Timestamp ? D.value ?? ce.DateTime : null
|
|
266
266
|
),
|
|
267
267
|
option: d.value.type === H.Timestamp ? D.value : null,
|
|
268
268
|
values: [],
|
|
269
|
-
tileIds: [...
|
|
270
|
-
filters: JSON.parse(JSON.stringify(
|
|
269
|
+
tileIds: [...q.value],
|
|
270
|
+
filters: JSON.parse(JSON.stringify($.value)),
|
|
271
271
|
dataFormula: b.value ? B.value : void 0
|
|
272
|
-
},
|
|
272
|
+
}, h.value = !1;
|
|
273
273
|
}
|
|
274
274
|
function oe() {
|
|
275
|
-
|
|
275
|
+
h.value = !1;
|
|
276
276
|
}
|
|
277
277
|
const x = U(() => {
|
|
278
278
|
var a;
|
|
279
279
|
return [
|
|
280
|
-
(a =
|
|
281
|
-
|
|
280
|
+
(a = S.value) == null ? void 0 : a.name,
|
|
281
|
+
...$.value.map((e) => e.schemaName)
|
|
282
282
|
];
|
|
283
283
|
});
|
|
284
284
|
function M(a) {
|
|
285
|
-
var _,
|
|
286
|
-
const e = F.tiles.find((O) => O.id === a.value), t = ((
|
|
285
|
+
var _, C, R, P;
|
|
286
|
+
const e = F.tiles.find((O) => O.id === a.value), t = ((C = (_ = e == null ? void 0 : e.widget) == null ? void 0 : _.config) == null ? void 0 : C.schemaNames) ?? [], v = (((P = (R = e == null ? void 0 : e.widget) == null ? void 0 : R.config) == null ? void 0 : P.joinDatasources) ?? []).flatMap(
|
|
287
287
|
(O) => O.schemaNames ?? []
|
|
288
|
-
), w = [...t, ...
|
|
288
|
+
), w = [...t, ...v];
|
|
289
289
|
return x.value.filter((O) => !!O).some((O) => !w.includes(O));
|
|
290
290
|
}
|
|
291
291
|
return (a, e) => {
|
|
292
|
-
const t =
|
|
293
|
-
return u(),
|
|
294
|
-
modelValue:
|
|
295
|
-
"onUpdate:modelValue": e[8] || (e[8] = (ae) =>
|
|
292
|
+
const t = f("FmTextField"), v = f("FmSelect"), w = f("FmCheckbox"), _ = f("FmTextarea"), C = f("FmLabel"), R = f("FmIcon"), P = f("FmTooltip"), O = f("FmForm"), ie = f("FmButton"), me = f("FmDialog");
|
|
293
|
+
return u(), k(me, {
|
|
294
|
+
modelValue: h.value,
|
|
295
|
+
"onUpdate:modelValue": e[8] || (e[8] = (ae) => h.value = ae),
|
|
296
296
|
overlay: !0,
|
|
297
297
|
"z-index": 10
|
|
298
298
|
}, {
|
|
299
299
|
"dialog-header": m(() => [
|
|
300
|
-
_e(
|
|
300
|
+
_e(z(l(s)("report.section.filter.globalFilter")), 1)
|
|
301
301
|
]),
|
|
302
302
|
default: m(() => [
|
|
303
303
|
o(O, {
|
|
@@ -309,83 +309,83 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
309
309
|
return [
|
|
310
310
|
o(t, {
|
|
311
311
|
modelValue: g.value,
|
|
312
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
312
|
+
"onUpdate:modelValue": e[0] || (e[0] = (n) => g.value = n),
|
|
313
313
|
placeholder: l(s)("report.section.filter.displayName"),
|
|
314
314
|
label: l(s)("report.section.filter.displayName"),
|
|
315
315
|
class: "mb-2"
|
|
316
316
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
317
|
-
o(
|
|
318
|
-
"model-value":
|
|
317
|
+
o($e, {
|
|
318
|
+
"model-value": S.value,
|
|
319
319
|
items: N.value,
|
|
320
320
|
placeholder: l(s)("report.section.schema.title"),
|
|
321
321
|
label: l(s)("report.section.schema.title"),
|
|
322
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
322
|
+
"onUpdate:modelValue": e[1] || (e[1] = (n) => p(n))
|
|
323
323
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
324
|
-
o(
|
|
324
|
+
o($e, {
|
|
325
325
|
"model-value": d.value,
|
|
326
|
-
items:
|
|
326
|
+
items: Q.value,
|
|
327
327
|
placeholder: l(s)("report.section.dimension.title"),
|
|
328
328
|
label: l(s)("report.section.dimension.title"),
|
|
329
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
329
|
+
"onUpdate:modelValue": e[2] || (e[2] = (n) => X(n))
|
|
330
330
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
331
|
-
((ae = d.value) == null ? void 0 : ae.type) === l(H).Timestamp ? (u(),
|
|
331
|
+
((ae = d.value) == null ? void 0 : ae.type) === l(H).Timestamp ? (u(), k(v, {
|
|
332
332
|
key: 0,
|
|
333
333
|
modelValue: D.value,
|
|
334
|
-
"onUpdate:modelValue": e[3] || (e[3] = (
|
|
335
|
-
items:
|
|
334
|
+
"onUpdate:modelValue": e[3] || (e[3] = (n) => D.value = n),
|
|
335
|
+
items: W.value,
|
|
336
336
|
placeholder: l(s)("report.section.filter.timeFormatter"),
|
|
337
337
|
label: l(s)("report.section.filter.timeFormatter")
|
|
338
|
-
}, null, 8, ["modelValue", "items", "placeholder", "label"])) :
|
|
338
|
+
}, null, 8, ["modelValue", "items", "placeholder", "label"])) : J("", !0),
|
|
339
339
|
o(w, {
|
|
340
340
|
modelValue: b.value,
|
|
341
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
341
|
+
"onUpdate:modelValue": e[4] || (e[4] = (n) => b.value = n),
|
|
342
342
|
label: l(s)("report.section.filter.advance"),
|
|
343
343
|
value: !0
|
|
344
344
|
}, null, 8, ["modelValue", "label"]),
|
|
345
|
-
b.value ? (u(),
|
|
345
|
+
b.value ? (u(), k(_, {
|
|
346
346
|
key: 1,
|
|
347
347
|
modelValue: B.value,
|
|
348
|
-
"onUpdate:modelValue": e[5] || (e[5] = (
|
|
348
|
+
"onUpdate:modelValue": e[5] || (e[5] = (n) => B.value = n),
|
|
349
349
|
placeholder: l(s)("report.section.filter.dataFormula")
|
|
350
|
-
}, null, 8, ["modelValue", "placeholder"])) :
|
|
350
|
+
}, null, 8, ["modelValue", "placeholder"])) : J("", !0),
|
|
351
351
|
o(Pe, {
|
|
352
|
-
modelValue:
|
|
353
|
-
"onUpdate:modelValue": e[6] || (e[6] = (
|
|
354
|
-
options:
|
|
352
|
+
modelValue: $.value,
|
|
353
|
+
"onUpdate:modelValue": e[6] || (e[6] = (n) => $.value = n),
|
|
354
|
+
options: L.value
|
|
355
355
|
}, null, 8, ["modelValue", "options"]),
|
|
356
|
-
o(
|
|
356
|
+
o(C, { class: "mt-2 fm-typo-en-body-lg-600" }, {
|
|
357
357
|
default: m(() => [
|
|
358
|
-
_e(
|
|
358
|
+
_e(z(l(s)("report.section.filter.applyWidget")), 1)
|
|
359
359
|
]),
|
|
360
360
|
_: 1
|
|
361
361
|
}),
|
|
362
|
-
|
|
363
|
-
(u(!0), T(j, null, ee(E.value, (
|
|
364
|
-
key:
|
|
362
|
+
V.tiles.length > 0 ? (u(), T("div", Ye, [
|
|
363
|
+
(u(!0), T(j, null, ee(E.value, (n) => (u(), T("div", {
|
|
364
|
+
key: n.value,
|
|
365
365
|
class: "flex items-center"
|
|
366
366
|
}, [
|
|
367
367
|
o(w, {
|
|
368
|
-
modelValue:
|
|
369
|
-
"onUpdate:modelValue": e[7] || (e[7] = (
|
|
370
|
-
label:
|
|
371
|
-
value:
|
|
368
|
+
modelValue: q.value,
|
|
369
|
+
"onUpdate:modelValue": e[7] || (e[7] = (Y) => q.value = Y),
|
|
370
|
+
label: n.label,
|
|
371
|
+
value: n.value
|
|
372
372
|
}, null, 8, ["modelValue", "label", "value"]),
|
|
373
|
-
M(
|
|
373
|
+
M(n) ? (u(), k(P, {
|
|
374
374
|
key: 0,
|
|
375
375
|
content: l(s)("report.section.filter.missingFilterSchema"),
|
|
376
376
|
"z-index": 99,
|
|
377
377
|
class: "ml-2"
|
|
378
378
|
}, {
|
|
379
379
|
default: m(() => [
|
|
380
|
-
o(
|
|
380
|
+
o(R, {
|
|
381
381
|
name: "warning",
|
|
382
382
|
class: "text-fm-color-system-error-300"
|
|
383
383
|
})
|
|
384
384
|
]),
|
|
385
385
|
_: 1
|
|
386
|
-
}, 8, ["content"])) :
|
|
386
|
+
}, 8, ["content"])) : J("", !0)
|
|
387
387
|
]))), 128))
|
|
388
|
-
])) : (u(),
|
|
388
|
+
])) : (u(), k(C, {
|
|
389
389
|
key: 3,
|
|
390
390
|
class: "fm-typo-en-body-lg-400",
|
|
391
391
|
label: l(s)("report.section.filter.noWidget")
|
|
@@ -396,13 +396,13 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
396
396
|
}, 512)
|
|
397
397
|
]),
|
|
398
398
|
"dialog-footer": m(() => [
|
|
399
|
-
e[9] || (e[9] =
|
|
400
|
-
o(
|
|
399
|
+
e[9] || (e[9] = y("div", { class: "grow" }, null, -1)),
|
|
400
|
+
o(ie, {
|
|
401
401
|
label: l(s)("report.common.cancel"),
|
|
402
402
|
variant: "tertiary",
|
|
403
403
|
onClick: oe
|
|
404
404
|
}, null, 8, ["label"]),
|
|
405
|
-
o(
|
|
405
|
+
o(ie, {
|
|
406
406
|
label: l(s)("report.common.confirm"),
|
|
407
407
|
onClick: te
|
|
408
408
|
}, null, 8, ["label"])
|
|
@@ -411,9 +411,9 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
411
411
|
}, 8, ["modelValue"]);
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
|
-
}), el = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, tl = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, ol = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, al = { class: "flex flex-col gap-24" }, nl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" },
|
|
414
|
+
}), el = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, tl = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, ol = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, al = { class: "flex flex-col gap-24" }, nl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, Te = /* @__PURE__ */ K({
|
|
415
415
|
__name: "ReportEditorTab",
|
|
416
|
-
props: /* @__PURE__ */
|
|
416
|
+
props: /* @__PURE__ */ G({
|
|
417
417
|
hideConfiguration: {
|
|
418
418
|
type: Boolean,
|
|
419
419
|
default: !1
|
|
@@ -422,279 +422,295 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
422
422
|
modelValue: { required: !0 },
|
|
423
423
|
modelModifiers: {}
|
|
424
424
|
}),
|
|
425
|
-
emits: /* @__PURE__ */
|
|
426
|
-
setup(
|
|
427
|
-
const
|
|
425
|
+
emits: /* @__PURE__ */ G(["hideConfiguration"], ["update:modelValue"]),
|
|
426
|
+
setup(V, { emit: s }) {
|
|
427
|
+
const r = A(V, "modelValue"), { breakpoints: i } = fe(), h = V, c = s, F = Ue(), g = De(), S = I(), {
|
|
428
428
|
currentSelectWidgetType: d,
|
|
429
429
|
categories: D,
|
|
430
|
-
editingTile:
|
|
431
|
-
editingTileIndex:
|
|
430
|
+
editingTile: q,
|
|
431
|
+
editingTileIndex: $,
|
|
432
432
|
editingGlobalFilter: B,
|
|
433
433
|
editingGlobalFilterIndex: b
|
|
434
|
-
} =
|
|
435
|
-
const e =
|
|
434
|
+
} = ve(Me()), { schemas: N } = ve(He()), { globalFilters: Q } = ve(je()), { promptMessage: W } = Ie(), E = I(!1), L = I(!1), { t: p, te: X } = de(), le = I(void 0), te = U(() => {
|
|
435
|
+
const e = r.value.tiles.flatMap((t) => {
|
|
436
436
|
var _;
|
|
437
|
-
const
|
|
438
|
-
return [...
|
|
437
|
+
const v = t.widget.config.schemaNames ?? [], w = ((_ = t.widget.config.joinDatasources) == null ? void 0 : _.flatMap((C) => C.schemaNames ?? [])) ?? [];
|
|
438
|
+
return [...v, ...w];
|
|
439
439
|
});
|
|
440
|
-
return [...new Set(e)].reduce((t,
|
|
441
|
-
const w = N.value.find((_) => _.name ===
|
|
440
|
+
return [...new Set(e)].reduce((t, v) => {
|
|
441
|
+
const w = N.value.find((_) => _.name === v);
|
|
442
442
|
return w && t.push(w), t;
|
|
443
443
|
}, []);
|
|
444
444
|
});
|
|
445
445
|
function oe(e) {
|
|
446
446
|
if (!e) return "";
|
|
447
447
|
const t = `report.widget.types.${e.toLowerCase()}`;
|
|
448
|
-
return
|
|
448
|
+
return X(t) ? p(t) : Fe(p, X, e, "other");
|
|
449
449
|
}
|
|
450
|
-
|
|
450
|
+
pe(
|
|
451
451
|
() => d.value,
|
|
452
452
|
() => {
|
|
453
|
-
d.value !== void 0 && (le.value =
|
|
453
|
+
d.value !== void 0 && (le.value = ze(d.value), q.value = le.value, $.value = -1, F.push({
|
|
454
454
|
name: "tileEditor",
|
|
455
455
|
query: g.query
|
|
456
456
|
}));
|
|
457
457
|
},
|
|
458
458
|
{ immediate: !0 }
|
|
459
|
-
),
|
|
460
|
-
() =>
|
|
459
|
+
), pe(
|
|
460
|
+
() => r.value.tiles,
|
|
461
461
|
(e) => {
|
|
462
462
|
e.forEach((t) => {
|
|
463
|
-
t.id || (t.id =
|
|
463
|
+
t.id || (t.id = se());
|
|
464
464
|
});
|
|
465
465
|
},
|
|
466
466
|
{ immediate: !0, deep: !0 }
|
|
467
467
|
);
|
|
468
468
|
const x = [
|
|
469
469
|
{
|
|
470
|
-
label:
|
|
470
|
+
label: p("report.common.edit"),
|
|
471
471
|
selected: !1,
|
|
472
472
|
variant: "tertiary",
|
|
473
473
|
onClick: (e) => {
|
|
474
|
-
|
|
474
|
+
$.value = e, q.value = JSON.parse(JSON.stringify(r.value.tiles[e])), F.push({
|
|
475
475
|
name: "tileEditor",
|
|
476
476
|
query: g.query
|
|
477
477
|
});
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
{
|
|
481
|
-
label:
|
|
481
|
+
label: p("report.common.duplicate"),
|
|
482
482
|
selected: !1,
|
|
483
483
|
variant: "tertiary",
|
|
484
484
|
onClick: (e) => {
|
|
485
485
|
const t = {
|
|
486
|
-
...JSON.parse(JSON.stringify(
|
|
487
|
-
id:
|
|
486
|
+
...JSON.parse(JSON.stringify(r.value.tiles[e])),
|
|
487
|
+
id: se()
|
|
488
488
|
};
|
|
489
|
-
|
|
489
|
+
r.value.tiles.push(t);
|
|
490
490
|
}
|
|
491
491
|
},
|
|
492
492
|
{
|
|
493
|
-
label:
|
|
493
|
+
label: p("report.common.remove"),
|
|
494
494
|
selected: !1,
|
|
495
495
|
variant: "destructive",
|
|
496
496
|
onClick: async (e) => {
|
|
497
|
-
if (await
|
|
498
|
-
title:
|
|
499
|
-
message:
|
|
500
|
-
title:
|
|
497
|
+
if (await W({
|
|
498
|
+
title: p("report.editor.deleteWidget"),
|
|
499
|
+
message: p("report.editor.deleteWidgetConfirm", {
|
|
500
|
+
title: r.value.tiles[e].widget.title
|
|
501
501
|
})
|
|
502
502
|
})) {
|
|
503
|
-
const
|
|
504
|
-
|
|
503
|
+
const v = r.value.tiles[e].id;
|
|
504
|
+
r.value.tiles.splice(e, 1), r.value.globalFilters && r.value.globalFilters.forEach((w) => {
|
|
505
505
|
var _;
|
|
506
|
-
w.tileIds = (_ = w.tileIds) == null ? void 0 : _.filter((
|
|
506
|
+
w.tileIds = (_ = w.tileIds) == null ? void 0 : _.filter((C) => C !== v);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
511
|
], M = [
|
|
512
512
|
{
|
|
513
|
-
label:
|
|
513
|
+
label: p("report.common.edit"),
|
|
514
514
|
selected: !1,
|
|
515
515
|
variant: "tertiary",
|
|
516
516
|
onClick: (e) => {
|
|
517
517
|
var t;
|
|
518
|
-
b.value = e, B.value = JSON.parse(JSON.stringify((t =
|
|
518
|
+
b.value = e, B.value = JSON.parse(JSON.stringify((t = r.value.globalFilters) == null ? void 0 : t[e])), E.value = !0;
|
|
519
519
|
}
|
|
520
520
|
},
|
|
521
521
|
{
|
|
522
|
-
label:
|
|
522
|
+
label: p("report.common.remove"),
|
|
523
523
|
selected: !1,
|
|
524
524
|
variant: "destructive",
|
|
525
525
|
onClick: async (e) => {
|
|
526
526
|
var w, _;
|
|
527
|
-
const t = (w =
|
|
527
|
+
const t = (w = r.value.globalFilters) == null ? void 0 : w[e];
|
|
528
528
|
if (!t) return;
|
|
529
|
-
await
|
|
530
|
-
title:
|
|
531
|
-
message:
|
|
529
|
+
await W({
|
|
530
|
+
title: p("report.editor.deleteWidget"),
|
|
531
|
+
message: p("report.editor.deleteWidgetConfirm", {
|
|
532
532
|
title: be(t)
|
|
533
533
|
})
|
|
534
|
-
}) && ((_ =
|
|
534
|
+
}) && ((_ = r.value.globalFilters) == null || _.splice(e, 1));
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
], a = U(() => D.value.map((e) => ({
|
|
538
|
-
label:
|
|
538
|
+
label: p(`report.category.${e.name}`),
|
|
539
539
|
value: e.id
|
|
540
540
|
})));
|
|
541
|
-
return
|
|
542
|
-
() =>
|
|
541
|
+
return pe(
|
|
542
|
+
() => r.value.globalFilters,
|
|
543
543
|
(e) => {
|
|
544
|
-
|
|
544
|
+
Q.value = JSON.parse(JSON.stringify(e || []));
|
|
545
545
|
},
|
|
546
546
|
{ deep: !0, immediate: !0 }
|
|
547
547
|
), (e, t) => {
|
|
548
|
-
const
|
|
549
|
-
return u(),
|
|
550
|
-
"model-value":
|
|
551
|
-
"onUpdate:modelValue": t[9] || (t[9] = (
|
|
548
|
+
const v = f("FmTextField"), w = f("FmSelect"), _ = f("FmButton"), C = f("FmIcon"), R = f("FmTooltip"), P = f("FmMenuItem"), O = f("FmMenu"), ie = f("FmListItem"), me = f("FmList"), ae = f("FmForm");
|
|
549
|
+
return u(), k(We(l(i).lg || l(i).md ? Qe : Xe), {
|
|
550
|
+
"model-value": h.hideConfiguration,
|
|
551
|
+
"onUpdate:modelValue": t[9] || (t[9] = (n) => c("hideConfiguration", n))
|
|
552
552
|
}, {
|
|
553
553
|
default: m(() => [
|
|
554
554
|
o(Ze, {
|
|
555
555
|
"is-open": E.value,
|
|
556
|
-
"onUpdate:isOpen": t[0] || (t[0] = (
|
|
556
|
+
"onUpdate:isOpen": t[0] || (t[0] = (n) => E.value = n),
|
|
557
557
|
"global-filter": l(B),
|
|
558
|
-
tiles:
|
|
558
|
+
tiles: r.value.tiles,
|
|
559
559
|
schemas: te.value,
|
|
560
|
-
"onUpdate:globalFilter": t[1] || (t[1] = (
|
|
561
|
-
|
|
560
|
+
"onUpdate:globalFilter": t[1] || (t[1] = (n) => {
|
|
561
|
+
n && (r.value.globalFilters || (r.value.globalFilters = []), typeof l(b) == "number" && l(b) >= 0 ? r.value.globalFilters[l(b)] = n : r.value.globalFilters.push(n));
|
|
562
562
|
})
|
|
563
563
|
}, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
|
|
564
564
|
o(Ae, {
|
|
565
565
|
modelValue: l(d),
|
|
566
|
-
"onUpdate:modelValue": t[2] || (t[2] = (
|
|
567
|
-
"is-open":
|
|
568
|
-
"onUpdate:isOpen": t[3] || (t[3] = (
|
|
566
|
+
"onUpdate:modelValue": t[2] || (t[2] = (n) => Ne(d) ? d.value = n : null),
|
|
567
|
+
"is-open": L.value,
|
|
568
|
+
"onUpdate:isOpen": t[3] || (t[3] = (n) => L.value = n)
|
|
569
569
|
}, null, 8, ["modelValue", "is-open"]),
|
|
570
570
|
o(ae, {
|
|
571
571
|
ref_key: "form",
|
|
572
|
-
ref:
|
|
572
|
+
ref: S,
|
|
573
573
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
574
574
|
}, {
|
|
575
575
|
default: m(() => [
|
|
576
|
-
o(
|
|
576
|
+
o(Ve, { class: "border-solid" }, {
|
|
577
577
|
header: m(() => [
|
|
578
|
-
|
|
579
|
-
t[10] || (t[10] =
|
|
578
|
+
y("p", null, z(l(p)("report.editor.reportInfo")), 1),
|
|
579
|
+
t[10] || (t[10] = y("div", { class: "grow" }, null, -1))
|
|
580
580
|
]),
|
|
581
581
|
content: m(() => [
|
|
582
|
-
|
|
583
|
-
o(
|
|
584
|
-
modelValue:
|
|
585
|
-
"onUpdate:modelValue": t[4] || (t[4] = (
|
|
586
|
-
label: l(
|
|
587
|
-
placeholder: l(
|
|
582
|
+
y("div", el, [
|
|
583
|
+
o(v, {
|
|
584
|
+
modelValue: r.value.name,
|
|
585
|
+
"onUpdate:modelValue": t[4] || (t[4] = (n) => r.value.name = n),
|
|
586
|
+
label: l(p)("report.common.name"),
|
|
587
|
+
placeholder: l(p)("report.common.name")
|
|
588
588
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
589
589
|
o(w, {
|
|
590
|
-
modelValue:
|
|
591
|
-
"onUpdate:modelValue": t[5] || (t[5] = (
|
|
592
|
-
label: l(
|
|
590
|
+
modelValue: r.value.category,
|
|
591
|
+
"onUpdate:modelValue": t[5] || (t[5] = (n) => r.value.category = n),
|
|
592
|
+
label: l(p)("report.common.category"),
|
|
593
593
|
items: a.value
|
|
594
594
|
}, null, 8, ["modelValue", "label", "items"]),
|
|
595
|
-
o(
|
|
596
|
-
modelValue:
|
|
597
|
-
"onUpdate:modelValue": t[6] || (t[6] = (
|
|
598
|
-
label: l(
|
|
599
|
-
placeholder: l(
|
|
595
|
+
o(v, {
|
|
596
|
+
modelValue: r.value.description,
|
|
597
|
+
"onUpdate:modelValue": t[6] || (t[6] = (n) => r.value.description = n),
|
|
598
|
+
label: l(p)("report.common.description"),
|
|
599
|
+
placeholder: l(p)("report.common.description")
|
|
600
600
|
}, null, 8, ["modelValue", "label", "placeholder"])
|
|
601
601
|
])
|
|
602
602
|
]),
|
|
603
603
|
_: 1
|
|
604
604
|
}),
|
|
605
|
-
o(
|
|
605
|
+
o(Ve, {
|
|
606
606
|
class: "border-solid",
|
|
607
607
|
"is-open": !1
|
|
608
608
|
}, {
|
|
609
609
|
header: m(() => [
|
|
610
|
-
|
|
611
|
-
t[11] || (t[11] =
|
|
610
|
+
y("p", null, z(l(p)("report.section.filter.globalFilter")), 1),
|
|
611
|
+
t[11] || (t[11] = y("div", { class: "grow" }, null, -1))
|
|
612
612
|
]),
|
|
613
613
|
content: m(() => [
|
|
614
|
-
|
|
614
|
+
y("div", ll, [
|
|
615
615
|
o(_, {
|
|
616
|
-
label: l(
|
|
616
|
+
label: l(p)("report.section.filter.addGlobalFilter"),
|
|
617
617
|
variant: "secondary",
|
|
618
618
|
icon: "add",
|
|
619
619
|
"icon-position": "prepend",
|
|
620
|
-
"border-color": l(
|
|
621
|
-
"text-color": l(
|
|
620
|
+
"border-color": l(re).ColorPrimary,
|
|
621
|
+
"text-color": l(re).ColorPrimary,
|
|
622
622
|
onClick: t[7] || (t[7] = () => {
|
|
623
623
|
b.value = null, B.value = null, E.value = !0;
|
|
624
624
|
})
|
|
625
625
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
626
|
-
o(
|
|
626
|
+
o(me, null, {
|
|
627
627
|
default: m(() => [
|
|
628
|
-
o(l(
|
|
629
|
-
list:
|
|
628
|
+
o(l(Ce), {
|
|
629
|
+
list: r.value.globalFilters,
|
|
630
630
|
"item-key": "`${element.schemaName}-${element.name}`",
|
|
631
631
|
class: "flex flex-col gap-2 cursor-grab",
|
|
632
632
|
handle: ".handle"
|
|
633
633
|
}, {
|
|
634
|
-
item: m(({ element:
|
|
635
|
-
o(
|
|
636
|
-
default: m(() =>
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
h("div", tl, [
|
|
642
|
-
o(q, {
|
|
643
|
-
"z-index": 99,
|
|
644
|
-
content: l(be)(r),
|
|
634
|
+
item: m(({ element: n, index: Y }) => [
|
|
635
|
+
o(ie, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
636
|
+
default: m(() => {
|
|
637
|
+
var ne;
|
|
638
|
+
return [
|
|
639
|
+
o(C, {
|
|
640
|
+
name: "drag_handle",
|
|
645
641
|
class: "handle"
|
|
646
|
-
},
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
te.value.find(
|
|
653
|
-
(L) => L.name === r.schemaName
|
|
654
|
-
) ? G("", !0) : (u(), V(q, {
|
|
655
|
-
key: 0,
|
|
656
|
-
content: l(f)("report.section.filter.missingSchema"),
|
|
657
|
-
"z-index": 99
|
|
658
|
-
}, {
|
|
659
|
-
default: m(() => [
|
|
660
|
-
o($, {
|
|
661
|
-
name: "warning",
|
|
662
|
-
class: "text-fm-color-system-error-300"
|
|
663
|
-
})
|
|
664
|
-
]),
|
|
665
|
-
_: 1
|
|
666
|
-
}, 8, ["content"]))
|
|
667
|
-
]),
|
|
668
|
-
t[12] || (t[12] = h("div", { class: "grow" }, null, -1)),
|
|
669
|
-
o(O, {
|
|
670
|
-
trigger: "click",
|
|
671
|
-
shift: !0,
|
|
672
|
-
"stop-click-propagation": !0
|
|
673
|
-
}, {
|
|
674
|
-
"menu-button": m(() => [
|
|
675
|
-
o(_, {
|
|
676
|
-
"append-icon": "more_vert",
|
|
677
|
-
variant: "tertiary"
|
|
678
|
-
})
|
|
679
|
-
]),
|
|
680
|
-
default: m(() => [
|
|
681
|
-
(u(), T(j, null, ee(M, (L, fe) => o(P, {
|
|
682
|
-
key: fe,
|
|
683
|
-
onClick: (We) => L.onClick(Z)
|
|
642
|
+
}),
|
|
643
|
+
y("div", tl, [
|
|
644
|
+
o(R, {
|
|
645
|
+
"z-index": 99,
|
|
646
|
+
content: l(be)(n),
|
|
647
|
+
class: "handle"
|
|
684
648
|
}, {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
class: se(
|
|
688
|
-
L.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
689
|
-
)
|
|
690
|
-
}, J(L.label), 3)
|
|
649
|
+
default: m(() => [
|
|
650
|
+
y("p", ol, z(l(be)(n)), 1)
|
|
691
651
|
]),
|
|
692
652
|
_: 2
|
|
693
|
-
}, 1032, ["
|
|
653
|
+
}, 1032, ["content"]),
|
|
654
|
+
te.value.find(
|
|
655
|
+
(Z) => Z.name === n.schemaName
|
|
656
|
+
) ? J("", !0) : (u(), k(R, {
|
|
657
|
+
key: 0,
|
|
658
|
+
content: l(p)("report.section.filter.missingSchema"),
|
|
659
|
+
"z-index": 99
|
|
660
|
+
}, {
|
|
661
|
+
default: m(() => [
|
|
662
|
+
o(C, {
|
|
663
|
+
name: "warning",
|
|
664
|
+
class: "text-fm-color-system-error-300"
|
|
665
|
+
})
|
|
666
|
+
]),
|
|
667
|
+
_: 1
|
|
668
|
+
}, 8, ["content"])),
|
|
669
|
+
(ne = n.tileIds) != null && ne.length ? J("", !0) : (u(), k(R, {
|
|
670
|
+
key: 1,
|
|
671
|
+
content: l(p)("report.section.filter.missingTileIds"),
|
|
672
|
+
"z-index": 99
|
|
673
|
+
}, {
|
|
674
|
+
default: m(() => [
|
|
675
|
+
o(C, {
|
|
676
|
+
name: "warning",
|
|
677
|
+
class: "text-fm-color-system-warning-300"
|
|
678
|
+
})
|
|
679
|
+
]),
|
|
680
|
+
_: 1
|
|
681
|
+
}, 8, ["content"]))
|
|
694
682
|
]),
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
683
|
+
t[12] || (t[12] = y("div", { class: "grow" }, null, -1)),
|
|
684
|
+
o(O, {
|
|
685
|
+
trigger: "click",
|
|
686
|
+
shift: !0,
|
|
687
|
+
"stop-click-propagation": !0
|
|
688
|
+
}, {
|
|
689
|
+
"menu-button": m(() => [
|
|
690
|
+
o(_, {
|
|
691
|
+
"append-icon": "more_vert",
|
|
692
|
+
variant: "tertiary"
|
|
693
|
+
})
|
|
694
|
+
]),
|
|
695
|
+
default: m(() => [
|
|
696
|
+
(u(), T(j, null, ee(M, (Z, ke) => o(P, {
|
|
697
|
+
key: ke,
|
|
698
|
+
onClick: (wl) => Z.onClick(Y)
|
|
699
|
+
}, {
|
|
700
|
+
label: m(() => [
|
|
701
|
+
y("p", {
|
|
702
|
+
class: ue(
|
|
703
|
+
Z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
704
|
+
)
|
|
705
|
+
}, z(Z.label), 3)
|
|
706
|
+
]),
|
|
707
|
+
_: 2
|
|
708
|
+
}, 1032, ["onClick"])), 64))
|
|
709
|
+
]),
|
|
710
|
+
_: 2
|
|
711
|
+
}, 1024)
|
|
712
|
+
];
|
|
713
|
+
}),
|
|
698
714
|
_: 2
|
|
699
715
|
}, 1024)
|
|
700
716
|
]),
|
|
@@ -707,41 +723,41 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
707
723
|
]),
|
|
708
724
|
_: 1
|
|
709
725
|
}),
|
|
710
|
-
|
|
726
|
+
y("div", al, [
|
|
711
727
|
o(_, {
|
|
712
|
-
label: l(
|
|
728
|
+
label: l(p)("report.editor.addWidget"),
|
|
713
729
|
variant: "secondary",
|
|
714
730
|
icon: "add",
|
|
715
731
|
"icon-position": "prepend",
|
|
716
|
-
"border-color": l(
|
|
717
|
-
"text-color": l(
|
|
718
|
-
onClick: t[8] || (t[8] = (
|
|
732
|
+
"border-color": l(re).ColorPrimary,
|
|
733
|
+
"text-color": l(re).ColorPrimary,
|
|
734
|
+
onClick: t[8] || (t[8] = (n) => L.value = !0)
|
|
719
735
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
720
|
-
o(
|
|
736
|
+
o(me, null, {
|
|
721
737
|
default: m(() => [
|
|
722
|
-
o(l(
|
|
723
|
-
list:
|
|
738
|
+
o(l(Ce), {
|
|
739
|
+
list: r.value.tiles,
|
|
724
740
|
"item-key": "id",
|
|
725
741
|
class: "flex flex-col gap-2 cursor-grab",
|
|
726
742
|
handle: ".handle"
|
|
727
743
|
}, {
|
|
728
|
-
item: m(({ element:
|
|
729
|
-
o(
|
|
744
|
+
item: m(({ element: n, index: Y }) => [
|
|
745
|
+
o(ie, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
730
746
|
default: m(() => [
|
|
731
|
-
o(
|
|
747
|
+
o(C, {
|
|
732
748
|
name: "drag_handle",
|
|
733
749
|
class: "handle"
|
|
734
750
|
}),
|
|
735
|
-
o(
|
|
736
|
-
content:
|
|
751
|
+
o(R, {
|
|
752
|
+
content: n.widget.title ? oe(n.widget.title) : l(p)("report.editor.widget", { index: Y + 1 }),
|
|
737
753
|
class: "handle"
|
|
738
754
|
}, {
|
|
739
755
|
default: m(() => [
|
|
740
|
-
|
|
756
|
+
y("p", nl, z(n.widget.title ? oe(n.widget.title) : l(p)("report.editor.widget", { index: Y + 1 })), 1)
|
|
741
757
|
]),
|
|
742
758
|
_: 2
|
|
743
759
|
}, 1032, ["content"]),
|
|
744
|
-
t[13] || (t[13] =
|
|
760
|
+
t[13] || (t[13] = y("div", { class: "grow" }, null, -1)),
|
|
745
761
|
o(O, {
|
|
746
762
|
trigger: "click",
|
|
747
763
|
shift: !0,
|
|
@@ -754,16 +770,16 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
754
770
|
})
|
|
755
771
|
]),
|
|
756
772
|
default: m(() => [
|
|
757
|
-
(u(), T(j, null, ee(x, (
|
|
758
|
-
key:
|
|
759
|
-
onClick: (
|
|
773
|
+
(u(), T(j, null, ee(x, (ne, Z) => o(P, {
|
|
774
|
+
key: Z,
|
|
775
|
+
onClick: (ke) => ne.onClick(Y)
|
|
760
776
|
}, {
|
|
761
777
|
label: m(() => [
|
|
762
|
-
|
|
763
|
-
class:
|
|
764
|
-
|
|
778
|
+
y("p", {
|
|
779
|
+
class: ue(
|
|
780
|
+
ne.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
765
781
|
)
|
|
766
|
-
},
|
|
782
|
+
}, z(ne.label), 3)
|
|
767
783
|
]),
|
|
768
784
|
_: 2
|
|
769
785
|
}, 1032, ["onClick"])), 64))
|
|
@@ -804,9 +820,9 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
804
820
|
}, gl = {
|
|
805
821
|
key: 0,
|
|
806
822
|
class: "w-full grid grid-cols-12 gap-[24px] p-24"
|
|
807
|
-
}, bl = /* @__PURE__ */
|
|
823
|
+
}, bl = /* @__PURE__ */ K({
|
|
808
824
|
__name: "ReportEditorViewport",
|
|
809
|
-
props: /* @__PURE__ */
|
|
825
|
+
props: /* @__PURE__ */ G({
|
|
810
826
|
hideConfiguration: { type: Boolean, required: !1, default: !1 },
|
|
811
827
|
previewWidth: { type: Number, required: !0 },
|
|
812
828
|
previewHeight: { type: Number, required: !0 },
|
|
@@ -816,137 +832,137 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
816
832
|
} },
|
|
817
833
|
modelModifiers: {}
|
|
818
834
|
}),
|
|
819
|
-
emits: /* @__PURE__ */
|
|
820
|
-
setup(
|
|
821
|
-
const { breakpoints:
|
|
822
|
-
return (
|
|
823
|
-
const D =
|
|
835
|
+
emits: /* @__PURE__ */ G(["hideConfiguration"], ["update:modelValue"]),
|
|
836
|
+
setup(V, { emit: s }) {
|
|
837
|
+
const { breakpoints: r } = fe(), i = A(V, "modelValue"), h = V, c = U(() => h.previewWidth > 0 && h.previewHeight > 0), F = U(() => r.value.sm || r.value.xs), g = s;
|
|
838
|
+
return (S, d) => {
|
|
839
|
+
const D = f("FmCircularProgress"), q = f("FmButton"), $ = f("FmMenuDivider"), B = f("FmCard");
|
|
824
840
|
return u(), T("div", rl, [
|
|
825
841
|
i.value ? (u(), T(j, { key: 1 }, [
|
|
826
|
-
c.value ?
|
|
842
|
+
c.value ? J("", !0) : (u(), k(Je, {
|
|
827
843
|
key: 0,
|
|
828
|
-
"model-value": !
|
|
844
|
+
"model-value": !h.hideConfiguration
|
|
829
845
|
}, {
|
|
830
846
|
right: m(() => [
|
|
831
|
-
|
|
832
|
-
i.value ? (u(),
|
|
847
|
+
y("div", il, [
|
|
848
|
+
i.value ? (u(), k(Te, {
|
|
833
849
|
key: 0,
|
|
834
850
|
modelValue: i.value,
|
|
835
851
|
"onUpdate:modelValue": d[0] || (d[0] = (b) => i.value = b),
|
|
836
|
-
"hide-configuration":
|
|
852
|
+
"hide-configuration": h.hideConfiguration,
|
|
837
853
|
onHideConfiguration: d[1] || (d[1] = (b) => g("hideConfiguration", b))
|
|
838
|
-
}, null, 8, ["modelValue", "hide-configuration"])) :
|
|
854
|
+
}, null, 8, ["modelValue", "hide-configuration"])) : J("", !0)
|
|
839
855
|
])
|
|
840
856
|
]),
|
|
841
857
|
left: m(() => [
|
|
842
|
-
|
|
843
|
-
o(
|
|
858
|
+
y("div", sl, [
|
|
859
|
+
o(q, {
|
|
844
860
|
variant: "secondary",
|
|
845
861
|
icon: "keyboard_double_arrow_right",
|
|
846
|
-
"border-color": l(
|
|
847
|
-
"text-color": l(
|
|
862
|
+
"border-color": l(re).ColorPrimary,
|
|
863
|
+
"text-color": l(re).ColorPrimary,
|
|
848
864
|
class: "m-24 my-16",
|
|
849
865
|
size: "md",
|
|
850
|
-
onClick: d[2] || (d[2] = (b) => g("hideConfiguration", !
|
|
866
|
+
onClick: d[2] || (d[2] = (b) => g("hideConfiguration", !h.hideConfiguration))
|
|
851
867
|
}, null, 8, ["border-color", "text-color"])
|
|
852
868
|
])
|
|
853
869
|
]),
|
|
854
870
|
_: 1
|
|
855
871
|
}, 8, ["model-value"])),
|
|
856
|
-
o(
|
|
872
|
+
o($, {
|
|
857
873
|
vertical: "",
|
|
858
874
|
style: { margin: "0px" }
|
|
859
875
|
}),
|
|
860
876
|
!F.value && !c.value ? (u(), T("div", ul, [
|
|
861
877
|
i.value.tiles.length > 0 ? (u(), T("div", dl, [
|
|
862
|
-
|
|
863
|
-
o(
|
|
878
|
+
y("div", ml, [
|
|
879
|
+
o(Se)
|
|
864
880
|
]),
|
|
865
|
-
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(),
|
|
866
|
-
key: `${l(
|
|
881
|
+
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(), k(ye, {
|
|
882
|
+
key: `${l(se)()}_${N}`,
|
|
867
883
|
"model-value": b,
|
|
868
884
|
index: N,
|
|
869
885
|
"hide-export": !0
|
|
870
886
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
871
|
-
])) : (u(),
|
|
887
|
+
])) : (u(), k(he, { key: 1 }))
|
|
872
888
|
])) : F.value && !c.value ? (u(), T("div", cl, [
|
|
873
889
|
o(B, { class: "px-5 pb-28" }, {
|
|
874
890
|
default: m(() => [
|
|
875
891
|
i.value.tiles.length > 0 ? (u(), T("div", pl, [
|
|
876
|
-
|
|
877
|
-
o(
|
|
892
|
+
y("div", vl, [
|
|
893
|
+
o(Se)
|
|
878
894
|
]),
|
|
879
|
-
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(),
|
|
880
|
-
key: `${l(
|
|
895
|
+
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(), k(ye, {
|
|
896
|
+
key: `${l(se)()}_${N}`,
|
|
881
897
|
"model-value": b,
|
|
882
898
|
index: N,
|
|
883
899
|
"hide-export": !0
|
|
884
900
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
885
|
-
])) : (u(),
|
|
901
|
+
])) : (u(), k(he, { key: 1 }))
|
|
886
902
|
]),
|
|
887
903
|
_: 1
|
|
888
904
|
}),
|
|
889
|
-
i.value ? (u(),
|
|
905
|
+
i.value ? (u(), k(Te, {
|
|
890
906
|
key: 0,
|
|
891
907
|
modelValue: i.value,
|
|
892
908
|
"onUpdate:modelValue": d[3] || (d[3] = (b) => i.value = b),
|
|
893
|
-
"hide-configuration":
|
|
909
|
+
"hide-configuration": h.hideConfiguration,
|
|
894
910
|
onHideConfiguration: d[4] || (d[4] = (b) => {
|
|
895
911
|
g("hideConfiguration", b);
|
|
896
912
|
})
|
|
897
|
-
}, null, 8, ["modelValue", "hide-configuration"])) :
|
|
913
|
+
}, null, 8, ["modelValue", "hide-configuration"])) : J("", !0)
|
|
898
914
|
])) : (u(), T("div", fl, [
|
|
899
|
-
|
|
915
|
+
y("div", {
|
|
900
916
|
style: we({
|
|
901
917
|
transformOrigin: "top center",
|
|
902
|
-
transform: `scale(${
|
|
918
|
+
transform: `scale(${h.previewScale})`
|
|
903
919
|
})
|
|
904
920
|
}, [
|
|
905
|
-
|
|
921
|
+
y("div", {
|
|
906
922
|
class: "overflow-y-auto bg-white rounded-lg",
|
|
907
923
|
style: we({
|
|
908
|
-
width:
|
|
909
|
-
height:
|
|
924
|
+
width: h.previewWidth + "px",
|
|
925
|
+
height: h.previewHeight + "px"
|
|
910
926
|
})
|
|
911
927
|
}, [
|
|
912
928
|
i.value.tiles.length > 0 ? (u(), T("div", gl, [
|
|
913
|
-
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(),
|
|
914
|
-
key: `${l(
|
|
929
|
+
(u(!0), T(j, null, ee(i.value.tiles, (b, N) => (u(), k(ye, {
|
|
930
|
+
key: `${l(se)()}_${N}`,
|
|
915
931
|
"model-value": b,
|
|
916
932
|
index: N,
|
|
917
933
|
"hide-export": !0,
|
|
918
|
-
"custom-screen-width":
|
|
934
|
+
"custom-screen-width": h.previewWidth
|
|
919
935
|
}, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
|
|
920
|
-
])) : (u(),
|
|
936
|
+
])) : (u(), k(he, { key: 1 }))
|
|
921
937
|
], 4)
|
|
922
938
|
], 4)
|
|
923
939
|
]))
|
|
924
|
-
], 64)) : (u(),
|
|
940
|
+
], 64)) : (u(), k(D, { key: 0 }))
|
|
925
941
|
]);
|
|
926
942
|
};
|
|
927
943
|
}
|
|
928
|
-
}),
|
|
944
|
+
}), yl = { class: "flex items-center gap-4" }, hl = { class: "flex justify-center items-center gap-2 w-full" }, _l = { class: "flex gap-4" }, Dl = /* @__PURE__ */ K({
|
|
929
945
|
__name: "ReportEditor",
|
|
930
|
-
setup(
|
|
931
|
-
const s =
|
|
946
|
+
setup(V) {
|
|
947
|
+
const s = Ue(), r = De(), i = Me(), { promptLoader: h } = Ge(), { t: c } = de(), { currentReport: F, editingReport: g } = ve(i), { breakpoints: S } = fe(), d = U(() => {
|
|
932
948
|
var x;
|
|
933
949
|
return !((x = g.value) != null && x.editable);
|
|
934
950
|
}), D = U(() => {
|
|
935
951
|
var x;
|
|
936
952
|
return ((x = g.value) == null ? void 0 : x.name) ?? c("report.editor.newReport");
|
|
937
|
-
}),
|
|
953
|
+
}), q = Be(), { promptMessage: $ } = Ie(), B = I(!1);
|
|
938
954
|
async function b() {
|
|
939
955
|
if (!g.value || g.value.tiles.length === 0) {
|
|
940
|
-
|
|
956
|
+
q.open({ message: c("report.messages.noWidget"), type: "error" });
|
|
941
957
|
return;
|
|
942
958
|
}
|
|
943
959
|
const x = d.value ? c("report.common.clone") : c("report.common.save");
|
|
944
|
-
if (await
|
|
960
|
+
if (await $({
|
|
945
961
|
title: `${c("report.messages.saveReport")}`,
|
|
946
962
|
message: c("report.messages.confirmAction", { action: x, name: D.value })
|
|
947
963
|
}))
|
|
948
964
|
try {
|
|
949
|
-
await
|
|
965
|
+
await h(async () => {
|
|
950
966
|
if (d.value) {
|
|
951
967
|
const a = JSON.parse(JSON.stringify(g.value));
|
|
952
968
|
a.editable = !0, a.id = "", a.name = `${a.name} ${c("report.common.duplicate")}`, await i.createOrUpdateReport(a);
|
|
@@ -954,11 +970,11 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
954
970
|
g.value && await i.createOrUpdateReport(g.value);
|
|
955
971
|
s.push({
|
|
956
972
|
name: "reportView",
|
|
957
|
-
query:
|
|
973
|
+
query: r.query
|
|
958
974
|
});
|
|
959
975
|
});
|
|
960
976
|
} catch (a) {
|
|
961
|
-
console.log(a),
|
|
977
|
+
console.log(a), q.open({
|
|
962
978
|
message: c("report.messages.failedToAction", { action: x }),
|
|
963
979
|
type: "error"
|
|
964
980
|
});
|
|
@@ -967,7 +983,7 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
967
983
|
async function N() {
|
|
968
984
|
var M;
|
|
969
985
|
if (!g.value) return;
|
|
970
|
-
await
|
|
986
|
+
await $({
|
|
971
987
|
title: c("report.common.report", 1),
|
|
972
988
|
message: c("report.editor.notSaved", { name: (M = g.value) == null ? void 0 : M.name })
|
|
973
989
|
}) && (g.value = JSON.parse(JSON.stringify(F.value)), s.back());
|
|
@@ -975,7 +991,7 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
975
991
|
Re(() => {
|
|
976
992
|
g.value || s.push({ name: "reports" });
|
|
977
993
|
});
|
|
978
|
-
const
|
|
994
|
+
const Q = [
|
|
979
995
|
{
|
|
980
996
|
label: c("report.common.default"),
|
|
981
997
|
width: void 0,
|
|
@@ -996,53 +1012,53 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
996
1012
|
width: 390,
|
|
997
1013
|
height: 859
|
|
998
1014
|
}
|
|
999
|
-
],
|
|
1000
|
-
if (!
|
|
1001
|
-
let x = (
|
|
1002
|
-
return M > window.innerWidth && (x = window.innerWidth /
|
|
1015
|
+
], W = I(Q[0]), E = I(!1), L = U(() => E.value ? Math.max(W.value.width || 0, W.value.height || 0) : Math.min(W.value.width || 0, W.value.height || 0)), p = U(() => E.value ? Math.min(W.value.width || 0, W.value.height || 0) : Math.max(W.value.width || 0, W.value.height || 0)), X = U(() => window.innerHeight - 72 - 56), le = U(() => {
|
|
1016
|
+
if (!L.value) return 1;
|
|
1017
|
+
let x = (X.value - 48) / L.value, M = p.value * x;
|
|
1018
|
+
return M > window.innerWidth && (x = window.innerWidth / p.value, M = p.value * x), x > 1 ? 1 : x;
|
|
1003
1019
|
});
|
|
1004
1020
|
function te(x) {
|
|
1005
|
-
|
|
1021
|
+
W.value = x;
|
|
1006
1022
|
}
|
|
1007
1023
|
function oe() {
|
|
1008
1024
|
E.value = !E.value;
|
|
1009
1025
|
}
|
|
1010
1026
|
return (x, M) => {
|
|
1011
|
-
const a =
|
|
1012
|
-
return u(),
|
|
1027
|
+
const a = f("FmTooltip"), e = f("FmButton"), t = f("FmPageHead");
|
|
1028
|
+
return u(), k(Le, null, {
|
|
1013
1029
|
default: m(() => [
|
|
1014
1030
|
o(t, {
|
|
1015
1031
|
actions: [
|
|
1016
1032
|
{ label: l(c)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
1017
1033
|
{ label: l(c)("report.common.saveReport"), value: "save", isPrimary: !0, prependIcon: "download" }
|
|
1018
1034
|
],
|
|
1019
|
-
"onClick:action": M[0] || (M[0] = (
|
|
1020
|
-
|
|
1035
|
+
"onClick:action": M[0] || (M[0] = (v) => {
|
|
1036
|
+
v === "cancel" && N(), v === "save" && b();
|
|
1021
1037
|
})
|
|
1022
1038
|
}, {
|
|
1023
1039
|
title: m(() => [
|
|
1024
|
-
|
|
1040
|
+
y("div", yl, [
|
|
1025
1041
|
o(a, {
|
|
1026
1042
|
content: D.value,
|
|
1027
1043
|
placement: "bottom"
|
|
1028
1044
|
}, {
|
|
1029
1045
|
default: m(() => [
|
|
1030
|
-
|
|
1031
|
-
class:
|
|
1032
|
-
},
|
|
1046
|
+
y("p", {
|
|
1047
|
+
class: ue(`${l(S).sm || l(S).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
|
|
1048
|
+
}, z(D.value), 3)
|
|
1033
1049
|
]),
|
|
1034
1050
|
_: 1
|
|
1035
1051
|
}, 8, ["content"]),
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
(u(), T(j, null, ee(
|
|
1052
|
+
y("div", hl, [
|
|
1053
|
+
y("div", _l, [
|
|
1054
|
+
(u(), T(j, null, ee(Q, (v) => {
|
|
1039
1055
|
var w;
|
|
1040
1056
|
return o(e, {
|
|
1041
|
-
key:
|
|
1042
|
-
label:
|
|
1043
|
-
variant: ((w =
|
|
1057
|
+
key: v.label,
|
|
1058
|
+
label: v.label,
|
|
1059
|
+
variant: ((w = W.value) == null ? void 0 : w.label) === v.label ? "primary" : "secondary",
|
|
1044
1060
|
size: "md",
|
|
1045
|
-
onClick: (_) => te(
|
|
1061
|
+
onClick: (_) => te(v)
|
|
1046
1062
|
}, null, 8, ["label", "variant", "onClick"]);
|
|
1047
1063
|
}), 64))
|
|
1048
1064
|
]),
|
|
@@ -1058,18 +1074,18 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
1058
1074
|
]),
|
|
1059
1075
|
_: 1
|
|
1060
1076
|
}, 8, ["actions"]),
|
|
1061
|
-
l(g) ? (u(),
|
|
1077
|
+
l(g) ? (u(), k(bl, {
|
|
1062
1078
|
key: 0,
|
|
1063
1079
|
modelValue: l(g),
|
|
1064
|
-
"onUpdate:modelValue": M[1] || (M[1] = (
|
|
1065
|
-
style: we({ height:
|
|
1066
|
-
class:
|
|
1080
|
+
"onUpdate:modelValue": M[1] || (M[1] = (v) => Ne(g) ? g.value = v : null),
|
|
1081
|
+
style: we({ height: X.value + "px" }),
|
|
1082
|
+
class: ue(l(S).lg || l(S).md ? "flex" : ""),
|
|
1067
1083
|
"hide-configuration": B.value,
|
|
1068
|
-
"preview-width":
|
|
1069
|
-
"preview-height":
|
|
1084
|
+
"preview-width": p.value,
|
|
1085
|
+
"preview-height": L.value,
|
|
1070
1086
|
"preview-scale": le.value,
|
|
1071
|
-
onHideConfiguration: M[2] || (M[2] = (
|
|
1072
|
-
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) :
|
|
1087
|
+
onHideConfiguration: M[2] || (M[2] = (v) => B.value = v)
|
|
1088
|
+
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : J("", !0)
|
|
1073
1089
|
]),
|
|
1074
1090
|
_: 1
|
|
1075
1091
|
});
|
|
@@ -1077,5 +1093,5 @@ const Ae = /* @__PURE__ */ Q({
|
|
|
1077
1093
|
}
|
|
1078
1094
|
});
|
|
1079
1095
|
export {
|
|
1080
|
-
|
|
1096
|
+
Dl as default
|
|
1081
1097
|
};
|