@mx-cartographer/experiences 9.7.1 → 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 (84) hide show
  1. package/CHANGELOG.md +11 -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/InsightsInstanceSlotData.d.ts +6 -2
  33. package/dist/core/types/InsightsInstanceSlotData.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/finstrong/components/ManageDOB.es.js +16 -16
  45. package/dist/goals/components/GoalList.es.js +1 -1
  46. package/dist/goals/components/actions/BirthdayAction.es.js +11 -11
  47. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js +9 -9
  48. package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js +8 -8
  49. package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js +9 -9
  50. package/dist/insights-v2/actionBlocks/TransactionDetailsBlock/TransactionDetailsBlock.es.js +4 -4
  51. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js +58 -58
  52. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/TransactionHistoryBlock.es.js.map +1 -1
  53. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.d.ts +1 -3
  54. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js +14 -13
  55. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/useTransactionHistory.es.js.map +1 -1
  56. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.d.ts +8 -2
  57. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js +56 -36
  58. package/dist/insights-v2/actionBlocks/TransactionHistoryBlock/utils.es.js.map +1 -1
  59. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.d.ts +7 -3
  60. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js +30 -32
  61. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/BarchartBlock.es.js.map +1 -1
  62. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.d.ts +3 -2
  63. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js +16 -15
  64. package/dist/insights-v2/blocks/ChartBlocks/BarchartBlock/utils.es.js.map +1 -1
  65. package/dist/insights-v2/blocks/ComponentBlocks/AccountBlock/IconComponent.es.js +5 -5
  66. package/dist/insights-v2/blocks/ComponentBlocks/DebtsBlock/DebtsBlock.es.js +6 -6
  67. package/dist/insights-v2/blocks/ComponentBlocks/TransactionBlock/TransactionBlock.es.js +4 -4
  68. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingBillBlock/UpcomingBillBlock.es.js +6 -6
  69. package/dist/insights-v2/blocks/ComponentBlocks/UpcomingSubscriptionBlock/UpcomingSubscriptionBlock.es.js +1 -1
  70. package/dist/insights-v2/components/BaseLayout.es.js +24 -24
  71. package/dist/insights-v2/components/CompactInsightCard.d.ts +4 -2
  72. package/dist/insights-v2/components/CompactInsightCard.es.js +91 -59
  73. package/dist/insights-v2/components/CompactInsightCard.es.js.map +1 -1
  74. package/dist/insights-v2/components/chartblocks/EmptyBarChart.es.js +4 -4
  75. package/dist/insights-v2/index.es.js +122 -121
  76. package/dist/insights-v2/mappings/blocks.es.js +112 -99
  77. package/dist/insights-v2/mappings/blocks.es.js.map +1 -1
  78. package/dist/microinsights/cards/InsightCard.es.js +10 -10
  79. package/dist/recurringtransactions/components/PaymentSchedule.es.js +11 -11
  80. package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js +16 -16
  81. package/dist/settings/components/profile/ProfileTab.es.js +33 -33
  82. package/dist/transactions/components/shared/TransactionDetails.es.js +5 -4
  83. package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
  84. 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,QAAI;AACF,YAAM,IAAW,MAAM,KAAK,IAAI,gBAAgB;AAChD,WAAK,gBAAgB,CAAQ;AAAA,IAC/B,SAAS,GAAG;AACV,WAAK,aAAa,oBAAoB,CAAC,GACvC,KAAK,gBAAgB,CAAC,CAAC;AAAA,IACzB;AAAA,EACF;AAAA,EAEA,aAAa,OAAO,MAAe;AACjC,QAAI;AACF,YAAM,IAAc,MAAM,KAAK,IAAI,WAAW,CAAI;AAElD,WAAK,YAAY,aAAa,QAAQ,CAAW;AAAA,IACnD,SAAS,GAAO;AACd,iBAAK,aAAa,cAAc,CAAK,GAC/B;AAAA,IACR;AAAA,EACF;AAAA,EAEA,oBAAoB,OAAO,MAA6B;AACtD,QAAI;AACF,YAAM,IAAiB,MAAM,KAAK,IAAI,kBAAkB,CAAW;AAEnE,WAAK,YAAY,aAAa,eAAe,CAAc;AAAA,IAC7D,SAAS,GAAO;AACd,WAAK,aAAa,qBAAqB,CAAK;AAAA,IAC9C;AAAA,EACF;AAAA,EAMA,wBAAA,CAAyB,MAAuC;AAC9D,SAAK,qBAAqB;AAAA,EAC5B;AAAA,EASA,2BAA2B,OAAO,MAAwC;AACxE,QAAI,CAAC,KAAK,mBACR,OAAM,IAAI,MAAM,kEAAkE;AAGpF,QAAI;AACF,YAAM,IAAU,MAAM,KAAK,IAAI,yBAAyB;AAAA,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
+ {"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 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,EAEA,mBAAmB,YAAY;AAC7B,QAAI;AACF,YAAM,IAAW,MAAM,KAAK,IAAI,gBAAgB;AAChD,WAAK,gBAAgB,CAAQ;AAAA,IAC/B,SAAS,GAAG;AACV,WAAK,aAAa,oBAAoB,CAAC,GACvC,KAAK,gBAAgB,CAAC,CAAC;AAAA,IACzB;AAAA,EACF;AAAA,EAEA,cAAc,YAAY;AACxB,QAAI,CAAC,KAAK,MAAM;AAGd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;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
+ }
@@ -1,8 +1,9 @@
1
1
  import { DataSeries, Legends } from '../../core';
2
- export interface InsightsInstanceSlotData extends Partial<BarChartBlockData>, Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
2
+ export interface InsightsInstanceSlotData extends Partial<BudgetBlockData>, Partial<DonutChartBlockData>, Partial<DoubleProgressBarBlockData>, Partial<ImageBlockData>, Partial<AccountBlockData>, Partial<SaveExtraBlockData>, Partial<StepChartBlockData>, Partial<SVGImageBlockData>, Partial<AccountSwitchBlockData>, Partial<TransactionDetailsBlockData>, Partial<CommonProps> {
3
3
  }
4
4
  interface CommonProps {
5
5
  amount?: number;
6
+ ariaLabel?: string;
6
7
  date?: string;
7
8
  legends?: Legends[];
8
9
  category_guid?: string;
@@ -12,8 +13,11 @@ interface CommonProps {
12
13
  primary_transaction_guid?: string;
13
14
  }
14
15
  export interface BarChartBlockData {
16
+ series?: DataSeries;
17
+ category_guid?: string;
15
18
  average_amount?: number;
16
- ariaLabel?: string;
19
+ /** [0] monthly amount, [1] trend. */
20
+ additional_data?: Legends[];
17
21
  }
18
22
  interface Main {
19
23
  value: string;
@@ -1 +1 @@
1
- {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BarChartBlockData>,\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block\nexport interface BarChartBlockData {\n average_amount?: number\n ariaLabel?: string\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AAsIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"InsightsInstanceSlotData.es.js","names":[],"sources":["../../../src/core/types/InsightsInstanceSlotData.ts"],"sourcesContent":["import type { DataSeries, Legends } from '../../core'\n\nexport interface InsightsInstanceSlotData\n extends\n Partial<BudgetBlockData>,\n Partial<DonutChartBlockData>,\n Partial<DoubleProgressBarBlockData>,\n Partial<ImageBlockData>,\n Partial<AccountBlockData>,\n Partial<SaveExtraBlockData>,\n Partial<StepChartBlockData>,\n Partial<SVGImageBlockData>,\n Partial<AccountSwitchBlockData>,\n Partial<TransactionDetailsBlockData>,\n Partial<CommonProps> {}\n\n//when any of the type is used more than one times, we can use the common props\ninterface CommonProps {\n amount?: number\n ariaLabel?: string\n date?: string\n legends?: Legends[]\n category_guid?: string\n data_series?: DataSeries | DataSet[]\n transaction_guids?: string[]\n account_guids?: string[]\n primary_transaction_guid?: string\n}\n\n//BarChart Block: `instance_slot.data` (Insights 2.0)\nexport interface BarChartBlockData {\n series?: DataSeries\n category_guid?: string\n average_amount?: number\n /** [0] monthly amount, [1] trend. */\n additional_data?: Legends[]\n}\n\n//DonutChart Block\ninterface Main {\n value: string\n value_type: string\n label: string\n}\nexport interface DonutChartBlockData {\n main: Main\n}\n\n//DoubleBarChart Block\n// TODO : This has to be revisited again to update the below types based on API response once we have the final shape of the data_series for double bar chart from BE\nexport interface LegendProps extends Legends {\n amount: number\n formattedAmount: string\n label: string\n color?: string\n}\n\nexport interface DataSet extends DataSeries {\n ariaLabelComparison: string\n ariaLabelMain: string\n comparison: number\n formattedComparison: string\n formattedMain: string\n label: string\n main: number\n}\n\n//DoubleProgressBar Block\n\ninterface DoubleProgressBarProps {\n label: string\n value: number\n}\nexport interface DoubleProgressBarBlockData {\n doubleProgressBar: {\n previous: DoubleProgressBarProps\n latest: DoubleProgressBarProps\n }\n}\n\n//Image Block\nexport interface ImageBlockData {\n image: string\n}\n\n//Account Block\nexport interface AccountBlockData {\n sub_text: string\n institution_guid?: string\n institution_name?: string\n icon_name?: string\n /** Header bar text (standard card), or the colored category strip label (deposit cards). */\n header_text?: string\n // Deposit variants (Unified Deposit, Unified Deposit Emergency Fund, Savings Account Deposit)\n /** Merchant guid — renders a real merchant logo in the deposit card when present. */\n merchant_guid?: string\n /** Merchant display name — logo alt text and the payer line under the amount. */\n merchant_name?: string\n /** Secondary label beside the amount, e.g. `On {date}, you saved` or `Balance as of MM/DD/YY`. */\n label?: string\n}\n\nexport interface SaveExtraBlockData {\n /** Styled segments `[lead-in, amount digits, trailing copy]`, e.g. `['Save an extra', '100', 'to help your funds grow']`. */\n primary_text?: string[]\n /** Styled segments `[projected balance, caption]`, e.g. `['$8,313.87', 'After payday & projected expenses']`. */\n secondary_text?: string[]\n /** MakeTransfer drilldown: available balance (both variants). */\n available_balance?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: average monthly spend. */\n avg_monthly_spend?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: how long the balance lasts, overlaid on the timeline SVG (e.g. \"2 months, 11 days\"). */\n time_period?: string\n /** SAVE_AN_EXTRA_100: upcoming expenses (the \"Expenses\" figure). */\n upcoming_expenses?: number\n /** SAVE_AN_EXTRA_100: total remaining after expenses. */\n total_remaining?: number\n /** SAVE_ENOUGH_TO_LIVE_ON: date for the \"Your available balances as of {date}\" line. */\n date?: string\n}\n\n// AccountSwitch Block. State comes from `instance_slot.variant`, not a data flag.\nexport interface AccountSwitchBlockData {\n discovered_institution_guid: string\n discovered_institution_name: string\n held_institution_guid: string\n held_institution_name: string\n}\n\n// StepChart Block\nexport interface StepChartBlockData {\n completed_steps: number\n label_1: string\n label_2?: string\n}\n\n//Budgets Blocks\nexport enum BudgetTierType {\n LOW_BUDGET_TIER = 'LOW',\n MEDIUM_BUDGET_TIER = 'MEDIUM',\n OFF_TRACK_BUDGET_TIER = 'OFF_TRACK',\n}\n\nexport type BudgetTierValue = `${BudgetTierType}`\n\nexport interface BudgetLocalizedPayload {\n primary_text?: string\n amount_left_label?: string\n spent_label?: string\n budgeted_label?: string\n}\n\nexport interface BudgetBlockData {\n budget_percent: number\n budget_tier: BudgetTierValue\n category_guid?: string\n merchant_guid?: string\n spent_amount: number\n budgeted_amount: number\n localized_payload: BudgetLocalizedPayload\n}\n\nexport interface SVGImageBlockData {\n isCIBC?: boolean\n}\n\n// TransactionDetails Action Block\n// The drawer's subject is `InsightsPayload.primary_transaction_guid`; only action configuration\n// lives here.\nexport interface TransactionDetailsBlockData {\n /** `TopActions` member names, e.g. `['Category', 'Date', 'Memo']`. Omit for the defaults. */\n top_actions?: string[]\n /** `BottomActions` member names, e.g. `['MerchantBudget', 'HideTransaction']`. Omit for defaults. */\n bottom_actions?: string[]\n}\n"],"mappings":"AAyIA,IAAY,IAAL,0BAAA,GAAA;AACL,SAAA,EAAA,kBAAA,OACA,EAAA,qBAAA,UACA,EAAA,wBAAA;AACF,GAAA,CAAA,CAAA"}
@@ -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;AAAA,IACZ,UAAU,CAAC;AAAA,EACb,CAAC;AAED,QAAM,IAAgB,EAAM,QAAA,MAExB,EACG,OAAA,CAAQ,MAAW,EAAO,aAAa,EAAkB,QAAQ,EACjE,KAAA,CAAM,GAAI,MAAO,EAAG,QAAQ,EAAG,KAAK,GACzC,CAAC,CAAO,CACV,GAEM,IAAc,EAAM,QAAA,MAClB,EAAc,OAAA,CAAQ,MAAW,EAAO,aAAa,EAAkB,IAAI,GACjF,CAAC,CAAa,CAChB,GAEM,IAAc,EAAM,QAAA,MAClB,EAAc,OAAA,CAAQ,MAAW,EAAO,aAAa,EAAkB,SAAS,GACtF,CAAC,CAAa,CAChB;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IAAM,WAAW;AAAA,IAAM,SAAS,IAAW,IAAI;AAAA,IAA/C,UAAA;AAAA,MACE,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAI,IAAI,EAAE,IAAI,GAAG;AAAA,QAC1B,UAAA,EAAU,iBAAiB,gBAAA,EAAC,GAAD,CAAW,CAAA;AAAA,MACnC,CAAA;AAAA,MAGN,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,UAAE,IAAI;AAAA,UAAI,IAAI;AAAA,QAAE;AAAA,QAA5B,UAAA;AAAA,UACE,gBAAA,EAAC,GAAD,CAAS,CAAA;AAAA,UACR,KACC,gBAAA,EAAC,GAAD;AAA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;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"}
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 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 </Grid>\n )\n}\n\nexport default observer(Dashboard)\n"],"mappings":";;;;;;;;;;;;;;;AAuBA,IAAM,IAAA,CAAuC,EAAE,SAAA,GAAS,WAAA,EAAA,MAAgB;AACtE,QAAM,EAAE,WAAA,GAAW,UAAA,EAAA,IAAa,EAAc,GACxC,EAAE,gBAAA,GAAgB,WAAA,GAAW,eAAA,GAAe,WAAA,EAAA,IAAc,EAAe,GACzE,EAAE,QAAQ,EAAA,IAAe,EAAmB,GAE5C,CAAC,GAAgB,CAAA,IAAqB,EAAM,SAAS,EAAK,GAC1D,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAS,EAAE,GACjD,IAAoB,EAAc,2BAA2B,CAAC,GAE9D,IAAoB,YAAY;AAIpC,QAAI,EAAe,UAAU;AAC3B,MAAA,EAAkB,EAAI;AACtB;AAAA,IACF;AAIA,QAAI;AACF,YAAM,EAAU,YAAY,GAC5B,EAAkB,EAAI;AAAA,IACxB,QAAQ;AAIN,MAAA,EAAe,EAAW,eAAe,YAAY;AAAA,IACvD;AAAA,EACF;AAEA,EAAA,EAAmB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU,CAAC;AAAA,EACb,CAAC;AAED,QAAM,IAAgB,EAAM,QAAA,MAExB,EACG,OAAA,CAAQ,MAAW,EAAO,aAAa,EAAkB,QAAQ,EACjE,KAAA,CAAM,GAAI,MAAO,EAAG,QAAQ,EAAG,KAAK,GACzC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,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