@mx-cartographer/experiences 3.1.1-alpha.j3 → 3.1.1-alpha.j5
Sign up to get free protection for your applications and to get access to all the features.
@@ -10,6 +10,7 @@ export declare class AccountStore {
|
|
10
10
|
institutions: Institution[];
|
11
11
|
members: Member[];
|
12
12
|
uiStore: UiStore;
|
13
|
+
isInitialized: boolean;
|
13
14
|
constructor(globalStore: GlobalStore);
|
14
15
|
initialize: (endpoint: string, token: string) => void;
|
15
16
|
get cashAccounts(): Account[];
|
package/dist/index.es.js
CHANGED
@@ -10671,11 +10671,12 @@ class e1 {
|
|
10671
10671
|
institutions = [];
|
10672
10672
|
members = [];
|
10673
10673
|
uiStore;
|
10674
|
+
isInitialized = !1;
|
10674
10675
|
constructor(e) {
|
10675
10676
|
this.globalStore = e, this.uiStore = new A1(), wA(this);
|
10676
10677
|
}
|
10677
10678
|
initialize = (e, n) => {
|
10678
|
-
this.api = new or(e, n), this.widgetApi = new ba(e, n), Promise.all([this.loadAccounts(), this.loadInstitutions()]);
|
10679
|
+
this.api = new or(e, n), this.widgetApi = new ba(e, n), Promise.all([this.loadAccounts(), this.loadInstitutions()]).then(() => this.isInitialized = !0);
|
10679
10680
|
};
|
10680
10681
|
get cashAccounts() {
|
10681
10682
|
return this.accounts.filter(
|
@@ -11004,30 +11005,30 @@ const bt = {
|
|
11004
11005
|
good_morning: "Good morning!",
|
11005
11006
|
heres_your_spending_overview: "Here's your monthly financial overview."
|
11006
11007
|
}, L1 = () => {
|
11007
|
-
const { accounts: A } = PA(), { selectedAccountGuids:
|
11008
|
+
const { accounts: A, isInitialized: e } = PA(), { selectedAccountGuids: n, setSelectedAccountGuids: a, setSelectedAccounts: r } = hA(), { isMobile: i } = re(), { common: o } = X();
|
11008
11009
|
C.useEffect(() => {
|
11009
|
-
|
11010
|
-
}, [A]);
|
11011
|
-
const
|
11010
|
+
r(A), a(A.map((l) => l.guid));
|
11011
|
+
}, [A, e]);
|
11012
|
+
const s = {
|
11012
11013
|
accountFilterOptionsCopy: {
|
11013
11014
|
accountTypeAccounts: "_1{accountType} accounts",
|
11014
|
-
cancelButton:
|
11015
|
-
filterButton:
|
11016
|
-
filterButtonAria:
|
11015
|
+
cancelButton: o.cancel_button,
|
11016
|
+
filterButton: o.filter_button,
|
11017
|
+
filterButtonAria: o.account_filter.filter_button_generic_aria,
|
11017
11018
|
selectAllAccounts: "Select All Accounts",
|
11018
11019
|
toggleAccountTypeAccounts: "Toggle all _1{accountType} accounts",
|
11019
11020
|
unselectAllAccounts: "Unselect All Accounts",
|
11020
|
-
zeroStateButton:
|
11021
|
-
zeroStateDescription:
|
11022
|
-
zeroStateTitle:
|
11021
|
+
zeroStateButton: o.account_filter.zero_state_button,
|
11022
|
+
zeroStateDescription: o.account_filter.zero_state_description,
|
11023
|
+
zeroStateTitle: o.account_filter.zero_state_title
|
11023
11024
|
},
|
11024
|
-
title:
|
11025
|
+
title: o.account_filter.title
|
11025
11026
|
};
|
11026
|
-
return /* @__PURE__ */ t(oe, { sx: { mb:
|
11027
|
+
return /* @__PURE__ */ t(oe, { sx: { mb: i ? 24 : 0, p: 24 }, children: /* @__PURE__ */ d(w, { alignItems: "center", flexDirection: "row", justifyContent: "space-between", children: [
|
11027
11028
|
/* @__PURE__ */ d(w, { children: [
|
11028
11029
|
/* @__PURE__ */ t(fe, { children: (() => {
|
11029
|
-
const
|
11030
|
-
return
|
11030
|
+
const u = (/* @__PURE__ */ new Date()).getHours();
|
11031
|
+
return u > 1 && u < 12 ? bt.good_morning : u >= 12 && u < 18 ? bt.good_afternoon : bt.good_evening;
|
11031
11032
|
})() }),
|
11032
11033
|
/* @__PURE__ */ t(E, { color: "text.secondary", sx: { fontSize: 15 }, children: bt.heres_your_spending_overview })
|
11033
11034
|
] }),
|
@@ -11035,12 +11036,12 @@ const bt = {
|
|
11035
11036
|
Xr,
|
11036
11037
|
{
|
11037
11038
|
accounts: A,
|
11038
|
-
copy:
|
11039
|
-
onFilterClick: (
|
11040
|
-
const
|
11041
|
-
|
11039
|
+
copy: s,
|
11040
|
+
onFilterClick: (l) => {
|
11041
|
+
const u = A.filter((h) => l.includes(h.guid)).map((h) => h.guid);
|
11042
|
+
a(u);
|
11042
11043
|
},
|
11043
|
-
selectedAccountGuids:
|
11044
|
+
selectedAccountGuids: n,
|
11044
11045
|
showAccountNumbers: !1,
|
11045
11046
|
sx: { "& .mx-cmn-account-filter-title": { fontSize: 15 }, mx: 4 },
|
11046
11047
|
variant: "text"
|
@@ -11048,31 +11049,31 @@ const bt = {
|
|
11048
11049
|
)
|
11049
11050
|
] }) });
|
11050
11051
|
}, T1 = O(L1), I1 = ({ widgets: A, isLoading: e }) => {
|
11051
|
-
const { isDesktop: n, isMobile: a } = re(), {
|
11052
|
-
() => A.sort((
|
11053
|
-
[A]
|
11054
|
-
), o = C.useMemo(
|
11055
|
-
() => i.filter((c) => c.location === xn.Main),
|
11052
|
+
const { isDesktop: n, isMobile: a } = re(), { accountStore: r, copyStore: i } = jn(), o = C.useMemo(
|
11053
|
+
() => A.sort((l, u) => l.index - u.index),
|
11056
11054
|
[A]
|
11057
11055
|
), s = C.useMemo(
|
11058
|
-
() =>
|
11056
|
+
() => o.filter((l) => l.location === xn.Main),
|
11057
|
+
[A]
|
11058
|
+
), c = C.useMemo(
|
11059
|
+
() => o.filter((l) => l.location === xn.RightSide),
|
11059
11060
|
[A]
|
11060
11061
|
);
|
11061
11062
|
return /* @__PURE__ */ d(Me, { container: !0, spacing: a ? 0 : 24, sx: { overflow: "scroll" }, children: [
|
11062
|
-
/* @__PURE__ */ t(Me, { xs: 12, children: r.isInitialized && /* @__PURE__ */ t(T1, {}) }),
|
11063
|
+
/* @__PURE__ */ t(Me, { xs: 12, children: i.isInitialized && r.isInitialized && /* @__PURE__ */ t(T1, {}) }),
|
11063
11064
|
/* @__PURE__ */ d(Me, { xl: 8, xs: 12, children: [
|
11064
11065
|
e && /* @__PURE__ */ d(w, { direction: "column", spacing: 24, children: [
|
11065
11066
|
/* @__PURE__ */ t(le, { height: 100, variant: "rounded", width: "100%" }),
|
11066
11067
|
/* @__PURE__ */ t(le, { height: 300, variant: "rounded", width: "100%" }),
|
11067
11068
|
/* @__PURE__ */ t(le, { height: 300, variant: "rounded", width: "100%" })
|
11068
11069
|
] }),
|
11069
|
-
!e && /* @__PURE__ */ t(w, { direction: "column", spacing: 24, children: n ?
|
11070
|
+
!e && /* @__PURE__ */ t(w, { direction: "column", spacing: 24, children: n ? s.map((l) => /* @__PURE__ */ t(C.Fragment, { children: l.component }, l.index)) : o.map((l) => /* @__PURE__ */ t(C.Fragment, { children: l.component }, l.index)) })
|
11070
11071
|
] }),
|
11071
11072
|
n && /* @__PURE__ */ t(Me, { xl: 4, children: e ? /* @__PURE__ */ d(w, { direction: "column", spacing: 24, children: [
|
11072
11073
|
/* @__PURE__ */ t(le, { height: 200, variant: "rounded", width: "100%" }),
|
11073
11074
|
/* @__PURE__ */ t(le, { height: 100, variant: "rounded", width: "100%" }),
|
11074
11075
|
/* @__PURE__ */ t(le, { height: 300, variant: "rounded", width: "100%" })
|
11075
|
-
] }) : /* @__PURE__ */ t(w, { direction: "column", spacing: 24, children:
|
11076
|
+
] }) : /* @__PURE__ */ t(w, { direction: "column", spacing: 24, children: c.map((l) => /* @__PURE__ */ t(C.Fragment, { children: l.component }, l.index)) }) })
|
11076
11077
|
] });
|
11077
11078
|
}, k7 = O(I1), G7 = () => /* @__PURE__ */ t("div", { children: "Goals" });
|
11078
11079
|
function S1(A) {
|