@feedmepos/mf-report 5.19.20 → 5.19.21-beta.1

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