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