@feedmepos/mf-report 5.21.65 → 5.22.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DjOXbuSR.js → App-CPsLJc1H.js} +40 -40
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BI3REw2h.js → BaseDialog.vue_vue_type_script_setup_true_lang-DCcoPWWG.js} +6816 -6536
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-DbXhUMAR.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-BRPx8vmv.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Cwd7YD1i.js → Default.vue_vue_type_script_setup_true_lang-BNYAE0n1.js} +2 -2
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-Cxo_dkbM.js +4275 -0
- package/dist/InsightView-BDOfDEqL.js +662 -0
- package/dist/{Integration-CVRLRPdq.js → Integration-CDrT_RSA.js} +3 -3
- package/dist/{Integrations-DOftS93E.js → Integrations-BIGSyUVS.js} +3 -3
- package/dist/{Layout-DntjaCaj.js → Layout-BidoThFl.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BB4h_9Df.js → MenuTab.vue_vue_type_script_setup_true_lang-ChNSUv6e.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DvytJlAR.js → NavigationTab.vue_vue_type_script_setup_true_lang-CTGCxTN2.js} +3599 -3599
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-Bm43uVUi.js → NoData.vue_vue_type_script_setup_true_lang-BMfKUFHt.js} +1 -1
- package/dist/{OverviewView-CuQCAiyO.js → OverviewView-DzCdiaap.js} +5 -5
- package/dist/{Report-CGj_ONkL.js → Report-CoaQhheo.js} +4 -4
- package/dist/{ReportEditor-C7u26DTW.js → ReportEditor-CdAsRgbY.js} +6 -6
- package/dist/{ReportView-uZvTp_a7.js → ReportView-xBr-K0is.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-FW4jnJX6.js → SelectComponent.vue_vue_type_script_setup_true_lang-DwhyK9V4.js} +1 -1
- package/dist/{Setting-DJh6P_el.js → Setting-Dvl7rBJD.js} +5 -5
- package/dist/TileEditor-DFBExGup.js +3547 -0
- package/dist/{TransitionFade-BMCSWEAj.js → TransitionFade-DEHp-ETN.js} +401 -393
- package/dist/{app-CrKcmNtX.js → app-DUppOHFW.js} +238 -98
- package/dist/app.js +1 -1
- package/dist/assets/formatChartData.worker-50q7LVBw.js +171 -0
- package/dist/assets/processTableData.worker-DrSBAOPU.js +171 -0
- package/dist/{InsightView-uUQohGVn.js → chart-DDDh8zNk.js} +1824 -2481
- package/dist/style.css +1 -1
- package/dist/{vue-i18n-DgYeUN5g.js → vue-i18n-CCeYOkNm.js} +2 -2
- package/package.json +1 -1
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-DGktnZo1.js +0 -2915
- package/dist/TileEditor-CfXGe6pu.js +0 -2922
- package/dist/assets/formatChartData.worker-BJvDVXA9.js +0 -170
- package/dist/assets/processTableData.worker-B3PWntX0.js +0 -170
|
@@ -0,0 +1,3547 @@
|
|
|
1
|
+
import { defineComponent as ae, mergeModels as re, useModel as me, computed as F, ref as ee, resolveComponent as T, createElementBlock as z, openBlock as v, createVNode as r, createElementVNode as C, unref as l, withCtx as R, toDisplayString as X, Fragment as se, renderList as be, withModifiers as ge, createTextVNode as Se, watch as ye, createCommentVNode as O, createBlock as M, onUnmounted as ul, renderSlot as Ze, onMounted as We, onBeforeUnmount as dl, resolveDynamicComponent as el, normalizeClass as Ee, withDirectives as we, vShow as Ve, normalizeStyle as Ae, isRef as ml } from "vue";
|
|
2
|
+
import { useRoute as cl, useRouter as pl } from "vue-router";
|
|
3
|
+
import { h as vl, d as Ie, S as Re, _ as fl, W as gl, b as bl, T as yl, a as hl } from "./TransitionFade-DEHp-ETN.js";
|
|
4
|
+
import { W as A, b as ll, d as _e, D as wl, S as qe, C as Vl, P as Ye, a as Cl } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DCcoPWWG.js";
|
|
5
|
+
import { storeToRefs as Ce } from "pinia";
|
|
6
|
+
import { u as tl } from "./message-dialog-UoMWOnil.js";
|
|
7
|
+
import { useSnackbar as xl, useBreakpoints as ol, FmButtonColorThemeVariant as Je } from "@feedmepos/ui-library";
|
|
8
|
+
import { a as de, _ as Fl } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DwhyK9V4.js";
|
|
9
|
+
import { u as ie, i as ke, b as al } from "./vue-i18n-CCeYOkNm.js";
|
|
10
|
+
import { r as ne } from "./i18n-CI_sQ5d_.js";
|
|
11
|
+
import { g as xe, u as Me, L as he, b as Le, S as te, d as ce, c as Ge, e as kl, Y as Sl, X as _l, _ as nl, a as Tl } from "./FilterSelector.vue_vue_type_script_setup_true_lang-Cxo_dkbM.js";
|
|
12
|
+
import { d as Ne } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BRPx8vmv.js";
|
|
13
|
+
import { d as Be } from "./app-DUppOHFW.js";
|
|
14
|
+
import { _ as il } from "./NoData.vue_vue_type_script_setup_true_lang-BMfKUFHt.js";
|
|
15
|
+
const je = [
|
|
16
|
+
{
|
|
17
|
+
type: A.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: A.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: A.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: A.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: A.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: A.ClusteredStackBarChart,
|
|
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: A.StackLineChart,
|
|
120
|
+
maxDimension: null,
|
|
121
|
+
maxMetric: 1,
|
|
122
|
+
hasBreakdownDimension: !0,
|
|
123
|
+
canTranspose: !0,
|
|
124
|
+
isDrillConfigurable: !1,
|
|
125
|
+
hasChart: !0,
|
|
126
|
+
hasTable: !1,
|
|
127
|
+
hasLabel: !0,
|
|
128
|
+
hasLegend: !0,
|
|
129
|
+
hasXy: !0,
|
|
130
|
+
canRollup: !1,
|
|
131
|
+
showRollupPosition: !1,
|
|
132
|
+
canSearch: !1,
|
|
133
|
+
periodType: null
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: A.Scorecard,
|
|
137
|
+
maxDimension: null,
|
|
138
|
+
maxMetric: 1,
|
|
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
|
+
{
|
|
153
|
+
type: A.Spacer,
|
|
154
|
+
maxDimension: 0,
|
|
155
|
+
maxMetric: 0,
|
|
156
|
+
hasBreakdownDimension: !1,
|
|
157
|
+
canTranspose: !1,
|
|
158
|
+
isDrillConfigurable: !1,
|
|
159
|
+
hasChart: !1,
|
|
160
|
+
hasTable: !1,
|
|
161
|
+
hasLabel: !1,
|
|
162
|
+
hasLegend: !1,
|
|
163
|
+
hasXy: !1,
|
|
164
|
+
canRollup: !1,
|
|
165
|
+
showRollupPosition: !1,
|
|
166
|
+
canSearch: !1,
|
|
167
|
+
periodType: null
|
|
168
|
+
}
|
|
169
|
+
], $l = { class: "flex flex-col my-2 gap-8" }, Dl = { class: "fm-typo-en-body-lg-600" }, Ul = { class: "text-sm text-fm-color-neutral-gray-400" }, Bl = ["onClick"], Ll = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, Ml = /* @__PURE__ */ ae({
|
|
170
|
+
__name: "SchemaSection",
|
|
171
|
+
props: /* @__PURE__ */ re({
|
|
172
|
+
options: {
|
|
173
|
+
type: Array,
|
|
174
|
+
default: () => []
|
|
175
|
+
},
|
|
176
|
+
label: {
|
|
177
|
+
type: String,
|
|
178
|
+
default: "Schema"
|
|
179
|
+
}
|
|
180
|
+
}, {
|
|
181
|
+
modelValue: { required: !0 },
|
|
182
|
+
modelModifiers: {}
|
|
183
|
+
}),
|
|
184
|
+
emits: ["update:modelValue"],
|
|
185
|
+
setup($) {
|
|
186
|
+
const { t: d, te: e } = ie(), s = me($, "modelValue"), a = $, { schemas: h } = Ce(ll()), V = F(
|
|
187
|
+
() => h.value.map((g) => ({
|
|
188
|
+
label: g.label,
|
|
189
|
+
value: g.name,
|
|
190
|
+
raw: g
|
|
191
|
+
}))
|
|
192
|
+
), f = F(() => {
|
|
193
|
+
if (s.value.schemaNames.length === 0 || t.value === 0)
|
|
194
|
+
return V.value.filter((g) => !g.raw.isJoinOnly);
|
|
195
|
+
{
|
|
196
|
+
const g = s.value.schemaNames[0], x = h.value.find((_) => _.name === g), N = ((x == null ? void 0 : x.joins) || []).map((_) => _);
|
|
197
|
+
return V.value.filter((_) => N.includes(_.raw.name));
|
|
198
|
+
}
|
|
199
|
+
}), w = ee(!1), S = ee(""), t = ee(), n = xl();
|
|
200
|
+
function y(g) {
|
|
201
|
+
var x;
|
|
202
|
+
return ne(
|
|
203
|
+
d,
|
|
204
|
+
e,
|
|
205
|
+
(x = h.value.find((N) => N.name === g)) == null ? void 0 : x.label,
|
|
206
|
+
"schema"
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
function k(g) {
|
|
210
|
+
t.value = g, w.value = !0, g !== void 0 ? S.value = s.value.schemaNames[g] : S.value = "";
|
|
211
|
+
}
|
|
212
|
+
function D() {
|
|
213
|
+
S.value !== "" ? (t.value !== void 0 ? s.value.schemaNames[t.value] = S.value : s.value.schemaNames.push(S.value), w.value = !1) : n.open({ message: d("report.section.schema.nothingSelected"), type: "error" });
|
|
214
|
+
}
|
|
215
|
+
return (g, x) => {
|
|
216
|
+
const N = T("FmForm"), _ = T("FmIcon"), p = T("FmField");
|
|
217
|
+
return v(), z("div", $l, [
|
|
218
|
+
r(_e, {
|
|
219
|
+
modelValue: w.value,
|
|
220
|
+
"onUpdate:modelValue": x[1] || (x[1] = (o) => w.value = o),
|
|
221
|
+
title: a.label,
|
|
222
|
+
"primary-button-label": l(d)("report.common.confirm"),
|
|
223
|
+
"secondary-button-label": l(d)("report.common.cancel"),
|
|
224
|
+
onConfirm: D
|
|
225
|
+
}, {
|
|
226
|
+
content: R(() => [
|
|
227
|
+
r(N, { ref: "form" }, {
|
|
228
|
+
default: R(() => [
|
|
229
|
+
r(de, {
|
|
230
|
+
modelValue: S.value,
|
|
231
|
+
"onUpdate:modelValue": x[0] || (x[0] = (o) => S.value = o),
|
|
232
|
+
label: l(d)("report.section.schema.title"),
|
|
233
|
+
items: t.value === 0 ? V.value.map((o) => ({
|
|
234
|
+
label: l(ne)(l(d), l(e), o.label, "schema"),
|
|
235
|
+
value: o.value
|
|
236
|
+
})) : f.value.map((o) => ({
|
|
237
|
+
label: l(ne)(l(d), l(e), o.label, "schema"),
|
|
238
|
+
value: o.value
|
|
239
|
+
}))
|
|
240
|
+
}, null, 8, ["modelValue", "label", "items"])
|
|
241
|
+
]),
|
|
242
|
+
_: 1
|
|
243
|
+
}, 512)
|
|
244
|
+
]),
|
|
245
|
+
_: 1
|
|
246
|
+
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
247
|
+
C("div", null, [
|
|
248
|
+
C("p", Dl, X(l(d)("report.section.schema.title")), 1),
|
|
249
|
+
C("p", Ul, X(l(d)("report.section.schema.description")), 1)
|
|
250
|
+
]),
|
|
251
|
+
(v(!0), z(se, null, be(s.value.schemaNames, (o, i) => (v(), z("div", {
|
|
252
|
+
key: i,
|
|
253
|
+
class: "flex flex-col gap-2 w-full"
|
|
254
|
+
}, [
|
|
255
|
+
C("div", {
|
|
256
|
+
class: "flex items-center gap-2 border rounded-md border-neutral-300 p-2 h-[40px]",
|
|
257
|
+
onClick: (c) => k(i)
|
|
258
|
+
}, [
|
|
259
|
+
C("p", Ll, X(y(o)), 1),
|
|
260
|
+
x[3] || (x[3] = C("div", { class: "grow" }, null, -1)),
|
|
261
|
+
r(_, {
|
|
262
|
+
name: "close",
|
|
263
|
+
onClick: ge(
|
|
264
|
+
() => {
|
|
265
|
+
s.value.schemaNames = l(vl)(s.value.schemaNames, i);
|
|
266
|
+
},
|
|
267
|
+
["stop"]
|
|
268
|
+
)
|
|
269
|
+
}, null, 8, ["onClick"])
|
|
270
|
+
], 8, Bl)
|
|
271
|
+
]))), 128)),
|
|
272
|
+
r(p, {
|
|
273
|
+
class: "text-fm-color-typo-tertiary",
|
|
274
|
+
onClick: x[2] || (x[2] = () => {
|
|
275
|
+
k();
|
|
276
|
+
})
|
|
277
|
+
}, {
|
|
278
|
+
default: R(() => [
|
|
279
|
+
Se(X(l(d)("report.section.schema.add")), 1)
|
|
280
|
+
]),
|
|
281
|
+
_: 1
|
|
282
|
+
})
|
|
283
|
+
]);
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}), Nl = {
|
|
287
|
+
key: 0,
|
|
288
|
+
class: "flex flex-col my-2 gap-8"
|
|
289
|
+
}, Ol = { class: "fm-typo-en-body-lg-600 text-ellipsis line-clamp-1" }, Il = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, jl = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, ze = /* @__PURE__ */ ae({
|
|
290
|
+
__name: "DimensionSection",
|
|
291
|
+
props: /* @__PURE__ */ re({
|
|
292
|
+
options: {
|
|
293
|
+
type: Array,
|
|
294
|
+
default: () => []
|
|
295
|
+
},
|
|
296
|
+
label: {
|
|
297
|
+
type: String,
|
|
298
|
+
default: "title"
|
|
299
|
+
},
|
|
300
|
+
max: {
|
|
301
|
+
type: Number,
|
|
302
|
+
default: void 0
|
|
303
|
+
},
|
|
304
|
+
config: {
|
|
305
|
+
type: Object,
|
|
306
|
+
default: () => {
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
hasRowColumn: {
|
|
310
|
+
type: Boolean,
|
|
311
|
+
default: !1
|
|
312
|
+
}
|
|
313
|
+
}, {
|
|
314
|
+
modelValue: {
|
|
315
|
+
required: !1,
|
|
316
|
+
default: []
|
|
317
|
+
},
|
|
318
|
+
modelModifiers: {}
|
|
319
|
+
}),
|
|
320
|
+
emits: ["update:modelValue"],
|
|
321
|
+
setup($) {
|
|
322
|
+
const { t: d, te: e } = ie(), s = me($, "modelValue"), a = $, h = F(() => d(`report.section.dimension.${a.label}`)), V = ee(!1), f = F(
|
|
323
|
+
() => s.value.map((c, u) => ({
|
|
324
|
+
index: u,
|
|
325
|
+
labels: [c.label || c.name],
|
|
326
|
+
value: c
|
|
327
|
+
}))
|
|
328
|
+
), w = ee(s.value.length > 0 ? 0 : void 0);
|
|
329
|
+
function S(c) {
|
|
330
|
+
var u, m, b, I;
|
|
331
|
+
V.value = !0, t.value = c != null && c.value ? JSON.parse(
|
|
332
|
+
JSON.stringify({
|
|
333
|
+
...c.value,
|
|
334
|
+
label: ne(d, e, (u = c.value) == null ? void 0 : u.label, "other"),
|
|
335
|
+
moveToColumn: (((m = a.config) == null ? void 0 : m.columnIds) || []).includes(xe(c.value))
|
|
336
|
+
})
|
|
337
|
+
) : void 0, w.value = c == null ? void 0 : c.index, n.value = !!((b = t.value) != null && b.dataFormula || (I = t.value) != null && I.displayFormula), t.value && t.value.formatter === void 0 && (a.options.find(
|
|
338
|
+
(K) => {
|
|
339
|
+
var W, P;
|
|
340
|
+
return K.schemaName === ((W = t.value) == null ? void 0 : W.schemaName) && K.name === ((P = t.value) == null ? void 0 : P.name);
|
|
341
|
+
}
|
|
342
|
+
), c != null && c.value.timeFormatter && t.value.formatter === void 0 && (t.value.formatter = c == null ? void 0 : c.value.timeFormatter, t.value.timeFormatter = void 0));
|
|
343
|
+
}
|
|
344
|
+
const t = ee(void 0), n = ee(!1), y = F(
|
|
345
|
+
() => a.options.find(
|
|
346
|
+
(c) => {
|
|
347
|
+
var u, m;
|
|
348
|
+
return c.schemaName === ((u = t.value) == null ? void 0 : u.schemaName) && c.name === ((m = t.value) == null ? void 0 : m.name);
|
|
349
|
+
}
|
|
350
|
+
) ?? {}
|
|
351
|
+
);
|
|
352
|
+
ye(
|
|
353
|
+
() => {
|
|
354
|
+
var c;
|
|
355
|
+
return (c = t.value) == null ? void 0 : c.option;
|
|
356
|
+
},
|
|
357
|
+
() => {
|
|
358
|
+
!k.value && t.value && (t.value.fillGap = !1);
|
|
359
|
+
}
|
|
360
|
+
);
|
|
361
|
+
const k = F(
|
|
362
|
+
() => {
|
|
363
|
+
var c, u, m;
|
|
364
|
+
return (m = (c = y.value) == null ? void 0 : c.fillGapDimensionOptions) == null ? void 0 : m.includes(((u = t.value) == null ? void 0 : u.option) || "");
|
|
365
|
+
}
|
|
366
|
+
);
|
|
367
|
+
function D(c) {
|
|
368
|
+
var u, m;
|
|
369
|
+
(c.schemaName !== ((u = t.value) == null ? void 0 : u.schemaName) || c.name !== ((m = t.value) == null ? void 0 : m.name)) && (t.value = {
|
|
370
|
+
schemaName: c.schemaName,
|
|
371
|
+
name: c.name,
|
|
372
|
+
option: c.dimensionOptions[0],
|
|
373
|
+
label: ne(d, e, c.label, "other"),
|
|
374
|
+
decimal: c.isNumericType ? 2 : void 0,
|
|
375
|
+
hide: !1
|
|
376
|
+
}, n.value = !1);
|
|
377
|
+
}
|
|
378
|
+
function g() {
|
|
379
|
+
if (!t.value) {
|
|
380
|
+
console.error("new field is undefined");
|
|
381
|
+
return;
|
|
382
|
+
}
|
|
383
|
+
const c = [...f.value.map((u) => u.value)];
|
|
384
|
+
n.value || (t.value.dataFormula = void 0), w.value !== void 0 ? c[w.value] = t.value : c.push(t.value), s.value = c, V.value = !1;
|
|
385
|
+
}
|
|
386
|
+
function x(c) {
|
|
387
|
+
const m = [...f.value.map((b) => b.value)].filter((b, I) => I !== c);
|
|
388
|
+
s.value = m;
|
|
389
|
+
}
|
|
390
|
+
function N(c) {
|
|
391
|
+
t.value && (t.value.decimal = Number(c));
|
|
392
|
+
}
|
|
393
|
+
function _(c) {
|
|
394
|
+
const u = `report.section.filter.${ke(c)}`;
|
|
395
|
+
return e(u) ? d(u) : ne(d, e, c, "field");
|
|
396
|
+
}
|
|
397
|
+
function p(c) {
|
|
398
|
+
const u = `report.section.metric.formatterType.${c}`;
|
|
399
|
+
return e(u) ? d(u) : c;
|
|
400
|
+
}
|
|
401
|
+
function o(c) {
|
|
402
|
+
return Array.isArray(c) ? c.length > 0 : c;
|
|
403
|
+
}
|
|
404
|
+
const i = F(
|
|
405
|
+
() => a.options.map((c) => ({
|
|
406
|
+
label: c.labels.join(" "),
|
|
407
|
+
value: c
|
|
408
|
+
}))
|
|
409
|
+
);
|
|
410
|
+
return (c, u) => {
|
|
411
|
+
const m = T("FmTextField"), b = T("FmStepperField"), I = T("FmCheckbox"), K = T("FmTextarea"), W = T("FmForm"), P = T("FmIcon"), Y = T("FmButton"), oe = T("FmListItem"), U = T("FmList"), G = T("FmField");
|
|
412
|
+
return $.max !== 0 ? (v(), z("div", Nl, [
|
|
413
|
+
r(_e, {
|
|
414
|
+
modelValue: V.value,
|
|
415
|
+
"onUpdate:modelValue": u[12] || (u[12] = (le) => V.value = le),
|
|
416
|
+
title: h.value,
|
|
417
|
+
"primary-button-label": l(d)("report.common.confirm"),
|
|
418
|
+
"secondary-button-label": l(d)("report.common.cancel"),
|
|
419
|
+
onConfirm: g
|
|
420
|
+
}, {
|
|
421
|
+
content: R(() => [
|
|
422
|
+
r(W, {
|
|
423
|
+
ref: "form",
|
|
424
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
425
|
+
}, {
|
|
426
|
+
default: R(() => {
|
|
427
|
+
var le, pe, E, ue, Te, $e, De;
|
|
428
|
+
return [
|
|
429
|
+
r(de, {
|
|
430
|
+
"model-value": y.value,
|
|
431
|
+
items: i.value,
|
|
432
|
+
placeholder: h.value,
|
|
433
|
+
label: h.value,
|
|
434
|
+
"onUpdate:modelValue": u[0] || (u[0] = (Q) => D(Q))
|
|
435
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
436
|
+
t.value ? (v(), z(se, { key: 0 }, [
|
|
437
|
+
r(m, {
|
|
438
|
+
modelValue: t.value.label,
|
|
439
|
+
"onUpdate:modelValue": u[1] || (u[1] = (Q) => t.value.label = Q),
|
|
440
|
+
label: l(d)("report.section.dimension.label")
|
|
441
|
+
}, null, 8, ["modelValue", "label"]),
|
|
442
|
+
(((le = y.value) == null ? void 0 : le.dimensionOptions) || []).length > 0 ? (v(), M(de, {
|
|
443
|
+
key: 0,
|
|
444
|
+
modelValue: t.value.option,
|
|
445
|
+
"onUpdate:modelValue": u[2] || (u[2] = (Q) => t.value.option = Q),
|
|
446
|
+
items: ((pe = y.value) == null ? void 0 : pe.dimensionOptions.map((Q) => ({
|
|
447
|
+
label: _(Q),
|
|
448
|
+
value: Q
|
|
449
|
+
}))) ?? []
|
|
450
|
+
}, null, 8, ["modelValue", "items"])) : O("", !0),
|
|
451
|
+
(E = y.value) != null && E.isNumericType ? (v(), M(b, {
|
|
452
|
+
key: 1,
|
|
453
|
+
label: l(d)("report.common.decimal"),
|
|
454
|
+
"model-value": ((ue = t.value) == null ? void 0 : ue.decimal) ?? 2,
|
|
455
|
+
"onUpdate:modelValue": u[3] || (u[3] = (Q) => {
|
|
456
|
+
N(Q);
|
|
457
|
+
})
|
|
458
|
+
}, null, 8, ["label", "model-value"])) : O("", !0),
|
|
459
|
+
(Te = y.value) != null && Te.isNumericType ? (v(), M(de, {
|
|
460
|
+
key: 2,
|
|
461
|
+
modelValue: t.value.formatter,
|
|
462
|
+
"onUpdate:modelValue": u[4] || (u[4] = (Q) => t.value.formatter = Q),
|
|
463
|
+
placeholder: l(d)("report.section.dimension.formatter"),
|
|
464
|
+
label: l(d)("report.section.dimension.formatter"),
|
|
465
|
+
items: [
|
|
466
|
+
{ label: l(d)("report.section.metric.formatterType.NONE"), value: null },
|
|
467
|
+
...((($e = y.value) == null ? void 0 : $e.formatters) || []).map((Q) => ({
|
|
468
|
+
label: p(Q),
|
|
469
|
+
value: Q
|
|
470
|
+
}))
|
|
471
|
+
]
|
|
472
|
+
}, null, 8, ["modelValue", "placeholder", "label", "items"])) : O("", !0),
|
|
473
|
+
k.value ? (v(), M(I, {
|
|
474
|
+
key: 3,
|
|
475
|
+
"model-value": t.value.fillGap ?? !1,
|
|
476
|
+
label: l(d)("report.section.dimension.fillGap"),
|
|
477
|
+
value: "",
|
|
478
|
+
placeholder: "Fill gap",
|
|
479
|
+
"onUpdate:modelValue": u[5] || (u[5] = (Q) => {
|
|
480
|
+
t.value && (t.value.fillGap = o(Q));
|
|
481
|
+
})
|
|
482
|
+
}, null, 8, ["model-value", "label"])) : O("", !0),
|
|
483
|
+
((De = y.value) == null ? void 0 : De.type) === l(wl).Timestamp ? (v(), M(I, {
|
|
484
|
+
key: 4,
|
|
485
|
+
"model-value": t.value.dateComparison ?? !1,
|
|
486
|
+
label: l(d)("report.section.dimension.dateComparison"),
|
|
487
|
+
value: "",
|
|
488
|
+
"onUpdate:modelValue": u[6] || (u[6] = (Q) => {
|
|
489
|
+
t.value && (t.value.dateComparison = o(Q));
|
|
490
|
+
})
|
|
491
|
+
}, null, 8, ["model-value", "label"])) : O("", !0),
|
|
492
|
+
r(I, {
|
|
493
|
+
modelValue: t.value.hide,
|
|
494
|
+
"onUpdate:modelValue": u[7] || (u[7] = (Q) => t.value.hide = Q),
|
|
495
|
+
label: l(d)("report.section.dimension.hide"),
|
|
496
|
+
value: ""
|
|
497
|
+
}, null, 8, ["modelValue", "label"]),
|
|
498
|
+
a.hasRowColumn ? (v(), M(I, {
|
|
499
|
+
key: 5,
|
|
500
|
+
"model-value": t.value.moveToColumn ?? !1,
|
|
501
|
+
label: l(d)("report.section.dimension.moveToColumn"),
|
|
502
|
+
value: "",
|
|
503
|
+
"onUpdate:modelValue": u[8] || (u[8] = (Q) => {
|
|
504
|
+
t.value && (t.value.moveToColumn = o(Q));
|
|
505
|
+
})
|
|
506
|
+
}, null, 8, ["model-value", "label"])) : O("", !0),
|
|
507
|
+
r(I, {
|
|
508
|
+
modelValue: n.value,
|
|
509
|
+
"onUpdate:modelValue": u[9] || (u[9] = (Q) => n.value = Q),
|
|
510
|
+
label: l(d)("report.section.dimension.advance"),
|
|
511
|
+
value: !0
|
|
512
|
+
}, null, 8, ["modelValue", "label"]),
|
|
513
|
+
n.value ? (v(), M(K, {
|
|
514
|
+
key: 6,
|
|
515
|
+
modelValue: t.value.dataFormula,
|
|
516
|
+
"onUpdate:modelValue": u[10] || (u[10] = (Q) => t.value.dataFormula = Q),
|
|
517
|
+
placeholder: l(d)("report.section.dimension.dataFormula")
|
|
518
|
+
}, null, 8, ["modelValue", "placeholder"])) : O("", !0),
|
|
519
|
+
n.value ? (v(), M(K, {
|
|
520
|
+
key: 7,
|
|
521
|
+
modelValue: t.value.displayFormula,
|
|
522
|
+
"onUpdate:modelValue": u[11] || (u[11] = (Q) => t.value.displayFormula = Q),
|
|
523
|
+
placeholder: l(d)("report.section.dimension.displayFormula")
|
|
524
|
+
}, null, 8, ["modelValue", "placeholder"])) : O("", !0)
|
|
525
|
+
], 64)) : O("", !0)
|
|
526
|
+
];
|
|
527
|
+
}),
|
|
528
|
+
_: 1
|
|
529
|
+
}, 512)
|
|
530
|
+
]),
|
|
531
|
+
_: 1
|
|
532
|
+
}, 8, ["modelValue", "title", "primary-button-label", "secondary-button-label"]),
|
|
533
|
+
C("div", null, [
|
|
534
|
+
C("p", Ol, X(h.value), 1),
|
|
535
|
+
C("p", Il, X(l(d)("report.section.dimension.description")), 1)
|
|
536
|
+
]),
|
|
537
|
+
r(U, null, {
|
|
538
|
+
default: R(() => [
|
|
539
|
+
r(l(Ie), {
|
|
540
|
+
list: s.value,
|
|
541
|
+
"item-key": (le) => l(xe)(le),
|
|
542
|
+
class: "flex flex-col gap-2"
|
|
543
|
+
}, {
|
|
544
|
+
item: R(({ element: le, index: pe }) => [
|
|
545
|
+
r(oe, {
|
|
546
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
547
|
+
onClick: ge((E) => S(f.value[pe]), ["stop"])
|
|
548
|
+
}, {
|
|
549
|
+
default: R(() => [
|
|
550
|
+
r(P, { name: "drag_handle" }),
|
|
551
|
+
C("p", jl, X(l(ne)(l(d), l(e), le.label, "other")), 1),
|
|
552
|
+
u[14] || (u[14] = C("div", { class: "grow" }, null, -1)),
|
|
553
|
+
r(Y, {
|
|
554
|
+
icon: "close",
|
|
555
|
+
size: "md",
|
|
556
|
+
variant: "tertiary",
|
|
557
|
+
onClick: ge((E) => x(pe), ["stop"])
|
|
558
|
+
}, null, 8, ["onClick"])
|
|
559
|
+
]),
|
|
560
|
+
_: 2
|
|
561
|
+
}, 1032, ["onClick"])
|
|
562
|
+
]),
|
|
563
|
+
_: 1
|
|
564
|
+
}, 8, ["list", "item-key"])
|
|
565
|
+
]),
|
|
566
|
+
_: 1
|
|
567
|
+
}),
|
|
568
|
+
r(G, {
|
|
569
|
+
class: "text-fm-color-typo-tertiary",
|
|
570
|
+
onClick: u[13] || (u[13] = () => {
|
|
571
|
+
S();
|
|
572
|
+
})
|
|
573
|
+
}, {
|
|
574
|
+
default: R(() => [
|
|
575
|
+
Se(X(l(d)("report.section.dimension.add")), 1)
|
|
576
|
+
]),
|
|
577
|
+
_: 1
|
|
578
|
+
})
|
|
579
|
+
])) : O("", !0);
|
|
580
|
+
};
|
|
581
|
+
}
|
|
582
|
+
}), Pe = {
|
|
583
|
+
value: "_metric_name"
|
|
584
|
+
};
|
|
585
|
+
function zl($, d, e) {
|
|
586
|
+
switch ($) {
|
|
587
|
+
case A.BarChart:
|
|
588
|
+
case A.StackBarChart:
|
|
589
|
+
case A.ClusteredStackBarChart:
|
|
590
|
+
case A.LineChart:
|
|
591
|
+
case A.StackLineChart:
|
|
592
|
+
case A.Circular:
|
|
593
|
+
return d.length > 1;
|
|
594
|
+
default:
|
|
595
|
+
return e;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
function Al($) {
|
|
599
|
+
var s;
|
|
600
|
+
const { rowIds: d, columnIds: e } = Oe($.widget.config);
|
|
601
|
+
return {
|
|
602
|
+
...$,
|
|
603
|
+
widget: {
|
|
604
|
+
...$.widget,
|
|
605
|
+
config: {
|
|
606
|
+
...$.widget.config,
|
|
607
|
+
rowIds: d,
|
|
608
|
+
columnIds: e,
|
|
609
|
+
isDrillable: zl(
|
|
610
|
+
$.widget.type,
|
|
611
|
+
$.widget.config.dimensions,
|
|
612
|
+
$.widget.config.isDrillable
|
|
613
|
+
),
|
|
614
|
+
joinDatasources: (s = $.widget.config.joinDatasources) == null ? void 0 : s.map((a) => {
|
|
615
|
+
const { rowIds: h, columnIds: V } = Oe(a);
|
|
616
|
+
return {
|
|
617
|
+
...a,
|
|
618
|
+
rowIds: h,
|
|
619
|
+
columnIds: V
|
|
620
|
+
};
|
|
621
|
+
})
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
};
|
|
625
|
+
}
|
|
626
|
+
function Oe($) {
|
|
627
|
+
const d = $.dimensions.filter((V) => V.hide !== !0 && !V.moveToColumn).map((V) => xe(V)), e = $.dimensions.filter((V) => V.hide !== !0 && V.moveToColumn == !0).map((V) => xe(V)), s = $.metrics.length > 0;
|
|
628
|
+
s && $.metrics.find((V) => V.moveToRow == !0) ? d.push(Pe.value) : s && e.push(Pe.value);
|
|
629
|
+
const a = [], h = [];
|
|
630
|
+
for (const V of d)
|
|
631
|
+
a.push(V);
|
|
632
|
+
for (const V of e)
|
|
633
|
+
h.push(V);
|
|
634
|
+
return {
|
|
635
|
+
rowIds: a,
|
|
636
|
+
columnIds: h
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
const Rl = { class: "flex flex-col my-2 gap-8" }, Pl = { class: "fm-typo-en-body-lg-600" }, Xl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Wl = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, El = /* @__PURE__ */ ae({
|
|
640
|
+
__name: "MetricSection",
|
|
641
|
+
props: /* @__PURE__ */ re({
|
|
642
|
+
options: {
|
|
643
|
+
type: Array,
|
|
644
|
+
default: () => []
|
|
645
|
+
},
|
|
646
|
+
label: {
|
|
647
|
+
type: String,
|
|
648
|
+
default: "title"
|
|
649
|
+
},
|
|
650
|
+
max: {
|
|
651
|
+
type: Number,
|
|
652
|
+
default: void 0
|
|
653
|
+
},
|
|
654
|
+
config: {
|
|
655
|
+
type: Object,
|
|
656
|
+
default: () => {
|
|
657
|
+
}
|
|
658
|
+
},
|
|
659
|
+
hasRowColumn: {
|
|
660
|
+
type: Boolean,
|
|
661
|
+
default: !1
|
|
662
|
+
},
|
|
663
|
+
hasXy: {
|
|
664
|
+
type: Boolean,
|
|
665
|
+
default: !1
|
|
666
|
+
}
|
|
667
|
+
}, {
|
|
668
|
+
modelValue: { required: !1, default: [] },
|
|
669
|
+
modelModifiers: {}
|
|
670
|
+
}),
|
|
671
|
+
emits: /* @__PURE__ */ re(["config"], ["update:modelValue"]),
|
|
672
|
+
setup($, { emit: d }) {
|
|
673
|
+
const { t: e, te: s } = ie(), a = me($, "modelValue"), h = $;
|
|
674
|
+
F(() => !!h.max && a.value.length === h.max);
|
|
675
|
+
const V = F(() => e(`report.section.metric.${h.label}`)), f = ee(!1), w = F(
|
|
676
|
+
() => a.value.map((o, i) => ({
|
|
677
|
+
index: i,
|
|
678
|
+
labels: [o.label || o.name],
|
|
679
|
+
value: o
|
|
680
|
+
}))
|
|
681
|
+
), S = ee(a.value.length > 0 ? 0 : void 0);
|
|
682
|
+
function t(o) {
|
|
683
|
+
var i, c, u;
|
|
684
|
+
f.value = !0, n.value = o != null && o.value ? JSON.parse(
|
|
685
|
+
JSON.stringify({
|
|
686
|
+
...o.value,
|
|
687
|
+
label: ne(e, s, o.value.label, "other")
|
|
688
|
+
})
|
|
689
|
+
) : void 0, S.value = o == null ? void 0 : o.index, y.value = !!((i = n.value) != null && i.dataFormula || (c = n.value) != null && c.displayFormula), n.value && n.value.formatter === void 0 && (h.options.find(
|
|
690
|
+
(m) => {
|
|
691
|
+
var b, I;
|
|
692
|
+
return m.schemaName === ((b = n.value) == null ? void 0 : b.schemaName) && m.name === ((I = n.value) == null ? void 0 : I.name);
|
|
693
|
+
}
|
|
694
|
+
), o != null && o.value.timeFormatter && n.value.formatter === void 0 && (n.value.formatter = o == null ? void 0 : o.value.timeFormatter, n.value.timeFormatter = void 0)), ((u = h.config.rowIds) == null ? void 0 : u.findIndex((m) => m === Pe.value)) !== -1 && n.value && (n.value.moveToRow = !0), n.value && (!h.hasXy || n.value.nullable === void 0) && (n.value.nullable = !1);
|
|
695
|
+
}
|
|
696
|
+
const n = ee(void 0), y = ee(!1), k = F(
|
|
697
|
+
() => h.options.find(
|
|
698
|
+
(o) => {
|
|
699
|
+
var i, c;
|
|
700
|
+
return o.schemaName === ((i = n.value) == null ? void 0 : i.schemaName) && o.name === ((c = n.value) == null ? void 0 : c.name);
|
|
701
|
+
}
|
|
702
|
+
) ?? {}
|
|
703
|
+
);
|
|
704
|
+
function D(o, i) {
|
|
705
|
+
var c;
|
|
706
|
+
return (o == null ? void 0 : o.isNumericType) || ((c = o == null ? void 0 : o.isNumericAggregations) == null ? void 0 : c.includes(i || ""));
|
|
707
|
+
}
|
|
708
|
+
const g = F(
|
|
709
|
+
() => {
|
|
710
|
+
var o;
|
|
711
|
+
return D(k.value, (o = n.value) == null ? void 0 : o.aggregation);
|
|
712
|
+
}
|
|
713
|
+
);
|
|
714
|
+
ye(g, (o) => {
|
|
715
|
+
n.value && (o ? n.value.decimal = typeof n.value.decimal != "number" ? 2 : n.value.decimal : n.value.decimal = void 0);
|
|
716
|
+
});
|
|
717
|
+
function x(o) {
|
|
718
|
+
var i, c;
|
|
719
|
+
(o.schemaName !== ((i = n.value) == null ? void 0 : i.schemaName) || o.name !== ((c = n.value) == null ? void 0 : c.name)) && (n.value = {
|
|
720
|
+
schemaName: o.schemaName,
|
|
721
|
+
name: o.name,
|
|
722
|
+
aggregation: o.aggregations[0],
|
|
723
|
+
label: ne(e, s, o.label, "other"),
|
|
724
|
+
nullable: !1,
|
|
725
|
+
decimal: D(o, o.aggregations[0]) ? 2 : void 0,
|
|
726
|
+
moveToRow: !1,
|
|
727
|
+
hide: !1
|
|
728
|
+
}, y.value = !1);
|
|
729
|
+
}
|
|
730
|
+
function N() {
|
|
731
|
+
const o = [...w.value.map((i) => i.value)];
|
|
732
|
+
n.value && (y.value || (n.value.dataFormula = void 0), h.hasXy || (n.value.nullable = !1), S.value !== void 0 ? o[S.value] = n.value : o.push(n.value)), a.value = o, f.value = !1;
|
|
733
|
+
}
|
|
734
|
+
function _(o) {
|
|
735
|
+
const i = [...w.value.map((c) => c.value)];
|
|
736
|
+
i.splice(o, 1), a.value = i;
|
|
737
|
+
}
|
|
738
|
+
const p = F(
|
|
739
|
+
() => h.options.map((o) => ({
|
|
740
|
+
label: o.labels.join(" "),
|
|
741
|
+
value: o
|
|
742
|
+
}))
|
|
743
|
+
);
|
|
744
|
+
return (o, i) => {
|
|
745
|
+
const c = T("FmTextField"), u = T("FmStepperField"), m = T("FmCheckbox"), b = T("FmTextarea"), I = T("FmForm"), K = T("FmIcon"), W = T("FmButton"), P = T("FmListItem"), Y = T("FmList"), oe = T("FmField");
|
|
746
|
+
return v(), z("div", Rl, [
|
|
747
|
+
r(_e, {
|
|
748
|
+
modelValue: f.value,
|
|
749
|
+
"onUpdate:modelValue": i[11] || (i[11] = (U) => f.value = U),
|
|
750
|
+
title: V.value,
|
|
751
|
+
onConfirm: N
|
|
752
|
+
}, {
|
|
753
|
+
content: R(() => [
|
|
754
|
+
r(I, {
|
|
755
|
+
ref: "form",
|
|
756
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
757
|
+
}, {
|
|
758
|
+
default: R(() => {
|
|
759
|
+
var U, G, le, pe;
|
|
760
|
+
return [
|
|
761
|
+
r(de, {
|
|
762
|
+
"model-value": k.value,
|
|
763
|
+
items: p.value,
|
|
764
|
+
placeholder: V.value,
|
|
765
|
+
label: V.value,
|
|
766
|
+
"onUpdate:modelValue": i[0] || (i[0] = (E) => x(E))
|
|
767
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
768
|
+
n.value ? (v(), z(se, { key: 0 }, [
|
|
769
|
+
r(c, {
|
|
770
|
+
modelValue: n.value.label,
|
|
771
|
+
"onUpdate:modelValue": i[1] || (i[1] = (E) => n.value.label = E),
|
|
772
|
+
label: l(e)("report.section.metric.label")
|
|
773
|
+
}, null, 8, ["modelValue", "label"]),
|
|
774
|
+
(((U = k.value) == null ? void 0 : U.aggregations) || []).length > 0 ? (v(), M(de, {
|
|
775
|
+
key: 0,
|
|
776
|
+
modelValue: n.value.aggregation,
|
|
777
|
+
"onUpdate:modelValue": i[2] || (i[2] = (E) => n.value.aggregation = E),
|
|
778
|
+
label: l(e)("report.section.metric.aggregation"),
|
|
779
|
+
items: ((G = k.value) == null ? void 0 : G.aggregations.map((E) => ({
|
|
780
|
+
label: l(s)(`report.section.metric.aggregationType.${E}`) ? l(e)(`report.section.metric.aggregationType.${E}`) : l(ne)(l(e), l(s), E, "field"),
|
|
781
|
+
value: E
|
|
782
|
+
}))) ?? []
|
|
783
|
+
}, null, 8, ["modelValue", "label", "items"])) : O("", !0),
|
|
784
|
+
g.value ? (v(), M(u, {
|
|
785
|
+
key: 1,
|
|
786
|
+
label: l(e)("report.common.decimal"),
|
|
787
|
+
"model-value": ((le = n.value) == null ? void 0 : le.decimal) ?? 2,
|
|
788
|
+
"onUpdate:modelValue": i[3] || (i[3] = (E) => {
|
|
789
|
+
n.value && (n.value.decimal = E);
|
|
790
|
+
})
|
|
791
|
+
}, null, 8, ["label", "model-value"])) : O("", !0),
|
|
792
|
+
g.value ? (v(), M(de, {
|
|
793
|
+
key: 2,
|
|
794
|
+
modelValue: n.value.formatter,
|
|
795
|
+
"onUpdate:modelValue": i[4] || (i[4] = (E) => n.value.formatter = E),
|
|
796
|
+
placeholder: l(e)("report.section.metric.formatter"),
|
|
797
|
+
label: l(e)("report.section.metric.formatter"),
|
|
798
|
+
items: [
|
|
799
|
+
{ label: l(e)("report.section.metric.formatterType.NONE"), value: null },
|
|
800
|
+
...(((pe = k.value) == null ? void 0 : pe.formatters) || []).map((E) => ({
|
|
801
|
+
label: l(s)(`report.section.metric.formatterType.${E}`) ? l(e)(`report.section.metric.formatterType.${E}`) : l(ne)(l(e), l(s), E, "field"),
|
|
802
|
+
value: E
|
|
803
|
+
}))
|
|
804
|
+
]
|
|
805
|
+
}, null, 8, ["modelValue", "placeholder", "label", "items"])) : O("", !0),
|
|
806
|
+
r(m, {
|
|
807
|
+
modelValue: n.value.hide,
|
|
808
|
+
"onUpdate:modelValue": i[5] || (i[5] = (E) => n.value.hide = E),
|
|
809
|
+
label: l(e)("report.section.metric.hide"),
|
|
810
|
+
value: ""
|
|
811
|
+
}, null, 8, ["modelValue", "label"]),
|
|
812
|
+
h.hasXy ? (v(), M(m, {
|
|
813
|
+
key: 3,
|
|
814
|
+
"model-value": n.value.nullable ?? !1,
|
|
815
|
+
label: l(e)("report.section.metric.nullable"),
|
|
816
|
+
value: !0,
|
|
817
|
+
"onUpdate:modelValue": i[6] || (i[6] = (E) => {
|
|
818
|
+
n.value && (n.value.nullable = E);
|
|
819
|
+
})
|
|
820
|
+
}, null, 8, ["model-value", "label"])) : O("", !0),
|
|
821
|
+
h.hasRowColumn ? (v(), M(m, {
|
|
822
|
+
key: 4,
|
|
823
|
+
modelValue: n.value.moveToRow,
|
|
824
|
+
"onUpdate:modelValue": i[7] || (i[7] = (E) => n.value.moveToRow = E),
|
|
825
|
+
label: l(e)("report.section.metric.moveToRow"),
|
|
826
|
+
value: ""
|
|
827
|
+
}, null, 8, ["modelValue", "label"])) : O("", !0),
|
|
828
|
+
r(m, {
|
|
829
|
+
modelValue: y.value,
|
|
830
|
+
"onUpdate:modelValue": i[8] || (i[8] = (E) => y.value = E),
|
|
831
|
+
label: l(e)("report.section.metric.advance"),
|
|
832
|
+
value: !0
|
|
833
|
+
}, null, 8, ["modelValue", "label"]),
|
|
834
|
+
y.value ? (v(), M(b, {
|
|
835
|
+
key: 5,
|
|
836
|
+
modelValue: n.value.dataFormula,
|
|
837
|
+
"onUpdate:modelValue": i[9] || (i[9] = (E) => n.value.dataFormula = E),
|
|
838
|
+
placeholder: l(e)("report.section.metric.dataFormula")
|
|
839
|
+
}, null, 8, ["modelValue", "placeholder"])) : O("", !0),
|
|
840
|
+
y.value ? (v(), M(b, {
|
|
841
|
+
key: 6,
|
|
842
|
+
modelValue: n.value.displayFormula,
|
|
843
|
+
"onUpdate:modelValue": i[10] || (i[10] = (E) => n.value.displayFormula = E),
|
|
844
|
+
placeholder: l(e)("report.section.metric.displayFormula")
|
|
845
|
+
}, null, 8, ["modelValue", "placeholder"])) : O("", !0)
|
|
846
|
+
], 64)) : O("", !0)
|
|
847
|
+
];
|
|
848
|
+
}),
|
|
849
|
+
_: 1
|
|
850
|
+
}, 512)
|
|
851
|
+
]),
|
|
852
|
+
_: 1
|
|
853
|
+
}, 8, ["modelValue", "title"]),
|
|
854
|
+
C("div", null, [
|
|
855
|
+
C("p", Pl, X(V.value), 1),
|
|
856
|
+
C("p", Xl, X(l(e)("report.section.metric.description")), 1)
|
|
857
|
+
]),
|
|
858
|
+
r(Y, null, {
|
|
859
|
+
default: R(() => [
|
|
860
|
+
r(l(Ie), {
|
|
861
|
+
list: a.value,
|
|
862
|
+
"item-key": "id",
|
|
863
|
+
class: "flex flex-col gap-2 w-full"
|
|
864
|
+
}, {
|
|
865
|
+
item: R(({ element: U, index: G }) => [
|
|
866
|
+
r(P, {
|
|
867
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
868
|
+
onClick: ge((le) => t(w.value[G]), ["stop"])
|
|
869
|
+
}, {
|
|
870
|
+
default: R(() => [
|
|
871
|
+
r(K, { name: "drag_handle" }),
|
|
872
|
+
C("p", Wl, X(l(ne)(l(e), l(s), U.label, "other")), 1),
|
|
873
|
+
i[13] || (i[13] = C("div", { class: "grow" }, null, -1)),
|
|
874
|
+
r(W, {
|
|
875
|
+
icon: "close",
|
|
876
|
+
size: "md",
|
|
877
|
+
variant: "tertiary",
|
|
878
|
+
onClick: ge((le) => _(G), ["stop"])
|
|
879
|
+
}, null, 8, ["onClick"])
|
|
880
|
+
]),
|
|
881
|
+
_: 2
|
|
882
|
+
}, 1032, ["onClick"])
|
|
883
|
+
]),
|
|
884
|
+
_: 1
|
|
885
|
+
}, 8, ["list"])
|
|
886
|
+
]),
|
|
887
|
+
_: 1
|
|
888
|
+
}),
|
|
889
|
+
r(oe, {
|
|
890
|
+
class: "text-fm-color-typo-tertiary",
|
|
891
|
+
onClick: i[12] || (i[12] = () => {
|
|
892
|
+
t();
|
|
893
|
+
})
|
|
894
|
+
}, {
|
|
895
|
+
default: R(() => [
|
|
896
|
+
Se(X(l(e)("report.section.metric.add")), 1)
|
|
897
|
+
]),
|
|
898
|
+
_: 1
|
|
899
|
+
})
|
|
900
|
+
]);
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
}), Hl = { class: "flex flex-col my-2 gap-8" }, ql = { class: "fm-typo-en-body-lg-600" }, Yl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Jl = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, Gl = /* @__PURE__ */ ae({
|
|
904
|
+
__name: "SortSection",
|
|
905
|
+
props: /* @__PURE__ */ re({
|
|
906
|
+
options: {
|
|
907
|
+
type: Array,
|
|
908
|
+
default: () => []
|
|
909
|
+
},
|
|
910
|
+
label: {
|
|
911
|
+
type: String,
|
|
912
|
+
default: "title"
|
|
913
|
+
}
|
|
914
|
+
}, {
|
|
915
|
+
modelValue: { required: !1, default: [] },
|
|
916
|
+
modelModifiers: {}
|
|
917
|
+
}),
|
|
918
|
+
emits: ["update:modelValue"],
|
|
919
|
+
setup($) {
|
|
920
|
+
const { t: d, te: e } = ie(), s = me($, "modelValue"), a = $, h = F(() => d(`report.section.sort.${a.label}`)), V = ee(!1), f = F(
|
|
921
|
+
() => s.value.map((_, p) => {
|
|
922
|
+
const o = a.options.find(
|
|
923
|
+
(c) => c.schemaName === _.schemaName && c.name === _.name
|
|
924
|
+
), i = (o == null ? void 0 : o.labels) || [_.schemaName, _.name];
|
|
925
|
+
return {
|
|
926
|
+
index: p,
|
|
927
|
+
label: i.map((c) => ne(d, e, c, "other")).join(" "),
|
|
928
|
+
value: _
|
|
929
|
+
};
|
|
930
|
+
})
|
|
931
|
+
), w = ee(s.value.length > 0 ? 0 : void 0);
|
|
932
|
+
function S(_) {
|
|
933
|
+
var p;
|
|
934
|
+
V.value = !0, t.value = _ != null && _.value ? JSON.parse(JSON.stringify(_.value)) : void 0, w.value = _ == null ? void 0 : _.index, n.value = !!((p = t.value) != null && p.dataFormula);
|
|
935
|
+
}
|
|
936
|
+
const t = ee(void 0), n = ee(!1), y = F(
|
|
937
|
+
() => a.options.find(
|
|
938
|
+
(_) => {
|
|
939
|
+
var p, o;
|
|
940
|
+
return _.schemaName === ((p = t.value) == null ? void 0 : p.schemaName) && _.name === ((o = t.value) == null ? void 0 : o.name);
|
|
941
|
+
}
|
|
942
|
+
) ?? {}
|
|
943
|
+
);
|
|
944
|
+
function k(_) {
|
|
945
|
+
var p, o;
|
|
946
|
+
(_.schemaName !== ((p = t.value) == null ? void 0 : p.schemaName) || _.name !== ((o = t.value) == null ? void 0 : o.name)) && (t.value = {
|
|
947
|
+
schemaName: _.schemaName,
|
|
948
|
+
name: _.name,
|
|
949
|
+
dimensionOption: _.dimensionOptions[0],
|
|
950
|
+
aggregation: null,
|
|
951
|
+
type: qe.Asc
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
function D() {
|
|
955
|
+
if (!t.value) {
|
|
956
|
+
console.log("new sort is undefined");
|
|
957
|
+
return;
|
|
958
|
+
}
|
|
959
|
+
const _ = [...f.value.map((p) => p.value)];
|
|
960
|
+
n.value || (t.value.dataFormula = void 0), w.value !== void 0 ? _[w.value] = t.value : _.push(t.value), s.value = _, V.value = !1;
|
|
961
|
+
}
|
|
962
|
+
function g(_) {
|
|
963
|
+
const p = [...f.value.map((o) => o.value)];
|
|
964
|
+
p.splice(_, 1), s.value = p, V.value = !1;
|
|
965
|
+
}
|
|
966
|
+
function x(_) {
|
|
967
|
+
const p = `report.section.filter.${ke(_)}`;
|
|
968
|
+
return e(p) ? d(p) : ne(d, e, _, "field");
|
|
969
|
+
}
|
|
970
|
+
const N = F(
|
|
971
|
+
() => a.options.map((_) => ({
|
|
972
|
+
label: _.labels.join(" "),
|
|
973
|
+
value: _
|
|
974
|
+
}))
|
|
975
|
+
);
|
|
976
|
+
return (_, p) => {
|
|
977
|
+
const o = T("FmCheckbox"), i = T("FmTextarea"), c = T("FmForm"), u = T("FmIcon"), m = T("FmButton"), b = T("FmListItem"), I = T("FmList"), K = T("FmField");
|
|
978
|
+
return v(), z("div", Hl, [
|
|
979
|
+
r(_e, {
|
|
980
|
+
modelValue: V.value,
|
|
981
|
+
"onUpdate:modelValue": p[6] || (p[6] = (W) => V.value = W),
|
|
982
|
+
title: h.value,
|
|
983
|
+
onConfirm: D
|
|
984
|
+
}, {
|
|
985
|
+
content: R(() => [
|
|
986
|
+
r(c, {
|
|
987
|
+
ref: "form",
|
|
988
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
989
|
+
}, {
|
|
990
|
+
default: R(() => {
|
|
991
|
+
var W, P, Y, oe;
|
|
992
|
+
return [
|
|
993
|
+
r(de, {
|
|
994
|
+
"model-value": y.value,
|
|
995
|
+
items: N.value,
|
|
996
|
+
placeholder: h.value,
|
|
997
|
+
label: h.value,
|
|
998
|
+
"onUpdate:modelValue": p[0] || (p[0] = (U) => k(U))
|
|
999
|
+
}, null, 8, ["model-value", "items", "placeholder", "label"]),
|
|
1000
|
+
t.value ? (v(), z(se, { key: 0 }, [
|
|
1001
|
+
(((W = y.value) == null ? void 0 : W.dimensionOptions) || []).length > 0 ? (v(), M(de, {
|
|
1002
|
+
key: 0,
|
|
1003
|
+
modelValue: t.value.dimensionOption,
|
|
1004
|
+
"onUpdate:modelValue": p[1] || (p[1] = (U) => t.value.dimensionOption = U),
|
|
1005
|
+
items: ((P = y.value) == null ? void 0 : P.dimensionOptions.map((U) => ({
|
|
1006
|
+
label: x(U),
|
|
1007
|
+
value: U
|
|
1008
|
+
}))) ?? [],
|
|
1009
|
+
placeholder: l(d)("report.section.sort.format"),
|
|
1010
|
+
label: l(d)("report.section.sort.format")
|
|
1011
|
+
}, null, 8, ["modelValue", "items", "placeholder", "label"])) : O("", !0),
|
|
1012
|
+
(((Y = y.value) == null ? void 0 : Y.aggregations) || []).length > 0 ? (v(), M(de, {
|
|
1013
|
+
key: 1,
|
|
1014
|
+
modelValue: t.value.aggregation,
|
|
1015
|
+
"onUpdate:modelValue": p[2] || (p[2] = (U) => t.value.aggregation = U),
|
|
1016
|
+
items: ((oe = y.value) == null ? void 0 : oe.aggregations.map((U) => ({
|
|
1017
|
+
label: l(e)(`report.section.metric.aggregationType.${U}`) ? l(d)(`report.section.metric.aggregationType.${U}`) : U,
|
|
1018
|
+
value: U
|
|
1019
|
+
}))) ?? [],
|
|
1020
|
+
label: l(d)("report.section.sort.aggregation"),
|
|
1021
|
+
placeholder: l(d)("report.section.sort.aggregation")
|
|
1022
|
+
}, null, 8, ["modelValue", "items", "label", "placeholder"])) : O("", !0),
|
|
1023
|
+
r(de, {
|
|
1024
|
+
modelValue: t.value.type,
|
|
1025
|
+
"onUpdate:modelValue": p[3] || (p[3] = (U) => t.value.type = U),
|
|
1026
|
+
items: Object.values(l(qe)).map((U) => ({
|
|
1027
|
+
label: l(e)(`report.section.sort.sortType.${U}`) ? l(d)(`report.section.sort.sortType.${U}`) : U,
|
|
1028
|
+
value: U
|
|
1029
|
+
})),
|
|
1030
|
+
placeholder: l(d)("report.section.sort.order"),
|
|
1031
|
+
label: l(d)("report.section.sort.order")
|
|
1032
|
+
}, null, 8, ["modelValue", "items", "placeholder", "label"]),
|
|
1033
|
+
r(o, {
|
|
1034
|
+
modelValue: n.value,
|
|
1035
|
+
"onUpdate:modelValue": p[4] || (p[4] = (U) => n.value = U),
|
|
1036
|
+
label: l(d)("report.section.sort.advance"),
|
|
1037
|
+
value: !0
|
|
1038
|
+
}, null, 8, ["modelValue", "label"]),
|
|
1039
|
+
n.value ? (v(), M(i, {
|
|
1040
|
+
key: 2,
|
|
1041
|
+
modelValue: t.value.dataFormula,
|
|
1042
|
+
"onUpdate:modelValue": p[5] || (p[5] = (U) => t.value.dataFormula = U),
|
|
1043
|
+
placeholder: l(d)("report.section.sort.dataFormula")
|
|
1044
|
+
}, null, 8, ["modelValue", "placeholder"])) : O("", !0)
|
|
1045
|
+
], 64)) : O("", !0)
|
|
1046
|
+
];
|
|
1047
|
+
}),
|
|
1048
|
+
_: 1
|
|
1049
|
+
}, 512)
|
|
1050
|
+
]),
|
|
1051
|
+
_: 1
|
|
1052
|
+
}, 8, ["modelValue", "title"]),
|
|
1053
|
+
C("div", null, [
|
|
1054
|
+
C("p", ql, X(h.value), 1),
|
|
1055
|
+
C("p", Yl, X(l(d)("report.section.sort.description")), 1)
|
|
1056
|
+
]),
|
|
1057
|
+
r(I, null, {
|
|
1058
|
+
default: R(() => [
|
|
1059
|
+
r(l(Ie), {
|
|
1060
|
+
list: s.value,
|
|
1061
|
+
"item-key": "id",
|
|
1062
|
+
class: "flex flex-col gap-2 w-full"
|
|
1063
|
+
}, {
|
|
1064
|
+
item: R(({ element: W, index: P }) => [
|
|
1065
|
+
r(b, {
|
|
1066
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
1067
|
+
onClick: ge((Y) => S(f.value[P]), ["stop"])
|
|
1068
|
+
}, {
|
|
1069
|
+
default: R(() => [
|
|
1070
|
+
r(u, { name: "drag_handle" }),
|
|
1071
|
+
C("p", Jl, X(f.value[P].label), 1),
|
|
1072
|
+
p[8] || (p[8] = C("div", { class: "grow" }, null, -1)),
|
|
1073
|
+
r(m, {
|
|
1074
|
+
icon: "close",
|
|
1075
|
+
size: "md",
|
|
1076
|
+
variant: "tertiary",
|
|
1077
|
+
onClick: ge((Y) => g(P), ["stop"])
|
|
1078
|
+
}, null, 8, ["onClick"])
|
|
1079
|
+
]),
|
|
1080
|
+
_: 2
|
|
1081
|
+
}, 1032, ["onClick"])
|
|
1082
|
+
]),
|
|
1083
|
+
_: 1
|
|
1084
|
+
}, 8, ["list"])
|
|
1085
|
+
]),
|
|
1086
|
+
_: 1
|
|
1087
|
+
}),
|
|
1088
|
+
r(K, {
|
|
1089
|
+
class: "text-fm-color-typo-tertiary",
|
|
1090
|
+
onClick: p[7] || (p[7] = () => {
|
|
1091
|
+
S();
|
|
1092
|
+
})
|
|
1093
|
+
}, {
|
|
1094
|
+
default: R(() => [
|
|
1095
|
+
Se(X(l(d)("report.section.sort.add")), 1)
|
|
1096
|
+
]),
|
|
1097
|
+
_: 1
|
|
1098
|
+
})
|
|
1099
|
+
]);
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
}), Kl = { class: "fm-typo-en-body-lg-600" }, Ql = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Zl = /* @__PURE__ */ ae({
|
|
1103
|
+
__name: "LimitSection",
|
|
1104
|
+
props: {
|
|
1105
|
+
modelValue: { required: !0, default: null },
|
|
1106
|
+
modelModifiers: {}
|
|
1107
|
+
},
|
|
1108
|
+
emits: ["update:modelValue"],
|
|
1109
|
+
setup($) {
|
|
1110
|
+
const { t: d } = ie(), e = me($, "modelValue"), s = Ne((a) => {
|
|
1111
|
+
a !== "" ? e.value = a : e.value = null;
|
|
1112
|
+
}, 1e3);
|
|
1113
|
+
return (a, h) => {
|
|
1114
|
+
const V = T("FmTextField");
|
|
1115
|
+
return v(), z(se, null, [
|
|
1116
|
+
C("div", null, [
|
|
1117
|
+
C("p", Kl, X(l(d)("report.section.limit.title")), 1),
|
|
1118
|
+
C("p", Ql, X(l(d)("report.section.limit.description")), 1)
|
|
1119
|
+
]),
|
|
1120
|
+
r(V, {
|
|
1121
|
+
"model-value": e.value,
|
|
1122
|
+
inputmode: "numeric",
|
|
1123
|
+
placeholder: l(d)("report.section.limit.placeholder"),
|
|
1124
|
+
"onUpdate:modelValue": h[0] || (h[0] = (f) => l(s)(f))
|
|
1125
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
1126
|
+
], 64);
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
}), et = { class: "flex flex-col my-2 gap-8" }, lt = { class: "fm-typo-en-body-lg-600" }, tt = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, ot = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, at = /* @__PURE__ */ ae({
|
|
1130
|
+
__name: "ConditionSection",
|
|
1131
|
+
props: /* @__PURE__ */ re({
|
|
1132
|
+
joinFieldOptions: {
|
|
1133
|
+
type: Array,
|
|
1134
|
+
default: () => []
|
|
1135
|
+
},
|
|
1136
|
+
mainFieldOptions: {
|
|
1137
|
+
type: Array,
|
|
1138
|
+
default: () => []
|
|
1139
|
+
},
|
|
1140
|
+
label: {
|
|
1141
|
+
type: String,
|
|
1142
|
+
default: "title"
|
|
1143
|
+
}
|
|
1144
|
+
}, {
|
|
1145
|
+
modelValue: { required: !0 },
|
|
1146
|
+
modelModifiers: {}
|
|
1147
|
+
}),
|
|
1148
|
+
emits: ["update:modelValue"],
|
|
1149
|
+
setup($) {
|
|
1150
|
+
const { t: d, te: e } = ie(), s = me($, "modelValue"), a = $, h = F(() => d(`report.section.condition.${a.label}`)), V = ee(!1), f = F(
|
|
1151
|
+
() => s.value.map((p, o) => {
|
|
1152
|
+
var u, m;
|
|
1153
|
+
const i = a.joinFieldOptions.find(
|
|
1154
|
+
(b) => {
|
|
1155
|
+
var I, K;
|
|
1156
|
+
return b.schemaName === ((I = p.joinDimension) == null ? void 0 : I.schemaName) && b.name === ((K = p.joinDimension) == null ? void 0 : K.name);
|
|
1157
|
+
}
|
|
1158
|
+
), c = (i == null ? void 0 : i.labels) || [
|
|
1159
|
+
(u = p.joinDimension) == null ? void 0 : u.schemaName,
|
|
1160
|
+
(m = p.joinDimension) == null ? void 0 : m.name
|
|
1161
|
+
];
|
|
1162
|
+
return {
|
|
1163
|
+
index: o,
|
|
1164
|
+
label: c.map((b) => ne(d, e, b, "other")).join(" "),
|
|
1165
|
+
value: p
|
|
1166
|
+
};
|
|
1167
|
+
})
|
|
1168
|
+
), w = ee(s.value.length > 0 ? 0 : void 0);
|
|
1169
|
+
function S(p) {
|
|
1170
|
+
p ? (t.value = p != null && p.value ? JSON.parse(JSON.stringify(p.value)) : void 0, w.value = p == null ? void 0 : p.index) : (t.value = {
|
|
1171
|
+
joinDimension: null,
|
|
1172
|
+
operator: "",
|
|
1173
|
+
mainDimensions: []
|
|
1174
|
+
}, w.value = void 0), V.value = !0;
|
|
1175
|
+
}
|
|
1176
|
+
const t = ee(void 0), n = F(
|
|
1177
|
+
() => a.joinFieldOptions.find(
|
|
1178
|
+
(p) => {
|
|
1179
|
+
var o, i;
|
|
1180
|
+
return p.schemaName === ((i = (o = t.value) == null ? void 0 : o.joinDimension) == null ? void 0 : i.schemaName) && p.name === t.value.joinDimension.name;
|
|
1181
|
+
}
|
|
1182
|
+
) ?? {}
|
|
1183
|
+
), y = F(
|
|
1184
|
+
() => {
|
|
1185
|
+
var p;
|
|
1186
|
+
return (((p = t.value) == null ? void 0 : p.mainDimensions) || []).map(
|
|
1187
|
+
(o) => a.mainFieldOptions.find(
|
|
1188
|
+
(i) => i.schemaName === (o == null ? void 0 : o.schemaName) && i.name === o.name
|
|
1189
|
+
) ?? {}
|
|
1190
|
+
);
|
|
1191
|
+
}
|
|
1192
|
+
), k = F(
|
|
1193
|
+
() => a.joinFieldOptions.map((p) => ({ label: p.labels.join(" "), value: p }))
|
|
1194
|
+
);
|
|
1195
|
+
function D(p) {
|
|
1196
|
+
var o, i, c, u;
|
|
1197
|
+
t.value && (t.value && p.schemaName !== ((i = (o = t.value) == null ? void 0 : o.joinDimension) == null ? void 0 : i.schemaName) || p.name !== ((u = (c = t.value) == null ? void 0 : c.joinDimension) == null ? void 0 : u.name)) && (t.value = {
|
|
1198
|
+
...t.value,
|
|
1199
|
+
joinDimension: {
|
|
1200
|
+
schemaName: p.schemaName,
|
|
1201
|
+
name: p.name,
|
|
1202
|
+
option: p.dimensionOptions[0],
|
|
1203
|
+
label: `_${p.label}`,
|
|
1204
|
+
hide: !0
|
|
1205
|
+
}
|
|
1206
|
+
}, p.joinConditionOperators.includes(t.value.operator) || x(p.joinConditionOperators[0]));
|
|
1207
|
+
}
|
|
1208
|
+
function g(p, o) {
|
|
1209
|
+
var i, c, u, m;
|
|
1210
|
+
if (t.value && o >= 0 && (t.value && p.schemaName !== ((c = (i = t.value) == null ? void 0 : i.mainDimensions[o]) == null ? void 0 : c.schemaName) || p.name !== ((m = (u = t.value) == null ? void 0 : u.mainDimensions[o]) == null ? void 0 : m.name))) {
|
|
1211
|
+
const b = [...t.value.mainDimensions];
|
|
1212
|
+
b[o] = {
|
|
1213
|
+
schemaName: p.schemaName,
|
|
1214
|
+
name: p.name,
|
|
1215
|
+
option: p.dimensionOptions[0],
|
|
1216
|
+
label: p.label,
|
|
1217
|
+
hide: !0
|
|
1218
|
+
}, t.value = {
|
|
1219
|
+
...t.value,
|
|
1220
|
+
mainDimensions: b
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
function x(p) {
|
|
1225
|
+
if (t.value)
|
|
1226
|
+
switch (p) {
|
|
1227
|
+
case Vl.Between:
|
|
1228
|
+
t.value = {
|
|
1229
|
+
...t.value,
|
|
1230
|
+
operator: p,
|
|
1231
|
+
mainDimensions: [null, null]
|
|
1232
|
+
};
|
|
1233
|
+
break;
|
|
1234
|
+
default:
|
|
1235
|
+
t.value = {
|
|
1236
|
+
...t.value,
|
|
1237
|
+
operator: p,
|
|
1238
|
+
mainDimensions: [null]
|
|
1239
|
+
};
|
|
1240
|
+
break;
|
|
1241
|
+
}
|
|
1242
|
+
}
|
|
1243
|
+
function N() {
|
|
1244
|
+
const p = [...f.value.map((o) => o.value)];
|
|
1245
|
+
t.value && (t.value.mainDimensions = t.value.mainDimensions.filter(
|
|
1246
|
+
(o) => o !== "" && o != null
|
|
1247
|
+
), w.value !== void 0 ? p[w.value] = t.value : p.push(t.value)), s.value = p, V.value = !1;
|
|
1248
|
+
}
|
|
1249
|
+
function _(p) {
|
|
1250
|
+
const o = [...f.value.map((i) => i.value)];
|
|
1251
|
+
o.splice(p, 1), s.value = o;
|
|
1252
|
+
}
|
|
1253
|
+
return (p, o) => {
|
|
1254
|
+
const i = T("FmMenuDivider"), c = T("FmForm"), u = T("FmIcon"), m = T("FmButton"), b = T("FmListItem"), I = T("FmList"), K = T("FmField");
|
|
1255
|
+
return v(), z("div", et, [
|
|
1256
|
+
r(_e, {
|
|
1257
|
+
modelValue: V.value,
|
|
1258
|
+
"onUpdate:modelValue": o[2] || (o[2] = (W) => V.value = W),
|
|
1259
|
+
title: h.value,
|
|
1260
|
+
onConfirm: N
|
|
1261
|
+
}, {
|
|
1262
|
+
content: R(() => [
|
|
1263
|
+
r(c, {
|
|
1264
|
+
ref: "form",
|
|
1265
|
+
class: "flex flex-col gap-2 w-[490px]"
|
|
1266
|
+
}, {
|
|
1267
|
+
default: R(() => {
|
|
1268
|
+
var W, P, Y, oe, U;
|
|
1269
|
+
return [
|
|
1270
|
+
r(de, {
|
|
1271
|
+
label: l(d)("report.section.condition.joinDatasource"),
|
|
1272
|
+
"model-value": n.value,
|
|
1273
|
+
items: k.value,
|
|
1274
|
+
placeholder: l(d)("report.section.condition.joinDimension"),
|
|
1275
|
+
"onUpdate:modelValue": o[0] || (o[0] = (G) => D(G))
|
|
1276
|
+
}, null, 8, ["label", "model-value", "items", "placeholder"]),
|
|
1277
|
+
r(i),
|
|
1278
|
+
(W = t.value) != null && W.joinDimension && (((P = n.value) == null ? void 0 : P.dimensionOptions) || []).length > 0 ? (v(), M(de, {
|
|
1279
|
+
key: 0,
|
|
1280
|
+
modelValue: t.value.joinDimension.option,
|
|
1281
|
+
"onUpdate:modelValue": o[1] || (o[1] = (G) => t.value.joinDimension.option = G),
|
|
1282
|
+
label: l(d)("report.section.condition.format"),
|
|
1283
|
+
items: ((Y = n.value) == null ? void 0 : Y.dimensionOptions.map((G) => ({
|
|
1284
|
+
label: l(e)(`report.section.filter.${l(ke)(G)}`) ? l(d)(`report.section.filter.${l(ke)(G)}`) : G,
|
|
1285
|
+
value: G
|
|
1286
|
+
}))) ?? []
|
|
1287
|
+
}, null, 8, ["modelValue", "label", "items"])) : O("", !0),
|
|
1288
|
+
t.value && (((oe = n.value) == null ? void 0 : oe.joinConditionOperators) || []).length > 0 ? (v(), M(de, {
|
|
1289
|
+
key: 1,
|
|
1290
|
+
"model-value": t.value.operator,
|
|
1291
|
+
label: l(d)("report.section.condition.operator"),
|
|
1292
|
+
items: n.value.joinConditionOperators.map((G) => ({
|
|
1293
|
+
label: l(d)("report.section.comparisonOperator." + G),
|
|
1294
|
+
value: G
|
|
1295
|
+
})) ?? [],
|
|
1296
|
+
"onUpdate:modelValue": x
|
|
1297
|
+
}, null, 8, ["model-value", "label", "items"])) : O("", !0),
|
|
1298
|
+
(v(!0), z(se, null, be(((U = t.value) == null ? void 0 : U.mainDimensions) || [], (G, le) => {
|
|
1299
|
+
var pe, E;
|
|
1300
|
+
return v(), z("div", {
|
|
1301
|
+
key: le,
|
|
1302
|
+
class: "flex flex-col gap-2"
|
|
1303
|
+
}, [
|
|
1304
|
+
r(de, {
|
|
1305
|
+
"model-value": y.value[le],
|
|
1306
|
+
label: l(d)("report.section.condition.mainDatasource", { index: le + 1 }),
|
|
1307
|
+
items: a.mainFieldOptions.map((ue) => ({
|
|
1308
|
+
label: ue.labels.join(" "),
|
|
1309
|
+
value: ue
|
|
1310
|
+
})),
|
|
1311
|
+
"onUpdate:modelValue": (ue) => g(ue, le)
|
|
1312
|
+
}, null, 8, ["model-value", "label", "items", "onUpdate:modelValue"]),
|
|
1313
|
+
G && (((pe = y.value[le]) == null ? void 0 : pe.dimensionOptions) || []).length > 0 && G ? (v(), M(de, {
|
|
1314
|
+
key: 0,
|
|
1315
|
+
modelValue: G.option,
|
|
1316
|
+
"onUpdate:modelValue": (ue) => G.option = ue,
|
|
1317
|
+
items: (E = y.value[le]) == null ? void 0 : E.dimensionOptions.map((ue) => ({
|
|
1318
|
+
label: l(e)(`report.section.filter.${l(ke)(ue)}`) ? l(d)(`report.section.filter.${l(ke)(ue)}`) : ue,
|
|
1319
|
+
value: ue
|
|
1320
|
+
}))
|
|
1321
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "items"])) : O("", !0),
|
|
1322
|
+
r(i)
|
|
1323
|
+
]);
|
|
1324
|
+
}), 128))
|
|
1325
|
+
];
|
|
1326
|
+
}),
|
|
1327
|
+
_: 1
|
|
1328
|
+
}, 512)
|
|
1329
|
+
]),
|
|
1330
|
+
_: 1
|
|
1331
|
+
}, 8, ["modelValue", "title"]),
|
|
1332
|
+
C("div", null, [
|
|
1333
|
+
C("p", lt, X(h.value), 1),
|
|
1334
|
+
C("p", tt, X(l(d)("report.section.condition.description")), 1)
|
|
1335
|
+
]),
|
|
1336
|
+
r(I, { class: "flex flex-col gap-2" }, {
|
|
1337
|
+
default: R(() => [
|
|
1338
|
+
r(l(Ie), {
|
|
1339
|
+
list: s.value,
|
|
1340
|
+
"item-key": (W) => {
|
|
1341
|
+
var P, Y;
|
|
1342
|
+
return `${(P = W.joinDimension) == null ? void 0 : P.schemaName}:${(Y = W.joinDimension) == null ? void 0 : Y.name}`;
|
|
1343
|
+
},
|
|
1344
|
+
class: "flex flex-col gap-2 w-full"
|
|
1345
|
+
}, {
|
|
1346
|
+
item: R(({ element: W, index: P }) => [
|
|
1347
|
+
r(b, {
|
|
1348
|
+
class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
|
|
1349
|
+
onClick: ge((Y) => S(f.value[P]), ["stop"])
|
|
1350
|
+
}, {
|
|
1351
|
+
default: R(() => [
|
|
1352
|
+
r(u, { name: "drag_handle" }),
|
|
1353
|
+
C("p", ot, X(f.value[P].label), 1),
|
|
1354
|
+
o[4] || (o[4] = C("div", { class: "grow" }, null, -1)),
|
|
1355
|
+
r(m, {
|
|
1356
|
+
icon: "close",
|
|
1357
|
+
size: "md",
|
|
1358
|
+
variant: "tertiary",
|
|
1359
|
+
onClick: ge((Y) => _(P), ["stop"])
|
|
1360
|
+
}, null, 8, ["onClick"])
|
|
1361
|
+
]),
|
|
1362
|
+
_: 2
|
|
1363
|
+
}, 1032, ["onClick"])
|
|
1364
|
+
]),
|
|
1365
|
+
_: 1
|
|
1366
|
+
}, 8, ["list", "item-key"])
|
|
1367
|
+
]),
|
|
1368
|
+
_: 1
|
|
1369
|
+
}),
|
|
1370
|
+
r(K, {
|
|
1371
|
+
class: "text-fm-color-typo-tertiary cursor-pointer",
|
|
1372
|
+
onClick: o[3] || (o[3] = (W) => S())
|
|
1373
|
+
}, {
|
|
1374
|
+
default: R(() => [
|
|
1375
|
+
Se(X(l(d)("report.section.condition.add")), 1)
|
|
1376
|
+
]),
|
|
1377
|
+
_: 1
|
|
1378
|
+
})
|
|
1379
|
+
]);
|
|
1380
|
+
};
|
|
1381
|
+
}
|
|
1382
|
+
}), Ke = /* @__PURE__ */ ae({
|
|
1383
|
+
__name: "Datasource",
|
|
1384
|
+
props: /* @__PURE__ */ re({
|
|
1385
|
+
label: {
|
|
1386
|
+
type: String,
|
|
1387
|
+
default: "Label"
|
|
1388
|
+
},
|
|
1389
|
+
config: {
|
|
1390
|
+
type: Object,
|
|
1391
|
+
default: null
|
|
1392
|
+
},
|
|
1393
|
+
closeable: {
|
|
1394
|
+
type: Boolean,
|
|
1395
|
+
default: !1
|
|
1396
|
+
},
|
|
1397
|
+
mainDatasourceConfig: {
|
|
1398
|
+
type: Object,
|
|
1399
|
+
default: () => {
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
modelValue: {
|
|
1403
|
+
type: Object,
|
|
1404
|
+
default: () => {
|
|
1405
|
+
}
|
|
1406
|
+
}
|
|
1407
|
+
}, {
|
|
1408
|
+
modelValue: { required: !0 },
|
|
1409
|
+
modelModifiers: {}
|
|
1410
|
+
}),
|
|
1411
|
+
emits: /* @__PURE__ */ re(["click-close"], ["update:modelValue"]),
|
|
1412
|
+
setup($, { emit: d }) {
|
|
1413
|
+
const { disableEditMode: e, resetStore: s } = Me(), a = me($, "modelValue");
|
|
1414
|
+
ye(
|
|
1415
|
+
[() => a.value.dimensions, () => a.value.metrics],
|
|
1416
|
+
() => {
|
|
1417
|
+
const { rowIds: o, columnIds: i } = Oe(a.value);
|
|
1418
|
+
a.value.rowIds = o, a.value.columnIds = i;
|
|
1419
|
+
},
|
|
1420
|
+
{ deep: !0 }
|
|
1421
|
+
);
|
|
1422
|
+
const h = $, V = d, { schemas: f } = Ce(ll());
|
|
1423
|
+
ul(() => {
|
|
1424
|
+
e(), s();
|
|
1425
|
+
});
|
|
1426
|
+
const { t: w, te: S, locale: t } = ie(), n = F(() => !h.mainDatasourceConfig), y = F(
|
|
1427
|
+
() => [A.BarChart, A.LineChart, A.Scorecard].includes(h.config.type)
|
|
1428
|
+
), k = F(() => {
|
|
1429
|
+
const o = [...a.value.dimensions].filter((i) => !i.hide);
|
|
1430
|
+
return o.sort(
|
|
1431
|
+
(i, c) => (a.value.rowIds || []).indexOf(xe(i)) - (a.value.rowIds || []).indexOf(xe(c))
|
|
1432
|
+
), o;
|
|
1433
|
+
}), D = F(() => h.config.type === A.Scorecard), g = F(
|
|
1434
|
+
() => {
|
|
1435
|
+
var o;
|
|
1436
|
+
return (((o = h.mainDatasourceConfig) == null ? void 0 : o.schemaNames) || []).reduce(
|
|
1437
|
+
(i, c) => {
|
|
1438
|
+
const u = f.value.find((m) => m.name === c);
|
|
1439
|
+
return u && (i = [
|
|
1440
|
+
...i,
|
|
1441
|
+
...u.fields.map((m) => ({
|
|
1442
|
+
...m,
|
|
1443
|
+
labels: [
|
|
1444
|
+
ne(w, S, u.label, "schema"),
|
|
1445
|
+
ne(w, S, m.label || m.name, "other")
|
|
1446
|
+
]
|
|
1447
|
+
}))
|
|
1448
|
+
]), i;
|
|
1449
|
+
},
|
|
1450
|
+
[]
|
|
1451
|
+
);
|
|
1452
|
+
}
|
|
1453
|
+
), x = F(
|
|
1454
|
+
() => a.value.schemaNames.reduce((o, i) => {
|
|
1455
|
+
const c = f.value.find((u) => u.name === i);
|
|
1456
|
+
return c && (o = [
|
|
1457
|
+
...o,
|
|
1458
|
+
...c.fields.map((u) => ({
|
|
1459
|
+
...u,
|
|
1460
|
+
labels: [
|
|
1461
|
+
ne(w, S, c.label, "schema"),
|
|
1462
|
+
ne(w, S, u.label || u.name, "other")
|
|
1463
|
+
]
|
|
1464
|
+
}))
|
|
1465
|
+
]), o;
|
|
1466
|
+
}, [])
|
|
1467
|
+
), N = F(() => [
|
|
1468
|
+
{ label: w("report.section.datasource.none"), value: null },
|
|
1469
|
+
{ label: w("report.section.datasource.grandTotal"), value: 0 },
|
|
1470
|
+
...[...k.value].slice(0, k.value.length - 1).map((o, i) => ({
|
|
1471
|
+
label: ne(w, S, o.label, "other"),
|
|
1472
|
+
value: i + 1
|
|
1473
|
+
}))
|
|
1474
|
+
]), _ = F(
|
|
1475
|
+
() => `rollup-${t.value}-${k.value.map((o) => xe(o)).join("|")}`
|
|
1476
|
+
), p = F(() => [
|
|
1477
|
+
{
|
|
1478
|
+
label: w("report.section.datasource.none"),
|
|
1479
|
+
value: null
|
|
1480
|
+
},
|
|
1481
|
+
...Object.keys(Ye).map((o) => ({
|
|
1482
|
+
label: S(`report.section.datasource.periodType.${o}`) ? w(`report.section.datasource.periodType.${o}`) : o,
|
|
1483
|
+
value: Ye[o]
|
|
1484
|
+
}))
|
|
1485
|
+
]);
|
|
1486
|
+
return (o, i) => {
|
|
1487
|
+
const c = T("FmButton"), u = T("FmSwitch"), m = T("FmSelect");
|
|
1488
|
+
return v(), M(Re, null, {
|
|
1489
|
+
header: R(() => [
|
|
1490
|
+
C("p", null, X(h.label), 1),
|
|
1491
|
+
i[19] || (i[19] = C("div", { class: "grow" }, null, -1)),
|
|
1492
|
+
h.closeable ? (v(), M(c, {
|
|
1493
|
+
key: 0,
|
|
1494
|
+
icon: "close",
|
|
1495
|
+
variant: "tertiary",
|
|
1496
|
+
size: "md",
|
|
1497
|
+
onClick: i[0] || (i[0] = ge((b) => V("click-close"), ["stop"]))
|
|
1498
|
+
})) : O("", !0)
|
|
1499
|
+
]),
|
|
1500
|
+
content: R(() => [
|
|
1501
|
+
r(Ml, {
|
|
1502
|
+
modelValue: a.value,
|
|
1503
|
+
"onUpdate:modelValue": i[1] || (i[1] = (b) => a.value = b),
|
|
1504
|
+
label: l(w)("report.section.schema.title")
|
|
1505
|
+
}, null, 8, ["modelValue", "label"]),
|
|
1506
|
+
r(ze, {
|
|
1507
|
+
modelValue: a.value.dimensions,
|
|
1508
|
+
"onUpdate:modelValue": i[2] || (i[2] = (b) => a.value.dimensions = b),
|
|
1509
|
+
options: x.value,
|
|
1510
|
+
config: a.value,
|
|
1511
|
+
max: h.config.maxDimension,
|
|
1512
|
+
"has-row-column": !0,
|
|
1513
|
+
onConfig: i[3] || (i[3] = (b) => {
|
|
1514
|
+
a.value = b;
|
|
1515
|
+
})
|
|
1516
|
+
}, null, 8, ["modelValue", "options", "config", "max"]),
|
|
1517
|
+
r(u, {
|
|
1518
|
+
"label-placement": "right",
|
|
1519
|
+
label: l(w)("report.section.datasource.comparable"),
|
|
1520
|
+
"model-value": a.value.isComparable ?? !1,
|
|
1521
|
+
"onUpdate:modelValue": i[4] || (i[4] = (b) => {
|
|
1522
|
+
a.value.isComparable = b;
|
|
1523
|
+
})
|
|
1524
|
+
}, null, 8, ["label", "model-value"]),
|
|
1525
|
+
y.value ? (v(), M(u, {
|
|
1526
|
+
key: 0,
|
|
1527
|
+
"label-placement": "right",
|
|
1528
|
+
label: l(w)("report.section.datasource.cumulative"),
|
|
1529
|
+
"model-value": a.value.isCumulative ?? !1,
|
|
1530
|
+
"onUpdate:modelValue": i[5] || (i[5] = (b) => {
|
|
1531
|
+
a.value.isCumulative = b;
|
|
1532
|
+
})
|
|
1533
|
+
}, null, 8, ["label", "model-value"])) : O("", !0),
|
|
1534
|
+
h.config.isDrillConfigurable && n.value ? (v(), M(u, {
|
|
1535
|
+
key: 1,
|
|
1536
|
+
label: l(w)("report.section.datasource.drill"),
|
|
1537
|
+
"label-placement": "right",
|
|
1538
|
+
"model-value": a.value.isDrillable ?? !1,
|
|
1539
|
+
"onUpdate:modelValue": i[6] || (i[6] = (b) => {
|
|
1540
|
+
a.value.isDrillable = b;
|
|
1541
|
+
})
|
|
1542
|
+
}, null, 8, ["label", "model-value"])) : O("", !0),
|
|
1543
|
+
n.value ? (v(), M(u, {
|
|
1544
|
+
key: 2,
|
|
1545
|
+
modelValue: a.value.isBlend,
|
|
1546
|
+
"onUpdate:modelValue": i[7] || (i[7] = (b) => a.value.isBlend = b),
|
|
1547
|
+
label: l(w)("report.section.datasource.blend"),
|
|
1548
|
+
"label-placement": "right"
|
|
1549
|
+
}, null, 8, ["modelValue", "label"])) : O("", !0),
|
|
1550
|
+
h.config.canRollup && n.value ? (v(), M(m, {
|
|
1551
|
+
key: _.value,
|
|
1552
|
+
modelValue: a.value.rollup,
|
|
1553
|
+
"onUpdate:modelValue": i[8] || (i[8] = (b) => a.value.rollup = b),
|
|
1554
|
+
label: l(w)("report.section.datasource.subTotal"),
|
|
1555
|
+
items: N.value
|
|
1556
|
+
}, null, 8, ["modelValue", "label", "items"])) : O("", !0),
|
|
1557
|
+
n.value ? O("", !0) : (v(), M(m, {
|
|
1558
|
+
key: `periodType-${l(t)}`,
|
|
1559
|
+
modelValue: a.value.periodType,
|
|
1560
|
+
"onUpdate:modelValue": i[9] || (i[9] = (b) => a.value.periodType = b),
|
|
1561
|
+
label: l(w)("report.section.datasource.periodType.label"),
|
|
1562
|
+
items: p.value
|
|
1563
|
+
}, null, 8, ["modelValue", "label", "items"])),
|
|
1564
|
+
h.config.canTranspose && n.value ? (v(), M(u, {
|
|
1565
|
+
key: 5,
|
|
1566
|
+
modelValue: a.value.isTransposed,
|
|
1567
|
+
"onUpdate:modelValue": i[10] || (i[10] = (b) => a.value.isTransposed = b),
|
|
1568
|
+
label: l(w)("report.section.datasource.transpose"),
|
|
1569
|
+
"label-placement": "right"
|
|
1570
|
+
}, null, 8, ["modelValue", "label"])) : O("", !0),
|
|
1571
|
+
h.config.hasBreakdownDimension ? (v(), M(ze, {
|
|
1572
|
+
key: 6,
|
|
1573
|
+
"model-value": a.value.breakdownDimension ? [a.value.breakdownDimension] : [],
|
|
1574
|
+
label: "breakdownDimension",
|
|
1575
|
+
max: 1,
|
|
1576
|
+
options: x.value,
|
|
1577
|
+
"onUpdate:modelValue": i[11] || (i[11] = (b) => {
|
|
1578
|
+
a.value.breakdownDimension = b[0];
|
|
1579
|
+
})
|
|
1580
|
+
}, null, 8, ["model-value", "options"])) : O("", !0),
|
|
1581
|
+
D.value ? (v(), M(ze, {
|
|
1582
|
+
key: 7,
|
|
1583
|
+
"model-value": a.value.sparklineDimension ? [a.value.sparklineDimension] : [],
|
|
1584
|
+
label: "sparklineDimension",
|
|
1585
|
+
max: 1,
|
|
1586
|
+
options: x.value,
|
|
1587
|
+
"onUpdate:modelValue": i[12] || (i[12] = (b) => {
|
|
1588
|
+
a.value.sparklineDimension = b[0];
|
|
1589
|
+
})
|
|
1590
|
+
}, null, 8, ["model-value", "options"])) : O("", !0),
|
|
1591
|
+
r(El, {
|
|
1592
|
+
modelValue: a.value.metrics,
|
|
1593
|
+
"onUpdate:modelValue": i[13] || (i[13] = (b) => a.value.metrics = b),
|
|
1594
|
+
options: x.value,
|
|
1595
|
+
max: h.config.maxMetric,
|
|
1596
|
+
config: a.value,
|
|
1597
|
+
"has-row-column": h.config.type === l(A).Table,
|
|
1598
|
+
"has-xy": h.config.hasXy,
|
|
1599
|
+
onConfig: i[14] || (i[14] = (b) => {
|
|
1600
|
+
a.value = b;
|
|
1601
|
+
})
|
|
1602
|
+
}, null, 8, ["modelValue", "options", "max", "config", "has-row-column", "has-xy"]),
|
|
1603
|
+
r(fl, {
|
|
1604
|
+
modelValue: a.value.filters,
|
|
1605
|
+
"onUpdate:modelValue": i[15] || (i[15] = (b) => a.value.filters = b),
|
|
1606
|
+
options: x.value
|
|
1607
|
+
}, null, 8, ["modelValue", "options"]),
|
|
1608
|
+
r(Gl, {
|
|
1609
|
+
modelValue: a.value.sorts,
|
|
1610
|
+
"onUpdate:modelValue": i[16] || (i[16] = (b) => a.value.sorts = b),
|
|
1611
|
+
options: x.value
|
|
1612
|
+
}, null, 8, ["modelValue", "options"]),
|
|
1613
|
+
r(Zl, {
|
|
1614
|
+
modelValue: a.value.limit,
|
|
1615
|
+
"onUpdate:modelValue": i[17] || (i[17] = (b) => a.value.limit = b)
|
|
1616
|
+
}, null, 8, ["modelValue"]),
|
|
1617
|
+
a.value.conditions ? (v(), M(at, {
|
|
1618
|
+
key: 8,
|
|
1619
|
+
modelValue: a.value.conditions,
|
|
1620
|
+
"onUpdate:modelValue": i[18] || (i[18] = (b) => a.value.conditions = b),
|
|
1621
|
+
"join-field-options": x.value,
|
|
1622
|
+
"main-field-options": g.value
|
|
1623
|
+
}, null, 8, ["modelValue", "join-field-options", "main-field-options"])) : O("", !0)
|
|
1624
|
+
]),
|
|
1625
|
+
_: 1
|
|
1626
|
+
});
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
}), nt = { class: "fm-typo-en-title-sm-600" }, Xe = /* @__PURE__ */ ae({
|
|
1630
|
+
__name: "TileEditorTabHeader",
|
|
1631
|
+
props: /* @__PURE__ */ re({
|
|
1632
|
+
icon: {
|
|
1633
|
+
type: String,
|
|
1634
|
+
required: !0
|
|
1635
|
+
}
|
|
1636
|
+
}, {
|
|
1637
|
+
modelValue: { type: Boolean, required: !0, default: !1 },
|
|
1638
|
+
modelModifiers: {}
|
|
1639
|
+
}),
|
|
1640
|
+
emits: ["update:modelValue"],
|
|
1641
|
+
setup($) {
|
|
1642
|
+
const { t: d } = ie(), e = me($, "modelValue"), s = $;
|
|
1643
|
+
return (a, h) => {
|
|
1644
|
+
const V = T("FmIcon");
|
|
1645
|
+
return v(), z("div", {
|
|
1646
|
+
class: "px-6 py-16 flex items-center gap-2 bg-fm-color-neutral-white border cursor-pointer",
|
|
1647
|
+
onClick: h[0] || (h[0] = (f) => e.value = !e.value)
|
|
1648
|
+
}, [
|
|
1649
|
+
C("p", nt, X(l(d)("report.tile.setting")), 1),
|
|
1650
|
+
h[1] || (h[1] = C("div", { class: "grow" }, null, -1)),
|
|
1651
|
+
r(V, {
|
|
1652
|
+
name: s.icon
|
|
1653
|
+
}, null, 8, ["name"])
|
|
1654
|
+
]);
|
|
1655
|
+
};
|
|
1656
|
+
}
|
|
1657
|
+
}), it = /* @__PURE__ */ ae({
|
|
1658
|
+
__name: "TileEditorTabDesktop",
|
|
1659
|
+
props: {
|
|
1660
|
+
modelValue: { required: !0, default: !1 },
|
|
1661
|
+
modelModifiers: {}
|
|
1662
|
+
},
|
|
1663
|
+
emits: ["update:modelValue"],
|
|
1664
|
+
setup($) {
|
|
1665
|
+
const d = me($, "modelValue");
|
|
1666
|
+
return (e, s) => (v(), z(se, null, [
|
|
1667
|
+
r(Xe, {
|
|
1668
|
+
modelValue: d.value,
|
|
1669
|
+
"onUpdate:modelValue": s[0] || (s[0] = (a) => d.value = a),
|
|
1670
|
+
icon: "keyboard_double_arrow_left"
|
|
1671
|
+
}, null, 8, ["modelValue"]),
|
|
1672
|
+
Ze(e.$slots, "default")
|
|
1673
|
+
], 64));
|
|
1674
|
+
}
|
|
1675
|
+
}), st = { class: "fixed bottom-0 w-full" }, rt = /* @__PURE__ */ ae({
|
|
1676
|
+
__name: "TileEditorTabMobile",
|
|
1677
|
+
props: {
|
|
1678
|
+
modelValue: { required: !0, default: !1 },
|
|
1679
|
+
modelModifiers: {}
|
|
1680
|
+
},
|
|
1681
|
+
emits: ["update:modelValue"],
|
|
1682
|
+
setup($) {
|
|
1683
|
+
const d = me($, "modelValue");
|
|
1684
|
+
return (e, s) => {
|
|
1685
|
+
const a = T("FmTopSheet");
|
|
1686
|
+
return v(), z("div", st, [
|
|
1687
|
+
r(Xe, {
|
|
1688
|
+
modelValue: d.value,
|
|
1689
|
+
"onUpdate:modelValue": s[0] || (s[0] = (h) => d.value = h),
|
|
1690
|
+
icon: "keyboard_double_arrow_up"
|
|
1691
|
+
}, null, 8, ["modelValue"]),
|
|
1692
|
+
r(a, {
|
|
1693
|
+
modelValue: d.value,
|
|
1694
|
+
"onUpdate:modelValue": s[2] || (s[2] = (h) => d.value = h),
|
|
1695
|
+
"fullscreen-size": "sm"
|
|
1696
|
+
}, {
|
|
1697
|
+
default: R(() => [
|
|
1698
|
+
r(Xe, {
|
|
1699
|
+
modelValue: d.value,
|
|
1700
|
+
"onUpdate:modelValue": s[1] || (s[1] = (h) => d.value = h),
|
|
1701
|
+
icon: "keyboard_double_arrow_down"
|
|
1702
|
+
}, null, 8, ["modelValue"]),
|
|
1703
|
+
d.value ? Ze(e.$slots, "default", { key: 0 }) : O("", !0)
|
|
1704
|
+
]),
|
|
1705
|
+
_: 3
|
|
1706
|
+
}, 8, ["modelValue"])
|
|
1707
|
+
]);
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
}), ut = { class: "flex gap-16" }, dt = { class: "flex flex-col gap-8 max-w-[120px]" }, mt = { class: "fm-typo-en-body-lg-600" }, ct = { class: "flex flex-col gap-16" }, pt = { class: "fm-typo-en-body-lg-600" }, vt = { class: "flex flex-row gap-8" }, ft = /* @__PURE__ */ ae({
|
|
1711
|
+
__name: "TitleSection",
|
|
1712
|
+
props: {
|
|
1713
|
+
model: {}
|
|
1714
|
+
},
|
|
1715
|
+
emits: ["update:model"],
|
|
1716
|
+
setup($, { emit: d }) {
|
|
1717
|
+
const e = $, s = d, { t: a } = ie(), h = F({
|
|
1718
|
+
get: () => e.model.showTitle ?? !1,
|
|
1719
|
+
set: (t) => s("update:model", { ...e.model, showTitle: t })
|
|
1720
|
+
}), V = F({
|
|
1721
|
+
get: () => e.model.titleFontSize ?? 14,
|
|
1722
|
+
set: (t) => s("update:model", { ...e.model, titleFontSize: Math.min(Number(t), 24) })
|
|
1723
|
+
}), f = F({
|
|
1724
|
+
get: () => e.model.titleBold ?? !1,
|
|
1725
|
+
set: (t) => s("update:model", { ...e.model, titleBold: t })
|
|
1726
|
+
}), w = F({
|
|
1727
|
+
get: () => e.model.titleItalic ?? !1,
|
|
1728
|
+
set: (t) => s("update:model", { ...e.model, titleItalic: t })
|
|
1729
|
+
}), S = F({
|
|
1730
|
+
get: () => e.model.titleUnderline ?? !1,
|
|
1731
|
+
set: (t) => s("update:model", { ...e.model, titleUnderline: t })
|
|
1732
|
+
});
|
|
1733
|
+
return (t, n) => {
|
|
1734
|
+
const y = T("FmStepperField"), k = T("FmButton"), D = T("FmSwitch");
|
|
1735
|
+
return v(), z(se, null, [
|
|
1736
|
+
C("div", null, [
|
|
1737
|
+
C("div", ut, [
|
|
1738
|
+
C("div", dt, [
|
|
1739
|
+
C("p", mt, X(l(a)("report.section.datasource.title.titleFontSize")), 1),
|
|
1740
|
+
r(y, {
|
|
1741
|
+
modelValue: V.value,
|
|
1742
|
+
"onUpdate:modelValue": n[0] || (n[0] = (g) => V.value = g),
|
|
1743
|
+
max: 24,
|
|
1744
|
+
min: 1,
|
|
1745
|
+
type: "number"
|
|
1746
|
+
}, null, 8, ["modelValue"])
|
|
1747
|
+
]),
|
|
1748
|
+
C("div", ct, [
|
|
1749
|
+
C("p", pt, X(l(a)("report.section.datasource.title.textStyleFormat")), 1),
|
|
1750
|
+
C("div", vt, [
|
|
1751
|
+
r(k, {
|
|
1752
|
+
"append-icon": "format_bold",
|
|
1753
|
+
"model-value": t.model.titleBold ?? !1,
|
|
1754
|
+
variant: "tertiary",
|
|
1755
|
+
"icon-color": t.model.titleBold ? "neutral-gray-400" : "neutral-gray-300",
|
|
1756
|
+
"bg-color": t.model.titleBold ? "neutral-gray-100" : "neutral-white",
|
|
1757
|
+
class: "rounded-sm",
|
|
1758
|
+
onClick: n[1] || (n[1] = (g) => f.value = !f.value)
|
|
1759
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"]),
|
|
1760
|
+
r(k, {
|
|
1761
|
+
"append-icon": "format_italic",
|
|
1762
|
+
"model-value": t.model.titleItalic ?? !1,
|
|
1763
|
+
"icon-color": t.model.titleItalic ? "neutral-gray-400" : "neutral-gray-300",
|
|
1764
|
+
"bg-color": t.model.titleItalic ? "neutral-gray-100" : "neutral-white",
|
|
1765
|
+
class: "rounded-sm",
|
|
1766
|
+
onClick: n[2] || (n[2] = (g) => w.value = !w.value)
|
|
1767
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"]),
|
|
1768
|
+
r(k, {
|
|
1769
|
+
"append-icon": "format_underlined",
|
|
1770
|
+
"model-value": t.model.titleUnderline ?? !1,
|
|
1771
|
+
"icon-color": t.model.titleUnderline ? "neutral-gray-400" : "neutral-gray-300",
|
|
1772
|
+
"bg-color": t.model.titleUnderline ? "neutral-gray-100" : "neutral-white",
|
|
1773
|
+
class: "rounded-sm",
|
|
1774
|
+
onClick: n[3] || (n[3] = (g) => S.value = !S.value)
|
|
1775
|
+
}, null, 8, ["model-value", "icon-color", "bg-color"])
|
|
1776
|
+
])
|
|
1777
|
+
])
|
|
1778
|
+
])
|
|
1779
|
+
]),
|
|
1780
|
+
r(D, {
|
|
1781
|
+
modelValue: h.value,
|
|
1782
|
+
"onUpdate:modelValue": n[4] || (n[4] = (g) => h.value = g),
|
|
1783
|
+
label: l(a)("report.section.datasource.title.showTitle"),
|
|
1784
|
+
"label-placement": "right"
|
|
1785
|
+
}, null, 8, ["modelValue", "label"])
|
|
1786
|
+
], 64);
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
}), gt = { class: "flex flex-col gap-8" }, bt = { class: "text-fm-color-typo-primary fm-typo-en-body-lg-600" }, yt = { class: "flex flex-row gap-2" }, ht = {
|
|
1790
|
+
key: 0,
|
|
1791
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
|
|
1792
|
+
}, wt = /* @__PURE__ */ ae({
|
|
1793
|
+
__name: "TableResizeSection",
|
|
1794
|
+
props: {
|
|
1795
|
+
layout: {}
|
|
1796
|
+
},
|
|
1797
|
+
emits: ["update:layout"],
|
|
1798
|
+
setup($, { emit: d }) {
|
|
1799
|
+
const { t: e } = ie(), s = $, a = d, { isEditing: h, colWidths: V, rowHeight: f } = Ce(Me()), { enableCellResizing: w, cancelResizingChanges: S, resetStore: t, disableEditMode: n } = Me();
|
|
1800
|
+
F(
|
|
1801
|
+
() => {
|
|
1802
|
+
var k, D, g;
|
|
1803
|
+
return (((D = (k = s.layout) == null ? void 0 : k.colWidths) == null ? void 0 : D.length) ?? 0) > 0 || V.value.length > 0 || (((g = s.layout) == null ? void 0 : g.rowHeight) ?? 0) > 0 || f.value > 0;
|
|
1804
|
+
}
|
|
1805
|
+
);
|
|
1806
|
+
function y() {
|
|
1807
|
+
t(), n(), a("update:layout", {
|
|
1808
|
+
...s.layout,
|
|
1809
|
+
rowHeight: void 0,
|
|
1810
|
+
colWidths: void 0
|
|
1811
|
+
});
|
|
1812
|
+
const k = document.querySelector("table");
|
|
1813
|
+
if (k) {
|
|
1814
|
+
k.classList.remove("table-fixed"), k.classList.add("table-auto"), k.style.width = "";
|
|
1815
|
+
const D = k.querySelectorAll("th"), g = k.querySelectorAll("td"), x = k.querySelectorAll("tr");
|
|
1816
|
+
D.forEach((N) => {
|
|
1817
|
+
N.style.width = "";
|
|
1818
|
+
}), g.forEach((N) => {
|
|
1819
|
+
N.style.width = "";
|
|
1820
|
+
}), x.forEach((N) => {
|
|
1821
|
+
N.style.height = "";
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
return We(() => {
|
|
1826
|
+
var k, D;
|
|
1827
|
+
((k = s.layout) == null ? void 0 : k.rowHeight) !== void 0 && (f.value = s.layout.rowHeight), (D = s.layout) != null && D.colWidths && (V.value = [...s.layout.colWidths]);
|
|
1828
|
+
}), (k, D) => {
|
|
1829
|
+
const g = T("FmButton");
|
|
1830
|
+
return v(), z("div", gt, [
|
|
1831
|
+
C("p", bt, X(l(e)("report.section.datasource.tableLayout")), 1),
|
|
1832
|
+
C("div", yt, [
|
|
1833
|
+
l(h) ? O("", !0) : (v(), M(g, {
|
|
1834
|
+
key: 0,
|
|
1835
|
+
label: l(e)("report.section.datasource.resizeTable"),
|
|
1836
|
+
variant: "secondary",
|
|
1837
|
+
icon: "resize",
|
|
1838
|
+
"icon-position": "prepend",
|
|
1839
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1840
|
+
onClick: l(w)
|
|
1841
|
+
}, null, 8, ["label", "onClick"])),
|
|
1842
|
+
l(h) ? (v(), M(g, {
|
|
1843
|
+
key: 1,
|
|
1844
|
+
label: l(e)("report.common.cancel"),
|
|
1845
|
+
variant: "primary",
|
|
1846
|
+
icon: "close",
|
|
1847
|
+
"icon-position": "prepend",
|
|
1848
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1849
|
+
onClick: l(S)
|
|
1850
|
+
}, null, 8, ["label", "onClick"])) : O("", !0),
|
|
1851
|
+
r(g, {
|
|
1852
|
+
label: l(e)("report.section.datasource.resetSize"),
|
|
1853
|
+
variant: "secondary",
|
|
1854
|
+
icon: "restore",
|
|
1855
|
+
"icon-position": "prepend",
|
|
1856
|
+
class: "[&_.label]:line-clamp-none w-full",
|
|
1857
|
+
onClick: y
|
|
1858
|
+
}, null, 8, ["label"])
|
|
1859
|
+
]),
|
|
1860
|
+
l(h) ? (v(), z("p", ht, X(l(e)("report.section.datasource.resizeTableHelper")), 1)) : O("", !0)
|
|
1861
|
+
]);
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
}), Vt = { class: "flex gap-16 justify-center items-center" }, Ct = { class: "fm-typo-en-title-sm-600" }, xt = { class: "fm-typo-en-body-lg-600" }, Ft = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, kt = { class: "h-[40x]" }, Qe = "YYYY-MM-DD", sl = /* @__PURE__ */ ae({
|
|
1865
|
+
__name: "TileEditorTab",
|
|
1866
|
+
props: /* @__PURE__ */ re({
|
|
1867
|
+
hideConfiguration: {
|
|
1868
|
+
type: Boolean,
|
|
1869
|
+
default: !1
|
|
1870
|
+
}
|
|
1871
|
+
}, {
|
|
1872
|
+
modelValue: {
|
|
1873
|
+
required: !0
|
|
1874
|
+
},
|
|
1875
|
+
modelModifiers: {}
|
|
1876
|
+
}),
|
|
1877
|
+
emits: /* @__PURE__ */ re(["hideConfiguration"], ["update:modelValue"]),
|
|
1878
|
+
setup($, { emit: d }) {
|
|
1879
|
+
var i, c;
|
|
1880
|
+
const e = al(), { dateRange: s, timezone: a } = Ce(e), h = {
|
|
1881
|
+
startDate: s.value.startDate,
|
|
1882
|
+
endDate: s.value.endDate
|
|
1883
|
+
}, V = ee({
|
|
1884
|
+
startDate: (i = Be(s.value.startDate)) == null ? void 0 : i.tz(a.value).format(Qe),
|
|
1885
|
+
endDate: (c = Be(s.value.endDate)) == null ? void 0 : c.tz(a.value).format(Qe)
|
|
1886
|
+
});
|
|
1887
|
+
ye(
|
|
1888
|
+
V,
|
|
1889
|
+
() => {
|
|
1890
|
+
V.value.endDate || (V.value.endDate = V.value.startDate);
|
|
1891
|
+
const u = {
|
|
1892
|
+
startDate: Be.tz(V.value.startDate, a.value).startOf("day").utc().toISOString(),
|
|
1893
|
+
endDate: Be.tz(V.value.endDate, a.value).endOf("day").utc().toISOString()
|
|
1894
|
+
};
|
|
1895
|
+
s.value = u;
|
|
1896
|
+
},
|
|
1897
|
+
{ deep: !0 }
|
|
1898
|
+
), dl(() => {
|
|
1899
|
+
s.value = { ...h };
|
|
1900
|
+
});
|
|
1901
|
+
const f = me($, "modelValue"), { breakpoints: w } = ol(), S = $, { promptMessage: t } = tl(), n = d, { t: y, locale: k } = ie();
|
|
1902
|
+
function D(u) {
|
|
1903
|
+
f.value = Al(u);
|
|
1904
|
+
}
|
|
1905
|
+
function g() {
|
|
1906
|
+
const u = [...f.value.widget.config.joinDatasources || []];
|
|
1907
|
+
u.push({ ...bl(f.value.widget.type), conditions: [] }), D({
|
|
1908
|
+
...f.value,
|
|
1909
|
+
widget: {
|
|
1910
|
+
...f.value.widget,
|
|
1911
|
+
config: {
|
|
1912
|
+
...f.value.widget.config,
|
|
1913
|
+
joinDatasources: u
|
|
1914
|
+
}
|
|
1915
|
+
}
|
|
1916
|
+
});
|
|
1917
|
+
}
|
|
1918
|
+
async function x(u) {
|
|
1919
|
+
if (!await t({
|
|
1920
|
+
title: y("report.tile.datasource.remove"),
|
|
1921
|
+
message: y("report.tile.datasource.confirmRemove", { index: u + 1 })
|
|
1922
|
+
})) return;
|
|
1923
|
+
const b = [...f.value.widget.config.joinDatasources || []];
|
|
1924
|
+
b.splice(u, 1), D({
|
|
1925
|
+
...f.value,
|
|
1926
|
+
widget: {
|
|
1927
|
+
...f.value.widget,
|
|
1928
|
+
config: {
|
|
1929
|
+
...f.value.widget.config,
|
|
1930
|
+
joinDatasources: b
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
});
|
|
1934
|
+
}
|
|
1935
|
+
const N = (u, m) => {
|
|
1936
|
+
let b = 1, I = 1;
|
|
1937
|
+
switch (u) {
|
|
1938
|
+
case A.Scorecard:
|
|
1939
|
+
b = 1, I = 2;
|
|
1940
|
+
break;
|
|
1941
|
+
case A.BarChart:
|
|
1942
|
+
case A.StackBarChart:
|
|
1943
|
+
case A.ClusteredStackBarChart:
|
|
1944
|
+
case A.LineChart:
|
|
1945
|
+
case A.StackLineChart:
|
|
1946
|
+
b = 4, I = 6;
|
|
1947
|
+
break;
|
|
1948
|
+
case A.Table:
|
|
1949
|
+
b = 4, I = 12;
|
|
1950
|
+
break;
|
|
1951
|
+
case A.Circular:
|
|
1952
|
+
b = 4, I = 4;
|
|
1953
|
+
break;
|
|
1954
|
+
case A.Spacer:
|
|
1955
|
+
b = 0, I = 12;
|
|
1956
|
+
break;
|
|
1957
|
+
}
|
|
1958
|
+
return {
|
|
1959
|
+
id: m.id,
|
|
1960
|
+
size: {
|
|
1961
|
+
height: b,
|
|
1962
|
+
width: I
|
|
1963
|
+
},
|
|
1964
|
+
widget: {
|
|
1965
|
+
...m.widget,
|
|
1966
|
+
type: u
|
|
1967
|
+
}
|
|
1968
|
+
};
|
|
1969
|
+
}, _ = F(
|
|
1970
|
+
() => je.find((u) => u.type === f.value.widget.type)
|
|
1971
|
+
), p = F(() => f.value.widget.config.joinDatasources), o = Ne((u) => {
|
|
1972
|
+
f.value.widget.title = u;
|
|
1973
|
+
}, 500);
|
|
1974
|
+
return ye(
|
|
1975
|
+
() => f.value.size.height,
|
|
1976
|
+
(u) => {
|
|
1977
|
+
u < 1 && (f.value.size.height = 1), u > 12 && (f.value.size.height = 12);
|
|
1978
|
+
}
|
|
1979
|
+
), ye(
|
|
1980
|
+
() => f.value.size.width,
|
|
1981
|
+
(u) => {
|
|
1982
|
+
u < 1 && (f.value.size.width = 1), u > 12 && (f.value.size.width = 12);
|
|
1983
|
+
}
|
|
1984
|
+
), (u, m) => {
|
|
1985
|
+
const b = T("FmCircularProgress"), I = T("FmSimpleDateRangePicker"), K = T("FmTextField"), W = T("FmTextarea"), P = T("FmStepperField"), Y = T("FmButton"), oe = T("FmForm");
|
|
1986
|
+
return v(), M(el(l(w).lg || l(w).md ? it : rt), {
|
|
1987
|
+
"model-value": S.hideConfiguration,
|
|
1988
|
+
"onUpdate:modelValue": m[9] || (m[9] = (U) => n("hideConfiguration", U))
|
|
1989
|
+
}, {
|
|
1990
|
+
default: R(() => [
|
|
1991
|
+
f.value ? (v(), M(oe, {
|
|
1992
|
+
key: 1,
|
|
1993
|
+
ref: "form",
|
|
1994
|
+
class: "px-6 py-16 flex flex-col gap-24 overflow-y-auto overflow-x-hidden"
|
|
1995
|
+
}, {
|
|
1996
|
+
default: R(() => [
|
|
1997
|
+
C("div", Vt, [
|
|
1998
|
+
(v(), M(I, {
|
|
1999
|
+
key: `date-picker-${l(k)}`,
|
|
2000
|
+
modelValue: V.value,
|
|
2001
|
+
"onUpdate:modelValue": m[0] || (m[0] = (U) => V.value = U)
|
|
2002
|
+
}, null, 8, ["modelValue"]))
|
|
2003
|
+
]),
|
|
2004
|
+
r(Re, null, {
|
|
2005
|
+
header: R(() => [
|
|
2006
|
+
C("p", Ct, X(l(y)("report.tile.widget.details")), 1),
|
|
2007
|
+
m[10] || (m[10] = C("div", { class: "grow" }, null, -1))
|
|
2008
|
+
]),
|
|
2009
|
+
content: R(() => [
|
|
2010
|
+
r(K, {
|
|
2011
|
+
"model-value": f.value.widget.title,
|
|
2012
|
+
label: l(y)("report.tile.widget.title"),
|
|
2013
|
+
placeholder: l(y)("report.tile.widget.titlePlaceholder"),
|
|
2014
|
+
"onUpdate:modelValue": l(o)
|
|
2015
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
2016
|
+
r(W, {
|
|
2017
|
+
modelValue: f.value.widget.description,
|
|
2018
|
+
"onUpdate:modelValue": m[1] || (m[1] = (U) => f.value.widget.description = U),
|
|
2019
|
+
disabled: f.value.widget.title === "",
|
|
2020
|
+
placeholder: l(y)("report.tile.widget.descriptionPlaceholder"),
|
|
2021
|
+
"helper-text": l(y)("report.tile.widget.descriptionHelper")
|
|
2022
|
+
}, {
|
|
2023
|
+
label: R(() => [
|
|
2024
|
+
C("p", xt, X(l(y)("report.tile.widget.widgetDescription")), 1),
|
|
2025
|
+
C("p", Ft, " (" + X(l(y)("report.tile.widget.optional")) + ") ", 1)
|
|
2026
|
+
]),
|
|
2027
|
+
_: 1
|
|
2028
|
+
}, 8, ["modelValue", "disabled", "placeholder", "helper-text"]),
|
|
2029
|
+
r(ft, {
|
|
2030
|
+
model: f.value.widget.config,
|
|
2031
|
+
"onUpdate:model": m[2] || (m[2] = (U) => f.value.widget.config = U)
|
|
2032
|
+
}, null, 8, ["model"]),
|
|
2033
|
+
C("div", {
|
|
2034
|
+
class: Ee(["flex flex-row", `${l(w).sm || l(w).xs ? "gap-16" : "gap-2"}`])
|
|
2035
|
+
}, [
|
|
2036
|
+
r(P, {
|
|
2037
|
+
modelValue: f.value.size.width,
|
|
2038
|
+
"onUpdate:modelValue": m[3] || (m[3] = (U) => f.value.size.width = U),
|
|
2039
|
+
label: l(y)("report.tile.widget.width"),
|
|
2040
|
+
min: 1,
|
|
2041
|
+
max: 12
|
|
2042
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2043
|
+
r(P, {
|
|
2044
|
+
modelValue: f.value.size.height,
|
|
2045
|
+
"onUpdate:modelValue": m[4] || (m[4] = (U) => f.value.size.height = U),
|
|
2046
|
+
label: l(y)("report.tile.widget.height"),
|
|
2047
|
+
min: 1,
|
|
2048
|
+
max: 12,
|
|
2049
|
+
disabled: f.value.widget.type === l(A).Scorecard
|
|
2050
|
+
}, null, 8, ["modelValue", "label", "disabled"])
|
|
2051
|
+
], 2),
|
|
2052
|
+
f.value.widget.type === l(A).Table ? (v(), M(wt, {
|
|
2053
|
+
key: 0,
|
|
2054
|
+
layout: f.value.widget.config,
|
|
2055
|
+
"onUpdate:layout": m[5] || (m[5] = (U) => f.value.widget.config = U)
|
|
2056
|
+
}, null, 8, ["layout"])) : O("", !0)
|
|
2057
|
+
]),
|
|
2058
|
+
_: 1
|
|
2059
|
+
}),
|
|
2060
|
+
r(Re, null, {
|
|
2061
|
+
header: R(() => [
|
|
2062
|
+
C("p", null, X(l(y)("report.tile.widget.type")), 1),
|
|
2063
|
+
m[11] || (m[11] = C("div", { class: "grow" }, null, -1))
|
|
2064
|
+
]),
|
|
2065
|
+
content: R(() => [
|
|
2066
|
+
r(gl, {
|
|
2067
|
+
"is-list": !0,
|
|
2068
|
+
"model-value": f.value.widget.type,
|
|
2069
|
+
class: "grid grid-cols-1 gap-2",
|
|
2070
|
+
"child-class": "flex flex-row p-[8px] gap-2",
|
|
2071
|
+
"exclude-widge-type": [l(A).Spacer],
|
|
2072
|
+
"onUpdate:modelValue": m[6] || (m[6] = (U) => f.value = N(U, f.value))
|
|
2073
|
+
}, null, 8, ["model-value", "exclude-widge-type"])
|
|
2074
|
+
]),
|
|
2075
|
+
_: 1
|
|
2076
|
+
}),
|
|
2077
|
+
r(Ke, {
|
|
2078
|
+
modelValue: f.value.widget.config,
|
|
2079
|
+
"onUpdate:modelValue": m[7] || (m[7] = (U) => f.value.widget.config = U),
|
|
2080
|
+
label: l(y)("report.tile.datasource.main"),
|
|
2081
|
+
config: _.value
|
|
2082
|
+
}, null, 8, ["modelValue", "label", "config"]),
|
|
2083
|
+
p.value ? (v(!0), z(se, { key: 0 }, be(p.value, (U, G) => (v(), z("div", { key: G }, [
|
|
2084
|
+
r(Ke, {
|
|
2085
|
+
modelValue: p.value[G],
|
|
2086
|
+
"onUpdate:modelValue": (le) => p.value[G] = le,
|
|
2087
|
+
label: l(y)("report.tile.datasource.join", { index: G + 1 }),
|
|
2088
|
+
config: _.value,
|
|
2089
|
+
"main-datasource-config": f.value.widget.config,
|
|
2090
|
+
closeable: !0,
|
|
2091
|
+
onClickClose: (le) => x(G)
|
|
2092
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "label", "config", "main-datasource-config", "onClickClose"])
|
|
2093
|
+
]))), 128)) : O("", !0),
|
|
2094
|
+
C("div", kt, [
|
|
2095
|
+
r(Y, {
|
|
2096
|
+
label: l(y)("report.tile.datasource.joinButton"),
|
|
2097
|
+
variant: "secondary",
|
|
2098
|
+
icon: "add",
|
|
2099
|
+
"icon-position": "prepend",
|
|
2100
|
+
"border-color": "primary",
|
|
2101
|
+
"text-color": "primary",
|
|
2102
|
+
class: "w-full",
|
|
2103
|
+
onClick: m[8] || (m[8] = (U) => g())
|
|
2104
|
+
}, null, 8, ["label"])
|
|
2105
|
+
])
|
|
2106
|
+
]),
|
|
2107
|
+
_: 1
|
|
2108
|
+
}, 512)) : (v(), M(b, { key: 0 }))
|
|
2109
|
+
]),
|
|
2110
|
+
_: 1
|
|
2111
|
+
}, 8, ["model-value"]);
|
|
2112
|
+
};
|
|
2113
|
+
}
|
|
2114
|
+
}), St = { class: "flex flex-col gap-8" }, _t = { class: "pl-32 flex flex-col gap-8" }, Tt = { class: "fm-typo-en-body-lg-600" }, $t = { class: "flex flex-row gap-8" }, Dt = { class: "fm-typo-en-body-lg-600" }, Ut = { class: "flex flex-row gap-8" }, Bt = /* @__PURE__ */ ae({
|
|
2115
|
+
__name: "LabelSection",
|
|
2116
|
+
props: {
|
|
2117
|
+
model: {}
|
|
2118
|
+
},
|
|
2119
|
+
emits: ["update:model"],
|
|
2120
|
+
setup($, { emit: d }) {
|
|
2121
|
+
const e = $, s = d, { t: a } = ie(), h = F({
|
|
2122
|
+
get: () => e.model.showLabel ?? !1,
|
|
2123
|
+
set: (k) => {
|
|
2124
|
+
s("update:model", { ...e.model, showLabel: k });
|
|
2125
|
+
}
|
|
2126
|
+
}), V = F({
|
|
2127
|
+
get: () => e.model.labelRotation ?? 0,
|
|
2128
|
+
set: (k) => s("update:model", { ...e.model, labelRotation: k })
|
|
2129
|
+
}), f = F({
|
|
2130
|
+
get: () => e.model.labelOffset ?? 0,
|
|
2131
|
+
set: (k) => s("update:model", { ...e.model, labelOffset: k })
|
|
2132
|
+
}), w = F({
|
|
2133
|
+
get: () => e.model.labelFontSize ?? 12,
|
|
2134
|
+
set: (k) => s("update:model", { ...e.model, labelFontSize: k })
|
|
2135
|
+
}), S = (k) => {
|
|
2136
|
+
s("update:model", {
|
|
2137
|
+
...e.model,
|
|
2138
|
+
labelAlign: e.model.labelAlign === k ? void 0 : k
|
|
2139
|
+
});
|
|
2140
|
+
}, t = (k) => {
|
|
2141
|
+
s("update:model", {
|
|
2142
|
+
...e.model,
|
|
2143
|
+
labelAnchor: e.model.labelAnchor === k ? void 0 : k
|
|
2144
|
+
});
|
|
2145
|
+
}, n = [
|
|
2146
|
+
{ icon: "align_horizontal_left", value: he.left, tooltip: "alignLeft" },
|
|
2147
|
+
{ icon: "align_justify_center", value: he.center, tooltip: "alignCenter" },
|
|
2148
|
+
{ icon: "align_horizontal_right", value: he.right, tooltip: "alignRight" },
|
|
2149
|
+
{ icon: "align_justify_flex_start", value: he.start, tooltip: "alignStart" },
|
|
2150
|
+
{ icon: "align_justify_flex_end", value: he.end, tooltip: "alignEnd" },
|
|
2151
|
+
{ icon: "align_flex_start", value: he.top, tooltip: "alignTop" },
|
|
2152
|
+
{ icon: "align_flex_end", value: he.bottom, tooltip: "alignBottom" }
|
|
2153
|
+
], y = [
|
|
2154
|
+
{ icon: "format_align_left", value: Le.start, tooltip: "anchorStart" },
|
|
2155
|
+
{ icon: "format_align_center", value: Le.center, tooltip: "anchorCenter" },
|
|
2156
|
+
{ icon: "format_align_right", value: Le.end, tooltip: "anchorEnd" }
|
|
2157
|
+
];
|
|
2158
|
+
return (k, D) => {
|
|
2159
|
+
const g = T("FmCheckbox"), x = T("FmButton"), N = T("FmTooltip"), _ = T("FmTextField"), p = T("FmStepperField");
|
|
2160
|
+
return v(), z("div", St, [
|
|
2161
|
+
r(g, {
|
|
2162
|
+
modelValue: h.value,
|
|
2163
|
+
"onUpdate:modelValue": D[0] || (D[0] = (o) => h.value = o),
|
|
2164
|
+
value: !1,
|
|
2165
|
+
label: l(a)("report.section.datasource.label.showLabel"),
|
|
2166
|
+
"label-placement": "right",
|
|
2167
|
+
class: "fm-typo-en-body-lg-400"
|
|
2168
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2169
|
+
we(C("div", _t, [
|
|
2170
|
+
C("p", Tt, X(l(a)("report.section.datasource.alignment.textAlignment")), 1),
|
|
2171
|
+
C("div", $t, [
|
|
2172
|
+
(v(), z(se, null, be(n, ({ icon: o, value: i, tooltip: c }) => r(N, {
|
|
2173
|
+
key: i,
|
|
2174
|
+
variant: "plain",
|
|
2175
|
+
placement: "top",
|
|
2176
|
+
content: l(a)(`report.section.datasource.alignment.alignOptions.${c}`),
|
|
2177
|
+
"z-index": 50
|
|
2178
|
+
}, {
|
|
2179
|
+
default: R(() => [
|
|
2180
|
+
r(x, {
|
|
2181
|
+
"append-icon": o,
|
|
2182
|
+
variant: "tertiary",
|
|
2183
|
+
"icon-color": k.model.labelAlign === i ? "neutral-gray-400" : "neutral-gray-300",
|
|
2184
|
+
"bg-color": k.model.labelAlign === i ? "neutral-gray-100" : "neutral-white",
|
|
2185
|
+
class: "rounded-sm",
|
|
2186
|
+
onClick: (u) => S(i)
|
|
2187
|
+
}, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
|
|
2188
|
+
]),
|
|
2189
|
+
_: 2
|
|
2190
|
+
}, 1032, ["content"])), 64))
|
|
2191
|
+
]),
|
|
2192
|
+
C("p", Dt, X(l(a)("report.section.datasource.alignment.anchor")), 1),
|
|
2193
|
+
C("div", Ut, [
|
|
2194
|
+
(v(), z(se, null, be(y, ({ icon: o, value: i, tooltip: c }) => r(N, {
|
|
2195
|
+
key: i,
|
|
2196
|
+
variant: "plain",
|
|
2197
|
+
placement: "top",
|
|
2198
|
+
content: l(a)(`report.section.datasource.alignment.anchorOptions.${c}`),
|
|
2199
|
+
"z-index": 50
|
|
2200
|
+
}, {
|
|
2201
|
+
default: R(() => [
|
|
2202
|
+
r(x, {
|
|
2203
|
+
"append-icon": o,
|
|
2204
|
+
variant: "tertiary",
|
|
2205
|
+
"icon-color": k.model.labelAnchor === i ? "neutral-gray-400" : "neutral-gray-300",
|
|
2206
|
+
"bg-color": k.model.labelAnchor === i ? "neutral-gray-100" : "neutral-white",
|
|
2207
|
+
class: "rounded-sm",
|
|
2208
|
+
onClick: (u) => t(i)
|
|
2209
|
+
}, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
|
|
2210
|
+
]),
|
|
2211
|
+
_: 2
|
|
2212
|
+
}, 1032, ["content"])), 64))
|
|
2213
|
+
]),
|
|
2214
|
+
r(_, {
|
|
2215
|
+
modelValue: V.value,
|
|
2216
|
+
"onUpdate:modelValue": D[1] || (D[1] = (o) => V.value = o),
|
|
2217
|
+
label: l(a)("report.section.datasource.alignment.rotation"),
|
|
2218
|
+
type: "number",
|
|
2219
|
+
min: -180,
|
|
2220
|
+
max: 180,
|
|
2221
|
+
step: 1
|
|
2222
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2223
|
+
r(_, {
|
|
2224
|
+
modelValue: f.value,
|
|
2225
|
+
"onUpdate:modelValue": D[2] || (D[2] = (o) => f.value = o),
|
|
2226
|
+
label: l(a)("report.section.datasource.alignment.offset"),
|
|
2227
|
+
type: "number"
|
|
2228
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2229
|
+
r(p, {
|
|
2230
|
+
modelValue: w.value,
|
|
2231
|
+
"onUpdate:modelValue": D[3] || (D[3] = (o) => w.value = o),
|
|
2232
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2233
|
+
type: "number",
|
|
2234
|
+
min: 1
|
|
2235
|
+
}, null, 8, ["modelValue", "label"])
|
|
2236
|
+
], 512), [
|
|
2237
|
+
[Ve, h.value]
|
|
2238
|
+
])
|
|
2239
|
+
]);
|
|
2240
|
+
};
|
|
2241
|
+
}
|
|
2242
|
+
}), Lt = { class: "flex flex-col gap-8" }, Mt = { class: "pl-32 flex flex-col gap-8" }, Nt = { class: "pl-32 flex flex-col gap-8" }, Ot = { class: "pl-32 flex flex-col gap-8" }, It = { class: "pl-32 flex flex-col gap-8" }, jt = { class: "pl-32 flex flex-col gap-8" }, zt = { class: "pl-32 flex flex-col gap-8" }, At = /* @__PURE__ */ ae({
|
|
2243
|
+
__name: "XySection",
|
|
2244
|
+
props: {
|
|
2245
|
+
model: {}
|
|
2246
|
+
},
|
|
2247
|
+
emits: ["update:model"],
|
|
2248
|
+
setup($, { emit: d }) {
|
|
2249
|
+
const e = $, s = d, { t: a } = ie(), h = F({
|
|
2250
|
+
get: () => e.model.showX ?? !0,
|
|
2251
|
+
set: (g) => {
|
|
2252
|
+
s("update:model", { ...e.model, showX: g });
|
|
2253
|
+
}
|
|
2254
|
+
}), V = F({
|
|
2255
|
+
get: () => e.model.showXGrid ?? !1,
|
|
2256
|
+
set: (g) => {
|
|
2257
|
+
s("update:model", { ...e.model, showXGrid: g });
|
|
2258
|
+
}
|
|
2259
|
+
}), f = F({
|
|
2260
|
+
get: () => e.model.showXTick ?? !0,
|
|
2261
|
+
set: (g) => {
|
|
2262
|
+
s("update:model", { ...e.model, showXTick: g });
|
|
2263
|
+
}
|
|
2264
|
+
}), w = F({
|
|
2265
|
+
get: () => e.model.showY ?? !0,
|
|
2266
|
+
set: (g) => {
|
|
2267
|
+
s("update:model", { ...e.model, showY: g });
|
|
2268
|
+
}
|
|
2269
|
+
}), S = F({
|
|
2270
|
+
get: () => e.model.showYGrid ?? !0,
|
|
2271
|
+
set: (g) => {
|
|
2272
|
+
s("update:model", { ...e.model, showYGrid: g });
|
|
2273
|
+
}
|
|
2274
|
+
}), t = F({
|
|
2275
|
+
get: () => e.model.showYTick ?? !0,
|
|
2276
|
+
set: (g) => {
|
|
2277
|
+
s("update:model", { ...e.model, showYTick: g });
|
|
2278
|
+
}
|
|
2279
|
+
}), n = F({
|
|
2280
|
+
get: () => e.model.showXTitle ?? !1,
|
|
2281
|
+
set: (g) => {
|
|
2282
|
+
s("update:model", { ...e.model, showXTitle: g });
|
|
2283
|
+
}
|
|
2284
|
+
}), y = F({
|
|
2285
|
+
get: () => e.model.showYTitle ?? !1,
|
|
2286
|
+
set: (g) => {
|
|
2287
|
+
s("update:model", { ...e.model, showYTitle: g });
|
|
2288
|
+
}
|
|
2289
|
+
}), k = Ne((g) => {
|
|
2290
|
+
s("update:model", { ...e.model, xTitle: g });
|
|
2291
|
+
}, 500), D = Ne((g) => {
|
|
2292
|
+
s("update:model", { ...e.model, yTitle: g });
|
|
2293
|
+
}, 500);
|
|
2294
|
+
return We(() => {
|
|
2295
|
+
var g, x, N, _;
|
|
2296
|
+
!e.model.xTitle && ((x = (g = e.model.metrics) == null ? void 0 : g[0]) != null && x.label) && k(e.model.metrics[0].label), !e.model.yTitle && ((_ = (N = e.model.dimensions) == null ? void 0 : N[0]) != null && _.label) && D(e.model.dimensions[0].label);
|
|
2297
|
+
}), (g, x) => {
|
|
2298
|
+
const N = T("FmCheckbox"), _ = T("FmStepperField"), p = T("FmTextField");
|
|
2299
|
+
return v(), z("div", Lt, [
|
|
2300
|
+
r(N, {
|
|
2301
|
+
modelValue: h.value,
|
|
2302
|
+
"onUpdate:modelValue": x[0] || (x[0] = (o) => h.value = o),
|
|
2303
|
+
label: l(a)("report.section.datasource.axis.showX"),
|
|
2304
|
+
"label-placement": "right",
|
|
2305
|
+
value: !0
|
|
2306
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2307
|
+
we(C("div", Mt, [
|
|
2308
|
+
r(N, {
|
|
2309
|
+
modelValue: V.value,
|
|
2310
|
+
"onUpdate:modelValue": x[1] || (x[1] = (o) => V.value = o),
|
|
2311
|
+
label: l(a)("report.section.datasource.axis.showGrid"),
|
|
2312
|
+
"label-placement": "right",
|
|
2313
|
+
value: !1
|
|
2314
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2315
|
+
r(N, {
|
|
2316
|
+
modelValue: f.value,
|
|
2317
|
+
"onUpdate:modelValue": x[2] || (x[2] = (o) => f.value = o),
|
|
2318
|
+
label: l(a)("report.section.datasource.axis.showTick"),
|
|
2319
|
+
"label-placement": "right",
|
|
2320
|
+
value: !0
|
|
2321
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2322
|
+
we(C("div", Nt, [
|
|
2323
|
+
r(_, {
|
|
2324
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2325
|
+
type: "number",
|
|
2326
|
+
"model-value": g.model.xTickFontSize ?? 12,
|
|
2327
|
+
min: 1,
|
|
2328
|
+
"onUpdate:modelValue": x[3] || (x[3] = (o) => {
|
|
2329
|
+
s("update:model", { ...g.model, xTickFontSize: Number(o) });
|
|
2330
|
+
})
|
|
2331
|
+
}, null, 8, ["label", "model-value"])
|
|
2332
|
+
], 512), [
|
|
2333
|
+
[Ve, g.model.showXTick ?? !0]
|
|
2334
|
+
]),
|
|
2335
|
+
r(N, {
|
|
2336
|
+
modelValue: n.value,
|
|
2337
|
+
"onUpdate:modelValue": x[4] || (x[4] = (o) => n.value = o),
|
|
2338
|
+
label: l(a)("report.section.datasource.axis.showTitle"),
|
|
2339
|
+
"label-placement": "right",
|
|
2340
|
+
value: !0
|
|
2341
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2342
|
+
we(C("div", Ot, [
|
|
2343
|
+
r(p, {
|
|
2344
|
+
"model-value": g.model.xTitle,
|
|
2345
|
+
label: l(a)("report.common.title"),
|
|
2346
|
+
placeholder: l(a)("report.tile.widget.titlePlaceholder"),
|
|
2347
|
+
"onUpdate:modelValue": l(k)
|
|
2348
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
2349
|
+
r(_, {
|
|
2350
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2351
|
+
type: "number",
|
|
2352
|
+
"model-value": g.model.xTitleFontSize ?? 12,
|
|
2353
|
+
min: 1,
|
|
2354
|
+
"onUpdate:modelValue": x[5] || (x[5] = (o) => {
|
|
2355
|
+
s("update:model", { ...g.model, xTitleFontSize: Number(o) });
|
|
2356
|
+
})
|
|
2357
|
+
}, null, 8, ["label", "model-value"])
|
|
2358
|
+
], 512), [
|
|
2359
|
+
[Ve, n.value]
|
|
2360
|
+
])
|
|
2361
|
+
], 512), [
|
|
2362
|
+
[Ve, g.model.showX ?? !0]
|
|
2363
|
+
]),
|
|
2364
|
+
r(N, {
|
|
2365
|
+
modelValue: w.value,
|
|
2366
|
+
"onUpdate:modelValue": x[6] || (x[6] = (o) => w.value = o),
|
|
2367
|
+
label: l(a)("report.section.datasource.axis.showY"),
|
|
2368
|
+
"label-placement": "right",
|
|
2369
|
+
value: !0
|
|
2370
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2371
|
+
we(C("div", It, [
|
|
2372
|
+
r(N, {
|
|
2373
|
+
modelValue: S.value,
|
|
2374
|
+
"onUpdate:modelValue": x[7] || (x[7] = (o) => S.value = o),
|
|
2375
|
+
label: l(a)("report.section.datasource.axis.showGrid"),
|
|
2376
|
+
"label-placement": "right",
|
|
2377
|
+
value: !1
|
|
2378
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2379
|
+
r(N, {
|
|
2380
|
+
modelValue: t.value,
|
|
2381
|
+
"onUpdate:modelValue": x[8] || (x[8] = (o) => t.value = o),
|
|
2382
|
+
label: l(a)("report.section.datasource.axis.showTick"),
|
|
2383
|
+
"label-placement": "right",
|
|
2384
|
+
value: !0
|
|
2385
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2386
|
+
we(C("div", jt, [
|
|
2387
|
+
r(_, {
|
|
2388
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2389
|
+
type: "number",
|
|
2390
|
+
"model-value": g.model.yTickFontSize ?? 12,
|
|
2391
|
+
min: 1,
|
|
2392
|
+
"onUpdate:modelValue": x[9] || (x[9] = (o) => {
|
|
2393
|
+
s("update:model", { ...g.model, yTickFontSize: Number(o) });
|
|
2394
|
+
})
|
|
2395
|
+
}, null, 8, ["label", "model-value"])
|
|
2396
|
+
], 512), [
|
|
2397
|
+
[Ve, g.model.showYTick ?? !0]
|
|
2398
|
+
]),
|
|
2399
|
+
r(N, {
|
|
2400
|
+
modelValue: y.value,
|
|
2401
|
+
"onUpdate:modelValue": x[10] || (x[10] = (o) => y.value = o),
|
|
2402
|
+
label: l(a)("report.section.datasource.axis.showTitle"),
|
|
2403
|
+
"label-placement": "right",
|
|
2404
|
+
value: !0
|
|
2405
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2406
|
+
we(C("div", zt, [
|
|
2407
|
+
r(p, {
|
|
2408
|
+
"model-value": g.model.yTitle,
|
|
2409
|
+
label: l(a)("report.common.title"),
|
|
2410
|
+
placeholder: l(a)("report.tile.widget.titlePlaceholder"),
|
|
2411
|
+
"onUpdate:modelValue": l(D)
|
|
2412
|
+
}, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
|
|
2413
|
+
r(_, {
|
|
2414
|
+
label: l(a)("report.section.datasource.fontSize"),
|
|
2415
|
+
type: "number",
|
|
2416
|
+
"model-value": g.model.yTitleFontSize ?? 12,
|
|
2417
|
+
min: 1,
|
|
2418
|
+
"onUpdate:modelValue": x[11] || (x[11] = (o) => {
|
|
2419
|
+
s("update:model", { ...g.model, yTitleFontSize: Number(o) });
|
|
2420
|
+
})
|
|
2421
|
+
}, null, 8, ["label", "model-value"])
|
|
2422
|
+
], 512), [
|
|
2423
|
+
[Ve, y.value]
|
|
2424
|
+
])
|
|
2425
|
+
], 512), [
|
|
2426
|
+
[Ve, g.model.showY ?? !0]
|
|
2427
|
+
])
|
|
2428
|
+
]);
|
|
2429
|
+
};
|
|
2430
|
+
}
|
|
2431
|
+
}), Rt = { class: "flex flex-col gap-8" }, Pt = { class: "pl-32 flex flex-col gap-8" }, Xt = /* @__PURE__ */ ae({
|
|
2432
|
+
__name: "LegendSection",
|
|
2433
|
+
props: {
|
|
2434
|
+
model: {},
|
|
2435
|
+
isCircularWidget: { type: Boolean }
|
|
2436
|
+
},
|
|
2437
|
+
emits: ["update:model"],
|
|
2438
|
+
setup($, { emit: d }) {
|
|
2439
|
+
const e = $, s = d, { t: a } = ie(), h = [
|
|
2440
|
+
{ label: a("report.section.datasource.position.top"), value: "top" },
|
|
2441
|
+
{ label: a("report.section.datasource.position.bottom"), value: "bottom" },
|
|
2442
|
+
{ label: a("report.section.datasource.position.left"), value: "left" },
|
|
2443
|
+
{ label: a("report.section.datasource.position.right"), value: "right" }
|
|
2444
|
+
], V = F({
|
|
2445
|
+
get: () => e.model.showLegend !== void 0 ? e.model.showLegend : e.isCircularWidget === !0,
|
|
2446
|
+
set: (t) => {
|
|
2447
|
+
s("update:model", { ...e.model, showLegend: t });
|
|
2448
|
+
}
|
|
2449
|
+
}), f = F({
|
|
2450
|
+
get: () => e.model.usePointStyle ?? !0,
|
|
2451
|
+
set: (t) => {
|
|
2452
|
+
s("update:model", { ...e.model, usePointStyle: t });
|
|
2453
|
+
}
|
|
2454
|
+
}), w = F({
|
|
2455
|
+
get: () => e.model.legendMaxHeight ?? 54,
|
|
2456
|
+
set: (t) => {
|
|
2457
|
+
s("update:model", { ...e.model, legendMaxHeight: t });
|
|
2458
|
+
}
|
|
2459
|
+
}), S = F({
|
|
2460
|
+
get: () => e.model.legendMaxWidth ?? 54,
|
|
2461
|
+
set: (t) => {
|
|
2462
|
+
s("update:model", { ...e.model, legendMaxWidth: t });
|
|
2463
|
+
}
|
|
2464
|
+
});
|
|
2465
|
+
return (t, n) => {
|
|
2466
|
+
const y = T("FmCheckbox"), k = T("FmSelect"), D = T("FmStepperField");
|
|
2467
|
+
return v(), z("div", Rt, [
|
|
2468
|
+
r(y, {
|
|
2469
|
+
modelValue: V.value,
|
|
2470
|
+
"onUpdate:modelValue": n[0] || (n[0] = (g) => V.value = g),
|
|
2471
|
+
class: "fm-typo-en-body-lg-400",
|
|
2472
|
+
value: !1,
|
|
2473
|
+
label: l(a)("report.section.datasource.legend.showLegend")
|
|
2474
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2475
|
+
we(C("div", Pt, [
|
|
2476
|
+
r(k, {
|
|
2477
|
+
label: l(a)("report.section.datasource.position.showPosition"),
|
|
2478
|
+
items: h,
|
|
2479
|
+
"model-value": t.model.legendPosition ?? "top",
|
|
2480
|
+
"onUpdate:modelValue": n[1] || (n[1] = (g) => s("update:model", { ...t.model, legendPosition: g }))
|
|
2481
|
+
}, null, 8, ["label", "model-value"]),
|
|
2482
|
+
r(y, {
|
|
2483
|
+
modelValue: f.value,
|
|
2484
|
+
"onUpdate:modelValue": n[2] || (n[2] = (g) => f.value = g),
|
|
2485
|
+
label: l(a)("report.section.datasource.legend.usePointStyle"),
|
|
2486
|
+
value: !1
|
|
2487
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2488
|
+
t.model.legendPosition === "top" || t.model.legendPosition === "bottom" || !t.model.legendPosition ? (v(), M(D, {
|
|
2489
|
+
key: 0,
|
|
2490
|
+
label: l(a)("report.section.datasource.legend.maxHeight"),
|
|
2491
|
+
"model-value": w.value,
|
|
2492
|
+
"onUpdate:modelValue": n[3] || (n[3] = (g) => s("update:model", { ...t.model, legendMaxHeight: g }))
|
|
2493
|
+
}, null, 8, ["label", "model-value"])) : O("", !0),
|
|
2494
|
+
t.model.legendPosition === "left" || t.model.legendPosition === "right" ? (v(), M(D, {
|
|
2495
|
+
key: 1,
|
|
2496
|
+
label: l(a)("report.section.datasource.legend.maxWidth"),
|
|
2497
|
+
"model-value": S.value,
|
|
2498
|
+
"onUpdate:modelValue": n[4] || (n[4] = (g) => s("update:model", { ...t.model, legendMaxWidth: g }))
|
|
2499
|
+
}, null, 8, ["label", "model-value"])) : O("", !0)
|
|
2500
|
+
], 512), [
|
|
2501
|
+
[Ve, V.value]
|
|
2502
|
+
])
|
|
2503
|
+
]);
|
|
2504
|
+
};
|
|
2505
|
+
}
|
|
2506
|
+
}), Wt = { class: "flex flex-row gap-16" }, Et = /* @__PURE__ */ ae({
|
|
2507
|
+
__name: "ChartSizeSection",
|
|
2508
|
+
props: {
|
|
2509
|
+
model: {}
|
|
2510
|
+
},
|
|
2511
|
+
emits: ["update:model"],
|
|
2512
|
+
setup($, { emit: d }) {
|
|
2513
|
+
const e = $, s = d, { t: a } = ie(), h = F({
|
|
2514
|
+
get: () => e.model.chartHeight ?? null,
|
|
2515
|
+
set: (f) => {
|
|
2516
|
+
s("update:model", { ...e.model, chartHeight: f ?? void 0 });
|
|
2517
|
+
}
|
|
2518
|
+
}), V = F({
|
|
2519
|
+
get: () => e.model.chartWidth ?? null,
|
|
2520
|
+
set: (f) => {
|
|
2521
|
+
s("update:model", { ...e.model, chartWidth: f ?? void 0 });
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
return (f, w) => {
|
|
2525
|
+
const S = T("FmStepperField");
|
|
2526
|
+
return v(), z("div", Wt, [
|
|
2527
|
+
r(S, {
|
|
2528
|
+
modelValue: h.value,
|
|
2529
|
+
"onUpdate:modelValue": w[0] || (w[0] = (t) => h.value = t),
|
|
2530
|
+
type: "number",
|
|
2531
|
+
label: l(a)("report.section.datasource.chartHeight"),
|
|
2532
|
+
suffix: "px",
|
|
2533
|
+
min: 1,
|
|
2534
|
+
placeholder: "Auto"
|
|
2535
|
+
}, null, 8, ["modelValue", "label"]),
|
|
2536
|
+
r(S, {
|
|
2537
|
+
modelValue: V.value,
|
|
2538
|
+
"onUpdate:modelValue": w[1] || (w[1] = (t) => V.value = t),
|
|
2539
|
+
type: "number",
|
|
2540
|
+
label: l(a)("report.section.datasource.chartWidth"),
|
|
2541
|
+
suffix: "px",
|
|
2542
|
+
min: 1,
|
|
2543
|
+
placeholder: "Auto"
|
|
2544
|
+
}, null, 8, ["modelValue", "label"])
|
|
2545
|
+
]);
|
|
2546
|
+
};
|
|
2547
|
+
}
|
|
2548
|
+
}), Ht = { class: "flex flex-col gap-8" }, qt = { class: "flex items-center justify-between" }, Yt = { class: "fm-typo-en-body-lg-600" }, Jt = { class: "flex items-center gap-8 text-fm-color-system-info-300" }, Gt = {
|
|
2549
|
+
key: 1,
|
|
2550
|
+
class: "grid grid-cols-2 gap-8"
|
|
2551
|
+
}, Kt = { class: "fm-typo-en-body-lg-600" }, Qt = { class: "flex items-center gap-8" }, Zt = ["value", "onInput"], eo = {
|
|
2552
|
+
key: 2,
|
|
2553
|
+
class: "fm-shadow-light-100 rounded-md border border-fm-color-neutral-gray-100"
|
|
2554
|
+
}, lo = { class: "fm-typo-en-body-lg-600" }, to = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, oo = ["value", "disabled", "onInput"], ao = /* @__PURE__ */ ae({
|
|
2555
|
+
__name: "ChartColorSection",
|
|
2556
|
+
props: {
|
|
2557
|
+
model: {},
|
|
2558
|
+
showLayerControl: { type: Boolean }
|
|
2559
|
+
},
|
|
2560
|
+
emits: ["update:model"],
|
|
2561
|
+
setup($, { emit: d }) {
|
|
2562
|
+
const e = $, s = d, { t: a } = ie(), h = F(() => [
|
|
2563
|
+
{
|
|
2564
|
+
label: a("report.section.datasource.styleTarget.series"),
|
|
2565
|
+
value: te.series
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
label: a("report.section.datasource.styleTarget.metric"),
|
|
2569
|
+
value: te.metric
|
|
2570
|
+
},
|
|
2571
|
+
...n.value.length > 0 ? [
|
|
2572
|
+
{
|
|
2573
|
+
label: a("report.section.datasource.styleTarget.breakdown"),
|
|
2574
|
+
value: te.breakdown
|
|
2575
|
+
}
|
|
2576
|
+
] : []
|
|
2577
|
+
]);
|
|
2578
|
+
function V(B) {
|
|
2579
|
+
return B === te.breakdown ? te.breakdown : B === te.metric ? te.metric : te.series;
|
|
2580
|
+
}
|
|
2581
|
+
function f() {
|
|
2582
|
+
const B = Array.isArray(e.model.metrics) ? e.model.metrics : [];
|
|
2583
|
+
if (!e.model.isBlend)
|
|
2584
|
+
return B;
|
|
2585
|
+
const L = Array.isArray(e.model.joinDatasources) ? e.model.joinDatasources.flatMap(
|
|
2586
|
+
(j) => Array.isArray(j == null ? void 0 : j.metrics) ? j.metrics : []
|
|
2587
|
+
) : [];
|
|
2588
|
+
return [...B, ...L];
|
|
2589
|
+
}
|
|
2590
|
+
function w(B, L) {
|
|
2591
|
+
var H, J;
|
|
2592
|
+
return B ? ((H = B.label) == null ? void 0 : H.trim()) || ((J = B.name) == null ? void 0 : J.trim()) || `${a("report.section.datasource.styleTarget.metric")} ${L + 1}` : `${a("report.section.datasource.styleTarget.metric")} ${L + 1}`;
|
|
2593
|
+
}
|
|
2594
|
+
function S(B) {
|
|
2595
|
+
if (B === te.breakdown)
|
|
2596
|
+
return [];
|
|
2597
|
+
if (B === te.metric) {
|
|
2598
|
+
const L = f();
|
|
2599
|
+
if (L.length > 0)
|
|
2600
|
+
return L.map((j, H) => w(j, H));
|
|
2601
|
+
}
|
|
2602
|
+
return ce.map(
|
|
2603
|
+
(L, j) => `${a("report.section.datasource.chartColor.series")} ${j + 1}`
|
|
2604
|
+
);
|
|
2605
|
+
}
|
|
2606
|
+
const t = F(() => {
|
|
2607
|
+
const B = f();
|
|
2608
|
+
return B.length === 0 ? [a("report.section.datasource.styleTarget.metric")] : B.map((L, j) => w(L, j));
|
|
2609
|
+
}), n = F(
|
|
2610
|
+
() => Array.isArray(e.model.chartBreakdownDimensionValues) ? e.model.chartBreakdownDimensionValues.filter((B) => !!B) : []
|
|
2611
|
+
);
|
|
2612
|
+
function y(B, L) {
|
|
2613
|
+
const j = N(B) ?? "#000000", H = (J) => {
|
|
2614
|
+
const q = Number.parseInt(j.slice(J, J + 2), 16);
|
|
2615
|
+
return Math.round(q + (255 - q) * L).toString(16).padStart(2, "0").toUpperCase();
|
|
2616
|
+
};
|
|
2617
|
+
return `#${H(1)}${H(3)}${H(5)}`;
|
|
2618
|
+
}
|
|
2619
|
+
function k(B) {
|
|
2620
|
+
return Math.min(0.55 + (B - 1) * 0.18, 0.95);
|
|
2621
|
+
}
|
|
2622
|
+
function D(B, L, j) {
|
|
2623
|
+
return B * j + L;
|
|
2624
|
+
}
|
|
2625
|
+
function g(B, L, j, H) {
|
|
2626
|
+
const J = L.length;
|
|
2627
|
+
return B.length === 0 || J <= 0 ? [] : B.flatMap((q, Z) => {
|
|
2628
|
+
const fe = ce[Z % ce.length], ve = j == null ? void 0 : j[D(Z, 0, J)], Fe = N(ve) ?? fe;
|
|
2629
|
+
return L.map((Oo, Ue) => {
|
|
2630
|
+
const rl = D(Z, Ue, J), He = Ue === 0 ? Fe : y(Fe, k(Ue));
|
|
2631
|
+
return H && Ue > 0 ? He : N(j == null ? void 0 : j[rl]) ?? He;
|
|
2632
|
+
});
|
|
2633
|
+
});
|
|
2634
|
+
}
|
|
2635
|
+
const x = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
|
2636
|
+
function N(B) {
|
|
2637
|
+
if (!B)
|
|
2638
|
+
return null;
|
|
2639
|
+
const L = B.trim();
|
|
2640
|
+
if (!x.test(L))
|
|
2641
|
+
return null;
|
|
2642
|
+
if (L.length === 4) {
|
|
2643
|
+
const j = L.charAt(1), H = L.charAt(2), J = L.charAt(3);
|
|
2644
|
+
return `#${j}${j}${H}${H}${J}${J}`.toUpperCase();
|
|
2645
|
+
}
|
|
2646
|
+
return L.toUpperCase();
|
|
2647
|
+
}
|
|
2648
|
+
function _(B, L) {
|
|
2649
|
+
return !Array.isArray(B) || B.length === 0 ? Array.from({ length: L }).map(
|
|
2650
|
+
(j, H) => ce[H % ce.length]
|
|
2651
|
+
) : Array.from({ length: L }).map((j, H) => {
|
|
2652
|
+
const J = ce[H % ce.length];
|
|
2653
|
+
return N(B[H]) ?? J;
|
|
2654
|
+
});
|
|
2655
|
+
}
|
|
2656
|
+
function p(B, L) {
|
|
2657
|
+
if (L <= 0)
|
|
2658
|
+
return [];
|
|
2659
|
+
const j = Array.from({ length: L }, () => 0), H = /* @__PURE__ */ new Set();
|
|
2660
|
+
for (let q = 0; q < L; q++) {
|
|
2661
|
+
const Z = Number(B == null ? void 0 : B[q]);
|
|
2662
|
+
Number.isInteger(Z) && Z >= 1 && Z <= L && !H.has(Z) && (j[q] = Z, H.add(Z));
|
|
2663
|
+
}
|
|
2664
|
+
let J = 1;
|
|
2665
|
+
for (let q = 0; q < L; q++)
|
|
2666
|
+
if (j[q] === 0) {
|
|
2667
|
+
for (; H.has(J) && J <= L; )
|
|
2668
|
+
J++;
|
|
2669
|
+
j[q] = Math.min(J, L), H.add(j[q]);
|
|
2670
|
+
}
|
|
2671
|
+
return j;
|
|
2672
|
+
}
|
|
2673
|
+
const o = F(
|
|
2674
|
+
() => V(e.model.chartColorBinding)
|
|
2675
|
+
), i = F(() => S(U.value)), c = F(
|
|
2676
|
+
() => Array.from({ length: i.value.length }).map((B, L) => ({
|
|
2677
|
+
label: `L${L + 1}`,
|
|
2678
|
+
value: L + 1
|
|
2679
|
+
}))
|
|
2680
|
+
), u = F(() => typeof e.showLayerControl == "boolean" ? e.showLayerControl : !!e.model.stackBarOverlap), m = F(
|
|
2681
|
+
() => _(e.model.chartColors, S(o.value).length)
|
|
2682
|
+
), b = F(
|
|
2683
|
+
() => p(
|
|
2684
|
+
e.model.chartColorLayers,
|
|
2685
|
+
S(o.value).length
|
|
2686
|
+
)
|
|
2687
|
+
), I = F(() => e.model.chartUseSecondaryMetricShades !== !1), K = F(
|
|
2688
|
+
() => g(
|
|
2689
|
+
n.value,
|
|
2690
|
+
t.value,
|
|
2691
|
+
e.model.chartBreakdownColors,
|
|
2692
|
+
I.value
|
|
2693
|
+
)
|
|
2694
|
+
), W = ee([]), P = ee([]), Y = ee([]), oe = ee(!0), U = ee(te.series);
|
|
2695
|
+
ye(
|
|
2696
|
+
[
|
|
2697
|
+
() => e.model.chartColors,
|
|
2698
|
+
() => e.model.chartColorBinding,
|
|
2699
|
+
() => e.model.chartBreakdownColors,
|
|
2700
|
+
() => e.model.chartBreakdownDimensionValues,
|
|
2701
|
+
() => e.model.chartUseSecondaryMetricShades,
|
|
2702
|
+
() => e.model.metrics,
|
|
2703
|
+
() => e.model.isBlend,
|
|
2704
|
+
() => e.model.joinDatasources
|
|
2705
|
+
],
|
|
2706
|
+
([B, L]) => {
|
|
2707
|
+
U.value = V(L);
|
|
2708
|
+
const j = S(U.value).length;
|
|
2709
|
+
W.value = _(
|
|
2710
|
+
B,
|
|
2711
|
+
j
|
|
2712
|
+
), P.value = p(e.model.chartColorLayers, j), oe.value = e.model.chartUseSecondaryMetricShades !== !1, Y.value = g(
|
|
2713
|
+
n.value,
|
|
2714
|
+
t.value,
|
|
2715
|
+
e.model.chartBreakdownColors,
|
|
2716
|
+
oe.value
|
|
2717
|
+
);
|
|
2718
|
+
},
|
|
2719
|
+
{ immediate: !0, deep: !0 }
|
|
2720
|
+
);
|
|
2721
|
+
const G = F(() => U.value !== o.value || W.value.length !== m.value.length || P.value.length !== b.value.length || P.value.some((B, L) => B !== b.value[L]) || oe.value !== I.value || Y.value.length !== K.value.length || Y.value.some((B, L) => B !== K.value[L]) ? !0 : W.value.some((B, L) => B !== m.value[L]));
|
|
2722
|
+
function le(B, L) {
|
|
2723
|
+
const j = [...W.value], H = ce[B % ce.length];
|
|
2724
|
+
j[B] = N(L) ?? H, W.value = j;
|
|
2725
|
+
}
|
|
2726
|
+
function pe(B) {
|
|
2727
|
+
const L = V(B);
|
|
2728
|
+
if (L === U.value)
|
|
2729
|
+
return;
|
|
2730
|
+
const j = S(L).length;
|
|
2731
|
+
U.value = L, W.value = _(W.value, j), P.value = p(P.value, j), L === te.breakdown && (Y.value = g(
|
|
2732
|
+
n.value,
|
|
2733
|
+
t.value,
|
|
2734
|
+
Y.value,
|
|
2735
|
+
oe.value
|
|
2736
|
+
));
|
|
2737
|
+
}
|
|
2738
|
+
function E(B, L) {
|
|
2739
|
+
const j = P.value.length;
|
|
2740
|
+
if (j <= 0)
|
|
2741
|
+
return;
|
|
2742
|
+
const H = Number(L);
|
|
2743
|
+
if (!Number.isInteger(H) || H < 1 || H > j)
|
|
2744
|
+
return;
|
|
2745
|
+
const J = [...P.value], q = J[B];
|
|
2746
|
+
if (q === H)
|
|
2747
|
+
return;
|
|
2748
|
+
const Z = J.findIndex(
|
|
2749
|
+
(fe, ve) => ve !== B && fe === H
|
|
2750
|
+
);
|
|
2751
|
+
Z >= 0 && (J[Z] = q), J[B] = H, P.value = J;
|
|
2752
|
+
}
|
|
2753
|
+
function ue(B, L) {
|
|
2754
|
+
const j = L.target;
|
|
2755
|
+
j && le(B, j.value);
|
|
2756
|
+
}
|
|
2757
|
+
function Te(B, L, j) {
|
|
2758
|
+
const H = j.target;
|
|
2759
|
+
if (!H)
|
|
2760
|
+
return;
|
|
2761
|
+
const J = N(H.value);
|
|
2762
|
+
if (!J)
|
|
2763
|
+
return;
|
|
2764
|
+
const q = t.value.length;
|
|
2765
|
+
if (q <= 0)
|
|
2766
|
+
return;
|
|
2767
|
+
const Z = D(B, L, q), fe = [...Y.value];
|
|
2768
|
+
if (fe[Z] = J, oe.value && L === 0)
|
|
2769
|
+
for (let ve = 1; ve < q; ve++) {
|
|
2770
|
+
const Fe = D(B, ve, q);
|
|
2771
|
+
fe[Fe] = y(J, k(ve));
|
|
2772
|
+
}
|
|
2773
|
+
Y.value = fe;
|
|
2774
|
+
}
|
|
2775
|
+
function $e(B) {
|
|
2776
|
+
oe.value = B, Y.value = g(
|
|
2777
|
+
n.value,
|
|
2778
|
+
t.value,
|
|
2779
|
+
Y.value,
|
|
2780
|
+
oe.value
|
|
2781
|
+
);
|
|
2782
|
+
}
|
|
2783
|
+
function De() {
|
|
2784
|
+
U.value = te.series, W.value = _(void 0, ce.length), P.value = p(void 0, ce.length), oe.value = !0, Y.value = g(
|
|
2785
|
+
n.value,
|
|
2786
|
+
t.value,
|
|
2787
|
+
void 0,
|
|
2788
|
+
!0
|
|
2789
|
+
);
|
|
2790
|
+
}
|
|
2791
|
+
function Q() {
|
|
2792
|
+
const B = U.value === te.series, L = W.value.every(
|
|
2793
|
+
(q, Z) => q === ce[Z % ce.length]
|
|
2794
|
+
), j = P.value.every((q, Z) => q === Z + 1), H = g(
|
|
2795
|
+
n.value,
|
|
2796
|
+
t.value,
|
|
2797
|
+
void 0,
|
|
2798
|
+
oe.value
|
|
2799
|
+
), J = Y.value.length === H.length && Y.value.every((q, Z) => q === H[Z]);
|
|
2800
|
+
s("update:model", {
|
|
2801
|
+
...e.model,
|
|
2802
|
+
chartColorBinding: B ? void 0 : U.value,
|
|
2803
|
+
chartColors: L ? void 0 : [...W.value],
|
|
2804
|
+
chartColorLayers: j ? void 0 : [...P.value],
|
|
2805
|
+
chartBreakdownColors: J ? void 0 : [...Y.value],
|
|
2806
|
+
chartUseSecondaryMetricShades: oe.value
|
|
2807
|
+
});
|
|
2808
|
+
}
|
|
2809
|
+
return (B, L) => {
|
|
2810
|
+
const j = T("FmButton"), H = T("FmSelect"), J = T("FmCheckbox");
|
|
2811
|
+
return v(), z("div", Ht, [
|
|
2812
|
+
C("div", qt, [
|
|
2813
|
+
C("p", Yt, X(l(a)("report.section.datasource.chartColor.title")), 1),
|
|
2814
|
+
C("div", Jt, [
|
|
2815
|
+
r(j, {
|
|
2816
|
+
variant: "tertiary",
|
|
2817
|
+
"text-color": "text-fm-color-system-info-300",
|
|
2818
|
+
size: "md",
|
|
2819
|
+
label: l(a)("report.section.datasource.chartColor.reset"),
|
|
2820
|
+
onClick: De
|
|
2821
|
+
}, null, 8, ["label"])
|
|
2822
|
+
])
|
|
2823
|
+
]),
|
|
2824
|
+
r(H, {
|
|
2825
|
+
"model-value": U.value,
|
|
2826
|
+
items: h.value,
|
|
2827
|
+
label: l(a)("report.section.datasource.styleTarget.title"),
|
|
2828
|
+
"onUpdate:modelValue": pe
|
|
2829
|
+
}, null, 8, ["model-value", "items", "label"]),
|
|
2830
|
+
U.value === l(te).breakdown ? (v(), M(J, {
|
|
2831
|
+
key: 0,
|
|
2832
|
+
"model-value": oe.value,
|
|
2833
|
+
label: l(a)("report.section.datasource.chartColor.secondaryMetricAutoShade"),
|
|
2834
|
+
"onUpdate:modelValue": L[0] || (L[0] = (q) => $e(!!q))
|
|
2835
|
+
}, null, 8, ["model-value", "label"])) : O("", !0),
|
|
2836
|
+
U.value !== l(te).breakdown ? (v(), z("div", Gt, [
|
|
2837
|
+
(v(!0), z(se, null, be(W.value, (q, Z) => (v(), z("div", {
|
|
2838
|
+
key: Z,
|
|
2839
|
+
class: "fm-shadow-light-100 flex items-center justify-between gap-8 rounded-md border border-fm-color-neutral-gray-100 px-8 py-6"
|
|
2840
|
+
}, [
|
|
2841
|
+
C("span", Kt, X(i.value[Z] || `${l(a)("report.section.datasource.chartColor.color")} ${Z + 1}`), 1),
|
|
2842
|
+
C("div", Qt, [
|
|
2843
|
+
u.value ? (v(), M(H, {
|
|
2844
|
+
key: 0,
|
|
2845
|
+
"model-value": P.value[Z],
|
|
2846
|
+
items: c.value,
|
|
2847
|
+
"onUpdate:modelValue": (fe) => E(Z, fe)
|
|
2848
|
+
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])) : O("", !0),
|
|
2849
|
+
C("input", {
|
|
2850
|
+
type: "color",
|
|
2851
|
+
value: q,
|
|
2852
|
+
class: "h-24 w-24 cursor-pointer rounded border border-fm-color-neutral-gray-100 bg-transparent p-0",
|
|
2853
|
+
onInput: (fe) => ue(Z, fe)
|
|
2854
|
+
}, null, 40, Zt)
|
|
2855
|
+
])
|
|
2856
|
+
]))), 128))
|
|
2857
|
+
])) : (v(), z("div", eo, [
|
|
2858
|
+
C("div", {
|
|
2859
|
+
class: "grid gap-8 border-b border-fm-color-neutral-gray-100 bg-fm-color-neutral-gray-10 p-8",
|
|
2860
|
+
style: Ae({ gridTemplateColumns: `minmax(120px, 1fr) repeat(${t.value.length}, minmax(52px, 80px))` })
|
|
2861
|
+
}, [
|
|
2862
|
+
C("span", lo, X(l(a)("report.section.dimension.breakdownDimension")), 1),
|
|
2863
|
+
(v(!0), z(se, null, be(t.value, (q) => (v(), z("span", {
|
|
2864
|
+
key: q,
|
|
2865
|
+
class: "fm-typo-en-body-lg-600"
|
|
2866
|
+
}, X(q), 1))), 128))
|
|
2867
|
+
], 4),
|
|
2868
|
+
(v(!0), z(se, null, be(n.value, (q, Z) => (v(), z("div", {
|
|
2869
|
+
key: q,
|
|
2870
|
+
class: "grid items-center gap-8 border-b border-fm-color-neutral-gray-100 p-8 last:border-b-0",
|
|
2871
|
+
style: Ae({ gridTemplateColumns: `minmax(120px, 1fr) repeat(${t.value.length}, minmax(52px, 80px))` })
|
|
2872
|
+
}, [
|
|
2873
|
+
C("span", to, X(q), 1),
|
|
2874
|
+
(v(!0), z(se, null, be(t.value, (fe, ve) => (v(), z("input", {
|
|
2875
|
+
key: `${q}-${ve}`,
|
|
2876
|
+
type: "color",
|
|
2877
|
+
value: Y.value[D(Z, ve, t.value.length)],
|
|
2878
|
+
class: "h-24 w-24 cursor-pointer rounded border border-fm-color-neutral-gray-100 bg-transparent p-0",
|
|
2879
|
+
disabled: oe.value && ve > 0,
|
|
2880
|
+
onInput: (Fe) => Te(Z, ve, Fe)
|
|
2881
|
+
}, null, 40, oo))), 128))
|
|
2882
|
+
], 4))), 128))
|
|
2883
|
+
])),
|
|
2884
|
+
r(j, {
|
|
2885
|
+
size: "md",
|
|
2886
|
+
label: l(a)("report.common.apply"),
|
|
2887
|
+
disabled: !G.value,
|
|
2888
|
+
onClick: Q
|
|
2889
|
+
}, null, 8, ["label", "disabled"])
|
|
2890
|
+
]);
|
|
2891
|
+
};
|
|
2892
|
+
}
|
|
2893
|
+
}), no = { class: "flex flex-col gap-8" }, io = { class: "flex items-center justify-between" }, so = { class: "fm-typo-en-body-lg-600" }, ro = { class: "flex items-center gap-8 text-fm-color-system-info-300" }, uo = { class: "grid grid-cols-2 gap-8" }, mo = { class: "flex items-center gap-8" }, co = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, po = /* @__PURE__ */ ae({
|
|
2894
|
+
__name: "ChartLineStyleSection",
|
|
2895
|
+
props: {
|
|
2896
|
+
model: {}
|
|
2897
|
+
},
|
|
2898
|
+
emits: ["update:model"],
|
|
2899
|
+
setup($, { emit: d }) {
|
|
2900
|
+
const e = $, s = d, { t: a } = ie(), h = F(() => [
|
|
2901
|
+
{
|
|
2902
|
+
label: a("report.section.datasource.styleTarget.series"),
|
|
2903
|
+
value: te.series
|
|
2904
|
+
},
|
|
2905
|
+
{
|
|
2906
|
+
label: a("report.section.datasource.styleTarget.metric"),
|
|
2907
|
+
value: te.metric
|
|
2908
|
+
}
|
|
2909
|
+
]);
|
|
2910
|
+
function V(m) {
|
|
2911
|
+
return m && typeof m == "object" && "value" in m ? V(m.value) : m === te.metric ? te.metric : te.series;
|
|
2912
|
+
}
|
|
2913
|
+
function f(m, b) {
|
|
2914
|
+
var K, W;
|
|
2915
|
+
return m ? ((K = m.label) == null ? void 0 : K.trim()) || ((W = m.name) == null ? void 0 : W.trim()) || `${a("report.section.datasource.styleTarget.metric")} ${b + 1}` : `${a("report.section.datasource.styleTarget.metric")} ${b + 1}`;
|
|
2916
|
+
}
|
|
2917
|
+
function w() {
|
|
2918
|
+
const m = Array.isArray(e.model.metrics) ? e.model.metrics : [];
|
|
2919
|
+
if (!e.model.isBlend)
|
|
2920
|
+
return m;
|
|
2921
|
+
const b = Array.isArray(e.model.joinDatasources) ? e.model.joinDatasources.flatMap(
|
|
2922
|
+
(I) => Array.isArray(I == null ? void 0 : I.metrics) ? I.metrics : []
|
|
2923
|
+
) : [];
|
|
2924
|
+
return [...m, ...b];
|
|
2925
|
+
}
|
|
2926
|
+
function S(m) {
|
|
2927
|
+
if (m === te.metric) {
|
|
2928
|
+
const b = w();
|
|
2929
|
+
if (b.length > 0)
|
|
2930
|
+
return b.map((I, K) => f(I, K));
|
|
2931
|
+
}
|
|
2932
|
+
return ce.map(
|
|
2933
|
+
(b, I) => `${a("report.section.datasource.lineStyle.series")} ${I + 1}`
|
|
2934
|
+
);
|
|
2935
|
+
}
|
|
2936
|
+
const t = F(() => [
|
|
2937
|
+
{
|
|
2938
|
+
label: a("report.section.datasource.lineStyle.solid"),
|
|
2939
|
+
value: "solid"
|
|
2940
|
+
},
|
|
2941
|
+
{
|
|
2942
|
+
label: a("report.section.datasource.lineStyle.dashed"),
|
|
2943
|
+
value: "dashed"
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
label: a("report.section.datasource.lineStyle.dotted"),
|
|
2947
|
+
value: "dotted"
|
|
2948
|
+
}
|
|
2949
|
+
]);
|
|
2950
|
+
function n(m) {
|
|
2951
|
+
return m && typeof m == "object" && "value" in m ? n(m.value) : m === "dashed" || m === "DASHED" ? "dashed" : m === "dotted" || m === "DOTTED" ? "dotted" : "solid";
|
|
2952
|
+
}
|
|
2953
|
+
function y(m) {
|
|
2954
|
+
return m === "dashed" ? "line-style-icon--dashed" : m === "dotted" ? "line-style-icon--dotted" : "line-style-icon--solid";
|
|
2955
|
+
}
|
|
2956
|
+
function k(m, b) {
|
|
2957
|
+
return !Array.isArray(m) || m.length === 0 ? Array.from({ length: b }).map(
|
|
2958
|
+
(I, K) => Ge[K] ?? "solid"
|
|
2959
|
+
) : Array.from({ length: b }).map((I, K) => n(m[K]));
|
|
2960
|
+
}
|
|
2961
|
+
const D = F(
|
|
2962
|
+
() => V(e.model.lineStyleBinding)
|
|
2963
|
+
), g = F(() => S(_.value)), x = F(
|
|
2964
|
+
() => k(e.model.lineStyles, S(D.value).length)
|
|
2965
|
+
), N = ee([]), _ = ee(te.series);
|
|
2966
|
+
ye(
|
|
2967
|
+
[
|
|
2968
|
+
() => e.model.lineStyles,
|
|
2969
|
+
() => e.model.lineStyleBinding,
|
|
2970
|
+
() => e.model.metrics,
|
|
2971
|
+
() => e.model.isBlend,
|
|
2972
|
+
() => e.model.joinDatasources
|
|
2973
|
+
],
|
|
2974
|
+
([m, b]) => {
|
|
2975
|
+
_.value = V(b), N.value = k(
|
|
2976
|
+
m,
|
|
2977
|
+
S(_.value).length
|
|
2978
|
+
);
|
|
2979
|
+
},
|
|
2980
|
+
{ immediate: !0, deep: !0 }
|
|
2981
|
+
);
|
|
2982
|
+
const p = F(() => _.value !== D.value || N.value.length !== x.value.length ? !0 : N.value.some((m, b) => m !== x.value[b]));
|
|
2983
|
+
function o(m, b) {
|
|
2984
|
+
const I = [...N.value];
|
|
2985
|
+
I[m] = n(b), N.value = I;
|
|
2986
|
+
}
|
|
2987
|
+
function i(m) {
|
|
2988
|
+
const b = V(m);
|
|
2989
|
+
if (b === _.value)
|
|
2990
|
+
return;
|
|
2991
|
+
const I = S(b).length;
|
|
2992
|
+
_.value = b, N.value = k(N.value, I);
|
|
2993
|
+
}
|
|
2994
|
+
function c() {
|
|
2995
|
+
_.value = te.series, N.value = [...Ge];
|
|
2996
|
+
}
|
|
2997
|
+
function u() {
|
|
2998
|
+
const m = _.value === te.series, b = N.value.every((I) => I === "solid");
|
|
2999
|
+
s("update:model", {
|
|
3000
|
+
...e.model,
|
|
3001
|
+
lineStyleBinding: m ? void 0 : _.value,
|
|
3002
|
+
lineStyles: b ? void 0 : [...N.value]
|
|
3003
|
+
});
|
|
3004
|
+
}
|
|
3005
|
+
return (m, b) => {
|
|
3006
|
+
const I = T("FmButton"), K = T("FmSelect");
|
|
3007
|
+
return v(), z("div", no, [
|
|
3008
|
+
C("div", io, [
|
|
3009
|
+
C("p", so, X(l(a)("report.section.datasource.lineStyle.title")), 1),
|
|
3010
|
+
C("div", ro, [
|
|
3011
|
+
r(I, {
|
|
3012
|
+
variant: "tertiary",
|
|
3013
|
+
"text-color": "text-fm-color-system-info-300",
|
|
3014
|
+
size: "md",
|
|
3015
|
+
label: l(a)("report.section.datasource.lineStyle.reset"),
|
|
3016
|
+
onClick: c
|
|
3017
|
+
}, null, 8, ["label"])
|
|
3018
|
+
])
|
|
3019
|
+
]),
|
|
3020
|
+
r(K, {
|
|
3021
|
+
"model-value": _.value,
|
|
3022
|
+
items: h.value,
|
|
3023
|
+
label: l(a)("report.section.datasource.styleTarget.title"),
|
|
3024
|
+
"onUpdate:modelValue": i
|
|
3025
|
+
}, null, 8, ["model-value", "items", "label"]),
|
|
3026
|
+
C("div", uo, [
|
|
3027
|
+
(v(!0), z(se, null, be(N.value, (W, P) => (v(), z("div", {
|
|
3028
|
+
key: P,
|
|
3029
|
+
class: "flex items-center justify-between gap-8 rounded-md border border-fm-color-neutral-gray-100 px-8 py-6"
|
|
3030
|
+
}, [
|
|
3031
|
+
C("div", mo, [
|
|
3032
|
+
C("span", {
|
|
3033
|
+
class: Ee(["line-style-icon", y(W)]),
|
|
3034
|
+
"aria-hidden": "true"
|
|
3035
|
+
}, null, 2),
|
|
3036
|
+
C("span", co, X(g.value[P] || `${l(a)("report.section.datasource.lineStyle.line")} ${P + 1}`), 1)
|
|
3037
|
+
]),
|
|
3038
|
+
r(K, {
|
|
3039
|
+
"model-value": W,
|
|
3040
|
+
items: t.value,
|
|
3041
|
+
class: "w-[130px]",
|
|
3042
|
+
"onUpdate:modelValue": (Y) => o(P, Y)
|
|
3043
|
+
}, null, 8, ["model-value", "items", "onUpdate:modelValue"])
|
|
3044
|
+
]))), 128))
|
|
3045
|
+
]),
|
|
3046
|
+
r(I, {
|
|
3047
|
+
size: "md",
|
|
3048
|
+
label: l(a)("report.common.apply"),
|
|
3049
|
+
disabled: !p.value,
|
|
3050
|
+
onClick: u
|
|
3051
|
+
}, null, 8, ["label", "disabled"])
|
|
3052
|
+
]);
|
|
3053
|
+
};
|
|
3054
|
+
}
|
|
3055
|
+
}), vo = /* @__PURE__ */ Fl(po, [["__scopeId", "data-v-0df77216"]]), fo = { class: "flex flex-col gap-16" }, go = {
|
|
3056
|
+
key: 2,
|
|
3057
|
+
class: "h-px w-full bg-fm-color-neutral-gray-100"
|
|
3058
|
+
}, bo = { class: "flex flex-col gap-8" }, yo = { class: "fm-typo-en-body-lg-600" }, ho = { class: "flex flex-col gap-8" }, wo = /* @__PURE__ */ ae({
|
|
3059
|
+
__name: "StyleDatasource",
|
|
3060
|
+
props: /* @__PURE__ */ re({
|
|
3061
|
+
label: {
|
|
3062
|
+
type: String,
|
|
3063
|
+
default: "Label"
|
|
3064
|
+
},
|
|
3065
|
+
config: {
|
|
3066
|
+
type: Object,
|
|
3067
|
+
default: null
|
|
3068
|
+
},
|
|
3069
|
+
closeable: {
|
|
3070
|
+
type: Boolean,
|
|
3071
|
+
default: !1
|
|
3072
|
+
},
|
|
3073
|
+
mainDatasourceConfig: {
|
|
3074
|
+
type: Object,
|
|
3075
|
+
default: () => {
|
|
3076
|
+
}
|
|
3077
|
+
},
|
|
3078
|
+
modelValue: {
|
|
3079
|
+
type: Object,
|
|
3080
|
+
default: () => {
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
}, {
|
|
3084
|
+
modelValue: { required: !0 },
|
|
3085
|
+
modelModifiers: {}
|
|
3086
|
+
}),
|
|
3087
|
+
emits: /* @__PURE__ */ re(["click-close"], ["update:modelValue"]),
|
|
3088
|
+
setup($, { emit: d }) {
|
|
3089
|
+
const e = me($, "modelValue");
|
|
3090
|
+
ye(
|
|
3091
|
+
[() => e.value.dimensions, () => e.value.metrics],
|
|
3092
|
+
() => {
|
|
3093
|
+
const { rowIds: n, columnIds: y } = Oe(e.value);
|
|
3094
|
+
e.value.rowIds = n, e.value.columnIds = y;
|
|
3095
|
+
},
|
|
3096
|
+
{ deep: !0 }
|
|
3097
|
+
);
|
|
3098
|
+
const s = $, a = d, { t: h } = ie(), V = F(() => s.config.type === A.Circular), f = F(() => s.config.type === A.StackBarChart || s.config.type === A.ClusteredStackBarChart), w = F(
|
|
3099
|
+
() => s.config.type === A.LineChart || s.config.type === A.StackLineChart
|
|
3100
|
+
), S = F({
|
|
3101
|
+
get: () => e.value.maxTooltipItems ?? null,
|
|
3102
|
+
set: (n) => {
|
|
3103
|
+
e.value = {
|
|
3104
|
+
...e.value,
|
|
3105
|
+
maxTooltipItems: n ?? void 0
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3108
|
+
}), t = F({
|
|
3109
|
+
get: () => e.value.stackBarOverlap ?? !1,
|
|
3110
|
+
set: (n) => {
|
|
3111
|
+
e.value = {
|
|
3112
|
+
...e.value,
|
|
3113
|
+
stackBarOverlap: n
|
|
3114
|
+
};
|
|
3115
|
+
}
|
|
3116
|
+
});
|
|
3117
|
+
return (n, y) => {
|
|
3118
|
+
const k = T("FmButton"), D = T("FmCheckbox"), g = T("FmStepperField");
|
|
3119
|
+
return v(), z(se, null, [
|
|
3120
|
+
y[10] || (y[10] = C("div", { class: "grow" }, null, -1)),
|
|
3121
|
+
s.closeable ? (v(), M(k, {
|
|
3122
|
+
key: 0,
|
|
3123
|
+
icon: "close",
|
|
3124
|
+
variant: "tertiary",
|
|
3125
|
+
size: "md",
|
|
3126
|
+
onClick: y[0] || (y[0] = ge((x) => a("click-close"), ["stop"]))
|
|
3127
|
+
})) : O("", !0),
|
|
3128
|
+
C("div", fo, [
|
|
3129
|
+
s.config.hasChart ? (v(), M(Et, {
|
|
3130
|
+
key: 0,
|
|
3131
|
+
model: e.value,
|
|
3132
|
+
"onUpdate:model": y[1] || (y[1] = (x) => e.value = x)
|
|
3133
|
+
}, null, 8, ["model"])) : O("", !0),
|
|
3134
|
+
s.config.hasChart ? (v(), M(ao, {
|
|
3135
|
+
key: 1,
|
|
3136
|
+
model: e.value,
|
|
3137
|
+
"show-layer-control": f.value && t.value,
|
|
3138
|
+
"onUpdate:model": y[2] || (y[2] = (x) => e.value = x)
|
|
3139
|
+
}, null, 8, ["model", "show-layer-control"])) : O("", !0),
|
|
3140
|
+
s.config.hasChart && w.value ? (v(), z("div", go)) : O("", !0),
|
|
3141
|
+
s.config.hasChart && w.value ? (v(), M(vo, {
|
|
3142
|
+
key: 3,
|
|
3143
|
+
model: e.value,
|
|
3144
|
+
"onUpdate:model": y[3] || (y[3] = (x) => e.value = x)
|
|
3145
|
+
}, null, 8, ["model"])) : O("", !0),
|
|
3146
|
+
y[9] || (y[9] = C("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)),
|
|
3147
|
+
C("div", bo, [
|
|
3148
|
+
C("p", yo, X(l(h)("report.section.style.configuration")), 1),
|
|
3149
|
+
C("div", ho, [
|
|
3150
|
+
f.value ? (v(), M(D, {
|
|
3151
|
+
key: 0,
|
|
3152
|
+
modelValue: t.value,
|
|
3153
|
+
"onUpdate:modelValue": y[4] || (y[4] = (x) => t.value = x),
|
|
3154
|
+
class: "fm-typo-en-body-lg-400",
|
|
3155
|
+
label: l(h)("report.section.datasource.stackBar.overlapBars")
|
|
3156
|
+
}, null, 8, ["modelValue", "label"])) : O("", !0),
|
|
3157
|
+
s.config.hasLabel ? (v(), M(Bt, {
|
|
3158
|
+
key: 1,
|
|
3159
|
+
model: e.value,
|
|
3160
|
+
"onUpdate:model": y[5] || (y[5] = (x) => e.value = x)
|
|
3161
|
+
}, null, 8, ["model"])) : O("", !0),
|
|
3162
|
+
s.config.hasLegend ? (v(), M(Xt, {
|
|
3163
|
+
key: 2,
|
|
3164
|
+
model: e.value,
|
|
3165
|
+
"is-circular-widget": V.value,
|
|
3166
|
+
"onUpdate:model": y[6] || (y[6] = (x) => e.value = x)
|
|
3167
|
+
}, null, 8, ["model", "is-circular-widget"])) : O("", !0),
|
|
3168
|
+
s.config.hasXy ? (v(), M(At, {
|
|
3169
|
+
key: 3,
|
|
3170
|
+
model: e.value,
|
|
3171
|
+
"onUpdate:model": y[7] || (y[7] = (x) => e.value = x)
|
|
3172
|
+
}, null, 8, ["model"])) : O("", !0),
|
|
3173
|
+
s.config.hasXy ? (v(), M(g, {
|
|
3174
|
+
key: 4,
|
|
3175
|
+
modelValue: S.value,
|
|
3176
|
+
"onUpdate:modelValue": y[8] || (y[8] = (x) => S.value = x),
|
|
3177
|
+
type: "number",
|
|
3178
|
+
label: l(h)("report.section.datasource.tooltip.maxTooltipItems"),
|
|
3179
|
+
min: 2,
|
|
3180
|
+
placeholder: "Auto"
|
|
3181
|
+
}, null, 8, ["modelValue", "label"])) : O("", !0)
|
|
3182
|
+
])
|
|
3183
|
+
])
|
|
3184
|
+
])
|
|
3185
|
+
], 64);
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
}), Vo = { class: "fixed bottom-6 right-6" }, Co = { class: "flex w-full items-center gap-8" }, xo = { class: "fm-typo-en-title-sm-600" }, Fo = { class: "ml-auto text-fm-color-system-info-300" }, ko = /* @__PURE__ */ ae({
|
|
3189
|
+
__name: "StyleEditorTab",
|
|
3190
|
+
props: {
|
|
3191
|
+
modelValue: {
|
|
3192
|
+
required: !0
|
|
3193
|
+
},
|
|
3194
|
+
modelModifiers: {},
|
|
3195
|
+
isStyleEditing: { type: Boolean, required: !1, default: !1 },
|
|
3196
|
+
isStyleEditingModifiers: {}
|
|
3197
|
+
},
|
|
3198
|
+
emits: ["update:modelValue", "update:isStyleEditing"],
|
|
3199
|
+
setup($) {
|
|
3200
|
+
const { t: d } = ie(), e = me($, "modelValue"), s = F(
|
|
3201
|
+
() => je.find((f) => f.type === e.value.widget.type)
|
|
3202
|
+
), a = me($, "isStyleEditing"), h = F(() => {
|
|
3203
|
+
var f;
|
|
3204
|
+
return {
|
|
3205
|
+
chartHeight: void 0,
|
|
3206
|
+
chartWidth: void 0,
|
|
3207
|
+
chartColors: void 0,
|
|
3208
|
+
chartColorLayers: void 0,
|
|
3209
|
+
chartBreakdownColors: void 0,
|
|
3210
|
+
chartBreakdownDimensionValues: void 0,
|
|
3211
|
+
chartUseSecondaryMetricShades: void 0,
|
|
3212
|
+
chartColorBinding: void 0,
|
|
3213
|
+
lineStyles: void 0,
|
|
3214
|
+
lineStyleBinding: void 0,
|
|
3215
|
+
showLabel: !1,
|
|
3216
|
+
labelAlign: he.center,
|
|
3217
|
+
labelAnchor: Le.center,
|
|
3218
|
+
labelRotation: 0,
|
|
3219
|
+
labelOffset: 0,
|
|
3220
|
+
labelFontSize: 12,
|
|
3221
|
+
showX: !0,
|
|
3222
|
+
xPosition: _l.bottom,
|
|
3223
|
+
showXGrid: !1,
|
|
3224
|
+
showXTick: !0,
|
|
3225
|
+
xTickFontSize: 12,
|
|
3226
|
+
showXTitle: !1,
|
|
3227
|
+
xTitle: "",
|
|
3228
|
+
xTitleFontSize: 12,
|
|
3229
|
+
showY: !0,
|
|
3230
|
+
yPosition: Sl.left,
|
|
3231
|
+
showYGrid: !1,
|
|
3232
|
+
showYTick: !0,
|
|
3233
|
+
yTickFontSize: 12,
|
|
3234
|
+
showYTitle: !1,
|
|
3235
|
+
yTitle: "",
|
|
3236
|
+
yTitleFontSize: 12,
|
|
3237
|
+
showLegend: ((f = s.value) == null ? void 0 : f.type) === A.Circular,
|
|
3238
|
+
legendPosition: kl.top,
|
|
3239
|
+
usePointStyle: !0,
|
|
3240
|
+
legendMaxHeight: void 0,
|
|
3241
|
+
legendMaxWidth: void 0,
|
|
3242
|
+
maxTooltipItems: void 0,
|
|
3243
|
+
stackBarOverlap: !1
|
|
3244
|
+
};
|
|
3245
|
+
});
|
|
3246
|
+
function V() {
|
|
3247
|
+
e.value && (e.value.widget.config = {
|
|
3248
|
+
...e.value.widget.config,
|
|
3249
|
+
...h.value
|
|
3250
|
+
});
|
|
3251
|
+
}
|
|
3252
|
+
return (f, w) => {
|
|
3253
|
+
const S = T("FmCircularProgress"), t = T("FmButton"), n = T("FmSideSheet");
|
|
3254
|
+
return v(), M(n, {
|
|
3255
|
+
modelValue: a.value,
|
|
3256
|
+
"onUpdate:modelValue": w[2] || (w[2] = (y) => a.value = y),
|
|
3257
|
+
"close-button": !1,
|
|
3258
|
+
"no-overlay": "",
|
|
3259
|
+
"dismiss-away": !0,
|
|
3260
|
+
"max-width": 500
|
|
3261
|
+
}, {
|
|
3262
|
+
"side-sheet-button": R(() => [
|
|
3263
|
+
C("div", Vo, [
|
|
3264
|
+
r(t, {
|
|
3265
|
+
label: l(d)("report.section.style.button"),
|
|
3266
|
+
icon: "edit",
|
|
3267
|
+
variant: "secondary",
|
|
3268
|
+
size: "md"
|
|
3269
|
+
}, null, 8, ["label"])
|
|
3270
|
+
])
|
|
3271
|
+
]),
|
|
3272
|
+
"side-sheet-header": R(() => [
|
|
3273
|
+
C("div", Co, [
|
|
3274
|
+
r(t, {
|
|
3275
|
+
"prepend-icon": "arrow_back",
|
|
3276
|
+
variant: "tertiary",
|
|
3277
|
+
class: "fm-icon--rounded fm-icon--md text-fm-color-black",
|
|
3278
|
+
onClick: w[0] || (w[0] = (y) => a.value = !1)
|
|
3279
|
+
}),
|
|
3280
|
+
C("p", xo, X(l(d)("report.section.style.title")), 1),
|
|
3281
|
+
C("div", Fo, [
|
|
3282
|
+
r(t, {
|
|
3283
|
+
label: l(d)("report.section.style.reset"),
|
|
3284
|
+
variant: "tertiary",
|
|
3285
|
+
size: "md",
|
|
3286
|
+
onClick: V,
|
|
3287
|
+
"text-color": "text-fm-color-system-info-300"
|
|
3288
|
+
}, null, 8, ["label"])
|
|
3289
|
+
])
|
|
3290
|
+
])
|
|
3291
|
+
]),
|
|
3292
|
+
default: R(() => [
|
|
3293
|
+
e.value ? O("", !0) : (v(), M(S, { key: 0 })),
|
|
3294
|
+
r(wo, {
|
|
3295
|
+
modelValue: e.value.widget.config,
|
|
3296
|
+
"onUpdate:modelValue": w[1] || (w[1] = (y) => e.value.widget.config = y),
|
|
3297
|
+
config: s.value
|
|
3298
|
+
}, null, 8, ["modelValue", "config"])
|
|
3299
|
+
]),
|
|
3300
|
+
_: 1
|
|
3301
|
+
}, 8, ["modelValue"]);
|
|
3302
|
+
};
|
|
3303
|
+
}
|
|
3304
|
+
}), So = { class: "bg-fm-color-neutral-white flex flex-col h-full w-[510px]" }, _o = { class: "flex bg-fm-color-neutral-white w-[88px]" }, To = { class: "w-full overflow-y-auto" }, $o = {
|
|
3305
|
+
class: "grid grid-cols-12 w-full p-24",
|
|
3306
|
+
style: { backgroundColor: "#F6F8FC" }
|
|
3307
|
+
}, Do = /* @__PURE__ */ ae({
|
|
3308
|
+
__name: "TileEditorDesktop",
|
|
3309
|
+
props: /* @__PURE__ */ re({
|
|
3310
|
+
hideConfiguration: { type: Boolean, required: !0, default: !1 },
|
|
3311
|
+
index: { type: Number, required: !0, default: 0 }
|
|
3312
|
+
}, {
|
|
3313
|
+
modelValue: {
|
|
3314
|
+
required: !0
|
|
3315
|
+
},
|
|
3316
|
+
modelModifiers: {}
|
|
3317
|
+
}),
|
|
3318
|
+
emits: /* @__PURE__ */ re(["hideConfiguration"], ["update:modelValue"]),
|
|
3319
|
+
setup($, { emit: d }) {
|
|
3320
|
+
const e = me($, "modelValue"), s = $, a = F(
|
|
3321
|
+
() => je.find((t) => {
|
|
3322
|
+
var n;
|
|
3323
|
+
return t.type === ((n = e.value) == null ? void 0 : n.widget.type);
|
|
3324
|
+
})
|
|
3325
|
+
), h = d, V = [
|
|
3326
|
+
A.BarChart,
|
|
3327
|
+
A.StackBarChart,
|
|
3328
|
+
A.ClusteredStackBarChart,
|
|
3329
|
+
A.LineChart,
|
|
3330
|
+
A.StackLineChart,
|
|
3331
|
+
A.Circular
|
|
3332
|
+
], f = F(() => V.includes(e.value.widget.type)), w = ee(!1);
|
|
3333
|
+
function S(t) {
|
|
3334
|
+
if (e.value.widget.type !== A.ClusteredStackBarChart)
|
|
3335
|
+
return;
|
|
3336
|
+
const n = t.filter((D) => !!D), y = e.value.widget.config.chartBreakdownDimensionValues ?? [];
|
|
3337
|
+
y.length === n.length && y.every((D, g) => D === n[g]) || (e.value.widget.config = {
|
|
3338
|
+
...e.value.widget.config,
|
|
3339
|
+
chartBreakdownDimensionValues: n.length > 0 ? [...n] : void 0
|
|
3340
|
+
});
|
|
3341
|
+
}
|
|
3342
|
+
return (t, n) => {
|
|
3343
|
+
const y = T("FmCircularProgress"), k = T("FmButton");
|
|
3344
|
+
return v(), z("div", null, [
|
|
3345
|
+
e.value ? (v(), z(se, { key: 1 }, [
|
|
3346
|
+
r(yl, {
|
|
3347
|
+
"model-value": !$.hideConfiguration
|
|
3348
|
+
}, {
|
|
3349
|
+
right: R(() => [
|
|
3350
|
+
C("div", So, [
|
|
3351
|
+
r(sl, {
|
|
3352
|
+
modelValue: e.value,
|
|
3353
|
+
"onUpdate:modelValue": n[0] || (n[0] = (D) => e.value = D),
|
|
3354
|
+
config: a.value,
|
|
3355
|
+
"hide-configuration": $.hideConfiguration,
|
|
3356
|
+
onHideConfiguration: n[1] || (n[1] = (D) => {
|
|
3357
|
+
h("hideConfiguration", D);
|
|
3358
|
+
})
|
|
3359
|
+
}, null, 8, ["modelValue", "config", "hide-configuration"])
|
|
3360
|
+
])
|
|
3361
|
+
]),
|
|
3362
|
+
left: R(() => [
|
|
3363
|
+
C("div", _o, [
|
|
3364
|
+
r(k, {
|
|
3365
|
+
variant: "secondary",
|
|
3366
|
+
icon: "keyboard_double_arrow_right",
|
|
3367
|
+
"border-color": l(Je).ColorPrimary,
|
|
3368
|
+
"text-color": l(Je).ColorPrimary,
|
|
3369
|
+
class: "m-24 my-16",
|
|
3370
|
+
size: "md",
|
|
3371
|
+
onClick: n[2] || (n[2] = (D) => h("hideConfiguration", !s.hideConfiguration))
|
|
3372
|
+
}, null, 8, ["border-color", "text-color"])
|
|
3373
|
+
])
|
|
3374
|
+
]),
|
|
3375
|
+
_: 1
|
|
3376
|
+
}, 8, ["model-value"]),
|
|
3377
|
+
C("div", To, [
|
|
3378
|
+
C("div", $o, [
|
|
3379
|
+
e.value ? (v(), M(nl, {
|
|
3380
|
+
key: 0,
|
|
3381
|
+
"model-value": e.value,
|
|
3382
|
+
index: s.index,
|
|
3383
|
+
"hide-export": !0,
|
|
3384
|
+
"is-style-editing": w.value,
|
|
3385
|
+
"onUpdate:breakdownDimensionValues": S
|
|
3386
|
+
}, null, 8, ["model-value", "index", "is-style-editing"])) : (v(), M(il, { key: 1 }))
|
|
3387
|
+
])
|
|
3388
|
+
]),
|
|
3389
|
+
f.value ? (v(), M(ko, {
|
|
3390
|
+
key: 0,
|
|
3391
|
+
modelValue: e.value,
|
|
3392
|
+
"onUpdate:modelValue": n[3] || (n[3] = (D) => e.value = D),
|
|
3393
|
+
"is-style-editing": w.value,
|
|
3394
|
+
"onUpdate:isStyleEditing": n[4] || (n[4] = (D) => w.value = D),
|
|
3395
|
+
"hide-configuration": $.hideConfiguration,
|
|
3396
|
+
onHideConfiguration: n[5] || (n[5] = (D) => {
|
|
3397
|
+
h("hideConfiguration", D);
|
|
3398
|
+
})
|
|
3399
|
+
}, null, 8, ["modelValue", "is-style-editing", "hide-configuration"])) : O("", !0)
|
|
3400
|
+
], 64)) : (v(), M(y, { key: 0 }))
|
|
3401
|
+
]);
|
|
3402
|
+
};
|
|
3403
|
+
}
|
|
3404
|
+
}), Uo = {
|
|
3405
|
+
key: 0,
|
|
3406
|
+
class: "flex w-full justify-center items-center"
|
|
3407
|
+
}, Bo = { class: "w-full grid grid-cols-12 pb-28 pt-5 px-5 h-full" }, Lo = /* @__PURE__ */ ae({
|
|
3408
|
+
__name: "TileEditorMobile",
|
|
3409
|
+
props: /* @__PURE__ */ re({
|
|
3410
|
+
hideConfiguration: { type: Boolean, required: !0, default: !1 },
|
|
3411
|
+
index: { type: Number, required: !0, default: 0 }
|
|
3412
|
+
}, {
|
|
3413
|
+
modelValue: {
|
|
3414
|
+
required: !0
|
|
3415
|
+
},
|
|
3416
|
+
modelModifiers: {}
|
|
3417
|
+
}),
|
|
3418
|
+
emits: /* @__PURE__ */ re(["hideConfiguration"], ["update:modelValue"]),
|
|
3419
|
+
setup($, { emit: d }) {
|
|
3420
|
+
const e = me($, "modelValue"), s = $, a = F(
|
|
3421
|
+
() => je.find((f) => {
|
|
3422
|
+
var w;
|
|
3423
|
+
return f.type === ((w = e.value) == null ? void 0 : w.widget.type);
|
|
3424
|
+
})
|
|
3425
|
+
), h = d;
|
|
3426
|
+
function V(f) {
|
|
3427
|
+
if (e.value.widget.type !== A.ClusteredStackBarChart)
|
|
3428
|
+
return;
|
|
3429
|
+
const w = f.filter((n) => !!n), S = e.value.widget.config.chartBreakdownDimensionValues ?? [];
|
|
3430
|
+
S.length === w.length && S.every((n, y) => n === w[y]) || (e.value.widget.config = {
|
|
3431
|
+
...e.value.widget.config,
|
|
3432
|
+
chartBreakdownDimensionValues: w.length > 0 ? [...w] : void 0
|
|
3433
|
+
});
|
|
3434
|
+
}
|
|
3435
|
+
return (f, w) => {
|
|
3436
|
+
const S = T("FmCircularProgress");
|
|
3437
|
+
return v(), z("div", null, [
|
|
3438
|
+
e.value ? (v(), z(se, { key: 1 }, [
|
|
3439
|
+
C("div", Bo, [
|
|
3440
|
+
e.value ? (v(), M(nl, {
|
|
3441
|
+
key: 0,
|
|
3442
|
+
"model-value": e.value,
|
|
3443
|
+
index: s.index,
|
|
3444
|
+
"hide-export": !0,
|
|
3445
|
+
"onUpdate:breakdownDimensionValues": V
|
|
3446
|
+
}, null, 8, ["model-value", "index"])) : (v(), M(il, { key: 1 }))
|
|
3447
|
+
]),
|
|
3448
|
+
r(sl, {
|
|
3449
|
+
modelValue: e.value,
|
|
3450
|
+
"onUpdate:modelValue": w[0] || (w[0] = (t) => e.value = t),
|
|
3451
|
+
config: a.value,
|
|
3452
|
+
"hide-configuration": $.hideConfiguration,
|
|
3453
|
+
onHideConfiguration: w[1] || (w[1] = (t) => {
|
|
3454
|
+
h("hideConfiguration", t);
|
|
3455
|
+
})
|
|
3456
|
+
}, null, 8, ["modelValue", "config", "hide-configuration"])
|
|
3457
|
+
], 64)) : (v(), z("div", Uo, [
|
|
3458
|
+
r(S)
|
|
3459
|
+
]))
|
|
3460
|
+
]);
|
|
3461
|
+
};
|
|
3462
|
+
}
|
|
3463
|
+
}), Mo = {
|
|
3464
|
+
key: 0,
|
|
3465
|
+
class: "fm-typo-en-title-md-600"
|
|
3466
|
+
}, No = {
|
|
3467
|
+
key: 0,
|
|
3468
|
+
class: "flex items-start justify-start px-24 py-12 flex-wrap w-full"
|
|
3469
|
+
}, Ko = /* @__PURE__ */ ae({
|
|
3470
|
+
__name: "TileEditor",
|
|
3471
|
+
setup($) {
|
|
3472
|
+
const { rowHeight: d, colWidths: e } = Ce(Me()), s = cl(), a = pl(), h = Cl(), { globalFilters: V } = Ce(al()), { currentSelectWidgetType: f, editingReport: w, editingTile: S, editingTileIndex: t } = Ce(h), { breakpoints: n } = ol(), { promptMessage: y } = tl(), { t: k, te: D } = ie(), g = F(() => {
|
|
3473
|
+
var c;
|
|
3474
|
+
const o = (c = S.value) == null ? void 0 : c.widget.type;
|
|
3475
|
+
if (!o)
|
|
3476
|
+
return k("report.editor.newReport");
|
|
3477
|
+
const i = `report.widget.types.${o.toLowerCase()}`;
|
|
3478
|
+
return D(i) ? k(i) : o;
|
|
3479
|
+
}), x = ee(!1);
|
|
3480
|
+
function N() {
|
|
3481
|
+
f.value = void 0, S.value = void 0, t.value = -1, a.back();
|
|
3482
|
+
}
|
|
3483
|
+
async function _() {
|
|
3484
|
+
var i;
|
|
3485
|
+
if (!w.value) return;
|
|
3486
|
+
await y({
|
|
3487
|
+
title: k("report.tile.save.title"),
|
|
3488
|
+
message: k("report.tile.save.confirm", { title: (i = S.value) == null ? void 0 : i.widget.title })
|
|
3489
|
+
}) && S.value && (S.value.widget.config = {
|
|
3490
|
+
...S.value.widget.config,
|
|
3491
|
+
rowHeight: d.value,
|
|
3492
|
+
colWidths: [...e.value]
|
|
3493
|
+
}, t.value === -1 ? w.value.tiles.push(S.value) : w.value.tiles[t.value] = S.value, N());
|
|
3494
|
+
}
|
|
3495
|
+
async function p() {
|
|
3496
|
+
var i;
|
|
3497
|
+
if (!w.value) return;
|
|
3498
|
+
await y({
|
|
3499
|
+
title: k("report.tile.cancel.title"),
|
|
3500
|
+
message: k("report.tile.cancel.confirm", { title: (i = S.value) == null ? void 0 : i.widget.title })
|
|
3501
|
+
}) && N();
|
|
3502
|
+
}
|
|
3503
|
+
return We(() => {
|
|
3504
|
+
w.value || a.push({ name: "reports" });
|
|
3505
|
+
}), (o, i) => {
|
|
3506
|
+
const c = T("FmPageHead");
|
|
3507
|
+
return v(), M(hl, null, {
|
|
3508
|
+
default: R(() => [
|
|
3509
|
+
r(c, {
|
|
3510
|
+
actions: [
|
|
3511
|
+
{ label: l(k)("report.common.cancel"), value: "cancel", isPrimary: !1 },
|
|
3512
|
+
{ label: l(k)("report.common.save"), value: "save", isPrimary: !0 }
|
|
3513
|
+
],
|
|
3514
|
+
"onClick:action": i[0] || (i[0] = (u) => {
|
|
3515
|
+
u === "cancel" && p(), u === "save" && _();
|
|
3516
|
+
})
|
|
3517
|
+
}, {
|
|
3518
|
+
title: R(() => [
|
|
3519
|
+
l(n).lg || l(n).md ? (v(), z("p", Mo, X(g.value), 1)) : O("", !0)
|
|
3520
|
+
]),
|
|
3521
|
+
_: 1
|
|
3522
|
+
}, 8, ["actions"]),
|
|
3523
|
+
l(S) && (l(V) || []).some((u) => {
|
|
3524
|
+
const m = u.tileIds, b = l(S) && l(S).id;
|
|
3525
|
+
return Array.isArray(m) && typeof b == "string" && m.includes(b);
|
|
3526
|
+
}) ? (v(), z("div", No, [
|
|
3527
|
+
r(Tl)
|
|
3528
|
+
])) : O("", !0),
|
|
3529
|
+
l(S) ? (v(), M(el(l(n).lg || l(n).md ? Do : Lo), {
|
|
3530
|
+
key: 1,
|
|
3531
|
+
modelValue: l(S),
|
|
3532
|
+
"onUpdate:modelValue": i[1] || (i[1] = (u) => ml(S) ? S.value = u : null),
|
|
3533
|
+
class: Ee(`${l(n).lg || l(n).md ? "flex" : ""} w-full`),
|
|
3534
|
+
style: Ae({ height: `calc( 100% - ${l(n).lg || l(n).md ? 72 : 64}px)` }),
|
|
3535
|
+
"hide-configuration": x.value,
|
|
3536
|
+
index: Number(l(s).params.tileIndex),
|
|
3537
|
+
onHideConfiguration: i[2] || (i[2] = (u) => x.value = u)
|
|
3538
|
+
}, null, 40, ["modelValue", "class", "style", "hide-configuration", "index"])) : O("", !0)
|
|
3539
|
+
]),
|
|
3540
|
+
_: 1
|
|
3541
|
+
});
|
|
3542
|
+
};
|
|
3543
|
+
}
|
|
3544
|
+
});
|
|
3545
|
+
export {
|
|
3546
|
+
Ko as default
|
|
3547
|
+
};
|