@feedmepos/mf-report 5.17.3-beta.0 → 5.18.0-beta.0

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-C9I2NljG.js +152 -0
  2. package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CUteALow.js → BaseDialog.vue_vue_type_script_setup_true_lang-DK6im_EY.js} +5 -5
  3. package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-CLTU-OJV.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-uiSe3Jon.js} +2 -2
  4. package/dist/{Default.vue_vue_type_script_setup_true_lang-BA60lPjR.js → Default.vue_vue_type_script_setup_true_lang-BX_Bz8I8.js} +2 -2
  5. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-BKEfQCHO.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CNRtuVTK.js} +5 -5
  6. package/dist/{InsightView-B22He5Eq.js → InsightView-DV6Nvi6h.js} +5 -5
  7. package/dist/{Integration-DwkFaxGn.js → Integration-CWUSF_o7.js} +2 -2
  8. package/dist/{Integrations-CqMymn98.js → Integrations-BOVIAEgw.js} +3 -3
  9. package/dist/{Layout-BklWN0PE.js → Layout-CTUQOBlj.js} +1 -1
  10. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-C3V3j1yU.js → MenuTab.vue_vue_type_script_setup_true_lang-DAFwqfMp.js} +6 -6
  11. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-D-BS0WM5.js → NavigationTab.vue_vue_type_script_setup_true_lang-BDA9wTdJ.js} +9599 -9310
  12. package/dist/{NoData.vue_vue_type_script_setup_true_lang-By5gQvZP.js → NoData.vue_vue_type_script_setup_true_lang-Divo8W18.js} +1 -1
  13. package/dist/{OverviewView-VqJNiehH.js → OverviewView-BdkNW-E-.js} +5 -5
  14. package/dist/Report-YAviXRm9.js +449 -0
  15. package/dist/{ReportEditor-IlsWxYjl.js → ReportEditor-CMqGCf9p.js} +6 -6
  16. package/dist/ReportView-CyTt0xju.js +252 -0
  17. package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-eK4eP1Qy.js → SelectComponent.vue_vue_type_script_setup_true_lang-mR2PeX3S.js} +1 -1
  18. package/dist/{Setting-BZuPbv9P.js → Setting-CxGy_k2J.js} +4 -4
  19. package/dist/{TileEditor-zMD1VLuR.js → TileEditor-BxXlzNXM.js} +7 -7
  20. package/dist/{TransitionFade-Doi_KsOY.js → TransitionFade-C0ttcU9I.js} +5 -5
  21. package/dist/app.js +71 -23
  22. package/dist/{helper-bP_1beSH.js → helper-UCnMF9KV.js} +1 -1
  23. package/dist/{vue-i18n-BgRNnwPF.js → vue-i18n-CTLGxUiF.js} +1468 -1452
  24. package/package.json +1 -1
  25. package/dist/App-fjOq3b8Z.js +0 -149
  26. package/dist/Report-ahCD8eFy.js +0 -426
  27. package/dist/ReportView-CPlF_2ST.js +0 -192
@@ -1,192 +0,0 @@
1
- import { defineComponent as z, computed as v, resolveComponent as H, createBlock as g, openBlock as u, withCtx as M, createVNode as h, createElementVNode as D, unref as o, normalizeStyle as Y, normalizeClass as R, createElementBlock as $, Fragment as G, renderList as Q } from "vue";
2
- import { _ as U } from "./MenuTab.vue_vue_type_script_setup_true_lang-C3V3j1yU.js";
3
- import { _ as W } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-BKEfQCHO.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-BA60lPjR.js";
6
- import { a as ee } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CUteALow.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-D-BS0WM5.js";
9
- import { _ as ae } from "./NoData.vue_vue_type_script_setup_true_lang-By5gQvZP.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 "./vue-i18n-BgRNnwPF.js";
12
- import { u as ce } from "./message-dialog-UoMWOnil.js";
13
- import { r as pe } from "./i18n-Cif1I9J2.js";
14
- const me = { class: "sticky top-0 z-10 bg-white" }, Re = /* @__PURE__ */ z({
15
- __name: "ReportView",
16
- setup(de) {
17
- const { t: r, te: P } = ie(), m = K(), d = X(), i = le(), { promptMessage: E } = ce(), f = ee(), b = oe(), { promptLoader: I } = se(), { breakpoints: n } = ne(), {
18
- currentReport: t,
19
- currentReportId: c,
20
- isOpenDownloadDialog: O,
21
- isOpenEmailDialog: J,
22
- editingReport: N,
23
- canCreateCustomReport: q,
24
- customReportQuota: y
25
- } = p(f), { isOpenAccountingDialog: A } = p(te()), { isOpenScheduleDialog: _ } = p(re()), { disabled: B } = p(ue()), L = 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 B.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 T() {
78
- N.value = JSON.parse(JSON.stringify(t.value)), m.push({
79
- name: "reportEditor",
80
- query: d.query
81
- });
82
- }
83
- async function j() {
84
- if (!q.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 E({
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 I(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
- A.value = !0;
119
- }
120
- function F() {
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 : []), V = 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 = H("FmPageHead");
150
- return u(), g(Z, null, {
151
- default: M(() => {
152
- var S;
153
- return [
154
- h(s, {
155
- title: o(pe)(o(r), o(P), (S = o(t)) == null ? void 0 : S.name, "other"),
156
- "back-button": !0,
157
- actions: V.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" && j(), a === "download" && (O.value = !0), a === "email" && (J.value = !0), a === "edit" && T(), a === "schedule_email" && (_.value = !0), a === "content_copy" && F(), a === "export" && C(), a === "report_jobs" && k();
161
- })
162
- }, null, 8, ["title", "actions"]),
163
- D("div", {
164
- class: R(`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
- D("div", me, [
168
- h(U, {
169
- "model-value": o(n).lg || o(n).md ? L.value : []
170
- }, null, 8, ["model-value"])
171
- ]),
172
- o(t) && x.value.length > 0 ? (u(), $("div", {
173
- key: 0,
174
- class: R(["grid grid-cols-12", o(n).sm || o(n).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
175
- }, [
176
- (u(!0), $(G, null, Q(x.value, (a, w) => (u(), g(W, {
177
- key: `widget_${o(c)}_${w}`,
178
- "model-value": a,
179
- index: w
180
- }, null, 8, ["model-value", "index"]))), 128))
181
- ], 2)) : (u(), g(ae, { key: 1 }))
182
- ], 6)
183
- ];
184
- }),
185
- _: 1
186
- });
187
- };
188
- }
189
- });
190
- export {
191
- Re as default
192
- };