@mx-cartographer/experiences 9.7.2 → 9.7.4

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/common/constants/Analytics.d.ts +1 -0
  3. package/dist/common/constants/Analytics.es.js +2 -1
  4. package/dist/common/constants/Analytics.es.js.map +1 -1
  5. package/dist/common/context/hooks.d.ts +1 -0
  6. package/dist/common/context/hooks.es.js +30 -29
  7. package/dist/common/context/hooks.es.js.map +1 -1
  8. package/dist/common/context/index.d.ts +1 -1
  9. package/dist/common/index.es.js +140 -139
  10. package/dist/core/api/AgreementApi.d.ts +7 -0
  11. package/dist/core/api/AgreementApi.es.js +14 -0
  12. package/dist/core/api/AgreementApi.es.js.map +1 -0
  13. package/dist/core/api/index.d.ts +1 -0
  14. package/dist/core/constants/ApiEndpoints.d.ts +1 -0
  15. package/dist/core/constants/ApiEndpoints.es.js +1 -0
  16. package/dist/core/constants/ApiEndpoints.es.js.map +1 -1
  17. package/dist/core/index.es.js +92 -88
  18. package/dist/core/stores/AgreementStore.d.ts +12 -0
  19. package/dist/core/stores/AgreementStore.es.js +35 -0
  20. package/dist/core/stores/AgreementStore.es.js.map +1 -0
  21. package/dist/core/stores/GlobalStore.d.ts +2 -1
  22. package/dist/core/stores/GlobalStore.es.js +32 -30
  23. package/dist/core/stores/GlobalStore.es.js.map +1 -1
  24. package/dist/core/stores/GlobalUiStore.d.ts +1 -0
  25. package/dist/core/stores/GlobalUiStore.es.js +9 -4
  26. package/dist/core/stores/GlobalUiStore.es.js.map +1 -1
  27. package/dist/core/stores/UserStore.d.ts +2 -1
  28. package/dist/core/stores/UserStore.es.js +42 -29
  29. package/dist/core/stores/UserStore.es.js.map +1 -1
  30. package/dist/core/stores/index.d.ts +1 -0
  31. package/dist/core/types/Agreement.d.ts +6 -0
  32. package/dist/core/types/Insights.d.ts +1 -0
  33. package/dist/core/types/Insights.es.js.map +1 -1
  34. package/dist/core/types/User.d.ts +1 -0
  35. package/dist/core/types/index.d.ts +1 -0
  36. package/dist/core/types/localization/CommonCopy.d.ts +15 -0
  37. package/dist/dashboard/Dashboard.es.js +68 -36
  38. package/dist/dashboard/Dashboard.es.js.map +1 -1
  39. package/dist/dashboard/WelcomeDialog.d.ts +7 -0
  40. package/dist/dashboard/WelcomeDialog.es.js +281 -0
  41. package/dist/dashboard/WelcomeDialog.es.js.map +1 -0
  42. package/dist/dashboard/index.d.ts +2 -0
  43. package/dist/dashboard/index.es.js +4 -2
  44. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js +77 -65
  45. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/AccountBlock.es.js.map +1 -1
  46. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.d.ts +8 -0
  47. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js +93 -81
  48. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/layout.es.js.map +1 -1
  49. package/dist/insights-v2/components/DirectDepositCard.es.js +4 -4
  50. package/dist/insights-v2/index.es.js +13 -13
  51. package/package.json +2 -1
@@ -0,0 +1,281 @@
1
+ import { buildDynamicCopy as w } from "../core/utils/Localization.es.js";
2
+ import { useAgreementStore as C, useEvent as D, useGlobalCopyStore as I, useGlobalStore as T } from "../common/context/hooks.es.js";
3
+ import { useScreenSize as E } from "../common/hooks/useScreenSize.es.js";
4
+ import { ANALYTICS_EVENTS as L } from "../common/constants/Analytics.es.js";
5
+ import W from "../common/components/Loader.es.js";
6
+ import z from "react";
7
+ import { observer as H } from "mobx-react-lite";
8
+ import i from "@mui/material/Stack";
9
+ import { Icon as u, P as g, Text as h } from "@mxenabled/mxui";
10
+ import x from "@mui/material/Button";
11
+ import { Fragment as M, jsx as e, jsxs as o } from "react/jsx-runtime";
12
+ import { alpha as R } from "@mui/material/styles";
13
+ import m from "@mui/material/Box";
14
+ import O from "@mui/material/Dialog";
15
+ import G from "@mui/material/DialogContent";
16
+ import N from "@mui/material/IconButton";
17
+ import B from "@mui/material/Divider";
18
+ import j from "@mui/material/Link";
19
+ import c from "dompurify";
20
+ var F = {
21
+ ALLOWED_TAGS: [
22
+ "a",
23
+ "b",
24
+ "br",
25
+ "div",
26
+ "em",
27
+ "h1",
28
+ "h2",
29
+ "h3",
30
+ "h4",
31
+ "h5",
32
+ "h6",
33
+ "i",
34
+ "li",
35
+ "ol",
36
+ "p",
37
+ "span",
38
+ "strong",
39
+ "u",
40
+ "ul"
41
+ ],
42
+ ALLOWED_ATTR: [
43
+ "href",
44
+ "target",
45
+ "rel"
46
+ ]
47
+ }, P = (n) => {
48
+ n.tagName === "A" && n.getAttribute("target") === "_blank" && n.setAttribute("rel", "noopener noreferrer");
49
+ }, V = (n) => {
50
+ if (!c.isSupported) return "";
51
+ c.addHook("afterSanitizeAttributes", P);
52
+ try {
53
+ return c.sanitize(n, F);
54
+ } finally {
55
+ c.removeHook("afterSanitizeAttributes");
56
+ }
57
+ }, Y = ({ isOpen: n, onContinue: b }) => {
58
+ const { copyStore: _ } = T(), { common: d } = I(), { isSmallMobile: r } = E(), l = C(), { onEvent: y } = D(), [a, p] = z.useState(!1);
59
+ if (!_.isInitialized) return null;
60
+ const t = d.welcome_dialog, v = () => {
61
+ p(!0), y(L.WELCOME_DIALOG_VIEW_TERMS), l.isLoaded || l.loadAgreement();
62
+ }, S = (s, f) => {
63
+ f === "escapeKeyDown" && a && p(!1);
64
+ }, A = () => l.hasError ? /* @__PURE__ */ o(i, {
65
+ sx: {
66
+ alignItems: "center",
67
+ gap: 16,
68
+ py: 24
69
+ },
70
+ children: [/* @__PURE__ */ e(g, {
71
+ color: "error.main",
72
+ role: "alert",
73
+ sx: { textAlign: "center" },
74
+ truncate: !1,
75
+ children: t.terms_error
76
+ }), /* @__PURE__ */ e(x, {
77
+ onClick: () => l.loadAgreement(),
78
+ variant: "outlined",
79
+ children: d.refresh_button
80
+ })]
81
+ }) : l.isLoaded ? /* @__PURE__ */ e(m, {
82
+ "aria-labelledby": "welcome-dialog-terms-title",
83
+ dangerouslySetInnerHTML: { __html: V(l.agreement?.text ?? "") },
84
+ role: "region",
85
+ tabIndex: 0,
86
+ sx: {
87
+ overflowY: "auto",
88
+ "& *": { maxWidth: "100%" },
89
+ ...r ? {
90
+ flex: 1,
91
+ minHeight: 0
92
+ } : { maxHeight: 400 }
93
+ }
94
+ }) : /* @__PURE__ */ e(W, { height: 400 }), k = [
95
+ {
96
+ description: t.financial_views_description,
97
+ icon: "account_balance",
98
+ title: t.financial_views_title
99
+ },
100
+ {
101
+ description: t.smart_spending_description,
102
+ icon: "receipt_long",
103
+ title: t.smart_spending_title
104
+ },
105
+ {
106
+ description: t.budgets_description,
107
+ icon: "bubble_chart",
108
+ title: t.budgets_title
109
+ }
110
+ ];
111
+ return /* @__PURE__ */ e(O, {
112
+ "aria-labelledby": a ? "welcome-dialog-terms-title" : "welcome-dialog-title",
113
+ fullScreen: r,
114
+ maxWidth: "sm",
115
+ onClose: S,
116
+ open: n,
117
+ role: "dialog",
118
+ scroll: r ? "paper" : "body",
119
+ sx: {
120
+ "& .MuiDialog-paper": {
121
+ borderRadius: r ? 0 : "8px",
122
+ margin: r ? 0 : "32px auto",
123
+ padding: a || r ? "24px" : "64px",
124
+ maxWidth: 500,
125
+ width: "100%"
126
+ },
127
+ "& .MuiDialogContent-root": {
128
+ padding: 0,
129
+ ...a && {
130
+ overflow: "visible",
131
+ ...r && {
132
+ display: "flex",
133
+ flexDirection: "column"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ children: /* @__PURE__ */ e(G, { children: a ? /* @__PURE__ */ o(i, {
139
+ sx: {
140
+ gap: 16,
141
+ ...r && {
142
+ flex: 1,
143
+ minHeight: 0
144
+ }
145
+ },
146
+ children: [
147
+ /* @__PURE__ */ o(i, {
148
+ sx: {
149
+ alignItems: "center",
150
+ flexDirection: "row",
151
+ gap: 8
152
+ },
153
+ children: [/* @__PURE__ */ e(N, {
154
+ "aria-label": d.back,
155
+ onClick: () => p(!1),
156
+ sx: {
157
+ color: "primary.main",
158
+ ml: -8
159
+ },
160
+ children: /* @__PURE__ */ e(u, {
161
+ name: "chevron_left",
162
+ size: 24
163
+ })
164
+ }), /* @__PURE__ */ e(h, {
165
+ bold: !0,
166
+ component: "h2",
167
+ id: "welcome-dialog-terms-title",
168
+ variant: "h3",
169
+ children: l.agreement?.title || t.terms_link
170
+ })]
171
+ }),
172
+ /* @__PURE__ */ e(B, { sx: { mx: -24 } }),
173
+ A()
174
+ ]
175
+ }) : /* @__PURE__ */ o(M, { children: [
176
+ /* @__PURE__ */ e(i, {
177
+ sx: {
178
+ alignItems: "center",
179
+ mb: 32,
180
+ textAlign: "center"
181
+ },
182
+ children: /* @__PURE__ */ o(h, {
183
+ bold: !0,
184
+ component: "h2",
185
+ id: "welcome-dialog-title",
186
+ variant: "h3",
187
+ children: [/* @__PURE__ */ e(m, {
188
+ component: "span",
189
+ sx: { display: "block" },
190
+ children: t.title_line_1
191
+ }), /* @__PURE__ */ e(m, {
192
+ component: "span",
193
+ sx: { display: "block" },
194
+ children: t.title_line_2
195
+ })]
196
+ })
197
+ }),
198
+ /* @__PURE__ */ e(i, {
199
+ sx: {
200
+ border: 1,
201
+ borderColor: "divider",
202
+ borderRadius: "8px",
203
+ p: 16,
204
+ gap: 16
205
+ },
206
+ children: k.map((s) => /* @__PURE__ */ o(i, {
207
+ sx: {
208
+ alignItems: "center",
209
+ flexDirection: "row",
210
+ gap: 16
211
+ },
212
+ children: [/* @__PURE__ */ e(m, {
213
+ sx: {
214
+ alignItems: "center",
215
+ bgcolor: (f) => R(f.palette.primary.main, 0.1),
216
+ borderRadius: 1,
217
+ display: "flex",
218
+ flexShrink: 0,
219
+ justifyContent: "center",
220
+ p: 8
221
+ },
222
+ children: /* @__PURE__ */ e(u, {
223
+ name: s.icon,
224
+ size: 24,
225
+ sx: { color: "primary.main" }
226
+ })
227
+ }), /* @__PURE__ */ o(i, {
228
+ sx: { gap: 2 },
229
+ children: [/* @__PURE__ */ e(h, {
230
+ bold: !0,
231
+ variant: "body1",
232
+ children: s.title
233
+ }), /* @__PURE__ */ e(g, {
234
+ color: "text.secondary",
235
+ truncate: !1,
236
+ variant: "caption",
237
+ children: s.description
238
+ })]
239
+ })]
240
+ }, s.title))
241
+ }),
242
+ /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ e(x, {
243
+ fullWidth: !0,
244
+ onClick: b,
245
+ sx: {
246
+ maxWidth: 324,
247
+ mt: 64,
248
+ mx: "auto"
249
+ },
250
+ variant: "contained",
251
+ children: t.continue_button
252
+ }), /* @__PURE__ */ e(g, {
253
+ color: "text.secondary",
254
+ sx: {
255
+ mt: 16,
256
+ textAlign: "center"
257
+ },
258
+ truncate: !1,
259
+ variant: "body2",
260
+ children: w(t.terms_agreement, /* @__PURE__ */ e(j, {
261
+ component: "button",
262
+ onClick: v,
263
+ rel: "noopener",
264
+ sx: {
265
+ display: "block",
266
+ fontWeight: 600,
267
+ lineHeight: 2,
268
+ mx: "auto"
269
+ },
270
+ type: "button",
271
+ children: t.terms_link
272
+ }))
273
+ })] })
274
+ ] }) })
275
+ });
276
+ }, de = H(Y);
277
+ export {
278
+ de as default
279
+ };
280
+
281
+ //# sourceMappingURL=WelcomeDialog.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeDialog.es.js","names":[],"sources":["../../src/dashboard/WelcomeDialog.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport DOMPurify from 'dompurify'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport Dialog from '@mui/material/Dialog'\nimport DialogContent from '@mui/material/DialogContent'\nimport Divider from '@mui/material/Divider'\nimport IconButton from '@mui/material/IconButton'\nimport Link from '@mui/material/Link'\nimport Stack from '@mui/material/Stack'\nimport { alpha } from '@mui/material/styles'\n\nimport { Icon, P, Text } from '@mxenabled/mxui'\n\nimport {\n ANALYTICS_EVENTS,\n buildDynamicCopy,\n Loader,\n useAgreementStore,\n useEvent,\n useGlobalCopyStore,\n useGlobalStore,\n useScreenSize,\n} from '../common'\n\n// Terms HTML is server-controlled, so render it fail-closed and against an explicit\n// allowlist — no script/style/form/event-handler content can reach the DOM.\nconst SANITIZE_CONFIG = {\n ALLOWED_TAGS: [\n 'a',\n 'b',\n 'br',\n 'div',\n 'em',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'i',\n 'li',\n 'ol',\n 'p',\n 'span',\n 'strong',\n 'u',\n 'ul',\n ],\n ALLOWED_ATTR: ['href', 'target', 'rel'],\n}\n\n// Any anchor that opens a new tab must not leak the opener (reverse tabnabbing).\nconst forceSafeRel = (node: Element) => {\n if (node.tagName === 'A' && node.getAttribute('target') === '_blank') {\n node.setAttribute('rel', 'noopener noreferrer')\n }\n}\n\n// Fail closed: when DOMPurify has no DOM to sanitize against, render nothing rather\n// than passing raw server HTML straight through to `dangerouslySetInnerHTML`.\nconst sanitizeTermsHtml = (html: string) => {\n if (!DOMPurify.isSupported) {\n return ''\n }\n\n // Scope the hook to this single call so it never alters the shared DOMPurify\n // singleton's behavior for other sanitize() callers (and never stacks).\n DOMPurify.addHook('afterSanitizeAttributes', forceSafeRel)\n try {\n return DOMPurify.sanitize(html, SANITIZE_CONFIG)\n } finally {\n DOMPurify.removeHook('afterSanitizeAttributes')\n }\n}\n\nexport interface WelcomeDialogProps {\n isOpen: boolean\n onContinue: () => void\n}\n\nconst WelcomeDialog: React.FC<WelcomeDialogProps> = ({ isOpen, onContinue }) => {\n const { copyStore } = useGlobalStore()\n const { common: commonCopy } = useGlobalCopyStore()\n const { isSmallMobile } = useScreenSize()\n const agreementStore = useAgreementStore()\n const { onEvent } = useEvent()\n\n const [showTerms, setShowTerms] = React.useState(false)\n\n if (!copyStore.isInitialized) {\n return null\n }\n\n const copy = commonCopy.welcome_dialog\n\n const openTerms = () => {\n setShowTerms(true)\n onEvent(ANALYTICS_EVENTS.WELCOME_DIALOG_VIEW_TERMS)\n if (!agreementStore.isLoaded) {\n agreementStore.loadAgreement()\n }\n }\n\n // MUI only fires onClose for backdrop clicks and Escape. This is a consent gate, so\n // neither dismisses it (Continue is the only way out); Escape just backs out of the\n // terms sub-view, mirroring the back button.\n const handleClose = (_event: object, reason: 'backdropClick' | 'escapeKeyDown') => {\n if (reason === 'escapeKeyDown' && showTerms) {\n setShowTerms(false)\n }\n }\n\n const renderTermsBody = () => {\n if (agreementStore.hasError) {\n return (\n <Stack sx={{ alignItems: 'center', gap: 16, py: 24 }}>\n <P color=\"error.main\" role=\"alert\" sx={{ textAlign: 'center' }} truncate={false}>\n {copy.terms_error}\n </P>\n <Button onClick={() => agreementStore.loadAgreement()} variant=\"outlined\">\n {commonCopy.refresh_button}\n </Button>\n </Stack>\n )\n }\n\n if (!agreementStore.isLoaded) {\n return <Loader height={400} />\n }\n\n return (\n <Box\n aria-labelledby=\"welcome-dialog-terms-title\"\n dangerouslySetInnerHTML={{\n __html: sanitizeTermsHtml(agreementStore.agreement?.text ?? ''),\n }}\n role=\"region\"\n tabIndex={0}\n sx={{\n overflowY: 'auto',\n '& *': { maxWidth: '100%' },\n ...(isSmallMobile ? { flex: 1, minHeight: 0 } : { maxHeight: 400 }),\n }}\n />\n )\n }\n\n const features = [\n {\n description: copy.financial_views_description,\n icon: 'account_balance',\n title: copy.financial_views_title,\n },\n {\n description: copy.smart_spending_description,\n icon: 'receipt_long',\n title: copy.smart_spending_title,\n },\n {\n description: copy.budgets_description,\n icon: 'bubble_chart',\n title: copy.budgets_title,\n },\n ]\n\n const titleId = showTerms ? 'welcome-dialog-terms-title' : 'welcome-dialog-title'\n\n return (\n <Dialog\n aria-labelledby={titleId}\n fullScreen={isSmallMobile}\n maxWidth=\"sm\"\n onClose={handleClose}\n open={isOpen}\n role=\"dialog\"\n scroll={isSmallMobile ? 'paper' : 'body'}\n sx={{\n '& .MuiDialog-paper': {\n borderRadius: isSmallMobile ? 0 : '8px',\n margin: isSmallMobile ? 0 : '32px auto',\n padding: showTerms || isSmallMobile ? '24px' : '64px',\n maxWidth: 500,\n width: '100%',\n },\n '& .MuiDialogContent-root': {\n padding: 0,\n ...(showTerms && {\n overflow: 'visible',\n ...(isSmallMobile && { display: 'flex', flexDirection: 'column' }),\n }),\n },\n }}\n >\n <DialogContent>\n {showTerms ? (\n <Stack sx={{ gap: 16, ...(isSmallMobile && { flex: 1, minHeight: 0 }) }}>\n <Stack sx={{ alignItems: 'center', flexDirection: 'row', gap: 8 }}>\n <IconButton\n aria-label={commonCopy.back}\n onClick={() => setShowTerms(false)}\n sx={{ color: 'primary.main', ml: -8 }}\n >\n <Icon name=\"chevron_left\" size={24} />\n </IconButton>\n <Text bold={true} component=\"h2\" id=\"welcome-dialog-terms-title\" variant=\"h3\">\n {agreementStore.agreement?.title || copy.terms_link}\n </Text>\n </Stack>\n\n <Divider sx={{ mx: -24 }} />\n\n {renderTermsBody()}\n </Stack>\n ) : (\n <>\n <Stack sx={{ alignItems: 'center', mb: 32, textAlign: 'center' }}>\n <Text bold={true} component=\"h2\" id=\"welcome-dialog-title\" variant=\"h3\">\n <Box component=\"span\" sx={{ display: 'block' }}>\n {copy.title_line_1}\n </Box>\n <Box component=\"span\" sx={{ display: 'block' }}>\n {copy.title_line_2}\n </Box>\n </Text>\n </Stack>\n\n <Stack sx={{ border: 1, borderColor: 'divider', borderRadius: '8px', p: 16, gap: 16 }}>\n {features.map((feature) => (\n <Stack\n key={feature.title}\n sx={{ alignItems: 'center', flexDirection: 'row', gap: 16 }}\n >\n <Box\n sx={{\n alignItems: 'center',\n bgcolor: (theme) => alpha(theme.palette.primary.main, 0.1),\n borderRadius: 1,\n display: 'flex',\n flexShrink: 0,\n justifyContent: 'center',\n p: 8,\n }}\n >\n <Icon name={feature.icon} size={24} sx={{ color: 'primary.main' }} />\n </Box>\n <Stack sx={{ gap: 2 }}>\n <Text bold={true} variant=\"body1\">\n {feature.title}\n </Text>\n <P color=\"text.secondary\" truncate={false} variant=\"caption\">\n {feature.description}\n </P>\n </Stack>\n </Stack>\n ))}\n </Stack>\n\n <Stack>\n <Button\n fullWidth={true}\n onClick={onContinue}\n sx={{ maxWidth: 324, mt: 64, mx: 'auto' }}\n variant=\"contained\"\n >\n {copy.continue_button}\n </Button>\n\n <P\n color=\"text.secondary\"\n sx={{ mt: 16, textAlign: 'center' }}\n truncate={false}\n variant=\"body2\"\n >\n {\n buildDynamicCopy(\n copy.terms_agreement,\n <Link\n component=\"button\"\n onClick={openTerms}\n rel=\"noopener\"\n sx={{ display: 'block', fontWeight: 600, lineHeight: 2, mx: 'auto' }}\n type=\"button\"\n >\n {copy.terms_link}\n </Link>,\n ) as string\n }\n </P>\n </Stack>\n </>\n )}\n </DialogContent>\n </Dialog>\n )\n}\n\nexport default observer(WelcomeDialog)\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA6BA,IAAM,IAAkB;AAAA,EACtB,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IAAC;AAAA,IAAQ;AAAA,IAAU;AAAA,EAAK;AACxC,GAGM,IAAA,CAAgB,MAAkB;AACtC,EAAI,EAAK,YAAY,OAAO,EAAK,aAAa,QAAQ,MAAM,YAC1D,EAAK,aAAa,OAAO,qBAAqB;AAElD,GAIM,IAAA,CAAqB,MAAiB;AAC1C,MAAI,CAAC,EAAU,YACb,QAAO;AAKT,EAAA,EAAU,QAAQ,2BAA2B,CAAY;AACzD,MAAI;AACF,WAAO,EAAU,SAAS,GAAM,CAAe;AAAA,EACjD,UAAA;AACE,IAAA,EAAU,WAAW,yBAAyB;AAAA,EAChD;AACF,GAOM,IAAA,CAA+C,EAAE,QAAA,GAA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A,QACxC,SAAQ;AAAA,QAEP,UAAA,EAAK;AAAA,MACA,CAAA,GAER,gBAAA,EAAC,GAAD;AAAA,QACE,OAAM;AAAA,QACN,IAAI;AAAA,UAAE,IAAI;AAAA,UAAI,WAAW;AAAA,QAAS;AAAA,QAClC,UAAU;AAAA,QACV,SAAQ;AAAA,QAGN,UAAA,EACE,EAAK,iBACL,gBAAA,EAAC,GAAD;AAAA,UACE,WAAU;AAAA,UACV,SAAS;AAAA,UACT,KAAI;AAAA,UACJ,IAAI;AAAA,YAAE,SAAS;AAAA,YAAS,YAAY;AAAA,YAAK,YAAY;AAAA,YAAG,IAAI;AAAA,UAAO;AAAA,UACnE,MAAK;AAAA,UAEJ,UAAA,EAAK;AAAA,QACF,CAAA,CACR;AAAA,MAED,CAAA,CACE,EAAA,CAAA;AAAA,IACP,EAAA,CAAA,EAES,CAAA;AAAA,EACT,CAAA;AAEZ,GAEA,KAAe,EAAS,CAAa"}
@@ -1,3 +1,5 @@
1
1
  export { default as Dashboard } from './Dashboard';
2
+ export { default as WelcomeDialog } from './WelcomeDialog';
3
+ export type { WelcomeDialogProps } from './WelcomeDialog';
2
4
  export { DashboardLocation } from './constants/Dashboard';
3
5
  export type { DashboardWidget } from './types/DashboardTypes';
@@ -1,6 +1,8 @@
1
- import { DashboardLocation as a } from "./constants/Dashboard.es.js";
1
+ import a from "./WelcomeDialog.es.js";
2
+ import { DashboardLocation as m } from "./constants/Dashboard.es.js";
2
3
  import t from "./Dashboard.es.js";
3
4
  export {
4
5
  t as Dashboard,
5
- a as DashboardLocation
6
+ m as DashboardLocation,
7
+ a as WelcomeDialog
6
8
  };
@@ -1,28 +1,40 @@
1
- import { slot as p } from "../../../../core/types/Insights.es.js";
1
+ import { slot as f } from "../../../../core/types/Insights.es.js";
2
2
  import { formatCurrency as k } from "../../../../core/utils/NumberFormatting.es.js";
3
- import { useContainerDimensions as B } from "../../../hooks/useContainerDimensions.es.js";
4
- import { DepositLogo as F } from "../../../components/ComponentBlocks/DepositLogo.es.js";
5
- import { Confetti as G } from "../../../components/shared/Confetti.es.js";
6
- import { ReactComponent as P } from "../../../components/shared/images/PaidOffCard.es.js";
7
- import { ReactComponent as V } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
8
- import { resolveVariantConfig as j } from "../../resolveVariantConfig.es.js";
9
- import { HeaderComponent as E } from "./HeaderComponent.es.js";
10
- import { getLayoutConfig as H } from "./layout.es.js";
11
- import { IconComponent as O } from "./IconComponent.es.js";
12
- import { useRef as W } from "react";
3
+ import { useContainerDimensions as V } from "../../../hooks/useContainerDimensions.es.js";
4
+ import { DepositLogo as I } from "../../../components/ComponentBlocks/DepositLogo.es.js";
5
+ import { Confetti as j } from "../../../components/shared/Confetti.es.js";
6
+ import E from "../../../components/DirectDepositCard.es.js";
7
+ import { ReactComponent as H } from "../../../components/shared/images/PaidOffCard.es.js";
8
+ import { ReactComponent as O } from "../../../components/shared/images/SavingsAccountDeposit.es.js";
9
+ import { resolveVariantConfig as W } from "../../resolveVariantConfig.es.js";
10
+ import { HeaderComponent as q } from "./HeaderComponent.es.js";
11
+ import { getLayoutConfig as J } from "./layout.es.js";
12
+ import { IconComponent as K } from "./IconComponent.es.js";
13
+ import { useRef as M } from "react";
13
14
  import r from "@mui/material/Stack";
14
15
  import { Text as s } from "@mxenabled/mxui";
15
- import { Icon as q } from "@mxenabled/mx-icons";
16
- import { jsx as o, jsxs as t } from "react/jsx-runtime";
17
- import { useTheme as J } from "@mui/material/styles";
16
+ import { Icon as Q } from "@mxenabled/mx-icons";
17
+ import { jsx as o, jsxs as e } from "react/jsx-runtime";
18
+ import { useTheme as U } from "@mui/material/styles";
18
19
  import n from "@mui/material/Box";
19
- var K = {
20
+ var X = {
20
21
  deposit_received: "payments",
21
22
  status_on_track: "monetization_on"
22
- }, po = ({ payload: I }) => {
23
- const S = J(), h = W(null), { height: f, width: g } = B(h), { instance_slot: i } = I, { variant: l, header_text: a, institution_guid: x, institution_name: b, icon_name: D, merchant_guid: z, merchant_name: v, category_guid: L } = i, { data: c } = i, m = c !== void 0, u = p(c, "amount"), d = m ? typeof u == "number" && Number.isFinite(u) ? u : void 0 : i.amount, y = p(c, "sub_text"), w = typeof y == "string" ? y : void 0, R = m ? w : i.sub_text, N = m ? w : i.label, _ = p(c, "logo"), e = j(H(S), l, "default", "AccountBlock");
24
- if (e?.isConfetti) {
25
- const $ = {
23
+ }, bo = ({ payload: S }) => {
24
+ const D = U(), g = M(null), { height: x, width: b } = V(g), { instance_slot: i } = S, { variant: m, account_name: N, account_type: L, status_text: z, header_text: a, institution_guid: c, institution_name: u, icon_name: G, merchant_guid: $, merchant_name: v, category_guid: A } = i, { data: d } = i, p = d !== void 0, h = f(d, "amount"), l = p ? typeof h == "number" && Number.isFinite(h) ? h : void 0 : i.amount, y = f(d, "sub_text"), _ = typeof y == "string" ? y : void 0, w = p ? _ : i.sub_text, B = p ? _ : i.label, R = f(d, "logo"), t = W(J(D), m, "default", "AccountBlock");
25
+ if (t?.isDetailed) return /* @__PURE__ */ o(E, {
26
+ ...t.detailed,
27
+ logo: /* @__PURE__ */ o(I, {
28
+ iconName: "account_balance",
29
+ institutionGuid: c ?? "",
30
+ institutionName: u ?? c ?? ""
31
+ }),
32
+ name: N,
33
+ statusLabel: z,
34
+ subtitle: L
35
+ });
36
+ if (t?.isConfetti) {
37
+ const F = {
26
38
  paidOffCard: /* @__PURE__ */ o(n, {
27
39
  sx: {
28
40
  flexShrink: 0,
@@ -30,7 +42,7 @@ var K = {
30
42
  position: "relative",
31
43
  width: 44
32
44
  },
33
- children: /* @__PURE__ */ o(P, {
45
+ children: /* @__PURE__ */ o(H, {
34
46
  "aria-hidden": !0,
35
47
  role: "presentation",
36
48
  style: {
@@ -40,7 +52,7 @@ var K = {
40
52
  }
41
53
  })
42
54
  }),
43
- savings: /* @__PURE__ */ o(V, {
55
+ savings: /* @__PURE__ */ o(O, {
44
56
  "aria-hidden": !0,
45
57
  height: 55,
46
58
  role: "presentation",
@@ -54,29 +66,29 @@ var K = {
54
66
  overflow: "hidden",
55
67
  width: 48
56
68
  },
57
- children: /* @__PURE__ */ o(F, {
58
- categoryGuid: L,
59
- iconName: K[l] ?? "payments",
60
- institutionGuid: x,
61
- institutionName: b,
62
- merchantGuid: z,
69
+ children: /* @__PURE__ */ o(I, {
70
+ categoryGuid: A,
71
+ iconName: X[m] ?? "payments",
72
+ institutionGuid: c,
73
+ institutionName: u,
74
+ merchantGuid: $,
63
75
  merchantName: v
64
76
  })
65
77
  })
66
- }[e.graphic ?? "logo"], C = e.secondarySource === "merchant" ? v ?? b : N, T = C ? /* @__PURE__ */ o(s, {
67
- color: e.secondaryColor,
68
- variant: e.secondaryVariant,
78
+ }[t.graphic ?? "logo"], C = t.secondarySource === "merchant" ? v ?? u : B, T = C ? /* @__PURE__ */ o(s, {
79
+ color: t.secondaryColor,
80
+ variant: t.secondaryVariant,
69
81
  children: C
70
- }) : null, A = d != null ? /* @__PURE__ */ o(s, {
82
+ }) : null, P = l != null ? /* @__PURE__ */ o(s, {
71
83
  bold: !0,
72
84
  color: "success.dark",
73
- variant: e.amountVariant,
74
- children: `${e.amountPrefix ?? ""}${k(d, "0,0.00")}`
85
+ variant: t.amountVariant,
86
+ children: `${t.amountPrefix ?? ""}${k(l, "0,0.00")}`
75
87
  }) : null;
76
- return /* @__PURE__ */ t(n, {
77
- ref: h,
88
+ return /* @__PURE__ */ e(n, {
89
+ ref: g,
78
90
  sx: {
79
- backgroundImage: e.gradient,
91
+ backgroundImage: t.gradient,
80
92
  bgcolor: "background.paper",
81
93
  overflow: "hidden",
82
94
  position: "relative",
@@ -90,12 +102,12 @@ var K = {
90
102
  position: "absolute",
91
103
  zIndex: 1
92
104
  },
93
- children: /* @__PURE__ */ o(G, {
94
- height: f,
95
- shouldRun: f > 0 && g > 0,
96
- width: g
105
+ children: /* @__PURE__ */ o(j, {
106
+ height: x,
107
+ shouldRun: x > 0 && b > 0,
108
+ width: b
97
109
  })
98
- }), /* @__PURE__ */ t(r, {
110
+ }), /* @__PURE__ */ e(r, {
99
111
  sx: {
100
112
  borderRadius: "8px",
101
113
  overflow: "hidden",
@@ -103,7 +115,7 @@ var K = {
103
115
  width: "100%",
104
116
  zIndex: 2
105
117
  },
106
- children: [e.categoryStrip && a && /* @__PURE__ */ o(n, {
118
+ children: [t.categoryStrip && a && /* @__PURE__ */ o(n, {
107
119
  sx: {
108
120
  bgcolor: "success.main",
109
121
  px: 12,
@@ -114,48 +126,48 @@ var K = {
114
126
  variant: "caption",
115
127
  children: a
116
128
  })
117
- }), /* @__PURE__ */ t(r, {
129
+ }), /* @__PURE__ */ e(r, {
118
130
  sx: {
119
131
  alignItems: "center",
120
132
  bgcolor: "success.lighter",
121
133
  border: "1px solid",
122
134
  borderColor: "success.main",
123
135
  borderRadius: "8px",
124
- ...e.categoryStrip && {
136
+ ...t.categoryStrip && {
125
137
  borderTopLeftRadius: 0,
126
138
  borderTopRightRadius: 0,
127
139
  borderTop: 0
128
140
  },
129
141
  flexDirection: "row",
130
- ...e.rowSx
142
+ ...t.rowSx
131
143
  },
132
144
  children: [/* @__PURE__ */ o(n, {
133
145
  sx: {
134
146
  display: "flex",
135
147
  flexShrink: 0
136
148
  },
137
- children: $
138
- }), /* @__PURE__ */ t(r, {
149
+ children: F
150
+ }), /* @__PURE__ */ e(r, {
139
151
  sx: {
140
152
  flex: "1 0 0",
141
153
  minWidth: 0
142
154
  },
143
155
  children: [
144
- e.secondaryPosition === "above" && T,
145
- A,
146
- e.secondaryPosition === "below" && T
156
+ t.secondaryPosition === "above" && T,
157
+ P,
158
+ t.secondaryPosition === "below" && T
147
159
  ]
148
160
  })]
149
161
  })]
150
162
  })]
151
163
  });
152
164
  }
153
- return /* @__PURE__ */ t(r, {
165
+ return /* @__PURE__ */ e(r, {
154
166
  sx: {
155
167
  p: 16,
156
- ...e
168
+ ...t
157
169
  },
158
- children: [a && /* @__PURE__ */ o(E, { headerText: a }), /* @__PURE__ */ t(r, {
170
+ children: [a && /* @__PURE__ */ o(q, { headerText: a }), /* @__PURE__ */ e(r, {
159
171
  sx: {
160
172
  alignItems: "center",
161
173
  bgcolor: "background.paper",
@@ -167,36 +179,36 @@ var K = {
167
179
  gap: 16,
168
180
  p: 16,
169
181
  width: "100%",
170
- ...(x || D || _?.guid) && { flexDirection: "row" }
182
+ ...(c || G || R?.guid) && { flexDirection: "row" }
171
183
  },
172
- children: [/* @__PURE__ */ o(O, {
173
- logo: _,
184
+ children: [/* @__PURE__ */ o(K, {
185
+ logo: R,
174
186
  slot: i,
175
- variant: l
176
- }), /* @__PURE__ */ t(r, { children: [d != null && /* @__PURE__ */ o(s, {
187
+ variant: m
188
+ }), /* @__PURE__ */ e(r, { children: [l != null && /* @__PURE__ */ o(s, {
177
189
  variant: "h1",
178
- children: k(d, "0,0.00")
179
- }), /* @__PURE__ */ t(r, {
190
+ children: k(l, "0,0.00")
191
+ }), /* @__PURE__ */ e(r, {
180
192
  sx: {
181
193
  gap: 8,
182
194
  flexDirection: "row",
183
195
  alignItems: "center"
184
196
  },
185
- children: [e?.sub_logo && /* @__PURE__ */ o(q, {
197
+ children: [t?.sub_logo && /* @__PURE__ */ o(Q, {
186
198
  color: "warning",
187
199
  fill: !0,
188
- name: e.sub_logo,
200
+ name: t.sub_logo,
189
201
  size: 20
190
- }), R && /* @__PURE__ */ o(s, {
202
+ }), w && /* @__PURE__ */ o(s, {
191
203
  variant: "body2",
192
- children: R
204
+ children: w
193
205
  })]
194
206
  })] })]
195
207
  })]
196
208
  });
197
209
  };
198
210
  export {
199
- po as default
211
+ bo as default
200
212
  };
201
213
 
202
214
  //# sourceMappingURL=AccountBlock.es.js.map