@feedmepos/mf-report 5.30.1 → 5.30.2-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.
Files changed (31) hide show
  1. package/dist/{App-CxNecVsw.js → App-UqLbjMzR.js} +34 -34
  2. package/dist/{DateRangeSelect-BI_D4Ipz.js → DateRangeSelect-B8A52DC0.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BxcJSQhM.js → Default.vue_vue_type_script_setup_true_lang-B9jjUnq3.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D-KPQrPq.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CnJS3cSP.js} +888 -879
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BvvfKZNr.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Cfg1BpKR.js} +571 -558
  6. package/dist/{InsightView-DxYqCScx.js → InsightView-C69Tmxwy.js} +5 -5
  7. package/dist/Integration-DGTR1WRu.js +8817 -0
  8. package/dist/{Integrations-DcV_v5Du.js → Integrations-BF5rCuoM.js} +2 -2
  9. package/dist/{Layout-DemHMNuZ.js → Layout-Bvh_gFyZ.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-CYgy4A1o.js → LocationSelect.vue_vue_type_script_setup_true_lang-Cuwu38b-.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-CWAgCUv_.js → MenuTab.vue_vue_type_script_setup_true_lang-2JqcdvN_.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C-5fNiYo.js → NavigationTab.vue_vue_type_script_setup_true_lang-9_OMGPIX.js} +5 -5
  13. package/dist/{OverviewView-BZPCDGUE.js → OverviewView-CjNVFPWJ.js} +5 -5
  14. package/dist/{Report-7pwAySr_.js → Report-Dr1Sx0Ts.js} +3 -3
  15. package/dist/{ReportCanvasView-pLudoc2O.js → ReportCanvasView-Nvb66I-O.js} +5 -5
  16. package/dist/{ReportEditor-C3Hi49MD.js → ReportEditor-Db6FXQA1.js} +7 -7
  17. package/dist/{ReportView-GVcf2UPH.js → ReportView-NdCuRkec.js} +6 -6
  18. package/dist/{ReportViewRoute-CM9QOfnk.js → ReportViewRoute-DDz5Ra0M.js} +2 -2
  19. package/dist/{Setting-DbNvny2j.js → Setting-CqrKjbaQ.js} +3 -3
  20. package/dist/{Template-DDmro22I.js → Template-Cg8t7FxY.js} +3 -3
  21. package/dist/{TileEditor-Blbbg1V4.js → TileEditor-DhmsnhU7.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-DuxN8oe_.js → TilePageStack.vue_vue_type_script_setup_true_lang-CnqR8BWz.js} +2 -2
  23. package/dist/{TransitionFade-Bwj-Hupm.js → TransitionFade-DepIvKK1.js} +5 -5
  24. package/dist/{app-DNuUgxBX.js → app-CzVuX1vd.js} +354 -322
  25. package/dist/app.js +1 -1
  26. package/dist/{currency-Bn6Bcs8d.js → currency-B9ot0g_A.js} +1 -1
  27. package/dist/{index-B-AfP_nO.js → index-BfP21yLe.js} +1 -1
  28. package/dist/{report-3-5_1WdK.js → report-DDuwJj0g.js} +1 -1
  29. package/dist/{useRestaurantPermission-BSGZVb0X.js → useRestaurantPermission-BAZfuUiJ.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist/Integration-DIsAxhsM.js +0 -8626
@@ -1,10 +1,10 @@
1
- import { defineComponent as me, resolveComponent as X, createBlock as pe, openBlock as A, unref as l, isRef as Ne, withCtx as W, createElementVNode as oe, createVNode as Y, toDisplayString as ae, createTextVNode as $e, onMounted as fe, watch as C, ref as U, computed as se, onBeforeMount as xe, onBeforeUnmount as Je, createElementBlock as H, Fragment as Qe } from "vue";
2
- import { detectLocale as j, useCoreStore as V } from "@feedmepos/mf-common";
3
- import { d as q, u as Ue, a as ie, b as je, c as ce, e as Pe, f as Ge, g as de } from "./app-DNuUgxBX.js";
1
+ import { defineComponent as me, resolveComponent as V, createBlock as pe, openBlock as A, unref as l, isRef as Fe, withCtx as G, createElementVNode as oe, createVNode as Y, toDisplayString as ae, createTextVNode as $e, onMounted as fe, watch as C, ref as U, computed as se, onBeforeMount as xe, onBeforeUnmount as Je, createElementBlock as H, Fragment as Qe } from "vue";
2
+ import { detectLocale as j, useCoreStore as X } from "@feedmepos/mf-common";
3
+ import { d as q, u as Ue, a as ie, b as je, c as ce, e as We, f as Ke, g as de } from "./app-CzVuX1vd.js";
4
4
  import { storeToRefs as k } from "pinia";
5
- import { u as Ke } from "./global-loader-BuxFfehu.js";
6
- import { u as We, a as He } from "./report-3-5_1WdK.js";
7
- import { u as Ve, _ as Xe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C-5fNiYo.js";
5
+ import { u as Pe } from "./global-loader-BuxFfehu.js";
6
+ import { u as Ge, a as He } from "./report-DDuwJj0g.js";
7
+ import { u as Xe, _ as Ve } from "./NavigationTab.vue_vue_type_script_setup_true_lang-9_OMGPIX.js";
8
8
  import { u as ue } from "./message-dialog-UoMWOnil.js";
9
9
  import { u as Ye } from "./_plugin-vue_export-helper-C6QDExPN.js";
10
10
  import { useRoute as Ze, useRouter as Me } from "vue-router";
@@ -13,21 +13,21 @@ const et = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, tt
13
13
  setup(T) {
14
14
  const { t: c } = Ye(), f = ue(), { isOpened: g, message: L, title: E } = k(ue());
15
15
  return (O, _) => {
16
- const z = X("FmButton"), P = X("FmDialog");
17
- return A(), pe(P, {
16
+ const z = V("FmButton"), W = V("FmDialog");
17
+ return A(), pe(W, {
18
18
  modelValue: l(g),
19
- "onUpdate:modelValue": _[0] || (_[0] = (G) => Ne(g) ? g.value = G : null),
19
+ "onUpdate:modelValue": _[0] || (_[0] = (K) => Fe(g) ? g.value = K : null),
20
20
  overlay: "",
21
21
  "close-button": !1,
22
22
  "z-index": 3e3
23
23
  }, {
24
- "dialog-header": W(() => [
24
+ "dialog-header": G(() => [
25
25
  $e(ae(l(E)), 1)
26
26
  ]),
27
- default: W(() => [
27
+ default: G(() => [
28
28
  oe("p", et, ae(l(L)), 1)
29
29
  ]),
30
- "dialog-footer": W(() => [
30
+ "dialog-footer": G(() => [
31
31
  _[1] || (_[1] = oe("div", { class: "grow" }, null, -1)),
32
32
  Y(z, {
33
33
  label: l(c)("report.common.cancel"),
@@ -65,13 +65,13 @@ q.locale(j() === "zh-CN" ? "zh-cn" : "en");
65
65
  const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
66
66
  __name: "App",
67
67
  setup(T) {
68
- const { businessId: c, token: f, country: g } = k(Ue()), { sessionUser: L, currentBusiness: E, currentCountry: O, registerSidebarComponent: _ } = V(), {
68
+ const { businessId: c, token: f, country: g } = k(Ue()), { sessionUser: L, currentBusiness: E, currentCountry: O, registerSidebarComponent: _ } = X(), {
69
69
  getRestaurantAndWarehouse: z,
70
- getBusinessSetting: P,
71
- beginBusinessLoad: G,
70
+ getBusinessSetting: W,
71
+ beginBusinessLoad: K,
72
72
  completeBusinessLoad: ge,
73
73
  resetTimezoneContext: ye
74
- } = ie(), ve = je(), { getFeatureFlags: Se } = ve, { version: y } = k(ce()), { getSettings: De } = Pe(), { promptLoader: he } = Ke(), n = Ze(), B = Me(), b = We(), Z = Ve(), a = ie(), F = ce(), { suppressReportRouteSync: N } = k(F), { getReports: Ie, getOverviewReport: _e, getReportConfig: Re, currentReportId: M } = b, { currentReportId: Le, reports: Ee } = k(b), { getSchema: be } = He(), { fetchSchedules: we } = Z, { init: Ae } = Ge(), K = U("v5"), $ = U(!1), x = U(!0), Ce = se(() => `https://portal-v1.feedme.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.feedme.cc?businessId=${c.value}&country=${g.value}&token=${f.value}&reportV3Button=true`);
74
+ } = ie(), ve = je(), { getFeatureFlags: Se } = ve, { version: y } = k(ce()), { getSettings: De } = We(), { promptLoader: he } = Pe(), n = Ze(), N = Me(), b = Ge(), Z = Xe(), a = ie(), B = ce(), { suppressReportRouteSync: F } = k(B), { getReports: Ie, getOverviewReport: _e, getReportConfig: Re, currentReportId: M } = b, { currentReportId: Le, reports: Ee } = k(b), { getSchema: be } = He(), { fetchSchedules: we } = Z, { init: Ae } = Ke(), 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`);
75
75
  C(
76
76
  [() => E.value, () => L.value, () => O.value],
77
77
  () => {
@@ -94,17 +94,17 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
94
94
  if (typeof t.data == "string")
95
95
  try {
96
96
  const e = JSON.parse(t.data);
97
- (e == null ? void 0 : e.v5) === !0 ? y.value = K.value : (e == null ? void 0 : e.v3) === !0 && (y.value = "v3");
97
+ (e == null ? void 0 : e.v5) === !0 ? y.value = P.value : (e == null ? void 0 : e.v3) === !0 && (y.value = "v3");
98
98
  } catch (e) {
99
99
  console.error(e);
100
100
  }
101
101
  }
102
102
  C(y, () => {
103
- ["v3", "v4"].includes(y.value) ? V().hideSidebarToggle(!0) : V().hideSidebarToggle(!1);
103
+ ["v3", "v4"].includes(y.value) ? X().hideSidebarToggle(!0) : X().hideSidebarToggle(!1);
104
104
  }), xe(() => {
105
- _(Xe);
105
+ _(Ve);
106
106
  }), fe(() => {
107
- console.log("5.30.1", !0), window.addEventListener("message", ee), window.addEventListener("message", te);
107
+ console.log("5.30.2-beta.0", !0), window.addEventListener("message", ee), window.addEventListener("message", te);
108
108
  }), Je(() => {
109
109
  window.removeEventListener("message", ee), window.removeEventListener("message", te), b.$dispose(), Z.$dispose();
110
110
  });
@@ -168,7 +168,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
168
168
  }
169
169
  if (!Q) {
170
170
  const s = a.selectedLocationIds;
171
- s.length === p.length && s.every((Be, Fe) => Be === p[Fe]) || a.setSelectedLocationIds(p);
171
+ s.length === p.length && s.every((Ne, Be) => Ne === p[Be]) || a.setSelectedLocationIds(p);
172
172
  }
173
173
  return {
174
174
  // TODO: this returned value can used for getBusinessSetting
@@ -187,7 +187,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
187
187
  () => c.value,
188
188
  async (t, e) => {
189
189
  if (t !== "") {
190
- $.value = !1, G(t);
190
+ $.value = !1, K(t);
191
191
  const r = "mf-report-prev-business-id", o = (() => {
192
192
  try {
193
193
  return sessionStorage.getItem(r);
@@ -211,27 +211,27 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
211
211
  i = {
212
212
  ...p,
213
213
  isAllLocation: "true"
214
- }, v = !0, await B.replace({
214
+ }, v = !0, await N.replace({
215
215
  name: n.name,
216
216
  params: n.params,
217
217
  query: i
218
218
  });
219
219
  }
220
- N.value !== void 0 && (N.value = !0), await he(async () => {
220
+ F.value !== void 0 && (F.value = !0), await he(async () => {
221
221
  await Ae({
222
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
222
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
223
223
  url: "https://flag.feedme.farm/api/v1/",
224
224
  enableAnalytics: !1,
225
225
  cacheFlags: !1
226
226
  });
227
227
  const S = await Re();
228
- K.value = S.version, y.value = K.value, await Se(), n.name === "template" && !F.canAccessTemplate() && await B.replace({
228
+ P.value = S.version, y.value = P.value, await Se(), n.name === "template" && !B.canAccessTemplate() && await N.replace({
229
229
  name: "reports",
230
230
  query: n.query
231
231
  });
232
- const D = F.canAccess(
232
+ const D = B.canAccess(
233
233
  de.report_accessOverview
234
- ), w = F.canAccess(
234
+ ), w = B.canAccess(
235
235
  de.report_accessIntegration
236
236
  ), h = [
237
237
  be(),
@@ -248,7 +248,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
248
248
  const R = await Promise.allSettled(h);
249
249
  for (const d of R)
250
250
  d.status === "rejected" && console.log(d.reason);
251
- if (await P(), Te(i), v) {
251
+ if (await W(), Te(i), v) {
252
252
  const {
253
253
  locationIds: d,
254
254
  startDate: Q,
@@ -259,7 +259,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
259
259
  compareEndDate: ze,
260
260
  ...re
261
261
  } = n.query;
262
- (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 B.replace({
262
+ (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({
263
263
  name: n.name,
264
264
  params: n.params,
265
265
  query: {
@@ -290,8 +290,8 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
290
290
  }),
291
291
  (t) => {
292
292
  if (!$.value || !t.reportId || x.value) return;
293
- if (N.value) {
294
- N.value = !1;
293
+ if (F.value) {
294
+ F.value = !1;
295
295
  return;
296
296
  }
297
297
  const e = t.selectedLocationIds, r = t.dateRange, o = t.timeRange, u = t.compareDateRange, i = {
@@ -310,7 +310,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
310
310
  }, v = e.length === a.locations.length;
311
311
  i.isAllLocation = String(v), v ? delete i.locationIds : e.length > 0 ? i.locationIds = JSON.stringify(e) : delete i.locationIds;
312
312
  const S = JSON.stringify(n.query), D = JSON.stringify(i);
313
- S !== D && B.replace({
313
+ S !== D && N.replace({
314
314
  name: n.name,
315
315
  params: n.params,
316
316
  query: i
@@ -318,7 +318,7 @@ const rt = ["src"], ot = ["src"], gt = /* @__PURE__ */ me({
318
318
  },
319
319
  { deep: !0 }
320
320
  ), nt(), (t, e) => {
321
- const r = X("router-view");
321
+ const r = V("router-view");
322
322
  return A(), H(Qe, null, [
323
323
  Y(tt),
324
324
  l(y) === "v3" ? (A(), H("iframe", {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as te, resolveComponent as A, createBlock as b, openBlock as C, normalizeClass as ce, withCtx as U, createCommentVNode as E, createElementVNode as I, toDisplayString as me, renderSlot as fe, mergeModels as K, useModel as z, ref as O, computed as L, watch as M, nextTick as J, onMounted as De, onBeforeUnmount as ye, createElementBlock as pe, unref as Y, createVNode as Q } from "vue";
2
- import { d as u, a as ge, C as P, j as ve } from "./app-DNuUgxBX.js";
2
+ import { d as u, a as ge, C as P, j as ve } from "./app-CzVuX1vd.js";
3
3
  import { detectLocale as X } from "@feedmepos/mf-common";
4
4
  import { u as he, _ as Ce } from "./_plugin-vue_export-helper-C6QDExPN.js";
5
5
  import { storeToRefs as be } from "pinia";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, computed as p, resolveComponent as f, createElementBlock as r, openBlock as t, normalizeStyle as n, normalizeClass as d, unref as e, createBlock as y, createCommentVNode as _, createVNode as h, createElementVNode as k, toDisplayString as g, renderSlot as x } from "vue";
2
- import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C-5fNiYo.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-9_OMGPIX.js";
3
3
  import { useBreakpoints as b } from "@feedmepos/ui-library";
4
4
  import { storeToRefs as C } from "pinia";
5
5
  import { u as q } from "./global-loader-BuxFfehu.js";