@feedmepos/mf-report 5.19.20 → 5.19.21-beta.1

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 (34) hide show
  1. package/dist/{App-CpPkDCME.js → App-nUveJE2d.js} +31 -31
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-BLVm6EP9.js → BaseDialog.vue_vue_type_script_setup_true_lang-BMUdA00d.js} +2096 -1854
  3. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-BeBr4VIF.js +282 -0
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-DTHkWGvx.js → Default.vue_vue_type_script_setup_true_lang-B4KGPc-A.js} +2 -2
  5. package/dist/FilterSelector.vue_vue_type_script_setup_true_lang-TaboGeqe.js +2455 -0
  6. package/dist/{InsightView-wYbhKrWa.js → InsightView-VRhKOgcg.js} +5 -5
  7. package/dist/{Integration-GkPCivXG.js → Integration-BovNO2yX.js} +2 -2
  8. package/dist/{Integrations-BGNXoeWI.js → Integrations-DIXSWGS_.js} +3 -3
  9. package/dist/{Layout-B7pJLV4_.js → Layout-Djm1HkoE.js} +1 -1
  10. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BKLjwl2R.js +107 -0
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-Cl6q8Efn.js → NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.js} +7331 -7518
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-CUuIeYhQ.js → NoData.vue_vue_type_script_setup_true_lang-CtN7oqXx.js} +1 -1
  13. package/dist/{OverviewView-DzumtIfB.js → OverviewView-D58xngVs.js} +5 -5
  14. package/dist/{Report-B_SX8ejx.js → Report-B-YYrr3B.js} +4 -4
  15. package/dist/ReportEditor-0cP29pgc.js +1070 -0
  16. package/dist/{ReportView-DPMurcsC.js → ReportView-BgUotxrl.js} +7 -7
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-IdXw91_v.js → SelectComponent.vue_vue_type_script_setup_true_lang-BcQEW5MO.js} +1 -1
  18. package/dist/{Setting-BsikuNba.js → Setting-DgU3IvCo.js} +4 -4
  19. package/dist/TileEditor-DzDpc7L6.js +2766 -0
  20. package/dist/TransitionFade-DwcV3_6N.js +2366 -0
  21. package/dist/app.js +49 -23
  22. package/dist/assets/formatChartData.worker-Cb40k96i.js +134 -0
  23. package/dist/assets/processTableData.worker-DS6uNX_h.js +134 -0
  24. package/dist/{vue-i18n-D33f1SSo.js → vue-i18n-BJW_sJot.js} +405 -400
  25. package/package.json +1 -1
  26. package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-C7mhpRK0.js +0 -185
  27. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DVY4vxAN.js +0 -1669
  28. package/dist/MenuTab.vue_vue_type_script_setup_true_lang-C7pQMilo.js +0 -352
  29. package/dist/ReportEditor-D5OHT5As.js +0 -1013
  30. package/dist/TileEditor-Bzk4U52d.js +0 -2735
  31. package/dist/TransitionFade-Blz6m84x.js +0 -2499
  32. package/dist/assets/formatChartData.worker-CO5zKPH5.js +0 -134
  33. package/dist/assets/processTableData.worker-BAMcED0j.js +0 -134
  34. package/dist/helper-B2iB0Dbh.js +0 -75
@@ -0,0 +1,282 @@
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-BJW_sJot.js";
3
+ import { detectLocale as z } from "@feedmepos/mf-common";
4
+ import { storeToRefs as L } from "pinia";
5
+ 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
+ let n = null;
8
+ const a = function(...o) {
9
+ return n && clearTimeout(n), new Promise((l) => {
10
+ n = setTimeout(() => {
11
+ n = null;
12
+ const m = e(...o);
13
+ l(m);
14
+ }, t);
15
+ });
16
+ };
17
+ return a.cancel = () => {
18
+ n && (clearTimeout(n), n = null);
19
+ }, a;
20
+ }
21
+ function J() {
22
+ return [...Array(12).keys()].map((e) => r().month(e).format("MMM"));
23
+ }
24
+ function le(e, t, n = "") {
25
+ switch (e.type) {
26
+ case g.Day:
27
+ return t("report.schedule.everyDay");
28
+ case g.Week: {
29
+ let a = `${t("report.schedule.everyWeek")} `;
30
+ const o = [
31
+ t("report.days.sunday"),
32
+ t("report.days.monday"),
33
+ t("report.days.tuesday"),
34
+ t("report.days.wednesday"),
35
+ t("report.days.thursday"),
36
+ t("report.days.friday"),
37
+ t("report.days.saturday")
38
+ ];
39
+ if (e.days)
40
+ for (let l = 0; l < e.days.length; l++)
41
+ a = a + o[e.days[l]] + (l !== e.days.length - 1 ? "," : "");
42
+ return a;
43
+ }
44
+ case g.Month: {
45
+ let a = `${t("report.schedule.everyMonth")} `;
46
+ return e.days && (a = a + e.days.join(",")), a;
47
+ }
48
+ case g.Year: {
49
+ if (!e.months && !e.days)
50
+ return t("report.schedule.customDate");
51
+ let a = `${t("report.schedule.everyYear")} `;
52
+ if (e.months) {
53
+ const o = J();
54
+ a = a + e.months.map((l) => o[l - 1]).join(",");
55
+ }
56
+ return e.months && e.days && (a = a + ` ${t("report.common.and")} `), e.days && (a = a + e.days.join(",")), a;
57
+ }
58
+ default:
59
+ return n;
60
+ }
61
+ }
62
+ function F(e = {
63
+ startDate: null,
64
+ endDate: null,
65
+ locale: "en-US"
66
+ }) {
67
+ if (!e.startDate || !e.endDate)
68
+ return "No comparison";
69
+ let t = r().subtract(1, "day").endOf("day"), n = r().endOf("day");
70
+ 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
+ function oe(e = {
73
+ startTime: null,
74
+ endTime: null,
75
+ locale: "en-US"
76
+ }) {
77
+ const t = "hh:mmA", { startTime: n, endTime: a, locale: o } = e;
78
+ 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)}`;
81
+ }
82
+ 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
+ __name: "FilterChip",
84
+ props: {
85
+ label: {
86
+ type: String,
87
+ default: ""
88
+ },
89
+ leftIcon: {
90
+ type: String,
91
+ default: ""
92
+ },
93
+ rightIcon: {
94
+ type: String,
95
+ default: ""
96
+ },
97
+ trailingIcon: {
98
+ type: String,
99
+ default: ""
100
+ }
101
+ },
102
+ setup(e) {
103
+ const t = e;
104
+ return (n, a) => {
105
+ const o = S("FmIcon"), l = S("FmChip");
106
+ return y(), p(l, { class: "bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-fit flex items-center gap-1" }, {
107
+ default: I(() => [
108
+ e.leftIcon ? (y(), p(o, {
109
+ key: 0,
110
+ name: t.leftIcon,
111
+ size: "sm",
112
+ outline: "",
113
+ class: "flex-none"
114
+ }, null, 8, ["name"])) : Y("", !0),
115
+ M("div", Q, [
116
+ M("span", X, j(t.label), 1),
117
+ e.rightIcon ? (y(), p(o, {
118
+ key: 0,
119
+ name: e.rightIcon,
120
+ size: "sm",
121
+ outline: "",
122
+ class: "flex-none"
123
+ }, null, 8, ["name"])) : Y("", !0),
124
+ M("span", Z, [
125
+ A(n.$slots, "default")
126
+ ]),
127
+ e.trailingIcon ? (y(), p(o, {
128
+ key: 1,
129
+ name: e.trailingIcon,
130
+ size: "sm",
131
+ outline: "",
132
+ class: "flex-none"
133
+ }, null, 8, ["name"])) : Y("", !0)
134
+ ])
135
+ ]),
136
+ _: 3
137
+ });
138
+ };
139
+ }
140
+ }), _ = { class: "flex gap-2 items-center" }, h = "YYYY-MM-DD", se = /* @__PURE__ */ V({
141
+ __name: "DateRangeSelect",
142
+ props: /* @__PURE__ */ $({
143
+ compare: {
144
+ type: Boolean,
145
+ default: !1
146
+ },
147
+ datePredefinedRanges: {
148
+ type: Array,
149
+ default: () => H()
150
+ },
151
+ label: {
152
+ type: String,
153
+ required: !1,
154
+ default: null
155
+ },
156
+ removable: {
157
+ type: Boolean,
158
+ required: !1,
159
+ default: !1
160
+ }
161
+ }, {
162
+ compareType: {
163
+ type: String,
164
+ default: K.PRECEDING_PERIOD
165
+ },
166
+ compareTypeModifiers: {},
167
+ dateRange: {
168
+ type: Object,
169
+ default: () => ({
170
+ startDate: void 0,
171
+ endDate: void 0
172
+ })
173
+ },
174
+ dateRangeModifiers: {},
175
+ compareDateRange: {
176
+ type: Object,
177
+ default: () => ({
178
+ startDate: void 0,
179
+ endDate: void 0
180
+ })
181
+ },
182
+ compareDateRangeModifiers: {}
183
+ }),
184
+ emits: /* @__PURE__ */ $(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
185
+ 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
191
+ }), 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
194
+ });
195
+ k(
196
+ [() => d.value],
197
+ () => {
198
+ d.value.endDate || (d.value.endDate = d.value.startDate);
199
+ const u = {
200
+ startDate: r.tz(d.value.startDate, i.value).startOf("day").utc().toISOString(),
201
+ endDate: r.tz(d.value.endDate, i.value).endOf("day").utc().toISOString()
202
+ };
203
+ l.value = u, a("update", u);
204
+ },
205
+ { deep: !0 }
206
+ ), k([() => f.value], () => {
207
+ const u = f.value.startDate, s = f.value.endDate, v = u ? r(
208
+ 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 = {
211
+ startDate: v,
212
+ endDate: c
213
+ };
214
+ });
215
+ function E(u) {
216
+ o.value = u;
217
+ }
218
+ function N(u) {
219
+ a("chip-closed", u);
220
+ }
221
+ return (u, s) => {
222
+ const v = S("FmSimpleDateRangePicker");
223
+ return y(), U("div", _, [
224
+ b(v, {
225
+ modelValue: d.value,
226
+ "onUpdate:modelValue": s[1] || (s[1] = (c) => d.value = c),
227
+ "show-predefined-range": "",
228
+ "predefined-range": e.datePredefinedRanges.map((c) => ({
229
+ ...c,
230
+ label: D(n)(`report.date.${c.label}`)
231
+ })),
232
+ class: "w-2/6"
233
+ }, {
234
+ "trigger-button": I(() => [
235
+ b(P, {
236
+ "left-icon": e.label ? "filter_alt" : "calendar_month",
237
+ label: e.label ?? D(F)({
238
+ startDate: d.value.startDate ?? "",
239
+ endDate: d.value.endDate ?? "",
240
+ locale: D(z)()
241
+ }),
242
+ removable: e.removable,
243
+ onChipClosed: s[0] || (s[0] = (c) => N(!0))
244
+ }, null, 8, ["left-icon", "label", "removable"])
245
+ ]),
246
+ _: 1
247
+ }, 8, ["modelValue", "predefined-range"]),
248
+ e.compare ? (y(), p(v, {
249
+ key: 0,
250
+ modelValue: f.value,
251
+ "onUpdate:modelValue": s[2] || (s[2] = (c) => f.value = c),
252
+ "compare-type": o.value,
253
+ "onUpdate:compareType": s[3] || (s[3] = (c) => o.value = c),
254
+ "show-predefined-range": "",
255
+ "compare-target": d.value,
256
+ onSelectComparison: E
257
+ }, {
258
+ "trigger-button": I(() => [
259
+ b(P, {
260
+ label: `${D(n)("report.common.compare")}: ${D(F)({
261
+ startDate: f.value.startDate ?? null,
262
+ endDate: f.value.endDate ?? null,
263
+ locale: D(z)()
264
+ })}`
265
+ }, null, 8, ["label"])
266
+ ]),
267
+ _: 1
268
+ }, 8, ["modelValue", "compare-type", "compare-target"])) : Y("", !0)
269
+ ]);
270
+ };
271
+ }
272
+ });
273
+ export {
274
+ g as C,
275
+ se as _,
276
+ P as a,
277
+ F as b,
278
+ oe as c,
279
+ re as d,
280
+ le as e,
281
+ J as g
282
+ };
@@ -1,8 +1,8 @@
1
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-Cl6q8Efn.js";
2
+ import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BRpEu6MW.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-D33f1SSo.js";
5
+ import { u as q, f as w } from "./vue-i18n-BJW_sJot.js";
6
6
  import { useRoute as B } from "vue-router";
7
7
  const $ = {
8
8
  key: 1,