@layerfi/components 0.1.114-alpha.6 → 0.1.114

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.
@@ -202,7 +202,7 @@ class ErrorHandlerClass {
202
202
  }
203
203
  const errorHandler = new ErrorHandlerClass();
204
204
  const reportError = (payload) => errorHandler.onError(payload);
205
- const version = "0.1.114-alpha.6";
205
+ const version = "0.1.114";
206
206
  const pkg = {
207
207
  version
208
208
  };
@@ -8974,7 +8974,7 @@ function buildCustomDropdownIndicator() {
8974
8974
  Select$1.components.DropdownIndicator,
8975
8975
  __spreadProps(__spreadValues({}, restProps), {
8976
8976
  className: COMBO_BOX_CLASS_NAMES.DROPDOWN_INDICATOR,
8977
- children: !isDisabled && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: 16 })
8977
+ children: !isDisabled ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
8978
8978
  })
8979
8979
  );
8980
8980
  };
@@ -10423,7 +10423,7 @@ const BankTransactionsCategorizeAllModal = ({
10423
10423
  const { selectedIds } = useSelectedIds();
10424
10424
  const { clearSelection } = useBulkSelectionActions();
10425
10425
  const [selectedCategory, setSelectedCategory] = react.useState(null);
10426
- const { trigger } = useBulkCategorize();
10426
+ const { trigger, isMutating } = useBulkCategorize();
10427
10427
  const handleCategorizeModalClose = react.useCallback((isOpen2) => {
10428
10428
  onOpenChange(isOpen2);
10429
10429
  if (!isOpen2) {
@@ -10459,7 +10459,7 @@ const BankTransactionsCategorizeAllModal = ({
10459
10459
  title: mode === "Categorize" ? "Categorize all selected transactions?" : "Recategorize all selected transactions?",
10460
10460
  content: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
10461
10461
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", children: [
10462
- /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: categorySelectId, children: "Select category" }),
10462
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { size: "sm", htmlFor: categorySelectId, children: "Select category" }),
10463
10463
  useCategorySelectDrawer ? /* @__PURE__ */ jsxRuntime.jsx(
10464
10464
  CategorySelectDrawerWithTrigger,
10465
10465
  {
@@ -10474,7 +10474,8 @@ const BankTransactionsCategorizeAllModal = ({
10474
10474
  inputId: categorySelectId,
10475
10475
  selectedValue: selectedCategory,
10476
10476
  onSelectedValueChange: setSelectedCategory,
10477
- includeSuggestedMatches: false
10477
+ includeSuggestedMatches: false,
10478
+ isDisabled: isMutating
10478
10479
  }
10479
10480
  )
10480
10481
  ] }),
@@ -16160,6 +16161,24 @@ function useBankTransactionMetadata({ bankTransactionId }) {
16160
16161
  );
16161
16162
  }
16162
16163
  const UPDATE_BANK_TRANSACTION_METADATA_TAG_KEY = "#update-bank-transaction-metadata";
16164
+ class UpdateBankTransactionMetadataSWRResponse {
16165
+ constructor(swrResponse) {
16166
+ __publicField(this, "swrResponse");
16167
+ this.swrResponse = swrResponse;
16168
+ }
16169
+ get data() {
16170
+ return this.swrResponse.data;
16171
+ }
16172
+ get trigger() {
16173
+ return this.swrResponse.trigger;
16174
+ }
16175
+ get isMutating() {
16176
+ return this.swrResponse.isMutating;
16177
+ }
16178
+ get isError() {
16179
+ return this.swrResponse.error !== void 0;
16180
+ }
16181
+ }
16163
16182
  function buildKey$H({
16164
16183
  access_token: accessToken,
16165
16184
  apiUrl,
@@ -16180,7 +16199,7 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
16180
16199
  const { data: auth } = useAuth();
16181
16200
  const { businessId } = useLayerContext();
16182
16201
  const { mutate } = useSWR.useSWRConfig();
16183
- const mutationResponse = useSWRMutation(
16202
+ const rawMutationResponse = useSWRMutation(
16184
16203
  () => buildKey$H({
16185
16204
  access_token: auth == null ? void 0 : auth.access_token,
16186
16205
  apiUrl: auth == null ? void 0 : auth.apiUrl,
@@ -16206,6 +16225,7 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
16206
16225
  throwOnError: false
16207
16226
  }
16208
16227
  );
16228
+ const mutationResponse = new UpdateBankTransactionMetadataSWRResponse(rawMutationResponse);
16209
16229
  const { trigger: originalTrigger } = mutationResponse;
16210
16230
  const stableProxiedTrigger = react.useCallback(
16211
16231
  (...triggerParameters) => __async(null, null, function* () {
@@ -16231,21 +16251,37 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
16231
16251
  });
16232
16252
  }
16233
16253
  const useBankTransactionMemo = ({ bankTransactionId }) => {
16234
- const { trigger: updateBankTransactionMetadata2 } = useUpdateBankTransactionMetadata({ bankTransactionId });
16235
- const { data: bankTransactionMetadata } = useBankTransactionMetadata({ bankTransactionId });
16254
+ const {
16255
+ trigger: updateBankTransactionMetadata2,
16256
+ isMutating: isUpdatingMemo,
16257
+ isError: isErrorUpdatingMemo,
16258
+ data: updateResult
16259
+ } = useUpdateBankTransactionMetadata({ bankTransactionId });
16260
+ const { data: bankTransactionMetadata, mutate: mutateBankTransactionMetadata } = useBankTransactionMetadata({ bankTransactionId });
16236
16261
  const form = reactForm.useForm({
16237
16262
  defaultValues: {
16238
16263
  memo: bankTransactionMetadata == null ? void 0 : bankTransactionMetadata.memo
16239
16264
  },
16240
16265
  onSubmit: (_0) => __async(null, [_0], function* ({ value }) {
16241
- var _a;
16266
+ var _a, _b;
16242
16267
  if (value.memo !== void 0 && form.state.isDirty) {
16243
- yield updateBankTransactionMetadata2({ memo: (_a = value.memo) != null ? _a : "" });
16244
- form.reset(value);
16268
+ const result = yield mutateBankTransactionMetadata(
16269
+ updateBankTransactionMetadata2({ memo: (_a = value.memo) != null ? _a : "" }),
16270
+ { optimisticData: { memo: (_b = value.memo) != null ? _b : "" }, revalidate: false }
16271
+ );
16272
+ if (result !== void 0) {
16273
+ form.reset(value);
16274
+ }
16245
16275
  }
16246
16276
  })
16247
16277
  });
16248
- return form;
16278
+ const isSaved = !isUpdatingMemo && !isErrorUpdatingMemo && updateResult !== void 0 && !form.state.isDirty;
16279
+ return react.useMemo(() => ({
16280
+ form,
16281
+ isUpdatingMemo,
16282
+ isErrorUpdatingMemo,
16283
+ isSaved
16284
+ }), [form, isErrorUpdatingMemo, isUpdatingMemo, isSaved]);
16249
16285
  };
16250
16286
  const Textarea = (_Pb) => {
16251
16287
  var _Qb = _Pb, {
@@ -16268,24 +16304,26 @@ const Textarea = (_Pb) => {
16268
16304
  ] });
16269
16305
  };
16270
16306
  const BankTransactionMemo = ({ bankTransactionId }) => {
16271
- const form = useBankTransactionMemo({ bankTransactionId });
16307
+ const { form, isUpdatingMemo, isErrorUpdatingMemo, isSaved } = useBankTransactionMemo({ bankTransactionId });
16272
16308
  return /* @__PURE__ */ jsxRuntime.jsx("form", { onBlur: () => void form.handleSubmit(), children: /* @__PURE__ */ jsxRuntime.jsx(form.Field, { name: "memo", children: (field) => {
16273
16309
  var _a;
16274
- return /* @__PURE__ */ jsxRuntime.jsx(
16275
- InputGroup,
16276
- {
16277
- name: "memo",
16278
- children: /* @__PURE__ */ jsxRuntime.jsx(
16279
- Textarea,
16280
- {
16281
- name: "memo",
16282
- placeholder: "Add description",
16283
- value: (_a = field.state.value) != null ? _a : void 0,
16284
- onChange: (e) => field.handleChange(e.target.value)
16285
- }
16286
- )
16287
- }
16288
- );
16310
+ return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "3xs", children: [
16311
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { justify: "space-between", align: "baseline", children: [
16312
+ /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "memo", size: "sm", weight: "bold", children: "Description" }),
16313
+ isUpdatingMemo && /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "sm", weight: "bold", variant: "subtle", children: "Saving..." }),
16314
+ !isUpdatingMemo && isSaved && /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "sm", status: "success", children: "Saved" }),
16315
+ !isUpdatingMemo && !isSaved && isErrorUpdatingMemo && /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "sm", weight: "bold", status: "error", children: "Error saving" })
16316
+ ] }),
16317
+ /* @__PURE__ */ jsxRuntime.jsx(
16318
+ Textarea,
16319
+ {
16320
+ name: "memo",
16321
+ placeholder: "Add description",
16322
+ value: (_a = field.state.value) != null ? _a : void 0,
16323
+ onChange: (e) => field.handleChange(e.target.value)
16324
+ }
16325
+ )
16326
+ ] });
16289
16327
  } }) });
16290
16328
  };
16291
16329
  const range$1 = (start, end) => {
@@ -17425,10 +17463,7 @@ function BankTransactionFormFields({
17425
17463
  isReadOnly
17426
17464
  }
17427
17465
  ),
17428
- showDescriptions && /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
17429
- /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "sm", weight: "bold", children: "Description" }),
17430
- /* @__PURE__ */ jsxRuntime.jsx(BankTransactionMemo, { bankTransactionId: bankTransaction.id })
17431
- ] })
17466
+ showDescriptions && /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "sm", children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionMemo, { bankTransactionId: bankTransaction.id }) })
17432
17467
  ] });
17433
17468
  }
17434
17469
  const ExpandedBankTransactionRow = react.forwardRef(
@@ -17657,8 +17692,7 @@ const ExpandedBankTransactionRow = react.forwardRef(
17657
17692
  onSelectedValueChange: (value) => {
17658
17693
  changeCategoryForSplitAtIndex(index2, value);
17659
17694
  },
17660
- isLoading: bankTransaction.processing,
17661
- isDisabled: !categorizationEnabled,
17695
+ isDisabled: !categorizationEnabled || bankTransaction.processing,
17662
17696
  includeSuggestedMatches: false
17663
17697
  }
17664
17698
  ),
@@ -17837,6 +17871,7 @@ const BankTransactionRow = ({
17837
17871
  const { setTransactionCategory } = useBankTransactionsCategoryActions();
17838
17872
  const { selectedCategory } = useGetBankTransactionCategory(bankTransaction.id);
17839
17873
  const { saveBankTransactionRow } = useSaveBankTransactionRow();
17874
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
17840
17875
  react.useEffect(() => {
17841
17876
  if (bankTransaction.error) {
17842
17877
  setShowRetry(true);
@@ -17979,12 +18014,12 @@ const BankTransactionRow = ({
17979
18014
  className: "Layer__bank-transaction__submit-btn",
17980
18015
  processing: bankTransaction.processing,
17981
18016
  active: open,
17982
- action: categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
18017
+ action: displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
17983
18018
  disabled: selectedCategory === null,
17984
- children: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
18019
+ children: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
17985
18020
  }
17986
18021
  ),
17987
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsxRuntime.jsx(VStack, { pis: "lg", fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
18022
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx(VStack, { pis: "lg", fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
17988
18023
  /* @__PURE__ */ jsxRuntime.jsx(
17989
18024
  IconButton,
17990
18025
  {
@@ -18006,7 +18041,7 @@ const BankTransactionRow = ({
18006
18041
  variant: "fade",
18007
18042
  isOpen: categorizationEnabled && !categorized,
18008
18043
  className: "Layer__BankTransactionRow__CategoryComboBoxMotionContent",
18009
- slotProps: { AnimatePresence: { mode: "wait" } },
18044
+ slotProps: { AnimatePresence: { mode: "wait", initial: false } },
18010
18045
  children: /* @__PURE__ */ jsxRuntime.jsx(
18011
18046
  BankTransactionCategoryComboBox,
18012
18047
  {
@@ -18016,20 +18051,20 @@ const BankTransactionRow = ({
18016
18051
  setTransactionCategory(bankTransaction.id, selectedCategory2);
18017
18052
  setShowRetry(false);
18018
18053
  },
18019
- isLoading: bankTransaction.processing
18054
+ isDisabled: bankTransaction.processing
18020
18055
  }
18021
18056
  )
18022
18057
  },
18023
18058
  "category-combobox"
18024
18059
  ),
18025
- categorized && /* @__PURE__ */ jsxRuntime.jsx(
18060
+ displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx(
18026
18061
  BankTransactionsCategorizedSelectedValue,
18027
18062
  {
18028
18063
  bankTransaction,
18029
18064
  className: "Layer__bank-transaction-row__category"
18030
18065
  }
18031
18066
  ),
18032
- categorizationEnabled && !categorized && showRetry && /* @__PURE__ */ jsxRuntime.jsx(
18067
+ !displayAsCategorized && categorizationEnabled && showRetry && /* @__PURE__ */ jsxRuntime.jsx(
18033
18068
  RetryButton,
18034
18069
  {
18035
18070
  onClick: () => {
@@ -18043,7 +18078,7 @@ const BankTransactionRow = ({
18043
18078
  children: "Retry"
18044
18079
  }
18045
18080
  ),
18046
- !categorized && categorizationEnabled && !showRetry && /* @__PURE__ */ jsxRuntime.jsx(
18081
+ !displayAsCategorized && categorizationEnabled && !showRetry && /* @__PURE__ */ jsxRuntime.jsx(
18047
18082
  SubmitButton,
18048
18083
  {
18049
18084
  onClick: () => {
@@ -18055,11 +18090,11 @@ const BankTransactionRow = ({
18055
18090
  processing: bankTransaction.processing,
18056
18091
  active: open,
18057
18092
  disabled: selectedCategory === null,
18058
- action: categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
18059
- children: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
18093
+ action: displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
18094
+ children: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
18060
18095
  }
18061
18096
  ),
18062
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsxRuntime.jsx(VStack, { pis: "xs", fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
18097
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx(VStack, { pis: "xs", fluid: true, children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
18063
18098
  /* @__PURE__ */ jsxRuntime.jsx(
18064
18099
  IconButton,
18065
18100
  {
@@ -18083,7 +18118,7 @@ const BankTransactionRow = ({
18083
18118
  {
18084
18119
  ref: expandedRowRef,
18085
18120
  bankTransaction,
18086
- categorized,
18121
+ categorized: displayAsCategorized,
18087
18122
  isOpen: open,
18088
18123
  close: () => setOpen(false),
18089
18124
  containerWidth,
@@ -18189,6 +18224,7 @@ const BankTransactionsListItem = ({
18189
18224
  const bookkeepingStatus = useEffectiveBookkeepingStatus();
18190
18225
  const categorizationEnabled = isCategorizationEnabledForStatus(bookkeepingStatus);
18191
18226
  const categorized = isCategorized(bankTransaction);
18227
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
18192
18228
  const { isVisible } = useDelayedVisibility({ delay: index2 * 80 });
18193
18229
  const { select, deselect } = useBulkSelectionActions();
18194
18230
  const isSelected = useIdIsSelected();
@@ -18285,7 +18321,7 @@ const BankTransactionsListItem = ({
18285
18321
  }
18286
18322
  )
18287
18323
  ] }),
18288
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "Layer__bank-transaction-list-item__processing-info", children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
18324
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "Layer__bank-transaction-list-item__processing-info", children: /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, {}) }),
18289
18325
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "Layer__bank-transaction-list-item__expanded-row", onClick: preventRowExpansion, children: /* @__PURE__ */ jsxRuntime.jsx(AnimatedPresenceDiv, { variant: "expand", isOpen: openExpandedRow, children: /* @__PURE__ */ jsxRuntime.jsx(
18290
18326
  ExpandedBankTransactionRow,
18291
18327
  {
@@ -18293,9 +18329,9 @@ const BankTransactionsListItem = ({
18293
18329
  bankTransaction,
18294
18330
  isOpen: openExpandedRow,
18295
18331
  close: () => setOpenExpandedRow(false),
18296
- categorized,
18332
+ categorized: displayAsCategorized,
18297
18333
  asListItem: true,
18298
- submitBtnText: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve",
18334
+ submitBtnText: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve",
18299
18335
  containerWidth,
18300
18336
  showDescriptions,
18301
18337
  showReceiptUploads,
@@ -18303,7 +18339,7 @@ const BankTransactionsListItem = ({
18303
18339
  variant: "list"
18304
18340
  }
18305
18341
  ) }, `expanded-${bankTransaction.id}`) }),
18306
- !openExpandedRow && categorizationEnabled && !categorized && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: preventRowExpansion, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pi: "md", gap: "md", pb: "md", children: [
18342
+ !openExpandedRow && categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: preventRowExpansion, children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { pi: "md", gap: "md", pb: "md", children: [
18307
18343
  /* @__PURE__ */ jsxRuntime.jsx(
18308
18344
  BankTransactionCategoryComboBox,
18309
18345
  {
@@ -18313,7 +18349,7 @@ const BankTransactionsListItem = ({
18313
18349
  setTransactionCategory(bankTransaction.id, selectedCategory2);
18314
18350
  setShowRetry(false);
18315
18351
  },
18316
- isLoading: bankTransaction.processing
18352
+ isDisabled: bankTransaction.processing
18317
18353
  }
18318
18354
  ),
18319
18355
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -18323,14 +18359,14 @@ const BankTransactionsListItem = ({
18323
18359
  onClick: handleSave,
18324
18360
  className: showRetry ? "Layer__bank-transaction__retry-btn" : "Layer__bank-transaction__submit-btn",
18325
18361
  processing: bankTransaction.processing,
18326
- action: !categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
18362
+ action: !displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
18327
18363
  withRetry: true,
18328
18364
  error: showRetry ? "Approval failed. Check connection and retry in few seconds." : void 0,
18329
- children: showRetry ? "Retry" : !categorized ? (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve" : (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update"
18365
+ children: showRetry ? "Retry" : !displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve" : (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update"
18330
18366
  }
18331
18367
  )
18332
18368
  ] }) }),
18333
- !openExpandedRow && categorized && /* @__PURE__ */ jsxRuntime.jsx(
18369
+ !openExpandedRow && displayAsCategorized && /* @__PURE__ */ jsxRuntime.jsx(
18334
18370
  BankTransactionsListItemCategory,
18335
18371
  {
18336
18372
  bankTransaction
@@ -19424,6 +19460,7 @@ const BankTransactionsMobileListItem = ({
19424
19460
  const { shouldHideAfterCategorize } = useBankTransactionsContext();
19425
19461
  const categorized = isCategorized(bankTransaction);
19426
19462
  const itemRef = react.useRef(null);
19463
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
19427
19464
  const [open, setOpen] = react.useState(isFirstItem);
19428
19465
  const openNext = () => {
19429
19466
  if (editable && itemRef.current && itemRef.current.nextSibling) {
@@ -19510,11 +19547,11 @@ const BankTransactionsMobileListItem = ({
19510
19547
  const isTransactionSelected = isSelected(bankTransaction.id);
19511
19548
  const { renderInAppLink } = useInAppLinkContext();
19512
19549
  const inAppLink = react.useMemo(() => {
19513
- if (!categorized) {
19550
+ if (!displayAsCategorized) {
19514
19551
  return null;
19515
19552
  }
19516
19553
  return getInAppLink(bankTransaction, renderInAppLink);
19517
- }, [categorized, bankTransaction, renderInAppLink]);
19554
+ }, [displayAsCategorized, bankTransaction, renderInAppLink]);
19518
19555
  const { isVisible } = useDelayedVisibility({ delay: index2 * 20, initialVisibility: Boolean(initialLoad) });
19519
19556
  const className = "Layer__bank-transaction-mobile-list-item";
19520
19557
  const openClassName = open ? `${className}--expanded` : "";
@@ -19581,7 +19618,7 @@ const BankTransactionsMobileListItem = ({
19581
19618
  ]
19582
19619
  }
19583
19620
  ),
19584
- !open && (!categorizationEnabled && !categorized ? /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, { showAsBadge: true }) : /* @__PURE__ */ jsxRuntime.jsx(
19621
+ !open && (!categorizationEnabled && !displayAsCategorized ? /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsProcessingInfo, { showAsBadge: true }) : /* @__PURE__ */ jsxRuntime.jsx(
19585
19622
  BankTransactionsListItemCategory,
19586
19623
  {
19587
19624
  bankTransaction,
@@ -202,7 +202,7 @@ class ErrorHandlerClass {
202
202
  }
203
203
  const errorHandler = new ErrorHandlerClass();
204
204
  const reportError = (payload) => errorHandler.onError(payload);
205
- const version = "0.1.114-alpha.6";
205
+ const version = "0.1.114";
206
206
  const pkg = {
207
207
  version
208
208
  };
@@ -7498,7 +7498,7 @@ function buildCustomDropdownIndicator() {
7498
7498
  components.DropdownIndicator,
7499
7499
  __spreadProps(__spreadValues({}, restProps), {
7500
7500
  className: COMBO_BOX_CLASS_NAMES.DROPDOWN_INDICATOR,
7501
- children: !isDisabled && /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 })
7501
+ children: !isDisabled ? /* @__PURE__ */ jsx(ChevronDown$1, { size: 16 }) : /* @__PURE__ */ jsx(Fragment, {})
7502
7502
  })
7503
7503
  );
7504
7504
  };
@@ -8947,7 +8947,7 @@ const BankTransactionsCategorizeAllModal = ({
8947
8947
  const { selectedIds } = useSelectedIds();
8948
8948
  const { clearSelection } = useBulkSelectionActions();
8949
8949
  const [selectedCategory, setSelectedCategory] = useState(null);
8950
- const { trigger } = useBulkCategorize();
8950
+ const { trigger, isMutating } = useBulkCategorize();
8951
8951
  const handleCategorizeModalClose = useCallback((isOpen2) => {
8952
8952
  onOpenChange(isOpen2);
8953
8953
  if (!isOpen2) {
@@ -8983,7 +8983,7 @@ const BankTransactionsCategorizeAllModal = ({
8983
8983
  title: mode === "Categorize" ? "Categorize all selected transactions?" : "Recategorize all selected transactions?",
8984
8984
  content: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
8985
8985
  /* @__PURE__ */ jsxs(VStack, { gap: "3xs", children: [
8986
- /* @__PURE__ */ jsx(Label, { htmlFor: categorySelectId, children: "Select category" }),
8986
+ /* @__PURE__ */ jsx(Label, { size: "sm", htmlFor: categorySelectId, children: "Select category" }),
8987
8987
  useCategorySelectDrawer ? /* @__PURE__ */ jsx(
8988
8988
  CategorySelectDrawerWithTrigger,
8989
8989
  {
@@ -8998,7 +8998,8 @@ const BankTransactionsCategorizeAllModal = ({
8998
8998
  inputId: categorySelectId,
8999
8999
  selectedValue: selectedCategory,
9000
9000
  onSelectedValueChange: setSelectedCategory,
9001
- includeSuggestedMatches: false
9001
+ includeSuggestedMatches: false,
9002
+ isDisabled: isMutating
9002
9003
  }
9003
9004
  )
9004
9005
  ] }),
@@ -14684,6 +14685,24 @@ function useBankTransactionMetadata({ bankTransactionId }) {
14684
14685
  );
14685
14686
  }
14686
14687
  const UPDATE_BANK_TRANSACTION_METADATA_TAG_KEY = "#update-bank-transaction-metadata";
14688
+ class UpdateBankTransactionMetadataSWRResponse {
14689
+ constructor(swrResponse) {
14690
+ __publicField(this, "swrResponse");
14691
+ this.swrResponse = swrResponse;
14692
+ }
14693
+ get data() {
14694
+ return this.swrResponse.data;
14695
+ }
14696
+ get trigger() {
14697
+ return this.swrResponse.trigger;
14698
+ }
14699
+ get isMutating() {
14700
+ return this.swrResponse.isMutating;
14701
+ }
14702
+ get isError() {
14703
+ return this.swrResponse.error !== void 0;
14704
+ }
14705
+ }
14687
14706
  function buildKey$H({
14688
14707
  access_token: accessToken,
14689
14708
  apiUrl,
@@ -14704,7 +14723,7 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
14704
14723
  const { data: auth } = useAuth();
14705
14724
  const { businessId } = useLayerContext();
14706
14725
  const { mutate } = useSWRConfig();
14707
- const mutationResponse = useSWRMutation(
14726
+ const rawMutationResponse = useSWRMutation(
14708
14727
  () => buildKey$H({
14709
14728
  access_token: auth == null ? void 0 : auth.access_token,
14710
14729
  apiUrl: auth == null ? void 0 : auth.apiUrl,
@@ -14730,6 +14749,7 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
14730
14749
  throwOnError: false
14731
14750
  }
14732
14751
  );
14752
+ const mutationResponse = new UpdateBankTransactionMetadataSWRResponse(rawMutationResponse);
14733
14753
  const { trigger: originalTrigger } = mutationResponse;
14734
14754
  const stableProxiedTrigger = useCallback(
14735
14755
  (...triggerParameters) => __async(null, null, function* () {
@@ -14755,21 +14775,37 @@ function useUpdateBankTransactionMetadata({ bankTransactionId, onSuccess }) {
14755
14775
  });
14756
14776
  }
14757
14777
  const useBankTransactionMemo = ({ bankTransactionId }) => {
14758
- const { trigger: updateBankTransactionMetadata2 } = useUpdateBankTransactionMetadata({ bankTransactionId });
14759
- const { data: bankTransactionMetadata } = useBankTransactionMetadata({ bankTransactionId });
14778
+ const {
14779
+ trigger: updateBankTransactionMetadata2,
14780
+ isMutating: isUpdatingMemo,
14781
+ isError: isErrorUpdatingMemo,
14782
+ data: updateResult
14783
+ } = useUpdateBankTransactionMetadata({ bankTransactionId });
14784
+ const { data: bankTransactionMetadata, mutate: mutateBankTransactionMetadata } = useBankTransactionMetadata({ bankTransactionId });
14760
14785
  const form = useForm$1({
14761
14786
  defaultValues: {
14762
14787
  memo: bankTransactionMetadata == null ? void 0 : bankTransactionMetadata.memo
14763
14788
  },
14764
14789
  onSubmit: (_0) => __async(null, [_0], function* ({ value }) {
14765
- var _a;
14790
+ var _a, _b;
14766
14791
  if (value.memo !== void 0 && form.state.isDirty) {
14767
- yield updateBankTransactionMetadata2({ memo: (_a = value.memo) != null ? _a : "" });
14768
- form.reset(value);
14792
+ const result = yield mutateBankTransactionMetadata(
14793
+ updateBankTransactionMetadata2({ memo: (_a = value.memo) != null ? _a : "" }),
14794
+ { optimisticData: { memo: (_b = value.memo) != null ? _b : "" }, revalidate: false }
14795
+ );
14796
+ if (result !== void 0) {
14797
+ form.reset(value);
14798
+ }
14769
14799
  }
14770
14800
  })
14771
14801
  });
14772
- return form;
14802
+ const isSaved = !isUpdatingMemo && !isErrorUpdatingMemo && updateResult !== void 0 && !form.state.isDirty;
14803
+ return useMemo(() => ({
14804
+ form,
14805
+ isUpdatingMemo,
14806
+ isErrorUpdatingMemo,
14807
+ isSaved
14808
+ }), [form, isErrorUpdatingMemo, isUpdatingMemo, isSaved]);
14773
14809
  };
14774
14810
  const Textarea = (_Pb) => {
14775
14811
  var _Qb = _Pb, {
@@ -14792,24 +14828,26 @@ const Textarea = (_Pb) => {
14792
14828
  ] });
14793
14829
  };
14794
14830
  const BankTransactionMemo = ({ bankTransactionId }) => {
14795
- const form = useBankTransactionMemo({ bankTransactionId });
14831
+ const { form, isUpdatingMemo, isErrorUpdatingMemo, isSaved } = useBankTransactionMemo({ bankTransactionId });
14796
14832
  return /* @__PURE__ */ jsx("form", { onBlur: () => void form.handleSubmit(), children: /* @__PURE__ */ jsx(form.Field, { name: "memo", children: (field) => {
14797
14833
  var _a;
14798
- return /* @__PURE__ */ jsx(
14799
- InputGroup,
14800
- {
14801
- name: "memo",
14802
- children: /* @__PURE__ */ jsx(
14803
- Textarea,
14804
- {
14805
- name: "memo",
14806
- placeholder: "Add description",
14807
- value: (_a = field.state.value) != null ? _a : void 0,
14808
- onChange: (e) => field.handleChange(e.target.value)
14809
- }
14810
- )
14811
- }
14812
- );
14834
+ return /* @__PURE__ */ jsxs(VStack, { gap: "3xs", children: [
14835
+ /* @__PURE__ */ jsxs(HStack, { justify: "space-between", align: "baseline", children: [
14836
+ /* @__PURE__ */ jsx(Label, { htmlFor: "memo", size: "sm", weight: "bold", children: "Description" }),
14837
+ isUpdatingMemo && /* @__PURE__ */ jsx(Span, { size: "sm", weight: "bold", variant: "subtle", children: "Saving..." }),
14838
+ !isUpdatingMemo && isSaved && /* @__PURE__ */ jsx(Span, { size: "sm", status: "success", children: "Saved" }),
14839
+ !isUpdatingMemo && !isSaved && isErrorUpdatingMemo && /* @__PURE__ */ jsx(Span, { size: "sm", weight: "bold", status: "error", children: "Error saving" })
14840
+ ] }),
14841
+ /* @__PURE__ */ jsx(
14842
+ Textarea,
14843
+ {
14844
+ name: "memo",
14845
+ placeholder: "Add description",
14846
+ value: (_a = field.state.value) != null ? _a : void 0,
14847
+ onChange: (e) => field.handleChange(e.target.value)
14848
+ }
14849
+ )
14850
+ ] });
14813
14851
  } }) });
14814
14852
  };
14815
14853
  const range$1 = (start, end) => {
@@ -15949,10 +15987,7 @@ function BankTransactionFormFields({
15949
15987
  isReadOnly
15950
15988
  }
15951
15989
  ),
15952
- showDescriptions && /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
15953
- /* @__PURE__ */ jsx(Span, { size: "sm", weight: "bold", children: "Description" }),
15954
- /* @__PURE__ */ jsx(BankTransactionMemo, { bankTransactionId: bankTransaction.id })
15955
- ] })
15990
+ showDescriptions && /* @__PURE__ */ jsx(VStack, { gap: "sm", children: /* @__PURE__ */ jsx(BankTransactionMemo, { bankTransactionId: bankTransaction.id }) })
15956
15991
  ] });
15957
15992
  }
15958
15993
  const ExpandedBankTransactionRow = forwardRef(
@@ -16181,8 +16216,7 @@ const ExpandedBankTransactionRow = forwardRef(
16181
16216
  onSelectedValueChange: (value) => {
16182
16217
  changeCategoryForSplitAtIndex(index, value);
16183
16218
  },
16184
- isLoading: bankTransaction.processing,
16185
- isDisabled: !categorizationEnabled,
16219
+ isDisabled: !categorizationEnabled || bankTransaction.processing,
16186
16220
  includeSuggestedMatches: false
16187
16221
  }
16188
16222
  ),
@@ -16361,6 +16395,7 @@ const BankTransactionRow = ({
16361
16395
  const { setTransactionCategory } = useBankTransactionsCategoryActions();
16362
16396
  const { selectedCategory } = useGetBankTransactionCategory(bankTransaction.id);
16363
16397
  const { saveBankTransactionRow } = useSaveBankTransactionRow();
16398
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
16364
16399
  useEffect(() => {
16365
16400
  if (bankTransaction.error) {
16366
16401
  setShowRetry(true);
@@ -16503,12 +16538,12 @@ const BankTransactionRow = ({
16503
16538
  className: "Layer__bank-transaction__submit-btn",
16504
16539
  processing: bankTransaction.processing,
16505
16540
  active: open,
16506
- action: categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16541
+ action: displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16507
16542
  disabled: selectedCategory === null,
16508
- children: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
16543
+ children: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
16509
16544
  }
16510
16545
  ),
16511
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsx(VStack, { pis: "lg", fluid: true, children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16546
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsx(VStack, { pis: "lg", fluid: true, children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16512
16547
  /* @__PURE__ */ jsx(
16513
16548
  IconButton,
16514
16549
  {
@@ -16530,7 +16565,7 @@ const BankTransactionRow = ({
16530
16565
  variant: "fade",
16531
16566
  isOpen: categorizationEnabled && !categorized,
16532
16567
  className: "Layer__BankTransactionRow__CategoryComboBoxMotionContent",
16533
- slotProps: { AnimatePresence: { mode: "wait" } },
16568
+ slotProps: { AnimatePresence: { mode: "wait", initial: false } },
16534
16569
  children: /* @__PURE__ */ jsx(
16535
16570
  BankTransactionCategoryComboBox,
16536
16571
  {
@@ -16540,20 +16575,20 @@ const BankTransactionRow = ({
16540
16575
  setTransactionCategory(bankTransaction.id, selectedCategory2);
16541
16576
  setShowRetry(false);
16542
16577
  },
16543
- isLoading: bankTransaction.processing
16578
+ isDisabled: bankTransaction.processing
16544
16579
  }
16545
16580
  )
16546
16581
  },
16547
16582
  "category-combobox"
16548
16583
  ),
16549
- categorized && /* @__PURE__ */ jsx(
16584
+ displayAsCategorized && /* @__PURE__ */ jsx(
16550
16585
  BankTransactionsCategorizedSelectedValue,
16551
16586
  {
16552
16587
  bankTransaction,
16553
16588
  className: "Layer__bank-transaction-row__category"
16554
16589
  }
16555
16590
  ),
16556
- categorizationEnabled && !categorized && showRetry && /* @__PURE__ */ jsx(
16591
+ !displayAsCategorized && categorizationEnabled && showRetry && /* @__PURE__ */ jsx(
16557
16592
  RetryButton,
16558
16593
  {
16559
16594
  onClick: () => {
@@ -16567,7 +16602,7 @@ const BankTransactionRow = ({
16567
16602
  children: "Retry"
16568
16603
  }
16569
16604
  ),
16570
- !categorized && categorizationEnabled && !showRetry && /* @__PURE__ */ jsx(
16605
+ !displayAsCategorized && categorizationEnabled && !showRetry && /* @__PURE__ */ jsx(
16571
16606
  SubmitButton,
16572
16607
  {
16573
16608
  onClick: () => {
@@ -16579,11 +16614,11 @@ const BankTransactionRow = ({
16579
16614
  processing: bankTransaction.processing,
16580
16615
  active: open,
16581
16616
  disabled: selectedCategory === null,
16582
- action: categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16583
- children: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
16617
+ action: displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16618
+ children: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Confirm"
16584
16619
  }
16585
16620
  ),
16586
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsx(VStack, { pis: "xs", fluid: true, children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16621
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsx(VStack, { pis: "xs", fluid: true, children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16587
16622
  /* @__PURE__ */ jsx(
16588
16623
  IconButton,
16589
16624
  {
@@ -16607,7 +16642,7 @@ const BankTransactionRow = ({
16607
16642
  {
16608
16643
  ref: expandedRowRef,
16609
16644
  bankTransaction,
16610
- categorized,
16645
+ categorized: displayAsCategorized,
16611
16646
  isOpen: open,
16612
16647
  close: () => setOpen(false),
16613
16648
  containerWidth,
@@ -16713,6 +16748,7 @@ const BankTransactionsListItem = ({
16713
16748
  const bookkeepingStatus = useEffectiveBookkeepingStatus();
16714
16749
  const categorizationEnabled = isCategorizationEnabledForStatus(bookkeepingStatus);
16715
16750
  const categorized = isCategorized(bankTransaction);
16751
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
16716
16752
  const { isVisible } = useDelayedVisibility({ delay: index * 80 });
16717
16753
  const { select, deselect } = useBulkSelectionActions();
16718
16754
  const isSelected = useIdIsSelected();
@@ -16809,7 +16845,7 @@ const BankTransactionsListItem = ({
16809
16845
  }
16810
16846
  )
16811
16847
  ] }),
16812
- !categorizationEnabled && !categorized && /* @__PURE__ */ jsx("span", { className: "Layer__bank-transaction-list-item__processing-info", children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16848
+ !categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsx("span", { className: "Layer__bank-transaction-list-item__processing-info", children: /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, {}) }),
16813
16849
  /* @__PURE__ */ jsx("span", { className: "Layer__bank-transaction-list-item__expanded-row", onClick: preventRowExpansion, children: /* @__PURE__ */ jsx(AnimatedPresenceDiv, { variant: "expand", isOpen: openExpandedRow, children: /* @__PURE__ */ jsx(
16814
16850
  ExpandedBankTransactionRow,
16815
16851
  {
@@ -16817,9 +16853,9 @@ const BankTransactionsListItem = ({
16817
16853
  bankTransaction,
16818
16854
  isOpen: openExpandedRow,
16819
16855
  close: () => setOpenExpandedRow(false),
16820
- categorized,
16856
+ categorized: displayAsCategorized,
16821
16857
  asListItem: true,
16822
- submitBtnText: categorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve",
16858
+ submitBtnText: displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update" : (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve",
16823
16859
  containerWidth,
16824
16860
  showDescriptions,
16825
16861
  showReceiptUploads,
@@ -16827,7 +16863,7 @@ const BankTransactionsListItem = ({
16827
16863
  variant: "list"
16828
16864
  }
16829
16865
  ) }, `expanded-${bankTransaction.id}`) }),
16830
- !openExpandedRow && categorizationEnabled && !categorized && /* @__PURE__ */ jsx("div", { onClick: preventRowExpansion, children: /* @__PURE__ */ jsxs(HStack, { pi: "md", gap: "md", pb: "md", children: [
16866
+ !openExpandedRow && categorizationEnabled && !displayAsCategorized && /* @__PURE__ */ jsx("div", { onClick: preventRowExpansion, children: /* @__PURE__ */ jsxs(HStack, { pi: "md", gap: "md", pb: "md", children: [
16831
16867
  /* @__PURE__ */ jsx(
16832
16868
  BankTransactionCategoryComboBox,
16833
16869
  {
@@ -16837,7 +16873,7 @@ const BankTransactionsListItem = ({
16837
16873
  setTransactionCategory(bankTransaction.id, selectedCategory2);
16838
16874
  setShowRetry(false);
16839
16875
  },
16840
- isLoading: bankTransaction.processing
16876
+ isDisabled: bankTransaction.processing
16841
16877
  }
16842
16878
  ),
16843
16879
  /* @__PURE__ */ jsx(
@@ -16847,14 +16883,14 @@ const BankTransactionsListItem = ({
16847
16883
  onClick: handleSave,
16848
16884
  className: showRetry ? "Layer__bank-transaction__retry-btn" : "Layer__bank-transaction__submit-btn",
16849
16885
  processing: bankTransaction.processing,
16850
- action: !categorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16886
+ action: !displayAsCategorized ? SubmitAction.SAVE : SubmitAction.UPDATE,
16851
16887
  withRetry: true,
16852
16888
  error: showRetry ? "Approval failed. Check connection and retry in few seconds." : void 0,
16853
- children: showRetry ? "Retry" : !categorized ? (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve" : (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update"
16889
+ children: showRetry ? "Retry" : !displayAsCategorized ? (stringOverrides == null ? void 0 : stringOverrides.approveButtonText) || "Approve" : (stringOverrides == null ? void 0 : stringOverrides.updateButtonText) || "Update"
16854
16890
  }
16855
16891
  )
16856
16892
  ] }) }),
16857
- !openExpandedRow && categorized && /* @__PURE__ */ jsx(
16893
+ !openExpandedRow && displayAsCategorized && /* @__PURE__ */ jsx(
16858
16894
  BankTransactionsListItemCategory,
16859
16895
  {
16860
16896
  bankTransaction
@@ -17948,6 +17984,7 @@ const BankTransactionsMobileListItem = ({
17948
17984
  const { shouldHideAfterCategorize } = useBankTransactionsContext();
17949
17985
  const categorized = isCategorized(bankTransaction);
17950
17986
  const itemRef = useRef(null);
17987
+ const displayAsCategorized = bankTransaction.recently_categorized && shouldHideAfterCategorize() ? false : categorized;
17951
17988
  const [open, setOpen] = useState(isFirstItem);
17952
17989
  const openNext = () => {
17953
17990
  if (editable && itemRef.current && itemRef.current.nextSibling) {
@@ -18034,11 +18071,11 @@ const BankTransactionsMobileListItem = ({
18034
18071
  const isTransactionSelected = isSelected(bankTransaction.id);
18035
18072
  const { renderInAppLink } = useInAppLinkContext();
18036
18073
  const inAppLink = useMemo(() => {
18037
- if (!categorized) {
18074
+ if (!displayAsCategorized) {
18038
18075
  return null;
18039
18076
  }
18040
18077
  return getInAppLink(bankTransaction, renderInAppLink);
18041
- }, [categorized, bankTransaction, renderInAppLink]);
18078
+ }, [displayAsCategorized, bankTransaction, renderInAppLink]);
18042
18079
  const { isVisible } = useDelayedVisibility({ delay: index * 20, initialVisibility: Boolean(initialLoad) });
18043
18080
  const className = "Layer__bank-transaction-mobile-list-item";
18044
18081
  const openClassName = open ? `${className}--expanded` : "";
@@ -18105,7 +18142,7 @@ const BankTransactionsMobileListItem = ({
18105
18142
  ]
18106
18143
  }
18107
18144
  ),
18108
- !open && (!categorizationEnabled && !categorized ? /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, { showAsBadge: true }) : /* @__PURE__ */ jsx(
18145
+ !open && (!categorizationEnabled && !displayAsCategorized ? /* @__PURE__ */ jsx(BankTransactionsProcessingInfo, { showAsBadge: true }) : /* @__PURE__ */ jsx(
18109
18146
  BankTransactionsListItemCategory,
18110
18147
  {
18111
18148
  bankTransaction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layerfi/components",
3
- "version": "0.1.114-alpha.6",
3
+ "version": "0.1.114",
4
4
  "description": "Layer React Components",
5
5
  "main": "dist/cjs/index.cjs",
6
6
  "module": "dist/esm/index.mjs",