@feedmepos/mf-report 5.22.13-beta.1 → 5.22.14-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-Cwppqefm.js +294 -0
- package/dist/{BaseDialog.vue_vue_type_script_setup_true_lang-CzbeFyTt.js → BaseDialog.vue_vue_type_script_setup_true_lang-CcKWqqNP.js} +471 -464
- package/dist/{DateRangeSelect.vue_vue_type_script_setup_true_lang-B06jDFgJ.js → DateRangeSelect.vue_vue_type_script_setup_true_lang-CryPHoYr.js} +2 -2
- package/dist/{Default.vue_vue_type_script_setup_true_lang-BTCBYTaC.js → Default.vue_vue_type_script_setup_true_lang-DU3zkEF1.js} +2 -2
- package/dist/{FilterSelector.vue_vue_type_script_setup_true_lang-Ccr5PmzE.js → FilterSelector.vue_vue_type_script_setup_true_lang-CyW-5xr4.js} +7 -7
- package/dist/{InsightView-C0TwLCJv.js → InsightView-DAnaBH3D.js} +6 -6
- package/dist/{Integration-BFEaM0Wz.js → Integration-DiNs52W5.js} +5 -5
- package/dist/{Integrations-CG-ygqKI.js → Integrations-BvgLRF5N.js} +5 -5
- package/dist/{Layout-D6kcGEx6.js → Layout-BAYV4nCo.js} +1 -1
- package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-D3EZc4Vp.js → MenuTab.vue_vue_type_script_setup_true_lang-BZphMQGv.js} +5 -5
- package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-CpMCe0cN.js → NavigationTab.vue_vue_type_script_setup_true_lang-DSTG-gQ3.js} +5 -5
- package/dist/{NoData.vue_vue_type_script_setup_true_lang-DdX25Qgn.js → NoData.vue_vue_type_script_setup_true_lang-zS79GrjC.js} +1 -1
- package/dist/{OverviewView-ATC5S46N.js → OverviewView-CvRMdLbB.js} +5 -5
- package/dist/{Report-CVNA4oKn.js → Report-C6445626.js} +164 -154
- package/dist/{ReportEditor-ZXjzIVWj.js → ReportEditor-Cy8f2WFu.js} +6 -6
- package/dist/{ReportView-C0vzCbYY.js → ReportView-D-T3b10U.js} +9 -9
- package/dist/{SelectComponent.vue_vue_type_script_setup_true_lang-BHVPbR3l.js → SelectComponent.vue_vue_type_script_setup_true_lang-CYDZzbCU.js} +1 -1
- package/dist/{Setting-BfR6T0tE.js → Setting-DBzyuCx-.js} +5 -5
- package/dist/{TileEditor-BQDzUwav.js → TileEditor-CWYE5X71.js} +275 -268
- package/dist/{TransitionFade-DlAa1-mg.js → TransitionFade-DwQjFIYA.js} +101 -99
- package/dist/{access-Dw5cDt65-DpLiFTpm.js → access-Dw5cDt65-C2c0R9q4.js} +1 -1
- package/dist/{app-tS9-0m0b.js → app-BRv3iLF1.js} +11 -11
- package/dist/app.js +1 -1
- package/dist/assets/{formatChartData.worker-CtCG_oop.js → formatChartData.worker-Df5ziPQ2.js} +7 -7
- package/dist/assets/{processTableData.worker-BN2TZ-50.js → processTableData.worker-qpA30azs.js} +7 -7
- package/dist/style.css +1 -1
- package/dist/{useReportPermission-DEI1PTJT.js → useReportPermission-CDWkdi6R.js} +2 -2
- package/dist/{useRestaurantPermission-DTzkzgml.js → useRestaurantPermission-CjG_t7dK.js} +2 -2
- package/dist/{vue-i18n-BxRs360O.js → vue-i18n-ComGWqEb.js} +1 -1
- package/package.json +1 -1
- package/dist/App-pXGWlg3l.js +0 -264
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-6006dfdf]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-6006dfdf]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-6006dfdf]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.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:0}.scrollbar-hide-table>div{scrollbar-width:thin}.bar-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.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-height:100%;overflow:hidden;margin:0;padding:8px 0 0;width:var(--chart-width);height:var(--chart-height)}.line-chart .grow{height:100%}.line-chart .flex-col{gap:0}.card-container[data-v-1284dd51]{overflow-y:auto;overflow-x:hidden}.show-pin{visibility:hidden}.row:hover .show-pin{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-6ddab9e2] .line-clamp-1,.remove-line-clamping[data-v-6ddab9e2] .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}.selected-widget[data-v-
|
|
1
|
+
.glassmorphism{background:linear-gradient(135deg,#fffffff5,#fffffff5);box-shadow:0 8px 24px #0f172a2e}.chart-legend-text[data-v-6006dfdf]{color:var(--legend-text-color);font-size:var(--legend-font-size)}.chart-legend-list[data-v-6006dfdf]{scrollbar-width:none;-ms-overflow-style:none}.chart-legend-list[data-v-6006dfdf]::-webkit-scrollbar{display:none;width:0;height:0}.circular{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.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:0}.scrollbar-hide-table>div{scrollbar-width:thin}.bar-chart{flex:1 1 auto;min-height:0;min-width:0;max-height:100%;overflow:hidden;padding:0;width:var(--chart-width);height:var(--chart-height)}.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-height:100%;overflow:hidden;margin:0;padding:8px 0 0;width:var(--chart-width);height:var(--chart-height)}.line-chart .grow{height:100%}.line-chart .flex-col{gap:0}.card-container[data-v-1284dd51]{overflow-y:auto;overflow-x:hidden}.show-pin{visibility:hidden}.row:hover .show-pin{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-6ddab9e2] .line-clamp-1,.remove-line-clamping[data-v-6ddab9e2] .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}.selected-widget[data-v-75b05b43]{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}.toggleEditResize{border:2px dashed #3b82f6!important;position:relative}th:hover,td:hover{cursor:default}.col-resize-handle{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.highlight-hover-col,.highlight-col{border-right:2px solid #3b82f6!important}.row-resize-handle{position:absolute;bottom:0;left:0;width:100%;height:6px;cursor:row-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:10}.highlight-hover-row,.highlight-row{border-bottom:2px solid #3b82f6!important}.legend-color-input[data-v-0f6af12a]{-moz-appearance:none;appearance:none;-webkit-appearance:none;width:40px;height:24px;border:0;background:transparent;padding:0}.legend-color-input[data-v-0f6af12a]::-webkit-color-swatch-wrapper{padding:0}.legend-color-input[data-v-0f6af12a]::-webkit-color-swatch{border:1px solid rgb(var(--fm-color-neutral-gray-200));border-radius:4px}.legend-color-input[data-v-0f6af12a]::-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-b7f0bdc3]{height:140px;width:140px;padding:0}.integration-card .logo-card[data-v-b7f0bdc3]{width:100%;padding:24px;background:#fff}.integration-card .title-card[data-v-b7f0bdc3]{height:36px;color:#fff}.scrollbar-hide::-webkit-scrollbar{display:none}.scrollbar-hide{-ms-overflow-style:none;scrollbar-width:none}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as i } from "vue";
|
|
2
|
-
import { y as r, g as m } from "./access-Dw5cDt65-
|
|
2
|
+
import { y as r, g as m } from "./access-Dw5cDt65-C2c0R9q4.js";
|
|
3
3
|
import { useCoreStore as b } from "@feedmepos/mf-common";
|
|
4
|
-
import { c as R, h as y } from "./vue-i18n-
|
|
4
|
+
import { c as R, h as y } from "./vue-i18n-ComGWqEb.js";
|
|
5
5
|
function F(n) {
|
|
6
6
|
const s = n.permissionKey || n.id;
|
|
7
7
|
return s ? `business::report::reports::${s}` : null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { computed as u } from "vue";
|
|
2
|
-
import { u as c } from "./vue-i18n-
|
|
2
|
+
import { u as c } from "./vue-i18n-ComGWqEb.js";
|
|
3
3
|
import { useSnackbar as f } from "@feedmepos/ui-library";
|
|
4
4
|
import { useCoreStore as d } from "@feedmepos/mf-common";
|
|
5
|
-
import { l, g as i } from "./access-Dw5cDt65-
|
|
5
|
+
import { l, g as i } from "./access-Dw5cDt65-C2c0R9q4.js";
|
|
6
6
|
function g(t) {
|
|
7
7
|
return Array.isArray(t) ? t : [];
|
|
8
8
|
}
|
|
@@ -3,7 +3,7 @@ var Cr = (e, t, A) => t in e ? wr(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var Ft = (e, t, A) => Cr(e, typeof t != "symbol" ? t + "" : t, A);
|
|
4
4
|
import { defineStore as Gt, storeToRefs as tt } from "pinia";
|
|
5
5
|
import { ref as ue, computed as je, readonly as SA, getCurrentInstance as cn, inject as pr, shallowRef as Br, watch as Xn, onMounted as hr, onUnmounted as Er, defineComponent as Fn, h as ho, createVNode as Dr, Text as xr, Fragment as Eo } from "vue";
|
|
6
|
-
import { d as Z, c as Hr } from "./app-
|
|
6
|
+
import { d as Z, c as Hr } from "./app-BRv3iLF1.js";
|
|
7
7
|
import "@vue/devtools-api";
|
|
8
8
|
const Xr = "mf-reportquery-store", te = Gt(Xr, () => {
|
|
9
9
|
const e = ue(""), t = ue(""), A = ue("MY");
|
package/package.json
CHANGED
package/dist/App-pXGWlg3l.js
DELETED
|
@@ -1,264 +0,0 @@
|
|
|
1
|
-
import { defineComponent as se, resolveComponent as j, createBlock as ie, openBlock as R, unref as c, isRef as be, withCtx as U, createElementVNode as M, createVNode as V, toDisplayString as ee, createTextVNode as we, onMounted as ue, watch as q, ref as N, computed as te, onBeforeMount as Ee, onBeforeUnmount as Ce, createElementBlock as z, Fragment as ke } from "vue";
|
|
2
|
-
import { detectLocale as T, useCoreStore as Q } from "@feedmepos/mf-common";
|
|
3
|
-
import { u as Ae, a as Ne, b as ne, c as Te, d as Be, e as Fe, f as $e, s as xe } from "./vue-i18n-BxRs360O.js";
|
|
4
|
-
import { storeToRefs as L } from "pinia";
|
|
5
|
-
import { u as re, a as Je, b as Ue } from "./BaseDialog.vue_vue_type_script_setup_true_lang-CzbeFyTt.js";
|
|
6
|
-
import { u as ze, _ as Qe } from "./NavigationTab.vue_vue_type_script_setup_true_lang-CpMCe0cN.js";
|
|
7
|
-
import { u as oe } from "./message-dialog-UoMWOnil.js";
|
|
8
|
-
import { d as u } from "./app-tS9-0m0b.js";
|
|
9
|
-
import { useRoute as je, useRouter as Ve } from "vue-router";
|
|
10
|
-
const We = { class: "fm-typo-en-body-md-400 text-ellipsis overflow-hidden" }, Pe = /* @__PURE__ */ se({
|
|
11
|
-
__name: "Dialog",
|
|
12
|
-
setup(_) {
|
|
13
|
-
const { t: i } = Ae(), d = oe(), { isOpened: l, message: v, title: S } = L(oe());
|
|
14
|
-
return (D, p) => {
|
|
15
|
-
const O = j("FmButton"), B = j("FmDialog");
|
|
16
|
-
return R(), ie(B, {
|
|
17
|
-
modelValue: c(l),
|
|
18
|
-
"onUpdate:modelValue": p[0] || (p[0] = (F) => be(l) ? l.value = F : null),
|
|
19
|
-
overlay: "",
|
|
20
|
-
"close-button": !1
|
|
21
|
-
}, {
|
|
22
|
-
"dialog-header": U(() => [
|
|
23
|
-
we(ee(c(S)), 1)
|
|
24
|
-
]),
|
|
25
|
-
default: U(() => [
|
|
26
|
-
M("p", We, ee(c(v)), 1)
|
|
27
|
-
]),
|
|
28
|
-
"dialog-footer": U(() => [
|
|
29
|
-
p[1] || (p[1] = M("div", { class: "grow" }, null, -1)),
|
|
30
|
-
V(O, {
|
|
31
|
-
label: c(i)("report.common.cancel"),
|
|
32
|
-
variant: "tertiary",
|
|
33
|
-
onClick: c(d).dismiss
|
|
34
|
-
}, null, 8, ["label", "onClick"]),
|
|
35
|
-
V(O, {
|
|
36
|
-
label: c(i)("report.common.confirm"),
|
|
37
|
-
onClick: c(d).confirm
|
|
38
|
-
}, null, 8, ["label", "onClick"])
|
|
39
|
-
]),
|
|
40
|
-
_: 1
|
|
41
|
-
}, 8, ["modelValue"]);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}), ae = N(T());
|
|
45
|
-
function Ge() {
|
|
46
|
-
const _ = (i) => {
|
|
47
|
-
switch (ae.value = i, i) {
|
|
48
|
-
case "zh-CN":
|
|
49
|
-
u.locale("zh-cn");
|
|
50
|
-
break;
|
|
51
|
-
default:
|
|
52
|
-
u.locale("en");
|
|
53
|
-
break;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
return ue(() => {
|
|
57
|
-
_(T());
|
|
58
|
-
}), q(() => T(), _, { deep: !0, immediate: !0 }), {
|
|
59
|
-
currentLocale: ae
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
u.locale(T() === "zh-CN" ? "zh-cn" : "en");
|
|
63
|
-
const Ke = ["src"], He = ["src"], ut = /* @__PURE__ */ se({
|
|
64
|
-
__name: "App",
|
|
65
|
-
setup(_) {
|
|
66
|
-
const { businessId: i, token: d, country: l } = L(Ne()), { sessionUser: v, currentBusiness: S, currentCountry: D, registerSidebarComponent: p } = Q(), { getRestaurantAndWarehouse: O, getBusinessSetting: B, beginBusinessLoad: F, completeBusinessLoad: ce } = ne(), { getFeatureFlags: de } = Te(), { version: f } = L(re()), { getSettings: le } = Be(), { promptLoader: fe } = Fe(), n = je(), W = Ve(), h = Je(), P = ze(), r = ne(), me = re(), { suppressReportRouteSync: b } = L(me), { getReports: pe, getOverviewReport: ge, getReportConfig: G, currentReportId: K } = h, { currentReportId: ye, reports: ve } = L(h), { getSchema: Se } = Ue(), { fetchSchedules: De } = P, { init: he } = $e(), $ = N("v5"), w = N(!1), E = N(!0), Ie = te(() => `https://portal-v1.feedmedev.cc/b/${i.value}/report/CLOSE_UP?showHeader=false&country=${l.value.toUpperCase()}&menuOption=business-report&token=${d.value}&v2=true&reportV5Button=true`), Re = te(() => `https://report-v4.feedmedev.cc?businessId=${i.value}&country=${l.value}&token=${d.value}&reportV3Button=true`);
|
|
67
|
-
q(
|
|
68
|
-
[() => S.value, () => v.value, () => D.value],
|
|
69
|
-
() => {
|
|
70
|
-
var t, a;
|
|
71
|
-
const e = ((t = S.value) == null ? void 0 : t.id) ?? "";
|
|
72
|
-
S.value && v.value && D.value && (xe(D.value), i.value !== e && (i.value = e), d.value = ((a = v.value) == null ? void 0 : a.token) ?? "", l.value = D.value ?? "");
|
|
73
|
-
},
|
|
74
|
-
{ immediate: !0 }
|
|
75
|
-
);
|
|
76
|
-
function H(e) {
|
|
77
|
-
if (typeof e.data == "string")
|
|
78
|
-
try {
|
|
79
|
-
const t = JSON.parse(e.data);
|
|
80
|
-
(t == null ? void 0 : t.token) !== "" && (t == null ? void 0 : t.token) !== void 0 && (d.value = t.token);
|
|
81
|
-
} catch (t) {
|
|
82
|
-
console.error(t);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
function X(e) {
|
|
86
|
-
if (typeof e.data == "string")
|
|
87
|
-
try {
|
|
88
|
-
const t = JSON.parse(e.data);
|
|
89
|
-
(t == null ? void 0 : t.v5) === !0 ? f.value = $.value : (t == null ? void 0 : t.v3) === !0 && (f.value = "v3");
|
|
90
|
-
} catch (t) {
|
|
91
|
-
console.error(t);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
q(f, () => {
|
|
95
|
-
["v3", "v4"].includes(f.value) ? Q().hideSidebarToggle(!0) : Q().hideSidebarToggle(!1);
|
|
96
|
-
}), Ee(() => {
|
|
97
|
-
p(Qe);
|
|
98
|
-
}), ue(() => {
|
|
99
|
-
console.log("5.22.13-beta.1", !0), window.addEventListener("message", H), window.addEventListener("message", X);
|
|
100
|
-
}), Ce(() => {
|
|
101
|
-
window.removeEventListener("message", H), window.removeEventListener("message", X), h.$dispose(), P.$dispose();
|
|
102
|
-
});
|
|
103
|
-
function qe(e) {
|
|
104
|
-
try {
|
|
105
|
-
return decodeURIComponent(e);
|
|
106
|
-
} catch {
|
|
107
|
-
return e;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function C(e) {
|
|
111
|
-
if (typeof e != "string" || e.length === 0) return;
|
|
112
|
-
const t = e.includes("%") ? [e, qe(e)] : [e];
|
|
113
|
-
for (const a of t)
|
|
114
|
-
try {
|
|
115
|
-
const s = JSON.parse(a);
|
|
116
|
-
if (typeof s == "string")
|
|
117
|
-
try {
|
|
118
|
-
return JSON.parse(s);
|
|
119
|
-
} catch {
|
|
120
|
-
return s;
|
|
121
|
-
}
|
|
122
|
-
return s;
|
|
123
|
-
} catch {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
function Y(e) {
|
|
127
|
-
if (!e || typeof e != "object") return !1;
|
|
128
|
-
const t = e;
|
|
129
|
-
return typeof t.hour == "number" && typeof t.minute == "number";
|
|
130
|
-
}
|
|
131
|
-
function Le() {
|
|
132
|
-
const e = n.query.startDate ? u(n.query.startDate).startOf("day").toISOString() : void 0, t = n.query.endDate ? u(n.query.endDate).endOf("day").toISOString() : void 0, a = typeof n.query.timeStart == "string", s = typeof n.query.timeEnd == "string", m = C(n.query.timeStart), I = C(n.query.timeEnd), k = Y(m) ? m : null, A = Y(I) ? I : null, x = n.query.compareStartDate ? u(n.query.compareStartDate).startOf("day").toISOString() : void 0, J = n.query.compareEndDate ? u(n.query.compareEndDate).endOf("day").toISOString() : void 0, Z = n.query.isAllLocation === "true" || n.query.isAllLocation === void 0;
|
|
133
|
-
let g = [];
|
|
134
|
-
if (Z)
|
|
135
|
-
g = r.selectedLocationIds;
|
|
136
|
-
else {
|
|
137
|
-
const o = C(n.query.locationIds);
|
|
138
|
-
g = Array.isArray(o) ? o : [];
|
|
139
|
-
}
|
|
140
|
-
let y = n.query.reportId || K;
|
|
141
|
-
if (ve.value.find((o) => o.id === y) || (y = K), y && y !== h.currentReportId && h.updateCurrentReportId(y), e || t) {
|
|
142
|
-
const o = r.dateRange;
|
|
143
|
-
(o.startDate !== e || o.endDate !== t) && r.setDateRange({ startDate: e, endDate: t });
|
|
144
|
-
}
|
|
145
|
-
if (a || s) {
|
|
146
|
-
const o = r.timeRange;
|
|
147
|
-
(o.start !== k || o.end !== A) && r.setTimeRange({ start: k, end: A });
|
|
148
|
-
}
|
|
149
|
-
if (x || J) {
|
|
150
|
-
const o = r.compareDateRange;
|
|
151
|
-
(o.startDate !== x || o.endDate !== J) && r.setCompareDateRange({
|
|
152
|
-
startDate: x,
|
|
153
|
-
endDate: J
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (!Z && Array.isArray(g)) {
|
|
157
|
-
const o = r.selectedLocationIds;
|
|
158
|
-
o.length === g.length && o.every((_e, Oe) => _e === g[Oe]) || r.setSelectedLocationIds(g);
|
|
159
|
-
}
|
|
160
|
-
return {
|
|
161
|
-
// TODO: this returned value can used for getBusinessSetting
|
|
162
|
-
reportId: y,
|
|
163
|
-
startDate: n.query.startDate,
|
|
164
|
-
endDate: n.query.endDate,
|
|
165
|
-
timeStart: n.query.timeStart,
|
|
166
|
-
timeEnd: n.query.timeEnd,
|
|
167
|
-
compareStartDate: n.query.compareStartDate,
|
|
168
|
-
compareEndDate: n.query.compareEndDate,
|
|
169
|
-
locationIds: typeof n.query.locationIds == "string" ? n.query.locationIds : void 0,
|
|
170
|
-
isAllLocation: n.query.isAllLocation
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
return q(
|
|
174
|
-
() => i.value,
|
|
175
|
-
async (e, t) => {
|
|
176
|
-
e !== "" && (w.value = !1, F(e), (!E.value || t !== void 0) && (r.setSelectedLocationIds([]), W.replace({
|
|
177
|
-
name: n.name,
|
|
178
|
-
params: n.params,
|
|
179
|
-
query: {
|
|
180
|
-
...n.query,
|
|
181
|
-
locationIds: void 0,
|
|
182
|
-
isAllLocation: "true"
|
|
183
|
-
}
|
|
184
|
-
})), b.value !== void 0 && (b.value = !0), await fe(async () => {
|
|
185
|
-
await he({
|
|
186
|
-
apiKey: "MaGoXrEWuEJNpWgKTqseee",
|
|
187
|
-
url: "https://flag.feedme.farm/api/v1/",
|
|
188
|
-
enableAnalytics: !1,
|
|
189
|
-
cacheFlags: !1
|
|
190
|
-
});
|
|
191
|
-
const a = await G();
|
|
192
|
-
$.value = a.version, f.value = $.value, await Promise.all([
|
|
193
|
-
de(),
|
|
194
|
-
G(),
|
|
195
|
-
ge(),
|
|
196
|
-
pe(),
|
|
197
|
-
Se(),
|
|
198
|
-
De(),
|
|
199
|
-
O(
|
|
200
|
-
(() => {
|
|
201
|
-
const s = C(n.query.locationIds);
|
|
202
|
-
return Array.isArray(s) ? s : void 0;
|
|
203
|
-
})()
|
|
204
|
-
),
|
|
205
|
-
le()
|
|
206
|
-
]), await B(), Le(), ce(e);
|
|
207
|
-
}), w.value = !0, E.value && (E.value = !1));
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
immediate: !0
|
|
211
|
-
}
|
|
212
|
-
), q(
|
|
213
|
-
() => (w.value, {
|
|
214
|
-
reportId: ye.value,
|
|
215
|
-
selectedLocationIds: r.selectedLocationIds,
|
|
216
|
-
dateRange: r.dateRange,
|
|
217
|
-
timeRange: r.timeRange,
|
|
218
|
-
compareDateRange: r.compareDateRange
|
|
219
|
-
}),
|
|
220
|
-
(e) => {
|
|
221
|
-
if (!w.value || !e.reportId || E.value) return;
|
|
222
|
-
if (b.value) {
|
|
223
|
-
b.value = !1;
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
const t = e.selectedLocationIds, a = e.dateRange, s = e.timeRange, m = e.compareDateRange, I = {
|
|
227
|
-
...n.query,
|
|
228
|
-
reportId: e.reportId,
|
|
229
|
-
startDate: a.startDate ? u(a.startDate).startOf("day").toISOString() : void 0,
|
|
230
|
-
endDate: a.endDate ? u(a.endDate).endOf("day").toISOString() : void 0,
|
|
231
|
-
compareStartDate: m.startDate ? u(m.startDate).startOf("day").toISOString() : void 0,
|
|
232
|
-
compareEndDate: m.endDate ? u(m.endDate).endOf("day").toISOString() : void 0,
|
|
233
|
-
timeStart: s.start ? JSON.stringify(s.start) : void 0,
|
|
234
|
-
timeEnd: s.end ? JSON.stringify(s.end) : void 0,
|
|
235
|
-
locationIds: t.length === r.locations.length ? void 0 : t.length > 0 ? JSON.stringify(t) : void 0,
|
|
236
|
-
isAllLocation: String(t.length === r.locations.length)
|
|
237
|
-
}, k = JSON.stringify(n.query), A = JSON.stringify(I);
|
|
238
|
-
k !== A && W.replace({
|
|
239
|
-
name: n.name,
|
|
240
|
-
params: n.params,
|
|
241
|
-
query: I
|
|
242
|
-
});
|
|
243
|
-
},
|
|
244
|
-
{ deep: !0 }
|
|
245
|
-
), Ge(), (e, t) => {
|
|
246
|
-
const a = j("router-view");
|
|
247
|
-
return R(), z(ke, null, [
|
|
248
|
-
V(Pe),
|
|
249
|
-
c(f) === "v3" ? (R(), z("iframe", {
|
|
250
|
-
key: 0,
|
|
251
|
-
class: "bg-white h-full w-full",
|
|
252
|
-
src: Ie.value
|
|
253
|
-
}, null, 8, Ke)) : c(f) === "v4" ? (R(), z("iframe", {
|
|
254
|
-
key: 1,
|
|
255
|
-
class: "bg-white h-full w-full",
|
|
256
|
-
src: Re.value
|
|
257
|
-
}, null, 8, He)) : (R(), ie(a, { key: 2 }))
|
|
258
|
-
], 64);
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
export {
|
|
263
|
-
ut as default
|
|
264
|
-
};
|