@feedmepos/mf-report 5.27.31 → 5.27.32-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.
- package/dist/{App-BAY5zxSa.js → App-Ba6voQqp.js} +39 -39
- package/dist/DateRangeSelect-DultE0On.js +517 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D3zGuz3X.js → Default.vue_vue_type_script_setup_true_lang-DZxi4CwN.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D-5nz30f.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CxaMCSPW.js} +4 -4
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DG4YsJj7.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-YxNS7L_g.js} +2931 -2846
- package/dist/{InsightView-Cf7JTtmP.js → InsightView-DrEO-EST.js} +4 -4
- package/dist/{Integration-CmKHGXVP.js → Integration-CCocBGtZ.js} +3 -3
- package/dist/{Integrations-Dp0WZL90.js → Integrations-Cb5S-QX3.js} +2 -2
- package/dist/{Layout-D9-FsiHd.js → Layout-d8JN3nx0.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-CzS3Veun.js +155 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BsWMB078.js → NavigationTab.vue_vue_type_script_setup_true_lang-MwAHLd3R.js} +3 -3
- package/dist/{OverviewView-B3c6PdFi.js → OverviewView-B9xMKGfS.js} +4 -4
- package/dist/{Report-DRiwSdrZ.js → Report-Byp-lpeM.js} +19 -19
- package/dist/{ReportEditor-8rQXKLq4.js → ReportEditor-DCjXAnYJ.js} +6 -6
- package/dist/{ReportView-DC-FonPI.js → ReportView-Czc8CBEN.js} +18 -18
- package/dist/{Setting-BIkL4RGA.js → Setting-Dn1tIjHZ.js} +3 -3
- package/dist/{Template-DQ7AQxaZ.js → Template-B-NsGH3M.js} +3 -3
- package/dist/{TileEditor-Th8qpMkS.js → TileEditor-BXYSBB3y.js} +6 -6
- package/dist/{TileGrid.vue_vue_type_script_setup_true_lang-CIvXqWuw.js → TileGrid.vue_vue_type_script_setup_true_lang-CSDwho_h.js} +1 -1
- package/dist/{TransitionFade-U2R9SkgT.js → TransitionFade-Dm-B6GJK.js} +4 -4
- package/dist/{app-BqleBdzW.js → app-P6kcrOWr.js} +6322 -3209
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-DmiQseZ0.js → formatChartData.worker-GhwszhPe.js} +12 -12
- package/dist/assets/{processTableData.worker-CKjQzarL.js → processTableData.worker-C4hgpe0l.js} +12 -12
- package/dist/style.css +1 -1
- package/dist/{useRestaurantPermission-BMCHIgCn.js → useRestaurantPermission-rtDfhcU-.js} +1 -1
- package/package.json +5 -3
- package/dist/DateRangeSelect.vue_vue_type_script_setup_true_lang-X6REOqng.js +0 -391
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-CQ4ax1Wf.js +0 -130
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
import { defineComponent as se, resolveComponent as Y, createBlock as R, openBlock as p, normalizeClass as Ce, withCtx as V, createCommentVNode as F, createElementVNode as N, toDisplayString as pe, renderSlot as Re, mergeModels as Q, useModel as j, ref as A, computed as B, watch as x, nextTick as Z, onMounted as Se, onBeforeUnmount as xe, createElementBlock as be, unref as P, createVNode as ee } from "vue";
|
|
2
|
+
import { d as m, a as Pe, C as $, j as Ee } from "./app-P6kcrOWr.js";
|
|
3
|
+
import { detectLocale as te } from "@feedmepos/mf-common";
|
|
4
|
+
import { u as Te, _ as we } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
5
|
+
import { storeToRefs as Me } from "pinia";
|
|
6
|
+
import { useSnackbar as Le } from "@feedmepos/ui-library";
|
|
7
|
+
const Ae = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), $e = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), Ye = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), Fe = /[^\p{L}\d]+/giu, ae = "$1\0$2", ne = "";
|
|
8
|
+
function ue(t) {
|
|
9
|
+
let e = t.trim();
|
|
10
|
+
e = e.replace(Ae, ae).replace($e, ae), e = e.replace(Fe, "\0");
|
|
11
|
+
let n = 0, s = e.length;
|
|
12
|
+
for (; e.charAt(n) === "\0"; )
|
|
13
|
+
n++;
|
|
14
|
+
if (n === s)
|
|
15
|
+
return [];
|
|
16
|
+
for (; e.charAt(s - 1) === "\0"; )
|
|
17
|
+
s--;
|
|
18
|
+
return e.slice(n, s).split(/\0/g);
|
|
19
|
+
}
|
|
20
|
+
function ke(t) {
|
|
21
|
+
const e = ue(t);
|
|
22
|
+
for (let n = 0; n < e.length; n++) {
|
|
23
|
+
const s = e[n], u = Ye.exec(s);
|
|
24
|
+
if (u) {
|
|
25
|
+
const l = u.index + (u[1] ?? u[2]).length;
|
|
26
|
+
e.splice(n, 1, s.slice(0, l), s.slice(l));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return e;
|
|
30
|
+
}
|
|
31
|
+
function Ke(t, e) {
|
|
32
|
+
const [n, s, u] = U(t, e), l = k(e == null ? void 0 : e.locale), i = I(e == null ? void 0 : e.locale), r = e != null && e.mergeAmbiguousCharacters ? O(l, i) : oe(l, i);
|
|
33
|
+
return n + s.map((f, o) => o === 0 ? l(f) : r(f, o)).join((e == null ? void 0 : e.delimiter) ?? "") + u;
|
|
34
|
+
}
|
|
35
|
+
function Je(t, e) {
|
|
36
|
+
const [n, s, u] = U(t, e), l = k(e == null ? void 0 : e.locale), i = I(e == null ? void 0 : e.locale), r = e != null && e.mergeAmbiguousCharacters ? O(l, i) : oe(l, i);
|
|
37
|
+
return n + s.map(r).join((e == null ? void 0 : e.delimiter) ?? "") + u;
|
|
38
|
+
}
|
|
39
|
+
function Qe(t, e) {
|
|
40
|
+
const [n, s, u] = U(t, e), l = k(e == null ? void 0 : e.locale), i = I(e == null ? void 0 : e.locale);
|
|
41
|
+
return n + s.map(O(l, i)).join((e == null ? void 0 : e.delimiter) ?? " ") + u;
|
|
42
|
+
}
|
|
43
|
+
function Ze(t, e) {
|
|
44
|
+
const [n, s, u] = U(t, e), l = k(e == null ? void 0 : e.locale), i = I(e == null ? void 0 : e.locale), r = O(l, i);
|
|
45
|
+
return n + s.map((f, o) => o === 0 ? r(f) : l(f)).join((e == null ? void 0 : e.delimiter) ?? " ") + u;
|
|
46
|
+
}
|
|
47
|
+
function k(t) {
|
|
48
|
+
return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
|
|
49
|
+
}
|
|
50
|
+
function I(t) {
|
|
51
|
+
return t === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(t);
|
|
52
|
+
}
|
|
53
|
+
function O(t, e) {
|
|
54
|
+
return (n) => `${e(n[0])}${t(n.slice(1))}`;
|
|
55
|
+
}
|
|
56
|
+
function oe(t, e) {
|
|
57
|
+
return (n, s) => {
|
|
58
|
+
const u = n[0];
|
|
59
|
+
return (s > 0 && u >= "0" && u <= "9" ? "_" + u : e(u)) + t(n.slice(1));
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function U(t, e = {}) {
|
|
63
|
+
const n = e.split ?? (e.separateNumbers ? ke : ue), s = e.prefixCharacters ?? ne, u = e.suffixCharacters ?? ne;
|
|
64
|
+
let l = 0, i = t.length;
|
|
65
|
+
for (; l < t.length; ) {
|
|
66
|
+
const r = t.charAt(l);
|
|
67
|
+
if (!s.includes(r))
|
|
68
|
+
break;
|
|
69
|
+
l++;
|
|
70
|
+
}
|
|
71
|
+
for (; i > l; ) {
|
|
72
|
+
const r = i - 1, f = t.charAt(r);
|
|
73
|
+
if (!u.includes(f))
|
|
74
|
+
break;
|
|
75
|
+
i = r;
|
|
76
|
+
}
|
|
77
|
+
return [
|
|
78
|
+
t.slice(0, l),
|
|
79
|
+
n(t.slice(l, i)),
|
|
80
|
+
t.slice(i)
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
var E = /* @__PURE__ */ ((t) => (t.Year = "YEAR", t.Month = "MONTH", t.Week = "WEEK", t.Day = "DAY", t))(E || {}), Ie = /* @__PURE__ */ ((t) => (t.Yesterday = "YESTERDAY", t.Today = "TODAY", t))(Ie || {});
|
|
84
|
+
function et(t, e = 100) {
|
|
85
|
+
let n = null;
|
|
86
|
+
const s = function(...u) {
|
|
87
|
+
return n && clearTimeout(n), new Promise((l) => {
|
|
88
|
+
n = setTimeout(() => {
|
|
89
|
+
n = null;
|
|
90
|
+
const i = t(...u);
|
|
91
|
+
l(i);
|
|
92
|
+
}, e);
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
return s.cancel = () => {
|
|
96
|
+
n && (clearTimeout(n), n = null);
|
|
97
|
+
}, s;
|
|
98
|
+
}
|
|
99
|
+
function Oe() {
|
|
100
|
+
return [...Array(12).keys()].map((t) => m().month(t).format("MMM"));
|
|
101
|
+
}
|
|
102
|
+
function tt(t, e, n = "") {
|
|
103
|
+
const s = (r) => /^[\x00-\x7F]*$/.test(r) ? " " : "", u = (r) => /^每年/.test(r), l = (r) => /^每周|^每週/.test(r), i = (r) => /^每月/.test(r);
|
|
104
|
+
switch (t.type) {
|
|
105
|
+
case E.Day:
|
|
106
|
+
return e("report.schedule.everyDay");
|
|
107
|
+
case E.Week: {
|
|
108
|
+
const r = e("report.schedule.everyWeek"), f = l(r);
|
|
109
|
+
let o = `${r}${s(r)}`;
|
|
110
|
+
const h = [
|
|
111
|
+
e("report.days.sunday"),
|
|
112
|
+
e("report.days.monday"),
|
|
113
|
+
e("report.days.tuesday"),
|
|
114
|
+
e("report.days.wednesday"),
|
|
115
|
+
e("report.days.thursday"),
|
|
116
|
+
e("report.days.friday"),
|
|
117
|
+
e("report.days.saturday")
|
|
118
|
+
];
|
|
119
|
+
if (t.days)
|
|
120
|
+
for (let g = 0; g < t.days.length; g++) {
|
|
121
|
+
const T = f ? h[t.days[g]].replace(/^[周週]/, "") : h[t.days[g]];
|
|
122
|
+
o = o + T + (g !== t.days.length - 1 ? "," : "");
|
|
123
|
+
}
|
|
124
|
+
return o;
|
|
125
|
+
}
|
|
126
|
+
case E.Month: {
|
|
127
|
+
const r = e("report.schedule.everyMonth"), f = i(r);
|
|
128
|
+
let o = `${r}${s(r)}`;
|
|
129
|
+
return t.days && (o = o + (f ? t.days.map((h) => `${h}日`).join(",") : t.days.join(","))), o;
|
|
130
|
+
}
|
|
131
|
+
case E.Year: {
|
|
132
|
+
if (!t.months && !t.days)
|
|
133
|
+
return e("report.schedule.customDate");
|
|
134
|
+
const r = e("report.schedule.everyYear"), f = u(r);
|
|
135
|
+
let o = `${r}${f ? " " : s(r)}`;
|
|
136
|
+
if (t.months) {
|
|
137
|
+
const h = Oe();
|
|
138
|
+
o = o + t.months.map((g) => h[g - 1]).join(",");
|
|
139
|
+
}
|
|
140
|
+
return t.months && t.days && (o = f ? `${o} 的 ` : `${o} ${e("report.common.and")} `), t.days && (o = o + (f ? t.days.map((h) => `${h}日`).join(",") : t.days.join(","))), o;
|
|
141
|
+
}
|
|
142
|
+
default:
|
|
143
|
+
return n;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function re(t = {
|
|
147
|
+
startDate: null,
|
|
148
|
+
endDate: null,
|
|
149
|
+
locale: "en-US",
|
|
150
|
+
timezone: void 0
|
|
151
|
+
}) {
|
|
152
|
+
if (!t.startDate || !t.endDate)
|
|
153
|
+
return "No comparison";
|
|
154
|
+
let e = m().subtract(1, "day").endOf("day"), n = m().endOf("day");
|
|
155
|
+
return t.startDate && (e = t.timezone ? m(t.startDate).tz(t.timezone).locale(t.locale) : m(t.startDate).locale(t.locale)), t.endDate && (n = t.timezone ? m(t.endDate).tz(t.timezone).locale(t.locale) : m(t.endDate).locale(t.locale)), e.format("YYYY") !== n.format("YYYY") ? `${e.format("DD MMM YYYY")} - ${n.format("DD MMM YYYY")}` : `${e.format("DD MMM")} - ${n.format("DD MMM YYYY")}`;
|
|
156
|
+
}
|
|
157
|
+
function at(t = {
|
|
158
|
+
startTime: null,
|
|
159
|
+
endTime: null,
|
|
160
|
+
locale: "en-US"
|
|
161
|
+
}) {
|
|
162
|
+
const e = "hh:mmA", { startTime: n, endTime: s, locale: u } = t;
|
|
163
|
+
if (!n || !s) return "";
|
|
164
|
+
const l = m().set("hour", n.hour).set("minute", n.minute).locale(u), i = m().set("hour", s.hour).set("minute", s.minute).locale(u);
|
|
165
|
+
return `${l.format(e)}-${i.format(e)}`;
|
|
166
|
+
}
|
|
167
|
+
const Ue = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-0" }, ze = { class: "text-ellipsis overflow-hidden whitespace-nowrap flex-1 min-w-0" }, Ne = { class: "whitespace-nowrap flex-none" }, le = /* @__PURE__ */ se({
|
|
168
|
+
__name: "FilterChip",
|
|
169
|
+
props: {
|
|
170
|
+
label: {
|
|
171
|
+
type: String,
|
|
172
|
+
default: ""
|
|
173
|
+
},
|
|
174
|
+
leftIcon: {
|
|
175
|
+
type: String,
|
|
176
|
+
default: ""
|
|
177
|
+
},
|
|
178
|
+
rightIcon: {
|
|
179
|
+
type: String,
|
|
180
|
+
default: ""
|
|
181
|
+
},
|
|
182
|
+
trailingIcon: {
|
|
183
|
+
type: String,
|
|
184
|
+
default: ""
|
|
185
|
+
},
|
|
186
|
+
loading: {
|
|
187
|
+
type: Boolean,
|
|
188
|
+
default: !1
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
setup(t) {
|
|
192
|
+
const e = t;
|
|
193
|
+
return (n, s) => {
|
|
194
|
+
const u = Y("FmIcon"), l = Y("FmCircularProgress"), i = Y("FmChip");
|
|
195
|
+
return p(), R(i, {
|
|
196
|
+
"aria-busy": e.loading,
|
|
197
|
+
class: Ce([
|
|
198
|
+
"bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-[400px] flex items-center gap-1 transition-opacity",
|
|
199
|
+
e.loading && "opacity-80"
|
|
200
|
+
])
|
|
201
|
+
}, {
|
|
202
|
+
default: V(() => [
|
|
203
|
+
t.leftIcon ? (p(), R(u, {
|
|
204
|
+
key: 0,
|
|
205
|
+
name: e.leftIcon,
|
|
206
|
+
size: "sm",
|
|
207
|
+
outline: "",
|
|
208
|
+
class: "flex-none"
|
|
209
|
+
}, null, 8, ["name"])) : F("", !0),
|
|
210
|
+
N("div", Ue, [
|
|
211
|
+
N("span", ze, pe(e.label), 1),
|
|
212
|
+
t.rightIcon ? (p(), R(u, {
|
|
213
|
+
key: 0,
|
|
214
|
+
name: t.rightIcon,
|
|
215
|
+
size: "sm",
|
|
216
|
+
outline: "",
|
|
217
|
+
class: "flex-none"
|
|
218
|
+
}, null, 8, ["name"])) : F("", !0),
|
|
219
|
+
N("span", Ne, [
|
|
220
|
+
Re(n.$slots, "default")
|
|
221
|
+
]),
|
|
222
|
+
e.loading ? (p(), R(l, {
|
|
223
|
+
key: 1,
|
|
224
|
+
size: "md",
|
|
225
|
+
class: "flex-none scale-75"
|
|
226
|
+
})) : t.trailingIcon ? (p(), R(u, {
|
|
227
|
+
key: 2,
|
|
228
|
+
name: t.trailingIcon,
|
|
229
|
+
size: "sm",
|
|
230
|
+
outline: "",
|
|
231
|
+
class: "flex-none"
|
|
232
|
+
}, null, 8, ["name"])) : F("", !0)
|
|
233
|
+
])
|
|
234
|
+
]),
|
|
235
|
+
_: 3
|
|
236
|
+
}, 8, ["aria-busy", "class"]);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}), je = { class: "flex gap-2 items-center" }, b = "YYYY-MM-DD", ce = ".fm-calendar__cell[id]", Be = ".fm-calendar__cell__button", Ve = /* @__PURE__ */ se({
|
|
240
|
+
__name: "DateRangeSelect",
|
|
241
|
+
props: /* @__PURE__ */ Q({
|
|
242
|
+
compare: {
|
|
243
|
+
type: Boolean,
|
|
244
|
+
default: !1
|
|
245
|
+
},
|
|
246
|
+
datePredefinedRanges: {
|
|
247
|
+
type: Array,
|
|
248
|
+
default: () => Ee()
|
|
249
|
+
},
|
|
250
|
+
label: {
|
|
251
|
+
type: String,
|
|
252
|
+
required: !1,
|
|
253
|
+
default: null
|
|
254
|
+
},
|
|
255
|
+
removable: {
|
|
256
|
+
type: Boolean,
|
|
257
|
+
required: !1,
|
|
258
|
+
default: !1
|
|
259
|
+
},
|
|
260
|
+
minDate: {
|
|
261
|
+
type: String,
|
|
262
|
+
required: !1,
|
|
263
|
+
default: void 0
|
|
264
|
+
}
|
|
265
|
+
}, {
|
|
266
|
+
compareType: {
|
|
267
|
+
type: String,
|
|
268
|
+
default: $.PRECEDING_PERIOD
|
|
269
|
+
},
|
|
270
|
+
compareTypeModifiers: {},
|
|
271
|
+
dateRange: {
|
|
272
|
+
type: Object,
|
|
273
|
+
default: () => ({
|
|
274
|
+
startDate: void 0,
|
|
275
|
+
endDate: void 0
|
|
276
|
+
})
|
|
277
|
+
},
|
|
278
|
+
dateRangeModifiers: {},
|
|
279
|
+
compareDateRange: {
|
|
280
|
+
type: Object,
|
|
281
|
+
default: () => ({
|
|
282
|
+
startDate: void 0,
|
|
283
|
+
endDate: void 0
|
|
284
|
+
})
|
|
285
|
+
},
|
|
286
|
+
compareDateRangeModifiers: {}
|
|
287
|
+
}),
|
|
288
|
+
emits: /* @__PURE__ */ Q(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
|
|
289
|
+
setup(t, { emit: e }) {
|
|
290
|
+
const { t: n, locale: s } = Te(), u = Le();
|
|
291
|
+
function l(a) {
|
|
292
|
+
return a ? a.includes("T") ? m(a).tz(h.value).format(b) : m(a).format(b) : null;
|
|
293
|
+
}
|
|
294
|
+
const i = e, r = j(t, "compareType"), f = j(t, "dateRange"), o = j(t, "compareDateRange"), { timezone: h } = Me(Pe());
|
|
295
|
+
let g = null, T = 0, S = null;
|
|
296
|
+
const w = /* @__PURE__ */ new Set(), _ = A(!1), W = A(!1), M = B(
|
|
297
|
+
() => _.value || W.value
|
|
298
|
+
), q = B(
|
|
299
|
+
() => t.minDate ? n("report.messages.noPermissionDateAccess", { date: t.minDate }) : ""
|
|
300
|
+
);
|
|
301
|
+
function H(a) {
|
|
302
|
+
return !!(t.minDate && m(a).isBefore(m(t.minDate, b), "day"));
|
|
303
|
+
}
|
|
304
|
+
function de() {
|
|
305
|
+
const a = Date.now();
|
|
306
|
+
a - T < 1e3 || (T = a, u == null || u.open({
|
|
307
|
+
type: "error",
|
|
308
|
+
message: q.value
|
|
309
|
+
}));
|
|
310
|
+
}
|
|
311
|
+
function ie(a) {
|
|
312
|
+
return a instanceof HTMLElement && a.matches(ce) ? [a] : "querySelectorAll" in a ? Array.from(a.querySelectorAll(ce)) : [];
|
|
313
|
+
}
|
|
314
|
+
function me(a = document) {
|
|
315
|
+
t.minDate && ie(a).forEach((c) => {
|
|
316
|
+
const D = m(c.id), d = D.isValid() && H(D), C = c.querySelector(Be);
|
|
317
|
+
c.classList.toggle("report-date-access-disabled", d), C && (C.setAttribute("aria-disabled", String(d)), C.title = d ? q.value : "");
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
function X(a = [document]) {
|
|
321
|
+
!t.minDate || !M.value || (a.forEach((c) => w.add(c)), S === null && (S = window.requestAnimationFrame(() => {
|
|
322
|
+
S = null;
|
|
323
|
+
const c = Array.from(w);
|
|
324
|
+
w.clear(), c.length || c.push(document), c.forEach((D) => me(D));
|
|
325
|
+
})));
|
|
326
|
+
}
|
|
327
|
+
function G() {
|
|
328
|
+
g == null || g.disconnect(), g = null, S !== null && (window.cancelAnimationFrame(S), S = null), w.clear();
|
|
329
|
+
}
|
|
330
|
+
function fe() {
|
|
331
|
+
g || !t.minDate || !M.value || (g = new MutationObserver((a) => {
|
|
332
|
+
const c = /* @__PURE__ */ new Set();
|
|
333
|
+
a.forEach((D) => {
|
|
334
|
+
c.add(D.target), D.addedNodes.forEach((d) => {
|
|
335
|
+
d instanceof HTMLElement && c.add(d);
|
|
336
|
+
});
|
|
337
|
+
}), X(Array.from(c));
|
|
338
|
+
}), g.observe(document.body, { childList: !0, subtree: !0 }));
|
|
339
|
+
}
|
|
340
|
+
function z() {
|
|
341
|
+
if (!t.minDate || !M.value) {
|
|
342
|
+
G();
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
fe(), X();
|
|
346
|
+
}
|
|
347
|
+
function K(a, c = !0) {
|
|
348
|
+
return a && (H(m(a, b)) ? (c && de(), t.minDate) : a);
|
|
349
|
+
}
|
|
350
|
+
function J(a, c = {}) {
|
|
351
|
+
const D = c.notify ?? !0;
|
|
352
|
+
let d = K(a.startDate, D), C = K(a.endDate, D);
|
|
353
|
+
return d && C && m(d, b).isAfter(m(C, b), "day") && (d = t.minDate ?? C, C = d), { startDate: d, endDate: C };
|
|
354
|
+
}
|
|
355
|
+
function L(a, c) {
|
|
356
|
+
return a.startDate === c.startDate && a.endDate === c.endDate;
|
|
357
|
+
}
|
|
358
|
+
const y = A({
|
|
359
|
+
startDate: l(f.value.startDate),
|
|
360
|
+
endDate: l(f.value.endDate)
|
|
361
|
+
}), v = A({
|
|
362
|
+
startDate: o.value.startDate ? l(o.value.startDate) : null,
|
|
363
|
+
endDate: o.value.endDate ? l(o.value.endDate) : null
|
|
364
|
+
});
|
|
365
|
+
x(
|
|
366
|
+
[() => y.value],
|
|
367
|
+
() => {
|
|
368
|
+
const a = J(y.value);
|
|
369
|
+
if (!L(a, y.value)) {
|
|
370
|
+
y.value = a;
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
y.value.endDate || (y.value.endDate = y.value.startDate);
|
|
374
|
+
const c = {
|
|
375
|
+
startDate: m.tz(y.value.startDate, h.value).startOf("day").utc().toISOString(),
|
|
376
|
+
endDate: m.tz(y.value.endDate, h.value).endOf("day").utc().toISOString()
|
|
377
|
+
};
|
|
378
|
+
f.value = c, i("update", c);
|
|
379
|
+
},
|
|
380
|
+
{ deep: !0 }
|
|
381
|
+
), x([() => v.value], () => {
|
|
382
|
+
const a = J(v.value, {
|
|
383
|
+
notify: r.value === $.CUSTOM
|
|
384
|
+
});
|
|
385
|
+
if (!L(a, v.value)) {
|
|
386
|
+
v.value = a;
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
const c = v.value.startDate, D = v.value.endDate, d = c ? m(
|
|
390
|
+
c instanceof Date ? c : m(c).toDate()
|
|
391
|
+
).startOf("day").tz(h.value, !0).toISOString() : void 0, C = D ? m(D instanceof Date ? D : m(D).toDate()).tz(h.value, !0).endOf("day").toISOString() : void 0;
|
|
392
|
+
o.value = {
|
|
393
|
+
startDate: d,
|
|
394
|
+
endDate: C
|
|
395
|
+
};
|
|
396
|
+
}), x(
|
|
397
|
+
() => f.value,
|
|
398
|
+
() => {
|
|
399
|
+
const a = {
|
|
400
|
+
startDate: l(f.value.startDate),
|
|
401
|
+
endDate: l(f.value.endDate)
|
|
402
|
+
};
|
|
403
|
+
L(a, y.value) || (y.value = a);
|
|
404
|
+
},
|
|
405
|
+
{ deep: !0 }
|
|
406
|
+
), x(
|
|
407
|
+
() => o.value,
|
|
408
|
+
() => {
|
|
409
|
+
const a = {
|
|
410
|
+
startDate: l(o.value.startDate),
|
|
411
|
+
endDate: l(o.value.endDate)
|
|
412
|
+
};
|
|
413
|
+
L(a, v.value) || (v.value = a);
|
|
414
|
+
},
|
|
415
|
+
{ deep: !0 }
|
|
416
|
+
), x(
|
|
417
|
+
() => t.minDate,
|
|
418
|
+
async () => {
|
|
419
|
+
await Z(), z();
|
|
420
|
+
}
|
|
421
|
+
), x(
|
|
422
|
+
() => M.value,
|
|
423
|
+
async () => {
|
|
424
|
+
await Z(), z();
|
|
425
|
+
}
|
|
426
|
+
), Se(() => {
|
|
427
|
+
z();
|
|
428
|
+
}), xe(() => {
|
|
429
|
+
G();
|
|
430
|
+
});
|
|
431
|
+
function De(a) {
|
|
432
|
+
r.value = a;
|
|
433
|
+
}
|
|
434
|
+
function ye(a) {
|
|
435
|
+
_.value = a;
|
|
436
|
+
}
|
|
437
|
+
function ge(a) {
|
|
438
|
+
W.value = a;
|
|
439
|
+
}
|
|
440
|
+
function he(a) {
|
|
441
|
+
i("chip-closed", a);
|
|
442
|
+
}
|
|
443
|
+
const ve = B(() => {
|
|
444
|
+
const a = te(), c = a.startsWith("zh") ? "" : " ", D = n("report.common.comparedTo"), d = re({
|
|
445
|
+
startDate: v.value.startDate ?? null,
|
|
446
|
+
endDate: v.value.endDate ?? null,
|
|
447
|
+
locale: a
|
|
448
|
+
});
|
|
449
|
+
return r.value === $.NO_COMPARISON ? `${D}: ${n(`report.compare.${r.value}`)}` : r.value === $.CUSTOM ? `${D}: ${d}` : `${D}${c}${n(`report.compare.${r.value}`).toLowerCase()}: ${d}`;
|
|
450
|
+
});
|
|
451
|
+
return (a, c) => {
|
|
452
|
+
const D = Y("FmSimpleDateRangePicker");
|
|
453
|
+
return p(), be("div", je, [
|
|
454
|
+
(p(), R(D, {
|
|
455
|
+
key: `date-picker-${P(s)}`,
|
|
456
|
+
modelValue: y.value,
|
|
457
|
+
"onUpdate:modelValue": c[1] || (c[1] = (d) => y.value = d),
|
|
458
|
+
"show-predefined-range": "",
|
|
459
|
+
min: t.minDate,
|
|
460
|
+
"predefined-range": t.datePredefinedRanges.map((d) => ({
|
|
461
|
+
...d,
|
|
462
|
+
label: P(n)(`report.date.${d.label}`)
|
|
463
|
+
})),
|
|
464
|
+
class: "w-2/6",
|
|
465
|
+
onPopoverChanged: ye
|
|
466
|
+
}, {
|
|
467
|
+
"trigger-button": V(() => [
|
|
468
|
+
ee(le, {
|
|
469
|
+
"left-icon": t.label ? "filter_alt" : "calendar_month",
|
|
470
|
+
label: t.label ?? P(re)({
|
|
471
|
+
startDate: y.value.startDate ?? "",
|
|
472
|
+
endDate: y.value.endDate ?? "",
|
|
473
|
+
locale: P(te)()
|
|
474
|
+
}),
|
|
475
|
+
removable: t.removable,
|
|
476
|
+
onChipClosed: c[0] || (c[0] = (d) => he(!0))
|
|
477
|
+
}, null, 8, ["left-icon", "label", "removable"])
|
|
478
|
+
]),
|
|
479
|
+
_: 1
|
|
480
|
+
}, 8, ["modelValue", "min", "predefined-range"])),
|
|
481
|
+
t.compare ? (p(), R(D, {
|
|
482
|
+
key: `compare-date-picker-${P(s)}`,
|
|
483
|
+
modelValue: v.value,
|
|
484
|
+
"onUpdate:modelValue": c[2] || (c[2] = (d) => v.value = d),
|
|
485
|
+
"compare-type": r.value,
|
|
486
|
+
"onUpdate:compareType": c[3] || (c[3] = (d) => r.value = d),
|
|
487
|
+
"show-predefined-range": "",
|
|
488
|
+
min: t.minDate,
|
|
489
|
+
"compare-target": y.value,
|
|
490
|
+
"default-compare-type": r.value,
|
|
491
|
+
onPopoverChanged: ge,
|
|
492
|
+
onSelectComparison: De
|
|
493
|
+
}, {
|
|
494
|
+
"trigger-button": V(() => [
|
|
495
|
+
ee(le, { label: ve.value }, null, 8, ["label"])
|
|
496
|
+
]),
|
|
497
|
+
_: 1
|
|
498
|
+
}, 8, ["modelValue", "compare-type", "min", "compare-target", "default-compare-type"])) : F("", !0)
|
|
499
|
+
]);
|
|
500
|
+
};
|
|
501
|
+
}
|
|
502
|
+
}), nt = /* @__PURE__ */ we(Ve, [["__scopeId", "data-v-e0ce1b3c"]]);
|
|
503
|
+
export {
|
|
504
|
+
E as C,
|
|
505
|
+
nt as D,
|
|
506
|
+
le as _,
|
|
507
|
+
Ke as a,
|
|
508
|
+
Ie as b,
|
|
509
|
+
Qe as c,
|
|
510
|
+
et as d,
|
|
511
|
+
tt as e,
|
|
512
|
+
at as f,
|
|
513
|
+
Oe as g,
|
|
514
|
+
re as h,
|
|
515
|
+
Je as p,
|
|
516
|
+
Ze as s
|
|
517
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as u, computed as p, resolveComponent as f, createElementBlock as s, openBlock as t, normalizeStyle as n, normalizeClass as d, unref as e, createBlock as y, createCommentVNode as _, createVNode as h, createElementVNode as k, toDisplayString as g, renderSlot as x } from "vue";
|
|
2
|
-
import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { _ as v } from "./NavigationTab.vue_vue_type_script_setup_true_lang-MwAHLd3R.js";
|
|
3
3
|
import { useBreakpoints as b } from "@feedmepos/ui-library";
|
|
4
4
|
import { storeToRefs as C } from "pinia";
|
|
5
5
|
import { u as q, a as w } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as h, defineComponent as Ae, ref as M, watch as Te, onMounted as Vt, onBeforeUnmount as vo, resolveComponent as fe, createBlock as me, openBlock as K, Transition as aa, withCtx as Le, createElementBlock as ie, createCommentVNode as ge, createElementVNode as G, unref as i, normalizeStyle as Me, withModifiers as rn, toDisplayString as Ie, createVNode as he, Fragment as Ve, renderList as dt, normalizeClass as De, nextTick as yo, mergeModels as Oe, useModel as Ue, renderSlot as ot, h as en, createSlots as ra, resolveDynamicComponent as bo, toRaw as la, markRaw as sa, createTextVNode as ia, onUnmounted as Co, withDirectives as ua, vShow as ca } from "vue";
|
|
2
|
-
import { W as X, w as da, S as Mt, x as At, y as fa, z as bn, A as xo, b as ma, B as ha, E as pa, F as ga, R as yt, G as va } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import {
|
|
4
|
-
import { d as _n } from "./DateRangeSelect
|
|
2
|
+
import { W as X, w as da, S as Mt, x as At, y as fa, z as bn, A as xo, b as ma, B as ha, E as pa, F as ga, R as yt, G as va } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-YxNS7L_g.js";
|
|
3
|
+
import { l as ln, a as cn, u as wo } from "./app-P6kcrOWr.js";
|
|
4
|
+
import { d as _n } from "./DateRangeSelect-DultE0On.js";
|
|
5
5
|
import { storeToRefs as Ft } from "pinia";
|
|
6
6
|
import { detectLocale as Fn } from "@feedmepos/mf-common";
|
|
7
7
|
import { C as Sn } from "./chart-DDDh8zNk.js";
|
|
@@ -3154,7 +3154,7 @@ function vl(e, t) {
|
|
|
3154
3154
|
const n = fe("FmMenuDivider");
|
|
3155
3155
|
return K(), me(n);
|
|
3156
3156
|
}
|
|
3157
|
-
const yl = /* @__PURE__ */ _o(gl, [["render", vl]]), bl = "/assets/processTableData.worker-
|
|
3157
|
+
const yl = /* @__PURE__ */ _o(gl, [["render", vl]]), bl = "/assets/processTableData.worker-C4hgpe0l.js", Cl = { class: "flex h-full flex-col" }, xl = { class: "my-4 shrink-0" }, wl = {
|
|
3158
3158
|
class: "border-b border-fm-color-neutral-gray-100 hover:bg-fm-color-opacity-sm",
|
|
3159
3159
|
style: { backgroundColor: "#f9f9f9" }
|
|
3160
3160
|
}, _l = { class: "font-bold" }, Sl = { class: "text-fm-color-neutral-gray-300" }, kl = /* @__PURE__ */ Ae({
|