@feedmepos/mf-report 5.4.15-beta.1 → 5.4.15-beta.3

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 (45) hide show
  1. package/dist/App-DufL3Y8h.js +152 -0
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DLDk5l4R.js +162 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js → Default.vue_vue_type_script_setup_true_lang-DVLxkOOQ.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-C29g9w6o.js +999 -0
  5. package/dist/{InsightView-D78TK2E8.js → InsightView-tyeJBlRm.js} +1051 -1049
  6. package/dist/Integration-ILSIf-OL.js +3695 -0
  7. package/dist/Integrations-DwgNrM3U.js +334 -0
  8. package/dist/{Layout-DERpCrQk.js → Layout-Bw1oh6Q-.js} +1 -1
  9. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DurYBXa5.js → LocationSelect.vue_vue_type_script_setup_true_lang-BFj4d-UF.js} +1861 -1859
  10. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DzZeasAK.js +277 -0
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C8yzWDXs.js → NavigationTab.vue_vue_type_script_setup_true_lang-_eC_tMk_.js} +5526 -5482
  12. package/dist/NoData.vue_vue_type_script_setup_true_lang-BtQobm-7.js +31 -0
  13. package/dist/OverviewView-Dl8oOobn.js +61 -0
  14. package/dist/Report-BqD8KVZ8.js +424 -0
  15. package/dist/ReportEditor-DkzFUgbO.js +532 -0
  16. package/dist/ReportView-DpWZHV0o.js +169 -0
  17. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-C3VG1mi_.js +104 -0
  18. package/dist/Setting-CYrg_50p.js +320 -0
  19. package/dist/TileEditor-CDrzLbqc.js +2320 -0
  20. package/dist/{TransitionFade-BLDfpF7R.js → TransitionFade-D19wC3tb.js} +225 -220
  21. package/dist/app.js +915 -27
  22. package/dist/{global-loader-CMC9fgBi.js → global-loader-C3JC7z-H.js} +4966 -2240
  23. package/dist/index-9IDzTnHw.js +147 -0
  24. package/dist/{report-schema-G0x3CoJb.js → report-schema-1zQJbLyB.js} +4 -4
  25. package/dist/style.css +1 -1
  26. package/dist/timeFormat-CjNvJMgk.js +9 -0
  27. package/dist/{v4-DF7wffYN.js → v4-D29FkHfi.js} +2666 -1927
  28. package/package.json +1 -1
  29. package/dist/App-mcSgbcVY.js +0 -133
  30. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DPuhMR6i.js +0 -160
  31. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-B6IzlHmr.js +0 -996
  32. package/dist/HeaderTab.vue_vue_type_script_setup_true_lang-B5VBDNwX.js +0 -19
  33. package/dist/Integration-Cm6_YEEE.js +0 -3554
  34. package/dist/Integrations-WWnSho0Q.js +0 -334
  35. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js +0 -261
  36. package/dist/NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js +0 -30
  37. package/dist/OverviewView-D7zAR7_7.js +0 -60
  38. package/dist/Report-BnX5amn0.js +0 -409
  39. package/dist/ReportEditor-DW7uWg_a.js +0 -530
  40. package/dist/ReportView-xSaJA5F6.js +0 -166
  41. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js +0 -103
  42. package/dist/Setting-D8JspXTN.js +0 -326
  43. package/dist/TileEditor-DQ8C5I_M.js +0 -2301
  44. package/dist/index-SmIkb24L.js +0 -143
  45. package/dist/timeFormat-BF-F4Rnt.js +0 -9
@@ -0,0 +1,277 @@
1
+ import { defineComponent as O, mergeModels as Q, useModel as V, ref as P, watch as W, resolveComponent as c, createElementBlock as D, openBlock as f, createTextVNode as C, createVNode as u, toDisplayString as g, unref as t, withCtx as _, createElementVNode as d, createCommentVNode as M, Fragment as I, renderList as H, createBlock as S, withDirectives as X, vShow as Y, isRef as $, normalizeClass as z } from "vue";
2
+ import { u as Z, d as F, b as E } from "./global-loader-C3JC7z-H.js";
3
+ import { storeToRefs as G } from "pinia";
4
+ import { _ as ee } from "./LocationSelect.vue_vue_type_script_setup_true_lang-BFj4d-UF.js";
5
+ import { a as te, _ as oe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DLDk5l4R.js";
6
+ import { t as q, s as le } from "./timeFormat-CjNvJMgk.js";
7
+ import { detectLocale as k } from "@feedmepos/mf-common";
8
+ import { useBreakpoints as ne } from "@feedmepos/ui-library";
9
+ const ae = { class: "px-24 py-16 rounded-lg shadow-light-300" }, me = { class: "text-fm-color-typo-primary" }, ue = { class: "text-fm-color-typo-secondary" }, ie = { class: "fm-typo-en-body-lg-600 mb-8" }, re = { class: "flex items-center justify-center w-full" }, se = { class: "fm-typo-en-body-lg-600 mb-8" }, de = { class: "flex items-center justify-center" }, ce = { class: "flex flex-row mb-4 px-4 gap-2" }, pe = /* @__PURE__ */ O({
10
+ __name: "TimeRangeSelect",
11
+ props: /* @__PURE__ */ Q({
12
+ defaultDateRange: {
13
+ type: Array,
14
+ default: () => [
15
+ {
16
+ name: "All day",
17
+ isDefault: !0,
18
+ startTime: { hour: 0, minute: 0 },
19
+ endTime: { hour: 23, minute: 59 }
20
+ }
21
+ ]
22
+ }
23
+ }, {
24
+ timeRange: {
25
+ type: Object,
26
+ default: () => ({
27
+ start: { hour: 0, minute: 0 },
28
+ end: { hour: 23, minute: 59 }
29
+ })
30
+ },
31
+ timeRangeModifiers: {},
32
+ selectTimeDefault: {
33
+ type: Number,
34
+ default: 1
35
+ },
36
+ selectTimeDefaultModifiers: {}
37
+ }),
38
+ emits: ["update:timeRange", "update:selectTimeDefault"],
39
+ setup(x) {
40
+ const { t: r } = Z(), m = V(x, "timeRange"), p = x, i = V(x, "selectTimeDefault");
41
+ function y(e = {
42
+ startTime: null,
43
+ endTime: null,
44
+ locale: "en-US"
45
+ }) {
46
+ if (!e.startTime || !e.endTime)
47
+ return "";
48
+ let o = F(), s = F();
49
+ return e.startTime && (o = F().set("hour", e.startTime.hour).set("minute", e.startTime.minute).locale(e.locale)), e.endTime && (s = F().set("hour", e.endTime.hour).set("minute", e.endTime.minute).locale(e.locale)), `${o.format("hh:mmA")}-${s.format("hh:mmA")}`;
50
+ }
51
+ function b(e) {
52
+ e && (m.value = e), a.value = !1;
53
+ }
54
+ function v(e) {
55
+ const o = e.split(":"), s = F().set("hour", Number(o[0])).set("minute", Number(o[1]));
56
+ return {
57
+ hours: Number(s.format("h")),
58
+ minutes: Number(s.format("m")),
59
+ period: s.format("A")
60
+ };
61
+ }
62
+ const n = P(JSON.parse(JSON.stringify(m.value)));
63
+ function h(e, o) {
64
+ n.value.start = JSON.parse(JSON.stringify(e)), n.value.end = JSON.parse(JSON.stringify(o));
65
+ }
66
+ W(
67
+ () => [() => m.value, () => i.value],
68
+ () => {
69
+ if (m.value) {
70
+ const e = p.defaultDateRange.findIndex(
71
+ (o) => {
72
+ var s, R, w, N;
73
+ return o.startTime.hour === ((s = m.value.start) == null ? void 0 : s.hour) && o.startTime.minute === ((R = m.value.start) == null ? void 0 : R.minute) && o.endTime.hour === ((w = m.value.end) == null ? void 0 : w.hour) && o.endTime.minute === ((N = m.value.end) == null ? void 0 : N.minute);
74
+ }
75
+ ) + 1;
76
+ e !== 0 ? i.value = e : i.value = p.defaultDateRange.length + 1;
77
+ }
78
+ },
79
+ { deep: !0 }
80
+ );
81
+ const a = P(!1);
82
+ return (e, o) => {
83
+ const s = c("FmChip"), R = c("FmRadio"), w = c("FmMenuDivider"), N = c("FmRadioGroup"), U = c("FmTimeInput"), A = c("FmButton"), K = c("FmPopover");
84
+ return f(), D("div", null, [
85
+ C(g(t(r)("")) + " ", 1),
86
+ u(K, {
87
+ placement: "bottom",
88
+ class: "min-w-[212px]",
89
+ "show-popover": a.value
90
+ }, {
91
+ "popover-button": _(() => [
92
+ u(te, {
93
+ "left-icon": "schedule",
94
+ label: `${y({
95
+ startTime: m.value.start,
96
+ endTime: m.value.end,
97
+ locale: t(k)()
98
+ })}`
99
+ }, null, 8, ["label"])
100
+ ]),
101
+ default: _(() => {
102
+ var B, J, j, L;
103
+ return [
104
+ o[6] || (o[6] = C(" > ")),
105
+ d("div", ae, [
106
+ u(N, {
107
+ modelValue: i.value,
108
+ "onUpdate:modelValue": o[0] || (o[0] = (l) => i.value = l)
109
+ }, {
110
+ default: _(() => [
111
+ (f(!0), D(I, null, H(p.defaultDateRange, (l, T) => (f(), S(R, {
112
+ key: `range_${T}`,
113
+ value: T + 1,
114
+ label: l.name,
115
+ onClick: (ge) => h(l.startTime, l.endTime)
116
+ }, {
117
+ label: _(() => [
118
+ d("p", me, [
119
+ C(g(l.name) + " ", 1),
120
+ X(u(s, {
121
+ label: t(r)("report.common.default"),
122
+ class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
123
+ compact: ""
124
+ }, null, 8, ["label"]), [
125
+ [Y, l.isDefault]
126
+ ])
127
+ ]),
128
+ d("p", ue, g(t(q)(l.startTime, t(k)())) + " - " + g(t(q)(l.endTime, t(k)())) + " " + g(t(le)(l.startTime, l.endTime)), 1)
129
+ ]),
130
+ _: 2
131
+ }, 1032, ["value", "label", "onClick"]))), 128)),
132
+ u(w),
133
+ u(R, {
134
+ key: "range_custom",
135
+ label: t(r)("report.common.custom"),
136
+ value: p.defaultDateRange.length + 1
137
+ }, null, 8, ["label", "value"])
138
+ ]),
139
+ _: 1
140
+ }, 8, ["modelValue"]),
141
+ i.value === p.defaultDateRange.length + 1 ? (f(), D(I, { key: 0 }, [
142
+ d("p", ie, g(t(r)("report.date.startingTime")), 1),
143
+ d("div", re, [
144
+ u(U, {
145
+ "model-value": v(`${(B = n.value.start) == null ? void 0 : B.hour}:${(J = n.value.start) == null ? void 0 : J.minute}`),
146
+ "onUpdate:modelValue": o[1] || (o[1] = (l) => {
147
+ if (n.value.start) {
148
+ const T = t(F)(`${l.hours}:${l.minutes} ${l.period}`, "h:m A").locale(
149
+ t(k)()
150
+ );
151
+ n.value.start.hour = T.get("hour"), n.value.start.minute = T.get("minute");
152
+ }
153
+ })
154
+ }, null, 8, ["model-value"])
155
+ ]),
156
+ d("p", se, g(t(r)("report.date.endingTime")), 1),
157
+ d("div", de, [
158
+ u(U, {
159
+ "model-value": v(`${(j = n.value.end) == null ? void 0 : j.hour}:${(L = n.value.end) == null ? void 0 : L.minute}`),
160
+ "onUpdate:modelValue": o[2] || (o[2] = (l) => {
161
+ if (n.value.end) {
162
+ const T = t(F)(`${l.hours}:${l.minutes} ${l.period}`, "h:m A").locale(
163
+ t(k)()
164
+ );
165
+ n.value.end.hour = T.get("hour"), n.value.end.minute = T.get("minute");
166
+ }
167
+ })
168
+ }, null, 8, ["model-value"])
169
+ ])
170
+ ], 64)) : M("", !0),
171
+ d("div", ce, [
172
+ o[5] || (o[5] = d("div", { class: "grow" }, null, -1)),
173
+ u(A, {
174
+ label: t(r)("report.common.cancel"),
175
+ variant: "tertiary",
176
+ onClick: o[3] || (o[3] = (l) => a.value = !1)
177
+ }, null, 8, ["label"]),
178
+ u(A, {
179
+ label: t(r)("report.common.apply"),
180
+ onClick: o[4] || (o[4] = () => b(JSON.parse(JSON.stringify(n.value))))
181
+ }, null, 8, ["label"])
182
+ ])
183
+ ])
184
+ ];
185
+ }),
186
+ _: 1
187
+ }, 8, ["show-popover"])
188
+ ]);
189
+ };
190
+ }
191
+ }), fe = { class: "flex overflow-x-auto overflow-y-hidden scrollbar-hide" }, ve = /* @__PURE__ */ O({
192
+ __name: "Filter",
193
+ setup(x) {
194
+ const r = E(), { locations: m, selectedLocationIds: p } = G(E()), { dateRange: i, compareDateRange: y, timeRange: b, defaultDateSetting: v, selectTimeDefault: n } = G(r);
195
+ return (h, a) => (f(), D("div", fe, [
196
+ u(ee, {
197
+ modelValue: t(p),
198
+ "onUpdate:modelValue": a[5] || (a[5] = (e) => $(p) ? p.value = e : null),
199
+ options: t(m)
200
+ }, {
201
+ default: _(() => [
202
+ u(oe, {
203
+ "date-range": t(i),
204
+ "onUpdate:dateRange": a[0] || (a[0] = (e) => $(i) ? i.value = e : null),
205
+ "compare-date-range": t(y),
206
+ "onUpdate:compareDateRange": a[1] || (a[1] = (e) => $(y) ? y.value = e : null),
207
+ "compare-type": t(v).defaultCompareType,
208
+ "onUpdate:compareType": a[2] || (a[2] = (e) => t(v).defaultCompareType = e),
209
+ compare: ""
210
+ }, null, 8, ["date-range", "compare-date-range", "compare-type"]),
211
+ u(pe, {
212
+ "time-range": t(b),
213
+ "onUpdate:timeRange": a[3] || (a[3] = (e) => $(b) ? b.value = e : null),
214
+ "select-time-default": t(n),
215
+ "onUpdate:selectTimeDefault": a[4] || (a[4] = (e) => $(n) ? n.value = e : null),
216
+ "default-date-range": t(v).timeOptions
217
+ }, null, 8, ["time-range", "select-time-default", "default-date-range"])
218
+ ]),
219
+ _: 1
220
+ }, 8, ["modelValue", "options"])
221
+ ]));
222
+ }
223
+ }), Te = { class: "fm-typo-en-body-md-400" }, $e = /* @__PURE__ */ O({
224
+ __name: "MenuTab",
225
+ props: {
226
+ modelValue: { required: !1, default: [] },
227
+ modelModifiers: {}
228
+ },
229
+ emits: ["update:modelValue"],
230
+ setup(x) {
231
+ const r = V(x, "modelValue"), { breakpoints: m } = ne();
232
+ return (p, i) => {
233
+ const y = c("FmButton"), b = c("FmIcon"), v = c("FmMenuItem"), n = c("FmMenu");
234
+ return f(), D("div", {
235
+ class: z(["flex items-center pb-6 px-24", `${t(m).lg || t(m).md ? "px-24" : "pl-3"}`])
236
+ }, [
237
+ u(ve),
238
+ i[0] || (i[0] = d("div", { class: "flex grow" }, null, -1)),
239
+ r.value.length > 0 ? (f(), S(n, {
240
+ key: 0,
241
+ trigger: "click",
242
+ placement: "left",
243
+ shift: !0,
244
+ class: z(t(m).sm || t(m).xs ? "pr-3" : "")
245
+ }, {
246
+ "menu-button": _(() => [
247
+ u(y, {
248
+ "append-icon": "more_vert",
249
+ variant: "tertiary",
250
+ size: "md",
251
+ class: "w-[36px] bg-none"
252
+ })
253
+ ]),
254
+ default: _(() => [
255
+ (f(!0), D(I, null, H(r.value, (h, a) => (f(), S(v, {
256
+ key: `button-${a}`,
257
+ onClick: h.onClick
258
+ }, {
259
+ label: _(() => [
260
+ h.prependIcon ?? !1 ? (f(), S(b, {
261
+ key: 0,
262
+ name: h.icon
263
+ }, null, 8, ["name"])) : M("", !0),
264
+ d("p", Te, g(h.label), 1)
265
+ ]),
266
+ _: 2
267
+ }, 1032, ["onClick"]))), 128))
268
+ ]),
269
+ _: 1
270
+ }, 8, ["class"])) : M("", !0)
271
+ ], 2);
272
+ };
273
+ }
274
+ });
275
+ export {
276
+ $e as _
277
+ };