@layerfi/components 0.1.49 → 0.1.50

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
@@ -8715,7 +8715,7 @@ var Quickbooks = () => {
8715
8715
  };
8716
8716
 
8717
8717
  // src/components/ProfitAndLoss/ProfitAndLoss.tsx
8718
- import React130, { createContext as createContext7 } from "react";
8718
+ import React131, { createContext as createContext7 } from "react";
8719
8719
 
8720
8720
  // src/hooks/useProfitAndLoss/useProfitAndLoss.tsx
8721
8721
  import { useMemo as useMemo8, useState as useState28 } from "react";
@@ -10889,11 +10889,8 @@ var ProfitAndLossSummaries = ({
10889
10889
  );
10890
10890
  };
10891
10891
 
10892
- // src/components/ProfitAndLossTable/ProfitAndLossTable.tsx
10893
- import React129, { useContext as useContext17, useEffect as useEffect27 } from "react";
10894
-
10895
- // src/hooks/useTableExpandRow/useTableExpandRow.tsx
10896
- import { useContext as useContext16 } from "react";
10892
+ // src/components/ProfitAndLossTable/ProfitAndLossTableWithProvider.tsx
10893
+ import React130 from "react";
10897
10894
 
10898
10895
  // src/contexts/TableContext/TableContext.tsx
10899
10896
  import React122, { createContext as createContext6, useState as useState32 } from "react";
@@ -10935,7 +10932,11 @@ var TableProvider = ({ children }) => {
10935
10932
  return /* @__PURE__ */ React122.createElement(TableContext.Provider, { value: contextValue }, children);
10936
10933
  };
10937
10934
 
10935
+ // src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
10936
+ import React129, { useContext as useContext17, useEffect as useEffect27 } from "react";
10937
+
10938
10938
  // src/hooks/useTableExpandRow/useTableExpandRow.tsx
10939
+ import { useContext as useContext16 } from "react";
10939
10940
  var useTableExpandRow = () => {
10940
10941
  const {
10941
10942
  expandedAllRows,
@@ -11185,9 +11186,12 @@ var empty_profit_and_loss_report_default = {
11185
11186
  fully_categorized: false
11186
11187
  };
11187
11188
 
11188
- // src/components/ProfitAndLossTable/ProfitAndLossTable.tsx
11189
+ // src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
11189
11190
  import classNames48 from "classnames";
11190
- var ProfitAndLossTable = ({ asContainer, stringOverrides }) => {
11191
+ var ProfitAndLossTableComponent = ({
11192
+ asContainer,
11193
+ stringOverrides
11194
+ }) => {
11191
11195
  const {
11192
11196
  data: actualData,
11193
11197
  isLoading,
@@ -11312,6 +11316,11 @@ var ProfitAndLossTable = ({ asContainer, stringOverrides }) => {
11312
11316
  ), data.other_outflows || data.personal_expenses ? /* @__PURE__ */ React129.createElement(React129.Fragment, null, renderLineItem(data.other_outflows, 0, "other_outflows", 6), renderLineItem(data.personal_expenses, 0, "personal_expenses", 7)) : null));
11313
11317
  };
11314
11318
 
11319
+ // src/components/ProfitAndLossTable/ProfitAndLossTableWithProvider.tsx
11320
+ var ProfitAndLossTableWithProvider = (props) => {
11321
+ return /* @__PURE__ */ React130.createElement(TableProvider, null, /* @__PURE__ */ React130.createElement(ProfitAndLossTableComponent, { ...props }));
11322
+ };
11323
+
11315
11324
  // src/components/ProfitAndLoss/ProfitAndLoss.tsx
11316
11325
  import { endOfMonth as endOfMonth8, startOfMonth as startOfMonth10 } from "date-fns";
11317
11326
  var PNLContext = createContext7({
@@ -11350,17 +11359,17 @@ var ProfitAndLoss = ({
11350
11359
  asContainer = true
11351
11360
  }) => {
11352
11361
  const contextData = useProfitAndLoss({ tagFilter, reportingBasis });
11353
- return /* @__PURE__ */ React130.createElement(PNLContext.Provider, { value: contextData }, asContainer ? /* @__PURE__ */ React130.createElement(Container, { name: "profit-and-loss" }, children) : children);
11362
+ return /* @__PURE__ */ React131.createElement(PNLContext.Provider, { value: contextData }, asContainer ? /* @__PURE__ */ React131.createElement(Container, { name: "profit-and-loss" }, children) : children);
11354
11363
  };
11355
11364
  ProfitAndLoss.Chart = ProfitAndLossChart;
11356
11365
  ProfitAndLoss.Context = PNLContext;
11357
11366
  ProfitAndLoss.DatePicker = ProfitAndLossDatePicker;
11358
11367
  ProfitAndLoss.Summaries = ProfitAndLossSummaries;
11359
- ProfitAndLoss.Table = ProfitAndLossTable;
11368
+ ProfitAndLoss.Table = ProfitAndLossTableWithProvider;
11360
11369
  ProfitAndLoss.DetailedCharts = ProfitAndLossDetailedCharts;
11361
11370
 
11362
11371
  // src/components/BalanceSheet/BalanceSheet.tsx
11363
- import React137, { useEffect as useEffect31, useState as useState34 } from "react";
11372
+ import React138, { useEffect as useEffect31, useState as useState34 } from "react";
11364
11373
 
11365
11374
  // src/contexts/BalanceSheetContext/BalanceSheetContext.tsx
11366
11375
  import { createContext as createContext8 } from "react";
@@ -11406,12 +11415,12 @@ var useBalanceSheet = (date = /* @__PURE__ */ new Date()) => {
11406
11415
  };
11407
11416
 
11408
11417
  // src/components/BalanceSheetDatePicker/BalanceSheetDatePicker.tsx
11409
- import React131 from "react";
11418
+ import React132 from "react";
11410
11419
  var BalanceSheetDatePicker = ({
11411
11420
  effectiveDate,
11412
11421
  setEffectiveDate
11413
11422
  }) => {
11414
- return /* @__PURE__ */ React131.createElement(React131.Fragment, null, /* @__PURE__ */ React131.createElement(
11423
+ return /* @__PURE__ */ React132.createElement(React132.Fragment, null, /* @__PURE__ */ React132.createElement(
11415
11424
  DatePicker,
11416
11425
  {
11417
11426
  selected: effectiveDate,
@@ -11422,14 +11431,14 @@ var BalanceSheetDatePicker = ({
11422
11431
  };
11423
11432
 
11424
11433
  // src/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton.tsx
11425
- import React132 from "react";
11434
+ import React133 from "react";
11426
11435
  var BalanceSheetExpandAllButton = () => {
11427
11436
  const { expandedAllRows, toggleAllRows } = useTableExpandRow();
11428
- return /* @__PURE__ */ React132.createElement(Button, { onClick: () => toggleAllRows(), variant: "secondary" /* secondary */ }, !expandedAllRows ? "Expand all rows" : "Collapse all rows");
11437
+ return /* @__PURE__ */ React133.createElement(Button, { onClick: () => toggleAllRows(), variant: "secondary" /* secondary */ }, !expandedAllRows ? "Expand all rows" : "Collapse all rows");
11429
11438
  };
11430
11439
 
11431
11440
  // src/components/BalanceSheetTable/BalanceSheetTable.tsx
11432
- import React133, { useEffect as useEffect29 } from "react";
11441
+ import React134, { useEffect as useEffect29 } from "react";
11433
11442
  var BalanceSheetTable = ({
11434
11443
  data,
11435
11444
  config,
@@ -11452,7 +11461,7 @@ var BalanceSheetTable = ({
11452
11461
  if (expandable) {
11453
11462
  allRowKeys.push(rowKey);
11454
11463
  }
11455
- return /* @__PURE__ */ React133.createElement(React133.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React133.createElement(
11464
+ return /* @__PURE__ */ React134.createElement(React134.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React134.createElement(
11456
11465
  TableRow,
11457
11466
  {
11458
11467
  rowKey: rowKey + "-" + rowIndex,
@@ -11462,8 +11471,8 @@ var BalanceSheetTable = ({
11462
11471
  depth,
11463
11472
  withDivider: depth === 0 && rowIndex > 0
11464
11473
  },
11465
- /* @__PURE__ */ React133.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
11466
- /* @__PURE__ */ React133.createElement(
11474
+ /* @__PURE__ */ React134.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
11475
+ /* @__PURE__ */ React134.createElement(
11467
11476
  TableCell,
11468
11477
  {
11469
11478
  isCurrency: !expandable || expandable && !expanded,
@@ -11478,18 +11487,18 @@ var BalanceSheetTable = ({
11478
11487
  rowKey + ":" + subItem.name,
11479
11488
  subIdx
11480
11489
  )
11481
- ), showChildren && expandable && /* @__PURE__ */ React133.createElement(
11490
+ ), showChildren && expandable && /* @__PURE__ */ React134.createElement(
11482
11491
  TableRow,
11483
11492
  {
11484
11493
  rowKey: rowKey + "-" + rowIndex + "--summation",
11485
11494
  depth: depth + 1,
11486
11495
  variant: "summation"
11487
11496
  },
11488
- /* @__PURE__ */ React133.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
11489
- /* @__PURE__ */ React133.createElement(TableCell, { primary: true, isCurrency: true }, lineItem.value)
11497
+ /* @__PURE__ */ React134.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
11498
+ /* @__PURE__ */ React134.createElement(TableCell, { primary: true, isCurrency: true }, lineItem.value)
11490
11499
  ));
11491
11500
  };
11492
- return /* @__PURE__ */ React133.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React133.createElement(TableHead, null, /* @__PURE__ */ React133.createElement(TableRow, { isHeadRow: true, rowKey: "balance-sheet-head-row" }, /* @__PURE__ */ React133.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React133.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.totalColumnHeader || "Total"))), /* @__PURE__ */ React133.createElement(TableBody, null, config.map((row, idx) => /* @__PURE__ */ React133.createElement(React133.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
11501
+ return /* @__PURE__ */ React134.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React134.createElement(TableHead, null, /* @__PURE__ */ React134.createElement(TableRow, { isHeadRow: true, rowKey: "balance-sheet-head-row" }, /* @__PURE__ */ React134.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React134.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.totalColumnHeader || "Total"))), /* @__PURE__ */ React134.createElement(TableBody, null, config.map((row, idx) => /* @__PURE__ */ React134.createElement(React134.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
11493
11502
  data[row.lineItem],
11494
11503
  0,
11495
11504
  row.lineItem,
@@ -11498,16 +11507,16 @@ var BalanceSheetTable = ({
11498
11507
  };
11499
11508
 
11500
11509
  // src/components/View/View.tsx
11501
- import React136 from "react";
11510
+ import React137 from "react";
11502
11511
 
11503
11512
  // src/components/ViewHeader/ViewHeader.tsx
11504
- import React134 from "react";
11513
+ import React135 from "react";
11505
11514
  var ViewHeader = ({ title, controls }) => {
11506
- return /* @__PURE__ */ React134.createElement("div", { className: "Layer__view-header" }, /* @__PURE__ */ React134.createElement("div", { className: "Layer__view-header__content" }, title && /* @__PURE__ */ React134.createElement(Heading, null, title), controls && /* @__PURE__ */ React134.createElement("div", { className: "Layer__view-header__controls" }, controls)));
11515
+ return /* @__PURE__ */ React135.createElement("div", { className: "Layer__view-header" }, /* @__PURE__ */ React135.createElement("div", { className: "Layer__view-header__content" }, title && /* @__PURE__ */ React135.createElement(Heading, null, title), controls && /* @__PURE__ */ React135.createElement("div", { className: "Layer__view-header__controls" }, controls)));
11507
11516
  };
11508
11517
 
11509
11518
  // src/components/Panel/Panel.tsx
11510
- import React135, { useEffect as useEffect30, useState as useState33 } from "react";
11519
+ import React136, { useEffect as useEffect30, useState as useState33 } from "react";
11511
11520
  import classNames49 from "classnames";
11512
11521
  var Panel = ({
11513
11522
  children,
@@ -11528,7 +11537,7 @@ var Panel = ({
11528
11537
  "Layer__panel__sidebar",
11529
11538
  defaultSidebarHeight && "Layer__panel__sidebar--default"
11530
11539
  );
11531
- return /* @__PURE__ */ React135.createElement(
11540
+ return /* @__PURE__ */ React136.createElement(
11532
11541
  "div",
11533
11542
  {
11534
11543
  className: classNames49(
@@ -11537,8 +11546,8 @@ var Panel = ({
11537
11546
  sidebarIsOpen && "Layer__panel--open"
11538
11547
  )
11539
11548
  },
11540
- /* @__PURE__ */ React135.createElement("div", { className: "Layer__panel__content" }, header, children),
11541
- sidebar && /* @__PURE__ */ React135.createElement(
11549
+ /* @__PURE__ */ React136.createElement("div", { className: "Layer__panel__content" }, header, children),
11550
+ sidebar && /* @__PURE__ */ React136.createElement(
11542
11551
  "div",
11543
11552
  {
11544
11553
  className: sidebarClass,
@@ -11546,7 +11555,7 @@ var Panel = ({
11546
11555
  maxHeight: sidebarHeight > 0 && sidebarIsOpen ? sidebarHeight : 0
11547
11556
  } : {}
11548
11557
  },
11549
- /* @__PURE__ */ React135.createElement("div", { className: "Layer__panel__sidebar-content" }, sidebar)
11558
+ /* @__PURE__ */ React136.createElement("div", { className: "Layer__panel__sidebar-content" }, sidebar)
11550
11559
  )
11551
11560
  );
11552
11561
  };
@@ -11569,7 +11578,7 @@ var View = ({
11569
11578
  type === "panel" && "Layer__view--panel",
11570
11579
  viewClassName
11571
11580
  );
11572
- return /* @__PURE__ */ React136.createElement("div", { className: viewClassNames, style: { ...styles } }, /* @__PURE__ */ React136.createElement(ViewHeader, { title, controls: headerControls }), withSidebar ? /* @__PURE__ */ React136.createElement(Panel, { sidebarIsOpen: true, sidebar, defaultSidebarHeight: true }, /* @__PURE__ */ React136.createElement("div", { className: "Layer__view-main" }, children)) : /* @__PURE__ */ React136.createElement("div", { className: "Layer__view-main" }, children));
11581
+ return /* @__PURE__ */ React137.createElement("div", { className: viewClassNames, style: { ...styles } }, /* @__PURE__ */ React137.createElement(ViewHeader, { title, controls: headerControls }), withSidebar ? /* @__PURE__ */ React137.createElement(Panel, { sidebarIsOpen: true, sidebar, defaultSidebarHeight: true }, /* @__PURE__ */ React137.createElement("div", { className: "Layer__view-main" }, children)) : /* @__PURE__ */ React137.createElement("div", { className: "Layer__view-main" }, children));
11573
11582
  };
11574
11583
 
11575
11584
  // src/components/BalanceSheet/constants.ts
@@ -11591,7 +11600,7 @@ import { format as format4, parse, startOfDay as startOfDay2 } from "date-fns";
11591
11600
  var COMPONENT_NAME3 = "balance-sheet";
11592
11601
  var BalanceSheet = (props) => {
11593
11602
  const balanceSheetContextData = useBalanceSheet(props.effectiveDate);
11594
- return /* @__PURE__ */ React137.createElement(BalanceSheetContext.Provider, { value: balanceSheetContextData }, /* @__PURE__ */ React137.createElement(
11603
+ return /* @__PURE__ */ React138.createElement(BalanceSheetContext.Provider, { value: balanceSheetContextData }, /* @__PURE__ */ React138.createElement(
11595
11604
  BalanceSheetView,
11596
11605
  {
11597
11606
  asWidget: props.asWidget,
@@ -11620,19 +11629,19 @@ var BalanceSheetView = ({
11620
11629
  }
11621
11630
  }, [effectiveDate]);
11622
11631
  if (asWidget) {
11623
- return /* @__PURE__ */ React137.createElement(TableProvider, null, /* @__PURE__ */ React137.createElement(Container, { name: COMPONENT_NAME3, asWidget: true }, /* @__PURE__ */ React137.createElement(
11632
+ return /* @__PURE__ */ React138.createElement(TableProvider, null, /* @__PURE__ */ React138.createElement(Container, { name: COMPONENT_NAME3, asWidget: true }, /* @__PURE__ */ React138.createElement(
11624
11633
  View,
11625
11634
  {
11626
11635
  type: "panel",
11627
- headerControls: /* @__PURE__ */ React137.createElement(React137.Fragment, null, /* @__PURE__ */ React137.createElement(
11636
+ headerControls: /* @__PURE__ */ React138.createElement(React138.Fragment, null, /* @__PURE__ */ React138.createElement(
11628
11637
  BalanceSheetDatePicker,
11629
11638
  {
11630
11639
  effectiveDate,
11631
11640
  setEffectiveDate
11632
11641
  }
11633
- ), withExpandAllButton && /* @__PURE__ */ React137.createElement(BalanceSheetExpandAllButton, null))
11642
+ ), withExpandAllButton && /* @__PURE__ */ React138.createElement(BalanceSheetExpandAllButton, null))
11634
11643
  },
11635
- !data || isLoading ? /* @__PURE__ */ React137.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React137.createElement(Loader2, null)) : /* @__PURE__ */ React137.createElement(
11644
+ !data || isLoading ? /* @__PURE__ */ React138.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React138.createElement(Loader2, null)) : /* @__PURE__ */ React138.createElement(
11636
11645
  BalanceSheetTable,
11637
11646
  {
11638
11647
  data,
@@ -11642,19 +11651,19 @@ var BalanceSheetView = ({
11642
11651
  )
11643
11652
  )));
11644
11653
  }
11645
- return /* @__PURE__ */ React137.createElement(TableProvider, null, /* @__PURE__ */ React137.createElement(
11654
+ return /* @__PURE__ */ React138.createElement(TableProvider, null, /* @__PURE__ */ React138.createElement(
11646
11655
  View,
11647
11656
  {
11648
11657
  type: "panel",
11649
- headerControls: /* @__PURE__ */ React137.createElement(React137.Fragment, null, /* @__PURE__ */ React137.createElement(
11658
+ headerControls: /* @__PURE__ */ React138.createElement(React138.Fragment, null, /* @__PURE__ */ React138.createElement(
11650
11659
  BalanceSheetDatePicker,
11651
11660
  {
11652
11661
  effectiveDate,
11653
11662
  setEffectiveDate
11654
11663
  }
11655
- ), withExpandAllButton && /* @__PURE__ */ React137.createElement(BalanceSheetExpandAllButton, null))
11664
+ ), withExpandAllButton && /* @__PURE__ */ React138.createElement(BalanceSheetExpandAllButton, null))
11656
11665
  },
11657
- !data || isLoading ? /* @__PURE__ */ React137.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React137.createElement(Loader2, null)) : /* @__PURE__ */ React137.createElement(
11666
+ !data || isLoading ? /* @__PURE__ */ React138.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React138.createElement(Loader2, null)) : /* @__PURE__ */ React138.createElement(
11658
11667
  BalanceSheetTable,
11659
11668
  {
11660
11669
  data,
@@ -11666,7 +11675,7 @@ var BalanceSheetView = ({
11666
11675
  };
11667
11676
 
11668
11677
  // src/components/StatementOfCashFlow/StatementOfCashFlow.tsx
11669
- import React139, { useState as useState35 } from "react";
11678
+ import React140, { useState as useState35 } from "react";
11670
11679
 
11671
11680
  // src/contexts/StatementOfCashContext/StatementOfCashFlowContext.tsx
11672
11681
  import { createContext as createContext9 } from "react";
@@ -11717,7 +11726,7 @@ var useStatementOfCashFlow = (startDate = /* @__PURE__ */ new Date(), endDate =
11717
11726
  };
11718
11727
 
11719
11728
  // src/components/StatementOfCashFlowTable/StatementOfCashFlowTable.tsx
11720
- import React138 from "react";
11729
+ import React139 from "react";
11721
11730
  var StatementOfCashFlowTable = ({
11722
11731
  data,
11723
11732
  config,
@@ -11727,7 +11736,7 @@ var StatementOfCashFlowTable = ({
11727
11736
  const renderLineItem = (lineItem, depth = 0, rowKey, rowIndex) => {
11728
11737
  const expandable = !!lineItem.line_items && lineItem.line_items.length > 0;
11729
11738
  const expanded = expandable ? isOpen(rowKey) : true;
11730
- return /* @__PURE__ */ React138.createElement(React138.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React138.createElement(
11739
+ return /* @__PURE__ */ React139.createElement(React139.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React139.createElement(
11731
11740
  TableRow,
11732
11741
  {
11733
11742
  rowKey: rowKey + "-" + rowIndex,
@@ -11736,8 +11745,8 @@ var StatementOfCashFlowTable = ({
11736
11745
  handleExpand: () => setIsOpen(rowKey),
11737
11746
  depth
11738
11747
  },
11739
- /* @__PURE__ */ React138.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
11740
- /* @__PURE__ */ React138.createElement(
11748
+ /* @__PURE__ */ React139.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
11749
+ /* @__PURE__ */ React139.createElement(
11741
11750
  TableCell,
11742
11751
  {
11743
11752
  isCurrency: !expandable || expandable && !expanded,
@@ -11752,27 +11761,27 @@ var StatementOfCashFlowTable = ({
11752
11761
  rowKey + ":" + subItem.name,
11753
11762
  subIdx
11754
11763
  )
11755
- ), expanded && expandable && /* @__PURE__ */ React138.createElement(
11764
+ ), expanded && expandable && /* @__PURE__ */ React139.createElement(
11756
11765
  TableRow,
11757
11766
  {
11758
11767
  rowKey: rowKey + "-" + rowIndex + "--summation",
11759
11768
  depth: depth + 1,
11760
11769
  variant: "summation"
11761
11770
  },
11762
- /* @__PURE__ */ React138.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
11763
- /* @__PURE__ */ React138.createElement(TableCell, { primary: true, isCurrency: true }, lineItem.value)
11771
+ /* @__PURE__ */ React139.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
11772
+ /* @__PURE__ */ React139.createElement(TableCell, { primary: true, isCurrency: true }, lineItem.value)
11764
11773
  ));
11765
11774
  };
11766
- return /* @__PURE__ */ React138.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React138.createElement(TableHead, null, /* @__PURE__ */ React138.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React138.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React138.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.totalColumnHeader || "Total"))), /* @__PURE__ */ React138.createElement(TableBody, null, config.map((row, idx) => {
11775
+ return /* @__PURE__ */ React139.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React139.createElement(TableHead, null, /* @__PURE__ */ React139.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React139.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React139.createElement(TableCell, { isHeaderCell: true }, stringOverrides?.totalColumnHeader || "Total"))), /* @__PURE__ */ React139.createElement(TableBody, null, config.map((row, idx) => {
11767
11776
  if (row.type === "line_item") {
11768
- return /* @__PURE__ */ React138.createElement(React138.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
11777
+ return /* @__PURE__ */ React139.createElement(React139.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
11769
11778
  data[row.lineItem],
11770
11779
  0,
11771
11780
  row.lineItem ? row.lineItem : "",
11772
11781
  idx
11773
11782
  ));
11774
11783
  } else {
11775
- return /* @__PURE__ */ React138.createElement(TableRow, { rowKey: row.name + "-" + idx, variant: "default" }, /* @__PURE__ */ React138.createElement(TableCell, { primary: true }, row.displayName), /* @__PURE__ */ React138.createElement(TableCell, { primary: true, isCurrency: true }, row.lineItem));
11784
+ return /* @__PURE__ */ React139.createElement(TableRow, { rowKey: row.name + "-" + idx, variant: "default" }, /* @__PURE__ */ React139.createElement(TableCell, { primary: true }, row.displayName), /* @__PURE__ */ React139.createElement(TableCell, { primary: true, isCurrency: true }, row.lineItem));
11776
11785
  }
11777
11786
  })));
11778
11787
  };
@@ -11821,7 +11830,7 @@ import { startOfDay as startOfDay4, subWeeks } from "date-fns";
11821
11830
  var COMPONENT_NAME4 = "statement-of-cash-flow";
11822
11831
  var StatementOfCashFlow = ({ stringOverrides }) => {
11823
11832
  const cashContextData = useStatementOfCashFlow();
11824
- return /* @__PURE__ */ React139.createElement(StatementOfCashFlowContext.Provider, { value: cashContextData }, /* @__PURE__ */ React139.createElement(StatementOfCashFlowView, { stringOverrides }));
11833
+ return /* @__PURE__ */ React140.createElement(StatementOfCashFlowContext.Provider, { value: cashContextData }, /* @__PURE__ */ React140.createElement(StatementOfCashFlowView, { stringOverrides }));
11825
11834
  };
11826
11835
  var StatementOfCashFlowView = ({ stringOverrides }) => {
11827
11836
  const [startDate, setStartDate] = useState35(
@@ -11843,11 +11852,11 @@ var StatementOfCashFlowView = ({ stringOverrides }) => {
11843
11852
  refetch();
11844
11853
  }
11845
11854
  };
11846
- return /* @__PURE__ */ React139.createElement(TableProvider, null, /* @__PURE__ */ React139.createElement(
11855
+ return /* @__PURE__ */ React140.createElement(TableProvider, null, /* @__PURE__ */ React140.createElement(
11847
11856
  View,
11848
11857
  {
11849
11858
  type: "panel",
11850
- headerControls: /* @__PURE__ */ React139.createElement(React139.Fragment, null, /* @__PURE__ */ React139.createElement(
11859
+ headerControls: /* @__PURE__ */ React140.createElement(React140.Fragment, null, /* @__PURE__ */ React140.createElement(
11851
11860
  DatePicker,
11852
11861
  {
11853
11862
  selected: [startDate, endDate],
@@ -11857,7 +11866,7 @@ var StatementOfCashFlowView = ({ stringOverrides }) => {
11857
11866
  }
11858
11867
  ))
11859
11868
  },
11860
- !data || isLoading ? /* @__PURE__ */ React139.createElement("div", { className: `Layer__${COMPONENT_NAME4}__loader-container` }, /* @__PURE__ */ React139.createElement(Loader2, null)) : /* @__PURE__ */ React139.createElement(
11869
+ !data || isLoading ? /* @__PURE__ */ React140.createElement("div", { className: `Layer__${COMPONENT_NAME4}__loader-container` }, /* @__PURE__ */ React140.createElement(Loader2, null)) : /* @__PURE__ */ React140.createElement(
11861
11870
  StatementOfCashFlowTable,
11862
11871
  {
11863
11872
  data,
@@ -11869,7 +11878,7 @@ var StatementOfCashFlowView = ({ stringOverrides }) => {
11869
11878
  };
11870
11879
 
11871
11880
  // src/components/ChartOfAccounts/ChartOfAccounts.tsx
11872
- import React154, { useContext as useContext25, useState as useState42 } from "react";
11881
+ import React155, { useContext as useContext25, useState as useState42 } from "react";
11873
11882
 
11874
11883
  // src/contexts/ChartOfAccountsContext/ChartOfAccountsContext.tsx
11875
11884
  import { createContext as createContext10 } from "react";
@@ -12502,14 +12511,14 @@ var useLedgerAccounts = () => {
12502
12511
  };
12503
12512
 
12504
12513
  // src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
12505
- import React146, { useContext as useContext21, useState as useState39 } from "react";
12514
+ import React147, { useContext as useContext21, useState as useState39 } from "react";
12506
12515
 
12507
12516
  // src/components/ChartOfAccountsDatePicker/ChartOfAccountsDatePicker.tsx
12508
- import React140, { useContext as useContext18 } from "react";
12517
+ import React141, { useContext as useContext18 } from "react";
12509
12518
  import { endOfMonth as endOfMonth11, startOfMonth as startOfMonth13 } from "date-fns";
12510
12519
  var ChartOfAccountsDatePicker = () => {
12511
12520
  const { changeDateRange, dateRange } = useContext18(ChartOfAccountsContext);
12512
- return /* @__PURE__ */ React140.createElement(
12521
+ return /* @__PURE__ */ React141.createElement(
12513
12522
  DatePicker,
12514
12523
  {
12515
12524
  mode: "monthPicker",
@@ -12527,11 +12536,11 @@ var ChartOfAccountsDatePicker = () => {
12527
12536
  };
12528
12537
 
12529
12538
  // src/components/ChartOfAccountsRow/ChartOfAccountsRow.tsx
12530
- import React142, { useContext as useContext19, useEffect as useEffect35, useState as useState38 } from "react";
12539
+ import React143, { useContext as useContext19, useEffect as useEffect35, useState as useState38 } from "react";
12531
12540
 
12532
12541
  // src/icons/Edit2.tsx
12533
- import * as React141 from "react";
12534
- var Edit2 = ({ size = 18, ...props }) => /* @__PURE__ */ React141.createElement(
12542
+ import * as React142 from "react";
12543
+ var Edit2 = ({ size = 18, ...props }) => /* @__PURE__ */ React142.createElement(
12535
12544
  "svg",
12536
12545
  {
12537
12546
  xmlns: "http://www.w3.org/2000/svg",
@@ -12541,7 +12550,7 @@ var Edit2 = ({ size = 18, ...props }) => /* @__PURE__ */ React141.createElement(
12541
12550
  width: size,
12542
12551
  height: size
12543
12552
  },
12544
- /* @__PURE__ */ React141.createElement(
12553
+ /* @__PURE__ */ React142.createElement(
12545
12554
  "path",
12546
12555
  {
12547
12556
  d: "M12.75 2.25C12.947 2.05301 13.1808 1.89676 13.4382 1.79015C13.6956 1.68355 13.9714 1.62868 14.25 1.62868C14.5286 1.62868 14.8044 1.68355 15.0618 1.79015C15.3192 1.89676 15.553 2.05301 15.75 2.25C15.947 2.44698 16.1032 2.68083 16.2098 2.9382C16.3165 3.19557 16.3713 3.47142 16.3713 3.75C16.3713 4.02857 16.3165 4.30442 16.2098 4.56179C16.1032 4.81916 15.947 5.05302 15.75 5.25L5.625 15.375L1.5 16.5L2.625 12.375L12.75 2.25Z",
@@ -12625,7 +12634,7 @@ var ChartOfAccountsRow = ({
12625
12634
  baseClass,
12626
12635
  "Layer__chart-of-accounts__row---mobile"
12627
12636
  );
12628
- return /* @__PURE__ */ React142.createElement(React142.Fragment, null, view === "desktop" && /* @__PURE__ */ React142.createElement(
12637
+ return /* @__PURE__ */ React143.createElement(React143.Fragment, null, view === "desktop" && /* @__PURE__ */ React143.createElement(
12629
12638
  "tr",
12630
12639
  {
12631
12640
  className: desktopRowClass,
@@ -12635,7 +12644,7 @@ var ChartOfAccountsRow = ({
12635
12644
  setAccountId(account.id);
12636
12645
  }
12637
12646
  },
12638
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell Layer__coa__name" }, /* @__PURE__ */ React142.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React142.createElement(
12647
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell Layer__coa__name" }, /* @__PURE__ */ React143.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React143.createElement(
12639
12648
  "span",
12640
12649
  {
12641
12650
  className: "Layer__table-cell-content-indentation",
@@ -12643,7 +12652,7 @@ var ChartOfAccountsRow = ({
12643
12652
  paddingLeft: INDENTATION * depth + 16
12644
12653
  }
12645
12654
  },
12646
- account.sub_accounts && account.sub_accounts.length > 0 && /* @__PURE__ */ React142.createElement(
12655
+ account.sub_accounts && account.sub_accounts.length > 0 && /* @__PURE__ */ React143.createElement(
12647
12656
  ChevronDownFill_default,
12648
12657
  {
12649
12658
  size: 16,
@@ -12654,22 +12663,22 @@ var ChartOfAccountsRow = ({
12654
12663
  }
12655
12664
  }
12656
12665
  ),
12657
- /* @__PURE__ */ React142.createElement("span", { className: "Layer__coa__name__text" }, account.name)
12666
+ /* @__PURE__ */ React143.createElement("span", { className: "Layer__coa__name__text" }, account.name)
12658
12667
  ))),
12659
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell Layer__coa__type" }, /* @__PURE__ */ React142.createElement(
12668
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell Layer__coa__type" }, /* @__PURE__ */ React143.createElement(
12660
12669
  "span",
12661
12670
  {
12662
12671
  className: "Layer__table-cell-content Layer__mobile--hidden",
12663
12672
  style
12664
12673
  },
12665
12674
  account.account_type?.display_name
12666
- ), /* @__PURE__ */ React142.createElement(
12675
+ ), /* @__PURE__ */ React143.createElement(
12667
12676
  "span",
12668
12677
  {
12669
12678
  className: "Layer__table-cell-content Layer__desktop--hidden",
12670
12679
  style
12671
12680
  },
12672
- /* @__PURE__ */ React142.createElement(
12681
+ /* @__PURE__ */ React143.createElement(
12673
12682
  Text,
12674
12683
  {
12675
12684
  weight: "bold" /* bold */,
@@ -12677,10 +12686,10 @@ var ChartOfAccountsRow = ({
12677
12686
  },
12678
12687
  account.normality
12679
12688
  ),
12680
- /* @__PURE__ */ React142.createElement(Text, { className: "Layer__coa__subtype--mobile" }, account.account_subtype?.display_name)
12689
+ /* @__PURE__ */ React143.createElement(Text, { className: "Layer__coa__subtype--mobile" }, account.account_subtype?.display_name)
12681
12690
  )),
12682
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell Layer__coa__subtype Layer__mobile--hidden" }, /* @__PURE__ */ React142.createElement("span", { className: "Layer__table-cell-content", style }, account.account_subtype?.display_name)),
12683
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell Layer__coa__balance" }, /* @__PURE__ */ React142.createElement(
12691
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell Layer__coa__subtype Layer__mobile--hidden" }, /* @__PURE__ */ React143.createElement("span", { className: "Layer__table-cell-content", style }, account.account_subtype?.display_name)),
12692
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell Layer__coa__balance" }, /* @__PURE__ */ React143.createElement(
12684
12693
  "span",
12685
12694
  {
12686
12695
  className: "Layer__table-cell-content Layer__table-cell--amount",
@@ -12689,11 +12698,11 @@ var ChartOfAccountsRow = ({
12689
12698
  "$",
12690
12699
  centsToDollars(Math.abs(account.balance || 0))
12691
12700
  )),
12692
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell Layer__coa__actions" }, /* @__PURE__ */ React142.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React142.createElement(
12701
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell Layer__coa__actions" }, /* @__PURE__ */ React143.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React143.createElement(
12693
12702
  Button,
12694
12703
  {
12695
12704
  variant: "secondary" /* secondary */,
12696
- rightIcon: /* @__PURE__ */ React142.createElement(Edit2_default, { size: 12 }),
12705
+ rightIcon: /* @__PURE__ */ React143.createElement(Edit2_default, { size: 12 }),
12697
12706
  iconOnly: true,
12698
12707
  onClick: (e) => {
12699
12708
  e.preventDefault();
@@ -12703,7 +12712,7 @@ var ChartOfAccountsRow = ({
12703
12712
  },
12704
12713
  "Edit"
12705
12714
  )))
12706
- ), view === "mobile" || view === "tablet" ? /* @__PURE__ */ React142.createElement(
12715
+ ), view === "mobile" || view === "tablet" ? /* @__PURE__ */ React143.createElement(
12707
12716
  "tr",
12708
12717
  {
12709
12718
  className: mobileRowClass,
@@ -12713,7 +12722,7 @@ var ChartOfAccountsRow = ({
12713
12722
  setAccountId(account.id);
12714
12723
  }
12715
12724
  },
12716
- /* @__PURE__ */ React142.createElement("td", { className: "Layer__table-cell", colSpan: 5 }, /* @__PURE__ */ React142.createElement(
12725
+ /* @__PURE__ */ React143.createElement("td", { className: "Layer__table-cell", colSpan: 5 }, /* @__PURE__ */ React143.createElement(
12717
12726
  "span",
12718
12727
  {
12719
12728
  className: "Layer__table-cell-content Layer__table-cell-content-indentation",
@@ -12722,7 +12731,7 @@ var ChartOfAccountsRow = ({
12722
12731
  ...style
12723
12732
  }
12724
12733
  },
12725
- account.sub_accounts && account.sub_accounts.length > 0 && /* @__PURE__ */ React142.createElement(
12734
+ account.sub_accounts && account.sub_accounts.length > 0 && /* @__PURE__ */ React143.createElement(
12726
12735
  ChevronDownFill_default,
12727
12736
  {
12728
12737
  size: 16,
@@ -12733,14 +12742,14 @@ var ChartOfAccountsRow = ({
12733
12742
  }
12734
12743
  }
12735
12744
  ),
12736
- /* @__PURE__ */ React142.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content" }, /* @__PURE__ */ React142.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__top-row" }, /* @__PURE__ */ React142.createElement(
12745
+ /* @__PURE__ */ React143.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content" }, /* @__PURE__ */ React143.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__top-row" }, /* @__PURE__ */ React143.createElement(
12737
12746
  Text,
12738
12747
  {
12739
12748
  as: "span",
12740
12749
  className: "Layer__chart-of-accounts__mobile-row-content__name"
12741
12750
  },
12742
12751
  account.name
12743
- ), /* @__PURE__ */ React142.createElement(
12752
+ ), /* @__PURE__ */ React143.createElement(
12744
12753
  TextButton,
12745
12754
  {
12746
12755
  onClick: (e) => {
@@ -12750,7 +12759,7 @@ var ChartOfAccountsRow = ({
12750
12759
  }
12751
12760
  },
12752
12761
  "Edit"
12753
- )), /* @__PURE__ */ React142.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__bottom-row" }, /* @__PURE__ */ React142.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__types" }, /* @__PURE__ */ React142.createElement(Text, { as: "span" }, account.normality), /* @__PURE__ */ React142.createElement("span", { className: "Layer__chart-of-accounts__mobile-row-content__separator" }), /* @__PURE__ */ React142.createElement(Text, { as: "span" }, "Sub-Type")), /* @__PURE__ */ React142.createElement(
12762
+ )), /* @__PURE__ */ React143.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__bottom-row" }, /* @__PURE__ */ React143.createElement("div", { className: "Layer__chart-of-accounts__mobile-row-content__types" }, /* @__PURE__ */ React143.createElement(Text, { as: "span" }, account.normality), /* @__PURE__ */ React143.createElement("span", { className: "Layer__chart-of-accounts__mobile-row-content__separator" }), /* @__PURE__ */ React143.createElement(Text, { as: "span" }, "Sub-Type")), /* @__PURE__ */ React143.createElement(
12754
12763
  Text,
12755
12764
  {
12756
12765
  as: "span",
@@ -12760,7 +12769,7 @@ var ChartOfAccountsRow = ({
12760
12769
  centsToDollars(Math.abs(account.balance || 0))
12761
12770
  )))
12762
12771
  ))
12763
- ) : null, (account.sub_accounts || []).map((subAccount, idx) => /* @__PURE__ */ React142.createElement(
12772
+ ) : null, (account.sub_accounts || []).map((subAccount, idx) => /* @__PURE__ */ React143.createElement(
12764
12773
  ChartOfAccountsRow,
12765
12774
  {
12766
12775
  key: subAccount.id,
@@ -12777,10 +12786,10 @@ var ChartOfAccountsRow = ({
12777
12786
  };
12778
12787
 
12779
12788
  // src/components/ChartOfAccountsSidebar/ChartOfAccountsSidebar.tsx
12780
- import React145 from "react";
12789
+ import React146 from "react";
12781
12790
 
12782
12791
  // src/components/ChartOfAccountsForm/ChartOfAccountsForm.tsx
12783
- import React144, { useContext as useContext20, useMemo as useMemo13 } from "react";
12792
+ import React145, { useContext as useContext20, useMemo as useMemo13 } from "react";
12784
12793
 
12785
12794
  // src/components/ChartOfAccountsForm/useParentOptions.ts
12786
12795
  import { useMemo as useMemo12 } from "react";
@@ -12817,7 +12826,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12817
12826
  if (!form) {
12818
12827
  return;
12819
12828
  }
12820
- return /* @__PURE__ */ React144.createElement(
12829
+ return /* @__PURE__ */ React145.createElement(
12821
12830
  "form",
12822
12831
  {
12823
12832
  className: "Layer__form",
@@ -12826,7 +12835,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12826
12835
  submitForm();
12827
12836
  }
12828
12837
  },
12829
- /* @__PURE__ */ React144.createElement("div", { className: "Layer__chart-of-accounts__sidebar__header" }, /* @__PURE__ */ React144.createElement(Text, { size: "lg" /* lg */, weight: "bold" /* bold */, className: "title" }, form?.action === "edit" ? stringOverrides?.editModeHeader || "Edit Account" : stringOverrides?.createModeHeader || "Add New Account"), /* @__PURE__ */ React144.createElement("div", { className: "actions" }, /* @__PURE__ */ React144.createElement(
12838
+ /* @__PURE__ */ React145.createElement("div", { className: "Layer__chart-of-accounts__sidebar__header" }, /* @__PURE__ */ React145.createElement(Text, { size: "lg" /* lg */, weight: "bold" /* bold */, className: "title" }, form?.action === "edit" ? stringOverrides?.editModeHeader || "Edit Account" : stringOverrides?.createModeHeader || "Add New Account"), /* @__PURE__ */ React145.createElement("div", { className: "actions" }, /* @__PURE__ */ React145.createElement(
12830
12839
  Button,
12831
12840
  {
12832
12841
  type: "button",
@@ -12835,7 +12844,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12835
12844
  disabled: sendingForm
12836
12845
  },
12837
12846
  stringOverrides?.cancelButton || "Cancel"
12838
- ), apiError && /* @__PURE__ */ React144.createElement(
12847
+ ), apiError && /* @__PURE__ */ React145.createElement(
12839
12848
  RetryButton,
12840
12849
  {
12841
12850
  type: "submit",
@@ -12844,7 +12853,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12844
12853
  disabled: sendingForm
12845
12854
  },
12846
12855
  stringOverrides?.retryButton || "Retry"
12847
- ), !apiError && /* @__PURE__ */ React144.createElement(
12856
+ ), !apiError && /* @__PURE__ */ React145.createElement(
12848
12857
  SubmitButton,
12849
12858
  {
12850
12859
  type: "submit",
@@ -12854,7 +12863,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12854
12863
  },
12855
12864
  stringOverrides?.saveButton || "Save"
12856
12865
  ))),
12857
- apiError && /* @__PURE__ */ React144.createElement(
12866
+ apiError && /* @__PURE__ */ React145.createElement(
12858
12867
  Text,
12859
12868
  {
12860
12869
  size: "sm" /* sm */,
@@ -12862,8 +12871,8 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12862
12871
  },
12863
12872
  apiError
12864
12873
  ),
12865
- entry && /* @__PURE__ */ React144.createElement("div", { className: "Layer__chart-of-accounts__form-edit-entry" }, /* @__PURE__ */ React144.createElement(Text, { weight: "bold" /* bold */ }, entry.name), /* @__PURE__ */ React144.createElement(Text, { weight: "bold" /* bold */ }, "$", centsToDollars(entry.balance || 0))),
12866
- /* @__PURE__ */ React144.createElement("div", { className: "Layer__chart-of-accounts__form" }, /* @__PURE__ */ React144.createElement(InputGroup, { name: "parent", label: stringOverrides?.parentLabel || "Parent", inline: true }, /* @__PURE__ */ React144.createElement(
12874
+ entry && /* @__PURE__ */ React145.createElement("div", { className: "Layer__chart-of-accounts__form-edit-entry" }, /* @__PURE__ */ React145.createElement(Text, { weight: "bold" /* bold */ }, entry.name), /* @__PURE__ */ React145.createElement(Text, { weight: "bold" /* bold */ }, "$", centsToDollars(entry.balance || 0))),
12875
+ /* @__PURE__ */ React145.createElement("div", { className: "Layer__chart-of-accounts__form" }, /* @__PURE__ */ React145.createElement(InputGroup, { name: "parent", label: stringOverrides?.parentLabel || "Parent", inline: true }, /* @__PURE__ */ React145.createElement(
12867
12876
  Select2,
12868
12877
  {
12869
12878
  options: parentOptions,
@@ -12871,7 +12880,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12871
12880
  onChange: (sel) => changeFormData("parent", sel),
12872
12881
  disabled: sendingForm
12873
12882
  }
12874
- )), /* @__PURE__ */ React144.createElement(InputGroup, { name: "name", label: stringOverrides?.nameLabel || "Name", inline: true }, /* @__PURE__ */ React144.createElement(
12883
+ )), /* @__PURE__ */ React145.createElement(InputGroup, { name: "name", label: stringOverrides?.nameLabel || "Name", inline: true }, /* @__PURE__ */ React145.createElement(
12875
12884
  Input,
12876
12885
  {
12877
12886
  name: "name",
@@ -12882,7 +12891,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12882
12891
  disabled: sendingForm,
12883
12892
  onChange: (e) => changeFormData("name", e.target.value)
12884
12893
  }
12885
- )), /* @__PURE__ */ React144.createElement(InputGroup, { name: "type", label: stringOverrides?.typeLabel || "Type", inline: true }, /* @__PURE__ */ React144.createElement(
12894
+ )), /* @__PURE__ */ React145.createElement(InputGroup, { name: "type", label: stringOverrides?.typeLabel || "Type", inline: true }, /* @__PURE__ */ React145.createElement(
12886
12895
  Select2,
12887
12896
  {
12888
12897
  options: LEDGER_ACCOUNT_TYPES,
@@ -12892,7 +12901,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12892
12901
  errorMessage: form?.errors?.find((x) => x.field === "type")?.message,
12893
12902
  disabled: sendingForm || form.action === "edit" || form.data.parent !== void 0
12894
12903
  }
12895
- )), /* @__PURE__ */ React144.createElement(InputGroup, { name: "subType", label: stringOverrides?.subTypeLabel || "Sub-Type", inline: true }, /* @__PURE__ */ React144.createElement(
12904
+ )), /* @__PURE__ */ React145.createElement(InputGroup, { name: "subType", label: stringOverrides?.subTypeLabel || "Sub-Type", inline: true }, /* @__PURE__ */ React145.createElement(
12896
12905
  Select2,
12897
12906
  {
12898
12907
  options: form?.data.type?.value !== void 0 ? LEDGER_ACCOUNT_SUBTYPES_FOR_TYPE[form?.data.type?.value] : LEDGER_ACCOUNT_SUBTYPES,
@@ -12900,7 +12909,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12900
12909
  onChange: (sel) => changeFormData("subType", sel),
12901
12910
  disabled: sendingForm
12902
12911
  }
12903
- )), /* @__PURE__ */ React144.createElement(InputGroup, { name: "normality", label: stringOverrides?.normalityLabel || "Normality", inline: true }, /* @__PURE__ */ React144.createElement(
12912
+ )), /* @__PURE__ */ React145.createElement(InputGroup, { name: "normality", label: stringOverrides?.normalityLabel || "Normality", inline: true }, /* @__PURE__ */ React145.createElement(
12904
12913
  Select2,
12905
12914
  {
12906
12915
  options: NORMALITY_OPTIONS,
@@ -12912,7 +12921,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12912
12921
  onChange: (sel) => changeFormData("normality", sel),
12913
12922
  disabled: sendingForm
12914
12923
  }
12915
- )), /* @__PURE__ */ React144.createElement("div", { className: "actions" }, /* @__PURE__ */ React144.createElement(
12924
+ )), /* @__PURE__ */ React145.createElement("div", { className: "actions" }, /* @__PURE__ */ React145.createElement(
12916
12925
  Button,
12917
12926
  {
12918
12927
  type: "button",
@@ -12921,7 +12930,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12921
12930
  disabled: sendingForm
12922
12931
  },
12923
12932
  stringOverrides?.cancelButton || "Cancel"
12924
- ), apiError && /* @__PURE__ */ React144.createElement(
12933
+ ), apiError && /* @__PURE__ */ React145.createElement(
12925
12934
  RetryButton,
12926
12935
  {
12927
12936
  type: "submit",
@@ -12930,7 +12939,7 @@ var ChartOfAccountsForm = ({ stringOverrides }) => {
12930
12939
  disabled: sendingForm
12931
12940
  },
12932
12941
  stringOverrides?.retryButton || "Retry"
12933
- ), !apiError && /* @__PURE__ */ React144.createElement(
12942
+ ), !apiError && /* @__PURE__ */ React145.createElement(
12934
12943
  SubmitButton,
12935
12944
  {
12936
12945
  type: "submit",
@@ -12948,7 +12957,7 @@ var ChartOfAccountsSidebar = ({
12948
12957
  parentRef: _parentRef,
12949
12958
  stringOverrides
12950
12959
  }) => {
12951
- return /* @__PURE__ */ React145.createElement(ChartOfAccountsForm, { stringOverrides });
12960
+ return /* @__PURE__ */ React146.createElement(ChartOfAccountsForm, { stringOverrides });
12952
12961
  };
12953
12962
 
12954
12963
  // src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
@@ -12965,10 +12974,10 @@ var ChartOfAccountsTable = ({
12965
12974
  const [expandAll, setExpandAll] = useState39();
12966
12975
  let cumulativeIndex = 0;
12967
12976
  const accountsLength = data?.accounts.length ?? 0;
12968
- return /* @__PURE__ */ React146.createElement(
12977
+ return /* @__PURE__ */ React147.createElement(
12969
12978
  Panel,
12970
12979
  {
12971
- sidebar: /* @__PURE__ */ React146.createElement(
12980
+ sidebar: /* @__PURE__ */ React147.createElement(
12972
12981
  ChartOfAccountsSidebar,
12973
12982
  {
12974
12983
  parentRef: containerRef,
@@ -12978,13 +12987,13 @@ var ChartOfAccountsTable = ({
12978
12987
  sidebarIsOpen: Boolean(form),
12979
12988
  parentRef: containerRef
12980
12989
  },
12981
- /* @__PURE__ */ React146.createElement(
12990
+ /* @__PURE__ */ React147.createElement(
12982
12991
  Header,
12983
12992
  {
12984
12993
  className: `Layer__${COMPONENT_NAME5}__header`,
12985
12994
  layout: withDateControl ? "next-line-actions" /* NEXT_LINE_ACTIONS */ : void 0
12986
12995
  },
12987
- /* @__PURE__ */ React146.createElement(
12996
+ /* @__PURE__ */ React147.createElement(
12988
12997
  Heading,
12989
12998
  {
12990
12999
  className: `Layer__${COMPONENT_NAME5}__title`,
@@ -12992,12 +13001,12 @@ var ChartOfAccountsTable = ({
12992
13001
  },
12993
13002
  stringOverrides?.headerText || "Chart of Accounts"
12994
13003
  ),
12995
- /* @__PURE__ */ React146.createElement(
13004
+ /* @__PURE__ */ React147.createElement(
12996
13005
  "div",
12997
13006
  {
12998
13007
  className: `Layer__${COMPONENT_NAME5}__actions Layer__header__actions`
12999
13008
  },
13000
- withDateControl || withExpandAllButton ? /* @__PURE__ */ React146.createElement("div", { className: "Layer__header__actions-col" }, withDateControl && /* @__PURE__ */ React146.createElement(ChartOfAccountsDatePicker, null), withExpandAllButton && /* @__PURE__ */ React146.createElement(
13009
+ withDateControl || withExpandAllButton ? /* @__PURE__ */ React147.createElement("div", { className: "Layer__header__actions-col" }, withDateControl && /* @__PURE__ */ React147.createElement(ChartOfAccountsDatePicker, null), withExpandAllButton && /* @__PURE__ */ React147.createElement(
13001
13010
  Button,
13002
13011
  {
13003
13012
  variant: "secondary" /* secondary */,
@@ -13007,13 +13016,13 @@ var ChartOfAccountsTable = ({
13007
13016
  },
13008
13017
  !expandAll || expandAll === "collapsed" ? "Expand all rows" : "Collapse all rows"
13009
13018
  )) : null,
13010
- /* @__PURE__ */ React146.createElement("div", { className: "Layer__header__actions-col" }, /* @__PURE__ */ React146.createElement(Button, { onClick: () => addAccount(), disabled: isLoading }, stringOverrides?.addAccountButtonText || "Add Account"))
13019
+ /* @__PURE__ */ React147.createElement("div", { className: "Layer__header__actions-col" }, /* @__PURE__ */ React147.createElement(Button, { onClick: () => addAccount(), disabled: isLoading }, stringOverrides?.addAccountButtonText || "Add Account"))
13011
13020
  )
13012
13021
  ),
13013
- /* @__PURE__ */ React146.createElement("table", { className: "Layer__chart-of-accounts__table" }, /* @__PURE__ */ React146.createElement("thead", null, /* @__PURE__ */ React146.createElement("tr", { className: "Layer__table-row--header" }, /* @__PURE__ */ React146.createElement("th", { className: "Layer__table-header Layer__coa__name" }, stringOverrides?.nameColumnHeader || "Name"), /* @__PURE__ */ React146.createElement("th", { className: "Layer__table-header Layer__coa__type" }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React146.createElement("th", { className: "Layer__table-header Layer__coa__subtype Layer__mobile--hidden" }, stringOverrides?.subtypeColumnHeader || "Sub-Type"), /* @__PURE__ */ React146.createElement("th", { className: "Layer__table-header Layer__coa__balance" }, stringOverrides?.balanceColumnHeader || "Balance"), /* @__PURE__ */ React146.createElement("th", { className: "Layer__table-header Layer__coa__actions" }))), /* @__PURE__ */ React146.createElement("tbody", null, !error && data?.accounts.map((account, idx) => {
13022
+ /* @__PURE__ */ React147.createElement("table", { className: "Layer__chart-of-accounts__table" }, /* @__PURE__ */ React147.createElement("thead", null, /* @__PURE__ */ React147.createElement("tr", { className: "Layer__table-row--header" }, /* @__PURE__ */ React147.createElement("th", { className: "Layer__table-header Layer__coa__name" }, stringOverrides?.nameColumnHeader || "Name"), /* @__PURE__ */ React147.createElement("th", { className: "Layer__table-header Layer__coa__type" }, stringOverrides?.typeColumnHeader || "Type"), /* @__PURE__ */ React147.createElement("th", { className: "Layer__table-header Layer__coa__subtype Layer__mobile--hidden" }, stringOverrides?.subtypeColumnHeader || "Sub-Type"), /* @__PURE__ */ React147.createElement("th", { className: "Layer__table-header Layer__coa__balance" }, stringOverrides?.balanceColumnHeader || "Balance"), /* @__PURE__ */ React147.createElement("th", { className: "Layer__table-header Layer__coa__actions" }))), /* @__PURE__ */ React147.createElement("tbody", null, !error && data?.accounts.map((account, idx) => {
13014
13023
  const currentCumulativeIndex = cumulativeIndex;
13015
13024
  cumulativeIndex = (account.sub_accounts?.length || 0) + cumulativeIndex + 1;
13016
- return /* @__PURE__ */ React146.createElement(
13025
+ return /* @__PURE__ */ React147.createElement(
13017
13026
  ChartOfAccountsRow,
13018
13027
  {
13019
13028
  key: account.id,
@@ -13029,7 +13038,7 @@ var ChartOfAccountsTable = ({
13029
13038
  }
13030
13039
  );
13031
13040
  }))),
13032
- error ? /* @__PURE__ */ React146.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React146.createElement(
13041
+ error ? /* @__PURE__ */ React147.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React147.createElement(
13033
13042
  DataState,
13034
13043
  {
13035
13044
  status: "failed" /* failed */,
@@ -13039,8 +13048,8 @@ var ChartOfAccountsTable = ({
13039
13048
  isLoading: isValidating || isLoading
13040
13049
  }
13041
13050
  )) : null,
13042
- (!data || isLoading) && !error ? /* @__PURE__ */ React146.createElement("div", { className: `Layer__${COMPONENT_NAME5}__loader-container` }, /* @__PURE__ */ React146.createElement(Loader2, null)) : null,
13043
- !isLoading && !error && data?.accounts.length === 0 ? /* @__PURE__ */ React146.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React146.createElement(
13051
+ (!data || isLoading) && !error ? /* @__PURE__ */ React147.createElement("div", { className: `Layer__${COMPONENT_NAME5}__loader-container` }, /* @__PURE__ */ React147.createElement(Loader2, null)) : null,
13052
+ !isLoading && !error && data?.accounts.length === 0 ? /* @__PURE__ */ React147.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React147.createElement(
13044
13053
  DataState,
13045
13054
  {
13046
13055
  status: "info" /* info */,
@@ -13054,7 +13063,7 @@ var ChartOfAccountsTable = ({
13054
13063
  };
13055
13064
 
13056
13065
  // src/components/LedgerAccount/LedgerAccountIndex.tsx
13057
- import React153, {
13066
+ import React154, {
13058
13067
  useContext as useContext24,
13059
13068
  useEffect as useEffect37,
13060
13069
  useMemo as useMemo15,
@@ -13062,17 +13071,17 @@ import React153, {
13062
13071
  } from "react";
13063
13072
 
13064
13073
  // src/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails.tsx
13065
- import React151, { useContext as useContext22, useMemo as useMemo14 } from "react";
13074
+ import React152, { useContext as useContext22, useMemo as useMemo14 } from "react";
13066
13075
 
13067
13076
  // src/components/Card/Card.tsx
13068
- import React147 from "react";
13077
+ import React148 from "react";
13069
13078
  import classNames52 from "classnames";
13070
13079
  var Card = ({ children, className }) => {
13071
- return /* @__PURE__ */ React147.createElement("div", { className: classNames52("Layer__card", className) }, children);
13080
+ return /* @__PURE__ */ React148.createElement("div", { className: classNames52("Layer__card", className) }, children);
13072
13081
  };
13073
13082
 
13074
13083
  // src/components/DateTime/DateTime.tsx
13075
- import React148 from "react";
13084
+ import React149 from "react";
13076
13085
  import { parseISO as parseISO13, format as formatTime9 } from "date-fns";
13077
13086
  var DateTime = ({
13078
13087
  value,
@@ -13083,11 +13092,11 @@ var DateTime = ({
13083
13092
  onlyTime
13084
13093
  }) => {
13085
13094
  if (format7) {
13086
- return /* @__PURE__ */ React148.createElement(Text, { className: "Layer__datetime" }, formatTime9(parseISO13(value), format7));
13095
+ return /* @__PURE__ */ React149.createElement(Text, { className: "Layer__datetime" }, formatTime9(parseISO13(value), format7));
13087
13096
  }
13088
13097
  const date = formatTime9(parseISO13(value), dateFormat ?? DATE_FORMAT);
13089
13098
  const time = formatTime9(parseISO13(value), timeFormat ?? TIME_FORMAT);
13090
- return /* @__PURE__ */ React148.createElement(Text, { className: "Layer__datetime" }, !onlyTime && /* @__PURE__ */ React148.createElement(
13099
+ return /* @__PURE__ */ React149.createElement(Text, { className: "Layer__datetime" }, !onlyTime && /* @__PURE__ */ React149.createElement(
13091
13100
  Text,
13092
13101
  {
13093
13102
  as: "span",
@@ -13096,7 +13105,7 @@ var DateTime = ({
13096
13105
  className: "Layer__datetime__date"
13097
13106
  },
13098
13107
  date
13099
- ), !onlyDate && /* @__PURE__ */ React148.createElement(
13108
+ ), !onlyDate && /* @__PURE__ */ React149.createElement(
13100
13109
  Text,
13101
13110
  {
13102
13111
  as: "span",
@@ -13109,7 +13118,7 @@ var DateTime = ({
13109
13118
  };
13110
13119
 
13111
13120
  // src/components/DetailsList/DetailsList.tsx
13112
- import React149 from "react";
13121
+ import React150 from "react";
13113
13122
  import classNames53 from "classnames";
13114
13123
  var DetailsList = ({
13115
13124
  title,
@@ -13117,14 +13126,14 @@ var DetailsList = ({
13117
13126
  className,
13118
13127
  actions
13119
13128
  }) => {
13120
- return /* @__PURE__ */ React149.createElement("div", { className: classNames53("Layer__details-list", className) }, title && /* @__PURE__ */ React149.createElement(Header, null, /* @__PURE__ */ React149.createElement(Heading, { size: "secondary" /* secondary */ }, title), actions && /* @__PURE__ */ React149.createElement("div", { className: "Layer__details-list__actions" }, actions)), /* @__PURE__ */ React149.createElement("ul", { className: "Layer__details-list__list" }, children));
13129
+ return /* @__PURE__ */ React150.createElement("div", { className: classNames53("Layer__details-list", className) }, title && /* @__PURE__ */ React150.createElement(Header, null, /* @__PURE__ */ React150.createElement(Heading, { size: "secondary" /* secondary */ }, title), actions && /* @__PURE__ */ React150.createElement("div", { className: "Layer__details-list__actions" }, actions)), /* @__PURE__ */ React150.createElement("ul", { className: "Layer__details-list__list" }, children));
13121
13130
  };
13122
13131
 
13123
13132
  // src/components/DetailsList/DetailsListItem.tsx
13124
- import React150 from "react";
13133
+ import React151 from "react";
13125
13134
  var renderValue = (value) => {
13126
13135
  if (typeof value === "string") {
13127
- return /* @__PURE__ */ React150.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, value);
13136
+ return /* @__PURE__ */ React151.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, value);
13128
13137
  }
13129
13138
  return value;
13130
13139
  };
@@ -13133,7 +13142,7 @@ var DetailsListItem = ({
13133
13142
  children,
13134
13143
  isLoading
13135
13144
  }) => {
13136
- return /* @__PURE__ */ React150.createElement("li", { className: "Layer__details-list-item" }, /* @__PURE__ */ React150.createElement("label", { className: "Layer__details-list-item__label" }, label), /* @__PURE__ */ React150.createElement("span", { className: "Layer__details-list-item__value" }, isLoading ? /* @__PURE__ */ React150.createElement(SkeletonLoader, null) : renderValue(children)));
13145
+ return /* @__PURE__ */ React151.createElement("li", { className: "Layer__details-list-item" }, /* @__PURE__ */ React151.createElement("label", { className: "Layer__details-list-item__label" }, label), /* @__PURE__ */ React151.createElement("span", { className: "Layer__details-list-item__value" }, isLoading ? /* @__PURE__ */ React151.createElement(SkeletonLoader, null) : renderValue(children)));
13137
13146
  };
13138
13147
 
13139
13148
  // src/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails.tsx
@@ -13141,31 +13150,31 @@ var SourceDetailView = ({ source, stringOverrides }) => {
13141
13150
  switch (source.type) {
13142
13151
  case "Transaction_Ledger_Entry_Source": {
13143
13152
  const transactionSource = source;
13144
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.accountNameLabel || "Account name" }, transactionSource.account_name), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.dateLabel || "Date" }, /* @__PURE__ */ React151.createElement(DateTime, { value: transactionSource.date })), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(transactionSource.amount)}`), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.directionLabel || "Direction" }, transactionSource.direction), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.counterpartyLabel || "Counterparty" }, transactionSource.counterparty));
13153
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.accountNameLabel || "Account name" }, transactionSource.account_name), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.dateLabel || "Date" }, /* @__PURE__ */ React152.createElement(DateTime, { value: transactionSource.date })), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(transactionSource.amount)}`), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.directionLabel || "Direction" }, transactionSource.direction), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.counterpartyLabel || "Counterparty" }, transactionSource.counterparty));
13145
13154
  }
13146
13155
  case "Invoice_Ledger_Entry_Source": {
13147
13156
  const invoiceSource = source;
13148
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.invoiceNumberLabel || "Invoice number" }, invoiceSource.invoice_number), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.recipientNameLabel || "Recipient name" }, invoiceSource.recipient_name), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.dateLabel || "Date" }, /* @__PURE__ */ React151.createElement(DateTime, { value: invoiceSource.date })), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(invoiceSource.amount)}`));
13157
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.invoiceNumberLabel || "Invoice number" }, invoiceSource.invoice_number), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.recipientNameLabel || "Recipient name" }, invoiceSource.recipient_name), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.dateLabel || "Date" }, /* @__PURE__ */ React152.createElement(DateTime, { value: invoiceSource.date })), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(invoiceSource.amount)}`));
13149
13158
  }
13150
13159
  case "Manual_Ledger_Entry_Source": {
13151
13160
  const manualSource = source;
13152
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.memoLabel || "Memo" }, manualSource.memo), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.createdByLabel || "Created by" }, manualSource.created_by));
13161
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.memoLabel || "Memo" }, manualSource.memo), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.createdByLabel || "Created by" }, manualSource.created_by));
13153
13162
  }
13154
13163
  case "Invoice_Payment_Ledger_Entry_Source": {
13155
13164
  const invoicePaymentSource = source;
13156
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.invoiceNumberLabel || "Invoice number" }, invoicePaymentSource.invoice_number), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(invoicePaymentSource.amount)}`));
13165
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.invoiceNumberLabel || "Invoice number" }, invoicePaymentSource.invoice_number), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(invoicePaymentSource.amount)}`));
13157
13166
  }
13158
13167
  case "Refund_Ledger_Entry_Source": {
13159
13168
  const refundSource = source;
13160
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.recipientNameLabel || "Recipient name" }, refundSource.recipient_name));
13169
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.recipientNameLabel || "Recipient name" }, refundSource.recipient_name));
13161
13170
  }
13162
13171
  case "Opening_Balance_Ledger_Entry_Source": {
13163
13172
  const openingBalanceSource = source;
13164
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.accountNameLabel || "Account name" }, openingBalanceSource.account_name));
13173
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.accountNameLabel || "Account name" }, openingBalanceSource.account_name));
13165
13174
  }
13166
13175
  case "Payout_Ledger_Entry_Source": {
13167
13176
  const payoutSource = source;
13168
- return /* @__PURE__ */ React151.createElement(React151.Fragment, null, /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(payoutSource.paid_out_amount)}`), /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.processorLabel || "Processor" }, payoutSource.processor));
13177
+ return /* @__PURE__ */ React152.createElement(React152.Fragment, null, /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.amountLabel || "Amount" }, `$${centsToDollars(payoutSource.paid_out_amount)}`), /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.processorLabel || "Processor" }, payoutSource.processor));
13169
13178
  }
13170
13179
  default:
13171
13180
  return null;
@@ -13185,14 +13194,14 @@ var LedgerAccountEntryDetails = ({ stringOverrides }) => {
13185
13194
  });
13186
13195
  return { totalDebit: totalDebit2, totalCredit: totalCredit2 };
13187
13196
  }, [entryData]);
13188
- return /* @__PURE__ */ React151.createElement("div", { className: "Layer__ledger-account__entry-details" }, /* @__PURE__ */ React151.createElement("div", { className: "Layer__ledger-account__entry-details__back-btn" }, /* @__PURE__ */ React151.createElement(BackButton, { onClick: () => closeSelectedEntry() }), /* @__PURE__ */ React151.createElement("div", { className: "Layer__ledger-account__entry-details__title-container" }, /* @__PURE__ */ React151.createElement(Text, { weight: "bold" /* bold */ }, stringOverrides?.title || "Transaction details"))), /* @__PURE__ */ React151.createElement(
13197
+ return /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account__entry-details" }, /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account__entry-details__back-btn" }, /* @__PURE__ */ React152.createElement(BackButton, { onClick: () => closeSelectedEntry() }), /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account__entry-details__title-container" }, /* @__PURE__ */ React152.createElement(Text, { weight: "bold" /* bold */ }, stringOverrides?.title || "Transaction details"))), /* @__PURE__ */ React152.createElement(
13189
13198
  DetailsList,
13190
13199
  {
13191
13200
  title: stringOverrides?.transactionSource?.header || "Transaction source",
13192
- actions: /* @__PURE__ */ React151.createElement(
13201
+ actions: /* @__PURE__ */ React152.createElement(
13193
13202
  Button,
13194
13203
  {
13195
- rightIcon: /* @__PURE__ */ React151.createElement(X_default, null),
13204
+ rightIcon: /* @__PURE__ */ React152.createElement(X_default, null),
13196
13205
  iconOnly: true,
13197
13206
  onClick: closeSelectedEntry,
13198
13207
  variant: "secondary" /* secondary */,
@@ -13200,56 +13209,56 @@ var LedgerAccountEntryDetails = ({ stringOverrides }) => {
13200
13209
  }
13201
13210
  )
13202
13211
  },
13203
- /* @__PURE__ */ React151.createElement(
13212
+ /* @__PURE__ */ React152.createElement(
13204
13213
  DetailsListItem,
13205
13214
  {
13206
13215
  label: stringOverrides?.transactionSource?.details?.sourceLabel || "Source",
13207
13216
  isLoading: isLoadingEntry
13208
13217
  },
13209
- /* @__PURE__ */ React151.createElement(Badge, null, entryData?.source?.entity_name)
13218
+ /* @__PURE__ */ React152.createElement(Badge, null, entryData?.source?.entity_name)
13210
13219
  ),
13211
- entryData?.source?.display_description && /* @__PURE__ */ React151.createElement(SourceDetailView, { source: entryData?.source })
13212
- ), /* @__PURE__ */ React151.createElement(
13220
+ entryData?.source?.display_description && /* @__PURE__ */ React152.createElement(SourceDetailView, { source: entryData?.source })
13221
+ ), /* @__PURE__ */ React152.createElement(
13213
13222
  DetailsList,
13214
13223
  {
13215
13224
  title: stringOverrides?.journalEntry?.header ? stringOverrides?.journalEntry?.header(entryData?.id.substring(0, 5)) : `Journal Entry ${entryData?.id.substring(0, 5)}`,
13216
13225
  className: "Layer__border-top"
13217
13226
  },
13218
- /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.entryTypeLabel || "Entry type", isLoading: isLoadingEntry }, humanizeEnum(entryData?.entry_type ?? "")),
13219
- /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.dateLabel || "Date", isLoading: isLoadingEntry }, entryData?.entry_at && /* @__PURE__ */ React151.createElement(DateTime, { value: entryData?.entry_at })),
13220
- /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.creationDateLabel || "Creation date", isLoading: isLoadingEntry }, entryData?.date && /* @__PURE__ */ React151.createElement(DateTime, { value: entryData?.date })),
13221
- entryData?.reversal_id && /* @__PURE__ */ React151.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.reversalLabel || "Reversal", isLoading: isLoadingEntry }, entryData?.reversal_id.substring(0, 5))
13222
- ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React151.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React151.createElement(Card, null, /* @__PURE__ */ React151.createElement(
13227
+ /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.entryTypeLabel || "Entry type", isLoading: isLoadingEntry }, humanizeEnum(entryData?.entry_type ?? "")),
13228
+ /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.dateLabel || "Date", isLoading: isLoadingEntry }, entryData?.entry_at && /* @__PURE__ */ React152.createElement(DateTime, { value: entryData?.entry_at })),
13229
+ /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.creationDateLabel || "Creation date", isLoading: isLoadingEntry }, entryData?.date && /* @__PURE__ */ React152.createElement(DateTime, { value: entryData?.date })),
13230
+ entryData?.reversal_id && /* @__PURE__ */ React152.createElement(DetailsListItem, { label: stringOverrides?.journalEntry?.details?.reversalLabel || "Reversal", isLoading: isLoadingEntry }, entryData?.reversal_id.substring(0, 5))
13231
+ ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React152.createElement(Card, null, /* @__PURE__ */ React152.createElement(
13223
13232
  Table,
13224
13233
  {
13225
13234
  componentName: "ledger-account__entry-details",
13226
13235
  borderCollapse: "collapse"
13227
13236
  },
13228
- /* @__PURE__ */ React151.createElement(TableHead, null, /* @__PURE__ */ React151.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React151.createElement(TableCell, null, stringOverrides?.lineItemsTable?.lineItemsColumnHeader || "Line items"), /* @__PURE__ */ React151.createElement(TableCell, null, stringOverrides?.lineItemsTable?.debitColumnHeader || "Debit"), /* @__PURE__ */ React151.createElement(TableCell, null, stringOverrides?.lineItemsTable?.creditColumnHeader || "Credit"))),
13229
- /* @__PURE__ */ React151.createElement(TableBody, null, entryData?.line_items?.map((item, index) => /* @__PURE__ */ React151.createElement(
13237
+ /* @__PURE__ */ React152.createElement(TableHead, null, /* @__PURE__ */ React152.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React152.createElement(TableCell, null, stringOverrides?.lineItemsTable?.lineItemsColumnHeader || "Line items"), /* @__PURE__ */ React152.createElement(TableCell, null, stringOverrides?.lineItemsTable?.debitColumnHeader || "Debit"), /* @__PURE__ */ React152.createElement(TableCell, null, stringOverrides?.lineItemsTable?.creditColumnHeader || "Credit"))),
13238
+ /* @__PURE__ */ React152.createElement(TableBody, null, entryData?.line_items?.map((item, index) => /* @__PURE__ */ React152.createElement(
13230
13239
  TableRow,
13231
13240
  {
13232
13241
  key: `ledger-line-item-${index}`,
13233
13242
  rowKey: `ledger-line-item-${index}`
13234
13243
  },
13235
- /* @__PURE__ */ React151.createElement(TableCell, null, item.account?.name || ""),
13236
- /* @__PURE__ */ React151.createElement(TableCell, null, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React151.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
13237
- /* @__PURE__ */ React151.createElement(TableCell, null, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React151.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
13238
- )), /* @__PURE__ */ React151.createElement(
13244
+ /* @__PURE__ */ React152.createElement(TableCell, null, item.account?.name || ""),
13245
+ /* @__PURE__ */ React152.createElement(TableCell, null, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React152.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
13246
+ /* @__PURE__ */ React152.createElement(TableCell, null, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React152.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
13247
+ )), /* @__PURE__ */ React152.createElement(
13239
13248
  TableRow,
13240
13249
  {
13241
13250
  rowKey: "ledger-line-item-summation",
13242
13251
  variant: "summation"
13243
13252
  },
13244
- /* @__PURE__ */ React151.createElement(TableCell, { primary: true }, stringOverrides?.lineItemsTable?.totalRowHeader || "Total"),
13245
- /* @__PURE__ */ React151.createElement(TableCell, { isCurrency: true, primary: true }, totalDebit || 0),
13246
- /* @__PURE__ */ React151.createElement(TableCell, { isCurrency: true, primary: true }, totalCredit || 0)
13253
+ /* @__PURE__ */ React152.createElement(TableCell, { primary: true }, stringOverrides?.lineItemsTable?.totalRowHeader || "Total"),
13254
+ /* @__PURE__ */ React152.createElement(TableCell, { isCurrency: true, primary: true }, totalDebit || 0),
13255
+ /* @__PURE__ */ React152.createElement(TableCell, { isCurrency: true, primary: true }, totalCredit || 0)
13247
13256
  ))
13248
13257
  ))) : null);
13249
13258
  };
13250
13259
 
13251
13260
  // src/components/LedgerAccount/LedgerAccountRow.tsx
13252
- import React152, { useContext as useContext23, useEffect as useEffect36, useState as useState40 } from "react";
13261
+ import React153, { useContext as useContext23, useEffect as useEffect36, useState as useState40 } from "react";
13253
13262
  import classNames54 from "classnames";
13254
13263
  import { parseISO as parseISO14, format as formatTime10 } from "date-fns";
13255
13264
  var LedgerAccountRow = ({
@@ -13271,7 +13280,7 @@ var LedgerAccountRow = ({
13271
13280
  }
13272
13281
  }, []);
13273
13282
  if (view === "tablet") {
13274
- return /* @__PURE__ */ React152.createElement(
13283
+ return /* @__PURE__ */ React153.createElement(
13275
13284
  "tr",
13276
13285
  {
13277
13286
  className: classNames54(
@@ -13290,21 +13299,21 @@ var LedgerAccountRow = ({
13290
13299
  }
13291
13300
  }
13292
13301
  },
13293
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React152.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React152.createElement(
13302
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React153.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React153.createElement(
13294
13303
  Text,
13295
13304
  {
13296
13305
  weight: "normal" /* normal */,
13297
13306
  className: "Layer__ledger_account-table__journal-id"
13298
13307
  },
13299
13308
  row.entry_id.substring(0, 5)
13300
- )), /* @__PURE__ */ React152.createElement(Text, null, row.source?.display_description ?? ""))),
13301
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13302
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13303
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
13309
+ )), /* @__PURE__ */ React153.createElement(Text, null, row.source?.display_description ?? ""))),
13310
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13311
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13312
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
13304
13313
  );
13305
13314
  }
13306
13315
  if (view === "mobile") {
13307
- return /* @__PURE__ */ React152.createElement(
13316
+ return /* @__PURE__ */ React153.createElement(
13308
13317
  "tr",
13309
13318
  {
13310
13319
  className: classNames54(
@@ -13323,17 +13332,17 @@ var LedgerAccountRow = ({
13323
13332
  }
13324
13333
  }
13325
13334
  },
13326
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React152.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React152.createElement(
13335
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React153.createElement(Text, null, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React153.createElement(
13327
13336
  Text,
13328
13337
  {
13329
13338
  weight: "normal" /* normal */,
13330
13339
  className: "Layer__ledger_account-table__journal-id"
13331
13340
  },
13332
13341
  row.entry_id.substring(0, 5)
13333
- )), /* @__PURE__ */ React152.createElement(Text, null, row.source?.display_description ?? ""), /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger_account-table__balances-mobile" }, /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Debit"), /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, " ", row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Credit"), /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React152.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Running balance"), /* @__PURE__ */ React152.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, `$${centsToDollars(row.running_balance)}`)))))
13342
+ )), /* @__PURE__ */ React153.createElement(Text, null, row.source?.display_description ?? ""), /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger_account-table__balances-mobile" }, /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Debit"), /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, " ", row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Credit"), /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Running balance"), /* @__PURE__ */ React153.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, `$${centsToDollars(row.running_balance)}`)))))
13334
13343
  );
13335
13344
  }
13336
- return /* @__PURE__ */ React152.createElement(
13345
+ return /* @__PURE__ */ React153.createElement(
13337
13346
  "tr",
13338
13347
  {
13339
13348
  className: classNames54(
@@ -13352,12 +13361,12 @@ var LedgerAccountRow = ({
13352
13361
  }
13353
13362
  }
13354
13363
  },
13355
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT))),
13356
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content" }, row.entry_id.substring(0, 5))),
13357
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content" }, row.source?.display_description ?? "")),
13358
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13359
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13360
- /* @__PURE__ */ React152.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React152.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
13364
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime10(parseISO14(row.date), DATE_FORMAT))),
13365
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, row.entry_id.substring(0, 5))),
13366
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, row.source?.display_description ?? "")),
13367
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13368
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
13369
+ /* @__PURE__ */ React153.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
13361
13370
  );
13362
13371
  };
13363
13372
 
@@ -13409,10 +13418,10 @@ var LedgerAccount = ({
13409
13418
  setAccountId(void 0);
13410
13419
  closeSelectedEntry();
13411
13420
  };
13412
- return /* @__PURE__ */ React153.createElement(
13421
+ return /* @__PURE__ */ React154.createElement(
13413
13422
  Panel,
13414
13423
  {
13415
- sidebar: /* @__PURE__ */ React153.createElement(
13424
+ sidebar: /* @__PURE__ */ React154.createElement(
13416
13425
  LedgerAccountEntryDetails,
13417
13426
  {
13418
13427
  stringOverrides: stringOverrides?.ledgerEntryDetail
@@ -13422,21 +13431,21 @@ var LedgerAccount = ({
13422
13431
  parentRef: containerRef,
13423
13432
  className: "Layer__ledger-account__panel"
13424
13433
  },
13425
- /* @__PURE__ */ React153.createElement("div", { className: baseClassName }, /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account__header" }, /* @__PURE__ */ React153.createElement(BackButton, { onClick: close }), /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account__title-container" }, /* @__PURE__ */ React153.createElement(
13434
+ /* @__PURE__ */ React154.createElement("div", { className: baseClassName }, /* @__PURE__ */ React154.createElement("div", { className: "Layer__ledger-account__header" }, /* @__PURE__ */ React154.createElement(BackButton, { onClick: close }), /* @__PURE__ */ React154.createElement("div", { className: "Layer__ledger-account__title-container" }, /* @__PURE__ */ React154.createElement(
13426
13435
  Text,
13427
13436
  {
13428
13437
  weight: "bold" /* bold */,
13429
13438
  className: "Layer__ledger-account__title"
13430
13439
  },
13431
13440
  entry?.name ?? ""
13432
- ), /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account__balance-container" }, /* @__PURE__ */ React153.createElement(
13441
+ ), /* @__PURE__ */ React154.createElement("div", { className: "Layer__ledger-account__balance-container" }, /* @__PURE__ */ React154.createElement(
13433
13442
  Text,
13434
13443
  {
13435
13444
  className: "Layer__ledger-account__balance-label",
13436
13445
  size: "sm" /* sm */
13437
13446
  },
13438
13447
  "Current balance"
13439
- ), /* @__PURE__ */ React153.createElement(
13448
+ ), /* @__PURE__ */ React154.createElement(
13440
13449
  Text,
13441
13450
  {
13442
13451
  className: "Layer__ledger-account__balance-value",
@@ -13444,7 +13453,7 @@ var LedgerAccount = ({
13444
13453
  },
13445
13454
  "$",
13446
13455
  centsToDollars(entry?.balance || 0)
13447
- )))), /* @__PURE__ */ React153.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__ledger-account-table" }, /* @__PURE__ */ React153.createElement("thead", null, /* @__PURE__ */ React153.createElement("tr", null, view !== "desktop" && /* @__PURE__ */ React153.createElement("th", null), view === "desktop" && /* @__PURE__ */ React153.createElement(React153.Fragment, null, /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.dateColumnHeader || "Date"), /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.journalIdColumnHeader || "Journal id #"), /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.sourceColumnHeader || "Source")), view !== "mobile" && /* @__PURE__ */ React153.createElement(React153.Fragment, null, /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.debitColumnHeader || "Debit"), /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.creditColumnHeader || "Credit"), /* @__PURE__ */ React153.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.runningBalanceColumnHeader || "Running balance")))), /* @__PURE__ */ React153.createElement("tbody", null, data?.map((x, index) => /* @__PURE__ */ React153.createElement(
13456
+ )))), /* @__PURE__ */ React154.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__ledger-account-table" }, /* @__PURE__ */ React154.createElement("thead", null, /* @__PURE__ */ React154.createElement("tr", null, view !== "desktop" && /* @__PURE__ */ React154.createElement("th", null), view === "desktop" && /* @__PURE__ */ React154.createElement(React154.Fragment, null, /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.dateColumnHeader || "Date"), /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.journalIdColumnHeader || "Journal id #"), /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header" }, stringOverrides?.ledgerEntriesTable?.sourceColumnHeader || "Source")), view !== "mobile" && /* @__PURE__ */ React154.createElement(React154.Fragment, null, /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.debitColumnHeader || "Debit"), /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.creditColumnHeader || "Credit"), /* @__PURE__ */ React154.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.ledgerEntriesTable?.runningBalanceColumnHeader || "Running balance")))), /* @__PURE__ */ React154.createElement("tbody", null, data?.map((x, index) => /* @__PURE__ */ React154.createElement(
13448
13457
  LedgerAccountRow,
13449
13458
  {
13450
13459
  key: x.id,
@@ -13453,7 +13462,7 @@ var LedgerAccount = ({
13453
13462
  initialLoad,
13454
13463
  view
13455
13464
  }
13456
- )))), data && /* @__PURE__ */ React153.createElement("div", { className: "Layer__ledger-account__pagination" }, /* @__PURE__ */ React153.createElement(
13465
+ )))), data && /* @__PURE__ */ React154.createElement("div", { className: "Layer__ledger-account__pagination" }, /* @__PURE__ */ React154.createElement(
13457
13466
  Pagination,
13458
13467
  {
13459
13468
  currentPage,
@@ -13461,7 +13470,7 @@ var LedgerAccount = ({
13461
13470
  pageSize,
13462
13471
  onPageChange: (page) => setCurrentPage(page)
13463
13472
  }
13464
- )), error ? /* @__PURE__ */ React153.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React153.createElement(
13473
+ )), error ? /* @__PURE__ */ React154.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React154.createElement(
13465
13474
  DataState,
13466
13475
  {
13467
13476
  status: "failed" /* failed */,
@@ -13470,7 +13479,7 @@ var LedgerAccount = ({
13470
13479
  onRefresh: () => refetch(),
13471
13480
  isLoading: isValidating || isLoading
13472
13481
  }
13473
- )) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React153.createElement("div", { className: `Layer__ledger-account__loader-container` }, /* @__PURE__ */ React153.createElement(Loader2, null)) : null, !isLoading && !error && data?.length === 0 ? /* @__PURE__ */ React153.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React153.createElement(
13482
+ )) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React154.createElement("div", { className: `Layer__ledger-account__loader-container` }, /* @__PURE__ */ React154.createElement(Loader2, null)) : null, !isLoading && !error && data?.length === 0 ? /* @__PURE__ */ React154.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React154.createElement(
13474
13483
  DataState,
13475
13484
  {
13476
13485
  status: "info" /* info */,
@@ -13488,7 +13497,7 @@ var ChartOfAccounts = (props) => {
13488
13497
  withDates: props.withDateControl
13489
13498
  });
13490
13499
  const ledgerAccountsContextData = useLedgerAccounts();
13491
- return /* @__PURE__ */ React154.createElement(ChartOfAccountsContext.Provider, { value: chartOfAccountsContextData }, /* @__PURE__ */ React154.createElement(LedgerAccountsContext.Provider, { value: ledgerAccountsContextData }, /* @__PURE__ */ React154.createElement(ChartOfAccountsContent, { ...props })));
13500
+ return /* @__PURE__ */ React155.createElement(ChartOfAccountsContext.Provider, { value: chartOfAccountsContextData }, /* @__PURE__ */ React155.createElement(LedgerAccountsContext.Provider, { value: ledgerAccountsContextData }, /* @__PURE__ */ React155.createElement(ChartOfAccountsContent, { ...props })));
13492
13501
  };
13493
13502
  var ChartOfAccountsContent = ({
13494
13503
  asWidget,
@@ -13509,7 +13518,7 @@ var ChartOfAccountsContent = ({
13509
13518
  }
13510
13519
  }
13511
13520
  });
13512
- return /* @__PURE__ */ React154.createElement(Container, { name: "chart-of-accounts", ref: containerRef, asWidget }, accountId ? /* @__PURE__ */ React154.createElement(LedgerAccount, { view, containerRef, stringOverrides: stringOverrides?.ledgerAccount }) : /* @__PURE__ */ React154.createElement(
13521
+ return /* @__PURE__ */ React155.createElement(Container, { name: "chart-of-accounts", ref: containerRef, asWidget }, accountId ? /* @__PURE__ */ React155.createElement(LedgerAccount, { view, containerRef, stringOverrides: stringOverrides?.ledgerAccount }) : /* @__PURE__ */ React155.createElement(
13513
13522
  ChartOfAccountsTable,
13514
13523
  {
13515
13524
  asWidget,
@@ -13523,7 +13532,7 @@ var ChartOfAccountsContent = ({
13523
13532
  };
13524
13533
 
13525
13534
  // src/components/Journal/Journal.tsx
13526
- import React161, { useState as useState46 } from "react";
13535
+ import React162, { useState as useState46 } from "react";
13527
13536
 
13528
13537
  // src/contexts/JournalContext/JournalContext.tsx
13529
13538
  import { createContext as createContext12 } from "react";
@@ -13857,10 +13866,10 @@ var useJournal = () => {
13857
13866
  };
13858
13867
 
13859
13868
  // src/components/JournalTable/JournalTable.tsx
13860
- import React160, { useContext as useContext31, useMemo as useMemo17, useState as useState45 } from "react";
13869
+ import React161, { useContext as useContext31, useMemo as useMemo17, useState as useState45 } from "react";
13861
13870
 
13862
13871
  // src/components/JournalRow/JournalRow.tsx
13863
- import React155, { useContext as useContext26, useEffect as useEffect39, useState as useState44 } from "react";
13872
+ import React156, { useContext as useContext26, useEffect as useEffect39, useState as useState44 } from "react";
13864
13873
  import classNames56 from "classnames";
13865
13874
  import { parseISO as parseISO15, format as formatTime11 } from "date-fns";
13866
13875
  var INDENTATION2 = 24;
@@ -13936,7 +13945,7 @@ var JournalRow = ({
13936
13945
  }
13937
13946
  }, []);
13938
13947
  if ("line_items" in row) {
13939
- return /* @__PURE__ */ React155.createElement(React155.Fragment, null, /* @__PURE__ */ React155.createElement(
13948
+ return /* @__PURE__ */ React156.createElement(React156.Fragment, null, /* @__PURE__ */ React156.createElement(
13940
13949
  "tr",
13941
13950
  {
13942
13951
  className: baseClass,
@@ -13950,7 +13959,7 @@ var JournalRow = ({
13950
13959
  }
13951
13960
  }
13952
13961
  },
13953
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell Layer__journal__arrow" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React155.createElement(
13962
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell Layer__journal__arrow" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React156.createElement(
13954
13963
  "span",
13955
13964
  {
13956
13965
  className: "Layer__table-cell-content-indentation",
@@ -13963,7 +13972,7 @@ var JournalRow = ({
13963
13972
  setIsOpen(!isOpen);
13964
13973
  }
13965
13974
  },
13966
- row.line_items && row.line_items.length > 0 && /* @__PURE__ */ React155.createElement(
13975
+ row.line_items && row.line_items.length > 0 && /* @__PURE__ */ React156.createElement(
13967
13976
  ChevronDownFill_default,
13968
13977
  {
13969
13978
  size: 16,
@@ -13974,21 +13983,21 @@ var JournalRow = ({
13974
13983
  }
13975
13984
  )
13976
13985
  ))),
13977
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content" }, row.id.substring(0, 5))),
13978
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO15(row.date), DATE_FORMAT))),
13979
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content" }, humanizeEnum(row.entry_type))),
13980
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content" }, `(${row.line_items.length})`)),
13981
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, "$", centsToDollars(
13986
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, row.id.substring(0, 5))),
13987
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO15(row.date), DATE_FORMAT))),
13988
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, humanizeEnum(row.entry_type))),
13989
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, `(${row.line_items.length})`)),
13990
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, "$", centsToDollars(
13982
13991
  Math.abs(
13983
13992
  row.line_items.filter((item) => item.direction === "DEBIT").map((item) => item.amount).reduce((a, b) => a + b, 0)
13984
13993
  )
13985
13994
  ))),
13986
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, "$", centsToDollars(
13995
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, "$", centsToDollars(
13987
13996
  Math.abs(
13988
13997
  row.line_items.filter((item) => item.direction === "CREDIT").map((item) => item.amount).reduce((a, b) => a + b, 0)
13989
13998
  )
13990
13999
  )))
13991
- ), (row.line_items || []).map((lineItem, idx) => /* @__PURE__ */ React155.createElement(
14000
+ ), (row.line_items || []).map((lineItem, idx) => /* @__PURE__ */ React156.createElement(
13992
14001
  JournalRow,
13993
14002
  {
13994
14003
  key: `${row.id}-${idx}`,
@@ -14003,18 +14012,18 @@ var JournalRow = ({
14003
14012
  }
14004
14013
  )));
14005
14014
  }
14006
- return /* @__PURE__ */ React155.createElement(
14015
+ return /* @__PURE__ */ React156.createElement(
14007
14016
  "tr",
14008
14017
  {
14009
14018
  className: journalEntryLineClass,
14010
14019
  style: { transitionDelay: `${15 * index}ms` }
14011
14020
  },
14012
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content", style })),
14013
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-hidden" }, rowId(row).substring(0, 5)))),
14014
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }),
14015
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }),
14016
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React155.createElement("span", { className: "Layer__table-cell-content", style }, accountName(row))),
14017
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, row.direction === "DEBIT" && /* @__PURE__ */ React155.createElement(
14021
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content", style })),
14022
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content", style }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-hidden" }, rowId(row).substring(0, 5)))),
14023
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }),
14024
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }),
14025
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content", style }, accountName(row))),
14026
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, row.direction === "DEBIT" && /* @__PURE__ */ React156.createElement(
14018
14027
  "span",
14019
14028
  {
14020
14029
  className: "Layer__table-cell-content Layer__table-cell--amount",
@@ -14023,7 +14032,7 @@ var JournalRow = ({
14023
14032
  "$",
14024
14033
  centsToDollars(Math.abs(row.amount))
14025
14034
  )),
14026
- /* @__PURE__ */ React155.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, row.direction === "CREDIT" && /* @__PURE__ */ React155.createElement(
14035
+ /* @__PURE__ */ React156.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, row.direction === "CREDIT" && /* @__PURE__ */ React156.createElement(
14027
14036
  "span",
14028
14037
  {
14029
14038
  className: "Layer__table-cell-content Layer__table-cell--amount",
@@ -14036,10 +14045,10 @@ var JournalRow = ({
14036
14045
  };
14037
14046
 
14038
14047
  // src/components/JournalSidebar/JournalSidebar.tsx
14039
- import React159, { useContext as useContext30 } from "react";
14048
+ import React160, { useContext as useContext30 } from "react";
14040
14049
 
14041
14050
  // src/components/JournalEntryDetails/JournalEntryDetails.tsx
14042
- import React156, { useContext as useContext27, useMemo as useMemo16 } from "react";
14051
+ import React157, { useContext as useContext27, useMemo as useMemo16 } from "react";
14043
14052
  var JournalEntryDetails = () => {
14044
14053
  const {
14045
14054
  data,
@@ -14054,14 +14063,14 @@ var JournalEntryDetails = () => {
14054
14063
  }
14055
14064
  return;
14056
14065
  }, [data, selectedEntryId]);
14057
- return /* @__PURE__ */ React156.createElement("div", { className: "Layer__journal__entry-details" }, /* @__PURE__ */ React156.createElement(
14066
+ return /* @__PURE__ */ React157.createElement("div", { className: "Layer__journal__entry-details" }, /* @__PURE__ */ React157.createElement(
14058
14067
  DetailsList,
14059
14068
  {
14060
14069
  title: "Transaction source",
14061
- actions: /* @__PURE__ */ React156.createElement(
14070
+ actions: /* @__PURE__ */ React157.createElement(
14062
14071
  Button,
14063
14072
  {
14064
- rightIcon: /* @__PURE__ */ React156.createElement(X_default, null),
14073
+ rightIcon: /* @__PURE__ */ React157.createElement(X_default, null),
14065
14074
  iconOnly: true,
14066
14075
  onClick: closeSelectedEntry,
14067
14076
  className: "Layer__details-list__close-btn",
@@ -14069,54 +14078,54 @@ var JournalEntryDetails = () => {
14069
14078
  }
14070
14079
  )
14071
14080
  },
14072
- /* @__PURE__ */ React156.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React156.createElement(Badge, null, entry?.source?.entity_name)),
14073
- entry?.source?.display_description && /* @__PURE__ */ React156.createElement(SourceDetailView, { source: entry?.source })
14074
- ), /* @__PURE__ */ React156.createElement(
14081
+ /* @__PURE__ */ React157.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React157.createElement(Badge, null, entry?.source?.entity_name)),
14082
+ entry?.source?.display_description && /* @__PURE__ */ React157.createElement(SourceDetailView, { source: entry?.source })
14083
+ ), /* @__PURE__ */ React157.createElement(
14075
14084
  DetailsList,
14076
14085
  {
14077
14086
  title: `Journal Entry ${entry?.id.substring(0, 5)}`,
14078
14087
  className: "Layer__border-top"
14079
14088
  },
14080
- /* @__PURE__ */ React156.createElement(DetailsListItem, { label: "Entry type", isLoading: isLoadingEntry }, humanizeEnum(entry?.entry_type ?? "")),
14081
- /* @__PURE__ */ React156.createElement(DetailsListItem, { label: "Date", isLoading: isLoadingEntry }, entry?.entry_at && /* @__PURE__ */ React156.createElement(DateTime, { value: entry?.entry_at })),
14082
- /* @__PURE__ */ React156.createElement(DetailsListItem, { label: "Creation date", isLoading: isLoadingEntry }, entry?.date && /* @__PURE__ */ React156.createElement(DateTime, { value: entry?.date })),
14083
- entry?.reversal_id && /* @__PURE__ */ React156.createElement(DetailsListItem, { label: "Reversal", isLoading: isLoadingEntry }, "Journal Entry #", entry?.reversal_id)
14084
- ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React156.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React156.createElement(Card, null, /* @__PURE__ */ React156.createElement(
14089
+ /* @__PURE__ */ React157.createElement(DetailsListItem, { label: "Entry type", isLoading: isLoadingEntry }, humanizeEnum(entry?.entry_type ?? "")),
14090
+ /* @__PURE__ */ React157.createElement(DetailsListItem, { label: "Date", isLoading: isLoadingEntry }, entry?.entry_at && /* @__PURE__ */ React157.createElement(DateTime, { value: entry?.entry_at })),
14091
+ /* @__PURE__ */ React157.createElement(DetailsListItem, { label: "Creation date", isLoading: isLoadingEntry }, entry?.date && /* @__PURE__ */ React157.createElement(DateTime, { value: entry?.date })),
14092
+ entry?.reversal_id && /* @__PURE__ */ React157.createElement(DetailsListItem, { label: "Reversal", isLoading: isLoadingEntry }, "Journal Entry #", entry?.reversal_id)
14093
+ ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React157.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React157.createElement(Card, null, /* @__PURE__ */ React157.createElement(
14085
14094
  Table,
14086
14095
  {
14087
14096
  componentName: "ledger-account__entry-details",
14088
14097
  borderCollapse: "collapse"
14089
14098
  },
14090
- /* @__PURE__ */ React156.createElement(TableHead, null, /* @__PURE__ */ React156.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React156.createElement(TableCell, null, "Line items"), [...Array(3)].map((_, index) => /* @__PURE__ */ React156.createElement(TableCell, { key: `ledger-empty-cell-${index}` })), /* @__PURE__ */ React156.createElement(TableCell, null, "Debit"), /* @__PURE__ */ React156.createElement(TableCell, null, "Credit"))),
14091
- /* @__PURE__ */ React156.createElement(TableBody, null, entry?.line_items?.map((item, index) => /* @__PURE__ */ React156.createElement(
14099
+ /* @__PURE__ */ React157.createElement(TableHead, null, /* @__PURE__ */ React157.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React157.createElement(TableCell, null, "Line items"), [...Array(3)].map((_, index) => /* @__PURE__ */ React157.createElement(TableCell, { key: `ledger-empty-cell-${index}` })), /* @__PURE__ */ React157.createElement(TableCell, null, "Debit"), /* @__PURE__ */ React157.createElement(TableCell, null, "Credit"))),
14100
+ /* @__PURE__ */ React157.createElement(TableBody, null, entry?.line_items?.map((item, index) => /* @__PURE__ */ React157.createElement(
14092
14101
  TableRow,
14093
14102
  {
14094
14103
  key: `ledger-line-item-${index}`,
14095
14104
  rowKey: `ledger-line-item-${index}`
14096
14105
  },
14097
- /* @__PURE__ */ React156.createElement(TableCell, null, item.account_identifier?.name || ""),
14098
- [...Array(3)].map((_, index2) => /* @__PURE__ */ React156.createElement(TableCell, { key: `ledger-empty-cell-${index2}` })),
14099
- /* @__PURE__ */ React156.createElement(TableCell, null, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React156.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
14100
- /* @__PURE__ */ React156.createElement(TableCell, null, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React156.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
14101
- )), /* @__PURE__ */ React156.createElement(
14106
+ /* @__PURE__ */ React157.createElement(TableCell, null, item.account_identifier?.name || ""),
14107
+ [...Array(3)].map((_, index2) => /* @__PURE__ */ React157.createElement(TableCell, { key: `ledger-empty-cell-${index2}` })),
14108
+ /* @__PURE__ */ React157.createElement(TableCell, null, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React157.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
14109
+ /* @__PURE__ */ React157.createElement(TableCell, null, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React157.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
14110
+ )), /* @__PURE__ */ React157.createElement(
14102
14111
  TableRow,
14103
14112
  {
14104
14113
  rowKey: "ledger-line-item-summation",
14105
14114
  variant: "summation"
14106
14115
  },
14107
- /* @__PURE__ */ React156.createElement(TableCell, { primary: true }, "Total"),
14108
- [...Array(3)].map((_, index) => /* @__PURE__ */ React156.createElement(TableCell, { key: `ledger-empty-cell-${index}` })),
14109
- /* @__PURE__ */ React156.createElement(TableCell, { isCurrency: true, primary: true }, entry?.line_items.filter((item) => item.direction === "DEBIT").map((item) => item.amount).reduce((a, b) => a + b, 0) || 0),
14110
- /* @__PURE__ */ React156.createElement(TableCell, { isCurrency: true, primary: true }, entry?.line_items.filter((item) => item.direction === "CREDIT").map((item) => item.amount).reduce((a, b) => a + b, 0) || 0)
14116
+ /* @__PURE__ */ React157.createElement(TableCell, { primary: true }, "Total"),
14117
+ [...Array(3)].map((_, index) => /* @__PURE__ */ React157.createElement(TableCell, { key: `ledger-empty-cell-${index}` })),
14118
+ /* @__PURE__ */ React157.createElement(TableCell, { isCurrency: true, primary: true }, entry?.line_items.filter((item) => item.direction === "DEBIT").map((item) => item.amount).reduce((a, b) => a + b, 0) || 0),
14119
+ /* @__PURE__ */ React157.createElement(TableCell, { isCurrency: true, primary: true }, entry?.line_items.filter((item) => item.direction === "CREDIT").map((item) => item.amount).reduce((a, b) => a + b, 0) || 0)
14111
14120
  ))
14112
14121
  ))) : null);
14113
14122
  };
14114
14123
 
14115
14124
  // src/components/JournalForm/JournalForm.tsx
14116
- import React158, { useContext as useContext29 } from "react";
14125
+ import React159, { useContext as useContext29 } from "react";
14117
14126
 
14118
14127
  // src/components/JournalForm/JournalFormEntryLines.tsx
14119
- import React157, { useContext as useContext28 } from "react";
14128
+ import React158, { useContext as useContext28 } from "react";
14120
14129
  var JournalFormEntryLines = ({
14121
14130
  entrylineItems,
14122
14131
  addEntryLine,
@@ -14128,14 +14137,14 @@ var JournalFormEntryLines = ({
14128
14137
  const { data: accountsData } = useContext28(ChartOfAccountsContext);
14129
14138
  const { form } = useContext28(JournalContext);
14130
14139
  const parentOptions = useParentOptions(accountsData);
14131
- return /* @__PURE__ */ React157.createElement(React157.Fragment, null, Object.keys(Direction).map((direction, idx) => {
14132
- return /* @__PURE__ */ React157.createElement(
14140
+ return /* @__PURE__ */ React158.createElement(React158.Fragment, null, Object.keys(Direction).map((direction, idx) => {
14141
+ return /* @__PURE__ */ React158.createElement(
14133
14142
  "div",
14134
14143
  {
14135
14144
  key: "Layer__journal__form__input-group-" + idx,
14136
14145
  className: "Layer__journal__form__input-group Layer__journal__form__input-group__border"
14137
14146
  },
14138
- /* @__PURE__ */ React157.createElement(
14147
+ /* @__PURE__ */ React158.createElement(
14139
14148
  Text,
14140
14149
  {
14141
14150
  className: "Layer__journal__form__input-group__title",
@@ -14149,13 +14158,13 @@ var JournalFormEntryLines = ({
14149
14158
  if (item.direction !== direction) {
14150
14159
  return null;
14151
14160
  }
14152
- return /* @__PURE__ */ React157.createElement(
14161
+ return /* @__PURE__ */ React158.createElement(
14153
14162
  "div",
14154
14163
  {
14155
14164
  className: "Layer__journal__form__input-group__line-item",
14156
14165
  key: direction + "-" + idx2
14157
14166
  },
14158
- /* @__PURE__ */ React157.createElement(InputGroup, { name: direction, label: "Amount", inline: true }, /* @__PURE__ */ React157.createElement(
14167
+ /* @__PURE__ */ React158.createElement(InputGroup, { name: direction, label: "Amount", inline: true }, /* @__PURE__ */ React158.createElement(
14159
14168
  InputWithBadge,
14160
14169
  {
14161
14170
  name: direction,
@@ -14181,14 +14190,14 @@ var JournalFormEntryLines = ({
14181
14190
  )?.message
14182
14191
  }
14183
14192
  )),
14184
- /* @__PURE__ */ React157.createElement(
14193
+ /* @__PURE__ */ React158.createElement(
14185
14194
  InputGroup,
14186
14195
  {
14187
14196
  name: "account-name",
14188
14197
  label: "Account name",
14189
14198
  inline: true
14190
14199
  },
14191
- /* @__PURE__ */ React157.createElement(
14200
+ /* @__PURE__ */ React158.createElement(
14192
14201
  Select2,
14193
14202
  {
14194
14203
  options: parentOptions,
@@ -14212,18 +14221,18 @@ var JournalFormEntryLines = ({
14212
14221
  )?.message
14213
14222
  }
14214
14223
  ),
14215
- idx2 >= 2 && /* @__PURE__ */ React157.createElement(
14224
+ idx2 >= 2 && /* @__PURE__ */ React158.createElement(
14216
14225
  IconButton,
14217
14226
  {
14218
14227
  className: "Layer__remove__button",
14219
14228
  onClick: () => removeEntryLine(idx2),
14220
- icon: /* @__PURE__ */ React157.createElement(Trash_default, null)
14229
+ icon: /* @__PURE__ */ React158.createElement(Trash_default, null)
14221
14230
  }
14222
14231
  )
14223
14232
  )
14224
14233
  );
14225
14234
  }),
14226
- (config.form.addEntryLinesLimit === void 0 || config.form.addEntryLinesLimit > entrylineItems?.length) && /* @__PURE__ */ React157.createElement(
14235
+ (config.form.addEntryLinesLimit === void 0 || config.form.addEntryLinesLimit > entrylineItems?.length) && /* @__PURE__ */ React158.createElement(
14227
14236
  TextButton,
14228
14237
  {
14229
14238
  className: "Layer__journal__add-entry-line",
@@ -14247,7 +14256,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14247
14256
  addEntryLine,
14248
14257
  removeEntryLine
14249
14258
  } = useContext29(JournalContext);
14250
- return /* @__PURE__ */ React158.createElement(
14259
+ return /* @__PURE__ */ React159.createElement(
14251
14260
  "form",
14252
14261
  {
14253
14262
  className: "Layer__form",
@@ -14256,7 +14265,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14256
14265
  submitForm();
14257
14266
  }
14258
14267
  },
14259
- /* @__PURE__ */ React158.createElement("div", { className: "Layer__journal__sidebar__header" }, /* @__PURE__ */ React158.createElement(Text, { size: "lg" /* lg */, weight: "bold" /* bold */, className: "title" }, stringOverrides?.header && "Add New Entry"), /* @__PURE__ */ React158.createElement("div", { className: "actions" }, /* @__PURE__ */ React158.createElement(
14268
+ /* @__PURE__ */ React159.createElement("div", { className: "Layer__journal__sidebar__header" }, /* @__PURE__ */ React159.createElement(Text, { size: "lg" /* lg */, weight: "bold" /* bold */, className: "title" }, stringOverrides?.header && "Add New Entry"), /* @__PURE__ */ React159.createElement("div", { className: "actions" }, /* @__PURE__ */ React159.createElement(
14260
14269
  Button,
14261
14270
  {
14262
14271
  type: "button",
@@ -14265,7 +14274,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14265
14274
  disabled: sendingForm
14266
14275
  },
14267
14276
  stringOverrides?.cancelButton || "Cancel"
14268
- ), apiError && /* @__PURE__ */ React158.createElement(
14277
+ ), apiError && /* @__PURE__ */ React159.createElement(
14269
14278
  RetryButton,
14270
14279
  {
14271
14280
  type: "submit",
@@ -14274,7 +14283,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14274
14283
  disabled: sendingForm
14275
14284
  },
14276
14285
  stringOverrides?.retryButton || "Retry"
14277
- ), !apiError && /* @__PURE__ */ React158.createElement(
14286
+ ), !apiError && /* @__PURE__ */ React159.createElement(
14278
14287
  SubmitButton,
14279
14288
  {
14280
14289
  type: "submit",
@@ -14284,7 +14293,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14284
14293
  },
14285
14294
  stringOverrides?.saveButton || "Save"
14286
14295
  ))),
14287
- apiError && /* @__PURE__ */ React158.createElement(
14296
+ apiError && /* @__PURE__ */ React159.createElement(
14288
14297
  Text,
14289
14298
  {
14290
14299
  size: "sm" /* sm */,
@@ -14292,7 +14301,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14292
14301
  },
14293
14302
  apiError
14294
14303
  ),
14295
- /* @__PURE__ */ React158.createElement("div", { className: "Layer__journal__form__input-group" }, /* @__PURE__ */ React158.createElement(InputGroup, { name: "date", label: "Date", inline: true }, /* @__PURE__ */ React158.createElement("div", { className: "Layer__journal__datepicker__wrapper" }, /* @__PURE__ */ React158.createElement(
14304
+ /* @__PURE__ */ React159.createElement("div", { className: "Layer__journal__form__input-group" }, /* @__PURE__ */ React159.createElement(InputGroup, { name: "date", label: "Date", inline: true }, /* @__PURE__ */ React159.createElement("div", { className: "Layer__journal__datepicker__wrapper" }, /* @__PURE__ */ React159.createElement(
14296
14305
  DatePicker,
14297
14306
  {
14298
14307
  selected: form?.data.entry_at ? new Date(form?.data.entry_at) : /* @__PURE__ */ new Date(),
@@ -14305,7 +14314,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14305
14314
  placeholderText: "Select date",
14306
14315
  currentDateOption: false
14307
14316
  }
14308
- ), /* @__PURE__ */ React158.createElement(
14317
+ ), /* @__PURE__ */ React159.createElement(
14309
14318
  DatePicker,
14310
14319
  {
14311
14320
  selected: form?.data.entry_at ? new Date(form?.data.entry_at) : /* @__PURE__ */ new Date(),
@@ -14319,7 +14328,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14319
14328
  currentDateOption: false
14320
14329
  }
14321
14330
  )))),
14322
- /* @__PURE__ */ React158.createElement(
14331
+ /* @__PURE__ */ React159.createElement(
14323
14332
  JournalFormEntryLines,
14324
14333
  {
14325
14334
  entrylineItems: form?.data.line_items || [],
@@ -14330,7 +14339,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14330
14339
  config
14331
14340
  }
14332
14341
  ),
14333
- /* @__PURE__ */ React158.createElement("div", { className: "Layer__journal__form__input-group Layer__journal__form__input-group__textarea" }, /* @__PURE__ */ React158.createElement(InputGroup, { name: "memo", label: "Notes" }, /* @__PURE__ */ React158.createElement(
14342
+ /* @__PURE__ */ React159.createElement("div", { className: "Layer__journal__form__input-group Layer__journal__form__input-group__textarea" }, /* @__PURE__ */ React159.createElement(InputGroup, { name: "memo", label: "Notes" }, /* @__PURE__ */ React159.createElement(
14334
14343
  Textarea,
14335
14344
  {
14336
14345
  name: "memo",
@@ -14340,7 +14349,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14340
14349
  disabled: sendingForm
14341
14350
  }
14342
14351
  ))),
14343
- /* @__PURE__ */ React158.createElement("div", { className: "Layer__journal__bottom-actions" }, /* @__PURE__ */ React158.createElement(
14352
+ /* @__PURE__ */ React159.createElement("div", { className: "Layer__journal__bottom-actions" }, /* @__PURE__ */ React159.createElement(
14344
14353
  Button,
14345
14354
  {
14346
14355
  type: "button",
@@ -14349,7 +14358,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14349
14358
  disabled: sendingForm
14350
14359
  },
14351
14360
  stringOverrides?.cancelButton || "Cancel"
14352
- ), apiError && /* @__PURE__ */ React158.createElement(
14361
+ ), apiError && /* @__PURE__ */ React159.createElement(
14353
14362
  RetryButton,
14354
14363
  {
14355
14364
  type: "submit",
@@ -14358,7 +14367,7 @@ var JournalForm = ({ config, stringOverrides }) => {
14358
14367
  disabled: sendingForm
14359
14368
  },
14360
14369
  stringOverrides?.retryButton || "Retry"
14361
- ), !apiError && /* @__PURE__ */ React158.createElement(
14370
+ ), !apiError && /* @__PURE__ */ React159.createElement(
14362
14371
  SubmitButton,
14363
14372
  {
14364
14373
  type: "submit",
@@ -14379,9 +14388,9 @@ var JournalSidebar = ({
14379
14388
  }) => {
14380
14389
  const { selectedEntryId } = useContext30(JournalContext);
14381
14390
  if (selectedEntryId !== "new") {
14382
- return /* @__PURE__ */ React159.createElement(JournalEntryDetails, null);
14391
+ return /* @__PURE__ */ React160.createElement(JournalEntryDetails, null);
14383
14392
  }
14384
- return /* @__PURE__ */ React159.createElement(JournalForm, { config, stringOverrides });
14393
+ return /* @__PURE__ */ React160.createElement(JournalForm, { config, stringOverrides });
14385
14394
  };
14386
14395
 
14387
14396
  // src/components/JournalTable/JournalTable.tsx
@@ -14408,16 +14417,16 @@ var JournalTable = ({
14408
14417
  const lastPageIndex = firstPageIndex + pageSize;
14409
14418
  return rawData?.sort((a, b) => Date.parse(b.date) - Date.parse(a.date))?.slice(firstPageIndex, lastPageIndex);
14410
14419
  }, [rawData, currentPage]);
14411
- return /* @__PURE__ */ React160.createElement(
14420
+ return /* @__PURE__ */ React161.createElement(
14412
14421
  Panel,
14413
14422
  {
14414
- sidebar: /* @__PURE__ */ React160.createElement(JournalSidebar, { parentRef: containerRef, config, stringOverrides: stringOverrides?.journalForm }),
14423
+ sidebar: /* @__PURE__ */ React161.createElement(JournalSidebar, { parentRef: containerRef, config, stringOverrides: stringOverrides?.journalForm }),
14415
14424
  sidebarIsOpen: Boolean(selectedEntryId),
14416
14425
  parentRef: containerRef
14417
14426
  },
14418
- /* @__PURE__ */ React160.createElement(Header, { className: `Layer__${COMPONENT_NAME6}__header` }, /* @__PURE__ */ React160.createElement(Heading, { className: `Layer__${COMPONENT_NAME6}__title` }, stringOverrides?.componentTitle || "Journal"), /* @__PURE__ */ React160.createElement("div", { className: `Layer__${COMPONENT_NAME6}__actions` }, /* @__PURE__ */ React160.createElement(Button, { onClick: () => addEntry(), disabled: isLoading }, stringOverrides?.addEntryButton || "Add Entry"))),
14419
- /* @__PURE__ */ React160.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__journal__table" }, /* @__PURE__ */ React160.createElement("thead", null, /* @__PURE__ */ React160.createElement("tr", null, /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header" }), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header" }, stringOverrides?.idColumnHeader || "Id"), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header" }, stringOverrides?.dateColumnHeader || "Date"), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header" }, stringOverrides?.transactionColumnHeader || "Transaction"), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header" }, stringOverrides?.accountColumnHeader || "Account"), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.debitColumnHeader || "Debit"), /* @__PURE__ */ React160.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.creditColumnHeader || "Credit"))), /* @__PURE__ */ React160.createElement("tbody", null, !error && data?.map((entry, idx) => {
14420
- return /* @__PURE__ */ React160.createElement(
14427
+ /* @__PURE__ */ React161.createElement(Header, { className: `Layer__${COMPONENT_NAME6}__header` }, /* @__PURE__ */ React161.createElement(Heading, { className: `Layer__${COMPONENT_NAME6}__title` }, stringOverrides?.componentTitle || "Journal"), /* @__PURE__ */ React161.createElement("div", { className: `Layer__${COMPONENT_NAME6}__actions` }, /* @__PURE__ */ React161.createElement(Button, { onClick: () => addEntry(), disabled: isLoading }, stringOverrides?.addEntryButton || "Add Entry"))),
14428
+ /* @__PURE__ */ React161.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__journal__table" }, /* @__PURE__ */ React161.createElement("thead", null, /* @__PURE__ */ React161.createElement("tr", null, /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header" }), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header" }, stringOverrides?.idColumnHeader || "Id"), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header" }, stringOverrides?.dateColumnHeader || "Date"), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header" }, stringOverrides?.transactionColumnHeader || "Transaction"), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header" }, stringOverrides?.accountColumnHeader || "Account"), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.debitColumnHeader || "Debit"), /* @__PURE__ */ React161.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, stringOverrides?.creditColumnHeader || "Credit"))), /* @__PURE__ */ React161.createElement("tbody", null, !error && data?.map((entry, idx) => {
14429
+ return /* @__PURE__ */ React161.createElement(
14421
14430
  JournalRow,
14422
14431
  {
14423
14432
  key: "journal-row-" + idx + entry.id,
@@ -14427,7 +14436,7 @@ var JournalTable = ({
14427
14436
  }
14428
14437
  );
14429
14438
  }))),
14430
- data && /* @__PURE__ */ React160.createElement("div", { className: "Layer__journal__pagination" }, /* @__PURE__ */ React160.createElement(
14439
+ data && /* @__PURE__ */ React161.createElement("div", { className: "Layer__journal__pagination" }, /* @__PURE__ */ React161.createElement(
14431
14440
  Pagination,
14432
14441
  {
14433
14442
  currentPage,
@@ -14436,7 +14445,7 @@ var JournalTable = ({
14436
14445
  onPageChange: (page) => setCurrentPage(page)
14437
14446
  }
14438
14447
  )),
14439
- error ? /* @__PURE__ */ React160.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React160.createElement(
14448
+ error ? /* @__PURE__ */ React161.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React161.createElement(
14440
14449
  DataState,
14441
14450
  {
14442
14451
  status: "failed" /* failed */,
@@ -14446,7 +14455,7 @@ var JournalTable = ({
14446
14455
  isLoading: isValidating || isLoading
14447
14456
  }
14448
14457
  )) : null,
14449
- (!data || isLoading) && !error ? /* @__PURE__ */ React160.createElement("div", { className: `Layer__${COMPONENT_NAME6}__loader-container` }, /* @__PURE__ */ React160.createElement(Loader2, null)) : null
14458
+ (!data || isLoading) && !error ? /* @__PURE__ */ React161.createElement("div", { className: `Layer__${COMPONENT_NAME6}__loader-container` }, /* @__PURE__ */ React161.createElement(Loader2, null)) : null
14450
14459
  );
14451
14460
  };
14452
14461
 
@@ -14459,7 +14468,7 @@ var JOURNAL_CONFIG = {
14459
14468
  var Journal = (props) => {
14460
14469
  const JournalContextData = useJournal();
14461
14470
  const AccountsContextData = useChartOfAccounts();
14462
- return /* @__PURE__ */ React161.createElement(ChartOfAccountsContext.Provider, { value: AccountsContextData }, /* @__PURE__ */ React161.createElement(JournalContext.Provider, { value: JournalContextData }, /* @__PURE__ */ React161.createElement(TableProvider, null, /* @__PURE__ */ React161.createElement(JournalContent, { ...props }))));
14471
+ return /* @__PURE__ */ React162.createElement(ChartOfAccountsContext.Provider, { value: AccountsContextData }, /* @__PURE__ */ React162.createElement(JournalContext.Provider, { value: JournalContextData }, /* @__PURE__ */ React162.createElement(TableProvider, null, /* @__PURE__ */ React162.createElement(JournalContent, { ...props }))));
14463
14472
  };
14464
14473
  var JournalContent = ({
14465
14474
  asWidget,
@@ -14478,7 +14487,7 @@ var JournalContent = ({
14478
14487
  }
14479
14488
  }
14480
14489
  });
14481
- return /* @__PURE__ */ React161.createElement(Container, { name: "journal", ref: containerRef, asWidget }, /* @__PURE__ */ React161.createElement(
14490
+ return /* @__PURE__ */ React162.createElement(Container, { name: "journal", ref: containerRef, asWidget }, /* @__PURE__ */ React162.createElement(
14482
14491
  JournalTable,
14483
14492
  {
14484
14493
  view,
@@ -14490,7 +14499,7 @@ var JournalContent = ({
14490
14499
  };
14491
14500
 
14492
14501
  // src/components/Tasks/Tasks.tsx
14493
- import React168, {
14502
+ import React169, {
14494
14503
  createContext as createContext14,
14495
14504
  useContext as useContext36,
14496
14505
  useEffect as useEffect43,
@@ -14572,11 +14581,11 @@ function isComplete(taskType) {
14572
14581
  }
14573
14582
 
14574
14583
  // src/components/TasksHeader/TasksHeader.tsx
14575
- import React163, { useContext as useContext32 } from "react";
14584
+ import React164, { useContext as useContext32 } from "react";
14576
14585
 
14577
14586
  // src/icons/ProgressIcon.tsx
14578
- import * as React162 from "react";
14579
- var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createElement(
14587
+ import * as React163 from "react";
14588
+ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React163.createElement(
14580
14589
  "svg",
14581
14590
  {
14582
14591
  xmlns: "http://www.w3.org/2000/svg",
@@ -14586,7 +14595,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14586
14595
  width: size,
14587
14596
  height: size
14588
14597
  },
14589
- /* @__PURE__ */ React162.createElement(
14598
+ /* @__PURE__ */ React163.createElement(
14590
14599
  "path",
14591
14600
  {
14592
14601
  d: "M9 1.5V4.5",
@@ -14595,7 +14604,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14595
14604
  strokeLinejoin: "round"
14596
14605
  }
14597
14606
  ),
14598
- /* @__PURE__ */ React162.createElement(
14607
+ /* @__PURE__ */ React163.createElement(
14599
14608
  "path",
14600
14609
  {
14601
14610
  d: "M9 13.5V16.5",
@@ -14604,7 +14613,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14604
14613
  strokeLinejoin: "round"
14605
14614
  }
14606
14615
  ),
14607
- /* @__PURE__ */ React162.createElement(
14616
+ /* @__PURE__ */ React163.createElement(
14608
14617
  "path",
14609
14618
  {
14610
14619
  d: "M3.6975 3.6975L5.82 5.82",
@@ -14613,7 +14622,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14613
14622
  strokeLinejoin: "round"
14614
14623
  }
14615
14624
  ),
14616
- /* @__PURE__ */ React162.createElement(
14625
+ /* @__PURE__ */ React163.createElement(
14617
14626
  "path",
14618
14627
  {
14619
14628
  d: "M12.18 12.18L14.3025 14.3025",
@@ -14622,7 +14631,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14622
14631
  strokeLinejoin: "round"
14623
14632
  }
14624
14633
  ),
14625
- /* @__PURE__ */ React162.createElement(
14634
+ /* @__PURE__ */ React163.createElement(
14626
14635
  "path",
14627
14636
  {
14628
14637
  d: "M1.5 9H4.5",
@@ -14631,7 +14640,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14631
14640
  strokeLinejoin: "round"
14632
14641
  }
14633
14642
  ),
14634
- /* @__PURE__ */ React162.createElement(
14643
+ /* @__PURE__ */ React163.createElement(
14635
14644
  "path",
14636
14645
  {
14637
14646
  d: "M13.5 9H16.5",
@@ -14640,7 +14649,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14640
14649
  strokeLinejoin: "round"
14641
14650
  }
14642
14651
  ),
14643
- /* @__PURE__ */ React162.createElement(
14652
+ /* @__PURE__ */ React163.createElement(
14644
14653
  "path",
14645
14654
  {
14646
14655
  d: "M3.6975 14.3025L5.82 12.18",
@@ -14649,7 +14658,7 @@ var ProgressIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React162.createE
14649
14658
  strokeLinejoin: "round"
14650
14659
  }
14651
14660
  ),
14652
- /* @__PURE__ */ React162.createElement(
14661
+ /* @__PURE__ */ React163.createElement(
14653
14662
  "path",
14654
14663
  {
14655
14664
  d: "M12.18 5.82L14.3025 3.6975",
@@ -14664,22 +14673,22 @@ var ProgressIcon_default = ProgressIcon;
14664
14673
  // src/components/TasksHeader/TasksHeader.tsx
14665
14674
  var ICONS = {
14666
14675
  loading: {
14667
- icon: /* @__PURE__ */ React163.createElement(ProgressIcon_default, { size: 12, className: "Layer__anim--rotating" }),
14676
+ icon: /* @__PURE__ */ React164.createElement(ProgressIcon_default, { size: 12, className: "Layer__anim--rotating" }),
14668
14677
  text: "Loading",
14669
14678
  badge: "default" /* DEFAULT */
14670
14679
  },
14671
14680
  done: {
14672
- icon: /* @__PURE__ */ React163.createElement(Check_default, { size: 12 }),
14681
+ icon: /* @__PURE__ */ React164.createElement(Check_default, { size: 12 }),
14673
14682
  text: "Done",
14674
14683
  badge: "success" /* SUCCESS */
14675
14684
  },
14676
14685
  pending: {
14677
- icon: /* @__PURE__ */ React163.createElement(AlertCircle_default, { size: 12 }),
14686
+ icon: /* @__PURE__ */ React164.createElement(AlertCircle_default, { size: 12 }),
14678
14687
  text: "In progress",
14679
14688
  badge: "warning" /* WARNING */
14680
14689
  },
14681
14690
  refresh: {
14682
- icon: /* @__PURE__ */ React163.createElement(RefreshCcw_default, { size: 12 }),
14691
+ icon: /* @__PURE__ */ React164.createElement(RefreshCcw_default, { size: 12 }),
14683
14692
  text: "Refresh",
14684
14693
  badge: "default" /* DEFAULT */
14685
14694
  }
@@ -14693,7 +14702,7 @@ var TasksHeader = ({
14693
14702
  const { data: tasks, loadedStatus, refetch, error } = useContext32(TasksContext);
14694
14703
  const completedTasks = tasks?.filter((task) => isComplete(task.status)).length;
14695
14704
  const badgeVariant = completedTasks === tasks?.length ? ICONS.done : ICONS.pending;
14696
- return /* @__PURE__ */ React163.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React163.createElement("div", { className: "Layer__tasks-header__left-col" }, /* @__PURE__ */ React163.createElement(Text, { size: "lg" /* lg */ }, tasksHeader), loadedStatus !== "complete" && !open ? /* @__PURE__ */ React163.createElement(Badge, { variant: ICONS.loading.badge, icon: ICONS.loading.icon }, ICONS.loading.text) : loadedStatus === "complete" && (!tasks || error) ? /* @__PURE__ */ React163.createElement(
14705
+ return /* @__PURE__ */ React164.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React164.createElement("div", { className: "Layer__tasks-header__left-col" }, /* @__PURE__ */ React164.createElement(Text, { size: "lg" /* lg */ }, tasksHeader), loadedStatus !== "complete" && !open ? /* @__PURE__ */ React164.createElement(Badge, { variant: ICONS.loading.badge, icon: ICONS.loading.icon }, ICONS.loading.text) : loadedStatus === "complete" && (!tasks || error) ? /* @__PURE__ */ React164.createElement(
14697
14706
  Badge,
14698
14707
  {
14699
14708
  onClick: () => refetch(),
@@ -14701,15 +14710,15 @@ var TasksHeader = ({
14701
14710
  icon: ICONS.refresh.icon
14702
14711
  },
14703
14712
  ICONS.refresh.text
14704
- ) : loadedStatus === "complete" ? /* @__PURE__ */ React163.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text) : open ? null : /* @__PURE__ */ React163.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text)), collapsable && /* @__PURE__ */ React163.createElement(ExpandButton, { onClick: toggleContent, collapsed: !open }));
14713
+ ) : loadedStatus === "complete" ? /* @__PURE__ */ React164.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text) : open ? null : /* @__PURE__ */ React164.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text)), collapsable && /* @__PURE__ */ React164.createElement(ExpandButton, { onClick: toggleContent, collapsed: !open }));
14705
14714
  };
14706
14715
 
14707
14716
  // src/components/TasksList/TasksList.tsx
14708
- import React166, { useContext as useContext34, useMemo as useMemo18, useState as useState49 } from "react";
14717
+ import React167, { useContext as useContext34, useMemo as useMemo18, useState as useState49 } from "react";
14709
14718
 
14710
14719
  // src/icons/SmileIcon.tsx
14711
- import * as React164 from "react";
14712
- var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElement(
14720
+ import * as React165 from "react";
14721
+ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React165.createElement(
14713
14722
  "svg",
14714
14723
  {
14715
14724
  viewBox: "0 0 12 12",
@@ -14719,7 +14728,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElem
14719
14728
  width: size,
14720
14729
  height: size
14721
14730
  },
14722
- /* @__PURE__ */ React164.createElement(
14731
+ /* @__PURE__ */ React165.createElement(
14723
14732
  "path",
14724
14733
  {
14725
14734
  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",
@@ -14728,7 +14737,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElem
14728
14737
  strokeLinejoin: "round"
14729
14738
  }
14730
14739
  ),
14731
- /* @__PURE__ */ React164.createElement(
14740
+ /* @__PURE__ */ React165.createElement(
14732
14741
  "path",
14733
14742
  {
14734
14743
  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",
@@ -14737,7 +14746,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElem
14737
14746
  strokeLinejoin: "round"
14738
14747
  }
14739
14748
  ),
14740
- /* @__PURE__ */ React164.createElement(
14749
+ /* @__PURE__ */ React165.createElement(
14741
14750
  "path",
14742
14751
  {
14743
14752
  d: "M5 5H5.005",
@@ -14746,7 +14755,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElem
14746
14755
  strokeLinejoin: "round"
14747
14756
  }
14748
14757
  ),
14749
- /* @__PURE__ */ React164.createElement(
14758
+ /* @__PURE__ */ React165.createElement(
14750
14759
  "path",
14751
14760
  {
14752
14761
  d: "M8 5H8.005",
@@ -14759,7 +14768,7 @@ var SmileIcon = ({ size = 12, ...props }) => /* @__PURE__ */ React164.createElem
14759
14768
  var SmileIcon_default = SmileIcon;
14760
14769
 
14761
14770
  // src/components/TasksListItem/TasksListItem.tsx
14762
- import React165, { useContext as useContext33, useEffect as useEffect41, useState as useState48 } from "react";
14771
+ import React166, { useContext as useContext33, useEffect as useEffect41, useState as useState48 } from "react";
14763
14772
  import classNames57 from "classnames";
14764
14773
  var TasksListItem = ({
14765
14774
  task,
@@ -14785,14 +14794,14 @@ var TasksListItem = ({
14785
14794
  useEffect41(() => {
14786
14795
  setIsOpen(defaultOpen);
14787
14796
  }, [defaultOpen]);
14788
- return /* @__PURE__ */ React165.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React165.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React165.createElement(
14797
+ return /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React166.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React166.createElement(
14789
14798
  "div",
14790
14799
  {
14791
14800
  className: "Layer__tasks-list-item__head",
14792
14801
  onClick: () => setIsOpen(!isOpen)
14793
14802
  },
14794
- /* @__PURE__ */ React165.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React165.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, isComplete(task.status) ? /* @__PURE__ */ React165.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React165.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React165.createElement(Text, { size: "md" /* md */ }, task.title)),
14795
- /* @__PURE__ */ React165.createElement(
14803
+ /* @__PURE__ */ React166.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, isComplete(task.status) ? /* @__PURE__ */ React166.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React166.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React166.createElement(Text, { size: "md" /* md */ }, task.title)),
14804
+ /* @__PURE__ */ React166.createElement(
14796
14805
  ChevronDownFill_default,
14797
14806
  {
14798
14807
  size: 16,
@@ -14802,13 +14811,13 @@ var TasksListItem = ({
14802
14811
  }
14803
14812
  }
14804
14813
  )
14805
- ), /* @__PURE__ */ React165.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React165.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React165.createElement(Text, { size: "sm" /* sm */ }, task.question), /* @__PURE__ */ React165.createElement(
14814
+ ), /* @__PURE__ */ React166.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React166.createElement(Text, { size: "sm" /* sm */ }, task.question), /* @__PURE__ */ React166.createElement(
14806
14815
  Textarea,
14807
14816
  {
14808
14817
  value: userResponse,
14809
14818
  onChange: (e) => setUserResponse(e.target.value)
14810
14819
  }
14811
- ), /* @__PURE__ */ React165.createElement("div", { className: "Layer__tasks-list-item__actions" }, /* @__PURE__ */ React165.createElement(
14820
+ ), /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-list-item__actions" }, /* @__PURE__ */ React166.createElement(
14812
14821
  Button,
14813
14822
  {
14814
14823
  disabled: userResponse.length === 0 || userResponse === task.user_response,
@@ -14832,7 +14841,7 @@ function paginateArray(array, chunkSize = 10) {
14832
14841
  }
14833
14842
  return result;
14834
14843
  }
14835
- var TasksEmptyState = () => /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React166.createElement(SmileIcon_default, null)), /* @__PURE__ */ React166.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React166.createElement("br", null), " Great job!"));
14844
+ var TasksEmptyState = () => /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React167.createElement(SmileIcon_default, null)), /* @__PURE__ */ React167.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React167.createElement("br", null), " Great job!"));
14836
14845
  var TasksList = ({ pageSize = 10 }) => {
14837
14846
  const { data: tasks, error } = useContext34(TasksContext);
14838
14847
  const firstPageWithIincompleteTasks = paginateArray(
@@ -14856,7 +14865,7 @@ var TasksList = ({ pageSize = 10 }) => {
14856
14865
  setCurrentPage(currentPage + 1);
14857
14866
  }
14858
14867
  };
14859
- return /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React166.createElement(React166.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React166.createElement(
14868
+ return /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React167.createElement(React167.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React167.createElement(
14860
14869
  TasksListItem,
14861
14870
  {
14862
14871
  key: task.id,
@@ -14864,7 +14873,7 @@ var TasksList = ({ pageSize = 10 }) => {
14864
14873
  goToNextPageIfAllComplete: goToNextPage,
14865
14874
  defaultOpen: index === indexFirstIncomplete
14866
14875
  }
14867
- )), tasks && tasks.length >= 10 && /* @__PURE__ */ React166.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React166.createElement(
14876
+ )), tasks && tasks.length >= 10 && /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React167.createElement(
14868
14877
  Pagination,
14869
14878
  {
14870
14879
  currentPage,
@@ -14872,11 +14881,11 @@ var TasksList = ({ pageSize = 10 }) => {
14872
14881
  pageSize,
14873
14882
  onPageChange: (page) => setCurrentPage(page)
14874
14883
  }
14875
- ))) : /* @__PURE__ */ React166.createElement(React166.Fragment, null, error ? /* @__PURE__ */ React166.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React166.createElement(TasksEmptyState, null)));
14884
+ ))) : /* @__PURE__ */ React167.createElement(React167.Fragment, null, error ? /* @__PURE__ */ React167.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React167.createElement(TasksEmptyState, null)));
14876
14885
  };
14877
14886
 
14878
14887
  // src/components/TasksPending/TasksPending.tsx
14879
- import React167, { useContext as useContext35 } from "react";
14888
+ import React168, { useContext as useContext35 } from "react";
14880
14889
  import classNames58 from "classnames";
14881
14890
  import { format as format6 } from "date-fns";
14882
14891
  import { Cell as Cell4, Pie as Pie3, PieChart as PieChart4 } from "recharts";
@@ -14896,7 +14905,7 @@ var TasksPending = () => {
14896
14905
  const taskStatusClassName = classNames58(
14897
14906
  completedTasks && completedTasks > 0 ? "Layer__tasks-pending-bar__status--done" : "Layer__tasks-pending-bar__status--pending"
14898
14907
  );
14899
- return /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React167.createElement(Text, { size: "lg" /* lg */ }, format6(Date.now(), "MMMM")), /* @__PURE__ */ React167.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React167.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React167.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data?.length, " done"), /* @__PURE__ */ React167.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React167.createElement(
14908
+ return /* @__PURE__ */ React168.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React168.createElement(Text, { size: "lg" /* lg */ }, format6(Date.now(), "MMMM")), /* @__PURE__ */ React168.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React168.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React168.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data?.length, " done"), /* @__PURE__ */ React168.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React168.createElement(
14900
14909
  Pie3,
14901
14910
  {
14902
14911
  data: chartData,
@@ -14914,7 +14923,7 @@ var TasksPending = () => {
14914
14923
  animationEasing: "ease-in-out"
14915
14924
  },
14916
14925
  chartData.map((task, index) => {
14917
- return /* @__PURE__ */ React167.createElement(
14926
+ return /* @__PURE__ */ React168.createElement(
14918
14927
  Cell4,
14919
14928
  {
14920
14929
  key: `cell-${index}`,
@@ -14947,7 +14956,7 @@ var Tasks = ({
14947
14956
  // deprecated
14948
14957
  stringOverrides
14949
14958
  }) => {
14950
- return /* @__PURE__ */ React168.createElement(TasksProvider, null, /* @__PURE__ */ React168.createElement(
14959
+ return /* @__PURE__ */ React169.createElement(TasksProvider, null, /* @__PURE__ */ React169.createElement(
14951
14960
  TasksComponent,
14952
14961
  {
14953
14962
  collapsable,
@@ -14960,7 +14969,7 @@ var Tasks = ({
14960
14969
  };
14961
14970
  var TasksProvider = ({ children }) => {
14962
14971
  const contextData = useTasks();
14963
- return /* @__PURE__ */ React168.createElement(TasksContext.Provider, { value: contextData }, children);
14972
+ return /* @__PURE__ */ React169.createElement(TasksContext.Provider, { value: contextData }, children);
14964
14973
  };
14965
14974
  var TasksComponent = ({
14966
14975
  collapsable = false,
@@ -14988,7 +14997,7 @@ var TasksComponent = ({
14988
14997
  setOpen(false);
14989
14998
  }
14990
14999
  }, [allComplete]);
14991
- return /* @__PURE__ */ React168.createElement("div", { className: "Layer__tasks-component" }, /* @__PURE__ */ React168.createElement(
15000
+ return /* @__PURE__ */ React169.createElement("div", { className: "Layer__tasks-component" }, /* @__PURE__ */ React169.createElement(
14992
15001
  TasksHeader,
14993
15002
  {
14994
15003
  tasksHeader: stringOverrides?.header || tasksHeader,
@@ -14996,7 +15005,7 @@ var TasksComponent = ({
14996
15005
  open,
14997
15006
  toggleContent: () => setOpen(!open)
14998
15007
  }
14999
- ), /* @__PURE__ */ React168.createElement(
15008
+ ), /* @__PURE__ */ React169.createElement(
15000
15009
  "div",
15001
15010
  {
15002
15011
  className: classNames59(
@@ -15004,16 +15013,16 @@ var TasksComponent = ({
15004
15013
  !open && "Layer__tasks__content--collapsed"
15005
15014
  )
15006
15015
  },
15007
- isLoading || !data ? /* @__PURE__ */ React168.createElement("div", { className: "Layer__tasks__loader-container" }, /* @__PURE__ */ React168.createElement(Loader2, null)) : /* @__PURE__ */ React168.createElement(React168.Fragment, null, data.length > 0 && /* @__PURE__ */ React168.createElement(TasksPending, null), /* @__PURE__ */ React168.createElement(TasksList, null))
15016
+ isLoading || !data ? /* @__PURE__ */ React169.createElement("div", { className: "Layer__tasks__loader-container" }, /* @__PURE__ */ React169.createElement(Loader2, null)) : /* @__PURE__ */ React169.createElement(React169.Fragment, null, data.length > 0 && /* @__PURE__ */ React169.createElement(TasksPending, null), /* @__PURE__ */ React169.createElement(TasksList, null))
15008
15017
  ));
15009
15018
  };
15010
15019
 
15011
15020
  // src/components/UpsellBanner/BookkeepingUpsellBar.tsx
15012
- import React171 from "react";
15021
+ import React172 from "react";
15013
15022
 
15014
15023
  // src/icons/Coffee.tsx
15015
- import * as React169 from "react";
15016
- var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createElement(
15024
+ import * as React170 from "react";
15025
+ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React170.createElement(
15017
15026
  "svg",
15018
15027
  {
15019
15028
  xmlns: "http://www.w3.org/2000/svg",
@@ -15023,7 +15032,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15023
15032
  width: size,
15024
15033
  height: size
15025
15034
  },
15026
- /* @__PURE__ */ React169.createElement("g", { "clip-path": "url(#clip0_5018_10141)" }, /* @__PURE__ */ React169.createElement(
15035
+ /* @__PURE__ */ React170.createElement("g", { "clip-path": "url(#clip0_5018_10141)" }, /* @__PURE__ */ React170.createElement(
15027
15036
  "path",
15028
15037
  {
15029
15038
  d: "M3.25 4.16666H2.79167C2.30544 4.16666 1.83912 4.35981 1.4953 4.70363C1.15149 5.04744 0.958333 5.51376 0.958333 5.99999C0.958333 6.48622 1.15149 6.95254 1.4953 7.29635C1.83912 7.64017 2.30544 7.83332 2.79167 7.83332H3.25",
@@ -15031,7 +15040,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15031
15040
  strokeLinecap: "round",
15032
15041
  strokeLinejoin: "round"
15033
15042
  }
15034
- ), /* @__PURE__ */ React169.createElement(
15043
+ ), /* @__PURE__ */ React170.createElement(
15035
15044
  "path",
15036
15045
  {
15037
15046
  d: "M10.5834 4.16666H3.25004V8.29166C3.25004 8.77789 3.4432 9.2442 3.78701 9.58802C4.13083 9.93184 4.59714 10.125 5.08337 10.125H8.75004C9.23627 10.125 9.70259 9.93184 10.0464 9.58802C10.3902 9.2442 10.5834 8.77789 10.5834 8.29166V4.16666Z",
@@ -15039,7 +15048,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15039
15048
  strokeLinecap: "round",
15040
15049
  strokeLinejoin: "round"
15041
15050
  }
15042
- ), /* @__PURE__ */ React169.createElement(
15051
+ ), /* @__PURE__ */ React170.createElement(
15043
15052
  "path",
15044
15053
  {
15045
15054
  d: "M8.75 0.958344V2.33334",
@@ -15047,7 +15056,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15047
15056
  strokeLinecap: "round",
15048
15057
  strokeLinejoin: "round"
15049
15058
  }
15050
- ), /* @__PURE__ */ React169.createElement(
15059
+ ), /* @__PURE__ */ React170.createElement(
15051
15060
  "path",
15052
15061
  {
15053
15062
  d: "M6.91663 0.958344V2.33334",
@@ -15055,7 +15064,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15055
15064
  strokeLinecap: "round",
15056
15065
  strokeLinejoin: "round"
15057
15066
  }
15058
- ), /* @__PURE__ */ React169.createElement(
15067
+ ), /* @__PURE__ */ React170.createElement(
15059
15068
  "path",
15060
15069
  {
15061
15070
  d: "M5.08337 0.958344V2.33334",
@@ -15064,7 +15073,7 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15064
15073
  strokeLinejoin: "round"
15065
15074
  }
15066
15075
  )),
15067
- /* @__PURE__ */ React169.createElement("defs", null, /* @__PURE__ */ React169.createElement("clipPath", { id: "clip0_5018_10141" }, /* @__PURE__ */ React169.createElement(
15076
+ /* @__PURE__ */ React170.createElement("defs", null, /* @__PURE__ */ React170.createElement("clipPath", { id: "clip0_5018_10141" }, /* @__PURE__ */ React170.createElement(
15068
15077
  "rect",
15069
15078
  {
15070
15079
  width: "11",
@@ -15077,9 +15086,9 @@ var CoffeeIcon = ({ size = 11, ...props }) => /* @__PURE__ */ React169.createEle
15077
15086
  var Coffee_default = CoffeeIcon;
15078
15087
 
15079
15088
  // src/components/IconBox/IconBox.tsx
15080
- import React170 from "react";
15089
+ import React171 from "react";
15081
15090
  var IconBox = ({ children }) => {
15082
- return /* @__PURE__ */ React170.createElement("span", { className: "Layer__icon-box" }, children);
15091
+ return /* @__PURE__ */ React171.createElement("span", { className: "Layer__icon-box" }, children);
15083
15092
  };
15084
15093
 
15085
15094
  // src/components/UpsellBanner/BookkeepingUpsellBar.tsx
@@ -15087,18 +15096,18 @@ var BookkeepingUpsellBar = ({
15087
15096
  onClick,
15088
15097
  href
15089
15098
  }) => {
15090
- return /* @__PURE__ */ React171.createElement("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping" }, /* @__PURE__ */ React171.createElement("div", { className: "Layer__bar-banner__left-col" }, /* @__PURE__ */ React171.createElement(IconBox, null, /* @__PURE__ */ React171.createElement(Coffee_default, null)), /* @__PURE__ */ React171.createElement("div", { className: "Layer__bar-banner__text-container" }, /* @__PURE__ */ React171.createElement(Text, { size: "md" /* md */, weight: "bold" /* bold */ }, "Need help with your books?"), /* @__PURE__ */ React171.createElement(
15099
+ return /* @__PURE__ */ React172.createElement("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping" }, /* @__PURE__ */ React172.createElement("div", { className: "Layer__bar-banner__left-col" }, /* @__PURE__ */ React172.createElement(IconBox, null, /* @__PURE__ */ React172.createElement(Coffee_default, null)), /* @__PURE__ */ React172.createElement("div", { className: "Layer__bar-banner__text-container" }, /* @__PURE__ */ React172.createElement(Text, { size: "md" /* md */, weight: "bold" /* bold */ }, "Need help with your books?"), /* @__PURE__ */ React172.createElement(
15091
15100
  Text,
15092
15101
  {
15093
15102
  size: "sm" /* sm */,
15094
15103
  className: "Layer__bar-banner__text-container__desc"
15095
15104
  },
15096
15105
  "Order bookkeeping service supported by real humans."
15097
- ))), onClick ? /* @__PURE__ */ React171.createElement(Button, { variant: "secondary" /* secondary */, onClick }, "Schedule a demo") : href ? /* @__PURE__ */ React171.createElement(Link2, { href, target: "_blank", variant: "secondary" /* secondary */ }, "Schedule a demo") : null);
15106
+ ))), onClick ? /* @__PURE__ */ React172.createElement(Button, { variant: "secondary" /* secondary */, onClick }, "Schedule a demo") : href ? /* @__PURE__ */ React172.createElement(Link2, { href, target: "_blank", variant: "secondary" /* secondary */ }, "Schedule a demo") : null);
15098
15107
  };
15099
15108
 
15100
15109
  // src/views/BookkeepingOverview/BookkeepingOverview.tsx
15101
- import React172, { useState as useState51 } from "react";
15110
+ import React173, { useState as useState51 } from "react";
15102
15111
  import classNames60 from "classnames";
15103
15112
  var BookkeepingOverview = ({
15104
15113
  title,
@@ -15107,15 +15116,15 @@ var BookkeepingOverview = ({
15107
15116
  }) => {
15108
15117
  const [pnlToggle, setPnlToggle] = useState51("expenses");
15109
15118
  const [width] = useWindowSize();
15110
- return /* @__PURE__ */ React172.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React172.createElement(TasksProvider, null, /* @__PURE__ */ React172.createElement(
15119
+ return /* @__PURE__ */ React173.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React173.createElement(TasksProvider, null, /* @__PURE__ */ React173.createElement(
15111
15120
  View,
15112
15121
  {
15113
15122
  viewClassName: "Layer__bookkeeping-overview--view",
15114
15123
  title: stringOverrides?.title || title || "Bookkeeping overview",
15115
15124
  withSidebar: width > 1100,
15116
- sidebar: /* @__PURE__ */ React172.createElement(TasksComponent, { stringOverrides: stringOverrides?.tasks })
15125
+ sidebar: /* @__PURE__ */ React173.createElement(TasksComponent, { stringOverrides: stringOverrides?.tasks })
15117
15126
  },
15118
- width <= 1100 && /* @__PURE__ */ React172.createElement(
15127
+ width <= 1100 && /* @__PURE__ */ React173.createElement(
15119
15128
  TasksComponent,
15120
15129
  {
15121
15130
  collapsable: true,
@@ -15123,23 +15132,23 @@ var BookkeepingOverview = ({
15123
15132
  stringOverrides: stringOverrides?.tasks
15124
15133
  }
15125
15134
  ),
15126
- /* @__PURE__ */ React172.createElement(
15135
+ /* @__PURE__ */ React173.createElement(
15127
15136
  Container,
15128
15137
  {
15129
15138
  name: "bookkeeping-overview-profit-and-loss",
15130
15139
  asWidget: true,
15131
15140
  elevated: true
15132
15141
  },
15133
- /* @__PURE__ */ React172.createElement(Header, null, /* @__PURE__ */ React172.createElement(Heading, { size: "secondary" /* secondary */ }, stringOverrides?.profitAndLoss?.header || "Profit & Loss"), /* @__PURE__ */ React172.createElement(ProfitAndLoss.DatePicker, null)),
15134
- /* @__PURE__ */ React172.createElement("div", { className: "Layer__bookkeeping-overview__summaries-row" }, /* @__PURE__ */ React172.createElement(
15142
+ /* @__PURE__ */ React173.createElement(Header, null, /* @__PURE__ */ React173.createElement(Heading, { size: "secondary" /* secondary */ }, stringOverrides?.profitAndLoss?.header || "Profit & Loss"), /* @__PURE__ */ React173.createElement(ProfitAndLoss.DatePicker, null)),
15143
+ /* @__PURE__ */ React173.createElement("div", { className: "Layer__bookkeeping-overview__summaries-row" }, /* @__PURE__ */ React173.createElement(
15135
15144
  ProfitAndLoss.Summaries,
15136
15145
  {
15137
15146
  stringOverrides: stringOverrides?.profitAndLoss?.summaries
15138
15147
  }
15139
15148
  )),
15140
- /* @__PURE__ */ React172.createElement(ProfitAndLoss.Chart, null)
15149
+ /* @__PURE__ */ React173.createElement(ProfitAndLoss.Chart, null)
15141
15150
  ),
15142
- /* @__PURE__ */ React172.createElement("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts" }, /* @__PURE__ */ React172.createElement(
15151
+ /* @__PURE__ */ React173.createElement("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts" }, /* @__PURE__ */ React173.createElement(
15143
15152
  Toggle,
15144
15153
  {
15145
15154
  name: "pnl-detailed-charts",
@@ -15156,7 +15165,7 @@ var BookkeepingOverview = ({
15156
15165
  selected: pnlToggle,
15157
15166
  onChange: (e) => setPnlToggle(e.target.value)
15158
15167
  }
15159
- ), /* @__PURE__ */ React172.createElement(
15168
+ ), /* @__PURE__ */ React173.createElement(
15160
15169
  Container,
15161
15170
  {
15162
15171
  name: classNames60(
@@ -15164,7 +15173,7 @@ var BookkeepingOverview = ({
15164
15173
  pnlToggle !== "revenue" && "bookkeeping-overview-profit-and-loss-chart--hidden"
15165
15174
  )
15166
15175
  },
15167
- /* @__PURE__ */ React172.createElement(
15176
+ /* @__PURE__ */ React173.createElement(
15168
15177
  ProfitAndLoss.DetailedCharts,
15169
15178
  {
15170
15179
  scope: "revenue",
@@ -15172,7 +15181,7 @@ var BookkeepingOverview = ({
15172
15181
  stringOverrides: stringOverrides?.profitAndLoss?.detailedCharts
15173
15182
  }
15174
15183
  )
15175
- ), /* @__PURE__ */ React172.createElement(
15184
+ ), /* @__PURE__ */ React173.createElement(
15176
15185
  Container,
15177
15186
  {
15178
15187
  name: classNames60(
@@ -15180,7 +15189,7 @@ var BookkeepingOverview = ({
15180
15189
  pnlToggle !== "expenses" && "bookkeeping-overview-profit-and-loss-chart--hidden"
15181
15190
  )
15182
15191
  },
15183
- /* @__PURE__ */ React172.createElement(
15192
+ /* @__PURE__ */ React173.createElement(
15184
15193
  ProfitAndLoss.DetailedCharts,
15185
15194
  {
15186
15195
  scope: "expenses",
@@ -15193,29 +15202,29 @@ var BookkeepingOverview = ({
15193
15202
  };
15194
15203
 
15195
15204
  // src/views/AccountingOverview/AccountingOverview.tsx
15196
- import React176, { useState as useState53 } from "react";
15205
+ import React177, { useState as useState53 } from "react";
15197
15206
 
15198
15207
  // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
15199
- import React175, { useContext as useContext37, useEffect as useEffect44, useState as useState52 } from "react";
15208
+ import React176, { useContext as useContext37, useEffect as useEffect44, useState as useState52 } from "react";
15200
15209
 
15201
15210
  // src/components/BadgeLoader/BadgeLoader.tsx
15202
- import React173 from "react";
15211
+ import React174 from "react";
15203
15212
  var BadgeLoader = ({ children }) => {
15204
- return /* @__PURE__ */ React173.createElement("span", { className: "Layer__loader Layer__loader--as-badge" }, /* @__PURE__ */ React173.createElement(Loader_default, { size: 11, className: "Layer__anim--rotating" }), children);
15213
+ return /* @__PURE__ */ React174.createElement("span", { className: "Layer__loader Layer__loader--as-badge" }, /* @__PURE__ */ React174.createElement(Loader_default, { size: 11, className: "Layer__anim--rotating" }), children);
15205
15214
  };
15206
15215
 
15207
15216
  // src/components/NotificationCard/NotificationCard.tsx
15208
- import React174 from "react";
15217
+ import React175 from "react";
15209
15218
  import classNames61 from "classnames";
15210
15219
  var NotificationCard = ({
15211
15220
  onClick,
15212
15221
  children,
15213
15222
  className
15214
15223
  }) => {
15215
- return /* @__PURE__ */ React174.createElement("div", { className: classNames61("Layer__notification-card", className) }, /* @__PURE__ */ React174.createElement("div", { className: "Layer__notification-card__main" }, children), /* @__PURE__ */ React174.createElement(
15224
+ return /* @__PURE__ */ React175.createElement("div", { className: classNames61("Layer__notification-card", className) }, /* @__PURE__ */ React175.createElement("div", { className: "Layer__notification-card__main" }, children), /* @__PURE__ */ React175.createElement(
15216
15225
  IconButton,
15217
15226
  {
15218
- icon: /* @__PURE__ */ React174.createElement(ChevronRight_default, null),
15227
+ icon: /* @__PURE__ */ React175.createElement(ChevronRight_default, null),
15219
15228
  withBorder: true,
15220
15229
  onClick: () => onClick()
15221
15230
  }
@@ -15250,40 +15259,40 @@ var TransactionToReviewCard = ({
15250
15259
  }
15251
15260
  }
15252
15261
  };
15253
- return /* @__PURE__ */ React175.createElement(
15262
+ return /* @__PURE__ */ React176.createElement(
15254
15263
  NotificationCard,
15255
15264
  {
15256
15265
  className: "Layer__txs-to-review",
15257
15266
  onClick: () => onClick && onClick()
15258
15267
  },
15259
- /* @__PURE__ */ React175.createElement(Text, { size: "sm" /* sm */ }, "Transactions to review"),
15260
- loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ React175.createElement(BadgeLoader, null) : null,
15261
- loaded === "complete" && error ? /* @__PURE__ */ React175.createElement(
15268
+ /* @__PURE__ */ React176.createElement(Text, { size: "sm" /* sm */ }, "Transactions to review"),
15269
+ loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ React176.createElement(BadgeLoader, null) : null,
15270
+ loaded === "complete" && error ? /* @__PURE__ */ React176.createElement(
15262
15271
  Badge,
15263
15272
  {
15264
15273
  variant: "error" /* ERROR */,
15265
15274
  size: "small" /* SMALL */,
15266
- icon: /* @__PURE__ */ React175.createElement(RefreshCcw_default, { size: 12 }),
15275
+ icon: /* @__PURE__ */ React176.createElement(RefreshCcw_default, { size: 12 }),
15267
15276
  onClick: () => refetch()
15268
15277
  },
15269
15278
  "Refresh"
15270
15279
  ) : null,
15271
- loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React175.createElement(
15280
+ loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React176.createElement(
15272
15281
  Badge,
15273
15282
  {
15274
15283
  variant: "warning" /* WARNING */,
15275
15284
  size: "small" /* SMALL */,
15276
- icon: /* @__PURE__ */ React175.createElement(Bell_default, { size: 12 })
15285
+ icon: /* @__PURE__ */ React176.createElement(Bell_default, { size: 12 })
15277
15286
  },
15278
15287
  toReview,
15279
15288
  " pending"
15280
15289
  ) : null,
15281
- loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React175.createElement(
15290
+ loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React176.createElement(
15282
15291
  Badge,
15283
15292
  {
15284
15293
  variant: "success" /* SUCCESS */,
15285
15294
  size: "small" /* SMALL */,
15286
- icon: /* @__PURE__ */ React175.createElement(Check_default, { size: 12 })
15295
+ icon: /* @__PURE__ */ React176.createElement(Check_default, { size: 12 })
15287
15296
  },
15288
15297
  "All done"
15289
15298
  ) : null
@@ -15301,32 +15310,32 @@ var AccountingOverview = ({
15301
15310
  stringOverrides
15302
15311
  }) => {
15303
15312
  const [pnlToggle, setPnlToggle] = useState53("expenses");
15304
- return /* @__PURE__ */ React176.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React176.createElement(View, { title, headerControls: /* @__PURE__ */ React176.createElement(ProfitAndLoss.DatePicker, null) }, enableOnboarding && /* @__PURE__ */ React176.createElement(
15313
+ return /* @__PURE__ */ React177.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React177.createElement(View, { title, headerControls: /* @__PURE__ */ React177.createElement(ProfitAndLoss.DatePicker, null) }, enableOnboarding && /* @__PURE__ */ React177.createElement(
15305
15314
  Onboarding,
15306
15315
  {
15307
15316
  onTransactionsToReviewClick
15308
15317
  }
15309
- ), /* @__PURE__ */ React176.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React176.createElement(
15318
+ ), /* @__PURE__ */ React177.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React177.createElement(
15310
15319
  ProfitAndLoss.Summaries,
15311
15320
  {
15312
15321
  stringOverrides: stringOverrides?.profitAndLoss?.summaries
15313
15322
  }
15314
- ), /* @__PURE__ */ React176.createElement(
15323
+ ), /* @__PURE__ */ React177.createElement(
15315
15324
  TransactionToReviewCard,
15316
15325
  {
15317
15326
  usePnlDateRange: true,
15318
15327
  onClick: onTransactionsToReviewClick
15319
15328
  }
15320
- )), /* @__PURE__ */ React176.createElement(
15329
+ )), /* @__PURE__ */ React177.createElement(
15321
15330
  Container,
15322
15331
  {
15323
15332
  name: "accounting-overview-profit-and-loss",
15324
15333
  asWidget: true,
15325
15334
  elevated: true
15326
15335
  },
15327
- /* @__PURE__ */ React176.createElement(Header, null, /* @__PURE__ */ React176.createElement(Heading, { size: "secondary" /* secondary */ }, stringOverrides?.header || "Profit & Loss")),
15328
- /* @__PURE__ */ React176.createElement(ProfitAndLoss.Chart, null)
15329
- ), middleBanner && /* @__PURE__ */ React176.createElement(Container, { name: "accounting-overview-middle-banner" }, middleBanner), /* @__PURE__ */ React176.createElement("div", { className: "Layer__accounting-overview-profit-and-loss-charts" }, /* @__PURE__ */ React176.createElement(
15336
+ /* @__PURE__ */ React177.createElement(Header, null, /* @__PURE__ */ React177.createElement(Heading, { size: "secondary" /* secondary */ }, stringOverrides?.header || "Profit & Loss")),
15337
+ /* @__PURE__ */ React177.createElement(ProfitAndLoss.Chart, null)
15338
+ ), middleBanner && /* @__PURE__ */ React177.createElement(Container, { name: "accounting-overview-middle-banner" }, middleBanner), /* @__PURE__ */ React177.createElement("div", { className: "Layer__accounting-overview-profit-and-loss-charts" }, /* @__PURE__ */ React177.createElement(
15330
15339
  Toggle,
15331
15340
  {
15332
15341
  name: "pnl-detailed-charts",
@@ -15343,7 +15352,7 @@ var AccountingOverview = ({
15343
15352
  selected: pnlToggle,
15344
15353
  onChange: (e) => setPnlToggle(e.target.value)
15345
15354
  }
15346
- ), /* @__PURE__ */ React176.createElement(
15355
+ ), /* @__PURE__ */ React177.createElement(
15347
15356
  Container,
15348
15357
  {
15349
15358
  name: classNames62(
@@ -15351,7 +15360,7 @@ var AccountingOverview = ({
15351
15360
  pnlToggle !== "revenue" && "accounting-overview-profit-and-loss-chart--hidden"
15352
15361
  )
15353
15362
  },
15354
- /* @__PURE__ */ React176.createElement(
15363
+ /* @__PURE__ */ React177.createElement(
15355
15364
  ProfitAndLoss.DetailedCharts,
15356
15365
  {
15357
15366
  scope: "revenue",
@@ -15360,7 +15369,7 @@ var AccountingOverview = ({
15360
15369
  chartColorsList
15361
15370
  }
15362
15371
  )
15363
- ), /* @__PURE__ */ React176.createElement(
15372
+ ), /* @__PURE__ */ React177.createElement(
15364
15373
  Container,
15365
15374
  {
15366
15375
  name: classNames62(
@@ -15368,7 +15377,7 @@ var AccountingOverview = ({
15368
15377
  pnlToggle !== "expenses" && "accounting-overview-profit-and-loss-chart--hidden"
15369
15378
  )
15370
15379
  },
15371
- /* @__PURE__ */ React176.createElement(
15380
+ /* @__PURE__ */ React177.createElement(
15372
15381
  ProfitAndLoss.DetailedCharts,
15373
15382
  {
15374
15383
  scope: "expenses",
@@ -15381,7 +15390,7 @@ var AccountingOverview = ({
15381
15390
  };
15382
15391
 
15383
15392
  // src/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts.tsx
15384
- import React177 from "react";
15393
+ import React178 from "react";
15385
15394
  var BankTransactionsWithLinkedAccounts = ({
15386
15395
  title,
15387
15396
  // deprecated
@@ -15395,7 +15404,7 @@ var BankTransactionsWithLinkedAccounts = ({
15395
15404
  mobileComponent,
15396
15405
  stringOverrides
15397
15406
  }) => {
15398
- return /* @__PURE__ */ React177.createElement(View, { title: stringOverrides?.title || title || "Bank transactions" }, /* @__PURE__ */ React177.createElement(
15407
+ return /* @__PURE__ */ React178.createElement(View, { title: stringOverrides?.title || title || "Bank transactions" }, /* @__PURE__ */ React178.createElement(
15399
15408
  LinkedAccounts,
15400
15409
  {
15401
15410
  elevated: elevatedLinkedAccounts,
@@ -15404,7 +15413,7 @@ var BankTransactionsWithLinkedAccounts = ({
15404
15413
  showBreakConnection,
15405
15414
  stringOverrides: stringOverrides?.linkedAccounts
15406
15415
  }
15407
- ), /* @__PURE__ */ React177.createElement(
15416
+ ), /* @__PURE__ */ React178.createElement(
15408
15417
  BankTransactions,
15409
15418
  {
15410
15419
  asWidget: true,
@@ -15418,14 +15427,14 @@ var BankTransactionsWithLinkedAccounts = ({
15418
15427
  };
15419
15428
 
15420
15429
  // src/views/GeneralLedger/GeneralLedger.tsx
15421
- import React178, { useState as useState54 } from "react";
15430
+ import React179, { useState as useState54 } from "react";
15422
15431
  var GeneralLedgerView = ({
15423
15432
  title,
15424
15433
  // deprecated
15425
15434
  stringOverrides
15426
15435
  }) => {
15427
15436
  const [activeTab, setActiveTab] = useState54("chartOfAccounts");
15428
- return /* @__PURE__ */ React178.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React178.createElement(View, { title: stringOverrides?.title || title || "General Ledger" }, /* @__PURE__ */ React178.createElement(
15437
+ return /* @__PURE__ */ React179.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React179.createElement(View, { title: stringOverrides?.title || title || "General Ledger" }, /* @__PURE__ */ React179.createElement(
15429
15438
  Toggle,
15430
15439
  {
15431
15440
  name: "general-ledger-tabs",
@@ -15442,18 +15451,18 @@ var GeneralLedgerView = ({
15442
15451
  selected: activeTab,
15443
15452
  onChange: (opt) => setActiveTab(opt.target.value)
15444
15453
  }
15445
- ), /* @__PURE__ */ React178.createElement(Container, { name: "generalLedger" }, activeTab === "chartOfAccounts" ? /* @__PURE__ */ React178.createElement(
15454
+ ), /* @__PURE__ */ React179.createElement(Container, { name: "generalLedger" }, activeTab === "chartOfAccounts" ? /* @__PURE__ */ React179.createElement(
15446
15455
  ChartOfAccounts,
15447
15456
  {
15448
15457
  asWidget: true,
15449
15458
  withExpandAllButton: true,
15450
15459
  stringOverrides: stringOverrides?.chartOfAccounts
15451
15460
  }
15452
- ) : /* @__PURE__ */ React178.createElement(Journal, { stringOverrides: stringOverrides?.journal }))));
15461
+ ) : /* @__PURE__ */ React179.createElement(Journal, { stringOverrides: stringOverrides?.journal }))));
15453
15462
  };
15454
15463
 
15455
15464
  // src/views/Reports/Reports.tsx
15456
- import React179, { useContext as useContext38, useRef as useRef16, useState as useState55 } from "react";
15465
+ import React180, { useContext as useContext38, useRef as useRef16, useState as useState55 } from "react";
15457
15466
  var DownloadButton2 = ({
15458
15467
  stringOverrides
15459
15468
  }) => {
@@ -15486,7 +15495,7 @@ var DownloadButton2 = ({
15486
15495
  setRequestFailed(true);
15487
15496
  }
15488
15497
  };
15489
- return requestFailed ? /* @__PURE__ */ React179.createElement(
15498
+ return requestFailed ? /* @__PURE__ */ React180.createElement(
15490
15499
  RetryButton,
15491
15500
  {
15492
15501
  onClick: handleClick,
@@ -15494,11 +15503,11 @@ var DownloadButton2 = ({
15494
15503
  error: "Approval failed. Check connection and retry in few seconds."
15495
15504
  },
15496
15505
  stringOverrides?.retryButtonText || "Retry"
15497
- ) : /* @__PURE__ */ React179.createElement(
15506
+ ) : /* @__PURE__ */ React180.createElement(
15498
15507
  Button,
15499
15508
  {
15500
15509
  variant: "secondary" /* secondary */,
15501
- rightIcon: /* @__PURE__ */ React179.createElement(DownloadCloud_default, { size: 12 }),
15510
+ rightIcon: /* @__PURE__ */ React180.createElement(DownloadCloud_default, { size: 12 }),
15502
15511
  onClick: handleClick
15503
15512
  },
15504
15513
  stringOverrides?.downloadButtonText || "Download"
@@ -15529,7 +15538,7 @@ var Reports = ({
15529
15538
  const [activeTab, setActiveTab] = useState55(enabledReports[0]);
15530
15539
  const options = getOptions(enabledReports);
15531
15540
  const defaultTitle = enabledReports.length > 1 ? "Reports" : options.find((option) => option.value = enabledReports[0])?.label;
15532
- return /* @__PURE__ */ React179.createElement(View, { title: stringOverrides?.title || title || defaultTitle }, enabledReports.length > 1 && /* @__PURE__ */ React179.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React179.createElement(
15541
+ return /* @__PURE__ */ React180.createElement(View, { title: stringOverrides?.title || title || defaultTitle }, enabledReports.length > 1 && /* @__PURE__ */ React180.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React180.createElement(
15533
15542
  Toggle,
15534
15543
  {
15535
15544
  name: "reports-tabs",
@@ -15537,7 +15546,7 @@ var Reports = ({
15537
15546
  selected: activeTab,
15538
15547
  onChange: (opt) => setActiveTab(opt.target.value)
15539
15548
  }
15540
- )), /* @__PURE__ */ React179.createElement(Container, { name: "reports", ref: containerRef }, /* @__PURE__ */ React179.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React179.createElement(
15549
+ )), /* @__PURE__ */ React180.createElement(Container, { name: "reports", ref: containerRef }, /* @__PURE__ */ React180.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React180.createElement(
15541
15550
  ReportsPanel,
15542
15551
  {
15543
15552
  containerRef,
@@ -15552,21 +15561,21 @@ var ReportsPanel = ({
15552
15561
  stringOverrides
15553
15562
  }) => {
15554
15563
  const { sidebarScope } = useContext38(ProfitAndLoss.Context);
15555
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, openReport === "profitAndLoss" && /* @__PURE__ */ React179.createElement(TableProvider, null, /* @__PURE__ */ React179.createElement(
15564
+ return /* @__PURE__ */ React180.createElement(React180.Fragment, null, openReport === "profitAndLoss" && /* @__PURE__ */ React180.createElement(
15556
15565
  View,
15557
15566
  {
15558
15567
  type: "panel",
15559
- headerControls: /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(ProfitAndLoss.DatePicker, null), /* @__PURE__ */ React179.createElement(
15568
+ headerControls: /* @__PURE__ */ React180.createElement(React180.Fragment, null, /* @__PURE__ */ React180.createElement(ProfitAndLoss.DatePicker, null), /* @__PURE__ */ React180.createElement(
15560
15569
  DownloadButton2,
15561
15570
  {
15562
15571
  stringOverrides: stringOverrides?.downloadButton
15563
15572
  }
15564
15573
  ))
15565
15574
  },
15566
- /* @__PURE__ */ React179.createElement(
15575
+ /* @__PURE__ */ React180.createElement(
15567
15576
  Panel,
15568
15577
  {
15569
- sidebar: /* @__PURE__ */ React179.createElement(
15578
+ sidebar: /* @__PURE__ */ React180.createElement(
15570
15579
  ProfitAndLoss.DetailedCharts,
15571
15580
  {
15572
15581
  showDatePicker: false,
@@ -15576,7 +15585,7 @@ var ReportsPanel = ({
15576
15585
  sidebarIsOpen: Boolean(sidebarScope),
15577
15586
  parentRef: containerRef
15578
15587
  },
15579
- /* @__PURE__ */ React179.createElement(
15588
+ /* @__PURE__ */ React180.createElement(
15580
15589
  ProfitAndLoss.Table,
15581
15590
  {
15582
15591
  asContainer: false,
@@ -15584,7 +15593,7 @@ var ReportsPanel = ({
15584
15593
  }
15585
15594
  )
15586
15595
  )
15587
- )), openReport === "balanceSheet" && /* @__PURE__ */ React179.createElement(BalanceSheet, { stringOverrides: stringOverrides?.balanceSheet }), openReport === "statementOfCashFlow" && /* @__PURE__ */ React179.createElement(
15596
+ ), openReport === "balanceSheet" && /* @__PURE__ */ React180.createElement(BalanceSheet, { stringOverrides: stringOverrides?.balanceSheet }), openReport === "statementOfCashFlow" && /* @__PURE__ */ React180.createElement(
15588
15597
  StatementOfCashFlow,
15589
15598
  {
15590
15599
  stringOverrides: stringOverrides?.statementOfCashflow
@@ -15593,11 +15602,11 @@ var ReportsPanel = ({
15593
15602
  };
15594
15603
 
15595
15604
  // src/components/ProfitAndLossView/ProfitAndLossView.tsx
15596
- import React180, { useContext as useContext39, useRef as useRef17 } from "react";
15605
+ import React181, { useContext as useContext39, useRef as useRef17 } from "react";
15597
15606
  var COMPONENT_NAME7 = "profit-and-loss";
15598
15607
  var ProfitAndLossView = (props) => {
15599
15608
  const containerRef = useRef17(null);
15600
- return /* @__PURE__ */ React180.createElement(Container, { name: COMPONENT_NAME7, ref: containerRef }, /* @__PURE__ */ React180.createElement(ProfitAndLoss, null, /* @__PURE__ */ React180.createElement(ProfitAndLossPanel, { containerRef, ...props })));
15609
+ return /* @__PURE__ */ React181.createElement(Container, { name: COMPONENT_NAME7, ref: containerRef }, /* @__PURE__ */ React181.createElement(ProfitAndLoss, null, /* @__PURE__ */ React181.createElement(ProfitAndLossPanel, { containerRef, ...props })));
15601
15610
  };
15602
15611
  var ProfitAndLossPanel = ({
15603
15612
  containerRef,
@@ -15605,10 +15614,10 @@ var ProfitAndLossPanel = ({
15605
15614
  ...props
15606
15615
  }) => {
15607
15616
  const { sidebarScope } = useContext39(ProfitAndLoss.Context);
15608
- return /* @__PURE__ */ React180.createElement(
15617
+ return /* @__PURE__ */ React181.createElement(
15609
15618
  Panel,
15610
15619
  {
15611
- sidebar: /* @__PURE__ */ React180.createElement(
15620
+ sidebar: /* @__PURE__ */ React181.createElement(
15612
15621
  ProfitAndLossDetailedCharts,
15613
15622
  {
15614
15623
  stringOverrides: stringOverrides?.profitAndLossDetailedCharts
@@ -15617,8 +15626,8 @@ var ProfitAndLossPanel = ({
15617
15626
  sidebarIsOpen: Boolean(sidebarScope),
15618
15627
  parentRef: containerRef
15619
15628
  },
15620
- /* @__PURE__ */ React180.createElement(Header, { className: `Layer__${COMPONENT_NAME7}__header` }, /* @__PURE__ */ React180.createElement(Heading, { className: "Layer__profit-and-loss__title" }, stringOverrides?.header || "Profit & Loss")),
15621
- /* @__PURE__ */ React180.createElement(Components, { stringOverrides, ...props })
15629
+ /* @__PURE__ */ React181.createElement(Header, { className: `Layer__${COMPONENT_NAME7}__header` }, /* @__PURE__ */ React181.createElement(Heading, { className: "Layer__profit-and-loss__title" }, stringOverrides?.header || "Profit & Loss")),
15630
+ /* @__PURE__ */ React181.createElement(Components, { stringOverrides, ...props })
15622
15631
  );
15623
15632
  };
15624
15633
  var Components = ({
@@ -15630,7 +15639,7 @@ var Components = ({
15630
15639
  ProfitAndLoss.Context
15631
15640
  );
15632
15641
  if (!isLoading && error) {
15633
- return /* @__PURE__ */ React180.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React180.createElement(
15642
+ return /* @__PURE__ */ React181.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React181.createElement(
15634
15643
  DataState,
15635
15644
  {
15636
15645
  status: "failed" /* failed */,
@@ -15641,13 +15650,13 @@ var Components = ({
15641
15650
  }
15642
15651
  ));
15643
15652
  }
15644
- return /* @__PURE__ */ React180.createElement(React180.Fragment, null, !hideChart && /* @__PURE__ */ React180.createElement("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries` }, /* @__PURE__ */ React180.createElement(
15653
+ return /* @__PURE__ */ React181.createElement(React181.Fragment, null, !hideChart && /* @__PURE__ */ React181.createElement("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries` }, /* @__PURE__ */ React181.createElement(
15645
15654
  "div",
15646
15655
  {
15647
15656
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__summary-col`
15648
15657
  },
15649
- /* @__PURE__ */ React180.createElement(ProfitAndLoss.DatePicker, null),
15650
- /* @__PURE__ */ React180.createElement(
15658
+ /* @__PURE__ */ React181.createElement(ProfitAndLoss.DatePicker, null),
15659
+ /* @__PURE__ */ React181.createElement(
15651
15660
  ProfitAndLoss.Summaries,
15652
15661
  {
15653
15662
  vertical: true,
@@ -15655,18 +15664,18 @@ var Components = ({
15655
15664
  stringOverrides: stringOverrides?.profitAndLossSummaries
15656
15665
  }
15657
15666
  )
15658
- ), /* @__PURE__ */ React180.createElement(
15667
+ ), /* @__PURE__ */ React181.createElement(
15659
15668
  "div",
15660
15669
  {
15661
15670
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__chart-col`
15662
15671
  },
15663
- /* @__PURE__ */ React180.createElement(ProfitAndLoss.Chart, null)
15664
- )), !hideTable && /* @__PURE__ */ React180.createElement(TableProvider, null, /* @__PURE__ */ React180.createElement(
15672
+ /* @__PURE__ */ React181.createElement(ProfitAndLoss.Chart, null)
15673
+ )), !hideTable && /* @__PURE__ */ React181.createElement(
15665
15674
  ProfitAndLoss.Table,
15666
15675
  {
15667
15676
  stringOverrides: stringOverrides?.profitAndLossTable
15668
15677
  }
15669
- )));
15678
+ ));
15670
15679
  };
15671
15680
  export {
15672
15681
  AccountingOverview,