@feedmepos/mf-report 5.33.1-beta.0 → 5.33.2
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-DyT6nh_L.js → App-Bt0JnxKU.js} +40 -40
- package/dist/{DateRangeSelect-BBw7T_aW.js → DateRangeSelect-DV8-mG6R.js} +1 -1
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Dnk_TnQR.js → Default.vue_vue_type_script_setup_true_lang-D7oPGH9b.js} +1 -1
- package/dist/{DigestListView-21gr8OcT.js → DigestListView-BvvcErG0.js} +3 -3
- package/dist/{DigestReaderView-CE-6PrMO.js → DigestReaderView-BJyrbFOf.js} +4 -4
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DFn0SFrY.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DgnLcmBN.js} +6 -6
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-C7qNbWLB.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BC5Ngfdx.js} +281 -277
- package/dist/{InsightView-CPepuPPZ.js → InsightView-DaDMVaSe.js} +5 -5
- package/dist/{Integration-CWUcfGh4.js → Integration-n7lomXSq.js} +3 -3
- package/dist/{Integrations-H2xaMwLN.js → Integrations-CIu3fN_0.js} +2 -2
- package/dist/{Layout-DlNzbAzE.js → Layout-BOZibC0w.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DHV1khX0.js → LocationSelect.vue_vue_type_script_setup_true_lang-Cx2H3p4z.js} +2 -2
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CSyIdEay.js → MenuTab.vue_vue_type_script_setup_true_lang-BOf6udi4.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BBI48702.js → NavigationTab.vue_vue_type_script_setup_true_lang-6Ncw54c-.js} +5 -5
- package/dist/{OverviewView-DGn9Ly3V.js → OverviewView-CqRNFYEM.js} +5 -5
- package/dist/{Report-BQu6bcXX.js → Report-BHJdOKaa.js} +3 -3
- package/dist/{ReportCanvasView-ICjkqj1z.js → ReportCanvasView-B9fzdqfn.js} +5 -5
- package/dist/{ReportEditor-CYKIOEDv.js → ReportEditor-BJy8q-wv.js} +724 -728
- package/dist/{ReportView-Cs9oLsT3.js → ReportView-CG8TEAS3.js} +6 -6
- package/dist/{ReportViewRoute-Oes7NDR_.js → ReportViewRoute-79AUeUY0.js} +2 -2
- package/dist/{Setting-K4gm_mgo.js → Setting-BCzoI1h5.js} +3 -3
- package/dist/{Template-DvmIdKuP.js → Template-D8ehIfYt.js} +3 -3
- package/dist/{TileEditor-BeSPXxDU.js → TileEditor-BrUKQPhm.js} +6 -6
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-D8d93Bzw.js → TilePageStack.vue_vue_type_script_setup_true_lang-Bhg8iu7W.js} +2 -2
- package/dist/{TransitionFade-Da9yU0De.js → TransitionFade-CFlmelaO.js} +5 -5
- package/dist/{app-B91tkGfv.js → app-BEXrO9sy.js} +16 -16
- package/dist/app.js +1 -1
- package/dist/{currency-DUjqeVZg.js → currency-CbCdMoTW.js} +1 -1
- package/dist/{index-CpEIHYgq.js → index-CAiZ9tzQ.js} +1 -1
- package/dist/{report-BtUlq8BM.js → report-CoSXTUpi.js} +1 -1
- package/dist/{useDigestFont-BU0GGO11.js → useDigestFont-DdSYKfvI.js} +1 -1
- package/dist/{useReportCanvasPanel-CF2qKhDY.js → useReportCanvasPanel-vau_DTdo.js} +3 -3
- package/dist/{useRestaurantPermission-Dsp8l6vP.js → useRestaurantPermission-B8W8_pcf.js} +1 -1
- package/package.json +1 -1
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { W as Il, g as Ul, _ as Nl, a as Bl, e as
|
|
3
|
-
import {
|
|
1
|
+
import { defineComponent as ye, mergeModels as Ce, useModel as Te, ref as G, computed as b, resolveComponent as T, createBlock as k, openBlock as p, withCtx as V, createElementVNode as f, createVNode as d, unref as t, normalizeClass as Ae, createTextVNode as Je, toDisplayString as B, createElementBlock as z, Fragment as ke, renderSlot as bl, createCommentVNode as U, watch as ge, renderList as Le, onMounted as yl, onUnmounted as Dl, resolveDynamicComponent as Ol, isRef as hl, normalizeStyle as nl } from "vue";
|
|
2
|
+
import { W as Il, g as Ul, _ as Nl, a as Bl, e as Ne, S as je, d as wl, b as _l, T as Ml, c as Rl } from "./TransitionFade-CFlmelaO.js";
|
|
3
|
+
import { D as oe, b as ze, C as Pe, F as Ye, c as Be, u as sl, i as qe, d as fe, M as Fl, r as zl, e as ll, n as Pl, f as ql, g as El, h as Ll, j as Al, k as Gl, m as Wl, a as Hl, o as cl, p as tl, q as jl, Q as Xe, l as Jl, t as Ql } from "./report-CoSXTUpi.js";
|
|
4
4
|
import { storeToRefs as Ee } from "pinia";
|
|
5
5
|
import { useRouter as ul, useRoute as dl } from "vue-router";
|
|
6
|
-
import { useBreakpoints as Ze, useSnackbar as Vl, FmButtonColorThemeVariant as
|
|
6
|
+
import { useBreakpoints as Ze, useSnackbar as Vl, FmButtonColorThemeVariant as xe } from "@feedmepos/ui-library";
|
|
7
7
|
import { u as ml } from "./message-dialog-UoMWOnil.js";
|
|
8
8
|
import { u as Kl } from "./global-loader-BuxFfehu.js";
|
|
9
9
|
import { u as Ge } from "./_plugin-vue_export-helper-C6QDExPN.js";
|
|
10
10
|
import { r as Qe } from "./i18n-DbyciK4x.js";
|
|
11
|
-
import { _ as ol } from "./TilePageStack.vue_vue_type_script_setup_true_lang-
|
|
11
|
+
import { _ as ol } from "./TilePageStack.vue_vue_type_script_setup_true_lang-Bhg8iu7W.js";
|
|
12
12
|
import { a as al, _ as rl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js";
|
|
13
|
-
import { d as Yl, e as Xl, i as Zl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
14
|
-
import { g as et, d as lt, _ as pl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
13
|
+
import { d as Yl, e as Xl, i as Zl } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-DgnLcmBN.js";
|
|
14
|
+
import { g as et, d as lt, _ as pl } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BC5Ngfdx.js";
|
|
15
15
|
import { useCoreStore as tt } from "@feedmepos/mf-common";
|
|
16
|
-
import { u as ot, a as at } from "./app-
|
|
17
|
-
import { d as rt } from "./DateRangeSelect-
|
|
18
|
-
const nt = /* @__PURE__ */
|
|
16
|
+
import { u as ot, a as at } from "./app-BEXrO9sy.js";
|
|
17
|
+
import { d as rt } from "./DateRangeSelect-DV8-mG6R.js";
|
|
18
|
+
const nt = /* @__PURE__ */ ye({
|
|
19
19
|
__name: "WidgetDialog",
|
|
20
|
-
props: /* @__PURE__ */
|
|
20
|
+
props: /* @__PURE__ */ Ce({
|
|
21
21
|
isOpen: { type: Boolean }
|
|
22
22
|
}, {
|
|
23
23
|
modelValue: {},
|
|
24
24
|
modelModifiers: {}
|
|
25
25
|
}),
|
|
26
|
-
emits: /* @__PURE__ */
|
|
27
|
-
setup(
|
|
28
|
-
const { t: m } = Ge(), { breakpoints: y } = Ze(), n =
|
|
29
|
-
function
|
|
30
|
-
|
|
26
|
+
emits: /* @__PURE__ */ Ce(["update:isOpen"], ["update:modelValue"]),
|
|
27
|
+
setup(P, { emit: v }) {
|
|
28
|
+
const { t: m } = Ge(), { breakpoints: y } = Ze(), n = Te(P, "modelValue"), w = P, L = v;
|
|
29
|
+
function X() {
|
|
30
|
+
L("update:isOpen", !1);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
F.value && (n.value = F.value, F.value = void 0,
|
|
32
|
+
function D() {
|
|
33
|
+
F.value && (n.value = F.value, F.value = void 0, L("update:isOpen", !1));
|
|
34
34
|
}
|
|
35
35
|
const F = G(), N = b(() => !F.value);
|
|
36
|
-
return (
|
|
37
|
-
const a =
|
|
38
|
-
return
|
|
36
|
+
return (Z, A) => {
|
|
37
|
+
const a = T("FmButton"), O = T("FmDialog");
|
|
38
|
+
return p(), k(O, {
|
|
39
39
|
"model-value": w.isOpen
|
|
40
40
|
}, {
|
|
41
41
|
"dialog-header": V(() => [
|
|
@@ -44,31 +44,31 @@ const nt = /* @__PURE__ */ he({
|
|
|
44
44
|
default: V(() => [
|
|
45
45
|
d(Il, {
|
|
46
46
|
modelValue: F.value,
|
|
47
|
-
"onUpdate:modelValue":
|
|
47
|
+
"onUpdate:modelValue": A[0] || (A[0] = (S) => F.value = S),
|
|
48
48
|
class: Ae(`grid ${t(y).lg || t(y).md ? "grid-cols-3 gap-3" : "grid-cols-2 gap-3"}`),
|
|
49
49
|
"child-class": "p-[8px] flex flex-col"
|
|
50
50
|
}, null, 8, ["modelValue", "class"])
|
|
51
51
|
]),
|
|
52
52
|
"dialog-footer": V(() => [
|
|
53
|
-
|
|
53
|
+
A[1] || (A[1] = f("div", { class: "grow" }, null, -1)),
|
|
54
54
|
d(a, {
|
|
55
55
|
label: t(m)("report.common.cancel"),
|
|
56
56
|
variant: "tertiary",
|
|
57
|
-
onClick:
|
|
57
|
+
onClick: X
|
|
58
58
|
}, null, 8, ["label"]),
|
|
59
59
|
d(a, {
|
|
60
60
|
label: t(m)("report.common.confirm"),
|
|
61
61
|
disabled: N.value,
|
|
62
|
-
onClick:
|
|
62
|
+
onClick: D
|
|
63
63
|
}, null, 8, ["label", "disabled"])
|
|
64
64
|
]),
|
|
65
65
|
_: 1
|
|
66
66
|
}, 8, ["model-value"]);
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
}), it = { class: "fm-typo-en-body-lg-600" }, il = /* @__PURE__ */
|
|
69
|
+
}), it = { class: "fm-typo-en-body-lg-600" }, il = /* @__PURE__ */ ye({
|
|
70
70
|
__name: "ReportEditorTabHeader",
|
|
71
|
-
props: /* @__PURE__ */
|
|
71
|
+
props: /* @__PURE__ */ Ce({
|
|
72
72
|
icon: {
|
|
73
73
|
type: String,
|
|
74
74
|
required: !0
|
|
@@ -78,32 +78,32 @@ const nt = /* @__PURE__ */ he({
|
|
|
78
78
|
modelModifiers: {}
|
|
79
79
|
}),
|
|
80
80
|
emits: ["update:modelValue"],
|
|
81
|
-
setup(
|
|
82
|
-
const { t: v } = Ge(), m =
|
|
81
|
+
setup(P) {
|
|
82
|
+
const { t: v } = Ge(), m = Te(P, "modelValue"), y = P;
|
|
83
83
|
return (n, w) => {
|
|
84
|
-
const
|
|
85
|
-
return
|
|
84
|
+
const L = T("FmIcon");
|
|
85
|
+
return p(), z("div", {
|
|
86
86
|
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
87
|
-
onClick: w[0] || (w[0] = (
|
|
87
|
+
onClick: w[0] || (w[0] = (X) => m.value = !m.value)
|
|
88
88
|
}, [
|
|
89
89
|
f("p", it, B(t(v)("report.editor.customizeReport")), 1),
|
|
90
90
|
w[1] || (w[1] = f("div", { class: "grow" }, null, -1)),
|
|
91
|
-
d(
|
|
91
|
+
d(L, {
|
|
92
92
|
name: y.icon
|
|
93
93
|
}, null, 8, ["name"])
|
|
94
94
|
]);
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
|
-
}), st = /* @__PURE__ */
|
|
97
|
+
}), st = /* @__PURE__ */ ye({
|
|
98
98
|
__name: "ReportEditorTabDesktop",
|
|
99
99
|
props: {
|
|
100
100
|
modelValue: { required: !0, default: !1 },
|
|
101
101
|
modelModifiers: {}
|
|
102
102
|
},
|
|
103
103
|
emits: ["update:modelValue"],
|
|
104
|
-
setup(
|
|
105
|
-
const v =
|
|
106
|
-
return (m, y) => (
|
|
104
|
+
setup(P) {
|
|
105
|
+
const v = Te(P, "modelValue");
|
|
106
|
+
return (m, y) => (p(), z(ke, null, [
|
|
107
107
|
d(il, {
|
|
108
108
|
modelValue: v.value,
|
|
109
109
|
"onUpdate:modelValue": y[0] || (y[0] = (n) => v.value = n),
|
|
@@ -112,33 +112,33 @@ const nt = /* @__PURE__ */ he({
|
|
|
112
112
|
bl(m.$slots, "default")
|
|
113
113
|
], 64));
|
|
114
114
|
}
|
|
115
|
-
}), ut = /* @__PURE__ */
|
|
115
|
+
}), ut = /* @__PURE__ */ ye({
|
|
116
116
|
__name: "ReportEditorTabMobile",
|
|
117
117
|
props: {
|
|
118
118
|
modelValue: { required: !0, default: !1 },
|
|
119
119
|
modelModifiers: {}
|
|
120
120
|
},
|
|
121
121
|
emits: ["update:modelValue"],
|
|
122
|
-
setup(
|
|
123
|
-
const v =
|
|
122
|
+
setup(P) {
|
|
123
|
+
const v = Te(P, "modelValue");
|
|
124
124
|
return (m, y) => {
|
|
125
|
-
const n =
|
|
126
|
-
return
|
|
125
|
+
const n = T("FmTopSheet"), w = T("FmCard");
|
|
126
|
+
return p(), k(w, { class: "fixed bottom-0 w-full" }, {
|
|
127
127
|
default: V(() => [
|
|
128
128
|
d(il, {
|
|
129
129
|
modelValue: v.value,
|
|
130
|
-
"onUpdate:modelValue": y[0] || (y[0] = (
|
|
130
|
+
"onUpdate:modelValue": y[0] || (y[0] = (L) => v.value = L),
|
|
131
131
|
icon: "keyboard_double_arrow_up"
|
|
132
132
|
}, null, 8, ["modelValue"]),
|
|
133
133
|
d(n, {
|
|
134
134
|
modelValue: v.value,
|
|
135
|
-
"onUpdate:modelValue": y[2] || (y[2] = (
|
|
135
|
+
"onUpdate:modelValue": y[2] || (y[2] = (L) => v.value = L),
|
|
136
136
|
"fullscreen-size": "sm"
|
|
137
137
|
}, {
|
|
138
138
|
default: V(() => [
|
|
139
139
|
d(il, {
|
|
140
140
|
modelValue: v.value,
|
|
141
|
-
"onUpdate:modelValue": y[1] || (y[1] = (
|
|
141
|
+
"onUpdate:modelValue": y[1] || (y[1] = (L) => v.value = L),
|
|
142
142
|
icon: "keyboard_double_arrow_down"
|
|
143
143
|
}, null, 8, ["modelValue"]),
|
|
144
144
|
v.value ? bl(m.$slots, "default", { key: 0 }) : U("", !0)
|
|
@@ -156,18 +156,18 @@ const nt = /* @__PURE__ */ he({
|
|
|
156
156
|
}, mt = { 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" }, ct = {
|
|
157
157
|
key: 0,
|
|
158
158
|
class: "flex justify-end sm:pb-[2px]"
|
|
159
|
-
}, pt = { class: "
|
|
160
|
-
key:
|
|
159
|
+
}, pt = { class: "pl-1" }, vt = {
|
|
160
|
+
key: 1,
|
|
161
161
|
class: "flex justify-end sm:pb-[2px]"
|
|
162
|
-
},
|
|
162
|
+
}, ft = {
|
|
163
163
|
key: 3,
|
|
164
164
|
class: "flex flex-col gap-1 mt-2"
|
|
165
|
-
},
|
|
165
|
+
}, gt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, bt = {
|
|
166
166
|
key: 4,
|
|
167
167
|
class: "flex flex-col gap-2"
|
|
168
|
-
},
|
|
168
|
+
}, yt = /* @__PURE__ */ ye({
|
|
169
169
|
__name: "GlobalFilterDialog",
|
|
170
|
-
props: /* @__PURE__ */
|
|
170
|
+
props: /* @__PURE__ */ Ce({
|
|
171
171
|
schemas: {
|
|
172
172
|
type: Array,
|
|
173
173
|
default: () => []
|
|
@@ -185,215 +185,214 @@ const nt = /* @__PURE__ */ he({
|
|
|
185
185
|
isOpenModifiers: {}
|
|
186
186
|
}),
|
|
187
187
|
emits: ["update:globalFilter", "update:isOpen"],
|
|
188
|
-
setup(
|
|
189
|
-
const { t: v, te: m } = Ge(), y =
|
|
190
|
-
() => !!F.value && F.value.type !==
|
|
188
|
+
setup(P) {
|
|
189
|
+
const { t: v, te: m } = Ge(), y = Te(P, "globalFilter"), n = Te(P, "isOpen"), w = Vl(), L = P, X = G(""), D = G(), F = G(), N = G(), Z = G([]), A = G([]), a = G(!1), O = G([]), S = G([]), ae = G(!1), ie = b(
|
|
190
|
+
() => !!F.value && F.value.type !== oe.Timestamp
|
|
191
191
|
);
|
|
192
|
-
function
|
|
192
|
+
function de(e) {
|
|
193
193
|
return JSON.parse(JSON.stringify(e));
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function J(e, l) {
|
|
196
196
|
return { hour: e, minute: l };
|
|
197
197
|
}
|
|
198
|
-
function
|
|
198
|
+
function se(e) {
|
|
199
199
|
return e ? `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}` : null;
|
|
200
200
|
}
|
|
201
|
-
function
|
|
201
|
+
function x(e) {
|
|
202
202
|
if (!e) return null;
|
|
203
|
-
const [l,
|
|
204
|
-
return Number.isNaN(l) || Number.isNaN(
|
|
203
|
+
const [l, c] = e.split(":").map(Number);
|
|
204
|
+
return Number.isNaN(l) || Number.isNaN(c) ? null : { hour: l, minute: c };
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const ne = b(() => F.value ? !(F.value.type === oe.Timestamp && N.value === ze.DateTime) : !1), ee = b(
|
|
207
207
|
() => {
|
|
208
208
|
var e;
|
|
209
|
-
return ((e = F.value) == null ? void 0 : e.type) ===
|
|
209
|
+
return ((e = F.value) == null ? void 0 : e.type) === oe.Timestamp && N.value === ze.TimeOfDay;
|
|
210
210
|
}
|
|
211
|
-
),
|
|
211
|
+
), re = b(() => {
|
|
212
212
|
var e;
|
|
213
|
-
return (((e = F.value) == null ? void 0 : e.filterOperators) ?? []).filter((l) => l !==
|
|
213
|
+
return (((e = F.value) == null ? void 0 : e.filterOperators) ?? []).filter((l) => l !== Pe.And && l !== Pe.Or).map((l) => ({
|
|
214
214
|
label: v(`report.section.comparisonOperator.${l}`),
|
|
215
215
|
value: l
|
|
216
216
|
}));
|
|
217
217
|
});
|
|
218
|
-
function
|
|
218
|
+
function me() {
|
|
219
219
|
var l;
|
|
220
|
-
const e = (l =
|
|
221
|
-
return e || (F.value ?
|
|
220
|
+
const e = (l = re.value[0]) == null ? void 0 : l.value;
|
|
221
|
+
return e || (F.value ? te(
|
|
222
222
|
F.value.type,
|
|
223
223
|
N.value ?? null
|
|
224
|
-
) :
|
|
224
|
+
) : Pe.Equal);
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function ue(e) {
|
|
227
227
|
if (F.value)
|
|
228
228
|
return et({
|
|
229
|
-
operator: e ??
|
|
229
|
+
operator: e ?? me(),
|
|
230
230
|
dataType: F.value.type,
|
|
231
|
-
dimensionOption: F.value.type ===
|
|
231
|
+
dimensionOption: F.value.type === oe.Timestamp ? N.value ?? null : null,
|
|
232
232
|
t: v
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
if (typeof (l == null ? void 0 : l.default) == "boolean" || e.length > 0 && e.every((
|
|
237
|
-
const
|
|
235
|
+
function ve(e, l) {
|
|
236
|
+
if (typeof (l == null ? void 0 : l.default) == "boolean" || e.length > 0 && e.every((h) => typeof h == "boolean")) {
|
|
237
|
+
const h = e.reduce(($, C) => (typeof C == "boolean" && $.push(C), $), []);
|
|
238
238
|
if (l)
|
|
239
|
-
for (l.fixed &&
|
|
240
|
-
|
|
241
|
-
return
|
|
239
|
+
for (l.fixed && h.splice(l.count); h.length < l.count; )
|
|
240
|
+
h.push(typeof l.default == "boolean" ? l.default : !1);
|
|
241
|
+
return h;
|
|
242
242
|
}
|
|
243
|
-
const g = e.reduce((
|
|
243
|
+
const g = e.reduce((h, $) => (typeof $ == "string" && h.push($), h), []);
|
|
244
244
|
if (l)
|
|
245
245
|
for (l.fixed && g.splice(l.count); g.length < l.count; )
|
|
246
246
|
g.push(typeof l.default == "string" ? l.default : "");
|
|
247
247
|
return g;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
250
|
-
const l =
|
|
249
|
+
function ce(e = me()) {
|
|
250
|
+
const l = ue(e), c = ve(
|
|
251
251
|
l ? Array(l.count).fill(l.default) : [],
|
|
252
252
|
l
|
|
253
253
|
);
|
|
254
254
|
return {
|
|
255
255
|
label: "",
|
|
256
256
|
operator: e,
|
|
257
|
-
values:
|
|
257
|
+
values: c
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function q() {
|
|
261
261
|
return {
|
|
262
262
|
name: "",
|
|
263
|
-
startTime:
|
|
264
|
-
endTime:
|
|
263
|
+
startTime: J(0, 0),
|
|
264
|
+
endTime: J(23, 59)
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
if (!(!
|
|
269
|
-
if (
|
|
270
|
-
|
|
267
|
+
function E() {
|
|
268
|
+
if (!(!ne.value || !a.value)) {
|
|
269
|
+
if (ee.value) {
|
|
270
|
+
S.value.length === 0 && (S.value = [q()]);
|
|
271
271
|
return;
|
|
272
272
|
}
|
|
273
|
-
|
|
273
|
+
O.value.length === 0 && (O.value = [ce()]);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
var
|
|
278
|
-
const e =
|
|
279
|
-
|
|
276
|
+
function Q() {
|
|
277
|
+
var c, g;
|
|
278
|
+
const e = de(((c = y.value) == null ? void 0 : c.customOptions) ?? []), l = de(((g = y.value) == null ? void 0 : g.customTimeRanges) ?? []);
|
|
279
|
+
a.value = e.length > 0 || l.length > 0, O.value = e, S.value = l, E();
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
Array.isArray(g.values) ? [...g.values] : [],
|
|
288
|
-
_
|
|
289
|
-
);
|
|
290
|
-
return {
|
|
291
|
-
...g,
|
|
292
|
-
operator: e,
|
|
293
|
-
values: k
|
|
294
|
-
};
|
|
295
|
-
});
|
|
281
|
+
function pe(e, l) {
|
|
282
|
+
const c = ve(
|
|
283
|
+
Array.isArray(e.values) ? [...e.values] : [],
|
|
284
|
+
ue(l)
|
|
285
|
+
);
|
|
286
|
+
return { ...e, operator: l, values: c };
|
|
296
287
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
288
|
+
function Se(e, l) {
|
|
289
|
+
O.value = O.value.map(
|
|
290
|
+
(c, g) => g === e ? pe(c, l) : c
|
|
291
|
+
);
|
|
292
|
+
}
|
|
293
|
+
function K() {
|
|
294
|
+
O.value = [...O.value, ce()];
|
|
299
295
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
296
|
+
function le(e) {
|
|
297
|
+
O.value.length <= 1 || (O.value = O.value.filter((l, c) => c !== e));
|
|
302
298
|
}
|
|
303
|
-
function
|
|
304
|
-
|
|
299
|
+
function $e() {
|
|
300
|
+
S.value = [...S.value, q()];
|
|
305
301
|
}
|
|
306
|
-
function
|
|
307
|
-
|
|
308
|
-
(l,
|
|
302
|
+
function Me(e) {
|
|
303
|
+
S.value.length <= 1 || (S.value = S.value.filter(
|
|
304
|
+
(l, c) => c !== e
|
|
309
305
|
));
|
|
310
306
|
}
|
|
311
|
-
function De(e, l,
|
|
312
|
-
const g =
|
|
313
|
-
g && (
|
|
307
|
+
function De(e, l, c) {
|
|
308
|
+
const g = S.value[e];
|
|
309
|
+
g && (S.value[e] = {
|
|
314
310
|
...g,
|
|
315
|
-
[l]:
|
|
311
|
+
[l]: x(c)
|
|
316
312
|
});
|
|
317
313
|
}
|
|
318
|
-
function
|
|
314
|
+
function he(e) {
|
|
319
315
|
return e.length === 0 || e.some((l) => l === "");
|
|
320
316
|
}
|
|
321
|
-
function
|
|
317
|
+
function we() {
|
|
322
318
|
if (!a.value) return !0;
|
|
323
|
-
if (
|
|
324
|
-
const
|
|
325
|
-
return
|
|
326
|
-
(
|
|
319
|
+
if (ee.value) {
|
|
320
|
+
const c = S.value.map((h) => h.name.trim()).filter(Boolean);
|
|
321
|
+
return S.value.some(
|
|
322
|
+
(h) => !h.name.trim() || !h.startTime || !h.endTime
|
|
327
323
|
) ? (w.open({
|
|
328
324
|
message: v("report.section.filter.invalidCustomTimeRange"),
|
|
329
325
|
type: "error"
|
|
330
|
-
}), !1) : new Set(
|
|
326
|
+
}), !1) : new Set(c).size !== c.length ? (w.open({
|
|
331
327
|
message: v("report.section.filter.customTimeRangeNamesMustBeUnique"),
|
|
332
328
|
type: "error"
|
|
333
329
|
}), !1) : !0;
|
|
334
330
|
}
|
|
335
|
-
const e =
|
|
336
|
-
return
|
|
337
|
-
(
|
|
331
|
+
const e = O.value.map((c) => c.label.trim()).filter(Boolean);
|
|
332
|
+
return O.value.some(
|
|
333
|
+
(c) => !c.label.trim() || he(c.values)
|
|
338
334
|
) ? (w.open({ message: v("report.section.filter.invalidCustomOption"), type: "error" }), !1) : new Set(e).size !== e.length ? (w.open({
|
|
339
335
|
message: v("report.section.filter.customOptionLabelsMustBeUnique"),
|
|
340
336
|
type: "error"
|
|
341
337
|
}), !1) : !0;
|
|
342
338
|
}
|
|
343
339
|
ge(n, (e) => {
|
|
344
|
-
var l,
|
|
345
|
-
e && (
|
|
340
|
+
var l, c, g, h, $, C;
|
|
341
|
+
e && (X.value = ((l = y.value) == null ? void 0 : l.label) || "", D.value = L.schemas.find(
|
|
346
342
|
(W) => {
|
|
347
|
-
var
|
|
348
|
-
return W.name === ((
|
|
343
|
+
var R;
|
|
344
|
+
return W.name === ((R = y.value) == null ? void 0 : R.schemaName);
|
|
349
345
|
}
|
|
350
|
-
), F.value = (
|
|
346
|
+
), F.value = (c = Ie.value.find(
|
|
351
347
|
(W) => {
|
|
352
|
-
var
|
|
353
|
-
return W.value.name === ((
|
|
348
|
+
var R;
|
|
349
|
+
return W.value.name === ((R = y.value) == null ? void 0 : R.name);
|
|
354
350
|
}
|
|
355
|
-
)) == null ? void 0 :
|
|
351
|
+
)) == null ? void 0 : c.value, N.value = (g = y.value) == null ? void 0 : g.option, Z.value = ((h = y.value) == null ? void 0 : h.tileIds) || [], A.value = (($ = y.value) == null ? void 0 : $.filters) || [], ae.value = ((C = y.value) == null ? void 0 : C.beforeAggregation) === !0, Q());
|
|
356
352
|
}), ge(a, (e) => {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
}), ge(se, (e) => {
|
|
353
|
+
e && E();
|
|
354
|
+
}), ge(ne, (e) => {
|
|
360
355
|
if (!e) {
|
|
361
|
-
a.value = !1,
|
|
356
|
+
a.value = !1, O.value = [], S.value = [];
|
|
362
357
|
return;
|
|
363
358
|
}
|
|
364
|
-
|
|
365
|
-
}), ge(
|
|
366
|
-
|
|
367
|
-
}), ge(
|
|
368
|
-
var
|
|
369
|
-
const l = (
|
|
370
|
-
|
|
359
|
+
E();
|
|
360
|
+
}), ge(ee, () => {
|
|
361
|
+
E();
|
|
362
|
+
}), ge(re, (e) => {
|
|
363
|
+
var g;
|
|
364
|
+
const l = (g = e[0]) == null ? void 0 : g.value;
|
|
365
|
+
if (!l) return;
|
|
366
|
+
const c = new Set(e.map((h) => h.value));
|
|
367
|
+
O.value = O.value.map(
|
|
368
|
+
(h) => c.has(h.operator) ? h : pe(h, l)
|
|
369
|
+
);
|
|
371
370
|
});
|
|
372
|
-
const
|
|
373
|
-
() =>
|
|
371
|
+
const Oe = b(
|
|
372
|
+
() => L.schemas.map((e) => ({
|
|
374
373
|
label: e.label || e.name,
|
|
375
374
|
value: e
|
|
376
375
|
}))
|
|
377
|
-
),
|
|
376
|
+
), Ie = b(() => {
|
|
378
377
|
var e;
|
|
379
|
-
return (((e =
|
|
378
|
+
return (((e = D.value) == null ? void 0 : e.fields) || []).filter((l) => l.type !== oe.Numeric).map((l) => ({
|
|
380
379
|
label: l.label || l.name,
|
|
381
380
|
value: l
|
|
382
381
|
}));
|
|
383
|
-
}),
|
|
382
|
+
}), Re = b(() => {
|
|
384
383
|
var e;
|
|
385
|
-
return ((e = F.value) == null ? void 0 : e.type) !==
|
|
386
|
-
}), be = b(() =>
|
|
387
|
-
var
|
|
388
|
-
const g = ((
|
|
384
|
+
return ((e = F.value) == null ? void 0 : e.type) !== oe.Timestamp ? [] : Ul(v);
|
|
385
|
+
}), be = b(() => L.tiles.reduce((e, l, c) => {
|
|
386
|
+
var $, C, W, R, u;
|
|
387
|
+
const g = (($ = l.widget) == null ? void 0 : $.config.schemaNames) ?? [], h = (((C = l.widget) == null ? void 0 : C.config.joinDatasources) ?? []).flatMap(
|
|
389
388
|
(s) => s.schemaNames ?? []
|
|
390
389
|
);
|
|
391
|
-
return [...g, ...
|
|
392
|
-
label: (u = (
|
|
390
|
+
return [...g, ...h].includes(((W = D.value) == null ? void 0 : W.name) || "") && e.push({
|
|
391
|
+
label: (u = (R = l.widget) == null ? void 0 : R.title) != null && u.trim() ? l.widget.title : `Widget ${c + 1}`,
|
|
393
392
|
value: l.id
|
|
394
393
|
}), e;
|
|
395
|
-
}, [])),
|
|
396
|
-
() =>
|
|
394
|
+
}, [])), _e = b(
|
|
395
|
+
() => L.schemas.flatMap(
|
|
397
396
|
(e) => (e.fields ?? []).map((l) => ({
|
|
398
397
|
...l,
|
|
399
398
|
labels: [
|
|
@@ -403,34 +402,34 @@ const nt = /* @__PURE__ */ he({
|
|
|
403
402
|
}))
|
|
404
403
|
)
|
|
405
404
|
);
|
|
406
|
-
function
|
|
405
|
+
function Fe(e) {
|
|
407
406
|
var l;
|
|
408
|
-
e.name !== ((l =
|
|
407
|
+
e.name !== ((l = D.value) == null ? void 0 : l.name) && (D.value = e, F.value = void 0, a.value = !1, O.value = [], S.value = []);
|
|
409
408
|
}
|
|
410
|
-
function
|
|
411
|
-
F.value = e, N.value = e.type ===
|
|
409
|
+
function Ve(e) {
|
|
410
|
+
F.value = e, N.value = e.type === oe.Timestamp ? ze.DateTime : void 0, a.value = !1, O.value = [], S.value = [];
|
|
412
411
|
}
|
|
413
|
-
function
|
|
412
|
+
function te(e, l) {
|
|
414
413
|
switch (e) {
|
|
415
|
-
case
|
|
416
|
-
return l ===
|
|
417
|
-
case
|
|
418
|
-
case
|
|
419
|
-
case
|
|
420
|
-
return
|
|
414
|
+
case oe.Timestamp:
|
|
415
|
+
return l === ze.DateTime || l === ze.TimeOfDay ? Pe.Between : Pe.Equal;
|
|
416
|
+
case oe.Bool:
|
|
417
|
+
case oe.String:
|
|
418
|
+
case oe.Numeric:
|
|
419
|
+
return Pe.Equal;
|
|
421
420
|
default:
|
|
422
421
|
throw new Error(`Unsupported data type: ${e}`);
|
|
423
422
|
}
|
|
424
423
|
}
|
|
425
|
-
function
|
|
426
|
-
var
|
|
424
|
+
function Ue(e) {
|
|
425
|
+
var $, C, W, R;
|
|
427
426
|
const l = y.value;
|
|
428
|
-
if (!((
|
|
429
|
-
const g = new Set((e ?? []).map((u) => u.label)),
|
|
430
|
-
return
|
|
427
|
+
if (!(($ = l == null ? void 0 : l.defaultValues) != null && $.length) || !(l.schemaName === ((C = D.value) == null ? void 0 : C.name) && l.name === ((W = F.value) == null ? void 0 : W.name)) || !!e != !!((R = l.customOptions) != null && R.length)) return;
|
|
428
|
+
const g = new Set((e ?? []).map((u) => u.label)), h = e ? l.defaultValues.filter((u) => g.has(String(u))) : l.defaultValues;
|
|
429
|
+
return h.length ? { defaultValues: h } : void 0;
|
|
431
430
|
}
|
|
432
431
|
function We() {
|
|
433
|
-
if (!
|
|
432
|
+
if (!D.value) {
|
|
434
433
|
w.open({ message: v("report.section.filter.invalidSchema"), type: "error" });
|
|
435
434
|
return;
|
|
436
435
|
}
|
|
@@ -438,48 +437,48 @@ const nt = /* @__PURE__ */ he({
|
|
|
438
437
|
w.open({ message: v("report.section.filter.invalidDimension"), type: "error" });
|
|
439
438
|
return;
|
|
440
439
|
}
|
|
441
|
-
const e =
|
|
440
|
+
const e = A.value.filter((g) => g ? !Oe.value.some(($) => $.value.name === g.schemaName) : !0);
|
|
442
441
|
if (e.length > 0) {
|
|
443
|
-
const g = e.filter((
|
|
442
|
+
const g = e.filter(($) => !!$).map(($) => $.schemaName), h = e.some(($) => !$) ? `, ${v("report.section.filter.unknownFilters")}` : "";
|
|
444
443
|
w.open({
|
|
445
444
|
message: v("report.section.filter.invalidFiltersSchemaNotFound", {
|
|
446
445
|
schemas: g.join(", "),
|
|
447
|
-
unknownFiltersSuffix:
|
|
446
|
+
unknownFiltersSuffix: h
|
|
448
447
|
}),
|
|
449
448
|
type: "error"
|
|
450
449
|
});
|
|
451
450
|
return;
|
|
452
451
|
}
|
|
453
|
-
if (!
|
|
452
|
+
if (!we())
|
|
454
453
|
return;
|
|
455
|
-
const l = a.value && !
|
|
454
|
+
const l = a.value && !ee.value ? O.value.map((g) => ({
|
|
456
455
|
label: g.label.trim(),
|
|
457
|
-
operator: g.operator ??
|
|
458
|
-
values:
|
|
456
|
+
operator: g.operator ?? me(),
|
|
457
|
+
values: ve(
|
|
459
458
|
[...g.values],
|
|
460
|
-
|
|
459
|
+
ue(g.operator)
|
|
461
460
|
)
|
|
462
|
-
})) : void 0,
|
|
461
|
+
})) : void 0, c = a.value && ee.value ? S.value.map((g) => ({
|
|
463
462
|
name: g.name.trim(),
|
|
464
463
|
startTime: g.startTime,
|
|
465
464
|
endTime: g.endTime
|
|
466
465
|
})) : void 0;
|
|
467
466
|
y.value = {
|
|
468
|
-
schemaName:
|
|
467
|
+
schemaName: D.value.name,
|
|
469
468
|
name: F.value.name,
|
|
470
|
-
label:
|
|
471
|
-
operator:
|
|
469
|
+
label: X.value,
|
|
470
|
+
operator: te(
|
|
472
471
|
F.value.type,
|
|
473
|
-
F.value.type ===
|
|
472
|
+
F.value.type === oe.Timestamp ? N.value ?? ze.DateTime : null
|
|
474
473
|
),
|
|
475
|
-
option: F.value.type ===
|
|
474
|
+
option: F.value.type === oe.Timestamp ? N.value : null,
|
|
476
475
|
values: [],
|
|
477
|
-
tileIds: [...
|
|
478
|
-
filters:
|
|
476
|
+
tileIds: [...Z.value],
|
|
477
|
+
filters: de(A.value),
|
|
479
478
|
customOptions: l,
|
|
480
|
-
customTimeRanges:
|
|
481
|
-
...
|
|
482
|
-
...
|
|
479
|
+
customTimeRanges: c,
|
|
480
|
+
...ie.value && ae.value ? { beforeAggregation: !0 } : {},
|
|
481
|
+
...Ue(l)
|
|
483
482
|
}, n.value = !1;
|
|
484
483
|
}
|
|
485
484
|
function He() {
|
|
@@ -488,40 +487,40 @@ const nt = /* @__PURE__ */ he({
|
|
|
488
487
|
const r = b(() => {
|
|
489
488
|
var e;
|
|
490
489
|
return [
|
|
491
|
-
(e =
|
|
492
|
-
...
|
|
490
|
+
(e = D.value) == null ? void 0 : e.name,
|
|
491
|
+
...A.value.map((l) => l.schemaName)
|
|
493
492
|
];
|
|
494
493
|
});
|
|
495
494
|
function o(e) {
|
|
496
|
-
var
|
|
497
|
-
const l =
|
|
498
|
-
if (!l || !
|
|
499
|
-
const
|
|
500
|
-
(
|
|
501
|
-
),
|
|
502
|
-
if (
|
|
495
|
+
var H;
|
|
496
|
+
const l = L.tiles.find((j) => j.id === e.value);
|
|
497
|
+
if (!l || !D.value || !F.value) return null;
|
|
498
|
+
const c = (H = l == null ? void 0 : l.widget) == null ? void 0 : H.config, g = (c == null ? void 0 : c.schemaNames) ?? [], h = ((c == null ? void 0 : c.joinDatasources) ?? []).flatMap(
|
|
499
|
+
(j) => j.schemaNames ?? []
|
|
500
|
+
), $ = [...g, ...h], C = r.value.filter((j) => !!j).some((j) => !$.includes(j)), R = F.value.type === oe.Timestamp || ie.value && ae.value;
|
|
501
|
+
if (C)
|
|
503
502
|
return v(
|
|
504
|
-
|
|
503
|
+
R ? "report.section.filter.missingFilterSchema" : "report.section.filter.missingFilterSchemaOrDimension"
|
|
505
504
|
);
|
|
506
|
-
if (
|
|
507
|
-
const u = ((
|
|
508
|
-
schemaName:
|
|
509
|
-
name:
|
|
510
|
-
})), s = ((
|
|
511
|
-
(
|
|
505
|
+
if (R) return null;
|
|
506
|
+
const u = ((c == null ? void 0 : c.dimensions) ?? []).map((j) => ({
|
|
507
|
+
schemaName: j.schemaName,
|
|
508
|
+
name: j.name
|
|
509
|
+
})), s = ((c == null ? void 0 : c.joinDatasources) ?? []).flatMap(
|
|
510
|
+
(j) => (j.dimensions ?? []).map((Ke) => ({
|
|
512
511
|
schemaName: Ke.schemaName,
|
|
513
512
|
name: Ke.name
|
|
514
513
|
}))
|
|
515
|
-
), i = [...u, ...s], I =
|
|
514
|
+
), i = [...u, ...s], I = D.value.name, _ = F.value.name;
|
|
516
515
|
return i.some(
|
|
517
|
-
(
|
|
516
|
+
(j) => j.schemaName === I && j.name === _
|
|
518
517
|
) ? null : v("report.section.filter.missingFilterSchemaOrDimension");
|
|
519
518
|
}
|
|
520
519
|
return (e, l) => {
|
|
521
|
-
const
|
|
522
|
-
return
|
|
520
|
+
const c = T("FmTextField"), g = T("FmSelect"), h = T("FmCheckbox"), $ = T("FmTimePicker"), C = T("FmButton"), W = T("FmLabel"), R = T("FmIcon"), u = T("FmTooltip"), s = T("FmForm"), i = T("FmDialog");
|
|
521
|
+
return p(), k(i, {
|
|
523
522
|
modelValue: n.value,
|
|
524
|
-
"onUpdate:modelValue": l[
|
|
523
|
+
"onUpdate:modelValue": l[9] || (l[9] = (I) => n.value = I),
|
|
525
524
|
overlay: !0,
|
|
526
525
|
"z-index": 10
|
|
527
526
|
}, {
|
|
@@ -536,130 +535,127 @@ const nt = /* @__PURE__ */ he({
|
|
|
536
535
|
default: V(() => {
|
|
537
536
|
var I;
|
|
538
537
|
return [
|
|
539
|
-
d(
|
|
540
|
-
modelValue:
|
|
541
|
-
"onUpdate:modelValue": l[0] || (l[0] = (
|
|
538
|
+
d(c, {
|
|
539
|
+
modelValue: X.value,
|
|
540
|
+
"onUpdate:modelValue": l[0] || (l[0] = (_) => X.value = _),
|
|
542
541
|
placeholder: t(v)("report.section.filter.displayName"),
|
|
543
542
|
label: t(v)("report.section.filter.displayName"),
|
|
544
543
|
class: "mb-2"
|
|
545
544
|
}, null, 8, ["modelValue", "placeholder", "label"]),
|
|
546
545
|
d(al, {
|
|
547
|
-
"model-value":
|
|
548
|
-
items:
|
|
546
|
+
"model-value": D.value,
|
|
547
|
+
items: Oe.value,
|
|
549
548
|
placeholder: t(v)("report.section.schema.title"),
|
|
550
549
|
label: t(v)("report.section.schema.title"),
|
|
551
|
-
"onUpdate:modelValue": l[1] || (l[1] = (
|
|
550
|
+
"onUpdate:modelValue": l[1] || (l[1] = (_) => Fe(_))
|
|
552
551
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
553
552
|
d(al, {
|
|
554
553
|
"model-value": F.value,
|
|
555
|
-
items:
|
|
554
|
+
items: Ie.value,
|
|
556
555
|
placeholder: t(v)("report.section.dimension.title"),
|
|
557
556
|
label: t(v)("report.section.dimension.title"),
|
|
558
|
-
"onUpdate:modelValue": l[2] || (l[2] = (
|
|
557
|
+
"onUpdate:modelValue": l[2] || (l[2] = (_) => Ve(_))
|
|
559
558
|
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
560
|
-
((I = F.value) == null ? void 0 : I.type) === t(
|
|
559
|
+
((I = F.value) == null ? void 0 : I.type) === t(oe).Timestamp ? (p(), k(g, {
|
|
561
560
|
key: 0,
|
|
562
561
|
modelValue: N.value,
|
|
563
|
-
"onUpdate:modelValue": l[3] || (l[3] = (
|
|
564
|
-
items:
|
|
562
|
+
"onUpdate:modelValue": l[3] || (l[3] = (_) => N.value = _),
|
|
563
|
+
items: Re.value,
|
|
565
564
|
placeholder: t(v)("report.section.filter.timeFormatter"),
|
|
566
565
|
label: t(v)("report.section.filter.timeFormatter")
|
|
567
566
|
}, null, 8, ["modelValue", "items", "placeholder", "label"])) : U("", !0),
|
|
568
|
-
|
|
567
|
+
ne.value ? (p(), k(h, {
|
|
569
568
|
key: 1,
|
|
570
569
|
modelValue: a.value,
|
|
571
|
-
"onUpdate:modelValue": l[4] || (l[4] = (
|
|
570
|
+
"onUpdate:modelValue": l[4] || (l[4] = (_) => a.value = _),
|
|
572
571
|
label: t(v)("report.section.filter.customOptions"),
|
|
573
572
|
value: !0
|
|
574
573
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
key: `custom-time-range-${
|
|
574
|
+
ne.value && a.value ? (p(), z("div", dt, [
|
|
575
|
+
ee.value ? (p(!0), z(ke, { key: 0 }, Le(S.value, (_, Y) => (p(), z("div", {
|
|
576
|
+
key: `custom-time-range-${Y}`,
|
|
578
577
|
class: "flex flex-col gap-2"
|
|
579
578
|
}, [
|
|
580
579
|
f("div", mt, [
|
|
581
|
-
d(
|
|
582
|
-
modelValue:
|
|
583
|
-
"onUpdate:modelValue": (
|
|
580
|
+
d(c, {
|
|
581
|
+
modelValue: _.name,
|
|
582
|
+
"onUpdate:modelValue": (H) => _.name = H,
|
|
584
583
|
label: t(v)("report.section.filter.label")
|
|
585
584
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "label"]),
|
|
586
|
-
d(
|
|
587
|
-
"model-value":
|
|
585
|
+
d($, {
|
|
586
|
+
"model-value": se(_.startTime),
|
|
588
587
|
label: t(v)("report.date.startingTime"),
|
|
589
|
-
"onUpdate:modelValue": (
|
|
588
|
+
"onUpdate:modelValue": (H) => De(Y, "startTime", H)
|
|
590
589
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
591
|
-
d(
|
|
592
|
-
"model-value":
|
|
590
|
+
d($, {
|
|
591
|
+
"model-value": se(_.endTime),
|
|
593
592
|
label: t(v)("report.date.endingTime"),
|
|
594
|
-
"onUpdate:modelValue": (
|
|
593
|
+
"onUpdate:modelValue": (H) => De(Y, "endTime", H)
|
|
595
594
|
}, null, 8, ["model-value", "label", "onUpdate:modelValue"]),
|
|
596
|
-
|
|
597
|
-
d(
|
|
595
|
+
S.value.length > 1 ? (p(), z("div", ct, [
|
|
596
|
+
d(C, {
|
|
598
597
|
icon: "delete",
|
|
599
598
|
variant: "tertiary",
|
|
600
|
-
onClick: (
|
|
599
|
+
onClick: (H) => Me(Y)
|
|
601
600
|
}, null, 8, ["onClick"])
|
|
602
601
|
])) : U("", !0)
|
|
603
602
|
])
|
|
604
|
-
]))), 128)) : (
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
items:
|
|
610
|
-
placeholder: t(v)("report.section.filter.operator"),
|
|
611
|
-
"onUpdate:modelValue": l[5] || (l[5] = (h) => we(h))
|
|
612
|
-
}, null, 8, ["model-value", "items", "placeholder"])) : U("", !0),
|
|
613
|
-
(c(!0), R(ye, null, Le(D.value, (h, ee) => (c(), R("div", {
|
|
614
|
-
key: `custom-option-${ee}`,
|
|
615
|
-
class: "flex flex-col gap-2"
|
|
603
|
+
]))), 128)) : (p(!0), z(ke, { key: 1 }, Le(O.value, (_, Y) => (p(), z("div", {
|
|
604
|
+
key: `custom-option-${Y}`,
|
|
605
|
+
class: "flex flex-col gap-2"
|
|
606
|
+
}, [
|
|
607
|
+
f("div", {
|
|
608
|
+
class: Ae(["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]"])
|
|
616
609
|
}, [
|
|
617
|
-
f("
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
610
|
+
f("span", pt, B(t(v)("report.section.filter.label")), 1),
|
|
611
|
+
d(c, {
|
|
612
|
+
modelValue: _.label,
|
|
613
|
+
"onUpdate:modelValue": (H) => _.label = H
|
|
614
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]),
|
|
615
|
+
re.value.length > 0 ? (p(), k(al, {
|
|
616
|
+
key: 0,
|
|
617
|
+
"model-value": _.operator,
|
|
618
|
+
items: re.value,
|
|
619
|
+
placeholder: t(v)("report.section.filter.operator"),
|
|
620
|
+
"onUpdate:modelValue": (H) => Se(Y, H)
|
|
621
|
+
}, null, 8, ["model-value", "items", "placeholder", "onUpdate:modelValue"])) : U("", !0),
|
|
622
|
+
(p(), k(Nl, {
|
|
623
|
+
key: `custom-option-value-${Y}-${_.operator ?? ""}-${N.value ?? ""}`,
|
|
624
|
+
modelValue: _.values,
|
|
625
|
+
"onUpdate:modelValue": (H) => _.values = H,
|
|
626
|
+
config: ue(_.operator),
|
|
627
|
+
option: N.value
|
|
628
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "config", "option"])),
|
|
629
|
+
O.value.length > 1 ? (p(), z("div", vt, [
|
|
630
|
+
d(C, {
|
|
631
|
+
icon: "delete",
|
|
632
|
+
variant: "tertiary",
|
|
633
|
+
onClick: (H) => le(Y)
|
|
634
|
+
}, null, 8, ["onClick"])
|
|
635
|
+
])) : U("", !0)
|
|
636
|
+
])
|
|
637
|
+
]))), 128)),
|
|
638
|
+
d(C, {
|
|
643
639
|
class: "w-full",
|
|
644
640
|
variant: "primary",
|
|
645
641
|
icon: "add",
|
|
646
642
|
"icon-position": "prepend",
|
|
647
|
-
onClick: l[
|
|
643
|
+
onClick: l[5] || (l[5] = (_) => ee.value ? $e() : K())
|
|
648
644
|
})
|
|
649
645
|
])) : U("", !0),
|
|
650
646
|
d(Bl, {
|
|
651
|
-
modelValue:
|
|
652
|
-
"onUpdate:modelValue": l[
|
|
653
|
-
options:
|
|
647
|
+
modelValue: A.value,
|
|
648
|
+
"onUpdate:modelValue": l[6] || (l[6] = (_) => A.value = _),
|
|
649
|
+
options: _e.value
|
|
654
650
|
}, null, 8, ["modelValue", "options"]),
|
|
655
|
-
|
|
656
|
-
d(
|
|
657
|
-
modelValue:
|
|
658
|
-
"onUpdate:modelValue": l[
|
|
651
|
+
ie.value ? (p(), z("div", ft, [
|
|
652
|
+
d(h, {
|
|
653
|
+
modelValue: ae.value,
|
|
654
|
+
"onUpdate:modelValue": l[7] || (l[7] = (_) => ae.value = _),
|
|
659
655
|
label: t(v)("reportV5.globalFilter.beforeAggregation"),
|
|
660
656
|
value: !0
|
|
661
657
|
}, null, 8, ["modelValue", "label"]),
|
|
662
|
-
f("p",
|
|
658
|
+
f("p", gt, B(t(v)("reportV5.globalFilter.beforeAggregationHint")), 1)
|
|
663
659
|
])) : U("", !0),
|
|
664
660
|
d(W, { class: "mt-2 fm-typo-en-body-lg-600" }, {
|
|
665
661
|
default: V(() => [
|
|
@@ -667,25 +663,25 @@ const nt = /* @__PURE__ */ he({
|
|
|
667
663
|
]),
|
|
668
664
|
_: 1
|
|
669
665
|
}),
|
|
670
|
-
|
|
671
|
-
(
|
|
672
|
-
key:
|
|
666
|
+
P.tiles.length > 0 ? (p(), z("div", bt, [
|
|
667
|
+
(p(!0), z(ke, null, Le(be.value, (_) => (p(), z("div", {
|
|
668
|
+
key: _.value,
|
|
673
669
|
class: "flex items-center"
|
|
674
670
|
}, [
|
|
675
|
-
d(
|
|
676
|
-
modelValue:
|
|
677
|
-
"onUpdate:modelValue": l[
|
|
678
|
-
label:
|
|
679
|
-
value:
|
|
671
|
+
d(h, {
|
|
672
|
+
modelValue: Z.value,
|
|
673
|
+
"onUpdate:modelValue": l[8] || (l[8] = (Y) => Z.value = Y),
|
|
674
|
+
label: _.label,
|
|
675
|
+
value: _.value
|
|
680
676
|
}, null, 8, ["modelValue", "label", "value"]),
|
|
681
|
-
o(
|
|
677
|
+
o(_) ? (p(), k(u, {
|
|
682
678
|
key: 0,
|
|
683
|
-
content: o(
|
|
679
|
+
content: o(_) ?? void 0,
|
|
684
680
|
"z-index": 99,
|
|
685
681
|
class: "ml-2"
|
|
686
682
|
}, {
|
|
687
683
|
default: V(() => [
|
|
688
|
-
d(
|
|
684
|
+
d(R, {
|
|
689
685
|
name: "warning",
|
|
690
686
|
class: "text-fm-color-system-error-300"
|
|
691
687
|
})
|
|
@@ -693,7 +689,7 @@ const nt = /* @__PURE__ */ he({
|
|
|
693
689
|
_: 2
|
|
694
690
|
}, 1032, ["content"])) : U("", !0)
|
|
695
691
|
]))), 128))
|
|
696
|
-
])) : (
|
|
692
|
+
])) : (p(), k(W, {
|
|
697
693
|
key: 5,
|
|
698
694
|
class: "fm-typo-en-body-lg-400",
|
|
699
695
|
label: t(v)("report.section.filter.noWidget")
|
|
@@ -704,13 +700,13 @@ const nt = /* @__PURE__ */ he({
|
|
|
704
700
|
}, 512)
|
|
705
701
|
]),
|
|
706
702
|
"dialog-footer": V(() => [
|
|
707
|
-
l[
|
|
708
|
-
d(
|
|
703
|
+
l[10] || (l[10] = f("div", { class: "grow" }, null, -1)),
|
|
704
|
+
d(C, {
|
|
709
705
|
label: t(v)("report.common.cancel"),
|
|
710
706
|
variant: "tertiary",
|
|
711
707
|
onClick: He
|
|
712
708
|
}, null, 8, ["label"]),
|
|
713
|
-
d(
|
|
709
|
+
d(C, {
|
|
714
710
|
label: t(v)("report.common.confirm"),
|
|
715
711
|
onClick: We
|
|
716
712
|
}, null, 8, ["label"])
|
|
@@ -719,14 +715,14 @@ const nt = /* @__PURE__ */ he({
|
|
|
719
715
|
}, 8, ["modelValue"]);
|
|
720
716
|
};
|
|
721
717
|
}
|
|
722
|
-
}),
|
|
718
|
+
}), ht = 8.4375, wt = 1024 ** 4, _t = {
|
|
723
719
|
MY: { rate: 4, currency: "MYR", symbol: "RM" },
|
|
724
720
|
TH: { rate: 33, currency: "THB", symbol: "฿" },
|
|
725
721
|
SG: { rate: 1.29, currency: "SGD", symbol: "S$" },
|
|
726
722
|
ID: { rate: 17900, currency: "IDR", symbol: "Rp" }
|
|
727
|
-
},
|
|
728
|
-
function vl(
|
|
729
|
-
const m =
|
|
723
|
+
}, Ft = { rate: 1, currency: "USD", symbol: "$" };
|
|
724
|
+
function vl(P, v) {
|
|
725
|
+
const m = P / wt * ht, { rate: y, currency: n, symbol: w } = _t[v] ?? Ft;
|
|
730
726
|
return {
|
|
731
727
|
amount: m * y,
|
|
732
728
|
currency: n,
|
|
@@ -734,144 +730,144 @@ function vl(q, v) {
|
|
|
734
730
|
costUsd: m
|
|
735
731
|
};
|
|
736
732
|
}
|
|
737
|
-
function fl(
|
|
738
|
-
return
|
|
733
|
+
function fl(P, v) {
|
|
734
|
+
return P < 0.01 ? `< ${v}0.01` : `${v}${P.toFixed(2)}`;
|
|
739
735
|
}
|
|
740
|
-
const
|
|
736
|
+
const Vt = { class: "flex flex-col gap-16" }, xt = {
|
|
741
737
|
key: 0,
|
|
742
738
|
class: "flex flex-col gap-8"
|
|
743
|
-
}, kt = { class: "flex items-center gap-4 pb-8 border-b border-neutral-300" },
|
|
739
|
+
}, kt = { class: "flex items-center gap-4 pb-8 border-b border-neutral-300" }, Ct = ["title"], Tt = { class: "fm-typo-en-title-sm-600 pt-8" }, St = { class: "mx-16 flex flex-col gap-12 py-4" }, $t = { class: "fm-typo-en-body-lg-600" }, Dt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Ot = { class: "flex flex-col gap-12 border-t border-neutral-200 pt-12" }, It = { class: "fm-typo-en-body-lg-600" }, Ut = { class: "grid grid-cols-2 items-end gap-12" }, Nt = { class: "flex flex-col gap-8 min-w-0" }, Bt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, Mt = { class: "flex gap-8" }, Rt = { class: "grid grid-cols-2 items-end gap-12" }, zt = { class: "flex flex-col gap-8 min-w-0" }, Pt = { class: "fm-typo-en-body-sm-600 whitespace-nowrap" }, qt = { class: "flex gap-8" }, Et = {
|
|
744
740
|
key: 1,
|
|
745
741
|
class: "rounded-md border border-dashed border-neutral-300 p-12 text-center fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
|
|
746
|
-
},
|
|
742
|
+
}, Lt = ["onClick"], At = ["title"], Gt = {
|
|
747
743
|
key: 0,
|
|
748
744
|
class: "text-fm-color-typo-secondary"
|
|
749
|
-
},
|
|
745
|
+
}, Wt = { class: "text-fm-color-system-error-300" }, Ht = { class: "w-full text-left" }, jt = /* @__PURE__ */ ye({
|
|
750
746
|
__name: "TileDrillPanel",
|
|
751
747
|
props: {
|
|
752
748
|
report: {}
|
|
753
749
|
},
|
|
754
750
|
emits: ["add-widget"],
|
|
755
|
-
setup(
|
|
756
|
-
const m =
|
|
751
|
+
setup(P, { emit: v }) {
|
|
752
|
+
const m = P, y = v, { t: n, te: w } = Ge(), L = [
|
|
757
753
|
{ label: n("report.tile.widget.icon.small"), value: Ye.Small },
|
|
758
754
|
{ label: n("report.tile.widget.icon.medium"), value: Ye.Medium },
|
|
759
755
|
{ label: n("report.tile.widget.icon.large"), value: Ye.Large },
|
|
760
756
|
{ label: n("report.tile.widget.icon.extraLarge"), value: Ye.ExtraLarge }
|
|
761
|
-
],
|
|
762
|
-
{ label: n("report.tile.widget.icon.material"), value:
|
|
763
|
-
{ label: n("report.tile.widget.icon.customSvg"), value:
|
|
764
|
-
],
|
|
757
|
+
], X = [
|
|
758
|
+
{ label: n("report.tile.widget.icon.material"), value: Be.Material },
|
|
759
|
+
{ label: n("report.tile.widget.icon.customSvg"), value: Be.Custom }
|
|
760
|
+
], D = ul(), F = dl(), { promptMessage: N } = ml(), Z = sl(), A = b(() => {
|
|
765
761
|
const r = [];
|
|
766
762
|
let o = m.report.tiles;
|
|
767
|
-
for (const e of
|
|
768
|
-
const l = o.find((
|
|
763
|
+
for (const e of Ne.value) {
|
|
764
|
+
const l = o.find((c) => c.id === e);
|
|
769
765
|
if (!l) break;
|
|
770
766
|
r.push(l), o = l.tiles ?? [];
|
|
771
767
|
}
|
|
772
768
|
return r;
|
|
773
769
|
});
|
|
774
|
-
ge(
|
|
775
|
-
r.length !==
|
|
770
|
+
ge(A, (r) => {
|
|
771
|
+
r.length !== Ne.value.length && (Ne.value = r.map((o) => o.id));
|
|
776
772
|
});
|
|
777
|
-
const a = b(() =>
|
|
773
|
+
const a = b(() => A.value[A.value.length - 1] ?? null), O = b(() => A.value[A.value.length - 2] ?? null), S = b(
|
|
778
774
|
() => a.value ? a.value.tiles ?? [] : m.report.tiles
|
|
779
|
-
),
|
|
775
|
+
), ae = b(() => {
|
|
780
776
|
var r;
|
|
781
777
|
return ((r = a.value) == null ? void 0 : r.id) ?? null;
|
|
782
|
-
}),
|
|
783
|
-
() =>
|
|
784
|
-
),
|
|
785
|
-
() =>
|
|
778
|
+
}), ie = b(() => A.value.length === 0), de = b(() => a.value ? qe(a.value) : !1), J = b(
|
|
779
|
+
() => O.value ? qe(O.value) : !1
|
|
780
|
+
), se = b(() => a.value ? fe(a.value) : !1), x = b(
|
|
781
|
+
() => A.value.reduce(
|
|
786
782
|
(r, o) => qe(o) ? r : fe(o) ? 1 : r + 1,
|
|
787
783
|
1
|
|
788
784
|
)
|
|
789
|
-
),
|
|
790
|
-
function
|
|
791
|
-
r.widget && !fe(r) || (
|
|
785
|
+
), ne = b(() => !de.value && x.value < Fl), ee = b(() => ie.value);
|
|
786
|
+
function re(r) {
|
|
787
|
+
r.widget && !fe(r) || (Ne.value = [...Ne.value, r.id]);
|
|
792
788
|
}
|
|
793
|
-
function
|
|
794
|
-
|
|
789
|
+
function me() {
|
|
790
|
+
Ne.value = Ne.value.slice(0, -1);
|
|
795
791
|
}
|
|
796
|
-
function
|
|
792
|
+
function ue(r) {
|
|
797
793
|
if (!r) return "";
|
|
798
794
|
const o = `report.widget.types.${r.toLowerCase()}`;
|
|
799
795
|
return w(o) ? n(o) : Qe(n, w, r, "other");
|
|
800
796
|
}
|
|
801
|
-
function
|
|
797
|
+
function ve(r, o) {
|
|
802
798
|
if (r.widget) {
|
|
803
|
-
const e = r.widget.title ?
|
|
799
|
+
const e = r.widget.title ? ue(r.widget.title) : n("report.editor.widget", { index: o + 1 });
|
|
804
800
|
return fe(r) ? `${e} · ${n("report.editor.page")}` : e;
|
|
805
801
|
}
|
|
806
802
|
return r.tabTitle !== void 0 ? r.tabTitle || n("report.editor.tab", { index: o + 1 }) : r.title ? r.title : qe(r) ? n("report.editor.tabGroup") : n("report.editor.group");
|
|
807
803
|
}
|
|
808
|
-
function
|
|
809
|
-
return !r.widget &&
|
|
804
|
+
function ce(r, o) {
|
|
805
|
+
return !r.widget && de.value ? r.tabTitle || n("report.editor.tab", { index: o + 1 }) : ve(r, o);
|
|
810
806
|
}
|
|
811
|
-
function
|
|
807
|
+
function q(r) {
|
|
812
808
|
var o;
|
|
813
809
|
return ((o = r.tiles) == null ? void 0 : o.length) ?? 0;
|
|
814
810
|
}
|
|
815
|
-
const
|
|
816
|
-
() =>
|
|
811
|
+
const E = b(
|
|
812
|
+
() => A.value.map((r, o) => ve(r, o)).join(" › ")
|
|
817
813
|
);
|
|
818
|
-
function
|
|
819
|
-
_l.value =
|
|
814
|
+
function Q(r, o) {
|
|
815
|
+
_l.value = ae.value, Z.editingTileIndex = o, Z.editingTile = JSON.parse(JSON.stringify(r)), D.push({ name: "tileEditor", query: F.query });
|
|
820
816
|
}
|
|
821
|
-
function
|
|
822
|
-
|
|
817
|
+
function pe(r, o) {
|
|
818
|
+
S.value.splice(o + 1, 0, zl(r));
|
|
823
819
|
}
|
|
824
|
-
async function
|
|
825
|
-
var
|
|
820
|
+
async function Se(r, o) {
|
|
821
|
+
var c;
|
|
826
822
|
if (!await N({
|
|
827
823
|
title: n("report.editor.deleteWidget"),
|
|
828
|
-
message: n("report.editor.deleteWidgetConfirm", { title:
|
|
824
|
+
message: n("report.editor.deleteWidgetConfirm", { title: ce(r, o) })
|
|
829
825
|
})) return;
|
|
830
826
|
const l = ll(r);
|
|
831
|
-
|
|
832
|
-
var
|
|
833
|
-
g.tileIds = (
|
|
827
|
+
S.value.splice(o, 1), (c = m.report.globalFilters) == null || c.forEach((g) => {
|
|
828
|
+
var h;
|
|
829
|
+
g.tileIds = (h = g.tileIds) == null ? void 0 : h.filter(($) => !l.includes($));
|
|
834
830
|
});
|
|
835
831
|
}
|
|
836
|
-
function
|
|
832
|
+
function K() {
|
|
837
833
|
a.value && (a.value.tiles || (a.value.tiles = []), a.value.tiles.push(Pl(a.value.tiles.length + 1)));
|
|
838
834
|
}
|
|
839
|
-
function
|
|
835
|
+
function le(r) {
|
|
840
836
|
ql(r);
|
|
841
837
|
}
|
|
842
|
-
async function
|
|
843
|
-
var
|
|
838
|
+
async function $e(r, o) {
|
|
839
|
+
var c;
|
|
844
840
|
if (!await N({
|
|
845
841
|
title: n("report.editor.removePage"),
|
|
846
|
-
message: n("report.editor.removePageConfirm", { title:
|
|
842
|
+
message: n("report.editor.removePageConfirm", { title: ce(r, o) })
|
|
847
843
|
})) return;
|
|
848
844
|
const l = ll(r).filter((g) => g !== r.id);
|
|
849
|
-
(
|
|
850
|
-
var
|
|
851
|
-
g.tileIds = (
|
|
845
|
+
(c = m.report.globalFilters) == null || c.forEach((g) => {
|
|
846
|
+
var h;
|
|
847
|
+
g.tileIds = (h = g.tileIds) == null ? void 0 : h.filter(($) => !l.includes($));
|
|
852
848
|
}), El(r);
|
|
853
849
|
}
|
|
854
|
-
function
|
|
855
|
-
|
|
850
|
+
function Me() {
|
|
851
|
+
S.value.push(Ll());
|
|
856
852
|
}
|
|
857
853
|
function De() {
|
|
858
|
-
|
|
854
|
+
S.value.push(Al());
|
|
859
855
|
}
|
|
860
|
-
function
|
|
856
|
+
function he(r) {
|
|
861
857
|
var e;
|
|
862
858
|
const o = Number((e = r.size) == null ? void 0 : e.width);
|
|
863
859
|
r.size || (r.size = { width: 12, height: 12 }), !Number.isFinite(o) || o < 1 ? r.size.width = 1 : o > 12 && (r.size.width = 12);
|
|
864
860
|
}
|
|
865
|
-
function
|
|
861
|
+
function we(r) {
|
|
866
862
|
var e;
|
|
867
863
|
const o = Number((e = r.size) == null ? void 0 : e.height);
|
|
868
864
|
r.size || (r.size = { width: 12, height: 12 }), !Number.isFinite(o) || o < 1 ? r.size.height = 1 : o > 12 && (r.size.height = 12);
|
|
869
865
|
}
|
|
870
|
-
function
|
|
866
|
+
function Oe(r, o) {
|
|
871
867
|
const e = Number(r[o]);
|
|
872
868
|
!Number.isFinite(e) || e < 1 ? r[o] = 1 : e > 24 && (r[o] = 24);
|
|
873
869
|
}
|
|
874
|
-
const
|
|
870
|
+
const Ie = b({
|
|
875
871
|
get: () => {
|
|
876
872
|
var r;
|
|
877
873
|
return ((r = a.value) == null ? void 0 : r.titleFontSize) ?? 16;
|
|
@@ -879,7 +875,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
879
875
|
set: (r) => {
|
|
880
876
|
a.value && (a.value.titleFontSize = r ?? void 0);
|
|
881
877
|
}
|
|
882
|
-
}),
|
|
878
|
+
}), Re = b({
|
|
883
879
|
get: () => {
|
|
884
880
|
var r;
|
|
885
881
|
return ((r = a.value) == null ? void 0 : r.descriptionFontSize) ?? 14;
|
|
@@ -890,129 +886,129 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
890
886
|
}), be = b({
|
|
891
887
|
get: () => {
|
|
892
888
|
var r, o, e;
|
|
893
|
-
return ((r = a.value) == null ? void 0 : r.tabIconType) ?? ((e = (o = a.value) == null ? void 0 : o.tabIcon) != null && e.trim().startsWith("<svg") ?
|
|
889
|
+
return ((r = a.value) == null ? void 0 : r.tabIconType) ?? ((e = (o = a.value) == null ? void 0 : o.tabIcon) != null && e.trim().startsWith("<svg") ? Be.Custom : Be.Material);
|
|
894
890
|
},
|
|
895
891
|
set: (r) => {
|
|
896
892
|
a.value && (a.value.tabIconType = r);
|
|
897
893
|
}
|
|
898
|
-
}),
|
|
894
|
+
}), _e = b({
|
|
899
895
|
get: () => {
|
|
900
896
|
var r, o;
|
|
901
|
-
return be.value ===
|
|
897
|
+
return be.value === Be.Custom ? Yl(((r = a.value) == null ? void 0 : r.tabIcon) ?? "") : ((o = a.value) == null ? void 0 : o.tabIcon) ?? "";
|
|
902
898
|
},
|
|
903
899
|
set: (r) => {
|
|
904
|
-
a.value && (a.value.tabIcon = be.value ===
|
|
900
|
+
a.value && (a.value.tabIcon = be.value === Be.Custom ? Xl(r) : r.trim());
|
|
905
901
|
}
|
|
906
|
-
}),
|
|
907
|
-
function
|
|
902
|
+
}), Fe = G(!1), Ve = G(null), te = G([]);
|
|
903
|
+
function Ue(r) {
|
|
908
904
|
const o = [
|
|
909
905
|
{ parentId: null, label: n("report.editor.topLevel"), level: 1 }
|
|
910
|
-
], e = (
|
|
911
|
-
let
|
|
912
|
-
|
|
906
|
+
], e = (c, g, h) => {
|
|
907
|
+
let $ = 0;
|
|
908
|
+
c.forEach((C) => {
|
|
913
909
|
var W;
|
|
914
|
-
if (
|
|
915
|
-
if (fe(
|
|
916
|
-
const
|
|
917
|
-
o.push({ parentId:
|
|
910
|
+
if (C.widget) {
|
|
911
|
+
if (fe(C)) {
|
|
912
|
+
const R = `${h}${C.tabTitle || ue(C.widget.title)} · ${n("report.editor.page")}`;
|
|
913
|
+
o.push({ parentId: C.id, label: R, level: 1 }), e(C.tiles ?? [], 1, `${R} › `);
|
|
918
914
|
}
|
|
919
915
|
return;
|
|
920
916
|
}
|
|
921
|
-
if (qe(
|
|
922
|
-
const
|
|
923
|
-
(W =
|
|
924
|
-
const i = `${
|
|
917
|
+
if (qe(C)) {
|
|
918
|
+
const R = `${h}${n("report.editor.tabGroup")}`;
|
|
919
|
+
(W = C.tiles) == null || W.forEach((u, s) => {
|
|
920
|
+
const i = `${R} › ${u.tabTitle || n("report.editor.tab", { index: s + 1 })}`;
|
|
925
921
|
o.push({ parentId: u.id, label: i, level: g + 1 }), e(u.tiles ?? [], g + 1, `${i} › `);
|
|
926
922
|
});
|
|
927
923
|
} else {
|
|
928
|
-
|
|
929
|
-
const
|
|
930
|
-
o.push({ parentId:
|
|
924
|
+
$ += 1;
|
|
925
|
+
const R = `${h}${C.title || `${n("report.editor.group")} ${$}`}`;
|
|
926
|
+
o.push({ parentId: C.id, label: R, level: g + 1 }), e(C.tiles ?? [], g + 1, `${R} › `);
|
|
931
927
|
}
|
|
932
928
|
});
|
|
933
929
|
};
|
|
934
930
|
e(m.report.tiles, 1, "");
|
|
935
931
|
const l = new Set(ll(r));
|
|
936
932
|
return o.filter(
|
|
937
|
-
(
|
|
933
|
+
(c) => c.parentId !== ae.value && !(c.parentId && l.has(c.parentId)) && Wl(r, c.level)
|
|
938
934
|
);
|
|
939
935
|
}
|
|
940
936
|
function We(r) {
|
|
941
|
-
|
|
937
|
+
Ve.value = r, te.value = Ue(r), Fe.value = !0;
|
|
942
938
|
}
|
|
943
939
|
function He(r) {
|
|
944
|
-
const o =
|
|
940
|
+
const o = Ve.value;
|
|
945
941
|
if (!o) return;
|
|
946
|
-
const e =
|
|
947
|
-
e >= 0 &&
|
|
942
|
+
const e = S.value.indexOf(o);
|
|
943
|
+
e >= 0 && S.value.splice(e, 1), Gl(m.report.tiles, r.parentId).push(o), Fe.value = !1, Ve.value = null;
|
|
948
944
|
}
|
|
949
945
|
return (r, o) => {
|
|
950
|
-
const e =
|
|
951
|
-
return
|
|
952
|
-
|
|
946
|
+
const e = T("FmButton"), l = T("FmTextField"), c = T("FmSelect"), g = T("FmTextarea"), h = T("FmStepperField"), $ = T("FmIcon"), C = T("FmMenuItem"), W = T("FmMenu"), R = T("FmList"), u = T("FmListItem"), s = T("FmDialog");
|
|
947
|
+
return p(), z("div", Vt, [
|
|
948
|
+
ie.value ? U("", !0) : (p(), z("div", xt, [
|
|
953
949
|
f("div", kt, [
|
|
954
950
|
d(e, {
|
|
955
951
|
icon: "arrow_back",
|
|
956
952
|
variant: "tertiary",
|
|
957
953
|
class: "-ml-8",
|
|
958
|
-
onClick:
|
|
954
|
+
onClick: me
|
|
959
955
|
}),
|
|
960
956
|
f("p", {
|
|
961
957
|
class: "fm-typo-en-body-md-600 line-clamp-1 overflow-hidden break-all min-w-0 grow text-left",
|
|
962
|
-
title:
|
|
963
|
-
}, B(
|
|
958
|
+
title: E.value
|
|
959
|
+
}, B(E.value), 9, Ct)
|
|
964
960
|
]),
|
|
965
|
-
|
|
961
|
+
se.value && a.value ? (p(), k(l, {
|
|
966
962
|
key: 0,
|
|
967
963
|
modelValue: a.value.tabTitle,
|
|
968
964
|
"onUpdate:modelValue": o[0] || (o[0] = (i) => a.value.tabTitle = i),
|
|
969
965
|
label: t(n)("report.editor.pageName"),
|
|
970
966
|
placeholder: t(n)("report.editor.pageName")
|
|
971
967
|
}, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
|
|
972
|
-
|
|
968
|
+
J.value && a.value ? (p(), k(l, {
|
|
973
969
|
key: 1,
|
|
974
970
|
modelValue: a.value.tabTitle,
|
|
975
971
|
"onUpdate:modelValue": o[1] || (o[1] = (i) => a.value.tabTitle = i),
|
|
976
972
|
label: t(n)("report.editor.tabName"),
|
|
977
973
|
placeholder: t(n)("report.editor.tabName")
|
|
978
974
|
}, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
|
|
979
|
-
|
|
975
|
+
J.value && a.value ? (p(), k(c, {
|
|
980
976
|
key: 2,
|
|
981
977
|
modelValue: be.value,
|
|
982
978
|
"onUpdate:modelValue": o[2] || (o[2] = (i) => be.value = i),
|
|
983
979
|
label: t(n)("report.tile.widget.icon.type"),
|
|
984
|
-
items:
|
|
980
|
+
items: X
|
|
985
981
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
986
|
-
|
|
982
|
+
J.value && a.value && be.value === t(Be).Material ? (p(), k(l, {
|
|
987
983
|
key: 3,
|
|
988
|
-
modelValue:
|
|
989
|
-
"onUpdate:modelValue": o[3] || (o[3] = (i) =>
|
|
984
|
+
modelValue: _e.value,
|
|
985
|
+
"onUpdate:modelValue": o[3] || (o[3] = (i) => _e.value = i),
|
|
990
986
|
label: t(n)("report.tile.widget.icon.materialName"),
|
|
991
987
|
placeholder: t(n)("report.tile.widget.icon.materialPlaceholder")
|
|
992
|
-
}, null, 8, ["modelValue", "label", "placeholder"])) :
|
|
988
|
+
}, null, 8, ["modelValue", "label", "placeholder"])) : J.value && a.value ? (p(), k(g, {
|
|
993
989
|
key: 4,
|
|
994
|
-
modelValue:
|
|
995
|
-
"onUpdate:modelValue": o[4] || (o[4] = (i) =>
|
|
990
|
+
modelValue: _e.value,
|
|
991
|
+
"onUpdate:modelValue": o[4] || (o[4] = (i) => _e.value = i),
|
|
996
992
|
label: t(n)("report.tile.widget.icon.customSvg"),
|
|
997
993
|
placeholder: t(n)("report.tile.widget.icon.customPlaceholder")
|
|
998
994
|
}, null, 8, ["modelValue", "label", "placeholder"])) : U("", !0),
|
|
999
|
-
|
|
995
|
+
J.value && a.value ? (p(), k(c, {
|
|
1000
996
|
key: 5,
|
|
1001
997
|
modelValue: a.value.tabIconSize,
|
|
1002
998
|
"onUpdate:modelValue": o[5] || (o[5] = (i) => a.value.tabIconSize = i),
|
|
1003
999
|
label: t(n)("report.tile.widget.icon.size"),
|
|
1004
|
-
items:
|
|
1000
|
+
items: L
|
|
1005
1001
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1006
|
-
!
|
|
1002
|
+
!J.value && !se.value && a.value ? (p(), k(je, {
|
|
1007
1003
|
key: 6,
|
|
1008
1004
|
"is-open": !1
|
|
1009
1005
|
}, {
|
|
1010
1006
|
header: V(() => [
|
|
1011
|
-
f("p",
|
|
1007
|
+
f("p", Tt, B(t(n)("report.editor.groupDetails")), 1),
|
|
1012
1008
|
o[24] || (o[24] = f("div", { class: "grow" }, null, -1))
|
|
1013
1009
|
]),
|
|
1014
1010
|
content: V(() => [
|
|
1015
|
-
f("div",
|
|
1011
|
+
f("div", St, [
|
|
1016
1012
|
d(l, {
|
|
1017
1013
|
modelValue: a.value.title,
|
|
1018
1014
|
"onUpdate:modelValue": o[6] || (o[6] = (i) => a.value.title = i),
|
|
@@ -1025,28 +1021,28 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1025
1021
|
placeholder: t(n)("report.editor.groupDescriptionPlaceholder")
|
|
1026
1022
|
}, {
|
|
1027
1023
|
label: V(() => [
|
|
1028
|
-
f("p",
|
|
1024
|
+
f("p", $t, B(t(n)("report.editor.groupDescription")), 1),
|
|
1029
1025
|
f("p", Dt, " (" + B(t(n)("report.editor.optional")) + ") ", 1)
|
|
1030
1026
|
]),
|
|
1031
1027
|
_: 1
|
|
1032
1028
|
}, 8, ["modelValue", "placeholder"]),
|
|
1033
|
-
f("div",
|
|
1034
|
-
f("p",
|
|
1035
|
-
f("div",
|
|
1036
|
-
d(
|
|
1037
|
-
modelValue:
|
|
1038
|
-
"onUpdate:modelValue": o[8] || (o[8] = (i) =>
|
|
1029
|
+
f("div", Ot, [
|
|
1030
|
+
f("p", It, B(t(n)("report.editor.typography")), 1),
|
|
1031
|
+
f("div", Ut, [
|
|
1032
|
+
d(h, {
|
|
1033
|
+
modelValue: Ie.value,
|
|
1034
|
+
"onUpdate:modelValue": o[8] || (o[8] = (i) => Ie.value = i),
|
|
1039
1035
|
modelModifiers: { number: !0 },
|
|
1040
1036
|
class: "w-full",
|
|
1041
1037
|
label: t(n)("report.editor.titleSize"),
|
|
1042
1038
|
max: 24,
|
|
1043
1039
|
min: 1,
|
|
1044
1040
|
type: "number",
|
|
1045
|
-
onBlur: o[9] || (o[9] = (i) =>
|
|
1041
|
+
onBlur: o[9] || (o[9] = (i) => Oe(a.value, "titleFontSize"))
|
|
1046
1042
|
}, null, 8, ["modelValue", "label"]),
|
|
1047
|
-
f("div",
|
|
1048
|
-
f("p",
|
|
1049
|
-
f("div",
|
|
1043
|
+
f("div", Nt, [
|
|
1044
|
+
f("p", Bt, B(t(n)("report.editor.titleFormatting")), 1),
|
|
1045
|
+
f("div", Mt, [
|
|
1050
1046
|
d(e, {
|
|
1051
1047
|
"append-icon": "format_bold",
|
|
1052
1048
|
"model-value": a.value.titleBold ?? !0,
|
|
@@ -1080,21 +1076,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1080
1076
|
])
|
|
1081
1077
|
])
|
|
1082
1078
|
]),
|
|
1083
|
-
f("div",
|
|
1084
|
-
d(
|
|
1085
|
-
modelValue:
|
|
1086
|
-
"onUpdate:modelValue": o[13] || (o[13] = (i) =>
|
|
1079
|
+
f("div", Rt, [
|
|
1080
|
+
d(h, {
|
|
1081
|
+
modelValue: Re.value,
|
|
1082
|
+
"onUpdate:modelValue": o[13] || (o[13] = (i) => Re.value = i),
|
|
1087
1083
|
modelModifiers: { number: !0 },
|
|
1088
1084
|
class: "w-full",
|
|
1089
1085
|
label: t(n)("report.editor.descriptionSize"),
|
|
1090
1086
|
max: 24,
|
|
1091
1087
|
min: 1,
|
|
1092
1088
|
type: "number",
|
|
1093
|
-
onBlur: o[14] || (o[14] = (i) =>
|
|
1089
|
+
onBlur: o[14] || (o[14] = (i) => Oe(a.value, "descriptionFontSize"))
|
|
1094
1090
|
}, null, 8, ["modelValue", "label"]),
|
|
1095
|
-
f("div",
|
|
1096
|
-
f("p",
|
|
1097
|
-
f("div",
|
|
1091
|
+
f("div", zt, [
|
|
1092
|
+
f("p", Pt, B(t(n)("report.editor.descriptionFormatting")), 1),
|
|
1093
|
+
f("div", qt, [
|
|
1098
1094
|
d(e, {
|
|
1099
1095
|
"append-icon": "format_bold",
|
|
1100
1096
|
"model-value": a.value.descriptionBold ?? !1,
|
|
@@ -1133,29 +1129,29 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1133
1129
|
]),
|
|
1134
1130
|
_: 1
|
|
1135
1131
|
})) : U("", !0),
|
|
1136
|
-
!
|
|
1132
|
+
!J.value && a.value ? (p(), k(l, {
|
|
1137
1133
|
key: 7,
|
|
1138
1134
|
modelValue: a.value.size.width,
|
|
1139
1135
|
"onUpdate:modelValue": o[18] || (o[18] = (i) => a.value.size.width = i),
|
|
1140
1136
|
modelModifiers: { number: !0 },
|
|
1141
1137
|
type: "number",
|
|
1142
1138
|
label: t(n)("report.editor.width"),
|
|
1143
|
-
onBlur: o[19] || (o[19] = (i) =>
|
|
1139
|
+
onBlur: o[19] || (o[19] = (i) => he(a.value))
|
|
1144
1140
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1145
|
-
!
|
|
1141
|
+
!J.value && a.value ? (p(), k(l, {
|
|
1146
1142
|
key: 8,
|
|
1147
1143
|
modelValue: a.value.size.height,
|
|
1148
1144
|
"onUpdate:modelValue": o[20] || (o[20] = (i) => a.value.size.height = i),
|
|
1149
1145
|
modelModifiers: { number: !0 },
|
|
1150
1146
|
type: "number",
|
|
1151
1147
|
label: t(n)("report.editor.height"),
|
|
1152
|
-
onBlur: o[21] || (o[21] = (i) =>
|
|
1148
|
+
onBlur: o[21] || (o[21] = (i) => we(a.value))
|
|
1153
1149
|
}, null, 8, ["modelValue", "label"])) : U("", !0)
|
|
1154
1150
|
])),
|
|
1155
|
-
|
|
1151
|
+
S.value.length === 0 ? (p(), z("div", Et, B(t(n)("report.editor.emptyLevel")), 1)) : (p(), k(R, { key: 2 }, {
|
|
1156
1152
|
default: V(() => [
|
|
1157
1153
|
d(t(wl), {
|
|
1158
|
-
list:
|
|
1154
|
+
list: S.value,
|
|
1159
1155
|
"item-key": "id",
|
|
1160
1156
|
class: "flex flex-col gap-2 cursor-grab",
|
|
1161
1157
|
handle: ".handle"
|
|
@@ -1163,20 +1159,20 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1163
1159
|
item: V(({ element: i, index: I }) => [
|
|
1164
1160
|
f("div", {
|
|
1165
1161
|
class: Ae(["flex items-center gap-8 px-12 py-8 border rounded-md border-neutral-300 hover:bg-fm-color-opacity-sm", i.widget && !t(fe)(i) ? "cursor-grab" : "cursor-pointer"]),
|
|
1166
|
-
onClick: (
|
|
1162
|
+
onClick: (_) => re(i)
|
|
1167
1163
|
}, [
|
|
1168
|
-
d(
|
|
1164
|
+
d($, {
|
|
1169
1165
|
name: "drag_handle",
|
|
1170
1166
|
class: "handle shrink-0 !cursor-grab"
|
|
1171
1167
|
}),
|
|
1172
1168
|
f("p", {
|
|
1173
1169
|
class: "flex-1 min-w-0 truncate text-left fm-typo-en-body-lg-400",
|
|
1174
|
-
title:
|
|
1170
|
+
title: ce(i, I)
|
|
1175
1171
|
}, [
|
|
1176
|
-
Je(B(
|
|
1177
|
-
!i.widget || t(fe)(i) ? (
|
|
1178
|
-
], 8,
|
|
1179
|
-
!i.widget || t(fe)(i) ? (
|
|
1172
|
+
Je(B(ce(i, I)) + " ", 1),
|
|
1173
|
+
!i.widget || t(fe)(i) ? (p(), z("span", Gt, " · " + B(q(i)), 1)) : U("", !0)
|
|
1174
|
+
], 8, At),
|
|
1175
|
+
!i.widget || t(fe)(i) ? (p(), k($, {
|
|
1180
1176
|
key: 0,
|
|
1181
1177
|
name: "chevron_right",
|
|
1182
1178
|
class: "shrink-0"
|
|
@@ -1194,58 +1190,58 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1194
1190
|
})
|
|
1195
1191
|
]),
|
|
1196
1192
|
default: V(() => [
|
|
1197
|
-
i.widget ? (
|
|
1193
|
+
i.widget ? (p(), k(C, {
|
|
1198
1194
|
key: 0,
|
|
1199
1195
|
label: t(n)("report.common.edit"),
|
|
1200
|
-
onClick: (
|
|
1196
|
+
onClick: (_) => Q(i, I)
|
|
1201
1197
|
}, null, 8, ["label", "onClick"])) : U("", !0),
|
|
1202
|
-
i.widget && !t(fe)(i) ? (
|
|
1198
|
+
i.widget && !t(fe)(i) ? (p(), k(C, {
|
|
1203
1199
|
key: 1,
|
|
1204
1200
|
label: t(n)("report.editor.convertToPage"),
|
|
1205
|
-
onClick: (
|
|
1201
|
+
onClick: (_) => le(i)
|
|
1206
1202
|
}, null, 8, ["label", "onClick"])) : U("", !0),
|
|
1207
|
-
t(fe)(i) ? (
|
|
1203
|
+
t(fe)(i) ? (p(), k(C, {
|
|
1208
1204
|
key: 2,
|
|
1209
1205
|
label: t(n)("report.editor.removePage"),
|
|
1210
|
-
onClick: (
|
|
1206
|
+
onClick: (_) => $e(i, I)
|
|
1211
1207
|
}, null, 8, ["label", "onClick"])) : U("", !0),
|
|
1212
|
-
t(qe)(i) ? U("", !0) : (
|
|
1208
|
+
t(qe)(i) ? U("", !0) : (p(), k(C, {
|
|
1213
1209
|
key: 3,
|
|
1214
1210
|
label: t(n)("report.editor.moveTo"),
|
|
1215
|
-
onClick: (
|
|
1211
|
+
onClick: (_) => We(i)
|
|
1216
1212
|
}, null, 8, ["label", "onClick"])),
|
|
1217
|
-
d(
|
|
1213
|
+
d(C, {
|
|
1218
1214
|
label: t(n)("report.common.duplicate"),
|
|
1219
|
-
onClick: (
|
|
1215
|
+
onClick: (_) => pe(i, I)
|
|
1220
1216
|
}, null, 8, ["label", "onClick"]),
|
|
1221
|
-
d(
|
|
1222
|
-
onClick: (
|
|
1217
|
+
d(C, {
|
|
1218
|
+
onClick: (_) => Se(i, I)
|
|
1223
1219
|
}, {
|
|
1224
1220
|
label: V(() => [
|
|
1225
|
-
f("p",
|
|
1221
|
+
f("p", Wt, B(t(n)("report.common.remove")), 1)
|
|
1226
1222
|
]),
|
|
1227
1223
|
_: 2
|
|
1228
1224
|
}, 1032, ["onClick"])
|
|
1229
1225
|
]),
|
|
1230
1226
|
_: 2
|
|
1231
1227
|
}, 1024)
|
|
1232
|
-
], 10,
|
|
1228
|
+
], 10, Lt)
|
|
1233
1229
|
]),
|
|
1234
1230
|
_: 1
|
|
1235
1231
|
}, 8, ["list"])
|
|
1236
1232
|
]),
|
|
1237
1233
|
_: 1
|
|
1238
1234
|
})),
|
|
1239
|
-
|
|
1235
|
+
de.value ? (p(), k(e, {
|
|
1240
1236
|
key: 3,
|
|
1241
1237
|
label: t(n)("report.editor.addTab"),
|
|
1242
1238
|
variant: "secondary",
|
|
1243
1239
|
icon: "add",
|
|
1244
1240
|
"icon-position": "prepend",
|
|
1245
|
-
"border-color": t(
|
|
1246
|
-
"text-color": t(
|
|
1247
|
-
onClick:
|
|
1248
|
-
}, null, 8, ["label", "border-color", "text-color"])) : (
|
|
1241
|
+
"border-color": t(xe).ColorPrimary,
|
|
1242
|
+
"text-color": t(xe).ColorPrimary,
|
|
1243
|
+
onClick: K
|
|
1244
|
+
}, null, 8, ["label", "border-color", "text-color"])) : (p(), k(W, {
|
|
1249
1245
|
key: 4,
|
|
1250
1246
|
trigger: "click",
|
|
1251
1247
|
shift: !0
|
|
@@ -1257,21 +1253,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1257
1253
|
icon: "add",
|
|
1258
1254
|
"icon-position": "prepend",
|
|
1259
1255
|
class: "w-full",
|
|
1260
|
-
"border-color": t(
|
|
1261
|
-
"text-color": t(
|
|
1256
|
+
"border-color": t(xe).ColorPrimary,
|
|
1257
|
+
"text-color": t(xe).ColorPrimary
|
|
1262
1258
|
}, null, 8, ["label", "border-color", "text-color"])
|
|
1263
1259
|
]),
|
|
1264
1260
|
default: V(() => [
|
|
1265
|
-
d(
|
|
1261
|
+
d(C, {
|
|
1266
1262
|
label: t(n)("report.editor.addWidget"),
|
|
1267
|
-
onClick: o[22] || (o[22] = (i) => y("add-widget",
|
|
1263
|
+
onClick: o[22] || (o[22] = (i) => y("add-widget", ae.value))
|
|
1268
1264
|
}, null, 8, ["label"]),
|
|
1269
|
-
|
|
1265
|
+
ne.value ? (p(), k(C, {
|
|
1270
1266
|
key: 0,
|
|
1271
1267
|
label: t(n)("report.editor.addGroup"),
|
|
1272
|
-
onClick:
|
|
1268
|
+
onClick: Me
|
|
1273
1269
|
}, null, 8, ["label"])) : U("", !0),
|
|
1274
|
-
|
|
1270
|
+
ee.value ? (p(), k(C, {
|
|
1275
1271
|
key: 1,
|
|
1276
1272
|
label: t(n)("report.editor.addTabGroup"),
|
|
1277
1273
|
onClick: De
|
|
@@ -1280,8 +1276,8 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1280
1276
|
_: 1
|
|
1281
1277
|
})),
|
|
1282
1278
|
d(s, {
|
|
1283
|
-
modelValue:
|
|
1284
|
-
"onUpdate:modelValue": o[23] || (o[23] = (i) =>
|
|
1279
|
+
modelValue: Fe.value,
|
|
1280
|
+
"onUpdate:modelValue": o[23] || (o[23] = (i) => Fe.value = i),
|
|
1285
1281
|
overlay: !0,
|
|
1286
1282
|
"z-index": 10
|
|
1287
1283
|
}, {
|
|
@@ -1289,14 +1285,14 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1289
1285
|
Je(B(t(n)("report.editor.moveTo")), 1)
|
|
1290
1286
|
]),
|
|
1291
1287
|
default: V(() => [
|
|
1292
|
-
d(
|
|
1288
|
+
d(R, null, {
|
|
1293
1289
|
default: V(() => [
|
|
1294
|
-
(
|
|
1290
|
+
(p(!0), z(ke, null, Le(te.value, (i) => (p(), k(u, {
|
|
1295
1291
|
key: i.parentId ?? "root",
|
|
1296
1292
|
onClick: (I) => He(i)
|
|
1297
1293
|
}, {
|
|
1298
1294
|
default: V(() => [
|
|
1299
|
-
f("p",
|
|
1295
|
+
f("p", Ht, B(i.label), 1)
|
|
1300
1296
|
]),
|
|
1301
1297
|
_: 2
|
|
1302
1298
|
}, 1032, ["onClick"]))), 128))
|
|
@@ -1309,12 +1305,12 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1309
1305
|
]);
|
|
1310
1306
|
};
|
|
1311
1307
|
}
|
|
1312
|
-
}),
|
|
1308
|
+
}), Jt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Qt = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, Kt = { class: "flex items-center gap-8" }, Yt = {
|
|
1313
1309
|
key: 2,
|
|
1314
1310
|
class: "flex flex-col gap-8 rounded-md border border-fm-color-border px-16 py-12"
|
|
1315
|
-
},
|
|
1311
|
+
}, Xt = { class: "fm-typo-en-body-sm-400" }, Zt = { class: "fm-typo-en-body-sm-400 font-bold" }, eo = { class: "space-y-1 fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, lo = { class: "flex flex-col gap-24 top-0 bg-fm-color-neutral-white z-10" }, to = { class: "flex items-center gap-1 max-w-[195px] w-[195px]" }, oo = { class: "line-clamp-2 overflow-hidden max-w-[195px] w-[195px]" }, gl = /* @__PURE__ */ ye({
|
|
1316
1312
|
__name: "ReportEditorTab",
|
|
1317
|
-
props: /* @__PURE__ */
|
|
1313
|
+
props: /* @__PURE__ */ Ce({
|
|
1318
1314
|
hideConfiguration: {
|
|
1319
1315
|
type: Boolean,
|
|
1320
1316
|
default: !1
|
|
@@ -1328,35 +1324,35 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1328
1324
|
modelValue: { required: !0 },
|
|
1329
1325
|
modelModifiers: {}
|
|
1330
1326
|
}),
|
|
1331
|
-
emits: /* @__PURE__ */
|
|
1332
|
-
setup(
|
|
1333
|
-
const m =
|
|
1327
|
+
emits: /* @__PURE__ */ Ce(["hideConfiguration"], ["update:modelValue"]),
|
|
1328
|
+
setup(P, { emit: v }) {
|
|
1329
|
+
const m = Te(P, "modelValue"), { breakpoints: y } = Ze(), n = P, w = v, L = ul(), X = dl(), D = G(), {
|
|
1334
1330
|
currentSelectWidgetType: F,
|
|
1335
1331
|
categories: N,
|
|
1336
|
-
editingTile:
|
|
1337
|
-
editingTileIndex:
|
|
1332
|
+
editingTile: Z,
|
|
1333
|
+
editingTileIndex: A,
|
|
1338
1334
|
editingGlobalFilter: a,
|
|
1339
|
-
editingGlobalFilterIndex:
|
|
1340
|
-
} = Ee(sl()), { schemas:
|
|
1335
|
+
editingGlobalFilterIndex: O
|
|
1336
|
+
} = Ee(sl()), { schemas: S } = Ee(Hl()), { globalFilters: ae } = Ee(cl()), { getGlobalFilterLabel: ie } = cl(), { promptMessage: de } = ml(), J = G(!1), se = G(!1), { t: x, te: ne, locale: ee } = Ge(), re = G(void 0), me = b(() => {
|
|
1341
1337
|
const u = tl(m.value.tiles).flatMap((s) => {
|
|
1342
|
-
var
|
|
1343
|
-
const i = s.widget.config.schemaNames ?? [], I = ((
|
|
1338
|
+
var _;
|
|
1339
|
+
const i = s.widget.config.schemaNames ?? [], I = ((_ = s.widget.config.joinDatasources) == null ? void 0 : _.flatMap((Y) => Y.schemaNames ?? [])) ?? [];
|
|
1344
1340
|
return [...i, ...I];
|
|
1345
1341
|
});
|
|
1346
1342
|
return [...new Set(u)].reduce((s, i) => {
|
|
1347
|
-
const I =
|
|
1343
|
+
const I = S.value.find((_) => _.name === i);
|
|
1348
1344
|
return I && s.push(I), s;
|
|
1349
1345
|
}, []);
|
|
1350
|
-
}),
|
|
1351
|
-
function
|
|
1352
|
-
|
|
1346
|
+
}), ue = G(null);
|
|
1347
|
+
function ve(u) {
|
|
1348
|
+
ue.value = u, se.value = !0;
|
|
1353
1349
|
}
|
|
1354
1350
|
ge(
|
|
1355
1351
|
() => F.value,
|
|
1356
1352
|
() => {
|
|
1357
|
-
F.value !== void 0 && (
|
|
1353
|
+
F.value !== void 0 && (re.value = Zl(F.value), Z.value = re.value, A.value = -1, _l.value = ue.value, L.push({
|
|
1358
1354
|
name: "tileEditor",
|
|
1359
|
-
query:
|
|
1355
|
+
query: X.query
|
|
1360
1356
|
}));
|
|
1361
1357
|
},
|
|
1362
1358
|
{ immediate: !0 }
|
|
@@ -1367,14 +1363,14 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1367
1363
|
},
|
|
1368
1364
|
{ immediate: !0, deep: !0 }
|
|
1369
1365
|
);
|
|
1370
|
-
const
|
|
1366
|
+
const ce = [
|
|
1371
1367
|
{
|
|
1372
1368
|
label: "report.common.edit",
|
|
1373
1369
|
selected: !1,
|
|
1374
1370
|
variant: "tertiary",
|
|
1375
1371
|
onClick: (u) => {
|
|
1376
1372
|
var s;
|
|
1377
|
-
|
|
1373
|
+
O.value = u, a.value = JSON.parse(JSON.stringify((s = m.value.globalFilters) == null ? void 0 : s[u])), J.value = !0;
|
|
1378
1374
|
}
|
|
1379
1375
|
},
|
|
1380
1376
|
{
|
|
@@ -1394,38 +1390,38 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1394
1390
|
selected: !1,
|
|
1395
1391
|
variant: "destructive",
|
|
1396
1392
|
onClick: async (u) => {
|
|
1397
|
-
var I,
|
|
1393
|
+
var I, _;
|
|
1398
1394
|
const s = (I = m.value.globalFilters) == null ? void 0 : I[u];
|
|
1399
1395
|
if (!s) return;
|
|
1400
|
-
await
|
|
1396
|
+
await de({
|
|
1401
1397
|
title: x("report.editor.deleteWidget"),
|
|
1402
1398
|
message: x("report.editor.deleteWidgetConfirm", {
|
|
1403
|
-
title:
|
|
1399
|
+
title: ie(s)
|
|
1404
1400
|
})
|
|
1405
|
-
}) && ((
|
|
1401
|
+
}) && ((_ = m.value.globalFilters) == null || _.splice(u, 1));
|
|
1406
1402
|
}
|
|
1407
1403
|
}
|
|
1408
|
-
],
|
|
1404
|
+
], q = b(() => N.value.map((u) => ({
|
|
1409
1405
|
label: x(`report.category.${u.name}`),
|
|
1410
1406
|
value: u.id
|
|
1411
|
-
}))), { sessionUser:
|
|
1407
|
+
}))), { sessionUser: E } = tt(), Q = b(
|
|
1412
1408
|
() => {
|
|
1413
1409
|
var u, s, i, I;
|
|
1414
|
-
return ((s = (u =
|
|
1410
|
+
return ((s = (u = E.value) == null ? void 0 : u.role) == null ? void 0 : s.isAdmin) === !0 || ((I = (i = E.value) == null ? void 0 : i.role) == null ? void 0 : I.isStaff) === !0;
|
|
1415
1411
|
}
|
|
1416
|
-
),
|
|
1412
|
+
), pe = b({
|
|
1417
1413
|
get: () => m.value.queryVersion === "v2",
|
|
1418
1414
|
set: (u) => {
|
|
1419
1415
|
m.value.queryVersion = u ? "v2" : "v1", u ? m.value.queryDatasource = m.value.queryDatasource ?? Xe.Postgres : m.value.queryDatasource = void 0;
|
|
1420
1416
|
}
|
|
1421
|
-
}),
|
|
1417
|
+
}), Se = [
|
|
1422
1418
|
{ label: x("report.common.postgresql"), value: Xe.Postgres },
|
|
1423
1419
|
{ label: x("report.common.bigquery"), value: Xe.BigQuery }
|
|
1424
|
-
],
|
|
1420
|
+
], K = [
|
|
1425
1421
|
{ label: x("report.common.noBatch"), value: "none" },
|
|
1426
1422
|
{ label: x("report.common.days"), value: "days" },
|
|
1427
1423
|
{ label: x("report.common.locations"), value: "locations" }
|
|
1428
|
-
],
|
|
1424
|
+
], le = b({
|
|
1429
1425
|
get: () => {
|
|
1430
1426
|
var u, s;
|
|
1431
1427
|
return (u = m.value.batch) != null && u.days ? "days" : (s = m.value.batch) != null && s.locations ? "locations" : "none";
|
|
@@ -1434,63 +1430,63 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1434
1430
|
var s, i;
|
|
1435
1431
|
u === "none" ? m.value.batch = n.readOnly ? null : void 0 : u === "days" ? m.value.batch = { days: ((s = m.value.batch) == null ? void 0 : s.days) || 1 } : u === "locations" && (m.value.batch = { locations: ((i = m.value.batch) == null ? void 0 : i.locations) || 10 });
|
|
1436
1432
|
}
|
|
1437
|
-
}),
|
|
1433
|
+
}), $e = b({
|
|
1438
1434
|
get: () => {
|
|
1439
1435
|
var u, s;
|
|
1440
|
-
if (
|
|
1441
|
-
if (
|
|
1436
|
+
if (le.value === "days") return ((u = m.value.batch) == null ? void 0 : u.days) ?? 1;
|
|
1437
|
+
if (le.value === "locations") return ((s = m.value.batch) == null ? void 0 : s.locations) ?? 1;
|
|
1442
1438
|
},
|
|
1443
1439
|
set: (u) => {
|
|
1444
|
-
u && (
|
|
1440
|
+
u && (le.value === "days" ? m.value.batch = { days: u } : le.value === "locations" && (m.value.batch = { locations: u }));
|
|
1445
1441
|
}
|
|
1446
|
-
}),
|
|
1447
|
-
get: () => Qe(x,
|
|
1442
|
+
}), Me = b({
|
|
1443
|
+
get: () => Qe(x, ne, m.value.name, "other"),
|
|
1448
1444
|
set: (u) => {
|
|
1449
1445
|
m.value.name = u;
|
|
1450
1446
|
}
|
|
1451
1447
|
}), { country: De } = Ee(ot()), {
|
|
1452
|
-
dateRange:
|
|
1453
|
-
compareDateRange:
|
|
1454
|
-
timeRange:
|
|
1455
|
-
selectedLocationIds:
|
|
1456
|
-
businessDataVersion:
|
|
1448
|
+
dateRange: he,
|
|
1449
|
+
compareDateRange: we,
|
|
1450
|
+
timeRange: Oe,
|
|
1451
|
+
selectedLocationIds: Ie,
|
|
1452
|
+
businessDataVersion: Re,
|
|
1457
1453
|
restaurants: be,
|
|
1458
|
-
warehouses:
|
|
1459
|
-
} = Ee(at()),
|
|
1454
|
+
warehouses: _e
|
|
1455
|
+
} = Ee(at()), Fe = b(
|
|
1460
1456
|
() => m.value.queryVersion === "v2" && m.value.queryDatasource === Xe.BigQuery
|
|
1461
|
-
),
|
|
1462
|
-
const u =
|
|
1457
|
+
), Ve = b(() => Fe.value && Q.value), te = G(null), Ue = G(!1), We = b(() => {
|
|
1458
|
+
const u = he.value.startDate ?? he.value.endDate;
|
|
1463
1459
|
return u ? {
|
|
1464
1460
|
startDate: u,
|
|
1465
1461
|
endDate: u
|
|
1466
|
-
} :
|
|
1462
|
+
} : he.value;
|
|
1467
1463
|
}), He = b(() => {
|
|
1468
|
-
const u =
|
|
1464
|
+
const u = we.value.startDate ?? we.value.endDate;
|
|
1469
1465
|
return u ? {
|
|
1470
1466
|
startDate: u,
|
|
1471
1467
|
endDate: u
|
|
1472
|
-
} :
|
|
1468
|
+
} : we.value;
|
|
1473
1469
|
}), r = b(() => {
|
|
1474
1470
|
const u = m.value.batch;
|
|
1475
1471
|
if (!u) return 1;
|
|
1476
1472
|
if (u.locations) {
|
|
1477
|
-
const s = be.value.length +
|
|
1473
|
+
const s = be.value.length + _e.value.length;
|
|
1478
1474
|
return Math.max(1, Math.ceil(s / u.locations));
|
|
1479
1475
|
}
|
|
1480
1476
|
return 1;
|
|
1481
1477
|
}), o = b(() => {
|
|
1482
|
-
if (
|
|
1483
|
-
const u =
|
|
1478
|
+
if (te.value == null || te.value === 0) return null;
|
|
1479
|
+
const u = te.value * r.value;
|
|
1484
1480
|
return vl(u, De.value);
|
|
1485
|
-
}), e = b(() =>
|
|
1481
|
+
}), e = b(() => te.value == null || te.value === 0 ? null : vl(te.value, De.value)), l = b(() => o.value ? fl(o.value.amount, o.value.symbol) : ""), c = b(() => e.value ? fl(e.value.amount, e.value.symbol) : ""), g = b(() => r.value === 1 ? x("report.common.estimatedCostBatchSingular") : x("report.common.estimatedCostBatchPlural")), h = b(() => Ue.value ? "..." : !l.value || !c.value ? "--" : x("report.common.estimatedCostFormula", {
|
|
1486
1482
|
batchCount: r.value,
|
|
1487
1483
|
batchLabel: g.value,
|
|
1488
|
-
baseCost:
|
|
1484
|
+
baseCost: c.value,
|
|
1489
1485
|
totalCost: l.value
|
|
1490
1486
|
}));
|
|
1491
|
-
let
|
|
1492
|
-
const
|
|
1493
|
-
if (!
|
|
1487
|
+
let $ = [];
|
|
1488
|
+
const C = rt(async () => {
|
|
1489
|
+
if (!Ve.value) return;
|
|
1494
1490
|
const u = tl(m.value.tiles).filter(
|
|
1495
1491
|
(s) => {
|
|
1496
1492
|
var i;
|
|
@@ -1498,15 +1494,15 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1498
1494
|
}
|
|
1499
1495
|
);
|
|
1500
1496
|
if (u.length === 0) {
|
|
1501
|
-
|
|
1497
|
+
te.value = null;
|
|
1502
1498
|
return;
|
|
1503
1499
|
}
|
|
1504
|
-
|
|
1500
|
+
Ue.value = !0, $.forEach((s) => s.abort()), $ = [];
|
|
1505
1501
|
try {
|
|
1506
1502
|
const s = await Promise.all(
|
|
1507
1503
|
u.map((i) => {
|
|
1508
1504
|
const I = new AbortController();
|
|
1509
|
-
return
|
|
1505
|
+
return $.push(I), lt({
|
|
1510
1506
|
widget: i.widget,
|
|
1511
1507
|
signal: I.signal,
|
|
1512
1508
|
tileId: i.id,
|
|
@@ -1515,11 +1511,11 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1515
1511
|
});
|
|
1516
1512
|
})
|
|
1517
1513
|
);
|
|
1518
|
-
|
|
1514
|
+
te.value = s.reduce((i, I) => i + (I.totalBytesProcessed ?? 0), 0);
|
|
1519
1515
|
} catch (s) {
|
|
1520
|
-
s.code !== "ERR_CANCELED" && (
|
|
1516
|
+
s.code !== "ERR_CANCELED" && (te.value = null);
|
|
1521
1517
|
} finally {
|
|
1522
|
-
|
|
1518
|
+
Ue.value = !1;
|
|
1523
1519
|
}
|
|
1524
1520
|
}, 1e3);
|
|
1525
1521
|
ge(
|
|
@@ -1528,60 +1524,60 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1528
1524
|
() => m.value.queryVersion,
|
|
1529
1525
|
() => m.value.queryDatasource,
|
|
1530
1526
|
() => m.value.batch,
|
|
1531
|
-
() =>
|
|
1527
|
+
() => he.value,
|
|
1528
|
+
() => Oe.value,
|
|
1529
|
+
() => we.value,
|
|
1532
1530
|
() => Ie.value,
|
|
1533
|
-
() =>
|
|
1534
|
-
() => Ue.value,
|
|
1535
|
-
() => ze.value
|
|
1531
|
+
() => Re.value
|
|
1536
1532
|
],
|
|
1537
1533
|
() => {
|
|
1538
|
-
|
|
1534
|
+
C();
|
|
1539
1535
|
},
|
|
1540
1536
|
{ deep: !0 }
|
|
1541
1537
|
), yl(() => {
|
|
1542
|
-
|
|
1543
|
-
}),
|
|
1544
|
-
|
|
1538
|
+
C();
|
|
1539
|
+
}), Dl(() => {
|
|
1540
|
+
$.forEach((u) => u.abort());
|
|
1545
1541
|
});
|
|
1546
1542
|
function W(u) {
|
|
1547
1543
|
var s;
|
|
1548
1544
|
return !((s = u.tileIds) != null && s.length);
|
|
1549
1545
|
}
|
|
1550
|
-
function
|
|
1551
|
-
return !
|
|
1546
|
+
function R(u) {
|
|
1547
|
+
return !me.value.find((s) => s.name === u.schemaName);
|
|
1552
1548
|
}
|
|
1553
1549
|
return ge(
|
|
1554
1550
|
() => m.value.globalFilters,
|
|
1555
1551
|
(u) => {
|
|
1556
|
-
|
|
1552
|
+
ae.value = JSON.parse(JSON.stringify(u || []));
|
|
1557
1553
|
},
|
|
1558
1554
|
{ deep: !0, immediate: !0 }
|
|
1559
1555
|
), (u, s) => {
|
|
1560
|
-
const i =
|
|
1561
|
-
return
|
|
1556
|
+
const i = T("FmTextField"), I = T("FmSelect"), _ = T("FmSwitch"), Y = T("FmButton"), H = T("FmIcon"), j = T("FmTooltip"), Ke = T("FmMenuItem"), xl = T("FmMenu"), kl = T("FmListItem"), Cl = T("FmList"), Tl = T("FmForm");
|
|
1557
|
+
return p(), k(Ol(t(y).lg || t(y).md ? st : ut), {
|
|
1562
1558
|
"model-value": n.hideConfiguration,
|
|
1563
1559
|
"onUpdate:modelValue": s[12] || (s[12] = (M) => w("hideConfiguration", M))
|
|
1564
1560
|
}, {
|
|
1565
1561
|
default: V(() => [
|
|
1566
|
-
d(
|
|
1567
|
-
"is-open":
|
|
1568
|
-
"onUpdate:isOpen": s[0] || (s[0] = (M) =>
|
|
1562
|
+
d(yt, {
|
|
1563
|
+
"is-open": J.value,
|
|
1564
|
+
"onUpdate:isOpen": s[0] || (s[0] = (M) => J.value = M),
|
|
1569
1565
|
"global-filter": t(a),
|
|
1570
1566
|
tiles: t(tl)(m.value.tiles),
|
|
1571
|
-
schemas:
|
|
1567
|
+
schemas: me.value,
|
|
1572
1568
|
"onUpdate:globalFilter": s[1] || (s[1] = (M) => {
|
|
1573
|
-
M && (m.value.globalFilters || (m.value.globalFilters = []), typeof t(
|
|
1569
|
+
M && (m.value.globalFilters || (m.value.globalFilters = []), typeof t(O) == "number" && t(O) >= 0 ? m.value.globalFilters[t(O)] = M : m.value.globalFilters.push(M));
|
|
1574
1570
|
})
|
|
1575
1571
|
}, null, 8, ["is-open", "global-filter", "tiles", "schemas"]),
|
|
1576
1572
|
d(nt, {
|
|
1577
1573
|
modelValue: t(F),
|
|
1578
1574
|
"onUpdate:modelValue": s[2] || (s[2] = (M) => hl(F) ? F.value = M : null),
|
|
1579
|
-
"is-open":
|
|
1580
|
-
"onUpdate:isOpen": s[3] || (s[3] = (M) =>
|
|
1575
|
+
"is-open": se.value,
|
|
1576
|
+
"onUpdate:isOpen": s[3] || (s[3] = (M) => se.value = M)
|
|
1581
1577
|
}, null, 8, ["modelValue", "is-open"]),
|
|
1582
1578
|
d(Tl, {
|
|
1583
1579
|
ref_key: "form",
|
|
1584
|
-
ref:
|
|
1580
|
+
ref: D,
|
|
1585
1581
|
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
1586
1582
|
}, {
|
|
1587
1583
|
default: V(() => [
|
|
@@ -1591,20 +1587,20 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1591
1587
|
s[13] || (s[13] = f("div", { class: "grow" }, null, -1))
|
|
1592
1588
|
]),
|
|
1593
1589
|
content: V(() => [
|
|
1594
|
-
f("div",
|
|
1590
|
+
f("div", Jt, [
|
|
1595
1591
|
d(i, {
|
|
1596
|
-
modelValue:
|
|
1597
|
-
"onUpdate:modelValue": s[4] || (s[4] = (M) =>
|
|
1592
|
+
modelValue: Me.value,
|
|
1593
|
+
"onUpdate:modelValue": s[4] || (s[4] = (M) => Me.value = M),
|
|
1598
1594
|
label: t(x)("report.common.name"),
|
|
1599
1595
|
placeholder: t(x)("report.common.name"),
|
|
1600
1596
|
disabled: n.readOnly
|
|
1601
1597
|
}, null, 8, ["modelValue", "label", "placeholder", "disabled"]),
|
|
1602
|
-
(
|
|
1603
|
-
key: `category-${t(
|
|
1598
|
+
(p(), k(I, {
|
|
1599
|
+
key: `category-${t(ee)}`,
|
|
1604
1600
|
modelValue: m.value.category,
|
|
1605
1601
|
"onUpdate:modelValue": s[5] || (s[5] = (M) => m.value.category = M),
|
|
1606
1602
|
label: t(x)("report.common.category"),
|
|
1607
|
-
items:
|
|
1603
|
+
items: q.value,
|
|
1608
1604
|
disabled: n.readOnly
|
|
1609
1605
|
}, null, 8, ["modelValue", "label", "items", "disabled"])),
|
|
1610
1606
|
d(i, {
|
|
@@ -1627,39 +1623,39 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1627
1623
|
s[14] || (s[14] = f("div", { class: "grow" }, null, -1))
|
|
1628
1624
|
]),
|
|
1629
1625
|
content: V(() => [
|
|
1630
|
-
f("div",
|
|
1631
|
-
f("div",
|
|
1626
|
+
f("div", Qt, [
|
|
1627
|
+
f("div", Kt, [
|
|
1632
1628
|
s[15] || (s[15] = f("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, "V2", -1)),
|
|
1633
|
-
d(
|
|
1634
|
-
modelValue:
|
|
1635
|
-
"onUpdate:modelValue": s[7] || (s[7] = (M) =>
|
|
1629
|
+
d(_, {
|
|
1630
|
+
modelValue: pe.value,
|
|
1631
|
+
"onUpdate:modelValue": s[7] || (s[7] = (M) => pe.value = M)
|
|
1636
1632
|
}, null, 8, ["modelValue"])
|
|
1637
1633
|
]),
|
|
1638
|
-
|
|
1634
|
+
pe.value && Q.value ? (p(), k(I, {
|
|
1639
1635
|
key: 0,
|
|
1640
1636
|
modelValue: m.value.queryDatasource,
|
|
1641
1637
|
"onUpdate:modelValue": s[8] || (s[8] = (M) => m.value.queryDatasource = M),
|
|
1642
1638
|
label: t(x)("report.common.queryDatasource"),
|
|
1643
|
-
items:
|
|
1639
|
+
items: Se
|
|
1644
1640
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1645
1641
|
d(I, {
|
|
1646
|
-
modelValue:
|
|
1647
|
-
"onUpdate:modelValue": s[9] || (s[9] = (M) =>
|
|
1642
|
+
modelValue: le.value,
|
|
1643
|
+
"onUpdate:modelValue": s[9] || (s[9] = (M) => le.value = M),
|
|
1648
1644
|
label: t(x)("report.common.batch"),
|
|
1649
|
-
items:
|
|
1645
|
+
items: K
|
|
1650
1646
|
}, null, 8, ["modelValue", "label"]),
|
|
1651
|
-
|
|
1647
|
+
le.value !== "none" ? (p(), k(i, {
|
|
1652
1648
|
key: 1,
|
|
1653
|
-
modelValue:
|
|
1654
|
-
"onUpdate:modelValue": s[10] || (s[10] = (M) =>
|
|
1649
|
+
modelValue: $e.value,
|
|
1650
|
+
"onUpdate:modelValue": s[10] || (s[10] = (M) => $e.value = M),
|
|
1655
1651
|
modelModifiers: { number: !0 },
|
|
1656
|
-
label:
|
|
1652
|
+
label: le.value === "days" ? t(x)("report.common.days") : t(x)("report.common.locations"),
|
|
1657
1653
|
type: "number"
|
|
1658
1654
|
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1659
|
-
|
|
1660
|
-
f("span",
|
|
1661
|
-
f("p",
|
|
1662
|
-
f("div",
|
|
1655
|
+
Ve.value ? (p(), z("div", Yt, [
|
|
1656
|
+
f("span", Xt, B(t(x)("report.common.estimatedBqCost")), 1),
|
|
1657
|
+
f("p", Zt, B(h.value), 1),
|
|
1658
|
+
f("div", eo, [
|
|
1663
1659
|
f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineBigQuery")), 1),
|
|
1664
1660
|
f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineDateRange")), 1),
|
|
1665
1661
|
f("div", null, "* " + B(t(x)("report.common.estimatedCostGuidelineLocationBatch")), 1)
|
|
@@ -1669,7 +1665,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1669
1665
|
]),
|
|
1670
1666
|
_: 1
|
|
1671
1667
|
}),
|
|
1672
|
-
n.readOnly ? U("", !0) : (
|
|
1668
|
+
n.readOnly ? U("", !0) : (p(), k(je, {
|
|
1673
1669
|
key: 0,
|
|
1674
1670
|
class: "border-solid",
|
|
1675
1671
|
"is-open": !1
|
|
@@ -1679,19 +1675,19 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1679
1675
|
s[16] || (s[16] = f("div", { class: "grow" }, null, -1))
|
|
1680
1676
|
]),
|
|
1681
1677
|
content: V(() => [
|
|
1682
|
-
f("div",
|
|
1683
|
-
d(
|
|
1678
|
+
f("div", lo, [
|
|
1679
|
+
d(Y, {
|
|
1684
1680
|
label: t(x)("report.section.filter.addGlobalFilter"),
|
|
1685
1681
|
variant: "secondary",
|
|
1686
1682
|
icon: "add",
|
|
1687
1683
|
"icon-position": "prepend",
|
|
1688
|
-
"border-color": t(
|
|
1689
|
-
"text-color": t(
|
|
1684
|
+
"border-color": t(xe).ColorPrimary,
|
|
1685
|
+
"text-color": t(xe).ColorPrimary,
|
|
1690
1686
|
onClick: s[11] || (s[11] = () => {
|
|
1691
|
-
|
|
1687
|
+
O.value = null, a.value = null, J.value = !0;
|
|
1692
1688
|
})
|
|
1693
1689
|
}, null, 8, ["label", "border-color", "text-color"]),
|
|
1694
|
-
d(
|
|
1690
|
+
d(Cl, null, {
|
|
1695
1691
|
default: V(() => [
|
|
1696
1692
|
d(t(wl), {
|
|
1697
1693
|
list: m.value.globalFilters,
|
|
@@ -1700,42 +1696,42 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1700
1696
|
handle: ".handle"
|
|
1701
1697
|
}, {
|
|
1702
1698
|
item: V(({ element: M, index: Sl }) => [
|
|
1703
|
-
d(
|
|
1699
|
+
d(kl, { class: "!cursor-grab border rounded-md border-neutral-300" }, {
|
|
1704
1700
|
default: V(() => [
|
|
1705
|
-
d(
|
|
1701
|
+
d(H, {
|
|
1706
1702
|
name: "drag_handle",
|
|
1707
1703
|
class: "handle"
|
|
1708
1704
|
}),
|
|
1709
|
-
f("div",
|
|
1710
|
-
d(
|
|
1705
|
+
f("div", to, [
|
|
1706
|
+
d(j, {
|
|
1711
1707
|
"z-index": 99,
|
|
1712
|
-
content: t(
|
|
1708
|
+
content: t(ie)(M),
|
|
1713
1709
|
class: "handle"
|
|
1714
1710
|
}, {
|
|
1715
1711
|
default: V(() => [
|
|
1716
|
-
f("p",
|
|
1712
|
+
f("p", oo, B(t(ie)(M)), 1)
|
|
1717
1713
|
]),
|
|
1718
1714
|
_: 2
|
|
1719
1715
|
}, 1032, ["content"]),
|
|
1720
|
-
|
|
1716
|
+
R(M) ? (p(), k(j, {
|
|
1721
1717
|
key: 0,
|
|
1722
1718
|
content: t(x)("report.section.filter.missingSchema"),
|
|
1723
1719
|
"z-index": 99
|
|
1724
1720
|
}, {
|
|
1725
1721
|
default: V(() => [
|
|
1726
|
-
d(
|
|
1722
|
+
d(H, {
|
|
1727
1723
|
name: "warning",
|
|
1728
1724
|
class: "text-fm-color-system-error-300"
|
|
1729
1725
|
})
|
|
1730
1726
|
]),
|
|
1731
1727
|
_: 1
|
|
1732
|
-
}, 8, ["content"])) : W(M) ? (
|
|
1728
|
+
}, 8, ["content"])) : W(M) ? (p(), k(j, {
|
|
1733
1729
|
key: 1,
|
|
1734
1730
|
content: t(x)("report.section.filter.missingTileIds"),
|
|
1735
1731
|
"z-index": 99
|
|
1736
1732
|
}, {
|
|
1737
1733
|
default: V(() => [
|
|
1738
|
-
d(
|
|
1734
|
+
d(H, {
|
|
1739
1735
|
name: "warning",
|
|
1740
1736
|
class: "text-fm-color-system-warning-300"
|
|
1741
1737
|
})
|
|
@@ -1750,15 +1746,15 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1750
1746
|
"stop-click-propagation": !0
|
|
1751
1747
|
}, {
|
|
1752
1748
|
"menu-button": V(() => [
|
|
1753
|
-
d(
|
|
1749
|
+
d(Y, {
|
|
1754
1750
|
"append-icon": "more_vert",
|
|
1755
1751
|
variant: "tertiary"
|
|
1756
1752
|
})
|
|
1757
1753
|
]),
|
|
1758
1754
|
default: V(() => [
|
|
1759
|
-
(
|
|
1755
|
+
(p(), z(ke, null, Le(ce, (el, $l) => d(Ke, {
|
|
1760
1756
|
key: $l,
|
|
1761
|
-
onClick: (
|
|
1757
|
+
onClick: (wo) => el.onClick(Sl)
|
|
1762
1758
|
}, {
|
|
1763
1759
|
label: V(() => [
|
|
1764
1760
|
f("p", {
|
|
@@ -1785,7 +1781,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1785
1781
|
]),
|
|
1786
1782
|
_: 1
|
|
1787
1783
|
})),
|
|
1788
|
-
n.readOnly ? U("", !0) : (
|
|
1784
|
+
n.readOnly ? U("", !0) : (p(), k(je, {
|
|
1789
1785
|
key: 1,
|
|
1790
1786
|
class: "border-solid"
|
|
1791
1787
|
}, {
|
|
@@ -1794,9 +1790,9 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1794
1790
|
s[18] || (s[18] = f("div", { class: "grow" }, null, -1))
|
|
1795
1791
|
]),
|
|
1796
1792
|
content: V(() => [
|
|
1797
|
-
d(
|
|
1793
|
+
d(jt, {
|
|
1798
1794
|
report: m.value,
|
|
1799
|
-
onAddWidget:
|
|
1795
|
+
onAddWidget: ve
|
|
1800
1796
|
}, null, 8, ["report"])
|
|
1801
1797
|
]),
|
|
1802
1798
|
_: 1
|
|
@@ -1809,22 +1805,22 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1809
1805
|
}, 8, ["model-value"]);
|
|
1810
1806
|
};
|
|
1811
1807
|
}
|
|
1812
|
-
}),
|
|
1808
|
+
}), ao = { class: "h-full w-full overflow-x-hidden" }, ro = { class: "flex flex-col bg-fm-color-neutral-white w-[400px]" }, no = { class: "flex bg-fm-color-neutral-white w-[88px]" }, io = {
|
|
1813
1809
|
key: 1,
|
|
1814
1810
|
class: "w-full overflow-y-auto"
|
|
1815
|
-
},
|
|
1811
|
+
}, so = {
|
|
1816
1812
|
key: 0,
|
|
1817
1813
|
class: "w-full p-24"
|
|
1818
|
-
},
|
|
1814
|
+
}, uo = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, mo = { key: 2 }, co = { key: 0 }, po = { class: "mb-4 flex flex-wrap gap-2 pb-2" }, vo = {
|
|
1819
1815
|
key: 3,
|
|
1820
1816
|
class: "h-full w-full flex items-start justify-center bg-fm-color-neutral-white py-24",
|
|
1821
1817
|
style: { backgroundColor: "#F6F8FC" }
|
|
1822
|
-
},
|
|
1818
|
+
}, fo = {
|
|
1823
1819
|
key: 0,
|
|
1824
1820
|
class: "w-full"
|
|
1825
|
-
},
|
|
1821
|
+
}, go = /* @__PURE__ */ ye({
|
|
1826
1822
|
__name: "ReportEditorViewport",
|
|
1827
|
-
props: /* @__PURE__ */
|
|
1823
|
+
props: /* @__PURE__ */ Ce({
|
|
1828
1824
|
hideConfiguration: { type: Boolean, required: !1, default: !1 },
|
|
1829
1825
|
readOnly: { type: Boolean, required: !1, default: !1 },
|
|
1830
1826
|
previewWidth: { type: Number, required: !0 },
|
|
@@ -1835,42 +1831,42 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1835
1831
|
} },
|
|
1836
1832
|
modelModifiers: {}
|
|
1837
1833
|
}),
|
|
1838
|
-
emits: /* @__PURE__ */
|
|
1839
|
-
setup(
|
|
1840
|
-
const { breakpoints: m } = Ze(), y =
|
|
1834
|
+
emits: /* @__PURE__ */ Ce(["hideConfiguration"], ["update:modelValue"]),
|
|
1835
|
+
setup(P, { emit: v }) {
|
|
1836
|
+
const { breakpoints: m } = Ze(), y = Te(P, "modelValue"), n = b(() => {
|
|
1841
1837
|
var F;
|
|
1842
1838
|
return Jl((F = y.value) == null ? void 0 : F.tiles);
|
|
1843
|
-
}), w =
|
|
1839
|
+
}), w = P, L = b(() => w.previewWidth > 0 && w.previewHeight > 0), X = b(() => m.value.sm || m.value.xs), D = v;
|
|
1844
1840
|
return (F, N) => {
|
|
1845
|
-
const
|
|
1846
|
-
return
|
|
1847
|
-
y.value ? (
|
|
1848
|
-
|
|
1841
|
+
const Z = T("FmCircularProgress"), A = T("FmButton"), a = T("FmMenuDivider"), O = T("FmCard");
|
|
1842
|
+
return p(), z("div", ao, [
|
|
1843
|
+
y.value ? (p(), z(ke, { key: 1 }, [
|
|
1844
|
+
L.value ? U("", !0) : (p(), k(Ml, {
|
|
1849
1845
|
key: 0,
|
|
1850
1846
|
"model-value": !w.hideConfiguration
|
|
1851
1847
|
}, {
|
|
1852
1848
|
right: V(() => [
|
|
1853
|
-
f("div",
|
|
1854
|
-
y.value ? (
|
|
1849
|
+
f("div", ro, [
|
|
1850
|
+
y.value ? (p(), k(gl, {
|
|
1855
1851
|
key: 0,
|
|
1856
1852
|
modelValue: y.value,
|
|
1857
|
-
"onUpdate:modelValue": N[0] || (N[0] = (
|
|
1853
|
+
"onUpdate:modelValue": N[0] || (N[0] = (S) => y.value = S),
|
|
1858
1854
|
"hide-configuration": w.hideConfiguration,
|
|
1859
1855
|
"read-only": w.readOnly,
|
|
1860
|
-
onHideConfiguration: N[1] || (N[1] = (
|
|
1856
|
+
onHideConfiguration: N[1] || (N[1] = (S) => D("hideConfiguration", S))
|
|
1861
1857
|
}, null, 8, ["modelValue", "hide-configuration", "read-only"])) : U("", !0)
|
|
1862
1858
|
])
|
|
1863
1859
|
]),
|
|
1864
1860
|
left: V(() => [
|
|
1865
|
-
f("div",
|
|
1866
|
-
d(
|
|
1861
|
+
f("div", no, [
|
|
1862
|
+
d(A, {
|
|
1867
1863
|
variant: "secondary",
|
|
1868
1864
|
icon: "keyboard_double_arrow_right",
|
|
1869
|
-
"border-color": t(
|
|
1870
|
-
"text-color": t(
|
|
1865
|
+
"border-color": t(xe).ColorPrimary,
|
|
1866
|
+
"text-color": t(xe).ColorPrimary,
|
|
1871
1867
|
class: "m-24 my-16",
|
|
1872
1868
|
size: "md",
|
|
1873
|
-
onClick: N[2] || (N[2] = (
|
|
1869
|
+
onClick: N[2] || (N[2] = (S) => D("hideConfiguration", !w.hideConfiguration))
|
|
1874
1870
|
}, null, 8, ["border-color", "text-color"])
|
|
1875
1871
|
])
|
|
1876
1872
|
]),
|
|
@@ -1880,9 +1876,9 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1880
1876
|
vertical: "",
|
|
1881
1877
|
style: { margin: "0px" }
|
|
1882
1878
|
}),
|
|
1883
|
-
!
|
|
1884
|
-
y.value.tiles.length > 0 ? (
|
|
1885
|
-
f("div",
|
|
1879
|
+
!X.value && !L.value ? (p(), z("div", io, [
|
|
1880
|
+
y.value.tiles.length > 0 ? (p(), z("div", so, [
|
|
1881
|
+
f("div", uo, [
|
|
1886
1882
|
d(pl)
|
|
1887
1883
|
]),
|
|
1888
1884
|
d(ol, {
|
|
@@ -1892,12 +1888,12 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1892
1888
|
"hide-export": !0,
|
|
1893
1889
|
"grid-class": "gap-[24px]"
|
|
1894
1890
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
|
|
1895
|
-
])) : (
|
|
1896
|
-
])) :
|
|
1897
|
-
d(
|
|
1891
|
+
])) : (p(), k(rl, { key: 1 }))
|
|
1892
|
+
])) : X.value && !L.value ? (p(), z("div", mo, [
|
|
1893
|
+
d(O, { class: "px-5 pb-28" }, {
|
|
1898
1894
|
default: V(() => [
|
|
1899
|
-
y.value.tiles.length > 0 ? (
|
|
1900
|
-
f("div",
|
|
1895
|
+
y.value.tiles.length > 0 ? (p(), z("div", co, [
|
|
1896
|
+
f("div", po, [
|
|
1901
1897
|
d(pl)
|
|
1902
1898
|
]),
|
|
1903
1899
|
d(ol, {
|
|
@@ -1907,21 +1903,21 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1907
1903
|
"hide-export": !0,
|
|
1908
1904
|
"grid-class": "gap-[16px]"
|
|
1909
1905
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id"])
|
|
1910
|
-
])) : (
|
|
1906
|
+
])) : (p(), k(rl, { key: 1 }))
|
|
1911
1907
|
]),
|
|
1912
1908
|
_: 1
|
|
1913
1909
|
}),
|
|
1914
|
-
y.value ? (
|
|
1910
|
+
y.value ? (p(), k(gl, {
|
|
1915
1911
|
key: 0,
|
|
1916
1912
|
modelValue: y.value,
|
|
1917
|
-
"onUpdate:modelValue": N[3] || (N[3] = (
|
|
1913
|
+
"onUpdate:modelValue": N[3] || (N[3] = (S) => y.value = S),
|
|
1918
1914
|
"hide-configuration": w.hideConfiguration,
|
|
1919
1915
|
"read-only": w.readOnly,
|
|
1920
|
-
onHideConfiguration: N[4] || (N[4] = (
|
|
1921
|
-
|
|
1916
|
+
onHideConfiguration: N[4] || (N[4] = (S) => {
|
|
1917
|
+
D("hideConfiguration", S);
|
|
1922
1918
|
})
|
|
1923
1919
|
}, null, 8, ["modelValue", "hide-configuration", "read-only"])) : U("", !0)
|
|
1924
|
-
])) : (
|
|
1920
|
+
])) : (p(), z("div", vo, [
|
|
1925
1921
|
f("div", {
|
|
1926
1922
|
style: nl({
|
|
1927
1923
|
transformOrigin: "top center",
|
|
@@ -1935,7 +1931,7 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1935
1931
|
height: w.previewHeight + "px"
|
|
1936
1932
|
})
|
|
1937
1933
|
}, [
|
|
1938
|
-
y.value.tiles.length > 0 ? (
|
|
1934
|
+
y.value.tiles.length > 0 ? (p(), z("div", fo, [
|
|
1939
1935
|
d(ol, {
|
|
1940
1936
|
tiles: y.value.tiles,
|
|
1941
1937
|
"report-id": y.value.id || "editing",
|
|
@@ -1944,75 +1940,75 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
1944
1940
|
"custom-screen-width": w.previewWidth,
|
|
1945
1941
|
"grid-class": "gap-[24px] p-24"
|
|
1946
1942
|
}, null, 8, ["tiles", "report-id", "leaf-index-by-id", "custom-screen-width"])
|
|
1947
|
-
])) : (
|
|
1943
|
+
])) : (p(), k(rl, { key: 1 }))
|
|
1948
1944
|
], 4)
|
|
1949
1945
|
], 4)
|
|
1950
1946
|
]))
|
|
1951
|
-
], 64)) : (
|
|
1947
|
+
], 64)) : (p(), k(Z, { key: 0 }))
|
|
1952
1948
|
]);
|
|
1953
1949
|
};
|
|
1954
1950
|
}
|
|
1955
|
-
}),
|
|
1951
|
+
}), bo = { class: "flex items-center gap-4" }, yo = { class: "flex justify-center items-center gap-2 w-full" }, ho = { class: "flex gap-4" }, zo = /* @__PURE__ */ ye({
|
|
1956
1952
|
__name: "ReportEditor",
|
|
1957
|
-
setup(
|
|
1958
|
-
const v = ul(), m = dl(), y = sl(), { promptLoader: n } = Kl(), { t: w, te:
|
|
1959
|
-
var
|
|
1960
|
-
return !((
|
|
1961
|
-
}),
|
|
1962
|
-
var
|
|
1963
|
-
return !((
|
|
1964
|
-
}),
|
|
1965
|
-
var
|
|
1966
|
-
return ((
|
|
1967
|
-
}), a = b(() => Qe(w,
|
|
1953
|
+
setup(P) {
|
|
1954
|
+
const v = ul(), m = dl(), y = sl(), { promptLoader: n } = Kl(), { t: w, te: L } = Ge(), { currentReport: X, editingReport: D } = Ee(y), { breakpoints: F } = Ze(), N = b(() => {
|
|
1955
|
+
var q;
|
|
1956
|
+
return !((q = D.value) != null && q.editable);
|
|
1957
|
+
}), Z = b(() => {
|
|
1958
|
+
var q, E;
|
|
1959
|
+
return !((q = D.value) != null && q.editable) && !((E = D.value) != null && E.isDefault);
|
|
1960
|
+
}), A = b(() => {
|
|
1961
|
+
var q;
|
|
1962
|
+
return ((q = D.value) == null ? void 0 : q.name) ?? w("report.editor.newReport");
|
|
1963
|
+
}), a = b(() => Qe(w, L, A.value, "other")), O = Vl(), { promptMessage: S } = ml(), ae = G(!1), ie = b(() => [
|
|
1968
1964
|
{ label: w("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
1969
1965
|
{ label: w("report.common.save"), value: "save", isPrimary: !0, prependIcon: "download" }
|
|
1970
1966
|
]);
|
|
1971
|
-
async function
|
|
1972
|
-
if (!
|
|
1973
|
-
|
|
1967
|
+
async function de() {
|
|
1968
|
+
if (!D.value || D.value.tiles.length === 0) {
|
|
1969
|
+
O.open({ message: w("report.messages.noWidget"), type: "error" });
|
|
1974
1970
|
return;
|
|
1975
1971
|
}
|
|
1976
|
-
if (Ql(
|
|
1977
|
-
|
|
1972
|
+
if (Ql(D.value.tiles) > Fl) {
|
|
1973
|
+
O.open({ message: w("report.messages.tooDeepNesting"), type: "error" });
|
|
1978
1974
|
return;
|
|
1979
1975
|
}
|
|
1980
|
-
const
|
|
1981
|
-
if (await
|
|
1976
|
+
const q = Z.value ? w("report.common.clone") : w("report.common.save");
|
|
1977
|
+
if (await S({
|
|
1982
1978
|
title: `${w("report.messages.saveReport")}`,
|
|
1983
|
-
message: w("report.messages.confirmAction", { action:
|
|
1979
|
+
message: w("report.messages.confirmAction", { action: q, name: a.value })
|
|
1984
1980
|
}))
|
|
1985
1981
|
try {
|
|
1986
1982
|
await n(async () => {
|
|
1987
|
-
if (
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1983
|
+
if (Z.value) {
|
|
1984
|
+
const Q = JSON.parse(JSON.stringify(D.value));
|
|
1985
|
+
Q.editable = !0, Q.id = "", Q.name = `${Q.name} ${w("report.common.duplicate")}`, Q.isDefault = !1, await y.createOrUpdateReport(Q);
|
|
1990
1986
|
} else
|
|
1991
|
-
|
|
1987
|
+
D.value && await y.createOrUpdateReport(D.value);
|
|
1992
1988
|
v.push({
|
|
1993
1989
|
name: "reportView",
|
|
1994
1990
|
query: m.query
|
|
1995
1991
|
});
|
|
1996
1992
|
});
|
|
1997
|
-
} catch (
|
|
1998
|
-
console.log(
|
|
1999
|
-
message: w("report.messages.failedToAction", { action:
|
|
1993
|
+
} catch (Q) {
|
|
1994
|
+
console.log(Q), O.open({
|
|
1995
|
+
message: w("report.messages.failedToAction", { action: q }),
|
|
2000
1996
|
type: "error"
|
|
2001
1997
|
});
|
|
2002
1998
|
}
|
|
2003
1999
|
}
|
|
2004
|
-
async function
|
|
2005
|
-
var
|
|
2006
|
-
if (!
|
|
2007
|
-
await
|
|
2000
|
+
async function J() {
|
|
2001
|
+
var E;
|
|
2002
|
+
if (!D.value) return;
|
|
2003
|
+
await S({
|
|
2008
2004
|
title: w("report.common.report", 1),
|
|
2009
|
-
message: w("report.editor.notSaved", { name: (
|
|
2010
|
-
}) && (
|
|
2005
|
+
message: w("report.editor.notSaved", { name: (E = D.value) == null ? void 0 : E.name })
|
|
2006
|
+
}) && (D.value = JSON.parse(JSON.stringify(X.value)), v.back());
|
|
2011
2007
|
}
|
|
2012
2008
|
yl(() => {
|
|
2013
|
-
|
|
2009
|
+
D.value || v.push({ name: "reports" });
|
|
2014
2010
|
});
|
|
2015
|
-
const
|
|
2011
|
+
const se = [
|
|
2016
2012
|
{
|
|
2017
2013
|
labelKey: "report.common.default",
|
|
2018
2014
|
width: void 0,
|
|
@@ -2033,31 +2029,31 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
2033
2029
|
width: 390,
|
|
2034
2030
|
height: 859
|
|
2035
2031
|
}
|
|
2036
|
-
], x = G(
|
|
2037
|
-
if (!
|
|
2038
|
-
let
|
|
2039
|
-
return
|
|
2032
|
+
], x = G(se[0]), ne = G(!1), ee = b(() => ne.value ? Math.max(x.value.width || 0, x.value.height || 0) : Math.min(x.value.width || 0, x.value.height || 0)), re = b(() => ne.value ? Math.min(x.value.width || 0, x.value.height || 0) : Math.max(x.value.width || 0, x.value.height || 0)), me = b(() => window.innerHeight - 72 - 56), ue = b(() => {
|
|
2033
|
+
if (!ee.value) return 1;
|
|
2034
|
+
let q = (me.value - 48) / ee.value, E = re.value * q;
|
|
2035
|
+
return E > window.innerWidth && (q = window.innerWidth / re.value, E = re.value * q), q > 1 ? 1 : q;
|
|
2040
2036
|
});
|
|
2041
|
-
function
|
|
2042
|
-
x.value =
|
|
2037
|
+
function ve(q) {
|
|
2038
|
+
x.value = q;
|
|
2043
2039
|
}
|
|
2044
|
-
function
|
|
2045
|
-
|
|
2040
|
+
function ce() {
|
|
2041
|
+
ne.value = !ne.value;
|
|
2046
2042
|
}
|
|
2047
|
-
return (
|
|
2048
|
-
const
|
|
2049
|
-
return
|
|
2043
|
+
return (q, E) => {
|
|
2044
|
+
const Q = T("FmTooltip"), pe = T("FmButton"), Se = T("FmPageHead");
|
|
2045
|
+
return p(), k(Rl, null, {
|
|
2050
2046
|
default: V(() => [
|
|
2051
|
-
d(
|
|
2047
|
+
d(Se, {
|
|
2052
2048
|
"data-editor-header": "true",
|
|
2053
|
-
actions:
|
|
2054
|
-
"onClick:action":
|
|
2055
|
-
|
|
2049
|
+
actions: ie.value,
|
|
2050
|
+
"onClick:action": E[0] || (E[0] = (K) => {
|
|
2051
|
+
K === "cancel" && J(), K === "save" && de();
|
|
2056
2052
|
})
|
|
2057
2053
|
}, {
|
|
2058
2054
|
title: V(() => [
|
|
2059
|
-
f("div",
|
|
2060
|
-
d(
|
|
2055
|
+
f("div", bo, [
|
|
2056
|
+
d(Q, {
|
|
2061
2057
|
content: a.value,
|
|
2062
2058
|
placement: "bottom"
|
|
2063
2059
|
}, {
|
|
@@ -2068,43 +2064,43 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
2068
2064
|
]),
|
|
2069
2065
|
_: 1
|
|
2070
2066
|
}, 8, ["content"]),
|
|
2071
|
-
f("div",
|
|
2072
|
-
f("div",
|
|
2073
|
-
(
|
|
2074
|
-
var
|
|
2075
|
-
return d(
|
|
2076
|
-
key:
|
|
2077
|
-
label: t(w)(
|
|
2078
|
-
variant: ((
|
|
2067
|
+
f("div", yo, [
|
|
2068
|
+
f("div", ho, [
|
|
2069
|
+
(p(), z(ke, null, Le(se, (K) => {
|
|
2070
|
+
var le;
|
|
2071
|
+
return d(pe, {
|
|
2072
|
+
key: K.labelKey,
|
|
2073
|
+
label: t(w)(K.labelKey),
|
|
2074
|
+
variant: ((le = x.value) == null ? void 0 : le.labelKey) === K.labelKey ? "primary" : "secondary",
|
|
2079
2075
|
size: "md",
|
|
2080
|
-
onClick: (
|
|
2076
|
+
onClick: ($e) => ve(K)
|
|
2081
2077
|
}, null, 8, ["label", "variant", "onClick"]);
|
|
2082
2078
|
}), 64))
|
|
2083
2079
|
]),
|
|
2084
|
-
d(
|
|
2080
|
+
d(pe, {
|
|
2085
2081
|
icon: "screen_rotation",
|
|
2086
2082
|
variant: "tertiary",
|
|
2087
2083
|
size: "md",
|
|
2088
2084
|
class: "text-fm-color-typo-primary",
|
|
2089
|
-
onClick:
|
|
2085
|
+
onClick: ce
|
|
2090
2086
|
})
|
|
2091
2087
|
])
|
|
2092
2088
|
])
|
|
2093
2089
|
]),
|
|
2094
2090
|
_: 1
|
|
2095
2091
|
}, 8, ["actions"]),
|
|
2096
|
-
t(
|
|
2092
|
+
t(D) ? (p(), k(go, {
|
|
2097
2093
|
key: 0,
|
|
2098
|
-
modelValue: t(
|
|
2099
|
-
"onUpdate:modelValue":
|
|
2094
|
+
modelValue: t(D),
|
|
2095
|
+
"onUpdate:modelValue": E[1] || (E[1] = (K) => hl(D) ? D.value = K : null),
|
|
2100
2096
|
"read-only": N.value,
|
|
2101
|
-
style: nl({ height:
|
|
2097
|
+
style: nl({ height: me.value + "px" }),
|
|
2102
2098
|
class: Ae(t(F).lg || t(F).md ? "flex" : ""),
|
|
2103
|
-
"hide-configuration":
|
|
2104
|
-
"preview-width":
|
|
2105
|
-
"preview-height":
|
|
2106
|
-
"preview-scale":
|
|
2107
|
-
onHideConfiguration:
|
|
2099
|
+
"hide-configuration": ae.value,
|
|
2100
|
+
"preview-width": re.value,
|
|
2101
|
+
"preview-height": ee.value,
|
|
2102
|
+
"preview-scale": ue.value,
|
|
2103
|
+
onHideConfiguration: E[2] || (E[2] = (K) => ae.value = K)
|
|
2108
2104
|
}, null, 8, ["modelValue", "read-only", "style", "class", "hide-configuration", "preview-width", "preview-height", "preview-scale"])) : U("", !0)
|
|
2109
2105
|
]),
|
|
2110
2106
|
_: 1
|
|
@@ -2113,5 +2109,5 @@ const xt = { class: "flex flex-col gap-16" }, Ct = {
|
|
|
2113
2109
|
}
|
|
2114
2110
|
});
|
|
2115
2111
|
export {
|
|
2116
|
-
|
|
2112
|
+
zo as default
|
|
2117
2113
|
};
|