@feedmepos/mf-report 5.5.10 → 5.5.11-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 (30) hide show
  1. package/dist/{App-CI59NhMr.js → App-C93dQ2YZ.js} +42 -42
  2. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-C3Dsnzzo.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CN3UKRaQ.js} +2 -2
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-HE3jlz2q.js → Default.vue_vue_type_script_setup_true_lang-D7TqpbQ9.js} +2 -2
  4. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js +1082 -0
  5. package/dist/{InsightView-CArL6hDD.js → InsightView-bZx6j8q5.js} +6 -6
  6. package/dist/{Integration-CYsx29Kj.js → Integration-CoavOChV.js} +3 -3
  7. package/dist/{Integrations-RluH7jrn.js → Integrations-B6ACZi86.js} +3 -3
  8. package/dist/{Layout-BhKNg55v.js → Layout-CVsorGV9.js} +1 -1
  9. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-B_N9ULY9.js → MenuTab.vue_vue_type_script_setup_true_lang-AopNmaX1.js} +3 -3
  10. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DULwCyXt.js → NavigationTab.vue_vue_type_script_setup_true_lang-4LIEfrJG.js} +5 -5
  11. package/dist/{NoData.vue_vue_type_script_setup_true_lang-CCA1l-Cz.js → NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js} +1 -1
  12. package/dist/{OverviewView-CQGrtNQb.js → OverviewView-D7wq9voi.js} +5 -5
  13. package/dist/{Report-Cl-cAzXC.js → Report-St-N-XGu.js} +90 -89
  14. package/dist/{ReportEditor-CWjNbjr_.js → ReportEditor-BhaqAf-H.js} +176 -175
  15. package/dist/ReportView-BqHk2OOl.js +190 -0
  16. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-CXYvLXnR.js → SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js} +1 -1
  17. package/dist/{Setting-DC_StvBp.js → Setting-CF6M_Gb2.js} +4 -4
  18. package/dist/TileEditor-Dh1OSYsO.js +2538 -0
  19. package/dist/{TransitionFade-DdNpeVds.js → TransitionFade-z9aoIr9s.js} +5 -5
  20. package/dist/app.js +1586 -41
  21. package/dist/{global-loader-KvOGLx9k.js → global-loader-BqFQzk46.js} +1 -1
  22. package/dist/i18n-Cif1I9J2.js +11 -0
  23. package/dist/{index-CW2xYO89.js → index-DqqTHE7n.js} +1 -1
  24. package/dist/{report-schema-Zw8e6-XZ.js → report-schema-OJAFh4P6.js} +1 -1
  25. package/dist/style.css +1 -1
  26. package/dist/{v4-CHk_oNmT.js → v4-HCTsB306.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-DxpesBb1.js +0 -1074
  29. package/dist/ReportView-ChiQMhSH.js +0 -180
  30. package/dist/TileEditor-DNuK7pwX.js +0 -2514
@@ -0,0 +1,190 @@
1
+ import { defineComponent as V, computed as v, resolveComponent as z, createBlock as g, openBlock as u, withCtx as H, createVNode as h, createElementVNode as M, unref as o, normalizeStyle as Y, normalizeClass as D, createElementBlock as R, Fragment as G, renderList as Q } from "vue";
2
+ import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-AopNmaX1.js";
3
+ import { _ as W } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-Blu98Lu7.js";
4
+ import { useRouter as K, useRoute as X } from "vue-router";
5
+ import { _ as Z } from "./Default.vue_vue_type_script_setup_true_lang-D7TqpbQ9.js";
6
+ import { a as ee } from "./v4-HCTsB306.js";
7
+ import { storeToRefs as p } from "pinia";
8
+ import { b as oe, c as te, u as re } from "./NavigationTab.vue_vue_type_script_setup_true_lang-4LIEfrJG.js";
9
+ import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-DI4X_DSc.js";
10
+ import { useSnackbar as le, useBreakpoints as ne } from "@feedmepos/ui-library";
11
+ import { u as ie, f as se, e as ue } from "./global-loader-BqFQzk46.js";
12
+ import { u as ce } from "./message-dialog-UoMWOnil.js";
13
+ import { r as pe } from "./i18n-Cif1I9J2.js";
14
+ const De = /* @__PURE__ */ V({
15
+ __name: "ReportView",
16
+ setup(me) {
17
+ const { t: r, te: $ } = ie(), m = K(), d = X(), i = le(), { promptMessage: P } = ce(), f = ee(), b = oe(), { promptLoader: E } = se(), { breakpoints: n } = ne(), {
18
+ currentReport: t,
19
+ currentReportId: c,
20
+ isOpenDownloadDialog: I,
21
+ isOpenEmailDialog: O,
22
+ editingReport: J,
23
+ canCreateCustomReport: N,
24
+ customReportQuota: y
25
+ } = p(f), { isOpenAccountingDialog: q } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: A } = p(ue()), B = v(() => {
26
+ const l = [
27
+ {
28
+ icon: "mail",
29
+ label: r("report.common.emailSchedule"),
30
+ onClick: () => {
31
+ _.value = !0;
32
+ }
33
+ },
34
+ // {
35
+ // icon: "article",
36
+ // label: "Set as Default",
37
+ // onClick: async () => {
38
+ // await promptLoader(async () => {
39
+ // if (currentReport.value) {
40
+ // try {
41
+ // await reportStore.updateDefaultReport(currentReport.value.id)
42
+ // snackbar.open({
43
+ // message: `Set ${currentReport.value.name} as default successful`,
44
+ // type: "success"
45
+ // })
46
+ // } catch (err) {
47
+ // snackbar.open({ message: JSON.stringify(err), type: "error" })
48
+ // }
49
+ // }
50
+ // })
51
+ // }
52
+ // },
53
+ {
54
+ icon: "content_copy",
55
+ label: r("report.common.copyID"),
56
+ onClick: () => {
57
+ t.value && (navigator.clipboard.writeText(c.value), i.open({ message: r("report.messages.copiedReportIdToClipboard"), type: "success" }));
58
+ }
59
+ },
60
+ {
61
+ icon: "report_jobs",
62
+ label: r("report.common.reportStatus"),
63
+ onClick: () => {
64
+ k();
65
+ }
66
+ }
67
+ ];
68
+ return A.value || l.splice(1, 0, {
69
+ icon: "download",
70
+ label: r("report.common.accountingExport"),
71
+ onClick: C
72
+ }), l;
73
+ });
74
+ async function k() {
75
+ b.isOpenJobDialog = !0, await b.getJobs();
76
+ }
77
+ function L() {
78
+ J.value = JSON.parse(JSON.stringify(t.value)), m.push({
79
+ name: "reportEditor",
80
+ query: d.query
81
+ });
82
+ }
83
+ async function T() {
84
+ if (!N.value) {
85
+ let e = `Your current plan only support up to ${y.value} custom reports.`;
86
+ y.value === 0 && (e = "Your current plan does not support custom report."), i.open({
87
+ message: e,
88
+ type: "error"
89
+ });
90
+ return;
91
+ }
92
+ if (!t.value) {
93
+ i.open({ message: "No Widget", type: "error" });
94
+ return;
95
+ }
96
+ if (await P({
97
+ title: `${r("report.messages.saveReport")}`,
98
+ message: r("report.messages.confirmAction", {
99
+ action: r("report.common.duplicate"),
100
+ name: t.value.name
101
+ })
102
+ }) && t.value) {
103
+ const e = JSON.parse(JSON.stringify(t.value));
104
+ e.editable = !0, e.id = "", e.name = `${e.name} duplicate`;
105
+ try {
106
+ await E(async () => {
107
+ await f.createOrUpdateReport(e), f.updateCurrentReportId(c.value), m.push({
108
+ name: "reportView",
109
+ query: d.query
110
+ });
111
+ });
112
+ } catch (s) {
113
+ console.log(s), i.open({ message: "Failed to clone report", type: "error" });
114
+ }
115
+ }
116
+ }
117
+ function C() {
118
+ q.value = !0;
119
+ }
120
+ function j() {
121
+ t.value && (navigator.clipboard.writeText(c.value), i.open({ message: "Copied report ID to clipboard", type: "success" }));
122
+ }
123
+ const x = v(() => t.value ? t.value.tiles : []), F = v(() => {
124
+ var e;
125
+ let l = [
126
+ (e = t == null ? void 0 : t.value) != null && e.editable ? { label: r("report.common.edit"), value: "edit", isPrimary: !1 } : {
127
+ label: r("report.common.duplicate"),
128
+ value: "duplicate",
129
+ isPrimary: !1
130
+ },
131
+ {
132
+ label: r("report.common.download"),
133
+ value: "download",
134
+ isPrimary: !0,
135
+ prependIcon: "download"
136
+ },
137
+ { label: r("report.schedule.sendEmail"), value: "email", isPrimary: !0 }
138
+ ];
139
+ return n.value.xs && (l = [
140
+ ...l,
141
+ { label: "Send Email", value: "email", isPrimary: !1 },
142
+ { label: "Job Delivery Status", value: "report_jobs", isPrimary: !1 },
143
+ { label: "Email schedule", value: "schedule_email", isPrimary: !1 },
144
+ { label: "Accounting export", value: "export", isPrimary: !1 },
145
+ { label: "Copy ID", value: "content_copy", isPrimary: !1 }
146
+ ], l = l.filter((s) => s.value !== "edit")), l;
147
+ });
148
+ return (l, e) => {
149
+ const s = z("FmPageHead");
150
+ return u(), g(Z, null, {
151
+ default: H(() => {
152
+ var S;
153
+ return [
154
+ h(s, {
155
+ title: o(pe)(o(r), o($), (S = o(t)) == null ? void 0 : S.name, "other"),
156
+ "back-button": !0,
157
+ actions: F.value,
158
+ "onClick:back": e[0] || (e[0] = (a) => o(m).push({ name: "reports", query: o(d).query })),
159
+ "onClick:action": e[1] || (e[1] = (a) => {
160
+ a === "duplicate" && T(), a === "download" && (I.value = !0), a === "email" && (O.value = !0), a === "edit" && L(), a === "schedule_email" && (_.value = !0), a === "content_copy" && j(), a === "export" && C(), a === "report_jobs" && k();
161
+ })
162
+ }, null, 8, ["title", "actions"]),
163
+ M("div", {
164
+ class: D(`flex flex-col overflow-y-auto ${o(n).xs || o(n).sm ? "pb-20" : ""}`),
165
+ style: Y({ height: `calc(100% - ${o(n).lg || o(n).md ? 72 : 64}px)` })
166
+ }, [
167
+ h(U, {
168
+ "model-value": o(n).lg || o(n).md ? B.value : []
169
+ }, null, 8, ["model-value"]),
170
+ o(t) && x.value.length > 0 ? (u(), R("div", {
171
+ key: 0,
172
+ class: D(["grid grid-cols-12", o(n).sm || o(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
173
+ }, [
174
+ (u(!0), R(G, null, Q(x.value, (a, w) => (u(), g(W, {
175
+ key: `widget_${o(c)}_${w}`,
176
+ "model-value": a,
177
+ index: w
178
+ }, null, 8, ["model-value", "index"]))), 128))
179
+ ], 2)) : (u(), g(ae, { key: 1 }))
180
+ ], 6)
181
+ ];
182
+ }),
183
+ _: 1
184
+ });
185
+ };
186
+ }
187
+ });
188
+ export {
189
+ De as default
190
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as B, mergeModels as D, useModel as z, ref as _, computed as i, resolveComponent as t, createBlock as b, openBlock as p, withCtx as s, createElementVNode as r, normalizeStyle as L, withDirectives as U, createElementBlock as $, createVNode as u, unref as E, vShow as H, Fragment as N, renderList as q, toDisplayString as y, normalizeClass as A } from "vue";
2
- import { u as O } from "./global-loader-KvOGLx9k.js";
2
+ import { u as O } from "./global-loader-BqFQzk46.js";
3
3
  const P = { class: "fm-typo-en-body-lg-400 flex gap-4 text-fm-color-typo-primary" }, T = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, j = { class: "sticky top-0" }, K = /* @__PURE__ */ B({
4
4
  __name: "SelectComponent",
5
5
  props: /* @__PURE__ */ D({
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as B, ref as H, useModel as J, resolveComponent as h, createElementBlock as k, openBlock as x, createBlock as M, createElementVNode as t, resolveDynamicComponent as ne, unref as e, withCtx as y, createVNode as a, normalizeClass as O, toDisplayString as s, Fragment as K, renderList as Q, withDirectives as E, createTextVNode as ie, vShow as j, watch as me, normalizeStyle as ue } from "vue";
2
- import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-HE3jlz2q.js";
3
- import { u as U, d as z, C as A, D as pe, b as ce } from "./global-loader-KvOGLx9k.js";
2
+ import { _ as de } from "./Default.vue_vue_type_script_setup_true_lang-D7TqpbQ9.js";
3
+ import { u as U, d as z, C as A, D as pe, b as ce } from "./global-loader-BqFQzk46.js";
4
4
  import { components as I, useSnackbar as W, useBreakpoints as X, FmButtonColorThemeVariant as G } from "@feedmepos/ui-library";
5
- import { t as N, s as fe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-DULwCyXt.js";
5
+ import { t as N, s as fe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-4LIEfrJG.js";
6
6
  import { u as ve } from "./message-dialog-UoMWOnil.js";
7
7
  import { detectLocale as F } from "@feedmepos/mf-common";
8
- import { _ as Y } from "./SelectComponent.vue_vue_type_script_setup_true_lang-CXYvLXnR.js";
8
+ import { _ as Y } from "./SelectComponent.vue_vue_type_script_setup_true_lang-BVs1C4af.js";
9
9
  import { storeToRefs as _e } from "pinia";
10
10
  const ge = { class: "px-5 py-2" }, ye = { class: "flex" }, he = { class: "flex px-5 gap-2" }, xe = { class: "flex flex-col gap-2" }, be = { class: "fm-typo-en-title-sm-600" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ve = { class: "w-full gap-[24px] flex flex-col pt-2" }, Te = { class: "flex items-center w-full gap-3" }, De = { class: "text-fm-color-typo-primary" }, $e = { class: "text-fm-color-typo-secondary" }, Se = { class: "flex items-center gap-2" }, ke = /* @__PURE__ */ B({
11
11
  __name: "ReportHour",