@feedmepos/mf-report 5.17.3 → 5.18.1-beta.0
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-BnUGnhPB.js +152 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-zm9n1O33.js → BaseDialog.vue_vue_type_script_setup_true_lang-BrHd550j.js} +276 -275
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-BTAGYDCz.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-uiSe3Jon.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-CgYGO4yx.js → Default.vue_vue_type_script_setup_true_lang-4V19EFBP.js} +2 -2
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-C8cyy9bU.js → DynamicWidget.vue_vue_type_script_setup_true_lang-B75aeM0i.js} +5 -5
- package/dist/{InsightView-DHJpgIpN.js → InsightView-DCIgjpGL.js} +5 -5
- package/dist/{Integration-1nQoa-4L.js → Integration-CWUSF_o7.js} +2 -2
- package/dist/{Integrations-CwUDvDyk.js → Integrations-BOVIAEgw.js} +3 -3
- package/dist/{Layout-BGv-nIpA.js → Layout-Dco__bZI.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-2WVMDoeu.js → MenuTab.vue_vue_type_script_setup_true_lang-BJM6sKQU.js} +6 -6
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-WtoZmgSS.js → NavigationTab.vue_vue_type_script_setup_true_lang-4v9iLIA2.js} +9599 -9310
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-jqchPoxC.js → NoData.vue_vue_type_script_setup_true_lang-Divo8W18.js} +1 -1
- package/dist/{OverviewView-BoCmq1bd.js → OverviewView-CUPsimnH.js} +5 -5
- package/dist/Report-BljRc1xi.js +449 -0
- package/dist/{ReportEditor-xcYNm8FC.js → ReportEditor-DgAWdCZe.js} +6 -6
- package/dist/ReportView-CMRcpoTz.js +252 -0
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-DgqTEstg.js → SelectComponent.vue_vue_type_script_setup_true_lang-mR2PeX3S.js} +1 -1
- package/dist/{Setting-4tVYcTe9.js → Setting-BciZnr8l.js} +4 -4
- package/dist/{TileEditor-Bf1rvmkB.js → TileEditor-DgawblCV.js} +7 -7
- package/dist/{TransitionFade-Dqqv1vPC.js → TransitionFade-1tV8-j1Z.js} +5 -5
- package/dist/app.js +71 -23
- package/dist/{helper-DhCLLL6W.js → helper-UCnMF9KV.js} +1 -1
- package/dist/{vue-i18n-DFboGk6x.js → vue-i18n-CTLGxUiF.js} +2238 -2224
- package/package.json +1 -1
- package/dist/App-C0PwmiVf.js +0 -149
- package/dist/Report-BM6y_VoL.js +0 -426
- package/dist/ReportView-AqpMV-lD.js +0 -192
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { defineComponent as x, resolveComponent as b, createBlock as T, openBlock as c, unref as r, isRef as Y, withCtx as S, createElementVNode as V, createVNode as k, toDisplayString as D, createTextVNode as Z, onMounted as z, watch as f, ref as J, computed as I, onBeforeMount as M, onBeforeUnmount as ee, createElementBlock as y, Fragment as te } from "vue";
|
|
2
|
+
import { detectLocale as p, useCoreStore as w } from "@feedmepos/mf-common";
|
|
3
|
+
import { u as oe, d as C, a as re, b as ae, c as ne, e as se, f as le, s as ue, g as ie } from "./vue-i18n-CTLGxUiF.js";
|
|
4
|
+
import { storeToRefs as $ } from "pinia";
|
|
5
|
+
import { u as ce, a as me, b as de } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BrHd550j.js";
|
|
6
|
+
import { _ as ve, u as fe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-4v9iLIA2.js";
|
|
7
|
+
import { u as O } from "./message-dialog-UoMWOnil.js";
|
|
8
|
+
import { useRoute as pe } from "vue-router";
|
|
9
|
+
const ge = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, he = /* @__PURE__ */ x({
|
|
10
|
+
__name: "Dialog",
|
|
11
|
+
setup(m) {
|
|
12
|
+
const { t } = oe(), n = O(), { isOpened: a, message: u, title: i } = $(O());
|
|
13
|
+
return (d, l) => {
|
|
14
|
+
const v = b("FmButton"), g = b("FmDialog");
|
|
15
|
+
return c(), T(g, {
|
|
16
|
+
modelValue: r(a),
|
|
17
|
+
"onUpdate:modelValue": l[0] || (l[0] = (h) => Y(a) ? a.value = h : null),
|
|
18
|
+
overlay: "",
|
|
19
|
+
"close-button": !1
|
|
20
|
+
}, {
|
|
21
|
+
"dialog-header": S(() => [
|
|
22
|
+
Z(D(r(i)), 1)
|
|
23
|
+
]),
|
|
24
|
+
default: S(() => [
|
|
25
|
+
V("p", ge, D(r(u)), 1)
|
|
26
|
+
]),
|
|
27
|
+
"dialog-footer": S(() => [
|
|
28
|
+
l[1] || (l[1] = V("div", { class: "grow" }, null, -1)),
|
|
29
|
+
k(v, {
|
|
30
|
+
label: r(t)("report.common.cancel"),
|
|
31
|
+
variant: "tertiary",
|
|
32
|
+
onClick: r(n).dismiss
|
|
33
|
+
}, null, 8, ["label", "onClick"]),
|
|
34
|
+
k(v, {
|
|
35
|
+
label: r(t)("report.common.confirm"),
|
|
36
|
+
onClick: r(n).confirm
|
|
37
|
+
}, null, 8, ["label", "onClick"])
|
|
38
|
+
]),
|
|
39
|
+
_: 1
|
|
40
|
+
}, 8, ["modelValue"]);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}), U = J(p());
|
|
44
|
+
function _e() {
|
|
45
|
+
const m = (t) => {
|
|
46
|
+
switch (U.value = t, t) {
|
|
47
|
+
case "zh-CN":
|
|
48
|
+
C.locale("zh-cn");
|
|
49
|
+
break;
|
|
50
|
+
default:
|
|
51
|
+
C.locale("en");
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
return z(() => {
|
|
56
|
+
m(p());
|
|
57
|
+
}), f(() => p(), m, { deep: !0, immediate: !0 }), {
|
|
58
|
+
currentLocale: U
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
C.locale(p() === "zh-CN" ? "zh-cn" : "en");
|
|
62
|
+
const Se = ["src"], ye = ["src"], Le = /* @__PURE__ */ x({
|
|
63
|
+
__name: "App",
|
|
64
|
+
setup(m) {
|
|
65
|
+
const { businessId: t, token: n, country: a } = $(re()), { sessionUser: u, currentBusiness: i, currentCountry: d, registerSidebarComponent: l } = w(), { getRestaurantAndWarehouse: v, getBusinessSetting: g } = ae(), { getFeatureFlags: h } = ne(), { version: s } = $(ce()), { getSettings: j } = se(), { promptLoader: q } = le(), F = pe(), A = I(() => `https://portal-v1.feedmedev.cc/b/${t.value}/report/CLOSE_UP?showHeader=false&country=${a.value.toUpperCase()}&menuOption=business-report&token=${n.value}&v2=true&reportV5Button=true`), W = I(() => `https://report-v4.feedmedev.cc?businessId=${t.value}&country=${a.value}&token=${n.value}&reportV3Button=true`);
|
|
66
|
+
f(
|
|
67
|
+
[() => i.value, () => u.value, () => d.value],
|
|
68
|
+
() => {
|
|
69
|
+
var o, e;
|
|
70
|
+
i.value && u.value && d.value && (ue(a.value), t.value = ((o = i.value) == null ? void 0 : o.id) ?? "", n.value = ((e = u.value) == null ? void 0 : e.token) ?? "", a.value = d.value ?? "");
|
|
71
|
+
},
|
|
72
|
+
{ immediate: !0 }
|
|
73
|
+
);
|
|
74
|
+
function B(o) {
|
|
75
|
+
if (typeof o.data == "string")
|
|
76
|
+
try {
|
|
77
|
+
const e = JSON.parse(o.data);
|
|
78
|
+
(e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (n.value = e.token);
|
|
79
|
+
} catch (e) {
|
|
80
|
+
console.error(e);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function E(o) {
|
|
84
|
+
if (typeof o.data == "string")
|
|
85
|
+
try {
|
|
86
|
+
const e = JSON.parse(o.data);
|
|
87
|
+
(e == null ? void 0 : e.v5) === !0 ? s.value = _.value : (e == null ? void 0 : e.v3) === !0 && (s.value = "v3");
|
|
88
|
+
} catch (e) {
|
|
89
|
+
console.error(e);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
f(s, () => {
|
|
93
|
+
["v3", "v4"].includes(s.value) ? w().hideSidebarToggle(!0) : w().hideSidebarToggle(!1);
|
|
94
|
+
}), M(() => {
|
|
95
|
+
l(ve);
|
|
96
|
+
}), z(() => {
|
|
97
|
+
console.log("5.18.1-beta.0", !0), window.addEventListener("message", B), window.addEventListener("message", E);
|
|
98
|
+
});
|
|
99
|
+
const L = me(), N = fe();
|
|
100
|
+
ee(() => {
|
|
101
|
+
window.removeEventListener("message", B), window.removeEventListener("message", E), L.$dispose(), N.$dispose();
|
|
102
|
+
});
|
|
103
|
+
const { getReports: G, getOverviewReport: K, getReportConfig: R } = L, { getSchema: P } = de(), { fetchSchedules: H } = N, { init: Q } = ie(), _ = J("v5");
|
|
104
|
+
return f(
|
|
105
|
+
() => t.value,
|
|
106
|
+
() => {
|
|
107
|
+
t.value !== "" && q(async () => {
|
|
108
|
+
await Q({
|
|
109
|
+
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
110
|
+
url: "https://flag.feedme.farm/api/v1/",
|
|
111
|
+
enableAnalytics: !1,
|
|
112
|
+
cacheFlags: !1
|
|
113
|
+
});
|
|
114
|
+
const o = await R();
|
|
115
|
+
_.value = o.version, s.value = _.value, await Promise.all([
|
|
116
|
+
h(),
|
|
117
|
+
R(),
|
|
118
|
+
K(),
|
|
119
|
+
G(),
|
|
120
|
+
P(),
|
|
121
|
+
H(),
|
|
122
|
+
g(),
|
|
123
|
+
v(
|
|
124
|
+
F.query.locationIds ? JSON.parse(F.query.locationIds) : null
|
|
125
|
+
),
|
|
126
|
+
j()
|
|
127
|
+
]);
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
immediate: !0
|
|
132
|
+
}
|
|
133
|
+
), _e(), (o, e) => {
|
|
134
|
+
const X = b("router-view");
|
|
135
|
+
return c(), y(te, null, [
|
|
136
|
+
k(he),
|
|
137
|
+
r(s) === "v3" ? (c(), y("iframe", {
|
|
138
|
+
key: 0,
|
|
139
|
+
class: "bg-white h-full w-full",
|
|
140
|
+
src: A.value
|
|
141
|
+
}, null, 8, Se)) : r(s) === "v4" ? (c(), y("iframe", {
|
|
142
|
+
key: 1,
|
|
143
|
+
class: "bg-white h-full w-full",
|
|
144
|
+
src: W.value
|
|
145
|
+
}, null, 8, ye)) : (c(), T(X, { key: 2 }))
|
|
146
|
+
], 64);
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
export {
|
|
151
|
+
Le as default
|
|
152
|
+
};
|