@layerfi/components 0.1.89 → 0.1.91-alpha

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.
@@ -29,10 +29,7 @@ var __objRest = (source, exclude2) => {
29
29
  }
30
30
  return target;
31
31
  };
32
- var __publicField = (obj, key, value) => {
33
- __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34
- return value;
35
- };
32
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
36
33
  var __async = (__this, __arguments, generator) => {
37
34
  return new Promise((resolve, reject) => {
38
35
  var fulfilled = (value) => {
@@ -61,7 +58,7 @@ import { useState as useState8 } from "react";
61
58
  import { useReducer, useEffect as useEffect4 } from "react";
62
59
 
63
60
  // package.json
64
- var version = "0.1.89";
61
+ var version = "0.1.91-alpha";
65
62
 
66
63
  // src/models/APIError.ts
67
64
  var APIError = class _APIError extends Error {
@@ -305,6 +302,9 @@ var createBillPayment = post(
305
302
 
306
303
  // src/api/layer/business.ts
307
304
  var getBusiness = get(({ businessId }) => `/v1/businesses/${businessId}`);
305
+ var updateBusiness = put(
306
+ ({ businessId }) => `/v1/businesses/${businessId}`
307
+ );
308
308
 
309
309
  // src/api/layer/categories.ts
310
310
  var getCategories = get(({ businessId, mode }) => {
@@ -706,14 +706,14 @@ function ToastsContainer() {
706
706
  // src/components/GlobalWidgets/GlobalWidgets.tsx
707
707
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
708
708
  var DrawerWidget = () => {
709
- const { content, close } = useContext3(DrawerContext);
709
+ const { content, close: close2 } = useContext3(DrawerContext);
710
710
  const { isMobile, isTablet } = useSizeClass();
711
711
  useEffect(() => {
712
712
  if (!isMobile && !isTablet && content) {
713
- close();
713
+ close2();
714
714
  }
715
715
  }, [isMobile]);
716
- return /* @__PURE__ */ jsx3(Drawer, { isOpen: Boolean(content), onClose: close, children: content });
716
+ return /* @__PURE__ */ jsx3(Drawer, { isOpen: Boolean(content), onClose: close2, children: content });
717
717
  };
718
718
  var GlobalWidgets = () => {
719
719
  return /* @__PURE__ */ jsxs2(Fragment2, { children: [
@@ -818,7 +818,7 @@ import { useState as useState3 } from "react";
818
818
  var useDrawer = () => {
819
819
  const [content, setContent] = useState3(void 0);
820
820
  const [isClosing, setIsClosing] = useState3(false);
821
- const close = () => {
821
+ const close2 = () => {
822
822
  setIsClosing(true);
823
823
  };
824
824
  const finishClosing = () => {
@@ -830,7 +830,7 @@ var useDrawer = () => {
830
830
  setContent,
831
831
  finishClosing,
832
832
  isClosing,
833
- close
833
+ close: close2
834
834
  };
835
835
  };
836
836
 
@@ -852,6 +852,15 @@ function hasSuggestions(categorization) {
852
852
  return categorization != null && categorization.suggestions !== void 0 && categorization.suggestions.length > 0;
853
853
  }
854
854
 
855
+ // src/types/business.ts
856
+ var ENTITY_TYPES = [
857
+ { value: "SOLE_PROP", label: "Sole Proprietorship" },
858
+ { value: "C_CORP", label: "C Corporation" },
859
+ { value: "LLC", label: "Limited Liability Company" },
860
+ { value: "S_CORP", label: "S Corporation" },
861
+ { value: "PARTNERSHIP", label: "Partnership" }
862
+ ];
863
+
855
864
  // src/config/theme.ts
856
865
  var SHADES = {
857
866
  50: { s: 1, l: 98 },
@@ -1050,16 +1059,11 @@ var buildColorShade = (shade, darkColorHsl) => {
1050
1059
  return { hsl, rgb, hex };
1051
1060
  };
1052
1061
  var hueToRgb = (p, q, t) => {
1053
- if (t < 0)
1054
- t += 1;
1055
- if (t > 1)
1056
- t -= 1;
1057
- if (t < 1 / 6)
1058
- return p + (q - p) * 6 * t;
1059
- if (t < 1 / 2)
1060
- return q;
1061
- if (t < 2 / 3)
1062
- return p + (q - p) * (2 / 3 - t) * 6;
1062
+ if (t < 0) t += 1;
1063
+ if (t > 1) t -= 1;
1064
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
1065
+ if (t < 1 / 2) return q;
1066
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
1063
1067
  return p;
1064
1068
  };
1065
1069
  var hslToRgb = (hsl) => {
@@ -2404,7 +2408,7 @@ var BusinessProvider = ({
2404
2408
  setOnboardingStep,
2405
2409
  addToast,
2406
2410
  removeToast,
2407
- onError: errorHandler.onError,
2411
+ onError: (payload) => errorHandler.onError(payload),
2408
2412
  touch,
2409
2413
  read,
2410
2414
  syncTimestamps,
@@ -3338,8 +3342,7 @@ var TooltipContent = forwardRef3(function TooltipContent2(_a, propRef) {
3338
3342
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3339
3343
  const context = useTooltipContext();
3340
3344
  const ref = useMergeRefs([context.refs.setFloating, propRef]);
3341
- if (!context.open || context.disabled)
3342
- return null;
3345
+ if (!context.open || context.disabled) return null;
3343
3346
  return /* @__PURE__ */ jsx22(FloatingPortal, { children: /* @__PURE__ */ jsx22(
3344
3347
  "div",
3345
3348
  __spreadProps(__spreadValues({
@@ -3487,8 +3490,7 @@ var IconButton = (_a) => {
3487
3490
  download,
3488
3491
  className: baseClassName,
3489
3492
  onClick: (e) => {
3490
- if (props.disabled)
3491
- e.preventDefault();
3493
+ if (props.disabled) e.preventDefault();
3492
3494
  },
3493
3495
  children: icon
3494
3496
  }
@@ -3748,7 +3750,8 @@ var SubmitButton = (_a) => {
3748
3750
  children,
3749
3751
  action = "save" /* SAVE */,
3750
3752
  noIcon,
3751
- variant = "primary" /* primary */
3753
+ variant = "primary" /* primary */,
3754
+ withRetry
3752
3755
  } = _b, props = __objRest(_b, [
3753
3756
  "active",
3754
3757
  "className",
@@ -3758,12 +3761,24 @@ var SubmitButton = (_a) => {
3758
3761
  "children",
3759
3762
  "action",
3760
3763
  "noIcon",
3761
- "variant"
3764
+ "variant",
3765
+ "withRetry"
3762
3766
  ]);
3763
3767
  const baseClassName = classNames7(
3764
3768
  active ? "Layer__btn--active" : "",
3765
3769
  className
3766
3770
  );
3771
+ if (withRetry && error) {
3772
+ return /* @__PURE__ */ jsx30(
3773
+ RetryButton,
3774
+ __spreadProps(__spreadValues({}, props), {
3775
+ className: baseClassName,
3776
+ disabled: processing || disabled,
3777
+ error: typeof error === "string" ? error : "Something went wrong",
3778
+ children
3779
+ })
3780
+ );
3781
+ }
3767
3782
  return /* @__PURE__ */ jsx30(
3768
3783
  Button,
3769
3784
  __spreadProps(__spreadValues({}, props), {
@@ -4219,7 +4234,8 @@ var Text = (_a) => {
4219
4234
  weight = "normal" /* normal */,
4220
4235
  withTooltip,
4221
4236
  ellipsis,
4222
- status
4237
+ status,
4238
+ pb
4223
4239
  } = _b, props = __objRest(_b, [
4224
4240
  "as",
4225
4241
  "className",
@@ -4228,9 +4244,10 @@ var Text = (_a) => {
4228
4244
  "weight",
4229
4245
  "withTooltip",
4230
4246
  "ellipsis",
4231
- "status"
4247
+ "status",
4248
+ "pb"
4232
4249
  ]);
4233
- const dataProperties = toDataProperties({ status, ellipsis });
4250
+ const dataProperties = toDataProperties({ status, ellipsis, pb });
4234
4251
  const baseClassName = classNames15(
4235
4252
  `Layer__text Layer__text--${size} Layer__text--${weight}`,
4236
4253
  className
@@ -4312,10 +4329,12 @@ var Heading = ({
4312
4329
  as: Component2 = "h2",
4313
4330
  className,
4314
4331
  children,
4315
- size = "primary" /* primary */
4332
+ size = "primary" /* primary */,
4333
+ align = "center"
4316
4334
  }) => {
4317
4335
  const baseClassName = classNames16(
4318
4336
  `Layer__heading Layer__heading--${size}`,
4337
+ `Layer__heading--${align}`,
4319
4338
  className
4320
4339
  );
4321
4340
  return /* @__PURE__ */ jsx45(Component2, { className: baseClassName, children });
@@ -5440,7 +5459,7 @@ var LinkedAccountItemThumb = ({
5440
5459
  };
5441
5460
 
5442
5461
  // src/components/LinkedAccounts/LinkedAccountsContent.tsx
5443
- import classNames24 from "classnames";
5462
+ import classNames25 from "classnames";
5444
5463
 
5445
5464
  // src/components/LinkedAccounts/ConfirmationModal/LinkedAccountsConfirmationModal.tsx
5446
5465
  import { useState as useState14 } from "react";
@@ -5623,12 +5642,13 @@ function ModalActions({ children }) {
5623
5642
  }
5624
5643
 
5625
5644
  // src/components/ui/Stack/Stack.tsx
5645
+ import classNames23 from "classnames";
5626
5646
  import { jsx as jsx69 } from "react/jsx-runtime";
5627
5647
  var CLASS_NAME2 = "Layer__Stack";
5628
5648
  function Stack(_a) {
5629
- var _b = _a, { align, children, direction, gap, justify, pbs, pbe } = _b, restProps = __objRest(_b, ["align", "children", "direction", "gap", "justify", "pbs", "pbe"]);
5649
+ var _b = _a, { align, children, direction, gap, justify, pbs, pbe, className } = _b, restProps = __objRest(_b, ["align", "children", "direction", "gap", "justify", "pbs", "pbe", "className"]);
5630
5650
  const dataProperties = toDataProperties({ align, direction, gap, justify, pbs, pbe });
5631
- return /* @__PURE__ */ jsx69("div", __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: CLASS_NAME2, children }));
5651
+ return /* @__PURE__ */ jsx69("div", __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: classNames23(CLASS_NAME2, className), children }));
5632
5652
  }
5633
5653
  function VStack(props) {
5634
5654
  return /* @__PURE__ */ jsx69(Stack, __spreadProps(__spreadValues({}, props), { direction: "column" }));
@@ -5676,7 +5696,7 @@ function withRenderProp(renderProp, callback) {
5676
5696
  }
5677
5697
 
5678
5698
  // src/components/ui/Checkbox/Checkbox.tsx
5679
- import classNames23 from "classnames";
5699
+ import classNames24 from "classnames";
5680
5700
  import { Fragment as Fragment8, jsx as jsx71, jsxs as jsxs35 } from "react/jsx-runtime";
5681
5701
  var CLASS_NAME3 = "Layer__Checkbox";
5682
5702
  function Checkbox(_a) {
@@ -5689,7 +5709,7 @@ function Checkbox(_a) {
5689
5709
  return /* @__PURE__ */ jsx71(
5690
5710
  ReactAriaCheckbox,
5691
5711
  __spreadProps(__spreadValues(__spreadValues({}, dataProperties), props), {
5692
- className: classNames23(CLASS_NAME3, className),
5712
+ className: classNames24(CLASS_NAME3, className),
5693
5713
  children: withRenderProp(children, (node) => /* @__PURE__ */ jsxs35(Fragment8, { children: [
5694
5714
  /* @__PURE__ */ jsx71("div", { slot: "checkbox", children: /* @__PURE__ */ jsx71(Check, { size: size === "lg" ? 16 : 12 }) }),
5695
5715
  node
@@ -5707,7 +5727,7 @@ function BasicLinkedAccountContainer({ children, isSelected }) {
5707
5727
  }
5708
5728
  function BasicLinkedAccountLogo({ account }) {
5709
5729
  var _a, _b, _c;
5710
- return /* @__PURE__ */ jsx72(VStack, { justify: "center", children: ((_a = account.institution) == null ? void 0 : _a.logo) ? /* @__PURE__ */ jsx72(
5730
+ return /* @__PURE__ */ jsx72(VStack, { justify: "center", className: "Layer__BasicLinkedAccountLogo", children: ((_a = account.institution) == null ? void 0 : _a.logo) ? /* @__PURE__ */ jsx72(
5711
5731
  "img",
5712
5732
  {
5713
5733
  width: 28,
@@ -5715,17 +5735,17 @@ function BasicLinkedAccountLogo({ account }) {
5715
5735
  src: `data:image/png;base64,${account.institution.logo}`,
5716
5736
  alt: ((_b = account.institution) == null ? void 0 : _b.name) ? (_c = account.institution) == null ? void 0 : _c.name : account.external_account_name
5717
5737
  }
5718
- ) : /* @__PURE__ */ jsx72(InstitutionIcon_default, { size: 28 }) });
5738
+ ) : /* @__PURE__ */ jsx72(InstitutionIcon_default, {}) });
5719
5739
  }
5720
5740
  function BasicLinkedAccountContent({ account }) {
5721
5741
  var _a;
5722
5742
  return /* @__PURE__ */ jsxs36(HStack, { gap: "md", children: [
5723
5743
  /* @__PURE__ */ jsx72(BasicLinkedAccountLogo, { account }),
5724
5744
  /* @__PURE__ */ jsxs36(VStack, { children: [
5725
- /* @__PURE__ */ jsx72(Heading2, { level: 3, size: "sm", pbe: "2xs", children: account.external_account_name }),
5745
+ /* @__PURE__ */ jsx72(Heading2, { level: 3, size: "xs", pbe: "3xs", children: account.external_account_name }),
5726
5746
  /* @__PURE__ */ jsxs36(HStack, { gap: "xs", children: [
5727
- /* @__PURE__ */ jsx72(P, { children: (_a = account.institution) == null ? void 0 : _a.name }),
5728
- /* @__PURE__ */ jsxs36(P, { variant: "subtle", children: [
5747
+ /* @__PURE__ */ jsx72(P, { size: "sm", children: (_a = account.institution) == null ? void 0 : _a.name }),
5748
+ /* @__PURE__ */ jsxs36(P, { variant: "subtle", size: "sm", children: [
5729
5749
  "\u2022\u2022\u2022",
5730
5750
  " ",
5731
5751
  account.mask
@@ -5897,13 +5917,8 @@ function useLinkedAccountsConfirmationModal() {
5897
5917
  }, baseInfo);
5898
5918
  }
5899
5919
  function LinkedAccountsConfirmationModalPreloadedContent({ onClose }) {
5900
- const { onDismiss } = useLinkedAccountsConfirmationModal();
5901
- const handleDismiss = () => {
5902
- onDismiss();
5903
- onClose();
5904
- };
5905
5920
  return /* @__PURE__ */ jsxs38(Fragment9, { children: [
5906
- /* @__PURE__ */ jsx75(ModalContextBar, { onClose: handleDismiss }),
5921
+ /* @__PURE__ */ jsx75(ModalContextBar, { onClose }),
5907
5922
  /* @__PURE__ */ jsx75(ModalHeading, { pbe: "md", children: "Loading Your Accounts..." }),
5908
5923
  /* @__PURE__ */ jsx75(ModalContent, { children: /* @__PURE__ */ jsxs38(VStack, { slot: "center", align: "center", gap: "md", children: [
5909
5924
  /* @__PURE__ */ jsx75(LoadingSpinner, { size: 48 }),
@@ -5912,16 +5927,12 @@ function LinkedAccountsConfirmationModalPreloadedContent({ onClose }) {
5912
5927
  ] });
5913
5928
  }
5914
5929
  function LinkedAccountsConfirmationModalContent({ onClose }) {
5915
- const { accounts, onDismiss, onFinish, refetchAccounts } = useLinkedAccountsConfirmationModal();
5930
+ const { accounts, onFinish, refetchAccounts } = useLinkedAccountsConfirmationModal();
5916
5931
  const [formState, setFormState] = useState14(() => Object.fromEntries(
5917
5932
  accounts.map(({ id }) => [id, true])
5918
5933
  ));
5919
5934
  const { trigger, isMutating, error } = useConfirmAndExcludeMultiple({ onSuccess: refetchAccounts });
5920
5935
  const hasError = Boolean(error);
5921
- const handleDismiss = () => {
5922
- onDismiss();
5923
- onClose();
5924
- };
5925
5936
  const handleFinish = () => __async(this, null, function* () {
5926
5937
  const success = yield trigger(formState);
5927
5938
  if (success) {
@@ -5929,9 +5940,12 @@ function LinkedAccountsConfirmationModalContent({ onClose }) {
5929
5940
  onClose();
5930
5941
  }
5931
5942
  });
5943
+ const handleDismiss = () => {
5944
+ onClose();
5945
+ };
5932
5946
  const { descriptionLabel, buttonLabel } = getFormComponentLabels(formState);
5933
5947
  return /* @__PURE__ */ jsxs38(Fragment9, { children: [
5934
- /* @__PURE__ */ jsx75(ModalContextBar, { onClose: handleDismiss }),
5948
+ /* @__PURE__ */ jsx75(ModalContextBar, { onClose }),
5935
5949
  /* @__PURE__ */ jsx75(ModalHeading, { pbe: "2xs", children: "Confirm Business Accounts" }),
5936
5950
  /* @__PURE__ */ jsx75(ModalDescription, { pbe: "md", children: descriptionLabel }),
5937
5951
  /* @__PURE__ */ jsx75(ModalContent, { children: /* @__PURE__ */ jsx75(
@@ -5959,13 +5973,26 @@ function LinkedAccountsConfirmationModalContent({ onClose }) {
5959
5973
  /* @__PURE__ */ jsx75(ModalActions, { children: /* @__PURE__ */ jsx75(VStack, { gap: "md", children: hasError ? /* @__PURE__ */ jsxs38(Fragment9, { children: [
5960
5974
  /* @__PURE__ */ jsx75(P, { size: "sm", children: "An error occurred while confirming accounts. You will have an opportunity to try again later." }),
5961
5975
  /* @__PURE__ */ jsx75(P, { size: "sm", children: "No data will be synced until you confirm." }),
5962
- /* @__PURE__ */ jsx75(Button2, { size: "lg", onPress: handleDismiss, children: "Close" })
5963
- ] }) : /* @__PURE__ */ jsx75(Button2, { size: "lg", onPress: handleFinish, isPending: isMutating, children: buttonLabel }) }) })
5976
+ /* @__PURE__ */ jsx75(Button2, { size: "lg", onPress: close, children: "Close" })
5977
+ ] }) : /* @__PURE__ */ jsx75(Button2, { size: "lg", onPress: () => {
5978
+ void handleFinish();
5979
+ }, isPending: isMutating, children: buttonLabel }) }) })
5964
5980
  ] });
5965
5981
  }
5966
5982
  function LinkedAccountsConfirmationModal() {
5967
- const { preloadIsOpen, mainIsOpen } = useLinkedAccountsConfirmationModal();
5968
- return /* @__PURE__ */ jsx75(Modal, { isOpen: preloadIsOpen || mainIsOpen, children: ({ close }) => preloadIsOpen ? /* @__PURE__ */ jsx75(LinkedAccountsConfirmationModalPreloadedContent, { onClose: close }) : /* @__PURE__ */ jsx75(LinkedAccountsConfirmationModalContent, { onClose: close }) });
5983
+ const { preloadIsOpen, mainIsOpen, onDismiss } = useLinkedAccountsConfirmationModal();
5984
+ return /* @__PURE__ */ jsx75(
5985
+ Modal,
5986
+ {
5987
+ isOpen: preloadIsOpen || mainIsOpen,
5988
+ onOpenChange: (isOpen) => {
5989
+ if (!isOpen) {
5990
+ onDismiss();
5991
+ }
5992
+ },
5993
+ children: ({ close: close2 }) => preloadIsOpen ? /* @__PURE__ */ jsx75(LinkedAccountsConfirmationModalPreloadedContent, { onClose: close2 }) : /* @__PURE__ */ jsx75(LinkedAccountsConfirmationModalContent, { onClose: close2 })
5994
+ }
5995
+ );
5969
5996
  }
5970
5997
 
5971
5998
  // src/components/LinkedAccounts/LinkedAccountsContent.tsx
@@ -5977,7 +6004,7 @@ var LinkedAccountsContent = ({
5977
6004
  showBreakConnection
5978
6005
  }) => {
5979
6006
  const { data, addConnection } = useContext13(LinkedAccountsContext);
5980
- const linkedAccountsNewAccountClassName = classNames24(
6007
+ const linkedAccountsNewAccountClassName = classNames25(
5981
6008
  "Layer__linked-accounts__new-account",
5982
6009
  asWidget && "--as-widget",
5983
6010
  showLedgerBalance && "--show-ledger-balance",
@@ -6053,7 +6080,7 @@ var isDateAllowedToBrowse = (date, business) => {
6053
6080
  import { useMemo as useMemo10 } from "react";
6054
6081
 
6055
6082
  // src/components/Input/Input.tsx
6056
- import classNames25 from "classnames";
6083
+ import classNames26 from "classnames";
6057
6084
  import { jsx as jsx77, jsxs as jsxs40 } from "react/jsx-runtime";
6058
6085
  var Input = (_a) => {
6059
6086
  var _b = _a, {
@@ -6067,7 +6094,7 @@ var Input = (_a) => {
6067
6094
  "errorMessage",
6068
6095
  "leftText"
6069
6096
  ]);
6070
- const baseClassName = classNames25(
6097
+ const baseClassName = classNames26(
6071
6098
  "Layer__input",
6072
6099
  isInvalid ? "Layer__input--error" : "",
6073
6100
  leftText ? "Layer__input--with-left-text" : "",
@@ -6083,7 +6110,7 @@ var Input = (_a) => {
6083
6110
  };
6084
6111
 
6085
6112
  // src/components/Input/InputGroup.tsx
6086
- import classNames26 from "classnames";
6113
+ import classNames27 from "classnames";
6087
6114
  import { jsx as jsx78, jsxs as jsxs41 } from "react/jsx-runtime";
6088
6115
  var InputGroup = ({
6089
6116
  label,
@@ -6092,7 +6119,7 @@ var InputGroup = ({
6092
6119
  inline,
6093
6120
  children
6094
6121
  }) => {
6095
- const baseClassName = classNames26(
6122
+ const baseClassName = classNames27(
6096
6123
  "Layer__input-group",
6097
6124
  className,
6098
6125
  inline && "Layer__input-group--inline"
@@ -6271,7 +6298,7 @@ var ChevronDownFill = (_a) => {
6271
6298
  var ChevronDownFill_default = ChevronDownFill;
6272
6299
 
6273
6300
  // src/components/Input/Select.tsx
6274
- import classNames27 from "classnames";
6301
+ import classNames28 from "classnames";
6275
6302
  import { jsx as jsx82, jsxs as jsxs45 } from "react/jsx-runtime";
6276
6303
  var Select = ({
6277
6304
  name,
@@ -6285,7 +6312,7 @@ var Select = ({
6285
6312
  isInvalid,
6286
6313
  errorMessage
6287
6314
  }) => {
6288
- const baseClassName = classNames27(
6315
+ const baseClassName = classNames28(
6289
6316
  "Layer__select",
6290
6317
  isInvalid ? "Layer__select--error" : "",
6291
6318
  className
@@ -6313,7 +6340,7 @@ var Select = ({
6313
6340
  };
6314
6341
 
6315
6342
  // src/components/Input/InputWithBadge.tsx
6316
- import classNames28 from "classnames";
6343
+ import classNames29 from "classnames";
6317
6344
  import { jsx as jsx83, jsxs as jsxs46 } from "react/jsx-runtime";
6318
6345
  var InputWithBadge = (_a) => {
6319
6346
  var _b = _a, {
@@ -6331,7 +6358,7 @@ var InputWithBadge = (_a) => {
6331
6358
  "badge",
6332
6359
  "variant"
6333
6360
  ]);
6334
- const baseClassName = classNames28(
6361
+ const baseClassName = classNames29(
6335
6362
  "Layer__input",
6336
6363
  isInvalid ? "Layer__input--error" : "",
6337
6364
  leftText ? "Layer__input--with-left-text" : "",
@@ -6354,7 +6381,7 @@ import { useCallback as useCallback2 } from "react";
6354
6381
  import ReactSelect2, {
6355
6382
  components as components2
6356
6383
  } from "react-select";
6357
- import classNames29 from "classnames";
6384
+ import classNames30 from "classnames";
6358
6385
  import { jsx as jsx84, jsxs as jsxs47 } from "react/jsx-runtime";
6359
6386
  var MultiSelect = ({
6360
6387
  name,
@@ -6370,7 +6397,7 @@ var MultiSelect = ({
6370
6397
  errorMessage,
6371
6398
  styles
6372
6399
  }) => {
6373
- const baseClassName = classNames29(
6400
+ const baseClassName = classNames30(
6374
6401
  "Layer__select",
6375
6402
  isInvalid ? "Layer__select--error" : "",
6376
6403
  className
@@ -6402,7 +6429,7 @@ var MultiSelect = ({
6402
6429
  };
6403
6430
 
6404
6431
  // src/components/Input/AmountInput.tsx
6405
- import classNames30 from "classnames";
6432
+ import classNames31 from "classnames";
6406
6433
  import CurrencyInput from "react-currency-input-field";
6407
6434
  import { jsx as jsx85, jsxs as jsxs48 } from "react/jsx-runtime";
6408
6435
  var AmountInput = (_a) => {
@@ -6421,7 +6448,7 @@ var AmountInput = (_a) => {
6421
6448
  "isInvalid",
6422
6449
  "placeholder"
6423
6450
  ]);
6424
- const baseClassName = classNames30(
6451
+ const baseClassName = classNames31(
6425
6452
  "Layer__input Layer__amount-input",
6426
6453
  isInvalid ? "Layer__input--error" : "",
6427
6454
  leftText ? "Layer__input--with-left-text" : "",
@@ -6549,7 +6576,7 @@ var DatePickerOptions = ({
6549
6576
  };
6550
6577
 
6551
6578
  // src/components/DatePicker/DatePicker.tsx
6552
- import classNames31 from "classnames";
6579
+ import classNames32 from "classnames";
6553
6580
  import { endOfDay as endOfDay2, endOfMonth as endOfMonth4, endOfYear as endOfYear3, getYear } from "date-fns";
6554
6581
  import { Fragment as Fragment13, jsx as jsx88, jsxs as jsxs49 } from "react/jsx-runtime";
6555
6582
  var ReactDatePicker = RDP.default.default || RDP.default || RDP;
@@ -6655,21 +6682,21 @@ var DatePicker = (_a) => {
6655
6682
  return [selected[0], null];
6656
6683
  }, [selected, displayMode]);
6657
6684
  const { isDesktop } = useSizeClass();
6658
- const wrapperClassNames = classNames31(
6685
+ const wrapperClassNames = classNames32(
6659
6686
  "Layer__datepicker__wrapper",
6660
6687
  displayMode === "timePicker" && "Layer__datepicker__time__wrapper",
6661
6688
  showNavigationArrows(navigateArrows, isDesktop) && "Layer__datepicker__wrapper--arrows"
6662
6689
  );
6663
- const datePickerWrapperClassNames = classNames31(
6690
+ const datePickerWrapperClassNames = classNames32(
6664
6691
  "Layer__datepicker",
6665
6692
  displayMode === "timePicker" && "Layer__datepicker__time",
6666
6693
  wrapperClassName
6667
6694
  );
6668
- const calendarClassNames = classNames31(
6695
+ const calendarClassNames = classNames32(
6669
6696
  "Layer__datepicker__calendar",
6670
6697
  calendarClassName
6671
6698
  );
6672
- const popperClassNames = classNames31(
6699
+ const popperClassNames = classNames32(
6673
6700
  "Layer__datepicker__popper",
6674
6701
  displayMode === "timePicker" && "Layer__datepicker__time__popper",
6675
6702
  popperClassName
@@ -6839,7 +6866,7 @@ var DatePicker = (_a) => {
6839
6866
  Button,
6840
6867
  {
6841
6868
  "aria-label": "Previous Date",
6842
- className: classNames31(
6869
+ className: classNames32(
6843
6870
  "Layer__datepicker__prev-button",
6844
6871
  isBeforeMinDate && "Layer__datepicker__button--disabled"
6845
6872
  ),
@@ -6861,7 +6888,7 @@ var DatePicker = (_a) => {
6861
6888
  {
6862
6889
  "aria-label": "Next Date",
6863
6890
  variant: "secondary" /* secondary */,
6864
- className: classNames31(
6891
+ className: classNames32(
6865
6892
  "Layer__datepicker__next-button",
6866
6893
  isTodayOrAfter ? "Layer__datepicker__button--disabled" : void 0
6867
6894
  ),
@@ -7121,8 +7148,7 @@ var humanizeEnum = (text) => {
7121
7148
  return capitalizeFirstLetter(text.replace(/_/gi, " ").toLowerCase());
7122
7149
  };
7123
7150
  var convertNumberToCurrency = (amount) => {
7124
- if (typeof amount !== "number" || isNaN(amount))
7125
- return "";
7151
+ if (typeof amount !== "number" || isNaN(amount)) return "";
7126
7152
  const formattedValue = amount.toLocaleString("en-US");
7127
7153
  return formattedValue.length > 0 ? `$${formattedValue}` : "";
7128
7154
  };
@@ -7261,11 +7287,11 @@ function OpeningBalanceModal({
7261
7287
  setAccountsToAddOpeningBalanceInModal([]);
7262
7288
  }
7263
7289
  },
7264
- children: ({ close }) => /* @__PURE__ */ jsx90(
7290
+ children: ({ close: close2 }) => /* @__PURE__ */ jsx90(
7265
7291
  LinkedAccountsOpeningBalanceModalContent,
7266
7292
  {
7267
7293
  accounts: accountsToAddOpeningBalanceInModal,
7268
- onClose: close,
7294
+ onClose: close2,
7269
7295
  stringOverrides
7270
7296
  }
7271
7297
  )
@@ -7776,7 +7802,7 @@ import { useContext as useContext16 } from "react";
7776
7802
  import { useState as useState18 } from "react";
7777
7803
 
7778
7804
  // src/components/ActionableList/ActionableList.tsx
7779
- import classNames32 from "classnames";
7805
+ import classNames33 from "classnames";
7780
7806
  import { jsx as jsx98, jsxs as jsxs57 } from "react/jsx-runtime";
7781
7807
  var ActionableList = ({
7782
7808
  options,
@@ -7789,7 +7815,7 @@ var ActionableList = ({
7789
7815
  {
7790
7816
  role: "button",
7791
7817
  onClick: () => onClick(x),
7792
- className: classNames32(
7818
+ className: classNames33(
7793
7819
  x.secondary && "Layer__actionable-list-item--secondary",
7794
7820
  x.asLink && "Layer__actionable-list-item--as-link",
7795
7821
  selectedId === x.id && "Layer__actionable-list__item--selected"
@@ -7931,7 +7957,7 @@ var BusinessCategories = ({
7931
7957
  };
7932
7958
 
7933
7959
  // src/components/CategorySelect/CategorySelectDrawer.tsx
7934
- import classNames33 from "classnames";
7960
+ import classNames34 from "classnames";
7935
7961
  import { jsx as jsx100, jsxs as jsxs59 } from "react/jsx-runtime";
7936
7962
  var CategorySelectDrawer = ({
7937
7963
  onSelect,
@@ -7939,16 +7965,16 @@ var CategorySelectDrawer = ({
7939
7965
  showTooltips: _showTooltips
7940
7966
  }) => {
7941
7967
  var _a, _b;
7942
- const { setContent, close } = useContext16(DrawerContext);
7968
+ const { setContent, close: close2 } = useContext16(DrawerContext);
7943
7969
  const onDrawerCategorySelect = (value) => {
7944
- close();
7970
+ close2();
7945
7971
  onSelect(value);
7946
7972
  };
7947
7973
  return /* @__PURE__ */ jsxs59(
7948
7974
  "button",
7949
7975
  {
7950
7976
  "aria-label": "Select category",
7951
- className: classNames33(
7977
+ className: classNames34(
7952
7978
  "Layer__category-menu__drawer-btn",
7953
7979
  selected && "Layer__category-menu__drawer-btn--selected"
7954
7980
  ),
@@ -7997,7 +8023,7 @@ var CategorySelectDrawerContent = ({
7997
8023
  };
7998
8024
 
7999
8025
  // src/components/CategorySelect/CategorySelect.tsx
8000
- import classNames34 from "classnames";
8026
+ import classNames35 from "classnames";
8001
8027
  import { parseISO as parseISO4, format as formatTime } from "date-fns";
8002
8028
  import { jsx as jsx101, jsxs as jsxs60 } from "react/jsx-runtime";
8003
8029
  var mapCategoryToOption2 = (category) => {
@@ -8049,7 +8075,7 @@ var GroupHeading = (props) => {
8049
8075
  return /* @__PURE__ */ jsx101(
8050
8076
  components3.GroupHeading,
8051
8077
  __spreadValues({
8052
- className: classNames34(
8078
+ className: classNames35(
8053
8079
  props.className,
8054
8080
  props.children === "Match" || props.children === "All categories" ? "Layer__select__group-heading--main" : ""
8055
8081
  )
@@ -8387,8 +8413,7 @@ var useReceiptsContext = () => useContext17(ReceiptsContext);
8387
8413
  import { useEffect as useEffect10, useState as useState19 } from "react";
8388
8414
  import { parseISO as parseISO5, format as formatTime2 } from "date-fns";
8389
8415
  var readDate = (date) => {
8390
- if (!date)
8391
- return void 0;
8416
+ if (!date) return void 0;
8392
8417
  return date && formatTime2(parseISO5(date), DATE_FORMAT);
8393
8418
  };
8394
8419
  var useReceipts = ({
@@ -8473,8 +8498,7 @@ var useReceipts = ({
8473
8498
  }
8474
8499
  });
8475
8500
  const archiveDocument = (document2) => __async(void 0, null, function* () {
8476
- if (!document2.id)
8477
- return;
8501
+ if (!document2.id) return;
8478
8502
  try {
8479
8503
  if (document2.error) {
8480
8504
  setReceiptUrls(receiptUrls.filter((url) => url.id !== document2.id));
@@ -8569,7 +8593,7 @@ var Eye = (_a) => {
8569
8593
  var Eye_default = Eye;
8570
8594
 
8571
8595
  // src/components/FileThumb/FileThumb.tsx
8572
- import classNames35 from "classnames";
8596
+ import classNames36 from "classnames";
8573
8597
  import { jsx as jsx106, jsxs as jsxs64 } from "react/jsx-runtime";
8574
8598
  var FileThumb = ({
8575
8599
  url,
@@ -8588,7 +8612,7 @@ var FileThumb = ({
8588
8612
  return /* @__PURE__ */ jsxs64(
8589
8613
  "div",
8590
8614
  {
8591
- className: classNames35(
8615
+ className: classNames36(
8592
8616
  "Layer__file-thumb",
8593
8617
  floatingActions && "Layer__file-thumb--floating"
8594
8618
  ),
@@ -8621,7 +8645,7 @@ var FileThumb = ({
8621
8645
  enableOpen || enableDownload || onDelete ? /* @__PURE__ */ jsxs64(
8622
8646
  "div",
8623
8647
  {
8624
- className: classNames35(
8648
+ className: classNames36(
8625
8649
  "Layer__file-thumb__actions",
8626
8650
  floatingActions && "Layer__file-thumb__actions--floating"
8627
8651
  ),
@@ -8779,7 +8803,7 @@ var MatchBadge = ({
8779
8803
  };
8780
8804
 
8781
8805
  // src/components/MatchForm/MatchForm.tsx
8782
- import classNames36 from "classnames";
8806
+ import classNames37 from "classnames";
8783
8807
  import { parseISO as parseISO7, format as formatTime4 } from "date-fns";
8784
8808
  import { jsx as jsx109, jsxs as jsxs67 } from "react/jsx-runtime";
8785
8809
  var MatchForm = ({
@@ -8808,7 +8832,7 @@ var MatchForm = ({
8808
8832
  return /* @__PURE__ */ jsxs67(
8809
8833
  "div",
8810
8834
  {
8811
- className: classNames36(
8835
+ className: classNames37(
8812
8836
  `${classNamePrefix}__match-row`,
8813
8837
  match.id === selectedMatchId ? `${classNamePrefix}__match-row--selected` : ""
8814
8838
  ),
@@ -8885,7 +8909,7 @@ var MatchForm = ({
8885
8909
  };
8886
8910
 
8887
8911
  // src/components/MatchForm/MatchFormMobile.tsx
8888
- import classNames37 from "classnames";
8912
+ import classNames38 from "classnames";
8889
8913
  import { parseISO as parseISO8, format as formatTime5 } from "date-fns";
8890
8914
  import { jsx as jsx110, jsxs as jsxs68 } from "react/jsx-runtime";
8891
8915
  var MatchFormMobile = ({
@@ -8901,7 +8925,7 @@ var MatchFormMobile = ({
8901
8925
  return /* @__PURE__ */ jsxs68(
8902
8926
  "div",
8903
8927
  {
8904
- className: classNames37(
8928
+ className: classNames38(
8905
8929
  `${classNamePrefix}__match-item`,
8906
8930
  match.id === selectedMatchId ? `${classNamePrefix}__match-item--selected` : ""
8907
8931
  ),
@@ -8962,7 +8986,7 @@ var MatchFormMobile = ({
8962
8986
  };
8963
8987
 
8964
8988
  // src/components/Textarea/Textarea.tsx
8965
- import classNames38 from "classnames";
8989
+ import classNames39 from "classnames";
8966
8990
  import { jsx as jsx111, jsxs as jsxs69 } from "react/jsx-runtime";
8967
8991
  var Textarea = (_a) => {
8968
8992
  var _b = _a, {
@@ -8974,7 +8998,7 @@ var Textarea = (_a) => {
8974
8998
  "isInvalid",
8975
8999
  "errorMessage"
8976
9000
  ]);
8977
- const baseClassName = classNames38(
9001
+ const baseClassName = classNames39(
8978
9002
  "Layer__textarea",
8979
9003
  isInvalid ? "Layer__textarea--error" : "",
8980
9004
  className
@@ -8991,7 +9015,7 @@ import {
8991
9015
  useMemo as useMemo12,
8992
9016
  useState as useState20
8993
9017
  } from "react";
8994
- import classNames39 from "classnames";
9018
+ import classNames40 from "classnames";
8995
9019
  import { jsx as jsx112, jsxs as jsxs70 } from "react/jsx-runtime";
8996
9020
  import { createElement } from "react";
8997
9021
  var Toggle = ({
@@ -9012,7 +9036,7 @@ var Toggle = ({
9012
9036
  setCurrentWidth(c.width);
9013
9037
  }
9014
9038
  });
9015
- const baseClassName = classNames39(
9039
+ const baseClassName = classNames40(
9016
9040
  "Layer__toggle",
9017
9041
  `Layer__toggle--${size}`,
9018
9042
  initialized ? "Layer__toggle--initialized" : ""
@@ -9097,7 +9121,7 @@ var ToggleOption = ({
9097
9121
  style,
9098
9122
  index
9099
9123
  }) => {
9100
- const optionClassName = classNames39("Layer__toggle-option", {
9124
+ const optionClassName = classNames40("Layer__toggle-option", {
9101
9125
  "Layer__toggle-option--active": checked
9102
9126
  });
9103
9127
  if (disabled) {
@@ -9262,7 +9286,7 @@ var Notification = ({
9262
9286
  };
9263
9287
 
9264
9288
  // src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
9265
- import classNames40 from "classnames";
9289
+ import classNames41 from "classnames";
9266
9290
 
9267
9291
  // src/hooks/bookkeeping/useBookkeepingStatus.ts
9268
9292
  import useSWR4 from "swr";
@@ -9285,7 +9309,12 @@ function LegacyModeProvider({
9285
9309
  }
9286
9310
 
9287
9311
  // src/hooks/bookkeeping/useBookkeepingStatus.ts
9288
- var BOOKKEEPING_STATUSES = ["NOT_PURCHASED", "BOOKKEEPING_PAUSED", "ACTIVE"];
9312
+ var BOOKKEEPING_STATUSES = [
9313
+ "NOT_PURCHASED",
9314
+ "ACTIVE",
9315
+ "ONBOARDING",
9316
+ "BOOKKEEPING_PAUSED"
9317
+ ];
9289
9318
  function constrainToKnownBookkeepingStatus(status) {
9290
9319
  if (BOOKKEEPING_STATUSES.includes(status)) {
9291
9320
  return status;
@@ -9305,7 +9334,7 @@ function buildKey4({
9305
9334
  accessToken,
9306
9335
  apiUrl,
9307
9336
  businessId,
9308
- tags: ["#bookkeeping, #status"]
9337
+ tags: ["#bookkeeping", "#status"]
9309
9338
  };
9310
9339
  }
9311
9340
  }
@@ -9376,7 +9405,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9376
9405
  ({
9377
9406
  bankTransaction,
9378
9407
  isOpen = false,
9379
- close,
9408
+ close: close2,
9380
9409
  categorized,
9381
9410
  asListItem = false,
9382
9411
  submitBtnText = "Save",
@@ -9521,7 +9550,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9521
9550
  yield onMatchSubmit(selectedMatchId);
9522
9551
  return;
9523
9552
  }
9524
- close();
9553
+ close2();
9525
9554
  return;
9526
9555
  }
9527
9556
  if (!validateSplit(rowState)) {
@@ -9547,7 +9576,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9547
9576
  }))
9548
9577
  }
9549
9578
  );
9550
- close();
9579
+ close2();
9551
9580
  });
9552
9581
  const fetchMemos = () => __async(void 0, null, function* () {
9553
9582
  const getBankTransactionMetadata2 = Layer.getBankTransactionMetadata(
@@ -9561,8 +9590,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9561
9590
  }
9562
9591
  );
9563
9592
  const result = yield getBankTransactionMetadata2();
9564
- if (result.data.memo)
9565
- setMemoText(result.data.memo);
9593
+ if (result.data.memo) setMemoText(result.data.memo);
9566
9594
  });
9567
9595
  useImperativeHandle2(ref, () => ({
9568
9596
  save
@@ -9576,7 +9604,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9576
9604
  return;
9577
9605
  }
9578
9606
  yield matchBankTransaction2(bankTransaction.id, foundMatch.id);
9579
- close();
9607
+ close2();
9580
9608
  });
9581
9609
  const getDivHeight = useCallback3(() => {
9582
9610
  const { height: height2 } = bodyRef.current ? bodyRef.current.getBoundingClientRect() : { height: void 0 };
@@ -9612,8 +9640,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9612
9640
  }, [getDivHeight, isOpen]);
9613
9641
  useEffect13(() => {
9614
9642
  const loadDocumentsAndMetadata = () => __async(void 0, null, function* () {
9615
- if (showDescriptions && isOpen)
9616
- yield fetchMemos();
9643
+ if (showDescriptions && isOpen) yield fetchMemos();
9617
9644
  setIsLoaded(true);
9618
9645
  setOver(true);
9619
9646
  });
@@ -9661,7 +9688,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9661
9688
  /* @__PURE__ */ jsx115(
9662
9689
  "div",
9663
9690
  {
9664
- className: classNames40(
9691
+ className: classNames41(
9665
9692
  `${className}__match`,
9666
9693
  `${className}__content-panel`,
9667
9694
  purpose === "match" /* match */ ? `${className}__content-panel--active` : ""
@@ -9685,7 +9712,7 @@ var ExpandedBankTransactionRow = forwardRef10(
9685
9712
  /* @__PURE__ */ jsx115(
9686
9713
  "div",
9687
9714
  {
9688
- className: classNames40(
9715
+ className: classNames41(
9689
9716
  `${className}__splits`,
9690
9717
  `${className}__content-panel`,
9691
9718
  purpose === "categorize" /* categorize */ ? `${className}__content-panel--active` : ""
@@ -9879,7 +9906,7 @@ var SplitTooltipDetails = ({
9879
9906
  };
9880
9907
 
9881
9908
  // src/components/BankTransactionRow/BankTransactionRow.tsx
9882
- import classNames41 from "classnames";
9909
+ import classNames42 from "classnames";
9883
9910
  import { parseISO as parseISO9, format as formatTime6 } from "date-fns";
9884
9911
  import { Fragment as Fragment16, jsx as jsx118, jsxs as jsxs74 } from "react/jsx-runtime";
9885
9912
  var extractDescriptionForSplit = (category) => {
@@ -9993,7 +10020,7 @@ var BankTransactionRow = ({
9993
10020
  const categorized = isCategorized(bankTransaction);
9994
10021
  const className = "Layer__bank-transaction-row";
9995
10022
  const openClassName = open ? `${className}--expanded` : "";
9996
- const rowClassName = classNames41(
10023
+ const rowClassName = classNames42(
9997
10024
  className,
9998
10025
  bankTransaction.recently_categorized && editable && shouldHideAfterCategorize(bankTransaction) ? "Layer__bank-transaction-row--removing" : "",
9999
10026
  open ? openClassName : "",
@@ -10071,7 +10098,7 @@ var BankTransactionRow = ({
10071
10098
  /* @__PURE__ */ jsx118(
10072
10099
  "td",
10073
10100
  {
10074
- className: classNames41(
10101
+ className: classNames42(
10075
10102
  "Layer__table-cell",
10076
10103
  "Layer__table-cell__category-col",
10077
10104
  `${className}__actions-cell`,
@@ -10253,7 +10280,7 @@ var Assignment = ({ bankTransaction }) => {
10253
10280
  };
10254
10281
 
10255
10282
  // src/components/BankTransactionList/BankTransactionListItem.tsx
10256
- import classNames42 from "classnames";
10283
+ import classNames43 from "classnames";
10257
10284
  import { parseISO as parseISO11, format as formatTime8 } from "date-fns";
10258
10285
  import { jsx as jsx120, jsxs as jsxs76 } from "react/jsx-runtime";
10259
10286
  var BankTransactionListItem = ({
@@ -10324,7 +10351,7 @@ var BankTransactionListItem = ({
10324
10351
  const categorized = isCategorized(bankTransaction);
10325
10352
  const className = "Layer__bank-transaction-list-item";
10326
10353
  const openClassName = open ? `${className}--expanded` : "";
10327
- const rowClassName = classNames42(
10354
+ const rowClassName = classNames43(
10328
10355
  className,
10329
10356
  bankTransaction.recently_categorized && editable && shouldHideAfterCategorize(bankTransaction) ? "Layer__bank-transaction-row--removing" : "",
10330
10357
  open ? openClassName : "",
@@ -10535,8 +10562,7 @@ var useMemoText = ({ bankTransaction, isActive }) => {
10535
10562
  }
10536
10563
  );
10537
10564
  const result = yield getBankTransactionMetadata2();
10538
- if (result.data.memo)
10539
- setMemoText(result.data.memo);
10565
+ if (result.data.memo) setMemoText(result.data.memo);
10540
10566
  } catch (error) {
10541
10567
  console.error(error);
10542
10568
  }
@@ -10574,7 +10600,7 @@ var MemoTextProvider = ({
10574
10600
  };
10575
10601
 
10576
10602
  // src/components/BankTransactionMobileList/BusinessForm.tsx
10577
- import classNames43 from "classnames";
10603
+ import classNames44 from "classnames";
10578
10604
  import { jsx as jsx124, jsxs as jsxs77 } from "react/jsx-runtime";
10579
10605
  var BusinessForm = ({
10580
10606
  bankTransaction,
@@ -10584,7 +10610,7 @@ var BusinessForm = ({
10584
10610
  showDescriptions
10585
10611
  }) => {
10586
10612
  const receiptsRef = useRef12(null);
10587
- const { setContent, close } = useContext20(DrawerContext);
10613
+ const { setContent, close: close2 } = useContext20(DrawerContext);
10588
10614
  const { categorize: categorizeBankTransaction2, isLoading } = useBankTransactionsContext();
10589
10615
  const [selectedCategory, setSelectedCategory] = useState26(
10590
10616
  getAssignedValue(bankTransaction)
@@ -10618,7 +10644,7 @@ var BusinessForm = ({
10618
10644
  return options2;
10619
10645
  }, [bankTransaction, selectedCategory]);
10620
10646
  const onDrawerCategorySelect = (value) => {
10621
- close();
10647
+ close2();
10622
10648
  setSelectedCategory(value);
10623
10649
  };
10624
10650
  const openDrawer = () => {
@@ -10708,7 +10734,7 @@ var BusinessForm = ({
10708
10734
  /* @__PURE__ */ jsx124(
10709
10735
  "div",
10710
10736
  {
10711
- className: classNames43(
10737
+ className: classNames44(
10712
10738
  "Layer__bank-transaction-mobile-list-item__receipts",
10713
10739
  hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
10714
10740
  ),
@@ -10770,7 +10796,7 @@ var PersonalCategories = /* @__PURE__ */ ((PersonalCategories2) => {
10770
10796
  })(PersonalCategories || {});
10771
10797
 
10772
10798
  // src/components/BankTransactionMobileList/PersonalForm.tsx
10773
- import classNames44 from "classnames";
10799
+ import classNames45 from "classnames";
10774
10800
  import { jsx as jsx125, jsxs as jsxs78 } from "react/jsx-runtime";
10775
10801
  var isAlreadyAssigned = (bankTransaction) => {
10776
10802
  if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ || (bankTransaction == null ? void 0 : bankTransaction.categorization_status) === "SPLIT" /* SPLIT */) {
@@ -10843,7 +10869,7 @@ var PersonalForm = ({
10843
10869
  /* @__PURE__ */ jsx125(
10844
10870
  "div",
10845
10871
  {
10846
- className: classNames44(
10872
+ className: classNames45(
10847
10873
  "Layer__bank-transaction-mobile-list-item__receipts",
10848
10874
  hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
10849
10875
  ),
@@ -10890,7 +10916,7 @@ import { useState as useState30 } from "react";
10890
10916
 
10891
10917
  // src/components/BankTransactionMobileList/MatchForm.tsx
10892
10918
  import { useEffect as useEffect19, useRef as useRef14, useState as useState28 } from "react";
10893
- import classNames45 from "classnames";
10919
+ import classNames46 from "classnames";
10894
10920
  import { jsx as jsx126, jsxs as jsxs79 } from "react/jsx-runtime";
10895
10921
  var MatchForm2 = ({
10896
10922
  bankTransaction,
@@ -10977,7 +11003,7 @@ var MatchForm2 = ({
10977
11003
  /* @__PURE__ */ jsx126(
10978
11004
  "div",
10979
11005
  {
10980
- className: classNames45(
11006
+ className: classNames46(
10981
11007
  "Layer__bank-transaction-mobile-list-item__receipts",
10982
11008
  hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
10983
11009
  ),
@@ -11022,7 +11048,7 @@ var MatchForm2 = ({
11022
11048
 
11023
11049
  // src/components/BankTransactionMobileList/SplitForm.tsx
11024
11050
  import { useEffect as useEffect20, useRef as useRef15, useState as useState29 } from "react";
11025
- import classNames46 from "classnames";
11051
+ import classNames47 from "classnames";
11026
11052
  import { Fragment as Fragment18, jsx as jsx127, jsxs as jsxs80 } from "react/jsx-runtime";
11027
11053
  var SplitForm = ({
11028
11054
  bankTransaction,
@@ -11199,7 +11225,7 @@ var SplitForm = ({
11199
11225
  {
11200
11226
  type: "text",
11201
11227
  name: `split-${index}`,
11202
- className: classNames46(
11228
+ className: classNames47(
11203
11229
  "Layer__split-amount-input",
11204
11230
  index === 0 && "Layer__split-amount-input--first"
11205
11231
  ),
@@ -11266,7 +11292,7 @@ var SplitForm = ({
11266
11292
  /* @__PURE__ */ jsx127(
11267
11293
  "div",
11268
11294
  {
11269
- className: classNames46(
11295
+ className: classNames47(
11270
11296
  "Layer__bank-transaction-mobile-list-item__receipts",
11271
11297
  hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
11272
11298
  ),
@@ -11415,7 +11441,7 @@ var TransactionToOpenContext = createContext13({
11415
11441
  });
11416
11442
 
11417
11443
  // src/components/BankTransactionMobileList/BankTransactionMobileListItem.tsx
11418
- import classNames47 from "classnames";
11444
+ import classNames48 from "classnames";
11419
11445
  import { parseISO as parseISO12, format as formatTime9 } from "date-fns";
11420
11446
  import { jsx as jsx130, jsxs as jsxs82 } from "react/jsx-runtime";
11421
11447
  var DATE_FORMAT2 = "LLL d";
@@ -11484,7 +11510,7 @@ var BankTransactionMobileListItem = ({
11484
11510
  setRemoveAnim(true);
11485
11511
  openNext();
11486
11512
  } else {
11487
- close();
11513
+ close2();
11488
11514
  }
11489
11515
  }
11490
11516
  }, [
@@ -11498,7 +11524,7 @@ var BankTransactionMobileListItem = ({
11498
11524
  }
11499
11525
  setOpen(!open);
11500
11526
  };
11501
- const close = () => {
11527
+ const close2 = () => {
11502
11528
  setOpen(false);
11503
11529
  setHeight(0);
11504
11530
  };
@@ -11525,7 +11551,7 @@ var BankTransactionMobileListItem = ({
11525
11551
  const categorized = isCategorized(bankTransaction);
11526
11552
  const className = "Layer__bank-transaction-mobile-list-item";
11527
11553
  const openClassName = open ? `${className}--expanded` : "";
11528
- const rowClassName = classNames47(
11554
+ const rowClassName = classNames48(
11529
11555
  className,
11530
11556
  removeAnim ? "Layer__bank-transaction-row--removing" : "",
11531
11557
  open ? openClassName : "",
@@ -11603,7 +11629,7 @@ var BankTransactionMobileListItem = ({
11603
11629
  onChange: onChangePurpose
11604
11630
  }
11605
11631
  ),
11606
- /* @__PURE__ */ jsx130(CloseButton, { onClick: () => close() })
11632
+ /* @__PURE__ */ jsx130(CloseButton, { onClick: () => close2() })
11607
11633
  ] }) : null,
11608
11634
  /* @__PURE__ */ jsx130(
11609
11635
  BankTransactionMobileForms,
@@ -11660,14 +11686,14 @@ var BankTransactionMobileList = ({
11660
11686
  import { useMemo as useMemo16 } from "react";
11661
11687
 
11662
11688
  // src/components/SkeletonLoader/SkeletonLoader.tsx
11663
- import classNames48 from "classnames";
11689
+ import classNames49 from "classnames";
11664
11690
  import { jsx as jsx132 } from "react/jsx-runtime";
11665
11691
  var SkeletonLoader = ({
11666
11692
  height,
11667
11693
  width,
11668
11694
  className
11669
11695
  }) => {
11670
- const baseClassName = classNames48(
11696
+ const baseClassName = classNames49(
11671
11697
  "Layer__skeleton-loader Layer__anim--skeleton-loading",
11672
11698
  className
11673
11699
  );
@@ -11767,7 +11793,7 @@ var BankTransactionsLoader = ({
11767
11793
  };
11768
11794
 
11769
11795
  // src/components/SyncingComponent/SyncingComponent.tsx
11770
- import classNames49 from "classnames";
11796
+ import classNames50 from "classnames";
11771
11797
  import { jsx as jsx135, jsxs as jsxs84 } from "react/jsx-runtime";
11772
11798
  var SyncingComponent = ({
11773
11799
  title = "Syncing account data",
@@ -11789,7 +11815,7 @@ var SyncingComponent = ({
11789
11815
  return /* @__PURE__ */ jsxs84(
11790
11816
  "div",
11791
11817
  {
11792
- className: classNames49(
11818
+ className: classNames50(
11793
11819
  "Layer__syncing-component",
11794
11820
  inProgress ? "Layer__syncing-component--with-border" : ""
11795
11821
  ),
@@ -12084,7 +12110,7 @@ var PaginationContent = ({
12084
12110
 
12085
12111
  // src/components/BankTransactions/BankTransactionsHeader.tsx
12086
12112
  import { useState as useState33 } from "react";
12087
- import classNames50 from "classnames";
12113
+ import classNames51 from "classnames";
12088
12114
  import { endOfMonth as endOfMonth5, startOfMonth as startOfMonth5 } from "date-fns";
12089
12115
  import { jsx as jsx140, jsxs as jsxs87 } from "react/jsx-runtime";
12090
12116
  var DownloadButton2 = ({
@@ -12154,7 +12180,7 @@ var BankTransactionsHeader = ({
12154
12180
  return /* @__PURE__ */ jsxs87(
12155
12181
  Header,
12156
12182
  {
12157
- className: classNames50(
12183
+ className: classNames51(
12158
12184
  "Layer__bank-transactions__header",
12159
12185
  withDatePicker && "Layer__bank-transactions__header--with-date-picker",
12160
12186
  mobileComponent && listView ? "Layer__bank-transactions__header--mobile" : void 0
@@ -13140,25 +13166,36 @@ function prepareFiltersBody(compareOptions) {
13140
13166
  const noneFilters = compareOptions.filter(
13141
13167
  ({ tagFilterConfig: { tagFilters: tagFilters2 } }) => tagFilters2 === "None"
13142
13168
  );
13143
- const tagFilters = compareOptions.flatMap(({ tagFilterConfig: { tagFilters: tagFilters2 } }) => {
13169
+ const tagFilters = compareOptions.flatMap(({ tagFilterConfig: { tagFilters: tagFilters2, structure } }) => {
13144
13170
  if (tagFilters2 === "None") {
13145
13171
  return null;
13146
13172
  }
13147
13173
  if (tagFilters2.tagValues.length === 0) {
13148
- return { required_tags: [] };
13149
- }
13150
- return tagFilters2.tagValues.map((tagValue) => ({
13151
- required_tags: [{
13152
- key: tagFilters2.tagKey,
13153
- value: tagValue
13154
- }]
13155
- }));
13174
+ const filter = {
13175
+ structure,
13176
+ required_tags: []
13177
+ };
13178
+ return filter;
13179
+ }
13180
+ return tagFilters2.tagValues.map((tagValue) => {
13181
+ const filter = {
13182
+ structure,
13183
+ required_tags: [{
13184
+ key: tagFilters2.tagKey,
13185
+ value: tagValue
13186
+ }]
13187
+ };
13188
+ return filter;
13189
+ });
13156
13190
  }).filter((item) => item !== null);
13157
13191
  if (tagFilters.length === 0) {
13158
13192
  return;
13159
13193
  }
13160
13194
  const allFilters = [
13161
- noneFilters.length > 0 ? { required_tags: [] } : null,
13195
+ noneFilters.length > 0 ? {
13196
+ structure: noneFilters[0].tagFilterConfig.structure,
13197
+ required_tags: []
13198
+ } : null,
13162
13199
  ...tagFilters
13163
13200
  ].filter((item) => item !== null);
13164
13201
  return isArrayWithAtLeastOne(allFilters) ? allFilters : void 0;
@@ -13466,7 +13503,7 @@ var Indicator = ({
13466
13503
  };
13467
13504
 
13468
13505
  // src/components/ProfitAndLossChart/ProfitAndLossChart.tsx
13469
- import classNames51 from "classnames";
13506
+ import classNames52 from "classnames";
13470
13507
  import {
13471
13508
  add,
13472
13509
  differenceInMonths as differenceInMonths2,
@@ -13894,7 +13931,7 @@ var ProfitAndLossChart = ({
13894
13931
  /* @__PURE__ */ jsx148(
13895
13932
  ResponsiveContainer,
13896
13933
  {
13897
- className: classNames51(
13934
+ className: classNames52(
13898
13935
  "Layer__chart-container",
13899
13936
  loaded !== "complete" && "Layer__chart-container--loading"
13900
13937
  ),
@@ -14014,7 +14051,7 @@ var ProfitAndLossChart = ({
14014
14051
  isAnimationActive: barAnimActive,
14015
14052
  animationDuration: 100,
14016
14053
  radius: [2, 2, 0, 0],
14017
- className: classNames51(
14054
+ className: classNames52(
14018
14055
  "Layer__profit-and-loss-chart__bar--loading",
14019
14056
  loaded !== "complete" && "Layer__profit-and-loss-chart__bar--loading-anim"
14020
14057
  ),
@@ -14030,7 +14067,7 @@ var ProfitAndLossChart = ({
14030
14067
  isAnimationActive: barAnimActive,
14031
14068
  animationDuration: 100,
14032
14069
  radius: [2, 2, 0, 0],
14033
- className: classNames51(
14070
+ className: classNames52(
14034
14071
  "Layer__profit-and-loss-chart__bar--loading",
14035
14072
  loaded !== "complete" && "Layer__profit-and-loss-chart__bar--loading-anim"
14036
14073
  ),
@@ -14587,7 +14624,7 @@ var SortArrows = (_a) => {
14587
14624
  var SortArrows_default = SortArrows;
14588
14625
 
14589
14626
  // src/components/ProfitAndLossDetailedCharts/DetailedTable.tsx
14590
- import classNames52 from "classnames";
14627
+ import classNames53 from "classnames";
14591
14628
  import { jsx as jsx154, jsxs as jsxs98 } from "react/jsx-runtime";
14592
14629
  var mapTypesToColors = (data, colorList = DEFAULT_CHART_COLOR_TYPE) => {
14593
14630
  const typeToColor = {};
@@ -14681,7 +14718,7 @@ var DetailedTable = ({
14681
14718
  }) => {
14682
14719
  const buildColClass = (column) => {
14683
14720
  var _a, _b, _c;
14684
- return classNames52(
14721
+ return classNames53(
14685
14722
  "Layer__sortable-col",
14686
14723
  sidebarScope && ((_a = filters[sidebarScope]) == null ? void 0 : _a.sortBy) === column ? `sort--${(_c = sidebarScope && ((_b = filters[sidebarScope]) == null ? void 0 : _b.sortDirection)) != null ? _c : "desc"}` : ""
14687
14724
  );
@@ -14733,7 +14770,7 @@ var DetailedTable = ({
14733
14770
  return /* @__PURE__ */ jsxs98(
14734
14771
  "tr",
14735
14772
  {
14736
- className: classNames52(
14773
+ className: classNames53(
14737
14774
  "Layer__profit-and-loss-detailed-table__row",
14738
14775
  hoveredItem && hoveredItem === item.display_name ? "active" : ""
14739
14776
  ),
@@ -14766,7 +14803,7 @@ var DetailedTable = ({
14766
14803
  };
14767
14804
 
14768
14805
  // src/components/ProfitAndLossDetailedCharts/DetailedChart.tsx
14769
- import classNames53 from "classnames";
14806
+ import classNames54 from "classnames";
14770
14807
  import {
14771
14808
  PieChart,
14772
14809
  Pie,
@@ -14867,7 +14904,7 @@ var DetailedChart = ({
14867
14904
  return /* @__PURE__ */ jsx155(
14868
14905
  Cell2,
14869
14906
  {
14870
- className: classNames53(
14907
+ className: classNames54(
14871
14908
  "Layer__profit-and-loss-detailed-charts__pie",
14872
14909
  hoveredItem && active ? "active" : "inactive",
14873
14910
  entry.type === "Uncategorized" && "Layer__profit-and-loss-detailed-charts__pie--border"
@@ -15335,11 +15372,11 @@ import { useContext as useContext25 } from "react";
15335
15372
  import {
15336
15373
  forwardRef as forwardRef11
15337
15374
  } from "react";
15338
- import classNames54 from "classnames";
15375
+ import classNames55 from "classnames";
15339
15376
  import { jsx as jsx161 } from "react/jsx-runtime";
15340
15377
  var Header2 = forwardRef11(
15341
15378
  ({ className, children, style, sticky, asHeader, rounded }, ref) => {
15342
- const baseClassName = classNames54(
15379
+ const baseClassName = classNames55(
15343
15380
  "Layer__header",
15344
15381
  sticky && "Layer__header--sticky",
15345
15382
  rounded && "Layer__header--top-rounded",
@@ -15362,24 +15399,24 @@ var Header2 = forwardRef11(
15362
15399
  Header2.displayName = "Header";
15363
15400
 
15364
15401
  // src/components/Header/HeaderRow.tsx
15365
- import classNames55 from "classnames";
15402
+ import classNames56 from "classnames";
15366
15403
  import { jsx as jsx162 } from "react/jsx-runtime";
15367
15404
  var HeaderRow = ({ className, children, direction, style }) => {
15368
15405
  const dataProps = toDataProperties({ direction });
15369
- return /* @__PURE__ */ jsx162("div", __spreadProps(__spreadValues({}, dataProps), { className: classNames55("Layer__header__row", className), style, children }));
15406
+ return /* @__PURE__ */ jsx162("div", __spreadProps(__spreadValues({}, dataProps), { className: classNames56("Layer__header__row", className), style, children }));
15370
15407
  };
15371
15408
 
15372
15409
  // src/components/Header/HeaderCol.tsx
15373
- import classNames56 from "classnames";
15410
+ import classNames57 from "classnames";
15374
15411
  import { jsx as jsx163 } from "react/jsx-runtime";
15375
15412
  var HeaderCol = ({ className, children, style, noPadding = false }) => {
15376
15413
  const dataProperties = toDataProperties({ "no-padding": noPadding });
15377
- return /* @__PURE__ */ jsx163("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames56("Layer__header__col", className), style, children }));
15414
+ return /* @__PURE__ */ jsx163("div", __spreadProps(__spreadValues({}, dataProperties), { className: classNames57("Layer__header__col", className), style, children }));
15378
15415
  };
15379
15416
 
15380
15417
  // src/components/Panel/Panel.tsx
15381
15418
  import { useEffect as useEffect28, useState as useState43 } from "react";
15382
- import classNames57 from "classnames";
15419
+ import classNames58 from "classnames";
15383
15420
  import { jsx as jsx164, jsxs as jsxs103 } from "react/jsx-runtime";
15384
15421
  var Panel = ({
15385
15422
  children,
@@ -15399,7 +15436,7 @@ var Panel = ({
15399
15436
  setSidebarHeight((_b = parentRef == null ? void 0 : parentRef.current) == null ? void 0 : _b.offsetHeight);
15400
15437
  }
15401
15438
  }, [parentRef, (_a = parentRef == null ? void 0 : parentRef.current) == null ? void 0 : _a.offsetHeight, sidebarIsOpen]);
15402
- const sidebarClass = classNames57(
15439
+ const sidebarClass = classNames58(
15403
15440
  "Layer__panel__sidebar",
15404
15441
  defaultSidebarHeight && "Layer__panel__sidebar--default",
15405
15442
  floating && "Layer__panel__sidebar--floating"
@@ -15407,7 +15444,7 @@ var Panel = ({
15407
15444
  return /* @__PURE__ */ jsxs103(
15408
15445
  "div",
15409
15446
  {
15410
- className: classNames57(
15447
+ className: classNames58(
15411
15448
  "Layer__panel",
15412
15449
  className,
15413
15450
  sidebarIsOpen && "Layer__panel--open"
@@ -15436,17 +15473,17 @@ var Panel = ({
15436
15473
  import { forwardRef as forwardRef12 } from "react";
15437
15474
 
15438
15475
  // src/components/ViewHeader/ViewHeader.tsx
15439
- import classNames58 from "classnames";
15476
+ import classNames59 from "classnames";
15440
15477
  import { jsx as jsx165, jsxs as jsxs104 } from "react/jsx-runtime";
15441
15478
  var ViewHeader = ({ title, className, children }) => {
15442
- return /* @__PURE__ */ jsx165("div", { className: classNames58("Layer__view-header", className), children: /* @__PURE__ */ jsxs104("div", { className: "Layer__view-header__content", children: [
15479
+ return /* @__PURE__ */ jsx165("div", { className: classNames59("Layer__view-header", className), children: /* @__PURE__ */ jsxs104("div", { className: "Layer__view-header__content", children: [
15443
15480
  title && /* @__PURE__ */ jsx165(Heading, { className: "Layer__view-header__title", children: title }),
15444
15481
  children && /* @__PURE__ */ jsx165("div", { className: "Layer__view-header__children", children })
15445
15482
  ] }) });
15446
15483
  };
15447
15484
 
15448
15485
  // src/components/View/View.tsx
15449
- import classNames59 from "classnames";
15486
+ import classNames60 from "classnames";
15450
15487
  import { jsx as jsx166, jsxs as jsxs105 } from "react/jsx-runtime";
15451
15488
  var View = forwardRef12(
15452
15489
  ({
@@ -15462,7 +15499,7 @@ var View = forwardRef12(
15462
15499
  }, ref) => {
15463
15500
  const { theme } = useLayerContext();
15464
15501
  const styles = parseStylesFromThemeConfig(theme);
15465
- const viewClassNames = classNames59(
15502
+ const viewClassNames = classNames60(
15466
15503
  "Layer__view",
15467
15504
  type === "panel" && "Layer__view--panel",
15468
15505
  viewClassName
@@ -15472,7 +15509,7 @@ var View = forwardRef12(
15472
15509
  ViewHeader,
15473
15510
  {
15474
15511
  title,
15475
- className: classNames59(
15512
+ className: classNames60(
15476
15513
  headerControls ? "Layer__view-header--paddings" : void 0
15477
15514
  ),
15478
15515
  children: header != null ? header : headerControls
@@ -15981,7 +16018,7 @@ var TableBody = ({ children }) => {
15981
16018
  };
15982
16019
 
15983
16020
  // src/components/TableCell/TableCell.tsx
15984
- import classNames60 from "classnames";
16021
+ import classNames61 from "classnames";
15985
16022
  import { jsx as jsx176, jsxs as jsxs109 } from "react/jsx-runtime";
15986
16023
  var TableCell = ({
15987
16024
  children,
@@ -16001,7 +16038,7 @@ var TableCell = ({
16001
16038
  const amount = typeof children === "number" ? children : 0;
16002
16039
  const isPositive = amount >= 0;
16003
16040
  const amountString = centsToDollars(Math.abs(amount));
16004
- const cellClassNames = classNames60(
16041
+ const cellClassNames = classNames61(
16005
16042
  "Layer__table-cell",
16006
16043
  (primary || isHeaderCell) && "Layer__table-cell--primary",
16007
16044
  isHeaderCell && "Layer__table-header",
@@ -16044,7 +16081,7 @@ var TableHead = ({ children }) => {
16044
16081
  };
16045
16082
 
16046
16083
  // src/components/TableRow/TableRow.tsx
16047
- import classNames61 from "classnames";
16084
+ import classNames62 from "classnames";
16048
16085
  import { Fragment as Fragment21, jsx as jsx178, jsxs as jsxs110 } from "react/jsx-runtime";
16049
16086
  var TableRow = ({
16050
16087
  rowKey,
@@ -16064,12 +16101,11 @@ var TableRow = ({
16064
16101
  if (onClick) {
16065
16102
  onClick(e);
16066
16103
  } else {
16067
- if (variant === "summation" || !expandable)
16068
- return;
16104
+ if (variant === "summation" || !expandable) return;
16069
16105
  handleExpand && handleExpand();
16070
16106
  }
16071
16107
  };
16072
- const rowClassNames = classNames61([
16108
+ const rowClassNames = classNames62([
16073
16109
  "Layer__table-row",
16074
16110
  !isHeadRow && `Layer__table-row--depth-${depth}`,
16075
16111
  !isHeadRow && `Layer__table-row--variant-${variant}`,
@@ -16093,7 +16129,7 @@ var TableRow = ({
16093
16129
 
16094
16130
  // src/components/Table/Table.tsx
16095
16131
  import { useEffect as useEffect29, useRef as useRef19 } from "react";
16096
- import classNames62 from "classnames";
16132
+ import classNames63 from "classnames";
16097
16133
  import { jsx as jsx179 } from "react/jsx-runtime";
16098
16134
  var Table = ({
16099
16135
  componentName,
@@ -16134,11 +16170,11 @@ var Table = ({
16134
16170
  prevChildrenRef.current = newChildrenKeys;
16135
16171
  }
16136
16172
  }, [children]);
16137
- const tableWrapperClassNames = classNames62(
16173
+ const tableWrapperClassNames = classNames63(
16138
16174
  "Layer__table-wrapper",
16139
16175
  bottomSpacing && "Layer__table-wrapper--bottom-spacing"
16140
16176
  );
16141
- const tableClassNames = classNames62(
16177
+ const tableClassNames = classNames63(
16142
16178
  "Layer__table",
16143
16179
  componentName && `Layer__${componentName}__table`,
16144
16180
  borderCollapse && `Layer__table__${borderCollapse}-rows`
@@ -16147,7 +16183,7 @@ var Table = ({
16147
16183
  };
16148
16184
 
16149
16185
  // src/components/ProfitAndLossTable/ProfitAndLossCompareTable.tsx
16150
- import classNames63 from "classnames";
16186
+ import classNames64 from "classnames";
16151
16187
  import { Fragment as Fragment23, jsx as jsx180, jsxs as jsxs111 } from "react/jsx-runtime";
16152
16188
  var ProfitAndLossCompareTable = ({
16153
16189
  stringOverrides
@@ -16168,7 +16204,7 @@ var ProfitAndLossCompareTable = ({
16168
16204
  return /* @__PURE__ */ jsx180(
16169
16205
  "div",
16170
16206
  {
16171
- className: classNames63("Layer__profit-and-loss-table__loader-container"),
16207
+ className: classNames64("Layer__profit-and-loss-table__loader-container"),
16172
16208
  children: /* @__PURE__ */ jsx180(Loader2, {})
16173
16209
  }
16174
16210
  );
@@ -16358,7 +16394,7 @@ var empty_profit_and_loss_report_default = {
16358
16394
  };
16359
16395
 
16360
16396
  // src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
16361
- import classNames64 from "classnames";
16397
+ import classNames65 from "classnames";
16362
16398
  import { jsx as jsx182, jsxs as jsxs113 } from "react/jsx-runtime";
16363
16399
  var ProfitAndLossTableComponent = ({
16364
16400
  asContainer,
@@ -16379,7 +16415,7 @@ var ProfitAndLossTableComponent = ({
16379
16415
  return /* @__PURE__ */ jsx182(
16380
16416
  "div",
16381
16417
  {
16382
- className: classNames64(
16418
+ className: classNames65(
16383
16419
  "Layer__profit-and-loss-table__loader-container",
16384
16420
  asContainer && "Layer__component-container"
16385
16421
  ),
@@ -18697,10 +18733,10 @@ var lineEntryNumber = (ledgerEntryLine) => {
18697
18733
  };
18698
18734
 
18699
18735
  // src/components/Card/Card.tsx
18700
- import classNames65 from "classnames";
18736
+ import classNames66 from "classnames";
18701
18737
  import { jsx as jsx203 } from "react/jsx-runtime";
18702
18738
  var Card = ({ children, className }) => {
18703
- return /* @__PURE__ */ jsx203("div", { className: classNames65("Layer__card", className), children });
18739
+ return /* @__PURE__ */ jsx203("div", { className: classNames66("Layer__card", className), children });
18704
18740
  };
18705
18741
 
18706
18742
  // src/components/DateTime/DateTime.tsx
@@ -18744,7 +18780,7 @@ var DateTime = ({
18744
18780
  };
18745
18781
 
18746
18782
  // src/components/DetailsList/DetailsList.tsx
18747
- import classNames66 from "classnames";
18783
+ import classNames67 from "classnames";
18748
18784
  import { jsx as jsx205, jsxs as jsxs126 } from "react/jsx-runtime";
18749
18785
  var DetailsList = ({
18750
18786
  title,
@@ -18753,7 +18789,7 @@ var DetailsList = ({
18753
18789
  titleClassName,
18754
18790
  actions
18755
18791
  }) => {
18756
- return /* @__PURE__ */ jsxs126("div", { className: classNames66("Layer__details-list", className), children: [
18792
+ return /* @__PURE__ */ jsxs126("div", { className: classNames67("Layer__details-list", className), children: [
18757
18793
  title && /* @__PURE__ */ jsxs126(Header, { className: titleClassName, children: [
18758
18794
  /* @__PURE__ */ jsx205(Heading, { size: "secondary" /* secondary */, children: title }),
18759
18795
  actions && /* @__PURE__ */ jsx205("div", { className: "Layer__details-list__actions", children: actions })
@@ -19068,7 +19104,7 @@ var LedgerAccountEntryDetails = ({
19068
19104
 
19069
19105
  // src/components/LedgerAccount/LedgerAccountRow.tsx
19070
19106
  import { useContext as useContext36, useEffect as useEffect36, useState as useState50 } from "react";
19071
- import classNames67 from "classnames";
19107
+ import classNames68 from "classnames";
19072
19108
  import { parseISO as parseISO14, format as formatTime11 } from "date-fns";
19073
19109
  import { jsx as jsx208, jsxs as jsxs129 } from "react/jsx-runtime";
19074
19110
  var LedgerAccountRow = ({
@@ -19094,7 +19130,7 @@ var LedgerAccountRow = ({
19094
19130
  return /* @__PURE__ */ jsxs129(
19095
19131
  "tr",
19096
19132
  {
19097
- className: classNames67(
19133
+ className: classNames68(
19098
19134
  "Layer__table-row",
19099
19135
  row.entry_id === selectedEntryId && "Layer__table-row--active",
19100
19136
  initialLoad && "initial-load",
@@ -19135,7 +19171,7 @@ var LedgerAccountRow = ({
19135
19171
  return /* @__PURE__ */ jsx208(
19136
19172
  "tr",
19137
19173
  {
19138
- className: classNames67(
19174
+ className: classNames68(
19139
19175
  "Layer__table-row",
19140
19176
  row.entry_id === selectedEntryId && "Layer__table-row--active",
19141
19177
  initialLoad && "initial-load",
@@ -19187,7 +19223,7 @@ var LedgerAccountRow = ({
19187
19223
  return /* @__PURE__ */ jsxs129(
19188
19224
  "tr",
19189
19225
  {
19190
- className: classNames67(
19226
+ className: classNames68(
19191
19227
  "Layer__table-row",
19192
19228
  row.entry_id === selectedEntryId && "Layer__table-row--active",
19193
19229
  initialLoad && "initial-load",
@@ -19215,7 +19251,7 @@ var LedgerAccountRow = ({
19215
19251
  };
19216
19252
 
19217
19253
  // src/components/LedgerAccount/LedgerAccountIndex.tsx
19218
- import classNames68 from "classnames";
19254
+ import classNames69 from "classnames";
19219
19255
  import { Fragment as Fragment32, jsx as jsx209, jsxs as jsxs130 } from "react/jsx-runtime";
19220
19256
  var LedgerAccount = ({
19221
19257
  containerRef,
@@ -19246,7 +19282,7 @@ var LedgerAccount = ({
19246
19282
  return () => clearTimeout(timeoutLoad);
19247
19283
  }
19248
19284
  }, [isLoading]);
19249
- const baseClassName = classNames68(
19285
+ const baseClassName = classNames69(
19250
19286
  "Layer__ledger-account__index",
19251
19287
  accountId && "open"
19252
19288
  );
@@ -19261,7 +19297,7 @@ var LedgerAccount = ({
19261
19297
  const lastPageIndex = firstPageIndex + pageSize;
19262
19298
  return (_a2 = rawData == null ? void 0 : rawData.sort((a, b) => Date.parse(b.date) - Date.parse(a.date))) == null ? void 0 : _a2.slice(firstPageIndex, lastPageIndex);
19263
19299
  }, [rawData, currentPage]);
19264
- const close = () => {
19300
+ const close2 = () => {
19265
19301
  setAccountId(void 0);
19266
19302
  closeSelectedEntry();
19267
19303
  };
@@ -19279,7 +19315,7 @@ var LedgerAccount = ({
19279
19315
  className: "Layer__ledger-account__panel",
19280
19316
  children: /* @__PURE__ */ jsxs130("div", { className: baseClassName, children: [
19281
19317
  /* @__PURE__ */ jsx209(Header2, { className: "Layer__ledger-account__header", children: /* @__PURE__ */ jsx209(HeaderRow, { children: /* @__PURE__ */ jsxs130(HeaderCol, { children: [
19282
- /* @__PURE__ */ jsx209(BackButton, { onClick: close }),
19318
+ /* @__PURE__ */ jsx209(BackButton, { onClick: close2 }),
19283
19319
  /* @__PURE__ */ jsxs130("div", { className: "Layer__ledger-account__title-container", children: [
19284
19320
  /* @__PURE__ */ jsx209(
19285
19321
  Text,
@@ -20893,8 +20929,7 @@ var useTasks = ({
20893
20929
  }).then(refetch);
20894
20930
  });
20895
20931
  const submitResponseToTask2 = (taskId, userResponse) => {
20896
- if (!taskId || !userResponse || userResponse.length === 0)
20897
- return;
20932
+ if (!taskId || !userResponse || userResponse.length === 0) return;
20898
20933
  const data2 = {
20899
20934
  type: "FreeResponse",
20900
20935
  user_response: userResponse
@@ -21047,7 +21082,7 @@ var ProgressIcon_default = ProgressIcon;
21047
21082
 
21048
21083
  // src/components/TasksHeader/TasksHeader.tsx
21049
21084
  import { endOfYear as endOfYear6, getYear as getYear4, startOfYear as startOfYear7 } from "date-fns";
21050
- import classNames69 from "classnames";
21085
+ import classNames70 from "classnames";
21051
21086
  import { jsx as jsx220, jsxs as jsxs138 } from "react/jsx-runtime";
21052
21087
  var ICONS = {
21053
21088
  loading: {
@@ -21090,7 +21125,7 @@ var TasksHeader = ({
21090
21125
  const completedTasks = tasks == null ? void 0 : tasks.filter((task) => isComplete(task.status)).length;
21091
21126
  const badgeVariant = completedTasks === (tasks == null ? void 0 : tasks.length) ? ICONS.done : ICONS.pending;
21092
21127
  const minDate = getEarliestDateToBrowse(business);
21093
- return /* @__PURE__ */ jsx220("div", { className: classNames69("Layer__tasks-header", collapsable && "Layer__tasks-header--collapsable"), children: /* @__PURE__ */ jsxs138("div", { className: "Layer__tasks-header__left-col", children: [
21128
+ return /* @__PURE__ */ jsx220("div", { className: classNames70("Layer__tasks-header", collapsable && "Layer__tasks-header--collapsable"), children: /* @__PURE__ */ jsxs138("div", { className: "Layer__tasks-header__left-col", children: [
21094
21129
  /* @__PURE__ */ jsxs138("div", { className: "Layer__tasks-header__left-col__title", children: [
21095
21130
  /* @__PURE__ */ jsx220(Text, { size: "lg" /* lg */, children: tasksHeader }),
21096
21131
  loadedStatus !== "complete" && !open ? /* @__PURE__ */ jsx220(Badge, { variant: ICONS.loading.badge, icon: ICONS.loading.icon, children: ICONS.loading.text }) : loadedStatus === "complete" && !open && (!tasks || error) ? /* @__PURE__ */ jsx220(
@@ -21194,7 +21229,7 @@ var SmileIcon_default = SmileIcon;
21194
21229
 
21195
21230
  // src/components/TasksListItem/TasksListItem.tsx
21196
21231
  import { useContext as useContext46, useEffect as useEffect41, useMemo as useMemo37, useState as useState56 } from "react";
21197
- import classNames70 from "classnames";
21232
+ import classNames71 from "classnames";
21198
21233
  import { Fragment as Fragment36, jsx as jsx222, jsxs as jsxs140 } from "react/jsx-runtime";
21199
21234
  var TasksListItem = ({
21200
21235
  task,
@@ -21211,16 +21246,16 @@ var TasksListItem = ({
21211
21246
  deleteUploadsForTask,
21212
21247
  updateDocUploadTaskDescription
21213
21248
  } = useContext46(TasksContext);
21214
- const taskBodyClassName = classNames70(
21249
+ const taskBodyClassName = classNames71(
21215
21250
  "Layer__tasks-list-item__body",
21216
21251
  isOpen && "Layer__tasks-list-item__body--expanded",
21217
21252
  isComplete(task.status) && "Layer__tasks-list-item--completed"
21218
21253
  );
21219
- const taskHeadClassName = classNames70(
21254
+ const taskHeadClassName = classNames71(
21220
21255
  "Layer__tasks-list-item__head-info",
21221
21256
  isComplete(task.status) ? "Layer__tasks-list-item--completed" : "Layer__tasks-list-item--pending"
21222
21257
  );
21223
- const taskItemClassName = classNames70(
21258
+ const taskItemClassName = classNames71(
21224
21259
  "Layer__tasks-list-item",
21225
21260
  isOpen && "Layer__tasks-list-item__expanded"
21226
21261
  );
@@ -21429,7 +21464,7 @@ var TasksList = ({ pageSize = 10 }) => {
21429
21464
 
21430
21465
  // src/components/TasksPending/TasksPending.tsx
21431
21466
  import { useContext as useContext48, useMemo as useMemo39 } from "react";
21432
- import classNames71 from "classnames";
21467
+ import classNames72 from "classnames";
21433
21468
  import { endOfMonth as endOfMonth15, format as format4, isAfter as isAfter2, isBefore as isBefore2, parseISO as parseISO18, startOfMonth as startOfMonth17 } from "date-fns";
21434
21469
  import { Cell as Cell4, Pie as Pie3, PieChart as PieChart4 } from "recharts";
21435
21470
  import { jsx as jsx224, jsxs as jsxs142 } from "react/jsx-runtime";
@@ -21452,7 +21487,7 @@ var TasksPending = () => {
21452
21487
  value: data == null ? void 0 : data.filter((task) => !isComplete(task.status)).length
21453
21488
  }
21454
21489
  ];
21455
- const taskStatusClassName = classNames71(
21490
+ const taskStatusClassName = classNames72(
21456
21491
  completedTasks && completedTasks > 0 ? "Layer__tasks-pending-bar__status--done" : "Layer__tasks-pending-bar__status--pending"
21457
21492
  );
21458
21493
  return /* @__PURE__ */ jsxs142("div", { className: "Layer__tasks-pending", children: [
@@ -21501,11 +21536,11 @@ import { useMemo as useMemo40 } from "react";
21501
21536
  import { endOfMonth as endOfMonth16, format as format5, getMonth as getMonth3, getYear as getYear5, isAfter as isAfter3, isBefore as isBefore3, set, startOfMonth as startOfMonth18 } from "date-fns";
21502
21537
 
21503
21538
  // src/components/TasksMonthSelector/TaskMonthTile.tsx
21504
- import classNames72 from "classnames";
21539
+ import classNames73 from "classnames";
21505
21540
  import { jsx as jsx225, jsxs as jsxs143 } from "react/jsx-runtime";
21506
21541
  var TaskMonthTile = ({ monthData, onClick, active, disabled }) => {
21507
21542
  const isCompleted = monthData.total === monthData.completed;
21508
- const baseClass = classNames72(
21543
+ const baseClass = classNames73(
21509
21544
  "Layer__tasks-month-selector__month",
21510
21545
  isCompleted && "Layer__tasks-month-selector__month--completed",
21511
21546
  active && "Layer__tasks-month-selector__month--active",
@@ -21549,7 +21584,6 @@ var TasksMonthSelector = ({ tasks, year, currentDate, onClick }) => {
21549
21584
  { year, month: i, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 }
21550
21585
  );
21551
21586
  const endDate = endOfMonth16(startDate);
21552
- const disabled = minDate && isBefore3(startDate, minDate) || isAfter3(startDate, startOfMonth18(/* @__PURE__ */ new Date()));
21553
21587
  const taskData = (_a = tasks == null ? void 0 : tasks.find((x) => x.month === i && x.year === year)) != null ? _a : __spreadValues({
21554
21588
  monthStr: format5(startDate, "MMM"),
21555
21589
  year,
@@ -21557,6 +21591,7 @@ var TasksMonthSelector = ({ tasks, year, currentDate, onClick }) => {
21557
21591
  startDate,
21558
21592
  endDate
21559
21593
  }, DEFAULT_TASK_DATA);
21594
+ const disabled = taskData.total === 0 && (minDate && isBefore3(startDate, minDate) || isAfter3(startDate, startOfMonth18(/* @__PURE__ */ new Date())));
21560
21595
  return __spreadValues({
21561
21596
  monthStr: format5(startDate, "MMM"),
21562
21597
  startDate,
@@ -21580,7 +21615,7 @@ var TasksMonthSelector = ({ tasks, year, currentDate, onClick }) => {
21580
21615
  };
21581
21616
 
21582
21617
  // src/components/Tasks/Tasks.tsx
21583
- import classNames73 from "classnames";
21618
+ import classNames74 from "classnames";
21584
21619
  import { endOfYear as endOfYear7, getYear as getYear6, startOfYear as startOfYear8 } from "date-fns";
21585
21620
  import { Fragment as Fragment38, jsx as jsx227, jsxs as jsxs144 } from "react/jsx-runtime";
21586
21621
  var UseTasksContext = createContext21({
@@ -21670,7 +21705,7 @@ var TasksComponent = ({
21670
21705
  return /* @__PURE__ */ jsxs144(
21671
21706
  "div",
21672
21707
  {
21673
- className: classNames73(
21708
+ className: classNames74(
21674
21709
  "Layer__tasks-component",
21675
21710
  collapsable && "Layer__tasks-component--collapsable"
21676
21711
  ),
@@ -21688,7 +21723,7 @@ var TasksComponent = ({
21688
21723
  /* @__PURE__ */ jsx227(
21689
21724
  "div",
21690
21725
  {
21691
- className: classNames73(
21726
+ className: classNames74(
21692
21727
  "Layer__tasks__content",
21693
21728
  !open && "Layer__tasks__content--collapsed"
21694
21729
  ),
@@ -21850,7 +21885,7 @@ function LinkAccountsConfirmationStep() {
21850
21885
  ) }, index)
21851
21886
  }
21852
21887
  ) }),
21853
- /* @__PURE__ */ jsxs146(HStack, { pbs: "lg", justify: "end", gap: "sm", children: [
21888
+ /* @__PURE__ */ jsxs146(HStack, { pbs: "lg", gap: "sm", children: [
21854
21889
  /* @__PURE__ */ jsx229(Button, { variant: "secondary" /* secondary */, onClick: previous, children: "Back" }),
21855
21890
  /* @__PURE__ */ jsx229(
21856
21891
  Subscribe,
@@ -21882,7 +21917,16 @@ function LinkAccountsConfirmationStep() {
21882
21917
  // src/components/PlatformOnboarding/Steps/LinkAccountsLinkStep.tsx
21883
21918
  import { useContext as useContext52 } from "react";
21884
21919
  import pluralize from "pluralize";
21885
- import { Fragment as Fragment39, jsx as jsx230, jsxs as jsxs147 } from "react/jsx-runtime";
21920
+
21921
+ // src/components/Separator/Separator.tsx
21922
+ import { jsx as jsx230 } from "react/jsx-runtime";
21923
+ var Separator = ({ mbs, mbe }) => {
21924
+ const dataProperties = toDataProperties({ mbs, mbe });
21925
+ return /* @__PURE__ */ jsx230("div", __spreadValues({ className: "Layer__separator" }, dataProperties));
21926
+ };
21927
+
21928
+ // src/components/PlatformOnboarding/Steps/LinkAccountsLinkStep.tsx
21929
+ import { Fragment as Fragment39, jsx as jsx231, jsxs as jsxs147 } from "react/jsx-runtime";
21886
21930
  function LinkAccountsLinkStep() {
21887
21931
  const {
21888
21932
  data,
@@ -21894,47 +21938,56 @@ function LinkAccountsLinkStep() {
21894
21938
  const { next } = useWizard();
21895
21939
  const effectiveAccounts = data != null ? data : [];
21896
21940
  return /* @__PURE__ */ jsxs147(Fragment39, { children: [
21897
- /* @__PURE__ */ jsx230(
21941
+ /* @__PURE__ */ jsx231(
21898
21942
  ConditionalList,
21899
21943
  {
21900
21944
  list: effectiveAccounts,
21901
- Empty: /* @__PURE__ */ jsxs147(VStack, { gap: "2xs", pbe: "md", children: [
21902
- /* @__PURE__ */ jsx230(P, { variant: "subtle", size: "lg", children: "Connect your bank accounts and credit cards to automatically import your business transactions." }),
21903
- /* @__PURE__ */ jsx230(HStack, { pbs: "lg", justify: "center", children: /* @__PURE__ */ jsx230(
21904
- Button,
21945
+ Empty: /* @__PURE__ */ jsxs147(VStack, { gap: "xl", pbe: "md", children: [
21946
+ /* @__PURE__ */ jsx231(Text, { status: "disabled", children: "Connect your bank accounts and credit cards to automatically import your business transactions." }),
21947
+ /* @__PURE__ */ jsx231(
21948
+ ActionableRow,
21905
21949
  {
21906
- onClick: () => {
21907
- addConnection("PLAID");
21908
- },
21909
- rightIcon: /* @__PURE__ */ jsx230(Link_default, { size: 12 }),
21910
- disabled: loadingStatus !== "complete",
21911
- children: "Connect my bank"
21950
+ iconBox: /* @__PURE__ */ jsx231(PlaidIcon_default, {}),
21951
+ title: "Connect my bank",
21952
+ description: "Import data with one simple integration.",
21953
+ button: /* @__PURE__ */ jsx231(
21954
+ Button,
21955
+ {
21956
+ onClick: () => addConnection("PLAID"),
21957
+ rightIcon: /* @__PURE__ */ jsx231(Link_default, { size: 12 }),
21958
+ disabled: loadingStatus !== "complete",
21959
+ children: "Connect"
21960
+ }
21961
+ )
21912
21962
  }
21913
- ) })
21963
+ )
21914
21964
  ] }),
21915
21965
  Container: ({ children }) => /* @__PURE__ */ jsxs147(VStack, { children: [
21916
21966
  /* @__PURE__ */ jsxs147(VStack, { gap: "2xs", pbe: "md", children: [
21917
- /* @__PURE__ */ jsx230(Heading2, { level: 3, size: "sm", children: `We've found ${pluralize("account", effectiveAccounts.length, true)}` }),
21918
- /* @__PURE__ */ jsx230(P, { variant: "subtle", children: "You'll have the chance to remove any accounts you don't use for your business in the next step." })
21967
+ /* @__PURE__ */ jsx231(Heading2, { level: 3, size: "sm", children: `We've found ${pluralize("account", effectiveAccounts.length, true)}` }),
21968
+ /* @__PURE__ */ jsx231(Text, { status: "disabled", children: "You'll have the chance to remove any accounts you don't use for your business in the next step." })
21919
21969
  ] }),
21920
- /* @__PURE__ */ jsx230(LinkAccountsListContainer, { children }),
21921
- /* @__PURE__ */ jsxs147(VStack, { pbs: "xl", gap: "sm", children: [
21922
- /* @__PURE__ */ jsx230(Heading2, { level: 3, align: "center", children: "Do you use any other bank accounts or credit cards for your business?" }),
21923
- /* @__PURE__ */ jsx230(HStack, { justify: "center", pbe: "sm", children: /* @__PURE__ */ jsx230(
21924
- Button,
21925
- {
21926
- onClick: () => {
21927
- addConnection("PLAID");
21928
- },
21929
- rightIcon: /* @__PURE__ */ jsx230(Link_default, { size: 12 }),
21930
- disabled: loadingStatus !== "complete",
21931
- children: "Link another bank"
21932
- }
21933
- ) })
21934
- ] })
21970
+ /* @__PURE__ */ jsx231(LinkAccountsListContainer, { children }),
21971
+ /* @__PURE__ */ jsx231(VStack, { pbs: "xl", children: /* @__PURE__ */ jsx231(
21972
+ ActionableRow,
21973
+ {
21974
+ iconBox: /* @__PURE__ */ jsx231(PlaidIcon_default, {}),
21975
+ title: "Connect my next bank account",
21976
+ description: "Import data with one simple integration.",
21977
+ button: /* @__PURE__ */ jsx231(
21978
+ Button,
21979
+ {
21980
+ onClick: () => addConnection("PLAID"),
21981
+ rightIcon: /* @__PURE__ */ jsx231(Link_default, { size: 12 }),
21982
+ disabled: loadingStatus !== "complete",
21983
+ children: "Connect next"
21984
+ }
21985
+ )
21986
+ }
21987
+ ) })
21935
21988
  ] }),
21936
21989
  isError: Boolean(error),
21937
- Error: /* @__PURE__ */ jsx230(
21990
+ Error: /* @__PURE__ */ jsx231(
21938
21991
  DataState,
21939
21992
  {
21940
21993
  status: "failed" /* failed */,
@@ -21946,20 +21999,23 @@ function LinkAccountsLinkStep() {
21946
21999
  }
21947
22000
  ),
21948
22001
  isLoading: loadingStatus === "loading" || loadingStatus === "initial",
21949
- Loading: /* @__PURE__ */ jsx230(Loader2, {}),
21950
- children: ({ item: account }) => /* @__PURE__ */ jsx230(BasicLinkedAccountContainer, { isSelected: true, children: /* @__PURE__ */ jsx230(BasicLinkedAccountContent, { account }) }, account.id)
22002
+ Loading: /* @__PURE__ */ jsx231(Loader2, {}),
22003
+ children: ({ item: account }) => /* @__PURE__ */ jsx231(BasicLinkedAccountContainer, { isSelected: true, children: /* @__PURE__ */ jsx231(BasicLinkedAccountContent, { account }) }, account.id)
21951
22004
  }
21952
22005
  ),
21953
- effectiveAccounts.length > 0 ? /* @__PURE__ */ jsx230(HStack, { pbs: "lg", justify: "end", gap: "sm", children: /* @__PURE__ */ jsx230(Button, { onClick: () => {
21954
- void next();
21955
- }, rightIcon: /* @__PURE__ */ jsx230(ChevronRight_default, {}), children: "I\u2019m done linking my banks" }) }) : null
22006
+ effectiveAccounts.length > 0 ? /* @__PURE__ */ jsxs147(Fragment39, { children: [
22007
+ /* @__PURE__ */ jsx231(Separator, { mbs: "lg", mbe: "lg" }),
22008
+ /* @__PURE__ */ jsx231(HStack, { justify: "start", gap: "sm", children: /* @__PURE__ */ jsx231(Button, { onClick: () => {
22009
+ void next();
22010
+ }, rightIcon: /* @__PURE__ */ jsx231(ChevronRight_default, {}), children: "I\u2019m done linking my banks" }) })
22011
+ ] }) : null
21956
22012
  ] });
21957
22013
  }
21958
22014
 
21959
22015
  // src/components/PlatformOnboarding/LinkAccounts.tsx
21960
- import { jsx as jsx231, jsxs as jsxs148 } from "react/jsx-runtime";
22016
+ import { jsx as jsx232, jsxs as jsxs148 } from "react/jsx-runtime";
21961
22017
  function LinkAccounts(props) {
21962
- return /* @__PURE__ */ jsx231(LinkedAccountsProvider, { children: /* @__PURE__ */ jsx231(LinkAccountsContent, __spreadValues({}, props)) });
22018
+ return /* @__PURE__ */ jsx232(LinkedAccountsProvider, { children: /* @__PURE__ */ jsx232(LinkAccountsContent, __spreadValues({}, props)) });
21963
22019
  }
21964
22020
  function LinkAccountsContent({
21965
22021
  onComplete
@@ -21967,82 +22023,1149 @@ function LinkAccountsContent({
21967
22023
  const { data: linkedAccounts, loadingStatus } = useContext53(LinkedAccountsContext);
21968
22024
  const linkedAccountsNeedingConfirmation = linkedAccounts ? getAccountsNeedingConfirmation(linkedAccounts) : [];
21969
22025
  const hideConfirmationStep = loadingStatus === "complete" && linkedAccountsNeedingConfirmation.length === 0;
21970
- return /* @__PURE__ */ jsx231("section", { className: "Layer__link-accounts Layer__component", children: /* @__PURE__ */ jsxs148(
22026
+ return /* @__PURE__ */ jsx232("section", { className: "Layer__link-accounts Layer__component", children: /* @__PURE__ */ jsxs148(
21971
22027
  Wizard,
21972
22028
  {
21973
- Header: /* @__PURE__ */ jsx231(Heading2, { level: 2, pbe: "md", children: "Link your bank accounts and credit cards" }),
22029
+ Header: /* @__PURE__ */ jsx232(Heading2, { children: "Link your bank accounts and credit cards" }),
21974
22030
  Footer: null,
21975
22031
  onComplete,
21976
22032
  children: [
21977
- /* @__PURE__ */ jsx231(LinkAccountsLinkStep, {}),
21978
- hideConfirmationStep ? null : /* @__PURE__ */ jsx231(LinkAccountsConfirmationStep, {})
22033
+ /* @__PURE__ */ jsx232(LinkAccountsLinkStep, {}),
22034
+ hideConfirmationStep ? null : /* @__PURE__ */ jsx232(LinkAccountsConfirmationStep, {})
21979
22035
  ]
21980
22036
  }
21981
22037
  ) });
21982
22038
  }
21983
22039
 
21984
- // src/icons/Coffee.tsx
21985
- import { jsx as jsx232, jsxs as jsxs149 } from "react/jsx-runtime";
21986
- var CoffeeIcon = (_a) => {
21987
- var _b = _a, { size = 11 } = _b, props = __objRest(_b, ["size"]);
21988
- return /* @__PURE__ */ jsxs149(
22040
+ // src/components/PlatformOnboarding/PlatformOnboarding.tsx
22041
+ import { useState as useState61 } from "react";
22042
+
22043
+ // src/components/ProgressSteps/ProgressSteps.tsx
22044
+ import { jsx as jsx233, jsxs as jsxs149 } from "react/jsx-runtime";
22045
+ var ProgressSteps = ({ steps, currentStep }) => {
22046
+ return /* @__PURE__ */ jsx233("div", { className: "Layer__progress-steps", children: steps.map((step, index) => {
22047
+ const dataProperties = toDataProperties({ active: index <= currentStep, complete: currentStep > index });
22048
+ return /* @__PURE__ */ jsx233(
22049
+ "div",
22050
+ {
22051
+ className: "Layer__progress-steps--step-wrapper",
22052
+ children: /* @__PURE__ */ jsxs149("div", __spreadProps(__spreadValues({ className: "Layer__progress-steps--step" }, dataProperties), { children: [
22053
+ index < steps.length - 1 && /* @__PURE__ */ jsx233("div", { className: "Layer__progress-steps--step-line" }),
22054
+ /* @__PURE__ */ jsx233("div", { className: "Layer__progress-steps--circle", children: index < currentStep && /* @__PURE__ */ jsx233(Check_default, { size: 10 }) }),
22055
+ /* @__PURE__ */ jsx233("div", { className: "Layer__progress-steps--label", children: /* @__PURE__ */ jsx233(Text, { size: "sm" /* sm */, children: step }) })
22056
+ ] }))
22057
+ },
22058
+ index
22059
+ );
22060
+ }) });
22061
+ };
22062
+
22063
+ // src/icons/Document.tsx
22064
+ import { jsx as jsx234, jsxs as jsxs150 } from "react/jsx-runtime";
22065
+ var Document = (_a) => {
22066
+ var _b = _a, { size = 20 } = _b, props = __objRest(_b, ["size"]);
22067
+ return /* @__PURE__ */ jsxs150(
21989
22068
  "svg",
21990
22069
  __spreadProps(__spreadValues({
21991
22070
  xmlns: "http://www.w3.org/2000/svg",
21992
- viewBox: "0 0 12 12",
22071
+ viewBox: "0 0 20 20",
21993
22072
  fill: "none"
21994
22073
  }, props), {
21995
22074
  width: size,
21996
22075
  height: size,
21997
22076
  children: [
21998
- /* @__PURE__ */ jsxs149("g", { clipPath: "url(#clip0_5018_10141)", children: [
21999
- /* @__PURE__ */ jsx232(
22000
- "path",
22001
- {
22002
- 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",
22003
- stroke: "currentColor",
22004
- strokeLinecap: "round",
22005
- strokeLinejoin: "round"
22006
- }
22007
- ),
22008
- /* @__PURE__ */ jsx232(
22009
- "path",
22010
- {
22011
- 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",
22012
- stroke: "currentColor",
22013
- strokeLinecap: "round",
22014
- strokeLinejoin: "round"
22015
- }
22016
- ),
22017
- /* @__PURE__ */ jsx232(
22018
- "path",
22019
- {
22020
- d: "M8.75 0.958344V2.33334",
22021
- stroke: "currentColor",
22022
- strokeLinecap: "round",
22023
- strokeLinejoin: "round"
22024
- }
22025
- ),
22026
- /* @__PURE__ */ jsx232(
22027
- "path",
22028
- {
22029
- d: "M6.91663 0.958344V2.33334",
22030
- stroke: "currentColor",
22031
- strokeLinecap: "round",
22032
- strokeLinejoin: "round"
22033
- }
22034
- ),
22035
- /* @__PURE__ */ jsx232(
22036
- "path",
22037
- {
22038
- d: "M5.08337 0.958344V2.33334",
22039
- stroke: "currentColor",
22040
- strokeLinecap: "round",
22077
+ /* @__PURE__ */ jsx234(
22078
+ "path",
22079
+ {
22080
+ d: "M11.6667 1.66666H5.00004C4.55801 1.66666 4.13409 1.84226 3.82153 2.15482C3.50897 2.46738 3.33337 2.8913 3.33337 3.33333V16.6667C3.33337 17.1087 3.50897 17.5326 3.82153 17.8452C4.13409 18.1577 4.55801 18.3333 5.00004 18.3333H15C15.4421 18.3333 15.866 18.1577 16.1786 17.8452C16.4911 17.5326 16.6667 17.1087 16.6667 16.6667V6.66666L11.6667 1.66666Z",
22081
+ stroke: "white",
22082
+ strokeLinecap: "round",
22083
+ strokeLinejoin: "round"
22084
+ }
22085
+ ),
22086
+ /* @__PURE__ */ jsx234(
22087
+ "path",
22088
+ {
22089
+ d: "M11.6667 1.66666H5.00004C4.55801 1.66666 4.13409 1.84226 3.82153 2.15482C3.50897 2.46738 3.33337 2.8913 3.33337 3.33333V16.6667C3.33337 17.1087 3.50897 17.5326 3.82153 17.8452C4.13409 18.1577 4.55801 18.3333 5.00004 18.3333H15C15.4421 18.3333 15.866 18.1577 16.1786 17.8452C16.4911 17.5326 16.6667 17.1087 16.6667 16.6667V6.66666L11.6667 1.66666Z",
22090
+ stroke: "currentColor",
22091
+ strokeLinecap: "round",
22092
+ strokeLinejoin: "round"
22093
+ }
22094
+ ),
22095
+ /* @__PURE__ */ jsx234(
22096
+ "path",
22097
+ {
22098
+ d: "M11.6666 1.66666V6.66666H16.6666",
22099
+ stroke: "white",
22100
+ strokeLinecap: "round",
22101
+ strokeLinejoin: "round"
22102
+ }
22103
+ ),
22104
+ /* @__PURE__ */ jsx234(
22105
+ "path",
22106
+ {
22107
+ d: "M11.6666 1.66666V6.66666H16.6666",
22108
+ stroke: "currentColor",
22109
+ strokeLinecap: "round",
22110
+ strokeLinejoin: "round"
22111
+ }
22112
+ ),
22113
+ /* @__PURE__ */ jsx234(
22114
+ "path",
22115
+ {
22116
+ d: "M13.3333 10.8333H6.66663",
22117
+ stroke: "white",
22118
+ strokeLinecap: "round",
22119
+ strokeLinejoin: "round"
22120
+ }
22121
+ ),
22122
+ /* @__PURE__ */ jsx234(
22123
+ "path",
22124
+ {
22125
+ d: "M13.3333 10.8333H6.66663",
22126
+ stroke: "currentColor",
22127
+ strokeLinecap: "round",
22128
+ strokeLinejoin: "round"
22129
+ }
22130
+ ),
22131
+ /* @__PURE__ */ jsx234(
22132
+ "path",
22133
+ {
22134
+ d: "M13.3333 14.1667H6.66663",
22135
+ stroke: "white",
22136
+ strokeLinecap: "round",
22137
+ strokeLinejoin: "round"
22138
+ }
22139
+ ),
22140
+ /* @__PURE__ */ jsx234(
22141
+ "path",
22142
+ {
22143
+ d: "M13.3333 14.1667H6.66663",
22144
+ stroke: "currentColor",
22145
+ strokeLinecap: "round",
22146
+ strokeLinejoin: "round"
22147
+ }
22148
+ ),
22149
+ /* @__PURE__ */ jsx234(
22150
+ "path",
22151
+ {
22152
+ d: "M8.33329 7.5H7.49996H6.66663",
22153
+ stroke: "white",
22154
+ strokeLinecap: "round",
22155
+ strokeLinejoin: "round"
22156
+ }
22157
+ ),
22158
+ /* @__PURE__ */ jsx234(
22159
+ "path",
22160
+ {
22161
+ d: "M8.33329 7.5H7.49996H6.66663",
22162
+ stroke: "currentColor",
22163
+ strokeLinecap: "round",
22164
+ strokeLinejoin: "round"
22165
+ }
22166
+ )
22167
+ ]
22168
+ })
22169
+ );
22170
+ };
22171
+ var Document_default = Document;
22172
+
22173
+ // src/icons/TrendingUp.tsx
22174
+ import { jsx as jsx235, jsxs as jsxs151 } from "react/jsx-runtime";
22175
+ var TrendingUp = (_a) => {
22176
+ var _b = _a, { size = 20 } = _b, props = __objRest(_b, ["size"]);
22177
+ return /* @__PURE__ */ jsxs151(
22178
+ "svg",
22179
+ __spreadProps(__spreadValues({
22180
+ xmlns: "http://www.w3.org/2000/svg",
22181
+ viewBox: "0 0 20 20",
22182
+ fill: "none"
22183
+ }, props), {
22184
+ width: size,
22185
+ height: size,
22186
+ children: [
22187
+ /* @__PURE__ */ jsx235(
22188
+ "path",
22189
+ {
22190
+ d: "M19.1667 5L11.25 12.9167L7.08337 8.75L0.833374 15",
22191
+ stroke: "white",
22192
+ strokeLinecap: "round",
22193
+ strokeLinejoin: "round"
22194
+ }
22195
+ ),
22196
+ /* @__PURE__ */ jsx235(
22197
+ "path",
22198
+ {
22199
+ d: "M19.1667 5L11.25 12.9167L7.08337 8.75L0.833374 15",
22200
+ stroke: "currentColor",
22201
+ strokeLinecap: "round",
22202
+ strokeLinejoin: "round"
22203
+ }
22204
+ ),
22205
+ /* @__PURE__ */ jsx235(
22206
+ "path",
22207
+ {
22208
+ d: "M14.1666 5H19.1666V10",
22209
+ stroke: "white",
22210
+ strokeLinecap: "round",
22211
+ strokeLinejoin: "round"
22212
+ }
22213
+ ),
22214
+ /* @__PURE__ */ jsx235(
22215
+ "path",
22216
+ {
22217
+ d: "M14.1666 5H19.1666V10",
22218
+ stroke: "currentColor",
22219
+ strokeLinecap: "round",
22220
+ strokeLinejoin: "round"
22221
+ }
22222
+ )
22223
+ ]
22224
+ })
22225
+ );
22226
+ };
22227
+ var TrendingUp_default = TrendingUp;
22228
+
22229
+ // src/components/PlatformOnboarding/Steps/WelcomeStep.tsx
22230
+ import { Fragment as Fragment40, jsx as jsx236, jsxs as jsxs152 } from "react/jsx-runtime";
22231
+ var defaultTitle = "Welcome";
22232
+ var defaultDescription = "Welcome to the platform onboarding process";
22233
+ var WelcomeStep = ({ onNext, title = defaultTitle, description, stepsEnabled }) => {
22234
+ const buildDescription = () => {
22235
+ if (description) {
22236
+ return description;
22237
+ }
22238
+ if (stepsEnabled) {
22239
+ let text = "In this flow we\u2019ll ";
22240
+ if (stepsEnabled.includes("business-info")) {
22241
+ text += "confirm your business information, ";
22242
+ }
22243
+ if (stepsEnabled.includes("link-accounts")) {
22244
+ text += "connect your financial accounts, ";
22245
+ }
22246
+ text += "and start managing your books like a pro.";
22247
+ return text;
22248
+ }
22249
+ return defaultDescription;
22250
+ };
22251
+ return /* @__PURE__ */ jsxs152(Fragment40, { children: [
22252
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome", children: [
22253
+ /* @__PURE__ */ jsx236(Heading, { className: "Layer__platform-onboarding__heading", align: "left", children: title }),
22254
+ /* @__PURE__ */ jsx236(Text, { status: "disabled", children: buildDescription() })
22255
+ ] }),
22256
+ /* @__PURE__ */ jsx236(Button, { onClick: onNext, children: "Get started" })
22257
+ ] });
22258
+ };
22259
+ var WelcomeStepFooter = () => {
22260
+ return /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer", children: [
22261
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__content", children: [
22262
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__header", children: [
22263
+ /* @__PURE__ */ jsx236(Heading, { align: "left", children: "How it works" }),
22264
+ /* @__PURE__ */ jsx236(Text, { status: "disabled", children: "Discover how seamless accounting can transform your business." })
22265
+ ] }),
22266
+ /* @__PURE__ */ jsxs152(VStack, { gap: "lg", children: [
22267
+ /* @__PURE__ */ jsxs152(VStack, { gap: "xs", children: [
22268
+ /* @__PURE__ */ jsxs152(HStack, { gap: "xs", children: [
22269
+ /* @__PURE__ */ jsx236(TrendingUp_default, {}),
22270
+ /* @__PURE__ */ jsx236(Heading, { size: "secondary" /* secondary */, children: "Understand your business health" })
22271
+ ] }),
22272
+ /* @__PURE__ */ jsx236(Text, { status: "disabled", children: "Get an accurate picture of your financial performance and insight into how to grow your profit." })
22273
+ ] }),
22274
+ /* @__PURE__ */ jsxs152(VStack, { gap: "xs", children: [
22275
+ /* @__PURE__ */ jsxs152(HStack, { gap: "xs", children: [
22276
+ /* @__PURE__ */ jsx236(Document_default, {}),
22277
+ /* @__PURE__ */ jsx236(Heading, { size: "secondary" /* secondary */, children: "Be ready for tax time" })
22278
+ ] }),
22279
+ /* @__PURE__ */ jsx236(Text, { status: "disabled", children: "Keep your business finances organized to avoid paying more taxes than needed or IRS fines at tax time." })
22280
+ ] })
22281
+ ] })
22282
+ ] }),
22283
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__images", children: [
22284
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__image", children: [
22285
+ /* @__PURE__ */ jsx236("div", { className: "Layer__platform__onboarding__welcome-footer__image-wrapper", children: /* @__PURE__ */ jsx236(
22286
+ "img",
22287
+ {
22288
+ src: "https://layer-public.s3.us-west-2.amazonaws.com/site-images/linked-accounts.png",
22289
+ alt: "Connect your accounts"
22290
+ }
22291
+ ) }),
22292
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform__onboarding__welcome-footer__image-text", children: [
22293
+ /* @__PURE__ */ jsx236(Heading, { size: "secondary" /* secondary */, children: "Connect your accounts" }),
22294
+ /* @__PURE__ */ jsx236(Text, { as: "p", children: "Connect your bank accounts and credit cards to see a complete picture of your business finances." })
22295
+ ] })
22296
+ ] }),
22297
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__image", children: [
22298
+ /* @__PURE__ */ jsx236("div", { className: "Layer__platform__onboarding__welcome-footer__image-wrapper", children: /* @__PURE__ */ jsx236(
22299
+ "img",
22300
+ {
22301
+ src: "https://layer-public.s3.us-west-2.amazonaws.com/site-images/bookkeeping-tasks.png",
22302
+ alt: "Bookkeeping tasks"
22303
+ }
22304
+ ) }),
22305
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform__onboarding__welcome-footer__image-text", children: [
22306
+ /* @__PURE__ */ jsx236(Heading, { size: "secondary" /* secondary */, children: "Ongoing monthly bookkeeping" }),
22307
+ /* @__PURE__ */ jsx236(Text, { as: "p", children: "Receive a monthly report of your financial performance to review with your PSM." })
22308
+ ] })
22309
+ ] }),
22310
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform-onboarding__welcome-footer__image", children: [
22311
+ /* @__PURE__ */ jsx236("div", { className: "Layer__platform__onboarding__welcome-footer__image-wrapper", children: /* @__PURE__ */ jsx236(
22312
+ "img",
22313
+ {
22314
+ src: "https://layer-public.s3.us-west-2.amazonaws.com/site-images/revenue.png",
22315
+ alt: "Profitability"
22316
+ }
22317
+ ) }),
22318
+ /* @__PURE__ */ jsxs152("div", { className: "Layer__platform__onboarding__welcome-footer__image-text", children: [
22319
+ /* @__PURE__ */ jsx236(Heading, { size: "secondary" /* secondary */, children: "See your profitability" }),
22320
+ /* @__PURE__ */ jsx236(Text, { as: "p", children: "Our bookkeeping team organized and categorizes your business transactions." })
22321
+ ] })
22322
+ ] })
22323
+ ] })
22324
+ ] });
22325
+ };
22326
+
22327
+ // src/components/PlatformOnboarding/Steps/SummaryStep.tsx
22328
+ import { Fragment as Fragment41, jsx as jsx237, jsxs as jsxs153 } from "react/jsx-runtime";
22329
+ var defaultTitle2 = "You\u2019re all set!";
22330
+ var defaultDescription2 = "We\u2019re syncing your accounts. This process may take a while to complete.";
22331
+ var defaultNextBtnText = "Go to dashboard";
22332
+ var SummaryStep = ({ onNext, title = defaultTitle2, description = defaultDescription2, nextBtnText = defaultNextBtnText }) => {
22333
+ return /* @__PURE__ */ jsxs153(Fragment41, { children: [
22334
+ /* @__PURE__ */ jsxs153("div", { className: "Layer__platform-onboarding__summary", children: [
22335
+ /* @__PURE__ */ jsx237(Heading, { className: "Layer__platform-onboarding__heading", align: "left", children: title }),
22336
+ /* @__PURE__ */ jsx237(Text, { status: "disabled", children: description })
22337
+ ] }),
22338
+ /* @__PURE__ */ jsx237(Button, { onClick: onNext, children: nextBtnText })
22339
+ ] });
22340
+ };
22341
+
22342
+ // src/utils/form.ts
22343
+ var notEmpty = (value) => {
22344
+ if (!value) {
22345
+ return false;
22346
+ }
22347
+ return value.trim().length > 0;
22348
+ };
22349
+ var validateEmailFormat = (email, required = false) => {
22350
+ if (!email) {
22351
+ return !required;
22352
+ }
22353
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
22354
+ };
22355
+
22356
+ // src/components/BusinessForm/useBusinessForm.ts
22357
+ import { useForm as useForm2, useStore as useStore3 } from "@tanstack/react-form";
22358
+
22359
+ // src/hooks/businessPersonnel/useBusinessPersonnel.ts
22360
+ import useSWR15 from "swr";
22361
+
22362
+ // src/utils/array/readonlyTransformations.ts
22363
+ function mapReadonly(array, callbackFn) {
22364
+ return array.map(callbackFn);
22365
+ }
22366
+ function filterReadonly(array, predicate) {
22367
+ return array.filter(predicate);
22368
+ }
22369
+
22370
+ // src/hooks/businessPersonnel/types.ts
22371
+ var PERSONNEL_ROLES = ["ACCOUNTANT", "ADMINISTRATOR", "OWNER"];
22372
+ function isPersonnelRole(role) {
22373
+ return PERSONNEL_ROLES.includes(role);
22374
+ }
22375
+
22376
+ // src/hooks/businessPersonnel/useBusinessPersonnel.ts
22377
+ var BUSINESS_PERSONNEL_TAG_KEY = "#business-personnel";
22378
+ function buildKey13({
22379
+ access_token: accessToken,
22380
+ apiUrl,
22381
+ businessId
22382
+ }) {
22383
+ if (accessToken && apiUrl) {
22384
+ return {
22385
+ accessToken,
22386
+ apiUrl,
22387
+ businessId,
22388
+ tags: [BUSINESS_PERSONNEL_TAG_KEY]
22389
+ };
22390
+ }
22391
+ }
22392
+ var getBusinessPersonnel = get(({ businessId }) => `/v1/businesses/${businessId}/personnel`);
22393
+ function useBusinessPersonnel() {
22394
+ const { data } = useAuth();
22395
+ const { businessId } = useLayerContext();
22396
+ return useSWR15(
22397
+ () => buildKey13(__spreadProps(__spreadValues({}, data), {
22398
+ businessId
22399
+ })),
22400
+ ({ accessToken, apiUrl, businessId: businessId2 }) => getBusinessPersonnel(
22401
+ apiUrl,
22402
+ accessToken,
22403
+ {
22404
+ params: { businessId: businessId2 }
22405
+ }
22406
+ )().then(({ data: data2 }) => data2.map(({
22407
+ id,
22408
+ full_name: fullName,
22409
+ preferred_name: preferredName,
22410
+ external_id: externalId,
22411
+ email_addresses,
22412
+ phone_numbers,
22413
+ roles
22414
+ }) => ({
22415
+ id,
22416
+ fullName,
22417
+ preferredName,
22418
+ externalId,
22419
+ emailAddresses: mapReadonly(
22420
+ email_addresses,
22421
+ ({ id: id2, email_address: emailAddress }) => ({ id: id2, emailAddress })
22422
+ ),
22423
+ phoneNumbers: mapReadonly(
22424
+ phone_numbers,
22425
+ ({ id: id2, phone_number: phoneNumber }) => ({ id: id2, phoneNumber })
22426
+ ),
22427
+ roles: filterReadonly(
22428
+ roles,
22429
+ (roleEntity) => isPersonnelRole(roleEntity.role)
22430
+ )
22431
+ })))
22432
+ );
22433
+ }
22434
+
22435
+ // src/hooks/businessPersonnel/useCreateBusinessPersonnel.ts
22436
+ import useSWRMutation7 from "swr/mutation";
22437
+ import { useSWRConfig } from "swr";
22438
+
22439
+ // src/utils/swr/withSWRKeyTags.ts
22440
+ function withSWRKeyTags(key, predicate) {
22441
+ if (typeof key !== "object" || key === null || !("tags" in key)) {
22442
+ return false;
22443
+ }
22444
+ return isStringArray(key.tags) ? predicate(key.tags) : false;
22445
+ }
22446
+
22447
+ // src/hooks/businessPersonnel/useCreateBusinessPersonnel.ts
22448
+ var createBusinessPersonnel = post(({ businessId }) => `/v1/businesses/${businessId}/personnel`);
22449
+ function buildKey14({
22450
+ access_token: accessToken,
22451
+ apiUrl,
22452
+ businessId
22453
+ }) {
22454
+ if (accessToken && apiUrl) {
22455
+ return {
22456
+ accessToken,
22457
+ apiUrl,
22458
+ businessId,
22459
+ tags: [`${BUSINESS_PERSONNEL_TAG_KEY}:create`]
22460
+ };
22461
+ }
22462
+ }
22463
+ function useCreateBusinessPersonnel() {
22464
+ const { data } = useAuth();
22465
+ const { businessId } = useLayerContext();
22466
+ const { mutate } = useSWRConfig();
22467
+ const mutationResponse = useSWRMutation7(
22468
+ () => buildKey14(__spreadProps(__spreadValues({}, data), {
22469
+ businessId
22470
+ })),
22471
+ ({ accessToken, apiUrl, businessId: businessId2 }, { arg: body }) => createBusinessPersonnel(
22472
+ apiUrl,
22473
+ accessToken,
22474
+ {
22475
+ params: { businessId: businessId2 },
22476
+ body
22477
+ }
22478
+ ).then(({ data: data2 }) => data2),
22479
+ {
22480
+ revalidate: false,
22481
+ throwOnError: false
22482
+ }
22483
+ );
22484
+ const { trigger: originalTrigger } = mutationResponse;
22485
+ return Object.assign(
22486
+ mutationResponse,
22487
+ {
22488
+ trigger: (...triggerParameters) => __async(this, null, function* () {
22489
+ const data2 = yield originalTrigger(...triggerParameters);
22490
+ if (data2) {
22491
+ yield mutate((key) => withSWRKeyTags(key, (tags) => tags.includes(BUSINESS_PERSONNEL_TAG_KEY)));
22492
+ }
22493
+ return data2;
22494
+ })
22495
+ }
22496
+ );
22497
+ }
22498
+
22499
+ // src/hooks/businessPersonnel/useUpdateBusinessPersonnel.ts
22500
+ import useSWRMutation8 from "swr/mutation";
22501
+ import { useSWRConfig as useSWRConfig2 } from "swr";
22502
+
22503
+ // src/api/layer/businessPersonnel/updateBusinessPersonnel.ts
22504
+ var updateBusinessPersonnel = post(({ businessId, businessPersonnelId }) => {
22505
+ return `/v1/businesses/${businessId}/personnel/${businessPersonnelId}/update`;
22506
+ });
22507
+
22508
+ // src/hooks/businessPersonnel/useUpdateBusinessPersonnel.ts
22509
+ function buildKey15({
22510
+ access_token: accessToken,
22511
+ apiUrl,
22512
+ businessId,
22513
+ businessPersonnelId
22514
+ }) {
22515
+ if (accessToken && apiUrl && businessPersonnelId) {
22516
+ return {
22517
+ accessToken,
22518
+ apiUrl,
22519
+ businessId,
22520
+ businessPersonnelId,
22521
+ tags: [`${BUSINESS_PERSONNEL_TAG_KEY}:${businessPersonnelId}`]
22522
+ };
22523
+ }
22524
+ }
22525
+ function useUpdateBusinessPersonnel({ businessPersonnelId }) {
22526
+ const { data } = useAuth();
22527
+ const { businessId } = useLayerContext();
22528
+ const { mutate } = useSWRConfig2();
22529
+ const mutationResponse = useSWRMutation8(
22530
+ () => buildKey15(__spreadProps(__spreadValues({}, data), {
22531
+ businessId,
22532
+ businessPersonnelId
22533
+ })),
22534
+ ({ accessToken, apiUrl, businessId: businessId2, businessPersonnelId: businessPersonnelId2 }, { arg: body }) => updateBusinessPersonnel(
22535
+ apiUrl,
22536
+ accessToken,
22537
+ {
22538
+ params: {
22539
+ businessId: businessId2,
22540
+ businessPersonnelId: businessPersonnelId2
22541
+ },
22542
+ body
22543
+ }
22544
+ ).then(({ data: data2 }) => data2),
22545
+ {
22546
+ revalidate: false,
22547
+ throwOnError: false
22548
+ }
22549
+ );
22550
+ const { trigger: originalTrigger } = mutationResponse;
22551
+ return Object.assign(
22552
+ mutationResponse,
22553
+ {
22554
+ trigger: (...triggerParameters) => __async(this, null, function* () {
22555
+ const data2 = yield originalTrigger(...triggerParameters);
22556
+ if (data2) {
22557
+ yield mutate((key) => withSWRKeyTags(key, (tags) => tags.includes(BUSINESS_PERSONNEL_TAG_KEY)));
22558
+ }
22559
+ return data2;
22560
+ })
22561
+ }
22562
+ );
22563
+ }
22564
+
22565
+ // src/hooks/business/useUpdateBusiness.ts
22566
+ import useSWRMutation9 from "swr/mutation";
22567
+ import { useSWRConfig as useSWRConfig3 } from "swr";
22568
+ var BUSINESS_TAG_KEY = "business";
22569
+ function buildKey16({
22570
+ access_token: accessToken,
22571
+ apiUrl,
22572
+ businessId
22573
+ }) {
22574
+ if (accessToken && apiUrl && businessId) {
22575
+ return {
22576
+ accessToken,
22577
+ apiUrl,
22578
+ businessId,
22579
+ tags: [`${BUSINESS_TAG_KEY}:${businessId}`]
22580
+ };
22581
+ }
22582
+ }
22583
+ function useUpdateBusiness() {
22584
+ const { data } = useAuth();
22585
+ const { businessId } = useLayerContext();
22586
+ const { mutate } = useSWRConfig3();
22587
+ const mutationResponse = useSWRMutation9(
22588
+ () => buildKey16(__spreadProps(__spreadValues({}, data), {
22589
+ businessId
22590
+ })),
22591
+ ({ accessToken, apiUrl, businessId: businessId2 }, { arg: body }) => updateBusiness(
22592
+ apiUrl,
22593
+ accessToken,
22594
+ {
22595
+ params: { businessId: businessId2 },
22596
+ body
22597
+ }
22598
+ ).then(({ data: data2 }) => data2),
22599
+ {
22600
+ revalidate: false,
22601
+ throwOnError: false
22602
+ }
22603
+ );
22604
+ const { trigger: originalTrigger } = mutationResponse;
22605
+ return Object.assign(
22606
+ mutationResponse,
22607
+ {
22608
+ trigger: (...triggerParameters) => __async(this, null, function* () {
22609
+ const data2 = yield originalTrigger(...triggerParameters);
22610
+ if (data2) {
22611
+ yield mutate((key) => withSWRKeyTags(key, (tags) => tags.includes(BUSINESS_TAG_KEY)));
22612
+ }
22613
+ return data2;
22614
+ })
22615
+ }
22616
+ );
22617
+ }
22618
+
22619
+ // src/components/BusinessForm/useBusinessForm.ts
22620
+ import { useState as useState60 } from "react";
22621
+ var getPerson = (personnel) => {
22622
+ const owners = personnel == null ? void 0 : personnel.filter((p) => p.roles.find((x) => x.role === "OWNER"));
22623
+ if (owners && owners.length > 0) {
22624
+ return owners[0];
22625
+ }
22626
+ return personnel == null ? void 0 : personnel[0];
22627
+ };
22628
+ var useBusinessForm = ({ onSuccess }) => {
22629
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
22630
+ const { business } = useLayerContext();
22631
+ const [submitError, setSubmitError] = useState60(void 0);
22632
+ const { data: personnel } = useBusinessPersonnel();
22633
+ const person = getPerson(personnel);
22634
+ const { trigger: createBusinessPersonnel2 } = useCreateBusinessPersonnel();
22635
+ const { trigger: updateBusinessPersonnel2 } = useUpdateBusinessPersonnel({ businessPersonnelId: person == null ? void 0 : person.id });
22636
+ const { trigger: updateBusiness2 } = useUpdateBusiness();
22637
+ const form = useForm2({
22638
+ defaultValues: {
22639
+ full_name: (_a = person == null ? void 0 : person.fullName) != null ? _a : void 0,
22640
+ preferred_name: (_b = person == null ? void 0 : person.preferredName) != null ? _b : void 0,
22641
+ phone_number: (_d = (_c = person == null ? void 0 : person.phoneNumbers) == null ? void 0 : _c[0]) == null ? void 0 : _d.phoneNumber,
22642
+ email: (_f = (_e = person == null ? void 0 : person.emailAddresses) == null ? void 0 : _e[0]) == null ? void 0 : _f.emailAddress,
22643
+ legal_name: (_g = business == null ? void 0 : business.legal_name) != null ? _g : void 0,
22644
+ entity_type: (_h = business == null ? void 0 : business.entity_type) != null ? _h : void 0,
22645
+ us_state: (_i = business == null ? void 0 : business.us_state) != null ? _i : void 0,
22646
+ tin: business == null ? void 0 : business.tin
22647
+ },
22648
+ onSubmit: (_0) => __async(void 0, [_0], function* ({ value }) {
22649
+ var _a2;
22650
+ try {
22651
+ setSubmitError(void 0);
22652
+ if (person) {
22653
+ yield updateBusinessPersonnel2({
22654
+ id: person.id,
22655
+ full_name: value.full_name,
22656
+ preferred_name: value.preferred_name,
22657
+ email_addresses: value.email ? [{ email_address: value.email }] : [],
22658
+ phone_numbers: value.phone_number ? [{ phone_number: value.phone_number }] : []
22659
+ });
22660
+ } else {
22661
+ if (value.full_name) {
22662
+ yield createBusinessPersonnel2({
22663
+ full_name: value.full_name,
22664
+ preferred_name: (_a2 = value.preferred_name) != null ? _a2 : null,
22665
+ email_addresses: value.email ? [{ email_address: value.email }] : [],
22666
+ phone_numbers: value.phone_number ? [{ phone_number: value.phone_number }] : [],
22667
+ external_id: null,
22668
+ roles: [{ role: "OWNER" }]
22669
+ });
22670
+ }
22671
+ }
22672
+ yield updateBusiness2({
22673
+ legal_name: value.legal_name,
22674
+ entity_type: value.entity_type,
22675
+ us_state: value.us_state,
22676
+ tin: value.tin
22677
+ });
22678
+ onSuccess == null ? void 0 : onSuccess();
22679
+ } catch (e) {
22680
+ setSubmitError("Something went wrong. Please try again.");
22681
+ }
22682
+ })
22683
+ });
22684
+ const isFormValid = useStore3(form.store, (state) => state.isValid);
22685
+ return { form, submitError, isFormValid };
22686
+ };
22687
+
22688
+ // src/components/Input/FormSection.tsx
22689
+ import { jsx as jsx238, jsxs as jsxs154 } from "react/jsx-runtime";
22690
+ var FormSection = ({ children, title }) => {
22691
+ return /* @__PURE__ */ jsxs154(VStack, { className: "Layer__form-section", gap: "sm", children: [
22692
+ title && /* @__PURE__ */ jsx238(
22693
+ Text,
22694
+ {
22695
+ className: "Layer__form-section__title",
22696
+ size: "sm" /* sm */,
22697
+ weight: "bold" /* bold */,
22698
+ children: title
22699
+ }
22700
+ ),
22701
+ children
22702
+ ] });
22703
+ };
22704
+
22705
+ // src/components/Input/BusinessTypeSelect.tsx
22706
+ import { jsx as jsx239 } from "react/jsx-runtime";
22707
+ var findSelectOption = (options, value) => {
22708
+ if (!value) {
22709
+ return void 0;
22710
+ }
22711
+ return options.find((o) => o.value === value);
22712
+ };
22713
+ var BusinessTypeSelect = ({ value, onChange }) => {
22714
+ const entityTypeOptions = ENTITY_TYPES;
22715
+ return /* @__PURE__ */ jsx239(
22716
+ Select,
22717
+ {
22718
+ options: entityTypeOptions,
22719
+ value: findSelectOption(entityTypeOptions, value),
22720
+ onChange: (option) => onChange(option == null ? void 0 : option.value)
22721
+ }
22722
+ );
22723
+ };
22724
+
22725
+ // src/types/location.ts
22726
+ var US_STATES = [
22727
+ { value: "AL", label: "Alabama" },
22728
+ { value: "AK", label: "Alaska" },
22729
+ { value: "AZ", label: "Arizona" },
22730
+ { value: "AR", label: "Arkansas" },
22731
+ { value: "CA", label: "California" },
22732
+ { value: "CO", label: "Colorado" },
22733
+ { value: "CT", label: "Connecticut" },
22734
+ { value: "DE", label: "Delaware" },
22735
+ { value: "DC", label: "District of Columbia" },
22736
+ { value: "FL", label: "Florida" },
22737
+ { value: "GA", label: "Georgia" },
22738
+ { value: "HI", label: "Hawaii" },
22739
+ { value: "ID", label: "Idaho" },
22740
+ { value: "IL", label: "Illinois" },
22741
+ { value: "IN", label: "Indiana" },
22742
+ { value: "IA", label: "Iowa" },
22743
+ { value: "KS", label: "Kansas" },
22744
+ { value: "KY", label: "Kentucky" },
22745
+ { value: "LA", label: "Louisiana" },
22746
+ { value: "ME", label: "Maine" },
22747
+ { value: "MD", label: "Maryland" },
22748
+ { value: "MA", label: "Massachusetts" },
22749
+ { value: "MI", label: "Michigan" },
22750
+ { value: "MN", label: "Minnesota" },
22751
+ { value: "MS", label: "Mississippi" },
22752
+ { value: "MO", label: "Missouri" },
22753
+ { value: "MT", label: "Montana" },
22754
+ { value: "NE", label: "Nebraska" },
22755
+ { value: "NV", label: "Nevada" },
22756
+ { value: "NH", label: "New Hampshire" },
22757
+ { value: "NJ", label: "New Jersey" },
22758
+ { value: "NM", label: "New Mexico" },
22759
+ { value: "NY", label: "New York" },
22760
+ { value: "NC", label: "North Carolina" },
22761
+ { value: "ND", label: "North Dakota" },
22762
+ { value: "OH", label: "Ohio" },
22763
+ { value: "OK", label: "Oklahoma" },
22764
+ { value: "OR", label: "Oregon" },
22765
+ { value: "PA", label: "Pennsylvania" },
22766
+ { value: "RI", label: "Rhode Island" },
22767
+ { value: "SC", label: "South Carolina" },
22768
+ { value: "SD", label: "South Dakota" },
22769
+ { value: "TN", label: "Tennessee" },
22770
+ { value: "TX", label: "Texas" },
22771
+ { value: "UT", label: "Utah" },
22772
+ { value: "VT", label: "Vermont" },
22773
+ { value: "VA", label: "Virginia" },
22774
+ { value: "WA", label: "Washington" },
22775
+ { value: "WV", label: "West Virginia" },
22776
+ { value: "WI", label: "Wisconsin" },
22777
+ { value: "WY", label: "Wyoming" },
22778
+ { value: "PR", label: "Puerto Rico" }
22779
+ ];
22780
+
22781
+ // src/components/Input/USStateSelect.tsx
22782
+ import { jsx as jsx240 } from "react/jsx-runtime";
22783
+ var findSelectOption2 = (options, selected) => {
22784
+ if (!selected) {
22785
+ return void 0;
22786
+ }
22787
+ return options.find(
22788
+ (o) => String(o.value).toLowerCase() === String(selected).toLowerCase() || String(o.label).toLowerCase() === String(selected).toLowerCase()
22789
+ );
22790
+ };
22791
+ var USStateSelect = ({ value, onChange }) => {
22792
+ const usStateOptions = US_STATES.map((state) => ({
22793
+ label: state.label,
22794
+ value: state.value
22795
+ }));
22796
+ return /* @__PURE__ */ jsx240(
22797
+ Select,
22798
+ {
22799
+ options: usStateOptions,
22800
+ value: findSelectOption2(usStateOptions, value),
22801
+ onChange: (option) => onChange(option),
22802
+ placeholder: "US state"
22803
+ }
22804
+ );
22805
+ };
22806
+
22807
+ // src/components/Input/PhoneInput.tsx
22808
+ import { formatIncompletePhoneNumber } from "libphonenumber-js";
22809
+ import { jsx as jsx241 } from "react/jsx-runtime";
22810
+ var PhoneInput = (_a) => {
22811
+ var _b = _a, {
22812
+ value,
22813
+ onChange,
22814
+ placeholder = "Phone number"
22815
+ } = _b, props = __objRest(_b, [
22816
+ "value",
22817
+ "onChange",
22818
+ "placeholder"
22819
+ ]);
22820
+ const handleChange = (e) => {
22821
+ const input = e.target.value;
22822
+ const formattedNumber = formatIncompletePhoneNumber(input, "US");
22823
+ onChange(formattedNumber != null ? formattedNumber : input);
22824
+ };
22825
+ return /* @__PURE__ */ jsx241(
22826
+ Input,
22827
+ __spreadValues({
22828
+ type: "tel",
22829
+ value: value ? formatIncompletePhoneNumber(value, "US") : void 0,
22830
+ onChange: handleChange,
22831
+ placeholder,
22832
+ "aria-label": "Phone number input"
22833
+ }, props)
22834
+ );
22835
+ };
22836
+
22837
+ // src/components/BusinessForm/BusinessForm.tsx
22838
+ import { isPossiblePhoneNumber } from "libphonenumber-js";
22839
+ import { Fragment as Fragment42, jsx as jsx242, jsxs as jsxs155 } from "react/jsx-runtime";
22840
+ var BusinessForm2 = ({ stringOverrides, onSuccess }) => {
22841
+ var _a;
22842
+ const { form, submitError, isFormValid } = useBusinessForm({ onSuccess });
22843
+ const { isSubmitting } = form.state;
22844
+ return /* @__PURE__ */ jsxs155(
22845
+ "form",
22846
+ {
22847
+ className: "Layer__form Layer__business-form",
22848
+ onSubmit: (e) => {
22849
+ e.preventDefault();
22850
+ e.stopPropagation();
22851
+ void form.handleSubmit();
22852
+ },
22853
+ children: [
22854
+ /* @__PURE__ */ jsxs155(FormSection, { title: "Contact information", children: [
22855
+ /* @__PURE__ */ jsxs155("div", { className: "Layer__business-form__name-fields", children: [
22856
+ /* @__PURE__ */ jsx242(
22857
+ form.Field,
22858
+ {
22859
+ name: "full_name",
22860
+ validators: {
22861
+ onSubmit: ({ value }) => notEmpty(value) ? void 0 : "Full name is required"
22862
+ },
22863
+ children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "full_name", label: "Full name", children: /* @__PURE__ */ jsx242(
22864
+ Input,
22865
+ {
22866
+ name: "full_name",
22867
+ placeholder: "John Doe",
22868
+ value: field.state.value,
22869
+ onChange: (e) => field.handleChange(e.target.value),
22870
+ isInvalid: field.state.meta.errors.length > 0,
22871
+ errorMessage: field.state.meta.errors.join(", ")
22872
+ }
22873
+ ) }) })
22874
+ }
22875
+ ),
22876
+ /* @__PURE__ */ jsx242(form.Field, { name: "preferred_name", children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "preferred_name", label: "Preferred name", children: /* @__PURE__ */ jsx242(
22877
+ Input,
22878
+ {
22879
+ name: "preferred_name",
22880
+ placeholder: "John",
22881
+ value: field.state.value,
22882
+ onChange: (e) => field.handleChange(e.target.value)
22883
+ }
22884
+ ) }) }) })
22885
+ ] }),
22886
+ /* @__PURE__ */ jsx242(
22887
+ form.Field,
22888
+ {
22889
+ name: "email",
22890
+ validators: {
22891
+ onSubmit: ({ value }) => validateEmailFormat(value, true) ? void 0 : "Email is invalid"
22892
+ },
22893
+ children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(
22894
+ InputGroup,
22895
+ {
22896
+ name: "email",
22897
+ label: "What\u2019s the email you want to use for bookkeeping communication?",
22898
+ children: /* @__PURE__ */ jsx242(
22899
+ Input,
22900
+ {
22901
+ name: "email",
22902
+ placeholder: "john@company.com",
22903
+ value: field.state.value,
22904
+ onChange: (e) => field.handleChange(e.target.value),
22905
+ isInvalid: field.state.meta.errors.length > 0,
22906
+ errorMessage: field.state.meta.errors.join(", ")
22907
+ }
22908
+ )
22909
+ }
22910
+ ) })
22911
+ }
22912
+ ),
22913
+ /* @__PURE__ */ jsx242(
22914
+ form.Field,
22915
+ {
22916
+ name: "phone_number",
22917
+ validators: {
22918
+ onSubmit: ({ value }) => isPossiblePhoneNumber(value != null ? value : "", "US") ? void 0 : "Phone number is invalid"
22919
+ },
22920
+ children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(
22921
+ InputGroup,
22922
+ {
22923
+ name: "phone_number",
22924
+ label: "What\u2019s the phone number you want to use for bookkeeping communication?",
22925
+ children: /* @__PURE__ */ jsx242(
22926
+ PhoneInput,
22927
+ {
22928
+ value: field.state.value,
22929
+ onChange: (value) => field.handleChange(value),
22930
+ isInvalid: field.state.meta.errors.length > 0,
22931
+ errorMessage: field.state.meta.errors.join(", ")
22932
+ }
22933
+ )
22934
+ }
22935
+ ) })
22936
+ }
22937
+ )
22938
+ ] }),
22939
+ /* @__PURE__ */ jsxs155(FormSection, { title: "Business information", children: [
22940
+ /* @__PURE__ */ jsx242(
22941
+ form.Field,
22942
+ {
22943
+ name: "legal_name",
22944
+ validators: {
22945
+ onBlur: ({ value }) => notEmpty(value) ? void 0 : "Company name is required"
22946
+ },
22947
+ children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "legal_name", label: "Company", children: /* @__PURE__ */ jsx242(
22948
+ Input,
22949
+ {
22950
+ name: "legal_name",
22951
+ placeholder: "Company",
22952
+ value: field.state.value,
22953
+ onChange: (e) => field.handleChange(e.target.value),
22954
+ isInvalid: field.state.meta.errors.length > 0,
22955
+ errorMessage: field.state.meta.errors.join(", ")
22956
+ }
22957
+ ) }) })
22958
+ }
22959
+ ),
22960
+ /* @__PURE__ */ jsx242(form.Field, { name: "dba", children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "dba", label: "DBA (optional)", children: /* @__PURE__ */ jsx242(
22961
+ Input,
22962
+ {
22963
+ name: "dba",
22964
+ placeholder: "Alternative name",
22965
+ value: field.state.value,
22966
+ onChange: (e) => field.handleChange(e.target.value),
22967
+ isInvalid: field.state.meta.errors.length > 0,
22968
+ errorMessage: field.state.meta.errors.join(", ")
22969
+ }
22970
+ ) }) }) }),
22971
+ /* @__PURE__ */ jsx242(form.Field, { name: "entity_type", children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "entity_type", label: "Entity type", children: /* @__PURE__ */ jsx242(
22972
+ BusinessTypeSelect,
22973
+ {
22974
+ value: field.state.value,
22975
+ onChange: (value) => field.handleChange(value)
22976
+ }
22977
+ ) }) }) }),
22978
+ /* @__PURE__ */ jsxs155("div", { className: "Layer__business-form__state-tin-fields", children: [
22979
+ /* @__PURE__ */ jsx242(form.Field, { name: "us_state", children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "us_state", label: "State", className: "Layer__business-form__state", children: /* @__PURE__ */ jsx242(
22980
+ USStateSelect,
22981
+ {
22982
+ value: field.state.value,
22983
+ onChange: (option) => field.handleChange(option.value)
22984
+ }
22985
+ ) }) }) }),
22986
+ /* @__PURE__ */ jsx242(form.Field, { name: "tin", children: (field) => /* @__PURE__ */ jsx242(Fragment42, { children: /* @__PURE__ */ jsx242(InputGroup, { name: "tin", label: "Tax ID number (optional)", children: /* @__PURE__ */ jsx242(
22987
+ Input,
22988
+ {
22989
+ name: "tin",
22990
+ placeholder: "Tax ID number",
22991
+ value: field.state.value,
22992
+ onChange: (e) => field.handleChange(e.target.value),
22993
+ isInvalid: field.state.meta.errors.length > 0,
22994
+ errorMessage: field.state.meta.errors.join(", ")
22995
+ }
22996
+ ) }) }) })
22997
+ ] })
22998
+ ] }),
22999
+ /* @__PURE__ */ jsx242(
23000
+ SubmitButton,
23001
+ {
23002
+ type: "submit",
23003
+ processing: isSubmitting,
23004
+ noIcon: true,
23005
+ withRetry: true,
23006
+ error: submitError,
23007
+ children: (_a = stringOverrides == null ? void 0 : stringOverrides.saveButton) != null ? _a : "Save"
23008
+ }
23009
+ ),
23010
+ !isFormValid && /* @__PURE__ */ jsx242(ErrorText, { pb: "xs", children: "Please check all fields." })
23011
+ ]
23012
+ }
23013
+ );
23014
+ };
23015
+
23016
+ // src/components/PlatformOnboarding/Steps/BusinessInfoStep.tsx
23017
+ import { Fragment as Fragment43, jsx as jsx243, jsxs as jsxs156 } from "react/jsx-runtime";
23018
+ var defaultTitle3 = "We\u2019ll use this information to contact you whenever we have questions on your books.";
23019
+ var BusinessInfoStep = ({ title = defaultTitle3, onNext }) => {
23020
+ return /* @__PURE__ */ jsxs156(Fragment43, { children: [
23021
+ /* @__PURE__ */ jsx243(Heading2, { children: title }),
23022
+ /* @__PURE__ */ jsx243(BusinessForm2, { onSuccess: onNext })
23023
+ ] });
23024
+ };
23025
+
23026
+ // src/components/PlatformOnboarding/PlatformOnboarding.tsx
23027
+ import { jsx as jsx244, jsxs as jsxs157 } from "react/jsx-runtime";
23028
+ var PLATFORM_ONBOARDING_STEPS = [
23029
+ {
23030
+ id: "welcome",
23031
+ label: "Get started"
23032
+ },
23033
+ {
23034
+ id: "business-info",
23035
+ label: "Confirm your informations"
23036
+ },
23037
+ {
23038
+ id: "link-accounts",
23039
+ label: "Connect accounts"
23040
+ },
23041
+ {
23042
+ id: "summary",
23043
+ label: "Summary"
23044
+ }
23045
+ ];
23046
+ var PlatformOnboarding = ({ onComplete }) => {
23047
+ const [step, setStep] = useState61(PLATFORM_ONBOARDING_STEPS[0].id);
23048
+ const isFirstStep = PLATFORM_ONBOARDING_STEPS[0].id === step;
23049
+ const nextStep = () => {
23050
+ const currentStepIndex = PLATFORM_ONBOARDING_STEPS.findIndex((s) => s.id === step);
23051
+ if (currentStepIndex === PLATFORM_ONBOARDING_STEPS.length - 1) {
23052
+ onComplete == null ? void 0 : onComplete();
23053
+ return;
23054
+ }
23055
+ const nextStep2 = PLATFORM_ONBOARDING_STEPS[currentStepIndex + 1];
23056
+ if (nextStep2) {
23057
+ setStep(nextStep2.id);
23058
+ }
23059
+ };
23060
+ const previousStep = () => {
23061
+ const currentStepIndex = PLATFORM_ONBOARDING_STEPS.findIndex((s) => s.id === step);
23062
+ const previousStep2 = PLATFORM_ONBOARDING_STEPS[currentStepIndex - 1];
23063
+ if (previousStep2) {
23064
+ setStep(previousStep2.id);
23065
+ }
23066
+ };
23067
+ const renderStepContent = () => {
23068
+ switch (step) {
23069
+ case "welcome":
23070
+ return /* @__PURE__ */ jsx244(WelcomeStep, { onNext: nextStep, stepsEnabled: PLATFORM_ONBOARDING_STEPS.map((s) => s.id) });
23071
+ case "business-info":
23072
+ return /* @__PURE__ */ jsx244(BusinessInfoStep, { onNext: nextStep });
23073
+ case "link-accounts":
23074
+ return /* @__PURE__ */ jsx244(LinkAccounts, { onComplete: nextStep });
23075
+ case "summary":
23076
+ return /* @__PURE__ */ jsx244(SummaryStep, { onNext: nextStep });
23077
+ }
23078
+ };
23079
+ const renderStepFooter = () => {
23080
+ if (step === "welcome") {
23081
+ return /* @__PURE__ */ jsx244(WelcomeStepFooter, {});
23082
+ }
23083
+ };
23084
+ return /* @__PURE__ */ jsx244("div", { className: "Layer__component Layer__platform-onboarding", children: /* @__PURE__ */ jsxs157("div", { className: "Layer__platform-onboarding-layout", children: [
23085
+ !isFirstStep && /* @__PURE__ */ jsx244("div", { className: "Layer__platform-onboarding__back-button-container", children: /* @__PURE__ */ jsx244(
23086
+ Button,
23087
+ {
23088
+ onClick: previousStep,
23089
+ variant: "secondary" /* secondary */,
23090
+ children: "Back"
23091
+ }
23092
+ ) }),
23093
+ /* @__PURE__ */ jsxs157("div", { className: "Layer__platfom-onboarding-layout__box", children: [
23094
+ PLATFORM_ONBOARDING_STEPS.length > 1 && /* @__PURE__ */ jsx244(
23095
+ ProgressSteps,
23096
+ {
23097
+ steps: PLATFORM_ONBOARDING_STEPS.map((step2) => step2.label),
23098
+ currentStep: step === "summary" ? PLATFORM_ONBOARDING_STEPS.length : PLATFORM_ONBOARDING_STEPS.findIndex((s) => s.id === step)
23099
+ }
23100
+ ),
23101
+ /* @__PURE__ */ jsx244("div", { className: "Layer__platform-onboarding-layout__content", children: renderStepContent() })
23102
+ ] }),
23103
+ /* @__PURE__ */ jsx244("div", { className: "Layer__platform-onboarding-layout__footer", children: renderStepFooter() })
23104
+ ] }) });
23105
+ };
23106
+
23107
+ // src/icons/Coffee.tsx
23108
+ import { jsx as jsx245, jsxs as jsxs158 } from "react/jsx-runtime";
23109
+ var CoffeeIcon = (_a) => {
23110
+ var _b = _a, { size = 11 } = _b, props = __objRest(_b, ["size"]);
23111
+ return /* @__PURE__ */ jsxs158(
23112
+ "svg",
23113
+ __spreadProps(__spreadValues({
23114
+ xmlns: "http://www.w3.org/2000/svg",
23115
+ viewBox: "0 0 12 12",
23116
+ fill: "none"
23117
+ }, props), {
23118
+ width: size,
23119
+ height: size,
23120
+ children: [
23121
+ /* @__PURE__ */ jsxs158("g", { clipPath: "url(#clip0_5018_10141)", children: [
23122
+ /* @__PURE__ */ jsx245(
23123
+ "path",
23124
+ {
23125
+ 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",
23126
+ stroke: "currentColor",
23127
+ strokeLinecap: "round",
23128
+ strokeLinejoin: "round"
23129
+ }
23130
+ ),
23131
+ /* @__PURE__ */ jsx245(
23132
+ "path",
23133
+ {
23134
+ 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",
23135
+ stroke: "currentColor",
23136
+ strokeLinecap: "round",
23137
+ strokeLinejoin: "round"
23138
+ }
23139
+ ),
23140
+ /* @__PURE__ */ jsx245(
23141
+ "path",
23142
+ {
23143
+ d: "M8.75 0.958344V2.33334",
23144
+ stroke: "currentColor",
23145
+ strokeLinecap: "round",
23146
+ strokeLinejoin: "round"
23147
+ }
23148
+ ),
23149
+ /* @__PURE__ */ jsx245(
23150
+ "path",
23151
+ {
23152
+ d: "M6.91663 0.958344V2.33334",
23153
+ stroke: "currentColor",
23154
+ strokeLinecap: "round",
23155
+ strokeLinejoin: "round"
23156
+ }
23157
+ ),
23158
+ /* @__PURE__ */ jsx245(
23159
+ "path",
23160
+ {
23161
+ d: "M5.08337 0.958344V2.33334",
23162
+ stroke: "currentColor",
23163
+ strokeLinecap: "round",
22041
23164
  strokeLinejoin: "round"
22042
23165
  }
22043
23166
  )
22044
23167
  ] }),
22045
- /* @__PURE__ */ jsx232("defs", { children: /* @__PURE__ */ jsx232("clipPath", { id: "clip0_5018_10141", children: /* @__PURE__ */ jsx232(
23168
+ /* @__PURE__ */ jsx245("defs", { children: /* @__PURE__ */ jsx245("clipPath", { id: "clip0_5018_10141", children: /* @__PURE__ */ jsx245(
22046
23169
  "rect",
22047
23170
  {
22048
23171
  width: "11",
@@ -22058,17 +23181,17 @@ var CoffeeIcon = (_a) => {
22058
23181
  var Coffee_default = CoffeeIcon;
22059
23182
 
22060
23183
  // src/components/UpsellBanner/BookkeepingUpsellBar.tsx
22061
- import { jsx as jsx233, jsxs as jsxs150 } from "react/jsx-runtime";
23184
+ import { jsx as jsx246, jsxs as jsxs159 } from "react/jsx-runtime";
22062
23185
  var BookkeepingUpsellBar = ({
22063
23186
  onClick,
22064
23187
  href
22065
23188
  }) => {
22066
- return /* @__PURE__ */ jsxs150("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping", children: [
22067
- /* @__PURE__ */ jsxs150("div", { className: "Layer__bar-banner__left-col", children: [
22068
- /* @__PURE__ */ jsx233(IconBox, { children: /* @__PURE__ */ jsx233(Coffee_default, {}) }),
22069
- /* @__PURE__ */ jsxs150("div", { className: "Layer__bar-banner__text-container", children: [
22070
- /* @__PURE__ */ jsx233(Text, { size: "md" /* md */, weight: "bold" /* bold */, children: "Need help with your books?" }),
22071
- /* @__PURE__ */ jsx233(
23189
+ return /* @__PURE__ */ jsxs159("div", { className: "Layer__bar-banner Layer__bar-banner--bookkeeping", children: [
23190
+ /* @__PURE__ */ jsxs159("div", { className: "Layer__bar-banner__left-col", children: [
23191
+ /* @__PURE__ */ jsx246(IconBox, { children: /* @__PURE__ */ jsx246(Coffee_default, {}) }),
23192
+ /* @__PURE__ */ jsxs159("div", { className: "Layer__bar-banner__text-container", children: [
23193
+ /* @__PURE__ */ jsx246(Text, { size: "md" /* md */, weight: "bold" /* bold */, children: "Need help with your books?" }),
23194
+ /* @__PURE__ */ jsx246(
22072
23195
  Text,
22073
23196
  {
22074
23197
  size: "sm" /* sm */,
@@ -22078,25 +23201,25 @@ var BookkeepingUpsellBar = ({
22078
23201
  )
22079
23202
  ] })
22080
23203
  ] }),
22081
- onClick ? /* @__PURE__ */ jsx233(Button, { variant: "secondary" /* secondary */, onClick, children: "Schedule a demo" }) : href ? /* @__PURE__ */ jsx233(Link2, { href, target: "_blank", variant: "secondary" /* secondary */, children: "Schedule a demo" }) : null
23204
+ onClick ? /* @__PURE__ */ jsx246(Button, { variant: "secondary" /* secondary */, onClick, children: "Schedule a demo" }) : href ? /* @__PURE__ */ jsx246(Link2, { href, target: "_blank", variant: "secondary" /* secondary */, children: "Schedule a demo" }) : null
22082
23205
  ] });
22083
23206
  };
22084
23207
 
22085
23208
  // src/views/BookkeepingOverview/BookkeepingOverview.tsx
22086
- import { useState as useState60 } from "react";
23209
+ import { useState as useState62 } from "react";
22087
23210
 
22088
23211
  // src/views/BookkeepingOverview/internal/BookkeepingProfitAndLossSummariesContainer.tsx
22089
- import { jsx as jsx234 } from "react/jsx-runtime";
23212
+ import { jsx as jsx247 } from "react/jsx-runtime";
22090
23213
  var CLASS_NAME10 = "Layer__BookkeepingProfitAndLossSummariesContainer";
22091
23214
  function BookkeepingProfitAndLossSummariesContainer({
22092
23215
  children
22093
23216
  }) {
22094
- return /* @__PURE__ */ jsx234("div", { className: CLASS_NAME10, children });
23217
+ return /* @__PURE__ */ jsx247("div", { className: CLASS_NAME10, children });
22095
23218
  }
22096
23219
 
22097
23220
  // src/views/BookkeepingOverview/BookkeepingOverview.tsx
22098
- import classNames74 from "classnames";
22099
- import { jsx as jsx235, jsxs as jsxs151 } from "react/jsx-runtime";
23221
+ import classNames75 from "classnames";
23222
+ import { jsx as jsx248, jsxs as jsxs160 } from "react/jsx-runtime";
22100
23223
  var BookkeepingOverview = ({
22101
23224
  title,
22102
23225
  showTitle = true,
@@ -22104,19 +23227,19 @@ var BookkeepingOverview = ({
22104
23227
  slotProps
22105
23228
  }) => {
22106
23229
  var _a, _b, _c, _d, _e, _f;
22107
- const [pnlToggle, setPnlToggle] = useState60("expenses");
23230
+ const [pnlToggle, setPnlToggle] = useState62("expenses");
22108
23231
  const [width] = useWindowSize();
22109
23232
  const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
22110
- return /* @__PURE__ */ jsx235(ProfitAndLoss, { asContainer: false, children: /* @__PURE__ */ jsx235(TasksProvider, { children: /* @__PURE__ */ jsxs151(
23233
+ return /* @__PURE__ */ jsx248(ProfitAndLoss, { asContainer: false, children: /* @__PURE__ */ jsx248(TasksProvider, { children: /* @__PURE__ */ jsxs160(
22111
23234
  View,
22112
23235
  {
22113
23236
  viewClassName: "Layer__bookkeeping-overview--view",
22114
23237
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "Bookkeeping overview",
22115
23238
  withSidebar: width > 1100,
22116
- sidebar: /* @__PURE__ */ jsx235(TasksComponent, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks }),
23239
+ sidebar: /* @__PURE__ */ jsx248(TasksComponent, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks }),
22117
23240
  showHeader: showTitle,
22118
23241
  children: [
22119
- width <= 1100 && /* @__PURE__ */ jsx235(
23242
+ width <= 1100 && /* @__PURE__ */ jsx248(
22120
23243
  TasksComponent,
22121
23244
  {
22122
23245
  collapsable: true,
@@ -22124,33 +23247,33 @@ var BookkeepingOverview = ({
22124
23247
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.tasks
22125
23248
  }
22126
23249
  ),
22127
- /* @__PURE__ */ jsxs151(
23250
+ /* @__PURE__ */ jsxs160(
22128
23251
  Container,
22129
23252
  {
22130
23253
  name: "bookkeeping-overview-profit-and-loss",
22131
23254
  asWidget: true,
22132
23255
  elevated: true,
22133
23256
  children: [
22134
- /* @__PURE__ */ jsx235(
23257
+ /* @__PURE__ */ jsx248(
22135
23258
  ProfitAndLoss.Header,
22136
23259
  {
22137
23260
  text: ((_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.header) || "Profit & Loss",
22138
23261
  withDatePicker: true
22139
23262
  }
22140
23263
  ),
22141
- /* @__PURE__ */ jsx235(BookkeepingProfitAndLossSummariesContainer, { children: /* @__PURE__ */ jsx235(
23264
+ /* @__PURE__ */ jsx248(BookkeepingProfitAndLossSummariesContainer, { children: /* @__PURE__ */ jsx248(
22142
23265
  ProfitAndLoss.Summaries,
22143
23266
  {
22144
23267
  stringOverrides: (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.summaries,
22145
23268
  variants: profitAndLossSummariesVariants
22146
23269
  }
22147
23270
  ) }),
22148
- /* @__PURE__ */ jsx235(ProfitAndLoss.Chart, {})
23271
+ /* @__PURE__ */ jsx248(ProfitAndLoss.Chart, {})
22149
23272
  ]
22150
23273
  }
22151
23274
  ),
22152
- /* @__PURE__ */ jsxs151("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts", children: [
22153
- /* @__PURE__ */ jsx235(
23275
+ /* @__PURE__ */ jsxs160("div", { className: "Layer__bookkeeping-overview-profit-and-loss-charts", children: [
23276
+ /* @__PURE__ */ jsx248(
22154
23277
  Toggle,
22155
23278
  {
22156
23279
  name: "pnl-detailed-charts",
@@ -22168,14 +23291,14 @@ var BookkeepingOverview = ({
22168
23291
  onChange: (e) => setPnlToggle(e.target.value)
22169
23292
  }
22170
23293
  ),
22171
- /* @__PURE__ */ jsx235(
23294
+ /* @__PURE__ */ jsx248(
22172
23295
  Container,
22173
23296
  {
22174
- name: classNames74(
23297
+ name: classNames75(
22175
23298
  "bookkeeping-overview-profit-and-loss-chart",
22176
23299
  pnlToggle !== "revenue" && "bookkeeping-overview-profit-and-loss-chart--hidden"
22177
23300
  ),
22178
- children: /* @__PURE__ */ jsx235(
23301
+ children: /* @__PURE__ */ jsx248(
22179
23302
  ProfitAndLoss.DetailedCharts,
22180
23303
  {
22181
23304
  scope: "revenue",
@@ -22185,14 +23308,14 @@ var BookkeepingOverview = ({
22185
23308
  )
22186
23309
  }
22187
23310
  ),
22188
- /* @__PURE__ */ jsx235(
23311
+ /* @__PURE__ */ jsx248(
22189
23312
  Container,
22190
23313
  {
22191
- name: classNames74(
23314
+ name: classNames75(
22192
23315
  "bookkeeping-overview-profit-and-loss-chart",
22193
23316
  pnlToggle !== "expenses" && "bookkeeping-overview-profit-and-loss-chart--hidden"
22194
23317
  ),
22195
- children: /* @__PURE__ */ jsx235(
23318
+ children: /* @__PURE__ */ jsx248(
22196
23319
  ProfitAndLoss.DetailedCharts,
22197
23320
  {
22198
23321
  scope: "expenses",
@@ -22209,23 +23332,23 @@ var BookkeepingOverview = ({
22209
23332
  };
22210
23333
 
22211
23334
  // src/views/AccountingOverview/AccountingOverview.tsx
22212
- import { useState as useState62 } from "react";
23335
+ import { useState as useState64 } from "react";
22213
23336
 
22214
23337
  // src/views/AccountingOverview/internal/TransactionsToReview.tsx
22215
- import { useContext as useContext54, useEffect as useEffect43, useState as useState61 } from "react";
23338
+ import { useContext as useContext54, useEffect as useEffect43, useState as useState63 } from "react";
22216
23339
 
22217
23340
  // src/components/BadgeLoader/BadgeLoader.tsx
22218
- import { jsx as jsx236, jsxs as jsxs152 } from "react/jsx-runtime";
23341
+ import { jsx as jsx249, jsxs as jsxs161 } from "react/jsx-runtime";
22219
23342
  var BadgeLoader = ({ children }) => {
22220
- return /* @__PURE__ */ jsxs152("span", { className: "Layer__loader Layer__loader--as-badge", children: [
22221
- /* @__PURE__ */ jsx236(Loader_default, { size: 11, className: "Layer__anim--rotating" }),
23343
+ return /* @__PURE__ */ jsxs161("span", { className: "Layer__loader Layer__loader--as-badge", children: [
23344
+ /* @__PURE__ */ jsx249(Loader_default, { size: 11, className: "Layer__anim--rotating" }),
22222
23345
  children
22223
23346
  ] });
22224
23347
  };
22225
23348
 
22226
23349
  // src/views/AccountingOverview/internal/TransactionsToReview.tsx
22227
23350
  import { getMonth as getMonth4, getYear as getYear7, startOfMonth as startOfMonth19 } from "date-fns";
22228
- import { jsx as jsx237, jsxs as jsxs153 } from "react/jsx-runtime";
23351
+ import { jsx as jsx250, jsxs as jsxs162 } from "react/jsx-runtime";
22229
23352
  var CLASS_NAME11 = "Layer__TransactionsToReview";
22230
23353
  function TransactionsToReview({
22231
23354
  onClick,
@@ -22236,7 +23359,7 @@ function TransactionsToReview({
22236
23359
  const { size = "sm" } = variants != null ? variants : {};
22237
23360
  const { dateRange: contextDateRange } = useContext54(ProfitAndLoss.Context);
22238
23361
  const dateRange = usePnlDateRange ? contextDateRange : void 0;
22239
- const [toReview, setToReview] = useState61(0);
23362
+ const [toReview, setToReview] = useState63(0);
22240
23363
  const { data, loaded, error, refetch } = useProfitAndLossLTM({
22241
23364
  currentDate: dateRange ? dateRange.startDate : startOfMonth19(/* @__PURE__ */ new Date()),
22242
23365
  tagFilter
@@ -22266,26 +23389,26 @@ function TransactionsToReview({
22266
23389
  verticalGap = "sm";
22267
23390
  break;
22268
23391
  }
22269
- return /* @__PURE__ */ jsxs153("div", { onClick, className: CLASS_NAME11, children: [
22270
- /* @__PURE__ */ jsxs153(VStack, { gap: verticalGap, align: "start", children: [
22271
- /* @__PURE__ */ jsx237(ProfitAndLossSummariesHeading, { variants, children: "Transactions to review" }),
22272
- loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ jsx237(BadgeLoader, {}) : null,
22273
- loaded === "complete" && error ? /* @__PURE__ */ jsx237(
23392
+ return /* @__PURE__ */ jsxs162("div", { onClick, className: CLASS_NAME11, children: [
23393
+ /* @__PURE__ */ jsxs162(VStack, { gap: verticalGap, align: "start", children: [
23394
+ /* @__PURE__ */ jsx250(ProfitAndLossSummariesHeading, { variants, children: "Transactions to review" }),
23395
+ loaded === "initial" || loaded === "loading" ? /* @__PURE__ */ jsx250(BadgeLoader, {}) : null,
23396
+ loaded === "complete" && error ? /* @__PURE__ */ jsx250(
22274
23397
  Badge,
22275
23398
  {
22276
23399
  variant: "error" /* ERROR */,
22277
23400
  size: "small" /* SMALL */,
22278
- icon: /* @__PURE__ */ jsx237(RefreshCcw_default, { size: 12 }),
23401
+ icon: /* @__PURE__ */ jsx250(RefreshCcw_default, { size: 12 }),
22279
23402
  onClick: () => refetch(),
22280
23403
  children: "Refresh"
22281
23404
  }
22282
23405
  ) : null,
22283
- loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ jsxs153(
23406
+ loaded === "complete" && !error && toReview > 0 ? /* @__PURE__ */ jsxs162(
22284
23407
  Badge,
22285
23408
  {
22286
23409
  variant: "warning" /* WARNING */,
22287
23410
  size: "small" /* SMALL */,
22288
- icon: /* @__PURE__ */ jsx237(Bell_default, { size: 12 }),
23411
+ icon: /* @__PURE__ */ jsx250(Bell_default, { size: 12 }),
22289
23412
  children: [
22290
23413
  toReview,
22291
23414
  " ",
@@ -22293,23 +23416,23 @@ function TransactionsToReview({
22293
23416
  ]
22294
23417
  }
22295
23418
  ) : null,
22296
- loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ jsx237(
23419
+ loaded === "complete" && !error && toReview === 0 ? /* @__PURE__ */ jsx250(
22297
23420
  Badge,
22298
23421
  {
22299
23422
  variant: "success" /* SUCCESS */,
22300
23423
  size: "small" /* SMALL */,
22301
- icon: /* @__PURE__ */ jsx237(Check_default, { size: 12 }),
23424
+ icon: /* @__PURE__ */ jsx250(Check_default, { size: 12 }),
22302
23425
  children: "All done"
22303
23426
  }
22304
23427
  ) : null
22305
23428
  ] }),
22306
- /* @__PURE__ */ jsx237(IconButton, { icon: /* @__PURE__ */ jsx237(ChevronRight_default, {}), withBorder: true, onClick })
23429
+ /* @__PURE__ */ jsx250(IconButton, { icon: /* @__PURE__ */ jsx250(ChevronRight_default, {}), withBorder: true, onClick })
22307
23430
  ] });
22308
23431
  }
22309
23432
 
22310
23433
  // src/views/AccountingOverview/AccountingOverview.tsx
22311
- import classNames75 from "classnames";
22312
- import { jsx as jsx238, jsxs as jsxs154 } from "react/jsx-runtime";
23434
+ import classNames76 from "classnames";
23435
+ import { jsx as jsx251, jsxs as jsxs163 } from "react/jsx-runtime";
22313
23436
  var AccountingOverview = ({
22314
23437
  title = "Accounting overview",
22315
23438
  showTitle = true,
@@ -22324,35 +23447,35 @@ var AccountingOverview = ({
22324
23447
  slotProps
22325
23448
  }) => {
22326
23449
  var _a, _b, _c, _d, _e;
22327
- const [pnlToggle, setPnlToggle] = useState62("expenses");
23450
+ const [pnlToggle, setPnlToggle] = useState64("expenses");
22328
23451
  const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
22329
- return /* @__PURE__ */ jsx238(
23452
+ return /* @__PURE__ */ jsx251(
22330
23453
  ProfitAndLoss,
22331
23454
  {
22332
23455
  asContainer: false,
22333
23456
  tagFilter: tagFilter ? { key: tagFilter.tagKey, values: tagFilter.tagValues } : void 0,
22334
- children: /* @__PURE__ */ jsxs154(
23457
+ children: /* @__PURE__ */ jsxs163(
22335
23458
  View,
22336
23459
  {
22337
23460
  title,
22338
23461
  showHeader: showTitle,
22339
- header: /* @__PURE__ */ jsx238(Header2, { children: /* @__PURE__ */ jsx238(HeaderRow, { children: /* @__PURE__ */ jsx238(HeaderCol, { children: /* @__PURE__ */ jsx238(ProfitAndLoss.DatePicker, {}) }) }) }),
23462
+ header: /* @__PURE__ */ jsx251(Header2, { children: /* @__PURE__ */ jsx251(HeaderRow, { children: /* @__PURE__ */ jsx251(HeaderCol, { children: /* @__PURE__ */ jsx251(ProfitAndLoss.DatePicker, {}) }) }) }),
22340
23463
  children: [
22341
- enableOnboarding && /* @__PURE__ */ jsx238(
23464
+ enableOnboarding && /* @__PURE__ */ jsx251(
22342
23465
  Onboarding,
22343
23466
  {
22344
23467
  onTransactionsToReviewClick,
22345
23468
  onboardingStepOverride
22346
23469
  }
22347
23470
  ),
22348
- /* @__PURE__ */ jsx238(
23471
+ /* @__PURE__ */ jsx251(
22349
23472
  Internal_ProfitAndLossSummaries,
22350
23473
  {
22351
23474
  stringOverrides: (_c = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _c.summaries,
22352
23475
  chartColorsList,
22353
23476
  slots: {
22354
23477
  unstable_AdditionalListItems: showTransactionsToReview ? [
22355
- /* @__PURE__ */ jsx238(
23478
+ /* @__PURE__ */ jsx251(
22356
23479
  TransactionsToReview,
22357
23480
  {
22358
23481
  usePnlDateRange: true,
@@ -22366,20 +23489,20 @@ var AccountingOverview = ({
22366
23489
  variants: profitAndLossSummariesVariants
22367
23490
  }
22368
23491
  ),
22369
- /* @__PURE__ */ jsxs154(
23492
+ /* @__PURE__ */ jsxs163(
22370
23493
  Container,
22371
23494
  {
22372
23495
  name: "accounting-overview-profit-and-loss",
22373
23496
  asWidget: true,
22374
23497
  elevated: true,
22375
23498
  children: [
22376
- /* @__PURE__ */ jsx238(
23499
+ /* @__PURE__ */ jsx251(
22377
23500
  ProfitAndLoss.Header,
22378
23501
  {
22379
23502
  text: (stringOverrides == null ? void 0 : stringOverrides.header) || "Profit & Loss"
22380
23503
  }
22381
23504
  ),
22382
- /* @__PURE__ */ jsx238(
23505
+ /* @__PURE__ */ jsx251(
22383
23506
  ProfitAndLoss.Chart,
22384
23507
  {
22385
23508
  tagFilter: tagFilter ? { key: tagFilter.tagKey, values: tagFilter.tagValues } : void 0
@@ -22388,9 +23511,9 @@ var AccountingOverview = ({
22388
23511
  ]
22389
23512
  }
22390
23513
  ),
22391
- middleBanner && /* @__PURE__ */ jsx238(Container, { name: "accounting-overview-middle-banner", children: middleBanner }),
22392
- /* @__PURE__ */ jsxs154("div", { className: "Layer__accounting-overview-profit-and-loss-charts", children: [
22393
- /* @__PURE__ */ jsx238(
23514
+ middleBanner && /* @__PURE__ */ jsx251(Container, { name: "accounting-overview-middle-banner", children: middleBanner }),
23515
+ /* @__PURE__ */ jsxs163("div", { className: "Layer__accounting-overview-profit-and-loss-charts", children: [
23516
+ /* @__PURE__ */ jsx251(
22394
23517
  Toggle,
22395
23518
  {
22396
23519
  name: "pnl-detailed-charts",
@@ -22408,14 +23531,14 @@ var AccountingOverview = ({
22408
23531
  onChange: (e) => setPnlToggle(e.target.value)
22409
23532
  }
22410
23533
  ),
22411
- /* @__PURE__ */ jsx238(
23534
+ /* @__PURE__ */ jsx251(
22412
23535
  Container,
22413
23536
  {
22414
- name: classNames75(
23537
+ name: classNames76(
22415
23538
  "accounting-overview-profit-and-loss-chart",
22416
23539
  pnlToggle !== "revenue" && "accounting-overview-profit-and-loss-chart--hidden"
22417
23540
  ),
22418
- children: /* @__PURE__ */ jsx238(
23541
+ children: /* @__PURE__ */ jsx251(
22419
23542
  ProfitAndLoss.DetailedCharts,
22420
23543
  {
22421
23544
  scope: "revenue",
@@ -22426,14 +23549,14 @@ var AccountingOverview = ({
22426
23549
  )
22427
23550
  }
22428
23551
  ),
22429
- /* @__PURE__ */ jsx238(
23552
+ /* @__PURE__ */ jsx251(
22430
23553
  Container,
22431
23554
  {
22432
- name: classNames75(
23555
+ name: classNames76(
22433
23556
  "accounting-overview-profit-and-loss-chart",
22434
23557
  pnlToggle !== "expenses" && "accounting-overview-profit-and-loss-chart--hidden"
22435
23558
  ),
22436
- children: /* @__PURE__ */ jsx238(
23559
+ children: /* @__PURE__ */ jsx251(
22437
23560
  ProfitAndLoss.DetailedCharts,
22438
23561
  {
22439
23562
  scope: "expenses",
@@ -22453,7 +23576,7 @@ var AccountingOverview = ({
22453
23576
  };
22454
23577
 
22455
23578
  // src/views/BankTransactionsWithLinkedAccounts/BankTransactionsWithLinkedAccounts.tsx
22456
- import { jsx as jsx239, jsxs as jsxs155 } from "react/jsx-runtime";
23579
+ import { jsx as jsx252, jsxs as jsxs164 } from "react/jsx-runtime";
22457
23580
  var BankTransactionsWithLinkedAccounts = ({
22458
23581
  title,
22459
23582
  // deprecated
@@ -22469,13 +23592,13 @@ var BankTransactionsWithLinkedAccounts = ({
22469
23592
  mobileComponent,
22470
23593
  stringOverrides
22471
23594
  }) => {
22472
- return /* @__PURE__ */ jsxs155(
23595
+ return /* @__PURE__ */ jsxs164(
22473
23596
  View,
22474
23597
  {
22475
23598
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "Bank transactions",
22476
23599
  showHeader: showTitle,
22477
23600
  children: [
22478
- /* @__PURE__ */ jsx239(
23601
+ /* @__PURE__ */ jsx252(
22479
23602
  LinkedAccounts,
22480
23603
  {
22481
23604
  elevated: elevatedLinkedAccounts,
@@ -22485,7 +23608,7 @@ var BankTransactionsWithLinkedAccounts = ({
22485
23608
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.linkedAccounts
22486
23609
  }
22487
23610
  ),
22488
- /* @__PURE__ */ jsx239(
23611
+ /* @__PURE__ */ jsx252(
22489
23612
  BankTransactions,
22490
23613
  {
22491
23614
  asWidget: true,
@@ -22503,8 +23626,8 @@ var BankTransactionsWithLinkedAccounts = ({
22503
23626
  };
22504
23627
 
22505
23628
  // src/views/GeneralLedger/GeneralLedger.tsx
22506
- import { useState as useState63 } from "react";
22507
- import { jsx as jsx240, jsxs as jsxs156 } from "react/jsx-runtime";
23629
+ import { useState as useState65 } from "react";
23630
+ import { jsx as jsx253, jsxs as jsxs165 } from "react/jsx-runtime";
22508
23631
  var GeneralLedgerView = ({
22509
23632
  title,
22510
23633
  // deprecated
@@ -22512,14 +23635,14 @@ var GeneralLedgerView = ({
22512
23635
  stringOverrides,
22513
23636
  chartOfAccountsOptions
22514
23637
  }) => {
22515
- const [activeTab, setActiveTab] = useState63("chartOfAccounts");
22516
- return /* @__PURE__ */ jsx240(ProfitAndLoss, { asContainer: false, children: /* @__PURE__ */ jsxs156(
23638
+ const [activeTab, setActiveTab] = useState65("chartOfAccounts");
23639
+ return /* @__PURE__ */ jsx253(ProfitAndLoss, { asContainer: false, children: /* @__PURE__ */ jsxs165(
22517
23640
  View,
22518
23641
  {
22519
23642
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || "General Ledger",
22520
23643
  showHeader: showTitle,
22521
23644
  children: [
22522
- /* @__PURE__ */ jsx240(
23645
+ /* @__PURE__ */ jsx253(
22523
23646
  Toggle,
22524
23647
  {
22525
23648
  name: "general-ledger-tabs",
@@ -22537,7 +23660,7 @@ var GeneralLedgerView = ({
22537
23660
  onChange: (opt) => setActiveTab(opt.target.value)
22538
23661
  }
22539
23662
  ),
22540
- activeTab === "chartOfAccounts" ? /* @__PURE__ */ jsx240(
23663
+ activeTab === "chartOfAccounts" ? /* @__PURE__ */ jsx253(
22541
23664
  ChartOfAccounts,
22542
23665
  {
22543
23666
  asWidget: true,
@@ -22547,16 +23670,16 @@ var GeneralLedgerView = ({
22547
23670
  templateAccountsEditable: chartOfAccountsOptions == null ? void 0 : chartOfAccountsOptions.templateAccountsEditable,
22548
23671
  showReversalEntries: chartOfAccountsOptions == null ? void 0 : chartOfAccountsOptions.showReversalEntries
22549
23672
  }
22550
- ) : /* @__PURE__ */ jsx240(Journal, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.journal })
23673
+ ) : /* @__PURE__ */ jsx253(Journal, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.journal })
22551
23674
  ]
22552
23675
  }
22553
23676
  ) });
22554
23677
  };
22555
23678
 
22556
23679
  // src/views/ProjectProfitability/ProjectProfitability.tsx
22557
- import { useState as useState64 } from "react";
23680
+ import { useState as useState66 } from "react";
22558
23681
  import Select4 from "react-select";
22559
- import { Fragment as Fragment40, jsx as jsx241, jsxs as jsxs157 } from "react/jsx-runtime";
23682
+ import { Fragment as Fragment44, jsx as jsx254, jsxs as jsxs166 } from "react/jsx-runtime";
22560
23683
  var ProjectProfitabilityView = ({
22561
23684
  valueOptions,
22562
23685
  showTitle,
@@ -22564,9 +23687,9 @@ var ProjectProfitabilityView = ({
22564
23687
  datePickerMode = "monthPicker",
22565
23688
  csvMoneyFormat = "DOLLAR_STRING"
22566
23689
  }) => {
22567
- const [activeTab, setActiveTab] = useState64("overview");
22568
- const [tagFilter, setTagFilter] = useState64(null);
22569
- const [pnlTagFilter, setPnlTagFilter] = useState64(
23690
+ const [activeTab, setActiveTab] = useState66("overview");
23691
+ const [tagFilter, setTagFilter] = useState66(null);
23692
+ const [pnlTagFilter, setPnlTagFilter] = useState66(
22570
23693
  void 0
22571
23694
  );
22572
23695
  const isOptionSelected = (option, selectValue) => {
@@ -22580,15 +23703,15 @@ var ProjectProfitabilityView = ({
22580
23703
  values: tagFilter2.tagValues
22581
23704
  } : void 0;
22582
23705
  };
22583
- return /* @__PURE__ */ jsxs157(
23706
+ return /* @__PURE__ */ jsxs166(
22584
23707
  View,
22585
23708
  {
22586
23709
  title: (stringOverrides == null ? void 0 : stringOverrides.title) || "",
22587
23710
  showHeader: showTitle,
22588
23711
  viewClassName: "Layer__project-view",
22589
23712
  children: [
22590
- /* @__PURE__ */ jsxs157("div", { className: "Layer__component Layer__header__actions", children: [
22591
- /* @__PURE__ */ jsx241("div", { className: "Layer__component", children: /* @__PURE__ */ jsx241(
23713
+ /* @__PURE__ */ jsxs166("div", { className: "Layer__component Layer__header__actions", children: [
23714
+ /* @__PURE__ */ jsx254("div", { className: "Layer__component", children: /* @__PURE__ */ jsx254(
22592
23715
  Toggle,
22593
23716
  {
22594
23717
  name: "project-tabs",
@@ -22610,7 +23733,7 @@ var ProjectProfitabilityView = ({
22610
23733
  onChange: (opt) => setActiveTab(opt.target.value)
22611
23734
  }
22612
23735
  ) }),
22613
- /* @__PURE__ */ jsx241(
23736
+ /* @__PURE__ */ jsx254(
22614
23737
  Select4,
22615
23738
  {
22616
23739
  className: "Layer__category-menu Layer__select",
@@ -22629,8 +23752,8 @@ var ProjectProfitabilityView = ({
22629
23752
  }
22630
23753
  )
22631
23754
  ] }),
22632
- /* @__PURE__ */ jsx241(Container, { name: "project", children: /* @__PURE__ */ jsxs157(Fragment40, { children: [
22633
- activeTab === "overview" && /* @__PURE__ */ jsx241(
23755
+ /* @__PURE__ */ jsx254(Container, { name: "project", children: /* @__PURE__ */ jsxs166(Fragment44, { children: [
23756
+ activeTab === "overview" && /* @__PURE__ */ jsx254(
22634
23757
  AccountingOverview,
22635
23758
  {
22636
23759
  stringOverrides: { header: "Project Overview" },
@@ -22641,7 +23764,7 @@ var ProjectProfitabilityView = ({
22641
23764
  showTitle: false
22642
23765
  }
22643
23766
  ),
22644
- activeTab === "transactions" && /* @__PURE__ */ jsx241(
23767
+ activeTab === "transactions" && /* @__PURE__ */ jsx254(
22645
23768
  BankTransactions,
22646
23769
  {
22647
23770
  hideHeader: true,
@@ -22651,7 +23774,7 @@ var ProjectProfitabilityView = ({
22651
23774
  }
22652
23775
  }
22653
23776
  ),
22654
- activeTab === "report" && /* @__PURE__ */ jsx241(ProfitAndLoss, { asContainer: false, tagFilter: pnlTagFilter, children: /* @__PURE__ */ jsx241(
23777
+ activeTab === "report" && /* @__PURE__ */ jsx254(ProfitAndLoss, { asContainer: false, tagFilter: pnlTagFilter, children: /* @__PURE__ */ jsx254(
22655
23778
  ProfitAndLoss.Report,
22656
23779
  {
22657
23780
  stringOverrides,
@@ -22666,8 +23789,8 @@ var ProjectProfitabilityView = ({
22666
23789
  };
22667
23790
 
22668
23791
  // src/views/Reports/Reports.tsx
22669
- import { useState as useState65 } from "react";
22670
- import { Fragment as Fragment41, jsx as jsx242, jsxs as jsxs158 } from "react/jsx-runtime";
23792
+ import { useState as useState67 } from "react";
23793
+ import { Fragment as Fragment45, jsx as jsx255, jsxs as jsxs167 } from "react/jsx-runtime";
22671
23794
  var getOptions = (enabledReports) => {
22672
23795
  return [
22673
23796
  enabledReports.includes("profitAndLoss") ? {
@@ -22694,17 +23817,17 @@ var Reports = ({
22694
23817
  statementOfCashFlowConfig
22695
23818
  }) => {
22696
23819
  var _a;
22697
- const [activeTab, setActiveTab] = useState65(enabledReports[0]);
23820
+ const [activeTab, setActiveTab] = useState67(enabledReports[0]);
22698
23821
  const { view, containerRef } = useElementViewSize();
22699
23822
  const options = getOptions(enabledReports);
22700
- const defaultTitle = enabledReports.length > 1 ? "Reports" : (_a = options.find((option) => option.value = enabledReports[0])) == null ? void 0 : _a.label;
22701
- return /* @__PURE__ */ jsxs158(
23823
+ const defaultTitle4 = enabledReports.length > 1 ? "Reports" : (_a = options.find((option) => option.value = enabledReports[0])) == null ? void 0 : _a.label;
23824
+ return /* @__PURE__ */ jsxs167(
22702
23825
  View,
22703
23826
  {
22704
- title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || defaultTitle,
23827
+ title: (stringOverrides == null ? void 0 : stringOverrides.title) || title || defaultTitle4,
22705
23828
  showHeader: showTitle,
22706
23829
  children: [
22707
- enabledReports.length > 1 && /* @__PURE__ */ jsx242("div", { className: "Layer__component Layer__header__actions", children: /* @__PURE__ */ jsx242(
23830
+ enabledReports.length > 1 && /* @__PURE__ */ jsx255("div", { className: "Layer__component Layer__header__actions", children: /* @__PURE__ */ jsx255(
22708
23831
  Toggle,
22709
23832
  {
22710
23833
  name: "reports-tabs",
@@ -22713,7 +23836,7 @@ var Reports = ({
22713
23836
  onChange: (opt) => setActiveTab(opt.target.value)
22714
23837
  }
22715
23838
  ) }),
22716
- /* @__PURE__ */ jsx242(Container, { name: "reports", ref: containerRef, children: /* @__PURE__ */ jsx242(ProfitAndLoss, { asContainer: false, comparisonConfig, children: /* @__PURE__ */ jsx242(
23839
+ /* @__PURE__ */ jsx255(Container, { name: "reports", ref: containerRef, children: /* @__PURE__ */ jsx255(ProfitAndLoss, { asContainer: false, comparisonConfig, children: /* @__PURE__ */ jsx255(
22717
23840
  ReportsPanel,
22718
23841
  {
22719
23842
  containerRef,
@@ -22736,8 +23859,8 @@ var ReportsPanel = ({
22736
23859
  statementOfCashFlowConfig,
22737
23860
  view
22738
23861
  }) => {
22739
- return /* @__PURE__ */ jsxs158(Fragment41, { children: [
22740
- openReport === "profitAndLoss" && /* @__PURE__ */ jsx242(
23862
+ return /* @__PURE__ */ jsxs167(Fragment45, { children: [
23863
+ openReport === "profitAndLoss" && /* @__PURE__ */ jsx255(
22741
23864
  ProfitAndLoss.Report,
22742
23865
  __spreadValues({
22743
23866
  stringOverrides,
@@ -22745,8 +23868,8 @@ var ReportsPanel = ({
22745
23868
  view
22746
23869
  }, profitAndLossConfig)
22747
23870
  ),
22748
- openReport === "balanceSheet" && /* @__PURE__ */ jsx242(BalanceSheet, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.balanceSheet }),
22749
- openReport === "statementOfCashFlow" && /* @__PURE__ */ jsx242(
23871
+ openReport === "balanceSheet" && /* @__PURE__ */ jsx255(BalanceSheet, { stringOverrides: stringOverrides == null ? void 0 : stringOverrides.balanceSheet }),
23872
+ openReport === "statementOfCashFlow" && /* @__PURE__ */ jsx255(
22750
23873
  StatementOfCashFlow,
22751
23874
  __spreadValues({
22752
23875
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
@@ -22757,11 +23880,11 @@ var ReportsPanel = ({
22757
23880
 
22758
23881
  // src/components/ProfitAndLossView/ProfitAndLossView.tsx
22759
23882
  import { useContext as useContext55, useRef as useRef22 } from "react";
22760
- import { Fragment as Fragment42, jsx as jsx243, jsxs as jsxs159 } from "react/jsx-runtime";
23883
+ import { Fragment as Fragment46, jsx as jsx256, jsxs as jsxs168 } from "react/jsx-runtime";
22761
23884
  var COMPONENT_NAME7 = "profit-and-loss";
22762
23885
  var ProfitAndLossView = (props) => {
22763
23886
  const containerRef = useRef22(null);
22764
- return /* @__PURE__ */ jsx243(Container, { name: COMPONENT_NAME7, ref: containerRef, children: /* @__PURE__ */ jsx243(ProfitAndLoss, { children: /* @__PURE__ */ jsx243(ProfitAndLossPanel, __spreadValues({ containerRef }, props)) }) });
23887
+ return /* @__PURE__ */ jsx256(Container, { name: COMPONENT_NAME7, ref: containerRef, children: /* @__PURE__ */ jsx256(ProfitAndLoss, { children: /* @__PURE__ */ jsx256(ProfitAndLossPanel, __spreadValues({ containerRef }, props)) }) });
22765
23888
  };
22766
23889
  var ProfitAndLossPanel = (_a) => {
22767
23890
  var _b = _a, {
@@ -22772,10 +23895,10 @@ var ProfitAndLossPanel = (_a) => {
22772
23895
  "stringOverrides"
22773
23896
  ]);
22774
23897
  const { sidebarScope } = useContext55(ProfitAndLoss.Context);
22775
- return /* @__PURE__ */ jsxs159(
23898
+ return /* @__PURE__ */ jsxs168(
22776
23899
  Panel,
22777
23900
  {
22778
- sidebar: /* @__PURE__ */ jsx243(
23901
+ sidebar: /* @__PURE__ */ jsx256(
22779
23902
  ProfitAndLossDetailedCharts,
22780
23903
  {
22781
23904
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.profitAndLossDetailedCharts
@@ -22784,7 +23907,7 @@ var ProfitAndLossPanel = (_a) => {
22784
23907
  sidebarIsOpen: Boolean(sidebarScope),
22785
23908
  parentRef: containerRef,
22786
23909
  children: [
22787
- /* @__PURE__ */ jsx243(
23910
+ /* @__PURE__ */ jsx256(
22788
23911
  ProfitAndLoss.Header,
22789
23912
  {
22790
23913
  text: (stringOverrides == null ? void 0 : stringOverrides.header) || "Profit & Loss",
@@ -22792,7 +23915,7 @@ var ProfitAndLossPanel = (_a) => {
22792
23915
  headingClassName: "Layer__profit-and-loss__title"
22793
23916
  }
22794
23917
  ),
22795
- /* @__PURE__ */ jsx243(Components, __spreadValues({ stringOverrides }, props))
23918
+ /* @__PURE__ */ jsx256(Components, __spreadValues({ stringOverrides }, props))
22796
23919
  ]
22797
23920
  }
22798
23921
  );
@@ -22806,7 +23929,7 @@ var Components = ({
22806
23929
  ProfitAndLoss.Context
22807
23930
  );
22808
23931
  if (!isLoading && error) {
22809
- return /* @__PURE__ */ jsx243("div", { className: "Layer__table-state-container", children: /* @__PURE__ */ jsx243(
23932
+ return /* @__PURE__ */ jsx256("div", { className: "Layer__table-state-container", children: /* @__PURE__ */ jsx256(
22810
23933
  DataState,
22811
23934
  {
22812
23935
  status: "failed" /* failed */,
@@ -22817,15 +23940,15 @@ var Components = ({
22817
23940
  }
22818
23941
  ) });
22819
23942
  }
22820
- return /* @__PURE__ */ jsxs159(Fragment42, { children: [
22821
- !hideChart && /* @__PURE__ */ jsxs159("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries`, children: [
22822
- /* @__PURE__ */ jsxs159(
23943
+ return /* @__PURE__ */ jsxs168(Fragment46, { children: [
23944
+ !hideChart && /* @__PURE__ */ jsxs168("div", { className: `Layer__${COMPONENT_NAME7}__chart_with_summaries`, children: [
23945
+ /* @__PURE__ */ jsxs168(
22823
23946
  "div",
22824
23947
  {
22825
23948
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__summary-col`,
22826
23949
  children: [
22827
- /* @__PURE__ */ jsx243(ProfitAndLoss.DatePicker, {}),
22828
- /* @__PURE__ */ jsx243(
23950
+ /* @__PURE__ */ jsx256(ProfitAndLoss.DatePicker, {}),
23951
+ /* @__PURE__ */ jsx256(
22829
23952
  ProfitAndLoss.Summaries,
22830
23953
  {
22831
23954
  actionable: true,
@@ -22835,15 +23958,15 @@ var Components = ({
22835
23958
  ]
22836
23959
  }
22837
23960
  ),
22838
- /* @__PURE__ */ jsx243(
23961
+ /* @__PURE__ */ jsx256(
22839
23962
  "div",
22840
23963
  {
22841
23964
  className: `Layer__${COMPONENT_NAME7}__chart_with_summaries__chart-col`,
22842
- children: /* @__PURE__ */ jsx243(ProfitAndLoss.Chart, {})
23965
+ children: /* @__PURE__ */ jsx256(ProfitAndLoss.Chart, {})
22843
23966
  }
22844
23967
  )
22845
23968
  ] }),
22846
- !hideTable && /* @__PURE__ */ jsx243(
23969
+ !hideTable && /* @__PURE__ */ jsx256(
22847
23970
  ProfitAndLoss.Table,
22848
23971
  {
22849
23972
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.profitAndLossTable
@@ -22868,6 +23991,7 @@ export {
22868
23991
  LinkAccounts,
22869
23992
  LinkedAccounts,
22870
23993
  Onboarding,
23994
+ PlatformOnboarding,
22871
23995
  ProfitAndLoss,
22872
23996
  ProfitAndLossView,
22873
23997
  ProjectProfitabilityView,