@feedmepos/mf-report 5.7.6 → 5.8.0-beta.1
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-DJp01-Og.js +150 -0
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-Bi_BES93.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-g6ESEkM9.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-RIJC16Ui.js → Default.vue_vue_type_script_setup_true_lang-CRvS7Ex3.js} +10 -10
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-BVc7b2H4.js +1417 -0
- package/dist/{InsightView-DIhPKYKe.js → InsightView-Ba_em7GM.js} +6 -6
- package/dist/{Integration-D61lmDoO.js → Integration-7h1cJFLg.js} +3 -3
- package/dist/{Integrations-BiJVCGrp.js → Integrations-Dm7n-0iv.js} +3 -3
- package/dist/{Layout-DH7q-7AG.js → Layout-_u9uU4T9.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-nPHvtT2O.js → MenuTab.vue_vue_type_script_setup_true_lang-Bn3KCbjG.js} +3 -3
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CPTKq_OA.js → NavigationTab.vue_vue_type_script_setup_true_lang-DuOqx76g.js} +7074 -7041
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-CdFXBqlX.js → NoData.vue_vue_type_script_setup_true_lang-CAbykN6l.js} +1 -1
- package/dist/{OverviewView-Cp0quKsj.js → OverviewView-B_RWwK33.js} +5 -5
- package/dist/{Report-DSO3L0cw.js → Report-D6UGn8fH.js} +4 -4
- package/dist/ReportEditor-HDMGjShp.js +621 -0
- package/dist/{ReportView-CRKPSw3H.js → ReportView-CzhcGBn8.js} +7 -7
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-N2Lg1Vpt.js → SelectComponent.vue_vue_type_script_setup_true_lang-BEkJzB27.js} +1 -1
- package/dist/{Setting-Dd1O-wia.js → Setting-Bvzzqokm.js} +4 -4
- package/dist/{TileEditor-BLsGvreq.js → TileEditor-BNx2KgYJ.js} +8 -8
- package/dist/{TransitionFade-C7yNEw8X.js → TransitionFade-BR2i09Vy.js} +4 -4
- package/dist/app.js +29 -14
- package/dist/{global-loader-CbmVhJAK.js → global-loader-DKYDQRZx.js} +1175 -1204
- package/dist/{index-BWqDfeY6.js → index--mBthMxH.js} +1 -1
- package/dist/{report-schema-BnzKoFjx.js → report-schema-DDo0Dgd1.js} +1 -1
- package/dist/{v4-Cbq0RSpY.js → v4-CfR4tJai.js} +287 -281
- package/package.json +1 -1
- package/dist/App-BrW5SiDe.js +0 -152
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DokEr03U.js +0 -1390
- package/dist/ReportEditor-DPWD6PV0.js +0 -527
package/package.json
CHANGED
package/dist/App-BrW5SiDe.js
DELETED
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
import { defineComponent as O, resolveComponent as C, createBlock as T, openBlock as m, unref as r, isRef as Y, withCtx as w, createElementVNode as N, createVNode as $, toDisplayString as q, createTextVNode as Z, onMounted as j, watch as p, ref as z, computed as I, onBeforeMount as M, onBeforeUnmount as ee, createElementBlock as k, Fragment as te } from "vue";
|
|
2
|
-
import { detectLocale as g, useCoreStore as b } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as oe, d as F, a as re, b as ne, c as se, e as ae, f as le, g as ue } from "./global-loader-CbmVhJAK.js";
|
|
4
|
-
import { storeToRefs as B } from "pinia";
|
|
5
|
-
import { u as ie, a as ce } from "./v4-Cbq0RSpY.js";
|
|
6
|
-
import { u as me } from "./report-schema-BnzKoFjx.js";
|
|
7
|
-
import { _ as de, u as ve } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CPTKq_OA.js";
|
|
8
|
-
import { u as U } from "./message-dialog-UoMWOnil.js";
|
|
9
|
-
import { useRoute as fe } from "vue-router";
|
|
10
|
-
const pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, ge = /* @__PURE__ */ O({
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
setup(d) {
|
|
13
|
-
const { t } = oe(), n = U(), { isOpened: s, message: i, title: c } = B(U());
|
|
14
|
-
return (h, u) => {
|
|
15
|
-
const v = C("FmButton"), y = C("FmDialog");
|
|
16
|
-
return m(), T(y, {
|
|
17
|
-
modelValue: r(s),
|
|
18
|
-
"onUpdate:modelValue": u[0] || (u[0] = (_) => Y(s) ? s.value = _ : null),
|
|
19
|
-
overlay: "",
|
|
20
|
-
"close-button": !1
|
|
21
|
-
}, {
|
|
22
|
-
"dialog-header": w(() => [
|
|
23
|
-
Z(q(r(c)), 1)
|
|
24
|
-
]),
|
|
25
|
-
default: w(() => [
|
|
26
|
-
N("p", pe, q(r(i)), 1)
|
|
27
|
-
]),
|
|
28
|
-
"dialog-footer": w(() => [
|
|
29
|
-
u[1] || (u[1] = N("div", { class: "grow" }, null, -1)),
|
|
30
|
-
$(v, {
|
|
31
|
-
label: r(t)("report.common.cancel"),
|
|
32
|
-
variant: "tertiary",
|
|
33
|
-
onClick: r(n).dismiss
|
|
34
|
-
}, null, 8, ["label", "onClick"]),
|
|
35
|
-
$(v, {
|
|
36
|
-
label: r(t)("report.common.confirm"),
|
|
37
|
-
onClick: r(n).confirm
|
|
38
|
-
}, null, 8, ["label", "onClick"])
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 8, ["modelValue"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}), x = z(g());
|
|
45
|
-
function he() {
|
|
46
|
-
const d = (t) => {
|
|
47
|
-
switch (x.value = t, t) {
|
|
48
|
-
case "zh-CN":
|
|
49
|
-
F.locale("zh-cn");
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
F.locale("en");
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return j(() => {
|
|
57
|
-
d(g());
|
|
58
|
-
}), p(() => g(), d, { deep: !0, immediate: !0 }), {
|
|
59
|
-
currentLocale: x
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
F.locale(g() === "zh-CN" ? "zh-cn" : "en");
|
|
63
|
-
const ye = ["src"], _e = ["src"], Le = /* @__PURE__ */ O({
|
|
64
|
-
__name: "App",
|
|
65
|
-
setup(d) {
|
|
66
|
-
const { businessId: t, token: n, country: s } = B(re()), { sessionUser: i, currentBusiness: c, currentCountry: h, registerSidebarComponent: u } = b(), { getRestaurantAndWarehouse: v, getBusinessSetting: y } = ne(), { getFeatureFlags: _ } = se(), { version: a } = B(ie()), { getSettings: A } = ae(), l = fe(), { promptLoader: J } = le(), G = I(() => `https://portal-v1.feedme.cc/b/${t.value}/report/CLOSE_UP?showHeader=false&country=${s.value.toUpperCase()}&menuOption=business-report&token=${n.value}&v2=true&reportV5Button=true`), P = I(() => `https://report-v4.feedme.cc?businessId=${t.value}&country=${s.value}&token=${n.value}&reportV3Button=true`);
|
|
67
|
-
p(
|
|
68
|
-
// if route query pass in the detail we switch accordingly
|
|
69
|
-
[() => l.query, () => c.value, () => i.value],
|
|
70
|
-
() => {
|
|
71
|
-
var o, e, f;
|
|
72
|
-
l.query.token && l.query.businessId && l.query.country ? (t.value = l.query.businessId, n.value = l.query.token, s.value = l.query.country) : ((o = c.value) != null && o.id && (t.value = c.value.id), (e = i.value) != null && e.token && (n.value = (f = i.value) == null ? void 0 : f.token), h.value && (s.value = h.value));
|
|
73
|
-
},
|
|
74
|
-
{ immediate: !0 }
|
|
75
|
-
);
|
|
76
|
-
function R(o) {
|
|
77
|
-
if (typeof o.data == "string")
|
|
78
|
-
try {
|
|
79
|
-
const e = JSON.parse(o.data);
|
|
80
|
-
(e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (n.value = e.token);
|
|
81
|
-
} catch (e) {
|
|
82
|
-
console.error(e);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function L(o) {
|
|
86
|
-
if (typeof o.data == "string")
|
|
87
|
-
try {
|
|
88
|
-
const e = JSON.parse(o.data);
|
|
89
|
-
(e == null ? void 0 : e.v5) === !0 ? a.value = S.value : (e == null ? void 0 : e.v3) === !0 && (a.value = "v3");
|
|
90
|
-
} catch (e) {
|
|
91
|
-
console.error(e);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
p(a, () => {
|
|
95
|
-
["v3", "v4"].includes(a.value) ? b().hideSidebarToggle(!0) : b().hideSidebarToggle(!1);
|
|
96
|
-
}), M(() => {
|
|
97
|
-
u(de);
|
|
98
|
-
}), j(() => {
|
|
99
|
-
console.log("5.7.6", !0), window.addEventListener("message", R), window.addEventListener("message", L);
|
|
100
|
-
});
|
|
101
|
-
const V = ce(), D = ve();
|
|
102
|
-
ee(() => {
|
|
103
|
-
window.removeEventListener("message", R), window.removeEventListener("message", L), V.$dispose(), D.$dispose();
|
|
104
|
-
});
|
|
105
|
-
const { getReports: H, getOverviewReport: K, getReportConfig: E } = V, { getSchema: Q } = me(), { fetchSchedules: W } = D, { init: X } = ue(), S = z("v5");
|
|
106
|
-
return p(
|
|
107
|
-
() => t.value,
|
|
108
|
-
() => {
|
|
109
|
-
t.value !== "" && J(async () => {
|
|
110
|
-
await X({
|
|
111
|
-
apiKey: "6GhcttsJ9Rj9cTevcdrpin",
|
|
112
|
-
url: "https://flag.feedme.farm/api/v1/",
|
|
113
|
-
enableAnalytics: !1,
|
|
114
|
-
cacheFlags: !1
|
|
115
|
-
});
|
|
116
|
-
const o = await E();
|
|
117
|
-
S.value = o.version, a.value = S.value, await Promise.all([
|
|
118
|
-
_(),
|
|
119
|
-
E(),
|
|
120
|
-
K(),
|
|
121
|
-
H(),
|
|
122
|
-
Q(),
|
|
123
|
-
W(),
|
|
124
|
-
y(),
|
|
125
|
-
v(),
|
|
126
|
-
A()
|
|
127
|
-
]);
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
immediate: !0
|
|
132
|
-
}
|
|
133
|
-
), he(), (o, e) => {
|
|
134
|
-
const f = C("router-view");
|
|
135
|
-
return m(), k(te, null, [
|
|
136
|
-
$(ge),
|
|
137
|
-
r(a) === "v3" ? (m(), k("iframe", {
|
|
138
|
-
key: 0,
|
|
139
|
-
class: "bg-white h-full w-full",
|
|
140
|
-
src: G.value
|
|
141
|
-
}, null, 8, ye)) : r(a) === "v4" ? (m(), k("iframe", {
|
|
142
|
-
key: 1,
|
|
143
|
-
class: "bg-white h-full w-full",
|
|
144
|
-
src: P.value
|
|
145
|
-
}, null, 8, _e)) : (m(), T(f, { key: 2 }))
|
|
146
|
-
], 64);
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
export {
|
|
151
|
-
Le as default
|
|
152
|
-
};
|