@feedmepos/mf-report 5.4.15-beta.1 → 5.4.15-beta.3

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 (45) hide show
  1. package/dist/App-DufL3Y8h.js +152 -0
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DLDk5l4R.js +162 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js → Default.vue_vue_type_script_setup_true_lang-DVLxkOOQ.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-C29g9w6o.js +999 -0
  5. package/dist/{InsightView-D78TK2E8.js → InsightView-tyeJBlRm.js} +1051 -1049
  6. package/dist/Integration-ILSIf-OL.js +3695 -0
  7. package/dist/Integrations-DwgNrM3U.js +334 -0
  8. package/dist/{Layout-DERpCrQk.js → Layout-Bw1oh6Q-.js} +1 -1
  9. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DurYBXa5.js → LocationSelect.vue_vue_type_script_setup_true_lang-BFj4d-UF.js} +1861 -1859
  10. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DzZeasAK.js +277 -0
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C8yzWDXs.js → NavigationTab.vue_vue_type_script_setup_true_lang-_eC_tMk_.js} +5526 -5482
  12. package/dist/NoData.vue_vue_type_script_setup_true_lang-BtQobm-7.js +31 -0
  13. package/dist/OverviewView-Dl8oOobn.js +61 -0
  14. package/dist/Report-BqD8KVZ8.js +424 -0
  15. package/dist/ReportEditor-DkzFUgbO.js +532 -0
  16. package/dist/ReportView-DpWZHV0o.js +169 -0
  17. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-C3VG1mi_.js +104 -0
  18. package/dist/Setting-CYrg_50p.js +320 -0
  19. package/dist/TileEditor-CDrzLbqc.js +2320 -0
  20. package/dist/{TransitionFade-BLDfpF7R.js → TransitionFade-D19wC3tb.js} +225 -220
  21. package/dist/app.js +915 -27
  22. package/dist/{global-loader-CMC9fgBi.js → global-loader-C3JC7z-H.js} +4966 -2240
  23. package/dist/index-9IDzTnHw.js +147 -0
  24. package/dist/{report-schema-G0x3CoJb.js → report-schema-1zQJbLyB.js} +4 -4
  25. package/dist/style.css +1 -1
  26. package/dist/timeFormat-CjNvJMgk.js +9 -0
  27. package/dist/{v4-DF7wffYN.js → v4-D29FkHfi.js} +2666 -1927
  28. package/package.json +1 -1
  29. package/dist/App-mcSgbcVY.js +0 -133
  30. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DPuhMR6i.js +0 -160
  31. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-B6IzlHmr.js +0 -996
  32. package/dist/HeaderTab.vue_vue_type_script_setup_true_lang-B5VBDNwX.js +0 -19
  33. package/dist/Integration-Cm6_YEEE.js +0 -3554
  34. package/dist/Integrations-WWnSho0Q.js +0 -334
  35. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js +0 -261
  36. package/dist/NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js +0 -30
  37. package/dist/OverviewView-D7zAR7_7.js +0 -60
  38. package/dist/Report-BnX5amn0.js +0 -409
  39. package/dist/ReportEditor-DW7uWg_a.js +0 -530
  40. package/dist/ReportView-xSaJA5F6.js +0 -166
  41. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js +0 -103
  42. package/dist/Setting-D8JspXTN.js +0 -326
  43. package/dist/TileEditor-DQ8C5I_M.js +0 -2301
  44. package/dist/index-SmIkb24L.js +0 -143
  45. package/dist/timeFormat-BF-F4Rnt.js +0 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-report",
3
- "version": "5.4.15-beta.1",
3
+ "version": "5.4.15-beta.3",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -1,133 +0,0 @@
1
- import { defineComponent as N, resolveComponent as w, createBlock as U, openBlock as c, unref as u, isRef as H, withCtx as _, createElementVNode as R, createVNode as k, toDisplayString as V, createTextVNode as Q, computed as q, watch as y, onBeforeMount as X, onMounted as j, onBeforeUnmount as z, ref as Y, createElementBlock as S, Fragment as Z } from "vue";
2
- import { useCoreStore as h } from "@feedmepos/mf-common";
3
- import { u as M, a as ee, b as te, c as oe, d as re, e as ne } from "./global-loader-CMC9fgBi.js";
4
- import { storeToRefs as b } from "pinia";
5
- import { u as se, a as ae } from "./v4-DF7wffYN.js";
6
- import { u as ue } from "./report-schema-G0x3CoJb.js";
7
- import { _ as le, u as ie } from "./NavigationTab.vue_vue_type_script_setup_true_lang-C8yzWDXs.js";
8
- import { u as L } from "./message-dialog-UoMWOnil.js";
9
- import { useRoute as ce } from "vue-router";
10
- const me = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, de = /* @__PURE__ */ N({
11
- __name: "Dialog",
12
- setup(x) {
13
- const o = L(), { isOpened: r, message: l, title: i } = b(L());
14
- return (m, n) => {
15
- const d = w("FmButton"), f = w("FmDialog");
16
- return c(), U(f, {
17
- modelValue: u(r),
18
- "onUpdate:modelValue": n[0] || (n[0] = (p) => H(r) ? r.value = p : null),
19
- overlay: "",
20
- "close-button": !1
21
- }, {
22
- "dialog-header": _(() => [
23
- Q(V(u(i)), 1)
24
- ]),
25
- default: _(() => [
26
- R("p", me, V(u(l)), 1)
27
- ]),
28
- "dialog-footer": _(() => [
29
- n[1] || (n[1] = R("div", { class: "grow" }, null, -1)),
30
- k(d, {
31
- label: "Cancel",
32
- variant: "tertiary",
33
- onClick: u(o).dismiss
34
- }, null, 8, ["onClick"]),
35
- k(d, {
36
- label: "Confirm",
37
- onClick: u(o).confirm
38
- }, null, 8, ["onClick"])
39
- ]),
40
- _: 1
41
- }, 8, ["modelValue"]);
42
- };
43
- }
44
- }), ve = ["src"], fe = ["src"], Ce = /* @__PURE__ */ N({
45
- __name: "App",
46
- setup(x) {
47
- const { businessId: o, token: r, country: l } = b(M()), { sessionUser: i, currentBusiness: m, currentCountry: n, registerSidebarComponent: d } = h(), { getRestaurantAndWarehouse: f, getBusinessSetting: p } = ee(), { getFeatureFlags: D } = te(), { version: s } = b(se()), { getSettings: I } = oe(), a = ce(), { promptLoader: O } = re(), T = q(() => `https://portal-v1.feedmedev.cc/b/${o.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${r.value}&v2=true&reportV5Button=true`), A = q(() => `https://report-v4.feedmedev.cc?businessId=${o.value}&country=${l.value}&token=${r.value}&reportV3Button=true`);
48
- y(
49
- // if route query pass in the detail we switch accordingly
50
- [() => a.query, () => m.value, () => i.value],
51
- () => {
52
- var t, e, v;
53
- a.query.token && a.query.businessId && a.query.country ? (o.value = a.query.businessId, r.value = a.query.token, l.value = a.query.country) : ((t = m.value) != null && t.id && (o.value = m.value.id), (e = i.value) != null && e.token && (r.value = (v = i.value) == null ? void 0 : v.token), n.value && (l.value = n.value));
54
- },
55
- { immediate: !0 }
56
- );
57
- function C(t) {
58
- if (typeof t.data == "string")
59
- try {
60
- const e = JSON.parse(t.data);
61
- (e == null ? void 0 : e.token) !== "" && (e == null ? void 0 : e.token) !== void 0 && (r.value = e.token);
62
- } catch (e) {
63
- console.error(e);
64
- }
65
- }
66
- function $(t) {
67
- if (typeof t.data == "string")
68
- try {
69
- const e = JSON.parse(t.data);
70
- (e == null ? void 0 : e.v5) === !0 ? s.value = g.value : (e == null ? void 0 : e.v3) === !0 && (s.value = "v3");
71
- } catch (e) {
72
- console.error(e);
73
- }
74
- }
75
- y(s, () => {
76
- ["v3", "v4"].includes(s.value) ? h().hideSidebarToggle(!0) : h().hideSidebarToggle(!1);
77
- }), X(() => {
78
- d(le);
79
- }), j(() => {
80
- console.log("5.4.15-beta.1", !0), window.addEventListener("message", C), window.addEventListener("message", $);
81
- });
82
- const F = ae(), B = ie();
83
- z(() => {
84
- window.removeEventListener("message", C), window.removeEventListener("message", $), F.$dispose(), B.$dispose();
85
- });
86
- const { getReports: J, getOverviewReport: W, getReportConfig: E } = F, { getSchema: G } = ue(), { fetchSchedules: K } = B, { init: P } = ne(), g = Y("v5");
87
- return y(
88
- () => o.value,
89
- () => {
90
- o.value !== "" && O(async () => {
91
- await P({
92
- apiKey: "MaGoXrEWuEJNpWgKTqseee",
93
- url: "https://flag.feedme.farm/api/v1/",
94
- enableAnalytics: !1,
95
- cacheFlags: !1
96
- });
97
- const t = await E();
98
- g.value = t.version, s.value = g.value, await Promise.all([
99
- D(),
100
- E(),
101
- W(),
102
- J(),
103
- G(),
104
- K(),
105
- p(),
106
- f(),
107
- I()
108
- ]);
109
- });
110
- },
111
- {
112
- immediate: !0
113
- }
114
- ), (t, e) => {
115
- const v = w("router-view");
116
- return c(), S(Z, null, [
117
- k(de),
118
- u(s) === "v3" ? (c(), S("iframe", {
119
- key: 0,
120
- class: "bg-white h-full w-full",
121
- src: T.value
122
- }, null, 8, ve)) : u(s) === "v4" ? (c(), S("iframe", {
123
- key: 1,
124
- class: "bg-white h-full w-full",
125
- src: A.value
126
- }, null, 8, fe)) : (c(), U(v, { key: 2 }))
127
- ], 64);
128
- };
129
- }
130
- });
131
- export {
132
- Ce as default
133
- };
@@ -1,160 +0,0 @@
1
- import { defineComponent as V, resolveComponent as f, createBlock as s, openBlock as d, withCtx as D, createCommentVNode as g, createElementVNode as F, renderSlot as Y, toDisplayString as _, ref as v, mergeModels as x, useModel as i, watch as C, createElementBlock as P, createVNode as p, unref as I } from "vue";
2
- import { g as n, y as T, C as $ } from "./global-loader-CMC9fgBi.js";
3
- import { b as M } from "./index-SmIkb24L.js";
4
- const O = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitespace-nowrap" }, w = /* @__PURE__ */ V({
5
- __name: "FilterChip",
6
- props: {
7
- label: {
8
- type: String,
9
- default: ""
10
- },
11
- leftIcon: {
12
- type: String,
13
- default: ""
14
- },
15
- rightIcon: {
16
- type: String,
17
- default: ""
18
- }
19
- },
20
- setup(t) {
21
- const r = t;
22
- return (l, o) => {
23
- const e = f("FmIcon"), a = f("FmChip");
24
- return d(), s(a, { class: "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-fit" }, {
25
- default: D(() => [
26
- t.leftIcon ? (d(), s(e, {
27
- key: 0,
28
- name: r.leftIcon,
29
- size: "sm",
30
- outline: ""
31
- }, null, 8, ["name"])) : g("", !0),
32
- F("p", O, _(r.label), 1),
33
- t.rightIcon ? (d(), s(e, {
34
- key: 1,
35
- name: t.rightIcon,
36
- size: "sm",
37
- outline: ""
38
- }, null, 8, ["name"])) : g("", !0),
39
- Y(l.$slots, "default")
40
- ]),
41
- _: 3
42
- });
43
- };
44
- }
45
- });
46
- function E({ start: t, end: r }) {
47
- return `${n(r).format("DD MMM")}, ${n(r).format("YYYY")}`;
48
- }
49
- v(!0);
50
- const B = { class: "flex gap-2 items-center" }, m = "YYYY-MM-DD", U = /* @__PURE__ */ V({
51
- __name: "DateRangeSelect",
52
- props: /* @__PURE__ */ x({
53
- compare: {
54
- type: Boolean,
55
- default: !1
56
- },
57
- datePredefinedRanges: {
58
- type: Array,
59
- default: () => T
60
- }
61
- }, {
62
- compareType: {
63
- type: String,
64
- default: $.PrecedingPeriod
65
- },
66
- compareTypeModifiers: {},
67
- dateRange: {
68
- type: Object,
69
- default: () => ({
70
- startDate: void 0,
71
- endDate: void 0
72
- })
73
- },
74
- dateRangeModifiers: {},
75
- compareDateRange: {
76
- type: Object,
77
- default: () => ({
78
- startDate: void 0,
79
- endDate: void 0
80
- })
81
- },
82
- compareDateRangeModifiers: {}
83
- }),
84
- emits: ["update:compareType", "update:dateRange", "update:compareDateRange"],
85
- setup(t) {
86
- var y, R, S;
87
- const r = i(t, "compareType"), l = i(t, "dateRange"), o = i(t, "compareDateRange"), e = v({
88
- startDate: (y = n(l.value.startDate)) == null ? void 0 : y.local().format(m),
89
- endDate: (R = n(l.value.endDate)) == null ? void 0 : R.local().format(m)
90
- }), a = v({
91
- startDate: o.value.startDate ? (S = n(o.value.startDate)) == null ? void 0 : S.local().format(m) : void 0,
92
- endDate: o.value.endDate ? n(o.value.endDate).local().format(m) : void 0
93
- });
94
- C(
95
- [() => e.value],
96
- () => {
97
- e.value.endDate || (e.value.endDate = e.value.startDate), l.value = {
98
- startDate: n(e.value.startDate).toISOString(),
99
- endDate: n(e.value.endDate).toISOString()
100
- };
101
- },
102
- { deep: !0 }
103
- ), C([() => a.value], () => {
104
- o.value = {
105
- startDate: a.value.startDate ? n(a.value.startDate).toISOString() : void 0,
106
- endDate: a.value.endDate ? n(a.value.endDate).toISOString() : void 0
107
- };
108
- });
109
- function k(b) {
110
- r.value = b;
111
- }
112
- return (b, u) => {
113
- const h = f("FmSimpleDateRangePicker");
114
- return d(), P("div", B, [
115
- p(h, {
116
- modelValue: e.value,
117
- "onUpdate:modelValue": u[0] || (u[0] = (c) => e.value = c),
118
- "show-predefined-range": "",
119
- "predefined-range": t.datePredefinedRanges,
120
- class: "w-2/6"
121
- }, {
122
- "trigger-button": D(() => [
123
- p(w, {
124
- "left-icon": "calendar_month",
125
- label: `${I(M)({
126
- startDate: e.value.startDate ?? "",
127
- endDate: e.value.endDate ?? ""
128
- })}`
129
- }, null, 8, ["label"])
130
- ]),
131
- _: 1
132
- }, 8, ["modelValue", "predefined-range"]),
133
- t.compare ? (d(), s(h, {
134
- key: 0,
135
- modelValue: a.value,
136
- "onUpdate:modelValue": u[1] || (u[1] = (c) => a.value = c),
137
- "show-predefined-range": "",
138
- "compare-target": e.value,
139
- "default-compare-type": r.value,
140
- onSelectComparison: k
141
- }, {
142
- "trigger-button": D(() => [
143
- p(w, {
144
- label: `Compare: ${I(M)({
145
- startDate: a.value.startDate ?? null,
146
- endDate: a.value.endDate ?? null
147
- })}`
148
- }, null, 8, ["label"])
149
- ]),
150
- _: 1
151
- }, 8, ["modelValue", "compare-target", "default-compare-type"])) : g("", !0)
152
- ]);
153
- };
154
- }
155
- });
156
- export {
157
- U as _,
158
- w as a,
159
- E as f
160
- };