@feedmepos/mf-report 5.21.44 → 5.21.46
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-DUh6U-OB.js +272 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DGJLHolh.js → BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js} +35 -6
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CLvbGLP1.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DMlbfzNS.js → Default.vue_vue_type_script_setup_true_lang-Cfl5Ct4b.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-DOO2XMn8.js → FilterSelector.vue_vue_type_script_setup_true_lang-DuhjAzQP.js} +1000 -988
- package/dist/{InsightView-CJkEpae0.js → InsightView-DkIcQpCD.js} +6 -6
- package/dist/{Integration-DEMkBCnc.js → Integration-C0f0Q2os.js} +3 -3
- package/dist/{Integrations-DLLGEyAZ.js → Integrations-BM_vRj0F.js} +3 -3
- package/dist/{Layout-FE1wTFZL.js → Layout-C4YVePzi.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BOUDROhL.js → MenuTab.vue_vue_type_script_setup_true_lang-a72Tflwl.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BtrX0AqU.js → NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-C7rs35Bc.js → NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js} +1 -1
- package/dist/{OverviewView-Ba29IQAU.js → OverviewView-AKRzXwKb.js} +5 -5
- package/dist/{Report-8vDCmOL4.js → Report-aKG6wWUi.js} +4 -4
- package/dist/{ReportEditor-Bk5mjleg.js → ReportEditor-ZRBQHo6K.js} +6 -6
- package/dist/{ReportView-DAVaSfNT.js → ReportView-cWqrG_Nd.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-xr4UKyXl.js → SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js} +1 -1
- package/dist/{Setting-DJNZA7nB.js → Setting-BXEPHSGB.js} +5 -5
- package/dist/TileEditor-Bqhu78EZ.js +2919 -0
- package/dist/{TransitionFade-CMqktP2C.js → TransitionFade-CXHZsIPF.js} +6 -6
- package/dist/{app-3OaaX0uN.js → app-Fb6OY58U.js} +74 -74
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-Bf22-3_a.js → formatChartData.worker-DAwFx8Qz.js} +31 -2
- package/dist/assets/{processTableData.worker-GbyPQNAF.js → processTableData.worker-CGM71S-g.js} +31 -2
- package/dist/{vue-i18n-CO895OyU.js → vue-i18n-DLsuRxx8.js} +1 -1
- package/package.json +1 -1
- package/dist/App-C4pEJKcd.js +0 -278
- package/dist/TileEditor-B9TNHzej.js +0 -2899
|
@@ -0,0 +1,2919 @@
|
|
|
1
|
+
import { defineComponent as q, mergeModels as K, useModel as ee, computed as T, ref as H, resolveComponent as k, createElementBlock as R, openBlock as b, createVNode as u, createElementVNode as F, unref as l, withCtx as N, toDisplayString as j, Fragment as oe, renderList as pe, withModifiers as ne, createTextVNode as ve, watch as re, createCommentVNode as U, createBlock as D, onUnmounted as qe, renderSlot as Be, onMounted as Se, onBeforeUnmount as He, resolveDynamicComponent as je, normalizeClass as ze, withDirectives as se, vShow as ue, normalizeStyle as Ye, isRef as Ge } from "vue";
|
|
2
|
+
import { useRoute as Je, useRouter as Ke } from "vue-router";
|
|
3
|
+
import { h as Qe, d as we, S as ke, _ as Ze, W as el, b as ll, T as ol, a as tl } from "./TransitionFade-CXHZsIPF.js";
|
|
4
|
+
import { W as z, b as Re, d as fe, D as al, S as Ue, C as nl, P as Ne, a as il } from "./BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js";
|
|
5
|
+
import { storeToRefs as de } from "pinia";
|
|
6
|
+
import { u as Me } from "./message-dialog-UoMWOnil.js";
|
|
7
|
+
import { u as J, i as me, b as Pe, g as sl } from "./vue-i18n-DLsuRxx8.js";
|
|
8
|
+
import { useSnackbar as ul, useBreakpoints as Ae, FmButtonColorThemeVariant as Oe } from "@feedmepos/ui-library";
|
|
9
|
+
import { a as Z } from "./SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js";
|
|
10
|
+
import { r as Y } from "./i18n-7InkCBCc.js";
|
|
11
|
+
import { g as ce, u as ye, L as ie, b as be, c as rl, Y as dl, X as ml, _ as Xe, a as cl } from "./FilterSelector.vue_vue_type_script_setup_true_lang-DuhjAzQP.js";
|
|
12
|
+
import { d as he } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js";
|
|
13
|
+
import { d as ge } from "./app-Fb6OY58U.js";
|
|
14
|
+
import { _ as Ee } from "./NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js";
|
|
15
|
+
const Fe = [
|
|
16
|
+
{
|
|
17
|
+
type: z.Circular,
|
|
18
|
+
maxDimension: null,
|
|
19
|
+
maxMetric: 1,
|
|
20
|
+
hasBreakdownDimension: !1,
|
|
21
|
+
canTranspose: !1,
|
|
22
|
+
isDrillConfigurable: !1,
|
|
23
|
+
hasChart: !0,
|
|
24
|
+
hasTable: !1,
|
|
25
|
+
hasLabel: !0,
|
|
26
|
+
hasLegend: !0,
|
|
27
|
+
hasXy: !1,
|
|
28
|
+
canRollup: !1,
|
|
29
|
+
showRollupPosition: !1,
|
|
30
|
+
canSearch: !1,
|
|
31
|
+
periodType: null
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: z.Table,
|
|
35
|
+
maxDimension: null,
|
|
36
|
+
maxMetric: null,
|
|
37
|
+
hasBreakdownDimension: !1,
|
|
38
|
+
canTranspose: !1,
|
|
39
|
+
isDrillConfigurable: !0,
|
|
40
|
+
hasChart: !1,
|
|
41
|
+
hasTable: !0,
|
|
42
|
+
hasLabel: !1,
|
|
43
|
+
hasLegend: !1,
|
|
44
|
+
hasXy: !1,
|
|
45
|
+
canRollup: !0,
|
|
46
|
+
showRollupPosition: !0,
|
|
47
|
+
canSearch: !0,
|
|
48
|
+
periodType: null
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: z.BarChart,
|
|
52
|
+
maxDimension: null,
|
|
53
|
+
maxMetric: 1,
|
|
54
|
+
hasBreakdownDimension: !0,
|
|
55
|
+
canTranspose: !0,
|
|
56
|
+
isDrillConfigurable: !1,
|
|
57
|
+
hasChart: !0,
|
|
58
|
+
hasTable: !1,
|
|
59
|
+
hasLabel: !0,
|
|
60
|
+
hasLegend: !0,
|
|
61
|
+
hasXy: !0,
|
|
62
|
+
canRollup: !1,
|
|
63
|
+
showRollupPosition: !1,
|
|
64
|
+
canSearch: !1,
|
|
65
|
+
periodType: null
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: z.LineChart,
|
|
69
|
+
maxDimension: null,
|
|
70
|
+
maxMetric: 1,
|
|
71
|
+
hasBreakdownDimension: !0,
|
|
72
|
+
canTranspose: !0,
|
|
73
|
+
isDrillConfigurable: !1,
|
|
74
|
+
hasChart: !0,
|
|
75
|
+
hasTable: !1,
|
|
76
|
+
hasLabel: !0,
|
|
77
|
+
hasLegend: !0,
|
|
78
|
+
hasXy: !0,
|
|
79
|
+
canRollup: !1,
|
|
80
|
+
showRollupPosition: !1,
|
|
81
|
+
canSearch: !1,
|
|
82
|
+
periodType: null
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: z.StackBarChart,
|
|
86
|
+
maxDimension: null,
|
|
87
|
+
maxMetric: 1,
|
|
88
|
+
hasBreakdownDimension: !0,
|
|
89
|
+
canTranspose: !0,
|
|
90
|
+
isDrillConfigurable: !1,
|
|
91
|
+
hasChart: !0,
|
|
92
|
+
hasTable: !1,
|
|
93
|
+
hasLabel: !0,
|
|
94
|
+
hasLegend: !0,
|
|
95
|
+
hasXy: !0,
|
|
96
|
+
canRollup: !1,
|
|
97
|
+
showRollupPosition: !1,
|
|
98
|
+
canSearch: !1,
|
|
99
|
+
periodType: null
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: z.StackLineChart,
|
|
103
|
+
maxDimension: null,
|
|
104
|
+
maxMetric: 1,
|
|
105
|
+
hasBreakdownDimension: !0,
|
|
106
|
+
canTranspose: !0,
|
|
107
|
+
isDrillConfigurable: !1,
|
|
108
|
+
hasChart: !0,
|
|
109
|
+
hasTable: !1,
|
|
110
|
+
hasLabel: !0,
|
|
111
|
+
hasLegend: !0,
|
|
112
|
+
hasXy: !0,
|
|
113
|
+
canRollup: !1,
|
|
114
|
+
showRollupPosition: !1,
|
|
115
|
+
canSearch: !1,
|
|
116
|
+
periodType: null
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
type: z.Scorecard,
|
|
120
|
+
maxDimension: null,
|
|
121
|
+
maxMetric: 1,
|
|
122
|
+
hasBreakdownDimension: !1,
|
|
123
|
+
canTranspose: !1,
|
|
124
|
+
isDrillConfigurable: !1,
|
|
125
|
+
hasChart: !1,
|
|
126
|
+
hasTable: !1,
|
|
127
|
+
hasLabel: !1,
|
|
128
|
+
hasLegend: !1,
|
|
129
|
+
hasXy: !1,
|
|
130
|
+
canRollup: !1,
|
|
131
|
+
showRollupPosition: !1,
|
|
132
|
+
canSearch: !1,
|
|
133
|
+
periodType: null
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: z.Spacer,
|
|
137
|
+
maxDimension: 0,
|
|
138
|
+
maxMetric: 0,
|
|
139
|
+
hasBreakdownDimension: !1,
|
|
140
|
+
canTranspose: !1,
|
|
141
|
+
isDrillConfigurable: !1,
|
|
142
|
+
hasChart: !1,
|
|
143
|
+
hasTable: !1,
|
|
144
|
+
hasLabel: !1,
|
|
145
|
+
hasLegend: !1,
|
|
146
|
+
hasXy: !1,
|
|
147
|
+
canRollup: !1,
|
|
148
|
+
showRollupPosition: !1,
|
|
149
|
+
canSearch: !1,
|
|
150
|
+
periodType: null
|
|
151
|
+
}
|
|
152
|
+
], pl = { class: "flex flex-col my-2 gap-8" }, vl = { class: "fm-typo-en-body-lg-600" }, fl = { class: "text-sm text-fm-color-neutral-gray-400" }, gl = ["onClick"], bl = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, yl = /* @__PURE__ */ q({
|
|
153
|
+
__name: "SchemaSection",
|
|
154
|
+
props: /* @__PURE__ */ K({
|
|
155
|
+
options: {
|
|
156
|
+
type: Array,
|
|
157
|
+
default: () => []
|
|
158
|
+
},
|
|
159
|
+
label: {
|
|
160
|
+
type: String,
|
|
161
|
+
default: "Schema"
|
|
162
|
+
}
|
|
163
|
+
}, {
|
|
164
|
+
modelValue: { required: !0 },
|
|
165
|
+
modelModifiers: {}
|
|
166
|
+
}),
|
|
167
|
+
emits: ["update:modelValue"],
|
|
168
|
+
setup(x) {
|
|
169
|
+
const { t: d, te: t } = J(), i = ee(x, "modelValue"), a = x, { schemas: g } = de(Re()), y = T(
|
|
170
|
+
() => g.value.map((f) => ({
|
|
171
|
+
label: f.label,
|
|
172
|
+
value: f.name,
|
|
173
|
+
raw: f
|
|
174
|
+
}))
|
|
175
|
+
), p = T(() => {
|
|
176
|
+
if (i.value.schemaNames.length === 0 || o.value === 0)
|
|
177
|
+
return y.value.filter((f) => !f.raw.isJoinOnly);
|
|
178
|
+
{
|
|
179
|
+
const f = i.value.schemaNames[0], _ = g.value.find((S) => S.name === f), L = ((_ == null ? void 0 : _.joins) || []).map((S) => S);
|
|
180
|
+
return y.value.filter((S) => L.includes(S.raw.name));
|
|
181
|
+
}
|
|
182
|
+
}), V = H(!1), h = H(""), o = H(), s = ul();
|
|
183
|
+
function C(f) {
|
|
184
|
+
var _;
|
|
185
|
+
return Y(
|
|
186
|
+
d,
|
|
187
|
+
t,
|
|
188
|
+
(_ = g.value.find((L) => L.name === f)) == null ? void 0 : _.label,
|
|
189
|
+
"schema"
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
function w(f) {
|
|
193
|
+
o.value = f, V.value = !0, f !== void 0 ? h.value = i.value.schemaNames[f] : h.value = "";
|
|
194
|
+
}
|
|
195
|
+
function O() {
|
|
196
|
+
h.value !== "" ? (o.value !== void 0 ? i.value.schemaNames[o.value] = h.value : i.value.schemaNames.push(h.value), V.value = !1) : s.open({ message: d("report.section.schema.nothingSelected"), type: "error" });
|
|
197
|
+
}
|
|
198
|
+
return (f, _) => {
|
|
199
|
+
const L = k("FmForm"), S = k("FmIcon"), n = k("FmField");
|
|
200
|
+
return b(), R("div", pl, [
|
|
201
|
+
u(fe, {
|
|
202
|
+
modelValue: V.value,
|
|
203
|
+
"onUpdate:modelValue": _[1] || (_[1] = (e) => V.value = e),
|
|
204
|
+
title: a.label,
|
|
205
|
+
"primary-button-label": l(d)("report.common.confirm"),
|
|
206
|
+
"secondary-button-label": l(d)("report.common.cancel"),
|
|
207
|
+
onConfirm: O
|
|
208
|
+
}, {
|
|
209
|
+
content: N(() => [
|
|
210
|
+
u(L, { ref: "form" }, {
|
|
211
|
+
default: N(() => [
|
|
212
|
+
u(Z, {
|
|
213
|
+
modelValue: h.value,
|
|
214
|
+
"onUpdate:modelValue": _[0] || (_[0] = (e) => h.value = e),
|
|
215
|
+
label: l(d)("report.section.schema.title"),
|
|
216
|
+
items: o.value === 0 ? y.value.map((e) => ({
|
|
217
|
+
label: l(Y)(l(d), l(t), e.label, "schema"),
|
|
218
|
+
value: e.value
|
|
219
|
+
})) : p.value.map((e) => ({
|
|
220
|
+
label: l(Y)(l(d), l(t), e.label, "schema"),
|
|
221
|
+
value: e.value
|
|
222
|
+
}))
|
|
223
|
+
}, null, 8, ["modelValue", "label", "items"])
|
|
224
|
+
]),
|
|
225
|
+
_: 1
|
|
226
|
+
}, 512)
|
|
227
|
+
]),
|
|
228
|
+
_: 1
|
|
229
|
+
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
230
|
+
F("div", null, [
|
|
231
|
+
F("p", vl, j(l(d)("report.section.schema.title")), 1),
|
|
232
|
+
F("p", fl, j(l(d)("report.section.schema.description")), 1)
|
|
233
|
+
]),
|
|
234
|
+
(b(!0), R(oe, null, pe(i.value.schemaNames, (e, m) => (b(), R("div", {
|
|
235
|
+
key: m,
|
|
236
|
+
class: "flex flex-col gap-2 w-full"
|
|
237
|
+
}, [
|
|
238
|
+
F("div", {
|
|
239
|
+
class: "flex items-center gap-2 border rounded-md border-neutral-300 p-2 h-[40px]",
|
|
240
|
+
onClick: (r) => w(m)
|
|
241
|
+
}, [
|
|
242
|
+
F("p", bl, j(C(e)), 1),
|
|
243
|
+
_[3] || (_[3] = F("div", { class: "grow" }, null, -1)),
|
|
244
|
+
u(S, {
|
|
245
|
+
name: "close",
|
|
246
|
+
onClick: ne(
|
|
247
|
+
() => {
|
|
248
|
+
i.value.schemaNames = l(Qe)(i.value.schemaNames, m);
|
|
249
|
+
},
|
|
250
|
+
["stop"]
|
|
251
|
+
)
|
|
252
|
+
}, null, 8, ["onClick"])
|
|
253
|
+
], 8, gl)
|
|
254
|
+
]))), 128)),
|
|
255
|
+
u(n, {
|
|
256
|
+
class: "text-fm-color-typo-tertiary",
|
|
257
|
+
onClick: _[2] || (_[2] = () => {
|
|
258
|
+
w();
|
|
259
|
+
})
|
|
260
|
+
}, {
|
|
261
|
+
default: N(() => [
|
|
262
|
+
ve(j(l(d)("report.section.schema.add")), 1)
|
|
263
|
+
]),
|
|
264
|
+
_: 1
|
|
265
|
+
})
|
|
266
|
+
]);
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
}), hl = {
|
|
270
|
+
key: 0,
|
|
271
|
+
class: "flex flex-col my-2 gap-8"
|
|
272
|
+
}, Vl = { class: "fm-typo-en-body-lg-600 text-ellipsis line-clamp-1" }, wl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Fl = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, xe = /* @__PURE__ */ q({
|
|
273
|
+
__name: "DimensionSection",
|
|
274
|
+
props: /* @__PURE__ */ K({
|
|
275
|
+
options: {
|
|
276
|
+
type: Array,
|
|
277
|
+
default: () => []
|
|
278
|
+
},
|
|
279
|
+
label: {
|
|
280
|
+
type: String,
|
|
281
|
+
default: "title"
|
|
282
|
+
},
|
|
283
|
+
max: {
|
|
284
|
+
type: Number,
|
|
285
|
+
default: void 0
|
|
286
|
+
},
|
|
287
|
+
config: {
|
|
288
|
+
type: Object,
|
|
289
|
+
default: () => {
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
hasRowColumn: {
|
|
293
|
+
type: Boolean,
|
|
294
|
+
default: !1
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
modelValue: {
|
|
298
|
+
required: !1,
|
|
299
|
+
default: []
|
|
300
|
+
},
|
|
301
|
+
modelModifiers: {}
|
|
302
|
+
}),
|
|
303
|
+
emits: ["update:modelValue"],
|
|
304
|
+
setup(x) {
|
|
305
|
+
const { t: d, te: t } = J(), i = ee(x, "modelValue"), a = x, g = T(() => d(`report.section.dimension.${a.label}`)), y = H(!1), p = T(
|
|
306
|
+
() => i.value.map((r, c) => ({
|
|
307
|
+
index: c,
|
|
308
|
+
labels: [r.label || r.name],
|
|
309
|
+
value: r
|
|
310
|
+
}))
|
|
311
|
+
), V = H(i.value.length > 0 ? 0 : void 0);
|
|
312
|
+
function h(r) {
|
|
313
|
+
var c, v, I, M;
|
|
314
|
+
y.value = !0, o.value = r != null && r.value ? JSON.parse(
|
|
315
|
+
JSON.stringify({
|
|
316
|
+
...r.value,
|
|
317
|
+
label: Y(d, t, (c = r.value) == null ? void 0 : c.label, "other"),
|
|
318
|
+
moveToColumn: (((v = a.config) == null ? void 0 : v.columnIds) || []).includes(ce(r.value))
|
|
319
|
+
})
|
|
320
|
+
) : void 0, V.value = r == null ? void 0 : r.index, s.value = !!((I = o.value) != null && I.dataFormula || (M = o.value) != null && M.displayFormula), o.value && o.value.formatter === void 0 && (a.options.find(
|
|
321
|
+
(Q) => {
|
|
322
|
+
var E, X;
|
|
323
|
+
return Q.schemaName === ((E = o.value) == null ? void 0 : E.schemaName) && Q.name === ((X = o.value) == null ? void 0 : X.name);
|
|
324
|
+
}
|
|
325
|
+
), r != null && r.value.timeFormatter && o.value.formatter === void 0 && (o.value.formatter = r == null ? void 0 : r.value.timeFormatter, o.value.timeFormatter = void 0));
|
|
326
|
+
}
|
|
327
|
+
const o = H(void 0), s = H(!1), C = T(
|
|
328
|
+
() => a.options.find(
|
|
329
|
+
(r) => {
|
|
330
|
+
var c, v;
|
|
331
|
+
return r.schemaName === ((c = o.value) == null ? void 0 : c.schemaName) && r.name === ((v = o.value) == null ? void 0 : v.name);
|
|
332
|
+
}
|
|
333
|
+
) ?? {}
|
|
334
|
+
);
|
|
335
|
+
re(
|
|
336
|
+
() => {
|
|
337
|
+
var r;
|
|
338
|
+
return (r = o.value) == null ? void 0 : r.option;
|
|
339
|
+
},
|
|
340
|
+
() => {
|
|
341
|
+
!w.value && o.value && (o.value.fillGap = !1);
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
const w = T(
|
|
345
|
+
() => {
|
|
346
|
+
var r, c, v;
|
|
347
|
+
return (v = (r = C.value) == null ? void 0 : r.fillGapDimensionOptions) == null ? void 0 : v.includes(((c = o.value) == null ? void 0 : c.option) || "");
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
function O(r) {
|
|
351
|
+
var c, v;
|
|
352
|
+
(r.schemaName !== ((c = o.value) == null ? void 0 : c.schemaName) || r.name !== ((v = o.value) == null ? void 0 : v.name)) && (o.value = {
|
|
353
|
+
schemaName: r.schemaName,
|
|
354
|
+
name: r.name,
|
|
355
|
+
option: r.dimensionOptions[0],
|
|
356
|
+
label: Y(d, t, r.label, "other"),
|
|
357
|
+
decimal: r.isNumericType ? 2 : void 0,
|
|
358
|
+
hide: !1
|
|
359
|
+
}, s.value = !1);
|
|
360
|
+
}
|
|
361
|
+
function f() {
|
|
362
|
+
if (!o.value) {
|
|
363
|
+
console.error("new field is undefined");
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
const r = [...p.value.map((c) => c.value)];
|
|
367
|
+
s.value || (o.value.dataFormula = void 0), V.value !== void 0 ? r[V.value] = o.value : r.push(o.value), i.value = r, y.value = !1;
|
|
368
|
+
}
|
|
369
|
+
function _(r) {
|
|
370
|
+
const v = [...p.value.map((I) => I.value)].filter((I, M) => M !== r);
|
|
371
|
+
i.value = v;
|
|
372
|
+
}
|
|
373
|
+
function L(r) {
|
|
374
|
+
o.value && (o.value.decimal = Number(r));
|
|
375
|
+
}
|
|
376
|
+
function S(r) {
|
|
377
|
+
const c = `report.section.filter.${me(r)}`;
|
|
378
|
+
return t(c) ? d(c) : Y(d, t, r, "field");
|
|
379
|
+
}
|
|
380
|
+
function n(r) {
|
|
381
|
+
const c = `report.section.metric.formatterType.${r}`;
|
|
382
|
+
return t(c) ? d(c) : r;
|
|
383
|
+
}
|
|
384
|
+
function e(r) {
|
|
385
|
+
return Array.isArray(r) ? r.length > 0 : r;
|
|
386
|
+
}
|
|
387
|
+
const m = T(
|
|
388
|
+
() => a.options.map((r) => ({
|
|
389
|
+
label: r.labels.join(" "),
|
|
390
|
+
value: r
|
|
391
|
+
}))
|
|
392
|
+
);
|
|
393
|
+
return (r, c) => {
|
|
394
|
+
const v = k("FmTextField"), I = k("FmStepperField"), M = k("FmCheckbox"), Q = k("FmTextarea"), E = k("FmForm"), X = k("FmIcon"), G = k("FmButton"), te = k("FmListItem"), $ = k("FmList"), P = k("FmField");
|
|
395
|
+
return x.max !== 0 ? (b(), R("div", hl, [
|
|
396
|
+
u(fe, {
|
|
397
|
+
modelValue: y.value,
|
|
398
|
+
"onUpdate:modelValue": c[12] || (c[12] = (W) => y.value = W),
|
|
399
|
+
title: g.value,
|
|
400
|
+
"primary-button-label": l(d)("report.common.confirm"),
|
|
401
|
+
"secondary-button-label": l(d)("report.common.cancel"),
|
|
402
|
+
onConfirm: f
|
|
403
|
+
}, {
|
|
404
|
+
content: N(() => [
|
|
405
|
+
u(E, {
|
|
406
|
+
ref: "form",
|
|
407
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
408
|
+
}, {
|
|
409
|
+
default: N(() => {
|
|
410
|
+
var W, ae, B, le, Te, $e, De;
|
|
411
|
+
return [
|
|
412
|
+
u(Z, {
|
|
413
|
+
"model-value": C.value,
|
|
414
|
+
items: m.value,
|
|
415
|
+
placeholder: g.value,
|
|
416
|
+
label: g.value,
|
|
417
|
+
"onUpdate:modelValue": c[0] || (c[0] = (A) => O(A))
|
|
418
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
419
|
+
o.value ? (b(), R(oe, { key: 0 }, [
|
|
420
|
+
u(v, {
|
|
421
|
+
modelValue: o.value.label,
|
|
422
|
+
"onUpdate:modelValue": c[1] || (c[1] = (A) => o.value.label = A),
|
|
423
|
+
label: l(d)("report.section.dimension.label")
|
|
424
|
+
}, null, 8, ["modelValue", "label"]),
|
|
425
|
+
(((W = C.value) == null ? void 0 : W.dimensionOptions) || []).length > 0 ? (b(), D(Z, {
|
|
426
|
+
key: 0,
|
|
427
|
+
modelValue: o.value.option,
|
|
428
|
+
"onUpdate:modelValue": c[2] || (c[2] = (A) => o.value.option = A),
|
|
429
|
+
items: ((ae = C.value) == null ? void 0 : ae.dimensionOptions.map((A) => ({
|
|
430
|
+
label: S(A),
|
|
431
|
+
value: A
|
|
432
|
+
}))) ?? []
|
|
433
|
+
}, null, 8, ["modelValue", "items"])) : U("", !0),
|
|
434
|
+
(B = C.value) != null && B.isNumericType ? (b(), D(I, {
|
|
435
|
+
key: 1,
|
|
436
|
+
label: l(d)("report.common.decimal"),
|
|
437
|
+
"model-value": ((le = o.value) == null ? void 0 : le.decimal) ?? 2,
|
|
438
|
+
"onUpdate:modelValue": c[3] || (c[3] = (A) => {
|
|
439
|
+
L(A);
|
|
440
|
+
})
|
|
441
|
+
}, null, 8, ["label", "model-value"])) : U("", !0),
|
|
442
|
+
(Te = C.value) != null && Te.isNumericType ? (b(), D(Z, {
|
|
443
|
+
key: 2,
|
|
444
|
+
modelValue: o.value.formatter,
|
|
445
|
+
"onUpdate:modelValue": c[4] || (c[4] = (A) => o.value.formatter = A),
|
|
446
|
+
placeholder: l(d)("report.section.dimension.formatter"),
|
|
447
|
+
label: l(d)("report.section.dimension.formatter"),
|
|
448
|
+
items: [
|
|
449
|
+
{ label: l(d)("report.section.metric.formatterType.NONE"), value: null },
|
|
450
|
+
...((($e = C.value) == null ? void 0 : $e.formatters) || []).map((A) => ({
|
|
451
|
+
label: n(A),
|
|
452
|
+
value: A
|
|
453
|
+
}))
|
|
454
|
+
]
|
|
455
|
+
}, null, 8, ["modelValue", "placeholder", "label", "items"])) : U("", !0),
|
|
456
|
+
w.value ? (b(), D(M, {
|
|
457
|
+
key: 3,
|
|
458
|
+
"model-value": o.value.fillGap ?? !1,
|
|
459
|
+
label: l(d)("report.section.dimension.fillGap"),
|
|
460
|
+
value: "",
|
|
461
|
+
placeholder: "Fill gap",
|
|
462
|
+
"onUpdate:modelValue": c[5] || (c[5] = (A) => {
|
|
463
|
+
o.value && (o.value.fillGap = e(A));
|
|
464
|
+
})
|
|
465
|
+
}, null, 8, ["model-value", "label"])) : U("", !0),
|
|
466
|
+
((De = C.value) == null ? void 0 : De.type) === l(al).Timestamp ? (b(), D(M, {
|
|
467
|
+
key: 4,
|
|
468
|
+
"model-value": o.value.dateComparison ?? !1,
|
|
469
|
+
label: l(d)("report.section.dimension.dateComparison"),
|
|
470
|
+
value: "",
|
|
471
|
+
"onUpdate:modelValue": c[6] || (c[6] = (A) => {
|
|
472
|
+
o.value && (o.value.dateComparison = e(A));
|
|
473
|
+
})
|
|
474
|
+
}, null, 8, ["model-value", "label"])) : U("", !0),
|
|
475
|
+
u(M, {
|
|
476
|
+
modelValue: o.value.hide,
|
|
477
|
+
"onUpdate:modelValue": c[7] || (c[7] = (A) => o.value.hide = A),
|
|
478
|
+
label: l(d)("report.section.dimension.hide"),
|
|
479
|
+
value: ""
|
|
480
|
+
}, null, 8, ["modelValue", "label"]),
|
|
481
|
+
a.hasRowColumn ? (b(), D(M, {
|
|
482
|
+
key: 5,
|
|
483
|
+
"model-value": o.value.moveToColumn ?? !1,
|
|
484
|
+
label: l(d)("report.section.dimension.moveToColumn"),
|
|
485
|
+
value: "",
|
|
486
|
+
"onUpdate:modelValue": c[8] || (c[8] = (A) => {
|
|
487
|
+
o.value && (o.value.moveToColumn = e(A));
|
|
488
|
+
})
|
|
489
|
+
}, null, 8, ["model-value", "label"])) : U("", !0),
|
|
490
|
+
u(M, {
|
|
491
|
+
modelValue: s.value,
|
|
492
|
+
"onUpdate:modelValue": c[9] || (c[9] = (A) => s.value = A),
|
|
493
|
+
label: l(d)("report.section.dimension.advance"),
|
|
494
|
+
value: !0
|
|
495
|
+
}, null, 8, ["modelValue", "label"]),
|
|
496
|
+
s.value ? (b(), D(Q, {
|
|
497
|
+
key: 6,
|
|
498
|
+
modelValue: o.value.dataFormula,
|
|
499
|
+
"onUpdate:modelValue": c[10] || (c[10] = (A) => o.value.dataFormula = A),
|
|
500
|
+
placeholder: l(d)("report.section.dimension.dataFormula")
|
|
501
|
+
}, null, 8, ["modelValue", "placeholder"])) : U("", !0),
|
|
502
|
+
s.value ? (b(), D(Q, {
|
|
503
|
+
key: 7,
|
|
504
|
+
modelValue: o.value.displayFormula,
|
|
505
|
+
"onUpdate:modelValue": c[11] || (c[11] = (A) => o.value.displayFormula = A),
|
|
506
|
+
placeholder: l(d)("report.section.dimension.displayFormula")
|
|
507
|
+
}, null, 8, ["modelValue", "placeholder"])) : U("", !0)
|
|
508
|
+
], 64)) : U("", !0)
|
|
509
|
+
];
|
|
510
|
+
}),
|
|
511
|
+
_: 1
|
|
512
|
+
}, 512)
|
|
513
|
+
]),
|
|
514
|
+
_: 1
|
|
515
|
+
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
516
|
+
F("div", null, [
|
|
517
|
+
F("p", Vl, j(g.value), 1),
|
|
518
|
+
F("p", wl, j(l(d)("report.section.dimension.description")), 1)
|
|
519
|
+
]),
|
|
520
|
+
u($, null, {
|
|
521
|
+
default: N(() => [
|
|
522
|
+
u(l(we), {
|
|
523
|
+
list: i.value,
|
|
524
|
+
"item-key": (W) => l(ce)(W),
|
|
525
|
+
class: "flex flex-col gap-2"
|
|
526
|
+
}, {
|
|
527
|
+
item: N(({ element: W, index: ae }) => [
|
|
528
|
+
u(te, {
|
|
529
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
530
|
+
onClick: ne((B) => h(p.value[ae]), ["stop"])
|
|
531
|
+
}, {
|
|
532
|
+
default: N(() => [
|
|
533
|
+
u(X, { name: "drag_handle" }),
|
|
534
|
+
F("p", Fl, j(l(Y)(l(d), l(t), W.label, "other")), 1),
|
|
535
|
+
c[14] || (c[14] = F("div", { class: "grow" }, null, -1)),
|
|
536
|
+
u(G, {
|
|
537
|
+
icon: "close",
|
|
538
|
+
size: "md",
|
|
539
|
+
variant: "tertiary",
|
|
540
|
+
onClick: ne((B) => _(ae), ["stop"])
|
|
541
|
+
}, null, 8, ["onClick"])
|
|
542
|
+
]),
|
|
543
|
+
_: 2
|
|
544
|
+
}, 1032, ["onClick"])
|
|
545
|
+
]),
|
|
546
|
+
_: 1
|
|
547
|
+
}, 8, ["list", "item-key"])
|
|
548
|
+
]),
|
|
549
|
+
_: 1
|
|
550
|
+
}),
|
|
551
|
+
u(P, {
|
|
552
|
+
class: "text-fm-color-typo-tertiary",
|
|
553
|
+
onClick: c[13] || (c[13] = () => {
|
|
554
|
+
h();
|
|
555
|
+
})
|
|
556
|
+
}, {
|
|
557
|
+
default: N(() => [
|
|
558
|
+
ve(j(l(d)("report.section.dimension.add")), 1)
|
|
559
|
+
]),
|
|
560
|
+
_: 1
|
|
561
|
+
})
|
|
562
|
+
])) : U("", !0);
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
}), Ce = {
|
|
566
|
+
value: "_metric_name"
|
|
567
|
+
};
|
|
568
|
+
function xl(x, d, t) {
|
|
569
|
+
switch (x) {
|
|
570
|
+
case z.BarChart:
|
|
571
|
+
case z.StackBarChart:
|
|
572
|
+
case z.LineChart:
|
|
573
|
+
case z.StackLineChart:
|
|
574
|
+
case z.Circular:
|
|
575
|
+
return d.length > 1;
|
|
576
|
+
default:
|
|
577
|
+
return t;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function kl(x) {
|
|
581
|
+
var i;
|
|
582
|
+
const { rowIds: d, columnIds: t } = Ve(x.widget.config);
|
|
583
|
+
return {
|
|
584
|
+
...x,
|
|
585
|
+
widget: {
|
|
586
|
+
...x.widget,
|
|
587
|
+
config: {
|
|
588
|
+
...x.widget.config,
|
|
589
|
+
rowIds: d,
|
|
590
|
+
columnIds: t,
|
|
591
|
+
isDrillable: xl(
|
|
592
|
+
x.widget.type,
|
|
593
|
+
x.widget.config.dimensions,
|
|
594
|
+
x.widget.config.isDrillable
|
|
595
|
+
),
|
|
596
|
+
joinDatasources: (i = x.widget.config.joinDatasources) == null ? void 0 : i.map((a) => {
|
|
597
|
+
const { rowIds: g, columnIds: y } = Ve(a);
|
|
598
|
+
return {
|
|
599
|
+
...a,
|
|
600
|
+
rowIds: g,
|
|
601
|
+
columnIds: y
|
|
602
|
+
};
|
|
603
|
+
})
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
function Ve(x) {
|
|
609
|
+
const d = x.dimensions.filter((y) => y.hide !== !0 && !y.moveToColumn).map((y) => ce(y)), t = x.dimensions.filter((y) => y.hide !== !0 && y.moveToColumn == !0).map((y) => ce(y)), i = x.metrics.length > 0;
|
|
610
|
+
i && x.metrics.find((y) => y.moveToRow == !0) ? d.push(Ce.value) : i && t.push(Ce.value);
|
|
611
|
+
const a = [], g = [];
|
|
612
|
+
for (const y of d)
|
|
613
|
+
a.push(y);
|
|
614
|
+
for (const y of t)
|
|
615
|
+
g.push(y);
|
|
616
|
+
return {
|
|
617
|
+
rowIds: a,
|
|
618
|
+
columnIds: g
|
|
619
|
+
};
|
|
620
|
+
}
|
|
621
|
+
const Cl = { class: "flex flex-col my-2 gap-8" }, _l = { class: "fm-typo-en-body-lg-600" }, Sl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Tl = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, $l = /* @__PURE__ */ q({
|
|
622
|
+
__name: "MetricSection",
|
|
623
|
+
props: /* @__PURE__ */ K({
|
|
624
|
+
options: {
|
|
625
|
+
type: Array,
|
|
626
|
+
default: () => []
|
|
627
|
+
},
|
|
628
|
+
label: {
|
|
629
|
+
type: String,
|
|
630
|
+
default: "title"
|
|
631
|
+
},
|
|
632
|
+
max: {
|
|
633
|
+
type: Number,
|
|
634
|
+
default: void 0
|
|
635
|
+
},
|
|
636
|
+
config: {
|
|
637
|
+
type: Object,
|
|
638
|
+
default: () => {
|
|
639
|
+
}
|
|
640
|
+
},
|
|
641
|
+
hasRowColumn: {
|
|
642
|
+
type: Boolean,
|
|
643
|
+
default: !1
|
|
644
|
+
}
|
|
645
|
+
}, {
|
|
646
|
+
modelValue: { required: !1, default: [] },
|
|
647
|
+
modelModifiers: {}
|
|
648
|
+
}),
|
|
649
|
+
emits: /* @__PURE__ */ K(["config"], ["update:modelValue"]),
|
|
650
|
+
setup(x, { emit: d }) {
|
|
651
|
+
const { t, te: i } = J(), a = ee(x, "modelValue"), g = x;
|
|
652
|
+
T(() => !!g.max && a.value.length === g.max);
|
|
653
|
+
const y = T(() => t(`report.section.metric.${g.label}`)), p = H(!1), V = T(
|
|
654
|
+
() => a.value.map((e, m) => ({
|
|
655
|
+
index: m,
|
|
656
|
+
labels: [e.label || e.name],
|
|
657
|
+
value: e
|
|
658
|
+
}))
|
|
659
|
+
), h = H(a.value.length > 0 ? 0 : void 0);
|
|
660
|
+
function o(e) {
|
|
661
|
+
var m, r, c;
|
|
662
|
+
p.value = !0, s.value = e != null && e.value ? JSON.parse(
|
|
663
|
+
JSON.stringify({
|
|
664
|
+
...e.value,
|
|
665
|
+
label: Y(t, i, e.value.label, "other")
|
|
666
|
+
})
|
|
667
|
+
) : void 0, h.value = e == null ? void 0 : e.index, C.value = !!((m = s.value) != null && m.dataFormula || (r = s.value) != null && r.displayFormula), s.value && s.value.formatter === void 0 && (g.options.find(
|
|
668
|
+
(v) => {
|
|
669
|
+
var I, M;
|
|
670
|
+
return v.schemaName === ((I = s.value) == null ? void 0 : I.schemaName) && v.name === ((M = s.value) == null ? void 0 : M.name);
|
|
671
|
+
}
|
|
672
|
+
), e != null && e.value.timeFormatter && s.value.formatter === void 0 && (s.value.formatter = e == null ? void 0 : e.value.timeFormatter, s.value.timeFormatter = void 0)), ((c = g.config.rowIds) == null ? void 0 : c.findIndex((v) => v === Ce.value)) !== -1 && s.value && (s.value.moveToRow = !0);
|
|
673
|
+
}
|
|
674
|
+
const s = H(void 0), C = H(!1), w = T(
|
|
675
|
+
() => g.options.find(
|
|
676
|
+
(e) => {
|
|
677
|
+
var m, r;
|
|
678
|
+
return e.schemaName === ((m = s.value) == null ? void 0 : m.schemaName) && e.name === ((r = s.value) == null ? void 0 : r.name);
|
|
679
|
+
}
|
|
680
|
+
) ?? {}
|
|
681
|
+
);
|
|
682
|
+
function O(e, m) {
|
|
683
|
+
var r;
|
|
684
|
+
return (e == null ? void 0 : e.isNumericType) || ((r = e == null ? void 0 : e.isNumericAggregations) == null ? void 0 : r.includes(m || ""));
|
|
685
|
+
}
|
|
686
|
+
const f = T(
|
|
687
|
+
() => {
|
|
688
|
+
var e;
|
|
689
|
+
return O(w.value, (e = s.value) == null ? void 0 : e.aggregation);
|
|
690
|
+
}
|
|
691
|
+
);
|
|
692
|
+
re(f, (e) => {
|
|
693
|
+
s.value && (e ? s.value.decimal = typeof s.value.decimal != "number" ? 2 : s.value.decimal : s.value.decimal = void 0);
|
|
694
|
+
});
|
|
695
|
+
function _(e) {
|
|
696
|
+
var m, r;
|
|
697
|
+
(e.schemaName !== ((m = s.value) == null ? void 0 : m.schemaName) || e.name !== ((r = s.value) == null ? void 0 : r.name)) && (s.value = {
|
|
698
|
+
schemaName: e.schemaName,
|
|
699
|
+
name: e.name,
|
|
700
|
+
aggregation: e.aggregations[0],
|
|
701
|
+
label: Y(t, i, e.label, "other"),
|
|
702
|
+
decimal: O(e, e.aggregations[0]) ? 2 : void 0,
|
|
703
|
+
moveToRow: !1,
|
|
704
|
+
hide: !1
|
|
705
|
+
}, C.value = !1);
|
|
706
|
+
}
|
|
707
|
+
function L() {
|
|
708
|
+
const e = [...V.value.map((m) => m.value)];
|
|
709
|
+
s.value && (C.value || (s.value.dataFormula = void 0), h.value !== void 0 ? e[h.value] = s.value : e.push(s.value)), a.value = e, p.value = !1;
|
|
710
|
+
}
|
|
711
|
+
function S(e) {
|
|
712
|
+
const m = [...V.value.map((r) => r.value)];
|
|
713
|
+
m.splice(e, 1), a.value = m;
|
|
714
|
+
}
|
|
715
|
+
const n = T(
|
|
716
|
+
() => g.options.map((e) => ({
|
|
717
|
+
label: e.labels.join(" "),
|
|
718
|
+
value: e
|
|
719
|
+
}))
|
|
720
|
+
);
|
|
721
|
+
return (e, m) => {
|
|
722
|
+
const r = k("FmTextField"), c = k("FmStepperField"), v = k("FmCheckbox"), I = k("FmTextarea"), M = k("FmForm"), Q = k("FmIcon"), E = k("FmButton"), X = k("FmListItem"), G = k("FmList"), te = k("FmField");
|
|
723
|
+
return b(), R("div", Cl, [
|
|
724
|
+
u(fe, {
|
|
725
|
+
modelValue: p.value,
|
|
726
|
+
"onUpdate:modelValue": m[10] || (m[10] = ($) => p.value = $),
|
|
727
|
+
title: y.value,
|
|
728
|
+
onConfirm: L
|
|
729
|
+
}, {
|
|
730
|
+
content: N(() => [
|
|
731
|
+
u(M, {
|
|
732
|
+
ref: "form",
|
|
733
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
734
|
+
}, {
|
|
735
|
+
default: N(() => {
|
|
736
|
+
var $, P, W, ae;
|
|
737
|
+
return [
|
|
738
|
+
u(Z, {
|
|
739
|
+
"model-value": w.value,
|
|
740
|
+
items: n.value,
|
|
741
|
+
placeholder: y.value,
|
|
742
|
+
label: y.value,
|
|
743
|
+
"onUpdate:modelValue": m[0] || (m[0] = (B) => _(B))
|
|
744
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
745
|
+
s.value ? (b(), R(oe, { key: 0 }, [
|
|
746
|
+
u(r, {
|
|
747
|
+
modelValue: s.value.label,
|
|
748
|
+
"onUpdate:modelValue": m[1] || (m[1] = (B) => s.value.label = B),
|
|
749
|
+
label: l(t)("report.section.metric.label")
|
|
750
|
+
}, null, 8, ["modelValue", "label"]),
|
|
751
|
+
((($ = w.value) == null ? void 0 : $.aggregations) || []).length > 0 ? (b(), D(Z, {
|
|
752
|
+
key: 0,
|
|
753
|
+
modelValue: s.value.aggregation,
|
|
754
|
+
"onUpdate:modelValue": m[2] || (m[2] = (B) => s.value.aggregation = B),
|
|
755
|
+
label: l(t)("report.section.metric.aggregation"),
|
|
756
|
+
items: ((P = w.value) == null ? void 0 : P.aggregations.map((B) => ({
|
|
757
|
+
label: l(i)(`report.section.metric.aggregationType.${B}`) ? l(t)(`report.section.metric.aggregationType.${B}`) : l(Y)(l(t), l(i), B, "field"),
|
|
758
|
+
value: B
|
|
759
|
+
}))) ?? []
|
|
760
|
+
}, null, 8, ["modelValue", "label", "items"])) : U("", !0),
|
|
761
|
+
f.value ? (b(), D(c, {
|
|
762
|
+
key: 1,
|
|
763
|
+
label: l(t)("report.common.decimal"),
|
|
764
|
+
"model-value": ((W = s.value) == null ? void 0 : W.decimal) ?? 2,
|
|
765
|
+
"onUpdate:modelValue": m[3] || (m[3] = (B) => {
|
|
766
|
+
s.value && (s.value.decimal = B);
|
|
767
|
+
})
|
|
768
|
+
}, null, 8, ["label", "model-value"])) : U("", !0),
|
|
769
|
+
f.value ? (b(), D(Z, {
|
|
770
|
+
key: 2,
|
|
771
|
+
modelValue: s.value.formatter,
|
|
772
|
+
"onUpdate:modelValue": m[4] || (m[4] = (B) => s.value.formatter = B),
|
|
773
|
+
placeholder: l(t)("report.section.metric.formatter"),
|
|
774
|
+
label: l(t)("report.section.metric.formatter"),
|
|
775
|
+
items: [
|
|
776
|
+
{ label: l(t)("report.section.metric.formatterType.NONE"), value: null },
|
|
777
|
+
...(((ae = w.value) == null ? void 0 : ae.formatters) || []).map((B) => ({
|
|
778
|
+
label: l(i)(`report.section.metric.formatterType.${B}`) ? l(t)(`report.section.metric.formatterType.${B}`) : l(Y)(l(t), l(i), B, "field"),
|
|
779
|
+
value: B
|
|
780
|
+
}))
|
|
781
|
+
]
|
|
782
|
+
}, null, 8, ["modelValue", "placeholder", "label", "items"])) : U("", !0),
|
|
783
|
+
u(v, {
|
|
784
|
+
modelValue: s.value.hide,
|
|
785
|
+
"onUpdate:modelValue": m[5] || (m[5] = (B) => s.value.hide = B),
|
|
786
|
+
label: l(t)("report.section.metric.hide"),
|
|
787
|
+
value: ""
|
|
788
|
+
}, null, 8, ["modelValue", "label"]),
|
|
789
|
+
g.hasRowColumn ? (b(), D(v, {
|
|
790
|
+
key: 3,
|
|
791
|
+
modelValue: s.value.moveToRow,
|
|
792
|
+
"onUpdate:modelValue": m[6] || (m[6] = (B) => s.value.moveToRow = B),
|
|
793
|
+
label: l(t)("report.section.metric.moveToRow"),
|
|
794
|
+
value: ""
|
|
795
|
+
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
796
|
+
u(v, {
|
|
797
|
+
modelValue: C.value,
|
|
798
|
+
"onUpdate:modelValue": m[7] || (m[7] = (B) => C.value = B),
|
|
799
|
+
label: l(t)("report.section.metric.advance"),
|
|
800
|
+
value: !0
|
|
801
|
+
}, null, 8, ["modelValue", "label"]),
|
|
802
|
+
C.value ? (b(), D(I, {
|
|
803
|
+
key: 4,
|
|
804
|
+
modelValue: s.value.dataFormula,
|
|
805
|
+
"onUpdate:modelValue": m[8] || (m[8] = (B) => s.value.dataFormula = B),
|
|
806
|
+
placeholder: l(t)("report.section.metric.dataFormula")
|
|
807
|
+
}, null, 8, ["modelValue", "placeholder"])) : U("", !0),
|
|
808
|
+
C.value ? (b(), D(I, {
|
|
809
|
+
key: 5,
|
|
810
|
+
modelValue: s.value.displayFormula,
|
|
811
|
+
"onUpdate:modelValue": m[9] || (m[9] = (B) => s.value.displayFormula = B),
|
|
812
|
+
placeholder: l(t)("report.section.metric.displayFormula")
|
|
813
|
+
}, null, 8, ["modelValue", "placeholder"])) : U("", !0)
|
|
814
|
+
], 64)) : U("", !0)
|
|
815
|
+
];
|
|
816
|
+
}),
|
|
817
|
+
_: 1
|
|
818
|
+
}, 512)
|
|
819
|
+
]),
|
|
820
|
+
_: 1
|
|
821
|
+
}, 8, ["modelValue", "title"]),
|
|
822
|
+
F("div", null, [
|
|
823
|
+
F("p", _l, j(y.value), 1),
|
|
824
|
+
F("p", Sl, j(l(t)("report.section.metric.description")), 1)
|
|
825
|
+
]),
|
|
826
|
+
u(G, null, {
|
|
827
|
+
default: N(() => [
|
|
828
|
+
u(l(we), {
|
|
829
|
+
list: a.value,
|
|
830
|
+
"item-key": "id",
|
|
831
|
+
class: "flex flex-col gap-2 w-full"
|
|
832
|
+
}, {
|
|
833
|
+
item: N(({ element: $, index: P }) => [
|
|
834
|
+
u(X, {
|
|
835
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
836
|
+
onClick: ne((W) => o(V.value[P]), ["stop"])
|
|
837
|
+
}, {
|
|
838
|
+
default: N(() => [
|
|
839
|
+
u(Q, { name: "drag_handle" }),
|
|
840
|
+
F("p", Tl, j(l(Y)(l(t), l(i), $.label, "other")), 1),
|
|
841
|
+
m[12] || (m[12] = F("div", { class: "grow" }, null, -1)),
|
|
842
|
+
u(E, {
|
|
843
|
+
icon: "close",
|
|
844
|
+
size: "md",
|
|
845
|
+
variant: "tertiary",
|
|
846
|
+
onClick: ne((W) => S(P), ["stop"])
|
|
847
|
+
}, null, 8, ["onClick"])
|
|
848
|
+
]),
|
|
849
|
+
_: 2
|
|
850
|
+
}, 1032, ["onClick"])
|
|
851
|
+
]),
|
|
852
|
+
_: 1
|
|
853
|
+
}, 8, ["list"])
|
|
854
|
+
]),
|
|
855
|
+
_: 1
|
|
856
|
+
}),
|
|
857
|
+
u(te, {
|
|
858
|
+
class: "text-fm-color-typo-tertiary",
|
|
859
|
+
onClick: m[11] || (m[11] = () => {
|
|
860
|
+
o();
|
|
861
|
+
})
|
|
862
|
+
}, {
|
|
863
|
+
default: N(() => [
|
|
864
|
+
ve(j(l(t)("report.section.metric.add")), 1)
|
|
865
|
+
]),
|
|
866
|
+
_: 1
|
|
867
|
+
})
|
|
868
|
+
]);
|
|
869
|
+
};
|
|
870
|
+
}
|
|
871
|
+
}), Dl = { class: "flex flex-col my-2 gap-8" }, Ul = { class: "fm-typo-en-body-lg-600" }, Nl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Ol = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, Ll = /* @__PURE__ */ q({
|
|
872
|
+
__name: "SortSection",
|
|
873
|
+
props: /* @__PURE__ */ K({
|
|
874
|
+
options: {
|
|
875
|
+
type: Array,
|
|
876
|
+
default: () => []
|
|
877
|
+
},
|
|
878
|
+
label: {
|
|
879
|
+
type: String,
|
|
880
|
+
default: "title"
|
|
881
|
+
}
|
|
882
|
+
}, {
|
|
883
|
+
modelValue: { required: !1, default: [] },
|
|
884
|
+
modelModifiers: {}
|
|
885
|
+
}),
|
|
886
|
+
emits: ["update:modelValue"],
|
|
887
|
+
setup(x) {
|
|
888
|
+
const { t: d, te: t } = J(), i = ee(x, "modelValue"), a = x, g = T(() => d(`report.section.sort.${a.label}`)), y = H(!1), p = T(
|
|
889
|
+
() => i.value.map((S, n) => {
|
|
890
|
+
const e = a.options.find(
|
|
891
|
+
(r) => r.schemaName === S.schemaName && r.name === S.name
|
|
892
|
+
), m = (e == null ? void 0 : e.labels) || [S.schemaName, S.name];
|
|
893
|
+
return {
|
|
894
|
+
index: n,
|
|
895
|
+
label: m.map((r) => Y(d, t, r, "other")).join(" "),
|
|
896
|
+
value: S
|
|
897
|
+
};
|
|
898
|
+
})
|
|
899
|
+
), V = H(i.value.length > 0 ? 0 : void 0);
|
|
900
|
+
function h(S) {
|
|
901
|
+
var n;
|
|
902
|
+
y.value = !0, o.value = S != null && S.value ? JSON.parse(JSON.stringify(S.value)) : void 0, V.value = S == null ? void 0 : S.index, s.value = !!((n = o.value) != null && n.dataFormula);
|
|
903
|
+
}
|
|
904
|
+
const o = H(void 0), s = H(!1), C = T(
|
|
905
|
+
() => a.options.find(
|
|
906
|
+
(S) => {
|
|
907
|
+
var n, e;
|
|
908
|
+
return S.schemaName === ((n = o.value) == null ? void 0 : n.schemaName) && S.name === ((e = o.value) == null ? void 0 : e.name);
|
|
909
|
+
}
|
|
910
|
+
) ?? {}
|
|
911
|
+
);
|
|
912
|
+
function w(S) {
|
|
913
|
+
var n, e;
|
|
914
|
+
(S.schemaName !== ((n = o.value) == null ? void 0 : n.schemaName) || S.name !== ((e = o.value) == null ? void 0 : e.name)) && (o.value = {
|
|
915
|
+
schemaName: S.schemaName,
|
|
916
|
+
name: S.name,
|
|
917
|
+
dimensionOption: S.dimensionOptions[0],
|
|
918
|
+
aggregation: null,
|
|
919
|
+
type: Ue.Asc
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
function O() {
|
|
923
|
+
if (!o.value) {
|
|
924
|
+
console.log("new sort is undefined");
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
927
|
+
const S = [...p.value.map((n) => n.value)];
|
|
928
|
+
s.value || (o.value.dataFormula = void 0), V.value !== void 0 ? S[V.value] = o.value : S.push(o.value), i.value = S, y.value = !1;
|
|
929
|
+
}
|
|
930
|
+
function f(S) {
|
|
931
|
+
const n = [...p.value.map((e) => e.value)];
|
|
932
|
+
n.splice(S, 1), i.value = n, y.value = !1;
|
|
933
|
+
}
|
|
934
|
+
function _(S) {
|
|
935
|
+
const n = `report.section.filter.${me(S)}`;
|
|
936
|
+
return t(n) ? d(n) : Y(d, t, S, "field");
|
|
937
|
+
}
|
|
938
|
+
const L = T(
|
|
939
|
+
() => a.options.map((S) => ({
|
|
940
|
+
label: S.labels.join(" "),
|
|
941
|
+
value: S
|
|
942
|
+
}))
|
|
943
|
+
);
|
|
944
|
+
return (S, n) => {
|
|
945
|
+
const e = k("FmCheckbox"), m = k("FmTextarea"), r = k("FmForm"), c = k("FmIcon"), v = k("FmButton"), I = k("FmListItem"), M = k("FmList"), Q = k("FmField");
|
|
946
|
+
return b(), R("div", Dl, [
|
|
947
|
+
u(fe, {
|
|
948
|
+
modelValue: y.value,
|
|
949
|
+
"onUpdate:modelValue": n[6] || (n[6] = (E) => y.value = E),
|
|
950
|
+
title: g.value,
|
|
951
|
+
onConfirm: O
|
|
952
|
+
}, {
|
|
953
|
+
content: N(() => [
|
|
954
|
+
u(r, {
|
|
955
|
+
ref: "form",
|
|
956
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
957
|
+
}, {
|
|
958
|
+
default: N(() => {
|
|
959
|
+
var E, X, G, te;
|
|
960
|
+
return [
|
|
961
|
+
u(Z, {
|
|
962
|
+
"model-value": C.value,
|
|
963
|
+
items: L.value,
|
|
964
|
+
placeholder: g.value,
|
|
965
|
+
label: g.value,
|
|
966
|
+
"onUpdate:modelValue": n[0] || (n[0] = ($) => w($))
|
|
967
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
968
|
+
o.value ? (b(), R(oe, { key: 0 }, [
|
|
969
|
+
(((E = C.value) == null ? void 0 : E.dimensionOptions) || []).length > 0 ? (b(), D(Z, {
|
|
970
|
+
key: 0,
|
|
971
|
+
modelValue: o.value.dimensionOption,
|
|
972
|
+
"onUpdate:modelValue": n[1] || (n[1] = ($) => o.value.dimensionOption = $),
|
|
973
|
+
items: ((X = C.value) == null ? void 0 : X.dimensionOptions.map(($) => ({
|
|
974
|
+
label: _($),
|
|
975
|
+
value: $
|
|
976
|
+
}))) ?? [],
|
|
977
|
+
placeholder: l(d)("report.section.sort.format"),
|
|
978
|
+
label: l(d)("report.section.sort.format")
|
|
979
|
+
}, null, 8, ["modelValue", "items", "placeholder", "label"])) : U("", !0),
|
|
980
|
+
(((G = C.value) == null ? void 0 : G.aggregations) || []).length > 0 ? (b(), D(Z, {
|
|
981
|
+
key: 1,
|
|
982
|
+
modelValue: o.value.aggregation,
|
|
983
|
+
"onUpdate:modelValue": n[2] || (n[2] = ($) => o.value.aggregation = $),
|
|
984
|
+
items: ((te = C.value) == null ? void 0 : te.aggregations.map(($) => ({
|
|
985
|
+
label: l(t)(`report.section.metric.aggregationType.${$}`) ? l(d)(`report.section.metric.aggregationType.${$}`) : $,
|
|
986
|
+
value: $
|
|
987
|
+
}))) ?? [],
|
|
988
|
+
label: l(d)("report.section.sort.aggregation"),
|
|
989
|
+
placeholder: l(d)("report.section.sort.aggregation")
|
|
990
|
+
}, null, 8, ["modelValue", "items", "label", "placeholder"])) : U("", !0),
|
|
991
|
+
u(Z, {
|
|
992
|
+
modelValue: o.value.type,
|
|
993
|
+
"onUpdate:modelValue": n[3] || (n[3] = ($) => o.value.type = $),
|
|
994
|
+
items: Object.values(l(Ue)).map(($) => ({
|
|
995
|
+
label: l(t)(`report.section.sort.sortType.${$}`) ? l(d)(`report.section.sort.sortType.${$}`) : $,
|
|
996
|
+
value: $
|
|
997
|
+
})),
|
|
998
|
+
placeholder: l(d)("report.section.sort.order"),
|
|
999
|
+
label: l(d)("report.section.sort.order")
|
|
1000
|
+
}, null, 8, ["modelValue", "items", "placeholder", "label"]),
|
|
1001
|
+
u(e, {
|
|
1002
|
+
modelValue: s.value,
|
|
1003
|
+
"onUpdate:modelValue": n[4] || (n[4] = ($) => s.value = $),
|
|
1004
|
+
label: l(d)("report.section.sort.advance"),
|
|
1005
|
+
value: !0
|
|
1006
|
+
}, null, 8, ["modelValue", "label"]),
|
|
1007
|
+
s.value ? (b(), D(m, {
|
|
1008
|
+
key: 2,
|
|
1009
|
+
modelValue: o.value.dataFormula,
|
|
1010
|
+
"onUpdate:modelValue": n[5] || (n[5] = ($) => o.value.dataFormula = $),
|
|
1011
|
+
placeholder: l(d)("report.section.sort.dataFormula")
|
|
1012
|
+
}, null, 8, ["modelValue", "placeholder"])) : U("", !0)
|
|
1013
|
+
], 64)) : U("", !0)
|
|
1014
|
+
];
|
|
1015
|
+
}),
|
|
1016
|
+
_: 1
|
|
1017
|
+
}, 512)
|
|
1018
|
+
]),
|
|
1019
|
+
_: 1
|
|
1020
|
+
}, 8, ["modelValue", "title"]),
|
|
1021
|
+
F("div", null, [
|
|
1022
|
+
F("p", Ul, j(g.value), 1),
|
|
1023
|
+
F("p", Nl, j(l(d)("report.section.sort.description")), 1)
|
|
1024
|
+
]),
|
|
1025
|
+
u(M, null, {
|
|
1026
|
+
default: N(() => [
|
|
1027
|
+
u(l(we), {
|
|
1028
|
+
list: i.value,
|
|
1029
|
+
"item-key": "id",
|
|
1030
|
+
class: "flex flex-col gap-2 w-full"
|
|
1031
|
+
}, {
|
|
1032
|
+
item: N(({ element: E, index: X }) => [
|
|
1033
|
+
u(I, {
|
|
1034
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
1035
|
+
onClick: ne((G) => h(p.value[X]), ["stop"])
|
|
1036
|
+
}, {
|
|
1037
|
+
default: N(() => [
|
|
1038
|
+
u(c, { name: "drag_handle" }),
|
|
1039
|
+
F("p", Ol, j(p.value[X].label), 1),
|
|
1040
|
+
n[8] || (n[8] = F("div", { class: "grow" }, null, -1)),
|
|
1041
|
+
u(v, {
|
|
1042
|
+
icon: "close",
|
|
1043
|
+
size: "md",
|
|
1044
|
+
variant: "tertiary",
|
|
1045
|
+
onClick: ne((G) => f(X), ["stop"])
|
|
1046
|
+
}, null, 8, ["onClick"])
|
|
1047
|
+
]),
|
|
1048
|
+
_: 2
|
|
1049
|
+
}, 1032, ["onClick"])
|
|
1050
|
+
]),
|
|
1051
|
+
_: 1
|
|
1052
|
+
}, 8, ["list"])
|
|
1053
|
+
]),
|
|
1054
|
+
_: 1
|
|
1055
|
+
}),
|
|
1056
|
+
u(Q, {
|
|
1057
|
+
class: "text-fm-color-typo-tertiary",
|
|
1058
|
+
onClick: n[7] || (n[7] = () => {
|
|
1059
|
+
h();
|
|
1060
|
+
})
|
|
1061
|
+
}, {
|
|
1062
|
+
default: N(() => [
|
|
1063
|
+
ve(j(l(d)("report.section.sort.add")), 1)
|
|
1064
|
+
]),
|
|
1065
|
+
_: 1
|
|
1066
|
+
})
|
|
1067
|
+
]);
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
}), Il = { class: "fm-typo-en-body-lg-600" }, Bl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, jl = /* @__PURE__ */ q({
|
|
1071
|
+
__name: "LimitSection",
|
|
1072
|
+
props: {
|
|
1073
|
+
modelValue: { required: !0, default: null },
|
|
1074
|
+
modelModifiers: {}
|
|
1075
|
+
},
|
|
1076
|
+
emits: ["update:modelValue"],
|
|
1077
|
+
setup(x) {
|
|
1078
|
+
const { t: d } = J(), t = ee(x, "modelValue"), i = he((a) => {
|
|
1079
|
+
a !== "" ? t.value = a : t.value = null;
|
|
1080
|
+
}, 1e3);
|
|
1081
|
+
return (a, g) => {
|
|
1082
|
+
const y = k("FmTextField");
|
|
1083
|
+
return b(), R(oe, null, [
|
|
1084
|
+
F("div", null, [
|
|
1085
|
+
F("p", Il, j(l(d)("report.section.limit.title")), 1),
|
|
1086
|
+
F("p", Bl, j(l(d)("report.section.limit.description")), 1)
|
|
1087
|
+
]),
|
|
1088
|
+
u(y, {
|
|
1089
|
+
"model-value": t.value,
|
|
1090
|
+
inputmode: "numeric",
|
|
1091
|
+
placeholder: l(d)("report.section.limit.placeholder"),
|
|
1092
|
+
"onUpdate:modelValue": g[0] || (g[0] = (p) => l(i)(p))
|
|
1093
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
1094
|
+
], 64);
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
}), zl = { class: "flex flex-col my-2 gap-8" }, Rl = { class: "fm-typo-en-body-lg-600" }, Ml = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Pl = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, Al = /* @__PURE__ */ q({
|
|
1098
|
+
__name: "ConditionSection",
|
|
1099
|
+
props: /* @__PURE__ */ K({
|
|
1100
|
+
joinFieldOptions: {
|
|
1101
|
+
type: Array,
|
|
1102
|
+
default: () => []
|
|
1103
|
+
},
|
|
1104
|
+
mainFieldOptions: {
|
|
1105
|
+
type: Array,
|
|
1106
|
+
default: () => []
|
|
1107
|
+
},
|
|
1108
|
+
label: {
|
|
1109
|
+
type: String,
|
|
1110
|
+
default: "title"
|
|
1111
|
+
}
|
|
1112
|
+
}, {
|
|
1113
|
+
modelValue: { required: !0 },
|
|
1114
|
+
modelModifiers: {}
|
|
1115
|
+
}),
|
|
1116
|
+
emits: ["update:modelValue"],
|
|
1117
|
+
setup(x) {
|
|
1118
|
+
const { t: d, te: t } = J(), i = ee(x, "modelValue"), a = x, g = T(() => d(`report.section.condition.${a.label}`)), y = H(!1), p = T(
|
|
1119
|
+
() => i.value.map((n, e) => {
|
|
1120
|
+
var c, v;
|
|
1121
|
+
const m = a.joinFieldOptions.find(
|
|
1122
|
+
(I) => {
|
|
1123
|
+
var M, Q;
|
|
1124
|
+
return I.schemaName === ((M = n.joinDimension) == null ? void 0 : M.schemaName) && I.name === ((Q = n.joinDimension) == null ? void 0 : Q.name);
|
|
1125
|
+
}
|
|
1126
|
+
), r = (m == null ? void 0 : m.labels) || [
|
|
1127
|
+
(c = n.joinDimension) == null ? void 0 : c.schemaName,
|
|
1128
|
+
(v = n.joinDimension) == null ? void 0 : v.name
|
|
1129
|
+
];
|
|
1130
|
+
return {
|
|
1131
|
+
index: e,
|
|
1132
|
+
label: r.map((I) => Y(d, t, I, "other")).join(" "),
|
|
1133
|
+
value: n
|
|
1134
|
+
};
|
|
1135
|
+
})
|
|
1136
|
+
), V = H(i.value.length > 0 ? 0 : void 0);
|
|
1137
|
+
function h(n) {
|
|
1138
|
+
n ? (o.value = n != null && n.value ? JSON.parse(JSON.stringify(n.value)) : void 0, V.value = n == null ? void 0 : n.index) : (o.value = {
|
|
1139
|
+
joinDimension: null,
|
|
1140
|
+
operator: "",
|
|
1141
|
+
mainDimensions: []
|
|
1142
|
+
}, V.value = void 0), y.value = !0;
|
|
1143
|
+
}
|
|
1144
|
+
const o = H(void 0), s = T(
|
|
1145
|
+
() => a.joinFieldOptions.find(
|
|
1146
|
+
(n) => {
|
|
1147
|
+
var e, m;
|
|
1148
|
+
return n.schemaName === ((m = (e = o.value) == null ? void 0 : e.joinDimension) == null ? void 0 : m.schemaName) && n.name === o.value.joinDimension.name;
|
|
1149
|
+
}
|
|
1150
|
+
) ?? {}
|
|
1151
|
+
), C = T(
|
|
1152
|
+
() => {
|
|
1153
|
+
var n;
|
|
1154
|
+
return (((n = o.value) == null ? void 0 : n.mainDimensions) || []).map(
|
|
1155
|
+
(e) => a.mainFieldOptions.find(
|
|
1156
|
+
(m) => m.schemaName === (e == null ? void 0 : e.schemaName) && m.name === e.name
|
|
1157
|
+
) ?? {}
|
|
1158
|
+
);
|
|
1159
|
+
}
|
|
1160
|
+
), w = T(
|
|
1161
|
+
() => a.joinFieldOptions.map((n) => ({ label: n.labels.join(" "), value: n }))
|
|
1162
|
+
);
|
|
1163
|
+
function O(n) {
|
|
1164
|
+
var e, m, r, c;
|
|
1165
|
+
o.value && (o.value && n.schemaName !== ((m = (e = o.value) == null ? void 0 : e.joinDimension) == null ? void 0 : m.schemaName) || n.name !== ((c = (r = o.value) == null ? void 0 : r.joinDimension) == null ? void 0 : c.name)) && (o.value = {
|
|
1166
|
+
...o.value,
|
|
1167
|
+
joinDimension: {
|
|
1168
|
+
schemaName: n.schemaName,
|
|
1169
|
+
name: n.name,
|
|
1170
|
+
option: n.dimensionOptions[0],
|
|
1171
|
+
label: `_${n.label}`,
|
|
1172
|
+
hide: !0
|
|
1173
|
+
}
|
|
1174
|
+
}, n.joinConditionOperators.includes(o.value.operator) || _(n.joinConditionOperators[0]));
|
|
1175
|
+
}
|
|
1176
|
+
function f(n, e) {
|
|
1177
|
+
var m, r, c, v;
|
|
1178
|
+
if (o.value && e >= 0 && (o.value && n.schemaName !== ((r = (m = o.value) == null ? void 0 : m.mainDimensions[e]) == null ? void 0 : r.schemaName) || n.name !== ((v = (c = o.value) == null ? void 0 : c.mainDimensions[e]) == null ? void 0 : v.name))) {
|
|
1179
|
+
const I = [...o.value.mainDimensions];
|
|
1180
|
+
I[e] = {
|
|
1181
|
+
schemaName: n.schemaName,
|
|
1182
|
+
name: n.name,
|
|
1183
|
+
option: n.dimensionOptions[0],
|
|
1184
|
+
label: n.label,
|
|
1185
|
+
hide: !0
|
|
1186
|
+
}, o.value = {
|
|
1187
|
+
...o.value,
|
|
1188
|
+
mainDimensions: I
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
function _(n) {
|
|
1193
|
+
if (o.value)
|
|
1194
|
+
switch (n) {
|
|
1195
|
+
case nl.Between:
|
|
1196
|
+
o.value = {
|
|
1197
|
+
...o.value,
|
|
1198
|
+
operator: n,
|
|
1199
|
+
mainDimensions: [null, null]
|
|
1200
|
+
};
|
|
1201
|
+
break;
|
|
1202
|
+
default:
|
|
1203
|
+
o.value = {
|
|
1204
|
+
...o.value,
|
|
1205
|
+
operator: n,
|
|
1206
|
+
mainDimensions: [null]
|
|
1207
|
+
};
|
|
1208
|
+
break;
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
function L() {
|
|
1212
|
+
const n = [...p.value.map((e) => e.value)];
|
|
1213
|
+
o.value && (o.value.mainDimensions = o.value.mainDimensions.filter(
|
|
1214
|
+
(e) => e !== "" && e != null
|
|
1215
|
+
), V.value !== void 0 ? n[V.value] = o.value : n.push(o.value)), i.value = n, y.value = !1;
|
|
1216
|
+
}
|
|
1217
|
+
function S(n) {
|
|
1218
|
+
const e = [...p.value.map((m) => m.value)];
|
|
1219
|
+
e.splice(n, 1), i.value = e;
|
|
1220
|
+
}
|
|
1221
|
+
return (n, e) => {
|
|
1222
|
+
const m = k("FmMenuDivider"), r = k("FmForm"), c = k("FmIcon"), v = k("FmButton"), I = k("FmListItem"), M = k("FmList"), Q = k("FmField");
|
|
1223
|
+
return b(), R("div", zl, [
|
|
1224
|
+
u(fe, {
|
|
1225
|
+
modelValue: y.value,
|
|
1226
|
+
"onUpdate:modelValue": e[2] || (e[2] = (E) => y.value = E),
|
|
1227
|
+
title: g.value,
|
|
1228
|
+
onConfirm: L
|
|
1229
|
+
}, {
|
|
1230
|
+
content: N(() => [
|
|
1231
|
+
u(r, {
|
|
1232
|
+
ref: "form",
|
|
1233
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
1234
|
+
}, {
|
|
1235
|
+
default: N(() => {
|
|
1236
|
+
var E, X, G, te, $;
|
|
1237
|
+
return [
|
|
1238
|
+
u(Z, {
|
|
1239
|
+
label: l(d)("report.section.condition.joinDatasource"),
|
|
1240
|
+
"model-value": s.value,
|
|
1241
|
+
items: w.value,
|
|
1242
|
+
placeholder: l(d)("report.section.condition.joinDimension"),
|
|
1243
|
+
"onUpdate:modelValue": e[0] || (e[0] = (P) => O(P))
|
|
1244
|
+
}, null, 8, ["label", "model-value", "items", "placeholder"]),
|
|
1245
|
+
u(m),
|
|
1246
|
+
(E = o.value) != null && E.joinDimension && (((X = s.value) == null ? void 0 : X.dimensionOptions) || []).length > 0 ? (b(), D(Z, {
|
|
1247
|
+
key: 0,
|
|
1248
|
+
modelValue: o.value.joinDimension.option,
|
|
1249
|
+
"onUpdate:modelValue": e[1] || (e[1] = (P) => o.value.joinDimension.option = P),
|
|
1250
|
+
label: l(d)("report.section.condition.format"),
|
|
1251
|
+
items: ((G = s.value) == null ? void 0 : G.dimensionOptions.map((P) => ({
|
|
1252
|
+
label: l(t)(`report.section.filter.${l(me)(P)}`) ? l(d)(`report.section.filter.${l(me)(P)}`) : P,
|
|
1253
|
+
value: P
|
|
1254
|
+
}))) ?? []
|
|
1255
|
+
}, null, 8, ["modelValue", "label", "items"])) : U("", !0),
|
|
1256
|
+
o.value && (((te = s.value) == null ? void 0 : te.joinConditionOperators) || []).length > 0 ? (b(), D(Z, {
|
|
1257
|
+
key: 1,
|
|
1258
|
+
"model-value": o.value.operator,
|
|
1259
|
+
label: l(d)("report.section.condition.operator"),
|
|
1260
|
+
items: s.value.joinConditionOperators.map((P) => ({
|
|
1261
|
+
label: l(d)("report.section.comparisonOperator." + P),
|
|
1262
|
+
value: P
|
|
1263
|
+
})) ?? [],
|
|
1264
|
+
"onUpdate:modelValue": _
|
|
1265
|
+
}, null, 8, ["model-value", "label", "items"])) : U("", !0),
|
|
1266
|
+
(b(!0), R(oe, null, pe((($ = o.value) == null ? void 0 : $.mainDimensions) || [], (P, W) => {
|
|
1267
|
+
var ae, B;
|
|
1268
|
+
return b(), R("div", {
|
|
1269
|
+
key: W,
|
|
1270
|
+
class: "flex flex-col gap-2"
|
|
1271
|
+
}, [
|
|
1272
|
+
u(Z, {
|
|
1273
|
+
"model-value": C.value[W],
|
|
1274
|
+
label: l(d)("report.section.condition.mainDatasource", { index: W + 1 }),
|
|
1275
|
+
items: a.mainFieldOptions.map((le) => ({
|
|
1276
|
+
label: le.labels.join(" "),
|
|
1277
|
+
value: le
|
|
1278
|
+
})),
|
|
1279
|
+
"onUpdate:modelValue": (le) => f(le, W)
|
|
1280
|
+
}, null, 8, ["model-value", "label", "items", "onUpdate:modelValue"]),
|
|
1281
|
+
P && (((ae = C.value[W]) == null ? void 0 : ae.dimensionOptions) || []).length > 0 && P ? (b(), D(Z, {
|
|
1282
|
+
key: 0,
|
|
1283
|
+
modelValue: P.option,
|
|
1284
|
+
"onUpdate:modelValue": (le) => P.option = le,
|
|
1285
|
+
items: (B = C.value[W]) == null ? void 0 : B.dimensionOptions.map((le) => ({
|
|
1286
|
+
label: l(t)(`report.section.filter.${l(me)(le)}`) ? l(d)(`report.section.filter.${l(me)(le)}`) : le,
|
|
1287
|
+
value: le
|
|
1288
|
+
}))
|
|
1289
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : U("", !0),
|
|
1290
|
+
u(m)
|
|
1291
|
+
]);
|
|
1292
|
+
}), 128))
|
|
1293
|
+
];
|
|
1294
|
+
}),
|
|
1295
|
+
_: 1
|
|
1296
|
+
}, 512)
|
|
1297
|
+
]),
|
|
1298
|
+
_: 1
|
|
1299
|
+
}, 8, ["modelValue", "title"]),
|
|
1300
|
+
F("div", null, [
|
|
1301
|
+
F("p", Rl, j(g.value), 1),
|
|
1302
|
+
F("p", Ml, j(l(d)("report.section.condition.description")), 1)
|
|
1303
|
+
]),
|
|
1304
|
+
u(M, { class: "flex flex-col gap-2" }, {
|
|
1305
|
+
default: N(() => [
|
|
1306
|
+
u(l(we), {
|
|
1307
|
+
list: i.value,
|
|
1308
|
+
"item-key": (E) => {
|
|
1309
|
+
var X, G;
|
|
1310
|
+
return `${(X = E.joinDimension) == null ? void 0 : X.schemaName}:${(G = E.joinDimension) == null ? void 0 : G.name}`;
|
|
1311
|
+
},
|
|
1312
|
+
class: "flex flex-col gap-2 w-full"
|
|
1313
|
+
}, {
|
|
1314
|
+
item: N(({ element: E, index: X }) => [
|
|
1315
|
+
u(I, {
|
|
1316
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
1317
|
+
onClick: ne((G) => h(p.value[X]), ["stop"])
|
|
1318
|
+
}, {
|
|
1319
|
+
default: N(() => [
|
|
1320
|
+
u(c, { name: "drag_handle" }),
|
|
1321
|
+
F("p", Pl, j(p.value[X].label), 1),
|
|
1322
|
+
e[4] || (e[4] = F("div", { class: "grow" }, null, -1)),
|
|
1323
|
+
u(v, {
|
|
1324
|
+
icon: "close",
|
|
1325
|
+
size: "md",
|
|
1326
|
+
variant: "tertiary",
|
|
1327
|
+
onClick: ne((G) => S(X), ["stop"])
|
|
1328
|
+
}, null, 8, ["onClick"])
|
|
1329
|
+
]),
|
|
1330
|
+
_: 2
|
|
1331
|
+
}, 1032, ["onClick"])
|
|
1332
|
+
]),
|
|
1333
|
+
_: 1
|
|
1334
|
+
}, 8, ["list", "item-key"])
|
|
1335
|
+
]),
|
|
1336
|
+
_: 1
|
|
1337
|
+
}),
|
|
1338
|
+
u(Q, {
|
|
1339
|
+
class: "text-fm-color-typo-tertiary cursor-pointer",
|
|
1340
|
+
onClick: e[3] || (e[3] = (E) => h())
|
|
1341
|
+
}, {
|
|
1342
|
+
default: N(() => [
|
|
1343
|
+
ve(j(l(d)("report.section.condition.add")), 1)
|
|
1344
|
+
]),
|
|
1345
|
+
_: 1
|
|
1346
|
+
})
|
|
1347
|
+
]);
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
}), Le = /* @__PURE__ */ q({
|
|
1351
|
+
__name: "Datasource",
|
|
1352
|
+
props: /* @__PURE__ */ K({
|
|
1353
|
+
label: {
|
|
1354
|
+
type: String,
|
|
1355
|
+
default: "Label"
|
|
1356
|
+
},
|
|
1357
|
+
config: {
|
|
1358
|
+
type: Object,
|
|
1359
|
+
default: null
|
|
1360
|
+
},
|
|
1361
|
+
closeable: {
|
|
1362
|
+
type: Boolean,
|
|
1363
|
+
default: !1
|
|
1364
|
+
},
|
|
1365
|
+
mainDatasourceConfig: {
|
|
1366
|
+
type: Object,
|
|
1367
|
+
default: () => {
|
|
1368
|
+
}
|
|
1369
|
+
},
|
|
1370
|
+
modelValue: {
|
|
1371
|
+
type: Object,
|
|
1372
|
+
default: () => {
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}, {
|
|
1376
|
+
modelValue: { required: !0 },
|
|
1377
|
+
modelModifiers: {}
|
|
1378
|
+
}),
|
|
1379
|
+
emits: /* @__PURE__ */ K(["click-close"], ["update:modelValue"]),
|
|
1380
|
+
setup(x, { emit: d }) {
|
|
1381
|
+
const { disableEditMode: t, resetStore: i } = ye(), a = ee(x, "modelValue");
|
|
1382
|
+
re(
|
|
1383
|
+
[() => a.value.dimensions, () => a.value.metrics],
|
|
1384
|
+
() => {
|
|
1385
|
+
const { rowIds: n, columnIds: e } = Ve(a.value);
|
|
1386
|
+
a.value.rowIds = n, a.value.columnIds = e;
|
|
1387
|
+
},
|
|
1388
|
+
{ deep: !0 }
|
|
1389
|
+
);
|
|
1390
|
+
const g = x, y = d, { schemas: p } = de(Re());
|
|
1391
|
+
qe(() => {
|
|
1392
|
+
t(), i();
|
|
1393
|
+
});
|
|
1394
|
+
const { t: V, te: h, locale: o } = J(), s = T(() => !g.mainDatasourceConfig), C = T(
|
|
1395
|
+
() => [z.BarChart, z.LineChart, z.Scorecard].includes(g.config.type)
|
|
1396
|
+
), w = T(() => {
|
|
1397
|
+
const n = [...a.value.dimensions].filter((e) => !e.hide);
|
|
1398
|
+
return n.sort(
|
|
1399
|
+
(e, m) => (a.value.rowIds || []).indexOf(ce(e)) - (a.value.rowIds || []).indexOf(ce(m))
|
|
1400
|
+
), n;
|
|
1401
|
+
}), O = T(() => g.config.type === z.Scorecard), f = T(
|
|
1402
|
+
() => {
|
|
1403
|
+
var n;
|
|
1404
|
+
return (((n = g.mainDatasourceConfig) == null ? void 0 : n.schemaNames) || []).reduce(
|
|
1405
|
+
(e, m) => {
|
|
1406
|
+
const r = p.value.find((c) => c.name === m);
|
|
1407
|
+
return r && (e = [
|
|
1408
|
+
...e,
|
|
1409
|
+
...r.fields.map((c) => ({
|
|
1410
|
+
...c,
|
|
1411
|
+
labels: [
|
|
1412
|
+
Y(V, h, r.label, "schema"),
|
|
1413
|
+
Y(V, h, c.label || c.name, "other")
|
|
1414
|
+
]
|
|
1415
|
+
}))
|
|
1416
|
+
]), e;
|
|
1417
|
+
},
|
|
1418
|
+
[]
|
|
1419
|
+
);
|
|
1420
|
+
}
|
|
1421
|
+
), _ = T(
|
|
1422
|
+
() => a.value.schemaNames.reduce((n, e) => {
|
|
1423
|
+
const m = p.value.find((r) => r.name === e);
|
|
1424
|
+
return m && (n = [
|
|
1425
|
+
...n,
|
|
1426
|
+
...m.fields.map((r) => ({
|
|
1427
|
+
...r,
|
|
1428
|
+
labels: [
|
|
1429
|
+
Y(V, h, m.label, "schema"),
|
|
1430
|
+
Y(V, h, r.label || r.name, "other")
|
|
1431
|
+
]
|
|
1432
|
+
}))
|
|
1433
|
+
]), n;
|
|
1434
|
+
}, [])
|
|
1435
|
+
), L = T(() => [
|
|
1436
|
+
{ label: V("report.section.datasource.none"), value: null },
|
|
1437
|
+
{ label: V("report.section.datasource.grandTotal"), value: 0 },
|
|
1438
|
+
...[...w.value].slice(0, w.value.length - 1).map((n, e) => ({
|
|
1439
|
+
label: Y(V, h, n.label, "other"),
|
|
1440
|
+
value: e + 1
|
|
1441
|
+
}))
|
|
1442
|
+
]), S = T(() => [
|
|
1443
|
+
{
|
|
1444
|
+
label: V("report.section.datasource.none"),
|
|
1445
|
+
value: null
|
|
1446
|
+
},
|
|
1447
|
+
...Object.keys(Ne).map((n) => ({
|
|
1448
|
+
label: h(`report.section.datasource.periodType.${n}`) ? V(`report.section.datasource.periodType.${n}`) : n,
|
|
1449
|
+
value: Ne[n]
|
|
1450
|
+
}))
|
|
1451
|
+
]);
|
|
1452
|
+
return (n, e) => {
|
|
1453
|
+
const m = k("FmButton"), r = k("FmSwitch"), c = k("FmSelect");
|
|
1454
|
+
return b(), D(ke, null, {
|
|
1455
|
+
header: N(() => [
|
|
1456
|
+
F("p", null, j(g.label), 1),
|
|
1457
|
+
e[19] || (e[19] = F("div", { class: "grow" }, null, -1)),
|
|
1458
|
+
g.closeable ? (b(), D(m, {
|
|
1459
|
+
key: 0,
|
|
1460
|
+
icon: "close",
|
|
1461
|
+
variant: "tertiary",
|
|
1462
|
+
size: "md",
|
|
1463
|
+
onClick: e[0] || (e[0] = ne((v) => y("click-close"), ["stop"]))
|
|
1464
|
+
})) : U("", !0)
|
|
1465
|
+
]),
|
|
1466
|
+
content: N(() => [
|
|
1467
|
+
u(yl, {
|
|
1468
|
+
modelValue: a.value,
|
|
1469
|
+
"onUpdate:modelValue": e[1] || (e[1] = (v) => a.value = v),
|
|
1470
|
+
label: l(V)("report.section.schema.title")
|
|
1471
|
+
}, null, 8, ["modelValue", "label"]),
|
|
1472
|
+
u(xe, {
|
|
1473
|
+
modelValue: a.value.dimensions,
|
|
1474
|
+
"onUpdate:modelValue": e[2] || (e[2] = (v) => a.value.dimensions = v),
|
|
1475
|
+
options: _.value,
|
|
1476
|
+
config: a.value,
|
|
1477
|
+
max: g.config.maxDimension,
|
|
1478
|
+
"has-row-column": !0,
|
|
1479
|
+
onConfig: e[3] || (e[3] = (v) => {
|
|
1480
|
+
a.value = v;
|
|
1481
|
+
})
|
|
1482
|
+
}, null, 8, ["modelValue", "options", "config", "max"]),
|
|
1483
|
+
u(r, {
|
|
1484
|
+
"label-placement": "right",
|
|
1485
|
+
label: l(V)("report.section.datasource.comparable"),
|
|
1486
|
+
"model-value": a.value.isComparable ?? !1,
|
|
1487
|
+
"onUpdate:modelValue": e[4] || (e[4] = (v) => {
|
|
1488
|
+
a.value.isComparable = v;
|
|
1489
|
+
})
|
|
1490
|
+
}, null, 8, ["label", "model-value"]),
|
|
1491
|
+
C.value ? (b(), D(r, {
|
|
1492
|
+
key: 0,
|
|
1493
|
+
"label-placement": "right",
|
|
1494
|
+
label: l(V)("report.section.datasource.cumulative"),
|
|
1495
|
+
"model-value": a.value.isCumulative ?? !1,
|
|
1496
|
+
"onUpdate:modelValue": e[5] || (e[5] = (v) => {
|
|
1497
|
+
a.value.isCumulative = v;
|
|
1498
|
+
})
|
|
1499
|
+
}, null, 8, ["label", "model-value"])) : U("", !0),
|
|
1500
|
+
g.config.isDrillConfigurable && s.value ? (b(), D(r, {
|
|
1501
|
+
key: 1,
|
|
1502
|
+
label: l(V)("report.section.datasource.drill"),
|
|
1503
|
+
"label-placement": "right",
|
|
1504
|
+
"model-value": a.value.isDrillable ?? !1,
|
|
1505
|
+
"onUpdate:modelValue": e[6] || (e[6] = (v) => {
|
|
1506
|
+
a.value.isDrillable = v;
|
|
1507
|
+
})
|
|
1508
|
+
}, null, 8, ["label", "model-value"])) : U("", !0),
|
|
1509
|
+
s.value ? (b(), D(r, {
|
|
1510
|
+
key: 2,
|
|
1511
|
+
modelValue: a.value.isBlend,
|
|
1512
|
+
"onUpdate:modelValue": e[7] || (e[7] = (v) => a.value.isBlend = v),
|
|
1513
|
+
label: l(V)("report.section.datasource.blend"),
|
|
1514
|
+
"label-placement": "right"
|
|
1515
|
+
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1516
|
+
g.config.canRollup && s.value ? (b(), D(c, {
|
|
1517
|
+
key: `rollup-${l(o)}`,
|
|
1518
|
+
modelValue: a.value.rollup,
|
|
1519
|
+
"onUpdate:modelValue": e[8] || (e[8] = (v) => a.value.rollup = v),
|
|
1520
|
+
label: l(V)("report.section.datasource.subTotal"),
|
|
1521
|
+
items: L.value
|
|
1522
|
+
}, null, 8, ["modelValue", "label", "items"])) : U("", !0),
|
|
1523
|
+
s.value ? U("", !0) : (b(), D(c, {
|
|
1524
|
+
key: `periodType-${l(o)}`,
|
|
1525
|
+
modelValue: a.value.periodType,
|
|
1526
|
+
"onUpdate:modelValue": e[9] || (e[9] = (v) => a.value.periodType = v),
|
|
1527
|
+
label: l(V)("report.section.datasource.periodType.label"),
|
|
1528
|
+
items: S.value
|
|
1529
|
+
}, null, 8, ["modelValue", "label", "items"])),
|
|
1530
|
+
g.config.canTranspose && s.value ? (b(), D(r, {
|
|
1531
|
+
key: 5,
|
|
1532
|
+
modelValue: a.value.isTransposed,
|
|
1533
|
+
"onUpdate:modelValue": e[10] || (e[10] = (v) => a.value.isTransposed = v),
|
|
1534
|
+
label: l(V)("report.section.datasource.transpose"),
|
|
1535
|
+
"label-placement": "right"
|
|
1536
|
+
}, null, 8, ["modelValue", "label"])) : U("", !0),
|
|
1537
|
+
g.config.hasBreakdownDimension ? (b(), D(xe, {
|
|
1538
|
+
key: 6,
|
|
1539
|
+
"model-value": a.value.breakdownDimension ? [a.value.breakdownDimension] : [],
|
|
1540
|
+
label: "breakdownDimension",
|
|
1541
|
+
max: 1,
|
|
1542
|
+
options: _.value,
|
|
1543
|
+
"onUpdate:modelValue": e[11] || (e[11] = (v) => {
|
|
1544
|
+
a.value.breakdownDimension = v[0];
|
|
1545
|
+
})
|
|
1546
|
+
}, null, 8, ["model-value", "options"])) : U("", !0),
|
|
1547
|
+
O.value ? (b(), D(xe, {
|
|
1548
|
+
key: 7,
|
|
1549
|
+
"model-value": a.value.sparklineDimension ? [a.value.sparklineDimension] : [],
|
|
1550
|
+
label: "sparklineDimension",
|
|
1551
|
+
max: 1,
|
|
1552
|
+
options: _.value,
|
|
1553
|
+
"onUpdate:modelValue": e[12] || (e[12] = (v) => {
|
|
1554
|
+
a.value.sparklineDimension = v[0];
|
|
1555
|
+
})
|
|
1556
|
+
}, null, 8, ["model-value", "options"])) : U("", !0),
|
|
1557
|
+
u($l, {
|
|
1558
|
+
modelValue: a.value.metrics,
|
|
1559
|
+
"onUpdate:modelValue": e[13] || (e[13] = (v) => a.value.metrics = v),
|
|
1560
|
+
options: _.value,
|
|
1561
|
+
max: g.config.maxMetric,
|
|
1562
|
+
config: a.value,
|
|
1563
|
+
"has-row-column": g.config.type === l(z).Table,
|
|
1564
|
+
onConfig: e[14] || (e[14] = (v) => {
|
|
1565
|
+
a.value = v;
|
|
1566
|
+
})
|
|
1567
|
+
}, null, 8, ["modelValue", "options", "max", "config", "has-row-column"]),
|
|
1568
|
+
u(Ze, {
|
|
1569
|
+
modelValue: a.value.filters,
|
|
1570
|
+
"onUpdate:modelValue": e[15] || (e[15] = (v) => a.value.filters = v),
|
|
1571
|
+
options: _.value
|
|
1572
|
+
}, null, 8, ["modelValue", "options"]),
|
|
1573
|
+
u(Ll, {
|
|
1574
|
+
modelValue: a.value.sorts,
|
|
1575
|
+
"onUpdate:modelValue": e[16] || (e[16] = (v) => a.value.sorts = v),
|
|
1576
|
+
options: _.value
|
|
1577
|
+
}, null, 8, ["modelValue", "options"]),
|
|
1578
|
+
u(jl, {
|
|
1579
|
+
modelValue: a.value.limit,
|
|
1580
|
+
"onUpdate:modelValue": e[17] || (e[17] = (v) => a.value.limit = v)
|
|
1581
|
+
}, null, 8, ["modelValue"]),
|
|
1582
|
+
a.value.conditions ? (b(), D(Al, {
|
|
1583
|
+
key: 8,
|
|
1584
|
+
modelValue: a.value.conditions,
|
|
1585
|
+
"onUpdate:modelValue": e[18] || (e[18] = (v) => a.value.conditions = v),
|
|
1586
|
+
"join-field-options": _.value,
|
|
1587
|
+
"main-field-options": f.value
|
|
1588
|
+
}, null, 8, ["modelValue", "join-field-options", "main-field-options"])) : U("", !0)
|
|
1589
|
+
]),
|
|
1590
|
+
_: 1
|
|
1591
|
+
});
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
}), Xl = { class: "fm-typo-en-title-sm-600" }, _e = /* @__PURE__ */ q({
|
|
1595
|
+
__name: "TileEditorTabHeader",
|
|
1596
|
+
props: /* @__PURE__ */ K({
|
|
1597
|
+
icon: {
|
|
1598
|
+
type: String,
|
|
1599
|
+
required: !0
|
|
1600
|
+
}
|
|
1601
|
+
}, {
|
|
1602
|
+
modelValue: { type: Boolean, required: !0, default: !1 },
|
|
1603
|
+
modelModifiers: {}
|
|
1604
|
+
}),
|
|
1605
|
+
emits: ["update:modelValue"],
|
|
1606
|
+
setup(x) {
|
|
1607
|
+
const { t: d } = J(), t = ee(x, "modelValue"), i = x;
|
|
1608
|
+
return (a, g) => {
|
|
1609
|
+
const y = k("FmIcon");
|
|
1610
|
+
return b(), R("div", {
|
|
1611
|
+
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
1612
|
+
onClick: g[0] || (g[0] = (p) => t.value = !t.value)
|
|
1613
|
+
}, [
|
|
1614
|
+
F("p", Xl, j(l(d)("report.tile.setting")), 1),
|
|
1615
|
+
g[1] || (g[1] = F("div", { class: "grow" }, null, -1)),
|
|
1616
|
+
u(y, {
|
|
1617
|
+
name: i.icon
|
|
1618
|
+
}, null, 8, ["name"])
|
|
1619
|
+
]);
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
}), El = /* @__PURE__ */ q({
|
|
1623
|
+
__name: "TileEditorTabDesktop",
|
|
1624
|
+
props: {
|
|
1625
|
+
modelValue: { required: !0, default: !1 },
|
|
1626
|
+
modelModifiers: {}
|
|
1627
|
+
},
|
|
1628
|
+
emits: ["update:modelValue"],
|
|
1629
|
+
setup(x) {
|
|
1630
|
+
const d = ee(x, "modelValue");
|
|
1631
|
+
return (t, i) => (b(), R(oe, null, [
|
|
1632
|
+
u(_e, {
|
|
1633
|
+
modelValue: d.value,
|
|
1634
|
+
"onUpdate:modelValue": i[0] || (i[0] = (a) => d.value = a),
|
|
1635
|
+
icon: "keyboard_double_arrow_left"
|
|
1636
|
+
}, null, 8, ["modelValue"]),
|
|
1637
|
+
Be(t.$slots, "default")
|
|
1638
|
+
], 64));
|
|
1639
|
+
}
|
|
1640
|
+
}), Wl = { class: "fixed bottom-0 w-full" }, ql = /* @__PURE__ */ q({
|
|
1641
|
+
__name: "TileEditorTabMobile",
|
|
1642
|
+
props: {
|
|
1643
|
+
modelValue: { required: !0, default: !1 },
|
|
1644
|
+
modelModifiers: {}
|
|
1645
|
+
},
|
|
1646
|
+
emits: ["update:modelValue"],
|
|
1647
|
+
setup(x) {
|
|
1648
|
+
const d = ee(x, "modelValue");
|
|
1649
|
+
return (t, i) => {
|
|
1650
|
+
const a = k("FmTopSheet");
|
|
1651
|
+
return b(), R("div", Wl, [
|
|
1652
|
+
u(_e, {
|
|
1653
|
+
modelValue: d.value,
|
|
1654
|
+
"onUpdate:modelValue": i[0] || (i[0] = (g) => d.value = g),
|
|
1655
|
+
icon: "keyboard_double_arrow_up"
|
|
1656
|
+
}, null, 8, ["modelValue"]),
|
|
1657
|
+
u(a, {
|
|
1658
|
+
modelValue: d.value,
|
|
1659
|
+
"onUpdate:modelValue": i[2] || (i[2] = (g) => d.value = g),
|
|
1660
|
+
"fullscreen-size": "sm"
|
|
1661
|
+
}, {
|
|
1662
|
+
default: N(() => [
|
|
1663
|
+
u(_e, {
|
|
1664
|
+
modelValue: d.value,
|
|
1665
|
+
"onUpdate:modelValue": i[1] || (i[1] = (g) => d.value = g),
|
|
1666
|
+
icon: "keyboard_double_arrow_down"
|
|
1667
|
+
}, null, 8, ["modelValue"]),
|
|
1668
|
+
d.value ? Be(t.$slots, "default", { key: 0 }) : U("", !0)
|
|
1669
|
+
]),
|
|
1670
|
+
_: 3
|
|
1671
|
+
}, 8, ["modelValue"])
|
|
1672
|
+
]);
|
|
1673
|
+
};
|
|
1674
|
+
}
|
|
1675
|
+
}), Hl = { class: "flex gap-16" }, Yl = { class: "flex flex-col gap-8 max-w-[120px]" }, Gl = { class: "fm-typo-en-body-lg-600" }, Jl = { class: "flex flex-col gap-16" }, Kl = { class: "fm-typo-en-body-lg-600" }, Ql = { class: "flex flex-row gap-8" }, Zl = /* @__PURE__ */ q({
|
|
1676
|
+
__name: "TitleSection",
|
|
1677
|
+
props: {
|
|
1678
|
+
model: {}
|
|
1679
|
+
},
|
|
1680
|
+
emits: ["update:model"],
|
|
1681
|
+
setup(x, { emit: d }) {
|
|
1682
|
+
const t = x, i = d, { t: a } = J(), g = T({
|
|
1683
|
+
get: () => t.model.showTitle ?? !1,
|
|
1684
|
+
set: (o) => i("update:model", { ...t.model, showTitle: o })
|
|
1685
|
+
}), y = T({
|
|
1686
|
+
get: () => t.model.titleFontSize ?? 14,
|
|
1687
|
+
set: (o) => i("update:model", { ...t.model, titleFontSize: Math.min(Number(o), 24) })
|
|
1688
|
+
}), p = T({
|
|
1689
|
+
get: () => t.model.titleBold ?? !1,
|
|
1690
|
+
set: (o) => i("update:model", { ...t.model, titleBold: o })
|
|
1691
|
+
}), V = T({
|
|
1692
|
+
get: () => t.model.titleItalic ?? !1,
|
|
1693
|
+
set: (o) => i("update:model", { ...t.model, titleItalic: o })
|
|
1694
|
+
}), h = T({
|
|
1695
|
+
get: () => t.model.titleUnderline ?? !1,
|
|
1696
|
+
set: (o) => i("update:model", { ...t.model, titleUnderline: o })
|
|
1697
|
+
});
|
|
1698
|
+
return (o, s) => {
|
|
1699
|
+
const C = k("FmStepperField"), w = k("FmButton"), O = k("FmSwitch");
|
|
1700
|
+
return b(), R(oe, null, [
|
|
1701
|
+
F("div", null, [
|
|
1702
|
+
F("div", Hl, [
|
|
1703
|
+
F("div", Yl, [
|
|
1704
|
+
F("p", Gl, j(l(a)("report.section.datasource.title.titleFontSize")), 1),
|
|
1705
|
+
u(C, {
|
|
1706
|
+
modelValue: y.value,
|
|
1707
|
+
"onUpdate:modelValue": s[0] || (s[0] = (f) => y.value = f),
|
|
1708
|
+
max: 24,
|
|
1709
|
+
min: 1,
|
|
1710
|
+
type: "number"
|
|
1711
|
+
}, null, 8, ["modelValue"])
|
|
1712
|
+
]),
|
|
1713
|
+
F("div", Jl, [
|
|
1714
|
+
F("p", Kl, j(l(a)("report.section.datasource.title.textStyleFormat")), 1),
|
|
1715
|
+
F("div", Ql, [
|
|
1716
|
+
u(w, {
|
|
1717
|
+
"append-icon": "format_bold",
|
|
1718
|
+
"model-value": o.model.titleBold ?? !1,
|
|
1719
|
+
variant: "tertiary",
|
|
1720
|
+
"icon-color": o.model.titleBold ? "neutral-gray-400" : "neutral-gray-300",
|
|
1721
|
+
"bg-color": o.model.titleBold ? "neutral-gray-100" : "neutral-white",
|
|
1722
|
+
class: "rounded-sm",
|
|
1723
|
+
onClick: s[1] || (s[1] = (f) => p.value = !p.value)
|
|
1724
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"]),
|
|
1725
|
+
u(w, {
|
|
1726
|
+
"append-icon": "format_italic",
|
|
1727
|
+
"model-value": o.model.titleItalic ?? !1,
|
|
1728
|
+
"icon-color": o.model.titleItalic ? "neutral-gray-400" : "neutral-gray-300",
|
|
1729
|
+
"bg-color": o.model.titleItalic ? "neutral-gray-100" : "neutral-white",
|
|
1730
|
+
class: "rounded-sm",
|
|
1731
|
+
onClick: s[2] || (s[2] = (f) => V.value = !V.value)
|
|
1732
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"]),
|
|
1733
|
+
u(w, {
|
|
1734
|
+
"append-icon": "format_underlined",
|
|
1735
|
+
"model-value": o.model.titleUnderline ?? !1,
|
|
1736
|
+
"icon-color": o.model.titleUnderline ? "neutral-gray-400" : "neutral-gray-300",
|
|
1737
|
+
"bg-color": o.model.titleUnderline ? "neutral-gray-100" : "neutral-white",
|
|
1738
|
+
class: "rounded-sm",
|
|
1739
|
+
onClick: s[3] || (s[3] = (f) => h.value = !h.value)
|
|
1740
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"])
|
|
1741
|
+
])
|
|
1742
|
+
])
|
|
1743
|
+
])
|
|
1744
|
+
]),
|
|
1745
|
+
u(O, {
|
|
1746
|
+
modelValue: g.value,
|
|
1747
|
+
"onUpdate:modelValue": s[4] || (s[4] = (f) => g.value = f),
|
|
1748
|
+
label: l(a)("report.section.datasource.title.showTitle"),
|
|
1749
|
+
"label-placement": "right"
|
|
1750
|
+
}, null, 8, ["modelValue", "label"])
|
|
1751
|
+
], 64);
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
}), eo = { class: "flex flex-col gap-8" }, lo = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, oo = { class: "flex flex-row gap-2" }, to = {
|
|
1755
|
+
key: 0,
|
|
1756
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1757
|
+
}, ao = /* @__PURE__ */ q({
|
|
1758
|
+
__name: "TableResizeSection",
|
|
1759
|
+
props: {
|
|
1760
|
+
layout: {}
|
|
1761
|
+
},
|
|
1762
|
+
emits: ["update:layout"],
|
|
1763
|
+
setup(x, { emit: d }) {
|
|
1764
|
+
const { t } = J(), i = x, a = d, { isEditing: g, colWidths: y, rowHeight: p } = de(ye()), { enableCellResizing: V, cancelResizingChanges: h, resetStore: o, disableEditMode: s } = ye();
|
|
1765
|
+
T(
|
|
1766
|
+
() => {
|
|
1767
|
+
var w, O, f;
|
|
1768
|
+
return (((O = (w = i.layout) == null ? void 0 : w.colWidths) == null ? void 0 : O.length) ?? 0) > 0 || y.value.length > 0 || (((f = i.layout) == null ? void 0 : f.rowHeight) ?? 0) > 0 || p.value > 0;
|
|
1769
|
+
}
|
|
1770
|
+
);
|
|
1771
|
+
function C() {
|
|
1772
|
+
o(), s(), a("update:layout", {
|
|
1773
|
+
...i.layout,
|
|
1774
|
+
rowHeight: void 0,
|
|
1775
|
+
colWidths: void 0
|
|
1776
|
+
});
|
|
1777
|
+
const w = document.querySelector("table");
|
|
1778
|
+
if (w) {
|
|
1779
|
+
w.classList.remove("table-fixed"), w.classList.add("table-auto"), w.style.width = "";
|
|
1780
|
+
const O = w.querySelectorAll("th"), f = w.querySelectorAll("td"), _ = w.querySelectorAll("tr");
|
|
1781
|
+
O.forEach((L) => {
|
|
1782
|
+
L.style.width = "";
|
|
1783
|
+
}), f.forEach((L) => {
|
|
1784
|
+
L.style.width = "";
|
|
1785
|
+
}), _.forEach((L) => {
|
|
1786
|
+
L.style.height = "";
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return Se(() => {
|
|
1791
|
+
var w, O;
|
|
1792
|
+
((w = i.layout) == null ? void 0 : w.rowHeight) !== void 0 && (p.value = i.layout.rowHeight), (O = i.layout) != null && O.colWidths && (y.value = [...i.layout.colWidths]);
|
|
1793
|
+
}), (w, O) => {
|
|
1794
|
+
const f = k("FmButton");
|
|
1795
|
+
return b(), R("div", eo, [
|
|
1796
|
+
F("p", lo, j(l(t)("report.section.datasource.tableLayout")), 1),
|
|
1797
|
+
F("div", oo, [
|
|
1798
|
+
l(g) ? U("", !0) : (b(), D(f, {
|
|
1799
|
+
key: 0,
|
|
1800
|
+
label: l(t)("report.section.datasource.resizeTable"),
|
|
1801
|
+
variant: "secondary",
|
|
1802
|
+
icon: "resize",
|
|
1803
|
+
"icon-position": "prepend",
|
|
1804
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1805
|
+
onClick: l(V)
|
|
1806
|
+
}, null, 8, ["label", "onClick"])),
|
|
1807
|
+
l(g) ? (b(), D(f, {
|
|
1808
|
+
key: 1,
|
|
1809
|
+
label: l(t)("report.common.cancel"),
|
|
1810
|
+
variant: "primary",
|
|
1811
|
+
icon: "close",
|
|
1812
|
+
"icon-position": "prepend",
|
|
1813
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1814
|
+
onClick: l(h)
|
|
1815
|
+
}, null, 8, ["label", "onClick"])) : U("", !0),
|
|
1816
|
+
u(f, {
|
|
1817
|
+
label: l(t)("report.section.datasource.resetSize"),
|
|
1818
|
+
variant: "secondary",
|
|
1819
|
+
icon: "restore",
|
|
1820
|
+
"icon-position": "prepend",
|
|
1821
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1822
|
+
onClick: C
|
|
1823
|
+
}, null, 8, ["label"])
|
|
1824
|
+
]),
|
|
1825
|
+
l(g) ? (b(), R("p", to, j(l(t)("report.section.datasource.resizeTableHelper")), 1)) : U("", !0)
|
|
1826
|
+
]);
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
}), no = { class: "flex gap-16 justify-center items-center" }, io = { class: "fm-typo-en-title-sm-600" }, so = { class: "fm-typo-en-body-lg-600" }, uo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, ro = { class: "h-[40x]" }, Ie = "YYYY-MM-DD", We = /* @__PURE__ */ q({
|
|
1830
|
+
__name: "TileEditorTab",
|
|
1831
|
+
props: /* @__PURE__ */ K({
|
|
1832
|
+
hideConfiguration: {
|
|
1833
|
+
type: Boolean,
|
|
1834
|
+
default: !1
|
|
1835
|
+
}
|
|
1836
|
+
}, {
|
|
1837
|
+
modelValue: {
|
|
1838
|
+
required: !0
|
|
1839
|
+
},
|
|
1840
|
+
modelModifiers: {}
|
|
1841
|
+
}),
|
|
1842
|
+
emits: /* @__PURE__ */ K(["hideConfiguration"], ["update:modelValue"]),
|
|
1843
|
+
setup(x, { emit: d }) {
|
|
1844
|
+
var m, r;
|
|
1845
|
+
const t = Pe(), { dateRange: i, timezone: a } = de(t), g = {
|
|
1846
|
+
startDate: i.value.startDate,
|
|
1847
|
+
endDate: i.value.endDate
|
|
1848
|
+
}, y = H({
|
|
1849
|
+
startDate: (m = ge(i.value.startDate)) == null ? void 0 : m.tz(a.value).format(Ie),
|
|
1850
|
+
endDate: (r = ge(i.value.endDate)) == null ? void 0 : r.tz(a.value).format(Ie)
|
|
1851
|
+
});
|
|
1852
|
+
re(
|
|
1853
|
+
y,
|
|
1854
|
+
() => {
|
|
1855
|
+
y.value.endDate || (y.value.endDate = y.value.startDate);
|
|
1856
|
+
const c = {
|
|
1857
|
+
startDate: ge.tz(y.value.startDate, a.value).startOf("day").utc().toISOString(),
|
|
1858
|
+
endDate: ge.tz(y.value.endDate, a.value).endOf("day").utc().toISOString()
|
|
1859
|
+
};
|
|
1860
|
+
i.value = c;
|
|
1861
|
+
},
|
|
1862
|
+
{ deep: !0 }
|
|
1863
|
+
), He(() => {
|
|
1864
|
+
i.value = { ...g };
|
|
1865
|
+
});
|
|
1866
|
+
const p = ee(x, "modelValue"), { breakpoints: V } = Ae(), h = x, { promptMessage: o } = Me(), s = d, { t: C, locale: w } = J();
|
|
1867
|
+
function O(c) {
|
|
1868
|
+
p.value = kl(c);
|
|
1869
|
+
}
|
|
1870
|
+
function f() {
|
|
1871
|
+
const c = [...p.value.widget.config.joinDatasources || []];
|
|
1872
|
+
c.push({ ...ll(p.value.widget.type), conditions: [] }), O({
|
|
1873
|
+
...p.value,
|
|
1874
|
+
widget: {
|
|
1875
|
+
...p.value.widget,
|
|
1876
|
+
config: {
|
|
1877
|
+
...p.value.widget.config,
|
|
1878
|
+
joinDatasources: c
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
});
|
|
1882
|
+
}
|
|
1883
|
+
async function _(c) {
|
|
1884
|
+
if (!await o({
|
|
1885
|
+
title: C("report.tile.datasource.remove"),
|
|
1886
|
+
message: C("report.tile.datasource.confirmRemove", { index: c + 1 })
|
|
1887
|
+
})) return;
|
|
1888
|
+
const I = [...p.value.widget.config.joinDatasources || []];
|
|
1889
|
+
I.splice(c, 1), O({
|
|
1890
|
+
...p.value,
|
|
1891
|
+
widget: {
|
|
1892
|
+
...p.value.widget,
|
|
1893
|
+
config: {
|
|
1894
|
+
...p.value.widget.config,
|
|
1895
|
+
joinDatasources: I
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
}
|
|
1900
|
+
const L = (c, v) => {
|
|
1901
|
+
let I = 1, M = 1;
|
|
1902
|
+
switch (c) {
|
|
1903
|
+
case z.Scorecard:
|
|
1904
|
+
I = 1, M = 2;
|
|
1905
|
+
break;
|
|
1906
|
+
case z.BarChart:
|
|
1907
|
+
case z.StackBarChart:
|
|
1908
|
+
case z.LineChart:
|
|
1909
|
+
case z.StackLineChart:
|
|
1910
|
+
I = 4, M = 6;
|
|
1911
|
+
break;
|
|
1912
|
+
case z.Table:
|
|
1913
|
+
I = 4, M = 12;
|
|
1914
|
+
break;
|
|
1915
|
+
case z.Circular:
|
|
1916
|
+
I = 4, M = 4;
|
|
1917
|
+
break;
|
|
1918
|
+
case z.Spacer:
|
|
1919
|
+
I = 0, M = 12;
|
|
1920
|
+
break;
|
|
1921
|
+
}
|
|
1922
|
+
return {
|
|
1923
|
+
id: v.id,
|
|
1924
|
+
size: {
|
|
1925
|
+
height: I,
|
|
1926
|
+
width: M
|
|
1927
|
+
},
|
|
1928
|
+
widget: {
|
|
1929
|
+
...v.widget,
|
|
1930
|
+
type: c
|
|
1931
|
+
}
|
|
1932
|
+
};
|
|
1933
|
+
}, S = T(
|
|
1934
|
+
() => Fe.find((c) => c.type === p.value.widget.type)
|
|
1935
|
+
), n = T(() => p.value.widget.config.joinDatasources), e = he((c) => {
|
|
1936
|
+
p.value.widget.title = c;
|
|
1937
|
+
}, 500);
|
|
1938
|
+
return re(
|
|
1939
|
+
() => p.value.size.height,
|
|
1940
|
+
(c) => {
|
|
1941
|
+
c < 1 && (p.value.size.height = 1), c > 12 && (p.value.size.height = 12);
|
|
1942
|
+
}
|
|
1943
|
+
), re(
|
|
1944
|
+
() => p.value.size.width,
|
|
1945
|
+
(c) => {
|
|
1946
|
+
c < 1 && (p.value.size.width = 1), c > 12 && (p.value.size.width = 12);
|
|
1947
|
+
}
|
|
1948
|
+
), (c, v) => {
|
|
1949
|
+
const I = k("FmCircularProgress"), M = k("FmSimpleDateRangePicker"), Q = k("FmTextField"), E = k("FmTextarea"), X = k("FmStepperField"), G = k("FmButton"), te = k("FmForm");
|
|
1950
|
+
return b(), D(je(l(V).lg || l(V).md ? El : ql), {
|
|
1951
|
+
"model-value": h.hideConfiguration,
|
|
1952
|
+
"onUpdate:modelValue": v[9] || (v[9] = ($) => s("hideConfiguration", $))
|
|
1953
|
+
}, {
|
|
1954
|
+
default: N(() => [
|
|
1955
|
+
p.value ? (b(), D(te, {
|
|
1956
|
+
key: 1,
|
|
1957
|
+
ref: "form",
|
|
1958
|
+
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
1959
|
+
}, {
|
|
1960
|
+
default: N(() => [
|
|
1961
|
+
F("div", no, [
|
|
1962
|
+
(b(), D(M, {
|
|
1963
|
+
key: `date-picker-${l(w)}`,
|
|
1964
|
+
modelValue: y.value,
|
|
1965
|
+
"onUpdate:modelValue": v[0] || (v[0] = ($) => y.value = $)
|
|
1966
|
+
}, null, 8, ["modelValue"]))
|
|
1967
|
+
]),
|
|
1968
|
+
u(ke, null, {
|
|
1969
|
+
header: N(() => [
|
|
1970
|
+
F("p", io, j(l(C)("report.tile.widget.details")), 1),
|
|
1971
|
+
v[10] || (v[10] = F("div", { class: "grow" }, null, -1))
|
|
1972
|
+
]),
|
|
1973
|
+
content: N(() => [
|
|
1974
|
+
u(Q, {
|
|
1975
|
+
"model-value": p.value.widget.title,
|
|
1976
|
+
label: l(C)("report.tile.widget.title"),
|
|
1977
|
+
placeholder: l(C)("report.tile.widget.titlePlaceholder"),
|
|
1978
|
+
"onUpdate:modelValue": l(e)
|
|
1979
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
1980
|
+
u(E, {
|
|
1981
|
+
modelValue: p.value.widget.description,
|
|
1982
|
+
"onUpdate:modelValue": v[1] || (v[1] = ($) => p.value.widget.description = $),
|
|
1983
|
+
disabled: p.value.widget.title === "",
|
|
1984
|
+
placeholder: l(C)("report.tile.widget.descriptionPlaceholder"),
|
|
1985
|
+
"helper-text": l(C)("report.tile.widget.descriptionHelper")
|
|
1986
|
+
}, {
|
|
1987
|
+
label: N(() => [
|
|
1988
|
+
F("p", so, j(l(C)("report.tile.widget.widgetDescription")), 1),
|
|
1989
|
+
F("p", uo, " (" + j(l(C)("report.tile.widget.optional")) + ") ", 1)
|
|
1990
|
+
]),
|
|
1991
|
+
_: 1
|
|
1992
|
+
}, 8, ["modelValue", "disabled", "placeholder", "helper-text"]),
|
|
1993
|
+
u(Zl, {
|
|
1994
|
+
model: p.value.widget.config,
|
|
1995
|
+
"onUpdate:model": v[2] || (v[2] = ($) => p.value.widget.config = $)
|
|
1996
|
+
}, null, 8, ["model"]),
|
|
1997
|
+
F("div", {
|
|
1998
|
+
class: ze(["flex flex-row", `${l(V).sm || l(V).xs ? "gap-16" : "gap-2"}`])
|
|
1999
|
+
}, [
|
|
2000
|
+
u(X, {
|
|
2001
|
+
modelValue: p.value.size.width,
|
|
2002
|
+
"onUpdate:modelValue": v[3] || (v[3] = ($) => p.value.size.width = $),
|
|
2003
|
+
label: l(C)("report.tile.widget.width"),
|
|
2004
|
+
min: 1,
|
|
2005
|
+
max: 12
|
|
2006
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2007
|
+
u(X, {
|
|
2008
|
+
modelValue: p.value.size.height,
|
|
2009
|
+
"onUpdate:modelValue": v[4] || (v[4] = ($) => p.value.size.height = $),
|
|
2010
|
+
label: l(C)("report.tile.widget.height"),
|
|
2011
|
+
min: 1,
|
|
2012
|
+
max: 12,
|
|
2013
|
+
disabled: p.value.widget.type === l(z).Scorecard
|
|
2014
|
+
}, null, 8, ["modelValue", "label", "disabled"])
|
|
2015
|
+
], 2),
|
|
2016
|
+
p.value.widget.type === l(z).Table ? (b(), D(ao, {
|
|
2017
|
+
key: 0,
|
|
2018
|
+
layout: p.value.widget.config,
|
|
2019
|
+
"onUpdate:layout": v[5] || (v[5] = ($) => p.value.widget.config = $)
|
|
2020
|
+
}, null, 8, ["layout"])) : U("", !0)
|
|
2021
|
+
]),
|
|
2022
|
+
_: 1
|
|
2023
|
+
}),
|
|
2024
|
+
u(ke, null, {
|
|
2025
|
+
header: N(() => [
|
|
2026
|
+
F("p", null, j(l(C)("report.tile.widget.type")), 1),
|
|
2027
|
+
v[11] || (v[11] = F("div", { class: "grow" }, null, -1))
|
|
2028
|
+
]),
|
|
2029
|
+
content: N(() => [
|
|
2030
|
+
u(el, {
|
|
2031
|
+
"is-list": !0,
|
|
2032
|
+
"model-value": p.value.widget.type,
|
|
2033
|
+
class: "grid grid-cols-1 gap-2",
|
|
2034
|
+
"child-class": "flex flex-row p-[8px] gap-2",
|
|
2035
|
+
"exclude-widge-type": [l(z).Spacer],
|
|
2036
|
+
"onUpdate:modelValue": v[6] || (v[6] = ($) => p.value = L($, p.value))
|
|
2037
|
+
}, null, 8, ["model-value", "exclude-widge-type"])
|
|
2038
|
+
]),
|
|
2039
|
+
_: 1
|
|
2040
|
+
}),
|
|
2041
|
+
u(Le, {
|
|
2042
|
+
modelValue: p.value.widget.config,
|
|
2043
|
+
"onUpdate:modelValue": v[7] || (v[7] = ($) => p.value.widget.config = $),
|
|
2044
|
+
label: l(C)("report.tile.datasource.main"),
|
|
2045
|
+
config: S.value
|
|
2046
|
+
}, null, 8, ["modelValue", "label", "config"]),
|
|
2047
|
+
n.value ? (b(!0), R(oe, { key: 0 }, pe(n.value, ($, P) => (b(), R("div", { key: P }, [
|
|
2048
|
+
u(Le, {
|
|
2049
|
+
modelValue: n.value[P],
|
|
2050
|
+
"onUpdate:modelValue": (W) => n.value[P] = W,
|
|
2051
|
+
label: l(C)("report.tile.datasource.join", { index: P + 1 }),
|
|
2052
|
+
config: S.value,
|
|
2053
|
+
"main-datasource-config": p.value.widget.config,
|
|
2054
|
+
closeable: !0,
|
|
2055
|
+
onClickClose: (W) => _(P)
|
|
2056
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "config", "main-datasource-config", "onClickClose"])
|
|
2057
|
+
]))), 128)) : U("", !0),
|
|
2058
|
+
F("div", ro, [
|
|
2059
|
+
u(G, {
|
|
2060
|
+
label: l(C)("report.tile.datasource.joinButton"),
|
|
2061
|
+
variant: "secondary",
|
|
2062
|
+
icon: "add",
|
|
2063
|
+
"icon-position": "prepend",
|
|
2064
|
+
"border-color": "primary",
|
|
2065
|
+
"text-color": "primary",
|
|
2066
|
+
class: "w-full",
|
|
2067
|
+
onClick: v[8] || (v[8] = ($) => f())
|
|
2068
|
+
}, null, 8, ["label"])
|
|
2069
|
+
])
|
|
2070
|
+
]),
|
|
2071
|
+
_: 1
|
|
2072
|
+
}, 512)) : (b(), D(I, { key: 0 }))
|
|
2073
|
+
]),
|
|
2074
|
+
_: 1
|
|
2075
|
+
}, 8, ["model-value"]);
|
|
2076
|
+
};
|
|
2077
|
+
}
|
|
2078
|
+
}), mo = { class: "flex flex-col gap-8" }, co = { class: "pl-32 flex flex-col gap-8" }, po = { class: "fm-typo-en-body-lg-600" }, vo = { class: "flex flex-row gap-8" }, fo = { class: "fm-typo-en-body-lg-600" }, go = { class: "flex flex-row gap-8" }, bo = /* @__PURE__ */ q({
|
|
2079
|
+
__name: "LabelSection",
|
|
2080
|
+
props: {
|
|
2081
|
+
model: {}
|
|
2082
|
+
},
|
|
2083
|
+
emits: ["update:model"],
|
|
2084
|
+
setup(x, { emit: d }) {
|
|
2085
|
+
const t = x, i = d, { t: a } = J(), g = T({
|
|
2086
|
+
get: () => t.model.showLabel ?? !1,
|
|
2087
|
+
set: (w) => {
|
|
2088
|
+
i("update:model", { ...t.model, showLabel: w });
|
|
2089
|
+
}
|
|
2090
|
+
}), y = T({
|
|
2091
|
+
get: () => t.model.labelRotation ?? 0,
|
|
2092
|
+
set: (w) => i("update:model", { ...t.model, labelRotation: w })
|
|
2093
|
+
}), p = T({
|
|
2094
|
+
get: () => t.model.labelOffset ?? 0,
|
|
2095
|
+
set: (w) => i("update:model", { ...t.model, labelOffset: w })
|
|
2096
|
+
}), V = T({
|
|
2097
|
+
get: () => t.model.labelFontSize ?? 12,
|
|
2098
|
+
set: (w) => i("update:model", { ...t.model, labelFontSize: w })
|
|
2099
|
+
}), h = (w) => {
|
|
2100
|
+
i("update:model", {
|
|
2101
|
+
...t.model,
|
|
2102
|
+
labelAlign: t.model.labelAlign === w ? void 0 : w
|
|
2103
|
+
});
|
|
2104
|
+
}, o = (w) => {
|
|
2105
|
+
i("update:model", {
|
|
2106
|
+
...t.model,
|
|
2107
|
+
labelAnchor: t.model.labelAnchor === w ? void 0 : w
|
|
2108
|
+
});
|
|
2109
|
+
}, s = [
|
|
2110
|
+
{ icon: "align_horizontal_left", value: ie.left, tooltip: "alignLeft" },
|
|
2111
|
+
{ icon: "align_justify_center", value: ie.center, tooltip: "alignCenter" },
|
|
2112
|
+
{ icon: "align_horizontal_right", value: ie.right, tooltip: "alignRight" },
|
|
2113
|
+
{ icon: "align_justify_flex_start", value: ie.start, tooltip: "alignStart" },
|
|
2114
|
+
{ icon: "align_justify_flex_end", value: ie.end, tooltip: "alignEnd" },
|
|
2115
|
+
{ icon: "align_flex_start", value: ie.top, tooltip: "alignTop" },
|
|
2116
|
+
{ icon: "align_flex_end", value: ie.bottom, tooltip: "alignBottom" }
|
|
2117
|
+
], C = [
|
|
2118
|
+
{ icon: "format_align_left", value: be.start, tooltip: "anchorStart" },
|
|
2119
|
+
{ icon: "format_align_center", value: be.center, tooltip: "anchorCenter" },
|
|
2120
|
+
{ icon: "format_align_right", value: be.end, tooltip: "anchorEnd" }
|
|
2121
|
+
];
|
|
2122
|
+
return (w, O) => {
|
|
2123
|
+
const f = k("FmCheckbox"), _ = k("FmButton"), L = k("FmTooltip"), S = k("FmTextField"), n = k("FmStepperField");
|
|
2124
|
+
return b(), R("div", mo, [
|
|
2125
|
+
u(f, {
|
|
2126
|
+
modelValue: g.value,
|
|
2127
|
+
"onUpdate:modelValue": O[0] || (O[0] = (e) => g.value = e),
|
|
2128
|
+
value: !1,
|
|
2129
|
+
label: l(a)("report.section.datasource.label.showLabel"),
|
|
2130
|
+
"label-placement": "right",
|
|
2131
|
+
class: "fm-typo-en-body-lg-400"
|
|
2132
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2133
|
+
se(F("div", co, [
|
|
2134
|
+
F("p", po, j(l(a)("report.section.datasource.alignment.textAlignment")), 1),
|
|
2135
|
+
F("div", vo, [
|
|
2136
|
+
(b(), R(oe, null, pe(s, ({ icon: e, value: m, tooltip: r }) => u(L, {
|
|
2137
|
+
key: m,
|
|
2138
|
+
variant: "plain",
|
|
2139
|
+
placement: "top",
|
|
2140
|
+
content: l(a)(`report.section.datasource.alignment.alignOptions.${r}`),
|
|
2141
|
+
"z-index": 50
|
|
2142
|
+
}, {
|
|
2143
|
+
default: N(() => [
|
|
2144
|
+
u(_, {
|
|
2145
|
+
"append-icon": e,
|
|
2146
|
+
variant: "tertiary",
|
|
2147
|
+
"icon-color": w.model.labelAlign === m ? "neutral-gray-400" : "neutral-gray-300",
|
|
2148
|
+
"bg-color": w.model.labelAlign === m ? "neutral-gray-100" : "neutral-white",
|
|
2149
|
+
class: "rounded-sm",
|
|
2150
|
+
onClick: (c) => h(m)
|
|
2151
|
+
}, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
|
|
2152
|
+
]),
|
|
2153
|
+
_: 2
|
|
2154
|
+
}, 1032, ["content"])), 64))
|
|
2155
|
+
]),
|
|
2156
|
+
F("p", fo, j(l(a)("report.section.datasource.alignment.anchor")), 1),
|
|
2157
|
+
F("div", go, [
|
|
2158
|
+
(b(), R(oe, null, pe(C, ({ icon: e, value: m, tooltip: r }) => u(L, {
|
|
2159
|
+
key: m,
|
|
2160
|
+
variant: "plain",
|
|
2161
|
+
placement: "top",
|
|
2162
|
+
content: l(a)(`report.section.datasource.alignment.anchorOptions.${r}`),
|
|
2163
|
+
"z-index": 50
|
|
2164
|
+
}, {
|
|
2165
|
+
default: N(() => [
|
|
2166
|
+
u(_, {
|
|
2167
|
+
"append-icon": e,
|
|
2168
|
+
variant: "tertiary",
|
|
2169
|
+
"icon-color": w.model.labelAnchor === m ? "neutral-gray-400" : "neutral-gray-300",
|
|
2170
|
+
"bg-color": w.model.labelAnchor === m ? "neutral-gray-100" : "neutral-white",
|
|
2171
|
+
class: "rounded-sm",
|
|
2172
|
+
onClick: (c) => o(m)
|
|
2173
|
+
}, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
|
|
2174
|
+
]),
|
|
2175
|
+
_: 2
|
|
2176
|
+
}, 1032, ["content"])), 64))
|
|
2177
|
+
]),
|
|
2178
|
+
u(S, {
|
|
2179
|
+
modelValue: y.value,
|
|
2180
|
+
"onUpdate:modelValue": O[1] || (O[1] = (e) => y.value = e),
|
|
2181
|
+
label: l(a)("report.section.datasource.alignment.rotation"),
|
|
2182
|
+
type: "number",
|
|
2183
|
+
min: -180,
|
|
2184
|
+
max: 180,
|
|
2185
|
+
step: 1
|
|
2186
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2187
|
+
u(S, {
|
|
2188
|
+
modelValue: p.value,
|
|
2189
|
+
"onUpdate:modelValue": O[2] || (O[2] = (e) => p.value = e),
|
|
2190
|
+
label: l(a)("report.section.datasource.alignment.offset"),
|
|
2191
|
+
type: "number"
|
|
2192
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2193
|
+
u(n, {
|
|
2194
|
+
modelValue: V.value,
|
|
2195
|
+
"onUpdate:modelValue": O[3] || (O[3] = (e) => V.value = e),
|
|
2196
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2197
|
+
type: "number",
|
|
2198
|
+
min: 1
|
|
2199
|
+
}, null, 8, ["modelValue", "label"])
|
|
2200
|
+
], 512), [
|
|
2201
|
+
[ue, g.value]
|
|
2202
|
+
])
|
|
2203
|
+
]);
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
2206
|
+
}), yo = { class: "flex flex-col gap-8" }, ho = { class: "pl-32 flex flex-col gap-8" }, Vo = { class: "pl-32 flex flex-col gap-8" }, wo = { class: "pl-32 flex flex-col gap-8" }, Fo = { class: "pl-32 flex flex-col gap-8" }, xo = { class: "pl-32 flex flex-col gap-8" }, ko = { class: "pl-32 flex flex-col gap-8" }, Co = /* @__PURE__ */ q({
|
|
2207
|
+
__name: "XySection",
|
|
2208
|
+
props: {
|
|
2209
|
+
model: {}
|
|
2210
|
+
},
|
|
2211
|
+
emits: ["update:model"],
|
|
2212
|
+
setup(x, { emit: d }) {
|
|
2213
|
+
const t = x, i = d, { t: a } = J(), g = T({
|
|
2214
|
+
get: () => t.model.showX ?? !0,
|
|
2215
|
+
set: (f) => {
|
|
2216
|
+
i("update:model", { ...t.model, showX: f });
|
|
2217
|
+
}
|
|
2218
|
+
}), y = T({
|
|
2219
|
+
get: () => t.model.showXGrid ?? !1,
|
|
2220
|
+
set: (f) => {
|
|
2221
|
+
i("update:model", { ...t.model, showXGrid: f });
|
|
2222
|
+
}
|
|
2223
|
+
}), p = T({
|
|
2224
|
+
get: () => t.model.showXTick ?? !0,
|
|
2225
|
+
set: (f) => {
|
|
2226
|
+
i("update:model", { ...t.model, showXTick: f });
|
|
2227
|
+
}
|
|
2228
|
+
}), V = T({
|
|
2229
|
+
get: () => t.model.showY ?? !0,
|
|
2230
|
+
set: (f) => {
|
|
2231
|
+
i("update:model", { ...t.model, showY: f });
|
|
2232
|
+
}
|
|
2233
|
+
}), h = T({
|
|
2234
|
+
get: () => t.model.showYGrid ?? !0,
|
|
2235
|
+
set: (f) => {
|
|
2236
|
+
i("update:model", { ...t.model, showYGrid: f });
|
|
2237
|
+
}
|
|
2238
|
+
}), o = T({
|
|
2239
|
+
get: () => t.model.showYTick ?? !0,
|
|
2240
|
+
set: (f) => {
|
|
2241
|
+
i("update:model", { ...t.model, showYTick: f });
|
|
2242
|
+
}
|
|
2243
|
+
}), s = T({
|
|
2244
|
+
get: () => t.model.showXTitle ?? !1,
|
|
2245
|
+
set: (f) => {
|
|
2246
|
+
i("update:model", { ...t.model, showXTitle: f });
|
|
2247
|
+
}
|
|
2248
|
+
}), C = T({
|
|
2249
|
+
get: () => t.model.showYTitle ?? !1,
|
|
2250
|
+
set: (f) => {
|
|
2251
|
+
i("update:model", { ...t.model, showYTitle: f });
|
|
2252
|
+
}
|
|
2253
|
+
}), w = he((f) => {
|
|
2254
|
+
i("update:model", { ...t.model, xTitle: f });
|
|
2255
|
+
}, 500), O = he((f) => {
|
|
2256
|
+
i("update:model", { ...t.model, yTitle: f });
|
|
2257
|
+
}, 500);
|
|
2258
|
+
return Se(() => {
|
|
2259
|
+
var f, _, L, S;
|
|
2260
|
+
!t.model.xTitle && ((_ = (f = t.model.metrics) == null ? void 0 : f[0]) != null && _.label) && w(t.model.metrics[0].label), !t.model.yTitle && ((S = (L = t.model.dimensions) == null ? void 0 : L[0]) != null && S.label) && O(t.model.dimensions[0].label);
|
|
2261
|
+
}), (f, _) => {
|
|
2262
|
+
const L = k("FmCheckbox"), S = k("FmStepperField"), n = k("FmTextField");
|
|
2263
|
+
return b(), R("div", yo, [
|
|
2264
|
+
u(L, {
|
|
2265
|
+
modelValue: g.value,
|
|
2266
|
+
"onUpdate:modelValue": _[0] || (_[0] = (e) => g.value = e),
|
|
2267
|
+
label: l(a)("report.section.datasource.axis.showX"),
|
|
2268
|
+
"label-placement": "right",
|
|
2269
|
+
value: !0
|
|
2270
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2271
|
+
se(F("div", ho, [
|
|
2272
|
+
u(L, {
|
|
2273
|
+
modelValue: y.value,
|
|
2274
|
+
"onUpdate:modelValue": _[1] || (_[1] = (e) => y.value = e),
|
|
2275
|
+
label: l(a)("report.section.datasource.axis.showGrid"),
|
|
2276
|
+
"label-placement": "right",
|
|
2277
|
+
value: !1
|
|
2278
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2279
|
+
u(L, {
|
|
2280
|
+
modelValue: p.value,
|
|
2281
|
+
"onUpdate:modelValue": _[2] || (_[2] = (e) => p.value = e),
|
|
2282
|
+
label: l(a)("report.section.datasource.axis.showTick"),
|
|
2283
|
+
"label-placement": "right",
|
|
2284
|
+
value: !0
|
|
2285
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2286
|
+
se(F("div", Vo, [
|
|
2287
|
+
u(S, {
|
|
2288
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2289
|
+
type: "number",
|
|
2290
|
+
"model-value": f.model.xTickFontSize ?? 12,
|
|
2291
|
+
min: 1,
|
|
2292
|
+
"onUpdate:modelValue": _[3] || (_[3] = (e) => {
|
|
2293
|
+
i("update:model", { ...f.model, xTickFontSize: Number(e) });
|
|
2294
|
+
})
|
|
2295
|
+
}, null, 8, ["label", "model-value"])
|
|
2296
|
+
], 512), [
|
|
2297
|
+
[ue, f.model.showXTick ?? !0]
|
|
2298
|
+
]),
|
|
2299
|
+
u(L, {
|
|
2300
|
+
modelValue: s.value,
|
|
2301
|
+
"onUpdate:modelValue": _[4] || (_[4] = (e) => s.value = e),
|
|
2302
|
+
label: l(a)("report.section.datasource.axis.showTitle"),
|
|
2303
|
+
"label-placement": "right",
|
|
2304
|
+
value: !0
|
|
2305
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2306
|
+
se(F("div", wo, [
|
|
2307
|
+
u(n, {
|
|
2308
|
+
"model-value": f.model.xTitle,
|
|
2309
|
+
label: l(a)("report.common.title"),
|
|
2310
|
+
placeholder: l(a)("report.tile.widget.titlePlaceholder"),
|
|
2311
|
+
"onUpdate:modelValue": l(w)
|
|
2312
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
2313
|
+
u(S, {
|
|
2314
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2315
|
+
type: "number",
|
|
2316
|
+
"model-value": f.model.xTitleFontSize ?? 12,
|
|
2317
|
+
min: 1,
|
|
2318
|
+
"onUpdate:modelValue": _[5] || (_[5] = (e) => {
|
|
2319
|
+
i("update:model", { ...f.model, xTitleFontSize: Number(e) });
|
|
2320
|
+
})
|
|
2321
|
+
}, null, 8, ["label", "model-value"])
|
|
2322
|
+
], 512), [
|
|
2323
|
+
[ue, s.value]
|
|
2324
|
+
])
|
|
2325
|
+
], 512), [
|
|
2326
|
+
[ue, f.model.showX ?? !0]
|
|
2327
|
+
]),
|
|
2328
|
+
u(L, {
|
|
2329
|
+
modelValue: V.value,
|
|
2330
|
+
"onUpdate:modelValue": _[6] || (_[6] = (e) => V.value = e),
|
|
2331
|
+
label: l(a)("report.section.datasource.axis.showY"),
|
|
2332
|
+
"label-placement": "right",
|
|
2333
|
+
value: !0
|
|
2334
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2335
|
+
se(F("div", Fo, [
|
|
2336
|
+
u(L, {
|
|
2337
|
+
modelValue: h.value,
|
|
2338
|
+
"onUpdate:modelValue": _[7] || (_[7] = (e) => h.value = e),
|
|
2339
|
+
label: l(a)("report.section.datasource.axis.showGrid"),
|
|
2340
|
+
"label-placement": "right",
|
|
2341
|
+
value: !1
|
|
2342
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2343
|
+
u(L, {
|
|
2344
|
+
modelValue: o.value,
|
|
2345
|
+
"onUpdate:modelValue": _[8] || (_[8] = (e) => o.value = e),
|
|
2346
|
+
label: l(a)("report.section.datasource.axis.showTick"),
|
|
2347
|
+
"label-placement": "right",
|
|
2348
|
+
value: !0
|
|
2349
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2350
|
+
se(F("div", xo, [
|
|
2351
|
+
u(S, {
|
|
2352
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2353
|
+
type: "number",
|
|
2354
|
+
"model-value": f.model.yTickFontSize ?? 12,
|
|
2355
|
+
min: 1,
|
|
2356
|
+
"onUpdate:modelValue": _[9] || (_[9] = (e) => {
|
|
2357
|
+
i("update:model", { ...f.model, yTickFontSize: Number(e) });
|
|
2358
|
+
})
|
|
2359
|
+
}, null, 8, ["label", "model-value"])
|
|
2360
|
+
], 512), [
|
|
2361
|
+
[ue, f.model.showYTick ?? !0]
|
|
2362
|
+
]),
|
|
2363
|
+
u(L, {
|
|
2364
|
+
modelValue: C.value,
|
|
2365
|
+
"onUpdate:modelValue": _[10] || (_[10] = (e) => C.value = e),
|
|
2366
|
+
label: l(a)("report.section.datasource.axis.showTitle"),
|
|
2367
|
+
"label-placement": "right",
|
|
2368
|
+
value: !0
|
|
2369
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2370
|
+
se(F("div", ko, [
|
|
2371
|
+
u(n, {
|
|
2372
|
+
"model-value": f.model.yTitle,
|
|
2373
|
+
label: l(a)("report.common.title"),
|
|
2374
|
+
placeholder: l(a)("report.tile.widget.titlePlaceholder"),
|
|
2375
|
+
"onUpdate:modelValue": l(O)
|
|
2376
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
2377
|
+
u(S, {
|
|
2378
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2379
|
+
type: "number",
|
|
2380
|
+
"model-value": f.model.yTitleFontSize ?? 12,
|
|
2381
|
+
min: 1,
|
|
2382
|
+
"onUpdate:modelValue": _[11] || (_[11] = (e) => {
|
|
2383
|
+
i("update:model", { ...f.model, yTitleFontSize: Number(e) });
|
|
2384
|
+
})
|
|
2385
|
+
}, null, 8, ["label", "model-value"])
|
|
2386
|
+
], 512), [
|
|
2387
|
+
[ue, C.value]
|
|
2388
|
+
])
|
|
2389
|
+
], 512), [
|
|
2390
|
+
[ue, f.model.showY ?? !0]
|
|
2391
|
+
])
|
|
2392
|
+
]);
|
|
2393
|
+
};
|
|
2394
|
+
}
|
|
2395
|
+
}), _o = { class: "flex flex-col gap-8" }, So = { class: "pl-32 flex flex-col gap-8" }, To = /* @__PURE__ */ q({
|
|
2396
|
+
__name: "LegendSection",
|
|
2397
|
+
props: {
|
|
2398
|
+
model: {},
|
|
2399
|
+
isCircularWidget: { type: Boolean }
|
|
2400
|
+
},
|
|
2401
|
+
emits: ["update:model"],
|
|
2402
|
+
setup(x, { emit: d }) {
|
|
2403
|
+
const t = x, i = d, { t: a } = J(), g = [
|
|
2404
|
+
{ label: a("report.section.datasource.position.top"), value: "top" },
|
|
2405
|
+
{ label: a("report.section.datasource.position.bottom"), value: "bottom" },
|
|
2406
|
+
{ label: a("report.section.datasource.position.left"), value: "left" },
|
|
2407
|
+
{ label: a("report.section.datasource.position.right"), value: "right" }
|
|
2408
|
+
], y = T({
|
|
2409
|
+
get: () => t.model.showLegend !== void 0 ? t.model.showLegend : t.isCircularWidget === !0,
|
|
2410
|
+
set: (o) => {
|
|
2411
|
+
i("update:model", { ...t.model, showLegend: o });
|
|
2412
|
+
}
|
|
2413
|
+
}), p = T({
|
|
2414
|
+
get: () => t.model.usePointStyle ?? !0,
|
|
2415
|
+
set: (o) => {
|
|
2416
|
+
i("update:model", { ...t.model, usePointStyle: o });
|
|
2417
|
+
}
|
|
2418
|
+
}), V = T({
|
|
2419
|
+
get: () => t.model.legendMaxHeight ?? 54,
|
|
2420
|
+
set: (o) => {
|
|
2421
|
+
i("update:model", { ...t.model, legendMaxHeight: o });
|
|
2422
|
+
}
|
|
2423
|
+
}), h = T({
|
|
2424
|
+
get: () => t.model.legendMaxWidth ?? 54,
|
|
2425
|
+
set: (o) => {
|
|
2426
|
+
i("update:model", { ...t.model, legendMaxWidth: o });
|
|
2427
|
+
}
|
|
2428
|
+
});
|
|
2429
|
+
return (o, s) => {
|
|
2430
|
+
const C = k("FmCheckbox"), w = k("FmSelect"), O = k("FmStepperField");
|
|
2431
|
+
return b(), R("div", _o, [
|
|
2432
|
+
u(C, {
|
|
2433
|
+
modelValue: y.value,
|
|
2434
|
+
"onUpdate:modelValue": s[0] || (s[0] = (f) => y.value = f),
|
|
2435
|
+
class: "fm-typo-en-body-lg-400",
|
|
2436
|
+
value: !1,
|
|
2437
|
+
label: l(a)("report.section.datasource.legend.showLegend")
|
|
2438
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2439
|
+
se(F("div", So, [
|
|
2440
|
+
u(w, {
|
|
2441
|
+
label: l(a)("report.section.datasource.position.showPosition"),
|
|
2442
|
+
items: g,
|
|
2443
|
+
"model-value": o.model.legendPosition ?? "top",
|
|
2444
|
+
"onUpdate:modelValue": s[1] || (s[1] = (f) => i("update:model", { ...o.model, legendPosition: f }))
|
|
2445
|
+
}, null, 8, ["label", "model-value"]),
|
|
2446
|
+
u(C, {
|
|
2447
|
+
modelValue: p.value,
|
|
2448
|
+
"onUpdate:modelValue": s[2] || (s[2] = (f) => p.value = f),
|
|
2449
|
+
label: l(a)("report.section.datasource.legend.usePointStyle"),
|
|
2450
|
+
value: !1
|
|
2451
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2452
|
+
o.model.legendPosition === "top" || o.model.legendPosition === "bottom" || !o.model.legendPosition ? (b(), D(O, {
|
|
2453
|
+
key: 0,
|
|
2454
|
+
label: l(a)("report.section.datasource.legend.maxHeight"),
|
|
2455
|
+
"model-value": V.value,
|
|
2456
|
+
"onUpdate:modelValue": s[3] || (s[3] = (f) => i("update:model", { ...o.model, legendMaxHeight: f }))
|
|
2457
|
+
}, null, 8, ["label", "model-value"])) : U("", !0),
|
|
2458
|
+
o.model.legendPosition === "left" || o.model.legendPosition === "right" ? (b(), D(O, {
|
|
2459
|
+
key: 1,
|
|
2460
|
+
label: l(a)("report.section.datasource.legend.maxWidth"),
|
|
2461
|
+
"model-value": h.value,
|
|
2462
|
+
"onUpdate:modelValue": s[4] || (s[4] = (f) => i("update:model", { ...o.model, legendMaxWidth: f }))
|
|
2463
|
+
}, null, 8, ["label", "model-value"])) : U("", !0)
|
|
2464
|
+
], 512), [
|
|
2465
|
+
[ue, y.value]
|
|
2466
|
+
])
|
|
2467
|
+
]);
|
|
2468
|
+
};
|
|
2469
|
+
}
|
|
2470
|
+
}), $o = { class: "flex flex-row gap-16" }, Do = /* @__PURE__ */ q({
|
|
2471
|
+
__name: "ChartSizeSection",
|
|
2472
|
+
props: {
|
|
2473
|
+
model: {}
|
|
2474
|
+
},
|
|
2475
|
+
emits: ["update:model"],
|
|
2476
|
+
setup(x, { emit: d }) {
|
|
2477
|
+
const t = x, i = d, { t: a } = J(), g = T({
|
|
2478
|
+
get: () => t.model.chartHeight ?? null,
|
|
2479
|
+
set: (p) => {
|
|
2480
|
+
i("update:model", { ...t.model, chartHeight: p ?? void 0 });
|
|
2481
|
+
}
|
|
2482
|
+
}), y = T({
|
|
2483
|
+
get: () => t.model.chartWidth ?? null,
|
|
2484
|
+
set: (p) => {
|
|
2485
|
+
i("update:model", { ...t.model, chartWidth: p ?? void 0 });
|
|
2486
|
+
}
|
|
2487
|
+
});
|
|
2488
|
+
return (p, V) => {
|
|
2489
|
+
const h = k("FmStepperField");
|
|
2490
|
+
return b(), R("div", $o, [
|
|
2491
|
+
u(h, {
|
|
2492
|
+
modelValue: g.value,
|
|
2493
|
+
"onUpdate:modelValue": V[0] || (V[0] = (o) => g.value = o),
|
|
2494
|
+
type: "number",
|
|
2495
|
+
label: l(a)("report.section.datasource.chartHeight"),
|
|
2496
|
+
suffix: "px",
|
|
2497
|
+
min: 1,
|
|
2498
|
+
placeholder: "Auto"
|
|
2499
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2500
|
+
u(h, {
|
|
2501
|
+
modelValue: y.value,
|
|
2502
|
+
"onUpdate:modelValue": V[1] || (V[1] = (o) => y.value = o),
|
|
2503
|
+
type: "number",
|
|
2504
|
+
label: l(a)("report.section.datasource.chartWidth"),
|
|
2505
|
+
suffix: "px",
|
|
2506
|
+
min: 1,
|
|
2507
|
+
placeholder: "Auto"
|
|
2508
|
+
}, null, 8, ["modelValue", "label"])
|
|
2509
|
+
]);
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
}), Uo = { class: "flex flex-col gap-16" }, No = { class: "flex flex-col gap-8" }, Oo = { class: "fm-typo-en-body-lg-600" }, Lo = { class: "flex flex-col gap-8" }, Io = /* @__PURE__ */ q({
|
|
2513
|
+
__name: "StyleDatasource",
|
|
2514
|
+
props: /* @__PURE__ */ K({
|
|
2515
|
+
label: {
|
|
2516
|
+
type: String,
|
|
2517
|
+
default: "Label"
|
|
2518
|
+
},
|
|
2519
|
+
config: {
|
|
2520
|
+
type: Object,
|
|
2521
|
+
default: null
|
|
2522
|
+
},
|
|
2523
|
+
closeable: {
|
|
2524
|
+
type: Boolean,
|
|
2525
|
+
default: !1
|
|
2526
|
+
},
|
|
2527
|
+
mainDatasourceConfig: {
|
|
2528
|
+
type: Object,
|
|
2529
|
+
default: () => {
|
|
2530
|
+
}
|
|
2531
|
+
},
|
|
2532
|
+
modelValue: {
|
|
2533
|
+
type: Object,
|
|
2534
|
+
default: () => {
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
}, {
|
|
2538
|
+
modelValue: { required: !0 },
|
|
2539
|
+
modelModifiers: {}
|
|
2540
|
+
}),
|
|
2541
|
+
emits: /* @__PURE__ */ K(["click-close"], ["update:modelValue"]),
|
|
2542
|
+
setup(x, { emit: d }) {
|
|
2543
|
+
const t = ee(x, "modelValue");
|
|
2544
|
+
re(
|
|
2545
|
+
[() => t.value.dimensions, () => t.value.metrics],
|
|
2546
|
+
() => {
|
|
2547
|
+
const { rowIds: V, columnIds: h } = Ve(t.value);
|
|
2548
|
+
t.value.rowIds = V, t.value.columnIds = h;
|
|
2549
|
+
},
|
|
2550
|
+
{ deep: !0 }
|
|
2551
|
+
);
|
|
2552
|
+
const i = x, a = d, { t: g, te: y } = J(), p = T(() => i.config.type === z.Circular);
|
|
2553
|
+
return (V, h) => {
|
|
2554
|
+
const o = k("FmButton");
|
|
2555
|
+
return b(), R(oe, null, [
|
|
2556
|
+
h[5] || (h[5] = F("div", { class: "grow" }, null, -1)),
|
|
2557
|
+
i.closeable ? (b(), D(o, {
|
|
2558
|
+
key: 0,
|
|
2559
|
+
icon: "close",
|
|
2560
|
+
variant: "tertiary",
|
|
2561
|
+
size: "md",
|
|
2562
|
+
onClick: h[0] || (h[0] = ne((s) => a("click-close"), ["stop"]))
|
|
2563
|
+
})) : U("", !0),
|
|
2564
|
+
F("div", Uo, [
|
|
2565
|
+
i.config.hasChart ? (b(), D(Do, {
|
|
2566
|
+
key: 0,
|
|
2567
|
+
model: t.value,
|
|
2568
|
+
"onUpdate:model": h[1] || (h[1] = (s) => t.value = s)
|
|
2569
|
+
}, null, 8, ["model"])) : U("", !0),
|
|
2570
|
+
F("div", No, [
|
|
2571
|
+
F("p", Oo, j(l(g)("report.section.style.configuration")), 1),
|
|
2572
|
+
F("div", Lo, [
|
|
2573
|
+
i.config.hasLabel ? (b(), D(bo, {
|
|
2574
|
+
key: 0,
|
|
2575
|
+
model: t.value,
|
|
2576
|
+
"onUpdate:model": h[2] || (h[2] = (s) => t.value = s)
|
|
2577
|
+
}, null, 8, ["model"])) : U("", !0),
|
|
2578
|
+
i.config.hasLegend ? (b(), D(To, {
|
|
2579
|
+
key: 1,
|
|
2580
|
+
model: t.value,
|
|
2581
|
+
"is-circular-widget": p.value,
|
|
2582
|
+
"onUpdate:model": h[3] || (h[3] = (s) => t.value = s)
|
|
2583
|
+
}, null, 8, ["model", "is-circular-widget"])) : U("", !0),
|
|
2584
|
+
i.config.hasXy ? (b(), D(Co, {
|
|
2585
|
+
key: 2,
|
|
2586
|
+
model: t.value,
|
|
2587
|
+
"onUpdate:model": h[4] || (h[4] = (s) => t.value = s)
|
|
2588
|
+
}, null, 8, ["model"])) : U("", !0)
|
|
2589
|
+
])
|
|
2590
|
+
])
|
|
2591
|
+
])
|
|
2592
|
+
], 64);
|
|
2593
|
+
};
|
|
2594
|
+
}
|
|
2595
|
+
}), Bo = { class: "fixed bottom-6 right-6" }, jo = { class: "flex w-full items-center gap-8" }, zo = { class: "fm-typo-en-title-sm-600" }, Ro = { class: "ml-auto text-fm-color-system-info-300" }, Mo = /* @__PURE__ */ q({
|
|
2596
|
+
__name: "StyleEditorTab",
|
|
2597
|
+
props: {
|
|
2598
|
+
modelValue: {
|
|
2599
|
+
required: !0
|
|
2600
|
+
},
|
|
2601
|
+
modelModifiers: {},
|
|
2602
|
+
isStyleEditing: { type: Boolean, required: !1, default: !1 },
|
|
2603
|
+
isStyleEditingModifiers: {}
|
|
2604
|
+
},
|
|
2605
|
+
emits: ["update:modelValue", "update:isStyleEditing"],
|
|
2606
|
+
setup(x) {
|
|
2607
|
+
const { t: d } = J(), t = ee(x, "modelValue"), i = T(
|
|
2608
|
+
() => Fe.find((p) => p.type === t.value.widget.type)
|
|
2609
|
+
), a = ee(x, "isStyleEditing"), g = T(() => {
|
|
2610
|
+
var p;
|
|
2611
|
+
return {
|
|
2612
|
+
chartHeight: void 0,
|
|
2613
|
+
chartWidth: void 0,
|
|
2614
|
+
showLabel: !1,
|
|
2615
|
+
labelAlign: ie.center,
|
|
2616
|
+
labelAnchor: be.center,
|
|
2617
|
+
labelRotation: 0,
|
|
2618
|
+
labelOffset: 0,
|
|
2619
|
+
labelFontSize: 12,
|
|
2620
|
+
showX: !0,
|
|
2621
|
+
xPosition: ml.bottom,
|
|
2622
|
+
showXGrid: !1,
|
|
2623
|
+
showXTick: !0,
|
|
2624
|
+
xTickFontSize: 12,
|
|
2625
|
+
showXTitle: !1,
|
|
2626
|
+
xTitle: "",
|
|
2627
|
+
xTitleFontSize: 12,
|
|
2628
|
+
showY: !0,
|
|
2629
|
+
yPosition: dl.left,
|
|
2630
|
+
showYGrid: !1,
|
|
2631
|
+
showYTick: !0,
|
|
2632
|
+
yTickFontSize: 12,
|
|
2633
|
+
showYTitle: !1,
|
|
2634
|
+
yTitle: "",
|
|
2635
|
+
yTitleFontSize: 12,
|
|
2636
|
+
showLegend: ((p = i.value) == null ? void 0 : p.type) === z.Circular,
|
|
2637
|
+
legendPosition: rl.top,
|
|
2638
|
+
usePointStyle: !0,
|
|
2639
|
+
legendMaxHeight: void 0,
|
|
2640
|
+
legendMaxWidth: void 0
|
|
2641
|
+
};
|
|
2642
|
+
});
|
|
2643
|
+
function y() {
|
|
2644
|
+
t.value && (t.value.widget.config = {
|
|
2645
|
+
...t.value.widget.config,
|
|
2646
|
+
...g.value
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
return (p, V) => {
|
|
2650
|
+
const h = k("FmCircularProgress"), o = k("FmButton"), s = k("FmSideSheet");
|
|
2651
|
+
return b(), D(s, {
|
|
2652
|
+
modelValue: a.value,
|
|
2653
|
+
"onUpdate:modelValue": V[2] || (V[2] = (C) => a.value = C),
|
|
2654
|
+
"close-button": !1,
|
|
2655
|
+
"no-overlay": "",
|
|
2656
|
+
"dismiss-away": !0,
|
|
2657
|
+
"max-width": 500
|
|
2658
|
+
}, {
|
|
2659
|
+
"side-sheet-button": N(() => [
|
|
2660
|
+
F("div", Bo, [
|
|
2661
|
+
u(o, {
|
|
2662
|
+
label: l(d)("report.section.style.button"),
|
|
2663
|
+
icon: "edit",
|
|
2664
|
+
variant: "secondary",
|
|
2665
|
+
size: "md"
|
|
2666
|
+
}, null, 8, ["label"])
|
|
2667
|
+
])
|
|
2668
|
+
]),
|
|
2669
|
+
"side-sheet-header": N(() => [
|
|
2670
|
+
F("div", jo, [
|
|
2671
|
+
u(o, {
|
|
2672
|
+
"prepend-icon": "arrow_back",
|
|
2673
|
+
variant: "tertiary",
|
|
2674
|
+
class: "fm-icon--rounded fm-icon--md text-fm-color-black",
|
|
2675
|
+
onClick: V[0] || (V[0] = (C) => a.value = !1)
|
|
2676
|
+
}),
|
|
2677
|
+
F("p", zo, j(l(d)("report.section.style.title")), 1),
|
|
2678
|
+
F("div", Ro, [
|
|
2679
|
+
u(o, {
|
|
2680
|
+
label: l(d)("report.section.style.reset"),
|
|
2681
|
+
variant: "tertiary",
|
|
2682
|
+
size: "md",
|
|
2683
|
+
onClick: y,
|
|
2684
|
+
"text-color": "text-fm-color-system-info-300"
|
|
2685
|
+
}, null, 8, ["label"])
|
|
2686
|
+
])
|
|
2687
|
+
])
|
|
2688
|
+
]),
|
|
2689
|
+
default: N(() => [
|
|
2690
|
+
t.value ? U("", !0) : (b(), D(h, { key: 0 })),
|
|
2691
|
+
u(Io, {
|
|
2692
|
+
modelValue: t.value.widget.config,
|
|
2693
|
+
"onUpdate:modelValue": V[1] || (V[1] = (C) => t.value.widget.config = C),
|
|
2694
|
+
config: i.value
|
|
2695
|
+
}, null, 8, ["modelValue", "config"])
|
|
2696
|
+
]),
|
|
2697
|
+
_: 1
|
|
2698
|
+
}, 8, ["modelValue"]);
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
}), Po = { class: "bg-fm-color-neutral-white flex flex-col h-full w-[510px]" }, Ao = { class: "flex bg-fm-color-neutral-white w-[88px]" }, Xo = { class: "w-full overflow-y-auto" }, Eo = {
|
|
2702
|
+
class: "grid grid-cols-12 w-full p-24",
|
|
2703
|
+
style: { backgroundColor: "#F6F8FC" }
|
|
2704
|
+
}, Wo = /* @__PURE__ */ q({
|
|
2705
|
+
__name: "TileEditorDesktop",
|
|
2706
|
+
props: /* @__PURE__ */ K({
|
|
2707
|
+
hideConfiguration: { type: Boolean, required: !0, default: !1 },
|
|
2708
|
+
index: { type: Number, required: !0, default: 0 }
|
|
2709
|
+
}, {
|
|
2710
|
+
modelValue: {
|
|
2711
|
+
required: !0
|
|
2712
|
+
},
|
|
2713
|
+
modelModifiers: {}
|
|
2714
|
+
}),
|
|
2715
|
+
emits: /* @__PURE__ */ K(["hideConfiguration"], ["update:modelValue"]),
|
|
2716
|
+
setup(x, { emit: d }) {
|
|
2717
|
+
const t = ee(x, "modelValue"), i = x, a = T(
|
|
2718
|
+
() => Fe.find((h) => {
|
|
2719
|
+
var o;
|
|
2720
|
+
return h.type === ((o = t.value) == null ? void 0 : o.widget.type);
|
|
2721
|
+
})
|
|
2722
|
+
), g = d, y = [
|
|
2723
|
+
z.BarChart,
|
|
2724
|
+
z.StackBarChart,
|
|
2725
|
+
z.LineChart,
|
|
2726
|
+
z.StackLineChart,
|
|
2727
|
+
z.Circular
|
|
2728
|
+
], p = T(() => y.includes(t.value.widget.type)), V = H(!1);
|
|
2729
|
+
return (h, o) => {
|
|
2730
|
+
const s = k("FmCircularProgress"), C = k("FmButton");
|
|
2731
|
+
return b(), R("div", null, [
|
|
2732
|
+
t.value ? (b(), R(oe, { key: 1 }, [
|
|
2733
|
+
u(ol, {
|
|
2734
|
+
"model-value": !x.hideConfiguration
|
|
2735
|
+
}, {
|
|
2736
|
+
right: N(() => [
|
|
2737
|
+
F("div", Po, [
|
|
2738
|
+
u(We, {
|
|
2739
|
+
modelValue: t.value,
|
|
2740
|
+
"onUpdate:modelValue": o[0] || (o[0] = (w) => t.value = w),
|
|
2741
|
+
config: a.value,
|
|
2742
|
+
"hide-configuration": x.hideConfiguration,
|
|
2743
|
+
onHideConfiguration: o[1] || (o[1] = (w) => {
|
|
2744
|
+
g("hideConfiguration", w);
|
|
2745
|
+
})
|
|
2746
|
+
}, null, 8, ["modelValue", "config", "hide-configuration"])
|
|
2747
|
+
])
|
|
2748
|
+
]),
|
|
2749
|
+
left: N(() => [
|
|
2750
|
+
F("div", Ao, [
|
|
2751
|
+
u(C, {
|
|
2752
|
+
variant: "secondary",
|
|
2753
|
+
icon: "keyboard_double_arrow_right",
|
|
2754
|
+
"border-color": l(Oe).ColorPrimary,
|
|
2755
|
+
"text-color": l(Oe).ColorPrimary,
|
|
2756
|
+
class: "m-24 my-16",
|
|
2757
|
+
size: "md",
|
|
2758
|
+
onClick: o[2] || (o[2] = (w) => g("hideConfiguration", !i.hideConfiguration))
|
|
2759
|
+
}, null, 8, ["border-color", "text-color"])
|
|
2760
|
+
])
|
|
2761
|
+
]),
|
|
2762
|
+
_: 1
|
|
2763
|
+
}, 8, ["model-value"]),
|
|
2764
|
+
F("div", Xo, [
|
|
2765
|
+
F("div", Eo, [
|
|
2766
|
+
t.value ? (b(), D(Xe, {
|
|
2767
|
+
key: 0,
|
|
2768
|
+
"model-value": t.value,
|
|
2769
|
+
index: i.index,
|
|
2770
|
+
"hide-export": !0,
|
|
2771
|
+
"is-style-editing": V.value
|
|
2772
|
+
}, null, 8, ["model-value", "index", "is-style-editing"])) : (b(), D(Ee, { key: 1 }))
|
|
2773
|
+
])
|
|
2774
|
+
]),
|
|
2775
|
+
p.value ? (b(), D(Mo, {
|
|
2776
|
+
key: 0,
|
|
2777
|
+
modelValue: t.value,
|
|
2778
|
+
"onUpdate:modelValue": o[3] || (o[3] = (w) => t.value = w),
|
|
2779
|
+
"is-style-editing": V.value,
|
|
2780
|
+
"onUpdate:isStyleEditing": o[4] || (o[4] = (w) => V.value = w),
|
|
2781
|
+
"hide-configuration": x.hideConfiguration,
|
|
2782
|
+
onHideConfiguration: o[5] || (o[5] = (w) => {
|
|
2783
|
+
g("hideConfiguration", w);
|
|
2784
|
+
})
|
|
2785
|
+
}, null, 8, ["modelValue", "is-style-editing", "hide-configuration"])) : U("", !0)
|
|
2786
|
+
], 64)) : (b(), D(s, { key: 0 }))
|
|
2787
|
+
]);
|
|
2788
|
+
};
|
|
2789
|
+
}
|
|
2790
|
+
}), qo = {
|
|
2791
|
+
key: 0,
|
|
2792
|
+
class: "flex w-full justify-center items-center"
|
|
2793
|
+
}, Ho = { class: "w-full grid grid-cols-12 pb-28 pt-5 px-5 h-full" }, Yo = /* @__PURE__ */ q({
|
|
2794
|
+
__name: "TileEditorMobile",
|
|
2795
|
+
props: /* @__PURE__ */ K({
|
|
2796
|
+
hideConfiguration: { type: Boolean, required: !0, default: !1 },
|
|
2797
|
+
index: { type: Number, required: !0, default: 0 }
|
|
2798
|
+
}, {
|
|
2799
|
+
modelValue: {
|
|
2800
|
+
required: !0
|
|
2801
|
+
},
|
|
2802
|
+
modelModifiers: {}
|
|
2803
|
+
}),
|
|
2804
|
+
emits: /* @__PURE__ */ K(["hideConfiguration"], ["update:modelValue"]),
|
|
2805
|
+
setup(x, { emit: d }) {
|
|
2806
|
+
const t = ee(x, "modelValue"), i = x, a = T(
|
|
2807
|
+
() => Fe.find((y) => {
|
|
2808
|
+
var p;
|
|
2809
|
+
return y.type === ((p = t.value) == null ? void 0 : p.widget.type);
|
|
2810
|
+
})
|
|
2811
|
+
), g = d;
|
|
2812
|
+
return (y, p) => {
|
|
2813
|
+
const V = k("FmCircularProgress");
|
|
2814
|
+
return b(), R("div", null, [
|
|
2815
|
+
t.value ? (b(), R(oe, { key: 1 }, [
|
|
2816
|
+
F("div", Ho, [
|
|
2817
|
+
t.value ? (b(), D(Xe, {
|
|
2818
|
+
key: 0,
|
|
2819
|
+
"model-value": t.value,
|
|
2820
|
+
index: i.index,
|
|
2821
|
+
"hide-export": !0
|
|
2822
|
+
}, null, 8, ["model-value", "index"])) : (b(), D(Ee, { key: 1 }))
|
|
2823
|
+
]),
|
|
2824
|
+
u(We, {
|
|
2825
|
+
modelValue: t.value,
|
|
2826
|
+
"onUpdate:modelValue": p[0] || (p[0] = (h) => t.value = h),
|
|
2827
|
+
config: a.value,
|
|
2828
|
+
"hide-configuration": x.hideConfiguration,
|
|
2829
|
+
onHideConfiguration: p[1] || (p[1] = (h) => {
|
|
2830
|
+
g("hideConfiguration", h);
|
|
2831
|
+
})
|
|
2832
|
+
}, null, 8, ["modelValue", "config", "hide-configuration"])
|
|
2833
|
+
], 64)) : (b(), R("div", qo, [
|
|
2834
|
+
u(V)
|
|
2835
|
+
]))
|
|
2836
|
+
]);
|
|
2837
|
+
};
|
|
2838
|
+
}
|
|
2839
|
+
}), Go = {
|
|
2840
|
+
key: 0,
|
|
2841
|
+
class: "fm-typo-en-title-md-600"
|
|
2842
|
+
}, Jo = {
|
|
2843
|
+
key: 0,
|
|
2844
|
+
class: "flex items-start justify-start px-24 py-12 flex-wrap w-full"
|
|
2845
|
+
}, mt = /* @__PURE__ */ q({
|
|
2846
|
+
__name: "TileEditor",
|
|
2847
|
+
setup(x) {
|
|
2848
|
+
const { rowHeight: d, colWidths: t } = de(ye()), i = Je(), a = Ke(), g = il(), { globalFilters: y } = de(Pe()), { currentSelectWidgetType: p, editingReport: V, editingTile: h, editingTileIndex: o } = de(g), { breakpoints: s } = Ae(), { promptMessage: C } = Me(), { t: w } = J(), O = H(!1);
|
|
2849
|
+
function f() {
|
|
2850
|
+
p.value = void 0, h.value = void 0, o.value = -1, a.back();
|
|
2851
|
+
}
|
|
2852
|
+
async function _() {
|
|
2853
|
+
var n;
|
|
2854
|
+
if (!V.value) return;
|
|
2855
|
+
await C({
|
|
2856
|
+
title: w("report.tile.save.title"),
|
|
2857
|
+
message: w("report.tile.save.confirm", { title: (n = h.value) == null ? void 0 : n.widget.title })
|
|
2858
|
+
}) && h.value && (h.value.widget.config = {
|
|
2859
|
+
...h.value.widget.config,
|
|
2860
|
+
rowHeight: d.value,
|
|
2861
|
+
colWidths: [...t.value]
|
|
2862
|
+
}, o.value === -1 ? V.value.tiles.push(h.value) : V.value.tiles[o.value] = h.value, f());
|
|
2863
|
+
}
|
|
2864
|
+
async function L() {
|
|
2865
|
+
var n;
|
|
2866
|
+
if (!V.value) return;
|
|
2867
|
+
await C({
|
|
2868
|
+
title: w("report.tile.cancel.title"),
|
|
2869
|
+
message: w("report.tile.cancel.confirm", { title: (n = h.value) == null ? void 0 : n.widget.title })
|
|
2870
|
+
}) && f();
|
|
2871
|
+
}
|
|
2872
|
+
return Se(() => {
|
|
2873
|
+
V.value || a.push({ name: "reports" });
|
|
2874
|
+
}), (S, n) => {
|
|
2875
|
+
const e = k("FmPageHead");
|
|
2876
|
+
return b(), D(tl, null, {
|
|
2877
|
+
default: N(() => [
|
|
2878
|
+
u(e, {
|
|
2879
|
+
actions: [
|
|
2880
|
+
{ label: l(w)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
2881
|
+
{ label: l(w)("report.common.save"), value: "save", isPrimary: !0 }
|
|
2882
|
+
],
|
|
2883
|
+
"onClick:action": n[0] || (n[0] = (m) => {
|
|
2884
|
+
m === "cancel" && L(), m === "save" && _();
|
|
2885
|
+
})
|
|
2886
|
+
}, {
|
|
2887
|
+
title: N(() => {
|
|
2888
|
+
var m;
|
|
2889
|
+
return [
|
|
2890
|
+
l(s).lg || l(s).md ? (b(), R("p", Go, j(l(sl)(((m = l(h)) == null ? void 0 : m.widget.type) ?? "New report")), 1)) : U("", !0)
|
|
2891
|
+
];
|
|
2892
|
+
}),
|
|
2893
|
+
_: 1
|
|
2894
|
+
}, 8, ["actions"]),
|
|
2895
|
+
l(h) && (l(y) || []).some((m) => {
|
|
2896
|
+
const r = m.tileIds, c = l(h) && l(h).id;
|
|
2897
|
+
return Array.isArray(r) && typeof c == "string" && r.includes(c);
|
|
2898
|
+
}) ? (b(), R("div", Jo, [
|
|
2899
|
+
u(cl)
|
|
2900
|
+
])) : U("", !0),
|
|
2901
|
+
l(h) ? (b(), D(je(l(s).lg || l(s).md ? Wo : Yo), {
|
|
2902
|
+
key: 1,
|
|
2903
|
+
modelValue: l(h),
|
|
2904
|
+
"onUpdate:modelValue": n[1] || (n[1] = (m) => Ge(h) ? h.value = m : null),
|
|
2905
|
+
class: ze(`${l(s).lg || l(s).md ? "flex" : ""} w-full`),
|
|
2906
|
+
style: Ye({ height: `calc( 100% - ${l(s).lg || l(s).md ? 72 : 64}px)` }),
|
|
2907
|
+
"hide-configuration": O.value,
|
|
2908
|
+
index: Number(l(i).params.tileIndex),
|
|
2909
|
+
onHideConfiguration: n[2] || (n[2] = (m) => O.value = m)
|
|
2910
|
+
}, null, 40, ["modelValue", "class", "style", "hide-configuration", "index"])) : U("", !0)
|
|
2911
|
+
]),
|
|
2912
|
+
_: 1
|
|
2913
|
+
});
|
|
2914
|
+
};
|
|
2915
|
+
}
|
|
2916
|
+
});
|
|
2917
|
+
export {
|
|
2918
|
+
mt as default
|
|
2919
|
+
};
|