@mx-cartographer/experiences 6.26.0-alpha.sms7 → 6.26.1-alpha.mega1

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 (95) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/dist/AccountStore-DkL93tXL.mjs +317 -0
  3. package/dist/AccountStore-DkL93tXL.mjs.map +1 -0
  4. package/dist/BudgetUtil-CVqAdv-j.mjs +187 -0
  5. package/dist/BudgetUtil-CVqAdv-j.mjs.map +1 -0
  6. package/dist/CashflowStore-gPEEBiXo.mjs +53 -0
  7. package/dist/CashflowStore-gPEEBiXo.mjs.map +1 -0
  8. package/dist/CategoryStore-m7oieLzP.mjs +260 -0
  9. package/dist/CategoryStore-m7oieLzP.mjs.map +1 -0
  10. package/dist/ConnectMiniWidget-CQWafYtQ.mjs +22966 -0
  11. package/dist/ConnectMiniWidget-CQWafYtQ.mjs.map +1 -0
  12. package/dist/DebtsStore-cUhIgJx6.mjs +145 -0
  13. package/dist/DebtsStore-cUhIgJx6.mjs.map +1 -0
  14. package/dist/Donut-CGNFni9y.mjs +58 -0
  15. package/dist/Donut-CGNFni9y.mjs.map +1 -0
  16. package/dist/FinstrongStore-BDG7l0nI.mjs +183 -0
  17. package/dist/FinstrongStore-BDG7l0nI.mjs.map +1 -0
  18. package/dist/GoalStore-o2waGeyf.mjs +293 -0
  19. package/dist/GoalStore-o2waGeyf.mjs.map +1 -0
  20. package/dist/Loader-CwdK8lfx.mjs +147 -0
  21. package/dist/Loader-CwdK8lfx.mjs.map +1 -0
  22. package/dist/MerchantStore-Cck9IGIH.mjs +125 -0
  23. package/dist/MerchantStore-Cck9IGIH.mjs.map +1 -0
  24. package/dist/NetWorthStore-D5eUfGQt.mjs +66 -0
  25. package/dist/NetWorthStore-D5eUfGQt.mjs.map +1 -0
  26. package/dist/NotificationStore-DCxw8W7u.mjs +141 -0
  27. package/dist/NotificationStore-DCxw8W7u.mjs.map +1 -0
  28. package/dist/RecurringTransactionsStore-Bijrgllq.mjs +337 -0
  29. package/dist/RecurringTransactionsStore-Bijrgllq.mjs.map +1 -0
  30. package/dist/SettingsStore-BhOYgUOa.mjs +352 -0
  31. package/dist/SettingsStore-BhOYgUOa.mjs.map +1 -0
  32. package/dist/TransactionApi-Dnbyi1JL.mjs +175 -0
  33. package/dist/TransactionApi-Dnbyi1JL.mjs.map +1 -0
  34. package/dist/TransactionStore-CiEtt5XJ.mjs +417 -0
  35. package/dist/TransactionStore-CiEtt5XJ.mjs.map +1 -0
  36. package/dist/TrendsStore-Idq3QfoA.mjs +131 -0
  37. package/dist/TrendsStore-Idq3QfoA.mjs.map +1 -0
  38. package/dist/accounts/index.es.js +18 -0
  39. package/dist/accounts/index.es.js.map +1 -0
  40. package/dist/analytics/index.es.js +170 -0
  41. package/dist/analytics/index.es.js.map +1 -0
  42. package/dist/budgets/index.es.js +1116 -0
  43. package/dist/budgets/index.es.js.map +1 -0
  44. package/dist/cashflow/index.es.js +118 -0
  45. package/dist/cashflow/index.es.js.map +1 -0
  46. package/dist/categories/index.es.js +10 -0
  47. package/dist/categories/index.es.js.map +1 -0
  48. package/dist/categories/util/CategoryUtil.d.ts +3 -2
  49. package/dist/common/components/charts/StackedLineChart.d.ts +2 -2
  50. package/dist/common/components/charts/stackedlinechart/CustomLegend.d.ts +1 -0
  51. package/dist/common/context/hooks.d.ts +13 -13
  52. package/dist/common/index.es.js +1549 -0
  53. package/dist/common/index.es.js.map +1 -0
  54. package/dist/common/types/AppData.d.ts +2 -0
  55. package/dist/common/types/Category.d.ts +2 -8
  56. package/dist/common/types/index.d.ts +1 -1
  57. package/dist/dashboard/index.es.js +257 -0
  58. package/dist/dashboard/index.es.js.map +1 -0
  59. package/dist/debts/index.es.js +9 -0
  60. package/dist/debts/index.es.js.map +1 -0
  61. package/dist/finstrong/index.es.js +11 -0
  62. package/dist/finstrong/index.es.js.map +1 -0
  63. package/dist/goals/index.es.js +9 -0
  64. package/dist/goals/index.es.js.map +1 -0
  65. package/dist/help/components/content/section/index.d.ts +15 -15
  66. package/dist/help/index.es.js +6 -0
  67. package/dist/help/index.es.js.map +1 -0
  68. package/dist/investments/index.es.js +1694 -0
  69. package/dist/investments/index.es.js.map +1 -0
  70. package/dist/merchants/index.es.js +7 -0
  71. package/dist/merchants/index.es.js.map +1 -0
  72. package/dist/microinsights/index.es.js +21 -0
  73. package/dist/microinsights/index.es.js.map +1 -0
  74. package/dist/networth/index.es.js +11 -0
  75. package/dist/networth/index.es.js.map +1 -0
  76. package/dist/notifications/index.es.js +116 -0
  77. package/dist/notifications/index.es.js.map +1 -0
  78. package/dist/recurringtransactions/index.es.js +14 -0
  79. package/dist/recurringtransactions/index.es.js.map +1 -0
  80. package/dist/settings/index.es.js +112 -0
  81. package/dist/settings/index.es.js.map +1 -0
  82. package/dist/spending/index.es.js +632 -0
  83. package/dist/spending/index.es.js.map +1 -0
  84. package/dist/transactions/index.es.js +19 -0
  85. package/dist/transactions/index.es.js.map +1 -0
  86. package/dist/trends/components/CategoriesList.d.ts +5 -5
  87. package/dist/trends/components/CategoriesListItem.d.ts +7 -4
  88. package/dist/trends/components/CategoryDetailChart.d.ts +5 -1
  89. package/dist/trends/index.es.js +10 -0
  90. package/dist/trends/index.es.js.map +1 -0
  91. package/dist/trends/stores/TrendsStore.d.ts +11 -16
  92. package/package.json +91 -3
  93. package/dist/index.d.ts +0 -22
  94. package/dist/index.es.js +0 -29873
  95. package/dist/index.es.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../src/common/constants/ScheduledPayment.ts","../../src/common/constants/SpendingPlan.ts","../../src/common/utils/Theme.ts","../../src/common/api/BannerApi.ts","../../src/common/api/LocalizedCopyApi.ts","../../src/common/api/ScheduledPaymentsApi.ts","../../src/common/api/UserApi.ts","../../src/common/api/WidgetApi.ts","../../src/common/hooks/usePrevious.tsx","../../src/common/components/barchart/Legend.tsx","../../src/common/components/barchart/Bar.tsx","../../src/common/components/barchart/BarColumn.tsx","../../src/common/components/barchart/Util.ts","../../src/common/components/barchart/BarChart.tsx","../../src/common/components/donuts/MultiSegmentDonut.tsx","../../src/common/components/ResponsiveButton.tsx","../../src/common/stores/GlobalCopyStore.ts","../../src/analytics/stores/AnalyticsStore.ts","../../src/microinsights/utils/beatUtils.ts","../../src/insights/store/BeatStore.ts","../../src/budgets/api/BudgetsApi.ts","../../src/budgets/store/BudgetsStore.ts","../../src/common/types/Beat.ts","../../src/common/types/Expense.ts","../../src/common/types/ScreenSize.tsx","../../src/help/api/HelpApi.ts","../../src/help/utils/getAccessibleHelpCategories.ts","../../src/help/store/HelpStore.ts","../../src/investments/api/HoldingApi.ts","../../src/investments/stores/HoldingStore.ts","../../src/common/constants/DefaultConfig.ts","../../src/common/api/AppDataApi.ts","../../src/common/stores/AppDataStore.ts","../../src/common/stores/ConnectStore.ts","../../src/common/stores/GlobalUiStore.ts","../../src/common/stores/UserStore.ts","../../src/common/stores/GlobalStore.ts"],"sourcesContent":["export enum RecurrenceTypes {\n Unknown = 0,\n EveryWeek = 1,\n EveryOtherWeek = 2,\n EveryMonth = 3,\n EveryOtherMonth = 4,\n EveryQuarter = 5,\n EveryOtherQuarter = 6,\n EveryYear = 7,\n}\n\nexport const RECURRENCE_COPY = [\n { id: RecurrenceTypes.Unknown, copy: 'frequency_unknown' },\n { id: RecurrenceTypes.EveryWeek, copy: 'frequency_every_week' },\n { id: RecurrenceTypes.EveryOtherWeek, copy: 'frequency_every_other_week' },\n { id: RecurrenceTypes.EveryMonth, copy: 'frequency_every_month' },\n { id: RecurrenceTypes.EveryOtherMonth, copy: 'frequency_every_other_month' },\n { id: RecurrenceTypes.EveryQuarter, copy: 'frequency_every_quarter' },\n { id: RecurrenceTypes.EveryOtherQuarter, copy: 'frequency_every_other_quarter' },\n { id: RecurrenceTypes.EveryYear, copy: 'frequency_every_year' },\n]\n","export const LOADING_STATUS = {\n ERROR: 'ERROR',\n LOADING: 'LOADING',\n SUCCESS: 'SUCCESS',\n}\n\nexport enum PlanTypes {\n SpendingPlan = 0,\n Budgets = 1,\n}\n\nexport enum IterationItemTypes {\n RecurringExpense = 0,\n PlannedExpense = 1,\n Other = 2,\n Income = 3,\n}\n","import { alpha, darken, lighten, PaletteColor, Theme } from '@mui/material'\n\nimport type { ClientStyleProfile } from '../types'\n\nexport const getClientTheme = (theme: Theme, clientStyleProfile: ClientStyleProfile) => {\n const isDark = theme.palette.mode === 'dark'\n\n const generatePalette = (colorKey: keyof ClientStyleProfile, defaultColor: PaletteColor) => {\n const color = clientStyleProfile?.[colorKey] as string | undefined\n return {\n lighter: color ? lighten(color, 0.5) : defaultColor.lighter,\n light: color ? lighten(color, 0.25) : defaultColor.light,\n main: color || defaultColor.main,\n dark: color ? darken(color, 0.25) : defaultColor.dark,\n darker: color ? darken(color, 0.5) : defaultColor.darker,\n }\n }\n\n const palette = {\n primary: isDark\n ? generatePalette('primary_color_dark', theme.palette.primary)\n : generatePalette('primary_color', theme.palette.primary),\n secondary: isDark\n ? generatePalette('neutral_color_dark', theme.palette.secondary)\n : generatePalette('neutral_color', theme.palette.secondary),\n error: isDark\n ? generatePalette('error_color_dark', theme.palette.error)\n : generatePalette('error_color', theme.palette.error),\n warning: isDark\n ? generatePalette('warning_color_dark', theme.palette.warning)\n : generatePalette('warning_color', theme.palette.warning),\n info: isDark\n ? generatePalette('info_color_dark', theme.palette.info)\n : generatePalette('info_color', theme.palette.info),\n success: isDark\n ? generatePalette('success_color_dark', theme.palette.success)\n : generatePalette('success_color', theme.palette.success),\n }\n\n const components = {\n MuiTabs: {\n styleOverrides: {\n indicator: {\n backgroundColor: palette.primary.light,\n },\n },\n },\n MuiPickersCalendarHeader: {\n styleOverrides: {\n switchViewButton: {\n color: palette.primary.lighter,\n '&:hover': {\n backgroundColor: alpha(palette.primary.light, 0.1),\n },\n },\n },\n },\n ...(clientStyleProfile?.button_corner_radius\n ? {\n MuiButton: {\n styleOverrides: {\n root: {\n borderRadius: `${clientStyleProfile.button_corner_radius}px`,\n },\n },\n },\n }\n : {}),\n ...(clientStyleProfile?.card_corner_radius\n ? {\n MuiCard: {\n styleOverrides: {\n root: {\n borderRadius: `${clientStyleProfile.card_corner_radius}px`,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: `${clientStyleProfile.card_corner_radius}px`,\n },\n },\n },\n }\n : {}),\n }\n\n return {\n typography: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n H1: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n h1: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n H2: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n h2: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n H3: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n h3: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n Body: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n body1: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n Small: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n body2: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n Button: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n button: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n XSmall: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n caption: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n Paragraph: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n subtitle1: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n ParagraphSmall: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n subtitle2: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n Tiny: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n tiny: {\n fontFamily: clientStyleProfile?.system_font ?? theme.typography.fontFamily,\n },\n },\n palette,\n components,\n shape: {\n borderRadius: clientStyleProfile?.button_corner_radius ?? theme.shape.borderRadius,\n },\n }\n}\n","import Fetch from '../utils/Fetch'\n\nexport class BannerApi {\n fetchInstance: Fetch | null\n\n constructor(bullseyeEndpoint: string) {\n // Override headers without MD-Session-Token to avoid CORS error in bullseye\n this.fetchInstance = new Fetch(bullseyeEndpoint, '', {\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n })\n }\n\n getBanner = async (userGuid: string) => {\n try {\n const path = `/banner/${userGuid}/account_widget_banner`\n return this.fetchInstance?.get(path).then((data) => data.banner) ?? {}\n } catch (error) {\n console.error('Error fetching banner:', error)\n return null\n }\n }\n}\n","import Fetch from '../utils/Fetch'\n\nimport { ApiEndpoints } from '../constants/ApiEndpoints'\n\nexport class LocalizedCopyApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n getLocalizedCopy = async (req: any) => {\n return this.fetchInstance.post(ApiEndpoints.LOCALIZED_COPY, req).then((data) => data)\n }\n\n getLocalizedContent = async (namespace: string) => {\n return this.fetchInstance\n .post(`${ApiEndpoints.LOCALIZED_CONTENT}/${namespace}`)\n .then((data) => data)\n }\n}\n","import { ApiEndpoints, Fetch, type ScheduledPayment, TransactionType } from '../index'\n\nexport class ScheduledPaymentsApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n addScheduledPayment = async (scheduledPayment: ScheduledPayment) => {\n return this.fetchInstance\n .post(ApiEndpoints.SCHEDULED_PAYMENTS, {\n ...scheduledPayment,\n is_recurring: 'true',\n transaction_type: TransactionType.DEBIT,\n })\n .then((data) => data.scheduled_payment)\n }\n\n getScheduledPayments = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.SCHEDULED_PAYMENTS)\n .then((data) => data.scheduled_payments)\n }\n\n updateScheduledPayment = async (scheduledPayment: ScheduledPayment) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.SCHEDULED_PAYMENTS}/${scheduledPayment.guid}`, scheduledPayment)\n .then((data) => data.scheduled_payment)\n }\n\n deleteScheduledPayment = async (guid: string) => {\n return this.fetchInstance\n .delete(`${ApiEndpoints.SCHEDULED_PAYMENTS}/${guid}`)\n .then((data) => data)\n }\n}\n","import Fetch from '../utils/Fetch'\n\nimport { ApiEndpoints } from '../constants'\n\nimport type { User, UserProfile } from '../types'\n\nexport class UserApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n getUserFeatures = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.USER_FEATURES)\n .then((data) => data.user_features)\n .catch((e) => e)\n }\n\n updateUser = async (user: User) => {\n return this.fetchInstance.put(ApiEndpoints.USER, user).then((data) => data.user)\n }\n\n updateUserProfile = async (userProfile: UserProfile) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.USER_PROFILES}/${userProfile.guid}`, userProfile)\n .then((data) => data.user_profile)\n }\n}\n","import Fetch from '../utils/Fetch'\n\nimport { ApiEndpoints } from '../constants'\n\nexport class WidgetApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n requestWidgetUrl = async (req: any) => {\n return this.fetchInstance.post(ApiEndpoints.WIDGET_URLS, req).then((data) => data.widget_url)\n }\n}\n","import { useEffect, useRef } from 'react'\n\nexport const usePrevious = (value: any) => {\n const ref = useRef()\n useEffect(() => {\n ref.current = value\n }, [value])\n return ref.current\n}\nexport default usePrevious\n","import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\n\nimport { Text, useTokens } from '@mxenabled/mxui'\n\ninterface BarChartLegendProps {\n color: string\n labelAverage: string\n labelMain: string\n}\n\nconst Legend: React.FC<BarChartLegendProps> = ({ color, labelAverage, labelMain }) => {\n const tokens = useTokens()\n const styles = getStyles(tokens, color)\n\n return (\n <div className={`mx-cmn-bar-chart-legend ${styles}`}>\n <div aria-label={labelMain} className=\"mx-cmn-color-square\" role=\"img\" />\n <Text variant=\"XSmall\">{labelMain}</Text>\n\n <div aria-label={labelAverage} className=\"mx-cmn-triple-dot\" role=\"img\">\n <div className=\"mx-cmn-dot\" />\n <div className=\"mx-cmn-dot\" />\n <div className=\"mx-cmn-dot\" />\n </div>\n <Text variant=\"XSmall\">{labelAverage}</Text>\n </div>\n )\n}\n\nconst getStyles = (tokens: any, color: string) =>\n css({\n alignItems: 'center',\n display: 'flex',\n gap: tokens.Spacing.XSmall,\n justifyContent: 'flex-end',\n marginRight: tokens.Spacing.XLarge,\n paddingBottom: tokens.Spacing.XSmall,\n width: '100%',\n '& .mx-cmn-color-square': {\n backgroundColor: color,\n height: 6,\n width: 6,\n },\n '& .mx-cmn-triple-dot': {\n display: 'flex',\n gap: 1,\n },\n '& .mx-cmn-dot': {\n backgroundColor: tokens.Color.Neutral500,\n height: 3,\n width: 3,\n borderRadius: 1.5,\n },\n '& > .kyper-text': {\n marginRight: tokens.Spacing.XSmall,\n },\n })\n\nexport default Legend\n","import React from 'react'\nimport { css, keyframes } from '@mxenabled/cssinjs'\n\nimport { Text, useTokens } from '@mxenabled/mxui'\n\ninterface BarProps {\n ariaLabel?: string\n color: string\n height: number\n index: number\n label: string\n onClick?: (index: number) => void\n selectedIndex?: number\n value: number\n}\n\n/**\n * The Bar component is what displays the colored (optionally clickable) bar\n *\n * @param ariaLabel OPTIONAL aria label used on the bar\n * @param color The color of the bar\n * @param height The pixel height of the bar\n * @param index The index of the bar\n * @param label The label to use above (on positive bars) or below (on negative bars)\n * @param onClick OPTIONAL function to call if the bar is clicked\n * @param selectedIndex OPTIONAL indicates the selected bar\n * @param value Value representing the bar\n */\nconst Bar: React.FC<BarProps> = ({\n ariaLabel,\n color,\n height,\n index,\n label,\n onClick,\n selectedIndex,\n value,\n}) => {\n const tokens = useTokens()\n const styles = getStyles(tokens, color, height)\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (onClick && (event.key === ' ' || event.key === 'Enter')) {\n onClick(index)\n }\n }\n\n const labelColor =\n selectedIndex === undefined || selectedIndex === index ? 'primary' : 'secondary'\n\n const BarLabel = () => (\n <Text\n aria-hidden={true}\n bold={selectedIndex === index}\n className=\"mx-cmn-bar-text\"\n color={labelColor}\n component=\"div\"\n variant=\"Small\"\n >\n {label}\n </Text>\n )\n\n return (\n <div className={`mx-cmn-bar-container ${styles} ${value < 0 ? 'mx-cmn-negative' : ''}`}>\n {/* Display the value on top for positive values */}\n {value >= 0 && <BarLabel />}\n\n <div\n aria-label={ariaLabel}\n className={`mx-cmn-bar ${onClick ? 'mx-cmn-clickable' : ''} ${\n value < 0 ? 'mx-cmn-bar-negative' : ''\n }`}\n onClick={onClick ? () => onClick?.(index) : undefined}\n onKeyDown={handleKeyDown}\n role={ariaLabel ? 'button' : undefined}\n tabIndex={ariaLabel ? 0 : undefined}\n />\n\n {/* Display the value on bottom for negative values */}\n {value < 0 && <BarLabel />}\n </div>\n )\n}\n\nconst getStyles = (tokens: any, color: string, height: number) => {\n const frameName = `expandBar-${Math.round(height)}`\n const expandAnimation = keyframes(frameName, { from: { height: 0 }, to: { height } })\n\n return css({\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'flex-end',\n height: '100%',\n '&.mx-cmn-negative': {\n justifyContent: 'flex-start',\n },\n '& .mx-cmn-bar': {\n animationDelay: '.5s',\n animationDuration: '1s',\n animationFillMode: 'forwards',\n animationName: expandAnimation,\n animationTimingFunction: tokens.Easing.Default,\n backgroundColor: color,\n borderRadius: `${tokens.BorderRadius.Medium}px ${tokens.BorderRadius.Medium}px 0 0`,\n maxHeight: height,\n },\n '& .mx-cmn-bar-negative': {\n borderRadius: `0 0 ${tokens.BorderRadius.Medium}px ${tokens.BorderRadius.Medium}px`,\n marginTop: -tokens.Spacing.XTiny,\n },\n '& .mx-cmn-bar-text': {\n display: 'flex',\n justifyContent: 'center',\n marginBottom: tokens.Spacing.Tiny,\n marginTop: tokens.Spacing.Tiny,\n whiteSpace: 'nowrap',\n width: '100%',\n },\n })\n}\n\nexport default Bar\n","import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\n\nimport { Text, useTokens } from '@mxenabled/mxui'\n\nimport Bar from './Bar'\n\ninterface BarColumnProps {\n ariaLabel?: string\n averageLineHeight: number\n bottomHeight: number\n color: string\n index?: number\n onClick?: (index: number) => void\n range: number\n selectedIndex?: number\n topHeight: number\n value: number\n valueLabel?: string\n width?: number | string\n xAxisLabel?: string\n}\n\n/**\n * The BarColumn component represents a single vertical slice of the bar chart. It contains from top to bottom\n * the positive section, which will only display a bar if value > 0, the zero line, the average line, negative\n * section, which will only display a bar if value < 0 and the X-Axis label.\n *\n * @param ariaLabel OPTIONAL aria label used to label the bar\n * @param averageLineHeight the pixel height above/below the zero line for the dashed average line\n * @param bottomHeight the height of the bottom (negative) section\n * @param color the color of the bar\n * @param index OPTIONAL index of the bar (Only used when bar is clickable)\n * @param onClick OPTIONAL function to call if the bar is clicked\n * @param range\n * @param selectedIndex OPTIONAL indicates the selected bar\n * @param topHeight the pixel height of the top (positvie section)\n * @param value the value for the bar\n * @param valueLabel OPTIONAL string value to use for the bar\n * @param width OPTIONAL pixel or percentage width of the bar\n * @param xAxisLabel label for the X-Axis\n */\nconst BarColumn: React.FC<BarColumnProps> = ({\n ariaLabel,\n averageLineHeight,\n bottomHeight,\n color,\n index = -1,\n onClick,\n range,\n selectedIndex,\n topHeight,\n value,\n valueLabel = '',\n width,\n xAxisLabel = '',\n}) => {\n const tokens = useTokens()\n const styles = getStyles(tokens, width)\n\n const topBarHeight = (value / range) * topHeight\n const bottomBarHeight = (Math.abs(value) / range) * bottomHeight\n const xAxisColor =\n selectedIndex === undefined || selectedIndex === index ? 'primary' : 'secondary'\n\n return (\n <div className={`mx-cmn-barchart-bar-column ${styles}`}>\n {/* Top (Positive) Chart Area */}\n <div style={{ height: topHeight }}>\n {/* Only display the bar here if it has a positive value */}\n {value >= 0 && (\n <Bar\n ariaLabel={ariaLabel}\n color={color}\n height={topBarHeight}\n index={index}\n label={valueLabel}\n onClick={onClick}\n selectedIndex={selectedIndex}\n value={value}\n />\n )}\n </div>\n\n {/* Zero Line */}\n <div className=\"mx-cmn-zero-line\" />\n\n {/* Average Line - Only display if average is not 0 */}\n {averageLineHeight !== 0 && (\n <div className=\"mx-cmn-chart-average\" style={{ bottom: averageLineHeight }} />\n )}\n\n {/* Bottom (Negative) Chart Area */}\n <div style={{ height: bottomHeight }}>\n {/* Only display the bar here if it has a negative value */}\n {value < 0 && (\n <Bar\n ariaLabel={ariaLabel}\n color={color}\n height={bottomBarHeight}\n index={index}\n label={valueLabel}\n onClick={onClick}\n value={value}\n />\n )}\n </div>\n\n {/* X-Axis label */}\n <div\n className={`mx-cmn-bar-label ${onClick ? 'mx-cmn-clickable' : ''}`}\n onClick={onClick ? () => onClick(index) : undefined}\n >\n <Text bold={selectedIndex === index} color={xAxisColor} variant=\"Small\">\n {xAxisLabel}\n </Text>\n </div>\n </div>\n )\n}\n\nconst getStyles = (tokens: any, width: number | string | undefined) =>\n css({\n display: 'flex',\n flexDirection: 'column',\n flexGrow: width === undefined ? 1 : 0,\n width,\n '& .mx-cmn-chart-average': {\n borderTop: `${tokens.Spacing.XTiny}px dotted ${tokens.Color.Neutral500}`,\n position: 'relative',\n marginRight: tokens.Spacing.XTiny,\n },\n '& .mx-cmn-zero-line': {\n borderBottom: '1px solid text.primary',\n width: '100%',\n },\n '& .mx-cmn-bar-label': {\n minHeight: tokens.Spacing.Medium,\n maxHeight: tokens.Spacing.Medium,\n marginBottom: tokens.Spacing.XSmall,\n marginTop: tokens.Spacing.XSmall,\n textAlign: 'center',\n width: '100%',\n },\n '& .mx-cmn-clickable': {\n cursor: 'pointer',\n },\n })\n\nexport default BarColumn\n","/**\n * Returns a sum\n *\n * @param acc accumulator\n * @param value current value\n */\nexport const sumReducer = (acc: number, value: number) => acc + value\n\n/**\n * Returns the max range\n *\n * @param acc accumulator\n * @param value current value\n */\nexport const rangeReducer = (acc: number, value: number) =>\n Math.abs(value) > acc ? Math.abs(value) : acc\n\n/**\n * Returns an array with the value of an object added\n *\n * @param acc accumulator\n * @param value current value\n */\nexport const valueReducer = (acc: number[], value: { value: number }) => [...acc, value.value]\n\n/**\n * Returns full height if only the first section is visible, half height if both sections\n * are visible and 0 if the first section is not visible\n *\n * @param hasSection1 If the first section is visible\n * @param hasSection2 If the second section is visible\n * @param fullHeight The full height\n */\nexport const getSectionHeight = (\n hasSection1: boolean,\n hasSection2: boolean,\n fullHeight: number,\n) => {\n const height = hasSection1 && hasSection2 ? fullHeight / 2 : fullHeight\n return !hasSection1 ? 0 : height\n}\n\n/**\n * Returns the +/- pixel height of the average line. This is calcluated using the percentange of average\n * to max value multiplied by the height. If the max value is less than 0, then we use negative min value.\n *\n * @param average The average value\n * @param max The maximum value\n * @param min The minimum value\n * @param height The height of the container the average line displays in.\n */\nexport const getAverageLineHeight = (average: number, max: number, min: number, height: number) => {\n return (average / (max < 0 ? -min : max)) * height || 0\n}\n","import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\n\nimport { useTokens } from '@mxenabled/mxui'\n\nimport Legend from './Legend'\nimport BarColumn from './BarColumn'\nimport {\n getAverageLineHeight,\n getSectionHeight,\n rangeReducer,\n sumReducer,\n valueReducer,\n} from './Util'\n\nexport type BarChartData = {\n ariaLabel: string\n label: string\n value: number\n}\n\nexport interface BarChartProps {\n average?: number\n barWidth?: number | string\n color: string\n data: BarChartData[]\n height: number\n legendLabelAverage: string\n legendLabelMain: string\n onBarClick?: (index: number) => void\n selectedIndex?: number\n valueFormatter?: (value: number) => string\n}\n\n/**\n * BarChart component to display a vertical bar chart given an array of data\n *\n * @param average OPTIONAL custom average not based on average or all value\n * @param barWidth OPTIONAL pixel or percentage width of bars\n * @param color Color of the bars\n * @param data An array of chart data. Chart data must contain and aria label, label and value.\n * @param height Height in pixels of the chart\n * @param legendLabelAverage Label to use on legend for the average value\n * @param legendLabelMain Label to use on the legend for the data\n * @param onBarClick OPTIONAL function to call if bar is clicked\n * @param selectedIndex OPTIONAL indicates the selected bar\n * @param valueFormatter OPTIONAL function to call to format the value displayed with the bars\n */\nconst BarChart: React.FC<BarChartProps> = ({\n average,\n barWidth = '8%',\n color,\n data,\n height,\n legendLabelAverage,\n legendLabelMain,\n onBarClick,\n selectedIndex,\n valueFormatter = (value: number) => `${value}`,\n}) => {\n const tokens = useTokens()\n const styles = getStyles(tokens)\n\n const values = data.reduce(valueReducer, [])\n const avg = average !== undefined ? average : values.reduce(sumReducer, 0) / values.length\n const max = Math.max(...values)\n const min = Math.min(...values)\n const range = values.reduce(rangeReducer, 0)\n\n const hasTop = max >= 0\n const hasBottom = min < 0\n const topHeight = getSectionHeight(hasTop, hasBottom, height)\n const bottomHeight = getSectionHeight(hasBottom, hasTop, height)\n const averageLineHeight = getAverageLineHeight(avg, max, min, topHeight || bottomHeight)\n\n const getBarColor = (index: number) => {\n if (selectedIndex === undefined || index === selectedIndex) {\n return color\n }\n return `${color}80`\n }\n\n const EmptyColumn = () => (\n <BarColumn\n averageLineHeight={averageLineHeight}\n bottomHeight={bottomHeight}\n color={''}\n range={range}\n topHeight={topHeight}\n value={0}\n width={undefined}\n />\n )\n\n return (\n <div className={`mx-cmn-bar-chart ${styles}`}>\n <div className=\"mx-cmn-chart-container\">\n <EmptyColumn />\n {data.map((d, index) => (\n <React.Fragment key={`column-${index}`}>\n <BarColumn\n ariaLabel={d.ariaLabel}\n averageLineHeight={averageLineHeight}\n bottomHeight={bottomHeight}\n color={getBarColor(index)}\n index={index}\n onClick={onBarClick}\n range={range}\n selectedIndex={selectedIndex}\n topHeight={topHeight}\n value={d.value}\n valueLabel={valueFormatter(d.value)}\n width={barWidth}\n xAxisLabel={d.label}\n />\n <EmptyColumn />\n </React.Fragment>\n ))}\n </div>\n <Legend color={color} labelAverage={legendLabelAverage} labelMain={legendLabelMain} />\n </div>\n )\n}\n\nconst getStyles = (tokens: any) =>\n css({\n '& .mx-cmn-chart-container': {\n alignItems: 'flex-end',\n display: 'flex',\n justifyContent: 'space-evenly',\n marginTop: tokens.Spacing.Large,\n marginBottom: tokens.Spacing.Medium,\n },\n })\n\nexport default BarChart\n","import React from 'react'\nimport { css } from '@mxenabled/cssinjs'\n\nimport { useTokens } from '@mxenabled/mxui'\n\nimport { DEFAULT_DONUT_SIZE, DEFAULT_STROKE_WIDTH } from '../../constants/Donut'\n\nexport interface Segment {\n percent: number\n color: string\n}\n\nexport interface MultiSegmentDonutProps {\n children: React.ReactNode\n hasGap?: boolean\n segments: Segment[]\n size?: number\n strokeWidth?: number\n}\n\nconst MultiSegmentDonut: React.FC<MultiSegmentDonutProps> = ({\n hasGap = false,\n segments,\n size = DEFAULT_DONUT_SIZE,\n strokeWidth = DEFAULT_STROKE_WIDTH,\n children,\n}) => {\n const tokens = useTokens()\n const styles = getStyles(tokens, size)\n\n const radius = (size - strokeWidth) / 2\n const halfSize = size / 2\n\n let offset = -90 - (hasGap ? 1 : 0)\n\n let length = 0\n\n return (\n <div className={`mx-cmn-multi-segment-donut ${styles}`}>\n <svg height={size} width={size}>\n <circle\n cx={halfSize}\n cy={halfSize}\n fill=\"none\"\n r={radius}\n stroke={tokens.Color.Neutral300}\n strokeWidth={strokeWidth}\n />\n {segments.map((segment, index) => {\n offset += 360 * length + (hasGap ? 1 : 0)\n length = (segment.percent - (hasGap ? 0.3 : 0)) / 100\n\n return (\n <circle\n cx={halfSize}\n cy={halfSize}\n fill=\"none\"\n key={index}\n r={radius}\n stroke={segment.color}\n strokeDasharray={2 * Math.PI * radius}\n strokeDashoffset={2 * Math.PI * radius * (1 - length)}\n strokeWidth={strokeWidth}\n transform={`rotate(${offset}, ${halfSize}, ${halfSize})`}\n />\n )\n })}\n </svg>\n <div className=\"mx-cmn-multi-segment-donut-children\">{children}</div>\n </div>\n )\n}\n\nconst getStyles = (tokens: any, size: number) =>\n css({\n height: size,\n marginTop: `-${tokens.Spacing.XSmall}px`,\n position: 'relative',\n width: size,\n '& .mx-cmn-multi-segment-donut-children': {\n left: '50%',\n position: 'absolute',\n textAlign: 'center',\n top: '50%',\n transform: 'translate(-50%, -50%)',\n },\n })\n\nexport default MultiSegmentDonut\n","import React from 'react'\n\nimport Button from '@mui/material/Button'\nimport IconButton from '@mui/material/IconButton'\nimport Tooltip from '@mui/material/Tooltip'\nimport useTheme from '@mui/material/styles/useTheme'\n\ninterface ResponsiveButtonProps {\n icon: React.ReactElement\n label: string\n onClick?: () => void\n placement?:\n | 'bottom-end'\n | 'bottom-start'\n | 'bottom'\n | 'left-end'\n | 'left-start'\n | 'left'\n | 'right-end'\n | 'right-start'\n | 'right'\n | 'top-end'\n | 'top-start'\n | 'top'\n tooltipText: string\n variant?: 'contained' | 'outlined' | 'text'\n}\n\nconst ResponsiveButton: React.FC<ResponsiveButtonProps> = ({\n icon,\n label,\n onClick,\n placement = 'bottom',\n tooltipText,\n variant = 'text',\n}) => {\n const theme = useTheme()\n\n return (\n <React.Fragment>\n <Button\n onClick={onClick}\n startIcon={icon}\n sx={{\n [theme.breakpoints.down('lg')]: { display: 'none' },\n [theme.breakpoints.up('lg')]: { display: 'inline-flex' },\n }}\n title={tooltipText}\n variant={variant}\n >\n {label}\n </Button>\n <Tooltip\n describeChild={true}\n placement={placement}\n sx={{ display: { xs: 'inline-flex', lg: 'none' } }}\n title={tooltipText}\n >\n <IconButton onClick={onClick}>{icon}</IconButton>\n </Tooltip>\n </React.Fragment>\n )\n}\n\nexport default ResponsiveButton\n","import { makeAutoObservable, runInAction } from 'mobx'\nimport { GlobalCopyApi } from '../api'\nimport { GlobalCopy } from '../types'\nimport { GlobalStore } from './GlobalStore'\n\nexport class GlobalCopyStore {\n globalStore: GlobalStore\n api: GlobalCopyApi = new GlobalCopyApi('/', '')\n\n copy: GlobalCopy = {} as GlobalCopy\n featureNamespace = 'experiences'\n\n isInitialized = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new GlobalCopyApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n // DEPRECATED: Initialize api in constructor and use loadCopy instead\n // TODO: Remove this function\n initialize = async (endpoint: string, token: string) => {\n this.api = new GlobalCopyApi(endpoint, token)\n\n await this.loadCopy()\n }\n\n loadCopy = async () => {\n await this.getCopy(this.featureNamespace)\n\n runInAction(() => {\n this.isInitialized = true\n })\n }\n\n getCopy = async (namespace: string, translationKey: string = '') => {\n try {\n const newCopy = await this.api.getGlobalCopy(namespace, translationKey)\n\n runInAction(() => {\n this.copy = newCopy[namespace]\n })\n } catch (error) {\n console.error(`Error occurred while fetching ${this.featureNamespace} copy: ${error}`)\n }\n }\n}\n","import { makeAutoObservable, runInAction } from 'mobx'\nimport posthog, { Survey, SurveyQuestion } from 'posthog-js'\n\nimport { GlobalStore } from '../../common/stores/GlobalStore'\nexport class AnalyticsStore {\n globalStore: GlobalStore\n survey: Survey | null = null\n currentQuestionIndex: number = 0\n question: SurveyQuestion | null = null\n response: number | string | null = null\n responses: Record<string, number | string | null> = {}\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n makeAutoObservable(this)\n }\n\n get isLastQuestion() {\n return this.currentQuestionIndex === this.surveyQuestions.length - 1\n }\n\n get questionCount() {\n return `${this.currentQuestionIndex + 1}/${this.surveyQuestions.length}`\n }\n\n get responsePayload() {\n return {\n $survey_id: this.surveyId,\n ...this.responses,\n }\n }\n\n // TODO hardcode elsewhere\n get surveyId() {\n const posthogKey = window.app?.postHogPublicKey\n\n return posthogKey === 'phc_KclQGnOZEaYCttkpiVpuyOYeBlixGo6xNphYgWV4CXo'\n ? '0196caa6-9b37-0000-98a7-f04e8d56faf5'\n : '0196a6b0-ccde-0000-b980-0b84ea2fef4a'\n }\n\n get surveyQuestions() {\n return this.survey ? this.survey.questions : ([] as SurveyQuestion[])\n }\n\n loadSurvey = (forceReload: boolean = false) => {\n posthog.getActiveMatchingSurveys((surveys) => {\n runInAction(() => {\n if (surveys.length > 0) {\n const survey = surveys.find((s) => s.id === this.surveyId)\n if (survey) {\n this.survey = survey\n this.currentQuestionIndex = 0\n this.question = survey.questions[0]\n this.response = null\n this.responses = {}\n }\n }\n })\n }, forceReload)\n }\n\n nextQuestion = () => {\n if (this.currentQuestionIndex < this.surveyQuestions.length - 1) {\n this.currentQuestionIndex += 1\n }\n this.response = null\n this.question = this.surveyQuestions[this.currentQuestionIndex]\n }\n\n resetStore = () => {\n this.survey = null\n this.currentQuestionIndex = 0\n this.question = null\n this.response = null\n this.responses = {}\n }\n\n setResponse = (response: number | string | null) => {\n this.response = response\n if (this.question) {\n this.responses[`$survey_response_${this.question.id}`] = response\n }\n }\n}\n","import type { Offer } from '../interfaces'\n\ntype SortOrder = 'asc' | 'desc'\n\nexport function orderArray<T>(arr1: T[], arr2: T[], prop: keyof T, order: SortOrder = 'asc'): T[] {\n const direction = order === 'desc' ? -1 : 1\n return [...arr1, ...arr2].sort((item1, item2) => {\n if (item1[prop] < item2[prop]) return -1 * direction\n if (item1[prop] > item2[prop]) return 1 * direction\n return 0\n })\n}\n\nexport const transformOfferIntoBeatLikeObject = (offer: Offer) => {\n return {\n ...offer, //fields that are offer specific, adding here for visibility\n image_url: offer.image_url,\n guid: offer.guid,\n created_at: offer.created_at,\n dismissed_at: offer.dismissed_at,\n active_at: offer.campaign_activated_at,\n displayed_at: offer.has_been_viewed,\n post_message_secondary: offer.pulse_post_message_secondary, //offer fields mapped to beat fields for functionality\n title: offer.pulse_title || offer.campaign_name,\n html_title: offer.pulse_title || offer.campaign_name,\n short_title: offer.pulse_title || offer.campaign_name,\n html_short_title: offer.pulse_title || offer.campaign_name,\n micro_title: offer.pulse_title || offer.campaign_name,\n html_micro_title: offer.pulse_title || offer.campaign_name,\n supporting_action: offer.pulse_call_to_action_text_secondary,\n description: offer.pulse_body,\n html_description: offer.pulse_body,\n micro_description: offer.pulse_body,\n html_micro_description: offer.pulse_body,\n call_to_action: offer.pulse_call_to_action_text,\n html_micro_call_to_action: offer.pulse_call_to_action_text,\n micro_call_to_action: offer.pulse_call_to_action_text,\n is_dismissed: offer.has_been_dismissed,\n icon_type: 5,\n template: 'MarketingOffer',\n //beat fields we null out\n account_guids: [],\n data_series: {},\n has_been_displayed: false,\n is_obsolete: false,\n is_refreshable: false,\n is_sampled: false,\n merchant_guids: [],\n payload: {},\n pulse_campaign_name: offer.campaign_name,\n scheduled_payment_guids: [],\n transaction_guids: [],\n user_guid: '',\n user_verification: 0,\n }\n}\n","import { makeAutoObservable, runInAction } from 'mobx'\nimport { BeatApi } from '../../common/api/BeatApi'\nimport { orderArray, transformOfferIntoBeatLikeObject } from '../../microinsights/utils/beatUtils'\nimport type { Offer } from './../../microinsights/interfaces'\nimport type { Beat } from '../../common/types/Beat'\nimport type { GlobalStore } from '../../common/stores/GlobalStore'\n\nexport class BeatStore {\n globalStore: GlobalStore\n api: BeatApi = new BeatApi('/', '')\n beats: Beat[] = []\n isLoading = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BeatApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n loadBeats = async () => {\n this.isLoading = true\n const beats = await this.api.getBeats()\n const offers = await this.api.getOffers()\n const beatLikeOffers = offers.map((o: Offer) => transformOfferIntoBeatLikeObject(o))\n\n runInAction(() => {\n this.beats = orderArray(beats, beatLikeOffers, 'active_at', 'desc')\n this.isLoading = false\n })\n }\n\n getBeatsByCategories(categoryGuids: string[]): Beat[] {\n // Return beats with any beat.category_guids that are in categoryGuids\n return this.beats.filter((beat) => {\n return beat.category_guids?.some((guid) => categoryGuids.includes(guid))\n })\n }\n}\n","import { ApiEndpoints, type Budget, Category, Fetch } from '../../common'\n\nexport class BudgetsApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n return this.fetchInstance\n .post(ApiEndpoints.BUDGETS, {\n amount,\n category_guid: category.guid,\n category_name: category.name,\n parent_guid: parentGuid,\n })\n .then((data) => data.budget)\n .catch((error) => {\n throw error\n })\n }\n\n deleteBudget = async (guid: string) => {\n return this.fetchInstance\n .delete(`${ApiEndpoints.BUDGETS}/${guid}`)\n .then((data) => data)\n .catch((error) => {\n throw error\n })\n }\n\n getBudgets = async () => {\n return this.fetchInstance\n .get(ApiEndpoints.BUDGETS)\n .then((data) => data.budgets)\n .catch((error) => error)\n }\n\n updateBudget = async (budget: Budget) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.BUDGETS}/${budget.guid}`, budget)\n .then((data) => data.budget)\n .catch((error) => {\n throw error\n })\n }\n}\n","import { makeAutoObservable, reaction, runInAction } from 'mobx'\n\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\nimport { startOfToday } from 'date-fns/startOfToday'\n\nimport { Theme } from '@mui/system'\n\nimport {\n type Budget,\n type Category,\n type DateRange,\n type DetailedBudget,\n type DetailedCategory,\n CategoryGuids,\n GlobalStore,\n} from '../../common'\n\nimport { BudgetsApi } from '../api/BudgetsApi'\nimport { augmentBudgets, findBudget, findSubBudget } from '../utils/BudgetUtil'\n\nexport class BudgetsStore {\n api: BudgetsApi = new BudgetsApi('/', '')\n\n globalStore: GlobalStore\n\n alert: string = ''\n dateRange: DateRange = { start: startOfMonth(startOfToday()), end: endOfMonth(startOfToday()) }\n budgets: Budget[] = []\n selectedBudget: DetailedBudget | undefined\n selectedSubBudget: DetailedBudget | undefined\n isDataLoaded = false\n theme = {} as Theme\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new BudgetsApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n loadBudgetData = async () => {\n await this.loadBudgets()\n\n /** Reaction to update the selected budget/sub-budget if detailedBudgets is updated **/\n reaction(\n () => this.detailedBudgets,\n (detailedBudgets) => {\n if (detailedBudgets) {\n const budget = this.selectedBudget\n if (budget) {\n this.selectedBudget = findBudget(detailedBudgets, budget.guid)\n }\n\n const subBudget = this.selectedSubBudget\n if (subBudget && subBudget.parent_guid) {\n this.selectedSubBudget = findSubBudget(\n detailedBudgets,\n subBudget.guid,\n subBudget.parent_guid,\n )\n }\n }\n },\n )\n }\n\n get detailedBudgets(): DetailedBudget[] {\n return augmentBudgets(\n this.budgets.filter(\n (budget: Budget) =>\n budget.category_guid !== CategoryGuids.INCOME &&\n budget.category_guid !== CategoryGuids.TRANSFER &&\n budget.category_guid !== CategoryGuids.INVESTMENTS,\n ),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n ).sort((a, b) => {\n if (a.percentage > b.percentage) return -1\n if (a.percentage < b.percentage) return 1\n return 0\n })\n }\n\n get incomeBudget(): number | undefined {\n const filteredBudgets = augmentBudgets(\n this.budgets.filter((budget: Budget) => !budget.parent_guid),\n this.globalStore.categoryStore.detailedCategories,\n this.globalStore.copyStore.copy.budgets,\n this.theme,\n )\n\n const incomeBudget = filteredBudgets.reduce(\n (acc, curr) => {\n if (curr.category_guid !== CategoryGuids.INCOME) return acc\n if (!acc || curr.percentage > acc.percentage) return curr\n return acc\n },\n undefined as DetailedBudget | undefined,\n )\n\n return incomeBudget?.amount\n }\n\n get unbudgetedCategories(): DetailedCategory[] {\n return this.globalStore.categoryStore.spendCategories.filter(\n (category) => !this.detailedBudgets.find((budget) => budget.category_guid === category.guid),\n )\n }\n\n get totalBudgeted(): number {\n return this.detailedBudgets.reduce((total, budget) => total + budget.amount, 0)\n }\n\n addBudget = async (category: Category, amount: number, parentGuid: string | null = null) => {\n try {\n const budget = await this.api.addBudget(category, amount, parentGuid)\n runInAction(() => {\n this.budgets.push(budget)\n })\n } catch (error) {\n console.error(`Error adding budget: ${error}`)\n }\n }\n\n deleteBudget = async (guid: string) => {\n try {\n await this.api.deleteBudget(guid)\n\n runInAction(() => {\n const index = this.budgets.findIndex((budget) => budget.guid === guid)\n if (index >= 0) {\n this.budgets.splice(index, 1)\n }\n })\n } catch (error) {\n console.error(`Error deleting budget: ${error}`)\n }\n }\n\n loadBudgets = async () => {\n try {\n const budgets = (await this.api.getBudgets()) as Budget[]\n\n runInAction(() => {\n this.budgets = budgets\n this.isDataLoaded = true\n })\n } catch (error) {\n console.error(`Error occurred while loading budgets: ${error}`)\n throw error\n }\n }\n\n setAlert = (alert: string) => (this.alert = alert)\n\n setDateRange = (dateRange: DateRange) => (this.dateRange = dateRange)\n\n setSelectedBudget = (budget: DetailedBudget | undefined) => (this.selectedBudget = budget)\n\n setSelectedSubBudget = (budget: DetailedBudget | undefined) => (this.selectedSubBudget = budget)\n\n setTheme = (theme: Theme) => (this.theme = theme)\n\n /**\n * Recalculate budget by using the average amount from top-level categories\n * @param categories Detailed categories\n */\n recalculateBudgets = async (categories: DetailedCategory[]) => {\n try {\n for (const category of categories) {\n const budget = this.budgets.find((budget) => budget.category_guid === category.guid)\n if (budget) {\n await this.api.updateBudget({\n ...budget,\n amount: category.totalAverageAmount,\n })\n } else {\n await this.api.addBudget(category, category.totalAverageAmount)\n }\n }\n const budgetsToDelete = this.budgets.filter(\n (budget) => !categories.find((c) => c.guid === budget.category_guid),\n )\n\n for (const budgetToDelete of budgetsToDelete) {\n await this.api.deleteBudget(budgetToDelete.guid)\n }\n\n await this.loadBudgets()\n\n return { data: this.budgets, isSuccess: true }\n } catch (error) {\n console.error('error recalculating budgets', error)\n return { data: [], isSuccess: false }\n }\n }\n\n updateBudget = async (budget: Budget) => {\n try {\n const updatedBudget = await this.api.updateBudget(budget)\n\n runInAction(() => {\n const index = this.budgets.findIndex((b) => b.guid === budget.guid)\n if (index >= 0) {\n this.budgets[index] = updatedBudget\n }\n })\n } catch (error) {\n console.error(`Error updating budget: ${error}`)\n }\n }\n}\n","import { Account } from './Account'\nimport { Transaction } from './Transaction'\n\nexport interface Beat {\n account_guids: string[] | []\n active_at?: string | number\n associated_transaction_guid?: string | null\n call_to_action?: string | null\n category_guids?: string[] | []\n created_at?: string | number\n cta_clicked_at?: number | null\n data_series: DataSeries\n description?: string\n digest?: string\n dismissed_at?: number | null\n displayed_at?: string | null\n errors?: any\n guid: string\n has_been_displayed: boolean\n html_description?: string\n html_in_description_cta?: string\n html_micro_call_to_action?: string\n html_micro_description?: string\n html_micro_title?: string\n html_short_title?: string\n html_title: string\n icon_color?: string | null\n icon_type?: number | null\n in_description_cta?: string | null\n is_dismissed: boolean\n is_obsolete: boolean\n is_refreshable: boolean\n is_sampled: boolean\n merchant_guids: string[] | []\n metadata?: string | null\n micro_call_to_action?: string | null\n micro_description?: string | null\n micro_title?: string | null\n payload: any\n primary_account?: Account\n primary_account_guid?: string | null\n primary_category_guid?: string | null\n primary_goal_guid?: string | null\n primary_merchant_guid?: string | null\n primary_scheduled_payment_guid?: string | null\n primary_transaction?: Transaction\n primary_transaction_guid?: string | null\n power_action_completed_at?: string | null\n power_action_has_been_completed?: boolean\n scheduled_payment_guids: string[] | []\n short_title?: string | null\n supporting_action?: string | null\n template: string\n title: string\n transaction_guids: string[] | []\n transactions?: Transaction[]\n user_guid: string\n user_verification: UserVerification\n}\n\nexport interface DataSeries {\n names?: string[]\n types?: string[]\n data?: any[]\n}\n\nexport enum UserVerification {\n UNKNOWN = 0,\n CORRECT = 1,\n INCORRECT = 2,\n}\n","import { ScheduledPayment, Transaction } from '../index'\n\nexport enum ExpenseStatus {\n Missed = 'Missed',\n Paid = 'Paid',\n Upcoming = 'Upcoming expense',\n Income = 'Income',\n}\n\nexport interface Expense extends ScheduledPayment {\n status: ExpenseStatus\n payments: Transaction[]\n transactions: Transaction[]\n}\n\nexport enum ScheduledPaymentTypes {\n Unknown = 0,\n Subscription = 1,\n Bill = 2,\n}\n","export enum ScreenSize {\n Desktop = 'Desktop',\n Mobile = 'Mobile',\n}\n","import { ApiEndpoints, Fetch } from '../../common'\nimport { Ticket } from '../../common/types/Help'\n\nexport class HelpApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n createSupportTicket = async (ticket: Ticket) => {\n return this.fetchInstance.post(ApiEndpoints.SUPPORT_TICKETS, ticket).then((data) => data)\n }\n}\n","import type { HelpCategory, Profile } from '../../common/types/Help'\nimport { CategoryList } from '../../common/types/localization/HelpCopy'\nimport { HELP_CATEGORIES } from '../constants'\n\nconst isCategoryAccessibleByProfile = (category: HelpCategory, profile: Profile): boolean => {\n if (category.guid === 'general' || category.guid === 'insights') return true\n if (!category.flags) return false\n return category.flags.every((flag) => profile[flag as keyof Profile])\n}\n\nexport const getAccessibleHelpCategories = (\n profile: Profile,\n categoryList: CategoryList,\n): HelpCategory[] => {\n const accessibleCategories: HelpCategory[] = []\n\n for (const el of HELP_CATEGORIES) {\n const category = categoryList[el.guid as keyof CategoryList]\n if (!category) continue\n\n const updatedCategory = {\n ...el,\n title: category.label,\n topics: el.topics.map(({ topicKey }, index) => ({\n topicKey,\n label: category.topics[index],\n })),\n }\n if (isCategoryAccessibleByProfile(updatedCategory, profile))\n accessibleCategories.push(updatedCategory)\n }\n\n return accessibleCategories\n}\n","import { makeAutoObservable } from 'mobx'\n\nimport { HelpApi } from '../api/HelpApi'\nimport { HelpCopy, type GlobalStore } from '../../common'\nimport { Config } from '../../common/types/Global'\nimport { HelpAlertProps, Ticket } from '../../common/types/Help'\nimport { getAccessibleHelpCategories } from '../utils'\n\nexport class HelpStore {\n alert: HelpAlertProps = { message: '', severity: undefined }\n api = new HelpApi('/', '')\n appConfig: Config | undefined\n globalStore: GlobalStore\n isLoading: boolean = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new HelpApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n createSupportTicket = async (ticket: Ticket) => {\n try {\n this.isLoading = true\n await this.api.createSupportTicket(ticket)\n this.setAlert(this.copy.request_support_submit_success_message, 'success')\n } catch (error) {\n this.setAlert(this.copy.request_support_submit_failure_message, 'error')\n console.error(`Error occurred while submitting:`, error)\n } finally {\n this.isLoading = false\n }\n }\n\n setAlert = (message: string, severity: HelpAlertProps['severity'] = undefined) =>\n (this.alert = { message, severity })\n\n get copy(): HelpCopy {\n return this.globalStore.copyStore.copy.help\n }\n\n get helpCategories() {\n const { client_communication_profile, client_profile } = this.globalStore.appDataStore.appData\n\n const {\n help: { category_list },\n } = this.globalStore.copyStore.copy\n\n return getAccessibleHelpCategories(\n {\n ...client_communication_profile,\n ...client_profile,\n ...this.globalStore.appConfig.config,\n },\n category_list,\n )\n }\n}\n","import { ApiEndpoints, Fetch, Holding } from '../../common'\n\nexport class HoldingApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n getHoldings = async () => {\n return this.fetchInstance.get(ApiEndpoints.HOLDINGS).then((data) => data.holdings)\n }\n\n updateHoldings = async (holding: Holding) => {\n return this.fetchInstance\n .put(`${ApiEndpoints.HOLDINGS}/${holding.guid}`, holding)\n .then((data) => data.holding)\n }\n}\n","import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { type Holding, GlobalStore } from '../../common'\n\nimport { HoldingApi } from '../api/HoldingApi'\nimport { AnalysisType } from '../constants'\nimport {\n analysisChartData,\n analysisDetailsData,\n mapDataToPercentageGrid,\n} from '../util/InvestmentUtil'\n\nexport class HoldingStore {\n analysisType: AnalysisType = AnalysisType.Stocks\n api = new HoldingApi('/', '')\n holdings: Holding[] = []\n holdingsLoaded = false\n globalStore: GlobalStore\n showConnectionsWidget = false\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new HoldingApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n get analysisChartData() {\n return mapDataToPercentageGrid(analysisChartData(this.visibleHoldings), this.analysisType)\n }\n\n get analysisDetails() {\n return analysisDetailsData(this.visibleHoldings)[this.analysisType] || {}\n }\n\n get visibleHoldings() {\n return this.holdings.filter((holding) =>\n this.globalStore.globalUiStore.selectedAccountGuids.includes(holding.account_guid),\n )\n }\n\n setShowConnectionsWidget = (value: boolean) => {\n this.showConnectionsWidget = value\n }\n\n loadHoldings = async () => {\n try {\n const holdings = await this.api.getHoldings()\n\n runInAction(() => {\n this.holdings = [...holdings]\n this.holdingsLoaded = true\n })\n } catch (error) {\n console.error(`Error occured while getting holdings: ${error}`)\n }\n }\n\n setAnalysisType = (analysisType: AnalysisType) => {\n this.analysisType = analysisType\n }\n\n updateHoldings = async (holding: Holding) => {\n this.holdingsLoaded = false\n try {\n const updatedHolding = await this.api.updateHoldings(holding)\n const updatedIndex = this.holdings.findIndex(({ guid }) => guid === holding.guid)\n\n if (updatedIndex >= 0) {\n const holdings = [...this.holdings]\n holdings[updatedIndex] = updatedHolding\n\n runInAction(() => {\n this.holdings = holdings\n this.holdingsLoaded = true\n })\n }\n } catch (error) {\n console.error(`Error occurred while updating holding: ${error}`)\n }\n }\n}\n","import { AppConfig } from '../types/AppData'\n\nexport const DefaultAppConfig: AppConfig = {\n clientConfig: {},\n clientStyleProfile: {},\n config: {\n assets_prefix: '/assets',\n bundle: 'widgetLoader',\n client_guid: '',\n dashboard_accounts_index: 6,\n dashboard_accounts_location: 0,\n dashboard_activity_index: 2,\n dashboard_activity_location: 0,\n dashboard_budgets_index: 5,\n dashboard_budgets_location: 1,\n dashboard_cash_flow_index: 0,\n dashboard_cash_flow_location: 0,\n dashboard_connect_index: 7,\n dashboard_connect_location: 1,\n dashboard_insights_index: 3,\n dashboard_insights_location: 1,\n dashboard_spending_index: 1,\n dashboard_spending_location: 1,\n dashboard_trends_index: 4,\n dashboard_trends_location: 0,\n display_account_number_in_accounts: true,\n display_add_manual_transaction_in_transactions: true,\n display_available_balance_in_accounts: true,\n display_email_edit_field_in_settings: true,\n display_mobile_devices_in_settings: true,\n display_notification_settings_in_settings: true,\n display_only_external_accounts_in_accounts: false,\n display_password_options_in_settings: true,\n display_sms_edit_field_in_settings: true,\n display_terms_and_conditions: true,\n display_user_profile_in_settings: true,\n display_user_transaction_rules_in_settings: true,\n enable_add_account_in_zero_state: true,\n enable_aggregation_prompts: true,\n enable_external_accounts_in_goals_widget: true,\n enable_funds_transfers_in_goals_widget: false,\n enable_manual_accounts: true,\n enable_mark_account_closed_for_held_accounts: true,\n enable_mark_account_duplicate_for_held_accounts: true,\n enable_renaming_home_accounts: true,\n enable_support_requests: false,\n language: 'en-US',\n product_name: 'Money Dashboard',\n session_token: '',\n show_account_nicknames_in_master: false,\n show_accounts_widget_in_master: true,\n show_budgets_widget_in_master: true,\n show_carousel_card_border_in_pulse_micro_widget: false,\n show_cash_flow_widget_in_master: true,\n show_connections_widget_in_master: true,\n show_cta_colocated_with_text_in_pulse_micro_widget: true,\n show_debts_widget_in_master: true,\n show_finstrong_widget_in_master: true,\n show_full_experience_link_in_pulse_micro_widget: false,\n show_full_experience_link_in_pulse_mini_widget: false,\n show_goals_widget_in_master: true,\n show_help_widget_in_master: true,\n show_horizontal_padding_in_pulse_micro_widget: true,\n show_icon_in_pulse_micro_widget: true,\n show_insights_widget_in_master: true,\n show_investments_widget_in_master: false,\n show_mx_branding: true,\n show_navigation_controls_in_pulse_micro_widget: true,\n show_net_worth_widget_in_master: true,\n show_notifications_widget_in_master: true,\n show_recurring_transactions_widget_in_master: true,\n show_settings_widget_in_master: true,\n show_spending_plan_widget_in_master: false,\n show_spending_widget_in_master: true,\n show_transactions_widget_in_master: true,\n show_trends_widget_in_master: true,\n type: 'money-dashboard',\n websocket: {\n hmac: '',\n token: '',\n url: '',\n },\n widgets_display_name: 'Money Dashboard ',\n },\n honeyBadgerPublicKey: '',\n options: {\n assets_prefix: '/assets',\n brokaw_auth: {\n token: '',\n hmac: '',\n url: '',\n },\n brokaw_websocket_url: '',\n bundle: 'widgetLoader',\n custom_copy_namespace: '',\n language: 'en-US',\n product_name: 'Master Widget',\n session_token: '',\n subtype: 'master',\n type: 'money_dashboard',\n },\n postHogPublicKey: 'phc_1fVYJICC69TpW4wagp9o2XqQ8E7X98cAmcR5psSpfkE',\n userFeatures: [],\n}\n","import Fetch from '../utils/Fetch'\n\nimport { ApiEndpoints } from '../constants'\nimport { AppData } from '../types'\n\nexport class AppDataApi {\n fetchInstance: Fetch\n\n constructor(endpoint: string, token: string) {\n this.fetchInstance = new Fetch(endpoint, token)\n }\n\n getAppData = async () => {\n return this.fetchInstance.get(ApiEndpoints.APP_DATA).then((data): AppData => data)\n }\n}\n","import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { AppDataApi } from '../api/AppDataApi'\n\nimport type {\n AppConfig,\n AppData,\n Banner,\n User,\n UserCommunicationProfile,\n UserProfile,\n} from '../types'\nimport { BannerApi } from '../api'\nimport { GlobalStore } from './GlobalStore'\n\nexport class AppDataStore {\n globalStore: GlobalStore\n api: AppDataApi = new AppDataApi('/', '')\n bannerApi: BannerApi = new BannerApi('/')\n\n appData: AppData = {} as AppData\n banner: Banner = {}\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new AppDataApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n get appConfig(): AppConfig {\n return this.globalStore.appConfig\n }\n\n get clientCommunicationProfile() {\n return this.appData.client_communication_profile\n }\n\n get clientInsightProfile() {\n return this.appData.client_insight_profile\n }\n\n get user() {\n return this.appData.user\n }\n\n get userCommunicationProfile() {\n return this.appData.user_communication_profile\n }\n\n get userProfile() {\n return this.appData.user_profile\n }\n\n loadAppData = async (appDataOverrides?: AppData) => {\n try {\n const appData = appDataOverrides || (await this.api.getAppData())\n\n runInAction(() => {\n this.appData = appData\n this.bannerApi = new BannerApi(appData.address?.bullseye || '/')\n })\n } catch (error) {\n console.error(`Error loading app data: ${error}`)\n }\n }\n\n loadBanner = async () => {\n try {\n const userGuid = this.user?.guid ?? null\n const banner = userGuid ? await this.bannerApi.getBanner(userGuid) : {}\n\n runInAction(() => {\n this.banner = banner\n })\n } catch (error) {\n console.error(`Error loading banner: ${error}`)\n }\n }\n\n setUser = (user: User) => (this.appData.user = user)\n\n setUserCommunicationProfile = (profile: UserCommunicationProfile) =>\n (this.appData.user_communication_profile = profile)\n\n setUserProfile = (userProfile: UserProfile) => (this.appData.user_profile = userProfile)\n}\n","import { makeAutoObservable } from 'mobx'\n\nimport { WidgetApi } from '../api'\n\nimport type { GlobalStore } from '../../common'\n\nexport class ConnectStore {\n globalStore: GlobalStore\n widgetApi: WidgetApi = new WidgetApi('/', '')\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.widgetApi = new WidgetApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n loadWidget = async ({ widget = 'connect_widget', mode = 'light', ...rest }) => {\n return await this.widgetApi.requestWidgetUrl({\n widget_url: { widget_type: widget, color_scheme: mode, ...rest },\n })\n }\n}\n","import { makeAutoObservable } from 'mobx'\n\nimport { addMonths } from 'date-fns/addMonths'\nimport { endOfMonth } from 'date-fns/endOfMonth'\nimport { getMonth } from 'date-fns/getMonth'\nimport { startOfMonth } from 'date-fns/startOfMonth'\n\nimport { Account } from '../types'\nimport type { GlobalStore } from './GlobalStore'\n\nexport class GlobalUiStore {\n globalStore: GlobalStore\n isInitialized = false\n\n selectedAccounts: Account[] = []\n selectedAccountGuids: string[] = this.selectedAccounts.map((account) => account.guid)\n\n displayedDate = new Date()\n displayedDateRange = {\n start: startOfMonth(this.displayedDate),\n end: endOfMonth(this.displayedDate),\n }\n\n constructor(globalStore: GlobalStore) {\n makeAutoObservable(this)\n this.globalStore = globalStore\n }\n\n get isCopyLoaded() {\n return this.globalStore.copyStore.isInitialized\n }\n\n setInitialized = (isInitialized: boolean) => {\n this.isInitialized = isInitialized\n }\n\n // for the global account filter\n // if excluded from 1 widget, excluded from all\n setSelectedAccounts = (accounts: Account[]) => {\n this.selectedAccounts = accounts.filter(\n (account: Account) =>\n !(\n account.is_excluded_from_accounts ||\n account.is_excluded_from_budgets ||\n account.is_excluded_from_cash_flow ||\n account.is_excluded_from_debts ||\n account.is_excluded_from_goals ||\n account.is_excluded_from_investments ||\n account.is_excluded_from_net_worth ||\n account.is_excluded_from_spending ||\n account.is_excluded_from_transactions ||\n account.is_excluded_from_trends\n ),\n )\n this.selectedAccountGuids = this.selectedAccounts.map((account) => account.guid)\n }\n\n // Sets an array of selected account guids for the AccountFilter component\n setSelectedAccountGuids = async (guids: string[]) => {\n const currentSelected = new Set(this.selectedAccountGuids)\n const newSelected = new Set(guids)\n\n // determine if and how selections are different; get differing guid(s)\n const guidsToInclude = [...newSelected].filter((guid) => !currentSelected.has(guid))\n const guidsToExclude = [...currentSelected].filter((guid) => !newSelected.has(guid))\n\n if (guidsToInclude.length > 0) {\n this.globalStore.accountStore.updateAccountFiltering(guidsToInclude, false)\n }\n\n if (guidsToExclude.length > 0) {\n this.globalStore.accountStore.updateAccountFiltering(guidsToExclude, true)\n }\n\n this.selectedAccountGuids = guids\n }\n\n setDisplayedDate = (startDate: Date, endDate: Date) => {\n this.displayedDate = endDate\n this.displayedDateRange = {\n start: startDate,\n end: endDate,\n }\n }\n\n get shouldDisableNextDate() {\n const selectedMonth = getMonth(this.displayedDate)\n const nextMonth = getMonth(addMonths(new Date(), 1))\n\n return selectedMonth === nextMonth\n }\n\n get shouldDisablePrevDate() {\n const selectedMonth = getMonth(this.displayedDate)\n const currentMonth = getMonth(new Date())\n\n return selectedMonth === currentMonth\n }\n}\n","import { makeAutoObservable, runInAction } from 'mobx'\n\nimport { UserApi } from '../api'\nimport { GlobalStore } from './GlobalStore'\nimport type { User, UserFeature, UserProfile } from '../types'\n\nexport class UserStore {\n globalStore: GlobalStore\n api: UserApi = new UserApi('/', '')\n\n userFeatures: UserFeature[] = []\n\n constructor(globalStore: GlobalStore) {\n this.globalStore = globalStore\n this.api = new UserApi(globalStore.endpoint, globalStore.sessionToken)\n\n makeAutoObservable(this)\n }\n\n // DEPRECATED: Initialize api in constructor and use loadUserFeatures instead\n // TODO: Remove this function\n initialize = async (endpoint: string, token: string) => {\n this.api = new UserApi(endpoint, token)\n await this.loadUserFeatures()\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 loadUserFeatures = async (featuresOverrides?: UserFeature[]) => {\n try {\n const features = featuresOverrides || (await this.api.getUserFeatures())\n\n runInAction(() => {\n this.userFeatures = features\n })\n } catch (e) {\n console.error(`Error occurred while loading user features: ${e}`)\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 console.error(`Error updating User: ${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 console.error(`Error occurred while updating user profile: ${error}`)\n }\n }\n}\n","import { makeAutoObservable } from 'mobx'\n\nimport { AccountStore } from '../../accounts'\nimport { AnalyticsStore } from '../../analytics/stores/AnalyticsStore'\nimport { BeatStore } from '../../insights/store/BeatStore'\nimport { BudgetsStore } from '../../budgets/store/BudgetsStore'\nimport { CashflowStore } from '../../cashflow'\nimport { CategoryStore } from '../../categories'\nimport { DebtsStore } from '../../debts'\nimport { FinstrongStore } from '../../finstrong'\nimport { GoalStore } from '../../goals'\nimport { HelpStore } from '../../help/store/HelpStore'\nimport { HoldingStore } from '../../investments/stores/HoldingStore'\nimport { MerchantStore } from '../../merchants'\nimport { NetWorthStore } from '../../networth'\nimport { NotificationStore } from '../../notifications'\nimport { SettingsStore } from '../../settings'\nimport { TransactionStore } from '../../transactions'\nimport { DefaultAppConfig } from '../constants/DefaultConfig'\nimport { RecurringTransactionsStore } from '../../recurringtransactions'\nimport { TrendsStore } from '../../trends'\n\nimport { AppDataStore } from './AppDataStore'\nimport { ConnectStore } from './ConnectStore'\nimport { GlobalCopyStore } from './GlobalCopyStore'\nimport { GlobalUiStore } from './GlobalUiStore'\nimport { UserStore } from './UserStore'\n\nimport type { Account, Category, Institution, Member } from '../../common'\n\nimport type {\n AppConfig,\n AppData,\n Beat,\n Tag,\n Tagging,\n Transaction,\n TransactionRule,\n UserFeature,\n} from '../types'\n\ninterface LoadDataProps {\n accounts?: Account[]\n appData?: AppData\n associatedBeats?: Beat[]\n categories?: Category[]\n institutions?: Institution[]\n members?: Member[]\n taggings?: Tagging[]\n tags?: Tag[]\n transactionRules?: TransactionRule[]\n transactions?: Transaction[]\n userFeatures?: UserFeature[]\n}\n\nexport class GlobalStore {\n // Global properties\n appConfig: AppConfig = DefaultAppConfig\n endpoint: string = '/'\n sessionToken: string = ''\n\n // Data Stores\n accountStore: AccountStore\n appDataStore: AppDataStore\n analyticsStore: AnalyticsStore\n beatStore: BeatStore\n budgetsStore: BudgetsStore\n cashflowStore: CashflowStore\n categoryStore: CategoryStore\n connectStore: ConnectStore\n copyStore: GlobalCopyStore\n debtsStore: DebtsStore\n finstrongStore: FinstrongStore\n goalStore: GoalStore\n helpStore: HelpStore\n holdingStore: HoldingStore\n merchantStore: MerchantStore\n netWorthStore: NetWorthStore\n notificationStore: NotificationStore\n recurringTransactionsStore: RecurringTransactionsStore\n settingsStore: SettingsStore\n transactionStore: TransactionStore\n trendsStore: TrendsStore\n userStore: UserStore\n\n // UI Stores\n globalUiStore: GlobalUiStore\n\n constructor(appConfig: AppConfig = DefaultAppConfig, endpoint: string = '/') {\n this.appConfig = appConfig\n this.endpoint = endpoint\n this.sessionToken = appConfig.options.session_token ?? ''\n\n this.accountStore = new AccountStore(this)\n this.appDataStore = new AppDataStore(this)\n this.analyticsStore = new AnalyticsStore(this)\n this.beatStore = new BeatStore(this)\n this.budgetsStore = new BudgetsStore(this)\n this.cashflowStore = new CashflowStore(this)\n this.categoryStore = new CategoryStore(this)\n this.connectStore = new ConnectStore(this)\n this.copyStore = new GlobalCopyStore(this)\n this.debtsStore = new DebtsStore(this)\n this.finstrongStore = new FinstrongStore(this)\n this.goalStore = new GoalStore(this)\n this.helpStore = new HelpStore(this)\n this.holdingStore = new HoldingStore(this)\n this.merchantStore = new MerchantStore(this)\n this.netWorthStore = new NetWorthStore(this)\n this.notificationStore = new NotificationStore(this)\n this.recurringTransactionsStore = new RecurringTransactionsStore(this)\n this.settingsStore = new SettingsStore(this)\n this.transactionStore = new TransactionStore(this)\n this.trendsStore = new TrendsStore(this)\n this.userStore = new UserStore(this)\n\n this.globalUiStore = new GlobalUiStore(this)\n\n makeAutoObservable(this)\n }\n\n get isInitialized() {\n return this.globalUiStore.isInitialized\n }\n\n loadData = async ({\n accounts,\n appData,\n associatedBeats,\n categories,\n institutions,\n transactionRules,\n transactions,\n userFeatures,\n }: LoadDataProps = {}) => {\n await Promise.all([\n // Load copy, config and quser data\n this.copyStore.loadCopy(),\n this.appDataStore.loadAppData(appData),\n this.userStore.loadUserFeatures(userFeatures),\n ])\n\n // Load common data used by all widgets\n await Promise.all([\n this.accountStore.loadAccountData({ accounts, institutions }),\n this.categoryStore.loadCategories(categories),\n this.transactionStore.loadTransactionData({\n associatedBeats,\n transactionRules,\n transactions,\n }),\n ])\n\n this.globalUiStore.setInitialized(true)\n }\n}\n"],"names":["RecurrenceTypes","RECURRENCE_COPY","LOADING_STATUS","PlanTypes","IterationItemTypes","getClientTheme","theme","clientStyleProfile","isDark","generatePalette","colorKey","defaultColor","color","lighten","darken","palette","components","alpha","BannerApi","bullseyeEndpoint","Fetch","userGuid","path","data","error","LocalizedCopyApi","endpoint","token","req","ApiEndpoints","namespace","ScheduledPaymentsApi","scheduledPayment","TransactionType","guid","UserApi","e","user","userProfile","WidgetApi","usePrevious","value","ref","useRef","useEffect","Legend","labelAverage","labelMain","tokens","useTokens","styles","getStyles","jsxs","jsx","Text","css","Bar","ariaLabel","height","index","label","onClick","selectedIndex","handleKeyDown","event","labelColor","BarLabel","frameName","expandAnimation","keyframes","BarColumn","averageLineHeight","bottomHeight","range","topHeight","valueLabel","width","xAxisLabel","topBarHeight","bottomBarHeight","xAxisColor","sumReducer","acc","rangeReducer","valueReducer","getSectionHeight","hasSection1","hasSection2","fullHeight","getAverageLineHeight","average","max","min","BarChart","barWidth","legendLabelAverage","legendLabelMain","onBarClick","valueFormatter","values","avg","hasTop","hasBottom","getBarColor","EmptyColumn","d","React","MultiSegmentDonut","hasGap","segments","size","DEFAULT_DONUT_SIZE","strokeWidth","DEFAULT_STROKE_WIDTH","children","radius","halfSize","offset","length","segment","ResponsiveButton","icon","placement","tooltipText","variant","useTheme","Button","Tooltip","IconButton","GlobalCopyStore","GlobalCopyApi","globalStore","makeAutoObservable","runInAction","translationKey","newCopy","AnalyticsStore","forceReload","posthog","surveys","survey","s","response","orderArray","arr1","arr2","prop","order","direction","item1","item2","transformOfferIntoBeatLikeObject","offer","BeatStore","BeatApi","beats","beatLikeOffers","o","categoryGuids","beat","BudgetsApi","category","amount","parentGuid","budget","BudgetsStore","startOfMonth","startOfToday","endOfMonth","reaction","detailedBudgets","findBudget","subBudget","findSubBudget","augmentBudgets","CategoryGuids","a","b","curr","total","budgets","alert","dateRange","categories","budgetsToDelete","c","budgetToDelete","updatedBudget","UserVerification","ExpenseStatus","ScheduledPaymentTypes","ScreenSize","HelpApi","ticket","isCategoryAccessibleByProfile","profile","flag","getAccessibleHelpCategories","categoryList","accessibleCategories","el","HELP_CATEGORIES","updatedCategory","topicKey","HelpStore","message","severity","client_communication_profile","client_profile","category_list","HoldingApi","holding","HoldingStore","AnalysisType","mapDataToPercentageGrid","analysisChartData","analysisDetailsData","holdings","analysisType","updatedHolding","updatedIndex","DefaultAppConfig","AppDataApi","AppDataStore","appDataOverrides","appData","banner","ConnectStore","widget","mode","rest","GlobalUiStore","account","isInitialized","accounts","guids","currentSelected","newSelected","guidsToInclude","guidsToExclude","startDate","endDate","selectedMonth","getMonth","nextMonth","addMonths","currentMonth","UserStore","featuresOverrides","features","updatedUser","updatedProfile","GlobalStore","appConfig","AccountStore","CashflowStore","CategoryStore","DebtsStore","FinstrongStore","GoalStore","MerchantStore","NetWorthStore","NotificationStore","RecurringTransactionsStore","SettingsStore","TransactionStore","TrendsStore","associatedBeats","institutions","transactionRules","transactions","userFeatures"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAY,IAAAA,uBAAAA,OACVA,EAAAA,EAAA,UAAU,CAAV,IAAA,WACAA,EAAAA,EAAA,YAAY,CAAZ,IAAA,aACAA,EAAAA,EAAA,iBAAiB,CAAjB,IAAA,kBACAA,EAAAA,EAAA,aAAa,CAAb,IAAA,cACAA,EAAAA,EAAA,kBAAkB,CAAlB,IAAA,mBACAA,EAAAA,EAAA,eAAe,CAAf,IAAA,gBACAA,EAAAA,EAAA,oBAAoB,CAApB,IAAA,qBACAA,EAAAA,EAAA,YAAY,CAAZ,IAAA,aARUA,IAAAA,MAAA,CAAA,CAAA;AAWL,MAAMC,KAAkB;AAAA,EAC7B,EAAE,IAAI,GAAyB,MAAM,oBAAoB;AAAA,EACzD,EAAE,IAAI,GAA2B,MAAM,uBAAuB;AAAA,EAC9D,EAAE,IAAI,GAAgC,MAAM,6BAA6B;AAAA,EACzE,EAAE,IAAI,GAA4B,MAAM,wBAAwB;AAAA,EAChE,EAAE,IAAI,GAAiC,MAAM,8BAA8B;AAAA,EAC3E,EAAE,IAAI,GAA8B,MAAM,0BAA0B;AAAA,EACpE,EAAE,IAAI,GAAmC,MAAM,gCAAgC;AAAA,EAC/E,EAAE,IAAI,GAA2B,MAAM,uBAAuB;AAChE,GCpBaC,KAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,SAAS;AAAA,EACT,SAAS;AACX;AAEY,IAAAC,uBAAAA,OACVA,EAAAA,EAAA,eAAe,CAAf,IAAA,gBACAA,EAAAA,EA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5C,KAAK,iBAAiB,oBAAoB;AAAA,QACxC,iBAAAoF;AAAA,QACA,kBAAAE;AAAA,QACA,cAAAC;AAAA,MAAA,CACD;AAAA,IAAA,CACF,GAEI,KAAA,cAAc,eAAe,EAAI;AAAA,EAAA;AAE1C;"}
@@ -40,6 +40,8 @@ export interface MasterConfig {
40
40
  ui_message_webview_url_scheme?: string;
41
41
  }
42
42
  export interface DeepLinkParams {
43
+ account_guids?: string[];
44
+ date_range?: [Date, Date];
43
45
  view: string;
44
46
  }
45
47
  export interface Config {
@@ -42,6 +42,7 @@ export interface MonthlyAmount {
42
42
  * @totalAmount - The total amount (including subcategories) for the current month
43
43
  * @totalAverageAmount - The total average amount (including subcategories) for this category
44
44
  * @totalMonthlyAmounts - The past 12 total monthly amounts (including subcategories)
45
+ * @transactions - The transactions for this category
45
46
  */
46
47
  export interface DetailedCategory extends Category {
47
48
  averageAmount: number;
@@ -54,14 +55,7 @@ export interface DetailedCategory extends Category {
54
55
  totalAmount: number;
55
56
  totalAverageAmount: number;
56
57
  totalMonthlyAmounts: MonthlyAmount[];
57
- }
58
- export interface CategoryListItem {
59
- guid: string;
60
- name: string;
61
- amount: number;
62
- transactions?: Transaction[];
63
- color?: string;
64
- chartLabel?: string;
58
+ transactions: Transaction[];
65
59
  }
66
60
  export interface CategoryTotal {
67
61
  amount: number;
@@ -6,7 +6,7 @@ export type { Beat, DataSeries } from './Beat';
6
6
  export { UserVerification } from './Beat';
7
7
  export type { Budget, BudgetColors, DetailedBudget } from './Budget';
8
8
  export type { CashflowEvent, CashflowSequence, RepeatDay, RepeatInterval, RepeatMonth, RepeatWeekday, } from './Cashflow';
9
- export type { Category, CategoryListItem, CategoryTotal, DateRangeCategoryTotals, DetailedCategory, MonthlyAmount, MonthlyCategoryTotals, } from './Category';
9
+ export type { Category, CategoryTotal, DateRangeCategoryTotals, DetailedCategory, MonthlyAmount, MonthlyCategoryTotals, } from './Category';
10
10
  export type { Client, ClientColorScheme, ClientCommunicationProfile, ClientInsightProfile, ClientProfile, ClientStyleProfile, } from './Client';
11
11
  export type { DateType, DateRange } from './Date';
12
12
  export type { Expense } from './Expense';
@@ -0,0 +1,257 @@
1
+ import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
+ import n from "react";
3
+ import { observer as f } from "mobx-react-lite";
4
+ import d from "@mui/material/Unstable_Grid2";
5
+ import p from "@mui/material/Skeleton";
6
+ import m from "@mui/material/Stack";
7
+ import "bowser";
8
+ import "date-fns/getUnixTime";
9
+ import "date-fns/intlFormat";
10
+ import { av as A, a$ as B, b0 as D } from "../ConnectMiniWidget-CQWafYtQ.mjs";
11
+ import "date-fns/addMonths";
12
+ import "date-fns/addQuarters";
13
+ import "date-fns/addWeeks";
14
+ import "date-fns/addYears";
15
+ import "date-fns/getDay";
16
+ import "date-fns/isBefore";
17
+ import "date-fns/nextDay";
18
+ import "date-fns/setDate";
19
+ import "date-fns/startOfToday";
20
+ import "date-fns/fromUnixTime";
21
+ import "numeral";
22
+ import "@mui/material";
23
+ import G from "@mui/material/Button";
24
+ import { Icon as S, H1 as k, P as F } from "@mxenabled/mxui";
25
+ import W from "@mui/material/Tooltip";
26
+ import I from "@mui/material/Box";
27
+ import T from "@mui/material/IconButton";
28
+ import { e as v, b as C, f as M, d as z, g as $ } from "../Loader-CwdK8lfx.mjs";
29
+ import "@mxenabled/cssinjs";
30
+ import "date-fns/addDays";
31
+ import "date-fns/eachDayOfInterval";
32
+ import "date-fns/eachWeekOfInterval";
33
+ import "date-fns/endOfMonth";
34
+ import "date-fns/format";
35
+ import "date-fns/isSameMonth";
36
+ import "date-fns/startOfMonth";
37
+ import "date-fns/subMonths";
38
+ import H from "@mui/material/Paper";
39
+ import "@mxenabled/mx-icons";
40
+ import "date-fns/isSameDay";
41
+ import "date-fns/isWithinInterval";
42
+ import R from "@mui/material/styles/useTheme";
43
+ import "d3";
44
+ import "@mui/material/styles";
45
+ import "@mui/x-charts";
46
+ import j from "@mui/material/useMediaQuery";
47
+ import "@mui/x-charts/ChartsTooltip";
48
+ import "date-fns/differenceInCalendarDays";
49
+ import "date-fns/endOfToday";
50
+ import "date-fns/endOfYear";
51
+ import "date-fns/startOfYear";
52
+ import "date-fns/subDays";
53
+ import "date-fns/subYears";
54
+ import "@mui/material/ButtonGroup";
55
+ import "@mui/material/Tab";
56
+ import "@mui/material/Tabs";
57
+ import "@mui/material/ToggleButton";
58
+ import "@mui/material/ToggleButtonGroup";
59
+ import "@mui/material/Dialog";
60
+ import "@mui/material/DialogContent";
61
+ import "@mui/material/Card";
62
+ import "@mui/material/CardContent";
63
+ import "@mui/material/CardHeader";
64
+ import "uuid";
65
+ import "@mui/material/CircularProgress";
66
+ import "@mui/material/FormControlLabel";
67
+ import "@mui/material/Radio";
68
+ import "@mui/material/Avatar";
69
+ import "@mui/material/ListItem";
70
+ import "@mui/material/ListItemAvatar";
71
+ import "@mui/material/ListItemButton";
72
+ import "@mui/material/ListItemText";
73
+ import "@mui/material/ListItemIcon";
74
+ import "@mui/material/MenuItem";
75
+ import "@mui/material/TextField";
76
+ import "@mui/material/Switch";
77
+ import "mobx";
78
+ import "posthog-js";
79
+ import "date-fns/differenceInDays";
80
+ import "@mui/x-data-grid-pro";
81
+ import "date-fns";
82
+ import "@mui/material/Divider";
83
+ import "@mui/material/List";
84
+ import "date-fns/formatISO";
85
+ import "date-fns/isAfter";
86
+ import "date-fns/parseISO";
87
+ import "date-fns/subQuarters";
88
+ import "date-fns/lastDayOfMonth";
89
+ import "date-fns/setDayOfYear";
90
+ import "date-fns/addSeconds";
91
+ import "date-fns/differenceInCalendarMonths";
92
+ import "date-fns/getMonth";
93
+ import { useMediaQuery as Q } from "@mui/system";
94
+ const E = f(() => {
95
+ const o = R(), {
96
+ appDataStore: { banner: i, loadBanner: c, user: l }
97
+ } = v();
98
+ return n.useEffect(() => {
99
+ c().finally();
100
+ }, [l]), i?.image_url ? /* @__PURE__ */ t(
101
+ m,
102
+ {
103
+ sx: {
104
+ alignItems: "center",
105
+ width: "100%",
106
+ mb: 24
107
+ },
108
+ children: /* @__PURE__ */ t(
109
+ "a",
110
+ {
111
+ href: i?.redirect_url,
112
+ rel: "noreferrer",
113
+ style: {
114
+ width: "100%"
115
+ },
116
+ target: "_blank",
117
+ children: /* @__PURE__ */ t(
118
+ "img",
119
+ {
120
+ alt: "",
121
+ src: i.image_url,
122
+ style: {
123
+ width: "100%",
124
+ height: "auto",
125
+ border: `1px solid ${o.palette.grey[300]}`
126
+ }
127
+ }
128
+ )
129
+ }
130
+ )
131
+ }
132
+ ) : null;
133
+ }), P = ({ handleConnectClick: o }) => {
134
+ const { common: i } = C(), c = j("(max-width: 700px)");
135
+ return /* @__PURE__ */ t(I, { my: 4, children: c ? /* @__PURE__ */ t(W, { id: "add-accounts", placement: "bottom", title: i.add_accounts, children: /* @__PURE__ */ t(
136
+ T,
137
+ {
138
+ "aria-controls": "add_accounts",
139
+ "aria-describedby": "add-accounts",
140
+ "aria-haspopup": !0,
141
+ "aria-label": i.add_accounts,
142
+ color: "primary",
143
+ onClick: o,
144
+ children: /* @__PURE__ */ t(S, { name: "add", size: 24 })
145
+ }
146
+ ) }) : /* @__PURE__ */ t(
147
+ G,
148
+ {
149
+ "aria-controls": "add_accounts",
150
+ "aria-haspopup": !0,
151
+ "aria-label": i.add_accounts,
152
+ onClick: o,
153
+ startIcon: /* @__PURE__ */ t(S, { name: "add", size: 24 }),
154
+ sx: {
155
+ p: 12,
156
+ whiteSpace: "nowrap",
157
+ minWidth: "max-content"
158
+ },
159
+ variant: "text",
160
+ children: i.add_accounts
161
+ }
162
+ ) });
163
+ }, N = f(P), O = () => {
164
+ const [o, i] = n.useState(!1), c = Q("(max-width:320px)"), { visibleAccounts: l } = M(), { selectedAccountGuids: _, setSelectedAccountGuids: g } = z(), { common: e, connect: s } = C(), { config: b } = $(), { isMobile: x } = A(), r = {
165
+ accountFilterOptionsCopy: {
166
+ accountTypeAccounts: e.account_filter.account_type_accounts,
167
+ cancelButton: e.cancel_button,
168
+ filterButton: e.filter_button,
169
+ filterButtonAria: e.account_filter.filter_button_generic_aria,
170
+ selectAllAccounts: e.account_filter.select_all_accounts,
171
+ toggleAccountTypeAccounts: e.account_filter.toggle_account_type_accounts,
172
+ unselectAllAccounts: e.account_filter.unselect_all_accounts,
173
+ zeroStateButton: e.account_filter.zero_state_button,
174
+ zeroStateDescription: e.account_filter.zero_state_description,
175
+ zeroStateTitle: e.account_filter.zero_state_title
176
+ },
177
+ title: e.filter_button
178
+ }, y = () => {
179
+ const u = (/* @__PURE__ */ new Date()).getHours();
180
+ return u > 1 && u < 12 ? e.good_morning : u >= 12 && u < 18 ? e.good_afternoon : e.good_evening;
181
+ };
182
+ return /* @__PURE__ */ a(n.Fragment, { children: [
183
+ /* @__PURE__ */ t(H, { sx: { gap: 12, mb: x ? 24 : 0, p: 24 }, children: /* @__PURE__ */ a(m, { alignItems: "center", flexDirection: "row", justifyContent: "space-between", children: [
184
+ /* @__PURE__ */ a(m, { children: [
185
+ /* @__PURE__ */ t(k, { variant: c ? "H2" : "H1", children: y() }),
186
+ /* @__PURE__ */ t(F, { color: "text.secondary", children: e.heres_your_spending_overview })
187
+ ] }),
188
+ /* @__PURE__ */ a(m, { flexDirection: "row", children: [
189
+ b.show_connections_widget_in_master && /* @__PURE__ */ t(N, { handleConnectClick: () => i(!0) }),
190
+ /* @__PURE__ */ t(
191
+ B,
192
+ {
193
+ accounts: l,
194
+ copy: r,
195
+ onConnectAccountClick: () => i(!0),
196
+ onFilterClick: (w) => {
197
+ g(w);
198
+ },
199
+ selectedAccountGuids: _,
200
+ showAccountNumbers: !1,
201
+ sx: {
202
+ maxWidth: "100%"
203
+ },
204
+ variant: "text"
205
+ }
206
+ )
207
+ ] })
208
+ ] }) }),
209
+ o && /* @__PURE__ */ t(
210
+ D,
211
+ {
212
+ onClose: () => i(!1),
213
+ showConnectWidget: o,
214
+ title: s.mini_title
215
+ }
216
+ )
217
+ ] });
218
+ }, U = f(O);
219
+ var h = /* @__PURE__ */ ((o) => (o[o.Main = 0] = "Main", o[o.RightSide = 1] = "RightSide", o[o.Disabled = 2] = "Disabled", o))(h || {});
220
+ const q = ({ widgets: o, isLoading: i }) => {
221
+ const { isDesktop: c, isMobile: l } = A(), { copyStore: _ } = v(), { setSelectedAccounts: g } = z(), { visibleAccounts: e } = M();
222
+ n.useEffect(() => {
223
+ g(e);
224
+ }, [e]);
225
+ const s = n.useMemo(
226
+ () => o.filter((r) => r.location !== h.Disabled).sort((r, y) => r.index - y.index),
227
+ [o]
228
+ ), b = n.useMemo(
229
+ () => s.filter((r) => r.location === h.Main),
230
+ [s]
231
+ ), x = n.useMemo(
232
+ () => s.filter((r) => r.location === h.RightSide),
233
+ [s]
234
+ );
235
+ return /* @__PURE__ */ a(d, { container: !0, spacing: l ? 0 : 24, sx: { overflow: "scroll" }, children: [
236
+ /* @__PURE__ */ t(d, { xs: 12, children: _.isInitialized && /* @__PURE__ */ t(U, {}) }),
237
+ /* @__PURE__ */ a(d, { lg: 8, xs: 12, children: [
238
+ /* @__PURE__ */ t(E, {}),
239
+ i && /* @__PURE__ */ a(m, { direction: "column", spacing: 24, children: [
240
+ /* @__PURE__ */ t(p, { height: 100, variant: "rounded", width: "100%" }),
241
+ /* @__PURE__ */ t(p, { height: 300, variant: "rounded", width: "100%" }),
242
+ /* @__PURE__ */ t(p, { height: 300, variant: "rounded", width: "100%" })
243
+ ] }),
244
+ !i && /* @__PURE__ */ t(m, { direction: "column", spacing: 24, children: c ? b.map((r) => /* @__PURE__ */ t(n.Fragment, { children: r.component }, r.index)) : s.map((r) => /* @__PURE__ */ t(n.Fragment, { children: r.component }, r.index)) })
245
+ ] }),
246
+ c && /* @__PURE__ */ t(d, { lg: 4, children: i ? /* @__PURE__ */ a(m, { direction: "column", spacing: 24, children: [
247
+ /* @__PURE__ */ t(p, { height: 200, variant: "rounded", width: "100%" }),
248
+ /* @__PURE__ */ t(p, { height: 100, variant: "rounded", width: "100%" }),
249
+ /* @__PURE__ */ t(p, { height: 300, variant: "rounded", width: "100%" })
250
+ ] }) : /* @__PURE__ */ t(m, { direction: "column", spacing: 24, children: x.map((r) => /* @__PURE__ */ t(n.Fragment, { children: r.component }, r.index)) }) })
251
+ ] });
252
+ }, Wo = f(q);
253
+ export {
254
+ Wo as Dashboard,
255
+ h as DashboardLocation
256
+ };
257
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../src/common/components/Banner.tsx","../../src/common/components/addaccounts/AddAccounts.tsx","../../src/dashboard/Greeting.tsx","../../src/dashboard/constants/Dashboard.ts","../../src/dashboard/Dashboard.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport useTheme from '@mui/material/styles/useTheme'\nimport Stack from '@mui/material/Stack'\n\nimport { useGlobalStore } from '..'\n\nexport const Banner = observer(() => {\n const theme = useTheme()\n const {\n appDataStore: { banner, loadBanner, user },\n } = useGlobalStore()\n\n React.useEffect(() => {\n loadBanner().finally()\n }, [user])\n\n if (!banner?.image_url) {\n return null\n }\n\n return (\n <Stack\n sx={{\n alignItems: 'center',\n width: '100%',\n mb: 24,\n }}\n >\n <a\n href={banner?.redirect_url}\n rel=\"noreferrer\"\n style={{\n width: '100%',\n }}\n target=\"_blank\"\n >\n <img\n alt=\"\"\n src={banner.image_url}\n style={{\n width: '100%',\n height: 'auto',\n border: `1px solid ${theme.palette.grey['300']}`,\n }}\n />\n </a>\n </Stack>\n )\n})\n","import { observer } from 'mobx-react-lite'\n\nimport Box from '@mui/material/Box'\nimport Button from '@mui/material/Button'\nimport IconButton from '@mui/material/IconButton'\nimport Tooltip from '@mui/material/Tooltip'\nimport useMediaQuery from '@mui/material/useMediaQuery'\n\nimport { Icon } from '@mxenabled/mxui'\n\nimport { useGlobalCopyStore } from '../../../common'\n\ninterface AddAccountsProps {\n handleConnectClick: () => void\n}\n\nconst AddAccounts = ({ handleConnectClick }: AddAccountsProps) => {\n const { common: copy } = useGlobalCopyStore()\n const isSmallerThan700 = useMediaQuery('(max-width: 700px)')\n\n return (\n <Box my={4}>\n {isSmallerThan700 ? (\n <Tooltip id=\"add-accounts\" placement=\"bottom\" title={copy.add_accounts}>\n <IconButton\n aria-controls=\"add_accounts\"\n aria-describedby=\"add-accounts\"\n aria-haspopup={true}\n aria-label={copy.add_accounts}\n color=\"primary\"\n onClick={handleConnectClick}\n >\n <Icon name=\"add\" size={24} />\n </IconButton>\n </Tooltip>\n ) : (\n <Button\n aria-controls=\"add_accounts\"\n aria-haspopup={true}\n aria-label={copy.add_accounts}\n onClick={handleConnectClick}\n startIcon={<Icon name=\"add\" size={24} />}\n sx={{\n p: 12,\n whiteSpace: 'nowrap',\n minWidth: 'max-content',\n }}\n variant=\"text\"\n >\n {copy.add_accounts}\n </Button>\n )}\n </Box>\n )\n}\n\nexport default observer(AddAccounts)\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\nimport Paper from '@mui/material/Paper'\n\nimport { H1, P } from '@mxenabled/mxui'\nimport { useMediaQuery } from '@mui/system'\n\nimport {\n AccountFilter,\n ConnectDrawer,\n useAccountStore,\n useAppConfig,\n useGlobalCopyStore,\n useGlobalUiStore,\n useScreenSize,\n} from '../common'\n\nimport AddAccounts from '../common/components/addaccounts/AddAccounts'\n\nconst Greeting = () => {\n const [showConnectWidget, setShowConnectWidget] = React.useState(false)\n\n const isSmallMobileDevice = useMediaQuery('(max-width:320px)')\n\n const { visibleAccounts: accounts } = useAccountStore()\n const { selectedAccountGuids, setSelectedAccountGuids } = useGlobalUiStore()\n const { common: commonCopy, connect: connectCopy } = useGlobalCopyStore()\n const { config } = useAppConfig()\n const { isMobile } = useScreenSize()\n\n const accountFilterCopy = {\n accountFilterOptionsCopy: {\n accountTypeAccounts: commonCopy.account_filter.account_type_accounts,\n cancelButton: commonCopy.cancel_button,\n filterButton: commonCopy.filter_button,\n filterButtonAria: commonCopy.account_filter.filter_button_generic_aria,\n selectAllAccounts: commonCopy.account_filter.select_all_accounts,\n toggleAccountTypeAccounts: commonCopy.account_filter.toggle_account_type_accounts,\n unselectAllAccounts: commonCopy.account_filter.unselect_all_accounts,\n zeroStateButton: commonCopy.account_filter.zero_state_button,\n zeroStateDescription: commonCopy.account_filter.zero_state_description,\n zeroStateTitle: commonCopy.account_filter.zero_state_title,\n },\n title: commonCopy.filter_button,\n }\n\n const getGreeting = () => {\n const now = new Date()\n const hour = now.getHours()\n\n if (hour > 1 && hour < 12) {\n return commonCopy.good_morning\n } else if (hour >= 12 && hour < 18) {\n return commonCopy.good_afternoon\n } else {\n return commonCopy.good_evening\n }\n }\n\n return (\n <React.Fragment>\n <Paper sx={{ gap: 12, mb: isMobile ? 24 : 0, p: 24 }}>\n <Stack alignItems=\"center\" flexDirection=\"row\" justifyContent=\"space-between\">\n <Stack>\n <H1 variant={isSmallMobileDevice ? 'H2' : 'H1'}>{getGreeting()}</H1>\n <P color=\"text.secondary\">{commonCopy.heres_your_spending_overview}</P>\n </Stack>\n <Stack flexDirection=\"row\">\n {config.show_connections_widget_in_master && (\n <AddAccounts handleConnectClick={() => setShowConnectWidget(true)} />\n )}\n <AccountFilter\n accounts={accounts}\n copy={accountFilterCopy}\n onConnectAccountClick={() => setShowConnectWidget(true)}\n onFilterClick={(guids) => {\n setSelectedAccountGuids(guids)\n }}\n selectedAccountGuids={selectedAccountGuids}\n showAccountNumbers={false}\n sx={{\n maxWidth: '100%',\n }}\n variant=\"text\"\n />\n </Stack>\n </Stack>\n </Paper>\n {showConnectWidget && (\n <ConnectDrawer\n onClose={() => setShowConnectWidget(false)}\n showConnectWidget={showConnectWidget}\n title={connectCopy.mini_title}\n />\n )}\n </React.Fragment>\n )\n}\n\nexport default observer(Greeting)\n","export enum DashboardLocation {\n Main = 0,\n RightSide = 1,\n Disabled = 2,\n}\n","import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Grid from '@mui/material/Unstable_Grid2'\nimport Skeleton from '@mui/material/Skeleton'\nimport Stack from '@mui/material/Stack'\n\nimport { useAccountStore, useGlobalStore, useGlobalUiStore, useScreenSize } 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 const { setSelectedAccounts } = useGlobalUiStore()\n const { visibleAccounts: accounts } = useAccountStore()\n\n React.useEffect(() => {\n setSelectedAccounts(accounts)\n }, [accounts])\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} sx={{ overflow: 'scroll' }}>\n <Grid xs={12}>{copyStore.isInitialized && <Greeting />}</Grid>\n\n {/* Main Column */}\n <Grid lg={8} xs={12}>\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 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"],"names":["Banner","observer","theme","useTheme","banner","loadBanner","user","useGlobalStore","React","jsx","Stack","AddAccounts","handleConnectClick","copy","useGlobalCopyStore","isSmallerThan700","useMediaQuery","Box","Tooltip","IconButton","Icon","Button","AddAccounts$1","Greeting","showConnectWidget","setShowConnectWidget","isSmallMobileDevice","accounts","useAccountStore","selectedAccountGuids","setSelectedAccountGuids","useGlobalUiStore","commonCopy","connectCopy","config","useAppConfig","isMobile","useScreenSize","accountFilterCopy","getGreeting","hour","jsxs","Paper","H1","P","AccountFilter","guids","ConnectDrawer","Greeting$1","DashboardLocation","Dashboard","widgets","isLoading","isDesktop","copyStore","setSelectedAccounts","sortedWidgets","widget","w1","w2","mainWidgets","sideWidgets","Grid","Skeleton","Dashboard$1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQa,MAAAA,IAASC,EAAS,MAAM;AACnC,QAAMC,IAAQC,KACR;AAAA,IACJ,cAAc,EAAE,QAAAC,GAAQ,YAAAC,GAAY,MAAAC,EAAK;AAAA,MACvCC,EAAe;AAMf,SAJJC,EAAM,UAAU,MAAM;AACpB,IAAAH,EAAA,EAAa;EAAQ,GACpB,CAACC,CAAI,CAAC,GAEJF,GAAQ,YAKX,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,YAAY;AAAA,QAC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