@feedmepos/mf-report 5.22.25 → 5.22.26
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-3HFmWp7u.js +298 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js → BaseDialog.vue_vue_type_script_setup_true_lang-B2CdeeFj.js} +1128 -1292
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BP474uxj.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DlpbyWWd.js} +5 -5
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C55xh4bx.js → Default.vue_vue_type_script_setup_true_lang-BUIcdcLn.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-D2K2ghV_.js → FilterSelector.vue_vue_type_script_setup_true_lang-jDZZAdUQ.js} +19 -19
- package/dist/InsightView-B8Wrd2SX.js +664 -0
- package/dist/{Integration-CAsNSCR4.js → Integration-D_jZxPMn.js} +40 -40
- package/dist/{Integrations-CIeyn0dF.js → Integrations-B1igzxZG.js} +14 -13
- package/dist/Layout-Dt6yE5XC.js +19 -0
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CBY5Meyc.js → MenuTab.vue_vue_type_script_setup_true_lang-Dtv5xe0O.js} +13 -13
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DsOmTqFV.js → NavigationTab.vue_vue_type_script_setup_true_lang-lfncwvdP.js} +24 -24
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-BcdcgnzD.js → NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js} +1 -1
- package/dist/OverviewView-hz2kZmm7.js +62 -0
- package/dist/{Report-CMYhrVbI.js → Report-nrJWlkN-.js} +15 -14
- package/dist/{ReportEditor-BU6Hq9yx.js → ReportEditor-YV-2UXDU.js} +24 -23
- package/dist/{ReportView-8F14F_jz.js → ReportView-CM1PfMk6.js} +18 -17
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-SWjNNZ_J.js → SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js} +1 -1
- package/dist/Setting-B1Xrl09c.js +326 -0
- package/dist/{TileEditor-BRHXTLEK.js → TileEditor-CF0aNTKV.js} +131 -131
- package/dist/{TransitionFade-DbsPAg2T.js → TransitionFade-D2bsz2iV.js} +12 -12
- package/dist/app-C2vt2B-i.js +11540 -0
- package/dist/app.js +1 -1
- package/dist/useRestaurantPermission-DRvKGVtO.js +65 -0
- package/dist/vue-i18n-DVWuTfed.js +2727 -0
- package/package.json +1 -1
- package/dist/App-C5_KJN8G.js +0 -294
- package/dist/InsightView-BCZKzqRM.js +0 -670
- package/dist/Layout-BFvrEBq5.js +0 -29
- package/dist/NoPermission.vue_vue_type_script_setup_true_lang-obph7BUZ.js +0 -25
- package/dist/OverviewView-gvsp6532.js +0 -63
- package/dist/Setting-BtWmZpk0.js +0 -328
- package/dist/app-WBPZfxon.js +0 -6658
- package/dist/useRestaurantPermission-BtPLwoC9.js +0 -64
- package/dist/vue-i18n-CvU0g5WR.js +0 -7253
package/package.json
CHANGED
package/dist/App-C5_KJN8G.js
DELETED
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ce, resolveComponent as G, createBlock as de, openBlock as O, unref as l, isRef as Ee, withCtx as z, createElementVNode as te, createVNode as K, toDisplayString as ne, createTextVNode as ke, onMounted as ue, watch as b, ref as B, computed as oe, onBeforeMount as Ae, onBeforeUnmount as Ne, createElementBlock as V, Fragment as Te } from "vue";
|
|
2
|
-
import { detectLocale as F, useCoreStore as P } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as $e, a as Be, b as re, c as Fe, d as qe, e as xe, f as Je, s as Qe } from "./vue-i18n-CvU0g5WR.js";
|
|
4
|
-
import { storeToRefs as w } from "pinia";
|
|
5
|
-
import { u as ae, a as Ue, b as je } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CD7LSCLM.js";
|
|
6
|
-
import { u as ze, _ as Ve } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DsOmTqFV.js";
|
|
7
|
-
import { u as se } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { d } from "./app-WBPZfxon.js";
|
|
9
|
-
import { useRoute as Pe, useRouter as Ge } from "vue-router";
|
|
10
|
-
const Ke = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, We = /* @__PURE__ */ ce({
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
setup(C) {
|
|
13
|
-
const { t: c } = $e(), p = se(), { isOpened: g, message: I, title: h } = w(se());
|
|
14
|
-
return (R, S) => {
|
|
15
|
-
const E = G("FmButton"), q = G("FmDialog");
|
|
16
|
-
return O(), de(q, {
|
|
17
|
-
modelValue: l(g),
|
|
18
|
-
"onUpdate:modelValue": S[0] || (S[0] = (x) => Ee(g) ? g.value = x : null),
|
|
19
|
-
overlay: "",
|
|
20
|
-
"close-button": !1
|
|
21
|
-
}, {
|
|
22
|
-
"dialog-header": z(() => [
|
|
23
|
-
ke(ne(l(h)), 1)
|
|
24
|
-
]),
|
|
25
|
-
default: z(() => [
|
|
26
|
-
te("p", Ke, ne(l(I)), 1)
|
|
27
|
-
]),
|
|
28
|
-
"dialog-footer": z(() => [
|
|
29
|
-
S[1] || (S[1] = te("div", { class: "grow" }, null, -1)),
|
|
30
|
-
K(E, {
|
|
31
|
-
label: l(c)("report.common.cancel"),
|
|
32
|
-
variant: "tertiary",
|
|
33
|
-
onClick: l(p).dismiss
|
|
34
|
-
}, null, 8, ["label", "onClick"]),
|
|
35
|
-
K(E, {
|
|
36
|
-
label: l(c)("report.common.confirm"),
|
|
37
|
-
onClick: l(p).confirm
|
|
38
|
-
}, null, 8, ["label", "onClick"])
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 8, ["modelValue"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}), ie = B(F());
|
|
45
|
-
function He() {
|
|
46
|
-
const C = (c) => {
|
|
47
|
-
switch (ie.value = c, c) {
|
|
48
|
-
case "zh-CN":
|
|
49
|
-
d.locale("zh-cn");
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
d.locale("en");
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return ue(() => {
|
|
57
|
-
C(F());
|
|
58
|
-
}), b(() => F(), C, { deep: !0, immediate: !0 }), {
|
|
59
|
-
currentLocale: ie
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
d.locale(F() === "zh-CN" ? "zh-cn" : "en");
|
|
63
|
-
const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
|
|
64
|
-
__name: "App",
|
|
65
|
-
setup(C) {
|
|
66
|
-
const { businessId: c, token: p, country: g } = w(Be()), { sessionUser: I, currentBusiness: h, currentCountry: R, registerSidebarComponent: S } = P(), { getRestaurantAndWarehouse: E, getBusinessSetting: q, beginBusinessLoad: x, completeBusinessLoad: le } = re(), { getFeatureFlags: fe } = Fe(), { version: y } = w(ae()), { getSettings: me } = qe(), { promptLoader: pe } = xe(), s = Pe(), J = Ge(), L = Ue(), W = ze(), a = re(), ge = ae(), { suppressReportRouteSync: k } = w(ge), { getReports: ye, getOverviewReport: ve, getReportConfig: H, currentReportId: X } = L, { currentReportId: Se, reports: De } = w(L), { getSchema: Ie } = je(), { fetchSchedules: he } = W, { init: Re } = Je(), Q = B("v5"), A = B(!1), N = B(!0), Le = oe(() => `https://portal-v1.feedme.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${p.value}&v2=true&reportV5Button=true`), _e = oe(() => `https://report-v4.feedme.cc?businessId=${c.value}&country=${g.value}&token=${p.value}&reportV3Button=true`);
|
|
67
|
-
b(
|
|
68
|
-
[() => h.value, () => I.value, () => R.value],
|
|
69
|
-
() => {
|
|
70
|
-
var e, n;
|
|
71
|
-
const t = ((e = h.value) == null ? void 0 : e.id) ?? "";
|
|
72
|
-
h.value && I.value && R.value && (Qe(R.value), c.value !== t && (c.value = t), p.value = ((n = I.value) == null ? void 0 : n.token) ?? "", g.value = R.value ?? "");
|
|
73
|
-
},
|
|
74
|
-
{ immediate: !0 }
|
|
75
|
-
);
|
|
76
|
-
function Y(t) {
|
|
77
|
-
if (typeof t.data == "string")
|
|
78
|
-
try {
|
|
79
|
-
const e = JSON.parse(t.data);
|
|
80
|
-
(e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (p.value = e.token);
|
|
81
|
-
} catch (e) {
|
|
82
|
-
console.error(e);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function Z(t) {
|
|
86
|
-
if (typeof t.data == "string")
|
|
87
|
-
try {
|
|
88
|
-
const e = JSON.parse(t.data);
|
|
89
|
-
(e == null ? void 0 : e.v5) === !0 ? y.value = Q.value : (e == null ? void 0 : e.v3) === !0 && (y.value = "v3");
|
|
90
|
-
} catch (e) {
|
|
91
|
-
console.error(e);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
b(y, () => {
|
|
95
|
-
["v3", "v4"].includes(y.value) ? P().hideSidebarToggle(!0) : P().hideSidebarToggle(!1);
|
|
96
|
-
}), Ae(() => {
|
|
97
|
-
S(Ve);
|
|
98
|
-
}), ue(() => {
|
|
99
|
-
console.log("5.22.25", !0), window.addEventListener("message", Y), window.addEventListener("message", Z);
|
|
100
|
-
}), Ne(() => {
|
|
101
|
-
window.removeEventListener("message", Y), window.removeEventListener("message", Z), L.$dispose(), W.$dispose();
|
|
102
|
-
});
|
|
103
|
-
function Oe(t) {
|
|
104
|
-
try {
|
|
105
|
-
return decodeURIComponent(t);
|
|
106
|
-
} catch {
|
|
107
|
-
return t;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function T(t) {
|
|
111
|
-
if (typeof t != "string" || t.length === 0) return;
|
|
112
|
-
const e = t.includes("%") ? [t, Oe(t)] : [t];
|
|
113
|
-
for (const n of e)
|
|
114
|
-
try {
|
|
115
|
-
const o = JSON.parse(n);
|
|
116
|
-
if (typeof o == "string")
|
|
117
|
-
try {
|
|
118
|
-
return JSON.parse(o);
|
|
119
|
-
} catch {
|
|
120
|
-
return o;
|
|
121
|
-
}
|
|
122
|
-
return o;
|
|
123
|
-
} catch {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function M(t) {
|
|
127
|
-
if (!t || typeof t != "object") return !1;
|
|
128
|
-
const e = t;
|
|
129
|
-
return typeof e.hour == "number" && typeof e.minute == "number";
|
|
130
|
-
}
|
|
131
|
-
function be(t = s.query) {
|
|
132
|
-
const e = t, n = e.startDate ? d(e.startDate).startOf("day").toISOString() : void 0, o = e.endDate ? d(e.endDate).endOf("day").toISOString() : void 0, f = typeof e.timeStart == "string", i = typeof e.timeEnd == "string", m = T(e.timeStart), v = T(e.timeEnd), u = M(m) ? m : null, $ = M(v) ? v : null, U = e.compareStartDate ? d(e.compareStartDate).startOf("day").toISOString() : void 0, j = e.compareEndDate ? d(e.compareEndDate).endOf("day").toISOString() : void 0, ee = e.isAllLocation === "true" || e.isAllLocation === void 0;
|
|
133
|
-
let _ = [];
|
|
134
|
-
if (ee)
|
|
135
|
-
_ = a.selectedLocationIds ?? [];
|
|
136
|
-
else {
|
|
137
|
-
const r = T(e.locationIds);
|
|
138
|
-
_ = Array.isArray(r) ? r : [];
|
|
139
|
-
}
|
|
140
|
-
let D = e.reportId || X;
|
|
141
|
-
if (De.value.find((r) => r.id === D) || (D = X), D && D !== L.currentReportId && L.updateCurrentReportId(D), n || o) {
|
|
142
|
-
const r = a.dateRange;
|
|
143
|
-
(r.startDate !== n || r.endDate !== o) && a.setDateRange({ startDate: n, endDate: o });
|
|
144
|
-
}
|
|
145
|
-
if (f || i) {
|
|
146
|
-
const r = a.timeRange;
|
|
147
|
-
(r.start !== u || r.end !== $) && a.setTimeRange({ start: u, end: $ });
|
|
148
|
-
}
|
|
149
|
-
if (U || j) {
|
|
150
|
-
const r = a.compareDateRange;
|
|
151
|
-
(r.startDate !== U || r.endDate !== j) && a.setCompareDateRange({
|
|
152
|
-
startDate: U,
|
|
153
|
-
endDate: j
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (!ee) {
|
|
157
|
-
const r = a.selectedLocationIds;
|
|
158
|
-
r.length === _.length && r.every((we, Ce) => we === _[Ce]) || a.setSelectedLocationIds(_);
|
|
159
|
-
}
|
|
160
|
-
return {
|
|
161
|
-
// TODO: this returned value can used for getBusinessSetting
|
|
162
|
-
reportId: D,
|
|
163
|
-
startDate: e.startDate,
|
|
164
|
-
endDate: e.endDate,
|
|
165
|
-
timeStart: e.timeStart,
|
|
166
|
-
timeEnd: e.timeEnd,
|
|
167
|
-
compareStartDate: e.compareStartDate,
|
|
168
|
-
compareEndDate: e.compareEndDate,
|
|
169
|
-
locationIds: typeof e.locationIds == "string" ? e.locationIds : void 0,
|
|
170
|
-
isAllLocation: e.isAllLocation
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
return b(
|
|
174
|
-
() => c.value,
|
|
175
|
-
async (t, e) => {
|
|
176
|
-
if (t !== "") {
|
|
177
|
-
A.value = !1, x(t);
|
|
178
|
-
const n = "mf-report-prev-business-id", o = (() => {
|
|
179
|
-
try {
|
|
180
|
-
return sessionStorage.getItem(n);
|
|
181
|
-
} catch {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
})(), f = !!o && o !== t;
|
|
185
|
-
let i = { ...s.query }, m = !1;
|
|
186
|
-
if (!N.value || e !== void 0 || f) {
|
|
187
|
-
a.setSelectedLocationIds([]);
|
|
188
|
-
const { locationIds: v, ...u } = s.query;
|
|
189
|
-
i = {
|
|
190
|
-
...u,
|
|
191
|
-
isAllLocation: "true"
|
|
192
|
-
}, m = !0, await J.replace({
|
|
193
|
-
name: s.name,
|
|
194
|
-
params: s.params,
|
|
195
|
-
query: i
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
k.value !== void 0 && (k.value = !0), await pe(async () => {
|
|
199
|
-
await Re({
|
|
200
|
-
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
201
|
-
url: "https://flag.feedme.farm/api/v1/",
|
|
202
|
-
enableAnalytics: !1,
|
|
203
|
-
cacheFlags: !1
|
|
204
|
-
});
|
|
205
|
-
const v = await H();
|
|
206
|
-
if (Q.value = v.version, y.value = Q.value, await Promise.all([
|
|
207
|
-
fe(),
|
|
208
|
-
H(),
|
|
209
|
-
ve(),
|
|
210
|
-
ye(),
|
|
211
|
-
Ie(),
|
|
212
|
-
he(),
|
|
213
|
-
E(
|
|
214
|
-
(() => {
|
|
215
|
-
const u = T(i.locationIds);
|
|
216
|
-
return Array.isArray(u) ? u : void 0;
|
|
217
|
-
})()
|
|
218
|
-
),
|
|
219
|
-
me()
|
|
220
|
-
]), await q(), be(i), m) {
|
|
221
|
-
const { locationIds: u, ...$ } = s.query;
|
|
222
|
-
(s.query.locationIds !== void 0 || s.query.isAllLocation !== "true") && await J.replace({
|
|
223
|
-
name: s.name,
|
|
224
|
-
params: s.params,
|
|
225
|
-
query: {
|
|
226
|
-
...$,
|
|
227
|
-
isAllLocation: "true"
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
}
|
|
231
|
-
le(t);
|
|
232
|
-
try {
|
|
233
|
-
sessionStorage.setItem(n, t);
|
|
234
|
-
} catch {
|
|
235
|
-
}
|
|
236
|
-
}), A.value = !0, N.value && (N.value = !1);
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
{
|
|
240
|
-
immediate: !0
|
|
241
|
-
}
|
|
242
|
-
), b(
|
|
243
|
-
() => (A.value, {
|
|
244
|
-
reportId: Se.value,
|
|
245
|
-
selectedLocationIds: a.selectedLocationIds,
|
|
246
|
-
dateRange: a.dateRange,
|
|
247
|
-
timeRange: a.timeRange,
|
|
248
|
-
compareDateRange: a.compareDateRange
|
|
249
|
-
}),
|
|
250
|
-
(t) => {
|
|
251
|
-
if (!A.value || !t.reportId || N.value) return;
|
|
252
|
-
if (k.value) {
|
|
253
|
-
k.value = !1;
|
|
254
|
-
return;
|
|
255
|
-
}
|
|
256
|
-
const e = t.selectedLocationIds, n = t.dateRange, o = t.timeRange, f = t.compareDateRange, i = {
|
|
257
|
-
...s.query,
|
|
258
|
-
reportId: t.reportId,
|
|
259
|
-
startDate: n.startDate ? d(n.startDate).startOf("day").toISOString() : void 0,
|
|
260
|
-
endDate: n.endDate ? d(n.endDate).endOf("day").toISOString() : void 0,
|
|
261
|
-
compareStartDate: f.startDate ? d(f.startDate).startOf("day").toISOString() : void 0,
|
|
262
|
-
compareEndDate: f.endDate ? d(f.endDate).endOf("day").toISOString() : void 0,
|
|
263
|
-
timeStart: o.start ? JSON.stringify(o.start) : void 0,
|
|
264
|
-
timeEnd: o.end ? JSON.stringify(o.end) : void 0
|
|
265
|
-
}, m = e.length === a.locations.length;
|
|
266
|
-
i.isAllLocation = String(m), m ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
|
|
267
|
-
const v = JSON.stringify(s.query), u = JSON.stringify(i);
|
|
268
|
-
v !== u && J.replace({
|
|
269
|
-
name: s.name,
|
|
270
|
-
params: s.params,
|
|
271
|
-
query: i
|
|
272
|
-
});
|
|
273
|
-
},
|
|
274
|
-
{ deep: !0 }
|
|
275
|
-
), He(), (t, e) => {
|
|
276
|
-
const n = G("router-view");
|
|
277
|
-
return O(), V(Te, null, [
|
|
278
|
-
K(We),
|
|
279
|
-
l(y) === "v3" ? (O(), V("iframe", {
|
|
280
|
-
key: 0,
|
|
281
|
-
class: "bg-white h-full w-full",
|
|
282
|
-
src: Le.value
|
|
283
|
-
}, null, 8, Xe)) : l(y) === "v4" ? (O(), V("iframe", {
|
|
284
|
-
key: 1,
|
|
285
|
-
class: "bg-white h-full w-full",
|
|
286
|
-
src: _e.value
|
|
287
|
-
}, null, 8, Ye)) : (O(), de(n, { key: 2 }))
|
|
288
|
-
], 64);
|
|
289
|
-
};
|
|
290
|
-
}
|
|
291
|
-
});
|
|
292
|
-
export {
|
|
293
|
-
ut as default
|
|
294
|
-
};
|