@feedmepos/mf-report 5.18.2-beta.2 → 5.18.2-beta.4
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-BRjX1jFN.js +221 -0
- package/dist/{ReportEditor-Db1Ll1hk.js → ReportEditor-C6TXPHhT.js} +180 -181
- package/dist/ReportView-CUEWuq1w.js +194 -0
- package/dist/app.js +3 -3
- package/package.json +1 -1
- package/dist/App-2aEdytBx.js +0 -157
- package/dist/ReportView-BQb_myNM.js +0 -246
|
@@ -1,5 +1,5 @@
|
|
|
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
|
|
2
|
-
import { W as De, _ 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-CiVLb7cy.js";
|
|
3
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-djyc20Cp.js";
|
|
4
4
|
import { storeToRefs as fe } from "pinia";
|
|
5
5
|
import { useRouter as Se, useRoute as $e } from "vue-router";
|
|
@@ -20,17 +20,17 @@ const He = /* @__PURE__ */ G({
|
|
|
20
20
|
}),
|
|
21
21
|
emits: /* @__PURE__ */ L(["update:isOpen"], ["update:modelValue"]),
|
|
22
22
|
setup(k, { emit: u }) {
|
|
23
|
-
const { t: n } = ae(), { breakpoints: r } = ie(),
|
|
23
|
+
const { t: n } = ae(), { breakpoints: r } = ie(), y = j(k, "modelValue"), c = k, x = u;
|
|
24
24
|
function v() {
|
|
25
|
-
|
|
25
|
+
x("update:isOpen", !1);
|
|
26
26
|
}
|
|
27
27
|
function V() {
|
|
28
|
-
d.value && (
|
|
28
|
+
d.value && (y.value = d.value, d.value = void 0, x("update:isOpen", !1));
|
|
29
29
|
}
|
|
30
30
|
const d = q(), B = U(() => !d.value);
|
|
31
|
-
return (D,
|
|
32
|
-
const
|
|
33
|
-
return i(), $(
|
|
31
|
+
return (D, W) => {
|
|
32
|
+
const I = f("FmButton"), _ = f("FmDialog");
|
|
33
|
+
return i(), $(_, {
|
|
34
34
|
"model-value": c.isOpen
|
|
35
35
|
}, {
|
|
36
36
|
"dialog-header": s(() => [
|
|
@@ -39,19 +39,19 @@ const He = /* @__PURE__ */ G({
|
|
|
39
39
|
default: s(() => [
|
|
40
40
|
t(De, {
|
|
41
41
|
modelValue: d.value,
|
|
42
|
-
"onUpdate:modelValue":
|
|
42
|
+
"onUpdate:modelValue": W[0] || (W[0] = (N) => d.value = N),
|
|
43
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
47
|
"dialog-footer": s(() => [
|
|
48
|
-
|
|
49
|
-
t(
|
|
48
|
+
W[1] || (W[1] = w("div", { class: "grow" }, null, -1)),
|
|
49
|
+
t(I, {
|
|
50
50
|
label: l(n)("report.common.cancel"),
|
|
51
51
|
variant: "tertiary",
|
|
52
52
|
onClick: v
|
|
53
53
|
}, null, 8, ["label"]),
|
|
54
|
-
t(
|
|
54
|
+
t(I, {
|
|
55
55
|
label: l(n)("report.common.confirm"),
|
|
56
56
|
disabled: B.value,
|
|
57
57
|
onClick: V
|
|
@@ -75,15 +75,15 @@ const He = /* @__PURE__ */ G({
|
|
|
75
75
|
emits: ["update:modelValue"],
|
|
76
76
|
setup(k) {
|
|
77
77
|
const { t: u } = ae(), n = j(k, "modelValue"), r = k;
|
|
78
|
-
return (
|
|
79
|
-
const
|
|
78
|
+
return (y, c) => {
|
|
79
|
+
const x = f("FmIcon");
|
|
80
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
82
|
onClick: c[0] || (c[0] = (v) => n.value = !n.value)
|
|
83
83
|
}, [
|
|
84
|
-
|
|
85
|
-
c[1] || (c[1] =
|
|
86
|
-
t(
|
|
84
|
+
w("p", Je, P(l(u)("report.editor.customizeReport")), 1),
|
|
85
|
+
c[1] || (c[1] = w("div", { class: "grow" }, null, -1)),
|
|
86
|
+
t(x, {
|
|
87
87
|
name: r.icon
|
|
88
88
|
}, null, 8, ["name"])
|
|
89
89
|
]);
|
|
@@ -101,7 +101,7 @@ const He = /* @__PURE__ */ G({
|
|
|
101
101
|
return (n, r) => (i(), S(J, null, [
|
|
102
102
|
t(ge, {
|
|
103
103
|
modelValue: u.value,
|
|
104
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
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")
|
|
@@ -117,23 +117,23 @@ const He = /* @__PURE__ */ G({
|
|
|
117
117
|
setup(k) {
|
|
118
118
|
const u = j(k, "modelValue");
|
|
119
119
|
return (n, r) => {
|
|
120
|
-
const
|
|
120
|
+
const y = f("FmTopSheet"), c = f("FmCard");
|
|
121
121
|
return i(), $(c, { class: "fixed bottom-0 w-full" }, {
|
|
122
122
|
default: s(() => [
|
|
123
123
|
t(ge, {
|
|
124
124
|
modelValue: u.value,
|
|
125
|
-
"onUpdate:modelValue": r[0] || (r[0] = (
|
|
125
|
+
"onUpdate:modelValue": r[0] || (r[0] = (x) => u.value = x),
|
|
126
126
|
icon: "keyboard_double_arrow_up"
|
|
127
127
|
}, null, 8, ["modelValue"]),
|
|
128
|
-
t(
|
|
128
|
+
t(y, {
|
|
129
129
|
modelValue: u.value,
|
|
130
|
-
"onUpdate:modelValue": r[2] || (r[2] = (
|
|
130
|
+
"onUpdate:modelValue": r[2] || (r[2] = (x) => u.value = x),
|
|
131
131
|
"fullscreen-size": "sm"
|
|
132
132
|
}, {
|
|
133
133
|
default: s(() => [
|
|
134
134
|
t(ge, {
|
|
135
135
|
modelValue: u.value,
|
|
136
|
-
"onUpdate:modelValue": r[1] || (r[1] = (
|
|
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)
|
|
@@ -169,43 +169,43 @@ const He = /* @__PURE__ */ G({
|
|
|
169
169
|
}),
|
|
170
170
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
171
171
|
setup(k) {
|
|
172
|
-
const { t: u, te: n } = ae(), r = j(k, "globalFilter"),
|
|
173
|
-
pe(
|
|
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
174
|
var o, g, a, e;
|
|
175
|
-
p && (v.value = ((o = r.value) == null ? void 0 : o.label) || "", V.value =
|
|
176
|
-
(
|
|
177
|
-
var
|
|
178
|
-
return
|
|
175
|
+
p && (v.value = ((o = r.value) == null ? void 0 : o.label) || "", V.value = x.schemas.find(
|
|
176
|
+
(C) => {
|
|
177
|
+
var h;
|
|
178
|
+
return C.name === ((h = r.value) == null ? void 0 : h.schemaName);
|
|
179
179
|
}
|
|
180
|
-
), d.value = (g =
|
|
181
|
-
(
|
|
182
|
-
var
|
|
183
|
-
return
|
|
180
|
+
), d.value = (g = I.value.find(
|
|
181
|
+
(C) => {
|
|
182
|
+
var h;
|
|
183
|
+
return C.value.name === ((h = r.value) == null ? void 0 : h.name);
|
|
184
184
|
}
|
|
185
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
|
-
const
|
|
188
|
-
() =>
|
|
187
|
+
const W = U(
|
|
188
|
+
() => x.schemas.map((p) => ({
|
|
189
189
|
label: p.label || p.name,
|
|
190
190
|
value: p
|
|
191
191
|
}))
|
|
192
|
-
),
|
|
192
|
+
), I = U(() => {
|
|
193
193
|
var p;
|
|
194
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
|
|
198
|
+
}), _ = U(() => x.tiles.reduce((p, o, g) => {
|
|
199
|
+
var C, h;
|
|
200
200
|
const a = o.widget.config.schemaNames ?? [], e = (o.widget.config.joinDatasources ?? []).flatMap(
|
|
201
201
|
(m) => m.schemaNames ?? []
|
|
202
202
|
);
|
|
203
|
-
return [...a, ...e].includes(((
|
|
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: [
|
|
@@ -234,7 +234,7 @@ const He = /* @__PURE__ */ G({
|
|
|
234
234
|
throw new Error(`Unsupported data type: ${p}`);
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function b() {
|
|
238
238
|
if (!V.value) {
|
|
239
239
|
c.open({ message: "Invalid schema", type: "error" });
|
|
240
240
|
return;
|
|
@@ -247,10 +247,10 @@ const He = /* @__PURE__ */ G({
|
|
|
247
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
252
|
function z() {
|
|
253
|
-
|
|
253
|
+
y.value = !1;
|
|
254
254
|
}
|
|
255
255
|
const K = U(() => {
|
|
256
256
|
var p;
|
|
@@ -260,17 +260,17 @@ const He = /* @__PURE__ */ G({
|
|
|
260
260
|
];
|
|
261
261
|
});
|
|
262
262
|
function Y(p) {
|
|
263
|
-
var
|
|
264
|
-
const o =
|
|
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
266
|
), e = [...g, ...a];
|
|
267
267
|
return K.value.filter((R) => !!R).some((R) => !e.includes(R));
|
|
268
268
|
}
|
|
269
269
|
return (p, o) => {
|
|
270
|
-
const g = f("FmTextField"), a = f("FmLabel"), e = f("FmCheckbox"),
|
|
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
271
|
return i(), $(R, {
|
|
272
|
-
modelValue:
|
|
273
|
-
"onUpdate:modelValue": o[5] || (o[5] = (T) =>
|
|
272
|
+
modelValue: y.value,
|
|
273
|
+
"onUpdate:modelValue": o[5] || (o[5] = (T) => y.value = T),
|
|
274
274
|
overlay: !0,
|
|
275
275
|
"z-index": 10
|
|
276
276
|
}, {
|
|
@@ -292,19 +292,19 @@ const He = /* @__PURE__ */ G({
|
|
|
292
292
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
293
293
|
t(Fe, {
|
|
294
294
|
"model-value": V.value,
|
|
295
|
-
items:
|
|
295
|
+
items: W.value,
|
|
296
296
|
placeholder: l(u)("report.section.schema.title"),
|
|
297
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
301
|
"model-value": d.value,
|
|
302
|
-
items:
|
|
302
|
+
items: I.value,
|
|
303
303
|
placeholder: l(u)("report.section.dimension.Dimension"),
|
|
304
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
|
-
t(
|
|
307
|
+
t(We, {
|
|
308
308
|
modelValue: D.value,
|
|
309
309
|
"onUpdate:modelValue": o[3] || (o[3] = (T) => D.value = T),
|
|
310
310
|
options: N.value
|
|
@@ -316,7 +316,7 @@ const He = /* @__PURE__ */ G({
|
|
|
316
316
|
_: 1
|
|
317
317
|
}),
|
|
318
318
|
k.tiles.length > 0 ? (i(), S("div", Ge, [
|
|
319
|
-
(i(!0), S(J, null, X(
|
|
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
|
}, [
|
|
@@ -326,14 +326,14 @@ const He = /* @__PURE__ */ G({
|
|
|
326
326
|
label: T.label,
|
|
327
327
|
value: T.value
|
|
328
328
|
}, null, 8, ["modelValue", "label", "value"]),
|
|
329
|
-
Y(T) ? (i(), $(
|
|
329
|
+
Y(T) ? (i(), $(h, {
|
|
330
330
|
key: 0,
|
|
331
331
|
content: l(u)("report.section.filter.missingFilterSchema"),
|
|
332
332
|
"z-index": 99,
|
|
333
333
|
class: "ml-2"
|
|
334
334
|
}, {
|
|
335
335
|
default: s(() => [
|
|
336
|
-
t(
|
|
336
|
+
t(C, {
|
|
337
337
|
name: "warning",
|
|
338
338
|
class: "text-fm-color-system-error-300"
|
|
339
339
|
})
|
|
@@ -351,7 +351,7 @@ const He = /* @__PURE__ */ G({
|
|
|
351
351
|
}, 512)
|
|
352
352
|
]),
|
|
353
353
|
"dialog-footer": s(() => [
|
|
354
|
-
o[6] || (o[6] =
|
|
354
|
+
o[6] || (o[6] = w("div", { class: "grow" }, null, -1)),
|
|
355
355
|
t(M, {
|
|
356
356
|
label: l(u)("report.common.cancel"),
|
|
357
357
|
variant: "tertiary",
|
|
@@ -359,7 +359,7 @@ const He = /* @__PURE__ */ G({
|
|
|
359
359
|
}, null, 8, ["label"]),
|
|
360
360
|
t(M, {
|
|
361
361
|
label: l(u)("report.common.confirm"),
|
|
362
|
-
onClick:
|
|
362
|
+
onClick: b
|
|
363
363
|
}, null, 8, ["label"])
|
|
364
364
|
]),
|
|
365
365
|
_: 1
|
|
@@ -379,28 +379,28 @@ const He = /* @__PURE__ */ G({
|
|
|
379
379
|
}),
|
|
380
380
|
emits: /* @__PURE__ */ L(["hideConfiguration"], ["update:modelValue"]),
|
|
381
381
|
setup(k, { emit: u }) {
|
|
382
|
-
const n = j(k, "modelValue"), { breakpoints: r } = ie(),
|
|
382
|
+
const n = j(k, "modelValue"), { breakpoints: r } = ie(), y = k, c = u, x = Se(), v = $e(), V = q(), {
|
|
383
383
|
currentSelectWidgetType: d,
|
|
384
384
|
categories: B,
|
|
385
385
|
editingTile: D,
|
|
386
|
-
editingTileIndex:
|
|
387
|
-
editingGlobalFilter:
|
|
388
|
-
editingGlobalFilterIndex:
|
|
389
|
-
} = fe(Ve()), { schemas: N } = fe(Ee()), { promptMessage: A } = Te(), O = q(!1), E = q(!1), { t:
|
|
386
|
+
editingTileIndex: W,
|
|
387
|
+
editingGlobalFilter: I,
|
|
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
390
|
const a = n.value.tiles.flatMap((e) => {
|
|
391
391
|
var m;
|
|
392
|
-
const
|
|
393
|
-
return [...
|
|
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((e,
|
|
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
400
|
pe(
|
|
401
401
|
() => d.value,
|
|
402
402
|
() => {
|
|
403
|
-
d.value !== void 0 && (K.value =
|
|
403
|
+
d.value !== void 0 && (K.value = Ie(d.value), D.value = K.value, W.value = -1, x.push({
|
|
404
404
|
name: "tileEditor",
|
|
405
405
|
query: v.query
|
|
406
406
|
}));
|
|
@@ -417,18 +417,18 @@ const He = /* @__PURE__ */ G({
|
|
|
417
417
|
);
|
|
418
418
|
const p = [
|
|
419
419
|
{
|
|
420
|
-
label:
|
|
420
|
+
label: b("report.common.edit"),
|
|
421
421
|
selected: !1,
|
|
422
422
|
variant: "tertiary",
|
|
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
426
|
query: v.query
|
|
427
427
|
});
|
|
428
428
|
}
|
|
429
429
|
},
|
|
430
430
|
{
|
|
431
|
-
label:
|
|
431
|
+
label: b("report.common.duplicate"),
|
|
432
432
|
selected: !1,
|
|
433
433
|
variant: "tertiary",
|
|
434
434
|
onClick: (a) => {
|
|
@@ -440,76 +440,76 @@ const He = /* @__PURE__ */ G({
|
|
|
440
440
|
}
|
|
441
441
|
},
|
|
442
442
|
{
|
|
443
|
-
label:
|
|
443
|
+
label: b("report.common.remove"),
|
|
444
444
|
selected: !1,
|
|
445
445
|
variant: "destructive",
|
|
446
446
|
onClick: async (a) => {
|
|
447
447
|
if (await A({
|
|
448
|
-
title:
|
|
449
|
-
message:
|
|
448
|
+
title: b("report.editor.deleteWidget"),
|
|
449
|
+
message: b("report.editor.deleteWidgetConfirm", {
|
|
450
450
|
title: n.value.tiles[a].widget.title
|
|
451
451
|
})
|
|
452
452
|
})) {
|
|
453
|
-
const
|
|
454
|
-
n.value.tiles.splice(a, 1), n.value.globalFilters && n.value.globalFilters.forEach((
|
|
453
|
+
const C = n.value.tiles[a].id;
|
|
454
|
+
n.value.tiles.splice(a, 1), n.value.globalFilters && n.value.globalFilters.forEach((h) => {
|
|
455
455
|
var m;
|
|
456
|
-
|
|
456
|
+
h.tileIds = (m = h.tileIds) == null ? void 0 : m.filter((M) => M !== C);
|
|
457
457
|
});
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
461
|
], o = [
|
|
462
462
|
{
|
|
463
|
-
label:
|
|
463
|
+
label: b("report.common.edit"),
|
|
464
464
|
selected: !1,
|
|
465
465
|
variant: "tertiary",
|
|
466
466
|
onClick: (a) => {
|
|
467
467
|
var e;
|
|
468
|
-
|
|
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
|
{
|
|
472
|
-
label:
|
|
472
|
+
label: b("report.common.remove"),
|
|
473
473
|
selected: !1,
|
|
474
474
|
variant: "destructive",
|
|
475
475
|
onClick: async (a) => {
|
|
476
|
-
var
|
|
477
|
-
const e = (
|
|
476
|
+
var h, m;
|
|
477
|
+
const e = (h = n.value.globalFilters) == null ? void 0 : h[a];
|
|
478
478
|
if (!e) return;
|
|
479
479
|
await A({
|
|
480
|
-
title:
|
|
481
|
-
message:
|
|
480
|
+
title: b("report.editor.deleteWidget"),
|
|
481
|
+
message: b("report.editor.deleteWidgetConfirm", {
|
|
482
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
|
-
label:
|
|
488
|
+
label: b(`report.category.${a.name}`),
|
|
489
489
|
value: a.id
|
|
490
490
|
})));
|
|
491
491
|
return (a, e) => {
|
|
492
|
-
const
|
|
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
493
|
return i(), $(Ue(l(r).lg || l(r).md ? Le : je), {
|
|
494
|
-
"model-value":
|
|
495
|
-
"onUpdate:modelValue": e[8] || (e[8] = (
|
|
494
|
+
"model-value": y.hideConfiguration,
|
|
495
|
+
"onUpdate:modelValue": e[8] || (e[8] = (F) => c("hideConfiguration", F))
|
|
496
496
|
}, {
|
|
497
497
|
default: s(() => [
|
|
498
498
|
t(Ae, {
|
|
499
499
|
"is-open": O.value,
|
|
500
|
-
"onUpdate:isOpen": e[0] || (e[0] = (
|
|
501
|
-
"global-filter": l(
|
|
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": e[1] || (e[1] = (
|
|
505
|
-
|
|
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
508
|
t(He, {
|
|
509
509
|
modelValue: l(d),
|
|
510
|
-
"onUpdate:modelValue": e[2] || (e[2] = (
|
|
510
|
+
"onUpdate:modelValue": e[2] || (e[2] = (F) => ke(d) ? d.value = F : null),
|
|
511
511
|
"is-open": E.value,
|
|
512
|
-
"onUpdate:isOpen": e[3] || (e[3] = (
|
|
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",
|
|
@@ -519,21 +519,21 @@ const He = /* @__PURE__ */ G({
|
|
|
519
519
|
default: s(() => [
|
|
520
520
|
t(ye, { class: "border-solid" }, {
|
|
521
521
|
header: s(() => [
|
|
522
|
-
|
|
523
|
-
e[9] || (e[9] =
|
|
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
525
|
content: s(() => [
|
|
526
|
-
|
|
527
|
-
t(
|
|
526
|
+
w("div", Ke, [
|
|
527
|
+
t(C, {
|
|
528
528
|
modelValue: n.value.name,
|
|
529
|
-
"onUpdate:modelValue": e[4] || (e[4] = (
|
|
530
|
-
label: l(
|
|
531
|
-
placeholder: l(
|
|
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": e[5] || (e[5] = (
|
|
536
|
-
label: l(
|
|
535
|
+
"onUpdate:modelValue": e[5] || (e[5] = (F) => n.value.category = F),
|
|
536
|
+
label: l(b)("report.common.category"),
|
|
537
537
|
items: g.value
|
|
538
538
|
}, null, 8, ["modelValue", "label", "items"])
|
|
539
539
|
])
|
|
@@ -545,20 +545,20 @@ const He = /* @__PURE__ */ G({
|
|
|
545
545
|
"is-open": !1
|
|
546
546
|
}, {
|
|
547
547
|
header: s(() => [
|
|
548
|
-
|
|
549
|
-
e[10] || (e[10] =
|
|
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
551
|
content: s(() => [
|
|
552
|
-
|
|
552
|
+
w("div", Qe, [
|
|
553
553
|
t(m, {
|
|
554
|
-
label: l(
|
|
554
|
+
label: l(b)("report.section.filter.addGlobalFilter"),
|
|
555
555
|
variant: "secondary",
|
|
556
556
|
icon: "add",
|
|
557
557
|
"icon-position": "prepend",
|
|
558
558
|
"border-color": l(Z).ColorPrimary,
|
|
559
559
|
"text-color": l(Z).ColorPrimary,
|
|
560
560
|
onClick: e[6] || (e[6] = () => {
|
|
561
|
-
|
|
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, {
|
|
@@ -569,29 +569,29 @@ const He = /* @__PURE__ */ G({
|
|
|
569
569
|
class: "flex flex-col gap-2 cursor-grab",
|
|
570
570
|
handle: ".handle"
|
|
571
571
|
}, {
|
|
572
|
-
item: s(({ element:
|
|
572
|
+
item: s(({ element: F, index: ee }) => [
|
|
573
573
|
t(be, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
574
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: l(ue)(
|
|
582
|
+
content: l(ue)(F),
|
|
583
583
|
class: "handle"
|
|
584
584
|
}, {
|
|
585
585
|
default: s(() => [
|
|
586
|
-
|
|
586
|
+
w("p", Ye, P(l(ue)(F)), 1)
|
|
587
587
|
]),
|
|
588
588
|
_: 2
|
|
589
589
|
}, 1032, ["content"]),
|
|
590
590
|
Y.value.find(
|
|
591
|
-
(H) => H.name ===
|
|
591
|
+
(H) => H.name === F.schemaName
|
|
592
592
|
) ? Q("", !0) : (i(), $(R, {
|
|
593
593
|
key: 0,
|
|
594
|
-
content: l(
|
|
594
|
+
content: l(b)("report.section.filter.missingSchema"),
|
|
595
595
|
"z-index": 99
|
|
596
596
|
}, {
|
|
597
597
|
default: s(() => [
|
|
@@ -603,7 +603,7 @@ const He = /* @__PURE__ */ G({
|
|
|
603
603
|
_: 1
|
|
604
604
|
}, 8, ["content"]))
|
|
605
605
|
]),
|
|
606
|
-
e[11] || (e[11] =
|
|
606
|
+
e[11] || (e[11] = w("div", { class: "grow" }, null, -1)),
|
|
607
607
|
t(ne, {
|
|
608
608
|
trigger: "click",
|
|
609
609
|
shift: !0,
|
|
@@ -621,7 +621,7 @@ const He = /* @__PURE__ */ G({
|
|
|
621
621
|
onClick: (Me) => H.onClick(ee)
|
|
622
622
|
}, {
|
|
623
623
|
label: s(() => [
|
|
624
|
-
|
|
624
|
+
w("p", {
|
|
625
625
|
class: oe(
|
|
626
626
|
H.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
627
627
|
)
|
|
@@ -645,15 +645,15 @@ const He = /* @__PURE__ */ G({
|
|
|
645
645
|
]),
|
|
646
646
|
_: 1
|
|
647
647
|
}),
|
|
648
|
-
|
|
648
|
+
w("div", Ze, [
|
|
649
649
|
t(m, {
|
|
650
|
-
label: l(
|
|
650
|
+
label: l(b)("report.editor.addWidget"),
|
|
651
651
|
variant: "secondary",
|
|
652
652
|
icon: "add",
|
|
653
653
|
"icon-position": "prepend",
|
|
654
654
|
"border-color": l(Z).ColorPrimary,
|
|
655
655
|
"text-color": l(Z).ColorPrimary,
|
|
656
|
-
onClick: e[7] || (e[7] = (
|
|
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
659
|
default: s(() => [
|
|
@@ -663,7 +663,7 @@ const He = /* @__PURE__ */ G({
|
|
|
663
663
|
class: "flex flex-col gap-2 cursor-grab",
|
|
664
664
|
handle: ".handle"
|
|
665
665
|
}, {
|
|
666
|
-
item: s(({ element:
|
|
666
|
+
item: s(({ element: F, index: ee }) => [
|
|
667
667
|
t(be, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
668
668
|
default: s(() => [
|
|
669
669
|
t(M, {
|
|
@@ -671,15 +671,15 @@ const He = /* @__PURE__ */ G({
|
|
|
671
671
|
class: "handle"
|
|
672
672
|
}),
|
|
673
673
|
t(R, {
|
|
674
|
-
content:
|
|
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
677
|
default: s(() => [
|
|
678
|
-
|
|
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
|
-
e[12] || (e[12] =
|
|
682
|
+
e[12] || (e[12] = w("div", { class: "grow" }, null, -1)),
|
|
683
683
|
t(ne, {
|
|
684
684
|
trigger: "click",
|
|
685
685
|
shift: !0,
|
|
@@ -697,7 +697,7 @@ const He = /* @__PURE__ */ G({
|
|
|
697
697
|
onClick: (Me) => H.onClick(ee)
|
|
698
698
|
}, {
|
|
699
699
|
label: s(() => [
|
|
700
|
-
|
|
700
|
+
w("p", {
|
|
701
701
|
class: oe(
|
|
702
702
|
H.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
703
703
|
)
|
|
@@ -756,28 +756,28 @@ const He = /* @__PURE__ */ G({
|
|
|
756
756
|
}),
|
|
757
757
|
emits: /* @__PURE__ */ L(["hideConfiguration"], ["update:modelValue"]),
|
|
758
758
|
setup(k, { emit: u }) {
|
|
759
|
-
const { breakpoints: n } = ie(), r = j(k, "modelValue"),
|
|
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
760
|
return (V, d) => {
|
|
761
|
-
const B = f("FmCircularProgress"), D = f("FmButton"),
|
|
761
|
+
const B = f("FmCircularProgress"), D = f("FmButton"), W = f("FmMenuDivider"), I = f("FmCard");
|
|
762
762
|
return i(), S("div", ll, [
|
|
763
763
|
r.value ? (i(), S(J, { key: 1 }, [
|
|
764
764
|
c.value ? Q("", !0) : (i(), $(Re, {
|
|
765
765
|
key: 0,
|
|
766
|
-
"model-value": !
|
|
766
|
+
"model-value": !y.hideConfiguration
|
|
767
767
|
}, {
|
|
768
768
|
right: s(() => [
|
|
769
|
-
|
|
769
|
+
w("div", tl, [
|
|
770
770
|
r.value ? (i(), $(xe, {
|
|
771
771
|
key: 0,
|
|
772
772
|
modelValue: r.value,
|
|
773
|
-
"onUpdate:modelValue": d[0] || (d[0] = (
|
|
774
|
-
"hide-configuration":
|
|
775
|
-
onHideConfiguration: d[1] || (d[1] = (
|
|
773
|
+
"onUpdate:modelValue": d[0] || (d[0] = (_) => r.value = _),
|
|
774
|
+
"hide-configuration": y.hideConfiguration,
|
|
775
|
+
onHideConfiguration: d[1] || (d[1] = (_) => v("hideConfiguration", _))
|
|
776
776
|
}, null, 8, ["modelValue", "hide-configuration"])) : Q("", !0)
|
|
777
777
|
])
|
|
778
778
|
]),
|
|
779
779
|
left: s(() => [
|
|
780
|
-
|
|
780
|
+
w("div", ol, [
|
|
781
781
|
t(D, {
|
|
782
782
|
variant: "secondary",
|
|
783
783
|
icon: "keyboard_double_arrow_right",
|
|
@@ -785,32 +785,32 @@ const He = /* @__PURE__ */ G({
|
|
|
785
785
|
"text-color": l(Z).ColorPrimary,
|
|
786
786
|
class: "m-24 my-16",
|
|
787
787
|
size: "md",
|
|
788
|
-
onClick: d[2] || (d[2] = (
|
|
788
|
+
onClick: d[2] || (d[2] = (_) => v("hideConfiguration", !y.hideConfiguration))
|
|
789
789
|
}, null, 8, ["border-color", "text-color"])
|
|
790
790
|
])
|
|
791
791
|
]),
|
|
792
792
|
_: 1
|
|
793
793
|
}, 8, ["model-value"])),
|
|
794
|
-
t(
|
|
794
|
+
t(W, {
|
|
795
795
|
vertical: "",
|
|
796
796
|
style: { margin: "0px" }
|
|
797
797
|
}),
|
|
798
|
-
!
|
|
798
|
+
!x.value && !c.value ? (i(), S("div", al, [
|
|
799
799
|
r.value.tiles.length > 0 ? (i(), S("div", nl, [
|
|
800
|
-
(i(!0), S(J, null, X(r.value.tiles, (
|
|
800
|
+
(i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
|
|
801
801
|
key: `${l(te)()}_${N}`,
|
|
802
|
-
"model-value":
|
|
802
|
+
"model-value": _,
|
|
803
803
|
index: N,
|
|
804
804
|
"hide-export": !0
|
|
805
805
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
806
806
|
])) : (i(), $(me, { key: 1 }))
|
|
807
|
-
])) :
|
|
808
|
-
t(
|
|
807
|
+
])) : x.value && !c.value ? (i(), S("div", rl, [
|
|
808
|
+
t(I, { class: "px-5 pb-28" }, {
|
|
809
809
|
default: s(() => [
|
|
810
810
|
r.value.tiles.length > 0 ? (i(), S("div", il, [
|
|
811
|
-
(i(!0), S(J, null, X(r.value.tiles, (
|
|
811
|
+
(i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
|
|
812
812
|
key: `${l(te)()}_${N}`,
|
|
813
|
-
"model-value":
|
|
813
|
+
"model-value": _,
|
|
814
814
|
index: N,
|
|
815
815
|
"hide-export": !0
|
|
816
816
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
@@ -821,33 +821,33 @@ const He = /* @__PURE__ */ G({
|
|
|
821
821
|
r.value ? (i(), $(xe, {
|
|
822
822
|
key: 0,
|
|
823
823
|
modelValue: r.value,
|
|
824
|
-
"onUpdate:modelValue": d[3] || (d[3] = (
|
|
825
|
-
"hide-configuration":
|
|
826
|
-
onHideConfiguration: d[4] || (d[4] = (
|
|
827
|
-
v("hideConfiguration",
|
|
824
|
+
"onUpdate:modelValue": d[3] || (d[3] = (_) => r.value = _),
|
|
825
|
+
"hide-configuration": y.hideConfiguration,
|
|
826
|
+
onHideConfiguration: d[4] || (d[4] = (_) => {
|
|
827
|
+
v("hideConfiguration", _);
|
|
828
828
|
})
|
|
829
829
|
}, null, 8, ["modelValue", "hide-configuration"])) : Q("", !0)
|
|
830
830
|
])) : (i(), S("div", sl, [
|
|
831
|
-
|
|
831
|
+
w("div", {
|
|
832
832
|
style: ve({
|
|
833
833
|
transformOrigin: "top center",
|
|
834
|
-
transform: `scale(${
|
|
834
|
+
transform: `scale(${y.previewScale})`
|
|
835
835
|
})
|
|
836
836
|
}, [
|
|
837
|
-
|
|
837
|
+
w("div", {
|
|
838
838
|
class: "overflow-y-auto bg-white rounded-lg",
|
|
839
839
|
style: ve({
|
|
840
|
-
width:
|
|
841
|
-
height:
|
|
840
|
+
width: y.previewWidth + "px",
|
|
841
|
+
height: y.previewHeight + "px"
|
|
842
842
|
})
|
|
843
843
|
}, [
|
|
844
844
|
r.value.tiles.length > 0 ? (i(), S("div", ul, [
|
|
845
|
-
(i(!0), S(J, null, X(r.value.tiles, (
|
|
845
|
+
(i(!0), S(J, null, X(r.value.tiles, (_, N) => (i(), $(de, {
|
|
846
846
|
key: `${l(te)()}_${N}`,
|
|
847
|
-
"model-value":
|
|
847
|
+
"model-value": _,
|
|
848
848
|
index: N,
|
|
849
849
|
"hide-export": !0,
|
|
850
|
-
"custom-screen-width":
|
|
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)
|
|
@@ -860,34 +860,33 @@ const He = /* @__PURE__ */ G({
|
|
|
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 u = Se(), n = $e(), r = Ve(), { promptLoader:
|
|
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
864
|
var g;
|
|
865
865
|
return !((g = v.value) != null && g.editable);
|
|
866
866
|
}), B = U(() => {
|
|
867
867
|
var g;
|
|
868
868
|
return ((g = v.value) == null ? void 0 : g.name) ?? c("report.editor.newReport");
|
|
869
|
-
}), D = Oe(), { promptMessage:
|
|
870
|
-
async function
|
|
869
|
+
}), D = Oe(), { promptMessage: W } = Te(), I = q(!1);
|
|
870
|
+
async function _() {
|
|
871
871
|
if (!v.value || v.value.tiles.length === 0) {
|
|
872
872
|
D.open({ message: c("report.messages.noWidget"), type: "error" });
|
|
873
873
|
return;
|
|
874
874
|
}
|
|
875
875
|
const g = d.value ? c("report.common.clone") : c("report.common.save");
|
|
876
|
-
if (await
|
|
876
|
+
if (await W({
|
|
877
877
|
title: `${c("report.messages.saveReport")}`,
|
|
878
878
|
message: c("report.messages.confirmAction", { action: g, name: B.value })
|
|
879
879
|
}))
|
|
880
880
|
try {
|
|
881
|
-
await
|
|
882
|
-
let e = null;
|
|
881
|
+
await y(async () => {
|
|
883
882
|
if (d.value) {
|
|
884
|
-
const
|
|
885
|
-
|
|
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);
|
|
886
885
|
} else
|
|
887
|
-
v.value &&
|
|
886
|
+
v.value && await r.createOrUpdateReport(v.value);
|
|
888
887
|
u.push({
|
|
889
888
|
name: "reportView",
|
|
890
|
-
query:
|
|
889
|
+
query: n.query
|
|
891
890
|
});
|
|
892
891
|
});
|
|
893
892
|
} catch (e) {
|
|
@@ -900,10 +899,10 @@ const He = /* @__PURE__ */ G({
|
|
|
900
899
|
async function N() {
|
|
901
900
|
var a;
|
|
902
901
|
if (!v.value) return;
|
|
903
|
-
await
|
|
902
|
+
await W({
|
|
904
903
|
title: c("report.common.report", 1),
|
|
905
904
|
message: c("report.editor.notSaved", { name: (a = v.value) == null ? void 0 : a.name })
|
|
906
|
-
}) && (v.value = JSON.parse(JSON.stringify(
|
|
905
|
+
}) && (v.value = JSON.parse(JSON.stringify(x.value)), u.back());
|
|
907
906
|
}
|
|
908
907
|
Be(() => {
|
|
909
908
|
v.value || u.push({ name: "reports" });
|
|
@@ -929,9 +928,9 @@ const He = /* @__PURE__ */ G({
|
|
|
929
928
|
width: 390,
|
|
930
929
|
height: 859
|
|
931
930
|
}
|
|
932
|
-
], O = q(A[0]), E = q(!1),
|
|
933
|
-
if (!
|
|
934
|
-
let g = (K.value - 48) /
|
|
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(() => {
|
|
932
|
+
if (!b.value) return 1;
|
|
933
|
+
let g = (K.value - 48) / b.value, a = z.value * g;
|
|
935
934
|
return a > window.innerWidth && (g = window.innerWidth / z.value, a = z.value * g), g > 1 ? 1 : g;
|
|
936
935
|
});
|
|
937
936
|
function p(g) {
|
|
@@ -941,36 +940,36 @@ const He = /* @__PURE__ */ G({
|
|
|
941
940
|
E.value = !E.value;
|
|
942
941
|
}
|
|
943
942
|
return (g, a) => {
|
|
944
|
-
const e = f("FmTooltip"),
|
|
943
|
+
const e = f("FmTooltip"), C = f("FmButton"), h = f("FmPageHead");
|
|
945
944
|
return i(), $(qe, null, {
|
|
946
945
|
default: s(() => [
|
|
947
|
-
t(
|
|
946
|
+
t(h, {
|
|
948
947
|
actions: [
|
|
949
948
|
{ label: l(c)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
950
949
|
{ label: "Save Report", value: "save", isPrimary: !0, prependIcon: "download" }
|
|
951
950
|
],
|
|
952
951
|
"onClick:action": a[0] || (a[0] = (m) => {
|
|
953
|
-
m === "cancel" && N(), m === "save" &&
|
|
952
|
+
m === "cancel" && N(), m === "save" && _();
|
|
954
953
|
})
|
|
955
954
|
}, {
|
|
956
955
|
title: s(() => [
|
|
957
|
-
|
|
956
|
+
w("div", ml, [
|
|
958
957
|
t(e, {
|
|
959
958
|
content: B.value,
|
|
960
959
|
placement: "bottom"
|
|
961
960
|
}, {
|
|
962
961
|
default: s(() => [
|
|
963
|
-
|
|
962
|
+
w("p", {
|
|
964
963
|
class: oe(`${l(V).sm || l(V).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
|
|
965
964
|
}, P(B.value), 3)
|
|
966
965
|
]),
|
|
967
966
|
_: 1
|
|
968
967
|
}, 8, ["content"]),
|
|
969
|
-
|
|
970
|
-
|
|
968
|
+
w("div", cl, [
|
|
969
|
+
w("div", pl, [
|
|
971
970
|
(i(), S(J, null, X(A, (m) => {
|
|
972
971
|
var M;
|
|
973
|
-
return t(
|
|
972
|
+
return t(C, {
|
|
974
973
|
key: m.label,
|
|
975
974
|
label: m.label,
|
|
976
975
|
variant: ((M = O.value) == null ? void 0 : M.label) === m.label ? "primary" : "secondary",
|
|
@@ -979,7 +978,7 @@ const He = /* @__PURE__ */ G({
|
|
|
979
978
|
}, null, 8, ["label", "variant", "onClick"]);
|
|
980
979
|
}), 64))
|
|
981
980
|
]),
|
|
982
|
-
t(
|
|
981
|
+
t(C, {
|
|
983
982
|
icon: "screen_rotation",
|
|
984
983
|
variant: "tertiary",
|
|
985
984
|
size: "md",
|
|
@@ -997,11 +996,11 @@ const He = /* @__PURE__ */ G({
|
|
|
997
996
|
"onUpdate:modelValue": a[1] || (a[1] = (m) => ke(v) ? v.value = m : null),
|
|
998
997
|
style: ve({ height: K.value + "px" }),
|
|
999
998
|
class: oe(l(V).lg || l(V).md ? "flex" : ""),
|
|
1000
|
-
"hide-configuration":
|
|
999
|
+
"hide-configuration": I.value,
|
|
1001
1000
|
"preview-width": z.value,
|
|
1002
|
-
"preview-height":
|
|
1001
|
+
"preview-height": b.value,
|
|
1003
1002
|
"preview-scale": Y.value,
|
|
1004
|
-
onHideConfiguration: a[2] || (a[2] = (m) =>
|
|
1003
|
+
onHideConfiguration: a[2] || (a[2] = (m) => I.value = m)
|
|
1005
1004
|
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : Q("", !0)
|
|
1006
1005
|
]),
|
|
1007
1006
|
_: 1
|