@mx-cartographer/experiences 8.0.0-alpha.test2 → 8.0.0-alpha.v2
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.
- package/CHANGELOG.md +335 -0
- package/README.md +5 -3
- package/dist/{Account-CMjOp7S2.mjs → Account-BiB1F8lL.mjs} +2 -2
- package/dist/{Account-BIKn4XEZ.mjs → Account-DuOz1a27.mjs} +1 -1
- package/dist/{AccountApi-DgZ8ILj1.mjs → AccountApi-ChQr5PAZ.mjs} +1 -1
- package/dist/AccountDetailsHeader-D9gbTbUt.mjs +95 -0
- package/dist/{AccountFields-DuFtmuud.mjs → AccountFields-CxqONzjY.mjs} +12 -12
- package/dist/AccountListItem-D9WJDbZ1.mjs +94 -0
- package/dist/{AccountStore-Cq_w2Hfb.mjs → AccountStore-DpYvNnql.mjs} +15 -9
- package/dist/Accounts-CseLC3lL.mjs +5 -0
- package/dist/Accounts-o7ohkngR.mjs +27 -0
- package/dist/{Analytics-i5h6BxR1.mjs → Analytics-BYItVAe-.mjs} +10 -0
- package/dist/{BeatApi-De2IaqH2.mjs → BeatApi-EFHXULDx.mjs} +1 -1
- package/dist/{BeatStore-D_NYuBSz.mjs → BeatStore-C6CAT-ce.mjs} +1 -1
- package/dist/BudgetUtil-CLhRnCoX.mjs +479 -0
- package/dist/CashflowStore-CeAzChyD.mjs +91 -0
- package/dist/{Category-Ccoew_sA.mjs → Category-CevNQ03n.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-CzRxYpiP.mjs → CategorySelectorDrawer-Dc9Widy9.mjs} +118 -110
- package/dist/{CategoryStore-V-0d9oje.mjs → CategoryStore-FTxUbn0f.mjs} +3 -3
- package/dist/{CategoryUtil-DB-9JMbi.mjs → CategoryUtil-BVixr0d5.mjs} +4 -4
- package/dist/Connect-eYIWqCEr.mjs +39 -0
- package/dist/ConnectDrawer-C0wjwcJt.mjs +58 -0
- package/dist/{ConnectionsDrawer-DMBBzlIJ.mjs → ConnectionsDrawer-IA7vnv1J.mjs} +10 -9
- package/dist/CurrencyInput-DuMktPu3.mjs +85 -0
- package/dist/{CurrencyText-C-85TnUF.mjs → CurrencyText-CA-E5N_y.mjs} +1 -1
- package/dist/{DateFormats-Cs-NbEZ7.mjs → DateFormats-BMpMrZpW.mjs} +1 -1
- package/dist/{DateUtil-CVXVMbjf.mjs → DateUtil-wcYTmDRD.mjs} +1 -1
- package/dist/{DebtsStore-Dv_T7Dts.mjs → DebtsStore-BZqNLaqd.mjs} +3 -3
- package/dist/Dialog-Ck34yr-d.mjs +63 -0
- package/dist/{Donut-DKY8mL3P.mjs → Donut-CpxJlVvJ.mjs} +29 -27
- package/dist/{Drawer-Bet2ZPJo.mjs → Drawer-Bbe4AMB1.mjs} +14 -14
- package/dist/{ExportCsvAction-Cc14QGA9.mjs → ExportCsvAction-ErKh7wJ2.mjs} +4 -4
- package/dist/{Fetch-DecPFeGU.mjs → Fetch-B6tMJC1r.mjs} +2 -1
- package/dist/{FinstrongStore-DW7-LvAh.mjs → FinstrongStore-BQxXxxYD.mjs} +129 -129
- package/dist/GlobalAccountFilter-B73Pw1hJ.mjs +237 -0
- package/dist/Goal-0loDagc5.mjs +6 -0
- package/dist/GoalStore-fgXt--2Y.mjs +418 -0
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-CgpJK03Q.mjs → Help-B8mD4aLJ.mjs} +6 -6
- package/dist/{Help-DOPJteew.mjs → Help-D-laTbKu.mjs} +544 -493
- package/dist/{IconBacking-DgT8DCeh.mjs → IconBacking-B9oC6uL2.mjs} +11 -11
- package/dist/LineChart-EAr5ox5U.mjs +612 -0
- package/dist/{ListItemAction-engf-T9W.mjs → ListItemAction-4KB7P75M.mjs} +2 -2
- package/dist/Loader-D3rjKx72.mjs +21 -0
- package/dist/Localization-CPkpIwIx.mjs +37 -0
- package/dist/{ManageIncome-BVqHHIO7.mjs → ManageIncome-Cc-wba0I.mjs} +118 -113
- package/dist/{MerchantStore-WvZ4gnQe.mjs → MerchantStore-BzGi4JAZ.mjs} +1 -1
- package/dist/MicroWidgetContainer-B_EnfvCq.mjs +45 -0
- package/dist/MiniWidgetContainer-Bhkv-hpz.mjs +66 -0
- package/dist/{NetWorthStore-B6ziBtaH.mjs → NetWorthStore-BqZ44-4M.mjs} +5 -5
- package/dist/Notification-DTNYSd8P.mjs +7 -0
- package/dist/{NotificationSettings-CEzQSKfg.mjs → NotificationSettings-D7VqsrZy.mjs} +160 -159
- package/dist/{NotificationStore-Ck2KdNmT.mjs → NotificationStore-D_e8zo5M.mjs} +28 -21
- package/dist/{NumberFormatting-DjTD0t3W.mjs → NumberFormatting-QCaNwbjv.mjs} +1 -1
- package/dist/{Transaction-C8QRYhYc.mjs → OnClickEvents-CseHDZ94.mjs} +32 -25
- package/dist/{OriginalBalanceAction-CYqr8z8w.mjs → OriginalBalanceAction-DjpvVVFz.mjs} +10 -10
- package/dist/{RecurringSettings-rEotGPcM.mjs → RecurringSettings-BN9H5ALr.mjs} +4 -4
- package/dist/RecurringTransactions-BCJp-Nap.mjs +297 -0
- package/dist/{RecurringTransactionsStore-DpzLX8E8.mjs → RecurringTransactionsStore-CkMA7gY3.mjs} +11 -10
- package/dist/RepeatingTransaction-DF4vJn_v.mjs +7 -0
- package/dist/{ResponsiveButton-BNsV08Ud.mjs → ResponsiveButton-DZFp78fJ.mjs} +12 -12
- package/dist/SearchBox-CwDgvWVJ.mjs +48 -0
- package/dist/{SettingsStore-ImYpLCSK.mjs → SettingsStore-BoIoiRLj.mjs} +3 -3
- package/dist/{SingleSegmentDonut-PsRQPkmV.mjs → SingleSegmentDonut-BgbLgwHi.mjs} +5 -5
- package/dist/{SpendingData-CI_C9xln.mjs → SpendingData-Bz1bCWAs.mjs} +4 -4
- package/dist/SpendingLegend-BgjazduU.mjs +193 -0
- package/dist/{StatusBar-CPfSXe80.mjs → StatusBar-BK_uYHAB.mjs} +6 -6
- package/dist/StatusIndicator-4tWnjeKS.mjs +264 -0
- package/dist/{TabContentContainer-CnMXkVqr.mjs → TabContentContainer-j01JYR_7.mjs} +8 -8
- package/dist/ToggleListItem-BLu_fWA2.mjs +90 -0
- package/dist/Transaction-Cn5_iFm0.mjs +5 -0
- package/dist/{TransactionApi-CjBoLleL.mjs → TransactionApi-Ck5Ua-7F.mjs} +1 -1
- package/dist/TransactionDetails-D1I1XEsT.mjs +1469 -0
- package/dist/{TransactionStore-CEehNrKo.mjs → TransactionStore-Bx9euVrY.mjs} +195 -177
- package/dist/{TrendsStore-ncmbS9eE.mjs → TrendsStore-CYdTo7cN.mjs} +10 -10
- package/dist/ViewMoreMicroCard-D24H9kDm.mjs +1291 -0
- package/dist/{WidgetContainer-DFwVgavi.mjs → WidgetContainer-B7xDq2bM.mjs} +47 -46
- package/dist/accounts/AccountsMiniWidget.d.ts +1 -1
- package/dist/accounts/AccountsWidget.d.ts +1 -1
- package/dist/accounts/api/AccountApi.d.ts +1 -1
- package/dist/accounts/components/AccountListItem.d.ts +1 -1
- package/dist/accounts/components/AccountsListCompact.d.ts +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.d.ts +1 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +1 -1
- package/dist/accounts/hooks/useGetMergeableAccounts.d.ts +1 -1
- package/dist/accounts/index.es.js +459 -368
- package/dist/accounts/stores/AccountStore.d.ts +2 -1
- package/dist/accounts/stores/UiStore.d.ts +1 -1
- package/dist/accounts/utils/AccountDetails.d.ts +1 -1
- package/dist/accounts/utils/AccountFields.d.ts +1 -1
- package/dist/accounts/utils/Accounts.d.ts +2 -2
- package/dist/analytics/index.es.js +93 -112
- package/dist/budgets/BubbleBudgetsMiniWidget.d.ts +1 -1
- package/dist/budgets/BubbleBudgetsWidget.d.ts +1 -1
- package/dist/budgets/api/BudgetsApi.d.ts +5 -1
- package/dist/budgets/components/BubbleChart.d.ts +1 -1
- package/dist/budgets/components/BudgetDetailsDrawerV2.d.ts +4 -1
- package/dist/budgets/components/MerchantBudgetDetailsDrawer.d.ts +17 -0
- package/dist/budgets/components/addbudget/RecalculateBudgetRow.d.ts +1 -1
- package/dist/budgets/components/addbudget/UnbudgetedRow.d.ts +1 -1
- package/dist/budgets/components/bubblechart/Bubble.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/AddSubBudget.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/BudgetDetails.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/Header.d.ts +1 -1
- package/dist/budgets/components/budgetdetails/SubBudgetList.d.ts +1 -1
- package/dist/budgets/components/budgetlist/BudgetRow.d.ts +1 -1
- package/dist/budgets/components/budgetlist/SubBudgetRow.d.ts +1 -1
- package/dist/budgets/components/shared/BudgetDetailsTopSection.d.ts +13 -0
- package/dist/budgets/index.es.js +851 -865
- package/dist/budgets/store/BudgetsStore.d.ts +15 -1
- package/dist/budgets/utils/BubblesSVG.d.ts +3 -3
- package/dist/budgets/utils/BudgetUtil.d.ts +6 -1
- package/dist/cashflow/CashflowMiniWidget.d.ts +1 -1
- package/dist/cashflow/CashflowWidget.d.ts +1 -1
- package/dist/cashflow/api/CashflowApi.d.ts +1 -1
- package/dist/cashflow/components/DetailsExpenseRow.d.ts +1 -1
- package/dist/cashflow/index.es.js +290 -288
- package/dist/cashflow/stores/UiStore.d.ts +1 -1
- package/dist/cashflow/util/Filters.d.ts +1 -1
- package/dist/categories/components/CategoryRow.d.ts +1 -1
- package/dist/categories/components/CustomCategories/AddSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/DeleteSubcategory.d.ts +1 -1
- package/dist/categories/components/CustomCategories/RenameSubcategory.d.ts +1 -1
- package/dist/categories/components/SubcategoryList.d.ts +1 -1
- package/dist/categories/components/SubcategoryRow.d.ts +1 -1
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +2 -1
- package/dist/categories/util/CategoryUtil.d.ts +1 -1
- package/dist/common/api/AnalyticsApi.d.ts +1 -1
- package/dist/common/api/AppDataApi.d.ts +1 -1
- package/dist/common/api/BeatApi.d.ts +1 -1
- package/dist/common/api/CategoryApi.d.ts +1 -1
- package/dist/common/api/GlobalCopyApi.d.ts +1 -1
- package/dist/common/api/LocalizedCopyApi.d.ts +1 -1
- package/dist/common/api/NotificationApi.d.ts +1 -1
- package/dist/common/api/ScheduledPaymentsApi.d.ts +1 -1
- package/dist/common/api/UserApi.d.ts +1 -1
- package/dist/common/components/CurrencyDialog.d.ts +1 -1
- package/dist/common/components/CurrencyInput.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/GlobalAccountFilter.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/MiniWidgetContainer.d.ts +1 -0
- package/dist/common/components/WidgetContainer.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +1 -0
- package/dist/common/components/charts/index.d.ts +1 -0
- package/dist/common/components/charts/linechart/CustomTooltip.d.ts +2 -1
- package/dist/common/components/charts/linechart/utils/markerShapes.d.ts +3 -0
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.d.ts +1 -1
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/constants/Account.d.ts +1 -1
- package/dist/common/constants/Analytics.d.ts +10 -0
- package/dist/common/constants/ApiEndpoints.d.ts +1 -0
- package/dist/common/constants/DefaultConfig.d.ts +1 -1
- package/dist/common/constants/ScheduledPayment.d.ts +1 -10
- package/dist/common/constants/SpendingPlan.d.ts +0 -10
- package/dist/common/constants/index.d.ts +2 -2
- package/dist/common/context/GlobalDataProvider.d.ts +2 -1
- package/dist/common/context/hooks.d.ts +4 -4
- package/dist/common/hooks/index.d.ts +1 -0
- package/dist/common/hooks/useAccountDisplayName.d.ts +1 -1
- package/dist/common/hooks/useCombineEvents.d.ts +1 -1
- package/dist/common/hooks/usePrevious.d.ts +2 -0
- package/dist/common/index.d.ts +0 -1
- package/dist/common/index.es.js +625 -860
- package/dist/common/stores/AppDataStore.d.ts +3 -3
- package/dist/common/stores/GlobalCopyStore.d.ts +1 -1
- package/dist/common/stores/GlobalStore.d.ts +4 -2
- package/dist/common/stores/GlobalUiStore.d.ts +3 -3
- package/dist/common/stores/UserStore.d.ts +1 -1
- package/dist/common/utils/AccountDisplayName.d.ts +1 -1
- package/dist/common/utils/AccountFilter.d.ts +1 -1
- package/dist/common/utils/Analytics.d.ts +1 -1
- package/dist/common/utils/Categories.d.ts +1 -1
- package/dist/common/utils/Fetch.d.ts +1 -1
- package/dist/common/utils/Localization.d.ts +9 -1
- package/dist/common/utils/Theme.d.ts +3 -3
- package/dist/common/utils/User.d.ts +1 -1
- package/dist/common/utils/index.d.ts +1 -1
- package/dist/core/constants/index.d.ts +1 -0
- package/dist/core/constants/repeatingTransactions.d.ts +10 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.es.js +41 -0
- package/dist/{common → core}/types/Analytics.d.ts +6 -3
- package/dist/{common → core}/types/AppData.d.ts +1 -0
- package/dist/{common → core}/types/Beat.d.ts +2 -0
- package/dist/{common → core}/types/Budget.d.ts +8 -0
- package/dist/{common → core}/types/Expense.d.ts +2 -1
- package/dist/{common → core}/types/Finstrong.d.ts +0 -2
- package/dist/{common → core}/types/Notification.d.ts +15 -5
- package/dist/{common → core}/types/index.d.ts +1 -2
- package/dist/{common → core}/types/localization/BudgetsCopy.d.ts +11 -0
- package/dist/{common → core}/types/localization/CashflowCopy.d.ts +1 -0
- package/dist/{common → core}/types/localization/CommonCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/DebtsCopy.d.ts +5 -0
- package/dist/{common → core}/types/localization/RecurringCopy.d.ts +2 -0
- package/dist/{common → core}/types/localization/SpendingCopy.d.ts +1 -0
- package/dist/dashboard/index.es.js +46 -45
- package/dist/debts/DebtsWidget.d.ts +1 -1
- package/dist/debts/components/actions/DebtsPriorityAction.d.ts +5 -1
- package/dist/debts/components/debtspaydown/PaydownButton.d.ts +2 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.d.ts +2 -1
- package/dist/debts/index.es.js +705 -646
- package/dist/debts/store/DebtsStore.d.ts +2 -1
- package/dist/debts/utils/DebtStore.d.ts +1 -1
- package/dist/debts/utils/DebtsWidget.d.ts +7 -1
- package/dist/debts/utils/shared.d.ts +1 -1
- package/dist/{exportTransactionsToCSV-CGnrndmA.mjs → exportTransactionsToCSV-MCYH_zzN.mjs} +5 -5
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +1 -1
- package/dist/finstrong/components/HealthChart.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +1 -1
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +1 -1
- package/dist/finstrong/components/shared/Accounts.d.ts +1 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +1 -0
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.d.ts +1 -1
- package/dist/finstrong/components/shared/Transactions.d.ts +1 -1
- package/dist/finstrong/index.es.js +161 -159
- package/dist/finstrong/stores/FinstrongStore.d.ts +3 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +3 -3
- package/dist/goals/GoalsWidget.d.ts +1 -1
- package/dist/goals/api/GoalApi.d.ts +2 -2
- package/dist/goals/components/AccountSelectionDrawer.d.ts +1 -1
- package/dist/goals/components/AddGoal.d.ts +1 -1
- package/dist/goals/components/GoalDetails.d.ts +1 -1
- package/dist/goals/components/GoalDetailsDrawer.d.ts +1 -1
- package/dist/goals/components/GoalList.d.ts +1 -1
- package/dist/goals/components/GoalStatusCard.d.ts +1 -1
- package/dist/goals/components/ManageGoals.d.ts +1 -1
- package/dist/goals/components/actions/AccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AddRetirementAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/AmountToSaveAction.d.ts +1 -1
- package/dist/goals/components/actions/BirthdayAction.d.ts +1 -1
- package/dist/goals/components/actions/ChangeAccountAction.d.ts +1 -1
- package/dist/goals/components/actions/ContributionAction.d.ts +1 -1
- package/dist/goals/components/actions/GoalNameAction.d.ts +1 -1
- package/dist/goals/components/actions/InterestRateAction.d.ts +1 -1
- package/dist/goals/components/actions/MonthlyPaymentAction.d.ts +1 -1
- package/dist/goals/components/actions/OriginalBalanceAction.d.ts +1 -1
- package/dist/goals/components/actions/RetirementAgeAction.d.ts +1 -1
- package/dist/goals/components/addgoal/AddGoalListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/CompleteListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/OngoingListItem.d.ts +1 -1
- package/dist/goals/components/managegoals/ReorderGoals.d.ts +1 -1
- package/dist/goals/components/micro/GoalMicroStatusCard.d.ts +1 -1
- package/dist/goals/index.es.js +445 -419
- package/dist/goals/stores/GoalStore.d.ts +2 -1
- package/dist/goals/util/GoalsUtil.d.ts +1 -1
- package/dist/help/HelpWidget.d.ts +1 -1
- package/dist/help/api/HelpApi.d.ts +1 -1
- package/dist/help/components/HelpContent.d.ts +1 -1
- package/dist/help/components/HelpList.d.ts +1 -1
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/ContentItem.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/NoImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/components/content/section/Accounts.d.ts +1 -1
- package/dist/help/components/content/section/Budgets.d.ts +1 -1
- package/dist/help/components/content/section/CashFlow.d.ts +1 -1
- package/dist/help/components/content/section/Debts.d.ts +1 -1
- package/dist/help/components/content/section/General.d.ts +1 -1
- package/dist/help/components/content/section/Goals.d.ts +1 -1
- package/dist/help/components/content/section/Insights.d.ts +1 -1
- package/dist/help/components/content/section/Investments.d.ts +1 -1
- package/dist/help/components/content/section/Mobile.d.ts +1 -1
- package/dist/help/components/content/section/NetWorth.d.ts +1 -1
- package/dist/help/components/content/section/Notifications.d.ts +1 -1
- package/dist/help/components/content/section/RecurringTransactions.d.ts +1 -1
- package/dist/help/components/content/section/Spending.d.ts +1 -1
- package/dist/help/components/content/section/Transactions.d.ts +1 -1
- package/dist/help/components/content/section/Trends.d.ts +1 -1
- package/dist/help/components/content/section/index.d.ts +15 -15
- package/dist/help/components/requestsupport/ContactSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/HelpByCategoryList.d.ts +1 -1
- package/dist/help/components/requestsupport/MissingInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsDrawer.d.ts +1 -1
- package/dist/help/components/requestsupport/PopularTopicsList.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupport.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportFooter.d.ts +1 -1
- package/dist/help/components/requestsupport/RequestSupportInstitution.d.ts +1 -1
- package/dist/help/components/requestsupport/SupportSuccessMessage.d.ts +1 -1
- package/dist/help/index.es.js +8 -8
- package/dist/help/store/HelpStore.d.ts +5 -4
- package/dist/help/utils/getAccessibleHelpCategories.d.ts +2 -2
- package/dist/{hooks-CBl85iRr.mjs → hooks-BxkfR-Ff.mjs} +12 -12
- package/dist/insights/components/feed/Header.d.ts +8 -0
- package/dist/insights/components/index.d.ts +4 -0
- package/dist/insights/components/insights/CategoryBudget/types/CategoryBudget.d.ts +1 -0
- package/dist/insights/components/insights/CategorySpendingV2/types/CategorySpendingV2.d.ts +1 -0
- package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.d.ts +2 -1
- package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.d.ts +3 -1
- package/dist/insights/components/shared/ChartTransactionWithDrillDown.d.ts +2 -1
- package/dist/insights/components/shared/DonutChartV2.d.ts +13 -0
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.d.ts +20 -0
- package/dist/insights/components/shared/InsightsCard/CardHeaderMUI.d.ts +11 -0
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.d.ts +17 -0
- package/dist/insights/components/shared/InsightsCard/DescriptionMUI.d.ts +12 -0
- package/dist/insights/components/shared/InsightsCard/MiniDescriptionMUI.d.ts +9 -0
- package/dist/insights/components/shared/StatusIndicator.d.ts +1 -1
- package/dist/insights/components/shared/TransactionCard.d.ts +14 -0
- package/dist/insights/index.es.js +1361 -1081
- package/dist/insights/store/BeatStore.d.ts +1 -1
- package/dist/investments/InvestmentsWidget.d.ts +1 -1
- package/dist/investments/api/HoldingApi.d.ts +1 -1
- package/dist/investments/components/allocation/util/createInvestementsAllocationData.d.ts +2 -2
- package/dist/investments/index.es.js +258 -258
- package/dist/investments/stores/HoldingStore.d.ts +2 -1
- package/dist/investments/util/InvestmentUtil.d.ts +1 -1
- package/dist/merchants/api/MerchantApi.d.ts +1 -1
- package/dist/merchants/index.es.js +16 -16
- package/dist/merchants/stores/MerchantStore.d.ts +2 -1
- package/dist/microinsights/InsightsMicroWidget.d.ts +1 -1
- package/dist/microinsights/beaticons/AreaChartIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/AverageSpendComparisonIcon.d.ts +3 -0
- package/dist/microinsights/beaticons/BeatMaterialIcon.d.ts +5 -1
- package/dist/microinsights/beaticons/InstitutionLogoIcon.d.ts +5 -0
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +0 -2
- package/dist/microinsights/beaticons/index.d.ts +3 -0
- package/dist/microinsights/cards/InsightCard.d.ts +1 -1
- package/dist/microinsights/carousel/BeatList.d.ts +1 -1
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -1
- package/dist/microinsights/carousel/MicroBeatCarousel.d.ts +1 -1
- package/dist/microinsights/constants/Analytics.d.ts +1 -1
- package/dist/microinsights/context/InsightsMicroWidgetDataProvider.d.ts +1 -1
- package/dist/microinsights/context/hooks.d.ts +1 -1
- package/dist/microinsights/index.es.js +1 -1
- package/dist/microinsights/interfaces.d.ts +1 -1
- package/dist/microinsights/stores/CopyStore.d.ts +1 -1
- package/dist/microinsights/stores/InsightsMicroWidgetStore.d.ts +1 -1
- package/dist/microinsights/utils/DataSeries.d.ts +1 -1
- package/dist/microinsights/utils/colorType.d.ts +22 -0
- package/dist/networth/NetWorthWidget.d.ts +1 -1
- package/dist/networth/components/micro/NetworthData.d.ts +1 -1
- package/dist/networth/components/micro/ZeroState.d.ts +1 -1
- package/dist/networth/index.es.js +181 -174
- package/dist/networth/stores/NetWorthStore.d.ts +2 -1
- package/dist/networth/types/NetWorth.d.ts +1 -1
- package/dist/networth/utils/NetWorthUtils.d.ts +1 -1
- package/dist/notifications/components/NotificationBadge.d.ts +1 -1
- package/dist/notifications/components/NotificationCard.d.ts +1 -1
- package/dist/notifications/components/NotificationDrawer.d.ts +1 -1
- package/dist/notifications/components/NotificationList.d.ts +2 -1
- package/dist/notifications/index.es.js +104 -92
- package/dist/notifications/stores/NotificationStore.d.ts +2 -1
- package/dist/notifications/utils/NotificationUtils.d.ts +2 -1
- package/dist/recurringtransactions/RecurringTransactionsMiniWidget.d.ts +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.d.ts +1 -1
- package/dist/recurringtransactions/api/RepeatingTransactionsApi.d.ts +2 -1
- package/dist/recurringtransactions/components/PaymentSchedule.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceList.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurrenceRow.d.ts +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/MerchantLogosRow.d.ts +1 -1
- package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.d.ts +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.d.ts +1 -1
- package/dist/recurringtransactions/index.es.js +477 -451
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +2 -1
- package/dist/recurringtransactions/util/RecurringTransactions.d.ts +1 -1
- package/dist/repeatingTransactions-DHIG94pi.mjs +4 -0
- package/dist/settings/NotificationSettingsWidget.d.ts +1 -1
- package/dist/settings/SettingsWidget.d.ts +1 -1
- package/dist/settings/TransactionRulesWidget.d.ts +1 -1
- package/dist/settings/api/SettingsApi.d.ts +1 -2
- package/dist/settings/components/devices/DeviceDialog.d.ts +1 -1
- package/dist/settings/components/devices/DeviceList.d.ts +1 -1
- package/dist/settings/components/devices/DeviceTable.d.ts +1 -1
- package/dist/settings/components/notifications/AccountNotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/AccountProfileListItem.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationProfile.d.ts +1 -1
- package/dist/settings/components/notifications/NotificationSettings.d.ts +1 -1
- package/dist/settings/components/transactionrules/actions/EditRuleAction.d.ts +1 -1
- package/dist/settings/index.es.js +314 -323
- package/dist/settings/stores/SettingsStore.d.ts +3 -2
- package/dist/settings/util/Notifications.d.ts +1 -1
- package/dist/spending/SpendingMiniWidget.d.ts +1 -1
- package/dist/spending/SpendingWidget.d.ts +1 -1
- package/dist/spending/index.es.js +167 -166
- package/dist/spending/utils/SpendingData.d.ts +1 -1
- package/dist/transactions/TransactionWidget.d.ts +1 -1
- package/dist/transactions/api/TransactionApi.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -1
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -1
- package/dist/transactions/components/shared/getEmbeddedInstanceSlotByBeatTemplates.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/FlagTransaction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.d.ts +13 -0
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/HideAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.d.ts +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/index.d.ts +1 -0
- package/dist/transactions/components/shared/transactionlist/TransactionRow.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitManager.d.ts +1 -1
- package/dist/transactions/components/splitmanager/SplitRow.d.ts +1 -1
- package/dist/transactions/components/tagmanager/TagRow.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.d.ts +1 -1
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.d.ts +1 -1
- package/dist/transactions/constants/Actions.d.ts +4 -3
- package/dist/transactions/constants/Transaction.d.ts +1 -1
- package/dist/transactions/index.es.js +195 -187
- package/dist/transactions/stores/TransactionStore.d.ts +2 -1
- package/dist/transactions/stores/UiStore.d.ts +1 -1
- package/dist/transactions/utils/Filters.d.ts +1 -1
- package/dist/transactions/utils/Transactions.d.ts +1 -1
- package/dist/transactions/utils/buildDetailedTransactions.d.ts +2 -2
- package/dist/transactions/utils/exportTransactionsToCSV.d.ts +1 -1
- package/dist/transactions/utils/sortAndFilterTransactions.d.ts +1 -1
- package/dist/trends/TrendsFullWidget.d.ts +1 -1
- package/dist/trends/TrendsMiniWidget.d.ts +1 -1
- package/dist/trends/TrendsWidget.d.ts +1 -1
- package/dist/trends/components/CategoriesList.d.ts +1 -1
- package/dist/trends/components/CategoriesListItem.d.ts +1 -1
- package/dist/trends/components/CategoryDetails.d.ts +3 -0
- package/dist/trends/components/TrendsChartTotals.d.ts +1 -1
- package/dist/trends/components/TrendsInsights.d.ts +1 -1
- package/dist/trends/components/trendstable/AccessibleSortIcon.d.ts +13 -0
- package/dist/trends/components/trendstable/TrendsTable.d.ts +1 -1
- package/dist/trends/index.es.js +817 -764
- package/dist/trends/stores/TrendsStore.d.ts +2 -1
- package/dist/trends/utils/SpendingData.d.ts +1 -1
- package/dist/trends/utils/TrendsData.d.ts +1 -1
- package/dist/trends/utils/TrendsTable.d.ts +1 -1
- package/dist/trends/utils/TrendsWidget.d.ts +7 -0
- package/dist/trends/utils/shared.d.ts +1 -1
- package/dist/{useAccountDisplayName-b2xxcD0C.mjs → useAccountDisplayName-DKwT1mWv.mjs} +1 -1
- package/dist/{useCombineEvents-ARuNN9Xh.mjs → useCombineEvents-Bqojlv8q.mjs} +3 -3
- package/dist/{useInsightsEnabled-Dd-AfsqC.mjs → useInsightsEnabled-DL_oNyI0.mjs} +1 -1
- package/dist/{useWidgetLoadTimer-DmNCCLa-.mjs → useWidgetLoadTimer-DgN1bTyu.mjs} +1 -1
- package/package.json +17 -10
- package/dist/AccountDetailsHeader-Bn2E0Qjk.mjs +0 -95
- package/dist/AccountListItem-k63LpVBs.mjs +0 -90
- package/dist/Accounts-CuE8aSZN.mjs +0 -27
- package/dist/BudgetUtil-BZiGckNY.mjs +0 -238
- package/dist/CashflowStore-naOtJcwo.mjs +0 -91
- package/dist/CurrencyInput-BEB3FS70.mjs +0 -85
- package/dist/Dialog-jmgGw5WA.mjs +0 -58
- package/dist/GlobalAccountFilter-CIF-aT3F.mjs +0 -316
- package/dist/GoalStore-BjHKNAVm.mjs +0 -421
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-CnscUFUG.mjs +0 -580
- package/dist/Loader-icSc5MlE.mjs +0 -24
- package/dist/Localization-2MODESHW.mjs +0 -30
- package/dist/MicroWidgetContainer-CBRk9KG-.mjs +0 -45
- package/dist/MiniWidgetContainer-CXQcSWSl.mjs +0 -56
- package/dist/Notification-Bs1fdbzI.mjs +0 -95
- package/dist/RecurringTransactions-DlKYwpfK.mjs +0 -296
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/SpendingLegend-Bld71d7q.mjs +0 -193
- package/dist/StatusIndicator-CNMQeYyJ.mjs +0 -55
- package/dist/TransactionDetails-Lvt9GCU5.mjs +0 -1194
- package/dist/TransactionList-BDffKJMO.mjs +0 -204
- package/dist/User-DS18cMaz.mjs +0 -237
- package/dist/ViewMoreMicroCard-YHRLl08A.mjs +0 -1152
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/types/SpendingPlan.d.ts +0 -44
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/trends/components/CategoryDetailDrawer.d.ts +0 -7
- /package/dist/{common → core}/types/Account.d.ts +0 -0
- /package/dist/{common → core}/types/Cashflow.d.ts +0 -0
- /package/dist/{common → core}/types/Category.d.ts +0 -0
- /package/dist/{common → core}/types/Client.d.ts +0 -0
- /package/dist/{common → core}/types/Date.d.ts +0 -0
- /package/dist/{common → core}/types/Debt.d.ts +0 -0
- /package/dist/{common → core}/types/Global.d.ts +0 -0
- /package/dist/{common → core}/types/GlobalCopy.d.ts +0 -0
- /package/dist/{common → core}/types/Goal.d.ts +0 -0
- /package/dist/{common → core}/types/Handlers.d.ts +0 -0
- /package/dist/{common → core}/types/Help.d.ts +0 -0
- /package/dist/{common → core}/types/Holding.d.ts +0 -0
- /package/dist/{common → core}/types/Institution.d.ts +0 -0
- /package/dist/{common → core}/types/LocalizedContent.d.ts +0 -0
- /package/dist/{common → core}/types/Merchant.d.ts +0 -0
- /package/dist/{common → core}/types/RepeatingTransaction.d.ts +0 -0
- /package/dist/{common → core}/types/ScheduledPayment.d.ts +0 -0
- /package/dist/{common → core}/types/ScreenSize.d.ts +0 -0
- /package/dist/{common → core}/types/Transaction.d.ts +0 -0
- /package/dist/{common → core}/types/User.d.ts +0 -0
- /package/dist/{common → core}/types/Widgets.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountFilterCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountTypeCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AccountsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/AnalyticsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CategoryCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/ConnectCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/CurrencyInputCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/DateRangePickerCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/FinstrongCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/GoalsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/HelpCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InsightsFeedCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/InvestmentsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/MicroInsightsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NetWorthCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/NotificationsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/SettingsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TransactionsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/TrendsCopy.d.ts +0 -0
- /package/dist/{common → core}/types/localization/index.d.ts +0 -0
package/dist/trends/index.es.js
CHANGED
|
@@ -1,123 +1,125 @@
|
|
|
1
|
-
import { jsxs as C, jsx as e, Fragment as
|
|
2
|
-
import g, { useRef as
|
|
3
|
-
import { observer as
|
|
4
|
-
import { CategoryIcon as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { addSeconds as
|
|
9
|
-
import { differenceInCalendarMonths as
|
|
1
|
+
import { jsxs as C, jsx as e, Fragment as wt } from "react/jsx-runtime";
|
|
2
|
+
import g, { useRef as vt, useState as Dt, useEffect as It } from "react";
|
|
3
|
+
import { observer as A } from "mobx-react-lite";
|
|
4
|
+
import { CategoryIcon as we, Text as F, Icon as He, H3 as Ge, P as pe } from "@mxenabled/mxui";
|
|
5
|
+
import N from "@mui/material/Box";
|
|
6
|
+
import S from "@mui/material/Stack";
|
|
7
|
+
import Te from "@mui/material/Button";
|
|
8
|
+
import { addSeconds as et } from "date-fns/addSeconds";
|
|
9
|
+
import { differenceInCalendarMonths as Se } from "date-fns/differenceInCalendarMonths";
|
|
10
10
|
import Lt from "numeral";
|
|
11
|
-
import { useTheme as
|
|
12
|
-
import { useItemTooltip as
|
|
13
|
-
import { LineChart as
|
|
14
|
-
import { u as
|
|
15
|
-
import { u as
|
|
16
|
-
import
|
|
17
|
-
import
|
|
11
|
+
import { useTheme as ae, styled as Et, alpha as Mt } from "@mui/material/styles";
|
|
12
|
+
import { useItemTooltip as At, ChartsTooltipContainer as Rt } from "@mui/x-charts/ChartsTooltip";
|
|
13
|
+
import { LineChart as kt } from "@mui/x-charts/LineChart";
|
|
14
|
+
import { u as j } from "../useScreenSize-B6JyS_Lj.mjs";
|
|
15
|
+
import { u as Ht } from "../useDimensions-CeDR9V8N.mjs";
|
|
16
|
+
import tt from "@mui/material/Card";
|
|
17
|
+
import ot from "@mui/material/CardContent";
|
|
18
18
|
import Ne from "@mui/material/Divider";
|
|
19
|
-
import
|
|
20
|
-
import { u as
|
|
21
|
-
import { b as
|
|
22
|
-
import { C as xe } from "../CurrencyText-
|
|
23
|
-
import {
|
|
24
|
-
import { f as
|
|
25
|
-
import { f as
|
|
26
|
-
import {
|
|
27
|
-
import { T as
|
|
28
|
-
import { c as
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import { parseISO as
|
|
32
|
-
import { H as ke } from "../HeaderCell-
|
|
33
|
-
import { T as
|
|
34
|
-
import { DataGridPro as
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import { L as
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import { b as
|
|
57
|
-
import {
|
|
58
|
-
import
|
|
59
|
-
import { E as
|
|
60
|
-
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
19
|
+
import $e from "@mui/material/Grid";
|
|
20
|
+
import { u as R, l as U, g as $, b as fe, h as ve, d as De, B as ye, p as nt, f as Be, a as st } from "../hooks-BxkfR-Ff.mjs";
|
|
21
|
+
import { b as rt } from "../Localization-CPkpIwIx.mjs";
|
|
22
|
+
import { C as xe } from "../CurrencyText-CA-E5N_y.mjs";
|
|
23
|
+
import { C as Re, b as ze, c as Nt } from "../Category-CevNQ03n.mjs";
|
|
24
|
+
import { f as Y, D as P } from "../DateFormats-BMpMrZpW.mjs";
|
|
25
|
+
import { f as re, a as Wt } from "../NumberFormatting-QCaNwbjv.mjs";
|
|
26
|
+
import { c as Ot, a as Ke, g as Gt, L as Bt } from "../TrendsStore-CYdTo7cN.mjs";
|
|
27
|
+
import { T as us } from "../TrendsStore-CYdTo7cN.mjs";
|
|
28
|
+
import { c as Pt, i as Vt, d as Ft, e as $t, b as at, g as it, f as Ye } from "../SpendingData-Bz1bCWAs.mjs";
|
|
29
|
+
import zt from "@mui/material/ToggleButton";
|
|
30
|
+
import Kt from "@mui/material/ToggleButtonGroup";
|
|
31
|
+
import { parseISO as lt } from "date-fns/parseISO";
|
|
32
|
+
import { H as ke } from "../HeaderCell-P8w6CmfO.mjs";
|
|
33
|
+
import { T as W, b as Yt } from "../ViewMoreMicroCard-D24H9kDm.mjs";
|
|
34
|
+
import { useGridApiContext as jt, useGridRootProps as Ut, DataGridPro as Xt } from "@mui/x-data-grid-pro";
|
|
35
|
+
import Zt from "@mui/material/Badge";
|
|
36
|
+
import Qt from "@mui/material/IconButton";
|
|
37
|
+
import { A as v } from "../Analytics-BYItVAe-.mjs";
|
|
38
|
+
import { T as ct } from "../StatusIndicator-4tWnjeKS.mjs";
|
|
39
|
+
import { T as dt } from "../TransactionDetails-D1I1XEsT.mjs";
|
|
40
|
+
import { D as Pe } from "../Drawer-Bbe4AMB1.mjs";
|
|
41
|
+
import { u as Ie } from "../useWidgetLoadTimer-DgN1bTyu.mjs";
|
|
42
|
+
import { L as Le } from "../Loader-D3rjKx72.mjs";
|
|
43
|
+
import { W as ut } from "../WidgetContainer-B7xDq2bM.mjs";
|
|
44
|
+
import { L as Ve } from "../LineChart-EAr5ox5U.mjs";
|
|
45
|
+
import { M as qt } from "../MiniWidgetContainer-Bhkv-hpz.mjs";
|
|
46
|
+
import { subMonths as Jt } from "date-fns";
|
|
47
|
+
import { TrendingUp as eo, TrendingDown as to, MultilineChart as oo, ExpandLess as no, ExpandMore as so, ChevronRight as ro, ArrowBack as ao } from "@mxenabled/mx-icons";
|
|
48
|
+
import { M as io } from "../MicroWidgetContainer-B_EnfvCq.mjs";
|
|
49
|
+
import lo from "@mui/material/Collapse";
|
|
50
|
+
import We from "@mui/material/List";
|
|
51
|
+
import mt from "@mui/material/ListItem";
|
|
52
|
+
import co from "@mui/material/ListItemButton";
|
|
53
|
+
import uo from "@mui/material/ListItemIcon";
|
|
54
|
+
import ht from "@mui/material/ListItemText";
|
|
55
|
+
import gt from "@mui/material/styles/useTheme";
|
|
56
|
+
import { b as Oe } from "../CategoryUtil-BVixr0d5.mjs";
|
|
57
|
+
import { Stack as mo } from "@mui/material";
|
|
58
|
+
import ho from "@mui/material/ListItemAvatar";
|
|
59
|
+
import { E as go } from "../ExportCsvAction-ErKh7wJ2.mjs";
|
|
60
|
+
import { u as po } from "../useInsightsEnabled-DL_oNyI0.mjs";
|
|
61
|
+
import { E as fo } from "../EmptyState-DHAkGsjk.mjs";
|
|
62
|
+
import { C as yo } from "../ConnectDrawer-C0wjwcJt.mjs";
|
|
63
|
+
const pt = ({ categoryGuid: t, topLevelCategoryGuid: s }) => {
|
|
64
|
+
const { categories: n } = R(), { getCategoryName: o } = U(), r = o(t);
|
|
65
|
+
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "column", gap: "8", justifyContent: "center", mb: 4, children: [
|
|
64
66
|
/* @__PURE__ */ e(
|
|
65
|
-
|
|
67
|
+
N,
|
|
66
68
|
{
|
|
67
|
-
"aria-label":
|
|
69
|
+
"aria-label": rt(n.category_icon_label_aria, r),
|
|
68
70
|
mb: 4,
|
|
69
71
|
role: "img",
|
|
70
|
-
children: /* @__PURE__ */ e(
|
|
72
|
+
children: /* @__PURE__ */ e(we, { categoryGuid: s })
|
|
71
73
|
}
|
|
72
74
|
),
|
|
73
|
-
/* @__PURE__ */ e(
|
|
75
|
+
/* @__PURE__ */ e(F, { variant: "body1", children: r })
|
|
74
76
|
] });
|
|
75
|
-
},
|
|
76
|
-
categoryGuids: { guid: t, topLevelGuid:
|
|
77
|
+
}, Co = ({
|
|
78
|
+
categoryGuids: { guid: t, topLevelGuid: s },
|
|
77
79
|
hoveredAreaData: n,
|
|
78
80
|
cursorPosition: o,
|
|
79
|
-
chartContainerRef:
|
|
81
|
+
chartContainerRef: r
|
|
80
82
|
}) => {
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
+
const i = ae(), a = vt(null), [c, u] = Dt({ x: o.x, y: o.y });
|
|
84
|
+
if (It(() => {
|
|
83
85
|
(() => {
|
|
84
|
-
const m = a.current, _ =
|
|
86
|
+
const m = a.current, _ = r.current;
|
|
85
87
|
if (!m || !_) return;
|
|
86
88
|
const h = m.getBoundingClientRect(), p = _.getBoundingClientRect();
|
|
87
|
-
let f = o.x,
|
|
88
|
-
f + h.width * 2 > p.right ? f = o.x - h.width : f - h.width < p.left && (f = o.x),
|
|
89
|
+
let f = o.x, T = o.y;
|
|
90
|
+
f + h.width * 2 > p.right ? f = o.x - h.width : f - h.width < p.left && (f = o.x), T + h.height * 2 > p.bottom && (T = o.y - h.height), u({ x: f, y: T });
|
|
89
91
|
})();
|
|
90
|
-
}, [o,
|
|
91
|
-
const
|
|
92
|
+
}, [o, r]), !n) return null;
|
|
93
|
+
const l = n.reduce((y, m) => y + m.y, 0);
|
|
92
94
|
return /* @__PURE__ */ e(
|
|
93
|
-
|
|
95
|
+
tt,
|
|
94
96
|
{
|
|
95
97
|
ref: a,
|
|
96
98
|
sx: {
|
|
97
99
|
position: "absolute",
|
|
98
|
-
top:
|
|
99
|
-
left:
|
|
100
|
+
top: c.y,
|
|
101
|
+
left: c.x,
|
|
100
102
|
width: 250,
|
|
101
103
|
pointerEvents: "none"
|
|
102
104
|
},
|
|
103
|
-
children: /* @__PURE__ */ C(
|
|
104
|
-
/* @__PURE__ */ C(
|
|
105
|
-
/* @__PURE__ */ e(
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(xe, { amount:
|
|
105
|
+
children: /* @__PURE__ */ C(ot, { children: [
|
|
106
|
+
/* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
107
|
+
/* @__PURE__ */ e(pt, { categoryGuid: t, topLevelCategoryGuid: s }),
|
|
108
|
+
/* @__PURE__ */ e(F, { variant: "body2", children: `${n.length}-month total` }),
|
|
109
|
+
/* @__PURE__ */ e(xe, { amount: l, bold: !0, formatString: "0,0", variant: "body2" })
|
|
108
110
|
] }),
|
|
109
111
|
/* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
|
|
110
|
-
/* @__PURE__ */ e(
|
|
112
|
+
/* @__PURE__ */ e($e, { container: !0, children: n.map((y, m) => /* @__PURE__ */ C(g.Fragment, { children: [
|
|
111
113
|
m > 0 && m % 3 === 0 && /* @__PURE__ */ e(Ne, { sx: { my: 16, width: "100%" } }),
|
|
112
|
-
/* @__PURE__ */ e(
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
+
/* @__PURE__ */ e($e, { item: !0, xs: 4, children: /* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
115
|
+
/* @__PURE__ */ e(F, { color: i.palette.text.secondary, variant: "caption", children: y.x }),
|
|
114
116
|
/* @__PURE__ */ e(
|
|
115
117
|
xe,
|
|
116
118
|
{
|
|
117
119
|
amount: y.y,
|
|
118
120
|
bold: !0,
|
|
119
121
|
formatString: "0,0",
|
|
120
|
-
variant: "
|
|
122
|
+
variant: "body1"
|
|
121
123
|
}
|
|
122
124
|
)
|
|
123
125
|
] }) })
|
|
@@ -125,17 +127,17 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
125
127
|
] })
|
|
126
128
|
}
|
|
127
129
|
);
|
|
128
|
-
},
|
|
130
|
+
}, _o = A(Co), bo = ({
|
|
129
131
|
sx: t,
|
|
130
|
-
categoryGuids:
|
|
132
|
+
categoryGuids: s,
|
|
131
133
|
hoveredLegend: n,
|
|
132
134
|
legendRef: o,
|
|
133
|
-
onHoverLegend:
|
|
134
|
-
onClickLegend:
|
|
135
|
+
onHoverLegend: r,
|
|
136
|
+
onClickLegend: i
|
|
135
137
|
}) => {
|
|
136
|
-
const { isMobile: a } =
|
|
138
|
+
const { isMobile: a } = j(), { getCategoryName: c } = U();
|
|
137
139
|
return /* @__PURE__ */ e(
|
|
138
|
-
|
|
140
|
+
S,
|
|
139
141
|
{
|
|
140
142
|
direction: "row",
|
|
141
143
|
flexWrap: "wrap",
|
|
@@ -143,14 +145,14 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
143
145
|
justifyContent: "start",
|
|
144
146
|
ref: o,
|
|
145
147
|
sx: t,
|
|
146
|
-
children:
|
|
147
|
-
const y = n ===
|
|
148
|
+
children: s.map(({ guid: u, top_level_guid: l }) => {
|
|
149
|
+
const y = n === u, m = Re[u], _ = Re[l], h = m ?? _ ?? Re.default, p = h + "33";
|
|
148
150
|
return /* @__PURE__ */ C(
|
|
149
|
-
|
|
151
|
+
Te,
|
|
150
152
|
{
|
|
151
|
-
onClick: () =>
|
|
152
|
-
onMouseEnter: () =>
|
|
153
|
-
onMouseLeave: () =>
|
|
153
|
+
onClick: () => i(u),
|
|
154
|
+
onMouseEnter: () => r(u),
|
|
155
|
+
onMouseLeave: () => r(null),
|
|
154
156
|
sx: {
|
|
155
157
|
color: "text.primary",
|
|
156
158
|
fontWeight: "normal",
|
|
@@ -164,7 +166,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
164
166
|
},
|
|
165
167
|
children: [
|
|
166
168
|
/* @__PURE__ */ e(
|
|
167
|
-
|
|
169
|
+
N,
|
|
168
170
|
{
|
|
169
171
|
sx: {
|
|
170
172
|
width: 16,
|
|
@@ -175,136 +177,136 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
),
|
|
178
|
-
/* @__PURE__ */ e(
|
|
180
|
+
/* @__PURE__ */ e(F, { variant: "body1", children: c(u) })
|
|
179
181
|
]
|
|
180
182
|
},
|
|
181
|
-
|
|
183
|
+
u
|
|
182
184
|
);
|
|
183
185
|
})
|
|
184
186
|
}
|
|
185
187
|
);
|
|
186
|
-
},
|
|
187
|
-
categoryGuids: { guid: t, topLevelGuid:
|
|
188
|
+
}, To = ({
|
|
189
|
+
categoryGuids: { guid: t, topLevelGuid: s },
|
|
188
190
|
series: n,
|
|
189
191
|
xData: o
|
|
190
192
|
}) => {
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
193
|
-
const { dataIndex: a, seriesId:
|
|
194
|
-
if (a == null || !
|
|
195
|
-
const
|
|
196
|
-
return
|
|
197
|
-
/* @__PURE__ */ e(
|
|
198
|
-
/* @__PURE__ */ e(
|
|
199
|
-
/* @__PURE__ */ e(xe, { amount: String(
|
|
193
|
+
const r = At(), i = ae();
|
|
194
|
+
if (!r?.identifier) return null;
|
|
195
|
+
const { dataIndex: a, seriesId: c } = r.identifier;
|
|
196
|
+
if (a == null || !c) return null;
|
|
197
|
+
const l = n.find((m) => m.id === c)?.data?.[a], y = o?.[a];
|
|
198
|
+
return l === void 0 || !y ? null : /* @__PURE__ */ e(tt, { sx: { pt: 4, px: 8 }, children: /* @__PURE__ */ e(ot, { children: /* @__PURE__ */ C(N, { alignItems: "center", display: "flex", flexDirection: "column", children: [
|
|
199
|
+
/* @__PURE__ */ e(pt, { categoryGuid: t, topLevelCategoryGuid: s }),
|
|
200
|
+
/* @__PURE__ */ e(F, { color: i.palette.text.secondary, variant: "body2", children: Y(y, P.MONTH_SHORT_YEAR) }),
|
|
201
|
+
/* @__PURE__ */ e(xe, { amount: String(l), bold: !0, formatString: "0,0", variant: "body1" })
|
|
200
202
|
] }) }) });
|
|
201
|
-
},
|
|
203
|
+
}, So = ({
|
|
202
204
|
onHoverArea: t,
|
|
203
|
-
onHoverPoint:
|
|
205
|
+
onHoverPoint: s,
|
|
204
206
|
onHoverLegend: n,
|
|
205
207
|
onClickLegend: o,
|
|
206
|
-
stackedDatasets:
|
|
207
|
-
unstackedDatasets:
|
|
208
|
+
stackedDatasets: r,
|
|
209
|
+
unstackedDatasets: i = [],
|
|
208
210
|
availableHeight: a = 0,
|
|
209
|
-
minimumHeight:
|
|
211
|
+
minimumHeight: c = 350
|
|
210
212
|
}) => {
|
|
211
|
-
const
|
|
213
|
+
const u = ae(), { isMobile: l } = j(), [y, { height: m }] = Ht(), _ = g.useRef(null), [h, p] = g.useState(0);
|
|
212
214
|
g.useEffect(() => {
|
|
213
|
-
const
|
|
214
|
-
p(
|
|
215
|
+
const d = Math.max(a - m, c);
|
|
216
|
+
p(d);
|
|
215
217
|
}, [a, m]);
|
|
216
|
-
const [f,
|
|
218
|
+
const [f, T] = g.useState(null), [x, k] = g.useState({
|
|
217
219
|
hoveredSeriesId: null,
|
|
218
220
|
hoveredAreaData: null,
|
|
219
221
|
isAreaHovered: !1,
|
|
220
222
|
cursorPos: { x: 0, y: 0 }
|
|
221
|
-
}), { hoveredSeriesId:
|
|
222
|
-
(
|
|
223
|
-
) ?? [0],
|
|
224
|
-
...
|
|
225
|
-
),
|
|
226
|
-
id: `stacked-${
|
|
227
|
-
guid:
|
|
228
|
-
top_level_guid:
|
|
223
|
+
}), { hoveredSeriesId: L, hoveredAreaData: E, isAreaHovered: w, cursorPos: M } = x, ie = w && L && E, X = !ie, V = [...r, ...i], Z = V[0]?.dataset.length ?? 0, O = V.flatMap((d) => d.dataset.map((b) => b.x)), G = V.flatMap((d) => d.dataset.map((b) => b.y)), Q = r[0]?.dataset?.map(
|
|
224
|
+
(d, b) => r.reduce((I, K) => I + K.dataset[b]?.y || 0, 0)
|
|
225
|
+
) ?? [0], Ce = Math.max(...Q), le = Math.max(
|
|
226
|
+
...i.flatMap((d) => d.dataset.map((b) => b.y))
|
|
227
|
+
), q = Math.floor(Math.min(...G) / 100) * 100, ce = Math.ceil(Math.max(Ce, le) / 100) * 100, z = r.map((d, b) => ({
|
|
228
|
+
id: `stacked-${b}`,
|
|
229
|
+
guid: d.category_guid,
|
|
230
|
+
top_level_guid: d.top_level_category_guid,
|
|
229
231
|
area: !0,
|
|
230
|
-
color:
|
|
231
|
-
data:
|
|
232
|
-
label:
|
|
232
|
+
color: r[b].category_color ?? u.palette.primary.main,
|
|
233
|
+
data: d.dataset.map((I) => I.y),
|
|
234
|
+
label: r[b].category_name,
|
|
233
235
|
stack: "total",
|
|
234
236
|
type: "line",
|
|
235
237
|
highlightScope: { highlight: "item" },
|
|
236
|
-
valueFormatter: (
|
|
237
|
-
})),
|
|
238
|
-
id: `unstacked-${
|
|
239
|
-
guid:
|
|
240
|
-
top_level_guid:
|
|
238
|
+
valueFormatter: (I) => re(I, "0,0")
|
|
239
|
+
})), J = i.map((d, b) => ({
|
|
240
|
+
id: `unstacked-${b}`,
|
|
241
|
+
guid: d.category_guid,
|
|
242
|
+
top_level_guid: d.top_level_category_guid,
|
|
241
243
|
area: !1,
|
|
242
|
-
color:
|
|
243
|
-
data:
|
|
244
|
-
label:
|
|
244
|
+
color: d.category_color,
|
|
245
|
+
data: d.dataset.map((I) => I.y),
|
|
246
|
+
label: d.category_name,
|
|
245
247
|
type: "line",
|
|
246
|
-
valueFormatter: (
|
|
247
|
-
})),
|
|
248
|
-
...
|
|
249
|
-
guid:
|
|
250
|
-
top_level_guid:
|
|
248
|
+
valueFormatter: (I) => re(I, "0,0")
|
|
249
|
+
})), ne = [...z, ...J], ee = [
|
|
250
|
+
...z.map(({ guid: d, top_level_guid: b }) => ({
|
|
251
|
+
guid: d,
|
|
252
|
+
top_level_guid: b
|
|
251
253
|
})),
|
|
252
|
-
...
|
|
253
|
-
guid:
|
|
254
|
-
top_level_guid:
|
|
254
|
+
...J.map(({ guid: d, top_level_guid: b }) => ({
|
|
255
|
+
guid: d,
|
|
256
|
+
top_level_guid: b
|
|
255
257
|
}))
|
|
256
|
-
],
|
|
257
|
-
const
|
|
258
|
+
], te = (d) => {
|
|
259
|
+
const I = d.startsWith("stacked-") ? r[parseInt(d.split("-")[1])] : i[parseInt(d.split("-")[1])];
|
|
258
260
|
return {
|
|
259
|
-
guid:
|
|
260
|
-
topLevelGuid:
|
|
261
|
+
guid: I?.category_guid,
|
|
262
|
+
topLevelGuid: I?.top_level_category_guid
|
|
261
263
|
};
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
},
|
|
265
|
-
o?.(
|
|
266
|
-
},
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
const
|
|
271
|
-
if (
|
|
272
|
-
|
|
273
|
-
hoveredSeriesId:
|
|
264
|
+
}, se = (d) => {
|
|
265
|
+
T(d), n?.(d ?? "");
|
|
266
|
+
}, de = (d) => {
|
|
267
|
+
o?.(d ?? "");
|
|
268
|
+
}, ue = () => {
|
|
269
|
+
const d = te(String(L)).guid;
|
|
270
|
+
d && o?.(d);
|
|
271
|
+
}, me = (d) => {
|
|
272
|
+
const b = String(d?.seriesId), I = te(b).guid, K = ne.find((he) => he.id === b), _e = K && d?.dataIndex !== void 0, Ee = K && d?.dataIndex === void 0;
|
|
273
|
+
if (_e)
|
|
274
|
+
k({
|
|
275
|
+
hoveredSeriesId: b,
|
|
274
276
|
hoveredAreaData: null,
|
|
275
277
|
isAreaHovered: !1,
|
|
276
|
-
cursorPos:
|
|
277
|
-
}),
|
|
278
|
-
else if (
|
|
279
|
-
const
|
|
280
|
-
x:
|
|
278
|
+
cursorPos: M
|
|
279
|
+
}), s?.(I);
|
|
280
|
+
else if (Ee) {
|
|
281
|
+
const he = K?.data.map((Me, Ae) => ({
|
|
282
|
+
x: O[Ae],
|
|
281
283
|
y: Me
|
|
282
284
|
})) ?? [];
|
|
283
|
-
|
|
284
|
-
hoveredSeriesId:
|
|
285
|
-
hoveredAreaData:
|
|
285
|
+
k({
|
|
286
|
+
hoveredSeriesId: b,
|
|
287
|
+
hoveredAreaData: he,
|
|
286
288
|
isAreaHovered: !0,
|
|
287
|
-
cursorPos:
|
|
288
|
-
}), t?.(
|
|
289
|
+
cursorPos: M
|
|
290
|
+
}), t?.(I);
|
|
289
291
|
} else
|
|
290
|
-
|
|
292
|
+
k({
|
|
291
293
|
hoveredSeriesId: null,
|
|
292
294
|
hoveredAreaData: null,
|
|
293
295
|
isAreaHovered: !1,
|
|
294
|
-
cursorPos:
|
|
296
|
+
cursorPos: M
|
|
295
297
|
});
|
|
296
|
-
}, D = (
|
|
297
|
-
if (
|
|
298
|
+
}, D = (d) => {
|
|
299
|
+
if (d.target instanceof Element && d.target.classList[0]?.includes("MuiMarkElement-root"))
|
|
298
300
|
return;
|
|
299
|
-
const
|
|
300
|
-
|
|
301
|
-
...
|
|
301
|
+
const b = d.currentTarget.getBoundingClientRect();
|
|
302
|
+
k((I) => ({
|
|
303
|
+
...I,
|
|
302
304
|
cursorPos: {
|
|
303
|
-
x:
|
|
304
|
-
y:
|
|
305
|
+
x: d.clientX - b.left,
|
|
306
|
+
y: d.clientY - b.top
|
|
305
307
|
}
|
|
306
308
|
}));
|
|
307
|
-
},
|
|
309
|
+
}, B = {
|
|
308
310
|
p: 4,
|
|
309
311
|
"& .MuiBarLabel-root": {
|
|
310
312
|
fontSize: 10,
|
|
@@ -320,15 +322,15 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
320
322
|
'& [class*="MuiLineElement-series-unstacked-"]': {
|
|
321
323
|
strokeWidth: 3
|
|
322
324
|
},
|
|
323
|
-
...f &&
|
|
324
|
-
const
|
|
325
|
-
return
|
|
326
|
-
opacity:
|
|
327
|
-
},
|
|
325
|
+
...f && z.reduce((d, b, I) => {
|
|
326
|
+
const K = `.MuiAreaElement-series-stacked-${I}`;
|
|
327
|
+
return d[K] = {
|
|
328
|
+
opacity: z[I].guid === f ? 0.9 : 0.2
|
|
329
|
+
}, d;
|
|
328
330
|
}, {})
|
|
329
331
|
};
|
|
330
332
|
return /* @__PURE__ */ e(
|
|
331
|
-
|
|
333
|
+
N,
|
|
332
334
|
{
|
|
333
335
|
onMouseMove: D,
|
|
334
336
|
ref: _,
|
|
@@ -344,75 +346,75 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
344
346
|
}
|
|
345
347
|
},
|
|
346
348
|
children: /* @__PURE__ */ C(
|
|
347
|
-
|
|
349
|
+
S,
|
|
348
350
|
{
|
|
349
351
|
direction: { xs: "column", md: "column" },
|
|
350
352
|
spacing: { xs: 0, md: 4 },
|
|
351
353
|
sx: { width: "100%", position: "relative" },
|
|
352
354
|
children: [
|
|
353
355
|
/* @__PURE__ */ e(
|
|
354
|
-
|
|
356
|
+
kt,
|
|
355
357
|
{
|
|
356
358
|
height: h,
|
|
357
359
|
hideLegend: !0,
|
|
358
360
|
margin: { bottom: 24, left: 12, right: 54, top: 48 },
|
|
359
|
-
onAreaClick:
|
|
360
|
-
onHighlightChange:
|
|
361
|
-
series:
|
|
361
|
+
onAreaClick: ue,
|
|
362
|
+
onHighlightChange: me,
|
|
363
|
+
series: ne,
|
|
362
364
|
skipAnimation: !0,
|
|
363
365
|
slotProps: {
|
|
364
|
-
tooltip: { trigger:
|
|
366
|
+
tooltip: { trigger: X ? "item" : "none" }
|
|
365
367
|
},
|
|
366
368
|
slots: {
|
|
367
|
-
tooltip:
|
|
368
|
-
|
|
369
|
+
tooltip: X && L ? (d) => /* @__PURE__ */ e(Rt, { children: /* @__PURE__ */ e(
|
|
370
|
+
To,
|
|
369
371
|
{
|
|
370
|
-
...
|
|
371
|
-
categoryGuids:
|
|
372
|
-
series:
|
|
373
|
-
xData:
|
|
372
|
+
...d,
|
|
373
|
+
categoryGuids: te(L),
|
|
374
|
+
series: ne,
|
|
375
|
+
xData: O
|
|
374
376
|
}
|
|
375
377
|
) }) : void 0
|
|
376
378
|
},
|
|
377
|
-
sx:
|
|
379
|
+
sx: B,
|
|
378
380
|
xAxis: [
|
|
379
381
|
{
|
|
380
|
-
data:
|
|
382
|
+
data: O,
|
|
381
383
|
scaleType: "time",
|
|
382
|
-
valueFormatter: (
|
|
383
|
-
tickNumber:
|
|
384
|
+
valueFormatter: (d) => Y(d, P.MONTH_SHORT_YEAR),
|
|
385
|
+
tickNumber: Z
|
|
384
386
|
// How many ticks to show on the x-axis
|
|
385
387
|
}
|
|
386
388
|
],
|
|
387
389
|
yAxis: [
|
|
388
390
|
{
|
|
389
|
-
min:
|
|
390
|
-
max:
|
|
391
|
-
valueFormatter: (
|
|
391
|
+
min: q,
|
|
392
|
+
max: ce || 100,
|
|
393
|
+
valueFormatter: (d) => Lt(d).format("0a")
|
|
392
394
|
}
|
|
393
395
|
]
|
|
394
396
|
}
|
|
395
397
|
),
|
|
396
398
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
399
|
+
bo,
|
|
398
400
|
{
|
|
399
|
-
categoryGuids:
|
|
401
|
+
categoryGuids: ee,
|
|
400
402
|
hoveredLegend: f,
|
|
401
403
|
legendRef: y,
|
|
402
|
-
onClickLegend:
|
|
403
|
-
onHoverLegend:
|
|
404
|
-
sx: { px:
|
|
404
|
+
onClickLegend: de,
|
|
405
|
+
onHoverLegend: se,
|
|
406
|
+
sx: { px: l ? 0 : 24 }
|
|
405
407
|
}
|
|
406
408
|
),
|
|
407
|
-
|
|
408
|
-
|
|
409
|
+
ie && /* @__PURE__ */ e(
|
|
410
|
+
_o,
|
|
409
411
|
{
|
|
410
|
-
categoryGuids:
|
|
412
|
+
categoryGuids: te(L),
|
|
411
413
|
chartContainerRef: _,
|
|
412
|
-
cursorPosition:
|
|
413
|
-
hoveredAreaData:
|
|
414
|
-
...
|
|
415
|
-
x:
|
|
414
|
+
cursorPosition: M,
|
|
415
|
+
hoveredAreaData: E.map((d) => ({
|
|
416
|
+
...d,
|
|
417
|
+
x: Y(d.x, P.MONTH_SHORT_YEAR)
|
|
416
418
|
}))
|
|
417
419
|
}
|
|
418
420
|
)
|
|
@@ -421,18 +423,18 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
421
423
|
)
|
|
422
424
|
}
|
|
423
425
|
);
|
|
424
|
-
},
|
|
425
|
-
const { common: n } =
|
|
426
|
+
}, ft = ({ selectedTab: t, onTabChange: s }) => {
|
|
427
|
+
const { common: n } = R();
|
|
426
428
|
return /* @__PURE__ */ e(
|
|
427
|
-
|
|
429
|
+
Kt,
|
|
428
430
|
{
|
|
429
431
|
"aria-label": n.view_toggle,
|
|
430
432
|
exclusive: !0,
|
|
431
|
-
onChange:
|
|
433
|
+
onChange: s,
|
|
432
434
|
orientation: "horizontal",
|
|
433
435
|
value: t,
|
|
434
436
|
children: ["Chart", "Table"].map((o) => /* @__PURE__ */ e(
|
|
435
|
-
|
|
437
|
+
zt,
|
|
436
438
|
{
|
|
437
439
|
"aria-label": o === "Chart" ? n.view_chart : n.view_table,
|
|
438
440
|
"aria-pressed": t === o,
|
|
@@ -445,162 +447,199 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
445
447
|
))
|
|
446
448
|
}
|
|
447
449
|
);
|
|
448
|
-
},
|
|
449
|
-
const { trends: n } =
|
|
450
|
-
const
|
|
450
|
+
}, yt = ({ selectedDateRange: t, selectedCategoryGuid: s }) => {
|
|
451
|
+
const { trends: n } = R(), { isMobile: o, isDesktop: r } = j(), { getCategoryName: i } = U(), a = g.useMemo(() => {
|
|
452
|
+
const l = t.start.getFullYear() === t.end.getFullYear() ? Y(
|
|
451
453
|
t.start,
|
|
452
|
-
o ?
|
|
453
|
-
) :
|
|
454
|
+
o ? P.MONTH_SHORT : P.MONTH_LONG
|
|
455
|
+
) : Y(
|
|
454
456
|
t.start,
|
|
455
|
-
o ?
|
|
456
|
-
), y =
|
|
457
|
+
o ? P.MONTH_SHORT_YEAR : P.MONTH_YEAR
|
|
458
|
+
), y = Y(
|
|
457
459
|
t.end,
|
|
458
|
-
o ?
|
|
460
|
+
o ? P.MONTH_SHORT_YEAR : P.MONTH_YEAR
|
|
459
461
|
);
|
|
460
|
-
return `${
|
|
461
|
-
}, [t, o]),
|
|
462
|
-
return /* @__PURE__ */ C(
|
|
462
|
+
return `${l} - ${y}`;
|
|
463
|
+
}, [t, o]), u = i(s) || (o ? n.sub_title : n.sub_title_by_category);
|
|
464
|
+
return /* @__PURE__ */ C(N, { children: [
|
|
463
465
|
/* @__PURE__ */ e(
|
|
464
|
-
|
|
466
|
+
Ge,
|
|
465
467
|
{
|
|
466
468
|
sx: {
|
|
467
|
-
fontSize:
|
|
469
|
+
fontSize: r ? null : 15,
|
|
468
470
|
whiteSpace: "normal",
|
|
469
471
|
overflow: "visible",
|
|
470
472
|
textOverflow: "unset"
|
|
471
473
|
},
|
|
472
|
-
children:
|
|
474
|
+
children: u
|
|
473
475
|
}
|
|
474
476
|
),
|
|
475
|
-
/* @__PURE__ */ e(
|
|
477
|
+
/* @__PURE__ */ e(F, { variant: r ? "subtitle1" : "body2", children: a })
|
|
476
478
|
] });
|
|
477
|
-
},
|
|
478
|
-
const
|
|
479
|
-
return /* @__PURE__ */ C(
|
|
480
|
-
!
|
|
481
|
-
/* @__PURE__ */ e(
|
|
479
|
+
}, xo = (t) => {
|
|
480
|
+
const s = t.id === "total";
|
|
481
|
+
return /* @__PURE__ */ C(S, { alignItems: "center", direction: "row", role: "rowheader", tabIndex: t.tabIndex, children: [
|
|
482
|
+
!s && /* @__PURE__ */ e(N, { "aria-hidden": !0, children: /* @__PURE__ */ e(we, { categoryGuid: t.row.top_level_category_guid, variant: "twotone" }) }),
|
|
483
|
+
/* @__PURE__ */ e(F, { bold: s, sx: { ml: 12 }, variant: s ? "body1" : "body2", children: t.row.category })
|
|
482
484
|
] });
|
|
483
|
-
},
|
|
484
|
-
const
|
|
485
|
-
return /* @__PURE__ */ e(
|
|
485
|
+
}, je = (t) => {
|
|
486
|
+
const s = t.row.category_guid, n = t.row.top_level_category_guid, o = s === ze.INCOME || n === ze.INCOME, r = t.id === "total", i = t.field === "total", a = i ? t.row[t.field] : t.row.monthlyAmounts[t.field];
|
|
487
|
+
return /* @__PURE__ */ e(S, { alignItems: "flex-end", direction: "row", tabIndex: t.tabIndex, children: /* @__PURE__ */ e(
|
|
486
488
|
xe,
|
|
487
489
|
{
|
|
488
490
|
amount: o ? Math.abs(a) : a,
|
|
489
491
|
isIncome: o,
|
|
490
|
-
sx: { fontWeight: o ||
|
|
492
|
+
sx: { fontWeight: o || i || r ? 600 : 500 },
|
|
491
493
|
symbol: o ? "+" : void 0,
|
|
492
|
-
variant:
|
|
494
|
+
variant: r ? "body1" : "body2"
|
|
493
495
|
}
|
|
494
496
|
) });
|
|
495
|
-
},
|
|
496
|
-
const n =
|
|
497
|
-
return t[n] =
|
|
498
|
-
},
|
|
499
|
-
const o =
|
|
500
|
-
return
|
|
501
|
-
},
|
|
497
|
+
}, Ue = (t, s) => {
|
|
498
|
+
const n = Y(lt(s.isoDate), P.MONTH_LONG);
|
|
499
|
+
return t[n] = s.amount, t;
|
|
500
|
+
}, Xe = (t) => (s, n) => {
|
|
501
|
+
const o = Y(lt(n.isoDate), P.MONTH_LONG);
|
|
502
|
+
return s + (t.includes(o) ? n.amount : 0);
|
|
503
|
+
}, wo = (t, s) => {
|
|
502
504
|
const n = [], o = new Date(t);
|
|
503
|
-
for (; o <=
|
|
504
|
-
const
|
|
505
|
-
n.push(
|
|
505
|
+
for (; o <= s; ) {
|
|
506
|
+
const r = Y(o, P.MONTH_LONG);
|
|
507
|
+
n.push(r), o.setMonth(o.getMonth() + 1);
|
|
506
508
|
}
|
|
507
509
|
return n;
|
|
508
|
-
},
|
|
510
|
+
}, vo = (t, s) => {
|
|
509
511
|
const n = {
|
|
510
512
|
field: "category",
|
|
511
513
|
flex: 1,
|
|
512
514
|
headerClassName: "trends-table-header",
|
|
513
|
-
headerName:
|
|
515
|
+
headerName: s.category_title,
|
|
514
516
|
minWidth: 210,
|
|
515
517
|
renderHeader: ke,
|
|
516
|
-
renderCell:
|
|
518
|
+
renderCell: xo,
|
|
517
519
|
sortable: !0,
|
|
518
|
-
sortComparator:
|
|
520
|
+
sortComparator: Ot,
|
|
519
521
|
type: "string"
|
|
520
|
-
}, o = t.map((
|
|
521
|
-
field:
|
|
522
|
+
}, o = t.map((i) => ({
|
|
523
|
+
field: i,
|
|
522
524
|
flex: 1,
|
|
523
525
|
headerClassName: "trends-table-header",
|
|
524
|
-
headerName:
|
|
526
|
+
headerName: i,
|
|
525
527
|
minWidth: 100,
|
|
526
528
|
renderHeader: ke,
|
|
527
|
-
renderCell:
|
|
529
|
+
renderCell: je,
|
|
528
530
|
align: "center",
|
|
529
531
|
headerAlign: "center",
|
|
530
532
|
sortable: !0,
|
|
531
533
|
hideSortIcons: !1,
|
|
532
534
|
type: "number",
|
|
533
|
-
sortComparator:
|
|
534
|
-
|
|
535
|
+
sortComparator: Ke,
|
|
536
|
+
valueGetter: (a, c) => c.monthlyAmounts?.[i] ?? 0
|
|
537
|
+
})), r = {
|
|
535
538
|
field: "total",
|
|
536
539
|
flex: 1,
|
|
537
540
|
headerClassName: "trends-table-header",
|
|
538
|
-
headerName:
|
|
541
|
+
headerName: s.table_column_total,
|
|
539
542
|
minWidth: 100,
|
|
540
543
|
renderHeader: ke,
|
|
541
|
-
renderCell:
|
|
544
|
+
renderCell: je,
|
|
542
545
|
align: "center",
|
|
543
546
|
headerAlign: "center",
|
|
544
547
|
sortable: !0,
|
|
545
548
|
hideSortIcons: !1,
|
|
546
549
|
type: "number",
|
|
547
|
-
sortComparator:
|
|
550
|
+
sortComparator: Ke
|
|
548
551
|
};
|
|
549
|
-
return [n, ...o,
|
|
550
|
-
},
|
|
551
|
-
const
|
|
552
|
-
let
|
|
553
|
-
return
|
|
552
|
+
return [n, ...o, r];
|
|
553
|
+
}, Ze = (t, s, n, o, r) => {
|
|
554
|
+
const i = t.filter((a) => a.is_income === n).map((a) => {
|
|
555
|
+
let c = a.totalMonthlyAmounts;
|
|
556
|
+
return r && (c = a.monthlyAmounts), {
|
|
554
557
|
id: a.guid,
|
|
555
558
|
category: a.name,
|
|
556
559
|
category_guid: a.guid,
|
|
557
560
|
isParent: !1,
|
|
558
561
|
top_level_category_guid: a.parent_guid || a.guid,
|
|
559
|
-
total:
|
|
560
|
-
monthlyAmounts:
|
|
562
|
+
total: c.reduce(Xe(o), 0),
|
|
563
|
+
monthlyAmounts: c.reduce(Ue, {})
|
|
561
564
|
};
|
|
562
565
|
});
|
|
563
|
-
if (
|
|
564
|
-
const a =
|
|
565
|
-
a !== 0 &&
|
|
566
|
-
id: `sub-${
|
|
567
|
-
category:
|
|
568
|
-
category_guid:
|
|
566
|
+
if (r && r.is_income === n) {
|
|
567
|
+
const a = r.monthlyAmounts.reduce(Xe(o), 0);
|
|
568
|
+
a !== 0 && i.push({
|
|
569
|
+
id: `sub-${r.guid}`,
|
|
570
|
+
category: rt(s.category_general, r.name),
|
|
571
|
+
category_guid: r.guid,
|
|
569
572
|
isParent: !0,
|
|
570
|
-
top_level_category_guid:
|
|
573
|
+
top_level_category_guid: r.guid,
|
|
571
574
|
total: a,
|
|
572
|
-
monthlyAmounts:
|
|
575
|
+
monthlyAmounts: r.monthlyAmounts.reduce(Ue, {})
|
|
573
576
|
});
|
|
574
577
|
}
|
|
575
|
-
return
|
|
576
|
-
},
|
|
578
|
+
return i;
|
|
579
|
+
}, Do = Et("div")({
|
|
580
|
+
display: "flex",
|
|
581
|
+
visibility: "hidden",
|
|
582
|
+
width: 0
|
|
583
|
+
});
|
|
584
|
+
function Io({
|
|
585
|
+
direction: t,
|
|
586
|
+
index: s,
|
|
587
|
+
sortingOrder: n,
|
|
588
|
+
disabled: o,
|
|
589
|
+
className: r,
|
|
590
|
+
field: i
|
|
591
|
+
}) {
|
|
592
|
+
const a = jt(), c = Ut();
|
|
593
|
+
let u = null;
|
|
594
|
+
const l = {};
|
|
595
|
+
if (t === "asc" ? u = c.slots.columnSortedAscendingIcon : t === "desc" ? u = c.slots.columnSortedDescendingIcon : (u = c.slots.columnUnsortedIcon ?? null, l.sortingOrder = n), !u) return null;
|
|
596
|
+
const m = a.current.getColumn(i)?.headerName ?? i;
|
|
597
|
+
let _ = "";
|
|
598
|
+
t === "asc" ? _ = ", sorted ascending" : t === "desc" && (_ = ", sorted descending");
|
|
599
|
+
const h = ["Total", "Category"].includes(m) ? "" : " category totals", p = `Sort by ${m}${h}${_}`, f = /* @__PURE__ */ e(u, { className: "MuiDataGrid-sortIcon", fontSize: "small", ...l }), T = /* @__PURE__ */ e(
|
|
600
|
+
Qt,
|
|
601
|
+
{
|
|
602
|
+
disabled: o,
|
|
603
|
+
size: "small",
|
|
604
|
+
tabIndex: -1,
|
|
605
|
+
...c.slotProps?.baseIconButton,
|
|
606
|
+
"aria-label": p,
|
|
607
|
+
className: `MuiDataGrid-sortButton${r ? ` ${r}` : ""}`,
|
|
608
|
+
title: p,
|
|
609
|
+
children: f
|
|
610
|
+
}
|
|
611
|
+
);
|
|
612
|
+
return /* @__PURE__ */ e(Do, { className: "MuiDataGrid-iconButtonContainer", children: s != null ? /* @__PURE__ */ e(Zt, { badgeContent: s, color: "default", overlap: "circular", children: T }) : T });
|
|
613
|
+
}
|
|
614
|
+
const Lo = g.memo(Io), Qe = ({
|
|
577
615
|
columns: t,
|
|
578
|
-
onRowClick:
|
|
616
|
+
onRowClick: s,
|
|
579
617
|
parentCategory: n,
|
|
580
618
|
rows: o,
|
|
581
|
-
totalRow:
|
|
619
|
+
totalRow: r
|
|
582
620
|
}) => {
|
|
583
|
-
const
|
|
621
|
+
const i = ae(), { onEvent: a } = $(), c = i.palette.mode === "light";
|
|
584
622
|
return /* @__PURE__ */ e(
|
|
585
|
-
|
|
623
|
+
Xt,
|
|
586
624
|
{
|
|
587
625
|
columns: t,
|
|
588
626
|
disableColumnFilter: !0,
|
|
589
627
|
disableColumnMenu: !0,
|
|
590
628
|
hideFooter: !0,
|
|
591
629
|
initialState: { sorting: { sortModel: [{ field: "category", sort: "asc" }] } },
|
|
592
|
-
onRowClick: (
|
|
593
|
-
n ||
|
|
594
|
-
...
|
|
595
|
-
listItem:
|
|
630
|
+
onRowClick: (u) => {
|
|
631
|
+
n || s?.(u.row.category_guid), a(v.TRENDS_CLICK_LIST_ITEM, {
|
|
632
|
+
...W,
|
|
633
|
+
listItem: Nt[u.row.category_guid]
|
|
596
634
|
});
|
|
597
635
|
},
|
|
598
636
|
pinnedRows: {
|
|
599
|
-
bottom:
|
|
637
|
+
bottom: r ? [r] : []
|
|
600
638
|
},
|
|
601
639
|
rowHeight: 64,
|
|
602
640
|
rows: o,
|
|
603
641
|
slotProps: { baseIconButton: { color: "secondary", sx: { ml: 8 } } },
|
|
642
|
+
slots: { columnHeaderSortIcon: Lo },
|
|
604
643
|
sortingOrder: ["asc", "desc"],
|
|
605
644
|
sx: {
|
|
606
645
|
borderColor: "divider",
|
|
@@ -608,68 +647,68 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
608
647
|
borderStyle: "solid",
|
|
609
648
|
borderRadius: 2,
|
|
610
649
|
"& .MuiDataGrid-columnHeaders": {
|
|
611
|
-
bgcolor:
|
|
650
|
+
bgcolor: c ? "neutral.50" : "neutral.800",
|
|
612
651
|
borderBottom: "none"
|
|
613
652
|
},
|
|
614
653
|
"& .trends-table-header": {
|
|
615
|
-
bgcolor:
|
|
654
|
+
bgcolor: c ? "neutral.50" : "neutral.800"
|
|
616
655
|
}
|
|
617
656
|
}
|
|
618
657
|
}
|
|
619
658
|
);
|
|
620
|
-
},
|
|
659
|
+
}, Ct = ({
|
|
621
660
|
selectedDateRange: t,
|
|
622
|
-
selectedCategory:
|
|
661
|
+
selectedCategory: s,
|
|
623
662
|
onClickRow: n,
|
|
624
663
|
height: o = "100%",
|
|
625
|
-
sx:
|
|
664
|
+
sx: r = {}
|
|
626
665
|
}) => {
|
|
627
|
-
const { trends:
|
|
628
|
-
if (
|
|
629
|
-
return a.find((h) => h.guid ===
|
|
630
|
-
}, [
|
|
666
|
+
const { trends: i } = R(), { trendsCategories: a } = U(), c = g.useMemo(() => wo(t.start, t.end), [t]), u = g.useMemo(() => vo(c, i), [c, i]), l = g.useMemo(() => {
|
|
667
|
+
if (s)
|
|
668
|
+
return a.find((h) => h.guid === s);
|
|
669
|
+
}, [s, a]), [y, m] = g.useMemo(() => {
|
|
631
670
|
let h = a;
|
|
632
|
-
return
|
|
671
|
+
return l && (h = l.subCategories.filter(
|
|
633
672
|
(p) => p.monthlyAmounts.some((f) => f.amount !== 0)
|
|
634
673
|
)), [
|
|
635
|
-
|
|
636
|
-
|
|
674
|
+
Ze(h, i, !0, c, l),
|
|
675
|
+
Ze(h, i, !1, c, l)
|
|
637
676
|
];
|
|
638
|
-
}, [a,
|
|
677
|
+
}, [a, c, l, i]), _ = {
|
|
639
678
|
id: "total",
|
|
640
|
-
category:
|
|
679
|
+
category: i.table_column_total,
|
|
641
680
|
category_guid: "total",
|
|
642
681
|
isParent: !1,
|
|
643
682
|
top_level_category_guid: "total",
|
|
644
683
|
total: m.reduce((h, p) => h + p.total, 0),
|
|
645
684
|
monthlyAmounts: m.reduce(
|
|
646
|
-
(h, p) => (Object.entries(p.monthlyAmounts).forEach(([f,
|
|
647
|
-
h[f] = (h[f] || 0) +
|
|
685
|
+
(h, p) => (Object.entries(p.monthlyAmounts).forEach(([f, T]) => {
|
|
686
|
+
h[f] = (h[f] || 0) + T;
|
|
648
687
|
}), h),
|
|
649
688
|
{}
|
|
650
689
|
)
|
|
651
690
|
};
|
|
652
691
|
return /* @__PURE__ */ C(
|
|
653
|
-
|
|
692
|
+
S,
|
|
654
693
|
{
|
|
655
694
|
gap: 24,
|
|
656
|
-
sx: { height: o, width: "100%", overflowX: "auto", boxShadow: "none", ...
|
|
695
|
+
sx: { height: o, width: "100%", overflowX: "auto", boxShadow: "none", ...r },
|
|
657
696
|
children: [
|
|
658
|
-
(!
|
|
659
|
-
|
|
697
|
+
(!l || l && l.is_income) && /* @__PURE__ */ e(
|
|
698
|
+
Qe,
|
|
660
699
|
{
|
|
661
|
-
columns:
|
|
700
|
+
columns: u,
|
|
662
701
|
onRowClick: n,
|
|
663
|
-
parentCategory:
|
|
702
|
+
parentCategory: l,
|
|
664
703
|
rows: y
|
|
665
704
|
}
|
|
666
705
|
),
|
|
667
|
-
(!
|
|
668
|
-
|
|
706
|
+
(!l || l && !l.is_income) && /* @__PURE__ */ e(
|
|
707
|
+
Qe,
|
|
669
708
|
{
|
|
670
|
-
columns:
|
|
709
|
+
columns: u,
|
|
671
710
|
onRowClick: n,
|
|
672
|
-
parentCategory:
|
|
711
|
+
parentCategory: l,
|
|
673
712
|
rows: m,
|
|
674
713
|
totalRow: _
|
|
675
714
|
}
|
|
@@ -677,171 +716,171 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
677
716
|
]
|
|
678
717
|
}
|
|
679
718
|
);
|
|
680
|
-
},
|
|
719
|
+
}, Eo = {
|
|
681
720
|
title: "Transaction List"
|
|
682
|
-
},
|
|
721
|
+
}, Mo = ({
|
|
683
722
|
categoryGuid: t,
|
|
684
|
-
dateRange:
|
|
723
|
+
dateRange: s,
|
|
685
724
|
isOpen: n,
|
|
686
725
|
onClose: o
|
|
687
726
|
}) => {
|
|
688
|
-
const { onEvent:
|
|
689
|
-
() =>
|
|
690
|
-
[
|
|
727
|
+
const { onEvent: r } = $(), { selectedAccountGuids: i } = fe(), { common: a } = R(), { setFilter: c, sortedTransactions: u } = ve(), [l, y] = g.useState(""), m = g.useMemo(
|
|
728
|
+
() => u.find((h) => h.guid === l),
|
|
729
|
+
[l, u]
|
|
691
730
|
);
|
|
692
731
|
g.useEffect(() => {
|
|
693
|
-
|
|
694
|
-
accounts:
|
|
695
|
-
dateRange:
|
|
732
|
+
c({
|
|
733
|
+
accounts: i,
|
|
734
|
+
dateRange: s,
|
|
696
735
|
custom: (h) => t === "" || t === h.category_guid || t === h.top_level_category_guid,
|
|
697
736
|
showSplits: !!t
|
|
698
737
|
});
|
|
699
|
-
}, [
|
|
738
|
+
}, [i, t, s]), g.useEffect(() => r(v.TRENDS_VIEW_TRANSACTIONS), []);
|
|
700
739
|
const _ = () => {
|
|
701
740
|
y(""), o();
|
|
702
741
|
};
|
|
703
742
|
return /* @__PURE__ */ C(
|
|
704
|
-
|
|
743
|
+
Pe,
|
|
705
744
|
{
|
|
706
745
|
ariaLabelClose: a.close_aria,
|
|
707
746
|
isOpen: n,
|
|
708
747
|
onClose: _,
|
|
709
|
-
title:
|
|
748
|
+
title: Eo.title,
|
|
710
749
|
children: [
|
|
711
|
-
m && /* @__PURE__ */ e(
|
|
712
|
-
!m && /* @__PURE__ */ e(
|
|
750
|
+
m && /* @__PURE__ */ e(dt, { transaction: m }),
|
|
751
|
+
!m && /* @__PURE__ */ e(ct, { onClick: y })
|
|
713
752
|
]
|
|
714
753
|
}
|
|
715
754
|
);
|
|
716
|
-
},
|
|
717
|
-
const { onEvent: n } =
|
|
718
|
-
categoriesLoaded:
|
|
719
|
-
loadCategories:
|
|
755
|
+
}, Ao = A(Mo), Ro = ({ onBackClick: t, sx: s }) => {
|
|
756
|
+
const { onEvent: n } = $(), { isDesktop: o, isTablet: r, isMobile: i } = j(), { isAccountDataLoaded: a, loadAccountData: c } = De(), {
|
|
757
|
+
categoriesLoaded: u,
|
|
758
|
+
loadCategories: l,
|
|
720
759
|
loadDateRangeCategoryTotals: y,
|
|
721
760
|
loadMonthlyCategoryTotals: m,
|
|
722
761
|
monthlyCategoryTotals: _,
|
|
723
762
|
getCategoryName: h
|
|
724
|
-
} =
|
|
763
|
+
} = U(), {
|
|
725
764
|
isTransactionDataLoaded: p,
|
|
726
765
|
loadTransactionData: f,
|
|
727
|
-
sortedTransactions:
|
|
728
|
-
} =
|
|
729
|
-
|
|
766
|
+
sortedTransactions: T
|
|
767
|
+
} = ve(), { selectedDateRange: x, setSelectedDateRange: k } = ye(), { isInitialized: L, selectedAccounts: E } = fe(), { trends: w } = R(), [M, ie] = g.useState(!1), [X, V] = g.useState(!1), [Z, O] = g.useState("Chart"), [G, Q] = g.useState(""), [Ce, le] = g.useState(window.innerHeight), ce = Ce - (i ? 315 : 345);
|
|
768
|
+
Ie({
|
|
730
769
|
widgetName: "TrendsFullWidget",
|
|
731
|
-
isLoaded:
|
|
770
|
+
isLoaded: M
|
|
732
771
|
}), g.useEffect(() => {
|
|
733
|
-
const D = () =>
|
|
734
|
-
return window.addEventListener("resize", D), a ||
|
|
772
|
+
const D = () => le(window.innerHeight);
|
|
773
|
+
return window.addEventListener("resize", D), a || c().finally(), u || l().finally(), p || f().finally(), () => window.removeEventListener("resize", D);
|
|
735
774
|
}, []), g.useEffect(() => {
|
|
736
|
-
|
|
775
|
+
L && y(E, x.start, x.end).then(() => {
|
|
737
776
|
m(
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
777
|
+
E,
|
|
778
|
+
x.start,
|
|
779
|
+
x.end
|
|
741
780
|
);
|
|
742
781
|
}).finally(() => {
|
|
743
|
-
|
|
744
|
-
...
|
|
745
|
-
time_period: `${
|
|
782
|
+
ie(!0), n(v.TRENDS_LOAD_WIDGET, {
|
|
783
|
+
...W,
|
|
784
|
+
time_period: `${Se(x.end, x.start)}M`
|
|
746
785
|
});
|
|
747
786
|
});
|
|
748
|
-
}, [
|
|
749
|
-
const
|
|
750
|
-
if (!
|
|
751
|
-
const D =
|
|
787
|
+
}, [L, E, x]);
|
|
788
|
+
const z = g.useMemo(() => {
|
|
789
|
+
if (!M) return { stackedDatasets: [], unstackedDatasets: [] };
|
|
790
|
+
const D = Gt(
|
|
752
791
|
_,
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
),
|
|
756
|
-
(
|
|
757
|
-
) :
|
|
792
|
+
x.start,
|
|
793
|
+
x.end
|
|
794
|
+
), B = G.length ? D.filter(
|
|
795
|
+
(d) => d.top_level_category_guid === G || d.category_guid === G
|
|
796
|
+
) : Pt(D);
|
|
758
797
|
return {
|
|
759
|
-
stackedDatasets:
|
|
760
|
-
unstackedDatasets:
|
|
798
|
+
stackedDatasets: B.filter(Vt),
|
|
799
|
+
unstackedDatasets: B.filter(Ft)
|
|
761
800
|
};
|
|
762
|
-
}, [_,
|
|
763
|
-
|
|
764
|
-
},
|
|
765
|
-
const
|
|
766
|
-
|
|
767
|
-
time_period:
|
|
801
|
+
}, [_, G, x]), J = (D, B) => {
|
|
802
|
+
O(B ?? Z), n(v.TRENDS_CLICK_TOGGLE_VIEW);
|
|
803
|
+
}, ne = (D) => {
|
|
804
|
+
const B = et(D?.[0], 1), d = D?.[1], b = Se(d, B);
|
|
805
|
+
k({ start: B, end: d }), n(v.TRENDS_CLICK_TIME_WINDOW, {
|
|
806
|
+
time_period: b + "M"
|
|
768
807
|
});
|
|
769
|
-
},
|
|
808
|
+
}, ee = () => {
|
|
770
809
|
n(v.TRENDS_CLICK_FILTER);
|
|
771
|
-
},
|
|
772
|
-
|
|
773
|
-
},
|
|
774
|
-
|
|
775
|
-
},
|
|
810
|
+
}, te = (D) => {
|
|
811
|
+
Q(D);
|
|
812
|
+
}, se = (D) => {
|
|
813
|
+
Q(D), n(v.TRENDS_CLICK_LEGEND, { category: h(D) });
|
|
814
|
+
}, de = (D) => {
|
|
776
815
|
n(v.TRENDS_HOVER_LEGEND, { category: h(D) });
|
|
777
|
-
},
|
|
816
|
+
}, ue = (D) => {
|
|
778
817
|
n(v.TRENDS_HOVER_AREA, { category: D });
|
|
779
|
-
},
|
|
818
|
+
}, me = (D) => {
|
|
780
819
|
n(v.TRENDS_HOVER_POINT, { category: D });
|
|
781
820
|
};
|
|
782
|
-
return !
|
|
783
|
-
|
|
821
|
+
return !L || !M ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ C(
|
|
822
|
+
ut,
|
|
784
823
|
{
|
|
785
|
-
calendarActions: { onRangeChanged:
|
|
786
|
-
dateRange:
|
|
824
|
+
calendarActions: { onRangeChanged: ne },
|
|
825
|
+
dateRange: x,
|
|
787
826
|
dateRangeVariant: "timeframebuttons",
|
|
788
|
-
onAccountsFilterClick:
|
|
827
|
+
onAccountsFilterClick: ee,
|
|
789
828
|
onBackClick: t,
|
|
790
|
-
sx:
|
|
791
|
-
title:
|
|
829
|
+
sx: s,
|
|
830
|
+
title: w.title,
|
|
792
831
|
children: [
|
|
793
832
|
/* @__PURE__ */ C(
|
|
794
|
-
|
|
833
|
+
S,
|
|
795
834
|
{
|
|
796
835
|
sx: {
|
|
797
836
|
// eslint-disable-next-line no-nested-ternary
|
|
798
|
-
px: o ? 48 :
|
|
837
|
+
px: o ? 48 : r ? 24 : 12
|
|
799
838
|
},
|
|
800
839
|
children: [
|
|
801
840
|
/* @__PURE__ */ C(
|
|
802
|
-
|
|
841
|
+
S,
|
|
803
842
|
{
|
|
804
843
|
flexDirection: "row",
|
|
805
844
|
justifyContent: "space-between",
|
|
806
|
-
sx: { pb:
|
|
845
|
+
sx: { pb: i ? 12 : 24, pt: i ? 24 : 48 },
|
|
807
846
|
children: [
|
|
808
847
|
/* @__PURE__ */ e(
|
|
809
|
-
|
|
848
|
+
yt,
|
|
810
849
|
{
|
|
811
|
-
selectedCategoryGuid:
|
|
812
|
-
selectedDateRange:
|
|
850
|
+
selectedCategoryGuid: G,
|
|
851
|
+
selectedDateRange: x
|
|
813
852
|
}
|
|
814
853
|
),
|
|
815
|
-
/* @__PURE__ */ e(
|
|
854
|
+
/* @__PURE__ */ e(ft, { onTabChange: J, selectedTab: Z })
|
|
816
855
|
]
|
|
817
856
|
}
|
|
818
857
|
),
|
|
819
|
-
/* @__PURE__ */ C(
|
|
820
|
-
/* @__PURE__ */ e(
|
|
858
|
+
/* @__PURE__ */ C(S, { alignItems: "center", flexDirection: "row", width: "100%", children: [
|
|
859
|
+
/* @__PURE__ */ e(N, { flexGrow: 1, children: G && /* @__PURE__ */ C(Te, { onClick: () => Q(""), sx: { p: 0, pr: 5 }, children: [
|
|
821
860
|
/* @__PURE__ */ e(He, { name: "arrow_back" }),
|
|
822
|
-
|
|
861
|
+
w.all_categories
|
|
823
862
|
] }) }),
|
|
824
|
-
/* @__PURE__ */ e(
|
|
863
|
+
/* @__PURE__ */ e(Te, { onClick: () => V(!0), sx: { px: 5 }, children: `${w.view_transactions} (${T.length})` })
|
|
825
864
|
] }),
|
|
826
|
-
/* @__PURE__ */ C(
|
|
827
|
-
|
|
828
|
-
|
|
865
|
+
/* @__PURE__ */ C(N, { children: [
|
|
866
|
+
Z === "Chart" && /* @__PURE__ */ e(
|
|
867
|
+
So,
|
|
829
868
|
{
|
|
830
|
-
availableHeight:
|
|
831
|
-
onClickLegend:
|
|
832
|
-
onHoverArea:
|
|
833
|
-
onHoverLegend:
|
|
834
|
-
onHoverPoint:
|
|
835
|
-
stackedDatasets:
|
|
836
|
-
unstackedDatasets:
|
|
869
|
+
availableHeight: ce,
|
|
870
|
+
onClickLegend: se,
|
|
871
|
+
onHoverArea: ue,
|
|
872
|
+
onHoverLegend: de,
|
|
873
|
+
onHoverPoint: me,
|
|
874
|
+
stackedDatasets: z.stackedDatasets,
|
|
875
|
+
unstackedDatasets: z.unstackedDatasets
|
|
837
876
|
}
|
|
838
877
|
),
|
|
839
|
-
|
|
840
|
-
|
|
878
|
+
Z === "Table" && /* @__PURE__ */ e(
|
|
879
|
+
Ct,
|
|
841
880
|
{
|
|
842
|
-
onClickRow:
|
|
843
|
-
selectedCategory:
|
|
844
|
-
selectedDateRange:
|
|
881
|
+
onClickRow: te,
|
|
882
|
+
selectedCategory: G,
|
|
883
|
+
selectedDateRange: x
|
|
845
884
|
}
|
|
846
885
|
)
|
|
847
886
|
] })
|
|
@@ -849,27 +888,27 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
849
888
|
}
|
|
850
889
|
),
|
|
851
890
|
/* @__PURE__ */ e(
|
|
852
|
-
|
|
891
|
+
Ao,
|
|
853
892
|
{
|
|
854
|
-
categoryGuid:
|
|
855
|
-
dateRange:
|
|
856
|
-
isOpen:
|
|
857
|
-
onClose: () =>
|
|
893
|
+
categoryGuid: G,
|
|
894
|
+
dateRange: x,
|
|
895
|
+
isOpen: X,
|
|
896
|
+
onClose: () => V(!1)
|
|
858
897
|
}
|
|
859
898
|
)
|
|
860
899
|
]
|
|
861
900
|
}
|
|
862
901
|
);
|
|
863
|
-
},
|
|
864
|
-
const { monthlyCategoryTotals: t } =
|
|
902
|
+
}, rs = A(Ro), ko = () => {
|
|
903
|
+
const { monthlyCategoryTotals: t } = U(), { trends: s } = R(), n = ae(), { availableHeight: o = 300 } = nt(), r = g.useMemo(() => $t(t), [t]);
|
|
865
904
|
return /* @__PURE__ */ e(
|
|
866
|
-
|
|
905
|
+
Ve,
|
|
867
906
|
{
|
|
868
907
|
baseline: "min",
|
|
869
908
|
colors: [n.palette.primary.main],
|
|
870
|
-
datasets: [
|
|
909
|
+
datasets: [r],
|
|
871
910
|
height: o,
|
|
872
|
-
labels: [
|
|
911
|
+
labels: [s.spending_label],
|
|
873
912
|
showArea: !0,
|
|
874
913
|
showAverage: !0,
|
|
875
914
|
showLegend: !0,
|
|
@@ -878,41 +917,41 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
878
917
|
valueFormatterString: "0,0"
|
|
879
918
|
}
|
|
880
919
|
);
|
|
881
|
-
},
|
|
882
|
-
const { isAccountDataLoaded: n, loadAccountData: o } =
|
|
920
|
+
}, Ho = A(ko), No = ({ onPrimaryCtaClick: t, sx: s }) => {
|
|
921
|
+
const { isAccountDataLoaded: n, loadAccountData: o } = De(), { loadMonthlyCategoryTotals: r, monthlyTotalsLoaded: i } = U(), { isInitialized: a } = Be(), { trends: c } = R(), { selectedAccounts: u } = fe();
|
|
883
922
|
return g.useEffect(() => {
|
|
884
923
|
n || o().finally();
|
|
885
|
-
}, []),
|
|
924
|
+
}, []), Ie({
|
|
886
925
|
widgetName: "TrendsMiniWidget",
|
|
887
|
-
isLoaded:
|
|
926
|
+
isLoaded: i
|
|
888
927
|
}), g.useEffect(() => {
|
|
889
|
-
a && n &&
|
|
890
|
-
}, [n, a,
|
|
891
|
-
|
|
928
|
+
a && n && r(u).finally();
|
|
929
|
+
}, [n, a, u]), !n || !a || !i ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
930
|
+
qt,
|
|
892
931
|
{
|
|
893
932
|
contentStyles: { height: "calc(100% - 72px)", minHeight: 300, ":last-child": { pb: 0 } },
|
|
894
933
|
onPrimaryCtaClick: t,
|
|
895
|
-
primaryCtaLabel:
|
|
896
|
-
subTitle:
|
|
897
|
-
sx: { height: "100%", ...
|
|
898
|
-
title:
|
|
899
|
-
children: /* @__PURE__ */ e(
|
|
934
|
+
primaryCtaLabel: c.primary_cta,
|
|
935
|
+
subTitle: c.sub_title,
|
|
936
|
+
sx: { height: "100%", ...s },
|
|
937
|
+
title: c.mini_title,
|
|
938
|
+
children: /* @__PURE__ */ e(Ho, {})
|
|
900
939
|
}
|
|
901
940
|
);
|
|
902
|
-
},
|
|
941
|
+
}, as = A(No), Wo = 70, qe = ({
|
|
903
942
|
title: t,
|
|
904
|
-
totalAmount:
|
|
943
|
+
totalAmount: s,
|
|
905
944
|
transactionType: n,
|
|
906
945
|
percentage: o,
|
|
907
|
-
secondaryLabel:
|
|
908
|
-
shouldDisplayPercentage:
|
|
946
|
+
secondaryLabel: r,
|
|
947
|
+
shouldDisplayPercentage: i
|
|
909
948
|
}) => {
|
|
910
|
-
const { availableWidth: a } =
|
|
949
|
+
const { availableWidth: a } = nt(), c = g.useRef(null), u = g.useRef(null), l = Wt(Number(Math.abs(o)), {
|
|
911
950
|
style: "percent",
|
|
912
951
|
minimumIntegerDigits: 1
|
|
913
|
-
}), y = a === 288 &&
|
|
952
|
+
}), y = a === 288 && re(s, "0,0.00").length > 10 ? re(s, "0,0") : re(s, "0,0.00"), m = n === "spending" ? o > 0 : o >= 0, _ = n === "spending" ? "error.main" : "success.main", h = n === "spending" ? "success.main" : "text.secondary", p = c?.current, f = u?.current, T = p && f ? p.scrollWidth > f.clientWidth - Wo : !1;
|
|
914
953
|
return /* @__PURE__ */ C(
|
|
915
|
-
|
|
954
|
+
S,
|
|
916
955
|
{
|
|
917
956
|
sx: {
|
|
918
957
|
border: 1,
|
|
@@ -925,7 +964,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
925
964
|
},
|
|
926
965
|
children: [
|
|
927
966
|
/* @__PURE__ */ C(
|
|
928
|
-
|
|
967
|
+
S,
|
|
929
968
|
{
|
|
930
969
|
sx: {
|
|
931
970
|
alignItems: "center",
|
|
@@ -933,18 +972,18 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
933
972
|
justifyContent: "space-between"
|
|
934
973
|
},
|
|
935
974
|
children: [
|
|
936
|
-
/* @__PURE__ */ e(
|
|
937
|
-
|
|
938
|
-
m ? /* @__PURE__ */ e(
|
|
975
|
+
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "caption", children: t }),
|
|
976
|
+
i && /* @__PURE__ */ C(S, { sx: { alignItems: "center", flexDirection: "row", gap: 4 }, children: [
|
|
977
|
+
m ? /* @__PURE__ */ e(eo, { size: 20, sx: { color: _ } }) : /* @__PURE__ */ e(to, { size: 20, sx: { color: h } }),
|
|
939
978
|
/* @__PURE__ */ e(
|
|
940
|
-
|
|
979
|
+
pe,
|
|
941
980
|
{
|
|
942
981
|
sx: {
|
|
943
982
|
color: m ? _ : h,
|
|
944
983
|
fontWeight: 600
|
|
945
984
|
},
|
|
946
985
|
variant: "body2",
|
|
947
|
-
children:
|
|
986
|
+
children: l
|
|
948
987
|
}
|
|
949
988
|
)
|
|
950
989
|
] })
|
|
@@ -952,9 +991,9 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
952
991
|
}
|
|
953
992
|
),
|
|
954
993
|
/* @__PURE__ */ C(
|
|
955
|
-
|
|
994
|
+
S,
|
|
956
995
|
{
|
|
957
|
-
ref:
|
|
996
|
+
ref: u,
|
|
958
997
|
sx: {
|
|
959
998
|
alignItems: "center",
|
|
960
999
|
flexDirection: "row",
|
|
@@ -962,19 +1001,19 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
962
1001
|
},
|
|
963
1002
|
children: [
|
|
964
1003
|
/* @__PURE__ */ e(
|
|
965
|
-
|
|
1004
|
+
N,
|
|
966
1005
|
{
|
|
967
|
-
ref:
|
|
1006
|
+
ref: c,
|
|
968
1007
|
sx: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" },
|
|
969
|
-
children: /* @__PURE__ */ e(
|
|
1008
|
+
children: /* @__PURE__ */ e(Ge, { children: y })
|
|
970
1009
|
}
|
|
971
1010
|
),
|
|
972
|
-
|
|
973
|
-
|
|
1011
|
+
i && a >= 450 && !T && /* @__PURE__ */ e(
|
|
1012
|
+
pe,
|
|
974
1013
|
{
|
|
975
1014
|
color: m ? _ : h,
|
|
976
1015
|
variant: "caption",
|
|
977
|
-
children:
|
|
1016
|
+
children: r
|
|
978
1017
|
}
|
|
979
1018
|
)
|
|
980
1019
|
]
|
|
@@ -983,55 +1022,55 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
983
1022
|
]
|
|
984
1023
|
}
|
|
985
1024
|
);
|
|
986
|
-
},
|
|
987
|
-
const { trends: t } =
|
|
988
|
-
return /* @__PURE__ */ C(
|
|
989
|
-
/* @__PURE__ */ e(
|
|
990
|
-
/* @__PURE__ */ C(
|
|
991
|
-
/* @__PURE__ */ e(
|
|
992
|
-
/* @__PURE__ */ e(
|
|
1025
|
+
}, Oo = A(() => {
|
|
1026
|
+
const { trends: t } = R();
|
|
1027
|
+
return /* @__PURE__ */ C(S, { sx: { alignItems: "start", flexDirection: "row", gap: 12 }, children: [
|
|
1028
|
+
/* @__PURE__ */ e(oo, { size: 32 }),
|
|
1029
|
+
/* @__PURE__ */ C(S, { children: [
|
|
1030
|
+
/* @__PURE__ */ e(pe, { fontWeight: 600, variant: "body1", children: t.zero_state_content_header }),
|
|
1031
|
+
/* @__PURE__ */ e(pe, { color: "text.secondary", variant: "subtitle2", children: t.zero_state_content_description })
|
|
993
1032
|
] })
|
|
994
1033
|
] });
|
|
995
|
-
}),
|
|
996
|
-
const { isAccountDataLoaded:
|
|
1034
|
+
}), is = A(({ onCtaClick: t }) => {
|
|
1035
|
+
const { isAccountDataLoaded: s, loadAccountData: n, visibleAccounts: o } = De();
|
|
997
1036
|
g.useEffect(() => {
|
|
998
|
-
|
|
1037
|
+
s || n().finally();
|
|
999
1038
|
}, []);
|
|
1000
|
-
const { onEvent:
|
|
1001
|
-
start:
|
|
1039
|
+
const { onEvent: r } = $(), { monthlyCategoryTotals: i, loadMonthlyCategoryTotals: a, monthlyTotalsLoaded: c } = U(), u = {
|
|
1040
|
+
start: Jt(/* @__PURE__ */ new Date(), 1),
|
|
1002
1041
|
end: /* @__PURE__ */ new Date()
|
|
1003
|
-
}, { trends:
|
|
1004
|
-
|
|
1042
|
+
}, { trends: l } = R(), { selectedAccounts: y, isInitialized: m } = fe();
|
|
1043
|
+
Ie({
|
|
1005
1044
|
widgetName: "TrendsMicroWidget",
|
|
1006
|
-
isLoaded:
|
|
1045
|
+
isLoaded: c
|
|
1007
1046
|
}), g.useEffect(() => {
|
|
1008
|
-
m && a(y,
|
|
1009
|
-
|
|
1047
|
+
m && a(y, u.start).then(() => {
|
|
1048
|
+
r(v.TRENDS_LOAD_WIDGET, {
|
|
1010
1049
|
state: o?.length ? "default" : "zeroState"
|
|
1011
1050
|
});
|
|
1012
1051
|
});
|
|
1013
1052
|
}, [m, y]);
|
|
1014
1053
|
const { spendingData: _, incomeData: h } = g.useMemo(
|
|
1015
1054
|
() => ({
|
|
1016
|
-
spendingData: at(
|
|
1017
|
-
incomeData:
|
|
1055
|
+
spendingData: at(i, u),
|
|
1056
|
+
incomeData: it(i, u)
|
|
1018
1057
|
}),
|
|
1019
|
-
[
|
|
1020
|
-
), [p, f] = _, [
|
|
1021
|
-
|
|
1022
|
-
|
|
1058
|
+
[i, u]
|
|
1059
|
+
), [p, f] = _, [T, x] = h, k = Ye(f.y, p.y), L = Ye(x.y, T.y), E = m && !o?.length, w = () => {
|
|
1060
|
+
r(
|
|
1061
|
+
E ? v.TRENDS_CLICK_GET_STARTED : v.TRENDS_CLICK_VIEW_MORE
|
|
1023
1062
|
), t();
|
|
1024
1063
|
};
|
|
1025
|
-
return !
|
|
1026
|
-
|
|
1064
|
+
return !c || !m ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(
|
|
1065
|
+
io,
|
|
1027
1066
|
{
|
|
1028
1067
|
className: "mx-trends-microwidget",
|
|
1029
|
-
ctaLabel:
|
|
1030
|
-
onCTAClick:
|
|
1031
|
-
subHeader:
|
|
1032
|
-
title:
|
|
1033
|
-
children:
|
|
1034
|
-
|
|
1068
|
+
ctaLabel: l.micro_primary_cta_label,
|
|
1069
|
+
onCTAClick: w,
|
|
1070
|
+
subHeader: E ? void 0 : l.micro_subheader,
|
|
1071
|
+
title: l.title,
|
|
1072
|
+
children: E ? /* @__PURE__ */ e(Oo, {}) : /* @__PURE__ */ C(
|
|
1073
|
+
S,
|
|
1035
1074
|
{
|
|
1036
1075
|
sx: {
|
|
1037
1076
|
alignItems: "stretch",
|
|
@@ -1040,24 +1079,24 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1040
1079
|
},
|
|
1041
1080
|
children: [
|
|
1042
1081
|
/* @__PURE__ */ e(
|
|
1043
|
-
|
|
1082
|
+
qe,
|
|
1044
1083
|
{
|
|
1045
|
-
percentage:
|
|
1046
|
-
secondaryLabel:
|
|
1084
|
+
percentage: k,
|
|
1085
|
+
secondaryLabel: l.micro_secondary_label,
|
|
1047
1086
|
shouldDisplayPercentage: f.y !== 0 && p.y !== 0,
|
|
1048
|
-
title:
|
|
1087
|
+
title: l.spending_label,
|
|
1049
1088
|
totalAmount: f.y,
|
|
1050
1089
|
transactionType: "spending"
|
|
1051
1090
|
}
|
|
1052
1091
|
),
|
|
1053
1092
|
/* @__PURE__ */ e(
|
|
1054
|
-
|
|
1093
|
+
qe,
|
|
1055
1094
|
{
|
|
1056
|
-
percentage:
|
|
1057
|
-
secondaryLabel:
|
|
1058
|
-
shouldDisplayPercentage:
|
|
1059
|
-
title:
|
|
1060
|
-
totalAmount:
|
|
1095
|
+
percentage: L,
|
|
1096
|
+
secondaryLabel: l.micro_secondary_label,
|
|
1097
|
+
shouldDisplayPercentage: x.y !== 0 && T.y !== 0,
|
|
1098
|
+
title: l.income_label,
|
|
1099
|
+
totalAmount: x.y,
|
|
1061
1100
|
transactionType: "income"
|
|
1062
1101
|
}
|
|
1063
1102
|
)
|
|
@@ -1066,17 +1105,17 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1066
1105
|
)
|
|
1067
1106
|
}
|
|
1068
1107
|
);
|
|
1069
|
-
}),
|
|
1070
|
-
({ isExpanded: t, onClick:
|
|
1071
|
-
const n =
|
|
1072
|
-
return /* @__PURE__ */ e(
|
|
1073
|
-
|
|
1108
|
+
}), Go = A(
|
|
1109
|
+
({ isExpanded: t, onClick: s }) => {
|
|
1110
|
+
const n = gt();
|
|
1111
|
+
return /* @__PURE__ */ e(mt, { children: /* @__PURE__ */ e(co, { onClick: s, sx: { justifyContent: "center" }, children: /* @__PURE__ */ C(
|
|
1112
|
+
S,
|
|
1074
1113
|
{
|
|
1075
1114
|
sx: { color: n.palette.primary.main, flexDirection: "row", alignItems: "center" },
|
|
1076
1115
|
children: [
|
|
1077
|
-
/* @__PURE__ */ e(
|
|
1078
|
-
/* @__PURE__ */ e(
|
|
1079
|
-
|
|
1116
|
+
/* @__PURE__ */ e(ht, { children: /* @__PURE__ */ e(F, { bold: !0, variant: "body2", children: t ? "View less" : "View more" }) }),
|
|
1117
|
+
/* @__PURE__ */ e(uo, { sx: { color: n.palette.primary.main }, children: t ? /* @__PURE__ */ e(no, {}) : /* @__PURE__ */ e(
|
|
1118
|
+
so,
|
|
1080
1119
|
{
|
|
1081
1120
|
sx: {
|
|
1082
1121
|
transition: "transform 0.3s ease-in-out",
|
|
@@ -1088,128 +1127,141 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1088
1127
|
}
|
|
1089
1128
|
) }) });
|
|
1090
1129
|
}
|
|
1091
|
-
),
|
|
1130
|
+
), Je = A(
|
|
1092
1131
|
({
|
|
1093
1132
|
totalAmount: t,
|
|
1094
|
-
guid:
|
|
1133
|
+
guid: s,
|
|
1095
1134
|
name: n,
|
|
1096
1135
|
transactions: o,
|
|
1097
|
-
onClick:
|
|
1098
|
-
isLastItem:
|
|
1136
|
+
onClick: r,
|
|
1137
|
+
isLastItem: i = !1,
|
|
1099
1138
|
showDivider: a = !0
|
|
1100
1139
|
}) => {
|
|
1101
|
-
const { trends:
|
|
1102
|
-
|
|
1103
|
-
...
|
|
1140
|
+
const { trends: c } = R(), { onEvent: u } = $(), l = ae(), y = `${o.length} ${o.length === 1 ? c.transaction : c.transactions}`, m = () => {
|
|
1141
|
+
r?.(), u(v.TRENDS_CLICK_LIST_ITEM, {
|
|
1142
|
+
...W,
|
|
1104
1143
|
listItem: n
|
|
1105
1144
|
});
|
|
1106
1145
|
};
|
|
1107
1146
|
return /* @__PURE__ */ C(g.Fragment, { children: [
|
|
1108
1147
|
/* @__PURE__ */ e(
|
|
1109
|
-
|
|
1148
|
+
Bt,
|
|
1110
1149
|
{
|
|
1111
|
-
leftIcon:
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1150
|
+
leftIcon: s ? /* @__PURE__ */ e(
|
|
1151
|
+
we,
|
|
1152
|
+
{
|
|
1153
|
+
categoryGuid: s,
|
|
1154
|
+
sx: {
|
|
1155
|
+
bgcolor: Mt(Oe(s, l), 0.15),
|
|
1156
|
+
border: `1px solid ${Oe(s, l)}`,
|
|
1157
|
+
color: "text.primary"
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
) : void 0,
|
|
1161
|
+
onClick: m,
|
|
1162
|
+
rightContent: re(Math.abs(t), "0,0.00"),
|
|
1163
|
+
rightIcon: r ? /* @__PURE__ */ e(ro, {}) : void 0,
|
|
1164
|
+
subtitle: y,
|
|
1116
1165
|
title: n
|
|
1117
1166
|
}
|
|
1118
1167
|
),
|
|
1119
|
-
a && /* @__PURE__ */ e(Ne, { sx: { ml:
|
|
1120
|
-
] },
|
|
1168
|
+
a && /* @__PURE__ */ e(Ne, { component: "li", sx: { ml: i ? 24 : 68 } })
|
|
1169
|
+
] }, s);
|
|
1121
1170
|
}
|
|
1122
|
-
),
|
|
1123
|
-
({ availableHeight: t = 0, onCategoryClick:
|
|
1124
|
-
const { collapsedCategories: n, visibleCategories: o, setVisibleListLength:
|
|
1171
|
+
), Bo = A(
|
|
1172
|
+
({ availableHeight: t = 0, onCategoryClick: s }) => {
|
|
1173
|
+
const { collapsedCategories: n, visibleCategories: o, setVisibleListLength: r } = ye(), { isLargeDesktop: i, isDesktop: a } = j(), { trends: c } = R(), { onEvent: u } = $(), [l, y] = g.useState(!1), m = a || i;
|
|
1125
1174
|
g.useEffect(() => {
|
|
1126
1175
|
const p = Math.floor(t / 64) - 1, f = o.length + n.length;
|
|
1127
|
-
p !== o.length && (
|
|
1176
|
+
p !== o.length && (r(m ? Math.max(p, 5) : 5), y(p >= f));
|
|
1128
1177
|
}, [t]);
|
|
1129
1178
|
const _ = () => {
|
|
1130
|
-
y(!
|
|
1131
|
-
...
|
|
1179
|
+
y(!l), u(v.TRENDS_CLICK_VIEW_MORE, {
|
|
1180
|
+
...W
|
|
1132
1181
|
});
|
|
1133
|
-
}, h = o.length + (
|
|
1134
|
-
return /* @__PURE__ */
|
|
1135
|
-
/* @__PURE__ */ e(
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1182
|
+
}, h = o.length + (l ? n.length : 0);
|
|
1183
|
+
return /* @__PURE__ */ C(S, { sx: { width: "100%" }, children: [
|
|
1184
|
+
/* @__PURE__ */ e(S, { sx: { pb: 4, pt: 16, px: 16 }, children: /* @__PURE__ */ e(Ge, { children: c.categories }) }),
|
|
1185
|
+
/* @__PURE__ */ C(We, { children: [
|
|
1186
|
+
o.map((p, f) => /* @__PURE__ */ e(
|
|
1187
|
+
Je,
|
|
1188
|
+
{
|
|
1189
|
+
...p,
|
|
1190
|
+
isLastItem: f === h - 1,
|
|
1191
|
+
onClick: p.transactions.length > 0 ? () => s(p) : void 0,
|
|
1192
|
+
showDivider: !0
|
|
1193
|
+
},
|
|
1194
|
+
p.guid
|
|
1195
|
+
)),
|
|
1196
|
+
/* @__PURE__ */ e(
|
|
1197
|
+
lo,
|
|
1198
|
+
{
|
|
1199
|
+
component: "li",
|
|
1200
|
+
in: l,
|
|
1201
|
+
sx: { "&.MuiCollapse-root .MuiListItemButton-root": { paddingLeft: 24 } },
|
|
1202
|
+
children: /* @__PURE__ */ e(We, { children: n.map((p, f) => {
|
|
1203
|
+
const T = o.length + f;
|
|
1204
|
+
return /* @__PURE__ */ e(
|
|
1205
|
+
Je,
|
|
1206
|
+
{
|
|
1207
|
+
...p,
|
|
1208
|
+
isLastItem: T === h - 1,
|
|
1209
|
+
onClick: p.transactions.length > 0 ? () => s(p) : void 0,
|
|
1210
|
+
showDivider: !0
|
|
1211
|
+
},
|
|
1212
|
+
p.guid
|
|
1213
|
+
);
|
|
1214
|
+
}) })
|
|
1215
|
+
}
|
|
1216
|
+
),
|
|
1217
|
+
n.length > 0 && /* @__PURE__ */ e(Go, { isExpanded: l, onClick: _ })
|
|
1218
|
+
] })
|
|
1219
|
+
] });
|
|
1168
1220
|
}
|
|
1169
|
-
),
|
|
1170
|
-
const { onEvent: n } =
|
|
1171
|
-
|
|
1172
|
-
}, h =
|
|
1173
|
-
return /* @__PURE__ */ e(
|
|
1174
|
-
|
|
1221
|
+
), Po = ({ beats: t, onInsightCardClick: s }) => {
|
|
1222
|
+
const { onEvent: n } = $(), { isMobile: o, isDesktop: r, isLargeDesktop: i } = j(), { beatStore: a, endpoint: c, sessionToken: u } = Be(), l = r || i, y = l || o ? 1 : 2, m = () => null, _ = (T) => {
|
|
1223
|
+
s?.(T), n(v.TRENDS_CLICK_INSIGHT, W);
|
|
1224
|
+
}, h = l ? 200 : 170, p = l ? 170 : 124, f = t.length > 0 ? h : p;
|
|
1225
|
+
return /* @__PURE__ */ e(mo, { sx: { height: f }, children: /* @__PURE__ */ e(
|
|
1226
|
+
Yt,
|
|
1175
1227
|
{
|
|
1176
1228
|
areBeatsLoading: a.isLoading,
|
|
1177
1229
|
beats: t,
|
|
1178
|
-
endpoint:
|
|
1230
|
+
endpoint: c,
|
|
1179
1231
|
headerSx: { p: 0 },
|
|
1180
1232
|
logOutUser: m,
|
|
1181
1233
|
onCardClick: _,
|
|
1182
1234
|
showBorder: !0,
|
|
1183
1235
|
showCTAColocatedWithText: !1,
|
|
1184
1236
|
showCarouselControls: !0,
|
|
1185
|
-
showHeader:
|
|
1237
|
+
showHeader: l,
|
|
1186
1238
|
showIcon: !0,
|
|
1187
1239
|
showWithMargin: !1,
|
|
1188
|
-
token:
|
|
1240
|
+
token: u,
|
|
1189
1241
|
userHasFullInsightFeedBeats: !1,
|
|
1190
1242
|
variant: "outlined",
|
|
1191
1243
|
visibleCardsCount: y
|
|
1192
1244
|
}
|
|
1193
1245
|
) });
|
|
1194
|
-
},
|
|
1195
|
-
const { onEvent: n } =
|
|
1196
|
-
categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels:
|
|
1197
|
-
} =
|
|
1198
|
-
return /* @__PURE__ */ e(
|
|
1199
|
-
|
|
1246
|
+
}, Vo = A(Po), Fo = A(({ chartLabel: t, chartColor: s }) => {
|
|
1247
|
+
const { onEvent: n } = $(), {
|
|
1248
|
+
categoryDetailsChartData: { monthlyAmounts: o, tooltipLabels: r }
|
|
1249
|
+
} = ye();
|
|
1250
|
+
return /* @__PURE__ */ e(S, { sx: { pt: 12, width: "100%" }, children: /* @__PURE__ */ e(
|
|
1251
|
+
Ve,
|
|
1200
1252
|
{
|
|
1201
1253
|
baseline: "min",
|
|
1202
|
-
colors: [
|
|
1254
|
+
colors: [s],
|
|
1203
1255
|
curveType: "bump",
|
|
1204
|
-
customTooltipLabels:
|
|
1256
|
+
customTooltipLabels: r,
|
|
1205
1257
|
datasets: [o],
|
|
1206
1258
|
height: 265,
|
|
1207
1259
|
labels: [t],
|
|
1208
1260
|
markStyles: () => ({
|
|
1209
|
-
stroke:
|
|
1261
|
+
stroke: s
|
|
1210
1262
|
}),
|
|
1211
1263
|
onItemClick: () => {
|
|
1212
|
-
n(v.TRENDS_CLICK_CHART,
|
|
1264
|
+
n(v.TRENDS_CLICK_CHART, W);
|
|
1213
1265
|
},
|
|
1214
1266
|
showArea: !0,
|
|
1215
1267
|
showAverage: !0,
|
|
@@ -1224,100 +1276,90 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1224
1276
|
valueFormatterString: "0,0"
|
|
1225
1277
|
}
|
|
1226
1278
|
) });
|
|
1227
|
-
}),
|
|
1228
|
-
const
|
|
1229
|
-
if (!
|
|
1279
|
+
}), $o = A(() => {
|
|
1280
|
+
const t = gt(), { is_mobile_webview: s } = st(), { isDesktop: n, isSmallTablet: o, isTablet: r } = j(), { common: i, trends: a } = R(), { selectedCategoryData: c, selectedDateRangeMonthRange: u } = ye(), { sortedTransactions: l } = ve(), [y, m] = g.useState(null);
|
|
1281
|
+
if (!c)
|
|
1230
1282
|
return null;
|
|
1231
|
-
const { guid:
|
|
1232
|
-
() =>
|
|
1233
|
-
[
|
|
1234
|
-
),
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
{
|
|
1240
|
-
ariaLabelClose: d.close_category_details,
|
|
1241
|
-
isOpen: !0,
|
|
1242
|
-
onClose: K,
|
|
1243
|
-
shouldShowHeaderShadow: !0,
|
|
1244
|
-
title: R,
|
|
1245
|
-
children: [
|
|
1246
|
-
/* @__PURE__ */ C(w, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1247
|
-
/* @__PURE__ */ C(ao, { sx: { borderRadius: 0, pb: 4, pt: 16, width: "100%" }, children: [
|
|
1248
|
-
/* @__PURE__ */ e(
|
|
1249
|
-
st,
|
|
1250
|
-
{
|
|
1251
|
-
leftIcon: /* @__PURE__ */ e(ve, { categoryGuid: p }),
|
|
1252
|
-
rightContent: oe(Math.abs(b), "0,0.00"),
|
|
1253
|
-
subtitle: y,
|
|
1254
|
-
title: f
|
|
1255
|
-
}
|
|
1256
|
-
),
|
|
1257
|
-
/* @__PURE__ */ e(Ho, { chartColor: E, chartLabel: S }),
|
|
1258
|
-
/* @__PURE__ */ C(w, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 24 }, children: [
|
|
1259
|
-
/* @__PURE__ */ e(Q, { bold: !0, variant: "body1", children: k }),
|
|
1260
|
-
$ && /* @__PURE__ */ e(lo, { filter: P })
|
|
1261
|
-
] })
|
|
1262
|
-
] }),
|
|
1263
|
-
/* @__PURE__ */ e(
|
|
1264
|
-
lt,
|
|
1265
|
-
{
|
|
1266
|
-
bgcolor: "transparent",
|
|
1267
|
-
filter: P,
|
|
1268
|
-
height: "calc(100vh - 475px)",
|
|
1269
|
-
onClick: h
|
|
1270
|
-
}
|
|
1271
|
-
)
|
|
1272
|
-
] }),
|
|
1283
|
+
const { guid: _, name: h, is_income: p, totalAmount: f } = c, T = Oe(_, t), x = p ? a.income_label : a.spending_label, k = ` ${c.transactions.length === 1 ? a.transaction : a.transactions} (${c.transactions.length})`, L = g.useMemo(
|
|
1284
|
+
() => l.find((M) => M.guid === y),
|
|
1285
|
+
[y, l]
|
|
1286
|
+
), E = l.length > 0 && !s && (n || r && !o), w = (M) => M.category_guid === _ || M.top_level_category_guid === _;
|
|
1287
|
+
return /* @__PURE__ */ C(S, { sx: { alignItems: "center", height: "100%" }, children: [
|
|
1288
|
+
/* @__PURE__ */ C(S, { sx: { borderRadius: 0, pb: 4, pt: 16, px: 12, width: "100%" }, children: [
|
|
1289
|
+
/* @__PURE__ */ e(We, { sx: { px: 12 }, children: /* @__PURE__ */ C(mt, { children: [
|
|
1290
|
+
/* @__PURE__ */ e(ho, { children: /* @__PURE__ */ e(we, { categoryGuid: _ }) }),
|
|
1273
1291
|
/* @__PURE__ */ e(
|
|
1274
|
-
|
|
1292
|
+
ht,
|
|
1275
1293
|
{
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
children: H && /* @__PURE__ */ e(ct, { transaction: H })
|
|
1294
|
+
primary: h,
|
|
1295
|
+
primaryTypographyProps: { component: "div", variant: "h3" },
|
|
1296
|
+
secondary: u,
|
|
1297
|
+
secondaryTypographyProps: { component: "div", variant: "body2" }
|
|
1281
1298
|
}
|
|
1282
|
-
)
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1299
|
+
),
|
|
1300
|
+
/* @__PURE__ */ e(F, { component: "div", variant: "h3", children: re(Math.abs(f), "0,0.00") })
|
|
1301
|
+
] }) }),
|
|
1302
|
+
/* @__PURE__ */ e(Fo, { chartColor: T, chartLabel: x }),
|
|
1303
|
+
/* @__PURE__ */ C(S, { alignItems: "center", direction: "row", justifyContent: "space-between", sx: { mx: 12 }, children: [
|
|
1304
|
+
/* @__PURE__ */ e(F, { bold: !0, variant: "body1", children: k }),
|
|
1305
|
+
E && /* @__PURE__ */ e(go, { filter: w })
|
|
1306
|
+
] })
|
|
1307
|
+
] }),
|
|
1308
|
+
/* @__PURE__ */ e(
|
|
1309
|
+
ct,
|
|
1310
|
+
{
|
|
1311
|
+
bgcolor: "transparent",
|
|
1312
|
+
filter: w,
|
|
1313
|
+
height: "calc(100vh - 475px)",
|
|
1314
|
+
onClick: m
|
|
1315
|
+
}
|
|
1316
|
+
),
|
|
1317
|
+
/* @__PURE__ */ e(
|
|
1318
|
+
Pe,
|
|
1319
|
+
{
|
|
1320
|
+
ariaLabelClose: i.close_aria,
|
|
1321
|
+
isOpen: !!L,
|
|
1322
|
+
onClose: () => m(""),
|
|
1323
|
+
title: a.transaction,
|
|
1324
|
+
children: L && /* @__PURE__ */ e(dt, { transaction: L })
|
|
1325
|
+
}
|
|
1326
|
+
)
|
|
1327
|
+
] });
|
|
1328
|
+
}), zo = (t, s) => {
|
|
1329
|
+
const n = it(t, s), o = at(t, s);
|
|
1330
|
+
return [n, o].filter((r) => r.length > 0);
|
|
1331
|
+
}, Ko = (t, s) => {
|
|
1332
|
+
const [n, o] = t, r = n, i = o ?? n, a = [];
|
|
1333
|
+
if (r) {
|
|
1334
|
+
const c = r.reduce((u, l) => u + l.y, 0);
|
|
1335
|
+
a.push({ label: s.income_label, amount: c });
|
|
1294
1336
|
}
|
|
1295
|
-
if (
|
|
1296
|
-
const
|
|
1297
|
-
a.push({ label:
|
|
1337
|
+
if (i) {
|
|
1338
|
+
const c = i.reduce((u, l) => u + l.y, 0);
|
|
1339
|
+
a.push({ label: s.spending_label, amount: c });
|
|
1298
1340
|
}
|
|
1299
1341
|
return a;
|
|
1300
|
-
},
|
|
1342
|
+
}, Yo = ({
|
|
1301
1343
|
availableHeight: t = 0,
|
|
1302
|
-
minHeight:
|
|
1344
|
+
minHeight: s = 500,
|
|
1303
1345
|
selectedDateRange: n,
|
|
1304
1346
|
totals: o
|
|
1305
1347
|
}) => {
|
|
1306
|
-
const
|
|
1348
|
+
const r = ae(), { onEvent: i } = $(), { trends: a } = R(), { isSmallMobile: c, isMobile: u, isSmallTablet: l, isTablet: y } = j(), m = [r.palette.chart?.chart1, r.palette.chart?.chart2], _ = zo(o, n), h = Ko(_, a), [p, f] = g.useState(0), T = 458, x = 195, k = 56, L = u || c ? x : l || y ? T : p;
|
|
1307
1349
|
return g.useEffect(() => {
|
|
1308
|
-
const
|
|
1309
|
-
f(
|
|
1350
|
+
const w = Math.max(t - k, s);
|
|
1351
|
+
f(w);
|
|
1310
1352
|
}, [t]), /* @__PURE__ */ e(
|
|
1311
|
-
|
|
1353
|
+
Ve,
|
|
1312
1354
|
{
|
|
1313
1355
|
baseline: "min",
|
|
1314
1356
|
colors: m,
|
|
1315
1357
|
curveType: "bump",
|
|
1316
1358
|
datasets: _,
|
|
1317
|
-
height:
|
|
1359
|
+
height: L,
|
|
1318
1360
|
labels: h,
|
|
1319
1361
|
onItemClick: () => {
|
|
1320
|
-
|
|
1362
|
+
i(v.TRENDS_CLICK_CHART, W);
|
|
1321
1363
|
},
|
|
1322
1364
|
showArea: !0,
|
|
1323
1365
|
showAxisHighlight: !0,
|
|
@@ -1330,7 +1372,7 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1330
1372
|
valueFormatterString: "0.0a"
|
|
1331
1373
|
}
|
|
1332
1374
|
);
|
|
1333
|
-
},
|
|
1375
|
+
}, jo = A(Yo), Uo = [
|
|
1334
1376
|
"BillAmountNotStandard",
|
|
1335
1377
|
"CategorySpendingV2",
|
|
1336
1378
|
"CostOfLivingToIncome",
|
|
@@ -1364,193 +1406,204 @@ const ht = ({ categoryGuid: t, topLevelCategoryGuid: r }) => {
|
|
|
1364
1406
|
"WeeklyNewMerchantsV2",
|
|
1365
1407
|
"WeeklyNoSpendDays",
|
|
1366
1408
|
"WeeklySmallPurchasesSummary"
|
|
1367
|
-
],
|
|
1368
|
-
|
|
1409
|
+
], Xo = (t, s, n) => ({
|
|
1410
|
+
description: s ? t.empty_state_sub_text : t.empty_state_sub_text_no_aggregation,
|
|
1411
|
+
header: s ? t.zero_state_content_header : t.zero_state_content_header_no_aggregation,
|
|
1412
|
+
onClickHandler: s ? n : void 0,
|
|
1413
|
+
primaryButton: s ? t.empty_state_primary : void 0
|
|
1414
|
+
}), Zo = ({ onBackClick: t, onInsightCardClick: s, sx: n }) => {
|
|
1415
|
+
const { onEvent: o } = $(), { config: r } = st(), { isDesktop: i, isLargeDesktop: a, isMobile: c } = j(), { isAccountDataLoaded: u, loadAccountData: l, visibleAccounts: y } = De(), {
|
|
1369
1416
|
categoriesLoaded: m,
|
|
1370
1417
|
loadCategories: _,
|
|
1371
1418
|
loadDateRangeCategoryTotals: h,
|
|
1372
1419
|
loadMonthlyCategoryTotals: p,
|
|
1373
1420
|
monthlyCategoryTotals: f,
|
|
1374
|
-
monthlyTotalsLoaded:
|
|
1375
|
-
} =
|
|
1376
|
-
|
|
1421
|
+
monthlyTotalsLoaded: T
|
|
1422
|
+
} = U(), { isTransactionDataLoaded: x, loadTransactionData: k, setFilter: L } = ve(), { selectedCategoryData: E, selectedDateRange: w, setSelectedCategoryData: M, setSelectedDateRange: ie } = ye(), { isInitialized: X, selectedAccounts: V, selectedAccountGuids: Z } = fe(), { trends: O, connect: G } = R(), { beatStore: Q } = Be(), le = po() && r.show_insights_widget_in_master, q = i || a, [ce, z] = g.useState(!1), [J, ne] = g.useState(!1), [ee, te] = g.useState("Chart"), [se, de] = g.useState(""), [ue, me] = g.useState(window.innerHeight), D = q ? 56 : 0, B = ue - 208, d = ue - (le ? 550 + D : 266), [b, I] = g.useState(!1), K = r.show_connections_widget_in_master;
|
|
1423
|
+
Ie({
|
|
1377
1424
|
widgetName: "TrendsWidget",
|
|
1378
|
-
isLoaded:
|
|
1425
|
+
isLoaded: ce
|
|
1379
1426
|
});
|
|
1380
|
-
const
|
|
1427
|
+
const _e = g.useMemo(() => J ? Q.getFilteredBeats({ templates: Uo }) : [], [J]);
|
|
1381
1428
|
g.useEffect(() => {
|
|
1382
|
-
const
|
|
1383
|
-
return window.addEventListener("resize",
|
|
1429
|
+
const H = () => me(window.innerHeight);
|
|
1430
|
+
return window.addEventListener("resize", H), u || l().finally(), m || _().finally(), x || k().finally(), () => window.removeEventListener("resize", H);
|
|
1384
1431
|
}, []), g.useEffect(() => {
|
|
1385
|
-
|
|
1432
|
+
X && u && (Q.loadBeats().finally(() => ne(!0)), h(V, w.start, w.end).then(() => {
|
|
1386
1433
|
p(
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
);
|
|
1434
|
+
V,
|
|
1435
|
+
w.start,
|
|
1436
|
+
w.end
|
|
1437
|
+
).finally();
|
|
1391
1438
|
}).finally(() => {
|
|
1392
|
-
|
|
1393
|
-
...
|
|
1394
|
-
time_period: `${
|
|
1439
|
+
z(!0), o(v.TRENDS_LOAD_WIDGET, {
|
|
1440
|
+
...W,
|
|
1441
|
+
time_period: `${Se(w.end, w.start)}M`
|
|
1395
1442
|
});
|
|
1396
1443
|
}));
|
|
1397
|
-
}, [
|
|
1444
|
+
}, [X, u, V, w]), g.useEffect(() => {
|
|
1398
1445
|
if (f.length !== 0) {
|
|
1399
|
-
const
|
|
1400
|
-
accounts:
|
|
1401
|
-
dateRange: { start:
|
|
1446
|
+
const H = {
|
|
1447
|
+
accounts: Z,
|
|
1448
|
+
dateRange: { start: w.start, end: w.end }
|
|
1402
1449
|
};
|
|
1403
|
-
|
|
1404
|
-
...
|
|
1405
|
-
custom: (
|
|
1406
|
-
(
|
|
1450
|
+
L({
|
|
1451
|
+
...H,
|
|
1452
|
+
custom: (oe) => !!f.find(
|
|
1453
|
+
(ge) => ge.top_level_category_guid === oe.top_level_category_guid || ge.category_guid === oe.category_guid
|
|
1407
1454
|
)
|
|
1408
1455
|
});
|
|
1409
1456
|
}
|
|
1410
1457
|
}, [f]);
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1458
|
+
const Ee = (H) => {
|
|
1459
|
+
M(H);
|
|
1460
|
+
}, he = () => {
|
|
1461
|
+
M(null), o(v.TRENDS_CLICK_BACK, W);
|
|
1413
1462
|
}, Me = () => {
|
|
1414
|
-
|
|
1415
|
-
}, Ae = () => {
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
...G,
|
|
1420
|
-
toggleView: ee
|
|
1463
|
+
I(!0), o(v.TRENDS_CLICK_CONNECT_ACCOUNTS);
|
|
1464
|
+
}, Ae = (H, oe) => {
|
|
1465
|
+
te(oe ?? ee), o(v.TRENDS_CLICK_TOGGLE_VIEW, {
|
|
1466
|
+
...W,
|
|
1467
|
+
toggleView: oe
|
|
1421
1468
|
});
|
|
1422
|
-
},
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1425
|
-
...
|
|
1426
|
-
time_period:
|
|
1469
|
+
}, _t = (H) => {
|
|
1470
|
+
const oe = et(H?.[0], 1), ge = H?.[1], xt = Se(ge, oe);
|
|
1471
|
+
ie({ start: oe, end: ge }), o(v.TRENDS_CLICK_TIME_WINDOW, {
|
|
1472
|
+
...W,
|
|
1473
|
+
time_period: xt + "M"
|
|
1427
1474
|
});
|
|
1428
|
-
},
|
|
1475
|
+
}, bt = (H) => {
|
|
1429
1476
|
o(v.TRENDS_CLICK_FILTER, {
|
|
1430
|
-
...
|
|
1431
|
-
filterValue:
|
|
1477
|
+
...W,
|
|
1478
|
+
filterValue: H
|
|
1432
1479
|
});
|
|
1433
|
-
},
|
|
1434
|
-
|
|
1435
|
-
},
|
|
1436
|
-
|
|
1437
|
-
};
|
|
1438
|
-
if (!$ || !ue || !x) return /* @__PURE__ */ e(Ie, {});
|
|
1439
|
-
const Pe = y && y.length === 0 || f.length === 0, be = {
|
|
1440
|
-
description: ce ? I.empty_state_sub_text : I.empty_state_sub_text_no_aggregation,
|
|
1441
|
-
header: ce ? I.zero_state_content_header : I.zero_state_content_header_no_aggregation,
|
|
1442
|
-
onClick: ce ? Ae : void 0,
|
|
1443
|
-
primaryButton: ce ? I.empty_state_primary : void 0
|
|
1480
|
+
}, Tt = (H) => {
|
|
1481
|
+
de(H);
|
|
1482
|
+
}, St = () => {
|
|
1483
|
+
de(""), o(v.TRENDS_CLICK_ALL_CATEGORIES, W);
|
|
1444
1484
|
};
|
|
1485
|
+
if (!X || !u || !ce || !T)
|
|
1486
|
+
return /* @__PURE__ */ e(Le, {});
|
|
1487
|
+
const Fe = y.length === 0 || f.length === 0, be = Xo(O, K, Me);
|
|
1445
1488
|
return /* @__PURE__ */ C(
|
|
1446
|
-
|
|
1489
|
+
ut,
|
|
1447
1490
|
{
|
|
1448
|
-
calendarActions: { onRangeChanged:
|
|
1449
|
-
dateRange:
|
|
1450
|
-
dateRangeVariant:
|
|
1451
|
-
onAccountsFilterClick:
|
|
1491
|
+
calendarActions: { onRangeChanged: _t },
|
|
1492
|
+
dateRange: w,
|
|
1493
|
+
dateRangeVariant: c ? "timeframetabs" : "timeframebuttons",
|
|
1494
|
+
onAccountsFilterClick: bt,
|
|
1452
1495
|
onBackClick: t,
|
|
1453
1496
|
sx: n,
|
|
1454
|
-
title:
|
|
1497
|
+
title: O.title,
|
|
1455
1498
|
children: [
|
|
1456
1499
|
/* @__PURE__ */ C(
|
|
1457
|
-
|
|
1500
|
+
S,
|
|
1458
1501
|
{
|
|
1459
1502
|
sx: {
|
|
1460
|
-
px:
|
|
1503
|
+
px: c ? 0 : 48
|
|
1461
1504
|
},
|
|
1462
1505
|
children: [
|
|
1463
1506
|
/* @__PURE__ */ C(
|
|
1464
|
-
|
|
1507
|
+
S,
|
|
1465
1508
|
{
|
|
1466
1509
|
flexDirection: "row",
|
|
1467
1510
|
justifyContent: "space-between",
|
|
1468
|
-
sx: { px:
|
|
1511
|
+
sx: { px: c ? 16 : 0, py: 16 },
|
|
1469
1512
|
children: [
|
|
1470
1513
|
/* @__PURE__ */ e(
|
|
1471
|
-
|
|
1514
|
+
yt,
|
|
1472
1515
|
{
|
|
1473
|
-
selectedCategoryGuid:
|
|
1474
|
-
selectedDateRange:
|
|
1516
|
+
selectedCategoryGuid: se,
|
|
1517
|
+
selectedDateRange: w
|
|
1475
1518
|
}
|
|
1476
1519
|
),
|
|
1477
|
-
/* @__PURE__ */ e(
|
|
1520
|
+
/* @__PURE__ */ e(ft, { onTabChange: Ae, selectedTab: ee })
|
|
1478
1521
|
]
|
|
1479
1522
|
}
|
|
1480
1523
|
),
|
|
1481
|
-
/* @__PURE__ */ e(
|
|
1482
|
-
/* @__PURE__ */ e(
|
|
1483
|
-
|
|
1524
|
+
/* @__PURE__ */ e(S, { alignItems: "center", flexDirection: "row", sx: { pb: 8 }, width: "100%", children: /* @__PURE__ */ e(N, { flexGrow: 1, children: se && /* @__PURE__ */ C(Te, { onClick: St, sx: { p: 0, pr: 5 }, children: [
|
|
1525
|
+
/* @__PURE__ */ e(ao, {}),
|
|
1526
|
+
O.all_categories
|
|
1484
1527
|
] }) }) }),
|
|
1485
|
-
|
|
1486
|
-
|
|
1528
|
+
Fe && /* @__PURE__ */ e(
|
|
1529
|
+
fo,
|
|
1487
1530
|
{
|
|
1488
1531
|
header: be.header,
|
|
1489
1532
|
icon: "multiline_chart",
|
|
1490
|
-
onClick: be.
|
|
1533
|
+
onClick: be.onClickHandler,
|
|
1491
1534
|
primaryButton: be.primaryButton,
|
|
1492
1535
|
subText: be.description,
|
|
1493
|
-
sx: { height:
|
|
1536
|
+
sx: { height: B, maxWidth: 432 }
|
|
1494
1537
|
}
|
|
1495
1538
|
),
|
|
1496
|
-
!
|
|
1497
|
-
|
|
1498
|
-
/* @__PURE__ */ e(
|
|
1499
|
-
|
|
1539
|
+
!Fe && /* @__PURE__ */ C(S, { flexDirection: q ? "row" : "column", gap: q ? 48 : 16, children: [
|
|
1540
|
+
ee === "Chart" && /* @__PURE__ */ C(wt, { children: [
|
|
1541
|
+
/* @__PURE__ */ e(N, { sx: { width: q ? "68%" : "100%" }, children: /* @__PURE__ */ e(
|
|
1542
|
+
jo,
|
|
1500
1543
|
{
|
|
1501
|
-
availableHeight:
|
|
1544
|
+
availableHeight: B,
|
|
1502
1545
|
minHeight: 450,
|
|
1503
|
-
selectedDateRange:
|
|
1546
|
+
selectedDateRange: w,
|
|
1504
1547
|
totals: f
|
|
1505
1548
|
}
|
|
1506
1549
|
) }),
|
|
1507
|
-
/* @__PURE__ */ C(
|
|
1508
|
-
|
|
1509
|
-
|
|
1550
|
+
/* @__PURE__ */ C(S, { gap: 16, sx: { width: q ? "32%" : "100%" }, children: [
|
|
1551
|
+
le && J && _e.length > 0 && /* @__PURE__ */ e(
|
|
1552
|
+
Vo,
|
|
1510
1553
|
{
|
|
1511
|
-
beats:
|
|
1512
|
-
onInsightCardClick:
|
|
1554
|
+
beats: _e,
|
|
1555
|
+
onInsightCardClick: s
|
|
1513
1556
|
}
|
|
1514
1557
|
),
|
|
1515
1558
|
/* @__PURE__ */ e(
|
|
1516
|
-
|
|
1559
|
+
Bo,
|
|
1517
1560
|
{
|
|
1518
|
-
availableHeight:
|
|
1519
|
-
onCategoryClick:
|
|
1561
|
+
availableHeight: d,
|
|
1562
|
+
onCategoryClick: Ee
|
|
1520
1563
|
}
|
|
1521
1564
|
)
|
|
1522
1565
|
] })
|
|
1523
1566
|
] }),
|
|
1524
|
-
|
|
1525
|
-
|
|
1567
|
+
ee === "Table" && /* @__PURE__ */ e(N, { sx: { width: "100%" }, children: /* @__PURE__ */ e(
|
|
1568
|
+
Ct,
|
|
1526
1569
|
{
|
|
1527
1570
|
height: "unset",
|
|
1528
|
-
onClickRow:
|
|
1529
|
-
selectedCategory:
|
|
1530
|
-
selectedDateRange:
|
|
1571
|
+
onClickRow: Tt,
|
|
1572
|
+
selectedCategory: se,
|
|
1573
|
+
selectedDateRange: w
|
|
1531
1574
|
}
|
|
1532
1575
|
) })
|
|
1533
1576
|
] }),
|
|
1534
|
-
|
|
1577
|
+
/* @__PURE__ */ e(
|
|
1578
|
+
Pe,
|
|
1579
|
+
{
|
|
1580
|
+
ariaLabelClose: O.close_category_details,
|
|
1581
|
+
isOpen: !!E,
|
|
1582
|
+
onClose: he,
|
|
1583
|
+
shouldShowHeaderShadow: !0,
|
|
1584
|
+
title: E?.is_income ? O.category_income : O.category_spending,
|
|
1585
|
+
children: E && /* @__PURE__ */ e($o, {})
|
|
1586
|
+
}
|
|
1587
|
+
)
|
|
1535
1588
|
]
|
|
1536
1589
|
}
|
|
1537
1590
|
),
|
|
1538
1591
|
/* @__PURE__ */ e(
|
|
1539
|
-
|
|
1592
|
+
yo,
|
|
1540
1593
|
{
|
|
1541
|
-
onClose: () =>
|
|
1542
|
-
showConnectWidget:
|
|
1543
|
-
title:
|
|
1594
|
+
onClose: () => I(!1),
|
|
1595
|
+
showConnectWidget: b,
|
|
1596
|
+
title: G.mini_title
|
|
1544
1597
|
}
|
|
1545
1598
|
)
|
|
1546
1599
|
]
|
|
1547
1600
|
}
|
|
1548
1601
|
);
|
|
1549
|
-
},
|
|
1602
|
+
}, ls = A(Zo);
|
|
1550
1603
|
export {
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1604
|
+
rs as TrendsFullWidget,
|
|
1605
|
+
is as TrendsMicroWidget,
|
|
1606
|
+
as as TrendsMiniWidget,
|
|
1607
|
+
us as TrendsStore,
|
|
1608
|
+
ls as TrendsWidget
|
|
1556
1609
|
};
|