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