@feedmepos/mf-report 5.19.20-beta.0 → 5.19.21-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-tXXht-5s.js → App-C4x7ZEye.js} +4 -4
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DZvH0Y-3.js → BaseDialog.vue_vue_type_script_setup_true_lang-CosulEnD.js} +862 -662
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js +282 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CC4O6KVY.js → Default.vue_vue_type_script_setup_true_lang-g1a2ZeGy.js} +2 -2
- package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-Cgc4ZMrl.js +2455 -0
- package/dist/{InsightView-BnOUYD5B.js → InsightView-jAOVvZfx.js} +5 -5
- package/dist/{Integration-BkIHfAt8.js → Integration-BovNO2yX.js} +2 -2
- package/dist/{Integrations-D4ju0l38.js → Integrations-DIXSWGS_.js} +3 -3
- package/dist/{Layout-Bx8ljvot.js → Layout-CptBKFVs.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BGEMZOKu.js +107 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-TcdhfNBd.js → NavigationTab.vue_vue_type_script_setup_true_lang-B3sRs2Tc.js} +7331 -7518
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DX1We5Q0.js → NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js} +1 -1
- package/dist/{OverviewView-CNqRybNx.js → OverviewView-DVL5KgO_.js} +5 -5
- package/dist/{Report-CTiAbY0D.js → Report-C6U6OiZy.js} +4 -4
- package/dist/ReportEditor-DD8jAl9a.js +1070 -0
- package/dist/{ReportView-CQuveOhV.js → ReportView-DAL1aJFD.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-DYOjRnAy.js → SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js} +1 -1
- package/dist/{Setting-GJaJ_nux.js → Setting-DpyuOpXG.js} +4 -4
- package/dist/TileEditor-B4NsHTN2.js +2744 -0
- package/dist/TransitionFade-z0DXUsgP.js +2366 -0
- package/dist/app.js +41 -15
- package/dist/{vue-i18n-DsnU36hZ.js → vue-i18n-BJW_sJot.js} +405 -400
- package/package.json +1 -1
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BVi8DNni.js +0 -185
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-BQh_qEEI.js +0 -1669
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-CSLsIaD4.js +0 -352
- package/dist/ReportEditor-C47BEkUJ.js +0 -1013
- package/dist/TileEditor-BRQvaLQy.js +0 -2735
- package/dist/TransitionFade-B-VvNjOR.js +0 -2499
- package/dist/helper-CLGnwM-X.js +0 -75
|
@@ -1,352 +0,0 @@
|
|
|
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-DsnU36hZ.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-TcdhfNBd.js";
|
|
5
|
-
import { _ as J, a as fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-BVi8DNni.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-DZvH0Y-3.js";
|
|
7
|
-
import { _ as he } from "./NoData.vue_vue_type_script_setup_true_lang-DX1We5Q0.js";
|
|
8
|
-
import { d as ge } from "./helper-CLGnwM-X.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
|
-
};
|