@layerfi/components 0.1.117-alpha → 0.1.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +200 -377
- package/dist/esm/index.mjs +200 -377
- package/dist/index.css +13 -76
- package/dist/index.d.ts +6 -3
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -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
|
|
205
|
+
const version = "0.1.117";
|
|
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",
|
|
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
|
|
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--
|
|
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(
|
|
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
|
-
|
|
11947
|
-
|
|
11952
|
+
const statusToggle = !categorizedOnly && categorizeView && showStatusToggle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
11953
|
+
NewToggle,
|
|
11948
11954
|
{
|
|
11949
|
-
|
|
11950
|
-
"
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
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
|
-
) :
|
|
11964
|
-
|
|
11965
|
-
|
|
11966
|
-
|
|
11967
|
-
|
|
11968
|
-
|
|
11969
|
-
|
|
11970
|
-
|
|
11971
|
-
|
|
11972
|
-
|
|
11973
|
-
|
|
11974
|
-
|
|
11975
|
-
|
|
11976
|
-
|
|
11977
|
-
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
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
|
-
|
|
11983
|
-
iconOnly: listView,
|
|
11984
|
-
disabled: showBulkActions
|
|
12026
|
+
slots: { BulkActions: BulkActionsModuleSlot }
|
|
11985
12027
|
}
|
|
11986
|
-
),
|
|
11987
|
-
|
|
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,16 @@ 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
|
+
pi: "md",
|
|
18597
|
+
pb: "xs",
|
|
18542
18598
|
children: [
|
|
18543
18599
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18544
18600
|
HStack,
|
|
18545
18601
|
{
|
|
18546
18602
|
align: "center",
|
|
18547
|
-
|
|
18548
|
-
className: "Layer__BankTransactionsMobileBulkActionsHeader__checkbox-container",
|
|
18603
|
+
gap: "xs",
|
|
18549
18604
|
children: bulkActionsEnabled && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18550
18605
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18551
18606
|
Checkbox,
|
|
@@ -18567,15 +18622,17 @@ const BankTransactionsMobileBulkActionsHeader = ({
|
|
|
18567
18622
|
] })
|
|
18568
18623
|
}
|
|
18569
18624
|
),
|
|
18570
|
-
/* @__PURE__ */ jsxRuntime.
|
|
18571
|
-
|
|
18572
|
-
|
|
18573
|
-
|
|
18574
|
-
|
|
18575
|
-
|
|
18576
|
-
|
|
18577
|
-
|
|
18578
|
-
|
|
18625
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
18626
|
+
/* @__PURE__ */ jsxRuntime.jsx(Span, { size: "md", noWrap: true, children: "Bulk Actions" }),
|
|
18627
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
18628
|
+
Switch,
|
|
18629
|
+
{
|
|
18630
|
+
isSelected: bulkActionsEnabled,
|
|
18631
|
+
onChange: onBulkActionsToggle,
|
|
18632
|
+
"aria-label": "Toggle bulk actions"
|
|
18633
|
+
}
|
|
18634
|
+
)
|
|
18635
|
+
] })
|
|
18579
18636
|
]
|
|
18580
18637
|
}
|
|
18581
18638
|
);
|
|
@@ -26300,10 +26357,11 @@ const ProfitAndLossFullReportDownloadButton = ({
|
|
|
26300
26357
|
};
|
|
26301
26358
|
function ProfitAndLossDownloadButton({
|
|
26302
26359
|
stringOverrides,
|
|
26303
|
-
moneyFormat
|
|
26304
|
-
iconOnly
|
|
26360
|
+
moneyFormat
|
|
26305
26361
|
}) {
|
|
26306
26362
|
const { selectedLineItem } = react.useContext(ProfitAndLossContext);
|
|
26363
|
+
const { value } = useSizeClass();
|
|
26364
|
+
const iconOnly = value !== "desktop";
|
|
26307
26365
|
if (selectedLineItem) {
|
|
26308
26366
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26309
26367
|
ProfitAndLossDetailLinesDownloadButton,
|
|
@@ -26363,71 +26421,6 @@ const ProfitAndLossHeader = ({
|
|
|
26363
26421
|
] })
|
|
26364
26422
|
] });
|
|
26365
26423
|
};
|
|
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
26424
|
const MultiSelect = ({
|
|
26432
26425
|
name,
|
|
26433
26426
|
options: options2,
|
|
@@ -27157,25 +27150,6 @@ const ProfitAndLossReport = ({
|
|
|
27157
27150
|
const useComparisonPnl = !!comparisonConfig;
|
|
27158
27151
|
const header = react.useMemo(() => {
|
|
27159
27152
|
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
27153
|
return /* @__PURE__ */ jsxRuntime.jsxs(Header, { children: [
|
|
27180
27154
|
/* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
|
|
27181
27155
|
/* @__PURE__ */ jsxRuntime.jsxs(HeaderCol, { children: [
|
|
@@ -27186,8 +27160,7 @@ const ProfitAndLossReport = ({
|
|
|
27186
27160
|
ProfitAndLossDownloadButton,
|
|
27187
27161
|
{
|
|
27188
27162
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
27189
|
-
moneyFormat: csvMoneyFormat
|
|
27190
|
-
iconOnly: true
|
|
27163
|
+
moneyFormat: csvMoneyFormat
|
|
27191
27164
|
}
|
|
27192
27165
|
) })
|
|
27193
27166
|
] }),
|
|
@@ -28054,36 +28027,6 @@ const CombinedDateSelection = ({ mode }) => {
|
|
|
28054
28027
|
}
|
|
28055
28028
|
return /* @__PURE__ */ jsxRuntime.jsx(DateSelection, {});
|
|
28056
28029
|
};
|
|
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
28030
|
const COMPONENT_NAME$8 = "balance-sheet";
|
|
28088
28031
|
const BalanceSheet = (props) => {
|
|
28089
28032
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -28103,63 +28046,16 @@ const BalanceSheetView = ({
|
|
|
28103
28046
|
const { date: effectiveDate } = useGlobalDate();
|
|
28104
28047
|
const { data, isLoading } = useBalanceSheet({ effectiveDate });
|
|
28105
28048
|
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
28049
|
if (asWidget) {
|
|
28157
28050
|
return /* @__PURE__ */ jsxRuntime.jsx(TableProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Container, { name: COMPONENT_NAME$8, asWidget: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28158
28051
|
View,
|
|
28159
28052
|
{
|
|
28160
28053
|
type: "panel",
|
|
28161
28054
|
ref: containerRef,
|
|
28162
|
-
header:
|
|
28055
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
|
|
28056
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
28057
|
+
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }) })
|
|
28058
|
+
] }) }),
|
|
28163
28059
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28164
28060
|
BalanceSheetTable,
|
|
28165
28061
|
{
|
|
@@ -28176,7 +28072,19 @@ const BalanceSheetView = ({
|
|
|
28176
28072
|
{
|
|
28177
28073
|
type: "panel",
|
|
28178
28074
|
ref: containerRef,
|
|
28179
|
-
header,
|
|
28075
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
|
|
28076
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
28077
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HeaderCol, { children: [
|
|
28078
|
+
withExpandAllButton && /* @__PURE__ */ jsxRuntime.jsx(BalanceSheetExpandAllButton, { view }),
|
|
28079
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
28080
|
+
BalanceSheetDownloadButton,
|
|
28081
|
+
{
|
|
28082
|
+
effectiveDate,
|
|
28083
|
+
iconOnly: view === "mobile"
|
|
28084
|
+
}
|
|
28085
|
+
)
|
|
28086
|
+
] })
|
|
28087
|
+
] }) }),
|
|
28180
28088
|
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28181
28089
|
BalanceSheetTable,
|
|
28182
28090
|
{
|
|
@@ -28448,49 +28356,37 @@ const StatementOfCashFlow = (props) => {
|
|
|
28448
28356
|
};
|
|
28449
28357
|
const StatementOfCashFlowView = ({
|
|
28450
28358
|
stringOverrides,
|
|
28451
|
-
dateSelectionMode = "full"
|
|
28452
|
-
view
|
|
28359
|
+
dateSelectionMode = "full"
|
|
28453
28360
|
}) => {
|
|
28454
28361
|
const dateRange = useGlobalDateRange({ displayMode: dateSelectionMode });
|
|
28455
28362
|
const { data, isLoading } = useStatementOfCashFlow(dateRange);
|
|
28456
|
-
const
|
|
28457
|
-
|
|
28458
|
-
|
|
28459
|
-
|
|
28460
|
-
|
|
28461
|
-
|
|
28462
|
-
|
|
28463
|
-
|
|
28464
|
-
|
|
28465
|
-
|
|
28466
|
-
|
|
28467
|
-
|
|
28468
|
-
|
|
28469
|
-
|
|
28470
|
-
|
|
28471
|
-
|
|
28472
|
-
|
|
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,
|
|
28363
|
+
const { view, containerRef } = useElementViewSize();
|
|
28364
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TableProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28365
|
+
View,
|
|
28366
|
+
{
|
|
28367
|
+
type: "panel",
|
|
28368
|
+
ref: containerRef,
|
|
28369
|
+
header: /* @__PURE__ */ jsxRuntime.jsx(Header, { children: /* @__PURE__ */ jsxRuntime.jsxs(HeaderRow, { children: [
|
|
28370
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }) }),
|
|
28371
|
+
/* @__PURE__ */ jsxRuntime.jsx(HeaderCol, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28372
|
+
CashflowStatementDownloadButton,
|
|
28373
|
+
{
|
|
28374
|
+
startDate: dateRange.startDate,
|
|
28375
|
+
endDate: dateRange.endDate,
|
|
28376
|
+
iconOnly: view === "mobile"
|
|
28377
|
+
}
|
|
28378
|
+
) })
|
|
28379
|
+
] }) }),
|
|
28380
|
+
children: !data || isLoading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: `Layer__${COMPONENT_NAME$7}__loader-container`, children: /* @__PURE__ */ jsxRuntime.jsx(Loader, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
28381
|
+
StatementOfCashFlowTable,
|
|
28479
28382
|
{
|
|
28480
|
-
|
|
28481
|
-
|
|
28383
|
+
data,
|
|
28384
|
+
config: STATEMENT_OF_CASH_FLOW_ROWS,
|
|
28385
|
+
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashFlowTable
|
|
28482
28386
|
}
|
|
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
|
|
28387
|
+
)
|
|
28492
28388
|
}
|
|
28493
|
-
) })
|
|
28389
|
+
) });
|
|
28494
28390
|
};
|
|
28495
28391
|
const LEDGER_BALANCES_TAG_KEY = "#ledger-balances";
|
|
28496
28392
|
class LedgerBalancesSWRResponse {
|
|
@@ -40271,15 +40167,19 @@ function UnifiedReportDownloadButton() {
|
|
|
40271
40167
|
onSuccess: ({ presignedUrl }) => triggerInvisibleDownload({ url: presignedUrl })
|
|
40272
40168
|
});
|
|
40273
40169
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
40274
|
-
/* @__PURE__ */ jsxRuntime.
|
|
40275
|
-
|
|
40170
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
40171
|
+
Button,
|
|
40276
40172
|
{
|
|
40277
|
-
|
|
40278
|
-
|
|
40173
|
+
variant: "outlined",
|
|
40174
|
+
onPress: () => {
|
|
40279
40175
|
void trigger();
|
|
40280
40176
|
},
|
|
40281
|
-
|
|
40282
|
-
|
|
40177
|
+
isPending: isMutating,
|
|
40178
|
+
isDisabled: isMutating,
|
|
40179
|
+
children: [
|
|
40180
|
+
isError ? "Retry" : "Download",
|
|
40181
|
+
isError ? /* @__PURE__ */ jsxRuntime.jsx(RefreshCcw, { size: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(DownloadCloud, { size: 16 })
|
|
40182
|
+
]
|
|
40283
40183
|
}
|
|
40284
40184
|
),
|
|
40285
40185
|
/* @__PURE__ */ jsxRuntime.jsx(InvisibleDownload, { ref: invisibleDownloadRef })
|
|
@@ -40322,7 +40222,7 @@ const AccountingOverview = ({
|
|
|
40322
40222
|
tagFilter = void 0,
|
|
40323
40223
|
slotProps
|
|
40324
40224
|
}) => {
|
|
40325
|
-
var _a, _b, _c, _d, _e;
|
|
40225
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
40326
40226
|
const [pnlToggle, setPnlToggle] = react.useState("expenses");
|
|
40327
40227
|
const { value: sizeClass } = useSizeClass();
|
|
40328
40228
|
const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
|
|
@@ -40384,11 +40284,11 @@ const AccountingOverview = ({
|
|
|
40384
40284
|
options: [
|
|
40385
40285
|
{
|
|
40386
40286
|
value: "revenue",
|
|
40387
|
-
label: "Revenue"
|
|
40287
|
+
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
40288
|
},
|
|
40389
40289
|
{
|
|
40390
40290
|
value: "expenses",
|
|
40391
|
-
label: "Expenses"
|
|
40291
|
+
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
40292
|
}
|
|
40393
40293
|
],
|
|
40394
40294
|
selected: pnlToggle,
|
|
@@ -40407,7 +40307,7 @@ const AccountingOverview = ({
|
|
|
40407
40307
|
{
|
|
40408
40308
|
scope: "revenue",
|
|
40409
40309
|
hideClose: true,
|
|
40410
|
-
stringOverrides: (
|
|
40310
|
+
stringOverrides: (_j = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _j.detailedCharts,
|
|
40411
40311
|
chartColorsList
|
|
40412
40312
|
}
|
|
40413
40313
|
)
|
|
@@ -40425,7 +40325,7 @@ const AccountingOverview = ({
|
|
|
40425
40325
|
{
|
|
40426
40326
|
scope: "expenses",
|
|
40427
40327
|
hideClose: true,
|
|
40428
|
-
stringOverrides: (
|
|
40328
|
+
stringOverrides: (_k = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _k.detailedCharts,
|
|
40429
40329
|
chartColorsList
|
|
40430
40330
|
}
|
|
40431
40331
|
)
|
|
@@ -42727,7 +42627,7 @@ const BookkeepingOverview = ({
|
|
|
42727
42627
|
stringOverrides,
|
|
42728
42628
|
slotProps
|
|
42729
42629
|
}) => {
|
|
42730
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
42630
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
42731
42631
|
const [pnlToggle, setPnlToggle] = react.useState("expenses");
|
|
42732
42632
|
const [width] = useWindowSize();
|
|
42733
42633
|
const { isCalendlyVisible, calendlyLink, calendlyRef, closeCalendly } = useCalendly();
|
|
@@ -42820,11 +42720,11 @@ const BookkeepingOverview = ({
|
|
|
42820
42720
|
options: [
|
|
42821
42721
|
{
|
|
42822
42722
|
value: "revenue",
|
|
42823
|
-
label: "Revenue"
|
|
42723
|
+
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
42724
|
},
|
|
42825
42725
|
{
|
|
42826
42726
|
value: "expenses",
|
|
42827
|
-
label: "Expenses"
|
|
42727
|
+
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
42728
|
}
|
|
42829
42729
|
],
|
|
42830
42730
|
selected: pnlToggle,
|
|
@@ -42843,7 +42743,7 @@ const BookkeepingOverview = ({
|
|
|
42843
42743
|
{
|
|
42844
42744
|
scope: "revenue",
|
|
42845
42745
|
hideClose: true,
|
|
42846
|
-
stringOverrides: (
|
|
42746
|
+
stringOverrides: (_m = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _m.detailedCharts
|
|
42847
42747
|
}
|
|
42848
42748
|
)
|
|
42849
42749
|
}
|
|
@@ -42860,7 +42760,7 @@ const BookkeepingOverview = ({
|
|
|
42860
42760
|
{
|
|
42861
42761
|
scope: "expenses",
|
|
42862
42762
|
hideClose: true,
|
|
42863
|
-
stringOverrides: (
|
|
42763
|
+
stringOverrides: (_n = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _n.detailedCharts
|
|
42864
42764
|
}
|
|
42865
42765
|
)
|
|
42866
42766
|
}
|
|
@@ -45209,83 +45109,6 @@ const ProjectProfitabilityView = ({
|
|
|
45209
45109
|
}
|
|
45210
45110
|
);
|
|
45211
45111
|
};
|
|
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
45112
|
const getOptions = (enabledReports) => {
|
|
45290
45113
|
return [
|
|
45291
45114
|
enabledReports.includes("profitAndLoss") ? {
|
|
@@ -45324,12 +45147,12 @@ const Reports = ({
|
|
|
45324
45147
|
showHeader: showTitle,
|
|
45325
45148
|
children: [
|
|
45326
45149
|
enabledReports.length > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "Layer__component Layer__header__actions", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
45327
|
-
|
|
45150
|
+
Toggle,
|
|
45328
45151
|
{
|
|
45152
|
+
name: "reports-tabs",
|
|
45329
45153
|
options: options2,
|
|
45330
45154
|
selected: activeTab,
|
|
45331
|
-
onChange: setActiveTab
|
|
45332
|
-
view
|
|
45155
|
+
onChange: (opt) => setActiveTab(opt.target.value)
|
|
45333
45156
|
}
|
|
45334
45157
|
) }),
|
|
45335
45158
|
/* @__PURE__ */ jsxRuntime.jsx(Container, { name: "reports", ref: containerRef, children: /* @__PURE__ */ jsxRuntime.jsx(ProfitAndLoss, { asContainer: false, comparisonConfig, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -45368,8 +45191,7 @@ const ReportsPanel = ({
|
|
|
45368
45191
|
openReport === "statementOfCashFlow" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
45369
45192
|
StatementOfCashFlow,
|
|
45370
45193
|
__spreadValues({
|
|
45371
|
-
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
|
|
45372
|
-
view
|
|
45194
|
+
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
|
|
45373
45195
|
}, statementOfCashFlowConfig)
|
|
45374
45196
|
)
|
|
45375
45197
|
] });
|
|
@@ -45858,6 +45680,7 @@ exports.Direction = Direction;
|
|
|
45858
45680
|
exports.DisplayState = DisplayState;
|
|
45859
45681
|
exports.EntityName = EntityName;
|
|
45860
45682
|
exports.GeneralLedgerView = GeneralLedgerView;
|
|
45683
|
+
exports.GlobalMonthPicker = GlobalMonthPicker;
|
|
45861
45684
|
exports.Integrations = Integrations;
|
|
45862
45685
|
exports.Invoices = Invoices;
|
|
45863
45686
|
exports.Journal = Journal;
|