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