@layerfi/components 0.1.132-alpha.4 → 0.1.132
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 +199 -151
- package/dist/esm/index.mjs +199 -151
- package/dist/index.css +55 -80
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -278,7 +278,7 @@ var getIntlLocale = (locale) => {
|
|
|
278
278
|
};
|
|
279
279
|
var package_default = {
|
|
280
280
|
name: "@layerfi/components",
|
|
281
|
-
version: "0.1.132
|
|
281
|
+
version: "0.1.132",
|
|
282
282
|
description: "Layer React Components",
|
|
283
283
|
main: "dist/cjs/index.cjs",
|
|
284
284
|
module: "dist/esm/index.mjs",
|
|
@@ -1678,6 +1678,8 @@ var linkedAccounts_default$1 = {
|
|
|
1678
1678
|
"ledger_balance": "Ledger balance",
|
|
1679
1679
|
"link_bank_accounts_and_credit_cards": "Link your bank accounts and credit cards",
|
|
1680
1680
|
"link_more_accounts_any_time": "You can link more accounts at any time from the Bank Transactions section",
|
|
1681
|
+
"link_your_bank_accounts": "Link your bank accounts",
|
|
1682
|
+
"link_your_bank_accounts_description": "Linking your bank accounts allows us to load your bank transactions and automatically categorize them.",
|
|
1681
1683
|
"linked_accounts": "Linked Accounts",
|
|
1682
1684
|
"loading_accounts": "Loading Your Accounts...",
|
|
1683
1685
|
"may_take_few_minutes": "This may take a few minutes",
|
|
@@ -1825,6 +1827,8 @@ var taxEstimates_default$1 = {
|
|
|
1825
1827
|
"no_tax_estimates_summary": "Get started with your tax estimates",
|
|
1826
1828
|
"no_tax_estimates_summary_description": "Start by importing and categorizing your bank transactions",
|
|
1827
1829
|
"no_tax_payments_to_display": "There are no tax payments to display.",
|
|
1830
|
+
"tax_due_is_negative_or_zero": "No taxes owed this year",
|
|
1831
|
+
"tax_due_is_negative_or_zero_description": "Your deductible losses exceed your income for this period, bringing your tax liability to zero.",
|
|
1828
1832
|
"tax_payments": "No tax payments found"
|
|
1829
1833
|
},
|
|
1830
1834
|
error: {
|
|
@@ -1839,6 +1843,7 @@ var taxEstimates_default$1 = {
|
|
|
1839
1843
|
"retrieve_tax_profile": "We couldn’t retrieve your tax profile. Please check your connection and try again.",
|
|
1840
1844
|
"while_loading_tax_details": "An error occurred while loading your tax details. Please check your connection and try again.",
|
|
1841
1845
|
"while_loading_tax_estimates": "An error occurred while loading your tax estimates. Please check your connection and try again.",
|
|
1846
|
+
"while_loading_tax_estimates_summary": "An error occurred while loading your tax summary. Please check your connection and try again.",
|
|
1842
1847
|
"while_loading_tax_payments": "An error occurred while loading your tax payments. Please check your connection and try again.",
|
|
1843
1848
|
"while_loading_tax_summary": "An error occurred while loading your tax summary. Please check your connection and try again."
|
|
1844
1849
|
},
|
|
@@ -1882,6 +1887,8 @@ var taxEstimates_default$1 = {
|
|
|
1882
1887
|
"quarter_taxes": "{{quarterLabel}} taxes",
|
|
1883
1888
|
"remaining_balance": "Remaining Balance",
|
|
1884
1889
|
"rolled_over_from_previous_quarter": "Rolled Over From Previous Quarter",
|
|
1890
|
+
"set_up_your_tax_profile": "Set up your tax profile",
|
|
1891
|
+
"set_up_your_tax_profile_description": "Configuring your tax profile allows us to provide you with tax estimates and avoid any surprises come tax time.",
|
|
1885
1892
|
"single": "Single",
|
|
1886
1893
|
"state": "State",
|
|
1887
1894
|
"tax_details": "Tax Details",
|
|
@@ -3106,6 +3113,8 @@ var linkedAccounts_default = {
|
|
|
3106
3113
|
"ledger_balance": "Solde du grand livre",
|
|
3107
3114
|
"link_bank_accounts_and_credit_cards": "Liez vos comptes bancaires et vos cartes de crédit",
|
|
3108
3115
|
"link_more_accounts_any_time": "Vous pouvez lier d’autres comptes en tout temps à partir de la section Transactions bancaires",
|
|
3116
|
+
"link_your_bank_accounts": "Liez vos comptes bancaires",
|
|
3117
|
+
"link_your_bank_accounts_description": "Lier vos comptes bancaires nous permet de charger vos opérations bancaires et de les catégoriser automatiquement.",
|
|
3109
3118
|
"linked_accounts": "Comptes liés",
|
|
3110
3119
|
"loading_accounts": "Chargement de vos comptes...",
|
|
3111
3120
|
"may_take_few_minutes": "Cela peut prendre quelques minutes",
|
|
@@ -3253,6 +3262,8 @@ var taxEstimates_default = {
|
|
|
3253
3262
|
"no_tax_estimates_summary": "Commencez vos estimations d’impôt",
|
|
3254
3263
|
"no_tax_estimates_summary_description": "Commencez par importer et catégoriser vos opérations bancaires",
|
|
3255
3264
|
"no_tax_payments_to_display": "Il n’y a aucun paiement d’impôt à afficher.",
|
|
3265
|
+
"tax_due_is_negative_or_zero": "Aucun impôt à payer cette année",
|
|
3266
|
+
"tax_due_is_negative_or_zero_description": "Vos pertes déductibles dépassent votre revenu pour cette période, ce qui ramène votre impôt à payer à zéro.",
|
|
3256
3267
|
"tax_payments": "Aucun paiement d’impôt trouvé"
|
|
3257
3268
|
},
|
|
3258
3269
|
error: {
|
|
@@ -3267,6 +3278,7 @@ var taxEstimates_default = {
|
|
|
3267
3278
|
"retrieve_tax_profile": "Nous n’avons pas pu récupérer votre profil fiscal. Veuillez vérifier votre connexion et réessayer.",
|
|
3268
3279
|
"while_loading_tax_details": "Une erreur s’est produite lors du chargement de vos détails fiscaux. Veuillez vérifier votre connexion et réessayer.",
|
|
3269
3280
|
"while_loading_tax_estimates": "Une erreur s’est produite lors du chargement de vos estimations d’impôt. Veuillez vérifier votre connexion et réessayer.",
|
|
3281
|
+
"while_loading_tax_estimates_summary": "Une erreur s'est produite lors du chargement de votre sommaire fiscal. Veuillez vérifier votre connexion et réessayer.",
|
|
3270
3282
|
"while_loading_tax_payments": "Une erreur s’est produite lors du chargement de vos paiements d’impôt. Veuillez vérifier votre connexion et réessayer.",
|
|
3271
3283
|
"while_loading_tax_summary": "Une erreur s’est produite lors du chargement de votre sommaire fiscal. Veuillez vérifier votre connexion et réessayer."
|
|
3272
3284
|
},
|
|
@@ -3280,7 +3292,7 @@ var taxEstimates_default = {
|
|
|
3280
3292
|
"categorization_incomplete": "Catégorisation incomplète",
|
|
3281
3293
|
"deductions": "Déductions",
|
|
3282
3294
|
"due": "Échéance",
|
|
3283
|
-
"due_at": "",
|
|
3295
|
+
"due_at": "Échéance le {{date}}",
|
|
3284
3296
|
"due_with_date": "Échéance : {{date}}",
|
|
3285
3297
|
"enter_amount": "Saisissez un montant",
|
|
3286
3298
|
"enter_area": "Saisissez la superficie",
|
|
@@ -3310,6 +3322,8 @@ var taxEstimates_default = {
|
|
|
3310
3322
|
"quarter_taxes": "Impôts du {{quarterLabel}}",
|
|
3311
3323
|
"remaining_balance": "Solde restant",
|
|
3312
3324
|
"rolled_over_from_previous_quarter": "Reporté du trimestre précédent",
|
|
3325
|
+
"set_up_your_tax_profile": "Configurez votre profil fiscal",
|
|
3326
|
+
"set_up_your_tax_profile_description": "La configuration de votre profil fiscal nous permet de vous fournir des estimations d'impôt et d'éviter les mauvaises surprises au moment des impôts.",
|
|
3313
3327
|
"single": "Célibataire",
|
|
3314
3328
|
"state": "État",
|
|
3315
3329
|
"tax_details": "Détails fiscaux",
|
|
@@ -3636,7 +3650,7 @@ var vehicles_default = {
|
|
|
3636
3650
|
"enter_vin": "Saisissez le NIV",
|
|
3637
3651
|
"license_plate": "Plaque d’immatriculation",
|
|
3638
3652
|
"make_model": "Marque et modèle",
|
|
3639
|
-
"unnamed_vehicle": "",
|
|
3653
|
+
"unnamed_vehicle": "Véhicule sans nom",
|
|
3640
3654
|
"vehicle": "Véhicule",
|
|
3641
3655
|
"vehicle_name_hidden_from_active_list": "{{vehicleName}} sera masqué de votre liste de véhicules actifs. Vous pourrez le réactiver en tout temps.",
|
|
3642
3656
|
"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.",
|
|
@@ -8030,6 +8044,9 @@ var getLeafCategories$1 = (categories) => {
|
|
|
8030
8044
|
return getLeafCategories$1(category.subCategories);
|
|
8031
8045
|
});
|
|
8032
8046
|
};
|
|
8047
|
+
var flattenCategories$2 = (categories) => {
|
|
8048
|
+
return categories.flatMap((category) => [category, ...category.subCategories ? flattenCategories$2(category.subCategories) : []]);
|
|
8049
|
+
};
|
|
8033
8050
|
//#endregion
|
|
8034
8051
|
//#region src/schemas/customer.ts
|
|
8035
8052
|
var CustomerStatusSchema = effect.Schema.Literal("ACTIVE", "ARCHIVED");
|
|
@@ -8742,6 +8759,7 @@ var CategorizationRuleSchema = effect_index.Schema.Struct({
|
|
|
8742
8759
|
suggestion2: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.NullishOr(AccountIdentifierSchema)), effect_index.Schema.fromKey("suggestion_2")),
|
|
8743
8760
|
suggestion3: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.NullishOr(AccountIdentifierSchema)), effect_index.Schema.fromKey("suggestion_3")),
|
|
8744
8761
|
counterpartyFilter: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.NullishOr(BankTransactionCounterpartySchema)), effect_index.Schema.fromKey("counterparty_filter")),
|
|
8762
|
+
readableTransactionDescriptionFilter: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.NullishOr(effect_index.Schema.String)), effect_index.Schema.fromKey("readable_transaction_description_filter")),
|
|
8745
8763
|
bankDirectionFilter: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.NullishOr(BankDirectionFilterSchema)), effect_index.Schema.fromKey("bank_direction_filter")),
|
|
8746
8764
|
createdAt: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.Date), effect_index.Schema.fromKey("created_at")),
|
|
8747
8765
|
updatedAt: (0, effect_index.pipe)(effect_index.Schema.propertySignature(effect_index.Schema.Date), effect_index.Schema.fromKey("updated_at")),
|
|
@@ -23608,10 +23626,13 @@ var getCategorizationRuleDirectionLabel = (bankDirectionFilter, t) => {
|
|
|
23608
23626
|
const entry = DIRECTION_CONFIG.find((c) => c.value === bankDirectionFilter);
|
|
23609
23627
|
return entry ? t(entry.i18nKey, entry.defaultValue) : t("categorizationRules:label.any_direction", "Any direction");
|
|
23610
23628
|
};
|
|
23629
|
+
var getCategorizationRuleCounterpartyLabel = (rule) => {
|
|
23630
|
+
var _ref, _rule$counterpartyFil, _rule$counterpartyFil2;
|
|
23631
|
+
return (_ref = (_rule$counterpartyFil = (_rule$counterpartyFil2 = rule.counterpartyFilter) === null || _rule$counterpartyFil2 === void 0 ? void 0 : _rule$counterpartyFil2.name) !== null && _rule$counterpartyFil !== void 0 ? _rule$counterpartyFil : rule.readableTransactionDescriptionFilter) !== null && _ref !== void 0 ? _ref : void 0;
|
|
23632
|
+
};
|
|
23611
23633
|
//#endregion
|
|
23612
23634
|
//#region src/components/CategorizationRules/CategorizationRulesMobileList/CategorizationRulesMobileList.tsx
|
|
23613
23635
|
var CategorizationRuleMobileListItem = ({ rule, options, onDeletePress }) => {
|
|
23614
|
-
var _rule$counterpartyFil;
|
|
23615
23636
|
const { t } = (0, react_i18next.useTranslation)();
|
|
23616
23637
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
23617
23638
|
justify: "space-between",
|
|
@@ -23625,7 +23646,7 @@ var CategorizationRuleMobileListItem = ({ rule, options, onDeletePress }) => {
|
|
|
23625
23646
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
23626
23647
|
weight: "bold",
|
|
23627
23648
|
ellipsis: true,
|
|
23628
|
-
children: (
|
|
23649
|
+
children: getCategorizationRuleCounterpartyLabel(rule)
|
|
23629
23650
|
}),
|
|
23630
23651
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
23631
23652
|
gap: "3xs",
|
|
@@ -23970,13 +23991,10 @@ var CategorizationRulesTable = ({ data, isLoading, isError, paginationProps, opt
|
|
|
23970
23991
|
{
|
|
23971
23992
|
id: CategorizationRuleColumns.Counterparty,
|
|
23972
23993
|
header: t("common:label.counterparty", "Counterparty"),
|
|
23973
|
-
cell: (row) => {
|
|
23974
|
-
|
|
23975
|
-
|
|
23976
|
-
|
|
23977
|
-
children: (_row$original$counter = row.original.counterpartyFilter) === null || _row$original$counter === void 0 ? void 0 : _row$original$counter.name
|
|
23978
|
-
});
|
|
23979
|
-
}
|
|
23994
|
+
cell: (row) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
23995
|
+
ellipsis: true,
|
|
23996
|
+
children: getCategorizationRuleCounterpartyLabel(row.original)
|
|
23997
|
+
})
|
|
23980
23998
|
},
|
|
23981
23999
|
{
|
|
23982
24000
|
id: CategorizationRuleColumns.Direction,
|
|
@@ -24067,7 +24085,7 @@ var CategorizationRulesHeader = ({ onGoBack }) => {
|
|
|
24067
24085
|
};
|
|
24068
24086
|
var resolveVariant$1 = ({ width }) => width < BREAKPOINTS.TABLET ? "Mobile" : "Desktop";
|
|
24069
24087
|
var ResponsiveCategorizationRulesView = () => {
|
|
24070
|
-
var
|
|
24088
|
+
var _ref;
|
|
24071
24089
|
const { t } = (0, react_i18next.useTranslation)();
|
|
24072
24090
|
const [selectedRule, setSelectedRule] = (0, react.useState)(null);
|
|
24073
24091
|
const [showDeletionConfirmationModal, setShowDeletionConfirmationModal] = (0, react.useState)(false);
|
|
@@ -24077,7 +24095,7 @@ var ResponsiveCategorizationRulesView = () => {
|
|
|
24077
24095
|
const { data: categories, isLoading: categoriesAreLoading } = useCategories({ mode: CategoriesListMode.All });
|
|
24078
24096
|
const options = (0, react.useMemo)(() => {
|
|
24079
24097
|
if (!categories) return [];
|
|
24080
|
-
return
|
|
24098
|
+
return flattenCategories$2(categories);
|
|
24081
24099
|
}, [categories]);
|
|
24082
24100
|
const { data, hasMore, isLoading: rulesAreLoading, isError, size, setSize } = useListCategorizationRules({});
|
|
24083
24101
|
const categorizationRules = (0, react.useMemo)(() => data === null || data === void 0 ? void 0 : data.flatMap(({ data }) => data), [data]);
|
|
@@ -24123,66 +24141,69 @@ var ResponsiveCategorizationRulesView = () => {
|
|
|
24123
24141
|
]);
|
|
24124
24142
|
const isLoading = data === void 0 || rulesAreLoading || categoriesAreLoading;
|
|
24125
24143
|
const { toBankTransactionsTable } = useBankTransactionsNavigation();
|
|
24144
|
+
const DesktopView = (0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseDetailView, {
|
|
24145
|
+
slots: {
|
|
24146
|
+
Header: CategorizationRulesHeader,
|
|
24147
|
+
BackIcon: BackArrow
|
|
24148
|
+
},
|
|
24149
|
+
name: "CategorizationRulesDrawer",
|
|
24150
|
+
onGoBack: toBankTransactionsTable,
|
|
24151
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesTable, {
|
|
24152
|
+
data: categorizationRules,
|
|
24153
|
+
isLoading,
|
|
24154
|
+
isError,
|
|
24155
|
+
paginationProps,
|
|
24156
|
+
options,
|
|
24157
|
+
onDeleteRule,
|
|
24158
|
+
slots: {
|
|
24159
|
+
EmptyState: CategorizationRulesEmptyState,
|
|
24160
|
+
ErrorState: CategorizationRulesErrorState
|
|
24161
|
+
}
|
|
24162
|
+
})
|
|
24163
|
+
}), [
|
|
24164
|
+
toBankTransactionsTable,
|
|
24165
|
+
categorizationRules,
|
|
24166
|
+
isLoading,
|
|
24167
|
+
isError,
|
|
24168
|
+
paginationProps,
|
|
24169
|
+
options,
|
|
24170
|
+
onDeleteRule
|
|
24171
|
+
]);
|
|
24172
|
+
const MobileView = (0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
24173
|
+
gap: "md",
|
|
24174
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesHeader, { onGoBack: toBankTransactionsTable }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesMobileList, {
|
|
24175
|
+
data: categorizationRules,
|
|
24176
|
+
isLoading,
|
|
24177
|
+
isError,
|
|
24178
|
+
paginationProps,
|
|
24179
|
+
options,
|
|
24180
|
+
onDeleteRule,
|
|
24181
|
+
slots: {
|
|
24182
|
+
EmptyState: CategorizationRulesEmptyState,
|
|
24183
|
+
ErrorState: CategorizationRulesErrorState
|
|
24184
|
+
}
|
|
24185
|
+
})]
|
|
24186
|
+
}), [
|
|
24187
|
+
toBankTransactionsTable,
|
|
24188
|
+
categorizationRules,
|
|
24189
|
+
isLoading,
|
|
24190
|
+
isError,
|
|
24191
|
+
paginationProps,
|
|
24192
|
+
options,
|
|
24193
|
+
onDeleteRule
|
|
24194
|
+
]);
|
|
24195
|
+
const selectedRuleCounterpartyLabel = (_ref = selectedRule && getCategorizationRuleCounterpartyLabel(selectedRule)) !== null && _ref !== void 0 ? _ref : t("bankTransactions:label.selected_counterparty", "this counterparty");
|
|
24126
24196
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ResponsiveComponent, {
|
|
24127
24197
|
resolveVariant: resolveVariant$1,
|
|
24128
24198
|
slots: {
|
|
24129
|
-
Desktop:
|
|
24130
|
-
|
|
24131
|
-
Header: CategorizationRulesHeader,
|
|
24132
|
-
BackIcon: BackArrow
|
|
24133
|
-
},
|
|
24134
|
-
name: "CategorizationRulesDrawer",
|
|
24135
|
-
onGoBack: toBankTransactionsTable,
|
|
24136
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesTable, {
|
|
24137
|
-
data: categorizationRules,
|
|
24138
|
-
isLoading,
|
|
24139
|
-
isError,
|
|
24140
|
-
paginationProps,
|
|
24141
|
-
options,
|
|
24142
|
-
onDeleteRule,
|
|
24143
|
-
slots: {
|
|
24144
|
-
EmptyState: CategorizationRulesEmptyState,
|
|
24145
|
-
ErrorState: CategorizationRulesErrorState
|
|
24146
|
-
}
|
|
24147
|
-
})
|
|
24148
|
-
}), [
|
|
24149
|
-
toBankTransactionsTable,
|
|
24150
|
-
categorizationRules,
|
|
24151
|
-
isLoading,
|
|
24152
|
-
isError,
|
|
24153
|
-
paginationProps,
|
|
24154
|
-
options,
|
|
24155
|
-
onDeleteRule
|
|
24156
|
-
]),
|
|
24157
|
-
Mobile: (0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
24158
|
-
gap: "md",
|
|
24159
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesHeader, { onGoBack: toBankTransactionsTable }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CategorizationRulesMobileList, {
|
|
24160
|
-
data: categorizationRules,
|
|
24161
|
-
isLoading,
|
|
24162
|
-
isError,
|
|
24163
|
-
paginationProps,
|
|
24164
|
-
options,
|
|
24165
|
-
onDeleteRule,
|
|
24166
|
-
slots: {
|
|
24167
|
-
EmptyState: CategorizationRulesEmptyState,
|
|
24168
|
-
ErrorState: CategorizationRulesErrorState
|
|
24169
|
-
}
|
|
24170
|
-
})]
|
|
24171
|
-
}), [
|
|
24172
|
-
toBankTransactionsTable,
|
|
24173
|
-
categorizationRules,
|
|
24174
|
-
isLoading,
|
|
24175
|
-
isError,
|
|
24176
|
-
paginationProps,
|
|
24177
|
-
options,
|
|
24178
|
-
onDeleteRule
|
|
24179
|
-
])
|
|
24199
|
+
Desktop: DesktopView,
|
|
24200
|
+
Mobile: MobileView
|
|
24180
24201
|
}
|
|
24181
24202
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BaseConfirmationModal, {
|
|
24182
24203
|
isOpen: showDeletionConfirmationModal,
|
|
24183
24204
|
onOpenChange: setShowDeletionConfirmationModal,
|
|
24184
24205
|
title: t("categorizationRules:prompt.delete_categorization_rule", "Delete categorization rule?"),
|
|
24185
|
-
description: t("categorizationRules:label.transaction_no_longer_automatically_categorized", "Transactions will no longer automatically be categorized by this rule. Any transactions previously categorized to {{counterparty}} will not be affected.", { counterparty:
|
|
24206
|
+
description: t("categorizationRules:label.transaction_no_longer_automatically_categorized", "Transactions will no longer automatically be categorized by this rule. Any transactions previously categorized to {{counterparty}} will not be affected.", { counterparty: selectedRuleCounterpartyLabel }),
|
|
24186
24207
|
onConfirm: archiveCategorizationRule,
|
|
24187
24208
|
confirmLabel: t("common:action.delete_label", "Delete"),
|
|
24188
24209
|
cancelLabel: t("common:action.cancel_label", "Cancel"),
|
|
@@ -27413,13 +27434,13 @@ var ProfitAndLossChartSelectionIndicator = ({ viewBox, selected }) => {
|
|
|
27413
27434
|
const boxWidth = width + 2 * margin;
|
|
27414
27435
|
const borderRadius = 6;
|
|
27415
27436
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
|
|
27416
|
-
className: "
|
|
27437
|
+
className: "Layer__ProfitAndLossChart__SelectionIndicator",
|
|
27417
27438
|
rx: borderRadius,
|
|
27418
27439
|
ry: borderRadius,
|
|
27419
27440
|
x: x - margin,
|
|
27420
|
-
y:
|
|
27441
|
+
y: 24,
|
|
27421
27442
|
width: boxWidth,
|
|
27422
|
-
height: "calc(100% -
|
|
27443
|
+
height: "calc(100% - 38px)"
|
|
27423
27444
|
});
|
|
27424
27445
|
};
|
|
27425
27446
|
//#endregion
|
|
@@ -27729,7 +27750,8 @@ var transformPnLData = ({ data, compactView, formatMonthName }) => {
|
|
|
27729
27750
|
var CHART_MARGINS = {
|
|
27730
27751
|
left: 12,
|
|
27731
27752
|
right: 12,
|
|
27732
|
-
bottom: 12
|
|
27753
|
+
bottom: 12,
|
|
27754
|
+
top: 24
|
|
27733
27755
|
};
|
|
27734
27756
|
var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
|
|
27735
27757
|
var _getColor$hex, _getColor, _getColor$hex2, _getColor2, _getColor$hex3, _getColor3;
|
|
@@ -27803,9 +27825,9 @@ var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
|
|
|
27803
27825
|
activationDate
|
|
27804
27826
|
]);
|
|
27805
27827
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
27806
|
-
className: "
|
|
27828
|
+
className: "Layer__ProfitAndLossChart",
|
|
27807
27829
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ResponsiveContainer, {
|
|
27808
|
-
className: "
|
|
27830
|
+
className: "Layer__ProfitAndLossChart__Container",
|
|
27809
27831
|
width: "100%",
|
|
27810
27832
|
height: "100%",
|
|
27811
27833
|
onResize: (0, react.useCallback)((width) => {
|
|
@@ -27817,7 +27839,7 @@ var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
|
|
|
27817
27839
|
margin: CHART_MARGINS,
|
|
27818
27840
|
data: dataOrPlaceholderData,
|
|
27819
27841
|
onClick,
|
|
27820
|
-
className: "Layer__profit-and-loss-chart",
|
|
27842
|
+
className: "Layer__profit-and-loss-chart Layer__ProfitAndLossChart__Chart",
|
|
27821
27843
|
children: [
|
|
27822
27844
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLossChartPatternDefs, {}),
|
|
27823
27845
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(recharts.ReferenceLine, {
|
|
@@ -27908,7 +27930,6 @@ var DetailedChart = ({ data, isLoading, interactionProps, stylingProps, slots })
|
|
|
27908
27930
|
x: x + width / 2,
|
|
27909
27931
|
textAnchor: "middle",
|
|
27910
27932
|
verticalAnchor: "middle",
|
|
27911
|
-
breakAll: true,
|
|
27912
27933
|
maxLines: 2,
|
|
27913
27934
|
width: Math.max(width - 40, 0),
|
|
27914
27935
|
className: "Layer__DetailedChart__centerLabelTitle",
|
|
@@ -29965,7 +29986,7 @@ var SyncingBadge = () => {
|
|
|
29965
29986
|
};
|
|
29966
29987
|
//#endregion
|
|
29967
29988
|
//#region src/components/ProfitAndLossHeader/ProfitAndLossHeader.tsx
|
|
29968
|
-
var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker, withDownloadButton, withStatus = true, stringOverrides, dateSelectionMode = "full" }) => {
|
|
29989
|
+
var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker, withDownloadButton, withStatus = true, stringOverrides, dateSelectionMode = "full", trailingContent }) => {
|
|
29969
29990
|
const { t } = (0, react_i18next.useTranslation)();
|
|
29970
29991
|
const { data: linkedAccounts } = useLinkedAccounts();
|
|
29971
29992
|
const { activePeriod } = useActiveBookkeepingPeriod();
|
|
@@ -29993,10 +30014,15 @@ var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker,
|
|
|
29993
30014
|
]
|
|
29994
30015
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
29995
30016
|
gap: "xs",
|
|
29996
|
-
|
|
29997
|
-
|
|
29998
|
-
|
|
29999
|
-
|
|
30017
|
+
align: "center",
|
|
30018
|
+
children: [
|
|
30019
|
+
trailingContent,
|
|
30020
|
+
withDatePicker && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateRangeSelection, {
|
|
30021
|
+
mode: dateSelectionMode,
|
|
30022
|
+
showLabels: false
|
|
30023
|
+
}),
|
|
30024
|
+
withDownloadButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLossDownloadButton, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.downloadButton })
|
|
30025
|
+
]
|
|
30000
30026
|
})]
|
|
30001
30027
|
});
|
|
30002
30028
|
};
|
|
@@ -44106,8 +44132,8 @@ var ProfitAndLossOverviewDetailedCharts = ({ variant, detailedChartsStringOverri
|
|
|
44106
44132
|
label: (detailedChartsStringOverrides === null || detailedChartsStringOverrides === void 0 || (_detailedChartsString2 = detailedChartsStringOverrides.detailedChartStringOverrides) === null || _detailedChartsString2 === void 0 ? void 0 : _detailedChartsString2.expenseToggleLabel) || t("common:label.expenses", "Expenses")
|
|
44107
44133
|
}];
|
|
44108
44134
|
}, [detailedChartsStringOverrides, t]);
|
|
44109
|
-
const chartsWrapperClassName = variant === "accounting" ? "
|
|
44110
|
-
const chartContainerName = variant === "accounting" ? "
|
|
44135
|
+
const chartsWrapperClassName = variant === "accounting" ? "Layer__AccountingOverview__ProfitAndLossCharts" : "Layer__BookkeepingOverview__ProfitAndLossCharts";
|
|
44136
|
+
const chartContainerName = variant === "accounting" ? "AccountingOverview__ProfitAndLossChart" : "BookkeepingOverview__ProfitAndLossChart";
|
|
44111
44137
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
44112
44138
|
className: chartsWrapperClassName,
|
|
44113
44139
|
gap: "md",
|
|
@@ -44148,6 +44174,49 @@ var ProfitAndLossOverviewDetailedCharts = ({ variant, detailedChartsStringOverri
|
|
|
44148
44174
|
});
|
|
44149
44175
|
};
|
|
44150
44176
|
//#endregion
|
|
44177
|
+
//#region src/components/ProfitAndLossSummaryCard/PnlLegend.tsx
|
|
44178
|
+
var Swatch$1 = ({ className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
44179
|
+
className: `Layer__PnlLegend__Swatch ${className}`,
|
|
44180
|
+
"aria-hidden": true
|
|
44181
|
+
});
|
|
44182
|
+
var PnlLegend = ({ direction = "row" }) => {
|
|
44183
|
+
const { t } = (0, react_i18next.useTranslation)();
|
|
44184
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
|
|
44185
|
+
className: "Layer__PnlLegend",
|
|
44186
|
+
direction,
|
|
44187
|
+
align: "start",
|
|
44188
|
+
gap: direction === "row" ? "md" : "2xs",
|
|
44189
|
+
pis: direction === "column" ? "md" : void 0,
|
|
44190
|
+
pbe: direction === "column" ? "md" : void 0,
|
|
44191
|
+
children: [
|
|
44192
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
44193
|
+
gap: "2xs",
|
|
44194
|
+
align: "center",
|
|
44195
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--income" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
44196
|
+
size: "sm",
|
|
44197
|
+
children: t("common:label.revenue", "Revenue")
|
|
44198
|
+
})]
|
|
44199
|
+
}),
|
|
44200
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
44201
|
+
gap: "2xs",
|
|
44202
|
+
align: "center",
|
|
44203
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--expenses" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
44204
|
+
size: "sm",
|
|
44205
|
+
children: t("common:label.expenses", "Expenses")
|
|
44206
|
+
})]
|
|
44207
|
+
}),
|
|
44208
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
44209
|
+
gap: "2xs",
|
|
44210
|
+
align: "center",
|
|
44211
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--uncategorized" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
44212
|
+
size: "sm",
|
|
44213
|
+
children: t("common:label.uncategorized", "Uncategorized")
|
|
44214
|
+
})]
|
|
44215
|
+
})
|
|
44216
|
+
]
|
|
44217
|
+
});
|
|
44218
|
+
};
|
|
44219
|
+
//#endregion
|
|
44151
44220
|
//#region src/views/AccountingOverview/AccountingOverview.tsx
|
|
44152
44221
|
var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, onboardingStepOverride = void 0, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter = void 0, slotProps }) => {
|
|
44153
44222
|
var _slotProps$profitAndL, _stringOverrides$prof, _stringOverrides$prof2;
|
|
@@ -44162,6 +44231,7 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
|
|
|
44162
44231
|
} : void 0,
|
|
44163
44232
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(View, {
|
|
44164
44233
|
title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.accounting_overview", "Accounting overview"),
|
|
44234
|
+
viewClassName: "Layer__AccountingOverview",
|
|
44165
44235
|
showHeader: showTitle,
|
|
44166
44236
|
header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Header$1, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderCol, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
|
|
44167
44237
|
children: [
|
|
@@ -44177,11 +44247,19 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
|
|
|
44177
44247
|
}),
|
|
44178
44248
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Container, {
|
|
44179
44249
|
name: "accounting-overview-profit-and-loss",
|
|
44250
|
+
className: "Layer__AccountingOverview__ProfitAndLossContainer",
|
|
44180
44251
|
asWidget: true,
|
|
44181
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Header, {
|
|
44182
|
-
|
|
44183
|
-
|
|
44184
|
-
|
|
44252
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Header, {
|
|
44253
|
+
text: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.header) || t("common:label.profit_loss", "Profit & Loss"),
|
|
44254
|
+
className: "Layer__AccountingOverview__ProfitAndLossHeader",
|
|
44255
|
+
trailingContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PnlLegend, { direction: "row" })
|
|
44256
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Chart, {
|
|
44257
|
+
tagFilter: tagFilter ? {
|
|
44258
|
+
key: tagFilter.tagKey,
|
|
44259
|
+
values: tagFilter.tagValues
|
|
44260
|
+
} : void 0,
|
|
44261
|
+
hideLegend: true
|
|
44262
|
+
})]
|
|
44185
44263
|
}),
|
|
44186
44264
|
middleBanner && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Container, {
|
|
44187
44265
|
name: "accounting-overview-middle-banner",
|
|
@@ -44684,7 +44762,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
|
|
|
44684
44762
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ProfitAndLoss, {
|
|
44685
44763
|
asContainer: false,
|
|
44686
44764
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(View, {
|
|
44687
|
-
viewClassName: "Layer__bookkeeping-overview--view",
|
|
44765
|
+
viewClassName: "Layer__bookkeeping-overview--view Layer__BookkeepingOverview",
|
|
44688
44766
|
title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.bookkeeping_overview", "Bookkeeping overview"),
|
|
44689
44767
|
header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Header$1, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderCol, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
|
|
44690
44768
|
withSidebar: width > 1100,
|
|
@@ -44721,6 +44799,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
|
|
|
44721
44799
|
onClick: () => upperElementInFocus.current = false,
|
|
44722
44800
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Container, {
|
|
44723
44801
|
name: "bookkeeping-overview-profit-and-loss",
|
|
44802
|
+
className: "Layer__BookkeepingOverview__ProfitAndLossContainer",
|
|
44724
44803
|
asWidget: true,
|
|
44725
44804
|
style: {
|
|
44726
44805
|
position: "relative",
|
|
@@ -44729,7 +44808,8 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
|
|
|
44729
44808
|
children: [
|
|
44730
44809
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Header, {
|
|
44731
44810
|
text: (stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof = stringOverrides.profitAndLoss) === null || _stringOverrides$prof === void 0 ? void 0 : _stringOverrides$prof.header) || t("common:label.profit_loss", "Profit & Loss"),
|
|
44732
|
-
withStatus: true
|
|
44811
|
+
withStatus: true,
|
|
44812
|
+
trailingContent: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PnlLegend, { direction: "row" })
|
|
44733
44813
|
}),
|
|
44734
44814
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
|
|
44735
44815
|
pb: "md",
|
|
@@ -44740,7 +44820,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
|
|
|
44740
44820
|
variants: profitAndLossSummariesVariants
|
|
44741
44821
|
})
|
|
44742
44822
|
}),
|
|
44743
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Chart, {})
|
|
44823
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Chart, { hideLegend: true })
|
|
44744
44824
|
]
|
|
44745
44825
|
})
|
|
44746
44826
|
}),
|
|
@@ -46852,11 +46932,13 @@ var SummaryCard = ({ slots, children, className }) => {
|
|
|
46852
46932
|
});
|
|
46853
46933
|
};
|
|
46854
46934
|
//#endregion
|
|
46855
|
-
//#region src/hooks/utils/i18n/
|
|
46856
|
-
var
|
|
46935
|
+
//#region src/hooks/utils/i18n/useGlobalDateFormatter.ts
|
|
46936
|
+
var useGlobalDateFormatter = () => {
|
|
46857
46937
|
const { formatDate } = useIntlFormatter();
|
|
46858
|
-
const { date } = useGlobalDate(
|
|
46859
|
-
return
|
|
46938
|
+
const { date } = useGlobalDate();
|
|
46939
|
+
return (0, react.useCallback)((format) => {
|
|
46940
|
+
return formatDate(date, format);
|
|
46941
|
+
}, [date, formatDate]);
|
|
46860
46942
|
};
|
|
46861
46943
|
//#endregion
|
|
46862
46944
|
//#region src/components/ui/SummaryCard/ExpandSummaryCardButton.tsx
|
|
@@ -46871,9 +46953,9 @@ function ExpandSummaryCardButton({ callback, ariaLabel }) {
|
|
|
46871
46953
|
}
|
|
46872
46954
|
//#endregion
|
|
46873
46955
|
//#region src/components/ui/SummaryCard/useSummaryCardSlots.tsx
|
|
46874
|
-
var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, stringOverrides }) => {
|
|
46956
|
+
var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, subtitleDateFormat = DateFormat.MonthYear, stringOverrides }) => {
|
|
46875
46957
|
const { t } = (0, react_i18next.useTranslation)();
|
|
46876
|
-
const
|
|
46958
|
+
const formatGlobalDate = useGlobalDateFormatter();
|
|
46877
46959
|
const { onClickExpand } = interactionProps !== null && interactionProps !== void 0 ? interactionProps : {};
|
|
46878
46960
|
return (0, react.useMemo)(() => {
|
|
46879
46961
|
var _stringOverrides$titl;
|
|
@@ -46883,14 +46965,15 @@ var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, stringOverr
|
|
|
46883
46965
|
}) : void 0;
|
|
46884
46966
|
return {
|
|
46885
46967
|
title: (_stringOverrides$titl = stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) !== null && _stringOverrides$titl !== void 0 ? _stringOverrides$titl : defaultTitle,
|
|
46886
|
-
subtitle,
|
|
46968
|
+
subtitle: formatGlobalDate(subtitleDateFormat),
|
|
46887
46969
|
legend,
|
|
46888
46970
|
primaryAction
|
|
46889
46971
|
};
|
|
46890
46972
|
}, [
|
|
46891
46973
|
stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title,
|
|
46892
46974
|
defaultTitle,
|
|
46893
|
-
|
|
46975
|
+
subtitleDateFormat,
|
|
46976
|
+
formatGlobalDate,
|
|
46894
46977
|
legend,
|
|
46895
46978
|
onClickExpand,
|
|
46896
46979
|
t
|
|
@@ -47005,55 +47088,13 @@ var MileageTrackingSummary = ({ stringOverrides, interactionProps } = {}) => {
|
|
|
47005
47088
|
slots: useSummaryCardSlots({
|
|
47006
47089
|
defaultTitle: t("mileageTracking:label.mileage_tracking", "Mileage Tracking"),
|
|
47007
47090
|
interactionProps,
|
|
47008
|
-
stringOverrides
|
|
47091
|
+
stringOverrides,
|
|
47092
|
+
subtitleDateFormat: DateFormat.Year
|
|
47009
47093
|
}),
|
|
47010
47094
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Content$1, {})
|
|
47011
47095
|
});
|
|
47012
47096
|
};
|
|
47013
47097
|
//#endregion
|
|
47014
|
-
//#region src/components/ProfitAndLossSummaryCard/PnlLegend.tsx
|
|
47015
|
-
var Swatch$1 = ({ className }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
47016
|
-
className: `Layer__PnlLegend__Swatch ${className}`,
|
|
47017
|
-
"aria-hidden": true
|
|
47018
|
-
});
|
|
47019
|
-
var PnlLegend = ({ direction = "row" }) => {
|
|
47020
|
-
const { t } = (0, react_i18next.useTranslation)();
|
|
47021
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Stack, {
|
|
47022
|
-
className: "Layer__PnlLegend",
|
|
47023
|
-
direction,
|
|
47024
|
-
align: "start",
|
|
47025
|
-
gap: direction === "row" ? "md" : "2xs",
|
|
47026
|
-
pis: direction === "column" ? "md" : void 0,
|
|
47027
|
-
pbe: direction === "column" ? "md" : void 0,
|
|
47028
|
-
children: [
|
|
47029
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
47030
|
-
gap: "2xs",
|
|
47031
|
-
align: "center",
|
|
47032
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--income" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
47033
|
-
size: "sm",
|
|
47034
|
-
children: t("common:label.revenue", "Revenue")
|
|
47035
|
-
})]
|
|
47036
|
-
}),
|
|
47037
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
47038
|
-
gap: "2xs",
|
|
47039
|
-
align: "center",
|
|
47040
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--expenses" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
47041
|
-
size: "sm",
|
|
47042
|
-
children: t("common:label.expenses", "Expenses")
|
|
47043
|
-
})]
|
|
47044
|
-
}),
|
|
47045
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
47046
|
-
gap: "2xs",
|
|
47047
|
-
align: "center",
|
|
47048
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Swatch$1, { className: "Layer__PnlLegend__Swatch--uncategorized" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, {
|
|
47049
|
-
size: "sm",
|
|
47050
|
-
children: t("common:label.uncategorized", "Uncategorized")
|
|
47051
|
-
})]
|
|
47052
|
-
})
|
|
47053
|
-
]
|
|
47054
|
-
});
|
|
47055
|
-
};
|
|
47056
|
-
//#endregion
|
|
47057
47098
|
//#region src/components/ProfitAndLossSummaryCard/ProfitAndLossSummaryCard.tsx
|
|
47058
47099
|
var ProfitAndLossSummaryCard = ({ interactionProps, stringOverrides, className }) => {
|
|
47059
47100
|
const { t } = (0, react_i18next.useTranslation)();
|
|
@@ -47235,33 +47276,39 @@ var getOnboardingBannerState = ({ isLoading, hasLinkedAccounts, hasSavedTaxProfi
|
|
|
47235
47276
|
var NoBankAccountsLinkedBanner = () => {
|
|
47236
47277
|
const { addConnection } = (0, react.useContext)(LinkedAccountsContext);
|
|
47237
47278
|
const { isMobile } = useSizeClass();
|
|
47279
|
+
const { t } = (0, react_i18next.useTranslation)();
|
|
47238
47280
|
const handleLinkBankAccounts = (0, react.useCallback)(() => {
|
|
47239
47281
|
addConnection("PLAID");
|
|
47240
47282
|
}, [addConnection]);
|
|
47283
|
+
const Icon = isMobile ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Info, { size: 16 });
|
|
47284
|
+
const title = t("linkedAccounts:label.link_your_bank_accounts", "Link your bank accounts");
|
|
47241
47285
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Banner, {
|
|
47242
|
-
title
|
|
47243
|
-
description: "Linking your bank accounts allows us to load your bank transactions and automatically categorize them.",
|
|
47286
|
+
title,
|
|
47287
|
+
description: t("linkedAccounts:label.link_your_bank_accounts_description", "Linking your bank accounts allows us to load your bank transactions and automatically categorize them."),
|
|
47244
47288
|
slots: {
|
|
47245
|
-
Icon
|
|
47289
|
+
Icon,
|
|
47246
47290
|
Button: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
47247
47291
|
onPress: handleLinkBankAccounts,
|
|
47248
47292
|
variant: "outlined-light",
|
|
47249
|
-
children:
|
|
47293
|
+
children: title
|
|
47250
47294
|
})
|
|
47251
47295
|
}
|
|
47252
47296
|
});
|
|
47253
47297
|
};
|
|
47254
47298
|
var NoTaxProfileBanner = ({ onSetupTaxProfile }) => {
|
|
47255
47299
|
const { isMobile } = useSizeClass();
|
|
47300
|
+
const { t } = (0, react_i18next.useTranslation)();
|
|
47301
|
+
const Icon = isMobile ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Info, { size: 16 });
|
|
47302
|
+
const title = t("taxEstimates:label.set_up_your_tax_profile", "Set up your tax profile");
|
|
47256
47303
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Banner, {
|
|
47257
|
-
title
|
|
47258
|
-
description: "Configuring your tax profile allows us to provide you with tax estimates and avoid any surprises come tax time.",
|
|
47304
|
+
title,
|
|
47305
|
+
description: t("taxEstimates:label.set_up_your_tax_profile_description", "Configuring your tax profile allows us to provide you with tax estimates and avoid any surprises come tax time."),
|
|
47259
47306
|
slots: {
|
|
47260
|
-
Icon
|
|
47307
|
+
Icon,
|
|
47261
47308
|
Button: onSetupTaxProfile ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button$1, {
|
|
47262
47309
|
onPress: onSetupTaxProfile,
|
|
47263
47310
|
variant: "outlined-light",
|
|
47264
|
-
children:
|
|
47311
|
+
children: title
|
|
47265
47312
|
}) : null
|
|
47266
47313
|
}
|
|
47267
47314
|
});
|
|
@@ -47617,8 +47664,8 @@ var TaxEstimatesSummaryCardNegativeOrZero = () => {
|
|
|
47617
47664
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
47618
47665
|
className: "Layer__TaxEstimatesSummaryCard__DataState Layer__data-state--reset",
|
|
47619
47666
|
status: DataStateStatus.info,
|
|
47620
|
-
title: t("taxEstimates:
|
|
47621
|
-
description: t("taxEstimates:
|
|
47667
|
+
title: t("taxEstimates:empty.tax_due_is_negative_or_zero", "No taxes owed this year"),
|
|
47668
|
+
description: t("taxEstimates:empty.tax_due_is_negative_or_zero_description", "Your deductible losses exceed your income for this period, bringing your tax liability to zero.")
|
|
47622
47669
|
});
|
|
47623
47670
|
};
|
|
47624
47671
|
//#endregion
|
|
@@ -47879,7 +47926,8 @@ var TaxEstimatesSummaryCard = ({ mode = TaxEstimatesSummaryCardMode.PieChart, in
|
|
|
47879
47926
|
const slots = useSummaryCardSlots({
|
|
47880
47927
|
defaultTitle,
|
|
47881
47928
|
interactionProps,
|
|
47882
|
-
stringOverrides
|
|
47929
|
+
stringOverrides,
|
|
47930
|
+
subtitleDateFormat: DateFormat.Year
|
|
47883
47931
|
});
|
|
47884
47932
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SummaryCard, {
|
|
47885
47933
|
className: (0, classnames.default)("Layer__TaxEstimatesSummaryCard", isSummaryCardLayout && "Layer__TaxEstimatesSummaryCard--summaryCard"),
|