@feedmepos/mf-report 5.21.38 → 5.21.39
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-BsUD07li.js → App-DykmYyu7.js} +38 -40
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BKCPhMQp.js → BaseDialog.vue_vue_type_script_setup_true_lang-CzdqdH4Q.js} +211 -211
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-IFmK7UNC.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-D8Or-oVC.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-C_dmzKZp.js → Default.vue_vue_type_script_setup_true_lang-CtQ1zwaR.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-CGiARqgH.js → FilterSelector.vue_vue_type_script_setup_true_lang-Cq0wolEE.js} +7 -7
- package/dist/{InsightView-gvzdf87-.js → InsightView-IH9nmJ8R.js} +6 -6
- package/dist/{Integration-DlwJe_kl.js → Integration-DAscHEkh.js} +3 -3
- package/dist/{Integrations-Cg5cqwQl.js → Integrations-D6XFos9X.js} +3 -3
- package/dist/{Layout-yXdcJAGo.js → Layout-Bc1FmJXu.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-QE2Z689r.js → MenuTab.vue_vue_type_script_setup_true_lang-CZIacrkt.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BIJODDPm.js → NavigationTab.vue_vue_type_script_setup_true_lang-NipBn7yH.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DlBpfQGg.js → NoData.vue_vue_type_script_setup_true_lang-g-9SED3o.js} +1 -1
- package/dist/{OverviewView--RezHs3M.js → OverviewView-BASgwfqk.js} +5 -5
- package/dist/{Report-DyF7i2e5.js → Report-B0_CUvYo.js} +4 -4
- package/dist/{ReportEditor-C2yY2-qW.js → ReportEditor-DgVj55Yv.js} +6 -6
- package/dist/{ReportView-BzfutolJ.js → ReportView-DYL7cyXp.js} +8 -8
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Bcn8ccAQ.js → SelectComponent.vue_vue_type_script_setup_true_lang-C8IbvVSY.js} +1 -1
- package/dist/{Setting-Cl16Kc6K.js → Setting-BY0XUIMk.js} +5 -5
- package/dist/{TileEditor-tcRV0cTM.js → TileEditor-BYO4u87o.js} +8 -8
- package/dist/{TransitionFade-ObjoHeks.js → TransitionFade-CTI3okbU.js} +6 -6
- package/dist/{app-C44_Ghab.js → app-Yx_HCvnc.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-DHyKAOan.js → formatChartData.worker-Bf22-3_a.js} +16 -16
- package/dist/assets/{processTableData.worker-BAeQAKT3.js → processTableData.worker-GbyPQNAF.js} +21 -21
- package/dist/{vue-i18n-D3JtdL0j.js → vue-i18n-B3i4Y3fR.js} +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { defineComponent as se, resolveComponent as V, createBlock as ie, openBlock as R, unref as c, isRef as be, withCtx as j, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as we, onMounted as ue, watch as q, ref 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 V, createBlock as ie, openBlock as R, unref as c, isRef as be, withCtx as j, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as we, onMounted as ue, watch as q, ref as A, computed as te, onBeforeMount as Ce, 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 Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-B3i4Y3fR.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-CzdqdH4Q.js";
|
|
6
|
+
import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-NipBn7yH.js";
|
|
7
7
|
import { u as ae } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { d as u } from "./app-
|
|
8
|
+
import { d as u } from "./app-Yx_HCvnc.js";
|
|
9
9
|
import { useRoute as Qe, useRouter as Ve } from "vue-router";
|
|
10
10
|
const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge = /* @__PURE__ */ se({
|
|
11
11
|
__name: "Dialog",
|
|
12
12
|
setup(_) {
|
|
13
13
|
const { t: i } = Ae(), l = ae(), { isOpened: d, message: S, title: D } = L(ae());
|
|
14
|
-
return (
|
|
15
|
-
const O = V("FmButton"),
|
|
16
|
-
return R(), ie(
|
|
14
|
+
return (m, g) => {
|
|
15
|
+
const O = V("FmButton"), T = V("FmDialog");
|
|
16
|
+
return R(), ie(T, {
|
|
17
17
|
modelValue: c(d),
|
|
18
|
-
"onUpdate:modelValue": g[0] || (g[0] = (
|
|
18
|
+
"onUpdate:modelValue": g[0] || (g[0] = (B) => be(d) ? d.value = B : null),
|
|
19
19
|
overlay: "",
|
|
20
20
|
"close-button": !1
|
|
21
21
|
}, {
|
|
@@ -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
|
-
}), oe = N(
|
|
44
|
+
}), oe = A(N());
|
|
45
45
|
function We() {
|
|
46
46
|
const _ = (i) => {
|
|
47
47
|
switch (oe.value = i, i) {
|
|
@@ -54,33 +54,31 @@ function We() {
|
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
56
|
return ue(() => {
|
|
57
|
-
_(
|
|
58
|
-
}), q(() =>
|
|
57
|
+
_(N());
|
|
58
|
+
}), q(() => N(), _, { deep: !0, immediate: !0 }), {
|
|
59
59
|
currentLocale: oe
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
u.locale(
|
|
62
|
+
u.locale(N() === "zh-CN" ? "zh-cn" : "en");
|
|
63
63
|
const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
64
64
|
__name: "App",
|
|
65
65
|
setup(_) {
|
|
66
|
-
const { businessId: i, token: l, country: d } = L(Ne()), { sessionUser: S, currentBusiness: D, currentCountry:
|
|
66
|
+
const { businessId: i, token: l, country: d } = L(Ne()), { sessionUser: S, currentBusiness: D, currentCountry: m, registerSidebarComponent: g } = Q(), { getRestaurantAndWarehouse: O, getBusinessSetting: T, beginBusinessLoad: B, completeBusinessLoad: ce } = ne(), { getFeatureFlags: de } = Te(), { version: f } = L(re()), { getSettings: le } = Be(), { promptLoader: me } = Fe(), n = Qe(), F = Ve(), h = Je(), G = je(), r = ne(), fe = re(), { suppressReportRouteSync: b } = L(fe), { getReports: pe, getOverviewReport: ge, getReportConfig: W, currentReportId: H } = h, { currentReportId: ye, reports: ve } = L(h), { getSchema: Se } = Ue(), { fetchSchedules: De } = G, { init: he } = $e(), $ = A("v5"), w = A(!1), x = A(!0), Ie = te(() => `https://portal-v1.feedme.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${d.value.toUpperCase()}&menuOption=business-report&token=${l.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${i.value}&country=${d.value}&token=${l.value}&reportV3Button=true`);
|
|
67
67
|
q(
|
|
68
|
-
[() => D.value, () => S.value, () =>
|
|
68
|
+
[() => D.value, () => S.value, () => m.value],
|
|
69
69
|
() => {
|
|
70
70
|
var t, a;
|
|
71
71
|
const e = ((t = D.value) == null ? void 0 : t.id) ?? "";
|
|
72
|
-
if (D.value && S.value &&
|
|
73
|
-
xe(
|
|
72
|
+
if (D.value && S.value && m.value) {
|
|
73
|
+
xe(m.value), i.value !== e && (i.value = e);
|
|
74
74
|
let s = !1;
|
|
75
|
-
d.value !==
|
|
75
|
+
d.value !== m.value && (s = !0), l.value = ((a = S.value) == null ? void 0 : a.token) ?? "", d.value = m.value ?? "", (n.query.businessId !== i.value || s) && F.replace({
|
|
76
76
|
name: n.name,
|
|
77
77
|
params: n.params,
|
|
78
78
|
query: {
|
|
79
79
|
...n.query,
|
|
80
80
|
businessId: i.value,
|
|
81
|
-
country:
|
|
82
|
-
isAllLocation: "true",
|
|
83
|
-
locationIds: void 0
|
|
81
|
+
country: m.value
|
|
84
82
|
}
|
|
85
83
|
});
|
|
86
84
|
}
|
|
@@ -100,17 +98,17 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
100
98
|
if (typeof e.data == "string")
|
|
101
99
|
try {
|
|
102
100
|
const t = JSON.parse(e.data);
|
|
103
|
-
(t == null ? void 0 : t.v5) === !0 ?
|
|
101
|
+
(t == null ? void 0 : t.v5) === !0 ? f.value = $.value : (t == null ? void 0 : t.v3) === !0 && (f.value = "v3");
|
|
104
102
|
} catch (t) {
|
|
105
103
|
console.error(t);
|
|
106
104
|
}
|
|
107
105
|
}
|
|
108
|
-
q(
|
|
109
|
-
["v3", "v4"].includes(
|
|
106
|
+
q(f, () => {
|
|
107
|
+
["v3", "v4"].includes(f.value) ? Q().hideSidebarToggle(!0) : Q().hideSidebarToggle(!1);
|
|
110
108
|
}), Ce(() => {
|
|
111
109
|
g(ze);
|
|
112
110
|
}), ue(() => {
|
|
113
|
-
console.log("5.21.
|
|
111
|
+
console.log("5.21.39", !0), window.addEventListener("message", K), window.addEventListener("message", X);
|
|
114
112
|
}), Ee(() => {
|
|
115
113
|
window.removeEventListener("message", K), window.removeEventListener("message", X), h.$dispose(), G.$dispose();
|
|
116
114
|
});
|
|
@@ -121,7 +119,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
121
119
|
return e;
|
|
122
120
|
}
|
|
123
121
|
}
|
|
124
|
-
function
|
|
122
|
+
function C(e) {
|
|
125
123
|
if (typeof e != "string" || e.length === 0) return;
|
|
126
124
|
const t = e.includes("%") ? [e, qe(e)] : [e];
|
|
127
125
|
for (const a of t)
|
|
@@ -143,12 +141,12 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
143
141
|
return typeof t.hour == "number" && typeof t.minute == "number";
|
|
144
142
|
}
|
|
145
143
|
function Le() {
|
|
146
|
-
const e = n.query.startDate ? u(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? u(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", p =
|
|
144
|
+
const e = n.query.startDate ? u(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? u(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", p = C(n.query.timeStart), I = C(n.query.timeEnd), E = Y(p) ? p : null, k = Y(I) ? I : null, J = n.query.compareStartDate ? u(n.query.compareStartDate).startOf("day").toISOString() : void 0, U = n.query.compareEndDate ? u(n.query.compareEndDate).endOf("day").toISOString() : void 0, Z = n.query.isAllLocation === "true" || n.query.isAllLocation === void 0;
|
|
147
145
|
let y = [];
|
|
148
146
|
if (Z)
|
|
149
147
|
y = r.selectedLocationIds;
|
|
150
148
|
else {
|
|
151
|
-
const o =
|
|
149
|
+
const o = C(n.query.locationIds);
|
|
152
150
|
y = Array.isArray(o) ? o : [];
|
|
153
151
|
}
|
|
154
152
|
let v = n.query.reportId || H;
|
|
@@ -158,7 +156,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
158
156
|
}
|
|
159
157
|
if (a || s) {
|
|
160
158
|
const o = r.timeRange;
|
|
161
|
-
(o.start !==
|
|
159
|
+
(o.start !== E || o.end !== k) && r.setTimeRange({ start: E, end: k });
|
|
162
160
|
}
|
|
163
161
|
if (J || U) {
|
|
164
162
|
const o = r.compareDateRange;
|
|
@@ -187,7 +185,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
187
185
|
return q(
|
|
188
186
|
() => i.value,
|
|
189
187
|
async (e) => {
|
|
190
|
-
e !== "" && (w.value = !1,
|
|
188
|
+
e !== "" && (w.value = !1, B(e), x.value || (r.setSelectedLocationIds([]), F.replace({
|
|
191
189
|
name: n.name,
|
|
192
190
|
params: n.params,
|
|
193
191
|
query: {
|
|
@@ -195,7 +193,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
195
193
|
locationIds: void 0,
|
|
196
194
|
isAllLocation: "true"
|
|
197
195
|
}
|
|
198
|
-
})), b.value !== void 0 && (b.value = !0), await
|
|
196
|
+
})), b.value !== void 0 && (b.value = !0), await me(async () => {
|
|
199
197
|
await he({
|
|
200
198
|
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
201
199
|
url: "https://flag.feedme.farm/api/v1/",
|
|
@@ -203,7 +201,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
203
201
|
cacheFlags: !1
|
|
204
202
|
});
|
|
205
203
|
const t = await W();
|
|
206
|
-
|
|
204
|
+
$.value = t.version, f.value = $.value, await Promise.all([
|
|
207
205
|
de(),
|
|
208
206
|
W(),
|
|
209
207
|
ge(),
|
|
@@ -212,13 +210,13 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
212
210
|
De(),
|
|
213
211
|
O(
|
|
214
212
|
(() => {
|
|
215
|
-
const a =
|
|
213
|
+
const a = C(n.query.locationIds);
|
|
216
214
|
return Array.isArray(a) ? a : void 0;
|
|
217
215
|
})()
|
|
218
216
|
),
|
|
219
217
|
le()
|
|
220
|
-
]), await
|
|
221
|
-
}), w.value = !0,
|
|
218
|
+
]), await T(), Le(), ce(e);
|
|
219
|
+
}), w.value = !0, x.value && (x.value = !1));
|
|
222
220
|
},
|
|
223
221
|
{
|
|
224
222
|
immediate: !0
|
|
@@ -248,8 +246,8 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
248
246
|
timeEnd: s.end ? JSON.stringify(s.end) : void 0,
|
|
249
247
|
locationIds: t.length === r.locations.length ? void 0 : t.length > 0 ? JSON.stringify(t) : void 0,
|
|
250
248
|
isAllLocation: String(t.length === r.locations.length)
|
|
251
|
-
},
|
|
252
|
-
|
|
249
|
+
}, E = JSON.stringify(n.query), k = JSON.stringify(I);
|
|
250
|
+
E !== k && F.replace({
|
|
253
251
|
name: n.name,
|
|
254
252
|
params: n.params,
|
|
255
253
|
query: I
|
|
@@ -260,11 +258,11 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
|
|
|
260
258
|
const a = V("router-view");
|
|
261
259
|
return R(), z(ke, null, [
|
|
262
260
|
P(Ge),
|
|
263
|
-
c(
|
|
261
|
+
c(f) === "v3" ? (R(), z("iframe", {
|
|
264
262
|
key: 0,
|
|
265
263
|
class: "bg-white h-full w-full",
|
|
266
264
|
src: Ie.value
|
|
267
|
-
}, null, 8, He)) : c(
|
|
265
|
+
}, null, 8, He)) : c(f) === "v4" ? (R(), z("iframe", {
|
|
268
266
|
key: 1,
|
|
269
267
|
class: "bg-white h-full w-full",
|
|
270
268
|
src: Re.value
|