@feedmepos/mf-report 5.5.0-beta.0 → 5.5.0-beta.2
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-Cgynv4z6.js → App-3AA82w93.js} +3 -3
- package/dist/{Default.vue_vue_type_script_setup_true_lang-DoZjQrXi.js → Default.vue_vue_type_script_setup_true_lang-C9Z0V0n1.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-9HLzKjix.js → DynamicWidget.vue_vue_type_script_setup_true_lang-C6n257cI.js} +1 -1
- package/dist/{InsightView-CazscxFM.js → InsightView-Ni6vW3aD.js} +7 -8
- package/dist/{Layout-B6nbTiWn.js → Layout-DVo5xdO3.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-Bb3LInGT.js +101 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DfXW3V-Z.js → NavigationTab.vue_vue_type_script_setup_true_lang-zwKrwMyb.js} +16152 -7953
- package/dist/{OverviewView-D4f5GD94.js → OverviewView-CElfEZSC.js} +4 -4
- package/dist/{Report-t5C_RytN.js → Report-BfJv7BYZ.js} +2 -2
- package/dist/{ReportEditor-CyI-OeIq.js → ReportEditor-CACAI5rx.js} +3 -3
- package/dist/{ReportView-DSa6UBCG.js → ReportView-Buv6RyGB.js} +5 -5
- package/dist/{Setting-C3cEoUqd.js → Setting-EjtiAOJn.js} +2 -2
- package/dist/{TileEditor-DpD-oLcv.js → TileEditor-DnDiDIo3.js} +3 -3
- package/dist/{TransitionFade-DGn_cYeQ.js → TransitionFade-DBduwk2M.js} +2 -2
- package/dist/app.js +9 -9
- package/dist/{v4-BDHq16P_.js → v4-BS8SFGqd.js} +378 -364
- package/package.json +1 -1
- package/dist/LocationSelect.vue_vue_type_script_setup_true_lang-BRAZAoJz.js +0 -7988
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BdDMXz7S.js +0 -276
- package/dist/timeFormat-CAyeO7-a.js +0 -9
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, mergeModels as Q, useModel as C, ref as L, watch as W, resolveComponent as c, createElementBlock as D, openBlock as f, createTextVNode as P, createVNode as u, toDisplayString as _, unref as t, withCtx as g, createElementVNode as d, createCommentVNode as V, Fragment as M, renderList as H, createBlock as S, withDirectives as X, vShow as Y, isRef as $, normalizeClass as z } from "vue";
|
|
2
|
-
import { u as Z, d as F, b as E } from "./global-loader-BqFQzk46.js";
|
|
3
|
-
import { storeToRefs as G } from "pinia";
|
|
4
|
-
import { _ as ee } from "./LocationSelect.vue_vue_type_script_setup_true_lang-BRAZAoJz.js";
|
|
5
|
-
import { a as te, _ as oe } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-Xex8S8XX.js";
|
|
6
|
-
import { t as q, s as le } from "./timeFormat-CAyeO7-a.js";
|
|
7
|
-
import { detectLocale as k } from "@feedmepos/mf-common";
|
|
8
|
-
import { useBreakpoints as ne } from "@feedmepos/ui-library";
|
|
9
|
-
const ae = { class: "px-24 py-16 rounded-lg shadow-light-300" }, me = { class: "text-fm-color-typo-primary" }, ue = { class: "text-fm-color-typo-secondary" }, ie = { class: "fm-typo-en-body-lg-600 mb-8" }, re = { class: "flex items-center justify-center w-full" }, se = { class: "fm-typo-en-body-lg-600 mb-8" }, de = { class: "flex items-center justify-center" }, ce = { class: "flex flex-row mb-4 px-4 gap-2" }, pe = /* @__PURE__ */ I({
|
|
10
|
-
__name: "TimeRangeSelect",
|
|
11
|
-
props: /* @__PURE__ */ Q({
|
|
12
|
-
defaultDateRange: {
|
|
13
|
-
type: Array,
|
|
14
|
-
default: () => [
|
|
15
|
-
{
|
|
16
|
-
name: "All day",
|
|
17
|
-
isDefault: !0,
|
|
18
|
-
startTime: { hour: 0, minute: 0 },
|
|
19
|
-
endTime: { hour: 23, minute: 59 }
|
|
20
|
-
}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
}, {
|
|
24
|
-
timeRange: {
|
|
25
|
-
type: Object,
|
|
26
|
-
default: () => ({
|
|
27
|
-
start: { hour: 0, minute: 0 },
|
|
28
|
-
end: { hour: 23, minute: 59 }
|
|
29
|
-
})
|
|
30
|
-
},
|
|
31
|
-
timeRangeModifiers: {},
|
|
32
|
-
selectTimeDefault: {
|
|
33
|
-
type: Number,
|
|
34
|
-
default: 1
|
|
35
|
-
},
|
|
36
|
-
selectTimeDefaultModifiers: {}
|
|
37
|
-
}),
|
|
38
|
-
emits: ["update:timeRange", "update:selectTimeDefault"],
|
|
39
|
-
setup(x) {
|
|
40
|
-
const { t: r } = Z(), m = C(x, "timeRange"), p = x, i = C(x, "selectTimeDefault");
|
|
41
|
-
function y(e = {
|
|
42
|
-
startTime: null,
|
|
43
|
-
endTime: null,
|
|
44
|
-
locale: "en-US"
|
|
45
|
-
}) {
|
|
46
|
-
if (!e.startTime || !e.endTime)
|
|
47
|
-
return "";
|
|
48
|
-
let o = F(), s = F();
|
|
49
|
-
return e.startTime && (o = F().set("hour", e.startTime.hour).set("minute", e.startTime.minute).locale(e.locale)), e.endTime && (s = F().set("hour", e.endTime.hour).set("minute", e.endTime.minute).locale(e.locale)), `${o.format("hh:mmA")}-${s.format("hh:mmA")}`;
|
|
50
|
-
}
|
|
51
|
-
function b(e) {
|
|
52
|
-
e && (m.value = e), a.value = !1;
|
|
53
|
-
}
|
|
54
|
-
function v(e) {
|
|
55
|
-
const o = e.split(":"), s = F().set("hour", Number(o[0])).set("minute", Number(o[1]));
|
|
56
|
-
return {
|
|
57
|
-
hours: Number(s.format("h")),
|
|
58
|
-
minutes: Number(s.format("m")),
|
|
59
|
-
period: s.format("A")
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
const n = L(JSON.parse(JSON.stringify(m.value)));
|
|
63
|
-
function h(e, o) {
|
|
64
|
-
n.value.start = JSON.parse(JSON.stringify(e)), n.value.end = JSON.parse(JSON.stringify(o));
|
|
65
|
-
}
|
|
66
|
-
W(
|
|
67
|
-
() => [() => m.value, () => i.value],
|
|
68
|
-
() => {
|
|
69
|
-
if (m.value) {
|
|
70
|
-
const e = p.defaultDateRange.findIndex(
|
|
71
|
-
(o) => {
|
|
72
|
-
var s, R, w, N;
|
|
73
|
-
return o.startTime.hour === ((s = m.value.start) == null ? void 0 : s.hour) && o.startTime.minute === ((R = m.value.start) == null ? void 0 : R.minute) && o.endTime.hour === ((w = m.value.end) == null ? void 0 : w.hour) && o.endTime.minute === ((N = m.value.end) == null ? void 0 : N.minute);
|
|
74
|
-
}
|
|
75
|
-
) + 1;
|
|
76
|
-
e !== 0 ? i.value = e : i.value = p.defaultDateRange.length + 1;
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
{ deep: !0 }
|
|
80
|
-
);
|
|
81
|
-
const a = L(!1);
|
|
82
|
-
return (e, o) => {
|
|
83
|
-
const s = c("FmChip"), R = c("FmRadio"), w = c("FmMenuDivider"), N = c("FmRadioGroup"), O = c("FmTimeInput"), U = c("FmButton"), K = c("FmPopover");
|
|
84
|
-
return f(), D("div", null, [
|
|
85
|
-
P(_(t(r)("")) + " ", 1),
|
|
86
|
-
u(K, {
|
|
87
|
-
placement: "bottom",
|
|
88
|
-
class: "min-w-[212px]",
|
|
89
|
-
"show-popover": a.value
|
|
90
|
-
}, {
|
|
91
|
-
"popover-button": g(() => [
|
|
92
|
-
u(te, {
|
|
93
|
-
"left-icon": "schedule",
|
|
94
|
-
label: `${y({
|
|
95
|
-
startTime: m.value.start,
|
|
96
|
-
endTime: m.value.end,
|
|
97
|
-
locale: t(k)()
|
|
98
|
-
})}`
|
|
99
|
-
}, null, 8, ["label"])
|
|
100
|
-
]),
|
|
101
|
-
default: g(() => {
|
|
102
|
-
var A, B, J, j;
|
|
103
|
-
return [
|
|
104
|
-
d("div", ae, [
|
|
105
|
-
u(N, {
|
|
106
|
-
modelValue: i.value,
|
|
107
|
-
"onUpdate:modelValue": o[0] || (o[0] = (l) => i.value = l)
|
|
108
|
-
}, {
|
|
109
|
-
default: g(() => [
|
|
110
|
-
(f(!0), D(M, null, H(p.defaultDateRange, (l, T) => (f(), S(R, {
|
|
111
|
-
key: `range_${T}`,
|
|
112
|
-
value: T + 1,
|
|
113
|
-
label: l.name,
|
|
114
|
-
onClick: (_e) => h(l.startTime, l.endTime)
|
|
115
|
-
}, {
|
|
116
|
-
label: g(() => [
|
|
117
|
-
d("p", me, [
|
|
118
|
-
P(_(l.name) + " ", 1),
|
|
119
|
-
X(u(s, {
|
|
120
|
-
label: t(r)("report.common.default"),
|
|
121
|
-
class: "bg-fm-color-system-info-100 border-fm-color-typo-info text-fm-color-typo-info",
|
|
122
|
-
compact: ""
|
|
123
|
-
}, null, 8, ["label"]), [
|
|
124
|
-
[Y, l.isDefault]
|
|
125
|
-
])
|
|
126
|
-
]),
|
|
127
|
-
d("p", ue, _(t(q)(l.startTime, t(k)())) + " - " + _(t(q)(l.endTime, t(k)())) + " " + _(t(le)(l.startTime, l.endTime)), 1)
|
|
128
|
-
]),
|
|
129
|
-
_: 2
|
|
130
|
-
}, 1032, ["value", "label", "onClick"]))), 128)),
|
|
131
|
-
u(w),
|
|
132
|
-
u(R, {
|
|
133
|
-
key: "range_custom",
|
|
134
|
-
label: t(r)("report.common.custom"),
|
|
135
|
-
value: p.defaultDateRange.length + 1
|
|
136
|
-
}, null, 8, ["label", "value"])
|
|
137
|
-
]),
|
|
138
|
-
_: 1
|
|
139
|
-
}, 8, ["modelValue"]),
|
|
140
|
-
i.value === p.defaultDateRange.length + 1 ? (f(), D(M, { key: 0 }, [
|
|
141
|
-
d("p", ie, _(t(r)("report.date.startingTime")), 1),
|
|
142
|
-
d("div", re, [
|
|
143
|
-
u(O, {
|
|
144
|
-
"model-value": v(`${(A = n.value.start) == null ? void 0 : A.hour}:${(B = n.value.start) == null ? void 0 : B.minute}`),
|
|
145
|
-
"onUpdate:modelValue": o[1] || (o[1] = (l) => {
|
|
146
|
-
if (n.value.start) {
|
|
147
|
-
const T = t(F)(`${l.hours}:${l.minutes} ${l.period}`, "h:m A").locale(
|
|
148
|
-
t(k)()
|
|
149
|
-
);
|
|
150
|
-
n.value.start.hour = T.get("hour"), n.value.start.minute = T.get("minute");
|
|
151
|
-
}
|
|
152
|
-
})
|
|
153
|
-
}, null, 8, ["model-value"])
|
|
154
|
-
]),
|
|
155
|
-
d("p", se, _(t(r)("report.date.endingTime")), 1),
|
|
156
|
-
d("div", de, [
|
|
157
|
-
u(O, {
|
|
158
|
-
"model-value": v(`${(J = n.value.end) == null ? void 0 : J.hour}:${(j = n.value.end) == null ? void 0 : j.minute}`),
|
|
159
|
-
"onUpdate:modelValue": o[2] || (o[2] = (l) => {
|
|
160
|
-
if (n.value.end) {
|
|
161
|
-
const T = t(F)(`${l.hours}:${l.minutes} ${l.period}`, "h:m A").locale(
|
|
162
|
-
t(k)()
|
|
163
|
-
);
|
|
164
|
-
n.value.end.hour = T.get("hour"), n.value.end.minute = T.get("minute");
|
|
165
|
-
}
|
|
166
|
-
})
|
|
167
|
-
}, null, 8, ["model-value"])
|
|
168
|
-
])
|
|
169
|
-
], 64)) : V("", !0),
|
|
170
|
-
d("div", ce, [
|
|
171
|
-
o[5] || (o[5] = d("div", { class: "grow" }, null, -1)),
|
|
172
|
-
u(U, {
|
|
173
|
-
label: t(r)("report.common.cancel"),
|
|
174
|
-
variant: "tertiary",
|
|
175
|
-
onClick: o[3] || (o[3] = (l) => a.value = !1)
|
|
176
|
-
}, null, 8, ["label"]),
|
|
177
|
-
u(U, {
|
|
178
|
-
label: t(r)("report.common.apply"),
|
|
179
|
-
onClick: o[4] || (o[4] = () => b(JSON.parse(JSON.stringify(n.value))))
|
|
180
|
-
}, null, 8, ["label"])
|
|
181
|
-
])
|
|
182
|
-
])
|
|
183
|
-
];
|
|
184
|
-
}),
|
|
185
|
-
_: 1
|
|
186
|
-
}, 8, ["show-popover"])
|
|
187
|
-
]);
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
}), fe = { class: "flex overflow-x-auto overflow-y-hidden scrollbar-hide" }, ve = /* @__PURE__ */ I({
|
|
191
|
-
__name: "Filter",
|
|
192
|
-
setup(x) {
|
|
193
|
-
const r = E(), { locations: m, selectedLocationIds: p } = G(E()), { dateRange: i, compareDateRange: y, timeRange: b, defaultDateSetting: v, selectTimeDefault: n } = G(r);
|
|
194
|
-
return (h, a) => (f(), D("div", fe, [
|
|
195
|
-
u(ee, {
|
|
196
|
-
modelValue: t(p),
|
|
197
|
-
"onUpdate:modelValue": a[5] || (a[5] = (e) => $(p) ? p.value = e : null),
|
|
198
|
-
options: t(m)
|
|
199
|
-
}, {
|
|
200
|
-
default: g(() => [
|
|
201
|
-
u(oe, {
|
|
202
|
-
"date-range": t(i),
|
|
203
|
-
"onUpdate:dateRange": a[0] || (a[0] = (e) => $(i) ? i.value = e : null),
|
|
204
|
-
"compare-date-range": t(y),
|
|
205
|
-
"onUpdate:compareDateRange": a[1] || (a[1] = (e) => $(y) ? y.value = e : null),
|
|
206
|
-
"compare-type": t(v).defaultCompareType,
|
|
207
|
-
"onUpdate:compareType": a[2] || (a[2] = (e) => t(v).defaultCompareType = e),
|
|
208
|
-
compare: ""
|
|
209
|
-
}, null, 8, ["date-range", "compare-date-range", "compare-type"]),
|
|
210
|
-
u(pe, {
|
|
211
|
-
"time-range": t(b),
|
|
212
|
-
"onUpdate:timeRange": a[3] || (a[3] = (e) => $(b) ? b.value = e : null),
|
|
213
|
-
"select-time-default": t(n),
|
|
214
|
-
"onUpdate:selectTimeDefault": a[4] || (a[4] = (e) => $(n) ? n.value = e : null),
|
|
215
|
-
"default-date-range": t(v).timeOptions
|
|
216
|
-
}, null, 8, ["time-range", "select-time-default", "default-date-range"])
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
}, 8, ["modelValue", "options"])
|
|
220
|
-
]));
|
|
221
|
-
}
|
|
222
|
-
}), Te = { class: "fm-typo-en-body-md-400" }, $e = /* @__PURE__ */ I({
|
|
223
|
-
__name: "MenuTab",
|
|
224
|
-
props: {
|
|
225
|
-
modelValue: { required: !1, default: [] },
|
|
226
|
-
modelModifiers: {}
|
|
227
|
-
},
|
|
228
|
-
emits: ["update:modelValue"],
|
|
229
|
-
setup(x) {
|
|
230
|
-
const r = C(x, "modelValue"), { breakpoints: m } = ne();
|
|
231
|
-
return (p, i) => {
|
|
232
|
-
const y = c("FmButton"), b = c("FmIcon"), v = c("FmMenuItem"), n = c("FmMenu");
|
|
233
|
-
return f(), D("div", {
|
|
234
|
-
class: z(["flex items-center pb-6 px-24", `${t(m).lg || t(m).md ? "px-24" : "pl-3"}`])
|
|
235
|
-
}, [
|
|
236
|
-
u(ve),
|
|
237
|
-
i[0] || (i[0] = d("div", { class: "flex grow" }, null, -1)),
|
|
238
|
-
r.value.length > 0 ? (f(), S(n, {
|
|
239
|
-
key: 0,
|
|
240
|
-
trigger: "click",
|
|
241
|
-
placement: "left",
|
|
242
|
-
shift: !0,
|
|
243
|
-
class: z(t(m).sm || t(m).xs ? "pr-3" : "")
|
|
244
|
-
}, {
|
|
245
|
-
"menu-button": g(() => [
|
|
246
|
-
u(y, {
|
|
247
|
-
"append-icon": "more_vert",
|
|
248
|
-
variant: "tertiary",
|
|
249
|
-
size: "md",
|
|
250
|
-
class: "w-[36px] bg-none"
|
|
251
|
-
})
|
|
252
|
-
]),
|
|
253
|
-
default: g(() => [
|
|
254
|
-
(f(!0), D(M, null, H(r.value, (h, a) => (f(), S(v, {
|
|
255
|
-
key: `button-${a}`,
|
|
256
|
-
onClick: h.onClick
|
|
257
|
-
}, {
|
|
258
|
-
label: g(() => [
|
|
259
|
-
h.prependIcon ?? !1 ? (f(), S(b, {
|
|
260
|
-
key: 0,
|
|
261
|
-
name: h.icon
|
|
262
|
-
}, null, 8, ["name"])) : V("", !0),
|
|
263
|
-
d("p", Te, _(h.label), 1)
|
|
264
|
-
]),
|
|
265
|
-
_: 2
|
|
266
|
-
}, 1032, ["onClick"]))), 128))
|
|
267
|
-
]),
|
|
268
|
-
_: 1
|
|
269
|
-
}, 8, ["class"])) : V("", !0)
|
|
270
|
-
], 2);
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
});
|
|
274
|
-
export {
|
|
275
|
-
$e as _
|
|
276
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { d as o } from "./global-loader-BqFQzk46.js";
|
|
2
|
-
const u = (t, e = "en") => o().set("hour", t.hour).set("minute", t.minute).locale(e).format("h:mm A"), m = (t, e) => {
|
|
3
|
-
const s = o().set("hour", t.hour).set("minute", t.minute);
|
|
4
|
-
return o().set("hour", e.hour).set("minute", e.minute) < s ? "+1" : "";
|
|
5
|
-
};
|
|
6
|
-
export {
|
|
7
|
-
m as s,
|
|
8
|
-
u as t
|
|
9
|
-
};
|