@feedmepos/mf-report 5.14.0 → 5.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/{App-BNArBRtV.js → App-BSFklEEa.js} +3 -3
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js → BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js} +474 -451
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BuLc4McY.js → Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js} +1 -1
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-AUYQMBzZ.js +1593 -0
  5. package/dist/{InsightView-BwjdIi3p.js → InsightView-CMmAT2rl.js} +2 -2
  6. package/dist/{Integration-DwLrVkip.js → Integration-DrGnZU7Q.js} +1782 -1748
  7. package/dist/{Layout-ncN7DY5t.js → Layout-mIWpWnCL.js} +1 -1
  8. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-dzy_j_cA.js +361 -0
  9. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-EbtoF2G2.js → NavigationTab.vue_vue_type_script_setup_true_lang-euNq77f5.js} +3 -2
  10. package/dist/{OverviewView-D0kwfHlr.js → OverviewView-DDXR_j2B.js} +4 -4
  11. package/dist/{Report-BRdPTrEZ.js → Report-BBtxkvJ6.js} +2 -2
  12. package/dist/{ReportEditor-Cc3xFhAb.js → ReportEditor-fhkMIuBz.js} +360 -364
  13. package/dist/{ReportView-CiT_Gipx.js → ReportView-DeKcGdcr.js} +5 -5
  14. package/dist/{Setting-p_CQ_uCA.js → Setting-BbkhsS8O.js} +2 -2
  15. package/dist/{TileEditor-DtdB1JVB.js → TileEditor-Bm2N-CGt.js} +3 -3
  16. package/dist/{TransitionFade-B7X9MlFK.js → TransitionFade-SBrSUfhd.js} +2 -2
  17. package/dist/app.js +10 -10
  18. package/dist/assets/{formatChartData.worker-BteOciBT.js → formatChartData.worker-CzUhzs-5.js} +2 -2
  19. package/dist/style.css +1 -1
  20. package/package.json +1 -1
  21. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-FhZDnXkv.js +0 -1497
  22. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-D0UI760k.js +0 -352
@@ -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-BuLc4McY.js";
2
+ import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js";
3
3
  const f = /* @__PURE__ */ o({
4
4
  __name: "Layout",
5
5
  setup(m) {
@@ -0,0 +1,361 @@
1
+ import { defineComponent as R, computed as q, ref as oe, watch as z, resolveComponent as h, createElementBlock as v, openBlock as i, renderSlot as re, Fragment as D, renderList as I, createBlock as g, unref as r, withCtx as S, createElementVNode as T, createCommentVNode as U, createVNode as p, isRef as C, useModel as ie, normalizeClass as E, toDisplayString as ue } from "vue";
2
+ import { u as me, b as J, d as Y, j as de } from "./vue-i18n-DG0DIzwC.js";
3
+ import { storeToRefs as N } from "pinia";
4
+ import { a as pe, d as ce } from "./NavigationTab.vue_vue_type_script_setup_true_lang-euNq77f5.js";
5
+ import { _ as K, a as fe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DPMsvMfX.js";
6
+ import { a as ve, b as be, D as w, q as he, W as H, S as _e } from "./BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js";
7
+ import { _ as ye } from "./NoData.vue_vue_type_script_setup_true_lang-j8BlZPPp.js";
8
+ import { d as Fe } from "./helper-C0VLdBRU.js";
9
+ import { detectLocale as ge } 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" }, Se = {
12
+ key: 0,
13
+ class: "flex justify-center my-2"
14
+ }, Ce = /* @__PURE__ */ R({
15
+ __name: "FilterSelector",
16
+ setup(V) {
17
+ var G;
18
+ const { t: b } = me(), { currentReport: d } = N(ve());
19
+ let { globalFilters: k, isGlobalFiltersLoading: m, timeRange: _, dateRange: y, selectedLocationIds: F } = N(J()), { schemas: L } = N(be());
20
+ const n = q(() => {
21
+ var e;
22
+ return ((e = d.value) == null ? void 0 : e.id) ?? "";
23
+ }), o = oe([]);
24
+ z(
25
+ ((G = d.value) == null ? void 0 : G.globalFilters) || [],
26
+ () => {
27
+ o.value = k.value.map((e) => ({
28
+ filter: e,
29
+ search: "",
30
+ options: [],
31
+ type: Q(e)
32
+ }));
33
+ },
34
+ { deep: !0, immediate: !0 }
35
+ ), z(
36
+ [_, y, F],
37
+ async () => {
38
+ await le();
39
+ },
40
+ { deep: !0, immediate: !0 }
41
+ );
42
+ var x = void 0;
43
+ function Q(e) {
44
+ var a;
45
+ const t = (a = L.value.find((s) => s.name === e.schemaName)) == null ? void 0 : a.fields.find((s) => s.name === e.name);
46
+ return t == null ? void 0 : t.type;
47
+ }
48
+ function X(e) {
49
+ return {
50
+ type: H.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: _e.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 M(e) {
90
+ return e.options.every((t) => {
91
+ var a;
92
+ return (a = e.filter.values) == null ? void 0 : a.includes(t.value);
93
+ });
94
+ }
95
+ function Z(e) {
96
+ M(e) ? e.filter.values = ["NULL"] : e.filter.values = e.options.map((t) => t.value);
97
+ }
98
+ const ee = q(
99
+ () => o.value.map((e) => {
100
+ const t = e.options, a = e.search.toLowerCase() ?? "";
101
+ return t.filter((s) => s.label.toLowerCase().includes(a.toLowerCase()));
102
+ })
103
+ );
104
+ async function te(e) {
105
+ switch (e.type) {
106
+ case w.String:
107
+ case w.Numeric:
108
+ {
109
+ const t = await he(
110
+ X(e.filter),
111
+ x.signal
112
+ ), a = (t == null ? void 0 : t.type) === H.Table ? t.rows.map((u) => {
113
+ var l;
114
+ return ((l = u.cells) == null ? void 0 : l[0]) ?? "";
115
+ }) : [];
116
+ e.options = a.map((u) => ({
117
+ label: u,
118
+ value: u
119
+ }));
120
+ const s = e.filter.values || [];
121
+ if (!s.some((u) => u !== "NULL"))
122
+ e.filter.values = a.length ? a : ["NULL"];
123
+ else {
124
+ const u = new Set(a), l = s.filter(
125
+ ($) => $ === "NULL" || u.has($)
126
+ );
127
+ e.filter.values = l.length ? l : ["NULL"];
128
+ }
129
+ }
130
+ break;
131
+ case w.Bool:
132
+ e.options = [
133
+ { label: "Yes", value: !0 },
134
+ { label: "No", value: !1 }
135
+ ], (!e.filter.values || e.filter.values.length === 0) && (e.filter.values = [!0, !1]);
136
+ break;
137
+ case w.Timestamp:
138
+ break;
139
+ }
140
+ }
141
+ async function le() {
142
+ if (!(!n.value || !o.value.length)) {
143
+ x && (x == null || x.abort()), x = new AbortController();
144
+ try {
145
+ m.value = !0;
146
+ const e = o.value.map(async (t) => {
147
+ await te(t);
148
+ });
149
+ await Promise.all(e);
150
+ } finally {
151
+ m.value = !1;
152
+ }
153
+ }
154
+ }
155
+ function ae(e, t) {
156
+ var s, c;
157
+ if ((s = e.filter.values) == null ? void 0 : s.includes(t)) {
158
+ let u = (e.filter.values || []).filter((l) => l !== t);
159
+ u.length === 0 && (u = ["NULL"]), e.filter.values = u;
160
+ } else
161
+ (c = e.filter.values) == null || c.push(t);
162
+ }
163
+ function O(e, t) {
164
+ if (t === null)
165
+ e.values = [];
166
+ else {
167
+ const a = Y(t.startDate).startOf("day").utc().toISOString(), s = Y(t.endDate).endOf("day").utc().toISOString();
168
+ e.values = [a, s];
169
+ }
170
+ }
171
+ function se(e) {
172
+ var a;
173
+ const t = (a = e.filter.values) == null ? void 0 : a.filter((s) => s !== "NULL");
174
+ return `${b("report.section.filter.selectAll")} (${t == null ? void 0 : t.length}/${e.options.length})`;
175
+ }
176
+ function ne(e) {
177
+ const t = e.options.length, a = b("report.section.filter.search"), s = b("report.common.results", { count: t });
178
+ return `${a} (${s})`;
179
+ }
180
+ function A(e) {
181
+ var a, s, c;
182
+ const t = de(e.filter);
183
+ switch (e.type) {
184
+ case w.Timestamp:
185
+ return ((a = e.filter.values) == null ? void 0 : a.length) === 2 ? `${t} is between ${Fe({
186
+ startDate: (s = e.filter.values) == null ? void 0 : s[0],
187
+ endDate: (c = e.filter.values) == null ? void 0 : c[1],
188
+ locale: ge()
189
+ })}` : t;
190
+ default:
191
+ return t;
192
+ }
193
+ }
194
+ return (e, t) => {
195
+ const a = h("FmCircularProgress"), s = h("FmTextField"), c = h("FmMenuItem"), u = h("FmMenu");
196
+ return i(), v("div", xe, [
197
+ (i(!0), v(D, null, I(o.value, (l, $) => {
198
+ var B, j, P;
199
+ return i(), v("div", {
200
+ key: `${l.filter.schemaName}-${l.filter.name}`
201
+ }, [
202
+ l.type === r(w).Timestamp ? (i(), g(K, {
203
+ key: 0,
204
+ "model-value": { startDate: (B = l.filter.values) == null ? void 0 : B[0], endDate: (j = l.filter.values) == null ? void 0 : j[1] },
205
+ class: "w-full",
206
+ label: A(l),
207
+ removable: ((P = l.filter.values) == null ? void 0 : P.length) === 2,
208
+ onUpdate: (f) => O(l.filter, f),
209
+ onChipClosed: () => O(l.filter, null)
210
+ }, null, 8, ["model-value", "label", "removable", "onUpdate", "onChipClosed"])) : (i(), g(u, {
211
+ key: 1,
212
+ "close-on-click": !1,
213
+ shift: !0
214
+ }, {
215
+ "menu-button": S(() => [
216
+ p(fe, {
217
+ "left-icon": "filter_alt",
218
+ "right-icon": "expand_more",
219
+ label: A(l)
220
+ }, null, 8, ["label"])
221
+ ]),
222
+ "menu-wrapper": S(() => [
223
+ T("div", we, [
224
+ r(m) ? (i(), v("div", Se, [
225
+ p(a)
226
+ ])) : U("", !0),
227
+ l.options.length > 0 && !r(m) ? (i(), v(D, { key: 1 }, [
228
+ p(s, {
229
+ modelValue: l.search,
230
+ "onUpdate:modelValue": (f) => l.search = f,
231
+ type: "text",
232
+ "prepend-icon": "search",
233
+ placeholder: ne(l),
234
+ class: "border px-2 py-1 text-sm mb-1 rounded"
235
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"]),
236
+ p(c, {
237
+ label: se(l),
238
+ "has-checkbox": !0,
239
+ "model-value": M(l),
240
+ indeterminate: !0,
241
+ onClick: (f) => Z(l)
242
+ }, null, 8, ["label", "model-value", "onClick"]),
243
+ (i(!0), v(D, null, I(ee.value[$], (f) => {
244
+ var W;
245
+ return i(), g(c, {
246
+ key: f.value,
247
+ label: f.label,
248
+ "has-checkbox": !0,
249
+ "model-value": (W = l.filter.values) == null ? void 0 : W.includes(f.value),
250
+ onClick: () => ae(l, f.value)
251
+ }, null, 8, ["label", "model-value", "onClick"]);
252
+ }), 128))
253
+ ], 64)) : r(m) ? U("", !0) : (i(), g(ye, { key: 2 }))
254
+ ])
255
+ ]),
256
+ _: 2
257
+ }, 1024))
258
+ ]);
259
+ }), 128)),
260
+ re(e.$slots, "default")
261
+ ]);
262
+ };
263
+ }
264
+ }), Le = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, $e = { class: "flex flex-col gap-2 py-2" }, De = /* @__PURE__ */ R({
265
+ __name: "Filter",
266
+ setup(V) {
267
+ const {
268
+ locations: b,
269
+ selectedLocationIds: d,
270
+ dateRange: k,
271
+ compareDateRange: m,
272
+ timeRange: _,
273
+ defaultDateSetting: y,
274
+ selectTimeDefault: F
275
+ } = N(J());
276
+ return (L, n) => (i(), v("div", Le, [
277
+ T("div", $e, [
278
+ p(pe, {
279
+ modelValue: r(d),
280
+ "onUpdate:modelValue": n[5] || (n[5] = (o) => C(d) ? d.value = o : null),
281
+ options: r(b)
282
+ }, {
283
+ default: S(() => [
284
+ p(K, {
285
+ "date-range": r(k),
286
+ "onUpdate:dateRange": n[0] || (n[0] = (o) => C(k) ? k.value = o : null),
287
+ "compare-date-range": r(m),
288
+ "onUpdate:compareDateRange": n[1] || (n[1] = (o) => C(m) ? m.value = o : null),
289
+ "compare-type": r(y).defaultCompareType,
290
+ "onUpdate:compareType": n[2] || (n[2] = (o) => r(y).defaultCompareType = o),
291
+ compare: ""
292
+ }, null, 8, ["date-range", "compare-date-range", "compare-type"]),
293
+ p(ce, {
294
+ "time-range": r(_),
295
+ "onUpdate:timeRange": n[3] || (n[3] = (o) => C(_) ? _.value = o : null),
296
+ "select-time-default": r(F),
297
+ "onUpdate:selectTimeDefault": n[4] || (n[4] = (o) => C(F) ? F.value = o : null),
298
+ "default-date-range": r(y).timeOptions
299
+ }, null, 8, ["time-range", "select-time-default", "default-date-range"]),
300
+ p(Ce)
301
+ ]),
302
+ _: 1
303
+ }, 8, ["modelValue", "options"])
304
+ ])
305
+ ]));
306
+ }
307
+ }), Ne = { class: "fm-typo-en-body-md-400" }, je = /* @__PURE__ */ R({
308
+ __name: "MenuTab",
309
+ props: {
310
+ modelValue: { required: !1, default: [] },
311
+ modelModifiers: {}
312
+ },
313
+ emits: ["update:modelValue"],
314
+ setup(V) {
315
+ const b = ie(V, "modelValue"), { breakpoints: d } = ke();
316
+ return (k, m) => {
317
+ const _ = h("FmButton"), y = h("FmIcon"), F = h("FmMenuItem"), L = h("FmMenu");
318
+ return i(), v("div", {
319
+ class: E(["flex items-start pb-2 px-24", `${r(d).lg || r(d).md ? "px-24" : "pl-3"}`])
320
+ }, [
321
+ p(De),
322
+ m[0] || (m[0] = T("div", { class: "flex grow" }, null, -1)),
323
+ b.value.length > 0 ? (i(), g(L, {
324
+ key: 0,
325
+ trigger: "click",
326
+ placement: "left",
327
+ shift: !0,
328
+ class: E(r(d).sm || r(d).xs ? "pr-3" : "")
329
+ }, {
330
+ "menu-button": S(() => [
331
+ p(_, {
332
+ "append-icon": "more_vert",
333
+ variant: "tertiary",
334
+ size: "md",
335
+ class: "w-[36px] bg-none"
336
+ })
337
+ ]),
338
+ default: S(() => [
339
+ (i(!0), v(D, null, I(b.value, (n, o) => (i(), g(F, {
340
+ key: `button-${o}`,
341
+ onClick: n.onClick
342
+ }, {
343
+ label: S(() => [
344
+ n.prependIcon ?? !1 ? (i(), g(y, {
345
+ key: 0,
346
+ name: n.icon
347
+ }, null, 8, ["name"])) : U("", !0),
348
+ T("p", Ne, ue(n.label), 1)
349
+ ]),
350
+ _: 2
351
+ }, 1032, ["onClick"]))), 128))
352
+ ]),
353
+ _: 1
354
+ }, 8, ["class"])) : U("", !0)
355
+ ], 2);
356
+ };
357
+ }
358
+ });
359
+ export {
360
+ je as _
361
+ };
@@ -4,7 +4,7 @@ var ds = (e, t, r) => E9(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  import { defineComponent as qr, computed as Fr, useModel as Ea, ref as Ne, watch as na, resolveComponent as Ae, createBlock as Ye, unref as Q, openBlock as le, withCtx as Me, createElementVNode as oe, createVNode as K, toDisplayString as ir, withDirectives as zn, createElementBlock as Be, Fragment as mr, renderList as Br, vShow as u0, createTextVNode as Lt, mergeModels as Cn, createCommentVNode as gr, normalizeClass as jn, withModifiers as Is, onMounted as Md, renderSlot as Rd, mergeProps as F9, nextTick as P9, resolveDynamicComponent as xh, withKeys as S9, vModelText as O9, normalizeStyle as D9, isRef as B0, createSlots as I9 } from "vue";
5
5
  import { useRouter as Xd, useRoute as zd } from "vue-router";
6
6
  import { storeToRefs as yt, defineStore as nu } from "pinia";
7
- import { a as Xi, R as h0, g as Co, _ as N9, v as V9, d as Cs, e as B9, r as L9, f as xn, h as M9, i as R9, j as X9, s as z9, u as H9 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js";
7
+ import { a as Xi, R as h0, g as Co, _ as N9, v as V9, e as Cs, f as B9, r as L9, h as xn, i as M9, j as R9, k as X9, s as z9, u as H9 } from "./BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js";
8
8
  import { useBreakpoints as il, components as d0, useSnackbar as zi, useDialog as q9, useDialogChild as W9, FmButtonVariant as gh } from "@feedmepos/ui-library";
9
9
  import { u as Pa, k as iu, l as sl, a as Ua, F as Za, h as Ya, d as Ke, b as w0, m as Hi, n as j9, o as U9, e as Z9, q as As, s as Y9, p as G9 } from "./vue-i18n-DG0DIzwC.js";
10
10
  import { _ as yh, a as Q9 } from "./SelectComponent.vue_vue_type_script_setup_true_lang-kzXPr73e.js";
@@ -34293,7 +34293,8 @@ const aI = { class: "flex flex-col gap-2" }, nI = { class: "flex gap-2 justify-c
34293
34293
  modelValue: s.value,
34294
34294
  "onUpdate:modelValue": ce[8] || (ce[8] = (I) => s.value = I),
34295
34295
  overlay: !0,
34296
- "z-index": 10
34296
+ "z-index": 10,
34297
+ "dismiss-away": !0
34297
34298
  }, {
34298
34299
  "dialog-header": Me(() => [
34299
34300
  oe("div", CI, [
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as g, computed as w, resolveComponent as k, createBlock as a, openBlock as t, withCtx as $, createVNode as d, createElementVNode as y, unref as e, normalizeStyle as C, normalizeClass as u, createElementBlock as _, Fragment as h, renderList as B } from "vue";
2
- import { _ as b } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-FhZDnXkv.js";
3
- import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-BuLc4McY.js";
4
- import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js";
2
+ import { _ as b } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-AUYQMBzZ.js";
3
+ import { _ as F } from "./Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js";
4
+ import { a as P } from "./BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js";
5
5
  import { storeToRefs as R } from "pinia";
6
6
  import { _ as S } from "./NoData.vue_vue_type_script_setup_true_lang-j8BlZPPp.js";
7
7
  import { useBreakpoints as V } from "@feedmepos/ui-library";
8
- import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-D0UI760k.js";
8
+ import { _ as z } from "./MenuTab.vue_vue_type_script_setup_true_lang-dzy_j_cA.js";
9
9
  import { useI18n as D } from "@feedmepos/mf-common";
10
10
  const G = /* @__PURE__ */ g({
11
11
  __name: "OverviewView",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as me, ref as O, watch as W, computed as w, h as f, withModifiers as ue, resolveComponent as x, createBlock as T, openBlock as F, withCtx as i, createVNode as n, createElementVNode as y, unref as e, normalizeStyle as pe, normalizeClass as C, withDirectives as B, createElementBlock as de, Fragment as fe, renderList as ve, toDisplayString as R, createTextVNode as ye, vShow as D } from "vue";
2
2
  import { storeToRefs as X } from "pinia";
3
- import { a as ge } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BqtS2XG4.js";
4
- import { _ as be } from "./Default.vue_vue_type_script_setup_true_lang-BuLc4McY.js";
3
+ import { a as ge } from "./BaseDialog.vue_vue_type_script_setup_true_lang-aFYkpOlH.js";
4
+ import { _ as be } from "./Default.vue_vue_type_script_setup_true_lang-C1E7IoIA.js";
5
5
  import { u as he } from "./message-dialog-UoMWOnil.js";
6
6
  import { b as xe, f as Ce } from "./vue-i18n-DG0DIzwC.js";
7
7
  import { useSnackbar as _e, useBreakpoints as ke, components as we, FmButtonColorThemeVariant as $e } from "@feedmepos/ui-library";