@mx-cartographer/experiences 9.7.2 → 9.7.3

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 (42) hide show
  1. package/CHANGELOG.md +4 -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/User.d.ts +1 -0
  33. package/dist/core/types/index.d.ts +1 -0
  34. package/dist/core/types/localization/CommonCopy.d.ts +15 -0
  35. package/dist/dashboard/Dashboard.es.js +68 -36
  36. package/dist/dashboard/Dashboard.es.js.map +1 -1
  37. package/dist/dashboard/WelcomeDialog.d.ts +7 -0
  38. package/dist/dashboard/WelcomeDialog.es.js +281 -0
  39. package/dist/dashboard/WelcomeDialog.es.js.map +1 -0
  40. package/dist/dashboard/index.d.ts +2 -0
  41. package/dist/dashboard/index.es.js +4 -2
  42. package/package.json +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"UserStore.es.js","names":[],"sources":["../../../src/core/stores/UserStore.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { UserApi } from '../api'\nimport type { User, UserFeature, UserInsightProfile, UserProfile } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class UserStore {\n globalStore: GlobalStore\n api: UserApi = new UserApi('/', '')\n\n userFeatures: UserFeature[] = []\n userFeaturesLoaded: boolean = false\n userInsightProfile: UserInsightProfile | null = null\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new UserApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n get userProfile() {\n return this.globalStore.appDataStore.userProfile\n }\n\n get user() {\n return this.globalStore.appDataStore.user\n }\n\n setUserFeatures = (features: UserFeature[]) => {\n this.userFeatures = features\n this.userFeaturesLoaded = true\n }\n\n loadUserFeatures = async () => {\n try {\n const features = await this.api.getUserFeatures()\n this.setUserFeatures(features)\n } catch (e) {\n this.captureError('loadUserFeatures', e)\n this.setUserFeatures([])\n }\n }\n\n updateUser = async (user: User) => {\n try {\n const updatedUser = await this.api.updateUser(user)\n\n this.globalStore.appDataStore.setUser(updatedUser)\n } catch (error) {\n this.captureError('updateUser', error)\n throw error\n }\n }\n\n updateUserProfile = async (userProfile: UserProfile) => {\n try {\n const updatedProfile = await this.api.updateUserProfile(userProfile)\n\n this.globalStore.appDataStore.setUserProfile(updatedProfile)\n } catch (error) {\n this.captureError('updateUserProfile', error)\n }\n }\n\n /**\n * Seeds the profile. The host (pulse) loads `user_insight_profile` and pushes it in here;\n * experiences itself never fetches it.\n */\n setUserInsightProfile = (profile: UserInsightProfile | null) => {\n this.userInsightProfile = profile\n }\n\n /**\n * Merges `fields` into the seeded profile and PUTs the whole profile. The endpoint is an\n * upsert that writes every profile field from the request, so a partial body would null\n * the fields it omits; the merge is what keeps them. Throws if the host has not seeded the\n * profile yet, and rethrows API failures, so a caller driving UI state (e.g. an insight\n * CTA) reports the error instead of silently treating the save as done.\n */\n updateUserInsightProfile = async (fields: Partial<UserInsightProfile>) => {\n if (!this.userInsightProfile) {\n throw new Error('User insight profile has not been loaded; refusing a partial PUT')\n }\n\n try {\n const updated = await this.api.updateUserInsightProfile({\n ...this.userInsightProfile,\n ...fields,\n })\n\n runInAction(() => {\n this.userInsightProfile = updated\n })\n\n return updated\n } catch (error) {\n this.captureError('updateUserInsightProfile', error)\n throw error\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'UserStore', action })\n}\n"],"mappings":";;AAOA,IAAa,IAAb,MAAuB;AAAA,EACrB;AAAA,EACA,MAAe,IAAI,EAAQ,KAAK,EAAE;AAAA,EAElC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,qBAAgD;AAAA,EAEhD,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAQ,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAE1F,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,IAAI,cAAc;AAChB,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,IAAI,OAAO;AACT,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,kBAAA,CAAmB,MAA4B;AAC7C,SAAK,eAAe,GACpB,KAAK,qBAAqB;AAAA,EAC5B;AAAA,EAEA,mBAAmB,YAAY;AAC7B,QAA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ent":["import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { UserApi } from '../api'\nimport type { User, UserFeature, UserInsightProfile, UserProfile } from '../types'\n\nimport { GlobalStore } from './GlobalStore'\n\nexport class UserStore {\n globalStore: GlobalStore\n api: UserApi = new UserApi('/', '')\n\n userFeatures: UserFeature[] = []\n userFeaturesLoaded: boolean = false\n userInsightProfile: UserInsightProfile | null = null\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new UserApi(globalStore.endpoint, globalStore.sessionToken, globalStore.onError)\n\n makeAutoObservable(this)\n }\n\n get userProfile() {\n return this.globalStore.appDataStore.userProfile\n }\n\n get user() {\n return this.globalStore.appDataStore.user\n }\n\n setUserFeatures = (features: UserFeature[]) => {\n this.userFeatures = features\n this.userFeaturesLoaded = true\n }\n\n loadUserFeatures = async () => {\n try {\n const features = await this.api.getUserFeatures()\n this.setUserFeatures(features)\n } catch (e) {\n this.captureError('loadUserFeatures', e)\n this.setUserFeatures([])\n }\n }\n\n acceptTerms = async () => {\n if (!this.user) {\n // Report this store-level throw ourselves; unlike the updateUser API failure below,\n // it never passes through updateUser's own captureError.\n const error = new Error('Cannot accept terms: user not loaded.')\n this.captureError('acceptTerms', error)\n throw error\n }\n\n const updatedUser = await this.updateUser({ ...this.user, has_accepted_terms: true })\n\n if (!updatedUser?.has_accepted_terms) {\n const error = new Error('Failed to persist terms acceptance.')\n this.captureError('acceptTerms', error)\n throw error\n }\n }\n\n updateUser = async (user: User) => {\n try {\n const updatedUser = await this.api.updateUser(user)\n\n // Only commit a well-formed response. A 2xx with an unexpected body (missing\n // `user`) must not wipe the loaded user, which would clear `has_accepted_terms`\n // and let a retry slip past the consent gate without persisting.\n if (updatedUser) {\n this.globalStore.appDataStore.setUser(updatedUser)\n }\n\n return updatedUser\n } catch (error) {\n this.captureError('updateUser', error)\n throw error\n }\n }\n\n updateUserProfile = async (userProfile: UserProfile) => {\n try {\n const updatedProfile = await this.api.updateUserProfile(userProfile)\n\n this.globalStore.appDataStore.setUserProfile(updatedProfile)\n } catch (error) {\n this.captureError('updateUserProfile', error)\n }\n }\n\n /**\n * Seeds the profile. The host (pulse) loads `user_insight_profile` and pushes it in here;\n * experiences itself never fetches it.\n */\n setUserInsightProfile = (profile: UserInsightProfile | null) => {\n this.userInsightProfile = profile\n }\n\n /**\n * Merges `fields` into the seeded profile and PUTs the whole profile. The endpoint is an\n * upsert that writes every profile field from the request, so a partial body would null\n * the fields it omits; the merge is what keeps them. Throws if the host has not seeded the\n * profile yet, and rethrows API failures, so a caller driving UI state (e.g. an insight\n * CTA) reports the error instead of silently treating the save as done.\n */\n updateUserInsightProfile = async (fields: Partial<UserInsightProfile>) => {\n if (!this.userInsightProfile) {\n throw new Error('User insight profile has not been loaded; refusing a partial PUT')\n }\n\n try {\n const updated = await this.api.updateUserInsightProfile({\n ...this.userInsightProfile,\n ...fields,\n })\n\n runInAction(() => {\n this.userInsightProfile = updated\n })\n\n return updated\n } catch (error) {\n this.captureError('updateUserInsightProfile', error)\n throw error\n }\n }\n\n private captureError = (action: string, error: unknown) =>\n this.globalStore.captureException(error, { store: 'UserStore', action })\n}\n"],"mappings":";;AAOA,IAAa,IAAb,MAAuB;AAAA,EACrB;AAAA,EACA,MAAe,IAAI,EAAQ,KAAK,EAAE;AAAA,EAElC,eAA8B,CAAC;AAAA,EAC/B,qBAA8B;AAAA,EAC9B,qBAAgD;AAAA,EAEhD,YAAY,GAA0B;AACpC,SAAK,cAAc,GACnB,KAAK,MAAM,IAAI,EAAQ,EAAY,UAAU,EAAY,cAAc,EAAY,OAAO,GAE1F,EAAmB,IAAI;AAAA,EACzB;AAAA,EAEA,IAAI,cAAc;AAChB,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,IAAI,OAAO;AACT,WAAO,KAAK,YAAY,aAAa;AAAA,EACvC;AAAA,EAEA,kBAAA,CAAmB,MAA4B;AAC7C,SAAK,eAAe,GACpB,KAAK,qBAAqB;AAAA,EAC5B;AAAA,E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AAA,QACtD,GAAG,KAAK;AAAA,QACR,GAAG;AAAA,MACL,CAAC;AAED,aAAA,EAAA,MAAkB;AAChB,aAAK,qBAAqB;AAAA,MAC5B,CAAC,GAEM;AAAA,IACT,SAAS,GAAO;AACd,iBAAK,aAAa,4BAA4B,CAAK,GAC7C;AAAA,IACR;AAAA,EACF;AAAA,EAEA,eAAA,CAAwB,GAAgB,MACtC,KAAK,YAAY,iBAAiB,GAAO;AAAA,IAAE,OAAO;AAAA,IAAa,QAAA;AAAA,EAAO,CAAC;AAC3E"}
@@ -1,4 +1,5 @@
1
1
  export { AccountStore } from './AccountStore';
2
+ export { AgreementStore } from './AgreementStore';
2
3
  export { AppDataStore } from './AppDataStore';
3
4
  export { AnalyticsStore } from './AnalyticsStore';
4
5
  export { BeatStore } from './BeatStore';
@@ -0,0 +1,6 @@
1
+ export interface Agreement {
2
+ title: string;
3
+ text: string;
4
+ agreement_type?: number;
5
+ type?: string;
6
+ }
@@ -7,6 +7,7 @@ export interface User {
7
7
  email_is_verified: boolean;
8
8
  external_guid?: string | null;
9
9
  first_name?: string | null;
10
+ has_accepted_terms?: boolean;
10
11
  last_name?: string | null;
11
12
  phone?: string | null;
12
13
  phone_is_verified: boolean;
@@ -1,4 +1,5 @@
1
1
  export type { Account, DetailedAccount, HistoricalAccountBalance, Member, MonthlyAccountBalance, } from './Account';
2
+ export type { Agreement } from './Agreement';
2
3
  export { AccountIcon, AccountIconVariants, AccountSubType, AccountType, AccountTypeName, ConnectionStatus, ConnectionStatusEnums, ErrorStatuses, MfaStatuses, NonConnectedStatuses, ProcessingStatuses, PropertyType, PropertyTypeName, StatusName, } from './Account';
3
4
  export type { AnalyticsEvent, AnalyticsPageview, BasicAnalyticsEvent, BasicAnalyticsPageview, AnalyticsSession, AnalyticEventFunction, AnalyticPageviewFunction, AnalyticsSessionInstance, } from './Analytics';
4
5
  export type { AppConfig, AppData, Banner, ClientConfig, Config, Options, StyleConfig, } from './AppData';
@@ -65,4 +65,19 @@ export interface CommonCopy {
65
65
  view_more: string;
66
66
  view_table: string;
67
67
  view_toggle: string;
68
+ welcome_dialog: {
69
+ title_line_1: string;
70
+ title_line_2: string;
71
+ financial_views_title: string;
72
+ financial_views_description: string;
73
+ smart_spending_title: string;
74
+ smart_spending_description: string;
75
+ budgets_title: string;
76
+ budgets_description: string;
77
+ continue_button: string;
78
+ terms_agreement: string;
79
+ terms_link: string;
80
+ terms_error: string;
81
+ accept_error: string;
82
+ };
68
83
  }
@@ -1,99 +1,131 @@
1
- import { useGlobalStore as x } from "../common/context/hooks.es.js";
2
- import { useScreenSize as v } from "../common/hooks/useScreenSize.es.js";
3
- import { useWidgetLoadTimer as b } from "../common/hooks/useWidgetLoadTimer.es.js";
4
- import { Banner as S } from "../common/components/Banner.es.js";
5
- import D from "./Greeting.es.js";
6
- import { DashboardLocation as c } from "./constants/Dashboard.es.js";
1
+ import { useGlobalCopyStore as M, useGlobalStore as _ } from "../common/context/hooks.es.js";
2
+ import { useScreenSize as k } from "../common/hooks/useScreenSize.es.js";
3
+ import { useWidgetLoadTimer as G } from "../common/hooks/useWidgetLoadTimer.es.js";
4
+ import { Banner as T } from "../common/components/Banner.es.js";
5
+ import A from "./Greeting.es.js";
6
+ import E from "./WelcomeDialog.es.js";
7
+ import { DashboardLocation as d } from "./constants/Dashboard.es.js";
7
8
  import r from "react";
8
- import { observer as z } from "mobx-react-lite";
9
- import d from "@mui/material/Stack";
10
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
11
- import o from "@mui/material/Skeleton";
12
- import m from "@mui/material/Grid";
13
- var M = ({ widgets: s, isLoading: n }) => {
14
- const { isDesktop: h, isMobile: l } = v(), { copyStore: p } = x();
15
- b({
9
+ import { observer as F } from "mobx-react-lite";
10
+ import a from "@mui/material/Stack";
11
+ import { jsx as e, jsxs as c } from "react/jsx-runtime";
12
+ import t from "@mui/material/Skeleton";
13
+ import j from "@mui/material/Alert";
14
+ import B from "@mui/material/Snackbar";
15
+ import s from "@mui/material/Grid";
16
+ var O = ({ widgets: l, isLoading: n }) => {
17
+ const { isDesktop: h, isMobile: f } = k(), { agreementStore: g, copyStore: S, globalUiStore: b, userStore: v } = _(), { common: D } = M(), [x, p] = r.useState(!1), [u, m] = r.useState(""), w = b.shouldShowWelcomeDialog && !x, W = async () => {
18
+ if (g.hasError) {
19
+ p(!0);
20
+ return;
21
+ }
22
+ try {
23
+ await v.acceptTerms(), p(!0);
24
+ } catch {
25
+ m(D.welcome_dialog.accept_error);
26
+ }
27
+ };
28
+ G({
16
29
  widgetName: "Dashboard",
17
30
  isLoaded: !n
18
31
  });
19
- const t = r.useMemo(() => s.filter((e) => e.location !== c.Disabled).sort((e, g) => e.index - g.index), [s]), u = r.useMemo(() => t.filter((e) => e.location === c.Main), [t]), f = r.useMemo(() => t.filter((e) => e.location === c.RightSide), [t]);
20
- return /* @__PURE__ */ a(m, {
32
+ const i = r.useMemo(() => l.filter((o) => o.location !== d.Disabled).sort((o, C) => o.index - C.index), [l]), y = r.useMemo(() => i.filter((o) => o.location === d.Main), [i]), z = r.useMemo(() => i.filter((o) => o.location === d.RightSide), [i]);
33
+ return /* @__PURE__ */ c(s, {
21
34
  container: !0,
22
- spacing: l ? 0 : 24,
35
+ spacing: f ? 0 : 24,
23
36
  children: [
24
- /* @__PURE__ */ i(m, {
37
+ /* @__PURE__ */ e(E, {
38
+ isOpen: w,
39
+ onContinue: W
40
+ }),
41
+ /* @__PURE__ */ e(B, {
42
+ anchorOrigin: {
43
+ vertical: "bottom",
44
+ horizontal: "right"
45
+ },
46
+ autoHideDuration: 3500,
47
+ onClose: () => m(""),
48
+ open: !!u,
49
+ children: /* @__PURE__ */ e(j, {
50
+ onClose: () => m(""),
51
+ severity: "error",
52
+ variant: "filled",
53
+ children: u
54
+ })
55
+ }),
56
+ /* @__PURE__ */ e(s, {
25
57
  size: 12,
26
58
  sx: { pt: 16 },
27
- children: p.isInitialized && /* @__PURE__ */ i(D, {})
59
+ children: S.isInitialized && /* @__PURE__ */ e(A, {})
28
60
  }),
29
- /* @__PURE__ */ a(m, {
61
+ /* @__PURE__ */ c(s, {
30
62
  size: {
31
63
  xs: 12,
32
64
  lg: 8
33
65
  },
34
66
  children: [
35
- /* @__PURE__ */ i(S, {}),
36
- n && /* @__PURE__ */ a(d, {
67
+ /* @__PURE__ */ e(T, {}),
68
+ n && /* @__PURE__ */ c(a, {
37
69
  direction: "column",
38
70
  spacing: 24,
39
71
  children: [
40
- /* @__PURE__ */ i(o, {
72
+ /* @__PURE__ */ e(t, {
41
73
  height: 100,
42
74
  variant: "rounded",
43
75
  width: "100%"
44
76
  }),
45
- /* @__PURE__ */ i(o, {
77
+ /* @__PURE__ */ e(t, {
46
78
  height: 300,
47
79
  variant: "rounded",
48
80
  width: "100%"
49
81
  }),
50
- /* @__PURE__ */ i(o, {
82
+ /* @__PURE__ */ e(t, {
51
83
  height: 300,
52
84
  variant: "rounded",
53
85
  width: "100%"
54
86
  })
55
87
  ]
56
88
  }),
57
- !n && /* @__PURE__ */ i(d, {
89
+ !n && /* @__PURE__ */ e(a, {
58
90
  direction: "column",
59
91
  spacing: 24,
60
- children: h ? u.map((e) => /* @__PURE__ */ i(r.Fragment, { children: e.component }, e.index)) : t.map((e) => /* @__PURE__ */ i(r.Fragment, { children: e.component }, e.index))
92
+ children: h ? y.map((o) => /* @__PURE__ */ e(r.Fragment, { children: o.component }, o.index)) : i.map((o) => /* @__PURE__ */ e(r.Fragment, { children: o.component }, o.index))
61
93
  })
62
94
  ]
63
95
  }),
64
- h && /* @__PURE__ */ i(m, {
96
+ h && /* @__PURE__ */ e(s, {
65
97
  size: { lg: 4 },
66
- children: n ? /* @__PURE__ */ a(d, {
98
+ children: n ? /* @__PURE__ */ c(a, {
67
99
  direction: "column",
68
100
  spacing: 24,
69
101
  children: [
70
- /* @__PURE__ */ i(o, {
102
+ /* @__PURE__ */ e(t, {
71
103
  height: 200,
72
104
  variant: "rounded",
73
105
  width: "100%"
74
106
  }),
75
- /* @__PURE__ */ i(o, {
107
+ /* @__PURE__ */ e(t, {
76
108
  height: 100,
77
109
  variant: "rounded",
78
110
  width: "100%"
79
111
  }),
80
- /* @__PURE__ */ i(o, {
112
+ /* @__PURE__ */ e(t, {
81
113
  height: 300,
82
114
  variant: "rounded",
83
115
  width: "100%"
84
116
  })
85
117
  ]
86
- }) : /* @__PURE__ */ i(d, {
118
+ }) : /* @__PURE__ */ e(a, {
87
119
  direction: "column",
88
120
  spacing: 24,
89
- children: f.map((e) => /* @__PURE__ */ i(r.Fragment, { children: e.component }, e.index))
121
+ children: z.map((o) => /* @__PURE__ */ e(r.Fragment, { children: o.component }, o.index))
90
122
  })
91
123
  })
92
124
  ]
93
125
  });
94
- }, T = z(M);
126
+ }, $ = F(O);
95
127
  export {
96
- T as default
128
+ $ as default
97
129
  };
98
130
 
99
131
  //# sourceMappingURL=Dashboard.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dashboard.es.js","names":[],"sources":["../../src/dashboard/Dashboard.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Grid from '@mui/material/Grid'\nimport Skeleton from '@mui/material/Skeleton'\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalStore, useScreenSize, useWidgetLoadTimer } from '../common'\n\nimport { Banner } from '../common/components/Banner'\n\nimport Greeting from './Greeting'\nimport { DashboardLocation } from './constants/Dashboard'\nimport type { DashboardWidget } from './types/DashboardTypes'\n\nexport interface DashboardProps {\n widgets: DashboardWidget[]\n isLoading: boolean\n}\n\nconst Dashboard: React.FC<DashboardProps> = ({ widgets, isLoading }) => {\n const { isDesktop, isMobile } = useScreenSize()\n const { copyStore } = useGlobalStore()\n\n useWidgetLoadTimer({\n widgetName: 'Dashboard',\n isLoaded: !isLoading,\n })\n\n const sortedWidgets = React.useMemo(\n () =>\n widgets\n .filter((widget) => widget.location !== DashboardLocation.Disabled)\n .sort((w1, w2) => w1.index - w2.index),\n [widgets],\n )\n\n const mainWidgets = React.useMemo(\n () => sortedWidgets.filter((widget) => widget.location === DashboardLocation.Main),\n [sortedWidgets],\n )\n\n const sideWidgets = React.useMemo(\n () => sortedWidgets.filter((widget) => widget.location === DashboardLocation.RightSide),\n [sortedWidgets],\n )\n\n return (\n <Grid container={true} spacing={isMobile ? 0 : 24}>\n <Grid size={12} sx={{ pt: 16 }}>\n {copyStore.isInitialized && <Greeting />}\n </Grid>\n\n {/* Main Column */}\n <Grid size={{ xs: 12, lg: 8 }}>\n <Banner />\n {isLoading && (\n <Stack direction=\"column\" spacing={24}>\n <Skeleton height={100} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n </Stack>\n )}\n {!isLoading && (\n <Stack direction=\"column\" spacing={24}>\n {isDesktop\n ? mainWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))\n : sortedWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))}\n </Stack>\n )}\n </Grid>\n\n {/* Right Column */}\n {isDesktop && (\n <Grid size={{ lg: 4 }}>\n {isLoading ? (\n <Stack direction=\"column\" spacing={24}>\n <Skeleton height={200} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={100} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n </Stack>\n ) : (\n <Stack direction=\"column\" spacing={24}>\n {sideWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))}\n </Stack>\n )}\n </Grid>\n )}\n </Grid>\n )\n}\n\nexport default observer(Dashboard)\n"],"mappings":";;;;;;;;;;;;AAoBA,IAAM,IAAA,CAAuC,EAAE,SAAA,GAAS,WAAA,EAAA,MAAgB;AACtE,QAAM,EAAE,WAAA,GAAW,UAAA,EAAA,IAAa,EAAc,GACxC,EAAE,WAAA,EAAA,IAAc,EAAe;AAErC,EAAA,EAAmB;AAAA,IACjB,YAAY;A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esContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Alert from '@mui/material/Alert'\nimport Grid from '@mui/material/Grid'\nimport Skeleton from '@mui/material/Skeleton'\nimport Snackbar from '@mui/material/Snackbar'\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalCopyStore, useGlobalStore, useScreenSize, useWidgetLoadTimer } from '../common'\n\nimport { Banner } from '../common/components/Banner'\n\nimport Greeting from './Greeting'\nimport WelcomeDialog from './WelcomeDialog'\nimport { DashboardLocation } from './constants/Dashboard'\nimport type { DashboardWidget } from './types/DashboardTypes'\n\nexport interface DashboardProps {\n widgets: DashboardWidget[]\n isLoading: boolean\n}\n\nconst Dashboard: React.FC<DashboardProps> = ({ widgets, isLoading }) => {\n const { isDesktop, isMobile } = useScreenSize()\n const { agreementStore, copyStore, globalUiStore, userStore } = useGlobalStore()\n const { common: commonCopy } = useGlobalCopyStore()\n\n const [termsDismissed, setTermsDismissed] = React.useState(false)\n const [acceptError, setAcceptError] = React.useState('')\n const showWelcomeDialog = globalUiStore.shouldShowWelcomeDialog && !termsDismissed\n\n const handleAcceptTerms = async () => {\n // The user tried to read the terms but they failed to load: let them proceed for this\n // session without recording acceptance, so they're re-prompted next session and get a\n // real chance to view the terms before we persist consent. Never trap them.\n if (agreementStore.hasError) {\n setTermsDismissed(true)\n return\n }\n\n // Otherwise the terms were available (reading them is optional), so the click is the\n // consent and acceptance is persisted.\n try {\n await userStore.acceptTerms()\n setTermsDismissed(true)\n } catch {\n // A failed persist records nothing server-side (and is already reported via\n // captureException in the store), so hold the gate, surface the error, and\n // re-prompt next session rather than optimistically dismissing.\n setAcceptError(commonCopy.welcome_dialog.accept_error)\n }\n }\n\n useWidgetLoadTimer({\n widgetName: 'Dashboard',\n isLoaded: !isLoading,\n })\n\n const sortedWidgets = React.useMemo(\n () =>\n widgets\n .filter((widget) => widget.location !== DashboardLocation.Disabled)\n .sort((w1, w2) => w1.index - w2.index),\n [widgets],\n )\n\n const mainWidgets = React.useMemo(\n () => sortedWidgets.filter((widget) => widget.location === DashboardLocation.Main),\n [sortedWidgets],\n )\n\n const sideWidgets = React.useMemo(\n () => sortedWidgets.filter((widget) => widget.location === DashboardLocation.RightSide),\n [sortedWidgets],\n )\n\n return (\n <Grid container={true} spacing={isMobile ? 0 : 24}>\n <WelcomeDialog isOpen={showWelcomeDialog} onContinue={handleAcceptTerms} />\n\n <Snackbar\n anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}\n autoHideDuration={3500}\n onClose={() => setAcceptError('')}\n open={Boolean(acceptError)}\n >\n <Alert onClose={() => setAcceptError('')} severity=\"error\" variant=\"filled\">\n {acceptError}\n </Alert>\n </Snackbar>\n\n <Grid size={12} sx={{ pt: 16 }}>\n {copyStore.isInitialized && <Greeting />}\n </Grid>\n\n {/* Main Column */}\n <Grid size={{ xs: 12, lg: 8 }}>\n <Banner />\n {isLoading && (\n <Stack direction=\"column\" spacing={24}>\n <Skeleton height={100} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n </Stack>\n )}\n {!isLoading && (\n <Stack direction=\"column\" spacing={24}>\n {isDesktop\n ? mainWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))\n : sortedWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))}\n </Stack>\n )}\n </Grid>\n\n {/* Right Column */}\n {isDesktop && (\n <Grid size={{ lg: 4 }}>\n {isLoading ? (\n <Stack direction=\"column\" spacing={24}>\n <Skeleton height={200} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={100} variant=\"rounded\" width=\"100%\" />\n <Skeleton height={300} variant=\"rounded\" width=\"100%\" />\n </Stack>\n ) : (\n <Stack direction=\"column\" spacing={24}>\n {sideWidgets.map((widget) => (\n <React.Fragment key={widget.index}>{widget.component}</React.Fragment>\n ))}\n </Stack>\n )}\n </Grid>\n )}\n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SAAS;AAAA,YAChC,UAAA,IACG,EAAY,IAAA,CAAK,MACf,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAoC,EAAO,UAA0B,GAAhD,EAAO,KAAyC,CACtE,IACD,EAAc,IAAA,CAAK,MACjB,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAoC,EAAO,UAA0B,GAAhD,EAAO,KAAyC,CACtE;AAAA,UACA,CAAA;AAAA,QAEL;AAAA;MAGL,KACC,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM,EAAE,IAAI,EAAE;AAAA,QACjB,UAAA,IACC,gBAAA,EAAC,GAAD;AAAA,UAAO,WAAU;AAAA,UAAS,SAAS;AAAA,UAAnC,UAAA;AAAA,YACE,gBAAA,EAAC,GAAD;AAAA,cAAU,QAAQ;AAAA,cAAK,SAAQ;AAAA,cAAU,OAAM;AAAA,YAAQ,CAAA;AAAA,YACvD,gBAAA,EAAC,GAAD;AAAA,cAAU,QAAQ;AAAA,cAAK,SAAQ;AAAA,cAAU,OAAM;AAAA,YAAQ,CAAA;AAAA,YACvD,gBAAA,EAAC,GAAD;AAAA,cAAU,QAAQ;AAAA,cAAK,SAAQ;AAAA,cAAU,OAAM;AAAA,YAAQ,CAAA;AAAA,UAClD;AAAA,QAEP,CAAA,IAAA,gBAAA,EAAC,GAAD;AAAA,UAAO,WAAU;AAAA,UAAS,SAAS;AAAA,UAChC,UAAA,EAAY,IAAA,CAAK,MAChB,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAoC,EAAO,UAA0B,GAAhD,EAAO,KAAyC,CACtE;AAAA,QACI,CAAA;AAAA,MAEL,CAAA;AAAA,IAEJ;AAAA;AAEV,GAEA,IAAe,EAAS,CAAS"}
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ export interface WelcomeDialogProps {
3
+ isOpen: boolean;
4
+ onContinue: () => void;
5
+ }
6
+ declare const _default: React.FunctionComponent<WelcomeDialogProps>;
7
+ export default _default;
@@ -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;AAA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AAC,GAAD;AAAA,cAAM,MAAM;AAAA,cAAM,SAAQ;AAAA,cACvB,UAAA,EAAQ;AAAA,YACL,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,cAAG,OAAM;AAAA,cAAiB,UAAU;AAAA,cAAO,SAAQ;AAAA,cAChD,UAAA,EAAQ;AAAA,YACR,CAAA,CACE;AAAA,UACF,CAAA,CAAA;AAAA,QAxBA,GAAA,EAAQ,KAwBR,CACR;AAAA,MACI,CAAA;AAAA,MAEP,gBAAA,EAAC,GAAD,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,QACE,WAAW;AAAA,QACX,SAAS;AAAA,QACT,IAAI;AAAA,UAAE,UAAU;AAAA,UAAK,IAAI;AAAA,UAAI,IAAI;AAAA,QAAO;AAAA,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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.7.2",
3
+ "version": "9.7.3",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",
@@ -224,6 +224,7 @@
224
224
  "d3": "^7.9.0",
225
225
  "d3-force": "^3.0.0",
226
226
  "date-fns": "^4.4.0",
227
+ "dompurify": "^3.4.8",
227
228
  "mobx": "^6.16.1",
228
229
  "mobx-react-lite": "^4.1.1",
229
230
  "numeral": "^2.0.6",