@layerfi/components 0.1.63 → 0.1.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -723,8 +723,9 @@ declare module '@layerfi/components/components/ActionableList/ActionableList' {
723
723
  options: ActionableListOption<T>[];
724
724
  onClick: (item: ActionableListOption<T>) => void;
725
725
  selectedId?: string;
726
+ showDescriptions?: boolean;
726
727
  }
727
- export const ActionableList: <T>({ options, onClick, selectedId, }: ActionableListProps<T>) => React.JSX.Element;
728
+ export const ActionableList: <T>({ options, onClick, selectedId, showDescriptions, }: ActionableListProps<T>) => React.JSX.Element;
728
729
  export {};
729
730
 
730
731
  }
@@ -896,9 +897,10 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
896
897
  removeTransaction: (bt: BankTransaction) => void;
897
898
  showDescriptions?: boolean;
898
899
  showReceiptUploads?: boolean;
900
+ showTooltips: boolean;
899
901
  stringOverrides?: BankTransactionCTAStringOverrides;
900
902
  }
901
- export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, mode, containerWidth, showDescriptions, showReceiptUploads, stringOverrides, }: BankTransactionListProps) => React.JSX.Element;
903
+ export const BankTransactionList: ({ bankTransactions, editable, removeTransaction, mode, containerWidth, showDescriptions, showReceiptUploads, showTooltips, stringOverrides, }: BankTransactionListProps) => React.JSX.Element;
902
904
  export {};
903
905
 
904
906
  }
@@ -914,11 +916,12 @@ declare module '@layerfi/components/components/BankTransactionList/BankTransacti
914
916
  mode: BankTransactionsMode;
915
917
  showDescriptions: boolean;
916
918
  showReceiptUploads: boolean;
919
+ showTooltips: boolean;
917
920
  removeTransaction: (bt: BankTransaction) => void;
918
921
  containerWidth?: number;
919
922
  stringOverrides?: BankTransactionCTAStringOverrides;
920
923
  };
921
- export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, mode, showDescriptions, showReceiptUploads, containerWidth, removeTransaction, stringOverrides, }: Props) => React.JSX.Element;
924
+ export const BankTransactionListItem: ({ index, dateFormat, bankTransaction, editable, mode, showDescriptions, showReceiptUploads, showTooltips, containerWidth, removeTransaction, stringOverrides, }: Props) => React.JSX.Element;
922
925
  export {};
923
926
 
924
927
  }
@@ -933,8 +936,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
933
936
  interface BankTransactionMobileFormsProps {
934
937
  purpose: Purpose;
935
938
  bankTransaction: BankTransaction;
939
+ showTooltips: boolean;
936
940
  }
937
- export const BankTransactionMobileForms: ({ purpose, bankTransaction, }: BankTransactionMobileFormsProps) => React.JSX.Element;
941
+ export const BankTransactionMobileForms: ({ purpose, bankTransaction, showTooltips, }: BankTransactionMobileFormsProps) => React.JSX.Element;
938
942
  export {};
939
943
 
940
944
  }
@@ -947,9 +951,10 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
947
951
  editable: boolean;
948
952
  removeTransaction: (bt: BankTransaction) => void;
949
953
  initialLoad?: boolean;
954
+ showTooltips: boolean;
950
955
  mode: BankTransactionsMode;
951
956
  }
952
- export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, mode, }: BankTransactionMobileListProps) => React.JSX.Element;
957
+ export const BankTransactionMobileList: ({ bankTransactions, removeTransaction, editable, initialLoad, showTooltips, mode, }: BankTransactionMobileListProps) => React.JSX.Element;
953
958
 
954
959
  }
955
960
  declare module '@layerfi/components/components/BankTransactionMobileList/BankTransactionMobileListItem' {
@@ -962,6 +967,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
962
967
  editable: boolean;
963
968
  removeTransaction: (bt: BankTransaction) => void;
964
969
  initialLoad?: boolean;
970
+ showTooltips: boolean;
965
971
  mode: BankTransactionsMode;
966
972
  isFirstItem?: boolean;
967
973
  }
@@ -970,7 +976,7 @@ declare module '@layerfi/components/components/BankTransactionMobileList/BankTra
970
976
  personal = "personal",
971
977
  more = "more"
972
978
  }
973
- export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, mode, initialLoad, isFirstItem, }: BankTransactionMobileListItemProps) => React.JSX.Element;
979
+ export const BankTransactionMobileListItem: ({ index, bankTransaction, removeTransaction, editable, mode, initialLoad, showTooltips, isFirstItem, }: BankTransactionMobileListItemProps) => React.JSX.Element;
974
980
 
975
981
  }
976
982
  declare module '@layerfi/components/components/BankTransactionMobileList/BusinessCategories' {
@@ -988,8 +994,9 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Busines
988
994
  import { BankTransaction } from '@layerfi/components/types';
989
995
  interface BusinessFormProps {
990
996
  bankTransaction: BankTransaction;
997
+ showTooltips: boolean;
991
998
  }
992
- export const BusinessForm: ({ bankTransaction }: BusinessFormProps) => React.JSX.Element;
999
+ export const BusinessForm: ({ bankTransaction, showTooltips, }: BusinessFormProps) => React.JSX.Element;
993
1000
  export {};
994
1001
 
995
1002
  }
@@ -1016,16 +1023,18 @@ declare module '@layerfi/components/components/BankTransactionMobileList/SplitAn
1016
1023
  import { BankTransaction } from '@layerfi/components/types';
1017
1024
  interface SplitAndMatchFormProps {
1018
1025
  bankTransaction: BankTransaction;
1026
+ showTooltips: boolean;
1019
1027
  }
1020
- export const SplitAndMatchForm: ({ bankTransaction, }: SplitAndMatchFormProps) => React.JSX.Element;
1028
+ export const SplitAndMatchForm: ({ bankTransaction, showTooltips, }: SplitAndMatchFormProps) => React.JSX.Element;
1021
1029
  export {};
1022
1030
 
1023
1031
  }
1024
1032
  declare module '@layerfi/components/components/BankTransactionMobileList/SplitForm' {
1025
1033
  import React from 'react';
1026
1034
  import { BankTransaction } from '@layerfi/components/types';
1027
- export const SplitForm: ({ bankTransaction, }: {
1035
+ export const SplitForm: ({ bankTransaction, showTooltips, }: {
1028
1036
  bankTransaction: BankTransaction;
1037
+ showTooltips: boolean;
1029
1038
  }) => React.JSX.Element;
1030
1039
 
1031
1040
  }
@@ -1047,7 +1056,10 @@ declare module '@layerfi/components/components/BankTransactionMobileList/Transac
1047
1056
 
1048
1057
  }
1049
1058
  declare module '@layerfi/components/components/BankTransactionMobileList/constants' {
1050
- export const PersonalCategories: string[];
1059
+ export enum PersonalCategories {
1060
+ INCOME = "PERSONAL_INFLOWS",
1061
+ EXPENSES = "PERSONAL_EXPENSES"
1062
+ }
1051
1063
 
1052
1064
  }
1053
1065
  declare module '@layerfi/components/components/BankTransactionMobileList/index' {
@@ -1088,13 +1100,14 @@ declare module '@layerfi/components/components/BankTransactionRow/BankTransactio
1088
1100
  initialLoad?: boolean;
1089
1101
  showDescriptions: boolean;
1090
1102
  showReceiptUploads: boolean;
1103
+ showTooltips: boolean;
1091
1104
  mode: BankTransactionsMode;
1092
1105
  stringOverrides?: BankTransactionCTAStringOverrides;
1093
1106
  };
1094
1107
  export type LastSubmittedForm = 'simple' | 'match' | 'split' | undefined;
1095
1108
  export const extractDescriptionForSplit: (category: Category) => string;
1096
1109
  export const getDefaultSelectedCategory: (bankTransaction: BankTransaction) => import("@layerfi/components/components/CategorySelect/CategorySelect").CategoryOption | undefined;
1097
- export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, mode, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, stringOverrides, }: Props) => React.JSX.Element;
1110
+ export const BankTransactionRow: ({ index, editable, dateFormat, bankTransaction, mode, removeTransaction, containerWidth, initialLoad, showDescriptions, showReceiptUploads, showTooltips, stringOverrides, }: Props) => React.JSX.Element;
1098
1111
  export {};
1099
1112
 
1100
1113
  }
@@ -1146,6 +1159,7 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
1146
1159
  mode?: BankTransactionsMode;
1147
1160
  showDescriptions?: boolean;
1148
1161
  showReceiptUploads?: boolean;
1162
+ showTooltips?: boolean;
1149
1163
  monthlyView?: boolean;
1150
1164
  categorizeView?: boolean;
1151
1165
  mobileComponent?: MobileComponentType;
@@ -1220,8 +1234,9 @@ declare module '@layerfi/components/components/BankTransactions/utils' {
1220
1234
  }
1221
1235
  declare module '@layerfi/components/components/BankTransactionsLoader/BankTransactionsLoader' {
1222
1236
  import React from 'react';
1223
- export const BankTransactionsLoader: ({ isLoading, }: {
1237
+ export const BankTransactionsLoader: ({ isLoading, showTooltips }: {
1224
1238
  isLoading: boolean;
1239
+ showTooltips: boolean;
1225
1240
  }) => React.JSX.Element;
1226
1241
 
1227
1242
  }
@@ -1252,13 +1267,14 @@ declare module '@layerfi/components/components/BankTransactionsTable/BankTransac
1252
1267
  removeTransaction: (bt: BankTransaction) => void;
1253
1268
  showDescriptions?: boolean;
1254
1269
  showReceiptUploads?: boolean;
1270
+ showTooltips: boolean;
1255
1271
  stringOverrides?: BankTransactionsStringOverrides;
1256
1272
  isSyncing?: boolean;
1257
1273
  page?: number;
1258
1274
  lastPage?: boolean;
1259
1275
  onRefresh?: () => void;
1260
1276
  }
1261
- export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, mode, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, stringOverrides, isSyncing, page, lastPage, onRefresh, }: BankTransactionsTableProps) => React.JSX.Element;
1277
+ export const BankTransactionsTable: ({ categorizeView, editable, isLoading, bankTransactions, mode, initialLoad, containerWidth, removeTransaction, showDescriptions, showReceiptUploads, showTooltips, stringOverrides, isSyncing, page, lastPage, onRefresh, }: BankTransactionsTableProps) => React.JSX.Element;
1262
1278
  export {};
1263
1279
 
1264
1280
  }
@@ -1455,6 +1471,7 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1455
1471
  onChange: (newValue: CategoryOption) => void;
1456
1472
  disabled?: boolean;
1457
1473
  className?: string;
1474
+ showTooltips: boolean;
1458
1475
  excludeMatches?: boolean;
1459
1476
  asDrawer?: boolean;
1460
1477
  };
@@ -1483,7 +1500,7 @@ declare module '@layerfi/components/components/CategorySelect/CategorySelect' {
1483
1500
  export const mapCategoryToOption: (category: Category) => CategoryOption;
1484
1501
  export const mapCategoryToExclusionOption: (category: Category) => CategoryOption;
1485
1502
  export const mapSuggestedMatchToOption: (record: SuggestedMatch) => CategoryOption;
1486
- export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, excludeMatches, asDrawer, }: Props) => React.JSX.Element;
1503
+ export const CategorySelect: ({ bankTransaction, name, value, onChange, disabled, className, showTooltips, excludeMatches, asDrawer, }: Props) => React.JSX.Element;
1487
1504
  export {};
1488
1505
 
1489
1506
  }
@@ -1858,6 +1875,7 @@ declare module '@layerfi/components/components/ExpandedBankTransactionRow/Expand
1858
1875
  categorized?: boolean;
1859
1876
  showDescriptions: boolean;
1860
1877
  showReceiptUploads: boolean;
1878
+ showTooltips: boolean;
1861
1879
  };
1862
1880
  export type SaveHandle = {
1863
1881
  save: () => void;
@@ -5809,11 +5827,12 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
5809
5827
  showBreakConnection?: boolean;
5810
5828
  showDescriptions?: boolean;
5811
5829
  showReceiptUploads?: boolean;
5830
+ showTooltips?: boolean;
5812
5831
  mode?: BankTransactionsMode;
5813
5832
  mobileComponent?: MobileComponentType;
5814
5833
  stringOverrides?: BankTransactionsWithLinkedAccountsStringOverrides;
5815
5834
  }
5816
- export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, mode, showDescriptions, showReceiptUploads, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5835
+ export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, showLedgerBalance, showUnlinkItem, showBreakConnection, mode, showDescriptions, showReceiptUploads, showTooltips, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => React.JSX.Element;
5817
5836
  export {};
5818
5837
 
5819
5838
  }
package/dist/index.js CHANGED
@@ -4920,7 +4920,8 @@ var import_classnames23 = __toESM(require("classnames"));
4920
4920
  var ActionableList = ({
4921
4921
  options,
4922
4922
  onClick,
4923
- selectedId
4923
+ selectedId,
4924
+ showDescriptions = false
4924
4925
  }) => {
4925
4926
  return /* @__PURE__ */ import_react55.default.createElement("ul", { className: "Layer__actionable-list" }, options.map((x, idx) => /* @__PURE__ */ import_react55.default.createElement(
4926
4927
  "li",
@@ -4939,7 +4940,7 @@ var ActionableList = ({
4939
4940
  { className: "Layer__actionable-list__content" },
4940
4941
  /* @__PURE__ */ import_react55.default.createElement(Text, { size: "sm" /* sm */ }, x.label),
4941
4942
  /*TODO: Replace 'See all categories' with something more generic*/
4942
- x.description && x.label !== "See all categories" && /* @__PURE__ */ import_react55.default.createElement(
4943
+ showDescriptions && x.description && x.label !== "See all categories" && /* @__PURE__ */ import_react55.default.createElement(
4943
4944
  Text,
4944
4945
  {
4945
4946
  className: "Layer__actionable-list__content-description",
@@ -4966,9 +4967,6 @@ var ActionableList = ({
4966
4967
  )));
4967
4968
  };
4968
4969
 
4969
- // src/components/BankTransactionMobileList/constants.ts
4970
- var PersonalCategories = ["PERSONAL_INCOME", "PERSONAL_EXPENSES"];
4971
-
4972
4970
  // src/components/BankTransactionMobileList/utils.ts
4973
4971
  var mapCategoryToOption = (category) => ({
4974
4972
  label: category.display_name,
@@ -5015,7 +5013,7 @@ var getAssignedValue = (bankTransaction) => {
5015
5013
  if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ || bankTransaction?.categorization_status === "SPLIT" /* SPLIT */) {
5016
5014
  return;
5017
5015
  }
5018
- if (bankTransaction.category && !PersonalCategories.includes(bankTransaction.category.display_name)) {
5016
+ if (bankTransaction.category && bankTransaction.category.type != "Exclusion") {
5019
5017
  return mapCategoryToOption(bankTransaction.category);
5020
5018
  }
5021
5019
  if (hasSuggestions(bankTransaction.categorization_flow)) {
@@ -5031,7 +5029,9 @@ var BusinessCategories = ({
5031
5029
  selectedId
5032
5030
  }) => {
5033
5031
  const { categories } = useLayerContext();
5034
- const categoryOptions = flattenCategories(categories);
5032
+ const categoryOptions = flattenCategories(
5033
+ categories.filter((category) => category.type != "ExclusionNested")
5034
+ );
5035
5035
  const [optionsToShow, setOptionsToShow] = (0, import_react56.useState)(categoryOptions);
5036
5036
  const [selectedGroup, setSelectedGroup] = (0, import_react56.useState)();
5037
5037
  const onCategorySelect = (v) => {
@@ -5196,7 +5196,7 @@ var Option2 = (props) => {
5196
5196
  className: `Layer__select__option-menu-content ${props.className}`
5197
5197
  },
5198
5198
  /* @__PURE__ */ import_react58.default.createElement("div", { className: "Layer__select__option-menu--name" }, props.isSelected ? /* @__PURE__ */ import_react58.default.createElement("span", { className: "Layer__select__option-menu-content-check" }, /* @__PURE__ */ import_react58.default.createElement(Check_default, { size: 16 })) : /* @__PURE__ */ import_react58.default.createElement("span", { className: "Layer__select__option-menu-content-check" }, /* @__PURE__ */ import_react58.default.createElement("div", { style: { width: 16, height: 16 } })), /* @__PURE__ */ import_react58.default.createElement("div", null, props.data.payload.display_name)),
5199
- props.data.payload.description && /* @__PURE__ */ import_react58.default.createElement("div", { className: "Layer__select__option-menu--tooltip" }, /* @__PURE__ */ import_react58.default.createElement(Tooltip, null, /* @__PURE__ */ import_react58.default.createElement(TooltipTrigger, null, /* @__PURE__ */ import_react58.default.createElement(InfoIcon_default, null)), /* @__PURE__ */ import_react58.default.createElement(TooltipContent, { className: "Layer__actionable-list__tooltip-content" }, /* @__PURE__ */ import_react58.default.createElement(
5199
+ props.showTooltips && props.data.payload.description && /* @__PURE__ */ import_react58.default.createElement("div", { className: "Layer__select__option-menu--tooltip" }, /* @__PURE__ */ import_react58.default.createElement(Tooltip, null, /* @__PURE__ */ import_react58.default.createElement(TooltipTrigger, null, /* @__PURE__ */ import_react58.default.createElement(InfoIcon_default, null)), /* @__PURE__ */ import_react58.default.createElement(TooltipContent, { className: "Layer__actionable-list__tooltip-content" }, /* @__PURE__ */ import_react58.default.createElement(
5200
5200
  Text,
5201
5201
  {
5202
5202
  className: "Layer__actionable-list__content-description",
@@ -5245,6 +5245,7 @@ var CategorySelect = ({
5245
5245
  onChange,
5246
5246
  disabled,
5247
5247
  className,
5248
+ showTooltips,
5248
5249
  excludeMatches = false,
5249
5250
  asDrawer = false
5250
5251
  }) => {
@@ -5308,7 +5309,11 @@ var CategorySelect = ({
5308
5309
  styles: {
5309
5310
  menuPortal: (base) => ({ ...base, zIndex: 9999 })
5310
5311
  },
5311
- components: { DropdownIndicator, GroupHeading, Option: Option2 },
5312
+ components: {
5313
+ DropdownIndicator,
5314
+ GroupHeading,
5315
+ Option: (optionProps) => /* @__PURE__ */ import_react58.default.createElement(Option2, { ...optionProps, showTooltips })
5316
+ },
5312
5317
  isDisabled: disabled,
5313
5318
  isOptionDisabled: (option) => option.disabled ?? false,
5314
5319
  isOptionSelected: (option) => selected?.payload.display_name == option.payload.display_name
@@ -6143,7 +6148,8 @@ var ExpandedBankTransactionRow = (0, import_react71.forwardRef)(
6143
6148
  containerWidth,
6144
6149
  showDescriptions,
6145
6150
  mode,
6146
- showReceiptUploads
6151
+ showReceiptUploads,
6152
+ showTooltips
6147
6153
  }, ref) => {
6148
6154
  const {
6149
6155
  categorize: categorizeBankTransaction2,
@@ -6497,7 +6503,8 @@ var ExpandedBankTransactionRow = (0, import_react71.forwardRef)(
6497
6503
  onChange: (value) => changeCategory(index, value),
6498
6504
  className: "Layer__category-menu--full",
6499
6505
  disabled: bankTransaction.processing || !categorizationEnabled(mode),
6500
- excludeMatches: true
6506
+ excludeMatches: true,
6507
+ showTooltips
6501
6508
  }
6502
6509
  ),
6503
6510
  index > 0 && /* @__PURE__ */ import_react71.default.createElement(
@@ -6666,6 +6673,7 @@ var BankTransactionRow = ({
6666
6673
  initialLoad,
6667
6674
  showDescriptions,
6668
6675
  showReceiptUploads,
6676
+ showTooltips,
6669
6677
  stringOverrides
6670
6678
  }) => {
6671
6679
  const expandedRowRef = (0, import_react73.useRef)(null);
@@ -6821,7 +6829,8 @@ var BankTransactionRow = ({
6821
6829
  setSelectedCategory(category);
6822
6830
  setShowRetry(false);
6823
6831
  },
6824
- disabled: bankTransaction.processing
6832
+ disabled: bankTransaction.processing,
6833
+ showTooltips
6825
6834
  }
6826
6835
  ) : null,
6827
6836
  categorized && !open ? /* @__PURE__ */ import_react73.default.createElement(Text, { as: "span", className: `${className}__category-text` }, bankTransaction.categorization_status === "SPLIT" /* SPLIT */ && /* @__PURE__ */ import_react73.default.createElement(import_react73.default.Fragment, null, /* @__PURE__ */ import_react73.default.createElement(
@@ -6913,7 +6922,8 @@ var BankTransactionRow = ({
6913
6922
  close: () => setOpen(false),
6914
6923
  containerWidth,
6915
6924
  showDescriptions,
6916
- showReceiptUploads
6925
+ showReceiptUploads,
6926
+ showTooltips
6917
6927
  }
6918
6928
  ))));
6919
6929
  };
@@ -6966,6 +6976,7 @@ var BankTransactionListItem = ({
6966
6976
  mode,
6967
6977
  showDescriptions,
6968
6978
  showReceiptUploads,
6979
+ showTooltips,
6969
6980
  containerWidth,
6970
6981
  removeTransaction,
6971
6982
  stringOverrides
@@ -7062,7 +7073,8 @@ var BankTransactionListItem = ({
7062
7073
  submitBtnText: categorized ? stringOverrides?.updateButtonText || "Update" : stringOverrides?.approveButtonText || "Approve",
7063
7074
  containerWidth,
7064
7075
  showDescriptions,
7065
- showReceiptUploads
7076
+ showReceiptUploads,
7077
+ showTooltips
7066
7078
  }
7067
7079
  )), /* @__PURE__ */ import_react75.default.createElement("span", { className: `${className}__base-row` }, !categorized ? /* @__PURE__ */ import_react75.default.createElement(
7068
7080
  CategorySelect,
@@ -7074,7 +7086,8 @@ var BankTransactionListItem = ({
7074
7086
  setShowRetry(false);
7075
7087
  setSelectedCategory(category);
7076
7088
  },
7077
- disabled: bankTransaction.processing
7089
+ disabled: bankTransaction.processing,
7090
+ showTooltips
7078
7091
  }
7079
7092
  ) : null, categorized ? /* @__PURE__ */ import_react75.default.createElement(Assignment, { bankTransaction }) : null, !categorized && !showRetry ? /* @__PURE__ */ import_react75.default.createElement(
7080
7093
  SubmitButton,
@@ -7114,6 +7127,7 @@ var BankTransactionList = ({
7114
7127
  containerWidth,
7115
7128
  showDescriptions = false,
7116
7129
  showReceiptUploads = false,
7130
+ showTooltips,
7117
7131
  stringOverrides
7118
7132
  }) => {
7119
7133
  return /* @__PURE__ */ import_react76.default.createElement("ul", { className: "Layer__bank-transactions__list" }, bankTransactions?.map(
@@ -7130,6 +7144,7 @@ var BankTransactionList = ({
7130
7144
  containerWidth,
7131
7145
  showDescriptions,
7132
7146
  showReceiptUploads,
7147
+ showTooltips,
7133
7148
  stringOverrides
7134
7149
  }
7135
7150
  )
@@ -7147,7 +7162,10 @@ var import_react82 = __toESM(require("react"));
7147
7162
 
7148
7163
  // src/components/BankTransactionMobileList/BusinessForm.tsx
7149
7164
  var import_react77 = __toESM(require("react"));
7150
- var BusinessForm = ({ bankTransaction }) => {
7165
+ var BusinessForm = ({
7166
+ bankTransaction,
7167
+ showTooltips
7168
+ }) => {
7151
7169
  const { setContent, close } = (0, import_react77.useContext)(DrawerContext);
7152
7170
  const { categorize: categorizeBankTransaction2, isLoading } = useBankTransactionsContext();
7153
7171
  const [selectedCategory, setSelectedCategory] = (0, import_react77.useState)(
@@ -7230,7 +7248,8 @@ var BusinessForm = ({ bankTransaction }) => {
7230
7248
  {
7231
7249
  options,
7232
7250
  onClick: onCategorySelect,
7233
- selectedId: selectedCategory?.id
7251
+ selectedId: selectedCategory?.id,
7252
+ showDescriptions: showTooltips
7234
7253
  }
7235
7254
  ), options.length === 0 ? /* @__PURE__ */ import_react77.default.createElement(
7236
7255
  Button,
@@ -7253,12 +7272,21 @@ var BusinessForm = ({ bankTransaction }) => {
7253
7272
 
7254
7273
  // src/components/BankTransactionMobileList/PersonalForm.tsx
7255
7274
  var import_react78 = __toESM(require("react"));
7275
+
7276
+ // src/components/BankTransactionMobileList/constants.ts
7277
+ var PersonalCategories = /* @__PURE__ */ ((PersonalCategories2) => {
7278
+ PersonalCategories2["INCOME"] = "PERSONAL_INFLOWS";
7279
+ PersonalCategories2["EXPENSES"] = "PERSONAL_EXPENSES";
7280
+ return PersonalCategories2;
7281
+ })(PersonalCategories || {});
7282
+
7283
+ // src/components/BankTransactionMobileList/PersonalForm.tsx
7256
7284
  var isAlreadyAssigned = (bankTransaction) => {
7257
7285
  if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ || bankTransaction?.categorization_status === "SPLIT" /* SPLIT */) {
7258
7286
  return false;
7259
7287
  }
7260
7288
  return Boolean(
7261
- bankTransaction.category && PersonalCategories.includes(bankTransaction.category.display_name)
7289
+ bankTransaction.category && Object.values(PersonalCategories).includes(bankTransaction.category.display_name)
7262
7290
  );
7263
7291
  };
7264
7292
  var PersonalForm = ({ bankTransaction }) => {
@@ -7275,8 +7303,8 @@ var PersonalForm = ({ bankTransaction }) => {
7275
7303
  {
7276
7304
  type: "Category",
7277
7305
  category: {
7278
- type: "StableName",
7279
- stable_name: isCredit(bankTransaction) ? "PERSONAL_INCOME" : "PERSONAL_EXPENSES"
7306
+ type: "Exclusion",
7307
+ exclusion_type: isCredit(bankTransaction) ? "PERSONAL_INFLOWS" /* INCOME */ : "PERSONAL_EXPENSES" /* EXPENSES */
7280
7308
  }
7281
7309
  },
7282
7310
  true
@@ -7358,7 +7386,8 @@ var MatchForm2 = ({
7358
7386
  var import_react80 = __toESM(require("react"));
7359
7387
  var import_classnames38 = __toESM(require("classnames"));
7360
7388
  var SplitForm = ({
7361
- bankTransaction
7389
+ bankTransaction,
7390
+ showTooltips
7362
7391
  }) => {
7363
7392
  const {
7364
7393
  categorize: categorizeBankTransaction2,
@@ -7509,7 +7538,8 @@ var SplitForm = ({
7509
7538
  className: "Layer__category-menu--full",
7510
7539
  disabled: bankTransaction.processing,
7511
7540
  excludeMatches: true,
7512
- asDrawer: true
7541
+ asDrawer: true,
7542
+ showTooltips
7513
7543
  }
7514
7544
  )),
7515
7545
  /* @__PURE__ */ import_react80.default.createElement(
@@ -7561,28 +7591,48 @@ var SplitForm = ({
7561
7591
 
7562
7592
  // src/components/BankTransactionMobileList/SplitAndMatchForm.tsx
7563
7593
  var SplitAndMatchForm = ({
7564
- bankTransaction
7594
+ bankTransaction,
7595
+ showTooltips
7565
7596
  }) => {
7566
7597
  const anyMatch = hasMatch(bankTransaction);
7567
7598
  const [formType, setFormType] = (0, import_react81.useState)(
7568
7599
  bankTransaction.category ? "categorize" /* categorize */ : anyMatch ? "match" /* match */ : "categorize" /* categorize */
7569
7600
  );
7570
- return /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__split-and-match-form" }, formType === "categorize" /* categorize */ && /* @__PURE__ */ import_react81.default.createElement(SplitForm, { bankTransaction }), formType === "match" /* match */ && /* @__PURE__ */ import_react81.default.createElement(MatchForm2, { bankTransaction }), anyMatch && formType === "match" /* match */ ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ import_react81.default.createElement(TextButton, { onClick: () => setFormType("categorize" /* categorize */) }, "or split transaction")) : null, anyMatch && formType === "categorize" /* categorize */ ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ import_react81.default.createElement(TextButton, { onClick: () => setFormType("match" /* match */) }, "or find match")) : null);
7601
+ return /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__split-and-match-form" }, formType === "categorize" /* categorize */ && /* @__PURE__ */ import_react81.default.createElement(
7602
+ SplitForm,
7603
+ {
7604
+ bankTransaction,
7605
+ showTooltips
7606
+ }
7607
+ ), formType === "match" /* match */ && /* @__PURE__ */ import_react81.default.createElement(MatchForm2, { bankTransaction }), anyMatch && formType === "match" /* match */ ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ import_react81.default.createElement(TextButton, { onClick: () => setFormType("categorize" /* categorize */) }, "or split transaction")) : null, anyMatch && formType === "categorize" /* categorize */ ? /* @__PURE__ */ import_react81.default.createElement("div", { className: "Layer__bank-transaction-mobile-list-item__switch-form-btns" }, /* @__PURE__ */ import_react81.default.createElement(TextButton, { onClick: () => setFormType("match" /* match */) }, "or find match")) : null);
7571
7608
  };
7572
7609
 
7573
7610
  // src/components/BankTransactionMobileList/BankTransactionMobileForms.tsx
7574
7611
  var BankTransactionMobileForms = ({
7575
7612
  purpose,
7576
- bankTransaction
7613
+ bankTransaction,
7614
+ showTooltips
7577
7615
  }) => {
7578
7616
  const getContent = () => {
7579
7617
  switch (purpose) {
7580
7618
  case "business":
7581
- return /* @__PURE__ */ import_react82.default.createElement(BusinessForm, { bankTransaction });
7619
+ return /* @__PURE__ */ import_react82.default.createElement(
7620
+ BusinessForm,
7621
+ {
7622
+ bankTransaction,
7623
+ showTooltips
7624
+ }
7625
+ );
7582
7626
  case "personal":
7583
7627
  return /* @__PURE__ */ import_react82.default.createElement(PersonalForm, { bankTransaction });
7584
7628
  case "more":
7585
- return /* @__PURE__ */ import_react82.default.createElement(SplitAndMatchForm, { bankTransaction });
7629
+ return /* @__PURE__ */ import_react82.default.createElement(
7630
+ SplitAndMatchForm,
7631
+ {
7632
+ bankTransaction,
7633
+ showTooltips
7634
+ }
7635
+ );
7586
7636
  default:
7587
7637
  return null;
7588
7638
  }
@@ -7627,6 +7677,7 @@ var BankTransactionMobileListItem = ({
7627
7677
  editable,
7628
7678
  mode,
7629
7679
  initialLoad,
7680
+ showTooltips,
7630
7681
  isFirstItem = false
7631
7682
  }) => {
7632
7683
  const {
@@ -7644,7 +7695,7 @@ var BankTransactionMobileListItem = ({
7644
7695
  const itemRef = (0, import_react84.useRef)(null);
7645
7696
  const [removeAnim, setRemoveAnim] = (0, import_react84.useState)(false);
7646
7697
  const [purpose, setPurpose] = (0, import_react84.useState)(
7647
- bankTransaction.category ? bankTransaction.categorization_status === "SPLIT" /* SPLIT */ ? "more" /* more */ : "business" /* business */ : hasMatch(bankTransaction) ? "more" /* more */ : "business" /* business */
7698
+ bankTransaction.category ? bankTransaction.category.type === "Exclusion" ? "personal" /* personal */ : bankTransaction.categorization_status === "SPLIT" /* SPLIT */ ? "more" /* more */ : "business" /* business */ : hasMatch(bankTransaction) ? "more" /* more */ : "business" /* business */
7648
7699
  );
7649
7700
  const [open, setOpen] = (0, import_react84.useState)(isFirstItem);
7650
7701
  const [showComponent, setShowComponent] = (0, import_react84.useState)(!initialLoad);
@@ -7778,7 +7829,8 @@ var BankTransactionMobileListItem = ({
7778
7829
  BankTransactionMobileForms,
7779
7830
  {
7780
7831
  purpose,
7781
- bankTransaction
7832
+ bankTransaction,
7833
+ showTooltips
7782
7834
  }
7783
7835
  )
7784
7836
  )
@@ -7791,6 +7843,7 @@ var BankTransactionMobileList = ({
7791
7843
  removeTransaction,
7792
7844
  editable,
7793
7845
  initialLoad,
7846
+ showTooltips,
7794
7847
  mode
7795
7848
  }) => {
7796
7849
  const transactionToOpenContextData = useTransactionToOpen();
@@ -7802,6 +7855,7 @@ var BankTransactionMobileList = ({
7802
7855
  mode,
7803
7856
  key: bankTransaction.id,
7804
7857
  bankTransaction,
7858
+ showTooltips,
7805
7859
  editable,
7806
7860
  removeTransaction,
7807
7861
  initialLoad,
@@ -7871,7 +7925,8 @@ var SkeletonTableLoader = ({
7871
7925
 
7872
7926
  // src/components/BankTransactionsLoader/BankTransactionsLoader.tsx
7873
7927
  var BankTransactionsLoader = ({
7874
- isLoading = true
7928
+ isLoading = true,
7929
+ showTooltips
7875
7930
  }) => {
7876
7931
  const inactiveBankTransactionsActions = /* @__PURE__ */ import_react88.default.createElement("div", { className: "Layer__bank-transaction-row__actions-container Layer__bank-transaction-row__actions-disabled" }, /* @__PURE__ */ import_react88.default.createElement(
7877
7932
  CategorySelect,
@@ -7881,7 +7936,8 @@ var BankTransactionsLoader = ({
7881
7936
  value: void 0,
7882
7937
  onChange: () => {
7883
7938
  },
7884
- disabled: true
7939
+ disabled: true,
7940
+ showTooltips
7885
7941
  }
7886
7942
  ), /* @__PURE__ */ import_react88.default.createElement(
7887
7943
  SubmitButton,
@@ -7964,6 +8020,7 @@ var BankTransactionsTable = ({
7964
8020
  removeTransaction,
7965
8021
  showDescriptions = false,
7966
8022
  showReceiptUploads = false,
8023
+ showTooltips,
7967
8024
  stringOverrides,
7968
8025
  isSyncing = false,
7969
8026
  page,
@@ -7977,7 +8034,7 @@ var BankTransactionsTable = ({
7977
8034
  className: "Layer__table Layer__bank-transactions__table with-cell-separators"
7978
8035
  },
7979
8036
  /* @__PURE__ */ import_react90.default.createElement("thead", null, /* @__PURE__ */ import_react90.default.createElement("tr", null, /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__bank-transactions__date-col" }, stringOverrides?.transactionsTable?.dateColumnHeaderText || "Date"), /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__bank-transactions__tx-col" }, stringOverrides?.transactionsTable?.transactionColumnHeaderText || "Transaction"), /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__bank-transactions__account-col" }, stringOverrides?.transactionsTable?.accountColumnHeaderText || "Account"), /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__table-cell--amount Layer__table-cell__amount-col" }, stringOverrides?.transactionsTable?.amountColumnHeaderText || "Amount"), categorizeView && editable ? /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__table-header--primary Layer__table-cell__category-col" }, stringOverrides?.transactionsTable?.categorizeColumnHeaderText || "Categorize") : /* @__PURE__ */ import_react90.default.createElement("th", { className: "Layer__table-header Layer__table-cell__category-col" }, stringOverrides?.transactionsTable?.categoryColumnHeaderText || "Category"))),
7980
- isLoading && page && page === 1 ? /* @__PURE__ */ import_react90.default.createElement(BankTransactionsLoader, { isLoading: true }) : null,
8037
+ isLoading && page && page === 1 ? /* @__PURE__ */ import_react90.default.createElement(BankTransactionsLoader, { isLoading: true, showTooltips }) : null,
7981
8038
  /* @__PURE__ */ import_react90.default.createElement("tbody", null, !isLoading && bankTransactions?.map(
7982
8039
  (bankTransaction, index) => /* @__PURE__ */ import_react90.default.createElement(
7983
8040
  BankTransactionRow,
@@ -7993,6 +8050,7 @@ var BankTransactionsTable = ({
7993
8050
  containerWidth,
7994
8051
  showDescriptions,
7995
8052
  showReceiptUploads,
8053
+ showTooltips,
7996
8054
  stringOverrides: stringOverrides?.bankTransactionCTAs
7997
8055
  }
7998
8056
  )
@@ -8826,6 +8884,7 @@ var BankTransactionsContent = ({
8826
8884
  mode = "self-serve",
8827
8885
  showDescriptions = false,
8828
8886
  showReceiptUploads = false,
8887
+ showTooltips = false,
8829
8888
  monthlyView = false,
8830
8889
  categorizeView: categorizeViewProp,
8831
8890
  mobileComponent,
@@ -8983,6 +9042,7 @@ var BankTransactionsContent = ({
8983
9042
  removeTransaction,
8984
9043
  showDescriptions,
8985
9044
  showReceiptUploads,
9045
+ showTooltips,
8986
9046
  page: currentPage,
8987
9047
  stringOverrides,
8988
9048
  lastPage: isLastPage,
@@ -8997,7 +9057,8 @@ var BankTransactionsContent = ({
8997
9057
  editable,
8998
9058
  removeTransaction,
8999
9059
  containerWidth,
9000
- stringOverrides: stringOverrides?.bankTransactionCTAs
9060
+ stringOverrides: stringOverrides?.bankTransactionCTAs,
9061
+ showTooltips
9001
9062
  }
9002
9063
  ) : null,
9003
9064
  !isLoading && listView && mobileComponent === "mobileList" ? /* @__PURE__ */ import_react99.default.createElement(
@@ -9007,7 +9068,8 @@ var BankTransactionsContent = ({
9007
9068
  editable,
9008
9069
  mode,
9009
9070
  removeTransaction,
9010
- initialLoad
9071
+ initialLoad,
9072
+ showTooltips
9011
9073
  }
9012
9074
  ) : null,
9013
9075
  listView && isLoading ? /* @__PURE__ */ import_react99.default.createElement("div", { className: "Layer__bank-transactions__list-loader" }, /* @__PURE__ */ import_react99.default.createElement(Loader2, null)) : null,
@@ -16747,6 +16809,7 @@ var BankTransactionsWithLinkedAccounts = ({
16747
16809
  mode = "self-serve",
16748
16810
  showDescriptions,
16749
16811
  showReceiptUploads,
16812
+ showTooltips = false,
16750
16813
  mobileComponent,
16751
16814
  stringOverrides
16752
16815
  }) => {
@@ -16772,6 +16835,7 @@ var BankTransactionsWithLinkedAccounts = ({
16772
16835
  asWidget: true,
16773
16836
  showDescriptions,
16774
16837
  showReceiptUploads,
16838
+ showTooltips,
16775
16839
  mobileComponent,
16776
16840
  mode,
16777
16841
  stringOverrides: stringOverrides?.bankTransactions