@feedmepos/mf-report 5.21.38 → 5.21.39

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 (26) hide show
  1. package/dist/{App-BsUD07li.js → App-DykmYyu7.js} +38 -40
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BKCPhMQp.js → BaseDialog.vue_vue_type_script_setup_true_lang-CzdqdH4Q.js} +211 -211
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-IFmK7UNC.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-D8Or-oVC.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-C_dmzKZp.js → Default.vue_vue_type_script_setup_true_lang-CtQ1zwaR.js} +2 -2
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-CGiARqgH.js → FilterSelector.vue_vue_type_script_setup_true_lang-Cq0wolEE.js} +7 -7
  6. package/dist/{InsightView-gvzdf87-.js → InsightView-IH9nmJ8R.js} +6 -6
  7. package/dist/{Integration-DlwJe_kl.js → Integration-DAscHEkh.js} +3 -3
  8. package/dist/{Integrations-Cg5cqwQl.js → Integrations-D6XFos9X.js} +3 -3
  9. package/dist/{Layout-yXdcJAGo.js → Layout-Bc1FmJXu.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-QE2Z689r.js → MenuTab.vue_vue_type_script_setup_true_lang-CZIacrkt.js} +5 -5
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BIJODDPm.js → NavigationTab.vue_vue_type_script_setup_true_lang-NipBn7yH.js} +5 -5
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-DlBpfQGg.js → NoData.vue_vue_type_script_setup_true_lang-g-9SED3o.js} +1 -1
  13. package/dist/{OverviewView--RezHs3M.js → OverviewView-BASgwfqk.js} +5 -5
  14. package/dist/{Report-DyF7i2e5.js → Report-B0_CUvYo.js} +4 -4
  15. package/dist/{ReportEditor-C2yY2-qW.js → ReportEditor-DgVj55Yv.js} +6 -6
  16. package/dist/{ReportView-BzfutolJ.js → ReportView-DYL7cyXp.js} +8 -8
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-Bcn8ccAQ.js → SelectComponent.vue_vue_type_script_setup_true_lang-C8IbvVSY.js} +1 -1
  18. package/dist/{Setting-Cl16Kc6K.js → Setting-BY0XUIMk.js} +5 -5
  19. package/dist/{TileEditor-tcRV0cTM.js → TileEditor-BYO4u87o.js} +8 -8
  20. package/dist/{TransitionFade-ObjoHeks.js → TransitionFade-CTI3okbU.js} +6 -6
  21. package/dist/{app-C44_Ghab.js → app-Yx_HCvnc.js} +11 -11
  22. package/dist/app.js +1 -1
  23. package/dist/assets/{formatChartData.worker-DHyKAOan.js → formatChartData.worker-Bf22-3_a.js} +16 -16
  24. package/dist/assets/{processTableData.worker-BAeQAKT3.js → processTableData.worker-GbyPQNAF.js} +21 -21
  25. package/dist/{vue-i18n-D3JtdL0j.js → vue-i18n-B3i4Y3fR.js} +1 -1
  26. package/package.json +1 -1
@@ -1,21 +1,21 @@
1
- import { defineComponent as se, resolveComponent as V, createBlock as ie, openBlock as R, unref as c, isRef as be, withCtx as j, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as we, onMounted as ue, watch as q, ref as N, computed as te, onBeforeMount as Ce, onBeforeUnmount as Ee, createElementBlock as z, Fragment as ke } from "vue";
2
- import { detectLocale as T, useCoreStore as Q } from "@feedmepos/mf-common";
3
- import { u as Ae, a as Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-D3JtdL0j.js";
1
+ import { defineComponent as se, resolveComponent as V, createBlock as ie, openBlock as R, unref as c, isRef as be, withCtx as j, createElementVNode as M, createVNode as P, toDisplayString as ee, createTextVNode as we, onMounted as ue, watch as q, ref as A, computed as te, onBeforeMount as Ce, onBeforeUnmount as Ee, createElementBlock as z, Fragment as ke } from "vue";
2
+ import { detectLocale as N, useCoreStore as Q } from "@feedmepos/mf-common";
3
+ import { u as Ae, a as Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-B3i4Y3fR.js";
4
4
  import { storeToRefs as L } from "pinia";
5
- import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-BKCPhMQp.js";
6
- import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BIJODDPm.js";
5
+ import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CzdqdH4Q.js";
6
+ import { u as je, _ as ze } from "./NavigationTab.vue_vue_type_script_setup_true_lang-NipBn7yH.js";
7
7
  import { u as ae } from "./message-dialog-UoMWOnil.js";
8
- import { d as u } from "./app-C44_Ghab.js";
8
+ import { d as u } from "./app-Yx_HCvnc.js";
9
9
  import { useRoute as Qe, useRouter as Ve } from "vue-router";
10
10
  const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge = /* @__PURE__ */ se({
11
11
  __name: "Dialog",
12
12
  setup(_) {
13
13
  const { t: i } = Ae(), l = ae(), { isOpened: d, message: S, title: D } = L(ae());
14
- return (f, g) => {
15
- const O = V("FmButton"), B = V("FmDialog");
16
- return R(), ie(B, {
14
+ return (m, g) => {
15
+ const O = V("FmButton"), T = V("FmDialog");
16
+ return R(), ie(T, {
17
17
  modelValue: c(d),
18
- "onUpdate:modelValue": g[0] || (g[0] = (F) => be(d) ? d.value = F : null),
18
+ "onUpdate:modelValue": g[0] || (g[0] = (B) => be(d) ? d.value = B : null),
19
19
  overlay: "",
20
20
  "close-button": !1
21
21
  }, {
@@ -41,7 +41,7 @@ const Pe = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Ge
41
41
  }, 8, ["modelValue"]);
42
42
  };
43
43
  }
44
- }), oe = N(T());
44
+ }), oe = A(N());
45
45
  function We() {
46
46
  const _ = (i) => {
47
47
  switch (oe.value = i, i) {
@@ -54,33 +54,31 @@ function We() {
54
54
  }
55
55
  };
56
56
  return ue(() => {
57
- _(T());
58
- }), q(() => T(), _, { deep: !0, immediate: !0 }), {
57
+ _(N());
58
+ }), q(() => N(), _, { deep: !0, immediate: !0 }), {
59
59
  currentLocale: oe
60
60
  };
61
61
  }
62
- u.locale(T() === "zh-CN" ? "zh-cn" : "en");
62
+ u.locale(N() === "zh-CN" ? "zh-cn" : "en");
63
63
  const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
64
64
  __name: "App",
65
65
  setup(_) {
66
- const { businessId: i, token: l, country: d } = L(Ne()), { sessionUser: S, currentBusiness: D, currentCountry: f, registerSidebarComponent: g } = Q(), { getRestaurantAndWarehouse: O, getBusinessSetting: B, beginBusinessLoad: F, completeBusinessLoad: ce } = ne(), { getFeatureFlags: de } = Te(), { version: m } = L(re()), { getSettings: le } = Be(), { promptLoader: fe } = Fe(), n = Qe(), $ = Ve(), h = Je(), G = je(), r = ne(), me = re(), { suppressReportRouteSync: b } = L(me), { getReports: pe, getOverviewReport: ge, getReportConfig: W, currentReportId: H } = h, { currentReportId: ye, reports: ve } = L(h), { getSchema: Se } = Ue(), { fetchSchedules: De } = G, { init: he } = $e(), x = N("v5"), w = N(!1), C = N(!0), Ie = te(() => `https://portal-v1.feedme.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${d.value.toUpperCase()}&menuOption=business-report&token=${l.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${i.value}&country=${d.value}&token=${l.value}&reportV3Button=true`);
66
+ const { businessId: i, token: l, country: d } = L(Ne()), { sessionUser: S, currentBusiness: D, currentCountry: m, registerSidebarComponent: g } = Q(), { getRestaurantAndWarehouse: O, getBusinessSetting: T, beginBusinessLoad: B, completeBusinessLoad: ce } = ne(), { getFeatureFlags: de } = Te(), { version: f } = L(re()), { getSettings: le } = Be(), { promptLoader: me } = Fe(), n = Qe(), F = Ve(), h = Je(), G = je(), r = ne(), fe = re(), { suppressReportRouteSync: b } = L(fe), { getReports: pe, getOverviewReport: ge, getReportConfig: W, currentReportId: H } = h, { currentReportId: ye, reports: ve } = L(h), { getSchema: Se } = Ue(), { fetchSchedules: De } = G, { init: he } = $e(), $ = A("v5"), w = A(!1), x = A(!0), Ie = te(() => `https://portal-v1.feedme.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${d.value.toUpperCase()}&menuOption=business-report&token=${l.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedme.cc?businessId=${i.value}&country=${d.value}&token=${l.value}&reportV3Button=true`);
67
67
  q(
68
- [() => D.value, () => S.value, () => f.value],
68
+ [() => D.value, () => S.value, () => m.value],
69
69
  () => {
70
70
  var t, a;
71
71
  const e = ((t = D.value) == null ? void 0 : t.id) ?? "";
72
- if (D.value && S.value && f.value) {
73
- xe(f.value), i.value !== e && (i.value = e);
72
+ if (D.value && S.value && m.value) {
73
+ xe(m.value), i.value !== e && (i.value = e);
74
74
  let s = !1;
75
- d.value !== f.value && (s = !0), l.value = ((a = S.value) == null ? void 0 : a.token) ?? "", d.value = f.value ?? "", (n.query.businessId !== i.value || s || !C.value) && $.replace({
75
+ d.value !== m.value && (s = !0), l.value = ((a = S.value) == null ? void 0 : a.token) ?? "", d.value = m.value ?? "", (n.query.businessId !== i.value || s) && F.replace({
76
76
  name: n.name,
77
77
  params: n.params,
78
78
  query: {
79
79
  ...n.query,
80
80
  businessId: i.value,
81
- country: f.value,
82
- isAllLocation: "true",
83
- locationIds: void 0
81
+ country: m.value
84
82
  }
85
83
  });
86
84
  }
@@ -100,17 +98,17 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
100
98
  if (typeof e.data == "string")
101
99
  try {
102
100
  const t = JSON.parse(e.data);
103
- (t == null ? void 0 : t.v5) === !0 ? m.value = x.value : (t == null ? void 0 : t.v3) === !0 && (m.value = "v3");
101
+ (t == null ? void 0 : t.v5) === !0 ? f.value = $.value : (t == null ? void 0 : t.v3) === !0 && (f.value = "v3");
104
102
  } catch (t) {
105
103
  console.error(t);
106
104
  }
107
105
  }
108
- q(m, () => {
109
- ["v3", "v4"].includes(m.value) ? Q().hideSidebarToggle(!0) : Q().hideSidebarToggle(!1);
106
+ q(f, () => {
107
+ ["v3", "v4"].includes(f.value) ? Q().hideSidebarToggle(!0) : Q().hideSidebarToggle(!1);
110
108
  }), Ce(() => {
111
109
  g(ze);
112
110
  }), ue(() => {
113
- console.log("5.21.38", !0), window.addEventListener("message", K), window.addEventListener("message", X);
111
+ console.log("5.21.39", !0), window.addEventListener("message", K), window.addEventListener("message", X);
114
112
  }), Ee(() => {
115
113
  window.removeEventListener("message", K), window.removeEventListener("message", X), h.$dispose(), G.$dispose();
116
114
  });
@@ -121,7 +119,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
121
119
  return e;
122
120
  }
123
121
  }
124
- function E(e) {
122
+ function C(e) {
125
123
  if (typeof e != "string" || e.length === 0) return;
126
124
  const t = e.includes("%") ? [e, qe(e)] : [e];
127
125
  for (const a of t)
@@ -143,12 +141,12 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
143
141
  return typeof t.hour == "number" && typeof t.minute == "number";
144
142
  }
145
143
  function Le() {
146
- const e = n.query.startDate ? u(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? u(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", p = E(n.query.timeStart), I = E(n.query.timeEnd), k = Y(p) ? p : null, A = Y(I) ? I : null, J = n.query.compareStartDate ? u(n.query.compareStartDate).startOf("day").toISOString() : void 0, U = n.query.compareEndDate ? u(n.query.compareEndDate).endOf("day").toISOString() : void 0, Z = n.query.isAllLocation === "true" || n.query.isAllLocation === void 0;
144
+ const e = n.query.startDate ? u(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? u(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", p = C(n.query.timeStart), I = C(n.query.timeEnd), E = Y(p) ? p : null, k = Y(I) ? I : null, J = n.query.compareStartDate ? u(n.query.compareStartDate).startOf("day").toISOString() : void 0, U = n.query.compareEndDate ? u(n.query.compareEndDate).endOf("day").toISOString() : void 0, Z = n.query.isAllLocation === "true" || n.query.isAllLocation === void 0;
147
145
  let y = [];
148
146
  if (Z)
149
147
  y = r.selectedLocationIds;
150
148
  else {
151
- const o = E(n.query.locationIds);
149
+ const o = C(n.query.locationIds);
152
150
  y = Array.isArray(o) ? o : [];
153
151
  }
154
152
  let v = n.query.reportId || H;
@@ -158,7 +156,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
158
156
  }
159
157
  if (a || s) {
160
158
  const o = r.timeRange;
161
- (o.start !== k || o.end !== A) && r.setTimeRange({ start: k, end: A });
159
+ (o.start !== E || o.end !== k) && r.setTimeRange({ start: E, end: k });
162
160
  }
163
161
  if (J || U) {
164
162
  const o = r.compareDateRange;
@@ -187,7 +185,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
187
185
  return q(
188
186
  () => i.value,
189
187
  async (e) => {
190
- e !== "" && (w.value = !1, F(e), C.value || (r.setSelectedLocationIds([]), $.replace({
188
+ e !== "" && (w.value = !1, B(e), x.value || (r.setSelectedLocationIds([]), F.replace({
191
189
  name: n.name,
192
190
  params: n.params,
193
191
  query: {
@@ -195,7 +193,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
195
193
  locationIds: void 0,
196
194
  isAllLocation: "true"
197
195
  }
198
- })), b.value !== void 0 && (b.value = !0), await fe(async () => {
196
+ })), b.value !== void 0 && (b.value = !0), await me(async () => {
199
197
  await he({
200
198
  apiKey: "6GhcttsJ9Rj9cTevcdrpin",
201
199
  url: "https://flag.feedme.farm/api/v1/",
@@ -203,7 +201,7 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
203
201
  cacheFlags: !1
204
202
  });
205
203
  const t = await W();
206
- x.value = t.version, m.value = x.value, await Promise.all([
204
+ $.value = t.version, f.value = $.value, await Promise.all([
207
205
  de(),
208
206
  W(),
209
207
  ge(),
@@ -212,13 +210,13 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
212
210
  De(),
213
211
  O(
214
212
  (() => {
215
- const a = E(n.query.locationIds);
213
+ const a = C(n.query.locationIds);
216
214
  return Array.isArray(a) ? a : void 0;
217
215
  })()
218
216
  ),
219
217
  le()
220
- ]), await B(), Le(), ce(e);
221
- }), w.value = !0, C.value && (C.value = !1));
218
+ ]), await T(), Le(), ce(e);
219
+ }), w.value = !0, x.value && (x.value = !1));
222
220
  },
223
221
  {
224
222
  immediate: !0
@@ -248,8 +246,8 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
248
246
  timeEnd: s.end ? JSON.stringify(s.end) : void 0,
249
247
  locationIds: t.length === r.locations.length ? void 0 : t.length > 0 ? JSON.stringify(t) : void 0,
250
248
  isAllLocation: String(t.length === r.locations.length)
251
- }, k = JSON.stringify(n.query), A = JSON.stringify(I);
252
- k !== A && $.replace({
249
+ }, E = JSON.stringify(n.query), k = JSON.stringify(I);
250
+ E !== k && F.replace({
253
251
  name: n.name,
254
252
  params: n.params,
255
253
  query: I
@@ -260,11 +258,11 @@ const He = ["src"], Ke = ["src"], ut = /* @__PURE__ */ se({
260
258
  const a = V("router-view");
261
259
  return R(), z(ke, null, [
262
260
  P(Ge),
263
- c(m) === "v3" ? (R(), z("iframe", {
261
+ c(f) === "v3" ? (R(), z("iframe", {
264
262
  key: 0,
265
263
  class: "bg-white h-full w-full",
266
264
  src: Ie.value
267
- }, null, 8, He)) : c(m) === "v4" ? (R(), z("iframe", {
265
+ }, null, 8, He)) : c(f) === "v4" ? (R(), z("iframe", {
268
266
  key: 1,
269
267
  class: "bg-white h-full w-full",
270
268
  src: Re.value