@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/esm/index.mjs
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
|
};
|
|
@@ -5610,7 +5610,7 @@ const Separator = ({ mbs, mbe }) => {
|
|
|
5610
5610
|
const dataProperties = toDataProperties({ mbs, mbe });
|
|
5611
5611
|
return /* @__PURE__ */ jsx("div", __spreadValues({ className: "Layer__separator" }, dataProperties));
|
|
5612
5612
|
};
|
|
5613
|
-
const ModalTitleWithClose = forwardRef(function ModalTitleWithClose2({ heading, description, onClose }, ref) {
|
|
5613
|
+
const ModalTitleWithClose = forwardRef(function ModalTitleWithClose2({ heading, description, onClose, hideCloseButton = false }, ref) {
|
|
5614
5614
|
return /* @__PURE__ */ jsxs(VStack, { children: [
|
|
5615
5615
|
/* @__PURE__ */ jsxs(
|
|
5616
5616
|
"div",
|
|
@@ -5622,7 +5622,7 @@ const ModalTitleWithClose = forwardRef(function ModalTitleWithClose2({ heading,
|
|
|
5622
5622
|
heading,
|
|
5623
5623
|
description
|
|
5624
5624
|
] }),
|
|
5625
|
-
/* @__PURE__ */ jsx(
|
|
5625
|
+
!hideCloseButton && /* @__PURE__ */ jsx(
|
|
5626
5626
|
Button,
|
|
5627
5627
|
{
|
|
5628
5628
|
icon: true,
|
|
@@ -5912,7 +5912,8 @@ const BaseConfirmationModalContent = memo(function BaseConfirmationModalContent2
|
|
|
5912
5912
|
ModalTitleWithClose,
|
|
5913
5913
|
{
|
|
5914
5914
|
heading: /* @__PURE__ */ jsx(ModalHeading, { size: "sm", children: title }),
|
|
5915
|
-
onClose: close2
|
|
5915
|
+
onClose: close2,
|
|
5916
|
+
hideCloseButton: useDrawer
|
|
5916
5917
|
}
|
|
5917
5918
|
),
|
|
5918
5919
|
/* @__PURE__ */ jsxs(VStack, { gap: "md", children: [
|
|
@@ -6795,7 +6796,7 @@ const BankTransactionCategoryComboBox = ({
|
|
|
6795
6796
|
);
|
|
6796
6797
|
const numMatchOptions = (matchGroup == null ? void 0 : matchGroup.options.length) || 0;
|
|
6797
6798
|
const loadingSuggestions = bankTransaction && isLoadingSuggestions(bankTransaction) && selectedValue === null;
|
|
6798
|
-
const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : "Categorize or match...";
|
|
6799
|
+
const placeholder = numMatchOptions > 1 ? `${numMatchOptions} possible matches...` : loadingSuggestions ? "Generating suggestions..." : includeSuggestedMatches ? "Categorize or match..." : "Select category";
|
|
6799
6800
|
const SelectedValue = useMemo(() => {
|
|
6800
6801
|
return /* @__PURE__ */ jsx(BankTransactionsUncategorizedSelectedValue, { selectedValue });
|
|
6801
6802
|
}, [selectedValue]);
|
|
@@ -7442,7 +7443,7 @@ const BankTransactionsBulkActions = ({
|
|
|
7442
7443
|
const [recategorizeModalOpen, setRecategorizeModalOpen] = useState(false);
|
|
7443
7444
|
const [uncategorizeModalOpen, setUncategorizeModalOpen] = useState(false);
|
|
7444
7445
|
const confirmButtonLabel = ((_a = slotProps == null ? void 0 : slotProps.ConfirmAllModal) == null ? void 0 : _a.label) || "Confirm all";
|
|
7445
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(HStack, { align: "center", gap: "xs", children: display === DisplayState.review ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7446
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(HStack, { align: "center", gap: "xs", justify: isMobileView ? "end" : void 0, children: display === DisplayState.review ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7446
7447
|
/* @__PURE__ */ jsx(
|
|
7447
7448
|
Button,
|
|
7448
7449
|
{
|
|
@@ -7475,7 +7476,7 @@ const BankTransactionsBulkActions = ({
|
|
|
7475
7476
|
{
|
|
7476
7477
|
variant: "outlined",
|
|
7477
7478
|
onClick: () => setRecategorizeModalOpen(true),
|
|
7478
|
-
children: "Recategorize"
|
|
7479
|
+
children: isMobileView ? "Categorize" : "Recategorize"
|
|
7479
7480
|
}
|
|
7480
7481
|
),
|
|
7481
7482
|
/* @__PURE__ */ jsx(
|
|
@@ -7483,7 +7484,7 @@ const BankTransactionsBulkActions = ({
|
|
|
7483
7484
|
{
|
|
7484
7485
|
isOpen: recategorizeModalOpen,
|
|
7485
7486
|
onOpenChange: setRecategorizeModalOpen,
|
|
7486
|
-
mode: CategorizationMode.Recategorize,
|
|
7487
|
+
mode: isMobileView ? CategorizationMode.Categorize : CategorizationMode.Recategorize,
|
|
7487
7488
|
isMobileView
|
|
7488
7489
|
}
|
|
7489
7490
|
),
|
|
@@ -9850,12 +9851,12 @@ const CLASS_NAME$6 = "Layer__BankTransactionsActions";
|
|
|
9850
9851
|
function BankTransactionsActions({ children }) {
|
|
9851
9852
|
return /* @__PURE__ */ jsx("div", { className: CLASS_NAME$6, children });
|
|
9852
9853
|
}
|
|
9853
|
-
const BulkActionsModule = ({ slots }) => {
|
|
9854
|
+
const BulkActionsModule = ({ showSelectedLabel = true, fullWidth = false, slots }) => {
|
|
9854
9855
|
const { count } = useCountSelectedIds();
|
|
9855
9856
|
const { clearSelection } = useBulkSelectionActions();
|
|
9856
|
-
return /* @__PURE__ */ jsxs(HStack, { slot: "toggle", justify: "space-between", align: "center", gap: "xs",
|
|
9857
|
+
return /* @__PURE__ */ jsxs(HStack, { slot: "toggle", justify: "space-between", align: "center", gap: "xs", fluid: fullWidth, children: [
|
|
9857
9858
|
/* @__PURE__ */ jsxs(HStack, { justify: "space-between", align: "center", pis: "sm", pie: "3xs", gap: "3xs", className: "Layer__BulkActionsModule__SelectedItemsContainer", children: [
|
|
9858
|
-
/* @__PURE__ */ jsx(Span, { noWrap: true, children: `${count} selected` }),
|
|
9859
|
+
/* @__PURE__ */ jsx(Span, { noWrap: true, children: showSelectedLabel ? `${count} selected` : count }),
|
|
9859
9860
|
/* @__PURE__ */ jsx(
|
|
9860
9861
|
Button,
|
|
9861
9862
|
{
|
|
@@ -10140,7 +10141,7 @@ const MonthPicker = ({
|
|
|
10140
10141
|
}) => {
|
|
10141
10142
|
const triggerRef = useRef(null);
|
|
10142
10143
|
const [isPopoverOpen, setPopoverOpen] = useState(false);
|
|
10143
|
-
const { value
|
|
10144
|
+
const { value } = useSizeClass();
|
|
10144
10145
|
const onChangeMonth = useCallback((val) => {
|
|
10145
10146
|
onChange(val);
|
|
10146
10147
|
setPopoverOpen(false);
|
|
@@ -10154,7 +10155,7 @@ const MonthPicker = ({
|
|
|
10154
10155
|
{
|
|
10155
10156
|
ref: triggerRef,
|
|
10156
10157
|
slot: "input",
|
|
10157
|
-
className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--
|
|
10158
|
+
className: classNames("Layer__MonthPicker__InputGroup", { "Layer__MonthPicker__InputGroup--truncated": truncateMonth }),
|
|
10158
10159
|
onClick: () => setPopoverOpen(true),
|
|
10159
10160
|
children: [
|
|
10160
10161
|
/* @__PURE__ */ jsx(Input$1, __spreadProps(__spreadValues({ inset: true }, additionalAriaProps), { value: inputValue, readOnly: true })),
|
|
@@ -10186,13 +10187,18 @@ const NewToggleOption = ({
|
|
|
10186
10187
|
const NewToggle = ({
|
|
10187
10188
|
options: options2,
|
|
10188
10189
|
selectedKey,
|
|
10189
|
-
onSelectionChange
|
|
10190
|
+
onSelectionChange,
|
|
10191
|
+
fullWidth = false
|
|
10190
10192
|
}) => {
|
|
10191
10193
|
const selectedKeys = selectedKey !== void 0 ? /* @__PURE__ */ new Set([selectedKey]) : /* @__PURE__ */ new Set();
|
|
10194
|
+
const dataProperties = toDataProperties({
|
|
10195
|
+
"full-width": fullWidth
|
|
10196
|
+
});
|
|
10192
10197
|
return /* @__PURE__ */ jsx(
|
|
10193
10198
|
ToggleButtonGroup,
|
|
10194
|
-
{
|
|
10195
|
-
className: "Layer__NewToggle"
|
|
10199
|
+
__spreadProps(__spreadValues({
|
|
10200
|
+
className: "Layer__NewToggle"
|
|
10201
|
+
}, dataProperties), {
|
|
10196
10202
|
selectionMode: "single",
|
|
10197
10203
|
selectedKeys,
|
|
10198
10204
|
onSelectionChange: (keys) => {
|
|
@@ -10202,7 +10208,7 @@ const NewToggle = ({
|
|
|
10202
10208
|
}
|
|
10203
10209
|
},
|
|
10204
10210
|
children: options2.map((option) => /* @__PURE__ */ jsx(NewToggleOption, __spreadValues({}, option), option.value))
|
|
10205
|
-
}
|
|
10211
|
+
})
|
|
10206
10212
|
);
|
|
10207
10213
|
};
|
|
10208
10214
|
const SmallLoader = ({ size = 28 }) => {
|
|
@@ -10396,8 +10402,9 @@ const BankTransactionsHeader = ({
|
|
|
10396
10402
|
}, [setFilters]);
|
|
10397
10403
|
const { count } = useCountSelectedIds();
|
|
10398
10404
|
const showBulkActions = count > 0;
|
|
10405
|
+
const isMobileList = listView && mobileComponent === "mobileList";
|
|
10399
10406
|
const headerTopRow = useMemo(() => /* @__PURE__ */ jsxs("div", { className: "Layer__bank-transactions__header__content", children: [
|
|
10400
|
-
/* @__PURE__ */ jsxs(
|
|
10407
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", children: [
|
|
10401
10408
|
/* @__PURE__ */ jsx(
|
|
10402
10409
|
Heading,
|
|
10403
10410
|
{
|
|
@@ -10453,7 +10460,6 @@ const BankTransactionsHeader = ({
|
|
|
10453
10460
|
}
|
|
10454
10461
|
return actions;
|
|
10455
10462
|
}, [withUploadMenu, showCategorizationRules]);
|
|
10456
|
-
const isMobileList = listView && mobileComponent === "mobileList";
|
|
10457
10463
|
const BulkActionsModuleSlot = useCallback(() => {
|
|
10458
10464
|
return /* @__PURE__ */ jsx(
|
|
10459
10465
|
BankTransactionsBulkActions,
|
|
@@ -10467,53 +10473,103 @@ const BankTransactionsHeader = ({
|
|
|
10467
10473
|
}
|
|
10468
10474
|
);
|
|
10469
10475
|
}, [isMobileList]);
|
|
10470
|
-
|
|
10471
|
-
|
|
10476
|
+
const statusToggle = !categorizedOnly && categorizeView && showStatusToggle ? /* @__PURE__ */ jsx(
|
|
10477
|
+
NewToggle,
|
|
10472
10478
|
{
|
|
10473
|
-
|
|
10474
|
-
"
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10479
|
+
options: [
|
|
10480
|
+
{ label: "To Review", value: DisplayState.review },
|
|
10481
|
+
{ label: "Categorized", value: DisplayState.categorized }
|
|
10482
|
+
],
|
|
10483
|
+
selectedKey: display,
|
|
10484
|
+
onSelectionChange: onCategorizationDisplayChange,
|
|
10485
|
+
fullWidth: isMobileList
|
|
10486
|
+
}
|
|
10487
|
+
) : null;
|
|
10488
|
+
if (isMobileList) {
|
|
10489
|
+
return /* @__PURE__ */ jsx(
|
|
10490
|
+
Header$1,
|
|
10491
|
+
{
|
|
10492
|
+
className: classNames(
|
|
10493
|
+
"Layer__bank-transactions__header",
|
|
10494
|
+
withDatePicker && "Layer__bank-transactions__header--with-date-picker",
|
|
10495
|
+
"Layer__bank-transactions__header--mobile"
|
|
10496
|
+
),
|
|
10497
|
+
style: { top: shiftStickyHeader },
|
|
10498
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "sm", children: [
|
|
10499
|
+
headerTopRow,
|
|
10500
|
+
/* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions }),
|
|
10501
|
+
/* @__PURE__ */ jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsx(
|
|
10483
10502
|
BulkActionsModule,
|
|
10484
10503
|
{
|
|
10504
|
+
showSelectedLabel: false,
|
|
10505
|
+
fullWidth: true,
|
|
10485
10506
|
slots: { BulkActions: BulkActionsModuleSlot }
|
|
10486
10507
|
}
|
|
10487
|
-
) :
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10508
|
+
) : statusToggle })
|
|
10509
|
+
] })
|
|
10510
|
+
}
|
|
10511
|
+
);
|
|
10512
|
+
}
|
|
10513
|
+
if (listView) {
|
|
10514
|
+
return /* @__PURE__ */ jsx(
|
|
10515
|
+
Header$1,
|
|
10516
|
+
{
|
|
10517
|
+
className: classNames(
|
|
10518
|
+
"Layer__bank-transactions__header",
|
|
10519
|
+
withDatePicker && "Layer__bank-transactions__header--with-date-picker"
|
|
10520
|
+
),
|
|
10521
|
+
style: { top: shiftStickyHeader },
|
|
10522
|
+
children: /* @__PURE__ */ jsxs(VStack, { gap: "xs", children: [
|
|
10523
|
+
headerTopRow,
|
|
10524
|
+
/* @__PURE__ */ jsx(HStack, { justify: "space-between", align: "center", gap: "xs", children: showBulkActions ? /* @__PURE__ */ jsx(
|
|
10525
|
+
BulkActionsModule,
|
|
10526
|
+
{
|
|
10527
|
+
slots: { BulkActions: BulkActionsModuleSlot }
|
|
10528
|
+
}
|
|
10529
|
+
) : statusToggle }),
|
|
10530
|
+
/* @__PURE__ */ jsx(TransactionsSearch, { isDisabled: showBulkActions })
|
|
10531
|
+
] })
|
|
10532
|
+
}
|
|
10533
|
+
);
|
|
10534
|
+
} else {
|
|
10535
|
+
return /* @__PURE__ */ jsxs(
|
|
10536
|
+
Header$1,
|
|
10537
|
+
{
|
|
10538
|
+
className: classNames(
|
|
10539
|
+
"Layer__bank-transactions__header",
|
|
10540
|
+
withDatePicker && "Layer__bank-transactions__header--with-date-picker",
|
|
10541
|
+
mobileComponent && listView ? "Layer__bank-transactions__header--mobile" : void 0
|
|
10542
|
+
),
|
|
10543
|
+
style: { top: shiftStickyHeader },
|
|
10544
|
+
children: [
|
|
10545
|
+
!collapseHeader && headerTopRow,
|
|
10546
|
+
/* @__PURE__ */ jsxs(BankTransactionsActions, { children: [
|
|
10547
|
+
showBulkActions ? /* @__PURE__ */ jsx(
|
|
10548
|
+
BulkActionsModule,
|
|
10505
10549
|
{
|
|
10506
|
-
|
|
10507
|
-
iconOnly: listView,
|
|
10508
|
-
disabled: showBulkActions
|
|
10550
|
+
slots: { BulkActions: BulkActionsModuleSlot }
|
|
10509
10551
|
}
|
|
10510
|
-
),
|
|
10511
|
-
|
|
10552
|
+
) : /* @__PURE__ */ jsxs(HStack, { slot: "toggle", justify: "center", gap: "xs", children: [
|
|
10553
|
+
collapseHeader && headerTopRow,
|
|
10554
|
+
statusToggle
|
|
10555
|
+
] }),
|
|
10556
|
+
/* @__PURE__ */ jsx(TransactionsSearch, { slot: "search", isDisabled: showBulkActions }),
|
|
10557
|
+
/* @__PURE__ */ jsxs(HStack, { slot: "download-upload", justify: "center", gap: "xs", children: [
|
|
10558
|
+
/* @__PURE__ */ jsx(
|
|
10559
|
+
DownloadButton,
|
|
10560
|
+
{
|
|
10561
|
+
downloadButtonTextOverride: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
10562
|
+
iconOnly: listView,
|
|
10563
|
+
disabled: showBulkActions
|
|
10564
|
+
}
|
|
10565
|
+
),
|
|
10566
|
+
/* @__PURE__ */ jsx(BankTransactionsHeaderMenu, { actions: headerMenuActions, isDisabled: showBulkActions })
|
|
10567
|
+
] })
|
|
10512
10568
|
] })
|
|
10513
|
-
]
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10569
|
+
]
|
|
10570
|
+
}
|
|
10571
|
+
);
|
|
10572
|
+
}
|
|
10517
10573
|
};
|
|
10518
10574
|
const Inbox = (_pb) => {
|
|
10519
10575
|
var _qb = _pb, { size = 18 } = _qb, props = __objRest(_qb, ["size"]);
|
|
@@ -17059,17 +17115,16 @@ const BankTransactionsMobileBulkActionsHeader = ({
|
|
|
17059
17115
|
HStack,
|
|
17060
17116
|
{
|
|
17061
17117
|
gap: "md",
|
|
17062
|
-
pi: "xs",
|
|
17063
|
-
pbs: "sm",
|
|
17064
|
-
justify: "space-between",
|
|
17065
17118
|
align: "center",
|
|
17119
|
+
justify: "space-between",
|
|
17120
|
+
pi: "md",
|
|
17121
|
+
pb: "xs",
|
|
17066
17122
|
children: [
|
|
17067
17123
|
/* @__PURE__ */ jsx(
|
|
17068
17124
|
HStack,
|
|
17069
17125
|
{
|
|
17070
17126
|
align: "center",
|
|
17071
|
-
|
|
17072
|
-
className: "Layer__BankTransactionsMobileBulkActionsHeader__checkbox-container",
|
|
17127
|
+
gap: "xs",
|
|
17073
17128
|
children: bulkActionsEnabled && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17074
17129
|
/* @__PURE__ */ jsx(
|
|
17075
17130
|
Checkbox,
|
|
@@ -17091,15 +17146,17 @@ const BankTransactionsMobileBulkActionsHeader = ({
|
|
|
17091
17146
|
] })
|
|
17092
17147
|
}
|
|
17093
17148
|
),
|
|
17094
|
-
/* @__PURE__ */
|
|
17095
|
-
|
|
17096
|
-
|
|
17097
|
-
|
|
17098
|
-
|
|
17099
|
-
|
|
17100
|
-
|
|
17101
|
-
|
|
17102
|
-
|
|
17149
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17150
|
+
/* @__PURE__ */ jsx(Span, { size: "md", noWrap: true, children: "Bulk Actions" }),
|
|
17151
|
+
/* @__PURE__ */ jsx(
|
|
17152
|
+
Switch,
|
|
17153
|
+
{
|
|
17154
|
+
isSelected: bulkActionsEnabled,
|
|
17155
|
+
onChange: onBulkActionsToggle,
|
|
17156
|
+
"aria-label": "Toggle bulk actions"
|
|
17157
|
+
}
|
|
17158
|
+
)
|
|
17159
|
+
] })
|
|
17103
17160
|
]
|
|
17104
17161
|
}
|
|
17105
17162
|
);
|
|
@@ -24824,10 +24881,11 @@ const ProfitAndLossFullReportDownloadButton = ({
|
|
|
24824
24881
|
};
|
|
24825
24882
|
function ProfitAndLossDownloadButton({
|
|
24826
24883
|
stringOverrides,
|
|
24827
|
-
moneyFormat
|
|
24828
|
-
iconOnly
|
|
24884
|
+
moneyFormat
|
|
24829
24885
|
}) {
|
|
24830
24886
|
const { selectedLineItem } = useContext(ProfitAndLossContext);
|
|
24887
|
+
const { value } = useSizeClass();
|
|
24888
|
+
const iconOnly = value !== "desktop";
|
|
24831
24889
|
if (selectedLineItem) {
|
|
24832
24890
|
return /* @__PURE__ */ jsx(
|
|
24833
24891
|
ProfitAndLossDetailLinesDownloadButton,
|
|
@@ -24887,71 +24945,6 @@ const ProfitAndLossHeader = ({
|
|
|
24887
24945
|
] })
|
|
24888
24946
|
] });
|
|
24889
24947
|
};
|
|
24890
|
-
const DateRangePickers = ({ minDate, maxDate }) => {
|
|
24891
|
-
const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ displayMode: "full" });
|
|
24892
|
-
const { setDateRange: setGlobalDateRange } = useGlobalDateRangeActions();
|
|
24893
|
-
const {
|
|
24894
|
-
localDate: localStartDate,
|
|
24895
|
-
onChange: onChangeStartDate,
|
|
24896
|
-
minDateZdt: minStartDate,
|
|
24897
|
-
maxDateZdt: maxStartDate,
|
|
24898
|
-
isInvalid: startDateInvalid,
|
|
24899
|
-
errorText: startDateErrorText,
|
|
24900
|
-
onBlur: onBlurStartDate
|
|
24901
|
-
} = useDatePickerState({
|
|
24902
|
-
date: globalStartDate,
|
|
24903
|
-
minDate,
|
|
24904
|
-
maxDate
|
|
24905
|
-
});
|
|
24906
|
-
const {
|
|
24907
|
-
localDate: localEndDate,
|
|
24908
|
-
onChange: onChangeEndDate,
|
|
24909
|
-
minDateZdt: minEndDate,
|
|
24910
|
-
maxDateZdt: maxEndDate,
|
|
24911
|
-
isInvalid: endDateInvalid,
|
|
24912
|
-
errorText: endDateErrorText,
|
|
24913
|
-
onBlur: onBlurEndDate
|
|
24914
|
-
} = useDatePickerState({
|
|
24915
|
-
date: globalEndDate,
|
|
24916
|
-
minDate,
|
|
24917
|
-
maxDate
|
|
24918
|
-
});
|
|
24919
|
-
useEffect(() => {
|
|
24920
|
-
if (startDateInvalid || endDateInvalid || !localStartDate || !localEndDate) return;
|
|
24921
|
-
const next = { startDate: localStartDate.toDate(), endDate: localEndDate.toDate() };
|
|
24922
|
-
setGlobalDateRange(next);
|
|
24923
|
-
}, [startDateInvalid, endDateInvalid, localStartDate, localEndDate, setGlobalDateRange]);
|
|
24924
|
-
return /* @__PURE__ */ jsxs(HStack, { gap: "md", pb: "md", children: [
|
|
24925
|
-
/* @__PURE__ */ jsx(
|
|
24926
|
-
DatePicker,
|
|
24927
|
-
{
|
|
24928
|
-
label: "Start Date",
|
|
24929
|
-
showLabel: true,
|
|
24930
|
-
date: localStartDate,
|
|
24931
|
-
onChange: onChangeStartDate,
|
|
24932
|
-
minDate: minStartDate,
|
|
24933
|
-
maxDate: maxStartDate,
|
|
24934
|
-
isInvalid: startDateInvalid,
|
|
24935
|
-
errorText: startDateErrorText,
|
|
24936
|
-
onBlur: onBlurStartDate
|
|
24937
|
-
}
|
|
24938
|
-
),
|
|
24939
|
-
/* @__PURE__ */ jsx(
|
|
24940
|
-
DatePicker,
|
|
24941
|
-
{
|
|
24942
|
-
label: "End Date",
|
|
24943
|
-
showLabel: true,
|
|
24944
|
-
date: localEndDate,
|
|
24945
|
-
onChange: onChangeEndDate,
|
|
24946
|
-
minDate: minEndDate,
|
|
24947
|
-
maxDate: maxEndDate,
|
|
24948
|
-
isInvalid: endDateInvalid,
|
|
24949
|
-
errorText: endDateErrorText,
|
|
24950
|
-
onBlur: onBlurEndDate
|
|
24951
|
-
}
|
|
24952
|
-
)
|
|
24953
|
-
] });
|
|
24954
|
-
};
|
|
24955
24948
|
const MultiSelect = ({
|
|
24956
24949
|
name,
|
|
24957
24950
|
options: options2,
|
|
@@ -25681,25 +25674,6 @@ const ProfitAndLossReport = ({
|
|
|
25681
25674
|
const useComparisonPnl = !!comparisonConfig;
|
|
25682
25675
|
const header = useMemo(() => {
|
|
25683
25676
|
if (hideHeader) return null;
|
|
25684
|
-
const isMobile = view !== "desktop";
|
|
25685
|
-
const isFullDateMode = dateSelectionMode === "full";
|
|
25686
|
-
if (isMobile && isFullDateMode) {
|
|
25687
|
-
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
25688
|
-
/* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
25689
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(DateSelectionComboBox, {}) }),
|
|
25690
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsx(
|
|
25691
|
-
ProfitAndLossDownloadButton,
|
|
25692
|
-
{
|
|
25693
|
-
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25694
|
-
moneyFormat: csvMoneyFormat,
|
|
25695
|
-
iconOnly: true
|
|
25696
|
-
}
|
|
25697
|
-
) })
|
|
25698
|
-
] }),
|
|
25699
|
-
/* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(DateRangePickers, {}) }) }),
|
|
25700
|
-
useComparisonPnl && /* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(ProfitAndLossCompareOptions, {}) }) })
|
|
25701
|
-
] });
|
|
25702
|
-
}
|
|
25703
25677
|
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
25704
25678
|
/* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
25705
25679
|
/* @__PURE__ */ jsxs(HeaderCol, { children: [
|
|
@@ -25710,8 +25684,7 @@ const ProfitAndLossReport = ({
|
|
|
25710
25684
|
ProfitAndLossDownloadButton,
|
|
25711
25685
|
{
|
|
25712
25686
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
25713
|
-
moneyFormat: csvMoneyFormat
|
|
25714
|
-
iconOnly: true
|
|
25687
|
+
moneyFormat: csvMoneyFormat
|
|
25715
25688
|
}
|
|
25716
25689
|
) })
|
|
25717
25690
|
] }),
|
|
@@ -26578,36 +26551,6 @@ const CombinedDateSelection = ({ mode }) => {
|
|
|
26578
26551
|
}
|
|
26579
26552
|
return /* @__PURE__ */ jsx(DateSelection, {});
|
|
26580
26553
|
};
|
|
26581
|
-
const LabeledGlobalDatePicker = () => {
|
|
26582
|
-
const { date } = useGlobalDate();
|
|
26583
|
-
const { setDate: setGlobalDate } = useGlobalDateActions();
|
|
26584
|
-
const rawActivationDate = useBusinessActivationDate();
|
|
26585
|
-
const activationDate = useMemo(() => rawActivationDate ? startOfDay(rawActivationDate) : null, [rawActivationDate]);
|
|
26586
|
-
const maxDate = useMemo(() => endOfDay(/* @__PURE__ */ new Date()), []);
|
|
26587
|
-
const setDate = useCallback((date2) => {
|
|
26588
|
-
setGlobalDate({ date: date2 });
|
|
26589
|
-
}, [setGlobalDate]);
|
|
26590
|
-
const { localDate, onChange, minDateZdt, maxDateZdt, errorText, onBlur, isInvalid } = useDatePickerState({
|
|
26591
|
-
date,
|
|
26592
|
-
setDate,
|
|
26593
|
-
minDate: activationDate,
|
|
26594
|
-
maxDate
|
|
26595
|
-
});
|
|
26596
|
-
return /* @__PURE__ */ jsx(
|
|
26597
|
-
DatePicker,
|
|
26598
|
-
{
|
|
26599
|
-
label: "Effective Date",
|
|
26600
|
-
showLabel: true,
|
|
26601
|
-
date: localDate,
|
|
26602
|
-
onChange,
|
|
26603
|
-
minDate: minDateZdt,
|
|
26604
|
-
maxDate: maxDateZdt,
|
|
26605
|
-
isInvalid,
|
|
26606
|
-
errorText,
|
|
26607
|
-
onBlur
|
|
26608
|
-
}
|
|
26609
|
-
);
|
|
26610
|
-
};
|
|
26611
26554
|
const COMPONENT_NAME$8 = "balance-sheet";
|
|
26612
26555
|
const BalanceSheet = (props) => {
|
|
26613
26556
|
return /* @__PURE__ */ jsx(
|
|
@@ -26627,63 +26570,16 @@ const BalanceSheetView = ({
|
|
|
26627
26570
|
const { date: effectiveDate } = useGlobalDate();
|
|
26628
26571
|
const { data, isLoading } = useBalanceSheet({ effectiveDate });
|
|
26629
26572
|
const { view, containerRef } = useElementViewSize();
|
|
26630
|
-
const isMobile = view !== "desktop";
|
|
26631
|
-
const isFullDateMode = dateSelectionMode === "full";
|
|
26632
|
-
const widgetHeader = useMemo(() => {
|
|
26633
|
-
if (isMobile && isFullDateMode) {
|
|
26634
|
-
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
26635
|
-
/* @__PURE__ */ jsx(HeaderRow, { children: /* @__PURE__ */ jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(DateSelectionComboBox, {}) }) }),
|
|
26636
|
-
/* @__PURE__ */ jsxs(HeaderRow, { className: "Layer__Reports__header-row", children: [
|
|
26637
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(LabeledGlobalDatePicker, {}) }),
|
|
26638
|
-
withExpandAllButton && /* @__PURE__ */ jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }) })
|
|
26639
|
-
] })
|
|
26640
|
-
] });
|
|
26641
|
-
}
|
|
26642
|
-
return /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26643
|
-
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
26644
|
-
withExpandAllButton && /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }) })
|
|
26645
|
-
] }) });
|
|
26646
|
-
}, [dateSelectionMode, isMobile, isFullDateMode, view, withExpandAllButton]);
|
|
26647
|
-
const header = useMemo(() => {
|
|
26648
|
-
if (isMobile && isFullDateMode) {
|
|
26649
|
-
return /* @__PURE__ */ jsxs(Header, { children: [
|
|
26650
|
-
/* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26651
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(DateSelectionComboBox, {}) }),
|
|
26652
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsx(
|
|
26653
|
-
BalanceSheetDownloadButton,
|
|
26654
|
-
{
|
|
26655
|
-
effectiveDate,
|
|
26656
|
-
iconOnly: true
|
|
26657
|
-
}
|
|
26658
|
-
) })
|
|
26659
|
-
] }),
|
|
26660
|
-
/* @__PURE__ */ jsxs(HeaderRow, { className: "Layer__Reports__header-row", children: [
|
|
26661
|
-
/* @__PURE__ */ jsx(HeaderCol, { style: { flex: 1 }, children: /* @__PURE__ */ jsx(LabeledGlobalDatePicker, {}) }),
|
|
26662
|
-
withExpandAllButton && /* @__PURE__ */ jsx(HeaderCol, { style: { flex: 0 }, children: /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }) })
|
|
26663
|
-
] })
|
|
26664
|
-
] });
|
|
26665
|
-
}
|
|
26666
|
-
return /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26667
|
-
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
26668
|
-
/* @__PURE__ */ jsxs(HeaderCol, { children: [
|
|
26669
|
-
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }),
|
|
26670
|
-
/* @__PURE__ */ jsx(
|
|
26671
|
-
BalanceSheetDownloadButton,
|
|
26672
|
-
{
|
|
26673
|
-
effectiveDate,
|
|
26674
|
-
iconOnly: true
|
|
26675
|
-
}
|
|
26676
|
-
)
|
|
26677
|
-
] })
|
|
26678
|
-
] }) });
|
|
26679
|
-
}, [dateSelectionMode, effectiveDate, isMobile, isFullDateMode, view, withExpandAllButton]);
|
|
26680
26573
|
if (asWidget) {
|
|
26681
26574
|
return /* @__PURE__ */ jsx(TableProvider, { children: /* @__PURE__ */ jsx(Container, { name: COMPONENT_NAME$8, asWidget: true, children: /* @__PURE__ */ jsx(
|
|
26682
26575
|
View,
|
|
26683
26576
|
{
|
|
26684
26577
|
type: "panel",
|
|
26685
26578
|
ref: containerRef,
|
|
26686
|
-
header:
|
|
26579
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26580
|
+
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
26581
|
+
withExpandAllButton && /* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }) })
|
|
26582
|
+
] }) }),
|
|
26687
26583
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26688
26584
|
BalanceSheetTable,
|
|
26689
26585
|
{
|
|
@@ -26700,7 +26596,19 @@ const BalanceSheetView = ({
|
|
|
26700
26596
|
{
|
|
26701
26597
|
type: "panel",
|
|
26702
26598
|
ref: containerRef,
|
|
26703
|
-
header,
|
|
26599
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26600
|
+
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateSelection, { mode: dateSelectionMode }) }),
|
|
26601
|
+
/* @__PURE__ */ jsxs(HeaderCol, { children: [
|
|
26602
|
+
withExpandAllButton && /* @__PURE__ */ jsx(BalanceSheetExpandAllButton, { view }),
|
|
26603
|
+
/* @__PURE__ */ jsx(
|
|
26604
|
+
BalanceSheetDownloadButton,
|
|
26605
|
+
{
|
|
26606
|
+
effectiveDate,
|
|
26607
|
+
iconOnly: view === "mobile"
|
|
26608
|
+
}
|
|
26609
|
+
)
|
|
26610
|
+
] })
|
|
26611
|
+
] }) }),
|
|
26704
26612
|
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$8}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26705
26613
|
BalanceSheetTable,
|
|
26706
26614
|
{
|
|
@@ -26972,49 +26880,37 @@ const StatementOfCashFlow = (props) => {
|
|
|
26972
26880
|
};
|
|
26973
26881
|
const StatementOfCashFlowView = ({
|
|
26974
26882
|
stringOverrides,
|
|
26975
|
-
dateSelectionMode = "full"
|
|
26976
|
-
view
|
|
26883
|
+
dateSelectionMode = "full"
|
|
26977
26884
|
}) => {
|
|
26978
26885
|
const dateRange = useGlobalDateRange({ displayMode: dateSelectionMode });
|
|
26979
26886
|
const { data, isLoading } = useStatementOfCashFlow(dateRange);
|
|
26980
|
-
const
|
|
26981
|
-
|
|
26982
|
-
|
|
26983
|
-
|
|
26984
|
-
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
|
|
26988
|
-
|
|
26989
|
-
|
|
26990
|
-
|
|
26991
|
-
|
|
26992
|
-
|
|
26993
|
-
|
|
26994
|
-
|
|
26995
|
-
|
|
26996
|
-
|
|
26997
|
-
|
|
26998
|
-
|
|
26999
|
-
return /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
27000
|
-
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }) }),
|
|
27001
|
-
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(
|
|
27002
|
-
CashflowStatementDownloadButton,
|
|
26887
|
+
const { view, containerRef } = useElementViewSize();
|
|
26888
|
+
return /* @__PURE__ */ jsx(TableProvider, { children: /* @__PURE__ */ jsx(
|
|
26889
|
+
View,
|
|
26890
|
+
{
|
|
26891
|
+
type: "panel",
|
|
26892
|
+
ref: containerRef,
|
|
26893
|
+
header: /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(HeaderRow, { children: [
|
|
26894
|
+
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(CombinedDateRangeSelection, { mode: dateSelectionMode }) }),
|
|
26895
|
+
/* @__PURE__ */ jsx(HeaderCol, { children: /* @__PURE__ */ jsx(
|
|
26896
|
+
CashflowStatementDownloadButton,
|
|
26897
|
+
{
|
|
26898
|
+
startDate: dateRange.startDate,
|
|
26899
|
+
endDate: dateRange.endDate,
|
|
26900
|
+
iconOnly: view === "mobile"
|
|
26901
|
+
}
|
|
26902
|
+
) })
|
|
26903
|
+
] }) }),
|
|
26904
|
+
children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$7}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
26905
|
+
StatementOfCashFlowTable,
|
|
27003
26906
|
{
|
|
27004
|
-
|
|
27005
|
-
|
|
26907
|
+
data,
|
|
26908
|
+
config: STATEMENT_OF_CASH_FLOW_ROWS,
|
|
26909
|
+
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashFlowTable
|
|
27006
26910
|
}
|
|
27007
|
-
)
|
|
27008
|
-
] }) });
|
|
27009
|
-
}, [dateRange.startDate, dateRange.endDate, dateSelectionMode, view]);
|
|
27010
|
-
return /* @__PURE__ */ jsx(TableProvider, { children: /* @__PURE__ */ jsx(View, { type: "panel", header, children: !data || isLoading ? /* @__PURE__ */ jsx("div", { className: `Layer__${COMPONENT_NAME$7}__loader-container`, children: /* @__PURE__ */ jsx(Loader, {}) }) : /* @__PURE__ */ jsx(
|
|
27011
|
-
StatementOfCashFlowTable,
|
|
27012
|
-
{
|
|
27013
|
-
data,
|
|
27014
|
-
config: STATEMENT_OF_CASH_FLOW_ROWS,
|
|
27015
|
-
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashFlowTable
|
|
26911
|
+
)
|
|
27016
26912
|
}
|
|
27017
|
-
) })
|
|
26913
|
+
) });
|
|
27018
26914
|
};
|
|
27019
26915
|
const LEDGER_BALANCES_TAG_KEY = "#ledger-balances";
|
|
27020
26916
|
class LedgerBalancesSWRResponse {
|
|
@@ -38795,15 +38691,19 @@ function UnifiedReportDownloadButton() {
|
|
|
38795
38691
|
onSuccess: ({ presignedUrl }) => triggerInvisibleDownload({ url: presignedUrl })
|
|
38796
38692
|
});
|
|
38797
38693
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
38798
|
-
/* @__PURE__ */
|
|
38799
|
-
|
|
38694
|
+
/* @__PURE__ */ jsxs(
|
|
38695
|
+
Button,
|
|
38800
38696
|
{
|
|
38801
|
-
|
|
38802
|
-
|
|
38697
|
+
variant: "outlined",
|
|
38698
|
+
onPress: () => {
|
|
38803
38699
|
void trigger();
|
|
38804
38700
|
},
|
|
38805
|
-
|
|
38806
|
-
|
|
38701
|
+
isPending: isMutating,
|
|
38702
|
+
isDisabled: isMutating,
|
|
38703
|
+
children: [
|
|
38704
|
+
isError ? "Retry" : "Download",
|
|
38705
|
+
isError ? /* @__PURE__ */ jsx(RefreshCcw, { size: 12 }) : /* @__PURE__ */ jsx(DownloadCloud, { size: 16 })
|
|
38706
|
+
]
|
|
38807
38707
|
}
|
|
38808
38708
|
),
|
|
38809
38709
|
/* @__PURE__ */ jsx(InvisibleDownload, { ref: invisibleDownloadRef })
|
|
@@ -38846,7 +38746,7 @@ const AccountingOverview = ({
|
|
|
38846
38746
|
tagFilter = void 0,
|
|
38847
38747
|
slotProps
|
|
38848
38748
|
}) => {
|
|
38849
|
-
var _a, _b, _c, _d, _e;
|
|
38749
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
38850
38750
|
const [pnlToggle, setPnlToggle] = useState("expenses");
|
|
38851
38751
|
const { value: sizeClass } = useSizeClass();
|
|
38852
38752
|
const profitAndLossSummariesVariants = (_b = (_a = slotProps == null ? void 0 : slotProps.profitAndLoss) == null ? void 0 : _a.summaries) == null ? void 0 : _b.variants;
|
|
@@ -38908,11 +38808,11 @@ const AccountingOverview = ({
|
|
|
38908
38808
|
options: [
|
|
38909
38809
|
{
|
|
38910
38810
|
value: "revenue",
|
|
38911
|
-
label: "Revenue"
|
|
38811
|
+
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"
|
|
38912
38812
|
},
|
|
38913
38813
|
{
|
|
38914
38814
|
value: "expenses",
|
|
38915
|
-
label: "Expenses"
|
|
38815
|
+
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"
|
|
38916
38816
|
}
|
|
38917
38817
|
],
|
|
38918
38818
|
selected: pnlToggle,
|
|
@@ -38931,7 +38831,7 @@ const AccountingOverview = ({
|
|
|
38931
38831
|
{
|
|
38932
38832
|
scope: "revenue",
|
|
38933
38833
|
hideClose: true,
|
|
38934
|
-
stringOverrides: (
|
|
38834
|
+
stringOverrides: (_j = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _j.detailedCharts,
|
|
38935
38835
|
chartColorsList
|
|
38936
38836
|
}
|
|
38937
38837
|
)
|
|
@@ -38949,7 +38849,7 @@ const AccountingOverview = ({
|
|
|
38949
38849
|
{
|
|
38950
38850
|
scope: "expenses",
|
|
38951
38851
|
hideClose: true,
|
|
38952
|
-
stringOverrides: (
|
|
38852
|
+
stringOverrides: (_k = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _k.detailedCharts,
|
|
38953
38853
|
chartColorsList
|
|
38954
38854
|
}
|
|
38955
38855
|
)
|
|
@@ -41251,7 +41151,7 @@ const BookkeepingOverview = ({
|
|
|
41251
41151
|
stringOverrides,
|
|
41252
41152
|
slotProps
|
|
41253
41153
|
}) => {
|
|
41254
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
41154
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
41255
41155
|
const [pnlToggle, setPnlToggle] = useState("expenses");
|
|
41256
41156
|
const [width] = useWindowSize();
|
|
41257
41157
|
const { isCalendlyVisible, calendlyLink, calendlyRef, closeCalendly } = useCalendly();
|
|
@@ -41344,11 +41244,11 @@ const BookkeepingOverview = ({
|
|
|
41344
41244
|
options: [
|
|
41345
41245
|
{
|
|
41346
41246
|
value: "revenue",
|
|
41347
|
-
label: "Revenue"
|
|
41247
|
+
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"
|
|
41348
41248
|
},
|
|
41349
41249
|
{
|
|
41350
41250
|
value: "expenses",
|
|
41351
|
-
label: "Expenses"
|
|
41251
|
+
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"
|
|
41352
41252
|
}
|
|
41353
41253
|
],
|
|
41354
41254
|
selected: pnlToggle,
|
|
@@ -41367,7 +41267,7 @@ const BookkeepingOverview = ({
|
|
|
41367
41267
|
{
|
|
41368
41268
|
scope: "revenue",
|
|
41369
41269
|
hideClose: true,
|
|
41370
|
-
stringOverrides: (
|
|
41270
|
+
stringOverrides: (_m = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _m.detailedCharts
|
|
41371
41271
|
}
|
|
41372
41272
|
)
|
|
41373
41273
|
}
|
|
@@ -41384,7 +41284,7 @@ const BookkeepingOverview = ({
|
|
|
41384
41284
|
{
|
|
41385
41285
|
scope: "expenses",
|
|
41386
41286
|
hideClose: true,
|
|
41387
|
-
stringOverrides: (
|
|
41287
|
+
stringOverrides: (_n = stringOverrides == null ? void 0 : stringOverrides.profitAndLoss) == null ? void 0 : _n.detailedCharts
|
|
41388
41288
|
}
|
|
41389
41289
|
)
|
|
41390
41290
|
}
|
|
@@ -43733,83 +43633,6 @@ const ProjectProfitabilityView = ({
|
|
|
43733
43633
|
}
|
|
43734
43634
|
);
|
|
43735
43635
|
};
|
|
43736
|
-
const ReportsSelector = ({
|
|
43737
|
-
options: options2,
|
|
43738
|
-
selected,
|
|
43739
|
-
onChange,
|
|
43740
|
-
view = "mobile"
|
|
43741
|
-
}) => {
|
|
43742
|
-
const [isDrawerOpen, setIsDrawerOpen] = useState(false);
|
|
43743
|
-
const selectedOption = options2.find((opt) => opt.value === selected);
|
|
43744
|
-
if (view === "mobile") {
|
|
43745
|
-
return /* @__PURE__ */ jsxs(HStack, { children: [
|
|
43746
|
-
/* @__PURE__ */ jsxs(
|
|
43747
|
-
"button",
|
|
43748
|
-
{
|
|
43749
|
-
className: "Layer__reports-selector",
|
|
43750
|
-
onClick: () => setIsDrawerOpen(true),
|
|
43751
|
-
type: "button",
|
|
43752
|
-
children: [
|
|
43753
|
-
/* @__PURE__ */ jsx(Span, { size: "lg", weight: "bold", children: selectedOption == null ? void 0 : selectedOption.label }),
|
|
43754
|
-
/* @__PURE__ */ jsx(ChevronDown, { size: 20, className: "Layer__reports-selector__chevron" })
|
|
43755
|
-
]
|
|
43756
|
-
}
|
|
43757
|
-
),
|
|
43758
|
-
/* @__PURE__ */ jsx(
|
|
43759
|
-
Drawer,
|
|
43760
|
-
{
|
|
43761
|
-
isOpen: isDrawerOpen,
|
|
43762
|
-
onOpenChange: setIsDrawerOpen,
|
|
43763
|
-
variant: "mobile-drawer",
|
|
43764
|
-
isDismissable: true,
|
|
43765
|
-
"aria-label": "Select report type",
|
|
43766
|
-
children: ({ close: close2 }) => /* @__PURE__ */ jsxs(VStack, { className: "Layer__reports-selector-drawer", children: [
|
|
43767
|
-
/* @__PURE__ */ jsx(
|
|
43768
|
-
HStack,
|
|
43769
|
-
{
|
|
43770
|
-
justify: "center",
|
|
43771
|
-
pb: "md",
|
|
43772
|
-
className: "Layer__reports-selector-drawer__header",
|
|
43773
|
-
children: /* @__PURE__ */ jsx(Span, { size: "lg", weight: "bold", children: "Select Report" })
|
|
43774
|
-
}
|
|
43775
|
-
),
|
|
43776
|
-
/* @__PURE__ */ jsx(VStack, { className: "Layer__reports-selector-drawer__options", children: options2.map((option) => {
|
|
43777
|
-
const isSelected = option.value === selected;
|
|
43778
|
-
const optionClassName = classNames(
|
|
43779
|
-
"Layer__reports-selector-drawer__option",
|
|
43780
|
-
{
|
|
43781
|
-
"Layer__reports-selector-drawer__option--selected": isSelected
|
|
43782
|
-
}
|
|
43783
|
-
);
|
|
43784
|
-
return /* @__PURE__ */ jsx(
|
|
43785
|
-
"button",
|
|
43786
|
-
{
|
|
43787
|
-
className: optionClassName,
|
|
43788
|
-
onClick: () => {
|
|
43789
|
-
onChange(option.value);
|
|
43790
|
-
close2();
|
|
43791
|
-
},
|
|
43792
|
-
type: "button",
|
|
43793
|
-
children: /* @__PURE__ */ jsx(Span, { size: "md", weight: isSelected ? "bold" : "normal", children: option.label })
|
|
43794
|
-
},
|
|
43795
|
-
option.value
|
|
43796
|
-
);
|
|
43797
|
-
}) })
|
|
43798
|
-
] })
|
|
43799
|
-
}
|
|
43800
|
-
)
|
|
43801
|
-
] });
|
|
43802
|
-
}
|
|
43803
|
-
return /* @__PURE__ */ jsx(
|
|
43804
|
-
Toggle,
|
|
43805
|
-
{
|
|
43806
|
-
name: "reports-tabs",
|
|
43807
|
-
options: options2,
|
|
43808
|
-
selected,
|
|
43809
|
-
onChange: (e) => onChange(e.target.value)
|
|
43810
|
-
}
|
|
43811
|
-
);
|
|
43812
|
-
};
|
|
43813
43636
|
const getOptions = (enabledReports) => {
|
|
43814
43637
|
return [
|
|
43815
43638
|
enabledReports.includes("profitAndLoss") ? {
|
|
@@ -43848,12 +43671,12 @@ const Reports = ({
|
|
|
43848
43671
|
showHeader: showTitle,
|
|
43849
43672
|
children: [
|
|
43850
43673
|
enabledReports.length > 1 && /* @__PURE__ */ jsx("div", { className: "Layer__component Layer__header__actions", children: /* @__PURE__ */ jsx(
|
|
43851
|
-
|
|
43674
|
+
Toggle,
|
|
43852
43675
|
{
|
|
43676
|
+
name: "reports-tabs",
|
|
43853
43677
|
options: options2,
|
|
43854
43678
|
selected: activeTab,
|
|
43855
|
-
onChange: setActiveTab
|
|
43856
|
-
view
|
|
43679
|
+
onChange: (opt) => setActiveTab(opt.target.value)
|
|
43857
43680
|
}
|
|
43858
43681
|
) }),
|
|
43859
43682
|
/* @__PURE__ */ jsx(Container, { name: "reports", ref: containerRef, children: /* @__PURE__ */ jsx(ProfitAndLoss, { asContainer: false, comparisonConfig, children: /* @__PURE__ */ jsx(
|
|
@@ -43892,8 +43715,7 @@ const ReportsPanel = ({
|
|
|
43892
43715
|
openReport === "statementOfCashFlow" && /* @__PURE__ */ jsx(
|
|
43893
43716
|
StatementOfCashFlow,
|
|
43894
43717
|
__spreadValues({
|
|
43895
|
-
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
|
|
43896
|
-
view
|
|
43718
|
+
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.statementOfCashflow
|
|
43897
43719
|
}, statementOfCashFlowConfig)
|
|
43898
43720
|
)
|
|
43899
43721
|
] });
|
|
@@ -44383,6 +44205,7 @@ export {
|
|
|
44383
44205
|
DisplayState,
|
|
44384
44206
|
EntityName,
|
|
44385
44207
|
GeneralLedgerView,
|
|
44208
|
+
GlobalMonthPicker,
|
|
44386
44209
|
Integrations,
|
|
44387
44210
|
Invoices,
|
|
44388
44211
|
Journal,
|