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