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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/App-DufL3Y8h.js +152 -0
  2. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DLDk5l4R.js +162 -0
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js → Default.vue_vue_type_script_setup_true_lang-DVLxkOOQ.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-C29g9w6o.js +999 -0
  5. package/dist/{InsightView-D78TK2E8.js → InsightView-tyeJBlRm.js} +1051 -1049
  6. package/dist/Integration-ILSIf-OL.js +3695 -0
  7. package/dist/Integrations-DwgNrM3U.js +334 -0
  8. package/dist/{Layout-DERpCrQk.js → Layout-Bw1oh6Q-.js} +1 -1
  9. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-DurYBXa5.js → LocationSelect.vue_vue_type_script_setup_true_lang-BFj4d-UF.js} +1861 -1859
  10. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DzZeasAK.js +277 -0
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-C8yzWDXs.js → NavigationTab.vue_vue_type_script_setup_true_lang-_eC_tMk_.js} +5526 -5482
  12. package/dist/NoData.vue_vue_type_script_setup_true_lang-BtQobm-7.js +31 -0
  13. package/dist/OverviewView-Dl8oOobn.js +61 -0
  14. package/dist/Report-BqD8KVZ8.js +424 -0
  15. package/dist/ReportEditor-DkzFUgbO.js +532 -0
  16. package/dist/ReportView-DpWZHV0o.js +169 -0
  17. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-C3VG1mi_.js +104 -0
  18. package/dist/Setting-CYrg_50p.js +320 -0
  19. package/dist/TileEditor-CDrzLbqc.js +2320 -0
  20. package/dist/{TransitionFade-BLDfpF7R.js → TransitionFade-D19wC3tb.js} +225 -220
  21. package/dist/app.js +915 -27
  22. package/dist/{global-loader-CMC9fgBi.js → global-loader-C3JC7z-H.js} +4966 -2240
  23. package/dist/index-9IDzTnHw.js +147 -0
  24. package/dist/{report-schema-G0x3CoJb.js → report-schema-1zQJbLyB.js} +4 -4
  25. package/dist/style.css +1 -1
  26. package/dist/timeFormat-CjNvJMgk.js +9 -0
  27. package/dist/{v4-DF7wffYN.js → v4-D29FkHfi.js} +2666 -1927
  28. package/package.json +1 -1
  29. package/dist/App-mcSgbcVY.js +0 -133
  30. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DPuhMR6i.js +0 -160
  31. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-B6IzlHmr.js +0 -996
  32. package/dist/HeaderTab.vue_vue_type_script_setup_true_lang-B5VBDNwX.js +0 -19
  33. package/dist/Integration-Cm6_YEEE.js +0 -3554
  34. package/dist/Integrations-WWnSho0Q.js +0 -334
  35. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js +0 -261
  36. package/dist/NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js +0 -30
  37. package/dist/OverviewView-D7zAR7_7.js +0 -60
  38. package/dist/Report-BnX5amn0.js +0 -409
  39. package/dist/ReportEditor-DW7uWg_a.js +0 -530
  40. package/dist/ReportView-xSaJA5F6.js +0 -166
  41. package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js +0 -103
  42. package/dist/Setting-D8JspXTN.js +0 -326
  43. package/dist/TileEditor-DQ8C5I_M.js +0 -2301
  44. package/dist/index-SmIkb24L.js +0 -143
  45. package/dist/timeFormat-BF-F4Rnt.js +0 -9
@@ -1,103 +0,0 @@
1
- import { defineComponent as I, mergeModels as B, useModel as D, ref as _, computed as i, resolveComponent as a, createBlock as b, openBlock as p, withCtx as s, createElementVNode as u, normalizeStyle as z, withDirectives as H, createElementBlock as L, createVNode as r, vShow as U, Fragment as $, renderList as E, toDisplayString as h, normalizeClass as N } from "vue";
2
- const q = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary" }, A = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, O = { class: "sticky top-0" }, j = /* @__PURE__ */ I({
3
- __name: "SelectComponent",
4
- props: /* @__PURE__ */ B({
5
- items: {
6
- type: Array,
7
- default: () => []
8
- },
9
- placeHolder: {
10
- type: String,
11
- default: "Select item"
12
- },
13
- label: {
14
- type: String,
15
- default: ""
16
- },
17
- disableSearch: {
18
- type: Boolean,
19
- default: !1
20
- }
21
- }, {
22
- modelValue: { required: !0 },
23
- modelModifiers: {}
24
- }),
25
- emits: ["update:modelValue"],
26
- setup(v) {
27
- const m = D(v, "modelValue"), o = v, y = (e) => {
28
- m.value = e.value, setTimeout(() => {
29
- n.value = !1;
30
- }, 0);
31
- }, n = _(!1), d = _(""), g = i(
32
- () => o.items.filter(
33
- (e) => e.label.toLowerCase().indexOf(d.value.toLowerCase()) !== -1
34
- )
35
- ), F = i(
36
- () => {
37
- var e;
38
- return ((e = o.items.find((t) => t.value === m.value)) == null ? void 0 : e.label) ?? o.placeHolder;
39
- }
40
- ), w = i(() => o.items.filter((e) => e.value === m.value));
41
- return (e, t) => {
42
- const x = a("FmIcon"), M = a("FmField"), S = a("FmSearch"), V = a("FmMenuDivider"), C = a("FmMenuItem"), k = a("FmMenu");
43
- return p(), b(k, {
44
- trigger: "click",
45
- shift: !0,
46
- "max-height": 300,
47
- width: 200,
48
- onMenuChanged: t[1] || (t[1] = (c) => {
49
- n.value = c;
50
- })
51
- }, {
52
- "menu-button": s(() => [
53
- u("p", q, h(o.label), 1),
54
- r(M, {
55
- class: N(["cursor-pointer", `${n.value ? "border-fm-color-primary" : ""}`]),
56
- focused: n.value
57
- }, {
58
- append: s(() => [
59
- r(x, {
60
- color: "black",
61
- name: n.value ? "expand_less" : "expand_more",
62
- size: "md"
63
- }, null, 8, ["name"])
64
- ]),
65
- default: s(() => [
66
- u("div", A, h(F.value), 1)
67
- ]),
68
- _: 1
69
- }, 8, ["class", "focused"])
70
- ]),
71
- "menu-wrapper": s(({ maxHeight: c }) => [
72
- u("div", {
73
- style: z({ maxHeight: `${c}px` }),
74
- class: "bg-fm-color-neutral-white overflow-y-auto overflow-x-hidden rounded-md shadow-light-300 w-[250px]"
75
- }, [
76
- H(u("div", O, [
77
- r(S, {
78
- modelValue: d.value,
79
- "onUpdate:modelValue": t[0] || (t[0] = (l) => d.value = l),
80
- placeholder: "Filter result"
81
- }, null, 8, ["modelValue"]),
82
- r(V)
83
- ], 512), [
84
- [U, !o.disableSearch]
85
- ]),
86
- (p(!0), L($, null, E(g.value, (l) => (p(), b(C, {
87
- key: l.value,
88
- label: l.label,
89
- sublabel: l.sublabel,
90
- "model-value": w.value.some((f) => f.value === l.value),
91
- value: l.value,
92
- "onUpdate:modelValue": (f) => y(l)
93
- }, null, 8, ["label", "sublabel", "model-value", "value", "onUpdate:modelValue"]))), 128))
94
- ], 4)
95
- ]),
96
- _: 1
97
- });
98
- };
99
- }
100
- });
101
- export {
102
- j as _
103
- };
@@ -1,326 +0,0 @@
1
- import { defineComponent as $, ref as F, useModel as P, resolveComponent as C, createElementBlock as S, openBlock as y, createBlock as U, createElementVNode as l, resolveDynamicComponent as ne, unref as e, withCtx as v, createVNode as n, normalizeClass as h, Fragment as L, renderList as Y, withDirectives as B, createTextVNode as G, toDisplayString as g, vShow as M, watch as re, normalizeStyle as ie } from "vue";
2
- import { _ as me } from "./HeaderTab.vue_vue_type_script_setup_true_lang-B5VBDNwX.js";
3
- import { _ as ue } from "./Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js";
4
- import { g as H, C as J, D as de, a as pe } from "./global-loader-CMC9fgBi.js";
5
- import { components as q, useSnackbar as I, useBreakpoints as K, FmButtonColorThemeVariant as z } from "@feedmepos/ui-library";
6
- import { t as w, s as fe } from "./timeFormat-BF-F4Rnt.js";
7
- import { u as ce } from "./message-dialog-UoMWOnil.js";
8
- import { c as Q } from "./index-SmIkb24L.js";
9
- import { _ as W } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js";
10
- import { storeToRefs as ve } from "pinia";
11
- const ge = { class: "flex" }, ye = { class: "flex px-5 gap-2" }, _e = { class: "w-full gap-[24px] flex flex-col pt-2" }, xe = { class: "flex items-center w-full gap-3" }, Ce = { class: "text-fm-color-typo-primary" }, Ve = { class: "text-fm-color-typo-secondary" }, be = { class: "flex items-center gap-2" }, De = /* @__PURE__ */ $({
12
- __name: "ReportHour",
13
- props: {
14
- modelValue: {
15
- required: !0,
16
- default: () => []
17
- },
18
- modelModifiers: {}
19
- },
20
- emits: ["update:modelValue"],
21
- setup(b) {
22
- const a = F(!1), d = F(), t = {
23
- name: "",
24
- isDefault: !1,
25
- startTime: { hour: 0, minute: 0 },
26
- endTime: { hour: 0, minute: 0 }
27
- }, { FmForm: m } = q, V = F(), { promptMessage: i } = ce(), R = I(), r = F(JSON.parse(JSON.stringify(t))), o = P(b, "modelValue"), O = () => {
28
- a.value = !1, r.value && d.value === void 0 ? o.value.push(r.value) : o.value[d.value] = r.value;
29
- }, A = () => {
30
- var p;
31
- (p = V.value) == null || p.validateInputs();
32
- }, j = () => {
33
- a.value = !1, r.value = t;
34
- }, X = (p) => {
35
- d.value = p, r.value = JSON.parse(JSON.stringify(o.value[d.value])), a.value = !0;
36
- }, Z = () => {
37
- r.value = t, a.value = !0;
38
- }, ee = async (p) => {
39
- const s = o.value.find((_, u) => u === p);
40
- if (!s) {
41
- R.open({ message: `index ${p} cannot be found`, type: "error" });
42
- return;
43
- }
44
- await i({
45
- title: "Delete time setting",
46
- message: `Are You sure you want to delete ${s.name}?`
47
- }) && (o.value = o.value.filter((u, N) => N !== p), o.value.find((u) => u.isDefault) || (o.value[0].isDefault = !0), r.value = t);
48
- }, te = (p, s) => {
49
- p ? o.value = o.value.map((D, _) => ({
50
- ...D,
51
- isDefault: s === _
52
- })) : o.value = o.value.map((D, _) => ({
53
- ...D,
54
- isDefault: _ === 0
55
- }));
56
- }, { breakpoints: k } = K(), { FmSideSheet: le, FmTopSheet: oe } = q;
57
- return (p, s) => {
58
- const D = C("FmTextField"), _ = C("FmTimePicker"), u = C("FmButton"), N = C("FmSwitch"), ae = C("FmChip"), se = C("FmCard");
59
- return y(), S("div", null, [
60
- (y(), U(ne(e(k).lg || e(k).md ? e(le) : e(oe)), {
61
- modelValue: a.value,
62
- "onUpdate:modelValue": s[3] || (s[3] = (c) => a.value = c),
63
- "fullscreen-size": "sm",
64
- "dismiss-away": !0
65
- }, {
66
- "side-sheet-header": v(() => s[4] || (s[4] = [
67
- l("p", null, "Add reporting hour", -1)
68
- ])),
69
- "top-sheet-header": v(() => s[5] || (s[5] = [
70
- l("div", { class: "px-5 py-2" }, [
71
- l("p", null, "Add reporting hour")
72
- ], -1)
73
- ])),
74
- "side-sheet-footer": v(() => [
75
- l("div", ge, [
76
- n(u, {
77
- label: "Save",
78
- variant: "primary",
79
- onClick: A
80
- }),
81
- n(u, {
82
- label: "Cancel",
83
- variant: "tertiary",
84
- onClick: j
85
- })
86
- ])
87
- ]),
88
- "top-sheet-footer": v(() => [
89
- l("div", ye, [
90
- n(u, {
91
- label: "Save",
92
- variant: "primary",
93
- onClick: A
94
- }),
95
- n(u, {
96
- label: "Cancel",
97
- variant: "tertiary",
98
- onClick: j
99
- })
100
- ])
101
- ]),
102
- default: v(() => [
103
- n(e(m), {
104
- ref_key: "form",
105
- ref: V,
106
- class: h(["flex flex-col gap-2", `${e(k).sm || e(k).xs ? "px-24" : ""}`]),
107
- onValidationSuccess: O
108
- }, {
109
- default: v(() => {
110
- var c, x, T, E;
111
- return [
112
- n(D, {
113
- modelValue: r.value.name,
114
- "onUpdate:modelValue": s[0] || (s[0] = (f) => r.value.name = f),
115
- label: "Hour set name",
116
- placeholder: "Enter name here",
117
- rules: [(f) => f !== "" || "Cannot be empty"]
118
- }, null, 8, ["modelValue", "rules"]),
119
- n(_, {
120
- "model-value": e(H)().hour(((c = r.value.startTime) == null ? void 0 : c.hour) ?? 0).minute(((x = r.value.startTime) == null ? void 0 : x.minute) ?? 0).format("HH:mm"),
121
- class: "grow",
122
- label: "Start time",
123
- "onUpdate:modelValue": s[1] || (s[1] = (f) => {
124
- f && (r.value.startTime.hour = Number(f.split(":")[0]), r.value.startTime.minute = Number(f.split(":")[1]));
125
- })
126
- }, null, 8, ["model-value"]),
127
- n(_, {
128
- "model-value": e(H)().hour(((T = r.value.endTime) == null ? void 0 : T.hour) ?? 0).minute(((E = r.value.endTime) == null ? void 0 : E.minute) ?? 0).format("HH:mm"),
129
- class: "grow",
130
- label: "Close time",
131
- "onUpdate:modelValue": s[2] || (s[2] = (f) => {
132
- f && (r.value.endTime.hour = Number(f.split(":")[0]), r.value.endTime.minute = Number(f.split(":")[1]));
133
- })
134
- }, null, 8, ["model-value"])
135
- ];
136
- }),
137
- _: 1
138
- }, 8, ["class"])
139
- ]),
140
- _: 1
141
- }, 8, ["modelValue"])),
142
- s[7] || (s[7] = l("div", { class: "flex flex-col gap-2" }, [
143
- l("p", { class: "fm-typo-en-title-sm-600" }, "Reporting hour"),
144
- l("p", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, " Configure reporting hours for more accurate sales reporting. These reporting hours will create new filters for time of day filtering. ")
145
- ], -1)),
146
- l("div", _e, [
147
- (y(!0), S(L, null, Y(o.value, (c, x) => (y(), U(se, {
148
- key: `report_${x}`,
149
- class: "flex p-4",
150
- variant: "outlined"
151
- }, {
152
- default: v(() => [
153
- l("div", xe, [
154
- n(N, {
155
- "model-value": c.isDefault,
156
- "onUpdate:modelValue": (T) => te(T, x)
157
- }, null, 8, ["model-value", "onUpdate:modelValue"]),
158
- l("div", null, [
159
- l("p", Ce, [
160
- G(g(c.name) + " ", 1),
161
- B(n(ae, {
162
- label: "Default",
163
- class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
164
- compact: ""
165
- }, null, 512), [
166
- [M, c.isDefault]
167
- ])
168
- ]),
169
- l("p", Ve, g(e(w)(c.startTime)) + " - " + g(e(w)(c.endTime)), 1)
170
- ]),
171
- s[6] || (s[6] = l("div", { class: "grow" }, null, -1)),
172
- B(l("div", be, [
173
- n(u, {
174
- icon: "edit",
175
- variant: "tertiary",
176
- onClick: (T) => X(x)
177
- }, null, 8, ["onClick"]),
178
- n(u, {
179
- icon: "delete",
180
- variant: "tertiary",
181
- onClick: (T) => ee(x)
182
- }, null, 8, ["onClick"])
183
- ], 512), [
184
- [M, x !== 0]
185
- ])
186
- ])
187
- ]),
188
- _: 2
189
- }, 1024))), 128)),
190
- l("div", null, [
191
- n(u, {
192
- label: "Add reporting hour",
193
- variant: "secondary",
194
- icon: "add",
195
- "icon-position": "prepend",
196
- "border-color": e(z).ColorPrimary,
197
- "text-color": e(z).ColorPrimary,
198
- onClick: Z
199
- }, null, 8, ["border-color", "text-color"])
200
- ])
201
- ])
202
- ]);
203
- };
204
- }
205
- }), Te = { class: "py-2 w-full gap-2 flex flex-col" }, Se = /* @__PURE__ */ $({
206
- __name: "CompareRangeSetting",
207
- props: {
208
- modelValue: { required: !0, default: J.PrecedingPeriod },
209
- modelModifiers: {}
210
- },
211
- emits: ["update:modelValue"],
212
- setup(b) {
213
- const a = P(b, "modelValue"), d = Object.values(J).map((t) => ({
214
- label: Q(t),
215
- value: t
216
- })).slice(0, -1);
217
- return (t, m) => (y(), S("div", Te, [
218
- m[1] || (m[1] = l("p", { class: "fm-typo-en-title-sm-600" }, "Date Range Comparison", -1)),
219
- n(W, {
220
- modelValue: a.value,
221
- "onUpdate:modelValue": m[0] || (m[0] = (V) => a.value = V),
222
- label: "Default comparison date range",
223
- items: e(d),
224
- "disable-search": !0
225
- }, null, 8, ["modelValue", "items"])
226
- ]));
227
- }
228
- }), ke = { class: "py-2 w-full gap-2 flex flex-col" }, Fe = /* @__PURE__ */ $({
229
- __name: "DateRangeSetting",
230
- props: {
231
- modelValue: { required: !0 },
232
- modelModifiers: {}
233
- },
234
- emits: ["update:modelValue"],
235
- setup(b) {
236
- const a = P(b, "modelValue"), d = Object.values(de).filter((t) => !["This month", "Last month"].includes(t)).map((t) => ({
237
- label: t,
238
- value: t
239
- }));
240
- return (t, m) => (y(), S("div", ke, [
241
- m[1] || (m[1] = l("p", { class: "fm-typo-en-title-sm-600" }, "Date range", -1)),
242
- n(W, {
243
- modelValue: a.value,
244
- "onUpdate:modelValue": m[0] || (m[0] = (V) => a.value = V),
245
- label: "Default date range",
246
- items: e(d),
247
- "disable-search": !0
248
- }, null, 8, ["modelValue", "items"])
249
- ]));
250
- }
251
- }), he = { class: "w-2/4" }, we = { class: "fm-typo-en-body-lg-600" }, $e = { class: "fm-typo-en-body-lg-600" }, Re = { class: "fm-typo-en-body-lg-600" }, Je = /* @__PURE__ */ $({
252
- __name: "Setting",
253
- setup(b) {
254
- const { breakpoints: a } = K(), d = pe(), { defaultDateSetting: t } = ve(d), m = I();
255
- return re(
256
- [
257
- () => t.value.defaultCompareType,
258
- () => t.value.defaultDateRange,
259
- () => t.value.timeOptions
260
- ],
261
- () => {
262
- t.value.timeOptions.length === 0 ? m.open({ message: "Report hour cannot be empty", type: "error" }) : d.createOrUpdateBusinessSetting(t.value);
263
- },
264
- { deep: !0 }
265
- ), (V, i) => {
266
- const R = C("FmMenuDivider"), r = C("FmCard");
267
- return y(), U(ue, null, {
268
- default: v(() => [
269
- n(me, null, {
270
- title: v(() => i[3] || (i[3] = [
271
- G(" Settings ")
272
- ])),
273
- _: 1
274
- }),
275
- l("div", {
276
- class: h(`${e(a).sm || e(a).xs ? "pb-20" : ""} overflow-y-auto flex`),
277
- style: ie({ height: `calc(100% - ${e(a).sm || e(a).xs ? 60 : 72}px)` })
278
- }, [
279
- l("div", {
280
- class: h(`${e(a).lg || e(a).md ? "px-24" : "px-3"} w-full flex flex-col gap-[40px]`)
281
- }, [
282
- n(De, {
283
- modelValue: e(t).timeOptions,
284
- "onUpdate:modelValue": i[0] || (i[0] = (o) => e(t).timeOptions = o)
285
- }, null, 8, ["modelValue"]),
286
- n(Fe, {
287
- modelValue: e(t).defaultDateRange,
288
- "onUpdate:modelValue": i[1] || (i[1] = (o) => e(t).defaultDateRange = o)
289
- }, null, 8, ["modelValue"]),
290
- n(Se, {
291
- modelValue: e(t).defaultCompareType,
292
- "onUpdate:modelValue": i[2] || (i[2] = (o) => e(t).defaultCompareType = o)
293
- }, null, 8, ["modelValue"])
294
- ], 2),
295
- B(l("div", he, [
296
- n(r, {
297
- variant: "outlined",
298
- class: h(["flex flex-col gap-3", `${e(a).lg || e(a).md ? "mr-5 p-6" : ""}`])
299
- }, {
300
- default: v(() => [
301
- i[4] || (i[4] = l("p", { class: "fm-typo-en-title-sm-600" }, "Report setting summary", -1)),
302
- n(R),
303
- i[5] || (i[5] = l("p", { class: "text-fm-color-typo-secondary" }, "Reporting hour", -1)),
304
- (y(!0), S(L, null, Y(e(t).timeOptions, (o, O) => (y(), S("div", { key: O }, [
305
- l("p", we, g(o.name) + " " + g(o.isDefault ? "(default)" : "") + " " + g(e(w)(o.startTime)) + " " + g(e(w)(o.endTime)) + " " + g(e(fe)(o.startTime, o.endTime)), 1)
306
- ]))), 128)),
307
- i[6] || (i[6] = l("p", { class: "text-fm-color-typo-secondary" }, "Default date range", -1)),
308
- l("p", $e, g(e(t).defaultDateRange), 1),
309
- i[7] || (i[7] = l("p", { class: "text-fm-color-typo-secondary" }, "Comparison date range", -1)),
310
- l("p", Re, g(e(Q)(e(t).defaultCompareType ?? "")), 1)
311
- ]),
312
- _: 1
313
- }, 8, ["class"])
314
- ], 512), [
315
- [M, e(a).lg || e(a).md]
316
- ])
317
- ], 6)
318
- ]),
319
- _: 1
320
- });
321
- };
322
- }
323
- });
324
- export {
325
- Je as default
326
- };