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