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