@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.
@@ -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.4",
253
+ version: "0.1.132",
254
254
  description: "Layer React Components",
255
255
  main: "dist/cjs/index.cjs",
256
256
  module: "dist/esm/index.mjs",
@@ -1650,6 +1650,8 @@ var linkedAccounts_default$1 = {
1650
1650
  "ledger_balance": "Ledger balance",
1651
1651
  "link_bank_accounts_and_credit_cards": "Link your bank accounts and credit cards",
1652
1652
  "link_more_accounts_any_time": "You can link more accounts at any time from the Bank Transactions section",
1653
+ "link_your_bank_accounts": "Link your bank accounts",
1654
+ "link_your_bank_accounts_description": "Linking your bank accounts allows us to load your bank transactions and automatically categorize them.",
1653
1655
  "linked_accounts": "Linked Accounts",
1654
1656
  "loading_accounts": "Loading Your Accounts...",
1655
1657
  "may_take_few_minutes": "This may take a few minutes",
@@ -1797,6 +1799,8 @@ var taxEstimates_default$1 = {
1797
1799
  "no_tax_estimates_summary": "Get started with your tax estimates",
1798
1800
  "no_tax_estimates_summary_description": "Start by importing and categorizing your bank transactions",
1799
1801
  "no_tax_payments_to_display": "There are no tax payments to display.",
1802
+ "tax_due_is_negative_or_zero": "No taxes owed this year",
1803
+ "tax_due_is_negative_or_zero_description": "Your deductible losses exceed your income for this period, bringing your tax liability to zero.",
1800
1804
  "tax_payments": "No tax payments found"
1801
1805
  },
1802
1806
  error: {
@@ -1811,6 +1815,7 @@ var taxEstimates_default$1 = {
1811
1815
  "retrieve_tax_profile": "We couldn’t retrieve your tax profile. Please check your connection and try again.",
1812
1816
  "while_loading_tax_details": "An error occurred while loading your tax details. Please check your connection and try again.",
1813
1817
  "while_loading_tax_estimates": "An error occurred while loading your tax estimates. Please check your connection and try again.",
1818
+ "while_loading_tax_estimates_summary": "An error occurred while loading your tax summary. Please check your connection and try again.",
1814
1819
  "while_loading_tax_payments": "An error occurred while loading your tax payments. Please check your connection and try again.",
1815
1820
  "while_loading_tax_summary": "An error occurred while loading your tax summary. Please check your connection and try again."
1816
1821
  },
@@ -1854,6 +1859,8 @@ var taxEstimates_default$1 = {
1854
1859
  "quarter_taxes": "{{quarterLabel}} taxes",
1855
1860
  "remaining_balance": "Remaining Balance",
1856
1861
  "rolled_over_from_previous_quarter": "Rolled Over From Previous Quarter",
1862
+ "set_up_your_tax_profile": "Set up your tax profile",
1863
+ "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.",
1857
1864
  "single": "Single",
1858
1865
  "state": "State",
1859
1866
  "tax_details": "Tax Details",
@@ -3078,6 +3085,8 @@ var linkedAccounts_default = {
3078
3085
  "ledger_balance": "Solde du grand livre",
3079
3086
  "link_bank_accounts_and_credit_cards": "Liez vos comptes bancaires et vos cartes de crédit",
3080
3087
  "link_more_accounts_any_time": "Vous pouvez lier d’autres comptes en tout temps à partir de la section Transactions bancaires",
3088
+ "link_your_bank_accounts": "Liez vos comptes bancaires",
3089
+ "link_your_bank_accounts_description": "Lier vos comptes bancaires nous permet de charger vos opérations bancaires et de les catégoriser automatiquement.",
3081
3090
  "linked_accounts": "Comptes liés",
3082
3091
  "loading_accounts": "Chargement de vos comptes...",
3083
3092
  "may_take_few_minutes": "Cela peut prendre quelques minutes",
@@ -3225,6 +3234,8 @@ var taxEstimates_default = {
3225
3234
  "no_tax_estimates_summary": "Commencez vos estimations d’impôt",
3226
3235
  "no_tax_estimates_summary_description": "Commencez par importer et catégoriser vos opérations bancaires",
3227
3236
  "no_tax_payments_to_display": "Il n’y a aucun paiement d’impôt à afficher.",
3237
+ "tax_due_is_negative_or_zero": "Aucun impôt à payer cette année",
3238
+ "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.",
3228
3239
  "tax_payments": "Aucun paiement d’impôt trouvé"
3229
3240
  },
3230
3241
  error: {
@@ -3239,6 +3250,7 @@ var taxEstimates_default = {
3239
3250
  "retrieve_tax_profile": "Nous n’avons pas pu récupérer votre profil fiscal. Veuillez vérifier votre connexion et réessayer.",
3240
3251
  "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.",
3241
3252
  "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.",
3253
+ "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.",
3242
3254
  "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.",
3243
3255
  "while_loading_tax_summary": "Une erreur s’est produite lors du chargement de votre sommaire fiscal. Veuillez vérifier votre connexion et réessayer."
3244
3256
  },
@@ -3252,7 +3264,7 @@ var taxEstimates_default = {
3252
3264
  "categorization_incomplete": "Catégorisation incomplète",
3253
3265
  "deductions": "Déductions",
3254
3266
  "due": "Échéance",
3255
- "due_at": "",
3267
+ "due_at": "Échéance le {{date}}",
3256
3268
  "due_with_date": "Échéance : {{date}}",
3257
3269
  "enter_amount": "Saisissez un montant",
3258
3270
  "enter_area": "Saisissez la superficie",
@@ -3282,6 +3294,8 @@ var taxEstimates_default = {
3282
3294
  "quarter_taxes": "Impôts du {{quarterLabel}}",
3283
3295
  "remaining_balance": "Solde restant",
3284
3296
  "rolled_over_from_previous_quarter": "Reporté du trimestre précédent",
3297
+ "set_up_your_tax_profile": "Configurez votre profil fiscal",
3298
+ "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.",
3285
3299
  "single": "Célibataire",
3286
3300
  "state": "État",
3287
3301
  "tax_details": "Détails fiscaux",
@@ -3608,7 +3622,7 @@ var vehicles_default = {
3608
3622
  "enter_vin": "Saisissez le NIV",
3609
3623
  "license_plate": "Plaque d’immatriculation",
3610
3624
  "make_model": "Marque et modèle",
3611
- "unnamed_vehicle": "",
3625
+ "unnamed_vehicle": "Véhicule sans nom",
3612
3626
  "vehicle": "Véhicule",
3613
3627
  "vehicle_name_hidden_from_active_list": "{{vehicleName}} sera masqué de votre liste de véhicules actifs. Vous pourrez le réactiver en tout temps.",
3614
3628
  "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.",
@@ -4696,6 +4710,9 @@ var getLeafCategories$1 = (categories) => {
4696
4710
  return getLeafCategories$1(category.subCategories);
4697
4711
  });
4698
4712
  };
4713
+ var flattenCategories$2 = (categories) => {
4714
+ return categories.flatMap((category) => [category, ...category.subCategories ? flattenCategories$2(category.subCategories) : []]);
4715
+ };
4699
4716
  //#endregion
4700
4717
  //#region src/schemas/customer.ts
4701
4718
  var CustomerStatusSchema = Schema.Literal("ACTIVE", "ARCHIVED");
@@ -5408,6 +5425,7 @@ var CategorizationRuleSchema = Schema$1.Struct({
5408
5425
  suggestion2: pipe$1(Schema$1.propertySignature(Schema$1.NullishOr(AccountIdentifierSchema)), Schema$1.fromKey("suggestion_2")),
5409
5426
  suggestion3: pipe$1(Schema$1.propertySignature(Schema$1.NullishOr(AccountIdentifierSchema)), Schema$1.fromKey("suggestion_3")),
5410
5427
  counterpartyFilter: pipe$1(Schema$1.propertySignature(Schema$1.NullishOr(BankTransactionCounterpartySchema)), Schema$1.fromKey("counterparty_filter")),
5428
+ readableTransactionDescriptionFilter: pipe$1(Schema$1.propertySignature(Schema$1.NullishOr(Schema$1.String)), Schema$1.fromKey("readable_transaction_description_filter")),
5411
5429
  bankDirectionFilter: pipe$1(Schema$1.propertySignature(Schema$1.NullishOr(BankDirectionFilterSchema)), Schema$1.fromKey("bank_direction_filter")),
5412
5430
  createdAt: pipe$1(Schema$1.propertySignature(Schema$1.Date), Schema$1.fromKey("created_at")),
5413
5431
  updatedAt: pipe$1(Schema$1.propertySignature(Schema$1.Date), Schema$1.fromKey("updated_at")),
@@ -20249,10 +20267,13 @@ var getCategorizationRuleDirectionLabel = (bankDirectionFilter, t) => {
20249
20267
  const entry = DIRECTION_CONFIG.find((c) => c.value === bankDirectionFilter);
20250
20268
  return entry ? t(entry.i18nKey, entry.defaultValue) : t("categorizationRules:label.any_direction", "Any direction");
20251
20269
  };
20270
+ var getCategorizationRuleCounterpartyLabel = (rule) => {
20271
+ var _ref, _rule$counterpartyFil, _rule$counterpartyFil2;
20272
+ 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;
20273
+ };
20252
20274
  //#endregion
20253
20275
  //#region src/components/CategorizationRules/CategorizationRulesMobileList/CategorizationRulesMobileList.tsx
20254
20276
  var CategorizationRuleMobileListItem = ({ rule, options, onDeletePress }) => {
20255
- var _rule$counterpartyFil;
20256
20277
  const { t } = useTranslation();
20257
20278
  return /* @__PURE__ */ jsxs(HStack, {
20258
20279
  justify: "space-between",
@@ -20266,7 +20287,7 @@ var CategorizationRuleMobileListItem = ({ rule, options, onDeletePress }) => {
20266
20287
  /* @__PURE__ */ jsx(Span, {
20267
20288
  weight: "bold",
20268
20289
  ellipsis: true,
20269
- children: (_rule$counterpartyFil = rule.counterpartyFilter) === null || _rule$counterpartyFil === void 0 ? void 0 : _rule$counterpartyFil.name
20290
+ children: getCategorizationRuleCounterpartyLabel(rule)
20270
20291
  }),
20271
20292
  /* @__PURE__ */ jsxs(HStack, {
20272
20293
  gap: "3xs",
@@ -20611,13 +20632,10 @@ var CategorizationRulesTable = ({ data, isLoading, isError, paginationProps, opt
20611
20632
  {
20612
20633
  id: CategorizationRuleColumns.Counterparty,
20613
20634
  header: t("common:label.counterparty", "Counterparty"),
20614
- cell: (row) => {
20615
- var _row$original$counter;
20616
- return /* @__PURE__ */ jsx(Span, {
20617
- ellipsis: true,
20618
- children: (_row$original$counter = row.original.counterpartyFilter) === null || _row$original$counter === void 0 ? void 0 : _row$original$counter.name
20619
- });
20620
- }
20635
+ cell: (row) => /* @__PURE__ */ jsx(Span, {
20636
+ ellipsis: true,
20637
+ children: getCategorizationRuleCounterpartyLabel(row.original)
20638
+ })
20621
20639
  },
20622
20640
  {
20623
20641
  id: CategorizationRuleColumns.Direction,
@@ -20708,7 +20726,7 @@ var CategorizationRulesHeader = ({ onGoBack }) => {
20708
20726
  };
20709
20727
  var resolveVariant$1 = ({ width }) => width < BREAKPOINTS.TABLET ? "Mobile" : "Desktop";
20710
20728
  var ResponsiveCategorizationRulesView = () => {
20711
- var _selectedRule$counter, _selectedRule$counter2;
20729
+ var _ref;
20712
20730
  const { t } = useTranslation();
20713
20731
  const [selectedRule, setSelectedRule] = useState(null);
20714
20732
  const [showDeletionConfirmationModal, setShowDeletionConfirmationModal] = useState(false);
@@ -20718,7 +20736,7 @@ var ResponsiveCategorizationRulesView = () => {
20718
20736
  const { data: categories, isLoading: categoriesAreLoading } = useCategories({ mode: CategoriesListMode.All });
20719
20737
  const options = useMemo(() => {
20720
20738
  if (!categories) return [];
20721
- return getLeafCategories$1(categories);
20739
+ return flattenCategories$2(categories);
20722
20740
  }, [categories]);
20723
20741
  const { data, hasMore, isLoading: rulesAreLoading, isError, size, setSize } = useListCategorizationRules({});
20724
20742
  const categorizationRules = useMemo(() => data === null || data === void 0 ? void 0 : data.flatMap(({ data }) => data), [data]);
@@ -20764,66 +20782,69 @@ var ResponsiveCategorizationRulesView = () => {
20764
20782
  ]);
20765
20783
  const isLoading = data === void 0 || rulesAreLoading || categoriesAreLoading;
20766
20784
  const { toBankTransactionsTable } = useBankTransactionsNavigation();
20785
+ const DesktopView = useMemo(() => /* @__PURE__ */ jsx(BaseDetailView, {
20786
+ slots: {
20787
+ Header: CategorizationRulesHeader,
20788
+ BackIcon: BackArrow
20789
+ },
20790
+ name: "CategorizationRulesDrawer",
20791
+ onGoBack: toBankTransactionsTable,
20792
+ children: /* @__PURE__ */ jsx(CategorizationRulesTable, {
20793
+ data: categorizationRules,
20794
+ isLoading,
20795
+ isError,
20796
+ paginationProps,
20797
+ options,
20798
+ onDeleteRule,
20799
+ slots: {
20800
+ EmptyState: CategorizationRulesEmptyState,
20801
+ ErrorState: CategorizationRulesErrorState
20802
+ }
20803
+ })
20804
+ }), [
20805
+ toBankTransactionsTable,
20806
+ categorizationRules,
20807
+ isLoading,
20808
+ isError,
20809
+ paginationProps,
20810
+ options,
20811
+ onDeleteRule
20812
+ ]);
20813
+ const MobileView = useMemo(() => /* @__PURE__ */ jsxs(VStack, {
20814
+ gap: "md",
20815
+ children: [/* @__PURE__ */ jsx(CategorizationRulesHeader, { onGoBack: toBankTransactionsTable }), /* @__PURE__ */ jsx(CategorizationRulesMobileList, {
20816
+ data: categorizationRules,
20817
+ isLoading,
20818
+ isError,
20819
+ paginationProps,
20820
+ options,
20821
+ onDeleteRule,
20822
+ slots: {
20823
+ EmptyState: CategorizationRulesEmptyState,
20824
+ ErrorState: CategorizationRulesErrorState
20825
+ }
20826
+ })]
20827
+ }), [
20828
+ toBankTransactionsTable,
20829
+ categorizationRules,
20830
+ isLoading,
20831
+ isError,
20832
+ paginationProps,
20833
+ options,
20834
+ onDeleteRule
20835
+ ]);
20836
+ const selectedRuleCounterpartyLabel = (_ref = selectedRule && getCategorizationRuleCounterpartyLabel(selectedRule)) !== null && _ref !== void 0 ? _ref : t("bankTransactions:label.selected_counterparty", "this counterparty");
20767
20837
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(ResponsiveComponent, {
20768
20838
  resolveVariant: resolveVariant$1,
20769
20839
  slots: {
20770
- Desktop: useMemo(() => /* @__PURE__ */ jsx(BaseDetailView, {
20771
- slots: {
20772
- Header: CategorizationRulesHeader,
20773
- BackIcon: BackArrow
20774
- },
20775
- name: "CategorizationRulesDrawer",
20776
- onGoBack: toBankTransactionsTable,
20777
- children: /* @__PURE__ */ jsx(CategorizationRulesTable, {
20778
- data: categorizationRules,
20779
- isLoading,
20780
- isError,
20781
- paginationProps,
20782
- options,
20783
- onDeleteRule,
20784
- slots: {
20785
- EmptyState: CategorizationRulesEmptyState,
20786
- ErrorState: CategorizationRulesErrorState
20787
- }
20788
- })
20789
- }), [
20790
- toBankTransactionsTable,
20791
- categorizationRules,
20792
- isLoading,
20793
- isError,
20794
- paginationProps,
20795
- options,
20796
- onDeleteRule
20797
- ]),
20798
- Mobile: useMemo(() => /* @__PURE__ */ jsxs(VStack, {
20799
- gap: "md",
20800
- children: [/* @__PURE__ */ jsx(CategorizationRulesHeader, { onGoBack: toBankTransactionsTable }), /* @__PURE__ */ jsx(CategorizationRulesMobileList, {
20801
- data: categorizationRules,
20802
- isLoading,
20803
- isError,
20804
- paginationProps,
20805
- options,
20806
- onDeleteRule,
20807
- slots: {
20808
- EmptyState: CategorizationRulesEmptyState,
20809
- ErrorState: CategorizationRulesErrorState
20810
- }
20811
- })]
20812
- }), [
20813
- toBankTransactionsTable,
20814
- categorizationRules,
20815
- isLoading,
20816
- isError,
20817
- paginationProps,
20818
- options,
20819
- onDeleteRule
20820
- ])
20840
+ Desktop: DesktopView,
20841
+ Mobile: MobileView
20821
20842
  }
20822
20843
  }), /* @__PURE__ */ jsx(BaseConfirmationModal, {
20823
20844
  isOpen: showDeletionConfirmationModal,
20824
20845
  onOpenChange: setShowDeletionConfirmationModal,
20825
20846
  title: t("categorizationRules:prompt.delete_categorization_rule", "Delete categorization rule?"),
20826
- 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: (_selectedRule$counter = selectedRule === null || selectedRule === void 0 || (_selectedRule$counter2 = selectedRule.counterpartyFilter) === null || _selectedRule$counter2 === void 0 ? void 0 : _selectedRule$counter2.name) !== null && _selectedRule$counter !== void 0 ? _selectedRule$counter : t("bankTransactions:label.selected_counterparty", "this counterparty") }),
20847
+ 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 }),
20827
20848
  onConfirm: archiveCategorizationRule,
20828
20849
  confirmLabel: t("common:action.delete_label", "Delete"),
20829
20850
  cancelLabel: t("common:action.cancel_label", "Cancel"),
@@ -24054,13 +24075,13 @@ var ProfitAndLossChartSelectionIndicator = ({ viewBox, selected }) => {
24054
24075
  const boxWidth = width + 2 * margin;
24055
24076
  const borderRadius = 6;
24056
24077
  return /* @__PURE__ */ jsx("rect", {
24057
- className: "Layer__profit-and-loss-chart__selection-indicator",
24078
+ className: "Layer__ProfitAndLossChart__SelectionIndicator",
24058
24079
  rx: borderRadius,
24059
24080
  ry: borderRadius,
24060
24081
  x: x - margin,
24061
- y: 16,
24082
+ y: 24,
24062
24083
  width: boxWidth,
24063
- height: "calc(100% - 30px)"
24084
+ height: "calc(100% - 38px)"
24064
24085
  });
24065
24086
  };
24066
24087
  //#endregion
@@ -24370,7 +24391,8 @@ var transformPnLData = ({ data, compactView, formatMonthName }) => {
24370
24391
  var CHART_MARGINS = {
24371
24392
  left: 12,
24372
24393
  right: 12,
24373
- bottom: 12
24394
+ bottom: 12,
24395
+ top: 24
24374
24396
  };
24375
24397
  var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
24376
24398
  var _getColor$hex, _getColor, _getColor$hex2, _getColor2, _getColor$hex3, _getColor3;
@@ -24444,9 +24466,9 @@ var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
24444
24466
  activationDate
24445
24467
  ]);
24446
24468
  return /* @__PURE__ */ jsxs("div", {
24447
- className: "Layer__chart-wrapper",
24469
+ className: "Layer__ProfitAndLossChart",
24448
24470
  children: [/* @__PURE__ */ jsx(ResponsiveContainer, {
24449
- className: "Layer__chart-container",
24471
+ className: "Layer__ProfitAndLossChart__Container",
24450
24472
  width: "100%",
24451
24473
  height: "100%",
24452
24474
  onResize: useCallback((width) => {
@@ -24458,7 +24480,7 @@ var ProfitAndLossChart = ({ tagFilter, hideLegend = false }) => {
24458
24480
  margin: CHART_MARGINS,
24459
24481
  data: dataOrPlaceholderData,
24460
24482
  onClick,
24461
- className: "Layer__profit-and-loss-chart",
24483
+ className: "Layer__profit-and-loss-chart Layer__ProfitAndLossChart__Chart",
24462
24484
  children: [
24463
24485
  /* @__PURE__ */ jsx(ProfitAndLossChartPatternDefs, {}),
24464
24486
  /* @__PURE__ */ jsx(ReferenceLine, {
@@ -24549,7 +24571,6 @@ var DetailedChart = ({ data, isLoading, interactionProps, stylingProps, slots })
24549
24571
  x: x + width / 2,
24550
24572
  textAnchor: "middle",
24551
24573
  verticalAnchor: "middle",
24552
- breakAll: true,
24553
24574
  maxLines: 2,
24554
24575
  width: Math.max(width - 40, 0),
24555
24576
  className: "Layer__DetailedChart__centerLabelTitle",
@@ -26606,7 +26627,7 @@ var SyncingBadge = () => {
26606
26627
  };
26607
26628
  //#endregion
26608
26629
  //#region src/components/ProfitAndLossHeader/ProfitAndLossHeader.tsx
26609
- var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker, withDownloadButton, withStatus = true, stringOverrides, dateSelectionMode = "full" }) => {
26630
+ var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker, withDownloadButton, withStatus = true, stringOverrides, dateSelectionMode = "full", trailingContent }) => {
26610
26631
  const { t } = useTranslation();
26611
26632
  const { data: linkedAccounts } = useLinkedAccounts();
26612
26633
  const { activePeriod } = useActiveBookkeepingPeriod();
@@ -26634,10 +26655,15 @@ var ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker,
26634
26655
  ]
26635
26656
  }), /* @__PURE__ */ jsxs(HStack, {
26636
26657
  gap: "xs",
26637
- children: [withDatePicker && /* @__PURE__ */ jsx(CombinedDateRangeSelection, {
26638
- mode: dateSelectionMode,
26639
- showLabels: false
26640
- }), withDownloadButton && /* @__PURE__ */ jsx(ProfitAndLossDownloadButton, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.downloadButton })]
26658
+ align: "center",
26659
+ children: [
26660
+ trailingContent,
26661
+ withDatePicker && /* @__PURE__ */ jsx(CombinedDateRangeSelection, {
26662
+ mode: dateSelectionMode,
26663
+ showLabels: false
26664
+ }),
26665
+ withDownloadButton && /* @__PURE__ */ jsx(ProfitAndLossDownloadButton, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.downloadButton })
26666
+ ]
26641
26667
  })]
26642
26668
  });
26643
26669
  };
@@ -40747,8 +40773,8 @@ var ProfitAndLossOverviewDetailedCharts = ({ variant, detailedChartsStringOverri
40747
40773
  label: (detailedChartsStringOverrides === null || detailedChartsStringOverrides === void 0 || (_detailedChartsString2 = detailedChartsStringOverrides.detailedChartStringOverrides) === null || _detailedChartsString2 === void 0 ? void 0 : _detailedChartsString2.expenseToggleLabel) || t("common:label.expenses", "Expenses")
40748
40774
  }];
40749
40775
  }, [detailedChartsStringOverrides, t]);
40750
- const chartsWrapperClassName = variant === "accounting" ? "Layer__accounting-overview-profit-and-loss-charts" : "Layer__bookkeeping-overview-profit-and-loss-charts";
40751
- const chartContainerName = variant === "accounting" ? "accounting-overview-profit-and-loss-chart" : "bookkeeping-overview-profit-and-loss-chart";
40776
+ const chartsWrapperClassName = variant === "accounting" ? "Layer__AccountingOverview__ProfitAndLossCharts" : "Layer__BookkeepingOverview__ProfitAndLossCharts";
40777
+ const chartContainerName = variant === "accounting" ? "AccountingOverview__ProfitAndLossChart" : "BookkeepingOverview__ProfitAndLossChart";
40752
40778
  return /* @__PURE__ */ jsxs(VStack, {
40753
40779
  className: chartsWrapperClassName,
40754
40780
  gap: "md",
@@ -40789,6 +40815,49 @@ var ProfitAndLossOverviewDetailedCharts = ({ variant, detailedChartsStringOverri
40789
40815
  });
40790
40816
  };
40791
40817
  //#endregion
40818
+ //#region src/components/ProfitAndLossSummaryCard/PnlLegend.tsx
40819
+ var Swatch$1 = ({ className }) => /* @__PURE__ */ jsx("span", {
40820
+ className: `Layer__PnlLegend__Swatch ${className}`,
40821
+ "aria-hidden": true
40822
+ });
40823
+ var PnlLegend = ({ direction = "row" }) => {
40824
+ const { t } = useTranslation();
40825
+ return /* @__PURE__ */ jsxs(Stack, {
40826
+ className: "Layer__PnlLegend",
40827
+ direction,
40828
+ align: "start",
40829
+ gap: direction === "row" ? "md" : "2xs",
40830
+ pis: direction === "column" ? "md" : void 0,
40831
+ pbe: direction === "column" ? "md" : void 0,
40832
+ children: [
40833
+ /* @__PURE__ */ jsxs(HStack, {
40834
+ gap: "2xs",
40835
+ align: "center",
40836
+ children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--income" }), /* @__PURE__ */ jsx(Span, {
40837
+ size: "sm",
40838
+ children: t("common:label.revenue", "Revenue")
40839
+ })]
40840
+ }),
40841
+ /* @__PURE__ */ jsxs(HStack, {
40842
+ gap: "2xs",
40843
+ align: "center",
40844
+ children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--expenses" }), /* @__PURE__ */ jsx(Span, {
40845
+ size: "sm",
40846
+ children: t("common:label.expenses", "Expenses")
40847
+ })]
40848
+ }),
40849
+ /* @__PURE__ */ jsxs(HStack, {
40850
+ gap: "2xs",
40851
+ align: "center",
40852
+ children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--uncategorized" }), /* @__PURE__ */ jsx(Span, {
40853
+ size: "sm",
40854
+ children: t("common:label.uncategorized", "Uncategorized")
40855
+ })]
40856
+ })
40857
+ ]
40858
+ });
40859
+ };
40860
+ //#endregion
40792
40861
  //#region src/views/AccountingOverview/AccountingOverview.tsx
40793
40862
  var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, onboardingStepOverride = void 0, onTransactionsToReviewClick, middleBanner, chartColorsList, stringOverrides, tagFilter = void 0, slotProps }) => {
40794
40863
  var _slotProps$profitAndL, _stringOverrides$prof, _stringOverrides$prof2;
@@ -40803,6 +40872,7 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
40803
40872
  } : void 0,
40804
40873
  children: /* @__PURE__ */ jsxs(View, {
40805
40874
  title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.accounting_overview", "Accounting overview"),
40875
+ viewClassName: "Layer__AccountingOverview",
40806
40876
  showHeader: showTitle,
40807
40877
  header: /* @__PURE__ */ jsx(Header$2, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
40808
40878
  children: [
@@ -40818,11 +40888,19 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
40818
40888
  }),
40819
40889
  /* @__PURE__ */ jsxs(Container, {
40820
40890
  name: "accounting-overview-profit-and-loss",
40891
+ className: "Layer__AccountingOverview__ProfitAndLossContainer",
40821
40892
  asWidget: true,
40822
- children: [/* @__PURE__ */ jsx(ProfitAndLoss.Header, { text: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.header) || t("common:label.profit_loss", "Profit & Loss") }), /* @__PURE__ */ jsx(ProfitAndLoss.Chart, { tagFilter: tagFilter ? {
40823
- key: tagFilter.tagKey,
40824
- values: tagFilter.tagValues
40825
- } : void 0 })]
40893
+ children: [/* @__PURE__ */ jsx(ProfitAndLoss.Header, {
40894
+ text: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.header) || t("common:label.profit_loss", "Profit & Loss"),
40895
+ className: "Layer__AccountingOverview__ProfitAndLossHeader",
40896
+ trailingContent: /* @__PURE__ */ jsx(PnlLegend, { direction: "row" })
40897
+ }), /* @__PURE__ */ jsx(ProfitAndLoss.Chart, {
40898
+ tagFilter: tagFilter ? {
40899
+ key: tagFilter.tagKey,
40900
+ values: tagFilter.tagValues
40901
+ } : void 0,
40902
+ hideLegend: true
40903
+ })]
40826
40904
  }),
40827
40905
  middleBanner && /* @__PURE__ */ jsx(Container, {
40828
40906
  name: "accounting-overview-middle-banner",
@@ -41325,7 +41403,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
41325
41403
  return /* @__PURE__ */ jsxs(ProfitAndLoss, {
41326
41404
  asContainer: false,
41327
41405
  children: [/* @__PURE__ */ jsxs(View, {
41328
- viewClassName: "Layer__bookkeeping-overview--view",
41406
+ viewClassName: "Layer__bookkeeping-overview--view Layer__BookkeepingOverview",
41329
41407
  title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.bookkeeping_overview", "Bookkeeping overview"),
41330
41408
  header: /* @__PURE__ */ jsx(Header$2, { children: /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
41331
41409
  withSidebar: width > 1100,
@@ -41362,6 +41440,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
41362
41440
  onClick: () => upperElementInFocus.current = false,
41363
41441
  children: /* @__PURE__ */ jsxs(Container, {
41364
41442
  name: "bookkeeping-overview-profit-and-loss",
41443
+ className: "Layer__BookkeepingOverview__ProfitAndLossContainer",
41365
41444
  asWidget: true,
41366
41445
  style: {
41367
41446
  position: "relative",
@@ -41370,7 +41449,8 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
41370
41449
  children: [
41371
41450
  /* @__PURE__ */ jsx(ProfitAndLoss.Header, {
41372
41451
  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"),
41373
- withStatus: true
41452
+ withStatus: true,
41453
+ trailingContent: /* @__PURE__ */ jsx(PnlLegend, { direction: "row" })
41374
41454
  }),
41375
41455
  /* @__PURE__ */ jsx(VStack, {
41376
41456
  pb: "md",
@@ -41381,7 +41461,7 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
41381
41461
  variants: profitAndLossSummariesVariants
41382
41462
  })
41383
41463
  }),
41384
- /* @__PURE__ */ jsx(ProfitAndLoss.Chart, {})
41464
+ /* @__PURE__ */ jsx(ProfitAndLoss.Chart, { hideLegend: true })
41385
41465
  ]
41386
41466
  })
41387
41467
  }),
@@ -43493,11 +43573,13 @@ var SummaryCard = ({ slots, children, className }) => {
43493
43573
  });
43494
43574
  };
43495
43575
  //#endregion
43496
- //#region src/hooks/utils/i18n/useGlobalMonthSubtitle.ts
43497
- var useGlobalMonthSubtitle = () => {
43576
+ //#region src/hooks/utils/i18n/useGlobalDateFormatter.ts
43577
+ var useGlobalDateFormatter = () => {
43498
43578
  const { formatDate } = useIntlFormatter();
43499
- const { date } = useGlobalDate({ dateSelectionMode: "month" });
43500
- return formatDate(date, MonthYearPattern.MonthYear);
43579
+ const { date } = useGlobalDate();
43580
+ return useCallback((format) => {
43581
+ return formatDate(date, format);
43582
+ }, [date, formatDate]);
43501
43583
  };
43502
43584
  //#endregion
43503
43585
  //#region src/components/ui/SummaryCard/ExpandSummaryCardButton.tsx
@@ -43512,9 +43594,9 @@ function ExpandSummaryCardButton({ callback, ariaLabel }) {
43512
43594
  }
43513
43595
  //#endregion
43514
43596
  //#region src/components/ui/SummaryCard/useSummaryCardSlots.tsx
43515
- var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, stringOverrides }) => {
43597
+ var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, subtitleDateFormat = DateFormat.MonthYear, stringOverrides }) => {
43516
43598
  const { t } = useTranslation();
43517
- const subtitle = useGlobalMonthSubtitle();
43599
+ const formatGlobalDate = useGlobalDateFormatter();
43518
43600
  const { onClickExpand } = interactionProps !== null && interactionProps !== void 0 ? interactionProps : {};
43519
43601
  return useMemo(() => {
43520
43602
  var _stringOverrides$titl;
@@ -43524,14 +43606,15 @@ var useSummaryCardSlots = ({ defaultTitle, legend, interactionProps, stringOverr
43524
43606
  }) : void 0;
43525
43607
  return {
43526
43608
  title: (_stringOverrides$titl = stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) !== null && _stringOverrides$titl !== void 0 ? _stringOverrides$titl : defaultTitle,
43527
- subtitle,
43609
+ subtitle: formatGlobalDate(subtitleDateFormat),
43528
43610
  legend,
43529
43611
  primaryAction
43530
43612
  };
43531
43613
  }, [
43532
43614
  stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title,
43533
43615
  defaultTitle,
43534
- subtitle,
43616
+ subtitleDateFormat,
43617
+ formatGlobalDate,
43535
43618
  legend,
43536
43619
  onClickExpand,
43537
43620
  t
@@ -43646,55 +43729,13 @@ var MileageTrackingSummary = ({ stringOverrides, interactionProps } = {}) => {
43646
43729
  slots: useSummaryCardSlots({
43647
43730
  defaultTitle: t("mileageTracking:label.mileage_tracking", "Mileage Tracking"),
43648
43731
  interactionProps,
43649
- stringOverrides
43732
+ stringOverrides,
43733
+ subtitleDateFormat: DateFormat.Year
43650
43734
  }),
43651
43735
  children: /* @__PURE__ */ jsx(Content$1, {})
43652
43736
  });
43653
43737
  };
43654
43738
  //#endregion
43655
- //#region src/components/ProfitAndLossSummaryCard/PnlLegend.tsx
43656
- var Swatch$1 = ({ className }) => /* @__PURE__ */ jsx("span", {
43657
- className: `Layer__PnlLegend__Swatch ${className}`,
43658
- "aria-hidden": true
43659
- });
43660
- var PnlLegend = ({ direction = "row" }) => {
43661
- const { t } = useTranslation();
43662
- return /* @__PURE__ */ jsxs(Stack, {
43663
- className: "Layer__PnlLegend",
43664
- direction,
43665
- align: "start",
43666
- gap: direction === "row" ? "md" : "2xs",
43667
- pis: direction === "column" ? "md" : void 0,
43668
- pbe: direction === "column" ? "md" : void 0,
43669
- children: [
43670
- /* @__PURE__ */ jsxs(HStack, {
43671
- gap: "2xs",
43672
- align: "center",
43673
- children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--income" }), /* @__PURE__ */ jsx(Span, {
43674
- size: "sm",
43675
- children: t("common:label.revenue", "Revenue")
43676
- })]
43677
- }),
43678
- /* @__PURE__ */ jsxs(HStack, {
43679
- gap: "2xs",
43680
- align: "center",
43681
- children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--expenses" }), /* @__PURE__ */ jsx(Span, {
43682
- size: "sm",
43683
- children: t("common:label.expenses", "Expenses")
43684
- })]
43685
- }),
43686
- /* @__PURE__ */ jsxs(HStack, {
43687
- gap: "2xs",
43688
- align: "center",
43689
- children: [/* @__PURE__ */ jsx(Swatch$1, { className: "Layer__PnlLegend__Swatch--uncategorized" }), /* @__PURE__ */ jsx(Span, {
43690
- size: "sm",
43691
- children: t("common:label.uncategorized", "Uncategorized")
43692
- })]
43693
- })
43694
- ]
43695
- });
43696
- };
43697
- //#endregion
43698
43739
  //#region src/components/ProfitAndLossSummaryCard/ProfitAndLossSummaryCard.tsx
43699
43740
  var ProfitAndLossSummaryCard = ({ interactionProps, stringOverrides, className }) => {
43700
43741
  const { t } = useTranslation();
@@ -43876,33 +43917,39 @@ var getOnboardingBannerState = ({ isLoading, hasLinkedAccounts, hasSavedTaxProfi
43876
43917
  var NoBankAccountsLinkedBanner = () => {
43877
43918
  const { addConnection } = useContext(LinkedAccountsContext);
43878
43919
  const { isMobile } = useSizeClass();
43920
+ const { t } = useTranslation();
43879
43921
  const handleLinkBankAccounts = useCallback(() => {
43880
43922
  addConnection("PLAID");
43881
43923
  }, [addConnection]);
43924
+ const Icon = isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 });
43925
+ const title = t("linkedAccounts:label.link_your_bank_accounts", "Link your bank accounts");
43882
43926
  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.",
43927
+ title,
43928
+ description: t("linkedAccounts:label.link_your_bank_accounts_description", "Linking your bank accounts allows us to load your bank transactions and automatically categorize them."),
43885
43929
  slots: {
43886
- Icon: isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 }),
43930
+ Icon,
43887
43931
  Button: /* @__PURE__ */ jsx(Button$1, {
43888
43932
  onPress: handleLinkBankAccounts,
43889
43933
  variant: "outlined-light",
43890
- children: "Link your bank accounts"
43934
+ children: title
43891
43935
  })
43892
43936
  }
43893
43937
  });
43894
43938
  };
43895
43939
  var NoTaxProfileBanner = ({ onSetupTaxProfile }) => {
43896
43940
  const { isMobile } = useSizeClass();
43941
+ const { t } = useTranslation();
43942
+ const Icon = isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 });
43943
+ const title = t("taxEstimates:label.set_up_your_tax_profile", "Set up your tax profile");
43897
43944
  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.",
43945
+ title,
43946
+ 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."),
43900
43947
  slots: {
43901
- Icon: isMobile ? null : /* @__PURE__ */ jsx(Info, { size: 16 }),
43948
+ Icon,
43902
43949
  Button: onSetupTaxProfile ? /* @__PURE__ */ jsx(Button$1, {
43903
43950
  onPress: onSetupTaxProfile,
43904
43951
  variant: "outlined-light",
43905
- children: "Setup your tax profile"
43952
+ children: title
43906
43953
  }) : null
43907
43954
  }
43908
43955
  });
@@ -44258,8 +44305,8 @@ var TaxEstimatesSummaryCardNegativeOrZero = () => {
44258
44305
  return /* @__PURE__ */ jsx(DataState, {
44259
44306
  className: "Layer__TaxEstimatesSummaryCard__DataState Layer__data-state--reset",
44260
44307
  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.")
44308
+ title: t("taxEstimates:empty.tax_due_is_negative_or_zero", "No taxes owed this year"),
44309
+ 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.")
44263
44310
  });
44264
44311
  };
44265
44312
  //#endregion
@@ -44520,7 +44567,8 @@ var TaxEstimatesSummaryCard = ({ mode = TaxEstimatesSummaryCardMode.PieChart, in
44520
44567
  const slots = useSummaryCardSlots({
44521
44568
  defaultTitle,
44522
44569
  interactionProps,
44523
- stringOverrides
44570
+ stringOverrides,
44571
+ subtitleDateFormat: DateFormat.Year
44524
44572
  });
44525
44573
  return /* @__PURE__ */ jsx(SummaryCard, {
44526
44574
  className: classNames("Layer__TaxEstimatesSummaryCard", isSummaryCardLayout && "Layer__TaxEstimatesSummaryCard--summaryCard"),