@feedmepos/mf-report 5.19.19-beta.0 → 5.19.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{App-BG5uoHAn.js → App-CpPkDCME.js} +31 -31
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-dX7Y4f-_.js → BaseDialog.vue_vue_type_script_setup_true_lang-BLVm6EP9.js} +718 -962
  3. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-C7mhpRK0.js +185 -0
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-arY3ZcKZ.js → Default.vue_vue_type_script_setup_true_lang-DTHkWGvx.js} +2 -2
  5. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DVY4vxAN.js +1669 -0
  6. package/dist/{InsightView-BEo7cPN3.js → InsightView-wYbhKrWa.js} +5 -5
  7. package/dist/{Integration-BovNO2yX.js → Integration-GkPCivXG.js} +2 -2
  8. package/dist/{Integrations-DIXSWGS_.js → Integrations-BGNXoeWI.js} +3 -3
  9. package/dist/{Layout-DhAHGBTk.js → Layout-B7pJLV4_.js} +1 -1
  10. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-C7pQMilo.js +352 -0
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DuzQ1OX-.js → NavigationTab.vue_vue_type_script_setup_true_lang-Cl6q8Efn.js} +7518 -7331
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js → NoData.vue_vue_type_script_setup_true_lang-CUuIeYhQ.js} +1 -1
  13. package/dist/{OverviewView-DEZKfz6j.js → OverviewView-DzumtIfB.js} +5 -5
  14. package/dist/{Report-WQb5zc2W.js → Report-B_SX8ejx.js} +4 -4
  15. package/dist/ReportEditor-D5OHT5As.js +1013 -0
  16. package/dist/{ReportView-CJ4PA-Je.js → ReportView-DPMurcsC.js} +7 -7
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js → SelectComponent.vue_vue_type_script_setup_true_lang-IdXw91_v.js} +1 -1
  18. package/dist/{Setting-Do3ReOAh.js → Setting-BsikuNba.js} +4 -4
  19. package/dist/TileEditor-Bzk4U52d.js +2735 -0
  20. package/dist/TransitionFade-Blz6m84x.js +2499 -0
  21. package/dist/app.js +15 -41
  22. package/dist/assets/{formatChartData.worker-DOuklPCk.js → formatChartData.worker-CO5zKPH5.js} +6 -6
  23. package/dist/assets/{processTableData.worker-DphUPEW7.js → processTableData.worker-BAMcED0j.js} +6 -6
  24. package/dist/helper-B2iB0Dbh.js +75 -0
  25. package/dist/{vue-i18n-BJW_sJot.js → vue-i18n-D33f1SSo.js} +400 -405
  26. package/package.json +1 -1
  27. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js +0 -282
  28. package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-BlJuhyD7.js +0 -2377
  29. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BSapw37S.js +0 -107
  30. package/dist/ReportEditor-BiRciW22.js +0 -1055
  31. package/dist/TileEditor-S-aswtJh.js +0 -2744
  32. package/dist/TransitionFade-C6FDOvN4.js +0 -2365
@@ -1,2744 +0,0 @@
1
- import { defineComponent as M, mergeModels as J, useModel as ee, computed as _, ref as A, resolveComponent as x, createElementBlock as I, openBlock as h, createVNode as m, createElementVNode as C, unref as e, withCtx as $, toDisplayString as L, Fragment as Z, renderList as de, withModifiers as te, createTextVNode as re, watch as se, createCommentVNode as U, createBlock as T, onMounted as Ce, onUnmounted as Ae, renderSlot as $e, onBeforeUnmount as Xe, resolveDynamicComponent as Ne, normalizeClass as Oe, withDirectives as ae, vShow as ne, normalizeStyle as We, isRef as qe } from "vue";
2
- import { useRoute as He, useRouter as Ye } from "vue-router";
3
- import { h as Ee, d as ke, S as Fe, _ as Je, W as Ge, b as Ke, T as Qe, a as Ze } from "./TransitionFade-C6FDOvN4.js";
4
- import { W as B, b as Ie, d as me, D as el, S as Se, C as ll, P as Te, a as ol } from "./BaseDialog.vue_vue_type_script_setup_true_lang-dX7Y4f-_.js";
5
- import { storeToRefs as ue } from "pinia";
6
- import { u as Be } from "./message-dialog-UoMWOnil.js";
7
- import { u as H, h as Le, p as tl, b as je, d as pe } from "./vue-i18n-BJW_sJot.js";
8
- import { useSnackbar as al, useBreakpoints as Re, FmButtonColorThemeVariant as ce } from "@feedmepos/ui-library";
9
- import { _ as K } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js";
10
- import { r as Q } from "./i18n-Cif1I9J2.js";
11
- import { g as ve, u as fe, L as ie, b as he, _ as Me, a as nl } from "./FilterSelector.vue_vue_type_script_setup_true_lang-BlJuhyD7.js";
12
- import { d as ge } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js";
13
- import { _ as ze } from "./NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.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
- ], il = { class: "flex flex-col my-2 gap-8" }, sl = { class: "fm-typo-en-body-lg-600" }, ul = { class: "text-sm text-fm-color-neutral-gray-400" }, dl = ["onClick"], rl = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, ml = /* @__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(w) {
168
- const { t: c, te: o } = H(), u = ee(w, "modelValue"), n = w, { schemas: g } = ue(Ie()), d = _(
169
- () => g.value.map((b) => ({
170
- label: b.label,
171
- value: b.name,
172
- raw: b
173
- }))
174
- ), k = _(() => {
175
- if (u.value.schemaNames.length === 0 || s.value === 0)
176
- return d.value.filter((b) => !b.raw.isJoinOnly);
177
- {
178
- const b = u.value.schemaNames[0], y = g.value.find((v) => v.name === b), r = ((y == null ? void 0 : y.joins) || []).map((v) => v);
179
- return d.value.filter((v) => r.includes(v.raw.name));
180
- }
181
- }), p = A(!1), t = A(""), s = A(), f = al();
182
- function N(b) {
183
- var y;
184
- return Q(
185
- c,
186
- o,
187
- (y = g.value.find((r) => r.name === b)) == null ? void 0 : y.label,
188
- "schema"
189
- );
190
- }
191
- function D(b) {
192
- s.value = b, p.value = !0, b !== void 0 ? t.value = u.value.schemaNames[b] : t.value = "";
193
- }
194
- function O() {
195
- t.value !== "" ? (s.value !== void 0 ? u.value.schemaNames[s.value] = t.value : u.value.schemaNames.push(t.value), p.value = !1) : f.open({ message: c("report.section.schema.nothingSelected"), type: "error" });
196
- }
197
- return (b, y) => {
198
- const r = x("FmForm"), v = x("FmIcon"), a = x("FmField");
199
- return h(), I("div", il, [
200
- m(me, {
201
- modelValue: p.value,
202
- "onUpdate:modelValue": y[1] || (y[1] = (l) => p.value = l),
203
- title: n.label,
204
- "primary-button-label": e(c)("report.common.confirm"),
205
- "secondary-button-label": e(c)("report.common.cancel"),
206
- onConfirm: O
207
- }, {
208
- content: $(() => [
209
- m(r, { ref: "form" }, {
210
- default: $(() => [
211
- m(K, {
212
- modelValue: t.value,
213
- "onUpdate:modelValue": y[0] || (y[0] = (l) => t.value = l),
214
- label: e(c)("report.section.schema.title"),
215
- items: s.value === 0 ? d.value.map((l) => ({
216
- label: e(Q)(e(c), e(o), l.label, "schema"),
217
- value: l.value
218
- })) : k.value.map((l) => ({
219
- label: e(Q)(e(c), e(o), l.label, "schema"),
220
- value: l.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
- C("div", null, [
230
- C("p", sl, L(e(c)("report.section.schema.title")), 1),
231
- C("p", ul, L(e(c)("report.section.schema.description")), 1)
232
- ]),
233
- (h(!0), I(Z, null, de(u.value.schemaNames, (l, i) => (h(), I("div", {
234
- key: i,
235
- class: "flex flex-col gap-2 w-full"
236
- }, [
237
- C("div", {
238
- class: "flex items-center gap-2 border rounded-md border-neutral-300 p-2 h-[40px]",
239
- onClick: (V) => D(i)
240
- }, [
241
- C("p", rl, L(N(l)), 1),
242
- y[3] || (y[3] = C("div", { class: "grow" }, null, -1)),
243
- m(v, {
244
- name: "close",
245
- onClick: te(
246
- () => {
247
- u.value.schemaNames = e(Ee)(u.value.schemaNames, i);
248
- },
249
- ["stop"]
250
- )
251
- }, null, 8, ["onClick"])
252
- ], 8, dl)
253
- ]))), 128)),
254
- m(a, {
255
- class: "text-fm-color-typo-tertiary",
256
- onClick: y[2] || (y[2] = () => {
257
- D();
258
- })
259
- }, {
260
- default: $(() => [
261
- re(L(e(c)("report.section.schema.add")), 1)
262
- ]),
263
- _: 1
264
- })
265
- ]);
266
- };
267
- }
268
- }), pl = {
269
- key: 0,
270
- class: "flex flex-col my-2 gap-8"
271
- }, cl = { class: "fm-typo-en-body-lg-600 text-ellipsis line-clamp-1" }, vl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, fl = { 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(w) {
304
- const { t: c, te: o } = H(), u = ee(w, "modelValue"), n = w, g = A(!1), d = _(
305
- () => u.value.map((a, l) => ({
306
- index: l,
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 l, i, V;
313
- g.value = !0, t.value = a != null && a.value ? JSON.parse(
314
- JSON.stringify({
315
- ...a.value,
316
- label: Q(c, o, (l = a.value) == null ? void 0 : l.label, "other")
317
- })
318
- ) : void 0, k.value = a == null ? void 0 : a.index, s.value = !!((i = t.value) != null && i.dataFormula || (V = t.value) != null && V.displayFormula);
319
- }
320
- const t = A(void 0), s = A(!1), f = _(
321
- () => n.options.find(
322
- (a) => {
323
- var l, i;
324
- return a.schemaName === ((l = t.value) == null ? void 0 : l.schemaName) && a.name === ((i = t.value) == null ? void 0 : i.name);
325
- }
326
- ) ?? {}
327
- );
328
- se(
329
- () => {
330
- var a;
331
- return (a = t.value) == null ? void 0 : a.option;
332
- },
333
- () => {
334
- !N.value && t.value && (t.value.fillGap = !1);
335
- }
336
- );
337
- const N = _(
338
- () => {
339
- var a, l, i;
340
- return (i = (a = f.value) == null ? void 0 : a.fillGapDimensionOptions) == null ? void 0 : i.includes(((l = t.value) == null ? void 0 : l.option) || "");
341
- }
342
- );
343
- function D(a) {
344
- var l, i;
345
- (a.schemaName !== ((l = t.value) == null ? void 0 : l.schemaName) || a.name !== ((i = t.value) == null ? void 0 : i.name)) && (t.value = {
346
- schemaName: a.schemaName,
347
- name: a.name,
348
- option: a.dimensionOptions[0],
349
- label: Q(c, o, a.label, "other"),
350
- decimal: a.isNumericType ? 2 : void 0,
351
- hide: !1
352
- }, s.value = !1);
353
- }
354
- function O() {
355
- if (!t.value) {
356
- console.error("new field is undefined");
357
- return;
358
- }
359
- const a = [...d.value.map((l) => l.value)];
360
- k.value !== void 0 ? a[k.value] = t.value : a.push(t.value), u.value = a, g.value = !1;
361
- }
362
- function b(a) {
363
- const i = [...d.value.map((V) => V.value)].filter((V, F) => F !== a);
364
- u.value = i;
365
- }
366
- function y(a) {
367
- t.value && (t.value.decimal = Number(a));
368
- }
369
- const r = _(
370
- () => n.options.map((a) => ({
371
- label: a.labels.join(" "),
372
- value: a
373
- }))
374
- ), v = _(
375
- () => n.label ? n.label : c(`report.section.dimension.${n.label}`)
376
- );
377
- return (a, l) => {
378
- const i = x("FmTextField"), V = x("FmStepperField"), F = x("FmCheckbox"), z = x("FmTextarea"), Y = x("FmForm"), X = x("FmIcon"), W = x("FmButton"), G = x("FmListItem"), oe = x("FmList"), S = x("FmField");
379
- return w.max !== 0 ? (h(), I("div", pl, [
380
- m(me, {
381
- modelValue: g.value,
382
- "onUpdate:modelValue": l[12] || (l[12] = (P) => g.value = P),
383
- title: v.value,
384
- "primary-button-label": e(c)("report.common.confirm"),
385
- "secondary-button-label": e(c)("report.common.cancel"),
386
- onConfirm: O
387
- }, {
388
- content: $(() => [
389
- m(Y, {
390
- ref: "form",
391
- class: "flex flex-col gap-2 w-[490px]"
392
- }, {
393
- default: $(() => {
394
- var P, q, le, E, R, _e;
395
- return [
396
- m(K, {
397
- "model-value": f.value,
398
- items: r.value,
399
- placeholder: v.value,
400
- label: v.value,
401
- "onUpdate:modelValue": l[0] || (l[0] = (j) => D(j))
402
- }, null, 8, ["model-value", "items", "placeholder", "label"]),
403
- t.value ? (h(), I(Z, { key: 0 }, [
404
- m(i, {
405
- modelValue: t.value.label,
406
- "onUpdate:modelValue": l[1] || (l[1] = (j) => t.value.label = j),
407
- label: e(c)("report.section.dimension.label")
408
- }, null, 8, ["modelValue", "label"]),
409
- (((P = f.value) == null ? void 0 : P.dimensionOptions) || []).length > 0 ? (h(), T(K, {
410
- key: 0,
411
- modelValue: t.value.option,
412
- "onUpdate:modelValue": l[2] || (l[2] = (j) => t.value.option = j),
413
- items: ((q = f.value) == null ? void 0 : q.dimensionOptions.map((j) => ({
414
- label: e(Q)(e(c), e(o), j, "field"),
415
- value: j
416
- }))) ?? []
417
- }, null, 8, ["modelValue", "items"])) : U("", !0),
418
- (le = f.value) != null && le.isNumericType ? (h(), T(V, {
419
- key: 1,
420
- label: e(c)("report.common.decimal"),
421
- "model-value": ((E = t.value) == null ? void 0 : E.decimal) ?? 2,
422
- "onUpdate:modelValue": l[3] || (l[3] = (j) => {
423
- y(j);
424
- })
425
- }, null, 8, ["label", "model-value"])) : U("", !0),
426
- (R = f.value) != null && R.isNumericType ? (h(), T(K, {
427
- key: 2,
428
- modelValue: t.value.timeFormatter,
429
- "onUpdate:modelValue": l[4] || (l[4] = (j) => t.value.timeFormatter = j),
430
- placeholder: e(c)("report.section.dimension.timeFormatter"),
431
- label: e(c)("report.section.dimension.timeFormatter"),
432
- items: f.value.timeFormatters.map((j) => ({ label: j, value: j }))
433
- }, null, 8, ["modelValue", "placeholder", "label", "items"])) : U("", !0),
434
- N.value ? (h(), T(F, {
435
- key: 3,
436
- "model-value": t.value.fillGap ?? !1,
437
- label: e(c)("report.section.dimension.fillGap"),
438
- value: "",
439
- placeholder: "Fill gap",
440
- "onUpdate:modelValue": l[5] || (l[5] = (j) => {
441
- t.value && (t.value.fillGap = j);
442
- })
443
- }, null, 8, ["model-value", "label"])) : U("", !0),
444
- ((_e = f.value) == null ? void 0 : _e.type) === e(el).Timestamp ? (h(), T(F, {
445
- key: 4,
446
- "model-value": t.value.dateComparison ?? !1,
447
- label: e(c)("report.section.dimension.dateComparison"),
448
- value: "",
449
- "onUpdate:modelValue": l[6] || (l[6] = (j) => {
450
- t.value && (t.value.dateComparison = j);
451
- })
452
- }, null, 8, ["model-value", "label"])) : U("", !0),
453
- m(F, {
454
- modelValue: t.value.hide,
455
- "onUpdate:modelValue": l[7] || (l[7] = (j) => t.value.hide = j),
456
- label: e(c)("report.section.dimension.hide"),
457
- value: ""
458
- }, null, 8, ["modelValue", "label"]),
459
- n.hasRowColumn ? (h(), T(F, {
460
- key: 5,
461
- modelValue: t.value.moveToColumn,
462
- "onUpdate:modelValue": l[8] || (l[8] = (j) => t.value.moveToColumn = j),
463
- label: e(c)("report.section.dimension.moveToColumn"),
464
- value: ""
465
- }, null, 8, ["modelValue", "label"])) : U("", !0),
466
- m(F, {
467
- modelValue: s.value,
468
- "onUpdate:modelValue": l[9] || (l[9] = (j) => s.value = j),
469
- label: e(c)("report.section.dimension.advance"),
470
- value: !0
471
- }, null, 8, ["modelValue", "label"]),
472
- s.value ? (h(), T(z, {
473
- key: 6,
474
- modelValue: t.value.dataFormula,
475
- "onUpdate:modelValue": l[10] || (l[10] = (j) => t.value.dataFormula = j),
476
- placeholder: e(c)("report.section.dimension.dataFormula")
477
- }, null, 8, ["modelValue", "placeholder"])) : U("", !0),
478
- s.value ? (h(), T(z, {
479
- key: 7,
480
- modelValue: t.value.displayFormula,
481
- "onUpdate:modelValue": l[11] || (l[11] = (j) => t.value.displayFormula = j),
482
- placeholder: e(c)("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
- C("div", null, [
493
- C("p", cl, L(v.value), 1),
494
- C("p", vl, L(e(c)("report.section.dimension.description")), 1)
495
- ]),
496
- m(oe, null, {
497
- default: $(() => [
498
- m(e(ke), {
499
- list: u.value,
500
- "item-key": "id",
501
- class: "flex flex-col gap-2"
502
- }, {
503
- item: $(({ 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: $(() => [
509
- m(X, { name: "drag_handle" }),
510
- C("p", fl, L(e(Q)(e(c), e(o), P.label, "other")), 1),
511
- l[14] || (l[14] = C("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: l[13] || (l[13] = () => {
530
- p();
531
- })
532
- }, {
533
- default: $(() => [
534
- re(L(e(c)("report.section.dimension.add")), 1)
535
- ]),
536
- _: 1
537
- })
538
- ])) : U("", !0);
539
- };
540
- }
541
- }), we = {
542
- value: "_metric_name"
543
- };
544
- function gl(w, c, o) {
545
- switch (w) {
546
- case B.BarChart:
547
- case B.StackBarChart:
548
- case B.LineChart:
549
- case B.StackLineChart:
550
- case B.Circular:
551
- return c.length > 1;
552
- default:
553
- return o;
554
- }
555
- }
556
- function bl(w) {
557
- var u;
558
- const { rowIds: c, columnIds: o } = be(w.widget.config);
559
- return {
560
- ...w,
561
- widget: {
562
- ...w.widget,
563
- config: {
564
- ...w.widget.config,
565
- rowIds: c,
566
- columnIds: o,
567
- isDrillable: gl(
568
- w.widget.type,
569
- w.widget.config.dimensions,
570
- w.widget.config.isDrillable
571
- ),
572
- joinDatasources: (u = w.widget.config.joinDatasources) == null ? void 0 : u.map((n) => {
573
- const { rowIds: g, columnIds: d } = be(n);
574
- return {
575
- ...n,
576
- rowIds: g,
577
- columnIds: d
578
- };
579
- })
580
- }
581
- }
582
- };
583
- }
584
- function be(w) {
585
- const c = w.dimensions.filter((d) => d.hide !== !0 && !d.moveToColumn).map((d) => ve(d)), o = w.dimensions.filter((d) => d.hide !== !0 && d.moveToColumn == !0).map((d) => ve(d)), u = w.metrics.length > 0;
586
- u && w.metrics.find((d) => d.moveToRow == !0) ? c.push(we.value) : u && o.push(we.value);
587
- const n = [], g = [];
588
- for (const d of c)
589
- n.push(d);
590
- for (const d of o)
591
- g.push(d);
592
- return {
593
- rowIds: n,
594
- columnIds: g
595
- };
596
- }
597
- const yl = { class: "flex flex-col my-2 gap-8" }, hl = { class: "fm-typo-en-body-lg-600" }, Vl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Fl = { class: "fm-typo-en-body-lg-400 overflow-hidden text-ellipsis line-clamp-1" }, wl = /* @__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(w, { emit: c }) {
627
- const { t: o, te: u } = H(), n = ee(w, "modelValue"), g = w;
628
- _(() => !!g.max && n.value.length === g.max);
629
- const d = A(!1), k = _(
630
- () => n.value.map((l, i) => ({
631
- index: i,
632
- labels: [l.label || l.name],
633
- value: l
634
- }))
635
- ), p = A(n.value.length > 0 ? 0 : void 0);
636
- function t(l) {
637
- var i, V, F;
638
- d.value = !0, s.value = l != null && l.value ? JSON.parse(
639
- JSON.stringify({
640
- ...l.value,
641
- label: Q(o, u, l.value.label, "other")
642
- })
643
- ) : void 0, p.value = l == null ? void 0 : l.index, f.value = !!((i = s.value) != null && i.dataFormula || (V = s.value) != null && V.displayFormula), ((F = g.config.rowIds) == null ? void 0 : F.findIndex((z) => z === we.value)) !== -1 && s.value && (s.value.moveToRow = !0);
644
- }
645
- const s = A(void 0), f = A(!1), N = _(
646
- () => g.options.find(
647
- (l) => {
648
- var i, V;
649
- return l.schemaName === ((i = s.value) == null ? void 0 : i.schemaName) && l.name === ((V = s.value) == null ? void 0 : V.name);
650
- }
651
- ) ?? {}
652
- );
653
- function D(l, i) {
654
- var V;
655
- return (l == null ? void 0 : l.isNumericType) || ((V = l == null ? void 0 : l.isNumericAggregations) == null ? void 0 : V.includes(i || ""));
656
- }
657
- const O = _(
658
- () => {
659
- var l;
660
- return D(N.value, (l = s.value) == null ? void 0 : l.aggregation);
661
- }
662
- );
663
- se(O, (l) => {
664
- s.value && (l ? s.value.decimal = typeof s.value.decimal != "number" ? 2 : s.value.decimal : s.value.decimal = void 0);
665
- });
666
- function b(l) {
667
- var i, V;
668
- (l.schemaName !== ((i = s.value) == null ? void 0 : i.schemaName) || l.name !== ((V = s.value) == null ? void 0 : V.name)) && (s.value = {
669
- schemaName: l.schemaName,
670
- name: l.name,
671
- aggregation: l.aggregations[0],
672
- label: Q(o, u, l.label, "other"),
673
- decimal: D(l, l.aggregations[0]) ? 2 : void 0,
674
- moveToRow: !1,
675
- hide: !1
676
- }, f.value = !1);
677
- }
678
- function y() {
679
- const l = [...k.value.map((i) => i.value)];
680
- s.value && (p.value !== void 0 ? l[p.value] = s.value : l.push(s.value)), n.value = l, d.value = !1;
681
- }
682
- function r(l) {
683
- const i = [...k.value.map((V) => V.value)];
684
- i.splice(l, 1), n.value = i;
685
- }
686
- const v = _(
687
- () => g.options.map((l) => ({
688
- label: l.labels.join(" "),
689
- value: l
690
- }))
691
- ), a = _(
692
- () => g.label ? g.label : o(`report.section.metric.${g.label}`)
693
- );
694
- return (l, i) => {
695
- const V = x("FmTextField"), F = x("FmStepperField"), z = x("FmCheckbox"), Y = x("FmTextarea"), X = x("FmForm"), W = x("FmIcon"), G = x("FmButton"), oe = x("FmListItem"), S = x("FmList"), P = x("FmField");
696
- return h(), I("div", yl, [
697
- m(me, {
698
- modelValue: d.value,
699
- "onUpdate:modelValue": i[10] || (i[10] = (q) => d.value = q),
700
- title: a.value,
701
- onConfirm: y
702
- }, {
703
- content: $(() => [
704
- m(X, {
705
- ref: "form",
706
- class: "flex flex-col gap-2 w-[490px]"
707
- }, {
708
- default: $(() => {
709
- var q, le, E;
710
- return [
711
- m(K, {
712
- "model-value": N.value,
713
- items: v.value,
714
- placeholder: a.value,
715
- label: a.value,
716
- "onUpdate:modelValue": i[0] || (i[0] = (R) => b(R))
717
- }, null, 8, ["model-value", "items", "placeholder", "label"]),
718
- s.value ? (h(), I(Z, { key: 0 }, [
719
- m(V, {
720
- modelValue: s.value.label,
721
- "onUpdate:modelValue": i[1] || (i[1] = (R) => s.value.label = R),
722
- label: e(o)("report.section.metric.label")
723
- }, null, 8, ["modelValue", "label"]),
724
- (((q = N.value) == null ? void 0 : q.aggregations) || []).length > 0 ? (h(), T(K, {
725
- key: 0,
726
- modelValue: s.value.aggregation,
727
- "onUpdate:modelValue": i[2] || (i[2] = (R) => s.value.aggregation = R),
728
- label: e(o)("report.section.metric.aggregation"),
729
- items: ((le = N.value) == null ? void 0 : le.aggregations.map((R) => ({
730
- label: e(Q)(e(o), e(u), R, "field"),
731
- value: R
732
- }))) ?? []
733
- }, null, 8, ["modelValue", "label", "items"])) : U("", !0),
734
- O.value ? (h(), T(F, {
735
- key: 1,
736
- label: e(o)("report.common.decimal"),
737
- "model-value": ((E = s.value) == null ? void 0 : E.decimal) ?? 2,
738
- "onUpdate:modelValue": i[3] || (i[3] = (R) => {
739
- s.value && (s.value.decimal = R);
740
- })
741
- }, null, 8, ["label", "model-value"])) : U("", !0),
742
- O.value ? (h(), T(K, {
743
- key: 2,
744
- modelValue: s.value.timeFormatter,
745
- "onUpdate:modelValue": i[4] || (i[4] = (R) => s.value.timeFormatter = R),
746
- placeholder: e(o)("report.section.metric.timeFormatter"),
747
- label: e(o)("report.section.metric.timeFormatter"),
748
- items: N.value.timeFormatters.map((R) => ({ label: R, value: R }))
749
- }, null, 8, ["modelValue", "placeholder", "label", "items"])) : U("", !0),
750
- m(z, {
751
- modelValue: s.value.hide,
752
- "onUpdate:modelValue": i[5] || (i[5] = (R) => s.value.hide = R),
753
- label: e(o)("report.section.metric.hide"),
754
- value: ""
755
- }, null, 8, ["modelValue", "label"]),
756
- g.hasRowColumn ? (h(), T(z, {
757
- key: 3,
758
- modelValue: s.value.moveToRow,
759
- "onUpdate:modelValue": i[6] || (i[6] = (R) => s.value.moveToRow = R),
760
- label: e(o)("report.section.metric.moveToRow"),
761
- value: ""
762
- }, null, 8, ["modelValue", "label"])) : U("", !0),
763
- m(z, {
764
- modelValue: f.value,
765
- "onUpdate:modelValue": i[7] || (i[7] = (R) => f.value = R),
766
- label: e(o)("report.section.metric.advance"),
767
- value: !0
768
- }, null, 8, ["modelValue", "label"]),
769
- f.value ? (h(), T(Y, {
770
- key: 4,
771
- modelValue: s.value.dataFormula,
772
- "onUpdate:modelValue": i[8] || (i[8] = (R) => s.value.dataFormula = R),
773
- placeholder: e(o)("report.section.metric.dataFormula")
774
- }, null, 8, ["modelValue", "placeholder"])) : U("", !0),
775
- f.value ? (h(), T(Y, {
776
- key: 5,
777
- modelValue: s.value.displayFormula,
778
- "onUpdate:modelValue": i[9] || (i[9] = (R) => s.value.displayFormula = R),
779
- placeholder: e(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
- C("div", null, [
790
- C("p", hl, L(a.value), 1),
791
- C("p", Vl, L(e(o)("report.section.metric.description")), 1)
792
- ]),
793
- m(S, null, {
794
- default: $(() => [
795
- m(e(ke), {
796
- list: n.value,
797
- "item-key": "id",
798
- class: "flex flex-col gap-2 w-full"
799
- }, {
800
- item: $(({ 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) => t(k.value[le]), ["stop"])
804
- }, {
805
- default: $(() => [
806
- m(W, { name: "drag_handle" }),
807
- C("p", Fl, L(e(Q)(e(o), e(u), q.label, "other")), 1),
808
- i[12] || (i[12] = C("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: i[11] || (i[11] = () => {
827
- t();
828
- })
829
- }, {
830
- default: $(() => [
831
- re(L(e(o)("report.section.metric.add")), 1)
832
- ]),
833
- _: 1
834
- })
835
- ]);
836
- };
837
- }
838
- }), xl = { class: "flex flex-col my-2 gap-8" }, Cl = { class: "fm-typo-en-body-lg-600" }, kl = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, _l = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, Sl = /* @__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(w) {
855
- const { t: c } = H(), o = ee(w, "modelValue"), u = w, n = _(
856
- () => u.label ? u.label : c(`report.section.sort.${u.label}`)
857
- ), g = A(!1), d = _(
858
- () => o.value.map((y, r) => {
859
- const v = u.options.find(
860
- (a) => a.schemaName === y.schemaName && a.name === y.name
861
- );
862
- return {
863
- index: r,
864
- labels: (v == null ? void 0 : v.labels) || [y.schemaName, y.name],
865
- value: y
866
- };
867
- })
868
- ), k = A(o.value.length > 0 ? 0 : void 0);
869
- function p(y) {
870
- var r;
871
- g.value = !0, t.value = y != null && y.value ? JSON.parse(JSON.stringify(y.value)) : void 0, k.value = y == null ? void 0 : y.index, s.value = !!((r = t.value) != null && r.dataFormula);
872
- }
873
- const t = A(void 0), s = A(!1), f = _(
874
- () => u.options.find(
875
- (y) => {
876
- var r, v;
877
- return y.schemaName === ((r = t.value) == null ? void 0 : r.schemaName) && y.name === ((v = t.value) == null ? void 0 : v.name);
878
- }
879
- ) ?? {}
880
- );
881
- function N(y) {
882
- var r, v;
883
- (y.schemaName !== ((r = t.value) == null ? void 0 : r.schemaName) || y.name !== ((v = t.value) == null ? void 0 : v.name)) && (t.value = {
884
- schemaName: y.schemaName,
885
- name: y.name,
886
- dimensionOption: y.dimensionOptions[0],
887
- aggregation: null,
888
- type: Se.Asc
889
- });
890
- }
891
- function D() {
892
- if (!t.value) {
893
- console.log("new sort is undefined");
894
- return;
895
- }
896
- const y = [...d.value.map((r) => r.value)];
897
- k.value !== void 0 ? y[k.value] = t.value : y.push(t.value), o.value = y, g.value = !1;
898
- }
899
- function O(y) {
900
- const r = [...d.value.map((v) => v.value)];
901
- r.splice(y, 1), o.value = r, g.value = !1;
902
- }
903
- const b = _(
904
- () => u.options.map((y) => ({
905
- label: y.labels.join(" "),
906
- value: y
907
- }))
908
- );
909
- return (y, r) => {
910
- const v = x("FmCheckbox"), a = x("FmTextarea"), l = x("FmForm"), i = x("FmIcon"), V = x("FmButton"), F = x("FmListItem"), z = x("FmList"), Y = x("FmField");
911
- return h(), I("div", xl, [
912
- m(me, {
913
- modelValue: g.value,
914
- "onUpdate:modelValue": r[6] || (r[6] = (X) => g.value = X),
915
- title: n.value,
916
- onConfirm: D
917
- }, {
918
- content: $(() => [
919
- m(l, {
920
- ref: "form",
921
- class: "flex flex-col gap-2 w-[490px]"
922
- }, {
923
- default: $(() => {
924
- var X, W, G, oe;
925
- return [
926
- m(K, {
927
- "model-value": f.value,
928
- items: b.value,
929
- placeholder: n.value,
930
- label: n.value,
931
- "onUpdate:modelValue": r[0] || (r[0] = (S) => N(S))
932
- }, null, 8, ["model-value", "items", "placeholder", "label"]),
933
- t.value ? (h(), I(Z, { key: 0 }, [
934
- (((X = f.value) == null ? void 0 : X.dimensionOptions) || []).length > 0 ? (h(), T(K, {
935
- key: 0,
936
- modelValue: t.value.dimensionOption,
937
- "onUpdate:modelValue": r[1] || (r[1] = (S) => t.value.dimensionOption = S),
938
- items: ((W = f.value) == null ? void 0 : W.dimensionOptions.map((S) => ({ label: S, value: S }))) ?? [],
939
- placeholder: e(c)("report.section.sort.format"),
940
- label: e(c)("report.section.sort.format")
941
- }, null, 8, ["modelValue", "items", "placeholder", "label"])) : U("", !0),
942
- (((G = f.value) == null ? void 0 : G.aggregations) || []).length > 0 ? (h(), T(K, {
943
- key: 1,
944
- modelValue: t.value.aggregation,
945
- "onUpdate:modelValue": r[2] || (r[2] = (S) => t.value.aggregation = S),
946
- items: ((oe = f.value) == null ? void 0 : oe.aggregations.map((S) => ({ label: S, value: S }))) ?? [],
947
- label: e(c)("report.section.sort.aggregation"),
948
- placeholder: e(c)("report.section.sort.aggregation")
949
- }, null, 8, ["modelValue", "items", "label", "placeholder"])) : U("", !0),
950
- m(K, {
951
- modelValue: t.value.type,
952
- "onUpdate:modelValue": r[3] || (r[3] = (S) => t.value.type = S),
953
- items: Object.values(e(Se)).map((S) => ({ label: S, value: S })),
954
- placeholder: e(c)("report.section.sort.order"),
955
- label: e(c)("report.section.sort.order")
956
- }, null, 8, ["modelValue", "items", "placeholder", "label"]),
957
- m(v, {
958
- modelValue: s.value,
959
- "onUpdate:modelValue": r[4] || (r[4] = (S) => s.value = S),
960
- label: e(c)("report.section.sort.advance"),
961
- value: !0
962
- }, null, 8, ["modelValue", "label"]),
963
- s.value ? (h(), T(a, {
964
- key: 2,
965
- modelValue: t.value.dataFormula,
966
- "onUpdate:modelValue": r[5] || (r[5] = (S) => t.value.dataFormula = S),
967
- placeholder: e(c)("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
- C("div", null, [
978
- C("p", Cl, L(n.value), 1),
979
- C("p", kl, L(e(c)("report.section.sort.description")), 1)
980
- ]),
981
- m(z, null, {
982
- default: $(() => [
983
- m(e(ke), {
984
- list: o.value,
985
- "item-key": "id",
986
- class: "flex flex-col gap-2 w-full"
987
- }, {
988
- item: $(({ element: X, index: W }) => [
989
- m(F, {
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: $(() => [
994
- m(i, { name: "drag_handle" }),
995
- C("p", _l, L(e(Le)(X.name)), 1),
996
- r[8] || (r[8] = C("div", { class: "grow" }, null, -1)),
997
- m(V, {
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: $(() => [
1019
- re(L(e(c)("report.section.sort.add")), 1)
1020
- ]),
1021
- _: 1
1022
- })
1023
- ]);
1024
- };
1025
- }
1026
- }), Tl = { class: "fm-typo-en-body-lg-600" }, Ul = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Dl = /* @__PURE__ */ M({
1027
- __name: "LimitSection",
1028
- props: {
1029
- modelValue: { required: !0, default: null },
1030
- modelModifiers: {}
1031
- },
1032
- emits: ["update:modelValue"],
1033
- setup(w) {
1034
- const { t: c } = H(), o = ee(w, "modelValue"), u = ge((n) => {
1035
- n !== "" ? o.value = n : o.value = null;
1036
- }, 1e3);
1037
- return (n, g) => {
1038
- const d = x("FmTextField");
1039
- return h(), I(Z, null, [
1040
- C("div", null, [
1041
- C("p", Tl, L(e(c)("report.section.limit.title")), 1),
1042
- C("p", Ul, L(e(c)("report.section.limit.description")), 1)
1043
- ]),
1044
- m(d, {
1045
- "model-value": o.value,
1046
- inputmode: "numeric",
1047
- placeholder: e(c)("report.section.limit.placeholder"),
1048
- "onUpdate:modelValue": g[0] || (g[0] = (k) => e(u)(k))
1049
- }, null, 8, ["model-value", "placeholder"])
1050
- ], 64);
1051
- };
1052
- }
1053
- }), $l = { class: "flex flex-col my-2 gap-8" }, Nl = { class: "fm-typo-en-body-lg-600" }, Ol = { class: "fm-typo-en-body-sm-600 text-fm-color-neutral-gray-400" }, Il = { class: "fm-typo-en-body-lg-400 text-ellipsis overflow-hidden line-clamp-1" }, 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(w) {
1070
- const { t: c } = H(), o = ee(w, "modelValue"), u = w, n = A(!1), g = _(
1071
- () => o.value.map((r, v) => {
1072
- var a, l;
1073
- return {
1074
- index: v,
1075
- labels: [(a = r.joinDimension) == null ? void 0 : a.schemaName, (l = r.joinDimension) == null ? void 0 : l.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), n.value = !0;
1086
- }
1087
- const p = A(void 0), t = _(
1088
- () => u.joinFieldOptions.find(
1089
- (r) => {
1090
- var v, a;
1091
- return r.schemaName === ((a = (v = p.value) == null ? void 0 : v.joinDimension) == null ? void 0 : a.schemaName) && r.name === p.value.joinDimension.name;
1092
- }
1093
- ) ?? {}
1094
- ), s = _(
1095
- () => {
1096
- var r;
1097
- return (((r = p.value) == null ? void 0 : r.mainDimensions) || []).map(
1098
- (v) => u.mainFieldOptions.find(
1099
- (a) => a.schemaName === (v == null ? void 0 : v.schemaName) && a.name === v.name
1100
- ) ?? {}
1101
- );
1102
- }
1103
- ), f = _(
1104
- () => u.joinFieldOptions.map((r) => ({ label: r.labels.join(" "), value: r }))
1105
- );
1106
- function N(r) {
1107
- var v, a, l, i;
1108
- p.value && (p.value && r.schemaName !== ((a = (v = p.value) == null ? void 0 : v.joinDimension) == null ? void 0 : a.schemaName) || r.name !== ((i = (l = p.value) == null ? void 0 : l.joinDimension) == null ? void 0 : i.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, v) {
1120
- var a, l, i, V;
1121
- if (p.value && v >= 0 && (p.value && r.schemaName !== ((l = (a = p.value) == null ? void 0 : a.mainDimensions[v]) == null ? void 0 : l.schemaName) || r.name !== ((V = (i = p.value) == null ? void 0 : i.mainDimensions[v]) == null ? void 0 : V.name))) {
1122
- const F = [...p.value.mainDimensions];
1123
- F[v] = {
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: F
1132
- };
1133
- }
1134
- }
1135
- function O(r) {
1136
- if (p.value)
1137
- switch (r) {
1138
- case ll.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 = [...g.value.map((v) => v.value)];
1156
- p.value && (p.value.mainDimensions = p.value.mainDimensions.filter(
1157
- (v) => v !== "" && v != null
1158
- ), d.value !== void 0 ? r[d.value] = p.value : r.push(p.value)), o.value = r, n.value = !1;
1159
- }
1160
- function y(r) {
1161
- const v = [...g.value.map((a) => a.value)];
1162
- v.splice(r, 1), o.value = v;
1163
- }
1164
- return (r, v) => {
1165
- const a = x("FmMenuDivider"), l = x("FmForm"), i = x("FmButton"), V = x("FmListItem"), F = x("FmList"), z = x("FmField");
1166
- return h(), I("div", $l, [
1167
- m(me, {
1168
- modelValue: n.value,
1169
- "onUpdate:modelValue": v[2] || (v[2] = (Y) => n.value = Y),
1170
- title: e(c)("report.section.condition.condition"),
1171
- onConfirm: b
1172
- }, {
1173
- content: $(() => [
1174
- m(l, {
1175
- ref: "form",
1176
- class: "flex flex-col gap-2 w-[490px]"
1177
- }, {
1178
- default: $(() => {
1179
- var Y, X, W, G, oe;
1180
- return [
1181
- m(K, {
1182
- label: e(c)("report.section.condition.joinDatasource"),
1183
- "model-value": t.value,
1184
- items: f.value,
1185
- placeholder: e(c)("report.section.condition.joinDimension"),
1186
- "onUpdate:modelValue": v[0] || (v[0] = (S) => N(S))
1187
- }, null, 8, ["label", "model-value", "items", "placeholder"]),
1188
- m(a),
1189
- (Y = p.value) != null && Y.joinDimension && (((X = t.value) == null ? void 0 : X.dimensionOptions) || []).length > 0 ? (h(), T(K, {
1190
- key: 0,
1191
- modelValue: p.value.joinDimension.option,
1192
- "onUpdate:modelValue": v[1] || (v[1] = (S) => p.value.joinDimension.option = S),
1193
- label: e(c)("report.section.condition.format"),
1194
- items: ((W = t.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 = t.value) == null ? void 0 : G.joinConditionOperators) || []).length > 0 ? (h(), T(K, {
1200
- key: 1,
1201
- "model-value": p.value.operator,
1202
- label: e(c)("report.section.condition.operator"),
1203
- items: t.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, de(((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": s.value[P],
1217
- label: e(c)("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 = s.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 = s.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
- C("div", null, [
1244
- C("p", Nl, L(e(c)("report.section.condition.condition")), 1),
1245
- C("p", Ol, L(e(c)("report.section.condition.description")), 1)
1246
- ]),
1247
- m(F, { class: "flex flex-col gap-2" }, {
1248
- default: $(() => [
1249
- (h(!0), I(Z, null, de(o.value, (Y, X) => (h(), T(V, {
1250
- key: X,
1251
- class: "!cursor-grab border rounded-md border-neutral-300 h-[40px] !p-[8px]",
1252
- onClick: (W) => k(g.value[X])
1253
- }, {
1254
- default: $(() => {
1255
- var W, G;
1256
- return [
1257
- C("p", Il, L(e(tl)(((W = Y.joinDimension) == null ? void 0 : W.schemaName) ?? "")) + " " + L((G = Y.joinDimension) == null ? void 0 : G.label), 1),
1258
- v[4] || (v[4] = C("div", { class: "grow" }, null, -1)),
1259
- m(i, {
1260
- icon: "close",
1261
- size: "md",
1262
- variant: "tertiary",
1263
- onClick: te((oe) => y(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: v[3] || (v[3] = (Y) => k())
1275
- }, {
1276
- default: $(() => [
1277
- re(L(e(c)("report.section.condition.add")), 1)
1278
- ]),
1279
- _: 1
1280
- })
1281
- ]);
1282
- };
1283
- }
1284
- }), Ll = /* @__PURE__ */ M({
1285
- __name: "TableResizeSection",
1286
- props: {
1287
- model: {}
1288
- },
1289
- setup(w) {
1290
- const { t: c, te: o } = H(), u = w, { isEditing: n, colWidths: g, rowHeight: d } = ue(fe()), { enableCellResizing: k, cancelResizingChanges: p } = fe();
1291
- return Ce(() => {
1292
- u.model.rowHeight !== void 0 && (d.value = u.model.rowHeight), u.model.colWidths && (g.value = [...u.model.colWidths]);
1293
- }), (t, s) => {
1294
- const f = x("FmButton");
1295
- return h(), I(Z, null, [
1296
- m(f, {
1297
- label: e(c)("report.section.datasource.resizeTable"),
1298
- onClick: e(k)
1299
- }, null, 8, ["label", "onClick"]),
1300
- e(n) ? (h(), T(f, {
1301
- key: 0,
1302
- label: e(c)("report.common.cancel"),
1303
- onClick: e(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(w, { emit: c }) {
1339
- const { disableEditMode: o, resetStore: u } = fe(), n = ee(w, "modelValue");
1340
- se(
1341
- [() => n.value.dimensions, () => n.value.metrics],
1342
- () => {
1343
- const { rowIds: v, columnIds: a } = be(n.value);
1344
- n.value.rowIds = v, n.value.columnIds = a;
1345
- },
1346
- { deep: !0 }
1347
- );
1348
- const g = w, d = c, { schemas: k } = ue(Ie());
1349
- Ae(() => {
1350
- o(), u();
1351
- });
1352
- const { t: p, te: t } = H(), s = _(() => !g.mainDatasourceConfig), f = _(
1353
- () => [B.BarChart, B.LineChart, B.Scorecard].includes(g.config.type)
1354
- ), N = _(() => {
1355
- const v = [...n.value.dimensions].filter((a) => !a.hide);
1356
- return v.sort(
1357
- (a, l) => (n.value.rowIds || []).indexOf(ve(a)) - (n.value.rowIds || []).indexOf(ve(l))
1358
- ), v;
1359
- }), D = _(() => g.config.type === B.Scorecard), O = _(
1360
- () => {
1361
- var v;
1362
- return (((v = g.mainDatasourceConfig) == null ? void 0 : v.schemaNames) || []).reduce(
1363
- (a, l) => {
1364
- const i = k.value.find((V) => V.name === l);
1365
- return i && (a = [
1366
- ...a,
1367
- ...i.fields.map((V) => ({
1368
- ...V,
1369
- labels: [
1370
- Q(p, t, i.label, "schema"),
1371
- Q(p, t, V.label || V.name, "other")
1372
- ]
1373
- }))
1374
- ]), a;
1375
- },
1376
- []
1377
- );
1378
- }
1379
- ), b = _(
1380
- () => n.value.schemaNames.reduce((v, a) => {
1381
- const l = k.value.find((i) => i.name === a);
1382
- return l && (v = [
1383
- ...v,
1384
- ...l.fields.map((i) => ({
1385
- ...i,
1386
- labels: [
1387
- Q(p, t, l.label, "schema"),
1388
- Q(p, t, i.label || i.name, "other")
1389
- ]
1390
- }))
1391
- ]), v;
1392
- }, [])
1393
- ), y = _(() => [
1394
- { label: p("report.section.datasource.none"), value: null },
1395
- { label: p("report.section.datasource.grandTotal"), value: 0 },
1396
- ...[...N.value].slice(0, N.value.length - 1).map((v, a) => ({
1397
- label: Q(p, t, v.label, "other"),
1398
- value: a + 1
1399
- }))
1400
- ]), r = [
1401
- {
1402
- label: "None",
1403
- value: null
1404
- },
1405
- ...Object.keys(Te).map((v) => ({
1406
- label: v,
1407
- value: Te[v]
1408
- }))
1409
- ];
1410
- return (v, a) => {
1411
- const l = x("FmButton"), i = x("FmSwitch"), V = x("FmSelect");
1412
- return h(), T(Fe, null, {
1413
- header: $(() => [
1414
- C("p", null, L(g.label), 1),
1415
- a[20] || (a[20] = C("div", { class: "grow" }, null, -1)),
1416
- g.closeable ? (h(), T(l, {
1417
- key: 0,
1418
- icon: "close",
1419
- variant: "tertiary",
1420
- size: "md",
1421
- onClick: a[0] || (a[0] = te((F) => d("click-close"), ["stop"]))
1422
- })) : U("", !0)
1423
- ]),
1424
- content: $(() => [
1425
- m(ml, {
1426
- modelValue: n.value,
1427
- "onUpdate:modelValue": a[1] || (a[1] = (F) => n.value = F),
1428
- label: e(p)("report.section.schema.title")
1429
- }, null, 8, ["modelValue", "label"]),
1430
- m(Ve, {
1431
- modelValue: n.value.dimensions,
1432
- "onUpdate:modelValue": a[2] || (a[2] = (F) => n.value.dimensions = F),
1433
- options: b.value,
1434
- config: n.value,
1435
- max: g.config.maxDimension,
1436
- "has-row-column": !0,
1437
- onConfig: a[3] || (a[3] = (F) => {
1438
- n.value = F;
1439
- })
1440
- }, null, 8, ["modelValue", "options", "config", "max"]),
1441
- m(i, {
1442
- "label-placement": "right",
1443
- label: e(p)("report.section.datasource.comparable"),
1444
- "model-value": n.value.isComparable ?? !1,
1445
- "onUpdate:modelValue": a[4] || (a[4] = (F) => {
1446
- n.value.isComparable = F;
1447
- })
1448
- }, null, 8, ["label", "model-value"]),
1449
- f.value ? (h(), T(i, {
1450
- key: 0,
1451
- "label-placement": "right",
1452
- label: e(p)("report.section.datasource.cumulative"),
1453
- "model-value": n.value.isCumulative ?? !1,
1454
- "onUpdate:modelValue": a[5] || (a[5] = (F) => {
1455
- n.value.isCumulative = F;
1456
- })
1457
- }, null, 8, ["label", "model-value"])) : U("", !0),
1458
- g.config.isDrillConfigurable && s.value ? (h(), T(i, {
1459
- key: 1,
1460
- label: e(p)("report.section.datasource.drill"),
1461
- "label-placement": "right",
1462
- "model-value": n.value.isDrillable ?? !1,
1463
- "onUpdate:modelValue": a[6] || (a[6] = (F) => {
1464
- n.value.isDrillable = F;
1465
- })
1466
- }, null, 8, ["label", "model-value"])) : U("", !0),
1467
- s.value ? (h(), T(i, {
1468
- key: 2,
1469
- modelValue: n.value.isBlend,
1470
- "onUpdate:modelValue": a[7] || (a[7] = (F) => n.value.isBlend = F),
1471
- label: e(p)("report.section.datasource.blend"),
1472
- "label-placement": "right"
1473
- }, null, 8, ["modelValue", "label"])) : U("", !0),
1474
- g.config.canRollup && s.value ? (h(), T(V, {
1475
- key: 3,
1476
- modelValue: n.value.rollup,
1477
- "onUpdate:modelValue": a[8] || (a[8] = (F) => n.value.rollup = F),
1478
- label: e(p)("report.section.datasource.subTotal"),
1479
- items: y.value
1480
- }, null, 8, ["modelValue", "label", "items"])) : U("", !0),
1481
- s.value ? U("", !0) : (h(), T(V, {
1482
- key: 4,
1483
- modelValue: n.value.periodType,
1484
- "onUpdate:modelValue": a[9] || (a[9] = (F) => n.value.periodType = F),
1485
- label: e(p)("report.section.datasource.periodType"),
1486
- items: r
1487
- }, null, 8, ["modelValue", "label"])),
1488
- g.config.canTranspose && s.value ? (h(), T(i, {
1489
- key: 5,
1490
- modelValue: n.value.isTransposed,
1491
- "onUpdate:modelValue": a[10] || (a[10] = (F) => n.value.isTransposed = F),
1492
- label: e(p)("report.section.datasource.transpose"),
1493
- "label-placement": "right"
1494
- }, null, 8, ["modelValue", "label"])) : U("", !0),
1495
- g.config.hasTable ? (h(), T(Ll, {
1496
- key: 6,
1497
- model: n.value,
1498
- "onUpdate:model": a[11] || (a[11] = (F) => n.value = F)
1499
- }, null, 8, ["model"])) : U("", !0),
1500
- g.config.hasBreakdownDimension ? (h(), T(Ve, {
1501
- key: 7,
1502
- "model-value": n.value.breakdownDimension ? [n.value.breakdownDimension] : [],
1503
- label: e(p)("report.section.dimension.breakdownDimension"),
1504
- max: 1,
1505
- options: b.value,
1506
- "onUpdate:modelValue": a[12] || (a[12] = (F) => {
1507
- n.value.breakdownDimension = F[0];
1508
- })
1509
- }, null, 8, ["model-value", "label", "options"])) : U("", !0),
1510
- D.value ? (h(), T(Ve, {
1511
- key: 8,
1512
- "model-value": n.value.sparklineDimension ? [n.value.sparklineDimension] : [],
1513
- label: e(p)("report.section.dimension.sparklineDimension"),
1514
- max: 1,
1515
- options: b.value,
1516
- "onUpdate:modelValue": a[13] || (a[13] = (F) => {
1517
- n.value.sparklineDimension = F[0];
1518
- })
1519
- }, null, 8, ["model-value", "label", "options"])) : U("", !0),
1520
- m(wl, {
1521
- modelValue: n.value.metrics,
1522
- "onUpdate:modelValue": a[14] || (a[14] = (F) => n.value.metrics = F),
1523
- options: b.value,
1524
- max: g.config.maxMetric,
1525
- config: n.value,
1526
- "has-row-column": g.config.type === e(B).Table,
1527
- onConfig: a[15] || (a[15] = (F) => {
1528
- n.value = F;
1529
- })
1530
- }, null, 8, ["modelValue", "options", "max", "config", "has-row-column"]),
1531
- m(Je, {
1532
- modelValue: n.value.filters,
1533
- "onUpdate:modelValue": a[16] || (a[16] = (F) => n.value.filters = F),
1534
- options: b.value
1535
- }, null, 8, ["modelValue", "options"]),
1536
- m(Sl, {
1537
- modelValue: n.value.sorts,
1538
- "onUpdate:modelValue": a[17] || (a[17] = (F) => n.value.sorts = F),
1539
- options: b.value
1540
- }, null, 8, ["modelValue", "options"]),
1541
- m(Dl, {
1542
- modelValue: n.value.limit,
1543
- "onUpdate:modelValue": a[18] || (a[18] = (F) => n.value.limit = F)
1544
- }, null, 8, ["modelValue"]),
1545
- n.value.conditions ? (h(), T(Bl, {
1546
- key: 9,
1547
- modelValue: n.value.conditions,
1548
- "onUpdate:modelValue": a[19] || (a[19] = (F) => n.value.conditions = F),
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
- }), jl = { 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(w) {
1570
- const { t: c } = H(), o = ee(w, "modelValue"), u = w;
1571
- return (n, g) => {
1572
- const d = x("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: g[0] || (g[0] = (k) => o.value = !o.value)
1576
- }, [
1577
- C("p", jl, L(e(c)("report.tile.setting")), 1),
1578
- g[1] || (g[1] = C("div", { class: "grow" }, null, -1)),
1579
- m(d, {
1580
- name: u.icon
1581
- }, null, 8, ["name"])
1582
- ]);
1583
- };
1584
- }
1585
- }), Rl = /* @__PURE__ */ M({
1586
- __name: "TileEditorTabDesktop",
1587
- props: {
1588
- modelValue: { required: !0, default: !1 },
1589
- modelModifiers: {}
1590
- },
1591
- emits: ["update:modelValue"],
1592
- setup(w) {
1593
- const c = ee(w, "modelValue");
1594
- return (o, u) => (h(), I(Z, null, [
1595
- m(xe, {
1596
- modelValue: c.value,
1597
- "onUpdate:modelValue": u[0] || (u[0] = (n) => c.value = n),
1598
- icon: "keyboard_double_arrow_left"
1599
- }, null, 8, ["modelValue"]),
1600
- $e(o.$slots, "default")
1601
- ], 64));
1602
- }
1603
- }), Ml = { class: "fixed bottom-0 w-full" }, zl = /* @__PURE__ */ M({
1604
- __name: "TileEditorTabMobile",
1605
- props: {
1606
- modelValue: { required: !0, default: !1 },
1607
- modelModifiers: {}
1608
- },
1609
- emits: ["update:modelValue"],
1610
- setup(w) {
1611
- const c = ee(w, "modelValue");
1612
- return (o, u) => {
1613
- const n = x("FmTopSheet");
1614
- return h(), I("div", Ml, [
1615
- m(xe, {
1616
- modelValue: c.value,
1617
- "onUpdate:modelValue": u[0] || (u[0] = (g) => c.value = g),
1618
- icon: "keyboard_double_arrow_up"
1619
- }, null, 8, ["modelValue"]),
1620
- m(n, {
1621
- modelValue: c.value,
1622
- "onUpdate:modelValue": u[2] || (u[2] = (g) => c.value = g),
1623
- "fullscreen-size": "sm"
1624
- }, {
1625
- default: $(() => [
1626
- m(xe, {
1627
- modelValue: c.value,
1628
- "onUpdate:modelValue": u[1] || (u[1] = (g) => c.value = g),
1629
- icon: "keyboard_double_arrow_down"
1630
- }, null, 8, ["modelValue"]),
1631
- c.value ? $e(o.$slots, "default", { key: 0 }) : U("", !0)
1632
- ]),
1633
- _: 3
1634
- }, 8, ["modelValue"])
1635
- ]);
1636
- };
1637
- }
1638
- }), Pl = { class: "flex gap-16" }, Al = { class: "flex flex-col gap-8 max-w-[120px]" }, Xl = { class: "fm-typo-en-body-lg-600" }, Wl = { class: "flex flex-col gap-16" }, ql = { class: "flex flex-row gap-8" }, Hl = /* @__PURE__ */ M({
1639
- __name: "TitleSection",
1640
- props: {
1641
- model: {}
1642
- },
1643
- emits: ["update:model"],
1644
- setup(w, { emit: c }) {
1645
- const o = w, u = c, { t: n } = H(), g = _({
1646
- get: () => o.model.showTitle ?? !1,
1647
- set: (s) => u("update:model", { ...o.model, showTitle: s })
1648
- }), d = _({
1649
- get: () => o.model.titleFontSize ?? 14,
1650
- set: (s) => u("update:model", { ...o.model, titleFontSize: Math.min(Number(s), 24) })
1651
- }), k = _({
1652
- get: () => o.model.titleBold ?? !1,
1653
- set: (s) => u("update:model", { ...o.model, titleBold: s })
1654
- }), p = _({
1655
- get: () => o.model.titleItalic ?? !1,
1656
- set: (s) => u("update:model", { ...o.model, titleItalic: s })
1657
- }), t = _({
1658
- get: () => o.model.titleUnderline ?? !1,
1659
- set: (s) => u("update:model", { ...o.model, titleUnderline: s })
1660
- });
1661
- return (s, f) => {
1662
- const N = x("FmStepperField"), D = x("FmButton"), O = x("FmSwitch");
1663
- return h(), I(Z, null, [
1664
- C("div", null, [
1665
- C("div", Pl, [
1666
- C("div", Al, [
1667
- C("p", Xl, L(e(n)("report.section.datasource.title.titleFontSize")), 1),
1668
- m(N, {
1669
- modelValue: d.value,
1670
- "onUpdate:modelValue": f[0] || (f[0] = (b) => d.value = b),
1671
- max: 24,
1672
- min: 1,
1673
- type: "number"
1674
- }, null, 8, ["modelValue"])
1675
- ]),
1676
- C("div", Wl, [
1677
- f[5] || (f[5] = C("p", { class: "fm-typo-en-body-lg-600" }, "Text style and format", -1)),
1678
- C("div", ql, [
1679
- m(D, {
1680
- "append-icon": "format_bold",
1681
- "model-value": s.model.titleBold ?? !1,
1682
- variant: "tertiary",
1683
- "icon-color": s.model.titleBold ? "neutral-gray-400" : "neutral-gray-300",
1684
- "bg-color": s.model.titleBold ? "neutral-gray-100" : "neutral-white",
1685
- class: "rounded-sm",
1686
- onClick: f[1] || (f[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": s.model.titleItalic ?? !1,
1691
- "icon-color": s.model.titleItalic ? "neutral-gray-400" : "neutral-gray-300",
1692
- "bg-color": s.model.titleItalic ? "neutral-gray-100" : "neutral-white",
1693
- class: "rounded-sm",
1694
- onClick: f[2] || (f[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": s.model.titleUnderline ?? !1,
1699
- "icon-color": s.model.titleUnderline ? "neutral-gray-400" : "neutral-gray-300",
1700
- "bg-color": s.model.titleUnderline ? "neutral-gray-100" : "neutral-white",
1701
- class: "rounded-sm",
1702
- onClick: f[3] || (f[3] = (b) => t.value = !t.value)
1703
- }, null, 8, ["model-value", "icon-color", "bg-color"])
1704
- ])
1705
- ])
1706
- ])
1707
- ]),
1708
- m(O, {
1709
- modelValue: g.value,
1710
- "onUpdate:modelValue": f[4] || (f[4] = (b) => g.value = b),
1711
- label: e(n)("report.section.datasource.title.showTitle"),
1712
- "label-placement": "right"
1713
- }, null, 8, ["modelValue", "label"])
1714
- ], 64);
1715
- };
1716
- }
1717
- }), Yl = { class: "flex gap-16 justify-center items-center" }, El = { class: "fm-typo-en-title-sm-600" }, Jl = { class: "fm-typo-en-body-lg-600" }, Gl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-tertiary" }, Kl = { class: "h-[40x]" }, De = "YYYY-MM-DD", Pe = /* @__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(w, { emit: c }) {
1732
- var a, l;
1733
- const o = je(), { dateRange: u } = ue(o), n = {
1734
- startDate: u.value.startDate,
1735
- endDate: u.value.endDate
1736
- }, g = A({
1737
- startDate: (a = pe(u.value.startDate)) == null ? void 0 : a.local().format(De),
1738
- endDate: (l = pe(u.value.endDate)) == null ? void 0 : l.local().format(De)
1739
- });
1740
- se(
1741
- g,
1742
- ({ startDate: i, endDate: V }) => {
1743
- u.value = {
1744
- startDate: pe(i).toISOString(),
1745
- endDate: pe(V).toISOString()
1746
- };
1747
- },
1748
- { deep: !0, immediate: !0 }
1749
- ), Xe(() => {
1750
- u.value = { ...n };
1751
- });
1752
- const d = ee(w, "modelValue"), { breakpoints: k } = Re(), p = w, { promptMessage: t } = Be(), s = c, { t: f } = H();
1753
- function N(i) {
1754
- d.value = bl(i);
1755
- }
1756
- function D() {
1757
- const i = [...d.value.widget.config.joinDatasources || []];
1758
- i.push({ ...Ke(d.value.widget.type), conditions: [] }), N({
1759
- ...d.value,
1760
- widget: {
1761
- ...d.value.widget,
1762
- config: {
1763
- ...d.value.widget.config,
1764
- joinDatasources: i
1765
- }
1766
- }
1767
- });
1768
- }
1769
- async function O(i) {
1770
- if (!await t({
1771
- title: f("report.tile.datasource.remove"),
1772
- message: f("report.tile.datasource.confirmRemove", { index: i + 1 })
1773
- })) return;
1774
- const F = [...d.value.widget.config.joinDatasources || []];
1775
- F.splice(i, 1), N({
1776
- ...d.value,
1777
- widget: {
1778
- ...d.value.widget,
1779
- config: {
1780
- ...d.value.widget.config,
1781
- joinDatasources: F
1782
- }
1783
- }
1784
- });
1785
- }
1786
- const b = (i, V) => {
1787
- let F = 1, z = 1;
1788
- switch (i) {
1789
- case B.Scorecard:
1790
- F = 1, z = 2;
1791
- break;
1792
- case B.BarChart:
1793
- case B.StackBarChart:
1794
- case B.LineChart:
1795
- case B.StackLineChart:
1796
- F = 4, z = 6;
1797
- break;
1798
- case B.Table:
1799
- F = 4, z = 12;
1800
- break;
1801
- case B.Circular:
1802
- F = 4, z = 4;
1803
- break;
1804
- case B.Spacer:
1805
- F = 0, z = 12;
1806
- break;
1807
- }
1808
- return {
1809
- size: {
1810
- height: F,
1811
- width: z
1812
- },
1813
- widget: {
1814
- ...V.widget,
1815
- type: i
1816
- }
1817
- };
1818
- }, y = _(
1819
- () => ye.find((i) => i.type === d.value.widget.type)
1820
- ), r = _(() => d.value.widget.config.joinDatasources), v = ge((i) => {
1821
- d.value.widget.title = i;
1822
- }, 500);
1823
- return se(
1824
- () => d.value.size.height,
1825
- (i) => {
1826
- i < 1 && (d.value.size.height = 1), i > 12 && (d.value.size.height = 12);
1827
- }
1828
- ), se(
1829
- () => d.value.size.width,
1830
- (i) => {
1831
- i < 1 && (d.value.size.width = 1), i > 12 && (d.value.size.width = 12);
1832
- }
1833
- ), (i, V) => {
1834
- const F = x("FmCircularProgress"), z = x("FmSimpleDateRangePicker"), Y = x("FmTextField"), X = x("FmTextarea"), W = x("FmStepperField"), G = x("FmButton"), oe = x("FmForm");
1835
- return h(), T(Ne(e(k).lg || e(k).md ? Rl : zl), {
1836
- "model-value": p.hideConfiguration,
1837
- "onUpdate:modelValue": V[8] || (V[8] = (S) => s("hideConfiguration", S))
1838
- }, {
1839
- default: $(() => [
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: $(() => [
1846
- C("div", Yl, [
1847
- m(z, {
1848
- modelValue: g.value,
1849
- "onUpdate:modelValue": V[0] || (V[0] = (S) => g.value = S)
1850
- }, null, 8, ["modelValue"])
1851
- ]),
1852
- m(Fe, null, {
1853
- header: $(() => [
1854
- C("p", El, L(e(f)("report.tile.widget.details")), 1),
1855
- V[9] || (V[9] = C("div", { class: "grow" }, null, -1))
1856
- ]),
1857
- content: $(() => [
1858
- m(Y, {
1859
- "model-value": d.value.widget.title,
1860
- label: e(f)("report.tile.widget.title"),
1861
- placeholder: e(f)("report.tile.widget.titlePlaceholder"),
1862
- "onUpdate:modelValue": e(v)
1863
- }, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
1864
- m(X, {
1865
- modelValue: d.value.widget.description,
1866
- "onUpdate:modelValue": V[1] || (V[1] = (S) => d.value.widget.description = S),
1867
- disabled: d.value.widget.title === "",
1868
- placeholder: e(f)("report.tile.widget.descriptionPlaceholder"),
1869
- "helper-text": e(f)("report.tile.widget.descriptionHelper")
1870
- }, {
1871
- label: $(() => [
1872
- C("p", Jl, L(e(f)("report.tile.widget.widgetDescription")), 1),
1873
- C("p", Gl, " (" + L(e(f)("report.tile.widget.optional")) + ") ", 1)
1874
- ]),
1875
- _: 1
1876
- }, 8, ["modelValue", "disabled", "placeholder", "helper-text"]),
1877
- m(Hl, {
1878
- model: d.value.widget.config,
1879
- "onUpdate:model": V[2] || (V[2] = (S) => d.value.widget.config = S)
1880
- }, null, 8, ["model"]),
1881
- C("div", {
1882
- class: Oe(["flex flex-row", `${e(k).sm || e(k).xs ? "gap-16" : "gap-2"}`])
1883
- }, [
1884
- m(W, {
1885
- modelValue: d.value.size.width,
1886
- "onUpdate:modelValue": V[3] || (V[3] = (S) => d.value.size.width = S),
1887
- label: e(f)("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": V[4] || (V[4] = (S) => d.value.size.height = S),
1894
- label: e(f)("report.tile.widget.height"),
1895
- min: 1,
1896
- max: 12,
1897
- disabled: d.value.widget.type === e(B).Scorecard
1898
- }, null, 8, ["modelValue", "label", "disabled"])
1899
- ], 2)
1900
- ]),
1901
- _: 1
1902
- }),
1903
- m(Fe, null, {
1904
- header: $(() => [
1905
- C("p", null, L(e(f)("report.tile.widget.type")), 1),
1906
- V[10] || (V[10] = C("div", { class: "grow" }, null, -1))
1907
- ]),
1908
- content: $(() => [
1909
- m(Ge, {
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": [e(B).Spacer],
1915
- "onUpdate:modelValue": V[5] || (V[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": V[6] || (V[6] = (S) => d.value.widget.config = S),
1923
- label: e(f)("report.tile.datasource.main"),
1924
- config: y.value
1925
- }, null, 8, ["modelValue", "label", "config"]),
1926
- r.value ? (h(!0), I(Z, { key: 0 }, de(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: e(f)("report.tile.datasource.join", { index: P + 1 }),
1931
- config: y.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
- C("div", Kl, [
1938
- m(G, {
1939
- label: e(f)("report.tile.datasource.joinButton"),
1940
- variant: "secondary",
1941
- icon: "add",
1942
- "icon-position": "prepend",
1943
- "border-color": e(ce).ColorPrimary,
1944
- "text-color": e(ce).ColorPrimary,
1945
- class: "w-full",
1946
- onClick: V[7] || (V[7] = (S) => D())
1947
- }, null, 8, ["label", "border-color", "text-color"])
1948
- ])
1949
- ]),
1950
- _: 1
1951
- }, 512)) : (h(), T(F, { key: 0 }))
1952
- ]),
1953
- _: 1
1954
- }, 8, ["model-value"]);
1955
- };
1956
- }
1957
- }), Ql = { class: "flex flex-col gap-8" }, Zl = { class: "pl-32 flex flex-col gap-8" }, eo = { class: "fm-typo-en-body-lg-600" }, lo = { class: "flex flex-row gap-8" }, oo = { class: "fm-typo-en-body-lg-600" }, to = { class: "flex flex-row gap-8" }, ao = /* @__PURE__ */ M({
1958
- __name: "LabelSection",
1959
- props: {
1960
- model: {}
1961
- },
1962
- emits: ["update:model"],
1963
- setup(w, { emit: c }) {
1964
- const o = w, u = c, { t: n } = H(), g = _({
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
- }), t = (D) => {
1979
- u("update:model", {
1980
- ...o.model,
1981
- labelAlign: o.model.labelAlign === D ? void 0 : D
1982
- });
1983
- }, s = (D) => {
1984
- u("update:model", {
1985
- ...o.model,
1986
- labelAnchor: o.model.labelAnchor === D ? void 0 : D
1987
- });
1988
- }, f = [
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
- ], N = [
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 = x("FmCheckbox"), y = x("FmButton"), r = x("FmTooltip"), v = x("FmTextField"), a = x("FmStepperField");
2003
- return h(), I("div", Ql, [
2004
- m(b, {
2005
- modelValue: g.value,
2006
- "onUpdate:modelValue": O[0] || (O[0] = (l) => g.value = l),
2007
- value: !1,
2008
- label: e(n)("report.section.datasource.label.showLabel"),
2009
- "label-placement": "right",
2010
- class: "fm-typo-en-body-lg-400"
2011
- }, null, 8, ["modelValue", "label"]),
2012
- ae(C("div", Zl, [
2013
- C("p", eo, L(e(n)("report.section.datasource.alignment.textAlignment")), 1),
2014
- C("div", lo, [
2015
- (h(), I(Z, null, de(f, ({ icon: l, value: i, tooltip: V }) => m(r, {
2016
- key: i,
2017
- variant: "plain",
2018
- placement: "top",
2019
- content: e(n)(`report.section.datasource.alignment.alignOptions.${V}`),
2020
- "z-index": 50
2021
- }, {
2022
- default: $(() => [
2023
- m(y, {
2024
- "append-icon": l,
2025
- variant: "tertiary",
2026
- "icon-color": D.model.labelAlign === i ? "neutral-gray-400" : "neutral-gray-300",
2027
- "bg-color": D.model.labelAlign === i ? "neutral-gray-100" : "neutral-white",
2028
- class: "rounded-sm",
2029
- onClick: (F) => t(i)
2030
- }, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
2031
- ]),
2032
- _: 2
2033
- }, 1032, ["content"])), 64))
2034
- ]),
2035
- C("p", oo, L(e(n)("report.section.datasource.alignment.anchor")), 1),
2036
- C("div", to, [
2037
- (h(), I(Z, null, de(N, ({ icon: l, value: i, tooltip: V }) => m(r, {
2038
- key: i,
2039
- variant: "plain",
2040
- placement: "top",
2041
- content: e(n)(`report.section.datasource.alignment.anchorOptions.${V}`),
2042
- "z-index": 50
2043
- }, {
2044
- default: $(() => [
2045
- m(y, {
2046
- "append-icon": l,
2047
- variant: "tertiary",
2048
- "icon-color": D.model.labelAnchor === i ? "neutral-gray-400" : "neutral-gray-300",
2049
- "bg-color": D.model.labelAnchor === i ? "neutral-gray-100" : "neutral-white",
2050
- class: "rounded-sm",
2051
- onClick: (F) => s(i)
2052
- }, null, 8, ["append-icon", "icon-color", "bg-color", "onClick"])
2053
- ]),
2054
- _: 2
2055
- }, 1032, ["content"])), 64))
2056
- ]),
2057
- m(v, {
2058
- modelValue: d.value,
2059
- "onUpdate:modelValue": O[1] || (O[1] = (l) => d.value = l),
2060
- label: e(n)("report.section.datasource.alignment.rotation"),
2061
- type: "number",
2062
- min: -180,
2063
- max: 180,
2064
- step: 1
2065
- }, null, 8, ["modelValue", "label"]),
2066
- m(v, {
2067
- modelValue: k.value,
2068
- "onUpdate:modelValue": O[2] || (O[2] = (l) => k.value = l),
2069
- label: e(n)("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] = (l) => p.value = l),
2075
- label: e(n)("report.section.datasource.fontSize"),
2076
- type: "number",
2077
- min: 1
2078
- }, null, 8, ["modelValue", "label"])
2079
- ], 512), [
2080
- [ne, g.value]
2081
- ])
2082
- ]);
2083
- };
2084
- }
2085
- }), no = { class: "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 = { class: "pl-32 flex flex-col gap-8" }, co = /* @__PURE__ */ M({
2086
- __name: "XySection",
2087
- props: {
2088
- model: {}
2089
- },
2090
- emits: ["update:model"],
2091
- setup(w, { emit: c }) {
2092
- const o = w, u = c, { t: n } = H(), g = _({
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
- }), t = _({
2113
- get: () => o.model.showYGrid ?? !0,
2114
- set: (b) => {
2115
- u("update:model", { ...o.model, showYGrid: b });
2116
- }
2117
- }), s = _({
2118
- get: () => o.model.showYTick ?? !0,
2119
- set: (b) => {
2120
- u("update:model", { ...o.model, showYTick: b });
2121
- }
2122
- }), f = _({
2123
- get: () => o.model.showXTitle ?? !1,
2124
- set: (b) => {
2125
- u("update:model", { ...o.model, showXTitle: b });
2126
- }
2127
- }), N = _({
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, y, r, v;
2139
- !o.model.xTitle && ((y = (b = o.model.metrics) == null ? void 0 : b[0]) != null && y.label) && D(o.model.metrics[0].label), !o.model.yTitle && ((v = (r = o.model.dimensions) == null ? void 0 : r[0]) != null && v.label) && O(o.model.dimensions[0].label);
2140
- }), (b, y) => {
2141
- const r = x("FmCheckbox"), v = x("FmStepperField"), a = x("FmTextField");
2142
- return h(), I("div", no, [
2143
- m(r, {
2144
- modelValue: g.value,
2145
- "onUpdate:modelValue": y[0] || (y[0] = (l) => g.value = l),
2146
- label: e(n)("report.section.datasource.axis.showX"),
2147
- "label-placement": "right",
2148
- value: !0
2149
- }, null, 8, ["modelValue", "label"]),
2150
- ae(C("div", io, [
2151
- m(r, {
2152
- modelValue: d.value,
2153
- "onUpdate:modelValue": y[1] || (y[1] = (l) => d.value = l),
2154
- label: e(n)("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": y[2] || (y[2] = (l) => k.value = l),
2161
- label: e(n)("report.section.datasource.axis.showTick"),
2162
- "label-placement": "right",
2163
- value: !0
2164
- }, null, 8, ["modelValue", "label"]),
2165
- ae(C("div", so, [
2166
- m(v, {
2167
- label: e(n)("report.section.datasource.fontSize"),
2168
- type: "number",
2169
- "model-value": b.model.xTickFontSize ?? 12,
2170
- min: 1,
2171
- "onUpdate:modelValue": y[3] || (y[3] = (l) => {
2172
- u("update:model", { ...b.model, xTickFontSize: Number(l) });
2173
- })
2174
- }, null, 8, ["label", "model-value"])
2175
- ], 512), [
2176
- [ne, b.model.showXTick ?? !0]
2177
- ]),
2178
- m(r, {
2179
- modelValue: f.value,
2180
- "onUpdate:modelValue": y[4] || (y[4] = (l) => f.value = l),
2181
- label: e(n)("report.section.datasource.axis.showTitle"),
2182
- "label-placement": "right",
2183
- value: !0
2184
- }, null, 8, ["modelValue", "label"]),
2185
- ae(C("div", uo, [
2186
- m(a, {
2187
- "model-value": b.model.xTitle,
2188
- label: e(n)("report.common.title"),
2189
- placeholder: e(n)("report.tile.widget.titlePlaceholder"),
2190
- "onUpdate:modelValue": e(D)
2191
- }, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
2192
- m(v, {
2193
- label: e(n)("report.section.datasource.fontSize"),
2194
- type: "number",
2195
- "model-value": b.model.xTitleFontSize ?? 12,
2196
- min: 1,
2197
- "onUpdate:modelValue": y[5] || (y[5] = (l) => {
2198
- u("update:model", { ...b.model, xTitleFontSize: Number(l) });
2199
- })
2200
- }, null, 8, ["label", "model-value"])
2201
- ], 512), [
2202
- [ne, f.value]
2203
- ])
2204
- ], 512), [
2205
- [ne, b.model.showX ?? !0]
2206
- ]),
2207
- m(r, {
2208
- modelValue: p.value,
2209
- "onUpdate:modelValue": y[6] || (y[6] = (l) => p.value = l),
2210
- label: e(n)("report.section.datasource.axis.showY"),
2211
- "label-placement": "right",
2212
- value: !0
2213
- }, null, 8, ["modelValue", "label"]),
2214
- ae(C("div", ro, [
2215
- m(r, {
2216
- modelValue: t.value,
2217
- "onUpdate:modelValue": y[7] || (y[7] = (l) => t.value = l),
2218
- label: e(n)("report.section.datasource.axis.showGrid"),
2219
- "label-placement": "right",
2220
- value: !1
2221
- }, null, 8, ["modelValue", "label"]),
2222
- m(r, {
2223
- modelValue: s.value,
2224
- "onUpdate:modelValue": y[8] || (y[8] = (l) => s.value = l),
2225
- label: e(n)("report.section.datasource.axis.showTick"),
2226
- "label-placement": "right",
2227
- value: !0
2228
- }, null, 8, ["modelValue", "label"]),
2229
- ae(C("div", mo, [
2230
- m(v, {
2231
- label: e(n)("report.section.datasource.fontSize"),
2232
- type: "number",
2233
- "model-value": b.model.yTickFontSize ?? 12,
2234
- min: 1,
2235
- "onUpdate:modelValue": y[9] || (y[9] = (l) => {
2236
- u("update:model", { ...b.model, yTickFontSize: Number(l) });
2237
- })
2238
- }, null, 8, ["label", "model-value"])
2239
- ], 512), [
2240
- [ne, b.model.showYTick ?? !0]
2241
- ]),
2242
- m(r, {
2243
- modelValue: N.value,
2244
- "onUpdate:modelValue": y[10] || (y[10] = (l) => N.value = l),
2245
- label: e(n)("report.section.datasource.axis.showTitle"),
2246
- "label-placement": "right",
2247
- value: !0
2248
- }, null, 8, ["modelValue", "label"]),
2249
- ae(C("div", po, [
2250
- m(a, {
2251
- "model-value": b.model.yTitle,
2252
- label: e(n)("report.common.title"),
2253
- placeholder: e(n)("report.tile.widget.titlePlaceholder"),
2254
- "onUpdate:modelValue": e(O)
2255
- }, null, 8, ["model-value", "label", "placeholder", "onUpdate:modelValue"]),
2256
- m(v, {
2257
- label: e(n)("report.section.datasource.fontSize"),
2258
- type: "number",
2259
- "model-value": b.model.yTitleFontSize ?? 12,
2260
- min: 1,
2261
- "onUpdate:modelValue": y[11] || (y[11] = (l) => {
2262
- u("update:model", { ...b.model, yTitleFontSize: Number(l) });
2263
- })
2264
- }, null, 8, ["label", "model-value"])
2265
- ], 512), [
2266
- [ne, N.value]
2267
- ])
2268
- ], 512), [
2269
- [ne, b.model.showY ?? !0]
2270
- ])
2271
- ]);
2272
- };
2273
- }
2274
- }), vo = { class: "flex flex-col gap-8" }, fo = { class: "pl-32 flex flex-col gap-8" }, go = /* @__PURE__ */ M({
2275
- __name: "LegendSection",
2276
- props: {
2277
- model: {},
2278
- isCircularWidget: { type: Boolean }
2279
- },
2280
- emits: ["update:model"],
2281
- setup(w, { emit: c }) {
2282
- const o = w, u = c, { t: n } = H(), g = [
2283
- { label: n("report.section.datasource.position.top"), value: "top" },
2284
- { label: n("report.section.datasource.position.bottom"), value: "bottom" },
2285
- { label: n("report.section.datasource.position.left"), value: "left" },
2286
- { label: n("report.section.datasource.position.right"), value: "right" }
2287
- ], d = _({
2288
- get: () => o.model.showLegend !== void 0 ? o.model.showLegend : o.isCircularWidget === !0,
2289
- set: (s) => {
2290
- u("update:model", { ...o.model, showLegend: s });
2291
- }
2292
- }), k = _({
2293
- get: () => o.model.usePointStyle ?? !0,
2294
- set: (s) => {
2295
- u("update:model", { ...o.model, usePointStyle: s });
2296
- }
2297
- }), p = _({
2298
- get: () => o.model.legendMaxHeight ?? 54,
2299
- set: (s) => {
2300
- u("update:model", { ...o.model, legendMaxHeight: s });
2301
- }
2302
- }), t = _({
2303
- get: () => o.model.legendMaxWidth ?? 54,
2304
- set: (s) => {
2305
- u("update:model", { ...o.model, legendMaxWidth: s });
2306
- }
2307
- });
2308
- return (s, f) => {
2309
- const N = x("FmCheckbox"), D = x("FmSelect"), O = x("FmStepperField");
2310
- return h(), I("div", vo, [
2311
- m(N, {
2312
- modelValue: d.value,
2313
- "onUpdate:modelValue": f[0] || (f[0] = (b) => d.value = b),
2314
- class: "fm-typo-en-body-lg-400",
2315
- value: !1,
2316
- label: e(n)("report.section.datasource.legend.showLegend")
2317
- }, null, 8, ["modelValue", "label"]),
2318
- ae(C("div", fo, [
2319
- m(D, {
2320
- label: e(n)("report.section.datasource.position.showPosition"),
2321
- items: g,
2322
- "model-value": s.model.legendPosition ?? "top",
2323
- "onUpdate:modelValue": f[1] || (f[1] = (b) => u("update:model", { ...s.model, legendPosition: b }))
2324
- }, null, 8, ["label", "model-value"]),
2325
- m(N, {
2326
- modelValue: k.value,
2327
- "onUpdate:modelValue": f[2] || (f[2] = (b) => k.value = b),
2328
- label: e(n)("report.section.datasource.legend.usePointStyle"),
2329
- value: !1
2330
- }, null, 8, ["modelValue", "label"]),
2331
- s.model.legendPosition === "top" || s.model.legendPosition === "bottom" || !s.model.legendPosition ? (h(), T(O, {
2332
- key: 0,
2333
- label: e(n)("report.section.datasource.legend.maxHeight"),
2334
- "model-value": p.value,
2335
- "onUpdate:modelValue": f[3] || (f[3] = (b) => u("update:model", { ...s.model, legendMaxHeight: b }))
2336
- }, null, 8, ["label", "model-value"])) : U("", !0),
2337
- s.model.legendPosition === "left" || s.model.legendPosition === "right" ? (h(), T(O, {
2338
- key: 1,
2339
- label: e(n)("report.section.datasource.legend.maxWidth"),
2340
- "model-value": t.value,
2341
- "onUpdate:modelValue": f[4] || (f[4] = (b) => u("update:model", { ...s.model, legendMaxWidth: b }))
2342
- }, null, 8, ["label", "model-value"])) : U("", !0)
2343
- ], 512), [
2344
- [ne, d.value]
2345
- ])
2346
- ]);
2347
- };
2348
- }
2349
- }), bo = { class: "flex flex-row gap-16" }, yo = /* @__PURE__ */ M({
2350
- __name: "ChartSizeSection",
2351
- props: {
2352
- model: {}
2353
- },
2354
- emits: ["update:model"],
2355
- setup(w, { emit: c }) {
2356
- const o = w, u = c, { t: n } = H(), g = _({
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 t = x("FmStepperField");
2369
- return h(), I("div", bo, [
2370
- m(t, {
2371
- modelValue: g.value,
2372
- "onUpdate:modelValue": p[0] || (p[0] = (s) => g.value = s),
2373
- type: "number",
2374
- label: e(n)("report.section.datasource.chartHeight"),
2375
- suffix: "px",
2376
- min: 1,
2377
- placeholder: "Auto"
2378
- }, null, 8, ["modelValue", "label"]),
2379
- m(t, {
2380
- modelValue: d.value,
2381
- "onUpdate:modelValue": p[1] || (p[1] = (s) => d.value = s),
2382
- type: "number",
2383
- label: e(n)("report.section.datasource.chartWidth"),
2384
- suffix: "px",
2385
- min: 1,
2386
- placeholder: "Auto"
2387
- }, null, 8, ["modelValue", "label"])
2388
- ]);
2389
- };
2390
- }
2391
- }), ho = { class: "flex flex-col gap-16" }, Vo = { class: "flex flex-col gap-8" }, Fo = { class: "flex flex-col gap-8" }, wo = /* @__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(w, { emit: c }) {
2422
- const o = ee(w, "modelValue");
2423
- se(
2424
- [() => o.value.dimensions, () => o.value.metrics],
2425
- () => {
2426
- const { rowIds: p, columnIds: t } = be(o.value);
2427
- o.value.rowIds = p, o.value.columnIds = t;
2428
- },
2429
- { deep: !0 }
2430
- );
2431
- const u = w, n = c, { t: g, te: d } = H(), k = _(() => u.config.type === B.Circular);
2432
- return (p, t) => {
2433
- const s = x("FmButton");
2434
- return h(), I(Z, null, [
2435
- t[6] || (t[6] = C("div", { class: "grow" }, null, -1)),
2436
- u.closeable ? (h(), T(s, {
2437
- key: 0,
2438
- icon: "close",
2439
- variant: "tertiary",
2440
- size: "md",
2441
- onClick: t[0] || (t[0] = te((f) => n("click-close"), ["stop"]))
2442
- })) : U("", !0),
2443
- C("div", ho, [
2444
- u.config.hasChart ? (h(), T(yo, {
2445
- key: 0,
2446
- model: o.value,
2447
- "onUpdate:model": t[1] || (t[1] = (f) => o.value = f)
2448
- }, null, 8, ["model"])) : U("", !0),
2449
- C("div", Vo, [
2450
- t[5] || (t[5] = C("p", { class: "fm-typo-en-body-lg-600" }, "Configuration", -1)),
2451
- C("div", Fo, [
2452
- u.config.hasLabel ? (h(), T(ao, {
2453
- key: 0,
2454
- model: o.value,
2455
- "onUpdate:model": t[2] || (t[2] = (f) => o.value = f)
2456
- }, null, 8, ["model"])) : U("", !0),
2457
- u.config.hasLegend ? (h(), T(go, {
2458
- key: 1,
2459
- model: o.value,
2460
- "is-circular-widget": k.value,
2461
- "onUpdate:model": t[3] || (t[3] = (f) => o.value = f)
2462
- }, null, 8, ["model", "is-circular-widget"])) : U("", !0),
2463
- u.config.hasXy ? (h(), T(co, {
2464
- key: 2,
2465
- model: o.value,
2466
- "onUpdate:model": t[4] || (t[4] = (f) => o.value = f)
2467
- }, null, 8, ["model"])) : U("", !0)
2468
- ])
2469
- ])
2470
- ])
2471
- ], 64);
2472
- };
2473
- }
2474
- }), xo = { class: "fixed bottom-6 right-6" }, Co = { class: "flex items-center gap-8" }, ko = /* @__PURE__ */ M({
2475
- __name: "StyleEditorTab",
2476
- props: {
2477
- modelValue: {
2478
- required: !0
2479
- },
2480
- modelModifiers: {}
2481
- },
2482
- emits: ["update:modelValue"],
2483
- setup(w) {
2484
- const { t: c } = H(), o = ee(w, "modelValue"), u = _(
2485
- () => ye.find((g) => g.type === o.value.widget.type)
2486
- ), n = A(!1);
2487
- return (g, d) => {
2488
- const k = x("FmCircularProgress"), p = x("FmButton"), t = x("FmSideSheet");
2489
- return h(), T(t, {
2490
- modelValue: n.value,
2491
- "onUpdate:modelValue": d[2] || (d[2] = (s) => n.value = s),
2492
- "close-button": !1,
2493
- "no-overlay": "",
2494
- "dismiss-away": !0
2495
- }, {
2496
- "side-sheet-button": $(() => [
2497
- C("div", xo, [
2498
- m(p, {
2499
- label: "Style setting",
2500
- icon: "edit",
2501
- variant: "secondary",
2502
- size: "md"
2503
- })
2504
- ])
2505
- ]),
2506
- "side-sheet-header": $(() => [
2507
- C("div", Co, [
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] = (s) => n.value = !1)
2513
- }),
2514
- d[3] || (d[3] = C("p", { class: "fm-typo-en-title-sm-600" }, "Report style settings", -1))
2515
- ])
2516
- ]),
2517
- default: $(() => [
2518
- o.value ? U("", !0) : (h(), T(k, { key: 0 })),
2519
- m(wo, {
2520
- modelValue: o.value.widget.config,
2521
- "onUpdate:modelValue": d[1] || (d[1] = (s) => o.value.widget.config = s),
2522
- config: u.value
2523
- }, null, 8, ["modelValue", "config"])
2524
- ]),
2525
- _: 1
2526
- }, 8, ["modelValue"]);
2527
- };
2528
- }
2529
- }), _o = { class: "bg-fm-color-neutral-white flex flex-col h-full w-[510px]" }, So = { class: "flex bg-fm-color-neutral-white w-[88px]" }, To = { class: "w-full overflow-y-auto" }, Uo = {
2530
- class: "grid grid-cols-12 w-full p-24",
2531
- style: { backgroundColor: "#F6F8FC" }
2532
- }, Do = /* @__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(w, { emit: c }) {
2545
- const o = ee(w, "modelValue"), u = w, n = _(
2546
- () => ye.find((p) => {
2547
- var t;
2548
- return p.type === ((t = o.value) == null ? void 0 : t.widget.type);
2549
- })
2550
- ), g = c, 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, t) => {
2558
- const s = x("FmCircularProgress"), f = x("FmButton");
2559
- return h(), I("div", null, [
2560
- o.value ? (h(), I(Z, { key: 1 }, [
2561
- m(Qe, {
2562
- "model-value": !w.hideConfiguration
2563
- }, {
2564
- right: $(() => [
2565
- C("div", _o, [
2566
- m(Pe, {
2567
- modelValue: o.value,
2568
- "onUpdate:modelValue": t[0] || (t[0] = (N) => o.value = N),
2569
- config: n.value,
2570
- "hide-configuration": w.hideConfiguration,
2571
- onHideConfiguration: t[1] || (t[1] = (N) => {
2572
- g("hideConfiguration", N);
2573
- })
2574
- }, null, 8, ["modelValue", "config", "hide-configuration"])
2575
- ])
2576
- ]),
2577
- left: $(() => [
2578
- C("div", So, [
2579
- m(f, {
2580
- variant: "secondary",
2581
- icon: "keyboard_double_arrow_right",
2582
- "border-color": e(ce).ColorPrimary,
2583
- "text-color": e(ce).ColorPrimary,
2584
- class: "m-24 my-16",
2585
- size: "md",
2586
- onClick: t[2] || (t[2] = (N) => g("hideConfiguration", !u.hideConfiguration))
2587
- }, null, 8, ["border-color", "text-color"])
2588
- ])
2589
- ]),
2590
- _: 1
2591
- }, 8, ["model-value"]),
2592
- C("div", To, [
2593
- C("div", Uo, [
2594
- o.value ? (h(), T(Me, {
2595
- key: 0,
2596
- "model-value": o.value,
2597
- index: u.index,
2598
- "hide-export": !0
2599
- }, null, 8, ["model-value", "index"])) : (h(), T(ze, { key: 1 }))
2600
- ])
2601
- ]),
2602
- k.value ? (h(), T(ko, {
2603
- key: 0,
2604
- modelValue: o.value,
2605
- "onUpdate:modelValue": t[3] || (t[3] = (N) => o.value = N),
2606
- "hide-configuration": w.hideConfiguration,
2607
- onHideConfiguration: t[4] || (t[4] = (N) => {
2608
- g("hideConfiguration", N);
2609
- })
2610
- }, null, 8, ["modelValue", "hide-configuration"])) : U("", !0)
2611
- ], 64)) : (h(), T(s, { key: 0 }))
2612
- ]);
2613
- };
2614
- }
2615
- }), $o = {
2616
- key: 0,
2617
- class: "flex w-full justify-center items-center"
2618
- }, No = { class: "w-full grid grid-cols-12 pb-28 pt-5 px-5 h-full" }, Oo = /* @__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(w, { emit: c }) {
2631
- const o = ee(w, "modelValue"), u = w, n = _(
2632
- () => ye.find((d) => {
2633
- var k;
2634
- return d.type === ((k = o.value) == null ? void 0 : k.widget.type);
2635
- })
2636
- ), g = c;
2637
- return (d, k) => {
2638
- const p = x("FmCircularProgress");
2639
- return h(), I("div", null, [
2640
- o.value ? (h(), I(Z, { key: 1 }, [
2641
- C("div", No, [
2642
- o.value ? (h(), T(Me, {
2643
- key: 0,
2644
- "model-value": o.value,
2645
- index: u.index,
2646
- "hide-export": !0
2647
- }, null, 8, ["model-value", "index"])) : (h(), T(ze, { key: 1 }))
2648
- ]),
2649
- m(Pe, {
2650
- modelValue: o.value,
2651
- "onUpdate:modelValue": k[0] || (k[0] = (t) => o.value = t),
2652
- config: n.value,
2653
- "hide-configuration": w.hideConfiguration,
2654
- onHideConfiguration: k[1] || (k[1] = (t) => {
2655
- g("hideConfiguration", t);
2656
- })
2657
- }, null, 8, ["modelValue", "config", "hide-configuration"])
2658
- ], 64)) : (h(), I("div", $o, [
2659
- m(p)
2660
- ]))
2661
- ]);
2662
- };
2663
- }
2664
- }), Io = {
2665
- key: 0,
2666
- class: "fm-typo-en-title-md-600"
2667
- }, Bo = {
2668
- key: 0,
2669
- class: "flex items-start justify-start px-24 py-12 flex-wrap w-full"
2670
- }, Jo = /* @__PURE__ */ M({
2671
- __name: "TileEditor",
2672
- setup(w) {
2673
- const { rowHeight: c, colWidths: o } = ue(fe()), u = He(), n = Ye(), g = ol(), { globalFilters: d } = ue(je()), { currentSelectWidgetType: k, editingReport: p, editingTile: t, editingTileIndex: s } = ue(g), { breakpoints: f } = Re(), { promptMessage: N } = Be(), { t: D } = H(), O = A(!1);
2674
- function b() {
2675
- k.value = void 0, t.value = void 0, s.value = -1, n.back();
2676
- }
2677
- async function y() {
2678
- var a;
2679
- if (!p.value) return;
2680
- await N({
2681
- title: D("report.tile.save.title"),
2682
- message: D("report.tile.save.confirm", { title: (a = t.value) == null ? void 0 : a.widget.title })
2683
- }) && t.value && (t.value.widget.config = {
2684
- ...t.value.widget.config,
2685
- rowHeight: c.value,
2686
- colWidths: [...o.value]
2687
- }, s.value === -1 ? p.value.tiles.push(t.value) : p.value.tiles[s.value] = t.value, b());
2688
- }
2689
- async function r() {
2690
- var a;
2691
- if (!p.value) return;
2692
- await N({
2693
- title: D("report.tile.cancel.title"),
2694
- message: D("report.tile.cancel.confirm", { title: (a = t.value) == null ? void 0 : a.widget.title })
2695
- }) && b();
2696
- }
2697
- return Ce(() => {
2698
- p.value || n.push({ name: "reports" });
2699
- }), (v, a) => {
2700
- const l = x("FmPageHead");
2701
- return h(), T(Ze, null, {
2702
- default: $(() => [
2703
- m(l, {
2704
- actions: [
2705
- { label: "Cancel", value: "cancel", isPrimary: !1 },
2706
- { label: "Save", value: "save", isPrimary: !0 }
2707
- ],
2708
- "onClick:action": a[0] || (a[0] = (i) => {
2709
- i === "cancel" && r(), i === "save" && y();
2710
- })
2711
- }, {
2712
- title: $(() => {
2713
- var i;
2714
- return [
2715
- e(f).lg || e(f).md ? (h(), I("p", Io, L(e(Le)(((i = e(t)) == null ? void 0 : i.widget.type) ?? "New report")), 1)) : U("", !0)
2716
- ];
2717
- }),
2718
- _: 1
2719
- }),
2720
- e(t) && (e(d) || []).some((i) => {
2721
- const V = i.tileIds, F = e(t) && e(t).id;
2722
- return Array.isArray(V) && typeof F == "string" && V.includes(F);
2723
- }) ? (h(), I("div", Bo, [
2724
- m(nl)
2725
- ])) : U("", !0),
2726
- e(t) ? (h(), T(Ne(e(f).lg || e(f).md ? Do : Oo), {
2727
- key: 1,
2728
- modelValue: e(t),
2729
- "onUpdate:modelValue": a[1] || (a[1] = (i) => qe(t) ? t.value = i : null),
2730
- class: Oe(`${e(f).lg || e(f).md ? "flex" : ""} w-full`),
2731
- style: We({ height: `calc( 100% - ${e(f).lg || e(f).md ? 72 : 64}px)` }),
2732
- "hide-configuration": O.value,
2733
- index: Number(e(u).params.tileIndex),
2734
- onHideConfiguration: a[2] || (a[2] = (i) => O.value = i)
2735
- }, null, 40, ["modelValue", "class", "style", "hide-configuration", "index"])) : U("", !0)
2736
- ]),
2737
- _: 1
2738
- });
2739
- };
2740
- }
2741
- });
2742
- export {
2743
- Jo as default
2744
- };