@feedmepos/mf-report 5.27.25 → 5.27.26
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-DjVs-2jP.js → App-C_04mBmg.js} +4 -4
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BuO42-MR.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CIStXVl_.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-8Lfk9D0S.js → Default.vue_vue_type_script_setup_true_lang-Go7gifP6.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BGD1_4cA.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DkUAO3Pw.js} +3 -3
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DXtWF7LP.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-C8BAjwYE.js} +1316 -1315
- package/dist/{InsightView-D6b8_QUl.js → InsightView-DxcA19xM.js} +4 -4
- package/dist/{Integration-D3swSuoZ.js → Integration-BjDMACOk.js} +3 -3
- package/dist/{Integrations-BipzHbPq.js → Integrations-C0ygYpUr.js} +2 -2
- package/dist/{Layout-D2KTFMYS.js → Layout-BZt9uxku.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-kFFnLTTQ.js +130 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-TBmbqppw.js → NavigationTab.vue_vue_type_script_setup_true_lang-C5oOG7nr.js} +3 -3
- package/dist/{OverviewView-D8eN2tXc.js → OverviewView-B413Q1mY.js} +4 -4
- package/dist/{Report-D7oY7MNR.js → Report-CpgL93uy.js} +3 -3
- package/dist/{ReportEditor-D4Sdv6-2.js → ReportEditor-CthLn0Wx.js} +479 -476
- package/dist/{ReportView-L_VETn4p.js → ReportView-B2D5Jl3u.js} +6 -6
- package/dist/{Setting-CC9wH9NT.js → Setting-BuSJoJVP.js} +3 -3
- package/dist/{Template-DHm7_rLJ.js → Template-BLh1du5v.js} +3 -3
- package/dist/{TileEditor-CQAqJkTy.js → TileEditor-VQxT6p51.js} +137 -137
- package/dist/{TileGrid.vue_vue_type_script_setup_true_lang-jbujDyFY.js → TileGrid.vue_vue_type_script_setup_true_lang-Bc2TNbmf.js} +1 -1
- package/dist/{TransitionFade-BYS_PD1Y.js → TransitionFade-DnF7WkzY.js} +4 -4
- package/dist/{app-dOrzXjgr.js → app-CZ1_gioS.js} +12 -12
- package/dist/app.js +1 -1
- package/dist/{useRestaurantPermission-BhsJdiXZ.js → useRestaurantPermission-DCs4m_N3.js} +1 -1
- package/package.json +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-CpLX_mmh.js +0 -107
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { W as $t, g as St, _ as Dt, a as Ot, e as Ie, d as ft, b as gt, S as Ae, T as Nt, c as It } from "./TransitionFade-
|
|
3
|
-
import { C as Te, D as oe,
|
|
1
|
+
import { defineComponent as xe, mergeModels as Se, useModel as De, ref as z, computed as f, resolveComponent as F, createBlock as S, openBlock as d, withCtx as _, createElementVNode as h, createVNode as i, unref as o, normalizeClass as Ue, createTextVNode as ze, toDisplayString as E, createElementBlock as R, Fragment as Fe, renderSlot as ct, createCommentVNode as U, watch as be, renderList as Be, onMounted as pt, onUnmounted as Vt, resolveDynamicComponent as Tt, isRef as vt, normalizeStyle as et } from "vue";
|
|
2
|
+
import { W as $t, g as St, _ as Dt, a as Ot, e as Ie, d as ft, b as gt, S as Ae, T as Nt, c as It } from "./TransitionFade-DnF7WkzY.js";
|
|
3
|
+
import { C as Te, D as oe, d as Re, g as Rt, u as lt, M as bt, r as Mt, e as rt, n as Bt, f as Ut, h as qt, i as Et, j as Pt, a as zt, b as it, k as Qe, m as Lt, Q as We, o as Gt, l as At, c as st, p as Wt } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-C8BAjwYE.js";
|
|
4
4
|
import { storeToRefs as Me } from "pinia";
|
|
5
5
|
import { useRouter as ot, useRoute as at } from "vue-router";
|
|
6
6
|
import { useBreakpoints as He, useSnackbar as yt, FmButtonColorThemeVariant as $e } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as nt } from "./message-dialog-UoMWOnil.js";
|
|
8
8
|
import { u as qe, a as Ht } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
9
9
|
import { r as Le } from "./i18n-CI_sQ5d_.js";
|
|
10
|
-
import { _ as Ye } from "./TileGrid.vue_vue_type_script_setup_true_lang-
|
|
10
|
+
import { _ as Ye } from "./TileGrid.vue_vue_type_script_setup_true_lang-Bc2TNbmf.js";
|
|
11
11
|
import { a as Xe, _ as Ze } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CGbb3b5G.js";
|
|
12
|
-
import { i as jt } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
12
|
+
import { i as jt } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DkUAO3Pw.js";
|
|
13
13
|
import { useCoreStore as Jt } from "@feedmepos/mf-common";
|
|
14
|
-
import { u as Kt, a as Qt } from "./app-
|
|
15
|
-
import { d as Yt } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-
|
|
16
|
-
const Xt = /* @__PURE__ */
|
|
14
|
+
import { u as Kt, a as Qt } from "./app-CZ1_gioS.js";
|
|
15
|
+
import { d as Yt } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-CIStXVl_.js";
|
|
16
|
+
const Xt = /* @__PURE__ */ xe({
|
|
17
17
|
__name: "WidgetDialog",
|
|
18
18
|
props: /* @__PURE__ */ Se({
|
|
19
19
|
isOpen: { type: Boolean }
|
|
@@ -22,19 +22,19 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
22
22
|
modelModifiers: {}
|
|
23
23
|
}),
|
|
24
24
|
emits: /* @__PURE__ */ Se(["update:isOpen"], ["update:modelValue"]),
|
|
25
|
-
setup(M, { emit:
|
|
26
|
-
const { t: a } = qe(), { breakpoints: c } = He(), v = De(M, "modelValue"),
|
|
25
|
+
setup(M, { emit: u }) {
|
|
26
|
+
const { t: a } = qe(), { breakpoints: c } = He(), v = De(M, "modelValue"), g = M, B = u;
|
|
27
27
|
function Y() {
|
|
28
28
|
B("update:isOpen", !1);
|
|
29
29
|
}
|
|
30
30
|
function k() {
|
|
31
31
|
y.value && (v.value = y.value, y.value = void 0, B("update:isOpen", !1));
|
|
32
32
|
}
|
|
33
|
-
const y = z(),
|
|
33
|
+
const y = z(), x = f(() => !y.value);
|
|
34
34
|
return (O, G) => {
|
|
35
|
-
const D =
|
|
36
|
-
return
|
|
37
|
-
"model-value":
|
|
35
|
+
const D = F("FmButton"), T = F("FmDialog");
|
|
36
|
+
return d(), S(T, {
|
|
37
|
+
"model-value": g.isOpen
|
|
38
38
|
}, {
|
|
39
39
|
"dialog-header": _(() => [
|
|
40
40
|
ze(E(o(a)("report.widget.type")), 1)
|
|
@@ -42,7 +42,7 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
42
42
|
default: _(() => [
|
|
43
43
|
i($t, {
|
|
44
44
|
modelValue: y.value,
|
|
45
|
-
"onUpdate:modelValue": G[0] || (G[0] = (
|
|
45
|
+
"onUpdate:modelValue": G[0] || (G[0] = ($) => y.value = $),
|
|
46
46
|
class: Ue(`grid ${o(c).lg || o(c).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
|
|
47
47
|
"child-class": "p-[8px] flex flex-col"
|
|
48
48
|
}, null, 8, ["modelValue", "class"])
|
|
@@ -56,7 +56,7 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
56
56
|
}, null, 8, ["label"]),
|
|
57
57
|
i(D, {
|
|
58
58
|
label: o(a)("report.common.confirm"),
|
|
59
|
-
disabled:
|
|
59
|
+
disabled: x.value,
|
|
60
60
|
onClick: k
|
|
61
61
|
}, null, 8, ["label", "disabled"])
|
|
62
62
|
]),
|
|
@@ -64,7 +64,7 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
64
64
|
}, 8, ["model-value"]);
|
|
65
65
|
};
|
|
66
66
|
}
|
|
67
|
-
}), Zt = { class: "fm-typo-en-body-lg-600" }, tt = /* @__PURE__ */
|
|
67
|
+
}), Zt = { class: "fm-typo-en-body-lg-600" }, tt = /* @__PURE__ */ xe({
|
|
68
68
|
__name: "ReportEditorTabHeader",
|
|
69
69
|
props: /* @__PURE__ */ Se({
|
|
70
70
|
icon: {
|
|
@@ -77,22 +77,22 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
77
77
|
}),
|
|
78
78
|
emits: ["update:modelValue"],
|
|
79
79
|
setup(M) {
|
|
80
|
-
const { t:
|
|
81
|
-
return (v,
|
|
82
|
-
const B =
|
|
83
|
-
return
|
|
80
|
+
const { t: u } = qe(), a = De(M, "modelValue"), c = M;
|
|
81
|
+
return (v, g) => {
|
|
82
|
+
const B = F("FmIcon");
|
|
83
|
+
return d(), R("div", {
|
|
84
84
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
85
|
-
onClick:
|
|
85
|
+
onClick: g[0] || (g[0] = (Y) => a.value = !a.value)
|
|
86
86
|
}, [
|
|
87
|
-
h("p", Zt, E(o(
|
|
88
|
-
|
|
87
|
+
h("p", Zt, E(o(u)("report.editor.customizeReport")), 1),
|
|
88
|
+
g[1] || (g[1] = h("div", { class: "grow" }, null, -1)),
|
|
89
89
|
i(B, {
|
|
90
90
|
name: c.icon
|
|
91
91
|
}, null, 8, ["name"])
|
|
92
92
|
]);
|
|
93
93
|
};
|
|
94
94
|
}
|
|
95
|
-
}), el = /* @__PURE__ */
|
|
95
|
+
}), el = /* @__PURE__ */ xe({
|
|
96
96
|
__name: "ReportEditorTabDesktop",
|
|
97
97
|
props: {
|
|
98
98
|
modelValue: { required: !0, default: !1 },
|
|
@@ -100,17 +100,17 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
100
100
|
},
|
|
101
101
|
emits: ["update:modelValue"],
|
|
102
102
|
setup(M) {
|
|
103
|
-
const
|
|
104
|
-
return (a, c) => (
|
|
103
|
+
const u = De(M, "modelValue");
|
|
104
|
+
return (a, c) => (d(), R(Fe, null, [
|
|
105
105
|
i(tt, {
|
|
106
|
-
modelValue:
|
|
107
|
-
"onUpdate:modelValue": c[0] || (c[0] = (v) =>
|
|
106
|
+
modelValue: u.value,
|
|
107
|
+
"onUpdate:modelValue": c[0] || (c[0] = (v) => u.value = v),
|
|
108
108
|
icon: "keyboard_double_arrow_left"
|
|
109
109
|
}, null, 8, ["modelValue"]),
|
|
110
110
|
ct(a.$slots, "default")
|
|
111
111
|
], 64));
|
|
112
112
|
}
|
|
113
|
-
}), tl = /* @__PURE__ */
|
|
113
|
+
}), tl = /* @__PURE__ */ xe({
|
|
114
114
|
__name: "ReportEditorTabMobile",
|
|
115
115
|
props: {
|
|
116
116
|
modelValue: { required: !0, default: !1 },
|
|
@@ -118,28 +118,28 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
118
118
|
},
|
|
119
119
|
emits: ["update:modelValue"],
|
|
120
120
|
setup(M) {
|
|
121
|
-
const
|
|
121
|
+
const u = De(M, "modelValue");
|
|
122
122
|
return (a, c) => {
|
|
123
|
-
const v =
|
|
124
|
-
return
|
|
123
|
+
const v = F("FmTopSheet"), g = F("FmCard");
|
|
124
|
+
return d(), S(g, { class: "fixed bottom-0 w-full" }, {
|
|
125
125
|
default: _(() => [
|
|
126
126
|
i(tt, {
|
|
127
|
-
modelValue:
|
|
128
|
-
"onUpdate:modelValue": c[0] || (c[0] = (B) =>
|
|
127
|
+
modelValue: u.value,
|
|
128
|
+
"onUpdate:modelValue": c[0] || (c[0] = (B) => u.value = B),
|
|
129
129
|
icon: "keyboard_double_arrow_up"
|
|
130
130
|
}, null, 8, ["modelValue"]),
|
|
131
131
|
i(v, {
|
|
132
|
-
modelValue:
|
|
133
|
-
"onUpdate:modelValue": c[2] || (c[2] = (B) =>
|
|
132
|
+
modelValue: u.value,
|
|
133
|
+
"onUpdate:modelValue": c[2] || (c[2] = (B) => u.value = B),
|
|
134
134
|
"fullscreen-size": "sm"
|
|
135
135
|
}, {
|
|
136
136
|
default: _(() => [
|
|
137
137
|
i(tt, {
|
|
138
|
-
modelValue:
|
|
139
|
-
"onUpdate:modelValue": c[1] || (c[1] = (B) =>
|
|
138
|
+
modelValue: u.value,
|
|
139
|
+
"onUpdate:modelValue": c[1] || (c[1] = (B) => u.value = B),
|
|
140
140
|
icon: "keyboard_double_arrow_down"
|
|
141
141
|
}, null, 8, ["modelValue"]),
|
|
142
|
-
|
|
142
|
+
u.value ? ct(a.$slots, "default", { key: 0 }) : U("", !0)
|
|
143
143
|
]),
|
|
144
144
|
_: 3
|
|
145
145
|
}, 8, ["modelValue"])
|
|
@@ -160,7 +160,7 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
160
160
|
}, sl = {
|
|
161
161
|
key: 3,
|
|
162
162
|
class: "flex flex-col gap-2"
|
|
163
|
-
}, ul = /* @__PURE__ */
|
|
163
|
+
}, ul = /* @__PURE__ */ xe({
|
|
164
164
|
__name: "GlobalFilterDialog",
|
|
165
165
|
props: /* @__PURE__ */ Se({
|
|
166
166
|
schemas: {
|
|
@@ -181,66 +181,66 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
181
181
|
}),
|
|
182
182
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
183
183
|
setup(M) {
|
|
184
|
-
const { t:
|
|
184
|
+
const { t: u, te: a } = qe(), c = De(M, "globalFilter"), v = De(M, "isOpen"), g = yt(), B = M, Y = z(""), k = z(), y = z(), x = z(), O = z([]), G = z([]), D = z(!1), T = z([]), $ = z([]), X = z(Te.Equal);
|
|
185
185
|
function ae(l) {
|
|
186
186
|
return JSON.parse(JSON.stringify(l));
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Ce(l, e) {
|
|
189
189
|
return { hour: l, minute: e };
|
|
190
190
|
}
|
|
191
191
|
function ue(l) {
|
|
192
192
|
return l ? `${String(l.hour).padStart(2, "0")}:${String(l.minute).padStart(2, "0")}` : null;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function J(l) {
|
|
195
195
|
if (!l) return null;
|
|
196
196
|
const [e, s] = l.split(":").map(Number);
|
|
197
197
|
return Number.isNaN(e) || Number.isNaN(s) ? null : { hour: e, minute: s };
|
|
198
198
|
}
|
|
199
|
-
const w =
|
|
199
|
+
const w = f(() => y.value ? !(y.value.type === oe.Timestamp && x.value === Re.DateTime) : !1), ee = f(
|
|
200
200
|
() => {
|
|
201
201
|
var l;
|
|
202
|
-
return ((l = y.value) == null ? void 0 : l.type) === oe.Timestamp &&
|
|
202
|
+
return ((l = y.value) == null ? void 0 : l.type) === oe.Timestamp && x.value === Re.TimeOfDay;
|
|
203
203
|
}
|
|
204
|
-
), ne =
|
|
204
|
+
), ne = f(() => {
|
|
205
205
|
var l;
|
|
206
206
|
return (((l = y.value) == null ? void 0 : l.filterOperators) ?? []).filter((e) => e !== Te.And && e !== Te.Or).map((e) => ({
|
|
207
|
-
label:
|
|
207
|
+
label: u(`report.section.comparisonOperator.${e}`),
|
|
208
208
|
value: e
|
|
209
209
|
}));
|
|
210
210
|
});
|
|
211
|
-
function
|
|
211
|
+
function le() {
|
|
212
212
|
var e;
|
|
213
213
|
const l = (e = ne.value[0]) == null ? void 0 : e.value;
|
|
214
214
|
return l || (y.value ? H(
|
|
215
215
|
y.value.type,
|
|
216
|
-
|
|
216
|
+
x.value ?? null
|
|
217
217
|
) : Te.Equal);
|
|
218
218
|
}
|
|
219
219
|
function re(l) {
|
|
220
220
|
if (y.value)
|
|
221
221
|
return Rt({
|
|
222
|
-
operator: l ??
|
|
222
|
+
operator: l ?? le(),
|
|
223
223
|
dataType: y.value.type,
|
|
224
|
-
dimensionOption: y.value.type === oe.Timestamp ?
|
|
225
|
-
t:
|
|
224
|
+
dimensionOption: y.value.type === oe.Timestamp ? x.value ?? null : null,
|
|
225
|
+
t: u
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
if (typeof (e == null ? void 0 : e.default) == "boolean" || l.length > 0 && l.every((
|
|
230
|
-
const
|
|
228
|
+
function pe(l, e) {
|
|
229
|
+
if (typeof (e == null ? void 0 : e.default) == "boolean" || l.length > 0 && l.every((C) => typeof C == "boolean")) {
|
|
230
|
+
const C = l.reduce((I, j) => (typeof j == "boolean" && I.push(j), I), []);
|
|
231
231
|
if (e)
|
|
232
|
-
for (e.fixed &&
|
|
233
|
-
|
|
234
|
-
return
|
|
232
|
+
for (e.fixed && C.splice(e.count); C.length < e.count; )
|
|
233
|
+
C.push(typeof e.default == "boolean" ? e.default : !1);
|
|
234
|
+
return C;
|
|
235
235
|
}
|
|
236
|
-
const p = l.reduce((
|
|
236
|
+
const p = l.reduce((C, I) => (typeof I == "string" && C.push(I), C), []);
|
|
237
237
|
if (e)
|
|
238
238
|
for (e.fixed && p.splice(e.count); p.length < e.count; )
|
|
239
239
|
p.push(typeof e.default == "string" ? e.default : "");
|
|
240
240
|
return p;
|
|
241
241
|
}
|
|
242
|
-
function
|
|
243
|
-
const e = re(l), s =
|
|
242
|
+
function ve(l = X.value) {
|
|
243
|
+
const e = re(l), s = pe(
|
|
244
244
|
e ? Array(e.count).fill(e.default) : [],
|
|
245
245
|
e
|
|
246
246
|
);
|
|
@@ -253,32 +253,32 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
253
253
|
function q() {
|
|
254
254
|
return {
|
|
255
255
|
name: "",
|
|
256
|
-
startTime:
|
|
257
|
-
endTime:
|
|
256
|
+
startTime: Ce(0, 0),
|
|
257
|
+
endTime: Ce(23, 59)
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
function L() {
|
|
261
261
|
if (!(!w.value || !D.value)) {
|
|
262
|
-
if (
|
|
263
|
-
|
|
262
|
+
if (ee.value) {
|
|
263
|
+
$.value.length === 0 && ($.value = [q()]);
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
T.value.length === 0 && (T.value = [ve()]);
|
|
267
267
|
}
|
|
268
268
|
}
|
|
269
269
|
function K() {
|
|
270
|
-
var s, p,
|
|
270
|
+
var s, p, C;
|
|
271
271
|
const l = ae(((s = c.value) == null ? void 0 : s.customOptions) ?? []), e = ae(((p = c.value) == null ? void 0 : p.customTimeRanges) ?? []);
|
|
272
|
-
X.value = ((
|
|
272
|
+
X.value = ((C = l[0]) == null ? void 0 : C.operator) ?? le(), D.value = l.length > 0 || e.length > 0, T.value = l, $.value = e, L();
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
X.value = l,
|
|
276
|
-
const p =
|
|
274
|
+
function fe(l) {
|
|
275
|
+
X.value = l, T.value = T.value.map((e, s) => {
|
|
276
|
+
const p = T.value[s];
|
|
277
277
|
if (!p)
|
|
278
|
-
return
|
|
279
|
-
const
|
|
278
|
+
return ve(l);
|
|
279
|
+
const C = re(l), I = pe(
|
|
280
280
|
Array.isArray(p.values) ? [...p.values] : [],
|
|
281
|
-
|
|
281
|
+
C
|
|
282
282
|
);
|
|
283
283
|
return {
|
|
284
284
|
...p,
|
|
@@ -287,25 +287,25 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
287
287
|
};
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
290
|
+
function ye() {
|
|
291
|
+
T.value = [...T.value, ve()];
|
|
292
292
|
}
|
|
293
293
|
function Q(l) {
|
|
294
|
-
|
|
294
|
+
T.value.length <= 1 || (T.value = T.value.filter((e, s) => s !== l));
|
|
295
295
|
}
|
|
296
296
|
function ke() {
|
|
297
|
-
|
|
297
|
+
$.value = [...$.value, q()];
|
|
298
298
|
}
|
|
299
299
|
function ie(l) {
|
|
300
|
-
|
|
300
|
+
$.value.length <= 1 || ($.value = $.value.filter(
|
|
301
301
|
(e, s) => s !== l
|
|
302
302
|
));
|
|
303
303
|
}
|
|
304
|
-
function
|
|
305
|
-
const p =
|
|
306
|
-
p && (
|
|
304
|
+
function ge(l, e, s) {
|
|
305
|
+
const p = $.value[l];
|
|
306
|
+
p && ($.value[l] = {
|
|
307
307
|
...p,
|
|
308
|
-
[e]:
|
|
308
|
+
[e]: J(s)
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
function Ve(l) {
|
|
@@ -313,95 +313,95 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
313
313
|
}
|
|
314
314
|
function Oe() {
|
|
315
315
|
if (!D.value) return !0;
|
|
316
|
-
if (
|
|
317
|
-
const s =
|
|
318
|
-
return
|
|
319
|
-
(
|
|
320
|
-
) ? (
|
|
321
|
-
message:
|
|
316
|
+
if (ee.value) {
|
|
317
|
+
const s = $.value.map((C) => C.name.trim()).filter(Boolean);
|
|
318
|
+
return $.value.some(
|
|
319
|
+
(C) => !C.name.trim() || !C.startTime || !C.endTime
|
|
320
|
+
) ? (g.open({
|
|
321
|
+
message: u("report.section.filter.invalidCustomTimeRange"),
|
|
322
322
|
type: "error"
|
|
323
|
-
}), !1) : new Set(s).size !== s.length ? (
|
|
324
|
-
message:
|
|
323
|
+
}), !1) : new Set(s).size !== s.length ? (g.open({
|
|
324
|
+
message: u("report.section.filter.customTimeRangeNamesMustBeUnique"),
|
|
325
325
|
type: "error"
|
|
326
326
|
}), !1) : !0;
|
|
327
327
|
}
|
|
328
|
-
const l =
|
|
329
|
-
return
|
|
328
|
+
const l = T.value.map((s) => s.label.trim()).filter(Boolean);
|
|
329
|
+
return T.value.some(
|
|
330
330
|
(s) => !s.label.trim() || Ve(s.values)
|
|
331
|
-
) ? (
|
|
332
|
-
message:
|
|
331
|
+
) ? (g.open({ message: u("report.section.filter.invalidCustomOption"), type: "error" }), !1) : new Set(l).size !== l.length ? (g.open({
|
|
332
|
+
message: u("report.section.filter.customOptionLabelsMustBeUnique"),
|
|
333
333
|
type: "error"
|
|
334
334
|
}), !1) : !0;
|
|
335
335
|
}
|
|
336
|
-
|
|
337
|
-
var e, s, p,
|
|
336
|
+
be(v, (l) => {
|
|
337
|
+
var e, s, p, C, I;
|
|
338
338
|
l && (Y.value = ((e = c.value) == null ? void 0 : e.label) || "", k.value = B.schemas.find(
|
|
339
|
-
(
|
|
340
|
-
var
|
|
341
|
-
return
|
|
339
|
+
(j) => {
|
|
340
|
+
var Z;
|
|
341
|
+
return j.name === ((Z = c.value) == null ? void 0 : Z.schemaName);
|
|
342
342
|
}
|
|
343
|
-
), y.value = (s =
|
|
344
|
-
(
|
|
345
|
-
var
|
|
346
|
-
return
|
|
343
|
+
), y.value = (s = _e.value.find(
|
|
344
|
+
(j) => {
|
|
345
|
+
var Z;
|
|
346
|
+
return j.value.name === ((Z = c.value) == null ? void 0 : Z.name);
|
|
347
347
|
}
|
|
348
|
-
)) == null ? void 0 : s.value,
|
|
349
|
-
}),
|
|
348
|
+
)) == null ? void 0 : s.value, x.value = (p = c.value) == null ? void 0 : p.option, O.value = ((C = c.value) == null ? void 0 : C.tileIds) || [], G.value = ((I = c.value) == null ? void 0 : I.filters) || [], K());
|
|
349
|
+
}), be(D, (l) => {
|
|
350
350
|
var e;
|
|
351
|
-
l && (X.value = ((e =
|
|
352
|
-
}),
|
|
351
|
+
l && (X.value = ((e = T.value[0]) == null ? void 0 : e.operator) ?? le(), L());
|
|
352
|
+
}), be(w, (l) => {
|
|
353
353
|
if (!l) {
|
|
354
|
-
D.value = !1,
|
|
354
|
+
D.value = !1, T.value = [], $.value = [];
|
|
355
355
|
return;
|
|
356
356
|
}
|
|
357
357
|
L();
|
|
358
|
-
}),
|
|
358
|
+
}), be(ee, () => {
|
|
359
359
|
L();
|
|
360
|
-
}),
|
|
360
|
+
}), be(ne, (l) => {
|
|
361
361
|
var s;
|
|
362
362
|
const e = (s = l[0]) == null ? void 0 : s.value;
|
|
363
|
-
e && (l.some((p) => p.value === X.value) ||
|
|
363
|
+
e && (l.some((p) => p.value === X.value) || fe(e));
|
|
364
364
|
});
|
|
365
|
-
const
|
|
365
|
+
const he = f(
|
|
366
366
|
() => B.schemas.map((l) => ({
|
|
367
367
|
label: l.label || l.name,
|
|
368
368
|
value: l
|
|
369
369
|
}))
|
|
370
|
-
),
|
|
370
|
+
), _e = f(() => {
|
|
371
371
|
var l;
|
|
372
372
|
return (((l = k.value) == null ? void 0 : l.fields) || []).filter((e) => e.type !== oe.Numeric).map((e) => ({
|
|
373
373
|
label: e.label || e.name,
|
|
374
374
|
value: e
|
|
375
375
|
}));
|
|
376
|
-
}), Ee =
|
|
376
|
+
}), Ee = f(() => {
|
|
377
377
|
var l;
|
|
378
|
-
return ((l = y.value) == null ? void 0 : l.type) !== oe.Timestamp ? [] : St(
|
|
379
|
-
}), n =
|
|
380
|
-
var I,
|
|
381
|
-
const p = ((I = e.widget) == null ? void 0 : I.config.schemaNames) ?? [],
|
|
378
|
+
return ((l = y.value) == null ? void 0 : l.type) !== oe.Timestamp ? [] : St(u);
|
|
379
|
+
}), n = f(() => B.tiles.reduce((l, e, s) => {
|
|
380
|
+
var I, j, Z, ce, we;
|
|
381
|
+
const p = ((I = e.widget) == null ? void 0 : I.config.schemaNames) ?? [], C = (((j = e.widget) == null ? void 0 : j.config.joinDatasources) ?? []).flatMap(
|
|
382
382
|
(Ne) => Ne.schemaNames ?? []
|
|
383
383
|
);
|
|
384
|
-
return [...p, ...
|
|
385
|
-
label: (
|
|
384
|
+
return [...p, ...C].includes(((Z = k.value) == null ? void 0 : Z.name) || "") && l.push({
|
|
385
|
+
label: (we = (ce = e.widget) == null ? void 0 : ce.title) != null && we.trim() ? e.widget.title : `Widget ${s + 1}`,
|
|
386
386
|
value: e.id
|
|
387
387
|
}), l;
|
|
388
|
-
}, [])), m =
|
|
388
|
+
}, [])), m = f(
|
|
389
389
|
() => B.schemas.flatMap(
|
|
390
390
|
(l) => (l.fields ?? []).map((e) => ({
|
|
391
391
|
...e,
|
|
392
392
|
labels: [
|
|
393
|
-
Le(
|
|
394
|
-
Le(
|
|
393
|
+
Le(u, a, l.label, "schema"),
|
|
394
|
+
Le(u, a, e.label || e.name, "other")
|
|
395
395
|
]
|
|
396
396
|
}))
|
|
397
397
|
)
|
|
398
398
|
);
|
|
399
399
|
function P(l) {
|
|
400
400
|
var e;
|
|
401
|
-
l.name !== ((e = k.value) == null ? void 0 : e.name) && (k.value = l, y.value = void 0, X.value = Te.Equal, D.value = !1,
|
|
401
|
+
l.name !== ((e = k.value) == null ? void 0 : e.name) && (k.value = l, y.value = void 0, X.value = Te.Equal, D.value = !1, T.value = [], $.value = []);
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
y.value = l,
|
|
403
|
+
function te(l) {
|
|
404
|
+
y.value = l, x.value = l.type === oe.Timestamp ? Re.DateTime : void 0, X.value = le(), D.value = !1, T.value = [], $.value = [];
|
|
405
405
|
}
|
|
406
406
|
function H(l, e) {
|
|
407
407
|
switch (l) {
|
|
@@ -417,20 +417,20 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
417
417
|
}
|
|
418
418
|
function A() {
|
|
419
419
|
if (!k.value) {
|
|
420
|
-
|
|
420
|
+
g.open({ message: u("report.section.filter.invalidSchema"), type: "error" });
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
423
|
if (!y.value) {
|
|
424
|
-
|
|
424
|
+
g.open({ message: u("report.section.filter.invalidDimension"), type: "error" });
|
|
425
425
|
return;
|
|
426
426
|
}
|
|
427
|
-
const l = G.value.filter((p) => p ? !
|
|
427
|
+
const l = G.value.filter((p) => p ? !he.value.some((I) => I.value.name === p.schemaName) : !0);
|
|
428
428
|
if (l.length > 0) {
|
|
429
|
-
const p = l.filter((I) => !!I).map((I) => I.schemaName),
|
|
430
|
-
|
|
431
|
-
message:
|
|
429
|
+
const p = l.filter((I) => !!I).map((I) => I.schemaName), C = l.some((I) => !I) ? `, ${u("report.section.filter.unknownFilters")}` : "";
|
|
430
|
+
g.open({
|
|
431
|
+
message: u("report.section.filter.invalidFiltersSchemaNotFound", {
|
|
432
432
|
schemas: p.join(", "),
|
|
433
|
-
unknownFiltersSuffix:
|
|
433
|
+
unknownFiltersSuffix: C
|
|
434
434
|
}),
|
|
435
435
|
type: "error"
|
|
436
436
|
});
|
|
@@ -438,14 +438,14 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
438
438
|
}
|
|
439
439
|
if (!Oe())
|
|
440
440
|
return;
|
|
441
|
-
const e = D.value && !
|
|
441
|
+
const e = D.value && !ee.value ? T.value.map((p) => ({
|
|
442
442
|
label: p.label.trim(),
|
|
443
|
-
operator: p.operator ??
|
|
444
|
-
values:
|
|
443
|
+
operator: p.operator ?? le(),
|
|
444
|
+
values: pe(
|
|
445
445
|
[...p.values],
|
|
446
446
|
re(p.operator)
|
|
447
447
|
)
|
|
448
|
-
})) : void 0, s = D.value &&
|
|
448
|
+
})) : void 0, s = D.value && ee.value ? $.value.map((p) => ({
|
|
449
449
|
name: p.name.trim(),
|
|
450
450
|
startTime: p.startTime,
|
|
451
451
|
endTime: p.endTime
|
|
@@ -456,9 +456,9 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
456
456
|
label: Y.value,
|
|
457
457
|
operator: H(
|
|
458
458
|
y.value.type,
|
|
459
|
-
y.value.type === oe.Timestamp ?
|
|
459
|
+
y.value.type === oe.Timestamp ? x.value ?? Re.DateTime : null
|
|
460
460
|
),
|
|
461
|
-
option: y.value.type === oe.Timestamp ?
|
|
461
|
+
option: y.value.type === oe.Timestamp ? x.value : null,
|
|
462
462
|
values: [],
|
|
463
463
|
tileIds: [...O.value],
|
|
464
464
|
filters: ae(G.value),
|
|
@@ -469,7 +469,7 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
469
469
|
function W() {
|
|
470
470
|
v.value = !1;
|
|
471
471
|
}
|
|
472
|
-
const se =
|
|
472
|
+
const se = f(() => {
|
|
473
473
|
var l;
|
|
474
474
|
return [
|
|
475
475
|
(l = k.value) == null ? void 0 : l.name,
|
|
@@ -477,37 +477,40 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
477
477
|
];
|
|
478
478
|
});
|
|
479
479
|
function de(l) {
|
|
480
|
-
var
|
|
481
|
-
const e = B.tiles.find((
|
|
482
|
-
if (!e || !k.value || !y.value) return
|
|
483
|
-
const s = (
|
|
484
|
-
(
|
|
485
|
-
), I = [...p, ...
|
|
486
|
-
if (
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
480
|
+
var V;
|
|
481
|
+
const e = B.tiles.find((b) => b.id === l.value);
|
|
482
|
+
if (!e || !k.value || !y.value) return null;
|
|
483
|
+
const s = (V = e == null ? void 0 : e.widget) == null ? void 0 : V.config, p = (s == null ? void 0 : s.schemaNames) ?? [], C = ((s == null ? void 0 : s.joinDatasources) ?? []).flatMap(
|
|
484
|
+
(b) => b.schemaNames ?? []
|
|
485
|
+
), I = [...p, ...C], j = se.value.filter((b) => !!b).some((b) => !I.includes(b)), Z = y.value.type === oe.Timestamp;
|
|
486
|
+
if (j)
|
|
487
|
+
return u(
|
|
488
|
+
Z ? "report.section.filter.missingFilterSchema" : "report.section.filter.missingFilterSchemaOrDimension"
|
|
489
|
+
);
|
|
490
|
+
if (Z) return null;
|
|
491
|
+
const ce = ((s == null ? void 0 : s.dimensions) ?? []).map((b) => ({
|
|
492
|
+
schemaName: b.schemaName,
|
|
493
|
+
name: b.name
|
|
494
|
+
})), we = ((s == null ? void 0 : s.joinDatasources) ?? []).flatMap(
|
|
495
|
+
(b) => (b.dimensions ?? []).map((me) => ({
|
|
496
|
+
schemaName: me.schemaName,
|
|
497
|
+
name: me.name
|
|
495
498
|
}))
|
|
496
|
-
), Ne = [...
|
|
497
|
-
return
|
|
498
|
-
(
|
|
499
|
-
);
|
|
499
|
+
), Ne = [...ce, ...we], Pe = k.value.name, r = y.value.name;
|
|
500
|
+
return Ne.some(
|
|
501
|
+
(b) => b.schemaName === Pe && b.name === r
|
|
502
|
+
) ? null : u("report.section.filter.missingFilterSchemaOrDimension");
|
|
500
503
|
}
|
|
501
504
|
return (l, e) => {
|
|
502
|
-
const s =
|
|
503
|
-
return
|
|
505
|
+
const s = F("FmTextField"), p = F("FmSelect"), C = F("FmCheckbox"), I = F("FmTimePicker"), j = F("FmButton"), Z = F("FmLabel"), ce = F("FmIcon"), we = F("FmTooltip"), Ne = F("FmForm"), Pe = F("FmDialog");
|
|
506
|
+
return d(), S(Pe, {
|
|
504
507
|
modelValue: v.value,
|
|
505
508
|
"onUpdate:modelValue": e[9] || (e[9] = (r) => v.value = r),
|
|
506
509
|
overlay: !0,
|
|
507
510
|
"z-index": 10
|
|
508
511
|
}, {
|
|
509
512
|
"dialog-header": _(() => [
|
|
510
|
-
ze(E(o(
|
|
513
|
+
ze(E(o(u)("report.section.filter.globalFilter")), 1)
|
|
511
514
|
]),
|
|
512
515
|
default: _(() => [
|
|
513
516
|
i(Ne, {
|
|
@@ -520,112 +523,112 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
520
523
|
i(s, {
|
|
521
524
|
modelValue: Y.value,
|
|
522
525
|
"onUpdate:modelValue": e[0] || (e[0] = (t) => Y.value = t),
|
|
523
|
-
placeholder: o(
|
|
524
|
-
label: o(
|
|
526
|
+
placeholder: o(u)("report.section.filter.displayName"),
|
|
527
|
+
label: o(u)("report.section.filter.displayName"),
|
|
525
528
|
class: "mb-2"
|
|
526
529
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
527
530
|
i(Xe, {
|
|
528
531
|
"model-value": k.value,
|
|
529
|
-
items:
|
|
530
|
-
placeholder: o(
|
|
531
|
-
label: o(
|
|
532
|
+
items: he.value,
|
|
533
|
+
placeholder: o(u)("report.section.schema.title"),
|
|
534
|
+
label: o(u)("report.section.schema.title"),
|
|
532
535
|
"onUpdate:modelValue": e[1] || (e[1] = (t) => P(t))
|
|
533
536
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
534
537
|
i(Xe, {
|
|
535
538
|
"model-value": y.value,
|
|
536
|
-
items:
|
|
537
|
-
placeholder: o(
|
|
538
|
-
label: o(
|
|
539
|
-
"onUpdate:modelValue": e[2] || (e[2] = (t) =>
|
|
539
|
+
items: _e.value,
|
|
540
|
+
placeholder: o(u)("report.section.dimension.title"),
|
|
541
|
+
label: o(u)("report.section.dimension.title"),
|
|
542
|
+
"onUpdate:modelValue": e[2] || (e[2] = (t) => te(t))
|
|
540
543
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
541
|
-
((r = y.value) == null ? void 0 : r.type) === o(oe).Timestamp ? (
|
|
544
|
+
((r = y.value) == null ? void 0 : r.type) === o(oe).Timestamp ? (d(), S(p, {
|
|
542
545
|
key: 0,
|
|
543
|
-
modelValue:
|
|
544
|
-
"onUpdate:modelValue": e[3] || (e[3] = (t) =>
|
|
546
|
+
modelValue: x.value,
|
|
547
|
+
"onUpdate:modelValue": e[3] || (e[3] = (t) => x.value = t),
|
|
545
548
|
items: Ee.value,
|
|
546
|
-
placeholder: o(
|
|
547
|
-
label: o(
|
|
549
|
+
placeholder: o(u)("report.section.filter.timeFormatter"),
|
|
550
|
+
label: o(u)("report.section.filter.timeFormatter")
|
|
548
551
|
}, null, 8, ["modelValue", "items", "placeholder", "label"])) : U("", !0),
|
|
549
|
-
w.value ? (
|
|
552
|
+
w.value ? (d(), S(C, {
|
|
550
553
|
key: 1,
|
|
551
554
|
modelValue: D.value,
|
|
552
555
|
"onUpdate:modelValue": e[4] || (e[4] = (t) => D.value = t),
|
|
553
|
-
label: o(
|
|
556
|
+
label: o(u)("report.section.filter.customOptions"),
|
|
554
557
|
value: !0
|
|
555
558
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
556
|
-
w.value && D.value ? (
|
|
557
|
-
|
|
558
|
-
key: `custom-time-range-${
|
|
559
|
+
w.value && D.value ? (d(), R("div", ll, [
|
|
560
|
+
ee.value ? (d(!0), R(Fe, { key: 0 }, Be($.value, (t, V) => (d(), R("div", {
|
|
561
|
+
key: `custom-time-range-${V}`,
|
|
559
562
|
class: "flex flex-col gap-2"
|
|
560
563
|
}, [
|
|
561
564
|
h("div", ol, [
|
|
562
565
|
i(s, {
|
|
563
566
|
modelValue: t.name,
|
|
564
|
-
"onUpdate:modelValue": (
|
|
565
|
-
label: o(
|
|
567
|
+
"onUpdate:modelValue": (b) => t.name = b,
|
|
568
|
+
label: o(u)("report.section.filter.label")
|
|
566
569
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
|
|
567
570
|
i(I, {
|
|
568
571
|
"model-value": ue(t.startTime),
|
|
569
|
-
label: o(
|
|
570
|
-
"onUpdate:modelValue": (
|
|
572
|
+
label: o(u)("report.date.startingTime"),
|
|
573
|
+
"onUpdate:modelValue": (b) => ge(V, "startTime", b)
|
|
571
574
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
572
575
|
i(I, {
|
|
573
576
|
"model-value": ue(t.endTime),
|
|
574
|
-
label: o(
|
|
575
|
-
"onUpdate:modelValue": (
|
|
577
|
+
label: o(u)("report.date.endingTime"),
|
|
578
|
+
"onUpdate:modelValue": (b) => ge(V, "endTime", b)
|
|
576
579
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
577
|
-
|
|
578
|
-
i(
|
|
580
|
+
$.value.length > 1 ? (d(), R("div", al, [
|
|
581
|
+
i(j, {
|
|
579
582
|
icon: "delete",
|
|
580
583
|
variant: "tertiary",
|
|
581
|
-
onClick: (
|
|
584
|
+
onClick: (b) => ie(V)
|
|
582
585
|
}, null, 8, ["onClick"])
|
|
583
586
|
])) : U("", !0)
|
|
584
587
|
])
|
|
585
|
-
]))), 128)) : (
|
|
586
|
-
h("p", nl, E(o(
|
|
587
|
-
ne.value.length > 0 ? (
|
|
588
|
+
]))), 128)) : (d(), R(Fe, { key: 1 }, [
|
|
589
|
+
h("p", nl, E(o(u)("report.section.filter.operator")), 1),
|
|
590
|
+
ne.value.length > 0 ? (d(), S(Xe, {
|
|
588
591
|
key: 0,
|
|
589
592
|
"model-value": X.value,
|
|
590
593
|
items: ne.value,
|
|
591
|
-
placeholder: o(
|
|
592
|
-
"onUpdate:modelValue": e[5] || (e[5] = (t) =>
|
|
594
|
+
placeholder: o(u)("report.section.filter.operator"),
|
|
595
|
+
"onUpdate:modelValue": e[5] || (e[5] = (t) => fe(t))
|
|
593
596
|
}, null, 8, ["model-value", "items", "placeholder"])) : U("", !0),
|
|
594
|
-
(
|
|
595
|
-
key: `custom-option-${
|
|
597
|
+
(d(!0), R(Fe, null, Be(T.value, (t, V) => (d(), R("div", {
|
|
598
|
+
key: `custom-option-${V}`,
|
|
596
599
|
class: "flex flex-col gap-2"
|
|
597
600
|
}, [
|
|
598
601
|
h("div", {
|
|
599
602
|
class: Ue(["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", "sm:grid-cols-[1fr_1.6fr_auto]"])
|
|
600
603
|
}, [
|
|
601
|
-
h("span", rl, E(o(
|
|
604
|
+
h("span", rl, E(o(u)("report.section.filter.label")), 1),
|
|
602
605
|
i(s, {
|
|
603
606
|
modelValue: t.label,
|
|
604
|
-
"onUpdate:modelValue": (
|
|
607
|
+
"onUpdate:modelValue": (b) => t.label = b
|
|
605
608
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
606
|
-
(
|
|
607
|
-
key: `custom-option-value-${
|
|
609
|
+
(d(), S(Dt, {
|
|
610
|
+
key: `custom-option-value-${V}-${t.operator ?? ""}-${x.value ?? ""}`,
|
|
608
611
|
modelValue: t.values,
|
|
609
|
-
"onUpdate:modelValue": (
|
|
612
|
+
"onUpdate:modelValue": (b) => t.values = b,
|
|
610
613
|
config: re(t.operator),
|
|
611
|
-
option:
|
|
614
|
+
option: x.value
|
|
612
615
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
|
|
613
|
-
|
|
614
|
-
i(
|
|
616
|
+
T.value.length > 1 ? (d(), R("div", il, [
|
|
617
|
+
i(j, {
|
|
615
618
|
icon: "delete",
|
|
616
619
|
variant: "tertiary",
|
|
617
|
-
onClick: (
|
|
620
|
+
onClick: (b) => Q(V)
|
|
618
621
|
}, null, 8, ["onClick"])
|
|
619
622
|
])) : U("", !0)
|
|
620
623
|
])
|
|
621
624
|
]))), 128))
|
|
622
625
|
], 64)),
|
|
623
|
-
i(
|
|
626
|
+
i(j, {
|
|
624
627
|
class: "w-full",
|
|
625
628
|
variant: "primary",
|
|
626
629
|
icon: "add",
|
|
627
630
|
"icon-position": "prepend",
|
|
628
|
-
onClick: e[6] || (e[6] = (t) =>
|
|
631
|
+
onClick: e[6] || (e[6] = (t) => ee.value ? ke() : ye())
|
|
629
632
|
})
|
|
630
633
|
])) : U("", !0),
|
|
631
634
|
i(Ot, {
|
|
@@ -633,42 +636,42 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
633
636
|
"onUpdate:modelValue": e[7] || (e[7] = (t) => G.value = t),
|
|
634
637
|
options: m.value
|
|
635
638
|
}, null, 8, ["modelValue", "options"]),
|
|
636
|
-
i(
|
|
639
|
+
i(Z, { class: "mt-2 fm-typo-en-body-lg-600" }, {
|
|
637
640
|
default: _(() => [
|
|
638
|
-
ze(E(o(
|
|
641
|
+
ze(E(o(u)("report.section.filter.applyWidget")), 1)
|
|
639
642
|
]),
|
|
640
643
|
_: 1
|
|
641
644
|
}),
|
|
642
|
-
M.tiles.length > 0 ? (
|
|
643
|
-
(
|
|
645
|
+
M.tiles.length > 0 ? (d(), R("div", sl, [
|
|
646
|
+
(d(!0), R(Fe, null, Be(n.value, (t) => (d(), R("div", {
|
|
644
647
|
key: t.value,
|
|
645
648
|
class: "flex items-center"
|
|
646
649
|
}, [
|
|
647
|
-
i(
|
|
650
|
+
i(C, {
|
|
648
651
|
modelValue: O.value,
|
|
649
|
-
"onUpdate:modelValue": e[8] || (e[8] = (
|
|
652
|
+
"onUpdate:modelValue": e[8] || (e[8] = (V) => O.value = V),
|
|
650
653
|
label: t.label,
|
|
651
654
|
value: t.value
|
|
652
655
|
}, null, 8, ["modelValue", "label", "value"]),
|
|
653
|
-
de(t) ? (
|
|
656
|
+
de(t) ? (d(), S(we, {
|
|
654
657
|
key: 0,
|
|
655
|
-
content:
|
|
658
|
+
content: de(t) ?? void 0,
|
|
656
659
|
"z-index": 99,
|
|
657
660
|
class: "ml-2"
|
|
658
661
|
}, {
|
|
659
662
|
default: _(() => [
|
|
660
|
-
i(
|
|
663
|
+
i(ce, {
|
|
661
664
|
name: "warning",
|
|
662
665
|
class: "text-fm-color-system-error-300"
|
|
663
666
|
})
|
|
664
667
|
]),
|
|
665
|
-
_:
|
|
666
|
-
},
|
|
668
|
+
_: 2
|
|
669
|
+
}, 1032, ["content"])) : U("", !0)
|
|
667
670
|
]))), 128))
|
|
668
|
-
])) : (
|
|
671
|
+
])) : (d(), S(Z, {
|
|
669
672
|
key: 4,
|
|
670
673
|
class: "fm-typo-en-body-lg-400",
|
|
671
|
-
label: o(
|
|
674
|
+
label: o(u)("report.section.filter.noWidget")
|
|
672
675
|
}, null, 8, ["label"]))
|
|
673
676
|
];
|
|
674
677
|
}),
|
|
@@ -677,13 +680,13 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
677
680
|
]),
|
|
678
681
|
"dialog-footer": _(() => [
|
|
679
682
|
e[10] || (e[10] = h("div", { class: "grow" }, null, -1)),
|
|
680
|
-
i(
|
|
681
|
-
label: o(
|
|
683
|
+
i(j, {
|
|
684
|
+
label: o(u)("report.common.cancel"),
|
|
682
685
|
variant: "tertiary",
|
|
683
686
|
onClick: W
|
|
684
687
|
}, null, 8, ["label"]),
|
|
685
|
-
i(
|
|
686
|
-
label: o(
|
|
688
|
+
i(j, {
|
|
689
|
+
label: o(u)("report.common.confirm"),
|
|
687
690
|
onClick: A
|
|
688
691
|
}, null, 8, ["label"])
|
|
689
692
|
]),
|
|
@@ -697,17 +700,17 @@ const Xt = /* @__PURE__ */ Ce({
|
|
|
697
700
|
SG: { rate: 1.29, currency: "SGD", symbol: "S$" },
|
|
698
701
|
ID: { rate: 17900, currency: "IDR", symbol: "Rp" }
|
|
699
702
|
}, pl = { rate: 1, currency: "USD", symbol: "$" };
|
|
700
|
-
function ut(M,
|
|
701
|
-
const a = M / ml * dl, { rate: c, currency: v, symbol:
|
|
703
|
+
function ut(M, u) {
|
|
704
|
+
const a = M / ml * dl, { rate: c, currency: v, symbol: g } = cl[u] ?? pl;
|
|
702
705
|
return {
|
|
703
706
|
amount: a * c,
|
|
704
707
|
currency: v,
|
|
705
|
-
symbol:
|
|
708
|
+
symbol: g,
|
|
706
709
|
costUsd: a
|
|
707
710
|
};
|
|
708
711
|
}
|
|
709
|
-
function dt(M,
|
|
710
|
-
return M < 0.01 ? `< ${
|
|
712
|
+
function dt(M, u) {
|
|
713
|
+
return M < 0.01 ? `< ${u}0.01` : `${u}${M.toFixed(2)}`;
|
|
711
714
|
}
|
|
712
715
|
const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
713
716
|
key: 0,
|
|
@@ -718,66 +721,66 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
718
721
|
}, hl = ["onClick"], _l = ["title"], wl = {
|
|
719
722
|
key: 0,
|
|
720
723
|
class: "text-fm-color-typo-secondary"
|
|
721
|
-
},
|
|
724
|
+
}, Fl = { class: "text-fm-color-system-error-300" }, xl = { class: "w-full text-left" }, Cl = /* @__PURE__ */ xe({
|
|
722
725
|
__name: "TileDrillPanel",
|
|
723
726
|
props: {
|
|
724
727
|
report: {}
|
|
725
728
|
},
|
|
726
729
|
emits: ["add-widget"],
|
|
727
|
-
setup(M, { emit:
|
|
728
|
-
const a = M, c =
|
|
730
|
+
setup(M, { emit: u }) {
|
|
731
|
+
const a = M, c = u, { t: v, te: g } = qe(), B = ot(), Y = at(), { promptMessage: k } = nt(), y = lt(), x = f(() => {
|
|
729
732
|
const n = [];
|
|
730
733
|
let m = a.report.tiles;
|
|
731
734
|
for (const P of Ie.value) {
|
|
732
|
-
const
|
|
733
|
-
if (!
|
|
734
|
-
n.push(
|
|
735
|
+
const te = m.find((H) => H.id === P);
|
|
736
|
+
if (!te) break;
|
|
737
|
+
n.push(te), m = te.tiles ?? [];
|
|
735
738
|
}
|
|
736
739
|
return n;
|
|
737
740
|
});
|
|
738
|
-
|
|
741
|
+
be(x, (n) => {
|
|
739
742
|
n.length !== Ie.value.length && (Ie.value = n.map((m) => m.id));
|
|
740
743
|
});
|
|
741
|
-
const O =
|
|
744
|
+
const O = f(() => x.value[x.value.length - 1] ?? null), G = f(() => x.value[x.value.length - 2] ?? null), D = f(
|
|
742
745
|
() => O.value ? O.value.tiles ?? [] : a.report.tiles
|
|
743
|
-
),
|
|
746
|
+
), T = f(() => {
|
|
744
747
|
var n;
|
|
745
748
|
return ((n = O.value) == null ? void 0 : n.id) ?? null;
|
|
746
|
-
}),
|
|
749
|
+
}), $ = f(() => x.value.length === 0), X = f(() => {
|
|
747
750
|
var n;
|
|
748
751
|
return ((n = O.value) == null ? void 0 : n.tab) === !0;
|
|
749
|
-
}), ae =
|
|
752
|
+
}), ae = f(() => {
|
|
750
753
|
var n;
|
|
751
754
|
return ((n = G.value) == null ? void 0 : n.tab) === !0;
|
|
752
|
-
}),
|
|
753
|
-
() =>
|
|
754
|
-
), ue =
|
|
755
|
+
}), Ce = f(
|
|
756
|
+
() => x.value.reduce((n, m) => m.tab ? n : n + 1, 1)
|
|
757
|
+
), ue = f(() => !X.value && Ce.value < bt), J = f(() => $.value);
|
|
755
758
|
function w(n) {
|
|
756
759
|
n.widget || (Ie.value = [...Ie.value, n.id]);
|
|
757
760
|
}
|
|
758
|
-
function
|
|
761
|
+
function ee() {
|
|
759
762
|
Ie.value = Ie.value.slice(0, -1);
|
|
760
763
|
}
|
|
761
764
|
function ne(n) {
|
|
762
765
|
if (!n) return "";
|
|
763
766
|
const m = `report.widget.types.${n.toLowerCase()}`;
|
|
764
|
-
return
|
|
767
|
+
return g(m) ? v(m) : Le(v, g, n, "other");
|
|
765
768
|
}
|
|
766
|
-
function
|
|
769
|
+
function le(n, m) {
|
|
767
770
|
return n.widget ? n.widget.title ? ne(n.widget.title) : v("report.editor.widget", { index: m + 1 }) : n.tabTitle !== void 0 ? n.tabTitle || v("report.editor.tab", { index: m + 1 }) : n.tab ? v("report.editor.tabGroup") : v("report.editor.group");
|
|
768
771
|
}
|
|
769
772
|
function re(n, m) {
|
|
770
|
-
return !n.widget && X.value ? n.tabTitle || v("report.editor.tab", { index: m + 1 }) :
|
|
773
|
+
return !n.widget && X.value ? n.tabTitle || v("report.editor.tab", { index: m + 1 }) : le(n, m);
|
|
771
774
|
}
|
|
772
|
-
function
|
|
775
|
+
function pe(n) {
|
|
773
776
|
var m;
|
|
774
777
|
return ((m = n.tiles) == null ? void 0 : m.length) ?? 0;
|
|
775
778
|
}
|
|
776
|
-
const
|
|
777
|
-
() =>
|
|
779
|
+
const ve = f(
|
|
780
|
+
() => x.value.map((n, m) => le(n, m)).join(" › ")
|
|
778
781
|
);
|
|
779
782
|
function q(n, m) {
|
|
780
|
-
gt.value =
|
|
783
|
+
gt.value = T.value, y.editingTileIndex = m, y.editingTile = JSON.parse(JSON.stringify(n)), B.push({ name: "tileEditor", query: Y.query });
|
|
781
784
|
}
|
|
782
785
|
function L(n, m) {
|
|
783
786
|
D.value.splice(m + 1, 0, Mt(n));
|
|
@@ -788,16 +791,16 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
788
791
|
title: v("report.editor.deleteWidget"),
|
|
789
792
|
message: v("report.editor.deleteWidgetConfirm", { title: re(n, m) })
|
|
790
793
|
})) return;
|
|
791
|
-
const
|
|
794
|
+
const te = rt(n);
|
|
792
795
|
D.value.splice(m, 1), (H = a.report.globalFilters) == null || H.forEach((A) => {
|
|
793
796
|
var W;
|
|
794
|
-
A.tileIds = (W = A.tileIds) == null ? void 0 : W.filter((se) => !
|
|
797
|
+
A.tileIds = (W = A.tileIds) == null ? void 0 : W.filter((se) => !te.includes(se));
|
|
795
798
|
});
|
|
796
799
|
}
|
|
797
|
-
function
|
|
800
|
+
function fe() {
|
|
798
801
|
O.value && (O.value.tiles || (O.value.tiles = []), O.value.tiles.push(Bt(O.value.tiles.length + 1)));
|
|
799
802
|
}
|
|
800
|
-
function
|
|
803
|
+
function ye() {
|
|
801
804
|
D.value.push(Ut());
|
|
802
805
|
}
|
|
803
806
|
function Q() {
|
|
@@ -813,8 +816,8 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
813
816
|
const m = Number((P = n.size) == null ? void 0 : P.height);
|
|
814
817
|
n.size || (n.size = { width: 12, height: 12 }), !Number.isFinite(m) || m < 1 ? n.size.height = 1 : m > 12 && (n.size.height = 12);
|
|
815
818
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
819
|
+
const ge = z(!1), Ve = z(null), Oe = z([]);
|
|
820
|
+
function he(n) {
|
|
818
821
|
const m = [
|
|
819
822
|
{ parentId: null, label: v("report.editor.topLevel"), level: 1 }
|
|
820
823
|
], P = (H, A, W) => {
|
|
@@ -825,8 +828,8 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
825
828
|
if (de.tab) {
|
|
826
829
|
const e = `${W}${v("report.editor.tabGroup")}`;
|
|
827
830
|
(l = de.tiles) == null || l.forEach((s, p) => {
|
|
828
|
-
const
|
|
829
|
-
m.push({ parentId: s.id, label:
|
|
831
|
+
const C = `${e} › ${s.tabTitle || v("report.editor.tab", { index: p + 1 })}`;
|
|
832
|
+
m.push({ parentId: s.id, label: C, level: A + 1 }), P(s.tiles ?? [], A + 1, `${C} › `);
|
|
830
833
|
});
|
|
831
834
|
} else {
|
|
832
835
|
se += 1;
|
|
@@ -836,44 +839,44 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
836
839
|
});
|
|
837
840
|
};
|
|
838
841
|
P(a.report.tiles, 1, "");
|
|
839
|
-
const
|
|
842
|
+
const te = new Set(rt(n));
|
|
840
843
|
return m.filter(
|
|
841
|
-
(H) => H.parentId !==
|
|
844
|
+
(H) => H.parentId !== T.value && !(H.parentId && te.has(H.parentId)) && Pt(n, H.level)
|
|
842
845
|
);
|
|
843
846
|
}
|
|
844
|
-
function
|
|
845
|
-
Ve.value = n, Oe.value =
|
|
847
|
+
function _e(n) {
|
|
848
|
+
Ve.value = n, Oe.value = he(n), ge.value = !0;
|
|
846
849
|
}
|
|
847
850
|
function Ee(n) {
|
|
848
851
|
const m = Ve.value;
|
|
849
852
|
if (!m) return;
|
|
850
853
|
const P = D.value.indexOf(m);
|
|
851
|
-
P >= 0 && D.value.splice(P, 1), Et(a.report.tiles, n.parentId).push(m),
|
|
854
|
+
P >= 0 && D.value.splice(P, 1), Et(a.report.tiles, n.parentId).push(m), ge.value = !1, Ve.value = null;
|
|
852
855
|
}
|
|
853
856
|
return (n, m) => {
|
|
854
|
-
const P =
|
|
855
|
-
return
|
|
856
|
-
|
|
857
|
+
const P = F("FmButton"), te = F("FmTextField"), H = F("FmIcon"), A = F("FmMenuItem"), W = F("FmMenu"), se = F("FmList"), de = F("FmListItem"), l = F("FmDialog");
|
|
858
|
+
return d(), R("div", vl, [
|
|
859
|
+
$.value ? U("", !0) : (d(), R("div", fl, [
|
|
857
860
|
h("div", gl, [
|
|
858
861
|
i(P, {
|
|
859
862
|
icon: "arrow_back",
|
|
860
863
|
variant: "tertiary",
|
|
861
864
|
class: "-ml-8",
|
|
862
|
-
onClick:
|
|
865
|
+
onClick: ee
|
|
863
866
|
}),
|
|
864
867
|
h("p", {
|
|
865
868
|
class: "fm-typo-en-body-md-600 line-clamp-1 overflow-hidden break-all min-w-0 grow text-left",
|
|
866
|
-
title:
|
|
867
|
-
}, E(
|
|
869
|
+
title: ve.value
|
|
870
|
+
}, E(ve.value), 9, bl)
|
|
868
871
|
]),
|
|
869
|
-
ae.value && O.value ? (
|
|
872
|
+
ae.value && O.value ? (d(), S(te, {
|
|
870
873
|
key: 0,
|
|
871
874
|
modelValue: O.value.tabTitle,
|
|
872
875
|
"onUpdate:modelValue": m[0] || (m[0] = (e) => O.value.tabTitle = e),
|
|
873
876
|
label: o(v)("report.editor.tabName"),
|
|
874
877
|
placeholder: o(v)("report.editor.tabName")
|
|
875
878
|
}, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
|
|
876
|
-
!ae.value && O.value ? (
|
|
879
|
+
!ae.value && O.value ? (d(), S(te, {
|
|
877
880
|
key: 1,
|
|
878
881
|
modelValue: O.value.size.width,
|
|
879
882
|
"onUpdate:modelValue": m[1] || (m[1] = (e) => O.value.size.width = e),
|
|
@@ -882,7 +885,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
882
885
|
label: o(v)("report.editor.width"),
|
|
883
886
|
onBlur: m[2] || (m[2] = (e) => ke(O.value))
|
|
884
887
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
885
|
-
!ae.value && O.value ? (
|
|
888
|
+
!ae.value && O.value ? (d(), S(te, {
|
|
886
889
|
key: 2,
|
|
887
890
|
modelValue: O.value.size.height,
|
|
888
891
|
"onUpdate:modelValue": m[3] || (m[3] = (e) => O.value.size.height = e),
|
|
@@ -892,7 +895,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
892
895
|
onBlur: m[4] || (m[4] = (e) => ie(O.value))
|
|
893
896
|
}, null, 8, ["modelValue", "label"])) : U("", !0)
|
|
894
897
|
])),
|
|
895
|
-
D.value.length === 0 ? (
|
|
898
|
+
D.value.length === 0 ? (d(), R("div", yl, E(o(v)("report.editor.emptyLevel")), 1)) : (d(), S(se, { key: 2 }, {
|
|
896
899
|
default: _(() => [
|
|
897
900
|
i(o(ft), {
|
|
898
901
|
list: D.value,
|
|
@@ -914,9 +917,9 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
914
917
|
title: re(e, s)
|
|
915
918
|
}, [
|
|
916
919
|
ze(E(re(e, s)) + " ", 1),
|
|
917
|
-
e.widget ? U("", !0) : (
|
|
920
|
+
e.widget ? U("", !0) : (d(), R("span", wl, " · " + E(pe(e)), 1))
|
|
918
921
|
], 8, _l),
|
|
919
|
-
e.widget ? U("", !0) : (
|
|
922
|
+
e.widget ? U("", !0) : (d(), S(H, {
|
|
920
923
|
key: 0,
|
|
921
924
|
name: "chevron_right",
|
|
922
925
|
class: "shrink-0"
|
|
@@ -934,15 +937,15 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
934
937
|
})
|
|
935
938
|
]),
|
|
936
939
|
default: _(() => [
|
|
937
|
-
e.widget ? (
|
|
940
|
+
e.widget ? (d(), S(A, {
|
|
938
941
|
key: 0,
|
|
939
942
|
label: o(v)("report.common.edit"),
|
|
940
943
|
onClick: (p) => q(e, s)
|
|
941
944
|
}, null, 8, ["label", "onClick"])) : U("", !0),
|
|
942
|
-
e.tab ? U("", !0) : (
|
|
945
|
+
e.tab ? U("", !0) : (d(), S(A, {
|
|
943
946
|
key: 1,
|
|
944
947
|
label: o(v)("report.editor.moveTo"),
|
|
945
|
-
onClick: (p) =>
|
|
948
|
+
onClick: (p) => _e(e)
|
|
946
949
|
}, null, 8, ["label", "onClick"])),
|
|
947
950
|
i(A, {
|
|
948
951
|
label: o(v)("report.common.duplicate"),
|
|
@@ -952,7 +955,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
952
955
|
onClick: (p) => K(e, s)
|
|
953
956
|
}, {
|
|
954
957
|
label: _(() => [
|
|
955
|
-
h("p",
|
|
958
|
+
h("p", Fl, E(o(v)("report.common.remove")), 1)
|
|
956
959
|
]),
|
|
957
960
|
_: 2
|
|
958
961
|
}, 1032, ["onClick"])
|
|
@@ -966,7 +969,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
966
969
|
]),
|
|
967
970
|
_: 1
|
|
968
971
|
})),
|
|
969
|
-
X.value ? (
|
|
972
|
+
X.value ? (d(), S(P, {
|
|
970
973
|
key: 3,
|
|
971
974
|
label: o(v)("report.editor.addTab"),
|
|
972
975
|
variant: "secondary",
|
|
@@ -974,8 +977,8 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
974
977
|
"icon-position": "prepend",
|
|
975
978
|
"border-color": o($e).ColorPrimary,
|
|
976
979
|
"text-color": o($e).ColorPrimary,
|
|
977
|
-
onClick:
|
|
978
|
-
}, null, 8, ["label", "border-color", "text-color"])) : (
|
|
980
|
+
onClick: fe
|
|
981
|
+
}, null, 8, ["label", "border-color", "text-color"])) : (d(), S(W, {
|
|
979
982
|
key: 4,
|
|
980
983
|
trigger: "click",
|
|
981
984
|
shift: !0
|
|
@@ -994,14 +997,14 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
994
997
|
default: _(() => [
|
|
995
998
|
i(A, {
|
|
996
999
|
label: o(v)("report.editor.addWidget"),
|
|
997
|
-
onClick: m[5] || (m[5] = (e) => c("add-widget",
|
|
1000
|
+
onClick: m[5] || (m[5] = (e) => c("add-widget", T.value))
|
|
998
1001
|
}, null, 8, ["label"]),
|
|
999
|
-
ue.value ? (
|
|
1002
|
+
ue.value ? (d(), S(A, {
|
|
1000
1003
|
key: 0,
|
|
1001
1004
|
label: o(v)("report.editor.addGroup"),
|
|
1002
|
-
onClick:
|
|
1005
|
+
onClick: ye
|
|
1003
1006
|
}, null, 8, ["label"])) : U("", !0),
|
|
1004
|
-
|
|
1007
|
+
J.value ? (d(), S(A, {
|
|
1005
1008
|
key: 1,
|
|
1006
1009
|
label: o(v)("report.editor.addTabGroup"),
|
|
1007
1010
|
onClick: Q
|
|
@@ -1010,8 +1013,8 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1010
1013
|
_: 1
|
|
1011
1014
|
})),
|
|
1012
1015
|
i(l, {
|
|
1013
|
-
modelValue:
|
|
1014
|
-
"onUpdate:modelValue": m[6] || (m[6] = (e) =>
|
|
1016
|
+
modelValue: ge.value,
|
|
1017
|
+
"onUpdate:modelValue": m[6] || (m[6] = (e) => ge.value = e),
|
|
1015
1018
|
overlay: !0,
|
|
1016
1019
|
"z-index": 10
|
|
1017
1020
|
}, {
|
|
@@ -1021,12 +1024,12 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1021
1024
|
default: _(() => [
|
|
1022
1025
|
i(se, null, {
|
|
1023
1026
|
default: _(() => [
|
|
1024
|
-
(
|
|
1027
|
+
(d(!0), R(Fe, null, Be(Oe.value, (e) => (d(), S(de, {
|
|
1025
1028
|
key: e.parentId ?? "root",
|
|
1026
1029
|
onClick: (s) => Ee(e)
|
|
1027
1030
|
}, {
|
|
1028
1031
|
default: _(() => [
|
|
1029
|
-
h("p",
|
|
1032
|
+
h("p", xl, E(e.label), 1)
|
|
1030
1033
|
]),
|
|
1031
1034
|
_: 2
|
|
1032
1035
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -1042,7 +1045,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1042
1045
|
}), kl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Vl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Tl = { class: "flex items-center gap-8" }, $l = {
|
|
1043
1046
|
key: 2,
|
|
1044
1047
|
class: "flex flex-col gap-8 rounded-md border border-fm-color-border px-16 py-12"
|
|
1045
|
-
}, Sl = { class: "fm-typo-en-body-sm-400" }, Dl = { class: "fm-typo-en-body-sm-400 font-bold" }, Ol = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Nl = { 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]" }, Rl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, mt = /* @__PURE__ */
|
|
1048
|
+
}, Sl = { class: "fm-typo-en-body-sm-400" }, Dl = { class: "fm-typo-en-body-sm-400 font-bold" }, Ol = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Nl = { 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]" }, Rl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, mt = /* @__PURE__ */ xe({
|
|
1046
1049
|
__name: "ReportEditorTab",
|
|
1047
1050
|
props: /* @__PURE__ */ Se({
|
|
1048
1051
|
hideConfiguration: {
|
|
@@ -1054,38 +1057,38 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1054
1057
|
modelModifiers: {}
|
|
1055
1058
|
}),
|
|
1056
1059
|
emits: /* @__PURE__ */ Se(["hideConfiguration"], ["update:modelValue"]),
|
|
1057
|
-
setup(M, { emit:
|
|
1058
|
-
const a = De(M, "modelValue"), { breakpoints: c } = He(), v = M,
|
|
1060
|
+
setup(M, { emit: u }) {
|
|
1061
|
+
const a = De(M, "modelValue"), { breakpoints: c } = He(), v = M, g = u, B = ot(), Y = at(), k = z(), {
|
|
1059
1062
|
currentSelectWidgetType: y,
|
|
1060
|
-
categories:
|
|
1063
|
+
categories: x,
|
|
1061
1064
|
editingTile: O,
|
|
1062
1065
|
editingTileIndex: G,
|
|
1063
1066
|
editingGlobalFilter: D,
|
|
1064
|
-
editingGlobalFilterIndex:
|
|
1065
|
-
} = Me(lt()), { schemas:
|
|
1067
|
+
editingGlobalFilterIndex: T
|
|
1068
|
+
} = Me(lt()), { schemas: $ } = Me(zt()), { globalFilters: X } = Me(it()), { getGlobalFilterLabel: ae } = it(), { promptMessage: Ce } = nt(), ue = z(!1), J = z(!1), { t: w, te: ee, locale: ne } = qe(), le = z(void 0), re = f(() => {
|
|
1066
1069
|
const r = Qe(a.value.tiles).flatMap((t) => {
|
|
1067
|
-
var
|
|
1068
|
-
const
|
|
1069
|
-
return [...
|
|
1070
|
+
var me;
|
|
1071
|
+
const V = t.widget.config.schemaNames ?? [], b = ((me = t.widget.config.joinDatasources) == null ? void 0 : me.flatMap((Ge) => Ge.schemaNames ?? [])) ?? [];
|
|
1072
|
+
return [...V, ...b];
|
|
1070
1073
|
});
|
|
1071
|
-
return [...new Set(r)].reduce((t,
|
|
1072
|
-
const
|
|
1073
|
-
return
|
|
1074
|
+
return [...new Set(r)].reduce((t, V) => {
|
|
1075
|
+
const b = $.value.find((me) => me.name === V);
|
|
1076
|
+
return b && t.push(b), t;
|
|
1074
1077
|
}, []);
|
|
1075
|
-
}),
|
|
1076
|
-
function
|
|
1077
|
-
|
|
1078
|
+
}), pe = z(null);
|
|
1079
|
+
function ve(r) {
|
|
1080
|
+
pe.value = r, J.value = !0;
|
|
1078
1081
|
}
|
|
1079
|
-
|
|
1082
|
+
be(
|
|
1080
1083
|
() => y.value,
|
|
1081
1084
|
() => {
|
|
1082
|
-
y.value !== void 0 && (
|
|
1085
|
+
y.value !== void 0 && (le.value = jt(y.value), O.value = le.value, G.value = -1, gt.value = pe.value, B.push({
|
|
1083
1086
|
name: "tileEditor",
|
|
1084
1087
|
query: Y.query
|
|
1085
1088
|
}));
|
|
1086
1089
|
},
|
|
1087
1090
|
{ immediate: !0 }
|
|
1088
|
-
),
|
|
1091
|
+
), be(
|
|
1089
1092
|
() => a.value.tiles,
|
|
1090
1093
|
(r) => {
|
|
1091
1094
|
Lt(r);
|
|
@@ -1099,7 +1102,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1099
1102
|
variant: "tertiary",
|
|
1100
1103
|
onClick: (r) => {
|
|
1101
1104
|
var t;
|
|
1102
|
-
|
|
1105
|
+
T.value = r, D.value = JSON.parse(JSON.stringify((t = a.value.globalFilters) == null ? void 0 : t[r])), ue.value = !0;
|
|
1103
1106
|
}
|
|
1104
1107
|
},
|
|
1105
1108
|
{
|
|
@@ -1107,11 +1110,11 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1107
1110
|
selected: !1,
|
|
1108
1111
|
variant: "tertiary",
|
|
1109
1112
|
onClick: (r) => {
|
|
1110
|
-
var
|
|
1111
|
-
const t = (
|
|
1113
|
+
var b;
|
|
1114
|
+
const t = (b = a.value.globalFilters) == null ? void 0 : b[r];
|
|
1112
1115
|
if (!t) return;
|
|
1113
|
-
const
|
|
1114
|
-
a.value.globalFilters || (a.value.globalFilters = []), a.value.globalFilters.push(
|
|
1116
|
+
const V = JSON.parse(JSON.stringify(t));
|
|
1117
|
+
a.value.globalFilters || (a.value.globalFilters = []), a.value.globalFilters.push(V);
|
|
1115
1118
|
}
|
|
1116
1119
|
},
|
|
1117
1120
|
{
|
|
@@ -1119,26 +1122,26 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1119
1122
|
selected: !1,
|
|
1120
1123
|
variant: "destructive",
|
|
1121
1124
|
onClick: async (r) => {
|
|
1122
|
-
var
|
|
1123
|
-
const t = (
|
|
1125
|
+
var b, me;
|
|
1126
|
+
const t = (b = a.value.globalFilters) == null ? void 0 : b[r];
|
|
1124
1127
|
if (!t) return;
|
|
1125
|
-
await
|
|
1128
|
+
await Ce({
|
|
1126
1129
|
title: w("report.editor.deleteWidget"),
|
|
1127
1130
|
message: w("report.editor.deleteWidgetConfirm", {
|
|
1128
1131
|
title: ae(t)
|
|
1129
1132
|
})
|
|
1130
|
-
}) && ((
|
|
1133
|
+
}) && ((me = a.value.globalFilters) == null || me.splice(r, 1));
|
|
1131
1134
|
}
|
|
1132
1135
|
}
|
|
1133
|
-
], L =
|
|
1136
|
+
], L = f(() => x.value.map((r) => ({
|
|
1134
1137
|
label: w(`report.category.${r.name}`),
|
|
1135
1138
|
value: r.id
|
|
1136
|
-
}))), { sessionUser: K } = Jt(),
|
|
1139
|
+
}))), { sessionUser: K } = Jt(), fe = f(
|
|
1137
1140
|
() => {
|
|
1138
|
-
var r, t,
|
|
1139
|
-
return ((t = (r = K.value) == null ? void 0 : r.role) == null ? void 0 : t.isAdmin) === !0 || ((
|
|
1141
|
+
var r, t, V, b;
|
|
1142
|
+
return ((t = (r = K.value) == null ? void 0 : r.role) == null ? void 0 : t.isAdmin) === !0 || ((b = (V = K.value) == null ? void 0 : V.role) == null ? void 0 : b.isStaff) === !0;
|
|
1140
1143
|
}
|
|
1141
|
-
),
|
|
1144
|
+
), ye = f({
|
|
1142
1145
|
get: () => a.value.queryVersion === "v2",
|
|
1143
1146
|
set: (r) => {
|
|
1144
1147
|
a.value.queryVersion = r ? "v2" : "v1", r ? a.value.queryDatasource = a.value.queryDatasource ?? We.Postgres : a.value.queryDatasource = void 0;
|
|
@@ -1150,16 +1153,16 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1150
1153
|
{ label: w("report.common.noBatch"), value: "none" },
|
|
1151
1154
|
{ label: w("report.common.days"), value: "days" },
|
|
1152
1155
|
{ label: w("report.common.locations"), value: "locations" }
|
|
1153
|
-
], ie =
|
|
1156
|
+
], ie = f({
|
|
1154
1157
|
get: () => {
|
|
1155
1158
|
var r, t;
|
|
1156
1159
|
return (r = a.value.batch) != null && r.days ? "days" : (t = a.value.batch) != null && t.locations ? "locations" : "none";
|
|
1157
1160
|
},
|
|
1158
1161
|
set: (r) => {
|
|
1159
|
-
var t,
|
|
1160
|
-
r === "none" ? a.value.batch = void 0 : r === "days" ? a.value.batch = { days: ((t = a.value.batch) == null ? void 0 : t.days) || 1 } : r === "locations" && (a.value.batch = { locations: ((
|
|
1162
|
+
var t, V;
|
|
1163
|
+
r === "none" ? a.value.batch = void 0 : r === "days" ? a.value.batch = { days: ((t = a.value.batch) == null ? void 0 : t.days) || 1 } : r === "locations" && (a.value.batch = { locations: ((V = a.value.batch) == null ? void 0 : V.locations) || 10 });
|
|
1161
1164
|
}
|
|
1162
|
-
}),
|
|
1165
|
+
}), ge = f({
|
|
1163
1166
|
get: () => {
|
|
1164
1167
|
var r, t;
|
|
1165
1168
|
if (ie.value === "days") return ((r = a.value.batch) == null ? void 0 : r.days) ?? 1;
|
|
@@ -1168,105 +1171,105 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1168
1171
|
set: (r) => {
|
|
1169
1172
|
r && (ie.value === "days" ? a.value.batch = { days: r } : ie.value === "locations" && (a.value.batch = { locations: r }));
|
|
1170
1173
|
}
|
|
1171
|
-
}), Ve =
|
|
1172
|
-
get: () => Le(w,
|
|
1174
|
+
}), Ve = f({
|
|
1175
|
+
get: () => Le(w, ee, a.value.name, "other"),
|
|
1173
1176
|
set: (r) => {
|
|
1174
1177
|
a.value.name = r;
|
|
1175
1178
|
}
|
|
1176
1179
|
}), { country: Oe } = Me(Kt()), {
|
|
1177
|
-
dateRange:
|
|
1178
|
-
compareDateRange:
|
|
1180
|
+
dateRange: he,
|
|
1181
|
+
compareDateRange: _e,
|
|
1179
1182
|
timeRange: Ee,
|
|
1180
1183
|
selectedLocationIds: n,
|
|
1181
1184
|
businessDataVersion: m,
|
|
1182
1185
|
restaurants: P,
|
|
1183
|
-
warehouses:
|
|
1184
|
-
} = Me(Qt()), H =
|
|
1186
|
+
warehouses: te
|
|
1187
|
+
} = Me(Qt()), H = f(
|
|
1185
1188
|
() => a.value.queryVersion === "v2" && a.value.queryDatasource === We.BigQuery
|
|
1186
|
-
), A =
|
|
1187
|
-
const r =
|
|
1189
|
+
), A = f(() => H.value && fe.value), W = z(null), se = z(!1), de = f(() => {
|
|
1190
|
+
const r = he.value.startDate ?? he.value.endDate;
|
|
1188
1191
|
return r ? {
|
|
1189
1192
|
startDate: r,
|
|
1190
1193
|
endDate: r
|
|
1191
|
-
} :
|
|
1192
|
-
}), l =
|
|
1193
|
-
const r =
|
|
1194
|
+
} : he.value;
|
|
1195
|
+
}), l = f(() => {
|
|
1196
|
+
const r = _e.value.startDate ?? _e.value.endDate;
|
|
1194
1197
|
return r ? {
|
|
1195
1198
|
startDate: r,
|
|
1196
1199
|
endDate: r
|
|
1197
|
-
} :
|
|
1198
|
-
}), e =
|
|
1200
|
+
} : _e.value;
|
|
1201
|
+
}), e = f(() => {
|
|
1199
1202
|
const r = a.value.batch;
|
|
1200
1203
|
if (!r) return 1;
|
|
1201
1204
|
if (r.locations) {
|
|
1202
|
-
const t = P.value.length +
|
|
1205
|
+
const t = P.value.length + te.value.length;
|
|
1203
1206
|
return Math.max(1, Math.ceil(t / r.locations));
|
|
1204
1207
|
}
|
|
1205
1208
|
return 1;
|
|
1206
|
-
}), s =
|
|
1209
|
+
}), s = f(() => {
|
|
1207
1210
|
if (W.value == null || W.value === 0) return null;
|
|
1208
1211
|
const r = W.value * e.value;
|
|
1209
1212
|
return ut(r, Oe.value);
|
|
1210
|
-
}), p =
|
|
1213
|
+
}), p = f(() => W.value == null || W.value === 0 ? null : ut(W.value, Oe.value)), C = f(() => s.value ? dt(s.value.amount, s.value.symbol) : ""), I = f(() => p.value ? dt(p.value.amount, p.value.symbol) : ""), j = f(() => e.value === 1 ? w("report.common.estimatedCostBatchSingular") : w("report.common.estimatedCostBatchPlural")), Z = f(() => se.value ? "..." : !C.value || !I.value ? "--" : w("report.common.estimatedCostFormula", {
|
|
1211
1214
|
batchCount: e.value,
|
|
1212
|
-
batchLabel:
|
|
1215
|
+
batchLabel: j.value,
|
|
1213
1216
|
baseCost: I.value,
|
|
1214
|
-
totalCost:
|
|
1217
|
+
totalCost: C.value
|
|
1215
1218
|
}));
|
|
1216
|
-
let
|
|
1217
|
-
const
|
|
1219
|
+
let ce = [];
|
|
1220
|
+
const we = Yt(async () => {
|
|
1218
1221
|
if (!A.value) return;
|
|
1219
1222
|
const r = Qe(a.value.tiles).filter(
|
|
1220
1223
|
(t) => {
|
|
1221
|
-
var
|
|
1222
|
-
return ((
|
|
1224
|
+
var V;
|
|
1225
|
+
return ((V = t.widget.config.schemaNames) == null ? void 0 : V.length) > 0;
|
|
1223
1226
|
}
|
|
1224
1227
|
);
|
|
1225
1228
|
if (r.length === 0) {
|
|
1226
1229
|
W.value = null;
|
|
1227
1230
|
return;
|
|
1228
1231
|
}
|
|
1229
|
-
se.value = !0,
|
|
1232
|
+
se.value = !0, ce.forEach((t) => t.abort()), ce = [];
|
|
1230
1233
|
try {
|
|
1231
1234
|
const t = await Promise.all(
|
|
1232
|
-
r.map((
|
|
1233
|
-
const
|
|
1234
|
-
return
|
|
1235
|
-
widget:
|
|
1236
|
-
signal:
|
|
1237
|
-
tileId:
|
|
1235
|
+
r.map((V) => {
|
|
1236
|
+
const b = new AbortController();
|
|
1237
|
+
return ce.push(b), Gt({
|
|
1238
|
+
widget: V.widget,
|
|
1239
|
+
signal: b.signal,
|
|
1240
|
+
tileId: V.id,
|
|
1238
1241
|
scopedDateRange: de.value,
|
|
1239
1242
|
scopedCompareDateRange: l.value
|
|
1240
1243
|
});
|
|
1241
1244
|
})
|
|
1242
1245
|
);
|
|
1243
|
-
W.value = t.reduce((
|
|
1246
|
+
W.value = t.reduce((V, b) => V + (b.totalBytesProcessed ?? 0), 0);
|
|
1244
1247
|
} catch (t) {
|
|
1245
1248
|
t.code !== "ERR_CANCELED" && (W.value = null);
|
|
1246
1249
|
} finally {
|
|
1247
1250
|
se.value = !1;
|
|
1248
1251
|
}
|
|
1249
1252
|
}, 1e3);
|
|
1250
|
-
|
|
1253
|
+
be(
|
|
1251
1254
|
[
|
|
1252
1255
|
() => a.value.tiles,
|
|
1253
1256
|
() => a.value.queryVersion,
|
|
1254
1257
|
() => a.value.queryDatasource,
|
|
1255
1258
|
() => a.value.batch,
|
|
1256
|
-
() => ye.value,
|
|
1257
|
-
() => Ee.value,
|
|
1258
1259
|
() => he.value,
|
|
1260
|
+
() => Ee.value,
|
|
1261
|
+
() => _e.value,
|
|
1259
1262
|
() => n.value,
|
|
1260
1263
|
() => m.value
|
|
1261
1264
|
],
|
|
1262
1265
|
() => {
|
|
1263
|
-
|
|
1266
|
+
we();
|
|
1264
1267
|
},
|
|
1265
1268
|
{ deep: !0 }
|
|
1266
1269
|
), pt(() => {
|
|
1267
|
-
|
|
1270
|
+
we();
|
|
1268
1271
|
}), Vt(() => {
|
|
1269
|
-
|
|
1272
|
+
ce.forEach((r) => r.abort());
|
|
1270
1273
|
});
|
|
1271
1274
|
function Ne(r) {
|
|
1272
1275
|
var t;
|
|
@@ -1275,17 +1278,17 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1275
1278
|
function Pe(r) {
|
|
1276
1279
|
return !re.value.find((t) => t.name === r.schemaName);
|
|
1277
1280
|
}
|
|
1278
|
-
return
|
|
1281
|
+
return be(
|
|
1279
1282
|
() => a.value.globalFilters,
|
|
1280
1283
|
(r) => {
|
|
1281
1284
|
X.value = JSON.parse(JSON.stringify(r || []));
|
|
1282
1285
|
},
|
|
1283
1286
|
{ deep: !0, immediate: !0 }
|
|
1284
1287
|
), (r, t) => {
|
|
1285
|
-
const
|
|
1286
|
-
return
|
|
1288
|
+
const V = F("FmTextField"), b = F("FmSelect"), me = F("FmSwitch"), Ge = F("FmButton"), je = F("FmIcon"), Je = F("FmTooltip"), ht = F("FmMenuItem"), _t = F("FmMenu"), wt = F("FmListItem"), Ft = F("FmList"), xt = F("FmForm");
|
|
1289
|
+
return d(), S(Tt(o(c).lg || o(c).md ? el : tl), {
|
|
1287
1290
|
"model-value": v.hideConfiguration,
|
|
1288
|
-
"onUpdate:modelValue": t[12] || (t[12] = (N) =>
|
|
1291
|
+
"onUpdate:modelValue": t[12] || (t[12] = (N) => g("hideConfiguration", N))
|
|
1289
1292
|
}, {
|
|
1290
1293
|
default: _(() => [
|
|
1291
1294
|
i(ul, {
|
|
@@ -1295,16 +1298,16 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1295
1298
|
tiles: o(Qe)(a.value.tiles),
|
|
1296
1299
|
schemas: re.value,
|
|
1297
1300
|
"onUpdate:globalFilter": t[1] || (t[1] = (N) => {
|
|
1298
|
-
N && (a.value.globalFilters || (a.value.globalFilters = []), typeof o(
|
|
1301
|
+
N && (a.value.globalFilters || (a.value.globalFilters = []), typeof o(T) == "number" && o(T) >= 0 ? a.value.globalFilters[o(T)] = N : a.value.globalFilters.push(N));
|
|
1299
1302
|
})
|
|
1300
1303
|
}, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
|
|
1301
1304
|
i(Xt, {
|
|
1302
1305
|
modelValue: o(y),
|
|
1303
1306
|
"onUpdate:modelValue": t[2] || (t[2] = (N) => vt(y) ? y.value = N : null),
|
|
1304
|
-
"is-open":
|
|
1305
|
-
"onUpdate:isOpen": t[3] || (t[3] = (N) =>
|
|
1307
|
+
"is-open": J.value,
|
|
1308
|
+
"onUpdate:isOpen": t[3] || (t[3] = (N) => J.value = N)
|
|
1306
1309
|
}, null, 8, ["modelValue", "is-open"]),
|
|
1307
|
-
i(
|
|
1310
|
+
i(xt, {
|
|
1308
1311
|
ref_key: "form",
|
|
1309
1312
|
ref: k,
|
|
1310
1313
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
@@ -1317,20 +1320,20 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1317
1320
|
]),
|
|
1318
1321
|
content: _(() => [
|
|
1319
1322
|
h("div", kl, [
|
|
1320
|
-
i(
|
|
1323
|
+
i(V, {
|
|
1321
1324
|
modelValue: Ve.value,
|
|
1322
1325
|
"onUpdate:modelValue": t[4] || (t[4] = (N) => Ve.value = N),
|
|
1323
1326
|
label: o(w)("report.common.name"),
|
|
1324
1327
|
placeholder: o(w)("report.common.name")
|
|
1325
1328
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
1326
|
-
(
|
|
1329
|
+
(d(), S(b, {
|
|
1327
1330
|
key: `category-${o(ne)}`,
|
|
1328
1331
|
modelValue: a.value.category,
|
|
1329
1332
|
"onUpdate:modelValue": t[5] || (t[5] = (N) => a.value.category = N),
|
|
1330
1333
|
label: o(w)("report.common.category"),
|
|
1331
1334
|
items: L.value
|
|
1332
1335
|
}, null, 8, ["modelValue", "label", "items"])),
|
|
1333
|
-
i(
|
|
1336
|
+
i(V, {
|
|
1334
1337
|
modelValue: a.value.description,
|
|
1335
1338
|
"onUpdate:modelValue": t[6] || (t[6] = (N) => a.value.description = N),
|
|
1336
1339
|
label: o(w)("report.common.description"),
|
|
@@ -1352,35 +1355,35 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1352
1355
|
h("div", Vl, [
|
|
1353
1356
|
h("div", Tl, [
|
|
1354
1357
|
t[15] || (t[15] = h("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "V2", -1)),
|
|
1355
|
-
i(
|
|
1356
|
-
modelValue:
|
|
1357
|
-
"onUpdate:modelValue": t[7] || (t[7] = (N) =>
|
|
1358
|
+
i(me, {
|
|
1359
|
+
modelValue: ye.value,
|
|
1360
|
+
"onUpdate:modelValue": t[7] || (t[7] = (N) => ye.value = N)
|
|
1358
1361
|
}, null, 8, ["modelValue"])
|
|
1359
1362
|
]),
|
|
1360
|
-
|
|
1363
|
+
ye.value && fe.value ? (d(), S(b, {
|
|
1361
1364
|
key: 0,
|
|
1362
1365
|
modelValue: a.value.queryDatasource,
|
|
1363
1366
|
"onUpdate:modelValue": t[8] || (t[8] = (N) => a.value.queryDatasource = N),
|
|
1364
1367
|
label: o(w)("report.common.queryDatasource"),
|
|
1365
1368
|
items: Q
|
|
1366
1369
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1367
|
-
i(
|
|
1370
|
+
i(b, {
|
|
1368
1371
|
modelValue: ie.value,
|
|
1369
1372
|
"onUpdate:modelValue": t[9] || (t[9] = (N) => ie.value = N),
|
|
1370
1373
|
label: o(w)("report.common.batch"),
|
|
1371
1374
|
items: ke
|
|
1372
1375
|
}, null, 8, ["modelValue", "label"]),
|
|
1373
|
-
ie.value !== "none" ? (
|
|
1376
|
+
ie.value !== "none" ? (d(), S(V, {
|
|
1374
1377
|
key: 1,
|
|
1375
|
-
modelValue:
|
|
1376
|
-
"onUpdate:modelValue": t[10] || (t[10] = (N) =>
|
|
1378
|
+
modelValue: ge.value,
|
|
1379
|
+
"onUpdate:modelValue": t[10] || (t[10] = (N) => ge.value = N),
|
|
1377
1380
|
modelModifiers: { number: !0 },
|
|
1378
1381
|
label: ie.value === "days" ? o(w)("report.common.days") : o(w)("report.common.locations"),
|
|
1379
1382
|
type: "number"
|
|
1380
1383
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1381
|
-
A.value ? (
|
|
1384
|
+
A.value ? (d(), R("div", $l, [
|
|
1382
1385
|
h("span", Sl, E(o(w)("report.common.estimatedBqCost")), 1),
|
|
1383
|
-
h("p", Dl, E(
|
|
1386
|
+
h("p", Dl, E(Z.value), 1),
|
|
1384
1387
|
h("div", Ol, [
|
|
1385
1388
|
h("div", null, "* " + E(o(w)("report.common.estimatedCostGuidelineBigQuery")), 1),
|
|
1386
1389
|
h("div", null, "* " + E(o(w)("report.common.estimatedCostGuidelineDateRange")), 1),
|
|
@@ -1409,10 +1412,10 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1409
1412
|
"border-color": o($e).ColorPrimary,
|
|
1410
1413
|
"text-color": o($e).ColorPrimary,
|
|
1411
1414
|
onClick: t[11] || (t[11] = () => {
|
|
1412
|
-
|
|
1415
|
+
T.value = null, D.value = null, ue.value = !0;
|
|
1413
1416
|
})
|
|
1414
1417
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
1415
|
-
i(
|
|
1418
|
+
i(Ft, null, {
|
|
1416
1419
|
default: _(() => [
|
|
1417
1420
|
i(o(ft), {
|
|
1418
1421
|
list: a.value.globalFilters,
|
|
@@ -1420,7 +1423,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1420
1423
|
class: "flex flex-col gap-2 cursor-grab",
|
|
1421
1424
|
handle: ".handle"
|
|
1422
1425
|
}, {
|
|
1423
|
-
item: _(({ element: N, index:
|
|
1426
|
+
item: _(({ element: N, index: Ct }) => [
|
|
1424
1427
|
i(wt, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
1425
1428
|
default: _(() => [
|
|
1426
1429
|
i(je, {
|
|
@@ -1438,7 +1441,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1438
1441
|
]),
|
|
1439
1442
|
_: 2
|
|
1440
1443
|
}, 1032, ["content"]),
|
|
1441
|
-
Pe(N) ? (
|
|
1444
|
+
Pe(N) ? (d(), S(Je, {
|
|
1442
1445
|
key: 0,
|
|
1443
1446
|
content: o(w)("report.section.filter.missingSchema"),
|
|
1444
1447
|
"z-index": 99
|
|
@@ -1450,7 +1453,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1450
1453
|
})
|
|
1451
1454
|
]),
|
|
1452
1455
|
_: 1
|
|
1453
|
-
}, 8, ["content"])) : Ne(N) ? (
|
|
1456
|
+
}, 8, ["content"])) : Ne(N) ? (d(), S(Je, {
|
|
1454
1457
|
key: 1,
|
|
1455
1458
|
content: o(w)("report.section.filter.missingTileIds"),
|
|
1456
1459
|
"z-index": 99
|
|
@@ -1477,9 +1480,9 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1477
1480
|
})
|
|
1478
1481
|
]),
|
|
1479
1482
|
default: _(() => [
|
|
1480
|
-
(
|
|
1483
|
+
(d(), R(Fe, null, Be(q, (Ke, kt) => i(ht, {
|
|
1481
1484
|
key: kt,
|
|
1482
|
-
onClick: (Ql) => Ke.onClick(
|
|
1485
|
+
onClick: (Ql) => Ke.onClick(Ct)
|
|
1483
1486
|
}, {
|
|
1484
1487
|
label: _(() => [
|
|
1485
1488
|
h("p", {
|
|
@@ -1512,9 +1515,9 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1512
1515
|
t[18] || (t[18] = h("div", { class: "grow" }, null, -1))
|
|
1513
1516
|
]),
|
|
1514
1517
|
content: _(() => [
|
|
1515
|
-
i(
|
|
1518
|
+
i(Cl, {
|
|
1516
1519
|
report: a.value,
|
|
1517
|
-
onAddWidget:
|
|
1520
|
+
onAddWidget: ve
|
|
1518
1521
|
}, null, 8, ["report"])
|
|
1519
1522
|
]),
|
|
1520
1523
|
_: 1
|
|
@@ -1543,7 +1546,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1543
1546
|
}, Wl = {
|
|
1544
1547
|
key: 0,
|
|
1545
1548
|
class: "w-full grid grid-cols-12 gap-[24px] p-24"
|
|
1546
|
-
}, Hl = /* @__PURE__ */
|
|
1549
|
+
}, Hl = /* @__PURE__ */ xe({
|
|
1547
1550
|
__name: "ReportEditorViewport",
|
|
1548
1551
|
props: /* @__PURE__ */ Se({
|
|
1549
1552
|
hideConfiguration: { type: Boolean, required: !1, default: !1 },
|
|
@@ -1556,27 +1559,27 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1556
1559
|
modelModifiers: {}
|
|
1557
1560
|
}),
|
|
1558
1561
|
emits: /* @__PURE__ */ Se(["hideConfiguration"], ["update:modelValue"]),
|
|
1559
|
-
setup(M, { emit:
|
|
1560
|
-
const { breakpoints: a } = He(), c = De(M, "modelValue"), v =
|
|
1562
|
+
setup(M, { emit: u }) {
|
|
1563
|
+
const { breakpoints: a } = He(), c = De(M, "modelValue"), v = f(() => {
|
|
1561
1564
|
var y;
|
|
1562
1565
|
return At((y = c.value) == null ? void 0 : y.tiles);
|
|
1563
|
-
}),
|
|
1564
|
-
return (y,
|
|
1565
|
-
const O =
|
|
1566
|
-
return
|
|
1567
|
-
c.value ? (
|
|
1568
|
-
B.value ? U("", !0) : (
|
|
1566
|
+
}), g = M, B = f(() => g.previewWidth > 0 && g.previewHeight > 0), Y = f(() => a.value.sm || a.value.xs), k = u;
|
|
1567
|
+
return (y, x) => {
|
|
1568
|
+
const O = F("FmCircularProgress"), G = F("FmButton"), D = F("FmMenuDivider"), T = F("FmCard");
|
|
1569
|
+
return d(), R("div", Ml, [
|
|
1570
|
+
c.value ? (d(), R(Fe, { key: 1 }, [
|
|
1571
|
+
B.value ? U("", !0) : (d(), S(Nt, {
|
|
1569
1572
|
key: 0,
|
|
1570
|
-
"model-value": !
|
|
1573
|
+
"model-value": !g.hideConfiguration
|
|
1571
1574
|
}, {
|
|
1572
1575
|
right: _(() => [
|
|
1573
1576
|
h("div", Bl, [
|
|
1574
|
-
c.value ? (
|
|
1577
|
+
c.value ? (d(), S(mt, {
|
|
1575
1578
|
key: 0,
|
|
1576
1579
|
modelValue: c.value,
|
|
1577
|
-
"onUpdate:modelValue":
|
|
1578
|
-
"hide-configuration":
|
|
1579
|
-
onHideConfiguration:
|
|
1580
|
+
"onUpdate:modelValue": x[0] || (x[0] = ($) => c.value = $),
|
|
1581
|
+
"hide-configuration": g.hideConfiguration,
|
|
1582
|
+
onHideConfiguration: x[1] || (x[1] = ($) => k("hideConfiguration", $))
|
|
1580
1583
|
}, null, 8, ["modelValue", "hide-configuration"])) : U("", !0)
|
|
1581
1584
|
])
|
|
1582
1585
|
]),
|
|
@@ -1589,7 +1592,7 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1589
1592
|
"text-color": o($e).ColorPrimary,
|
|
1590
1593
|
class: "m-24 my-16",
|
|
1591
1594
|
size: "md",
|
|
1592
|
-
onClick:
|
|
1595
|
+
onClick: x[2] || (x[2] = ($) => k("hideConfiguration", !g.hideConfiguration))
|
|
1593
1596
|
}, null, 8, ["border-color", "text-color"])
|
|
1594
1597
|
])
|
|
1595
1598
|
]),
|
|
@@ -1599,8 +1602,8 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1599
1602
|
vertical: "",
|
|
1600
1603
|
style: { margin: "0px" }
|
|
1601
1604
|
}),
|
|
1602
|
-
!Y.value && !B.value ? (
|
|
1603
|
-
c.value.tiles.length > 0 ? (
|
|
1605
|
+
!Y.value && !B.value ? (d(), R("div", ql, [
|
|
1606
|
+
c.value.tiles.length > 0 ? (d(), R("div", El, [
|
|
1604
1607
|
h("div", Pl, [
|
|
1605
1608
|
i(st)
|
|
1606
1609
|
]),
|
|
@@ -1610,11 +1613,11 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1610
1613
|
"leaf-index-by-id": v.value,
|
|
1611
1614
|
"hide-export": !0
|
|
1612
1615
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
|
|
1613
|
-
])) : (
|
|
1614
|
-
])) : Y.value && !B.value ? (
|
|
1615
|
-
i(
|
|
1616
|
+
])) : (d(), S(Ze, { key: 1 }))
|
|
1617
|
+
])) : Y.value && !B.value ? (d(), R("div", zl, [
|
|
1618
|
+
i(T, { class: "px-5 pb-28" }, {
|
|
1616
1619
|
default: _(() => [
|
|
1617
|
-
c.value.tiles.length > 0 ? (
|
|
1620
|
+
c.value.tiles.length > 0 ? (d(), R("div", Ll, [
|
|
1618
1621
|
h("div", Gl, [
|
|
1619
1622
|
i(st)
|
|
1620
1623
|
]),
|
|
@@ -1624,105 +1627,105 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1624
1627
|
"leaf-index-by-id": v.value,
|
|
1625
1628
|
"hide-export": !0
|
|
1626
1629
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
|
|
1627
|
-
])) : (
|
|
1630
|
+
])) : (d(), S(Ze, { key: 1 }))
|
|
1628
1631
|
]),
|
|
1629
1632
|
_: 1
|
|
1630
1633
|
}),
|
|
1631
|
-
c.value ? (
|
|
1634
|
+
c.value ? (d(), S(mt, {
|
|
1632
1635
|
key: 0,
|
|
1633
1636
|
modelValue: c.value,
|
|
1634
|
-
"onUpdate:modelValue":
|
|
1635
|
-
"hide-configuration":
|
|
1636
|
-
onHideConfiguration:
|
|
1637
|
-
k("hideConfiguration",
|
|
1637
|
+
"onUpdate:modelValue": x[3] || (x[3] = ($) => c.value = $),
|
|
1638
|
+
"hide-configuration": g.hideConfiguration,
|
|
1639
|
+
onHideConfiguration: x[4] || (x[4] = ($) => {
|
|
1640
|
+
k("hideConfiguration", $);
|
|
1638
1641
|
})
|
|
1639
1642
|
}, null, 8, ["modelValue", "hide-configuration"])) : U("", !0)
|
|
1640
|
-
])) : (
|
|
1643
|
+
])) : (d(), R("div", Al, [
|
|
1641
1644
|
h("div", {
|
|
1642
1645
|
style: et({
|
|
1643
1646
|
transformOrigin: "top center",
|
|
1644
|
-
transform: `scale(${
|
|
1647
|
+
transform: `scale(${g.previewScale})`
|
|
1645
1648
|
})
|
|
1646
1649
|
}, [
|
|
1647
1650
|
h("div", {
|
|
1648
1651
|
class: "overflow-y-auto bg-white rounded-lg",
|
|
1649
1652
|
style: et({
|
|
1650
|
-
width:
|
|
1651
|
-
height:
|
|
1653
|
+
width: g.previewWidth + "px",
|
|
1654
|
+
height: g.previewHeight + "px"
|
|
1652
1655
|
})
|
|
1653
1656
|
}, [
|
|
1654
|
-
c.value.tiles.length > 0 ? (
|
|
1657
|
+
c.value.tiles.length > 0 ? (d(), R("div", Wl, [
|
|
1655
1658
|
i(Ye, {
|
|
1656
1659
|
tiles: c.value.tiles,
|
|
1657
1660
|
"report-id": c.value.id || "editing",
|
|
1658
1661
|
"leaf-index-by-id": v.value,
|
|
1659
1662
|
"hide-export": !0,
|
|
1660
|
-
"custom-screen-width":
|
|
1663
|
+
"custom-screen-width": g.previewWidth
|
|
1661
1664
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id", "custom-screen-width"])
|
|
1662
|
-
])) : (
|
|
1665
|
+
])) : (d(), S(Ze, { key: 1 }))
|
|
1663
1666
|
], 4)
|
|
1664
1667
|
], 4)
|
|
1665
1668
|
]))
|
|
1666
|
-
], 64)) : (
|
|
1669
|
+
], 64)) : (d(), S(O, { key: 0 }))
|
|
1667
1670
|
]);
|
|
1668
1671
|
};
|
|
1669
1672
|
}
|
|
1670
|
-
}), jl = { class: "flex items-center gap-4" }, Jl = { class: "flex justify-center items-center gap-2 w-full" }, Kl = { class: "flex gap-4" }, po = /* @__PURE__ */
|
|
1673
|
+
}), jl = { class: "flex items-center gap-4" }, Jl = { class: "flex justify-center items-center gap-2 w-full" }, Kl = { class: "flex gap-4" }, po = /* @__PURE__ */ xe({
|
|
1671
1674
|
__name: "ReportEditor",
|
|
1672
1675
|
setup(M) {
|
|
1673
|
-
const
|
|
1676
|
+
const u = ot(), a = at(), c = lt(), { promptLoader: v } = Ht(), { t: g, te: B } = qe(), { currentReport: Y, editingReport: k } = Me(c), { breakpoints: y } = He(), x = f(() => {
|
|
1674
1677
|
var q;
|
|
1675
1678
|
return !((q = k.value) != null && q.editable);
|
|
1676
|
-
}), O =
|
|
1679
|
+
}), O = f(() => {
|
|
1677
1680
|
var q;
|
|
1678
|
-
return ((q = k.value) == null ? void 0 : q.name) ??
|
|
1679
|
-
}), G =
|
|
1680
|
-
{ label:
|
|
1681
|
-
{ label:
|
|
1681
|
+
return ((q = k.value) == null ? void 0 : q.name) ?? g("report.editor.newReport");
|
|
1682
|
+
}), G = f(() => Le(g, B, O.value, "other")), D = yt(), { promptMessage: T } = nt(), $ = z(!1), X = f(() => [
|
|
1683
|
+
{ label: g("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
1684
|
+
{ label: g("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
|
|
1682
1685
|
]);
|
|
1683
1686
|
async function ae() {
|
|
1684
1687
|
if (!k.value || k.value.tiles.length === 0) {
|
|
1685
|
-
D.open({ message:
|
|
1688
|
+
D.open({ message: g("report.messages.noWidget"), type: "error" });
|
|
1686
1689
|
return;
|
|
1687
1690
|
}
|
|
1688
1691
|
if (Wt(k.value.tiles) > bt) {
|
|
1689
|
-
D.open({ message:
|
|
1692
|
+
D.open({ message: g("report.messages.tooDeepNesting"), type: "error" });
|
|
1690
1693
|
return;
|
|
1691
1694
|
}
|
|
1692
|
-
const q =
|
|
1693
|
-
if (await
|
|
1694
|
-
title: `${
|
|
1695
|
-
message:
|
|
1695
|
+
const q = x.value ? g("report.common.clone") : g("report.common.save");
|
|
1696
|
+
if (await T({
|
|
1697
|
+
title: `${g("report.messages.saveReport")}`,
|
|
1698
|
+
message: g("report.messages.confirmAction", { action: q, name: G.value })
|
|
1696
1699
|
}))
|
|
1697
1700
|
try {
|
|
1698
1701
|
await v(async () => {
|
|
1699
|
-
if (
|
|
1702
|
+
if (x.value) {
|
|
1700
1703
|
const K = JSON.parse(JSON.stringify(k.value));
|
|
1701
|
-
K.editable = !0, K.id = "", K.name = `${K.name} ${
|
|
1704
|
+
K.editable = !0, K.id = "", K.name = `${K.name} ${g("report.common.duplicate")}`, K.isDefault = !1, await c.createOrUpdateReport(K);
|
|
1702
1705
|
} else
|
|
1703
1706
|
k.value && await c.createOrUpdateReport(k.value);
|
|
1704
|
-
|
|
1707
|
+
u.push({
|
|
1705
1708
|
name: "reportView",
|
|
1706
1709
|
query: a.query
|
|
1707
1710
|
});
|
|
1708
1711
|
});
|
|
1709
1712
|
} catch (K) {
|
|
1710
1713
|
console.log(K), D.open({
|
|
1711
|
-
message:
|
|
1714
|
+
message: g("report.messages.failedToAction", { action: q }),
|
|
1712
1715
|
type: "error"
|
|
1713
1716
|
});
|
|
1714
1717
|
}
|
|
1715
1718
|
}
|
|
1716
|
-
async function
|
|
1719
|
+
async function Ce() {
|
|
1717
1720
|
var L;
|
|
1718
1721
|
if (!k.value) return;
|
|
1719
|
-
await
|
|
1720
|
-
title:
|
|
1721
|
-
message:
|
|
1722
|
-
}) && (k.value = JSON.parse(JSON.stringify(Y.value)),
|
|
1722
|
+
await T({
|
|
1723
|
+
title: g("report.common.report", 1),
|
|
1724
|
+
message: g("report.editor.notSaved", { name: (L = k.value) == null ? void 0 : L.name })
|
|
1725
|
+
}) && (k.value = JSON.parse(JSON.stringify(Y.value)), u.back());
|
|
1723
1726
|
}
|
|
1724
1727
|
pt(() => {
|
|
1725
|
-
k.value ||
|
|
1728
|
+
k.value || u.push({ name: "reports" });
|
|
1726
1729
|
});
|
|
1727
1730
|
const ue = [
|
|
1728
1731
|
{
|
|
@@ -1745,26 +1748,26 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1745
1748
|
width: 390,
|
|
1746
1749
|
height: 859
|
|
1747
1750
|
}
|
|
1748
|
-
],
|
|
1749
|
-
if (!
|
|
1750
|
-
let q = (
|
|
1751
|
+
], J = z(ue[0]), w = z(!1), ee = f(() => w.value ? Math.max(J.value.width || 0, J.value.height || 0) : Math.min(J.value.width || 0, J.value.height || 0)), ne = f(() => w.value ? Math.min(J.value.width || 0, J.value.height || 0) : Math.max(J.value.width || 0, J.value.height || 0)), le = f(() => window.innerHeight - 72 - 56), re = f(() => {
|
|
1752
|
+
if (!ee.value) return 1;
|
|
1753
|
+
let q = (le.value - 48) / ee.value, L = ne.value * q;
|
|
1751
1754
|
return L > window.innerWidth && (q = window.innerWidth / ne.value, L = ne.value * q), q > 1 ? 1 : q;
|
|
1752
1755
|
});
|
|
1753
|
-
function
|
|
1754
|
-
|
|
1756
|
+
function pe(q) {
|
|
1757
|
+
J.value = q;
|
|
1755
1758
|
}
|
|
1756
|
-
function
|
|
1759
|
+
function ve() {
|
|
1757
1760
|
w.value = !w.value;
|
|
1758
1761
|
}
|
|
1759
1762
|
return (q, L) => {
|
|
1760
|
-
const K =
|
|
1761
|
-
return
|
|
1763
|
+
const K = F("FmTooltip"), fe = F("FmButton"), ye = F("FmPageHead");
|
|
1764
|
+
return d(), S(It, null, {
|
|
1762
1765
|
default: _(() => [
|
|
1763
|
-
i(
|
|
1766
|
+
i(ye, {
|
|
1764
1767
|
"data-editor-header": "true",
|
|
1765
1768
|
actions: X.value,
|
|
1766
1769
|
"onClick:action": L[0] || (L[0] = (Q) => {
|
|
1767
|
-
Q === "cancel" &&
|
|
1770
|
+
Q === "cancel" && Ce(), Q === "save" && ae();
|
|
1768
1771
|
})
|
|
1769
1772
|
}, {
|
|
1770
1773
|
title: _(() => [
|
|
@@ -1782,40 +1785,40 @@ const vl = { class: "flex flex-col gap-16" }, fl = {
|
|
|
1782
1785
|
}, 8, ["content"]),
|
|
1783
1786
|
h("div", Jl, [
|
|
1784
1787
|
h("div", Kl, [
|
|
1785
|
-
(
|
|
1788
|
+
(d(), R(Fe, null, Be(ue, (Q) => {
|
|
1786
1789
|
var ke;
|
|
1787
|
-
return i(
|
|
1790
|
+
return i(fe, {
|
|
1788
1791
|
key: Q.labelKey,
|
|
1789
|
-
label: o(
|
|
1790
|
-
variant: ((ke =
|
|
1792
|
+
label: o(g)(Q.labelKey),
|
|
1793
|
+
variant: ((ke = J.value) == null ? void 0 : ke.labelKey) === Q.labelKey ? "primary" : "secondary",
|
|
1791
1794
|
size: "md",
|
|
1792
|
-
onClick: (ie) =>
|
|
1795
|
+
onClick: (ie) => pe(Q)
|
|
1793
1796
|
}, null, 8, ["label", "variant", "onClick"]);
|
|
1794
1797
|
}), 64))
|
|
1795
1798
|
]),
|
|
1796
|
-
i(
|
|
1799
|
+
i(fe, {
|
|
1797
1800
|
icon: "screen_rotation",
|
|
1798
1801
|
variant: "tertiary",
|
|
1799
1802
|
size: "md",
|
|
1800
1803
|
class: "text-fm-color-typo-primary",
|
|
1801
|
-
onClick:
|
|
1804
|
+
onClick: ve
|
|
1802
1805
|
})
|
|
1803
1806
|
])
|
|
1804
1807
|
])
|
|
1805
1808
|
]),
|
|
1806
1809
|
_: 1
|
|
1807
1810
|
}, 8, ["actions"]),
|
|
1808
|
-
o(k) ? (
|
|
1811
|
+
o(k) ? (d(), S(Hl, {
|
|
1809
1812
|
key: 0,
|
|
1810
1813
|
modelValue: o(k),
|
|
1811
1814
|
"onUpdate:modelValue": L[1] || (L[1] = (Q) => vt(k) ? k.value = Q : null),
|
|
1812
|
-
style: et({ height:
|
|
1815
|
+
style: et({ height: le.value + "px" }),
|
|
1813
1816
|
class: Ue(o(y).lg || o(y).md ? "flex" : ""),
|
|
1814
|
-
"hide-configuration":
|
|
1817
|
+
"hide-configuration": $.value,
|
|
1815
1818
|
"preview-width": ne.value,
|
|
1816
|
-
"preview-height":
|
|
1819
|
+
"preview-height": ee.value,
|
|
1817
1820
|
"preview-scale": re.value,
|
|
1818
|
-
onHideConfiguration: L[2] || (L[2] = (Q) =>
|
|
1821
|
+
onHideConfiguration: L[2] || (L[2] = (Q) => $.value = Q)
|
|
1819
1822
|
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : U("", !0)
|
|
1820
1823
|
]),
|
|
1821
1824
|
_: 1
|