@feedmepos/mf-report 5.22.1-remy.1 → 5.22.1-remy.2

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-cuHcpcZw.js → App-DllSHrhi.js} +10 -10
  2. package/dist/BaseDialog.vue_vue_type_script_setup_true_lang-BqaTjSqX.js +315 -0
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-cfshXMB2.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-DMnXUzDy.js} +37 -36
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-BhMWXLug.js → Default.vue_vue_type_script_setup_true_lang-Da4Qj31I.js} +12 -11
  5. package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-fzO5gzwh.js → FilterSelector.vue_vue_type_script_setup_true_lang-CrDNlz99.js} +236 -235
  6. package/dist/{InsightView-DJJJmFkl.js → InsightView-D_V8GCdN.js} +17 -16
  7. package/dist/{Integration-D93eQCHy.js → Integration-F1OWPe2v.js} +5 -4
  8. package/dist/{Integrations-jn20KmcD.js → Integrations-6h3Ynyhx.js} +28 -27
  9. package/dist/{Layout-B1jaac85.js → Layout-D4Hl2RVc.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-BrCMbeEl.js → MenuTab.vue_vue_type_script_setup_true_lang-BpSxzEVb.js} +9 -9
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BZVeEoDt.js → NavigationTab.vue_vue_type_script_setup_true_lang-DCSjuXmi.js} +98 -97
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-BUoYdn5S.js → NoData.vue_vue_type_script_setup_true_lang-CW6oZEnc.js} +1 -1
  13. package/dist/{OverviewView-Cuzw4aLB.js → OverviewView-BAhRRNeA.js} +16 -16
  14. package/dist/{Report-P_a1NjPi.js → Report-MYVRo7SL.js} +8 -9
  15. package/dist/{ReportEditor-CkNtAVi9.js → ReportEditor-DgVHv5lv.js} +9 -8
  16. package/dist/{ReportView-BiF6T_r0.js → ReportView-CI-bWx1T.js} +12 -12
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-B2oCOTUH.js → SelectComponent.vue_vue_type_script_setup_true_lang-CiT09OeD.js} +1 -1
  18. package/dist/{Setting-DLnskPxP.js → Setting-cnuWE3wM.js} +7 -6
  19. package/dist/{TileEditor-LFwn_4CK.js → TileEditor-BydbDg_b.js} +18 -17
  20. package/dist/{TransitionFade-12ARL50A.js → TransitionFade-D0ozPmOn.js} +22 -21
  21. package/dist/app-lLf0I618.js +28808 -0
  22. package/dist/app.js +6 -5184
  23. package/dist/vue-i18n-CQAzKJVO.js +2711 -0
  24. package/package.json +1 -1
  25. package/dist/BaseDialog.vue_vue_type_script_setup_true_lang-03nmej58.js +0 -19983
  26. package/dist/vue-i18n-BQN8HgvD.js +0 -6457
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as ee, resolveComponent as U, createBlock as te, openBlock as h, unref as u, isRef as Ie, withCtx as J, createElementVNode as W, createVNode as z, toDisplayString as H, createTextVNode as he, onMounted as ae, watch as R, ref as k, computed as K, onBeforeMount as Re, onBeforeUnmount as qe, createElementBlock as A, Fragment as Oe } from "vue";
2
2
  import { detectLocale as E, useCoreStore as T } from "@feedmepos/mf-common";
3
- import { u as Le, d as i, a as _e, b as X, c as we, e as be, f as Ce, s as ke, g as Ee } from "./vue-i18n-BQN8HgvD.js";
3
+ import { d as i, u as Le, a as X, b as _e, c as Y, e as we, f as be, s as Ce, g as ke, h as Ee, i as Ne } from "./app-lLf0I618.js";
4
4
  import { storeToRefs as q } from "pinia";
5
- import { u as Y, a as Ne, b as Be } from "./BaseDialog.vue_vue_type_script_setup_true_lang-03nmej58.js";
6
- import { _ as Fe, u as $e } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BZVeEoDt.js";
5
+ import { _ as Be, u as Fe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DCSjuXmi.js";
7
6
  import { u as Z } from "./message-dialog-UoMWOnil.js";
7
+ import { u as $e } from "./vue-i18n-CQAzKJVO.js";
8
8
  import { useRoute as xe, useRouter as Je } from "vue-router";
9
9
  const Ae = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Te = /* @__PURE__ */ ee({
10
10
  __name: "Dialog",
11
11
  setup(O) {
12
- const { t: r } = Le(), f = Z(), { isOpened: l, message: S, title: D } = q(Z());
12
+ const { t: r } = $e(), f = Z(), { isOpened: l, message: S, title: D } = q(Z());
13
13
  return (L, g) => {
14
14
  const _ = U("FmButton"), N = U("FmDialog");
15
15
  return h(), te(N, {
@@ -62,13 +62,13 @@ i.locale(E() === "zh-CN" ? "zh-cn" : "en");
62
62
  const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
63
63
  __name: "App",
64
64
  setup(O) {
65
- const { businessId: r, token: f, country: l } = q(_e()), { sessionUser: S, currentBusiness: D, currentCountry: L, registerSidebarComponent: g } = T(), { getRestaurantAndWarehouse: _, getBusinessSetting: N, beginBusinessLoad: B, completeBusinessLoad: ne } = X(), { getFeatureFlags: re } = we(), { version: p } = q(Y()), { getSettings: oe } = be(), { promptLoader: se } = Ce(), e = xe(), F = Je(), ie = Y(), { suppressReportRouteSync: w } = q(ie), ue = K(() => `https://portal-v1.feedme.cc/b/${r.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), le = K(() => `https://report-v4.feedme.cc?businessId=${r.value}&country=${l.value}&token=${f.value}&reportV3Button=true`);
65
+ const { businessId: r, token: f, country: l } = q(Le()), { sessionUser: S, currentBusiness: D, currentCountry: L, registerSidebarComponent: g } = T(), { getRestaurantAndWarehouse: _, getBusinessSetting: N, beginBusinessLoad: B, completeBusinessLoad: ne } = X(), { getFeatureFlags: re } = _e(), { version: p } = q(Y()), { getSettings: oe } = we(), { promptLoader: se } = be(), e = xe(), F = Je(), ie = Y(), { suppressReportRouteSync: w } = q(ie), ue = K(() => `https://portal-v1.feedme.cc/b/${r.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${f.value}&v2=true&reportV5Button=true`), le = K(() => `https://report-v4.feedme.cc?businessId=${r.value}&country=${l.value}&token=${f.value}&reportV3Button=true`);
66
66
  R(
67
67
  [() => D.value, () => S.value, () => L.value],
68
68
  () => {
69
69
  var t, o;
70
70
  const a = ((t = D.value) == null ? void 0 : t.id) ?? "";
71
- D.value && S.value && L.value && (ke(l.value), r.value !== a && (r.value = a), f.value = ((o = S.value) == null ? void 0 : o.token) ?? "", l.value = L.value ?? "", e.query.businessId !== r.value && F.replace({
71
+ D.value && S.value && L.value && (Ce(l.value), r.value !== a && (r.value = a), f.value = ((o = S.value) == null ? void 0 : o.token) ?? "", l.value = L.value ?? "", e.query.businessId !== r.value && F.replace({
72
72
  name: e.name,
73
73
  params: e.params,
74
74
  query: { ...e.query, businessId: r.value }
@@ -97,15 +97,15 @@ const ze = ["src"], Qe = ["src"], et = /* @__PURE__ */ ee({
97
97
  R(p, () => {
98
98
  ["v3", "v4"].includes(p.value) ? T().hideSidebarToggle(!0) : T().hideSidebarToggle(!1);
99
99
  }), Re(() => {
100
- g(Fe);
100
+ g(Be);
101
101
  }), ae(() => {
102
- console.log("5.22.1-remy.1", !0), window.addEventListener("message", Q), window.addEventListener("message", j);
102
+ console.log("5.22.1-remy.2", !0), window.addEventListener("message", Q), window.addEventListener("message", j);
103
103
  });
104
- const I = Ne(), V = $e(), n = X();
104
+ const I = ke(), V = Fe(), n = X();
105
105
  qe(() => {
106
106
  window.removeEventListener("message", Q), window.removeEventListener("message", j), I.$dispose(), V.$dispose();
107
107
  });
108
- const { getReports: ce, getOverviewReport: de, getReportConfig: G, currentReportId: P } = I, { currentReportId: me, reports: fe } = q(I), { getSchema: pe } = Be(), { fetchSchedules: ge } = V, { init: ve } = Ee(), $ = k("v5"), b = k(!1), x = k(!0);
108
+ const { getReports: ce, getOverviewReport: de, getReportConfig: G, currentReportId: P } = I, { currentReportId: me, reports: fe } = q(I), { getSchema: pe } = Ee(), { fetchSchedules: ge } = V, { init: ve } = Ne(), $ = k("v5"), b = k(!1), x = k(!0);
109
109
  function ye() {
110
110
  const a = e.query.startDate ? i(e.query.startDate).startOf("day").toISOString() : void 0, t = e.query.endDate ? i(e.query.endDate).endOf("day").toISOString() : void 0, o = e.query.timeStart ? JSON.parse(e.query.timeStart) : void 0, c = e.query.timeEnd ? JSON.parse(e.query.timeEnd) : void 0, d = e.query.compareStartDate ? i(e.query.compareStartDate).startOf("day").toISOString() : void 0, v = e.query.compareEndDate ? i(e.query.compareEndDate).endOf("day").toISOString() : void 0, C = e.query.isAllLocation === "true";
111
111
  let m = [];
@@ -0,0 +1,315 @@
1
+ import { defineComponent as M, mergeModels as B, useModel as U, ref as O, watch as H, computed as Q, resolveComponent as v, createElementBlock as L, openBlock as D, createVNode as c, withCtx as g, createElementVNode as p, createCommentVNode as Y, Fragment as _, renderList as W, createBlock as q, createTextVNode as z, withDirectives as ee, toDisplayString as b, unref as m, vShow as te, renderSlot as ne } from "vue";
2
+ import { c as oe, a as le } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DMnXUzDy.js";
3
+ import { d as h } from "./app-lLf0I618.js";
4
+ import { u as ae } from "./vue-i18n-CQAzKJVO.js";
5
+ import { detectLocale as N } from "@feedmepos/mf-common";
6
+ var ue = /* @__PURE__ */ ((e) => (e.Scorecard = "SCORECARD", e.Spacer = "SPACER", e.Table = "TABLE", e.BarChart = "BARCHART", e.StackBarChart = "STACKBARCHART", e.LineChart = "LINECHART", e.StackLineChart = "STACKLINECHART", e.Circular = "CIRCULAR", e))(ue || {}), re = /* @__PURE__ */ ((e) => (e.EXCEL = "excel", e.PDF = "pdf", e.PDFFULLSIZE = "pdfFullSize", e.PDFRECEIPT = "pdfReceipt", e))(re || {}), ie = /* @__PURE__ */ ((e) => (e.PORTRAIT = "portrait", e.LANDSCAPE = "landscape", e))(ie || {});
7
+ function xe(e) {
8
+ switch (e) {
9
+ case "excel":
10
+ return "Excel";
11
+ case "pdf":
12
+ return "PDF (A4)";
13
+ case "pdfFullSize":
14
+ return "PDF";
15
+ case "pdfReceipt":
16
+ return "PDF (Receipt)";
17
+ default:
18
+ return "Unknown";
19
+ }
20
+ }
21
+ function Ne(e) {
22
+ switch (e) {
23
+ case "landscape":
24
+ return "report.common.landscape";
25
+ case "portrait":
26
+ return "report.common.portrait";
27
+ default:
28
+ return "report.input.unknown";
29
+ }
30
+ }
31
+ let V;
32
+ const me = new Uint8Array(16);
33
+ function se() {
34
+ if (!V && (V = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !V))
35
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
36
+ return V(me);
37
+ }
38
+ const r = [];
39
+ for (let e = 0; e < 256; ++e)
40
+ r.push((e + 256).toString(16).slice(1));
41
+ function de(e, t = 0) {
42
+ return r[e[t + 0]] + r[e[t + 1]] + r[e[t + 2]] + r[e[t + 3]] + "-" + r[e[t + 4]] + r[e[t + 5]] + "-" + r[e[t + 6]] + r[e[t + 7]] + "-" + r[e[t + 8]] + r[e[t + 9]] + "-" + r[e[t + 10]] + r[e[t + 11]] + r[e[t + 12]] + r[e[t + 13]] + r[e[t + 14]] + r[e[t + 15]];
43
+ }
44
+ const ce = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), J = {
45
+ randomUUID: ce
46
+ };
47
+ function Ve(e, t, l) {
48
+ if (J.randomUUID && !t && !e)
49
+ return J.randomUUID();
50
+ e = e || {};
51
+ const s = e.random || (e.rng || se)();
52
+ if (s[6] = s[6] & 15 | 64, s[8] = s[8] & 63 | 128, t) {
53
+ l = l || 0;
54
+ for (let a = 0; a < 16; ++a)
55
+ t[l + a] = s[a];
56
+ return t;
57
+ }
58
+ return de(s);
59
+ }
60
+ const j = (e, t = "en") => h().set("hour", e.hour).set("minute", e.minute).locale(t).format("h:mm A"), pe = (e, t) => {
61
+ const l = h().set("hour", e.hour).set("minute", e.minute);
62
+ return h().set("hour", t.hour).set("minute", t.minute) < l ? "+1" : "";
63
+ }, ve = { class: "px-24 py-16 rounded-lg shadow-light-300" }, fe = { class: "text-fm-color-typo-primary" }, ye = { class: "text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-body-lg-600 mb-8" }, ge = { class: "flex items-center justify-center w-full" }, he = { class: "fm-typo-en-body-lg-600 mb-8" }, Ce = { class: "flex items-center justify-center" }, Re = { class: "flex flex-row mb-4 px-4 gap-2" }, Be = /* @__PURE__ */ M({
64
+ __name: "TimeRangeSelect",
65
+ props: /* @__PURE__ */ B({
66
+ defaultDateRange: {
67
+ type: Array,
68
+ default: () => [
69
+ {
70
+ name: "All day",
71
+ isDefault: !0,
72
+ startTime: { hour: 0, minute: 0 },
73
+ endTime: { hour: 23, minute: 59 }
74
+ }
75
+ ]
76
+ },
77
+ label: {
78
+ type: String,
79
+ required: !1,
80
+ default: null
81
+ },
82
+ removable: {
83
+ type: Boolean,
84
+ required: !1,
85
+ default: !1
86
+ }
87
+ }, {
88
+ timeRange: {
89
+ type: Object,
90
+ default: () => ({
91
+ start: { hour: 0, minute: 0 },
92
+ end: { hour: 23, minute: 59 }
93
+ })
94
+ },
95
+ timeRangeModifiers: {},
96
+ selectTimeDefault: {
97
+ type: Number,
98
+ default: 1
99
+ },
100
+ selectTimeDefaultModifiers: {}
101
+ }),
102
+ emits: /* @__PURE__ */ B(["update", "chip-closed"], ["update:timeRange", "update:selectTimeDefault"]),
103
+ setup(e, { emit: t }) {
104
+ const { t: l, locale: s } = ae(), a = U(e, "timeRange"), S = t, i = U(e, "selectTimeDefault");
105
+ function T(d) {
106
+ d && (a.value = d, S("update", a.value)), w.value = !1;
107
+ }
108
+ function F(d) {
109
+ const n = d.split(":"), f = h().set("hour", Number(n[0])).set("minute", Number(n[1]));
110
+ return {
111
+ hours: Number(f.format("h")),
112
+ minutes: Number(f.format("m")),
113
+ period: f.format("A")
114
+ };
115
+ }
116
+ const u = O(JSON.parse(JSON.stringify(a.value)));
117
+ function G(d, n) {
118
+ u.value.start = JSON.parse(JSON.stringify(d)), u.value.end = JSON.parse(JSON.stringify(n));
119
+ }
120
+ H(
121
+ () => [() => a.value, () => i.value],
122
+ () => {
123
+ if (a.value) {
124
+ const d = e.defaultDateRange.findIndex(
125
+ (n) => {
126
+ var f, C, A, x;
127
+ return n.startTime.hour === ((f = a.value.start) == null ? void 0 : f.hour) && n.startTime.minute === ((C = a.value.start) == null ? void 0 : C.minute) && n.endTime.hour === ((A = a.value.end) == null ? void 0 : A.hour) && n.endTime.minute === ((x = a.value.end) == null ? void 0 : x.minute);
128
+ }
129
+ ) + 1;
130
+ d !== 0 ? i.value = d : i.value = e.defaultDateRange.length + 1;
131
+ }
132
+ },
133
+ { deep: !0 }
134
+ );
135
+ const w = O(!1);
136
+ function K(d) {
137
+ S("chip-closed", d);
138
+ }
139
+ const X = Q(() => e.label ? e.label : oe({
140
+ startTime: a.value.start,
141
+ endTime: a.value.end,
142
+ locale: s.value
143
+ }));
144
+ return (d, n) => {
145
+ const f = v("FmChip"), C = v("FmRadio"), A = v("FmMenuDivider"), x = v("FmRadioGroup"), $ = v("FmTimeInput"), k = v("FmButton"), Z = v("FmPopover");
146
+ return D(), L("div", null, [
147
+ c(Z, {
148
+ "show-popover": w.value,
149
+ placement: "bottom",
150
+ onPopoverChanged: n[6] || (n[6] = (R) => w.value = R)
151
+ }, {
152
+ "popover-button": g(() => [
153
+ c(le, {
154
+ "left-icon": e.label ? "filter_alt" : "schedule",
155
+ label: X.value,
156
+ removable: e.removable,
157
+ onChipClosed: n[0] || (n[0] = (R) => K(!0))
158
+ }, null, 8, ["left-icon", "label", "removable"])
159
+ ]),
160
+ default: g(() => {
161
+ var R, I, E, P;
162
+ return [
163
+ p("div", ve, [
164
+ c(x, {
165
+ modelValue: i.value,
166
+ "onUpdate:modelValue": n[1] || (n[1] = (o) => i.value = o)
167
+ }, {
168
+ default: g(() => [
169
+ (D(!0), L(_, null, W(e.defaultDateRange, (o, y) => (D(), q(C, {
170
+ key: `range_${y}`,
171
+ value: y + 1,
172
+ label: o.name,
173
+ onClick: (De) => G(o.startTime, o.endTime)
174
+ }, {
175
+ label: g(() => [
176
+ p("p", fe, [
177
+ z(b(o.name) + " ", 1),
178
+ ee(c(f, {
179
+ label: m(l)("report.common.default"),
180
+ class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
181
+ compact: ""
182
+ }, null, 8, ["label"]), [
183
+ [te, o.isDefault]
184
+ ])
185
+ ]),
186
+ p("p", ye, b(m(j)(o.startTime, m(N)())) + " - " + b(m(j)(o.endTime, m(N)())) + " " + b(m(pe)(o.startTime, o.endTime)), 1)
187
+ ]),
188
+ _: 2
189
+ }, 1032, ["value", "label", "onClick"]))), 128)),
190
+ c(A),
191
+ c(C, {
192
+ key: "range_custom",
193
+ label: m(l)("report.common.custom"),
194
+ value: e.defaultDateRange.length + 1
195
+ }, null, 8, ["label", "value"])
196
+ ]),
197
+ _: 1
198
+ }, 8, ["modelValue"]),
199
+ i.value === e.defaultDateRange.length + 1 ? (D(), L(_, { key: 0 }, [
200
+ p("p", be, b(m(l)("report.date.startingTime")), 1),
201
+ p("div", ge, [
202
+ c($, {
203
+ "model-value": F(`${(R = u.value.start) == null ? void 0 : R.hour}:${(I = u.value.start) == null ? void 0 : I.minute}`),
204
+ "onUpdate:modelValue": n[2] || (n[2] = (o) => {
205
+ if (u.value.start) {
206
+ const y = m(h)(`${o.hours}:${o.minutes} ${o.period}`, "h:m A").locale(
207
+ m(N)()
208
+ );
209
+ u.value.start.hour = y.get("hour"), u.value.start.minute = y.get("minute");
210
+ }
211
+ })
212
+ }, null, 8, ["model-value"])
213
+ ]),
214
+ p("p", he, b(m(l)("report.date.endingTime")), 1),
215
+ p("div", Ce, [
216
+ c($, {
217
+ "model-value": F(`${(E = u.value.end) == null ? void 0 : E.hour}:${(P = u.value.end) == null ? void 0 : P.minute}`),
218
+ "onUpdate:modelValue": n[3] || (n[3] = (o) => {
219
+ if (u.value.end) {
220
+ const y = m(h)(`${o.hours}:${o.minutes} ${o.period}`, "h:m A").locale(
221
+ m(N)()
222
+ );
223
+ u.value.end.hour = y.get("hour"), u.value.end.minute = y.get("minute");
224
+ }
225
+ })
226
+ }, null, 8, ["model-value"])
227
+ ])
228
+ ], 64)) : Y("", !0),
229
+ p("div", Re, [
230
+ n[7] || (n[7] = p("div", { class: "grow" }, null, -1)),
231
+ c(k, {
232
+ label: m(l)("report.common.cancel"),
233
+ variant: "tertiary",
234
+ onClick: n[4] || (n[4] = (o) => w.value = !1)
235
+ }, null, 8, ["label"]),
236
+ c(k, {
237
+ label: m(l)("report.common.apply"),
238
+ onClick: n[5] || (n[5] = () => T(JSON.parse(JSON.stringify(u.value))))
239
+ }, null, 8, ["label"])
240
+ ])
241
+ ])
242
+ ];
243
+ }),
244
+ _: 1
245
+ }, 8, ["show-popover"])
246
+ ]);
247
+ };
248
+ }
249
+ }), Le = /* @__PURE__ */ M({
250
+ __name: "BaseDialog",
251
+ props: /* @__PURE__ */ B({
252
+ title: {
253
+ type: String,
254
+ default: "Title"
255
+ },
256
+ primaryButtonLabel: {
257
+ type: String,
258
+ default: "Confirm"
259
+ },
260
+ secondaryButtonLabel: {
261
+ type: String,
262
+ default: "Cancel"
263
+ }
264
+ }, {
265
+ modelValue: { type: Boolean, required: !0 },
266
+ modelModifiers: {}
267
+ }),
268
+ emits: /* @__PURE__ */ B(["confirm"], ["update:modelValue"]),
269
+ setup(e, { emit: t }) {
270
+ const l = U(e, "modelValue"), s = e, a = t;
271
+ return H(l, () => {
272
+ l.value ? document.body.style.overflow = "hidden" : document.body.style.overflow = "scroll";
273
+ }), (S, i) => {
274
+ const T = v("FmButton"), F = v("FmDialog");
275
+ return D(), q(F, {
276
+ modelValue: l.value,
277
+ "onUpdate:modelValue": i[2] || (i[2] = (u) => l.value = u),
278
+ overlay: ""
279
+ }, {
280
+ "dialog-header": g(() => [
281
+ z(b(s.title), 1)
282
+ ]),
283
+ default: g(() => [
284
+ ne(S.$slots, "content")
285
+ ]),
286
+ "dialog-footer": g(() => [
287
+ i[3] || (i[3] = p("div", { class: "grow" }, null, -1)),
288
+ c(T, {
289
+ label: s.secondaryButtonLabel,
290
+ variant: "tertiary",
291
+ onClick: i[0] || (i[0] = (u) => l.value = !1)
292
+ }, null, 8, ["label"]),
293
+ c(T, {
294
+ label: s.primaryButtonLabel,
295
+ variant: "primary",
296
+ onClick: i[1] || (i[1] = (u) => a("confirm"))
297
+ }, null, 8, ["label"])
298
+ ]),
299
+ _: 3
300
+ }, 8, ["modelValue"]);
301
+ };
302
+ }
303
+ });
304
+ export {
305
+ ie as P,
306
+ re as R,
307
+ ue as W,
308
+ Be as _,
309
+ Le as a,
310
+ Ne as b,
311
+ xe as g,
312
+ pe as s,
313
+ j as t,
314
+ Ve as v
315
+ };
@@ -1,16 +1,17 @@
1
- import { defineComponent as V, resolveComponent as S, createBlock as p, openBlock as y, withCtx as I, createCommentVNode as Y, createElementVNode as M, toDisplayString as j, renderSlot as A, mergeModels as $, useModel as R, ref as O, watch as k, createElementBlock as U, createVNode as b, unref as D } from "vue";
2
- import { d as r, m as B, t as W, u as q, b as G, U as H, C as K } from "./vue-i18n-BQN8HgvD.js";
1
+ import { defineComponent as V, resolveComponent as S, createBlock as p, openBlock as y, withCtx as I, createCommentVNode as Y, createElementVNode as M, toDisplayString as j, renderSlot as A, mergeModels as C, useModel as R, ref as O, watch as k, createElementBlock as B, createVNode as b, unref as D } from "vue";
2
+ import { d as r, G as U, H as W, a as q, a9 as G, w as H } from "./app-lLf0I618.js";
3
3
  import { detectLocale as z } from "@feedmepos/mf-common";
4
+ import { u as K } from "./vue-i18n-CQAzKJVO.js";
4
5
  import { storeToRefs as L } from "pinia";
5
6
  var g = /* @__PURE__ */ ((e) => (e.Year = "YEAR", e.Month = "MONTH", e.Week = "WEEK", e.Day = "DAY", e))(g || {});
6
- function re(e, t = 100) {
7
+ function le(e, t = 100) {
7
8
  let n = null;
8
9
  const a = function(...o) {
9
10
  return n && clearTimeout(n), new Promise((l) => {
10
11
  n = setTimeout(() => {
11
12
  n = null;
12
- const m = e(...o);
13
- l(m);
13
+ const c = e(...o);
14
+ l(c);
14
15
  }, t);
15
16
  });
16
17
  };
@@ -21,7 +22,7 @@ function re(e, t = 100) {
21
22
  function J() {
22
23
  return [...Array(12).keys()].map((e) => r().month(e).format("MMM"));
23
24
  }
24
- function le(e, t, n = "") {
25
+ function oe(e, t, n = "") {
25
26
  switch (e.type) {
26
27
  case g.Day:
27
28
  return t("report.schedule.everyDay");
@@ -69,15 +70,15 @@ function F(e = {
69
70
  let t = r().subtract(1, "day").endOf("day"), n = r().endOf("day");
70
71
  return e.startDate && (t = r(e.startDate).locale(e.locale)), e.endDate && (n = r(e.endDate).locale(e.locale)), t.format("YYYY") !== n.format("YYYY") ? `${t.format("DD MMM YYYY")} - ${n.format("DD MMM YYYY")}` : `${t.format("DD MMM")} - ${n.format("DD MMM YYYY")}`;
71
72
  }
72
- function oe(e = {
73
+ function se(e = {
73
74
  startTime: null,
74
75
  endTime: null,
75
76
  locale: "en-US"
76
77
  }) {
77
78
  const t = "hh:mmA", { startTime: n, endTime: a, locale: o } = e;
78
79
  if (!n || !a) return "";
79
- const l = r().set("hour", n.hour).set("minute", n.minute).locale(o), m = r().set("hour", a.hour).set("minute", a.minute).locale(o);
80
- return `${l.format(t)}-${m.format(t)}`;
80
+ const l = r().set("hour", n.hour).set("minute", n.minute).locale(o), c = r().set("hour", a.hour).set("minute", a.minute).locale(o);
81
+ return `${l.format(t)}-${c.format(t)}`;
81
82
  }
82
83
  const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-0" }, X = { class: "text-ellipsis overflow-hidden whitespace-nowrap flex-1 min-w-0" }, Z = { class: "whitespace-nowrap flex-none" }, P = /* @__PURE__ */ V({
83
84
  __name: "FilterChip",
@@ -137,16 +138,16 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
137
138
  });
138
139
  };
139
140
  }
140
- }), _ = { class: "flex gap-2 items-center" }, h = "YYYY-MM-DD", se = /* @__PURE__ */ V({
141
+ }), _ = { class: "flex gap-2 items-center" }, h = "YYYY-MM-DD", ue = /* @__PURE__ */ V({
141
142
  __name: "DateRangeSelect",
142
- props: /* @__PURE__ */ $({
143
+ props: /* @__PURE__ */ C({
143
144
  compare: {
144
145
  type: Boolean,
145
146
  default: !1
146
147
  },
147
148
  datePredefinedRanges: {
148
149
  type: Array,
149
- default: () => H()
150
+ default: () => G()
150
151
  },
151
152
  label: {
152
153
  type: String,
@@ -161,7 +162,7 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
161
162
  }, {
162
163
  compareType: {
163
164
  type: String,
164
- default: K.PRECEDING_PERIOD
165
+ default: H.PRECEDING_PERIOD
165
166
  },
166
167
  compareTypeModifiers: {},
167
168
  dateRange: {
@@ -181,16 +182,16 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
181
182
  },
182
183
  compareDateRangeModifiers: {}
183
184
  }),
184
- emits: /* @__PURE__ */ $(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
185
+ emits: /* @__PURE__ */ C(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
185
186
  setup(e, { emit: t }) {
186
- var T, w, x, C;
187
- r.extend(B), r.extend(W);
188
- const { t: n } = q(), a = t, o = R(e, "compareType"), l = R(e, "dateRange"), m = R(e, "compareDateRange"), { timezone: i } = L(G()), d = O({
189
- startDate: l.value.startDate ? (T = r(l.value.startDate)) == null ? void 0 : T.tz(i.value).format(h) : null,
190
- endDate: l.value.endDate ? (w = r(l.value.endDate)) == null ? void 0 : w.tz(i.value).format(h) : null
187
+ var w, T, x, $;
188
+ r.extend(U), r.extend(W);
189
+ const { t: n } = K(), a = t, o = R(e, "compareType"), l = R(e, "dateRange"), c = R(e, "compareDateRange"), { timezone: i } = L(q()), d = O({
190
+ startDate: l.value.startDate ? (w = r(l.value.startDate)) == null ? void 0 : w.tz(i.value).format(h) : null,
191
+ endDate: l.value.endDate ? (T = r(l.value.endDate)) == null ? void 0 : T.tz(i.value).format(h) : null
191
192
  }), f = O({
192
- startDate: m.value.startDate ? (x = r(m.value.startDate)) == null ? void 0 : x.tz(i.value).format(h) : null,
193
- endDate: m.value.endDate ? (C = r(m.value.endDate)) == null ? void 0 : C.tz(i.value).format(h) : null
193
+ startDate: c.value.startDate ? (x = r(c.value.startDate)) == null ? void 0 : x.tz(i.value).format(h) : null,
194
+ endDate: c.value.endDate ? ($ = r(c.value.endDate)) == null ? void 0 : $.tz(i.value).format(h) : null
194
195
  });
195
196
  k(
196
197
  [() => d.value],
@@ -206,10 +207,10 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
206
207
  ), k([() => f.value], () => {
207
208
  const u = f.value.startDate, s = f.value.endDate, v = u ? r(
208
209
  u instanceof Date ? u : r(u).toDate()
209
- ).startOf("day").tz(i.value, !0).toISOString() : void 0, c = s ? r(s instanceof Date ? s : r(s).toDate()).tz(i.value, !0).endOf("day").toISOString() : void 0;
210
- m.value = {
210
+ ).startOf("day").tz(i.value, !0).toISOString() : void 0, m = s ? r(s instanceof Date ? s : r(s).toDate()).tz(i.value, !0).endOf("day").toISOString() : void 0;
211
+ c.value = {
211
212
  startDate: v,
212
- endDate: c
213
+ endDate: m
213
214
  };
214
215
  });
215
216
  function E(u) {
@@ -220,14 +221,14 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
220
221
  }
221
222
  return (u, s) => {
222
223
  const v = S("FmSimpleDateRangePicker");
223
- return y(), U("div", _, [
224
+ return y(), B("div", _, [
224
225
  b(v, {
225
226
  modelValue: d.value,
226
- "onUpdate:modelValue": s[1] || (s[1] = (c) => d.value = c),
227
+ "onUpdate:modelValue": s[1] || (s[1] = (m) => d.value = m),
227
228
  "show-predefined-range": "",
228
- "predefined-range": e.datePredefinedRanges.map((c) => ({
229
- ...c,
230
- label: D(n)(`report.date.${c.label}`)
229
+ "predefined-range": e.datePredefinedRanges.map((m) => ({
230
+ ...m,
231
+ label: D(n)(`report.date.${m.label}`)
231
232
  })),
232
233
  class: "w-2/6"
233
234
  }, {
@@ -240,7 +241,7 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
240
241
  locale: D(z)()
241
242
  }),
242
243
  removable: e.removable,
243
- onChipClosed: s[0] || (s[0] = (c) => N(!0))
244
+ onChipClosed: s[0] || (s[0] = (m) => N(!0))
244
245
  }, null, 8, ["left-icon", "label", "removable"])
245
246
  ]),
246
247
  _: 1
@@ -248,9 +249,9 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
248
249
  e.compare ? (y(), p(v, {
249
250
  key: 0,
250
251
  modelValue: f.value,
251
- "onUpdate:modelValue": s[2] || (s[2] = (c) => f.value = c),
252
+ "onUpdate:modelValue": s[2] || (s[2] = (m) => f.value = m),
252
253
  "compare-type": o.value,
253
- "onUpdate:compareType": s[3] || (s[3] = (c) => o.value = c),
254
+ "onUpdate:compareType": s[3] || (s[3] = (m) => o.value = m),
254
255
  "show-predefined-range": "",
255
256
  "compare-target": d.value,
256
257
  onSelectComparison: E
@@ -272,11 +273,11 @@ const Q = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-
272
273
  });
273
274
  export {
274
275
  g as C,
275
- se as _,
276
+ ue as _,
276
277
  P as a,
277
278
  F as b,
278
- oe as c,
279
- re as d,
280
- le as e,
279
+ se as c,
280
+ le as d,
281
+ oe as e,
281
282
  J as g
282
283
  };
@@ -1,29 +1,30 @@
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-BZVeEoDt.js";
1
+ import { defineComponent as u, computed as f, resolveComponent as p, createElementBlock as r, 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-DCSjuXmi.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 "./vue-i18n-BQN8HgvD.js";
6
- import { useRoute as B } from "vue-router";
5
+ import { f as q } from "./app-lLf0I618.js";
6
+ import { useRoute as w } from "vue-router";
7
+ import { u as B } from "./vue-i18n-CQAzKJVO.js";
7
8
  const $ = {
8
9
  key: 1,
9
10
  class: "flex gap-24 flex-col h-screen w-screen justify-center items-center"
10
- }, N = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, P = /* @__PURE__ */ u({
11
+ }, N = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, R = /* @__PURE__ */ u({
11
12
  __name: "Default",
12
13
  setup(S) {
13
- const { t: l } = q(), { breakpoints: r } = b(), { isLoading: c } = C(w()), o = B(), a = f(() => !o.query.token);
14
+ const { t: l } = B(), { breakpoints: s } = b(), { isLoading: c } = C(q()), o = w(), a = f(() => !o.query.token);
14
15
  return (m, z) => {
15
16
  const i = p("FmCircularProgress");
16
- return t(), s("div", {
17
- class: d(`${e(r).lg || e(r).md ? "flex w-full" : ""} bg-fm-color-neutral-white`),
17
+ return t(), r("div", {
18
+ class: d(`${e(s).lg || e(s).md ? "flex w-full" : ""} bg-fm-color-neutral-white`),
18
19
  style: n({
19
20
  height: `calc(100vh - ${e(o).query.token && e(o).query.businessId ? "0" : "64"}px)`
20
21
  })
21
22
  }, [
22
23
  a.value ? _("", !0) : (t(), y(v, { key: 0 })),
23
- e(c) ? (t(), s("div", $, [
24
+ e(c) ? (t(), r("div", $, [
24
25
  h(i, { size: "xl" }),
25
26
  k("span", N, g(e(l)("report.common.isLoading")), 1)
26
- ])) : (t(), s("div", {
27
+ ])) : (t(), r("div", {
27
28
  key: 2,
28
29
  class: "w-full flex flex-col",
29
30
  style: n({
@@ -37,5 +38,5 @@ const $ = {
37
38
  }
38
39
  });
39
40
  export {
40
- P as _
41
+ R as _
41
42
  };