@mx-cartographer/experiences 7.2.16 → 7.2.17

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.
@@ -1,85 +1,85 @@
1
1
  import { jsxs as n, jsx as e, Fragment as G } from "react/jsx-runtime";
2
2
  import d from "react";
3
- import { observer as g } from "mobx-react-lite";
3
+ import { observer as w } from "mobx-react-lite";
4
4
  import B from "@mui/material/Box";
5
- import A from "@mui/material/Divider";
5
+ import y from "@mui/material/Divider";
6
6
  import E from "@mui/material/List";
7
7
  import O from "@mui/material/ListSubheader";
8
- import _ from "@mui/system/Stack";
8
+ import A from "@mui/system/Stack";
9
9
  import { Text as v } from "@mxenabled/mxui";
10
10
  import { A as K } from "../AccountDetailsContent-CsH1w_GZ.mjs";
11
- import { u as D1 } from "../AccountDetailsContent-CsH1w_GZ.mjs";
11
+ import { u as N1 } from "../AccountDetailsContent-CsH1w_GZ.mjs";
12
12
  import { u as z, A as P } from "../AccountDetailsHeader-Df1JkzYi.mjs";
13
13
  import { A as W } from "../AccountListItem-CeY_WIpj.mjs";
14
14
  import { a as Y } from "../AccountFields-DUToRRqW.mjs";
15
- import { g as U1, b as $1 } from "../AccountFields-DUToRRqW.mjs";
16
- import { u as w, b as S, d as T, g as D, a as q } from "../hooks-D6XlXHf4.mjs";
15
+ import { g as $1, b as j1 } from "../AccountFields-DUToRRqW.mjs";
16
+ import { u as Z, b, d as T, g as D, a as q, n as J } from "../hooks-D6XlXHf4.mjs";
17
17
  import { f as I } from "../NumberFormatting-Buh7u8Oi.mjs";
18
- import { D as J } from "../Drawer-kEE73B87.mjs";
19
- import { A as y, W as Q } from "../WidgetContainer-EbrN1oIo.mjs";
20
- import { C as X } from "../ConnectionsDrawer-BDvVuJQf.mjs";
18
+ import { D as Q } from "../Drawer-kEE73B87.mjs";
19
+ import { A as S, W as X } from "../WidgetContainer-EbrN1oIo.mjs";
20
+ import { C as e1 } from "../ConnectionsDrawer-BDvVuJQf.mjs";
21
21
  import { u as N } from "../useScreenSize-B6JyS_Lj.mjs";
22
22
  import { L as R } from "../Loader-DUaFpDGv.mjs";
23
- import { l as U, m as e1 } from "../ConnectDrawer-Bw5s6Dw1.mjs";
24
- import { F as G1, M as K1 } from "../ConnectDrawer-Bw5s6Dw1.mjs";
25
- import t1 from "@mui/material/ListItem";
23
+ import { l as U, m as t1 } from "../ConnectDrawer-Bw5s6Dw1.mjs";
24
+ import { F as K1, M as z1 } from "../ConnectDrawer-Bw5s6Dw1.mjs";
25
+ import l1 from "@mui/material/ListItem";
26
26
  import { M as $ } from "../MiniWidgetContainer-D0gfmbaF.mjs";
27
- import l1 from "@mui/material/Stack";
28
- import { A as P1, a as Y1 } from "../AccountStore-BkoLK9Tq.mjs";
29
- const i1 = () => {
30
- const [c, H] = d.useState(""), { accounts: C } = w(), { selectedAccounts: l } = S(), { setSelectedAccount: h, setSelectedMember: r } = z(), { members: L } = T(), { onEvent: f } = D(), s = [...new Set(l.map((t) => t.account_type))], a = l.find((t) => c === t.guid), u = d.useMemo(
27
+ import i1 from "@mui/material/Stack";
28
+ import { A as Y1, a as q1 } from "../AccountStore-BkoLK9Tq.mjs";
29
+ const n1 = () => {
30
+ const [c, h] = d.useState(""), { accounts: C } = Z(), { selectedAccounts: l } = b(), { setSelectedAccount: p, setSelectedMember: u } = z(), { members: H } = T(), { onEvent: f } = D(), a = [...new Set(l.map((t) => t.account_type))], r = l.find((t) => c === t.guid), s = d.useMemo(
31
31
  () => l.filter((t) => t.is_hidden),
32
32
  [l]
33
- ), p = d.useMemo(
33
+ ), L = d.useMemo(
34
34
  () => l.filter((t) => t.is_closed),
35
35
  [l]
36
- ), M = u.reduce(
36
+ ), g = s.reduce(
37
37
  (t, i) => (i.available_balance || i.balance || 0) + t,
38
38
  0
39
- ), b = Y(p, C);
39
+ ), k = Y(L, C);
40
40
  d.useEffect(() => {
41
- if (a) {
42
- h(a);
43
- const t = L.find((i) => i.guid === a?.member_guid) || {};
44
- t && r(t);
41
+ if (r) {
42
+ p(r);
43
+ const t = H.find((i) => i.guid === r?.member_guid) || {};
44
+ t && u(t);
45
45
  }
46
- }, [a, c]);
47
- const Z = (t) => {
48
- H(t.guid), f(y.ACCOUNTS_CLICK_ACCOUNT, {
46
+ }, [r, c]);
47
+ const x = (t) => {
48
+ h(t.guid), f(S.ACCOUNTS_CLICK_ACCOUNT, {
49
49
  account_guid: t.guid,
50
50
  account_type: t.account_type
51
51
  });
52
52
  }, m = (t) => {
53
- const i = t === "hidden" ? u : p, k = t === "hidden" ? M : b, o = t === "hidden" ? C.account_hidden : C.account_closed;
53
+ const i = t === "hidden" ? s : L, M = t === "hidden" ? g : k, o = t === "hidden" ? C.account_hidden : C.account_closed;
54
54
  return /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(
55
55
  E,
56
56
  {
57
57
  "aria-label": o,
58
58
  subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ n(
59
- _,
59
+ A,
60
60
  {
61
61
  component: "span",
62
62
  direction: "row",
63
63
  sx: { justifyContent: "space-between", color: "grey.700" },
64
64
  children: [
65
65
  /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: o }),
66
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(k, "0,0.00") })
66
+ /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(M, "0,0.00") })
67
67
  ]
68
68
  }
69
69
  ) }),
70
- children: /* @__PURE__ */ e(_, { children: i.map((V, x, j) => {
71
- const F = x === j.length - 1;
70
+ children: /* @__PURE__ */ e(A, { children: i.map((V, _, j) => {
71
+ const F = _ === j.length - 1;
72
72
  return /* @__PURE__ */ n(d.Fragment, { children: [
73
73
  /* @__PURE__ */ e(
74
74
  W,
75
75
  {
76
76
  account: V,
77
- onRowClick: () => Z(V),
77
+ onRowClick: () => x(V),
78
78
  shouldShowConnectionStatus: !0
79
79
  }
80
80
  ),
81
81
  t === "hidden" ? /* @__PURE__ */ e(
82
- A,
82
+ y,
83
83
  {
84
84
  sx: {
85
85
  mb: F ? 24 : 4,
@@ -87,7 +87,7 @@ const i1 = () => {
87
87
  }
88
88
  }
89
89
  ) : !F && /* @__PURE__ */ e(
90
- A,
90
+ y,
91
91
  {
92
92
  sx: {
93
93
  mb: 4,
@@ -101,10 +101,10 @@ const i1 = () => {
101
101
  ) });
102
102
  };
103
103
  return /* @__PURE__ */ n(B, { sx: { pt: 24 }, children: [
104
- s.map((t) => {
104
+ a.map((t) => {
105
105
  const i = l.filter(
106
106
  (o) => o.account_type === t && !o.is_closed && !o.is_hidden
107
- ), k = i.reduce(
107
+ ), M = i.reduce(
108
108
  (o, V) => (V.balance || 0) + o,
109
109
  0
110
110
  );
@@ -113,34 +113,34 @@ const i1 = () => {
113
113
  {
114
114
  "aria-label": C.account_type_accounts[i[0]?.account_type],
115
115
  subheader: /* @__PURE__ */ e(O, { component: "h2", sx: { backgroundColor: "transparent", px: 24 }, children: /* @__PURE__ */ n(
116
- _,
116
+ A,
117
117
  {
118
118
  component: "span",
119
119
  direction: "row",
120
120
  sx: { display: "flex", justifyContent: "space-between" },
121
121
  children: [
122
122
  /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: C.account_types[t] }),
123
- /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(k, "0,0.00") })
123
+ /* @__PURE__ */ e(v, { bold: !0, variant: "Body", children: I(M, "0,0.00") })
124
124
  ]
125
125
  }
126
126
  ) }),
127
- children: /* @__PURE__ */ e(_, { children: i.map((o) => {
128
- const V = l.indexOf(o) === l.length - 1, x = i.indexOf(o) === i.length - 1;
127
+ children: /* @__PURE__ */ e(A, { children: i.map((o) => {
128
+ const V = l.indexOf(o) === l.length - 1, _ = i.indexOf(o) === i.length - 1;
129
129
  return /* @__PURE__ */ n(d.Fragment, { children: [
130
130
  /* @__PURE__ */ e(
131
131
  W,
132
132
  {
133
133
  account: o,
134
- onRowClick: () => Z(o),
134
+ onRowClick: () => x(o),
135
135
  shouldShowConnectionStatus: !0
136
136
  }
137
137
  ),
138
- (!V || p.length > 0 || u.length > 0) && /* @__PURE__ */ e(
139
- A,
138
+ (!V || L.length > 0 || s.length > 0) && /* @__PURE__ */ e(
139
+ y,
140
140
  {
141
141
  sx: {
142
- mb: x ? 24 : 4,
143
- ml: x ? 24 : 68
142
+ mb: _ ? 24 : 4,
143
+ ml: _ ? 24 : 68
144
144
  }
145
145
  }
146
146
  )
@@ -150,14 +150,14 @@ const i1 = () => {
150
150
  t
151
151
  );
152
152
  }),
153
- u.length > 0 && m("hidden"),
154
- p.length > 0 && m("closed"),
153
+ s.length > 0 && m("hidden"),
154
+ L.length > 0 && m("closed"),
155
155
  /* @__PURE__ */ n(
156
- J,
156
+ Q,
157
157
  {
158
158
  ariaLabelClose: C.close_account_details_aria,
159
159
  isOpen: !!c,
160
- onClose: () => H(""),
160
+ onClose: () => h(""),
161
161
  title: C.account_details,
162
162
  children: [
163
163
  /* @__PURE__ */ e(P, {}),
@@ -166,93 +166,95 @@ const i1 = () => {
166
166
  }
167
167
  )
168
168
  ] });
169
- }, n1 = g(i1), C1 = ({ onBackClick: c, sx: H = {} }) => {
170
- const [C, l] = d.useState(!1), [h, r] = d.useState(!1), { config: L } = q(), { accounts: f } = T(), { accounts: s, connect: a } = w(), { isCopyLoaded: u, isInitialized: p, setSelectedAccounts: M, selectedAccountGuids: b } = S(), { isDesktop: Z } = N(), { onEvent: m } = D();
169
+ }, C1 = w(n1), o1 = ({ onBackClick: c, sx: h = {} }) => {
170
+ const [C, l] = d.useState(!1), [p, u] = d.useState(!1), { config: H } = q(), { accounts: f } = T(), { accounts: a, connect: r } = Z(), { isCopyLoaded: s, isInitialized: L, setSelectedAccounts: g, selectedAccountGuids: k } = b(), { isDesktop: x } = N(), { onEvent: m } = D(), { onLoad: t } = J();
171
171
  d.useEffect(() => {
172
- M(f);
173
- }, [f]);
174
- const t = () => {
175
- l(!0), m(y.ACCOUNTS_CLICK_CONNECT);
176
- }, i = () => {
177
- r(!0), m(y.ACCOUNTS_CLICK_CONNECT);
172
+ g(f);
173
+ }, [f]), d.useEffect(() => {
174
+ L && s && t?.("AccountsWidget");
175
+ }, [L, s]);
176
+ const i = () => {
177
+ l(!0), m(S.ACCOUNTS_CLICK_CONNECT);
178
+ }, M = () => {
179
+ u(!0), m(S.ACCOUNTS_CLICK_CONNECT);
178
180
  };
179
- return u ? /* @__PURE__ */ e(
180
- Q,
181
+ return s ? /* @__PURE__ */ e(
182
+ X,
181
183
  {
182
184
  accountOptions: f,
183
- actions: L.show_connections_widget_in_master ? [
184
- { iconName: "add", label: s.add, onClick: t },
185
+ actions: H.show_connections_widget_in_master ? [
186
+ { iconName: "add", label: a.add, onClick: i },
185
187
  {
186
188
  iconName: "credit_card_gear",
187
- label: s.manage,
188
- onClick: i
189
+ label: a.manage,
190
+ onClick: M
189
191
  }
190
192
  ] : [],
191
- onAccountsFilterClick: () => m(y.ACCOUNTS_CLICK_FILTER),
193
+ onAccountsFilterClick: () => m(S.ACCOUNTS_CLICK_FILTER),
192
194
  onBackClick: c,
193
- sx: H,
194
- title: s.title,
195
- children: p ? /* @__PURE__ */ n(G, { children: [
196
- /* @__PURE__ */ n(B, { sx: { px: Z ? 24 : 12 }, children: [
197
- b.length < 1 && /* @__PURE__ */ e(v, { display: "flex", justifyContent: "center", my: 24, children: s.no_accounts }),
198
- /* @__PURE__ */ e(n1, {})
195
+ sx: h,
196
+ title: a.title,
197
+ children: L ? /* @__PURE__ */ n(G, { children: [
198
+ /* @__PURE__ */ n(B, { sx: { px: x ? 24 : 12 }, children: [
199
+ k.length < 1 && /* @__PURE__ */ e(v, { display: "flex", justifyContent: "center", my: 24, children: a.no_accounts }),
200
+ /* @__PURE__ */ e(C1, {})
199
201
  ] }),
200
202
  /* @__PURE__ */ e(
201
203
  U,
202
204
  {
203
205
  onClose: () => l(!1),
204
206
  showConnectWidget: C,
205
- title: a.mini_title
207
+ title: r.mini_title
206
208
  }
207
209
  ),
208
210
  /* @__PURE__ */ e(
209
- X,
211
+ e1,
210
212
  {
211
- onClose: () => r(!1),
212
- showConnectionsWidget: h,
213
- title: s.manage_connections
213
+ onClose: () => u(!1),
214
+ showConnectionsWidget: p,
215
+ title: a.manage_connections
214
216
  }
215
217
  )
216
218
  ] }) : /* @__PURE__ */ e(R, {})
217
219
  }
218
220
  ) : /* @__PURE__ */ e(R, {});
219
- }, E1 = g(C1), o1 = ({ onPrimaryCtaClick: c, sx: H }) => {
220
- const { visibleAccounts: C } = T(), { accounts: l } = w(), { isCopyLoaded: h, isInitialized: r, selectedAccounts: L, setSelectedAccounts: f } = S(), { isDesktop: s } = N();
221
+ }, W1 = w(o1), d1 = ({ onPrimaryCtaClick: c, sx: h }) => {
222
+ const { visibleAccounts: C } = T(), { accounts: l } = Z(), { isCopyLoaded: p, isInitialized: u, selectedAccounts: H, setSelectedAccounts: f } = b(), { isDesktop: a } = N();
221
223
  d.useEffect(() => {
222
224
  f(C);
223
225
  }, [C]);
224
- const a = d.useMemo(
225
- () => e1(L, s ? 5 : 3),
226
- [L, s]
226
+ const r = d.useMemo(
227
+ () => t1(H, a ? 5 : 3),
228
+ [H, a]
227
229
  );
228
- return h ? /* @__PURE__ */ e(
230
+ return p ? /* @__PURE__ */ e(
229
231
  $,
230
232
  {
231
233
  className: "mx-exp-accounts-miniwidget",
232
234
  onPrimaryCtaClick: c,
233
235
  primaryCtaLabel: l.primary_cta,
234
- sx: H,
236
+ sx: h,
235
237
  title: l.mini_title,
236
- children: r ? /* @__PURE__ */ n(E, { children: [
237
- L.length === 0 && /* @__PURE__ */ e(t1, { sx: { justifyContent: "center" }, children: l.no_accounts }),
238
- a.map((u, p) => {
239
- const M = a.indexOf(u) === a.length - 1;
238
+ children: u ? /* @__PURE__ */ n(E, { children: [
239
+ H.length === 0 && /* @__PURE__ */ e(l1, { sx: { justifyContent: "center" }, children: l.no_accounts }),
240
+ r.map((s, L) => {
241
+ const g = r.indexOf(s) === r.length - 1;
240
242
  return /* @__PURE__ */ n(d.Fragment, { children: [
241
243
  /* @__PURE__ */ e(
242
244
  W,
243
245
  {
244
- account: u,
246
+ account: s,
245
247
  listItemProps: { sx: { px: 24 } },
246
248
  shouldShowConnectionStatus: !0
247
249
  }
248
250
  ),
249
- !M && /* @__PURE__ */ e(A, { "aria-hidden": "true", variant: "inset" })
250
- ] }, `account-item${p}`);
251
+ !g && /* @__PURE__ */ e(y, { "aria-hidden": "true", variant: "inset" })
252
+ ] }, `account-item${L}`);
251
253
  })
252
254
  ] }) : /* @__PURE__ */ e(R, {})
253
255
  }
254
256
  ) : /* @__PURE__ */ e(R, {});
255
- }, W1 = g(o1), d1 = () => /* @__PURE__ */ n(
257
+ }, T1 = w(d1), c1 = () => /* @__PURE__ */ n(
256
258
  "svg",
257
259
  {
258
260
  fill: "none",
@@ -691,10 +693,10 @@ const i1 = () => {
691
693
  )
692
694
  ]
693
695
  }
694
- ), c1 = () => {
695
- const { connect: c } = w();
696
- return /* @__PURE__ */ n(l1, { alignItems: "center", direction: "column", m: 24, children: [
697
- /* @__PURE__ */ e(d1, {}),
696
+ ), s1 = () => {
697
+ const { connect: c } = Z();
698
+ return /* @__PURE__ */ n(i1, { alignItems: "center", direction: "column", m: 24, children: [
699
+ /* @__PURE__ */ e(c1, {}),
698
700
  /* @__PURE__ */ e(
699
701
  v,
700
702
  {
@@ -708,48 +710,48 @@ const i1 = () => {
708
710
  }
709
711
  )
710
712
  ] });
711
- }, s1 = g(c1), a1 = ({
713
+ }, a1 = w(s1), r1 = ({
712
714
  onPrimaryCtaClick: c = () => {
713
715
  },
714
- sx: H
716
+ sx: h
715
717
  }) => {
716
- const { isCopyLoaded: C } = S(), { connect: l } = w(), [h, r] = d.useState(!1), L = () => {
717
- r(!0), c();
718
+ const { isCopyLoaded: C } = b(), { connect: l } = Z(), [p, u] = d.useState(!1), H = () => {
719
+ u(!0), c();
718
720
  };
719
721
  return C ? /* @__PURE__ */ n(
720
722
  $,
721
723
  {
722
724
  className: "mx-exp-connect-miniwidget",
723
- onPrimaryCtaClick: L,
725
+ onPrimaryCtaClick: H,
724
726
  primaryCtaLabel: l.primary_cta,
725
- sx: H,
727
+ sx: h,
726
728
  title: l.mini_title,
727
729
  children: [
728
- /* @__PURE__ */ e(s1, {}),
729
- h && /* @__PURE__ */ e(
730
+ /* @__PURE__ */ e(a1, {}),
731
+ p && /* @__PURE__ */ e(
730
732
  U,
731
733
  {
732
- onClose: () => r(!1),
733
- showConnectWidget: h,
734
+ onClose: () => u(!1),
735
+ showConnectWidget: p,
734
736
  title: l.mini_title
735
737
  }
736
738
  )
737
739
  ]
738
740
  }
739
741
  ) : /* @__PURE__ */ e(R, {});
740
- }, T1 = g(a1);
742
+ }, O1 = w(r1);
741
743
  export {
742
- P1 as AccountApi,
744
+ Y1 as AccountApi,
743
745
  K as AccountDetailsContent,
744
746
  P as AccountDetailsHeader,
745
- Y1 as AccountStore,
746
- W1 as AccountsMiniWidget,
747
- E1 as AccountsWidget,
748
- T1 as ConnectMiniWidget,
749
- G1 as FieldType,
750
- K1 as MemberConnectionStatus,
751
- U1 as getAccountBalanceDetails,
752
- $1 as getAccountDetailFields,
747
+ q1 as AccountStore,
748
+ T1 as AccountsMiniWidget,
749
+ W1 as AccountsWidget,
750
+ O1 as ConnectMiniWidget,
751
+ K1 as FieldType,
752
+ z1 as MemberConnectionStatus,
753
+ $1 as getAccountBalanceDetails,
754
+ j1 as getAccountDetailFields,
753
755
  z as useAccountUiStore,
754
- D1 as useGetMergeableAccounts
756
+ N1 as useGetMergeableAccounts
755
757
  };