@feedmepos/mf-report 5.4.13 → 5.4.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-fwdY-VgU.js → App-DHzvrjFu.js} +5 -5
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-Cnt8ADLi.js +160 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BRVTZ-1Q.js → Default.vue_vue_type_script_setup_true_lang-EmurhRmv.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-TzcBKr7X.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BAd3WleX.js} +116 -116
- package/dist/{InsightView-NRDxXS5U.js → InsightView-rQByD_va.js} +1415 -1399
- package/dist/{Integration-DBUsQoR5.js → Integration-DsbcE8vH.js} +3 -3
- package/dist/{Integrations-DZI6I4ub.js → Integrations-DXsJ7foD.js} +1 -1
- package/dist/{Layout-D7kmXstx.js → Layout-B-8Y3XwG.js} +1 -1
- package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CMlV5upC.js → LocationSelect.vue_vue_type_script_setup_true_lang-DlKB7oWK.js} +2 -2
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-n83Ss53U.js +261 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-kyCqqk9L.js → NavigationTab.vue_vue_type_script_setup_true_lang-CxSiGruR.js} +2286 -2286
- package/dist/{OverviewView-BupHqLLi.js → OverviewView-OGDD6b3e.js} +4 -4
- package/dist/{Report-dL5BLDI0.js → Report-C4qDBCPA.js} +3 -3
- package/dist/{ReportEditor-C319jjGg.js → ReportEditor-xdS_5AKE.js} +31 -26
- package/dist/ReportView-wnZJ7UlD.js +270 -0
- package/dist/{Setting-Za7nt43H.js → Setting-Byd4KPwy.js} +4 -4
- package/dist/{TileEditor-DeXdXeO8.js → TileEditor-C79BlYJn.js} +6 -6
- package/dist/{TransitionFade-FRNDa7rV.js → TransitionFade-DZxSIwUD.js} +4 -4
- package/dist/app.js +11 -11
- package/dist/{global-loader-BXUq_uOb.js → global-loader-nEd3h1cv.js} +572 -569
- package/dist/{index-D5LVkVbJ.js → index-C1dNlcXW.js} +7 -7
- package/dist/{report-schema-Bf8XSI6U.js → report-schema-DpQDARvn.js} +5 -5
- package/dist/style.css +1 -1
- package/dist/{timeFormat-GVzfkgtj.js → timeFormat-B5KKAA4i.js} +1 -1
- package/dist/{v4-CDZkk94d.js → v4-CfVkBYAU.js} +1013 -936
- package/package.json +1 -1
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-D7xFDtWS.js +0 -150
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-Qu5DHicC.js +0 -245
- package/dist/ReportView-NecE73EB.js +0 -163
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { W as r, v as ae, R as Oe, g as qe, d as Ue, q as je } from "./v4-
|
|
3
|
-
import { a as _e, u as re } from "./global-loader-
|
|
4
|
-
import { d as he } from "./index-
|
|
1
|
+
import { defineComponent as W, useModel as H, computed as i, ref as F, resolveComponent as y, createElementBlock as S, openBlock as h, Fragment as z, renderSlot as U, createVNode as k, createElementVNode as C, toDisplayString as K, unref as q, withCtx as V, createBlock as T, createCommentVNode as G, normalizeClass as te, normalizeStyle as ye, h as ve, renderList as we, mergeModels as Ne, watch as ee, onMounted as Pe, onUnmounted as Ee, resolveDynamicComponent as ze, withDirectives as We, vShow as He } from "vue";
|
|
2
|
+
import { W as r, v as ae, R as Oe, g as qe, d as Ue, q as je } from "./v4-CfVkBYAU.js";
|
|
3
|
+
import { a as _e, u as re } from "./global-loader-nEd3h1cv.js";
|
|
4
|
+
import { d as he } from "./index-C1dNlcXW.js";
|
|
5
5
|
import { storeToRefs as se } from "pinia";
|
|
6
6
|
import { _ as Ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
7
7
|
import { _ as ge } from "./NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js";
|
|
8
8
|
import { useBreakpoints as Je, useSnackbar as Ke } from "@feedmepos/ui-library";
|
|
9
|
-
var ne = /* @__PURE__ */ ((l) => (l.line = "LINE", l.bar = "BAR", l))(ne || {}),
|
|
9
|
+
var ne = /* @__PURE__ */ ((l) => (l.line = "LINE", l.bar = "BAR", l))(ne || {}), M = /* @__PURE__ */ ((l) => (l.top = "TOP", l.bottom = "BOTTOM", l))(M || {});
|
|
10
10
|
r.Circular, r.Table, r.BarChart, r.LineChart, r.StackBarChart, r.StackLineChart, r.Scorecard, r.Spacer;
|
|
11
11
|
const Qe = [
|
|
12
12
|
{
|
|
@@ -153,7 +153,7 @@ function Xe(l) {
|
|
|
153
153
|
tailwind: "fm-color-neutral-gray-100"
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const Ye = /* @__PURE__ */
|
|
156
|
+
const Ye = /* @__PURE__ */ W({
|
|
157
157
|
__name: "WidgetBarchart",
|
|
158
158
|
props: {
|
|
159
159
|
modelValue: { required: !0 },
|
|
@@ -161,13 +161,13 @@ const Ye = /* @__PURE__ */ E({
|
|
|
161
161
|
},
|
|
162
162
|
emits: ["update:modelValue"],
|
|
163
163
|
setup(l) {
|
|
164
|
-
const e =
|
|
164
|
+
const e = H(l, "modelValue"), n = i(() => {
|
|
165
165
|
var o;
|
|
166
166
|
return ((o = e.value.data) == null ? void 0 : o.xAxis) ?? [];
|
|
167
167
|
}), m = i(() => {
|
|
168
168
|
var o;
|
|
169
169
|
return ((o = e.value.data) == null ? void 0 : o.datasets) ?? [];
|
|
170
|
-
}), f = i(() => e.value.isTransposed ?? void 0), c =
|
|
170
|
+
}), f = i(() => e.value.isTransposed ?? void 0), c = F(null), a = i(() => m.value.length > 0 ? [
|
|
171
171
|
...m.value.map((o, u) => ({
|
|
172
172
|
label: o.name,
|
|
173
173
|
data: o.values,
|
|
@@ -176,10 +176,10 @@ const Ye = /* @__PURE__ */ E({
|
|
|
176
176
|
}))
|
|
177
177
|
] : []);
|
|
178
178
|
return (o, u) => {
|
|
179
|
-
const
|
|
180
|
-
return h(), S(
|
|
179
|
+
const L = y("FmBarChart");
|
|
180
|
+
return h(), S(z, null, [
|
|
181
181
|
U(o.$slots, "menu"),
|
|
182
|
-
k(
|
|
182
|
+
k(L, {
|
|
183
183
|
ref_key: "chartRef",
|
|
184
184
|
ref: c,
|
|
185
185
|
class: "bar-chart",
|
|
@@ -199,7 +199,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
199
199
|
], 64);
|
|
200
200
|
};
|
|
201
201
|
}
|
|
202
|
-
}), ea = /* @__PURE__ */
|
|
202
|
+
}), ea = /* @__PURE__ */ W({
|
|
203
203
|
__name: "WidgetCircular",
|
|
204
204
|
props: {
|
|
205
205
|
modelValue: { required: !0 },
|
|
@@ -207,7 +207,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
207
207
|
},
|
|
208
208
|
emits: ["update:modelValue"],
|
|
209
209
|
setup(l) {
|
|
210
|
-
const e =
|
|
210
|
+
const e = H(l, "modelValue"), n = i(() => {
|
|
211
211
|
let m = [];
|
|
212
212
|
return e.value.data.datasets && e.value.data.metrics && e.value.data.datasets.length > 0 && e.value.data.metrics.length > 0 && (m = [
|
|
213
213
|
{
|
|
@@ -219,7 +219,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
219
219
|
});
|
|
220
220
|
return (m, f) => {
|
|
221
221
|
const c = y("FmPieChart");
|
|
222
|
-
return h(), S(
|
|
222
|
+
return h(), S(z, null, [
|
|
223
223
|
U(m.$slots, "menu"),
|
|
224
224
|
k(c, {
|
|
225
225
|
class: "circular",
|
|
@@ -240,7 +240,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
240
240
|
], 64);
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
}), aa = { class: "flex flex-col gap-1" }, ta = { class: "fm-typo-en-title-sm-600" }, la = { class: "flex gap-2" }, oa = { key: 0 }, sa = { key: 1 }, na = /* @__PURE__ */
|
|
243
|
+
}), aa = { class: "flex flex-col gap-1" }, ta = { class: "fm-typo-en-title-sm-600" }, la = { class: "flex gap-2" }, oa = { key: 0 }, sa = { key: 1 }, na = /* @__PURE__ */ W({
|
|
244
244
|
__name: "WidgetScorecard",
|
|
245
245
|
props: {
|
|
246
246
|
modelValue: { required: !0 },
|
|
@@ -248,7 +248,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
248
248
|
},
|
|
249
249
|
emits: ["update:modelValue"],
|
|
250
250
|
setup(l) {
|
|
251
|
-
const e =
|
|
251
|
+
const e = H(l, "modelValue"), { compareDateRange: n, defaultDateSetting: m } = se(_e()), { country: f } = re(), c = i(() => {
|
|
252
252
|
var b;
|
|
253
253
|
return ((b = e.value.data) == null ? void 0 : b.value) || "";
|
|
254
254
|
}), a = i(() => {
|
|
@@ -268,33 +268,33 @@ const Ye = /* @__PURE__ */ E({
|
|
|
268
268
|
const u = i(() => {
|
|
269
269
|
var b;
|
|
270
270
|
return (b = e.value.data) == null ? void 0 : b.sparkline;
|
|
271
|
-
}),
|
|
271
|
+
}), L = i(() => u.value.datasets.map((b) => ({
|
|
272
272
|
label: b.name,
|
|
273
273
|
data: b.values,
|
|
274
274
|
fill: !0,
|
|
275
275
|
color: "#36a2eb"
|
|
276
276
|
})));
|
|
277
|
-
return (b,
|
|
277
|
+
return (b, R) => {
|
|
278
278
|
var d;
|
|
279
|
-
const j = y("FmIcon"),
|
|
279
|
+
const j = y("FmIcon"), I = y("FmChip"), D = y("FmTooltip"), t = y("FmLineChart");
|
|
280
280
|
return h(), S("div", aa, [
|
|
281
281
|
U(b.$slots, "menu"),
|
|
282
282
|
C("p", ta, K(c.value), 1),
|
|
283
283
|
C("div", la, [
|
|
284
|
-
k(
|
|
284
|
+
k(D, {
|
|
285
285
|
content: `vs. ${(d = q(m).defaultCompareType) == null ? void 0 : d.split("_").join(" ")}`,
|
|
286
286
|
placement: "right",
|
|
287
287
|
"hide-arrow": "",
|
|
288
288
|
variant: "plain"
|
|
289
289
|
}, {
|
|
290
|
-
default:
|
|
291
|
-
a.value ? (h(),
|
|
290
|
+
default: V(() => [
|
|
291
|
+
a.value ? (h(), T(I, {
|
|
292
292
|
key: 0,
|
|
293
293
|
icon: a.value.icon.name,
|
|
294
294
|
class: te(`bg-${a.value.icon.tailwind}`),
|
|
295
295
|
compact: ""
|
|
296
296
|
}, {
|
|
297
|
-
default:
|
|
297
|
+
default: V(() => [
|
|
298
298
|
k(j, {
|
|
299
299
|
name: a.value.icon.name,
|
|
300
300
|
color: a.value.icon.color
|
|
@@ -306,16 +306,16 @@ const Ye = /* @__PURE__ */ E({
|
|
|
306
306
|
]),
|
|
307
307
|
_: 1
|
|
308
308
|
}, 8, ["icon", "class"])) : G("", !0),
|
|
309
|
-
q(n).endDate !== null && q(n).startDate !== null && a.value === null ? (h(),
|
|
309
|
+
q(n).endDate !== null && q(n).startDate !== null && a.value === null ? (h(), T(I, {
|
|
310
310
|
key: 1,
|
|
311
311
|
compact: ""
|
|
312
312
|
}, {
|
|
313
|
-
default:
|
|
313
|
+
default: V(() => [
|
|
314
314
|
k(j, {
|
|
315
315
|
name: "arrow_upward",
|
|
316
316
|
color: "#C7C7CC"
|
|
317
317
|
}),
|
|
318
|
-
|
|
318
|
+
R[0] || (R[0] = C("p", { class: "fm-typo-en-body-md-600 text-fm-color-typo-disabled" }, "N/A", -1))
|
|
319
319
|
]),
|
|
320
320
|
_: 1
|
|
321
321
|
})) : G("", !0)
|
|
@@ -324,10 +324,10 @@ const Ye = /* @__PURE__ */ E({
|
|
|
324
324
|
}, 8, ["content"])
|
|
325
325
|
]),
|
|
326
326
|
u.value ? (h(), S("div", oa, [
|
|
327
|
-
o(u.value.type) === "line" ? (h(),
|
|
327
|
+
o(u.value.type) === "line" ? (h(), T(t, {
|
|
328
328
|
key: 0,
|
|
329
329
|
class: "sparkline",
|
|
330
|
-
datasets:
|
|
330
|
+
datasets: L.value,
|
|
331
331
|
"hide-x-axis": !0,
|
|
332
332
|
"hide-y-axis": !0,
|
|
333
333
|
legend: {
|
|
@@ -336,7 +336,7 @@ const Ye = /* @__PURE__ */ E({
|
|
|
336
336
|
"x-axis": { categories: u.value.dimensions },
|
|
337
337
|
"maintain-aspect-ratio": !1
|
|
338
338
|
}, null, 8, ["datasets", "x-axis"])) : G("", !0)
|
|
339
|
-
])) : (h(), S("div", sa,
|
|
339
|
+
])) : (h(), S("div", sa, R[1] || (R[1] = [
|
|
340
340
|
C("div", { class: "sparkline" }, [
|
|
341
341
|
C("div", { class: "flex flex-col gap-8" }, [
|
|
342
342
|
C("div"),
|
|
@@ -351,12 +351,12 @@ const Ye = /* @__PURE__ */ E({
|
|
|
351
351
|
}), ra = {};
|
|
352
352
|
function ia(l, e) {
|
|
353
353
|
const n = y("FmMenuDivider");
|
|
354
|
-
return h(),
|
|
354
|
+
return h(), T(n);
|
|
355
355
|
}
|
|
356
356
|
const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da = {
|
|
357
357
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
358
358
|
style: { backgroundColor: "#f9f9f9" }
|
|
359
|
-
}, ma = { class: "font-bold" }, pa = { class: "text-fm-color-neutral-gray-300" }, fa = /* @__PURE__ */
|
|
359
|
+
}, ma = { class: "font-bold" }, pa = { class: "text-fm-color-neutral-gray-300" }, fa = /* @__PURE__ */ W({
|
|
360
360
|
__name: "WidgetTable",
|
|
361
361
|
props: {
|
|
362
362
|
modelValue: { required: !0 },
|
|
@@ -364,7 +364,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
364
364
|
},
|
|
365
365
|
emits: ["update:modelValue"],
|
|
366
366
|
setup(l) {
|
|
367
|
-
const e =
|
|
367
|
+
const e = H(l, "modelValue"), { country: n } = re(), m = F(null), f = i(() => {
|
|
368
368
|
var t;
|
|
369
369
|
return ((t = e.value.data) == null ? void 0 : t.columns) || [{ label: "", key: "" }];
|
|
370
370
|
}), c = i(() => {
|
|
@@ -373,19 +373,19 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
373
373
|
}), a = i(() => e.value.filterText), o = i(() => {
|
|
374
374
|
var t, d;
|
|
375
375
|
if (!(a.value && a.value.trim().length > 0 || !((t = c.value[0]) != null && t.isRollup) && !((d = c.value[c.value.length - 1]) != null && d.isRollup))) {
|
|
376
|
-
if (e.value.rollupPosition ===
|
|
377
|
-
return
|
|
378
|
-
if (e.value.rollupPosition ===
|
|
379
|
-
return
|
|
376
|
+
if (e.value.rollupPosition === M.top || e.value.rollupPosition === void 0)
|
|
377
|
+
return M.top;
|
|
378
|
+
if (e.value.rollupPosition === M.bottom)
|
|
379
|
+
return M.bottom;
|
|
380
380
|
}
|
|
381
381
|
}), u = i(() => {
|
|
382
382
|
const p = o.value !== void 0 ? 1 : 0, w = (m.value ? m.value.$el.offsetHeight : 0) - 48;
|
|
383
383
|
return Math.floor((w - 34.5 - 32) / 48) - p;
|
|
384
|
-
}),
|
|
384
|
+
}), L = i(() => {
|
|
385
385
|
var d, g;
|
|
386
386
|
let t = [];
|
|
387
387
|
switch (o.value) {
|
|
388
|
-
case
|
|
388
|
+
case M.top:
|
|
389
389
|
t = [...((d = c.value[0]) == null ? void 0 : d.cells) || []].map((p, w) => {
|
|
390
390
|
var x;
|
|
391
391
|
return {
|
|
@@ -395,7 +395,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
395
395
|
};
|
|
396
396
|
});
|
|
397
397
|
break;
|
|
398
|
-
case
|
|
398
|
+
case M.bottom:
|
|
399
399
|
t = [...((g = c.value[c.value.length - 1]) == null ? void 0 : g.cells) || []].map((p, w) => {
|
|
400
400
|
var x;
|
|
401
401
|
return {
|
|
@@ -420,7 +420,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
420
420
|
}
|
|
421
421
|
return d;
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function R(t) {
|
|
424
424
|
return [...new Array(t < 0 ? 0 : t)].map(() => {
|
|
425
425
|
var g;
|
|
426
426
|
const d = {};
|
|
@@ -440,26 +440,26 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
440
440
|
difference: Ce(t.main, t.comparison, n)
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const I = i(() => {
|
|
444
444
|
var w, x, N;
|
|
445
445
|
let t = ((w = e.value.data) == null ? void 0 : w.rows) || [];
|
|
446
446
|
switch (o.value) {
|
|
447
|
-
case
|
|
447
|
+
case M.bottom:
|
|
448
448
|
t = (x = t[t.length - 1]) != null && x.isRollup ? t.slice(0, -1) : t;
|
|
449
449
|
break;
|
|
450
|
-
case
|
|
450
|
+
case M.top:
|
|
451
451
|
t = (N = t[0]) != null && N.isRollup ? t.slice(1, t.length) : t;
|
|
452
452
|
break;
|
|
453
453
|
}
|
|
454
|
-
const d = t.filter((
|
|
455
|
-
(
|
|
454
|
+
const d = t.filter((B) => !(a.value !== "" && (B.isRollup === !0 || !B.cells.some(
|
|
455
|
+
(P) => {
|
|
456
456
|
var Z;
|
|
457
|
-
return ((
|
|
457
|
+
return ((P == null ? void 0 : P.toLowerCase()) || "").includes((Z = a.value) == null ? void 0 : Z.toLowerCase());
|
|
458
458
|
}
|
|
459
|
-
)))).map((
|
|
459
|
+
)))).map((B) => b(B)), g = d.length % u.value;
|
|
460
460
|
let p = 0;
|
|
461
|
-
return g > 0 ? p = Math.abs(g - u.value) : d.length === 0 && (p = u.value), d.push(...
|
|
462
|
-
}),
|
|
461
|
+
return g > 0 ? p = Math.abs(g - u.value) : d.length === 0 && (p = u.value), d.push(...R(p)), d;
|
|
462
|
+
}), D = i(() => {
|
|
463
463
|
var d;
|
|
464
464
|
let t = [];
|
|
465
465
|
return (d = e.value.data) != null && d.columns && (t = [...e.value.data.columns.map((p) => ({
|
|
@@ -472,8 +472,8 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
472
472
|
p.label
|
|
473
473
|
),
|
|
474
474
|
cell: (w) => {
|
|
475
|
-
var
|
|
476
|
-
const x = j(w.getValue()), N = (
|
|
475
|
+
var B, P;
|
|
476
|
+
const x = j(w.getValue()), N = (P = (B = w == null ? void 0 : w.row) == null ? void 0 : B.original) == null ? void 0 : P.isRollup;
|
|
477
477
|
return ve(
|
|
478
478
|
"div",
|
|
479
479
|
{
|
|
@@ -490,25 +490,25 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
490
490
|
});
|
|
491
491
|
return (t, d) => {
|
|
492
492
|
const g = y("FmTable");
|
|
493
|
-
return h(), S(
|
|
493
|
+
return h(), S(z, null, [
|
|
494
494
|
C("div", ca, [
|
|
495
495
|
U(t.$slots, "menu")
|
|
496
496
|
]),
|
|
497
497
|
k(g, {
|
|
498
498
|
ref_key: "table",
|
|
499
499
|
ref: m,
|
|
500
|
-
"column-defs":
|
|
501
|
-
"row-data":
|
|
500
|
+
"column-defs": D.value,
|
|
501
|
+
"row-data": I.value,
|
|
502
502
|
"search-value": a.value,
|
|
503
503
|
"page-size": u.value,
|
|
504
504
|
"shrink-at": !1,
|
|
505
505
|
"force-mobile-footer": !0,
|
|
506
506
|
class: "scrollbar-hide-table"
|
|
507
507
|
}, {
|
|
508
|
-
"pin-top":
|
|
508
|
+
"pin-top": V(() => [
|
|
509
509
|
C("tbody", null, [
|
|
510
510
|
C("tr", da, [
|
|
511
|
-
(h(!0), S(
|
|
511
|
+
(h(!0), S(z, null, we(L.value, (p, w) => (h(), S("td", {
|
|
512
512
|
key: `${q(ae)()}_${w}`,
|
|
513
513
|
class: "h-[48px] text-fm-color-typo-primary px-16"
|
|
514
514
|
}, [
|
|
@@ -527,7 +527,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
527
527
|
], 64);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
}), va = /* @__PURE__ */
|
|
530
|
+
}), va = /* @__PURE__ */ W({
|
|
531
531
|
__name: "WidgetStackBarChart",
|
|
532
532
|
props: {
|
|
533
533
|
modelValue: { required: !0 },
|
|
@@ -535,28 +535,28 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
535
535
|
},
|
|
536
536
|
emits: ["update:modelValue"],
|
|
537
537
|
setup(l) {
|
|
538
|
-
const e =
|
|
538
|
+
const e = H(l, "modelValue"), n = i(() => {
|
|
539
539
|
var u;
|
|
540
540
|
return ((u = e.value.data) == null ? void 0 : u.xAxis) || [];
|
|
541
541
|
}), m = i(() => {
|
|
542
542
|
var o;
|
|
543
543
|
return ((o = e.value.data) == null ? void 0 : o.datasets) ?? [];
|
|
544
|
-
}), f = i(() => e.value.isTransposed ?? void 0), c =
|
|
544
|
+
}), f = i(() => e.value.isTransposed ?? void 0), c = F(null), a = i(() => m.value.length > 0 ? [
|
|
545
545
|
...m.value.map((o, u) => {
|
|
546
|
-
let
|
|
546
|
+
let L = o.values;
|
|
547
547
|
return {
|
|
548
548
|
label: o.name,
|
|
549
|
-
data:
|
|
549
|
+
data: L,
|
|
550
550
|
dash: !!o.isCompare,
|
|
551
551
|
backgroundColor: Q({ index: u, isCompare: o.isCompare })
|
|
552
552
|
};
|
|
553
553
|
})
|
|
554
554
|
] : []);
|
|
555
555
|
return (o, u) => {
|
|
556
|
-
const
|
|
557
|
-
return h(), S(
|
|
556
|
+
const L = y("FmBarChart");
|
|
557
|
+
return h(), S(z, null, [
|
|
558
558
|
U(o.$slots, "menu"),
|
|
559
|
-
k(
|
|
559
|
+
k(L, {
|
|
560
560
|
ref_key: "chartRef",
|
|
561
561
|
ref: c,
|
|
562
562
|
class: "bar-chart",
|
|
@@ -577,7 +577,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
577
577
|
], 64);
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
}), ha = /* @__PURE__ */
|
|
580
|
+
}), ha = /* @__PURE__ */ W({
|
|
581
581
|
__name: "WidgetStackLineChart",
|
|
582
582
|
props: {
|
|
583
583
|
modelValue: { required: !0 },
|
|
@@ -585,7 +585,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
585
585
|
},
|
|
586
586
|
emits: ["update:modelValue"],
|
|
587
587
|
setup(l) {
|
|
588
|
-
const e =
|
|
588
|
+
const e = H(l, "modelValue"), n = i(() => {
|
|
589
589
|
var a;
|
|
590
590
|
return ((a = e.value.data) == null ? void 0 : a.xAxis) ?? [];
|
|
591
591
|
}), m = i(() => {
|
|
@@ -605,7 +605,7 @@ const ua = /* @__PURE__ */ Ge(ra, [["render", ia]]), ca = { class: "my-4" }, da
|
|
|
605
605
|
] : []);
|
|
606
606
|
return (a, o) => {
|
|
607
607
|
const u = y("FmLineChart");
|
|
608
|
-
return h(), S(
|
|
608
|
+
return h(), S(z, null, [
|
|
609
609
|
U(a.$slots, "menu"),
|
|
610
610
|
k(u, {
|
|
611
611
|
class: "line-chart",
|
|
@@ -649,7 +649,7 @@ function ba(l) {
|
|
|
649
649
|
function ya(l) {
|
|
650
650
|
return l < 12 ? J[Math.min(11, l * 3 - 1)] : J[11];
|
|
651
651
|
}
|
|
652
|
-
const wa = /* @__PURE__ */
|
|
652
|
+
const wa = /* @__PURE__ */ W({
|
|
653
653
|
__name: "WidgetLinechart",
|
|
654
654
|
props: {
|
|
655
655
|
modelValue: { required: !0 },
|
|
@@ -657,7 +657,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
657
657
|
},
|
|
658
658
|
emits: ["update:modelValue"],
|
|
659
659
|
setup(l) {
|
|
660
|
-
const e =
|
|
660
|
+
const e = H(l, "modelValue"), n = i(() => {
|
|
661
661
|
var a;
|
|
662
662
|
return ((a = e.value.data) == null ? void 0 : a.xAxis) ?? [];
|
|
663
663
|
}), m = i(() => {
|
|
@@ -674,7 +674,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
674
674
|
] : []);
|
|
675
675
|
return (a, o) => {
|
|
676
676
|
const u = y("FmLineChart");
|
|
677
|
-
return h(), S(
|
|
677
|
+
return h(), S(z, null, [
|
|
678
678
|
U(a.$slots, "menu"),
|
|
679
679
|
k(u, {
|
|
680
680
|
class: "line-chart",
|
|
@@ -700,9 +700,9 @@ const wa = /* @__PURE__ */ E({
|
|
|
700
700
|
}, Ca = {
|
|
701
701
|
key: 2,
|
|
702
702
|
class: "flex"
|
|
703
|
-
}, $a = /* @__PURE__ */
|
|
703
|
+
}, $a = /* @__PURE__ */ W({
|
|
704
704
|
__name: "DynamicWidget",
|
|
705
|
-
props: /* @__PURE__ */
|
|
705
|
+
props: /* @__PURE__ */ Ne({
|
|
706
706
|
index: {
|
|
707
707
|
type: Number,
|
|
708
708
|
default: 0
|
|
@@ -718,7 +718,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
718
718
|
}),
|
|
719
719
|
emits: ["update:modelValue"],
|
|
720
720
|
setup(l) {
|
|
721
|
-
const e =
|
|
721
|
+
const e = F(!0), n = H(l, "modelValue"), m = l, f = F(null), c = F(n.value.widget.config.rollup), a = F(ae()), o = F(n.value.widget.config.drillDimension), u = i(() => {
|
|
722
722
|
if (O.value.length > 0) {
|
|
723
723
|
const s = O.value.findIndex(
|
|
724
724
|
(v) => v.value === o.value
|
|
@@ -726,9 +726,9 @@ const wa = /* @__PURE__ */ E({
|
|
|
726
726
|
return s >= 0 ? s : 0;
|
|
727
727
|
} else
|
|
728
728
|
return -1;
|
|
729
|
-
}),
|
|
729
|
+
}), L = i(() => u.value !== 0), b = i(
|
|
730
730
|
() => u.value != O.value.length - 1
|
|
731
|
-
),
|
|
731
|
+
), R = F(n.value.widget.config.showLabel ?? !1), j = i(() => n.value.widget.config.showSearchBar), I = F(""), { breakpoints: D } = Je(), t = F(), d = i(() => D.value.lg || D.value.md ? ga(n.value.size.width) : D.value.sm ? ba(n.value.size.width) : ya(n.value.size.width)), g = i(
|
|
732
732
|
() => Qe.find((s) => s.type === n.value.widget.type)
|
|
733
733
|
), p = he(() => {
|
|
734
734
|
var s;
|
|
@@ -757,7 +757,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
757
757
|
}
|
|
758
758
|
else
|
|
759
759
|
return ge;
|
|
760
|
-
}), x =
|
|
760
|
+
}), x = F(null), { selectedLocationIds: N, dateRange: B, compareDateRange: P, timeRange: Z } = se(_e()), { businessId: xe } = se(re()), _ = i(() => {
|
|
761
761
|
const s = JSON.parse(JSON.stringify(n.value.widget));
|
|
762
762
|
return {
|
|
763
763
|
...s,
|
|
@@ -769,36 +769,36 @@ const wa = /* @__PURE__ */ E({
|
|
|
769
769
|
}
|
|
770
770
|
};
|
|
771
771
|
}), ie = i(() => {
|
|
772
|
-
let s, v,
|
|
772
|
+
let s, v, $, E;
|
|
773
773
|
switch (_.value.type) {
|
|
774
774
|
case r.Table:
|
|
775
|
-
|
|
775
|
+
$ = I.value, E = _.value.config.rollupPosition;
|
|
776
776
|
break;
|
|
777
777
|
case r.BarChart:
|
|
778
778
|
case r.LineChart:
|
|
779
779
|
case r.StackBarChart:
|
|
780
780
|
case r.StackLineChart:
|
|
781
781
|
case r.Circular:
|
|
782
|
-
s =
|
|
782
|
+
s = R.value, v = _.value.config.isTransposed;
|
|
783
783
|
break;
|
|
784
784
|
}
|
|
785
785
|
return {
|
|
786
786
|
data: x.value,
|
|
787
787
|
showLabel: s,
|
|
788
788
|
isTransposed: v,
|
|
789
|
-
rollupPosition:
|
|
790
|
-
filterText:
|
|
789
|
+
rollupPosition: E,
|
|
790
|
+
filterText: $
|
|
791
791
|
};
|
|
792
792
|
}), ue = i(() => {
|
|
793
793
|
const { config: s } = n.value.widget;
|
|
794
794
|
if (s.rollup != null) {
|
|
795
|
-
const v = [...s.dimensions].filter((
|
|
795
|
+
const v = [...s.dimensions].filter(($) => !$.hide);
|
|
796
796
|
return v.sort(
|
|
797
|
-
(
|
|
797
|
+
($, E) => (s.rowIds || []).indexOf(oe($)) - (s.rowIds || []).indexOf(oe(E))
|
|
798
798
|
), [
|
|
799
799
|
{ label: "None", value: null },
|
|
800
800
|
{ label: "Grand Total", value: 0 },
|
|
801
|
-
...[...v].slice(0, v.length - 1).map((
|
|
801
|
+
...[...v].slice(0, v.length - 1).map(($, E) => ({ label: $.label, value: E + 1 }))
|
|
802
802
|
];
|
|
803
803
|
}
|
|
804
804
|
return [];
|
|
@@ -810,15 +810,15 @@ const wa = /* @__PURE__ */ E({
|
|
|
810
810
|
})) : [];
|
|
811
811
|
});
|
|
812
812
|
ee(n.value, (s) => {
|
|
813
|
-
c.value = s.widget.config.rollup,
|
|
813
|
+
c.value = s.widget.config.rollup, R.value = s.widget.config.showLabel ?? !1;
|
|
814
814
|
}), ee([() => c.value], () => {
|
|
815
815
|
c.value !== null && (n.value.widget.config.rollup = c.value);
|
|
816
816
|
}), ee(
|
|
817
817
|
[
|
|
818
818
|
() => _.value,
|
|
819
|
-
() =>
|
|
819
|
+
() => B.value,
|
|
820
820
|
() => Z.value,
|
|
821
|
-
() =>
|
|
821
|
+
() => P.value,
|
|
822
822
|
() => N.value,
|
|
823
823
|
() => xe.value
|
|
824
824
|
],
|
|
@@ -836,9 +836,9 @@ const wa = /* @__PURE__ */ E({
|
|
|
836
836
|
},
|
|
837
837
|
{ deep: !0 }
|
|
838
838
|
), Pe(() => {
|
|
839
|
-
p(), addEventListener("resize", p), de();
|
|
840
|
-
}),
|
|
841
|
-
removeEventListener("resize", p);
|
|
839
|
+
p(), D.value.sm || D.value.md || D.value.xs ? (console.log("Ignoring resize event due to keyboard"), addEventListener("change", p)) : addEventListener("resize", p), de();
|
|
840
|
+
}), Ee(() => {
|
|
841
|
+
D.value.sm || D.value.md || D.value.xs ? (console.log("Ignoring resize event due to keyboard"), removeEventListener("change", p)) : removeEventListener("resize", p);
|
|
842
842
|
});
|
|
843
843
|
const ce = Ke();
|
|
844
844
|
let X;
|
|
@@ -885,51 +885,51 @@ const wa = /* @__PURE__ */ E({
|
|
|
885
885
|
}
|
|
886
886
|
})), Le = _.value.type === r.Spacer ? "flat" : "outlined", Re = _.value.type === r.Spacer ? "p-0" : "p-16";
|
|
887
887
|
return (s, v) => {
|
|
888
|
-
const
|
|
889
|
-
return h(),
|
|
888
|
+
const $ = y("FmTooltip"), E = y("FmSearch"), Te = y("FmCheckbox"), le = y("FmButton"), $e = y("FmSelect"), Ve = y("FmMenuItem"), Be = y("FmMenu"), Ae = y("FmForm"), Me = y("FmCircularProgress"), Ie = y("FmCard");
|
|
889
|
+
return h(), T(Ie, {
|
|
890
890
|
ref_key: "tileCard",
|
|
891
891
|
ref: f,
|
|
892
892
|
class: te(`${d.value} ${q(Re)}`),
|
|
893
893
|
variant: q(Le)
|
|
894
894
|
}, {
|
|
895
|
-
default:
|
|
896
|
-
e.value ? (h(),
|
|
895
|
+
default: V(() => [
|
|
896
|
+
e.value ? (h(), T(Me, { key: 1 })) : (h(), S("div", {
|
|
897
897
|
key: 0,
|
|
898
898
|
style: ye({ height: t.value })
|
|
899
899
|
}, [
|
|
900
|
-
(h(),
|
|
900
|
+
(h(), T(ze(w.value), {
|
|
901
901
|
key: a.value,
|
|
902
902
|
modelValue: ie.value,
|
|
903
903
|
"onUpdate:modelValue": v[3] || (v[3] = (Y) => ie.value = Y)
|
|
904
904
|
}, {
|
|
905
|
-
menu:
|
|
905
|
+
menu: V(() => [
|
|
906
906
|
k(Ae, { class: "flex items-center gap-2" }, {
|
|
907
|
-
default:
|
|
907
|
+
default: V(() => {
|
|
908
908
|
var Y, me, pe, fe;
|
|
909
909
|
return [
|
|
910
|
-
k(
|
|
910
|
+
k($, {
|
|
911
911
|
variant: "plain",
|
|
912
912
|
placement: "right",
|
|
913
913
|
content: _.value.description,
|
|
914
914
|
"hide-arrow": !0,
|
|
915
915
|
disabled: !_.value.description
|
|
916
916
|
}, {
|
|
917
|
-
default:
|
|
917
|
+
default: V(() => [
|
|
918
918
|
C("p", {
|
|
919
919
|
class: te(["fm-typo-en-body-md-400 line-clamp-1 text-fm-color-typo-secondary", `${_.value.description ? "border-b-2 border-dashed border-gray-300" : ""}`])
|
|
920
920
|
}, K(_.value.title), 3)
|
|
921
921
|
]),
|
|
922
922
|
_: 1
|
|
923
923
|
}, 8, ["content", "disabled"]),
|
|
924
|
-
(Y = g.value) != null && Y.showSearchBar ? (h(),
|
|
924
|
+
(Y = g.value) != null && Y.showSearchBar ? (h(), T(E, {
|
|
925
925
|
key: 0,
|
|
926
|
-
modelValue:
|
|
927
|
-
"onUpdate:modelValue": v[0] || (v[0] = (
|
|
926
|
+
modelValue: I.value,
|
|
927
|
+
"onUpdate:modelValue": v[0] || (v[0] = (A) => I.value = A),
|
|
928
928
|
class: "grow"
|
|
929
929
|
}, null, 8, ["modelValue"])) : (h(), S("div", _a)),
|
|
930
|
-
|
|
931
|
-
modelValue:
|
|
932
|
-
"onUpdate:modelValue": v[1] || (v[1] = (
|
|
930
|
+
We(k(Te, {
|
|
931
|
+
modelValue: R.value,
|
|
932
|
+
"onUpdate:modelValue": v[1] || (v[1] = (A) => R.value = A),
|
|
933
933
|
label: "Label",
|
|
934
934
|
value: !1
|
|
935
935
|
}, null, 8, ["modelValue"]), [
|
|
@@ -939,7 +939,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
939
939
|
k(le, {
|
|
940
940
|
icon: "arrow_upward",
|
|
941
941
|
variant: "tertiary",
|
|
942
|
-
disabled: !
|
|
942
|
+
disabled: !L.value,
|
|
943
943
|
onClick: Se
|
|
944
944
|
}, null, 8, ["disabled"]),
|
|
945
945
|
k(le, {
|
|
@@ -949,28 +949,28 @@ const wa = /* @__PURE__ */ E({
|
|
|
949
949
|
onClick: De
|
|
950
950
|
}, null, 8, ["disabled"])
|
|
951
951
|
])) : G("", !0),
|
|
952
|
-
(fe = g.value) != null && fe.showRollup && ue.value.length > 0 ? (h(),
|
|
952
|
+
(fe = g.value) != null && fe.showRollup && ue.value.length > 0 ? (h(), T($e, {
|
|
953
953
|
key: 3,
|
|
954
954
|
modelValue: c.value,
|
|
955
|
-
"onUpdate:modelValue": v[2] || (v[2] = (
|
|
955
|
+
"onUpdate:modelValue": v[2] || (v[2] = (A) => c.value = A),
|
|
956
956
|
class: "w-[150px]",
|
|
957
957
|
items: ue.value
|
|
958
958
|
}, null, 8, ["modelValue", "items"])) : G("", !0),
|
|
959
|
-
m.hideExport ? G("", !0) : (h(),
|
|
959
|
+
m.hideExport ? G("", !0) : (h(), T(Be, {
|
|
960
960
|
key: 4,
|
|
961
961
|
shift: !0
|
|
962
962
|
}, {
|
|
963
|
-
"menu-button":
|
|
963
|
+
"menu-button": V(() => [
|
|
964
964
|
k(le, {
|
|
965
965
|
icon: "more_vert",
|
|
966
966
|
variant: "tertiary"
|
|
967
967
|
})
|
|
968
968
|
]),
|
|
969
|
-
default:
|
|
970
|
-
(h(!0), S(
|
|
971
|
-
key:
|
|
972
|
-
label:
|
|
973
|
-
onClick:
|
|
969
|
+
default: V(() => [
|
|
970
|
+
(h(!0), S(z, null, we(q(Fe), (A) => (h(), T(Ve, {
|
|
971
|
+
key: A.value,
|
|
972
|
+
label: A.label,
|
|
973
|
+
onClick: A.onClick
|
|
974
974
|
}, null, 8, ["label", "onClick"]))), 128))
|
|
975
975
|
]),
|
|
976
976
|
_: 1
|
|
@@ -990,7 +990,7 @@ const wa = /* @__PURE__ */ E({
|
|
|
990
990
|
}
|
|
991
991
|
});
|
|
992
992
|
export {
|
|
993
|
-
|
|
993
|
+
M as R,
|
|
994
994
|
$a as _,
|
|
995
995
|
oe as g
|
|
996
996
|
};
|