@layerfi/components 0.1.26 → 0.1.27

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/esm/index.js CHANGED
@@ -928,7 +928,29 @@ function hasSuggestions(categorization) {
928
928
  return categorization.suggestions !== void 0;
929
929
  }
930
930
 
931
+ // src/components/BankTransactions/constants.ts
932
+ var CategorizedCategories = [
933
+ "CATEGORIZED" /* CATEGORIZED */,
934
+ "JOURNALING" /* JOURNALING */,
935
+ "SPLIT" /* SPLIT */,
936
+ "MATCHED" /* MATCHED */
937
+ ];
938
+ var ReviewCategories = [
939
+ "READY_FOR_INPUT" /* READY_FOR_INPUT */,
940
+ "LAYER_REVIEW" /* LAYER_REVIEW */
941
+ ];
942
+
943
+ // src/components/BankTransactions/utils.ts
944
+ var filterVisibility = (display, bankTransaction) => {
945
+ const categorized = CategorizedCategories.includes(
946
+ bankTransaction.categorization_status
947
+ );
948
+ const inReview = ReviewCategories.includes(bankTransaction.categorization_status) && !bankTransaction.recently_categorized;
949
+ return display === "review" /* review */ && inReview || display === "categorized" /* categorized */ && categorized;
950
+ };
951
+
931
952
  // src/utils/bankTransactions.ts
953
+ import { endOfMonth, isWithinInterval, parseISO as parseISO2, startOfMonth } from "date-fns";
932
954
  var hasMatch = (bankTransaction) => {
933
955
  return Boolean(
934
956
  bankTransaction?.suggested_matches && bankTransaction?.suggested_matches?.length > 0 || bankTransaction?.match
@@ -944,6 +966,40 @@ var isAlreadyMatched = (bankTransaction) => {
944
966
  }
945
967
  return void 0;
946
968
  };
969
+ var countTransactionsToReview = ({
970
+ transactions,
971
+ currentMonthOnly
972
+ }) => {
973
+ if (transactions && transactions.length > 0) {
974
+ if (currentMonthOnly) {
975
+ const currentMonth = {
976
+ start: startOfMonth(/* @__PURE__ */ new Date()),
977
+ end: endOfMonth(/* @__PURE__ */ new Date())
978
+ };
979
+ return transactions.filter((tx) => {
980
+ try {
981
+ return filterVisibility("review" /* review */, tx) && isWithinInterval(parseISO2(tx.date), currentMonth);
982
+ } catch (_err) {
983
+ return false;
984
+ }
985
+ }).length;
986
+ }
987
+ return transactions.filter((tx) => filterVisibility("review" /* review */, tx)).length;
988
+ }
989
+ return 0;
990
+ };
991
+ var getCategorizePayload = (category) => {
992
+ if (category?.payload && "id" in category.payload && category.payload.id) {
993
+ return {
994
+ type: "AccountId",
995
+ id: category.payload.id
996
+ };
997
+ }
998
+ return {
999
+ type: "StableName",
1000
+ stable_name: category?.payload.stable_name || ""
1001
+ };
1002
+ };
947
1003
 
948
1004
  // src/components/BankTransactionRow/BankTransactionRow.tsx
949
1005
  import React51, { useEffect as useEffect7, useRef as useRef9, useState as useState10 } from "react";
@@ -1860,7 +1916,7 @@ var MinimizeTwo_default = MinimizeTwo;
1860
1916
 
1861
1917
  // src/components/CategorySelect/CategorySelect.tsx
1862
1918
  import classNames9 from "classnames";
1863
- import { parseISO as parseISO2, format as formatTime } from "date-fns";
1919
+ import { parseISO as parseISO3, format as formatTime } from "date-fns";
1864
1920
  var mapCategoryToOption = (category) => {
1865
1921
  return {
1866
1922
  type: "category" /* CATEGORY */,
@@ -1912,7 +1968,7 @@ var Option = (props) => {
1912
1968
  ...props,
1913
1969
  className: `${props.className} Layer__select__option-content__match`
1914
1970
  },
1915
- /* @__PURE__ */ React29.createElement("div", { className: "Layer__select__option-content__match__main-row" }, /* @__PURE__ */ React29.createElement("span", { className: "Layer__select__option-content__match__date" }, props.data.payload.date && formatTime(parseISO2(props.data.payload.date), DATE_FORMAT)), /* @__PURE__ */ React29.createElement("span", { className: "Layer__select__option-content__match__description" }, props.data.payload.display_name)),
1971
+ /* @__PURE__ */ React29.createElement("div", { className: "Layer__select__option-content__match__main-row" }, /* @__PURE__ */ React29.createElement("span", { className: "Layer__select__option-content__match__date" }, props.data.payload.date && formatTime(parseISO3(props.data.payload.date), DATE_FORMAT)), /* @__PURE__ */ React29.createElement("span", { className: "Layer__select__option-content__match__description" }, props.data.payload.display_name)),
1916
1972
  /* @__PURE__ */ React29.createElement("div", { className: "Layer__select__option-content__match__amount-row" }, /* @__PURE__ */ React29.createElement("span", { className: "Layer__select__option-content__match__amount" }, "$", centsToDollars(props.data.payload.amount)))
1917
1973
  );
1918
1974
  }
@@ -2499,7 +2555,7 @@ import React43 from "react";
2499
2555
 
2500
2556
  // src/components/BankTransactionRow/MatchBadge.tsx
2501
2557
  import React42 from "react";
2502
- import { parseISO as parseISO3, format as formatTime2 } from "date-fns";
2558
+ import { parseISO as parseISO4, format as formatTime2 } from "date-fns";
2503
2559
  var MatchBadge = ({
2504
2560
  bankTransaction,
2505
2561
  classNamePrefix,
@@ -2512,7 +2568,7 @@ var MatchBadge = ({
2512
2568
  Badge,
2513
2569
  {
2514
2570
  icon: /* @__PURE__ */ React42.createElement(MinimizeTwo_default, { size: 11 }),
2515
- tooltip: /* @__PURE__ */ React42.createElement("span", { className: `${classNamePrefix}__match-tooltip` }, /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__date` }, formatTime2(parseISO3(date), dateFormat)), /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__description` }, bankTransaction.match?.details?.description ?? ""), /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__amount` }, "$", centsToDollars(amount)))
2571
+ tooltip: /* @__PURE__ */ React42.createElement("span", { className: `${classNamePrefix}__match-tooltip` }, /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__date` }, formatTime2(parseISO4(date), dateFormat)), /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__description` }, bankTransaction.match?.details?.description ?? ""), /* @__PURE__ */ React42.createElement("div", { className: `${classNamePrefix}__match-tooltip__amount` }, "$", centsToDollars(amount)))
2516
2572
  },
2517
2573
  text
2518
2574
  );
@@ -2522,7 +2578,7 @@ var MatchBadge = ({
2522
2578
 
2523
2579
  // src/components/MatchForm/MatchForm.tsx
2524
2580
  import classNames18 from "classnames";
2525
- import { parseISO as parseISO4, format as formatTime3 } from "date-fns";
2581
+ import { parseISO as parseISO5, format as formatTime3 } from "date-fns";
2526
2582
  var MatchForm = ({
2527
2583
  classNamePrefix,
2528
2584
  bankTransaction,
@@ -2557,7 +2613,7 @@ var MatchForm = ({
2557
2613
  {
2558
2614
  className: `Layer__nowrap ${classNamePrefix}__match-table__date`
2559
2615
  },
2560
- /* @__PURE__ */ React43.createElement("span", null, formatTime3(parseISO4(match.details.date), DATE_FORMAT)),
2616
+ /* @__PURE__ */ React43.createElement("span", null, formatTime3(parseISO5(match.details.date), DATE_FORMAT)),
2561
2617
  /* @__PURE__ */ React43.createElement("span", { className: "amount-next-to-date" }, "$", centsToDollars(match.details.amount))
2562
2618
  ),
2563
2619
  /* @__PURE__ */ React43.createElement("div", { className: `${classNamePrefix}__match-table__desc` }, /* @__PURE__ */ React43.createElement(
@@ -2600,7 +2656,7 @@ var MatchForm = ({
2600
2656
  // src/components/MatchForm/MatchFormMobile.tsx
2601
2657
  import React44 from "react";
2602
2658
  import classNames19 from "classnames";
2603
- import { parseISO as parseISO5, format as formatTime4 } from "date-fns";
2659
+ import { parseISO as parseISO6, format as formatTime4 } from "date-fns";
2604
2660
  var MatchFormMobile = ({
2605
2661
  classNamePrefix,
2606
2662
  bankTransaction,
@@ -2647,7 +2703,7 @@ var MatchFormMobile = ({
2647
2703
  size: "sm" /* sm */,
2648
2704
  as: "span"
2649
2705
  },
2650
- formatTime4(parseISO5(match.details.date), MONTH_DAY_FORMAT)
2706
+ formatTime4(parseISO6(match.details.date), MONTH_DAY_FORMAT)
2651
2707
  ))),
2652
2708
  /* @__PURE__ */ React44.createElement("div", { className: `${classNamePrefix}__match-item__col-status` }, selectedMatchId && selectedMatchId === match.id ? /* @__PURE__ */ React44.createElement(
2653
2709
  Check_default,
@@ -3121,16 +3177,13 @@ var ExpandedBankTransactionRow = forwardRef2(
3121
3177
  }
3122
3178
  await categorizeBankTransaction2(
3123
3179
  bankTransaction.id,
3124
- rowState.splits.length === 1 ? {
3180
+ rowState.splits.length === 1 && rowState?.splits[0].category ? {
3125
3181
  type: "Category",
3126
- category: {
3127
- type: "StableName",
3128
- stable_name: rowState?.splits[0].category?.payload.stable_name
3129
- }
3182
+ category: getCategorizePayload(rowState?.splits[0].category)
3130
3183
  } : {
3131
3184
  type: "Split",
3132
3185
  entries: rowState.splits.map((split) => ({
3133
- category: split.category?.payload.stable_name,
3186
+ category: split.category ? getCategorizePayload(split.category) : "",
3134
3187
  amount: split.amount
3135
3188
  }))
3136
3189
  }
@@ -3382,7 +3435,7 @@ var SplitTooltipDetails = ({
3382
3435
 
3383
3436
  // src/components/BankTransactionRow/BankTransactionRow.tsx
3384
3437
  import classNames23 from "classnames";
3385
- import { parseISO as parseISO6, format as formatTime5 } from "date-fns";
3438
+ import { parseISO as parseISO7, format as formatTime5 } from "date-fns";
3386
3439
  var extractDescriptionForSplit = (category) => {
3387
3440
  if (!category.entries) {
3388
3441
  return "";
@@ -3469,10 +3522,7 @@ var BankTransactionRow = ({
3469
3522
  }
3470
3523
  await categorizeBankTransaction2(bankTransaction.id, {
3471
3524
  type: "Category",
3472
- category: {
3473
- type: "StableName",
3474
- stable_name: selectedCategory?.payload.stable_name || ""
3475
- }
3525
+ category: getCategorizePayload(selectedCategory)
3476
3526
  });
3477
3527
  setOpen(false);
3478
3528
  };
@@ -3507,7 +3557,7 @@ var BankTransactionRow = ({
3507
3557
  className: "Layer__table-cell Layer__bank-transaction-table__date-col",
3508
3558
  ...openRow
3509
3559
  },
3510
- /* @__PURE__ */ React51.createElement("span", { className: "Layer__table-cell-content" }, formatTime5(parseISO6(bankTransaction.date), dateFormat))
3560
+ /* @__PURE__ */ React51.createElement("span", { className: "Layer__table-cell-content" }, formatTime5(parseISO7(bankTransaction.date), dateFormat))
3511
3561
  ),
3512
3562
  /* @__PURE__ */ React51.createElement(
3513
3563
  "td",
@@ -3601,7 +3651,7 @@ var BankTransactionRow = ({
3601
3651
  dateFormat
3602
3652
  }
3603
3653
  ), /* @__PURE__ */ React51.createElement("span", { className: `${className}__category-text__text` }, `${formatTime5(
3604
- parseISO6(bankTransaction.match.bank_transaction.date),
3654
+ parseISO7(bankTransaction.match.bank_transaction.date),
3605
3655
  dateFormat
3606
3656
  )}, ${bankTransaction.match?.details?.description}`)), bankTransaction?.categorization_status !== "MATCHED" /* MATCHED */ && bankTransaction?.categorization_status !== "SPLIT" /* SPLIT */ && /* @__PURE__ */ React51.createElement("span", { className: `${className}__category-text__text` }, bankTransaction?.category?.display_name)) : null,
3607
3657
  editable && !open && showRetry ? /* @__PURE__ */ React51.createElement(
@@ -3676,7 +3726,7 @@ var BankTransactionRow = ({
3676
3726
 
3677
3727
  // src/components/BankTransactionList/Assignment.tsx
3678
3728
  import React52 from "react";
3679
- import { parseISO as parseISO7, format as formatTime6 } from "date-fns";
3729
+ import { parseISO as parseISO8, format as formatTime6 } from "date-fns";
3680
3730
  var Assignment = ({ bankTransaction }) => {
3681
3731
  if (bankTransaction.match && bankTransaction.categorization_status === "MATCHED" /* MATCHED */) {
3682
3732
  return /* @__PURE__ */ React52.createElement(React52.Fragment, null, /* @__PURE__ */ React52.createElement(
@@ -3688,7 +3738,7 @@ var Assignment = ({ bankTransaction }) => {
3688
3738
  text: "Matched"
3689
3739
  }
3690
3740
  ), /* @__PURE__ */ React52.createElement(Text, { className: "Layer__bank-transaction-list-item__category-text__text" }, `${formatTime6(
3691
- parseISO7(bankTransaction.match.bank_transaction.date),
3741
+ parseISO8(bankTransaction.match.bank_transaction.date),
3692
3742
  DATE_FORMAT
3693
3743
  )}, ${bankTransaction.match.bank_transaction.description}`));
3694
3744
  }
@@ -3713,7 +3763,7 @@ var Assignment = ({ bankTransaction }) => {
3713
3763
 
3714
3764
  // src/components/BankTransactionList/BankTransactionListItem.tsx
3715
3765
  import classNames24 from "classnames";
3716
- import { parseISO as parseISO8, format as formatTime7 } from "date-fns";
3766
+ import { parseISO as parseISO9, format as formatTime7 } from "date-fns";
3717
3767
  var BankTransactionListItem = ({
3718
3768
  index = 0,
3719
3769
  dateFormat,
@@ -3761,10 +3811,7 @@ var BankTransactionListItem = ({
3761
3811
  }
3762
3812
  categorizeBankTransaction2(bankTransaction.id, {
3763
3813
  type: "Category",
3764
- category: {
3765
- type: "StableName",
3766
- stable_name: selectedCategory?.payload.stable_name || ""
3767
- }
3814
+ category: getCategorizePayload(selectedCategory)
3768
3815
  });
3769
3816
  };
3770
3817
  if (removed) {
@@ -3778,7 +3825,7 @@ var BankTransactionListItem = ({
3778
3825
  open ? openClassName : "",
3779
3826
  showComponent ? "show" : ""
3780
3827
  );
3781
- return /* @__PURE__ */ React53.createElement("li", { className: rowClassName }, /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading` }, /* @__PURE__ */ React53.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-date` }, formatTime7(parseISO8(bankTransaction.date), dateFormat)), /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-separator` }), /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-account-name` }, bankTransaction.account_name ?? "")), /* @__PURE__ */ React53.createElement(
3828
+ return /* @__PURE__ */ React53.createElement("li", { className: rowClassName }, /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading` }, /* @__PURE__ */ React53.createElement("div", { className: `${className}__heading__main` }, /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-date` }, formatTime7(parseISO9(bankTransaction.date), dateFormat)), /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-separator` }), /* @__PURE__ */ React53.createElement("span", { className: `${className}__heading-account-name` }, bankTransaction.account_name ?? "")), /* @__PURE__ */ React53.createElement(
3782
3829
  "div",
3783
3830
  {
3784
3831
  onClick: toggleOpen,
@@ -4103,14 +4150,18 @@ var BusinessForm = ({ bankTransaction }) => {
4103
4150
  if (!selectedCategory || !selectedCategory.value.payload) {
4104
4151
  return;
4105
4152
  }
4153
+ const payload = selectedCategory?.value?.payload?.id ? {
4154
+ type: "AccountId",
4155
+ id: selectedCategory.value.payload.id
4156
+ } : {
4157
+ type: "StableName",
4158
+ stable_name: selectedCategory.value.payload?.stable_name || ""
4159
+ };
4106
4160
  categorizeBankTransaction2(
4107
4161
  bankTransaction.id,
4108
4162
  {
4109
4163
  type: "Category",
4110
- category: {
4111
- type: "StableName",
4112
- stable_name: selectedCategory.value.payload.stable_name || ""
4113
- }
4164
+ category: payload
4114
4165
  },
4115
4166
  true
4116
4167
  );
@@ -4400,16 +4451,13 @@ var SplitForm = ({
4400
4451
  }
4401
4452
  await categorizeBankTransaction2(
4402
4453
  bankTransaction.id,
4403
- rowState.splits.length === 1 ? {
4454
+ rowState.splits.length === 1 && rowState?.splits[0].category ? {
4404
4455
  type: "Category",
4405
- category: {
4406
- type: "StableName",
4407
- stable_name: rowState?.splits[0].category?.payload.stable_name
4408
- }
4456
+ category: getCategorizePayload(rowState?.splits[0].category)
4409
4457
  } : {
4410
4458
  type: "Split",
4411
4459
  entries: rowState.splits.map((split) => ({
4412
- category: split.category?.payload.stable_name,
4460
+ category: split.category ? getCategorizePayload(split.category) : "",
4413
4461
  amount: split.amount
4414
4462
  }))
4415
4463
  },
@@ -4544,7 +4592,7 @@ var TransactionToOpenContext = createContext3({
4544
4592
 
4545
4593
  // src/components/BankTransactionMobileList/BankTransactionMobileListItem.tsx
4546
4594
  import classNames27 from "classnames";
4547
- import { parseISO as parseISO9, format as formatTime8 } from "date-fns";
4595
+ import { parseISO as parseISO10, format as formatTime8 } from "date-fns";
4548
4596
  var DATE_FORMAT2 = "LLL d";
4549
4597
  var getAssignedValue2 = (bankTransaction) => {
4550
4598
  if (bankTransaction.categorization_status === "SPLIT" /* SPLIT */) {
@@ -4670,7 +4718,7 @@ var BankTransactionMobileListItem = ({
4670
4718
  },
4671
4719
  isCredit(bankTransaction) ? "+$" : " $",
4672
4720
  centsToDollars(bankTransaction.amount)
4673
- ), /* @__PURE__ */ React64.createElement("span", { className: `${className}__heading__date` }, formatTime8(parseISO9(bankTransaction.date), DATE_FORMAT2))))
4721
+ ), /* @__PURE__ */ React64.createElement("span", { className: `${className}__heading__date` }, formatTime8(parseISO10(bankTransaction.date), DATE_FORMAT2))))
4674
4722
  ),
4675
4723
  /* @__PURE__ */ React64.createElement("div", { className: `${className}__expanded-row`, style: { height } }, open && /* @__PURE__ */ React64.createElement(
4676
4724
  "div",
@@ -5212,11 +5260,11 @@ var Pagination = ({
5212
5260
  import React75, { useState as useState23 } from "react";
5213
5261
 
5214
5262
  // src/utils/business.ts
5215
- import { differenceInCalendarMonths, parseISO as parseISO10, startOfMonth } from "date-fns";
5263
+ import { differenceInCalendarMonths, parseISO as parseISO11, startOfMonth as startOfMonth2 } from "date-fns";
5216
5264
  var getActivationDate = (business) => {
5217
5265
  try {
5218
5266
  if (business && business.activation_at) {
5219
- return parseISO10(business.activation_at);
5267
+ return parseISO11(business.activation_at);
5220
5268
  }
5221
5269
  return;
5222
5270
  } catch (_err) {
@@ -5226,7 +5274,7 @@ var getActivationDate = (business) => {
5226
5274
  var getEarliestDateToBrowse = (business) => {
5227
5275
  const activationDate = getActivationDate(business);
5228
5276
  if (activationDate) {
5229
- return startOfMonth(activationDate);
5277
+ return startOfMonth2(activationDate);
5230
5278
  }
5231
5279
  return;
5232
5280
  };
@@ -5238,7 +5286,7 @@ var isDateAllowedToBrowse = (date, business) => {
5238
5286
  if (!activationDate) {
5239
5287
  return true;
5240
5288
  }
5241
- return differenceInCalendarMonths(startOfMonth(date), activationDate) >= 0;
5289
+ return differenceInCalendarMonths(startOfMonth2(date), activationDate) >= 0;
5242
5290
  };
5243
5291
 
5244
5292
  // src/components/DateMonthPicker/DateMonthPicker.tsx
@@ -5280,7 +5328,7 @@ function useSizeClass() {
5280
5328
 
5281
5329
  // src/components/DateMonthPicker/DateMonthPicker.tsx
5282
5330
  import classNames30 from "classnames";
5283
- import { add, endOfMonth, format as format4, startOfMonth as startOfMonth2 } from "date-fns";
5331
+ import { add, endOfMonth as endOfMonth2, format as format4, startOfMonth as startOfMonth3 } from "date-fns";
5284
5332
  var DateMonthPicker = ({
5285
5333
  dateRange,
5286
5334
  changeDateRange,
@@ -5314,8 +5362,8 @@ var DateMonthPicker = ({
5314
5362
  setCurrentOpacity(0);
5315
5363
  }
5316
5364
  changeDateRange({
5317
- startDate: startOfMonth2(newDate),
5318
- endDate: endOfMonth(newDate)
5365
+ startDate: startOfMonth3(newDate),
5366
+ endDate: endOfMonth2(newDate)
5319
5367
  });
5320
5368
  const translateXValue = monthsToAdd > 0 ? "0%" : "66%";
5321
5369
  setTransformStyle({
@@ -5336,15 +5384,15 @@ var DateMonthPicker = ({
5336
5384
  const currentLabel = format4(localDate, "LLLL, y");
5337
5385
  const prevLabel = format4(add(localDate, { months: -1 }), "LLLL, y");
5338
5386
  const nextLabel = format4(add(localDate, { months: 1 }), "LLLL, y");
5339
- const today = startOfMonth2(Date.now());
5387
+ const today = startOfMonth3(Date.now());
5340
5388
  const isTodayOrAfter = Boolean(
5341
5389
  localDate.getFullYear() === today.getFullYear() && localDate.getMonth() === today.getMonth()
5342
5390
  );
5343
5391
  const setCurrentDate = () => {
5344
5392
  setLocalDate(today);
5345
5393
  changeDateRange({
5346
- startDate: startOfMonth2(today),
5347
- endDate: endOfMonth(today)
5394
+ startDate: startOfMonth3(today),
5395
+ endDate: endOfMonth2(today)
5348
5396
  });
5349
5397
  };
5350
5398
  useEffect14(() => {
@@ -5546,18 +5594,6 @@ var Tabs = ({ name, options, selected, onChange }) => {
5546
5594
  )), /* @__PURE__ */ React74.createElement("span", { className: "Layer__tabs__thumb", style: { ...thumbPos } }));
5547
5595
  };
5548
5596
 
5549
- // src/components/BankTransactions/constants.ts
5550
- var CategorizedCategories = [
5551
- "CATEGORIZED" /* CATEGORIZED */,
5552
- "JOURNALING" /* JOURNALING */,
5553
- "SPLIT" /* SPLIT */,
5554
- "MATCHED" /* MATCHED */
5555
- ];
5556
- var ReviewCategories = [
5557
- "READY_FOR_INPUT" /* READY_FOR_INPUT */,
5558
- "LAYER_REVIEW" /* LAYER_REVIEW */
5559
- ];
5560
-
5561
5597
  // src/components/BankTransactions/BankTransactionsHeader.tsx
5562
5598
  import classNames32 from "classnames";
5563
5599
  var DownloadButton = () => {
@@ -5780,17 +5816,8 @@ var DataStates = ({
5780
5816
  )) : null);
5781
5817
  };
5782
5818
 
5783
- // src/components/BankTransactions/utils.ts
5784
- var filterVisibility = (display, bankTransaction) => {
5785
- const categorized = CategorizedCategories.includes(
5786
- bankTransaction.categorization_status
5787
- );
5788
- const inReview = ReviewCategories.includes(bankTransaction.categorization_status) && !bankTransaction.recently_categorized;
5789
- return display === "review" /* review */ && inReview || display === "categorized" /* categorized */ && categorized;
5790
- };
5791
-
5792
5819
  // src/components/BankTransactions/BankTransactions.tsx
5793
- import { endOfMonth as endOfMonth2, parseISO as parseISO11, startOfMonth as startOfMonth3 } from "date-fns";
5820
+ import { endOfMonth as endOfMonth3, parseISO as parseISO12, startOfMonth as startOfMonth4 } from "date-fns";
5794
5821
  var COMPONENT_NAME = "bank-transactions";
5795
5822
  var BankTransactions = ({
5796
5823
  asWidget = false,
@@ -5808,8 +5835,8 @@ var BankTransactions = ({
5808
5835
  const [removedTxs, setRemovedTxs] = useState24([]);
5809
5836
  const [initialLoad, setInitialLoad] = useState24(true);
5810
5837
  const [dateRange, setDateRange] = useState24({
5811
- startDate: startOfMonth3(/* @__PURE__ */ new Date()),
5812
- endDate: endOfMonth2(/* @__PURE__ */ new Date())
5838
+ startDate: startOfMonth4(/* @__PURE__ */ new Date()),
5839
+ endDate: endOfMonth3(/* @__PURE__ */ new Date())
5813
5840
  });
5814
5841
  const { data, isLoading, loadingStatus, error, isValidating, refetch } = useBankTransactions();
5815
5842
  const bankTransactionsByFilter = data?.filter(
@@ -5826,7 +5853,7 @@ var BankTransactions = ({
5826
5853
  const bankTransactions = useMemo4(() => {
5827
5854
  if (monthlyView) {
5828
5855
  return bankTransactionsByFilter?.filter(
5829
- (x) => parseISO11(x.date) >= dateRange.startDate && parseISO11(x.date) <= dateRange.endDate
5856
+ (x) => parseISO12(x.date) >= dateRange.startDate && parseISO12(x.date) <= dateRange.endDate
5830
5857
  );
5831
5858
  }
5832
5859
  const firstPageIndex = (currentPage - 1) * pageSize;
@@ -7090,7 +7117,7 @@ var applyShare = (items, total) => {
7090
7117
  };
7091
7118
 
7092
7119
  // src/hooks/useProfitAndLoss/useProfitAndLossQuery.tsx
7093
- import { startOfMonth as startOfMonth4, endOfMonth as endOfMonth3, formatISO } from "date-fns";
7120
+ import { startOfMonth as startOfMonth5, endOfMonth as endOfMonth4, formatISO } from "date-fns";
7094
7121
  import useSWR5 from "swr";
7095
7122
  var useProfitAndLossQuery = ({
7096
7123
  startDate,
@@ -7098,8 +7125,8 @@ var useProfitAndLossQuery = ({
7098
7125
  tagFilter,
7099
7126
  reportingBasis
7100
7127
  } = {
7101
- startDate: startOfMonth4(/* @__PURE__ */ new Date()),
7102
- endDate: endOfMonth3(/* @__PURE__ */ new Date())
7128
+ startDate: startOfMonth5(/* @__PURE__ */ new Date()),
7129
+ endDate: endOfMonth4(/* @__PURE__ */ new Date())
7103
7130
  }) => {
7104
7131
  const { auth, businessId, apiUrl } = useLayerContext();
7105
7132
  const {
@@ -7138,21 +7165,21 @@ var useProfitAndLossQuery = ({
7138
7165
  };
7139
7166
 
7140
7167
  // src/hooks/useProfitAndLoss/useProfitAndLoss.tsx
7141
- import { startOfMonth as startOfMonth5, endOfMonth as endOfMonth4 } from "date-fns";
7168
+ import { startOfMonth as startOfMonth6, endOfMonth as endOfMonth5 } from "date-fns";
7142
7169
  var useProfitAndLoss = ({
7143
7170
  startDate: initialStartDate,
7144
7171
  endDate: initialEndDate,
7145
7172
  tagFilter,
7146
7173
  reportingBasis
7147
7174
  } = {
7148
- startDate: startOfMonth5(/* @__PURE__ */ new Date()),
7149
- endDate: endOfMonth4(/* @__PURE__ */ new Date())
7175
+ startDate: startOfMonth6(/* @__PURE__ */ new Date()),
7176
+ endDate: endOfMonth5(/* @__PURE__ */ new Date())
7150
7177
  }) => {
7151
7178
  const [startDate, setStartDate] = useState27(
7152
- initialStartDate || startOfMonth5(Date.now())
7179
+ initialStartDate || startOfMonth6(Date.now())
7153
7180
  );
7154
7181
  const [endDate, setEndDate] = useState27(
7155
- initialEndDate || endOfMonth4(Date.now())
7182
+ initialEndDate || endOfMonth5(Date.now())
7156
7183
  );
7157
7184
  const [filters, setFilters] = useState27({
7158
7185
  expenses: void 0,
@@ -7290,14 +7317,14 @@ import React93, { useContext as useContext6, useEffect as useEffect21, useMemo a
7290
7317
 
7291
7318
  // src/hooks/useProfitAndLoss/useProfitAndLossLTM.tsx
7292
7319
  import { useEffect as useEffect19, useMemo as useMemo6, useState as useState28 } from "react";
7293
- import { startOfMonth as startOfMonth6, sub } from "date-fns";
7320
+ import { startOfMonth as startOfMonth7, sub } from "date-fns";
7294
7321
  import useSWR6 from "swr";
7295
7322
  var buildDates = ({ currentDate }) => {
7296
7323
  return {
7297
- startYear: startOfMonth6(currentDate).getFullYear() - 1,
7298
- startMonth: startOfMonth6(currentDate).getMonth() + 1,
7299
- endYear: startOfMonth6(currentDate).getFullYear(),
7300
- endMonth: startOfMonth6(currentDate).getMonth() + 1
7324
+ startYear: startOfMonth7(currentDate).getFullYear() - 1,
7325
+ startMonth: startOfMonth7(currentDate).getMonth() + 1,
7326
+ endYear: startOfMonth7(currentDate).getFullYear(),
7327
+ endMonth: startOfMonth7(currentDate).getMonth() + 1
7301
7328
  };
7302
7329
  };
7303
7330
  var buildMonthsArray = (startDate, endDate) => {
@@ -7479,9 +7506,9 @@ import classNames37 from "classnames";
7479
7506
  import {
7480
7507
  add as add2,
7481
7508
  differenceInMonths,
7482
- endOfMonth as endOfMonth6,
7509
+ endOfMonth as endOfMonth7,
7483
7510
  format as format5,
7484
- startOfMonth as startOfMonth7,
7511
+ startOfMonth as startOfMonth8,
7485
7512
  sub as sub2
7486
7513
  } from "date-fns";
7487
7514
  import {
@@ -7504,46 +7531,46 @@ var getChartWindow = ({
7504
7531
  currentYear,
7505
7532
  currentMonth
7506
7533
  }) => {
7507
- const today = startOfMonth7(Date.now());
7534
+ const today = startOfMonth8(Date.now());
7508
7535
  const yearAgo = sub2(today, { months: 11 });
7509
- const current = startOfMonth7(new Date(currentYear, currentMonth - 1, 1));
7510
- if (differenceInMonths(startOfMonth7(chartWindow.start), current) < 0 && differenceInMonths(startOfMonth7(chartWindow.end), current) > 1) {
7536
+ const current = startOfMonth8(new Date(currentYear, currentMonth - 1, 1));
7537
+ if (differenceInMonths(startOfMonth8(chartWindow.start), current) < 0 && differenceInMonths(startOfMonth8(chartWindow.end), current) > 1) {
7511
7538
  return chartWindow;
7512
7539
  }
7513
- if (differenceInMonths(startOfMonth7(chartWindow.start), current) === 0) {
7540
+ if (differenceInMonths(startOfMonth8(chartWindow.start), current) === 0) {
7514
7541
  return {
7515
- start: startOfMonth7(sub2(current, { months: 1 })),
7516
- end: endOfMonth6(add2(current, { months: 11 }))
7542
+ start: startOfMonth8(sub2(current, { months: 1 })),
7543
+ end: endOfMonth7(add2(current, { months: 11 }))
7517
7544
  };
7518
7545
  }
7519
- if (differenceInMonths(endOfMonth6(chartWindow.end), endOfMonth6(current)) === 1 && differenceInMonths(today, current) >= 1) {
7546
+ if (differenceInMonths(endOfMonth7(chartWindow.end), endOfMonth7(current)) === 1 && differenceInMonths(today, current) >= 1) {
7520
7547
  return {
7521
- start: startOfMonth7(sub2(current, { months: 10 })),
7522
- end: endOfMonth6(add2(current, { months: 2 }))
7548
+ start: startOfMonth8(sub2(current, { months: 10 })),
7549
+ end: endOfMonth7(add2(current, { months: 2 }))
7523
7550
  };
7524
7551
  }
7525
- if (differenceInMonths(current, startOfMonth7(chartWindow.end)) === 0 && differenceInMonths(current, startOfMonth7(today)) > 0) {
7552
+ if (differenceInMonths(current, startOfMonth8(chartWindow.end)) === 0 && differenceInMonths(current, startOfMonth8(today)) > 0) {
7526
7553
  return {
7527
- start: startOfMonth7(sub2(current, { months: 11 })),
7528
- end: endOfMonth6(add2(current, { months: 1 }))
7554
+ start: startOfMonth8(sub2(current, { months: 11 })),
7555
+ end: endOfMonth7(add2(current, { months: 1 }))
7529
7556
  };
7530
7557
  }
7531
7558
  if (current >= yearAgo) {
7532
7559
  return {
7533
- start: startOfMonth7(yearAgo),
7534
- end: endOfMonth6(today)
7560
+ start: startOfMonth8(yearAgo),
7561
+ end: endOfMonth7(today)
7535
7562
  };
7536
7563
  }
7537
7564
  if (Number(current) > Number(chartWindow.end)) {
7538
7565
  return {
7539
- start: startOfMonth7(sub2(current, { months: 12 })),
7540
- end: endOfMonth6(current)
7566
+ start: startOfMonth8(sub2(current, { months: 12 })),
7567
+ end: endOfMonth7(current)
7541
7568
  };
7542
7569
  }
7543
- if (differenceInMonths(current, startOfMonth7(chartWindow.start)) < 0) {
7570
+ if (differenceInMonths(current, startOfMonth8(chartWindow.start)) < 0) {
7544
7571
  return {
7545
- start: startOfMonth7(current),
7546
- end: endOfMonth6(add2(current, { months: 11 }))
7572
+ start: startOfMonth8(current),
7573
+ end: endOfMonth7(add2(current, { months: 11 }))
7547
7574
  };
7548
7575
  }
7549
7576
  return chartWindow;
@@ -7577,8 +7604,8 @@ var ProfitAndLossChart = () => {
7577
7604
  });
7578
7605
  const [barAnimActive, setBarAnimActive] = useState30(true);
7579
7606
  const [chartWindow, setChartWindow] = useState30({
7580
- start: startOfMonth7(sub2(Date.now(), { months: 11 })),
7581
- end: endOfMonth6(Date.now())
7607
+ start: startOfMonth8(sub2(Date.now(), { months: 11 })),
7608
+ end: endOfMonth7(Date.now())
7582
7609
  });
7583
7610
  const selectionMonth = useMemo7(
7584
7611
  () => ({
@@ -7593,24 +7620,24 @@ var ProfitAndLossChart = () => {
7593
7620
  }
7594
7621
  }, [dateRange]);
7595
7622
  const { data, loaded, pullData } = useProfitAndLossLTM({
7596
- currentDate: startOfMonth7(Date.now())
7623
+ currentDate: startOfMonth8(Date.now())
7597
7624
  });
7598
7625
  const loadingValue = useMemo7(() => getLoadingValue(data), [data]);
7599
7626
  useEffect21(() => {
7600
7627
  if (loaded === "complete" && data) {
7601
7628
  const foundCurrent = data.find(
7602
- (x) => Number(startOfMonth7(new Date(x.year, x.month - 1, 1))) >= Number(localDateRange.startDate) && Number(startOfMonth7(new Date(x.year, x.month - 1, 1))) < Number(localDateRange.endDate)
7629
+ (x) => Number(startOfMonth8(new Date(x.year, x.month - 1, 1))) >= Number(localDateRange.startDate) && Number(startOfMonth8(new Date(x.year, x.month - 1, 1))) < Number(localDateRange.endDate)
7603
7630
  );
7604
7631
  if (!foundCurrent) {
7605
- const newDate = startOfMonth7(localDateRange.startDate);
7632
+ const newDate = startOfMonth8(localDateRange.startDate);
7606
7633
  pullData(newDate);
7607
7634
  return;
7608
7635
  }
7609
7636
  const foundBefore = data.find(
7610
- (x) => Number(startOfMonth7(new Date(x.year, x.month - 1, 1))) >= Number(sub2(localDateRange.startDate, { months: 1 })) && Number(startOfMonth7(new Date(x.year, x.month - 1, 1))) < Number(sub2(localDateRange.endDate, { months: 1 }))
7637
+ (x) => Number(startOfMonth8(new Date(x.year, x.month - 1, 1))) >= Number(sub2(localDateRange.startDate, { months: 1 })) && Number(startOfMonth8(new Date(x.year, x.month - 1, 1))) < Number(sub2(localDateRange.endDate, { months: 1 }))
7611
7638
  );
7612
7639
  if (!foundBefore) {
7613
- const newDate = startOfMonth7(
7640
+ const newDate = startOfMonth8(
7614
7641
  sub2(localDateRange.startDate, { months: 1 })
7615
7642
  );
7616
7643
  pullData(newDate);
@@ -7677,17 +7704,17 @@ var ProfitAndLossChart = () => {
7677
7704
  }
7678
7705
  return data?.filter(
7679
7706
  (x) => differenceInMonths(
7680
- startOfMonth7(new Date(x.year, x.month - 1, 1)),
7707
+ startOfMonth8(new Date(x.year, x.month - 1, 1)),
7681
7708
  chartWindow.start
7682
7709
  ) >= 0 && differenceInMonths(
7683
- startOfMonth7(new Date(x.year, x.month - 1, 1)),
7710
+ startOfMonth8(new Date(x.year, x.month - 1, 1)),
7684
7711
  chartWindow.start
7685
7712
  ) < 12 && differenceInMonths(
7686
7713
  chartWindow.end,
7687
- startOfMonth7(new Date(x.year, x.month - 1, 1))
7714
+ startOfMonth8(new Date(x.year, x.month - 1, 1))
7688
7715
  ) >= 0 && differenceInMonths(
7689
7716
  chartWindow.end,
7690
- startOfMonth7(new Date(x.year, x.month - 1, 1))
7717
+ startOfMonth8(new Date(x.year, x.month - 1, 1))
7691
7718
  ) <= 12
7692
7719
  ).map((x) => summarizePnL(x));
7693
7720
  }, [selectionMonth, chartWindow, data, loaded, compactView]);
@@ -7701,7 +7728,7 @@ var ProfitAndLossChart = () => {
7701
7728
  if (isMonthAllowed) {
7702
7729
  changeDateRange({
7703
7730
  startDate: new Date(year, month - 1, 1),
7704
- endDate: endOfMonth6(new Date(year, month - 1, 1))
7731
+ endDate: endOfMonth7(new Date(year, month - 1, 1))
7705
7732
  });
7706
7733
  }
7707
7734
  }
@@ -9250,7 +9277,7 @@ var ProfitAndLossTable = ({ lockExpanded, asContainer }) => {
9250
9277
  };
9251
9278
 
9252
9279
  // src/components/ProfitAndLoss/ProfitAndLoss.tsx
9253
- import { endOfMonth as endOfMonth7, startOfMonth as startOfMonth8 } from "date-fns";
9280
+ import { endOfMonth as endOfMonth8, startOfMonth as startOfMonth9 } from "date-fns";
9254
9281
  var PNLContext = createContext5({
9255
9282
  data: void 0,
9256
9283
  filteredDataRevenue: [],
@@ -9261,8 +9288,8 @@ var PNLContext = createContext5({
9261
9288
  isValidating: false,
9262
9289
  error: void 0,
9263
9290
  dateRange: {
9264
- startDate: startOfMonth8(/* @__PURE__ */ new Date()),
9265
- endDate: endOfMonth7(/* @__PURE__ */ new Date())
9291
+ startDate: startOfMonth9(/* @__PURE__ */ new Date()),
9292
+ endDate: endOfMonth8(/* @__PURE__ */ new Date())
9266
9293
  },
9267
9294
  changeDateRange: () => {
9268
9295
  },
@@ -9401,7 +9428,7 @@ import React124, { useContext as useContext19, useState as useState40 } from "re
9401
9428
 
9402
9429
  // src/contexts/ChartOfAccountsContext/ChartOfAccountsContext.tsx
9403
9430
  import { createContext as createContext6 } from "react";
9404
- import { endOfMonth as endOfMonth8, startOfMonth as startOfMonth9 } from "date-fns";
9431
+ import { endOfMonth as endOfMonth9, startOfMonth as startOfMonth10 } from "date-fns";
9405
9432
  var ChartOfAccountsContext = createContext6(
9406
9433
  {
9407
9434
  data: void 0,
@@ -9424,8 +9451,8 @@ var ChartOfAccountsContext = createContext6(
9424
9451
  submitForm: () => {
9425
9452
  },
9426
9453
  dateRange: {
9427
- startDate: startOfMonth9(/* @__PURE__ */ new Date()),
9428
- endDate: endOfMonth8(/* @__PURE__ */ new Date())
9454
+ startDate: startOfMonth10(/* @__PURE__ */ new Date()),
9455
+ endDate: endOfMonth9(/* @__PURE__ */ new Date())
9429
9456
  },
9430
9457
  changeDateRange: () => {
9431
9458
  }
@@ -9660,7 +9687,7 @@ var LEDGER_ACCOUNT_SUBTYPES_FOR_TYPE = {
9660
9687
  };
9661
9688
 
9662
9689
  // src/hooks/useChartOfAccounts/useChartOfAccounts.tsx
9663
- import { endOfMonth as endOfMonth9, formatISO as formatISO2, startOfMonth as startOfMonth10 } from "date-fns";
9690
+ import { endOfMonth as endOfMonth10, formatISO as formatISO2, startOfMonth as startOfMonth11 } from "date-fns";
9664
9691
  import useSWR7 from "swr";
9665
9692
  var validate = (formData) => {
9666
9693
  const errors = [];
@@ -9741,18 +9768,18 @@ var validateName = (formData) => {
9741
9768
  var flattenAccounts = (accounts) => accounts.flatMap((a) => [a, flattenAccounts(a.sub_accounts || [])]).flat().filter((id) => id);
9742
9769
  var useChartOfAccounts = ({ withDates, startDate: initialStartDate, endDate: initialEndDate } = {
9743
9770
  withDates: false,
9744
- startDate: startOfMonth10(/* @__PURE__ */ new Date()),
9745
- endDate: endOfMonth9(/* @__PURE__ */ new Date())
9771
+ startDate: startOfMonth11(/* @__PURE__ */ new Date()),
9772
+ endDate: endOfMonth10(/* @__PURE__ */ new Date())
9746
9773
  }) => {
9747
9774
  const { auth, businessId, apiUrl } = useLayerContext();
9748
9775
  const [form, setForm] = useState34();
9749
9776
  const [sendingForm, setSendingForm] = useState34(false);
9750
9777
  const [apiError, setApiError] = useState34(void 0);
9751
9778
  const [startDate, setStartDate] = useState34(
9752
- initialStartDate ?? startOfMonth10(Date.now())
9779
+ initialStartDate ?? startOfMonth11(Date.now())
9753
9780
  );
9754
9781
  const [endDate, setEndDate] = useState34(
9755
- initialEndDate ?? endOfMonth9(Date.now())
9782
+ initialEndDate ?? endOfMonth10(Date.now())
9756
9783
  );
9757
9784
  const { data, isLoading, isValidating, error, mutate } = useSWR7(
9758
9785
  businessId && auth?.access_token && `chart-of-accounts-${businessId}-${startDate?.valueOf()}-${endDate?.valueOf()}`,
@@ -10519,7 +10546,7 @@ var Card = ({ children, className }) => {
10519
10546
 
10520
10547
  // src/components/DateTime/DateTime.tsx
10521
10548
  import React118 from "react";
10522
- import { parseISO as parseISO12, format as formatTime9 } from "date-fns";
10549
+ import { parseISO as parseISO13, format as formatTime9 } from "date-fns";
10523
10550
  var DateTime = ({
10524
10551
  value,
10525
10552
  format: format7,
@@ -10529,10 +10556,10 @@ var DateTime = ({
10529
10556
  onlyTime
10530
10557
  }) => {
10531
10558
  if (format7) {
10532
- return /* @__PURE__ */ React118.createElement(Text, { className: "Layer__datetime" }, formatTime9(parseISO12(value), format7));
10559
+ return /* @__PURE__ */ React118.createElement(Text, { className: "Layer__datetime" }, formatTime9(parseISO13(value), format7));
10533
10560
  }
10534
- const date = formatTime9(parseISO12(value), dateFormat ?? DATE_FORMAT);
10535
- const time = formatTime9(parseISO12(value), timeFormat ?? TIME_FORMAT);
10561
+ const date = formatTime9(parseISO13(value), dateFormat ?? DATE_FORMAT);
10562
+ const time = formatTime9(parseISO13(value), timeFormat ?? TIME_FORMAT);
10536
10563
  return /* @__PURE__ */ React118.createElement(Text, { className: "Layer__datetime" }, !onlyTime && /* @__PURE__ */ React118.createElement(
10537
10564
  Text,
10538
10565
  {
@@ -10662,7 +10689,7 @@ var LedgerAccountEntryDetails = () => {
10662
10689
  // src/components/LedgerAccount/LedgerAccountRow.tsx
10663
10690
  import React122, { useContext as useContext17, useEffect as useEffect24, useState as useState38 } from "react";
10664
10691
  import classNames46 from "classnames";
10665
- import { parseISO as parseISO13, format as formatTime10 } from "date-fns";
10692
+ import { parseISO as parseISO14, format as formatTime10 } from "date-fns";
10666
10693
  var LedgerAccountRow = ({
10667
10694
  row,
10668
10695
  index,
@@ -10701,7 +10728,7 @@ var LedgerAccountRow = ({
10701
10728
  }
10702
10729
  }
10703
10730
  },
10704
- /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React122.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React122.createElement(Text, null, row.date && formatTime10(parseISO13(row.date), DATE_FORMAT)), /* @__PURE__ */ React122.createElement(
10731
+ /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React122.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React122.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React122.createElement(
10705
10732
  Text,
10706
10733
  {
10707
10734
  weight: "normal" /* normal */,
@@ -10734,7 +10761,7 @@ var LedgerAccountRow = ({
10734
10761
  }
10735
10762
  }
10736
10763
  },
10737
- /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React122.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React122.createElement(Text, null, row.date && formatTime10(parseISO13(row.date), DATE_FORMAT)), /* @__PURE__ */ React122.createElement(
10764
+ /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React122.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React122.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React122.createElement(
10738
10765
  Text,
10739
10766
  {
10740
10767
  weight: "normal" /* normal */,
@@ -10763,7 +10790,7 @@ var LedgerAccountRow = ({
10763
10790
  }
10764
10791
  }
10765
10792
  },
10766
- /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime10(parseISO13(row.date), DATE_FORMAT))),
10793
+ /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT))),
10767
10794
  /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, row.entry_id.substring(0, 5))),
10768
10795
  /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content" }, row.source?.display_description ?? "")),
10769
10796
  /* @__PURE__ */ React122.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React122.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
@@ -11534,7 +11561,7 @@ import React135, { useContext as useContext26, useMemo as useMemo15, useState as
11534
11561
  // src/components/JournalRow/JournalRow.tsx
11535
11562
  import React130, { useContext as useContext21, useEffect as useEffect28, useState as useState44 } from "react";
11536
11563
  import classNames49 from "classnames";
11537
- import { parseISO as parseISO14, format as formatTime11 } from "date-fns";
11564
+ import { parseISO as parseISO15, format as formatTime11 } from "date-fns";
11538
11565
  var INDENTATION2 = 24;
11539
11566
  var EXPANDED_STYLE2 = {
11540
11567
  height: "100%",
@@ -11647,7 +11674,7 @@ var JournalRow = ({
11647
11674
  )
11648
11675
  ))),
11649
11676
  /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content" }, row.id.substring(0, 5))),
11650
- /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT))),
11677
+ /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO15(row.date), DATE_FORMAT))),
11651
11678
  /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content" }, humanizeEnum(row.entry_type))),
11652
11679
  /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content" }, `(${row.line_items.length})`)),
11653
11680
  /* @__PURE__ */ React130.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React130.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, "$", centsToDollars(
@@ -12103,18 +12130,18 @@ var JournalContent = ({
12103
12130
  };
12104
12131
 
12105
12132
  // src/components/Onboarding/Onboarding.tsx
12106
- import React144, { useContext as useContext28, useEffect as useEffect29, useState as useState47 } from "react";
12133
+ import React145, { useContext as useContext28, useEffect as useEffect29, useState as useState47 } from "react";
12107
12134
 
12108
12135
  // src/components/Onboarding/ConnectAccount.tsx
12109
- import React143, { useContext as useContext27, useMemo as useMemo16 } from "react";
12136
+ import React144, { useContext as useContext27, useMemo as useMemo16 } from "react";
12110
12137
 
12111
- // src/icons/CreditCard.tsx
12138
+ // src/icons/Bell.tsx
12112
12139
  import * as React137 from "react";
12113
- var CreditCard = ({ size = 12, ...props }) => /* @__PURE__ */ React137.createElement(
12140
+ var Bell = ({ size = 18, ...props }) => /* @__PURE__ */ React137.createElement(
12114
12141
  "svg",
12115
12142
  {
12116
12143
  xmlns: "http://www.w3.org/2000/svg",
12117
- viewBox: "0 0 12 12",
12144
+ viewBox: "0 0 18 18",
12118
12145
  fill: "none",
12119
12146
  ...props,
12120
12147
  width: size,
@@ -12123,13 +12150,46 @@ var CreditCard = ({ size = 12, ...props }) => /* @__PURE__ */ React137.createEle
12123
12150
  /* @__PURE__ */ React137.createElement(
12124
12151
  "path",
12125
12152
  {
12126
- d: "M10.5 2H1.5C0.947715 2 0.5 2.44772 0.5 3V9C0.5 9.55228 0.947715 10 1.5 10H10.5C11.0523 10 11.5 9.55228 11.5 9V3C11.5 2.44772 11.0523 2 10.5 2Z",
12153
+ d: "M13.5 6C13.5 4.80653 13.0259 3.66193 12.182 2.81802C11.3381 1.97411 10.1935 1.5 9 1.5C7.80653 1.5 6.66193 1.97411 5.81802 2.81802C4.97411 3.66193 4.5 4.80653 4.5 6C4.5 11.25 2.25 12.75 2.25 12.75H15.75C15.75 12.75 13.5 11.25 13.5 6Z",
12127
12154
  stroke: "currentColor",
12128
12155
  strokeLinecap: "round",
12129
12156
  strokeLinejoin: "round"
12130
12157
  }
12131
12158
  ),
12132
12159
  /* @__PURE__ */ React137.createElement(
12160
+ "path",
12161
+ {
12162
+ d: "M10.2975 15.75C10.1656 15.9773 9.97638 16.166 9.74867 16.2971C9.52096 16.4283 9.26278 16.4973 9 16.4973C8.73721 16.4973 8.47904 16.4283 8.25133 16.2971C8.02362 16.166 7.83436 15.9773 7.7025 15.75",
12163
+ stroke: "currentColor",
12164
+ strokeLinecap: "round",
12165
+ strokeLinejoin: "round"
12166
+ }
12167
+ )
12168
+ );
12169
+ var Bell_default = Bell;
12170
+
12171
+ // src/icons/CreditCard.tsx
12172
+ import * as React138 from "react";
12173
+ var CreditCard = ({ size = 12, ...props }) => /* @__PURE__ */ React138.createElement(
12174
+ "svg",
12175
+ {
12176
+ xmlns: "http://www.w3.org/2000/svg",
12177
+ viewBox: "0 0 12 12",
12178
+ fill: "none",
12179
+ ...props,
12180
+ width: size,
12181
+ height: size
12182
+ },
12183
+ /* @__PURE__ */ React138.createElement(
12184
+ "path",
12185
+ {
12186
+ d: "M10.5 2H1.5C0.947715 2 0.5 2.44772 0.5 3V9C0.5 9.55228 0.947715 10 1.5 10H10.5C11.0523 10 11.5 9.55228 11.5 9V3C11.5 2.44772 11.0523 2 10.5 2Z",
12187
+ stroke: "currentColor",
12188
+ strokeLinecap: "round",
12189
+ strokeLinejoin: "round"
12190
+ }
12191
+ ),
12192
+ /* @__PURE__ */ React138.createElement(
12133
12193
  "path",
12134
12194
  {
12135
12195
  d: "M0.5 5H11.5",
@@ -12142,8 +12202,8 @@ var CreditCard = ({ size = 12, ...props }) => /* @__PURE__ */ React137.createEle
12142
12202
  var CreditCard_default = CreditCard;
12143
12203
 
12144
12204
  // src/icons/Folder.tsx
12145
- import * as React138 from "react";
12146
- var Folder = ({ size = 12, ...props }) => /* @__PURE__ */ React138.createElement(
12205
+ import * as React139 from "react";
12206
+ var Folder = ({ size = 12, ...props }) => /* @__PURE__ */ React139.createElement(
12147
12207
  "svg",
12148
12208
  {
12149
12209
  xmlns: "http://www.w3.org/2000/svg",
@@ -12153,7 +12213,7 @@ var Folder = ({ size = 12, ...props }) => /* @__PURE__ */ React138.createElement
12153
12213
  width: size,
12154
12214
  height: size
12155
12215
  },
12156
- /* @__PURE__ */ React138.createElement(
12216
+ /* @__PURE__ */ React139.createElement(
12157
12217
  "path",
12158
12218
  {
12159
12219
  d: "M11 9.5C11 9.76522 10.8946 10.0196 10.7071 10.2071C10.5196 10.3946 10.2652 10.5 10 10.5H2C1.73478 10.5 1.48043 10.3946 1.29289 10.2071C1.10536 10.0196 1 9.76522 1 9.5V2.5C1 2.23478 1.10536 1.98043 1.29289 1.79289C1.48043 1.60536 1.73478 1.5 2 1.5H4.5L5.5 3H10C10.2652 3 10.5196 3.10536 10.7071 3.29289C10.8946 3.48043 11 3.73478 11 4V9.5Z",
@@ -12166,8 +12226,8 @@ var Folder = ({ size = 12, ...props }) => /* @__PURE__ */ React138.createElement
12166
12226
  var Folder_default = Folder;
12167
12227
 
12168
12228
  // src/icons/Link.tsx
12169
- import * as React139 from "react";
12170
- var Link = ({ size = 18, ...props }) => /* @__PURE__ */ React139.createElement(
12229
+ import * as React140 from "react";
12230
+ var Link = ({ size = 18, ...props }) => /* @__PURE__ */ React140.createElement(
12171
12231
  "svg",
12172
12232
  {
12173
12233
  xmlns: "http://www.w3.org/2000/svg",
@@ -12177,7 +12237,7 @@ var Link = ({ size = 18, ...props }) => /* @__PURE__ */ React139.createElement(
12177
12237
  width: size,
12178
12238
  height: size
12179
12239
  },
12180
- /* @__PURE__ */ React139.createElement(
12240
+ /* @__PURE__ */ React140.createElement(
12181
12241
  "path",
12182
12242
  {
12183
12243
  d: "M7.5 9.75C7.82209 10.1806 8.23302 10.5369 8.70491 10.7947C9.17681 11.0525 9.69863 11.2058 10.235 11.2442C10.7713 11.2827 11.3097 11.2053 11.8135 11.0173C12.3173 10.8294 12.7748 10.5353 13.155 10.155L15.405 7.905C16.0881 7.19774 16.4661 6.25048 16.4575 5.26724C16.449 4.284 16.0546 3.34346 15.3593 2.64818C14.664 1.9529 13.7235 1.55851 12.7403 1.54997C11.757 1.54143 10.8098 1.9194 10.1025 2.6025L8.8125 3.885",
@@ -12186,7 +12246,7 @@ var Link = ({ size = 18, ...props }) => /* @__PURE__ */ React139.createElement(
12186
12246
  strokeLinejoin: "round"
12187
12247
  }
12188
12248
  ),
12189
- /* @__PURE__ */ React139.createElement(
12249
+ /* @__PURE__ */ React140.createElement(
12190
12250
  "path",
12191
12251
  {
12192
12252
  d: "M10.5 8.25C10.1779 7.8194 9.76698 7.46311 9.29508 7.2053C8.82319 6.94748 8.30137 6.79416 7.76501 6.75575C7.22865 6.71734 6.69031 6.79473 6.18649 6.98266C5.68267 7.1706 5.22516 7.4647 4.845 7.845L2.595 10.095C1.9119 10.8023 1.53393 11.7495 1.54247 12.7328C1.55101 13.716 1.9454 14.6565 2.64068 15.3518C3.33596 16.0471 4.2765 16.4415 5.25974 16.45C6.24298 16.4586 7.19024 16.0806 7.8975 15.3975L9.18 14.115",
@@ -12199,9 +12259,9 @@ var Link = ({ size = 18, ...props }) => /* @__PURE__ */ React139.createElement(
12199
12259
  var Link_default = Link;
12200
12260
 
12201
12261
  // src/icons/PlaidIcon.tsx
12202
- import React140 from "react";
12262
+ import React141 from "react";
12203
12263
  var PlaidIcon = () => {
12204
- return /* @__PURE__ */ React140.createElement(
12264
+ return /* @__PURE__ */ React141.createElement(
12205
12265
  "img",
12206
12266
  {
12207
12267
  src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAhCAYAAAC4JqlRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAQDSURBVHgB7VbpK65bFP+9XJTMJGPGDIVIpjIln2S4SIr4AxSOIZFwPxA+HUf5rhAZb3xQylCUizKLD+I1ROYpZcq+e63u+9S5t573XN1z3nvr/or97GVba+3fmrYGf8DBwSHx/f09VH7a4DvD2Nj414uLi1X61tAvOzu7z0KIT/iB0Gg0bdfX12UaafyTNP4ZBoB0okxja2u7L789YRhoyQEBA8IIBsZ/0wF7e3tYWVkpe2tra8hQ4iP46VsOWVpaIiYmBrGxsYiKikJERASWl5eRnZ0NU1NT9PX1ISwsDCsrK5iZmcHi4iKmpqbw+vqqV7feJCwsLERbW5uyX19fx/7+PjIyMrC5uQkTExP4+/tjZGQEvr6+CA4OVs6Wlpaiq6sLqiAH1H4GBgaEDqmpqYq8qalJkdfX1yvyrKwscXd3x/L+/n6hT79eBnZ3d3F6egobGxtInUhPT8f9/T3fWHfb7e1tpKSk8JmxsTGWPT4+wsnJCV5eXqoEqCYhUSo7JXp6epCWlkadC5OTkxgaGmLjFRUVKC8vR2BgIEZHR9k4OUlnJXOcnO7u7vhwCKqqqpjKxMRE3tOqQ3Nzs3KutbWVZU9PT0IywbKEhASW1dbWqoZAlQHKbEJISAiXXnt7O+/Pz8+Rn58PDw8PeHp6Ii8vDzLuMDMzQ0tLC988Li6Oz/r5+X2cARcXF7G1tcU3OTk54bWyslJIx8Tx8bGQ00wcHR2Jw8NDERoaKsrKyviMzBleZcUIZ2dnVQb0VkF0dLR4fn5mhbLeFXlBQYESDsnAX6rm5eWF/1efflUHXF1d+RY6BuSDRRQXF/NtdTe/ubnhb5JVV1d/xYCsDuHm5vZxB2QTYUU1NTVCxprDQU6QUR3tFA5y4OzsTKHdx8dHyOrgfW9v78eTcGdnh9e5uTlOMukI3t7euN47OztxcHAArVaL7u5uODo68lnJEGRuYHWVX1zcntWgOguothsbG5GcnIyHhwd0dHRA3hS3t7eoq6vD5eUlzM3NIalnQ9R0qPVSs4qPj2cd09PTaib0zwLq+9QJLSwseE/KZQgwPj6OgIAAlm1sbPBsIGbIaWpGxJisIm5matA7jicmJtgQ1XZJSQlTTsplbJUzw8PDzAr9raioiLtfUFAQT0R90DuOZ2dnkZOTwyOZDK2trWFvbw+ZmZk8AygnGhoaIBMS3t7eX01Dyh19+KY3IY3cpKQkREZGQrZjZfbn5ubyzB8cHER4eDiWlpawsLDAhufn5zlv/hEH/gzdZKRQEIgdephcXV3h7+L/V/G/wgEtDAetkUymLzAQyLaxfMX8JtspPeqj8QMhn3dfZEf9RaMTyNIKNTIy+hnfGXKa3splVXbOGdr/DtMw0L76HoUPAAAAAElFTkSuQmCC",
@@ -12212,8 +12272,8 @@ var PlaidIcon = () => {
12212
12272
  var PlaidIcon_default = PlaidIcon;
12213
12273
 
12214
12274
  // src/icons/Sunrise.tsx
12215
- import * as React141 from "react";
12216
- var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElement(
12275
+ import * as React142 from "react";
12276
+ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React142.createElement(
12217
12277
  "svg",
12218
12278
  {
12219
12279
  xmlns: "http://www.w3.org/2000/svg",
@@ -12223,7 +12283,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12223
12283
  width: size,
12224
12284
  height: size
12225
12285
  },
12226
- /* @__PURE__ */ React141.createElement(
12286
+ /* @__PURE__ */ React142.createElement(
12227
12287
  "path",
12228
12288
  {
12229
12289
  d: "M8.5 9C8.5 8.33696 8.23661 7.70107 7.76777 7.23223C7.29893 6.76339 6.66304 6.5 6 6.5C5.33696 6.5 4.70107 6.76339 4.23223 7.23223C3.76339 7.70107 3.5 8.33696 3.5 9",
@@ -12232,7 +12292,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12232
12292
  strokeLinejoin: "round"
12233
12293
  }
12234
12294
  ),
12235
- /* @__PURE__ */ React141.createElement(
12295
+ /* @__PURE__ */ React142.createElement(
12236
12296
  "path",
12237
12297
  {
12238
12298
  d: "M6 3.3335V4.66683",
@@ -12241,7 +12301,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12241
12301
  strokeLinejoin: "round"
12242
12302
  }
12243
12303
  ),
12244
- /* @__PURE__ */ React141.createElement(
12304
+ /* @__PURE__ */ React142.createElement(
12245
12305
  "path",
12246
12306
  {
12247
12307
  d: "M2.11 5.10986L2.82 5.81986",
@@ -12250,7 +12310,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12250
12310
  strokeLinejoin: "round"
12251
12311
  }
12252
12312
  ),
12253
- /* @__PURE__ */ React141.createElement(
12313
+ /* @__PURE__ */ React142.createElement(
12254
12314
  "path",
12255
12315
  {
12256
12316
  d: "M0.5 9H1.5",
@@ -12259,7 +12319,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12259
12319
  strokeLinejoin: "round"
12260
12320
  }
12261
12321
  ),
12262
- /* @__PURE__ */ React141.createElement(
12322
+ /* @__PURE__ */ React142.createElement(
12263
12323
  "path",
12264
12324
  {
12265
12325
  d: "M10.5 9H11.5",
@@ -12268,7 +12328,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12268
12328
  strokeLinejoin: "round"
12269
12329
  }
12270
12330
  ),
12271
- /* @__PURE__ */ React141.createElement(
12331
+ /* @__PURE__ */ React142.createElement(
12272
12332
  "path",
12273
12333
  {
12274
12334
  d: "M9.17999 5.81986L9.88999 5.10986",
@@ -12277,7 +12337,7 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12277
12337
  strokeLinejoin: "round"
12278
12338
  }
12279
12339
  ),
12280
- /* @__PURE__ */ React141.createElement(
12340
+ /* @__PURE__ */ React142.createElement(
12281
12341
  "path",
12282
12342
  {
12283
12343
  d: "M11.5 11H0.5",
@@ -12290,19 +12350,19 @@ var Sunrise = ({ size = 12, ...props }) => /* @__PURE__ */ React141.createElemen
12290
12350
  var Sunrise_default = Sunrise;
12291
12351
 
12292
12352
  // src/components/ActionableRow/ActionableRow.tsx
12293
- import React142 from "react";
12353
+ import React143 from "react";
12294
12354
  var renderIcon = (icon, iconBox) => {
12295
12355
  if (iconBox) {
12296
12356
  return iconBox;
12297
12357
  }
12298
12358
  if (icon) {
12299
- return /* @__PURE__ */ React142.createElement("span", { className: "Layer__actionable_row__icon" }, icon);
12359
+ return /* @__PURE__ */ React143.createElement("span", { className: "Layer__actionable_row__icon" }, icon);
12300
12360
  }
12301
12361
  return;
12302
12362
  };
12303
12363
  var renderTitle = (title) => {
12304
12364
  if (title && typeof title === "string") {
12305
- return /* @__PURE__ */ React142.createElement(Text, { className: "Layer__actionable_row__title" }, title);
12365
+ return /* @__PURE__ */ React143.createElement(Text, { className: "Layer__actionable_row__title" }, title);
12306
12366
  }
12307
12367
  if (title) {
12308
12368
  return title;
@@ -12311,7 +12371,7 @@ var renderTitle = (title) => {
12311
12371
  };
12312
12372
  var renderDescription = (description) => {
12313
12373
  if (description && typeof description === "string") {
12314
- return /* @__PURE__ */ React142.createElement(Text, { className: "Layer__actionable_row__description" }, description);
12374
+ return /* @__PURE__ */ React143.createElement(Text, { className: "Layer__actionable_row__description" }, description);
12315
12375
  }
12316
12376
  if (description) {
12317
12377
  return description;
@@ -12326,11 +12386,11 @@ var ActionableRow = ({
12326
12386
  button,
12327
12387
  onClick
12328
12388
  }) => {
12329
- return /* @__PURE__ */ React142.createElement("div", { className: "Layer__actionable_row" }, /* @__PURE__ */ React142.createElement("div", { className: "Layer__actionable_row__main" }, renderIcon(icon, iconBox), /* @__PURE__ */ React142.createElement("div", { className: "Layer__actionable_row__main__text" }, renderTitle(title), renderDescription(description))), /* @__PURE__ */ React142.createElement("div", { className: "Layer__actionable_row__action" }, button && button, !button && onClick ? /* @__PURE__ */ React142.createElement(
12389
+ return /* @__PURE__ */ React143.createElement("div", { className: "Layer__actionable_row" }, /* @__PURE__ */ React143.createElement("div", { className: "Layer__actionable_row__main" }, renderIcon(icon, iconBox), /* @__PURE__ */ React143.createElement("div", { className: "Layer__actionable_row__main__text" }, renderTitle(title), renderDescription(description))), /* @__PURE__ */ React143.createElement("div", { className: "Layer__actionable_row__action" }, button && button, !button && onClick ? /* @__PURE__ */ React143.createElement(
12330
12390
  IconButton,
12331
12391
  {
12332
12392
  onClick,
12333
- icon: /* @__PURE__ */ React142.createElement(ChevronRight_default, { size: 11 }),
12393
+ icon: /* @__PURE__ */ React143.createElement(ChevronRight_default, { size: 11 }),
12334
12394
  withBorder: true
12335
12395
  }
12336
12396
  ) : null));
@@ -12339,55 +12399,63 @@ var ActionableRow = ({
12339
12399
  // src/components/Onboarding/ConnectAccount.tsx
12340
12400
  var ConnectAccount = ({
12341
12401
  onboardingStep,
12342
- onTransactionsToReviewClick
12402
+ onTransactionsToReviewClick,
12403
+ currentMonthOnly = true
12343
12404
  }) => {
12344
12405
  const { addConnection } = useContext27(LinkedAccountsContext);
12345
12406
  const { data, isLoading } = useBankTransactions();
12346
- const transactionsToReview = useMemo16(() => {
12347
- if (data && data.length > 0) {
12348
- return data.filter((tx) => filterVisibility("review" /* review */, tx)).length;
12349
- }
12350
- return 0;
12351
- }, [data, isLoading]);
12407
+ const transactionsToReview = useMemo16(
12408
+ () => countTransactionsToReview({ transactions: data, currentMonthOnly }),
12409
+ [data, isLoading]
12410
+ );
12352
12411
  if (onboardingStep === "connectAccount") {
12353
- return /* @__PURE__ */ React143.createElement(React143.Fragment, null, /* @__PURE__ */ React143.createElement(
12412
+ return /* @__PURE__ */ React144.createElement(React144.Fragment, null, /* @__PURE__ */ React144.createElement(
12354
12413
  DataState,
12355
12414
  {
12356
12415
  status: "info" /* info */,
12357
- icon: /* @__PURE__ */ React143.createElement(CreditCard_default, { size: 12 }),
12416
+ icon: /* @__PURE__ */ React144.createElement(CreditCard_default, { size: 12 }),
12358
12417
  title: "No accounts connected",
12359
12418
  description: "Populate your accounting dashboard in 3 steps"
12360
12419
  }
12361
- ), /* @__PURE__ */ React143.createElement(
12420
+ ), /* @__PURE__ */ React144.createElement(
12362
12421
  ActionableRow,
12363
12422
  {
12364
- iconBox: /* @__PURE__ */ React143.createElement(PlaidIcon_default, null),
12423
+ iconBox: /* @__PURE__ */ React144.createElement(PlaidIcon_default, null),
12365
12424
  title: "Connect accounts",
12366
12425
  description: "Import data with one simple integration.",
12367
- button: /* @__PURE__ */ React143.createElement(
12426
+ button: /* @__PURE__ */ React144.createElement(
12368
12427
  Button,
12369
12428
  {
12370
12429
  onClick: () => addConnection("PLAID"),
12371
- rightIcon: /* @__PURE__ */ React143.createElement(Link_default, { size: 12 })
12430
+ rightIcon: /* @__PURE__ */ React144.createElement(Link_default, { size: 12 })
12372
12431
  },
12373
12432
  "Connect"
12374
12433
  )
12375
12434
  }
12376
12435
  ));
12377
12436
  }
12378
- return /* @__PURE__ */ React143.createElement(React143.Fragment, null, /* @__PURE__ */ React143.createElement(
12437
+ return /* @__PURE__ */ React144.createElement(React144.Fragment, null, /* @__PURE__ */ React144.createElement(
12379
12438
  DataState,
12380
12439
  {
12381
12440
  status: "success" /* success */,
12382
- icon: /* @__PURE__ */ React143.createElement(Sunrise_default, { size: 12 }),
12441
+ icon: /* @__PURE__ */ React144.createElement(Sunrise_default, { size: 12 }),
12383
12442
  title: "Account linked successfully",
12384
12443
  description: "Your transactions are now available on the platform, to see all data on the charts, categorise transactions."
12385
12444
  }
12386
- ), onTransactionsToReviewClick && transactionsToReview > 0 ? /* @__PURE__ */ React143.createElement(
12445
+ ), onTransactionsToReviewClick && transactionsToReview > 0 ? /* @__PURE__ */ React144.createElement(
12387
12446
  ActionableRow,
12388
12447
  {
12389
- icon: /* @__PURE__ */ React143.createElement(Folder_default, { size: 12 }),
12390
- title: /* @__PURE__ */ React143.createElement(Text, null, "Categorise transactions", " ", /* @__PURE__ */ React143.createElement(Badge, { variant: "warning" /* WARNING */, size: "small" /* SMALL */ }, transactionsToReview, " pending")),
12448
+ icon: /* @__PURE__ */ React144.createElement(Folder_default, { size: 12 }),
12449
+ title: /* @__PURE__ */ React144.createElement(Text, null, "Categorise transactions", " ", /* @__PURE__ */ React144.createElement(
12450
+ Badge,
12451
+ {
12452
+ variant: "warning" /* WARNING */,
12453
+ size: "small" /* SMALL */,
12454
+ icon: /* @__PURE__ */ React144.createElement(Bell_default, { size: 12 })
12455
+ },
12456
+ transactionsToReview,
12457
+ " pending"
12458
+ )),
12391
12459
  description: "Once your data is on the platform categorize them in Bank Transactions tab",
12392
12460
  onClick: () => onTransactionsToReviewClick()
12393
12461
  }
@@ -12407,7 +12475,7 @@ var EXPANDED_STYLE3 = {
12407
12475
  transform: "scale(1)",
12408
12476
  overflow: "hidden"
12409
12477
  };
12410
- var Onboarding = (props) => /* @__PURE__ */ React144.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React144.createElement(OnboardingContent, { ...props }));
12478
+ var Onboarding = (props) => /* @__PURE__ */ React145.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React145.createElement(OnboardingContent, { ...props }));
12411
12479
  var OnboardingContent = ({
12412
12480
  onTransactionsToReviewClick
12413
12481
  }) => {
@@ -12435,7 +12503,7 @@ var OnboardingContent = ({
12435
12503
  if (!onboardingStep) {
12436
12504
  return null;
12437
12505
  }
12438
- return /* @__PURE__ */ React144.createElement(Container, { name: "onboarding", style }, /* @__PURE__ */ React144.createElement("div", { className: "Layer__onboarding__content" }, /* @__PURE__ */ React144.createElement(
12506
+ return /* @__PURE__ */ React145.createElement(Container, { name: "onboarding", style }, /* @__PURE__ */ React145.createElement("div", { className: "Layer__onboarding__content" }, /* @__PURE__ */ React145.createElement(
12439
12507
  ConnectAccount,
12440
12508
  {
12441
12509
  onboardingStep,
@@ -12445,7 +12513,7 @@ var OnboardingContent = ({
12445
12513
  };
12446
12514
 
12447
12515
  // src/components/Tasks/Tasks.tsx
12448
- import React151, { useContext as useContext33 } from "react";
12516
+ import React152, { useContext as useContext33 } from "react";
12449
12517
 
12450
12518
  // src/contexts/TasksContext/TasksContext.tsx
12451
12519
  import { createContext as createContext10 } from "react";
@@ -12493,11 +12561,11 @@ var useTasks = () => {
12493
12561
  };
12494
12562
 
12495
12563
  // src/components/TasksHeader/TasksHeader.tsx
12496
- import React146, { useContext as useContext29 } from "react";
12564
+ import React147, { useContext as useContext29 } from "react";
12497
12565
 
12498
12566
  // src/icons/ProgressIcon.tsx
12499
- import * as React145 from "react";
12500
- var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createElement(
12567
+ import * as React146 from "react";
12568
+ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React146.createElement(
12501
12569
  "svg",
12502
12570
  {
12503
12571
  xmlns: "http://www.w3.org/2000/svg",
@@ -12507,7 +12575,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12507
12575
  width: size,
12508
12576
  height: size
12509
12577
  },
12510
- /* @__PURE__ */ React145.createElement(
12578
+ /* @__PURE__ */ React146.createElement(
12511
12579
  "path",
12512
12580
  {
12513
12581
  d: "M9 1.5V4.5",
@@ -12516,7 +12584,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12516
12584
  strokeLinejoin: "round"
12517
12585
  }
12518
12586
  ),
12519
- /* @__PURE__ */ React145.createElement(
12587
+ /* @__PURE__ */ React146.createElement(
12520
12588
  "path",
12521
12589
  {
12522
12590
  d: "M9 13.5V16.5",
@@ -12525,7 +12593,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12525
12593
  strokeLinejoin: "round"
12526
12594
  }
12527
12595
  ),
12528
- /* @__PURE__ */ React145.createElement(
12596
+ /* @__PURE__ */ React146.createElement(
12529
12597
  "path",
12530
12598
  {
12531
12599
  d: "M3.6975 3.6975L5.82 5.82",
@@ -12534,7 +12602,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12534
12602
  strokeLinejoin: "round"
12535
12603
  }
12536
12604
  ),
12537
- /* @__PURE__ */ React145.createElement(
12605
+ /* @__PURE__ */ React146.createElement(
12538
12606
  "path",
12539
12607
  {
12540
12608
  d: "M12.18 12.18L14.3025 14.3025",
@@ -12543,7 +12611,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12543
12611
  strokeLinejoin: "round"
12544
12612
  }
12545
12613
  ),
12546
- /* @__PURE__ */ React145.createElement(
12614
+ /* @__PURE__ */ React146.createElement(
12547
12615
  "path",
12548
12616
  {
12549
12617
  d: "M1.5 9H4.5",
@@ -12552,7 +12620,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12552
12620
  strokeLinejoin: "round"
12553
12621
  }
12554
12622
  ),
12555
- /* @__PURE__ */ React145.createElement(
12623
+ /* @__PURE__ */ React146.createElement(
12556
12624
  "path",
12557
12625
  {
12558
12626
  d: "M13.5 9H16.5",
@@ -12561,7 +12629,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12561
12629
  strokeLinejoin: "round"
12562
12630
  }
12563
12631
  ),
12564
- /* @__PURE__ */ React145.createElement(
12632
+ /* @__PURE__ */ React146.createElement(
12565
12633
  "path",
12566
12634
  {
12567
12635
  d: "M3.6975 14.3025L5.82 12.18",
@@ -12570,7 +12638,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React145.createE
12570
12638
  strokeLinejoin: "round"
12571
12639
  }
12572
12640
  ),
12573
- /* @__PURE__ */ React145.createElement(
12641
+ /* @__PURE__ */ React146.createElement(
12574
12642
  "path",
12575
12643
  {
12576
12644
  d: "M12.18 5.82L14.3025 3.6975",
@@ -12585,17 +12653,17 @@ var ProgressIcon_default = ProgressIcon;
12585
12653
  // src/components/TasksHeader/TasksHeader.tsx
12586
12654
  var ICONS = {
12587
12655
  done: {
12588
- icon: /* @__PURE__ */ React146.createElement(Check_default, { size: 12 }),
12656
+ icon: /* @__PURE__ */ React147.createElement(Check_default, { size: 12 }),
12589
12657
  text: "Done",
12590
12658
  badge: "success" /* SUCCESS */
12591
12659
  },
12592
12660
  pending: {
12593
- icon: /* @__PURE__ */ React146.createElement(ProgressIcon_default, { size: 12 }),
12661
+ icon: /* @__PURE__ */ React147.createElement(ProgressIcon_default, { size: 12 }),
12594
12662
  text: "In progress",
12595
12663
  badge: "warning" /* WARNING */
12596
12664
  },
12597
12665
  refresh: {
12598
- icon: /* @__PURE__ */ React146.createElement(RefreshCcw_default, { size: 12 }),
12666
+ icon: /* @__PURE__ */ React147.createElement(RefreshCcw_default, { size: 12 }),
12599
12667
  text: "Refresh",
12600
12668
  badge: "default" /* DEFAULT */
12601
12669
  }
@@ -12604,7 +12672,7 @@ var TasksHeader = () => {
12604
12672
  const { data: tasks, refetch, error } = useContext29(TasksContext);
12605
12673
  const completedTasks = tasks?.filter((task) => task.status === "COMPLETED").length;
12606
12674
  const badgeVariant = completedTasks === tasks?.length ? ICONS.done : ICONS.pending;
12607
- return /* @__PURE__ */ React146.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React146.createElement(Text, { size: "lg" /* lg */ }, "December Books"), !tasks || error ? /* @__PURE__ */ React146.createElement(
12675
+ return /* @__PURE__ */ React147.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React147.createElement(Text, { size: "lg" /* lg */ }, "December Books"), !tasks || error ? /* @__PURE__ */ React147.createElement(
12608
12676
  Badge,
12609
12677
  {
12610
12678
  onClick: () => refetch(),
@@ -12612,15 +12680,15 @@ var TasksHeader = () => {
12612
12680
  icon: ICONS.refresh.icon
12613
12681
  },
12614
12682
  ICONS.refresh.text
12615
- ) : /* @__PURE__ */ React146.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text));
12683
+ ) : /* @__PURE__ */ React147.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text));
12616
12684
  };
12617
12685
 
12618
12686
  // src/components/TasksList/TasksList.tsx
12619
- import React149, { useContext as useContext31, useMemo as useMemo17, useState as useState49 } from "react";
12687
+ import React150, { useContext as useContext31, useMemo as useMemo17, useState as useState49 } from "react";
12620
12688
 
12621
12689
  // src/icons/SmileIcon.tsx
12622
- import * as React147 from "react";
12623
- var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElement(
12690
+ import * as React148 from "react";
12691
+ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React148.createElement(
12624
12692
  "svg",
12625
12693
  {
12626
12694
  viewBox: "0 0 12 12",
@@ -12630,7 +12698,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElem
12630
12698
  width: size,
12631
12699
  height: size
12632
12700
  },
12633
- /* @__PURE__ */ React147.createElement(
12701
+ /* @__PURE__ */ React148.createElement(
12634
12702
  "path",
12635
12703
  {
12636
12704
  d: "M6.5 11.5C9.26142 11.5 11.5 9.26142 11.5 6.5C11.5 3.73858 9.26142 1.5 6.5 1.5C3.73858 1.5 1.5 3.73858 1.5 6.5C1.5 9.26142 3.73858 11.5 6.5 11.5Z",
@@ -12639,7 +12707,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElem
12639
12707
  strokeLinejoin: "round"
12640
12708
  }
12641
12709
  ),
12642
- /* @__PURE__ */ React147.createElement(
12710
+ /* @__PURE__ */ React148.createElement(
12643
12711
  "path",
12644
12712
  {
12645
12713
  d: "M4.5 7.5C4.5 7.5 5.25 8.5 6.5 8.5C7.75 8.5 8.5 7.5 8.5 7.5",
@@ -12648,7 +12716,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElem
12648
12716
  strokeLinejoin: "round"
12649
12717
  }
12650
12718
  ),
12651
- /* @__PURE__ */ React147.createElement(
12719
+ /* @__PURE__ */ React148.createElement(
12652
12720
  "path",
12653
12721
  {
12654
12722
  d: "M5 5H5.005",
@@ -12657,7 +12725,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElem
12657
12725
  strokeLinejoin: "round"
12658
12726
  }
12659
12727
  ),
12660
- /* @__PURE__ */ React147.createElement(
12728
+ /* @__PURE__ */ React148.createElement(
12661
12729
  "path",
12662
12730
  {
12663
12731
  d: "M8 5H8.005",
@@ -12670,7 +12738,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React147.createElem
12670
12738
  var SmileIcon_default = SmileIcon;
12671
12739
 
12672
12740
  // src/components/TasksListItem/TasksListItem.tsx
12673
- import React148, { useContext as useContext30, useState as useState48 } from "react";
12741
+ import React149, { useContext as useContext30, useState as useState48 } from "react";
12674
12742
  import classNames50 from "classnames";
12675
12743
  var TasksListItem = ({
12676
12744
  task,
@@ -12692,14 +12760,14 @@ var TasksListItem = ({
12692
12760
  "Layer__tasks-list-item",
12693
12761
  isOpen && "Layer__tasks-list-item__expanded"
12694
12762
  );
12695
- return /* @__PURE__ */ React148.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React148.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React148.createElement(
12763
+ return /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React149.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React149.createElement(
12696
12764
  "div",
12697
12765
  {
12698
12766
  className: "Layer__tasks-list-item__head",
12699
12767
  onClick: () => setIsOpen(!isOpen)
12700
12768
  },
12701
- /* @__PURE__ */ React148.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React148.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, task.status === "COMPLETED" ? /* @__PURE__ */ React148.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React148.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React148.createElement(Text, { size: "md" /* md */ }, task.title)),
12702
- /* @__PURE__ */ React148.createElement(
12769
+ /* @__PURE__ */ React149.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, task.status === "COMPLETED" ? /* @__PURE__ */ React149.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React149.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React149.createElement(Text, { size: "md" /* md */ }, task.title)),
12770
+ /* @__PURE__ */ React149.createElement(
12703
12771
  ChevronDownFill_default,
12704
12772
  {
12705
12773
  size: 16,
@@ -12709,14 +12777,14 @@ var TasksListItem = ({
12709
12777
  }
12710
12778
  }
12711
12779
  )
12712
- ), /* @__PURE__ */ React148.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React148.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React148.createElement(Text, { size: "sm" /* sm */ }, task.question), /* @__PURE__ */ React148.createElement(
12780
+ ), /* @__PURE__ */ React149.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React149.createElement(Text, { size: "sm" /* sm */ }, task.question), /* @__PURE__ */ React149.createElement(
12713
12781
  Textarea,
12714
12782
  {
12715
12783
  disabled: task.status === "COMPLETED",
12716
12784
  placeholder: userResponse,
12717
12785
  onChange: (e) => setUserResponse(e.target.value)
12718
12786
  }
12719
- ), /* @__PURE__ */ React148.createElement("div", { className: "Layer__tasks-list-item__actions" }, /* @__PURE__ */ React148.createElement(
12787
+ ), /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-list-item__actions" }, /* @__PURE__ */ React149.createElement(
12720
12788
  Button,
12721
12789
  {
12722
12790
  disabled: task.status === "COMPLETED" || userResponse.length === 0,
@@ -12728,7 +12796,7 @@ var TasksListItem = ({
12728
12796
  };
12729
12797
 
12730
12798
  // src/components/TasksList/TasksList.tsx
12731
- var TasksEmptyState = () => /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React149.createElement(SmileIcon_default, null)), /* @__PURE__ */ React149.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React149.createElement("br", null), " Great job!"));
12799
+ var TasksEmptyState = () => /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React150.createElement(SmileIcon_default, null)), /* @__PURE__ */ React150.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React150.createElement("br", null), " Great job!"));
12732
12800
  var TasksList = ({ pageSize = 10 }) => {
12733
12801
  const [currentPage, setCurrentPage] = useState49(1);
12734
12802
  const { data: tasks, error } = useContext31(TasksContext);
@@ -12737,7 +12805,7 @@ var TasksList = ({ pageSize = 10 }) => {
12737
12805
  const lastPageIndex = firstPageIndex + pageSize;
12738
12806
  return tasks?.sort((a) => a.status === "COMPLETED" ? 1 : -1)?.slice(firstPageIndex, lastPageIndex);
12739
12807
  }, [tasks, currentPage]);
12740
- return /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React149.createElement(React149.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React149.createElement(TasksListItem, { key: index, task, index })), tasks && /* @__PURE__ */ React149.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React149.createElement(
12808
+ return /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React150.createElement(React150.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React150.createElement(TasksListItem, { key: index, task, index })), tasks && /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React150.createElement(
12741
12809
  Pagination,
12742
12810
  {
12743
12811
  currentPage,
@@ -12745,11 +12813,11 @@ var TasksList = ({ pageSize = 10 }) => {
12745
12813
  pageSize,
12746
12814
  onPageChange: (page) => setCurrentPage(page)
12747
12815
  }
12748
- ))) : /* @__PURE__ */ React149.createElement(React149.Fragment, null, error ? /* @__PURE__ */ React149.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React149.createElement(TasksEmptyState, null)));
12816
+ ))) : /* @__PURE__ */ React150.createElement(React150.Fragment, null, error ? /* @__PURE__ */ React150.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React150.createElement(TasksEmptyState, null)));
12749
12817
  };
12750
12818
 
12751
12819
  // src/components/TasksPending/TasksPending.tsx
12752
- import React150, { useContext as useContext32 } from "react";
12820
+ import React151, { useContext as useContext32 } from "react";
12753
12821
  import classNames51 from "classnames";
12754
12822
  import { Cell as Cell4, Pie as Pie3, PieChart as PieChart4 } from "recharts";
12755
12823
  var TasksPending = () => {
@@ -12768,7 +12836,7 @@ var TasksPending = () => {
12768
12836
  const taskStatusClassName = classNames51(
12769
12837
  completedTasks && completedTasks > 0 ? "Layer__tasks-pending-bar__status--done" : "Layer__tasks-pending-bar__status--pending"
12770
12838
  );
12771
- return /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React150.createElement(Text, { size: "lg" /* lg */ }, "Bookkeeping Tasks"), /* @__PURE__ */ React150.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React150.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React150.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data?.length, " done"), /* @__PURE__ */ React150.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React150.createElement(
12839
+ return /* @__PURE__ */ React151.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React151.createElement(Text, { size: "lg" /* lg */ }, "Bookkeeping Tasks"), /* @__PURE__ */ React151.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React151.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React151.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data?.length, " done"), /* @__PURE__ */ React151.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React151.createElement(
12772
12840
  Pie3,
12773
12841
  {
12774
12842
  data: chartData,
@@ -12786,7 +12854,7 @@ var TasksPending = () => {
12786
12854
  animationEasing: "ease-in-out"
12787
12855
  },
12788
12856
  chartData.map((task, index) => {
12789
- return /* @__PURE__ */ React150.createElement(
12857
+ return /* @__PURE__ */ React151.createElement(
12790
12858
  Cell4,
12791
12859
  {
12792
12860
  key: `cell-${index}`,
@@ -12801,11 +12869,11 @@ var TasksPending = () => {
12801
12869
  // src/components/Tasks/Tasks.tsx
12802
12870
  var Tasks = () => {
12803
12871
  const contextData = useTasks();
12804
- return /* @__PURE__ */ React151.createElement(TasksContext.Provider, { value: contextData }, /* @__PURE__ */ React151.createElement(TasksComponent, null));
12872
+ return /* @__PURE__ */ React152.createElement(TasksContext.Provider, { value: contextData }, /* @__PURE__ */ React152.createElement(TasksComponent, null));
12805
12873
  };
12806
12874
  var TasksComponent = () => {
12807
12875
  const { isLoading, data } = useContext33(TasksContext);
12808
- return /* @__PURE__ */ React151.createElement(Container, { name: "tasks-component" }, /* @__PURE__ */ React151.createElement(TasksHeader, null), isLoading || !data ? /* @__PURE__ */ React151.createElement("div", { className: `Layer__tasks__loader-container` }, /* @__PURE__ */ React151.createElement(Loader2, null)) : /* @__PURE__ */ React151.createElement(React151.Fragment, null, data.length > 0 && /* @__PURE__ */ React151.createElement(TasksPending, null), /* @__PURE__ */ React151.createElement(TasksList, null)));
12876
+ return /* @__PURE__ */ React152.createElement(Container, { name: "tasks-component" }, /* @__PURE__ */ React152.createElement(TasksHeader, null), isLoading || !data ? /* @__PURE__ */ React152.createElement("div", { className: `Layer__tasks__loader-container` }, /* @__PURE__ */ React152.createElement(Loader2, null)) : /* @__PURE__ */ React152.createElement(React152.Fragment, null, data.length > 0 && /* @__PURE__ */ React152.createElement(TasksPending, null), /* @__PURE__ */ React152.createElement(TasksList, null)));
12809
12877
  };
12810
12878
 
12811
12879
  // src/views/AccountingOverview/AccountingOverview.tsx
@@ -12814,39 +12882,6 @@ import React158, { useState as useState51 } from "react";
12814
12882
  // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
12815
12883
  import React155, { useEffect as useEffect30, useMemo as useMemo18, useState as useState50 } from "react";
12816
12884
 
12817
- // src/icons/Bell.tsx
12818
- import * as React152 from "react";
12819
- var Bell = ({ size = 18, ...props }) => /* @__PURE__ */ React152.createElement(
12820
- "svg",
12821
- {
12822
- xmlns: "http://www.w3.org/2000/svg",
12823
- viewBox: "0 0 18 18",
12824
- fill: "none",
12825
- ...props,
12826
- width: size,
12827
- height: size
12828
- },
12829
- /* @__PURE__ */ React152.createElement(
12830
- "path",
12831
- {
12832
- d: "M13.5 6C13.5 4.80653 13.0259 3.66193 12.182 2.81802C11.3381 1.97411 10.1935 1.5 9 1.5C7.80653 1.5 6.66193 1.97411 5.81802 2.81802C4.97411 3.66193 4.5 4.80653 4.5 6C4.5 11.25 2.25 12.75 2.25 12.75H15.75C15.75 12.75 13.5 11.25 13.5 6Z",
12833
- stroke: "currentColor",
12834
- strokeLinecap: "round",
12835
- strokeLinejoin: "round"
12836
- }
12837
- ),
12838
- /* @__PURE__ */ React152.createElement(
12839
- "path",
12840
- {
12841
- d: "M10.2975 15.75C10.1656 15.9773 9.97638 16.166 9.74867 16.2971C9.52096 16.4283 9.26278 16.4973 9 16.4973C8.73721 16.4973 8.47904 16.4283 8.25133 16.2971C8.02362 16.166 7.83436 15.9773 7.7025 15.75",
12842
- stroke: "currentColor",
12843
- strokeLinecap: "round",
12844
- strokeLinejoin: "round"
12845
- }
12846
- )
12847
- );
12848
- var Bell_default = Bell;
12849
-
12850
12885
  // src/components/BadgeLoader/BadgeLoader.tsx
12851
12886
  import React153 from "react";
12852
12887
  var BadgeLoader = ({ children }) => {
@@ -12873,7 +12908,8 @@ var NotificationCard = ({
12873
12908
 
12874
12909
  // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
12875
12910
  var TransactionToReviewCard = ({
12876
- onClick
12911
+ onClick,
12912
+ currentMonthOnly = true
12877
12913
  }) => {
12878
12914
  const [loaded, setLoaded] = useState50("initiated");
12879
12915
  const { data, isLoading, error, refetch } = useBankTransactions();
@@ -12891,12 +12927,10 @@ var TransactionToReviewCard = ({
12891
12927
  return;
12892
12928
  }
12893
12929
  }, [isLoading]);
12894
- const toReview = useMemo18(() => {
12895
- if (data && data.length > 0) {
12896
- return data.filter((tx) => filterVisibility("review" /* review */, tx)).length;
12897
- }
12898
- return 0;
12899
- }, [data, isLoading]);
12930
+ const toReview = useMemo18(
12931
+ () => countTransactionsToReview({ transactions: data, currentMonthOnly }),
12932
+ [data, isLoading]
12933
+ );
12900
12934
  return /* @__PURE__ */ React155.createElement(
12901
12935
  NotificationCard,
12902
12936
  {
@@ -12964,7 +12998,12 @@ var AccountingOverview = ({
12964
12998
  onTransactionsToReviewClick
12965
12999
  }) => {
12966
13000
  const [pnlToggle, setPnlToggle] = useState51("revenue");
12967
- return /* @__PURE__ */ React158.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React158.createElement(View3, { title, headerControls: /* @__PURE__ */ React158.createElement(ProfitAndLoss.DatePicker, null) }, enableOnboarding && /* @__PURE__ */ React158.createElement(Onboarding, null), /* @__PURE__ */ React158.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React158.createElement(ProfitAndLoss.Summaries, { actionable: false }), /* @__PURE__ */ React158.createElement(TransactionToReviewCard, { onClick: onTransactionsToReviewClick })), /* @__PURE__ */ React158.createElement(
13001
+ return /* @__PURE__ */ React158.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React158.createElement(View3, { title, headerControls: /* @__PURE__ */ React158.createElement(ProfitAndLoss.DatePicker, null) }, enableOnboarding && /* @__PURE__ */ React158.createElement(
13002
+ Onboarding,
13003
+ {
13004
+ onTransactionsToReviewClick
13005
+ }
13006
+ ), /* @__PURE__ */ React158.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React158.createElement(ProfitAndLoss.Summaries, { actionable: false }), /* @__PURE__ */ React158.createElement(TransactionToReviewCard, { onClick: onTransactionsToReviewClick })), /* @__PURE__ */ React158.createElement(
12968
13007
  Container,
12969
13008
  {
12970
13009
  name: "accounting-overview-profit-and-loss",
@@ -13018,7 +13057,8 @@ var BankTransactionsWithLinkedAccounts = ({
13018
13057
  elevatedLinkedAccounts = true,
13019
13058
  showLedgerBalance = true,
13020
13059
  showDescriptions,
13021
- showReceiptUploads
13060
+ showReceiptUploads,
13061
+ mobileComponent
13022
13062
  }) => {
13023
13063
  return /* @__PURE__ */ React159.createElement(View3, { title }, /* @__PURE__ */ React159.createElement(
13024
13064
  LinkedAccounts,
@@ -13031,7 +13071,8 @@ var BankTransactionsWithLinkedAccounts = ({
13031
13071
  {
13032
13072
  asWidget: true,
13033
13073
  showDescriptions,
13034
- showReceiptUploads
13074
+ showReceiptUploads,
13075
+ mobileComponent
13035
13076
  }
13036
13077
  ));
13037
13078
  };