@feedmepos/mf-report 5.8.2 → 5.9.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.
Files changed (37) hide show
  1. package/dist/{App-C6VF9T5V.js → App-CQsY_29Q.js} +35 -36
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-w7lSYFth.js +180 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-B0_QlxYu.js → Default.vue_vue_type_script_setup_true_lang-DeKEY6-a.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-Dc0etyos.js +1447 -0
  5. package/dist/{InsightView-BQlzh0ue.js → InsightView-DmM_alRs.js} +7 -8
  6. package/dist/Integration-CAX-hbPd.js +5222 -0
  7. package/dist/Integrations-DRYSVJuG.js +338 -0
  8. package/dist/{Layout-RhBG3zKc.js → Layout-CDCrzjoH.js} +1 -1
  9. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DNxXgTX4.js +342 -0
  10. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BdzurgE4.js → NavigationTab.vue_vue_type_script_setup_true_lang-DpFJ_jYh.js} +1078 -1080
  11. package/dist/NoData.vue_vue_type_script_setup_true_lang-DGTWa4E5.js +38 -0
  12. package/dist/{OverviewView-Boq9rgbj.js → OverviewView-DeGcbroH.js} +5 -5
  13. package/dist/{Report-C7GvAhoG.js → Report-Do9-H4EW.js} +4 -4
  14. package/dist/ReportEditor-D4bnl00E.js +968 -0
  15. package/dist/{ReportView-DMLyspIY.js → ReportView-Cz6U-DNK.js} +7 -7
  16. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Dq9vY9mj.js +110 -0
  17. package/dist/{Setting-CLBZdtvx.js → Setting-DIAFop5l.js} +26 -23
  18. package/dist/TileEditor-DGhgxgTD.js +3080 -0
  19. package/dist/{TransitionFade-D3megUTB.js → TransitionFade-DmQjTWuM.js} +207 -203
  20. package/dist/app.js +59 -19
  21. package/dist/helper-CPPrXQSs.js +75 -0
  22. package/dist/style.css +1 -1
  23. package/dist/{v4-Bi2F4URu.js → v4-ZW3e7y3R.js} +1955 -1844
  24. package/dist/{global-loader-CEOgl5uZ.js → vue-i18n-CbAseuRE.js} +2058 -1977
  25. package/package.json +1 -1
  26. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-CpakO4U-.js +0 -162
  27. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-BO_HTvjY.js +0 -1417
  28. package/dist/Integration-CB31rvSG.js +0 -4751
  29. package/dist/Integrations-DGlzyZMR.js +0 -334
  30. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DsY5W3k7.js +0 -101
  31. package/dist/NoData.vue_vue_type_script_setup_true_lang-DZJxcekm.js +0 -31
  32. package/dist/ReportEditor-CwzONBLC.js +0 -621
  33. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-C23-eIYF.js +0 -104
  34. package/dist/TileEditor-CtVM3IbI.js +0 -3016
  35. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  36. package/dist/index-CH1WFv_s.js +0 -147
  37. package/dist/report-schema-C3sI223M.js +0 -31
@@ -1,16 +1,15 @@
1
- import { defineComponent as O, resolveComponent as b, createBlock as I, openBlock as c, unref as r, isRef as X, withCtx as S, createElementVNode as D, createVNode as k, toDisplayString as E, createTextVNode as Y, onMounted as T, watch as f, ref as j, computed as N, onBeforeMount as Z, onBeforeUnmount as M, createElementBlock as w, Fragment as ee } from "vue";
1
+ import { defineComponent as O, resolveComponent as b, createBlock as I, openBlock as c, unref as r, isRef as X, withCtx as S, createElementVNode as R, createVNode as k, toDisplayString as V, createTextVNode as Y, onMounted as T, watch as f, ref as z, computed as D, onBeforeMount as Z, onBeforeUnmount as M, createElementBlock as w, Fragment as ee } from "vue";
2
2
  import { detectLocale as p, useCoreStore as y } from "@feedmepos/mf-common";
3
- import { u as te, d as C, a as oe, b as re, c as ae, e as ne, f as se, g as le } from "./global-loader-CEOgl5uZ.js";
3
+ import { u as te, d as C, a as oe, b as re, c as ae, e as ne, f as se, g as le } from "./vue-i18n-CbAseuRE.js";
4
4
  import { storeToRefs as $ } from "pinia";
5
- import { u as ue, a as ie } from "./v4-Bi2F4URu.js";
6
- import { u as ce } from "./report-schema-C3sI223M.js";
7
- import { _ as me, u as de } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BdzurgE4.js";
5
+ import { u as ue, a as ie, b as ce } from "./v4-ZW3e7y3R.js";
6
+ import { _ as de, u as me } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DpFJ_jYh.js";
8
7
  import { u as U } from "./message-dialog-UoMWOnil.js";
9
8
  const ve = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, fe = /* @__PURE__ */ O({
10
9
  __name: "Dialog",
11
- setup(m) {
10
+ setup(d) {
12
11
  const { t } = te(), a = U(), { isOpened: n, message: u, title: i } = $(U());
13
- return (d, l) => {
12
+ return (m, l) => {
14
13
  const v = b("FmButton"), g = b("FmDialog");
15
14
  return c(), I(g, {
16
15
  modelValue: r(n),
@@ -19,13 +18,13 @@ const ve = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, fe
19
18
  "close-button": !1
20
19
  }, {
21
20
  "dialog-header": S(() => [
22
- Y(E(r(i)), 1)
21
+ Y(V(r(i)), 1)
23
22
  ]),
24
23
  default: S(() => [
25
- D("p", ve, E(r(u)), 1)
24
+ R("p", ve, V(r(u)), 1)
26
25
  ]),
27
26
  "dialog-footer": S(() => [
28
- l[1] || (l[1] = D("div", { class: "grow" }, null, -1)),
27
+ l[1] || (l[1] = R("div", { class: "grow" }, null, -1)),
29
28
  k(v, {
30
29
  label: r(t)("report.common.cancel"),
31
30
  variant: "tertiary",
@@ -40,9 +39,9 @@ const ve = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, fe
40
39
  }, 8, ["modelValue"]);
41
40
  };
42
41
  }
43
- }), x = j(p());
42
+ }), x = z(p());
44
43
  function pe() {
45
- const m = (t) => {
44
+ const d = (t) => {
46
45
  switch (x.value = t, t) {
47
46
  case "zh-CN":
48
47
  C.locale("zh-cn");
@@ -53,21 +52,21 @@ function pe() {
53
52
  }
54
53
  };
55
54
  return T(() => {
56
- m(p());
57
- }), f(() => p(), m, { deep: !0, immediate: !0 }), {
55
+ d(p());
56
+ }), f(() => p(), d, { deep: !0, immediate: !0 }), {
58
57
  currentLocale: x
59
58
  };
60
59
  }
61
60
  C.locale(p() === "zh-CN" ? "zh-cn" : "en");
62
- const ge = ["src"], he = ["src"], Fe = /* @__PURE__ */ O({
61
+ const ge = ["src"], he = ["src"], $e = /* @__PURE__ */ O({
63
62
  __name: "App",
64
- setup(m) {
65
- const { businessId: t, token: a, country: n } = $(oe()), { sessionUser: u, currentBusiness: i, currentCountry: d, registerSidebarComponent: l } = y(), { getRestaurantAndWarehouse: v, getBusinessSetting: g } = re(), { getFeatureFlags: h } = ae(), { version: s } = $(ue()), { getSettings: z } = ne(), { promptLoader: A } = se(), J = N(() => `https://portal-v1.feedme.cc/b/${t.value}/report/CLOSE_UP?showHeader=false&country=${n.value.toUpperCase()}&menuOption=business-report&token=${a.value}&v2=true&reportV5Button=true`), G = N(() => `https://report-v4.feedme.cc?businessId=${t.value}&country=${n.value}&token=${a.value}&reportV3Button=true`);
63
+ setup(d) {
64
+ const { businessId: t, token: a, country: n } = $(oe()), { sessionUser: u, currentBusiness: i, currentCountry: m, registerSidebarComponent: l } = y(), { getRestaurantAndWarehouse: v, getBusinessSetting: g } = re(), { getFeatureFlags: h } = ae(), { version: s } = $(ue()), { getSettings: j } = ne(), { promptLoader: A } = se(), J = D(() => `https://portal-v1.feedmedev.cc/b/${t.value}/report/CLOSE_UP?showHeader=false&country=${n.value.toUpperCase()}&menuOption=business-report&token=${a.value}&v2=true&reportV5Button=true`), W = D(() => `https://report-v4.feedmedev.cc?businessId=${t.value}&country=${n.value}&token=${a.value}&reportV3Button=true`);
66
65
  f(
67
- [() => i.value, () => u.value, () => d.value],
66
+ [() => i.value, () => u.value, () => m.value],
68
67
  () => {
69
68
  var o, e;
70
- i.value && u.value && d.value && (t.value = ((o = i.value) == null ? void 0 : o.id) ?? "", a.value = ((e = u.value) == null ? void 0 : e.token) ?? "", n.value = d.value ?? "");
69
+ i.value && u.value && m.value && (t.value = ((o = i.value) == null ? void 0 : o.id) ?? "", a.value = ((e = u.value) == null ? void 0 : e.token) ?? "", n.value = m.value ?? "");
71
70
  },
72
71
  { immediate: !0 }
73
72
  );
@@ -92,36 +91,36 @@ const ge = ["src"], he = ["src"], Fe = /* @__PURE__ */ O({
92
91
  f(s, () => {
93
92
  ["v3", "v4"].includes(s.value) ? y().hideSidebarToggle(!0) : y().hideSidebarToggle(!1);
94
93
  }), Z(() => {
95
- l(me);
94
+ l(de);
96
95
  }), T(() => {
97
- console.log("5.8.2", !0), window.addEventListener("message", F), window.addEventListener("message", B);
96
+ console.log("5.9.0-beta.0", !0), window.addEventListener("message", F), window.addEventListener("message", B);
98
97
  });
99
- const L = ie(), R = de();
98
+ const E = ie(), L = me();
100
99
  M(() => {
101
- window.removeEventListener("message", F), window.removeEventListener("message", B), L.$dispose(), R.$dispose();
100
+ window.removeEventListener("message", F), window.removeEventListener("message", B), E.$dispose(), L.$dispose();
102
101
  });
103
- const { getReports: P, getOverviewReport: H, getReportConfig: V } = L, { getSchema: K } = ce(), { fetchSchedules: Q } = R, { init: W } = le(), _ = j("v5");
102
+ const { getReports: G, getOverviewReport: K, getReportConfig: N } = E, { getSchema: P } = ce(), { fetchSchedules: q } = L, { init: H } = le(), _ = z("v5");
104
103
  return f(
105
104
  () => t.value,
106
105
  () => {
107
106
  t.value !== "" && A(async () => {
108
- await W({
109
- apiKey: "6GhcttsJ9Rj9cTevcdrpin",
107
+ await H({
108
+ apiKey: "MaGoXrEWuEJNpWgKTqseee",
110
109
  url: "https://flag.feedme.farm/api/v1/",
111
110
  enableAnalytics: !1,
112
111
  cacheFlags: !1
113
112
  });
114
- const o = await V();
113
+ const o = await N();
115
114
  _.value = o.version, s.value = _.value, await Promise.all([
116
115
  h(),
117
- V(),
118
- H(),
119
- P(),
116
+ N(),
120
117
  K(),
121
- Q(),
118
+ G(),
119
+ P(),
120
+ q(),
122
121
  g(),
123
122
  v(),
124
- z()
123
+ j()
125
124
  ]);
126
125
  });
127
126
  },
@@ -129,7 +128,7 @@ const ge = ["src"], he = ["src"], Fe = /* @__PURE__ */ O({
129
128
  immediate: !0
130
129
  }
131
130
  ), pe(), (o, e) => {
132
- const q = b("router-view");
131
+ const Q = b("router-view");
133
132
  return c(), w(ee, null, [
134
133
  k(fe),
135
134
  r(s) === "v3" ? (c(), w("iframe", {
@@ -139,12 +138,12 @@ const ge = ["src"], he = ["src"], Fe = /* @__PURE__ */ O({
139
138
  }, null, 8, ge)) : r(s) === "v4" ? (c(), w("iframe", {
140
139
  key: 1,
141
140
  class: "bg-white h-full w-full",
142
- src: G.value
143
- }, null, 8, he)) : (c(), I(q, { key: 2 }))
141
+ src: W.value
142
+ }, null, 8, he)) : (c(), I(Q, { key: 2 }))
144
143
  ], 64);
145
144
  };
146
145
  }
147
146
  });
148
147
  export {
149
- Fe as default
148
+ $e as default
150
149
  };
@@ -0,0 +1,180 @@
1
+ import { defineComponent as P, resolveComponent as b, createBlock as D, openBlock as i, withCtx as R, createCommentVNode as S, createElementVNode as V, toDisplayString as E, renderSlot as N, mergeModels as k, useModel as v, ref as x, watch as F, createElementBlock as Y, createVNode as y, unref as u } from "vue";
2
+ import { u as j, d as o, N as U, C as q } from "./vue-i18n-CbAseuRE.js";
3
+ import { d as T } from "./helper-CPPrXQSs.js";
4
+ import { detectLocale as M } from "@feedmepos/mf-common";
5
+ const z = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitespace-nowrap" }, _ = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitespace-nowrap" }, O = /* @__PURE__ */ P({
6
+ __name: "FilterChip",
7
+ props: {
8
+ label: {
9
+ type: String,
10
+ default: ""
11
+ },
12
+ leftIcon: {
13
+ type: String,
14
+ default: ""
15
+ },
16
+ rightIcon: {
17
+ type: String,
18
+ default: ""
19
+ }
20
+ },
21
+ setup(e) {
22
+ const c = e;
23
+ return (p, g) => {
24
+ const d = b("FmIcon"), m = b("FmChip");
25
+ return i(), D(m, { class: "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-fit" }, {
26
+ default: R(() => [
27
+ e.leftIcon ? (i(), D(d, {
28
+ key: 0,
29
+ name: c.leftIcon,
30
+ size: "sm",
31
+ outline: ""
32
+ }, null, 8, ["name"])) : S("", !0),
33
+ V("p", z, E(c.label), 1),
34
+ e.rightIcon ? (i(), D(d, {
35
+ key: 1,
36
+ name: e.rightIcon,
37
+ size: "sm",
38
+ outline: ""
39
+ }, null, 8, ["name"])) : S("", !0),
40
+ V("div", _, [
41
+ N(p.$slots, "default")
42
+ ])
43
+ ]),
44
+ _: 3
45
+ });
46
+ };
47
+ }
48
+ }), A = { class: "flex gap-2 items-center" }, f = "YYYY-MM-DD", K = /* @__PURE__ */ P({
49
+ __name: "DateRangeSelect",
50
+ props: /* @__PURE__ */ k({
51
+ compare: {
52
+ type: Boolean,
53
+ default: !1
54
+ },
55
+ datePredefinedRanges: {
56
+ type: Array,
57
+ default: () => U
58
+ },
59
+ label: {
60
+ type: String,
61
+ required: !1,
62
+ default: null
63
+ },
64
+ removable: {
65
+ type: Boolean,
66
+ required: !1,
67
+ default: !1
68
+ }
69
+ }, {
70
+ compareType: {
71
+ type: String,
72
+ default: q.PRECEDING_PERIOD
73
+ },
74
+ compareTypeModifiers: {},
75
+ dateRange: {
76
+ type: Object,
77
+ default: () => ({
78
+ startDate: void 0,
79
+ endDate: void 0
80
+ })
81
+ },
82
+ dateRangeModifiers: {},
83
+ compareDateRange: {
84
+ type: Object,
85
+ default: () => ({
86
+ startDate: void 0,
87
+ endDate: void 0
88
+ })
89
+ },
90
+ compareDateRangeModifiers: {}
91
+ }),
92
+ emits: /* @__PURE__ */ k(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
93
+ setup(e, { emit: c }) {
94
+ var C, h, I;
95
+ const { t: p } = j(), g = c, d = v(e, "compareType"), m = v(e, "dateRange"), s = v(e, "compareDateRange"), t = x({
96
+ startDate: (C = o(m.value.startDate)) == null ? void 0 : C.local().format(f),
97
+ endDate: (h = o(m.value.endDate)) == null ? void 0 : h.local().format(f)
98
+ }), a = x({
99
+ startDate: s.value.startDate ? (I = o(s.value.startDate)) == null ? void 0 : I.local().format(f) : null,
100
+ endDate: s.value.endDate ? o(s.value.endDate).local().format(f) : null
101
+ });
102
+ F(
103
+ [() => t.value],
104
+ () => {
105
+ t.value.endDate || (t.value.endDate = t.value.startDate);
106
+ const r = {
107
+ startDate: o(t.value.startDate).toISOString(),
108
+ endDate: o(t.value.endDate).toISOString()
109
+ };
110
+ m.value = r, g("update", r);
111
+ },
112
+ { deep: !0 }
113
+ ), F([() => a.value], () => {
114
+ s.value = {
115
+ startDate: a.value.startDate ? o(a.value.startDate).toISOString() : void 0,
116
+ endDate: a.value.endDate ? o(a.value.endDate).toISOString() : void 0
117
+ };
118
+ });
119
+ function $(r) {
120
+ d.value = r;
121
+ }
122
+ function B(r) {
123
+ g("chip-closed", r);
124
+ }
125
+ return (r, l) => {
126
+ const w = b("FmSimpleDateRangePicker");
127
+ return i(), Y("div", A, [
128
+ y(w, {
129
+ modelValue: t.value,
130
+ "onUpdate:modelValue": l[1] || (l[1] = (n) => t.value = n),
131
+ "show-predefined-range": "",
132
+ "predefined-range": e.datePredefinedRanges.map((n) => ({
133
+ ...n,
134
+ label: u(p)(`report.date.${n.label}`)
135
+ })),
136
+ class: "w-2/6"
137
+ }, {
138
+ "trigger-button": R(() => [
139
+ y(O, {
140
+ "left-icon": e.label ? "filter_alt" : "calendar_month",
141
+ label: e.label ?? u(T)({
142
+ startDate: t.value.startDate ?? "",
143
+ endDate: t.value.endDate ?? "",
144
+ locale: u(M)()
145
+ }),
146
+ removable: e.removable,
147
+ onChipClosed: l[0] || (l[0] = (n) => B(!0))
148
+ }, null, 8, ["left-icon", "label", "removable"])
149
+ ]),
150
+ _: 1
151
+ }, 8, ["modelValue", "predefined-range"]),
152
+ e.compare ? (i(), D(w, {
153
+ key: 0,
154
+ modelValue: a.value,
155
+ "onUpdate:modelValue": l[2] || (l[2] = (n) => a.value = n),
156
+ "compare-type": d.value,
157
+ "onUpdate:compareType": l[3] || (l[3] = (n) => d.value = n),
158
+ "show-predefined-range": "",
159
+ "compare-target": t.value,
160
+ onSelectComparison: $
161
+ }, {
162
+ "trigger-button": R(() => [
163
+ y(O, {
164
+ label: `${u(p)("report.common.compare")}: ${u(T)({
165
+ startDate: a.value.startDate ?? null,
166
+ endDate: a.value.endDate ?? null,
167
+ locale: u(M)()
168
+ })}`
169
+ }, null, 8, ["label"])
170
+ ]),
171
+ _: 1
172
+ }, 8, ["modelValue", "compare-type", "compare-target"])) : S("", !0)
173
+ ]);
174
+ };
175
+ }
176
+ });
177
+ export {
178
+ K as _,
179
+ O as a
180
+ };
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as u, computed as f, resolveComponent as p, createElementBlock as s, 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-BdzurgE4.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DpFJ_jYh.js";
3
3
  import { useBreakpoints as b } from "@feedmepos/ui-library";
4
4
  import { storeToRefs as C } from "pinia";
5
- import { u as q, f as w } from "./global-loader-CEOgl5uZ.js";
5
+ import { u as q, f as w } from "./vue-i18n-CbAseuRE.js";
6
6
  import { useRoute as B } from "vue-router";
7
7
  const $ = {
8
8
  key: 1,