@layerfi/components 0.1.132-alpha.1 → 0.1.132-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +591 -534
- package/dist/esm/index.mjs +591 -534
- package/dist/index.css +59 -26
- package/dist/index.d.ts +30 -23
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -250,7 +250,7 @@ var getIntlLocale = (locale) => {
|
|
|
250
250
|
};
|
|
251
251
|
var package_default = {
|
|
252
252
|
name: "@layerfi/components",
|
|
253
|
-
version: "0.1.132-alpha.
|
|
253
|
+
version: "0.1.132-alpha.3",
|
|
254
254
|
description: "Layer React Components",
|
|
255
255
|
main: "dist/cjs/index.cjs",
|
|
256
256
|
module: "dist/esm/index.mjs",
|
|
@@ -1571,43 +1571,24 @@ var invoices_default$1 = {
|
|
|
1571
1571
|
var landingPage_default$1 = {
|
|
1572
1572
|
action: {
|
|
1573
1573
|
"book_call": "Book a call",
|
|
1574
|
-
"get_started": "Get Started",
|
|
1575
1574
|
"learn_more": "Learn more"
|
|
1576
1575
|
},
|
|
1577
1576
|
label: {
|
|
1578
1577
|
"all_finances_in_one_place": "All your finances in one place",
|
|
1579
1578
|
"best_accounting_software_for_industry": "The best accounting software for {{industry}} businesses. Fast to set up and easy to use.",
|
|
1580
|
-
"books_organized_and_tax_ready": "Your books will be organized and tax-ready with accurate categorization and financial statements prepared by professionals.",
|
|
1581
1579
|
"built_for_industry": "Built for {{industry}}",
|
|
1582
|
-
"business_bank_accounts_icon": "Business bank accounts and credit cards connection icon",
|
|
1583
|
-
"business_overview_dashboard_charts": "Business overview dashboard with charts and financial metrics",
|
|
1584
|
-
"calendar_scheduling_icon_bookkeeper": "Calendar scheduling icon for bookkeeper consultation",
|
|
1585
|
-
"categorize_expenses": "Categorize expenses",
|
|
1586
1580
|
"complete_bookkeeping_service": "A complete bookkeeping service",
|
|
1587
1581
|
"complete_financial_reports": "Complete financial reports and end of year tax packet",
|
|
1588
|
-
"connect_business_accounts": "Connect your business accounts",
|
|
1589
|
-
"connect_business_bank_accounts": "Connect your business bank accounts and credit cards right within {{platformName}}.",
|
|
1590
1582
|
"direct_integration_with_platform_name": "Direct integration with {{platformName}}",
|
|
1591
1583
|
"directly_integrated_with_platform_name": "Directly integrated with your {{platformName}} data, so you can see your business performance and profit in real-time.",
|
|
1592
1584
|
"easy_to_understand_profitability_charts": "Easy to understand profitability charts and reports",
|
|
1593
1585
|
"easy_to_use_software": "Easy to use software",
|
|
1594
|
-
"expense_categorization_organization_icon": "Expense categorization and organization icon",
|
|
1595
1586
|
"full_service_bookkeeping": "Full-service Bookkeeping",
|
|
1596
|
-
"get_clear_picture_of_business": "Get a clear picture of your business",
|
|
1597
1587
|
"get_dedicated_bookkeeper": "Get a dedicated bookkeeper who will organize and manage your books for you.",
|
|
1598
|
-
"get_notified_on_bookkeeping_clarifications": "Get notified on bookkeeping clarifications",
|
|
1599
|
-
"get_personalized_guidance": "Get personalized guidance from your dedicated bookkeeper to review your finances and answer questions.",
|
|
1600
|
-
"get_ready_for_tax_season": "Get ready for tax season",
|
|
1601
1588
|
"monthly_books_done_for_you": "Monthly books done for you",
|
|
1602
|
-
"notification_bell_icon_bookkeeping": "Notification bell icon for bookkeeping task updates and clarifications",
|
|
1603
|
-
"organize_transaction_into_categories": "Organize transactions into categories built for {{industry}}.",
|
|
1604
1589
|
"personalized_setup_bookkeeper": "Personalized setup with your bookkeeper",
|
|
1605
1590
|
"platform_name_accounting": "{{platformName}} Accounting",
|
|
1606
1591
|
"platform_name_accounting_dashboard": "{{platformName}} Accounting dashboard interface showing financial data and business insights",
|
|
1607
|
-
"profit_loss_statement_chart": "Profit and loss statement chart for tax preparation and business analysis",
|
|
1608
|
-
"receive_clear_notifications": "Receive clear notifications when your bookkeeper needs additional information or clarification on transactions.",
|
|
1609
|
-
"schedule_call_with_bookkeeper": "Schedule a call with your Bookkeeper",
|
|
1610
|
-
"see_business_profitability": "See your business profitability and stay organized for tax time.",
|
|
1611
1592
|
"self_service_accounting_business_health": "Self-service accounting to understand your business health",
|
|
1612
1593
|
"starting_at": "Starting at",
|
|
1613
1594
|
"track_business_finances_within_platform": "Track your business finances, right within {{platformName}}.",
|
|
@@ -1843,6 +1824,7 @@ var taxEstimates_default$1 = {
|
|
|
1843
1824
|
"categorization_incomplete": "Categorization incomplete",
|
|
1844
1825
|
"deductions": "Deductions",
|
|
1845
1826
|
"due": "Due",
|
|
1827
|
+
"due_at": "Due on {{date}}",
|
|
1846
1828
|
"due_with_date": "Due: {{date}}",
|
|
1847
1829
|
"enter_amount": "Enter amount",
|
|
1848
1830
|
"enter_area": "Enter area",
|
|
@@ -1888,7 +1870,6 @@ var taxEstimates_default$1 = {
|
|
|
1888
1870
|
"taxable_income_estimate_to_date_for_year_projected": "Taxable income projection for year {{year}}",
|
|
1889
1871
|
"taxable_income_for_year": "Taxable income for {{year}}",
|
|
1890
1872
|
"taxable_income_for_year_projected": "Projected taxable income for {{year}}",
|
|
1891
|
-
"taxes_due_at": "Taxes due on {{date}}",
|
|
1892
1873
|
"taxes_owed": "Taxes Owed",
|
|
1893
1874
|
"taxes_owed_projected": "Projected Taxes Owed",
|
|
1894
1875
|
"taxes_paid": "Taxes Paid",
|
|
@@ -2199,6 +2180,7 @@ var vehicles_default$1 = {
|
|
|
2199
2180
|
"enter_vin": "Enter VIN",
|
|
2200
2181
|
"license_plate": "License plate",
|
|
2201
2182
|
"make_model": "Make and model",
|
|
2183
|
+
"unnamed_vehicle": "Unnamed Vehicle",
|
|
2202
2184
|
"vehicle": "Vehicle",
|
|
2203
2185
|
"vehicle_name_hidden_from_active_list": "{{vehicleName}} will be hidden from your active vehicles list. You can reactivate it at any time.",
|
|
2204
2186
|
"vehicle_name_restored_to_active_list": "{{vehicleName}} will be restored to your active vehicles list and available for tracking trips.",
|
|
@@ -2374,6 +2356,7 @@ var bookkeeping_default = {
|
|
|
2374
2356
|
"bookkeeping_tasks": "Tâches de tenue de livres",
|
|
2375
2357
|
"complete_bookkeeping_onboarding_call": "Une fois votre appel d’intégration à la tenue de livres terminé, vos tâches de tenue de livres s’afficheront ici.",
|
|
2376
2358
|
"completed_over_total_done_one": "<completed>{{displayCompletedTaskCount}}</completed>/{{displayTotalTaskCount}} terminée",
|
|
2359
|
+
"completed_over_total_done_many": "",
|
|
2377
2360
|
"completed_over_total_done_other": "<completed>{{displayCompletedTaskCount}}</completed>/{{displayTotalTaskCount}} terminées",
|
|
2378
2361
|
"count_open_tasks_one": "{{displayCount}} tâche ouverte en {{displayYear}}",
|
|
2379
2362
|
"count_open_tasks_other": "{{displayCount}} tâches ouvertes en {{displayYear}}",
|
|
@@ -3016,43 +2999,24 @@ var invoices_default = {
|
|
|
3016
2999
|
var landingPage_default = {
|
|
3017
3000
|
action: {
|
|
3018
3001
|
"book_call": "Réserver un appel",
|
|
3019
|
-
"get_started": "Commencer",
|
|
3020
3002
|
"learn_more": "En savoir plus"
|
|
3021
3003
|
},
|
|
3022
3004
|
label: {
|
|
3023
3005
|
"all_finances_in_one_place": "Toutes vos finances en un seul endroit",
|
|
3024
3006
|
"best_accounting_software_for_industry": "Le meilleur logiciel de comptabilité pour les entreprises du secteur {{industry}}. Rapide à configurer et facile à utiliser.",
|
|
3025
|
-
"books_organized_and_tax_ready": "Vos livres seront organisés et prêts pour les impôts grâce à une catégorisation précise et à des états financiers préparés par des professionnels.",
|
|
3026
3007
|
"built_for_industry": "Conçu pour le secteur {{industry}}",
|
|
3027
|
-
"business_bank_accounts_icon": "Icône de connexion des comptes bancaires professionnels et des cartes de crédit",
|
|
3028
|
-
"business_overview_dashboard_charts": "Tableau de bord de l’entreprise avec graphiques et indicateurs financiers",
|
|
3029
|
-
"calendar_scheduling_icon_bookkeeper": "Icône de calendrier pour planifier une consultation avec un teneur de livres",
|
|
3030
|
-
"categorize_expenses": "Catégoriser les dépenses",
|
|
3031
3008
|
"complete_bookkeeping_service": "Un service complet de tenue de livres",
|
|
3032
3009
|
"complete_financial_reports": "Rapports financiers complets et dossier fiscal de fin d’année",
|
|
3033
|
-
"connect_business_accounts": "Connectez vos comptes d’entreprise",
|
|
3034
|
-
"connect_business_bank_accounts": "Connectez vos comptes bancaires professionnels et vos cartes de crédit directement dans {{platformName}}.",
|
|
3035
3010
|
"direct_integration_with_platform_name": "Intégration directe avec {{platformName}}",
|
|
3036
3011
|
"directly_integrated_with_platform_name": "Intégré directement à vos données {{platformName}}, pour vous permettre de voir la performance et la rentabilité de votre entreprise en temps réel.",
|
|
3037
3012
|
"easy_to_understand_profitability_charts": "Graphiques et rapports de rentabilité faciles à comprendre",
|
|
3038
3013
|
"easy_to_use_software": "Logiciel facile à utiliser",
|
|
3039
|
-
"expense_categorization_organization_icon": "Icône de catégorisation et d’organisation des dépenses",
|
|
3040
3014
|
"full_service_bookkeeping": "Tenue de livres complète",
|
|
3041
|
-
"get_clear_picture_of_business": "Obtenez un portrait clair de votre entreprise",
|
|
3042
3015
|
"get_dedicated_bookkeeper": "Obtenez un teneur de livres attitré qui organisera et gérera vos livres pour vous.",
|
|
3043
|
-
"get_notified_on_bookkeeping_clarifications": "Recevez des notifications concernant les demandes de clarification en tenue de livres",
|
|
3044
|
-
"get_personalized_guidance": "Obtenez des conseils personnalisés de votre teneur de livres attitré pour passer en revue vos finances et répondre à vos questions.",
|
|
3045
|
-
"get_ready_for_tax_season": "Préparez-vous pour la saison des impôts",
|
|
3046
3016
|
"monthly_books_done_for_you": "Tenue de livres mensuelle faite pour vous",
|
|
3047
|
-
"notification_bell_icon_bookkeeping": "Icône de cloche de notification pour les mises à jour des tâches de tenue de livres et les demandes de clarification",
|
|
3048
|
-
"organize_transaction_into_categories": "Organisez les transactions dans des catégories conçues pour le secteur {{industry}}.",
|
|
3049
3017
|
"personalized_setup_bookkeeper": "Configuration personnalisée avec votre teneur de livres",
|
|
3050
3018
|
"platform_name_accounting": "{{platformName}} Accounting",
|
|
3051
3019
|
"platform_name_accounting_dashboard": "Interface du tableau de bord {{platformName}} Accounting affichant des données financières et des renseignements sur l’entreprise",
|
|
3052
|
-
"profit_loss_statement_chart": "Graphique de l’état des résultats pour la préparation fiscale et l’analyse de l’entreprise",
|
|
3053
|
-
"receive_clear_notifications": "Recevez des notifications claires lorsque votre teneur de livres a besoin de renseignements supplémentaires ou d’éclaircissements sur des opérations.",
|
|
3054
|
-
"schedule_call_with_bookkeeper": "Planifiez un appel avec votre teneur de livres",
|
|
3055
|
-
"see_business_profitability": "Visualisez la rentabilité de votre entreprise et restez organisé en vue de la période des impôts.",
|
|
3056
3020
|
"self_service_accounting_business_health": "Comptabilité en libre-service pour comprendre la santé de votre entreprise",
|
|
3057
3021
|
"starting_at": "À partir de",
|
|
3058
3022
|
"track_business_finances_within_platform": "Suivez les finances de votre entreprise, directement dans {{platformName}}.",
|
|
@@ -3288,6 +3252,7 @@ var taxEstimates_default = {
|
|
|
3288
3252
|
"categorization_incomplete": "Catégorisation incomplète",
|
|
3289
3253
|
"deductions": "Déductions",
|
|
3290
3254
|
"due": "Échéance",
|
|
3255
|
+
"due_at": "",
|
|
3291
3256
|
"due_with_date": "Échéance : {{date}}",
|
|
3292
3257
|
"enter_amount": "Saisissez un montant",
|
|
3293
3258
|
"enter_area": "Saisissez la superficie",
|
|
@@ -3333,7 +3298,6 @@ var taxEstimates_default = {
|
|
|
3333
3298
|
"taxable_income_estimate_to_date_for_year_projected": "Projection du revenu imposable pour l’année {{year}}",
|
|
3334
3299
|
"taxable_income_for_year": "Revenu imposable pour {{year}}",
|
|
3335
3300
|
"taxable_income_for_year_projected": "Revenu imposable projeté pour {{year}}",
|
|
3336
|
-
"taxes_due_at": "Taxes à payer le {{date}}",
|
|
3337
3301
|
"taxes_owed": "Impôts dus",
|
|
3338
3302
|
"taxes_owed_projected": "Impôts dus projetés",
|
|
3339
3303
|
"taxes_paid": "Impôts payés",
|
|
@@ -3644,6 +3608,7 @@ var vehicles_default = {
|
|
|
3644
3608
|
"enter_vin": "Saisissez le NIV",
|
|
3645
3609
|
"license_plate": "Plaque d’immatriculation",
|
|
3646
3610
|
"make_model": "Marque et modèle",
|
|
3611
|
+
"unnamed_vehicle": "",
|
|
3647
3612
|
"vehicle": "Véhicule",
|
|
3648
3613
|
"vehicle_name_hidden_from_active_list": "{{vehicleName}} sera masqué de votre liste de véhicules actifs. Vous pourrez le réactiver en tout temps.",
|
|
3649
3614
|
"vehicle_name_restored_to_active_list": "{{vehicleName}} sera restauré dans votre liste de véhicules actifs et pourra être utilisé pour faire le suivi de vos déplacements.",
|
|
@@ -11453,7 +11418,7 @@ var EmptyState$7 = () => {
|
|
|
11453
11418
|
children: t("common:empty.results", "No results found")
|
|
11454
11419
|
});
|
|
11455
11420
|
};
|
|
11456
|
-
var ErrorState$
|
|
11421
|
+
var ErrorState$5 = () => {
|
|
11457
11422
|
const { t } = useTranslation();
|
|
11458
11423
|
return /* @__PURE__ */ jsx(Span, {
|
|
11459
11424
|
size: "sm",
|
|
@@ -11496,7 +11461,7 @@ var MobileSelectionDrawerList = (_ref) => {
|
|
|
11496
11461
|
data,
|
|
11497
11462
|
slots: {
|
|
11498
11463
|
EmptyState: EmptyState$7,
|
|
11499
|
-
ErrorState: ErrorState$
|
|
11464
|
+
ErrorState: ErrorState$5
|
|
11500
11465
|
},
|
|
11501
11466
|
renderItem,
|
|
11502
11467
|
onClickItem,
|
|
@@ -14694,7 +14659,7 @@ var VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentN
|
|
|
14694
14659
|
var ROW_HEIGHT = 52;
|
|
14695
14660
|
var TABLE_HEIGHT = ROW_HEIGHT * 9 - 1;
|
|
14696
14661
|
var EmptyState$6 = () => null;
|
|
14697
|
-
var ErrorState$
|
|
14662
|
+
var ErrorState$4 = () => null;
|
|
14698
14663
|
function ValidateCsvTable({ data, headers, formatters, className }) {
|
|
14699
14664
|
const { t } = useTranslation();
|
|
14700
14665
|
const sortedData = useMemo(() => [...data].sort((a, b) => {
|
|
@@ -14750,7 +14715,7 @@ function ValidateCsvTable({ data, headers, formatters, className }) {
|
|
|
14750
14715
|
shrinkHeightToFitRows: true,
|
|
14751
14716
|
slots: {
|
|
14752
14717
|
EmptyState: EmptyState$6,
|
|
14753
|
-
ErrorState: ErrorState$
|
|
14718
|
+
ErrorState: ErrorState$4
|
|
14754
14719
|
}
|
|
14755
14720
|
})
|
|
14756
14721
|
});
|
|
@@ -21108,7 +21073,7 @@ var TransactionColumns = /* @__PURE__ */ function(TransactionColumns) {
|
|
|
21108
21073
|
TransactionColumns["Amount"] = "Amount";
|
|
21109
21074
|
return TransactionColumns;
|
|
21110
21075
|
}(TransactionColumns || {});
|
|
21111
|
-
var ErrorState$
|
|
21076
|
+
var ErrorState$3 = () => {
|
|
21112
21077
|
const { t } = useTranslation();
|
|
21113
21078
|
return /* @__PURE__ */ jsx(DataState, {
|
|
21114
21079
|
spacing: true,
|
|
@@ -21172,7 +21137,7 @@ var AffectedTransactionsTable = ({ transactions, isLoading = false, isError = fa
|
|
|
21172
21137
|
shrinkHeightToFitRows: true,
|
|
21173
21138
|
slots: {
|
|
21174
21139
|
EmptyState: EmptyState$5,
|
|
21175
|
-
ErrorState: ErrorState$
|
|
21140
|
+
ErrorState: ErrorState$3
|
|
21176
21141
|
}
|
|
21177
21142
|
})
|
|
21178
21143
|
});
|
|
@@ -24584,6 +24549,9 @@ var DetailedChart = ({ data, isLoading, interactionProps, stylingProps, slots })
|
|
|
24584
24549
|
x: x + width / 2,
|
|
24585
24550
|
textAnchor: "middle",
|
|
24586
24551
|
verticalAnchor: "middle",
|
|
24552
|
+
breakAll: true,
|
|
24553
|
+
maxLines: 2,
|
|
24554
|
+
width: Math.max(width - 40, 0),
|
|
24587
24555
|
className: "Layer__DetailedChart__centerLabelTitle",
|
|
24588
24556
|
children: text
|
|
24589
24557
|
}),
|
|
@@ -25695,7 +25663,7 @@ var PnlDetailColumns = /* @__PURE__ */ function(PnlDetailColumns) {
|
|
|
25695
25663
|
PnlDetailColumns["Balance"] = "Balance";
|
|
25696
25664
|
return PnlDetailColumns;
|
|
25697
25665
|
}(PnlDetailColumns || {});
|
|
25698
|
-
var ErrorState$
|
|
25666
|
+
var ErrorState$2 = () => {
|
|
25699
25667
|
const { t } = useTranslation();
|
|
25700
25668
|
return /* @__PURE__ */ jsx(DataState, {
|
|
25701
25669
|
spacing: true,
|
|
@@ -25878,7 +25846,7 @@ var ProfitAndLossDetailReport = ({ lineItemName, breadcrumbPath, onClose, onBrea
|
|
|
25878
25846
|
shrinkHeightToFitRows: true,
|
|
25879
25847
|
slots: {
|
|
25880
25848
|
EmptyState: EmptyState$4,
|
|
25881
|
-
ErrorState: ErrorState$
|
|
25849
|
+
ErrorState: ErrorState$2
|
|
25882
25850
|
}
|
|
25883
25851
|
}), rowsWithRunningBalance.lines.length > 0 && /* @__PURE__ */ jsxs(HStack, {
|
|
25884
25852
|
pb: "sm",
|
|
@@ -26181,7 +26149,7 @@ var ProfitAndLossDetailedCharts = ({ scope, hideClose = false, hideHeader = fals
|
|
|
26181
26149
|
}, [_oldSortByScope, activeScope]);
|
|
26182
26150
|
const handleClose = useCallback(() => setSidebarScope(void 0), [setSidebarScope]);
|
|
26183
26151
|
return /* @__PURE__ */ jsxs("div", {
|
|
26184
|
-
className: "Layer__profit-and-loss-detailed-charts",
|
|
26152
|
+
className: "Layer__profit-and-loss-detailed-charts Layer__ProfitAndLossDetailedCharts",
|
|
26185
26153
|
children: [
|
|
26186
26154
|
!hideHeader && /* @__PURE__ */ jsx(ProfitAndLossDetailedChartsHeader, {
|
|
26187
26155
|
mode: isDesktop ? "desktop" : "tablet",
|
|
@@ -34457,7 +34425,7 @@ var VehicleSchema = Schema.Struct({
|
|
|
34457
34425
|
businessId: pipe(Schema.propertySignature(Schema.UUID), Schema.fromKey("business_id")),
|
|
34458
34426
|
externalId: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("external_id")),
|
|
34459
34427
|
makeAndModel: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("make_and_model")),
|
|
34460
|
-
year: Schema.Number,
|
|
34428
|
+
year: Schema.NullishOr(Schema.Number),
|
|
34461
34429
|
licensePlate: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("license_plate")),
|
|
34462
34430
|
vin: Schema.NullishOr(Schema.String),
|
|
34463
34431
|
description: Schema.NullishOr(Schema.String),
|
|
@@ -34470,7 +34438,7 @@ var VehicleSchema = Schema.Struct({
|
|
|
34470
34438
|
});
|
|
34471
34439
|
Schema.Struct({
|
|
34472
34440
|
makeAndModel: Schema.String,
|
|
34473
|
-
year: Schema.Number,
|
|
34441
|
+
year: Schema.NullishOr(Schema.Number),
|
|
34474
34442
|
licensePlate: Schema.String,
|
|
34475
34443
|
vin: Schema.String,
|
|
34476
34444
|
description: Schema.String,
|
|
@@ -34478,7 +34446,7 @@ Schema.Struct({
|
|
|
34478
34446
|
});
|
|
34479
34447
|
var UpsertVehicleSchema = Schema.Struct({
|
|
34480
34448
|
makeAndModel: pipe(Schema.propertySignature(Schema.String), Schema.fromKey("make_and_model")),
|
|
34481
|
-
year: Schema.Number,
|
|
34449
|
+
year: Schema.NullishOr(Schema.Number),
|
|
34482
34450
|
licensePlate: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("license_plate")),
|
|
34483
34451
|
vin: Schema.NullishOr(Schema.String),
|
|
34484
34452
|
description: Schema.NullishOr(Schema.String),
|
|
@@ -34880,19 +34848,27 @@ var TripPurposeComboBox = ({ value, onValueChange, isReadOnly, className }) => {
|
|
|
34880
34848
|
};
|
|
34881
34849
|
//#endregion
|
|
34882
34850
|
//#region src/utils/vehicles.ts
|
|
34883
|
-
var
|
|
34851
|
+
var unnamedVehicle = translationKey("vehicles:label.unnamed_vehicle", "Unnamed vehicle");
|
|
34852
|
+
var getVehicleDisplayName = (vehicle, t) => {
|
|
34853
|
+
if (!vehicle) return "";
|
|
34854
|
+
const makeAndModel = vehicle.makeAndModel.trim();
|
|
34855
|
+
if (vehicle.year == null) return makeAndModel || t(unnamedVehicle.i18nKey, unnamedVehicle.defaultValue);
|
|
34856
|
+
return `${vehicle.year} ${makeAndModel}`.trim();
|
|
34857
|
+
};
|
|
34884
34858
|
//#endregion
|
|
34885
34859
|
//#region src/components/VehicleManagement/VehicleSelector/VehicleSelector.tsx
|
|
34886
34860
|
var VehicleAsOption = class {
|
|
34887
|
-
constructor(vehicle) {
|
|
34861
|
+
constructor(vehicle, t) {
|
|
34888
34862
|
_defineProperty(this, "internalVehicle", void 0);
|
|
34863
|
+
_defineProperty(this, "t", void 0);
|
|
34889
34864
|
this.internalVehicle = vehicle;
|
|
34865
|
+
this.t = t;
|
|
34890
34866
|
}
|
|
34891
34867
|
get original() {
|
|
34892
34868
|
return this.internalVehicle;
|
|
34893
34869
|
}
|
|
34894
34870
|
get label() {
|
|
34895
|
-
return getVehicleDisplayName(this.internalVehicle);
|
|
34871
|
+
return getVehicleDisplayName(this.internalVehicle, this.t);
|
|
34896
34872
|
}
|
|
34897
34873
|
get id() {
|
|
34898
34874
|
return this.internalVehicle.id;
|
|
@@ -34906,15 +34882,15 @@ function VehicleSelector({ selectedVehicle, onSelectedVehicleChange, placeholder
|
|
|
34906
34882
|
const combinedClassName = classNames("Layer__VehicleSelector", inline && "Layer__VehicleSelector--inline", containerClassName);
|
|
34907
34883
|
const { data, isLoading, isError } = useListVehicles();
|
|
34908
34884
|
const options = useMemo(() => {
|
|
34909
|
-
return (data === null || data === void 0 ? void 0 : data.map((vehicle) => new VehicleAsOption(vehicle))) || [];
|
|
34910
|
-
}, [data]);
|
|
34885
|
+
return (data === null || data === void 0 ? void 0 : data.map((vehicle) => new VehicleAsOption(vehicle, t))) || [];
|
|
34886
|
+
}, [data, t]);
|
|
34911
34887
|
const onSelectedValueChange = useCallback((option) => {
|
|
34912
34888
|
onSelectedVehicleChange((option === null || option === void 0 ? void 0 : option.original) || null);
|
|
34913
34889
|
}, [onSelectedVehicleChange]);
|
|
34914
34890
|
const selectedVehicleForComboBox = useMemo(() => {
|
|
34915
34891
|
if (selectedVehicle === null) return null;
|
|
34916
|
-
return new VehicleAsOption(selectedVehicle);
|
|
34917
|
-
}, [selectedVehicle]);
|
|
34892
|
+
return new VehicleAsOption(selectedVehicle, t);
|
|
34893
|
+
}, [selectedVehicle, t]);
|
|
34918
34894
|
const EmptyMessage = useMemo(() => /* @__PURE__ */ jsx(P, {
|
|
34919
34895
|
variant: "subtle",
|
|
34920
34896
|
children: t("vehicles:empty.matching_vehicle", "No matching vehicle")
|
|
@@ -42220,7 +42196,7 @@ var getColumnConfig$2 = ({ onViewOrUpsertTrip, onDeleteTrip }, t) => [
|
|
|
42220
42196
|
cell: (row) => /* @__PURE__ */ jsx(Span, {
|
|
42221
42197
|
ellipsis: true,
|
|
42222
42198
|
withTooltip: true,
|
|
42223
|
-
children: getVehicleDisplayName(row.original.vehicle)
|
|
42199
|
+
children: getVehicleDisplayName(row.original.vehicle, t)
|
|
42224
42200
|
}),
|
|
42225
42201
|
isRowHeader: true
|
|
42226
42202
|
},
|
|
@@ -42563,7 +42539,7 @@ var validateVehicleForm = ({ vehicle }) => {
|
|
|
42563
42539
|
reason: VehicleFormInvalidReason.YearRequired
|
|
42564
42540
|
});
|
|
42565
42541
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
42566
|
-
if (!Number.isNaN(year) && (year < 1900 || year > currentYear + 1)) errors.push({
|
|
42542
|
+
if (year != null && !Number.isNaN(year) && (year < 1900 || year > currentYear + 1)) errors.push({
|
|
42567
42543
|
field: "year",
|
|
42568
42544
|
reason: VehicleFormInvalidReason.YearRange
|
|
42569
42545
|
});
|
|
@@ -42841,7 +42817,7 @@ function VehicleArchiveConfirmationModal({ isOpen, onOpenChange, vehicle, useDra
|
|
|
42841
42817
|
const onConfirm = useCallback(_asyncToGenerator(function* () {
|
|
42842
42818
|
yield archiveVehicle();
|
|
42843
42819
|
}), [archiveVehicle]);
|
|
42844
|
-
const vehicleName = getVehicleDisplayName(vehicle);
|
|
42820
|
+
const vehicleName = getVehicleDisplayName(vehicle, t);
|
|
42845
42821
|
return /* @__PURE__ */ jsx(BaseConfirmationModal, {
|
|
42846
42822
|
isOpen,
|
|
42847
42823
|
onOpenChange,
|
|
@@ -42902,7 +42878,7 @@ function VehicleDeleteConfirmationModal({ isOpen, onOpenChange, vehicle, useDraw
|
|
|
42902
42878
|
const onConfirm = useCallback(_asyncToGenerator(function* () {
|
|
42903
42879
|
yield deleteVehicle();
|
|
42904
42880
|
}), [deleteVehicle]);
|
|
42905
|
-
const vehicleName = getVehicleDisplayName(vehicle);
|
|
42881
|
+
const vehicleName = getVehicleDisplayName(vehicle, t);
|
|
42906
42882
|
return /* @__PURE__ */ jsx(BaseConfirmationModal, {
|
|
42907
42883
|
isOpen,
|
|
42908
42884
|
onOpenChange,
|
|
@@ -42964,7 +42940,7 @@ function VehicleReactivateConfirmationModal({ isOpen, onOpenChange, vehicle, use
|
|
|
42964
42940
|
const onConfirm = useCallback(_asyncToGenerator(function* () {
|
|
42965
42941
|
yield reactivateVehicle();
|
|
42966
42942
|
}), [reactivateVehicle]);
|
|
42967
|
-
const vehicleName = getVehicleDisplayName(vehicle);
|
|
42943
|
+
const vehicleName = getVehicleDisplayName(vehicle, t);
|
|
42968
42944
|
return /* @__PURE__ */ jsx(BaseConfirmationModal, {
|
|
42969
42945
|
isOpen,
|
|
42970
42946
|
onOpenChange,
|
|
@@ -42995,7 +42971,7 @@ var VehicleCard = ({ vehicle, onEdit }) => {
|
|
|
42995
42971
|
label: t(opt.i18nKey, opt.defaultValue),
|
|
42996
42972
|
key: opt.fieldKey
|
|
42997
42973
|
})), [t]);
|
|
42998
|
-
const vehicleName = getVehicleDisplayName(vehicle);
|
|
42974
|
+
const vehicleName = getVehicleDisplayName(vehicle, t);
|
|
42999
42975
|
const isArchived = vehicle.archivedAt !== null && vehicle.archivedAt !== void 0;
|
|
43000
42976
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
43001
42977
|
/* @__PURE__ */ jsx(Card, {
|
|
@@ -43507,10 +43483,7 @@ var SummaryCard = ({ slots, children, className }) => {
|
|
|
43507
43483
|
children: [legend && /* @__PURE__ */ jsx("div", {
|
|
43508
43484
|
className: "Layer__SummaryCard__HeaderLegend",
|
|
43509
43485
|
children: legend
|
|
43510
|
-
}), primaryAction
|
|
43511
|
-
className: "Layer__SummaryCard__HeaderPrimaryAction",
|
|
43512
|
-
children: primaryAction
|
|
43513
|
-
})]
|
|
43486
|
+
}), primaryAction]
|
|
43514
43487
|
})]
|
|
43515
43488
|
}), /* @__PURE__ */ jsx("div", {
|
|
43516
43489
|
className: "Layer__SummaryCard__Content",
|
|
@@ -43593,88 +43566,89 @@ var ExpensesSummaryCard = ({ stylingProps, interactionProps, stringOverrides, cl
|
|
|
43593
43566
|
};
|
|
43594
43567
|
//#endregion
|
|
43595
43568
|
//#region src/components/MileageTrackingSummary/MileageTrackingSummary.tsx
|
|
43596
|
-
var
|
|
43569
|
+
var Content$1 = () => {
|
|
43597
43570
|
const { t } = useTranslation();
|
|
43598
43571
|
const { formatDate } = useIntlFormatter();
|
|
43599
43572
|
const { data, selectedYear, selectedYearData, chartData, isLoading, isError } = useMileageTrackingYearlySummary();
|
|
43600
43573
|
const { isDesktop, isMobile } = useSizeClass();
|
|
43601
43574
|
const inYearLabel = t("mileageTracking:label.in_year", "In {{year}}", { year: formatDate(new Date(selectedYear, 0, 1), DateFormat.Year) });
|
|
43602
|
-
const title = headerOverride !== null && headerOverride !== void 0 ? headerOverride : t("mileageTracking:label.mileage_tracking", "Mileage Tracking");
|
|
43603
43575
|
const statsProps = isDesktop ? { direction: "column" } : isMobile ? { direction: "column" } : { direction: "row" };
|
|
43604
|
-
return /* @__PURE__ */
|
|
43605
|
-
|
|
43606
|
-
|
|
43607
|
-
|
|
43608
|
-
|
|
43609
|
-
|
|
43610
|
-
|
|
43611
|
-
|
|
43612
|
-
|
|
43613
|
-
|
|
43614
|
-
|
|
43615
|
-
|
|
43616
|
-
|
|
43617
|
-
|
|
43576
|
+
return /* @__PURE__ */ jsx(ConditionalBlock, {
|
|
43577
|
+
data,
|
|
43578
|
+
isLoading,
|
|
43579
|
+
isError,
|
|
43580
|
+
Loading: /* @__PURE__ */ jsx(HStack, {
|
|
43581
|
+
className: "Layer__MileageTrackingSummary__Content",
|
|
43582
|
+
gap: "lg",
|
|
43583
|
+
justify: "center",
|
|
43584
|
+
align: "center",
|
|
43585
|
+
children: /* @__PURE__ */ jsx(Loader, {})
|
|
43586
|
+
}),
|
|
43587
|
+
Error: /* @__PURE__ */ jsx(DataState, {
|
|
43588
|
+
status: DataStateStatus.failed,
|
|
43589
|
+
title: t("mileageTracking:error.load_mileage_summary_data", "Failed to load mileage summary data"),
|
|
43590
|
+
spacing: true
|
|
43591
|
+
}),
|
|
43592
|
+
children: () => {
|
|
43593
|
+
var _selectedYearData$est, _selectedYearData$mil, _selectedYearData$tri;
|
|
43594
|
+
return /* @__PURE__ */ jsxs(Stack, {
|
|
43618
43595
|
className: "Layer__MileageTrackingSummary__Content",
|
|
43596
|
+
direction: isDesktop ? "row" : "column",
|
|
43619
43597
|
gap: "lg",
|
|
43620
|
-
|
|
43621
|
-
|
|
43622
|
-
|
|
43623
|
-
|
|
43624
|
-
|
|
43625
|
-
|
|
43626
|
-
|
|
43627
|
-
|
|
43628
|
-
|
|
43629
|
-
|
|
43630
|
-
|
|
43631
|
-
|
|
43632
|
-
|
|
43633
|
-
|
|
43634
|
-
|
|
43635
|
-
|
|
43636
|
-
|
|
43637
|
-
|
|
43638
|
-
|
|
43639
|
-
|
|
43640
|
-
|
|
43641
|
-
|
|
43642
|
-
|
|
43643
|
-
|
|
43644
|
-
|
|
43645
|
-
|
|
43646
|
-
|
|
43647
|
-
}),
|
|
43648
|
-
/* @__PURE__ */ jsx("div", {
|
|
43649
|
-
className: "Layer__MileageTrackingSummary__StatCardSlot",
|
|
43650
|
-
children: /* @__PURE__ */ jsx(MileageTrackingStatsCard, {
|
|
43651
|
-
title: t("mileageTracking:label.total_miles", "Total Miles"),
|
|
43652
|
-
amount: (_selectedYearData$mil = selectedYearData === null || selectedYearData === void 0 ? void 0 : selectedYearData.miles) !== null && _selectedYearData$mil !== void 0 ? _selectedYearData$mil : 0,
|
|
43653
|
-
description: inYearLabel
|
|
43654
|
-
})
|
|
43655
|
-
}),
|
|
43656
|
-
/* @__PURE__ */ jsx("div", {
|
|
43657
|
-
className: "Layer__MileageTrackingSummary__StatCardSlot",
|
|
43658
|
-
children: /* @__PURE__ */ jsx(MileageTrackingStatsCard, {
|
|
43659
|
-
title: t("trips:label.trips", "Trips"),
|
|
43660
|
-
amount: (_selectedYearData$tri = selectedYearData === null || selectedYearData === void 0 ? void 0 : selectedYearData.trips) !== null && _selectedYearData$tri !== void 0 ? _selectedYearData$tri : 0,
|
|
43661
|
-
description: inYearLabel
|
|
43662
|
-
})
|
|
43598
|
+
children: [/* @__PURE__ */ jsxs(Stack, _objectSpread2(_objectSpread2({}, statsProps), {}, {
|
|
43599
|
+
className: "Layer__MileageTrackingSummary__Cards",
|
|
43600
|
+
gap: "md",
|
|
43601
|
+
children: [
|
|
43602
|
+
/* @__PURE__ */ jsx("div", {
|
|
43603
|
+
className: "Layer__MileageTrackingSummary__StatCardSlot",
|
|
43604
|
+
children: /* @__PURE__ */ jsx(MileageTrackingStatsCard, {
|
|
43605
|
+
title: t("mileageTracking:label.total_deduction", "Total Deduction"),
|
|
43606
|
+
amount: (_selectedYearData$est = selectedYearData === null || selectedYearData === void 0 ? void 0 : selectedYearData.estimatedDeduction) !== null && _selectedYearData$est !== void 0 ? _selectedYearData$est : 0,
|
|
43607
|
+
formatAsMoney: true,
|
|
43608
|
+
description: inYearLabel
|
|
43609
|
+
})
|
|
43610
|
+
}),
|
|
43611
|
+
/* @__PURE__ */ jsx("div", {
|
|
43612
|
+
className: "Layer__MileageTrackingSummary__StatCardSlot",
|
|
43613
|
+
children: /* @__PURE__ */ jsx(MileageTrackingStatsCard, {
|
|
43614
|
+
title: t("mileageTracking:label.total_miles", "Total Miles"),
|
|
43615
|
+
amount: (_selectedYearData$mil = selectedYearData === null || selectedYearData === void 0 ? void 0 : selectedYearData.miles) !== null && _selectedYearData$mil !== void 0 ? _selectedYearData$mil : 0,
|
|
43616
|
+
description: inYearLabel
|
|
43617
|
+
})
|
|
43618
|
+
}),
|
|
43619
|
+
/* @__PURE__ */ jsx("div", {
|
|
43620
|
+
className: "Layer__MileageTrackingSummary__StatCardSlot",
|
|
43621
|
+
children: /* @__PURE__ */ jsx(MileageTrackingStatsCard, {
|
|
43622
|
+
title: t("trips:label.trips", "Trips"),
|
|
43623
|
+
amount: (_selectedYearData$tri = selectedYearData === null || selectedYearData === void 0 ? void 0 : selectedYearData.trips) !== null && _selectedYearData$tri !== void 0 ? _selectedYearData$tri : 0,
|
|
43624
|
+
description: inYearLabel
|
|
43663
43625
|
})
|
|
43664
|
-
]
|
|
43665
|
-
})), /* @__PURE__ */ jsx(VStack, {
|
|
43666
|
-
className: "Layer__MileageTrackingSummary__Chart",
|
|
43667
|
-
fluid: true,
|
|
43668
|
-
justify: "end",
|
|
43669
|
-
children: /* @__PURE__ */ jsx(MileageDeductionChart, {
|
|
43670
|
-
data: chartData,
|
|
43671
|
-
selectedYear,
|
|
43672
|
-
chartHeight: isDesktop ? 250 : 200
|
|
43673
43626
|
})
|
|
43674
|
-
|
|
43675
|
-
})
|
|
43676
|
-
|
|
43677
|
-
|
|
43627
|
+
]
|
|
43628
|
+
})), /* @__PURE__ */ jsx(VStack, {
|
|
43629
|
+
className: "Layer__MileageTrackingSummary__Chart",
|
|
43630
|
+
fluid: true,
|
|
43631
|
+
justify: "end",
|
|
43632
|
+
children: /* @__PURE__ */ jsx(MileageDeductionChart, {
|
|
43633
|
+
data: chartData,
|
|
43634
|
+
selectedYear,
|
|
43635
|
+
chartHeight: isDesktop ? 250 : 200
|
|
43636
|
+
})
|
|
43637
|
+
})]
|
|
43638
|
+
});
|
|
43639
|
+
}
|
|
43640
|
+
});
|
|
43641
|
+
};
|
|
43642
|
+
var MileageTrackingSummary = ({ stringOverrides, interactionProps } = {}) => {
|
|
43643
|
+
const { t } = useTranslation();
|
|
43644
|
+
return /* @__PURE__ */ jsx(SummaryCard, {
|
|
43645
|
+
className: "Layer__MileageTrackingSummary",
|
|
43646
|
+
slots: useSummaryCardSlots({
|
|
43647
|
+
defaultTitle: t("mileageTracking:label.mileage_tracking", "Mileage Tracking"),
|
|
43648
|
+
interactionProps,
|
|
43649
|
+
stringOverrides
|
|
43650
|
+
}),
|
|
43651
|
+
children: /* @__PURE__ */ jsx(Content$1, {})
|
|
43678
43652
|
});
|
|
43679
43653
|
};
|
|
43680
43654
|
//#endregion
|
|
@@ -43733,19 +43707,329 @@ var ProfitAndLossSummaryCard = ({ interactionProps, stringOverrides, className }
|
|
|
43733
43707
|
interactionProps,
|
|
43734
43708
|
stringOverrides
|
|
43735
43709
|
});
|
|
43736
|
-
return /* @__PURE__ */
|
|
43737
|
-
className: classNames("Layer__ProfitAndLossSummaryCard", className),
|
|
43710
|
+
return /* @__PURE__ */ jsxs(SummaryCard, {
|
|
43711
|
+
className: classNames("Layer__ProfitAndLossSummaryCard", "Layer__UI__Chart--focusReset", className),
|
|
43738
43712
|
slots,
|
|
43739
|
-
children: /* @__PURE__ */
|
|
43740
|
-
|
|
43741
|
-
|
|
43742
|
-
|
|
43743
|
-
|
|
43744
|
-
|
|
43745
|
-
|
|
43713
|
+
children: [/* @__PURE__ */ jsx(ProfitAndLossChart, {
|
|
43714
|
+
tagFilter,
|
|
43715
|
+
hideLegend: true
|
|
43716
|
+
}), !isDesktop && legend]
|
|
43717
|
+
});
|
|
43718
|
+
};
|
|
43719
|
+
//#endregion
|
|
43720
|
+
//#region src/types/location.ts
|
|
43721
|
+
var US_STATES_CONFIG = [
|
|
43722
|
+
_objectSpread2({ value: "AL" }, translationKey("usStates:label.alabama", "Alabama")),
|
|
43723
|
+
_objectSpread2({ value: "AK" }, translationKey("usStates:label.alaska", "Alaska")),
|
|
43724
|
+
_objectSpread2({ value: "AZ" }, translationKey("usStates:label.arizona", "Arizona")),
|
|
43725
|
+
_objectSpread2({ value: "AR" }, translationKey("usStates:label.arkansas", "Arkansas")),
|
|
43726
|
+
_objectSpread2({ value: "CA" }, translationKey("usStates:label.california", "California")),
|
|
43727
|
+
_objectSpread2({ value: "CO" }, translationKey("usStates:label.colorado", "Colorado")),
|
|
43728
|
+
_objectSpread2({ value: "CT" }, translationKey("usStates:label.connecticut", "Connecticut")),
|
|
43729
|
+
_objectSpread2({ value: "DE" }, translationKey("usStates:label.delaware", "Delaware")),
|
|
43730
|
+
_objectSpread2({ value: "DC" }, translationKey("usStates:label.district_columbia", "District of Columbia")),
|
|
43731
|
+
_objectSpread2({ value: "FL" }, translationKey("usStates:label.florida", "Florida")),
|
|
43732
|
+
_objectSpread2({ value: "GA" }, translationKey("usStates:label.georgia", "Georgia")),
|
|
43733
|
+
_objectSpread2({ value: "HI" }, translationKey("usStates:label.hawaii", "Hawaii")),
|
|
43734
|
+
_objectSpread2({ value: "ID" }, translationKey("usStates:label.idaho", "Idaho")),
|
|
43735
|
+
_objectSpread2({ value: "IL" }, translationKey("usStates:label.illinois", "Illinois")),
|
|
43736
|
+
_objectSpread2({ value: "IN" }, translationKey("usStates:label.indiana", "Indiana")),
|
|
43737
|
+
_objectSpread2({ value: "IA" }, translationKey("usStates:label.iowa", "Iowa")),
|
|
43738
|
+
_objectSpread2({ value: "KS" }, translationKey("usStates:label.kansas", "Kansas")),
|
|
43739
|
+
_objectSpread2({ value: "KY" }, translationKey("usStates:label.kentucky", "Kentucky")),
|
|
43740
|
+
_objectSpread2({ value: "LA" }, translationKey("usStates:label.louisiana", "Louisiana")),
|
|
43741
|
+
_objectSpread2({ value: "ME" }, translationKey("usStates:label.maine", "Maine")),
|
|
43742
|
+
_objectSpread2({ value: "MD" }, translationKey("usStates:label.maryland", "Maryland")),
|
|
43743
|
+
_objectSpread2({ value: "MA" }, translationKey("usStates:label.massachusetts", "Massachusetts")),
|
|
43744
|
+
_objectSpread2({ value: "MI" }, translationKey("usStates:label.michigan", "Michigan")),
|
|
43745
|
+
_objectSpread2({ value: "MN" }, translationKey("usStates:label.minnesota", "Minnesota")),
|
|
43746
|
+
_objectSpread2({ value: "MS" }, translationKey("usStates:label.mississippi", "Mississippi")),
|
|
43747
|
+
_objectSpread2({ value: "MO" }, translationKey("usStates:label.missouri", "Missouri")),
|
|
43748
|
+
_objectSpread2({ value: "MT" }, translationKey("usStates:label.montana", "Montana")),
|
|
43749
|
+
_objectSpread2({ value: "NE" }, translationKey("usStates:label.nebraska", "Nebraska")),
|
|
43750
|
+
_objectSpread2({ value: "NV" }, translationKey("usStates:label.nevada", "Nevada")),
|
|
43751
|
+
_objectSpread2({ value: "NH" }, translationKey("usStates:label.new_hampshire", "New Hampshire")),
|
|
43752
|
+
_objectSpread2({ value: "NJ" }, translationKey("usStates:label.new_jersey", "New Jersey")),
|
|
43753
|
+
_objectSpread2({ value: "NM" }, translationKey("usStates:label.new_mexico", "New Mexico")),
|
|
43754
|
+
_objectSpread2({ value: "NY" }, translationKey("usStates:label.new_york", "New York")),
|
|
43755
|
+
_objectSpread2({ value: "NC" }, translationKey("usStates:label.north_carolina", "North Carolina")),
|
|
43756
|
+
_objectSpread2({ value: "ND" }, translationKey("usStates:label.north_dakota", "North Dakota")),
|
|
43757
|
+
_objectSpread2({ value: "OH" }, translationKey("usStates:label.ohio", "Ohio")),
|
|
43758
|
+
_objectSpread2({ value: "OK" }, translationKey("usStates:label.oklahoma", "Oklahoma")),
|
|
43759
|
+
_objectSpread2({ value: "OR" }, translationKey("usStates:label.oregon", "Oregon")),
|
|
43760
|
+
_objectSpread2({ value: "PA" }, translationKey("usStates:label.pennsylvania", "Pennsylvania")),
|
|
43761
|
+
_objectSpread2({ value: "RI" }, translationKey("usStates:label.rhode_island", "Rhode Island")),
|
|
43762
|
+
_objectSpread2({ value: "SC" }, translationKey("usStates:label.south_carolina", "South Carolina")),
|
|
43763
|
+
_objectSpread2({ value: "SD" }, translationKey("usStates:label.south_dakota", "South Dakota")),
|
|
43764
|
+
_objectSpread2({ value: "TN" }, translationKey("usStates:label.tennessee", "Tennessee")),
|
|
43765
|
+
_objectSpread2({ value: "TX" }, translationKey("usStates:label.texas", "Texas")),
|
|
43766
|
+
_objectSpread2({ value: "UT" }, translationKey("usStates:label.utah", "Utah")),
|
|
43767
|
+
_objectSpread2({ value: "VT" }, translationKey("usStates:label.vermont", "Vermont")),
|
|
43768
|
+
_objectSpread2({ value: "VA" }, translationKey("usStates:label.virginia", "Virginia")),
|
|
43769
|
+
_objectSpread2({ value: "WA" }, translationKey("usStates:label.washington", "Washington")),
|
|
43770
|
+
_objectSpread2({ value: "WV" }, translationKey("usStates:label.west_virginia", "West Virginia")),
|
|
43771
|
+
_objectSpread2({ value: "WI" }, translationKey("usStates:label.wisconsin", "Wisconsin")),
|
|
43772
|
+
_objectSpread2({ value: "WY" }, translationKey("usStates:label.wyoming", "Wyoming")),
|
|
43773
|
+
_objectSpread2({ value: "PR" }, translationKey("usStates:label.puerto_rico", "Puerto Rico"))
|
|
43774
|
+
];
|
|
43775
|
+
var US_STATE_VALUES = US_STATES_CONFIG.map((s) => s.value);
|
|
43776
|
+
//#endregion
|
|
43777
|
+
//#region src/schemas/taxEstimates/filingStatus.ts
|
|
43778
|
+
var FilingStatus = /* @__PURE__ */ function(FilingStatus) {
|
|
43779
|
+
FilingStatus["SINGLE"] = "SINGLE";
|
|
43780
|
+
FilingStatus["MARRIED"] = "MARRIED";
|
|
43781
|
+
FilingStatus["MARRIED_SEPARATELY"] = "MARRIED_SEPARATELY";
|
|
43782
|
+
FilingStatus["HEAD"] = "HEAD";
|
|
43783
|
+
FilingStatus["WIDOWER"] = "WIDOWER";
|
|
43784
|
+
return FilingStatus;
|
|
43785
|
+
}({});
|
|
43786
|
+
var FilingStatusSchema = Schema.Enums(FilingStatus);
|
|
43787
|
+
//#endregion
|
|
43788
|
+
//#region src/schemas/taxEstimates/profile.ts
|
|
43789
|
+
var USStateCodeSchema = Schema.Literal(...US_STATE_VALUES);
|
|
43790
|
+
var WithholdingSchema = Schema.Struct({
|
|
43791
|
+
useCustomWithholding: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_custom_withholding")),
|
|
43792
|
+
amount: Schema.NullishOr(Schema.Number)
|
|
43793
|
+
});
|
|
43794
|
+
var HomeOfficeDeductionSchema = Schema.Struct({
|
|
43795
|
+
useHomeOfficeDeduction: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_home_office_deduction")),
|
|
43796
|
+
homeOfficeArea: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("home_office_area"))
|
|
43797
|
+
});
|
|
43798
|
+
var VehicleDeductionSchema = Schema.Struct({ useMileageDeduction: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_mileage_deduction")) });
|
|
43799
|
+
var DeductionsSchema = Schema.Struct({
|
|
43800
|
+
homeOffice: pipe(Schema.propertySignature(Schema.NullishOr(HomeOfficeDeductionSchema)), Schema.fromKey("home_office")),
|
|
43801
|
+
vehicle: Schema.NullishOr(VehicleDeductionSchema)
|
|
43802
|
+
});
|
|
43803
|
+
var FederalConfigurationSchema = Schema.Struct({
|
|
43804
|
+
filingStatus: pipe(Schema.propertySignature(Schema.NullishOr(FilingStatusSchema)), Schema.fromKey("filing_status")),
|
|
43805
|
+
annualW2Income: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("annual_w2_income")),
|
|
43806
|
+
tipIncome: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("tip_income")),
|
|
43807
|
+
overtimeIncome: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("overtime_income")),
|
|
43808
|
+
withholding: Schema.NullishOr(WithholdingSchema)
|
|
43809
|
+
});
|
|
43810
|
+
var StateConfigurationSchema = Schema.Struct({
|
|
43811
|
+
taxState: pipe(Schema.propertySignature(Schema.NullishOr(USStateCodeSchema)), Schema.fromKey("tax_state")),
|
|
43812
|
+
filingStatus: pipe(Schema.propertySignature(Schema.NullishOr(FilingStatusSchema)), Schema.fromKey("filing_status")),
|
|
43813
|
+
withholding: Schema.NullishOr(WithholdingSchema)
|
|
43814
|
+
});
|
|
43815
|
+
var UsConfigurationSchema = Schema.Struct({
|
|
43816
|
+
federal: Schema.NullishOr(FederalConfigurationSchema),
|
|
43817
|
+
state: Schema.NullishOr(StateConfigurationSchema),
|
|
43818
|
+
deductions: pipe(Schema.propertySignature(Schema.NullishOr(DeductionsSchema)), Schema.fromKey("deductions"))
|
|
43819
|
+
});
|
|
43820
|
+
var TaxProfileSchema = Schema.Struct({
|
|
43821
|
+
taxCountryCode: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("tax_country_code")),
|
|
43822
|
+
usConfiguration: pipe(Schema.propertySignature(Schema.NullishOr(UsConfigurationSchema)), Schema.fromKey("us_configuration")),
|
|
43823
|
+
userHasSavedTaxProfile: pipe(Schema.propertySignature(Schema.Boolean), Schema.fromKey("user_has_saved_tax_profile"))
|
|
43824
|
+
});
|
|
43825
|
+
var TaxProfileResponseSchema = Schema.Struct({ data: TaxProfileSchema });
|
|
43826
|
+
var TaxProfileRequestSchema = Schema.Struct({
|
|
43827
|
+
taxCountryCode: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("tax_country_code")),
|
|
43828
|
+
usConfiguration: pipe(Schema.propertySignature(Schema.NullishOr(UsConfigurationSchema)), Schema.fromKey("us_configuration"))
|
|
43829
|
+
});
|
|
43830
|
+
//#endregion
|
|
43831
|
+
//#region src/hooks/api/businesses/[business-id]/tax-estimates/profile/useTaxProfile.ts
|
|
43832
|
+
var TAX_PROFILE_TAG_KEY = "#tax-profile";
|
|
43833
|
+
var getTaxProfile = get(({ businessId }) => {
|
|
43834
|
+
return `/v1/businesses/${businessId}/tax-estimates/profile`;
|
|
43835
|
+
});
|
|
43836
|
+
function buildKey$17({ access_token: accessToken, apiUrl, businessId }) {
|
|
43837
|
+
if (accessToken && apiUrl) return {
|
|
43838
|
+
accessToken,
|
|
43839
|
+
apiUrl,
|
|
43840
|
+
businessId,
|
|
43841
|
+
tags: [TAX_PROFILE_TAG_KEY]
|
|
43842
|
+
};
|
|
43843
|
+
}
|
|
43844
|
+
function useTaxProfile() {
|
|
43845
|
+
const withLocale = useLocalizedKey();
|
|
43846
|
+
const { data: auth } = useAuth();
|
|
43847
|
+
const { businessId } = useLayerContext();
|
|
43848
|
+
return new SWRQueryResult(useSWR(() => withLocale(buildKey$17(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
|
|
43849
|
+
var _ref = _asyncToGenerator(function* ({ accessToken, apiUrl, businessId }) {
|
|
43850
|
+
return getTaxProfile(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(TaxProfileResponseSchema)).then(({ data }) => data);
|
|
43851
|
+
});
|
|
43852
|
+
return function(_x) {
|
|
43853
|
+
return _ref.apply(this, arguments);
|
|
43854
|
+
};
|
|
43855
|
+
}()));
|
|
43856
|
+
}
|
|
43857
|
+
function useTaxProfileGlobalCacheActions() {
|
|
43858
|
+
const { patchCache } = useGlobalCacheActions();
|
|
43859
|
+
return { patchTaxProfile: useCallback((updatedProfile) => patchCache(({ tags }) => tags.includes(TAX_PROFILE_TAG_KEY), () => updatedProfile), [patchCache]) };
|
|
43860
|
+
}
|
|
43861
|
+
//#endregion
|
|
43862
|
+
//#region src/components/SolopreneurOnboardingBanner/SolopreneurOnboardingBanner.tsx
|
|
43863
|
+
var OnboardingBannerState = /* @__PURE__ */ function(OnboardingBannerState) {
|
|
43864
|
+
OnboardingBannerState["Loading"] = "Loading";
|
|
43865
|
+
OnboardingBannerState["NoBankAccountsLinked"] = "NoBankAccountsLinked";
|
|
43866
|
+
OnboardingBannerState["NoTaxProfile"] = "NoTaxProfile";
|
|
43867
|
+
OnboardingBannerState["Onboarded"] = "Onboarded";
|
|
43868
|
+
return OnboardingBannerState;
|
|
43869
|
+
}(OnboardingBannerState || {});
|
|
43870
|
+
var getOnboardingBannerState = ({ isLoading, hasLinkedAccounts, hasSavedTaxProfile }) => {
|
|
43871
|
+
if (isLoading) return OnboardingBannerState.Loading;
|
|
43872
|
+
if (!hasLinkedAccounts) return OnboardingBannerState.NoBankAccountsLinked;
|
|
43873
|
+
if (!hasSavedTaxProfile) return OnboardingBannerState.NoTaxProfile;
|
|
43874
|
+
return OnboardingBannerState.Onboarded;
|
|
43875
|
+
};
|
|
43876
|
+
var NoBankAccountsLinkedBanner = () => {
|
|
43877
|
+
const { addConnection } = useContext(LinkedAccountsContext);
|
|
43878
|
+
const { isMobile } = useSizeClass();
|
|
43879
|
+
const handleLinkBankAccounts = useCallback(() => {
|
|
43880
|
+
addConnection("PLAID");
|
|
43881
|
+
}, [addConnection]);
|
|
43882
|
+
return /* @__PURE__ */ jsx(Banner, {
|
|
43883
|
+
title: "Link your bank accounts",
|
|
43884
|
+
description: "Linking your bank accounts allows us to load your bank transactions and automatically categorize them.",
|
|
43885
|
+
slots: {
|
|
43886
|
+
Icon: isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 }),
|
|
43887
|
+
Button: /* @__PURE__ */ jsx(Button$1, {
|
|
43888
|
+
onPress: handleLinkBankAccounts,
|
|
43889
|
+
variant: "outlined-light",
|
|
43890
|
+
children: "Link your bank accounts"
|
|
43891
|
+
})
|
|
43892
|
+
}
|
|
43893
|
+
});
|
|
43894
|
+
};
|
|
43895
|
+
var NoTaxProfileBanner = ({ onSetupTaxProfile }) => {
|
|
43896
|
+
const { isMobile } = useSizeClass();
|
|
43897
|
+
return /* @__PURE__ */ jsx(Banner, {
|
|
43898
|
+
title: "Set up your tax profile",
|
|
43899
|
+
description: "Configuring your tax profile allows us to provide you with tax estimates and avoid any surprises come tax time.",
|
|
43900
|
+
slots: {
|
|
43901
|
+
Icon: isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 }),
|
|
43902
|
+
Button: onSetupTaxProfile ? /* @__PURE__ */ jsx(Button$1, {
|
|
43903
|
+
onPress: onSetupTaxProfile,
|
|
43904
|
+
variant: "outlined-light",
|
|
43905
|
+
children: "Setup your tax profile"
|
|
43906
|
+
}) : null
|
|
43907
|
+
}
|
|
43908
|
+
});
|
|
43909
|
+
};
|
|
43910
|
+
function SolopreneurOnboardingBannerInternal({ onSetupTaxProfile }) {
|
|
43911
|
+
const state = useSolopreneurOnboardingBannerState();
|
|
43912
|
+
if (state === OnboardingBannerState.Loading || state === OnboardingBannerState.Onboarded) return null;
|
|
43913
|
+
return /* @__PURE__ */ jsxs(HStack, {
|
|
43914
|
+
className: "Layer__SolopreneurLayout__OnboardingBanner",
|
|
43915
|
+
children: [state === OnboardingBannerState.NoBankAccountsLinked && /* @__PURE__ */ jsx(NoBankAccountsLinkedBanner, {}), state === OnboardingBannerState.NoTaxProfile && /* @__PURE__ */ jsx(NoTaxProfileBanner, { onSetupTaxProfile })]
|
|
43916
|
+
});
|
|
43917
|
+
}
|
|
43918
|
+
function SolopreneurOnboardingBanner({ onSetupTaxProfile }) {
|
|
43919
|
+
return /* @__PURE__ */ jsx(LinkedAccountsProvider, { children: /* @__PURE__ */ jsx(SolopreneurOnboardingBannerInternal, { onSetupTaxProfile }) });
|
|
43920
|
+
}
|
|
43921
|
+
var useSolopreneurOnboardingBannerState = () => {
|
|
43922
|
+
const { data: linkedAccounts, isLoading: isLinkedAccountsLoading, loadingStatus: linkedAccountsLoadingStatus } = useContext(LinkedAccountsContext);
|
|
43923
|
+
const { data: taxProfile, isLoading: isTaxProfileLoading } = useTaxProfile();
|
|
43924
|
+
return getOnboardingBannerState({
|
|
43925
|
+
isLoading: isLinkedAccountsLoading || isTaxProfileLoading || linkedAccountsLoadingStatus === "loading" || linkedAccountsLoadingStatus === "initial",
|
|
43926
|
+
hasLinkedAccounts: Array.isArray(linkedAccounts) && linkedAccounts.length > 0,
|
|
43927
|
+
hasSavedTaxProfile: (taxProfile === null || taxProfile === void 0 ? void 0 : taxProfile.userHasSavedTaxProfile) === true
|
|
43928
|
+
});
|
|
43929
|
+
};
|
|
43930
|
+
//#endregion
|
|
43931
|
+
//#region src/components/TaxEstimatesSummaryCard/constants.ts
|
|
43932
|
+
var resolveCategoryColor = ({ key }) => {
|
|
43933
|
+
var _federal$state$key;
|
|
43934
|
+
return (_federal$state$key = {
|
|
43935
|
+
federal: DEFAULT_CHART_COLORS[0],
|
|
43936
|
+
state: DEFAULT_CHART_COLORS[1]
|
|
43937
|
+
}[key]) !== null && _federal$state$key !== void 0 ? _federal$state$key : DEFAULT_CHART_COLORS[0];
|
|
43938
|
+
};
|
|
43939
|
+
var TaxEstimatesSummaryCardMode = /* @__PURE__ */ function(TaxEstimatesSummaryCardMode) {
|
|
43940
|
+
TaxEstimatesSummaryCardMode["PieChart"] = "PieChart";
|
|
43941
|
+
TaxEstimatesSummaryCardMode["HorizontalBarChart"] = "HorizontalBarChart";
|
|
43942
|
+
return TaxEstimatesSummaryCardMode;
|
|
43943
|
+
}({});
|
|
43944
|
+
//#endregion
|
|
43945
|
+
//#region src/components/TaxEstimatesSummaryCard/states/TaxEstimatesSummaryCardError.tsx
|
|
43946
|
+
var TaxEstimatesSummaryCardError = () => {
|
|
43947
|
+
const { t } = useTranslation();
|
|
43948
|
+
return /* @__PURE__ */ jsx(DataState, {
|
|
43949
|
+
className: "Layer__TaxEstimatesSummaryCard__DataState Layer__data-state--reset",
|
|
43950
|
+
status: DataStateStatus.failed,
|
|
43951
|
+
title: t("taxEstimates:error.load_tax_estimates_summary", "We couldn't load your tax summary"),
|
|
43952
|
+
description: t("taxEstimates:error.while_loading_tax_estimates_summary", "An error occurred while loading your tax summary. Please check your connection and try again.")
|
|
43953
|
+
});
|
|
43954
|
+
};
|
|
43955
|
+
//#endregion
|
|
43956
|
+
//#region src/components/TaxEstimatesSummaryCard/states/TaxEstimatesSummaryCardLoading.tsx
|
|
43957
|
+
var TaxEstimatesSummaryCardLoading = ({ mode }) => {
|
|
43958
|
+
if (mode === TaxEstimatesSummaryCardMode.HorizontalBarChart) return /* @__PURE__ */ jsxs(VStack, {
|
|
43959
|
+
gap: "md",
|
|
43960
|
+
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
43961
|
+
pb: "md",
|
|
43962
|
+
pi: "lg",
|
|
43963
|
+
children: [
|
|
43964
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43965
|
+
height: "24px",
|
|
43966
|
+
width: "40%"
|
|
43967
|
+
}),
|
|
43968
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43969
|
+
height: "24px",
|
|
43970
|
+
width: "100%"
|
|
43971
|
+
}),
|
|
43972
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43973
|
+
height: "16px",
|
|
43974
|
+
width: "100%"
|
|
43975
|
+
})
|
|
43976
|
+
]
|
|
43977
|
+
});
|
|
43978
|
+
return /* @__PURE__ */ jsxs(VStack, {
|
|
43979
|
+
gap: "md",
|
|
43980
|
+
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
43981
|
+
pb: "md",
|
|
43982
|
+
pi: "lg",
|
|
43983
|
+
align: "center",
|
|
43984
|
+
children: [
|
|
43985
|
+
/* @__PURE__ */ jsx(CircleSkeletonLoader, {
|
|
43986
|
+
height: "128px",
|
|
43987
|
+
width: "128px"
|
|
43988
|
+
}),
|
|
43989
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43990
|
+
height: "24px",
|
|
43991
|
+
width: "80%"
|
|
43992
|
+
}),
|
|
43993
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43994
|
+
height: "24px",
|
|
43995
|
+
width: "80%"
|
|
43996
|
+
}),
|
|
43997
|
+
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
43998
|
+
height: "24px",
|
|
43999
|
+
width: "80%"
|
|
44000
|
+
})
|
|
44001
|
+
]
|
|
43746
44002
|
});
|
|
43747
44003
|
};
|
|
43748
44004
|
//#endregion
|
|
44005
|
+
//#region src/schemas/taxEstimates/summary.ts
|
|
44006
|
+
var TaxSummarySectionTypeSchema = Schema.Literal("federal", "state");
|
|
44007
|
+
var TaxSummaryState = /* @__PURE__ */ function(TaxSummaryState) {
|
|
44008
|
+
TaxSummaryState["NO_TRANSACTIONS"] = "NO_TRANSACTIONS";
|
|
44009
|
+
TaxSummaryState["NO_TAXES_OWED"] = "NO_TAXES_OWED";
|
|
44010
|
+
TaxSummaryState["TAXES_OWED"] = "TAXES_OWED";
|
|
44011
|
+
TaxSummaryState["UNKNOWN"] = "UNKNOWN";
|
|
44012
|
+
return TaxSummaryState;
|
|
44013
|
+
}({});
|
|
44014
|
+
var TransformedTaxSummaryStateSchema = createTransformedEnumSchema(Schema.Enums(TaxSummaryState), TaxSummaryState, TaxSummaryState.UNKNOWN);
|
|
44015
|
+
var TaxSummarySectionSchema = Schema.Struct({
|
|
44016
|
+
type: TaxSummarySectionTypeSchema,
|
|
44017
|
+
key: Schema.NullishOr(Schema.String),
|
|
44018
|
+
label: Schema.String,
|
|
44019
|
+
total: Schema.Number,
|
|
44020
|
+
taxesPaid: pipe(Schema.propertySignature(Schema.Number), Schema.fromKey("taxes_paid")),
|
|
44021
|
+
taxesOwed: pipe(Schema.propertySignature(Schema.Number), Schema.fromKey("taxes_owed"))
|
|
44022
|
+
});
|
|
44023
|
+
var TaxSummarySchema = Schema.Struct({
|
|
44024
|
+
year: Schema.Number,
|
|
44025
|
+
state: TransformedTaxSummaryStateSchema,
|
|
44026
|
+
projectedTaxesOwed: pipe(Schema.propertySignature(Schema.Number), Schema.fromKey("projected_taxes_owed")),
|
|
44027
|
+
taxesDueAt: pipe(Schema.propertySignature(Schema.Date), Schema.fromKey("taxes_due_at")),
|
|
44028
|
+
uncategorizedTaxPayments: pipe(Schema.propertySignature(Schema.Number), Schema.fromKey("uncategorized_tax_payments")),
|
|
44029
|
+
sections: Schema.Array(TaxSummarySectionSchema)
|
|
44030
|
+
});
|
|
44031
|
+
var TaxSummaryResponseSchema = Schema.Struct({ data: TaxSummarySchema });
|
|
44032
|
+
//#endregion
|
|
43749
44033
|
//#region src/components/ui/Swatch/Swatch.tsx
|
|
43750
44034
|
var Swatch = ({ color, opacity, pattern }) => {
|
|
43751
44035
|
const patternId = useId();
|
|
@@ -43875,11 +44159,18 @@ var CHART_MARGIN$1 = {
|
|
|
43875
44159
|
};
|
|
43876
44160
|
var CHART_BORDER_RADIUS$1 = 8;
|
|
43877
44161
|
var Y_AXIS_CATEGORY_KEY = "__layer_hbar_category";
|
|
44162
|
+
var SMALL_SEGMENT_THRESHOLD = .25;
|
|
44163
|
+
function determineLabelMode(requestedLabelMode, positiveItems, legendDenominator) {
|
|
44164
|
+
if (legendDenominator <= 0) return LegendLayout.Table;
|
|
44165
|
+
if (positiveItems.some((item) => item.value / legendDenominator < SMALL_SEGMENT_THRESHOLD)) return LegendLayout.Table;
|
|
44166
|
+
return requestedLabelMode;
|
|
44167
|
+
}
|
|
43878
44168
|
var HorizontalBarChart = ({ data, stylingProps, formatValue, showLegend = true, labelMode = LegendLayout.Table, slots }) => {
|
|
43879
44169
|
const { data: items, total } = data;
|
|
43880
44170
|
const positiveItems = useMemo(() => items.filter((item) => item.value > 0), [items]);
|
|
43881
44171
|
const positiveTotal = positiveItems.reduce((sum, item) => sum + item.value, 0);
|
|
43882
44172
|
const legendDenominator = positiveTotal > 0 ? positiveTotal : total;
|
|
44173
|
+
const effectiveLabelMode = determineLabelMode(labelMode, positiveItems, legendDenominator);
|
|
43883
44174
|
const chartData = useMemo(() => {
|
|
43884
44175
|
return [positiveItems.reduce((acc, item) => {
|
|
43885
44176
|
acc[item.name] = item.value;
|
|
@@ -43892,7 +44183,7 @@ var HorizontalBarChart = ({ data, stylingProps, formatValue, showLegend = true,
|
|
|
43892
44183
|
total: legendDenominator,
|
|
43893
44184
|
colorSelector: stylingProps.colorSelector,
|
|
43894
44185
|
formatValue,
|
|
43895
|
-
layout:
|
|
44186
|
+
layout: effectiveLabelMode
|
|
43896
44187
|
});
|
|
43897
44188
|
return /* @__PURE__ */ jsxs(VStack, {
|
|
43898
44189
|
className: "Layer__HorizontalBarChart Layer__UI__Chart--focusReset",
|
|
@@ -43950,33 +44241,106 @@ var HorizontalBarChart = ({ data, stylingProps, formatValue, showLegend = true,
|
|
|
43950
44241
|
});
|
|
43951
44242
|
};
|
|
43952
44243
|
//#endregion
|
|
43953
|
-
//#region src/components/TaxEstimatesSummaryCard/
|
|
43954
|
-
|
|
43955
|
-
|
|
43956
|
-
return (
|
|
43957
|
-
|
|
43958
|
-
|
|
43959
|
-
|
|
44244
|
+
//#region src/components/TaxEstimatesSummaryCard/states/TaxEstimatesSummaryCardEmpty.tsx
|
|
44245
|
+
function TaxEstimatesSummaryCardEmpty() {
|
|
44246
|
+
const { t } = useTranslation();
|
|
44247
|
+
return /* @__PURE__ */ jsx(DataState, {
|
|
44248
|
+
className: "Layer__TaxEstimatesSummaryCard__DataState Layer__data-state--reset",
|
|
44249
|
+
status: DataStateStatus.info,
|
|
44250
|
+
title: t("taxEstimates:empty.no_tax_estimates_summary", "Get started with your tax estimates"),
|
|
44251
|
+
description: t("taxEstimates:empty.no_tax_estimates_summary_description", "Start by importing and categorizing your bank transactions.")
|
|
44252
|
+
});
|
|
44253
|
+
}
|
|
44254
|
+
//#endregion
|
|
44255
|
+
//#region src/components/TaxEstimatesSummaryCard/states/TaxEstimatesSummaryCardNegativeOrZero.tsx
|
|
44256
|
+
var TaxEstimatesSummaryCardNegativeOrZero = () => {
|
|
44257
|
+
const { t } = useTranslation();
|
|
44258
|
+
return /* @__PURE__ */ jsx(DataState, {
|
|
44259
|
+
className: "Layer__TaxEstimatesSummaryCard__DataState Layer__data-state--reset",
|
|
44260
|
+
status: DataStateStatus.info,
|
|
44261
|
+
title: t("taxEstimates:error.tax_due_is_negative_or_zero", "No taxes owed this year"),
|
|
44262
|
+
description: t("taxEstimates:error.tax_due_is_negative_or_zero_description", "Your deductible losses exceed your income for this period, bringing your tax liability to zero.")
|
|
44263
|
+
});
|
|
43960
44264
|
};
|
|
43961
44265
|
//#endregion
|
|
43962
|
-
//#region src/
|
|
43963
|
-
var
|
|
43964
|
-
|
|
43965
|
-
|
|
43966
|
-
|
|
43967
|
-
|
|
43968
|
-
|
|
43969
|
-
|
|
43970
|
-
|
|
43971
|
-
|
|
43972
|
-
|
|
43973
|
-
|
|
43974
|
-
|
|
43975
|
-
|
|
43976
|
-
|
|
43977
|
-
|
|
43978
|
-
}
|
|
43979
|
-
|
|
44266
|
+
//#region src/components/TaxEstimatesSummaryCard/TaxEstimatesSummaryCardContent.tsx
|
|
44267
|
+
var Content = ({ state, data, mode, layout }) => {
|
|
44268
|
+
const commonProps = useMemo(() => {
|
|
44269
|
+
var _data$data;
|
|
44270
|
+
const colorByKey = data === null || data === void 0 || (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.reduce((acc, item) => {
|
|
44271
|
+
acc[item.name] = resolveCategoryColor({ key: item.name });
|
|
44272
|
+
return acc;
|
|
44273
|
+
}, {});
|
|
44274
|
+
return {
|
|
44275
|
+
interactionProps: NO_OP_INTERACTION_PROPS,
|
|
44276
|
+
stylingProps: { colorSelector: (item) => {
|
|
44277
|
+
var _colorByKey$item$name;
|
|
44278
|
+
return {
|
|
44279
|
+
color: (_colorByKey$item$name = colorByKey === null || colorByKey === void 0 ? void 0 : colorByKey[item.name]) !== null && _colorByKey$item$name !== void 0 ? _colorByKey$item$name : "var(--color-base-300)",
|
|
44280
|
+
opacity: 1
|
|
44281
|
+
};
|
|
44282
|
+
} }
|
|
44283
|
+
};
|
|
44284
|
+
}, [data]);
|
|
44285
|
+
switch (state) {
|
|
44286
|
+
case TaxSummaryState.NO_TRANSACTIONS: return /* @__PURE__ */ jsx(TaxEstimatesSummaryCardEmpty, {});
|
|
44287
|
+
case TaxSummaryState.NO_TAXES_OWED: return /* @__PURE__ */ jsx(TaxEstimatesSummaryCardNegativeOrZero, {});
|
|
44288
|
+
case TaxSummaryState.UNKNOWN:
|
|
44289
|
+
case TaxSummaryState.TAXES_OWED:
|
|
44290
|
+
if (mode === TaxEstimatesSummaryCardMode.HorizontalBarChart) return /* @__PURE__ */ jsx(HorizontalBarChartContent, {
|
|
44291
|
+
data,
|
|
44292
|
+
commonProps
|
|
44293
|
+
});
|
|
44294
|
+
return /* @__PURE__ */ jsx(PieChartContent, {
|
|
44295
|
+
data,
|
|
44296
|
+
commonProps,
|
|
44297
|
+
layout
|
|
44298
|
+
});
|
|
44299
|
+
}
|
|
44300
|
+
};
|
|
44301
|
+
var HorizontalBarChartContent = ({ data, commonProps }) => {
|
|
44302
|
+
const { t } = useTranslation();
|
|
44303
|
+
const { formatCurrencyFromCents } = useIntlFormatter();
|
|
44304
|
+
const { isDesktop } = useSizeClass();
|
|
44305
|
+
return /* @__PURE__ */ jsxs(VStack, {
|
|
44306
|
+
className: "Layer__TaxEstimatesSummaryCard__Content Layer__TaxEstimatesSummaryCard__Content--horizontal",
|
|
44307
|
+
gap: "md",
|
|
44308
|
+
pi: "lg",
|
|
44309
|
+
pbe: "lg",
|
|
44310
|
+
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
44311
|
+
className: "Layer__TaxEstimatesSummaryCard__TotalRow",
|
|
44312
|
+
justify: "space-between",
|
|
44313
|
+
align: "baseline",
|
|
44314
|
+
gap: "md",
|
|
44315
|
+
children: [/* @__PURE__ */ jsx(Span, {
|
|
44316
|
+
size: "md",
|
|
44317
|
+
variant: "subtle",
|
|
44318
|
+
children: t("common:label.total", "Total")
|
|
44319
|
+
}), /* @__PURE__ */ jsx(Span, {
|
|
44320
|
+
size: "xl",
|
|
44321
|
+
weight: "bold",
|
|
44322
|
+
numeric: "tabular-nums",
|
|
44323
|
+
className: "Layer__TaxEstimatesSummaryCard__TotalValue",
|
|
44324
|
+
children: formatCurrencyFromCents(data.total)
|
|
44325
|
+
})]
|
|
44326
|
+
}), /* @__PURE__ */ jsx(HorizontalBarChart, {
|
|
44327
|
+
data,
|
|
44328
|
+
stylingProps: commonProps.stylingProps,
|
|
44329
|
+
formatValue: formatCurrencyFromCents,
|
|
44330
|
+
labelMode: isDesktop ? LegendLayout.Aligned : LegendLayout.Table
|
|
44331
|
+
})]
|
|
44332
|
+
});
|
|
44333
|
+
};
|
|
44334
|
+
var PieChartContent = ({ data, commonProps, layout }) => {
|
|
44335
|
+
const { isMobile } = useSizeClass();
|
|
44336
|
+
const isVerticalLayout = isMobile || layout === "summaryCard";
|
|
44337
|
+
return /* @__PURE__ */ jsxs(Stack, _objectSpread2(_objectSpread2({}, {
|
|
44338
|
+
direction: isVerticalLayout ? "column" : "row",
|
|
44339
|
+
className: classNames("Layer__TaxEstimatesSummaryCard__Content", isVerticalLayout && "Layer__TaxEstimatesSummaryCard__Content--mobile"),
|
|
44340
|
+
gap: "lg",
|
|
44341
|
+
align: isVerticalLayout ? void 0 : "center"
|
|
44342
|
+
}), {}, { children: [/* @__PURE__ */ jsx(DetailedChart, _objectSpread2({ data }, commonProps)), /* @__PURE__ */ jsx(DetailedTableWithData, _objectSpread2(_objectSpread2({ data }, commonProps), NO_SORT_PROPS))] }));
|
|
44343
|
+
};
|
|
43980
44344
|
//#endregion
|
|
43981
44345
|
//#region src/hooks/api/businesses/[business-id]/tax-estimates/summary/useTaxSummary.ts
|
|
43982
44346
|
var TAX_SUMMARY_TAG_KEY = "#tax-summary";
|
|
@@ -43987,7 +44351,7 @@ var getTaxSummary = get(({ businessId, year, reportingBasis, fullYearProjection
|
|
|
43987
44351
|
full_year_projection: fullYearProjection
|
|
43988
44352
|
})}`;
|
|
43989
44353
|
});
|
|
43990
|
-
function buildKey$
|
|
44354
|
+
function buildKey$16({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection, enabled = true }) {
|
|
43991
44355
|
if (!enabled) return;
|
|
43992
44356
|
if (accessToken && apiUrl) return {
|
|
43993
44357
|
accessToken,
|
|
@@ -44003,7 +44367,7 @@ function useTaxSummary({ year, reportingBasis, fullYearProjection, enabled = tru
|
|
|
44003
44367
|
const withLocale = useLocalizedKey();
|
|
44004
44368
|
const { data: auth } = useAuth();
|
|
44005
44369
|
const { businessId } = useLayerContext();
|
|
44006
|
-
return new SWRQueryResult(useSWR(() => withLocale(buildKey$
|
|
44370
|
+
return new SWRQueryResult(useSWR(() => withLocale(buildKey$16(_objectSpread2(_objectSpread2({}, auth), {}, {
|
|
44007
44371
|
businessId,
|
|
44008
44372
|
year,
|
|
44009
44373
|
reportingBasis,
|
|
@@ -44113,6 +44477,7 @@ var prepareTaxSummaryData = (taxSummaryData, shortenedDisplayName, isMobile) =>
|
|
|
44113
44477
|
}));
|
|
44114
44478
|
};
|
|
44115
44479
|
var useTaxEstimatesSummaryCard = () => {
|
|
44480
|
+
var _taxSummaryData$state;
|
|
44116
44481
|
const { year } = useTaxEstimatesYear();
|
|
44117
44482
|
const { fullYearProjection } = useFullYearProjection();
|
|
44118
44483
|
const { t } = useTranslation();
|
|
@@ -44142,245 +44507,79 @@ var useTaxEstimatesSummaryCard = () => {
|
|
|
44142
44507
|
]),
|
|
44143
44508
|
isLoading,
|
|
44144
44509
|
isError,
|
|
44510
|
+
state: (_taxSummaryData$state = taxSummaryData === null || taxSummaryData === void 0 ? void 0 : taxSummaryData.state) !== null && _taxSummaryData$state !== void 0 ? _taxSummaryData$state : TaxSummaryState.TAXES_OWED,
|
|
44145
44511
|
layout: isDesktop ? "taxOverview" : "summaryCard",
|
|
44146
44512
|
title: t("taxEstimates:label.tax_summary", "Tax Summary")
|
|
44147
44513
|
};
|
|
44148
44514
|
};
|
|
44149
44515
|
//#endregion
|
|
44150
44516
|
//#region src/components/TaxEstimatesSummaryCard/TaxEstimatesSummaryCard.tsx
|
|
44151
|
-
var
|
|
44152
|
-
|
|
44153
|
-
gap: "md",
|
|
44154
|
-
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
44155
|
-
pb: "md",
|
|
44156
|
-
pi: "lg",
|
|
44157
|
-
children: [
|
|
44158
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44159
|
-
height: "24px",
|
|
44160
|
-
width: "40%"
|
|
44161
|
-
}),
|
|
44162
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44163
|
-
height: "24px",
|
|
44164
|
-
width: "100%"
|
|
44165
|
-
}),
|
|
44166
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44167
|
-
height: "16px",
|
|
44168
|
-
width: "100%"
|
|
44169
|
-
})
|
|
44170
|
-
]
|
|
44171
|
-
});
|
|
44172
|
-
return /* @__PURE__ */ jsxs(VStack, {
|
|
44173
|
-
gap: "md",
|
|
44174
|
-
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
44175
|
-
pb: "md",
|
|
44176
|
-
pi: "lg",
|
|
44177
|
-
align: "center",
|
|
44178
|
-
children: [
|
|
44179
|
-
/* @__PURE__ */ jsx(CircleSkeletonLoader, {
|
|
44180
|
-
height: "128px",
|
|
44181
|
-
width: "128px"
|
|
44182
|
-
}),
|
|
44183
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44184
|
-
height: "24px",
|
|
44185
|
-
width: "80%"
|
|
44186
|
-
}),
|
|
44187
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44188
|
-
height: "24px",
|
|
44189
|
-
width: "80%"
|
|
44190
|
-
}),
|
|
44191
|
-
/* @__PURE__ */ jsx(SkeletonLoader, {
|
|
44192
|
-
height: "24px",
|
|
44193
|
-
width: "80%"
|
|
44194
|
-
})
|
|
44195
|
-
]
|
|
44196
|
-
});
|
|
44197
|
-
};
|
|
44198
|
-
var ErrorState$2 = () => {
|
|
44199
|
-
const { t } = useTranslation();
|
|
44200
|
-
return /* @__PURE__ */ jsx(VStack, {
|
|
44201
|
-
gap: "md",
|
|
44202
|
-
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
44203
|
-
pb: "md",
|
|
44204
|
-
pi: "lg",
|
|
44205
|
-
align: "center",
|
|
44206
|
-
children: /* @__PURE__ */ jsx(Span, {
|
|
44207
|
-
size: "lg",
|
|
44208
|
-
children: t("taxEstimates:error.load_tax_estimates_summary", "We couldn't load your tax summary")
|
|
44209
|
-
})
|
|
44210
|
-
});
|
|
44211
|
-
};
|
|
44212
|
-
function allTaxSectionsAreEmpty(summary) {
|
|
44213
|
-
return summary.data.every((section) => section.value === 0);
|
|
44214
|
-
}
|
|
44215
|
-
function TaxEstimatesSummaryCardEmpty() {
|
|
44216
|
-
const { t } = useTranslation();
|
|
44217
|
-
return /* @__PURE__ */ jsx(DataState, {
|
|
44218
|
-
status: DataStateStatus.info,
|
|
44219
|
-
title: t("taxEstimates:empty.no_tax_estimates_summary", "Get started with your tax estimates"),
|
|
44220
|
-
description: t("taxEstimates:empty.no_tax_estimates_summary_description", "Start by importing and categorizing your bank transactions"),
|
|
44221
|
-
spacing: true
|
|
44222
|
-
});
|
|
44223
|
-
}
|
|
44224
|
-
var TaxEstimatesSummaryCardMode = /* @__PURE__ */ function(TaxEstimatesSummaryCardMode) {
|
|
44225
|
-
TaxEstimatesSummaryCardMode["PieChart"] = "PieChart";
|
|
44226
|
-
TaxEstimatesSummaryCardMode["HorizontalBarChart"] = "HorizontalBarChart";
|
|
44227
|
-
return TaxEstimatesSummaryCardMode;
|
|
44228
|
-
}({});
|
|
44229
|
-
var Content = ({ data, mode, commonProps, layout }) => {
|
|
44230
|
-
if (mode === TaxEstimatesSummaryCardMode.HorizontalBarChart) return /* @__PURE__ */ jsx(HorizontalBarChartContent, {
|
|
44231
|
-
data,
|
|
44232
|
-
commonProps
|
|
44233
|
-
});
|
|
44234
|
-
return /* @__PURE__ */ jsx(PieChartContent, {
|
|
44235
|
-
data,
|
|
44236
|
-
commonProps,
|
|
44237
|
-
layout
|
|
44238
|
-
});
|
|
44239
|
-
};
|
|
44240
|
-
var HorizontalBarChartContent = ({ data, commonProps }) => {
|
|
44241
|
-
const { t } = useTranslation();
|
|
44242
|
-
const { formatCurrencyFromCents } = useIntlFormatter();
|
|
44243
|
-
const { isDesktop } = useSizeClass();
|
|
44244
|
-
return /* @__PURE__ */ jsxs(VStack, {
|
|
44245
|
-
className: "Layer__TaxEstimatesSummaryCard__Content Layer__TaxEstimatesSummaryCard__Content--horizontal",
|
|
44246
|
-
gap: "md",
|
|
44247
|
-
pi: "lg",
|
|
44248
|
-
pbe: "lg",
|
|
44249
|
-
children: [/* @__PURE__ */ jsxs(HStack, {
|
|
44250
|
-
className: "Layer__TaxEstimatesSummaryCard__TotalRow",
|
|
44251
|
-
justify: "space-between",
|
|
44252
|
-
align: "baseline",
|
|
44253
|
-
gap: "md",
|
|
44254
|
-
children: [/* @__PURE__ */ jsx(Span, {
|
|
44255
|
-
size: "md",
|
|
44256
|
-
variant: "subtle",
|
|
44257
|
-
children: t("common:label.total", "Total")
|
|
44258
|
-
}), /* @__PURE__ */ jsx(Span, {
|
|
44259
|
-
size: "xl",
|
|
44260
|
-
weight: "bold",
|
|
44261
|
-
numeric: "tabular-nums",
|
|
44262
|
-
className: "Layer__TaxEstimatesSummaryCard__TotalValue",
|
|
44263
|
-
children: formatCurrencyFromCents(data.total)
|
|
44264
|
-
})]
|
|
44265
|
-
}), /* @__PURE__ */ jsx(HorizontalBarChart, {
|
|
44266
|
-
data,
|
|
44267
|
-
stylingProps: commonProps.stylingProps,
|
|
44268
|
-
formatValue: formatCurrencyFromCents,
|
|
44269
|
-
labelMode: isDesktop ? LegendLayout.Aligned : LegendLayout.Table
|
|
44270
|
-
})]
|
|
44271
|
-
});
|
|
44272
|
-
};
|
|
44273
|
-
var PieChartContent = ({ data, commonProps, layout }) => {
|
|
44274
|
-
const { isMobile } = useSizeClass();
|
|
44275
|
-
return isMobile || layout === "summaryCard" ? /* @__PURE__ */ jsxs(VStack, {
|
|
44276
|
-
className: "Layer__TaxEstimatesSummaryCard__Content Layer__TaxEstimatesSummaryCard__Content--mobile",
|
|
44277
|
-
gap: "lg",
|
|
44278
|
-
children: [/* @__PURE__ */ jsx(DetailedChart, _objectSpread2({ data }, commonProps)), /* @__PURE__ */ jsx(DetailedTableWithData, _objectSpread2(_objectSpread2({ data }, commonProps), NO_SORT_PROPS))]
|
|
44279
|
-
}) : /* @__PURE__ */ jsxs(HStack, {
|
|
44280
|
-
className: "Layer__TaxEstimatesSummaryCard__Content",
|
|
44281
|
-
align: "center",
|
|
44282
|
-
gap: "lg",
|
|
44283
|
-
children: [/* @__PURE__ */ jsx(DetailedChart, _objectSpread2({ data }, commonProps)), /* @__PURE__ */ jsx(DetailedTableWithData, _objectSpread2(_objectSpread2({ data }, commonProps), NO_SORT_PROPS))]
|
|
44284
|
-
});
|
|
44285
|
-
};
|
|
44286
|
-
var TaxEstimatesSummaryCard = ({ mode = TaxEstimatesSummaryCardMode.PieChart, title: titleOverride, withHeaderSeparator = false } = {}) => {
|
|
44287
|
-
const { detailData, layout, title: defaultTitle, isLoading, isError } = useTaxEstimatesSummaryCard();
|
|
44288
|
-
const { isDesktop } = useSizeClass();
|
|
44517
|
+
var TaxEstimatesSummaryCard = ({ mode = TaxEstimatesSummaryCardMode.PieChart, interactionProps, stringOverrides } = {}) => {
|
|
44518
|
+
const { title: defaultTitle, isLoading, isError, layout, detailData, state } = useTaxEstimatesSummaryCard();
|
|
44289
44519
|
const isSummaryCardLayout = layout === "summaryCard";
|
|
44290
|
-
const
|
|
44291
|
-
|
|
44292
|
-
|
|
44293
|
-
|
|
44294
|
-
|
|
44295
|
-
|
|
44296
|
-
|
|
44297
|
-
|
|
44298
|
-
|
|
44299
|
-
|
|
44300
|
-
|
|
44301
|
-
|
|
44302
|
-
|
|
44303
|
-
|
|
44304
|
-
|
|
44305
|
-
|
|
44306
|
-
|
|
44307
|
-
|
|
44308
|
-
|
|
44309
|
-
className: "Layer__TaxEstimatesSummaryCard__Container",
|
|
44310
|
-
children: /* @__PURE__ */ jsx(Card, {
|
|
44311
|
-
className: classNames("Layer__TaxEstimatesSummaryCard", isSummaryCardLayout && "Layer__TaxEstimatesSummaryCard--summaryCard"),
|
|
44312
|
-
children: /* @__PURE__ */ jsxs(VStack, {
|
|
44313
|
-
gap: "md",
|
|
44314
|
-
className: "Layer__TaxEstimatesSummaryCard__Body",
|
|
44315
|
-
children: [/* @__PURE__ */ jsx(HStack, {
|
|
44316
|
-
className: classNames("Layer__TaxEstimatesSummaryCard__Header", (isSummaryCardLayout || withHeaderSeparator) && "Layer__SummaryCard__ContainerHeader"),
|
|
44317
|
-
justify: "space-between",
|
|
44318
|
-
align: isSummaryCardLayout ? "center" : "start",
|
|
44319
|
-
gap: "md",
|
|
44320
|
-
children: /* @__PURE__ */ jsx(Heading$2, {
|
|
44321
|
-
size: !isDesktop ? "sm" : "md",
|
|
44322
|
-
children: title
|
|
44323
|
-
})
|
|
44324
|
-
}), /* @__PURE__ */ jsx(ConditionalBlock, {
|
|
44325
|
-
data: detailData,
|
|
44326
|
-
isLoading,
|
|
44327
|
-
isError,
|
|
44328
|
-
Loading: /* @__PURE__ */ jsx(LoadingState$1, { mode }),
|
|
44329
|
-
Error: /* @__PURE__ */ jsx(ErrorState$2, {}),
|
|
44330
|
-
children: ({ data }) => allTaxSectionsAreEmpty(data) ? /* @__PURE__ */ jsx(TaxEstimatesSummaryCardEmpty, {}) : /* @__PURE__ */ jsx(Content, {
|
|
44331
|
-
data,
|
|
44332
|
-
mode,
|
|
44333
|
-
commonProps,
|
|
44334
|
-
layout
|
|
44335
|
-
})
|
|
44336
|
-
})]
|
|
44520
|
+
const slots = useSummaryCardSlots({
|
|
44521
|
+
defaultTitle,
|
|
44522
|
+
interactionProps,
|
|
44523
|
+
stringOverrides
|
|
44524
|
+
});
|
|
44525
|
+
return /* @__PURE__ */ jsx(SummaryCard, {
|
|
44526
|
+
className: classNames("Layer__TaxEstimatesSummaryCard", isSummaryCardLayout && "Layer__TaxEstimatesSummaryCard--summaryCard"),
|
|
44527
|
+
slots,
|
|
44528
|
+
children: /* @__PURE__ */ jsx(ConditionalBlock, {
|
|
44529
|
+
data: detailData,
|
|
44530
|
+
isLoading,
|
|
44531
|
+
isError,
|
|
44532
|
+
Loading: /* @__PURE__ */ jsx(TaxEstimatesSummaryCardLoading, { mode }),
|
|
44533
|
+
Error: /* @__PURE__ */ jsx(TaxEstimatesSummaryCardError, {}),
|
|
44534
|
+
children: ({ data }) => /* @__PURE__ */ jsx(Content, {
|
|
44535
|
+
state,
|
|
44536
|
+
data,
|
|
44537
|
+
mode,
|
|
44538
|
+
layout
|
|
44337
44539
|
})
|
|
44338
44540
|
})
|
|
44339
44541
|
});
|
|
44340
44542
|
};
|
|
44341
44543
|
//#endregion
|
|
44342
44544
|
//#region src/views/SolopreneurOverview/SolopreneurOverview.tsx
|
|
44343
|
-
var SolopreneurOverview = ({
|
|
44344
|
-
var
|
|
44545
|
+
var SolopreneurOverview = ({ interactionProps, chartColorsList, stringOverrides }) => {
|
|
44546
|
+
var _interactionProps$ban, _interactionProps$pro, _stringOverrides$summ, _interactionProps$sum, _stringOverrides$summ2, _interactionProps$sum2, _stringOverrides$summ3, _interactionProps$sum3, _interactionProps$sum4, _stringOverrides$summ4;
|
|
44345
44547
|
const { t } = useTranslation();
|
|
44346
44548
|
const { value: sizeClass } = useSizeClass();
|
|
44347
|
-
const profitAndLossSummariesVariants = slotProps === null || slotProps === void 0 || (_slotProps$profitAndL = slotProps.profitAndLoss) === null || _slotProps$profitAndL === void 0 || (_slotProps$profitAndL = _slotProps$profitAndL.summaries) === null || _slotProps$profitAndL === void 0 ? void 0 : _slotProps$profitAndL.variants;
|
|
44348
44549
|
return /* @__PURE__ */ jsx(ProfitAndLoss, {
|
|
44349
44550
|
asContainer: false,
|
|
44350
|
-
tagFilter: tagFilter ? {
|
|
44351
|
-
key: tagFilter.tagKey,
|
|
44352
|
-
values: tagFilter.tagValues
|
|
44353
|
-
} : void 0,
|
|
44354
44551
|
children: /* @__PURE__ */ jsxs(View, {
|
|
44355
44552
|
title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || t("common:label.overview", "Overview"),
|
|
44356
|
-
showHeader:
|
|
44553
|
+
showHeader: true,
|
|
44357
44554
|
header: /* @__PURE__ */ jsx(Header$2, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
|
|
44358
44555
|
children: [
|
|
44359
|
-
|
|
44360
|
-
onTransactionsToReviewClick,
|
|
44361
|
-
onboardingStepOverride
|
|
44362
|
-
}),
|
|
44556
|
+
/* @__PURE__ */ jsx(SolopreneurOnboardingBanner, { onSetupTaxProfile: interactionProps === null || interactionProps === void 0 || (_interactionProps$ban = interactionProps.banner) === null || _interactionProps$ban === void 0 ? void 0 : _interactionProps$ban.onSetupTaxProfile }),
|
|
44363
44557
|
/* @__PURE__ */ jsx(ProfitAndLossSummaries, {
|
|
44364
44558
|
stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.profitAndLossSummaries,
|
|
44365
44559
|
chartColorsList,
|
|
44366
|
-
onTransactionsToReviewClick
|
|
44367
|
-
variants: profitAndLossSummariesVariants
|
|
44560
|
+
onTransactionsToReviewClick: interactionProps === null || interactionProps === void 0 || (_interactionProps$pro = interactionProps.profitAndLossSummaries) === null || _interactionProps$pro === void 0 ? void 0 : _interactionProps$pro.onTransactionsToReviewClick
|
|
44368
44561
|
}),
|
|
44369
|
-
middleBanner,
|
|
44370
44562
|
/* @__PURE__ */ jsxs("div", {
|
|
44371
44563
|
className: "Layer__SolopreneurOverview__Grid",
|
|
44372
44564
|
children: [
|
|
44373
|
-
/* @__PURE__ */ jsx(ProfitAndLossSummaryCard, {
|
|
44565
|
+
/* @__PURE__ */ jsx(ProfitAndLossSummaryCard, {
|
|
44566
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$summ = stringOverrides.summaryCards) === null || _stringOverrides$summ === void 0 ? void 0 : _stringOverrides$summ.profitAndLoss,
|
|
44567
|
+
interactionProps: interactionProps === null || interactionProps === void 0 || (_interactionProps$sum = interactionProps.summaryCards) === null || _interactionProps$sum === void 0 ? void 0 : _interactionProps$sum.profitAndLoss
|
|
44568
|
+
}),
|
|
44374
44569
|
/* @__PURE__ */ jsx(ExpensesSummaryCard, {
|
|
44375
44570
|
stylingProps: { chartColorsList },
|
|
44376
|
-
stringOverrides:
|
|
44571
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$summ2 = stringOverrides.summaryCards) === null || _stringOverrides$summ2 === void 0 ? void 0 : _stringOverrides$summ2.expenses,
|
|
44572
|
+
interactionProps: interactionProps === null || interactionProps === void 0 || (_interactionProps$sum2 = interactionProps.summaryCards) === null || _interactionProps$sum2 === void 0 ? void 0 : _interactionProps$sum2.expenses
|
|
44377
44573
|
}),
|
|
44378
44574
|
/* @__PURE__ */ jsx(TaxEstimatesSummaryCard, {
|
|
44379
44575
|
mode: TaxEstimatesSummaryCardMode.HorizontalBarChart,
|
|
44380
|
-
|
|
44381
|
-
|
|
44576
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$summ3 = stringOverrides.summaryCards) === null || _stringOverrides$summ3 === void 0 ? void 0 : _stringOverrides$summ3.taxEstimates,
|
|
44577
|
+
interactionProps: interactionProps === null || interactionProps === void 0 || (_interactionProps$sum3 = interactionProps.summaryCards) === null || _interactionProps$sum3 === void 0 ? void 0 : _interactionProps$sum3.taxEstimates
|
|
44382
44578
|
}),
|
|
44383
|
-
/* @__PURE__ */ jsx(MileageTrackingSummary,
|
|
44579
|
+
/* @__PURE__ */ jsx(MileageTrackingSummary, {
|
|
44580
|
+
interactionProps: interactionProps === null || interactionProps === void 0 || (_interactionProps$sum4 = interactionProps.summaryCards) === null || _interactionProps$sum4 === void 0 ? void 0 : _interactionProps$sum4.mileageTracking,
|
|
44581
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$summ4 = stringOverrides.summaryCards) === null || _stringOverrides$summ4 === void 0 ? void 0 : _stringOverrides$summ4.mileageTracking
|
|
44582
|
+
})
|
|
44384
44583
|
]
|
|
44385
44584
|
})
|
|
44386
44585
|
]
|
|
@@ -44388,148 +44587,6 @@ var SolopreneurOverview = ({ showTitle = true, enableOnboarding = false, onboard
|
|
|
44388
44587
|
});
|
|
44389
44588
|
};
|
|
44390
44589
|
//#endregion
|
|
44391
|
-
//#region src/types/location.ts
|
|
44392
|
-
var US_STATES_CONFIG = [
|
|
44393
|
-
_objectSpread2({ value: "AL" }, translationKey("usStates:label.alabama", "Alabama")),
|
|
44394
|
-
_objectSpread2({ value: "AK" }, translationKey("usStates:label.alaska", "Alaska")),
|
|
44395
|
-
_objectSpread2({ value: "AZ" }, translationKey("usStates:label.arizona", "Arizona")),
|
|
44396
|
-
_objectSpread2({ value: "AR" }, translationKey("usStates:label.arkansas", "Arkansas")),
|
|
44397
|
-
_objectSpread2({ value: "CA" }, translationKey("usStates:label.california", "California")),
|
|
44398
|
-
_objectSpread2({ value: "CO" }, translationKey("usStates:label.colorado", "Colorado")),
|
|
44399
|
-
_objectSpread2({ value: "CT" }, translationKey("usStates:label.connecticut", "Connecticut")),
|
|
44400
|
-
_objectSpread2({ value: "DE" }, translationKey("usStates:label.delaware", "Delaware")),
|
|
44401
|
-
_objectSpread2({ value: "DC" }, translationKey("usStates:label.district_columbia", "District of Columbia")),
|
|
44402
|
-
_objectSpread2({ value: "FL" }, translationKey("usStates:label.florida", "Florida")),
|
|
44403
|
-
_objectSpread2({ value: "GA" }, translationKey("usStates:label.georgia", "Georgia")),
|
|
44404
|
-
_objectSpread2({ value: "HI" }, translationKey("usStates:label.hawaii", "Hawaii")),
|
|
44405
|
-
_objectSpread2({ value: "ID" }, translationKey("usStates:label.idaho", "Idaho")),
|
|
44406
|
-
_objectSpread2({ value: "IL" }, translationKey("usStates:label.illinois", "Illinois")),
|
|
44407
|
-
_objectSpread2({ value: "IN" }, translationKey("usStates:label.indiana", "Indiana")),
|
|
44408
|
-
_objectSpread2({ value: "IA" }, translationKey("usStates:label.iowa", "Iowa")),
|
|
44409
|
-
_objectSpread2({ value: "KS" }, translationKey("usStates:label.kansas", "Kansas")),
|
|
44410
|
-
_objectSpread2({ value: "KY" }, translationKey("usStates:label.kentucky", "Kentucky")),
|
|
44411
|
-
_objectSpread2({ value: "LA" }, translationKey("usStates:label.louisiana", "Louisiana")),
|
|
44412
|
-
_objectSpread2({ value: "ME" }, translationKey("usStates:label.maine", "Maine")),
|
|
44413
|
-
_objectSpread2({ value: "MD" }, translationKey("usStates:label.maryland", "Maryland")),
|
|
44414
|
-
_objectSpread2({ value: "MA" }, translationKey("usStates:label.massachusetts", "Massachusetts")),
|
|
44415
|
-
_objectSpread2({ value: "MI" }, translationKey("usStates:label.michigan", "Michigan")),
|
|
44416
|
-
_objectSpread2({ value: "MN" }, translationKey("usStates:label.minnesota", "Minnesota")),
|
|
44417
|
-
_objectSpread2({ value: "MS" }, translationKey("usStates:label.mississippi", "Mississippi")),
|
|
44418
|
-
_objectSpread2({ value: "MO" }, translationKey("usStates:label.missouri", "Missouri")),
|
|
44419
|
-
_objectSpread2({ value: "MT" }, translationKey("usStates:label.montana", "Montana")),
|
|
44420
|
-
_objectSpread2({ value: "NE" }, translationKey("usStates:label.nebraska", "Nebraska")),
|
|
44421
|
-
_objectSpread2({ value: "NV" }, translationKey("usStates:label.nevada", "Nevada")),
|
|
44422
|
-
_objectSpread2({ value: "NH" }, translationKey("usStates:label.new_hampshire", "New Hampshire")),
|
|
44423
|
-
_objectSpread2({ value: "NJ" }, translationKey("usStates:label.new_jersey", "New Jersey")),
|
|
44424
|
-
_objectSpread2({ value: "NM" }, translationKey("usStates:label.new_mexico", "New Mexico")),
|
|
44425
|
-
_objectSpread2({ value: "NY" }, translationKey("usStates:label.new_york", "New York")),
|
|
44426
|
-
_objectSpread2({ value: "NC" }, translationKey("usStates:label.north_carolina", "North Carolina")),
|
|
44427
|
-
_objectSpread2({ value: "ND" }, translationKey("usStates:label.north_dakota", "North Dakota")),
|
|
44428
|
-
_objectSpread2({ value: "OH" }, translationKey("usStates:label.ohio", "Ohio")),
|
|
44429
|
-
_objectSpread2({ value: "OK" }, translationKey("usStates:label.oklahoma", "Oklahoma")),
|
|
44430
|
-
_objectSpread2({ value: "OR" }, translationKey("usStates:label.oregon", "Oregon")),
|
|
44431
|
-
_objectSpread2({ value: "PA" }, translationKey("usStates:label.pennsylvania", "Pennsylvania")),
|
|
44432
|
-
_objectSpread2({ value: "RI" }, translationKey("usStates:label.rhode_island", "Rhode Island")),
|
|
44433
|
-
_objectSpread2({ value: "SC" }, translationKey("usStates:label.south_carolina", "South Carolina")),
|
|
44434
|
-
_objectSpread2({ value: "SD" }, translationKey("usStates:label.south_dakota", "South Dakota")),
|
|
44435
|
-
_objectSpread2({ value: "TN" }, translationKey("usStates:label.tennessee", "Tennessee")),
|
|
44436
|
-
_objectSpread2({ value: "TX" }, translationKey("usStates:label.texas", "Texas")),
|
|
44437
|
-
_objectSpread2({ value: "UT" }, translationKey("usStates:label.utah", "Utah")),
|
|
44438
|
-
_objectSpread2({ value: "VT" }, translationKey("usStates:label.vermont", "Vermont")),
|
|
44439
|
-
_objectSpread2({ value: "VA" }, translationKey("usStates:label.virginia", "Virginia")),
|
|
44440
|
-
_objectSpread2({ value: "WA" }, translationKey("usStates:label.washington", "Washington")),
|
|
44441
|
-
_objectSpread2({ value: "WV" }, translationKey("usStates:label.west_virginia", "West Virginia")),
|
|
44442
|
-
_objectSpread2({ value: "WI" }, translationKey("usStates:label.wisconsin", "Wisconsin")),
|
|
44443
|
-
_objectSpread2({ value: "WY" }, translationKey("usStates:label.wyoming", "Wyoming")),
|
|
44444
|
-
_objectSpread2({ value: "PR" }, translationKey("usStates:label.puerto_rico", "Puerto Rico"))
|
|
44445
|
-
];
|
|
44446
|
-
var US_STATE_VALUES = US_STATES_CONFIG.map((s) => s.value);
|
|
44447
|
-
//#endregion
|
|
44448
|
-
//#region src/schemas/taxEstimates/filingStatus.ts
|
|
44449
|
-
var FilingStatus = /* @__PURE__ */ function(FilingStatus) {
|
|
44450
|
-
FilingStatus["SINGLE"] = "SINGLE";
|
|
44451
|
-
FilingStatus["MARRIED"] = "MARRIED";
|
|
44452
|
-
FilingStatus["MARRIED_SEPARATELY"] = "MARRIED_SEPARATELY";
|
|
44453
|
-
FilingStatus["HEAD"] = "HEAD";
|
|
44454
|
-
FilingStatus["WIDOWER"] = "WIDOWER";
|
|
44455
|
-
return FilingStatus;
|
|
44456
|
-
}({});
|
|
44457
|
-
var FilingStatusSchema = Schema.Enums(FilingStatus);
|
|
44458
|
-
//#endregion
|
|
44459
|
-
//#region src/schemas/taxEstimates/profile.ts
|
|
44460
|
-
var USStateCodeSchema = Schema.Literal(...US_STATE_VALUES);
|
|
44461
|
-
var WithholdingSchema = Schema.Struct({
|
|
44462
|
-
useCustomWithholding: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_custom_withholding")),
|
|
44463
|
-
amount: Schema.NullishOr(Schema.Number)
|
|
44464
|
-
});
|
|
44465
|
-
var HomeOfficeDeductionSchema = Schema.Struct({
|
|
44466
|
-
useHomeOfficeDeduction: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_home_office_deduction")),
|
|
44467
|
-
homeOfficeArea: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("home_office_area"))
|
|
44468
|
-
});
|
|
44469
|
-
var VehicleDeductionSchema = Schema.Struct({ useMileageDeduction: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Boolean)), Schema.fromKey("use_mileage_deduction")) });
|
|
44470
|
-
var DeductionsSchema = Schema.Struct({
|
|
44471
|
-
homeOffice: pipe(Schema.propertySignature(Schema.NullishOr(HomeOfficeDeductionSchema)), Schema.fromKey("home_office")),
|
|
44472
|
-
vehicle: Schema.NullishOr(VehicleDeductionSchema)
|
|
44473
|
-
});
|
|
44474
|
-
var FederalConfigurationSchema = Schema.Struct({
|
|
44475
|
-
filingStatus: pipe(Schema.propertySignature(Schema.NullishOr(FilingStatusSchema)), Schema.fromKey("filing_status")),
|
|
44476
|
-
annualW2Income: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("annual_w2_income")),
|
|
44477
|
-
tipIncome: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("tip_income")),
|
|
44478
|
-
overtimeIncome: pipe(Schema.propertySignature(Schema.NullishOr(Schema.Number)), Schema.fromKey("overtime_income")),
|
|
44479
|
-
withholding: Schema.NullishOr(WithholdingSchema)
|
|
44480
|
-
});
|
|
44481
|
-
var StateConfigurationSchema = Schema.Struct({
|
|
44482
|
-
taxState: pipe(Schema.propertySignature(Schema.NullishOr(USStateCodeSchema)), Schema.fromKey("tax_state")),
|
|
44483
|
-
filingStatus: pipe(Schema.propertySignature(Schema.NullishOr(FilingStatusSchema)), Schema.fromKey("filing_status")),
|
|
44484
|
-
withholding: Schema.NullishOr(WithholdingSchema)
|
|
44485
|
-
});
|
|
44486
|
-
var UsConfigurationSchema = Schema.Struct({
|
|
44487
|
-
federal: Schema.NullishOr(FederalConfigurationSchema),
|
|
44488
|
-
state: Schema.NullishOr(StateConfigurationSchema),
|
|
44489
|
-
deductions: pipe(Schema.propertySignature(Schema.NullishOr(DeductionsSchema)), Schema.fromKey("deductions"))
|
|
44490
|
-
});
|
|
44491
|
-
var TaxProfileSchema = Schema.Struct({
|
|
44492
|
-
taxCountryCode: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("tax_country_code")),
|
|
44493
|
-
usConfiguration: pipe(Schema.propertySignature(Schema.NullishOr(UsConfigurationSchema)), Schema.fromKey("us_configuration")),
|
|
44494
|
-
userHasSavedTaxProfile: pipe(Schema.propertySignature(Schema.Boolean), Schema.fromKey("user_has_saved_tax_profile"))
|
|
44495
|
-
});
|
|
44496
|
-
var TaxProfileResponseSchema = Schema.Struct({ data: TaxProfileSchema });
|
|
44497
|
-
var TaxProfileRequestSchema = Schema.Struct({
|
|
44498
|
-
taxCountryCode: pipe(Schema.propertySignature(Schema.NullishOr(Schema.String)), Schema.fromKey("tax_country_code")),
|
|
44499
|
-
usConfiguration: pipe(Schema.propertySignature(Schema.NullishOr(UsConfigurationSchema)), Schema.fromKey("us_configuration"))
|
|
44500
|
-
});
|
|
44501
|
-
//#endregion
|
|
44502
|
-
//#region src/hooks/api/businesses/[business-id]/tax-estimates/profile/useTaxProfile.ts
|
|
44503
|
-
var TAX_PROFILE_TAG_KEY = "#tax-profile";
|
|
44504
|
-
var getTaxProfile = get(({ businessId }) => {
|
|
44505
|
-
return `/v1/businesses/${businessId}/tax-estimates/profile`;
|
|
44506
|
-
});
|
|
44507
|
-
function buildKey$16({ access_token: accessToken, apiUrl, businessId }) {
|
|
44508
|
-
if (accessToken && apiUrl) return {
|
|
44509
|
-
accessToken,
|
|
44510
|
-
apiUrl,
|
|
44511
|
-
businessId,
|
|
44512
|
-
tags: [TAX_PROFILE_TAG_KEY]
|
|
44513
|
-
};
|
|
44514
|
-
}
|
|
44515
|
-
function useTaxProfile() {
|
|
44516
|
-
const withLocale = useLocalizedKey();
|
|
44517
|
-
const { data: auth } = useAuth();
|
|
44518
|
-
const { businessId } = useLayerContext();
|
|
44519
|
-
return new SWRQueryResult(useSWR(() => withLocale(buildKey$16(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
|
|
44520
|
-
var _ref = _asyncToGenerator(function* ({ accessToken, apiUrl, businessId }) {
|
|
44521
|
-
return getTaxProfile(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(TaxProfileResponseSchema)).then(({ data }) => data);
|
|
44522
|
-
});
|
|
44523
|
-
return function(_x) {
|
|
44524
|
-
return _ref.apply(this, arguments);
|
|
44525
|
-
};
|
|
44526
|
-
}()));
|
|
44527
|
-
}
|
|
44528
|
-
function useTaxProfileGlobalCacheActions() {
|
|
44529
|
-
const { patchCache } = useGlobalCacheActions();
|
|
44530
|
-
return { patchTaxProfile: useCallback((updatedProfile) => patchCache(({ tags }) => tags.includes(TAX_PROFILE_TAG_KEY), () => updatedProfile), [patchCache]) };
|
|
44531
|
-
}
|
|
44532
|
-
//#endregion
|
|
44533
44590
|
//#region src/hooks/features/taxEstimates/useTaxEstimatesOnboardingStatus.ts
|
|
44534
44591
|
var OnboardingStatus = /* @__PURE__ */ function(OnboardingStatus) {
|
|
44535
44592
|
OnboardingStatus["Loading"] = "Loading";
|
|
@@ -44939,6 +44996,7 @@ var TaxDetailsMetaSchema = Schema.Struct({
|
|
|
44939
44996
|
});
|
|
44940
44997
|
var TaxDetailsSchema = Schema.Struct({
|
|
44941
44998
|
type: Schema.String,
|
|
44999
|
+
state: TransformedTaxSummaryStateSchema,
|
|
44942
45000
|
meta: TaxDetailsMetaSchema,
|
|
44943
45001
|
rows: Schema.Array(TaxDetailsRowSchema)
|
|
44944
45002
|
});
|
|
@@ -45292,9 +45350,10 @@ var TaxProfile = () => {
|
|
|
45292
45350
|
const { t } = useTranslation();
|
|
45293
45351
|
const navigate = useTaxEstimatesNavigation();
|
|
45294
45352
|
const { data: taxProfile } = useTaxProfile();
|
|
45353
|
+
const hasSavedTaxProfile = (taxProfile === null || taxProfile === void 0 ? void 0 : taxProfile.userHasSavedTaxProfile) === true;
|
|
45295
45354
|
const handleGoBack = useCallback(() => {
|
|
45296
|
-
navigate.toEstimates();
|
|
45297
|
-
}, [navigate]);
|
|
45355
|
+
if (hasSavedTaxProfile) navigate.toEstimates();
|
|
45356
|
+
}, [navigate, hasSavedTaxProfile]);
|
|
45298
45357
|
return /* @__PURE__ */ jsx(BaseDetailView, {
|
|
45299
45358
|
slots: {
|
|
45300
45359
|
Header: useCallback(() => {
|
|
@@ -45306,7 +45365,7 @@ var TaxProfile = () => {
|
|
|
45306
45365
|
BackIcon: BackArrow
|
|
45307
45366
|
},
|
|
45308
45367
|
name: "TaxProfile",
|
|
45309
|
-
onGoBack: handleGoBack,
|
|
45368
|
+
onGoBack: hasSavedTaxProfile ? handleGoBack : void 0,
|
|
45310
45369
|
children: /* @__PURE__ */ jsx(TaxProfileForm, { taxProfile })
|
|
45311
45370
|
});
|
|
45312
45371
|
};
|
|
@@ -45511,7 +45570,7 @@ var tConditional = (translate, key, _ref) => {
|
|
|
45511
45570
|
var AmountWithLabel = ({ slotProps }) => /* @__PURE__ */ jsxs(VStack, {
|
|
45512
45571
|
className: "Layer__TaxSummaryCard__AmountWithLabel",
|
|
45513
45572
|
gap: "2xs",
|
|
45514
|
-
align: "
|
|
45573
|
+
align: "center",
|
|
45515
45574
|
children: [/* @__PURE__ */ jsx(MoneySpan, _objectSpread2({}, slotProps.MoneySpan)), /* @__PURE__ */ jsx(Badge, _objectSpread2({
|
|
45516
45575
|
size: BadgeSize.SMALL,
|
|
45517
45576
|
variant: BadgeVariant.NEUTRAL
|
|
@@ -45531,7 +45590,6 @@ var EquationRow = ({ section, size = "md" }) => {
|
|
|
45531
45590
|
Badge: { children: t("common:label.total", "Total") }
|
|
45532
45591
|
} }),
|
|
45533
45592
|
/* @__PURE__ */ jsx(Span, {
|
|
45534
|
-
className: "Layer__TaxSummaryCard__Operator",
|
|
45535
45593
|
size,
|
|
45536
45594
|
variant: "subtle",
|
|
45537
45595
|
children: "-"
|
|
@@ -45544,7 +45602,6 @@ var EquationRow = ({ section, size = "md" }) => {
|
|
|
45544
45602
|
Badge: { children: t("taxEstimates:label.taxes_paid", "Taxes Paid") }
|
|
45545
45603
|
} }),
|
|
45546
45604
|
/* @__PURE__ */ jsx(Span, {
|
|
45547
|
-
className: "Layer__TaxSummaryCard__Operator",
|
|
45548
45605
|
size,
|
|
45549
45606
|
variant: "subtle",
|
|
45550
45607
|
children: "="
|
|
@@ -45617,7 +45674,7 @@ var TaxSummaryCardDesktop = ({ data }) => {
|
|
|
45617
45674
|
}), /* @__PURE__ */ jsx(Span, {
|
|
45618
45675
|
size: "sm",
|
|
45619
45676
|
variant: "subtle",
|
|
45620
|
-
children: t("taxEstimates:label.
|
|
45677
|
+
children: t("taxEstimates:label.due_at", "Due on {{date}}", { date: formatDate(data.taxesDueAt) })
|
|
45621
45678
|
})]
|
|
45622
45679
|
}),
|
|
45623
45680
|
data.sections.map((section) => {
|
|
@@ -45672,7 +45729,7 @@ var TaxSummaryCardMobile = ({ data }) => {
|
|
|
45672
45729
|
}), /* @__PURE__ */ jsx(Span, {
|
|
45673
45730
|
size: "sm",
|
|
45674
45731
|
variant: "subtle",
|
|
45675
|
-
children: t("taxEstimates:label.
|
|
45732
|
+
children: t("taxEstimates:label.due_at", "Due on {{date}}", { date: formatDate(data.taxesDueAt) })
|
|
45676
45733
|
})]
|
|
45677
45734
|
}),
|
|
45678
45735
|
/* @__PURE__ */ jsxs(HStack, {
|