@feedmepos/mf-report 5.21.61 → 5.21.63
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-j3usf8FY.js → App-CH9htNyn.js} +43 -43
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-UggmboXZ.js → BaseDialog.vue_vue_type_script_setup_true_lang-DyxMsDYp.js} +686 -686
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CpqzVOXy.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-P5rHRVpM.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-B7b3bYC5.js → Default.vue_vue_type_script_setup_true_lang-Cj85Y2IE.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-CIbCbfmC.js → FilterSelector.vue_vue_type_script_setup_true_lang-CapLHbgW.js} +7 -7
- package/dist/{InsightView-CMgtW6qD.js → InsightView-D16U7M3m.js} +6 -6
- package/dist/{Integration-CkBqXwuz.js → Integration-Ctx6mFS5.js} +3 -3
- package/dist/{Integrations-Dk9y9Qjv.js → Integrations-DQlct97a.js} +3 -3
- package/dist/{Layout-DHZsuN72.js → Layout-BhiRVE2A.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B_UNDwvq.js → MenuTab.vue_vue_type_script_setup_true_lang-B8RWrMRK.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-AU5ZjMBm.js → NavigationTab.vue_vue_type_script_setup_true_lang-rUSP50SN.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-kxSAU57T.js → NoData.vue_vue_type_script_setup_true_lang-BwXvyQJf.js} +1 -1
- package/dist/{OverviewView-BluLtqh0.js → OverviewView-CrZBnrPN.js} +5 -5
- package/dist/{Report-BpjVd5nd.js → Report-DWNrjsmJ.js} +4 -4
- package/dist/{ReportEditor-B2SHMOOe.js → ReportEditor-BYsGBhJQ.js} +6 -6
- package/dist/{ReportView-DbhiaJX_.js → ReportView-Bj9F25Mc.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-A3u4G6JX.js → SelectComponent.vue_vue_type_script_setup_true_lang-iuy0xu_t.js} +1 -1
- package/dist/{Setting-CEgKxXdO.js → Setting-5cmn32fD.js} +5 -5
- package/dist/{TileEditor-Bw3cr-tu.js → TileEditor-O7hZ1GiL.js} +8 -8
- package/dist/{TransitionFade-BjCkyi78.js → TransitionFade-DRg-pt4H.js} +6 -6
- package/dist/{app-DggmOMWQ.js → app-BRem7WAs.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-D2WGGG5c.js → formatChartData.worker-LJEQRxzw.js} +7 -7
- package/dist/assets/{processTableData.worker-2nFOrip5.js → processTableData.worker-CzGuZYT-.js} +7 -7
- package/dist/{vue-i18n-DIv5YRC1.js → vue-i18n-BPvXbxK_.js} +1 -1
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { defineComponent as se, resolveComponent as Q, createBlock as ie, openBlock as R, unref as u, isRef as be, withCtx as U, createElementVNode as M, createVNode as
|
|
2
|
-
import { detectLocale as
|
|
3
|
-
import { u as Ae, a as Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-
|
|
1
|
+
import { defineComponent as se, resolveComponent as Q, createBlock as ie, openBlock as R, unref as u, isRef as be, withCtx as U, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as we, onMounted as ce, watch as q, ref as N, computed as te, onBeforeMount as Ce, onBeforeUnmount as Ee, createElementBlock as j, Fragment as ke } from "vue";
|
|
2
|
+
import { detectLocale as T, useCoreStore as z } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as Ae, a as Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-BPvXbxK_.js";
|
|
4
4
|
import { storeToRefs as L } from "pinia";
|
|
5
|
-
import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DyxMsDYp.js";
|
|
6
|
+
import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-rUSP50SN.js";
|
|
7
7
|
import { u as oe } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { d as c } from "./app-
|
|
9
|
-
import { useRoute as Qe, useRouter as
|
|
10
|
-
const
|
|
8
|
+
import { d as c } from "./app-BRem7WAs.js";
|
|
9
|
+
import { useRoute as Qe, useRouter as Pe } from "vue-router";
|
|
10
|
+
const Ve = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge = /* @__PURE__ */ se({
|
|
11
11
|
__name: "Dialog",
|
|
12
12
|
setup(_) {
|
|
13
|
-
const { t: i } = Ae(), d = oe(), { isOpened: l, message:
|
|
13
|
+
const { t: i } = Ae(), d = oe(), { isOpened: l, message: v, title: S } = L(oe());
|
|
14
14
|
return (D, p) => {
|
|
15
|
-
const O = Q("FmButton"),
|
|
16
|
-
return R(), ie(
|
|
15
|
+
const O = Q("FmButton"), B = Q("FmDialog");
|
|
16
|
+
return R(), ie(B, {
|
|
17
17
|
modelValue: u(l),
|
|
18
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
18
|
+
"onUpdate:modelValue": p[0] || (p[0] = (F) => be(l) ? l.value = F : null),
|
|
19
19
|
overlay: "",
|
|
20
20
|
"close-button": !1
|
|
21
21
|
}, {
|
|
22
22
|
"dialog-header": U(() => [
|
|
23
|
-
we(ee(u(
|
|
23
|
+
we(ee(u(S)), 1)
|
|
24
24
|
]),
|
|
25
25
|
default: U(() => [
|
|
26
|
-
M("p",
|
|
26
|
+
M("p", Ve, ee(u(v)), 1)
|
|
27
27
|
]),
|
|
28
28
|
"dialog-footer": U(() => [
|
|
29
29
|
p[1] || (p[1] = M("div", { class: "grow" }, null, -1)),
|
|
30
|
-
|
|
30
|
+
P(O, {
|
|
31
31
|
label: u(i)("report.common.cancel"),
|
|
32
32
|
variant: "tertiary",
|
|
33
33
|
onClick: u(d).dismiss
|
|
34
34
|
}, null, 8, ["label", "onClick"]),
|
|
35
|
-
|
|
35
|
+
P(O, {
|
|
36
36
|
label: u(i)("report.common.confirm"),
|
|
37
37
|
onClick: u(d).confirm
|
|
38
38
|
}, null, 8, ["label", "onClick"])
|
|
@@ -41,7 +41,7 @@ const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge
|
|
|
41
41
|
}, 8, ["modelValue"]);
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
}), ae =
|
|
44
|
+
}), ae = N(T());
|
|
45
45
|
function We() {
|
|
46
46
|
const _ = (i) => {
|
|
47
47
|
switch (ae.value = i, i) {
|
|
@@ -54,22 +54,22 @@ function We() {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
return ce(() => {
|
|
57
|
-
_(
|
|
58
|
-
}), q(() =>
|
|
57
|
+
_(T());
|
|
58
|
+
}), q(() => T(), _, { deep: !0, immediate: !0 }), {
|
|
59
59
|
currentLocale: ae
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
c.locale(
|
|
62
|
+
c.locale(T() === "zh-CN" ? "zh-cn" : "en");
|
|
63
63
|
const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
64
64
|
__name: "App",
|
|
65
65
|
setup(_) {
|
|
66
|
-
const { businessId: i, token: d, country: l } = L(Ne()), { sessionUser:
|
|
66
|
+
const { businessId: i, token: d, country: l } = L(Ne()), { sessionUser: v, currentBusiness: S, currentCountry: D, registerSidebarComponent: p } = z(), { getRestaurantAndWarehouse: O, getBusinessSetting: B, beginBusinessLoad: F, completeBusinessLoad: ue } = ne(), { getFeatureFlags: de } = Te(), { version: f } = L(re()), { getSettings: le } = Be(), { promptLoader: fe } = Fe(), n = Qe(), V = Pe(), h = Je(), G = je(), r = ne(), me = re(), { suppressReportRouteSync: b } = L(me), { getReports: pe, getOverviewReport: ge, getReportConfig: W, currentReportId: H } = h, { currentReportId: ye, reports: ve } = L(h), { getSchema: Se } = Ue(), { fetchSchedules: De } = G, { init: he } = $e(), $ = N("v5"), w = N(!1), C = N(!0), Ie = te(() => `https://portal-v1.feedme.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${d.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${i.value}&country=${l.value}&token=${d.value}&reportV3Button=true`);
|
|
67
67
|
q(
|
|
68
|
-
[() =>
|
|
68
|
+
[() => S.value, () => v.value, () => D.value],
|
|
69
69
|
() => {
|
|
70
70
|
var t, a;
|
|
71
|
-
const e = ((t =
|
|
72
|
-
|
|
71
|
+
const e = ((t = S.value) == null ? void 0 : t.id) ?? "";
|
|
72
|
+
S.value && v.value && D.value && (xe(D.value), i.value !== e && (i.value = e), d.value = ((a = v.value) == null ? void 0 : a.token) ?? "", l.value = D.value ?? "");
|
|
73
73
|
},
|
|
74
74
|
{ immediate: !0 }
|
|
75
75
|
);
|
|
@@ -86,7 +86,7 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
86
86
|
if (typeof e.data == "string")
|
|
87
87
|
try {
|
|
88
88
|
const t = JSON.parse(e.data);
|
|
89
|
-
(t == null ? void 0 : t.v5) === !0 ? f.value =
|
|
89
|
+
(t == null ? void 0 : t.v5) === !0 ? f.value = $.value : (t == null ? void 0 : t.v3) === !0 && (f.value = "v3");
|
|
90
90
|
} catch (t) {
|
|
91
91
|
console.error(t);
|
|
92
92
|
}
|
|
@@ -96,7 +96,7 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
96
96
|
}), Ce(() => {
|
|
97
97
|
p(ze);
|
|
98
98
|
}), ce(() => {
|
|
99
|
-
console.log("5.21.
|
|
99
|
+
console.log("5.21.63", !0), window.addEventListener("message", K), window.addEventListener("message", X);
|
|
100
100
|
}), Ee(() => {
|
|
101
101
|
window.removeEventListener("message", K), window.removeEventListener("message", X), h.$dispose(), G.$dispose();
|
|
102
102
|
});
|
|
@@ -107,7 +107,7 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
107
107
|
return e;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function E(e) {
|
|
111
111
|
if (typeof e != "string" || e.length === 0) return;
|
|
112
112
|
const t = e.includes("%") ? [e, qe(e)] : [e];
|
|
113
113
|
for (const a of t)
|
|
@@ -129,22 +129,22 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
129
129
|
return typeof t.hour == "number" && typeof t.minute == "number";
|
|
130
130
|
}
|
|
131
131
|
function Le() {
|
|
132
|
-
const e = n.query.startDate ? c(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? c(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", m =
|
|
132
|
+
const e = n.query.startDate ? c(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? c(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", m = E(n.query.timeStart), I = E(n.query.timeEnd), k = Y(m) ? m : null, A = Y(I) ? I : null, x = n.query.compareStartDate ? c(n.query.compareStartDate).startOf("day").toISOString() : void 0, J = n.query.compareEndDate ? c(n.query.compareEndDate).endOf("day").toISOString() : void 0, Z = n.query.isAllLocation === "true" || n.query.isAllLocation === void 0;
|
|
133
133
|
let g = [];
|
|
134
134
|
if (Z)
|
|
135
135
|
g = r.selectedLocationIds;
|
|
136
136
|
else {
|
|
137
|
-
const o =
|
|
137
|
+
const o = E(n.query.locationIds);
|
|
138
138
|
g = Array.isArray(o) ? o : [];
|
|
139
139
|
}
|
|
140
140
|
let y = n.query.reportId || H;
|
|
141
|
-
if (
|
|
141
|
+
if (ve.value.find((o) => o.id === y) || (y = H), y && y !== h.currentReportId && h.updateCurrentReportId(y), e || t) {
|
|
142
142
|
const o = r.dateRange;
|
|
143
143
|
(o.startDate !== e || o.endDate !== t) && r.setDateRange({ startDate: e, endDate: t });
|
|
144
144
|
}
|
|
145
145
|
if (a || s) {
|
|
146
146
|
const o = r.timeRange;
|
|
147
|
-
(o.start !==
|
|
147
|
+
(o.start !== k || o.end !== A) && r.setTimeRange({ start: k, end: A });
|
|
148
148
|
}
|
|
149
149
|
if (x || J) {
|
|
150
150
|
const o = r.compareDateRange;
|
|
@@ -173,7 +173,7 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
173
173
|
return q(
|
|
174
174
|
() => i.value,
|
|
175
175
|
async (e, t) => {
|
|
176
|
-
e !== "" && (w.value = !1,
|
|
176
|
+
e !== "" && (w.value = !1, F(e), (!C.value || t !== void 0) && (r.setSelectedLocationIds([]), V.replace({
|
|
177
177
|
name: n.name,
|
|
178
178
|
params: n.params,
|
|
179
179
|
query: {
|
|
@@ -189,22 +189,22 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
189
189
|
cacheFlags: !1
|
|
190
190
|
});
|
|
191
191
|
const a = await W();
|
|
192
|
-
|
|
192
|
+
$.value = a.version, f.value = $.value, await Promise.all([
|
|
193
193
|
de(),
|
|
194
194
|
W(),
|
|
195
195
|
ge(),
|
|
196
196
|
pe(),
|
|
197
|
-
|
|
197
|
+
Se(),
|
|
198
198
|
De(),
|
|
199
199
|
O(
|
|
200
200
|
(() => {
|
|
201
|
-
const s =
|
|
201
|
+
const s = E(n.query.locationIds);
|
|
202
202
|
return Array.isArray(s) ? s : void 0;
|
|
203
203
|
})()
|
|
204
204
|
),
|
|
205
205
|
le()
|
|
206
|
-
]), await
|
|
207
|
-
}), w.value = !0,
|
|
206
|
+
]), await B(), Le(), ue(e);
|
|
207
|
+
}), w.value = !0, C.value && (C.value = !1));
|
|
208
208
|
},
|
|
209
209
|
{
|
|
210
210
|
immediate: !0
|
|
@@ -218,8 +218,8 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
218
218
|
compareDateRange: r.compareDateRange
|
|
219
219
|
}),
|
|
220
220
|
(e) => {
|
|
221
|
-
if (!w.value || !e.reportId) return;
|
|
222
|
-
if (b.value) {
|
|
221
|
+
if (!w.value || !e.reportId || C.value) return;
|
|
222
|
+
if (console.log("isLoaded is true, not initial business. Route sync with report filter changes", e), b.value) {
|
|
223
223
|
b.value = !1;
|
|
224
224
|
return;
|
|
225
225
|
}
|
|
@@ -234,18 +234,18 @@ const He = ["src"], Ke = ["src"], ct = /* @__PURE__ */ se({
|
|
|
234
234
|
timeEnd: s.end ? JSON.stringify(s.end) : void 0,
|
|
235
235
|
locationIds: t.length === r.locations.length ? void 0 : t.length > 0 ? JSON.stringify(t) : void 0,
|
|
236
236
|
isAllLocation: String(t.length === r.locations.length)
|
|
237
|
-
},
|
|
238
|
-
|
|
237
|
+
}, k = JSON.stringify(n.query), A = JSON.stringify(I);
|
|
238
|
+
console.log("comparing query string"), k !== A && (console.log("replacing router again.."), V.replace({
|
|
239
239
|
name: n.name,
|
|
240
240
|
params: n.params,
|
|
241
241
|
query: I
|
|
242
|
-
});
|
|
242
|
+
}));
|
|
243
243
|
},
|
|
244
244
|
{ deep: !0 }
|
|
245
245
|
), We(), (e, t) => {
|
|
246
246
|
const a = Q("router-view");
|
|
247
247
|
return R(), j(ke, null, [
|
|
248
|
-
|
|
248
|
+
P(Ge),
|
|
249
249
|
u(f) === "v3" ? (R(), j("iframe", {
|
|
250
250
|
key: 0,
|
|
251
251
|
class: "bg-white h-full w-full",
|