@feedmepos/mf-report 5.18.2-beta.5 → 5.18.2-beta.7
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-BUVxeHtS.js +226 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-DLAmjLpT.js → BaseDialog.vue_vue_type_script_setup_true_lang-CosfLSAK.js} +206 -205
- package/dist/{Default.vue_vue_type_script_setup_true_lang-az465cWp.js → Default.vue_vue_type_script_setup_true_lang-B8mqpG-f.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-Cg9Q0Alk.js → DynamicWidget.vue_vue_type_script_setup_true_lang-D1AmPGmI.js} +1 -1
- package/dist/{InsightView-C580gT_F.js → InsightView-2B4zxc6S.js} +2 -2
- package/dist/{Layout-Cg6B3_PB.js → Layout-DH5761CT.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-mevBIWGb.js → MenuTab.vue_vue_type_script_setup_true_lang-103BmSWV.js} +2 -2
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CbS3wT-Z.js → NavigationTab.vue_vue_type_script_setup_true_lang-BOYdr23L.js} +1 -1
- package/dist/{OverviewView-DPlvHfbM.js → OverviewView-DWhYeQ5V.js} +4 -4
- package/dist/{Report-CYFbRFXI.js → Report-DMCHIIqx.js} +106 -106
- package/dist/{ReportEditor-CDdWFzYL.js → ReportEditor-WH2wUATq.js} +3 -3
- package/dist/{ReportView-vZTFkb70.js → ReportView-Cu2AUgIO.js} +5 -5
- package/dist/{Setting-B31bz7Ok.js → Setting-DL_36mI4.js} +2 -2
- package/dist/{TileEditor-C_hRfM-H.js → TileEditor-BKO4E-sg.js} +3 -3
- package/dist/{TransitionFade-K0ZfP5kz.js → TransitionFade--t2l2y8W.js} +2 -2
- package/dist/app.js +9 -9
- package/package.json +1 -1
- package/dist/App-0zRta0Xy.js +0 -223
|
@@ -3,9 +3,9 @@ import { u as Pt, f as An, p as Nn, d as ht, h as Pn } from "./vue-i18n-Cjs2Btd-
|
|
|
3
3
|
import { useCoreStore as Vn } from "@feedmepos/mf-common";
|
|
4
4
|
import { storeToRefs as Mn } from "pinia";
|
|
5
5
|
import { useRoute as Ln } from "vue-router";
|
|
6
|
-
import { W as L, D as Ze, c as z, C as de, _ as Bn } from "./BaseDialog.vue_vue_type_script_setup_true_lang-
|
|
6
|
+
import { W as L, D as Ze, c as z, C as de, _ as Bn } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CosfLSAK.js";
|
|
7
7
|
import { a as Vt, _ as Yt } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CoMcbMHU.js";
|
|
8
|
-
import { R as $n } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { R as $n } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-D1AmPGmI.js";
|
|
9
9
|
import { useSnackbar as Rn } from "@feedmepos/ui-library";
|
|
10
10
|
import { a as Yn } from "./helper-DDO1q72b.js";
|
|
11
11
|
const Wn = {
|
package/dist/app.js
CHANGED
|
@@ -4964,41 +4964,41 @@ const a = {
|
|
|
4964
4964
|
path: "/overview",
|
|
4965
4965
|
alias: ["/"],
|
|
4966
4966
|
name: "overview",
|
|
4967
|
-
component: () => import("./OverviewView-
|
|
4967
|
+
component: () => import("./OverviewView-DWhYeQ5V.js")
|
|
4968
4968
|
},
|
|
4969
4969
|
{
|
|
4970
4970
|
path: "/report",
|
|
4971
4971
|
name: "reports",
|
|
4972
|
-
component: () => import("./Report-
|
|
4972
|
+
component: () => import("./Report-DMCHIIqx.js")
|
|
4973
4973
|
},
|
|
4974
4974
|
{
|
|
4975
4975
|
path: "/insights",
|
|
4976
4976
|
name: "insights",
|
|
4977
|
-
component: () => import("./InsightView-
|
|
4977
|
+
component: () => import("./InsightView-2B4zxc6S.js")
|
|
4978
4978
|
},
|
|
4979
4979
|
{
|
|
4980
4980
|
path: "/report-view",
|
|
4981
4981
|
name: "reportView",
|
|
4982
|
-
component: () => import("./ReportView-
|
|
4982
|
+
component: () => import("./ReportView-Cu2AUgIO.js")
|
|
4983
4983
|
},
|
|
4984
4984
|
{
|
|
4985
4985
|
path: "/report-editor",
|
|
4986
4986
|
name: "reportEditor",
|
|
4987
|
-
component: () => import("./ReportEditor-
|
|
4987
|
+
component: () => import("./ReportEditor-WH2wUATq.js")
|
|
4988
4988
|
},
|
|
4989
4989
|
{
|
|
4990
4990
|
path: "/report-editor/tile-editor",
|
|
4991
4991
|
name: "tileEditor",
|
|
4992
|
-
component: () => import("./TileEditor-
|
|
4992
|
+
component: () => import("./TileEditor-BKO4E-sg.js")
|
|
4993
4993
|
},
|
|
4994
4994
|
{
|
|
4995
4995
|
path: "/setting",
|
|
4996
4996
|
name: "setting",
|
|
4997
|
-
component: () => import("./Setting-
|
|
4997
|
+
component: () => import("./Setting-DL_36mI4.js")
|
|
4998
4998
|
},
|
|
4999
4999
|
{
|
|
5000
5000
|
path: "/integration",
|
|
5001
|
-
component: () => import("./Layout-
|
|
5001
|
+
component: () => import("./Layout-DH5761CT.js"),
|
|
5002
5002
|
children: [
|
|
5003
5003
|
{
|
|
5004
5004
|
name: "integrations",
|
|
@@ -5032,7 +5032,7 @@ const u = {
|
|
|
5032
5032
|
"zh-CN": m,
|
|
5033
5033
|
"th-TH": c,
|
|
5034
5034
|
"zh-Hant": p
|
|
5035
|
-
}, h = e(() => import("./App-
|
|
5035
|
+
}, h = e(() => import("./App-BUVxeHtS.js"));
|
|
5036
5036
|
export {
|
|
5037
5037
|
h as FmApp,
|
|
5038
5038
|
u as i18nMessages,
|
package/package.json
CHANGED
package/dist/App-0zRta0Xy.js
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
import { defineComponent as X, resolveComponent as B, createBlock as Y, openBlock as I, unref as u, isRef as fe, withCtx as F, createElementVNode as V, createVNode as x, toDisplayString as W, createTextVNode as pe, onMounted as Z, watch as h, ref as A, computed as G, onBeforeMount as ge, onBeforeUnmount as ye, createElementBlock as $, Fragment as ve } from "vue";
|
|
2
|
-
import { detectLocale as C, useCoreStore as J } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as Se, d as i, a as De, b as K, c as Ie, e as he, f as Re, s as qe, g as Oe } from "./vue-i18n-Cjs2Btd-.js";
|
|
4
|
-
import { storeToRefs as b } from "pinia";
|
|
5
|
-
import { u as _e, a as Le, b as we } from "./BaseDialog.vue_vue_type_script_setup_true_lang-DLAmjLpT.js";
|
|
6
|
-
import { _ as be, u as Ce } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CbS3wT-Z.js";
|
|
7
|
-
import { u as P } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { useRoute as Ee, useRouter as ke } from "vue-router";
|
|
9
|
-
const Ne = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Fe = /* @__PURE__ */ X({
|
|
10
|
-
__name: "Dialog",
|
|
11
|
-
setup(R) {
|
|
12
|
-
const { t: o } = Se(), f = P(), { isOpened: c, message: v, title: S } = b(P());
|
|
13
|
-
return (q, g) => {
|
|
14
|
-
const O = B("FmButton"), E = B("FmDialog");
|
|
15
|
-
return I(), Y(E, {
|
|
16
|
-
modelValue: u(c),
|
|
17
|
-
"onUpdate:modelValue": g[0] || (g[0] = (k) => fe(c) ? c.value = k : null),
|
|
18
|
-
overlay: "",
|
|
19
|
-
"close-button": !1
|
|
20
|
-
}, {
|
|
21
|
-
"dialog-header": F(() => [
|
|
22
|
-
pe(W(u(S)), 1)
|
|
23
|
-
]),
|
|
24
|
-
default: F(() => [
|
|
25
|
-
V("p", Ne, W(u(v)), 1)
|
|
26
|
-
]),
|
|
27
|
-
"dialog-footer": F(() => [
|
|
28
|
-
g[1] || (g[1] = V("div", { class: "grow" }, null, -1)),
|
|
29
|
-
x(O, {
|
|
30
|
-
label: u(o)("report.common.cancel"),
|
|
31
|
-
variant: "tertiary",
|
|
32
|
-
onClick: u(f).dismiss
|
|
33
|
-
}, null, 8, ["label", "onClick"]),
|
|
34
|
-
x(O, {
|
|
35
|
-
label: u(o)("report.common.confirm"),
|
|
36
|
-
onClick: u(f).confirm
|
|
37
|
-
}, null, 8, ["label", "onClick"])
|
|
38
|
-
]),
|
|
39
|
-
_: 1
|
|
40
|
-
}, 8, ["modelValue"]);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}), H = A(C());
|
|
44
|
-
function $e() {
|
|
45
|
-
const R = (o) => {
|
|
46
|
-
switch (H.value = o, o) {
|
|
47
|
-
case "zh-CN":
|
|
48
|
-
i.locale("zh-cn");
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
i.locale("en");
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
return Z(() => {
|
|
56
|
-
R(C());
|
|
57
|
-
}), h(() => C(), R, { deep: !0, immediate: !0 }), {
|
|
58
|
-
currentLocale: H
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
i.locale(C() === "zh-CN" ? "zh-cn" : "en");
|
|
62
|
-
const Je = ["src"], Be = ["src"], Ke = /* @__PURE__ */ X({
|
|
63
|
-
__name: "App",
|
|
64
|
-
setup(R) {
|
|
65
|
-
const { businessId: o, token: f, country: c } = b(De()), { sessionUser: v, currentBusiness: S, currentCountry: q, registerSidebarComponent: g } = J(), { getRestaurantAndWarehouse: O, getBusinessSetting: E } = K(), { getFeatureFlags: k } = Ie(), { version: p } = b(_e()), { getSettings: M } = he(), { promptLoader: ee } = Re(), e = Ee(), T = ke(), te = G(() => `https://portal-v1.feedmedev.cc/b/${o.value}/report/CLOSE_UP?showHeader=false&country=${c.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), ae = G(() => `https://report-v4.feedmedev.cc?businessId=${o.value}&country=${c.value}&token=${f.value}&reportV3Button=true`);
|
|
66
|
-
h(
|
|
67
|
-
[() => S.value, () => v.value, () => q.value],
|
|
68
|
-
() => {
|
|
69
|
-
var t, r;
|
|
70
|
-
const a = ((t = S.value) == null ? void 0 : t.id) ?? "";
|
|
71
|
-
S.value && v.value && q.value && (qe(c.value), o.value !== a && (o.value = a), f.value = ((r = v.value) == null ? void 0 : r.token) ?? "", c.value = q.value ?? "", e.query.businessId !== o.value && T.replace({
|
|
72
|
-
name: e.name,
|
|
73
|
-
params: e.params,
|
|
74
|
-
query: { ...e.query, businessId: o.value }
|
|
75
|
-
}));
|
|
76
|
-
},
|
|
77
|
-
{ immediate: !0 }
|
|
78
|
-
);
|
|
79
|
-
function U(a) {
|
|
80
|
-
if (typeof a.data == "string")
|
|
81
|
-
try {
|
|
82
|
-
const t = JSON.parse(a.data);
|
|
83
|
-
(t == null ? void 0 : t.token) !== "" && (t == null ? void 0 : t.token) !== void 0 && (f.value = t.token);
|
|
84
|
-
} catch (t) {
|
|
85
|
-
console.error(t);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function z(a) {
|
|
89
|
-
if (typeof a.data == "string")
|
|
90
|
-
try {
|
|
91
|
-
const t = JSON.parse(a.data);
|
|
92
|
-
(t == null ? void 0 : t.v5) === !0 ? p.value = N.value : (t == null ? void 0 : t.v3) === !0 && (p.value = "v3");
|
|
93
|
-
} catch (t) {
|
|
94
|
-
console.error(t);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
h(p, () => {
|
|
98
|
-
["v3", "v4"].includes(p.value) ? J().hideSidebarToggle(!0) : J().hideSidebarToggle(!1);
|
|
99
|
-
}), ge(() => {
|
|
100
|
-
g(be);
|
|
101
|
-
}), Z(() => {
|
|
102
|
-
console.log("5.18.2-beta.5", !0), window.addEventListener("message", U), window.addEventListener("message", z);
|
|
103
|
-
});
|
|
104
|
-
const D = Le(), Q = Ce(), n = K();
|
|
105
|
-
ye(() => {
|
|
106
|
-
window.removeEventListener("message", U), window.removeEventListener("message", z), D.$dispose(), Q.$dispose();
|
|
107
|
-
});
|
|
108
|
-
const { getReports: ne, getOverviewReport: re, getReportConfig: j, currentReportId: oe } = D, { currentReportId: se } = b(D), { getSchema: ie } = we(), { fetchSchedules: ue } = Q, { init: ce } = Oe(), N = A("v5"), _ = A(!1);
|
|
109
|
-
function le() {
|
|
110
|
-
const a = e.query.startDate ? i(e.query.startDate).startOf("day").toISOString() : void 0, t = e.query.endDate ? i(e.query.endDate).endOf("day").toISOString() : void 0, r = e.query.timeStart ? JSON.parse(e.query.timeStart) : void 0, l = e.query.timeEnd ? JSON.parse(e.query.timeEnd) : void 0, d = e.query.compareStartDate ? i(e.query.compareStartDate).startOf("day").toISOString() : void 0, y = e.query.compareEndDate ? i(e.query.compareEndDate).endOf("day").toISOString() : void 0, L = e.query.isAllLocation === "true";
|
|
111
|
-
let m = [];
|
|
112
|
-
L ? m = n.selectedLocationIds : m = e.query.locationIds ? JSON.parse(e.query.locationIds) : void 0;
|
|
113
|
-
const w = e.query.reportId || oe;
|
|
114
|
-
if (w && w !== D.currentReportId && D.updateCurrentReportId(w), a || t) {
|
|
115
|
-
const s = n.dateRange;
|
|
116
|
-
(s.startDate !== a || s.endDate !== t) && n.setDateRange({ startDate: a, endDate: t });
|
|
117
|
-
}
|
|
118
|
-
if (r || l) {
|
|
119
|
-
const s = n.timeRange;
|
|
120
|
-
(s.start !== r || s.end !== l) && n.setTimeRange({ start: r, end: l });
|
|
121
|
-
}
|
|
122
|
-
if (d || y) {
|
|
123
|
-
const s = n.compareDateRange;
|
|
124
|
-
(s.startDate !== d || s.endDate !== y) && n.setCompareDateRange({
|
|
125
|
-
startDate: d,
|
|
126
|
-
endDate: y
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
|
-
if (!L && Array.isArray(m)) {
|
|
130
|
-
const s = n.selectedLocationIds;
|
|
131
|
-
s.length === m.length && s.every((de, me) => de === m[me]) || n.setSelectedLocationIds(m);
|
|
132
|
-
}
|
|
133
|
-
return {
|
|
134
|
-
// TODO: this returned value can used for getBusinessSetting
|
|
135
|
-
reportId: w,
|
|
136
|
-
startDate: e.query.startDate,
|
|
137
|
-
endDate: e.query.endDate,
|
|
138
|
-
timeStart: e.query.timeStart,
|
|
139
|
-
timeEnd: e.query.timeEnd,
|
|
140
|
-
compareStartDate: e.query.compareStartDate,
|
|
141
|
-
compareEndDate: e.query.compareEndDate,
|
|
142
|
-
locationIds: e.query.locationIds,
|
|
143
|
-
isAllLocation: e.query.isAllLocation
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
return h(
|
|
147
|
-
() => o.value,
|
|
148
|
-
async (a, t) => {
|
|
149
|
-
a !== "" && (_.value = !1, await ee(async () => {
|
|
150
|
-
await ce({
|
|
151
|
-
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
152
|
-
url: "https://flag.feedme.farm/api/v1/",
|
|
153
|
-
enableAnalytics: !1,
|
|
154
|
-
cacheFlags: !1
|
|
155
|
-
});
|
|
156
|
-
const r = await j();
|
|
157
|
-
N.value = r.version, p.value = N.value, await Promise.all([
|
|
158
|
-
k(),
|
|
159
|
-
j(),
|
|
160
|
-
re(),
|
|
161
|
-
ne(),
|
|
162
|
-
ie(),
|
|
163
|
-
ue(),
|
|
164
|
-
O(
|
|
165
|
-
e.query.locationIds ? JSON.parse(e.query.locationIds) : null
|
|
166
|
-
),
|
|
167
|
-
M()
|
|
168
|
-
]), await E(), (!t || t == a) && le();
|
|
169
|
-
}), _.value = !0);
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
immediate: !0
|
|
173
|
-
}
|
|
174
|
-
), h(
|
|
175
|
-
() => (_.value, {
|
|
176
|
-
reportId: se.value,
|
|
177
|
-
selectedLocationIds: n.selectedLocationIds,
|
|
178
|
-
dateRange: n.dateRange,
|
|
179
|
-
timeRange: n.timeRange,
|
|
180
|
-
compareDateRange: n.compareDateRange
|
|
181
|
-
}),
|
|
182
|
-
(a) => {
|
|
183
|
-
if (!_.value || !a.reportId) return;
|
|
184
|
-
console.log("loaded.."), console.log(a);
|
|
185
|
-
const t = a.selectedLocationIds, r = a.dateRange, l = a.timeRange, d = a.compareDateRange, y = {
|
|
186
|
-
...e.query,
|
|
187
|
-
reportId: a.reportId,
|
|
188
|
-
startDate: r.startDate ? i(r.startDate).startOf("day").toISOString() : void 0,
|
|
189
|
-
endDate: r.endDate ? i(r.endDate).endOf("day").toISOString() : void 0,
|
|
190
|
-
compareStartDate: d.startDate ? i(d.startDate).startOf("day").toISOString() : void 0,
|
|
191
|
-
compareEndDate: d.endDate ? i(d.endDate).endOf("day").toISOString() : void 0,
|
|
192
|
-
timeStart: l.start ? JSON.stringify(l.start) : void 0,
|
|
193
|
-
timeEnd: l.end ? JSON.stringify(l.end) : void 0,
|
|
194
|
-
locationIds: t.length === n.locations.length ? null : t.length > 0 ? JSON.stringify(t) : void 0,
|
|
195
|
-
isAllLocation: String(t.length === n.locations.length)
|
|
196
|
-
}, L = JSON.stringify(e.query), m = JSON.stringify(y);
|
|
197
|
-
L !== m && T.replace({
|
|
198
|
-
name: e.name,
|
|
199
|
-
params: e.params,
|
|
200
|
-
query: y
|
|
201
|
-
});
|
|
202
|
-
},
|
|
203
|
-
{ deep: !0 }
|
|
204
|
-
), $e(), (a, t) => {
|
|
205
|
-
const r = B("router-view");
|
|
206
|
-
return I(), $(ve, null, [
|
|
207
|
-
x(Fe),
|
|
208
|
-
u(p) === "v3" ? (I(), $("iframe", {
|
|
209
|
-
key: 0,
|
|
210
|
-
class: "bg-white h-full w-full",
|
|
211
|
-
src: te.value
|
|
212
|
-
}, null, 8, Je)) : u(p) === "v4" ? (I(), $("iframe", {
|
|
213
|
-
key: 1,
|
|
214
|
-
class: "bg-white h-full w-full",
|
|
215
|
-
src: ae.value
|
|
216
|
-
}, null, 8, Be)) : (I(), Y(r, { key: 2 }))
|
|
217
|
-
], 64);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
export {
|
|
222
|
-
Ke as default
|
|
223
|
-
};
|