@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
@@ -0,0 +1,334 @@
1
+ import { defineComponent as q, mergeModels as z, useModel as $, computed as G, resolveComponent as b, createBlock as S, unref as n, openBlock as V, withCtx as w, createElementVNode as i, createVNode as m, toDisplayString as J, createTextVNode as Q, ref as T, h as g, createElementBlock as X, Fragment as Y } from "vue";
2
+ import { useRouter as Z, useRoute as ee } from "vue-router";
3
+ import { I as R, u as E, e as N, f as oe, o as P, p as te } from "./global-loader-C3JC7z-H.js";
4
+ import { useBreakpoints as K, useSnackbar as ae, components as le, FmButtonColorThemeVariant as M } from "@feedmepos/ui-library";
5
+ import { _ as ne } from "./SelectComponent.vue_vue_type_script_setup_true_lang-C3VG1mi_.js";
6
+ import { storeToRefs as O } from "pinia";
7
+ import { u as re } from "./message-dialog-UoMWOnil.js";
8
+ import { _ as se } from "./NoData.vue_vue_type_script_setup_true_lang-BtQobm-7.js";
9
+ import { _ as ie } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ const me = { class: "flex flex-col" }, de = { class: "fm-typo-en-body-lg-600" }, ue = { class: "flex gap-2 overflow-hidden flex-col" }, pe = { class: "flex gap-2 overflow-hidden" }, ce = { class: "flex flex-col w-full" }, fe = { class: "flex flex-col gap-5 p-6" }, ge = { class: "flex" }, ve = /* @__PURE__ */ q({
11
+ __name: "AddIntegrationDialog",
12
+ props: {
13
+ modelValue: { type: Boolean, default: !1 },
14
+ modelModifiers: {},
15
+ form: {
16
+ default: () => ({ name: "", platform: R.AutoCount })
17
+ },
18
+ formModifiers: {}
19
+ },
20
+ emits: /* @__PURE__ */ z(["confirm"], ["update:modelValue", "update:form"]),
21
+ setup(B, { emit: F }) {
22
+ const { t: u } = E(), p = $(B, "modelValue"), s = $(B, "form"), { breakpoints: _ } = K(), { options: k } = O(N()), c = G(
23
+ () => k.value.map((o) => ({
24
+ label: o.name,
25
+ value: o.platform,
26
+ sublabel: u(`report.integration.type.${o.type}`)
27
+ }))
28
+ ), x = F;
29
+ function v() {
30
+ p.value = !1;
31
+ }
32
+ function y() {
33
+ x("confirm");
34
+ }
35
+ return (o, e) => {
36
+ const I = b("FmTextField"), A = b("FmSelect"), C = b("FmButton"), h = b("FmDialog"), D = b("FmBottomSheet");
37
+ return n(_).lg || n(_).md ? (V(), S(h, {
38
+ key: 0,
39
+ modelValue: p.value,
40
+ "onUpdate:modelValue": e[2] || (e[2] = (r) => p.value = r),
41
+ overlay: !0
42
+ }, {
43
+ "dialog-header": w(() => [
44
+ i("div", me, [
45
+ i("p", de, J(n(u)("report.integration.add")), 1)
46
+ ])
47
+ ]),
48
+ default: w(() => [
49
+ i("div", ue, [
50
+ m(I, {
51
+ modelValue: s.value.name,
52
+ "onUpdate:modelValue": e[0] || (e[0] = (r) => s.value.name = r),
53
+ label: n(u)("report.common.name"),
54
+ placeholder: n(u)("report.integration.enter")
55
+ }, null, 8, ["modelValue", "label", "placeholder"]),
56
+ m(A, {
57
+ modelValue: s.value.platform,
58
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => s.value.platform = r),
59
+ label: n(u)("report.common.platform"),
60
+ items: c.value
61
+ }, null, 8, ["modelValue", "label", "items"])
62
+ ])
63
+ ]),
64
+ "dialog-footer": w(() => [
65
+ e[6] || (e[6] = i("div", { class: "grow" }, null, -1)),
66
+ m(C, {
67
+ label: "Cancel",
68
+ variant: "tertiary",
69
+ onClick: v
70
+ }),
71
+ m(C, {
72
+ label: "Add",
73
+ variant: "primary",
74
+ disabled: s.value.name === "",
75
+ onClick: y
76
+ }, null, 8, ["disabled"])
77
+ ]),
78
+ _: 1
79
+ }, 8, ["modelValue"])) : (V(), S(D, {
80
+ key: 1,
81
+ modelValue: p.value,
82
+ "onUpdate:modelValue": e[5] || (e[5] = (r) => p.value = r)
83
+ }, {
84
+ "bottom-sheet-header": w(() => e[7] || (e[7] = [
85
+ Q("Integration")
86
+ ])),
87
+ default: w(() => [
88
+ i("div", pe, [
89
+ i("div", ce, [
90
+ i("div", fe, [
91
+ m(I, {
92
+ modelValue: s.value.name,
93
+ "onUpdate:modelValue": e[3] || (e[3] = (r) => s.value.name = r),
94
+ label: "Name",
95
+ placeholder: "Enter a name"
96
+ }, null, 8, ["modelValue"]),
97
+ m(ne, {
98
+ modelValue: s.value.platform,
99
+ "onUpdate:modelValue": e[4] || (e[4] = (r) => s.value.platform = r),
100
+ label: "Integration",
101
+ items: c.value
102
+ }, null, 8, ["modelValue", "items"])
103
+ ]),
104
+ i("div", ge, [
105
+ e[8] || (e[8] = i("div", { class: "grow" }, null, -1)),
106
+ m(C, {
107
+ label: "Cancel",
108
+ variant: "tertiary",
109
+ onClick: v
110
+ }),
111
+ m(C, {
112
+ label: "Add Integration",
113
+ variant: "primary",
114
+ onClick: y
115
+ })
116
+ ])
117
+ ])
118
+ ])
119
+ ]),
120
+ _: 1
121
+ }, 8, ["modelValue"]));
122
+ };
123
+ }
124
+ }), ye = { class: "gap-24 px-24 py-16" }, be = /* @__PURE__ */ q({
125
+ __name: "Integrations",
126
+ setup(B) {
127
+ const F = Z(), u = ee(), { settings: p, options: s, disabled: _ } = O(N()), { getSettings: k } = N(), c = ae(), { promptLoader: x } = oe(), v = T(!1), y = T({ name: "", platform: R.AutoCount }), { t: o } = E(), e = G(() => p.value.reduce((t, a) => {
128
+ const f = s.value.find((l) => l.platform === a.platform.name);
129
+ return f && t.push({
130
+ id: a._id,
131
+ name: a.name,
132
+ platform: f.platform,
133
+ asset: f.asset,
134
+ type: f.type
135
+ }), t;
136
+ }, []));
137
+ async function I() {
138
+ await x(async () => {
139
+ await k();
140
+ });
141
+ }
142
+ async function A() {
143
+ await x(async () => {
144
+ try {
145
+ const t = await P({
146
+ name: y.value.name,
147
+ platform: {
148
+ name: y.value.platform
149
+ }
150
+ });
151
+ await k(), v.value = !1, F.push({
152
+ name: "integration",
153
+ params: { id: t._id },
154
+ query: u.query
155
+ });
156
+ } catch (t) {
157
+ c.open({ type: "error", message: t.message });
158
+ }
159
+ });
160
+ }
161
+ const { promptMessage: C } = re();
162
+ async function h(t) {
163
+ t === "new" ? v.value = !0 : t ? F.push({
164
+ name: "integration",
165
+ params: { id: t },
166
+ query: u.query
167
+ }) : c.open({ type: "error", message: o("report.integration.error.invalid") });
168
+ }
169
+ const { FmButton: D, FmMenu: r, FmMenuItem: H, FmIcon: _e, FmChip: L } = le, { breakpoints: U } = K(), W = [
170
+ {
171
+ accessorKey: "name",
172
+ header: o("report.common.name"),
173
+ meta: {
174
+ maxWidth: "50px",
175
+ width: "50px"
176
+ },
177
+ enableSorting: !1
178
+ },
179
+ {
180
+ accessorKey: "tag",
181
+ header: o("report.common.platform"),
182
+ cell: (t) => {
183
+ const a = t.row.original;
184
+ return g("div", { class: "flex flex-row items-center gap-x-16" }, [
185
+ g("img", { src: a.asset, class: "w-[60px]" }),
186
+ g(
187
+ L,
188
+ {
189
+ class: "text-fm-color-typo-info fm-typo-en-body-sm-600",
190
+ compact: !0
191
+ },
192
+ { default: () => o(`report.integration.type.${a.type}`) }
193
+ )
194
+ ]);
195
+ },
196
+ enableSorting: !1
197
+ },
198
+ {
199
+ accessorKey: "",
200
+ id: "Action",
201
+ header: "",
202
+ meta: {
203
+ maxWidth: "20px"
204
+ },
205
+ enableSorting: !1,
206
+ cell: (t) => {
207
+ const a = t.row.original, f = [
208
+ {
209
+ label: o("report.common.duplicate"),
210
+ onClick: async () => {
211
+ await x(async () => {
212
+ try {
213
+ const l = p.value.find((d) => d._id === a.id);
214
+ l && (await P({
215
+ ...l,
216
+ name: `${l == null ? void 0 : l.name} cloned`
217
+ }), await k());
218
+ } catch (l) {
219
+ c.open({ type: "error", message: l.message });
220
+ }
221
+ });
222
+ },
223
+ class: ""
224
+ },
225
+ {
226
+ label: o("report.common.delete"),
227
+ onClick: async () => {
228
+ await C({
229
+ message: o("report.integration.delete", { name: a.name }),
230
+ title: o("report.common.delete")
231
+ }) && await x(async () => {
232
+ try {
233
+ await te(a.id), await I();
234
+ } catch (d) {
235
+ c.open({ type: "error", message: d.message });
236
+ }
237
+ });
238
+ },
239
+ class: "text-fm-color-typo-error"
240
+ }
241
+ ];
242
+ return g(
243
+ "div",
244
+ {
245
+ class: `flex ${U.value.lg || U.value.md ? "justify-end" : ""} items-center`
246
+ },
247
+ {
248
+ default: () => [
249
+ g(
250
+ r,
251
+ { stopClickPropagation: !0, shift: !0 },
252
+ {
253
+ default: () => f.map(
254
+ (l) => g(
255
+ H,
256
+ {
257
+ onClick: l.onClick,
258
+ label: l.label,
259
+ class: l.class
260
+ },
261
+ {
262
+ label: () => g("p", l.label)
263
+ }
264
+ )
265
+ ),
266
+ "menu-button": () => g(
267
+ D,
268
+ {
269
+ variant: "tertiary",
270
+ size: "md",
271
+ icon: "more_vert",
272
+ iconColor: M.NeutralGray400
273
+ },
274
+ {}
275
+ )
276
+ }
277
+ )
278
+ ]
279
+ }
280
+ );
281
+ }
282
+ }
283
+ ];
284
+ function j(t) {
285
+ _.value ? c.open({ message: o("report.integration.error.planNotSupported"), type: "error" }) : t === "create" && h("new");
286
+ }
287
+ return (t, a) => {
288
+ const f = b("FmPageHead"), l = b("FmTable");
289
+ return V(), X(Y, null, [
290
+ m(ve, {
291
+ modelValue: v.value,
292
+ "onUpdate:modelValue": a[0] || (a[0] = (d) => v.value = d),
293
+ form: y.value,
294
+ "onUpdate:form": a[1] || (a[1] = (d) => y.value = d),
295
+ onConfirm: A
296
+ }, null, 8, ["modelValue", "form"]),
297
+ m(f, {
298
+ title: n(o)("report.integration.title"),
299
+ class: "h-[68px]",
300
+ actions: [
301
+ {
302
+ label: n(o)("report.integration.add"),
303
+ value: "create",
304
+ isPrimary: !0,
305
+ bgColor: n(_) ? n(M).NeutralGray100 : void 0,
306
+ fontColor: n(_) ? n(M).NeutralGray200 : void 0,
307
+ prependIcon: "add"
308
+ }
309
+ ],
310
+ "onClick:action": j
311
+ }, null, 8, ["title", "actions"]),
312
+ i("div", ye, [
313
+ e.value.length > 0 ? (V(), S(l, {
314
+ key: 0,
315
+ ref: "table",
316
+ "row-data": e.value,
317
+ "column-defs": W,
318
+ "shrink-at": !1,
319
+ onRowClick: a[2] || (a[2] = (d) => {
320
+ h(d.original.id);
321
+ })
322
+ }, null, 8, ["row-data"])) : (V(), S(se, {
323
+ key: 1,
324
+ title: n(o)("report.integration.noData.title"),
325
+ "sub-title": n(o)("report.integration.noData.description")
326
+ }, null, 8, ["title", "sub-title"]))
327
+ ])
328
+ ], 64);
329
+ };
330
+ }
331
+ }), Be = /* @__PURE__ */ ie(be, [["__scopeId", "data-v-8133bb2c"]]);
332
+ export {
333
+ Be as default
334
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as o, resolveComponent as t, createBlock as r, openBlock as n, withCtx as _, createVNode as c } from "vue";
2
- import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js";
2
+ import { _ as a } from "./Default.vue_vue_type_script_setup_true_lang-DVLxkOOQ.js";
3
3
  const f = /* @__PURE__ */ o({
4
4
  __name: "Layout",
5
5
  setup(m) {