@feedmepos/mf-report 5.8.2-beta.0 → 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-CVBF-RIq.js → App-CQsY_29Q.js} +17 -18
  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-CwNa_c74.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-D6X9jnLz.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-0ZxLP82K.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-D1VWyu4i.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-BFjjTkkR.js → OverviewView-DeGcbroH.js} +5 -5
  13. package/dist/{Report-Cvoqjnpe.js → Report-Do9-H4EW.js} +4 -4
  14. package/dist/ReportEditor-D4bnl00E.js +968 -0
  15. package/dist/{ReportView-6niCdR8K.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-BidP77Xr.js → Setting-DIAFop5l.js} +26 -23
  18. package/dist/TileEditor-DGhgxgTD.js +3080 -0
  19. package/dist/{TransitionFade-4Zow9tAu.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-CLzZSDqm.js → v4-ZW3e7y3R.js} +1955 -1844
  24. package/dist/{global-loader-BQlMgPFO.js → vue-i18n-CbAseuRE.js} +2057 -1976
  25. package/package.json +1 -1
  26. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-2O6NpHjE.js +0 -162
  27. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DW-6QTKl.js +0 -1417
  28. package/dist/Integration-oTDRNhG8.js +0 -4751
  29. package/dist/Integrations-DN2WNYXH.js +0 -334
  30. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DI3QDb25.js +0 -101
  31. package/dist/NoData.vue_vue_type_script_setup_true_lang-C10GhV_H.js +0 -31
  32. package/dist/ReportEditor-DkdI7ZmZ.js +0 -621
  33. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-B-9VcGRC.js +0 -104
  34. package/dist/TileEditor-DCNCfcEY.js +0 -3016
  35. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  36. package/dist/index-Dw6wKcLo.js +0 -147
  37. package/dist/report-schema-IaDHay9I.js +0 -31
@@ -1,16 +1,15 @@
1
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-BQlMgPFO.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-CLzZSDqm.js";
6
- import { u as ce } from "./report-schema-IaDHay9I.js";
7
- import { _ as me, u as de } from "./NavigationTab.vue_vue_type_script_setup_true_lang-D1VWyu4i.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),
@@ -42,7 +41,7 @@ const ve = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, fe
42
41
  }
43
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: 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`);
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,11 +91,11 @@ 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-beta.0", !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 E = ie(), L = de();
98
+ const E = ie(), L = me();
100
99
  M(() => {
101
100
  window.removeEventListener("message", F), window.removeEventListener("message", B), E.$dispose(), L.$dispose();
102
101
  });
@@ -146,5 +145,5 @@ const ge = ["src"], he = ["src"], Fe = /* @__PURE__ */ O({
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-D1VWyu4i.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-BQlMgPFO.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,