@feedmepos/mf-report 5.4.8 → 5.4.9

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 (30) hide show
  1. package/dist/App-kcBxi_q1.js +133 -0
  2. package/dist/BaseDialog.vue_vue_type_script_setup_true_lang-MQNSV-xg.js +59 -0
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-UFE8dqQT.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-pLx3gB7Y.js} +47 -45
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-2KbsvIja.js → Default.vue_vue_type_script_setup_true_lang-1lLJDGcu.js} +9 -8
  5. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-qHXYaBLd.js → DynamicWidget.vue_vue_type_script_setup_true_lang-yMu4zk2g.js} +11 -8
  6. package/dist/{InsightView-m2mp2Vwn.js → InsightView-GIj2fwLa.js} +9 -8
  7. package/dist/{Integration-v7Vx19wK.js → Integration-YTGIj4Ae.js} +31 -29
  8. package/dist/{Integrations-5bMwLGDG.js → Integrations-drS5pVEz.js} +27 -25
  9. package/dist/{Layout-OsxZkd-c.js → Layout-G0qypnQY.js} +1 -1
  10. package/dist/LocationSelect.vue_vue_type_script_setup_true_lang-PJJaEOeS.js +7994 -0
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-rG63dKPQ.js → MenuTab.vue_vue_type_script_setup_true_lang-UHwO2Vm5.js} +39 -35
  12. package/dist/NavigationTab.vue_vue_type_script_setup_true_lang-LsUKLCAW.js +26885 -0
  13. package/dist/{OverviewView-bcZDNzyp.js → OverviewView-1MQAX-5G.js} +4 -4
  14. package/dist/{Report-QoZGgCFl.js → Report-WYkPEjUh.js} +47 -45
  15. package/dist/{ReportEditor-4XSyHMDr.js → ReportEditor-6EAPap-S.js} +17 -15
  16. package/dist/{ReportView-sA3IRxvk.js → ReportView-aky03f2y.js} +36 -33
  17. package/dist/{Setting-ciEdGVzI.js → Setting-IV26Ng45.js} +36 -34
  18. package/dist/{TileEditor-oIzGozIp.js → TileEditor-Qn4ZRR39.js} +20 -15
  19. package/dist/{TransitionFade-u0ffhMND.js → TransitionFade-_dSKw899.js} +65 -62
  20. package/dist/_plugin-vue_export-helper-hUChTQA_.js +9 -0
  21. package/dist/app.js +85 -3
  22. package/dist/global-loader-hSpvBPX1.js +3265 -0
  23. package/dist/index-JAqUtp7I.js +143 -0
  24. package/dist/message-dialog-yXvmoAPz.js +20 -0
  25. package/dist/report-schema-IBXDBT4U.js +31 -0
  26. package/dist/{timeFormat-KhCrm7K_.js → timeFormat-yx3JOmGm.js} +1 -1
  27. package/dist/v4-Ihuna0O0.js +17578 -0
  28. package/package.json +6 -4
  29. package/dist/LocationSelect.vue_vue_type_script_setup_true_lang-CXdNe2NF.js +0 -84
  30. package/dist/app-hTKIk5PV.js +0 -48128
@@ -0,0 +1,133 @@
1
+ import { defineComponent as U, resolveComponent as w, openBlock as c, createBlock as x, unref as u, isRef as K, withCtx as _, createTextVNode as Q, toDisplayString as V, createElementVNode as E, createVNode as k, computed as q, watch as y, onBeforeMount as W, onMounted as z, onBeforeUnmount as X, 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-hSpvBPX1.js";
4
+ import { storeToRefs as b } from "pinia";
5
+ import { u as se, a as ae } from "./v4-Ihuna0O0.js";
6
+ import { u as ue } from "./report-schema-IBXDBT4U.js";
7
+ import { _ as le, u as ie } from "./NavigationTab.vue_vue_type_script_setup_true_lang-LsUKLCAW.js";
8
+ import { u as L } from "./message-dialog-yXvmoAPz.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__ */ U({
11
+ __name: "Dialog",
12
+ setup(D) {
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(), x(f, {
17
+ modelValue: u(r),
18
+ "onUpdate:modelValue": n[0] || (n[0] = (p) => K(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
+ E("p", me, V(u(l)), 1)
27
+ ]),
28
+ "dialog-footer": _(() => [
29
+ n[1] || (n[1] = E("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__ */ U({
45
+ __name: "App",
46
+ setup(D) {
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: I } = te(), { version: s } = b(se()), { getSettings: N } = oe(), a = ce(), { promptLoader: O } = re(), T = q(() => `https://portal-v1.feedme.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.feedme.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
+ }), W(() => {
78
+ d(le);
79
+ }), z(() => {
80
+ console.log("5.4.9", !0), window.addEventListener("message", C), window.addEventListener("message", $);
81
+ });
82
+ const F = ae(), B = ie();
83
+ X(() => {
84
+ window.removeEventListener("message", C), window.removeEventListener("message", $), F.$dispose(), B.$dispose();
85
+ });
86
+ const { getReports: J, getOverviewReport: G, getReportConfig: R } = F, { getSchema: P } = ue(), { fetchSchedules: j } = B, { init: H } = ne(), g = Y("v5");
87
+ return y(
88
+ () => o.value,
89
+ () => {
90
+ o.value !== "" && O(async () => {
91
+ await H({
92
+ apiKey: "6GhcttsJ9Rj9cTevcdrpin",
93
+ url: "https://flag.feedme.farm/api/v1/",
94
+ enableAnalytics: !1,
95
+ cacheFlags: !1
96
+ });
97
+ const t = await R();
98
+ g.value = t.version, s.value = g.value, await Promise.all([
99
+ I(),
100
+ R(),
101
+ G(),
102
+ J(),
103
+ P(),
104
+ j(),
105
+ p(),
106
+ f(),
107
+ N()
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(), x(v, { key: 2 }))
127
+ ], 64);
128
+ };
129
+ }
130
+ });
131
+ export {
132
+ Ce as default
133
+ };
@@ -0,0 +1,59 @@
1
+ import { defineComponent as y, mergeModels as i, useModel as c, watch as v, resolveComponent as d, openBlock as g, createBlock as b, withCtx as n, createTextVNode as B, toDisplayString as V, renderSlot as C, createElementVNode as w, createVNode as m } from "vue";
2
+ const k = /* @__PURE__ */ y({
3
+ __name: "BaseDialog",
4
+ props: /* @__PURE__ */ i({
5
+ title: {
6
+ type: String,
7
+ default: "Title"
8
+ },
9
+ primaryButtonLabel: {
10
+ type: String,
11
+ default: "Confirm"
12
+ },
13
+ secondaryButtonLabel: {
14
+ type: String,
15
+ default: "Cancel"
16
+ }
17
+ }, {
18
+ modelValue: { type: Boolean, required: !0 },
19
+ modelModifiers: {}
20
+ }),
21
+ emits: /* @__PURE__ */ i(["confirm"], ["update:modelValue"]),
22
+ setup(a, { emit: u }) {
23
+ const t = c(a, "modelValue"), o = a, s = u;
24
+ return v(t, () => {
25
+ t.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
26
+ }), (p, e) => {
27
+ const r = d("FmButton"), f = d("FmDialog");
28
+ return g(), b(f, {
29
+ modelValue: t.value,
30
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => t.value = l),
31
+ overlay: ""
32
+ }, {
33
+ "dialog-header": n(() => [
34
+ B(V(o.title), 1)
35
+ ]),
36
+ default: n(() => [
37
+ C(p.$slots, "content")
38
+ ]),
39
+ "dialog-footer": n(() => [
40
+ e[3] || (e[3] = w("div", { class: "grow" }, null, -1)),
41
+ m(r, {
42
+ label: o.secondaryButtonLabel,
43
+ variant: "tertiary",
44
+ onClick: e[0] || (e[0] = (l) => t.value = !1)
45
+ }, null, 8, ["label"]),
46
+ m(r, {
47
+ label: o.primaryButtonLabel,
48
+ variant: "primary",
49
+ onClick: e[1] || (e[1] = (l) => s("confirm"))
50
+ }, null, 8, ["label"])
51
+ ]),
52
+ _: 3
53
+ }, 8, ["modelValue"]);
54
+ };
55
+ }
56
+ });
57
+ export {
58
+ k as _
59
+ };
@@ -1,6 +1,7 @@
1
- import { defineComponent as _, resolveComponent as f, openBlock as r, createBlock as s, withCtx as g, createCommentVNode as D, createElementVNode as x, toDisplayString as F, mergeModels as M, useModel as i, ref as C, watch as b, createElementBlock as P, createVNode as p, unref as I } from "vue";
2
- import { J as T, C as O, d as n, K as w } from "./app-hTKIk5PV.js";
3
- const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitespace-nowrap" }, V = /* @__PURE__ */ _({
1
+ import { defineComponent as k, resolveComponent as f, openBlock as d, createBlock as c, withCtx as g, createCommentVNode as D, createElementVNode as _, toDisplayString as x, renderSlot as M, mergeModels as P, useModel as i, ref as h, watch as C, createElementBlock as T, createVNode as p, unref as I } from "vue";
2
+ import { v as O, C as $, f as n } from "./global-loader-hSpvBPX1.js";
3
+ import { b as w } from "./index-JAqUtp7I.js";
4
+ const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitespace-nowrap" }, V = /* @__PURE__ */ k({
4
5
  __name: "FilterChip",
5
6
  props: {
6
7
  label: {
@@ -16,45 +17,46 @@ const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitesp
16
17
  default: ""
17
18
  }
18
19
  },
19
- setup(t) {
20
- const l = t;
21
- return (d, o) => {
22
- const e = f("FmIcon"), a = f("FmChip");
23
- return r(), s(a, { class: "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-fit" }, {
20
+ setup(a) {
21
+ const l = a;
22
+ return (r, o) => {
23
+ const e = f("FmIcon"), t = f("FmChip");
24
+ return d(), c(t, { class: "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-fit" }, {
24
25
  default: g(() => [
25
- t.leftIcon ? (r(), s(e, {
26
+ a.leftIcon ? (d(), c(e, {
26
27
  key: 0,
27
28
  name: l.leftIcon,
28
29
  size: "sm",
29
30
  outline: ""
30
31
  }, null, 8, ["name"])) : D("", !0),
31
- x("p", B, F(l.label), 1),
32
- t.rightIcon ? (r(), s(e, {
32
+ _("p", B, x(l.label), 1),
33
+ a.rightIcon ? (d(), c(e, {
33
34
  key: 1,
34
- name: t.rightIcon,
35
+ name: a.rightIcon,
35
36
  size: "sm",
36
37
  outline: ""
37
- }, null, 8, ["name"])) : D("", !0)
38
+ }, null, 8, ["name"])) : D("", !0),
39
+ M(r.$slots, "default")
38
40
  ]),
39
- _: 1
41
+ _: 3
40
42
  });
41
43
  };
42
44
  }
43
- }), Y = { class: "flex gap-2 items-center" }, c = "YYYY-MM-DD", N = /* @__PURE__ */ _({
45
+ }), Y = { class: "flex gap-2 items-center" }, s = "YYYY-MM-DD", E = /* @__PURE__ */ k({
44
46
  __name: "DateRangeSelect",
45
- props: /* @__PURE__ */ M({
47
+ props: /* @__PURE__ */ P({
46
48
  compare: {
47
49
  type: Boolean,
48
50
  default: !1
49
51
  },
50
52
  datePredefinedRanges: {
51
53
  type: Array,
52
- default: () => T
54
+ default: () => O
53
55
  }
54
56
  }, {
55
57
  compareType: {
56
58
  type: String,
57
- default: O.PrecedingPeriod
59
+ default: $.PrecedingPeriod
58
60
  },
59
61
  compareTypeModifiers: {},
60
62
  dateRange: {
@@ -75,37 +77,37 @@ const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitesp
75
77
  compareDateRangeModifiers: {}
76
78
  }),
77
79
  emits: ["update:compareType", "update:dateRange", "update:compareDateRange"],
78
- setup(t) {
79
- var v, y, R;
80
- const l = i(t, "compareType"), d = i(t, "dateRange"), o = i(t, "compareDateRange"), e = C({
81
- startDate: (v = n(d.value.startDate)) == null ? void 0 : v.local().format(c),
82
- endDate: (y = n(d.value.endDate)) == null ? void 0 : y.local().format(c)
83
- }), a = C({
84
- startDate: o.value.startDate ? (R = n(o.value.startDate)) == null ? void 0 : R.local().format(c) : void 0,
85
- endDate: o.value.endDate ? n(o.value.endDate).local().format(c) : void 0
80
+ setup(a) {
81
+ var v, y, S;
82
+ const l = i(a, "compareType"), r = i(a, "dateRange"), o = i(a, "compareDateRange"), e = h({
83
+ startDate: (v = n(r.value.startDate)) == null ? void 0 : v.local().format(s),
84
+ endDate: (y = n(r.value.endDate)) == null ? void 0 : y.local().format(s)
85
+ }), t = h({
86
+ startDate: o.value.startDate ? (S = n(o.value.startDate)) == null ? void 0 : S.local().format(s) : void 0,
87
+ endDate: o.value.endDate ? n(o.value.endDate).local().format(s) : void 0
86
88
  });
87
- b([() => e.value], () => {
88
- d.value = {
89
+ C([() => e.value], () => {
90
+ r.value = {
89
91
  startDate: n(e.value.startDate).toISOString(),
90
92
  endDate: n(e.value.endDate).toISOString()
91
93
  };
92
- }), b([() => a.value], () => {
94
+ }), C([() => t.value], () => {
93
95
  o.value = {
94
- startDate: a.value.startDate ? n(a.value.startDate).toISOString() : void 0,
95
- endDate: a.value.endDate ? n(a.value.endDate).toISOString() : void 0
96
+ startDate: t.value.startDate ? n(t.value.startDate).toISOString() : void 0,
97
+ endDate: t.value.endDate ? n(t.value.endDate).toISOString() : void 0
96
98
  };
97
99
  });
98
- function k(S) {
99
- l.value = S;
100
+ function F(R) {
101
+ l.value = R;
100
102
  }
101
- return (S, m) => {
102
- const h = f("FmSimpleDateRangePicker");
103
- return r(), P("div", Y, [
104
- p(h, {
103
+ return (R, m) => {
104
+ const b = f("FmSimpleDateRangePicker");
105
+ return d(), T("div", Y, [
106
+ p(b, {
105
107
  modelValue: e.value,
106
108
  "onUpdate:modelValue": m[0] || (m[0] = (u) => e.value = u),
107
109
  "show-predefined-range": "",
108
- "predefined-range": t.datePredefinedRanges,
110
+ "predefined-range": a.datePredefinedRanges,
109
111
  class: "w-2/6"
110
112
  }, {
111
113
  "trigger-button": g(() => [
@@ -119,20 +121,20 @@ const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitesp
119
121
  ]),
120
122
  _: 1
121
123
  }, 8, ["modelValue", "predefined-range"]),
122
- t.compare ? (r(), s(h, {
124
+ a.compare ? (d(), c(b, {
123
125
  key: 0,
124
- modelValue: a.value,
125
- "onUpdate:modelValue": m[1] || (m[1] = (u) => a.value = u),
126
+ modelValue: t.value,
127
+ "onUpdate:modelValue": m[1] || (m[1] = (u) => t.value = u),
126
128
  "show-predefined-range": "",
127
129
  "compare-target": e.value,
128
130
  "default-compare-type": l.value,
129
- onSelectComparison: k
131
+ onSelectComparison: F
130
132
  }, {
131
133
  "trigger-button": g(() => [
132
134
  p(V, {
133
135
  label: `Compare: ${I(w)({
134
- startDate: a.value.startDate ?? null,
135
- endDate: a.value.endDate ?? null
136
+ startDate: t.value.startDate ?? null,
137
+ endDate: t.value.endDate ?? null
136
138
  })}`
137
139
  }, null, 8, ["label"])
138
140
  ]),
@@ -143,6 +145,6 @@ const B = { class: "fm-typo-en-body-md-600 text-ellipsis overflow-hidden whitesp
143
145
  }
144
146
  });
145
147
  export {
146
- N as _,
148
+ E as _,
147
149
  V as a
148
150
  };
@@ -1,15 +1,16 @@
1
1
  import { defineComponent as u, computed as f, resolveComponent as p, openBlock as r, createElementBlock as s, normalizeClass as d, unref as e, normalizeStyle as n, createBlock as y, createCommentVNode as _, createVNode as k, createElementVNode as x, renderSlot as g } from "vue";
2
- import { c as v, r as h } from "./app-hTKIk5PV.js";
3
- import { useBreakpoints as b } from "@feedmepos/ui-library";
4
- import { storeToRefs as w } from "pinia";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-LsUKLCAW.js";
3
+ import { useBreakpoints as h } from "@feedmepos/ui-library";
4
+ import { storeToRefs as b } from "pinia";
5
+ import { d as w } from "./global-loader-hSpvBPX1.js";
5
6
  import { useRoute as q } from "vue-router";
6
7
  const C = {
7
8
  key: 1,
8
9
  class: "flex gap-24 flex-col h-screen w-screen justify-center items-center"
9
- }, V = /* @__PURE__ */ u({
10
+ }, E = /* @__PURE__ */ u({
10
11
  __name: "Default",
11
12
  setup(B) {
12
- const { breakpoints: t } = b(), { isLoading: c } = w(v()), o = q(), a = f(() => !o.query.token && !o.query.busines);
13
+ const { breakpoints: t } = h(), { isLoading: a } = b(w()), o = q(), c = f(() => !o.query.token && !o.query.busines);
13
14
  return (m, l) => {
14
15
  const i = p("FmCircularProgress");
15
16
  return r(), s("div", {
@@ -18,8 +19,8 @@ const C = {
18
19
  height: `calc(100vh - ${e(o).query.token && e(o).query.businessId ? "0" : "64"}px)`
19
20
  })
20
21
  }, [
21
- a.value ? _("", !0) : (r(), y(h, { key: 0 })),
22
- e(c) ? (r(), s("div", C, [
22
+ c.value ? _("", !0) : (r(), y(v, { key: 0 })),
23
+ e(a) ? (r(), s("div", C, [
23
24
  k(i, { size: "xl" }),
24
25
  l[0] || (l[0] = x("span", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Loading data... ", -1))
25
26
  ])) : (r(), s("div", {
@@ -36,5 +37,5 @@ const C = {
36
37
  }
37
38
  });
38
39
  export {
39
- V as _
40
+ E as _
40
41
  };
@@ -1,6 +1,9 @@
1
1
  import { defineComponent as E, useModel as z, computed as i, ref as D, resolveComponent as y, openBlock as h, createElementBlock as S, Fragment as W, renderSlot as U, createVNode as k, createElementVNode as C, toDisplayString as K, unref as q, withCtx as $, createBlock as R, normalizeClass as te, normalizeStyle as ye, createCommentVNode as G, h as fe, renderList as we, mergeModels as Ie, watch as ee, onMounted as Pe, onUnmounted as We, resolveDynamicComponent as Ee, withDirectives as ze, vShow as He } from "vue";
2
- import { W as n, a as _e, e as ne, m as Oe, v as ae, l as he, R as qe, n as Ue, o as je, q as Ge } from "./app-hTKIk5PV.js";
2
+ import { W as n, v as ae, R as Oe, g as qe, d as Ue, q as je } from "./v4-Ihuna0O0.js";
3
+ import { a as _e, u as ne } from "./global-loader-hSpvBPX1.js";
4
+ import { d as he } from "./index-JAqUtp7I.js";
3
5
  import { storeToRefs as se } from "pinia";
6
+ import { _ as Ge } from "./_plugin-vue_export-helper-hUChTQA_.js";
4
7
  import { _ as ge } from "./NoData.vue_vue_type_script_setup_true_lang-FeKqFs4A.js";
5
8
  import { useBreakpoints as Je, useSnackbar as Ke } from "@feedmepos/ui-library";
6
9
  var re = /* @__PURE__ */ ((l) => (l.line = "LINE", l.bar = "BAR", l))(re || {}), A = /* @__PURE__ */ ((l) => (l.top = "TOP", l.bottom = "BOTTOM", l))(A || {});
@@ -350,7 +353,7 @@ function ia(l, e) {
350
353
  const r = y("FmMenuDivider");
351
354
  return h(), R(r);
352
355
  }
353
- const ua = /* @__PURE__ */ Oe(na, [["render", ia]]), ca = { class: "my-4" }, ma = {
356
+ const ua = /* @__PURE__ */ Ge(na, [["render", ia]]), ca = { class: "my-4" }, ma = {
354
357
  class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
355
358
  style: { backgroundColor: "#f9f9f9" }
356
359
  }, da = { class: "font-bold" }, pa = { class: "text-fm-color-neutral-gray-300" }, va = /* @__PURE__ */ E({
@@ -697,7 +700,7 @@ const wa = /* @__PURE__ */ E({
697
700
  }, Ca = {
698
701
  key: 2,
699
702
  class: "flex"
700
- }, La = /* @__PURE__ */ E({
703
+ }, $a = /* @__PURE__ */ E({
701
704
  __name: "DynamicWidget",
702
705
  props: /* @__PURE__ */ Ie({
703
706
  index: {
@@ -850,7 +853,7 @@ const wa = /* @__PURE__ */ E({
850
853
  try {
851
854
  e.value = !0, X && X.abort(), X = new AbortController();
852
855
  const f = X.signal;
853
- x.value = await Ge(_.value, f), a.value = ae(), e.value = !1;
856
+ x.value = await je(_.value, f), a.value = ae(), e.value = !1;
854
857
  } catch (f) {
855
858
  x.value = null, f.code !== "ERR_CANCELED" && (ce.open({ message: `Invalid chart ${_.value.type}`, type: "error" }), console.log(f), e.value = !1);
856
859
  }
@@ -874,11 +877,11 @@ const wa = /* @__PURE__ */ E({
874
877
  const s = u.value + 1;
875
878
  s >= 0 && s < O.value.length && (o.value = O.value[s].value);
876
879
  }
877
- const Fe = Object.values(qe).map((s) => ({
878
- label: Ue(s),
880
+ const Fe = Object.values(Oe).map((s) => ({
881
+ label: qe(s),
879
882
  value: s,
880
883
  onClick: async () => {
881
- await je(s, d.index);
884
+ await Ue(s, d.index);
882
885
  }
883
886
  })), Le = _.value.type === n.Spacer ? "flat" : "outlined", Re = _.value.type === n.Spacer ? "p-0" : "p-16";
884
887
  return (s, f) => {
@@ -988,6 +991,6 @@ const wa = /* @__PURE__ */ E({
988
991
  });
989
992
  export {
990
993
  A as R,
991
- La as _,
994
+ $a as _,
992
995
  oe as g
993
996
  };
@@ -2,14 +2,15 @@ var Xo = Object.defineProperty;
2
2
  var Ko = (i, t, e) => t in i ? Xo(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
3
3
  var k = (i, t, e) => (Ko(i, typeof t != "symbol" ? t + "" : t, e), e);
4
4
  import { ref as Ht, defineComponent as ne, watch as ri, computed as wt, onMounted as qo, openBlock as z, createElementBlock as U, createElementVNode as R, renderSlot as jn, toDisplayString as ft, resolveDirective as $n, Fragment as Ei, renderList as Ii, withDirectives as Ge, createVNode as tt, createCommentVNode as Mt, normalizeClass as Ze, resolveComponent as li, unref as Qt, useModel as Go, createBlock as ue, resolveDynamicComponent as Zo, withCtx as Jt, createTextVNode as Qo, isRef as ki, nextTick as Jo } from "vue";
5
- import { _ as ta } from "./Default.vue_vue_type_script_setup_true_lang-2KbsvIja.js";
5
+ import { _ as ta } from "./Default.vue_vue_type_script_setup_true_lang-1lLJDGcu.js";
6
6
  import { _ as ea } from "./HeaderTab.vue_vue_type_script_setup_true_lang--56TBWoS.js";
7
- import { _ as ia } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-UFE8dqQT.js";
8
- import { d as zi, e as Yn, F as Un, f as Xn, g as sa, a as na } from "./app-hTKIk5PV.js";
7
+ import { _ as ia } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-pLx3gB7Y.js";
8
+ import { f as zi, u as Yn, F as Un, g as Xn, a as sa } from "./global-loader-hSpvBPX1.js";
9
9
  import { storeToRefs as Kn } from "pinia";
10
+ import { c as na } from "./index-JAqUtp7I.js";
10
11
  import { useBreakpoints as oa, components as aa, useSnackbar as ra } from "@feedmepos/ui-library";
11
12
  import { _ as la } from "./NoData.vue_vue_type_script_setup_true_lang-FeKqFs4A.js";
12
- import { _ as ca } from "./LocationSelect.vue_vue_type_script_setup_true_lang-CXdNe2NF.js";
13
+ import { _ as ca } from "./LocationSelect.vue_vue_type_script_setup_true_lang-PJJaEOeS.js";
13
14
  function ha({ start: i, end: t }) {
14
15
  return `${zi(t).format("DD MMM")}, ${zi(t).format("YYYY")}`;
15
16
  }
@@ -9444,7 +9445,7 @@ const xd = { class: "flex flex-col h-full overflow-hidden" }, _d = { class: "fle
9444
9445
  );
9445
9446
  }
9446
9447
  }
9447
- }, l = wt(() => ({ categories: a.value })), c = wt(() => sa(i.widget.category));
9448
+ }, l = wt(() => ({ categories: a.value })), c = wt(() => na(i.widget.category));
9448
9449
  return (h, d) => {
9449
9450
  var p, m;
9450
9451
  const u = li("FmChip"), f = li("FmIcon"), g = $n("wave");
@@ -9579,10 +9580,10 @@ const xd = { class: "flex flex-col h-full overflow-hidden" }, _d = { class: "fle
9579
9580
  }, iu = {
9580
9581
  key: 0,
9581
9582
  class: "flex flex-row flex-wrap gap-24 px-24 py-16"
9582
- }, fu = /* @__PURE__ */ ne({
9583
+ }, gu = /* @__PURE__ */ ne({
9583
9584
  __name: "InsightView",
9584
9585
  setup(i) {
9585
- const { dateRange: t, compareDateRange: e, locations: s, selectedLocationIds: n, business: o } = Kn(na()), a = Ht([]), r = Ht(null), l = Ht(!1), c = ra();
9586
+ const { dateRange: t, compareDateRange: e, locations: s, selectedLocationIds: n, business: o } = Kn(sa()), a = Ht([]), r = Ht(null), l = Ht(!1), c = ra();
9586
9587
  ri(
9587
9588
  o,
9588
9589
  () => {
@@ -9687,5 +9688,5 @@ const xd = { class: "flex flex-col h-full overflow-hidden" }, _d = { class: "fle
9687
9688
  }
9688
9689
  });
9689
9690
  export {
9690
- fu as default
9691
+ gu as default
9691
9692
  };