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