@feedmepos/mf-report 5.9.3-beta.0 → 5.10.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-BRF4io7t.js → App-DovsQcJE.js} +3 -3
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DZq49D3u.js → Default.vue_vue_type_script_setup_true_lang-Caht2WAi.js} +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DEkXmB2J.js +1482 -0
- package/dist/{InsightView-WJFDyq6J.js → InsightView-C25N5KB0.js} +2 -2
- package/dist/{Layout-CqWSAiF3.js → Layout-DTG44ar-.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-fOM1sYRD.js → MenuTab.vue_vue_type_script_setup_true_lang-DYTJAjt5.js} +2 -2
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-Zso-ZcOq.js → NavigationTab.vue_vue_type_script_setup_true_lang-Bfbg4FSN.js} +1 -1
- package/dist/{OverviewView-CiMfInUt.js → OverviewView-CB7ZICC-.js} +4 -4
- package/dist/{Report-BF0_jOYc.js → Report-9_PTplZ5.js} +2 -2
- package/dist/{ReportEditor-BH4AV5b0.js → ReportEditor-xfdm7GQz.js} +375 -371
- package/dist/{ReportView-BCQI4awq.js → ReportView-CIadPLZc.js} +5 -5
- package/dist/{Setting-BXHR_k_n.js → Setting-qZD-DpyA.js} +2 -2
- package/dist/{TileEditor-Btav-eWH.js → TileEditor-DWL8wv4e.js} +1070 -1048
- package/dist/{TransitionFade-DNs7JUcf.js → TransitionFade-CjoVItWI.js} +2 -2
- package/dist/app.js +21 -13
- package/dist/assets/formatChartData.worker-Bp7azaza.js +4 -0
- package/dist/v4-DBw0cp99.js +10815 -0
- package/package.json +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DpmOkz-L.js +0 -1447
- package/dist/v4-CAyILVZZ.js +0 -18676
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as G, mergeModels as J, useModel as j, ref as
|
|
2
|
-
import { W as
|
|
3
|
-
import { D as K, c as Ie, C as
|
|
4
|
-
import { storeToRefs as
|
|
1
|
+
import { defineComponent as G, mergeModels as J, useModel as j, ref as R, computed as N, resolveComponent as v, createBlock as C, openBlock as i, withCtx as s, createElementVNode as h, createVNode as a, unref as e, normalizeClass as le, createTextVNode as de, toDisplayString as E, createElementBlock as S, Fragment as L, renderSlot as Ce, createCommentVNode as Y, watch as me, renderList as Q, resolveDynamicComponent as Be, isRef as ke, normalizeStyle as ce, onMounted as Ue } from "vue";
|
|
2
|
+
import { W as We, i as De, S as he, d as ye, T as Re, _ as qe } from "./TransitionFade-CjoVItWI.js";
|
|
3
|
+
import { D as K, c as Ie, C as we, a as Ve, b as Ee, v as ee } from "./v4-DBw0cp99.js";
|
|
4
|
+
import { storeToRefs as ae } from "pinia";
|
|
5
5
|
import { useRouter as Se, useRoute as $e } from "vue-router";
|
|
6
|
-
import { useBreakpoints as
|
|
6
|
+
import { useBreakpoints as ne, useSnackbar as Oe, FmButtonColorThemeVariant as X } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as Te } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { u as te, j as
|
|
9
|
-
import { _ as
|
|
10
|
-
import { _ as
|
|
11
|
-
import { r as
|
|
8
|
+
import { u as te, j as ie, f as He } from "./vue-i18n-CbAseuRE.js";
|
|
9
|
+
import { _ as se } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DEkXmB2J.js";
|
|
10
|
+
import { _ as ue } from "./NoData.vue_vue_type_script_setup_true_lang-DGTWa4E5.js";
|
|
11
|
+
import { r as _e } from "./i18n-Cif1I9J2.js";
|
|
12
12
|
import { _ as Fe } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Dq9vY9mj.js";
|
|
13
|
-
const
|
|
13
|
+
const Pe = /* @__PURE__ */ G({
|
|
14
14
|
__name: "WidgetDialog",
|
|
15
15
|
props: /* @__PURE__ */ J({
|
|
16
16
|
isOpen: { type: Boolean }
|
|
@@ -19,49 +19,49 @@ const ze = /* @__PURE__ */ G({
|
|
|
19
19
|
modelModifiers: {}
|
|
20
20
|
}),
|
|
21
21
|
emits: /* @__PURE__ */ J(["update:isOpen"], ["update:modelValue"]),
|
|
22
|
-
setup(
|
|
23
|
-
const { t: n } = te(), { breakpoints: r } =
|
|
24
|
-
function
|
|
25
|
-
|
|
22
|
+
setup(x, { emit: d }) {
|
|
23
|
+
const { t: n } = te(), { breakpoints: r } = ne(), w = j(x, "modelValue"), m = x, _ = d;
|
|
24
|
+
function u() {
|
|
25
|
+
_("update:isOpen", !1);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
c.value && (
|
|
27
|
+
function k() {
|
|
28
|
+
c.value && (w.value = c.value, c.value = void 0, _("update:isOpen", !1));
|
|
29
29
|
}
|
|
30
|
-
const c =
|
|
31
|
-
return (
|
|
32
|
-
const B = v("FmButton"),
|
|
33
|
-
return i(),
|
|
34
|
-
"model-value":
|
|
30
|
+
const c = R(), q = N(() => !c.value);
|
|
31
|
+
return (I, T) => {
|
|
32
|
+
const B = v("FmButton"), b = v("FmDialog");
|
|
33
|
+
return i(), C(b, {
|
|
34
|
+
"model-value": m.isOpen
|
|
35
35
|
}, {
|
|
36
36
|
"dialog-header": s(() => [
|
|
37
|
-
|
|
37
|
+
de(E(e(n)("report.widget.type")), 1)
|
|
38
38
|
]),
|
|
39
39
|
default: s(() => [
|
|
40
|
-
a(
|
|
40
|
+
a(We, {
|
|
41
41
|
modelValue: c.value,
|
|
42
|
-
"onUpdate:modelValue":
|
|
42
|
+
"onUpdate:modelValue": T[0] || (T[0] = (O) => c.value = O),
|
|
43
43
|
class: le(`grid ${e(r).lg || e(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
47
|
"dialog-footer": s(() => [
|
|
48
|
-
|
|
48
|
+
T[1] || (T[1] = h("div", { class: "grow" }, null, -1)),
|
|
49
49
|
a(B, {
|
|
50
50
|
label: e(n)("report.common.cancel"),
|
|
51
51
|
variant: "tertiary",
|
|
52
|
-
onClick:
|
|
52
|
+
onClick: u
|
|
53
53
|
}, null, 8, ["label"]),
|
|
54
54
|
a(B, {
|
|
55
55
|
label: e(n)("report.common.confirm"),
|
|
56
|
-
disabled:
|
|
57
|
-
onClick:
|
|
56
|
+
disabled: q.value,
|
|
57
|
+
onClick: k
|
|
58
58
|
}, null, 8, ["label", "disabled"])
|
|
59
59
|
]),
|
|
60
60
|
_: 1
|
|
61
61
|
}, 8, ["model-value"]);
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), ze = { class: "fm-typo-en-body-lg-600" }, pe = /* @__PURE__ */ G({
|
|
65
65
|
__name: "ReportEditorTabHeader",
|
|
66
66
|
props: /* @__PURE__ */ J({
|
|
67
67
|
icon: {
|
|
@@ -73,17 +73,17 @@ const ze = /* @__PURE__ */ G({
|
|
|
73
73
|
modelModifiers: {}
|
|
74
74
|
}),
|
|
75
75
|
emits: ["update:modelValue"],
|
|
76
|
-
setup(
|
|
77
|
-
const { t:
|
|
78
|
-
return (
|
|
79
|
-
const
|
|
80
|
-
return i(),
|
|
76
|
+
setup(x) {
|
|
77
|
+
const { t: d } = te(), n = j(x, "modelValue"), r = x;
|
|
78
|
+
return (w, m) => {
|
|
79
|
+
const _ = v("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: m[0] || (m[0] = (u) => n.value = !n.value)
|
|
83
83
|
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
a(
|
|
84
|
+
h("p", ze, E(e(d)("report.editor.customizeReport")), 1),
|
|
85
|
+
m[1] || (m[1] = h("div", { class: "grow" }, null, -1)),
|
|
86
|
+
a(_, {
|
|
87
87
|
name: r.icon
|
|
88
88
|
}, null, 8, ["name"])
|
|
89
89
|
]);
|
|
@@ -96,12 +96,12 @@ const ze = /* @__PURE__ */ G({
|
|
|
96
96
|
modelModifiers: {}
|
|
97
97
|
},
|
|
98
98
|
emits: ["update:modelValue"],
|
|
99
|
-
setup(
|
|
100
|
-
const
|
|
101
|
-
return (n, r) => (i(),
|
|
99
|
+
setup(x) {
|
|
100
|
+
const d = j(x, "modelValue");
|
|
101
|
+
return (n, r) => (i(), S(L, null, [
|
|
102
102
|
a(pe, {
|
|
103
|
-
modelValue:
|
|
104
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
103
|
+
modelValue: d.value,
|
|
104
|
+
"onUpdate:modelValue": r[0] || (r[0] = (w) => d.value = w),
|
|
105
105
|
icon: "keyboard_double_arrow_left"
|
|
106
106
|
}, null, 8, ["modelValue"]),
|
|
107
107
|
Ce(n.$slots, "default")
|
|
@@ -114,29 +114,29 @@ const ze = /* @__PURE__ */ G({
|
|
|
114
114
|
modelModifiers: {}
|
|
115
115
|
},
|
|
116
116
|
emits: ["update:modelValue"],
|
|
117
|
-
setup(
|
|
118
|
-
const
|
|
117
|
+
setup(x) {
|
|
118
|
+
const d = j(x, "modelValue");
|
|
119
119
|
return (n, r) => {
|
|
120
|
-
const
|
|
121
|
-
return i(),
|
|
120
|
+
const w = v("FmTopSheet"), m = v("FmCard");
|
|
121
|
+
return i(), C(m, { class: "fixed bottom-0 w-full" }, {
|
|
122
122
|
default: s(() => [
|
|
123
123
|
a(pe, {
|
|
124
|
-
modelValue:
|
|
125
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
124
|
+
modelValue: d.value,
|
|
125
|
+
"onUpdate:modelValue": r[0] || (r[0] = (_) => d.value = _),
|
|
126
126
|
icon: "keyboard_double_arrow_up"
|
|
127
127
|
}, null, 8, ["modelValue"]),
|
|
128
|
-
a(
|
|
129
|
-
modelValue:
|
|
130
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
128
|
+
a(w, {
|
|
129
|
+
modelValue: d.value,
|
|
130
|
+
"onUpdate:modelValue": r[2] || (r[2] = (_) => d.value = _),
|
|
131
131
|
"fullscreen-size": "sm"
|
|
132
132
|
}, {
|
|
133
133
|
default: s(() => [
|
|
134
134
|
a(pe, {
|
|
135
|
-
modelValue:
|
|
136
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
135
|
+
modelValue: d.value,
|
|
136
|
+
"onUpdate:modelValue": r[1] || (r[1] = (_) => d.value = _),
|
|
137
137
|
icon: "keyboard_double_arrow_down"
|
|
138
138
|
}, null, 8, ["modelValue"]),
|
|
139
|
-
|
|
139
|
+
d.value ? Ce(n.$slots, "default", { key: 0 }) : Y("", !0)
|
|
140
140
|
]),
|
|
141
141
|
_: 3
|
|
142
142
|
}, 8, ["modelValue"])
|
|
@@ -168,152 +168,152 @@ const ze = /* @__PURE__ */ G({
|
|
|
168
168
|
isOpenModifiers: {}
|
|
169
169
|
}),
|
|
170
170
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
171
|
-
setup(
|
|
172
|
-
const { t:
|
|
173
|
-
|
|
174
|
-
var
|
|
175
|
-
p && (
|
|
176
|
-
(
|
|
177
|
-
var
|
|
178
|
-
return
|
|
171
|
+
setup(x) {
|
|
172
|
+
const { t: d } = te(), n = j(x, "globalFilter"), r = j(x, "isOpen"), w = Oe(), m = x, _ = R(), u = R(), k = R(), c = R([]);
|
|
173
|
+
me(r, (p) => {
|
|
174
|
+
var l, V, U;
|
|
175
|
+
p && (_.value = ((l = n.value) == null ? void 0 : l.label) || "", u.value = m.schemas.find(
|
|
176
|
+
(W) => {
|
|
177
|
+
var M;
|
|
178
|
+
return W.name === ((M = n.value) == null ? void 0 : M.schemaName);
|
|
179
179
|
}
|
|
180
|
-
),
|
|
181
|
-
(
|
|
182
|
-
var
|
|
183
|
-
return
|
|
180
|
+
), k.value = (V = I.value.find(
|
|
181
|
+
(W) => {
|
|
182
|
+
var M;
|
|
183
|
+
return W.value.name === ((M = n.value) == null ? void 0 : M.name);
|
|
184
184
|
}
|
|
185
|
-
)) == null ? void 0 :
|
|
185
|
+
)) == null ? void 0 : V.value, c.value = ((U = n.value) == null ? void 0 : U.tileIds) || []);
|
|
186
186
|
});
|
|
187
|
-
const
|
|
188
|
-
() =>
|
|
187
|
+
const q = N(
|
|
188
|
+
() => m.schemas.map((p) => ({
|
|
189
189
|
label: p.label,
|
|
190
190
|
value: p
|
|
191
191
|
}))
|
|
192
|
-
),
|
|
192
|
+
), I = N(() => {
|
|
193
193
|
var p;
|
|
194
|
-
return (((p =
|
|
195
|
-
(
|
|
196
|
-
label:
|
|
197
|
-
value:
|
|
198
|
-
}),
|
|
194
|
+
return (((p = u.value) == null ? void 0 : p.fields) || []).reduce(
|
|
195
|
+
(l, V) => ([K.Bool, K.String, K.Timestamp].includes(V.type) && l.push({
|
|
196
|
+
label: V.label,
|
|
197
|
+
value: V
|
|
198
|
+
}), l),
|
|
199
199
|
[]
|
|
200
200
|
);
|
|
201
|
-
}),
|
|
202
|
-
var
|
|
203
|
-
const U =
|
|
204
|
-
(
|
|
201
|
+
}), T = N(() => m.tiles.reduce((p, l, V) => {
|
|
202
|
+
var M, P;
|
|
203
|
+
const U = l.widget.config.schemaNames ?? [], W = (l.widget.config.joinDatasources ?? []).flatMap(
|
|
204
|
+
(F) => F.schemaNames ?? []
|
|
205
205
|
);
|
|
206
|
-
return [...U, ...
|
|
207
|
-
label: (
|
|
208
|
-
value:
|
|
206
|
+
return [...U, ...W].includes(((M = u.value) == null ? void 0 : M.name) || "") && p.push({
|
|
207
|
+
label: (P = l == null ? void 0 : l.widget.title) != null && P.trim() ? l.widget.title : `Widget ${V + 1}`,
|
|
208
|
+
value: l.id
|
|
209
209
|
}), p;
|
|
210
210
|
}, []));
|
|
211
211
|
function B(p) {
|
|
212
|
-
var
|
|
213
|
-
p.name !== ((
|
|
212
|
+
var l;
|
|
213
|
+
p.name !== ((l = u.value) == null ? void 0 : l.name) && (u.value = p, k.value = void 0);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
215
|
+
function b(p) {
|
|
216
|
+
k.value = p;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function O(p) {
|
|
219
219
|
switch (p) {
|
|
220
220
|
case K.Timestamp:
|
|
221
|
-
return
|
|
221
|
+
return we.Between;
|
|
222
222
|
case K.Bool:
|
|
223
223
|
case K.String:
|
|
224
|
-
return
|
|
224
|
+
return we.Equal;
|
|
225
225
|
default:
|
|
226
226
|
throw new Error(`Unsupported data type: ${p}`);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
function A() {
|
|
230
|
-
if (!
|
|
231
|
-
|
|
230
|
+
if (!u.value) {
|
|
231
|
+
w.open({ message: "Invalid schema", type: "error" });
|
|
232
232
|
return;
|
|
233
233
|
}
|
|
234
|
-
|
|
235
|
-
schemaName:
|
|
236
|
-
name:
|
|
237
|
-
label:
|
|
238
|
-
operator:
|
|
239
|
-
option:
|
|
234
|
+
k.value || w.open({ message: "Invalid dimension", type: "error" }), n.value = {
|
|
235
|
+
schemaName: u.value.name,
|
|
236
|
+
name: k.value.name,
|
|
237
|
+
label: _.value || name,
|
|
238
|
+
operator: O(k.value.type),
|
|
239
|
+
option: k.value.type === K.Timestamp ? Ie.DateTime : null,
|
|
240
240
|
tileIds: [...c.value],
|
|
241
241
|
filters: []
|
|
242
242
|
}, r.value = !1;
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function $() {
|
|
245
245
|
r.value = !1;
|
|
246
246
|
}
|
|
247
|
-
return (p,
|
|
248
|
-
const
|
|
249
|
-
return i(),
|
|
247
|
+
return (p, l) => {
|
|
248
|
+
const V = v("FmTextField"), U = v("FmLabel"), W = v("FmCheckbox"), M = v("FmForm"), P = v("FmButton"), F = v("FmDialog");
|
|
249
|
+
return i(), C(F, {
|
|
250
250
|
modelValue: r.value,
|
|
251
|
-
"onUpdate:modelValue":
|
|
251
|
+
"onUpdate:modelValue": l[4] || (l[4] = (o) => r.value = o),
|
|
252
252
|
overlay: !0,
|
|
253
253
|
"z-index": 10
|
|
254
254
|
}, {
|
|
255
255
|
"dialog-header": s(() => [
|
|
256
|
-
|
|
256
|
+
de(E(e(d)("report.section.filter.globalFilter")), 1)
|
|
257
257
|
]),
|
|
258
258
|
default: s(() => [
|
|
259
|
-
a(
|
|
259
|
+
a(M, {
|
|
260
260
|
ref: "form",
|
|
261
261
|
class: "flex flex-col gap-2 w-[490px]"
|
|
262
262
|
}, {
|
|
263
263
|
default: s(() => [
|
|
264
|
-
a(
|
|
265
|
-
modelValue:
|
|
266
|
-
"onUpdate:modelValue":
|
|
267
|
-
placeholder: e(
|
|
268
|
-
label: e(
|
|
264
|
+
a(V, {
|
|
265
|
+
modelValue: _.value,
|
|
266
|
+
"onUpdate:modelValue": l[0] || (l[0] = (o) => _.value = o),
|
|
267
|
+
placeholder: e(d)("report.section.filter.displayName"),
|
|
268
|
+
label: e(d)("report.section.filter.displayName"),
|
|
269
269
|
class: "mb-2"
|
|
270
270
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
271
271
|
a(Fe, {
|
|
272
|
-
"model-value":
|
|
273
|
-
items:
|
|
274
|
-
placeholder: e(
|
|
275
|
-
label: e(
|
|
276
|
-
"onUpdate:modelValue":
|
|
272
|
+
"model-value": u.value,
|
|
273
|
+
items: q.value,
|
|
274
|
+
placeholder: e(d)("report.section.schema.title"),
|
|
275
|
+
label: e(d)("report.section.schema.title"),
|
|
276
|
+
"onUpdate:modelValue": l[1] || (l[1] = (o) => B(o))
|
|
277
277
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
278
278
|
a(Fe, {
|
|
279
|
-
"model-value":
|
|
280
|
-
items:
|
|
281
|
-
placeholder: e(
|
|
282
|
-
label: e(
|
|
283
|
-
"onUpdate:modelValue":
|
|
279
|
+
"model-value": k.value,
|
|
280
|
+
items: I.value,
|
|
281
|
+
placeholder: e(d)("report.section.dimension.Dimension"),
|
|
282
|
+
label: e(d)("report.section.dimension.Dimension"),
|
|
283
|
+
"onUpdate:modelValue": l[2] || (l[2] = (o) => b(o))
|
|
284
284
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
285
285
|
a(U, { class: "mt-2 fm-typo-en-body-lg-600" }, {
|
|
286
286
|
default: s(() => [
|
|
287
|
-
|
|
287
|
+
de(E(e(d)("report.section.filter.applyWidget")), 1)
|
|
288
288
|
]),
|
|
289
289
|
_: 1
|
|
290
290
|
}),
|
|
291
|
-
|
|
292
|
-
(i(!0),
|
|
291
|
+
x.tiles.length > 0 ? (i(), S("div", je, [
|
|
292
|
+
(i(!0), S(L, null, Q(T.value, (o) => (i(), C(W, {
|
|
293
293
|
key: o.value,
|
|
294
294
|
modelValue: c.value,
|
|
295
|
-
"onUpdate:modelValue":
|
|
295
|
+
"onUpdate:modelValue": l[3] || (l[3] = (t) => c.value = t),
|
|
296
296
|
label: o.label,
|
|
297
297
|
value: o.value
|
|
298
298
|
}, null, 8, ["modelValue", "label", "value"]))), 128))
|
|
299
|
-
])) : (i(),
|
|
299
|
+
])) : (i(), C(U, {
|
|
300
300
|
key: 1,
|
|
301
301
|
class: "fm-typo-en-body-lg-400",
|
|
302
|
-
label: e(
|
|
302
|
+
label: e(d)("report.section.filter.noWidget")
|
|
303
303
|
}, null, 8, ["label"]))
|
|
304
304
|
]),
|
|
305
305
|
_: 1
|
|
306
306
|
}, 512)
|
|
307
307
|
]),
|
|
308
308
|
"dialog-footer": s(() => [
|
|
309
|
-
|
|
310
|
-
a(
|
|
311
|
-
label: e(
|
|
309
|
+
l[5] || (l[5] = h("div", { class: "grow" }, null, -1)),
|
|
310
|
+
a(P, {
|
|
311
|
+
label: e(d)("report.common.cancel"),
|
|
312
312
|
variant: "tertiary",
|
|
313
|
-
onClick:
|
|
313
|
+
onClick: $
|
|
314
314
|
}, null, 8, ["label"]),
|
|
315
|
-
a(
|
|
316
|
-
label: e(
|
|
315
|
+
a(P, {
|
|
316
|
+
label: e(d)("report.common.confirm"),
|
|
317
317
|
onClick: A
|
|
318
318
|
}, null, 8, ["label"])
|
|
319
319
|
]),
|
|
@@ -333,163 +333,163 @@ const ze = /* @__PURE__ */ G({
|
|
|
333
333
|
modelModifiers: {}
|
|
334
334
|
}),
|
|
335
335
|
emits: /* @__PURE__ */ J(["hideConfiguration"], ["update:modelValue"]),
|
|
336
|
-
setup(
|
|
337
|
-
const n = j(
|
|
336
|
+
setup(x, { emit: d }) {
|
|
337
|
+
const n = j(x, "modelValue"), { breakpoints: r } = ne(), w = x, m = d, _ = Se(), u = $e(), k = R(), {
|
|
338
338
|
currentSelectWidgetType: c,
|
|
339
|
-
categories:
|
|
340
|
-
editingTile:
|
|
341
|
-
editingTileIndex:
|
|
339
|
+
categories: q,
|
|
340
|
+
editingTile: I,
|
|
341
|
+
editingTileIndex: T,
|
|
342
342
|
editingGlobalFilter: B,
|
|
343
|
-
editingGlobalFilterIndex:
|
|
344
|
-
} =
|
|
345
|
-
const o = n.value.tiles.flatMap((
|
|
346
|
-
var
|
|
347
|
-
const
|
|
348
|
-
return [...
|
|
343
|
+
editingGlobalFilterIndex: b
|
|
344
|
+
} = ae(Ve()), { schemas: O } = ae(Ee()), { promptMessage: A } = Te(), $ = R(!1), p = R(!1), { t: l, te: V } = te(), U = R(void 0), W = N(() => {
|
|
345
|
+
const o = n.value.tiles.flatMap((t) => {
|
|
346
|
+
var g;
|
|
347
|
+
const D = t.widget.config.schemaNames ?? [], f = ((g = t.widget.config.joinDatasources) == null ? void 0 : g.flatMap((H) => H.schemaNames ?? [])) ?? [];
|
|
348
|
+
return [...D, ...f];
|
|
349
349
|
});
|
|
350
|
-
return [...new Set(o)].reduce((
|
|
351
|
-
const
|
|
352
|
-
return
|
|
350
|
+
return [...new Set(o)].reduce((t, D) => {
|
|
351
|
+
const f = O.value.find((g) => g.name === D);
|
|
352
|
+
return f && t.push(f), t;
|
|
353
353
|
}, []);
|
|
354
354
|
});
|
|
355
|
-
|
|
355
|
+
me(
|
|
356
356
|
() => c.value,
|
|
357
357
|
() => {
|
|
358
|
-
c.value !== void 0 && (U.value =
|
|
358
|
+
c.value !== void 0 && (U.value = De(c.value), I.value = U.value, T.value = -1, _.push({
|
|
359
359
|
name: "tileEditor",
|
|
360
|
-
query:
|
|
360
|
+
query: u.query
|
|
361
361
|
}));
|
|
362
362
|
},
|
|
363
363
|
{ immediate: !0 }
|
|
364
|
-
),
|
|
364
|
+
), me(
|
|
365
365
|
() => n.value.tiles,
|
|
366
366
|
(o) => {
|
|
367
|
-
o.forEach((
|
|
368
|
-
|
|
367
|
+
o.forEach((t) => {
|
|
368
|
+
t.id || (t.id = ee());
|
|
369
369
|
});
|
|
370
370
|
},
|
|
371
371
|
{ immediate: !0, deep: !0 }
|
|
372
372
|
);
|
|
373
|
-
const
|
|
373
|
+
const M = [
|
|
374
374
|
{
|
|
375
|
-
label:
|
|
375
|
+
label: l("report.common.edit"),
|
|
376
376
|
selected: !1,
|
|
377
377
|
variant: "tertiary",
|
|
378
378
|
onClick: (o) => {
|
|
379
|
-
|
|
379
|
+
T.value = o, I.value = JSON.parse(JSON.stringify(n.value.tiles[o])), _.push({
|
|
380
380
|
name: "tileEditor",
|
|
381
|
-
query:
|
|
381
|
+
query: u.query
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
|
-
label:
|
|
386
|
+
label: l("report.common.duplicate"),
|
|
387
387
|
selected: !1,
|
|
388
388
|
variant: "tertiary",
|
|
389
389
|
onClick: (o) => {
|
|
390
|
-
const
|
|
390
|
+
const t = {
|
|
391
391
|
...JSON.parse(JSON.stringify(n.value.tiles[o])),
|
|
392
392
|
id: ee()
|
|
393
393
|
};
|
|
394
|
-
n.value.tiles.push(
|
|
394
|
+
n.value.tiles.push(t);
|
|
395
395
|
}
|
|
396
396
|
},
|
|
397
397
|
{
|
|
398
|
-
label:
|
|
398
|
+
label: l("report.common.remove"),
|
|
399
399
|
selected: !1,
|
|
400
400
|
variant: "destructive",
|
|
401
401
|
onClick: async (o) => {
|
|
402
402
|
if (await A({
|
|
403
|
-
title:
|
|
404
|
-
message:
|
|
403
|
+
title: l("report.editor.deleteWidget"),
|
|
404
|
+
message: l("report.editor.deleteWidgetConfirm", {
|
|
405
405
|
title: n.value.tiles[o].widget.title
|
|
406
406
|
})
|
|
407
407
|
})) {
|
|
408
|
-
const
|
|
409
|
-
n.value.tiles.splice(o, 1), n.value.globalFilters && n.value.globalFilters.forEach((
|
|
410
|
-
var
|
|
411
|
-
|
|
408
|
+
const D = n.value.tiles[o].id;
|
|
409
|
+
n.value.tiles.splice(o, 1), n.value.globalFilters && n.value.globalFilters.forEach((f) => {
|
|
410
|
+
var g;
|
|
411
|
+
f.tileIds = (g = f.tileIds) == null ? void 0 : g.filter((H) => H !== D);
|
|
412
412
|
});
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
|
-
],
|
|
416
|
+
], P = [
|
|
417
417
|
{
|
|
418
|
-
label:
|
|
418
|
+
label: l("report.common.edit"),
|
|
419
419
|
selected: !1,
|
|
420
420
|
variant: "tertiary",
|
|
421
421
|
onClick: (o) => {
|
|
422
|
-
var
|
|
423
|
-
|
|
422
|
+
var t;
|
|
423
|
+
b.value = o, B.value = JSON.parse(JSON.stringify((t = n.value.globalFilters) == null ? void 0 : t[o])), $.value = !0;
|
|
424
424
|
}
|
|
425
425
|
},
|
|
426
426
|
{
|
|
427
|
-
label:
|
|
427
|
+
label: l("report.common.remove"),
|
|
428
428
|
selected: !1,
|
|
429
429
|
variant: "destructive",
|
|
430
430
|
onClick: async (o) => {
|
|
431
|
-
var
|
|
432
|
-
const
|
|
433
|
-
if (!
|
|
431
|
+
var f, g;
|
|
432
|
+
const t = (f = n.value.globalFilters) == null ? void 0 : f[o];
|
|
433
|
+
if (!t) return;
|
|
434
434
|
await A({
|
|
435
|
-
title:
|
|
436
|
-
message:
|
|
437
|
-
title:
|
|
435
|
+
title: l("report.editor.deleteWidget"),
|
|
436
|
+
message: l("report.editor.deleteWidgetConfirm", {
|
|
437
|
+
title: ie(t)
|
|
438
438
|
})
|
|
439
|
-
}) && ((
|
|
439
|
+
}) && ((g = n.value.globalFilters) == null || g.splice(o, 1));
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
],
|
|
443
|
-
label:
|
|
442
|
+
], F = N(() => q.value.map((o) => ({
|
|
443
|
+
label: l(`report.category.${o.name}`),
|
|
444
444
|
value: o.id
|
|
445
445
|
})));
|
|
446
|
-
return (o,
|
|
447
|
-
const
|
|
448
|
-
return i(),
|
|
449
|
-
"model-value":
|
|
450
|
-
"onUpdate:modelValue":
|
|
446
|
+
return (o, t) => {
|
|
447
|
+
const D = v("FmTextField"), f = v("FmSelect"), g = v("FmButton"), H = v("FmIcon"), oe = v("FmTooltip"), ve = v("FmMenuItem"), fe = v("FmMenu"), ge = v("FmListItem"), be = v("FmList"), Me = v("FmForm");
|
|
448
|
+
return i(), C(Be(e(r).lg || e(r).md ? Le : Je), {
|
|
449
|
+
"model-value": w.hideConfiguration,
|
|
450
|
+
"onUpdate:modelValue": t[8] || (t[8] = (y) => m("hideConfiguration", y))
|
|
451
451
|
}, {
|
|
452
452
|
default: s(() => [
|
|
453
453
|
a(Ge, {
|
|
454
|
-
"is-open":
|
|
455
|
-
"onUpdate:isOpen":
|
|
454
|
+
"is-open": $.value,
|
|
455
|
+
"onUpdate:isOpen": t[0] || (t[0] = (y) => $.value = y),
|
|
456
456
|
"global-filter": e(B),
|
|
457
457
|
tiles: n.value.tiles,
|
|
458
|
-
schemas:
|
|
459
|
-
"onUpdate:globalFilter":
|
|
460
|
-
|
|
458
|
+
schemas: W.value,
|
|
459
|
+
"onUpdate:globalFilter": t[1] || (t[1] = (y) => {
|
|
460
|
+
y && (n.value.globalFilters || (n.value.globalFilters = []), typeof e(b) == "number" && e(b) >= 0 ? n.value.globalFilters[e(b)] = y : n.value.globalFilters.push(y));
|
|
461
461
|
})
|
|
462
462
|
}, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
|
|
463
|
-
a(
|
|
463
|
+
a(Pe, {
|
|
464
464
|
modelValue: e(c),
|
|
465
|
-
"onUpdate:modelValue":
|
|
465
|
+
"onUpdate:modelValue": t[2] || (t[2] = (y) => ke(c) ? c.value = y : null),
|
|
466
466
|
"is-open": p.value,
|
|
467
|
-
"onUpdate:isOpen":
|
|
467
|
+
"onUpdate:isOpen": t[3] || (t[3] = (y) => p.value = y)
|
|
468
468
|
}, null, 8, ["modelValue", "is-open"]),
|
|
469
469
|
a(Me, {
|
|
470
470
|
ref_key: "form",
|
|
471
|
-
ref:
|
|
471
|
+
ref: k,
|
|
472
472
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
473
473
|
}, {
|
|
474
474
|
default: s(() => [
|
|
475
475
|
a(he, { class: "border-solid" }, {
|
|
476
476
|
header: s(() => [
|
|
477
|
-
|
|
478
|
-
|
|
477
|
+
h("p", null, E(e(l)("report.editor.reportInfo")), 1),
|
|
478
|
+
t[9] || (t[9] = h("div", { class: "grow" }, null, -1))
|
|
479
479
|
]),
|
|
480
480
|
content: s(() => [
|
|
481
|
-
|
|
482
|
-
a(
|
|
481
|
+
h("div", Ae, [
|
|
482
|
+
a(D, {
|
|
483
483
|
modelValue: n.value.name,
|
|
484
|
-
"onUpdate:modelValue":
|
|
485
|
-
label: e(
|
|
486
|
-
placeholder: e(
|
|
484
|
+
"onUpdate:modelValue": t[4] || (t[4] = (y) => n.value.name = y),
|
|
485
|
+
label: e(l)("report.editor.reportTitle"),
|
|
486
|
+
placeholder: e(l)("report.editor.placeholder")
|
|
487
487
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
488
|
-
a(
|
|
488
|
+
a(f, {
|
|
489
489
|
modelValue: n.value.category,
|
|
490
|
-
"onUpdate:modelValue":
|
|
491
|
-
label: e(
|
|
492
|
-
items:
|
|
490
|
+
"onUpdate:modelValue": t[5] || (t[5] = (y) => n.value.category = y),
|
|
491
|
+
label: e(l)("report.common.category"),
|
|
492
|
+
items: F.value
|
|
493
493
|
}, null, 8, ["modelValue", "label", "items"])
|
|
494
494
|
])
|
|
495
495
|
]),
|
|
@@ -500,20 +500,20 @@ const ze = /* @__PURE__ */ G({
|
|
|
500
500
|
"is-open": !1
|
|
501
501
|
}, {
|
|
502
502
|
header: s(() => [
|
|
503
|
-
|
|
504
|
-
|
|
503
|
+
h("p", null, E(e(l)("report.section.filter.globalFilter")), 1),
|
|
504
|
+
t[10] || (t[10] = h("div", { class: "grow" }, null, -1))
|
|
505
505
|
]),
|
|
506
506
|
content: s(() => [
|
|
507
|
-
|
|
508
|
-
a(
|
|
509
|
-
label: e(
|
|
507
|
+
h("div", Ke, [
|
|
508
|
+
a(g, {
|
|
509
|
+
label: e(l)("report.section.filter.addGlobalFilter"),
|
|
510
510
|
variant: "secondary",
|
|
511
511
|
icon: "add",
|
|
512
512
|
"icon-position": "prepend",
|
|
513
513
|
"border-color": e(X).ColorPrimary,
|
|
514
514
|
"text-color": e(X).ColorPrimary,
|
|
515
|
-
onClick:
|
|
516
|
-
|
|
515
|
+
onClick: t[6] || (t[6] = () => {
|
|
516
|
+
b.value = null, B.value = null, $.value = !0;
|
|
517
517
|
})
|
|
518
518
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
519
519
|
a(be, null, {
|
|
@@ -524,33 +524,33 @@ const ze = /* @__PURE__ */ G({
|
|
|
524
524
|
class: "flex flex-col gap-2 cursor-grab",
|
|
525
525
|
handle: ".handle"
|
|
526
526
|
}, {
|
|
527
|
-
item: s(({ element:
|
|
527
|
+
item: s(({ element: y, index: Z }) => [
|
|
528
528
|
a(ge, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
529
529
|
default: s(() => [
|
|
530
|
-
a(
|
|
530
|
+
a(H, {
|
|
531
531
|
name: "drag_handle",
|
|
532
532
|
class: "handle"
|
|
533
533
|
}),
|
|
534
|
-
|
|
534
|
+
h("div", Qe, [
|
|
535
535
|
a(oe, {
|
|
536
536
|
"z-index": 99,
|
|
537
|
-
content: e(
|
|
537
|
+
content: e(ie)(y),
|
|
538
538
|
class: "handle"
|
|
539
539
|
}, {
|
|
540
540
|
default: s(() => [
|
|
541
|
-
|
|
541
|
+
h("p", Xe, E(e(ie)(y)), 1)
|
|
542
542
|
]),
|
|
543
543
|
_: 2
|
|
544
544
|
}, 1032, ["content"]),
|
|
545
|
-
|
|
546
|
-
(
|
|
547
|
-
) ? Y("", !0) : (i(),
|
|
545
|
+
W.value.find(
|
|
546
|
+
(z) => z.name === y.schemaName
|
|
547
|
+
) ? Y("", !0) : (i(), C(oe, {
|
|
548
548
|
key: 0,
|
|
549
549
|
content: "Missing schema",
|
|
550
550
|
"z-index": 99
|
|
551
551
|
}, {
|
|
552
552
|
default: s(() => [
|
|
553
|
-
a(
|
|
553
|
+
a(H, {
|
|
554
554
|
name: "warning",
|
|
555
555
|
class: "text-fm-color-system-error-300"
|
|
556
556
|
})
|
|
@@ -558,29 +558,29 @@ const ze = /* @__PURE__ */ G({
|
|
|
558
558
|
_: 1
|
|
559
559
|
}))
|
|
560
560
|
]),
|
|
561
|
-
|
|
561
|
+
t[11] || (t[11] = h("div", { class: "grow" }, null, -1)),
|
|
562
562
|
a(fe, {
|
|
563
563
|
trigger: "click",
|
|
564
564
|
shift: !0,
|
|
565
565
|
"stop-click-propagation": !0
|
|
566
566
|
}, {
|
|
567
567
|
"menu-button": s(() => [
|
|
568
|
-
a(
|
|
568
|
+
a(g, {
|
|
569
569
|
"append-icon": "more_vert",
|
|
570
570
|
variant: "tertiary"
|
|
571
571
|
})
|
|
572
572
|
]),
|
|
573
573
|
default: s(() => [
|
|
574
|
-
(i(),
|
|
575
|
-
key:
|
|
576
|
-
onClick: (Ne) =>
|
|
574
|
+
(i(), S(L, null, Q(P, (z, re) => a(ve, {
|
|
575
|
+
key: re,
|
|
576
|
+
onClick: (Ne) => z.onClick(Z)
|
|
577
577
|
}, {
|
|
578
578
|
label: s(() => [
|
|
579
|
-
|
|
579
|
+
h("p", {
|
|
580
580
|
class: le(
|
|
581
|
-
|
|
581
|
+
z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
582
582
|
)
|
|
583
|
-
},
|
|
583
|
+
}, E(z.label), 3)
|
|
584
584
|
]),
|
|
585
585
|
_: 2
|
|
586
586
|
}, 1032, ["onClick"])), 64))
|
|
@@ -600,15 +600,15 @@ const ze = /* @__PURE__ */ G({
|
|
|
600
600
|
]),
|
|
601
601
|
_: 1
|
|
602
602
|
}),
|
|
603
|
-
|
|
604
|
-
a(
|
|
605
|
-
label: e(
|
|
603
|
+
h("div", Ye, [
|
|
604
|
+
a(g, {
|
|
605
|
+
label: e(l)("report.editor.addWidget"),
|
|
606
606
|
variant: "secondary",
|
|
607
607
|
icon: "add",
|
|
608
608
|
"icon-position": "prepend",
|
|
609
609
|
"border-color": e(X).ColorPrimary,
|
|
610
610
|
"text-color": e(X).ColorPrimary,
|
|
611
|
-
onClick:
|
|
611
|
+
onClick: t[7] || (t[7] = (y) => p.value = !0)
|
|
612
612
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
613
613
|
a(be, null, {
|
|
614
614
|
default: s(() => [
|
|
@@ -618,45 +618,45 @@ const ze = /* @__PURE__ */ G({
|
|
|
618
618
|
class: "flex flex-col gap-2 cursor-grab",
|
|
619
619
|
handle: ".handle"
|
|
620
620
|
}, {
|
|
621
|
-
item: s(({ element:
|
|
621
|
+
item: s(({ element: y, index: Z }) => [
|
|
622
622
|
a(ge, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
623
623
|
default: s(() => [
|
|
624
|
-
a(
|
|
624
|
+
a(H, {
|
|
625
625
|
name: "drag_handle",
|
|
626
626
|
class: "handle"
|
|
627
627
|
}),
|
|
628
628
|
a(oe, {
|
|
629
|
-
content:
|
|
629
|
+
content: y.widget.title ? e(_e)(e(l), e(V), y.widget.title, "other") : e(l)("report.editor.widget", { index: Z + 1 }),
|
|
630
630
|
class: "handle"
|
|
631
631
|
}, {
|
|
632
632
|
default: s(() => [
|
|
633
|
-
|
|
633
|
+
h("p", Ze, E(y.widget.title ? e(_e)(e(l), e(V), y.widget.title, "other") : e(l)("report.editor.widget", { index: Z + 1 })), 1)
|
|
634
634
|
]),
|
|
635
635
|
_: 2
|
|
636
636
|
}, 1032, ["content"]),
|
|
637
|
-
|
|
637
|
+
t[12] || (t[12] = h("div", { class: "grow" }, null, -1)),
|
|
638
638
|
a(fe, {
|
|
639
639
|
trigger: "click",
|
|
640
640
|
shift: !0,
|
|
641
641
|
"stop-click-propagation": !0
|
|
642
642
|
}, {
|
|
643
643
|
"menu-button": s(() => [
|
|
644
|
-
a(
|
|
644
|
+
a(g, {
|
|
645
645
|
"append-icon": "more_vert",
|
|
646
646
|
variant: "tertiary"
|
|
647
647
|
})
|
|
648
648
|
]),
|
|
649
649
|
default: s(() => [
|
|
650
|
-
(i(),
|
|
651
|
-
key:
|
|
652
|
-
onClick: (Ne) =>
|
|
650
|
+
(i(), S(L, null, Q(M, (z, re) => a(ve, {
|
|
651
|
+
key: re,
|
|
652
|
+
onClick: (Ne) => z.onClick(Z)
|
|
653
653
|
}, {
|
|
654
654
|
label: s(() => [
|
|
655
|
-
|
|
655
|
+
h("p", {
|
|
656
656
|
class: le(
|
|
657
|
-
|
|
657
|
+
z.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
658
658
|
)
|
|
659
|
-
},
|
|
659
|
+
}, E(z.label), 3)
|
|
660
660
|
]),
|
|
661
661
|
_: 2
|
|
662
662
|
}, 1032, ["onClick"])), 64))
|
|
@@ -710,252 +710,256 @@ const ze = /* @__PURE__ */ G({
|
|
|
710
710
|
modelModifiers: {}
|
|
711
711
|
}),
|
|
712
712
|
emits: /* @__PURE__ */ J(["hideConfiguration"], ["update:modelValue"]),
|
|
713
|
-
setup(
|
|
714
|
-
const { breakpoints: n } =
|
|
715
|
-
return (
|
|
716
|
-
const
|
|
717
|
-
return i(),
|
|
718
|
-
r.value ? (i(),
|
|
719
|
-
|
|
713
|
+
setup(x, { emit: d }) {
|
|
714
|
+
const { breakpoints: n } = ne(), r = j(x, "modelValue"), w = x, m = N(() => w.previewWidth > 0 && w.previewHeight > 0), _ = N(() => n.value.sm || n.value.xs), u = d;
|
|
715
|
+
return (k, c) => {
|
|
716
|
+
const q = v("FmCircularProgress"), I = v("FmButton"), T = v("FmMenuDivider"), B = v("FmCard");
|
|
717
|
+
return i(), S("div", el, [
|
|
718
|
+
r.value ? (i(), S(L, { key: 1 }, [
|
|
719
|
+
m.value ? Y("", !0) : (i(), C(Re, {
|
|
720
720
|
key: 0,
|
|
721
|
-
"model-value": !
|
|
721
|
+
"model-value": !w.hideConfiguration
|
|
722
722
|
}, {
|
|
723
723
|
right: s(() => [
|
|
724
|
-
|
|
725
|
-
r.value ? (i(),
|
|
724
|
+
h("div", ll, [
|
|
725
|
+
r.value ? (i(), C(xe, {
|
|
726
726
|
key: 0,
|
|
727
727
|
modelValue: r.value,
|
|
728
|
-
"onUpdate:modelValue": c[0] || (c[0] = (
|
|
729
|
-
"hide-configuration":
|
|
730
|
-
onHideConfiguration: c[1] || (c[1] = (
|
|
728
|
+
"onUpdate:modelValue": c[0] || (c[0] = (b) => r.value = b),
|
|
729
|
+
"hide-configuration": w.hideConfiguration,
|
|
730
|
+
onHideConfiguration: c[1] || (c[1] = (b) => u("hideConfiguration", b))
|
|
731
731
|
}, null, 8, ["modelValue", "hide-configuration"])) : Y("", !0)
|
|
732
732
|
])
|
|
733
733
|
]),
|
|
734
734
|
left: s(() => [
|
|
735
|
-
|
|
736
|
-
a(
|
|
735
|
+
h("div", tl, [
|
|
736
|
+
a(I, {
|
|
737
737
|
variant: "secondary",
|
|
738
738
|
icon: "keyboard_double_arrow_right",
|
|
739
739
|
"border-color": e(X).ColorPrimary,
|
|
740
740
|
"text-color": e(X).ColorPrimary,
|
|
741
741
|
class: "m-24 my-16",
|
|
742
742
|
size: "md",
|
|
743
|
-
onClick: c[2] || (c[2] = (
|
|
743
|
+
onClick: c[2] || (c[2] = (b) => u("hideConfiguration", !w.hideConfiguration))
|
|
744
744
|
}, null, 8, ["border-color", "text-color"])
|
|
745
745
|
])
|
|
746
746
|
]),
|
|
747
747
|
_: 1
|
|
748
748
|
}, 8, ["model-value"])),
|
|
749
|
-
a(
|
|
749
|
+
a(T, {
|
|
750
750
|
vertical: "",
|
|
751
751
|
style: { margin: "0px" }
|
|
752
752
|
}),
|
|
753
|
-
!
|
|
754
|
-
r.value.tiles.length > 0 ? (i(),
|
|
755
|
-
(i(!0),
|
|
756
|
-
key: `${e(ee)()}_${
|
|
757
|
-
"model-value":
|
|
758
|
-
index:
|
|
753
|
+
!_.value && !m.value ? (i(), S("div", ol, [
|
|
754
|
+
r.value.tiles.length > 0 ? (i(), S("div", al, [
|
|
755
|
+
(i(!0), S(L, null, Q(r.value.tiles, (b, O) => (i(), C(se, {
|
|
756
|
+
key: `${e(ee)()}_${O}`,
|
|
757
|
+
"model-value": b,
|
|
758
|
+
index: O,
|
|
759
759
|
"hide-export": !0
|
|
760
760
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
761
|
-
])) : (i(),
|
|
762
|
-
])) :
|
|
761
|
+
])) : (i(), C(ue, { key: 1 }))
|
|
762
|
+
])) : _.value && !m.value ? (i(), S("div", nl, [
|
|
763
763
|
a(B, { class: "px-5 pb-28" }, {
|
|
764
764
|
default: s(() => [
|
|
765
|
-
r.value.tiles.length > 0 ? (i(),
|
|
766
|
-
(i(!0),
|
|
767
|
-
key: `${e(ee)()}_${
|
|
768
|
-
"model-value":
|
|
769
|
-
index:
|
|
765
|
+
r.value.tiles.length > 0 ? (i(), S("div", rl, [
|
|
766
|
+
(i(!0), S(L, null, Q(r.value.tiles, (b, O) => (i(), C(se, {
|
|
767
|
+
key: `${e(ee)()}_${O}`,
|
|
768
|
+
"model-value": b,
|
|
769
|
+
index: O,
|
|
770
770
|
"hide-export": !0
|
|
771
771
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
772
|
-
])) : (i(),
|
|
772
|
+
])) : (i(), C(ue, { key: 1 }))
|
|
773
773
|
]),
|
|
774
774
|
_: 1
|
|
775
775
|
}),
|
|
776
|
-
r.value ? (i(),
|
|
776
|
+
r.value ? (i(), C(xe, {
|
|
777
777
|
key: 0,
|
|
778
778
|
modelValue: r.value,
|
|
779
|
-
"onUpdate:modelValue": c[3] || (c[3] = (
|
|
780
|
-
"hide-configuration":
|
|
781
|
-
onHideConfiguration: c[4] || (c[4] = (
|
|
782
|
-
|
|
779
|
+
"onUpdate:modelValue": c[3] || (c[3] = (b) => r.value = b),
|
|
780
|
+
"hide-configuration": w.hideConfiguration,
|
|
781
|
+
onHideConfiguration: c[4] || (c[4] = (b) => {
|
|
782
|
+
u("hideConfiguration", b);
|
|
783
783
|
})
|
|
784
784
|
}, null, 8, ["modelValue", "hide-configuration"])) : Y("", !0)
|
|
785
|
-
])) : (i(),
|
|
786
|
-
|
|
787
|
-
style:
|
|
785
|
+
])) : (i(), S("div", il, [
|
|
786
|
+
h("div", {
|
|
787
|
+
style: ce({
|
|
788
788
|
transformOrigin: "top center",
|
|
789
|
-
transform: `scale(${
|
|
789
|
+
transform: `scale(${w.previewScale})`
|
|
790
790
|
})
|
|
791
791
|
}, [
|
|
792
|
-
|
|
792
|
+
h("div", {
|
|
793
793
|
class: "overflow-y-auto bg-white rounded-lg",
|
|
794
|
-
style:
|
|
795
|
-
width:
|
|
796
|
-
height:
|
|
794
|
+
style: ce({
|
|
795
|
+
width: w.previewWidth + "px",
|
|
796
|
+
height: w.previewHeight + "px"
|
|
797
797
|
})
|
|
798
798
|
}, [
|
|
799
|
-
r.value.tiles.length > 0 ? (i(),
|
|
800
|
-
(i(!0),
|
|
801
|
-
key: `${e(ee)()}_${
|
|
802
|
-
"model-value":
|
|
803
|
-
index:
|
|
799
|
+
r.value.tiles.length > 0 ? (i(), S("div", sl, [
|
|
800
|
+
(i(!0), S(L, null, Q(r.value.tiles, (b, O) => (i(), C(se, {
|
|
801
|
+
key: `${e(ee)()}_${O}`,
|
|
802
|
+
"model-value": b,
|
|
803
|
+
index: O,
|
|
804
804
|
"hide-export": !0,
|
|
805
|
-
"custom-screen-width":
|
|
805
|
+
"custom-screen-width": w.previewWidth
|
|
806
806
|
}, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
|
|
807
|
-
])) : (i(),
|
|
807
|
+
])) : (i(), C(ue, { key: 1 }))
|
|
808
808
|
], 4)
|
|
809
809
|
], 4)
|
|
810
810
|
]))
|
|
811
|
-
], 64)) : (i(),
|
|
811
|
+
], 64)) : (i(), C(q, { key: 0 }))
|
|
812
812
|
]);
|
|
813
813
|
};
|
|
814
814
|
}
|
|
815
815
|
}), dl = { class: "flex items-center gap-4" }, ml = { class: "flex justify-center items-center gap-2 w-full" }, cl = { class: "flex gap-4" }, kl = /* @__PURE__ */ G({
|
|
816
816
|
__name: "ReportEditor",
|
|
817
|
-
setup(
|
|
818
|
-
const
|
|
819
|
-
var
|
|
820
|
-
return !((
|
|
821
|
-
}),
|
|
822
|
-
var
|
|
823
|
-
return ((
|
|
824
|
-
}),
|
|
825
|
-
async function
|
|
826
|
-
if (!
|
|
827
|
-
|
|
817
|
+
setup(x) {
|
|
818
|
+
const d = Se(), n = $e(), r = Ve(), { promptLoader: w } = He(), { t: m } = te(), { currentReport: _, editingReport: u } = ae(r), { breakpoints: k } = ne(), c = N(() => {
|
|
819
|
+
var F;
|
|
820
|
+
return !((F = u.value) != null && F.editable);
|
|
821
|
+
}), q = N(() => {
|
|
822
|
+
var F;
|
|
823
|
+
return ((F = u.value) == null ? void 0 : F.name) ?? m("report.editor.newReport");
|
|
824
|
+
}), I = Oe(), { promptMessage: T } = Te(), B = R(!1);
|
|
825
|
+
async function b() {
|
|
826
|
+
if (!u.value || u.value.tiles.length === 0) {
|
|
827
|
+
I.open({ message: m("report.messages.noWidget"), type: "error" });
|
|
828
828
|
return;
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
830
|
+
const { defaultChartWidth: F, defaultChartHeight: o } = ae(r);
|
|
831
|
+
u.value.tiles.forEach((f) => {
|
|
832
|
+
f.widget.config.chartWidth == null && (f.widget.config.chartWidth = F.value), f.widget.config.chartHeight == null && (f.widget.config.chartHeight = o.value);
|
|
833
|
+
});
|
|
834
|
+
const t = c.value ? m("report.common.clone") : m("report.common.save");
|
|
835
|
+
if (await T({
|
|
836
|
+
title: `${m("report.messages.saveReport")}`,
|
|
837
|
+
message: m("report.messages.confirmAction", { action: t, name: q.value })
|
|
834
838
|
}))
|
|
835
839
|
try {
|
|
836
|
-
await
|
|
840
|
+
await w(async () => {
|
|
837
841
|
if (c.value) {
|
|
838
|
-
const
|
|
839
|
-
|
|
842
|
+
const f = JSON.parse(JSON.stringify(u.value));
|
|
843
|
+
f.editable = !0, f.id = "", f.name = `${f.name} ${m("report.common.duplicate")}`, await r.createOrUpdateReport(f);
|
|
840
844
|
} else
|
|
841
|
-
|
|
842
|
-
|
|
845
|
+
u.value && await r.createOrUpdateReport(u.value);
|
|
846
|
+
d.push({
|
|
843
847
|
name: "reportView",
|
|
844
848
|
query: n.query
|
|
845
849
|
});
|
|
846
850
|
});
|
|
847
|
-
} catch (
|
|
848
|
-
console.log(
|
|
849
|
-
message:
|
|
851
|
+
} catch (f) {
|
|
852
|
+
console.log(f), I.open({
|
|
853
|
+
message: m("report.messages.failedToAction", { action: t }),
|
|
850
854
|
type: "error"
|
|
851
855
|
});
|
|
852
856
|
}
|
|
853
857
|
}
|
|
854
|
-
async function
|
|
858
|
+
async function O() {
|
|
855
859
|
var o;
|
|
856
|
-
if (!
|
|
857
|
-
await
|
|
858
|
-
title:
|
|
859
|
-
message:
|
|
860
|
-
}) && (
|
|
860
|
+
if (!u.value) return;
|
|
861
|
+
await T({
|
|
862
|
+
title: m("report.common.report", 1),
|
|
863
|
+
message: m("report.editor.notSaved", { name: (o = u.value) == null ? void 0 : o.name })
|
|
864
|
+
}) && (u.value = JSON.parse(JSON.stringify(_.value)), d.back());
|
|
861
865
|
}
|
|
862
866
|
Ue(() => {
|
|
863
|
-
|
|
867
|
+
u.value || d.push({ name: "reports" });
|
|
864
868
|
});
|
|
865
869
|
const A = [
|
|
866
870
|
{
|
|
867
|
-
label:
|
|
871
|
+
label: m("report.common.default"),
|
|
868
872
|
width: void 0,
|
|
869
873
|
height: void 0
|
|
870
874
|
},
|
|
871
875
|
{
|
|
872
|
-
label:
|
|
876
|
+
label: m("report.editor.devices.desktop"),
|
|
873
877
|
width: 1920,
|
|
874
878
|
height: 1080
|
|
875
879
|
},
|
|
876
880
|
{
|
|
877
|
-
label:
|
|
881
|
+
label: m("report.editor.devices.tablet"),
|
|
878
882
|
width: 820,
|
|
879
883
|
height: 1180
|
|
880
884
|
},
|
|
881
885
|
{
|
|
882
|
-
label:
|
|
886
|
+
label: m("report.editor.devices.phone"),
|
|
883
887
|
width: 390,
|
|
884
888
|
height: 859
|
|
885
889
|
}
|
|
886
|
-
],
|
|
887
|
-
if (!
|
|
888
|
-
let
|
|
889
|
-
return o > window.innerWidth && (
|
|
890
|
+
], $ = R(A[0]), p = R(!1), l = N(() => p.value ? Math.max($.value.width || 0, $.value.height || 0) : Math.min($.value.width || 0, $.value.height || 0)), V = N(() => p.value ? Math.min($.value.width || 0, $.value.height || 0) : Math.max($.value.width || 0, $.value.height || 0)), U = N(() => window.innerHeight - 72 - 56), W = N(() => {
|
|
891
|
+
if (!l.value) return 1;
|
|
892
|
+
let F = (U.value - 48) / l.value, o = V.value * F;
|
|
893
|
+
return o > window.innerWidth && (F = window.innerWidth / V.value, o = V.value * F), F > 1 ? 1 : F;
|
|
890
894
|
});
|
|
891
|
-
function
|
|
892
|
-
|
|
895
|
+
function M(F) {
|
|
896
|
+
$.value = F;
|
|
893
897
|
}
|
|
894
|
-
function
|
|
898
|
+
function P() {
|
|
895
899
|
p.value = !p.value;
|
|
896
900
|
}
|
|
897
|
-
return (
|
|
898
|
-
const
|
|
899
|
-
return i(),
|
|
901
|
+
return (F, o) => {
|
|
902
|
+
const t = v("FmTooltip"), D = v("FmButton"), f = v("FmPageHead");
|
|
903
|
+
return i(), C(qe, null, {
|
|
900
904
|
default: s(() => [
|
|
901
|
-
a(
|
|
905
|
+
a(f, {
|
|
902
906
|
actions: [
|
|
903
|
-
{ label: e(
|
|
907
|
+
{ label: e(m)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
904
908
|
{ label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
|
|
905
909
|
],
|
|
906
|
-
"onClick:action": o[0] || (o[0] = (
|
|
907
|
-
|
|
910
|
+
"onClick:action": o[0] || (o[0] = (g) => {
|
|
911
|
+
g === "cancel" && O(), g === "save" && b();
|
|
908
912
|
})
|
|
909
913
|
}, {
|
|
910
914
|
title: s(() => [
|
|
911
|
-
|
|
912
|
-
a(
|
|
913
|
-
content:
|
|
915
|
+
h("div", dl, [
|
|
916
|
+
a(t, {
|
|
917
|
+
content: q.value,
|
|
914
918
|
placement: "bottom"
|
|
915
919
|
}, {
|
|
916
920
|
default: s(() => [
|
|
917
|
-
|
|
918
|
-
class: le(`${e(
|
|
919
|
-
},
|
|
921
|
+
h("p", {
|
|
922
|
+
class: le(`${e(k).sm || e(k).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
|
|
923
|
+
}, E(q.value), 3)
|
|
920
924
|
]),
|
|
921
925
|
_: 1
|
|
922
926
|
}, 8, ["content"]),
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
(i(),
|
|
926
|
-
var
|
|
927
|
-
return a(
|
|
928
|
-
key:
|
|
929
|
-
label:
|
|
930
|
-
variant: ((
|
|
927
|
+
h("div", ml, [
|
|
928
|
+
h("div", cl, [
|
|
929
|
+
(i(), S(L, null, Q(A, (g) => {
|
|
930
|
+
var H;
|
|
931
|
+
return a(D, {
|
|
932
|
+
key: g.label,
|
|
933
|
+
label: g.label,
|
|
934
|
+
variant: ((H = $.value) == null ? void 0 : H.label) === g.label ? "primary" : "secondary",
|
|
931
935
|
size: "md",
|
|
932
|
-
onClick: (oe) =>
|
|
936
|
+
onClick: (oe) => M(g)
|
|
933
937
|
}, null, 8, ["label", "variant", "onClick"]);
|
|
934
938
|
}), 64))
|
|
935
939
|
]),
|
|
936
|
-
a(
|
|
940
|
+
a(D, {
|
|
937
941
|
icon: "screen_rotation",
|
|
938
942
|
variant: "tertiary",
|
|
939
943
|
size: "md",
|
|
940
944
|
class: "text-fm-color-typo-primary",
|
|
941
|
-
onClick:
|
|
945
|
+
onClick: P
|
|
942
946
|
})
|
|
943
947
|
])
|
|
944
948
|
])
|
|
945
949
|
]),
|
|
946
950
|
_: 1
|
|
947
951
|
}, 8, ["actions"]),
|
|
948
|
-
e(
|
|
952
|
+
e(u) ? (i(), C(ul, {
|
|
949
953
|
key: 0,
|
|
950
|
-
modelValue: e(
|
|
951
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
952
|
-
style:
|
|
953
|
-
class: le(e(
|
|
954
|
+
modelValue: e(u),
|
|
955
|
+
"onUpdate:modelValue": o[1] || (o[1] = (g) => ke(u) ? u.value = g : null),
|
|
956
|
+
style: ce({ height: U.value + "px" }),
|
|
957
|
+
class: le(e(k).lg || e(k).md ? "flex" : ""),
|
|
954
958
|
"hide-configuration": B.value,
|
|
955
|
-
"preview-width":
|
|
956
|
-
"preview-height":
|
|
957
|
-
"preview-scale":
|
|
958
|
-
onHideConfiguration: o[2] || (o[2] = (
|
|
959
|
+
"preview-width": V.value,
|
|
960
|
+
"preview-height": l.value,
|
|
961
|
+
"preview-scale": W.value,
|
|
962
|
+
onHideConfiguration: o[2] || (o[2] = (g) => B.value = g)
|
|
959
963
|
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : Y("", !0)
|
|
960
964
|
]),
|
|
961
965
|
_: 1
|