@feedmepos/mf-report 5.22.20 → 5.22.21-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 (25) hide show
  1. package/dist/{App-CV-8gueR.js → App-DagFW7TV.js} +34 -34
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-Dl_whIhf.js → BaseDialog.vue_vue_type_script_setup_true_lang-VMm3LlSf.js} +600 -596
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CmhriBtF.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DMjeRyRk.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-D_3SqJLu.js → Default.vue_vue_type_script_setup_true_lang-DgUdPAvu.js} +2 -2
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-zCG9b3bX.js → FilterSelector.vue_vue_type_script_setup_true_lang-DSekaxzM.js} +6 -6
  6. package/dist/{InsightView-CedVO1S9.js → InsightView-Br2mcmax.js} +6 -6
  7. package/dist/{Integration-Cwtx0Es5.js → Integration-m4ier_NR.js} +4 -4
  8. package/dist/{Integrations-Cn6BV11O.js → Integrations-B-SK1Who.js} +4 -4
  9. package/dist/{Layout-BBDcSXEq.js → Layout-D3o6UBeN.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DH_q_O9L.js → MenuTab.vue_vue_type_script_setup_true_lang-b237aN8x.js} +5 -5
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-D7Ppw2eR.js → NavigationTab.vue_vue_type_script_setup_true_lang-6j1FKLQj.js} +5 -5
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-DlMpL2Zf.js → NoData.vue_vue_type_script_setup_true_lang-CEtCEbYD.js} +1 -1
  13. package/dist/{OverviewView-z6IC10cy.js → OverviewView-DUDzPKis.js} +5 -5
  14. package/dist/{Report-Dkc5b6yN.js → Report-Btx0Lle4.js} +4 -4
  15. package/dist/{ReportEditor-DiS_Si-s.js → ReportEditor-DDsTsOm5.js} +6 -6
  16. package/dist/{ReportView-BsgQ4AV0.js → ReportView-CfwPZtJ3.js} +8 -8
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-D_TcBker.js → SelectComponent.vue_vue_type_script_setup_true_lang-B7a1jYcy.js} +1 -1
  18. package/dist/{Setting-Bc3_acMp.js → Setting-CLv7Qzi2.js} +5 -5
  19. package/dist/{TileEditor-r4Q2IKao.js → TileEditor-BTkdtulI.js} +8 -8
  20. package/dist/{TransitionFade-_rrrd0F-.js → TransitionFade-G3oLHoUP.js} +6 -6
  21. package/dist/{app-CO44OkB6.js → app-DjPCfzIR.js} +11 -11
  22. package/dist/app.js +1 -1
  23. package/dist/{useRestaurantPermission-DTIP1eSW.js → useRestaurantPermission-CSxAzpTW.js} +3 -3
  24. package/dist/{vue-i18n-wDEySS7y.js → vue-i18n-ZuyK9xVH.js} +1300 -1302
  25. package/package.json +2 -2
@@ -1,38 +1,38 @@
1
- import { defineComponent as ce, resolveComponent as G, createBlock as de, openBlock as O, unref as l, isRef as Ee, withCtx as z, createElementVNode as te, createVNode as K, toDisplayString as ne, createTextVNode as ke, onMounted as ue, watch as b, ref as B, computed as oe, onBeforeMount as Ae, onBeforeUnmount as Ne, createElementBlock as V, Fragment as Te } from "vue";
2
- import { detectLocale as F, useCoreStore as P } from "@feedmepos/mf-common";
3
- import { u as $e, a as Be, b as re, c as Fe, d as qe, e as xe, f as Je, s as Qe } from "./vue-i18n-wDEySS7y.js";
1
+ import { defineComponent as ce, resolveComponent as K, createBlock as de, openBlock as O, unref as l, isRef as Ce, withCtx as j, createElementVNode as te, createVNode as P, toDisplayString as ne, createTextVNode as ke, onMounted as ue, watch as b, ref as B, computed as oe, onBeforeMount as Ae, onBeforeUnmount as Ne, createElementBlock as V, Fragment as Te } from "vue";
2
+ import { detectLocale as F, useCoreStore as W } from "@feedmepos/mf-common";
3
+ import { u as $e, a as Be, b as re, c as Fe, d as qe, e as xe, f as Je, s as Qe } from "./vue-i18n-ZuyK9xVH.js";
4
4
  import { storeToRefs as w } from "pinia";
5
- import { u as ae, a as Ue, b as je } from "./BaseDialog.vue_vue_type_script_setup_true_lang-Dl_whIhf.js";
6
- import { u as ze, _ as Ve } from "./NavigationTab.vue_vue_type_script_setup_true_lang-D7Ppw2eR.js";
5
+ import { u as ae, a as Ue, b as ze } from "./BaseDialog.vue_vue_type_script_setup_true_lang-VMm3LlSf.js";
6
+ import { u as je, _ as Ve } from "./NavigationTab.vue_vue_type_script_setup_true_lang-6j1FKLQj.js";
7
7
  import { u as se } from "./message-dialog-UoMWOnil.js";
8
- import { d } from "./app-CO44OkB6.js";
9
- import { useRoute as Pe, useRouter as Ge } from "vue-router";
10
- const Ke = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, We = /* @__PURE__ */ ce({
8
+ import { d } from "./app-DjPCfzIR.js";
9
+ import { useRoute as We, useRouter as Ke } from "vue-router";
10
+ const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge = /* @__PURE__ */ ce({
11
11
  __name: "Dialog",
12
- setup(C) {
12
+ setup(E) {
13
13
  const { t: c } = $e(), p = se(), { isOpened: g, message: I, title: h } = w(se());
14
14
  return (R, S) => {
15
- const E = G("FmButton"), q = G("FmDialog");
15
+ const C = K("FmButton"), q = K("FmDialog");
16
16
  return O(), de(q, {
17
17
  modelValue: l(g),
18
- "onUpdate:modelValue": S[0] || (S[0] = (x) => Ee(g) ? g.value = x : null),
18
+ "onUpdate:modelValue": S[0] || (S[0] = (x) => Ce(g) ? g.value = x : null),
19
19
  overlay: "",
20
20
  "close-button": !1
21
21
  }, {
22
- "dialog-header": z(() => [
22
+ "dialog-header": j(() => [
23
23
  ke(ne(l(h)), 1)
24
24
  ]),
25
- default: z(() => [
26
- te("p", Ke, ne(l(I)), 1)
25
+ default: j(() => [
26
+ te("p", Pe, ne(l(I)), 1)
27
27
  ]),
28
- "dialog-footer": z(() => [
28
+ "dialog-footer": j(() => [
29
29
  S[1] || (S[1] = te("div", { class: "grow" }, null, -1)),
30
- K(E, {
30
+ P(C, {
31
31
  label: l(c)("report.common.cancel"),
32
32
  variant: "tertiary",
33
33
  onClick: l(p).dismiss
34
34
  }, null, 8, ["label", "onClick"]),
35
- K(E, {
35
+ P(C, {
36
36
  label: l(c)("report.common.confirm"),
37
37
  onClick: l(p).confirm
38
38
  }, null, 8, ["label", "onClick"])
@@ -43,7 +43,7 @@ const Ke = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, We
43
43
  }
44
44
  }), ie = B(F());
45
45
  function He() {
46
- const C = (c) => {
46
+ const E = (c) => {
47
47
  switch (ie.value = c, c) {
48
48
  case "zh-CN":
49
49
  d.locale("zh-cn");
@@ -54,16 +54,16 @@ function He() {
54
54
  }
55
55
  };
56
56
  return ue(() => {
57
- C(F());
58
- }), b(() => F(), C, { deep: !0, immediate: !0 }), {
57
+ E(F());
58
+ }), b(() => F(), E, { deep: !0, immediate: !0 }), {
59
59
  currentLocale: ie
60
60
  };
61
61
  }
62
62
  d.locale(F() === "zh-CN" ? "zh-cn" : "en");
63
63
  const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
64
64
  __name: "App",
65
- setup(C) {
66
- const { businessId: c, token: p, country: g } = w(Be()), { sessionUser: I, currentBusiness: h, currentCountry: R, registerSidebarComponent: S } = P(), { getRestaurantAndWarehouse: E, getBusinessSetting: q, beginBusinessLoad: x, completeBusinessLoad: le } = re(), { getFeatureFlags: fe } = Fe(), { version: y } = w(ae()), { getSettings: me } = qe(), { promptLoader: pe } = xe(), s = Pe(), J = Ge(), L = Ue(), W = ze(), a = re(), ge = ae(), { suppressReportRouteSync: k } = w(ge), { getReports: ye, getOverviewReport: ve, getReportConfig: H, currentReportId: X } = L, { currentReportId: Se, reports: De } = w(L), { getSchema: Ie } = je(), { fetchSchedules: he } = W, { init: Re } = Je(), Q = B("v5"), A = B(!1), N = B(!0), Le = oe(() => `https://portal-v1.feedme.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${p.value}&v2=true&reportV5Button=true`), _e = oe(() => `https://report-v4.feedme.cc?businessId=${c.value}&country=${g.value}&token=${p.value}&reportV3Button=true`);
65
+ setup(E) {
66
+ const { businessId: c, token: p, country: g } = w(Be()), { sessionUser: I, currentBusiness: h, currentCountry: R, registerSidebarComponent: S } = W(), { getRestaurantAndWarehouse: C, getBusinessSetting: q, beginBusinessLoad: x, completeBusinessLoad: le } = re(), { getFeatureFlags: fe } = Fe(), { version: y } = w(ae()), { getSettings: me } = qe(), { promptLoader: pe } = xe(), s = We(), J = Ke(), L = Ue(), G = je(), a = re(), ge = ae(), { suppressReportRouteSync: k } = w(ge), { getReports: ye, getOverviewReport: ve, getReportConfig: H, currentReportId: X } = L, { currentReportId: Se, reports: De } = w(L), { getSchema: Ie } = ze(), { fetchSchedules: he } = G, { init: Re } = Je(), Q = B("v5"), A = B(!1), N = B(!0), Le = oe(() => `https://portal-v1.feedmedev.cc/b/${c.value}/report/CLOSE_UP?showHeader=false&country=${g.value.toUpperCase()}&menuOption=business-report&token=${p.value}&v2=true&reportV5Button=true`), _e = oe(() => `https://report-v4.feedmedev.cc?businessId=${c.value}&country=${g.value}&token=${p.value}&reportV3Button=true`);
67
67
  b(
68
68
  [() => h.value, () => I.value, () => R.value],
69
69
  () => {
@@ -92,13 +92,13 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
92
92
  }
93
93
  }
94
94
  b(y, () => {
95
- ["v3", "v4"].includes(y.value) ? P().hideSidebarToggle(!0) : P().hideSidebarToggle(!1);
95
+ ["v3", "v4"].includes(y.value) ? W().hideSidebarToggle(!0) : W().hideSidebarToggle(!1);
96
96
  }), Ae(() => {
97
97
  S(Ve);
98
98
  }), ue(() => {
99
- console.log("5.22.20", !0), window.addEventListener("message", Y), window.addEventListener("message", Z);
99
+ console.log("5.22.21-beta.0", !0), window.addEventListener("message", Y), window.addEventListener("message", Z);
100
100
  }), Ne(() => {
101
- window.removeEventListener("message", Y), window.removeEventListener("message", Z), L.$dispose(), W.$dispose();
101
+ window.removeEventListener("message", Y), window.removeEventListener("message", Z), L.$dispose(), G.$dispose();
102
102
  });
103
103
  function Oe(t) {
104
104
  try {
@@ -129,7 +129,7 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
129
129
  return typeof e.hour == "number" && typeof e.minute == "number";
130
130
  }
131
131
  function be(t = s.query) {
132
- const e = t, n = e.startDate ? d(e.startDate).startOf("day").toISOString() : void 0, o = e.endDate ? d(e.endDate).endOf("day").toISOString() : void 0, f = typeof e.timeStart == "string", i = typeof e.timeEnd == "string", m = T(e.timeStart), v = T(e.timeEnd), u = M(m) ? m : null, $ = M(v) ? v : null, U = e.compareStartDate ? d(e.compareStartDate).startOf("day").toISOString() : void 0, j = e.compareEndDate ? d(e.compareEndDate).endOf("day").toISOString() : void 0, ee = e.isAllLocation === "true" || e.isAllLocation === void 0;
132
+ const e = t, n = e.startDate ? d(e.startDate).startOf("day").toISOString() : void 0, o = e.endDate ? d(e.endDate).endOf("day").toISOString() : void 0, f = typeof e.timeStart == "string", i = typeof e.timeEnd == "string", m = T(e.timeStart), v = T(e.timeEnd), u = M(m) ? m : null, $ = M(v) ? v : null, U = e.compareStartDate ? d(e.compareStartDate).startOf("day").toISOString() : void 0, z = e.compareEndDate ? d(e.compareEndDate).endOf("day").toISOString() : void 0, ee = e.isAllLocation === "true" || e.isAllLocation === void 0;
133
133
  let _ = [];
134
134
  if (ee)
135
135
  _ = a.selectedLocationIds ?? [];
@@ -146,16 +146,16 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
146
146
  const r = a.timeRange;
147
147
  (r.start !== u || r.end !== $) && a.setTimeRange({ start: u, end: $ });
148
148
  }
149
- if (U || j) {
149
+ if (U || z) {
150
150
  const r = a.compareDateRange;
151
- (r.startDate !== U || r.endDate !== j) && a.setCompareDateRange({
151
+ (r.startDate !== U || r.endDate !== z) && a.setCompareDateRange({
152
152
  startDate: U,
153
- endDate: j
153
+ endDate: z
154
154
  });
155
155
  }
156
156
  if (!ee) {
157
157
  const r = a.selectedLocationIds;
158
- r.length === _.length && r.every((we, Ce) => we === _[Ce]) || a.setSelectedLocationIds(_);
158
+ r.length === _.length && r.every((we, Ee) => we === _[Ee]) || a.setSelectedLocationIds(_);
159
159
  }
160
160
  return {
161
161
  // TODO: this returned value can used for getBusinessSetting
@@ -197,7 +197,7 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
197
197
  }
198
198
  k.value !== void 0 && (k.value = !0), await pe(async () => {
199
199
  await Re({
200
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
200
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
201
201
  url: "https://flag.feedme.farm/api/v1/",
202
202
  enableAnalytics: !1,
203
203
  cacheFlags: !1
@@ -210,7 +210,7 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
210
210
  ye(),
211
211
  Ie(),
212
212
  he(),
213
- E(
213
+ C(
214
214
  (() => {
215
215
  const u = T(i.locationIds);
216
216
  return Array.isArray(u) ? u : void 0;
@@ -273,9 +273,9 @@ const Xe = ["src"], Ye = ["src"], ut = /* @__PURE__ */ ce({
273
273
  },
274
274
  { deep: !0 }
275
275
  ), He(), (t, e) => {
276
- const n = G("router-view");
276
+ const n = K("router-view");
277
277
  return O(), V(Te, null, [
278
- K(We),
278
+ P(Ge),
279
279
  l(y) === "v3" ? (O(), V("iframe", {
280
280
  key: 0,
281
281
  class: "bg-white h-full w-full",