@mx-cartographer/experiences 9.3.0-alpha.bb2 → 9.3.0
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 +42 -0
- package/dist/accounts/AccountsMiniWidget.es.js.map +1 -1
- package/dist/accounts/AccountsWidget.es.js.map +1 -1
- package/dist/accounts/ConnectMiniWidget.es.js.map +1 -1
- package/dist/accounts/components/AccountListItem.es.js.map +1 -1
- package/dist/accounts/components/AccountsList.es.js.map +1 -1
- package/dist/accounts/components/AccountsListCompact.es.js.map +1 -1
- package/dist/accounts/components/ConnectImage.es.js.map +1 -1
- package/dist/accounts/components/ConnectMiniWidgetCard.es.js.map +1 -1
- package/dist/accounts/components/ConnectionStatusIcons.es.js.map +1 -1
- package/dist/accounts/components/ConnectionsDrawer.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActions.es.js +40 -37
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActions.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountActionsRow.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountConnection.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetails.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.es.js.map +1 -1
- package/dist/accounts/components/detailsdrawer/Transactions/TransactionsTab.es.js.map +1 -1
- package/dist/accounts/utils/AccountFields.es.js +4 -1
- package/dist/accounts/utils/AccountFields.es.js.map +1 -1
- package/dist/analytics/SurveyMiniWidget.es.js.map +1 -1
- package/dist/analytics/components/RatingScale.es.js.map +1 -1
- package/dist/budgets/BubbleBudgetsMiniWidget.es.js +46 -44
- package/dist/budgets/BubbleBudgetsMiniWidget.es.js.map +1 -1
- package/dist/budgets/BubbleBudgetsWidget.es.js.map +1 -1
- package/dist/budgets/components/AddBudgets.es.js.map +1 -1
- package/dist/budgets/components/BubbleBudgets.es.js.map +1 -1
- package/dist/budgets/components/BubbleChart.es.js +12 -12
- package/dist/budgets/components/BubbleChart.es.js.map +1 -1
- package/dist/budgets/components/BudgetDetailsDrawer.es.js.map +1 -1
- package/dist/budgets/components/BudgetDetailsDrawerV2.es.js.map +1 -1
- package/dist/budgets/components/BudgetList.es.js.map +1 -1
- package/dist/budgets/components/MerchantBudgetDetailsDrawer.es.js.map +1 -1
- package/dist/budgets/components/Overview.es.js.map +1 -1
- package/dist/budgets/components/addbudget/Header.es.js.map +1 -1
- package/dist/budgets/components/addbudget/RecalculateBudgets.es.js.map +1 -1
- package/dist/budgets/components/addbudget/UnbudgetedRow.es.js.map +1 -1
- package/dist/budgets/components/bubblechart/Bubble.es.js.map +1 -1
- package/dist/budgets/components/bubblechart/Mercury.es.js +13 -11
- package/dist/budgets/components/bubblechart/Mercury.es.js.map +1 -1
- package/dist/budgets/components/budgetdetails/AddSubBudget.es.js.map +1 -1
- package/dist/budgets/components/budgetdetails/BudgetDetails.es.js.map +1 -1
- package/dist/budgets/components/budgetdetails/Header.es.js.map +1 -1
- package/dist/budgets/components/budgetdetails/SubBudgetList.es.js.map +1 -1
- package/dist/budgets/components/budgetlist/BudgetRow.es.js.map +1 -1
- package/dist/budgets/components/budgetlist/SubBudgetRow.es.js.map +1 -1
- package/dist/budgets/components/budgetlist/SubBudgetZeroState.es.js.map +1 -1
- package/dist/budgets/components/shared/BudgetAmount.es.js.map +1 -1
- package/dist/budgets/components/shared/BudgetDetailsTopSection.es.js.map +1 -1
- package/dist/budgets/utils/BubblesSVG.es.js +10 -10
- package/dist/budgets/utils/BubblesSVG.es.js.map +1 -1
- package/dist/cashflow/CashflowMiniWidget.es.js.map +1 -1
- package/dist/cashflow/CashflowOnboarding.es.js.map +1 -1
- package/dist/cashflow/CashflowWidget.es.js.map +1 -1
- package/dist/cashflow/components/CashflowAmountHeading.es.js.map +1 -1
- package/dist/cashflow/components/CashflowContent.es.js.map +1 -1
- package/dist/cashflow/components/CashflowHeading.es.js.map +1 -1
- package/dist/cashflow/components/CashflowWidgetContent.es.js.map +1 -1
- package/dist/cashflow/components/DetailsExpenseHeader.es.js.map +1 -1
- package/dist/cashflow/components/DetailsExpenseRow.es.js.map +1 -1
- package/dist/cashflow/components/DetailsFooter.es.js.map +1 -1
- package/dist/cashflow/components/DetailsTab.es.js.map +1 -1
- package/dist/cashflow/components/RemainingCash.es.js.map +1 -1
- package/dist/cashflow/components/SummaryTab.es.js.map +1 -1
- package/dist/cashflow/components/onboarding/StepOne.es.js.map +1 -1
- package/dist/cashflow/components/onboarding/StepTwo.es.js.map +1 -1
- package/dist/categories/components/CategoryList.es.js +24 -24
- package/dist/categories/components/CategoryList.es.js.map +1 -1
- package/dist/categories/components/CategoryRow.es.js +6 -6
- package/dist/categories/components/CategoryRow.es.js.map +1 -1
- package/dist/categories/components/CategorySelector.es.js +36 -32
- package/dist/categories/components/CategorySelector.es.js.map +1 -1
- package/dist/categories/components/CategorySelectorDrawer.es.js.map +1 -1
- package/dist/categories/components/CustomCategories/AddSubcategory.es.js.map +1 -1
- package/dist/categories/components/CustomCategories/CustomCategoryModal.es.js +0 -1
- package/dist/categories/components/CustomCategories/CustomCategoryModal.es.js.map +1 -1
- package/dist/categories/components/SubcategoryList.es.js.map +1 -1
- package/dist/categories/components/SubcategoryRow.es.js.map +1 -1
- package/dist/common/components/Banner.es.js.map +1 -1
- package/dist/common/components/ConnectCard.es.js.map +1 -1
- package/dist/common/components/ConnectDrawer.es.js.map +1 -1
- package/dist/common/components/ConnectStatus.es.js.map +1 -1
- package/dist/common/components/CurrencyDialog.es.js.map +1 -1
- package/dist/common/components/CurrencyInput.es.js +11 -11
- package/dist/common/components/CurrencyText.es.js.map +1 -1
- package/dist/common/components/DataRow.es.js +7 -7
- package/dist/common/components/DataRow.es.js.map +1 -1
- package/dist/common/components/EmptyState.es.js.map +1 -1
- package/dist/common/components/Error.es.js.map +1 -1
- package/dist/common/components/ErrorBoundary.es.js.map +1 -1
- package/dist/common/components/GlobalAccountFilter.es.js.map +1 -1
- package/dist/common/components/IconBacking.es.js.map +1 -1
- package/dist/common/components/InformationTooltip.es.js.map +1 -1
- package/dist/common/components/ListItemAction.es.js.map +1 -1
- package/dist/common/components/ListItemRow.es.js +1 -1
- package/dist/common/components/ListItemRow.es.js.map +1 -1
- package/dist/common/components/ListItemWrapper.es.js.map +1 -1
- package/dist/common/components/Loader.es.js.map +1 -1
- package/dist/common/components/MicroWidgetContainer.es.js.map +1 -1
- package/dist/common/components/MiniWidgetContainer.es.js.map +1 -1
- package/dist/common/components/ResponsiveButton.es.js.map +1 -1
- package/dist/common/components/SearchBox.es.js.map +1 -1
- package/dist/common/components/Select.es.js.map +1 -1
- package/dist/common/components/SelectionBox.es.js.map +1 -1
- package/dist/common/components/SkeletonLoader.es.js.map +1 -1
- package/dist/common/components/SubheaderRow.es.js.map +1 -1
- package/dist/common/components/TabContentContainer.es.js.map +1 -1
- package/dist/common/components/TinyBarChart.es.js.map +1 -1
- package/dist/common/components/WidgetContainer.es.js.map +1 -1
- package/dist/common/components/WidgetDateRangeSelector.es.js +28 -28
- package/dist/common/components/WidgetDateRangeSelector.es.js.map +1 -1
- package/dist/common/components/addaccounts/AddAccounts.es.js +13 -13
- package/dist/common/components/addaccounts/AddAccounts.es.js.map +1 -1
- package/dist/common/components/calendar/Calendar.es.js.map +1 -1
- package/dist/common/components/calendar/Day.es.js.map +1 -1
- package/dist/common/components/calendar/Header.es.js +26 -23
- package/dist/common/components/calendar/Header.es.js.map +1 -1
- package/dist/common/components/charts/Donut.es.js.map +1 -1
- package/dist/common/components/charts/LineChart.es.js.map +1 -1
- package/dist/common/components/charts/StackedLineChart.es.js.map +1 -1
- package/dist/common/components/charts/StatusBar.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomLegend.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomLine.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomMark.es.js.map +1 -1
- package/dist/common/components/charts/linechart/CustomTooltip.es.js.map +1 -1
- package/dist/common/components/charts/stackedlinechart/CategoryIconLabel.es.js.map +1 -1
- package/dist/common/components/charts/stackedlinechart/CustomAreaTooltip.es.js.map +1 -1
- package/dist/common/components/charts/stackedlinechart/CustomLegend.es.js.map +1 -1
- package/dist/common/components/charts/stackedlinechart/CustomPointTooltip.es.js.map +1 -1
- package/dist/common/components/daterangeselector/DateRangeSelector.d.ts +14 -0
- package/dist/common/components/daterangeselector/DateRangeSelector.es.js +113 -101
- package/dist/common/components/daterangeselector/DateRangeSelector.es.js.map +1 -1
- package/dist/common/components/dialog/Dialog.es.js.map +1 -1
- package/dist/common/components/donuts/MultiSegmentDonut.es.js.map +1 -1
- package/dist/common/components/donuts/SingleSegmentDonut.es.js.map +1 -1
- package/dist/common/components/drawer/Drawer.es.js.map +1 -1
- package/dist/common/components/drawer/Footer.es.js.map +1 -1
- package/dist/common/components/drawer/Header.es.js.map +1 -1
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js +71 -87
- package/dist/common/components/globalaccountfilter/GlobalAccountFilterList.es.js.map +1 -1
- package/dist/common/components/listitems/CollapseExpandListItem.es.js +4 -4
- package/dist/common/components/listitems/CollapseExpandListItem.es.js.map +1 -1
- package/dist/common/components/listitems/ToggleButtonListItem.es.js +6 -6
- package/dist/common/components/listitems/ToggleButtonListItem.es.js.map +1 -1
- package/dist/common/components/listitems/ToggleListItem.es.js.map +1 -1
- package/dist/common/hooks/useAriaLive.es.js.map +1 -1
- package/dist/common/utils/AccountFilter.es.js.map +1 -1
- package/dist/core/constants/Category.es.js.map +1 -1
- package/dist/core/stores/CategoryStore.d.ts +2 -0
- package/dist/core/stores/CategoryStore.es.js +55 -47
- package/dist/core/stores/CategoryStore.es.js.map +1 -1
- package/dist/core/stores/DebtsStore.es.js +10 -10
- package/dist/core/stores/DebtsStore.es.js.map +1 -1
- package/dist/core/stores/FinstrongStore.es.js +4 -4
- package/dist/core/stores/FinstrongStore.es.js.map +1 -1
- package/dist/core/stores/TrendsStore.es.js +6 -6
- package/dist/core/types/Account.es.js.map +1 -1
- package/dist/core/utils/DateUtil.es.js +24 -23
- package/dist/core/utils/DateUtil.es.js.map +1 -1
- package/dist/core/utils/DebtUtils.es.js +28 -28
- package/dist/core/utils/DebtUtils.es.js.map +1 -1
- package/dist/core/utils/GoalsUtil.es.js +11 -8
- package/dist/core/utils/GoalsUtil.es.js.map +1 -1
- package/dist/core/utils/InvestmentUtil.es.js +26 -23
- package/dist/core/utils/InvestmentUtil.es.js.map +1 -1
- package/dist/core/utils/NotificationUtils.es.js +11 -8
- package/dist/core/utils/NotificationUtils.es.js.map +1 -1
- package/dist/core/utils/RecurringTransactionsUtil.es.js +5 -8
- package/dist/core/utils/RecurringTransactionsUtil.es.js.map +1 -1
- package/dist/core/utils/SettingsUtil.es.js.map +1 -1
- package/dist/core/utils/TransactionUtils.es.js.map +1 -1
- package/dist/dashboard/Dashboard.es.js.map +1 -1
- package/dist/dashboard/Greeting.es.js.map +1 -1
- package/dist/debts/DebtsWidget.es.js.map +1 -1
- package/dist/debts/components/DebtDrawer.es.js.map +1 -1
- package/dist/debts/components/DebtsChart.es.js +36 -36
- package/dist/debts/components/DebtsChart.es.js.map +1 -1
- package/dist/debts/components/DebtsTable.es.js +13 -13
- package/dist/debts/components/DebtsTable.es.js.map +1 -1
- package/dist/debts/components/PaydownDrawer.es.js.map +1 -1
- package/dist/debts/components/SnowballCard.es.js.map +1 -1
- package/dist/debts/components/SnowballDrawer.es.js.map +1 -1
- package/dist/debts/components/actions/DebtsPriorityAction.es.js +23 -23
- package/dist/debts/components/actions/DebtsPriorityAction.es.js.map +1 -1
- package/dist/debts/components/actions/ExtraPaymentAction.es.js.map +1 -1
- package/dist/debts/components/actions/InterestRateAction.es.js.map +1 -1
- package/dist/debts/components/actions/MonthlyPaymentAction.es.js.map +1 -1
- package/dist/debts/components/actions/OriginalBalanceAction.es.js.map +1 -1
- package/dist/debts/components/debtsdrawer/DebtDetailsChart.es.js.map +1 -1
- package/dist/debts/components/debtsdrawer/DebtDetailsContent.es.js.map +1 -1
- package/dist/debts/components/debtsdrawer/DebtDetailsTab.es.js.map +1 -1
- package/dist/debts/components/debtsdrawer/DebtScheduleTab.es.js.map +1 -1
- package/dist/debts/components/debtsdrawer/DebtStatusCard.es.js.map +1 -1
- package/dist/debts/components/debtspaydown/PaydownButton.es.js.map +1 -1
- package/dist/debts/components/debtspaydown/PaydownContent.es.js.map +1 -1
- package/dist/debts/components/debtspriority/DebtsPriorityButton.es.js.map +1 -1
- package/dist/debts/components/debtspriority/DebtsPrioriyPopover.es.js.map +1 -1
- package/dist/debts/components/debtstable/AccountCell.es.js.map +1 -1
- package/dist/debts/components/debtstable/PriorityCell.es.js.map +1 -1
- package/dist/finstrong/FinancialStrengthCard.es.js.map +1 -1
- package/dist/finstrong/FinstrongWidget.es.js.map +1 -1
- package/dist/finstrong/components/ConnectMoreAccountsCard.es.js.map +1 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.es.js.map +1 -1
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.es.js.map +1 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.es.js.map +1 -1
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.es.js.map +1 -1
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.es.js.map +1 -1
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.es.js.map +1 -1
- package/dist/finstrong/components/HealthChart.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsDrawer.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsSpendTab.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsTabItem.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.es.js.map +1 -1
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.es.js.map +1 -1
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.es.js.map +1 -1
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.es.js.map +1 -1
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.es.js.map +1 -1
- package/dist/finstrong/components/ManageCreditScore.es.js.map +1 -1
- package/dist/finstrong/components/ManageDOB.es.js.map +1 -1
- package/dist/finstrong/components/MissingData.es.js.map +1 -1
- package/dist/finstrong/components/ProfileDrawer.es.js.map +1 -1
- package/dist/finstrong/components/ProfileList.es.js.map +1 -1
- package/dist/finstrong/components/ProfileProgressBar.es.js.map +1 -1
- package/dist/finstrong/components/ProgressBar.es.js.map +1 -1
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.es.js.map +1 -1
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.es.js.map +1 -1
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.es.js.map +1 -1
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.es.js.map +1 -1
- package/dist/finstrong/components/ScoreHistoryDrawer.es.js.map +1 -1
- package/dist/finstrong/components/ScoreRubricDrawer.es.js.map +1 -1
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.es.js.map +1 -1
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.es.js.map +1 -1
- package/dist/finstrong/components/StatusChip.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/Onboarding.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/OnboardingBirthday.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.es.js +15 -18
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.es.js.map +1 -1
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.es.js.map +1 -1
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.es.js.map +1 -1
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.es.js.map +1 -1
- package/dist/finstrong/components/shared/Accounts.es.js.map +1 -1
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.es.js.map +1 -1
- package/dist/finstrong/components/shared/CustomPieArc.es.js.map +1 -1
- package/dist/finstrong/components/shared/DialScoreCard.es.js +27 -27
- package/dist/finstrong/components/shared/DialScoreCard.es.js.map +1 -1
- package/dist/finstrong/components/shared/DoubleBarChart.es.js.map +1 -1
- package/dist/finstrong/components/shared/LineGraph.es.js +20 -19
- package/dist/finstrong/components/shared/LineGraph.es.js.map +1 -1
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.es.js +28 -28
- package/dist/finstrong/components/shared/ScoreHistoryTimeline.es.js.map +1 -1
- package/dist/finstrong/components/shared/ScoreHistoryTimelineItem.es.js.map +1 -1
- package/dist/finstrong/components/shared/TotalCard.es.js.map +1 -1
- package/dist/finstrong/components/shared/Transactions.es.js.map +1 -1
- package/dist/finstrong/util/finstrongUtils.es.js +4 -1
- package/dist/finstrong/util/finstrongUtils.es.js.map +1 -1
- package/dist/goals/GoalsMicroWidget.es.js.map +1 -1
- package/dist/goals/GoalsWidget.es.js.map +1 -1
- package/dist/goals/components/AccountSelectionDrawer.es.js.map +1 -1
- package/dist/goals/components/AddGoal.es.js.map +1 -1
- package/dist/goals/components/GoalDetails.es.js.map +1 -1
- package/dist/goals/components/GoalDetailsDrawer.es.js.map +1 -1
- package/dist/goals/components/GoalList.es.js.map +1 -1
- package/dist/goals/components/GoalStatusCard.es.js.map +1 -1
- package/dist/goals/components/ManageGoals.es.js.map +1 -1
- package/dist/goals/components/TabTitle.es.js.map +1 -1
- package/dist/goals/components/actions/AccountAction.es.js.map +1 -1
- package/dist/goals/components/actions/AddRetirementAccountAction.es.js.map +1 -1
- package/dist/goals/components/actions/AmountToSaveAction.es.js.map +1 -1
- package/dist/goals/components/actions/BirthdayAction.es.js.map +1 -1
- package/dist/goals/components/actions/ChangeAccountAction.es.js.map +1 -1
- package/dist/goals/components/actions/ContributionAction.es.js.map +1 -1
- package/dist/goals/components/actions/GoalNameAction.es.js.map +1 -1
- package/dist/goals/components/actions/InterestRateAction.es.js.map +1 -1
- package/dist/goals/components/actions/MonthlyPaymentAction.es.js.map +1 -1
- package/dist/goals/components/actions/OriginalBalanceAction.es.js.map +1 -1
- package/dist/goals/components/actions/RetirementAgeAction.es.js.map +1 -1
- package/dist/goals/components/addgoal/AddGoalListItem.es.js +5 -5
- package/dist/goals/components/addgoal/AddGoalListItem.es.js.map +1 -1
- package/dist/goals/components/managegoals/CompleteListItem.es.js.map +1 -1
- package/dist/goals/components/managegoals/OngoingListItem.es.js.map +1 -1
- package/dist/goals/components/micro/GoalMicroStatusCard.es.js.map +1 -1
- package/dist/goals/components/micro/GoalsMicroEmptyState.es.js.map +1 -1
- package/dist/help/HelpWidget.es.js.map +1 -1
- package/dist/help/components/Help.es.js.map +1 -1
- package/dist/help/components/HelpList.es.js +32 -32
- package/dist/help/components/HelpList.es.js.map +1 -1
- package/dist/help/components/content/BottomImageContent.es.js.map +1 -1
- package/dist/help/components/content/ContentItem.es.js.map +1 -1
- package/dist/help/components/content/Header.es.js.map +1 -1
- package/dist/help/components/content/LeftImageContent.es.js.map +1 -1
- package/dist/help/components/content/NoImageContent.es.js.map +1 -1
- package/dist/help/components/content/RightImageContent.es.js.map +1 -1
- package/dist/help/components/content/TopImageContent.es.js.map +1 -1
- package/dist/help/components/requestsupport/ContactSupport.es.js.map +1 -1
- package/dist/help/components/requestsupport/HelpByCategoryList.es.js.map +1 -1
- package/dist/help/components/requestsupport/MissingInstitution.es.js.map +1 -1
- package/dist/help/components/requestsupport/PopularTopicsDrawer.es.js.map +1 -1
- package/dist/help/components/requestsupport/PopularTopicsList.es.js.map +1 -1
- package/dist/help/components/requestsupport/PopularTopicsRow.es.js +6 -6
- package/dist/help/components/requestsupport/PopularTopicsRow.es.js.map +1 -1
- package/dist/help/components/requestsupport/RequestSupport.es.js.map +1 -1
- package/dist/help/components/requestsupport/RequestSupportFooter.es.js.map +1 -1
- package/dist/help/components/requestsupport/RequestSupportHeader.es.js.map +1 -1
- package/dist/help/components/requestsupport/RequestSupportInstitution.es.js.map +1 -1
- package/dist/help/components/requestsupport/SupportSuccessMessage.es.js.map +1 -1
- package/dist/insights/components/feed/Header.es.js.map +1 -1
- package/dist/insights/components/insights/AmericanUpcomingTaxDeadlineAlert/AmericanUpcomingTaxDeadlineAlert.es.js.map +1 -1
- package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandard.es.js.map +1 -1
- package/dist/insights/components/insights/BillAmountNotStandard/BillAmountNotStandardMUI.es.js.map +1 -1
- package/dist/insights/components/insights/CashBack/CashBack.es.js.map +1 -1
- package/dist/insights/components/insights/CategoryBudget/CategoryBudget.es.js +17 -17
- package/dist/insights/components/insights/CategoryBudget/CategoryBudget.es.js.map +1 -1
- package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2.es.js.map +1 -1
- package/dist/insights/components/insights/CategorySpendingV2/CategorySpendingV2MUI.es.js.map +1 -1
- package/dist/insights/components/insights/CelebrateCreditCardPayoff/CelebrateCreditCardPayoff.es.js.map +1 -1
- package/dist/insights/components/insights/CustomTransaction/CustomTransaction.es.js.map +1 -1
- package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsBody.es.js.map +1 -1
- package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.es.js +6 -6
- package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsLearnMoreDrawerContent.es.js.map +1 -1
- package/dist/insights/components/insights/DiscoveredAccounts/DiscoveredAccountsMiniInsight.es.js.map +1 -1
- package/dist/insights/components/insights/FederalBankHoliday/FederalBankHoliday.es.js.map +1 -1
- package/dist/insights/components/insights/FederalBankHoliday/FederalBankHolidayMUI.es.js.map +1 -1
- package/dist/insights/components/insights/MarketingHub/Offer.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlyDebtToIncomeComparisonV2/MonthlyDebtToIncomeComparisonV2.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlyEmergencyFundReview/LastMonthsContributionSection.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.es.js +38 -35
- package/dist/insights/components/insights/MonthlyEmergencyFundReview/MonthlyEmergencyFundReviewBody.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlyEmergencyFundReview/ProjectedCompletionSection.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlyEmergencyFundReview/TotalSection.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlySavingsToIncomeComparison/MonthlySavingsToIncomeComparison.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlySpendToIncomeComparisonV2/MonthlySpendToIncomeComparisonV2.es.js.map +1 -1
- package/dist/insights/components/insights/MonthlySpendingComparisonV2/MonthlySpendingComparisonV2.es.js.map +1 -1
- package/dist/insights/components/insights/P2pCategorization/P2pCategorization.es.js.map +1 -1
- package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationMultipleTransactions.es.js.map +1 -1
- package/dist/insights/components/insights/P2pCategorization/shared/P2pCategorizationSingleTransaction.es.js.map +1 -1
- package/dist/insights/components/insights/SavingsAccountBalancesSummary/SavingsAccountBalancesSummary.es.js.map +1 -1
- package/dist/insights/components/insights/SharedDeposit/SharedDeposit.es.js.map +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/AccountBox.es.js.map +1 -1
- package/dist/insights/components/insights/SwitchDirectDeposit/SwitchDirectDepositMainContainer.es.js.map +1 -1
- package/dist/insights/components/insights/UnifiedDeposit/UnifiedDeposit.es.js.map +1 -1
- package/dist/insights/components/insights/UnifiedDeposit/UnifiedDepositBody.es.js.map +1 -1
- package/dist/insights/components/insights/UserFeedback/UserFeedback.es.js.map +1 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/BubbleWeek.es.js.map +1 -1
- package/dist/insights/components/insights/WeeklyNoSpendDays/WeeklyNoSpendDays.es.js.map +1 -1
- package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.es.js +22 -22
- package/dist/insights/components/shared/ChartDrawerTemplate/ChartDrawerTemplate.es.js.map +1 -1
- package/dist/insights/components/shared/ChartDrawerTemplate/TipSection.es.js.map +1 -1
- package/dist/insights/components/shared/ChartTransactionWithDrillDown.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/BarChart.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/BarChartV2.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/ChartLegend.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/ChartLegendV2.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/CustomBarPlot.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/CustomBarPlotV2.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlot.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/CustomDoubleBarPlotMXUI.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/DoubleBarChart.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegend.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartLegendMXUI.es.js.map +1 -1
- package/dist/insights/components/shared/Charts/BarChart/DoubleBarChartMXUI.es.js.map +1 -1
- package/dist/insights/components/shared/ConnectionCard.es.js.map +1 -1
- package/dist/insights/components/shared/Coupon.es.js.map +1 -1
- package/dist/insights/components/shared/DeepLinks/DeepLinkDialog.es.js.map +1 -1
- package/dist/insights/components/shared/DeepLinks/DirectDeposit/DirectDepositDeepLink.es.js.map +1 -1
- package/dist/insights/components/shared/DeepLinks/DirectDeposit/Dot.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/DirectDeposit.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/DirectDepositSubHeader.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/FullFeedBodyHeader.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/LeftBox.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/MiniBodyHeader.es.js.map +1 -1
- package/dist/insights/components/shared/DirectDeposit/RightBox.es.js.map +1 -1
- package/dist/insights/components/shared/DiscoveredAccountsConnect.es.js.map +1 -1
- package/dist/insights/components/shared/DrillDownCalculation/BalanceStepper.es.js.map +1 -1
- package/dist/insights/components/shared/DrillDownCalculation/DrillDownCalculation.es.js.map +1 -1
- package/dist/insights/components/shared/ErrorCard/ErrorCard.es.js.map +1 -1
- package/dist/insights/components/shared/GenericFeedback/FeedbackButtons.es.js.map +1 -1
- package/dist/insights/components/shared/GenericFeedback/FeedbackDescription.es.js.map +1 -1
- package/dist/insights/components/shared/GenericFeedback/FeedbackHeader.es.js.map +1 -1
- package/dist/insights/components/shared/GenericFeedback/FeedbackOptions.es.js.map +1 -1
- package/dist/insights/components/shared/GenericFeedback/FeedbackText.es.js.map +1 -1
- package/dist/insights/components/shared/GoalProgress.es.js.map +1 -1
- package/dist/insights/components/shared/GradientBox.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/BeatCard.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/BeatCardMUI.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/CardButtonSection.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/CardError.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/CardFooter.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/CardLoading.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/ClientConfigurableCta.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/ContentAndDescription.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/ContentAndDescriptionMUI.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/Description.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/DescriptionMUI.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/EmbeddedCard.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/FeedbackCard.es.js +4 -4
- package/dist/insights/components/shared/InsightsCard/FeedbackCard.es.js.map +1 -1
- package/dist/insights/components/shared/InsightsCard/InsightButton.es.js.map +1 -1
- package/dist/insights/components/shared/MenuAction.es.js +4 -4
- package/dist/insights/components/shared/MenuAction.es.js.map +1 -1
- package/dist/insights/components/shared/MiniInsightCard.es.js.map +1 -1
- package/dist/insights/components/shared/P2P/P2PMultipleCategorization.es.js +23 -23
- package/dist/insights/components/shared/P2P/P2PMultipleCategorization.es.js.map +1 -1
- package/dist/insights/components/shared/P2PCategorizationSingleAccount/P2PCategorizationSingleAccount.es.js +24 -24
- package/dist/insights/components/shared/P2PCategorizationSingleAccount/P2PCategorizationSingleAccount.es.js.map +1 -1
- package/dist/insights/components/shared/ProgressBar.es.js.map +1 -1
- package/dist/insights/components/shared/SaveAnExtra100/SaveAnExtra100.es.js.map +1 -1
- package/dist/insights/components/shared/SaveEnoughToLiveOnBottomSection.es.js.map +1 -1
- package/dist/insights/components/shared/StatusIndicator.es.js.map +1 -1
- package/dist/insights/components/shared/ThemedSVGImage.es.js.map +1 -1
- package/dist/insights/components/shared/TransactionCard.es.js.map +1 -1
- package/dist/insights/components/shared/ZeroState/LinedCardZeroState.es.js.map +1 -1
- package/dist/investments/InvestmentsWidget.es.js.map +1 -1
- package/dist/investments/components/Allocation.es.js.map +1 -1
- package/dist/investments/components/Analysis.es.js.map +1 -1
- package/dist/investments/components/AnalysisDetails.es.js.map +1 -1
- package/dist/investments/components/EmptyStateFooterComponent.es.js.map +1 -1
- package/dist/investments/components/HeaderCell.es.js.map +1 -1
- package/dist/investments/components/HoldingDrawer.es.js.map +1 -1
- package/dist/investments/components/HoldingTable.es.js +167 -164
- package/dist/investments/components/HoldingTable.es.js.map +1 -1
- package/dist/investments/components/InfoToolTip.es.js.map +1 -1
- package/dist/investments/components/Overview.es.js.map +1 -1
- package/dist/investments/components/TabTitle.es.js.map +1 -1
- package/dist/investments/components/allocation/InvestementAllocationList.es.js.map +1 -1
- package/dist/investments/components/allocation/InvestmentsAllocationChart.es.js.map +1 -1
- package/dist/merchants/components/MerchantLookup.es.js.map +1 -1
- package/dist/microinsights/InsightsMicroWidget.es.js.map +1 -1
- package/dist/microinsights/MicroCardTemplate.es.js.map +1 -1
- package/dist/microinsights/Spinner.es.js.map +1 -1
- package/dist/microinsights/beaticons/BeatCategoryIcon.es.js +8 -8
- package/dist/microinsights/beaticons/BeatCategoryIcon.es.js.map +1 -1
- package/dist/microinsights/beaticons/BeatMaterialIcon.es.js.map +1 -1
- package/dist/microinsights/beaticons/ChartFilledIcon.es.js.map +1 -1
- package/dist/microinsights/beaticons/ZeroStateIcon.es.js.map +1 -1
- package/dist/microinsights/cards/ViewMoreMicroCard.d.ts +1 -0
- package/dist/microinsights/cards/ViewMoreMicroCard.es.js.map +1 -1
- package/dist/microinsights/carousel/BeatList.es.js +17 -17
- package/dist/microinsights/carousel/BeatList.es.js.map +1 -1
- package/dist/microinsights/carousel/CarouselControls.es.js.map +1 -1
- package/dist/microinsights/carousel/CarouselHeader.es.js.map +1 -1
- package/dist/microinsights/carousel/MicroBeatCarousel.es.js.map +1 -1
- package/dist/microinsights/constants/Analytics.es.js.map +1 -1
- package/dist/networth/NetWorthMicroWidget.es.js.map +1 -1
- package/dist/networth/NetWorthWidget.es.js.map +1 -1
- package/dist/networth/components/AssetsLiabilitiesDetail.es.js +1 -1
- package/dist/networth/components/AssetsLiabilitiesDetail.es.js.map +1 -1
- package/dist/networth/components/GainsLossesDetail.es.js.map +1 -1
- package/dist/networth/components/NetWorthChange.es.js.map +1 -1
- package/dist/networth/components/NetWorthChart.es.js.map +1 -1
- package/dist/networth/components/NetWorthList.es.js.map +1 -1
- package/dist/networth/components/NetWorthListItem.es.js.map +1 -1
- package/dist/networth/components/NetWorthSummary.es.js.map +1 -1
- package/dist/networth/components/micro/NetworthData.es.js.map +1 -1
- package/dist/networth/components/micro/ZeroState.es.js.map +1 -1
- package/dist/notifications/components/DateRow.es.js.map +1 -1
- package/dist/notifications/components/NotificationBadge.es.js.map +1 -1
- package/dist/notifications/components/NotificationCard.es.js.map +1 -1
- package/dist/notifications/components/NotificationDrawer.es.js.map +1 -1
- package/dist/notifications/components/NotificationList.es.js +33 -30
- package/dist/notifications/components/NotificationList.es.js.map +1 -1
- package/dist/notifications/components/NotificationsEmptyState.es.js.map +1 -1
- package/dist/recurringtransactions/RecurringTransactionsMicroWidget.es.js.map +1 -1
- package/dist/recurringtransactions/RecurringTransactionsMiniWidget.es.js.map +1 -1
- package/dist/recurringtransactions/RecurringTransactionsWidget.es.js.map +1 -1
- package/dist/recurringtransactions/ZeroStateMicroWidget.es.js.map +1 -1
- package/dist/recurringtransactions/components/MicroWidgetContent.es.js.map +1 -1
- package/dist/recurringtransactions/components/MiniWidgetContent.es.js.map +1 -1
- package/dist/recurringtransactions/components/PaymentSchedule.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurrenceBadges.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurrenceList.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurrenceRow.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringSettingsDrawer.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringStatus.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetails.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionDetailsDrawer.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactionList.es.js.map +1 -1
- package/dist/recurringtransactions/components/RecurringTransactions.es.js.map +1 -1
- package/dist/recurringtransactions/components/UpcomingRecurrenceCard.es.js.map +1 -1
- package/dist/recurringtransactions/components/actions/LinkTransactionDrawer.es.js.map +1 -1
- package/dist/recurringtransactions/components/actions/MarkAsPaidDialog.es.js.map +1 -1
- package/dist/recurringtransactions/components/actions/MarkAsUnpaidDialog.es.js.map +1 -1
- package/dist/recurringtransactions/components/actions/PaymentScheduleAction.es.js.map +1 -1
- package/dist/recurringtransactions/components/micro/MerchantLogosRow.es.js.map +1 -1
- package/dist/recurringtransactions/components/micro/OverlappingMerchantLogos.es.js.map +1 -1
- package/dist/recurringtransactions/components/micro/RecurrenceLegend.es.js.map +1 -1
- package/dist/recurringtransactions/components/recurrencecalendar/Legend.es.js.map +1 -1
- package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceCalendar.es.js.map +1 -1
- package/dist/recurringtransactions/components/recurrencecalendar/RecurrenceDay.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/RecurringSettings.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransaction.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/AddRecurringTransactionDetails.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/ManageExpenses.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/ManageIncome.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringRow.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/RecurringSettingsZeroState.es.js.map +1 -1
- package/dist/recurringtransactions/components/shared/recurringsettings/SelectTransaction.es.js.map +1 -1
- package/dist/settings/NotificationSettingsWidget.es.js.map +1 -1
- package/dist/settings/SettingsWidget.es.js.map +1 -1
- package/dist/settings/TransactionRulesWidget.es.js.map +1 -1
- package/dist/settings/components/SettingsWidgetContents.es.js.map +1 -1
- package/dist/settings/components/devices/DeviceDialog.es.js.map +1 -1
- package/dist/settings/components/devices/DeviceList.es.js.map +1 -1
- package/dist/settings/components/devices/DeviceTab.es.js.map +1 -1
- package/dist/settings/components/devices/DeviceTable.es.js +82 -82
- package/dist/settings/components/devices/DeviceTable.es.js.map +1 -1
- package/dist/settings/components/notifications/AccountNotificationProfile.es.js.map +1 -1
- package/dist/settings/components/notifications/AccountNotificationProfiles.es.js.map +1 -1
- package/dist/settings/components/notifications/AccountProfileListItem.es.js.map +1 -1
- package/dist/settings/components/notifications/DeliveryMethods.es.js.map +1 -1
- package/dist/settings/components/notifications/NotificationProfile.es.js.map +1 -1
- package/dist/settings/components/notifications/NotificationSettings.es.js.map +1 -1
- package/dist/settings/components/notifications/PersonalDetails.es.js.map +1 -1
- package/dist/settings/components/profile/ProfileTab.es.js.map +1 -1
- package/dist/settings/components/profile/actions/VerifyEmailAction.es.js.map +1 -1
- package/dist/settings/components/profile/actions/VerifyPhoneAction.es.js.map +1 -1
- package/dist/settings/components/profile/actions/VerifyTokenAction.es.js.map +1 -1
- package/dist/settings/components/transactionrules/TransactionRulesTab.es.js.map +1 -1
- package/dist/settings/components/transactionrules/actions/DeleteRuleAction.es.js.map +1 -1
- package/dist/settings/components/transactionrules/actions/EditPayeeAction.es.js.map +1 -1
- package/dist/settings/components/transactionrules/components/EditRuleDetails.es.js.map +1 -1
- package/dist/settings/components/transactionrules/components/RuleListItem.es.js +24 -21
- package/dist/settings/components/transactionrules/components/RuleListItem.es.js.map +1 -1
- package/dist/spending/SpendingMiniWidget.es.js.map +1 -1
- package/dist/spending/SpendingWidget.es.js +48 -39
- package/dist/spending/SpendingWidget.es.js.map +1 -1
- package/dist/spending/components/MiniSpendingChart.es.js.map +1 -1
- package/dist/spending/components/Spending.es.js.map +1 -1
- package/dist/spending/components/SpendingChart.es.js.map +1 -1
- package/dist/spending/components/SpendingDonut.es.js.map +1 -1
- package/dist/spending/components/SpendingLegend.es.js.map +1 -1
- package/dist/spending/components/SpendingList.es.js.map +1 -1
- package/dist/spending/components/SpendingTabLabel.es.js.map +1 -1
- package/dist/transactions/TransactionWidget.es.js.map +1 -1
- package/dist/transactions/components/shared/TransactionDetails.es.js.map +1 -1
- package/dist/transactions/components/shared/TransactionList.es.js.map +1 -1
- package/dist/transactions/components/shared/TransactionTable.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/Description.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/FlagTransaction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/ManualTransactionDetails.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionAmountHeader.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/TransactionDetailsView.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.es.js +7 -7
- package/dist/transactions/components/shared/transactiondetails/actions/AddMerchantBudgetAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.es.js +29 -29
- package/dist/transactions/components/shared/transactiondetails/actions/CategoryAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js +36 -36
- package/dist/transactions/components/shared/transactiondetails/actions/DateAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.es.js +7 -7
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.es.js +7 -7
- package/dist/transactions/components/shared/transactiondetails/actions/DeleteLogoAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.es.js +7 -7
- package/dist/transactions/components/shared/transactiondetails/actions/ExcludeAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.es.js +24 -24
- package/dist/transactions/components/shared/transactiondetails/actions/MemoAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.es.js +40 -40
- package/dist/transactions/components/shared/transactiondetails/actions/SplitAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.es.js +34 -34
- package/dist/transactions/components/shared/transactiondetails/actions/TagsAction.es.js.map +1 -1
- package/dist/transactions/components/shared/transactionlist/TransactionRow.es.js.map +1 -1
- package/dist/transactions/components/shared/transactionlist/ZeroState.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/AccountCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/AmountCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/CategoryCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/DateCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/FlagCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/HeaderCell.es.js.map +1 -1
- package/dist/transactions/components/shared/transactiontable/cells/PayeeCell.es.js.map +1 -1
- package/dist/transactions/components/splitmanager/SplitManager.es.js.map +1 -1
- package/dist/transactions/components/splitmanager/SplitRow.es.js.map +1 -1
- package/dist/transactions/components/tagmanager/Header.es.js.map +1 -1
- package/dist/transactions/components/tagmanager/SearchBox.es.js.map +1 -1
- package/dist/transactions/components/tagmanager/TagManager.es.js.map +1 -1
- package/dist/transactions/components/tagmanager/TagRow.es.js +4 -4
- package/dist/transactions/components/tagmanager/TagRow.es.js.map +1 -1
- package/dist/transactions/components/transactionwidget/AddAccountModal.es.js.map +1 -1
- package/dist/transactions/components/transactionwidget/actions/EditCategoryAction.es.js.map +1 -1
- package/dist/transactions/components/transactionwidget/actions/ExportCsvAction.es.js.map +1 -1
- package/dist/transactions/utils/Transactions.es.js +20 -12
- package/dist/transactions/utils/Transactions.es.js.map +1 -1
- package/dist/trends/TrendsFullWidget.es.js +47 -47
- package/dist/trends/TrendsFullWidget.es.js.map +1 -1
- package/dist/trends/TrendsMicroWidget.es.js.map +1 -1
- package/dist/trends/TrendsMiniWidget.es.js.map +1 -1
- package/dist/trends/TrendsWidget.es.js +88 -89
- package/dist/trends/TrendsWidget.es.js.map +1 -1
- package/dist/trends/ZeroStateMicroWidget.es.js.map +1 -1
- package/dist/trends/components/CategoriesList.es.js.map +1 -1
- package/dist/trends/components/CategoryDetailChart.es.js.map +1 -1
- package/dist/trends/components/CategoryDetails.es.js.map +1 -1
- package/dist/trends/components/DateRangeText.es.js.map +1 -1
- package/dist/trends/components/TrendsChart.es.js.map +1 -1
- package/dist/trends/components/TrendsDrawer.es.js.map +1 -1
- package/dist/trends/components/TrendsInsights.es.js +21 -21
- package/dist/trends/components/TrendsInsights.es.js.map +1 -1
- package/dist/trends/components/TrendsMicroSpendingIncomeBox.es.js.map +1 -1
- package/dist/trends/components/TrendsTableContainer.es.js.map +1 -1
- package/dist/trends/components/TrendsViewToggle.es.js.map +1 -1
- package/dist/trends/components/trendstable/AccessibleSortIcon.es.js.map +1 -1
- package/dist/trends/components/trendstable/AmountCell.es.js.map +1 -1
- package/dist/trends/components/trendstable/CategoryCell.es.js.map +1 -1
- package/dist/trends/components/trendstable/HeaderCell.es.js.map +1 -1
- package/package.json +36 -35
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { buildDynamicCopy as A } from "../../../../core/utils/Localization.es.js";
|
|
2
|
-
import { useAccountStore as
|
|
2
|
+
import { useAccountStore as M, useEvent as k, useGlobalCopyStore as v, useTransactionStore as D } from "../../../../common/context/hooks.es.js";
|
|
3
3
|
import C from "../../../../common/components/dialog/Dialog.es.js";
|
|
4
|
-
import
|
|
4
|
+
import E from "../../../../common/components/drawer/Drawer.es.js";
|
|
5
5
|
import { ANALYTICS_EVENTS as _ } from "../../../../common/constants/Analytics.es.js";
|
|
6
|
-
import { useAccountUiStore as
|
|
6
|
+
import { useAccountUiStore as O } from "../../../hooks/useUiStore.es.js";
|
|
7
7
|
import d from "./AccountActionsRow.es.js";
|
|
8
|
-
import { useGetMergeableAccounts as
|
|
9
|
-
import
|
|
8
|
+
import { useGetMergeableAccounts as P } from "../../../hooks/useGetMergeableAccounts.es.js";
|
|
9
|
+
import U from "../../AccountListItem.es.js";
|
|
10
10
|
import n from "react";
|
|
11
|
-
import { observer as
|
|
11
|
+
import { observer as K } from "mobx-react-lite";
|
|
12
12
|
import { Icon as g, Text as r } from "@mxenabled/mxui";
|
|
13
|
-
import { Fragment as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
var
|
|
18
|
-
const [S, u] = n.useState(!1), [w, a] = n.useState(!1), [m, h] = n.useState(!1), [p, b] = n.useState({}), { selectedAccount: e } =
|
|
13
|
+
import { Fragment as N, jsx as t, jsxs as s } from "react/jsx-runtime";
|
|
14
|
+
import R from "@mui/material/List";
|
|
15
|
+
import G from "@mui/material/Switch";
|
|
16
|
+
import j from "@mui/material/ListSubheader";
|
|
17
|
+
var B = () => {
|
|
18
|
+
const [S, u] = n.useState(!1), [w, a] = n.useState(!1), [m, h] = n.useState(!1), [p, b] = n.useState({}), { selectedAccount: e } = O(), { mergeAccounts: T, updateAccount: y } = M(), { accounts: o } = v(), i = P(), { onEvent: l } = k(), { modifyTransactionByAccountGuid: x } = D(), f = async (c) => {
|
|
19
19
|
await y({
|
|
20
20
|
...e,
|
|
21
21
|
...c
|
|
22
22
|
}), "is_closed" in c && c.is_closed !== e.is_closed && x(e.guid, { accountIsClosed: c.is_closed });
|
|
23
|
-
},
|
|
23
|
+
}, L = () => {
|
|
24
24
|
T([e.guid, p.guid]).finally(() => a(!1));
|
|
25
25
|
};
|
|
26
|
-
return /* @__PURE__ */ s(
|
|
27
|
-
/* @__PURE__ */ t(
|
|
26
|
+
return /* @__PURE__ */ s(N, { children: [
|
|
27
|
+
/* @__PURE__ */ t(j, {
|
|
28
28
|
sx: {
|
|
29
29
|
backgroundColor: "transparent",
|
|
30
30
|
mb: 4,
|
|
@@ -45,7 +45,7 @@ var j = () => {
|
|
|
45
45
|
},
|
|
46
46
|
primaryText: e.is_hidden ? o.unhide_account : o.hide_Account,
|
|
47
47
|
secondaryText: e.is_hidden ? o.include_this_account : o.exclude_this_account,
|
|
48
|
-
children: /* @__PURE__ */ t(
|
|
48
|
+
children: /* @__PURE__ */ t(G, {
|
|
49
49
|
"aria-hidden": !0,
|
|
50
50
|
checked: e.is_hidden,
|
|
51
51
|
tabIndex: -1
|
|
@@ -85,36 +85,39 @@ var j = () => {
|
|
|
85
85
|
secondaryText: o.if_a_connected_account_is_showing_up_twice,
|
|
86
86
|
children: /* @__PURE__ */ t(g, { name: "chevron_right" })
|
|
87
87
|
}),
|
|
88
|
-
/* @__PURE__ */ s(
|
|
88
|
+
/* @__PURE__ */ s(E, {
|
|
89
89
|
ariaLabelClose: o.close_drawer,
|
|
90
90
|
isOpen: w,
|
|
91
91
|
onClose: () => a(!1),
|
|
92
92
|
title: o.mark_as_duplicate,
|
|
93
|
-
children: [/* @__PURE__ */ t(
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
children: [/* @__PURE__ */ t(R, { children: i.map((c) => {
|
|
94
|
+
const I = i.indexOf(c) === i.length - 1;
|
|
95
|
+
return /* @__PURE__ */ t(U, {
|
|
96
|
+
account: c,
|
|
97
|
+
listItemProps: { sx: {
|
|
98
|
+
position: "relative",
|
|
99
|
+
"&::after": {
|
|
100
|
+
content: '""',
|
|
101
|
+
position: "absolute",
|
|
102
|
+
bottom: 0,
|
|
103
|
+
right: 0,
|
|
104
|
+
left: I ? 0 : 24,
|
|
105
|
+
borderBottom: "1px solid",
|
|
106
|
+
borderColor: "divider"
|
|
107
|
+
}
|
|
108
|
+
} },
|
|
109
|
+
onRowClick: () => {
|
|
110
|
+
h(!0), b(c);
|
|
105
111
|
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
h(!0), b(c);
|
|
109
|
-
}
|
|
110
|
-
}, c.guid)) }), m && /* @__PURE__ */ s(C, {
|
|
112
|
+
}, c.guid);
|
|
113
|
+
}) }), m && /* @__PURE__ */ s(C, {
|
|
111
114
|
copy: {
|
|
112
115
|
close_aria: o.close_modal,
|
|
113
116
|
title: o.confirm_merge
|
|
114
117
|
},
|
|
115
118
|
isOpen: m,
|
|
116
119
|
onClose: () => h(!1),
|
|
117
|
-
onPrimaryAction:
|
|
120
|
+
onPrimaryAction: L,
|
|
118
121
|
children: [/* @__PURE__ */ t(r, {
|
|
119
122
|
truncate: !1,
|
|
120
123
|
children: A(o.this_means_accounts_will_be_merged, e.name, p.name)
|
|
@@ -126,9 +129,9 @@ var j = () => {
|
|
|
126
129
|
})]
|
|
127
130
|
})
|
|
128
131
|
] });
|
|
129
|
-
},
|
|
132
|
+
}, io = K(B);
|
|
130
133
|
export {
|
|
131
|
-
|
|
134
|
+
io as default
|
|
132
135
|
};
|
|
133
136
|
|
|
134
137
|
//# sourceMappingURL=AccountActions.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountActions.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountActions.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport List from '@mui/material/List'\nimport ListSubheader from '@mui/material/ListSubheader'\nimport Switch from '@mui/material/Switch'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport AccountActionsRow from './AccountActionsRow'\n\nimport {\n ANALYTICS_EVENTS,\n Dialog,\n Drawer,\n useAccountStore,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { type Account } from '../../../../core'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { useGetMergeableAccounts } from '../../../hooks/useGetMergeableAccounts'\nimport AccountListItem from '../../AccountListItem'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ntype UpdatedValue = Pick<Account, 'is_closed'> | Pick<Account, 'is_hidden'>\n\nconst AccountActions = () => {\n const [shouldShowCloseAccountModal, setShouldShowCloseAccountModal] = React.useState(false)\n const [shouldShowAccountMergeDrawer, setShouldShowAccountMergeDrawer] = React.useState(false)\n const [shouldShowMergeConfirmModal, setShouldShowMergeConfirmModal] = React.useState(false)\n const [accountToMerge, setAccountToMerge] = React.useState({} as Account)\n\n const { selectedAccount: account } = useAccountUiStore()\n const { mergeAccounts, updateAccount } = useAccountStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const mergeableAccounts = useGetMergeableAccounts()\n const { onEvent } = useEvent()\n const { modifyTransactionByAccountGuid } = useTransactionStore()\n\n const handleUpdateAccount = async (updatedValue: UpdatedValue) => {\n await updateAccount({\n ...account,\n ...updatedValue,\n })\n if ('is_closed' in updatedValue && updatedValue.is_closed !== account.is_closed)\n modifyTransactionByAccountGuid(account.guid, { accountIsClosed: updatedValue.is_closed })\n }\n\n const handleMergeAccounts = () => {\n mergeAccounts([account.guid, accountToMerge.guid]).finally(() =>\n setShouldShowAccountMergeDrawer(false),\n )\n }\n\n return (\n <>\n <ListSubheader sx={{ backgroundColor: 'transparent', mb: 4, mt: 12, mx: 8 }}>\n <Text bold={true} component=\"h2\" variant=\"caption\">\n {accountsCopy.actions}\n </Text>\n </ListSubheader>\n\n <AccountActionsRow\n ariaPressed={account.is_hidden}\n onClick={() => {\n handleUpdateAccount({ is_hidden: !account.is_hidden })\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: account.guid })\n }}\n primaryText={account.is_hidden ? accountsCopy.unhide_account : accountsCopy.hide_Account}\n secondaryText={\n account.is_hidden ? accountsCopy.include_this_account : accountsCopy.exclude_this_account\n }\n >\n <Switch aria-hidden={true} checked={account.is_hidden} tabIndex={-1} />\n </AccountActionsRow>\n\n <AccountActionsRow\n onClick={() => {\n setShouldShowCloseAccountModal(true)\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {\n account_guid: account.guid,\n })\n }}\n primaryText={account.is_closed ? accountsCopy.mark_as_open : accountsCopy.mark_as_closed}\n secondaryText={\n account.is_closed\n ? accountsCopy.this_will_set_the_closed_account\n : accountsCopy.this_will_set_the_account_balance_to_0\n }\n >\n <Icon name=\"chevron_right\" />\n {/* Non-interactive wrapper: only stops click propagation to the parent\n ListItemButton so clicks inside the Dialog don't re-trigger it. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={(e) => e.stopPropagation()}>\n <Dialog\n copy={{\n close_aria: accountsCopy.close_modal,\n title: account.is_closed\n ? accountsCopy.confirm_mark_as_open\n : accountsCopy.confirm_mark_closed,\n }}\n isOpen={shouldShowCloseAccountModal}\n onClose={() => {\n setShouldShowCloseAccountModal(false)\n }}\n onPrimaryAction={() => handleUpdateAccount({ is_closed: !account.is_closed })}\n >\n <Text truncate={false}>\n {\n buildDynamicCopy(\n account.is_closed\n ? accountsCopy.this_will_resume_updating_the_balance\n : accountsCopy.this_will_set_the_balance_of_your_account,\n account.name,\n ) as string\n }\n </Text>\n </Dialog>\n </div>\n </AccountActionsRow>\n\n {mergeableAccounts.length > 0 && (\n <AccountActionsRow\n isLast={true}\n onClick={() => {\n setShouldShowAccountMergeDrawer(true)\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {\n account_guid: account.guid,\n })\n }}\n primaryText={accountsCopy.mark_as_duplicate}\n secondaryText={accountsCopy.if_a_connected_account_is_showing_up_twice}\n >\n <Icon name=\"chevron_right\" />\n </AccountActionsRow>\n )}\n\n <Drawer\n ariaLabelClose={accountsCopy.close_drawer}\n isOpen={shouldShowAccountMergeDrawer}\n onClose={() => setShouldShowAccountMergeDrawer(false)}\n title={accountsCopy.mark_as_duplicate}\n >\n <List>\n {mergeableAccounts.map((account: Account) => {\n const isLast = mergeableAccounts.indexOf(account) === mergeableAccounts.length - 1\n return (\n <AccountListItem\n account={account}\n key={account.guid}\n listItemProps={{\n sx: {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n },\n }}\n onRowClick={() => {\n setShouldShowMergeConfirmModal(true)\n setAccountToMerge(account)\n }}\n />\n )\n })}\n </List>\n {shouldShowMergeConfirmModal && (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_modal,\n title: accountsCopy.confirm_merge,\n }}\n isOpen={shouldShowMergeConfirmModal}\n onClose={() => setShouldShowMergeConfirmModal(false)}\n onPrimaryAction={handleMergeAccounts}\n >\n <Text truncate={false}>\n {\n buildDynamicCopy(\n accountsCopy.this_means_accounts_will_be_merged,\n account.name,\n accountToMerge.name,\n ) as string\n }\n </Text>\n <Text color=\"error\" sx={{ mt: 24 }}>\n {accountsCopy.this_action_cannot_be_undone}\n </Text>\n </Dialog>\n )}\n </Drawer>\n </>\n )\n}\n\nexport default observer(AccountActions)\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAM,IAAA,MAAuB;AAC3B,QAAM,CAAC,GAA6B,CAAA,IAAkC,EAAM,SAAS,EAAK,GACpF,CAAC,GAA8B,CAAA,IAAmC,EAAM,SAAS,EAAK,GACtF,CAAC,GAA6B,CAAA,IAAkC,EAAM,SAAS,EAAK,GACpF,CAAC,GAAgB,CAAA,IAAqB,EAAM,SAAS,CAAC,CAAY,GAElE,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,eAAA,GAAe,eAAA,EAAA,IAAkB,EAAgB,GACnD,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,IAAoB,EAAwB,GAC5C,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,gCAAA,EAAA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CAAK,MAGpB,gBAAA,EAAC,GAAD;AAAA,QACW,SAAA;AAAA,QAET,eAAe,EACb,IAAI;AAAA,UACF,UAAU;AAAA,UACV,YAAY;AAAA,YACV,SAAS;AAAA,YACT,UAAU;AAAA,YACV,QAAQ;AAAA,YACR,OAAO;AAAA,YACP,MAbK,EAAkB,QAAQ,CAAO,MAAM,EAAkB,SAAS,IAaxD,IAAI;AAAA,YACnB,cAAc;AAAA,YACd,aAAa;AAAA,UACf;AAAA,QACF,EACF;AAAA,QACA,YAAA,MAAkB;AAChB,UAAA,EAA+B,EAAI,GACnC,EAAkB,CAAO;AAAA,QAC3B;AAAA,MACD,GAnBM,EAAQ,IAmBd,CAEJ,EACG,CAAA,GACL,KACC,gBAAA,EAAC,GAAD;AAAA,QACE,MAAM;AAAA,UACJ,YAAY,EAAa;AAAA,UACzB,OAAO,EAAa;AAAA,QACtB;AAAA,QACA,QAAQ;AAAA,QACR,SAAA,MAAe,EAA+B,EAAK;AAAA,QACnD,iBAAiB;AAAA,kBAPnB,CASE,gBAAA,EAAC,GAAD;AAAA,UAAM,UAAU;AAAA,oBAEZ,EACE,EAAa,oCACb,EAAQ,MACR,EAAe,IACjB;AAAA,QAEE,CAAA,GACN,gBAAA,EAAC,GAAD;AAAA,UAAM,OAAM;AAAA,UAAQ,IAAI,EAAE,IAAI,GAAG;AAAA,oBAC9B,EAAa;AAAA,QACV,CAAA,CACA;AAAA,QAEJ;AAAA;EACR,EAAA,CAAA;AAEN,GAEA,KAAe,EAAS,CAAc"}
|
|
1
|
+
{"version":3,"file":"AccountActions.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountActions.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport List from '@mui/material/List'\nimport ListSubheader from '@mui/material/ListSubheader'\nimport Switch from '@mui/material/Switch'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport AccountActionsRow from './AccountActionsRow'\n\nimport {\n ANALYTICS_EVENTS,\n Dialog,\n Drawer,\n useAccountStore,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { type Account } from '../../../../core'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { useGetMergeableAccounts } from '../../../hooks/useGetMergeableAccounts'\nimport AccountListItem from '../../AccountListItem'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ntype UpdatedValue = Pick<Account, 'is_closed'> | Pick<Account, 'is_hidden'>\n\nconst AccountActions = () => {\n const [shouldShowCloseAccountModal, setShouldShowCloseAccountModal] = React.useState(false)\n const [shouldShowAccountMergeDrawer, setShouldShowAccountMergeDrawer] = React.useState(false)\n const [shouldShowMergeConfirmModal, setShouldShowMergeConfirmModal] = React.useState(false)\n const [accountToMerge, setAccountToMerge] = React.useState({} as Account)\n\n const { selectedAccount: account } = useAccountUiStore()\n const { mergeAccounts, updateAccount } = useAccountStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const mergeableAccounts = useGetMergeableAccounts()\n const { onEvent } = useEvent()\n const { modifyTransactionByAccountGuid } = useTransactionStore()\n\n const handleUpdateAccount = async (updatedValue: UpdatedValue) => {\n await updateAccount({\n ...account,\n ...updatedValue,\n })\n if ('is_closed' in updatedValue && updatedValue.is_closed !== account.is_closed)\n modifyTransactionByAccountGuid(account.guid, { accountIsClosed: updatedValue.is_closed })\n }\n\n const handleMergeAccounts = () => {\n mergeAccounts([account.guid, accountToMerge.guid]).finally(() =>\n setShouldShowAccountMergeDrawer(false),\n )\n }\n\n return (\n <>\n <ListSubheader sx={{ backgroundColor: 'transparent', mb: 4, mt: 12, mx: 8 }}>\n <Text bold={true} component=\"h2\" variant=\"caption\">\n {accountsCopy.actions}\n </Text>\n </ListSubheader>\n\n <AccountActionsRow\n ariaPressed={account.is_hidden}\n onClick={() => {\n handleUpdateAccount({ is_hidden: !account.is_hidden })\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_HIDE, { account_guid: account.guid })\n }}\n primaryText={account.is_hidden ? accountsCopy.unhide_account : accountsCopy.hide_Account}\n secondaryText={\n account.is_hidden ? accountsCopy.include_this_account : accountsCopy.exclude_this_account\n }\n >\n <Switch aria-hidden={true} checked={account.is_hidden} tabIndex={-1} />\n </AccountActionsRow>\n\n <AccountActionsRow\n onClick={() => {\n setShouldShowCloseAccountModal(true)\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_MARK_CLOSED, {\n account_guid: account.guid,\n })\n }}\n primaryText={account.is_closed ? accountsCopy.mark_as_open : accountsCopy.mark_as_closed}\n secondaryText={\n account.is_closed\n ? accountsCopy.this_will_set_the_closed_account\n : accountsCopy.this_will_set_the_account_balance_to_0\n }\n >\n <Icon name=\"chevron_right\" />\n {/* Non-interactive wrapper: only stops click propagation to the parent\n ListItemButton so clicks inside the Dialog don't re-trigger it. */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={(e) => e.stopPropagation()}>\n <Dialog\n copy={{\n close_aria: accountsCopy.close_modal,\n title: account.is_closed\n ? accountsCopy.confirm_mark_as_open\n : accountsCopy.confirm_mark_closed,\n }}\n isOpen={shouldShowCloseAccountModal}\n onClose={() => {\n setShouldShowCloseAccountModal(false)\n }}\n onPrimaryAction={() => handleUpdateAccount({ is_closed: !account.is_closed })}\n >\n <Text truncate={false}>\n {\n buildDynamicCopy(\n account.is_closed\n ? accountsCopy.this_will_resume_updating_the_balance\n : accountsCopy.this_will_set_the_balance_of_your_account,\n account.name,\n ) as string\n }\n </Text>\n </Dialog>\n </div>\n </AccountActionsRow>\n\n {mergeableAccounts.length > 0 && (\n <AccountActionsRow\n isLast={true}\n onClick={() => {\n setShouldShowAccountMergeDrawer(true)\n onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_CLICK_MARK_DUPLICATE, {\n account_guid: account.guid,\n })\n }}\n primaryText={accountsCopy.mark_as_duplicate}\n secondaryText={accountsCopy.if_a_connected_account_is_showing_up_twice}\n >\n <Icon name=\"chevron_right\" />\n </AccountActionsRow>\n )}\n\n <Drawer\n ariaLabelClose={accountsCopy.close_drawer}\n isOpen={shouldShowAccountMergeDrawer}\n onClose={() => setShouldShowAccountMergeDrawer(false)}\n title={accountsCopy.mark_as_duplicate}\n >\n <List>\n {mergeableAccounts.map((account: Account) => {\n const isLast = mergeableAccounts.indexOf(account) === mergeableAccounts.length - 1\n return (\n <AccountListItem\n account={account}\n key={account.guid}\n listItemProps={{\n sx: {\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n },\n }}\n onRowClick={() => {\n setShouldShowMergeConfirmModal(true)\n setAccountToMerge(account)\n }}\n />\n )\n })}\n </List>\n {shouldShowMergeConfirmModal && (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_modal,\n title: accountsCopy.confirm_merge,\n }}\n isOpen={shouldShowMergeConfirmModal}\n onClose={() => setShouldShowMergeConfirmModal(false)}\n onPrimaryAction={handleMergeAccounts}\n >\n <Text truncate={false}>\n {\n buildDynamicCopy(\n accountsCopy.this_means_accounts_will_be_merged,\n account.name,\n accountToMerge.name,\n ) as string\n }\n </Text>\n <Text color=\"error\" sx={{ mt: 24 }}>\n {accountsCopy.this_action_cannot_be_undone}\n </Text>\n </Dialog>\n )}\n </Drawer>\n </>\n )\n}\n\nexport default observer(AccountActions)\n"],"mappings":";;;;;;;;;;;;;;;;AA4BA,IAAM,IAAA,MAAuB;AAC3B,QAAM,CAAC,GAA6B,CAAA,IAAkC,EAAM,SAAS,EAAK,GACpF,CAAC,GAA8B,CAAA,IAAmC,EAAM,SAAS,EAAK,GACtF,CAAC,GAA6B,CAAA,IAAkC,EAAM,SAAS,EAAK,GACpF,CAAC,GAAgB,CAAA,IAAqB,EAAM,SAAS,CAAC,CAAY,GAElE,EAAE,iBAAiB,EAAA,IAAY,EAAkB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 -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountActionsRow.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountActionsRow.tsx"],"sourcesContent":["import ListItem from '@mui/material/ListItem'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\n\ninterface AccountActionsRowProps {\n ariaPressed?: boolean\n onClick: () => void\n isLast?: boolean\n primaryText: string\n secondaryText: string\n}\n\nconst AccountActionsRow: React.FC<React.PropsWithChildren<AccountActionsRowProps>> = ({\n ariaPressed,\n children,\n isLast = false,\n onClick,\n primaryText,\n secondaryText,\n}) => {\n return (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n <ListItemButton aria-pressed={ariaPressed} onClick={onClick}>\n <ListItemText primary={primaryText} secondary={secondaryText} />\n {children}\n </ListItemButton>\n </ListItem>\n )\n}\n\nexport default AccountActionsRow\n"],"mappings":";;;;AAYA,IAAM,IAAA,CAAgF,EACpF,aAAA,GACA,UAAA,GACA,QAAA,IAAS,IACT,SAAA,GACA,aAAA,GACA,eAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,YAAY;AAAA,MACV,SAAS;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,MAAM,IAAS,IAAI;AAAA,MACnB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountActionsRow.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountActionsRow.tsx"],"sourcesContent":["import ListItem from '@mui/material/ListItem'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\n\ninterface AccountActionsRowProps {\n ariaPressed?: boolean\n onClick: () => void\n isLast?: boolean\n primaryText: string\n secondaryText: string\n}\n\nconst AccountActionsRow: React.FC<React.PropsWithChildren<AccountActionsRowProps>> = ({\n ariaPressed,\n children,\n isLast = false,\n onClick,\n primaryText,\n secondaryText,\n}) => {\n return (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n <ListItemButton aria-pressed={ariaPressed} onClick={onClick}>\n <ListItemText primary={primaryText} secondary={secondaryText} />\n {children}\n </ListItemButton>\n </ListItem>\n )\n}\n\nexport default AccountActionsRow\n"],"mappings":";;;;AAYA,IAAM,IAAA,CAAgF,EACpF,aAAA,GACA,UAAA,GACA,QAAA,IAAS,IACT,SAAA,GACA,aAAA,GACA,eAAA,EAAA,MAGE,gBAAA,EAAC,GAAD;AAAA,EACE,IAAI;AAAA,IACF,iBAAiB;AAAA,IACjB,UAAU;AAAA,IACV,YAAY;AAAA,MACV,SAAS;AAAA,MACT,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,MAAM,IAAS,IAAI;AAAA,MACnB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,IAAgB,gBAAc;AAAA,IAAsB,SAAA;AAAA,IAApD,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MAAc,SAAS;AAAA,MAAa,WAAW;AAAA,IAAgB,CAAA,GAC9D,CACa;AAAA;AACR,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountConnection.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountConnection.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItem from '@mui/material/ListItem'\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\nimport ListSubheader from '@mui/material/ListSubheader'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Icon, Text } from '@mxenabled/mxui'\nimport {\n CheckCircle as CheckCircleRoundedIcon,\n Error as ErrorIcon,\n Language as LanguageRoundedIcon,\n} from '@mxenabled/mx-icons'\n\nimport ConnectDrawer from '../../../../common/components/ConnectDrawer'\nimport { IconBacking, useGlobalCopyStore } from '../../../../common'\nimport { NonConnectedStatuses } from '../../../../core'\nimport { getConnectionMessages } from '../../../utils/getConnectionMessages'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\nconst iconStyle = {\n color: 'background.default',\n fontSize: 20,\n gridRow: 1,\n gridColumn: 1,\n zIndex: 2,\n}\n\nconst AccountConnection = () => {\n const [shouldShowConnectDrawer, setShouldShowConnectDrawer] = React.useState(false)\n const {\n palette: { mode },\n } = useTheme()\n const { selectedMember: member } = useAccountUiStore()\n const { accounts: accountsCopy, connect: connectCopy } = useGlobalCopyStore()\n\n const statusMessages = getConnectionMessages(member, connectCopy)\n\n const status = NonConnectedStatuses.includes(member.connection_status)\n ? {\n color: 'error.main',\n ctaCopy: statusMessages.cta ?? '',\n icon: <ErrorIcon filled={true} sx={{ ...iconStyle }} />,\n mainMessage: statusMessages.statusName,\n secondaryMessage: `${statusMessages.title}.`,\n }\n : {\n color: 'success.main',\n icon: <CheckCircleRoundedIcon filled={true} sx={{ ...iconStyle }} />,\n mainMessage: statusMessages.statusName,\n secondaryMessage: statusMessages.title,\n }\n\n return (\n <>\n <ListSubheader sx={{ mb: 4, mt: 12, mx: 8 }}>\n <Text bold={true} component=\"h2\" variant=\"caption\">\n {accountsCopy.connection_status}\n </Text>\n </ListSubheader>\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: member.is_manual || !member.institution_url ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n {member.is_manual || !status.ctaCopy ? (\n <Stack alignItems=\"center\" direction=\"row\" px={24} py={12}>\n <ListItemAvatar>\n <IconBacking backingSx={{ backgroundColor: status.color, borderRadius: 1 }} size={32}>\n {status.icon}\n </IconBacking>\n </ListItemAvatar>\n <ListItemText primary={status.mainMessage} secondary={status.secondaryMessage} />\n </Stack>\n ) : (\n <ListItemButton onClick={() => setShouldShowConnectDrawer(true)}>\n <ListItemAvatar>\n <IconBacking backingSx={{ backgroundColor: status.color, borderRadius: 1 }} size={32}>\n {status.icon}\n </IconBacking>\n </ListItemAvatar>\n <ListItemText\n primary={status.mainMessage}\n secondary={\n status.secondaryMessage && (\n <>\n {status.secondaryMessage}{' '}\n <Text bold={true} sx={{ color: 'action.active' }} variant=\"caption\">\n {status.ctaCopy}\n </Text>\n </>\n )\n }\n />\n <Icon name=\"chevron_right\" />\n </ListItemButton>\n )}\n </ListItem>\n\n {!member.is_manual && member.institution_url && (\n <>\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n borderBottom: '1px solid',\n borderColor: 'divider',\n }}\n >\n <ListItemButton component=\"a\" href={member.institution_url} target=\"_blank\">\n <ListItemAvatar>\n <IconBacking\n backingSx={{\n backgroundColor: mode === 'light' ? 'grey.300' : 'grey.700',\n borderRadius: 1,\n }}\n size={32}\n >\n <LanguageRoundedIcon\n sx={{\n ...iconStyle,\n color: mode === 'light' ? 'grey.900' : 'common.white',\n }}\n />\n </IconBacking>\n </ListItemAvatar>\n <ListItemText primary={member.name} secondary={member.institution_url} />\n <Icon name=\"launch\" />\n </ListItemButton>\n </ListItem>\n </>\n )}\n\n {shouldShowConnectDrawer && (\n <ConnectDrawer\n loadWidgetProps={{ current_member_guid: member.guid }}\n onClose={() => setShouldShowConnectDrawer(false)}\n showConnectWidget={shouldShowConnectDrawer}\n title={accountsCopy.manage_connection}\n />\n )}\n </>\n )\n}\n\nexport default observer(AccountConnection)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,IAAM,IAAY;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AACV,GAEM,IAAA,MAA0B;AAC9B,QAAM,CAAC,GAAyB,CAAA,IAA8B,EAAM,SAAS,EAAK,GAC5E,EACJ,SAAS,EAAE,MAAA,EAAA,EAAA,IACT,EAAS,GACP,EAAE,gBAAgB,EAAA,IAAW,EAAkB,GAC/C,EAAE,UAAU,GAAc,SAAS,EAAA,IAAgB,EAAmB,GAEtE,IAAiB,EAAsB,GAAQ,CAAW,GAE1D,IAAS,EAAqB,SAAS,EAAO,iBAAiB,IACjE;AAAA,IACE,OAAO;AAAA,IACP,SAAS,EAAe,OAAO;AAAA,IAC/B,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAW,QAAQ;AAAA,MAAM,IAAI,EAAE,GAAG,EAAU;AAAA,IAAI,CAAA;AAAA,IACtD,aAAa,EAAe;AAAA,IAC5B,kBAAkB,GAAG,EAAe,KAAA;AAAA,EACtC,IACA;AAAA,IACE,OAAO;AAAA,IACP,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAwB,QAAQ;AAAA,MAAM,IAAI,EAAE,GAAG,EAAU;AAAA,IAAI,CAAA;AAAA,IACnE,aAAa,EAAe;AAAA,IAC5B,kBAAkB,EAAe;AAAA,EACnC;AAEJ,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD;AAAA,MAAe,IAAI;AAAA,QAAE,IAAI;AAAA,QAAG,IAAI;AAAA,QAAI,IAAI;AAAA,MAAE;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountConnection.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountConnection.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItem from '@mui/material/ListItem'\nimport ListItemAvatar from '@mui/material/ListItemAvatar'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\nimport ListSubheader from '@mui/material/ListSubheader'\nimport Stack from '@mui/material/Stack'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Icon, Text } from '@mxenabled/mxui'\nimport {\n CheckCircle as CheckCircleRoundedIcon,\n Error as ErrorIcon,\n Language as LanguageRoundedIcon,\n} from '@mxenabled/mx-icons'\n\nimport ConnectDrawer from '../../../../common/components/ConnectDrawer'\nimport { IconBacking, useGlobalCopyStore } from '../../../../common'\nimport { NonConnectedStatuses } from '../../../../core'\nimport { getConnectionMessages } from '../../../utils/getConnectionMessages'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\nconst iconStyle = {\n color: 'background.default',\n fontSize: 20,\n gridRow: 1,\n gridColumn: 1,\n zIndex: 2,\n}\n\nconst AccountConnection = () => {\n const [shouldShowConnectDrawer, setShouldShowConnectDrawer] = React.useState(false)\n const {\n palette: { mode },\n } = useTheme()\n const { selectedMember: member } = useAccountUiStore()\n const { accounts: accountsCopy, connect: connectCopy } = useGlobalCopyStore()\n\n const statusMessages = getConnectionMessages(member, connectCopy)\n\n const status = NonConnectedStatuses.includes(member.connection_status)\n ? {\n color: 'error.main',\n ctaCopy: statusMessages.cta ?? '',\n icon: <ErrorIcon filled={true} sx={{ ...iconStyle }} />,\n mainMessage: statusMessages.statusName,\n secondaryMessage: `${statusMessages.title}.`,\n }\n : {\n color: 'success.main',\n icon: <CheckCircleRoundedIcon filled={true} sx={{ ...iconStyle }} />,\n mainMessage: statusMessages.statusName,\n secondaryMessage: statusMessages.title,\n }\n\n return (\n <>\n <ListSubheader sx={{ mb: 4, mt: 12, mx: 8 }}>\n <Text bold={true} component=\"h2\" variant=\"caption\">\n {accountsCopy.connection_status}\n </Text>\n </ListSubheader>\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: member.is_manual || !member.institution_url ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n {member.is_manual || !status.ctaCopy ? (\n <Stack alignItems=\"center\" direction=\"row\" px={24} py={12}>\n <ListItemAvatar>\n <IconBacking backingSx={{ backgroundColor: status.color, borderRadius: 1 }} size={32}>\n {status.icon}\n </IconBacking>\n </ListItemAvatar>\n <ListItemText primary={status.mainMessage} secondary={status.secondaryMessage} />\n </Stack>\n ) : (\n <ListItemButton onClick={() => setShouldShowConnectDrawer(true)}>\n <ListItemAvatar>\n <IconBacking backingSx={{ backgroundColor: status.color, borderRadius: 1 }} size={32}>\n {status.icon}\n </IconBacking>\n </ListItemAvatar>\n <ListItemText\n primary={status.mainMessage}\n secondary={\n status.secondaryMessage && (\n <>\n {status.secondaryMessage}{' '}\n <Text bold={true} sx={{ color: 'action.active' }} variant=\"caption\">\n {status.ctaCopy}\n </Text>\n </>\n )\n }\n />\n <Icon name=\"chevron_right\" />\n </ListItemButton>\n )}\n </ListItem>\n\n {!member.is_manual && member.institution_url && (\n <>\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n borderBottom: '1px solid',\n borderColor: 'divider',\n }}\n >\n <ListItemButton component=\"a\" href={member.institution_url} target=\"_blank\">\n <ListItemAvatar>\n <IconBacking\n backingSx={{\n backgroundColor: mode === 'light' ? 'grey.300' : 'grey.700',\n borderRadius: 1,\n }}\n size={32}\n >\n <LanguageRoundedIcon\n sx={{\n ...iconStyle,\n color: mode === 'light' ? 'grey.900' : 'common.white',\n }}\n />\n </IconBacking>\n </ListItemAvatar>\n <ListItemText primary={member.name} secondary={member.institution_url} />\n <Icon name=\"launch\" />\n </ListItemButton>\n </ListItem>\n </>\n )}\n\n {shouldShowConnectDrawer && (\n <ConnectDrawer\n loadWidgetProps={{ current_member_guid: member.guid }}\n onClose={() => setShouldShowConnectDrawer(false)}\n showConnectWidget={shouldShowConnectDrawer}\n title={accountsCopy.manage_connection}\n />\n )}\n </>\n )\n}\n\nexport default observer(AccountConnection)\n"],"mappings":";;;;;;;;;;;;;;;;;;AAwBA,IAAM,IAAY;AAAA,EAChB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,QAAQ;AACV,GAEM,IAAA,MAA0B;AAC9B,QAAM,CAAC,GAAyB,CAAA,IAA8B,EAAM,SAAS,EAAK,GAC5E,EACJ,SAAS,EAAE,MAAA,EAAA,EAAA,IACT,EAAS,GACP,EAAE,gBAAgB,EAAA,IAAW,EAAkB,GAC/C,EAAE,UAAU,GAAc,SAAS,EAAA,IAAgB,EAAmB,GAEtE,IAAiB,EAAsB,GAAQ,CAAW,GAE1D,IAAS,EAAqB,SAAS,EAAO,iBAAiB,IACjE;AAAA,IACE,OAAO;AAAA,IACP,SAAS,EAAe,OAAO;AAAA,IAC/B,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAW,QAAQ;AAAA,MAAM,IAAI,EAAE,GAAG,EAAU;AAAA,IAAI,CAAA;AAAA,IACtD,aAAa,EAAe;AAAA,IAC5B,kBAAkB,GAAG,EAAe,KAAA;AAAA,EACtC,IACA;AAAA,IACE,OAAO;AAAA,IACP,MAAM,gBAAA,EAAC,GAAD;AAAA,MAAwB,QAAQ;AAAA,MAAM,IAAI,EAAE,GAAG,EAAU;AAAA,IAAI,CAAA;AAAA,IACnE,aAAa,EAAe;AAAA,IAC5B,kBAAkB,EAAe;AAAA,EACnC;AAEJ,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD;AAAA,MAAe,IAAI;AAAA,QAAE,IAAI;AAAA,QAAG,IAAI;AAAA,QAAI,IAAI;AAAA,MAAE;AAAA,MACxC,UAAA,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAM,WAAU;AAAA,QAAK,SA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C,mBAAmB;AAAA,MACnB,OAAO,EAAa;AAAA,IACrB,CAAA;AAAA,EAEH,EAAA,CAAA;AAEN,GAEA,IAAe,EAAS,CAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailEdit.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { addMonths } from 'date-fns/addMonths'\nimport { alpha } from '@mui/material/styles'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport { LocalizationProvider } from '@mui/x-date-pickers-pro'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport TextField from '@mui/material/TextField'\n\nimport { CurrencyInput, Dialog, useAccountStore, useGlobalCopyStore } from '../../../../common'\nimport { type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { FieldType } from '../../../constants/Accounts'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ninterface AccountDetailEditProps {\n field: AccountField\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailEdit: React.FC<AccountDetailEditProps> = ({ field, isOpen, onClose }) => {\n const { updateAccount } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const [editedValue, setEditedValue] = React.useState<any>(account[field.name])\n const [errorMessage, setErrorMessage] = React.useState('')\n const [hasValidCurrencyInput, setHasValidCurrencyInput] = React.useState(true)\n\n const handleClose = () => {\n setEditedValue('')\n setErrorMessage('')\n onClose()\n }\n\n const getEditableField = () => {\n switch (field.type) {\n case FieldType.Select: {\n return (\n <FormControl fullWidth={true}>\n <InputLabel id={`${field.label}-select-label`}>{field.label}</InputLabel>\n <Select\n displayEmpty={true}\n id={`${field.label}-select`}\n label={field.label}\n labelId={`${field.label}-select-label`}\n onChange={(e) => setEditedValue(e.target.value)}\n slotProps={{\n input: {\n sx: {\n backgroundColor: 'background.paper',\n },\n },\n }}\n value={editedValue}\n >\n {!editedValue && (\n <MenuItem disabled={true} value=\"\">\n {field.placeholder}\n </MenuItem>\n )}\n {field.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n }\n\n case FieldType.Currency: {\n return (\n <CurrencyInput\n amount={(editedValue as string | number) || ''}\n ariaLabel={field.placeholder}\n fullWidth={true}\n label={field.label}\n placeholder={field.placeholder}\n setAmount={setEditedValue}\n setHasValidInput={setHasValidCurrencyInput}\n />\n )\n }\n\n case FieldType.Date: {\n return (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={addMonths(new Date(), 1)}\n minDate={new Date()}\n onChange={(date: Date) => {\n if (account[field.name] && Number(account[field.name]) <= 31) {\n // gets and sets the day of the month to editedValue\n setEditedValue(date.getDate())\n } else {\n // the day of the month was already passed, so we set it directly to state\n setEditedValue(date)\n }\n }}\n sx={{\n '& .MuiPickersDay-today': {\n color: 'primary.lighter',\n },\n '& .MuiPickersArrowSwitcher-button': {\n color: 'primary.lighter',\n '&:hover': {\n backgroundColor: (theme) => alpha(theme.palette.primary.light, 0.1),\n },\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n )\n }\n\n default: {\n return (\n <TextField\n defaultValue={account[field.name]}\n error={!!errorMessage}\n fullWidth={true}\n helperText={errorMessage}\n onChange={updateField}\n placeholder={field.placeholder}\n slotProps={{\n htmlInput: {\n 'aria-label': field.placeholder,\n },\n }}\n />\n )\n }\n }\n }\n\n const saveField = () => {\n // prevents any unnecessary api calls\n if (account[field.name] !== editedValue) {\n updateAccount({\n ...account,\n [field.name]: editedValue,\n })\n }\n handleClose()\n }\n\n const updateField = (e: React.ChangeEvent<HTMLInputElement>) => {\n setEditedValue(e.target.value)\n\n if (field.validation) {\n setErrorMessage(field.validation(e.target.value))\n }\n }\n\n return (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_aria,\n title: buildDynamicCopy(accountsCopy.edit_field, field.label) as string,\n }}\n disablePrimaryButton={!!errorMessage || !hasValidCurrencyInput}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={saveField}\n primaryText={accountsCopy.save}\n sx={{\n '& .MuiButton-root:focus-visible, & .MuiButton-root:focus': {\n outline: '2px solid',\n outlineColor: 'primary.main',\n outlineOffset: '2px',\n },\n }}\n >\n {getEditableField()}\n </Dialog>\n )\n}\n\nexport default observer(AccountDetailEdit)\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,IAAM,IAAA,CAAuD,EAAE,OAAA,GAAO,QAAA,GAAQ,SAAA,EAAA,MAAc;AAC1F,QAAM,EAAE,eAAA,EAAA,IAAkB,EAAgB,GACpC,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAEhD,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAc,EAAQ,EAAM,IAAA,CAAK,GACvE,CAAC,GAAc,CAAA,IAAmB,EAAM,SAAS,EAAE,GACnD,CAAC,GAAuB,CAAA,IAA4B,EAAM,SAAS,EAAI,GAEvE,IAAA,MAAoB;AACxB,IAAA,EAAe,EAAE,GACjB,EAAgB,EAAE,GAClB,EAAQ;AAAA,EACV,GAEM,IAAA,MAAyB;AAC7B,YAAQ,EAAM,MAAd;AAAA,MACE,KAAK,EAAU;AACb,eACE,gBAAA,EAAC,GAAD;AAAA,UAAa,WAAW;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetailEdit.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailEdit.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { addMonths } from 'date-fns/addMonths'\nimport { alpha } from '@mui/material/styles'\n\nimport { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFnsV3'\nimport { DateCalendar } from '@mui/x-date-pickers/DateCalendar'\nimport FormControl from '@mui/material/FormControl'\nimport InputLabel from '@mui/material/InputLabel'\nimport { LocalizationProvider } from '@mui/x-date-pickers-pro'\nimport MenuItem from '@mui/material/MenuItem'\nimport Select from '@mui/material/Select'\nimport TextField from '@mui/material/TextField'\n\nimport { CurrencyInput, Dialog, useAccountStore, useGlobalCopyStore } from '../../../../common'\nimport { type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { FieldType } from '../../../constants/Accounts'\nimport { buildDynamicCopy } from '../../../../core/utils/Localization'\n\ninterface AccountDetailEditProps {\n field: AccountField\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailEdit: React.FC<AccountDetailEditProps> = ({ field, isOpen, onClose }) => {\n const { updateAccount } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const [editedValue, setEditedValue] = React.useState<any>(account[field.name])\n const [errorMessage, setErrorMessage] = React.useState('')\n const [hasValidCurrencyInput, setHasValidCurrencyInput] = React.useState(true)\n\n const handleClose = () => {\n setEditedValue('')\n setErrorMessage('')\n onClose()\n }\n\n const getEditableField = () => {\n switch (field.type) {\n case FieldType.Select: {\n return (\n <FormControl fullWidth={true}>\n <InputLabel id={`${field.label}-select-label`}>{field.label}</InputLabel>\n <Select\n displayEmpty={true}\n id={`${field.label}-select`}\n label={field.label}\n labelId={`${field.label}-select-label`}\n onChange={(e) => setEditedValue(e.target.value)}\n slotProps={{\n input: {\n sx: {\n backgroundColor: 'background.paper',\n },\n },\n }}\n value={editedValue}\n >\n {!editedValue && (\n <MenuItem disabled={true} value=\"\">\n {field.placeholder}\n </MenuItem>\n )}\n {field.options?.map((option) => (\n <MenuItem key={option.value} value={option.value}>\n {option.label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n }\n\n case FieldType.Currency: {\n return (\n <CurrencyInput\n amount={(editedValue as string | number) || ''}\n ariaLabel={field.placeholder}\n fullWidth={true}\n label={field.label}\n placeholder={field.placeholder}\n setAmount={setEditedValue}\n setHasValidInput={setHasValidCurrencyInput}\n />\n )\n }\n\n case FieldType.Date: {\n return (\n <LocalizationProvider dateAdapter={AdapterDateFns}>\n <DateCalendar\n maxDate={addMonths(new Date(), 1)}\n minDate={new Date()}\n onChange={(date: Date) => {\n if (account[field.name] && Number(account[field.name]) <= 31) {\n // gets and sets the day of the month to editedValue\n setEditedValue(date.getDate())\n } else {\n // the day of the month was already passed, so we set it directly to state\n setEditedValue(date)\n }\n }}\n sx={{\n '& .MuiPickersDay-today': {\n color: 'primary.lighter',\n },\n '& .MuiPickersArrowSwitcher-button': {\n color: 'primary.lighter',\n '&:hover': {\n backgroundColor: (theme) => alpha(theme.palette.primary.light, 0.1),\n },\n },\n }}\n views={['day']}\n />\n </LocalizationProvider>\n )\n }\n\n default: {\n return (\n <TextField\n defaultValue={account[field.name]}\n error={!!errorMessage}\n fullWidth={true}\n helperText={errorMessage}\n onChange={updateField}\n placeholder={field.placeholder}\n slotProps={{\n htmlInput: {\n 'aria-label': field.placeholder,\n },\n }}\n />\n )\n }\n }\n }\n\n const saveField = () => {\n // prevents any unnecessary api calls\n if (account[field.name] !== editedValue) {\n updateAccount({\n ...account,\n [field.name]: editedValue,\n })\n }\n handleClose()\n }\n\n const updateField = (e: React.ChangeEvent<HTMLInputElement>) => {\n setEditedValue(e.target.value)\n\n if (field.validation) {\n setErrorMessage(field.validation(e.target.value))\n }\n }\n\n return (\n <Dialog\n copy={{\n close_aria: accountsCopy.close_aria,\n title: buildDynamicCopy(accountsCopy.edit_field, field.label) as string,\n }}\n disablePrimaryButton={!!errorMessage || !hasValidCurrencyInput}\n isOpen={isOpen}\n onClose={handleClose}\n onPrimaryAction={saveField}\n primaryText={accountsCopy.save}\n sx={{\n '& .MuiButton-root:focus-visible, & .MuiButton-root:focus': {\n outline: '2px solid',\n outlineColor: 'primary.main',\n outlineOffset: '2px',\n },\n }}\n >\n {getEditableField()}\n </Dialog>\n )\n}\n\nexport default observer(AccountDetailEdit)\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0BA,IAAM,IAAA,CAAuD,EAAE,OAAA,GAAO,QAAA,GAAQ,SAAA,EAAA,MAAc;AAC1F,QAAM,EAAE,eAAA,EAAA,IAAkB,EAAgB,GACpC,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAEhD,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAc,EAAQ,EAAM,IAAA,CAAK,GACvE,CAAC,GAAc,CAAA,IAAmB,EAAM,SAAS,EAAE,GACnD,CAAC,GAAuB,CAAA,IAA4B,EAAM,SAAS,EAAI,GAEvE,IAAA,MAAoB;AACxB,IAAA,EAAe,EAAE,GACjB,EAAgB,EAAE,GAClB,EAAQ;AAAA,EACV,GAEM,IAAA,MAAyB;AAC7B,YAAQ,EAAM,MAAd;AAAA,MACE,KAAK,EAAU;AACb,eACE,gBAAA,EAAC,GAAD;AAAA,UAAa,WAAW;AAAA,UAAxB,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,YAAY,IAAI,GAAG,EAAM,KAAA;AAAA,YAAuB,UAAA,EAAM;AAAA,UAAkB,CAAA,GACxE,gBAAA,EAAC,GAAD;AAAA,YACE,cAAc;AAAA,YACd,IAAI,GAAG,EAAM,KAAA;AAAA,YACb,OAAO,EAAM;AAAA,YACb,SAAS,GAAG,EAAM,KAAA;AAAA,YAClB,UAAA,CAAW,MAAM,EAAe,EAAE,OAAO,KAAK;AAAA,YAC9C,WAAW,EACT,OAAO,EACL,IAAI,EACF,iBAAiB,mBACnB,EACF,EACF;AAAA,YACA,OAAO;AAAA,YAbT,UAAA,CAeG,CAAC,KACA,gBAAA,EAAC,GAAD;AAAA,cAAU,UAAU;AAAA,cAAM,OAAM;AA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AAM;AAAA,UACnB,WAAW,EACT,WAAW,EACT,cAAc,EAAM,YACtB,EACF;AAAA,QACD,CAAA;AAAA,IAGP;AAAA,EACF,GAEM,IAAA,MAAkB;AAEtB,IAAI,EAAQ,EAAM,IAAA,MAAU,KAC1B,EAAc;AAAA,MACZ,GAAG;AAAA,MACF,CAAA,EAAM,IAAA,GAAO;AAAA,IAChB,CAAC,GAEH,EAAY;AAAA,EACd,GAEM,IAAA,CAAe,MAA2C;AAC9D,IAAA,EAAe,EAAE,OAAO,KAAK,GAEzB,EAAM,cACR,EAAgB,EAAM,WAAW,EAAE,OAAO,KAAK,CAAC;AAAA,EAEpD;AAEA,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,MAAM;AAAA,MACJ,YAAY,EAAa;AAAA,MACzB,OAAO,EAAiB,EAAa,YAAY,EAAM,KAAK;AAAA,IAC9D;AAAA,IACA,sBAAsB,CAAC,CAAC,KAAgB,CAAC;AAAA,IACjC,QAAA;AAAA,IACR,SAAS;AAAA,IACT,iBAAiB;AAAA,IACjB,aAAa,EAAa;AAAA,IAC1B,IAAI,EACF,4DAA4D;AAAA,MAC1D,SAAS;AAAA,MACT,cAAc;AAAA,MACd,eAAe;AAAA,IACjB,EACF;AAAA,IAEC,UAAA,EAAiB;AAAA,EACZ,CAAA;AAEZ,GAEA,KAAe,EAAS,CAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetails.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetails.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItem from '@mui/material/ListItem'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport AccountDetailEdit from './AccountDetailEdit'\n\nimport { getAccountDetailFields, type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { useEvent, useGlobalCopyStore } from '../../../../common'\n\nconst AccountDetails = () => {\n const widgetProfile = window.app?.config\n\n const { onEvent } = useEvent()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const fields = getAccountDetailFields(account, accountsCopy)\n const canEdit =\n account.member_is_managed_by_user ||\n (!account.member_is_managed_by_user && widgetProfile.enable_renaming_home_accounts)\n\n const [showEditDialog, setShowEditDialog] = React.useState(false)\n const [fieldToEdit, setFieldToEdit] = React.useState<AccountField>(fields[0])\n\n const displayableFields = fields.filter(\n (field) => canEdit || account[field.name] || account[field.name] === 0,\n )\n\n return (\n <>\n {displayableFields.map((field) => {\n const hasValue = account[field.name] || account[field.name] === 0\n const isLast = displayableFields.indexOf(field) === displayableFields.length - 1\n\n const content = (\n <ListItemText\n disableTypography={true}\n primary={<Text sx={{ fontSize: 11 }}>{field.label}</Text>}\n secondary={\n <Text bold={true} sx={{ fontSize: 15 }}>\n {hasValue\n ? (field.valueFormatter(account[field.name]) as string)\n : field.placeholder}\n </Text>\n }\n />\n )\n\n return (\n <React.Fragment key={field.name}>\n {canEdit ? (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n px: 0,\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n <ListItemButton\n onClick={() => {\n setFieldToEdit(field)\n setShowEditDialog(true)\n if (field?.event) onEvent(field.event, { account_guid: account.guid })\n }}\n >\n {content}\n <Icon name=\"chevron_right\" />\n </ListItemButton>\n </ListItem>\n ) : (\n hasValue && (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n px: 24,\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n {content}\n </ListItem>\n )\n )}\n </React.Fragment>\n )\n })}\n {showEditDialog && fieldToEdit && (\n <AccountDetailEdit\n field={fieldToEdit}\n isOpen={showEditDialog}\n onClose={() => setShowEditDialog(false)}\n />\n )}\n </>\n )\n}\n\nexport default observer(AccountDetails)\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,IAAA,MAAuB;AAC3B,QAAM,IAAgB,OAAO,KAAK,QAE5B,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAEhD,IAAS,EAAuB,GAAS,CAAY,GACrD,IACJ,EAAQ,6BACP,CAAC,EAAQ,6BAA6B,EAAc,+BAEjD,CAAC,GAAgB,CAAA,IAAqB,EAAM,SAAS,EAAK,GAC1D,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAuB,EAAO,CAAA,CAAE,GAEtE,IAAoB,EAAO,OAAA,CAC9B,MAAU,KAAW,EAAQ,EAAM,IAAA,KAAS,EAAQ,EAAM,IAAA,MAAU,CACvE;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACG,EAAkB,IAAA,CAAK,MAAU;AAChC,UAAM,IAAW,EAAQ,EAAM,IAAA,KAAS,EAAQ,EAAM,IAAA,MAAU,GAC1D,IAAS,EAAkB,QAAQ,CAAK,MAAM,EAAkB,SAAS,GAEzE,IACJ,gBAAA,EAAC,GAAD;AAAA,MACE,mBAAmB;AAAA,MACnB,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI,EAAE,UAAU,GAAG;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetails.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetails.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport ListItem from '@mui/material/ListItem'\nimport ListItemButton from '@mui/material/ListItemButton'\nimport ListItemText from '@mui/material/ListItemText'\n\nimport { Icon, Text } from '@mxenabled/mxui'\n\nimport AccountDetailEdit from './AccountDetailEdit'\n\nimport { getAccountDetailFields, type AccountField } from '../../../utils/AccountFields'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { useEvent, useGlobalCopyStore } from '../../../../common'\n\nconst AccountDetails = () => {\n const widgetProfile = window.app?.config\n\n const { onEvent } = useEvent()\n const { selectedAccount: account } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n const fields = getAccountDetailFields(account, accountsCopy)\n const canEdit =\n account.member_is_managed_by_user ||\n (!account.member_is_managed_by_user && widgetProfile.enable_renaming_home_accounts)\n\n const [showEditDialog, setShowEditDialog] = React.useState(false)\n const [fieldToEdit, setFieldToEdit] = React.useState<AccountField>(fields[0])\n\n const displayableFields = fields.filter(\n (field) => canEdit || account[field.name] || account[field.name] === 0,\n )\n\n return (\n <>\n {displayableFields.map((field) => {\n const hasValue = account[field.name] || account[field.name] === 0\n const isLast = displayableFields.indexOf(field) === displayableFields.length - 1\n\n const content = (\n <ListItemText\n disableTypography={true}\n primary={<Text sx={{ fontSize: 11 }}>{field.label}</Text>}\n secondary={\n <Text bold={true} sx={{ fontSize: 15 }}>\n {hasValue\n ? (field.valueFormatter(account[field.name]) as string)\n : field.placeholder}\n </Text>\n }\n />\n )\n\n return (\n <React.Fragment key={field.name}>\n {canEdit ? (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n px: 0,\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n <ListItemButton\n onClick={() => {\n setFieldToEdit(field)\n setShowEditDialog(true)\n if (field?.event) onEvent(field.event, { account_guid: account.guid })\n }}\n >\n {content}\n <Icon name=\"chevron_right\" />\n </ListItemButton>\n </ListItem>\n ) : (\n hasValue && (\n <ListItem\n sx={{\n backgroundColor: 'background.paper',\n px: 24,\n position: 'relative',\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n bottom: 0,\n right: 0,\n left: isLast ? 0 : 24,\n borderBottom: '1px solid',\n borderColor: 'divider',\n },\n }}\n >\n {content}\n </ListItem>\n )\n )}\n </React.Fragment>\n )\n })}\n {showEditDialog && fieldToEdit && (\n <AccountDetailEdit\n field={fieldToEdit}\n isOpen={showEditDialog}\n onClose={() => setShowEditDialog(false)}\n />\n )}\n </>\n )\n}\n\nexport default observer(AccountDetails)\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,IAAA,MAAuB;AAC3B,QAAM,IAAgB,OAAO,KAAK,QAE5B,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAEhD,IAAS,EAAuB,GAAS,CAAY,GACrD,IACJ,EAAQ,6BACP,CAAC,EAAQ,6BAA6B,EAAc,+BAEjD,CAAC,GAAgB,CAAA,IAAqB,EAAM,SAAS,EAAK,GAC1D,CAAC,GAAa,CAAA,IAAkB,EAAM,SAAuB,EAAO,CAAA,CAAE,GAEtE,IAAoB,EAAO,OAAA,CAC9B,MAAU,KAAW,EAAQ,EAAM,IAAA,KAAS,EAAQ,EAAM,IAAA,MAAU,CACvE;AAEA,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACG,EAAkB,IAAA,CAAK,MAAU;AAChC,UAAM,IAAW,EAAQ,EAAM,IAAA,KAAS,EAAQ,EAAM,IAAA,MAAU,GAC1D,IAAS,EAAkB,QAAQ,CAAK,MAAM,EAAkB,SAAS,GAEzE,IACJ,gBAAA,EAAC,GAAD;AAAA,MACE,mBAAmB;AAAA,MACnB,SAAS,gBAAA,EAAC,GAAD;AAAA,QAAM,IAAI,EAAE,UAAU,GAAG;AAAA,QAAI,UAAA,EAAM;AAAA,MAAY,CAAA;AAAA,MACxD,WACE,gBAAA,EAAC,GAAD;AAAA,QAAM,MAAM;AAAA,QAAM,IAAI,EAAE,UAAU,GAAG;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
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsChart.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport CardHeader from '@mui/material/CardHeader'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport { Loader, useCategoryStore, useGlobalStore } from '../../../../common'\nimport { MiniWidgetProps } from '../../../../core'\n\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface AccountDetailsChartProps extends MiniWidgetProps {\n ChartComponent?: React.ComponentType\n header?: string\n}\n\nconst AccountDetailsChart: React.FC<AccountDetailsChartProps> = ({\n sx,\n ChartComponent,\n header,\n}) => {\n const { loadMonthlyCategoryTotals } = useCategoryStore()\n const { isInitialized } = useGlobalStore()\n const { selectedAccount } = useAccountUiStore()\n\n const [isWidgetInitialized, setIsWidgetInitialized] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadMonthlyCategoryTotals([selectedAccount]).finally(() => {\n setIsWidgetInitialized(true)\n })\n }\n }, [isInitialized, selectedAccount])\n\n if (!isInitialized || !isWidgetInitialized) {\n return <Loader />\n }\n\n return (\n <Card\n sx={{\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n ...sx,\n }}\n >\n <CardHeader sx={{ pb: 0 }} title={<H3 sx={{ pb: 4 }}>{header}</H3>} />\n\n <CardContent sx={{ p: 0 }}>{ChartComponent ? <ChartComponent /> : null}</CardContent>\n </Card>\n )\n}\n\nexport default observer(AccountDetailsChart)\n"],"mappings":";;;;;;;;;;AAmBA,IAAM,IAAA,CAA2D,EAC/D,IAAA,GACA,gBAAA,GACA,QAAA,EAAA,MACI;AACJ,QAAM,EAAE,2BAAA,EAAA,IAA8B,EAAiB,GACjD,EAAE,eAAA,EAAA,IAAkB,EAAe,GACnC,EAAE,iBAAA,EAAA,IAAoB,EAAkB,GAExC,CAAC,GAAqB,CAAA,IAA0B,EAAM,SAAS,EAAK;AAU1E,SARA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAA0B,CAAC,CAAe,CAAC,EAAE,QAAA,MAAc;AACzD,MAAA,EAAuB,EAAI;AAAA,IAC7B,CAAC;AAAA,EAEL,GAAG,CAAC,GAAe,CAAe,CAAC,GAE/B,CAAC,KAAiB,CAAC,IACd,gBAAA,EAAC,GAAD,CAAS,CAAA,IAIhB,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,qCAAqC,EACnC,IAAI,EACN;AAAA,MACA,GAAG;AAAA,IACL;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetailsChart.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Card from '@mui/material/Card'\nimport CardContent from '@mui/material/CardContent'\nimport CardHeader from '@mui/material/CardHeader'\n\nimport { H3 } from '@mxenabled/mxui'\n\nimport { Loader, useCategoryStore, useGlobalStore } from '../../../../common'\nimport { MiniWidgetProps } from '../../../../core'\n\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface AccountDetailsChartProps extends MiniWidgetProps {\n ChartComponent?: React.ComponentType\n header?: string\n}\n\nconst AccountDetailsChart: React.FC<AccountDetailsChartProps> = ({\n sx,\n ChartComponent,\n header,\n}) => {\n const { loadMonthlyCategoryTotals } = useCategoryStore()\n const { isInitialized } = useGlobalStore()\n const { selectedAccount } = useAccountUiStore()\n\n const [isWidgetInitialized, setIsWidgetInitialized] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadMonthlyCategoryTotals([selectedAccount]).finally(() => {\n setIsWidgetInitialized(true)\n })\n }\n }, [isInitialized, selectedAccount])\n\n if (!isInitialized || !isWidgetInitialized) {\n return <Loader />\n }\n\n return (\n <Card\n sx={{\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n ...sx,\n }}\n >\n <CardHeader sx={{ pb: 0 }} title={<H3 sx={{ pb: 4 }}>{header}</H3>} />\n\n <CardContent sx={{ p: 0 }}>{ChartComponent ? <ChartComponent /> : null}</CardContent>\n </Card>\n )\n}\n\nexport default observer(AccountDetailsChart)\n"],"mappings":";;;;;;;;;;AAmBA,IAAM,IAAA,CAA2D,EAC/D,IAAA,GACA,gBAAA,GACA,QAAA,EAAA,MACI;AACJ,QAAM,EAAE,2BAAA,EAAA,IAA8B,EAAiB,GACjD,EAAE,eAAA,EAAA,IAAkB,EAAe,GACnC,EAAE,iBAAA,EAAA,IAAoB,EAAkB,GAExC,CAAC,GAAqB,CAAA,IAA0B,EAAM,SAAS,EAAK;AAU1E,SARA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAA0B,CAAC,CAAe,CAAC,EAAE,QAAA,MAAc;AACzD,MAAA,EAAuB,EAAI;AAAA,IAC7B,CAAC;AAAA,EAEL,GAAG,CAAC,GAAe,CAAe,CAAC,GAE/B,CAAC,KAAiB,CAAC,IACd,gBAAA,EAAC,GAAD,CAAS,CAAA,IAIhB,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,qCAAqC,EACnC,IAAI,EACN;AAAA,MACA,GAAG;AAAA,IACL;AAAA,IANF,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,MAAY,IAAI,EAAE,IAAI,EAAE;AAAA,MAAG,OAAO,gBAAA,EAAC,GAAD;AAAA,QAAI,IAAI,EAAE,IAAI,EAAE;AAAA,QAAI,UAAA;AAAA,MAAW,CAAA;AAAA,IAAI,CAAA,GAErE,gBAAA,EAAC,GAAD;AAAA,MAAa,IAAI,EAAE,GAAG,EAAE;AAAA,MAAI,UAAA,IAAiB,gBAAA,EAAC,GAAD,CAAiB,CAAA,IAAI;AAAA,IAAkB,CAAA,CAChF;AAAA;AAEV,GAEA,IAAe,EAAS,CAAmB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsContent.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { TabContentContainer, useGlobalCopyStore } from '../../../../common'\n\nimport AccountDetailsTab from './AccountDetailsTab'\nimport ConnectionErrorMessage from './ConnectionErrorMessage'\nimport TransactionsTab from '../Transactions/TransactionsTab'\n\nconst AccountDetailsContent = () => {\n const [tabValue, setTabValue] = React.useState(0)\n\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n return (\n <>\n <ConnectionErrorMessage setTabValue={setTabValue} />\n\n <Tabs\n aria-label={accountsCopy.transactions_and_details_aria}\n centered={true}\n onChange={(_, val) => setTabValue(val)}\n textColor=\"primary\"\n value={tabValue}\n variant=\"fullWidth\"\n >\n <Tab\n aria-controls=\"transaction-details-tabpanel-0\"\n id=\"transaction-details-tab-0\"\n label={accountsCopy.transactions}\n />\n <Tab\n aria-controls=\"account-details-tabpanel-1\"\n id=\"account-details-tab-1\"\n label={accountsCopy.account_details}\n />\n </Tabs>\n\n <TabContentContainer index={0} name=\"transaction-details\" value={tabValue}>\n <TransactionsTab />\n </TabContentContainer>\n\n <TabContentContainer index={1} name=\"account-details\" value={tabValue}>\n <AccountDetailsTab />\n </TabContentContainer>\n </>\n )\n}\n\nexport default observer(AccountDetailsContent)\n"],"mappings":";;;;;;;;;;AAYA,IAAM,IAAA,MAA8B;AAClC,QAAM,CAAC,GAAU,CAAA,IAAe,EAAM,SAAS,CAAC,GAE1C,EAAE,UAAU,EAAA,IAAiB,EAAmB;AAEtD,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD,EAAqC,aAAA,EAAc,CAAA;AAAA,IAEnD,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAa;AAAA,MACzB,UAAU;AAAA,MACV,UAAA,CAAW,GAAG,MAAQ,EAAY,CAAG;AAAA,MACrC,WAAU;AAAA,MACV,OAAO;AAAA,MACP,SAAQ;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetailsContent.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsContent.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Tab from '@mui/material/Tab'\nimport Tabs from '@mui/material/Tabs'\n\nimport { TabContentContainer, useGlobalCopyStore } from '../../../../common'\n\nimport AccountDetailsTab from './AccountDetailsTab'\nimport ConnectionErrorMessage from './ConnectionErrorMessage'\nimport TransactionsTab from '../Transactions/TransactionsTab'\n\nconst AccountDetailsContent = () => {\n const [tabValue, setTabValue] = React.useState(0)\n\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n return (\n <>\n <ConnectionErrorMessage setTabValue={setTabValue} />\n\n <Tabs\n aria-label={accountsCopy.transactions_and_details_aria}\n centered={true}\n onChange={(_, val) => setTabValue(val)}\n textColor=\"primary\"\n value={tabValue}\n variant=\"fullWidth\"\n >\n <Tab\n aria-controls=\"transaction-details-tabpanel-0\"\n id=\"transaction-details-tab-0\"\n label={accountsCopy.transactions}\n />\n <Tab\n aria-controls=\"account-details-tabpanel-1\"\n id=\"account-details-tab-1\"\n label={accountsCopy.account_details}\n />\n </Tabs>\n\n <TabContentContainer index={0} name=\"transaction-details\" value={tabValue}>\n <TransactionsTab />\n </TabContentContainer>\n\n <TabContentContainer index={1} name=\"account-details\" value={tabValue}>\n <AccountDetailsTab />\n </TabContentContainer>\n </>\n )\n}\n\nexport default observer(AccountDetailsContent)\n"],"mappings":";;;;;;;;;;AAYA,IAAM,IAAA,MAA8B;AAClC,QAAM,CAAC,GAAU,CAAA,IAAe,EAAM,SAAS,CAAC,GAE1C,EAAE,UAAU,EAAA,IAAiB,EAAmB;AAEtD,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA;AAAA,IACE,gBAAA,EAAC,GAAD,EAAqC,aAAA,EAAc,CAAA;AAAA,IAEnD,gBAAA,EAAC,GAAD;AAAA,MACE,cAAY,EAAa;AAAA,MACzB,UAAU;AAAA,MACV,UAAA,CAAW,GAAG,MAAQ,EAAY,CAAG;AAAA,MACrC,WAAU;AAAA,MACV,OAAO;AAAA,MACP,SAAQ;AAAA,MANV,UAAA,CAQE,gBAAA,EAAC,GAAD;AAAA,QACE,iBAAc;AAAA,QACd,IAAG;AAAA,QACH,OAAO,EAAa;AAAA,MACrB,CAAA,GACD,gBAAA,EAAC,GAAD;AAAA,QACE,iBAAc;AAAA,QACd,IAAG;AAAA,QACH,OAAO,EAAa;AAAA,MACrB,CAAA,CACG;AAAA;IAEN,gBAAA,EAAC,GAAD;AAAA,MAAqB,OAAO;AAAA,MAAG,MAAK;AAAA,MAAsB,OAAO;AAAA,MAC/D,UAAA,gBAAA,EAAC,GAAD,CAAkB,CAAA;AAAA,IACC,CAAA;AAAA,IAErB,gBAAA,EAAC,GAAD;AAAA,MAAqB,OAAO;AAAA,MAAG,MAAK;AAAA,MAAkB,OAAO;AAAA,MAC3D,UAAA,gBAAA,EAAC,GAAD,CAAoB,CAAA;AAAA,IACD,CAAA;AAAA,EACrB,EAAA,CAAA;AAEN,GAEA,IAAe,EAAS,CAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsDrawer.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.tsx"],"sourcesContent":["import { Drawer, useGlobalCopyStore } from '../../../../common'\nimport TrendsChart from '../../../../trends/components/TrendsChart'\n\nimport AccountDetailsContent from './AccountDetailsContent'\nimport AccountDetailsHeader from './AccountDetailsHeader'\n\ninterface AccountDetailsDrawerProps {\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailsDrawer = ({ isOpen, onClose }: AccountDetailsDrawerProps) => {\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n return (\n <Drawer\n ariaLabelClose={accountsCopy.close_account_details_aria}\n isOpen={isOpen}\n onClose={onClose}\n title={accountsCopy.account_details}\n >\n <AccountDetailsHeader ChartComponent={TrendsChart} />\n\n <AccountDetailsContent />\n </Drawer>\n )\n}\n\nexport default AccountDetailsDrawer\n"],"mappings":";;;;;;AAWA,IAAM,IAAA,CAAwB,EAAE,QAAA,GAAQ,SAAA,EAAA,MAAyC;AAC/E,QAAM,EAAE,UAAU,EAAA,IAAiB,EAAmB;AAEtD,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAa;AAAA,IACrB,QAAA;AAAA,IACC,SAAA;AAAA,IACT,OAAO,EAAa;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetailsDrawer.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsDrawer.tsx"],"sourcesContent":["import { Drawer, useGlobalCopyStore } from '../../../../common'\nimport TrendsChart from '../../../../trends/components/TrendsChart'\n\nimport AccountDetailsContent from './AccountDetailsContent'\nimport AccountDetailsHeader from './AccountDetailsHeader'\n\ninterface AccountDetailsDrawerProps {\n isOpen: boolean\n onClose: () => void\n}\n\nconst AccountDetailsDrawer = ({ isOpen, onClose }: AccountDetailsDrawerProps) => {\n const { accounts: accountsCopy } = useGlobalCopyStore()\n\n return (\n <Drawer\n ariaLabelClose={accountsCopy.close_account_details_aria}\n isOpen={isOpen}\n onClose={onClose}\n title={accountsCopy.account_details}\n >\n <AccountDetailsHeader ChartComponent={TrendsChart} />\n\n <AccountDetailsContent />\n </Drawer>\n )\n}\n\nexport default AccountDetailsDrawer\n"],"mappings":";;;;;;AAWA,IAAM,IAAA,CAAwB,EAAE,QAAA,GAAQ,SAAA,EAAA,MAAyC;AAC/E,QAAM,EAAE,UAAU,EAAA,IAAiB,EAAmB;AAEtD,SACE,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAa;AAAA,IACrB,QAAA;AAAA,IACC,SAAA;AAAA,IACT,OAAO,EAAa;AAAA,IAJtB,UAAA,CAME,gBAAA,EAAC,GAAD,EAAsB,gBAAgB,EAAc,CAAA,GAEpD,gBAAA,EAAC,GAAD,CAAwB,CAAA,CAClB;AAAA;AAEZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDetailsHeader.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { H2, InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport {\n useAccountStore,\n INCOME_ACCOUNT_TYPES,\n PAYMENT_ACCOUNT_TYPES,\n SPENDING_ACCOUNT_TYPES,\n useAccountDisplayName,\n useGlobalCopyStore,\n useAppConfig,\n} from '../../../../common'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { getAccountBalanceDetails } from '../../../utils/AccountFields'\nimport { getChartLabels } from '../../../utils/AccountDetails'\n\nimport AccountDetailsChart from './AccountDetailsChart'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface AccountDetailsHeaderProps {\n ChartComponent?: React.ComponentType\n customDetailsChart?: React.ReactElement\n}\n\nconst AccountDetailsHeader = ({\n customDetailsChart,\n ChartComponent,\n}: AccountDetailsHeaderProps) => {\n const { institutions } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { config } = useAppConfig()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { firstSubtitle, firstValue, hasAvailableBalance, secondSubtitle, secondValue } =\n getAccountBalanceDetails(account, accountsCopy, config.display_available_balance_in_accounts)\n\n const institution = institutions.find(\n (institution) => institution.guid === account?.institution_guid,\n )\n\n const showChart = [\n ...INCOME_ACCOUNT_TYPES,\n ...PAYMENT_ACCOUNT_TYPES,\n ...SPENDING_ACCOUNT_TYPES,\n ].includes(account.account_type)\n\n const displayName = useAccountDisplayName(account)\n\n const { title, description } = getChartLabels(account.account_type, accountsCopy)\n\n return (\n <Stack bgcolor=\"background.default\" p={24}>\n <Stack gap={12}>\n <InstitutionLogo\n alt={accountsCopy.institution_logo_alt}\n institutionGuid={account.institution_guid || ''}\n size={64}\n />\n <Text variant=\"body2\">{institution?.name}</Text>\n </Stack>\n <Stack gap={8} mb={24} mt={4}>\n <H2>{displayName}</H2>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Text bold={hasAvailableBalance} variant=\"body1\">\n {firstSubtitle}\n </Text>\n <Text bold={true} variant=\"body1\">\n {formatCurrency(firstValue, '0,0.00')}\n </Text>\n </Stack>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Text variant=\"body2\">{secondSubtitle}</Text>\n <Text variant=\"body2\">{secondValue}</Text>\n </Stack>\n </Stack>\n {showChart && (\n <Stack aria-label={description} role=\"img\">\n {customDetailsChart ? (\n customDetailsChart\n ) : (\n <AccountDetailsChart ChartComponent={ChartComponent} header={title} />\n )}\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(AccountDetailsHeader)\n"],"mappings":";;;;;;;;;;;;AA2BA,IAAM,IAAA,CAAwB,EAC5B,oBAAA,GACA,gBAAA,EAAA,MAC+B;AAC/B,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAgB,GACnC,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,EAAE,eAAA,GAAe,YAAA,GAAY,qBAAA,GAAqB,gBAAA,GAAgB,aAAA,EAAA,IACtE,EAAyB,GAAS,GAAc,EAAO,qCAAqC,GAExF,IAAc,EAAa,KAAA,CAC9B,MAAgB,EAAY,SAAS,GAAS,gBACjD,GAEM,IAAY;AAAA,IAChB,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL,EAAE,SAAS,EAAQ,YAAY,GAEzB,IAAc,EAAsB,CAAO,GAE3C,EAAE,OAAA,GAAO,aAAA,EAAA,IAAgB,EAAe,EAAQ,cAAc,CAAY;AAEhF,SACE,gBAAA,EAAC,GAAD;AAAA,IAAO,SAAQ;AAAA,IAAqB,GAAG;AAAA,
|
|
1
|
+
{"version":3,"file":"AccountDetailsHeader.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.tsx"],"sourcesContent":["import { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport { H2, InstitutionLogo, Text } from '@mxenabled/mxui'\n\nimport {\n useAccountStore,\n INCOME_ACCOUNT_TYPES,\n PAYMENT_ACCOUNT_TYPES,\n SPENDING_ACCOUNT_TYPES,\n useAccountDisplayName,\n useGlobalCopyStore,\n useAppConfig,\n} from '../../../../common'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\nimport { getAccountBalanceDetails } from '../../../utils/AccountFields'\nimport { getChartLabels } from '../../../utils/AccountDetails'\n\nimport AccountDetailsChart from './AccountDetailsChart'\nimport { formatCurrency } from '../../../../core/utils/NumberFormatting'\n\ninterface AccountDetailsHeaderProps {\n ChartComponent?: React.ComponentType\n customDetailsChart?: React.ReactElement\n}\n\nconst AccountDetailsHeader = ({\n customDetailsChart,\n ChartComponent,\n}: AccountDetailsHeaderProps) => {\n const { institutions } = useAccountStore()\n const { selectedAccount: account } = useAccountUiStore()\n const { config } = useAppConfig()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { firstSubtitle, firstValue, hasAvailableBalance, secondSubtitle, secondValue } =\n getAccountBalanceDetails(account, accountsCopy, config.display_available_balance_in_accounts)\n\n const institution = institutions.find(\n (institution) => institution.guid === account?.institution_guid,\n )\n\n const showChart = [\n ...INCOME_ACCOUNT_TYPES,\n ...PAYMENT_ACCOUNT_TYPES,\n ...SPENDING_ACCOUNT_TYPES,\n ].includes(account.account_type)\n\n const displayName = useAccountDisplayName(account)\n\n const { title, description } = getChartLabels(account.account_type, accountsCopy)\n\n return (\n <Stack bgcolor=\"background.default\" p={24}>\n <Stack gap={12}>\n <InstitutionLogo\n alt={accountsCopy.institution_logo_alt}\n institutionGuid={account.institution_guid || ''}\n size={64}\n />\n <Text variant=\"body2\">{institution?.name}</Text>\n </Stack>\n <Stack gap={8} mb={24} mt={4}>\n <H2>{displayName}</H2>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Text bold={hasAvailableBalance} variant=\"body1\">\n {firstSubtitle}\n </Text>\n <Text bold={true} variant=\"body1\">\n {formatCurrency(firstValue, '0,0.00')}\n </Text>\n </Stack>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n <Text variant=\"body2\">{secondSubtitle}</Text>\n <Text variant=\"body2\">{secondValue}</Text>\n </Stack>\n </Stack>\n {showChart && (\n <Stack aria-label={description} role=\"img\">\n {customDetailsChart ? (\n customDetailsChart\n ) : (\n <AccountDetailsChart ChartComponent={ChartComponent} header={title} />\n )}\n </Stack>\n )}\n </Stack>\n )\n}\n\nexport default observer(AccountDetailsHeader)\n"],"mappings":";;;;;;;;;;;;AA2BA,IAAM,IAAA,CAAwB,EAC5B,oBAAA,GACA,gBAAA,EAAA,MAC+B;AAC/B,QAAM,EAAE,cAAA,EAAA,IAAiB,EAAgB,GACnC,EAAE,iBAAiB,EAAA,IAAY,EAAkB,GACjD,EAAE,QAAA,EAAA,IAAW,EAAa,GAC1B,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,EAAE,eAAA,GAAe,YAAA,GAAY,qBAAA,GAAqB,gBAAA,GAAgB,aAAA,EAAA,IACtE,EAAyB,GAAS,GAAc,EAAO,qCAAqC,GAExF,IAAc,EAAa,KAAA,CAC9B,MAAgB,EAAY,SAAS,GAAS,gBACjD,GAEM,IAAY;AAAA,IAChB,GAAG;AAAA,IACH,GAAG;AAAA,IACH,GAAG;AAAA,EACL,EAAE,SAAS,EAAQ,YAAY,GAEzB,IAAc,EAAsB,CAAO,GAE3C,EAAE,OAAA,GAAO,aAAA,EAAA,IAAgB,EAAe,EAAQ,cAAc,CAAY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AAA;AAAA,UAAgB,QAAQ;AAAA,QAAQ,CAAA;AAAA,MAElE,CAAA;AAAA,IAEJ;AAAA;AAEX,GAEA,IAAe,EAAS,CAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectionErrorMessage.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Alert from '@mui/material/Alert'\nimport AlertTitle from '@mui/material/AlertTitle'\nimport Link from '@mui/material/Link'\nimport Paper from '@mui/material/Paper'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Error as ErrorIcon } from '@mxenabled/mx-icons'\n\nimport ConnectDrawer from '../../../../common/components/ConnectDrawer'\n\nimport {\n getConnectionMessages,\n ConnectionMessageObject,\n} from '../../../utils/getConnectionMessages'\nimport { useGlobalCopyStore } from '../../../../common'\nimport { NonConnectedStatuses } from '../../../../core'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface ConnectionErrorMessageProps {\n setTabValue: (val: number) => void\n}\n\nconst ConnectionErrorMessage: React.FC<ConnectionErrorMessageProps> = ({ setTabValue }) => {\n const [shouldShowConnectDrawer, setShouldShowConnectDrawer] = React.useState(false)\n\n const { selectedMember: member } = useAccountUiStore()\n const { accounts: accountsCopy, connect: connectCopy } = useGlobalCopyStore()\n\n const hasError =\n member.connection_status && NonConnectedStatuses.includes(member.connection_status)\n\n React.useEffect(() => {\n if (hasError) {\n setTabValue(1)\n }\n }, [hasError])\n\n if (!hasError) return\n\n const statusMessages: ConnectionMessageObject = getConnectionMessages(member, connectCopy)\n\n // eslint-disable-next-line consistent-return\n return (\n <>\n <Paper\n sx={{\n mb: 16,\n mt: 24,\n mx: 24,\n }}\n >\n <Alert\n icon={<ErrorIcon filled={true} />}\n role=\"none\"\n severity=\"error\"\n sx={{\n borderLeft: 5,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderColor: 'error.main',\n color: 'text.primary',\n '&.MuiPaper-root': {\n backgroundColor: 'background.paper',\n },\n }}\n >\n {statusMessages.title && (\n <AlertTitle sx={{ fontWeight: 600, marginTop: 2 }} variant=\"body1\">\n {statusMessages.title}\n </AlertTitle>\n )}\n <Text component=\"p\" variant=\"subtitle2\">\n {statusMessages.main}\n </Text>\n {statusMessages.cta && (\n <Link\n onClick={() => setShouldShowConnectDrawer(true)}\n sx={{ fontSize: 15, fontWeight: 600, ml: 0 }}\n >\n {statusMessages.cta}\n </Link>\n )}\n </Alert>\n </Paper>\n\n {shouldShowConnectDrawer && (\n <ConnectDrawer\n loadWidgetProps={{ current_member_guid: member.guid }}\n onClose={() => setShouldShowConnectDrawer(false)}\n showConnectWidget={shouldShowConnectDrawer}\n title={accountsCopy.manage_connection}\n />\n )}\n </>\n )\n}\n\nexport default observer(ConnectionErrorMessage)\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,IAAA,CAAiE,EAAE,aAAA,EAAA,MAAkB;AACzF,QAAM,CAAC,GAAyB,CAAA,IAA8B,EAAM,SAAS,EAAK,GAE5E,EAAE,gBAAgB,EAAA,IAAW,EAAkB,GAC/C,EAAE,UAAU,GAAc,SAAS,EAAA,IAAgB,EAAmB,GAEtE,IACJ,EAAO,qBAAqB,EAAqB,SAAS,EAAO,iBAAiB;AAQpF,MANA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAAY,CAAC;AAAA,EAEjB,GAAG,CAAC,CAAQ,CAAC,GAET,CAAC,EAAU;AAEf,QAAM,IAA0C,EAAsB,GAAQ,CAAW;AAGzF,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,
|
|
1
|
+
{"version":3,"file":"ConnectionErrorMessage.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Accounts/ConnectionErrorMessage.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Alert from '@mui/material/Alert'\nimport AlertTitle from '@mui/material/AlertTitle'\nimport Link from '@mui/material/Link'\nimport Paper from '@mui/material/Paper'\n\nimport { Text } from '@mxenabled/mxui'\nimport { Error as ErrorIcon } from '@mxenabled/mx-icons'\n\nimport ConnectDrawer from '../../../../common/components/ConnectDrawer'\n\nimport {\n getConnectionMessages,\n ConnectionMessageObject,\n} from '../../../utils/getConnectionMessages'\nimport { useGlobalCopyStore } from '../../../../common'\nimport { NonConnectedStatuses } from '../../../../core'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\ninterface ConnectionErrorMessageProps {\n setTabValue: (val: number) => void\n}\n\nconst ConnectionErrorMessage: React.FC<ConnectionErrorMessageProps> = ({ setTabValue }) => {\n const [shouldShowConnectDrawer, setShouldShowConnectDrawer] = React.useState(false)\n\n const { selectedMember: member } = useAccountUiStore()\n const { accounts: accountsCopy, connect: connectCopy } = useGlobalCopyStore()\n\n const hasError =\n member.connection_status && NonConnectedStatuses.includes(member.connection_status)\n\n React.useEffect(() => {\n if (hasError) {\n setTabValue(1)\n }\n }, [hasError])\n\n if (!hasError) return\n\n const statusMessages: ConnectionMessageObject = getConnectionMessages(member, connectCopy)\n\n // eslint-disable-next-line consistent-return\n return (\n <>\n <Paper\n sx={{\n mb: 16,\n mt: 24,\n mx: 24,\n }}\n >\n <Alert\n icon={<ErrorIcon filled={true} />}\n role=\"none\"\n severity=\"error\"\n sx={{\n borderLeft: 5,\n borderTopLeftRadius: 6,\n borderBottomLeftRadius: 6,\n borderColor: 'error.main',\n color: 'text.primary',\n '&.MuiPaper-root': {\n backgroundColor: 'background.paper',\n },\n }}\n >\n {statusMessages.title && (\n <AlertTitle sx={{ fontWeight: 600, marginTop: 2 }} variant=\"body1\">\n {statusMessages.title}\n </AlertTitle>\n )}\n <Text component=\"p\" variant=\"subtitle2\">\n {statusMessages.main}\n </Text>\n {statusMessages.cta && (\n <Link\n onClick={() => setShouldShowConnectDrawer(true)}\n sx={{ fontSize: 15, fontWeight: 600, ml: 0 }}\n >\n {statusMessages.cta}\n </Link>\n )}\n </Alert>\n </Paper>\n\n {shouldShowConnectDrawer && (\n <ConnectDrawer\n loadWidgetProps={{ current_member_guid: member.guid }}\n onClose={() => setShouldShowConnectDrawer(false)}\n showConnectWidget={shouldShowConnectDrawer}\n title={accountsCopy.manage_connection}\n />\n )}\n </>\n )\n}\n\nexport default observer(ConnectionErrorMessage)\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAM,IAAA,CAAiE,EAAE,aAAA,EAAA,MAAkB;AACzF,QAAM,CAAC,GAAyB,CAAA,IAA8B,EAAM,SAAS,EAAK,GAE5E,EAAE,gBAAgB,EAAA,IAAW,EAAkB,GAC/C,EAAE,UAAU,GAAc,SAAS,EAAA,IAAgB,EAAmB,GAEtE,IACJ,EAAO,qBAAqB,EAAqB,SAAS,EAAO,iBAAiB;AAQpF,MANA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAAY,CAAC;AAAA,EAEjB,GAAG,CAAC,CAAQ,CAAC,GAET,CAAC,EAAU;AAEf,QAAM,IAA0C,EAAsB,GAAQ,CAAW;AAGzF,SACE,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IACN;AAAA,IAEA,UAAA,gBAAA,EAAC,GAAD;AAAA,MACE,MAAM,gBAAA,EAAC,GAAD,EAAW,QAAQ,GAAO,CAAA;AAAA,MAChC,MAAK;AAAA,MACL,UAAS;AAAA,MACT,IAAI;AAAA,QACF,YAAY;AAAA,QACZ,qBAAqB;AAAA,QACrB,wBAAwB;AAAA,QACxB,aAAa;AAAA,QACb,OAAO;AAAA,QACP,mBAAmB,EACjB,iBAAiB,mBACnB;AAAA,MACF;AAAA,MAbF,UAAA;AAAA,QAeG,EAAe,SACd,gBAAA,EAAC,GAAD;AAAA,UAAY,IAAI;AAAA,YAAE,YAAY;AAAA,YAAK,WAAW;AAAA,UAAE;AAAA,UAAG,SAAQ;AAAA,UACxD,UAAA,EAAe;AAAA,QACN,CAAA;AAAA,QAEd,gBAAA,EAAC,GAAD;AAAA,UAAM,WAAU;AAAA,UAAI,SAAQ;AAAA,UACzB,UAAA,EAAe;AAAA,QACZ,CAAA;AAAA,QACL,EAAe,OACd,gBAAA,EAAC,GAAD;AAAA,UACE,SAAA,MAAe,EAA2B,EAAI;AAAA,UAC9C,IAAI;AAAA,YAAE,UAAU;AAAA,YAAI,YAAY;AAAA,YAAK,IAAI;AAAA,UAAE;AAAA,UAE1C,UAAA,EAAe;AAAA,QACZ,CAAA;AAAA,MAEH;AAAA;EACF,CAAA,GAEN,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,iBAAiB,EAAE,qBAAqB,EAAO,KAAK;AAAA,IACpD,SAAA,MAAe,EAA2B,EAAK;AAAA,IAC/C,mBAAmB;AAAA,IACnB,OAAO,EAAa;AAAA,EACrB,CAAA,CAEH,EAAA,CAAA;AAEN,GAEA,IAAe,EAAS,CAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionsTab.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Transactions/TransactionsTab.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { subDays, startOfToday, endOfToday } from 'date-fns'\n\nimport {\n ANALYTICS_EVENTS,\n Drawer,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { TransactionDetails, TransactionList } from '../../../../transactions'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\nconst TransactionsTab = () => {\n const [guid, setGuid] = React.useState('')\n\n const { onEvent } = useEvent()\n const { selectedAccount } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { isTransactionDataLoaded, loadTransactionData, setFilter, sortedTransactions } =\n useTransactionStore()\n\n React.useEffect(() => {\n if (!isTransactionDataLoaded) {\n loadTransactionData().finally()\n }\n }, [])\n\n const transaction = React.useMemo(\n () => sortedTransactions.find((t) => t.guid === guid),\n [guid, sortedTransactions],\n )\n\n React.useEffect(() => {\n setFilter({\n dateRange: { start: subDays(startOfToday(), 90), end: endOfToday() },\n accounts: [selectedAccount.guid],\n })\n }, [selectedAccount])\n\n React.useEffect(() => onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), [])\n\n return (\n <>\n <TransactionList onClick={setGuid} />\n {transaction && (\n <Drawer\n ariaLabelClose={accountsCopy.close_drawer}\n isOpen={!!guid}\n onClose={() => setGuid('')}\n title={accountsCopy.transaction_drawer_title}\n >\n <TransactionDetails transaction={transaction} />\n </Drawer>\n )}\n </>\n )\n}\n\nexport default observer(TransactionsTab)\n"],"mappings":";;;;;;;;;;AAcA,IAAM,IAAA,MAAwB;AAC5B,QAAM,CAAC,GAAM,CAAA,IAAW,EAAM,SAAS,EAAE,GAEnC,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,iBAAA,EAAA,IAAoB,EAAkB,GACxC,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,EAAE,yBAAA,GAAyB,qBAAA,GAAqB,WAAA,GAAW,oBAAA,EAAA,IAC/D,EAAoB;AAEtB,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAK,KACH,EAAoB,EAAE,QAAQ;AAAA,EAElC,GAAG,CAAC,CAAC;AAEL,QAAM,IAAc,EAAM,QAAA,MAClB,EAAmB,KAAA,CAAM,MAAM,EAAE,SAAS,CAAI,GACpD,CAAC,GAAM,CAAkB,CAC3B;AAEA,SAAA,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAU;AAAA,MACR,WAAW;AAAA,QAAE,OAAO,EAAQ,EAAa,GAAG,EAAE;AAAA,QAAG,KAAK,EAAW;AAAA,MAAE;AAAA,MACnE,UAAU,CAAC,EAAgB,IAAI;AAAA,IACjC,CAAC;AAAA,EACH,GAAG,CAAC,CAAe,CAAC,GAEpB,EAAM,UAAA,MAAgB,EAAQ,EAAiB,iCAAiC,GAAG,CAAC,CAAC,GAGnF,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD,EAAiB,SAAS,EAAU,CAAA,GACnC,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAa;AAAA,IAC7B,QAAQ,CAAC,CAAC;AAAA,IACV,SAAA,MAAe,EAAQ,EAAE;AAAA,IACzB,OAAO,EAAa;AAAA,
|
|
1
|
+
{"version":3,"file":"TransactionsTab.es.js","names":[],"sources":["../../../../../src/accounts/components/detailsdrawer/Transactions/TransactionsTab.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { subDays, startOfToday, endOfToday } from 'date-fns'\n\nimport {\n ANALYTICS_EVENTS,\n Drawer,\n useEvent,\n useGlobalCopyStore,\n useTransactionStore,\n} from '../../../../common'\nimport { TransactionDetails, TransactionList } from '../../../../transactions'\nimport { useAccountUiStore } from '../../../hooks/useUiStore'\n\nconst TransactionsTab = () => {\n const [guid, setGuid] = React.useState('')\n\n const { onEvent } = useEvent()\n const { selectedAccount } = useAccountUiStore()\n const { accounts: accountsCopy } = useGlobalCopyStore()\n const { isTransactionDataLoaded, loadTransactionData, setFilter, sortedTransactions } =\n useTransactionStore()\n\n React.useEffect(() => {\n if (!isTransactionDataLoaded) {\n loadTransactionData().finally()\n }\n }, [])\n\n const transaction = React.useMemo(\n () => sortedTransactions.find((t) => t.guid === guid),\n [guid, sortedTransactions],\n )\n\n React.useEffect(() => {\n setFilter({\n dateRange: { start: subDays(startOfToday(), 90), end: endOfToday() },\n accounts: [selectedAccount.guid],\n })\n }, [selectedAccount])\n\n React.useEffect(() => onEvent(ANALYTICS_EVENTS.ACCOUNT_DETAILS_VIEW_TRANSACTIONS), [])\n\n return (\n <>\n <TransactionList onClick={setGuid} />\n {transaction && (\n <Drawer\n ariaLabelClose={accountsCopy.close_drawer}\n isOpen={!!guid}\n onClose={() => setGuid('')}\n title={accountsCopy.transaction_drawer_title}\n >\n <TransactionDetails transaction={transaction} />\n </Drawer>\n )}\n </>\n )\n}\n\nexport default observer(TransactionsTab)\n"],"mappings":";;;;;;;;;;AAcA,IAAM,IAAA,MAAwB;AAC5B,QAAM,CAAC,GAAM,CAAA,IAAW,EAAM,SAAS,EAAE,GAEnC,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EAAE,iBAAA,EAAA,IAAoB,EAAkB,GACxC,EAAE,UAAU,EAAA,IAAiB,EAAmB,GAChD,EAAE,yBAAA,GAAyB,qBAAA,GAAqB,WAAA,GAAW,oBAAA,EAAA,IAC/D,EAAoB;AAEtB,EAAA,EAAM,UAAA,MAAgB;AACpB,IAAK,KACH,EAAoB,EAAE,QAAQ;AAAA,EAElC,GAAG,CAAC,CAAC;AAEL,QAAM,IAAc,EAAM,QAAA,MAClB,EAAmB,KAAA,CAAM,MAAM,EAAE,SAAS,CAAI,GACpD,CAAC,GAAM,CAAkB,CAC3B;AAEA,SAAA,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAU;AAAA,MACR,WAAW;AAAA,QAAE,OAAO,EAAQ,EAAa,GAAG,EAAE;AAAA,QAAG,KAAK,EAAW;AAAA,MAAE;AAAA,MACnE,UAAU,CAAC,EAAgB,IAAI;AAAA,IACjC,CAAC;AAAA,EACH,GAAG,CAAC,CAAe,CAAC,GAEpB,EAAM,UAAA,MAAgB,EAAQ,EAAiB,iCAAiC,GAAG,CAAC,CAAC,GAGnF,gBAAA,EAAA,GAAA,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD,EAAiB,SAAS,EAAU,CAAA,GACnC,KACC,gBAAA,EAAC,GAAD;AAAA,IACE,gBAAgB,EAAa;AAAA,IAC7B,QAAQ,CAAC,CAAC;AAAA,IACV,SAAA,MAAe,EAAQ,EAAE;AAAA,IACzB,OAAO,EAAa;AAAA,IAEpB,UAAA,gBAAA,EAAC,GAAD,EAAiC,aAAA,EAAc,CAAA;AAAA,EACzC,CAAA,CAEV,EAAA,CAAA;AAEN,GAEA,IAAe,EAAS,CAAe"}
|
|
@@ -76,7 +76,10 @@ var B = (r, e) => {
|
|
|
76
76
|
label: e.next_payment,
|
|
77
77
|
name: "payment_due_at",
|
|
78
78
|
type: m.Date,
|
|
79
|
-
valueFormatter: (t) =>
|
|
79
|
+
valueFormatter: (t) => {
|
|
80
|
+
const a = typeof t == "number" ? v(t) : t;
|
|
81
|
+
return y(a, c.MED_MONTH_SHORT_DAY_FULL_YEAR);
|
|
82
|
+
}
|
|
80
83
|
}) : l.push({
|
|
81
84
|
label: e.day_payment_due,
|
|
82
85
|
name: "day_payment_is_due",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountFields.es.js","names":[],"sources":["../../../src/accounts/utils/AccountFields.tsx"],"sourcesContent":["import { Icon, Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\nimport { AccountIcon, AccountType, PropertyType } from '../../core'\nimport type { Account, AccountsCopy } from '../../core'\n\nimport { PropertyIcon } from '../../core/types/Account'\nimport {\n getAccountStartingBalance,\n isAccountLiability,\n isManual,\n usesCreditLimitField,\n usesInterestRateField,\n usesOriginalBalanceField,\n} from '../../core/utils/AccountUtils'\nimport { FieldType } from '../constants/Accounts'\nimport { fromUnixUTC } from '../../core/utils/DateUtil'\nimport {\n formatCurrency,\n formatOrdinal,\n formatPercentage,\n isValidNumber,\n} from '../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\n\ntype SelectOption = {\n label: string\n value: number\n icon: React.ReactElement\n}\n\nexport type AccountField = {\n event?: string\n label: string\n minAmount?: number\n options?: SelectOption[]\n name: keyof Account\n placeholder?: string\n type?: string\n validation?: (val: any) => string\n valueFormatter: (val: any) => any\n}\n\nexport const getAccountDetailFields = (account: Account, copy: AccountsCopy) => {\n const fields: AccountField[] = [\n {\n event: 'account_details_click_account_name',\n label: copy.account_name,\n name: 'user_name',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_name) as string,\n type: FieldType.Input,\n validation: (val: string) =>\n val ? '' : (buildDynamicCopy(copy.field_is_required, copy.account_name) as string),\n valueFormatter: (val) => val,\n },\n ]\n\n if (isManual(account)) {\n fields.unshift({\n label: copy.account_balance,\n name: 'balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n const accountTypeOptions = Object.keys(AccountType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.account_types[value],\n value: Number(value),\n icon: <Icon name={AccountIcon[value]} />,\n }))\n\n fields.push({\n label: copy.account_type,\n name: 'account_type',\n options: accountTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.account_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => accountTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (account.account_type === AccountType.PROPERTY) {\n const propertyTypeOptions = Object.keys(PropertyType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.property_types[value],\n value: Number(value),\n icon: <Icon name={PropertyIcon[value]} />,\n }))\n\n fields.push({\n label: copy.property_type,\n name: 'property_type',\n options: propertyTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.property_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => propertyTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (usesInterestRateField(account)) {\n let label = copy.interest_rate\n let fieldName = 'interest_rate' as keyof Account\n\n if (!account.is_manual) {\n if (typeof account.apr === 'number') {\n label = copy.apr\n fieldName = 'apr'\n }\n if (typeof account.apy === 'number') {\n label = copy.apy\n fieldName = 'apy'\n }\n }\n\n fields.push({\n event: 'account_details_click_interest_rate',\n label,\n name: fieldName,\n placeholder: buildDynamicCopy(copy.enter_value, label) as string,\n type: FieldType.Input,\n validation: (val) => (!isValidNumber(val) ? copy.error_amount_is_invalid : ''),\n valueFormatter: (val) => (isValidNumber(val) ? formatPercentage(val / 100) : val),\n })\n }\n\n if (isAccountLiability(account)) {\n fields.push({\n label: copy.minimum_payment,\n name: 'minimum_payment',\n placeholder: buildDynamicCopy(copy.enter_value, copy.minimum_payment) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n if (account.payment_due_at) {\n fields.push({\n label: copy.next_payment,\n name: 'payment_due_at',\n type: FieldType.Date,\n valueFormatter: (val) => {\n // accounts for Unix and DateTime values\n const dateTimeStamp = typeof val === 'number' ? fromUnixUTC(val) : val\n return formatDate(dateTimeStamp, DATE_FORMATS_INTL.MED_MONTH_SHORT_DAY_FULL_YEAR)\n },\n })\n } else {\n fields.push({\n label: copy.day_payment_due,\n name: 'day_payment_is_due',\n placeholder: buildDynamicCopy(copy.enter_value, copy.day_payment_due) as string,\n type: FieldType.Date,\n valueFormatter: (val) =>\n buildDynamicCopy(\n copy.day_of_every_month,\n formatOrdinal(val <= 31 ? val : new Date(val).getDate()),\n ) as string,\n })\n }\n }\n\n if (usesCreditLimitField(account)) {\n fields.push({\n label: copy.credit_limit,\n name: 'credit_limit',\n placeholder: buildDynamicCopy(copy.enter_value, copy.credit_limit) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n if (usesOriginalBalanceField(account)) {\n fields.push({\n label: copy.original_balance,\n minAmount: 1,\n name: 'original_balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.original_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n return fields\n}\nexport const getAccountBalanceDetails = (\n account: Account,\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n let firstSubtitle = ''\n let firstValue = null\n let secondSubtitle = null\n let secondValue = null\n let hasAvailableBalance = false\n\n switch (account.account_type) {\n // checking or savings\n case 1:\n case 2: {\n // some savings accounts only have balance, and not available_balance\n if (account.available_balance != null && showAvailableBalance) {\n firstSubtitle = copy.available_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n secondSubtitle = copy.current_balance\n secondValue = formatCurrency(account.balance, '0,0.00')\n hasAvailableBalance = true\n } else {\n firstSubtitle = copy.current_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n }\n break\n }\n default: {\n firstSubtitle = copy.current_balance\n firstValue = account.balance\n if (account.minimum_payment && account.payment_due_at) {\n const dateTimeStamp = fromUnixUTC(account.payment_due_at)\n secondSubtitle = (\n <Text component=\"strong\" variant=\"caption\">\n {\n buildDynamicCopy(\n copy.payment_due_on,\n formatCurrency(account.minimum_payment, '0,0.00'),\n formatDate(dateTimeStamp, DATE_FORMATS_INTL.FULL_MONTH_DAY),\n ) as string\n }\n </Text>\n )\n } else if (account.credit_limit) {\n secondSubtitle = copy.available_credit\n secondValue = formatCurrency(account.credit_limit - (account?.balance ?? 0), '0,0.00')\n }\n }\n }\n\n return {\n firstSubtitle,\n firstValue,\n secondSubtitle,\n secondValue,\n hasAvailableBalance,\n }\n}\n\nexport const getClosedAccountBalanceTotal = (\n accounts: Account[],\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n const total = accounts.reduce((sum, account) => {\n const details = getAccountBalanceDetails(account, copy, showAvailableBalance)\n const firstValue = details.firstValue || 0\n return sum + firstValue\n }, 0)\n\n return total\n}\n"],"mappings":";;;;;;;;;AA2CA,IAAa,IAAA,CAA0B,GAAkB,MAAuB;AAC9E,QAAM,IAAyB,CAC7B;AAAA,IACE,OAAO;AAAA,IACP,OAAO,EAAK;AAAA,IACZ,MAAM;AAAA,IACN,aAAa,EAAiB,EAAK,aAAa,EAAK,YAAY;AAAA,IACjE,MAAM,EAAU;AAAA,IAChB,YAAA,CAAa,MACX,IAAM,KAAM,EAAiB,EAAK,mBAAmB,EAAK,YAAY;AAAA,IACxE,gBAAA,CAAi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Q,GAChD,EAAW,GAAe,EAAkB,cAAc,CAC5D;AAAA,QAEE,CAAA;AAAA,MAEV,MAAO,CAAI,EAAQ,iBACjB,IAAiB,EAAK,kBACtB,IAAc,EAAe,EAAQ,gBAAgB,GAAS,WAAW,IAAI,QAAQ;AAAA,EAG3F;AAEA,SAAO;AAAA,IACL,eAAA;AAAA,IACA,YAAA;AAAA,IACA,gBAAA;AAAA,IACA,aAAA;AAAA,IACA,qBAAA;AAAA,EACF;AACF,GAEa,IAAA,CACX,GACA,GACA,MAEc,EAAS,OAAA,CAAQ,GAAK,MAG3B,KAFS,EAAyB,GAAS,GAAM,CACrC,EAAQ,cAAc,IAExC,CAEI"}
|
|
1
|
+
{"version":3,"file":"AccountFields.es.js","names":[],"sources":["../../../src/accounts/utils/AccountFields.tsx"],"sourcesContent":["import { Icon, Text } from '@mxenabled/mxui'\n\nimport { DATE_FORMATS_INTL, formatDate } from '../../core/constants'\nimport { AccountIcon, AccountType, PropertyType } from '../../core'\nimport type { Account, AccountsCopy } from '../../core'\n\nimport { PropertyIcon } from '../../core/types/Account'\nimport {\n getAccountStartingBalance,\n isAccountLiability,\n isManual,\n usesCreditLimitField,\n usesInterestRateField,\n usesOriginalBalanceField,\n} from '../../core/utils/AccountUtils'\nimport { FieldType } from '../constants/Accounts'\nimport { fromUnixUTC } from '../../core/utils/DateUtil'\nimport {\n formatCurrency,\n formatOrdinal,\n formatPercentage,\n isValidNumber,\n} from '../../core/utils/NumberFormatting'\nimport { buildDynamicCopy } from '../../core/utils/Localization'\n\ntype SelectOption = {\n label: string\n value: number\n icon: React.ReactElement\n}\n\nexport type AccountField = {\n event?: string\n label: string\n minAmount?: number\n options?: SelectOption[]\n name: keyof Account\n placeholder?: string\n type?: string\n validation?: (val: any) => string\n valueFormatter: (val: any) => any\n}\n\nexport const getAccountDetailFields = (account: Account, copy: AccountsCopy) => {\n const fields: AccountField[] = [\n {\n event: 'account_details_click_account_name',\n label: copy.account_name,\n name: 'user_name',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_name) as string,\n type: FieldType.Input,\n validation: (val: string) =>\n val ? '' : (buildDynamicCopy(copy.field_is_required, copy.account_name) as string),\n valueFormatter: (val) => val,\n },\n ]\n\n if (isManual(account)) {\n fields.unshift({\n label: copy.account_balance,\n name: 'balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.account_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n const accountTypeOptions = Object.keys(AccountType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.account_types[value],\n value: Number(value),\n icon: <Icon name={AccountIcon[value]} />,\n }))\n\n fields.push({\n label: copy.account_type,\n name: 'account_type',\n options: accountTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.account_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => accountTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (account.account_type === AccountType.PROPERTY) {\n const propertyTypeOptions = Object.keys(PropertyType)\n .filter((key) => Number(key))\n .map((value) => ({\n label: copy.property_types[value],\n value: Number(value),\n icon: <Icon name={PropertyIcon[value]} />,\n }))\n\n fields.push({\n label: copy.property_type,\n name: 'property_type',\n options: propertyTypeOptions,\n placeholder: buildDynamicCopy(copy.select_value, copy.property_type) as string,\n type: FieldType.Select,\n valueFormatter: (val) => propertyTypeOptions.find((option) => option.value === val)?.label,\n })\n }\n\n if (usesInterestRateField(account)) {\n let label = copy.interest_rate\n let fieldName = 'interest_rate' as keyof Account\n\n if (!account.is_manual) {\n if (typeof account.apr === 'number') {\n label = copy.apr\n fieldName = 'apr'\n }\n if (typeof account.apy === 'number') {\n label = copy.apy\n fieldName = 'apy'\n }\n }\n\n fields.push({\n event: 'account_details_click_interest_rate',\n label,\n name: fieldName,\n placeholder: buildDynamicCopy(copy.enter_value, label) as string,\n type: FieldType.Input,\n validation: (val) => (!isValidNumber(val) ? copy.error_amount_is_invalid : ''),\n valueFormatter: (val) => (isValidNumber(val) ? formatPercentage(val / 100) : val),\n })\n }\n\n if (isAccountLiability(account)) {\n fields.push({\n label: copy.minimum_payment,\n name: 'minimum_payment',\n placeholder: buildDynamicCopy(copy.enter_value, copy.minimum_payment) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n\n if (account.payment_due_at) {\n fields.push({\n label: copy.next_payment,\n name: 'payment_due_at',\n type: FieldType.Date,\n valueFormatter: (val) => {\n // accounts for Unix and DateTime values\n const dateTimeStamp = typeof val === 'number' ? fromUnixUTC(val) : val\n return formatDate(dateTimeStamp, DATE_FORMATS_INTL.MED_MONTH_SHORT_DAY_FULL_YEAR)\n },\n })\n } else {\n fields.push({\n label: copy.day_payment_due,\n name: 'day_payment_is_due',\n placeholder: buildDynamicCopy(copy.enter_value, copy.day_payment_due) as string,\n type: FieldType.Date,\n valueFormatter: (val) =>\n buildDynamicCopy(\n copy.day_of_every_month,\n formatOrdinal(val <= 31 ? val : new Date(val).getDate()),\n ) as string,\n })\n }\n }\n\n if (usesCreditLimitField(account)) {\n fields.push({\n label: copy.credit_limit,\n name: 'credit_limit',\n placeholder: buildDynamicCopy(copy.enter_value, copy.credit_limit) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n if (usesOriginalBalanceField(account)) {\n fields.push({\n label: copy.original_balance,\n minAmount: 1,\n name: 'original_balance',\n placeholder: buildDynamicCopy(copy.enter_value, copy.original_balance) as string,\n type: FieldType.Currency,\n valueFormatter: (val) => formatCurrency(val, '0,0.00'),\n })\n }\n\n return fields\n}\nexport const getAccountBalanceDetails = (\n account: Account,\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n let firstSubtitle = ''\n let firstValue = null\n let secondSubtitle = null\n let secondValue = null\n let hasAvailableBalance = false\n\n switch (account.account_type) {\n // checking or savings\n case 1:\n case 2: {\n // some savings accounts only have balance, and not available_balance\n if (account.available_balance != null && showAvailableBalance) {\n firstSubtitle = copy.available_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n secondSubtitle = copy.current_balance\n secondValue = formatCurrency(account.balance, '0,0.00')\n hasAvailableBalance = true\n } else {\n firstSubtitle = copy.current_balance\n firstValue = getAccountStartingBalance(account, showAvailableBalance)\n }\n break\n }\n default: {\n firstSubtitle = copy.current_balance\n firstValue = account.balance\n if (account.minimum_payment && account.payment_due_at) {\n const dateTimeStamp = fromUnixUTC(account.payment_due_at)\n secondSubtitle = (\n <Text component=\"strong\" variant=\"caption\">\n {\n buildDynamicCopy(\n copy.payment_due_on,\n formatCurrency(account.minimum_payment, '0,0.00'),\n formatDate(dateTimeStamp, DATE_FORMATS_INTL.FULL_MONTH_DAY),\n ) as string\n }\n </Text>\n )\n } else if (account.credit_limit) {\n secondSubtitle = copy.available_credit\n secondValue = formatCurrency(account.credit_limit - (account?.balance ?? 0), '0,0.00')\n }\n }\n }\n\n return {\n firstSubtitle,\n firstValue,\n secondSubtitle,\n secondValue,\n hasAvailableBalance,\n }\n}\n\nexport const getClosedAccountBalanceTotal = (\n accounts: Account[],\n copy: AccountsCopy,\n showAvailableBalance: boolean,\n) => {\n const total = accounts.reduce((sum, account) => {\n const details = getAccountBalanceDetails(account, copy, showAvailableBalance)\n const firstValue = details.firstValue || 0\n return sum + firstValue\n }, 0)\n\n return total\n}\n"],"mappings":";;;;;;;;;AA2CA,IAAa,IAAA,CAA0B,GAAkB,MAAuB;AAC9E,QAAM,IAAyB,CAC7B;AAAA,IACE,OAAO;AAAA,IACP,OAAO,EAAK;AAAA,IACZ,MAAM;AAAA,IACN,aAAa,EAAiB,EAAK,aAAa,EAAK,YAAY;AAAA,IACjE,MAAM,EAAU;AAAA,IAChB,YAAA,CAAa,MACX,IAAM,KAAM,EAAiB,EAAK,mBAAmB,EAAK,YAAY;AAAA,IACxE,gBAAA,CAAiB,MAAQ;AAAA,EAC3B,CACF;AAEA,MAAI,EAAS,CAAO,GAAG;AACrB,IAAA,EAAO,QAAQ;AAAA,M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;AAAA,QAEE,CAAA;AAAA,MAEV,MAAO,CAAI,EAAQ,iBACjB,IAAiB,EAAK,kBACtB,IAAc,EAAe,EAAQ,gBAAgB,GAAS,WAAW,IAAI,QAAQ;AAAA,EAG3F;AAEA,SAAO;AAAA,IACL,eAAA;AAAA,IACA,YAAA;AAAA,IACA,gBAAA;AAAA,IACA,aAAA;AAAA,IACA,qBAAA;AAAA,EACF;AACF,GAEa,IAAA,CACX,GACA,GACA,MAEc,EAAS,OAAA,CAAQ,GAAK,MAG3B,KAFS,EAAyB,GAAS,GAAM,CACrC,EAAQ,cAAc,IAExC,CAEI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SurveyMiniWidget.es.js","names":[],"sources":["../../src/analytics/SurveyMiniWidget.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { SurveyQuestionType } from 'posthog-js'\n\nimport Alert from '@mui/material/Alert'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport Loader from '../common/components/Loader'\nimport MiniWidgetContainer from '../common/components/MiniWidgetContainer'\nimport { useEvent } from '../common/context/hooks'\nimport { useAnalyticsStore } from '../common/context/hooks'\nimport { useGlobalUiStore } from '../common/context/hooks'\nimport { useGlobalCopyStore } from '../common/context/hooks'\n\nimport RatingScale from './components/RatingScale'\nimport OpenTextField from './components/OpenTextField'\n\nconst SurveyMiniWidget = () => {\n const { onEvent } = useEvent()\n const {\n surveyId,\n question,\n isLastQuestion,\n nextQuestion,\n loadSurvey,\n questionCount,\n response,\n responsePayload,\n resetStore,\n survey,\n } = useAnalyticsStore()\n\n const { analytics: copy, common: commonCopy } = useGlobalCopyStore()\n const { isCopyLoaded, isInitialized } = useGlobalUiStore()\n const [showAlert, setShowAlert] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadSurvey()\n }\n }, [isInitialized])\n\n React.useEffect(() => {\n onEvent('survey shown', {\n $survey_id: surveyId,\n })\n }, [survey])\n\n const handleClose = () => {\n onEvent('survey dismissed', {\n $survey_id: surveyId,\n })\n resetStore()\n setShowAlert(false)\n }\n\n const handleContinue = () => {\n nextQuestion()\n }\n\n const handleSubmit = () => {\n const payload = responsePayload\n onEvent('survey sent', payload)\n resetStore()\n setShowAlert(true)\n }\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n if (!question && !showAlert) {\n return null\n }\n\n return (\n <MiniWidgetContainer\n closeLabel={commonCopy.close_aria}\n onClose={handleClose}\n sx={{\n '& .MuiCardHeader-root': {\n px: 24,\n pb: 2,\n },\n '& .MuiCardHeader-subheader': {\n fontSize: 13,\n },\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n }}\n title={copy.your_feedback_matters}\n >\n <Stack sx={{ pb: 8, px: 24 }}>\n <Text truncate={false} variant=\"subtitle2\">\n {copy.let_us_know}\n </Text>\n </Stack>\n {question && (\n <React.Fragment>\n <Stack sx={{ gap: 4, px: 24, py: 16 }}>\n <Text bold={true} truncate={false}>\n {question.question}\n </Text>\n <Text variant=\"caption\">{questionCount}</Text>\n </Stack>\n <Stack sx={{ gap: 6, px: 24, pb: 8 }}>\n {question.type === SurveyQuestionType.Rating && <RatingScale />}\n\n {question.type === SurveyQuestionType.Open && <OpenTextField />}\n </Stack>\n <Stack sx={{ px: 24, py: 16 }}>\n <Button\n disabled={!isLastQuestion && !response}\n onClick={isLastQuestion ? handleSubmit : handleContinue}\n variant={isLastQuestion && response ? 'contained' : 'outlined'}\n >\n {isLastQuestion ? copy.submit_feedback : copy.continue}\n </Button>\n </Stack>\n </React.Fragment>\n )}\n\n {showAlert && (\n <React.Fragment>\n <Stack sx={{ px: 24, py: 24 }}>\n <Text bold={true} truncate={false}>\n {copy.thank_you}\n </Text>\n </Stack>\n <Stack sx={{ px: 24, pb: 24 }}>\n <Alert severity=\"success\" variant=\"filled\">\n {copy.feedback_sent_successfully}\n </Alert>\n </Stack>\n </React.Fragment>\n )}\n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idget.es.js","names":[],"sources":["../../src/analytics/SurveyMiniWidget.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { SurveyQuestionType } from 'posthog-js'\n\nimport Alert from '@mui/material/Alert'\nimport Button from '@mui/material/Button'\nimport Stack from '@mui/material/Stack'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport Loader from '../common/components/Loader'\nimport MiniWidgetContainer from '../common/components/MiniWidgetContainer'\nimport { useEvent } from '../common/context/hooks'\nimport { useAnalyticsStore } from '../common/context/hooks'\nimport { useGlobalUiStore } from '../common/context/hooks'\nimport { useGlobalCopyStore } from '../common/context/hooks'\n\nimport RatingScale from './components/RatingScale'\nimport OpenTextField from './components/OpenTextField'\n\nconst SurveyMiniWidget = () => {\n const { onEvent } = useEvent()\n const {\n surveyId,\n question,\n isLastQuestion,\n nextQuestion,\n loadSurvey,\n questionCount,\n response,\n responsePayload,\n resetStore,\n survey,\n } = useAnalyticsStore()\n\n const { analytics: copy, common: commonCopy } = useGlobalCopyStore()\n const { isCopyLoaded, isInitialized } = useGlobalUiStore()\n const [showAlert, setShowAlert] = React.useState(false)\n\n React.useEffect(() => {\n if (isInitialized) {\n loadSurvey()\n }\n }, [isInitialized])\n\n React.useEffect(() => {\n onEvent('survey shown', {\n $survey_id: surveyId,\n })\n }, [survey])\n\n const handleClose = () => {\n onEvent('survey dismissed', {\n $survey_id: surveyId,\n })\n resetStore()\n setShowAlert(false)\n }\n\n const handleContinue = () => {\n nextQuestion()\n }\n\n const handleSubmit = () => {\n const payload = responsePayload\n onEvent('survey sent', payload)\n resetStore()\n setShowAlert(true)\n }\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n if (!question && !showAlert) {\n return null\n }\n\n return (\n <MiniWidgetContainer\n closeLabel={commonCopy.close_aria}\n onClose={handleClose}\n sx={{\n '& .MuiCardHeader-root': {\n px: 24,\n pb: 2,\n },\n '& .MuiCardHeader-subheader': {\n fontSize: 13,\n },\n '& .MuiCardContent-root:last-child': {\n pb: 0,\n },\n }}\n title={copy.your_feedback_matters}\n >\n <Stack sx={{ pb: 8, px: 24 }}>\n <Text truncate={false} variant=\"subtitle2\">\n {copy.let_us_know}\n </Text>\n </Stack>\n {question && (\n <React.Fragment>\n <Stack sx={{ gap: 4, px: 24, py: 16 }}>\n <Text bold={true} truncate={false}>\n {question.question}\n </Text>\n <Text variant=\"caption\">{questionCount}</Text>\n </Stack>\n <Stack sx={{ gap: 6, px: 24, pb: 8 }}>\n {question.type === SurveyQuestionType.Rating && <RatingScale />}\n\n {question.type === SurveyQuestionType.Open && <OpenTextField />}\n </Stack>\n <Stack sx={{ px: 24, py: 16 }}>\n <Button\n disabled={!isLastQuestion && !response}\n onClick={isLastQuestion ? handleSubmit : handleContinue}\n variant={isLastQuestion && response ? 'contained' : 'outlined'}\n >\n {isLastQuestion ? copy.submit_feedback : copy.continue}\n </Button>\n </Stack>\n </React.Fragment>\n )}\n\n {showAlert && (\n <React.Fragment>\n <Stack sx={{ px: 24, py: 24 }}>\n <Text bold={true} truncate={false}>\n {copy.thank_you}\n </Text>\n </Stack>\n <Stack sx={{ px: 24, pb: 24 }}>\n <Alert severity=\"success\" variant=\"filled\">\n {copy.feedback_sent_successfully}\n </Alert>\n </Stack>\n </React.Fragment>\n )}\n </MiniWidgetContainer>\n )\n}\n\nexport default observer(SurveyMiniWidget)\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAM,IAAA,MAAyB;AAC7B,QAAM,EAAE,SAAA,EAAA,IAAY,EAAS,GACvB,EACJ,UAAA,GACA,UAAA,GACA,gBAAA,GACA,cAAA,GACA,YAAA,GACA,eAAA,GACA,UAAA,GACA,iBAAA,GACA,YAAA,GACA,QAAA,EAAA,IACE,EAAkB,GAEhB,EAAE,WAAW,GAAM,QAAQ,EAAA,IAAe,EAAmB,GAC7D,EAAE,cAAA,GAAc,eAAA,EAAA,IAAkB,EAAiB,GACnD,CAAC,GAAW,CAAA,IAAgB,EAAM,SAAS,EAAK;AAEtD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QACD,CAAA;AAAA,MACF,CAAA,CACO,EAAA,CAAA;AAAA,IAEC;AAAA,OArEd,gBAAA,EAAC,GAAD,CAAS,CAAA;AAuEpB,GAEA,IAAe,EAAS,CAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RatingScale.es.js","names":[],"sources":["../../../src/analytics/components/RatingScale.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { RatingSurveyQuestion } from 'posthog-js'\n\nimport Stack from '@mui/material/Stack'\nimport ToggleButton from '@mui/material/ToggleButton'\nimport ToggleButtonGroup from '@mui/material/ToggleButtonGroup'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useAnalyticsStore } from '../../common/context/hooks'\nimport { useGlobalCopyStore } from '../../common/context/hooks'\n\nconst RatingScale = () => {\n const { question, response, setResponse } = useAnalyticsStore()\n const { analytics: copy } = useGlobalCopyStore()\n const theme = useTheme()\n const ratingQuestion = question as RatingSurveyQuestion\n\n const handleSelect = (_: React.MouseEvent<HTMLElement>, response: number | null) => {\n setResponse(response)\n }\n\n return (\n <React.Fragment>\n <ToggleButtonGroup\n exclusive={true}\n onChange={handleSelect}\n sx={{\n display: 'flex',\n height: 44,\n justifyContent: 'space-between',\n width: '100%',\n }}\n value={response}\n >\n {Array.from({ length: ratingQuestion.scale }, (_, index) => (\n <ToggleButton\n color=\"primary\"\n key={index + 1}\n sx={{ fontWeight: 'bold', width: `${100 / ratingQuestion.scale}%` }}\n value={index + 1}\n >\n {index + 1}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n <Stack\n sx={{\n color: theme.palette.secondary.light,\n flexDirection: 'row',\n justifyContent: 'space-between',\n }}\n >\n <Text bold={true} color=\"text.secondary\" variant=\"caption\">\n {copy.strongly_disagree}\n </Text>\n <Text bold={true} color=\"text.secondary\" variant=\"caption\">\n {copy.strongly_agree}\n </Text>\n </Stack>\n </React.Fragment>\n )\n}\n\nexport default observer(RatingScale)\n"],"mappings":";;;;;;;;;AAcA,IAAM,IAAA,MAAoB;AACxB,QAAM,EAAE,UAAA,GAAU,UAAA,GAAU,aAAA,EAAA,IAAgB,EAAkB,GACxD,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,IAAQ,EAAS,GACjB,IAAiB,GAEjB,IAAA,CAAgB,GAAkC,MAA4B;AAClF,IAAA,EAAY,CAAQ;AAAA,EACtB;AAEA,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW;AAAA,IACX,UAAU;AAAA,IACV,IAAI;AAAA,MACF,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,
|
|
1
|
+
{"version":3,"file":"RatingScale.es.js","names":[],"sources":["../../../src/analytics/components/RatingScale.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\nimport { RatingSurveyQuestion } from 'posthog-js'\n\nimport Stack from '@mui/material/Stack'\nimport ToggleButton from '@mui/material/ToggleButton'\nimport ToggleButtonGroup from '@mui/material/ToggleButtonGroup'\nimport { useTheme } from '@mui/material/styles'\n\nimport { Text } from '@mxenabled/mxui'\n\nimport { useAnalyticsStore } from '../../common/context/hooks'\nimport { useGlobalCopyStore } from '../../common/context/hooks'\n\nconst RatingScale = () => {\n const { question, response, setResponse } = useAnalyticsStore()\n const { analytics: copy } = useGlobalCopyStore()\n const theme = useTheme()\n const ratingQuestion = question as RatingSurveyQuestion\n\n const handleSelect = (_: React.MouseEvent<HTMLElement>, response: number | null) => {\n setResponse(response)\n }\n\n return (\n <React.Fragment>\n <ToggleButtonGroup\n exclusive={true}\n onChange={handleSelect}\n sx={{\n display: 'flex',\n height: 44,\n justifyContent: 'space-between',\n width: '100%',\n }}\n value={response}\n >\n {Array.from({ length: ratingQuestion.scale }, (_, index) => (\n <ToggleButton\n color=\"primary\"\n key={index + 1}\n sx={{ fontWeight: 'bold', width: `${100 / ratingQuestion.scale}%` }}\n value={index + 1}\n >\n {index + 1}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n <Stack\n sx={{\n color: theme.palette.secondary.light,\n flexDirection: 'row',\n justifyContent: 'space-between',\n }}\n >\n <Text bold={true} color=\"text.secondary\" variant=\"caption\">\n {copy.strongly_disagree}\n </Text>\n <Text bold={true} color=\"text.secondary\" variant=\"caption\">\n {copy.strongly_agree}\n </Text>\n </Stack>\n </React.Fragment>\n )\n}\n\nexport default observer(RatingScale)\n"],"mappings":";;;;;;;;;AAcA,IAAM,IAAA,MAAoB;AACxB,QAAM,EAAE,UAAA,GAAU,UAAA,GAAU,aAAA,EAAA,IAAgB,EAAkB,GACxD,EAAE,WAAW,EAAA,IAAS,EAAmB,GACzC,IAAQ,EAAS,GACjB,IAAiB,GAEjB,IAAA,CAAgB,GAAkC,MAA4B;AAClF,IAAA,EAAY,CAAQ;AAAA,EACtB;AAEA,SACE,gBAAA,EAAC,EAAM,UAAP,EAAA,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,IACE,WAAW;AAAA,IACX,UAAU;AAAA,IACV,IAAI;AAAA,MACF,SAAS;AAAA,MACT,QAAQ;AAAA,MACR,gBAAgB;AAAA,MAChB,OAAO;AAAA,IACT;AAAA,IACA,OAAO;AAAA,IAEN,UAAA,MAAM,KAAK,EAAE,QAAQ,EAAe,MAAM,GAAA,CAAI,GAAG,MAChD,gBAAA,EAAC,GAAD;AAAA,MACE,OAAM;AAAA,MAEN,IAAI;AAAA,QAAE,YAAY;AAAA,QAAQ,OAAO,GAAG,MAAM,EAAe,KAAA;AAAA,MAAS;AAAA,MAClE,OAAO,IAAQ;AAAA,MAEd,UAAA,IAAQ;AAAA,IACG,GALP,IAAQ,CAKD,CACf;AAAA,EACgB,CAAA,GACnB,gBAAA,EAAC,GAAD;AAAA,IACE,IAAI;AAAA,MACF,OAAO,EAAM,QAAQ,UAAU;AAAA,MA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