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