@feedmepos/mf-report 5.26.4 → 5.26.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-swq2ECTF.js → App-QcOCU8rc.js} +60 -60
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-D2CpsvxS.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-De-0BpSa.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-_zBaKDEK.js → Default.vue_vue_type_script_setup_true_lang-3blnkA-n.js} +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-hP3sZIfZ.js +4777 -0
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Dun5PD4W.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DHPUtfOs.js} +2521 -2562
- package/dist/{InsightView-zWCeytWt.js → InsightView-_wb0GqpG.js} +4 -4
- package/dist/{Integration-DYCTpXlU.js → Integration-DyGkKMsa.js} +3 -3
- package/dist/{Integrations-ClLIVRa8.js → Integrations-C5ZsHxmd.js} +2 -2
- package/dist/{Layout-B4fXLMaj.js → Layout-CmMa2qs4.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-KKttveoS.js → MenuTab.vue_vue_type_script_setup_true_lang-BsE2UhQ5.js} +4 -4
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CH7w1ORf.js → NavigationTab.vue_vue_type_script_setup_true_lang-ewnLHyBz.js} +3 -3
- package/dist/{OverviewView-BhXfogDe.js → OverviewView-DCz3S4k6.js} +4 -4
- package/dist/{Report-BwmFIgo-.js → Report-Bksdpnal.js} +3 -3
- package/dist/{ReportEditor-CTQ8vCNs.js → ReportEditor-BHONojQQ.js} +228 -228
- package/dist/{ReportView-ZCaT-MkZ.js → ReportView-vhrQCIHU.js} +6 -6
- package/dist/{Setting-Co8VUFhL.js → Setting-CwwCAzJH.js} +3 -3
- package/dist/{Template-22RXwi-V.js → Template-DVYVtNYg.js} +3 -3
- package/dist/TileEditor-BXCFEix_.js +4027 -0
- package/dist/TransitionFade-B2T5r_vC.js +3360 -0
- package/dist/{app-B8enBaoM.js → app-DnkOgWGu.js} +1470 -993
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-CM3TtVoi.js → formatChartData.worker-BwOf9WPp.js} +5 -5
- package/dist/assets/{processTableData.worker-BTFUd91t.js → processTableData.worker-BlwP8Wjn.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-Bc9WzEui.js → useRestaurantPermission-CQKnU3lQ.js} +1 -1
- package/package.json +1 -1
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-BoRLpJ9M.js +0 -4924
- package/dist/TileEditor-Bs4LL9Bo.js +0 -3863
- package/dist/TransitionFade-BYmuDYSd.js +0 -2379
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as ye, mergeModels as fe, useModel as ge, ref as
|
|
2
|
-
import { W as
|
|
3
|
-
import { C as ve, D as Z, c as Ce, g as
|
|
1
|
+
import { defineComponent as ye, mergeModels as fe, useModel as ge, ref as M, computed as b, resolveComponent as w, createBlock as O, openBlock as u, withCtx as g, createElementVNode as f, createVNode as r, unref as o, normalizeClass as ke, createTextVNode as lt, toDisplayString as L, createElementBlock as S, Fragment as le, renderSlot as vt, createCommentVNode as G, watch as me, renderList as ce, onMounted as ft, onUnmounted as Ct, resolveDynamicComponent as xt, isRef as gt, normalizeStyle as ot } from "vue";
|
|
2
|
+
import { W as kt, g as Tt, _ as St, a as Ot, i as $t, S as Ye, d as ut, T as Dt, b as Rt } from "./TransitionFade-B2T5r_vC.js";
|
|
3
|
+
import { C as ve, D as Z, c as Ce, g as Nt, u as yt, a as Ut, d as Xe, v as De, Q as Pe, e as Bt, b as dt } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DHPUtfOs.js";
|
|
4
4
|
import { storeToRefs as _e } from "pinia";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
import { useBreakpoints as We, useSnackbar as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as Ne, a as
|
|
5
|
+
import { useRouter as bt, useRoute as ht } from "vue-router";
|
|
6
|
+
import { useBreakpoints as We, useSnackbar as _t, FmButtonColorThemeVariant as xe } from "@feedmepos/ui-library";
|
|
7
|
+
import { u as wt } from "./message-dialog-UoMWOnil.js";
|
|
8
|
+
import { u as Ne, a as Mt } from "./vue-i18n-DVWuTfed.js";
|
|
9
9
|
import { r as Re } from "./i18n-CI_sQ5d_.js";
|
|
10
|
-
import { _ as
|
|
11
|
-
import { a as
|
|
10
|
+
import { _ as Ze } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-hP3sZIfZ.js";
|
|
11
|
+
import { a as et, _ as tt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BL1jpiXN.js";
|
|
12
12
|
import { useCoreStore as qt } from "@feedmepos/mf-common";
|
|
13
|
-
import { u as
|
|
14
|
-
import { d as
|
|
13
|
+
import { u as Et, a as It } from "./app-DnkOgWGu.js";
|
|
14
|
+
import { d as Pt } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-De-0BpSa.js";
|
|
15
15
|
const Wt = /* @__PURE__ */ ye({
|
|
16
16
|
__name: "WidgetDialog",
|
|
17
17
|
props: /* @__PURE__ */ fe({
|
|
@@ -29,17 +29,17 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
29
29
|
function C() {
|
|
30
30
|
d.value && (x.value = d.value, d.value = void 0, D("update:isOpen", !1));
|
|
31
31
|
}
|
|
32
|
-
const d =
|
|
32
|
+
const d = M(), q = b(() => !d.value);
|
|
33
33
|
return (ee, E) => {
|
|
34
34
|
const J = w("FmButton"), F = w("FmDialog");
|
|
35
35
|
return u(), O(F, {
|
|
36
36
|
"model-value": y.isOpen
|
|
37
37
|
}, {
|
|
38
38
|
"dialog-header": g(() => [
|
|
39
|
-
|
|
39
|
+
lt(L(o(a)("report.widget.type")), 1)
|
|
40
40
|
]),
|
|
41
41
|
default: g(() => [
|
|
42
|
-
r(
|
|
42
|
+
r(kt, {
|
|
43
43
|
modelValue: d.value,
|
|
44
44
|
"onUpdate:modelValue": E[0] || (E[0] = (T) => d.value = T),
|
|
45
45
|
class: ke(`grid ${o(m).lg || o(m).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
|
|
@@ -55,7 +55,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
55
55
|
}, null, 8, ["label"]),
|
|
56
56
|
r(J, {
|
|
57
57
|
label: o(a)("report.common.confirm"),
|
|
58
|
-
disabled:
|
|
58
|
+
disabled: q.value,
|
|
59
59
|
onClick: C
|
|
60
60
|
}, null, 8, ["label", "disabled"])
|
|
61
61
|
]),
|
|
@@ -63,7 +63,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
63
63
|
}, 8, ["model-value"]);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
}), Lt = { class: "fm-typo-en-body-lg-600" },
|
|
66
|
+
}), Lt = { class: "fm-typo-en-body-lg-600" }, at = /* @__PURE__ */ ye({
|
|
67
67
|
__name: "ReportEditorTabHeader",
|
|
68
68
|
props: /* @__PURE__ */ fe({
|
|
69
69
|
icon: {
|
|
@@ -83,7 +83,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
83
83
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
84
84
|
onClick: y[0] || (y[0] = (H) => a.value = !a.value)
|
|
85
85
|
}, [
|
|
86
|
-
f("p", Lt,
|
|
86
|
+
f("p", Lt, L(o(s)("report.editor.customizeReport")), 1),
|
|
87
87
|
y[1] || (y[1] = f("div", { class: "grow" }, null, -1)),
|
|
88
88
|
r(D, {
|
|
89
89
|
name: m.icon
|
|
@@ -91,7 +91,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
91
91
|
]);
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
|
-
}),
|
|
94
|
+
}), zt = /* @__PURE__ */ ye({
|
|
95
95
|
__name: "ReportEditorTabDesktop",
|
|
96
96
|
props: {
|
|
97
97
|
modelValue: { required: !0, default: !1 },
|
|
@@ -101,15 +101,15 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
101
101
|
setup($) {
|
|
102
102
|
const s = ge($, "modelValue");
|
|
103
103
|
return (a, m) => (u(), S(le, null, [
|
|
104
|
-
r(
|
|
104
|
+
r(at, {
|
|
105
105
|
modelValue: s.value,
|
|
106
106
|
"onUpdate:modelValue": m[0] || (m[0] = (x) => s.value = x),
|
|
107
107
|
icon: "keyboard_double_arrow_left"
|
|
108
108
|
}, null, 8, ["modelValue"]),
|
|
109
|
-
|
|
109
|
+
vt(a.$slots, "default")
|
|
110
110
|
], 64));
|
|
111
111
|
}
|
|
112
|
-
}),
|
|
112
|
+
}), At = /* @__PURE__ */ ye({
|
|
113
113
|
__name: "ReportEditorTabMobile",
|
|
114
114
|
props: {
|
|
115
115
|
modelValue: { required: !0, default: !1 },
|
|
@@ -122,7 +122,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
122
122
|
const x = w("FmTopSheet"), y = w("FmCard");
|
|
123
123
|
return u(), O(y, { class: "fixed bottom-0 w-full" }, {
|
|
124
124
|
default: g(() => [
|
|
125
|
-
r(
|
|
125
|
+
r(at, {
|
|
126
126
|
modelValue: s.value,
|
|
127
127
|
"onUpdate:modelValue": m[0] || (m[0] = (D) => s.value = D),
|
|
128
128
|
icon: "keyboard_double_arrow_up"
|
|
@@ -133,12 +133,12 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
133
133
|
"fullscreen-size": "sm"
|
|
134
134
|
}, {
|
|
135
135
|
default: g(() => [
|
|
136
|
-
r(
|
|
136
|
+
r(at, {
|
|
137
137
|
modelValue: s.value,
|
|
138
138
|
"onUpdate:modelValue": m[1] || (m[1] = (D) => s.value = D),
|
|
139
139
|
icon: "keyboard_double_arrow_down"
|
|
140
140
|
}, null, 8, ["modelValue"]),
|
|
141
|
-
s.value ?
|
|
141
|
+
s.value ? vt(a.$slots, "default", { key: 0 }) : G("", !0)
|
|
142
142
|
]),
|
|
143
143
|
_: 3
|
|
144
144
|
}, 8, ["modelValue"])
|
|
@@ -147,19 +147,19 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
}),
|
|
150
|
+
}), Gt = {
|
|
151
151
|
key: 2,
|
|
152
152
|
class: "flex flex-col gap-3 mt-2 border border-neutral-300 p-3"
|
|
153
|
-
},
|
|
153
|
+
}, Ht = { 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" }, Jt = {
|
|
154
154
|
key: 0,
|
|
155
155
|
class: "flex justify-end sm:pb-[2px]"
|
|
156
|
-
},
|
|
156
|
+
}, jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Kt = { class: "pl-1" }, Qt = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "flex justify-end sm:pb-[2px]"
|
|
159
|
-
},
|
|
159
|
+
}, Yt = {
|
|
160
160
|
key: 4,
|
|
161
161
|
class: "flex flex-col gap-2"
|
|
162
|
-
},
|
|
162
|
+
}, Xt = /* @__PURE__ */ ye({
|
|
163
163
|
__name: "GlobalFilterDialog",
|
|
164
164
|
props: /* @__PURE__ */ fe({
|
|
165
165
|
schemas: {
|
|
@@ -180,7 +180,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
180
180
|
}),
|
|
181
181
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
182
182
|
setup($) {
|
|
183
|
-
const { t: s, te: a } = Ne(), m = ge($, "globalFilter"), x = ge($, "isOpen"), y =
|
|
183
|
+
const { t: s, te: a } = Ne(), m = ge($, "globalFilter"), x = ge($, "isOpen"), y = _t(), D = $, H = M(""), C = M(), d = M(), q = M(), ee = M([]), E = M([]), J = M(""), F = M(!1), T = M(!1), R = M([]), N = M([]), Y = M(ve.Equal);
|
|
184
184
|
function oe(t) {
|
|
185
185
|
return JSON.parse(JSON.stringify(t));
|
|
186
186
|
}
|
|
@@ -195,10 +195,10 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
195
195
|
const [e, p] = t.split(":").map(Number);
|
|
196
196
|
return Number.isNaN(e) || Number.isNaN(p) ? null : { hour: e, minute: p };
|
|
197
197
|
}
|
|
198
|
-
const ae = b(() => d.value ? !(d.value.type === Z.Timestamp &&
|
|
198
|
+
const ae = b(() => d.value ? !(d.value.type === Z.Timestamp && q.value === Ce.DateTime) : !1), X = b(
|
|
199
199
|
() => {
|
|
200
200
|
var t;
|
|
201
|
-
return ((t = d.value) == null ? void 0 : t.type) === Z.Timestamp &&
|
|
201
|
+
return ((t = d.value) == null ? void 0 : t.type) === Z.Timestamp && q.value === Ce.TimeOfDay;
|
|
202
202
|
}
|
|
203
203
|
), de = b(() => {
|
|
204
204
|
var t;
|
|
@@ -210,20 +210,20 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
210
210
|
function se() {
|
|
211
211
|
var e;
|
|
212
212
|
const t = (e = de.value[0]) == null ? void 0 : e.value;
|
|
213
|
-
return t || (d.value ? Se(d.value.type,
|
|
213
|
+
return t || (d.value ? Se(d.value.type, q.value ?? null) : ve.Equal);
|
|
214
214
|
}
|
|
215
215
|
function pe(t) {
|
|
216
216
|
if (d.value)
|
|
217
|
-
return
|
|
217
|
+
return Nt({
|
|
218
218
|
operator: t ?? se(),
|
|
219
219
|
dataType: d.value.type,
|
|
220
|
-
dimensionOption: d.value.type === Z.Timestamp ?
|
|
220
|
+
dimensionOption: d.value.type === Z.Timestamp ? q.value ?? null : null,
|
|
221
221
|
t: s
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
224
|
function U(t, e) {
|
|
225
225
|
if (typeof (e == null ? void 0 : e.default) == "boolean" || t.length > 0 && t.every((h) => typeof h == "boolean")) {
|
|
226
|
-
const h = t.reduce((k,
|
|
226
|
+
const h = t.reduce((k, W) => (typeof W == "boolean" && k.push(W), k), []);
|
|
227
227
|
if (e)
|
|
228
228
|
for (e.fixed && h.splice(e.count); h.length < e.count; )
|
|
229
229
|
h.push(typeof e.default == "boolean" ? e.default : !1);
|
|
@@ -235,7 +235,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
235
235
|
v.push(typeof e.default == "string" ? e.default : "");
|
|
236
236
|
return v;
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function P(t = Y.value) {
|
|
239
239
|
const e = pe(t), p = U(
|
|
240
240
|
e ? Array(e.count).fill(e.default) : [],
|
|
241
241
|
e
|
|
@@ -259,7 +259,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
259
259
|
N.value.length === 0 && (N.value = [j()]);
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
|
-
R.value.length === 0 && (R.value = [
|
|
262
|
+
R.value.length === 0 && (R.value = [P()]);
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
function be() {
|
|
@@ -271,7 +271,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
271
271
|
Y.value = t, R.value = R.value.map((e, p) => {
|
|
272
272
|
const v = R.value[p];
|
|
273
273
|
if (!v)
|
|
274
|
-
return
|
|
274
|
+
return P(t);
|
|
275
275
|
const h = pe(t), k = U(
|
|
276
276
|
Array.isArray(v.values) ? [...v.values] : [],
|
|
277
277
|
h
|
|
@@ -284,7 +284,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
286
|
function we() {
|
|
287
|
-
R.value = [...R.value,
|
|
287
|
+
R.value = [...R.value, P()];
|
|
288
288
|
}
|
|
289
289
|
function ne(t) {
|
|
290
290
|
R.value.length <= 1 || (R.value = R.value.filter((e, p) => p !== t));
|
|
@@ -330,18 +330,18 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
330
330
|
}), !1) : !0;
|
|
331
331
|
}
|
|
332
332
|
me(x, (t) => {
|
|
333
|
-
var e, p, v, h, k,
|
|
333
|
+
var e, p, v, h, k, W, Q;
|
|
334
334
|
t && (H.value = ((e = m.value) == null ? void 0 : e.label) || "", C.value = D.schemas.find(
|
|
335
335
|
(te) => {
|
|
336
336
|
var A;
|
|
337
337
|
return te.name === ((A = m.value) == null ? void 0 : A.schemaName);
|
|
338
338
|
}
|
|
339
|
-
), d.value = (p =
|
|
339
|
+
), d.value = (p = qe.value.find(
|
|
340
340
|
(te) => {
|
|
341
341
|
var A;
|
|
342
342
|
return te.value.name === ((A = m.value) == null ? void 0 : A.name);
|
|
343
343
|
}
|
|
344
|
-
)) == null ? void 0 : p.value,
|
|
344
|
+
)) == null ? void 0 : p.value, q.value = (v = m.value) == null ? void 0 : v.option, ee.value = ((h = m.value) == null ? void 0 : h.tileIds) || [], E.value = ((k = m.value) == null ? void 0 : k.filters) || [], F.value = !!((W = m.value) != null && W.dataFormula), J.value = ((Q = m.value) == null ? void 0 : Q.dataFormula) || "", be());
|
|
345
345
|
}), me(T, (t) => {
|
|
346
346
|
var e;
|
|
347
347
|
t && (Y.value = ((e = R.value[0]) == null ? void 0 : e.operator) ?? se(), ie());
|
|
@@ -358,12 +358,12 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
358
358
|
const e = (p = t[0]) == null ? void 0 : p.value;
|
|
359
359
|
e && (t.some((v) => v.value === Y.value) || K(e));
|
|
360
360
|
});
|
|
361
|
-
const
|
|
361
|
+
const Me = b(
|
|
362
362
|
() => D.schemas.map((t) => ({
|
|
363
363
|
label: t.label || t.name,
|
|
364
364
|
value: t
|
|
365
365
|
}))
|
|
366
|
-
),
|
|
366
|
+
), qe = b(() => {
|
|
367
367
|
var t;
|
|
368
368
|
return (((t = C.value) == null ? void 0 : t.fields) || []).filter((e) => e.type !== Z.Numeric).map((e) => ({
|
|
369
369
|
label: e.label || e.name,
|
|
@@ -371,17 +371,17 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
371
371
|
}));
|
|
372
372
|
}), Le = b(() => {
|
|
373
373
|
var t;
|
|
374
|
-
return ((t = d.value) == null ? void 0 : t.type) !== Z.Timestamp ? [] :
|
|
375
|
-
}),
|
|
376
|
-
var k,
|
|
374
|
+
return ((t = d.value) == null ? void 0 : t.type) !== Z.Timestamp ? [] : Tt(s);
|
|
375
|
+
}), ze = b(() => D.tiles.reduce((t, e, p) => {
|
|
376
|
+
var k, W;
|
|
377
377
|
const v = e.widget.config.schemaNames ?? [], h = (e.widget.config.joinDatasources ?? []).flatMap(
|
|
378
378
|
(Q) => Q.schemaNames ?? []
|
|
379
379
|
);
|
|
380
380
|
return [...v, ...h].includes(((k = C.value) == null ? void 0 : k.name) || "") && t.push({
|
|
381
|
-
label: (
|
|
381
|
+
label: (W = e == null ? void 0 : e.widget.title) != null && W.trim() ? e.widget.title : `Widget ${p + 1}`,
|
|
382
382
|
value: e.id
|
|
383
383
|
}), t;
|
|
384
|
-
}, [])),
|
|
384
|
+
}, [])), Ae = b(
|
|
385
385
|
() => D.schemas.flatMap(
|
|
386
386
|
(t) => (t.fields ?? []).map((e) => ({
|
|
387
387
|
...e,
|
|
@@ -392,12 +392,12 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
392
392
|
}))
|
|
393
393
|
)
|
|
394
394
|
);
|
|
395
|
-
function
|
|
395
|
+
function Ge(t) {
|
|
396
396
|
var e;
|
|
397
397
|
t.name !== ((e = C.value) == null ? void 0 : e.name) && (C.value = t, d.value = void 0, Y.value = ve.Equal, T.value = !1, R.value = [], N.value = []);
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
d.value = t,
|
|
399
|
+
function He(t) {
|
|
400
|
+
d.value = t, q.value = t.type === Z.Timestamp ? Ce.DateTime : void 0, Y.value = se(), T.value = !1, R.value = [], N.value = [];
|
|
401
401
|
}
|
|
402
402
|
function Se(t, e) {
|
|
403
403
|
switch (t) {
|
|
@@ -420,7 +420,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
420
420
|
y.open({ message: s("report.section.filter.invalidDimension"), type: "error" });
|
|
421
421
|
return;
|
|
422
422
|
}
|
|
423
|
-
const t = E.value.filter((v) => v ? !
|
|
423
|
+
const t = E.value.filter((v) => v ? !Me.value.some((k) => k.value.name === v.schemaName) : !0);
|
|
424
424
|
if (t.length > 0) {
|
|
425
425
|
const v = t.filter((k) => !!k).map((k) => k.schemaName), h = t.some((k) => !k) ? `, ${s("report.section.filter.unknownFilters")}` : "";
|
|
426
426
|
y.open({
|
|
@@ -452,9 +452,9 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
452
452
|
label: H.value,
|
|
453
453
|
operator: Se(
|
|
454
454
|
d.value.type,
|
|
455
|
-
d.value.type === Z.Timestamp ?
|
|
455
|
+
d.value.type === Z.Timestamp ? q.value ?? Ce.DateTime : null
|
|
456
456
|
),
|
|
457
|
-
option: d.value.type === Z.Timestamp ?
|
|
457
|
+
option: d.value.type === Z.Timestamp ? q.value : null,
|
|
458
458
|
values: [],
|
|
459
459
|
tileIds: [...ee.value],
|
|
460
460
|
filters: oe(E.value),
|
|
@@ -466,22 +466,22 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
466
466
|
function Oe() {
|
|
467
467
|
x.value = !1;
|
|
468
468
|
}
|
|
469
|
-
const
|
|
469
|
+
const Je = b(() => {
|
|
470
470
|
var t;
|
|
471
471
|
return [
|
|
472
472
|
(t = C.value) == null ? void 0 : t.name,
|
|
473
473
|
...E.value.map((e) => e.schemaName)
|
|
474
474
|
];
|
|
475
475
|
});
|
|
476
|
-
function
|
|
477
|
-
var k,
|
|
478
|
-
const e = D.tiles.find((A) => A.id === t.value), p = ((
|
|
476
|
+
function je(t) {
|
|
477
|
+
var k, W, Q, te;
|
|
478
|
+
const e = D.tiles.find((A) => A.id === t.value), p = ((W = (k = e == null ? void 0 : e.widget) == null ? void 0 : k.config) == null ? void 0 : W.schemaNames) ?? [], v = (((te = (Q = e == null ? void 0 : e.widget) == null ? void 0 : Q.config) == null ? void 0 : te.joinDatasources) ?? []).flatMap(
|
|
479
479
|
(A) => A.schemaNames ?? []
|
|
480
480
|
), h = [...p, ...v];
|
|
481
|
-
return
|
|
481
|
+
return Je.value.filter((A) => !!A).some((A) => !h.includes(A));
|
|
482
482
|
}
|
|
483
483
|
return (t, e) => {
|
|
484
|
-
const p = w("FmTextField"), v = w("FmSelect"), h = w("FmCheckbox"), k = w("FmTimePicker"),
|
|
484
|
+
const p = w("FmTextField"), v = w("FmSelect"), h = w("FmCheckbox"), k = w("FmTimePicker"), W = w("FmButton"), Q = w("FmTextarea"), te = w("FmLabel"), A = w("FmIcon"), Ke = w("FmTooltip"), n = w("FmForm"), l = w("FmDialog");
|
|
485
485
|
return u(), O(l, {
|
|
486
486
|
modelValue: x.value,
|
|
487
487
|
"onUpdate:modelValue": e[11] || (e[11] = (V) => x.value = V),
|
|
@@ -489,7 +489,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
489
489
|
"z-index": 10
|
|
490
490
|
}, {
|
|
491
491
|
"dialog-header": g(() => [
|
|
492
|
-
|
|
492
|
+
lt(L(o(s)("report.section.filter.globalFilter")), 1)
|
|
493
493
|
]),
|
|
494
494
|
default: g(() => [
|
|
495
495
|
r(n, {
|
|
@@ -506,24 +506,24 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
506
506
|
label: o(s)("report.section.filter.displayName"),
|
|
507
507
|
class: "mb-2"
|
|
508
508
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
509
|
-
r(
|
|
509
|
+
r(et, {
|
|
510
510
|
"model-value": C.value,
|
|
511
|
-
items:
|
|
511
|
+
items: Me.value,
|
|
512
512
|
placeholder: o(s)("report.section.schema.title"),
|
|
513
513
|
label: o(s)("report.section.schema.title"),
|
|
514
|
-
"onUpdate:modelValue": e[1] || (e[1] = (i) =>
|
|
514
|
+
"onUpdate:modelValue": e[1] || (e[1] = (i) => Ge(i))
|
|
515
515
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
516
|
-
r(
|
|
516
|
+
r(et, {
|
|
517
517
|
"model-value": d.value,
|
|
518
|
-
items:
|
|
518
|
+
items: qe.value,
|
|
519
519
|
placeholder: o(s)("report.section.dimension.title"),
|
|
520
520
|
label: o(s)("report.section.dimension.title"),
|
|
521
|
-
"onUpdate:modelValue": e[2] || (e[2] = (i) =>
|
|
521
|
+
"onUpdate:modelValue": e[2] || (e[2] = (i) => He(i))
|
|
522
522
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
523
523
|
((V = d.value) == null ? void 0 : V.type) === o(Z).Timestamp ? (u(), O(v, {
|
|
524
524
|
key: 0,
|
|
525
|
-
modelValue:
|
|
526
|
-
"onUpdate:modelValue": e[3] || (e[3] = (i) =>
|
|
525
|
+
modelValue: q.value,
|
|
526
|
+
"onUpdate:modelValue": e[3] || (e[3] = (i) => q.value = i),
|
|
527
527
|
items: Le.value,
|
|
528
528
|
placeholder: o(s)("report.section.filter.timeFormatter"),
|
|
529
529
|
label: o(s)("report.section.filter.timeFormatter")
|
|
@@ -535,12 +535,12 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
535
535
|
label: o(s)("report.section.filter.customOptions"),
|
|
536
536
|
value: !0
|
|
537
537
|
}, null, 8, ["modelValue", "label"])) : G("", !0),
|
|
538
|
-
ae.value && T.value ? (u(), S("div",
|
|
538
|
+
ae.value && T.value ? (u(), S("div", Gt, [
|
|
539
539
|
X.value ? (u(!0), S(le, { key: 0 }, ce(N.value, (i, B) => (u(), S("div", {
|
|
540
540
|
key: `custom-time-range-${B}`,
|
|
541
541
|
class: "flex flex-col gap-2"
|
|
542
542
|
}, [
|
|
543
|
-
f("div",
|
|
543
|
+
f("div", Ht, [
|
|
544
544
|
r(p, {
|
|
545
545
|
modelValue: i.name,
|
|
546
546
|
"onUpdate:modelValue": (I) => i.name = I,
|
|
@@ -556,8 +556,8 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
556
556
|
label: o(s)("report.date.endingTime"),
|
|
557
557
|
"onUpdate:modelValue": (I) => Te(B, "endTime", I)
|
|
558
558
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
559
|
-
N.value.length > 1 ? (u(), S("div",
|
|
560
|
-
r(
|
|
559
|
+
N.value.length > 1 ? (u(), S("div", Jt, [
|
|
560
|
+
r(W, {
|
|
561
561
|
icon: "delete",
|
|
562
562
|
variant: "tertiary",
|
|
563
563
|
onClick: (I) => Be(B)
|
|
@@ -565,8 +565,8 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
565
565
|
])) : G("", !0)
|
|
566
566
|
])
|
|
567
567
|
]))), 128)) : (u(), S(le, { key: 1 }, [
|
|
568
|
-
f("p",
|
|
569
|
-
de.value.length > 0 ? (u(), O(
|
|
568
|
+
f("p", jt, L(o(s)("report.section.filter.operator")), 1),
|
|
569
|
+
de.value.length > 0 ? (u(), O(et, {
|
|
570
570
|
key: 0,
|
|
571
571
|
"model-value": Y.value,
|
|
572
572
|
items: de.value,
|
|
@@ -583,20 +583,20 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
583
583
|
"sm:grid-cols-[1fr_1.6fr_auto]"
|
|
584
584
|
])
|
|
585
585
|
}, [
|
|
586
|
-
f("span",
|
|
586
|
+
f("span", Kt, L(o(s)("report.section.filter.label")), 1),
|
|
587
587
|
r(p, {
|
|
588
588
|
modelValue: i.label,
|
|
589
589
|
"onUpdate:modelValue": (I) => i.label = I
|
|
590
590
|
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
591
|
-
(u(), O(
|
|
592
|
-
key: `custom-option-value-${B}-${i.operator ?? ""}-${
|
|
591
|
+
(u(), O(St, {
|
|
592
|
+
key: `custom-option-value-${B}-${i.operator ?? ""}-${q.value ?? ""}`,
|
|
593
593
|
modelValue: i.values,
|
|
594
594
|
"onUpdate:modelValue": (I) => i.values = I,
|
|
595
595
|
config: pe(i.operator),
|
|
596
|
-
option:
|
|
596
|
+
option: q.value
|
|
597
597
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
|
|
598
|
-
R.value.length > 1 ? (u(), S("div",
|
|
599
|
-
r(
|
|
598
|
+
R.value.length > 1 ? (u(), S("div", Qt, [
|
|
599
|
+
r(W, {
|
|
600
600
|
icon: "delete",
|
|
601
601
|
variant: "tertiary",
|
|
602
602
|
onClick: (I) => ne(B)
|
|
@@ -605,7 +605,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
605
605
|
])
|
|
606
606
|
]))), 128))
|
|
607
607
|
], 64)),
|
|
608
|
-
r(
|
|
608
|
+
r(W, {
|
|
609
609
|
class: "w-full",
|
|
610
610
|
variant: "primary",
|
|
611
611
|
icon: "add",
|
|
@@ -625,19 +625,19 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
625
625
|
"onUpdate:modelValue": e[8] || (e[8] = (i) => J.value = i),
|
|
626
626
|
placeholder: o(s)("report.section.filter.dataFormula")
|
|
627
627
|
}, null, 8, ["modelValue", "placeholder"])) : G("", !0),
|
|
628
|
-
r(
|
|
628
|
+
r(Ot, {
|
|
629
629
|
modelValue: E.value,
|
|
630
630
|
"onUpdate:modelValue": e[9] || (e[9] = (i) => E.value = i),
|
|
631
|
-
options:
|
|
631
|
+
options: Ae.value
|
|
632
632
|
}, null, 8, ["modelValue", "options"]),
|
|
633
633
|
r(te, { class: "mt-2 fm-typo-en-body-lg-600" }, {
|
|
634
634
|
default: g(() => [
|
|
635
|
-
|
|
635
|
+
lt(L(o(s)("report.section.filter.applyWidget")), 1)
|
|
636
636
|
]),
|
|
637
637
|
_: 1
|
|
638
638
|
}),
|
|
639
|
-
$.tiles.length > 0 ? (u(), S("div",
|
|
640
|
-
(u(!0), S(le, null, ce(
|
|
639
|
+
$.tiles.length > 0 ? (u(), S("div", Yt, [
|
|
640
|
+
(u(!0), S(le, null, ce(ze.value, (i) => (u(), S("div", {
|
|
641
641
|
key: i.value,
|
|
642
642
|
class: "flex items-center"
|
|
643
643
|
}, [
|
|
@@ -647,7 +647,7 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
647
647
|
label: i.label,
|
|
648
648
|
value: i.value
|
|
649
649
|
}, null, 8, ["modelValue", "label", "value"]),
|
|
650
|
-
|
|
650
|
+
je(i) ? (u(), O(Ke, {
|
|
651
651
|
key: 0,
|
|
652
652
|
content: o(s)("report.section.filter.missingFilterSchema"),
|
|
653
653
|
"z-index": 99,
|
|
@@ -674,12 +674,12 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
674
674
|
]),
|
|
675
675
|
"dialog-footer": g(() => [
|
|
676
676
|
e[12] || (e[12] = f("div", { class: "grow" }, null, -1)),
|
|
677
|
-
r(
|
|
677
|
+
r(W, {
|
|
678
678
|
label: o(s)("report.common.cancel"),
|
|
679
679
|
variant: "tertiary",
|
|
680
680
|
onClick: Oe
|
|
681
681
|
}, null, 8, ["label"]),
|
|
682
|
-
r(
|
|
682
|
+
r(W, {
|
|
683
683
|
label: o(s)("report.common.confirm"),
|
|
684
684
|
onClick: re
|
|
685
685
|
}, null, 8, ["label"])
|
|
@@ -688,14 +688,14 @@ const Wt = /* @__PURE__ */ ye({
|
|
|
688
688
|
}, 8, ["modelValue"]);
|
|
689
689
|
};
|
|
690
690
|
}
|
|
691
|
-
}),
|
|
691
|
+
}), Zt = 8.4375, el = 1024 ** 4, tl = {
|
|
692
692
|
MY: { rate: 4, currency: "MYR", symbol: "RM" },
|
|
693
693
|
TH: { rate: 33, currency: "THB", symbol: "฿" },
|
|
694
694
|
SG: { rate: 1.29, currency: "SGD", symbol: "S$" },
|
|
695
695
|
ID: { rate: 17900, currency: "IDR", symbol: "Rp" }
|
|
696
|
-
},
|
|
697
|
-
function
|
|
698
|
-
const a = $ /
|
|
696
|
+
}, ll = { rate: 1, currency: "USD", symbol: "$" };
|
|
697
|
+
function mt($, s) {
|
|
698
|
+
const a = $ / el * Zt, { rate: m, currency: x, symbol: y } = tl[s] ?? ll;
|
|
699
699
|
return {
|
|
700
700
|
amount: a * m,
|
|
701
701
|
currency: x,
|
|
@@ -703,13 +703,13 @@ function dt($, s) {
|
|
|
703
703
|
costUsd: a
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function ct($, s) {
|
|
707
707
|
return $ < 0.01 ? `< ${s}0.01` : `${s}${$.toFixed(2)}`;
|
|
708
708
|
}
|
|
709
|
-
const
|
|
709
|
+
const ol = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, al = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, nl = { class: "flex items-center gap-8" }, rl = {
|
|
710
710
|
key: 2,
|
|
711
711
|
class: "flex flex-col gap-8 rounded-md border border-fm-color-border px-16 py-12"
|
|
712
|
-
},
|
|
712
|
+
}, sl = { class: "fm-typo-en-body-sm-400" }, il = { class: "fm-typo-en-body-sm-400 font-bold" }, ul = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, dl = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, ml = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, cl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, pl = { class: "flex flex-col gap-24" }, vl = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, pt = /* @__PURE__ */ ye({
|
|
713
713
|
__name: "ReportEditorTab",
|
|
714
714
|
props: /* @__PURE__ */ fe({
|
|
715
715
|
hideConfiguration: {
|
|
@@ -722,14 +722,14 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
722
722
|
}),
|
|
723
723
|
emits: /* @__PURE__ */ fe(["hideConfiguration"], ["update:modelValue"]),
|
|
724
724
|
setup($, { emit: s }) {
|
|
725
|
-
const a = ge($, "modelValue"), { breakpoints: m } = We(), x = $, y = s, D =
|
|
725
|
+
const a = ge($, "modelValue"), { breakpoints: m } = We(), x = $, y = s, D = bt(), H = ht(), C = M(), {
|
|
726
726
|
currentSelectWidgetType: d,
|
|
727
|
-
categories:
|
|
727
|
+
categories: q,
|
|
728
728
|
editingTile: ee,
|
|
729
729
|
editingTileIndex: E,
|
|
730
730
|
editingGlobalFilter: J,
|
|
731
731
|
editingGlobalFilterIndex: F
|
|
732
|
-
} = _e(
|
|
732
|
+
} = _e(yt()), { schemas: T } = _e(Ut()), { globalFilters: R } = _e(Xe()), { getGlobalFilterLabel: N } = Xe(), { promptMessage: Y } = wt(), oe = M(!1), z = M(!1), { t: c, te: ue, locale: ae } = Ne(), X = M(void 0), de = b(() => {
|
|
733
733
|
const n = a.value.tiles.flatMap((l) => {
|
|
734
734
|
var B;
|
|
735
735
|
const V = l.widget.config.schemaNames ?? [], i = ((B = l.widget.config.joinDatasources) == null ? void 0 : B.flatMap((I) => I.schemaNames ?? [])) ?? [];
|
|
@@ -748,7 +748,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
748
748
|
me(
|
|
749
749
|
() => d.value,
|
|
750
750
|
() => {
|
|
751
|
-
d.value !== void 0 && (X.value =
|
|
751
|
+
d.value !== void 0 && (X.value = $t(d.value), ee.value = X.value, E.value = -1, D.push({
|
|
752
752
|
name: "tileEditor",
|
|
753
753
|
query: H.query
|
|
754
754
|
}));
|
|
@@ -844,7 +844,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
844
844
|
}) && ((B = a.value.globalFilters) == null || B.splice(n, 1));
|
|
845
845
|
}
|
|
846
846
|
}
|
|
847
|
-
],
|
|
847
|
+
], P = b(() => q.value.map((n) => ({
|
|
848
848
|
label: c(`report.category.${n.name}`),
|
|
849
849
|
value: n.id
|
|
850
850
|
}))), { sessionUser: j } = qt(), ie = b(
|
|
@@ -855,11 +855,11 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
855
855
|
), be = b({
|
|
856
856
|
get: () => a.value.queryVersion === "v2",
|
|
857
857
|
set: (n) => {
|
|
858
|
-
a.value.queryVersion = n ? "v2" : "v1", n ? a.value.queryDatasource = a.value.queryDatasource ??
|
|
858
|
+
a.value.queryVersion = n ? "v2" : "v1", n ? a.value.queryDatasource = a.value.queryDatasource ?? Pe.Postgres : a.value.queryDatasource = void 0;
|
|
859
859
|
}
|
|
860
860
|
}), K = [
|
|
861
|
-
{ label: c("report.common.postgresql"), value:
|
|
862
|
-
{ label: c("report.common.bigquery"), value:
|
|
861
|
+
{ label: c("report.common.postgresql"), value: Pe.Postgres },
|
|
862
|
+
{ label: c("report.common.bigquery"), value: Pe.BigQuery }
|
|
863
863
|
], we = [
|
|
864
864
|
{ label: c("report.common.noBatch"), value: "none" },
|
|
865
865
|
{ label: c("report.common.days"), value: "days" },
|
|
@@ -887,23 +887,23 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
887
887
|
set: (n) => {
|
|
888
888
|
a.value.name = n;
|
|
889
889
|
}
|
|
890
|
-
}), { country: Te } = _e(
|
|
890
|
+
}), { country: Te } = _e(Et()), {
|
|
891
891
|
dateRange: Fe,
|
|
892
892
|
compareDateRange: Ve,
|
|
893
|
-
timeRange:
|
|
894
|
-
selectedLocationIds:
|
|
893
|
+
timeRange: Me,
|
|
894
|
+
selectedLocationIds: qe,
|
|
895
895
|
businessDataVersion: Le,
|
|
896
|
-
restaurants:
|
|
897
|
-
warehouses:
|
|
898
|
-
} = _e(
|
|
899
|
-
() => a.value.queryVersion === "v2" && a.value.queryDatasource ===
|
|
900
|
-
), Se = b(() =>
|
|
896
|
+
restaurants: ze,
|
|
897
|
+
warehouses: Ae
|
|
898
|
+
} = _e(It()), { isAllGlobalFiltersLoaded: Ge } = _e(Xe()), He = b(
|
|
899
|
+
() => a.value.queryVersion === "v2" && a.value.queryDatasource === Pe.BigQuery
|
|
900
|
+
), Se = b(() => He.value && ie.value), re = M(null), Oe = M(!1), Je = b(() => {
|
|
901
901
|
const n = Fe.value.startDate ?? Fe.value.endDate;
|
|
902
902
|
return n ? {
|
|
903
903
|
startDate: n,
|
|
904
904
|
endDate: n
|
|
905
905
|
} : Fe.value;
|
|
906
|
-
}),
|
|
906
|
+
}), je = b(() => {
|
|
907
907
|
const n = Ve.value.startDate ?? Ve.value.endDate;
|
|
908
908
|
return n ? {
|
|
909
909
|
startDate: n,
|
|
@@ -913,22 +913,22 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
913
913
|
const n = a.value.batch;
|
|
914
914
|
if (!n) return 1;
|
|
915
915
|
if (n.locations) {
|
|
916
|
-
const l =
|
|
916
|
+
const l = ze.value.length + Ae.value.length;
|
|
917
917
|
return Math.max(1, Math.ceil(l / n.locations));
|
|
918
918
|
}
|
|
919
919
|
return 1;
|
|
920
920
|
}), e = b(() => {
|
|
921
921
|
if (re.value == null || re.value === 0) return null;
|
|
922
922
|
const n = re.value * t.value;
|
|
923
|
-
return
|
|
924
|
-
}), p = b(() => re.value == null || re.value === 0 ? null :
|
|
923
|
+
return mt(n, Te.value);
|
|
924
|
+
}), p = b(() => re.value == null || re.value === 0 ? null : mt(re.value, Te.value)), v = b(() => e.value ? ct(e.value.amount, e.value.symbol) : ""), h = b(() => p.value ? ct(p.value.amount, p.value.symbol) : ""), k = b(() => t.value === 1 ? c("report.common.estimatedCostBatchSingular") : c("report.common.estimatedCostBatchPlural")), W = b(() => Oe.value ? "..." : !v.value || !h.value ? "--" : c("report.common.estimatedCostFormula", {
|
|
925
925
|
batchCount: t.value,
|
|
926
926
|
batchLabel: k.value,
|
|
927
927
|
baseCost: h.value,
|
|
928
928
|
totalCost: v.value
|
|
929
929
|
}));
|
|
930
930
|
let Q = [];
|
|
931
|
-
const te =
|
|
931
|
+
const te = Pt(async () => {
|
|
932
932
|
if (!Se.value) return;
|
|
933
933
|
const n = a.value.tiles.filter((l) => {
|
|
934
934
|
var V;
|
|
@@ -943,12 +943,12 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
943
943
|
const l = await Promise.all(
|
|
944
944
|
n.map((V) => {
|
|
945
945
|
const i = new AbortController();
|
|
946
|
-
return Q.push(i),
|
|
946
|
+
return Q.push(i), Bt({
|
|
947
947
|
widget: V.widget,
|
|
948
948
|
signal: i.signal,
|
|
949
949
|
tileId: V.id,
|
|
950
|
-
scopedDateRange:
|
|
951
|
-
scopedCompareDateRange:
|
|
950
|
+
scopedDateRange: Je.value,
|
|
951
|
+
scopedCompareDateRange: je.value
|
|
952
952
|
});
|
|
953
953
|
})
|
|
954
954
|
);
|
|
@@ -966,26 +966,26 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
966
966
|
() => a.value.queryDatasource,
|
|
967
967
|
() => a.value.batch,
|
|
968
968
|
() => Fe.value,
|
|
969
|
-
() => qe.value,
|
|
970
|
-
() => Ve.value,
|
|
971
969
|
() => Me.value,
|
|
970
|
+
() => Ve.value,
|
|
971
|
+
() => qe.value,
|
|
972
972
|
() => Le.value,
|
|
973
|
-
() =>
|
|
973
|
+
() => Ge.value
|
|
974
974
|
],
|
|
975
975
|
() => {
|
|
976
976
|
te();
|
|
977
977
|
},
|
|
978
978
|
{ deep: !0 }
|
|
979
|
-
),
|
|
979
|
+
), ft(() => {
|
|
980
980
|
te();
|
|
981
|
-
}),
|
|
981
|
+
}), Ct(() => {
|
|
982
982
|
Q.forEach((n) => n.abort());
|
|
983
983
|
});
|
|
984
984
|
function A(n) {
|
|
985
985
|
var l;
|
|
986
986
|
return !((l = n.tileIds) != null && l.length);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function Ke(n) {
|
|
989
989
|
return !de.value.find((l) => l.name === n.schemaName);
|
|
990
990
|
}
|
|
991
991
|
return me(
|
|
@@ -995,13 +995,13 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
995
995
|
},
|
|
996
996
|
{ deep: !0, immediate: !0 }
|
|
997
997
|
), (n, l) => {
|
|
998
|
-
const V = w("FmTextField"), i = w("FmSelect"), B = w("FmSwitch"), I = w("FmButton"), Ee = w("FmIcon"), Ie = w("FmTooltip"),
|
|
999
|
-
return u(), O(
|
|
998
|
+
const V = w("FmTextField"), i = w("FmSelect"), B = w("FmSwitch"), I = w("FmButton"), Ee = w("FmIcon"), Ie = w("FmTooltip"), nt = w("FmMenuItem"), rt = w("FmMenu"), st = w("FmListItem"), it = w("FmList"), Ft = w("FmForm");
|
|
999
|
+
return u(), O(xt(o(m).lg || o(m).md ? zt : At), {
|
|
1000
1000
|
"model-value": x.hideConfiguration,
|
|
1001
1001
|
"onUpdate:modelValue": l[13] || (l[13] = (_) => y("hideConfiguration", _))
|
|
1002
1002
|
}, {
|
|
1003
1003
|
default: g(() => [
|
|
1004
|
-
r(
|
|
1004
|
+
r(Xt, {
|
|
1005
1005
|
"is-open": oe.value,
|
|
1006
1006
|
"onUpdate:isOpen": l[0] || (l[0] = (_) => oe.value = _),
|
|
1007
1007
|
"global-filter": o(J),
|
|
@@ -1013,23 +1013,23 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1013
1013
|
}, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
|
|
1014
1014
|
r(Wt, {
|
|
1015
1015
|
modelValue: o(d),
|
|
1016
|
-
"onUpdate:modelValue": l[2] || (l[2] = (_) =>
|
|
1016
|
+
"onUpdate:modelValue": l[2] || (l[2] = (_) => gt(d) ? d.value = _ : null),
|
|
1017
1017
|
"is-open": z.value,
|
|
1018
1018
|
"onUpdate:isOpen": l[3] || (l[3] = (_) => z.value = _)
|
|
1019
1019
|
}, null, 8, ["modelValue", "is-open"]),
|
|
1020
|
-
r(
|
|
1020
|
+
r(Ft, {
|
|
1021
1021
|
ref_key: "form",
|
|
1022
1022
|
ref: C,
|
|
1023
1023
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
1024
1024
|
}, {
|
|
1025
1025
|
default: g(() => [
|
|
1026
|
-
r(
|
|
1026
|
+
r(Ye, { class: "border-solid" }, {
|
|
1027
1027
|
header: g(() => [
|
|
1028
|
-
f("p", null,
|
|
1028
|
+
f("p", null, L(o(c)("report.editor.reportInfo")), 1),
|
|
1029
1029
|
l[14] || (l[14] = f("div", { class: "grow" }, null, -1))
|
|
1030
1030
|
]),
|
|
1031
1031
|
content: g(() => [
|
|
1032
|
-
f("div",
|
|
1032
|
+
f("div", ol, [
|
|
1033
1033
|
r(V, {
|
|
1034
1034
|
modelValue: Be.value,
|
|
1035
1035
|
"onUpdate:modelValue": l[4] || (l[4] = (_) => Be.value = _),
|
|
@@ -1041,7 +1041,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1041
1041
|
modelValue: a.value.category,
|
|
1042
1042
|
"onUpdate:modelValue": l[5] || (l[5] = (_) => a.value.category = _),
|
|
1043
1043
|
label: o(c)("report.common.category"),
|
|
1044
|
-
items:
|
|
1044
|
+
items: P.value
|
|
1045
1045
|
}, null, 8, ["modelValue", "label", "items"])),
|
|
1046
1046
|
r(V, {
|
|
1047
1047
|
modelValue: a.value.description,
|
|
@@ -1053,17 +1053,17 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1053
1053
|
]),
|
|
1054
1054
|
_: 1
|
|
1055
1055
|
}),
|
|
1056
|
-
r(
|
|
1056
|
+
r(Ye, {
|
|
1057
1057
|
class: "border-solid",
|
|
1058
1058
|
"is-open": !1
|
|
1059
1059
|
}, {
|
|
1060
1060
|
header: g(() => [
|
|
1061
|
-
f("p", null,
|
|
1061
|
+
f("p", null, L(o(c)("report.editor.advancedUsage")), 1),
|
|
1062
1062
|
l[15] || (l[15] = f("div", { class: "grow" }, null, -1))
|
|
1063
1063
|
]),
|
|
1064
1064
|
content: g(() => [
|
|
1065
|
-
f("div",
|
|
1066
|
-
f("div",
|
|
1065
|
+
f("div", al, [
|
|
1066
|
+
f("div", nl, [
|
|
1067
1067
|
l[16] || (l[16] = f("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "V2", -1)),
|
|
1068
1068
|
r(B, {
|
|
1069
1069
|
modelValue: be.value,
|
|
@@ -1091,29 +1091,29 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1091
1091
|
label: ne.value === "days" ? o(c)("report.common.days") : o(c)("report.common.locations"),
|
|
1092
1092
|
type: "number"
|
|
1093
1093
|
}, null, 8, ["modelValue", "label"])) : G("", !0),
|
|
1094
|
-
Se.value ? (u(), S("div",
|
|
1095
|
-
f("span",
|
|
1096
|
-
f("p",
|
|
1097
|
-
f("div",
|
|
1098
|
-
f("div", null, "* " +
|
|
1099
|
-
f("div", null, "* " +
|
|
1100
|
-
f("div", null, "* " +
|
|
1094
|
+
Se.value ? (u(), S("div", rl, [
|
|
1095
|
+
f("span", sl, L(o(c)("report.common.estimatedBqCost")), 1),
|
|
1096
|
+
f("p", il, L(W.value), 1),
|
|
1097
|
+
f("div", ul, [
|
|
1098
|
+
f("div", null, "* " + L(o(c)("report.common.estimatedCostGuidelineBigQuery")), 1),
|
|
1099
|
+
f("div", null, "* " + L(o(c)("report.common.estimatedCostGuidelineDateRange")), 1),
|
|
1100
|
+
f("div", null, "* " + L(o(c)("report.common.estimatedCostGuidelineLocationBatch")), 1)
|
|
1101
1101
|
])
|
|
1102
1102
|
])) : G("", !0)
|
|
1103
1103
|
])
|
|
1104
1104
|
]),
|
|
1105
1105
|
_: 1
|
|
1106
1106
|
}),
|
|
1107
|
-
r(
|
|
1107
|
+
r(Ye, {
|
|
1108
1108
|
class: "border-solid",
|
|
1109
1109
|
"is-open": !1
|
|
1110
1110
|
}, {
|
|
1111
1111
|
header: g(() => [
|
|
1112
|
-
f("p", null,
|
|
1112
|
+
f("p", null, L(o(c)("report.section.filter.globalFilter")), 1),
|
|
1113
1113
|
l[17] || (l[17] = f("div", { class: "grow" }, null, -1))
|
|
1114
1114
|
]),
|
|
1115
1115
|
content: g(() => [
|
|
1116
|
-
f("div",
|
|
1116
|
+
f("div", dl, [
|
|
1117
1117
|
r(I, {
|
|
1118
1118
|
label: o(c)("report.section.filter.addGlobalFilter"),
|
|
1119
1119
|
variant: "secondary",
|
|
@@ -1125,33 +1125,33 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1125
1125
|
F.value = null, J.value = null, oe.value = !0;
|
|
1126
1126
|
})
|
|
1127
1127
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
1128
|
-
r(
|
|
1128
|
+
r(it, null, {
|
|
1129
1129
|
default: g(() => [
|
|
1130
|
-
r(o(
|
|
1130
|
+
r(o(ut), {
|
|
1131
1131
|
list: a.value.globalFilters,
|
|
1132
1132
|
"item-key": "`${element.schemaName}-${element.name}`",
|
|
1133
1133
|
class: "flex flex-col gap-2 cursor-grab",
|
|
1134
1134
|
handle: ".handle"
|
|
1135
1135
|
}, {
|
|
1136
1136
|
item: g(({ element: _, index: $e }) => [
|
|
1137
|
-
r(
|
|
1137
|
+
r(st, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
1138
1138
|
default: g(() => [
|
|
1139
1139
|
r(Ee, {
|
|
1140
1140
|
name: "drag_handle",
|
|
1141
1141
|
class: "handle"
|
|
1142
1142
|
}),
|
|
1143
|
-
f("div",
|
|
1143
|
+
f("div", ml, [
|
|
1144
1144
|
r(Ie, {
|
|
1145
1145
|
"z-index": 99,
|
|
1146
1146
|
content: o(N)(_),
|
|
1147
1147
|
class: "handle"
|
|
1148
1148
|
}, {
|
|
1149
1149
|
default: g(() => [
|
|
1150
|
-
f("p",
|
|
1150
|
+
f("p", cl, L(o(N)(_)), 1)
|
|
1151
1151
|
]),
|
|
1152
1152
|
_: 2
|
|
1153
1153
|
}, 1032, ["content"]),
|
|
1154
|
-
|
|
1154
|
+
Ke(_) ? (u(), O(Ie, {
|
|
1155
1155
|
key: 0,
|
|
1156
1156
|
content: o(c)("report.section.filter.missingSchema"),
|
|
1157
1157
|
"z-index": 99
|
|
@@ -1178,7 +1178,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1178
1178
|
}, 8, ["content"])) : G("", !0)
|
|
1179
1179
|
]),
|
|
1180
1180
|
l[18] || (l[18] = f("div", { class: "grow" }, null, -1)),
|
|
1181
|
-
r(
|
|
1181
|
+
r(rt, {
|
|
1182
1182
|
trigger: "click",
|
|
1183
1183
|
shift: !0,
|
|
1184
1184
|
"stop-click-propagation": !0
|
|
@@ -1190,16 +1190,16 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1190
1190
|
})
|
|
1191
1191
|
]),
|
|
1192
1192
|
default: g(() => [
|
|
1193
|
-
(u(), S(le, null, ce(U, (he,
|
|
1194
|
-
key:
|
|
1195
|
-
onClick: (
|
|
1193
|
+
(u(), S(le, null, ce(U, (he, Qe) => r(nt, {
|
|
1194
|
+
key: Qe,
|
|
1195
|
+
onClick: (Vt) => he.onClick($e)
|
|
1196
1196
|
}, {
|
|
1197
1197
|
label: g(() => [
|
|
1198
1198
|
f("p", {
|
|
1199
1199
|
class: ke(
|
|
1200
1200
|
he.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
1201
1201
|
)
|
|
1202
|
-
},
|
|
1202
|
+
}, L(o(c)(he.label)), 3)
|
|
1203
1203
|
]),
|
|
1204
1204
|
_: 2
|
|
1205
1205
|
}, 1032, ["onClick"])), 64))
|
|
@@ -1219,7 +1219,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1219
1219
|
]),
|
|
1220
1220
|
_: 1
|
|
1221
1221
|
}),
|
|
1222
|
-
f("div",
|
|
1222
|
+
f("div", pl, [
|
|
1223
1223
|
r(I, {
|
|
1224
1224
|
label: o(c)("report.editor.addWidget"),
|
|
1225
1225
|
variant: "secondary",
|
|
@@ -1229,16 +1229,16 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1229
1229
|
"text-color": o(xe).ColorPrimary,
|
|
1230
1230
|
onClick: l[12] || (l[12] = (_) => z.value = !0)
|
|
1231
1231
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
1232
|
-
r(
|
|
1232
|
+
r(it, null, {
|
|
1233
1233
|
default: g(() => [
|
|
1234
|
-
r(o(
|
|
1234
|
+
r(o(ut), {
|
|
1235
1235
|
list: a.value.tiles,
|
|
1236
1236
|
"item-key": "id",
|
|
1237
1237
|
class: "flex flex-col gap-2 cursor-grab",
|
|
1238
1238
|
handle: ".handle"
|
|
1239
1239
|
}, {
|
|
1240
1240
|
item: g(({ element: _, index: $e }) => [
|
|
1241
|
-
r(
|
|
1241
|
+
r(st, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
1242
1242
|
default: g(() => [
|
|
1243
1243
|
r(Ee, {
|
|
1244
1244
|
name: "drag_handle",
|
|
@@ -1249,12 +1249,12 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1249
1249
|
class: "handle"
|
|
1250
1250
|
}, {
|
|
1251
1251
|
default: g(() => [
|
|
1252
|
-
f("p",
|
|
1252
|
+
f("p", vl, L(_.widget.title ? se(_.widget.title) : o(c)("report.editor.widget", { index: $e + 1 })), 1)
|
|
1253
1253
|
]),
|
|
1254
1254
|
_: 2
|
|
1255
1255
|
}, 1032, ["content"]),
|
|
1256
1256
|
l[19] || (l[19] = f("div", { class: "grow" }, null, -1)),
|
|
1257
|
-
r(
|
|
1257
|
+
r(rt, {
|
|
1258
1258
|
trigger: "click",
|
|
1259
1259
|
shift: !0,
|
|
1260
1260
|
"stop-click-propagation": !0
|
|
@@ -1266,16 +1266,16 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1266
1266
|
})
|
|
1267
1267
|
]),
|
|
1268
1268
|
default: g(() => [
|
|
1269
|
-
(u(), S(le, null, ce(pe, (he,
|
|
1270
|
-
key:
|
|
1271
|
-
onClick: (
|
|
1269
|
+
(u(), S(le, null, ce(pe, (he, Qe) => r(nt, {
|
|
1270
|
+
key: Qe,
|
|
1271
|
+
onClick: (Vt) => he.onClick($e)
|
|
1272
1272
|
}, {
|
|
1273
1273
|
label: g(() => [
|
|
1274
1274
|
f("p", {
|
|
1275
1275
|
class: ke(
|
|
1276
1276
|
he.variant === "destructive" ? " text-fm-color-system-error-300" : ""
|
|
1277
1277
|
)
|
|
1278
|
-
},
|
|
1278
|
+
}, L(o(c)(he.label)), 3)
|
|
1279
1279
|
]),
|
|
1280
1280
|
_: 2
|
|
1281
1281
|
}, 1032, ["onClick"])), 64))
|
|
@@ -1300,23 +1300,23 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1300
1300
|
}, 8, ["model-value"]);
|
|
1301
1301
|
};
|
|
1302
1302
|
}
|
|
1303
|
-
}),
|
|
1303
|
+
}), fl = { class: "h-full w-full overflow-x-hidden" }, gl = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, yl = { class: "flex bg-fm-color-neutral-white w-[88px]" }, bl = {
|
|
1304
1304
|
key: 1,
|
|
1305
1305
|
class: "w-full overflow-y-auto"
|
|
1306
|
-
},
|
|
1306
|
+
}, hl = {
|
|
1307
1307
|
key: 0,
|
|
1308
1308
|
class: "w-full grid grid-cols-12 gap-[24px] p-24"
|
|
1309
|
-
},
|
|
1309
|
+
}, _l = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, wl = { key: 2 }, Fl = {
|
|
1310
1310
|
key: 0,
|
|
1311
1311
|
class: "grid grid-cols-12 gap-[16px]"
|
|
1312
|
-
},
|
|
1312
|
+
}, Vl = { class: "col-span-12 mb-4 flex flex-wrap gap-2 pb-2" }, Cl = {
|
|
1313
1313
|
key: 3,
|
|
1314
1314
|
class: "h-full w-full flex items-start justify-center bg-fm-color-neutral-white py-24",
|
|
1315
1315
|
style: { backgroundColor: "#F6F8FC" }
|
|
1316
|
-
},
|
|
1316
|
+
}, xl = {
|
|
1317
1317
|
key: 0,
|
|
1318
1318
|
class: "w-full grid grid-cols-12 gap-[24px] p-24"
|
|
1319
|
-
},
|
|
1319
|
+
}, kl = /* @__PURE__ */ ye({
|
|
1320
1320
|
__name: "ReportEditorViewport",
|
|
1321
1321
|
props: /* @__PURE__ */ fe({
|
|
1322
1322
|
hideConfiguration: { type: Boolean, required: !1, default: !1 },
|
|
@@ -1332,16 +1332,16 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1332
1332
|
setup($, { emit: s }) {
|
|
1333
1333
|
const { breakpoints: a } = We(), m = ge($, "modelValue"), x = $, y = b(() => x.previewWidth > 0 && x.previewHeight > 0), D = b(() => a.value.sm || a.value.xs), H = s;
|
|
1334
1334
|
return (C, d) => {
|
|
1335
|
-
const
|
|
1336
|
-
return u(), S("div",
|
|
1335
|
+
const q = w("FmCircularProgress"), ee = w("FmButton"), E = w("FmMenuDivider"), J = w("FmCard");
|
|
1336
|
+
return u(), S("div", fl, [
|
|
1337
1337
|
m.value ? (u(), S(le, { key: 1 }, [
|
|
1338
|
-
y.value ? G("", !0) : (u(), O(
|
|
1338
|
+
y.value ? G("", !0) : (u(), O(Dt, {
|
|
1339
1339
|
key: 0,
|
|
1340
1340
|
"model-value": !x.hideConfiguration
|
|
1341
1341
|
}, {
|
|
1342
1342
|
right: g(() => [
|
|
1343
|
-
f("div",
|
|
1344
|
-
m.value ? (u(), O(
|
|
1343
|
+
f("div", gl, [
|
|
1344
|
+
m.value ? (u(), O(pt, {
|
|
1345
1345
|
key: 0,
|
|
1346
1346
|
modelValue: m.value,
|
|
1347
1347
|
"onUpdate:modelValue": d[0] || (d[0] = (F) => m.value = F),
|
|
@@ -1351,7 +1351,7 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1351
1351
|
])
|
|
1352
1352
|
]),
|
|
1353
1353
|
left: g(() => [
|
|
1354
|
-
f("div",
|
|
1354
|
+
f("div", yl, [
|
|
1355
1355
|
r(ee, {
|
|
1356
1356
|
variant: "secondary",
|
|
1357
1357
|
icon: "keyboard_double_arrow_right",
|
|
@@ -1369,36 +1369,36 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1369
1369
|
vertical: "",
|
|
1370
1370
|
style: { margin: "0px" }
|
|
1371
1371
|
}),
|
|
1372
|
-
!D.value && !y.value ? (u(), S("div",
|
|
1373
|
-
m.value.tiles.length > 0 ? (u(), S("div",
|
|
1374
|
-
f("div",
|
|
1375
|
-
r(
|
|
1372
|
+
!D.value && !y.value ? (u(), S("div", bl, [
|
|
1373
|
+
m.value.tiles.length > 0 ? (u(), S("div", hl, [
|
|
1374
|
+
f("div", _l, [
|
|
1375
|
+
r(dt)
|
|
1376
1376
|
]),
|
|
1377
|
-
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(
|
|
1377
|
+
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(Ze, {
|
|
1378
1378
|
key: `${o(De)()}_${T}`,
|
|
1379
1379
|
"model-value": F,
|
|
1380
1380
|
index: T,
|
|
1381
1381
|
"hide-export": !0
|
|
1382
1382
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
1383
|
-
])) : (u(), O(
|
|
1384
|
-
])) : D.value && !y.value ? (u(), S("div",
|
|
1383
|
+
])) : (u(), O(tt, { key: 1 }))
|
|
1384
|
+
])) : D.value && !y.value ? (u(), S("div", wl, [
|
|
1385
1385
|
r(J, { class: "px-5 pb-28" }, {
|
|
1386
1386
|
default: g(() => [
|
|
1387
|
-
m.value.tiles.length > 0 ? (u(), S("div",
|
|
1388
|
-
f("div",
|
|
1389
|
-
r(
|
|
1387
|
+
m.value.tiles.length > 0 ? (u(), S("div", Fl, [
|
|
1388
|
+
f("div", Vl, [
|
|
1389
|
+
r(dt)
|
|
1390
1390
|
]),
|
|
1391
|
-
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(
|
|
1391
|
+
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(Ze, {
|
|
1392
1392
|
key: `${o(De)()}_${T}`,
|
|
1393
1393
|
"model-value": F,
|
|
1394
1394
|
index: T,
|
|
1395
1395
|
"hide-export": !0
|
|
1396
1396
|
}, null, 8, ["model-value", "index"]))), 128))
|
|
1397
|
-
])) : (u(), O(
|
|
1397
|
+
])) : (u(), O(tt, { key: 1 }))
|
|
1398
1398
|
]),
|
|
1399
1399
|
_: 1
|
|
1400
1400
|
}),
|
|
1401
|
-
m.value ? (u(), O(
|
|
1401
|
+
m.value ? (u(), O(pt, {
|
|
1402
1402
|
key: 0,
|
|
1403
1403
|
modelValue: m.value,
|
|
1404
1404
|
"onUpdate:modelValue": d[3] || (d[3] = (F) => m.value = F),
|
|
@@ -1407,46 +1407,46 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1407
1407
|
H("hideConfiguration", F);
|
|
1408
1408
|
})
|
|
1409
1409
|
}, null, 8, ["modelValue", "hide-configuration"])) : G("", !0)
|
|
1410
|
-
])) : (u(), S("div",
|
|
1410
|
+
])) : (u(), S("div", Cl, [
|
|
1411
1411
|
f("div", {
|
|
1412
|
-
style:
|
|
1412
|
+
style: ot({
|
|
1413
1413
|
transformOrigin: "top center",
|
|
1414
1414
|
transform: `scale(${x.previewScale})`
|
|
1415
1415
|
})
|
|
1416
1416
|
}, [
|
|
1417
1417
|
f("div", {
|
|
1418
1418
|
class: "overflow-y-auto bg-white rounded-lg",
|
|
1419
|
-
style:
|
|
1419
|
+
style: ot({
|
|
1420
1420
|
width: x.previewWidth + "px",
|
|
1421
1421
|
height: x.previewHeight + "px"
|
|
1422
1422
|
})
|
|
1423
1423
|
}, [
|
|
1424
|
-
m.value.tiles.length > 0 ? (u(), S("div",
|
|
1425
|
-
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(
|
|
1424
|
+
m.value.tiles.length > 0 ? (u(), S("div", xl, [
|
|
1425
|
+
(u(!0), S(le, null, ce(m.value.tiles, (F, T) => (u(), O(Ze, {
|
|
1426
1426
|
key: `${o(De)()}_${T}`,
|
|
1427
1427
|
"model-value": F,
|
|
1428
1428
|
index: T,
|
|
1429
1429
|
"hide-export": !0,
|
|
1430
1430
|
"custom-screen-width": x.previewWidth
|
|
1431
1431
|
}, null, 8, ["model-value", "index", "custom-screen-width"]))), 128))
|
|
1432
|
-
])) : (u(), O(
|
|
1432
|
+
])) : (u(), O(tt, { key: 1 }))
|
|
1433
1433
|
], 4)
|
|
1434
1434
|
], 4)
|
|
1435
1435
|
]))
|
|
1436
|
-
], 64)) : (u(), O(
|
|
1436
|
+
], 64)) : (u(), O(q, { key: 0 }))
|
|
1437
1437
|
]);
|
|
1438
1438
|
};
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), Tl = { class: "flex items-center gap-4" }, Sl = { class: "flex justify-center items-center gap-2 w-full" }, Ol = { class: "flex gap-4" }, Al = /* @__PURE__ */ ye({
|
|
1441
1441
|
__name: "ReportEditor",
|
|
1442
1442
|
setup($) {
|
|
1443
|
-
const s =
|
|
1443
|
+
const s = bt(), a = ht(), m = yt(), { promptLoader: x } = Mt(), { t: y, te: D } = Ne(), { currentReport: H, editingReport: C } = _e(m), { breakpoints: d } = We(), q = b(() => {
|
|
1444
1444
|
var U;
|
|
1445
1445
|
return !((U = C.value) != null && U.editable);
|
|
1446
1446
|
}), ee = b(() => {
|
|
1447
1447
|
var U;
|
|
1448
1448
|
return ((U = C.value) == null ? void 0 : U.name) ?? y("report.editor.newReport");
|
|
1449
|
-
}), E = b(() => Re(y, D, ee.value, "other")), J =
|
|
1449
|
+
}), E = b(() => Re(y, D, ee.value, "other")), J = _t(), { promptMessage: F } = wt(), T = M(!1), R = b(() => [
|
|
1450
1450
|
{ label: y("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
1451
1451
|
{ label: y("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
|
|
1452
1452
|
]);
|
|
@@ -1455,14 +1455,14 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1455
1455
|
J.open({ message: y("report.messages.noWidget"), type: "error" });
|
|
1456
1456
|
return;
|
|
1457
1457
|
}
|
|
1458
|
-
const U =
|
|
1458
|
+
const U = q.value ? y("report.common.clone") : y("report.common.save");
|
|
1459
1459
|
if (await F({
|
|
1460
1460
|
title: `${y("report.messages.saveReport")}`,
|
|
1461
1461
|
message: y("report.messages.confirmAction", { action: U, name: E.value })
|
|
1462
1462
|
}))
|
|
1463
1463
|
try {
|
|
1464
1464
|
await x(async () => {
|
|
1465
|
-
if (
|
|
1465
|
+
if (q.value) {
|
|
1466
1466
|
const j = JSON.parse(JSON.stringify(C.value));
|
|
1467
1467
|
j.editable = !0, j.id = "", j.name = `${j.name} ${y("report.common.duplicate")}`, j.isDefault = !1, await m.createOrUpdateReport(j);
|
|
1468
1468
|
} else
|
|
@@ -1480,14 +1480,14 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
1482
|
async function Y() {
|
|
1483
|
-
var
|
|
1483
|
+
var P;
|
|
1484
1484
|
if (!C.value) return;
|
|
1485
1485
|
await F({
|
|
1486
1486
|
title: y("report.common.report", 1),
|
|
1487
|
-
message: y("report.editor.notSaved", { name: (
|
|
1487
|
+
message: y("report.editor.notSaved", { name: (P = C.value) == null ? void 0 : P.name })
|
|
1488
1488
|
}) && (C.value = JSON.parse(JSON.stringify(H.value)), s.back());
|
|
1489
1489
|
}
|
|
1490
|
-
|
|
1490
|
+
ft(() => {
|
|
1491
1491
|
C.value || s.push({ name: "reports" });
|
|
1492
1492
|
});
|
|
1493
1493
|
const oe = [
|
|
@@ -1511,10 +1511,10 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1511
1511
|
width: 390,
|
|
1512
1512
|
height: 859
|
|
1513
1513
|
}
|
|
1514
|
-
], z =
|
|
1514
|
+
], z = M(oe[0]), c = M(!1), ue = b(() => c.value ? Math.max(z.value.width || 0, z.value.height || 0) : Math.min(z.value.width || 0, z.value.height || 0)), ae = b(() => c.value ? Math.min(z.value.width || 0, z.value.height || 0) : Math.max(z.value.width || 0, z.value.height || 0)), X = b(() => window.innerHeight - 72 - 56), de = b(() => {
|
|
1515
1515
|
if (!ue.value) return 1;
|
|
1516
|
-
let U = (X.value - 48) / ue.value,
|
|
1517
|
-
return
|
|
1516
|
+
let U = (X.value - 48) / ue.value, P = ae.value * U;
|
|
1517
|
+
return P > window.innerWidth && (U = window.innerWidth / ae.value, P = ae.value * U), U > 1 ? 1 : U;
|
|
1518
1518
|
});
|
|
1519
1519
|
function se(U) {
|
|
1520
1520
|
z.value = U;
|
|
@@ -1522,19 +1522,19 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1522
1522
|
function pe() {
|
|
1523
1523
|
c.value = !c.value;
|
|
1524
1524
|
}
|
|
1525
|
-
return (U,
|
|
1525
|
+
return (U, P) => {
|
|
1526
1526
|
const j = w("FmTooltip"), ie = w("FmButton"), be = w("FmPageHead");
|
|
1527
|
-
return u(), O(
|
|
1527
|
+
return u(), O(Rt, null, {
|
|
1528
1528
|
default: g(() => [
|
|
1529
1529
|
r(be, {
|
|
1530
1530
|
"data-editor-header": "true",
|
|
1531
1531
|
actions: R.value,
|
|
1532
|
-
"onClick:action":
|
|
1532
|
+
"onClick:action": P[0] || (P[0] = (K) => {
|
|
1533
1533
|
K === "cancel" && Y(), K === "save" && N();
|
|
1534
1534
|
})
|
|
1535
1535
|
}, {
|
|
1536
1536
|
title: g(() => [
|
|
1537
|
-
f("div",
|
|
1537
|
+
f("div", Tl, [
|
|
1538
1538
|
r(j, {
|
|
1539
1539
|
content: E.value,
|
|
1540
1540
|
placement: "bottom"
|
|
@@ -1542,12 +1542,12 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1542
1542
|
default: g(() => [
|
|
1543
1543
|
f("p", {
|
|
1544
1544
|
class: ke(`${o(d).sm || o(d).xs ? "hidden" : ""} text-ellipsis overflow-hidden text-nowrap fm-typo-en-title-md-600 w-[250px]`)
|
|
1545
|
-
},
|
|
1545
|
+
}, L(E.value), 3)
|
|
1546
1546
|
]),
|
|
1547
1547
|
_: 1
|
|
1548
1548
|
}, 8, ["content"]),
|
|
1549
|
-
f("div",
|
|
1550
|
-
f("div",
|
|
1549
|
+
f("div", Sl, [
|
|
1550
|
+
f("div", Ol, [
|
|
1551
1551
|
(u(), S(le, null, ce(oe, (K) => {
|
|
1552
1552
|
var we;
|
|
1553
1553
|
return r(ie, {
|
|
@@ -1571,17 +1571,17 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1571
1571
|
]),
|
|
1572
1572
|
_: 1
|
|
1573
1573
|
}, 8, ["actions"]),
|
|
1574
|
-
o(C) ? (u(), O(
|
|
1574
|
+
o(C) ? (u(), O(kl, {
|
|
1575
1575
|
key: 0,
|
|
1576
1576
|
modelValue: o(C),
|
|
1577
|
-
"onUpdate:modelValue":
|
|
1578
|
-
style:
|
|
1577
|
+
"onUpdate:modelValue": P[1] || (P[1] = (K) => gt(C) ? C.value = K : null),
|
|
1578
|
+
style: ot({ height: X.value + "px" }),
|
|
1579
1579
|
class: ke(o(d).lg || o(d).md ? "flex" : ""),
|
|
1580
1580
|
"hide-configuration": T.value,
|
|
1581
1581
|
"preview-width": ae.value,
|
|
1582
1582
|
"preview-height": ue.value,
|
|
1583
1583
|
"preview-scale": de.value,
|
|
1584
|
-
onHideConfiguration:
|
|
1584
|
+
onHideConfiguration: P[2] || (P[2] = (K) => T.value = K)
|
|
1585
1585
|
}, null, 8, ["modelValue", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : G("", !0)
|
|
1586
1586
|
]),
|
|
1587
1587
|
_: 1
|
|
@@ -1590,5 +1590,5 @@ const ll = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10"
|
|
|
1590
1590
|
}
|
|
1591
1591
|
});
|
|
1592
1592
|
export {
|
|
1593
|
-
|
|
1593
|
+
Al as default
|
|
1594
1594
|
};
|