@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.
- package/dist/{App-BG5uoHAn.js → App-CpPkDCME.js} +31 -31
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-dX7Y4f-_.js → BaseDialog.vue_vue_type_script_setup_true_lang-BLVm6EP9.js} +718 -962
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-C7mhpRK0.js +185 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-arY3ZcKZ.js → Default.vue_vue_type_script_setup_true_lang-DTHkWGvx.js} +2 -2
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DVY4vxAN.js +1669 -0
- package/dist/{InsightView-BEo7cPN3.js → InsightView-wYbhKrWa.js} +5 -5
- package/dist/{Integration-BovNO2yX.js → Integration-GkPCivXG.js} +2 -2
- package/dist/{Integrations-DIXSWGS_.js → Integrations-BGNXoeWI.js} +3 -3
- package/dist/{Layout-DhAHGBTk.js → Layout-B7pJLV4_.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-C7pQMilo.js +352 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DuzQ1OX-.js → NavigationTab.vue_vue_type_script_setup_true_lang-Cl6q8Efn.js} +7518 -7331
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js → NoData.vue_vue_type_script_setup_true_lang-CUuIeYhQ.js} +1 -1
- package/dist/{OverviewView-DEZKfz6j.js → OverviewView-DzumtIfB.js} +5 -5
- package/dist/{Report-WQb5zc2W.js → Report-B_SX8ejx.js} +4 -4
- package/dist/ReportEditor-D5OHT5As.js +1013 -0
- package/dist/{ReportView-CJ4PA-Je.js → ReportView-DPMurcsC.js} +7 -7
- 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
- package/dist/{Setting-Do3ReOAh.js → Setting-BsikuNba.js} +4 -4
- package/dist/TileEditor-Bzk4U52d.js +2735 -0
- package/dist/TransitionFade-Blz6m84x.js +2499 -0
- package/dist/app.js +15 -41
- package/dist/assets/{formatChartData.worker-DOuklPCk.js → formatChartData.worker-CO5zKPH5.js} +6 -6
- package/dist/assets/{processTableData.worker-DphUPEW7.js → processTableData.worker-BAMcED0j.js} +6 -6
- package/dist/helper-B2iB0Dbh.js +75 -0
- package/dist/{vue-i18n-BJW_sJot.js → vue-i18n-D33f1SSo.js} +400 -405
- package/package.json +1 -1
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js +0 -282
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-BlJuhyD7.js +0 -2377
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BSapw37S.js +0 -107
- package/dist/ReportEditor-BiRciW22.js +0 -1055
- package/dist/TileEditor-S-aswtJh.js +0 -2744
- package/dist/TransitionFade-C6FDOvN4.js +0 -2365
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as o, resolveComponent as t, createBlock as r, openBlock as n, withCtx as _, createVNode as c } from "vue";
|
|
2
|
-
import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-DTHkWGvx.js";
|
|
3
3
|
const f = /* @__PURE__ */ o({
|
|
4
4
|
__name: "Layout",
|
|
5
5
|
setup(m) {
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { defineComponent as R, computed as j, ref as oe, watch as q, resolveComponent as b, createElementBlock as f, openBlock as u, renderSlot as re, Fragment as D, renderList as U, createBlock as g, unref as r, withCtx as C, createElementVNode as L, createCommentVNode as N, createVNode as p, isRef as S, useModel as ue, normalizeClass as z, toDisplayString as ie } from "vue";
|
|
2
|
+
import { u as me, b as H, d as E, i as de } from "./vue-i18n-D33f1SSo.js";
|
|
3
|
+
import { storeToRefs as T } from "pinia";
|
|
4
|
+
import { a as pe, d as ce } from "./NavigationTab.vue_vue_type_script_setup_true_lang-Cl6q8Efn.js";
|
|
5
|
+
import { _ as J, a as fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-C7mhpRK0.js";
|
|
6
|
+
import { a as ve, b as be, D as w, q as _e, W as Y, S as ye } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BLVm6EP9.js";
|
|
7
|
+
import { _ as he } from "./NoData.vue_vue_type_script_setup_true_lang-CUuIeYhQ.js";
|
|
8
|
+
import { d as ge } from "./helper-B2iB0Dbh.js";
|
|
9
|
+
import { detectLocale as Fe } from "@feedmepos/mf-common";
|
|
10
|
+
import { useBreakpoints as ke } from "@feedmepos/ui-library";
|
|
11
|
+
const xe = { class: "flex flex-wrap gap-2" }, we = { class: "flex flex-col gap-1 p-2 bg-fm-color-neutral-white max-h-[300px] overflow-y-auto relative fm-shadow-light-300" }, Ce = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "flex justify-center my-2"
|
|
14
|
+
}, Se = /* @__PURE__ */ R({
|
|
15
|
+
__name: "FilterSelector",
|
|
16
|
+
setup(I) {
|
|
17
|
+
var G;
|
|
18
|
+
const { t: v } = me(), { currentReport: m } = T(ve());
|
|
19
|
+
let { globalFilters: F, isGlobalFiltersLoading: i, timeRange: _, dateRange: y, selectedLocationIds: h } = T(H()), { schemas: $ } = T(be());
|
|
20
|
+
const n = j(() => {
|
|
21
|
+
var e;
|
|
22
|
+
return ((e = m.value) == null ? void 0 : e.id) ?? "";
|
|
23
|
+
}), o = oe([]);
|
|
24
|
+
q(
|
|
25
|
+
((G = m.value) == null ? void 0 : G.globalFilters) || [],
|
|
26
|
+
() => {
|
|
27
|
+
o.value = F.value.map((e) => ({
|
|
28
|
+
filter: e,
|
|
29
|
+
search: "",
|
|
30
|
+
options: [],
|
|
31
|
+
type: K(e)
|
|
32
|
+
}));
|
|
33
|
+
},
|
|
34
|
+
{ deep: !0, immediate: !0 }
|
|
35
|
+
), q(
|
|
36
|
+
[_, y, h],
|
|
37
|
+
async () => {
|
|
38
|
+
await te();
|
|
39
|
+
},
|
|
40
|
+
{ deep: !0, immediate: !0 }
|
|
41
|
+
);
|
|
42
|
+
var k = void 0;
|
|
43
|
+
function K(e) {
|
|
44
|
+
var l;
|
|
45
|
+
const t = (l = $.value.find((a) => a.name === e.schemaName)) == null ? void 0 : l.fields.find((a) => a.name === e.name);
|
|
46
|
+
return t == null ? void 0 : t.type;
|
|
47
|
+
}
|
|
48
|
+
function Q(e) {
|
|
49
|
+
return {
|
|
50
|
+
type: Y.Table,
|
|
51
|
+
config: {
|
|
52
|
+
schemaNames: Array.from(
|
|
53
|
+
/* @__PURE__ */ new Set([e.schemaName, ...(e.filters ?? []).map((t) => t.schemaName)])
|
|
54
|
+
),
|
|
55
|
+
dimensions: [
|
|
56
|
+
{
|
|
57
|
+
name: e.name ?? "",
|
|
58
|
+
schemaName: e.schemaName ?? "",
|
|
59
|
+
label: e.name ?? "",
|
|
60
|
+
hide: !1,
|
|
61
|
+
option: null
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
rowIds: [],
|
|
65
|
+
metrics: [],
|
|
66
|
+
filters: e.filters || [],
|
|
67
|
+
sorts: [
|
|
68
|
+
{
|
|
69
|
+
name: e.name ?? "",
|
|
70
|
+
schemaName: e.schemaName ?? "",
|
|
71
|
+
type: ye.Asc,
|
|
72
|
+
aggregation: null,
|
|
73
|
+
dimensionOption: null
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
joinDatasources: [],
|
|
77
|
+
limit: null,
|
|
78
|
+
rollup: void 0,
|
|
79
|
+
drillDimension: void 0,
|
|
80
|
+
showGrandTotal: !1,
|
|
81
|
+
breakdownDimension: void 0,
|
|
82
|
+
sparklineDimension: void 0,
|
|
83
|
+
isTransposed: !1,
|
|
84
|
+
isDrillable: !1
|
|
85
|
+
},
|
|
86
|
+
title: ""
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function V(e) {
|
|
90
|
+
return e.options.every((t) => {
|
|
91
|
+
var l;
|
|
92
|
+
return (l = e.filter.values) == null ? void 0 : l.includes(t.value);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
function X(e) {
|
|
96
|
+
V(e) ? e.filter.values = ["NULL"] : e.filter.values = e.options.map((t) => t.value);
|
|
97
|
+
}
|
|
98
|
+
const Z = j(
|
|
99
|
+
() => o.value.map((e) => {
|
|
100
|
+
const t = e.options, l = e.search.toLowerCase() ?? "";
|
|
101
|
+
return t.filter((a) => a.label.toLowerCase().includes(l.toLowerCase()));
|
|
102
|
+
})
|
|
103
|
+
);
|
|
104
|
+
async function ee(e) {
|
|
105
|
+
switch (e.type) {
|
|
106
|
+
case w.String:
|
|
107
|
+
{
|
|
108
|
+
const t = await _e(
|
|
109
|
+
Q(e.filter),
|
|
110
|
+
k.signal
|
|
111
|
+
), l = (t == null ? void 0 : t.type) === Y.Table ? t.rows.map((a) => {
|
|
112
|
+
var d;
|
|
113
|
+
return ((d = a.cells) == null ? void 0 : d[0]) ?? "";
|
|
114
|
+
}) : [];
|
|
115
|
+
e.options = l.map((a) => ({
|
|
116
|
+
label: a,
|
|
117
|
+
value: a
|
|
118
|
+
})), e.filter.values = l.length ? l : ["NULL"];
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
case w.Bool:
|
|
122
|
+
e.options = [
|
|
123
|
+
{ label: "Yes", value: !0 },
|
|
124
|
+
{ label: "No", value: !1 }
|
|
125
|
+
], e.filter.values = [!0, !1];
|
|
126
|
+
break;
|
|
127
|
+
case w.Timestamp:
|
|
128
|
+
case w.Numeric:
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
async function te() {
|
|
133
|
+
if (!(!n.value || !o.value.length)) {
|
|
134
|
+
k && (k == null || k.abort()), k = new AbortController();
|
|
135
|
+
try {
|
|
136
|
+
i.value = !0;
|
|
137
|
+
const e = o.value.map(async (t) => {
|
|
138
|
+
await ee(t);
|
|
139
|
+
});
|
|
140
|
+
await Promise.all(e);
|
|
141
|
+
} finally {
|
|
142
|
+
i.value = !1;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function le(e, t) {
|
|
147
|
+
var a, d;
|
|
148
|
+
if ((a = e.filter.values) == null ? void 0 : a.includes(t)) {
|
|
149
|
+
let x = (e.filter.values || []).filter((s) => s !== t);
|
|
150
|
+
x.length === 0 && (x = ["NULL"]), e.filter.values = x;
|
|
151
|
+
} else
|
|
152
|
+
(d = e.filter.values) == null || d.push(t);
|
|
153
|
+
}
|
|
154
|
+
function M(e, t) {
|
|
155
|
+
if (t === null)
|
|
156
|
+
e.values = [];
|
|
157
|
+
else {
|
|
158
|
+
const l = E(t.startDate).startOf("day").utc().toISOString(), a = E(t.endDate).endOf("day").utc().toISOString();
|
|
159
|
+
e.values = [l, a];
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
function ae(e) {
|
|
163
|
+
var l;
|
|
164
|
+
const t = (l = e.filter.values) == null ? void 0 : l.filter((a) => a !== "NULL");
|
|
165
|
+
return `${v("report.section.filter.selectAll")} (${t == null ? void 0 : t.length}/${e.options.length})`;
|
|
166
|
+
}
|
|
167
|
+
function se(e) {
|
|
168
|
+
const t = e.options.length, l = v("report.section.filter.search"), a = v("report.common.results", { count: t });
|
|
169
|
+
return `${l} (${a})`;
|
|
170
|
+
}
|
|
171
|
+
function O(e) {
|
|
172
|
+
var l, a, d;
|
|
173
|
+
const t = de(e.filter);
|
|
174
|
+
switch (e.type) {
|
|
175
|
+
case w.Timestamp:
|
|
176
|
+
return ((l = e.filter.values) == null ? void 0 : l.length) === 2 ? `${t} is between ${ge({
|
|
177
|
+
startDate: (a = e.filter.values) == null ? void 0 : a[0],
|
|
178
|
+
endDate: (d = e.filter.values) == null ? void 0 : d[1],
|
|
179
|
+
locale: Fe()
|
|
180
|
+
})}` : t;
|
|
181
|
+
default:
|
|
182
|
+
return t;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return (e, t) => {
|
|
186
|
+
const l = b("FmCircularProgress"), a = b("FmTextField"), d = b("FmMenuItem"), x = b("FmMenu");
|
|
187
|
+
return u(), f("div", xe, [
|
|
188
|
+
(u(!0), f(D, null, U(o.value, (s, ne) => {
|
|
189
|
+
var A, B, P;
|
|
190
|
+
return u(), f("div", {
|
|
191
|
+
key: `${s.filter.schemaName}-${s.filter.name}`
|
|
192
|
+
}, [
|
|
193
|
+
s.type === r(w).Timestamp ? (u(), g(J, {
|
|
194
|
+
key: 0,
|
|
195
|
+
"model-value": { startDate: (A = s.filter.values) == null ? void 0 : A[0], endDate: (B = s.filter.values) == null ? void 0 : B[1] },
|
|
196
|
+
class: "w-full",
|
|
197
|
+
label: O(s),
|
|
198
|
+
removable: ((P = s.filter.values) == null ? void 0 : P.length) === 2,
|
|
199
|
+
onUpdate: (c) => M(s.filter, c),
|
|
200
|
+
onChipClosed: () => M(s.filter, null)
|
|
201
|
+
}, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : (u(), g(x, {
|
|
202
|
+
key: 1,
|
|
203
|
+
"close-on-click": !1,
|
|
204
|
+
shift: !0
|
|
205
|
+
}, {
|
|
206
|
+
"menu-button": C(() => [
|
|
207
|
+
p(fe, {
|
|
208
|
+
"left-icon": "filter_alt",
|
|
209
|
+
"right-icon": "expand_more",
|
|
210
|
+
label: O(s)
|
|
211
|
+
}, null, 8, ["label"])
|
|
212
|
+
]),
|
|
213
|
+
"menu-wrapper": C(() => [
|
|
214
|
+
L("div", we, [
|
|
215
|
+
r(i) ? (u(), f("div", Ce, [
|
|
216
|
+
p(l)
|
|
217
|
+
])) : N("", !0),
|
|
218
|
+
s.options.length > 0 && !r(i) ? (u(), f(D, { key: 1 }, [
|
|
219
|
+
p(a, {
|
|
220
|
+
modelValue: s.search,
|
|
221
|
+
"onUpdate:modelValue": (c) => s.search = c,
|
|
222
|
+
type: "text",
|
|
223
|
+
"prepend-icon": "search",
|
|
224
|
+
placeholder: se(s),
|
|
225
|
+
class: "border px-2 py-1 text-sm mb-1 rounded"
|
|
226
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
|
|
227
|
+
p(d, {
|
|
228
|
+
label: ae(s),
|
|
229
|
+
"has-checkbox": !0,
|
|
230
|
+
"model-value": V(s),
|
|
231
|
+
indeterminate: !0,
|
|
232
|
+
onClick: (c) => X(s)
|
|
233
|
+
}, null, 8, ["label", "model-value", "onClick"]),
|
|
234
|
+
(u(!0), f(D, null, U(Z.value[ne], (c) => {
|
|
235
|
+
var W;
|
|
236
|
+
return u(), g(d, {
|
|
237
|
+
key: c.value,
|
|
238
|
+
label: c.label,
|
|
239
|
+
"has-checkbox": !0,
|
|
240
|
+
"model-value": (W = s.filter.values) == null ? void 0 : W.includes(c.value),
|
|
241
|
+
onClick: () => le(s, c.value)
|
|
242
|
+
}, null, 8, ["label", "model-value", "onClick"]);
|
|
243
|
+
}), 128))
|
|
244
|
+
], 64)) : r(i) ? N("", !0) : (u(), g(he, { key: 2 }))
|
|
245
|
+
])
|
|
246
|
+
]),
|
|
247
|
+
_: 2
|
|
248
|
+
}, 1024))
|
|
249
|
+
]);
|
|
250
|
+
}), 128)),
|
|
251
|
+
re(e.$slots, "default")
|
|
252
|
+
]);
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
}), $e = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, De = { class: "flex flex-col gap-2 py-2" }, Te = /* @__PURE__ */ R({
|
|
256
|
+
__name: "Filter",
|
|
257
|
+
setup(I) {
|
|
258
|
+
const {
|
|
259
|
+
locations: v,
|
|
260
|
+
selectedLocationIds: m,
|
|
261
|
+
dateRange: F,
|
|
262
|
+
compareDateRange: i,
|
|
263
|
+
timeRange: _,
|
|
264
|
+
defaultDateSetting: y,
|
|
265
|
+
selectTimeDefault: h
|
|
266
|
+
} = T(H());
|
|
267
|
+
return ($, n) => (u(), f("div", $e, [
|
|
268
|
+
L("div", De, [
|
|
269
|
+
p(pe, {
|
|
270
|
+
modelValue: r(m),
|
|
271
|
+
"onUpdate:modelValue": n[5] || (n[5] = (o) => S(m) ? m.value = o : null),
|
|
272
|
+
options: r(v)
|
|
273
|
+
}, {
|
|
274
|
+
default: C(() => [
|
|
275
|
+
p(J, {
|
|
276
|
+
"date-range": r(F),
|
|
277
|
+
"onUpdate:dateRange": n[0] || (n[0] = (o) => S(F) ? F.value = o : null),
|
|
278
|
+
"compare-date-range": r(i),
|
|
279
|
+
"onUpdate:compareDateRange": n[1] || (n[1] = (o) => S(i) ? i.value = o : null),
|
|
280
|
+
"compare-type": r(y).defaultCompareType,
|
|
281
|
+
"onUpdate:compareType": n[2] || (n[2] = (o) => r(y).defaultCompareType = o),
|
|
282
|
+
compare: ""
|
|
283
|
+
}, null, 8, ["date-range", "compare-date-range", "compare-type"]),
|
|
284
|
+
p(ce, {
|
|
285
|
+
"time-range": r(_),
|
|
286
|
+
"onUpdate:timeRange": n[3] || (n[3] = (o) => S(_) ? _.value = o : null),
|
|
287
|
+
"select-time-default": r(h),
|
|
288
|
+
"onUpdate:selectTimeDefault": n[4] || (n[4] = (o) => S(h) ? h.value = o : null),
|
|
289
|
+
"default-date-range": r(y).timeOptions
|
|
290
|
+
}, null, 8, ["time-range", "select-time-default", "default-date-range"]),
|
|
291
|
+
p(Se)
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
}, 8, ["modelValue", "options"])
|
|
295
|
+
])
|
|
296
|
+
]));
|
|
297
|
+
}
|
|
298
|
+
}), Le = { class: "fm-typo-en-body-md-400" }, Pe = /* @__PURE__ */ R({
|
|
299
|
+
__name: "MenuTab",
|
|
300
|
+
props: {
|
|
301
|
+
modelValue: { required: !1, default: [] },
|
|
302
|
+
modelModifiers: {}
|
|
303
|
+
},
|
|
304
|
+
emits: ["update:modelValue"],
|
|
305
|
+
setup(I) {
|
|
306
|
+
const v = ue(I, "modelValue"), { breakpoints: m } = ke();
|
|
307
|
+
return (F, i) => {
|
|
308
|
+
const _ = b("FmButton"), y = b("FmIcon"), h = b("FmMenuItem"), $ = b("FmMenu");
|
|
309
|
+
return u(), f("div", {
|
|
310
|
+
class: z(["flex items-start pb-2 px-24", `${r(m).lg || r(m).md ? "px-24" : "pl-3"}`])
|
|
311
|
+
}, [
|
|
312
|
+
p(Te),
|
|
313
|
+
i[0] || (i[0] = L("div", { class: "flex grow" }, null, -1)),
|
|
314
|
+
v.value.length > 0 ? (u(), g($, {
|
|
315
|
+
key: 0,
|
|
316
|
+
trigger: "click",
|
|
317
|
+
placement: "left",
|
|
318
|
+
shift: !0,
|
|
319
|
+
class: z(r(m).sm || r(m).xs ? "pr-3" : "")
|
|
320
|
+
}, {
|
|
321
|
+
"menu-button": C(() => [
|
|
322
|
+
p(_, {
|
|
323
|
+
"append-icon": "more_vert",
|
|
324
|
+
variant: "tertiary",
|
|
325
|
+
size: "md",
|
|
326
|
+
class: "w-[36px] bg-none"
|
|
327
|
+
})
|
|
328
|
+
]),
|
|
329
|
+
default: C(() => [
|
|
330
|
+
(u(!0), f(D, null, U(v.value, (n, o) => (u(), g(h, {
|
|
331
|
+
key: `button-${o}`,
|
|
332
|
+
onClick: n.onClick
|
|
333
|
+
}, {
|
|
334
|
+
label: C(() => [
|
|
335
|
+
n.prependIcon ?? !1 ? (u(), g(y, {
|
|
336
|
+
key: 0,
|
|
337
|
+
name: n.icon
|
|
338
|
+
}, null, 8, ["name"])) : N("", !0),
|
|
339
|
+
L("p", Le, ie(n.label), 1)
|
|
340
|
+
]),
|
|
341
|
+
_: 2
|
|
342
|
+
}, 1032, ["onClick"]))), 128))
|
|
343
|
+
]),
|
|
344
|
+
_: 1
|
|
345
|
+
}, 8, ["class"])) : N("", !0)
|
|
346
|
+
], 2);
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
export {
|
|
351
|
+
Pe as _
|
|
352
|
+
};
|