@feedmepos/mf-report 5.24.2 → 5.24.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 (30) hide show
  1. package/dist/{App-mqLN8UFM.js → App-CH45KtMi.js} +4 -4
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-C3gJtMm-.js +380 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BzVweuOL.js → Default.vue_vue_type_script_setup_true_lang-Duu-LyqL.js} +1 -1
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-CtV3BEJO.js +4661 -0
  5. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-C731Br2T.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BDXjO_Sp.js} +8299 -7427
  6. package/dist/{InsightView-ADisfb4R.js → InsightView-BWVD5IIN.js} +5 -5
  7. package/dist/{Integration-CDqNMoR0.js → Integration-BVN352PX.js} +22 -22
  8. package/dist/{Integrations-DQIv4LVI.js → Integrations-BUojqghs.js} +13 -12
  9. package/dist/{Layout-DMSB8Kfu.js → Layout-B5kumbJ0.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-2gpx86l4.js → MenuTab.vue_vue_type_script_setup_true_lang-D1-Jlcbz.js} +26 -27
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DHUUdyp2.js → NavigationTab.vue_vue_type_script_setup_true_lang-DDbNobqI.js} +6342 -6322
  12. package/dist/{OverviewView-CRg2cFuh.js → OverviewView-DJOcIDmH.js} +5 -5
  13. package/dist/{Report-BwqcLICQ.js → Report-CuZpyzTW.js} +4 -4
  14. package/dist/{ReportEditor-DGY3SxpW.js → ReportEditor-B3haFTU6.js} +571 -573
  15. package/dist/{ReportView-BIY-5Lbi.js → ReportView-4JWtTu3y.js} +16 -17
  16. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Af_Z54a4.js +143 -0
  17. package/dist/{Setting-CpfDtK_s.js → Setting-Dl8HsHao.js} +4 -4
  18. package/dist/{TileEditor-D5jwVXhB.js → TileEditor-1hvqccL1.js} +325 -323
  19. package/dist/{TransitionFade-CC0PpKBo.js → TransitionFade-9A8VZ8Fm.js} +18 -18
  20. package/dist/{app-CILH73ZA.js → app-CBHDMsDR.js} +2229 -2311
  21. package/dist/app.js +1 -1
  22. package/dist/assets/{formatChartData.worker-C3U_CcDO.js → formatChartData.worker-DaLXwMTs.js} +2 -2
  23. package/dist/assets/{processTableData.worker-D_oiIvNW.js → processTableData.worker-Be0ZD94L.js} +2 -2
  24. package/dist/style.css +1 -1
  25. package/dist/{useRestaurantPermission-UJ4KkZq1.js → useRestaurantPermission-CGonMXA-.js} +1 -1
  26. package/package.json +1 -1
  27. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BYxYhdsf.js +0 -286
  28. package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-LZyZxm7z.js +0 -5467
  29. package/dist/NoData.vue_vue_type_script_setup_true_lang-CDKHIlF2.js +0 -38
  30. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-Df40itH5.js +0 -110
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as ue, resolveComponent as H, createBlock as de, openBlock as A, unref as d, isRef as Ee, withCtx as P, createElementVNode as ne, createVNode as X, toDisplayString as oe, createTextVNode as ke, onMounted as le, watch as C, ref as J, computed as re, onBeforeMount as Te, onBeforeUnmount as Ne, createElementBlock as G, Fragment as $e } from "vue";
2
2
  import { detectLocale as Q, useCoreStore as K } from "@feedmepos/mf-common";
3
- import { d as u, u as Be, a as ae, b as Fe, c as se, e as qe, f as xe, s as Je, t as W } from "./app-CILH73ZA.js";
3
+ import { d as u, u as Be, a as ae, b as Fe, c as se, e as qe, f as xe, s as Je, t as W } from "./app-CBHDMsDR.js";
4
4
  import { storeToRefs as E } from "pinia";
5
5
  import { u as Qe, a as Ue } from "./vue-i18n-DVWuTfed.js";
6
- import { u as je, a as ze } from "./BaseDialog.vue_vue_type_script_setup_true_lang-C731Br2T.js";
7
- import { u as Ve, _ as Pe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DHUUdyp2.js";
6
+ import { u as je, a as ze } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-BDXjO_Sp.js";
7
+ import { u as Ve, _ as Pe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DDbNobqI.js";
8
8
  import { u as ie } from "./message-dialog-UoMWOnil.js";
9
9
  import { useRoute as Ge, useRouter as Ke } from "vue-router";
10
10
  const We = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, He = /* @__PURE__ */ ue({
@@ -96,7 +96,7 @@ const Ye = ["src"], Ze = ["src"], lt = /* @__PURE__ */ ue({
96
96
  }), Te(() => {
97
97
  I(Pe);
98
98
  }), le(() => {
99
- console.log("5.24.2", !0), window.addEventListener("message", M), window.addEventListener("message", ee);
99
+ console.log("5.24.3", !0), window.addEventListener("message", M), window.addEventListener("message", ee);
100
100
  }), Ne(() => {
101
101
  window.removeEventListener("message", M), window.removeEventListener("message", ee), w.$dispose(), Y.$dispose();
102
102
  });
@@ -0,0 +1,380 @@
1
+ import { defineComponent as V, resolveComponent as C, createBlock as h, openBlock as D, normalizeClass as G, withCtx as I, createCommentVNode as x, createElementVNode as w, toDisplayString as H, renderSlot as K, mergeModels as L, useModel as E, ref as z, watch as F, createElementBlock as J, unref as y, createVNode as k } from "vue";
2
+ import { d as u, a as Q, X as Z, C as ee } from "./app-CBHDMsDR.js";
3
+ import { detectLocale as _ } from "@feedmepos/mf-common";
4
+ import { u as ae } from "./vue-i18n-DVWuTfed.js";
5
+ import { storeToRefs as te } from "pinia";
6
+ const re = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), le = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), ne = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), ce = /[^\p{L}\d]+/giu, O = "$1\0$2", U = "";
7
+ function B(a) {
8
+ let e = a.trim();
9
+ e = e.replace(re, O).replace(le, O), e = e.replace(ce, "\0");
10
+ let t = 0, r = e.length;
11
+ for (; e.charAt(t) === "\0"; )
12
+ t++;
13
+ if (t === r)
14
+ return [];
15
+ for (; e.charAt(r - 1) === "\0"; )
16
+ r--;
17
+ return e.slice(t, r).split(/\0/g);
18
+ }
19
+ function ue(a) {
20
+ const e = B(a);
21
+ for (let t = 0; t < e.length; t++) {
22
+ const r = e[t], n = ne.exec(r);
23
+ if (n) {
24
+ const l = n.index + (n[1] ?? n[2]).length;
25
+ e.splice(t, 1, r.slice(0, l), r.slice(l));
26
+ }
27
+ }
28
+ return e;
29
+ }
30
+ function Re(a, e) {
31
+ const [t, r, n] = T(a, e), l = S(e == null ? void 0 : e.locale), c = b(e == null ? void 0 : e.locale), s = e != null && e.mergeAmbiguousCharacters ? Y(l, c) : W(l, c);
32
+ return t + r.map((d, m) => m === 0 ? l(d) : s(d, m)).join((e == null ? void 0 : e.delimiter) ?? "") + n;
33
+ }
34
+ function pe(a, e) {
35
+ const [t, r, n] = T(a, e), l = S(e == null ? void 0 : e.locale), c = b(e == null ? void 0 : e.locale), s = e != null && e.mergeAmbiguousCharacters ? Y(l, c) : W(l, c);
36
+ return t + r.map(s).join((e == null ? void 0 : e.delimiter) ?? "") + n;
37
+ }
38
+ function Ce(a, e) {
39
+ const [t, r, n] = T(a, e), l = S(e == null ? void 0 : e.locale), c = b(e == null ? void 0 : e.locale);
40
+ return t + r.map(Y(l, c)).join((e == null ? void 0 : e.delimiter) ?? " ") + n;
41
+ }
42
+ function xe(a, e) {
43
+ const [t, r, n] = T(a, e), l = S(e == null ? void 0 : e.locale), c = b(e == null ? void 0 : e.locale), s = Y(l, c);
44
+ return t + r.map((d, m) => m === 0 ? s(d) : l(d)).join((e == null ? void 0 : e.delimiter) ?? " ") + n;
45
+ }
46
+ function S(a) {
47
+ return a === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(a);
48
+ }
49
+ function b(a) {
50
+ return a === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(a);
51
+ }
52
+ function Y(a, e) {
53
+ return (t) => `${e(t[0])}${a(t.slice(1))}`;
54
+ }
55
+ function W(a, e) {
56
+ return (t, r) => {
57
+ const n = t[0];
58
+ return (r > 0 && n >= "0" && n <= "9" ? "_" + n : e(n)) + a(t.slice(1));
59
+ };
60
+ }
61
+ function T(a, e = {}) {
62
+ const t = e.split ?? (e.separateNumbers ? ue : B), r = e.prefixCharacters ?? U, n = e.suffixCharacters ?? U;
63
+ let l = 0, c = a.length;
64
+ for (; l < a.length; ) {
65
+ const s = a.charAt(l);
66
+ if (!r.includes(s))
67
+ break;
68
+ l++;
69
+ }
70
+ for (; c > l; ) {
71
+ const s = c - 1, d = a.charAt(s);
72
+ if (!n.includes(d))
73
+ break;
74
+ c = s;
75
+ }
76
+ return [
77
+ a.slice(0, l),
78
+ t(a.slice(l, c)),
79
+ a.slice(c)
80
+ ];
81
+ }
82
+ var v = /* @__PURE__ */ ((a) => (a.Year = "YEAR", a.Month = "MONTH", a.Week = "WEEK", a.Day = "DAY", a))(v || {}), se = /* @__PURE__ */ ((a) => (a.Yesterday = "YESTERDAY", a.Today = "TODAY", a))(se || {});
83
+ function Se(a, e = 100) {
84
+ let t = null;
85
+ const r = function(...n) {
86
+ return t && clearTimeout(t), new Promise((l) => {
87
+ t = setTimeout(() => {
88
+ t = null;
89
+ const c = a(...n);
90
+ l(c);
91
+ }, e);
92
+ });
93
+ };
94
+ return r.cancel = () => {
95
+ t && (clearTimeout(t), t = null);
96
+ }, r;
97
+ }
98
+ function de() {
99
+ return [...Array(12).keys()].map((a) => u().month(a).format("MMM"));
100
+ }
101
+ function be(a, e, t = "") {
102
+ switch (a.type) {
103
+ case v.Day:
104
+ return e("report.schedule.everyDay");
105
+ case v.Week: {
106
+ let r = `${e("report.schedule.everyWeek")} `;
107
+ const n = [
108
+ e("report.days.sunday"),
109
+ e("report.days.monday"),
110
+ e("report.days.tuesday"),
111
+ e("report.days.wednesday"),
112
+ e("report.days.thursday"),
113
+ e("report.days.friday"),
114
+ e("report.days.saturday")
115
+ ];
116
+ if (a.days)
117
+ for (let l = 0; l < a.days.length; l++)
118
+ r = r + n[a.days[l]] + (l !== a.days.length - 1 ? "," : "");
119
+ return r;
120
+ }
121
+ case v.Month: {
122
+ let r = `${e("report.schedule.everyMonth")} `;
123
+ return a.days && (r = r + a.days.join(",")), r;
124
+ }
125
+ case v.Year: {
126
+ if (!a.months && !a.days)
127
+ return e("report.schedule.customDate");
128
+ let r = `${e("report.schedule.everyYear")} `;
129
+ if (a.months) {
130
+ const n = de();
131
+ r = r + a.months.map((l) => n[l - 1]).join(",");
132
+ }
133
+ return a.months && a.days && (r = r + ` ${e("report.common.and")} `), a.days && (r = r + a.days.join(",")), r;
134
+ }
135
+ default:
136
+ return t;
137
+ }
138
+ }
139
+ function j(a = {
140
+ startDate: null,
141
+ endDate: null,
142
+ locale: "en-US",
143
+ timezone: void 0
144
+ }) {
145
+ if (!a.startDate || !a.endDate)
146
+ return "No comparison";
147
+ let e = u().subtract(1, "day").endOf("day"), t = u().endOf("day");
148
+ return a.startDate && (e = a.timezone ? u(a.startDate).tz(a.timezone).locale(a.locale) : u(a.startDate).locale(a.locale)), a.endDate && (t = a.timezone ? u(a.endDate).tz(a.timezone).locale(a.locale) : u(a.endDate).locale(a.locale)), e.format("YYYY") !== t.format("YYYY") ? `${e.format("DD MMM YYYY")} - ${t.format("DD MMM YYYY")}` : `${e.format("DD MMM")} - ${t.format("DD MMM YYYY")}`;
149
+ }
150
+ function Ye(a = {
151
+ startTime: null,
152
+ endTime: null,
153
+ locale: "en-US"
154
+ }) {
155
+ const e = "hh:mmA", { startTime: t, endTime: r, locale: n } = a;
156
+ if (!t || !r) return "";
157
+ const l = u().set("hour", t.hour).set("minute", t.minute).locale(n), c = u().set("hour", r.hour).set("minute", r.minute).locale(n);
158
+ return `${l.format(e)}-${c.format(e)}`;
159
+ }
160
+ const me = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-0" }, oe = { class: "text-ellipsis overflow-hidden whitespace-nowrap flex-1 min-w-0" }, fe = { class: "whitespace-nowrap flex-none" }, N = /* @__PURE__ */ V({
161
+ __name: "FilterChip",
162
+ props: {
163
+ label: {
164
+ type: String,
165
+ default: ""
166
+ },
167
+ leftIcon: {
168
+ type: String,
169
+ default: ""
170
+ },
171
+ rightIcon: {
172
+ type: String,
173
+ default: ""
174
+ },
175
+ trailingIcon: {
176
+ type: String,
177
+ default: ""
178
+ },
179
+ loading: {
180
+ type: Boolean,
181
+ default: !1
182
+ }
183
+ },
184
+ setup(a) {
185
+ const e = a;
186
+ return (t, r) => {
187
+ const n = C("FmIcon"), l = C("FmCircularProgress"), c = C("FmChip");
188
+ return D(), h(c, {
189
+ "aria-busy": e.loading,
190
+ class: G([
191
+ "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-[400px] flex items-center gap-1 transition-opacity",
192
+ e.loading && "opacity-80"
193
+ ])
194
+ }, {
195
+ default: I(() => [
196
+ a.leftIcon ? (D(), h(n, {
197
+ key: 0,
198
+ name: e.leftIcon,
199
+ size: "sm",
200
+ outline: "",
201
+ class: "flex-none"
202
+ }, null, 8, ["name"])) : x("", !0),
203
+ w("div", me, [
204
+ w("span", oe, H(e.label), 1),
205
+ a.rightIcon ? (D(), h(n, {
206
+ key: 0,
207
+ name: a.rightIcon,
208
+ size: "sm",
209
+ outline: "",
210
+ class: "flex-none"
211
+ }, null, 8, ["name"])) : x("", !0),
212
+ w("span", fe, [
213
+ K(t.$slots, "default")
214
+ ]),
215
+ e.loading ? (D(), h(l, {
216
+ key: 1,
217
+ size: "md",
218
+ class: "flex-none scale-75"
219
+ })) : a.trailingIcon ? (D(), h(n, {
220
+ key: 2,
221
+ name: a.trailingIcon,
222
+ size: "sm",
223
+ outline: "",
224
+ class: "flex-none"
225
+ }, null, 8, ["name"])) : x("", !0)
226
+ ])
227
+ ]),
228
+ _: 3
229
+ }, 8, ["aria-busy", "class"]);
230
+ };
231
+ }
232
+ }), ie = { class: "flex gap-2 items-center" }, p = "YYYY-MM-DD", Te = /* @__PURE__ */ V({
233
+ __name: "DateRangeSelect",
234
+ props: /* @__PURE__ */ L({
235
+ compare: {
236
+ type: Boolean,
237
+ default: !1
238
+ },
239
+ datePredefinedRanges: {
240
+ type: Array,
241
+ default: () => Z()
242
+ },
243
+ label: {
244
+ type: String,
245
+ required: !1,
246
+ default: null
247
+ },
248
+ removable: {
249
+ type: Boolean,
250
+ required: !1,
251
+ default: !1
252
+ }
253
+ }, {
254
+ compareType: {
255
+ type: String,
256
+ default: ee.PRECEDING_PERIOD
257
+ },
258
+ compareTypeModifiers: {},
259
+ dateRange: {
260
+ type: Object,
261
+ default: () => ({
262
+ startDate: void 0,
263
+ endDate: void 0
264
+ })
265
+ },
266
+ dateRangeModifiers: {},
267
+ compareDateRange: {
268
+ type: Object,
269
+ default: () => ({
270
+ startDate: void 0,
271
+ endDate: void 0
272
+ })
273
+ },
274
+ compareDateRangeModifiers: {}
275
+ }),
276
+ emits: /* @__PURE__ */ L(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
277
+ setup(a, { emit: e }) {
278
+ var M, P, $, A;
279
+ const { t, locale: r } = ae(), n = e, l = E(a, "compareType"), c = E(a, "dateRange"), s = E(a, "compareDateRange"), { timezone: d } = te(Q()), m = z({
280
+ startDate: c.value.startDate ? (M = u(c.value.startDate)) == null ? void 0 : M.tz(d.value).format(p) : null,
281
+ endDate: c.value.endDate ? (P = u(c.value.endDate)) == null ? void 0 : P.tz(d.value).format(p) : null
282
+ }), g = z({
283
+ startDate: s.value.startDate ? ($ = u(s.value.startDate)) == null ? void 0 : $.tz(d.value).format(p) : null,
284
+ endDate: s.value.endDate ? (A = u(s.value.endDate)) == null ? void 0 : A.tz(d.value).format(p) : null
285
+ });
286
+ F(
287
+ [() => m.value],
288
+ () => {
289
+ m.value.endDate || (m.value.endDate = m.value.startDate);
290
+ const f = {
291
+ startDate: u.tz(m.value.startDate, d.value).startOf("day").utc().toISOString(),
292
+ endDate: u.tz(m.value.endDate, d.value).endOf("day").utc().toISOString()
293
+ };
294
+ c.value = f, n("update", f);
295
+ },
296
+ { deep: !0 }
297
+ ), F([() => g.value], () => {
298
+ const f = g.value.startDate, o = g.value.endDate, R = f ? u(
299
+ f instanceof Date ? f : u(f).toDate()
300
+ ).startOf("day").tz(d.value, !0).toISOString() : void 0, i = o ? u(o instanceof Date ? o : u(o).toDate()).tz(d.value, !0).endOf("day").toISOString() : void 0;
301
+ s.value = {
302
+ startDate: R,
303
+ endDate: i
304
+ };
305
+ });
306
+ function X(f) {
307
+ l.value = f;
308
+ }
309
+ function q(f) {
310
+ n("chip-closed", f);
311
+ }
312
+ return (f, o) => {
313
+ const R = C("FmSimpleDateRangePicker");
314
+ return D(), J("div", ie, [
315
+ (D(), h(R, {
316
+ key: `date-picker-${y(r)}`,
317
+ modelValue: m.value,
318
+ "onUpdate:modelValue": o[1] || (o[1] = (i) => m.value = i),
319
+ "show-predefined-range": "",
320
+ "predefined-range": a.datePredefinedRanges.map((i) => ({
321
+ ...i,
322
+ label: y(t)(`report.date.${i.label}`)
323
+ })),
324
+ class: "w-2/6"
325
+ }, {
326
+ "trigger-button": I(() => [
327
+ k(N, {
328
+ "left-icon": a.label ? "filter_alt" : "calendar_month",
329
+ label: a.label ?? y(j)({
330
+ startDate: m.value.startDate ?? "",
331
+ endDate: m.value.endDate ?? "",
332
+ locale: y(_)()
333
+ }),
334
+ removable: a.removable,
335
+ onChipClosed: o[0] || (o[0] = (i) => q(!0))
336
+ }, null, 8, ["left-icon", "label", "removable"])
337
+ ]),
338
+ _: 1
339
+ }, 8, ["modelValue", "predefined-range"])),
340
+ a.compare ? (D(), h(R, {
341
+ key: `compare-date-picker-${y(r)}`,
342
+ modelValue: g.value,
343
+ "onUpdate:modelValue": o[2] || (o[2] = (i) => g.value = i),
344
+ "compare-type": l.value,
345
+ "onUpdate:compareType": o[3] || (o[3] = (i) => l.value = i),
346
+ "show-predefined-range": "",
347
+ "compare-target": m.value,
348
+ "default-compare-type": l.value,
349
+ onSelectComparison: X
350
+ }, {
351
+ "trigger-button": I(() => [
352
+ k(N, {
353
+ label: `${y(t)("report.common.compare")}: ${y(j)({
354
+ startDate: g.value.startDate ?? null,
355
+ endDate: g.value.endDate ?? null,
356
+ locale: y(_)()
357
+ })}`
358
+ }, null, 8, ["label"])
359
+ ]),
360
+ _: 1
361
+ }, 8, ["modelValue", "compare-type", "compare-target", "default-compare-type"])) : x("", !0)
362
+ ]);
363
+ };
364
+ }
365
+ });
366
+ export {
367
+ v as C,
368
+ Te as _,
369
+ Re as a,
370
+ se as b,
371
+ Ce as c,
372
+ Se as d,
373
+ be as e,
374
+ N as f,
375
+ de as g,
376
+ Ye as h,
377
+ j as i,
378
+ pe as p,
379
+ xe as s
380
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as u, computed as p, resolveComponent as f, 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-DHUUdyp2.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DDbNobqI.js";
3
3
  import { useBreakpoints as b } from "@feedmepos/ui-library";
4
4
  import { storeToRefs as C } from "pinia";
5
5
  import { u as q, a as w } from "./vue-i18n-DVWuTfed.js";