@layerfi/components 0.1.135 → 0.1.136-alpha

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.
@@ -27,7 +27,7 @@ import { Text } from "react-aria-components/Text";
27
27
  import { mergeRefs } from "react-merge-refs";
28
28
  import useResizeObserver from "@react-hook/resize-observer";
29
29
  import { Button } from "react-aria-components/Button";
30
- import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, ArrowUpRight, Briefcase, Car, Check, CheckCircle, CheckIcon, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, Filter, HandCoins, Hourglass, Info, Layers2Icon, List, LoaderCircle, Lock, Menu, MenuIcon, Minus, PencilRuler, Play, Plus, RefreshCcw, RotateCcw, Save, Search, SearchX, Trash, Trash2, TriangleAlert, UploadCloud, UserRoundPen, Video, X, XCircle, XIcon } from "lucide-react";
30
+ import { AlertCircle, AlertTriangle, Archive, ArchiveRestore, ArrowRight, ArrowUpRight, Briefcase, Car, Check, CheckCircle, CheckIcon, ChevronDown, ChevronLeft, ChevronRight, Circle, Clock, Clock3, CopyIcon, Download, Edit, ExternalLink, FileDownIcon, FileSpreadsheet, FileText, Filter, HandCoins, Hourglass, Info, Layers2Icon, List, LoaderCircle, Lock, Menu, MenuIcon, Minus, PencilRuler, Play, Plus, RefreshCcw, RotateCcw, Save, Search, SearchX, Trash, Trash2, TriangleAlert, UploadCloud, UserRoundPen, Video, X, XCircle, XIcon } from "lucide-react";
31
31
  import { DurationFormat } from "@formatjs/intl-durationformat";
32
32
  import { Dialog, DialogTrigger } from "react-aria-components/Dialog";
33
33
  import { Modal, ModalOverlay } from "react-aria-components/Modal";
@@ -64,8 +64,9 @@ import { Bar, BarChart, CartesianGrid, Cell as Cell$1, ComposedChart, DefaultZIn
64
64
  import { createPortal } from "react-dom";
65
65
  import { PopupModal, useCalendlyEventListener } from "react-calendly";
66
66
  import { Meter } from "react-aria-components/Meter";
67
- import { Collection } from "react-aria-components/Collection";
68
67
  import { Tree, TreeItem, TreeItemContent } from "react-aria-components/Tree";
68
+ import { Collection } from "react-aria-components/Collection";
69
+ import { ListBox, ListBoxItem, ListBoxSection } from "react-aria-components/ListBox";
69
70
  import { Breadcrumb, Breadcrumbs } from "react-aria-components/Breadcrumbs";
70
71
  import { Link } from "react-aria-components/Link";
71
72
  //#region \0rolldown/runtime.js
@@ -255,7 +256,7 @@ var getIntlLocale = (locale) => {
255
256
  };
256
257
  var package_default = {
257
258
  name: "@layerfi/components",
258
- version: "0.1.135",
259
+ version: "0.1.136-alpha",
259
260
  description: "Layer React Components",
260
261
  main: "dist/cjs/index.cjs",
261
262
  module: "dist/esm/index.mjs",
@@ -700,7 +701,7 @@ function _requestOAuthToken() {
700
701
  return _requestOAuthToken.apply(this, arguments);
701
702
  }
702
703
  var AUTH_TAG_KEY = "#auth";
703
- function buildKey$89({ appId, appSecret, businessAccessToken, apiUrl, authUrl, scope }) {
704
+ function buildKey$90({ appId, appSecret, businessAccessToken, apiUrl, authUrl, scope }) {
704
705
  if (businessAccessToken) return {
705
706
  apiUrl,
706
707
  businessAccessToken,
@@ -723,7 +724,7 @@ var FALLBACK_REFRESH_MS = DEFAULT_EXPIRES_IN_SECONDS / 2 * 1e3;
723
724
  function useAuth() {
724
725
  const { apiUrl, authUrl, scope } = useEnvironment();
725
726
  const { appId, appSecret, businessAccessToken } = useAuthInput();
726
- return useSWR(() => buildKey$89({
727
+ return useSWR(() => buildKey$90({
727
728
  appId,
728
729
  appSecret,
729
730
  businessAccessToken,
@@ -771,7 +772,7 @@ var useLayerContext = () => {
771
772
  var BANK_ACCOUNTS_TAG_KEY = "#bank-accounts";
772
773
  var requiresNotification = (bankAccount) => bankAccount.is_disconnected && bankAccount.notify_when_disconnected;
773
774
  var listBankAccounts = get(({ businessId }) => `/v1/businesses/${businessId}/bank-accounts`);
774
- function buildKey$88({ access_token: accessToken, apiUrl, businessId }) {
775
+ function buildKey$89({ access_token: accessToken, apiUrl, businessId }) {
775
776
  if (accessToken && apiUrl) return {
776
777
  accessToken,
777
778
  apiUrl,
@@ -792,7 +793,7 @@ function useListBankAccounts() {
792
793
  const { businessId } = useLayerContext();
793
794
  const { apiUrl } = useEnvironment();
794
795
  const { data: auth } = useAuth();
795
- return new ListBankAccountsSWRResponse(useSWR(() => buildKey$88(_objectSpread2(_objectSpread2({}, auth), {}, {
796
+ return new ListBankAccountsSWRResponse(useSWR(() => buildKey$89(_objectSpread2(_objectSpread2({}, auth), {}, {
796
797
  apiUrl,
797
798
  businessId
798
799
  })), ({ accessToken, apiUrl, businessId }) => listBankAccounts(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => data)));
@@ -1180,6 +1181,7 @@ var common_default$1 = {
1180
1181
  "accounting": "Accounting",
1181
1182
  "ach": "ACH",
1182
1183
  "address": "Address",
1184
+ "all": "All",
1183
1185
  "amount": "Amount",
1184
1186
  "assets": "Assets",
1185
1187
  "balance": "Balance",
@@ -1447,6 +1449,7 @@ var invoices_default$1 = {
1447
1449
  action: {
1448
1450
  "add_line_item": "Add line item",
1449
1451
  "create_invoice": "Create Invoice",
1452
+ "download_pdf": "Download PDF",
1450
1453
  "mark_paid": "Mark as paid",
1451
1454
  "mark_void": "Mark as void",
1452
1455
  "record_invoice_payment": "Record invoice payment",
@@ -1466,6 +1469,7 @@ var invoices_default$1 = {
1466
1469
  },
1467
1470
  error: {
1468
1471
  "couldnt_load_invoices": "We couldn’t load your invoices",
1472
+ "download_failed": "Download failed",
1469
1473
  "load_invoices": "An error occurred while loading your invoices. Please check your connection and try again.",
1470
1474
  "load_payment_methods": "We couldn't load payment methods",
1471
1475
  "refund_invoice": "There was an error issuing a refund for this invoice. Please check your connection and try again in a few seconds.",
@@ -1483,6 +1487,8 @@ var invoices_default$1 = {
1483
1487
  "custom": "Custom",
1484
1488
  "custom_payment_instructions": "Custom Payment Instructions",
1485
1489
  "discount": "Discount",
1490
+ "download_started": "Download started",
1491
+ "download_successful": "Download successful",
1486
1492
  "due_date": "Due date",
1487
1493
  "editing_invoice": "Editing Invoice",
1488
1494
  "editing_invoice_number": "Editing Invoice #{{invoiceNumber}}",
@@ -1492,6 +1498,7 @@ var invoices_default$1 = {
1492
1498
  "invoice_number_component": "<label>Invoice</label> <value>#{{invoiceNumber}}</value>",
1493
1499
  "invoice_number_label": "Invoice number",
1494
1500
  "invoice_paid_successfully": "Invoice paid successfully",
1501
+ "invoice_saved": "Invoice saved",
1495
1502
  "invoice_saved_and_sent_successfully": "Invoice saved and sent successfully",
1496
1503
  "invoices": "Invoices",
1497
1504
  "net_10": "Net 10",
@@ -1727,9 +1734,11 @@ var reports_default$1 = {
1727
1734
  "load_reports_navigation": "Something went wrong while loading this navigation. Please try again."
1728
1735
  },
1729
1736
  label: {
1737
+ "accrual": "Accrual",
1730
1738
  "adjustments_net_income": "Adjustments to Net Income",
1731
1739
  "assets": "Assets",
1732
1740
  "balance_sheet": "Balance Sheet",
1741
+ "cash": "Cash",
1733
1742
  "cash_beginning_of_period": "Cash at Beginning of Period",
1734
1743
  "cash_end_of_period": "Cash at End of Period",
1735
1744
  "cash_flow_statement": "Cash Flow Statement",
@@ -1749,9 +1758,11 @@ var reports_default$1 = {
1749
1758
  "profit_loss_detail_report": "Profit and Loss Detail Report",
1750
1759
  "report_period": "Report period",
1751
1760
  "report_type": "Report type",
1761
+ "reporting_basis": "Reporting basis",
1752
1762
  "reports": "Reports",
1753
1763
  "reports_navigation": "Reports navigation",
1754
1764
  "select_report": "Select report",
1765
+ "switch_report": "Switch report",
1755
1766
  "total_display_name": "Total of {{displayName}}"
1756
1767
  }
1757
1768
  };
@@ -2001,7 +2012,6 @@ var timeTracking_default$1 = {
2001
2012
  };
2002
2013
  var trips_default$1 = {
2003
2014
  action: {
2004
- "add_trip": "Add Trip",
2005
2015
  "delete_trip": "Delete Trip",
2006
2016
  "edit_trip": "Edit Trip",
2007
2017
  "record_trip": "Record Trip",
@@ -2267,7 +2277,7 @@ var bankTransactions_default = {
2267
2277
  "split_transaction": "Répartir la transaction",
2268
2278
  "uncategorize_all": "Tout décatégoriser",
2269
2279
  "upload_receipt": "Téléverser un reçu",
2270
- "upload_transactions_manually": "Téléverser des transactions manuellement"
2280
+ "upload_transactions_manually": "Importer les transactions manuellement"
2271
2281
  },
2272
2282
  empty: {
2273
2283
  "no_categorized_transactions": "Vous n’avez aucune transaction catégorisée",
@@ -2282,7 +2292,7 @@ var bankTransactions_default = {
2282
2292
  "approval_failed_check_connection": "L’approbation a échoué. Vérifiez la connexion et réessayez dans quelques secondes.",
2283
2293
  "categorize_transactions": "Échec de la catégorisation des transactions",
2284
2294
  "confirm_transactions": "Échec de la confirmation des transactions",
2285
- "couldnt_load_transactions": "Nous n’avons pas pu charger vos transactions",
2295
+ "couldnt_load_transactions": "Nous n’avons pas réussi à récupérer vos transactions",
2286
2296
  "delete": "Échec de la suppression",
2287
2297
  "download_retry": "Le téléchargement a échoué, veuillez réessayer",
2288
2298
  "matching_transactions_not_found": "Nous n’avons pas trouvé de transactions correspondantes",
@@ -2300,14 +2310,14 @@ var bankTransactions_default = {
2300
2310
  "affected_transactions": "Transactions concernées",
2301
2311
  "all_categories_uppercase": "TOUTES LES CATÉGORIES",
2302
2312
  "all_done": "Tout est terminé",
2303
- "bank_transactions": "Transactions bancaires",
2313
+ "bank_transactions": "Activité bancaire",
2304
2314
  "categorization_status": "État de la catégorisation",
2305
2315
  "categorize_count_selected_one": "Cette action catégorisera {{displayCount}} transaction sélectionnée dans la catégorie {{category}}.",
2306
2316
  "categorize_count_selected_other": "Cette action catégorisera {{displayCount}} transactions sélectionnées dans la catégorie {{category}}.",
2307
2317
  "categorized": "Catégorisé",
2308
2318
  "count_transactions_will_be_skipped_one": "{{displayCount}} transaction sera ignorée en raison de l’absence de catégorie.",
2309
2319
  "count_transactions_will_be_skipped_other": "{{displayCount}} transactions seront ignorées en raison de l’absence de catégorie.",
2310
- "data_on_platform_categorize": "Une fois vos données sur la plateforme, catégorisez-les dans l’onglet Transactions bancaires",
2320
+ "data_on_platform_categorize": "Une fois vos données sur la plateforme, catégorisez-les dans l’onglet Activité bancaire",
2311
2321
  "find_match": "Trouver une correspondance",
2312
2322
  "generating_suggestions": "Génération des suggestions...",
2313
2323
  "generating_suggestions_transaction": "Génération de suggestions pour la transaction...",
@@ -2340,7 +2350,7 @@ var bankTransactions_default = {
2340
2350
  "transfer_uppercase": "VIREMENT",
2341
2351
  "uncategorize_count_selected_one": "Cette action décatégorisera {{displayCount}} transaction sélectionnée.",
2342
2352
  "uncategorize_count_selected_other": "Cette action décatégorisera {{displayCount}} transactions sélectionnées.",
2343
- "upload_transactions_or_wait_for_bank_sync": "Téléversez vos transactions ou attendez qu’elles soient synchronisées depuis votre banque."
2353
+ "upload_transactions_or_wait_for_bank_sync": "Importez vos transactions ou attendez qu’elles soient synchronisées depuis votre banque"
2344
2354
  },
2345
2355
  prompt: {
2346
2356
  "categorize_selected_transactions": "Catégoriser toutes les transactions sélectionnées?",
@@ -2368,7 +2378,6 @@ var bookkeeping_default = {
2368
2378
  "bookkeeping_tasks": "Tâches de tenue de livres",
2369
2379
  "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.",
2370
2380
  "completed_over_total_done_one": "<completed>{{displayCompletedTaskCount}}</completed>/{{displayTotalTaskCount}} terminée",
2371
- "completed_over_total_done_many": "",
2372
2381
  "completed_over_total_done_other": "<completed>{{displayCompletedTaskCount}}</completed>/{{displayTotalTaskCount}} terminées",
2373
2382
  "count_open_tasks_one": "{{displayCount}} tâche ouverte en {{displayYear}}",
2374
2383
  "count_open_tasks_other": "{{displayCount}} tâches ouvertes en {{displayYear}}",
@@ -2576,7 +2585,7 @@ var common_default = {
2576
2585
  "download_label": "Télécharger",
2577
2586
  "edit_details": "Modifier les détails",
2578
2587
  "edit_label": "Modifier",
2579
- "expand_all": "Développer tout",
2588
+ "expand_all": "Tout développer",
2580
2589
  "link_label": "Lier",
2581
2590
  "manage_label": "Gérer",
2582
2591
  "post_label": "Comptabiliser",
@@ -2599,9 +2608,9 @@ var common_default = {
2599
2608
  },
2600
2609
  empty: { "results": "Aucun résultat trouvé" },
2601
2610
  error: {
2602
- "couldnt_load_data": "Nous n’avons pas pu charger vos données.",
2611
+ "couldnt_load_data": "Nous n’avons pas réussi à récupérer vos données.",
2603
2612
  "download_failed_check_connection": "Le téléchargement a échoué. Vérifiez votre connexion et réessayez dans quelques secondes.",
2604
- "load_options": "Échec du chargement des options",
2613
+ "load_options": "Le chargement des options a échoué",
2605
2614
  "please_try_again": "Veuillez réessayer.",
2606
2615
  "please_try_again_later": "Veuillez réessayer plus tard",
2607
2616
  "saving": "Erreur lors de l’enregistrement",
@@ -2615,11 +2624,12 @@ var common_default = {
2615
2624
  "accounting": "Comptabilité",
2616
2625
  "ach": "ACH",
2617
2626
  "address": "Adresse",
2627
+ "all": "Tous",
2618
2628
  "amount": "Montant",
2619
2629
  "assets": "Actifs",
2620
2630
  "balance": "Solde",
2621
2631
  "bulk_actions": "Actions groupées",
2622
- "business": "Entreprise",
2632
+ "business": "Commerce",
2623
2633
  "cash": "Espèces",
2624
2634
  "category": "Catégorie",
2625
2635
  "check": "Chèque",
@@ -2882,6 +2892,7 @@ var invoices_default = {
2882
2892
  action: {
2883
2893
  "add_line_item": "Ajouter une ligne",
2884
2894
  "create_invoice": "Créer une facture",
2895
+ "download_pdf": "Télécharger le PDF",
2885
2896
  "mark_paid": "Marquer comme payée",
2886
2897
  "mark_void": "Marquer comme annulée",
2887
2898
  "record_invoice_payment": "Enregistrer le paiement de la facture",
@@ -2900,7 +2911,8 @@ var invoices_default = {
2900
2911
  "invoices_filtered": "Nous n’avons trouvé aucune facture avec les filtres actuels. Essayez de les modifier ou de les effacer pour voir plus de résultats."
2901
2912
  },
2902
2913
  error: {
2903
- "couldnt_load_invoices": "Nous n’avons pas pu charger vos factures",
2914
+ "couldnt_load_invoices": "Nous n’avons pas réussi à récupérer vos factures",
2915
+ "download_failed": "Échec du téléchargement",
2904
2916
  "load_invoices": "Une erreur s’est produite lors du chargement de vos factures. Veuillez vérifier votre connexion et réessayer.",
2905
2917
  "load_payment_methods": "Nous n’avons pas pu charger les modes de paiement",
2906
2918
  "refund_invoice": "Une erreur s’est produite lors de l’émission d’un remboursement pour cette facture. Veuillez vérifier votre connexion et réessayer dans quelques secondes.",
@@ -2918,6 +2930,8 @@ var invoices_default = {
2918
2930
  "custom": "Personnalisé",
2919
2931
  "custom_payment_instructions": "Instructions de paiement personnalisées",
2920
2932
  "discount": "Rabais",
2933
+ "download_started": "Téléchargement démarré",
2934
+ "download_successful": "Téléchargement réussi",
2921
2935
  "due_date": "Date d’échéance",
2922
2936
  "editing_invoice": "Modification de la facture",
2923
2937
  "editing_invoice_number": "Modification de la facture #{{invoiceNumber}}",
@@ -2927,6 +2941,7 @@ var invoices_default = {
2927
2941
  "invoice_number_component": "<label>Facture</label> <value>#{{invoiceNumber}}</value>",
2928
2942
  "invoice_number_label": "Numéro de facture",
2929
2943
  "invoice_paid_successfully": "Facture payée avec succès",
2944
+ "invoice_saved": "Facture enregistrée",
2930
2945
  "invoice_saved_and_sent_successfully": "Facture enregistrée et envoyée avec succès",
2931
2946
  "invoices": "Factures",
2932
2947
  "net_10": "Net 10",
@@ -2937,7 +2952,7 @@ var invoices_default = {
2937
2952
  "number_abbreviation": "N°",
2938
2953
  "open_balance": "Solde impayé",
2939
2954
  "overdue_invoices_count": "Factures en retard : {{overdueCount}}",
2940
- "owed_last_12_months": "<owed>Montant dû</owed> <period>12 derniers mois</period>",
2955
+ "owed_last_12_months": "<owed>Ce qui vous est dû</owed> <period>12 derniers mois</period>",
2941
2956
  "paid_last_30_days": "<paid>Payé</paid> <period>30 derniers jours</period>",
2942
2957
  "payment_date": "Date du paiement",
2943
2958
  "payment_details": "Détails du paiement",
@@ -2956,8 +2971,8 @@ var invoices_default = {
2956
2971
  "reset_invoice_warning": "La réinitialisation de cette facture supprimera tous les paiements, remboursements et radiations qui y sont associés et la remettra à l’état envoyé.",
2957
2972
  "search_invoices": "Rechercher des factures",
2958
2973
  "sent_date": "Date d’envoi",
2959
- "status_filter": "Filtre d’état",
2960
- "status_with_label": "État : {{label}}",
2974
+ "status_filter": "Filtre de statut",
2975
+ "status_with_label": "Statut : {{label}}",
2961
2976
  "subtotal": "Sous-total",
2962
2977
  "tax_rate": "Taux d’imposition",
2963
2978
  "tax_rate_title_case": "Taux d’imposition",
@@ -3010,8 +3025,8 @@ var invoices_default = {
3010
3025
  };
3011
3026
  var landingPage_default = {
3012
3027
  action: {
3013
- "book_call": "Réserver un appel",
3014
- "learn_more": "En savoir plus"
3028
+ "book_call": "Planifier un appel",
3029
+ "learn_more": "Découvrir plus"
3015
3030
  },
3016
3031
  label: {
3017
3032
  "all_finances_in_one_place": "Toutes vos finances en un seul endroit",
@@ -3034,7 +3049,7 @@ var landingPage_default = {
3034
3049
  "track_business_finances_within_platform": "Suivez les finances de votre entreprise, directement dans {{platformName}}.",
3035
3050
  "track_expenses_and_get_reports": "Suivez vos dépenses et obtenez des rapports faciles à comprendre, conçus spécialement pour les entreprises du secteur {{industry}}.",
3036
3051
  "track_expenses_and_receipts": "Suivez les dépenses et les reçus",
3037
- "use_platform_name_accounting": "Utilisez vous-même {{platformName}} Accounting, ou laissez notre équipe d’experts s’occuper de votre tenue de livres"
3052
+ "use_platform_name_accounting": "Utilisez {{platformName}} Accounting vous même, ou laissez votre tenue de livres à notre équipe d’experts"
3038
3053
  }
3039
3054
  };
3040
3055
  var linkedAccounts_default = {
@@ -3089,10 +3104,10 @@ var linkedAccounts_default = {
3089
3104
  "import_data_simple_integration": "Importez des données grâce à une intégration simple.",
3090
3105
  "ledger_balance": "Solde du grand livre",
3091
3106
  "link_bank_accounts_and_credit_cards": "Liez vos comptes bancaires et vos cartes de crédit",
3092
- "link_more_accounts_any_time": "Vous pouvez lier d’autres comptes en tout temps à partir de la section Transactions bancaires",
3107
+ "link_more_accounts_any_time": "Vous pouvez lier d’autres comptes en tout temps à partir de la section Activité bancaire",
3093
3108
  "link_your_bank_accounts": "Liez vos comptes bancaires",
3094
3109
  "link_your_bank_accounts_description": "Lier vos comptes bancaires nous permet de charger vos opérations bancaires et de les catégoriser automatiquement.",
3095
- "linked_accounts": "Comptes liés",
3110
+ "linked_accounts": "Comptes connectés",
3096
3111
  "loading_accounts": "Chargement de vos comptes...",
3097
3112
  "may_take_few_minutes": "Cela peut prendre quelques minutes",
3098
3113
  "may_take_up_to_5_minutes": "Cela peut prendre jusqu’à 5 minutes",
@@ -3126,13 +3141,13 @@ var mileageTracking_default = {
3126
3141
  label: {
3127
3142
  "deduction_colon": "Déduction :",
3128
3143
  "in_year": "En {{year}}",
3129
- "mileage_tracking": "Suivi du kilométrage",
3144
+ "mileage_tracking": "Suivi des kilomètres parcourus",
3130
3145
  "miles_colon": "Kilométrage\xA0:",
3131
3146
  "miles_month": "Kilométrage ce mois-ci",
3132
3147
  "standard_rate_formatted_deduction": "Taux standard\xA0: {{formattedDeductionRate}}/mile",
3133
3148
  "tax_deduction": "Déduction fiscale",
3134
3149
  "total_deduction": "Déduction totale",
3135
- "total_miles": "Kilométrage total",
3150
+ "total_miles": "Kilomètres totaux",
3136
3151
  "total_miles_in_year": "Total des milles en {{displayYear}}\xA0:",
3137
3152
  "total_tax_deduction": "Déduction fiscale totale :"
3138
3153
  }
@@ -3162,9 +3177,11 @@ var reports_default = {
3162
3177
  "load_reports_navigation": "Une erreur s’est produite lors du chargement de cette navigation. Veuillez réessayer."
3163
3178
  },
3164
3179
  label: {
3180
+ "accrual": "Comptabilité d'exercice",
3165
3181
  "adjustments_net_income": "Ajustements au bénéfice net",
3166
3182
  "assets": "Actifs",
3167
3183
  "balance_sheet": "Bilan",
3184
+ "cash": "Comptabilité de caisse",
3168
3185
  "cash_beginning_of_period": "Trésorerie au début de la période",
3169
3186
  "cash_end_of_period": "Trésorerie à la fin de la période",
3170
3187
  "cash_flow_statement": "État des flux de trésorerie",
@@ -3184,9 +3201,11 @@ var reports_default = {
3184
3201
  "profit_loss_detail_report": "Rapport détaillé de l’état des résultats",
3185
3202
  "report_period": "Période du rapport",
3186
3203
  "report_type": "Type de rapport",
3204
+ "reporting_basis": "Méthode comptable",
3187
3205
  "reports": "Rapports",
3188
3206
  "reports_navigation": "Navigation des rapports",
3189
3207
  "select_report": "Sélectionner un rapport",
3208
+ "switch_report": "Changer de rapport",
3190
3209
  "total_display_name": "Total de {{displayName}}"
3191
3210
  }
3192
3211
  };
@@ -3343,7 +3362,7 @@ var timeTracking_default = {
3343
3362
  "discard_timer": "Annuler le minuteur",
3344
3363
  "edit_entry": "Modifier l'entrée",
3345
3364
  "save_entry": "Enregistrer l'entrée",
3346
- "start_timer": "Démarrer le minuteur",
3365
+ "start_timer": "Commencer le minuteur",
3347
3366
  "view_entry": "Voir l'entrée"
3348
3367
  },
3349
3368
  empty: {
@@ -3436,46 +3455,45 @@ var timeTracking_default = {
3436
3455
  };
3437
3456
  var trips_default = {
3438
3457
  action: {
3439
- "add_trip": "Ajouter un trajet",
3440
- "delete_trip": "Supprimer le trajet",
3441
- "edit_trip": "Modifier le trajet",
3442
- "record_trip": "Enregistrer un trajet",
3443
- "save_trip": "Enregistrer le trajet",
3444
- "view_trip": "Afficher le trajet"
3458
+ "delete_trip": "Supprimer le voyage",
3459
+ "edit_trip": "Modifier le voyage",
3460
+ "record_trip": "Ajouter un voyage",
3461
+ "save_trip": "Enregistrer le voyage",
3462
+ "view_trip": "Afficher le voyage"
3445
3463
  },
3446
3464
  empty: {
3447
- "add_first_trip": "Ajoutez votre premier trajet pour commencer à faire le suivi du kilométrage.",
3448
- "no_trips_yet": "Aucun trajet pour le moment"
3465
+ "add_first_trip": "Ajoutez votre premier voyage pour commencer à faire le suivi des kilomètres parcourus.",
3466
+ "no_trips_yet": "Aucun voyage pour le moment"
3449
3467
  },
3450
3468
  error: {
3451
- "delete_trip": "Échec de la suppression du trajet. Veuillez vérifier votre connexion et réessayer.",
3452
- "load_trips": "Nous n'avons pas pu charger vos trajets",
3453
- "load_trips_error": "Une erreur s'est produite lors du chargement de vos trajets. Veuillez vérifier votre connexion et réessayer."
3469
+ "delete_trip": "Échec de la suppression du voyage. Veuillez vérifier votre connexion et réessayer.",
3470
+ "load_trips": "Nous n'avons pas pu charger vos voyages",
3471
+ "load_trips_error": "Une erreur s'est produite lors du chargement de vos voyages. Veuillez vérifier votre connexion et réessayer."
3454
3472
  },
3455
3473
  label: {
3456
- "additional_trip_actions": "Actions supplémentaires pour les trajets",
3457
- "delete_trip_warning": "Ce trajet sera supprimé définitivement. Cette action ne peut pas être annulée.",
3474
+ "additional_trip_actions": "Actions supplémentaires pour les voyages",
3475
+ "delete_trip_warning": "Ce voyage sera supprimé définitivement. Cette action ne peut pas être annulée.",
3458
3476
  "distance": "Distance",
3459
3477
  "distance_mi": "{{distance}} mi",
3460
3478
  "distance_miles": "Distance (milles)",
3461
3479
  "end_address": "Adresse de destination",
3462
3480
  "enter_address": "Saisissez l’adresse",
3463
3481
  "enter_distance": "Saisissez la distance",
3464
- "search_trips": "Rechercher des trajets",
3482
+ "search_trips": "Rechercher des voyages",
3465
3483
  "start_address": "Adresse de départ",
3466
- "trip_date": "Date du trajet",
3467
- "trip_details": "Détails du trajet",
3484
+ "trip_date": "Date du voyage",
3485
+ "trip_details": "Détails du voyage",
3468
3486
  "trip_end_address": "<bold>Destination :</bold> {{address}}",
3469
- "trip_purpose": "Motif du trajet",
3487
+ "trip_purpose": "Motif du voyage",
3470
3488
  "trip_start_address": "<bold>Départ :</bold> {{address}}",
3471
- "trips": "Trajets"
3489
+ "trips": "Voyages"
3472
3490
  },
3473
- prompt: { "delete_trip": "Supprimer ce trajet?" },
3491
+ prompt: { "delete_trip": "Supprimer ce voyage?" },
3474
3492
  validation: {
3475
3493
  "distance_greater_than_zero": "La distance doit être supérieure à zéro.",
3476
3494
  "purpose_required": "Le motif est un champ obligatoire.",
3477
- "trip_date_not_future": "La date du trajet ne peut pas être dans le futur.",
3478
- "trip_date_required": "La date du trajet est un champ obligatoire."
3495
+ "trip_date_not_future": "La date du voyage ne peut pas être dans le futur.",
3496
+ "trip_date_required": "La date du voyage est un champ obligatoire."
3479
3497
  }
3480
3498
  };
3481
3499
  var ui_default = {
@@ -3498,7 +3516,7 @@ var ui_default = {
3498
3516
  };
3499
3517
  var upload_default = {
3500
3518
  action: {
3501
- "click_copy_required": "Cliquez pour copier les en-têtes de colonnes requis",
3519
+ "click_copy_required": "Cliquez pour copier les noms de colonnes requis",
3502
3520
  "create_account": "Créer un compte",
3503
3521
  "create_input_value": "Créer \"{{inputValue}}\"",
3504
3522
  "download_template": "Télécharger le modèle",
@@ -3519,7 +3537,7 @@ var upload_default = {
3519
3537
  "count_transactions_have_one": "{{displayCount}} transaction a été téléversée vers votre compte.",
3520
3538
  "count_transactions_have_other": "{{displayCount}} transactions ont été téléversées vers votre compte.",
3521
3539
  "csv_validation_preview": "Aperçu de la validation du fichier CSV",
3522
- "drag_drop_file_browse": "Glissez-déposez un fichier ou <browse>parcourez</browse>.",
3540
+ "drag_drop_file_browse": "Glissez et déposez un fichier, ou <browse>parcourez vos fichiers</browse>.",
3523
3541
  "im_done_uploading": "J’ai terminé de téléverser les transactions",
3524
3542
  "need_help_download_example_csv": "Besoin d’aide? Téléchargez un fichier CSV d’exemple",
3525
3543
  "review_transactions": "Vérifier les transactions",
@@ -3777,7 +3795,7 @@ var useLocalizedKey = () => {
3777
3795
  var _excluded$119 = ["trigger"];
3778
3796
  var UNLINK_BANK_ACCOUNT_TAG_KEY = "#unlink-bank-account";
3779
3797
  var unlinkBankAccount = del(({ businessId, bankAccountId }) => `/v1/businesses/${businessId}/bank-accounts/${bankAccountId}`);
3780
- function buildKey$87({ access_token: accessToken, apiUrl, businessId }) {
3798
+ function buildKey$88({ access_token: accessToken, apiUrl, businessId }) {
3781
3799
  if (accessToken && apiUrl) return {
3782
3800
  accessToken,
3783
3801
  apiUrl,
@@ -3790,7 +3808,7 @@ function useUnlinkBankAccount() {
3790
3808
  const { businessId } = useLayerContext();
3791
3809
  const { apiUrl } = useEnvironment();
3792
3810
  const { data: auth } = useAuth();
3793
- const _useSWRMutation = useSWRMutation(() => withLocale(buildKey$87({
3811
+ const _useSWRMutation = useSWRMutation(() => withLocale(buildKey$88({
3794
3812
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
3795
3813
  apiUrl,
3796
3814
  businessId
@@ -6154,7 +6172,7 @@ var getBookkeepingStatus = get(({ businessId }) => {
6154
6172
  });
6155
6173
  var BOOKKEEPING_TAG_KEY = "#bookkeeping";
6156
6174
  var BOOKKEEPING_STATUS_TAG_KEY = "#bookkeeping-status";
6157
- function buildKey$86({ access_token: accessToken, apiUrl, businessId }) {
6175
+ function buildKey$87({ access_token: accessToken, apiUrl, businessId }) {
6158
6176
  if (accessToken && apiUrl) return {
6159
6177
  accessToken,
6160
6178
  apiUrl,
@@ -6165,7 +6183,7 @@ function buildKey$86({ access_token: accessToken, apiUrl, businessId }) {
6165
6183
  function useBookkeepingStatus() {
6166
6184
  const { data: auth } = useAuth();
6167
6185
  const { businessId } = useLayerContext();
6168
- return useSWR(() => buildKey$86(_objectSpread2(_objectSpread2({}, auth), {}, { businessId })), ({ accessToken, apiUrl, businessId }) => getBookkeepingStatus(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(BookkeepingStatusResponseSchema)).then(({ data }) => data));
6186
+ return useSWR(() => buildKey$87(_objectSpread2(_objectSpread2({}, auth), {}, { businessId })), ({ accessToken, apiUrl, businessId }) => getBookkeepingStatus(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(BookkeepingStatusResponseSchema)).then(({ data }) => data));
6169
6187
  }
6170
6188
  function useBookkeepingStatusGlobalCacheActions() {
6171
6189
  const { forceReload } = useGlobalCacheActions();
@@ -7384,7 +7402,7 @@ var BREAKPOINTS = {
7384
7402
  //#endregion
7385
7403
  //#region src/hooks/api/businesses/[business-id]/categories/useCategories.ts
7386
7404
  var CATEGORIES_TAG_KEY = "#categories";
7387
- function buildKey$85({ access_token: accessToken, apiUrl, businessId, mode }) {
7405
+ function buildKey$86({ access_token: accessToken, apiUrl, businessId, mode }) {
7388
7406
  if (accessToken && apiUrl) return {
7389
7407
  accessToken,
7390
7408
  apiUrl,
@@ -7400,7 +7418,7 @@ function useCategories({ mode } = {}) {
7400
7418
  const withLocale = useLocalizedKey();
7401
7419
  const { data: auth } = useAuth();
7402
7420
  const { businessId } = useLayerContext();
7403
- return useSWR(() => withLocale(buildKey$85(_objectSpread2(_objectSpread2({}, auth), {}, {
7421
+ return useSWR(() => withLocale(buildKey$86(_objectSpread2(_objectSpread2({}, auth), {}, {
7404
7422
  businessId,
7405
7423
  mode
7406
7424
  }))), ({ accessToken, apiUrl, businessId, mode }) => getCategories(apiUrl, accessToken, { params: {
@@ -7510,7 +7528,7 @@ function useCustomersGlobalCacheActions() {
7510
7528
  //#endregion
7511
7529
  //#region src/hooks/api/businesses/[business-id]/tags/dimensions/useTagDimensions.ts
7512
7530
  var TAG_DIMENSIONS_TAG_KEY = "#tag-dimensions";
7513
- function buildKey$84({ access_token: accessToken, apiUrl, businessId, isEnabled }) {
7531
+ function buildKey$85({ access_token: accessToken, apiUrl, businessId, isEnabled }) {
7514
7532
  if (!isEnabled) return;
7515
7533
  if (accessToken && apiUrl) return {
7516
7534
  accessToken,
@@ -7526,7 +7544,7 @@ function useTagDimensions({ isEnabled = true } = {}) {
7526
7544
  const { data: auth } = useAuth();
7527
7545
  const { apiUrl } = useEnvironment();
7528
7546
  const { businessId } = useLayerContext();
7529
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$84(_objectSpread2(_objectSpread2({}, auth), {}, {
7547
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$85(_objectSpread2(_objectSpread2({}, auth), {}, {
7530
7548
  apiUrl,
7531
7549
  businessId,
7532
7550
  isEnabled
@@ -7929,7 +7947,7 @@ var getBankTransactionsExcel = get(({ businessId, categorized, direction, query,
7929
7947
  sortOrder
7930
7948
  })}`;
7931
7949
  });
7932
- function buildKey$83({ access_token: accessToken, apiUrl, businessId }) {
7950
+ function buildKey$84({ access_token: accessToken, apiUrl, businessId }) {
7933
7951
  if (accessToken && apiUrl) return {
7934
7952
  accessToken,
7935
7953
  apiUrl,
@@ -7941,7 +7959,7 @@ function useBankTransactionsDownload() {
7941
7959
  const withLocale = useLocalizedKey();
7942
7960
  const { data } = useAuth();
7943
7961
  const { businessId } = useLayerContext();
7944
- return useSWRMutation(() => withLocale(buildKey$83(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { categorized, direction, query, startDate, endDate, tagFilterQueryString } }) => getBankTransactionsExcel(apiUrl, accessToken, { params: {
7962
+ return useSWRMutation(() => withLocale(buildKey$84(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { categorized, direction, query, startDate, endDate, tagFilterQueryString } }) => getBankTransactionsExcel(apiUrl, accessToken, { params: {
7945
7963
  businessId,
7946
7964
  categorized,
7947
7965
  query,
@@ -8209,13 +8227,17 @@ var _excluded$103 = [
8209
8227
  "pb",
8210
8228
  "pbe",
8211
8229
  "pbs",
8230
+ "pi",
8231
+ "pie",
8232
+ "pis",
8212
8233
  "size",
8213
8234
  "status",
8235
+ "textCase",
8214
8236
  "variant",
8215
8237
  "weight"
8216
8238
  ];
8217
8239
  function splitTextProps(props) {
8218
- const { align, children, ellipsis, nonAria, noWrap, numeric, pb, pbe, pbs, size, status, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$103);
8240
+ const { align, children, ellipsis, nonAria, noWrap, numeric, pb, pbe, pbs, pi, pie, pis, size, status, textCase, variant, weight } = props, restProps = _objectWithoutProperties(props, _excluded$103);
8219
8241
  return {
8220
8242
  children,
8221
8243
  dataProperties: toDataProperties({
@@ -8226,8 +8248,12 @@ function splitTextProps(props) {
8226
8248
  pb,
8227
8249
  pbe,
8228
8250
  pbs,
8251
+ pi,
8252
+ pie,
8253
+ pis,
8229
8254
  size,
8230
8255
  status,
8256
+ "text-case": textCase,
8231
8257
  variant,
8232
8258
  weight
8233
8259
  }),
@@ -9112,7 +9138,7 @@ var getProfitAndLossDetailLines = (apiUrl, accessToken, params) => {
9112
9138
  //#endregion
9113
9139
  //#region src/hooks/api/businesses/[business-id]/reports/profit-and-loss/useProfitAndLossReport.tsx
9114
9140
  var PNL_REPORT_TAG_KEY = "#profit-and-loss-report";
9115
- function buildKey$82({ access_token: accessToken, apiUrl, businessId, startDate, endDate, tagKey, tagValues, reportingBasis, includeUncategorized }) {
9141
+ function buildKey$83({ access_token: accessToken, apiUrl, businessId, startDate, endDate, tagKey, tagValues, reportingBasis, includeUncategorized }) {
9116
9142
  if (accessToken && apiUrl) return {
9117
9143
  accessToken,
9118
9144
  apiUrl,
@@ -9140,7 +9166,7 @@ function useProfitAndLossReport({ startDate, endDate, tagKey, tagValues, reporti
9140
9166
  const withLocale = useLocalizedKey();
9141
9167
  const { data } = useAuth();
9142
9168
  const { businessId } = useLayerContext();
9143
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$82(_objectSpread2(_objectSpread2({}, data), {}, {
9169
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$83(_objectSpread2(_objectSpread2({}, data), {}, {
9144
9170
  businessId,
9145
9171
  startDate,
9146
9172
  endDate,
@@ -9165,7 +9191,7 @@ var useProfitAndLossReportCacheActions = () => {
9165
9191
  //#endregion
9166
9192
  //#region src/hooks/api/businesses/[business-id]/reports/profit-and-loss-comparison/useProfitAndLossComparisonReport.tsx
9167
9193
  var PNL_COMPARISON_REPORT_TAG_KEY = "#profit-and-loss-comparison-report";
9168
- function buildKey$81({ access_token: accessToken, apiUrl, businessId, periods, tagFilters, reportingBasis }) {
9194
+ function buildKey$82({ access_token: accessToken, apiUrl, businessId, periods, tagFilters, reportingBasis }) {
9169
9195
  if (accessToken && apiUrl && periods) return {
9170
9196
  accessToken,
9171
9197
  apiUrl,
@@ -9182,7 +9208,7 @@ function useProfitAndLossComparisonReport({ periods, tagFilters, reportingBasis
9182
9208
  const { data } = useAuth();
9183
9209
  const { businessId } = useLayerContext();
9184
9210
  const { apiUrl } = useEnvironment();
9185
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$81(_objectSpread2(_objectSpread2({}, data), {}, {
9211
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$82(_objectSpread2(_objectSpread2({}, data), {}, {
9186
9212
  apiUrl,
9187
9213
  businessId,
9188
9214
  periods,
@@ -9204,7 +9230,7 @@ var useProfitAndLossComparisonReportCacheActions = () => {
9204
9230
  //#endregion
9205
9231
  //#region src/hooks/api/businesses/[business-id]/reports/profit-and-loss-summaries/useProfitAndLossSummaries.tsx
9206
9232
  var PNL_SUMMARIES_TAG_KEY = "#profit-and-loss-summaries";
9207
- function buildKey$80({ access_token: accessToken, apiUrl, businessId, startMonth, startYear, endMonth, endYear, tagKey, tagValues, reportingBasis }) {
9233
+ function buildKey$81({ access_token: accessToken, apiUrl, businessId, startMonth, startYear, endMonth, endYear, tagKey, tagValues, reportingBasis }) {
9208
9234
  if (accessToken && apiUrl) return {
9209
9235
  accessToken,
9210
9236
  apiUrl,
@@ -9234,7 +9260,7 @@ function useProfitAndLossSummaries({ startYear, startMonth, endYear, endMonth, t
9234
9260
  const withLocale = useLocalizedKey();
9235
9261
  const { data } = useAuth();
9236
9262
  const { businessId } = useLayerContext();
9237
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$80(_objectSpread2(_objectSpread2({}, data), {}, {
9263
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$81(_objectSpread2(_objectSpread2({}, data), {}, {
9238
9264
  businessId,
9239
9265
  startYear,
9240
9266
  startMonth,
@@ -9297,7 +9323,7 @@ var CategorizeTransactionRequestSchema$1 = Schema.Struct({
9297
9323
  });
9298
9324
  var BulkCategorizeRequestSchema = Schema.Struct({ transactions: Schema.Array(CategorizeTransactionRequestSchema$1) });
9299
9325
  var bulkCategorize = post(({ businessId }) => `/v1/businesses/${businessId}/bank-transactions/bulk-categorize`);
9300
- function buildKey$79({ access_token: accessToken, apiUrl, businessId }) {
9326
+ function buildKey$80({ access_token: accessToken, apiUrl, businessId }) {
9301
9327
  if (accessToken && apiUrl) return {
9302
9328
  accessToken,
9303
9329
  apiUrl,
@@ -9311,7 +9337,7 @@ var useBulkCategorize = () => {
9311
9337
  const { businessId, eventCallbacks } = useLayerContext();
9312
9338
  const { forceReloadBankTransactions } = useBankTransactionsGlobalCacheActions();
9313
9339
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
9314
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$79(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkCategorize(apiUrl, accessToken, {
9340
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$80(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkCategorize(apiUrl, accessToken, {
9315
9341
  params: { businessId },
9316
9342
  body: Schema.encodeSync(BulkCategorizeRequestSchema)(arg)
9317
9343
  }).then(({ data }) => data), {
@@ -10233,7 +10259,7 @@ var Check$1 = (_ref) => {
10233
10259
  //#endregion
10234
10260
  //#region src/icons/ChevronDown.tsx
10235
10261
  var _excluded$92 = ["size"];
10236
- var ChevronDown = (_ref) => {
10262
+ var ChevronDown$1 = (_ref) => {
10237
10263
  let { size = 18 } = _ref;
10238
10264
  return /* @__PURE__ */ jsx("svg", _objectSpread2(_objectSpread2({
10239
10265
  viewBox: "0 0 18 18",
@@ -10293,7 +10319,7 @@ function buildCustomDropdownIndicator() {
10293
10319
  const { isDisabled } = restProps;
10294
10320
  return /* @__PURE__ */ jsx(components.DropdownIndicator, _objectSpread2(_objectSpread2({}, restProps), {}, {
10295
10321
  className: COMBO_BOX_CLASS_NAMES.DROPDOWN_INDICATOR,
10296
- children: !isDisabled ? /* @__PURE__ */ jsx(ChevronDown, { size: 16 }) : /* @__PURE__ */ jsx(Fragment$1, {})
10322
+ children: !isDisabled ? /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 }) : /* @__PURE__ */ jsx(Fragment$1, {})
10297
10323
  }));
10298
10324
  };
10299
10325
  }
@@ -11215,7 +11241,7 @@ var CategorySelectDrawerWithTrigger = ({ selectedValue, onSelectedValueChange, s
11215
11241
  children: [/* @__PURE__ */ jsx(Span, _objectSpread2(_objectSpread2({
11216
11242
  ellipsis: true,
11217
11243
  size: "md"
11218
- }, slotProps === null || slotProps === void 0 ? void 0 : slotProps.TriggerSpan), {}, { children: (_selectedValue$label = selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label) !== null && _selectedValue$label !== void 0 ? _selectedValue$label : t("common:action.select_label", "Select...") })), /* @__PURE__ */ jsx(ChevronDown, { size: 16 })]
11244
+ }, slotProps === null || slotProps === void 0 ? void 0 : slotProps.TriggerSpan), {}, { children: (_selectedValue$label = selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label) !== null && _selectedValue$label !== void 0 ? _selectedValue$label : t("common:action.select_label", "Select...") })), /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 })]
11219
11245
  }), /* @__PURE__ */ jsx(CategorySelectDrawer, {
11220
11246
  onSelectedValueChange,
11221
11247
  selectedValue,
@@ -11227,8 +11253,8 @@ var CategorySelectDrawerWithTrigger = ({ selectedValue, onSelectedValueChange, s
11227
11253
  };
11228
11254
  //#endregion
11229
11255
  //#region src/components/TaxCodeSelect/useTaxCodeSelect.ts
11230
- var EMPTY_ARRAY$7 = [];
11231
- var useTaxCodeSelect = ({ options = EMPTY_ARRAY$7, selectedValue, onSelectedValueChange }) => {
11256
+ var EMPTY_ARRAY$8 = [];
11257
+ var useTaxCodeSelect = ({ options = EMPTY_ARRAY$8, selectedValue, onSelectedValueChange }) => {
11232
11258
  const { t } = useTranslation();
11233
11259
  const noTaxCodeOption = useMemo(() => TaxCodeComboBoxOption.noTaxCode(t("bankTransactions:action.no_tax_code", "No tax code")), [t]);
11234
11260
  const optionsWithNoTaxCode = useMemo(() => [noTaxCodeOption, ...options], [noTaxCodeOption, options]);
@@ -11390,7 +11416,7 @@ var MobileListSection = ({ label, items, renderItem, onClickItem }) => /* @__PUR
11390
11416
  });
11391
11417
  //#endregion
11392
11418
  //#region src/components/ui/MobileList/MobileList.tsx
11393
- var EMPTY_ARRAY$6 = [];
11419
+ var EMPTY_ARRAY$7 = [];
11394
11420
  var isSelectionEnabled = (props) => props.selectionMode !== "none" && props.enableSelection;
11395
11421
  var isGrouped = (data) => !!data && !Array.isArray(data);
11396
11422
  var MobileList = ({ ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, variant = "default", enableSelection = false, selectionMode = "none", selectedKeys, onSelectionChange }) => {
@@ -11424,7 +11450,7 @@ var MobileList = ({ ariaLabel, data, slots, renderItem, onClickItem, isLoading,
11424
11450
  items: group.items,
11425
11451
  renderItem,
11426
11452
  onClickItem
11427
- }, group.label)) : (data !== null && data !== void 0 ? data : EMPTY_ARRAY$6).map(renderRow)
11453
+ }, group.label)) : (data !== null && data !== void 0 ? data : EMPTY_ARRAY$7).map(renderRow)
11428
11454
  });
11429
11455
  };
11430
11456
  //#endregion
@@ -11527,7 +11553,7 @@ var MobileSelectionDrawerWithTrigger = (_ref) => {
11527
11553
  const openDrawer = useCallback(() => setIsOpen(true), []);
11528
11554
  const resolvedPlaceholder = placeholder !== null && placeholder !== void 0 ? placeholder : t("common:action.select_label", "Select...");
11529
11555
  const resolvedSearchPlaceholder = searchPlaceholder !== null && searchPlaceholder !== void 0 ? searchPlaceholder : t("common:action.search_label", "Search");
11530
- const triggerIcon = (_slotProps$Trigger$ic = slotProps === null || slotProps === void 0 || (_slotProps$Trigger = slotProps.Trigger) === null || _slotProps$Trigger === void 0 ? void 0 : _slotProps$Trigger.icon) !== null && _slotProps$Trigger$ic !== void 0 ? _slotProps$Trigger$ic : /* @__PURE__ */ jsx(ChevronDown, { size: 16 });
11556
+ const triggerIcon = (_slotProps$Trigger$ic = slotProps === null || slotProps === void 0 || (_slotProps$Trigger = slotProps.Trigger) === null || _slotProps$Trigger === void 0 ? void 0 : _slotProps$Trigger.icon) !== null && _slotProps$Trigger$ic !== void 0 ? _slotProps$Trigger$ic : /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 });
11531
11557
  const filteredOptionsOrGroups = useMemo(() => filterOptionsOrGroups(groups ? { groups } : { options: options !== null && options !== void 0 ? options : [] }, searchQuery.trim().toLowerCase()), [
11532
11558
  options,
11533
11559
  groups,
@@ -11558,6 +11584,7 @@ var MobileSelectionDrawerWithTrigger = (_ref) => {
11558
11584
  children: [/* @__PURE__ */ jsx(Span, {
11559
11585
  size: "sm",
11560
11586
  ellipsis: true,
11587
+ pie: "xs",
11561
11588
  children: (_resolvedSelectedValu = resolvedSelectedValue === null || resolvedSelectedValue === void 0 ? void 0 : resolvedSelectedValue.label) !== null && _resolvedSelectedValu !== void 0 ? _resolvedSelectedValu : resolvedPlaceholder
11562
11589
  }), !isDisabled && triggerIcon]
11563
11590
  })
@@ -11818,7 +11845,7 @@ Schema.Struct({ businessId: Schema.String });
11818
11845
  var bulkMatchOrCategorize = post(({ businessId }) => {
11819
11846
  return `/v1/businesses/${businessId}/bank-transactions/bulk-match-or-categorize`;
11820
11847
  });
11821
- function buildKey$78({ access_token: accessToken, apiUrl, businessId }) {
11848
+ function buildKey$79({ access_token: accessToken, apiUrl, businessId }) {
11822
11849
  if (accessToken && apiUrl) return {
11823
11850
  accessToken,
11824
11851
  apiUrl,
@@ -11837,7 +11864,7 @@ var useBulkMatchOrCategorize = () => {
11837
11864
  const buildTransactionsPayload = useCallback(() => {
11838
11865
  return { transactions: buildBulkMatchOrCategorizePayload(selectedIds, categorizations) };
11839
11866
  }, [selectedIds, categorizations]);
11840
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$78(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkMatchOrCategorize(apiUrl, accessToken, {
11867
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$79(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkMatchOrCategorize(apiUrl, accessToken, {
11841
11868
  params: { businessId },
11842
11869
  body: Schema.encodeSync(BulkMatchOrCategorizeRequestSchema)(arg)
11843
11870
  }).then(({ data }) => data), {
@@ -11924,7 +11951,7 @@ var BankTransactionsConfirmAllModal = ({ isOpen, onOpenChange, isMobileView = fa
11924
11951
  var BULK_UNCATEGORIZE_BANK_TRANSACTIONS_TAG_KEY = "#bulk-uncategorize-bank-transactions";
11925
11952
  var BulkUncategorizeRequestSchema = Schema.Struct({ transactionIds: Schema.propertySignature(Schema.Array(Schema.UUID)).pipe(Schema.fromKey("transaction_ids")) });
11926
11953
  var bulkUncategorize = post(({ businessId }) => `/v1/businesses/${businessId}/bank-transactions/bulk-uncategorize`);
11927
- function buildKey$77({ access_token: accessToken, apiUrl, businessId }) {
11954
+ function buildKey$78({ access_token: accessToken, apiUrl, businessId }) {
11928
11955
  if (accessToken && apiUrl) return {
11929
11956
  accessToken,
11930
11957
  apiUrl,
@@ -11938,7 +11965,7 @@ var useBulkUncategorize = () => {
11938
11965
  const { businessId, eventCallbacks } = useLayerContext();
11939
11966
  const { forceReloadBankTransactions } = useBankTransactionsGlobalCacheActions();
11940
11967
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
11941
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$77(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkUncategorize(apiUrl, accessToken, {
11968
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$78(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg }) => bulkUncategorize(apiUrl, accessToken, {
11942
11969
  params: { businessId },
11943
11970
  body: Schema.encodeSync(BulkUncategorizeRequestSchema)(arg)
11944
11971
  }).then(({ data }) => data), {
@@ -12320,7 +12347,7 @@ var mapRawCustomAccountToCustomAccount = (raw) => ({
12320
12347
  //#endregion
12321
12348
  //#region src/hooks/api/businesses/[business-id]/custom-accounts/useCustomAccounts.ts
12322
12349
  var CUSTOM_ACCOUNTS_TAG_KEY = "#custom-accounts";
12323
- function buildKey$76({ access_token: accessToken, apiUrl, businessId, userCreated }) {
12350
+ function buildKey$77({ access_token: accessToken, apiUrl, businessId, userCreated }) {
12324
12351
  if (accessToken && apiUrl) return {
12325
12352
  accessToken,
12326
12353
  apiUrl,
@@ -12338,7 +12365,7 @@ function useCustomAccounts({ userCreated } = {}) {
12338
12365
  const withLocale = useLocalizedKey();
12339
12366
  const { data } = useAuth();
12340
12367
  const { businessId } = useLayerContext();
12341
- return useSWR(() => withLocale(buildKey$76(_objectSpread2(_objectSpread2({}, data), {}, {
12368
+ return useSWR(() => withLocale(buildKey$77(_objectSpread2(_objectSpread2({}, data), {}, {
12342
12369
  businessId,
12343
12370
  userCreated
12344
12371
  }))), ({ accessToken, apiUrl, businessId, userCreated }) => getCustomAccounts(apiUrl, accessToken, { params: {
@@ -12348,7 +12375,7 @@ function useCustomAccounts({ userCreated } = {}) {
12348
12375
  }
12349
12376
  //#endregion
12350
12377
  //#region src/hooks/api/businesses/[business-id]/custom-accounts/[custom-account-id]/parse-csv/useCustomAccountParseCsv.ts
12351
- function buildKey$75({ access_token: accessToken, apiUrl, businessId }) {
12378
+ function buildKey$76({ access_token: accessToken, apiUrl, businessId }) {
12352
12379
  if (accessToken && apiUrl) return {
12353
12380
  accessToken,
12354
12381
  apiUrl,
@@ -12365,7 +12392,7 @@ function useCustomAccountParseCsv() {
12365
12392
  const withLocale = useLocalizedKey();
12366
12393
  const { data } = useAuth();
12367
12394
  const { businessId } = useLayerContext();
12368
- return useSWRMutation(() => withLocale(buildKey$75(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { customAccountId, file } }) => parseCsv(apiUrl, accessToken, {
12395
+ return useSWRMutation(() => withLocale(buildKey$76(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { customAccountId, file } }) => parseCsv(apiUrl, accessToken, {
12369
12396
  businessId,
12370
12397
  customAccountId,
12371
12398
  file
@@ -12647,7 +12674,7 @@ get(({ businessId }) => `/v1/businesses/${businessId}/external-accounts`);
12647
12674
  //#endregion
12648
12675
  //#region src/hooks/api/businesses/[business-id]/custom-accounts/useCreateCustomAccount.ts
12649
12676
  var createCustomAccount = post(({ businessId }) => `/v1/businesses/${businessId}/custom-accounts`);
12650
- function buildKey$74({ access_token: accessToken, apiUrl, businessId }) {
12677
+ function buildKey$75({ access_token: accessToken, apiUrl, businessId }) {
12651
12678
  if (accessToken && apiUrl) return {
12652
12679
  accessToken,
12653
12680
  apiUrl,
@@ -12660,7 +12687,7 @@ function useCreateCustomAccount() {
12660
12687
  const { data } = useAuth();
12661
12688
  const { businessId } = useLayerContext();
12662
12689
  const { mutate } = useSWRConfig();
12663
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$74(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCustomAccount(apiUrl, accessToken, {
12690
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$75(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCustomAccount(apiUrl, accessToken, {
12664
12691
  params: { businessId },
12665
12692
  body
12666
12693
  }).then(({ data }) => mapRawCustomAccountToCustomAccount(data)), { revalidate: false });
@@ -13201,7 +13228,7 @@ var DateCalendar = ({ minDate, maxDate, variant }) => {
13201
13228
  var PickerDropdownIndicator = ({ onClick }) => /* @__PURE__ */ jsx(Button, {
13202
13229
  className: "Layer__PickerDropdownIndicator",
13203
13230
  onPress: onClick,
13204
- children: /* @__PURE__ */ jsx(ChevronDown, { size: 16 })
13231
+ children: /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 })
13205
13232
  });
13206
13233
  //#endregion
13207
13234
  //#region src/components/DatePicker/DatePickerInput.tsx
@@ -14236,7 +14263,7 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
14236
14263
  //#region src/hooks/api/businesses/[business-id]/custom-accounts/[custom-account-id]/transactions/useCreateCustomAccountTransactions.ts
14237
14264
  var _excluded$58 = ["customAccountId"];
14238
14265
  var createCustomAccountTransactions = post(({ businessId, customAccountId }) => `/v1/businesses/${businessId}/custom-accounts/${customAccountId}/transactions`);
14239
- function buildKey$73({ access_token: accessToken, apiUrl, businessId }) {
14266
+ function buildKey$74({ access_token: accessToken, apiUrl, businessId }) {
14240
14267
  if (accessToken && apiUrl) return {
14241
14268
  accessToken,
14242
14269
  apiUrl,
@@ -14248,7 +14275,7 @@ function useCreateCustomAccountTransactions() {
14248
14275
  const withLocale = useLocalizedKey();
14249
14276
  const { data } = useAuth();
14250
14277
  const { businessId } = useLayerContext();
14251
- return useSWRMutation(() => withLocale(buildKey$73(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, _ref) => {
14278
+ return useSWRMutation(() => withLocale(buildKey$74(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, _ref) => {
14252
14279
  let { arg: _ref2 } = _ref, { customAccountId } = _ref2, body = _objectWithoutProperties(_ref2, _excluded$58);
14253
14280
  return createCustomAccountTransactions(apiUrl, accessToken, {
14254
14281
  params: {
@@ -14621,7 +14648,7 @@ var DEFAULT_NUM_ROWS = 15;
14621
14648
  var HEADER_HEIGHT = 52;
14622
14649
  var DEFAULT_TABLE_HEIGHT = DEFAULT_ROW_HEIGHT * DEFAULT_NUM_ROWS + HEADER_HEIGHT - 1;
14623
14650
  var CSS_PREFIX = "Layer__UI__VirtualizedTable";
14624
- var EMPTY_ARRAY$5 = [];
14651
+ var EMPTY_ARRAY$6 = [];
14625
14652
  var VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentName, ariaLabel, slots, shrinkHeightToFitRows = false, height = DEFAULT_TABLE_HEIGHT, rowHeight = DEFAULT_ROW_HEIGHT, overscan = DEFAULT_OVERSCAN }) => {
14626
14653
  const { EmptyState, ErrorState } = slots;
14627
14654
  const containerRef = useRef(null);
@@ -14637,7 +14664,7 @@ var VirtualizedDataTable = ({ columnConfig, data, isLoading, isError, componentN
14637
14664
  shrinkHeightToFitRows
14638
14665
  ]);
14639
14666
  const table = useReactTable({
14640
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$5,
14667
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$6,
14641
14668
  columns: getColumnDefs(columnConfig),
14642
14669
  getCoreRowModel: getCoreRowModel(),
14643
14670
  getSortedRowModel: getSortedRowModel()
@@ -15724,7 +15751,7 @@ var useGetBankTransactionMatchOrCategoryWithDefault = (bankTransaction) => {
15724
15751
  var _excluded$56 = ["bankTransactionId"];
15725
15752
  var CATEGORIZE_BANK_TRANSACTION_TAG = "#categorize-bank-transaction";
15726
15753
  var categorizeBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/categorize`);
15727
- function buildKey$72({ access_token: accessToken, apiUrl, businessId }) {
15754
+ function buildKey$73({ access_token: accessToken, apiUrl, businessId }) {
15728
15755
  if (accessToken && apiUrl) return {
15729
15756
  accessToken,
15730
15757
  apiUrl,
@@ -15740,7 +15767,7 @@ function useCategorizeBankTransaction() {
15740
15767
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
15741
15768
  const { useBankTransactionsOptions } = useBankTransactionsContext();
15742
15769
  const { forceReloadBackgroundBankTransactions } = useBankTransactionsGlobalCacheActions();
15743
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$72({
15770
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$73({
15744
15771
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
15745
15772
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
15746
15773
  businessId
@@ -15818,7 +15845,7 @@ function useCategorizeBankTransactionWithCacheUpdate() {
15818
15845
  var _excluded$55 = ["bankTransactionId"];
15819
15846
  var matchBankTransaction = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/match`);
15820
15847
  var MATCH_BANK_TRANSACTION_TAG = "#match-bank-transaction";
15821
- function buildKey$71({ access_token: accessToken, apiUrl, businessId }) {
15848
+ function buildKey$72({ access_token: accessToken, apiUrl, businessId }) {
15822
15849
  if (accessToken && apiUrl) return {
15823
15850
  accessToken,
15824
15851
  apiUrl,
@@ -15834,7 +15861,7 @@ function useMatchBankTransaction() {
15834
15861
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
15835
15862
  const { useBankTransactionsOptions } = useBankTransactionsContext();
15836
15863
  const { forceReloadBackgroundBankTransactions } = useBankTransactionsGlobalCacheActions();
15837
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$71({
15864
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$72({
15838
15865
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
15839
15866
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
15840
15867
  businessId
@@ -16227,7 +16254,7 @@ var getBookkeepingPeriods = get(({ businessId }) => {
16227
16254
  return `/v1/businesses/${businessId}/bookkeeping/periods`;
16228
16255
  });
16229
16256
  var BOOKKEEPING_PERIODS_TAG_KEY = "#bookkeeping-periods";
16230
- function buildKey$70({ access_token: accessToken, apiUrl, businessId, isActiveOrPaused }) {
16257
+ function buildKey$71({ access_token: accessToken, apiUrl, businessId, isActiveOrPaused }) {
16231
16258
  if (accessToken && apiUrl && isActiveOrPaused) return {
16232
16259
  accessToken,
16233
16260
  apiUrl,
@@ -16241,7 +16268,7 @@ function useBookkeepingPeriods() {
16241
16268
  const { businessId } = useLayerContext();
16242
16269
  const { data, isLoading: isLoadingBookkeepingStatus } = useBookkeepingStatus();
16243
16270
  const isActiveOrPaused = data ? isActiveOrPausedBookkeepingStatus(data.status) : false;
16244
- const swrResponse = useSWR(() => withLocale(buildKey$70(_objectSpread2(_objectSpread2({}, auth), {}, {
16271
+ const swrResponse = useSWR(() => withLocale(buildKey$71(_objectSpread2(_objectSpread2({}, auth), {}, {
16245
16272
  businessId,
16246
16273
  isActiveOrPaused
16247
16274
  }))), ({ accessToken, apiUrl, businessId }) => getBookkeepingPeriods(apiUrl, accessToken, { params: { businessId } })().then(({ data: { periods } }) => periods.map((period) => _objectSpread2(_objectSpread2({}, period), {}, {
@@ -16414,7 +16441,7 @@ function useMinMutatingMutation({ swrMutationResponse, minMutatingMs }) {
16414
16441
  //#endregion
16415
16442
  //#region src/hooks/api/businesses/[business-id]/bank-transactions/[bank-transaction-id]/metadata/useSetMetadataOnBankTransaction.ts
16416
16443
  var SET_METADATA_ON_BANK_TRANSACTION_TAG_KEY = "#set-metadata-on-bank-transaction";
16417
- function buildKey$69({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16444
+ function buildKey$70({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16418
16445
  if (accessToken && apiUrl) return {
16419
16446
  accessToken,
16420
16447
  apiUrl,
@@ -16428,7 +16455,7 @@ function useSetMetadataOnBankTransaction({ bankTransactionId }) {
16428
16455
  const withLocale = useLocalizedKey();
16429
16456
  const { data } = useAuth();
16430
16457
  const { businessId } = useLayerContext();
16431
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$69(_objectSpread2(_objectSpread2({}, data), {}, {
16458
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$70(_objectSpread2(_objectSpread2({}, data), {}, {
16432
16459
  businessId,
16433
16460
  bankTransactionId
16434
16461
  }))), ({ accessToken, apiUrl, businessId, bankTransactionId }, { arg: { vendor, customer } }) => {
@@ -16477,7 +16504,7 @@ function useSetMetadataOnBankTransaction({ bankTransactionId }) {
16477
16504
  //#region src/hooks/api/businesses/[business-id]/bank-transactions/tags/useRemoveTagFromBankTransaction.ts
16478
16505
  var REMOVE_TAG_FROM_BANK_TRANSACTION_TAG_KEY = "#remove-tag-from-bank-transaction";
16479
16506
  var removeTagFromBankTransaction = del(({ businessId }) => `/v1/businesses/${businessId}/bank-transactions/tags`);
16480
- function buildKey$68({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16507
+ function buildKey$69({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16481
16508
  if (accessToken && apiUrl) return {
16482
16509
  accessToken,
16483
16510
  apiUrl,
@@ -16490,7 +16517,7 @@ function useRemoveTagFromBankTransaction({ bankTransactionId }) {
16490
16517
  const withLocale = useLocalizedKey();
16491
16518
  const { data } = useAuth();
16492
16519
  const { businessId } = useLayerContext();
16493
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$68(_objectSpread2(_objectSpread2({}, data), {}, {
16520
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$69(_objectSpread2(_objectSpread2({}, data), {}, {
16494
16521
  businessId,
16495
16522
  bankTransactionId
16496
16523
  }))), ({ accessToken, apiUrl, businessId }, { arg: { tagId } }) => removeTagFromBankTransaction(apiUrl, accessToken, {
@@ -16529,7 +16556,7 @@ function useRemoveTagFromBankTransaction({ bankTransactionId }) {
16529
16556
  //#region src/hooks/api/businesses/[business-id]/bank-transactions/tags/useTagBankTransaction.ts
16530
16557
  var TAG_BANK_TRANSACTION_TAG_KEY = "#tag-bank-transaction";
16531
16558
  var tagBankTransaction = post(({ businessId }) => `/v1/businesses/${businessId}/bank-transactions/tags`);
16532
- function buildKey$67({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16559
+ function buildKey$68({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
16533
16560
  if (accessToken && apiUrl) return {
16534
16561
  accessToken,
16535
16562
  apiUrl,
@@ -16542,7 +16569,7 @@ function useTagBankTransaction({ bankTransactionId }) {
16542
16569
  const withLocale = useLocalizedKey();
16543
16570
  const { data } = useAuth();
16544
16571
  const { businessId } = useLayerContext();
16545
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$67(_objectSpread2(_objectSpread2({}, data), {}, {
16572
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$68(_objectSpread2(_objectSpread2({}, data), {}, {
16546
16573
  businessId,
16547
16574
  bankTransactionId
16548
16575
  }))), ({ accessToken, apiUrl, businessId, bankTransactionId }, { arg: { key, value, dimensionDisplayName, valueDisplayName } }) => tagBankTransaction(apiUrl, accessToken, {
@@ -17109,7 +17136,7 @@ function BankTransactionCustomerVendorSelector({ bankTransaction }) {
17109
17136
  //#region src/hooks/api/businesses/[business-id]/bank-transactions/[bank-transaction-id]/metadata/useBankTransactionsMetadata.ts
17110
17137
  var getBankTransactionMetadata = get(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`);
17111
17138
  var GET_BANK_TRANSACTION_METADATA_TAG_KEY = "#bank-transaction-metadata";
17112
- function buildKey$66({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
17139
+ function buildKey$67({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
17113
17140
  if (accessToken && apiUrl) return {
17114
17141
  accessToken,
17115
17142
  apiUrl,
@@ -17122,7 +17149,7 @@ function useBankTransactionMetadata({ bankTransactionId }) {
17122
17149
  const withLocale = useLocalizedKey();
17123
17150
  const { data: auth } = useAuth();
17124
17151
  const { businessId } = useLayerContext();
17125
- return useSWR(() => withLocale(buildKey$66(_objectSpread2(_objectSpread2({}, auth), {}, {
17152
+ return useSWR(() => withLocale(buildKey$67(_objectSpread2(_objectSpread2({}, auth), {}, {
17126
17153
  businessId,
17127
17154
  bankTransactionId
17128
17155
  }))), ({ accessToken, apiUrl, businessId }) => getBankTransactionMetadata(apiUrl, accessToken, { params: {
@@ -17134,7 +17161,7 @@ function useBankTransactionMetadata({ bankTransactionId }) {
17134
17161
  //#region src/hooks/api/businesses/[business-id]/bank-transactions/[bank-transaction-id]/metadata/useUpdateBankTransactionMetadata.ts
17135
17162
  var updateBankTransactionMetadata = put(({ businessId, bankTransactionId }) => `/v1/businesses/${businessId}/bank-transactions/${bankTransactionId}/metadata`);
17136
17163
  var UPDATE_BANK_TRANSACTION_METADATA_TAG_KEY = "#update-bank-transaction-metadata";
17137
- function buildKey$65({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
17164
+ function buildKey$66({ access_token: accessToken, apiUrl, businessId, bankTransactionId }) {
17138
17165
  if (accessToken && apiUrl) return {
17139
17166
  accessToken,
17140
17167
  apiUrl,
@@ -17148,7 +17175,7 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
17148
17175
  const { data: auth } = useAuth();
17149
17176
  const { businessId } = useLayerContext();
17150
17177
  const { mutate } = useSWRConfig();
17151
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$65({
17178
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$66({
17152
17179
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
17153
17180
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
17154
17181
  businessId,
@@ -17281,7 +17308,7 @@ var BankTransactionMemo = ({ bankTransactionId, isMobile }) => {
17281
17308
  //#endregion
17282
17309
  //#region src/hooks/api/businesses/[business-id]/tags/dimensions/key/[dimension-key]/useTagDimensionByKey.ts
17283
17310
  var TAG_DIMENSION_BY_KEY_TAG_KEY = "#tag-dimension-by-key";
17284
- function buildKey$64({ access_token: accessToken, apiUrl, businessId, isEnabled, dimensionKey }) {
17311
+ function buildKey$65({ access_token: accessToken, apiUrl, businessId, isEnabled, dimensionKey }) {
17285
17312
  if (!isEnabled) return;
17286
17313
  if (accessToken && apiUrl) return {
17287
17314
  accessToken,
@@ -17297,7 +17324,7 @@ function useTagDimensionByKey({ isEnabled = true, dimensionKey }) {
17297
17324
  const { data: auth } = useAuth();
17298
17325
  const { apiUrl } = useEnvironment();
17299
17326
  const { businessId } = useLayerContext();
17300
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$64(_objectSpread2(_objectSpread2({}, auth), {}, {
17327
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$65(_objectSpread2(_objectSpread2({}, auth), {}, {
17301
17328
  apiUrl,
17302
17329
  isEnabled,
17303
17330
  businessId,
@@ -20043,7 +20070,7 @@ function useCategorizationRulesGlobalCacheActions() {
20043
20070
  //#endregion
20044
20071
  //#region src/hooks/api/businesses/[business-id]/categorization-rules/[categorization-rule-id]/archive/useArchiveCategorizationRule.ts
20045
20072
  var ARCHIVE_CATEGORIZATION_RULE_TAG = "#archive-categorization-rule";
20046
- function buildKey$63({ access_token: accessToken, apiUrl, businessId }) {
20073
+ function buildKey$64({ access_token: accessToken, apiUrl, businessId }) {
20047
20074
  if (accessToken && apiUrl) return {
20048
20075
  accessToken,
20049
20076
  apiUrl,
@@ -20058,7 +20085,7 @@ function useArchiveCategorizationRule() {
20058
20085
  const { data: auth } = useAuth();
20059
20086
  const { businessId } = useLayerContext();
20060
20087
  const { forceReloadCategorizationRules } = useCategorizationRulesGlobalCacheActions();
20061
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$63({
20088
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$64({
20062
20089
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
20063
20090
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
20064
20091
  businessId
@@ -20263,13 +20290,13 @@ var Pagination = ({ onPageChange, totalCount, siblingCount = 1, currentPage, pag
20263
20290
  //#endregion
20264
20291
  //#region src/components/ui/MobileList/PaginatedMobileList.tsx
20265
20292
  var _excluded$41 = ["data", "paginationProps"];
20266
- var EMPTY_ARRAY$4 = [];
20293
+ var EMPTY_ARRAY$5 = [];
20267
20294
  var PaginatedMobileList = (props) => {
20268
20295
  var _data$length;
20269
20296
  const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$41);
20270
20297
  const { initialPage = 0, onSetPage, pageSize = 20, hasMore, fetchMore, autoResetPageIndexRef } = paginationProps;
20271
20298
  const { pageItems, pageIndex, setPage } = usePaginatedList({
20272
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
20299
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$5,
20273
20300
  pageSize,
20274
20301
  initialPage,
20275
20302
  onSetPage
@@ -20511,7 +20538,7 @@ function ConditionalList({ list, Empty, Container, isLoading, Loading, isError,
20511
20538
  }
20512
20539
  //#endregion
20513
20540
  //#region src/components/DataTable/DataTable.tsx
20514
- var EMPTY_ARRAY$3 = [];
20541
+ var EMPTY_ARRAY$4 = [];
20515
20542
  var DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependencies, data, headerGroups, numColumns, withClickableRow }) => {
20516
20543
  const scrollContainerRef = useRef(null);
20517
20544
  const nonAria = headerGroups.length > 1 || numColumns === 0;
@@ -20577,7 +20604,7 @@ var DataTable = ({ isLoading, isError, componentName, ariaLabel, slots, dependen
20577
20604
  dependencies,
20578
20605
  nonAria,
20579
20606
  children: /* @__PURE__ */ jsx(ConditionalList, {
20580
- list: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
20607
+ list: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
20581
20608
  isLoading,
20582
20609
  isError,
20583
20610
  Loading: /* @__PURE__ */ jsx(DataTableSkeleton, {
@@ -20938,7 +20965,7 @@ var ErrorBoundary = class extends Component {
20938
20965
  //#endregion
20939
20966
  //#region src/hooks/api/businesses/[business-id]/categorization-rules/suggestions/useRejectCategorizationRulesUpdateSuggestion.ts
20940
20967
  var REJECT_CATEGORIZATION_RULE_SUGGESTION_TAG = "#reject-categorization-rule-suggestion";
20941
- function buildKey$62({ access_token: accessToken, apiUrl, businessId }) {
20968
+ function buildKey$63({ access_token: accessToken, apiUrl, businessId }) {
20942
20969
  if (accessToken && apiUrl) return {
20943
20970
  accessToken,
20944
20971
  apiUrl,
@@ -20951,7 +20978,7 @@ function useRejectCategorizationRulesUpdateSuggestion() {
20951
20978
  const withLocale = useLocalizedKey();
20952
20979
  const { data: auth } = useAuth();
20953
20980
  const { businessId } = useLayerContext();
20954
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$62({
20981
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$63({
20955
20982
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
20956
20983
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
20957
20984
  businessId
@@ -20971,7 +20998,7 @@ function useRejectCategorizationRulesUpdateSuggestion() {
20971
20998
  //#endregion
20972
20999
  //#region src/hooks/api/businesses/[business-id]/categorization-rules/useCreateCategorizationRule.ts
20973
21000
  var CREATE_CATEGORIZATION_RULE_TAG = "#create-categorization-rule";
20974
- function buildKey$61({ access_token: accessToken, apiUrl, businessId }) {
21001
+ function buildKey$62({ access_token: accessToken, apiUrl, businessId }) {
20975
21002
  if (accessToken && apiUrl) return {
20976
21003
  accessToken,
20977
21004
  apiUrl,
@@ -20988,7 +21015,7 @@ function useCreateCategorizationRule() {
20988
21015
  const { forceReloadBankTransactions } = useBankTransactionsGlobalCacheActions();
20989
21016
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
20990
21017
  const { forceReloadCategorizationRules } = useCategorizationRulesGlobalCacheActions();
20991
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$61({
21018
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$62({
20992
21019
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
20993
21020
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
20994
21021
  businessId
@@ -22150,7 +22177,7 @@ var PlusIcon = (_ref) => {
22150
22177
  };
22151
22178
  //#endregion
22152
22179
  //#region src/hooks/features/bankAccounts/useConfirmAndExcludeMultiple.ts
22153
- function buildKey$60({ access_token: accessToken, apiUrl, businessId }) {
22180
+ function buildKey$61({ access_token: accessToken, apiUrl, businessId }) {
22154
22181
  if (accessToken && apiUrl) return {
22155
22182
  accessToken,
22156
22183
  apiUrl,
@@ -22180,7 +22207,7 @@ function useConfirmAndExcludeMultiple({ onSuccess }) {
22180
22207
  const withLocale = useLocalizedKey();
22181
22208
  const { data: auth } = useAuth();
22182
22209
  const { businessId } = useLayerContext();
22183
- return useSWRMutation(() => withLocale(buildKey$60({
22210
+ return useSWRMutation(() => withLocale(buildKey$61({
22184
22211
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
22185
22212
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
22186
22213
  businessId
@@ -23039,7 +23066,7 @@ var LinkedAccountsContent = ({ asWidget, showLedgerBalance, showUnlinkItem, show
23039
23066
  //#endregion
23040
23067
  //#region src/hooks/legacy/useUpdateOpeningBalanceAndDate.ts
23041
23068
  var updateBankAccountOpeningBalance = post(({ businessId, bankAccountId }) => `/v1/businesses/${businessId}/bank-accounts/${bankAccountId}/opening-balance`);
23042
- function buildKey$59({ access_token: accessToken, apiUrl, businessId, data }) {
23069
+ function buildKey$60({ access_token: accessToken, apiUrl, businessId, data }) {
23043
23070
  if (accessToken && apiUrl) return {
23044
23071
  accessToken,
23045
23072
  apiUrl,
@@ -23071,7 +23098,7 @@ function useBulkSetOpeningBalanceAndDate(data, { onSuccess }) {
23071
23098
  if (!openingBalance) errors.push("MISSING_BALANCE");
23072
23099
  return errors;
23073
23100
  };
23074
- return useSWRMutation(() => withLocale(buildKey$59({
23101
+ return useSWRMutation(() => withLocale(buildKey$60({
23075
23102
  access_token: auth === null || auth === void 0 ? void 0 : auth.access_token,
23076
23103
  apiUrl: auth === null || auth === void 0 ? void 0 : auth.apiUrl,
23077
23104
  businessId,
@@ -26506,7 +26533,7 @@ var getProfitAndLossDetailLinesExcel = (apiUrl, accessToken, params) => {
26506
26533
  });
26507
26534
  return get(({ businessId }) => `/v1/businesses/${businessId}/reports/profit-and-loss/lines/exports/excel?${queryParams.toString()}`)(apiUrl, accessToken, { params: { businessId } });
26508
26535
  };
26509
- function buildKey$58({ access_token: accessToken, apiUrl, businessId, startDate, endDate, pnlStructureLineItemName, tagFilter, reportingBasis, pnlStructure }) {
26536
+ function buildKey$59({ access_token: accessToken, apiUrl, businessId, startDate, endDate, pnlStructureLineItemName, tagFilter, reportingBasis, pnlStructure }) {
26510
26537
  if (accessToken && apiUrl) return {
26511
26538
  accessToken,
26512
26539
  apiUrl,
@@ -26529,7 +26556,7 @@ function useProfitAndLossDetailLinesExport({ startDate, endDate, pnlStructureLin
26529
26556
  const { data: auth } = useAuth();
26530
26557
  const { businessId } = useLayerContext();
26531
26558
  const { apiUrl } = useEnvironment();
26532
- return useSWRMutation(() => withLocale(buildKey$58(_objectSpread2(_objectSpread2({}, auth), {}, {
26559
+ return useSWRMutation(() => withLocale(buildKey$59(_objectSpread2(_objectSpread2({}, auth), {}, {
26533
26560
  apiUrl,
26534
26561
  businessId,
26535
26562
  startDate,
@@ -28010,7 +28037,7 @@ ProfitAndLoss.Report = ProfitAndLossReport;
28010
28037
  var getBalanceSheet = get(({ businessId, effectiveDate }) => {
28011
28038
  return `/v1/businesses/${businessId}/reports/balance-sheet?${toDefinedSearchParameters({ effectiveDate })}`;
28012
28039
  });
28013
- function buildKey$57({ access_token: accessToken, apiUrl, businessId, effectiveDate }) {
28040
+ function buildKey$58({ access_token: accessToken, apiUrl, businessId, effectiveDate }) {
28014
28041
  if (accessToken && apiUrl) return {
28015
28042
  accessToken,
28016
28043
  apiUrl,
@@ -28024,7 +28051,7 @@ function useBalanceSheet({ effectiveDate = endOfDay(/* @__PURE__ */ new Date())
28024
28051
  const { data: auth } = useAuth();
28025
28052
  const { apiUrl } = useEnvironment();
28026
28053
  const { businessId } = useLayerContext();
28027
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$57(_objectSpread2(_objectSpread2({}, auth), {}, {
28054
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$58(_objectSpread2(_objectSpread2({}, auth), {}, {
28028
28055
  apiUrl,
28029
28056
  businessId,
28030
28057
  effectiveDate
@@ -28088,7 +28115,7 @@ var getBalanceSheetExcel = get(({ businessId, effectiveDate }) => {
28088
28115
  return `/v1/businesses/${businessId}/reports/balance-sheet/exports/excel?${toDefinedSearchParameters({ effectiveDate })}`;
28089
28116
  });
28090
28117
  var DOWNLOAD_BALANCE_SHEET_TAG_KEY = "#download-balance-sheet";
28091
- function buildKey$56({ access_token: accessToken, apiUrl, businessId, effectiveDate }) {
28118
+ function buildKey$57({ access_token: accessToken, apiUrl, businessId, effectiveDate }) {
28092
28119
  if (accessToken && apiUrl) return {
28093
28120
  accessToken,
28094
28121
  apiUrl,
@@ -28101,7 +28128,7 @@ function useBalanceSheetDownload({ effectiveDate, onSuccess }) {
28101
28128
  const withLocale = useLocalizedKey();
28102
28129
  const { data: auth } = useAuth();
28103
28130
  const { businessId } = useLayerContext();
28104
- return useSWRMutation(() => withLocale(buildKey$56(_objectSpread2(_objectSpread2({}, auth), {}, {
28131
+ return useSWRMutation(() => withLocale(buildKey$57(_objectSpread2(_objectSpread2({}, auth), {}, {
28105
28132
  businessId,
28106
28133
  effectiveDate
28107
28134
  }))), ({ accessToken, apiUrl, businessId, effectiveDate }) => getBalanceSheetExcel(apiUrl, accessToken, { params: {
@@ -28316,7 +28343,7 @@ var getStatementOfCashFlow = get(({ businessId, startDate, endDate }) => {
28316
28343
  endDate
28317
28344
  })}`;
28318
28345
  });
28319
- function buildKey$55({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28346
+ function buildKey$56({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28320
28347
  if (accessToken && apiUrl) return {
28321
28348
  accessToken,
28322
28349
  apiUrl,
@@ -28331,7 +28358,7 @@ function useStatementOfCashFlow({ startDate = startOfMonth(/* @__PURE__ */ new D
28331
28358
  const { data: auth } = useAuth();
28332
28359
  const { apiUrl } = useEnvironment();
28333
28360
  const { businessId } = useLayerContext();
28334
- return new SWRQueryResult(useSWR(withLocale(buildKey$55(_objectSpread2(_objectSpread2({}, auth), {}, {
28361
+ return new SWRQueryResult(useSWR(withLocale(buildKey$56(_objectSpread2(_objectSpread2({}, auth), {}, {
28335
28362
  apiUrl,
28336
28363
  businessId,
28337
28364
  startDate,
@@ -28392,7 +28419,7 @@ var getCashflowStatementCSV = get(({ businessId, startDate, endDate }) => {
28392
28419
  })}`;
28393
28420
  });
28394
28421
  var DOWNLOAD_CASHFLOW_STATEMENT_TAG_KEY = "#download-cashflow-statement";
28395
- function buildKey$54({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28422
+ function buildKey$55({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28396
28423
  if (accessToken && apiUrl) return {
28397
28424
  accessToken,
28398
28425
  apiUrl,
@@ -28406,7 +28433,7 @@ function useCashflowStatementDownload({ startDate, endDate, onSuccess }) {
28406
28433
  const withLocale = useLocalizedKey();
28407
28434
  const { data: auth } = useAuth();
28408
28435
  const { businessId } = useLayerContext();
28409
- return useSWRMutation(() => withLocale(buildKey$54(_objectSpread2(_objectSpread2({}, auth), {}, {
28436
+ return useSWRMutation(() => withLocale(buildKey$55(_objectSpread2(_objectSpread2({}, auth), {}, {
28410
28437
  businessId,
28411
28438
  startDate,
28412
28439
  endDate
@@ -28576,7 +28603,7 @@ var StatementOfCashFlowView = ({ view: propView, stringOverrides, dateSelectionM
28576
28603
  //#endregion
28577
28604
  //#region src/hooks/api/businesses/[business-id]/ledger/accounts/[account-id]/useDeleteLedgerAccount.ts
28578
28605
  var deleteAccountFromLedger = del(({ businessId, accountId }) => `/v1/businesses/${businessId}/ledger/accounts/${accountId}`);
28579
- function buildKey$53({ access_token: accessToken, apiUrl, businessId }) {
28606
+ function buildKey$54({ access_token: accessToken, apiUrl, businessId }) {
28580
28607
  if (accessToken && apiUrl) return {
28581
28608
  accessToken,
28582
28609
  apiUrl,
@@ -28588,7 +28615,7 @@ function useDeleteAccountFromLedger() {
28588
28615
  const withLocale = useLocalizedKey();
28589
28616
  const { data } = useAuth();
28590
28617
  const { businessId } = useLayerContext();
28591
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$53(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { accountId } }) => deleteAccountFromLedger(apiUrl, accessToken, { params: {
28618
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$54(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { accountId } }) => deleteAccountFromLedger(apiUrl, accessToken, { params: {
28592
28619
  businessId,
28593
28620
  accountId
28594
28621
  } }), {
@@ -28610,7 +28637,7 @@ var getLedgerAccountBalances = get(({ businessId, startDate, endDate }) => {
28610
28637
  endDate
28611
28638
  })}`;
28612
28639
  });
28613
- function buildKey$52({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28640
+ function buildKey$53({ access_token: accessToken, apiUrl, businessId, startDate, endDate }) {
28614
28641
  if (accessToken && apiUrl) return {
28615
28642
  accessToken,
28616
28643
  apiUrl,
@@ -28624,7 +28651,7 @@ function useLedgerBalances(withDates, startDate, endDate) {
28624
28651
  const withLocale = useLocalizedKey();
28625
28652
  const { data } = useAuth();
28626
28653
  const { businessId } = useLayerContext();
28627
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$52(_objectSpread2(_objectSpread2({}, data), {}, {
28654
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$53(_objectSpread2(_objectSpread2({}, data), {}, {
28628
28655
  businessId,
28629
28656
  startDate: withDates ? startDate : void 0,
28630
28657
  endDate: withDates ? endDate : void 0
@@ -29192,7 +29219,7 @@ function useListLedgerAccountLines({ accountId, include_entries_before_activatio
29192
29219
  //#region src/hooks/api/businesses/[business-id]/ledger/entries/[entry-id]/useLedgerAccountsEntry.ts
29193
29220
  var LEDGER_ACCOUNTS_ENTRY_TAG_KEY = "#ledger-accounts-entry";
29194
29221
  var getLedgerAccountsEntry = get(({ businessId, entryId }) => `/v1/businesses/${businessId}/ledger/entries/${entryId}`);
29195
- function buildKey$51({ accessToken, apiUrl, businessId, entryId }) {
29222
+ function buildKey$52({ accessToken, apiUrl, businessId, entryId }) {
29196
29223
  if (!accessToken || !entryId) return null;
29197
29224
  return {
29198
29225
  accessToken,
@@ -29207,7 +29234,7 @@ function useLedgerAccountsEntry({ entryId }) {
29207
29234
  const { businessId } = useLayerContext();
29208
29235
  const { apiUrl } = useEnvironment();
29209
29236
  const { data: auth } = useAuth();
29210
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$51({
29237
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$52({
29211
29238
  accessToken: auth === null || auth === void 0 ? void 0 : auth.access_token,
29212
29239
  apiUrl,
29213
29240
  businessId,
@@ -29614,7 +29641,7 @@ var getRowIndentStyle = ({ depth, canExpand, indentSizePx }) => ({
29614
29641
  paddingInlineStart: depth * indentSizePx + (canExpand ? 0 : CHEVRON_OFFSET_PX),
29615
29642
  overflow: "hidden"
29616
29643
  });
29617
- var EMPTY_ARRAY$2 = [];
29644
+ var EMPTY_ARRAY$3 = [];
29618
29645
  function ExpandableDataTable({ data, isLoading, isError, columnConfig, componentName, ariaLabel, slots, getSubRows, getRowId, indentSize = "sm" }) {
29619
29646
  const { expanded, setExpanded } = useContext(ExpandableDataTableContext);
29620
29647
  const wrappedColumnConfig = useMemo(() => {
@@ -29646,7 +29673,7 @@ function ExpandableDataTable({ data, isLoading, isError, columnConfig, component
29646
29673
  const columnDefs = getColumnDefs(wrappedColumnConfig);
29647
29674
  const columnPinning = useMemo(() => getColumnPinning(wrappedColumnConfig), [wrappedColumnConfig]);
29648
29675
  const table = useReactTable({
29649
- data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$2,
29676
+ data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$3,
29650
29677
  columns: columnDefs,
29651
29678
  getSubRows,
29652
29679
  getCoreRowModel: getCoreRowModel(),
@@ -29959,7 +29986,7 @@ var Plus$1 = (_ref) => {
29959
29986
  //#endregion
29960
29987
  //#region src/hooks/api/businesses/[business-id]/ledger/balances/exports/csv/useAccountBalancesDownload.ts
29961
29988
  var getLedgerAccountBalancesCSV = get(({ businessId }) => `/v1/businesses/${businessId}/ledger/balances/exports/csv`);
29962
- function buildKey$50({ access_token: accessToken, apiUrl, businessId, startCutoff, endCutoff }) {
29989
+ function buildKey$51({ access_token: accessToken, apiUrl, businessId, startCutoff, endCutoff }) {
29963
29990
  if (accessToken && apiUrl) return {
29964
29991
  accessToken,
29965
29992
  apiUrl,
@@ -29977,7 +30004,7 @@ function useAccountBalancesDownload({ startCutoff, endCutoff, onSuccess }) {
29977
30004
  const withLocale = useLocalizedKey();
29978
30005
  const { data: auth } = useAuth();
29979
30006
  const { businessId } = useLayerContext();
29980
- return useSWRMutation(() => withLocale(buildKey$50(_objectSpread2(_objectSpread2({}, auth), {}, {
30007
+ return useSWRMutation(() => withLocale(buildKey$51(_objectSpread2(_objectSpread2({}, auth), {}, {
29981
30008
  businessId,
29982
30009
  startCutoff,
29983
30010
  endCutoff
@@ -30949,7 +30976,7 @@ var UpsertJournalEntryMode = /* @__PURE__ */ function(UpsertJournalEntryMode) {
30949
30976
  return UpsertJournalEntryMode;
30950
30977
  }({});
30951
30978
  var createJournalEntry = post(({ businessId }) => `/v1/businesses/${businessId}/ledger/journal-entries`);
30952
- function buildKey$49({ access_token: accessToken, apiUrl, businessId }) {
30979
+ function buildKey$50({ access_token: accessToken, apiUrl, businessId }) {
30953
30980
  if (accessToken && apiUrl) return {
30954
30981
  accessToken,
30955
30982
  apiUrl,
@@ -30966,7 +30993,7 @@ var useUpsertJournalEntry = (props) => {
30966
30993
  const { forceReloadLedgerEntries } = useLedgerEntriesCacheActions();
30967
30994
  const { debouncedInvalidateProfitAndLoss } = useProfitAndLossGlobalInvalidator();
30968
30995
  const { invalidate } = useGlobalCacheActions();
30969
- const rawMutationResponse = useSWRMutation(() => withLocale(buildKey$49(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => {
30996
+ const rawMutationResponse = useSWRMutation(() => withLocale(buildKey$50(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => {
30970
30997
  return createJournalEntry(apiUrl, accessToken, {
30971
30998
  params: { businessId },
30972
30999
  body
@@ -31260,10 +31287,10 @@ var JournalEntryLineItem = ({ form, index, displayIndex, isReadOnly, onDeleteLin
31260
31287
  };
31261
31288
  //#endregion
31262
31289
  //#region src/components/Journal/JournalEntryForm/JournalEntryLineItemsTable.tsx
31263
- var EMPTY_ARRAY$1 = [];
31290
+ var EMPTY_ARRAY$2 = [];
31264
31291
  var JournalEntryLineItemsTable = ({ form, isReadOnly, title, direction, showTags = false }) => {
31265
31292
  const { t } = useTranslation();
31266
- const lineItems = useStore$1(form.store, (state) => state.values.lineItems || EMPTY_ARRAY$1);
31293
+ const lineItems = useStore$1(form.store, (state) => state.values.lineItems || EMPTY_ARRAY$2);
31267
31294
  const filteredIndices = useMemo(() => {
31268
31295
  const indices = [];
31269
31296
  lineItems.forEach((item, index) => {
@@ -31676,7 +31703,7 @@ var JournalEntryDrawerHeader = ({ onSubmit, formState }) => {
31676
31703
  //#endregion
31677
31704
  //#region src/hooks/api/businesses/[business-id]/ledger/entries/exports/csv/useJournalEntriesDownload.ts
31678
31705
  var getJournalEntriesCSV = get(({ businessId }) => `/v1/businesses/${businessId}/ledger/entries/exports/csv`);
31679
- function buildKey$48({ access_token: accessToken, apiUrl, businessId, startCutoff, endCutoff }) {
31706
+ function buildKey$49({ access_token: accessToken, apiUrl, businessId, startCutoff, endCutoff }) {
31680
31707
  if (accessToken && apiUrl) return {
31681
31708
  accessToken,
31682
31709
  apiUrl,
@@ -31694,7 +31721,7 @@ function useJournalEntriesDownload({ startCutoff, endCutoff, onSuccess }) {
31694
31721
  const withLocale = useLocalizedKey();
31695
31722
  const { data: auth } = useAuth();
31696
31723
  const { businessId } = useLayerContext();
31697
- return useSWRMutation(() => withLocale(buildKey$48(_objectSpread2(_objectSpread2({}, auth), {}, {
31724
+ return useSWRMutation(() => withLocale(buildKey$49(_objectSpread2(_objectSpread2({}, auth), {}, {
31698
31725
  businessId,
31699
31726
  startCutoff,
31700
31727
  endCutoff
@@ -32386,7 +32413,7 @@ function getIconForTask(task) {
32386
32413
  //#endregion
32387
32414
  //#region src/hooks/api/businesses/[business-id]/tasks/[task-id]/upload/delete/useDeleteUploadsOnTask.ts
32388
32415
  var deleteUploadsOnTask = post(({ businessId, taskId }) => `/v1/businesses/${businessId}/tasks/${taskId}/upload/delete`);
32389
- function buildKey$47({ access_token: accessToken, apiUrl, businessId }) {
32416
+ function buildKey$48({ access_token: accessToken, apiUrl, businessId }) {
32390
32417
  if (accessToken && apiUrl) return {
32391
32418
  accessToken,
32392
32419
  apiUrl,
@@ -32399,7 +32426,7 @@ function useDeleteUploadsOnTask() {
32399
32426
  const { data: auth } = useAuth();
32400
32427
  const { businessId } = useLayerContext();
32401
32428
  const { mutate } = useSWRConfig();
32402
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$47(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId } }) => deleteUploadsOnTask(apiUrl, accessToken, { params: {
32429
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$48(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId } }) => deleteUploadsOnTask(apiUrl, accessToken, { params: {
32403
32430
  businessId,
32404
32431
  taskId
32405
32432
  } }), {
@@ -32420,7 +32447,7 @@ function useDeleteUploadsOnTask() {
32420
32447
  //#endregion
32421
32448
  //#region src/hooks/api/businesses/[business-id]/tasks/[task-id]/upload/update-description/useUpdateTaskUploadDescription.ts
32422
32449
  var updateTaskUploadsDescription = post(({ businessId, taskId }) => `/v1/businesses/${businessId}/tasks/${taskId}/upload/update-description`);
32423
- function buildKey$46({ access_token: accessToken, apiUrl, businessId }) {
32450
+ function buildKey$47({ access_token: accessToken, apiUrl, businessId }) {
32424
32451
  if (accessToken && apiUrl) return {
32425
32452
  accessToken,
32426
32453
  apiUrl,
@@ -32433,7 +32460,7 @@ function useUpdateTaskUploadDescription() {
32433
32460
  const { data: auth } = useAuth();
32434
32461
  const { businessId } = useLayerContext();
32435
32462
  const { mutate } = useSWRConfig();
32436
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$46(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, description } }) => updateTaskUploadsDescription(apiUrl, accessToken, {
32463
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$47(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, description } }) => updateTaskUploadsDescription(apiUrl, accessToken, {
32437
32464
  params: {
32438
32465
  businessId,
32439
32466
  taskId
@@ -32465,7 +32492,7 @@ function completeTaskWithUpload(baseUrl, accessToken, { businessId, taskId, file
32465
32492
  if (description) formData.append("description", description);
32466
32493
  return postWithFormData(`/v1/businesses/${businessId}/tasks/${taskId}/upload`, formData, baseUrl, accessToken);
32467
32494
  }
32468
- function buildKey$45({ access_token: accessToken, apiUrl, businessId }) {
32495
+ function buildKey$46({ access_token: accessToken, apiUrl, businessId }) {
32469
32496
  if (accessToken && apiUrl) return {
32470
32497
  accessToken,
32471
32498
  apiUrl,
@@ -32478,7 +32505,7 @@ function useUploadDocumentsForTask() {
32478
32505
  const { data: auth } = useAuth();
32479
32506
  const { businessId } = useLayerContext();
32480
32507
  const { mutate } = useSWRConfig();
32481
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$45(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, files, description } }) => completeTaskWithUpload(apiUrl, accessToken, {
32508
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$46(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, files, description } }) => completeTaskWithUpload(apiUrl, accessToken, {
32482
32509
  businessId,
32483
32510
  taskId,
32484
32511
  files,
@@ -32501,7 +32528,7 @@ function useUploadDocumentsForTask() {
32501
32528
  //#endregion
32502
32529
  //#region src/hooks/api/businesses/[business-id]/tasks/[task-id]/user-response/useSubmitResponseForTask.ts
32503
32530
  var submitUserResponseForTask = post(({ businessId, taskId }) => `/v1/businesses/${businessId}/tasks/${taskId}/user-response`);
32504
- function buildKey$44({ access_token: accessToken, apiUrl, businessId }) {
32531
+ function buildKey$45({ access_token: accessToken, apiUrl, businessId }) {
32505
32532
  if (accessToken && apiUrl) return {
32506
32533
  accessToken,
32507
32534
  apiUrl,
@@ -32514,7 +32541,7 @@ function useSubmitUserResponseForTask() {
32514
32541
  const { data: auth } = useAuth();
32515
32542
  const { businessId } = useLayerContext();
32516
32543
  const { mutate } = useSWRConfig();
32517
- const mutationResponse = useSWRMutation(() => withLocale(buildKey$44(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, userResponse } }) => submitUserResponseForTask(apiUrl, accessToken, {
32544
+ const mutationResponse = useSWRMutation(() => withLocale(buildKey$45(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: { taskId, userResponse } }) => submitUserResponseForTask(apiUrl, accessToken, {
32518
32545
  body: {
32519
32546
  type: "FreeResponse",
32520
32547
  user_response: userResponse
@@ -34436,7 +34463,7 @@ var MileageSummarySchema = Schema.Struct({ years: Schema.Array(MileageYearSchema
34436
34463
  //#endregion
34437
34464
  //#region src/hooks/api/businesses/[business-id]/mileage/summary/useMileageSummary.tsx
34438
34465
  var MILEAGE_SUMMARY_TAG_KEY = "#mileage-summary";
34439
- function buildKey$43({ access_token: accessToken, apiUrl, businessId }) {
34466
+ function buildKey$44({ access_token: accessToken, apiUrl, businessId }) {
34440
34467
  if (accessToken && apiUrl) return {
34441
34468
  accessToken,
34442
34469
  apiUrl,
@@ -34449,7 +34476,7 @@ function useMileageSummary() {
34449
34476
  const withLocale = useLocalizedKey();
34450
34477
  const { data } = useAuth();
34451
34478
  const { businessId } = useLayerContext();
34452
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$43(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getMileageSummary(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema.decodeUnknownPromise(MileageSummarySchema)(data))));
34479
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$44(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getMileageSummary(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema.decodeUnknownPromise(MileageSummarySchema)(data))));
34453
34480
  }
34454
34481
  var useMileageSummaryGlobalCacheActions = () => {
34455
34482
  const { invalidate } = useGlobalCacheActions();
@@ -34652,7 +34679,7 @@ var listVehicles = get(({ businessId, allowArchived }) => {
34652
34679
  return `/v1/businesses/${businessId}/mileage/vehicles?${toDefinedSearchParameters({ allowArchived })}`;
34653
34680
  });
34654
34681
  var VEHICLES_TAG_KEY = "#list-vehicles";
34655
- function buildKey$42({ access_token: accessToken, apiUrl, businessId, allowArchived }) {
34682
+ function buildKey$43({ access_token: accessToken, apiUrl, businessId, allowArchived }) {
34656
34683
  if (accessToken && apiUrl) return {
34657
34684
  accessToken,
34658
34685
  apiUrl,
@@ -34671,7 +34698,7 @@ function useListVehicles({ allowArchived } = {}) {
34671
34698
  const withLocale = useLocalizedKey();
34672
34699
  const { data } = useAuth();
34673
34700
  const { businessId } = useLayerContext();
34674
- return new ListVehiclesSWRResponse(useSWR(() => withLocale(buildKey$42(_objectSpread2(_objectSpread2({}, data), {}, {
34701
+ return new ListVehiclesSWRResponse(useSWR(() => withLocale(buildKey$43(_objectSpread2(_objectSpread2({}, data), {}, {
34675
34702
  businessId,
34676
34703
  allowArchived
34677
34704
  }))), ({ accessToken, apiUrl, businessId, allowArchived }) => listVehicles(apiUrl, accessToken, { params: {
@@ -34700,7 +34727,7 @@ var UpsertTripMode = /* @__PURE__ */ function(UpsertTripMode) {
34700
34727
  }({});
34701
34728
  var createTrip = post(({ businessId }) => `/v1/businesses/${businessId}/mileage/trips`);
34702
34729
  var updateTrip = patch(({ businessId, tripId }) => `/v1/businesses/${businessId}/mileage/trips/${tripId}`);
34703
- function buildKey$41({ access_token: accessToken, apiUrl, businessId, tripId = void 0 }) {
34730
+ function buildKey$42({ access_token: accessToken, apiUrl, businessId, tripId = void 0 }) {
34704
34731
  if (accessToken && apiUrl) return {
34705
34732
  accessToken,
34706
34733
  apiUrl,
@@ -34741,7 +34768,7 @@ var useUpsertTrip = (props) => {
34741
34768
  const { businessId } = useLayerContext();
34742
34769
  const { mode } = props;
34743
34770
  const tripId = mode === UpsertTripMode.Update ? props.tripId : void 0;
34744
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$41(_objectSpread2(_objectSpread2({}, data), {}, {
34771
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$42(_objectSpread2(_objectSpread2({}, data), {}, {
34745
34772
  businessId,
34746
34773
  tripId
34747
34774
  }))), ({ accessToken, apiUrl, businessId, tripId }, { arg: body }) => {
@@ -35359,7 +35386,7 @@ var MileageSummaryCard = () => {
35359
35386
  children: t("mileageTracking:label.mileage_tracking", "Mileage Tracking")
35360
35387
  }), /* @__PURE__ */ jsxs(Button$1, {
35361
35388
  onPress: onRecordTrip,
35362
- children: [t("trips:action.add_trip", "Add Trip"), /* @__PURE__ */ jsx(Plus$1, { size: 16 })]
35389
+ children: [t("trips:action.record_trip", "Record Trip"), /* @__PURE__ */ jsx(Plus$1, { size: 16 })]
35363
35390
  })]
35364
35391
  }),
35365
35392
  mileageSummaryCardContent,
@@ -35582,7 +35609,7 @@ var InvoiceSummaryStatsResponseSchema = Schema.Struct({
35582
35609
  //#endregion
35583
35610
  //#region src/hooks/api/businesses/[business-id]/invoices/summary-stats/useInvoiceSummaryStats.tsx
35584
35611
  var INVOICE_SUMMARY_STATS_TAG_KEY = "#invoices-summary-stats";
35585
- function buildKey$40({ access_token: accessToken, apiUrl, businessId }) {
35612
+ function buildKey$41({ access_token: accessToken, apiUrl, businessId }) {
35586
35613
  if (accessToken && apiUrl) return {
35587
35614
  accessToken,
35588
35615
  apiUrl,
@@ -35595,7 +35622,7 @@ function useInvoiceSummaryStats() {
35595
35622
  const withLocale = useLocalizedKey();
35596
35623
  const { data } = useAuth();
35597
35624
  const { businessId } = useLayerContext();
35598
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$40(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getInvoiceSummaryStats(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema.decodeUnknownPromise(InvoiceSummaryStatsResponseSchema)(data))));
35625
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$41(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getInvoiceSummaryStats(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema.decodeUnknownPromise(InvoiceSummaryStatsResponseSchema)(data))));
35599
35626
  }
35600
35627
  var useInvoiceSummaryStatsCacheActions = () => {
35601
35628
  const { forceReload } = useGlobalCacheActions();
@@ -35708,7 +35735,7 @@ var UpsertInvoiceMode = /* @__PURE__ */ function(UpsertInvoiceMode) {
35708
35735
  }({});
35709
35736
  var createInvoice = post(({ businessId }) => `/v1/businesses/${businessId}/invoices`);
35710
35737
  var updateInvoice = patch(({ businessId, invoiceId }) => `/v1/businesses/${businessId}/invoices/${invoiceId}`);
35711
- function buildKey$39({ access_token: accessToken, apiUrl, businessId, invoiceId = void 0 }) {
35738
+ function buildKey$40({ access_token: accessToken, apiUrl, businessId, invoiceId = void 0 }) {
35712
35739
  if (accessToken && apiUrl) return {
35713
35740
  accessToken,
35714
35741
  apiUrl,
@@ -35749,7 +35776,7 @@ var useUpsertInvoice = (props) => {
35749
35776
  const { businessId } = useLayerContext();
35750
35777
  const { mode } = props;
35751
35778
  const invoiceId = mode === UpsertInvoiceMode.Update ? props.invoiceId : void 0;
35752
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$39(_objectSpread2(_objectSpread2({}, data), {}, {
35779
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$40(_objectSpread2(_objectSpread2({}, data), {}, {
35753
35780
  businessId,
35754
35781
  invoiceId
35755
35782
  }))), ({ accessToken, apiUrl, businessId, invoiceId }, { arg: body }) => {
@@ -35959,7 +35986,7 @@ var InvoiceStatusFilter = /* @__PURE__ */ function(InvoiceStatusFilter) {
35959
35986
  return InvoiceStatusFilter;
35960
35987
  }(InvoiceStatusFilter || {});
35961
35988
  var INVOICE_STATUS_CONFIG = [
35962
- _objectSpread2({ value: InvoiceStatusFilter.All }, translationKey("common:label.value", "All")),
35989
+ _objectSpread2({ value: InvoiceStatusFilter.All }, translationKey("common:label.all", "All")),
35963
35990
  _objectSpread2({ value: InvoiceStatusFilter.Unpaid }, translationKey("invoices:state.unpaid", "Unpaid")),
35964
35991
  _objectSpread2({ value: InvoiceStatusFilter.Overdue }, translationKey("invoices:state.overdue", "Overdue")),
35965
35992
  _objectSpread2({ value: InvoiceStatusFilter.Sent }, translationKey("invoices:state.sent", "Sent")),
@@ -36161,7 +36188,7 @@ var InvoiceTable = () => {
36161
36188
  return /* @__PURE__ */ jsxs(Container, {
36162
36189
  name: "InvoiceTable",
36163
36190
  children: [/* @__PURE__ */ jsx(DataTableHeader, {
36164
- name: "Invoices",
36191
+ name: t("invoices:label.invoices", "Invoices"),
36165
36192
  slots: {
36166
36193
  HeaderActions: CreateInvoiceButton,
36167
36194
  HeaderFilters: StatusFilter
@@ -36316,6 +36343,61 @@ var DiscardInvoiceChangesModal = ({ isOpen, onOpenChange, onConfirm }) => {
36316
36343
  });
36317
36344
  };
36318
36345
  //#endregion
36346
+ //#region src/schemas/common/s3PresignedUrl.ts
36347
+ var S3PresignedUrlSchema = Schema.Struct({
36348
+ presignedUrl: Schema.String,
36349
+ fileType: Schema.String,
36350
+ fileName: Schema.String,
36351
+ createdAt: Schema.Date,
36352
+ documentId: Schema.NullishOr(Schema.UUID)
36353
+ });
36354
+ //#endregion
36355
+ //#region src/hooks/api/businesses/[business-id]/invoices/[invoice-id]/pdf/useInvoicePdfDownload.tsx
36356
+ var getInvoicePdf = get(({ businessId, invoiceId }) => `/v1/businesses/${businessId}/invoices/${invoiceId}/pdf`);
36357
+ var DOWNLOAD_INVOICE_PDF_TAG_KEY = "#download-invoice-pdf";
36358
+ var InvoicePdfReturnSchema = Schema.Struct({ data: S3PresignedUrlSchema });
36359
+ function buildKey$39({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
36360
+ if (accessToken && apiUrl) return {
36361
+ accessToken,
36362
+ apiUrl,
36363
+ businessId,
36364
+ invoiceId,
36365
+ tags: [DOWNLOAD_INVOICE_PDF_TAG_KEY]
36366
+ };
36367
+ }
36368
+ function useInvoicePdfDownload({ invoiceId, onSuccess, onError }) {
36369
+ const withLocale = useLocalizedKey();
36370
+ const { data } = useAuth();
36371
+ const { businessId } = useLayerContext();
36372
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$39(_objectSpread2(_objectSpread2({}, data), {}, {
36373
+ businessId,
36374
+ invoiceId
36375
+ }))), ({ accessToken, apiUrl, businessId, invoiceId }) => getInvoicePdf(apiUrl, accessToken, { params: {
36376
+ businessId,
36377
+ invoiceId
36378
+ } })().then(Schema.decodeUnknownPromise(InvoicePdfReturnSchema)).then(function() {
36379
+ var _ref = _asyncToGenerator(function* ({ data }) {
36380
+ if (onSuccess) yield onSuccess(data);
36381
+ return data;
36382
+ });
36383
+ return function(_x) {
36384
+ return _ref.apply(this, arguments);
36385
+ };
36386
+ }()), {
36387
+ revalidate: false,
36388
+ throwOnError: false,
36389
+ onError
36390
+ }));
36391
+ const originalTrigger = mutationResponse.trigger;
36392
+ const stableProxiedTrigger = useCallback(_asyncToGenerator(function* (...triggerParameters) {
36393
+ return originalTrigger(...triggerParameters);
36394
+ }), [originalTrigger]);
36395
+ return new Proxy(mutationResponse, { get(target, prop) {
36396
+ if (prop === "trigger") return stableProxiedTrigger;
36397
+ return Reflect.get(target, prop);
36398
+ } });
36399
+ }
36400
+ //#endregion
36319
36401
  //#region src/components/PaymentMethod/schemas.ts
36320
36402
  var PaymentMethod = /* @__PURE__ */ function(PaymentMethod) {
36321
36403
  PaymentMethod["Cash"] = "CASH";
@@ -36956,6 +37038,7 @@ function InvoiceWriteoffModal({ isOpen, onOpenChange, invoice, onSuccess }) {
36956
37038
  //#region src/components/Invoices/InvoiceDetail/InvoiceDetailHeaderMenu.tsx
36957
37039
  var InvoiceDetailHeaderMenuActions = /* @__PURE__ */ function(InvoiceDetailHeaderMenuActions) {
36958
37040
  InvoiceDetailHeaderMenuActions["Edit"] = "Edit";
37041
+ InvoiceDetailHeaderMenuActions["DownloadPdf"] = "DownloadPdf";
36959
37042
  InvoiceDetailHeaderMenuActions["Void"] = "Void";
36960
37043
  InvoiceDetailHeaderMenuActions["Refund"] = "Refund";
36961
37044
  InvoiceDetailHeaderMenuActions["Writeoff"] = "Writeoff";
@@ -36965,15 +37048,24 @@ var InvoiceDetailHeaderMenuActions = /* @__PURE__ */ function(InvoiceDetailHeade
36965
37048
  var availableActions = {
36966
37049
  [InvoiceStatus.Sent]: [
36967
37050
  InvoiceDetailHeaderMenuActions.Edit,
37051
+ InvoiceDetailHeaderMenuActions.DownloadPdf,
36968
37052
  InvoiceDetailHeaderMenuActions.Void,
36969
37053
  InvoiceDetailHeaderMenuActions.Writeoff
36970
37054
  ],
36971
- [InvoiceStatus.PartiallyPaid]: [InvoiceDetailHeaderMenuActions.Writeoff, InvoiceDetailHeaderMenuActions.Reset],
36972
- [InvoiceStatus.Paid]: [InvoiceDetailHeaderMenuActions.Refund, InvoiceDetailHeaderMenuActions.Reset],
36973
- [InvoiceStatus.Voided]: [InvoiceDetailHeaderMenuActions.Reset],
36974
- [InvoiceStatus.PartiallyWrittenOff]: [InvoiceDetailHeaderMenuActions.Reset],
36975
- [InvoiceStatus.WrittenOff]: [InvoiceDetailHeaderMenuActions.Reset],
36976
- [InvoiceStatus.Refunded]: [InvoiceDetailHeaderMenuActions.Reset]
37055
+ [InvoiceStatus.PartiallyPaid]: [
37056
+ InvoiceDetailHeaderMenuActions.DownloadPdf,
37057
+ InvoiceDetailHeaderMenuActions.Writeoff,
37058
+ InvoiceDetailHeaderMenuActions.Reset
37059
+ ],
37060
+ [InvoiceStatus.Paid]: [
37061
+ InvoiceDetailHeaderMenuActions.DownloadPdf,
37062
+ InvoiceDetailHeaderMenuActions.Refund,
37063
+ InvoiceDetailHeaderMenuActions.Reset
37064
+ ],
37065
+ [InvoiceStatus.Voided]: [InvoiceDetailHeaderMenuActions.DownloadPdf, InvoiceDetailHeaderMenuActions.Reset],
37066
+ [InvoiceStatus.PartiallyWrittenOff]: [InvoiceDetailHeaderMenuActions.DownloadPdf, InvoiceDetailHeaderMenuActions.Reset],
37067
+ [InvoiceStatus.WrittenOff]: [InvoiceDetailHeaderMenuActions.DownloadPdf, InvoiceDetailHeaderMenuActions.Reset],
37068
+ [InvoiceStatus.Refunded]: [InvoiceDetailHeaderMenuActions.DownloadPdf, InvoiceDetailHeaderMenuActions.Reset]
36977
37069
  };
36978
37070
  var getInvoiceActions = (invoice) => {
36979
37071
  return availableActions[invoice.status];
@@ -36982,7 +37074,9 @@ var InvoiceDetailHeaderMenu = ({ onEditInvoice }) => {
36982
37074
  const { t } = useTranslation();
36983
37075
  const viewState = useInvoiceDetail();
36984
37076
  const { toViewInvoice } = useInvoiceNavigation();
37077
+ const { addToast } = useLayerContext();
36985
37078
  const [openModal, setOpenModal] = useState();
37079
+ const { invisibleDownloadRef, triggerInvisibleDownload } = useInvisibleDownload();
36986
37080
  const onSuccessUpdateInvoice = useCallback((updatedInvoice) => {
36987
37081
  toViewInvoice(updatedInvoice);
36988
37082
  }, [toViewInvoice]);
@@ -36997,6 +37091,27 @@ var InvoiceDetailHeaderMenu = ({ onEditInvoice }) => {
36997
37091
  children: /* @__PURE__ */ jsx(Menu, { size: 14 })
36998
37092
  });
36999
37093
  }, []);
37094
+ const { trigger: downloadInvoicePdf, isMutating: isDownloadingInvoicePdf } = useInvoicePdfDownload({
37095
+ invoiceId: viewState.mode === UpsertInvoiceMode.Update ? viewState.invoice.id : "",
37096
+ onSuccess: ({ presignedUrl, fileName }) => {
37097
+ triggerInvisibleDownload({
37098
+ url: presignedUrl,
37099
+ filename: fileName
37100
+ });
37101
+ addToast({
37102
+ content: t("invoices:label.download_successful", "Download successful"),
37103
+ type: "success"
37104
+ });
37105
+ },
37106
+ onError: () => addToast({
37107
+ content: t("invoices:error.download_failed", "Download failed"),
37108
+ type: "error"
37109
+ })
37110
+ });
37111
+ const onDownloadInvoicePdf = () => {
37112
+ addToast({ content: t("invoices:label.download_started", "Download started") });
37113
+ downloadInvoicePdf();
37114
+ };
37000
37115
  if (viewState.mode === UpsertInvoiceMode.Create) return null;
37001
37116
  const invoice = viewState.invoice;
37002
37117
  const invoiceActions = getInvoiceActions(invoice);
@@ -37042,9 +37157,18 @@ var InvoiceDetailHeaderMenu = ({ onEditInvoice }) => {
37042
37157
  size: "sm",
37043
37158
  children: t("invoices:action.reset_to_sent", "Reset to sent")
37044
37159
  })
37045
- }, InvoiceDetailHeaderMenuActions.Reset)
37160
+ }, InvoiceDetailHeaderMenuActions.Reset),
37161
+ invoiceActions.includes(InvoiceDetailHeaderMenuActions.DownloadPdf) && /* @__PURE__ */ jsx(MenuItem$2, {
37162
+ isDisabled: isDownloadingInvoicePdf,
37163
+ onClick: onDownloadInvoicePdf,
37164
+ children: /* @__PURE__ */ jsx(Span, {
37165
+ size: "sm",
37166
+ children: t("invoices:action.download_pdf", "Download PDF")
37167
+ })
37168
+ }, InvoiceDetailHeaderMenuActions.DownloadPdf)
37046
37169
  ] })
37047
37170
  }),
37171
+ /* @__PURE__ */ jsx(InvisibleDownload, { ref: invisibleDownloadRef }),
37048
37172
  /* @__PURE__ */ jsx(InvoiceRefundModal, {
37049
37173
  isOpen: openModal === InvoiceDetailHeaderMenuActions.Refund,
37050
37174
  onOpenChange: onOpenChangeByMode(InvoiceDetailHeaderMenuActions.Refund),
@@ -37072,6 +37196,27 @@ var InvoiceDetailHeaderMenu = ({ onEditInvoice }) => {
37072
37196
  ] });
37073
37197
  };
37074
37198
  //#endregion
37199
+ //#region src/components/Invoices/InvoicePreview/InvoicePdfDownloadButton.tsx
37200
+ var InvoicePdfDownloadButton = ({ invoiceId }) => {
37201
+ const { t } = useTranslation();
37202
+ const { invisibleDownloadRef, triggerInvisibleDownload } = useInvisibleDownload();
37203
+ const { trigger, isMutating, isError } = useInvoicePdfDownload({
37204
+ invoiceId,
37205
+ onSuccess: ({ presignedUrl, fileName }) => triggerInvisibleDownload({
37206
+ url: presignedUrl,
37207
+ filename: fileName
37208
+ })
37209
+ });
37210
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Button$1, {
37211
+ isPending: isMutating,
37212
+ isDisabled: isMutating,
37213
+ onPress: () => {
37214
+ trigger();
37215
+ },
37216
+ children: [isError ? t("common:action.retry_label", "Retry") : t("invoices:action.download_pdf", "Download PDF"), isError ? /* @__PURE__ */ jsx(RefreshCcw, { size: 14 }) : /* @__PURE__ */ jsx(Download, { size: 14 })]
37217
+ }), /* @__PURE__ */ jsx(InvisibleDownload, { ref: invisibleDownloadRef })] });
37218
+ };
37219
+ //#endregion
37075
37220
  //#region src/components/Invoices/InvoiceDetail/InvoiceDetailHeader.tsx
37076
37221
  var HeaderMode = /* @__PURE__ */ function(HeaderMode) {
37077
37222
  HeaderMode["View"] = "View";
@@ -37086,8 +37231,8 @@ var getHeaderMode = (viewState) => {
37086
37231
  };
37087
37232
  var HEADING_I18N = {
37088
37233
  [HeaderMode.Preview]: {
37089
- withNumber: translationKey("invoices:label.previewing_invoice_number", "Previewing Invoice #{{invoiceNumber}}"),
37090
- noNumber: translationKey("invoices:label.previewing_invoice", "Previewing Invoice")
37234
+ withNumber: translationKey("invoices:label.invoice_number", "Invoice #{{invoiceNumber}}"),
37235
+ noNumber: translationKey("invoices:action.view_invoice", "View Invoice")
37091
37236
  },
37092
37237
  [HeaderMode.View]: {
37093
37238
  withNumber: translationKey("invoices:label.invoice_number", "Invoice #{{invoiceNumber}}"),
@@ -37104,26 +37249,29 @@ var getHeadingContent = (headerMode, invoiceNumber, t) => {
37104
37249
  };
37105
37250
  var InvoiceDetailHeader = ({ onSubmitInvoiceForm, formState, openInvoicePaymentDrawer }) => {
37106
37251
  const { t } = useTranslation();
37252
+ const { accountingConfiguration } = useLayerContext();
37107
37253
  const viewState = useInvoiceDetail();
37108
37254
  const { toEditInvoice } = useInvoiceNavigation();
37109
- const onPressNext = useCallback(() => {
37110
- onSubmitInvoiceForm();
37111
- }, [onSubmitInvoiceForm]);
37112
- const previewButton = useMemo(() => /* @__PURE__ */ jsxs(Button$1, {
37255
+ const buttonContent = !!(accountingConfiguration === null || accountingConfiguration === void 0 ? void 0 : accountingConfiguration.enableStripeOnboarding) ? {
37256
+ label: t("common:label.next", "Next"),
37257
+ icon: /* @__PURE__ */ jsx(ArrowRight, { size: 14 })
37258
+ } : {
37259
+ label: t("common:action.save_label", "Save"),
37260
+ icon: /* @__PURE__ */ jsx(Save, { size: 14 })
37261
+ };
37262
+ const formStepButton = /* @__PURE__ */ jsxs(Button$1, {
37113
37263
  isDisabled: formState.isSubmitting,
37114
- onPress: onPressNext,
37115
- children: [t("common:label.next", "Next"), /* @__PURE__ */ jsx(ArrowRight, { size: 14 })]
37116
- }), [
37117
- t,
37118
- formState.isSubmitting,
37119
- onPressNext
37120
- ]);
37264
+ onPress: () => {
37265
+ onSubmitInvoiceForm();
37266
+ },
37267
+ children: [buttonContent.label, buttonContent.icon]
37268
+ });
37121
37269
  if (viewState.mode === UpsertInvoiceMode.Create) return /* @__PURE__ */ jsxs(HStack, {
37122
37270
  justify: "space-between",
37123
37271
  align: "center",
37124
37272
  fluid: true,
37125
37273
  pie: "md",
37126
- children: [/* @__PURE__ */ jsx(Heading$2, { children: t("invoices:action.create_invoice", "Create Invoice") }), previewButton]
37274
+ children: [/* @__PURE__ */ jsx(Heading$2, { children: t("invoices:action.create_invoice", "Create Invoice") }), formStepButton]
37127
37275
  });
37128
37276
  const headerMode = getHeaderMode(viewState);
37129
37277
  const headingContent = getHeadingContent(headerMode, viewState.invoice.invoiceNumber, t);
@@ -37139,7 +37287,8 @@ var InvoiceDetailHeader = ({ onSubmitInvoiceForm, formState, openInvoicePaymentD
37139
37287
  ellipsis: true,
37140
37288
  children: headingContent
37141
37289
  }),
37142
- headerMode === HeaderMode.Edit && previewButton,
37290
+ headerMode === HeaderMode.Edit && formStepButton,
37291
+ headerMode === HeaderMode.Preview && /* @__PURE__ */ jsx(InvoicePdfDownloadButton, { invoiceId: viewState.invoice.id }),
37143
37292
  headerMode === HeaderMode.View && /* @__PURE__ */ jsxs(HStack, {
37144
37293
  gap: "xs",
37145
37294
  children: [canMarkAsPaid && /* @__PURE__ */ jsxs(Button$1, {
@@ -37651,29 +37800,6 @@ var InvoicePaymentDrawer = ({ isOpen, onOpenChange, invoice }) => {
37651
37800
  });
37652
37801
  };
37653
37802
  //#endregion
37654
- //#region src/hooks/api/businesses/[business-id]/accounting-config/useAccountingConfiguration.tsx
37655
- var ACCOUNTING_CONFIGURATION_TAG_KEY = "#accounting-configuration";
37656
- function buildKey$33({ access_token: accessToken, apiUrl, businessId }) {
37657
- if (accessToken && apiUrl) return {
37658
- accessToken,
37659
- apiUrl,
37660
- businessId,
37661
- tag: [ACCOUNTING_CONFIGURATION_TAG_KEY]
37662
- };
37663
- }
37664
- var getAccountingConfiguration = get(({ businessId }) => {
37665
- return `/v1/businesses/${businessId}/accounting-config`;
37666
- });
37667
- function useAccountingConfiguration({ businessId }) {
37668
- const { apiUrl } = useEnvironment();
37669
- const { data: auth } = useAuth();
37670
- const queryKey = buildKey$33(_objectSpread2(_objectSpread2({}, auth), {}, {
37671
- apiUrl,
37672
- businessId
37673
- }));
37674
- return new SWRQueryResult(useSWR(() => queryKey, ({ accessToken, apiUrl, businessId }) => getAccountingConfiguration(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema$1.decodeUnknownPromise(AccountingConfigurationSchema)(data))));
37675
- }
37676
- //#endregion
37677
37803
  //#region src/hooks/api/businesses/[business-id]/customers/useUpsertCustomer.tsx
37678
37804
  var UPSERT_CUSTOMER_TAG_KEY = "#upsert-customer";
37679
37805
  var UpsertCustomerMode = /* @__PURE__ */ function(UpsertCustomerMode) {
@@ -37683,7 +37809,7 @@ var UpsertCustomerMode = /* @__PURE__ */ function(UpsertCustomerMode) {
37683
37809
  }({});
37684
37810
  var createCustomer = post(({ businessId }) => `/v1/businesses/${businessId}/customers`);
37685
37811
  var updateCustomer = patch(({ businessId, customerId }) => `/v1/businesses/${businessId}/customers/${customerId}`);
37686
- function buildKey$32({ access_token: accessToken, apiUrl, businessId, customerId = void 0 }) {
37812
+ function buildKey$33({ access_token: accessToken, apiUrl, businessId, customerId = void 0 }) {
37687
37813
  if (accessToken && apiUrl) return {
37688
37814
  accessToken,
37689
37815
  apiUrl,
@@ -37727,7 +37853,7 @@ var useUpsertCustomer = (props) => {
37727
37853
  const { businessId } = useLayerContext();
37728
37854
  const { mode } = props;
37729
37855
  const customerId = mode === UpsertCustomerMode.Update ? props.customerId : void 0;
37730
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$32(_objectSpread2(_objectSpread2({}, data), {}, {
37856
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$33(_objectSpread2(_objectSpread2({}, data), {}, {
37731
37857
  businessId,
37732
37858
  customerId
37733
37859
  }))), ({ accessToken, apiUrl, businessId, customerId }, { arg: body }) => {
@@ -38757,13 +38883,11 @@ var useInvoiceForm = (props) => {
38757
38883
  //#region src/components/Invoices/InvoiceForm/InvoiceForm.tsx
38758
38884
  var _excluded$14 = ["isReadOnly"];
38759
38885
  var InvoiceForm = forwardRef((props, ref) => {
38760
- var _accountingConfig$ena;
38761
38886
  const _useInvoiceDetail = useInvoiceDetail(), { isReadOnly } = _useInvoiceDetail, viewState = _objectWithoutProperties(_useInvoiceDetail, _excluded$14);
38762
38887
  const { mode } = viewState;
38763
38888
  const { onSuccess, onChangeFormState } = props;
38764
- const { businessId } = useLayerContext();
38765
- const { data: accountingConfig } = useAccountingConfiguration({ businessId });
38766
- const enableCustomerManagement = (_accountingConfig$ena = accountingConfig === null || accountingConfig === void 0 ? void 0 : accountingConfig.enableCustomerManagement) !== null && _accountingConfig$ena !== void 0 ? _accountingConfig$ena : false;
38889
+ const { accountingConfiguration } = useLayerContext();
38890
+ const enableCustomerManagement = (accountingConfiguration === null || accountingConfiguration === void 0 ? void 0 : accountingConfiguration.enableCustomerManagement) === true;
38767
38891
  const { form, formState, totals, submitError } = useInvoiceForm(_objectSpread2({ onSuccess }, viewState));
38768
38892
  const initialDueAt = mode === UpsertInvoiceMode.Update ? viewState.invoice.dueAt : null;
38769
38893
  const { formState: customerFormState, isOpen: isCustomerDrawerOpen, editCustomer, createCustomer, onOpenChange: onCustomerDrawerOpenChange, onSuccess: onCustomerDrawerSuccess } = useCustomerFormDrawer(form);
@@ -38825,7 +38949,8 @@ var InvoicePaymentMethodsResponseSchema = Schema.Struct({ data: InvoicePaymentMe
38825
38949
  //#endregion
38826
38950
  //#region src/hooks/api/businesses/[business-id]/invoices/[invoice-id]/payment-methods/useInvoicePaymentMethods.tsx
38827
38951
  var INVOICE_PAYMENT_METHODS_TAG_KEY = "#invoice-payment-methods";
38828
- function buildKey$31({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
38952
+ function buildKey$32({ access_token: accessToken, apiUrl, businessId, isEnabled, invoiceId }) {
38953
+ if (!isEnabled) return;
38829
38954
  if (accessToken && apiUrl && invoiceId) return {
38830
38955
  accessToken,
38831
38956
  apiUrl,
@@ -38835,12 +38960,13 @@ function buildKey$31({ access_token: accessToken, apiUrl, businessId, invoiceId
38835
38960
  };
38836
38961
  }
38837
38962
  var getInvoicePaymentMethods = get(({ businessId, invoiceId }) => `/v1/businesses/${businessId}/invoices/${invoiceId}/payment-methods`);
38838
- function useInvoicePaymentMethods({ invoiceId }) {
38963
+ function useInvoicePaymentMethods({ invoiceId, isEnabled = true }) {
38839
38964
  const withLocale = useLocalizedKey();
38840
38965
  const { data } = useAuth();
38841
38966
  const { businessId } = useLayerContext();
38842
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$31(_objectSpread2(_objectSpread2({}, data), {}, {
38967
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$32(_objectSpread2(_objectSpread2({}, data), {}, {
38843
38968
  businessId,
38969
+ isEnabled,
38844
38970
  invoiceId
38845
38971
  }))), ({ accessToken, apiUrl, businessId, invoiceId }) => getInvoicePaymentMethods(apiUrl, accessToken, { params: {
38846
38972
  businessId,
@@ -38853,7 +38979,7 @@ var FINALIZE_INVOICE_TAG_KEY = "#finalize-invoice";
38853
38979
  var FinalizeInvoiceBodySchema = Schema.extend(InvoicePaymentMethodsSchema, Schema.Struct({ customPaymentInstructions: Schema.optional(Schema.String).pipe(Schema.fromKey("custom_payment_instructions")) }));
38854
38980
  var FinalizeInvoiceResponseSchema = Schema.Struct({ data: Schema.extend(InvoicePaymentMethodsSchema, Schema.Struct({ invoice: InvoiceSchema })) });
38855
38981
  var finalizeInvoice = put(({ businessId, invoiceId }) => `/v1/businesses/${businessId}/invoices/${invoiceId}/finalize-invoice`);
38856
- function buildKey$30({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
38982
+ function buildKey$31({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
38857
38983
  if (accessToken && apiUrl) return {
38858
38984
  accessToken,
38859
38985
  apiUrl,
@@ -38867,7 +38993,7 @@ function useFinalizeInvoice({ invoiceId }) {
38867
38993
  const { data } = useAuth();
38868
38994
  const { businessId } = useLayerContext();
38869
38995
  const { mutate } = useSWRConfig();
38870
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$30(_objectSpread2(_objectSpread2({}, data), {}, {
38996
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$31(_objectSpread2(_objectSpread2({}, data), {}, {
38871
38997
  businessId,
38872
38998
  invoiceId
38873
38999
  }))), ({ accessToken, apiUrl, businessId, invoiceId }, { arg: body }) => finalizeInvoice(apiUrl, accessToken, {
@@ -39039,7 +39165,7 @@ var InvoiceFinalizeForm = ({ invoice, initialPaymentMethods, onSuccess }) => {
39039
39165
  //#endregion
39040
39166
  //#region src/hooks/api/businesses/[business-id]/invoices/[invoice-id]/html/useInvoicePreview.tsx
39041
39167
  var INVOICE_PREVIEW_TAG_KEY = "#invoices-preview";
39042
- function buildKey$29({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
39168
+ function buildKey$30({ access_token: accessToken, apiUrl, businessId, invoiceId }) {
39043
39169
  if (accessToken && apiUrl) return {
39044
39170
  accessToken,
39045
39171
  apiUrl,
@@ -39053,7 +39179,7 @@ function useInvoicePreview({ invoiceId }) {
39053
39179
  const withLocale = useLocalizedKey();
39054
39180
  const { data } = useAuth();
39055
39181
  const { businessId } = useLayerContext();
39056
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$29(_objectSpread2(_objectSpread2({}, data), {}, {
39182
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$30(_objectSpread2(_objectSpread2({}, data), {}, {
39057
39183
  businessId,
39058
39184
  invoiceId
39059
39185
  }))), ({ accessToken, apiUrl, businessId, invoiceId }) => getInvoicePreview(apiUrl, accessToken, { params: {
@@ -39097,16 +39223,21 @@ var InvoicePreview = () => {
39097
39223
  //#region src/components/Invoices/InvoicePreview/InvoiceFinalizeStep.tsx
39098
39224
  var InvoiceFinalizeStep = ({ onSuccess }) => {
39099
39225
  const { t } = useTranslation();
39226
+ const { accountingConfiguration } = useLayerContext();
39100
39227
  const { invoice } = useInvoicePreviewRoute();
39101
- const { data, isLoading, isError } = useInvoicePaymentMethods({ invoiceId: invoice.id });
39228
+ const showPaymentMethods = !!(accountingConfiguration === null || accountingConfiguration === void 0 ? void 0 : accountingConfiguration.enableStripeOnboarding);
39229
+ const { data, isLoading, isError } = useInvoicePaymentMethods({
39230
+ invoiceId: invoice.id,
39231
+ isEnabled: showPaymentMethods
39232
+ });
39102
39233
  const paymentMethodsData = data === null || data === void 0 ? void 0 : data.data;
39103
39234
  return /* @__PURE__ */ jsxs(HStack, {
39104
- className: "Layer__InvoiceFinalizeStep",
39235
+ className: classNames("Layer__InvoiceFinalizeStep", !showPaymentMethods && "Layer__InvoiceFinalizeStep--previewOnly"),
39105
39236
  children: [/* @__PURE__ */ jsx(VStack, {
39106
- className: "Layer__InvoiceFinalizeStep__PreviewPanel",
39237
+ className: classNames("Layer__InvoiceFinalizeStep__PreviewPanel", !showPaymentMethods && "Layer__InvoiceFinalizeStep__PreviewPanel--previewOnly"),
39107
39238
  fluid: true,
39108
39239
  children: /* @__PURE__ */ jsx(InvoicePreview, {})
39109
- }), /* @__PURE__ */ jsx(VStack, {
39240
+ }), showPaymentMethods && /* @__PURE__ */ jsx(VStack, {
39110
39241
  className: "Layer__InvoiceFinalizeStep__PaymentMethodsPanel",
39111
39242
  fluid: true,
39112
39243
  children: /* @__PURE__ */ jsx(ConditionalBlock, {
@@ -39146,11 +39277,21 @@ var InvoiceDetail = () => {
39146
39277
  const [isPaymentDrawerOpen, setIsPaymentDrawerOpen] = useState(false);
39147
39278
  const [isDiscardChangesModalOpen, setIsDiscardChangesModalOpen] = useState(false);
39148
39279
  const { toInvoiceTable, toPreviewInvoice, toEditInvoice, toViewInvoice } = useInvoiceNavigation();
39149
- const { addToast } = useLayerContext();
39280
+ const { addToast, accountingConfiguration } = useLayerContext();
39281
+ const enablePaymentMethodsOnFinalize = !!(accountingConfiguration === null || accountingConfiguration === void 0 ? void 0 : accountingConfiguration.enableStripeOnboarding);
39150
39282
  const invoiceFormRef = useRef(null);
39151
39283
  const onUpsertInvoiceSuccess = useCallback((invoice) => {
39284
+ if (!enablePaymentMethodsOnFinalize) addToast({
39285
+ content: t("invoices:label.invoice_saved", "Invoice saved"),
39286
+ type: "success"
39287
+ });
39152
39288
  toPreviewInvoice(invoice);
39153
- }, [toPreviewInvoice]);
39289
+ }, [
39290
+ addToast,
39291
+ enablePaymentMethodsOnFinalize,
39292
+ t,
39293
+ toPreviewInvoice
39294
+ ]);
39154
39295
  const onSubmitInvoiceForm = useCallback(() => {
39155
39296
  var _invoiceFormRef$curre;
39156
39297
  return (_invoiceFormRef$curre = invoiceFormRef.current) === null || _invoiceFormRef$curre === void 0 ? void 0 : _invoiceFormRef$curre.submit();
@@ -39446,7 +39587,7 @@ var StripeAccountStatusResponseSchema = Schema.Struct({ data: StripeAccountStatu
39446
39587
  //#endregion
39447
39588
  //#region src/hooks/api/businesses/[business-id]/stripe/status/useStripeAccountStatus.tsx
39448
39589
  var STRIPE_ACCOUNT_STATUS_TAG_KEY = "#stripe-account-status";
39449
- function buildKey$28({ access_token: accessToken, apiUrl, businessId }) {
39590
+ function buildKey$29({ access_token: accessToken, apiUrl, businessId }) {
39450
39591
  if (accessToken && apiUrl) return {
39451
39592
  accessToken,
39452
39593
  apiUrl,
@@ -39460,7 +39601,7 @@ function useStripeAccountStatus() {
39460
39601
  const { data } = useAuth();
39461
39602
  const { businessId } = useLayerContext();
39462
39603
  const { apiUrl } = useEnvironment();
39463
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$28(_objectSpread2(_objectSpread2({}, data), {}, {
39604
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$29(_objectSpread2(_objectSpread2({}, data), {}, {
39464
39605
  apiUrl,
39465
39606
  businessId
39466
39607
  }))), ({ accessToken, apiUrl, businessId }) => getStripeAccountStatus(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(StripeAccountStatusResponseSchema)).then(({ data }) => data)));
@@ -39580,7 +39721,7 @@ var StripeConnectAccountLinkDataSchema = Schema.Struct({
39580
39721
  });
39581
39722
  var StripeConnectAccountLinkResponseSchema = Schema.Struct({ data: StripeConnectAccountLinkDataSchema });
39582
39723
  var createStripeConnectAccountLink = post(({ businessId }) => `/v1/businesses/${businessId}/stripe/connect-account-link`);
39583
- function buildKey$27({ access_token: accessToken, apiUrl, businessId }) {
39724
+ function buildKey$28({ access_token: accessToken, apiUrl, businessId }) {
39584
39725
  if (accessToken && apiUrl) return {
39585
39726
  accessToken,
39586
39727
  apiUrl,
@@ -39593,7 +39734,7 @@ function useStripeConnectAccountLink() {
39593
39734
  const { data } = useAuth();
39594
39735
  const { businessId } = useLayerContext();
39595
39736
  const { apiUrl } = useEnvironment();
39596
- return new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$27(_objectSpread2(_objectSpread2({}, data), {}, {
39737
+ return new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$28(_objectSpread2(_objectSpread2({}, data), {}, {
39597
39738
  apiUrl,
39598
39739
  businessId
39599
39740
  }))), ({ accessToken, apiUrl, businessId }) => {
@@ -39692,9 +39833,10 @@ var InvoiceOverview = () => {
39692
39833
  //#endregion
39693
39834
  //#region src/components/Invoices/Invoices.tsx
39694
39835
  var Invoices = ({ stringOverrides }) => {
39836
+ const { t } = useTranslation();
39695
39837
  usePreloadCustomers();
39696
39838
  return /* @__PURE__ */ jsx(InvoicesRouteStoreProvider, { children: /* @__PURE__ */ jsx(View, {
39697
- title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || "Invoices",
39839
+ title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || t("invoices:label.invoices", "Invoices"),
39698
39840
  children: /* @__PURE__ */ jsx(InvoicesContent, {})
39699
39841
  }) });
39700
39842
  };
@@ -39759,7 +39901,7 @@ var Components = ({ hideChart = false, hideTable = false, stringOverrides }) =>
39759
39901
  //#region src/hooks/api/businesses/[business-id]/reports/config/useReportConfig.ts
39760
39902
  var REPORT_CONFIG_TAG_KEY = "#report-config";
39761
39903
  var getReportConfig = get(({ businessId }) => `/v1/businesses/${businessId}/reports/config`);
39762
- function buildKey$26({ access_token: accessToken, apiUrl, businessId }) {
39904
+ function buildKey$27({ access_token: accessToken, apiUrl, businessId }) {
39763
39905
  if (accessToken && apiUrl) return {
39764
39906
  accessToken,
39765
39907
  apiUrl,
@@ -39771,7 +39913,7 @@ function useReportConfig() {
39771
39913
  const withLocale = useLocalizedKey();
39772
39914
  const { data: auth } = useAuth();
39773
39915
  const { businessId } = useLayerContext();
39774
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$26(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
39916
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$27(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
39775
39917
  var _ref = _asyncToGenerator(function* ({ accessToken, apiUrl, businessId }) {
39776
39918
  return getReportConfig(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(ReportConfigResponseSchema)).then(({ data }) => data);
39777
39919
  });
@@ -40015,31 +40157,13 @@ var TreeItemContent$1 = (_ref3) => {
40015
40157
  };
40016
40158
  TreeItemContent$1.displayName = "TreeItemContent";
40017
40159
  //#endregion
40018
- //#region src/components/TreeNavigation/utils.ts
40019
- var visitTree = (items, isGroup, getChildren, onGroup, onLeaf) => {
40020
- for (const node of items) if (isGroup(node)) {
40021
- onGroup(node);
40022
- visitTree(getChildren(node), isGroup, getChildren, onGroup, onLeaf);
40023
- } else onLeaf(node);
40024
- };
40025
- var indexTree = ({ items, isGroup, getChildren, getGroupId, getLeafId }) => {
40026
- const groupIds = [];
40027
- const leafMap = /* @__PURE__ */ new Map();
40028
- visitTree(items, isGroup, getChildren, (group) => groupIds.push(getGroupId(group)), (leaf) => leafMap.set(getLeafId(leaf), leaf));
40029
- return {
40030
- groupIds,
40031
- leafMap
40032
- };
40033
- };
40034
- //#endregion
40035
- //#region src/components/TreeNavigation/TreeNavigation.tsx
40036
- var renderTreeGroup = ({ group, groupConfig, onToggle, renderItem, chevronLabel }) => {
40037
- const groupId = groupConfig.getId(group);
40160
+ //#region src/components/NestedNavigation/TreeNavigation/TreeNavigationGroup.tsx
40161
+ function TreeNavigationGroup({ id, group, groupConfig, onToggle, renderItem, chevronLabel }) {
40038
40162
  const textValue = groupConfig.getTextValue(group);
40039
40163
  return /* @__PURE__ */ jsxs(TreeItem$1, {
40040
- id: groupId,
40164
+ id,
40041
40165
  textValue,
40042
- onAction: () => onToggle(groupId),
40166
+ onAction: () => onToggle(id),
40043
40167
  children: [/* @__PURE__ */ jsx(TreeItemContent$1, { children: /* @__PURE__ */ jsxs(HStack, {
40044
40168
  className: "Layer__TreeNavigation__Row",
40045
40169
  align: "center",
@@ -40058,22 +40182,64 @@ var renderTreeGroup = ({ group, groupConfig, onToggle, renderItem, chevronLabel
40058
40182
  children: renderItem
40059
40183
  })]
40060
40184
  });
40185
+ }
40186
+ //#endregion
40187
+ //#region src/components/NestedNavigation/TreeNavigation/TreeNavigationLeaf.tsx
40188
+ function TreeNavigationLeaf({ id, leaf, leafConfig }) {
40189
+ return /* @__PURE__ */ jsx(TreeItem$1, {
40190
+ id,
40191
+ textValue: leafConfig.getTextValue(leaf),
40192
+ children: /* @__PURE__ */ jsx(TreeItemContent$1, { children: leafConfig.renderLabel(leaf) })
40193
+ });
40194
+ }
40195
+ //#endregion
40196
+ //#region src/components/NestedNavigation/utils.ts
40197
+ var indexRecursiveNavigation = ({ items, isGroup, groupConfig, leafConfig }) => {
40198
+ const groupIds = [];
40199
+ const leafMap = /* @__PURE__ */ new Map();
40200
+ const visit = (nodes) => {
40201
+ for (const node of nodes) if (isGroup(node)) {
40202
+ groupIds.push(groupConfig.getId(node));
40203
+ visit(groupConfig.getChildren(node));
40204
+ } else leafMap.set(leafConfig.getId(node), node);
40205
+ };
40206
+ visit(items);
40207
+ return {
40208
+ groupIds,
40209
+ leafMap
40210
+ };
40061
40211
  };
40062
- var renderTreeLeaf = ({ leaf, leafConfig }) => /* @__PURE__ */ jsx(TreeItem$1, {
40063
- id: leafConfig.getId(leaf),
40064
- textValue: leafConfig.getTextValue(leaf),
40065
- children: /* @__PURE__ */ jsx(TreeItemContent$1, { children: leafConfig.renderLabel(leaf) })
40066
- });
40212
+ var indexFlatNavigation = ({ items, groupConfig, leafConfig }) => {
40213
+ const groupIds = [];
40214
+ const leafMap = /* @__PURE__ */ new Map();
40215
+ for (const group of items) {
40216
+ groupIds.push(groupConfig.getId(group));
40217
+ for (const leaf of groupConfig.getChildren(group)) leafMap.set(leafConfig.getId(leaf), leaf);
40218
+ }
40219
+ return {
40220
+ groupIds,
40221
+ leafMap
40222
+ };
40223
+ };
40224
+ var getSelectedItemSet = (selectedItem) => selectedItem != null ? new Set([selectedItem]) : /* @__PURE__ */ new Set();
40225
+ var handleSelectItem = ({ selection, leafMap, onSelectLeaf }) => {
40226
+ if (selection === "all") return;
40227
+ const nextKey = selection.values().next().value;
40228
+ if (nextKey == null) return;
40229
+ const leaf = leafMap.get(nextKey);
40230
+ if (leaf) onSelectLeaf(leaf);
40231
+ };
40232
+ //#endregion
40233
+ //#region src/components/NestedNavigation/TreeNavigation/TreeNavigation.tsx
40067
40234
  function TreeNavigation({ items, selectedItem, isGroup, groupConfig, leafConfig, ariaLabel }) {
40068
40235
  const { t } = useTranslation();
40069
40236
  const chevronLabel = useCallback((groupName) => t("common:action.toggle_section", "Toggle {{name}}", { name: groupName }), [t]);
40070
40237
  const itemArray = useMemo(() => Array.from(items), [items]);
40071
- const { groupIds, leafMap } = useMemo(() => indexTree({
40238
+ const { groupIds, leafMap } = useMemo(() => indexRecursiveNavigation({
40072
40239
  items: itemArray,
40073
40240
  isGroup,
40074
- getChildren: groupConfig.getChildren,
40075
- getGroupId: groupConfig.getId,
40076
- getLeafId: leafConfig.getId
40241
+ groupConfig,
40242
+ leafConfig
40077
40243
  }), [
40078
40244
  itemArray,
40079
40245
  isGroup,
@@ -40090,22 +40256,23 @@ function TreeNavigation({ items, selectedItem, isGroup, groupConfig, leafConfig,
40090
40256
  });
40091
40257
  }, []);
40092
40258
  const handleSelectionChange = useCallback((selection) => {
40093
- if (selection === "all") return;
40094
- const nextKey = selection.values().next().value;
40095
- if (nextKey == null) return;
40096
- const leaf = leafMap.get(nextKey);
40097
- if (leaf) leafConfig.onSelectLeaf(leaf);
40259
+ handleSelectItem({
40260
+ selection,
40261
+ leafMap,
40262
+ onSelectLeaf: leafConfig.onSelectLeaf
40263
+ });
40098
40264
  }, [leafMap, leafConfig]);
40099
- const selectedItems = selectedItem != null ? [selectedItem] : [];
40100
40265
  const renderItem = (item) => {
40101
- if (isGroup(item)) return renderTreeGroup({
40266
+ if (isGroup(item)) return /* @__PURE__ */ jsx(TreeNavigationGroup, {
40267
+ id: groupConfig.getId(item),
40102
40268
  group: item,
40103
40269
  groupConfig,
40104
40270
  onToggle: toggleGroup,
40105
40271
  renderItem,
40106
40272
  chevronLabel
40107
40273
  });
40108
- return renderTreeLeaf({
40274
+ return /* @__PURE__ */ jsx(TreeNavigationLeaf, {
40275
+ id: leafConfig.getId(item),
40109
40276
  leaf: item,
40110
40277
  leafConfig
40111
40278
  });
@@ -40113,7 +40280,7 @@ function TreeNavigation({ items, selectedItem, isGroup, groupConfig, leafConfig,
40113
40280
  return /* @__PURE__ */ jsx(Tree$1, {
40114
40281
  "aria-label": ariaLabel,
40115
40282
  selectionMode: "single",
40116
- selectedKeys: selectedItems,
40283
+ selectedKeys: getSelectedItemSet(selectedItem),
40117
40284
  onSelectionChange: handleSelectionChange,
40118
40285
  disabledKeys: groupIds,
40119
40286
  disabledBehavior: "selection",
@@ -40125,7 +40292,7 @@ function TreeNavigation({ items, selectedItem, isGroup, groupConfig, leafConfig,
40125
40292
  });
40126
40293
  }
40127
40294
  //#endregion
40128
- //#region src/components/TreeNavigation/TreeNavigationSkeleton.tsx
40295
+ //#region src/components/NestedNavigation/TreeNavigation/TreeNavigationSkeleton.tsx
40129
40296
  var TreeNavigationSkeleton = ({ groups = 2, leavesPerGroup = 3 }) => /* @__PURE__ */ jsx(VStack, {
40130
40297
  className: "Layer__TreeNavigationSkeleton",
40131
40298
  "aria-hidden": "true",
@@ -40147,8 +40314,8 @@ var TreeNavigationSkeleton = ({ groups = 2, leavesPerGroup = 3 }) => /* @__PURE_
40147
40314
  }, leafIndex))] }, groupIndex))
40148
40315
  });
40149
40316
  //#endregion
40150
- //#region src/components/ReportsNavigation/ReportsNavigation.tsx
40151
- var ReportsNavigationError = () => {
40317
+ //#region src/components/ReportsNavigation/ReportsNavigationSidebarError.tsx
40318
+ var ReportsNavigationSidebarError = () => {
40152
40319
  const { t } = useTranslation();
40153
40320
  return /* @__PURE__ */ jsx(DataState, {
40154
40321
  status: DataStateStatus.failed,
@@ -40157,37 +40324,51 @@ var ReportsNavigationError = () => {
40157
40324
  spacing: true
40158
40325
  });
40159
40326
  };
40327
+ //#endregion
40328
+ //#region src/components/ReportsNavigation/utils.tsx
40160
40329
  var isReportGroup = (item) => "reports" in item;
40161
- var groupConfig = {
40330
+ var sharedReportGroupConfig = {
40162
40331
  getId: (group) => group.groupType,
40163
40332
  getTextValue: (group) => group.displayName,
40164
- getChildren: (group) => group.reports,
40165
- renderLabel: (group) => {
40166
- return /* @__PURE__ */ jsx(Span, {
40167
- ellipsis: true,
40168
- weight: "bold",
40169
- children: group.displayName
40170
- });
40171
- }
40333
+ getChildren: (group) => group.reports
40172
40334
  };
40173
- var buildLeafConfig = (onSelectLeaf) => ({
40335
+ var buildRecursiveReportsGroupConfig = (renderLabel) => _objectSpread2(_objectSpread2({}, sharedReportGroupConfig), {}, {
40336
+ isRecursive: true,
40337
+ renderLabel
40338
+ });
40339
+ var buildFlatReportsGroupConfig = (renderLabel) => _objectSpread2(_objectSpread2({}, sharedReportGroupConfig), {}, {
40340
+ isRecursive: false,
40341
+ renderLabel
40342
+ });
40343
+ var buildReportsLeafConfig = (onSelectLeaf, renderLabel) => ({
40174
40344
  getId: (leaf) => leaf.key,
40175
40345
  getTextValue: (leaf) => leaf.displayName,
40176
- renderLabel: (leaf) => /* @__PURE__ */ jsx(Span, { children: leaf.displayName }),
40346
+ renderLabel,
40177
40347
  onSelectLeaf
40178
40348
  });
40179
- function ReportsNavigation() {
40349
+ //#endregion
40350
+ //#region src/components/ReportsNavigation/ReportsNavigationSidebar.tsx
40351
+ var groupConfig$1 = buildRecursiveReportsGroupConfig((group) => /* @__PURE__ */ jsx(Span, {
40352
+ ellipsis: true,
40353
+ weight: "bold",
40354
+ children: group.displayName
40355
+ }));
40356
+ var renderLeafLabel$1 = (leaf) => /* @__PURE__ */ jsx(Span, {
40357
+ ellipsis: true,
40358
+ children: leaf.displayName
40359
+ });
40360
+ function ReportsNavigationSidebar() {
40180
40361
  const { t } = useTranslation();
40181
40362
  const { data, isLoading, isError } = useReportConfig();
40182
40363
  const { baseReport, setBaseReport } = useBaseUnifiedReport();
40183
- const leafConfig = useMemo(() => buildLeafConfig(setBaseReport), [setBaseReport]);
40364
+ const leafConfig = useMemo(() => buildReportsLeafConfig(setBaseReport, renderLeafLabel$1), [setBaseReport]);
40184
40365
  return /* @__PURE__ */ jsx(ConditionalBlock, {
40185
40366
  data,
40186
40367
  isLoading,
40187
40368
  Loading: /* @__PURE__ */ jsx(TreeNavigationSkeleton, {}),
40188
40369
  Inactive: null,
40189
40370
  isError,
40190
- Error: /* @__PURE__ */ jsx(ReportsNavigationError, {}),
40371
+ Error: /* @__PURE__ */ jsx(ReportsNavigationSidebarError, {}),
40191
40372
  children: ({ data }) => {
40192
40373
  var _baseReport$key;
40193
40374
  return /* @__PURE__ */ jsx(TreeNavigation, {
@@ -40195,7 +40376,7 @@ function ReportsNavigation() {
40195
40376
  items: data,
40196
40377
  selectedItem: (_baseReport$key = baseReport === null || baseReport === void 0 ? void 0 : baseReport.key) !== null && _baseReport$key !== void 0 ? _baseReport$key : null,
40197
40378
  isGroup: isReportGroup,
40198
- groupConfig,
40379
+ groupConfig: groupConfig$1,
40199
40380
  leafConfig
40200
40381
  });
40201
40382
  }
@@ -40254,15 +40435,6 @@ function ReportsMobileSelectionDrawer() {
40254
40435
  });
40255
40436
  }
40256
40437
  //#endregion
40257
- //#region src/schemas/common/s3PresignedUrl.ts
40258
- var S3PresignedUrlSchema = Schema.Struct({
40259
- presignedUrl: Schema.String,
40260
- fileType: Schema.String,
40261
- fileName: Schema.String,
40262
- createdAt: Schema.Date,
40263
- documentId: Schema.NullishOr(Schema.UUID)
40264
- });
40265
- //#endregion
40266
40438
  //#region src/hooks/api/businesses/[business-id]/reports/unified/report-name/exports/excel/useUnifiedReportExcel.ts
40267
40439
  var _excluded$9 = ["businessId", "route"], _excluded2$3 = [
40268
40440
  "accessToken",
@@ -40276,7 +40448,7 @@ var getUnifiedReportExcel = get((_ref) => {
40276
40448
  });
40277
40449
  var getTag$1 = (report) => `#unified-${report}-report-excel`;
40278
40450
  var UnifiedReportExcelReturnSchema = Schema.Struct({ data: S3PresignedUrlSchema });
40279
- function buildKey$25({ access_token: accessToken, apiUrl, businessId, params }) {
40451
+ function buildKey$26({ access_token: accessToken, apiUrl, businessId, params }) {
40280
40452
  if (!params || !accessToken || !apiUrl) return;
40281
40453
  return _objectSpread2(_objectSpread2({
40282
40454
  accessToken,
@@ -40290,7 +40462,7 @@ function useUnifiedReportExcel({ onSuccess } = {}) {
40290
40462
  const { apiUrl } = useEnvironment();
40291
40463
  const { businessId } = useLayerContext();
40292
40464
  const params = useUnifiedReportParams();
40293
- return new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$25(_objectSpread2(_objectSpread2({}, auth), {}, {
40465
+ return new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$26(_objectSpread2(_objectSpread2({}, auth), {}, {
40294
40466
  apiUrl,
40295
40467
  businessId,
40296
40468
  params
@@ -40355,7 +40527,7 @@ var _excluded$8 = ["businessId", "route"], _excluded2$2 = [
40355
40527
  "tags"
40356
40528
  ];
40357
40529
  var getTag = (report) => `#unified-${report}-report`;
40358
- function buildKey$24({ access_token: accessToken, apiUrl, businessId, params }) {
40530
+ function buildKey$25({ access_token: accessToken, apiUrl, businessId, params }) {
40359
40531
  if (!params || !accessToken || !apiUrl) return;
40360
40532
  return _objectSpread2(_objectSpread2({
40361
40533
  accessToken,
@@ -40373,7 +40545,7 @@ function useUnifiedReport() {
40373
40545
  const { apiUrl } = useEnvironment();
40374
40546
  const { businessId } = useLayerContext();
40375
40547
  const params = useUnifiedReportParams();
40376
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$24(_objectSpread2(_objectSpread2({}, auth), {}, {
40548
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$25(_objectSpread2(_objectSpread2({}, auth), {}, {
40377
40549
  apiUrl,
40378
40550
  businessId,
40379
40551
  params
@@ -40553,6 +40725,166 @@ var UnifiedReportTable = () => {
40553
40725
  });
40554
40726
  };
40555
40727
  //#endregion
40728
+ //#region src/components/ui/Overlay/Overlay.tsx
40729
+ function Overlay({ children, slots, slotProps }) {
40730
+ var _slotProps$Dialog;
40731
+ const trigger = slots.Trigger;
40732
+ const [isOpen, setIsOpen] = useState(false);
40733
+ const close = useCallback(() => setIsOpen(false), []);
40734
+ return /* @__PURE__ */ jsxs(DialogTrigger, {
40735
+ isOpen,
40736
+ onOpenChange: setIsOpen,
40737
+ children: [typeof trigger === "function" ? trigger({ isOpen }) : trigger, /* @__PURE__ */ jsx(Popover$2, _objectSpread2(_objectSpread2({}, slotProps === null || slotProps === void 0 ? void 0 : slotProps.Popover), {}, { children: /* @__PURE__ */ jsx(Dialog, {
40738
+ className: "Layer__Overlay__Dialog",
40739
+ style: { width: slotProps === null || slotProps === void 0 || (_slotProps$Dialog = slotProps.Dialog) === null || _slotProps$Dialog === void 0 ? void 0 : _slotProps$Dialog.width },
40740
+ children: typeof children === "function" ? children({ close }) : children
40741
+ }) }))]
40742
+ });
40743
+ }
40744
+ //#endregion
40745
+ //#region src/components/NestedNavigation/MegaMenu/MegaMenuListItem.tsx
40746
+ function MegaMenuListItem({ id, leaf, leafConfig }) {
40747
+ return /* @__PURE__ */ jsx(ListBoxItem, {
40748
+ id,
40749
+ textValue: leafConfig.getTextValue(leaf),
40750
+ className: "Layer__MegaMenuListItem",
40751
+ children: /* @__PURE__ */ jsx(Span, {
40752
+ slot: "label",
40753
+ children: leafConfig.renderLabel(leaf)
40754
+ })
40755
+ });
40756
+ }
40757
+ //#endregion
40758
+ //#region src/components/NestedNavigation/MegaMenu/MegaMenuListSection.tsx
40759
+ function MegaMenuListSection({ id, group, groupConfig, leafConfig }) {
40760
+ return /* @__PURE__ */ jsxs(ListBoxSection, {
40761
+ id,
40762
+ className: "Layer__MegaMenuListSection",
40763
+ children: [/* @__PURE__ */ jsx(Header$4, {
40764
+ slot: "header",
40765
+ pis: "xs",
40766
+ pbe: "xs",
40767
+ children: groupConfig.renderLabel(group)
40768
+ }), Array.from(groupConfig.getChildren(group)).map((leaf) => {
40769
+ const leafId = leafConfig.getId(leaf);
40770
+ return /* @__PURE__ */ jsx(MegaMenuListItem, {
40771
+ id: leafId,
40772
+ leaf,
40773
+ leafConfig
40774
+ }, leafId);
40775
+ })]
40776
+ });
40777
+ }
40778
+ //#endregion
40779
+ //#region src/components/NestedNavigation/MegaMenu/MegaMenuList.tsx
40780
+ function MegaMenuList({ items, selectedItem, groupConfig, leafConfig, onSelectItem }) {
40781
+ const itemArray = useMemo(() => Array.from(items), [items]);
40782
+ const { leafMap } = useMemo(() => indexFlatNavigation({
40783
+ items: itemArray,
40784
+ groupConfig,
40785
+ leafConfig
40786
+ }), [
40787
+ itemArray,
40788
+ groupConfig,
40789
+ leafConfig
40790
+ ]);
40791
+ const handleSelectionChange = useCallback((selection) => {
40792
+ handleSelectItem({
40793
+ selection,
40794
+ leafMap,
40795
+ onSelectLeaf: leafConfig.onSelectLeaf
40796
+ });
40797
+ onSelectItem();
40798
+ }, [
40799
+ leafMap,
40800
+ leafConfig.onSelectLeaf,
40801
+ onSelectItem
40802
+ ]);
40803
+ const sectionCount = Math.min(itemArray.length, 3);
40804
+ return /* @__PURE__ */ jsx(ListBox, {
40805
+ layout: "grid",
40806
+ selectionMode: "single",
40807
+ selectedKeys: getSelectedItemSet(selectedItem),
40808
+ onSelectionChange: handleSelectionChange,
40809
+ items: itemArray,
40810
+ className: "Layer__MegaMenuList",
40811
+ "data-section-count": sectionCount,
40812
+ children: (group) => /* @__PURE__ */ jsx(MegaMenuListSection, {
40813
+ id: groupConfig.getId(group),
40814
+ group,
40815
+ groupConfig,
40816
+ leafConfig
40817
+ })
40818
+ });
40819
+ }
40820
+ //#endregion
40821
+ //#region src/components/NestedNavigation/MegaMenu/MegaMenu.tsx
40822
+ var COLUMN_WIDTH = 200;
40823
+ var COLUMN_GAP = 24;
40824
+ var PADDING = 16;
40825
+ var getWidth = (numGroups) => {
40826
+ const numColumns = Math.min(numGroups, 3);
40827
+ return numColumns * COLUMN_WIDTH + (numColumns - 1) * COLUMN_GAP + PADDING * 2;
40828
+ };
40829
+ function MegaMenu({ items, selectedItem, placement, groupConfig, leafConfig, slots }) {
40830
+ const itemArray = useMemo(() => Array.from(items), [items]);
40831
+ const width = getWidth(itemArray.length);
40832
+ const slotProps = useMemo(() => ({
40833
+ Popover: {
40834
+ placement,
40835
+ flexInline: true
40836
+ },
40837
+ Dialog: { width }
40838
+ }), [placement, width]);
40839
+ return /* @__PURE__ */ jsx(Overlay, {
40840
+ slots: { Trigger: slots.Trigger },
40841
+ slotProps,
40842
+ children: ({ close }) => /* @__PURE__ */ jsx(MegaMenuList, {
40843
+ items: itemArray,
40844
+ selectedItem,
40845
+ groupConfig,
40846
+ leafConfig,
40847
+ onSelectItem: close
40848
+ })
40849
+ });
40850
+ }
40851
+ //#endregion
40852
+ //#region src/components/ReportsNavigation/ReportsMegaMenu.tsx
40853
+ var groupConfig = buildFlatReportsGroupConfig((group) => /* @__PURE__ */ jsx(Span, {
40854
+ size: "sm",
40855
+ weight: "bold",
40856
+ variant: "subtle",
40857
+ textCase: "uppercase",
40858
+ children: group.displayName
40859
+ }));
40860
+ var renderLeafLabel = (leaf) => /* @__PURE__ */ jsx(Span, { children: leaf.displayName });
40861
+ var EMPTY_ARRAY$1 = [];
40862
+ function ReportsMegaMenu() {
40863
+ var _baseReport$key;
40864
+ const { t } = useTranslation();
40865
+ const { data, isLoading, isError } = useReportConfig();
40866
+ const { baseReport, setBaseReport } = useBaseUnifiedReport();
40867
+ const leafConfig = useMemo(() => buildReportsLeafConfig(setBaseReport, renderLeafLabel), [setBaseReport]);
40868
+ const Trigger = useMemo(() => /* @__PURE__ */ jsxs(Button$1, {
40869
+ variant: "outlined",
40870
+ isPending: isLoading,
40871
+ isDisabled: isError,
40872
+ children: [t("reports:label.switch_report", "Switch report"), /* @__PURE__ */ jsx(ChevronDown, { size: 14 })]
40873
+ }), [
40874
+ t,
40875
+ isLoading,
40876
+ isError
40877
+ ]);
40878
+ return /* @__PURE__ */ jsx(MegaMenu, {
40879
+ items: data !== null && data !== void 0 ? data : EMPTY_ARRAY$1,
40880
+ selectedItem: (_baseReport$key = baseReport === null || baseReport === void 0 ? void 0 : baseReport.key) !== null && _baseReport$key !== void 0 ? _baseReport$key : null,
40881
+ placement: "bottom left",
40882
+ groupConfig,
40883
+ leafConfig,
40884
+ slots: { Trigger }
40885
+ });
40886
+ }
40887
+ //#endregion
40556
40888
  //#region src/components/YearPicker/YearPicker.tsx
40557
40889
  var YearPicker = ({ label, year, onChange, minDate = null, maxDate = null, isDisabled = false }) => {
40558
40890
  var _minDate$year, _maxDate$year;
@@ -40859,7 +41191,7 @@ var UnifiedReportControls = () => {
40859
41191
  //#endregion
40860
41192
  //#region src/components/UnifiedReports/UnifiedReportBaseHeader.tsx
40861
41193
  var resolveVariant$1 = ({ width }) => width <= BREAKPOINTS.MOBILE ? "Mobile" : "Desktop";
40862
- var UnifiedReportBaseHeaderRow = ({ variant }) => {
41194
+ var UnifiedReportBaseHeaderRow = (props) => {
40863
41195
  const { baseReport } = useBaseUnifiedReport();
40864
41196
  return /* @__PURE__ */ jsxs(HStack, {
40865
41197
  pi: "lg",
@@ -40867,24 +41199,31 @@ var UnifiedReportBaseHeaderRow = ({ variant }) => {
40867
41199
  align: "center",
40868
41200
  justify: "space-between",
40869
41201
  className: "Layer__UnifiedReports__BaseHeaderRow",
40870
- children: [!(variant === "Mobile") && (baseReport ? /* @__PURE__ */ jsx(Span, {
40871
- size: "lg",
40872
- weight: "bold",
40873
- children: baseReport.displayName
40874
- }) : /* @__PURE__ */ jsx(SkeletonLoader, {
40875
- width: "192px",
40876
- height: "24px"
40877
- })), /* @__PURE__ */ jsx(UnifiedReportHeaderButtons, { variant })]
41202
+ children: [!(props.variant === "Mobile") && /* @__PURE__ */ jsxs(HStack, {
41203
+ align: "center",
41204
+ gap: "lg",
41205
+ children: [baseReport ? /* @__PURE__ */ jsx(Span, {
41206
+ size: "lg",
41207
+ weight: "bold",
41208
+ children: baseReport.displayName
41209
+ }) : /* @__PURE__ */ jsx(SkeletonLoader, {
41210
+ width: "192px",
41211
+ height: "24px"
41212
+ }), props.navigationVariant === "menu" && /* @__PURE__ */ jsx(ReportsMegaMenu, {})]
41213
+ }), /* @__PURE__ */ jsx(UnifiedReportHeaderButtons, { variant: props.variant })]
40878
41214
  });
40879
41215
  };
40880
- var UnifiedReportBaseHeader = () => {
41216
+ var UnifiedReportBaseHeader = ({ navigationVariant }) => {
40881
41217
  const { isDesktop } = useSizeClass();
40882
41218
  return /* @__PURE__ */ jsxs(VStack, {
40883
41219
  className: "Layer__UnifiedReports__BaseHeader",
40884
41220
  children: [isDesktop && /* @__PURE__ */ jsx(ResponsiveComponent, {
40885
41221
  resolveVariant: resolveVariant$1,
40886
41222
  slots: {
40887
- Desktop: /* @__PURE__ */ jsx(UnifiedReportBaseHeaderRow, { variant: "Desktop" }),
41223
+ Desktop: /* @__PURE__ */ jsx(UnifiedReportBaseHeaderRow, {
41224
+ variant: "Desktop",
41225
+ navigationVariant
41226
+ }),
40888
41227
  Mobile: /* @__PURE__ */ jsx(UnifiedReportBaseHeaderRow, { variant: "Mobile" })
40889
41228
  }
40890
41229
  }), /* @__PURE__ */ jsx(UnifiedReportControls, {})]
@@ -41004,13 +41343,13 @@ var UnifiedReportDetailHeader = () => {
41004
41343
  };
41005
41344
  //#endregion
41006
41345
  //#region src/components/UnifiedReports/UnifiedReportTableHeader.tsx
41007
- var UnifiedReportTableHeader = () => {
41346
+ var UnifiedReportTableHeader = ({ navigationVariant }) => {
41008
41347
  const { isDetailView } = useDetailUnifiedReport();
41009
- return isDetailView ? /* @__PURE__ */ jsx(UnifiedReportDetailHeader, {}) : /* @__PURE__ */ jsx(UnifiedReportBaseHeader, {});
41348
+ return isDetailView ? /* @__PURE__ */ jsx(UnifiedReportDetailHeader, {}) : /* @__PURE__ */ jsx(UnifiedReportBaseHeader, { navigationVariant });
41010
41349
  };
41011
41350
  //#endregion
41012
41351
  //#region src/components/UnifiedReports/UnifiedReports.tsx
41013
- var UnifiedReportContent = () => {
41352
+ var UnifiedReportContent = ({ navigationVariant = "sidebar" }) => {
41014
41353
  const { t } = useTranslation();
41015
41354
  const { isDesktop } = useSizeClass();
41016
41355
  const header = useMemo(() => {
@@ -41023,21 +41362,21 @@ var UnifiedReportContent = () => {
41023
41362
  header,
41024
41363
  children: /* @__PURE__ */ jsxs(HStack, {
41025
41364
  className: "Layer__UnifiedReports__Body",
41026
- children: [isDesktop && /* @__PURE__ */ jsx(VStack, {
41365
+ children: [isDesktop && navigationVariant === "sidebar" && /* @__PURE__ */ jsx(VStack, {
41027
41366
  className: "Layer__UnifiedReports__Sidebar",
41028
- children: /* @__PURE__ */ jsx(ReportsNavigation, {})
41367
+ children: /* @__PURE__ */ jsx(ReportsNavigationSidebar, {})
41029
41368
  }), /* @__PURE__ */ jsxs(VStack, {
41030
41369
  fluid: true,
41031
41370
  className: "Layer__UnifiedReports__Content",
41032
- children: [/* @__PURE__ */ jsx(UnifiedReportTableHeader, {}), /* @__PURE__ */ jsx(UnifiedReportTable, {})]
41371
+ children: [/* @__PURE__ */ jsx(UnifiedReportTableHeader, { navigationVariant }), /* @__PURE__ */ jsx(UnifiedReportTable, {})]
41033
41372
  })]
41034
41373
  })
41035
41374
  });
41036
41375
  };
41037
- var UnifiedReports = ({ dateSelectionMode }) => {
41376
+ var UnifiedReports = ({ dateSelectionMode, navigationVariant }) => {
41038
41377
  return /* @__PURE__ */ jsx(UnifiedReportStoreProvider, {
41039
41378
  dateSelectionMode,
41040
- children: /* @__PURE__ */ jsx(ExpandableDataTableProvider, { children: /* @__PURE__ */ jsx(UnifiedReportContent, {}) })
41379
+ children: /* @__PURE__ */ jsx(ExpandableDataTableProvider, { children: /* @__PURE__ */ jsx(UnifiedReportContent, { navigationVariant }) })
41041
41380
  });
41042
41381
  };
41043
41382
  //#endregion
@@ -41150,12 +41489,13 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
41150
41489
  const { t } = useTranslation();
41151
41490
  const { value: sizeClass } = useSizeClass();
41152
41491
  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;
41492
+ const profitAndLossTagFilter = (tagFilter === null || tagFilter === void 0 ? void 0 : tagFilter.tagValues.length) ? {
41493
+ key: tagFilter.tagKey,
41494
+ values: tagFilter.tagValues
41495
+ } : void 0;
41153
41496
  return /* @__PURE__ */ jsx(ProfitAndLoss, {
41154
41497
  asContainer: false,
41155
- tagFilter: tagFilter ? {
41156
- key: tagFilter.tagKey,
41157
- values: tagFilter.tagValues
41158
- } : void 0,
41498
+ tagFilter: profitAndLossTagFilter,
41159
41499
  children: /* @__PURE__ */ jsxs(View, {
41160
41500
  title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.accounting_overview", "Accounting overview"),
41161
41501
  viewClassName: "Layer__AccountingOverview",
@@ -41181,10 +41521,7 @@ var AccountingOverview = ({ title, showTitle = true, enableOnboarding = false, o
41181
41521
  className: "Layer__AccountingOverview__ProfitAndLossHeader",
41182
41522
  trailingContent: /* @__PURE__ */ jsx(PnlLegend, { direction: "row" })
41183
41523
  }), /* @__PURE__ */ jsx(ProfitAndLoss.Chart, {
41184
- tagFilter: tagFilter ? {
41185
- key: tagFilter.tagKey,
41186
- values: tagFilter.tagValues
41187
- } : void 0,
41524
+ tagFilter: profitAndLossTagFilter,
41188
41525
  hideLegend: true
41189
41526
  })]
41190
41527
  }),
@@ -41234,7 +41571,7 @@ var BankTransactionsWithLinkedAccounts = ({ title, showTitle = true, elevatedLin
41234
41571
  //#region src/hooks/api/businesses/[business-id]/call-bookings/useCreateCallBooking.tsx
41235
41572
  var CREATE_CALL_BOOKING_TAG_KEY = "#create-call-booking";
41236
41573
  var createCallBooking = post(({ businessId }) => `/v1/businesses/${businessId}/call-bookings`);
41237
- function buildKey$23({ access_token: accessToken, apiUrl, businessId }) {
41574
+ function buildKey$24({ access_token: accessToken, apiUrl, businessId }) {
41238
41575
  if (accessToken && apiUrl) return {
41239
41576
  accessToken,
41240
41577
  apiUrl,
@@ -41247,7 +41584,7 @@ function useCreateCallBooking() {
41247
41584
  const { data } = useAuth();
41248
41585
  const { businessId } = useLayerContext();
41249
41586
  const { forceReloadCallBookings } = useCallBookingsGlobalCacheActions();
41250
- const rawMutationResponse = useSWRMutation(() => withLocale(buildKey$23(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCallBooking(apiUrl, accessToken, {
41587
+ const rawMutationResponse = useSWRMutation(() => withLocale(buildKey$24(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCallBooking(apiUrl, accessToken, {
41251
41588
  params: { businessId },
41252
41589
  body
41253
41590
  }).then(Schema.decodeUnknownPromise(CallBookingItemResponseSchema)), {
@@ -41678,16 +42015,21 @@ var BookkeepingOverviewTasksContent = ({ callBooking, showCallBookingCard, tasks
41678
42015
  onClickReconnectAccounts
41679
42016
  })] });
41680
42017
  };
41681
- var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts, stringOverrides, slotProps }) => {
42018
+ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts, chartColorsList, stringOverrides, slotProps, tagFilter = void 0 }) => {
41682
42019
  var _slotProps$profitAndL, _stringOverrides$prof, _stringOverrides$prof2, _stringOverrides$prof3;
41683
42020
  const { t } = useTranslation();
41684
42021
  const [width] = useWindowSize();
41685
42022
  const { value: sizeClass } = useSizeClass();
41686
42023
  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;
42024
+ const profitAndLossTagFilter = (tagFilter === null || tagFilter === void 0 ? void 0 : tagFilter.tagValues.length) ? {
42025
+ key: tagFilter.tagKey,
42026
+ values: tagFilter.tagValues
42027
+ } : void 0;
41687
42028
  const { upperContentRef, targetElementRef, upperElementInFocus } = useKeepInMobileViewport();
41688
42029
  const { callBooking, showCallBookingCard, handleBookCall, isCalendlyVisible, calendlyLink, calendlyRef, closeCalendly } = useBookkeepingOnboardingCallBooking();
41689
42030
  return /* @__PURE__ */ jsxs(ProfitAndLoss, {
41690
42031
  asContainer: false,
42032
+ tagFilter: profitAndLossTagFilter,
41691
42033
  children: [/* @__PURE__ */ jsxs(View, {
41692
42034
  viewClassName: "Layer__bookkeeping-overview--view Layer__BookkeepingOverview",
41693
42035
  title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || t("overview:label.bookkeeping_overview", "Bookkeeping overview"),
@@ -41744,16 +42086,21 @@ var BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts,
41744
42086
  fluid: true,
41745
42087
  children: /* @__PURE__ */ jsx(ProfitAndLoss.Summaries, {
41746
42088
  stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof2 = stringOverrides.profitAndLoss) === null || _stringOverrides$prof2 === void 0 ? void 0 : _stringOverrides$prof2.summaries,
42089
+ chartColorsList,
41747
42090
  variants: profitAndLossSummariesVariants
41748
42091
  })
41749
42092
  }),
41750
- /* @__PURE__ */ jsx(ProfitAndLoss.Chart, { hideLegend: true })
42093
+ /* @__PURE__ */ jsx(ProfitAndLoss.Chart, {
42094
+ hideLegend: true,
42095
+ tagFilter: profitAndLossTagFilter
42096
+ })
41751
42097
  ]
41752
42098
  })
41753
42099
  }),
41754
42100
  /* @__PURE__ */ jsx(ProfitAndLossOverviewDetailedCharts, {
41755
42101
  variant: "bookkeeping",
41756
- detailedChartsStringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof3 = stringOverrides.profitAndLoss) === null || _stringOverrides$prof3 === void 0 ? void 0 : _stringOverrides$prof3.detailedCharts
42102
+ detailedChartsStringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof3 = stringOverrides.profitAndLoss) === null || _stringOverrides$prof3 === void 0 ? void 0 : _stringOverrides$prof3.detailedCharts,
42103
+ chartColorsList
41757
42104
  })
41758
42105
  ]
41759
42106
  }), isCalendlyVisible && /* @__PURE__ */ jsx("div", {
@@ -42108,7 +42455,7 @@ var TripPurposeFilterValue = /* @__PURE__ */ function(TripPurposeFilterValue) {
42108
42455
  return TripPurposeFilterValue;
42109
42456
  }({});
42110
42457
  var TRIP_PURPOSE_CONFIG = [
42111
- _objectSpread2(_objectSpread2({}, translationKey("common:label.value", "All")), {}, { value: TripPurposeFilterValue.All }),
42458
+ _objectSpread2(_objectSpread2({}, translationKey("common:label.all", "All")), {}, { value: TripPurposeFilterValue.All }),
42112
42459
  _objectSpread2(_objectSpread2({}, translationKey("common:label.business", "Business")), {}, { value: TripPurposeFilterValue.Business }),
42113
42460
  _objectSpread2(_objectSpread2({}, translationKey("common:label.personal", "Personal")), {}, { value: TripPurposeFilterValue.Personal })
42114
42461
  ];
@@ -42228,7 +42575,7 @@ function useAutoResetPageIndex(filters, data) {
42228
42575
  //#region src/hooks/api/businesses/[business-id]/mileage/trips/[trip-id]/useDeleteTrip.tsx
42229
42576
  var DELETE_TRIP_TAG_KEY = "#delete-trip";
42230
42577
  var deleteTrip = del(({ businessId, tripId }) => `/v1/businesses/${businessId}/mileage/trips/${tripId}`);
42231
- function buildKey$22({ access_token: accessToken, apiUrl, businessId, tripId }) {
42578
+ function buildKey$23({ access_token: accessToken, apiUrl, businessId, tripId }) {
42232
42579
  if (accessToken && apiUrl) return {
42233
42580
  accessToken,
42234
42581
  apiUrl,
@@ -42241,7 +42588,7 @@ var useDeleteTrip = ({ tripId }) => {
42241
42588
  const withLocale = useLocalizedKey();
42242
42589
  const { data } = useAuth();
42243
42590
  const { businessId } = useLayerContext();
42244
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$22(_objectSpread2(_objectSpread2({}, data), {}, {
42591
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$23(_objectSpread2(_objectSpread2({}, data), {}, {
42245
42592
  businessId,
42246
42593
  tripId
42247
42594
  }))), ({ accessToken, apiUrl, businessId, tripId }) => {
@@ -42785,7 +43132,7 @@ var UpsertVehicleMode = /* @__PURE__ */ function(UpsertVehicleMode) {
42785
43132
  }({});
42786
43133
  var createVehicle = post(({ businessId }) => `/v1/businesses/${businessId}/mileage/vehicles`);
42787
43134
  var updateVehicle = patch(({ businessId, vehicleId }) => `/v1/businesses/${businessId}/mileage/vehicles/${vehicleId}`);
42788
- function buildKey$21({ access_token: accessToken, apiUrl, businessId, vehicleId = void 0 }) {
43135
+ function buildKey$22({ access_token: accessToken, apiUrl, businessId, vehicleId = void 0 }) {
42789
43136
  if (accessToken && apiUrl) return {
42790
43137
  accessToken,
42791
43138
  apiUrl,
@@ -42829,7 +43176,7 @@ var useUpsertVehicle = (props) => {
42829
43176
  const { businessId } = useLayerContext();
42830
43177
  const { mode } = props;
42831
43178
  const vehicleId = mode === UpsertVehicleMode.Update ? props.vehicleId : void 0;
42832
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$21(_objectSpread2(_objectSpread2({}, data), {}, {
43179
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$22(_objectSpread2(_objectSpread2({}, data), {}, {
42833
43180
  businessId,
42834
43181
  vehicleId
42835
43182
  }))), ({ accessToken, apiUrl, businessId, vehicleId }, { arg: body }) => {
@@ -43138,7 +43485,7 @@ var VehicleDrawer = ({ isOpen, onOpenChange, vehicle, onSuccess }) => {
43138
43485
  var ARCHIVE_VEHICLE_TAG_KEY = "#archive-vehicle";
43139
43486
  var ArchiveVehicleReturnSchema = Schema.Struct({ data: VehicleSchema });
43140
43487
  var archiveVehicle = post(({ businessId, vehicleId }) => `/v1/businesses/${businessId}/mileage/vehicles/${vehicleId}/archive`);
43141
- function buildKey$20({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43488
+ function buildKey$21({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43142
43489
  if (accessToken && apiUrl) return {
43143
43490
  accessToken,
43144
43491
  apiUrl,
@@ -43151,7 +43498,7 @@ var useArchiveVehicle = ({ vehicleId }) => {
43151
43498
  const withLocale = useLocalizedKey();
43152
43499
  const { data } = useAuth();
43153
43500
  const { businessId } = useLayerContext();
43154
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$20(_objectSpread2(_objectSpread2({}, data), {}, {
43501
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$21(_objectSpread2(_objectSpread2({}, data), {}, {
43155
43502
  businessId,
43156
43503
  vehicleId
43157
43504
  }))), ({ accessToken, apiUrl, businessId, vehicleId }) => {
@@ -43199,7 +43546,7 @@ function VehicleArchiveConfirmationModal({ isOpen, onOpenChange, vehicle, useDra
43199
43546
  //#region src/hooks/api/businesses/[business-id]/mileage/vehicles/[vehicle-id]/useDeleteVehicle.tsx
43200
43547
  var DELETE_VEHICLE_TAG_KEY = "#delete-vehicle";
43201
43548
  var deleteVehicle = del(({ businessId, vehicleId }) => `/v1/businesses/${businessId}/mileage/vehicles/${vehicleId}`);
43202
- function buildKey$19({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43549
+ function buildKey$20({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43203
43550
  if (accessToken && apiUrl) return {
43204
43551
  accessToken,
43205
43552
  apiUrl,
@@ -43212,7 +43559,7 @@ var useDeleteVehicle = ({ vehicleId }) => {
43212
43559
  const withLocale = useLocalizedKey();
43213
43560
  const { data } = useAuth();
43214
43561
  const { businessId } = useLayerContext();
43215
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$19(_objectSpread2(_objectSpread2({}, data), {}, {
43562
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$20(_objectSpread2(_objectSpread2({}, data), {}, {
43216
43563
  businessId,
43217
43564
  vehicleId
43218
43565
  }))), ({ accessToken, apiUrl, businessId, vehicleId }) => {
@@ -43261,7 +43608,7 @@ function VehicleDeleteConfirmationModal({ isOpen, onOpenChange, vehicle, useDraw
43261
43608
  var REACTIVATE_VEHICLE_TAG_KEY = "#reactivate-vehicle";
43262
43609
  var ReactivateVehicleReturnSchema = Schema.Struct({ data: VehicleSchema });
43263
43610
  var reactivateVehicle = post(({ businessId, vehicleId }) => `/v1/businesses/${businessId}/mileage/vehicles/${vehicleId}/reactivate`);
43264
- function buildKey$18({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43611
+ function buildKey$19({ access_token: accessToken, apiUrl, businessId, vehicleId }) {
43265
43612
  if (accessToken && apiUrl) return {
43266
43613
  accessToken,
43267
43614
  apiUrl,
@@ -43274,7 +43621,7 @@ var useReactivateVehicle = ({ vehicleId }) => {
43274
43621
  const withLocale = useLocalizedKey();
43275
43622
  const { data } = useAuth();
43276
43623
  const { businessId } = useLayerContext();
43277
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$18(_objectSpread2(_objectSpread2({}, data), {}, {
43624
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$19(_objectSpread2(_objectSpread2({}, data), {}, {
43278
43625
  businessId,
43279
43626
  vehicleId
43280
43627
  }))), ({ accessToken, apiUrl, businessId, vehicleId }) => {
@@ -44160,7 +44507,7 @@ var TAX_PROFILE_TAG_KEY = "#tax-profile";
44160
44507
  var getTaxProfile = get(({ businessId }) => {
44161
44508
  return `/v1/businesses/${businessId}/tax-estimates/profile`;
44162
44509
  });
44163
- function buildKey$17({ access_token: accessToken, apiUrl, businessId }) {
44510
+ function buildKey$18({ access_token: accessToken, apiUrl, businessId }) {
44164
44511
  if (accessToken && apiUrl) return {
44165
44512
  accessToken,
44166
44513
  apiUrl,
@@ -44172,7 +44519,7 @@ function useTaxProfile() {
44172
44519
  const withLocale = useLocalizedKey();
44173
44520
  const { data: auth } = useAuth();
44174
44521
  const { businessId } = useLayerContext();
44175
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$17(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
44522
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$18(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
44176
44523
  var _ref = _asyncToGenerator(function* ({ accessToken, apiUrl, businessId }) {
44177
44524
  return getTaxProfile(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(TaxProfileResponseSchema)).then(({ data }) => data);
44178
44525
  });
@@ -44684,7 +45031,7 @@ var getTaxSummary = get(({ businessId, year, reportingBasis, fullYearProjection
44684
45031
  full_year_projection: fullYearProjection
44685
45032
  })}`;
44686
45033
  });
44687
- function buildKey$16({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection, enabled = true }) {
45034
+ function buildKey$17({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection, enabled = true }) {
44688
45035
  if (!enabled) return;
44689
45036
  if (accessToken && apiUrl) return {
44690
45037
  accessToken,
@@ -44700,7 +45047,7 @@ function useTaxSummary({ year, reportingBasis, fullYearProjection, enabled = tru
44700
45047
  const withLocale = useLocalizedKey();
44701
45048
  const { data: auth } = useAuth();
44702
45049
  const { businessId } = useLayerContext();
44703
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$16(_objectSpread2(_objectSpread2({}, auth), {}, {
45050
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$17(_objectSpread2(_objectSpread2({}, auth), {}, {
44704
45051
  businessId,
44705
45052
  year,
44706
45053
  reportingBasis,
@@ -45345,7 +45692,7 @@ var getTaxDetails = get(({ businessId, year, reportingBasis, fullYearProjection
45345
45692
  full_year_projection: fullYearProjection
45346
45693
  })}`;
45347
45694
  });
45348
- function buildKey$15({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
45695
+ function buildKey$16({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
45349
45696
  if (accessToken && apiUrl) return {
45350
45697
  accessToken,
45351
45698
  apiUrl,
@@ -45360,7 +45707,7 @@ function useTaxDetails({ year, reportingBasis, fullYearProjection }) {
45360
45707
  const withLocale = useLocalizedKey();
45361
45708
  const { data: auth } = useAuth();
45362
45709
  const { businessId } = useLayerContext();
45363
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$15(_objectSpread2(_objectSpread2({}, auth), {}, {
45710
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$16(_objectSpread2(_objectSpread2({}, auth), {}, {
45364
45711
  businessId,
45365
45712
  year,
45366
45713
  reportingBasis,
@@ -45408,7 +45755,7 @@ var getTaxPayments = get(({ businessId, year, reportingBasis, fullYearProjection
45408
45755
  full_year_projection: fullYearProjection
45409
45756
  })}`;
45410
45757
  });
45411
- function buildKey$14({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
45758
+ function buildKey$15({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
45412
45759
  if (accessToken && apiUrl) return {
45413
45760
  accessToken,
45414
45761
  apiUrl,
@@ -45423,7 +45770,7 @@ function useTaxPayments({ year, reportingBasis, fullYearProjection }) {
45423
45770
  const withLocale = useLocalizedKey();
45424
45771
  const { data: auth } = useAuth();
45425
45772
  const { businessId } = useLayerContext();
45426
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$14(_objectSpread2(_objectSpread2({}, auth), {}, {
45773
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$15(_objectSpread2(_objectSpread2({}, auth), {}, {
45427
45774
  businessId,
45428
45775
  year,
45429
45776
  reportingBasis,
@@ -45456,7 +45803,7 @@ var UpsertTaxProfileMode = /* @__PURE__ */ function(UpsertTaxProfileMode) {
45456
45803
  }({});
45457
45804
  var createTaxProfile = post(({ businessId }) => `/v1/businesses/${businessId}/tax-estimates/profile`);
45458
45805
  var updateTaxProfile = patch(({ businessId }) => `/v1/businesses/${businessId}/tax-estimates/profile`);
45459
- function buildKey$13({ access_token: accessToken, apiUrl, businessId }) {
45806
+ function buildKey$14({ access_token: accessToken, apiUrl, businessId }) {
45460
45807
  if (accessToken && apiUrl) return {
45461
45808
  accessToken,
45462
45809
  apiUrl,
@@ -45474,7 +45821,7 @@ function useUpsertTaxProfile({ mode }) {
45474
45821
  const { patchTaxProfile } = useTaxProfileGlobalCacheActions();
45475
45822
  const { forceReloadTaxPayments } = useTaxPaymentsGlobalCacheActions();
45476
45823
  const { forceReloadTaxDetails } = useTaxDetailsGlobalCacheActions();
45477
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$13(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
45824
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$14(_objectSpread2(_objectSpread2({}, auth), {}, { businessId }))), function() {
45478
45825
  var _ref = _asyncToGenerator(function* ({ accessToken, apiUrl, businessId }, { arg }) {
45479
45826
  return getRequestFn(mode)(apiUrl, accessToken, {
45480
45827
  params: { businessId },
@@ -45771,7 +46118,7 @@ var getTaxEstimatesBanner = get(({ businessId, year, reportingBasis, fullYearPro
45771
46118
  full_year_projection: fullYearProjection
45772
46119
  })}`;
45773
46120
  });
45774
- function buildKey$12({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
46121
+ function buildKey$13({ access_token: accessToken, apiUrl, businessId, year, reportingBasis, fullYearProjection }) {
45775
46122
  if (accessToken && apiUrl) return {
45776
46123
  accessToken,
45777
46124
  apiUrl,
@@ -45786,7 +46133,7 @@ function useTaxEstimatesBanner({ year, reportingBasis, fullYearProjection }) {
45786
46133
  const withLocale = useLocalizedKey();
45787
46134
  const { data: auth } = useAuth();
45788
46135
  const { businessId } = useLayerContext();
45789
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$12(_objectSpread2(_objectSpread2({}, auth), {}, {
46136
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$13(_objectSpread2(_objectSpread2({}, auth), {}, {
45790
46137
  businessId,
45791
46138
  year,
45792
46139
  reportingBasis,
@@ -46820,7 +47167,7 @@ Schema.Struct({ date: CalendarDateSchema });
46820
47167
  var ACTIVE_TIME_TRACKER_TAG_KEY = "#active-time-tracker";
46821
47168
  var ActiveTimeTrackerResponseSchema = Schema.Struct({ data: Schema.Struct({ timeEntry: pipe(Schema.propertySignature(Schema.NullishOr(TimeEntrySchema)), Schema.fromKey("time_entry")) }) });
46822
47169
  var getActiveTimeTracker = get(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/tracker/active`);
46823
- function buildKey$11({ access_token: accessToken, apiUrl, businessId }) {
47170
+ function buildKey$12({ access_token: accessToken, apiUrl, businessId }) {
46824
47171
  if (accessToken && apiUrl) return {
46825
47172
  accessToken,
46826
47173
  apiUrl,
@@ -46837,7 +47184,7 @@ function useActiveTimeTracker() {
46837
47184
  const withLocale = useLocalizedKey();
46838
47185
  const { data } = useAuth();
46839
47186
  const { businessId } = useLayerContext();
46840
- return new ActiveTimeTrackerSWRResponse(useSWR(() => withLocale(buildKey$11(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getActiveTimeTracker(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(ActiveTimeTrackerResponseSchema)).then(({ data }) => {
47187
+ return new ActiveTimeTrackerSWRResponse(useSWR(() => withLocale(buildKey$12(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }) => getActiveTimeTracker(apiUrl, accessToken, { params: { businessId } })().then(Schema.decodeUnknownPromise(ActiveTimeTrackerResponseSchema)).then(({ data }) => {
46841
47188
  var _data$timeEntry;
46842
47189
  return (_data$timeEntry = data.timeEntry) !== null && _data$timeEntry !== void 0 ? _data$timeEntry : null;
46843
47190
  })));
@@ -46875,7 +47222,7 @@ Schema.Struct({
46875
47222
  var CATALOG_SERVICES_TAG_KEY = "#catalog-services";
46876
47223
  var LIST_CATALOG_SERVICES_TAG_KEY = "#list-catalog-services";
46877
47224
  var ListCatalogServicesResponseSchema = Schema.Struct({ data: Schema.Array(CatalogServiceSchema) });
46878
- function buildKey$10({ access_token: accessToken, apiUrl, businessId, allowArchived, isEnabled = true }) {
47225
+ function buildKey$11({ access_token: accessToken, apiUrl, businessId, allowArchived, isEnabled = true }) {
46879
47226
  if (!isEnabled) return;
46880
47227
  if (accessToken && apiUrl) return {
46881
47228
  accessToken,
@@ -46897,7 +47244,7 @@ function useListCatalogServices({ allowArchived, isEnabled = true } = {}) {
46897
47244
  const withLocale = useLocalizedKey();
46898
47245
  const { data } = useAuth();
46899
47246
  const { businessId } = useLayerContext();
46900
- return new ListCatalogServicesSWRResponse(useSWR(() => withLocale(buildKey$10(_objectSpread2(_objectSpread2({}, data), {}, {
47247
+ return new ListCatalogServicesSWRResponse(useSWR(() => withLocale(buildKey$11(_objectSpread2(_objectSpread2({}, data), {}, {
46901
47248
  businessId,
46902
47249
  allowArchived,
46903
47250
  isEnabled
@@ -46947,7 +47294,7 @@ var ExpandableCard = ({ children, isExpanded, onToggleExpanded, slots }) => {
46947
47294
  var ARCHIVE_CATALOG_SERVICE_TAG_KEY = "#archive-catalog-service";
46948
47295
  var ArchiveCatalogServiceResponseSchema = Schema.Struct({ data: CatalogServiceSchema });
46949
47296
  var archiveCatalogService = post(({ businessId, serviceId }) => `/v1/businesses/${businessId}/catalog/services/${serviceId}/archive`);
46950
- function buildKey$9({ access_token: accessToken, apiUrl, businessId, serviceId }) {
47297
+ function buildKey$10({ access_token: accessToken, apiUrl, businessId, serviceId }) {
46951
47298
  if (accessToken && apiUrl) return {
46952
47299
  accessToken,
46953
47300
  apiUrl,
@@ -46961,7 +47308,7 @@ function useArchiveCatalogService({ serviceId }) {
46961
47308
  const { data } = useAuth();
46962
47309
  const { businessId } = useLayerContext();
46963
47310
  const { forceReloadCatalogServices } = useCatalogServicesGlobalCacheActions();
46964
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$9(_objectSpread2(_objectSpread2({}, data), {}, {
47311
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$10(_objectSpread2(_objectSpread2({}, data), {}, {
46965
47312
  businessId,
46966
47313
  serviceId
46967
47314
  }))), ({ accessToken, apiUrl, businessId, serviceId: sid }) => archiveCatalogService(apiUrl, accessToken, { params: {
@@ -47013,7 +47360,7 @@ function ServiceArchiveModal({ service, isOpen, onOpenChange, onSuccess }) {
47013
47360
  var UPDATE_CATALOG_SERVICE_TAG_KEY = "#update-catalog-service";
47014
47361
  var UpdateCatalogServiceResponseSchema = Schema.Struct({ data: CatalogServiceSchema });
47015
47362
  var updateCatalogService = patch(({ businessId, serviceId }) => `/v1/businesses/${businessId}/catalog/services/${serviceId}`);
47016
- function buildKey$8({ access_token: accessToken, apiUrl, businessId, serviceId }) {
47363
+ function buildKey$9({ access_token: accessToken, apiUrl, businessId, serviceId }) {
47017
47364
  if (accessToken && apiUrl) return {
47018
47365
  accessToken,
47019
47366
  apiUrl,
@@ -47027,7 +47374,7 @@ function useUpdateCatalogService({ serviceId }) {
47027
47374
  const { data } = useAuth();
47028
47375
  const { businessId } = useLayerContext();
47029
47376
  const { patchCatalogServiceByKey } = useCatalogServicesGlobalCacheActions();
47030
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$8(_objectSpread2(_objectSpread2({}, data), {}, {
47377
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$9(_objectSpread2(_objectSpread2({}, data), {}, {
47031
47378
  businessId,
47032
47379
  serviceId
47033
47380
  }))), ({ accessToken, apiUrl, businessId, serviceId }, { arg: body }) => updateCatalogService(apiUrl, accessToken, {
@@ -47056,7 +47403,7 @@ function useUpdateCatalogService({ serviceId }) {
47056
47403
  var CREATE_CATALOG_SERVICE_TAG_KEY = "#create-catalog-service";
47057
47404
  var CreateCatalogServiceResponseSchema = Schema.Struct({ data: CatalogServiceSchema });
47058
47405
  var createCatalogService = post(({ businessId }) => `/v1/businesses/${businessId}/catalog/services`);
47059
- function buildKey$7({ access_token: accessToken, apiUrl, businessId }) {
47406
+ function buildKey$8({ access_token: accessToken, apiUrl, businessId }) {
47060
47407
  if (accessToken && apiUrl) return {
47061
47408
  accessToken,
47062
47409
  apiUrl,
@@ -47069,7 +47416,7 @@ function useCreateCatalogService() {
47069
47416
  const { data } = useAuth();
47070
47417
  const { businessId } = useLayerContext();
47071
47418
  const { forceReloadCatalogServices } = useCatalogServicesGlobalCacheActions();
47072
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$7(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCatalogService(apiUrl, accessToken, {
47419
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$8(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => createCatalogService(apiUrl, accessToken, {
47073
47420
  params: { businessId },
47074
47421
  body
47075
47422
  }).then(Schema.decodeUnknownPromise(CreateCatalogServiceResponseSchema)), {
@@ -47252,7 +47599,7 @@ function ServiceFormCard(props) {
47252
47599
  var REACTIVATE_CATALOG_SERVICE_TAG_KEY = "#reactivate-catalog-service";
47253
47600
  var ReactivateCatalogServiceResponseSchema = Schema.Struct({ data: CatalogServiceSchema });
47254
47601
  var reactivateCatalogService = post(({ businessId, serviceId }) => `/v1/businesses/${businessId}/catalog/services/${serviceId}/reactivate`);
47255
- function buildKey$6({ access_token: accessToken, apiUrl, businessId, serviceId }) {
47602
+ function buildKey$7({ access_token: accessToken, apiUrl, businessId, serviceId }) {
47256
47603
  if (accessToken && apiUrl) return {
47257
47604
  accessToken,
47258
47605
  apiUrl,
@@ -47266,7 +47613,7 @@ function useReactivateCatalogService({ serviceId }) {
47266
47613
  const { data } = useAuth();
47267
47614
  const { businessId } = useLayerContext();
47268
47615
  const { forceReloadCatalogServices } = useCatalogServicesGlobalCacheActions();
47269
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$6(_objectSpread2(_objectSpread2({}, data), {}, {
47616
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$7(_objectSpread2(_objectSpread2({}, data), {}, {
47270
47617
  businessId,
47271
47618
  serviceId
47272
47619
  }))), ({ accessToken, apiUrl, businessId, serviceId: sid }) => reactivateCatalogService(apiUrl, accessToken, { params: {
@@ -47763,7 +48110,7 @@ function toUpdatePayload(activeEntry, draft) {
47763
48110
  //#region src/hooks/api/businesses/[business-id]/time-tracking/summary/useTimeTrackingSummary.ts
47764
48111
  var TimeTrackingSummaryResponseSchema = Schema.Struct({ data: TimeEntrySummarySchema });
47765
48112
  var TIME_TRACKING_SUMMARY_TAG_KEY = "#time-tracking-summary";
47766
- function buildKey$5({ access_token: accessToken, apiUrl, businessId, customerId, serviceId, startDate, endDate }) {
48113
+ function buildKey$6({ access_token: accessToken, apiUrl, businessId, customerId, serviceId, startDate, endDate }) {
47767
48114
  if (accessToken && apiUrl) return {
47768
48115
  accessToken,
47769
48116
  apiUrl,
@@ -47789,7 +48136,7 @@ function useTimeTrackingSummary(filterParams = {}) {
47789
48136
  const withLocale = useLocalizedKey();
47790
48137
  const { data } = useAuth();
47791
48138
  const { businessId } = useLayerContext();
47792
- return new SWRQueryResult(useSWR(() => withLocale(buildKey$5(_objectSpread2(_objectSpread2({}, data), {}, { businessId }, filterParams))), ({ accessToken, apiUrl, businessId, customerId, serviceId, startDate, endDate }) => getTimeTrackingSummary(apiUrl, accessToken, { params: {
48139
+ return new SWRQueryResult(useSWR(() => withLocale(buildKey$6(_objectSpread2(_objectSpread2({}, data), {}, { businessId }, filterParams))), ({ accessToken, apiUrl, businessId, customerId, serviceId, startDate, endDate }) => getTimeTrackingSummary(apiUrl, accessToken, { params: {
47793
48140
  businessId,
47794
48141
  customerId,
47795
48142
  serviceId,
@@ -47890,7 +48237,7 @@ function useTimeEntriesGlobalCacheActions() {
47890
48237
  //#region src/hooks/api/businesses/[business-id]/time-tracking/time-entries/[time-entry-id]/useDeleteTimeEntry.ts
47891
48238
  var DELETE_TIME_ENTRY_TAG_KEY = "#delete-time-entry";
47892
48239
  var deleteTimeEntry = del(({ businessId, timeEntryId }) => `/v1/businesses/${businessId}/time-tracking/time-entries/${timeEntryId}`);
47893
- function buildKey$4({ access_token: accessToken, apiUrl, businessId, timeEntryId }) {
48240
+ function buildKey$5({ access_token: accessToken, apiUrl, businessId, timeEntryId }) {
47894
48241
  if (accessToken && apiUrl) return {
47895
48242
  accessToken,
47896
48243
  apiUrl,
@@ -47905,7 +48252,7 @@ var useDeleteTimeEntry = ({ timeEntryId }) => {
47905
48252
  const { businessId } = useLayerContext();
47906
48253
  const mutationResponse = new SWRMutationResult(useSWRMutation(() => {
47907
48254
  if (!timeEntryId) return;
47908
- return withLocale(buildKey$4(_objectSpread2(_objectSpread2({}, data), {}, {
48255
+ return withLocale(buildKey$5(_objectSpread2(_objectSpread2({}, data), {}, {
47909
48256
  businessId,
47910
48257
  timeEntryId
47911
48258
  })));
@@ -47946,7 +48293,7 @@ var UpsertTimeEntryMode = /* @__PURE__ */ function(UpsertTimeEntryMode) {
47946
48293
  }({});
47947
48294
  var createTimeEntry = post(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/time-entries`);
47948
48295
  var updateTimeEntry = patch(({ businessId, timeEntryId }) => `/v1/businesses/${businessId}/time-tracking/time-entries/${timeEntryId}`);
47949
- function buildKey$3({ access_token: accessToken, apiUrl, businessId, timeEntryId = void 0 }) {
48296
+ function buildKey$4({ access_token: accessToken, apiUrl, businessId, timeEntryId = void 0 }) {
47950
48297
  if (accessToken && apiUrl) return {
47951
48298
  accessToken,
47952
48299
  apiUrl,
@@ -47962,7 +48309,7 @@ function useUpsertTimeEntry(props) {
47962
48309
  const { businessId } = useLayerContext();
47963
48310
  const { mode } = props;
47964
48311
  const timeEntryId = mode === UpsertTimeEntryMode.Update ? props.timeEntryId : void 0;
47965
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$3(_objectSpread2(_objectSpread2({}, data), {}, {
48312
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$4(_objectSpread2(_objectSpread2({}, data), {}, {
47966
48313
  businessId,
47967
48314
  timeEntryId
47968
48315
  }))), ({ accessToken, apiUrl, businessId, timeEntryId }, { arg: body }) => {
@@ -48010,7 +48357,7 @@ function useUpsertTimeEntry(props) {
48010
48357
  var STOP_TIME_TRACKER_TAG_KEY = "#stop-time-tracker";
48011
48358
  var StopTimeTrackerResponseSchema = Schema.Struct({ data: Schema.Struct({ id: Schema.UUID }) });
48012
48359
  var stopTimeTracker = post(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/tracker/stop`);
48013
- function buildKey$2({ access_token: accessToken, apiUrl, businessId }) {
48360
+ function buildKey$3({ access_token: accessToken, apiUrl, businessId }) {
48014
48361
  if (accessToken && apiUrl) return {
48015
48362
  accessToken,
48016
48363
  apiUrl,
@@ -48025,7 +48372,7 @@ var useStopTimeTracker = () => {
48025
48372
  const { forceReloadTimeEntries } = useTimeEntriesGlobalCacheActions();
48026
48373
  const { invalidateTimeTrackingSummary } = useTimeTrackingSummaryGlobalCacheActions();
48027
48374
  const { invalidateActiveTimeTracker } = useActiveTimeTrackerGlobalCacheActions();
48028
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => stopTimeTracker(apiUrl, accessToken, {
48375
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$3(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => stopTimeTracker(apiUrl, accessToken, {
48029
48376
  params: { businessId },
48030
48377
  body
48031
48378
  }).then(Schema.decodeUnknownPromise(StopTimeTrackerResponseSchema)), {
@@ -48373,7 +48720,7 @@ var ActiveTimeTrackerBanner = ({ activeEntry, timerDisplayValue }) => {
48373
48720
  var START_TIME_TRACKER_TAG_KEY = "#start-time-tracker";
48374
48721
  var StartTimeTrackerResponseSchema = Schema.Struct({ data: TimeEntrySchema });
48375
48722
  var startTimeTracker = post(({ businessId }) => `/v1/businesses/${businessId}/time-tracking/tracker/start`);
48376
- function buildKey$1({ access_token: accessToken, apiUrl, businessId }) {
48723
+ function buildKey$2({ access_token: accessToken, apiUrl, businessId }) {
48377
48724
  if (accessToken && apiUrl) return {
48378
48725
  accessToken,
48379
48726
  apiUrl,
@@ -48386,7 +48733,7 @@ var useStartTimeTracker = () => {
48386
48733
  const { data } = useAuth();
48387
48734
  const { businessId } = useLayerContext();
48388
48735
  const { invalidateActiveTimeTracker } = useActiveTimeTrackerGlobalCacheActions();
48389
- const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$1(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => startTimeTracker(apiUrl, accessToken, {
48736
+ const mutationResponse = new SWRMutationResult(useSWRMutation(() => withLocale(buildKey$2(_objectSpread2(_objectSpread2({}, data), {}, { businessId }))), ({ accessToken, apiUrl, businessId }, { arg: body }) => startTimeTracker(apiUrl, accessToken, {
48390
48737
  params: { businessId },
48391
48738
  body
48392
48739
  }).then(Schema.decodeUnknownPromise(StartTimeTrackerResponseSchema)), {
@@ -49716,6 +50063,29 @@ var LayerContextActionName = /* @__PURE__ */ function(LayerContextActionName) {
49716
50063
  return LayerContextActionName;
49717
50064
  }({});
49718
50065
  //#endregion
50066
+ //#region src/hooks/api/businesses/[business-id]/accounting-config/useAccountingConfiguration.tsx
50067
+ var ACCOUNTING_CONFIGURATION_TAG_KEY = "#accounting-configuration";
50068
+ function buildKey$1({ access_token: accessToken, apiUrl, businessId }) {
50069
+ if (accessToken && apiUrl) return {
50070
+ accessToken,
50071
+ apiUrl,
50072
+ businessId,
50073
+ tag: [ACCOUNTING_CONFIGURATION_TAG_KEY]
50074
+ };
50075
+ }
50076
+ var getAccountingConfiguration = get(({ businessId }) => {
50077
+ return `/v1/businesses/${businessId}/accounting-config`;
50078
+ });
50079
+ function useAccountingConfiguration({ businessId }) {
50080
+ const { apiUrl } = useEnvironment();
50081
+ const { data: auth } = useAuth();
50082
+ const queryKey = buildKey$1(_objectSpread2(_objectSpread2({}, auth), {}, {
50083
+ apiUrl,
50084
+ businessId
50085
+ }));
50086
+ return new SWRQueryResult(useSWR(() => queryKey, ({ accessToken, apiUrl, businessId }) => getAccountingConfiguration(apiUrl, accessToken, { params: { businessId } })().then(({ data }) => Schema$1.decodeUnknownPromise(AccountingConfigurationSchema)(data))));
50087
+ }
50088
+ //#endregion
49719
50089
  //#region src/schemas/business.ts
49720
50090
  var BusinessSchema = Schema.Struct({
49721
50091
  id: Schema.UUID,