@feedmepos/mf-report 5.27.31 → 5.27.32
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-D48mbPTK.js} +4 -4
- package/dist/DateRangeSelect-Klc28Awr.js +517 -0
- package/dist/{Default.vue_vue_type_script_setup_true_lang-D3zGuz3X.js → Default.vue_vue_type_script_setup_true_lang-CbFm5_my.js} +1 -1
- package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-D-5nz30f.js → DynamicWidget.vue_vue_type_script_setup_true_lang-CbZDFekU.js} +4 -4
- package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DG4YsJj7.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-xArc-Jv2.js} +2931 -2846
- package/dist/{InsightView-Cf7JTtmP.js → InsightView-BGXvaD9D.js} +4 -4
- package/dist/{Integration-CmKHGXVP.js → Integration-CapTLXBo.js} +3 -3
- package/dist/{Integrations-Dp0WZL90.js → Integrations-mMK6rC3-.js} +2 -2
- package/dist/{Layout-D9-FsiHd.js → Layout-DfkFa1ZK.js} +1 -1
- package/dist/MenuTab.vue_vue_type_script_setup_true_lang-BBb4188M.js +155 -0
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-BsWMB078.js → NavigationTab.vue_vue_type_script_setup_true_lang-B5ed1phL.js} +3 -3
- package/dist/{OverviewView-B3c6PdFi.js → OverviewView-CCMxBAp9.js} +4 -4
- package/dist/{Report-DRiwSdrZ.js → Report-DYg7ooQL.js} +19 -19
- package/dist/{ReportEditor-8rQXKLq4.js → ReportEditor-fZjUiUwp.js} +6 -6
- package/dist/{ReportView-DC-FonPI.js → ReportView-DtueZsuk.js} +18 -18
- package/dist/{Setting-BIkL4RGA.js → Setting-C_iWaReS.js} +3 -3
- package/dist/{Template-DQ7AQxaZ.js → Template-DkTMSwZ6.js} +3 -3
- package/dist/{TileEditor-Th8qpMkS.js → TileEditor-B6_CEr66.js} +6 -6
- package/dist/{TileGrid.vue_vue_type_script_setup_true_lang-CIvXqWuw.js → TileGrid.vue_vue_type_script_setup_true_lang-ZUB0b8ue.js} +1 -1
- package/dist/{TransitionFade-U2R9SkgT.js → TransitionFade-C8sTXOWd.js} +4 -4
- package/dist/{app-BqleBdzW.js → app-_5FkIgk_.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-B4_666Wu.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
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.glassmorphism{background:linear-gradient(135deg,#fffffff5,#fffffff5);box-shadow:0 8px 24px #0f172a2e}.chart-legend-text[data-v-706fa016]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-706fa016]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-706fa016]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;max-width:100%;overflow:hidden;padding:0;width:calc(100% - var(--legend-panel-width, 0px));height:calc(100% - var(--legend-panel-height, 0px))}.circular .flex-col.gap-8{gap:0!important}.circular .fm-color-typo-primary:empty,.circular .fm-color-typo-secondary:empty{display:none}.circular .grow{height:100%}.sparkline{margin:0;padding:0}.sparkline .grow{height:50px;flex-grow:1;min-height:0}.sparkline-chart>div:not(.grow){display:none}.sparkline-chart canvas{display:block}.scrollbar-hide-table>div{
|
|
1
|
+
[data-v-e0ce1b3c] .report-date-access-disabled{color:var(--fm-color-typo-disabled, #a8a8a8);opacity:.45}[data-v-e0ce1b3c] .report-date-access-disabled .fm-calendar__cell__button{cursor:not-allowed;color:var(--fm-color-typo-disabled, #a8a8a8);text-decoration:line-through}.glassmorphism{background:linear-gradient(135deg,#fffffff5,#fffffff5);box-shadow:0 8px 24px #0f172a2e}.chart-legend-text[data-v-706fa016]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-706fa016]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-706fa016]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;max-width:100%;overflow:hidden;padding:0;width:calc(100% - var(--legend-panel-width, 0px));height:calc(100% - var(--legend-panel-height, 0px))}.circular .flex-col.gap-8{gap:0!important}.circular .fm-color-typo-primary:empty,.circular .fm-color-typo-secondary:empty{display:none}.circular .grow{height:100%}.sparkline{margin:0;padding:0}.sparkline .grow{height:50px;flex-grow:1;min-height:0}.sparkline-chart>div:not(.grow){display:none}.sparkline-chart canvas{display:block}.scrollbar-hide-table>div{scrollbar-width:thin}.bar-chart{flex:1 1 auto;min-height:0;min-width:0;max-width:100%;max-height:100%;overflow:hidden;padding:0;width:calc(100% - var(--legend-panel-width, 0px));height:calc(100% - var(--legend-panel-height, 0px))}.bar-chart .grow{height:100%}.bar-chart .flex-col{gap:0}.widget-content{display:flex;flex-direction:column;width:100%;height:100%;min-height:0}.chart-layout{display:flex;flex-direction:column;flex:1 1 auto;width:100%;min-height:0}.chart-layout--side{flex-direction:row;align-items:stretch;gap:0;min-height:0}.line-chart{flex:1 1 auto;min-height:0;min-width:0;max-width:100%;max-height:100%;overflow:hidden;margin:0;padding:8px 0 0;width:calc(100% - var(--legend-panel-width, 0px));height:calc(100% - var(--legend-panel-height, 0px))}.line-chart .grow{height:100%}.line-chart .flex-col{gap:0}.card-container[data-v-818eab25]{overflow-y:auto;overflow-x:hidden}.fm-progress-linear-custom span[data-v-2f6d52e6]{width:auto;height:100%;position:absolute;display:inline-block;top:0;left:0}.fm-progress-linear-custom span.dash-1[data-v-2f6d52e6]{left:-35%;animation:progress-linear-dash-1-2f6d52e6 2.1s cubic-bezier(.65,.815,.735,.395) infinite}.fm-progress-linear-custom span.dash-2[data-v-2f6d52e6]{left:100%;animation:progress-linear-dash-2-2f6d52e6 2.1s cubic-bezier(.165,.84,.44,1) 1.15s infinite}@keyframes progress-linear-dash-1-2f6d52e6{0%{left:-35%;right:100%}60%{left:100%;right:-90%}to{left:100%;right:-90%}}@keyframes progress-linear-dash-2-2f6d52e6{0%{left:-200%;right:100%}60%{left:107%;right:-8%}to{left:107%;right:-8%}}@keyframes shimmer-2f6d52e6{0%{transform:translate(-100%)}to{transform:translate(400%)}}.progress-bar-fill[data-v-2f6d52e6]{position:relative;overflow:hidden}.progress-bar-fill[data-v-2f6d52e6]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;width:50%;background:linear-gradient(90deg,transparent 0%,rgba(255,255,255,.12) 30%,rgba(255,255,255,.28) 50%,rgba(255,255,255,.12) 70%,transparent 100%);animation:shimmer-2f6d52e6 1.5s infinite linear}.show-pin{visibility:hidden}.row:hover .show-pin,.row:hover .show-actions{visibility:visible}.icon-btn{border-radius:100%}.overlay{background:#0006;position:absolute;top:0;left:0;height:100vh;width:100vw}.side-panel{position:fixed;right:0;top:0;height:100%;background:#fff}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease}.fade-enter-from,.fade-leave-to{opacity:0}.slide-enter-active,.slide-leave-active{transition:all .3s ease-out}.slide-enter-from,.slide-leave-to{transform:translate(100%)}.remove-line-clamping[data-v-a22ca746] .line-clamp-1,.remove-line-clamping[data-v-a22ca746] .line-clamp-2{display:block!important;-webkit-line-clamp:unset!important;line-clamp:unset!important;-webkit-box-orient:unset!important;overflow:visible!important;white-space:normal!important}.remove-line-clamping[data-v-a22ca746] .flex.flex-col.flex-grow{min-width:0}.remove-line-clamping[data-v-a22ca746] .cursor-pointer.flex.items-center.justify-center.relative{min-width:0;max-width:100%;overflow:hidden}.selected-widget[data-v-0535b07b]{background-color:#fff4e6;border-color:#ff7823}.slide-fade-enter-active[data-v-fa67a3a4],.slide-fade-leave-active[data-v-fa67a3a4]{transition:all .3s ease-in-out}.slide-fade-enter-from[data-v-fa67a3a4],.slide-fade-leave-to[data-v-fa67a3a4]{transform:translateY(-50px);opacity:0}.slide-fade-right-enter-active[data-v-a98ca9bc],.slide-fade-right-leave-active[data-v-a98ca9bc]{transition:all .3s ease-in-out}.slide-fade-right-enter-from[data-v-a98ca9bc],.slide-fade-right-leave-to[data-v-a98ca9bc]{position:absolute;transform:translate(-50px);opacity:.4}.slide-fade-left-enter-active[data-v-a98ca9bc]{transition-delay:.3s;transition:all .3s ease-in-out}.slide-fade-left-leave-active[data-v-a98ca9bc]{transition:all .3s ease-in-out}.slide-fade-left-enter-from[data-v-a98ca9bc],.slide-fade-left-leave-to[data-v-a98ca9bc]{position:absolute;transform:translate(-50px);opacity:.1}.legend-color-input[data-v-0e072961]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:40px;height:24px;border:0;background:transparent;padding:0}.legend-color-input[data-v-0e072961]::-webkit-color-swatch-wrapper{padding:0}.legend-color-input[data-v-0e072961]::-webkit-color-swatch{border:1px solid rgb(var(--fm-color-neutral-gray-200));border-radius:4px}.legend-color-input[data-v-0e072961]::-moz-color-swatch{border:1px solid rgb(var(--fm-color-neutral-gray-200));border-radius:4px}.line-style-icon[data-v-f1c35513]{width:28px;border-top:2px solid currentColor;color:rgb(var(--fm-color-neutral-gray-300));flex-shrink:0}.line-style-icon--solid[data-v-f1c35513]{border-top-style:solid}.line-style-icon--dashed[data-v-f1c35513]{border-top-style:dashed}.line-style-icon--dotted[data-v-f1c35513]{border-top-style:dotted}.fm-top-sheet{height:100%}.integration-card[data-v-60c3aea9]{height:140px;width:140px;padding:0}.integration-card .logo-card[data-v-60c3aea9]{width:100%;padding:24px;background:#fff}.integration-card .title-card[data-v-60c3aea9]{height:36px;color:#fff}@keyframes project-mapping-highlight-a58dc5da{0%{box-shadow:0 0 0 0 transparent;border-color:transparent}20%{box-shadow:0 0 0 2px var(--fm-color-primary);border-color:var(--fm-color-primary)}35%{box-shadow:0 0 0 0 transparent;border-color:transparent}50%{box-shadow:0 0 0 2px var(--fm-color-primary);border-color:var(--fm-color-primary)}65%{box-shadow:0 0 0 0 transparent;border-color:transparent}70%{box-shadow:0 0 0 2px var(--fm-color-primary);border-color:var(--fm-color-primary)}to{box-shadow:0 0 0 0 transparent;border-color:transparent}}.animate-project-mapping-highlight[data-v-a58dc5da]{animation:project-mapping-highlight-a58dc5da 1.4s ease-out;border:1px solid transparent}.ap-project-shared-field[data-v-a58dc5da] .inline-flex>div:last-child{text-decoration:underline}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}
|
|
@@ -2,7 +2,7 @@ import { computed as u } from "vue";
|
|
|
2
2
|
import { u as c } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
3
3
|
import { useSnackbar as f } from "@feedmepos/ui-library";
|
|
4
4
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
5
|
-
import {
|
|
5
|
+
import { Y as l, Z as i } from "./app-_5FkIgk_.js";
|
|
6
6
|
function g(t) {
|
|
7
7
|
return Array.isArray(t) ? t : [];
|
|
8
8
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-report",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.32",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"@feedmepos/custom-attributes": "0.0.0-rc.6",
|
|
19
19
|
"@feedmepos/feature-flag": "^0.0.15",
|
|
20
20
|
"@feedmepos/mf-common": "1.29.19",
|
|
21
|
-
"@feedmepos/ui-library": "1.10.
|
|
22
|
-
"@feedmepos/hrm-permission": "1.0.
|
|
21
|
+
"@feedmepos/ui-library": "1.10.10",
|
|
22
|
+
"@feedmepos/hrm-permission": "1.0.15-beta.0",
|
|
23
23
|
"axios": "^1.6.7",
|
|
24
24
|
"change-case": "^5.4.3",
|
|
25
25
|
"chart.js": "^4.4.2",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"tailwindcss": "^3.4.1",
|
|
57
57
|
"typescript": "~5.2.2",
|
|
58
58
|
"vite": "^5.1.6",
|
|
59
|
+
"vitest": "^2.1.8",
|
|
59
60
|
"vue-tsc": "^1.8.11"
|
|
60
61
|
},
|
|
61
62
|
"scripts": {
|
|
@@ -73,6 +74,7 @@
|
|
|
73
74
|
"build:web:prod": "vite build --mode fmmf:web:prod",
|
|
74
75
|
"build:pkg:dev": "vite build --mode fmmf:pkg:dev",
|
|
75
76
|
"build:pkg:prod": "vite build --mode fmmf:pkg:prod",
|
|
77
|
+
"test": "vitest run",
|
|
76
78
|
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
|
|
77
79
|
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
|
78
80
|
"format": "prettier --write src/"
|
|
@@ -1,391 +0,0 @@
|
|
|
1
|
-
import { defineComponent as N, resolveComponent as x, createBlock as v, openBlock as h, normalizeClass as q, withCtx as E, createCommentVNode as R, createElementVNode as M, toDisplayString as G, renderSlot as H, mergeModels as I, useModel as P, ref as L, watch as F, computed as K, createElementBlock as J, unref as p, createVNode as A } from "vue";
|
|
2
|
-
import { d as f, a as Q, C as w, V as Z } from "./app-BqleBdzW.js";
|
|
3
|
-
import { detectLocale as k } from "@feedmepos/mf-common";
|
|
4
|
-
import { u as ee } from "./_plugin-vue_export-helper-onplcgja.js";
|
|
5
|
-
import { storeToRefs as ae } from "pinia";
|
|
6
|
-
const te = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), re = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), ne = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), le = /[^\p{L}\d]+/giu, z = "$1\0$2", O = "";
|
|
7
|
-
function V(a) {
|
|
8
|
-
let e = a.trim();
|
|
9
|
-
e = e.replace(te, z).replace(re, z), e = e.replace(le, "\0");
|
|
10
|
-
let t = 0, r = e.length;
|
|
11
|
-
for (; e.charAt(t) === "\0"; )
|
|
12
|
-
t++;
|
|
13
|
-
if (t === r)
|
|
14
|
-
return [];
|
|
15
|
-
for (; e.charAt(r - 1) === "\0"; )
|
|
16
|
-
r--;
|
|
17
|
-
return e.slice(t, r).split(/\0/g);
|
|
18
|
-
}
|
|
19
|
-
function ce(a) {
|
|
20
|
-
const e = V(a);
|
|
21
|
-
for (let t = 0; t < e.length; t++) {
|
|
22
|
-
const r = e[t], n = ne.exec(r);
|
|
23
|
-
if (n) {
|
|
24
|
-
const c = n.index + (n[1] ?? n[2]).length;
|
|
25
|
-
e.splice(t, 1, r.slice(0, c), r.slice(c));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return e;
|
|
29
|
-
}
|
|
30
|
-
function ve(a, e) {
|
|
31
|
-
const [t, r, n] = T(a, e), c = $(e == null ? void 0 : e.locale), s = S(e == null ? void 0 : e.locale), l = e != null && e.mergeAmbiguousCharacters ? b(c, s) : W(c, s);
|
|
32
|
-
return t + r.map((d, u) => u === 0 ? c(d) : l(d, u)).join((e == null ? void 0 : e.delimiter) ?? "") + n;
|
|
33
|
-
}
|
|
34
|
-
function pe(a, e) {
|
|
35
|
-
const [t, r, n] = T(a, e), c = $(e == null ? void 0 : e.locale), s = S(e == null ? void 0 : e.locale), l = e != null && e.mergeAmbiguousCharacters ? b(c, s) : W(c, s);
|
|
36
|
-
return t + r.map(l).join((e == null ? void 0 : e.delimiter) ?? "") + n;
|
|
37
|
-
}
|
|
38
|
-
function Ce(a, e) {
|
|
39
|
-
const [t, r, n] = T(a, e), c = $(e == null ? void 0 : e.locale), s = S(e == null ? void 0 : e.locale);
|
|
40
|
-
return t + r.map(b(c, s)).join((e == null ? void 0 : e.delimiter) ?? " ") + n;
|
|
41
|
-
}
|
|
42
|
-
function xe(a, e) {
|
|
43
|
-
const [t, r, n] = T(a, e), c = $(e == null ? void 0 : e.locale), s = S(e == null ? void 0 : e.locale), l = b(c, s);
|
|
44
|
-
return t + r.map((d, u) => u === 0 ? l(d) : c(d)).join((e == null ? void 0 : e.delimiter) ?? " ") + n;
|
|
45
|
-
}
|
|
46
|
-
function $(a) {
|
|
47
|
-
return a === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(a);
|
|
48
|
-
}
|
|
49
|
-
function S(a) {
|
|
50
|
-
return a === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(a);
|
|
51
|
-
}
|
|
52
|
-
function b(a, e) {
|
|
53
|
-
return (t) => `${e(t[0])}${a(t.slice(1))}`;
|
|
54
|
-
}
|
|
55
|
-
function W(a, e) {
|
|
56
|
-
return (t, r) => {
|
|
57
|
-
const n = t[0];
|
|
58
|
-
return (r > 0 && n >= "0" && n <= "9" ? "_" + n : e(n)) + a(t.slice(1));
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function T(a, e = {}) {
|
|
62
|
-
const t = e.split ?? (e.separateNumbers ? ce : V), r = e.prefixCharacters ?? O, n = e.suffixCharacters ?? O;
|
|
63
|
-
let c = 0, s = a.length;
|
|
64
|
-
for (; c < a.length; ) {
|
|
65
|
-
const l = a.charAt(c);
|
|
66
|
-
if (!r.includes(l))
|
|
67
|
-
break;
|
|
68
|
-
c++;
|
|
69
|
-
}
|
|
70
|
-
for (; s > c; ) {
|
|
71
|
-
const l = s - 1, d = a.charAt(l);
|
|
72
|
-
if (!n.includes(d))
|
|
73
|
-
break;
|
|
74
|
-
s = l;
|
|
75
|
-
}
|
|
76
|
-
return [
|
|
77
|
-
a.slice(0, c),
|
|
78
|
-
t(a.slice(c, s)),
|
|
79
|
-
a.slice(s)
|
|
80
|
-
];
|
|
81
|
-
}
|
|
82
|
-
var C = /* @__PURE__ */ ((a) => (a.Year = "YEAR", a.Month = "MONTH", a.Week = "WEEK", a.Day = "DAY", a))(C || {}), se = /* @__PURE__ */ ((a) => (a.Yesterday = "YESTERDAY", a.Today = "TODAY", a))(se || {});
|
|
83
|
-
function Re(a, e = 100) {
|
|
84
|
-
let t = null;
|
|
85
|
-
const r = function(...n) {
|
|
86
|
-
return t && clearTimeout(t), new Promise((c) => {
|
|
87
|
-
t = setTimeout(() => {
|
|
88
|
-
t = null;
|
|
89
|
-
const s = a(...n);
|
|
90
|
-
c(s);
|
|
91
|
-
}, e);
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
return r.cancel = () => {
|
|
95
|
-
t && (clearTimeout(t), t = null);
|
|
96
|
-
}, r;
|
|
97
|
-
}
|
|
98
|
-
function ue() {
|
|
99
|
-
return [...Array(12).keys()].map((a) => f().month(a).format("MMM"));
|
|
100
|
-
}
|
|
101
|
-
function $e(a, e, t = "") {
|
|
102
|
-
const r = (l) => /^[\x00-\x7F]*$/.test(l) ? " " : "", n = (l) => /^每年/.test(l), c = (l) => /^每周|^每週/.test(l), s = (l) => /^每月/.test(l);
|
|
103
|
-
switch (a.type) {
|
|
104
|
-
case C.Day:
|
|
105
|
-
return e("report.schedule.everyDay");
|
|
106
|
-
case C.Week: {
|
|
107
|
-
const l = e("report.schedule.everyWeek"), d = c(l);
|
|
108
|
-
let u = `${l}${r(l)}`;
|
|
109
|
-
const o = [
|
|
110
|
-
e("report.days.sunday"),
|
|
111
|
-
e("report.days.monday"),
|
|
112
|
-
e("report.days.tuesday"),
|
|
113
|
-
e("report.days.wednesday"),
|
|
114
|
-
e("report.days.thursday"),
|
|
115
|
-
e("report.days.friday"),
|
|
116
|
-
e("report.days.saturday")
|
|
117
|
-
];
|
|
118
|
-
if (a.days)
|
|
119
|
-
for (let i = 0; i < a.days.length; i++) {
|
|
120
|
-
const Y = d ? o[a.days[i]].replace(/^[周週]/, "") : o[a.days[i]];
|
|
121
|
-
u = u + Y + (i !== a.days.length - 1 ? "," : "");
|
|
122
|
-
}
|
|
123
|
-
return u;
|
|
124
|
-
}
|
|
125
|
-
case C.Month: {
|
|
126
|
-
const l = e("report.schedule.everyMonth"), d = s(l);
|
|
127
|
-
let u = `${l}${r(l)}`;
|
|
128
|
-
return a.days && (u = u + (d ? a.days.map((o) => `${o}日`).join(",") : a.days.join(","))), u;
|
|
129
|
-
}
|
|
130
|
-
case C.Year: {
|
|
131
|
-
if (!a.months && !a.days)
|
|
132
|
-
return e("report.schedule.customDate");
|
|
133
|
-
const l = e("report.schedule.everyYear"), d = n(l);
|
|
134
|
-
let u = `${l}${d ? " " : r(l)}`;
|
|
135
|
-
if (a.months) {
|
|
136
|
-
const o = ue();
|
|
137
|
-
u = u + a.months.map((i) => o[i - 1]).join(",");
|
|
138
|
-
}
|
|
139
|
-
return a.months && a.days && (u = d ? `${u} 的 ` : `${u} ${e("report.common.and")} `), a.days && (u = u + (d ? a.days.map((o) => `${o}日`).join(",") : a.days.join(","))), u;
|
|
140
|
-
}
|
|
141
|
-
default:
|
|
142
|
-
return t;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
function _(a = {
|
|
146
|
-
startDate: null,
|
|
147
|
-
endDate: null,
|
|
148
|
-
locale: "en-US",
|
|
149
|
-
timezone: void 0
|
|
150
|
-
}) {
|
|
151
|
-
if (!a.startDate || !a.endDate)
|
|
152
|
-
return "No comparison";
|
|
153
|
-
let e = f().subtract(1, "day").endOf("day"), t = f().endOf("day");
|
|
154
|
-
return a.startDate && (e = a.timezone ? f(a.startDate).tz(a.timezone).locale(a.locale) : f(a.startDate).locale(a.locale)), a.endDate && (t = a.timezone ? f(a.endDate).tz(a.timezone).locale(a.locale) : f(a.endDate).locale(a.locale)), e.format("YYYY") !== t.format("YYYY") ? `${e.format("DD MMM YYYY")} - ${t.format("DD MMM YYYY")}` : `${e.format("DD MMM")} - ${t.format("DD MMM YYYY")}`;
|
|
155
|
-
}
|
|
156
|
-
function Se(a = {
|
|
157
|
-
startTime: null,
|
|
158
|
-
endTime: null,
|
|
159
|
-
locale: "en-US"
|
|
160
|
-
}) {
|
|
161
|
-
const e = "hh:mmA", { startTime: t, endTime: r, locale: n } = a;
|
|
162
|
-
if (!t || !r) return "";
|
|
163
|
-
const c = f().set("hour", t.hour).set("minute", t.minute).locale(n), s = f().set("hour", r.hour).set("minute", r.minute).locale(n);
|
|
164
|
-
return `${c.format(e)}-${s.format(e)}`;
|
|
165
|
-
}
|
|
166
|
-
const de = { class: "fm-typo-en-body-md-600 flex items-center gap-1 flex-1 min-w-0" }, oe = { class: "text-ellipsis overflow-hidden whitespace-nowrap flex-1 min-w-0" }, me = { class: "whitespace-nowrap flex-none" }, U = /* @__PURE__ */ N({
|
|
167
|
-
__name: "FilterChip",
|
|
168
|
-
props: {
|
|
169
|
-
label: {
|
|
170
|
-
type: String,
|
|
171
|
-
default: ""
|
|
172
|
-
},
|
|
173
|
-
leftIcon: {
|
|
174
|
-
type: String,
|
|
175
|
-
default: ""
|
|
176
|
-
},
|
|
177
|
-
rightIcon: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: ""
|
|
180
|
-
},
|
|
181
|
-
trailingIcon: {
|
|
182
|
-
type: String,
|
|
183
|
-
default: ""
|
|
184
|
-
},
|
|
185
|
-
loading: {
|
|
186
|
-
type: Boolean,
|
|
187
|
-
default: !1
|
|
188
|
-
}
|
|
189
|
-
},
|
|
190
|
-
setup(a) {
|
|
191
|
-
const e = a;
|
|
192
|
-
return (t, r) => {
|
|
193
|
-
const n = x("FmIcon"), c = x("FmCircularProgress"), s = x("FmChip");
|
|
194
|
-
return h(), v(s, {
|
|
195
|
-
"aria-busy": e.loading,
|
|
196
|
-
class: q([
|
|
197
|
-
"bg-fm-color-neutral-gray-100 text-fm-color-neutral-gray-400 max-w-[400px] flex items-center gap-1 transition-opacity",
|
|
198
|
-
e.loading && "opacity-80"
|
|
199
|
-
])
|
|
200
|
-
}, {
|
|
201
|
-
default: E(() => [
|
|
202
|
-
a.leftIcon ? (h(), v(n, {
|
|
203
|
-
key: 0,
|
|
204
|
-
name: e.leftIcon,
|
|
205
|
-
size: "sm",
|
|
206
|
-
outline: "",
|
|
207
|
-
class: "flex-none"
|
|
208
|
-
}, null, 8, ["name"])) : R("", !0),
|
|
209
|
-
M("div", de, [
|
|
210
|
-
M("span", oe, G(e.label), 1),
|
|
211
|
-
a.rightIcon ? (h(), v(n, {
|
|
212
|
-
key: 0,
|
|
213
|
-
name: a.rightIcon,
|
|
214
|
-
size: "sm",
|
|
215
|
-
outline: "",
|
|
216
|
-
class: "flex-none"
|
|
217
|
-
}, null, 8, ["name"])) : R("", !0),
|
|
218
|
-
M("span", me, [
|
|
219
|
-
H(t.$slots, "default")
|
|
220
|
-
]),
|
|
221
|
-
e.loading ? (h(), v(c, {
|
|
222
|
-
key: 1,
|
|
223
|
-
size: "md",
|
|
224
|
-
class: "flex-none scale-75"
|
|
225
|
-
})) : a.trailingIcon ? (h(), v(n, {
|
|
226
|
-
key: 2,
|
|
227
|
-
name: a.trailingIcon,
|
|
228
|
-
size: "sm",
|
|
229
|
-
outline: "",
|
|
230
|
-
class: "flex-none"
|
|
231
|
-
}, null, 8, ["name"])) : R("", !0)
|
|
232
|
-
])
|
|
233
|
-
]),
|
|
234
|
-
_: 3
|
|
235
|
-
}, 8, ["aria-busy", "class"]);
|
|
236
|
-
};
|
|
237
|
-
}
|
|
238
|
-
}), fe = { class: "flex gap-2 items-center" }, j = "YYYY-MM-DD", be = /* @__PURE__ */ N({
|
|
239
|
-
__name: "DateRangeSelect",
|
|
240
|
-
props: /* @__PURE__ */ I({
|
|
241
|
-
compare: {
|
|
242
|
-
type: Boolean,
|
|
243
|
-
default: !1
|
|
244
|
-
},
|
|
245
|
-
datePredefinedRanges: {
|
|
246
|
-
type: Array,
|
|
247
|
-
default: () => Z()
|
|
248
|
-
},
|
|
249
|
-
label: {
|
|
250
|
-
type: String,
|
|
251
|
-
required: !1,
|
|
252
|
-
default: null
|
|
253
|
-
},
|
|
254
|
-
removable: {
|
|
255
|
-
type: Boolean,
|
|
256
|
-
required: !1,
|
|
257
|
-
default: !1
|
|
258
|
-
}
|
|
259
|
-
}, {
|
|
260
|
-
compareType: {
|
|
261
|
-
type: String,
|
|
262
|
-
default: w.PRECEDING_PERIOD
|
|
263
|
-
},
|
|
264
|
-
compareTypeModifiers: {},
|
|
265
|
-
dateRange: {
|
|
266
|
-
type: Object,
|
|
267
|
-
default: () => ({
|
|
268
|
-
startDate: void 0,
|
|
269
|
-
endDate: void 0
|
|
270
|
-
})
|
|
271
|
-
},
|
|
272
|
-
dateRangeModifiers: {},
|
|
273
|
-
compareDateRange: {
|
|
274
|
-
type: Object,
|
|
275
|
-
default: () => ({
|
|
276
|
-
startDate: void 0,
|
|
277
|
-
endDate: void 0
|
|
278
|
-
})
|
|
279
|
-
},
|
|
280
|
-
compareDateRangeModifiers: {}
|
|
281
|
-
}),
|
|
282
|
-
emits: /* @__PURE__ */ I(["update", "chip-closed"], ["update:compareType", "update:dateRange", "update:compareDateRange"]),
|
|
283
|
-
setup(a, { emit: e }) {
|
|
284
|
-
const { t, locale: r } = ee();
|
|
285
|
-
function n(m) {
|
|
286
|
-
return m ? m.includes("T") ? f(m).tz(u.value).format(j) : f(m).format(j) : null;
|
|
287
|
-
}
|
|
288
|
-
const c = e, s = P(a, "compareType"), l = P(a, "dateRange"), d = P(a, "compareDateRange"), { timezone: u } = ae(Q()), o = L({
|
|
289
|
-
startDate: n(l.value.startDate),
|
|
290
|
-
endDate: n(l.value.endDate)
|
|
291
|
-
}), i = L({
|
|
292
|
-
startDate: d.value.startDate ? n(d.value.startDate) : null,
|
|
293
|
-
endDate: d.value.endDate ? n(d.value.endDate) : null
|
|
294
|
-
});
|
|
295
|
-
F(
|
|
296
|
-
[() => o.value],
|
|
297
|
-
() => {
|
|
298
|
-
o.value.endDate || (o.value.endDate = o.value.startDate);
|
|
299
|
-
const m = {
|
|
300
|
-
startDate: f.tz(o.value.startDate, u.value).startOf("day").utc().toISOString(),
|
|
301
|
-
endDate: f.tz(o.value.endDate, u.value).endOf("day").utc().toISOString()
|
|
302
|
-
};
|
|
303
|
-
l.value = m, c("update", m);
|
|
304
|
-
},
|
|
305
|
-
{ deep: !0 }
|
|
306
|
-
), F([() => i.value], () => {
|
|
307
|
-
const m = i.value.startDate, y = i.value.endDate, g = m ? f(
|
|
308
|
-
m instanceof Date ? m : f(m).toDate()
|
|
309
|
-
).startOf("day").tz(u.value, !0).toISOString() : void 0, D = y ? f(y instanceof Date ? y : f(y).toDate()).tz(u.value, !0).endOf("day").toISOString() : void 0;
|
|
310
|
-
d.value = {
|
|
311
|
-
startDate: g,
|
|
312
|
-
endDate: D
|
|
313
|
-
};
|
|
314
|
-
});
|
|
315
|
-
function Y(m) {
|
|
316
|
-
s.value = m;
|
|
317
|
-
}
|
|
318
|
-
function B(m) {
|
|
319
|
-
c("chip-closed", m);
|
|
320
|
-
}
|
|
321
|
-
const X = K(() => {
|
|
322
|
-
const m = k(), y = m.startsWith("zh") ? "" : " ", g = t("report.common.comparedTo"), D = _({
|
|
323
|
-
startDate: i.value.startDate ?? null,
|
|
324
|
-
endDate: i.value.endDate ?? null,
|
|
325
|
-
locale: m
|
|
326
|
-
});
|
|
327
|
-
return s.value === w.NO_COMPARISON ? `${g}: ${t(`report.compare.${s.value}`)}` : s.value === w.CUSTOM ? `${g}: ${D}` : `${g}${y}${t(`report.compare.${s.value}`).toLowerCase()}: ${D}`;
|
|
328
|
-
});
|
|
329
|
-
return (m, y) => {
|
|
330
|
-
const g = x("FmSimpleDateRangePicker");
|
|
331
|
-
return h(), J("div", fe, [
|
|
332
|
-
(h(), v(g, {
|
|
333
|
-
key: `date-picker-${p(r)}`,
|
|
334
|
-
modelValue: o.value,
|
|
335
|
-
"onUpdate:modelValue": y[1] || (y[1] = (D) => o.value = D),
|
|
336
|
-
"show-predefined-range": "",
|
|
337
|
-
"predefined-range": a.datePredefinedRanges.map((D) => ({
|
|
338
|
-
...D,
|
|
339
|
-
label: p(t)(`report.date.${D.label}`)
|
|
340
|
-
})),
|
|
341
|
-
class: "w-2/6"
|
|
342
|
-
}, {
|
|
343
|
-
"trigger-button": E(() => [
|
|
344
|
-
A(U, {
|
|
345
|
-
"left-icon": a.label ? "filter_alt" : "calendar_month",
|
|
346
|
-
label: a.label ?? p(_)({
|
|
347
|
-
startDate: o.value.startDate ?? "",
|
|
348
|
-
endDate: o.value.endDate ?? "",
|
|
349
|
-
locale: p(k)()
|
|
350
|
-
}),
|
|
351
|
-
removable: a.removable,
|
|
352
|
-
onChipClosed: y[0] || (y[0] = (D) => B(!0))
|
|
353
|
-
}, null, 8, ["left-icon", "label", "removable"])
|
|
354
|
-
]),
|
|
355
|
-
_: 1
|
|
356
|
-
}, 8, ["modelValue", "predefined-range"])),
|
|
357
|
-
a.compare ? (h(), v(g, {
|
|
358
|
-
key: `compare-date-picker-${p(r)}`,
|
|
359
|
-
modelValue: i.value,
|
|
360
|
-
"onUpdate:modelValue": y[2] || (y[2] = (D) => i.value = D),
|
|
361
|
-
"compare-type": s.value,
|
|
362
|
-
"onUpdate:compareType": y[3] || (y[3] = (D) => s.value = D),
|
|
363
|
-
"show-predefined-range": "",
|
|
364
|
-
"compare-target": o.value,
|
|
365
|
-
"default-compare-type": s.value,
|
|
366
|
-
onSelectComparison: Y
|
|
367
|
-
}, {
|
|
368
|
-
"trigger-button": E(() => [
|
|
369
|
-
A(U, { label: X.value }, null, 8, ["label"])
|
|
370
|
-
]),
|
|
371
|
-
_: 1
|
|
372
|
-
}, 8, ["modelValue", "compare-type", "compare-target", "default-compare-type"])) : R("", !0)
|
|
373
|
-
]);
|
|
374
|
-
};
|
|
375
|
-
}
|
|
376
|
-
});
|
|
377
|
-
export {
|
|
378
|
-
C,
|
|
379
|
-
be as _,
|
|
380
|
-
ve as a,
|
|
381
|
-
se as b,
|
|
382
|
-
Ce as c,
|
|
383
|
-
Re as d,
|
|
384
|
-
$e as e,
|
|
385
|
-
U as f,
|
|
386
|
-
ue as g,
|
|
387
|
-
Se as h,
|
|
388
|
-
_ as i,
|
|
389
|
-
pe as p,
|
|
390
|
-
xe as s
|
|
391
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { defineComponent as M, computed as V, watch as S, createElementBlock as k, openBlock as r, createElementVNode as C, createVNode as s, unref as t, isRef as d, withCtx as y, useModel as U, resolveComponent as _, normalizeClass as $, createBlock as F, createCommentVNode as I, Fragment as N, renderList as z, toDisplayString as A } from "vue";
|
|
2
|
-
import { a as E } from "./app-BqleBdzW.js";
|
|
3
|
-
import { storeToRefs as R } from "pinia";
|
|
4
|
-
import { a as L } from "./NavigationTab.vue_vue_type_script_setup_true_lang-BsWMB078.js";
|
|
5
|
-
import { _ as O } from "./DateRangeSelect.vue_vue_type_script_setup_true_lang-X6REOqng.js";
|
|
6
|
-
import { u as q, b as G, _ as j, c as H } from "./GlobalFilterSelect.vue_vue_type_script_setup_true_lang-DG4YsJj7.js";
|
|
7
|
-
import { useRoute as J } from "vue-router";
|
|
8
|
-
import { useBreakpoints as K } from "@feedmepos/ui-library";
|
|
9
|
-
const P = { class: "flex flex-col gap-2 overflow-x-auto overflow-y-hidden scrollbar-hide" }, Q = { class: "flex flex-col gap-2 py-2" }, W = /* @__PURE__ */ M({
|
|
10
|
-
__name: "Filter",
|
|
11
|
-
setup(w) {
|
|
12
|
-
const {
|
|
13
|
-
locations: c,
|
|
14
|
-
selectedLocationIds: a,
|
|
15
|
-
dateRange: f,
|
|
16
|
-
compareDateRange: l,
|
|
17
|
-
timeRange: m,
|
|
18
|
-
defaultDateSetting: u,
|
|
19
|
-
selectTimeDefault: i
|
|
20
|
-
} = R(E()), b = J(), n = V(() => b.name === "overview"), x = q(), { currentReport: T, overviewReport: B } = R(x), { globalFilters: D } = R(G()), v = V(
|
|
21
|
-
() => n.value ? B.value : T.value
|
|
22
|
-
);
|
|
23
|
-
return S(
|
|
24
|
-
() => {
|
|
25
|
-
var p, e;
|
|
26
|
-
return {
|
|
27
|
-
reportId: (p = v.value) == null ? void 0 : p.id,
|
|
28
|
-
filters: (e = v.value) == null ? void 0 : e.globalFilters
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
({ filters: p }) => {
|
|
32
|
-
D.value = (p ?? []).map((e) => ({
|
|
33
|
-
...e,
|
|
34
|
-
values: Array.isArray(e.values) ? [...e.values] : []
|
|
35
|
-
}));
|
|
36
|
-
},
|
|
37
|
-
{ deep: !0, immediate: !0 }
|
|
38
|
-
), (p, e) => (r(), k("div", P, [
|
|
39
|
-
C("div", Q, [
|
|
40
|
-
s(L, {
|
|
41
|
-
modelValue: t(a),
|
|
42
|
-
"onUpdate:modelValue": e[5] || (e[5] = (g) => d(a) ? a.value = g : null),
|
|
43
|
-
options: t(c)
|
|
44
|
-
}, {
|
|
45
|
-
default: y(() => {
|
|
46
|
-
var g;
|
|
47
|
-
return [
|
|
48
|
-
s(O, {
|
|
49
|
-
"date-range": t(f),
|
|
50
|
-
"onUpdate:dateRange": e[0] || (e[0] = (o) => d(f) ? f.value = o : null),
|
|
51
|
-
"compare-date-range": t(l),
|
|
52
|
-
"onUpdate:compareDateRange": e[1] || (e[1] = (o) => d(l) ? l.value = o : null),
|
|
53
|
-
"compare-type": t(u).defaultCompareType,
|
|
54
|
-
"onUpdate:compareType": e[2] || (e[2] = (o) => t(u).defaultCompareType = o),
|
|
55
|
-
compare: ""
|
|
56
|
-
}, null, 8, ["date-range", "compare-date-range", "compare-type"]),
|
|
57
|
-
s(j, {
|
|
58
|
-
"time-range": t(m),
|
|
59
|
-
"onUpdate:timeRange": e[3] || (e[3] = (o) => d(m) ? m.value = o : null),
|
|
60
|
-
"select-time-default": t(i),
|
|
61
|
-
"onUpdate:selectTimeDefault": e[4] || (e[4] = (o) => d(i) ? i.value = o : null),
|
|
62
|
-
"default-date-range": t(u).timeOptions
|
|
63
|
-
}, null, 8, ["time-range", "select-time-default", "default-date-range"]),
|
|
64
|
-
s(H, {
|
|
65
|
-
"global-filter-id": (g = v.value) == null ? void 0 : g.id,
|
|
66
|
-
report: v.value
|
|
67
|
-
}, null, 8, ["global-filter-id", "report"])
|
|
68
|
-
];
|
|
69
|
-
}),
|
|
70
|
-
_: 1
|
|
71
|
-
}, 8, ["modelValue", "options"])
|
|
72
|
-
])
|
|
73
|
-
]));
|
|
74
|
-
}
|
|
75
|
-
}), X = { class: "fm-typo-en-body-md-400" }, ne = /* @__PURE__ */ M({
|
|
76
|
-
__name: "MenuTab",
|
|
77
|
-
props: {
|
|
78
|
-
modelValue: { required: !1, default: [] },
|
|
79
|
-
modelModifiers: {}
|
|
80
|
-
},
|
|
81
|
-
emits: ["update:modelValue"],
|
|
82
|
-
setup(w) {
|
|
83
|
-
const c = U(w, "modelValue"), { breakpoints: a } = K();
|
|
84
|
-
return (f, l) => {
|
|
85
|
-
const m = _("FmButton"), u = _("FmIcon"), i = _("FmMenuItem"), b = _("FmMenu");
|
|
86
|
-
return r(), k("div", {
|
|
87
|
-
"data-menu-tab": "true",
|
|
88
|
-
class: $(["flex items-start pb-2 px-24", `${t(a).lg || t(a).md ? "px-24" : "pl-3"}`])
|
|
89
|
-
}, [
|
|
90
|
-
s(W),
|
|
91
|
-
l[0] || (l[0] = C("div", { class: "flex grow" }, null, -1)),
|
|
92
|
-
c.value.length > 0 ? (r(), F(b, {
|
|
93
|
-
key: 0,
|
|
94
|
-
trigger: "click",
|
|
95
|
-
placement: "left",
|
|
96
|
-
shift: !0,
|
|
97
|
-
class: $(t(a).sm || t(a).xs ? "pr-3" : "")
|
|
98
|
-
}, {
|
|
99
|
-
"menu-button": y(() => [
|
|
100
|
-
s(m, {
|
|
101
|
-
"append-icon": "more_vert",
|
|
102
|
-
variant: "tertiary",
|
|
103
|
-
size: "md",
|
|
104
|
-
class: "w-[36px] bg-none"
|
|
105
|
-
})
|
|
106
|
-
]),
|
|
107
|
-
default: y(() => [
|
|
108
|
-
(r(!0), k(N, null, z(c.value, (n, x) => (r(), F(i, {
|
|
109
|
-
key: `button-${x}`,
|
|
110
|
-
onClick: n.onClick
|
|
111
|
-
}, {
|
|
112
|
-
label: y(() => [
|
|
113
|
-
n.prependIcon ?? !1 ? (r(), F(u, {
|
|
114
|
-
key: 0,
|
|
115
|
-
name: n.icon
|
|
116
|
-
}, null, 8, ["name"])) : I("", !0),
|
|
117
|
-
C("p", X, A(n.label), 1)
|
|
118
|
-
]),
|
|
119
|
-
_: 2
|
|
120
|
-
}, 1032, ["onClick"]))), 128))
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["class"])) : I("", !0)
|
|
124
|
-
], 2);
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
export {
|
|
129
|
-
ne as _
|
|
130
|
-
};
|