@layerfi/components 0.1.75 → 0.1.77

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
@@ -554,7 +554,7 @@ var Drawer = ({
554
554
  };
555
555
 
556
556
  // src/components/Toast/Toast.tsx
557
- import React2, { forwardRef } from "react";
557
+ import React2 from "react";
558
558
 
559
559
  // src/contexts/LayerContext/LayerContext.tsx
560
560
  import { createContext as createContext2, useContext as useContext2 } from "react";
@@ -582,7 +582,7 @@ var LayerContext = createContext2({
582
582
  setOnboardingStep: () => void 0,
583
583
  environment: "",
584
584
  toasts: [],
585
- addToast: (toast) => void 0,
585
+ addToast: (_toast) => void 0,
586
586
  removeToast: () => void 0,
587
587
  onError: () => void 0,
588
588
  touch: () => void 0,
@@ -613,10 +613,10 @@ var Toast = (props) => {
613
613
  /* @__PURE__ */ React2.createElement("p", null, content)
614
614
  );
615
615
  };
616
- var ToastsContainer = forwardRef((_props) => {
616
+ function ToastsContainer() {
617
617
  const { toasts } = useLayerContext();
618
618
  return /* @__PURE__ */ React2.createElement("div", { className: "Layer__toasts-container" }, toasts.map((toast, idx) => /* @__PURE__ */ React2.createElement(Toast, __spreadValues({ key: `layer-toast-${idx}` }, toast))));
619
- });
619
+ }
620
620
 
621
621
  // src/components/GlobalWidgets/GlobalWidgets.tsx
622
622
  var DrawerWidget = () => {
@@ -1161,7 +1161,6 @@ var useLinkedAccounts = () => {
1161
1161
  } = useLayerContext();
1162
1162
  const [linkToken, setLinkToken] = useState4(null);
1163
1163
  const [loadingStatus, setLoadingStatus] = useState4("initial");
1164
- const USE_PLAID_SANDBOX = usePlaidSandbox != null ? usePlaidSandbox : true;
1165
1164
  const [linkMode, setLinkMode] = useState4("add");
1166
1165
  const queryKey = businessId && (auth == null ? void 0 : auth.access_token) && `linked-accounts-${businessId}`;
1167
1166
  const {
@@ -1230,7 +1229,7 @@ var useLinkedAccounts = () => {
1230
1229
  }
1231
1230
  }),
1232
1231
  onExit: () => setLinkMode("add"),
1233
- env: USE_PLAID_SANDBOX ? "sandbox" : void 0
1232
+ env: usePlaidSandbox ? "sandbox" : void 0
1234
1233
  });
1235
1234
  useEffect2(() => {
1236
1235
  if (plaidLinkReady) {
@@ -1271,6 +1270,7 @@ var useLinkedAccounts = () => {
1271
1270
  }
1272
1271
  });
1273
1272
  const unlinkAccount2 = (source, accountId) => __async(void 0, null, function* () {
1273
+ DEBUG && console.debug("unlinking account");
1274
1274
  if (source === "PLAID") {
1275
1275
  yield Layer.unlinkAccount(apiUrl, auth == null ? void 0 : auth.access_token, {
1276
1276
  params: { businessId, accountId }
@@ -1284,7 +1284,7 @@ var useLinkedAccounts = () => {
1284
1284
  }
1285
1285
  });
1286
1286
  const confirmAccount = (source, accountId) => __async(void 0, null, function* () {
1287
- DEBUG && console.log("confirming account");
1287
+ DEBUG && console.debug("confirming account");
1288
1288
  if (source === "PLAID") {
1289
1289
  yield Layer.confirmConnection(apiUrl, auth == null ? void 0 : auth.access_token, {
1290
1290
  params: {
@@ -1301,7 +1301,7 @@ var useLinkedAccounts = () => {
1301
1301
  }
1302
1302
  });
1303
1303
  const denyAccount = (source, accountId) => __async(void 0, null, function* () {
1304
- DEBUG && console.log("confirming account");
1304
+ DEBUG && console.debug("confirming account");
1305
1305
  if (source === "PLAID") {
1306
1306
  yield Layer.denyConnection(apiUrl, auth == null ? void 0 : auth.access_token, {
1307
1307
  params: {
@@ -1318,7 +1318,7 @@ var useLinkedAccounts = () => {
1318
1318
  }
1319
1319
  });
1320
1320
  const breakConnection = (source, connectionExternalId) => __async(void 0, null, function* () {
1321
- DEBUG && console.log("Breaking sandbox plaid item connection");
1321
+ DEBUG && console.debug("Breaking sandbox plaid item connection");
1322
1322
  if (source === "PLAID") {
1323
1323
  yield Layer.breakPlaidItemConnection(apiUrl, auth == null ? void 0 : auth.access_token, {
1324
1324
  params: {
@@ -1335,23 +1335,23 @@ var useLinkedAccounts = () => {
1335
1335
  }
1336
1336
  });
1337
1337
  const refetchAccounts = () => __async(void 0, null, function* () {
1338
- DEBUG && console.log("refetching accounts...");
1338
+ DEBUG && console.debug("refetching accounts...");
1339
1339
  yield mutate();
1340
1340
  });
1341
1341
  const syncAccounts = () => __async(void 0, null, function* () {
1342
- DEBUG && console.log("resyncing accounts...");
1342
+ DEBUG && console.debug("resyncing accounts...");
1343
1343
  yield Layer.syncConnection(apiUrl, auth == null ? void 0 : auth.access_token, {
1344
1344
  params: { businessId }
1345
1345
  });
1346
1346
  });
1347
1347
  const updateConnectionStatus2 = () => __async(void 0, null, function* () {
1348
- DEBUG && console.log("updating connection status...");
1348
+ DEBUG && console.debug("updating connection status...");
1349
1349
  yield Layer.updateConnectionStatus(apiUrl, auth == null ? void 0 : auth.access_token, {
1350
1350
  params: { businessId }
1351
1351
  });
1352
1352
  });
1353
1353
  const unlinkPlaidItem2 = (plaidItemPlaidId) => __async(void 0, null, function* () {
1354
- DEBUG && console.log("unlinking plaid item");
1354
+ DEBUG && console.debug("unlinking plaid item");
1355
1355
  yield Layer.unlinkPlaidItem(apiUrl, auth == null ? void 0 : auth.access_token, {
1356
1356
  params: { businessId, plaidItemPlaidId }
1357
1357
  });
@@ -1881,7 +1881,12 @@ var BusinessProvider = ({
1881
1881
  };
1882
1882
  errorHandler.setOnError(onError);
1883
1883
  const colors = buildColorsPalette(theme);
1884
- const { url, scope, apiUrl } = LayerEnvironment[environment];
1884
+ const {
1885
+ url,
1886
+ scope,
1887
+ apiUrl,
1888
+ usePlaidSandbox: defaultUsePlaidSandbox
1889
+ } = LayerEnvironment[environment];
1885
1890
  const [state, dispatch] = useReducer(reducer, {
1886
1891
  auth: {
1887
1892
  access_token: "",
@@ -1895,7 +1900,7 @@ var BusinessProvider = ({
1895
1900
  apiUrl,
1896
1901
  theme,
1897
1902
  colors,
1898
- usePlaidSandbox,
1903
+ usePlaidSandbox: usePlaidSandbox != null ? usePlaidSandbox : defaultUsePlaidSandbox,
1899
1904
  onboardingStep: void 0,
1900
1905
  environment,
1901
1906
  toasts: [],
@@ -2099,22 +2104,26 @@ var LayerEnvironment = {
2099
2104
  production: {
2100
2105
  url: "https://auth.layerfi.com/oauth2/token",
2101
2106
  scope: "https://api.layerfi.com/production",
2102
- apiUrl: "https://api.layerfi.com"
2107
+ apiUrl: "https://api.layerfi.com",
2108
+ usePlaidSandbox: false
2103
2109
  },
2104
2110
  sandbox: {
2105
2111
  url: "https://auth.layerfi.com/oauth2/token",
2106
2112
  scope: "https://sandbox.layerfi.com/sandbox",
2107
- apiUrl: "https://sandbox.layerfi.com"
2113
+ apiUrl: "https://sandbox.layerfi.com",
2114
+ usePlaidSandbox: true
2108
2115
  },
2109
2116
  staging: {
2110
2117
  url: "https://auth.layerfi.com/oauth2/token",
2111
2118
  scope: "https://sandbox.layerfi.com/sandbox",
2112
- apiUrl: "https://staging.layerfi.com"
2119
+ apiUrl: "https://staging.layerfi.com",
2120
+ usePlaidSandbox: true
2113
2121
  },
2114
2122
  internalStaging: {
2115
2123
  url: "https://auth.layerfi.com/oauth2/token",
2116
2124
  scope: "https://sandbox.layerfi.com/sandbox",
2117
- apiUrl: "https://staging.layerfi.com"
2125
+ apiUrl: "https://staging.layerfi.com",
2126
+ usePlaidSandbox: true
2118
2127
  }
2119
2128
  };
2120
2129
  var LayerProvider = (props) => {
@@ -2170,9 +2179,9 @@ var LinkedAccountsProvider = ({
2170
2179
  };
2171
2180
 
2172
2181
  // src/components/Container/Container.tsx
2173
- import React8, { forwardRef as forwardRef2 } from "react";
2182
+ import React8, { forwardRef } from "react";
2174
2183
  import classNames2 from "classnames";
2175
- var Container = forwardRef2(
2184
+ var Container = forwardRef(
2176
2185
  ({
2177
2186
  name,
2178
2187
  className,
@@ -2203,11 +2212,12 @@ var Container = forwardRef2(
2203
2212
  );
2204
2213
  }
2205
2214
  );
2215
+ Container.displayName = "Container";
2206
2216
 
2207
2217
  // src/components/Container/Header.tsx
2208
- import React9, { forwardRef as forwardRef3 } from "react";
2218
+ import React9, { forwardRef as forwardRef2 } from "react";
2209
2219
  import classNames3 from "classnames";
2210
- var Header = forwardRef3(
2220
+ var Header = forwardRef2(
2211
2221
  ({ className, children, style, layout }, ref) => {
2212
2222
  const baseClassName = classNames3(
2213
2223
  "Layer__component-header",
@@ -2217,6 +2227,7 @@ var Header = forwardRef3(
2217
2227
  return /* @__PURE__ */ React9.createElement("header", { ref, className: baseClassName, style }, children);
2218
2228
  }
2219
2229
  );
2230
+ Header.displayName = "Header";
2220
2231
 
2221
2232
  // src/components/Onboarding/ConnectAccount.tsx
2222
2233
  import React48, { useContext as useContext5, useMemo as useMemo3 } from "react";
@@ -2638,7 +2649,7 @@ var Loader_default = Loader;
2638
2649
 
2639
2650
  // src/components/Tooltip/Tooltip.tsx
2640
2651
  import React19, {
2641
- forwardRef as forwardRef4,
2652
+ forwardRef as forwardRef3,
2642
2653
  isValidElement,
2643
2654
  cloneElement
2644
2655
  } from "react";
@@ -2736,7 +2747,7 @@ var Tooltip = (_a) => {
2736
2747
  const tooltip = useTooltip(options);
2737
2748
  return /* @__PURE__ */ React19.createElement(TooltipContext.Provider, { value: tooltip }, children);
2738
2749
  };
2739
- var TooltipTrigger = forwardRef4(function TooltipTrigger2(_a, propRef) {
2750
+ var TooltipTrigger = forwardRef3(function TooltipTrigger2(_a, propRef) {
2740
2751
  var _b = _a, { children, asChild = false } = _b, props = __objRest(_b, ["children", "asChild"]);
2741
2752
  const context = useTooltipContext();
2742
2753
  const childrenRef = children.ref;
@@ -2761,8 +2772,8 @@ var TooltipTrigger = forwardRef4(function TooltipTrigger2(_a, propRef) {
2761
2772
  children
2762
2773
  );
2763
2774
  });
2764
- var TooltipContent = forwardRef4(function TooltipContent2(_a, propRef) {
2765
- var _b = _a, { style, className } = _b, props = __objRest(_b, ["style", "className"]);
2775
+ var TooltipContent = forwardRef3(function TooltipContent2(_a, propRef) {
2776
+ var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2766
2777
  const context = useTooltipContext();
2767
2778
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
2768
2779
  if (!context.open || context.disabled)
@@ -2870,7 +2881,7 @@ import classNames5 from "classnames";
2870
2881
  var IconButton = (_a) => {
2871
2882
  var _b = _a, {
2872
2883
  className,
2873
- children,
2884
+ children: _children,
2874
2885
  icon,
2875
2886
  active,
2876
2887
  withBorder = false,
@@ -2970,7 +2981,7 @@ var RetryButton = (_a) => {
2970
2981
  className,
2971
2982
  processing,
2972
2983
  disabled,
2973
- error,
2984
+ error: _error,
2974
2985
  children
2975
2986
  } = _b, props = __objRest(_b, [
2976
2987
  "className",
@@ -3235,11 +3246,9 @@ import classNames9 from "classnames";
3235
3246
  var BackButton = (_a) => {
3236
3247
  var _b = _a, {
3237
3248
  className,
3238
- children,
3239
3249
  textOnly = false
3240
3250
  } = _b, props = __objRest(_b, [
3241
3251
  "className",
3242
- "children",
3243
3252
  "textOnly"
3244
3253
  ]);
3245
3254
  const baseClassName = classNames9("Layer__btn", "Layer__back-btn", className);
@@ -3290,11 +3299,9 @@ import classNames10 from "classnames";
3290
3299
  var CloseButton = (_a) => {
3291
3300
  var _b = _a, {
3292
3301
  className,
3293
- children,
3294
3302
  textOnly = false
3295
3303
  } = _b, props = __objRest(_b, [
3296
3304
  "className",
3297
- "children",
3298
3305
  "textOnly"
3299
3306
  ]);
3300
3307
  const baseClassName = classNames10("Layer__btn", "Layer__back-btn", className);
@@ -3307,11 +3314,9 @@ import classNames11 from "classnames";
3307
3314
  var ExpandButton = (_a) => {
3308
3315
  var _b = _a, {
3309
3316
  className,
3310
- children,
3311
3317
  collapsed
3312
3318
  } = _b, props = __objRest(_b, [
3313
3319
  "className",
3314
- "children",
3315
3320
  "collapsed"
3316
3321
  ]);
3317
3322
  const baseClassName = classNames11(
@@ -3640,9 +3645,9 @@ var TextWithTooltip = (_a) => {
3640
3645
  as: Component2 = "p",
3641
3646
  className,
3642
3647
  children,
3643
- size = "md" /* md */,
3644
- weight = "normal" /* normal */,
3645
- withTooltip = "whenTruncated" /* whenTruncated */,
3648
+ size: _size = "md" /* md */,
3649
+ weight: _weight = "normal" /* normal */,
3650
+ withTooltip: _withTooltip = "whenTruncated" /* whenTruncated */,
3646
3651
  tooltipOptions
3647
3652
  } = _b, props = __objRest(_b, [
3648
3653
  "as",
@@ -4782,7 +4787,7 @@ var LinkedAccountsComponent = ({
4782
4787
  };
4783
4788
 
4784
4789
  // src/components/BankTransactions/BankTransactions.tsx
4785
- import React124, { useEffect as useEffect22, useMemo as useMemo6, useState as useState28 } from "react";
4790
+ import React124, { useEffect as useEffect22, useMemo as useMemo8, useState as useState28 } from "react";
4786
4791
 
4787
4792
  // src/hooks/useElementSize/useElementSize.ts
4788
4793
  import { useLayoutEffect as useLayoutEffect2, useRef as useRef6 } from "react";
@@ -4932,7 +4937,7 @@ var File = (_a) => {
4932
4937
  var File_default = File;
4933
4938
 
4934
4939
  // src/components/BankTransactionRow/BankTransactionRow.tsx
4935
- import React96, { useEffect as useEffect13, useRef as useRef9, useState as useState16 } from "react";
4940
+ import React96, { useEffect as useEffect13, useMemo as useMemo4, useRef as useRef9, useState as useState16 } from "react";
4936
4941
 
4937
4942
  // src/icons/Scissors.tsx
4938
4943
  import * as React65 from "react";
@@ -5067,6 +5072,19 @@ var Scissors = (_a) => {
5067
5072
  };
5068
5073
  var Scissors_default = Scissors;
5069
5074
 
5075
+ // src/utils/styleUtils/toDataProperties.ts
5076
+ function toDataProperties(input) {
5077
+ const unsafeProperties = Object.fromEntries(
5078
+ Object.entries(input).map(([key, value]) => {
5079
+ if (typeof value !== "string" && typeof value !== "number" && value !== true) {
5080
+ return null;
5081
+ }
5082
+ return [`data-${key}`, value];
5083
+ }).filter((entry) => entry !== null)
5084
+ );
5085
+ return unsafeProperties;
5086
+ }
5087
+
5070
5088
  // src/components/CategorySelect/CategorySelect.tsx
5071
5089
  import React73 from "react";
5072
5090
  import Select, {
@@ -5387,7 +5405,7 @@ import classNames24 from "classnames";
5387
5405
  var CategorySelectDrawer = ({
5388
5406
  onSelect,
5389
5407
  selected,
5390
- showTooltips
5408
+ showTooltips: _showTooltips
5391
5409
  }) => {
5392
5410
  var _a, _b;
5393
5411
  const { setContent, close } = useContext10(DrawerContext);
@@ -5661,7 +5679,7 @@ var CategorySelect = ({
5661
5679
 
5662
5680
  // src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
5663
5681
  import React93, {
5664
- forwardRef as forwardRef6,
5682
+ forwardRef as forwardRef5,
5665
5683
  useImperativeHandle as useImperativeHandle2,
5666
5684
  useState as useState15,
5667
5685
  useCallback,
@@ -5788,7 +5806,7 @@ var Trash = (_a) => {
5788
5806
  var Trash_default = Trash;
5789
5807
 
5790
5808
  // src/components/BankTransactionReceipts/BankTransactionReceipts.tsx
5791
- import React86, { forwardRef as forwardRef5, useImperativeHandle } from "react";
5809
+ import React86, { forwardRef as forwardRef4, useImperativeHandle } from "react";
5792
5810
 
5793
5811
  // src/contexts/ReceiptsContext/ReceiptsContext.ts
5794
5812
  import { createContext as createContext5, useContext as useContext11 } from "react";
@@ -5989,7 +6007,6 @@ var Eye_default = Eye;
5989
6007
  import classNames26 from "classnames";
5990
6008
  var FileThumb = ({
5991
6009
  url,
5992
- type,
5993
6010
  floatingActions = false,
5994
6011
  uploadPending,
5995
6012
  deletePending,
@@ -6380,11 +6397,12 @@ var openReceiptInNewTab = (url, index) => (e) => {
6380
6397
  `);
6381
6398
  }
6382
6399
  };
6383
- var BankTransactionReceiptsWithProvider = forwardRef5((_a, ref) => {
6400
+ var BankTransactionReceiptsWithProvider = forwardRef4((_a, ref) => {
6384
6401
  var _b = _a, { bankTransaction, isActive } = _b, props = __objRest(_b, ["bankTransaction", "isActive"]);
6385
6402
  return /* @__PURE__ */ React86.createElement(ReceiptsProvider, { bankTransaction, isActive }, /* @__PURE__ */ React86.createElement(BankTransactionReceipts, __spreadProps(__spreadValues({}, props), { ref })));
6386
6403
  });
6387
- var BankTransactionReceipts = forwardRef5(
6404
+ BankTransactionReceiptsWithProvider.displayName = "BankTransactionReceiptsWithProvider";
6405
+ var BankTransactionReceipts = forwardRef4(
6388
6406
  ({
6389
6407
  classNamePrefix = "Layer",
6390
6408
  floatingActions = false,
@@ -6425,6 +6443,7 @@ var BankTransactionReceipts = forwardRef5(
6425
6443
  ) : null);
6426
6444
  }
6427
6445
  );
6446
+ BankTransactionReceipts.displayName = "BankTransactionReceipts";
6428
6447
 
6429
6448
  // src/components/MatchForm/MatchForm.tsx
6430
6449
  import React88 from "react";
@@ -6718,7 +6737,7 @@ var ToggleOption = ({
6718
6737
  name,
6719
6738
  onChange,
6720
6739
  value,
6721
- size,
6740
+ size: _size,
6722
6741
  leftIcon,
6723
6742
  disabled,
6724
6743
  disabledMessage = "Disabled",
@@ -6900,7 +6919,7 @@ var validateSplit = (splitData) => {
6900
6919
  });
6901
6920
  return valid;
6902
6921
  };
6903
- var ExpandedBankTransactionRow = forwardRef6(
6922
+ var ExpandedBankTransactionRow = forwardRef5(
6904
6923
  ({
6905
6924
  bankTransaction,
6906
6925
  isOpen = false,
@@ -6917,8 +6936,7 @@ var ExpandedBankTransactionRow = forwardRef6(
6917
6936
  var _a, _b, _c, _d, _e, _f, _g;
6918
6937
  const {
6919
6938
  categorize: categorizeBankTransaction2,
6920
- match: matchBankTransaction2,
6921
- updateOneLocal: updateBankTransaction
6939
+ match: matchBankTransaction2
6922
6940
  } = useBankTransactionsContext();
6923
6941
  const [purpose, setPurpose] = useState15(
6924
6942
  bankTransaction.category ? "categorize" /* categorize */ : hasMatch(bankTransaction) ? "match" /* match */ : "categorize" /* categorize */
@@ -7031,19 +7049,15 @@ var ExpandedBankTransactionRow = forwardRef6(
7031
7049
  };
7032
7050
  const save = () => __async(void 0, null, function* () {
7033
7051
  if (showDescriptions && memoText != void 0) {
7034
- const result = yield Layer.updateBankTransactionMetadata(
7035
- apiUrl,
7036
- auth.access_token,
7037
- {
7038
- params: {
7039
- businessId,
7040
- bankTransactionId: bankTransaction.id
7041
- },
7042
- body: {
7043
- memo: memoText
7044
- }
7052
+ yield Layer.updateBankTransactionMetadata(apiUrl, auth.access_token, {
7053
+ params: {
7054
+ businessId,
7055
+ bankTransactionId: bankTransaction.id
7056
+ },
7057
+ body: {
7058
+ memo: memoText
7045
7059
  }
7046
- );
7060
+ });
7047
7061
  }
7048
7062
  if (purpose === "match" /* match */) {
7049
7063
  if (!selectedMatchId) {
@@ -7357,6 +7371,7 @@ var ExpandedBankTransactionRow = forwardRef6(
7357
7371
  );
7358
7372
  }
7359
7373
  );
7374
+ ExpandedBankTransactionRow.displayName = "ExpandedBankTransactionRow";
7360
7375
 
7361
7376
  // src/components/IconBox/IconBox.tsx
7362
7377
  import React94 from "react";
@@ -7409,6 +7424,7 @@ var BankTransactionRow = ({
7409
7424
  initialLoad,
7410
7425
  showDescriptions,
7411
7426
  showReceiptUploads,
7427
+ showReceiptUploadColumn,
7412
7428
  showTooltips,
7413
7429
  stringOverrides
7414
7430
  }) => {
@@ -7495,6 +7511,10 @@ var BankTransactionRow = ({
7495
7511
  initialLoad ? "initial-load" : "",
7496
7512
  showComponent ? "show" : ""
7497
7513
  );
7514
+ const showReceiptDataProperties = useMemo4(
7515
+ () => toDataProperties({ showReceiptUploadColumn }),
7516
+ [showReceiptUploadColumn]
7517
+ );
7498
7518
  return /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement("tr", { className: rowClassName }, /* @__PURE__ */ React96.createElement(
7499
7519
  "td",
7500
7520
  __spreadValues({
@@ -7534,11 +7554,17 @@ var BankTransactionRow = ({
7534
7554
  ))
7535
7555
  ), /* @__PURE__ */ React96.createElement(
7536
7556
  "td",
7537
- __spreadValues({
7557
+ __spreadValues(__spreadValues({
7538
7558
  className: `Layer__table-cell Layer__table-cell__amount-col Layer__bank-transactions__amount-col Layer__table-cell--amount ${className}__table-cell--amount-${isCredit(bankTransaction) ? "credit" : "debit"}`
7539
- }, openRow),
7559
+ }, openRow), showReceiptDataProperties),
7540
7560
  /* @__PURE__ */ React96.createElement("span", { className: "Layer__table-cell-content" }, isCredit(bankTransaction) ? "+$" : " $", centsToDollars(bankTransaction.amount))
7541
- ), /* @__PURE__ */ React96.createElement("td", { className: "Layer__table-cell Layer__bank-transactions__documents-col" }, ((_c = bankTransaction.document_ids) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ React96.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React96.createElement(IconBox, null, /* @__PURE__ */ React96.createElement(File_default, { size: 12 })))), /* @__PURE__ */ React96.createElement(
7561
+ ), /* @__PURE__ */ React96.createElement(
7562
+ "td",
7563
+ __spreadValues({
7564
+ className: "Layer__table-cell Layer__bank-transactions__documents-col"
7565
+ }, showReceiptDataProperties),
7566
+ showReceiptUploads && ((_c = bankTransaction.document_ids) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ React96.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React96.createElement(IconBox, null, /* @__PURE__ */ React96.createElement(File_default, { size: 12 })))
7567
+ ), /* @__PURE__ */ React96.createElement(
7542
7568
  "td",
7543
7569
  {
7544
7570
  className: classNames37(
@@ -7898,7 +7924,7 @@ import React108, { useContext as useContext14, useEffect as useEffect20, useRef
7898
7924
  import React107 from "react";
7899
7925
 
7900
7926
  // src/components/BankTransactionMobileList/BusinessForm.tsx
7901
- import React102, { useContext as useContext13, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef11, useState as useState19 } from "react";
7927
+ import React102, { useContext as useContext13, useEffect as useEffect16, useMemo as useMemo5, useRef as useRef11, useState as useState19 } from "react";
7902
7928
 
7903
7929
  // src/icons/Paperclip.tsx
7904
7930
  import React100 from "react";
@@ -8024,7 +8050,7 @@ var BusinessForm = ({
8024
8050
  setShowRetry(true);
8025
8051
  }
8026
8052
  }, [bankTransaction.error]);
8027
- const options = useMemo4(() => {
8053
+ const options = useMemo5(() => {
8028
8054
  var _a2;
8029
8055
  const options2 = ((_a2 = bankTransaction == null ? void 0 : bankTransaction.categorization_flow) == null ? void 0 : _a2.type) === "ASK_FROM_SUGGESTIONS" /* ASK_FROM_SUGGESTIONS */ ? bankTransaction.categorization_flow.suggestions.map(
8030
8056
  (x) => mapCategoryToOption(x)
@@ -8197,7 +8223,6 @@ var isAlreadyAssigned = (bankTransaction) => {
8197
8223
  var PersonalForm = ({
8198
8224
  bankTransaction,
8199
8225
  showReceiptUploads,
8200
- isOpen,
8201
8226
  showDescriptions
8202
8227
  }) => {
8203
8228
  var _a;
@@ -8417,8 +8442,7 @@ var SplitForm = ({
8417
8442
  const receiptsRef = useRef14(null);
8418
8443
  const {
8419
8444
  categorize: categorizeBankTransaction2,
8420
- isLoading,
8421
- error
8445
+ isLoading
8422
8446
  } = useBankTransactionsContext();
8423
8447
  const { memoText, setMemoText, saveMemoText } = useMemoTextContext();
8424
8448
  const defaultCategory = bankTransaction.category || hasSuggestions(bankTransaction.categorization_flow) && ((_b = (_a = bankTransaction.categorization_flow) == null ? void 0 : _a.suggestions) == null ? void 0 : _b[0]);
@@ -8670,7 +8694,6 @@ var SplitAndMatchForm = ({
8670
8694
  bankTransaction,
8671
8695
  showTooltips,
8672
8696
  showReceiptUploads,
8673
- isOpen,
8674
8697
  showDescriptions
8675
8698
  }) => {
8676
8699
  const anyMatch = hasMatch(bankTransaction);
@@ -8722,7 +8745,6 @@ var BankTransactionMobileForms = ({
8722
8745
  {
8723
8746
  bankTransaction,
8724
8747
  showReceiptUploads,
8725
- isOpen,
8726
8748
  showDescriptions
8727
8749
  }
8728
8750
  );
@@ -8733,7 +8755,6 @@ var BankTransactionMobileForms = ({
8733
8755
  bankTransaction,
8734
8756
  showTooltips,
8735
8757
  showReceiptUploads,
8736
- isOpen,
8737
8758
  showDescriptions
8738
8759
  }
8739
8760
  );
@@ -8981,7 +9002,7 @@ var BankTransactionMobileList = ({
8981
9002
  };
8982
9003
 
8983
9004
  // src/components/BankTransactionsTable/BankTransactionsTable.tsx
8984
- import React114 from "react";
9005
+ import React114, { useMemo as useMemo6 } from "react";
8985
9006
 
8986
9007
  // src/components/BankTransactionsLoader/BankTransactionsLoader.tsx
8987
9008
  import React112 from "react";
@@ -9142,14 +9163,35 @@ var BankTransactionsTable = ({
9142
9163
  lastPage,
9143
9164
  onRefresh
9144
9165
  }) => {
9145
- var _a, _b, _c, _d, _e, _f;
9166
+ var _a, _b, _c, _d, _e, _f, _g;
9167
+ const showReceiptColumn = (_a = showReceiptUploads && (bankTransactions == null ? void 0 : bankTransactions.some(
9168
+ (transaction) => {
9169
+ var _a2;
9170
+ return ((_a2 = transaction.document_ids) == null ? void 0 : _a2.length) > 0;
9171
+ }
9172
+ ))) != null ? _a : false;
9173
+ const showReceiptDataProperties = useMemo6(
9174
+ () => toDataProperties({ showReceiptUploadColumn: showReceiptColumn }),
9175
+ [showReceiptColumn]
9176
+ );
9146
9177
  return /* @__PURE__ */ React114.createElement(
9147
9178
  "table",
9148
9179
  {
9149
9180
  width: "100%",
9150
9181
  className: "Layer__table Layer__bank-transactions__table with-cell-separators"
9151
9182
  },
9152
- /* @__PURE__ */ React114.createElement("thead", null, /* @__PURE__ */ React114.createElement("tr", null, /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__date-col" }, ((_a = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _a.dateColumnHeaderText) || "Date"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__tx-col" }, ((_b = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _b.transactionColumnHeaderText) || "Transaction"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__account-col" }, ((_c = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _c.accountColumnHeaderText) || "Account"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__table-cell--amount Layer__table-cell__amount-col" }, ((_d = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _d.amountColumnHeaderText) || "Amount"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__documents-col" }), categorizeView && editable ? /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__table-header--primary Layer__table-cell__category-col" }, ((_e = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _e.categorizeColumnHeaderText) || "Categorize") : /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__table-cell__category-col" }, ((_f = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _f.categoryColumnHeaderText) || "Category"))),
9183
+ /* @__PURE__ */ React114.createElement("thead", null, /* @__PURE__ */ React114.createElement("tr", null, /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__date-col" }, ((_b = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _b.dateColumnHeaderText) || "Date"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__tx-col" }, ((_c = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _c.transactionColumnHeaderText) || "Transaction"), /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__bank-transactions__account-col" }, ((_d = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _d.accountColumnHeaderText) || "Account"), /* @__PURE__ */ React114.createElement(
9184
+ "th",
9185
+ __spreadValues({
9186
+ className: "Layer__table-header Layer__table-cell--amount Layer__table-cell__amount-col"
9187
+ }, showReceiptDataProperties),
9188
+ ((_e = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _e.amountColumnHeaderText) || "Amount"
9189
+ ), /* @__PURE__ */ React114.createElement(
9190
+ "th",
9191
+ __spreadValues({
9192
+ className: "Layer__table-header Layer__bank-transactions__documents-col"
9193
+ }, showReceiptDataProperties)
9194
+ ), categorizeView && editable ? /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__table-header--primary Layer__table-cell__category-col" }, ((_f = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _f.categorizeColumnHeaderText) || "Categorize") : /* @__PURE__ */ React114.createElement("th", { className: "Layer__table-header Layer__table-cell__category-col" }, ((_g = stringOverrides == null ? void 0 : stringOverrides.transactionsTable) == null ? void 0 : _g.categoryColumnHeaderText) || "Category"))),
9153
9195
  isLoading && page && page === 1 ? /* @__PURE__ */ React114.createElement(BankTransactionsLoader, { isLoading: true, showTooltips }) : null,
9154
9196
  /* @__PURE__ */ React114.createElement("tbody", null, !isLoading && (bankTransactions == null ? void 0 : bankTransactions.map(
9155
9197
  (bankTransaction, index) => /* @__PURE__ */ React114.createElement(
@@ -9166,6 +9208,7 @@ var BankTransactionsTable = ({
9166
9208
  containerWidth,
9167
9209
  showDescriptions,
9168
9210
  showReceiptUploads,
9211
+ showReceiptUploadColumn: showReceiptColumn,
9169
9212
  showTooltips,
9170
9213
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.bankTransactionCTAs
9171
9214
  }
@@ -9225,7 +9268,7 @@ var ErrorBoundary = class extends Component {
9225
9268
  import React118 from "react";
9226
9269
 
9227
9270
  // src/hooks/usePagination/usePagination.ts
9228
- import { useMemo as useMemo5 } from "react";
9271
+ import { useMemo as useMemo7 } from "react";
9229
9272
  var DOTS = "...";
9230
9273
  var usePagination = ({
9231
9274
  totalCount,
@@ -9233,7 +9276,7 @@ var usePagination = ({
9233
9276
  siblingCount = 1,
9234
9277
  currentPage
9235
9278
  }) => {
9236
- const paginationRange = useMemo5(() => {
9279
+ const paginationRange = useMemo7(() => {
9237
9280
  const totalPageCount = Math.ceil(totalCount / pageSize);
9238
9281
  const totalPageNumbers = siblingCount + 5;
9239
9282
  if (totalPageNumbers >= totalPageCount) {
@@ -9515,7 +9558,7 @@ var DatePicker = (_a) => {
9515
9558
  dateFormat = mode === "monthPicker" || mode === "monthRangePicker" ? "MMM, yyyy" : mode === "timePicker" ? "h:mm aa" : "MMM d, yyyy",
9516
9559
  timeIntervals = 15,
9517
9560
  timeCaption,
9518
- placeholderText,
9561
+ placeholderText: _placeholderText,
9519
9562
  customDateRanges,
9520
9563
  wrapperClassName,
9521
9564
  calendarClassName,
@@ -10042,7 +10085,7 @@ var BankTransactionsContent = ({
10042
10085
  removeAfterCategorize
10043
10086
  } = useBankTransactionsContext();
10044
10087
  const { data: linkedAccounts } = useLinkedAccounts();
10045
- const isSyncing = useMemo6(
10088
+ const isSyncing = useMemo8(
10046
10089
  () => Boolean(linkedAccounts == null ? void 0 : linkedAccounts.some((item) => item.is_syncing)),
10047
10090
  [linkedAccounts]
10048
10091
  );
@@ -10083,7 +10126,7 @@ var BankTransactionsContent = ({
10083
10126
  return () => clearTimeout(timeoutLoad);
10084
10127
  }
10085
10128
  }, [loadingStatus]);
10086
- const bankTransactions = TEST_EMPTY_STATE ? [] : useMemo6(() => {
10129
+ const bankTransactions = TEST_EMPTY_STATE ? [] : useMemo8(() => {
10087
10130
  if (monthlyView) {
10088
10131
  return data == null ? void 0 : data.filter(
10089
10132
  (x) => parseISO12(x.date) >= dateRange.startDate && parseISO12(x.date) <= dateRange.endDate
@@ -10258,7 +10301,7 @@ var useQuickbooks = () => {
10258
10301
  setQuickbooksIsLinked(isConnected);
10259
10302
  });
10260
10303
  const syncFromQuickbooks2 = () => {
10261
- DEBUG2 && console.log("Triggering sync from Quickbooks...");
10304
+ DEBUG2 && console.debug("Triggering sync from Quickbooks...");
10262
10305
  setIsSyncingFromQuickbooks(true);
10263
10306
  try {
10264
10307
  Layer.syncFromQuickbooks(apiUrl, auth.access_token, {
@@ -10269,7 +10312,7 @@ var useQuickbooks = () => {
10269
10312
  }
10270
10313
  };
10271
10314
  const fetchIsSyncingFromQuickbooks = () => __async(void 0, null, function* () {
10272
- DEBUG2 && console.log("Fetching status of sync from Quickbooks...");
10315
+ DEBUG2 && console.debug("Fetching status of sync from Quickbooks...");
10273
10316
  const isSyncing = (yield Layer.statusOfSyncFromQuickbooks(apiUrl, auth.access_token, {
10274
10317
  params: { businessId }
10275
10318
  })()).data.is_syncing;
@@ -10318,7 +10361,7 @@ var Quickbooks = () => {
10318
10361
  };
10319
10362
 
10320
10363
  // src/components/ProfitAndLoss/ProfitAndLoss.tsx
10321
- import React161, { createContext as createContext10 } from "react";
10364
+ import React164, { createContext as createContext10 } from "react";
10322
10365
 
10323
10366
  // src/contexts/ProfitAndLossComparisonContext/ProfitAndLossComparisonContext.tsx
10324
10367
  import { createContext as createContext8 } from "react";
@@ -10346,7 +10389,7 @@ var PNLComparisonContext = createContext8({
10346
10389
  });
10347
10390
 
10348
10391
  // src/hooks/useProfitAndLoss/useProfitAndLoss.tsx
10349
- import { useMemo as useMemo8, useState as useState31 } from "react";
10392
+ import { useMemo as useMemo10, useState as useState31 } from "react";
10350
10393
 
10351
10394
  // src/utils/profitAndLossUtils.ts
10352
10395
  var doesLineItemQualifies = (item) => {
@@ -10402,7 +10445,7 @@ var applyShare = (items, total) => {
10402
10445
  };
10403
10446
 
10404
10447
  // src/hooks/useProfitAndLoss/useProfitAndLossLTM.tsx
10405
- import { useEffect as useEffect24, useMemo as useMemo7, useState as useState30 } from "react";
10448
+ import { useEffect as useEffect24, useMemo as useMemo9, useState as useState30 } from "react";
10406
10449
  import { startOfMonth as startOfMonth5, sub } from "date-fns";
10407
10450
  import useSWR3 from "swr";
10408
10451
  var buildDates = ({ currentDate }) => {
@@ -10431,7 +10474,7 @@ var useProfitAndLossLTM = ({ currentDate, tagFilter, reportingBasis } = {
10431
10474
  const [date, setDate] = useState30(currentDate);
10432
10475
  const [loaded, setLoaded] = useState30("initial");
10433
10476
  const [data, setData] = useState30([]);
10434
- const { startYear, startMonth, endYear, endMonth } = useMemo7(() => {
10477
+ const { startYear, startMonth, endYear, endMonth } = useMemo9(() => {
10435
10478
  return buildDates({ currentDate: date });
10436
10479
  }, [date, businessId, tagFilter, reportingBasis]);
10437
10480
  const queryKey = businessId && Boolean(startYear) && Boolean(startMonth) && Boolean(endYear) && Boolean(endMonth) && (auth == null ? void 0 : auth.access_token) && `profit-and-loss-summaries-${businessId}-${startYear.toString()}-${startMonth.toString()}-${tagFilter == null ? void 0 : tagFilter.key}-${(_a = tagFilter == null ? void 0 : tagFilter.values) == null ? void 0 : _a.join(
@@ -10669,7 +10712,7 @@ var useProfitAndLoss = ({
10669
10712
  })
10670
10713
  }));
10671
10714
  };
10672
- const { filteredDataRevenue, filteredTotalRevenue } = useMemo8(() => {
10715
+ const { filteredDataRevenue, filteredTotalRevenue } = useMemo10(() => {
10673
10716
  var _a;
10674
10717
  if (!data) {
10675
10718
  return { filteredDataRevenue: [], filteredTotalRevenue: void 0 };
@@ -10721,7 +10764,7 @@ var useProfitAndLoss = ({
10721
10764
  const withShare = applyShare(sorted, total);
10722
10765
  return { filteredDataRevenue: withShare, filteredTotalRevenue: total };
10723
10766
  }, [data, startDate, filters, sidebarScope, summaryData]);
10724
- const { filteredDataExpenses, filteredTotalExpenses } = useMemo8(() => {
10767
+ const { filteredDataExpenses, filteredTotalExpenses } = useMemo10(() => {
10725
10768
  var _a;
10726
10769
  if (!data) {
10727
10770
  return { filteredDataExpenses: [], filteredTotalExpenses: void 0 };
@@ -10952,7 +10995,7 @@ var useProfitAndLossComparison = ({
10952
10995
  };
10953
10996
 
10954
10997
  // src/components/ProfitAndLossChart/ProfitAndLossChart.tsx
10955
- import React129, { useContext as useContext15, useEffect as useEffect28, useMemo as useMemo9, useState as useState34 } from "react";
10998
+ import React129, { useContext as useContext15, useEffect as useEffect28, useMemo as useMemo11, useState as useState34 } from "react";
10956
10999
 
10957
11000
  // src/components/ProfitAndLossChart/ChartStateCard.tsx
10958
11001
  import React127 from "react";
@@ -11184,7 +11227,7 @@ var ProfitAndLossChart = ({
11184
11227
  start: startOfMonth9(sub2(Date.now(), { months: 11 })),
11185
11228
  end: endOfMonth6(Date.now())
11186
11229
  });
11187
- const selectionMonth = useMemo9(
11230
+ const selectionMonth = useMemo11(
11188
11231
  () => ({
11189
11232
  year: localDateRange.startDate.getFullYear(),
11190
11233
  month: localDateRange.startDate.getMonth()
@@ -11200,7 +11243,7 @@ var ProfitAndLossChart = ({
11200
11243
  currentDate: startOfMonth9(Date.now()),
11201
11244
  tagFilter
11202
11245
  });
11203
- const anyData = useMemo9(() => {
11246
+ const anyData = useMemo11(() => {
11204
11247
  return Boolean(
11205
11248
  data == null ? void 0 : data.find(
11206
11249
  (x) => x.income !== 0 || x.costOfGoodsSold !== 0 || x.grossProfit !== 0 || x.operatingExpenses !== 0 || x.profitBeforeTaxes !== 0 || x.taxes !== 0 || x.totalExpenses !== 0
@@ -11208,11 +11251,11 @@ var ProfitAndLossChart = ({
11208
11251
  );
11209
11252
  }, [data]);
11210
11253
  const { data: linkedAccounts } = useLinkedAccounts();
11211
- const isSyncing = useMemo9(
11254
+ const isSyncing = useMemo11(
11212
11255
  () => Boolean(linkedAccounts == null ? void 0 : linkedAccounts.some((item) => item.is_syncing)),
11213
11256
  [linkedAccounts]
11214
11257
  );
11215
- const loadingValue = useMemo9(() => getLoadingValue(data), [data]);
11258
+ const loadingValue = useMemo11(() => getLoadingValue(data), [data]);
11216
11259
  useEffect28(() => {
11217
11260
  if (loaded === "complete" && data) {
11218
11261
  const foundCurrent = data.find(
@@ -11271,7 +11314,7 @@ var ProfitAndLossChart = ({
11271
11314
  loading: (pnl == null ? void 0 : pnl.isLoading) ? loadingValue : 0,
11272
11315
  loadingExpenses: (pnl == null ? void 0 : pnl.isLoading) ? -loadingValue : 0
11273
11316
  });
11274
- const theData = useMemo9(() => {
11317
+ const theData = useMemo11(() => {
11275
11318
  var _a2;
11276
11319
  if (loaded !== "complete" || loaded === "complete" && !anyData) {
11277
11320
  const loadingData = [];
@@ -12031,7 +12074,7 @@ var X = (_a) => {
12031
12074
  var X_default = X;
12032
12075
 
12033
12076
  // src/components/ProfitAndLossDetailedCharts/DetailedChart.tsx
12034
- import React136, { useMemo as useMemo10 } from "react";
12077
+ import React136, { useMemo as useMemo12 } from "react";
12035
12078
 
12036
12079
  // src/utils/format.ts
12037
12080
  var capitalizeFirstLetter = (text) => text.charAt(0).toUpperCase() + text.slice(1);
@@ -12333,7 +12376,7 @@ var DetailedChart = ({
12333
12376
  isLoading,
12334
12377
  showDatePicker = true
12335
12378
  }) => {
12336
- const chartData = useMemo10(() => {
12379
+ const chartData = useMemo12(() => {
12337
12380
  if (!filteredData) {
12338
12381
  return [];
12339
12382
  }
@@ -12789,7 +12832,7 @@ var ProfitAndLossDownloadButton = ({
12789
12832
  };
12790
12833
 
12791
12834
  // src/components/ProfitAndLossHeader/ProfitAndLossHeader.tsx
12792
- import React141, { useMemo as useMemo11 } from "react";
12835
+ import React141, { useMemo as useMemo13 } from "react";
12793
12836
 
12794
12837
  // src/components/SyncingBadge/SyncingBadge.tsx
12795
12838
  import React140 from "react";
@@ -12813,7 +12856,7 @@ var ProfitAndLossHeader = ({
12813
12856
  withDatePicker
12814
12857
  }) => {
12815
12858
  const { data: linkedAccounts } = useLinkedAccounts();
12816
- const isSyncing = useMemo11(
12859
+ const isSyncing = useMemo13(
12817
12860
  () => Boolean(linkedAccounts == null ? void 0 : linkedAccounts.some((item) => item.is_syncing)),
12818
12861
  [linkedAccounts]
12819
12862
  );
@@ -12825,10 +12868,10 @@ import React148, { useContext as useContext20 } from "react";
12825
12868
 
12826
12869
  // src/components/Header/Header.tsx
12827
12870
  import React142, {
12828
- forwardRef as forwardRef7
12871
+ forwardRef as forwardRef6
12829
12872
  } from "react";
12830
12873
  import classNames51 from "classnames";
12831
- var Header2 = forwardRef7(
12874
+ var Header2 = forwardRef6(
12832
12875
  ({ className, children, style, sticky, asHeader, rounded }, ref) => {
12833
12876
  const baseClassName = classNames51(
12834
12877
  "Layer__header",
@@ -12850,6 +12893,7 @@ var Header2 = forwardRef7(
12850
12893
  );
12851
12894
  }
12852
12895
  );
12896
+ Header2.displayName = "Header";
12853
12897
 
12854
12898
  // src/components/Header/HeaderRow.tsx
12855
12899
  import React143 from "react";
@@ -12909,7 +12953,7 @@ var Panel = ({
12909
12953
  };
12910
12954
 
12911
12955
  // src/components/View/View.tsx
12912
- import React147, { forwardRef as forwardRef8 } from "react";
12956
+ import React147, { forwardRef as forwardRef7 } from "react";
12913
12957
 
12914
12958
  // src/components/ViewHeader/ViewHeader.tsx
12915
12959
  import React146 from "react";
@@ -12920,7 +12964,7 @@ var ViewHeader = ({ title, className, children }) => {
12920
12964
 
12921
12965
  // src/components/View/View.tsx
12922
12966
  import classNames56 from "classnames";
12923
- var View = forwardRef8(
12967
+ var View = forwardRef7(
12924
12968
  ({
12925
12969
  title,
12926
12970
  showHeader = true,
@@ -12951,6 +12995,7 @@ var View = forwardRef8(
12951
12995
  ), withSidebar ? /* @__PURE__ */ React147.createElement(Panel, { sidebarIsOpen: true, sidebar, defaultSidebarHeight: true }, /* @__PURE__ */ React147.createElement("div", { className: "Layer__view-main" }, children)) : /* @__PURE__ */ React147.createElement("div", { className: "Layer__view-main" }, children));
12952
12996
  }
12953
12997
  );
12998
+ View.displayName = "View";
12954
12999
 
12955
13000
  // src/components/ProfitAndLossReport/ProfitAndLossReport.tsx
12956
13001
  var ProfitAndLossReport = ({
@@ -13025,14 +13070,88 @@ var ProfitAndLossReport = ({
13025
13070
  };
13026
13071
 
13027
13072
  // src/components/ProfitAndLossSummaries/ProfitAndLossSummaries.tsx
13028
- import React150, { useContext as useContext21, useMemo as useMemo12 } from "react";
13073
+ import React153, { useContext as useContext21, useMemo as useMemo17 } from "react";
13074
+
13075
+ // src/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesList.tsx
13076
+ import React149, { useMemo as useMemo14 } from "react";
13077
+ var LIST_ITEM_CLASS_NAME = "Layer__ProfitAndLossSummariesListItem";
13078
+ function ProfitAndLossSummariesListItem({
13079
+ children,
13080
+ isActive,
13081
+ onClick
13082
+ }) {
13083
+ const dataProperties = useMemo14(
13084
+ () => toDataProperties({ active: isActive, clickable: !!onClick }),
13085
+ [isActive]
13086
+ );
13087
+ return /* @__PURE__ */ React149.createElement("li", __spreadProps(__spreadValues({ className: LIST_ITEM_CLASS_NAME }, dataProperties), { onClick }), children);
13088
+ }
13089
+ var LIST_CLASS_NAME = "Layer__ProfitAndLossSummariesList";
13090
+ function ProfitAndLossSummariesList({
13091
+ children,
13092
+ itemCount
13093
+ }) {
13094
+ const dataProperties = useMemo14(
13095
+ () => toDataProperties({ ["column-count"]: itemCount }),
13096
+ [itemCount]
13097
+ );
13098
+ return /* @__PURE__ */ React149.createElement("ul", __spreadValues({ className: LIST_CLASS_NAME }, dataProperties), children);
13099
+ }
13029
13100
 
13030
- // src/components/ProfitAndLossSummaries/MiniChart.tsx
13031
- import React149 from "react";
13101
+ // src/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesMiniChart.tsx
13102
+ import React150 from "react";
13032
13103
  import { PieChart as PieChart2, Pie as Pie2, Cell as Cell3 } from "recharts";
13033
- var MiniChart = ({ data, chartColorsList }) => {
13104
+ var CHART_PLACEHOLDER = [
13105
+ {
13106
+ name: "placeholder",
13107
+ display_name: "placeholder",
13108
+ value: 1,
13109
+ type: "placeholder",
13110
+ share: 1
13111
+ }
13112
+ ];
13113
+ function toMiniChartData({
13114
+ scope,
13115
+ data
13116
+ }) {
13117
+ if (!data) {
13118
+ return CHART_PLACEHOLDER;
13119
+ }
13120
+ let items = [];
13121
+ switch (scope) {
13122
+ case "revenue":
13123
+ items = collectRevenueItems(data);
13124
+ break;
13125
+ default:
13126
+ items = collectExpensesItems(data);
13127
+ }
13128
+ if (!items || items.length === 0 || !items.find((x) => Math.abs(x.value) !== 0)) {
13129
+ return CHART_PLACEHOLDER;
13130
+ }
13131
+ return items.slice();
13132
+ }
13133
+ function ProfitAndLossSummariesMiniChart({
13134
+ data,
13135
+ chartColorsList,
13136
+ variants
13137
+ }) {
13034
13138
  const typeColorMapping = mapTypesToColors(data, chartColorsList);
13035
- return /* @__PURE__ */ React149.createElement(PieChart2, { width: 52, height: 52, className: "mini-chart" }, /* @__PURE__ */ React149.createElement(
13139
+ let chartDimension = 52;
13140
+ let innerRadius = 10;
13141
+ let outerRadius = 16;
13142
+ switch (variants == null ? void 0 : variants.size) {
13143
+ case "sm":
13144
+ chartDimension = 52;
13145
+ innerRadius = 10;
13146
+ outerRadius = 16;
13147
+ break;
13148
+ case "lg":
13149
+ chartDimension = 64;
13150
+ innerRadius = 12;
13151
+ outerRadius = 20;
13152
+ break;
13153
+ }
13154
+ return /* @__PURE__ */ React150.createElement(PieChart2, { width: chartDimension, height: chartDimension }, /* @__PURE__ */ React150.createElement(
13036
13155
  Pie2,
13037
13156
  {
13038
13157
  data,
@@ -13040,18 +13159,18 @@ var MiniChart = ({ data, chartColorsList }) => {
13040
13159
  nameKey: "name",
13041
13160
  cx: "50%",
13042
13161
  cy: "50%",
13043
- innerRadius: 10,
13044
- outerRadius: 16,
13162
+ innerRadius,
13163
+ outerRadius,
13045
13164
  paddingAngle: 0.4,
13046
13165
  fill: "#8884d8",
13047
- width: 24,
13048
- height: 24,
13166
+ width: 36,
13167
+ height: 36,
13049
13168
  animationDuration: 250,
13050
13169
  animationEasing: "ease-in-out"
13051
13170
  },
13052
13171
  data.map((entry, index) => {
13053
13172
  const colorConfig = typeColorMapping[index];
13054
- return /* @__PURE__ */ React149.createElement(
13173
+ return /* @__PURE__ */ React150.createElement(
13055
13174
  Cell3,
13056
13175
  {
13057
13176
  key: `cell-${index}`,
@@ -13062,44 +13181,61 @@ var MiniChart = ({ data, chartColorsList }) => {
13062
13181
  );
13063
13182
  })
13064
13183
  ));
13065
- };
13184
+ }
13185
+
13186
+ // src/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesSummary.tsx
13187
+ import React152, { useMemo as useMemo16 } from "react";
13188
+
13189
+ // src/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesHeading.tsx
13190
+ import { useMemo as useMemo15 } from "react";
13191
+ import React151 from "react";
13192
+ var HEADING_CLASS_NAME = "Layer__ProfitAndLossSummariesSummaryHeading";
13193
+ function ProfitAndLossSummariesHeading({
13194
+ variants,
13195
+ children
13196
+ }) {
13197
+ const { size = "sm" } = variants != null ? variants : {};
13198
+ const labelDataProperties = useMemo15(() => toDataProperties({ size }), [size]);
13199
+ return /* @__PURE__ */ React151.createElement("h3", __spreadValues({ className: HEADING_CLASS_NAME }, labelDataProperties), children);
13200
+ }
13201
+
13202
+ // src/components/ProfitAndLossSummaries/internal/ProfitAndLossSummariesSummary.tsx
13203
+ var CLASS_NAME = "Layer__ProfitAndLossSummariesSummary";
13204
+ var CHART_AREA_CLASS_NAME = "Layer__ProfitAndLossSummariesSummaryChartArea";
13205
+ var AMOUNT_CLASS_NAME = "Layer__ProfitAndLossSummariesSummaryAmount";
13206
+ function ProfitAndLossSummariesSummary({
13207
+ label,
13208
+ amount,
13209
+ isLoading,
13210
+ slots,
13211
+ variants
13212
+ }) {
13213
+ const { Chart } = slots != null ? slots : {};
13214
+ const { size = "sm" } = variants != null ? variants : {};
13215
+ const dataProperties = useMemo16(() => toDataProperties({ size }), [size]);
13216
+ const amountDataProperties = useMemo16(
13217
+ () => toDataProperties({
13218
+ positive: amount >= 0,
13219
+ negative: amount < 0,
13220
+ size
13221
+ }),
13222
+ [amount, size]
13223
+ );
13224
+ return /* @__PURE__ */ React152.createElement("div", __spreadValues({ className: CLASS_NAME }, dataProperties), Chart && /* @__PURE__ */ React152.createElement("div", { className: CHART_AREA_CLASS_NAME }, Chart), /* @__PURE__ */ React152.createElement(ProfitAndLossSummariesHeading, { variants }, label), isLoading ? /* @__PURE__ */ React152.createElement(SkeletonLoader, null) : /* @__PURE__ */ React152.createElement("span", __spreadValues({ className: AMOUNT_CLASS_NAME }, amountDataProperties), centsToDollars(Math.abs(amount))));
13225
+ }
13066
13226
 
13067
13227
  // src/components/ProfitAndLossSummaries/ProfitAndLossSummaries.tsx
13068
- import classNames57 from "classnames";
13069
- var CHART_PLACEHOLDER = [
13070
- {
13071
- name: "placeholder",
13072
- display_name: "placeholder",
13073
- value: 1,
13074
- type: "placeholder",
13075
- share: 1
13076
- }
13077
- ];
13078
- var buildMiniChartData = (scope, data) => {
13079
- if (!data) {
13080
- return CHART_PLACEHOLDER;
13081
- }
13082
- let items = [];
13083
- switch (scope) {
13084
- case "revenue":
13085
- items = collectRevenueItems(data);
13086
- break;
13087
- default:
13088
- items = collectExpensesItems(data);
13089
- }
13090
- if (!items || items.length === 0 || !items.find((x) => Math.abs(x.value) !== 0)) {
13091
- return CHART_PLACEHOLDER;
13092
- }
13093
- return items.slice();
13094
- };
13095
- var ProfitAndLossSummaries = ({
13096
- vertical,
13228
+ var SECTION_CLASS_NAME = "Layer__ProfitAndLossSummaries";
13229
+ var SECTION_CLASS_NAMES = `${SECTION_CLASS_NAME} Layer__component`;
13230
+ function Internal_ProfitAndLossSummaries({
13097
13231
  actionable = false,
13098
13232
  revenueLabel,
13099
13233
  stringOverrides,
13100
- chartColorsList
13101
- }) => {
13102
- var _a, _b, _c, _d, _e, _f;
13234
+ chartColorsList,
13235
+ slots,
13236
+ variants
13237
+ }) {
13238
+ var _a, _b;
13103
13239
  const {
13104
13240
  data: storedData,
13105
13241
  isLoading,
@@ -13107,91 +13243,83 @@ var ProfitAndLossSummaries = ({
13107
13243
  sidebarScope
13108
13244
  } = useContext21(ProfitAndLoss.Context);
13109
13245
  const dataItem = Array.isArray(storedData) ? storedData[storedData.length - 1] : storedData;
13110
- const expensesChartData = useMemo12(() => {
13111
- return buildMiniChartData("expenses", dataItem);
13112
- }, [storedData]);
13113
- const revenueChartData = useMemo12(() => {
13114
- return buildMiniChartData("revenue", dataItem);
13115
- }, [storedData]);
13246
+ const { revenueChartData, expensesChartData } = useMemo17(
13247
+ () => ({
13248
+ revenueChartData: toMiniChartData({ scope: "revenue", data: dataItem }),
13249
+ expensesChartData: toMiniChartData({ scope: "expenses", data: dataItem })
13250
+ }),
13251
+ [dataItem]
13252
+ );
13116
13253
  const data = dataItem ? dataItem : { income: { value: NaN }, net_profit: NaN };
13117
- const incomeDirectionClass = ((_a = data.income.value) != null ? _a : NaN) < 0 ? "Layer__profit-and-loss-summaries__amount--negative" : "Layer__profit-and-loss-summaries__amount--positive";
13118
- const expensesDirectionClass = ((_c = (_b = data == null ? void 0 : data.income) == null ? void 0 : _b.value) != null ? _c : NaN) - data.net_profit < 0 ? "Layer__profit-and-loss-summaries__amount--negative" : "Layer__profit-and-loss-summaries__amount--positive";
13119
- const netProfitDirectionClass = data.net_profit < 0 ? "Layer__profit-and-loss-summaries__amount--negative" : "Layer__profit-and-loss-summaries__amount--positive";
13120
- return /* @__PURE__ */ React150.createElement(
13121
- "div",
13254
+ const { unstable_AdditionalListItems = [] } = slots != null ? slots : {};
13255
+ const listItemCount = unstable_AdditionalListItems.length + 3;
13256
+ return /* @__PURE__ */ React153.createElement("section", { className: SECTION_CLASS_NAMES }, /* @__PURE__ */ React153.createElement(ProfitAndLossSummariesList, { itemCount: listItemCount }, /* @__PURE__ */ React153.createElement(
13257
+ ProfitAndLossSummariesListItem,
13122
13258
  {
13123
- className: `Layer__profit-and-loss-summaries ${vertical ? "flex-col" : ""}`
13259
+ isActive: sidebarScope === "revenue",
13260
+ onClick: actionable ? () => setSidebarScope("revenue") : void 0
13124
13261
  },
13125
- /* @__PURE__ */ React150.createElement(
13126
- "div",
13262
+ /* @__PURE__ */ React153.createElement(
13263
+ ProfitAndLossSummariesSummary,
13127
13264
  {
13128
- className: classNames57(
13129
- "Layer__profit-and-loss-summaries__summary",
13130
- actionable && "Layer__actionable",
13131
- "Layer__profit-and-loss-summaries__summary--income",
13132
- sidebarScope === "revenue" ? "active" : ""
13133
- ),
13134
- onClick: () => {
13135
- actionable && setSidebarScope("revenue");
13136
- }
13137
- },
13138
- /* @__PURE__ */ React150.createElement(MiniChart, { data: revenueChartData, chartColorsList }),
13139
- /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__text" }, /* @__PURE__ */ React150.createElement("span", { className: "Layer__profit-and-loss-summaries__title" }, (stringOverrides == null ? void 0 : stringOverrides.revenueLabel) || revenueLabel || "Revenue"), isLoading || storedData === void 0 ? /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__loader" }, /* @__PURE__ */ React150.createElement(SkeletonLoader, null)) : /* @__PURE__ */ React150.createElement(
13140
- "span",
13141
- {
13142
- className: `Layer__profit-and-loss-summaries__amount ${incomeDirectionClass}`
13143
- },
13144
- centsToDollars(Math.abs((_e = (_d = data == null ? void 0 : data.income) == null ? void 0 : _d.value) != null ? _e : NaN))
13145
- ))
13146
- ),
13147
- /* @__PURE__ */ React150.createElement(
13148
- "div",
13149
- {
13150
- className: classNames57(
13151
- "Layer__profit-and-loss-summaries__summary",
13152
- actionable && "Layer__actionable",
13153
- "Layer__profit-and-loss-summaries__summary--expenses",
13154
- sidebarScope === "expenses" ? "active" : ""
13155
- ),
13156
- onClick: () => {
13157
- actionable && setSidebarScope("expenses");
13158
- }
13159
- },
13160
- /* @__PURE__ */ React150.createElement(MiniChart, { data: expensesChartData, chartColorsList }),
13161
- /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__text" }, /* @__PURE__ */ React150.createElement("span", { className: "Layer__profit-and-loss-summaries__title" }, (stringOverrides == null ? void 0 : stringOverrides.expensesLabel) || "Expenses"), isLoading || storedData === void 0 ? /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__loader" }, /* @__PURE__ */ React150.createElement(SkeletonLoader, { className: "Layer__profit-and-loss-summaries__loader" })) : /* @__PURE__ */ React150.createElement(
13162
- "span",
13163
- {
13164
- className: `Layer__profit-and-loss-summaries__amount ${expensesDirectionClass}`
13265
+ label: (stringOverrides == null ? void 0 : stringOverrides.revenueLabel) || revenueLabel || "Revenue",
13266
+ amount: data.income.value,
13267
+ isLoading,
13268
+ slots: {
13269
+ Chart: /* @__PURE__ */ React153.createElement(
13270
+ ProfitAndLossSummariesMiniChart,
13271
+ {
13272
+ data: revenueChartData,
13273
+ chartColorsList,
13274
+ variants
13275
+ }
13276
+ )
13165
13277
  },
13166
- centsToDollars(
13167
- Math.abs(((_f = data.income.value) != null ? _f : 0) - data.net_profit)
13168
- )
13169
- ))
13170
- ),
13171
- /* @__PURE__ */ React150.createElement(
13172
- "div",
13278
+ variants
13279
+ }
13280
+ )
13281
+ ), /* @__PURE__ */ React153.createElement(
13282
+ ProfitAndLossSummariesListItem,
13283
+ {
13284
+ isActive: sidebarScope === "expenses",
13285
+ onClick: actionable ? () => setSidebarScope("expenses") : void 0
13286
+ },
13287
+ /* @__PURE__ */ React153.createElement(
13288
+ ProfitAndLossSummariesSummary,
13173
13289
  {
13174
- className: classNames57(
13175
- "Layer__profit-and-loss-summaries__summary net-profit Layer__profit-and-loss-summaries__summary--net-profit",
13176
- actionable && "Layer__actionable"
13177
- )
13178
- },
13179
- /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__text" }, /* @__PURE__ */ React150.createElement("span", { className: "Layer__profit-and-loss-summaries__title" }, (stringOverrides == null ? void 0 : stringOverrides.netProfitLabel) || "Net Profit"), isLoading || storedData === void 0 ? /* @__PURE__ */ React150.createElement("div", { className: "Layer__profit-and-loss-summaries__loader" }, /* @__PURE__ */ React150.createElement(SkeletonLoader, { className: "Layer__profit-and-loss-summaries__loader" })) : /* @__PURE__ */ React150.createElement(
13180
- "span",
13181
- {
13182
- className: `Layer__profit-and-loss-summaries__amount ${netProfitDirectionClass}`
13290
+ label: (stringOverrides == null ? void 0 : stringOverrides.revenueLabel) || revenueLabel || "Expenses",
13291
+ amount: ((_b = (_a = data == null ? void 0 : data.income) == null ? void 0 : _a.value) != null ? _b : NaN) - data.net_profit,
13292
+ isLoading,
13293
+ slots: {
13294
+ Chart: /* @__PURE__ */ React153.createElement(
13295
+ ProfitAndLossSummariesMiniChart,
13296
+ {
13297
+ data: expensesChartData,
13298
+ chartColorsList,
13299
+ variants
13300
+ }
13301
+ )
13183
13302
  },
13184
- centsToDollars(Math.abs(data.net_profit))
13185
- ))
13303
+ variants
13304
+ }
13186
13305
  )
13187
- );
13188
- };
13306
+ ), /* @__PURE__ */ React153.createElement(ProfitAndLossSummariesListItem, null, /* @__PURE__ */ React153.createElement(
13307
+ ProfitAndLossSummariesSummary,
13308
+ {
13309
+ label: (stringOverrides == null ? void 0 : stringOverrides.netProfitLabel) || "Net Profit",
13310
+ amount: data.net_profit,
13311
+ variants,
13312
+ isLoading
13313
+ }
13314
+ )), unstable_AdditionalListItems.map((item, index) => /* @__PURE__ */ React153.createElement(ProfitAndLossSummariesListItem, { key: index }, item))));
13315
+ }
13316
+ var ProfitAndLossSummaries = (props) => Internal_ProfitAndLossSummaries(props);
13189
13317
 
13190
13318
  // src/components/ProfitAndLossTable/ProfitAndLossTableWithProvider.tsx
13191
- import React160, { useContext as useContext25 } from "react";
13319
+ import React163, { useContext as useContext25 } from "react";
13192
13320
 
13193
13321
  // src/contexts/TableContext/TableContext.tsx
13194
- import React151, { createContext as createContext9, useState as useState40 } from "react";
13322
+ import React154, { createContext as createContext9, useState as useState40 } from "react";
13195
13323
  var defaultValue = {
13196
13324
  expandedRows: [],
13197
13325
  setExpandedRows: () => {
@@ -13227,11 +13355,11 @@ var TableProvider = ({ children }) => {
13227
13355
  expandedAllRows,
13228
13356
  setExpandedAllRows
13229
13357
  };
13230
- return /* @__PURE__ */ React151.createElement(TableContext.Provider, { value: contextValue }, children);
13358
+ return /* @__PURE__ */ React154.createElement(TableContext.Provider, { value: contextValue }, children);
13231
13359
  };
13232
13360
 
13233
13361
  // src/components/ProfitAndLossTable/ProfitAndLossCompareTable.tsx
13234
- import React157, { useContext as useContext23, useEffect as useEffect32 } from "react";
13362
+ import React160, { useContext as useContext23, useEffect as useEffect32 } from "react";
13235
13363
 
13236
13364
  // src/hooks/useTableExpandRow/useTableExpandRow.tsx
13237
13365
  import { useContext as useContext22 } from "react";
@@ -13333,14 +13461,14 @@ var mergeComparisonLineItemsAtDepth = (lineItems) => {
13333
13461
  };
13334
13462
 
13335
13463
  // src/components/TableBody/TableBody.tsx
13336
- import React152 from "react";
13464
+ import React155 from "react";
13337
13465
  var TableBody = ({ children }) => {
13338
- return /* @__PURE__ */ React152.createElement("tbody", { className: "Layer__table-body" }, children);
13466
+ return /* @__PURE__ */ React155.createElement("tbody", { className: "Layer__table-body" }, children);
13339
13467
  };
13340
13468
 
13341
13469
  // src/components/TableCell/TableCell.tsx
13342
- import React153 from "react";
13343
- import classNames58 from "classnames";
13470
+ import React156 from "react";
13471
+ import classNames57 from "classnames";
13344
13472
  var TableCell = ({
13345
13473
  children,
13346
13474
  className,
@@ -13358,7 +13486,7 @@ var TableCell = ({
13358
13486
  const amount = typeof children === "number" ? children : 0;
13359
13487
  const isPositive = amount >= 0;
13360
13488
  const amountString = centsToDollars(Math.abs(amount));
13361
- const cellClassNames = classNames58(
13489
+ const cellClassNames = classNames57(
13362
13490
  "Layer__table-cell",
13363
13491
  (primary || isHeaderCell) && "Layer__table-cell--primary",
13364
13492
  isCurrency && "Layer__table-cell-amount",
@@ -13368,9 +13496,9 @@ var TableCell = ({
13368
13496
  className
13369
13497
  );
13370
13498
  if (isHeaderCell) {
13371
- return /* @__PURE__ */ React153.createElement("th", { className: cellClassNames, colSpan, style }, /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, children));
13499
+ return /* @__PURE__ */ React156.createElement("th", { className: cellClassNames, colSpan, style }, /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, children));
13372
13500
  }
13373
- return /* @__PURE__ */ React153.createElement(
13501
+ return /* @__PURE__ */ React156.createElement(
13374
13502
  "td",
13375
13503
  {
13376
13504
  className: cellClassNames,
@@ -13378,7 +13506,7 @@ var TableCell = ({
13378
13506
  colSpan,
13379
13507
  onClick: (e) => onClick && onClick(e)
13380
13508
  },
13381
- /* @__PURE__ */ React153.createElement("span", { className: "Layer__table-cell-content" }, withExpandIcon && /* @__PURE__ */ React153.createElement(
13509
+ /* @__PURE__ */ React156.createElement("span", { className: "Layer__table-cell-content" }, withExpandIcon && /* @__PURE__ */ React156.createElement(
13382
13510
  ChevronDownFill_default,
13383
13511
  {
13384
13512
  className: "Layer__table-row--expand-icon",
@@ -13389,14 +13517,14 @@ var TableCell = ({
13389
13517
  };
13390
13518
 
13391
13519
  // src/components/TableHead/TableHead.tsx
13392
- import React154 from "react";
13520
+ import React157 from "react";
13393
13521
  var TableHead = ({ children }) => {
13394
- return /* @__PURE__ */ React154.createElement("thead", { className: "Layer__table-header" }, children);
13522
+ return /* @__PURE__ */ React157.createElement("thead", { className: "Layer__table-header" }, children);
13395
13523
  };
13396
13524
 
13397
13525
  // src/components/TableRow/TableRow.tsx
13398
- import React155 from "react";
13399
- import classNames59 from "classnames";
13526
+ import React158 from "react";
13527
+ import classNames58 from "classnames";
13400
13528
  var TableRow = ({
13401
13529
  rowKey,
13402
13530
  children,
@@ -13420,14 +13548,14 @@ var TableRow = ({
13420
13548
  handleExpand && handleExpand();
13421
13549
  }
13422
13550
  };
13423
- const rowClassNames = classNames59([
13551
+ const rowClassNames = classNames58([
13424
13552
  "Layer__table-row",
13425
13553
  !isHeadRow && `Layer__table-row--depth-${depth}`,
13426
13554
  !isHeadRow && `Layer__table-row--variant-${variant}`,
13427
13555
  selected && "Layer__table-row--selected",
13428
13556
  !isHeadRow && expandable && (isExpanded ? "Layer__table-row--expanded" : "Layer__table-row--collapsed")
13429
13557
  ]);
13430
- return /* @__PURE__ */ React155.createElement(React155.Fragment, null, withDivider && withDividerPosition === "top" && /* @__PURE__ */ React155.createElement("tr", { className: "Layer__table-empty-row" }, /* @__PURE__ */ React155.createElement("td", { colSpan: Array.isArray(children) ? children.length : 1 })), /* @__PURE__ */ React155.createElement(
13558
+ return /* @__PURE__ */ React158.createElement(React158.Fragment, null, withDivider && withDividerPosition === "top" && /* @__PURE__ */ React158.createElement("tr", { className: "Layer__table-empty-row" }, /* @__PURE__ */ React158.createElement("td", { colSpan: Array.isArray(children) ? children.length : 1 })), /* @__PURE__ */ React158.createElement(
13431
13559
  "tr",
13432
13560
  {
13433
13561
  "data-key": rowKey,
@@ -13435,12 +13563,12 @@ var TableRow = ({
13435
13563
  onClick: (e) => toggleExpanded(e)
13436
13564
  },
13437
13565
  children
13438
- ), withDivider && withDividerPosition === "bottom" && /* @__PURE__ */ React155.createElement("tr", { className: "Layer__table-empty-row" }, /* @__PURE__ */ React155.createElement("td", { colSpan: Array.isArray(children) ? children.length : 1 })));
13566
+ ), withDivider && withDividerPosition === "bottom" && /* @__PURE__ */ React158.createElement("tr", { className: "Layer__table-empty-row" }, /* @__PURE__ */ React158.createElement("td", { colSpan: Array.isArray(children) ? children.length : 1 })));
13439
13567
  };
13440
13568
 
13441
13569
  // src/components/Table/Table.tsx
13442
- import React156, { useEffect as useEffect31, useRef as useRef19 } from "react";
13443
- import classNames60 from "classnames";
13570
+ import React159, { useEffect as useEffect31, useRef as useRef19 } from "react";
13571
+ import classNames59 from "classnames";
13444
13572
  var Table = ({
13445
13573
  componentName,
13446
13574
  children,
@@ -13480,20 +13608,20 @@ var Table = ({
13480
13608
  prevChildrenRef.current = newChildrenKeys;
13481
13609
  }
13482
13610
  }, [children]);
13483
- const tableWrapperClassNames = classNames60(
13611
+ const tableWrapperClassNames = classNames59(
13484
13612
  "Layer__table-wrapper",
13485
13613
  bottomSpacing && "Layer__table-wrapper--bottom-spacing"
13486
13614
  );
13487
- const tableClassNames = classNames60(
13615
+ const tableClassNames = classNames59(
13488
13616
  "Layer__table",
13489
13617
  componentName && `Layer__${componentName}__table`,
13490
13618
  borderCollapse && `Layer__table__${borderCollapse}-rows`
13491
13619
  );
13492
- return /* @__PURE__ */ React156.createElement("div", { className: tableWrapperClassNames }, /* @__PURE__ */ React156.createElement("table", { className: tableClassNames, ref: tableRef }, children));
13620
+ return /* @__PURE__ */ React159.createElement("div", { className: tableWrapperClassNames }, /* @__PURE__ */ React159.createElement("table", { className: tableClassNames, ref: tableRef }, children));
13493
13621
  };
13494
13622
 
13495
13623
  // src/components/ProfitAndLossTable/ProfitAndLossCompareTable.tsx
13496
- import classNames61 from "classnames";
13624
+ import classNames60 from "classnames";
13497
13625
  var ProfitAndLossCompareTable = ({
13498
13626
  stringOverrides
13499
13627
  }) => {
@@ -13521,12 +13649,12 @@ var ProfitAndLossCompareTable = ({
13521
13649
  }
13522
13650
  }, [dateRange, comparisonData]);
13523
13651
  if (isLoading || comparisonData === void 0) {
13524
- return /* @__PURE__ */ React157.createElement(
13652
+ return /* @__PURE__ */ React160.createElement(
13525
13653
  "div",
13526
13654
  {
13527
- className: classNames61("Layer__profit-and-loss-table__loader-container")
13655
+ className: classNames60("Layer__profit-and-loss-table__loader-container")
13528
13656
  },
13529
- /* @__PURE__ */ React157.createElement(Loader2, null)
13657
+ /* @__PURE__ */ React160.createElement(Loader2, null)
13530
13658
  );
13531
13659
  }
13532
13660
  const renderRow = (rowKey, depth, rowDisplayName, lineItem, data) => {
@@ -13538,7 +13666,7 @@ var ProfitAndLossCompareTable = ({
13538
13666
  }
13539
13667
  });
13540
13668
  if (rowData.length === 0) {
13541
- return /* @__PURE__ */ React157.createElement(React157.Fragment, null);
13669
+ return /* @__PURE__ */ React160.createElement(React160.Fragment, null);
13542
13670
  }
13543
13671
  const mergedLineItems = mergeComparisonLineItemsAtDepth(
13544
13672
  rowData
@@ -13547,7 +13675,7 @@ var ProfitAndLossCompareTable = ({
13547
13675
  }
13548
13676
  const expandable = (lineItem == null ? void 0 : lineItem.line_items) && lineItem.line_items.length > 0 ? true : false;
13549
13677
  const expanded = expandable ? isOpen(rowKey) : true;
13550
- return /* @__PURE__ */ React157.createElement(React157.Fragment, { key: rowKey }, /* @__PURE__ */ React157.createElement(
13678
+ return /* @__PURE__ */ React160.createElement(React160.Fragment, { key: rowKey }, /* @__PURE__ */ React160.createElement(
13551
13679
  TableRow,
13552
13680
  {
13553
13681
  rowKey,
@@ -13557,8 +13685,8 @@ var ProfitAndLossCompareTable = ({
13557
13685
  variant: expandable ? "expandable" : "default",
13558
13686
  handleExpand: () => setIsOpen(rowKey)
13559
13687
  },
13560
- /* @__PURE__ */ React157.createElement(TableCell, { primary: true, withExpandIcon: expandable }, lineItem ? lineItem.display_name : rowDisplayName),
13561
- rowData.map((cell, i) => /* @__PURE__ */ React157.createElement(TableCell, { key: "compare-value" + i, isCurrency: true }, getComparisonValue(
13688
+ /* @__PURE__ */ React160.createElement(TableCell, { primary: true, withExpandIcon: expandable }, lineItem ? lineItem.display_name : rowDisplayName),
13689
+ rowData.map((cell, i) => /* @__PURE__ */ React160.createElement(TableCell, { key: "compare-value" + i, isCurrency: true }, getComparisonValue(
13562
13690
  lineItem ? lineItem.display_name : rowDisplayName,
13563
13691
  depth,
13564
13692
  cell
@@ -13573,13 +13701,13 @@ var ProfitAndLossCompareTable = ({
13573
13701
  )
13574
13702
  ) : null);
13575
13703
  };
13576
- return /* @__PURE__ */ React157.createElement(Table, { borderCollapse: "collapse", bottomSpacing: false }, /* @__PURE__ */ React157.createElement(TableHead, null, compareOptions && compareOptions.length > 1 && /* @__PURE__ */ React157.createElement(TableRow, { rowKey: "" }, /* @__PURE__ */ React157.createElement(TableCell, { isHeaderCell: true }), compareOptions.map((option, i) => /* @__PURE__ */ React157.createElement(React157.Fragment, { key: option + "-" + i }, /* @__PURE__ */ React157.createElement(TableCell, { key: option + "-" + i, primary: true, isHeaderCell: true }, option.displayName), compareMonths && Array.from({ length: compareMonths - 1 }, (_, index) => /* @__PURE__ */ React157.createElement(TableCell, { key: option + "-" + index, isHeaderCell: true })))))), /* @__PURE__ */ React157.createElement(TableBody, null, compareMonths && /* @__PURE__ */ React157.createElement(TableRow, { rowKey: "" }, /* @__PURE__ */ React157.createElement(TableCell, { isHeaderCell: true }), compareOptions && compareOptions.length > 0 ? compareOptions.map((option, i) => /* @__PURE__ */ React157.createElement(React157.Fragment, { key: option + "-" + i }, generatComparisonMonths(
13704
+ return /* @__PURE__ */ React160.createElement(Table, { borderCollapse: "collapse", bottomSpacing: false }, /* @__PURE__ */ React160.createElement(TableHead, null, compareOptions && compareOptions.length > 1 && /* @__PURE__ */ React160.createElement(TableRow, { rowKey: "" }, /* @__PURE__ */ React160.createElement(TableCell, { isHeaderCell: true }), compareOptions.map((option, i) => /* @__PURE__ */ React160.createElement(React160.Fragment, { key: option + "-" + i }, /* @__PURE__ */ React160.createElement(TableCell, { key: option + "-" + i, primary: true, isHeaderCell: true }, option.displayName), compareMonths && Array.from({ length: compareMonths - 1 }, (_, index) => /* @__PURE__ */ React160.createElement(TableCell, { key: option + "-" + index, isHeaderCell: true })))))), /* @__PURE__ */ React160.createElement(TableBody, null, compareMonths && /* @__PURE__ */ React160.createElement(TableRow, { rowKey: "" }, /* @__PURE__ */ React160.createElement(TableCell, { isHeaderCell: true }), compareOptions && compareOptions.length > 0 ? compareOptions.map((option, i) => /* @__PURE__ */ React160.createElement(React160.Fragment, { key: option + "-" + i }, generatComparisonMonths(
13577
13705
  dateRange.startDate,
13578
13706
  compareMonths
13579
- ).map((month, index) => /* @__PURE__ */ React157.createElement(TableCell, { key: option + "-" + index, isHeaderCell: true }, month)))) : /* @__PURE__ */ React157.createElement(React157.Fragment, { key: "total-1" }, generatComparisonMonths(
13707
+ ).map((month, index) => /* @__PURE__ */ React160.createElement(TableCell, { key: option + "-" + index, isHeaderCell: true }, month)))) : /* @__PURE__ */ React160.createElement(React160.Fragment, { key: "total-1" }, generatComparisonMonths(
13580
13708
  dateRange.startDate,
13581
13709
  compareMonths
13582
- ).map((month, index) => /* @__PURE__ */ React157.createElement(TableCell, { key: "total-" + index + "-cell", isHeaderCell: true }, month)))), renderRow("income", 0, "Income"), renderRow("cost_of_goods_sold", 0, "Cost of Goods Sold"), renderRow(
13710
+ ).map((month, index) => /* @__PURE__ */ React160.createElement(TableCell, { key: "total-" + index + "-cell", isHeaderCell: true }, month)))), renderRow("income", 0, "Income"), renderRow("cost_of_goods_sold", 0, "Cost of Goods Sold"), renderRow(
13583
13711
  "gross_profit",
13584
13712
  0,
13585
13713
  (stringOverrides == null ? void 0 : stringOverrides.grossProfitLabel) || "Gross Profit"
@@ -13595,13 +13723,13 @@ var ProfitAndLossCompareTable = ({
13595
13723
  };
13596
13724
 
13597
13725
  // src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
13598
- import React159, { useContext as useContext24, useEffect as useEffect33 } from "react";
13726
+ import React162, { useContext as useContext24, useEffect as useEffect33 } from "react";
13599
13727
 
13600
13728
  // src/icons/PieChart.tsx
13601
- import * as React158 from "react";
13729
+ import * as React161 from "react";
13602
13730
  var PieChart3 = (_a) => {
13603
13731
  var _b = _a, { size = 12 } = _b, props = __objRest(_b, ["size"]);
13604
- return /* @__PURE__ */ React158.createElement(
13732
+ return /* @__PURE__ */ React161.createElement(
13605
13733
  "svg",
13606
13734
  __spreadProps(__spreadValues({
13607
13735
  xmlns: "http://www.w3.org/2000/svg",
@@ -13611,7 +13739,7 @@ var PieChart3 = (_a) => {
13611
13739
  width: size,
13612
13740
  height: size
13613
13741
  }),
13614
- /* @__PURE__ */ React158.createElement("g", null, /* @__PURE__ */ React158.createElement(
13742
+ /* @__PURE__ */ React161.createElement("g", null, /* @__PURE__ */ React161.createElement(
13615
13743
  "path",
13616
13744
  {
13617
13745
  d: "M10.2213 7.78271C9.92969 8.47226 9.47363 9.07989 8.89297 9.55247C8.3123 10.0251 7.62471 10.3482 6.89031 10.4936C6.1559 10.6391 5.39705 10.6024 4.68009 10.3869C3.96313 10.1713 3.30989 9.78337 2.77749 9.25701C2.24509 8.73065 1.84973 8.08189 1.62598 7.36744C1.40223 6.65298 1.3569 5.8946 1.49396 5.15858C1.63102 4.42257 1.94629 3.73133 2.41221 3.14531C2.87813 2.55928 3.48051 2.09631 4.16669 1.79688",
@@ -13619,7 +13747,7 @@ var PieChart3 = (_a) => {
13619
13747
  strokeLinecap: "round",
13620
13748
  strokeLinejoin: "round"
13621
13749
  }
13622
- ), /* @__PURE__ */ React158.createElement(
13750
+ ), /* @__PURE__ */ React161.createElement(
13623
13751
  "path",
13624
13752
  {
13625
13753
  d: "M10.5833 6.00033C10.5833 5.39843 10.4648 4.80244 10.2344 4.24636C10.0041 3.69028 9.66651 3.18502 9.24091 2.75942C8.8153 2.33382 8.31004 1.99621 7.75397 1.76588C7.19789 1.53554 6.60189 1.41699 6 1.41699V6.00033H10.5833Z",
@@ -13681,7 +13809,7 @@ var empty_profit_and_loss_report_default = {
13681
13809
  };
13682
13810
 
13683
13811
  // src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
13684
- import classNames62 from "classnames";
13812
+ import classNames61 from "classnames";
13685
13813
  var ProfitAndLossTableComponent = ({
13686
13814
  asContainer,
13687
13815
  stringOverrides
@@ -13698,21 +13826,21 @@ var ProfitAndLossTableComponent = ({
13698
13826
  const currentData = Array.isArray(actualData) ? actualData[actualData.length - 1] : actualData;
13699
13827
  const data = !currentData || isLoading ? empty_profit_and_loss_report_default : currentData;
13700
13828
  if (isLoading || actualData === void 0) {
13701
- return /* @__PURE__ */ React159.createElement(
13829
+ return /* @__PURE__ */ React162.createElement(
13702
13830
  "div",
13703
13831
  {
13704
- className: classNames62(
13832
+ className: classNames61(
13705
13833
  "Layer__profit-and-loss-table__loader-container",
13706
13834
  asContainer && "Layer__component-container"
13707
13835
  )
13708
13836
  },
13709
- /* @__PURE__ */ React159.createElement(Loader2, null)
13837
+ /* @__PURE__ */ React162.createElement(Loader2, null)
13710
13838
  );
13711
13839
  }
13712
13840
  const renderLineItem = (lineItem, depth, rowKey, rowIndex, scope, setSidebarScope2, variant) => {
13713
13841
  const expandable = !!lineItem.line_items && lineItem.line_items.length > 0;
13714
13842
  const expanded = expandable ? isOpen(rowKey) : true;
13715
- return /* @__PURE__ */ React159.createElement(React159.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React159.createElement(
13843
+ return /* @__PURE__ */ React162.createElement(React162.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React162.createElement(
13716
13844
  TableRow,
13717
13845
  {
13718
13846
  rowKey: rowKey + "-" + rowIndex,
@@ -13722,7 +13850,7 @@ var ProfitAndLossTableComponent = ({
13722
13850
  variant: variant ? variant : expandable ? "expandable" : "default",
13723
13851
  handleExpand: () => setIsOpen(rowKey)
13724
13852
  },
13725
- /* @__PURE__ */ React159.createElement(
13853
+ /* @__PURE__ */ React162.createElement(
13726
13854
  TableCell,
13727
13855
  {
13728
13856
  primary: true,
@@ -13731,7 +13859,7 @@ var ProfitAndLossTableComponent = ({
13731
13859
  },
13732
13860
  lineItem.display_name,
13733
13861
  " ",
13734
- setSidebarScope2 && /* @__PURE__ */ React159.createElement(
13862
+ setSidebarScope2 && /* @__PURE__ */ React162.createElement(
13735
13863
  "span",
13736
13864
  {
13737
13865
  className: "Layer__profit-and-loss-row__detailed-chart-btn",
@@ -13740,10 +13868,10 @@ var ProfitAndLossTableComponent = ({
13740
13868
  setSidebarScope2 && setSidebarScope2(scope != null ? scope : "expenses");
13741
13869
  }
13742
13870
  },
13743
- /* @__PURE__ */ React159.createElement(PieChart_default, null)
13871
+ /* @__PURE__ */ React162.createElement(PieChart_default, null)
13744
13872
  )
13745
13873
  ),
13746
- /* @__PURE__ */ React159.createElement(TableCell, { isCurrency: true, primary: true }, Number.isNaN(lineItem.value) ? 0 : lineItem.value)
13874
+ /* @__PURE__ */ React162.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, Number.isNaN(lineItem.value) ? 0 : lineItem.value)
13747
13875
  ), expanded && lineItem.line_items ? lineItem.line_items.map(
13748
13876
  (child, i) => renderLineItem(
13749
13877
  child,
@@ -13753,7 +13881,7 @@ var ProfitAndLossTableComponent = ({
13753
13881
  )
13754
13882
  ) : null);
13755
13883
  };
13756
- return /* @__PURE__ */ React159.createElement(Table, { borderCollapse: "collapse", bottomSpacing: false }, /* @__PURE__ */ React159.createElement(TableBody, null, renderLineItem(
13884
+ return /* @__PURE__ */ React162.createElement(Table, { borderCollapse: "collapse", bottomSpacing: false }, /* @__PURE__ */ React162.createElement(TableBody, null, renderLineItem(
13757
13885
  data.income,
13758
13886
  0,
13759
13887
  "income",
@@ -13807,13 +13935,13 @@ var ProfitAndLossTableComponent = ({
13807
13935
  void 0,
13808
13936
  void 0,
13809
13937
  "summation"
13810
- ), data.personal_expenses ? /* @__PURE__ */ React159.createElement(React159.Fragment, null, renderLineItem(data.personal_expenses, 0, "personal_expenses", 7)) : null, data.other_outflows ? /* @__PURE__ */ React159.createElement(React159.Fragment, null, renderLineItem(data.other_outflows, 0, "other_outflows", 6)) : null));
13938
+ ), data.personal_expenses ? /* @__PURE__ */ React162.createElement(React162.Fragment, null, renderLineItem(data.personal_expenses, 0, "personal_expenses", 7)) : null, data.other_outflows ? /* @__PURE__ */ React162.createElement(React162.Fragment, null, renderLineItem(data.other_outflows, 0, "other_outflows", 6)) : null));
13811
13939
  };
13812
13940
 
13813
13941
  // src/components/ProfitAndLossTable/ProfitAndLossTableWithProvider.tsx
13814
13942
  var ProfitAndLossTableWithProvider = (props) => {
13815
13943
  const { compareMode } = useContext25(ProfitAndLoss.ComparisonContext);
13816
- return /* @__PURE__ */ React160.createElement(TableProvider, null, compareMode ? /* @__PURE__ */ React160.createElement("div", { className: "Layer__compare__table__wrapper" }, /* @__PURE__ */ React160.createElement(ProfitAndLossCompareTable, __spreadValues({}, props))) : /* @__PURE__ */ React160.createElement(ProfitAndLossTableComponent, __spreadValues({}, props)));
13944
+ return /* @__PURE__ */ React163.createElement(TableProvider, null, compareMode ? /* @__PURE__ */ React163.createElement("div", { className: "Layer__compare__table__wrapper" }, /* @__PURE__ */ React163.createElement(ProfitAndLossCompareTable, __spreadValues({}, props))) : /* @__PURE__ */ React163.createElement(ProfitAndLossTableComponent, __spreadValues({}, props)));
13817
13945
  };
13818
13946
 
13819
13947
  // src/components/ProfitAndLoss/ProfitAndLoss.tsx
@@ -13856,7 +13984,7 @@ var ProfitAndLoss = ({
13856
13984
  }) => {
13857
13985
  const contextData = useProfitAndLoss({ tagFilter, reportingBasis });
13858
13986
  const comparisonContextData = useProfitAndLossComparison({ reportingBasis });
13859
- return /* @__PURE__ */ React161.createElement(PNLContext.Provider, { value: contextData }, /* @__PURE__ */ React161.createElement(PNLComparisonContext.Provider, { value: comparisonContextData }, asContainer ? /* @__PURE__ */ React161.createElement(Container, { name: "profit-and-loss" }, children) : children));
13987
+ return /* @__PURE__ */ React164.createElement(PNLContext.Provider, { value: contextData }, /* @__PURE__ */ React164.createElement(PNLComparisonContext.Provider, { value: comparisonContextData }, asContainer ? /* @__PURE__ */ React164.createElement(Container, { name: "profit-and-loss" }, children) : children));
13860
13988
  };
13861
13989
  ProfitAndLoss.Chart = ProfitAndLossChart;
13862
13990
  ProfitAndLoss.Context = PNLContext;
@@ -13871,7 +13999,7 @@ ProfitAndLoss.Report = ProfitAndLossReport;
13871
13999
  ProfitAndLoss.DownloadButton = ProfitAndLossDownloadButton;
13872
14000
 
13873
14001
  // src/components/BalanceSheet/BalanceSheet.tsx
13874
- import React165, { useEffect as useEffect37, useState as useState42 } from "react";
14002
+ import React168, { useEffect as useEffect37, useState as useState42 } from "react";
13875
14003
 
13876
14004
  // src/contexts/BalanceSheetContext/BalanceSheetContext.tsx
13877
14005
  import { createContext as createContext11 } from "react";
@@ -13959,12 +14087,12 @@ var useElementViewSize = (callback) => {
13959
14087
  };
13960
14088
 
13961
14089
  // src/components/BalanceSheetDatePicker/BalanceSheetDatePicker.tsx
13962
- import React162 from "react";
14090
+ import React165 from "react";
13963
14091
  var BalanceSheetDatePicker = ({
13964
14092
  effectiveDate,
13965
14093
  setEffectiveDate
13966
14094
  }) => {
13967
- return /* @__PURE__ */ React162.createElement(React162.Fragment, null, /* @__PURE__ */ React162.createElement(
14095
+ return /* @__PURE__ */ React165.createElement(React165.Fragment, null, /* @__PURE__ */ React165.createElement(
13968
14096
  DatePicker,
13969
14097
  {
13970
14098
  selected: effectiveDate,
@@ -13975,12 +14103,12 @@ var BalanceSheetDatePicker = ({
13975
14103
  };
13976
14104
 
13977
14105
  // src/components/BalanceSheetExpandAllButton/BalanceSheetExpandAllButton.tsx
13978
- import React163 from "react";
14106
+ import React166 from "react";
13979
14107
  var BalanceSheetExpandAllButton = ({
13980
14108
  view
13981
14109
  }) => {
13982
14110
  const { expandedAllRows, toggleAllRows } = useTableExpandRow();
13983
- return /* @__PURE__ */ React163.createElement(
14111
+ return /* @__PURE__ */ React166.createElement(
13984
14112
  ExpandCollapseButton,
13985
14113
  {
13986
14114
  onClick: toggleAllRows,
@@ -13991,7 +14119,7 @@ var BalanceSheetExpandAllButton = ({
13991
14119
  };
13992
14120
 
13993
14121
  // src/components/BalanceSheetTable/BalanceSheetTable.tsx
13994
- import React164, { useEffect as useEffect36 } from "react";
14122
+ import React167, { useEffect as useEffect36 } from "react";
13995
14123
  var BalanceSheetTable = ({
13996
14124
  data,
13997
14125
  config,
@@ -14014,7 +14142,7 @@ var BalanceSheetTable = ({
14014
14142
  if (expandable) {
14015
14143
  allRowKeys.push(rowKey);
14016
14144
  }
14017
- return /* @__PURE__ */ React164.createElement(React164.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React164.createElement(
14145
+ return /* @__PURE__ */ React167.createElement(React167.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React167.createElement(
14018
14146
  TableRow,
14019
14147
  {
14020
14148
  rowKey: rowKey + "-" + rowIndex,
@@ -14024,8 +14152,8 @@ var BalanceSheetTable = ({
14024
14152
  depth,
14025
14153
  withDivider: depth === 0 && rowIndex > 0
14026
14154
  },
14027
- /* @__PURE__ */ React164.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
14028
- /* @__PURE__ */ React164.createElement(
14155
+ /* @__PURE__ */ React167.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
14156
+ /* @__PURE__ */ React167.createElement(
14029
14157
  TableCell,
14030
14158
  {
14031
14159
  isCurrency: !expandable || expandable && !expanded,
@@ -14041,18 +14169,18 @@ var BalanceSheetTable = ({
14041
14169
  rowKey + ":" + subItem.name,
14042
14170
  subIdx
14043
14171
  )
14044
- ), showChildren && expandable && /* @__PURE__ */ React164.createElement(
14172
+ ), showChildren && expandable && /* @__PURE__ */ React167.createElement(
14045
14173
  TableRow,
14046
14174
  {
14047
14175
  rowKey: rowKey + "-" + rowIndex + "--summation",
14048
14176
  depth: depth + 1,
14049
14177
  variant: "summation"
14050
14178
  },
14051
- /* @__PURE__ */ React164.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
14052
- /* @__PURE__ */ React164.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, lineItem.value)
14179
+ /* @__PURE__ */ React167.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
14180
+ /* @__PURE__ */ React167.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, lineItem.value)
14053
14181
  ));
14054
14182
  };
14055
- return /* @__PURE__ */ React164.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React164.createElement(TableHead, null, /* @__PURE__ */ React164.createElement(TableRow, { isHeadRow: true, rowKey: "balance-sheet-head-row" }, /* @__PURE__ */ React164.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React164.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.totalColumnHeader) || "Total"))), /* @__PURE__ */ React164.createElement(TableBody, null, config.map((row, idx) => /* @__PURE__ */ React164.createElement(React164.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
14183
+ return /* @__PURE__ */ React167.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React167.createElement(TableHead, null, /* @__PURE__ */ React167.createElement(TableRow, { isHeadRow: true, rowKey: "balance-sheet-head-row" }, /* @__PURE__ */ React167.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React167.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.totalColumnHeader) || "Total"))), /* @__PURE__ */ React167.createElement(TableBody, null, config.map((row, idx) => /* @__PURE__ */ React167.createElement(React167.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
14056
14184
  data[row.lineItem],
14057
14185
  0,
14058
14186
  row.lineItem,
@@ -14079,7 +14207,7 @@ import { format as format5, parse, startOfDay as startOfDay2 } from "date-fns";
14079
14207
  var COMPONENT_NAME3 = "balance-sheet";
14080
14208
  var BalanceSheet = (props) => {
14081
14209
  const balanceSheetContextData = useBalanceSheet(props.effectiveDate);
14082
- return /* @__PURE__ */ React165.createElement(BalanceSheetContext.Provider, { value: balanceSheetContextData }, /* @__PURE__ */ React165.createElement(
14210
+ return /* @__PURE__ */ React168.createElement(BalanceSheetContext.Provider, { value: balanceSheetContextData }, /* @__PURE__ */ React168.createElement(
14083
14211
  BalanceSheetView,
14084
14212
  __spreadValues({
14085
14213
  asWidget: props.asWidget,
@@ -14111,20 +14239,20 @@ var BalanceSheetView = ({
14111
14239
  }
14112
14240
  }, [effectiveDate]);
14113
14241
  if (asWidget) {
14114
- return /* @__PURE__ */ React165.createElement(TableProvider, null, /* @__PURE__ */ React165.createElement(Container, { name: COMPONENT_NAME3, asWidget: true }, /* @__PURE__ */ React165.createElement(
14242
+ return /* @__PURE__ */ React168.createElement(TableProvider, null, /* @__PURE__ */ React168.createElement(Container, { name: COMPONENT_NAME3, asWidget: true }, /* @__PURE__ */ React168.createElement(
14115
14243
  View,
14116
14244
  {
14117
14245
  type: "panel",
14118
14246
  ref: containerRef,
14119
- header: /* @__PURE__ */ React165.createElement(Header2, null, /* @__PURE__ */ React165.createElement(HeaderRow, null, /* @__PURE__ */ React165.createElement(HeaderCol, null, /* @__PURE__ */ React165.createElement(
14247
+ header: /* @__PURE__ */ React168.createElement(Header2, null, /* @__PURE__ */ React168.createElement(HeaderRow, null, /* @__PURE__ */ React168.createElement(HeaderCol, null, /* @__PURE__ */ React168.createElement(
14120
14248
  BalanceSheetDatePicker,
14121
14249
  {
14122
14250
  effectiveDate,
14123
14251
  setEffectiveDate
14124
14252
  }
14125
- )), withExpandAllButton && /* @__PURE__ */ React165.createElement(HeaderCol, null, /* @__PURE__ */ React165.createElement(BalanceSheetExpandAllButton, { view }))))
14253
+ )), withExpandAllButton && /* @__PURE__ */ React168.createElement(HeaderCol, null, /* @__PURE__ */ React168.createElement(BalanceSheetExpandAllButton, { view }))))
14126
14254
  },
14127
- !data || isLoading ? /* @__PURE__ */ React165.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React165.createElement(Loader2, null)) : /* @__PURE__ */ React165.createElement(
14255
+ !data || isLoading ? /* @__PURE__ */ React168.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React168.createElement(Loader2, null)) : /* @__PURE__ */ React168.createElement(
14128
14256
  BalanceSheetTable,
14129
14257
  {
14130
14258
  data,
@@ -14134,20 +14262,20 @@ var BalanceSheetView = ({
14134
14262
  )
14135
14263
  )));
14136
14264
  }
14137
- return /* @__PURE__ */ React165.createElement(TableProvider, null, /* @__PURE__ */ React165.createElement(
14265
+ return /* @__PURE__ */ React168.createElement(TableProvider, null, /* @__PURE__ */ React168.createElement(
14138
14266
  View,
14139
14267
  {
14140
14268
  type: "panel",
14141
14269
  ref: containerRef,
14142
- header: /* @__PURE__ */ React165.createElement(Header2, null, /* @__PURE__ */ React165.createElement(HeaderRow, null, /* @__PURE__ */ React165.createElement(HeaderCol, null, /* @__PURE__ */ React165.createElement(
14270
+ header: /* @__PURE__ */ React168.createElement(Header2, null, /* @__PURE__ */ React168.createElement(HeaderRow, null, /* @__PURE__ */ React168.createElement(HeaderCol, null, /* @__PURE__ */ React168.createElement(
14143
14271
  BalanceSheetDatePicker,
14144
14272
  {
14145
14273
  effectiveDate,
14146
14274
  setEffectiveDate
14147
14275
  }
14148
- )), withExpandAllButton && /* @__PURE__ */ React165.createElement(HeaderCol, null, /* @__PURE__ */ React165.createElement(BalanceSheetExpandAllButton, { view }))))
14276
+ )), withExpandAllButton && /* @__PURE__ */ React168.createElement(HeaderCol, null, /* @__PURE__ */ React168.createElement(BalanceSheetExpandAllButton, { view }))))
14149
14277
  },
14150
- !data || isLoading ? /* @__PURE__ */ React165.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React165.createElement(Loader2, null)) : /* @__PURE__ */ React165.createElement(
14278
+ !data || isLoading ? /* @__PURE__ */ React168.createElement("div", { className: `Layer__${COMPONENT_NAME3}__loader-container` }, /* @__PURE__ */ React168.createElement(Loader2, null)) : /* @__PURE__ */ React168.createElement(
14151
14279
  BalanceSheetTable,
14152
14280
  {
14153
14281
  data,
@@ -14159,7 +14287,7 @@ var BalanceSheetView = ({
14159
14287
  };
14160
14288
 
14161
14289
  // src/components/StatementOfCashFlow/StatementOfCashFlow.tsx
14162
- import React167, { useState as useState43 } from "react";
14290
+ import React170, { useState as useState43 } from "react";
14163
14291
 
14164
14292
  // src/contexts/StatementOfCashContext/StatementOfCashFlowContext.tsx
14165
14293
  import { createContext as createContext12 } from "react";
@@ -14210,7 +14338,7 @@ var useStatementOfCashFlow = (startDate = /* @__PURE__ */ new Date(), endDate =
14210
14338
  };
14211
14339
 
14212
14340
  // src/components/StatementOfCashFlowTable/StatementOfCashFlowTable.tsx
14213
- import React166 from "react";
14341
+ import React169 from "react";
14214
14342
  var StatementOfCashFlowTable = ({
14215
14343
  data,
14216
14344
  config,
@@ -14220,7 +14348,7 @@ var StatementOfCashFlowTable = ({
14220
14348
  const renderLineItem = (lineItem, depth = 0, rowKey, rowIndex) => {
14221
14349
  const expandable = !!lineItem.line_items && lineItem.line_items.length > 0;
14222
14350
  const expanded = expandable ? isOpen(rowKey) : true;
14223
- return /* @__PURE__ */ React166.createElement(React166.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React166.createElement(
14351
+ return /* @__PURE__ */ React169.createElement(React169.Fragment, { key: rowKey + "-" + rowIndex }, /* @__PURE__ */ React169.createElement(
14224
14352
  TableRow,
14225
14353
  {
14226
14354
  rowKey: rowKey + "-" + rowIndex,
@@ -14229,8 +14357,8 @@ var StatementOfCashFlowTable = ({
14229
14357
  handleExpand: () => setIsOpen(rowKey),
14230
14358
  depth
14231
14359
  },
14232
- /* @__PURE__ */ React166.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
14233
- /* @__PURE__ */ React166.createElement(
14360
+ /* @__PURE__ */ React169.createElement(TableCell, { withExpandIcon: expandable, primary: expandable }, lineItem.display_name),
14361
+ /* @__PURE__ */ React169.createElement(
14234
14362
  TableCell,
14235
14363
  {
14236
14364
  isCurrency: !expandable || expandable && !expanded,
@@ -14246,35 +14374,35 @@ var StatementOfCashFlowTable = ({
14246
14374
  rowKey + ":" + subItem.name,
14247
14375
  subIdx
14248
14376
  )
14249
- ), expanded && expandable && /* @__PURE__ */ React166.createElement(
14377
+ ), expanded && expandable && /* @__PURE__ */ React169.createElement(
14250
14378
  TableRow,
14251
14379
  {
14252
14380
  rowKey: rowKey + "-" + rowIndex + "--summation",
14253
14381
  depth: depth + 1,
14254
14382
  variant: "summation"
14255
14383
  },
14256
- /* @__PURE__ */ React166.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
14257
- /* @__PURE__ */ React166.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, lineItem.value)
14384
+ /* @__PURE__ */ React169.createElement(TableCell, { primary: true }, `Total of ${lineItem.display_name}`),
14385
+ /* @__PURE__ */ React169.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, lineItem.value)
14258
14386
  ));
14259
14387
  };
14260
- return /* @__PURE__ */ React166.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React166.createElement(TableHead, null, /* @__PURE__ */ React166.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React166.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React166.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.totalColumnHeader) || "Total"))), /* @__PURE__ */ React166.createElement(TableBody, null, config.map((row, idx) => {
14388
+ return /* @__PURE__ */ React169.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React169.createElement(TableHead, null, /* @__PURE__ */ React169.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React169.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React169.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.totalColumnHeader) || "Total"))), /* @__PURE__ */ React169.createElement(TableBody, null, config.map((row, idx) => {
14261
14389
  if (row.type === "line_item") {
14262
- return /* @__PURE__ */ React166.createElement(React166.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
14390
+ return /* @__PURE__ */ React169.createElement(React169.Fragment, { key: row.lineItem }, data[row.lineItem] && renderLineItem(
14263
14391
  data[row.lineItem],
14264
14392
  0,
14265
14393
  row.lineItem ? row.lineItem : "",
14266
14394
  idx
14267
14395
  ));
14268
14396
  } else {
14269
- return /* @__PURE__ */ React166.createElement(
14397
+ return /* @__PURE__ */ React169.createElement(
14270
14398
  TableRow,
14271
14399
  {
14272
14400
  key: row.name + "-" + idx,
14273
14401
  rowKey: row.name + "-" + idx,
14274
14402
  variant: "default"
14275
14403
  },
14276
- /* @__PURE__ */ React166.createElement(TableCell, { primary: true }, row.displayName),
14277
- /* @__PURE__ */ React166.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, row.lineItem)
14404
+ /* @__PURE__ */ React169.createElement(TableCell, { primary: true }, row.displayName),
14405
+ /* @__PURE__ */ React169.createElement(TableCell, { primary: true, isCurrency: true, align: "right" /* RIGHT */ }, row.lineItem)
14278
14406
  );
14279
14407
  }
14280
14408
  })));
@@ -14324,7 +14452,7 @@ import { endOfMonth as endOfMonth9, startOfDay as startOfDay4, startOfMonth as s
14324
14452
  var COMPONENT_NAME4 = "statement-of-cash-flow";
14325
14453
  var StatementOfCashFlow = (props) => {
14326
14454
  const cashContextData = useStatementOfCashFlow();
14327
- return /* @__PURE__ */ React167.createElement(StatementOfCashFlowContext.Provider, { value: cashContextData }, /* @__PURE__ */ React167.createElement(StatementOfCashFlowView, __spreadValues({}, props)));
14455
+ return /* @__PURE__ */ React170.createElement(StatementOfCashFlowContext.Provider, { value: cashContextData }, /* @__PURE__ */ React170.createElement(StatementOfCashFlowView, __spreadValues({}, props)));
14328
14456
  };
14329
14457
  var StatementOfCashFlowView = ({
14330
14458
  stringOverrides,
@@ -14355,7 +14483,7 @@ var StatementOfCashFlowView = ({
14355
14483
  refetch();
14356
14484
  }
14357
14485
  };
14358
- const datePicker = datePickerMode === "monthPicker" ? /* @__PURE__ */ React167.createElement(
14486
+ const datePicker = datePickerMode === "monthPicker" ? /* @__PURE__ */ React170.createElement(
14359
14487
  DatePicker,
14360
14488
  {
14361
14489
  selected: startDate,
@@ -14373,7 +14501,7 @@ var StatementOfCashFlowView = ({
14373
14501
  ModeSelector: DatePickerModeSelector
14374
14502
  }
14375
14503
  }
14376
- ) : /* @__PURE__ */ React167.createElement(
14504
+ ) : /* @__PURE__ */ React170.createElement(
14377
14505
  DatePicker,
14378
14506
  {
14379
14507
  selected: [startDate, endDate],
@@ -14388,13 +14516,13 @@ var StatementOfCashFlowView = ({
14388
14516
  }
14389
14517
  }
14390
14518
  );
14391
- return /* @__PURE__ */ React167.createElement(TableProvider, null, /* @__PURE__ */ React167.createElement(
14519
+ return /* @__PURE__ */ React170.createElement(TableProvider, null, /* @__PURE__ */ React170.createElement(
14392
14520
  View,
14393
14521
  {
14394
14522
  type: "panel",
14395
- header: /* @__PURE__ */ React167.createElement(Header2, null, /* @__PURE__ */ React167.createElement(HeaderRow, null, /* @__PURE__ */ React167.createElement(HeaderCol, null, datePicker)))
14523
+ header: /* @__PURE__ */ React170.createElement(Header2, null, /* @__PURE__ */ React170.createElement(HeaderRow, null, /* @__PURE__ */ React170.createElement(HeaderCol, null, datePicker)))
14396
14524
  },
14397
- !data || isLoading ? /* @__PURE__ */ React167.createElement("div", { className: `Layer__${COMPONENT_NAME4}__loader-container` }, /* @__PURE__ */ React167.createElement(Loader2, null)) : /* @__PURE__ */ React167.createElement(
14525
+ !data || isLoading ? /* @__PURE__ */ React170.createElement("div", { className: `Layer__${COMPONENT_NAME4}__loader-container` }, /* @__PURE__ */ React170.createElement(Loader2, null)) : /* @__PURE__ */ React170.createElement(
14398
14526
  StatementOfCashFlowTable,
14399
14527
  {
14400
14528
  data,
@@ -14406,7 +14534,7 @@ var StatementOfCashFlowView = ({
14406
14534
  };
14407
14535
 
14408
14536
  // src/components/ChartOfAccounts/ChartOfAccounts.tsx
14409
- import React182, { useContext as useContext33, useState as useState50 } from "react";
14537
+ import React185, { useContext as useContext33, useState as useState50 } from "react";
14410
14538
 
14411
14539
  // src/contexts/ChartOfAccountsContext/ChartOfAccountsContext.tsx
14412
14540
  import { createContext as createContext13 } from "react";
@@ -15047,13 +15175,13 @@ var useLedgerAccounts = (showReversalEntries = false) => {
15047
15175
  };
15048
15176
 
15049
15177
  // src/components/ChartOfAccountsTable/ChartOfAccountsTableWithPanel.tsx
15050
- import React174, { useContext as useContext29, useState as useState47 } from "react";
15178
+ import React177, { useContext as useContext29, useState as useState47 } from "react";
15051
15179
 
15052
15180
  // src/icons/Plus.tsx
15053
- import * as React168 from "react";
15181
+ import * as React171 from "react";
15054
15182
  var Plus = (_a) => {
15055
15183
  var _b = _a, { size = 14 } = _b, props = __objRest(_b, ["size"]);
15056
- return /* @__PURE__ */ React168.createElement(
15184
+ return /* @__PURE__ */ React171.createElement(
15057
15185
  "svg",
15058
15186
  __spreadProps(__spreadValues({
15059
15187
  xmlns: "http://www.w3.org/2000/svg",
@@ -15063,7 +15191,7 @@ var Plus = (_a) => {
15063
15191
  width: size,
15064
15192
  height: size
15065
15193
  }),
15066
- /* @__PURE__ */ React168.createElement(
15194
+ /* @__PURE__ */ React171.createElement(
15067
15195
  "path",
15068
15196
  {
15069
15197
  d: "M7 2.91602V11.0827",
@@ -15072,7 +15200,7 @@ var Plus = (_a) => {
15072
15200
  strokeLinejoin: "round"
15073
15201
  }
15074
15202
  ),
15075
- /* @__PURE__ */ React168.createElement(
15203
+ /* @__PURE__ */ React171.createElement(
15076
15204
  "path",
15077
15205
  {
15078
15206
  d: "M2.91669 7H11.0834",
@@ -15086,11 +15214,11 @@ var Plus = (_a) => {
15086
15214
  var Plus_default = Plus;
15087
15215
 
15088
15216
  // src/components/ChartOfAccountsDatePicker/ChartOfAccountsDatePicker.tsx
15089
- import React169, { useContext as useContext26 } from "react";
15217
+ import React172, { useContext as useContext26 } from "react";
15090
15218
  import { endOfMonth as endOfMonth12, startOfMonth as startOfMonth15 } from "date-fns";
15091
15219
  var ChartOfAccountsDatePicker = () => {
15092
15220
  const { changeDateRange, dateRange } = useContext26(ChartOfAccountsContext);
15093
- return /* @__PURE__ */ React169.createElement(
15221
+ return /* @__PURE__ */ React172.createElement(
15094
15222
  DatePicker,
15095
15223
  {
15096
15224
  mode: "monthPicker",
@@ -15108,16 +15236,16 @@ var ChartOfAccountsDatePicker = () => {
15108
15236
  };
15109
15237
 
15110
15238
  // src/components/ChartOfAccountsSidebar/ChartOfAccountsSidebar.tsx
15111
- import React171 from "react";
15239
+ import React174 from "react";
15112
15240
 
15113
15241
  // src/components/ChartOfAccountsForm/ChartOfAccountsForm.tsx
15114
- import React170, { useContext as useContext27, useMemo as useMemo14 } from "react";
15242
+ import React173, { useContext as useContext27, useMemo as useMemo19 } from "react";
15115
15243
 
15116
15244
  // src/components/ChartOfAccountsForm/useParentOptions.ts
15117
- import { useMemo as useMemo13 } from "react";
15245
+ import { useMemo as useMemo18 } from "react";
15118
15246
  var useParentOptions = (data) => {
15119
15247
  var _a;
15120
- return useMemo13(
15248
+ return useMemo18(
15121
15249
  () => flattenAccounts((data == null ? void 0 : data.accounts) || []).sort((a, b) => (a == null ? void 0 : a.name) && (b == null ? void 0 : b.name) ? a.name.localeCompare(b.name) : 0).map((x) => {
15122
15250
  return {
15123
15251
  label: x.name,
@@ -15143,7 +15271,7 @@ var ChartOfAccountsForm = ({
15143
15271
  apiError
15144
15272
  } = useContext27(ChartOfAccountsContext);
15145
15273
  const parentOptions = useParentOptions(data);
15146
- const entry = useMemo14(() => {
15274
+ const entry = useMemo19(() => {
15147
15275
  if ((form == null ? void 0 : form.action) === "edit" && form.accountId) {
15148
15276
  return flattenAccounts((data == null ? void 0 : data.accounts) || []).find(
15149
15277
  (x) => x.id === form.accountId
@@ -15154,7 +15282,7 @@ var ChartOfAccountsForm = ({
15154
15282
  if (!form) {
15155
15283
  return null;
15156
15284
  }
15157
- return /* @__PURE__ */ React170.createElement(
15285
+ return /* @__PURE__ */ React173.createElement(
15158
15286
  "form",
15159
15287
  {
15160
15288
  className: "Layer__form",
@@ -15163,7 +15291,7 @@ var ChartOfAccountsForm = ({
15163
15291
  submitForm();
15164
15292
  }
15165
15293
  },
15166
- /* @__PURE__ */ React170.createElement(Header2, { className: "Layer__chart-of-accounts__sidebar__header" }, /* @__PURE__ */ React170.createElement(HeaderRow, null, /* @__PURE__ */ React170.createElement(HeaderCol, null, /* @__PURE__ */ React170.createElement(Heading, { size: "secondary" /* secondary */, className: "title" }, (form == null ? void 0 : form.action) === "edit" ? (stringOverrides == null ? void 0 : stringOverrides.editModeHeader) || "Edit Account" : (stringOverrides == null ? void 0 : stringOverrides.createModeHeader) || "Add New Account")), /* @__PURE__ */ React170.createElement(HeaderCol, { className: "actions" }, /* @__PURE__ */ React170.createElement(
15294
+ /* @__PURE__ */ React173.createElement(Header2, { className: "Layer__chart-of-accounts__sidebar__header" }, /* @__PURE__ */ React173.createElement(HeaderRow, null, /* @__PURE__ */ React173.createElement(HeaderCol, null, /* @__PURE__ */ React173.createElement(Heading, { size: "secondary" /* secondary */, className: "title" }, (form == null ? void 0 : form.action) === "edit" ? (stringOverrides == null ? void 0 : stringOverrides.editModeHeader) || "Edit Account" : (stringOverrides == null ? void 0 : stringOverrides.createModeHeader) || "Add New Account")), /* @__PURE__ */ React173.createElement(HeaderCol, { className: "actions" }, /* @__PURE__ */ React173.createElement(
15167
15295
  Button,
15168
15296
  {
15169
15297
  type: "button",
@@ -15172,7 +15300,7 @@ var ChartOfAccountsForm = ({
15172
15300
  disabled: sendingForm
15173
15301
  },
15174
15302
  (stringOverrides == null ? void 0 : stringOverrides.cancelButton) || "Cancel"
15175
- ), apiError && /* @__PURE__ */ React170.createElement(
15303
+ ), apiError && /* @__PURE__ */ React173.createElement(
15176
15304
  RetryButton,
15177
15305
  {
15178
15306
  type: "submit",
@@ -15181,7 +15309,7 @@ var ChartOfAccountsForm = ({
15181
15309
  disabled: sendingForm
15182
15310
  },
15183
15311
  (stringOverrides == null ? void 0 : stringOverrides.retryButton) || "Retry"
15184
- ), !apiError && /* @__PURE__ */ React170.createElement(
15312
+ ), !apiError && /* @__PURE__ */ React173.createElement(
15185
15313
  SubmitButton,
15186
15314
  {
15187
15315
  type: "submit",
@@ -15191,7 +15319,7 @@ var ChartOfAccountsForm = ({
15191
15319
  },
15192
15320
  (stringOverrides == null ? void 0 : stringOverrides.saveButton) || "Save"
15193
15321
  )))),
15194
- apiError && /* @__PURE__ */ React170.createElement(
15322
+ apiError && /* @__PURE__ */ React173.createElement(
15195
15323
  Text,
15196
15324
  {
15197
15325
  size: "sm" /* sm */,
@@ -15199,15 +15327,15 @@ var ChartOfAccountsForm = ({
15199
15327
  },
15200
15328
  apiError
15201
15329
  ),
15202
- entry && /* @__PURE__ */ React170.createElement("div", { className: "Layer__chart-of-accounts__form-edit-entry" }, /* @__PURE__ */ React170.createElement(Text, { weight: "bold" /* bold */ }, entry.name), /* @__PURE__ */ React170.createElement(Text, { weight: "bold" /* bold */ }, "$", centsToDollars(entry.balance || 0))),
15203
- /* @__PURE__ */ React170.createElement("div", { className: "Layer__chart-of-accounts__form" }, /* @__PURE__ */ React170.createElement(
15330
+ entry && /* @__PURE__ */ React173.createElement("div", { className: "Layer__chart-of-accounts__form-edit-entry" }, /* @__PURE__ */ React173.createElement(Text, { weight: "bold" /* bold */ }, entry.name), /* @__PURE__ */ React173.createElement(Text, { weight: "bold" /* bold */ }, "$", centsToDollars(entry.balance || 0))),
15331
+ /* @__PURE__ */ React173.createElement("div", { className: "Layer__chart-of-accounts__form" }, /* @__PURE__ */ React173.createElement(
15204
15332
  InputGroup,
15205
15333
  {
15206
15334
  name: "parent",
15207
15335
  label: (stringOverrides == null ? void 0 : stringOverrides.parentLabel) || "Parent",
15208
15336
  inline: true
15209
15337
  },
15210
- /* @__PURE__ */ React170.createElement(
15338
+ /* @__PURE__ */ React173.createElement(
15211
15339
  Select2,
15212
15340
  {
15213
15341
  options: parentOptions,
@@ -15216,14 +15344,14 @@ var ChartOfAccountsForm = ({
15216
15344
  disabled: sendingForm
15217
15345
  }
15218
15346
  )
15219
- ), /* @__PURE__ */ React170.createElement(
15347
+ ), /* @__PURE__ */ React173.createElement(
15220
15348
  InputGroup,
15221
15349
  {
15222
15350
  name: "name",
15223
15351
  label: (stringOverrides == null ? void 0 : stringOverrides.nameLabel) || "Name",
15224
15352
  inline: true
15225
15353
  },
15226
- /* @__PURE__ */ React170.createElement(
15354
+ /* @__PURE__ */ React173.createElement(
15227
15355
  Input,
15228
15356
  {
15229
15357
  name: "name",
@@ -15235,14 +15363,14 @@ var ChartOfAccountsForm = ({
15235
15363
  onChange: (e) => changeFormData("name", e.target.value)
15236
15364
  }
15237
15365
  )
15238
- ), /* @__PURE__ */ React170.createElement(
15366
+ ), /* @__PURE__ */ React173.createElement(
15239
15367
  InputGroup,
15240
15368
  {
15241
15369
  name: "type",
15242
15370
  label: (stringOverrides == null ? void 0 : stringOverrides.typeLabel) || "Type",
15243
15371
  inline: true
15244
15372
  },
15245
- /* @__PURE__ */ React170.createElement(
15373
+ /* @__PURE__ */ React173.createElement(
15246
15374
  Select2,
15247
15375
  {
15248
15376
  options: LEDGER_ACCOUNT_TYPES,
@@ -15253,14 +15381,14 @@ var ChartOfAccountsForm = ({
15253
15381
  disabled: sendingForm || form.action === "edit" || form.data.parent !== void 0
15254
15382
  }
15255
15383
  )
15256
- ), /* @__PURE__ */ React170.createElement(
15384
+ ), /* @__PURE__ */ React173.createElement(
15257
15385
  InputGroup,
15258
15386
  {
15259
15387
  name: "subType",
15260
15388
  label: (stringOverrides == null ? void 0 : stringOverrides.subTypeLabel) || "Sub-Type",
15261
15389
  inline: true
15262
15390
  },
15263
- /* @__PURE__ */ React170.createElement(
15391
+ /* @__PURE__ */ React173.createElement(
15264
15392
  Select2,
15265
15393
  {
15266
15394
  options: ((_g = form == null ? void 0 : form.data.type) == null ? void 0 : _g.value) !== void 0 ? LEDGER_ACCOUNT_SUBTYPES_FOR_TYPE[(_h = form == null ? void 0 : form.data.type) == null ? void 0 : _h.value] : LEDGER_ACCOUNT_SUBTYPES,
@@ -15269,14 +15397,14 @@ var ChartOfAccountsForm = ({
15269
15397
  disabled: sendingForm
15270
15398
  }
15271
15399
  )
15272
- ), /* @__PURE__ */ React170.createElement(
15400
+ ), /* @__PURE__ */ React173.createElement(
15273
15401
  InputGroup,
15274
15402
  {
15275
15403
  name: "normality",
15276
15404
  label: (stringOverrides == null ? void 0 : stringOverrides.normalityLabel) || "Normality",
15277
15405
  inline: true
15278
15406
  },
15279
- /* @__PURE__ */ React170.createElement(
15407
+ /* @__PURE__ */ React173.createElement(
15280
15408
  Select2,
15281
15409
  {
15282
15410
  options: NORMALITY_OPTIONS,
@@ -15289,7 +15417,7 @@ var ChartOfAccountsForm = ({
15289
15417
  disabled: sendingForm
15290
15418
  }
15291
15419
  )
15292
- ), /* @__PURE__ */ React170.createElement("div", { className: "actions" }, /* @__PURE__ */ React170.createElement(
15420
+ ), /* @__PURE__ */ React173.createElement("div", { className: "actions" }, /* @__PURE__ */ React173.createElement(
15293
15421
  Button,
15294
15422
  {
15295
15423
  type: "button",
@@ -15298,7 +15426,7 @@ var ChartOfAccountsForm = ({
15298
15426
  disabled: sendingForm
15299
15427
  },
15300
15428
  (stringOverrides == null ? void 0 : stringOverrides.cancelButton) || "Cancel"
15301
- ), apiError && /* @__PURE__ */ React170.createElement(
15429
+ ), apiError && /* @__PURE__ */ React173.createElement(
15302
15430
  RetryButton,
15303
15431
  {
15304
15432
  type: "submit",
@@ -15307,7 +15435,7 @@ var ChartOfAccountsForm = ({
15307
15435
  disabled: sendingForm
15308
15436
  },
15309
15437
  (stringOverrides == null ? void 0 : stringOverrides.retryButton) || "Retry"
15310
- ), !apiError && /* @__PURE__ */ React170.createElement(
15438
+ ), !apiError && /* @__PURE__ */ React173.createElement(
15311
15439
  SubmitButton,
15312
15440
  {
15313
15441
  type: "submit",
@@ -15325,17 +15453,17 @@ var ChartOfAccountsSidebar = ({
15325
15453
  parentRef: _parentRef,
15326
15454
  stringOverrides
15327
15455
  }) => {
15328
- return /* @__PURE__ */ React171.createElement(ChartOfAccountsForm, { stringOverrides });
15456
+ return /* @__PURE__ */ React174.createElement(ChartOfAccountsForm, { stringOverrides });
15329
15457
  };
15330
15458
 
15331
15459
  // src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
15332
- import React173, { useContext as useContext28, useEffect as useEffect41, useState as useState46 } from "react";
15460
+ import React176, { useContext as useContext28, useEffect as useEffect41, useState as useState46 } from "react";
15333
15461
 
15334
15462
  // src/icons/Edit2.tsx
15335
- import * as React172 from "react";
15463
+ import * as React175 from "react";
15336
15464
  var Edit2 = (_a) => {
15337
15465
  var _b = _a, { size = 18 } = _b, props = __objRest(_b, ["size"]);
15338
- return /* @__PURE__ */ React172.createElement(
15466
+ return /* @__PURE__ */ React175.createElement(
15339
15467
  "svg",
15340
15468
  __spreadProps(__spreadValues({
15341
15469
  xmlns: "http://www.w3.org/2000/svg",
@@ -15345,7 +15473,7 @@ var Edit2 = (_a) => {
15345
15473
  width: size,
15346
15474
  height: size
15347
15475
  }),
15348
- /* @__PURE__ */ React172.createElement(
15476
+ /* @__PURE__ */ React175.createElement(
15349
15477
  "path",
15350
15478
  {
15351
15479
  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",
@@ -15368,7 +15496,7 @@ var ChartOfAccountsTable = ({
15368
15496
  cumulativeIndex,
15369
15497
  accountsLength,
15370
15498
  templateAccountsEditable = true
15371
- }) => /* @__PURE__ */ React173.createElement(TableProvider, null, /* @__PURE__ */ React173.createElement(
15499
+ }) => /* @__PURE__ */ React176.createElement(TableProvider, null, /* @__PURE__ */ React176.createElement(
15372
15500
  ChartOfAccountsTableContent,
15373
15501
  {
15374
15502
  view,
@@ -15418,7 +15546,7 @@ var ChartOfAccountsTableContent = ({
15418
15546
  var _a, _b;
15419
15547
  const expandable = !!account.sub_accounts && account.sub_accounts.length > 0;
15420
15548
  const expanded = expandable ? isOpen(rowKey) : true;
15421
- return /* @__PURE__ */ React173.createElement(React173.Fragment, { key: rowKey + "-" + index }, /* @__PURE__ */ React173.createElement(
15549
+ return /* @__PURE__ */ React176.createElement(React176.Fragment, { key: rowKey + "-" + index }, /* @__PURE__ */ React176.createElement(
15422
15550
  TableRow,
15423
15551
  {
15424
15552
  rowKey: rowKey + "-" + index,
@@ -15430,7 +15558,7 @@ var ChartOfAccountsTableContent = ({
15430
15558
  },
15431
15559
  depth
15432
15560
  },
15433
- /* @__PURE__ */ React173.createElement(
15561
+ /* @__PURE__ */ React176.createElement(
15434
15562
  TableCell,
15435
15563
  {
15436
15564
  withExpandIcon: expandable,
@@ -15441,14 +15569,14 @@ var ChartOfAccountsTableContent = ({
15441
15569
  },
15442
15570
  account.name
15443
15571
  ),
15444
- /* @__PURE__ */ React173.createElement(TableCell, null, (_a = account.account_type) == null ? void 0 : _a.display_name),
15445
- /* @__PURE__ */ React173.createElement(TableCell, null, (_b = account.account_subtype) == null ? void 0 : _b.display_name),
15446
- /* @__PURE__ */ React173.createElement(TableCell, { isCurrency: true }, account.balance),
15447
- /* @__PURE__ */ React173.createElement(TableCell, null, /* @__PURE__ */ React173.createElement("span", { className: "Layer__coa__actions" }, /* @__PURE__ */ React173.createElement(
15572
+ /* @__PURE__ */ React176.createElement(TableCell, null, (_a = account.account_type) == null ? void 0 : _a.display_name),
15573
+ /* @__PURE__ */ React176.createElement(TableCell, null, (_b = account.account_subtype) == null ? void 0 : _b.display_name),
15574
+ /* @__PURE__ */ React176.createElement(TableCell, { isCurrency: true }, account.balance),
15575
+ /* @__PURE__ */ React176.createElement(TableCell, null, /* @__PURE__ */ React176.createElement("span", { className: "Layer__coa__actions" }, /* @__PURE__ */ React176.createElement(
15448
15576
  Button,
15449
15577
  {
15450
15578
  variant: "secondary" /* secondary */,
15451
- rightIcon: /* @__PURE__ */ React173.createElement(Edit2_default, { size: 12 }),
15579
+ rightIcon: /* @__PURE__ */ React176.createElement(Edit2_default, { size: 12 }),
15452
15580
  iconOnly: true,
15453
15581
  disabled: !templateAccountsEditable && !!account.stable_name,
15454
15582
  onClick: (e) => {
@@ -15470,7 +15598,7 @@ var ChartOfAccountsTableContent = ({
15470
15598
  );
15471
15599
  }));
15472
15600
  };
15473
- return /* @__PURE__ */ React173.createElement(Table, null, /* @__PURE__ */ React173.createElement(TableHead, null, /* @__PURE__ */ React173.createElement(TableRow, { isHeadRow: true, rowKey: "charts-of-accounts-head-row" }, /* @__PURE__ */ React173.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.nameColumnHeader) || "Name"), /* @__PURE__ */ React173.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React173.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.subtypeColumnHeader) || "Sub-Type"), /* @__PURE__ */ React173.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.balanceColumnHeader) || "Balance"), /* @__PURE__ */ React173.createElement(TableCell, { isHeaderCell: true }))), /* @__PURE__ */ React173.createElement(TableBody, null, !error && data.accounts.map(
15601
+ return /* @__PURE__ */ React176.createElement(Table, null, /* @__PURE__ */ React176.createElement(TableHead, null, /* @__PURE__ */ React176.createElement(TableRow, { isHeadRow: true, rowKey: "charts-of-accounts-head-row" }, /* @__PURE__ */ React176.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.nameColumnHeader) || "Name"), /* @__PURE__ */ React176.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.typeColumnHeader) || "Type"), /* @__PURE__ */ React176.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.subtypeColumnHeader) || "Sub-Type"), /* @__PURE__ */ React176.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.balanceColumnHeader) || "Balance"), /* @__PURE__ */ React176.createElement(TableCell, { isHeaderCell: true }))), /* @__PURE__ */ React176.createElement(TableBody, null, !error && data.accounts.map(
15474
15602
  (account, idx) => renderChartOfAccountsDesktopRow(
15475
15603
  account,
15476
15604
  idx,
@@ -15496,10 +15624,10 @@ var ChartOfAccountsTableWithPanel = ({
15496
15624
  const [expandAll, setExpandAll] = useState47();
15497
15625
  const cumulativeIndex = 0;
15498
15626
  const accountsLength = (_a = data == null ? void 0 : data.accounts.length) != null ? _a : 0;
15499
- return /* @__PURE__ */ React174.createElement(
15627
+ return /* @__PURE__ */ React177.createElement(
15500
15628
  Panel,
15501
15629
  {
15502
- sidebar: /* @__PURE__ */ React174.createElement(
15630
+ sidebar: /* @__PURE__ */ React177.createElement(
15503
15631
  ChartOfAccountsSidebar,
15504
15632
  {
15505
15633
  parentRef: containerRef,
@@ -15509,7 +15637,7 @@ var ChartOfAccountsTableWithPanel = ({
15509
15637
  sidebarIsOpen: Boolean(form),
15510
15638
  parentRef: containerRef
15511
15639
  },
15512
- /* @__PURE__ */ React174.createElement(Header2, { className: `Layer__${COMPONENT_NAME5}__header`, asHeader: true, rounded: true }, /* @__PURE__ */ React174.createElement(HeaderRow, null, /* @__PURE__ */ React174.createElement(HeaderCol, null, /* @__PURE__ */ React174.createElement(
15640
+ /* @__PURE__ */ React177.createElement(Header2, { className: `Layer__${COMPONENT_NAME5}__header`, asHeader: true, rounded: true }, /* @__PURE__ */ React177.createElement(HeaderRow, null, /* @__PURE__ */ React177.createElement(HeaderCol, null, /* @__PURE__ */ React177.createElement(
15513
15641
  Heading,
15514
15642
  {
15515
15643
  className: `Layer__${COMPONENT_NAME5}__title`,
@@ -15517,13 +15645,13 @@ var ChartOfAccountsTableWithPanel = ({
15517
15645
  },
15518
15646
  (stringOverrides == null ? void 0 : stringOverrides.headerText) || "Chart of Accounts"
15519
15647
  )))),
15520
- /* @__PURE__ */ React174.createElement(Header2, { className: `Layer__${COMPONENT_NAME5}__header`, sticky: true }, /* @__PURE__ */ React174.createElement(HeaderRow, null, /* @__PURE__ */ React174.createElement(HeaderCol, null, /* @__PURE__ */ React174.createElement(
15648
+ /* @__PURE__ */ React177.createElement(Header2, { className: `Layer__${COMPONENT_NAME5}__header`, sticky: true }, /* @__PURE__ */ React177.createElement(HeaderRow, null, /* @__PURE__ */ React177.createElement(HeaderCol, null, /* @__PURE__ */ React177.createElement(
15521
15649
  Heading,
15522
15650
  {
15523
15651
  size: "secondary" /* secondary */,
15524
15652
  className: `Layer__${COMPONENT_NAME5}__subtitle`
15525
15653
  },
15526
- withDateControl || withExpandAllButton ? /* @__PURE__ */ React174.createElement("div", { className: "Layer__header__actions-col" }, withDateControl && /* @__PURE__ */ React174.createElement(ChartOfAccountsDatePicker, null), withExpandAllButton && /* @__PURE__ */ React174.createElement(
15654
+ withDateControl || withExpandAllButton ? /* @__PURE__ */ React177.createElement("div", { className: "Layer__header__actions-col" }, withDateControl && /* @__PURE__ */ React177.createElement(ChartOfAccountsDatePicker, null), withExpandAllButton && /* @__PURE__ */ React177.createElement(
15527
15655
  ExpandCollapseButton,
15528
15656
  {
15529
15657
  iconOnly: view === "mobile",
@@ -15534,17 +15662,17 @@ var ChartOfAccountsTableWithPanel = ({
15534
15662
  variant: "secondary" /* secondary */
15535
15663
  }
15536
15664
  )) : null
15537
- )), /* @__PURE__ */ React174.createElement(HeaderCol, null, /* @__PURE__ */ React174.createElement(
15665
+ )), /* @__PURE__ */ React177.createElement(HeaderCol, null, /* @__PURE__ */ React177.createElement(
15538
15666
  Button,
15539
15667
  {
15540
15668
  onClick: () => addAccount(),
15541
15669
  disabled: isLoading,
15542
15670
  iconOnly: ["mobile", "tablet"].includes(view),
15543
- leftIcon: ["mobile", "tablet"].includes(view) && /* @__PURE__ */ React174.createElement(Plus_default, { size: 14 })
15671
+ leftIcon: ["mobile", "tablet"].includes(view) && /* @__PURE__ */ React177.createElement(Plus_default, { size: 14 })
15544
15672
  },
15545
15673
  (stringOverrides == null ? void 0 : stringOverrides.addAccountButtonText) || "Add Account"
15546
15674
  )))),
15547
- data && /* @__PURE__ */ React174.createElement(
15675
+ data && /* @__PURE__ */ React177.createElement(
15548
15676
  ChartOfAccountsTable,
15549
15677
  {
15550
15678
  view,
@@ -15557,7 +15685,7 @@ var ChartOfAccountsTableWithPanel = ({
15557
15685
  templateAccountsEditable
15558
15686
  }
15559
15687
  ),
15560
- error ? /* @__PURE__ */ React174.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React174.createElement(
15688
+ error ? /* @__PURE__ */ React177.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React177.createElement(
15561
15689
  DataState,
15562
15690
  {
15563
15691
  status: "failed" /* failed */,
@@ -15567,8 +15695,8 @@ var ChartOfAccountsTableWithPanel = ({
15567
15695
  isLoading: isValidating || isLoading
15568
15696
  }
15569
15697
  )) : null,
15570
- (!data || isLoading) && !error ? /* @__PURE__ */ React174.createElement("div", { className: `Layer__${COMPONENT_NAME5}__loader-container` }, /* @__PURE__ */ React174.createElement(Loader2, null)) : null,
15571
- !isLoading && !error && (data == null ? void 0 : data.accounts.length) === 0 ? /* @__PURE__ */ React174.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React174.createElement(
15698
+ (!data || isLoading) && !error ? /* @__PURE__ */ React177.createElement("div", { className: `Layer__${COMPONENT_NAME5}__loader-container` }, /* @__PURE__ */ React177.createElement(Loader2, null)) : null,
15699
+ !isLoading && !error && (data == null ? void 0 : data.accounts.length) === 0 ? /* @__PURE__ */ React177.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React177.createElement(
15572
15700
  DataState,
15573
15701
  {
15574
15702
  status: "info" /* info */,
@@ -15582,15 +15710,15 @@ var ChartOfAccountsTableWithPanel = ({
15582
15710
  };
15583
15711
 
15584
15712
  // src/components/LedgerAccount/LedgerAccountIndex.tsx
15585
- import React181, {
15713
+ import React184, {
15586
15714
  useContext as useContext32,
15587
15715
  useEffect as useEffect43,
15588
- useMemo as useMemo16,
15716
+ useMemo as useMemo21,
15589
15717
  useState as useState49
15590
15718
  } from "react";
15591
15719
 
15592
15720
  // src/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails.tsx
15593
- import React179, { useContext as useContext30, useMemo as useMemo15 } from "react";
15721
+ import React182, { useContext as useContext30, useMemo as useMemo20 } from "react";
15594
15722
 
15595
15723
  // src/utils/journal.ts
15596
15724
  var getAccountIdentifierPayload = (journalLineItem) => {
@@ -15614,14 +15742,14 @@ var entryNumber = (entry) => {
15614
15742
  };
15615
15743
 
15616
15744
  // src/components/Card/Card.tsx
15617
- import React175 from "react";
15618
- import classNames63 from "classnames";
15745
+ import React178 from "react";
15746
+ import classNames62 from "classnames";
15619
15747
  var Card = ({ children, className }) => {
15620
- return /* @__PURE__ */ React175.createElement("div", { className: classNames63("Layer__card", className) }, children);
15748
+ return /* @__PURE__ */ React178.createElement("div", { className: classNames62("Layer__card", className) }, children);
15621
15749
  };
15622
15750
 
15623
15751
  // src/components/DateTime/DateTime.tsx
15624
- import React176 from "react";
15752
+ import React179 from "react";
15625
15753
  import { parseISO as parseISO13, format as formatTime10 } from "date-fns";
15626
15754
  var DateTime = ({
15627
15755
  value,
@@ -15632,11 +15760,11 @@ var DateTime = ({
15632
15760
  onlyTime
15633
15761
  }) => {
15634
15762
  if (format8) {
15635
- return /* @__PURE__ */ React176.createElement(Text, { className: "Layer__datetime" }, formatTime10(parseISO13(value), format8));
15763
+ return /* @__PURE__ */ React179.createElement(Text, { className: "Layer__datetime" }, formatTime10(parseISO13(value), format8));
15636
15764
  }
15637
15765
  const date = formatTime10(parseISO13(value), dateFormat != null ? dateFormat : DATE_FORMAT);
15638
15766
  const time = formatTime10(parseISO13(value), timeFormat != null ? timeFormat : TIME_FORMAT);
15639
- return /* @__PURE__ */ React176.createElement(Text, { className: "Layer__datetime" }, !onlyTime && /* @__PURE__ */ React176.createElement(
15767
+ return /* @__PURE__ */ React179.createElement(Text, { className: "Layer__datetime" }, !onlyTime && /* @__PURE__ */ React179.createElement(
15640
15768
  Text,
15641
15769
  {
15642
15770
  as: "span",
@@ -15645,7 +15773,7 @@ var DateTime = ({
15645
15773
  className: "Layer__datetime__date"
15646
15774
  },
15647
15775
  date
15648
- ), !onlyDate && /* @__PURE__ */ React176.createElement(
15776
+ ), !onlyDate && /* @__PURE__ */ React179.createElement(
15649
15777
  Text,
15650
15778
  {
15651
15779
  as: "span",
@@ -15658,8 +15786,8 @@ var DateTime = ({
15658
15786
  };
15659
15787
 
15660
15788
  // src/components/DetailsList/DetailsList.tsx
15661
- import React177 from "react";
15662
- import classNames64 from "classnames";
15789
+ import React180 from "react";
15790
+ import classNames63 from "classnames";
15663
15791
  var DetailsList = ({
15664
15792
  title,
15665
15793
  children,
@@ -15667,14 +15795,14 @@ var DetailsList = ({
15667
15795
  titleClassName,
15668
15796
  actions
15669
15797
  }) => {
15670
- return /* @__PURE__ */ React177.createElement("div", { className: classNames64("Layer__details-list", className) }, title && /* @__PURE__ */ React177.createElement(Header, { className: titleClassName }, /* @__PURE__ */ React177.createElement(Heading, { size: "secondary" /* secondary */ }, title), actions && /* @__PURE__ */ React177.createElement("div", { className: "Layer__details-list__actions" }, actions)), /* @__PURE__ */ React177.createElement("ul", { className: "Layer__details-list__list" }, children));
15798
+ return /* @__PURE__ */ React180.createElement("div", { className: classNames63("Layer__details-list", className) }, title && /* @__PURE__ */ React180.createElement(Header, { className: titleClassName }, /* @__PURE__ */ React180.createElement(Heading, { size: "secondary" /* secondary */ }, title), actions && /* @__PURE__ */ React180.createElement("div", { className: "Layer__details-list__actions" }, actions)), /* @__PURE__ */ React180.createElement("ul", { className: "Layer__details-list__list" }, children));
15671
15799
  };
15672
15800
 
15673
15801
  // src/components/DetailsList/DetailsListItem.tsx
15674
- import React178 from "react";
15802
+ import React181 from "react";
15675
15803
  var renderValue = (value) => {
15676
15804
  if (typeof value === "string") {
15677
- return /* @__PURE__ */ React178.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, value);
15805
+ return /* @__PURE__ */ React181.createElement(Text, { weight: "bold" /* bold */, size: "sm" /* sm */ }, value);
15678
15806
  }
15679
15807
  return value;
15680
15808
  };
@@ -15683,7 +15811,7 @@ var DetailsListItem = ({
15683
15811
  children,
15684
15812
  isLoading
15685
15813
  }) => {
15686
- return /* @__PURE__ */ React178.createElement("li", { className: "Layer__details-list-item" }, /* @__PURE__ */ React178.createElement("label", { className: "Layer__details-list-item__label" }, label), /* @__PURE__ */ React178.createElement("span", { className: "Layer__details-list-item__value" }, isLoading ? /* @__PURE__ */ React178.createElement(SkeletonLoader, null) : renderValue(children)));
15814
+ return /* @__PURE__ */ React181.createElement("li", { className: "Layer__details-list-item" }, /* @__PURE__ */ React181.createElement("label", { className: "Layer__details-list-item__label" }, label), /* @__PURE__ */ React181.createElement("span", { className: "Layer__details-list-item__value" }, isLoading ? /* @__PURE__ */ React181.createElement(SkeletonLoader, null) : renderValue(children)));
15687
15815
  };
15688
15816
 
15689
15817
  // src/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails.tsx
@@ -15694,19 +15822,19 @@ var SourceDetailView = ({
15694
15822
  switch (source.type) {
15695
15823
  case "Transaction_Ledger_Entry_Source": {
15696
15824
  const transactionSource = source;
15697
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(
15825
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(
15698
15826
  DetailsListItem,
15699
15827
  {
15700
15828
  label: (stringOverrides == null ? void 0 : stringOverrides.accountNameLabel) || "Account name"
15701
15829
  },
15702
15830
  transactionSource.account_name
15703
- ), /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.dateLabel) || "Date" }, /* @__PURE__ */ React179.createElement(DateTime, { value: transactionSource.date })), /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(transactionSource.amount)}`), /* @__PURE__ */ React179.createElement(
15831
+ ), /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.dateLabel) || "Date" }, /* @__PURE__ */ React182.createElement(DateTime, { value: transactionSource.date })), /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(transactionSource.amount)}`), /* @__PURE__ */ React182.createElement(
15704
15832
  DetailsListItem,
15705
15833
  {
15706
15834
  label: (stringOverrides == null ? void 0 : stringOverrides.directionLabel) || "Direction"
15707
15835
  },
15708
15836
  transactionSource.direction
15709
- ), /* @__PURE__ */ React179.createElement(
15837
+ ), /* @__PURE__ */ React182.createElement(
15710
15838
  DetailsListItem,
15711
15839
  {
15712
15840
  label: (stringOverrides == null ? void 0 : stringOverrides.counterpartyLabel) || "Counterparty"
@@ -15716,23 +15844,23 @@ var SourceDetailView = ({
15716
15844
  }
15717
15845
  case "Invoice_Ledger_Entry_Source": {
15718
15846
  const invoiceSource = source;
15719
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(
15847
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(
15720
15848
  DetailsListItem,
15721
15849
  {
15722
15850
  label: (stringOverrides == null ? void 0 : stringOverrides.invoiceNumberLabel) || "Invoice number"
15723
15851
  },
15724
15852
  invoiceSource.invoice_number
15725
- ), /* @__PURE__ */ React179.createElement(
15853
+ ), /* @__PURE__ */ React182.createElement(
15726
15854
  DetailsListItem,
15727
15855
  {
15728
15856
  label: (stringOverrides == null ? void 0 : stringOverrides.recipientNameLabel) || "Recipient name"
15729
15857
  },
15730
15858
  invoiceSource.recipient_name
15731
- ), /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.dateLabel) || "Date" }, /* @__PURE__ */ React179.createElement(DateTime, { value: invoiceSource.date })), /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(invoiceSource.amount)}`));
15859
+ ), /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.dateLabel) || "Date" }, /* @__PURE__ */ React182.createElement(DateTime, { value: invoiceSource.date })), /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(invoiceSource.amount)}`));
15732
15860
  }
15733
15861
  case "Manual_Ledger_Entry_Source": {
15734
15862
  const manualSource = source;
15735
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.memoLabel) || "Memo" }, manualSource.memo), /* @__PURE__ */ React179.createElement(
15863
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.memoLabel) || "Memo" }, manualSource.memo), /* @__PURE__ */ React182.createElement(
15736
15864
  DetailsListItem,
15737
15865
  {
15738
15866
  label: (stringOverrides == null ? void 0 : stringOverrides.createdByLabel) || "Created by"
@@ -15742,17 +15870,17 @@ var SourceDetailView = ({
15742
15870
  }
15743
15871
  case "Invoice_Payment_Ledger_Entry_Source": {
15744
15872
  const invoicePaymentSource = source;
15745
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(
15873
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(
15746
15874
  DetailsListItem,
15747
15875
  {
15748
15876
  label: (stringOverrides == null ? void 0 : stringOverrides.invoiceNumberLabel) || "Invoice number"
15749
15877
  },
15750
15878
  invoicePaymentSource.invoice_number
15751
- ), /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(invoicePaymentSource.amount)}`));
15879
+ ), /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(invoicePaymentSource.amount)}`));
15752
15880
  }
15753
15881
  case "Refund_Ledger_Entry_Source": {
15754
15882
  const refundSource = source;
15755
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React179.createElement(
15883
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React182.createElement(
15756
15884
  DetailsListItem,
15757
15885
  {
15758
15886
  label: (stringOverrides == null ? void 0 : stringOverrides.recipientNameLabel) || "Recipient name"
@@ -15762,7 +15890,7 @@ var SourceDetailView = ({
15762
15890
  }
15763
15891
  case "Refund_Payment_Ledger_Entry_Source": {
15764
15892
  const refundSource = source;
15765
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React179.createElement(
15893
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React182.createElement(
15766
15894
  DetailsListItem,
15767
15895
  {
15768
15896
  label: (stringOverrides == null ? void 0 : stringOverrides.recipientNameLabel) || "Recipient name"
@@ -15772,7 +15900,7 @@ var SourceDetailView = ({
15772
15900
  }
15773
15901
  case "Opening_Balance_Ledger_Entry_Source": {
15774
15902
  const openingBalanceSource = source;
15775
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(
15903
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(
15776
15904
  DetailsListItem,
15777
15905
  {
15778
15906
  label: (stringOverrides == null ? void 0 : stringOverrides.accountNameLabel) || "Account name"
@@ -15782,7 +15910,7 @@ var SourceDetailView = ({
15782
15910
  }
15783
15911
  case "Payout_Ledger_Entry_Source": {
15784
15912
  const payoutSource = source;
15785
- return /* @__PURE__ */ React179.createElement(React179.Fragment, null, /* @__PURE__ */ React179.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(payoutSource.paid_out_amount)}`), /* @__PURE__ */ React179.createElement(
15913
+ return /* @__PURE__ */ React182.createElement(React182.Fragment, null, /* @__PURE__ */ React182.createElement(DetailsListItem, { label: (stringOverrides == null ? void 0 : stringOverrides.amountLabel) || "Amount" }, `$${centsToDollars(payoutSource.paid_out_amount)}`), /* @__PURE__ */ React182.createElement(
15786
15914
  DetailsListItem,
15787
15915
  {
15788
15916
  label: (stringOverrides == null ? void 0 : stringOverrides.processorLabel) || "Processor"
@@ -15799,7 +15927,7 @@ var LedgerAccountEntryDetails = ({
15799
15927
  }) => {
15800
15928
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
15801
15929
  const { entryData, isLoadingEntry, closeSelectedEntry, errorEntry } = useContext30(LedgerAccountsContext);
15802
- const { totalDebit, totalCredit } = useMemo15(() => {
15930
+ const { totalDebit, totalCredit } = useMemo20(() => {
15803
15931
  var _a2;
15804
15932
  let totalDebit2 = 0;
15805
15933
  let totalCredit2 = 0;
@@ -15812,15 +15940,15 @@ var LedgerAccountEntryDetails = ({
15812
15940
  });
15813
15941
  return { totalDebit: totalDebit2, totalCredit: totalCredit2 };
15814
15942
  }, [entryData]);
15815
- return /* @__PURE__ */ React179.createElement("div", { className: "Layer__ledger-account__entry-details" }, /* @__PURE__ */ React179.createElement(Header2, { className: "Layer__ledger-account__entry-details__header" }, /* @__PURE__ */ React179.createElement(HeaderRow, null, /* @__PURE__ */ React179.createElement(HeaderCol, { className: "Layer__hidden-lg Layer__hidden-xl" }, /* @__PURE__ */ React179.createElement(BackButton, { onClick: closeSelectedEntry }), /* @__PURE__ */ React179.createElement(Heading, { size: "secondary" /* secondary */ }, (stringOverrides == null ? void 0 : stringOverrides.title) || "Transaction details")), /* @__PURE__ */ React179.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React179.createElement(Heading, { size: "secondary" /* secondary */ }, ((_a = stringOverrides == null ? void 0 : stringOverrides.transactionSource) == null ? void 0 : _a.header) || "Transaction source")), /* @__PURE__ */ React179.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React179.createElement(CloseButton, { onClick: closeSelectedEntry })))), /* @__PURE__ */ React179.createElement(
15943
+ return /* @__PURE__ */ React182.createElement("div", { className: "Layer__ledger-account__entry-details" }, /* @__PURE__ */ React182.createElement(Header2, { className: "Layer__ledger-account__entry-details__header" }, /* @__PURE__ */ React182.createElement(HeaderRow, null, /* @__PURE__ */ React182.createElement(HeaderCol, { className: "Layer__hidden-lg Layer__hidden-xl" }, /* @__PURE__ */ React182.createElement(BackButton, { onClick: closeSelectedEntry }), /* @__PURE__ */ React182.createElement(Heading, { size: "secondary" /* secondary */ }, (stringOverrides == null ? void 0 : stringOverrides.title) || "Transaction details")), /* @__PURE__ */ React182.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React182.createElement(Heading, { size: "secondary" /* secondary */ }, ((_a = stringOverrides == null ? void 0 : stringOverrides.transactionSource) == null ? void 0 : _a.header) || "Transaction source")), /* @__PURE__ */ React182.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React182.createElement(CloseButton, { onClick: closeSelectedEntry })))), /* @__PURE__ */ React182.createElement(
15816
15944
  DetailsList,
15817
15945
  {
15818
15946
  title: ((_b = stringOverrides == null ? void 0 : stringOverrides.transactionSource) == null ? void 0 : _b.header) || "Transaction source",
15819
15947
  titleClassName: "Layer__hidden-lg Layer__hidden-xl",
15820
- actions: /* @__PURE__ */ React179.createElement(
15948
+ actions: /* @__PURE__ */ React182.createElement(
15821
15949
  Button,
15822
15950
  {
15823
- rightIcon: /* @__PURE__ */ React179.createElement(X_default, null),
15951
+ rightIcon: /* @__PURE__ */ React182.createElement(X_default, null),
15824
15952
  iconOnly: true,
15825
15953
  onClick: closeSelectedEntry,
15826
15954
  variant: "secondary" /* secondary */,
@@ -15828,16 +15956,16 @@ var LedgerAccountEntryDetails = ({
15828
15956
  }
15829
15957
  )
15830
15958
  },
15831
- /* @__PURE__ */ React179.createElement(
15959
+ /* @__PURE__ */ React182.createElement(
15832
15960
  DetailsListItem,
15833
15961
  {
15834
15962
  label: ((_d = (_c = stringOverrides == null ? void 0 : stringOverrides.transactionSource) == null ? void 0 : _c.details) == null ? void 0 : _d.sourceLabel) || "Source",
15835
15963
  isLoading: isLoadingEntry
15836
15964
  },
15837
- /* @__PURE__ */ React179.createElement(Badge, null, (_e = entryData == null ? void 0 : entryData.source) == null ? void 0 : _e.entity_name)
15965
+ /* @__PURE__ */ React182.createElement(Badge, null, (_e = entryData == null ? void 0 : entryData.source) == null ? void 0 : _e.entity_name)
15838
15966
  ),
15839
- ((_f = entryData == null ? void 0 : entryData.source) == null ? void 0 : _f.display_description) && /* @__PURE__ */ React179.createElement(SourceDetailView, { source: entryData == null ? void 0 : entryData.source })
15840
- ), /* @__PURE__ */ React179.createElement(
15967
+ ((_f = entryData == null ? void 0 : entryData.source) == null ? void 0 : _f.display_description) && /* @__PURE__ */ React182.createElement(SourceDetailView, { source: entryData == null ? void 0 : entryData.source })
15968
+ ), /* @__PURE__ */ React182.createElement(
15841
15969
  DetailsList,
15842
15970
  {
15843
15971
  title: ((_g = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _g.header) ? (_h = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _h.header(
@@ -15845,7 +15973,7 @@ var LedgerAccountEntryDetails = ({
15845
15973
  ) : `Journal Entry ${entryData ? entryNumber(entryData) : ""}`,
15846
15974
  className: "Layer__border-top"
15847
15975
  },
15848
- /* @__PURE__ */ React179.createElement(
15976
+ /* @__PURE__ */ React182.createElement(
15849
15977
  DetailsListItem,
15850
15978
  {
15851
15979
  label: ((_j = (_i = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _i.details) == null ? void 0 : _j.entryTypeLabel) || "Entry type",
@@ -15853,23 +15981,23 @@ var LedgerAccountEntryDetails = ({
15853
15981
  },
15854
15982
  humanizeEnum((_k = entryData == null ? void 0 : entryData.entry_type) != null ? _k : "")
15855
15983
  ),
15856
- /* @__PURE__ */ React179.createElement(
15984
+ /* @__PURE__ */ React182.createElement(
15857
15985
  DetailsListItem,
15858
15986
  {
15859
15987
  label: ((_m = (_l = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _l.details) == null ? void 0 : _m.dateLabel) || "Date",
15860
15988
  isLoading: isLoadingEntry
15861
15989
  },
15862
- (entryData == null ? void 0 : entryData.entry_at) && /* @__PURE__ */ React179.createElement(DateTime, { value: entryData == null ? void 0 : entryData.entry_at })
15990
+ (entryData == null ? void 0 : entryData.entry_at) && /* @__PURE__ */ React182.createElement(DateTime, { value: entryData == null ? void 0 : entryData.entry_at })
15863
15991
  ),
15864
- /* @__PURE__ */ React179.createElement(
15992
+ /* @__PURE__ */ React182.createElement(
15865
15993
  DetailsListItem,
15866
15994
  {
15867
15995
  label: ((_o = (_n = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _n.details) == null ? void 0 : _o.creationDateLabel) || "Creation date",
15868
15996
  isLoading: isLoadingEntry
15869
15997
  },
15870
- (entryData == null ? void 0 : entryData.date) && /* @__PURE__ */ React179.createElement(DateTime, { value: entryData == null ? void 0 : entryData.date })
15998
+ (entryData == null ? void 0 : entryData.date) && /* @__PURE__ */ React182.createElement(DateTime, { value: entryData == null ? void 0 : entryData.date })
15871
15999
  ),
15872
- (entryData == null ? void 0 : entryData.reversal_id) && /* @__PURE__ */ React179.createElement(
16000
+ (entryData == null ? void 0 : entryData.reversal_id) && /* @__PURE__ */ React182.createElement(
15873
16001
  DetailsListItem,
15874
16002
  {
15875
16003
  label: ((_q = (_p = stringOverrides == null ? void 0 : stringOverrides.journalEntry) == null ? void 0 : _p.details) == null ? void 0 : _q.reversalLabel) || "Reversal",
@@ -15877,41 +16005,41 @@ var LedgerAccountEntryDetails = ({
15877
16005
  },
15878
16006
  entryData == null ? void 0 : entryData.reversal_id.substring(0, 5)
15879
16007
  )
15880
- ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React179.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React179.createElement(Card, null, /* @__PURE__ */ React179.createElement(
16008
+ ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React182.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React182.createElement(Card, null, /* @__PURE__ */ React182.createElement(
15881
16009
  Table,
15882
16010
  {
15883
16011
  componentName: "ledger-account__entry-details",
15884
16012
  borderCollapse: "collapse"
15885
16013
  },
15886
- /* @__PURE__ */ React179.createElement(TableHead, null, /* @__PURE__ */ React179.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React179.createElement(TableCell, null, ((_r = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _r.lineItemsColumnHeader) || "Line items"), /* @__PURE__ */ React179.createElement(TableCell, { align: "right" /* RIGHT */ }, ((_s = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _s.debitColumnHeader) || "Debit"), /* @__PURE__ */ React179.createElement(TableCell, { align: "right" /* RIGHT */ }, ((_t = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _t.creditColumnHeader) || "Credit"))),
15887
- /* @__PURE__ */ React179.createElement(TableBody, null, (_u = entryData == null ? void 0 : entryData.line_items) == null ? void 0 : _u.map((item, index) => {
16014
+ /* @__PURE__ */ React182.createElement(TableHead, null, /* @__PURE__ */ React182.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React182.createElement(TableCell, null, ((_r = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _r.lineItemsColumnHeader) || "Line items"), /* @__PURE__ */ React182.createElement(TableCell, { align: "right" /* RIGHT */ }, ((_s = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _s.debitColumnHeader) || "Debit"), /* @__PURE__ */ React182.createElement(TableCell, { align: "right" /* RIGHT */ }, ((_t = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _t.creditColumnHeader) || "Credit"))),
16015
+ /* @__PURE__ */ React182.createElement(TableBody, null, (_u = entryData == null ? void 0 : entryData.line_items) == null ? void 0 : _u.map((item, index) => {
15888
16016
  var _a2;
15889
- return /* @__PURE__ */ React179.createElement(
16017
+ return /* @__PURE__ */ React182.createElement(
15890
16018
  TableRow,
15891
16019
  {
15892
16020
  key: `ledger-line-item-${index}`,
15893
16021
  rowKey: `ledger-line-item-${index}`
15894
16022
  },
15895
- /* @__PURE__ */ React179.createElement(TableCell, null, ((_a2 = item.account) == null ? void 0 : _a2.name) || ""),
15896
- /* @__PURE__ */ React179.createElement(TableCell, { align: "right" /* RIGHT */ }, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React179.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
15897
- /* @__PURE__ */ React179.createElement(TableCell, { align: "right" /* RIGHT */ }, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React179.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
16023
+ /* @__PURE__ */ React182.createElement(TableCell, null, ((_a2 = item.account) == null ? void 0 : _a2.name) || ""),
16024
+ /* @__PURE__ */ React182.createElement(TableCell, { align: "right" /* RIGHT */ }, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React182.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))),
16025
+ /* @__PURE__ */ React182.createElement(TableCell, { align: "right" /* RIGHT */ }, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React182.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0)))
15898
16026
  );
15899
- }), /* @__PURE__ */ React179.createElement(
16027
+ }), /* @__PURE__ */ React182.createElement(
15900
16028
  TableRow,
15901
16029
  {
15902
16030
  rowKey: "ledger-line-item-summation",
15903
16031
  variant: "summation"
15904
16032
  },
15905
- /* @__PURE__ */ React179.createElement(TableCell, { primary: true }, ((_v = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _v.totalRowHeader) || "Total"),
15906
- /* @__PURE__ */ React179.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, totalDebit || 0),
15907
- /* @__PURE__ */ React179.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, totalCredit || 0)
16033
+ /* @__PURE__ */ React182.createElement(TableCell, { primary: true }, ((_v = stringOverrides == null ? void 0 : stringOverrides.lineItemsTable) == null ? void 0 : _v.totalRowHeader) || "Total"),
16034
+ /* @__PURE__ */ React182.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, totalDebit || 0),
16035
+ /* @__PURE__ */ React182.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, totalCredit || 0)
15908
16036
  ))
15909
16037
  ))) : null);
15910
16038
  };
15911
16039
 
15912
16040
  // src/components/LedgerAccount/LedgerAccountRow.tsx
15913
- import React180, { useContext as useContext31, useEffect as useEffect42, useState as useState48 } from "react";
15914
- import classNames65 from "classnames";
16041
+ import React183, { useContext as useContext31, useEffect as useEffect42, useState as useState48 } from "react";
16042
+ import classNames64 from "classnames";
15915
16043
  import { parseISO as parseISO14, format as formatTime11 } from "date-fns";
15916
16044
  var LedgerAccountRow = ({
15917
16045
  row,
@@ -15933,10 +16061,10 @@ var LedgerAccountRow = ({
15933
16061
  }
15934
16062
  }, []);
15935
16063
  if (view === "tablet") {
15936
- return /* @__PURE__ */ React180.createElement(
16064
+ return /* @__PURE__ */ React183.createElement(
15937
16065
  "tr",
15938
16066
  {
15939
- className: classNames65(
16067
+ className: classNames64(
15940
16068
  "Layer__table-row",
15941
16069
  row.entry_id === selectedEntryId && "Layer__table-row--active",
15942
16070
  initialLoad && "initial-load",
@@ -15952,24 +16080,24 @@ var LedgerAccountRow = ({
15952
16080
  }
15953
16081
  }
15954
16082
  },
15955
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React180.createElement(Text, null, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React180.createElement(
16083
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React183.createElement(Text, null, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React183.createElement(
15956
16084
  Text,
15957
16085
  {
15958
16086
  weight: "normal" /* normal */,
15959
16087
  className: "Layer__ledger_account-table__journal-id"
15960
16088
  },
15961
16089
  entryNumber(row)
15962
- )), /* @__PURE__ */ React180.createElement(Text, null, (_b = (_a = row.source) == null ? void 0 : _a.display_description) != null ? _b : ""))),
15963
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
15964
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
15965
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
16090
+ )), /* @__PURE__ */ React183.createElement(Text, null, (_b = (_a = row.source) == null ? void 0 : _a.display_description) != null ? _b : ""))),
16091
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16092
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16093
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
15966
16094
  );
15967
16095
  }
15968
16096
  if (view === "mobile") {
15969
- return /* @__PURE__ */ React180.createElement(
16097
+ return /* @__PURE__ */ React183.createElement(
15970
16098
  "tr",
15971
16099
  {
15972
- className: classNames65(
16100
+ className: classNames64(
15973
16101
  "Layer__table-row",
15974
16102
  row.entry_id === selectedEntryId && "Layer__table-row--active",
15975
16103
  initialLoad && "initial-load",
@@ -15985,20 +16113,20 @@ var LedgerAccountRow = ({
15985
16113
  }
15986
16114
  }
15987
16115
  },
15988
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React180.createElement(Text, null, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React180.createElement(
16116
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React183.createElement(Text, null, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT)), /* @__PURE__ */ React183.createElement(
15989
16117
  Text,
15990
16118
  {
15991
16119
  weight: "normal" /* normal */,
15992
16120
  className: "Layer__ledger_account-table__journal-id"
15993
16121
  },
15994
16122
  entryNumber(row)
15995
- )), /* @__PURE__ */ React180.createElement(Text, null, (_d = (_c = row.source) == null ? void 0 : _c.display_description) != null ? _d : ""), /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger_account-table__balances-mobile" }, /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Debit"), /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, " ", row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)), /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Credit"), /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)), /* @__PURE__ */ React180.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Running balance"), /* @__PURE__ */ React180.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, `$${centsToDollars(row.running_balance)}`)))))
16123
+ )), /* @__PURE__ */ React183.createElement(Text, null, (_d = (_c = row.source) == null ? void 0 : _c.display_description) != null ? _d : ""), /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger_account-table__balances-mobile" }, /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Debit"), /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, " ", row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)), /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Credit"), /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)), /* @__PURE__ */ React183.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Running balance"), /* @__PURE__ */ React183.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, `$${centsToDollars(row.running_balance)}`)))))
15996
16124
  );
15997
16125
  }
15998
- return /* @__PURE__ */ React180.createElement(
16126
+ return /* @__PURE__ */ React183.createElement(
15999
16127
  "tr",
16000
16128
  {
16001
- className: classNames65(
16129
+ className: classNames64(
16002
16130
  "Layer__table-row",
16003
16131
  row.entry_id === selectedEntryId && "Layer__table-row--active",
16004
16132
  initialLoad && "initial-load",
@@ -16014,17 +16142,17 @@ var LedgerAccountRow = ({
16014
16142
  }
16015
16143
  }
16016
16144
  },
16017
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT))),
16018
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content" }, entryNumber(row))),
16019
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content" }, (_f = (_e = row.source) == null ? void 0 : _e.display_description) != null ? _f : "")),
16020
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16021
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16022
- /* @__PURE__ */ React180.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React180.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
16145
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime11(parseISO14(row.date), DATE_FORMAT))),
16146
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content" }, entryNumber(row))),
16147
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content" }, (_f = (_e = row.source) == null ? void 0 : _e.display_description) != null ? _f : "")),
16148
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16149
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars((row == null ? void 0 : row.amount) || 0)}`)),
16150
+ /* @__PURE__ */ React183.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React183.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
16023
16151
  );
16024
16152
  };
16025
16153
 
16026
16154
  // src/components/LedgerAccount/LedgerAccountIndex.tsx
16027
- import classNames66 from "classnames";
16155
+ import classNames65 from "classnames";
16028
16156
  var LedgerAccount = ({
16029
16157
  containerRef,
16030
16158
  pageSize = 15,
@@ -16054,16 +16182,16 @@ var LedgerAccount = ({
16054
16182
  return () => clearTimeout(timeoutLoad);
16055
16183
  }
16056
16184
  }, [isLoading]);
16057
- const baseClassName = classNames66(
16185
+ const baseClassName = classNames65(
16058
16186
  "Layer__ledger-account__index",
16059
16187
  accountId && "open"
16060
16188
  );
16061
- const account = useMemo16(() => {
16189
+ const account = useMemo21(() => {
16062
16190
  return flattenAccounts((accountData == null ? void 0 : accountData.accounts) || []).find(
16063
16191
  (x) => x.id === accountId
16064
16192
  );
16065
16193
  }, [accountId]);
16066
- const data = useMemo16(() => {
16194
+ const data = useMemo21(() => {
16067
16195
  var _a2;
16068
16196
  const firstPageIndex = (currentPage - 1) * pageSize;
16069
16197
  const lastPageIndex = firstPageIndex + pageSize;
@@ -16073,10 +16201,10 @@ var LedgerAccount = ({
16073
16201
  setAccountId(void 0);
16074
16202
  closeSelectedEntry();
16075
16203
  };
16076
- return /* @__PURE__ */ React181.createElement(
16204
+ return /* @__PURE__ */ React184.createElement(
16077
16205
  Panel,
16078
16206
  {
16079
- sidebar: /* @__PURE__ */ React181.createElement(
16207
+ sidebar: /* @__PURE__ */ React184.createElement(
16080
16208
  LedgerAccountEntryDetails,
16081
16209
  {
16082
16210
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.ledgerEntryDetail
@@ -16086,21 +16214,21 @@ var LedgerAccount = ({
16086
16214
  parentRef: containerRef,
16087
16215
  className: "Layer__ledger-account__panel"
16088
16216
  },
16089
- /* @__PURE__ */ React181.createElement("div", { className: baseClassName }, /* @__PURE__ */ React181.createElement(Header2, { className: "Layer__ledger-account__header" }, /* @__PURE__ */ React181.createElement(HeaderRow, null, /* @__PURE__ */ React181.createElement(HeaderCol, null, /* @__PURE__ */ React181.createElement(BackButton, { onClick: close }), /* @__PURE__ */ React181.createElement("div", { className: "Layer__ledger-account__title-container" }, /* @__PURE__ */ React181.createElement(
16217
+ /* @__PURE__ */ React184.createElement("div", { className: baseClassName }, /* @__PURE__ */ React184.createElement(Header2, { className: "Layer__ledger-account__header" }, /* @__PURE__ */ React184.createElement(HeaderRow, null, /* @__PURE__ */ React184.createElement(HeaderCol, null, /* @__PURE__ */ React184.createElement(BackButton, { onClick: close }), /* @__PURE__ */ React184.createElement("div", { className: "Layer__ledger-account__title-container" }, /* @__PURE__ */ React184.createElement(
16090
16218
  Text,
16091
16219
  {
16092
16220
  weight: "bold" /* bold */,
16093
16221
  className: "Layer__ledger-account__title"
16094
16222
  },
16095
16223
  (_a = account == null ? void 0 : account.name) != null ? _a : ""
16096
- ), /* @__PURE__ */ React181.createElement("div", { className: "Layer__ledger-account__balance-container" }, /* @__PURE__ */ React181.createElement(
16224
+ ), /* @__PURE__ */ React184.createElement("div", { className: "Layer__ledger-account__balance-container" }, /* @__PURE__ */ React184.createElement(
16097
16225
  Text,
16098
16226
  {
16099
16227
  className: "Layer__ledger-account__balance-label",
16100
16228
  size: "sm" /* sm */
16101
16229
  },
16102
16230
  "Current balance"
16103
- ), /* @__PURE__ */ React181.createElement(
16231
+ ), /* @__PURE__ */ React184.createElement(
16104
16232
  Text,
16105
16233
  {
16106
16234
  className: "Layer__ledger-account__balance-value",
@@ -16108,9 +16236,9 @@ var LedgerAccount = ({
16108
16236
  },
16109
16237
  "$",
16110
16238
  centsToDollars((account == null ? void 0 : account.balance) || 0)
16111
- )))))), /* @__PURE__ */ React181.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__ledger-account-table" }, /* @__PURE__ */ React181.createElement("thead", null, /* @__PURE__ */ React181.createElement("tr", null, view !== "desktop" && /* @__PURE__ */ React181.createElement("th", null), view === "desktop" && /* @__PURE__ */ React181.createElement(React181.Fragment, null, /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header" }, ((_b = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _b.dateColumnHeader) || "Date"), /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header" }, ((_c = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _c.journalIdColumnHeader) || "Journal id #"), /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header" }, ((_d = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _d.sourceColumnHeader) || "Source")), view !== "mobile" && /* @__PURE__ */ React181.createElement(React181.Fragment, null, /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_e = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _e.debitColumnHeader) || "Debit"), /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_f = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _f.creditColumnHeader) || "Credit"), /* @__PURE__ */ React181.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_g = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _g.runningBalanceColumnHeader) || "Running balance")))), /* @__PURE__ */ React181.createElement("tbody", null, (_h = data == null ? void 0 : data.filter(
16239
+ )))))), /* @__PURE__ */ React184.createElement("table", { className: "Layer__table Layer__table--hover-effect Layer__ledger-account-table" }, /* @__PURE__ */ React184.createElement("thead", null, /* @__PURE__ */ React184.createElement("tr", null, view !== "desktop" && /* @__PURE__ */ React184.createElement("th", null), view === "desktop" && /* @__PURE__ */ React184.createElement(React184.Fragment, null, /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header" }, ((_b = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _b.dateColumnHeader) || "Date"), /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header" }, ((_c = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _c.journalIdColumnHeader) || "Journal id #"), /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header" }, ((_d = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _d.sourceColumnHeader) || "Source")), view !== "mobile" && /* @__PURE__ */ React184.createElement(React184.Fragment, null, /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_e = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _e.debitColumnHeader) || "Debit"), /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_f = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _f.creditColumnHeader) || "Credit"), /* @__PURE__ */ React184.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, ((_g = stringOverrides == null ? void 0 : stringOverrides.ledgerEntriesTable) == null ? void 0 : _g.runningBalanceColumnHeader) || "Running balance")))), /* @__PURE__ */ React184.createElement("tbody", null, (_h = data == null ? void 0 : data.filter(
16112
16240
  (entry) => !entry.entry_reversal_of && !entry.entry_reversed_by
16113
- )) == null ? void 0 : _h.map((x, index) => /* @__PURE__ */ React181.createElement(
16241
+ )) == null ? void 0 : _h.map((x, index) => /* @__PURE__ */ React184.createElement(
16114
16242
  LedgerAccountRow,
16115
16243
  {
16116
16244
  key: x.id,
@@ -16119,7 +16247,7 @@ var LedgerAccount = ({
16119
16247
  initialLoad,
16120
16248
  view
16121
16249
  }
16122
- )))), data && /* @__PURE__ */ React181.createElement("div", { className: "Layer__ledger-account__pagination" }, /* @__PURE__ */ React181.createElement(
16250
+ )))), data && /* @__PURE__ */ React184.createElement("div", { className: "Layer__ledger-account__pagination" }, /* @__PURE__ */ React184.createElement(
16123
16251
  Pagination,
16124
16252
  {
16125
16253
  currentPage,
@@ -16127,7 +16255,7 @@ var LedgerAccount = ({
16127
16255
  pageSize,
16128
16256
  onPageChange: (page) => setCurrentPage(page)
16129
16257
  }
16130
- )), error ? /* @__PURE__ */ React181.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React181.createElement(
16258
+ )), error ? /* @__PURE__ */ React184.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React184.createElement(
16131
16259
  DataState,
16132
16260
  {
16133
16261
  status: "failed" /* failed */,
@@ -16136,7 +16264,7 @@ var LedgerAccount = ({
16136
16264
  onRefresh: () => refetch(),
16137
16265
  isLoading: isValidating || isLoading
16138
16266
  }
16139
- )) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React181.createElement("div", { className: "Layer__ledger-account__loader-container" }, /* @__PURE__ */ React181.createElement(Loader2, null)) : null, !isLoading && !error && (data == null ? void 0 : data.length) === 0 ? /* @__PURE__ */ React181.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React181.createElement(
16267
+ )) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React184.createElement("div", { className: "Layer__ledger-account__loader-container" }, /* @__PURE__ */ React184.createElement(Loader2, null)) : null, !isLoading && !error && (data == null ? void 0 : data.length) === 0 ? /* @__PURE__ */ React184.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React184.createElement(
16140
16268
  DataState,
16141
16269
  {
16142
16270
  status: "info" /* info */,
@@ -16157,7 +16285,7 @@ var ChartOfAccounts = (props) => {
16157
16285
  const ledgerAccountsContextData = useLedgerAccounts(
16158
16286
  (_a = props.showReversalEntries) != null ? _a : false
16159
16287
  );
16160
- return /* @__PURE__ */ React182.createElement(ChartOfAccountsContext.Provider, { value: chartOfAccountsContextData }, /* @__PURE__ */ React182.createElement(LedgerAccountsContext.Provider, { value: ledgerAccountsContextData }, /* @__PURE__ */ React182.createElement(ChartOfAccountsContent, __spreadValues({}, props))));
16288
+ return /* @__PURE__ */ React185.createElement(ChartOfAccountsContext.Provider, { value: chartOfAccountsContextData }, /* @__PURE__ */ React185.createElement(LedgerAccountsContext.Provider, { value: ledgerAccountsContextData }, /* @__PURE__ */ React185.createElement(ChartOfAccountsContent, __spreadValues({}, props))));
16161
16289
  };
16162
16290
  var ChartOfAccountsContent = ({
16163
16291
  asWidget,
@@ -16171,14 +16299,14 @@ var ChartOfAccountsContent = ({
16171
16299
  const containerRef = useElementViewSize(
16172
16300
  (newView) => setView(newView)
16173
16301
  );
16174
- return /* @__PURE__ */ React182.createElement(Container, { name: "chart-of-accounts", ref: containerRef, asWidget }, accountId ? /* @__PURE__ */ React182.createElement(
16302
+ return /* @__PURE__ */ React185.createElement(Container, { name: "chart-of-accounts", ref: containerRef, asWidget }, accountId ? /* @__PURE__ */ React185.createElement(
16175
16303
  LedgerAccount,
16176
16304
  {
16177
16305
  view,
16178
16306
  containerRef,
16179
16307
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.ledgerAccount
16180
16308
  }
16181
- ) : /* @__PURE__ */ React182.createElement(
16309
+ ) : /* @__PURE__ */ React185.createElement(
16182
16310
  ChartOfAccountsTableWithPanel,
16183
16311
  {
16184
16312
  asWidget,
@@ -16193,7 +16321,7 @@ var ChartOfAccountsContent = ({
16193
16321
  };
16194
16322
 
16195
16323
  // src/components/Journal/Journal.tsx
16196
- import React189, { useState as useState54 } from "react";
16324
+ import React192, { useState as useState54 } from "react";
16197
16325
 
16198
16326
  // src/contexts/JournalContext/JournalContext.tsx
16199
16327
  import { createContext as createContext15 } from "react";
@@ -16500,13 +16628,13 @@ var useJournal = () => {
16500
16628
  };
16501
16629
 
16502
16630
  // src/components/JournalTable/JournalTableWithPanel.tsx
16503
- import React188, { useContext as useContext39, useMemo as useMemo18, useState as useState53 } from "react";
16631
+ import React191, { useContext as useContext39, useMemo as useMemo23, useState as useState53 } from "react";
16504
16632
 
16505
16633
  // src/components/JournalSidebar/JournalSidebar.tsx
16506
- import React186, { useContext as useContext37 } from "react";
16634
+ import React189, { useContext as useContext37 } from "react";
16507
16635
 
16508
16636
  // src/components/JournalEntryDetails/JournalEntryDetails.tsx
16509
- import React183, { useContext as useContext34, useMemo as useMemo17, useState as useState52 } from "react";
16637
+ import React186, { useContext as useContext34, useMemo as useMemo22, useState as useState52 } from "react";
16510
16638
  var JournalEntryDetails = () => {
16511
16639
  var _a, _b, _c, _d;
16512
16640
  const {
@@ -16520,13 +16648,13 @@ var JournalEntryDetails = () => {
16520
16648
  } = useContext34(JournalContext);
16521
16649
  const [reverseEntryProcessing, setReverseEntryProcessing] = useState52(false);
16522
16650
  const [reverseEntryError, setReverseEntryError] = useState52();
16523
- const entry = useMemo17(() => {
16651
+ const entry = useMemo22(() => {
16524
16652
  if (selectedEntryId && data) {
16525
16653
  return data.find((x) => x.id === selectedEntryId);
16526
16654
  }
16527
16655
  return;
16528
16656
  }, [data, selectedEntryId]);
16529
- const sortedLineItems = useMemo17(
16657
+ const sortedLineItems = useMemo22(
16530
16658
  () => {
16531
16659
  var _a2;
16532
16660
  return (_a2 = entry == null ? void 0 : entry.line_items) == null ? void 0 : _a2.sort(
@@ -16550,15 +16678,15 @@ var JournalEntryDetails = () => {
16550
16678
  setReverseEntryProcessing(false);
16551
16679
  }
16552
16680
  });
16553
- return /* @__PURE__ */ React183.createElement("div", { className: "Layer__journal__entry-details" }, /* @__PURE__ */ React183.createElement(Header2, { className: "Layer__journal__entry-details__mobile-header" }, /* @__PURE__ */ React183.createElement(HeaderRow, null, /* @__PURE__ */ React183.createElement(HeaderCol, { className: "Layer__hidden-lg Layer__hidden-xl" }, /* @__PURE__ */ React183.createElement(BackButton, { onClick: closeSelectedEntry }), /* @__PURE__ */ React183.createElement(Heading, { size: "secondary" /* secondary */ }, "Transaction details")), /* @__PURE__ */ React183.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React183.createElement(Heading, { size: "secondary" /* secondary */ }, "Transaction source")), /* @__PURE__ */ React183.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React183.createElement(CloseButton, { onClick: closeSelectedEntry })))), /* @__PURE__ */ React183.createElement(
16681
+ return /* @__PURE__ */ React186.createElement("div", { className: "Layer__journal__entry-details" }, /* @__PURE__ */ React186.createElement(Header2, { className: "Layer__journal__entry-details__mobile-header" }, /* @__PURE__ */ React186.createElement(HeaderRow, null, /* @__PURE__ */ React186.createElement(HeaderCol, { className: "Layer__hidden-lg Layer__hidden-xl" }, /* @__PURE__ */ React186.createElement(BackButton, { onClick: closeSelectedEntry }), /* @__PURE__ */ React186.createElement(Heading, { size: "secondary" /* secondary */ }, "Transaction details")), /* @__PURE__ */ React186.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React186.createElement(Heading, { size: "secondary" /* secondary */ }, "Transaction source")), /* @__PURE__ */ React186.createElement(HeaderCol, { className: "Layer__show-lg Layer__show-xl" }, /* @__PURE__ */ React186.createElement(CloseButton, { onClick: closeSelectedEntry })))), /* @__PURE__ */ React186.createElement(
16554
16682
  DetailsList,
16555
16683
  {
16556
16684
  title: "Transaction source",
16557
16685
  titleClassName: "Layer__hidden-lg Layer__hidden-xl",
16558
- actions: /* @__PURE__ */ React183.createElement(
16686
+ actions: /* @__PURE__ */ React186.createElement(
16559
16687
  Button,
16560
16688
  {
16561
- rightIcon: /* @__PURE__ */ React183.createElement(X_default, null),
16689
+ rightIcon: /* @__PURE__ */ React186.createElement(X_default, null),
16562
16690
  iconOnly: true,
16563
16691
  onClick: closeSelectedEntry,
16564
16692
  className: "Layer__details-list__close-btn",
@@ -16566,32 +16694,32 @@ var JournalEntryDetails = () => {
16566
16694
  }
16567
16695
  )
16568
16696
  },
16569
- /* @__PURE__ */ React183.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React183.createElement(Badge, null, (_a = entry == null ? void 0 : entry.source) == null ? void 0 : _a.entity_name)),
16570
- ((_b = entry == null ? void 0 : entry.source) == null ? void 0 : _b.display_description) && /* @__PURE__ */ React183.createElement(SourceDetailView, { source: entry == null ? void 0 : entry.source })
16571
- ), /* @__PURE__ */ React183.createElement(
16697
+ /* @__PURE__ */ React186.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React186.createElement(Badge, null, (_a = entry == null ? void 0 : entry.source) == null ? void 0 : _a.entity_name)),
16698
+ ((_b = entry == null ? void 0 : entry.source) == null ? void 0 : _b.display_description) && /* @__PURE__ */ React186.createElement(SourceDetailView, { source: entry == null ? void 0 : entry.source })
16699
+ ), /* @__PURE__ */ React186.createElement(
16572
16700
  DetailsList,
16573
16701
  {
16574
16702
  title: `Journal Entry ${entry ? entryNumber(entry) : ""}`,
16575
16703
  className: "Layer__border-top"
16576
16704
  },
16577
- /* @__PURE__ */ React183.createElement(DetailsListItem, { label: "Entry type", isLoading: isLoadingEntry }, humanizeEnum((_c = entry == null ? void 0 : entry.entry_type) != null ? _c : "")),
16578
- /* @__PURE__ */ React183.createElement(DetailsListItem, { label: "Effective date", isLoading: isLoadingEntry }, (entry == null ? void 0 : entry.entry_at) && /* @__PURE__ */ React183.createElement(DateTime, { value: entry == null ? void 0 : entry.entry_at })),
16579
- /* @__PURE__ */ React183.createElement(DetailsListItem, { label: "Creation date", isLoading: isLoadingEntry }, (entry == null ? void 0 : entry.date) && /* @__PURE__ */ React183.createElement(DateTime, { value: entry == null ? void 0 : entry.date })),
16580
- (entry == null ? void 0 : entry.reversal_id) && /* @__PURE__ */ React183.createElement(DetailsListItem, { label: "Reversal", isLoading: isLoadingEntry }, `Journal Entry #${entry == null ? void 0 : entry.reversal_id.substring(0, 5)}`)
16581
- ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React183.createElement("div", { className: "Layer__journal__entry-details__line-items" }, /* @__PURE__ */ React183.createElement(Card, null, /* @__PURE__ */ React183.createElement(
16705
+ /* @__PURE__ */ React186.createElement(DetailsListItem, { label: "Entry type", isLoading: isLoadingEntry }, humanizeEnum((_c = entry == null ? void 0 : entry.entry_type) != null ? _c : "")),
16706
+ /* @__PURE__ */ React186.createElement(DetailsListItem, { label: "Effective date", isLoading: isLoadingEntry }, (entry == null ? void 0 : entry.entry_at) && /* @__PURE__ */ React186.createElement(DateTime, { value: entry == null ? void 0 : entry.entry_at })),
16707
+ /* @__PURE__ */ React186.createElement(DetailsListItem, { label: "Creation date", isLoading: isLoadingEntry }, (entry == null ? void 0 : entry.date) && /* @__PURE__ */ React186.createElement(DateTime, { value: entry == null ? void 0 : entry.date })),
16708
+ (entry == null ? void 0 : entry.reversal_id) && /* @__PURE__ */ React186.createElement(DetailsListItem, { label: "Reversal", isLoading: isLoadingEntry }, `Journal Entry #${entry == null ? void 0 : entry.reversal_id.substring(0, 5)}`)
16709
+ ), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React186.createElement("div", { className: "Layer__journal__entry-details__line-items" }, /* @__PURE__ */ React186.createElement(Card, null, /* @__PURE__ */ React186.createElement(
16582
16710
  Table,
16583
16711
  {
16584
16712
  componentName: "journal__entry-details",
16585
16713
  borderCollapse: "collapse"
16586
16714
  },
16587
- /* @__PURE__ */ React183.createElement(TableHead, null, /* @__PURE__ */ React183.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React183.createElement(TableCell, null, "Line items"), /* @__PURE__ */ React183.createElement(
16715
+ /* @__PURE__ */ React186.createElement(TableHead, null, /* @__PURE__ */ React186.createElement(TableRow, { rowKey: "soc-flow-head-row", isHeadRow: true }, /* @__PURE__ */ React186.createElement(TableCell, null, "Line items"), /* @__PURE__ */ React186.createElement(
16588
16716
  TableCell,
16589
16717
  {
16590
16718
  className: "Layer__journal__debit-credit-col",
16591
16719
  align: "right" /* RIGHT */
16592
16720
  },
16593
16721
  "Debit"
16594
- ), /* @__PURE__ */ React183.createElement(
16722
+ ), /* @__PURE__ */ React186.createElement(
16595
16723
  TableCell,
16596
16724
  {
16597
16725
  className: "Layer__journal__debit-credit-col",
@@ -16599,37 +16727,37 @@ var JournalEntryDetails = () => {
16599
16727
  },
16600
16728
  "Credit"
16601
16729
  ))),
16602
- /* @__PURE__ */ React183.createElement(TableBody, null, sortedLineItems == null ? void 0 : sortedLineItems.map((item, index) => /* @__PURE__ */ React183.createElement(
16730
+ /* @__PURE__ */ React186.createElement(TableBody, null, sortedLineItems == null ? void 0 : sortedLineItems.map((item, index) => /* @__PURE__ */ React186.createElement(
16603
16731
  TableRow,
16604
16732
  {
16605
16733
  key: `ledger-line-item-${index}`,
16606
16734
  rowKey: `ledger-line-item-${index}`
16607
16735
  },
16608
- /* @__PURE__ */ React183.createElement(TableCell, null, item.account.name),
16609
- /* @__PURE__ */ React183.createElement(
16736
+ /* @__PURE__ */ React186.createElement(TableCell, null, item.account.name),
16737
+ /* @__PURE__ */ React186.createElement(
16610
16738
  TableCell,
16611
16739
  {
16612
16740
  className: "Layer__journal__debit-credit-col",
16613
16741
  align: "right" /* RIGHT */
16614
16742
  },
16615
- item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React183.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))
16743
+ item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React186.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))
16616
16744
  ),
16617
- /* @__PURE__ */ React183.createElement(
16745
+ /* @__PURE__ */ React186.createElement(
16618
16746
  TableCell,
16619
16747
  {
16620
16748
  className: "Layer__journal__debit-credit-col",
16621
16749
  align: "right" /* RIGHT */
16622
16750
  },
16623
- item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React183.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0))
16751
+ item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React186.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0))
16624
16752
  )
16625
- )), /* @__PURE__ */ React183.createElement(
16753
+ )), /* @__PURE__ */ React186.createElement(
16626
16754
  TableRow,
16627
16755
  {
16628
16756
  rowKey: "ledger-line-item-summation",
16629
16757
  variant: "summation"
16630
16758
  },
16631
- /* @__PURE__ */ React183.createElement(TableCell, { primary: true }, "Total"),
16632
- /* @__PURE__ */ React183.createElement(
16759
+ /* @__PURE__ */ React186.createElement(TableCell, { primary: true }, "Total"),
16760
+ /* @__PURE__ */ React186.createElement(
16633
16761
  TableCell,
16634
16762
  {
16635
16763
  isCurrency: true,
@@ -16639,7 +16767,7 @@ var JournalEntryDetails = () => {
16639
16767
  },
16640
16768
  (entry == null ? void 0 : entry.line_items.filter((item) => item.direction === "DEBIT").map((item) => item.amount).reduce((a, b) => a + b, 0)) || 0
16641
16769
  ),
16642
- /* @__PURE__ */ React183.createElement(
16770
+ /* @__PURE__ */ React186.createElement(
16643
16771
  TableCell,
16644
16772
  {
16645
16773
  isCurrency: true,
@@ -16650,10 +16778,10 @@ var JournalEntryDetails = () => {
16650
16778
  (entry == null ? void 0 : entry.line_items.filter((item) => item.direction === "CREDIT").map((item) => item.amount).reduce((a, b) => a + b, 0)) || 0
16651
16779
  )
16652
16780
  ))
16653
- )), /* @__PURE__ */ React183.createElement("div", { className: "Layer__journal__entry-details__reverse-btn-container" }, /* @__PURE__ */ React183.createElement(
16781
+ )), /* @__PURE__ */ React186.createElement("div", { className: "Layer__journal__entry-details__reverse-btn-container" }, /* @__PURE__ */ React186.createElement(
16654
16782
  Button,
16655
16783
  {
16656
- rightIcon: reverseEntryError ? /* @__PURE__ */ React183.createElement(AlertCircle_default, { size: 12 }) : /* @__PURE__ */ React183.createElement(RefreshCcw_default, { size: 12 }),
16784
+ rightIcon: reverseEntryError ? /* @__PURE__ */ React186.createElement(AlertCircle_default, { size: 12 }) : /* @__PURE__ */ React186.createElement(RefreshCcw_default, { size: 12 }),
16657
16785
  variant: "secondary" /* secondary */,
16658
16786
  onClick: reverseEntryProcessing ? () => {
16659
16787
  } : onReverseEntry,
@@ -16666,10 +16794,10 @@ var JournalEntryDetails = () => {
16666
16794
  };
16667
16795
 
16668
16796
  // src/components/JournalForm/JournalForm.tsx
16669
- import React185, { useContext as useContext36 } from "react";
16797
+ import React188, { useContext as useContext36 } from "react";
16670
16798
 
16671
16799
  // src/components/JournalForm/JournalFormEntryLines.tsx
16672
- import React184, { useContext as useContext35 } from "react";
16800
+ import React187, { useContext as useContext35 } from "react";
16673
16801
  var JournalFormEntryLines = ({
16674
16802
  entrylineItems,
16675
16803
  addEntryLine,
@@ -16681,14 +16809,14 @@ var JournalFormEntryLines = ({
16681
16809
  const { data: accountsData } = useContext35(ChartOfAccountsContext);
16682
16810
  const { form } = useContext35(JournalContext);
16683
16811
  const parentOptions = useParentOptions(accountsData);
16684
- return /* @__PURE__ */ React184.createElement(React184.Fragment, null, ["DEBIT", "CREDIT"].map((direction, idx) => {
16685
- return /* @__PURE__ */ React184.createElement(
16812
+ return /* @__PURE__ */ React187.createElement(React187.Fragment, null, ["DEBIT", "CREDIT"].map((direction, idx) => {
16813
+ return /* @__PURE__ */ React187.createElement(
16686
16814
  "div",
16687
16815
  {
16688
16816
  key: "Layer__journal__form__input-group-" + idx,
16689
16817
  className: "Layer__journal__form__input-group Layer__journal__form__input-group__border"
16690
16818
  },
16691
- /* @__PURE__ */ React184.createElement(
16819
+ /* @__PURE__ */ React187.createElement(
16692
16820
  Text,
16693
16821
  {
16694
16822
  className: "Layer__journal__form__input-group__title",
@@ -16703,13 +16831,13 @@ var JournalFormEntryLines = ({
16703
16831
  if (item.direction !== direction) {
16704
16832
  return null;
16705
16833
  }
16706
- return /* @__PURE__ */ React184.createElement(
16834
+ return /* @__PURE__ */ React187.createElement(
16707
16835
  "div",
16708
16836
  {
16709
16837
  className: "Layer__journal__form__input-group__line-item",
16710
16838
  key: direction + "-" + idx2
16711
16839
  },
16712
- /* @__PURE__ */ React184.createElement(InputGroup, { name: direction, label: "Amount", inline: true }, /* @__PURE__ */ React184.createElement(
16840
+ /* @__PURE__ */ React187.createElement(InputGroup, { name: direction, label: "Amount", inline: true }, /* @__PURE__ */ React187.createElement(
16713
16841
  InputWithBadge,
16714
16842
  {
16715
16843
  name: direction,
@@ -16735,14 +16863,14 @@ var JournalFormEntryLines = ({
16735
16863
  )) == null ? void 0 : _c.message
16736
16864
  }
16737
16865
  )),
16738
- /* @__PURE__ */ React184.createElement(
16866
+ /* @__PURE__ */ React187.createElement(
16739
16867
  InputGroup,
16740
16868
  {
16741
16869
  name: "account-name",
16742
16870
  label: "Account name",
16743
16871
  inline: true
16744
16872
  },
16745
- /* @__PURE__ */ React184.createElement(
16873
+ /* @__PURE__ */ React187.createElement(
16746
16874
  Select2,
16747
16875
  {
16748
16876
  options: parentOptions,
@@ -16766,18 +16894,18 @@ var JournalFormEntryLines = ({
16766
16894
  )) == null ? void 0 : _f.message
16767
16895
  }
16768
16896
  ),
16769
- idx2 >= 2 && /* @__PURE__ */ React184.createElement(
16897
+ idx2 >= 2 && /* @__PURE__ */ React187.createElement(
16770
16898
  IconButton,
16771
16899
  {
16772
16900
  className: "Layer__remove__button",
16773
16901
  onClick: () => removeEntryLine(idx2),
16774
- icon: /* @__PURE__ */ React184.createElement(Trash_default, null)
16902
+ icon: /* @__PURE__ */ React187.createElement(Trash_default, null)
16775
16903
  }
16776
16904
  )
16777
16905
  )
16778
16906
  );
16779
16907
  }),
16780
- (config.form.addEntryLinesLimit === void 0 || config.form.addEntryLinesLimit > (entrylineItems == null ? void 0 : entrylineItems.length)) && /* @__PURE__ */ React184.createElement(
16908
+ (config.form.addEntryLinesLimit === void 0 || config.form.addEntryLinesLimit > (entrylineItems == null ? void 0 : entrylineItems.length)) && /* @__PURE__ */ React187.createElement(
16781
16909
  TextButton,
16782
16910
  {
16783
16911
  className: "Layer__journal__add-entry-line",
@@ -16805,7 +16933,7 @@ var JournalForm = ({
16805
16933
  addEntryLine,
16806
16934
  removeEntryLine
16807
16935
  } = useContext36(JournalContext);
16808
- return /* @__PURE__ */ React185.createElement(
16936
+ return /* @__PURE__ */ React188.createElement(
16809
16937
  "form",
16810
16938
  {
16811
16939
  className: "Layer__form",
@@ -16814,7 +16942,7 @@ var JournalForm = ({
16814
16942
  submitForm();
16815
16943
  }
16816
16944
  },
16817
- /* @__PURE__ */ React185.createElement(Header2, { className: "Layer__journal__sidebar__header" }, /* @__PURE__ */ React185.createElement(HeaderRow, null, /* @__PURE__ */ React185.createElement(HeaderCol, null, /* @__PURE__ */ React185.createElement(Heading, { size: "secondary" /* secondary */, className: "title" }, (_a = stringOverrides == null ? void 0 : stringOverrides.header) != null ? _a : "Add New Entry")), /* @__PURE__ */ React185.createElement(HeaderCol, { className: "actions" }, /* @__PURE__ */ React185.createElement(
16945
+ /* @__PURE__ */ React188.createElement(Header2, { className: "Layer__journal__sidebar__header" }, /* @__PURE__ */ React188.createElement(HeaderRow, null, /* @__PURE__ */ React188.createElement(HeaderCol, null, /* @__PURE__ */ React188.createElement(Heading, { size: "secondary" /* secondary */, className: "title" }, (_a = stringOverrides == null ? void 0 : stringOverrides.header) != null ? _a : "Add New Entry")), /* @__PURE__ */ React188.createElement(HeaderCol, { className: "actions" }, /* @__PURE__ */ React188.createElement(
16818
16946
  Button,
16819
16947
  {
16820
16948
  type: "button",
@@ -16823,7 +16951,7 @@ var JournalForm = ({
16823
16951
  disabled: sendingForm
16824
16952
  },
16825
16953
  (stringOverrides == null ? void 0 : stringOverrides.cancelButton) || "Cancel"
16826
- ), apiError && /* @__PURE__ */ React185.createElement(
16954
+ ), apiError && /* @__PURE__ */ React188.createElement(
16827
16955
  RetryButton,
16828
16956
  {
16829
16957
  type: "submit",
@@ -16832,7 +16960,7 @@ var JournalForm = ({
16832
16960
  disabled: sendingForm
16833
16961
  },
16834
16962
  (stringOverrides == null ? void 0 : stringOverrides.retryButton) || "Retry"
16835
- ), !apiError && /* @__PURE__ */ React185.createElement(
16963
+ ), !apiError && /* @__PURE__ */ React188.createElement(
16836
16964
  SubmitButton,
16837
16965
  {
16838
16966
  type: "submit",
@@ -16842,7 +16970,7 @@ var JournalForm = ({
16842
16970
  },
16843
16971
  (stringOverrides == null ? void 0 : stringOverrides.saveButton) || "Save"
16844
16972
  )))),
16845
- apiError && /* @__PURE__ */ React185.createElement(
16973
+ apiError && /* @__PURE__ */ React188.createElement(
16846
16974
  Text,
16847
16975
  {
16848
16976
  size: "sm" /* sm */,
@@ -16850,7 +16978,7 @@ var JournalForm = ({
16850
16978
  },
16851
16979
  apiError
16852
16980
  ),
16853
- /* @__PURE__ */ React185.createElement("div", { className: "Layer__journal__form__input-group" }, /* @__PURE__ */ React185.createElement(InputGroup, { name: "date", label: "Effective Date", inline: true }, /* @__PURE__ */ React185.createElement("div", { className: "Layer__journal__datepicker__wrapper" }, /* @__PURE__ */ React185.createElement(
16981
+ /* @__PURE__ */ React188.createElement("div", { className: "Layer__journal__form__input-group" }, /* @__PURE__ */ React188.createElement(InputGroup, { name: "date", label: "Effective Date", inline: true }, /* @__PURE__ */ React188.createElement("div", { className: "Layer__journal__datepicker__wrapper" }, /* @__PURE__ */ React188.createElement(
16854
16982
  DatePicker,
16855
16983
  {
16856
16984
  selected: (form == null ? void 0 : form.data.entry_at) ? new Date(form == null ? void 0 : form.data.entry_at) : /* @__PURE__ */ new Date(),
@@ -16863,7 +16991,7 @@ var JournalForm = ({
16863
16991
  placeholderText: "Select date",
16864
16992
  currentDateOption: false
16865
16993
  }
16866
- ), /* @__PURE__ */ React185.createElement(
16994
+ ), /* @__PURE__ */ React188.createElement(
16867
16995
  DatePicker,
16868
16996
  {
16869
16997
  selected: (form == null ? void 0 : form.data.entry_at) ? new Date(form == null ? void 0 : form.data.entry_at) : /* @__PURE__ */ new Date(),
@@ -16877,7 +17005,7 @@ var JournalForm = ({
16877
17005
  currentDateOption: false
16878
17006
  }
16879
17007
  )))),
16880
- /* @__PURE__ */ React185.createElement(
17008
+ /* @__PURE__ */ React188.createElement(
16881
17009
  JournalFormEntryLines,
16882
17010
  {
16883
17011
  entrylineItems: (form == null ? void 0 : form.data.line_items) || [],
@@ -16888,7 +17016,7 @@ var JournalForm = ({
16888
17016
  config
16889
17017
  }
16890
17018
  ),
16891
- /* @__PURE__ */ React185.createElement("div", { className: "Layer__journal__form__input-group Layer__journal__form__input-group__textarea" }, /* @__PURE__ */ React185.createElement(InputGroup, { name: "memo", label: "Notes" }, /* @__PURE__ */ React185.createElement(
17019
+ /* @__PURE__ */ React188.createElement("div", { className: "Layer__journal__form__input-group Layer__journal__form__input-group__textarea" }, /* @__PURE__ */ React188.createElement(InputGroup, { name: "memo", label: "Notes" }, /* @__PURE__ */ React188.createElement(
16892
17020
  Textarea,
16893
17021
  {
16894
17022
  name: "memo",
@@ -16898,7 +17026,7 @@ var JournalForm = ({
16898
17026
  disabled: sendingForm
16899
17027
  }
16900
17028
  ))),
16901
- /* @__PURE__ */ React185.createElement("div", { className: "Layer__journal__bottom-actions" }, /* @__PURE__ */ React185.createElement(
17029
+ /* @__PURE__ */ React188.createElement("div", { className: "Layer__journal__bottom-actions" }, /* @__PURE__ */ React188.createElement(
16902
17030
  Button,
16903
17031
  {
16904
17032
  type: "button",
@@ -16907,7 +17035,7 @@ var JournalForm = ({
16907
17035
  disabled: sendingForm
16908
17036
  },
16909
17037
  (stringOverrides == null ? void 0 : stringOverrides.cancelButton) || "Cancel"
16910
- ), apiError && /* @__PURE__ */ React185.createElement(
17038
+ ), apiError && /* @__PURE__ */ React188.createElement(
16911
17039
  RetryButton,
16912
17040
  {
16913
17041
  type: "submit",
@@ -16916,7 +17044,7 @@ var JournalForm = ({
16916
17044
  disabled: sendingForm
16917
17045
  },
16918
17046
  (stringOverrides == null ? void 0 : stringOverrides.retryButton) || "Retry"
16919
- ), !apiError && /* @__PURE__ */ React185.createElement(
17047
+ ), !apiError && /* @__PURE__ */ React188.createElement(
16920
17048
  SubmitButton,
16921
17049
  {
16922
17050
  type: "submit",
@@ -16937,13 +17065,13 @@ var JournalSidebar = ({
16937
17065
  }) => {
16938
17066
  const { selectedEntryId } = useContext37(JournalContext);
16939
17067
  if (selectedEntryId !== "new") {
16940
- return /* @__PURE__ */ React186.createElement(JournalEntryDetails, null);
17068
+ return /* @__PURE__ */ React189.createElement(JournalEntryDetails, null);
16941
17069
  }
16942
- return /* @__PURE__ */ React186.createElement(JournalForm, { config, stringOverrides });
17070
+ return /* @__PURE__ */ React189.createElement(JournalForm, { config, stringOverrides });
16943
17071
  };
16944
17072
 
16945
17073
  // src/components/JournalTable/JournalTable.tsx
16946
- import React187, { useContext as useContext38, useEffect as useEffect45 } from "react";
17074
+ import React190, { useContext as useContext38, useEffect as useEffect45 } from "react";
16947
17075
  import { parseISO as parseISO15, format as formatTime12 } from "date-fns";
16948
17076
  var accountName = (row) => {
16949
17077
  if ("account" in row) {
@@ -16958,7 +17086,7 @@ var JournalTable = ({
16958
17086
  view,
16959
17087
  data,
16960
17088
  stringOverrides
16961
- }) => /* @__PURE__ */ React187.createElement(TableProvider, null, /* @__PURE__ */ React187.createElement(
17089
+ }) => /* @__PURE__ */ React190.createElement(TableProvider, null, /* @__PURE__ */ React190.createElement(
16962
17090
  JournalTableContent,
16963
17091
  {
16964
17092
  view,
@@ -16980,7 +17108,7 @@ var JournalTableContent = ({
16980
17108
  const renderJournalRow = (row, index, rowKey, depth) => {
16981
17109
  const expandable = !!row.line_items && row.line_items.length > 0;
16982
17110
  const expanded = expandable ? isOpen(rowKey) : true;
16983
- return /* @__PURE__ */ React187.createElement(React187.Fragment, { key: rowKey + "-" + index }, /* @__PURE__ */ React187.createElement(
17111
+ return /* @__PURE__ */ React190.createElement(React190.Fragment, { key: rowKey + "-" + index }, /* @__PURE__ */ React190.createElement(
16984
17112
  TableRow,
16985
17113
  {
16986
17114
  rowKey: rowKey + "-" + index,
@@ -16998,7 +17126,7 @@ var JournalTableContent = ({
16998
17126
  },
16999
17127
  depth
17000
17128
  },
17001
- /* @__PURE__ */ React187.createElement(
17129
+ /* @__PURE__ */ React190.createElement(
17002
17130
  TableCell,
17003
17131
  {
17004
17132
  withExpandIcon: expandable,
@@ -17009,16 +17137,16 @@ var JournalTableContent = ({
17009
17137
  },
17010
17138
  entryNumber(row)
17011
17139
  ),
17012
- /* @__PURE__ */ React187.createElement(TableCell, null, row.entry_at && formatTime12(parseISO15(row.entry_at), DATE_FORMAT)),
17013
- /* @__PURE__ */ React187.createElement(TableCell, null, humanizeEnum(row.entry_type)),
17014
- /* @__PURE__ */ React187.createElement(TableCell, null, "(", row.line_items.length, ")"),
17015
- /* @__PURE__ */ React187.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, "line_items" in row && Math.abs(
17140
+ /* @__PURE__ */ React190.createElement(TableCell, null, row.entry_at && formatTime12(parseISO15(row.entry_at), DATE_FORMAT)),
17141
+ /* @__PURE__ */ React190.createElement(TableCell, null, humanizeEnum(row.entry_type)),
17142
+ /* @__PURE__ */ React190.createElement(TableCell, null, "(", row.line_items.length, ")"),
17143
+ /* @__PURE__ */ React190.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, "line_items" in row && Math.abs(
17016
17144
  row.line_items.filter((item) => item.direction === "DEBIT").map((item) => item.amount).reduce((a, b) => a + b, 0)
17017
17145
  )),
17018
- /* @__PURE__ */ React187.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, "line_items" in row && Math.abs(
17146
+ /* @__PURE__ */ React190.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, "line_items" in row && Math.abs(
17019
17147
  row.line_items.filter((item) => item.direction === "CREDIT").map((item) => item.amount).reduce((a, b) => a + b, 0)
17020
17148
  ))
17021
- ), expandable && expanded && row.line_items.map((subItem, subIdx) => /* @__PURE__ */ React187.createElement(
17149
+ ), expandable && expanded && row.line_items.map((subItem, subIdx) => /* @__PURE__ */ React190.createElement(
17022
17150
  TableRow,
17023
17151
  {
17024
17152
  key: rowKey + "-" + index + "-" + subIdx,
@@ -17026,15 +17154,15 @@ var JournalTableContent = ({
17026
17154
  depth: depth + 1,
17027
17155
  selected: selectedEntryId === row.id
17028
17156
  },
17029
- /* @__PURE__ */ React187.createElement(TableCell, null),
17030
- /* @__PURE__ */ React187.createElement(TableCell, null),
17031
- /* @__PURE__ */ React187.createElement(TableCell, null),
17032
- /* @__PURE__ */ React187.createElement(TableCell, null, accountName(subItem)),
17033
- subItem.direction === "DEBIT" && subItem.amount >= 0 ? /* @__PURE__ */ React187.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, subItem.amount) : /* @__PURE__ */ React187.createElement(TableCell, null),
17034
- subItem.direction === "CREDIT" && subItem.amount >= 0 ? /* @__PURE__ */ React187.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, subItem.amount) : /* @__PURE__ */ React187.createElement(TableCell, null)
17157
+ /* @__PURE__ */ React190.createElement(TableCell, null),
17158
+ /* @__PURE__ */ React190.createElement(TableCell, null),
17159
+ /* @__PURE__ */ React190.createElement(TableCell, null),
17160
+ /* @__PURE__ */ React190.createElement(TableCell, null, accountName(subItem)),
17161
+ subItem.direction === "DEBIT" && subItem.amount >= 0 ? /* @__PURE__ */ React190.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, subItem.amount) : /* @__PURE__ */ React190.createElement(TableCell, null),
17162
+ subItem.direction === "CREDIT" && subItem.amount >= 0 ? /* @__PURE__ */ React190.createElement(TableCell, { isCurrency: true, primary: true, align: "right" /* RIGHT */ }, subItem.amount) : /* @__PURE__ */ React190.createElement(TableCell, null)
17035
17163
  )));
17036
17164
  };
17037
- return /* @__PURE__ */ React187.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React187.createElement(TableHead, null, /* @__PURE__ */ React187.createElement(TableRow, { isHeadRow: true, rowKey: "journal-head-row" }, /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.idColumnHeader) || "Id"), /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.dateColumnHeader) || "Date"), /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.transactionColumnHeader) || "Transaction"), /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.accountColumnHeader) || "Account Name"), /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.debitColumnHeader) || "Debit"), /* @__PURE__ */ React187.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.creditColumnHeader) || "Credit"))), /* @__PURE__ */ React187.createElement(TableBody, null, data.map(
17165
+ return /* @__PURE__ */ React190.createElement(Table, { borderCollapse: "collapse" }, /* @__PURE__ */ React190.createElement(TableHead, null, /* @__PURE__ */ React190.createElement(TableRow, { isHeadRow: true, rowKey: "journal-head-row" }, /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.idColumnHeader) || "Id"), /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.dateColumnHeader) || "Date"), /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.transactionColumnHeader) || "Transaction"), /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true }, (stringOverrides == null ? void 0 : stringOverrides.accountColumnHeader) || "Account Name"), /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.debitColumnHeader) || "Debit"), /* @__PURE__ */ React190.createElement(TableCell, { isHeaderCell: true, align: "right" /* RIGHT */ }, (stringOverrides == null ? void 0 : stringOverrides.creditColumnHeader) || "Credit"))), /* @__PURE__ */ React190.createElement(TableBody, null, data.map(
17038
17166
  (entry, idx) => renderJournalRow(entry, idx, `journal-row-${entry.id}`, 0)
17039
17167
  )));
17040
17168
  };
@@ -17058,16 +17186,16 @@ var JournalTableWithPanel = ({
17058
17186
  selectedEntryId,
17059
17187
  addEntry
17060
17188
  } = useContext39(JournalContext);
17061
- const data = useMemo18(() => {
17189
+ const data = useMemo23(() => {
17062
17190
  var _a;
17063
17191
  const firstPageIndex = (currentPage - 1) * pageSize;
17064
17192
  const lastPageIndex = firstPageIndex + pageSize;
17065
17193
  return (_a = rawData == null ? void 0 : rawData.sort((a, b) => Date.parse(b.entry_at) - Date.parse(a.entry_at))) == null ? void 0 : _a.slice(firstPageIndex, lastPageIndex);
17066
17194
  }, [rawData, currentPage]);
17067
- return /* @__PURE__ */ React188.createElement(
17195
+ return /* @__PURE__ */ React191.createElement(
17068
17196
  Panel,
17069
17197
  {
17070
- sidebar: /* @__PURE__ */ React188.createElement(
17198
+ sidebar: /* @__PURE__ */ React191.createElement(
17071
17199
  JournalSidebar,
17072
17200
  {
17073
17201
  parentRef: containerRef,
@@ -17078,7 +17206,7 @@ var JournalTableWithPanel = ({
17078
17206
  sidebarIsOpen: Boolean(selectedEntryId),
17079
17207
  parentRef: containerRef
17080
17208
  },
17081
- /* @__PURE__ */ React188.createElement(
17209
+ /* @__PURE__ */ React191.createElement(
17082
17210
  Header2,
17083
17211
  {
17084
17212
  className: `Layer__${COMPONENT_NAME6}__header`,
@@ -17086,7 +17214,7 @@ var JournalTableWithPanel = ({
17086
17214
  sticky: true,
17087
17215
  rounded: true
17088
17216
  },
17089
- /* @__PURE__ */ React188.createElement(HeaderRow, null, /* @__PURE__ */ React188.createElement(HeaderCol, null, /* @__PURE__ */ React188.createElement(
17217
+ /* @__PURE__ */ React191.createElement(HeaderRow, null, /* @__PURE__ */ React191.createElement(HeaderCol, null, /* @__PURE__ */ React191.createElement(
17090
17218
  Heading,
17091
17219
  {
17092
17220
  className: `Layer__${COMPONENT_NAME6}__title`,
@@ -17095,25 +17223,25 @@ var JournalTableWithPanel = ({
17095
17223
  (stringOverrides == null ? void 0 : stringOverrides.componentTitle) || "Journal"
17096
17224
  )))
17097
17225
  ),
17098
- /* @__PURE__ */ React188.createElement(Header2, null, /* @__PURE__ */ React188.createElement(HeaderRow, null, /* @__PURE__ */ React188.createElement(HeaderCol, null, /* @__PURE__ */ React188.createElement(
17226
+ /* @__PURE__ */ React191.createElement(Header2, null, /* @__PURE__ */ React191.createElement(HeaderRow, null, /* @__PURE__ */ React191.createElement(HeaderCol, null, /* @__PURE__ */ React191.createElement(
17099
17227
  Heading,
17100
17228
  {
17101
17229
  size: "secondary" /* secondary */,
17102
17230
  className: `Layer__${COMPONENT_NAME6}__subtitle`
17103
17231
  },
17104
17232
  (stringOverrides == null ? void 0 : stringOverrides.componentSubtitle) || "Entries"
17105
- )), /* @__PURE__ */ React188.createElement(HeaderCol, null, /* @__PURE__ */ React188.createElement(
17233
+ )), /* @__PURE__ */ React191.createElement(HeaderCol, null, /* @__PURE__ */ React191.createElement(
17106
17234
  Button,
17107
17235
  {
17108
17236
  onClick: () => addEntry(),
17109
17237
  disabled: isLoading,
17110
17238
  iconOnly: view === "mobile",
17111
- leftIcon: view === "mobile" && /* @__PURE__ */ React188.createElement(PlusIcon_default, { size: 14 })
17239
+ leftIcon: view === "mobile" && /* @__PURE__ */ React191.createElement(PlusIcon_default, { size: 14 })
17112
17240
  },
17113
17241
  (stringOverrides == null ? void 0 : stringOverrides.addEntryButton) || "Add Entry"
17114
17242
  )))),
17115
- data && /* @__PURE__ */ React188.createElement(JournalTable, { view: "desktop", data }),
17116
- data && /* @__PURE__ */ React188.createElement("div", { className: "Layer__journal__pagination" }, /* @__PURE__ */ React188.createElement(
17243
+ data && /* @__PURE__ */ React191.createElement(JournalTable, { view: "desktop", data }),
17244
+ data && /* @__PURE__ */ React191.createElement("div", { className: "Layer__journal__pagination" }, /* @__PURE__ */ React191.createElement(
17117
17245
  Pagination,
17118
17246
  {
17119
17247
  currentPage,
@@ -17122,7 +17250,7 @@ var JournalTableWithPanel = ({
17122
17250
  onPageChange: (page) => setCurrentPage(page)
17123
17251
  }
17124
17252
  )),
17125
- (data == null ? void 0 : data.length) === 0 && !isLoading && !error && /* @__PURE__ */ React188.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React188.createElement(
17253
+ (data == null ? void 0 : data.length) === 0 && !isLoading && !error && /* @__PURE__ */ React191.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React191.createElement(
17126
17254
  DataState,
17127
17255
  {
17128
17256
  status: "allDone" /* allDone */,
@@ -17130,7 +17258,7 @@ var JournalTableWithPanel = ({
17130
17258
  description: "There are no entries in the journal."
17131
17259
  }
17132
17260
  )),
17133
- error ? /* @__PURE__ */ React188.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React188.createElement(
17261
+ error ? /* @__PURE__ */ React191.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React191.createElement(
17134
17262
  DataState,
17135
17263
  {
17136
17264
  status: "failed" /* failed */,
@@ -17140,7 +17268,7 @@ var JournalTableWithPanel = ({
17140
17268
  isLoading: isValidating || isLoading
17141
17269
  }
17142
17270
  )) : null,
17143
- (!data || isLoading) && !error ? /* @__PURE__ */ React188.createElement("div", { className: `Layer__${COMPONENT_NAME6}__loader-container` }, /* @__PURE__ */ React188.createElement(Loader2, null)) : null
17271
+ (!data || isLoading) && !error ? /* @__PURE__ */ React191.createElement("div", { className: `Layer__${COMPONENT_NAME6}__loader-container` }, /* @__PURE__ */ React191.createElement(Loader2, null)) : null
17144
17272
  );
17145
17273
  };
17146
17274
 
@@ -17153,7 +17281,7 @@ var JOURNAL_CONFIG = {
17153
17281
  var Journal = (props) => {
17154
17282
  const JournalContextData = useJournal();
17155
17283
  const AccountsContextData = useChartOfAccounts();
17156
- return /* @__PURE__ */ React189.createElement(ChartOfAccountsContext.Provider, { value: AccountsContextData }, /* @__PURE__ */ React189.createElement(JournalContext.Provider, { value: JournalContextData }, /* @__PURE__ */ React189.createElement(JournalContent, __spreadValues({}, props))));
17284
+ return /* @__PURE__ */ React192.createElement(ChartOfAccountsContext.Provider, { value: AccountsContextData }, /* @__PURE__ */ React192.createElement(JournalContext.Provider, { value: JournalContextData }, /* @__PURE__ */ React192.createElement(JournalContent, __spreadValues({}, props))));
17157
17285
  };
17158
17286
  var JournalContent = ({
17159
17287
  asWidget,
@@ -17164,7 +17292,7 @@ var JournalContent = ({
17164
17292
  const containerRef = useElementViewSize(
17165
17293
  (newView) => setView(newView)
17166
17294
  );
17167
- return /* @__PURE__ */ React189.createElement(Container, { name: "journal", ref: containerRef, asWidget }, /* @__PURE__ */ React189.createElement(
17295
+ return /* @__PURE__ */ React192.createElement(Container, { name: "journal", ref: containerRef, asWidget }, /* @__PURE__ */ React192.createElement(
17168
17296
  JournalTableWithPanel,
17169
17297
  {
17170
17298
  view,
@@ -17176,11 +17304,11 @@ var JournalContent = ({
17176
17304
  };
17177
17305
 
17178
17306
  // src/components/Tasks/Tasks.tsx
17179
- import React196, {
17307
+ import React199, {
17180
17308
  createContext as createContext17,
17181
17309
  useContext as useContext44,
17182
17310
  useEffect as useEffect48,
17183
- useMemo as useMemo20,
17311
+ useMemo as useMemo25,
17184
17312
  useState as useState58
17185
17313
  } from "react";
17186
17314
 
@@ -17311,13 +17439,13 @@ function isComplete(taskType) {
17311
17439
  }
17312
17440
 
17313
17441
  // src/components/TasksHeader/TasksHeader.tsx
17314
- import React191, { useContext as useContext40 } from "react";
17442
+ import React194, { useContext as useContext40 } from "react";
17315
17443
 
17316
17444
  // src/icons/ProgressIcon.tsx
17317
- import * as React190 from "react";
17445
+ import * as React193 from "react";
17318
17446
  var ProgressIcon = (_a) => {
17319
17447
  var _b = _a, { size = 12 } = _b, props = __objRest(_b, ["size"]);
17320
- return /* @__PURE__ */ React190.createElement(
17448
+ return /* @__PURE__ */ React193.createElement(
17321
17449
  "svg",
17322
17450
  __spreadProps(__spreadValues({
17323
17451
  xmlns: "http://www.w3.org/2000/svg",
@@ -17327,7 +17455,7 @@ var ProgressIcon = (_a) => {
17327
17455
  width: size,
17328
17456
  height: size
17329
17457
  }),
17330
- /* @__PURE__ */ React190.createElement(
17458
+ /* @__PURE__ */ React193.createElement(
17331
17459
  "path",
17332
17460
  {
17333
17461
  d: "M9 1.5V4.5",
@@ -17336,7 +17464,7 @@ var ProgressIcon = (_a) => {
17336
17464
  strokeLinejoin: "round"
17337
17465
  }
17338
17466
  ),
17339
- /* @__PURE__ */ React190.createElement(
17467
+ /* @__PURE__ */ React193.createElement(
17340
17468
  "path",
17341
17469
  {
17342
17470
  d: "M9 13.5V16.5",
@@ -17345,7 +17473,7 @@ var ProgressIcon = (_a) => {
17345
17473
  strokeLinejoin: "round"
17346
17474
  }
17347
17475
  ),
17348
- /* @__PURE__ */ React190.createElement(
17476
+ /* @__PURE__ */ React193.createElement(
17349
17477
  "path",
17350
17478
  {
17351
17479
  d: "M3.6975 3.6975L5.82 5.82",
@@ -17354,7 +17482,7 @@ var ProgressIcon = (_a) => {
17354
17482
  strokeLinejoin: "round"
17355
17483
  }
17356
17484
  ),
17357
- /* @__PURE__ */ React190.createElement(
17485
+ /* @__PURE__ */ React193.createElement(
17358
17486
  "path",
17359
17487
  {
17360
17488
  d: "M12.18 12.18L14.3025 14.3025",
@@ -17363,7 +17491,7 @@ var ProgressIcon = (_a) => {
17363
17491
  strokeLinejoin: "round"
17364
17492
  }
17365
17493
  ),
17366
- /* @__PURE__ */ React190.createElement(
17494
+ /* @__PURE__ */ React193.createElement(
17367
17495
  "path",
17368
17496
  {
17369
17497
  d: "M1.5 9H4.5",
@@ -17372,7 +17500,7 @@ var ProgressIcon = (_a) => {
17372
17500
  strokeLinejoin: "round"
17373
17501
  }
17374
17502
  ),
17375
- /* @__PURE__ */ React190.createElement(
17503
+ /* @__PURE__ */ React193.createElement(
17376
17504
  "path",
17377
17505
  {
17378
17506
  d: "M13.5 9H16.5",
@@ -17381,7 +17509,7 @@ var ProgressIcon = (_a) => {
17381
17509
  strokeLinejoin: "round"
17382
17510
  }
17383
17511
  ),
17384
- /* @__PURE__ */ React190.createElement(
17512
+ /* @__PURE__ */ React193.createElement(
17385
17513
  "path",
17386
17514
  {
17387
17515
  d: "M3.6975 14.3025L5.82 12.18",
@@ -17390,7 +17518,7 @@ var ProgressIcon = (_a) => {
17390
17518
  strokeLinejoin: "round"
17391
17519
  }
17392
17520
  ),
17393
- /* @__PURE__ */ React190.createElement(
17521
+ /* @__PURE__ */ React193.createElement(
17394
17522
  "path",
17395
17523
  {
17396
17524
  d: "M12.18 5.82L14.3025 3.6975",
@@ -17406,22 +17534,22 @@ var ProgressIcon_default = ProgressIcon;
17406
17534
  // src/components/TasksHeader/TasksHeader.tsx
17407
17535
  var ICONS = {
17408
17536
  loading: {
17409
- icon: /* @__PURE__ */ React191.createElement(ProgressIcon_default, { size: 12, className: "Layer__anim--rotating" }),
17537
+ icon: /* @__PURE__ */ React194.createElement(ProgressIcon_default, { size: 12, className: "Layer__anim--rotating" }),
17410
17538
  text: "Loading",
17411
17539
  badge: "default" /* DEFAULT */
17412
17540
  },
17413
17541
  done: {
17414
- icon: /* @__PURE__ */ React191.createElement(Check_default, { size: 12 }),
17542
+ icon: /* @__PURE__ */ React194.createElement(Check_default, { size: 12 }),
17415
17543
  text: "Done",
17416
17544
  badge: "success" /* SUCCESS */
17417
17545
  },
17418
17546
  pending: {
17419
- icon: /* @__PURE__ */ React191.createElement(AlertCircle_default, { size: 12 }),
17547
+ icon: /* @__PURE__ */ React194.createElement(AlertCircle_default, { size: 12 }),
17420
17548
  text: "In progress",
17421
17549
  badge: "warning" /* WARNING */
17422
17550
  },
17423
17551
  refresh: {
17424
- icon: /* @__PURE__ */ React191.createElement(RefreshCcw_default, { size: 12 }),
17552
+ icon: /* @__PURE__ */ React194.createElement(RefreshCcw_default, { size: 12 }),
17425
17553
  text: "Refresh",
17426
17554
  badge: "default" /* DEFAULT */
17427
17555
  }
@@ -17435,7 +17563,7 @@ var TasksHeader = ({
17435
17563
  const { data: tasks, loadedStatus, refetch, error } = useContext40(TasksContext);
17436
17564
  const completedTasks = tasks == null ? void 0 : tasks.filter((task) => isComplete(task.status)).length;
17437
17565
  const badgeVariant = completedTasks === (tasks == null ? void 0 : tasks.length) ? ICONS.done : ICONS.pending;
17438
- return /* @__PURE__ */ React191.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React191.createElement("div", { className: "Layer__tasks-header__left-col" }, /* @__PURE__ */ React191.createElement(Text, { size: "lg" /* lg */ }, tasksHeader), loadedStatus !== "complete" && !open ? /* @__PURE__ */ React191.createElement(Badge, { variant: ICONS.loading.badge, icon: ICONS.loading.icon }, ICONS.loading.text) : loadedStatus === "complete" && (!tasks || error) ? /* @__PURE__ */ React191.createElement(
17566
+ return /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks-header" }, /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks-header__left-col" }, /* @__PURE__ */ React194.createElement(Text, { size: "lg" /* lg */ }, tasksHeader), loadedStatus !== "complete" && !open ? /* @__PURE__ */ React194.createElement(Badge, { variant: ICONS.loading.badge, icon: ICONS.loading.icon }, ICONS.loading.text) : loadedStatus === "complete" && (!tasks || error) ? /* @__PURE__ */ React194.createElement(
17439
17567
  Badge,
17440
17568
  {
17441
17569
  onClick: () => refetch(),
@@ -17443,17 +17571,17 @@ var TasksHeader = ({
17443
17571
  icon: ICONS.refresh.icon
17444
17572
  },
17445
17573
  ICONS.refresh.text
17446
- ) : loadedStatus === "complete" ? /* @__PURE__ */ React191.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text) : open ? null : /* @__PURE__ */ React191.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text)), collapsable && /* @__PURE__ */ React191.createElement(ExpandButton, { onClick: toggleContent, collapsed: !open }));
17574
+ ) : loadedStatus === "complete" ? /* @__PURE__ */ React194.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text) : open ? null : /* @__PURE__ */ React194.createElement(Badge, { variant: badgeVariant.badge, icon: badgeVariant.icon }, badgeVariant.text)), collapsable && /* @__PURE__ */ React194.createElement(ExpandButton, { onClick: toggleContent, collapsed: !open }));
17447
17575
  };
17448
17576
 
17449
17577
  // src/components/TasksList/TasksList.tsx
17450
- import React194, { useContext as useContext42, useMemo as useMemo19, useState as useState57 } from "react";
17578
+ import React197, { useContext as useContext42, useMemo as useMemo24, useState as useState57 } from "react";
17451
17579
 
17452
17580
  // src/icons/SmileIcon.tsx
17453
- import * as React192 from "react";
17581
+ import * as React195 from "react";
17454
17582
  var SmileIcon = (_a) => {
17455
17583
  var _b = _a, { size = 12 } = _b, props = __objRest(_b, ["size"]);
17456
- return /* @__PURE__ */ React192.createElement(
17584
+ return /* @__PURE__ */ React195.createElement(
17457
17585
  "svg",
17458
17586
  __spreadProps(__spreadValues({
17459
17587
  viewBox: "0 0 12 12",
@@ -17463,7 +17591,7 @@ var SmileIcon = (_a) => {
17463
17591
  width: size,
17464
17592
  height: size
17465
17593
  }),
17466
- /* @__PURE__ */ React192.createElement(
17594
+ /* @__PURE__ */ React195.createElement(
17467
17595
  "path",
17468
17596
  {
17469
17597
  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",
@@ -17472,7 +17600,7 @@ var SmileIcon = (_a) => {
17472
17600
  strokeLinejoin: "round"
17473
17601
  }
17474
17602
  ),
17475
- /* @__PURE__ */ React192.createElement(
17603
+ /* @__PURE__ */ React195.createElement(
17476
17604
  "path",
17477
17605
  {
17478
17606
  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",
@@ -17481,7 +17609,7 @@ var SmileIcon = (_a) => {
17481
17609
  strokeLinejoin: "round"
17482
17610
  }
17483
17611
  ),
17484
- /* @__PURE__ */ React192.createElement(
17612
+ /* @__PURE__ */ React195.createElement(
17485
17613
  "path",
17486
17614
  {
17487
17615
  d: "M5 5H5.005",
@@ -17490,7 +17618,7 @@ var SmileIcon = (_a) => {
17490
17618
  strokeLinejoin: "round"
17491
17619
  }
17492
17620
  ),
17493
- /* @__PURE__ */ React192.createElement(
17621
+ /* @__PURE__ */ React195.createElement(
17494
17622
  "path",
17495
17623
  {
17496
17624
  d: "M8 5H8.005",
@@ -17504,8 +17632,8 @@ var SmileIcon = (_a) => {
17504
17632
  var SmileIcon_default = SmileIcon;
17505
17633
 
17506
17634
  // src/components/TasksListItem/TasksListItem.tsx
17507
- import React193, { useContext as useContext41, useEffect as useEffect47, useState as useState56 } from "react";
17508
- import classNames67 from "classnames";
17635
+ import React196, { useContext as useContext41, useEffect as useEffect47, useState as useState56 } from "react";
17636
+ import classNames66 from "classnames";
17509
17637
  var TasksListItem = ({
17510
17638
  task,
17511
17639
  goToNextPageIfAllComplete,
@@ -17514,30 +17642,30 @@ var TasksListItem = ({
17514
17642
  const [isOpen, setIsOpen] = useState56(defaultOpen);
17515
17643
  const [userResponse, setUserResponse] = useState56(task.user_response || "");
17516
17644
  const { submitResponseToTask: submitResponseToTask2, uploadDocumentForTask } = useContext41(TasksContext);
17517
- const taskBodyClassName = classNames67(
17645
+ const taskBodyClassName = classNames66(
17518
17646
  "Layer__tasks-list-item__body",
17519
17647
  isOpen && "Layer__tasks-list-item__body--expanded",
17520
17648
  isComplete(task.status) && "Layer__tasks-list-item--completed"
17521
17649
  );
17522
- const taskHeadClassName = classNames67(
17650
+ const taskHeadClassName = classNames66(
17523
17651
  "Layer__tasks-list-item__head-info",
17524
17652
  isComplete(task.status) ? "Layer__tasks-list-item--completed" : "Layer__tasks-list-item--pending"
17525
17653
  );
17526
- const taskItemClassName = classNames67(
17654
+ const taskItemClassName = classNames66(
17527
17655
  "Layer__tasks-list-item",
17528
17656
  isOpen && "Layer__tasks-list-item__expanded"
17529
17657
  );
17530
17658
  useEffect47(() => {
17531
17659
  setIsOpen(defaultOpen);
17532
17660
  }, [defaultOpen]);
17533
- return /* @__PURE__ */ React193.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React193.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React193.createElement(
17661
+ return /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks-list-item-wrapper" }, /* @__PURE__ */ React196.createElement("div", { className: taskItemClassName }, /* @__PURE__ */ React196.createElement(
17534
17662
  "div",
17535
17663
  {
17536
17664
  className: "Layer__tasks-list-item__head",
17537
17665
  onClick: () => setIsOpen(!isOpen)
17538
17666
  },
17539
- /* @__PURE__ */ React193.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React193.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, isComplete(task.status) ? /* @__PURE__ */ React193.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React193.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React193.createElement(Text, { size: "md" /* md */ }, task.title)),
17540
- /* @__PURE__ */ React193.createElement(
17667
+ /* @__PURE__ */ React196.createElement("div", { className: taskHeadClassName }, /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks-list-item__head-info__status" }, isComplete(task.status) ? /* @__PURE__ */ React196.createElement(Check_default, { size: 12 }) : /* @__PURE__ */ React196.createElement(AlertCircle_default, { size: 12 })), /* @__PURE__ */ React196.createElement(Text, { size: "md" /* md */ }, task.title)),
17668
+ /* @__PURE__ */ React196.createElement(
17541
17669
  ChevronDownFill_default,
17542
17670
  {
17543
17671
  size: 16,
@@ -17547,13 +17675,13 @@ var TasksListItem = ({
17547
17675
  }
17548
17676
  }
17549
17677
  )
17550
- ), /* @__PURE__ */ React193.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React193.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React193.createElement(Text, { size: "sm" /* sm */ }, task.question), task.user_response_type === "FREE_RESPONSE" ? /* @__PURE__ */ React193.createElement(
17678
+ ), /* @__PURE__ */ React196.createElement("div", { className: taskBodyClassName }, /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks-list-item__body-info" }, /* @__PURE__ */ React196.createElement(Text, { size: "sm" /* sm */ }, task.question), task.user_response_type === "FREE_RESPONSE" ? /* @__PURE__ */ React196.createElement(
17551
17679
  Textarea,
17552
17680
  {
17553
17681
  value: userResponse,
17554
17682
  onChange: (e) => setUserResponse(e.target.value)
17555
17683
  }
17556
- ) : null, /* @__PURE__ */ React193.createElement("div", { className: "Layer__tasks-list-item__actions" }, task.user_response_type === "UPLOAD_DOCUMENT" ? /* @__PURE__ */ React193.createElement(
17684
+ ) : null, /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks-list-item__actions" }, task.user_response_type === "UPLOAD_DOCUMENT" ? /* @__PURE__ */ React196.createElement(
17557
17685
  FileInput,
17558
17686
  {
17559
17687
  onUpload: (file) => {
@@ -17564,7 +17692,7 @@ var TasksListItem = ({
17564
17692
  text: "Upload file",
17565
17693
  disabled: task.completed_at != null || task.user_marked_completed_at != null || task.archived_at != null
17566
17694
  }
17567
- ) : /* @__PURE__ */ React193.createElement(
17695
+ ) : /* @__PURE__ */ React196.createElement(
17568
17696
  Button,
17569
17697
  {
17570
17698
  disabled: userResponse.length === 0 || userResponse === task.user_response,
@@ -17588,7 +17716,7 @@ function paginateArray(array, chunkSize = 10) {
17588
17716
  }
17589
17717
  return result;
17590
17718
  }
17591
- var TasksEmptyState = () => /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React194.createElement(SmileIcon_default, null)), /* @__PURE__ */ React194.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React194.createElement("br", null), " Great job!"));
17719
+ var TasksEmptyState = () => /* @__PURE__ */ React197.createElement("div", { className: "Layer__tasks-empty-state" }, /* @__PURE__ */ React197.createElement("div", { className: "Layer__tasks-icon" }, /* @__PURE__ */ React197.createElement(SmileIcon_default, null)), /* @__PURE__ */ React197.createElement(Text, { size: "sm" /* sm */ }, "There are no pending tasks!", /* @__PURE__ */ React197.createElement("br", null), " Great job!"));
17592
17720
  var TasksList = ({ pageSize = 10 }) => {
17593
17721
  const { data: tasks, error } = useContext42(TasksContext);
17594
17722
  const firstPageWithIincompleteTasks = paginateArray(
@@ -17598,7 +17726,7 @@ var TasksList = ({ pageSize = 10 }) => {
17598
17726
  const [currentPage, setCurrentPage] = useState57(
17599
17727
  firstPageWithIincompleteTasks === -1 ? 1 : firstPageWithIincompleteTasks + 1
17600
17728
  );
17601
- const sortedTasks = useMemo19(() => {
17729
+ const sortedTasks = useMemo24(() => {
17602
17730
  const firstPageIndex = (currentPage - 1) * pageSize;
17603
17731
  const lastPageIndex = firstPageIndex + pageSize;
17604
17732
  return tasks == null ? void 0 : tasks.slice(firstPageIndex, lastPageIndex);
@@ -17612,7 +17740,7 @@ var TasksList = ({ pageSize = 10 }) => {
17612
17740
  setCurrentPage(currentPage + 1);
17613
17741
  }
17614
17742
  };
17615
- return /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React194.createElement(React194.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React194.createElement(
17743
+ return /* @__PURE__ */ React197.createElement("div", { className: "Layer__tasks-list" }, sortedTasks && sortedTasks.length > 0 ? /* @__PURE__ */ React197.createElement(React197.Fragment, null, sortedTasks.map((task, index) => /* @__PURE__ */ React197.createElement(
17616
17744
  TasksListItem,
17617
17745
  {
17618
17746
  key: task.id,
@@ -17620,7 +17748,7 @@ var TasksList = ({ pageSize = 10 }) => {
17620
17748
  goToNextPageIfAllComplete: goToNextPage,
17621
17749
  defaultOpen: index === indexFirstIncomplete
17622
17750
  }
17623
- )), tasks && tasks.length >= 10 && /* @__PURE__ */ React194.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React194.createElement(
17751
+ )), tasks && tasks.length >= 10 && /* @__PURE__ */ React197.createElement("div", { className: "Layer__tasks__pagination" }, /* @__PURE__ */ React197.createElement(
17624
17752
  Pagination,
17625
17753
  {
17626
17754
  currentPage,
@@ -17628,12 +17756,12 @@ var TasksList = ({ pageSize = 10 }) => {
17628
17756
  pageSize,
17629
17757
  onPageChange: (page) => setCurrentPage(page)
17630
17758
  }
17631
- ))) : /* @__PURE__ */ React194.createElement(React194.Fragment, null, error ? /* @__PURE__ */ React194.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React194.createElement(TasksEmptyState, null)));
17759
+ ))) : /* @__PURE__ */ React197.createElement(React197.Fragment, null, error ? /* @__PURE__ */ React197.createElement(ErrorText, null, "Approval failed. Check connection and retry in few seconds.") : /* @__PURE__ */ React197.createElement(TasksEmptyState, null)));
17632
17760
  };
17633
17761
 
17634
17762
  // src/components/TasksPending/TasksPending.tsx
17635
- import React195, { useContext as useContext43 } from "react";
17636
- import classNames68 from "classnames";
17763
+ import React198, { useContext as useContext43 } from "react";
17764
+ import classNames67 from "classnames";
17637
17765
  import { format as format7 } from "date-fns";
17638
17766
  import { Cell as Cell4, Pie as Pie3, PieChart as PieChart4 } from "recharts";
17639
17767
  var TasksPending = () => {
@@ -17649,10 +17777,10 @@ var TasksPending = () => {
17649
17777
  value: data == null ? void 0 : data.filter((task) => !isComplete(task.status)).length
17650
17778
  }
17651
17779
  ];
17652
- const taskStatusClassName = classNames68(
17780
+ const taskStatusClassName = classNames67(
17653
17781
  completedTasks && completedTasks > 0 ? "Layer__tasks-pending-bar__status--done" : "Layer__tasks-pending-bar__status--pending"
17654
17782
  );
17655
- return /* @__PURE__ */ React195.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React195.createElement(Text, { size: "lg" /* lg */ }, format7(Date.now(), "MMMM")), /* @__PURE__ */ React195.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React195.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React195.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data == null ? void 0 : data.length, " done"), /* @__PURE__ */ React195.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React195.createElement(
17783
+ return /* @__PURE__ */ React198.createElement("div", { className: "Layer__tasks-pending" }, /* @__PURE__ */ React198.createElement(Text, { size: "lg" /* lg */ }, format7(Date.now(), "MMMM")), /* @__PURE__ */ React198.createElement("div", { className: "Layer__tasks-pending-bar" }, /* @__PURE__ */ React198.createElement(Text, { size: "sm" /* sm */ }, /* @__PURE__ */ React198.createElement("span", { className: taskStatusClassName }, completedTasks), "/", data == null ? void 0 : data.length, " done"), /* @__PURE__ */ React198.createElement(PieChart4, { width: 24, height: 24, className: "mini-chart" }, /* @__PURE__ */ React198.createElement(
17656
17784
  Pie3,
17657
17785
  {
17658
17786
  data: chartData,
@@ -17670,7 +17798,7 @@ var TasksPending = () => {
17670
17798
  animationEasing: "ease-in-out"
17671
17799
  },
17672
17800
  chartData.map((task, index) => {
17673
- return /* @__PURE__ */ React195.createElement(
17801
+ return /* @__PURE__ */ React198.createElement(
17674
17802
  Cell4,
17675
17803
  {
17676
17804
  key: `cell-${index}`,
@@ -17683,7 +17811,7 @@ var TasksPending = () => {
17683
17811
  };
17684
17812
 
17685
17813
  // src/components/Tasks/Tasks.tsx
17686
- import classNames69 from "classnames";
17814
+ import classNames68 from "classnames";
17687
17815
  var UseTasksContext = createContext17({
17688
17816
  data: void 0,
17689
17817
  isLoading: void 0,
@@ -17705,7 +17833,7 @@ var Tasks = ({
17705
17833
  // deprecated
17706
17834
  stringOverrides
17707
17835
  }) => {
17708
- return /* @__PURE__ */ React196.createElement(TasksProvider, null, /* @__PURE__ */ React196.createElement(
17836
+ return /* @__PURE__ */ React199.createElement(TasksProvider, null, /* @__PURE__ */ React199.createElement(
17709
17837
  TasksComponent,
17710
17838
  {
17711
17839
  collapsable,
@@ -17718,7 +17846,7 @@ var Tasks = ({
17718
17846
  };
17719
17847
  var TasksProvider = ({ children }) => {
17720
17848
  const contextData = useTasks();
17721
- return /* @__PURE__ */ React196.createElement(TasksContext.Provider, { value: contextData }, children);
17849
+ return /* @__PURE__ */ React199.createElement(TasksContext.Provider, { value: contextData }, children);
17722
17850
  };
17723
17851
  var TasksComponent = ({
17724
17852
  collapsable = false,
@@ -17729,7 +17857,7 @@ var TasksComponent = ({
17729
17857
  stringOverrides
17730
17858
  }) => {
17731
17859
  const { isLoading, loadedStatus, data } = useContext44(TasksContext);
17732
- const allComplete = useMemo20(() => {
17860
+ const allComplete = useMemo25(() => {
17733
17861
  if (!data) {
17734
17862
  return void 0;
17735
17863
  }
@@ -17746,7 +17874,7 @@ var TasksComponent = ({
17746
17874
  setOpen(false);
17747
17875
  }
17748
17876
  }, [allComplete]);
17749
- return /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks-component" }, /* @__PURE__ */ React196.createElement(
17877
+ return /* @__PURE__ */ React199.createElement("div", { className: "Layer__tasks-component" }, /* @__PURE__ */ React199.createElement(
17750
17878
  TasksHeader,
17751
17879
  {
17752
17880
  tasksHeader: (stringOverrides == null ? void 0 : stringOverrides.header) || tasksHeader,
@@ -17754,26 +17882,26 @@ var TasksComponent = ({
17754
17882
  open,
17755
17883
  toggleContent: () => setOpen(!open)
17756
17884
  }
17757
- ), /* @__PURE__ */ React196.createElement(
17885
+ ), /* @__PURE__ */ React199.createElement(
17758
17886
  "div",
17759
17887
  {
17760
- className: classNames69(
17888
+ className: classNames68(
17761
17889
  "Layer__tasks__content",
17762
17890
  !open && "Layer__tasks__content--collapsed"
17763
17891
  )
17764
17892
  },
17765
- isLoading || !data ? /* @__PURE__ */ React196.createElement("div", { className: "Layer__tasks__loader-container" }, /* @__PURE__ */ React196.createElement(Loader2, null)) : /* @__PURE__ */ React196.createElement(React196.Fragment, null, data.length > 0 && /* @__PURE__ */ React196.createElement(TasksPending, null), /* @__PURE__ */ React196.createElement(TasksList, null))
17893
+ isLoading || !data ? /* @__PURE__ */ React199.createElement("div", { className: "Layer__tasks__loader-container" }, /* @__PURE__ */ React199.createElement(Loader2, null)) : /* @__PURE__ */ React199.createElement(React199.Fragment, null, data.length > 0 && /* @__PURE__ */ React199.createElement(TasksPending, null), /* @__PURE__ */ React199.createElement(TasksList, null))
17766
17894
  ));
17767
17895
  };
17768
17896
 
17769
17897
  // src/components/PlatformOnboarding/LinkAccounts.tsx
17770
- import React197, { useContext as useContext45 } from "react";
17898
+ import React200, { useContext as useContext45 } from "react";
17771
17899
  var LinkAccounts = (_a) => {
17772
17900
  var _b = _a, { inBox } = _b, props = __objRest(_b, ["inBox"]);
17773
17901
  if (inBox) {
17774
- return /* @__PURE__ */ React197.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React197.createElement("div", { className: "Layer__link-accounts__box" }, /* @__PURE__ */ React197.createElement(LinkAccountsContent, __spreadValues({}, props))));
17902
+ return /* @__PURE__ */ React200.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React200.createElement("div", { className: "Layer__link-accounts__box" }, /* @__PURE__ */ React200.createElement(LinkAccountsContent, __spreadValues({}, props))));
17775
17903
  }
17776
- return /* @__PURE__ */ React197.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React197.createElement(LinkAccountsContent, __spreadValues({}, props)));
17904
+ return /* @__PURE__ */ React200.createElement(LinkedAccountsProvider, null, /* @__PURE__ */ React200.createElement(LinkAccountsContent, __spreadValues({}, props)));
17777
17905
  };
17778
17906
  var LinkAccountsContent = ({
17779
17907
  title,
@@ -17788,7 +17916,7 @@ var LinkAccountsContent = ({
17788
17916
  }) => {
17789
17917
  var _a, _b;
17790
17918
  const { data, loadingStatus, error, refetchAccounts, addConnection } = useContext45(LinkedAccountsContext);
17791
- return /* @__PURE__ */ React197.createElement("div", { className: "Layer__link-accounts Layer__component" }, title && /* @__PURE__ */ React197.createElement(Heading, { size: "view" /* view */ }, title), data && data.length === 0 ? /* @__PURE__ */ React197.createElement("div", { className: "Layer__link-accounts__data-status-container" }, !hideLoading && loadingStatus !== "complete" ? /* @__PURE__ */ React197.createElement(Loader2, null) : null, Boolean(error) && /* @__PURE__ */ React197.createElement(
17919
+ return /* @__PURE__ */ React200.createElement("div", { className: "Layer__link-accounts Layer__component" }, title && /* @__PURE__ */ React200.createElement(Heading, { size: "view" /* view */ }, title), data && data.length === 0 ? /* @__PURE__ */ React200.createElement("div", { className: "Layer__link-accounts__data-status-container" }, !hideLoading && loadingStatus !== "complete" ? /* @__PURE__ */ React200.createElement(Loader2, null) : null, Boolean(error) && /* @__PURE__ */ React200.createElement(
17792
17920
  DataState,
17793
17921
  {
17794
17922
  status: "failed" /* failed */,
@@ -17796,7 +17924,7 @@ var LinkAccountsContent = ({
17796
17924
  description: "Please try again later",
17797
17925
  onRefresh: refetchAccounts
17798
17926
  }
17799
- )) : null, data && data.length > 0 ? /* @__PURE__ */ React197.createElement("div", { className: "Layer__link-accounts__list" }, data == null ? void 0 : data.map((account, index) => /* @__PURE__ */ React197.createElement(
17927
+ )) : null, data && data.length > 0 ? /* @__PURE__ */ React200.createElement("div", { className: "Layer__link-accounts__list" }, data == null ? void 0 : data.map((account, index) => /* @__PURE__ */ React200.createElement(
17800
17928
  LinkedAccountItemThumb,
17801
17929
  {
17802
17930
  key: index,
@@ -17806,33 +17934,33 @@ var LinkAccountsContent = ({
17806
17934
  showBreakConnection,
17807
17935
  asWidget
17808
17936
  }
17809
- ))) : null, /* @__PURE__ */ React197.createElement(
17937
+ ))) : null, /* @__PURE__ */ React200.createElement(
17810
17938
  ActionableRow,
17811
17939
  {
17812
- iconBox: /* @__PURE__ */ React197.createElement(PlaidIcon_default, null),
17940
+ iconBox: /* @__PURE__ */ React200.createElement(PlaidIcon_default, null),
17813
17941
  title: data && data.length > 0 ? "Connect my next business account" : "Connect accounts",
17814
17942
  description: "Import data with one simple integration.",
17815
- button: /* @__PURE__ */ React197.createElement(
17943
+ button: /* @__PURE__ */ React200.createElement(
17816
17944
  Button,
17817
17945
  {
17818
17946
  onClick: () => addConnection("PLAID"),
17819
- rightIcon: /* @__PURE__ */ React197.createElement(Link_default, { size: 12 }),
17947
+ rightIcon: /* @__PURE__ */ React200.createElement(Link_default, { size: 12 }),
17820
17948
  disabled: loadingStatus !== "complete"
17821
17949
  },
17822
17950
  data && data.length > 0 ? "Connect next" : "Connect"
17823
17951
  )
17824
17952
  }
17825
- ), onBack || onNext ? /* @__PURE__ */ React197.createElement("div", { className: "Layer__link-accounts__footer" }, onBack && /* @__PURE__ */ React197.createElement(Button, { onClick: onBack, variant: "secondary" /* secondary */ }, (_a = stringOverrides == null ? void 0 : stringOverrides.backButtonText) != null ? _a : "Back"), onNext && /* @__PURE__ */ React197.createElement(Button, { onClick: onNext }, (_b = stringOverrides == null ? void 0 : stringOverrides.nextButtonText) != null ? _b : "I\u2019m done connecting my business accounts")) : null);
17953
+ ), onBack || onNext ? /* @__PURE__ */ React200.createElement("div", { className: "Layer__link-accounts__footer" }, onBack && /* @__PURE__ */ React200.createElement(Button, { onClick: onBack, variant: "secondary" /* secondary */ }, (_a = stringOverrides == null ? void 0 : stringOverrides.backButtonText) != null ? _a : "Back"), onNext && /* @__PURE__ */ React200.createElement(Button, { onClick: onNext }, (_b = stringOverrides == null ? void 0 : stringOverrides.nextButtonText) != null ? _b : "I\u2019m done connecting my business accounts")) : null);
17826
17954
  };
17827
17955
 
17828
17956
  // src/components/UpsellBanner/BookkeepingUpsellBar.tsx
17829
- import React199 from "react";
17957
+ import React202 from "react";
17830
17958
 
17831
17959
  // src/icons/Coffee.tsx
17832
- import * as React198 from "react";
17960
+ import * as React201 from "react";
17833
17961
  var CoffeeIcon = (_a) => {
17834
17962
  var _b = _a, { size = 11 } = _b, props = __objRest(_b, ["size"]);
17835
- return /* @__PURE__ */ React198.createElement(
17963
+ return /* @__PURE__ */ React201.createElement(
17836
17964
  "svg",
17837
17965
  __spreadProps(__spreadValues({
17838
17966
  xmlns: "http://www.w3.org/2000/svg",
@@ -17842,7 +17970,7 @@ var CoffeeIcon = (_a) => {
17842
17970
  width: size,
17843
17971
  height: size
17844
17972
  }),
17845
- /* @__PURE__ */ React198.createElement("g", { clipPath: "url(#clip0_5018_10141)" }, /* @__PURE__ */ React198.createElement(
17973
+ /* @__PURE__ */ React201.createElement("g", { clipPath: "url(#clip0_5018_10141)" }, /* @__PURE__ */ React201.createElement(
17846
17974
  "path",
17847
17975
  {
17848
17976
  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",
@@ -17850,7 +17978,7 @@ var CoffeeIcon = (_a) => {
17850
17978
  strokeLinecap: "round",
17851
17979
  strokeLinejoin: "round"
17852
17980
  }
17853
- ), /* @__PURE__ */ React198.createElement(
17981
+ ), /* @__PURE__ */ React201.createElement(
17854
17982
  "path",
17855
17983
  {
17856
17984
  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",
@@ -17858,7 +17986,7 @@ var CoffeeIcon = (_a) => {
17858
17986
  strokeLinecap: "round",
17859
17987
  strokeLinejoin: "round"
17860
17988
  }
17861
- ), /* @__PURE__ */ React198.createElement(
17989
+ ), /* @__PURE__ */ React201.createElement(
17862
17990
  "path",
17863
17991
  {
17864
17992
  d: "M8.75 0.958344V2.33334",
@@ -17866,7 +17994,7 @@ var CoffeeIcon = (_a) => {
17866
17994
  strokeLinecap: "round",
17867
17995
  strokeLinejoin: "round"
17868
17996
  }
17869
- ), /* @__PURE__ */ React198.createElement(
17997
+ ), /* @__PURE__ */ React201.createElement(
17870
17998
  "path",
17871
17999
  {
17872
18000
  d: "M6.91663 0.958344V2.33334",
@@ -17874,7 +18002,7 @@ var CoffeeIcon = (_a) => {
17874
18002
  strokeLinecap: "round",
17875
18003
  strokeLinejoin: "round"
17876
18004
  }
17877
- ), /* @__PURE__ */ React198.createElement(
18005
+ ), /* @__PURE__ */ React201.createElement(
17878
18006
  "path",
17879
18007
  {
17880
18008
  d: "M5.08337 0.958344V2.33334",
@@ -17883,7 +18011,7 @@ var CoffeeIcon = (_a) => {
17883
18011
  strokeLinejoin: "round"
17884
18012
  }
17885
18013
  )),
17886
- /* @__PURE__ */ React198.createElement("defs", null, /* @__PURE__ */ React198.createElement("clipPath", { id: "clip0_5018_10141" }, /* @__PURE__ */ React198.createElement(
18014
+ /* @__PURE__ */ React201.createElement("defs", null, /* @__PURE__ */ React201.createElement("clipPath", { id: "clip0_5018_10141" }, /* @__PURE__ */ React201.createElement(
17887
18015
  "rect",
17888
18016
  {
17889
18017
  width: "11",
@@ -17901,38 +18029,50 @@ var BookkeepingUpsellBar = ({
17901
18029
  onClick,
17902
18030
  href
17903
18031
  }) => {
17904
- return /* @__PURE__ */ React199.createElement("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping" }, /* @__PURE__ */ React199.createElement("div", { className: "Layer__bar-banner__left-col" }, /* @__PURE__ */ React199.createElement(IconBox, null, /* @__PURE__ */ React199.createElement(Coffee_default, null)), /* @__PURE__ */ React199.createElement("div", { className: "Layer__bar-banner__text-container" }, /* @__PURE__ */ React199.createElement(Text, { size: "md" /* md */, weight: "bold" /* bold */ }, "Need help with your books?"), /* @__PURE__ */ React199.createElement(
18032
+ return /* @__PURE__ */ React202.createElement("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping" }, /* @__PURE__ */ React202.createElement("div", { className: "Layer__bar-banner__left-col" }, /* @__PURE__ */ React202.createElement(IconBox, null, /* @__PURE__ */ React202.createElement(Coffee_default, null)), /* @__PURE__ */ React202.createElement("div", { className: "Layer__bar-banner__text-container" }, /* @__PURE__ */ React202.createElement(Text, { size: "md" /* md */, weight: "bold" /* bold */ }, "Need help with your books?"), /* @__PURE__ */ React202.createElement(
17905
18033
  Text,
17906
18034
  {
17907
18035
  size: "sm" /* sm */,
17908
18036
  className: "Layer__bar-banner__text-container__desc"
17909
18037
  },
17910
18038
  "Order bookkeeping service supported by real humans."
17911
- ))), onClick ? /* @__PURE__ */ React199.createElement(Button, { variant: "secondary" /* secondary */, onClick }, "Schedule a demo") : href ? /* @__PURE__ */ React199.createElement(Link2, { href, target: "_blank", variant: "secondary" /* secondary */ }, "Schedule a demo") : null);
18039
+ ))), onClick ? /* @__PURE__ */ React202.createElement(Button, { variant: "secondary" /* secondary */, onClick }, "Schedule a demo") : href ? /* @__PURE__ */ React202.createElement(Link2, { href, target: "_blank", variant: "secondary" /* secondary */ }, "Schedule a demo") : null);
17912
18040
  };
17913
18041
 
17914
18042
  // src/views/BookkeepingOverview/BookkeepingOverview.tsx
17915
- import React200, { useState as useState59 } from "react";
17916
- import classNames70 from "classnames";
18043
+ import React204, { useState as useState59 } from "react";
18044
+
18045
+ // src/views/BookkeepingOverview/internal/BookkeepingProfitAndLossSummariesContainer.tsx
18046
+ import React203 from "react";
18047
+ var CLASS_NAME2 = "Layer__BookkeepingProfitAndLossSummariesContainer";
18048
+ function BookkeepingProfitAndLossSummariesContainer({
18049
+ children
18050
+ }) {
18051
+ return /* @__PURE__ */ React203.createElement("div", { className: CLASS_NAME2 }, children);
18052
+ }
18053
+
18054
+ // src/views/BookkeepingOverview/BookkeepingOverview.tsx
18055
+ import classNames69 from "classnames";
17917
18056
  var BookkeepingOverview = ({
17918
18057
  title,
17919
- // deprecated
17920
18058
  showTitle = true,
17921
- stringOverrides
18059
+ stringOverrides,
18060
+ slotProps
17922
18061
  }) => {
17923
- var _a, _b, _c, _d;
18062
+ var _a, _b, _c, _d, _e, _f;
17924
18063
  const [pnlToggle, setPnlToggle] = useState59("expenses");
17925
18064
  const [width] = useWindowSize();
17926
- return /* @__PURE__ */ React200.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React200.createElement(TasksProvider, null, /* @__PURE__ */ React200.createElement(
18065
+ const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
18066
+ return /* @__PURE__ */ React204.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React204.createElement(TasksProvider, null, /* @__PURE__ */ React204.createElement(
17927
18067
  View,
17928
18068
  {
17929
18069
  viewClassName: "Layer__bookkeeping-overview--view",
17930
18070
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "Bookkeeping overview",
17931
18071
  withSidebar: width > 1100,
17932
- sidebar: /* @__PURE__ */ React200.createElement(TasksComponent, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks }),
18072
+ sidebar: /* @__PURE__ */ React204.createElement(TasksComponent, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks }),
17933
18073
  showHeader: showTitle
17934
18074
  },
17935
- width <= 1100 && /* @__PURE__ */ React200.createElement(
18075
+ width <= 1100 && /* @__PURE__ */ React204.createElement(
17936
18076
  TasksComponent,
17937
18077
  {
17938
18078
  collapsable: true,
@@ -17940,29 +18080,30 @@ var BookkeepingOverview = ({
17940
18080
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks
17941
18081
  }
17942
18082
  ),
17943
- /* @__PURE__ */ React200.createElement(
18083
+ /* @__PURE__ */ React204.createElement(
17944
18084
  Container,
17945
18085
  {
17946
18086
  name: "bookkeeping-overview-profit-and-loss",
17947
18087
  asWidget: true,
17948
18088
  elevated: true
17949
18089
  },
17950
- /* @__PURE__ */ React200.createElement(
18090
+ /* @__PURE__ */ React204.createElement(
17951
18091
  ProfitAndLoss.Header,
17952
18092
  {
17953
- text: ((_a = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _a.header) || "Profit & Loss",
18093
+ text: ((_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.header) || "Profit & Loss",
17954
18094
  withDatePicker: true
17955
18095
  }
17956
18096
  ),
17957
- /* @__PURE__ */ React200.createElement("div", { className: "Layer__bookkeeping-overview__summaries-row" }, /* @__PURE__ */ React200.createElement(
18097
+ /* @__PURE__ */ React204.createElement(BookkeepingProfitAndLossSummariesContainer, null, /* @__PURE__ */ React204.createElement(
17958
18098
  ProfitAndLoss.Summaries,
17959
18099
  {
17960
- stringOverrides: (_b = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _b.summaries
18100
+ stringOverrides: (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.summaries,
18101
+ variants: profitAndLossSummariesVariants
17961
18102
  }
17962
18103
  )),
17963
- /* @__PURE__ */ React200.createElement(ProfitAndLoss.Chart, null)
18104
+ /* @__PURE__ */ React204.createElement(ProfitAndLoss.Chart, null)
17964
18105
  ),
17965
- /* @__PURE__ */ React200.createElement("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts" }, /* @__PURE__ */ React200.createElement(
18106
+ /* @__PURE__ */ React204.createElement("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts" }, /* @__PURE__ */ React204.createElement(
17966
18107
  Toggle,
17967
18108
  {
17968
18109
  name: "pnl-detailed-charts",
@@ -17979,36 +18120,36 @@ var BookkeepingOverview = ({
17979
18120
  selected: pnlToggle,
17980
18121
  onChange: (e) => setPnlToggle(e.target.value)
17981
18122
  }
17982
- ), /* @__PURE__ */ React200.createElement(
18123
+ ), /* @__PURE__ */ React204.createElement(
17983
18124
  Container,
17984
18125
  {
17985
- name: classNames70(
18126
+ name: classNames69(
17986
18127
  "bookkeeping-overview-profit-and-loss-chart",
17987
18128
  pnlToggle !== "revenue" && "bookkeeping-overview-profit-and-loss-chart--hidden"
17988
18129
  )
17989
18130
  },
17990
- /* @__PURE__ */ React200.createElement(
18131
+ /* @__PURE__ */ React204.createElement(
17991
18132
  ProfitAndLoss.DetailedCharts,
17992
18133
  {
17993
18134
  scope: "revenue",
17994
18135
  hideClose: true,
17995
- stringOverrides: (_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.detailedCharts
18136
+ stringOverrides: (_e = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _e.detailedCharts
17996
18137
  }
17997
18138
  )
17998
- ), /* @__PURE__ */ React200.createElement(
18139
+ ), /* @__PURE__ */ React204.createElement(
17999
18140
  Container,
18000
18141
  {
18001
- name: classNames70(
18142
+ name: classNames69(
18002
18143
  "bookkeeping-overview-profit-and-loss-chart",
18003
18144
  pnlToggle !== "expenses" && "bookkeeping-overview-profit-and-loss-chart--hidden"
18004
18145
  )
18005
18146
  },
18006
- /* @__PURE__ */ React200.createElement(
18147
+ /* @__PURE__ */ React204.createElement(
18007
18148
  ProfitAndLoss.DetailedCharts,
18008
18149
  {
18009
18150
  scope: "expenses",
18010
18151
  hideClose: true,
18011
- stringOverrides: (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.detailedCharts
18152
+ stringOverrides: (_f = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _f.detailedCharts
18012
18153
  }
18013
18154
  )
18014
18155
  ))
@@ -18016,42 +18157,38 @@ var BookkeepingOverview = ({
18016
18157
  };
18017
18158
 
18018
18159
  // src/views/AccountingOverview/AccountingOverview.tsx
18019
- import React204, { useState as useState61 } from "react";
18160
+ import React208, { useState as useState61 } from "react";
18020
18161
 
18021
- // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
18022
- import React203, { useContext as useContext46, useEffect as useEffect49, useState as useState60 } from "react";
18162
+ // src/views/AccountingOverview/internal/TransactionsToReview.tsx
18163
+ import React207, { useContext as useContext46, useEffect as useEffect49, useState as useState60 } from "react";
18023
18164
 
18024
18165
  // src/components/BadgeLoader/BadgeLoader.tsx
18025
- import React201 from "react";
18166
+ import React205 from "react";
18026
18167
  var BadgeLoader = ({ children }) => {
18027
- return /* @__PURE__ */ React201.createElement("span", { className: "Layer__loader Layer__loader--as-badge" }, /* @__PURE__ */ React201.createElement(Loader_default, { size: 11, className: "Layer__anim--rotating" }), children);
18168
+ return /* @__PURE__ */ React205.createElement("span", { className: "Layer__loader Layer__loader--as-badge" }, /* @__PURE__ */ React205.createElement(Loader_default, { size: 11, className: "Layer__anim--rotating" }), children);
18028
18169
  };
18029
18170
 
18030
- // src/components/NotificationCard/NotificationCard.tsx
18031
- import React202 from "react";
18032
- import classNames71 from "classnames";
18033
- var NotificationCard = ({
18034
- onClick,
18035
- children,
18036
- className
18037
- }) => {
18038
- return /* @__PURE__ */ React202.createElement("div", { className: classNames71("Layer__notification-card", className) }, /* @__PURE__ */ React202.createElement("div", { className: "Layer__notification-card__main" }, children), /* @__PURE__ */ React202.createElement(
18039
- IconButton,
18040
- {
18041
- icon: /* @__PURE__ */ React202.createElement(ChevronRight_default, null),
18042
- withBorder: true,
18043
- onClick: () => onClick()
18044
- }
18045
- ));
18046
- };
18171
+ // src/components/ui/Stack.tsx
18172
+ import React206, { useMemo as useMemo26 } from "react";
18173
+ var CLASS_NAME3 = "Layer__VStack";
18174
+ function VStack({ align, children, gap }) {
18175
+ const dataProperties = useMemo26(
18176
+ () => toDataProperties({ align, gap }),
18177
+ [align, gap]
18178
+ );
18179
+ return /* @__PURE__ */ React206.createElement("div", __spreadValues({ className: CLASS_NAME3 }, dataProperties), children);
18180
+ }
18047
18181
 
18048
- // src/components/TransactionToReviewCard/TransactionToReviewCard.tsx
18182
+ // src/views/AccountingOverview/internal/TransactionsToReview.tsx
18049
18183
  import { getMonth as getMonth2, getYear as getYear2, startOfMonth as startOfMonth16 } from "date-fns";
18050
- var TransactionToReviewCard = ({
18184
+ var CLASS_NAME4 = "Layer__TransactionsToReview";
18185
+ function TransactionsToReview({
18051
18186
  onClick,
18052
18187
  usePnlDateRange,
18053
- tagFilter = void 0
18054
- }) => {
18188
+ tagFilter = void 0,
18189
+ variants
18190
+ }) {
18191
+ const { size = "sm" } = variants != null ? variants : {};
18055
18192
  const { dateRange: contextDateRange } = useContext46(ProfitAndLoss.Context);
18056
18193
  const dateRange = usePnlDateRange ? contextDateRange : void 0;
18057
18194
  const [toReview, setToReview] = useState60(0);
@@ -18075,48 +18212,46 @@ var TransactionToReviewCard = ({
18075
18212
  }
18076
18213
  }
18077
18214
  };
18078
- return /* @__PURE__ */ React203.createElement(
18079
- NotificationCard,
18215
+ let verticalGap = "3xs";
18216
+ switch (size) {
18217
+ case "sm":
18218
+ verticalGap = "3xs";
18219
+ break;
18220
+ case "lg":
18221
+ verticalGap = "sm";
18222
+ break;
18223
+ }
18224
+ return /* @__PURE__ */ React207.createElement("div", { onClick, className: CLASS_NAME4 }, /* @__PURE__ */ React207.createElement(VStack, { gap: verticalGap, align: "start" }, /* @__PURE__ */ React207.createElement(ProfitAndLossSummariesHeading, { variants }, "Transactions to review"), loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ React207.createElement(BadgeLoader, null) : null, loaded === "complete" && error ? /* @__PURE__ */ React207.createElement(
18225
+ Badge,
18080
18226
  {
18081
- className: "Layer__txs-to-review",
18082
- onClick: () => onClick && onClick()
18227
+ variant: "error" /* ERROR */,
18228
+ size: "small" /* SMALL */,
18229
+ icon: /* @__PURE__ */ React207.createElement(RefreshCcw_default, { size: 12 }),
18230
+ onClick: () => refetch()
18083
18231
  },
18084
- /* @__PURE__ */ React203.createElement(Text, { size: "sm" /* sm */ }, "Transactions to review"),
18085
- loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ React203.createElement(BadgeLoader, null) : null,
18086
- loaded === "complete" && error ? /* @__PURE__ */ React203.createElement(
18087
- Badge,
18088
- {
18089
- variant: "error" /* ERROR */,
18090
- size: "small" /* SMALL */,
18091
- icon: /* @__PURE__ */ React203.createElement(RefreshCcw_default, { size: 12 }),
18092
- onClick: () => refetch()
18093
- },
18094
- "Refresh"
18095
- ) : null,
18096
- loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React203.createElement(
18097
- Badge,
18098
- {
18099
- variant: "warning" /* WARNING */,
18100
- size: "small" /* SMALL */,
18101
- icon: /* @__PURE__ */ React203.createElement(Bell_default, { size: 12 })
18102
- },
18103
- toReview,
18104
- " pending"
18105
- ) : null,
18106
- loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React203.createElement(
18107
- Badge,
18108
- {
18109
- variant: "success" /* SUCCESS */,
18110
- size: "small" /* SMALL */,
18111
- icon: /* @__PURE__ */ React203.createElement(Check_default, { size: 12 })
18112
- },
18113
- "All done"
18114
- ) : null
18115
- );
18116
- };
18232
+ "Refresh"
18233
+ ) : null, loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ React207.createElement(
18234
+ Badge,
18235
+ {
18236
+ variant: "warning" /* WARNING */,
18237
+ size: "small" /* SMALL */,
18238
+ icon: /* @__PURE__ */ React207.createElement(Bell_default, { size: 12 })
18239
+ },
18240
+ toReview,
18241
+ " pending"
18242
+ ) : null, loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ React207.createElement(
18243
+ Badge,
18244
+ {
18245
+ variant: "success" /* SUCCESS */,
18246
+ size: "small" /* SMALL */,
18247
+ icon: /* @__PURE__ */ React207.createElement(Check_default, { size: 12 })
18248
+ },
18249
+ "All done"
18250
+ ) : null), /* @__PURE__ */ React207.createElement(IconButton, { icon: /* @__PURE__ */ React207.createElement(ChevronRight_default, null), withBorder: true, onClick }));
18251
+ }
18117
18252
 
18118
18253
  // src/views/AccountingOverview/AccountingOverview.tsx
18119
- import classNames72 from "classnames";
18254
+ import classNames70 from "classnames";
18120
18255
  var AccountingOverview = ({
18121
18256
  title = "Accounting overview",
18122
18257
  showTitle = true,
@@ -18127,65 +18262,75 @@ var AccountingOverview = ({
18127
18262
  chartColorsList,
18128
18263
  stringOverrides,
18129
18264
  tagFilter = void 0,
18130
- showTransactionsToReview = true
18265
+ showTransactionsToReview = true,
18266
+ slotProps
18131
18267
  }) => {
18132
- var _a, _b, _c;
18268
+ var _a, _b, _c, _d, _e;
18133
18269
  const [pnlToggle, setPnlToggle] = useState61("expenses");
18134
- return /* @__PURE__ */ React204.createElement(
18270
+ const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
18271
+ return /* @__PURE__ */ React208.createElement(
18135
18272
  ProfitAndLoss,
18136
18273
  {
18137
18274
  asContainer: false,
18138
18275
  tagFilter: tagFilter ? { key: tagFilter.tagKey, values: tagFilter.tagValues } : void 0
18139
18276
  },
18140
- /* @__PURE__ */ React204.createElement(
18277
+ /* @__PURE__ */ React208.createElement(
18141
18278
  View,
18142
18279
  {
18143
18280
  title,
18144
18281
  showHeader: showTitle,
18145
- header: /* @__PURE__ */ React204.createElement(Header2, null, /* @__PURE__ */ React204.createElement(HeaderRow, null, /* @__PURE__ */ React204.createElement(HeaderCol, null, /* @__PURE__ */ React204.createElement(ProfitAndLoss.DatePicker, null))))
18282
+ header: /* @__PURE__ */ React208.createElement(Header2, null, /* @__PURE__ */ React208.createElement(HeaderRow, null, /* @__PURE__ */ React208.createElement(HeaderCol, null, /* @__PURE__ */ React208.createElement(ProfitAndLoss.DatePicker, null))))
18146
18283
  },
18147
- enableOnboarding && /* @__PURE__ */ React204.createElement(
18284
+ enableOnboarding && /* @__PURE__ */ React208.createElement(
18148
18285
  Onboarding,
18149
18286
  {
18150
18287
  onTransactionsToReviewClick,
18151
18288
  onboardingStepOverride
18152
18289
  }
18153
18290
  ),
18154
- /* @__PURE__ */ React204.createElement("div", { className: "Layer__accounting-overview__summaries-row" }, /* @__PURE__ */ React204.createElement(
18155
- ProfitAndLoss.Summaries,
18156
- {
18157
- stringOverrides: (_a = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _a.summaries,
18158
- chartColorsList
18159
- }
18160
- ), showTransactionsToReview && /* @__PURE__ */ React204.createElement(
18161
- TransactionToReviewCard,
18291
+ /* @__PURE__ */ React208.createElement(
18292
+ Internal_ProfitAndLossSummaries,
18162
18293
  {
18163
- usePnlDateRange: true,
18164
- onClick: onTransactionsToReviewClick
18294
+ stringOverrides: (_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.summaries,
18295
+ chartColorsList,
18296
+ slots: {
18297
+ unstable_AdditionalListItems: showTransactionsToReview ? [
18298
+ /* @__PURE__ */ React208.createElement(
18299
+ TransactionsToReview,
18300
+ {
18301
+ key: "transactions-to-review",
18302
+ usePnlDateRange: true,
18303
+ onClick: onTransactionsToReviewClick,
18304
+ variants: profitAndLossSummariesVariants
18305
+ }
18306
+ )
18307
+ ] : void 0
18308
+ },
18309
+ variants: profitAndLossSummariesVariants
18165
18310
  }
18166
- )),
18167
- /* @__PURE__ */ React204.createElement(
18311
+ ),
18312
+ /* @__PURE__ */ React208.createElement(
18168
18313
  Container,
18169
18314
  {
18170
18315
  name: "accounting-overview-profit-and-loss",
18171
18316
  asWidget: true,
18172
18317
  elevated: true
18173
18318
  },
18174
- /* @__PURE__ */ React204.createElement(
18319
+ /* @__PURE__ */ React208.createElement(
18175
18320
  ProfitAndLoss.Header,
18176
18321
  {
18177
18322
  text: (stringOverrides == null ? void 0 : stringOverrides.header) || "Profit & Loss"
18178
18323
  }
18179
18324
  ),
18180
- /* @__PURE__ */ React204.createElement(
18325
+ /* @__PURE__ */ React208.createElement(
18181
18326
  ProfitAndLoss.Chart,
18182
18327
  {
18183
18328
  tagFilter: tagFilter ? { key: tagFilter.tagKey, values: tagFilter.tagValues } : void 0
18184
18329
  }
18185
18330
  )
18186
18331
  ),
18187
- middleBanner && /* @__PURE__ */ React204.createElement(Container, { name: "accounting-overview-middle-banner" }, middleBanner),
18188
- /* @__PURE__ */ React204.createElement("div", { className: "Layer__accounting-overview-profit-and-loss-charts" }, /* @__PURE__ */ React204.createElement(
18332
+ middleBanner && /* @__PURE__ */ React208.createElement(Container, { name: "accounting-overview-middle-banner" }, middleBanner),
18333
+ /* @__PURE__ */ React208.createElement("div", { className: "Layer__accounting-overview-profit-and-loss-charts" }, /* @__PURE__ */ React208.createElement(
18189
18334
  Toggle,
18190
18335
  {
18191
18336
  name: "pnl-detailed-charts",
@@ -18202,37 +18347,37 @@ var AccountingOverview = ({
18202
18347
  selected: pnlToggle,
18203
18348
  onChange: (e) => setPnlToggle(e.target.value)
18204
18349
  }
18205
- ), /* @__PURE__ */ React204.createElement(
18350
+ ), /* @__PURE__ */ React208.createElement(
18206
18351
  Container,
18207
18352
  {
18208
- name: classNames72(
18353
+ name: classNames70(
18209
18354
  "accounting-overview-profit-and-loss-chart",
18210
18355
  pnlToggle !== "revenue" && "accounting-overview-profit-and-loss-chart--hidden"
18211
18356
  )
18212
18357
  },
18213
- /* @__PURE__ */ React204.createElement(
18358
+ /* @__PURE__ */ React208.createElement(
18214
18359
  ProfitAndLoss.DetailedCharts,
18215
18360
  {
18216
18361
  scope: "revenue",
18217
18362
  hideClose: true,
18218
- stringOverrides: (_b = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _b.detailedCharts,
18363
+ stringOverrides: (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.detailedCharts,
18219
18364
  chartColorsList
18220
18365
  }
18221
18366
  )
18222
- ), /* @__PURE__ */ React204.createElement(
18367
+ ), /* @__PURE__ */ React208.createElement(
18223
18368
  Container,
18224
18369
  {
18225
- name: classNames72(
18370
+ name: classNames70(
18226
18371
  "accounting-overview-profit-and-loss-chart",
18227
18372
  pnlToggle !== "expenses" && "accounting-overview-profit-and-loss-chart--hidden"
18228
18373
  )
18229
18374
  },
18230
- /* @__PURE__ */ React204.createElement(
18375
+ /* @__PURE__ */ React208.createElement(
18231
18376
  ProfitAndLoss.DetailedCharts,
18232
18377
  {
18233
18378
  scope: "expenses",
18234
18379
  hideClose: true,
18235
- stringOverrides: (_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.detailedCharts,
18380
+ stringOverrides: (_e = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _e.detailedCharts,
18236
18381
  chartColorsList
18237
18382
  }
18238
18383
  )
@@ -18242,7 +18387,7 @@ var AccountingOverview = ({
18242
18387
  };
18243
18388
 
18244
18389
  // src/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts.tsx
18245
- import React205 from "react";
18390
+ import React209 from "react";
18246
18391
  var BankTransactionsWithLinkedAccounts = ({
18247
18392
  title,
18248
18393
  // deprecated
@@ -18258,13 +18403,13 @@ var BankTransactionsWithLinkedAccounts = ({
18258
18403
  mobileComponent,
18259
18404
  stringOverrides
18260
18405
  }) => {
18261
- return /* @__PURE__ */ React205.createElement(
18406
+ return /* @__PURE__ */ React209.createElement(
18262
18407
  View,
18263
18408
  {
18264
18409
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "Bank transactions",
18265
18410
  showHeader: showTitle
18266
18411
  },
18267
- /* @__PURE__ */ React205.createElement(
18412
+ /* @__PURE__ */ React209.createElement(
18268
18413
  LinkedAccounts,
18269
18414
  {
18270
18415
  elevated: elevatedLinkedAccounts,
@@ -18274,7 +18419,7 @@ var BankTransactionsWithLinkedAccounts = ({
18274
18419
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.linkedAccounts
18275
18420
  }
18276
18421
  ),
18277
- /* @__PURE__ */ React205.createElement(
18422
+ /* @__PURE__ */ React209.createElement(
18278
18423
  BankTransactions,
18279
18424
  {
18280
18425
  asWidget: true,
@@ -18290,7 +18435,7 @@ var BankTransactionsWithLinkedAccounts = ({
18290
18435
  };
18291
18436
 
18292
18437
  // src/views/GeneralLedger/GeneralLedger.tsx
18293
- import React206, { useState as useState62 } from "react";
18438
+ import React210, { useState as useState62 } from "react";
18294
18439
  var GeneralLedgerView = ({
18295
18440
  title,
18296
18441
  // deprecated
@@ -18299,13 +18444,13 @@ var GeneralLedgerView = ({
18299
18444
  chartOfAccountsOptions
18300
18445
  }) => {
18301
18446
  const [activeTab, setActiveTab] = useState62("chartOfAccounts");
18302
- return /* @__PURE__ */ React206.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React206.createElement(
18447
+ return /* @__PURE__ */ React210.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React210.createElement(
18303
18448
  View,
18304
18449
  {
18305
18450
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "General Ledger",
18306
18451
  showHeader: showTitle
18307
18452
  },
18308
- /* @__PURE__ */ React206.createElement(
18453
+ /* @__PURE__ */ React210.createElement(
18309
18454
  Toggle,
18310
18455
  {
18311
18456
  name: "general-ledger-tabs",
@@ -18323,7 +18468,7 @@ var GeneralLedgerView = ({
18323
18468
  onChange: (opt) => setActiveTab(opt.target.value)
18324
18469
  }
18325
18470
  ),
18326
- activeTab === "chartOfAccounts" ? /* @__PURE__ */ React206.createElement(
18471
+ activeTab === "chartOfAccounts" ? /* @__PURE__ */ React210.createElement(
18327
18472
  ChartOfAccounts,
18328
18473
  {
18329
18474
  asWidget: true,
@@ -18332,12 +18477,12 @@ var GeneralLedgerView = ({
18332
18477
  templateAccountsEditable: chartOfAccountsOptions == null ? void 0 : chartOfAccountsOptions.templateAccountsEditable,
18333
18478
  showReversalEntries: chartOfAccountsOptions == null ? void 0 : chartOfAccountsOptions.showReversalEntries
18334
18479
  }
18335
- ) : /* @__PURE__ */ React206.createElement(Journal, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.journal })
18480
+ ) : /* @__PURE__ */ React210.createElement(Journal, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.journal })
18336
18481
  ));
18337
18482
  };
18338
18483
 
18339
18484
  // src/views/ProjectProfitability/ProjectProfitability.tsx
18340
- import React207, { useState as useState63 } from "react";
18485
+ import React211, { useState as useState63 } from "react";
18341
18486
  import Select4 from "react-select";
18342
18487
  var ProjectProfitabilityView = ({
18343
18488
  valueOptions,
@@ -18362,14 +18507,14 @@ var ProjectProfitabilityView = ({
18362
18507
  values: tagFilter2.tagValues
18363
18508
  } : void 0;
18364
18509
  };
18365
- return /* @__PURE__ */ React207.createElement(
18510
+ return /* @__PURE__ */ React211.createElement(
18366
18511
  View,
18367
18512
  {
18368
18513
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || "",
18369
18514
  showHeader: showTitle,
18370
18515
  viewClassName: "Layer__project-view"
18371
18516
  },
18372
- /* @__PURE__ */ React207.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React207.createElement("div", { className: "Layer__component" }, /* @__PURE__ */ React207.createElement(
18517
+ /* @__PURE__ */ React211.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React211.createElement("div", { className: "Layer__component" }, /* @__PURE__ */ React211.createElement(
18373
18518
  Toggle,
18374
18519
  {
18375
18520
  name: "project-tabs",
@@ -18390,7 +18535,7 @@ var ProjectProfitabilityView = ({
18390
18535
  selected: activeTab,
18391
18536
  onChange: (opt) => setActiveTab(opt.target.value)
18392
18537
  }
18393
- )), /* @__PURE__ */ React207.createElement(
18538
+ )), /* @__PURE__ */ React211.createElement(
18394
18539
  Select4,
18395
18540
  {
18396
18541
  className: "Layer__category-menu Layer__select",
@@ -18408,7 +18553,7 @@ var ProjectProfitabilityView = ({
18408
18553
  }
18409
18554
  }
18410
18555
  )),
18411
- /* @__PURE__ */ React207.createElement(Container, { name: "project" }, /* @__PURE__ */ React207.createElement(React207.Fragment, null, activeTab === "overview" && /* @__PURE__ */ React207.createElement(
18556
+ /* @__PURE__ */ React211.createElement(Container, { name: "project" }, /* @__PURE__ */ React211.createElement(React211.Fragment, null, activeTab === "overview" && /* @__PURE__ */ React211.createElement(
18412
18557
  AccountingOverview,
18413
18558
  {
18414
18559
  stringOverrides: { header: "Project Overview" },
@@ -18418,7 +18563,7 @@ var ProjectProfitabilityView = ({
18418
18563
  showTransactionsToReview: false,
18419
18564
  showTitle: false
18420
18565
  }
18421
- ), activeTab === "transactions" && /* @__PURE__ */ React207.createElement(
18566
+ ), activeTab === "transactions" && /* @__PURE__ */ React211.createElement(
18422
18567
  BankTransactions,
18423
18568
  {
18424
18569
  hideHeader: true,
@@ -18427,7 +18572,7 @@ var ProjectProfitabilityView = ({
18427
18572
  tagFilter: tagFilter != null ? tagFilter : void 0
18428
18573
  }
18429
18574
  }
18430
- ), activeTab === "report" && /* @__PURE__ */ React207.createElement(ProfitAndLoss, { asContainer: false, tagFilter: pnlTagFilter }, /* @__PURE__ */ React207.createElement(
18575
+ ), activeTab === "report" && /* @__PURE__ */ React211.createElement(ProfitAndLoss, { asContainer: false, tagFilter: pnlTagFilter }, /* @__PURE__ */ React211.createElement(
18431
18576
  ProfitAndLoss.Report,
18432
18577
  {
18433
18578
  stringOverrides,
@@ -18439,7 +18584,7 @@ var ProjectProfitabilityView = ({
18439
18584
  };
18440
18585
 
18441
18586
  // src/views/Reports/Reports.tsx
18442
- import React208, { useState as useState64 } from "react";
18587
+ import React212, { useState as useState64 } from "react";
18443
18588
  var getOptions = (enabledReports) => {
18444
18589
  return [
18445
18590
  enabledReports.includes("profitAndLoss") ? {
@@ -18473,13 +18618,13 @@ var Reports = ({
18473
18618
  );
18474
18619
  const options = getOptions(enabledReports);
18475
18620
  const defaultTitle = enabledReports.length > 1 ? "Reports" : (_a = options.find((option) => option.value = enabledReports[0])) == null ? void 0 : _a.label;
18476
- return /* @__PURE__ */ React208.createElement(
18621
+ return /* @__PURE__ */ React212.createElement(
18477
18622
  View,
18478
18623
  {
18479
18624
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || defaultTitle,
18480
18625
  showHeader: showTitle
18481
18626
  },
18482
- enabledReports.length > 1 && /* @__PURE__ */ React208.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React208.createElement(
18627
+ enabledReports.length > 1 && /* @__PURE__ */ React212.createElement("div", { className: "Layer__component Layer__header__actions" }, /* @__PURE__ */ React212.createElement(
18483
18628
  Toggle,
18484
18629
  {
18485
18630
  name: "reports-tabs",
@@ -18488,7 +18633,7 @@ var Reports = ({
18488
18633
  onChange: (opt) => setActiveTab(opt.target.value)
18489
18634
  }
18490
18635
  )),
18491
- /* @__PURE__ */ React208.createElement(Container, { name: "reports", ref: containerRef }, /* @__PURE__ */ React208.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React208.createElement(
18636
+ /* @__PURE__ */ React212.createElement(Container, { name: "reports", ref: containerRef }, /* @__PURE__ */ React212.createElement(ProfitAndLoss, { asContainer: false }, /* @__PURE__ */ React212.createElement(
18492
18637
  ReportsPanel,
18493
18638
  {
18494
18639
  containerRef,
@@ -18511,7 +18656,7 @@ var ReportsPanel = ({
18511
18656
  statementOfCashFlowConfig,
18512
18657
  view
18513
18658
  }) => {
18514
- return /* @__PURE__ */ React208.createElement(React208.Fragment, null, openReport === "profitAndLoss" && /* @__PURE__ */ React208.createElement(
18659
+ return /* @__PURE__ */ React212.createElement(React212.Fragment, null, openReport === "profitAndLoss" && /* @__PURE__ */ React212.createElement(
18515
18660
  ProfitAndLoss.Report,
18516
18661
  __spreadValues({
18517
18662
  stringOverrides,
@@ -18519,7 +18664,7 @@ var ReportsPanel = ({
18519
18664
  parentRef: containerRef,
18520
18665
  view
18521
18666
  }, profitAndLossConfig)
18522
- ), openReport === "balanceSheet" && /* @__PURE__ */ React208.createElement(BalanceSheet, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.balanceSheet }), openReport === "statementOfCashFlow" && /* @__PURE__ */ React208.createElement(
18667
+ ), openReport === "balanceSheet" && /* @__PURE__ */ React212.createElement(BalanceSheet, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.balanceSheet }), openReport === "statementOfCashFlow" && /* @__PURE__ */ React212.createElement(
18523
18668
  StatementOfCashFlow,
18524
18669
  __spreadValues({
18525
18670
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
@@ -18528,11 +18673,11 @@ var ReportsPanel = ({
18528
18673
  };
18529
18674
 
18530
18675
  // src/components/ProfitAndLossView/ProfitAndLossView.tsx
18531
- import React209, { useContext as useContext47, useRef as useRef21 } from "react";
18676
+ import React213, { useContext as useContext47, useRef as useRef21 } from "react";
18532
18677
  var COMPONENT_NAME7 = "profit-and-loss";
18533
18678
  var ProfitAndLossView = (props) => {
18534
18679
  const containerRef = useRef21(null);
18535
- return /* @__PURE__ */ React209.createElement(Container, { name: COMPONENT_NAME7, ref: containerRef }, /* @__PURE__ */ React209.createElement(ProfitAndLoss, null, /* @__PURE__ */ React209.createElement(ProfitAndLossPanel, __spreadValues({ containerRef }, props))));
18680
+ return /* @__PURE__ */ React213.createElement(Container, { name: COMPONENT_NAME7, ref: containerRef }, /* @__PURE__ */ React213.createElement(ProfitAndLoss, null, /* @__PURE__ */ React213.createElement(ProfitAndLossPanel, __spreadValues({ containerRef }, props))));
18536
18681
  };
18537
18682
  var ProfitAndLossPanel = (_a) => {
18538
18683
  var _b = _a, {
@@ -18543,10 +18688,10 @@ var ProfitAndLossPanel = (_a) => {
18543
18688
  "stringOverrides"
18544
18689
  ]);
18545
18690
  const { sidebarScope } = useContext47(ProfitAndLoss.Context);
18546
- return /* @__PURE__ */ React209.createElement(
18691
+ return /* @__PURE__ */ React213.createElement(
18547
18692
  Panel,
18548
18693
  {
18549
- sidebar: /* @__PURE__ */ React209.createElement(
18694
+ sidebar: /* @__PURE__ */ React213.createElement(
18550
18695
  ProfitAndLossDetailedCharts,
18551
18696
  {
18552
18697
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.profitAndLossDetailedCharts
@@ -18555,7 +18700,7 @@ var ProfitAndLossPanel = (_a) => {
18555
18700
  sidebarIsOpen: Boolean(sidebarScope),
18556
18701
  parentRef: containerRef
18557
18702
  },
18558
- /* @__PURE__ */ React209.createElement(
18703
+ /* @__PURE__ */ React213.createElement(
18559
18704
  ProfitAndLoss.Header,
18560
18705
  {
18561
18706
  text: (stringOverrides == null ? void 0 : stringOverrides.header) || "Profit & Loss",
@@ -18563,7 +18708,7 @@ var ProfitAndLossPanel = (_a) => {
18563
18708
  headingClassName: "Layer__profit-and-loss__title"
18564
18709
  }
18565
18710
  ),
18566
- /* @__PURE__ */ React209.createElement(Components, __spreadValues({ stringOverrides }, props))
18711
+ /* @__PURE__ */ React213.createElement(Components, __spreadValues({ stringOverrides }, props))
18567
18712
  );
18568
18713
  };
18569
18714
  var Components = ({
@@ -18575,7 +18720,7 @@ var Components = ({
18575
18720
  ProfitAndLoss.Context
18576
18721
  );
18577
18722
  if (!isLoading && error) {
18578
- return /* @__PURE__ */ React209.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React209.createElement(
18723
+ return /* @__PURE__ */ React213.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React213.createElement(
18579
18724
  DataState,
18580
18725
  {
18581
18726
  status: "failed" /* failed */,
@@ -18586,27 +18731,26 @@ var Components = ({
18586
18731
  }
18587
18732
  ));
18588
18733
  }
18589
- return /* @__PURE__ */ React209.createElement(React209.Fragment, null, !hideChart && /* @__PURE__ */ React209.createElement("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries` }, /* @__PURE__ */ React209.createElement(
18734
+ return /* @__PURE__ */ React213.createElement(React213.Fragment, null, !hideChart && /* @__PURE__ */ React213.createElement("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries` }, /* @__PURE__ */ React213.createElement(
18590
18735
  "div",
18591
18736
  {
18592
18737
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__summary-col`
18593
18738
  },
18594
- /* @__PURE__ */ React209.createElement(ProfitAndLoss.DatePicker, null),
18595
- /* @__PURE__ */ React209.createElement(
18739
+ /* @__PURE__ */ React213.createElement(ProfitAndLoss.DatePicker, null),
18740
+ /* @__PURE__ */ React213.createElement(
18596
18741
  ProfitAndLoss.Summaries,
18597
18742
  {
18598
- vertical: true,
18599
18743
  actionable: true,
18600
18744
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.profitAndLossSummaries
18601
18745
  }
18602
18746
  )
18603
- ), /* @__PURE__ */ React209.createElement(
18747
+ ), /* @__PURE__ */ React213.createElement(
18604
18748
  "div",
18605
18749
  {
18606
18750
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__chart-col`
18607
18751
  },
18608
- /* @__PURE__ */ React209.createElement(ProfitAndLoss.Chart, null)
18609
- )), !hideTable && /* @__PURE__ */ React209.createElement(
18752
+ /* @__PURE__ */ React213.createElement(ProfitAndLoss.Chart, null)
18753
+ )), !hideTable && /* @__PURE__ */ React213.createElement(
18610
18754
  ProfitAndLoss.Table,
18611
18755
  {
18612
18756
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.profitAndLossTable