@feedmepos/mf-report 5.27.54 → 5.28.0-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-C6xpf-Q0.js → App-D_Cnt2_w.js} +69 -68
- package/dist/DateRangeSelect-B6QocR7V.js +437 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BwPZXC_d.js → Default.vue_vue_type_script_setup_true_lang-CjkYcdoD.js} +12 -11
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BpgXiPBY.js → DynamicWidget.vue_vue_type_script_setup_true_lang-DYxl_gjE.js} +182 -181
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CVShUWJC.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-5p7KJx1m.js} +5090 -5716
- package/dist/{InsightView-BYW66Wrv.js → InsightView-oBqB-x6Y.js} +17 -15
- package/dist/{Integration-DQPJBE-0.js → Integration-D83_ENwH.js} +27 -25
- package/dist/{Integrations-BW4H9lUS.js → Integrations-Dd-jSloN.js} +8 -7
- package/dist/{Layout-CMlh08aB.js → Layout-PVmjJ6ga.js} +1 -1
- package/dist/LocationSelect.vue_vue_type_script_setup_true_lang-PQKRv81p.js +8055 -0
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BUvD1_b0.js → MenuTab.vue_vue_type_script_setup_true_lang-Cnwj0lIB.js} +11 -10
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-TpeQ_Wm1.js → NavigationTab.vue_vue_type_script_setup_true_lang-B2IXNXS_.js} +9636 -17677
- package/dist/{OverviewView-BtGpQkBY.js → OverviewView-CAL_PAkw.js} +5 -5
- package/dist/{Report-CJ9myNLK.js → Report-C4tRHS9j.js} +27 -25
- package/dist/ReportCanvasView-BB90EGgP.js +448 -0
- package/dist/{ReportEditor-DtnTBbY1.js → ReportEditor-BHlH0__b.js} +30 -28
- package/dist/{ReportView-Ci8nFyI9.js → ReportView-C37-Wgwc.js} +14 -13
- package/dist/ReportViewRoute-C1haW0-x.js +18 -0
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Ckn2p74A.js → SelectComponent.vue_vue_type_script_setup_true_lang-DW7Dk7iQ.js} +1 -1
- package/dist/{Setting-QSiMSAQk.js → Setting-c66iFXKP.js} +5 -5
- package/dist/{Template-CAPlAQO9.js → Template-B05_6Klr.js} +10 -9
- package/dist/{TileEditor-e7ZCWMU9.js → TileEditor-C-HBoB-E.js} +19 -17
- package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-B4g3YPzM.js → TilePageStack.vue_vue_type_script_setup_true_lang-DWdOrA-P.js} +3 -3
- package/dist/{TransitionFade-DqIazHHG.js → TransitionFade-oszzTdeW.js} +36 -33
- package/dist/{_plugin-vue_export-helper-kkiiQoKl.js → _plugin-vue_export-helper-C6QDExPN.js} +276 -291
- package/dist/{app-BAgs-zHf.js → app-CSF-ZDAa.js} +670 -567
- package/dist/app.js +1 -1
- package/dist/global-loader-BuxFfehu.js +19 -0
- package/dist/index-CtZE4sab.js +82 -0
- package/dist/report-BKfrG5Ry.js +635 -0
- package/dist/report-canvas-frame.html +888 -0
- package/dist/report-canvas-libs/chart.js-4.js +14 -0
- package/dist/report-canvas-libs/fm-ui-1.js +904 -0
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-ChYMJfXG.js → useRestaurantPermission-BgWDPmEl.js} +4 -4
- package/package.json +1 -1
- package/dist/DateRangeSelect-DYVOvSCA.js +0 -517
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import { defineComponent as me, resolveComponent as
|
|
2
|
-
import { detectLocale as j, useCoreStore as
|
|
3
|
-
import { d as q, u as Qe, a as ie, b as Ue, c as ce, e as je, f as
|
|
1
|
+
import { defineComponent as me, resolveComponent as V, createBlock as pe, openBlock as A, unref as u, isRef as Be, withCtx as G, createElementVNode as oe, createVNode as Y, toDisplayString as ae, createTextVNode as Fe, onMounted as fe, watch as C, ref as U, computed as se, onBeforeMount as $e, onBeforeUnmount as xe, createElementBlock as H, Fragment as Je } from "vue";
|
|
2
|
+
import { detectLocale as j, useCoreStore as X } from "@feedmepos/mf-common";
|
|
3
|
+
import { d as q, u as Qe, a as ie, b as Ue, c as ce, e as je, f as We, g as de } from "./app-CSF-ZDAa.js";
|
|
4
4
|
import { storeToRefs as k } from "pinia";
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
5
|
+
import { u as Ke } from "./global-loader-BuxFfehu.js";
|
|
6
|
+
import { u as Pe, a as Ge } from "./report-BKfrG5Ry.js";
|
|
7
|
+
import { u as He, _ as Xe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-B2IXNXS_.js";
|
|
8
8
|
import { u as ue } from "./message-dialog-UoMWOnil.js";
|
|
9
|
+
import { u as Ve } from "./_plugin-vue_export-helper-C6QDExPN.js";
|
|
9
10
|
import { useRoute as Ye, useRouter as Ze } from "vue-router";
|
|
10
11
|
const Me = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, et = /* @__PURE__ */ me({
|
|
11
12
|
__name: "Dialog",
|
|
12
13
|
setup(T) {
|
|
13
|
-
const { t: c } =
|
|
14
|
+
const { t: c } = Ve(), f = ue(), { isOpened: g, message: R, title: L } = k(ue());
|
|
14
15
|
return (O, _) => {
|
|
15
|
-
const z =
|
|
16
|
-
return A(), pe(
|
|
16
|
+
const z = V("FmButton"), W = V("FmDialog");
|
|
17
|
+
return A(), pe(W, {
|
|
17
18
|
modelValue: u(g),
|
|
18
|
-
"onUpdate:modelValue": _[0] || (_[0] = (
|
|
19
|
+
"onUpdate:modelValue": _[0] || (_[0] = (K) => Be(g) ? g.value = K : null),
|
|
19
20
|
overlay: "",
|
|
20
21
|
"close-button": !1,
|
|
21
22
|
"z-index": 3e3
|
|
22
23
|
}, {
|
|
23
|
-
"dialog-header":
|
|
24
|
-
|
|
24
|
+
"dialog-header": G(() => [
|
|
25
|
+
Fe(ae(u(L)), 1)
|
|
25
26
|
]),
|
|
26
|
-
default:
|
|
27
|
-
|
|
27
|
+
default: G(() => [
|
|
28
|
+
oe("p", Me, ae(u(R)), 1)
|
|
28
29
|
]),
|
|
29
|
-
"dialog-footer":
|
|
30
|
-
_[1] || (_[1] =
|
|
30
|
+
"dialog-footer": G(() => [
|
|
31
|
+
_[1] || (_[1] = oe("div", { class: "grow" }, null, -1)),
|
|
31
32
|
Y(z, {
|
|
32
33
|
label: u(c)("report.common.cancel"),
|
|
33
34
|
variant: "tertiary",
|
|
@@ -61,16 +62,16 @@ function tt() {
|
|
|
61
62
|
};
|
|
62
63
|
}
|
|
63
64
|
q.locale(j() === "zh-CN" ? "zh-cn" : "en");
|
|
64
|
-
const nt = ["src"], rt = ["src"],
|
|
65
|
+
const nt = ["src"], rt = ["src"], gt = /* @__PURE__ */ me({
|
|
65
66
|
__name: "App",
|
|
66
67
|
setup(T) {
|
|
67
|
-
const { businessId: c, token: f, country: g } = k(Qe()), { sessionUser: R, currentBusiness: L, currentCountry: O, registerSidebarComponent: _ } =
|
|
68
|
+
const { businessId: c, token: f, country: g } = k(Qe()), { sessionUser: R, currentBusiness: L, currentCountry: O, registerSidebarComponent: _ } = X(), {
|
|
68
69
|
getRestaurantAndWarehouse: z,
|
|
69
|
-
getBusinessSetting:
|
|
70
|
-
beginBusinessLoad:
|
|
70
|
+
getBusinessSetting: W,
|
|
71
|
+
beginBusinessLoad: K,
|
|
71
72
|
completeBusinessLoad: ge,
|
|
72
73
|
resetTimezoneContext: ye
|
|
73
|
-
} = ie(), ve = Ue(), { getFeatureFlags: Se } = ve, { version: y } = k(ce()), { getSettings: De } = je(), { promptLoader: he } = Ke(), n = Ye(),
|
|
74
|
+
} = ie(), ve = Ue(), { getFeatureFlags: Se } = ve, { version: y } = k(ce()), { getSettings: De } = je(), { promptLoader: he } = Ke(), n = Ye(), N = Ze(), E = Pe(), Z = He(), a = ie(), B = ce(), { suppressReportRouteSync: F } = k(B), { getReports: Ie, getOverviewReport: _e, getReportConfig: Re, currentReportId: M } = E, { currentReportId: Le, reports: Ee } = k(E), { getSchema: be } = Ge(), { fetchSchedules: we } = Z, { init: Ae } = We(), P = U("v5"), $ = U(!1), x = U(!0), Ce = se(() => `https://portal-v1.feedmedev.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), ke = se(() => `https://report-v4.feedmedev.cc?businessId=${c.value}&country=${g.value}&token=${f.value}&reportV3Button=true`);
|
|
74
75
|
C(
|
|
75
76
|
[() => L.value, () => R.value, () => O.value],
|
|
76
77
|
() => {
|
|
@@ -93,17 +94,17 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
93
94
|
if (typeof t.data == "string")
|
|
94
95
|
try {
|
|
95
96
|
const e = JSON.parse(t.data);
|
|
96
|
-
(e == null ? void 0 : e.v5) === !0 ? y.value =
|
|
97
|
+
(e == null ? void 0 : e.v5) === !0 ? y.value = P.value : (e == null ? void 0 : e.v3) === !0 && (y.value = "v3");
|
|
97
98
|
} catch (e) {
|
|
98
99
|
console.error(e);
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
C(y, () => {
|
|
102
|
-
["v3", "v4"].includes(y.value) ?
|
|
103
|
+
["v3", "v4"].includes(y.value) ? X().hideSidebarToggle(!0) : X().hideSidebarToggle(!1);
|
|
103
104
|
}), $e(() => {
|
|
104
105
|
_(Xe);
|
|
105
106
|
}), fe(() => {
|
|
106
|
-
console.log("5.
|
|
107
|
+
console.log("5.28.0-beta.0", !0), window.addEventListener("message", ee), window.addEventListener("message", te);
|
|
107
108
|
}), xe(() => {
|
|
108
109
|
window.removeEventListener("message", ee), window.removeEventListener("message", te), E.$dispose(), Z.$dispose();
|
|
109
110
|
});
|
|
@@ -119,14 +120,14 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
119
120
|
const e = t.includes("%") ? [t, qe(t)] : [t];
|
|
120
121
|
for (const r of e)
|
|
121
122
|
try {
|
|
122
|
-
const
|
|
123
|
-
if (typeof
|
|
123
|
+
const o = JSON.parse(r);
|
|
124
|
+
if (typeof o == "string")
|
|
124
125
|
try {
|
|
125
|
-
return JSON.parse(
|
|
126
|
+
return JSON.parse(o);
|
|
126
127
|
} catch {
|
|
127
|
-
return
|
|
128
|
+
return o;
|
|
128
129
|
}
|
|
129
|
-
return
|
|
130
|
+
return o;
|
|
130
131
|
} catch {
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -137,37 +138,37 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
137
138
|
}
|
|
138
139
|
function l(t, e, r) {
|
|
139
140
|
if (typeof t != "string" || t.length === 0) return;
|
|
140
|
-
const
|
|
141
|
-
return (e === "start" ?
|
|
141
|
+
const o = t.includes("T") ? q(t).tz(r) : q.tz(t, r);
|
|
142
|
+
return (e === "start" ? o.startOf("day") : o.endOf("day")).utc().toISOString();
|
|
142
143
|
}
|
|
143
144
|
function Te(t = n.query) {
|
|
144
|
-
const e = t, r =
|
|
145
|
+
const e = t, r = a.timezone, o = l(e.startDate, "start", r), d = l(e.endDate, "end", r), i = typeof e.timeStart == "string", v = typeof e.timeEnd == "string", S = J(e.timeStart), D = J(e.timeEnd), b = ne(S) ? S : null, h = ne(D) ? D : null, m = l(e.compareStartDate, "start", r), w = l(e.compareEndDate, "end", r), Q = e.isAllLocation === "true" || e.isAllLocation === void 0;
|
|
145
146
|
let p = [];
|
|
146
147
|
if (Q)
|
|
147
|
-
p =
|
|
148
|
+
p = a.selectedLocationIds ?? [];
|
|
148
149
|
else {
|
|
149
150
|
const s = J(e.locationIds);
|
|
150
151
|
p = Array.isArray(s) ? s : [];
|
|
151
152
|
}
|
|
152
153
|
let I = e.reportId || M;
|
|
153
|
-
if (Ee.value.find((s) => s.id === I) || (I = M), I && I !== E.currentReportId && E.updateCurrentReportId(I),
|
|
154
|
-
const s =
|
|
155
|
-
(s.startDate !==
|
|
154
|
+
if (Ee.value.find((s) => s.id === I) || (I = M), I && I !== E.currentReportId && E.updateCurrentReportId(I), o || d) {
|
|
155
|
+
const s = a.dateRange;
|
|
156
|
+
(s.startDate !== o || s.endDate !== d) && a.setDateRange({ startDate: o, endDate: d });
|
|
156
157
|
}
|
|
157
158
|
if (i || v) {
|
|
158
|
-
const s =
|
|
159
|
-
(s.start !== b || s.end !== h) &&
|
|
159
|
+
const s = a.timeRange;
|
|
160
|
+
(s.start !== b || s.end !== h) && a.setTimeRange({ start: b, end: h });
|
|
160
161
|
}
|
|
161
162
|
if (m || w) {
|
|
162
|
-
const s =
|
|
163
|
-
(s.startDate !== m || s.endDate !== w) &&
|
|
163
|
+
const s = a.compareDateRange;
|
|
164
|
+
(s.startDate !== m || s.endDate !== w) && a.setCompareDateRange({
|
|
164
165
|
startDate: m,
|
|
165
166
|
endDate: w
|
|
166
167
|
});
|
|
167
168
|
}
|
|
168
169
|
if (!Q) {
|
|
169
|
-
const s =
|
|
170
|
-
s.length === p.length && s.every((ze,
|
|
170
|
+
const s = a.selectedLocationIds;
|
|
171
|
+
s.length === p.length && s.every((ze, Ne) => ze === p[Ne]) || a.setSelectedLocationIds(p);
|
|
171
172
|
}
|
|
172
173
|
return {
|
|
173
174
|
// TODO: this returned value can used for getBusinessSetting
|
|
@@ -186,17 +187,17 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
186
187
|
() => c.value,
|
|
187
188
|
async (t, e) => {
|
|
188
189
|
if (t !== "") {
|
|
189
|
-
$.value = !1,
|
|
190
|
-
const r = "mf-report-prev-business-id",
|
|
190
|
+
$.value = !1, K(t);
|
|
191
|
+
const r = "mf-report-prev-business-id", o = (() => {
|
|
191
192
|
try {
|
|
192
193
|
return sessionStorage.getItem(r);
|
|
193
194
|
} catch {
|
|
194
195
|
return null;
|
|
195
196
|
}
|
|
196
|
-
})(), d = !!
|
|
197
|
+
})(), d = !!o && o !== t;
|
|
197
198
|
let i = { ...n.query }, v = !1;
|
|
198
199
|
if (!x.value || e !== void 0 || d) {
|
|
199
|
-
ye(),
|
|
200
|
+
ye(), a.setSelectedLocationIds([]);
|
|
200
201
|
const {
|
|
201
202
|
locationIds: S,
|
|
202
203
|
startDate: D,
|
|
@@ -210,27 +211,27 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
210
211
|
i = {
|
|
211
212
|
...p,
|
|
212
213
|
isAllLocation: "true"
|
|
213
|
-
}, v = !0, await
|
|
214
|
+
}, v = !0, await N.replace({
|
|
214
215
|
name: n.name,
|
|
215
216
|
params: n.params,
|
|
216
217
|
query: i
|
|
217
218
|
});
|
|
218
219
|
}
|
|
219
|
-
|
|
220
|
+
F.value !== void 0 && (F.value = !0), await he(async () => {
|
|
220
221
|
await Ae({
|
|
221
|
-
apiKey: "
|
|
222
|
+
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
222
223
|
url: "https://flag.feedme.farm/api/v1/",
|
|
223
224
|
enableAnalytics: !1,
|
|
224
225
|
cacheFlags: !1
|
|
225
226
|
});
|
|
226
227
|
const S = await Re();
|
|
227
|
-
|
|
228
|
+
P.value = S.version, y.value = P.value, await Se(), n.name === "template" && !B.canAccessTemplate() && await N.replace({
|
|
228
229
|
name: "reports",
|
|
229
230
|
query: n.query
|
|
230
231
|
});
|
|
231
|
-
const D =
|
|
232
|
+
const D = B.canAccess(
|
|
232
233
|
de.report_accessOverview
|
|
233
|
-
), b =
|
|
234
|
+
), b = B.canAccess(
|
|
234
235
|
de.report_accessIntegration
|
|
235
236
|
), h = [
|
|
236
237
|
be(),
|
|
@@ -243,7 +244,7 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
243
244
|
})()
|
|
244
245
|
)
|
|
245
246
|
];
|
|
246
|
-
if (D && h.push(_e()), b && h.push(De()), await Promise.all(h), await
|
|
247
|
+
if (D && h.push(_e()), b && h.push(De()), await Promise.all(h), await W(), Te(i), v) {
|
|
247
248
|
const {
|
|
248
249
|
locationIds: m,
|
|
249
250
|
startDate: w,
|
|
@@ -254,7 +255,7 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
254
255
|
compareEndDate: s,
|
|
255
256
|
...re
|
|
256
257
|
} = n.query;
|
|
257
|
-
(n.query.locationIds !== void 0 || n.query.startDate !== void 0 || n.query.endDate !== void 0 || n.query.timeStart !== void 0 || n.query.timeEnd !== void 0 || n.query.compareStartDate !== void 0 || n.query.compareEndDate !== void 0 || n.query.isAllLocation !== "true") && await
|
|
258
|
+
(n.query.locationIds !== void 0 || n.query.startDate !== void 0 || n.query.endDate !== void 0 || n.query.timeStart !== void 0 || n.query.timeEnd !== void 0 || n.query.compareStartDate !== void 0 || n.query.compareEndDate !== void 0 || n.query.isAllLocation !== "true") && await N.replace({
|
|
258
259
|
name: n.name,
|
|
259
260
|
params: n.params,
|
|
260
261
|
query: {
|
|
@@ -277,19 +278,19 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
277
278
|
), C(
|
|
278
279
|
() => ($.value, {
|
|
279
280
|
reportId: Le.value,
|
|
280
|
-
selectedLocationIds:
|
|
281
|
-
dateRange:
|
|
282
|
-
timeRange:
|
|
283
|
-
compareDateRange:
|
|
284
|
-
timezone:
|
|
281
|
+
selectedLocationIds: a.selectedLocationIds,
|
|
282
|
+
dateRange: a.dateRange,
|
|
283
|
+
timeRange: a.timeRange,
|
|
284
|
+
compareDateRange: a.compareDateRange,
|
|
285
|
+
timezone: a.timezone
|
|
285
286
|
}),
|
|
286
287
|
(t) => {
|
|
287
288
|
if (!$.value || !t.reportId || x.value) return;
|
|
288
|
-
if (
|
|
289
|
-
|
|
289
|
+
if (F.value) {
|
|
290
|
+
F.value = !1;
|
|
290
291
|
return;
|
|
291
292
|
}
|
|
292
|
-
const e = t.selectedLocationIds, r = t.dateRange,
|
|
293
|
+
const e = t.selectedLocationIds, r = t.dateRange, o = t.timeRange, d = t.compareDateRange, i = {
|
|
293
294
|
...n.query,
|
|
294
295
|
reportId: t.reportId,
|
|
295
296
|
startDate: l(r.startDate, "start", t.timezone),
|
|
@@ -300,12 +301,12 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
300
301
|
t.timezone
|
|
301
302
|
),
|
|
302
303
|
compareEndDate: l(d.endDate, "end", t.timezone),
|
|
303
|
-
timeStart:
|
|
304
|
-
timeEnd:
|
|
305
|
-
}, v = e.length ===
|
|
304
|
+
timeStart: o.start ? JSON.stringify(o.start) : void 0,
|
|
305
|
+
timeEnd: o.end ? JSON.stringify(o.end) : void 0
|
|
306
|
+
}, v = e.length === a.locations.length;
|
|
306
307
|
i.isAllLocation = String(v), v ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
|
|
307
308
|
const S = JSON.stringify(n.query), D = JSON.stringify(i);
|
|
308
|
-
S !== D &&
|
|
309
|
+
S !== D && N.replace({
|
|
309
310
|
name: n.name,
|
|
310
311
|
params: n.params,
|
|
311
312
|
query: i
|
|
@@ -313,7 +314,7 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
313
314
|
},
|
|
314
315
|
{ deep: !0 }
|
|
315
316
|
), tt(), (t, e) => {
|
|
316
|
-
const r =
|
|
317
|
+
const r = V("router-view");
|
|
317
318
|
return A(), H(Je, null, [
|
|
318
319
|
Y(et),
|
|
319
320
|
u(y) === "v3" ? (A(), H("iframe", {
|
|
@@ -330,5 +331,5 @@ const nt = ["src"], rt = ["src"], ft = /* @__PURE__ */ me({
|
|
|
330
331
|
}
|
|
331
332
|
});
|
|
332
333
|
export {
|
|
333
|
-
|
|
334
|
+
gt as default
|
|
334
335
|
};
|