@layerfi/components 0.1.117-alpha → 0.1.117-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -202,7 +202,7 @@ class ErrorHandlerClass {
202
202
  }
203
203
  const errorHandler = new ErrorHandlerClass();
204
204
  const reportError = (payload) => errorHandler.onError(payload);
205
- const version = "0.1.117-alpha";
205
+ const version = "0.1.117-alpha.1";
206
206
  const pkg = {
207
207
  version
208
208
  };
@@ -7086,7 +7086,7 @@ const Separator = ({ mbs, mbe }) => {
7086
7086
  const dataProperties = toDataProperties({ mbs, mbe });
7087
7087
  return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: "Layer__separator" }, dataProperties));
7088
7088
  };
7089
- const ModalTitleWithClose = react.forwardRef(function ModalTitleWithClose2({ heading, description, onClose }, ref) {
7089
+ const ModalTitleWithClose = react.forwardRef(function ModalTitleWithClose2({ heading, description, onClose, hideCloseButton = false }, ref) {
7090
7090
  return /* @__PURE__ */ jsxRuntime.jsxs(VStack, { children: [
7091
7091
  /* @__PURE__ */ jsxRuntime.jsxs(
7092
7092
  "div",
@@ -7098,7 +7098,7 @@ const ModalTitleWithClose = react.forwardRef(function ModalTitleWithClose2({ hea
7098
7098
  heading,
7099
7099
  description
7100
7100
  ] }),
7101
- /* @__PURE__ */ jsxRuntime.jsx(
7101
+ !hideCloseButton && /* @__PURE__ */ jsxRuntime.jsx(
7102
7102
  Button,
7103
7103
  {
7104
7104
  icon: true,
@@ -7388,7 +7388,8 @@ const BaseConfirmationModalContent = react.memo(function BaseConfirmationModalCo
7388
7388
  ModalTitleWithClose,
7389
7389
  {
7390
7390
  heading: /* @__PURE__ */ jsxRuntime.jsx(ModalHeading, { size: "sm", children: title }),
7391
- onClose: close2
7391
+ onClose: close2,
7392
+ hideCloseButton: useDrawer
7392
7393
  }
7393
7394
  ),
7394
7395
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "md", children: [
@@ -8271,7 +8272,7 @@ const BankTransactionCategoryComboBox = ({
8271
8272
  );
8272
8273
  const numMatchOptions = (matchGroup == null ? void 0 : matchGroup.options.length) || 0;
8273
8274
  const loadingSuggestions = bankTransaction && isLoadingSuggestions(bankTransaction) && selectedValue === null;
8274
- const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : "Categorize or match...";
8275
+ const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : includeSuggestedMatches ? "Categorize or match..." : "Select category";
8275
8276
  const SelectedValue = react.useMemo(() => {
8276
8277
  return /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsUncategorizedSelectedValue, { selectedValue });
8277
8278
  }, [selectedValue]);
@@ -8918,7 +8919,7 @@ const BankTransactionsBulkActions = ({
8918
8919
  const [recategorizeModalOpen, setRecategorizeModalOpen] = react.useState(false);
8919
8920
  const [uncategorizeModalOpen, setUncategorizeModalOpen] = react.useState(false);
8920
8921
  const confirmButtonLabel = ((_a = slotProps == null ? void 0 : slotProps.ConfirmAllModal) == null ? void 0 : _a.label) || "Confirm all";
8921
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "xs", children: display === DisplayState.review ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8922
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(HStack, { align: "center", gap: "xs", justify: isMobileView ? "end" : void 0, children: display === DisplayState.review ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8922
8923
  /* @__PURE__ */ jsxRuntime.jsx(
8923
8924
  Button,
8924
8925
  {
@@ -8951,7 +8952,7 @@ const BankTransactionsBulkActions = ({
8951
8952
  {
8952
8953
  variant: "outlined",
8953
8954
  onClick: () => setRecategorizeModalOpen(true),
8954
- children: "Recategorize"
8955
+ children: isMobileView ? "Categorize" : "Recategorize"
8955
8956
  }
8956
8957
  ),
8957
8958
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -8959,7 +8960,7 @@ const BankTransactionsBulkActions = ({
8959
8960
  {
8960
8961
  isOpen: recategorizeModalOpen,
8961
8962
  onOpenChange: setRecategorizeModalOpen,
8962
- mode: CategorizationMode.Recategorize,
8963
+ mode: isMobileView ? CategorizationMode.Categorize : CategorizationMode.Recategorize,
8963
8964
  isMobileView
8964
8965
  }
8965
8966
  ),
@@ -11326,12 +11327,12 @@ const CLASS_NAME$6 = "Layer__BankTransactionsActions";
11326
11327
  function BankTransactionsActions({ children }) {
11327
11328
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CLASS_NAME$6, children });
11328
11329
  }
11329
- const BulkActionsModule = ({ slots }) => {
11330
+ const BulkActionsModule = ({ showSelectedLabel = true, fullWidth = false, slots }) => {
11330
11331
  const { count } = useCountSelectedIds();
11331
11332
  const { clearSelection } = useBulkSelectionActions();
11332
- return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "toggle", justify: "space-between", align: "center", gap: "xs", className: "Layer__BulkActionsModule", children: [
11333
+ return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "toggle", justify: "space-between", align: "center", gap: "xs", fluid: fullWidth, children: [
11333
11334
  /* @__PURE__ */ jsxRuntime.jsxs(HStack, { justify: "space-between", align: "center", pis: "sm", pie: "3xs", gap: "3xs", className: "Layer__BulkActionsModule__SelectedItemsContainer", children: [
11334
- /* @__PURE__ */ jsxRuntime.jsx(Span, { noWrap: true, children: `${count} selected` }),
11335
+ /* @__PURE__ */ jsxRuntime.jsx(Span, { noWrap: true, children: showSelectedLabel ? `${count} selected` : count }),
11335
11336
  /* @__PURE__ */ jsxRuntime.jsx(
11336
11337
  Button,
11337
11338
  {
@@ -11616,7 +11617,7 @@ const MonthPicker = ({
11616
11617
  }) => {
11617
11618
  const triggerRef = react.useRef(null);
11618
11619
  const [isPopoverOpen, setPopoverOpen] = react.useState(false);
11619
- const { value, isMobile } = useSizeClass();
11620
+ const { value } = useSizeClass();
11620
11621
  const onChangeMonth = react.useCallback((val) => {
11621
11622
  onChange(val);
11622
11623
  setPopoverOpen(false);
@@ -11630,7 +11631,7 @@ const MonthPicker = ({
11630
11631
  {
11631
11632
  ref: triggerRef,
11632
11633
  slot: "input",
11633
- className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--mobile": isMobile }),
11634
+ className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--truncated": truncateMonth }),
11634
11635
  onClick: () => setPopoverOpen(true),
11635
11636
  children: [
11636
11637
  /* @__PURE__ */ jsxRuntime.jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true })),
@@ -11662,13 +11663,18 @@ const NewToggleOption = ({
11662
11663
  const NewToggle = ({
11663
11664
  options: options2,
11664
11665
  selectedKey,
11665
- onSelectionChange
11666
+ onSelectionChange,
11667
+ fullWidth = false
11666
11668
  }) => {
11667
11669
  const selectedKeys = selectedKey !== void 0 ? /* @__PURE__ */ new Set([selectedKey]) : /* @__PURE__ */ new Set();
11670
+ const dataProperties = toDataProperties({
11671
+ "full-width": fullWidth
11672
+ });
11668
11673
  return /* @__PURE__ */ jsxRuntime.jsx(
11669
11674
  reactAriaComponents.ToggleButtonGroup,
11670
- {
11671
- className: "Layer__NewToggle",
11675
+ __spreadProps(__spreadValues({
11676
+ className: "Layer__NewToggle"
11677
+ }, dataProperties), {
11672
11678
  selectionMode: "single",
11673
11679
  selectedKeys,
11674
11680
  onSelectionChange: (keys2) => {
@@ -11678,7 +11684,7 @@ const NewToggle = ({
11678
11684
  }
11679
11685
  },
11680
11686
  children: options2.map((option) => /* @__PURE__ */ jsxRuntime.jsx(NewToggleOption, __spreadValues({}, option), option.value))
11681
- }
11687
+ })
11682
11688
  );
11683
11689
  };
11684
11690
  const SmallLoader = ({ size = 28 }) => {
@@ -11872,8 +11878,9 @@ const BankTransactionsHeader = ({
11872
11878
  }, [setFilters]);
11873
11879
  const { count } = useCountSelectedIds();
11874
11880
  const showBulkActions = count > 0;
11881
+ const isMobileList = listView && mobileComponent === "mobileList";
11875
11882
  const headerTopRow = react.useMemo(() => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "Layer__bank-transactions__header__content", children: [
11876
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "Layer__bank-transactions__header__content-title", children: [
11883
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", children: [
11877
11884
  /* @__PURE__ */ jsxRuntime.jsx(
11878
11885
  Heading,
11879
11886
  {
@@ -11929,7 +11936,6 @@ const BankTransactionsHeader = ({
11929
11936
  }
11930
11937
  return actions;
11931
11938
  }, [withUploadMenu, showCategorizationRules]);
11932
- const isMobileList = listView && mobileComponent === "mobileList";
11933
11939
  const BulkActionsModuleSlot = react.useCallback(() => {
11934
11940
  return /* @__PURE__ */ jsxRuntime.jsx(
11935
11941
  BankTransactionsBulkActions,
@@ -11943,53 +11949,103 @@ const BankTransactionsHeader = ({
11943
11949
  }
11944
11950
  );
11945
11951
  }, [isMobileList]);
11946
- return /* @__PURE__ */ jsxRuntime.jsxs(
11947
- Header$1,
11952
+ const statusToggle = !categorizedOnly && categorizeView && showStatusToggle ? /* @__PURE__ */ jsxRuntime.jsx(
11953
+ NewToggle,
11948
11954
  {
11949
- className: classNames(
11950
- "Layer__bank-transactions__header",
11951
- withDatePicker && "Layer__bank-transactions__header--with-date-picker",
11952
- mobileComponent && listView ? "Layer__bank-transactions__header--mobile" : void 0
11953
- ),
11954
- style: { top: shiftStickyHeader },
11955
- children: [
11956
- !collapseHeader && headerTopRow,
11957
- /* @__PURE__ */ jsxRuntime.jsxs(BankTransactionsActions, { children: [
11958
- showBulkActions ? /* @__PURE__ */ jsxRuntime.jsx(
11955
+ options: [
11956
+ { label: "To Review", value: DisplayState.review },
11957
+ { label: "Categorized", value: DisplayState.categorized }
11958
+ ],
11959
+ selectedKey: display,
11960
+ onSelectionChange: onCategorizationDisplayChange,
11961
+ fullWidth: isMobileList
11962
+ }
11963
+ ) : null;
11964
+ if (isMobileList) {
11965
+ return /* @__PURE__ */ jsxRuntime.jsx(
11966
+ Header$1,
11967
+ {
11968
+ className: classNames(
11969
+ "Layer__bank-transactions__header",
11970
+ withDatePicker && "Layer__bank-transactions__header--with-date-picker",
11971
+ "Layer__bank-transactions__header--mobile"
11972
+ ),
11973
+ style: { top: shiftStickyHeader },
11974
+ children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "sm", children: [
11975
+ headerTopRow,
11976
+ /* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { isDisabled: showBulkActions }),
11977
+ /* @__PURE__ */ jsxRuntime.jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsxRuntime.jsx(
11959
11978
  BulkActionsModule,
11960
11979
  {
11980
+ showSelectedLabel: false,
11981
+ fullWidth: true,
11961
11982
  slots: { BulkActions: BulkActionsModuleSlot }
11962
11983
  }
11963
- ) : /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "toggle", justify: "center", gap: "xs", children: [
11964
- collapseHeader && headerTopRow,
11965
- !categorizedOnly && categorizeView && showStatusToggle && /* @__PURE__ */ jsxRuntime.jsx(
11966
- NewToggle,
11967
- {
11968
- options: [
11969
- { label: "To Review", value: DisplayState.review },
11970
- { label: "Categorized", value: DisplayState.categorized }
11971
- ],
11972
- selectedKey: display,
11973
- onSelectionChange: onCategorizationDisplayChange
11974
- }
11975
- )
11976
- ] }),
11977
- /* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { slot: "search", isDisabled: showBulkActions }),
11978
- showBulkActions ? null : /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "download-upload", justify: "center", gap: "xs", children: [
11979
- /* @__PURE__ */ jsxRuntime.jsx(
11980
- DownloadButton,
11984
+ ) : statusToggle })
11985
+ ] })
11986
+ }
11987
+ );
11988
+ }
11989
+ if (listView) {
11990
+ return /* @__PURE__ */ jsxRuntime.jsx(
11991
+ Header$1,
11992
+ {
11993
+ className: classNames(
11994
+ "Layer__bank-transactions__header",
11995
+ withDatePicker && "Layer__bank-transactions__header--with-date-picker"
11996
+ ),
11997
+ style: { top: shiftStickyHeader },
11998
+ children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "xs", children: [
11999
+ headerTopRow,
12000
+ /* @__PURE__ */ jsxRuntime.jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsxRuntime.jsx(
12001
+ BulkActionsModule,
12002
+ {
12003
+ slots: { BulkActions: BulkActionsModuleSlot }
12004
+ }
12005
+ ) : statusToggle }),
12006
+ /* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { isDisabled: showBulkActions })
12007
+ ] })
12008
+ }
12009
+ );
12010
+ } else {
12011
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12012
+ Header$1,
12013
+ {
12014
+ className: classNames(
12015
+ "Layer__bank-transactions__header",
12016
+ withDatePicker && "Layer__bank-transactions__header--with-date-picker",
12017
+ mobileComponent && listView ? "Layer__bank-transactions__header--mobile" : void 0
12018
+ ),
12019
+ style: { top: shiftStickyHeader },
12020
+ children: [
12021
+ !collapseHeader && headerTopRow,
12022
+ /* @__PURE__ */ jsxRuntime.jsxs(BankTransactionsActions, { children: [
12023
+ showBulkActions ? /* @__PURE__ */ jsxRuntime.jsx(
12024
+ BulkActionsModule,
11981
12025
  {
11982
- downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
11983
- iconOnly: listView,
11984
- disabled: showBulkActions
12026
+ slots: { BulkActions: BulkActionsModuleSlot }
11985
12027
  }
11986
- ),
11987
- /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
12028
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "toggle", justify: "center", gap: "xs", children: [
12029
+ collapseHeader && headerTopRow,
12030
+ statusToggle
12031
+ ] }),
12032
+ /* @__PURE__ */ jsxRuntime.jsx(TransactionsSearch, { slot: "search", isDisabled: showBulkActions }),
12033
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { slot: "download-upload", justify: "center", gap: "xs", children: [
12034
+ /* @__PURE__ */ jsxRuntime.jsx(
12035
+ DownloadButton,
12036
+ {
12037
+ downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
12038
+ iconOnly: listView,
12039
+ disabled: showBulkActions
12040
+ }
12041
+ ),
12042
+ /* @__PURE__ */ jsxRuntime.jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
12043
+ ] })
11988
12044
  ] })
11989
- ] })
11990
- ]
11991
- }
11992
- );
12045
+ ]
12046
+ }
12047
+ );
12048
+ }
11993
12049
  };
11994
12050
  const Inbox = (_pb) => {
11995
12051
  var _qb = _pb, { size = 18 } = _qb, props = __objRest(_qb, ["size"]);
@@ -18535,17 +18591,19 @@ const BankTransactionsMobileBulkActionsHeader = ({
18535
18591
  HStack,
18536
18592
  {
18537
18593
  gap: "md",
18538
- pi: "xs",
18539
- pbs: "sm",
18540
- justify: "space-between",
18541
18594
  align: "center",
18595
+ justify: "space-between",
18596
+ pis: "xs",
18597
+ pie: "md",
18598
+ pb: "xs",
18599
+ className: "Layer__BankTransactionsMobileBulkActionsHeader",
18542
18600
  children: [
18543
18601
  /* @__PURE__ */ jsxRuntime.jsx(
18544
18602
  HStack,
18545
18603
  {
18546
18604
  align: "center",
18547
18605
  pi: "xs",
18548
- className: "Layer__BankTransactionsMobileBulkActionsHeader__checkbox-container",
18606
+ gap: "xs",
18549
18607
  children: bulkActionsEnabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
18550
18608
  /* @__PURE__ */ jsxRuntime.jsx(
18551
18609
  Checkbox,
@@ -18567,15 +18625,17 @@ const BankTransactionsMobileBulkActionsHeader = ({
18567
18625
  ] })
18568
18626
  }
18569
18627
  ),
18570
- /* @__PURE__ */ jsxRuntime.jsx(
18571
- Switch,
18572
- {
18573
- isSelected: bulkActionsEnabled,
18574
- onChange: onBulkActionsToggle,
18575
- "aria-label": "Toggle bulk actions",
18576
- children: /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "md", noWrap: true, children: "Bulk Actions" })
18577
- }
18578
- )
18628
+ /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", gap: "xs", children: [
18629
+ /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "md", noWrap: true, children: "Bulk Actions" }),
18630
+ /* @__PURE__ */ jsxRuntime.jsx(
18631
+ Switch,
18632
+ {
18633
+ isSelected: bulkActionsEnabled,
18634
+ onChange: onBulkActionsToggle,
18635
+ "aria-label": "Toggle bulk actions"
18636
+ }
18637
+ )
18638
+ ] })
18579
18639
  ]
18580
18640
  }
18581
18641
  );
@@ -26300,10 +26360,11 @@ const ProfitAndLossFullReportDownloadButton = ({
26300
26360
  };
26301
26361
  function ProfitAndLossDownloadButton({
26302
26362
  stringOverrides,
26303
- moneyFormat,
26304
- iconOnly
26363
+ moneyFormat
26305
26364
  }) {
26306
26365
  const { selectedLineItem } = react.useContext(ProfitAndLossContext);
26366
+ const { value } = useSizeClass();
26367
+ const iconOnly = value !== "desktop";
26307
26368
  if (selectedLineItem) {
26308
26369
  return /* @__PURE__ */ jsxRuntime.jsx(
26309
26370
  ProfitAndLossDetailLinesDownloadButton,
@@ -26363,71 +26424,6 @@ const ProfitAndLossHeader = ({
26363
26424
  ] })
26364
26425
  ] });
26365
26426
  };
26366
- const DateRangePickers = ({ minDate, maxDate }) => {
26367
- const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ displayMode: "full" });
26368
- const { setDateRange: setGlobalDateRange } = useGlobalDateRangeActions();
26369
- const {
26370
- localDate: localStartDate,
26371
- onChange: onChangeStartDate,
26372
- minDateZdt: minStartDate,
26373
- maxDateZdt: maxStartDate,
26374
- isInvalid: startDateInvalid,
26375
- errorText: startDateErrorText,
26376
- onBlur: onBlurStartDate
26377
- } = useDatePickerState({
26378
- date: globalStartDate,
26379
- minDate,
26380
- maxDate
26381
- });
26382
- const {
26383
- localDate: localEndDate,
26384
- onChange: onChangeEndDate,
26385
- minDateZdt: minEndDate,
26386
- maxDateZdt: maxEndDate,
26387
- isInvalid: endDateInvalid,
26388
- errorText: endDateErrorText,
26389
- onBlur: onBlurEndDate
26390
- } = useDatePickerState({
26391
- date: globalEndDate,
26392
- minDate,
26393
- maxDate
26394
- });
26395
- react.useEffect(() => {
26396
- if (startDateInvalid || endDateInvalid || !localStartDate || !localEndDate) return;
26397
- const next = { startDate: localStartDate.toDate(), endDate: localEndDate.toDate() };
26398
- setGlobalDateRange(next);
26399
- }, [startDateInvalid, endDateInvalid, localStartDate, localEndDate, setGlobalDateRange]);
26400
- return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", pb: "md", children: [
26401
- /* @__PURE__ */ jsxRuntime.jsx(
26402
- DatePicker,
26403
- {
26404
- label: "Start Date",
26405
- showLabel: true,
26406
- date: localStartDate,
26407
- onChange: onChangeStartDate,
26408
- minDate: minStartDate,
26409
- maxDate: maxStartDate,
26410
- isInvalid: startDateInvalid,
26411
- errorText: startDateErrorText,
26412
- onBlur: onBlurStartDate
26413
- }
26414
- ),
26415
- /* @__PURE__ */ jsxRuntime.jsx(
26416
- DatePicker,
26417
- {
26418
- label: "End Date",
26419
- showLabel: true,
26420
- date: localEndDate,
26421
- onChange: onChangeEndDate,
26422
- minDate: minEndDate,
26423
- maxDate: maxEndDate,
26424
- isInvalid: endDateInvalid,
26425
- errorText: endDateErrorText,
26426
- onBlur: onBlurEndDate
26427
- }
26428
- )
26429
- ] });
26430
- };
26431
26427
  const MultiSelect = ({
26432
26428
  name,
26433
26429
  options: options2,
@@ -27157,25 +27153,6 @@ const ProfitAndLossReport = ({
27157
27153
  const useComparisonPnl = !!comparisonConfig;
27158
27154
  const header = react.useMemo(() => {
27159
27155
  if (hideHeader) return null;
27160
- const isMobile = view !== "desktop";
27161
- const isFullDateMode = dateSelectionMode === "full";
27162
- if (isMobile && isFullDateMode) {
27163
- return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
27164
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
27165
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(DateSelectionComboBox, {}) }),
27166
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
27167
- ProfitAndLossDownloadButton,
27168
- {
27169
- stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
27170
- moneyFormat: csvMoneyFormat,
27171
- iconOnly: true
27172
- }
27173
- ) })
27174
- ] }),
27175
- /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(DateRangePickers, {}) }) }),
27176
- useComparisonPnl && /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLossCompareOptions, {}) }) })
27177
- ] });
27178
- }
27179
27156
  return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
27180
27157
  /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
27181
27158
  /* @__PURE__ */ jsxRuntime.jsxs(HeaderCol, { children: [
@@ -27186,8 +27163,7 @@ const ProfitAndLossReport = ({
27186
27163
  ProfitAndLossDownloadButton,
27187
27164
  {
27188
27165
  stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
27189
- moneyFormat: csvMoneyFormat,
27190
- iconOnly: true
27166
+ moneyFormat: csvMoneyFormat
27191
27167
  }
27192
27168
  ) })
27193
27169
  ] }),
@@ -28054,36 +28030,6 @@ const CombinedDateSelection = ({ mode }) => {
28054
28030
  }
28055
28031
  return /* @__PURE__ */ jsxRuntime.jsx(DateSelection, {});
28056
28032
  };
28057
- const LabeledGlobalDatePicker = () => {
28058
- const { date: date2 } = useGlobalDate();
28059
- const { setDate: setGlobalDate } = useGlobalDateActions();
28060
- const rawActivationDate = useBusinessActivationDate();
28061
- const activationDate = react.useMemo(() => rawActivationDate ? dateFns.startOfDay(rawActivationDate) : null, [rawActivationDate]);
28062
- const maxDate = react.useMemo(() => dateFns.endOfDay(/* @__PURE__ */ new Date()), []);
28063
- const setDate = react.useCallback((date22) => {
28064
- setGlobalDate({ date: date22 });
28065
- }, [setGlobalDate]);
28066
- const { localDate, onChange, minDateZdt, maxDateZdt, errorText, onBlur, isInvalid } = useDatePickerState({
28067
- date: date2,
28068
- setDate,
28069
- minDate: activationDate,
28070
- maxDate
28071
- });
28072
- return /* @__PURE__ */ jsxRuntime.jsx(
28073
- DatePicker,
28074
- {
28075
- label: "Effective Date",
28076
- showLabel: true,
28077
- date: localDate,
28078
- onChange,
28079
- minDate: minDateZdt,
28080
- maxDate: maxDateZdt,
28081
- isInvalid,
28082
- errorText,
28083
- onBlur
28084
- }
28085
- );
28086
- };
28087
28033
  const COMPONENT_NAME$8 = "balance-sheet";
28088
28034
  const BalanceSheet = (props) => {
28089
28035
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -28103,63 +28049,16 @@ const BalanceSheetView = ({
28103
28049
  const { date: effectiveDate } = useGlobalDate();
28104
28050
  const { data, isLoading } = useBalanceSheet({ effectiveDate });
28105
28051
  const { view, containerRef } = useElementViewSize();
28106
- const isMobile = view !== "desktop";
28107
- const isFullDateMode = dateSelectionMode === "full";
28108
- const widgetHeader = react.useMemo(() => {
28109
- if (isMobile && isFullDateMode) {
28110
- return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
28111
- /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(DateSelectionComboBox, {}) }) }),
28112
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { className: "Layer__Reports__header-row", children: [
28113
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(LabeledGlobalDatePicker, {}) }),
28114
- withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }) })
28115
- ] })
28116
- ] });
28117
- }
28118
- return /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28119
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
28120
- withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }) })
28121
- ] }) });
28122
- }, [dateSelectionMode, isMobile, isFullDateMode, view, withExpandAllButton]);
28123
- const header = react.useMemo(() => {
28124
- if (isMobile && isFullDateMode) {
28125
- return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
28126
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28127
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(DateSelectionComboBox, {}) }),
28128
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
28129
- BalanceSheetDownloadButton,
28130
- {
28131
- effectiveDate,
28132
- iconOnly: true
28133
- }
28134
- ) })
28135
- ] }),
28136
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { className: "Layer__Reports__header-row", children: [
28137
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(LabeledGlobalDatePicker, {}) }),
28138
- withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }) })
28139
- ] })
28140
- ] });
28141
- }
28142
- return /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28143
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
28144
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderCol, { children: [
28145
- withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }),
28146
- /* @__PURE__ */ jsxRuntime.jsx(
28147
- BalanceSheetDownloadButton,
28148
- {
28149
- effectiveDate,
28150
- iconOnly: true
28151
- }
28152
- )
28153
- ] })
28154
- ] }) });
28155
- }, [dateSelectionMode, effectiveDate, isMobile, isFullDateMode, view, withExpandAllButton]);
28156
28052
  if (asWidget) {
28157
28053
  return /* @__PURE__ */ jsxRuntime.jsx(TableProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Container, { name: COMPONENT_NAME$8, asWidget: true, children: /* @__PURE__ */ jsxRuntime.jsx(
28158
28054
  View,
28159
28055
  {
28160
28056
  type: "panel",
28161
28057
  ref: containerRef,
28162
- header: widgetHeader,
28058
+ header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28059
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
28060
+ withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }) })
28061
+ ] }) }),
28163
28062
  children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
28164
28063
  BalanceSheetTable,
28165
28064
  {
@@ -28176,7 +28075,19 @@ const BalanceSheetView = ({
28176
28075
  {
28177
28076
  type: "panel",
28178
28077
  ref: containerRef,
28179
- header,
28078
+ header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28079
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
28080
+ /* @__PURE__ */ jsxRuntime.jsxs(HeaderCol, { children: [
28081
+ withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }),
28082
+ /* @__PURE__ */ jsxRuntime.jsx(
28083
+ BalanceSheetDownloadButton,
28084
+ {
28085
+ effectiveDate,
28086
+ iconOnly: view === "mobile"
28087
+ }
28088
+ )
28089
+ ] })
28090
+ ] }) }),
28180
28091
  children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
28181
28092
  BalanceSheetTable,
28182
28093
  {
@@ -28448,49 +28359,37 @@ const StatementOfCashFlow = (props) => {
28448
28359
  };
28449
28360
  const StatementOfCashFlowView = ({
28450
28361
  stringOverrides,
28451
- dateSelectionMode = "full",
28452
- view
28362
+ dateSelectionMode = "full"
28453
28363
  }) => {
28454
28364
  const dateRange = useGlobalDateRange({ displayMode: dateSelectionMode });
28455
28365
  const { data, isLoading } = useStatementOfCashFlow(dateRange);
28456
- const header = react.useMemo(() => {
28457
- const isMobile = view !== "desktop";
28458
- const isFullDateMode = dateSelectionMode === "full";
28459
- if (isMobile && isFullDateMode) {
28460
- return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
28461
- /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28462
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(DateSelectionComboBox, {}) }),
28463
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsxRuntime.jsx(
28464
- CashflowStatementDownloadButton,
28465
- {
28466
- startDate: dateRange.startDate,
28467
- endDate: dateRange.endDate,
28468
- iconOnly: isMobile
28469
- }
28470
- ) })
28471
- ] }),
28472
- /* @__PURE__ */ jsxRuntime.jsx(HeaderRow, { children: /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(DateRangePickers, {}) }) })
28473
- ] });
28474
- }
28475
- return /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28476
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }) }),
28477
- /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(
28478
- CashflowStatementDownloadButton,
28366
+ const { view, containerRef } = useElementViewSize();
28367
+ return /* @__PURE__ */ jsxRuntime.jsx(TableProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
28368
+ View,
28369
+ {
28370
+ type: "panel",
28371
+ ref: containerRef,
28372
+ header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
28373
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }) }),
28374
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(
28375
+ CashflowStatementDownloadButton,
28376
+ {
28377
+ startDate: dateRange.startDate,
28378
+ endDate: dateRange.endDate,
28379
+ iconOnly: view === "mobile"
28380
+ }
28381
+ ) })
28382
+ ] }) }),
28383
+ children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$7}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
28384
+ StatementOfCashFlowTable,
28479
28385
  {
28480
- startDate: dateRange.startDate,
28481
- endDate: dateRange.endDate
28386
+ data,
28387
+ config: STATEMENT_OF_CASH_FLOW_ROWS,
28388
+ stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashFlowTable
28482
28389
  }
28483
- ) })
28484
- ] }) });
28485
- }, [dateRange.startDate, dateRange.endDate, dateSelectionMode, view]);
28486
- return /* @__PURE__ */ jsxRuntime.jsx(TableProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(View, { type: "panel", header, children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$7}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
28487
- StatementOfCashFlowTable,
28488
- {
28489
- data,
28490
- config: STATEMENT_OF_CASH_FLOW_ROWS,
28491
- stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashFlowTable
28390
+ )
28492
28391
  }
28493
- ) }) });
28392
+ ) });
28494
28393
  };
28495
28394
  const LEDGER_BALANCES_TAG_KEY = "#ledger-balances";
28496
28395
  class LedgerBalancesSWRResponse {
@@ -40271,15 +40170,19 @@ function UnifiedReportDownloadButton() {
40271
40170
  onSuccess: ({ presignedUrl }) => triggerInvisibleDownload({ url: presignedUrl })
40272
40171
  });
40273
40172
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
40274
- /* @__PURE__ */ jsxRuntime.jsx(
40275
- DownloadButton$1,
40173
+ /* @__PURE__ */ jsxRuntime.jsxs(
40174
+ Button,
40276
40175
  {
40277
- iconOnly: true,
40278
- onClick: () => {
40176
+ variant: "outlined",
40177
+ onPress: () => {
40279
40178
  void trigger();
40280
40179
  },
40281
- isDownloading: isMutating,
40282
- requestFailed: isError
40180
+ isPending: isMutating,
40181
+ isDisabled: isMutating,
40182
+ children: [
40183
+ isError ? "Retry" : "Download",
40184
+ isError ? /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(DownloadCloud, { size: 16 })
40185
+ ]
40283
40186
  }
40284
40187
  ),
40285
40188
  /* @__PURE__ */ jsxRuntime.jsx(InvisibleDownload, { ref: invisibleDownloadRef })
@@ -40322,7 +40225,7 @@ const AccountingOverview = ({
40322
40225
  tagFilter = void 0,
40323
40226
  slotProps
40324
40227
  }) => {
40325
- var _a, _b, _c, _d, _e;
40228
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
40326
40229
  const [pnlToggle, setPnlToggle] = react.useState("expenses");
40327
40230
  const { value: sizeClass } = useSizeClass();
40328
40231
  const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
@@ -40384,11 +40287,11 @@ const AccountingOverview = ({
40384
40287
  options: [
40385
40288
  {
40386
40289
  value: "revenue",
40387
- label: "Revenue"
40290
+ label: ((_f = (_e = (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.detailedCharts) == null ? void 0 : _e.detailedChartStringOverrides) == null ? void 0 : _f.revenueToggleLabel) || "Revenue"
40388
40291
  },
40389
40292
  {
40390
40293
  value: "expenses",
40391
- label: "Expenses"
40294
+ label: ((_i = (_h = (_g = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _g.detailedCharts) == null ? void 0 : _h.detailedChartStringOverrides) == null ? void 0 : _i.expenseToggleLabel) || "Expenses"
40392
40295
  }
40393
40296
  ],
40394
40297
  selected: pnlToggle,
@@ -40407,7 +40310,7 @@ const AccountingOverview = ({
40407
40310
  {
40408
40311
  scope: "revenue",
40409
40312
  hideClose: true,
40410
- stringOverrides: (_d = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _d.detailedCharts,
40313
+ stringOverrides: (_j = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _j.detailedCharts,
40411
40314
  chartColorsList
40412
40315
  }
40413
40316
  )
@@ -40425,7 +40328,7 @@ const AccountingOverview = ({
40425
40328
  {
40426
40329
  scope: "expenses",
40427
40330
  hideClose: true,
40428
- stringOverrides: (_e = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _e.detailedCharts,
40331
+ stringOverrides: (_k = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _k.detailedCharts,
40429
40332
  chartColorsList
40430
40333
  }
40431
40334
  )
@@ -42727,7 +42630,7 @@ const BookkeepingOverview = ({
42727
42630
  stringOverrides,
42728
42631
  slotProps
42729
42632
  }) => {
42730
- var _a, _b, _c, _d, _e, _f, _g, _h;
42633
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
42731
42634
  const [pnlToggle, setPnlToggle] = react.useState("expenses");
42732
42635
  const [width] = useWindowSize();
42733
42636
  const { isCalendlyVisible, calendlyLink, calendlyRef, closeCalendly } = useCalendly();
@@ -42820,11 +42723,11 @@ const BookkeepingOverview = ({
42820
42723
  options: [
42821
42724
  {
42822
42725
  value: "revenue",
42823
- label: "Revenue"
42726
+ label: ((_i = (_h = (_g = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _g.detailedCharts) == null ? void 0 : _h.detailedChartStringOverrides) == null ? void 0 : _i.revenueToggleLabel) || "Revenue"
42824
42727
  },
42825
42728
  {
42826
42729
  value: "expenses",
42827
- label: "Expenses"
42730
+ label: ((_l = (_k = (_j = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _j.detailedCharts) == null ? void 0 : _k.detailedChartStringOverrides) == null ? void 0 : _l.expenseToggleLabel) || "Expenses"
42828
42731
  }
42829
42732
  ],
42830
42733
  selected: pnlToggle,
@@ -42843,7 +42746,7 @@ const BookkeepingOverview = ({
42843
42746
  {
42844
42747
  scope: "revenue",
42845
42748
  hideClose: true,
42846
- stringOverrides: (_g = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _g.detailedCharts
42749
+ stringOverrides: (_m = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _m.detailedCharts
42847
42750
  }
42848
42751
  )
42849
42752
  }
@@ -42860,7 +42763,7 @@ const BookkeepingOverview = ({
42860
42763
  {
42861
42764
  scope: "expenses",
42862
42765
  hideClose: true,
42863
- stringOverrides: (_h = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _h.detailedCharts
42766
+ stringOverrides: (_n = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _n.detailedCharts
42864
42767
  }
42865
42768
  )
42866
42769
  }
@@ -45209,83 +45112,6 @@ const ProjectProfitabilityView = ({
45209
45112
  }
45210
45113
  );
45211
45114
  };
45212
- const ReportsSelector = ({
45213
- options: options2,
45214
- selected,
45215
- onChange,
45216
- view = "mobile"
45217
- }) => {
45218
- const [isDrawerOpen, setIsDrawerOpen] = react.useState(false);
45219
- const selectedOption = options2.find((opt) => opt.value === selected);
45220
- if (view === "mobile") {
45221
- return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { children: [
45222
- /* @__PURE__ */ jsxRuntime.jsxs(
45223
- "button",
45224
- {
45225
- className: "Layer__reports-selector",
45226
- onClick: () => setIsDrawerOpen(true),
45227
- type: "button",
45228
- children: [
45229
- /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "lg", weight: "bold", children: selectedOption == null ? void 0 : selectedOption.label }),
45230
- /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 20, className: "Layer__reports-selector__chevron" })
45231
- ]
45232
- }
45233
- ),
45234
- /* @__PURE__ */ jsxRuntime.jsx(
45235
- Drawer,
45236
- {
45237
- isOpen: isDrawerOpen,
45238
- onOpenChange: setIsDrawerOpen,
45239
- variant: "mobile-drawer",
45240
- isDismissable: true,
45241
- "aria-label": "Select report type",
45242
- children: ({ close: close2 }) => /* @__PURE__ */ jsxRuntime.jsxs(VStack, { className: "Layer__reports-selector-drawer", children: [
45243
- /* @__PURE__ */ jsxRuntime.jsx(
45244
- HStack,
45245
- {
45246
- justify: "center",
45247
- pb: "md",
45248
- className: "Layer__reports-selector-drawer__header",
45249
- children: /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "lg", weight: "bold", children: "Select Report" })
45250
- }
45251
- ),
45252
- /* @__PURE__ */ jsxRuntime.jsx(VStack, { className: "Layer__reports-selector-drawer__options", children: options2.map((option) => {
45253
- const isSelected = option.value === selected;
45254
- const optionClassName = classNames(
45255
- "Layer__reports-selector-drawer__option",
45256
- {
45257
- "Layer__reports-selector-drawer__option--selected": isSelected
45258
- }
45259
- );
45260
- return /* @__PURE__ */ jsxRuntime.jsx(
45261
- "button",
45262
- {
45263
- className: optionClassName,
45264
- onClick: () => {
45265
- onChange(option.value);
45266
- close2();
45267
- },
45268
- type: "button",
45269
- children: /* @__PURE__ */ jsxRuntime.jsx(Span, { size: "md", weight: isSelected ? "bold" : "normal", children: option.label })
45270
- },
45271
- option.value
45272
- );
45273
- }) })
45274
- ] })
45275
- }
45276
- )
45277
- ] });
45278
- }
45279
- return /* @__PURE__ */ jsxRuntime.jsx(
45280
- Toggle,
45281
- {
45282
- name: "reports-tabs",
45283
- options: options2,
45284
- selected,
45285
- onChange: (e) => onChange(e.target.value)
45286
- }
45287
- );
45288
- };
45289
45115
  const getOptions = (enabledReports) => {
45290
45116
  return [
45291
45117
  enabledReports.includes("profitAndLoss") ? {
@@ -45324,12 +45150,12 @@ const Reports = ({
45324
45150
  showHeader: showTitle,
45325
45151
  children: [
45326
45152
  enabledReports.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__component Layer__header__actions", children: /* @__PURE__ */ jsxRuntime.jsx(
45327
- ReportsSelector,
45153
+ Toggle,
45328
45154
  {
45155
+ name: "reports-tabs",
45329
45156
  options: options2,
45330
45157
  selected: activeTab,
45331
- onChange: setActiveTab,
45332
- view
45158
+ onChange: (opt) => setActiveTab(opt.target.value)
45333
45159
  }
45334
45160
  ) }),
45335
45161
  /* @__PURE__ */ jsxRuntime.jsx(Container, { name: "reports", ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLoss, { asContainer: false, comparisonConfig, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -45368,8 +45194,7 @@ const ReportsPanel = ({
45368
45194
  openReport === "statementOfCashFlow" && /* @__PURE__ */ jsxRuntime.jsx(
45369
45195
  StatementOfCashFlow,
45370
45196
  __spreadValues({
45371
- stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow,
45372
- view
45197
+ stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
45373
45198
  }, statementOfCashFlowConfig)
45374
45199
  )
45375
45200
  ] });
@@ -45858,6 +45683,7 @@ exports.Direction = Direction;
45858
45683
  exports.DisplayState = DisplayState;
45859
45684
  exports.EntityName = EntityName;
45860
45685
  exports.GeneralLedgerView = GeneralLedgerView;
45686
+ exports.GlobalMonthPicker = GlobalMonthPicker;
45861
45687
  exports.Integrations = Integrations;
45862
45688
  exports.Invoices = Invoices;
45863
45689
  exports.Journal = Journal;