@feedmepos/mf-report 5.21.44 → 5.21.46
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-DUh6U-OB.js +272 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DGJLHolh.js → BaseDialog.vue_vue_type_script_setup_true_lang-yBoJyNC8.js} +35 -6
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CLvbGLP1.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-tB8numVw.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DMlbfzNS.js → Default.vue_vue_type_script_setup_true_lang-Cfl5Ct4b.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-DOO2XMn8.js → FilterSelector.vue_vue_type_script_setup_true_lang-DuhjAzQP.js} +1000 -988
- package/dist/{InsightView-CJkEpae0.js → InsightView-DkIcQpCD.js} +6 -6
- package/dist/{Integration-DEMkBCnc.js → Integration-C0f0Q2os.js} +3 -3
- package/dist/{Integrations-DLLGEyAZ.js → Integrations-BM_vRj0F.js} +3 -3
- package/dist/{Layout-FE1wTFZL.js → Layout-C4YVePzi.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BOUDROhL.js → MenuTab.vue_vue_type_script_setup_true_lang-a72Tflwl.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BtrX0AqU.js → NavigationTab.vue_vue_type_script_setup_true_lang-5oGeza_s.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-C7rs35Bc.js → NoData.vue_vue_type_script_setup_true_lang-DYFzIaeX.js} +1 -1
- package/dist/{OverviewView-Ba29IQAU.js → OverviewView-AKRzXwKb.js} +5 -5
- package/dist/{Report-8vDCmOL4.js → Report-aKG6wWUi.js} +4 -4
- package/dist/{ReportEditor-Bk5mjleg.js → ReportEditor-ZRBQHo6K.js} +6 -6
- package/dist/{ReportView-DAVaSfNT.js → ReportView-cWqrG_Nd.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-xr4UKyXl.js → SelectComponent.vue_vue_type_script_setup_true_lang-J0guqNmX.js} +1 -1
- package/dist/{Setting-DJNZA7nB.js → Setting-BXEPHSGB.js} +5 -5
- package/dist/TileEditor-Bqhu78EZ.js +2919 -0
- package/dist/{TransitionFade-CMqktP2C.js → TransitionFade-CXHZsIPF.js} +6 -6
- package/dist/{app-3OaaX0uN.js → app-Fb6OY58U.js} +74 -74
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-Bf22-3_a.js → formatChartData.worker-DAwFx8Qz.js} +31 -2
- package/dist/assets/{processTableData.worker-GbyPQNAF.js → processTableData.worker-CGM71S-g.js} +31 -2
- package/dist/{vue-i18n-CO895OyU.js → vue-i18n-DLsuRxx8.js} +1 -1
- package/package.json +1 -1
- package/dist/App-C4pEJKcd.js +0 -278
- package/dist/TileEditor-B9TNHzej.js +0 -2899
|
@@ -3,7 +3,7 @@ var Cr = (e, t, n) => t in e ? wr(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ft = (e, t, n) => Cr(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { defineStore as Gt, storeToRefs as et } from "pinia";
|
|
5
5
|
import { ref as ue, computed as Ne, readonly as Qn, getCurrentInstance as cA, inject as pr, shallowRef as Br, watch as XA, onMounted as hr, onUnmounted as Er, defineComponent as FA, h as ho, createVNode as Dr, Text as xr, Fragment as Eo } from "vue";
|
|
6
|
-
import { d as Z, c as Hr } from "./app-
|
|
6
|
+
import { d as Z, c as Hr } from "./app-Fb6OY58U.js";
|
|
7
7
|
import "@vue/devtools-api";
|
|
8
8
|
const Xr = "mf-reportquery-store", te = Gt(Xr, () => {
|
|
9
9
|
const e = ue(""), t = ue(""), n = ue("MY");
|
package/package.json
CHANGED
package/dist/App-C4pEJKcd.js
DELETED
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, resolveComponent as V, createBlock as ie, openBlock as R, unref as l, isRef as _e, withCtx as j, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as Oe, onMounted as ue, watch as b, ref as $, computed as te, onBeforeMount as we, onBeforeUnmount as Ee, createElementBlock as z, Fragment as ke } from "vue";
|
|
2
|
-
import { detectLocale as N, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as Ae, a as $e, b as ne, c as Ne, d as Te, e as Be, f as Fe, s as xe } from "./vue-i18n-CO895OyU.js";
|
|
4
|
-
import { storeToRefs as q } from "pinia";
|
|
5
|
-
import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DGJLHolh.js";
|
|
6
|
-
import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BtrX0AqU.js";
|
|
7
|
-
import { u as oe } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { d as u } from "./app-3OaaX0uN.js";
|
|
9
|
-
import { useRoute as Qe, useRouter as Ve } from "vue-router";
|
|
10
|
-
const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge = /* @__PURE__ */ se({
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
setup(L) {
|
|
13
|
-
const { t: i } = Ae(), f = oe(), { isOpened: c, message: S, title: I } = q(oe());
|
|
14
|
-
return (d, g) => {
|
|
15
|
-
const C = V("FmButton"), T = V("FmDialog");
|
|
16
|
-
return R(), ie(T, {
|
|
17
|
-
modelValue: l(c),
|
|
18
|
-
"onUpdate:modelValue": g[0] || (g[0] = (B) => _e(c) ? c.value = B : null),
|
|
19
|
-
overlay: "",
|
|
20
|
-
"close-button": !1
|
|
21
|
-
}, {
|
|
22
|
-
"dialog-header": j(() => [
|
|
23
|
-
Oe(ee(l(I)), 1)
|
|
24
|
-
]),
|
|
25
|
-
default: j(() => [
|
|
26
|
-
M("p", Pe, ee(l(S)), 1)
|
|
27
|
-
]),
|
|
28
|
-
"dialog-footer": j(() => [
|
|
29
|
-
g[1] || (g[1] = M("div", { class: "grow" }, null, -1)),
|
|
30
|
-
P(C, {
|
|
31
|
-
label: l(i)("report.common.cancel"),
|
|
32
|
-
variant: "tertiary",
|
|
33
|
-
onClick: l(f).dismiss
|
|
34
|
-
}, null, 8, ["label", "onClick"]),
|
|
35
|
-
P(C, {
|
|
36
|
-
label: l(i)("report.common.confirm"),
|
|
37
|
-
onClick: l(f).confirm
|
|
38
|
-
}, null, 8, ["label", "onClick"])
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 8, ["modelValue"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}), ae = $(N());
|
|
45
|
-
function We() {
|
|
46
|
-
const L = (i) => {
|
|
47
|
-
switch (ae.value = i, i) {
|
|
48
|
-
case "zh-CN":
|
|
49
|
-
u.locale("zh-cn");
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
u.locale("en");
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return ue(() => {
|
|
57
|
-
L(N());
|
|
58
|
-
}), b(() => N(), L, { deep: !0, immediate: !0 }), {
|
|
59
|
-
currentLocale: ae
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
u.locale(N() === "zh-CN" ? "zh-cn" : "en");
|
|
63
|
-
const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
64
|
-
__name: "App",
|
|
65
|
-
setup(L) {
|
|
66
|
-
const { businessId: i, token: f, country: c } = q($e()), { sessionUser: S, currentBusiness: I, currentCountry: d, registerSidebarComponent: g } = Q(), { getRestaurantAndWarehouse: C, getBusinessSetting: T, beginBusinessLoad: B, completeBusinessLoad: ce } = ne(), { getFeatureFlags: le } = Ne(), { version: m } = q(re()), { getSettings: de } = Te(), { promptLoader: fe } = Be(), e = Qe(), F = Ve(), D = Je(), G = je(), o = ne(), me = re(), { suppressReportRouteSync: _ } = q(me), { getReports: pe, getOverviewReport: ge, getReportConfig: W, currentReportId: H } = D, { currentReportId: ye, reports: ve } = q(D), { getSchema: Se } = Ue(), { fetchSchedules: Ie } = G, { init: De } = Fe(), x = $("v5"), O = $(!1), w = $(!0), he = te(() => `https://portal-v1.feedme.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${c.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${i.value}&country=${c.value}&token=${f.value}&reportV3Button=true`);
|
|
67
|
-
b(
|
|
68
|
-
[() => I.value, () => S.value, () => d.value],
|
|
69
|
-
() => {
|
|
70
|
-
var n, a;
|
|
71
|
-
const t = ((n = I.value) == null ? void 0 : n.id) ?? "";
|
|
72
|
-
if (I.value && S.value && d.value) {
|
|
73
|
-
xe(d.value), i.value !== t && (i.value = t);
|
|
74
|
-
let r = !1;
|
|
75
|
-
c.value !== d.value && (r = !0), f.value = ((a = S.value) == null ? void 0 : a.token) ?? "", c.value = d.value ?? "", (e.query.businessId !== i.value || r) && (console.log("[debug 1]: route.query.businessId !== businessId.value || isCountryChanged, replacing router", `route.query.businessId: ${e.query.businessId}, businessId.value: ${i.value}, isCountryChanged: ${r}`), console.log("[debug 1 detail]: country.value: ", c.value, "currentCountry.value: ", d.value), console.log("[debug 1 detail]: route.query.businessId: ", e.query.businessId, "businessId.value: ", i.value), F.replace({
|
|
76
|
-
name: e.name,
|
|
77
|
-
params: e.params,
|
|
78
|
-
query: {
|
|
79
|
-
...e.query,
|
|
80
|
-
businessId: i.value,
|
|
81
|
-
country: d.value,
|
|
82
|
-
isAllLocation: r ? "true" : e.query.isAllLocation,
|
|
83
|
-
locationIds: r ? void 0 : e.query.locationIds
|
|
84
|
-
}
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{ immediate: !0 }
|
|
89
|
-
);
|
|
90
|
-
function K(t) {
|
|
91
|
-
if (typeof t.data == "string")
|
|
92
|
-
try {
|
|
93
|
-
const n = JSON.parse(t.data);
|
|
94
|
-
(n == null ? void 0 : n.token) !== "" && (n == null ? void 0 : n.token) !== void 0 && (f.value = n.token);
|
|
95
|
-
} catch (n) {
|
|
96
|
-
console.error(n);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function X(t) {
|
|
100
|
-
if (typeof t.data == "string")
|
|
101
|
-
try {
|
|
102
|
-
const n = JSON.parse(t.data);
|
|
103
|
-
(n == null ? void 0 : n.v5) === !0 ? m.value = x.value : (n == null ? void 0 : n.v3) === !0 && (m.value = "v3");
|
|
104
|
-
} catch (n) {
|
|
105
|
-
console.error(n);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
b(m, () => {
|
|
109
|
-
["v3", "v4"].includes(m.value) ? Q().hideSidebarToggle(!0) : Q().hideSidebarToggle(!1);
|
|
110
|
-
}), we(() => {
|
|
111
|
-
g(ze);
|
|
112
|
-
}), ue(() => {
|
|
113
|
-
console.log("5.21.44", !0), window.addEventListener("message", K), window.addEventListener("message", X);
|
|
114
|
-
}), Ee(() => {
|
|
115
|
-
window.removeEventListener("message", K), window.removeEventListener("message", X), D.$dispose(), G.$dispose();
|
|
116
|
-
});
|
|
117
|
-
function be(t) {
|
|
118
|
-
try {
|
|
119
|
-
return decodeURIComponent(t);
|
|
120
|
-
} catch {
|
|
121
|
-
return t;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
function E(t) {
|
|
125
|
-
if (typeof t != "string" || t.length === 0) return;
|
|
126
|
-
const n = t.includes("%") ? [t, be(t)] : [t];
|
|
127
|
-
for (const a of n)
|
|
128
|
-
try {
|
|
129
|
-
const r = JSON.parse(a);
|
|
130
|
-
if (typeof r == "string")
|
|
131
|
-
try {
|
|
132
|
-
return JSON.parse(r);
|
|
133
|
-
} catch {
|
|
134
|
-
return r;
|
|
135
|
-
}
|
|
136
|
-
return r;
|
|
137
|
-
} catch {
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
function Y(t) {
|
|
141
|
-
if (!t || typeof t != "object") return !1;
|
|
142
|
-
const n = t;
|
|
143
|
-
return typeof n.hour == "number" && typeof n.minute == "number";
|
|
144
|
-
}
|
|
145
|
-
function qe() {
|
|
146
|
-
const t = e.query.startDate ? u(e.query.startDate).startOf("day").toISOString() : void 0, n = e.query.endDate ? u(e.query.endDate).endOf("day").toISOString() : void 0, a = typeof e.query.timeStart == "string", r = typeof e.query.timeEnd == "string", p = E(e.query.timeStart), h = E(e.query.timeEnd), k = Y(p) ? p : null, A = Y(h) ? h : null, J = e.query.compareStartDate ? u(e.query.compareStartDate).startOf("day").toISOString() : void 0, U = e.query.compareEndDate ? u(e.query.compareEndDate).endOf("day").toISOString() : void 0, Z = e.query.isAllLocation === "true" || e.query.isAllLocation === void 0;
|
|
147
|
-
let y = [];
|
|
148
|
-
if (Z)
|
|
149
|
-
y = o.selectedLocationIds;
|
|
150
|
-
else {
|
|
151
|
-
const s = E(e.query.locationIds);
|
|
152
|
-
y = Array.isArray(s) ? s : [];
|
|
153
|
-
}
|
|
154
|
-
let v = e.query.reportId || H;
|
|
155
|
-
if (ve.value.find((s) => s.id === v) || (v = H), v && v !== D.currentReportId && D.updateCurrentReportId(v), t || n) {
|
|
156
|
-
const s = o.dateRange;
|
|
157
|
-
(s.startDate !== t || s.endDate !== n) && o.setDateRange({ startDate: t, endDate: n });
|
|
158
|
-
}
|
|
159
|
-
if (a || r) {
|
|
160
|
-
const s = o.timeRange;
|
|
161
|
-
(s.start !== k || s.end !== A) && o.setTimeRange({ start: k, end: A });
|
|
162
|
-
}
|
|
163
|
-
if (J || U) {
|
|
164
|
-
const s = o.compareDateRange;
|
|
165
|
-
(s.startDate !== J || s.endDate !== U) && o.setCompareDateRange({
|
|
166
|
-
startDate: J,
|
|
167
|
-
endDate: U
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
if (!Z && Array.isArray(y)) {
|
|
171
|
-
const s = o.selectedLocationIds;
|
|
172
|
-
s.length === y.length && s.every((Le, Ce) => Le === y[Ce]) || o.setSelectedLocationIds(y);
|
|
173
|
-
}
|
|
174
|
-
return {
|
|
175
|
-
// TODO: this returned value can used for getBusinessSetting
|
|
176
|
-
reportId: v,
|
|
177
|
-
startDate: e.query.startDate,
|
|
178
|
-
endDate: e.query.endDate,
|
|
179
|
-
timeStart: e.query.timeStart,
|
|
180
|
-
timeEnd: e.query.timeEnd,
|
|
181
|
-
compareStartDate: e.query.compareStartDate,
|
|
182
|
-
compareEndDate: e.query.compareEndDate,
|
|
183
|
-
locationIds: typeof e.query.locationIds == "string" ? e.query.locationIds : void 0,
|
|
184
|
-
isAllLocation: e.query.isAllLocation
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
return b(
|
|
188
|
-
() => i.value,
|
|
189
|
-
async (t) => {
|
|
190
|
-
t !== "" && (O.value = !1, B(t), w.value || (console.log("[debug 2]: isinitialbusinesswatch is false, resetting locations", w.value), o.setSelectedLocationIds([]), F.replace({
|
|
191
|
-
name: e.name,
|
|
192
|
-
params: e.params,
|
|
193
|
-
query: {
|
|
194
|
-
...e.query,
|
|
195
|
-
locationIds: void 0,
|
|
196
|
-
isAllLocation: "true"
|
|
197
|
-
}
|
|
198
|
-
})), _.value !== void 0 && (_.value = !0), await fe(async () => {
|
|
199
|
-
await De({
|
|
200
|
-
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
201
|
-
url: "https://flag.feedme.farm/api/v1/",
|
|
202
|
-
enableAnalytics: !1,
|
|
203
|
-
cacheFlags: !1
|
|
204
|
-
});
|
|
205
|
-
const n = await W();
|
|
206
|
-
x.value = n.version, m.value = x.value, await Promise.all([
|
|
207
|
-
le(),
|
|
208
|
-
W(),
|
|
209
|
-
ge(),
|
|
210
|
-
pe(),
|
|
211
|
-
Se(),
|
|
212
|
-
Ie(),
|
|
213
|
-
C(
|
|
214
|
-
(() => {
|
|
215
|
-
const a = E(e.query.locationIds);
|
|
216
|
-
return Array.isArray(a) ? a : void 0;
|
|
217
|
-
})()
|
|
218
|
-
),
|
|
219
|
-
de()
|
|
220
|
-
]), await T(), qe(), ce(t);
|
|
221
|
-
}), O.value = !0, w.value && (w.value = !1));
|
|
222
|
-
},
|
|
223
|
-
{
|
|
224
|
-
immediate: !0
|
|
225
|
-
}
|
|
226
|
-
), b(
|
|
227
|
-
() => (O.value, {
|
|
228
|
-
reportId: ye.value,
|
|
229
|
-
selectedLocationIds: o.selectedLocationIds,
|
|
230
|
-
dateRange: o.dateRange,
|
|
231
|
-
timeRange: o.timeRange,
|
|
232
|
-
compareDateRange: o.compareDateRange
|
|
233
|
-
}),
|
|
234
|
-
(t) => {
|
|
235
|
-
if (!O.value || !t.reportId) return;
|
|
236
|
-
if (_.value) {
|
|
237
|
-
_.value = !1;
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
const n = t.selectedLocationIds, a = t.dateRange, r = t.timeRange, p = t.compareDateRange, h = {
|
|
241
|
-
...e.query,
|
|
242
|
-
reportId: t.reportId,
|
|
243
|
-
startDate: a.startDate ? u(a.startDate).startOf("day").toISOString() : void 0,
|
|
244
|
-
endDate: a.endDate ? u(a.endDate).endOf("day").toISOString() : void 0,
|
|
245
|
-
compareStartDate: p.startDate ? u(p.startDate).startOf("day").toISOString() : void 0,
|
|
246
|
-
compareEndDate: p.endDate ? u(p.endDate).endOf("day").toISOString() : void 0,
|
|
247
|
-
timeStart: r.start ? JSON.stringify(r.start) : void 0,
|
|
248
|
-
timeEnd: r.end ? JSON.stringify(r.end) : void 0,
|
|
249
|
-
locationIds: n.length === o.locations.length ? void 0 : n.length > 0 ? JSON.stringify(n) : void 0,
|
|
250
|
-
isAllLocation: String(n.length === o.locations.length)
|
|
251
|
-
}, k = JSON.stringify(e.query), A = JSON.stringify(h);
|
|
252
|
-
k !== A && F.replace({
|
|
253
|
-
name: e.name,
|
|
254
|
-
params: e.params,
|
|
255
|
-
query: h
|
|
256
|
-
});
|
|
257
|
-
},
|
|
258
|
-
{ deep: !0 }
|
|
259
|
-
), We(), (t, n) => {
|
|
260
|
-
const a = V("router-view");
|
|
261
|
-
return R(), z(ke, null, [
|
|
262
|
-
P(Ge),
|
|
263
|
-
l(m) === "v3" ? (R(), z("iframe", {
|
|
264
|
-
key: 0,
|
|
265
|
-
class: "bg-white h-full w-full",
|
|
266
|
-
src: he.value
|
|
267
|
-
}, null, 8, He)) : l(m) === "v4" ? (R(), z("iframe", {
|
|
268
|
-
key: 1,
|
|
269
|
-
class: "bg-white h-full w-full",
|
|
270
|
-
src: Re.value
|
|
271
|
-
}, null, 8, Ke)) : (R(), ie(a, { key: 2 }))
|
|
272
|
-
], 64);
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
export {
|
|
277
|
-
ut as default
|
|
278
|
-
};
|