@feedmepos/mf-report 5.27.44 → 5.27.45

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 (27) hide show
  1. package/dist/{App-B-0VHXM1.js → App-qmp_wTqr.js} +105 -107
  2. package/dist/{DateRangeSelect-CGnROjSA.js → DateRangeSelect-DTc5W51W.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-B0E17Ovn.js → Default.vue_vue_type_script_setup_true_lang-Rfx_MV5j.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DeajLQvr.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CgQT7aVu.js} +808 -807
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CqKnPfjr.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-Ch8h7LYw.js} +2234 -2227
  6. package/dist/{InsightView-DLi1JKj-.js → InsightView-DTXLQI3y.js} +4 -4
  7. package/dist/{Integration-DcpEli4G.js → Integration-jDsdDTJe.js} +3 -3
  8. package/dist/{Integrations-FqE3NGWW.js → Integrations-Bw_gAgzo.js} +2 -2
  9. package/dist/{Layout-B3w9ncrY.js → Layout-KsXHFW6a.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DEZ9szG8.js → MenuTab.vue_vue_type_script_setup_true_lang-EX-uYhXm.js} +4 -4
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-hq2_fG5m.js → NavigationTab.vue_vue_type_script_setup_true_lang-CjkhnFr1.js} +3 -3
  12. package/dist/{OverviewView-C2q5HVfG.js → OverviewView-8gQ9VC5f.js} +4 -4
  13. package/dist/{Report-CpD-PQMF.js → Report-CyxE4Mk6.js} +34 -34
  14. package/dist/{ReportEditor-DY8bRLmi.js → ReportEditor-Bm5k5ZUc.js} +6 -6
  15. package/dist/{ReportView-kvAnnQQX.js → ReportView-B_EjiBA3.js} +6 -6
  16. package/dist/Setting-BEUoiP3V.js +368 -0
  17. package/dist/{Template-C-whg_Qs.js → Template-aCg-U8jo.js} +3 -3
  18. package/dist/{TileEditor-MvSW8uIv.js → TileEditor-BKfGFwLu.js} +5 -5
  19. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-cNbphYz8.js → TilePageStack.vue_vue_type_script_setup_true_lang-C-x_Wda9.js} +2 -2
  20. package/dist/{TransitionFade-DqK-1YJF.js → TransitionFade-BEJ9_BKt.js} +4 -4
  21. package/dist/{app-Dpk_iYcH.js → app-5pQ-88Qg.js} +9264 -9269
  22. package/dist/app.js +1 -1
  23. package/dist/assets/{formatChartData.worker-NxArcyZE.js → formatChartData.worker-C93JSHxi.js} +5 -5
  24. package/dist/assets/{processTableData.worker-typkqQfh.js → processTableData.worker-BsZijJg_.js} +5 -5
  25. package/dist/{useRestaurantPermission-B5HIst3o.js → useRestaurantPermission-BIQpfucB.js} +1 -1
  26. package/package.json +2 -1
  27. package/dist/Setting-DIfsQKq7.js +0 -366
@@ -2,7 +2,7 @@ import { computed as u } from "vue";
2
2
  import { u as c } from "./_plugin-vue_export-helper-kkiiQoKl.js";
3
3
  import { useSnackbar as f } from "@feedmepos/ui-library";
4
4
  import { useCoreStore as d } from "@feedmepos/mf-common";
5
- import { Z as l, _ as i } from "./app-Dpk_iYcH.js";
5
+ import { Z as l, _ as i } from "./app-5pQ-88Qg.js";
6
6
  function g(t) {
7
7
  return Array.isArray(t) ? t : [];
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feedmepos/mf-report",
3
- "version": "5.27.44",
3
+ "version": "5.27.45",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -86,6 +86,7 @@
86
86
  "test:e2e:visual:linux": "bash scripts/run-visual-tests-linux.sh",
87
87
  "test:e2e:visual:update": "bash scripts/run-visual-tests-linux.sh --update-snapshots",
88
88
  "harness:dev": "vite --config tests/harness/vite.config.ts",
89
+ "gallery": "node scripts/build-screenshot-gallery.mjs",
89
90
  "capture:sanitize": "node scripts/sanitize-network-capture.mjs",
90
91
  "type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
91
92
  "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
@@ -1,366 +0,0 @@
1
- import { defineComponent as R, ref as U, useModel as L, resolveComponent as V, createElementBlock as $, openBlock as x, createBlock as I, createElementVNode as t, resolveDynamicComponent as me, unref as e, withCtx as b, createVNode as s, normalizeClass as N, toDisplayString as a, Fragment as W, renderList as X, createTextVNode as ue, withDirectives as Y, vShow as ee, computed as q, watch as de, normalizeStyle as pe } from "vue";
2
- import { _ as ce } from "./Default.vue_vue_type_script_setup_true_lang-B0E17Ovn.js";
3
- import { d as A, C as G, D as fe, m as _e, n as Z, a as ve } from "./app-Dpk_iYcH.js";
4
- import { components as K, useSnackbar as te, useBreakpoints as oe, FmButtonColorThemeVariant as Q } from "@feedmepos/ui-library";
5
- import { T as B, U as ge } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CqKnPfjr.js";
6
- import { u as ye } from "./message-dialog-UoMWOnil.js";
7
- import { u as w } from "./_plugin-vue_export-helper-kkiiQoKl.js";
8
- import { detectLocale as F } from "@feedmepos/mf-common";
9
- import { a as j } from "./SelectComponent.vue_vue_type_script_setup_true_lang-Ckn2p74A.js";
10
- import { storeToRefs as he } from "pinia";
11
- const xe = { class: "px-5 py-2" }, be = { class: "flex" }, Ve = { class: "flex px-5 gap-2" }, Te = { class: "flex flex-col gap-2" }, Ce = { class: "fm-typo-en-title-sm-600" }, De = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = { class: "w-full gap-[24px] flex flex-col pt-2" }, Se = { class: "flex items-center w-full gap-3" }, ke = { class: "text-fm-color-typo-primary" }, Fe = { class: "text-fm-color-typo-secondary" }, Re = { class: "flex items-center gap-2" }, we = /* @__PURE__ */ R({
12
- __name: "ReportHour",
13
- props: {
14
- modelValue: {
15
- required: !0,
16
- default: () => []
17
- },
18
- modelModifiers: {}
19
- },
20
- emits: ["update:modelValue"],
21
- setup(T) {
22
- const l = U(!1), i = U(), o = {
23
- name: "",
24
- isDefault: !1,
25
- startTime: { hour: 0, minute: 0 },
26
- endTime: { hour: 0, minute: 0 }
27
- }, { FmForm: p } = K, f = U(), { promptMessage: h } = ye(), m = te(), n = U(JSON.parse(JSON.stringify(o))), u = L(T, "modelValue"), { t: r } = w(), E = () => {
28
- l.value = !1, n.value && i.value === void 0 ? u.value.push(n.value) : u.value[i.value] = n.value;
29
- }, O = () => {
30
- var v;
31
- (v = f.value) == null || v.validateInputs();
32
- }, H = () => {
33
- l.value = !1, n.value = o;
34
- }, c = (v) => {
35
- i.value = v, n.value = JSON.parse(JSON.stringify(u.value[i.value])), l.value = !0;
36
- }, P = () => {
37
- n.value = o, l.value = !0;
38
- }, le = async (v) => {
39
- const d = u.value.find((C, _) => _ === v);
40
- if (!d) {
41
- m.open({ message: `index ${v} cannot be found`, type: "error" });
42
- return;
43
- }
44
- if (d.isDefault)
45
- return;
46
- await h({
47
- title: r("report.setting.reportHour.deleteTitle"),
48
- message: r("report.setting.reportHour.deleteConfirm", { name: d.name })
49
- }) && (u.value = u.value.filter((_, M) => M !== v), u.value.find((_) => _.isDefault) || (u.value[0].isDefault = !0), n.value = o);
50
- }, ae = (v, d) => {
51
- v ? u.value = u.value.map((S, C) => ({
52
- ...S,
53
- isDefault: d === C
54
- })) : u.value = u.value.map((S, C) => ({
55
- ...S,
56
- isDefault: C === 0
57
- }));
58
- }, { breakpoints: z } = oe(), { FmSideSheet: se, FmTopSheet: ne } = K;
59
- return (v, d) => {
60
- const S = V("FmTextField"), C = V("FmTimePicker"), _ = V("FmButton"), M = V("FmSwitch"), re = V("FmChip"), ie = V("FmCard");
61
- return x(), $("div", null, [
62
- (x(), I(me(e(z).lg || e(z).md ? e(se) : e(ne)), {
63
- modelValue: l.value,
64
- "onUpdate:modelValue": d[3] || (d[3] = (g) => l.value = g),
65
- "fullscreen-size": "sm",
66
- "dismiss-away": !0
67
- }, {
68
- "side-sheet-header": b(() => [
69
- t("p", null, a(e(r)("report.setting.reportHour.addTitle")), 1)
70
- ]),
71
- "top-sheet-header": b(() => [
72
- t("div", xe, [
73
- t("p", null, a(e(r)("report.setting.reportHour.addTitle")), 1)
74
- ])
75
- ]),
76
- "side-sheet-footer": b(() => [
77
- t("div", be, [
78
- s(_, {
79
- label: "Save",
80
- variant: "primary",
81
- onClick: O
82
- }),
83
- s(_, {
84
- label: "Cancel",
85
- variant: "tertiary",
86
- onClick: H
87
- })
88
- ])
89
- ]),
90
- "top-sheet-footer": b(() => [
91
- t("div", Ve, [
92
- s(_, {
93
- label: "Save",
94
- variant: "primary",
95
- onClick: O
96
- }),
97
- s(_, {
98
- label: "Cancel",
99
- variant: "tertiary",
100
- onClick: H
101
- })
102
- ])
103
- ]),
104
- default: b(() => [
105
- s(e(p), {
106
- ref_key: "form",
107
- ref: f,
108
- class: N(["flex flex-col gap-2", `${e(z).sm || e(z).xs ? "px-24" : ""}`]),
109
- onValidationSuccess: E
110
- }, {
111
- default: b(() => {
112
- var g, D, k, J;
113
- return [
114
- s(S, {
115
- modelValue: n.value.name,
116
- "onUpdate:modelValue": d[0] || (d[0] = (y) => n.value.name = y),
117
- label: e(r)("report.setting.reportHour.hourSetName"),
118
- placeholder: e(r)("report.setting.reportHour.namePlaceholder"),
119
- rules: [(y) => y !== "" || e(r)("report.setting.reportHour.cannotBeEmpty")]
120
- }, null, 8, ["modelValue", "label", "placeholder", "rules"]),
121
- s(C, {
122
- "model-value": e(A)().hour(((g = n.value.startTime) == null ? void 0 : g.hour) ?? 0).minute(((D = n.value.startTime) == null ? void 0 : D.minute) ?? 0).locale(e(F)()).format("HH:mm"),
123
- class: "grow",
124
- label: e(r)("report.setting.reportHour.startTime"),
125
- "onUpdate:modelValue": d[1] || (d[1] = (y) => {
126
- y && (n.value.startTime.hour = Number(y.split(":")[0]), n.value.startTime.minute = Number(y.split(":")[1]));
127
- })
128
- }, null, 8, ["model-value", "label"]),
129
- s(C, {
130
- "model-value": e(A)().hour(((k = n.value.endTime) == null ? void 0 : k.hour) ?? 0).minute(((J = n.value.endTime) == null ? void 0 : J.minute) ?? 0).format("HH:mm"),
131
- class: "grow",
132
- label: e(r)("report.setting.reportHour.closeTime"),
133
- "onUpdate:modelValue": d[2] || (d[2] = (y) => {
134
- y && (n.value.endTime.hour = Number(y.split(":")[0]), n.value.endTime.minute = Number(y.split(":")[1]));
135
- })
136
- }, null, 8, ["model-value", "label"])
137
- ];
138
- }),
139
- _: 1
140
- }, 8, ["class"])
141
- ]),
142
- _: 1
143
- }, 8, ["modelValue"])),
144
- t("div", Te, [
145
- t("p", Ce, a(e(r)("report.setting.reportHour.title")), 1),
146
- t("p", De, a(e(r)("report.setting.reportHour.description")), 1)
147
- ]),
148
- t("div", $e, [
149
- (x(!0), $(W, null, X(u.value, (g, D) => (x(), I(ie, {
150
- key: `report_${D}`,
151
- class: "flex p-4",
152
- variant: "outlined"
153
- }, {
154
- default: b(() => [
155
- t("div", Se, [
156
- s(M, {
157
- "model-value": g.isDefault,
158
- "onUpdate:modelValue": (k) => ae(k, D)
159
- }, null, 8, ["model-value", "onUpdate:modelValue"]),
160
- t("div", null, [
161
- t("p", ke, [
162
- ue(a(g.name) + " ", 1),
163
- Y(s(re, {
164
- label: e(r)("report.common.default"),
165
- class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
166
- compact: ""
167
- }, null, 8, ["label"]), [
168
- [ee, g.isDefault]
169
- ])
170
- ]),
171
- t("p", Fe, a(e(B)(g.startTime, e(F)())) + " - " + a(e(B)(g.endTime, e(F)())), 1)
172
- ]),
173
- d[4] || (d[4] = t("div", { class: "grow" }, null, -1)),
174
- t("div", Re, [
175
- s(_, {
176
- icon: "edit",
177
- variant: "tertiary",
178
- onClick: (k) => c(D)
179
- }, null, 8, ["onClick"]),
180
- s(_, {
181
- icon: "delete",
182
- variant: "tertiary",
183
- disabled: g.isDefault,
184
- onClick: (k) => le(D)
185
- }, null, 8, ["disabled", "onClick"])
186
- ])
187
- ])
188
- ]),
189
- _: 2
190
- }, 1024))), 128)),
191
- t("div", null, [
192
- s(_, {
193
- label: e(r)("report.setting.reportHour.add"),
194
- variant: "secondary",
195
- icon: "add",
196
- "icon-position": "prepend",
197
- "border-color": e(Q).ColorPrimary,
198
- "text-color": e(Q).ColorPrimary,
199
- onClick: P
200
- }, null, 8, ["label", "border-color", "text-color"])
201
- ])
202
- ])
203
- ]);
204
- };
205
- }
206
- }), Oe = { class: "py-2 w-full gap-2 flex flex-col" }, He = { class: "fm-typo-en-title-sm-600" }, ze = /* @__PURE__ */ R({
207
- __name: "CompareRangeSetting",
208
- props: {
209
- modelValue: {
210
- required: !0,
211
- default: G.PRECEDING_PERIOD
212
- },
213
- modelModifiers: {}
214
- },
215
- emits: ["update:modelValue"],
216
- setup(T) {
217
- const { t: l } = w(), i = L(T, "modelValue"), o = Object.values(G).map((p) => ({
218
- label: l(`report.compare.${p}`),
219
- value: p
220
- })).slice(0, -1);
221
- return (p, f) => (x(), $("div", Oe, [
222
- t("p", He, a(e(l)("report.setting.summary.comparisonDateRange")), 1),
223
- s(j, {
224
- modelValue: i.value,
225
- "onUpdate:modelValue": f[0] || (f[0] = (h) => i.value = h),
226
- label: e(l)("report.setting.summary.comparisonDateRange"),
227
- items: e(o),
228
- "disable-search": !0
229
- }, null, 8, ["modelValue", "label", "items"])
230
- ]));
231
- }
232
- }), Ue = { class: "py-2 w-full gap-2 flex flex-col" }, Ne = { class: "fm-typo-en-title-sm-600" }, Be = /* @__PURE__ */ R({
233
- __name: "DateRangeSetting",
234
- props: {
235
- modelValue: { required: !0 },
236
- modelModifiers: {}
237
- },
238
- emits: ["update:modelValue"],
239
- setup(T) {
240
- const { t: l } = w(), i = L(T, "modelValue"), o = Object.values(fe).filter((p) => !["This month", "Last month"].includes(p)).map((p) => ({
241
- label: l(`report.date.${p}`),
242
- value: p
243
- }));
244
- return (p, f) => (x(), $("div", Ue, [
245
- t("p", Ne, a(e(l)("report.setting.summary.defaultDateRange")), 1),
246
- s(j, {
247
- modelValue: i.value,
248
- "onUpdate:modelValue": f[0] || (f[0] = (h) => i.value = h),
249
- label: e(l)("report.setting.summary.defaultDateRange"),
250
- items: e(o),
251
- "disable-search": !0
252
- }, null, 8, ["modelValue", "label", "items"])
253
- ]));
254
- }
255
- }), Ee = { class: "py-2 w-full gap-2 flex flex-col" }, Pe = { class: "fm-typo-en-title-sm-600" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ie = /* @__PURE__ */ R({
256
- __name: "TimezoneSetting",
257
- props: {
258
- modelValue: {},
259
- defaultTimezone: {}
260
- },
261
- emits: ["update:modelValue"],
262
- setup(T, { emit: l }) {
263
- const { t: i } = w(), o = T, p = l, f = q(
264
- () => _e(
265
- o.defaultTimezone,
266
- (m) => i("report.setting.timezone.default", { timezone: m })
267
- )
268
- ), h = q({
269
- get: () => o.modelValue ?? Z,
270
- set: (m) => p("update:modelValue", m === Z ? null : m)
271
- });
272
- return (m, n) => (x(), $("div", Ee, [
273
- t("p", Pe, a(e(i)("report.setting.timezone.title")), 1),
274
- t("p", Me, a(e(i)("report.setting.timezone.description")), 1),
275
- s(j, {
276
- modelValue: h.value,
277
- "onUpdate:modelValue": n[0] || (n[0] = (u) => h.value = u),
278
- label: e(i)("report.setting.timezone.label"),
279
- items: f.value
280
- }, null, 8, ["modelValue", "label", "items"])
281
- ]));
282
- }
283
- }), Le = { class: "w-2/4" }, je = { class: "fm-typo-en-title-sm-600" }, Je = { class: "text-fm-color-typo-secondary" }, qe = { class: "fm-typo-en-body-lg-600" }, Ae = { class: "text-fm-color-typo-secondary" }, Ge = { class: "fm-typo-en-body-lg-600" }, Ze = { class: "text-fm-color-typo-secondary" }, Ke = { class: "fm-typo-en-body-lg-600" }, Qe = { class: "text-fm-color-typo-secondary" }, We = { class: "fm-typo-en-body-lg-600" }, it = /* @__PURE__ */ R({
284
- __name: "Setting",
285
- setup(T) {
286
- const { breakpoints: l } = oe(), i = ve(), { defaultDateSetting: o, timezone: p, defaultTimezone: f } = he(i), h = te(), { t: m } = w();
287
- de(
288
- [
289
- () => o.value.defaultCompareType,
290
- () => o.value.defaultDateRange,
291
- () => o.value.timeOptions
292
- ],
293
- () => {
294
- o.value.timeOptions.length === 0 ? h.open({ message: m("report.setting.reportHour.cannotBeEmptyError"), type: "error" }) : i.createOrUpdateBusinessSetting(o.value);
295
- },
296
- { deep: !0 }
297
- );
298
- function n(u) {
299
- o.value.timezone = u, i.createOrUpdateBusinessSetting(o.value);
300
- }
301
- return (u, r) => {
302
- const E = V("FmPageHead"), O = V("FmMenuDivider"), H = V("FmCard");
303
- return x(), I(ce, null, {
304
- default: b(() => [
305
- s(E, {
306
- title: e(m)("report.view.setting.title")
307
- }, null, 8, ["title"]),
308
- t("div", {
309
- class: N(`${e(l).sm || e(l).xs ? "pb-20" : ""} overflow-y-auto flex`),
310
- style: pe({ height: `calc(100% - ${e(l).sm || e(l).xs ? 60 : 72}px)` })
311
- }, [
312
- t("div", {
313
- class: N(`${e(l).lg || e(l).md ? "px-24" : "px-3"} w-full flex flex-col gap-[40px]`)
314
- }, [
315
- s(we, {
316
- modelValue: e(o).timeOptions,
317
- "onUpdate:modelValue": r[0] || (r[0] = (c) => e(o).timeOptions = c)
318
- }, null, 8, ["modelValue"]),
319
- s(Be, {
320
- modelValue: e(o).defaultDateRange,
321
- "onUpdate:modelValue": r[1] || (r[1] = (c) => e(o).defaultDateRange = c)
322
- }, null, 8, ["modelValue"]),
323
- s(ze, {
324
- modelValue: e(o).defaultCompareType,
325
- "onUpdate:modelValue": r[2] || (r[2] = (c) => e(o).defaultCompareType = c)
326
- }, null, 8, ["modelValue"]),
327
- s(Ie, {
328
- "model-value": e(o).timezone,
329
- "default-timezone": e(f),
330
- "onUpdate:modelValue": n
331
- }, null, 8, ["model-value", "default-timezone"])
332
- ], 2),
333
- Y(t("div", Le, [
334
- s(H, {
335
- variant: "outlined",
336
- class: N(["flex flex-col gap-3", `${e(l).lg || e(l).md ? "mr-5 p-6" : ""}`])
337
- }, {
338
- default: b(() => [
339
- t("p", je, a(e(m)("report.setting.summary.title")), 1),
340
- s(O),
341
- t("p", Je, a(e(m)("report.setting.summary.reportHour")), 1),
342
- (x(!0), $(W, null, X(e(o).timeOptions, (c, P) => (x(), $("div", { key: P }, [
343
- t("p", qe, a(c.name) + a(c.isDefault ? `(${e(m)("report.setting.reportHour.default")})` : "") + " " + a(e(B)(c.startTime, e(F)())) + " " + a(e(B)(c.endTime, e(F)())) + " " + a(e(ge)(c.startTime, c.endTime)), 1)
344
- ]))), 128)),
345
- t("p", Ae, a(e(m)("report.setting.summary.defaultDateRange")), 1),
346
- t("p", Ge, a(e(m)(`report.date.${e(o).defaultDateRange}`)), 1),
347
- t("p", Ze, a(e(m)("report.setting.summary.comparisonDateRange")), 1),
348
- t("p", Ke, a(e(m)(`report.compare.${e(o).defaultCompareType}`)), 1),
349
- t("p", Qe, a(e(m)("report.setting.summary.timezone")), 1),
350
- t("p", We, a(e(p)), 1)
351
- ]),
352
- _: 1
353
- }, 8, ["class"])
354
- ], 512), [
355
- [ee, e(l).lg || e(l).md]
356
- ])
357
- ], 6)
358
- ]),
359
- _: 1
360
- });
361
- };
362
- }
363
- });
364
- export {
365
- it as default
366
- };