@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.
- package/dist/App-DufL3Y8h.js +152 -0
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DLDk5l4R.js +162 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js → Default.vue_vue_type_script_setup_true_lang-DVLxkOOQ.js} +2 -2
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-C29g9w6o.js +999 -0
- package/dist/{InsightView-D78TK2E8.js → InsightView-tyeJBlRm.js} +1051 -1049
- package/dist/Integration-ILSIf-OL.js +3695 -0
- package/dist/Integrations-DwgNrM3U.js +334 -0
- package/dist/{Layout-DERpCrQk.js → Layout-Bw1oh6Q-.js} +1 -1
- 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
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-DzZeasAK.js +277 -0
- 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
- package/dist/NoData.vue_vue_type_script_setup_true_lang-BtQobm-7.js +31 -0
- package/dist/OverviewView-Dl8oOobn.js +61 -0
- package/dist/Report-BqD8KVZ8.js +424 -0
- package/dist/ReportEditor-DkzFUgbO.js +532 -0
- package/dist/ReportView-DpWZHV0o.js +169 -0
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-C3VG1mi_.js +104 -0
- package/dist/Setting-CYrg_50p.js +320 -0
- package/dist/TileEditor-CDrzLbqc.js +2320 -0
- package/dist/{TransitionFade-BLDfpF7R.js → TransitionFade-D19wC3tb.js} +225 -220
- package/dist/app.js +915 -27
- package/dist/{global-loader-CMC9fgBi.js → global-loader-C3JC7z-H.js} +4966 -2240
- package/dist/index-9IDzTnHw.js +147 -0
- package/dist/{report-schema-G0x3CoJb.js → report-schema-1zQJbLyB.js} +4 -4
- package/dist/style.css +1 -1
- package/dist/timeFormat-CjNvJMgk.js +9 -0
- package/dist/{v4-DF7wffYN.js → v4-D29FkHfi.js} +2666 -1927
- package/package.json +1 -1
- package/dist/App-mcSgbcVY.js +0 -133
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-DPuhMR6i.js +0 -160
- package/dist/DynamicWidget.vue_vue_type_script_setup_true_lang-B6IzlHmr.js +0 -996
- package/dist/HeaderTab.vue_vue_type_script_setup_true_lang-B5VBDNwX.js +0 -19
- package/dist/Integration-Cm6_YEEE.js +0 -3554
- package/dist/Integrations-WWnSho0Q.js +0 -334
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js +0 -261
- package/dist/NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js +0 -30
- package/dist/OverviewView-D7zAR7_7.js +0 -60
- package/dist/Report-BnX5amn0.js +0 -409
- package/dist/ReportEditor-DW7uWg_a.js +0 -530
- package/dist/ReportView-xSaJA5F6.js +0 -166
- package/dist/SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js +0 -103
- package/dist/Setting-D8JspXTN.js +0 -326
- package/dist/TileEditor-DQ8C5I_M.js +0 -2301
- package/dist/index-SmIkb24L.js +0 -143
- package/dist/timeFormat-BF-F4Rnt.js +0 -9
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import { defineComponent as P, mergeModels as W, useModel as U, computed as R, resolveComponent as v, createBlock as h, unref as x, openBlock as w, withCtx as k, createElementVNode as r, createVNode as s, createTextVNode as j, ref as T, createElementBlock as z, Fragment as Y, h as c } from "vue";
|
|
2
|
-
import { useRouter as J, useRoute as Q } from "vue-router";
|
|
3
|
-
import { I as q, c as D, d as X, m as $, n as Z } from "./global-loader-CMC9fgBi.js";
|
|
4
|
-
import { useBreakpoints as E, useSnackbar as ee, components as oe, FmButtonColorThemeVariant as S } from "@feedmepos/ui-library";
|
|
5
|
-
import { _ as ae } from "./SelectComponent.vue_vue_type_script_setup_true_lang-DBI9op0g.js";
|
|
6
|
-
import { storeToRefs as G } from "pinia";
|
|
7
|
-
import { u as te } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { _ as le } from "./NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js";
|
|
9
|
-
import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const re = { class: "flex gap-2 overflow-hidden flex-col" }, se = { class: "flex gap-2 overflow-hidden" }, ie = { class: "flex flex-col w-full" }, me = { class: "flex flex-col gap-5 p-6" }, ue = { class: "flex" }, de = /* @__PURE__ */ P({
|
|
11
|
-
__name: "AddIntegrationDialog",
|
|
12
|
-
props: {
|
|
13
|
-
modelValue: { type: Boolean, default: !1 },
|
|
14
|
-
modelModifiers: {},
|
|
15
|
-
form: {
|
|
16
|
-
default: () => ({ name: "", platform: q.AutoCount })
|
|
17
|
-
},
|
|
18
|
-
formModifiers: {}
|
|
19
|
-
},
|
|
20
|
-
emits: /* @__PURE__ */ W(["confirm"], ["update:modelValue", "update:form"]),
|
|
21
|
-
setup(A, { emit: _ }) {
|
|
22
|
-
const u = U(A, "modelValue"), n = U(A, "form"), { breakpoints: V } = E(), { options: C } = G(D()), y = R(
|
|
23
|
-
() => C.value.map((i) => ({
|
|
24
|
-
label: i.name,
|
|
25
|
-
value: i.platform,
|
|
26
|
-
sublabel: i.type
|
|
27
|
-
}))
|
|
28
|
-
), p = _;
|
|
29
|
-
function f() {
|
|
30
|
-
u.value = !1;
|
|
31
|
-
}
|
|
32
|
-
function g() {
|
|
33
|
-
p("confirm");
|
|
34
|
-
}
|
|
35
|
-
return (i, e) => {
|
|
36
|
-
const F = v("FmTextField"), B = v("FmSelect"), b = v("FmButton"), I = v("FmDialog"), N = v("FmBottomSheet");
|
|
37
|
-
return x(V).lg || x(V).md ? (w(), h(I, {
|
|
38
|
-
key: 0,
|
|
39
|
-
modelValue: u.value,
|
|
40
|
-
"onUpdate:modelValue": e[2] || (e[2] = (l) => u.value = l),
|
|
41
|
-
overlay: !0
|
|
42
|
-
}, {
|
|
43
|
-
"dialog-header": k(() => e[6] || (e[6] = [
|
|
44
|
-
r("div", { class: "flex flex-col" }, [
|
|
45
|
-
r("p", { class: "fm-typo-en-body-lg-600" }, "Add Integration")
|
|
46
|
-
], -1)
|
|
47
|
-
])),
|
|
48
|
-
default: k(() => [
|
|
49
|
-
r("div", re, [
|
|
50
|
-
s(F, {
|
|
51
|
-
modelValue: n.value.name,
|
|
52
|
-
"onUpdate:modelValue": e[0] || (e[0] = (l) => n.value.name = l),
|
|
53
|
-
label: "Name",
|
|
54
|
-
placeholder: "Enter a name"
|
|
55
|
-
}, null, 8, ["modelValue"]),
|
|
56
|
-
s(B, {
|
|
57
|
-
modelValue: n.value.platform,
|
|
58
|
-
"onUpdate:modelValue": e[1] || (e[1] = (l) => n.value.platform = l),
|
|
59
|
-
label: "App",
|
|
60
|
-
items: y.value
|
|
61
|
-
}, null, 8, ["modelValue", "items"])
|
|
62
|
-
])
|
|
63
|
-
]),
|
|
64
|
-
"dialog-footer": k(() => [
|
|
65
|
-
e[7] || (e[7] = r("div", { class: "grow" }, null, -1)),
|
|
66
|
-
s(b, {
|
|
67
|
-
label: "Cancel",
|
|
68
|
-
variant: "tertiary",
|
|
69
|
-
onClick: f
|
|
70
|
-
}),
|
|
71
|
-
s(b, {
|
|
72
|
-
label: "Add",
|
|
73
|
-
variant: "primary",
|
|
74
|
-
disabled: n.value.name === "",
|
|
75
|
-
onClick: g
|
|
76
|
-
}, null, 8, ["disabled"])
|
|
77
|
-
]),
|
|
78
|
-
_: 1
|
|
79
|
-
}, 8, ["modelValue"])) : (w(), h(N, {
|
|
80
|
-
key: 1,
|
|
81
|
-
modelValue: u.value,
|
|
82
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) => u.value = l)
|
|
83
|
-
}, {
|
|
84
|
-
"bottom-sheet-header": k(() => e[8] || (e[8] = [
|
|
85
|
-
j("Integration")
|
|
86
|
-
])),
|
|
87
|
-
default: k(() => [
|
|
88
|
-
r("div", se, [
|
|
89
|
-
r("div", ie, [
|
|
90
|
-
r("div", me, [
|
|
91
|
-
s(F, {
|
|
92
|
-
modelValue: n.value.name,
|
|
93
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) => n.value.name = l),
|
|
94
|
-
label: "Name",
|
|
95
|
-
placeholder: "Enter a name"
|
|
96
|
-
}, null, 8, ["modelValue"]),
|
|
97
|
-
s(ae, {
|
|
98
|
-
modelValue: n.value.platform,
|
|
99
|
-
"onUpdate:modelValue": e[4] || (e[4] = (l) => n.value.platform = l),
|
|
100
|
-
label: "Integration",
|
|
101
|
-
items: y.value
|
|
102
|
-
}, null, 8, ["modelValue", "items"])
|
|
103
|
-
]),
|
|
104
|
-
r("div", ue, [
|
|
105
|
-
e[9] || (e[9] = r("div", { class: "grow" }, null, -1)),
|
|
106
|
-
s(b, {
|
|
107
|
-
label: "Cancel",
|
|
108
|
-
variant: "tertiary",
|
|
109
|
-
onClick: f
|
|
110
|
-
}),
|
|
111
|
-
s(b, {
|
|
112
|
-
label: "Add Integration",
|
|
113
|
-
variant: "primary",
|
|
114
|
-
onClick: g
|
|
115
|
-
})
|
|
116
|
-
])
|
|
117
|
-
])
|
|
118
|
-
])
|
|
119
|
-
]),
|
|
120
|
-
_: 1
|
|
121
|
-
}, 8, ["modelValue"]));
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
}), ce = { class: "gap-24 px-24 py-16 h-full" }, pe = /* @__PURE__ */ P({
|
|
125
|
-
__name: "Integrations",
|
|
126
|
-
setup(A) {
|
|
127
|
-
const _ = J(), u = Q(), { settings: n, options: V, disabled: C } = G(D()), { getSettings: y } = D(), p = ee(), { promptLoader: f } = X(), g = T(!1), i = T({ name: "", platform: q.AutoCount }), e = R(() => n.value.reduce((o, a) => {
|
|
128
|
-
const d = V.value.find((t) => t.platform === a.platform.name);
|
|
129
|
-
return d && o.push({
|
|
130
|
-
id: a._id,
|
|
131
|
-
name: a.name,
|
|
132
|
-
platform: d.platform,
|
|
133
|
-
asset: d.asset,
|
|
134
|
-
type: d.type
|
|
135
|
-
}), o;
|
|
136
|
-
}, []));
|
|
137
|
-
async function F() {
|
|
138
|
-
await f(async () => {
|
|
139
|
-
await y();
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
async function B() {
|
|
143
|
-
await f(async () => {
|
|
144
|
-
try {
|
|
145
|
-
const o = await $({
|
|
146
|
-
name: i.value.name,
|
|
147
|
-
platform: {
|
|
148
|
-
name: i.value.platform
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
await y(), g.value = !1, _.push({
|
|
152
|
-
name: "integration",
|
|
153
|
-
params: { id: o._id },
|
|
154
|
-
query: u.query
|
|
155
|
-
});
|
|
156
|
-
} catch (o) {
|
|
157
|
-
p.open({ type: "error", message: o.message });
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
const { promptMessage: b } = te();
|
|
162
|
-
async function I(o) {
|
|
163
|
-
o === "new" ? g.value = !0 : o ? _.push({
|
|
164
|
-
name: "integration",
|
|
165
|
-
params: { id: o },
|
|
166
|
-
query: u.query
|
|
167
|
-
}) : p.open({ type: "error", message: "Invalid integration" });
|
|
168
|
-
}
|
|
169
|
-
const { FmButton: N, FmMenu: l, FmMenuItem: K, FmIcon: fe, FmChip: O } = oe, { breakpoints: M } = E(), H = [
|
|
170
|
-
{
|
|
171
|
-
accessorKey: "name",
|
|
172
|
-
header: "Name",
|
|
173
|
-
meta: {
|
|
174
|
-
maxWidth: "50px",
|
|
175
|
-
width: "50px"
|
|
176
|
-
},
|
|
177
|
-
enableSorting: !1
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
accessorKey: "tag",
|
|
181
|
-
header: "Platform",
|
|
182
|
-
cell: (o) => {
|
|
183
|
-
const a = o.row.original;
|
|
184
|
-
return c("div", { class: "flex flex-row items-center gap-x-16" }, [
|
|
185
|
-
c("img", { src: a.asset, class: "w-[60px]" }),
|
|
186
|
-
c(
|
|
187
|
-
O,
|
|
188
|
-
{
|
|
189
|
-
class: "text-fm-color-typo-info fm-typo-en-body-sm-600",
|
|
190
|
-
compact: !0
|
|
191
|
-
},
|
|
192
|
-
{ default: () => 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: (o) => {
|
|
207
|
-
const a = o.row.original, d = [
|
|
208
|
-
{
|
|
209
|
-
label: "Duplicate",
|
|
210
|
-
onClick: async () => {
|
|
211
|
-
await f(async () => {
|
|
212
|
-
try {
|
|
213
|
-
const t = n.value.find((m) => m._id === a.id);
|
|
214
|
-
t && (await $({
|
|
215
|
-
...t,
|
|
216
|
-
name: `${t == null ? void 0 : t.name} cloned`
|
|
217
|
-
}), await y());
|
|
218
|
-
} catch (t) {
|
|
219
|
-
p.open({ type: "error", message: t.message });
|
|
220
|
-
}
|
|
221
|
-
});
|
|
222
|
-
},
|
|
223
|
-
class: ""
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
label: "Remove",
|
|
227
|
-
onClick: async () => {
|
|
228
|
-
await b({
|
|
229
|
-
message: `Confirm delete ${a.name}?`,
|
|
230
|
-
title: "Delete"
|
|
231
|
-
}) && await f(async () => {
|
|
232
|
-
try {
|
|
233
|
-
await Z(a.id), await F();
|
|
234
|
-
} catch (m) {
|
|
235
|
-
p.open({ type: "error", message: m.message });
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
},
|
|
239
|
-
class: "text-fm-color-typo-error"
|
|
240
|
-
}
|
|
241
|
-
];
|
|
242
|
-
return c(
|
|
243
|
-
"div",
|
|
244
|
-
{
|
|
245
|
-
class: `flex ${M.value.lg || M.value.md ? "justify-end" : ""} items-center`
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
default: () => [
|
|
249
|
-
c(
|
|
250
|
-
l,
|
|
251
|
-
{ stopClickPropagation: !0, shift: !0 },
|
|
252
|
-
{
|
|
253
|
-
default: () => d.map(
|
|
254
|
-
(t) => c(
|
|
255
|
-
K,
|
|
256
|
-
{
|
|
257
|
-
onClick: t.onClick,
|
|
258
|
-
label: t.label,
|
|
259
|
-
class: t.class
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
label: () => c("p", t.label)
|
|
263
|
-
}
|
|
264
|
-
)
|
|
265
|
-
),
|
|
266
|
-
"menu-button": () => c(
|
|
267
|
-
N,
|
|
268
|
-
{
|
|
269
|
-
variant: "tertiary",
|
|
270
|
-
size: "md",
|
|
271
|
-
icon: "more_vert",
|
|
272
|
-
iconColor: S.NeutralGray400
|
|
273
|
-
},
|
|
274
|
-
{}
|
|
275
|
-
)
|
|
276
|
-
}
|
|
277
|
-
)
|
|
278
|
-
]
|
|
279
|
-
}
|
|
280
|
-
);
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
];
|
|
284
|
-
function L(o) {
|
|
285
|
-
C.value ? p.open({ message: "Your current plan does not support integrations.", type: "error" }) : o === "create" && I("new");
|
|
286
|
-
}
|
|
287
|
-
return (o, a) => {
|
|
288
|
-
const d = v("FmPageHead"), t = v("FmTable");
|
|
289
|
-
return w(), z(Y, null, [
|
|
290
|
-
s(de, {
|
|
291
|
-
modelValue: g.value,
|
|
292
|
-
"onUpdate:modelValue": a[0] || (a[0] = (m) => g.value = m),
|
|
293
|
-
form: i.value,
|
|
294
|
-
"onUpdate:form": a[1] || (a[1] = (m) => i.value = m),
|
|
295
|
-
onConfirm: B
|
|
296
|
-
}, null, 8, ["modelValue", "form"]),
|
|
297
|
-
s(d, {
|
|
298
|
-
title: "Integration",
|
|
299
|
-
class: "h-[68px]",
|
|
300
|
-
actions: [
|
|
301
|
-
{
|
|
302
|
-
label: "Add Integration",
|
|
303
|
-
value: "create",
|
|
304
|
-
isPrimary: !0,
|
|
305
|
-
bgColor: x(C) ? x(S).NeutralGray100 : void 0,
|
|
306
|
-
fontColor: x(C) ? x(S).NeutralGray200 : void 0,
|
|
307
|
-
prependIcon: "add"
|
|
308
|
-
}
|
|
309
|
-
],
|
|
310
|
-
"onClick:action": L
|
|
311
|
-
}, null, 8, ["actions"]),
|
|
312
|
-
r("div", ce, [
|
|
313
|
-
e.value.length > 0 ? (w(), h(t, {
|
|
314
|
-
key: 0,
|
|
315
|
-
ref: "table",
|
|
316
|
-
"row-data": e.value,
|
|
317
|
-
"column-defs": H,
|
|
318
|
-
"shrink-at": !1,
|
|
319
|
-
onRowClick: a[2] || (a[2] = (m) => {
|
|
320
|
-
I(m.original.id);
|
|
321
|
-
})
|
|
322
|
-
}, null, 8, ["row-data"])) : (w(), h(le, {
|
|
323
|
-
key: 1,
|
|
324
|
-
title: "No integration",
|
|
325
|
-
"sub-title": "No integration can be found"
|
|
326
|
-
}))
|
|
327
|
-
])
|
|
328
|
-
], 64);
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
}), Ve = /* @__PURE__ */ ne(pe, [["__scopeId", "data-v-af4dc7b5"]]);
|
|
332
|
-
export {
|
|
333
|
-
Ve as default
|
|
334
|
-
};
|
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, mergeModels as L, useModel as N, ref as J, watch as q, resolveComponent as i, createBlock as x, openBlock as p, withCtx as y, createElementVNode as r, createVNode as u, createElementBlock as R, createCommentVNode as S, Fragment as V, renderList as G, createTextVNode as K, withDirectives as Q, toDisplayString as D, vShow as W, unref as l, isRef as h, normalizeClass as j } from "vue";
|
|
2
|
-
import { g as w, a as P } from "./global-loader-CMC9fgBi.js";
|
|
3
|
-
import { storeToRefs as z } from "pinia";
|
|
4
|
-
import { _ as X } from "./LocationSelect.vue_vue_type_script_setup_true_lang-DurYBXa5.js";
|
|
5
|
-
import { a as Y, _ as Z } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-DPuhMR6i.js";
|
|
6
|
-
import { t as E, s as ee } from "./timeFormat-BF-F4Rnt.js";
|
|
7
|
-
import { useBreakpoints as te } from "@feedmepos/ui-library";
|
|
8
|
-
const oe = { class: "px-24 py-16 rounded-lg shadow-light-300" }, ne = { class: "text-fm-color-typo-primary" }, le = { class: "text-fm-color-typo-secondary" }, ae = { class: "flex items-center justify-center w-full" }, ue = { class: "flex items-center justify-center" }, me = { class: "flex flex-row mb-4 px-4 gap-2" }, se = "HH:mm", re = /* @__PURE__ */ M({
|
|
9
|
-
__name: "TimeRangeSelect",
|
|
10
|
-
props: /* @__PURE__ */ L({
|
|
11
|
-
defaultDateRange: {
|
|
12
|
-
type: Array,
|
|
13
|
-
default: () => [
|
|
14
|
-
{
|
|
15
|
-
name: "All day",
|
|
16
|
-
isDefault: !0,
|
|
17
|
-
startTime: { hour: 0, minute: 0 },
|
|
18
|
-
endTime: { hour: 23, minute: 59 }
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}, {
|
|
23
|
-
timeRange: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: () => ({
|
|
26
|
-
start: { hour: 0, minute: 0 },
|
|
27
|
-
end: { hour: 23, minute: 59 }
|
|
28
|
-
})
|
|
29
|
-
},
|
|
30
|
-
timeRangeModifiers: {},
|
|
31
|
-
selectTimeDefault: {
|
|
32
|
-
type: Number,
|
|
33
|
-
default: 1
|
|
34
|
-
},
|
|
35
|
-
selectTimeDefaultModifiers: {}
|
|
36
|
-
}),
|
|
37
|
-
emits: ["update:timeRange", "update:selectTimeDefault"],
|
|
38
|
-
setup(b) {
|
|
39
|
-
const a = N(b, "timeRange"), m = b, s = N(b, "selectTimeDefault");
|
|
40
|
-
function f(t, e = se) {
|
|
41
|
-
return w().set("hour", t.hour).set("minute", t.minute).format(e);
|
|
42
|
-
}
|
|
43
|
-
function _(t) {
|
|
44
|
-
t && (a.value = t), d.value = !1;
|
|
45
|
-
}
|
|
46
|
-
function c(t) {
|
|
47
|
-
const e = t.split(":"), v = w().set("hour", Number(e[0])).set("minute", Number(e[1]));
|
|
48
|
-
return {
|
|
49
|
-
hours: Number(v.format("h")),
|
|
50
|
-
minutes: Number(v.format("m")),
|
|
51
|
-
period: v.format("A")
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
const n = J(JSON.parse(JSON.stringify(a.value)));
|
|
55
|
-
function T(t, e) {
|
|
56
|
-
n.value.start = JSON.parse(JSON.stringify(t)), n.value.end = JSON.parse(JSON.stringify(e));
|
|
57
|
-
}
|
|
58
|
-
q(
|
|
59
|
-
() => [() => a.value, () => s.value],
|
|
60
|
-
() => {
|
|
61
|
-
if (a.value) {
|
|
62
|
-
const t = m.defaultDateRange.findIndex(
|
|
63
|
-
(e) => {
|
|
64
|
-
var v, F, $, C;
|
|
65
|
-
return e.startTime.hour === ((v = a.value.start) == null ? void 0 : v.hour) && e.startTime.minute === ((F = a.value.start) == null ? void 0 : F.minute) && e.endTime.hour === (($ = a.value.end) == null ? void 0 : $.hour) && e.endTime.minute === ((C = a.value.end) == null ? void 0 : C.minute);
|
|
66
|
-
}
|
|
67
|
-
) + 1;
|
|
68
|
-
t !== 0 ? s.value = t : s.value = m.defaultDateRange.length + 1;
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{ deep: !0 }
|
|
72
|
-
);
|
|
73
|
-
const d = J(!1);
|
|
74
|
-
return (t, e) => {
|
|
75
|
-
const v = i("FmChip"), F = i("FmRadio"), $ = i("FmMenuDivider"), C = i("FmRadioGroup"), O = i("FmTimeInput"), I = i("FmButton"), H = i("FmPopover");
|
|
76
|
-
return p(), x(H, {
|
|
77
|
-
placement: "bottom",
|
|
78
|
-
class: "min-w-[212px]",
|
|
79
|
-
"show-popover": d.value,
|
|
80
|
-
onPopoverChanged: e[5] || (e[5] = (k) => d.value = k)
|
|
81
|
-
}, {
|
|
82
|
-
"popover-button": y(() => [
|
|
83
|
-
u(Y, {
|
|
84
|
-
"left-icon": "schedule",
|
|
85
|
-
label: `${f(a.value.start ?? { hour: 0, minute: 0 }, "h:mmA")} - ${f(
|
|
86
|
-
a.value.end ?? { hour: 23, minute: 59 },
|
|
87
|
-
"h:mmA"
|
|
88
|
-
)}`
|
|
89
|
-
}, null, 8, ["label"])
|
|
90
|
-
]),
|
|
91
|
-
default: y(() => {
|
|
92
|
-
var k, U, A, B;
|
|
93
|
-
return [
|
|
94
|
-
r("div", oe, [
|
|
95
|
-
u(C, {
|
|
96
|
-
modelValue: s.value,
|
|
97
|
-
"onUpdate:modelValue": e[0] || (e[0] = (o) => s.value = o)
|
|
98
|
-
}, {
|
|
99
|
-
default: y(() => [
|
|
100
|
-
(p(!0), R(V, null, G(m.defaultDateRange, (o, g) => (p(), x(F, {
|
|
101
|
-
key: `range_${g}`,
|
|
102
|
-
value: g + 1,
|
|
103
|
-
label: o.name,
|
|
104
|
-
onClick: (fe) => T(o.startTime, o.endTime)
|
|
105
|
-
}, {
|
|
106
|
-
label: y(() => [
|
|
107
|
-
r("p", ne, [
|
|
108
|
-
K(D(o.name) + " ", 1),
|
|
109
|
-
Q(u(v, {
|
|
110
|
-
label: "Default",
|
|
111
|
-
class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
|
|
112
|
-
compact: ""
|
|
113
|
-
}, null, 512), [
|
|
114
|
-
[W, o.isDefault]
|
|
115
|
-
])
|
|
116
|
-
]),
|
|
117
|
-
r("p", le, D(l(E)(o.startTime)) + " - " + D(l(E)(o.endTime)) + " " + D(l(ee)(o.startTime, o.endTime)), 1)
|
|
118
|
-
]),
|
|
119
|
-
_: 2
|
|
120
|
-
}, 1032, ["value", "label", "onClick"]))), 128)),
|
|
121
|
-
u($),
|
|
122
|
-
u(F, {
|
|
123
|
-
key: "range_custom",
|
|
124
|
-
label: "Custom",
|
|
125
|
-
value: m.defaultDateRange.length + 1
|
|
126
|
-
}, null, 8, ["value"])
|
|
127
|
-
]),
|
|
128
|
-
_: 1
|
|
129
|
-
}, 8, ["modelValue"]),
|
|
130
|
-
s.value === m.defaultDateRange.length + 1 ? (p(), R(V, { key: 0 }, [
|
|
131
|
-
e[6] || (e[6] = r("p", { class: "fm-typo-en-body-lg-600 mb-8" }, "Starting time", -1)),
|
|
132
|
-
r("div", ae, [
|
|
133
|
-
u(O, {
|
|
134
|
-
"model-value": c(`${(k = n.value.start) == null ? void 0 : k.hour}:${(U = n.value.start) == null ? void 0 : U.minute}`),
|
|
135
|
-
"onUpdate:modelValue": e[1] || (e[1] = (o) => {
|
|
136
|
-
if (n.value.start) {
|
|
137
|
-
const g = l(w)(`${o.hours}:${o.minutes} ${o.period}`, "h:m A");
|
|
138
|
-
n.value.start.hour = g.get("hour"), n.value.start.minute = g.get("minute");
|
|
139
|
-
}
|
|
140
|
-
})
|
|
141
|
-
}, null, 8, ["model-value"])
|
|
142
|
-
]),
|
|
143
|
-
e[7] || (e[7] = r("p", { class: "fm-typo-en-body-lg-600 mb-8" }, "Closing time", -1)),
|
|
144
|
-
r("div", ue, [
|
|
145
|
-
u(O, {
|
|
146
|
-
"model-value": c(`${(A = n.value.end) == null ? void 0 : A.hour}:${(B = n.value.end) == null ? void 0 : B.minute}`),
|
|
147
|
-
"onUpdate:modelValue": e[2] || (e[2] = (o) => {
|
|
148
|
-
if (n.value.end) {
|
|
149
|
-
const g = l(w)(`${o.hours}:${o.minutes} ${o.period}`, "h:m A");
|
|
150
|
-
n.value.end.hour = g.get("hour"), n.value.end.minute = g.get("minute");
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
}, null, 8, ["model-value"])
|
|
154
|
-
])
|
|
155
|
-
], 64)) : S("", !0),
|
|
156
|
-
r("div", me, [
|
|
157
|
-
e[8] || (e[8] = r("div", { class: "grow" }, null, -1)),
|
|
158
|
-
u(I, {
|
|
159
|
-
label: "Cancel",
|
|
160
|
-
variant: "tertiary",
|
|
161
|
-
onClick: e[3] || (e[3] = (o) => d.value = !1)
|
|
162
|
-
}),
|
|
163
|
-
u(I, {
|
|
164
|
-
label: "Apply",
|
|
165
|
-
onClick: e[4] || (e[4] = () => _(JSON.parse(JSON.stringify(n.value))))
|
|
166
|
-
})
|
|
167
|
-
])
|
|
168
|
-
])
|
|
169
|
-
];
|
|
170
|
-
}),
|
|
171
|
-
_: 1
|
|
172
|
-
}, 8, ["show-popover"]);
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
}), ie = { class: "flex overflow-x-auto overflow-y-hidden scrollbar-hide" }, de = /* @__PURE__ */ M({
|
|
176
|
-
__name: "Filter",
|
|
177
|
-
setup(b) {
|
|
178
|
-
const a = P(), { locations: m, selectedLocationIds: s } = z(P()), { dateRange: f, compareDateRange: _, timeRange: c, defaultDateSetting: n, selectTimeDefault: T } = z(a);
|
|
179
|
-
return (d, t) => (p(), R("div", ie, [
|
|
180
|
-
u(X, {
|
|
181
|
-
modelValue: l(s),
|
|
182
|
-
"onUpdate:modelValue": t[5] || (t[5] = (e) => h(s) ? s.value = e : null),
|
|
183
|
-
options: l(m)
|
|
184
|
-
}, {
|
|
185
|
-
default: y(() => [
|
|
186
|
-
u(Z, {
|
|
187
|
-
"date-range": l(f),
|
|
188
|
-
"onUpdate:dateRange": t[0] || (t[0] = (e) => h(f) ? f.value = e : null),
|
|
189
|
-
"compare-date-range": l(_),
|
|
190
|
-
"onUpdate:compareDateRange": t[1] || (t[1] = (e) => h(_) ? _.value = e : null),
|
|
191
|
-
"compare-type": l(n).defaultCompareType,
|
|
192
|
-
"onUpdate:compareType": t[2] || (t[2] = (e) => l(n).defaultCompareType = e),
|
|
193
|
-
compare: ""
|
|
194
|
-
}, null, 8, ["date-range", "compare-date-range", "compare-type"]),
|
|
195
|
-
u(re, {
|
|
196
|
-
"time-range": l(c),
|
|
197
|
-
"onUpdate:timeRange": t[3] || (t[3] = (e) => h(c) ? c.value = e : null),
|
|
198
|
-
"select-time-default": l(T),
|
|
199
|
-
"onUpdate:selectTimeDefault": t[4] || (t[4] = (e) => h(T) ? T.value = e : null),
|
|
200
|
-
"default-date-range": l(n).timeOptions
|
|
201
|
-
}, null, 8, ["time-range", "select-time-default", "default-date-range"])
|
|
202
|
-
]),
|
|
203
|
-
_: 1
|
|
204
|
-
}, 8, ["modelValue", "options"])
|
|
205
|
-
]));
|
|
206
|
-
}
|
|
207
|
-
}), pe = { class: "fm-typo-en-body-md-400" }, Fe = /* @__PURE__ */ M({
|
|
208
|
-
__name: "MenuTab",
|
|
209
|
-
props: {
|
|
210
|
-
modelValue: { required: !1, default: [] },
|
|
211
|
-
modelModifiers: {}
|
|
212
|
-
},
|
|
213
|
-
emits: ["update:modelValue"],
|
|
214
|
-
setup(b) {
|
|
215
|
-
const a = N(b, "modelValue"), { breakpoints: m } = te();
|
|
216
|
-
return (s, f) => {
|
|
217
|
-
const _ = i("FmButton"), c = i("FmIcon"), n = i("FmMenuItem"), T = i("FmMenu");
|
|
218
|
-
return p(), R("div", {
|
|
219
|
-
class: j(["flex items-center pb-6 px-24", `${l(m).lg || l(m).md ? "px-24" : "pl-3"}`])
|
|
220
|
-
}, [
|
|
221
|
-
u(de),
|
|
222
|
-
f[0] || (f[0] = r("div", { class: "flex grow" }, null, -1)),
|
|
223
|
-
a.value.length > 0 ? (p(), x(T, {
|
|
224
|
-
key: 0,
|
|
225
|
-
trigger: "click",
|
|
226
|
-
placement: "left",
|
|
227
|
-
shift: !0,
|
|
228
|
-
class: j(l(m).sm || l(m).xs ? "pr-3" : "")
|
|
229
|
-
}, {
|
|
230
|
-
"menu-button": y(() => [
|
|
231
|
-
u(_, {
|
|
232
|
-
"append-icon": "more_vert",
|
|
233
|
-
variant: "tertiary",
|
|
234
|
-
size: "md",
|
|
235
|
-
class: "w-[36px] bg-none"
|
|
236
|
-
})
|
|
237
|
-
]),
|
|
238
|
-
default: y(() => [
|
|
239
|
-
(p(!0), R(V, null, G(a.value, (d, t) => (p(), x(n, {
|
|
240
|
-
key: `button-${t}`,
|
|
241
|
-
onClick: d.onClick
|
|
242
|
-
}, {
|
|
243
|
-
label: y(() => [
|
|
244
|
-
d.prependIcon ?? !1 ? (p(), x(c, {
|
|
245
|
-
key: 0,
|
|
246
|
-
name: d.icon
|
|
247
|
-
}, null, 8, ["name"])) : S("", !0),
|
|
248
|
-
r("p", pe, D(d.label), 1)
|
|
249
|
-
]),
|
|
250
|
-
_: 2
|
|
251
|
-
}, 1032, ["onClick"]))), 128))
|
|
252
|
-
]),
|
|
253
|
-
_: 1
|
|
254
|
-
}, 8, ["class"])) : S("", !0)
|
|
255
|
-
], 2);
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
export {
|
|
260
|
-
Fe as _
|
|
261
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineComponent as n, resolveComponent as r, createElementBlock as c, openBlock as i, renderSlot as p, createVNode as f, withCtx as m, createElementVNode as t, toDisplayString as o } from "vue";
|
|
2
|
-
const d = { class: "flex flex-col h-full" }, _ = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, u = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary text-center" }, h = /* @__PURE__ */ n({
|
|
3
|
-
__name: "NoData",
|
|
4
|
-
props: {
|
|
5
|
-
title: { default: "No data available" },
|
|
6
|
-
subTitle: { default: "Adjust filters or select a different time range." }
|
|
7
|
-
},
|
|
8
|
-
setup(l) {
|
|
9
|
-
const e = l;
|
|
10
|
-
return (s, y) => {
|
|
11
|
-
const a = r("FmCard");
|
|
12
|
-
return i(), c("div", d, [
|
|
13
|
-
p(s.$slots, "menu"),
|
|
14
|
-
f(a, {
|
|
15
|
-
class: "p-24 h-full flex flex-col gap-2 p-16 items-center justify-center",
|
|
16
|
-
variant: "flat"
|
|
17
|
-
}, {
|
|
18
|
-
default: m(() => [
|
|
19
|
-
t("p", _, o(e.title), 1),
|
|
20
|
-
t("p", u, o(e.subTitle), 1)
|
|
21
|
-
]),
|
|
22
|
-
_: 1
|
|
23
|
-
})
|
|
24
|
-
]);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
export {
|
|
29
|
-
h as _
|
|
30
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { defineComponent as x, computed as g, resolveComponent as k, createBlock as l, openBlock as t, withCtx as w, createVNode as c, createElementVNode as $, unref as e, normalizeStyle as y, normalizeClass as d, createElementBlock as u, Fragment as C, renderList as h } from "vue";
|
|
2
|
-
import { useBreakpoints as B } from "@feedmepos/ui-library";
|
|
3
|
-
import { _ as b } from "./DynamicWidget.vue_vue_type_script_setup_true_lang-B6IzlHmr.js";
|
|
4
|
-
import { _ as D } from "./Default.vue_vue_type_script_setup_true_lang-Bxuyjrkr.js";
|
|
5
|
-
import { a as F } from "./v4-DF7wffYN.js";
|
|
6
|
-
import { storeToRefs as P } from "pinia";
|
|
7
|
-
import { _ as R } from "./NoData.vue_vue_type_script_setup_true_lang-DlBNFLa3.js";
|
|
8
|
-
import { _ as S } from "./MenuTab.vue_vue_type_script_setup_true_lang-h87kWy1E.js";
|
|
9
|
-
const q = /* @__PURE__ */ x({
|
|
10
|
-
__name: "OverviewView",
|
|
11
|
-
setup(V) {
|
|
12
|
-
const _ = F(), { breakpoints: o } = B(), { isOpenDownloadDialog: f, overviewReport: r } = P(_), n = g(() => {
|
|
13
|
-
var a;
|
|
14
|
-
return ((a = r.value) == null ? void 0 : a.tiles) || [];
|
|
15
|
-
});
|
|
16
|
-
return (a, s) => {
|
|
17
|
-
const v = k("FmPageHead");
|
|
18
|
-
return t(), l(D, null, {
|
|
19
|
-
default: w(() => {
|
|
20
|
-
var i;
|
|
21
|
-
return [
|
|
22
|
-
c(v, {
|
|
23
|
-
title: (i = e(r)) == null ? void 0 : i.name,
|
|
24
|
-
class: "h-[68px]",
|
|
25
|
-
actions: [
|
|
26
|
-
{
|
|
27
|
-
label: "Download",
|
|
28
|
-
value: "download",
|
|
29
|
-
isPrimary: !0,
|
|
30
|
-
prependIcon: "download"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"onClick:action": s[0] || (s[0] = (m) => f.value = !0)
|
|
34
|
-
}, null, 8, ["title"]),
|
|
35
|
-
$("div", {
|
|
36
|
-
class: d(`flex flex-col gap-2 ${e(o).sm || e(o).xs ? "mb-20" : ""}`),
|
|
37
|
-
style: y({ height: `calc(100% - ${e(o).lg || e(o).md ? 72 : 64}px)` })
|
|
38
|
-
}, [
|
|
39
|
-
c(S),
|
|
40
|
-
n.value.length > 0 && e(r) ? (t(), u("div", {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: d(["grid grid-cols-12", e(o).sm || e(o).xs ? "px-3 gap-[16px]" : "px-24 gap-[24px]"])
|
|
43
|
-
}, [
|
|
44
|
-
(t(!0), u(C, null, h(n.value, (m, p) => (t(), l(b, {
|
|
45
|
-
key: `widget_${e(r).id}_${p}`,
|
|
46
|
-
"model-value": m,
|
|
47
|
-
index: p
|
|
48
|
-
}, null, 8, ["model-value", "index"]))), 128))
|
|
49
|
-
], 2)) : (t(), l(R, { key: 1 }))
|
|
50
|
-
], 6)
|
|
51
|
-
];
|
|
52
|
-
}),
|
|
53
|
-
_: 1
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
export {
|
|
59
|
-
q as default
|
|
60
|
-
};
|