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