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