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