@layerfi/components 0.1.123-alpha → 0.1.123
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 +176 -158
- package/dist/esm/index.mjs +176 -158
- package/dist/index.css +0 -6
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -214,7 +214,7 @@ var ErrorHandlerClass = class {
|
|
|
214
214
|
const errorHandler = new ErrorHandlerClass();
|
|
215
215
|
const reportError = (payload) => errorHandler.onError(payload);
|
|
216
216
|
const name = "@layerfi/components";
|
|
217
|
-
const version$1 = "0.1.123
|
|
217
|
+
const version$1 = "0.1.123";
|
|
218
218
|
const description = "Layer React Components";
|
|
219
219
|
const main = "dist/cjs/index.cjs";
|
|
220
220
|
const module$1 = "dist/esm/index.mjs";
|
|
@@ -5419,7 +5419,7 @@ var _excluded$100 = [
|
|
|
5419
5419
|
"pie",
|
|
5420
5420
|
"fluid"
|
|
5421
5421
|
];
|
|
5422
|
-
var CLASS_NAME$
|
|
5422
|
+
var CLASS_NAME$12 = "Layer__Stack";
|
|
5423
5423
|
const Stack = (0, react.forwardRef)(function Stack$2(_ref, ref) {
|
|
5424
5424
|
let { align, children, className, direction, gap, justify, overflow, pb, pbs, pbe, pi, pis, pie, fluid } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$100);
|
|
5425
5425
|
const dataProperties = toDataProperties({
|
|
@@ -5437,7 +5437,7 @@ const Stack = (0, react.forwardRef)(function Stack$2(_ref, ref) {
|
|
|
5437
5437
|
fluid
|
|
5438
5438
|
});
|
|
5439
5439
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2(_objectSpread2({ ref }, restProps), dataProperties), {}, {
|
|
5440
|
-
className: (0, classnames.default)(CLASS_NAME$
|
|
5440
|
+
className: (0, classnames.default)(CLASS_NAME$12, className),
|
|
5441
5441
|
children
|
|
5442
5442
|
}));
|
|
5443
5443
|
});
|
|
@@ -5569,7 +5569,7 @@ function useInvisibleDownload() {
|
|
|
5569
5569
|
}, [])
|
|
5570
5570
|
};
|
|
5571
5571
|
}
|
|
5572
|
-
var CLASS_NAME$
|
|
5572
|
+
var CLASS_NAME$11 = "Layer__InvisibleDownload";
|
|
5573
5573
|
var InvisibleDownload = (0, react.forwardRef)((_props, ref) => {
|
|
5574
5574
|
const internalRef = (0, react.useRef)(null);
|
|
5575
5575
|
(0, react.useImperativeHandle)(ref, () => ({ trigger: function() {
|
|
@@ -5591,7 +5591,7 @@ var InvisibleDownload = (0, react.forwardRef)((_props, ref) => {
|
|
|
5591
5591
|
}() }));
|
|
5592
5592
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
5593
5593
|
download: true,
|
|
5594
|
-
className: CLASS_NAME$
|
|
5594
|
+
className: CLASS_NAME$11,
|
|
5595
5595
|
ref: internalRef,
|
|
5596
5596
|
onClick: (0, react.useCallback)((event) => {
|
|
5597
5597
|
event.stopPropagation();
|
|
@@ -5949,10 +5949,10 @@ const Toggle = ({ ariaLabel, options: options$5, selectedKey, onSelectionChange,
|
|
|
5949
5949
|
children: options$5.map((option) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleOption, _objectSpread2({}, option), option.value))
|
|
5950
5950
|
}));
|
|
5951
5951
|
};
|
|
5952
|
-
var CLASS_NAME$
|
|
5952
|
+
var CLASS_NAME$10 = "Layer__LoadingSpinner";
|
|
5953
5953
|
function LoadingSpinner({ size }) {
|
|
5954
5954
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.LoaderCircle, {
|
|
5955
|
-
className: CLASS_NAME$
|
|
5955
|
+
className: CLASS_NAME$10,
|
|
5956
5956
|
size
|
|
5957
5957
|
});
|
|
5958
5958
|
}
|
|
@@ -7784,7 +7784,7 @@ var _excluded$84 = [
|
|
|
7784
7784
|
"displayPlusSign",
|
|
7785
7785
|
"className"
|
|
7786
7786
|
];
|
|
7787
|
-
var CLASS_NAME$
|
|
7787
|
+
var CLASS_NAME$9 = "Layer__MoneySpan";
|
|
7788
7788
|
var MoneySpan = (0, react.forwardRef)((_ref, ref) => {
|
|
7789
7789
|
let { amount, displayPlusSign, className } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$84);
|
|
7790
7790
|
const dataProperties = toDataProperties({
|
|
@@ -7793,7 +7793,7 @@ var MoneySpan = (0, react.forwardRef)((_ref, ref) => {
|
|
|
7793
7793
|
"display-plus-sign": displayPlusSign
|
|
7794
7794
|
});
|
|
7795
7795
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Span, _objectSpread2(_objectSpread2(_objectSpread2({}, restProps), dataProperties), {}, {
|
|
7796
|
-
className: (0, classnames.default)(CLASS_NAME$
|
|
7796
|
+
className: (0, classnames.default)(CLASS_NAME$9, className),
|
|
7797
7797
|
ref,
|
|
7798
7798
|
children: centsToDollars(Math.abs(amount))
|
|
7799
7799
|
}));
|
|
@@ -8329,12 +8329,12 @@ const InputGroup$1 = (0, react.forwardRef)(function InputGroup$2(_ref, ref) {
|
|
|
8329
8329
|
}));
|
|
8330
8330
|
});
|
|
8331
8331
|
var _excluded$80 = ["placeholder", "isDisabled"];
|
|
8332
|
-
var CLASS_NAME$
|
|
8332
|
+
var CLASS_NAME$8 = "Layer__MinimalSearchField";
|
|
8333
8333
|
function MinimalSearchField(_ref) {
|
|
8334
8334
|
let { placeholder, isDisabled } = _ref;
|
|
8335
8335
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_aria_components.SearchField, _objectSpread2(_objectSpread2({}, _objectWithoutProperties(_ref, _excluded$80)), {}, {
|
|
8336
8336
|
isDisabled,
|
|
8337
|
-
className: CLASS_NAME$
|
|
8337
|
+
className: CLASS_NAME$8,
|
|
8338
8338
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_aria_components.Input, {
|
|
8339
8339
|
slot: "input",
|
|
8340
8340
|
placeholder
|
|
@@ -8354,12 +8354,12 @@ var _excluded$79 = [
|
|
|
8354
8354
|
"label",
|
|
8355
8355
|
"isDisabled"
|
|
8356
8356
|
];
|
|
8357
|
-
var CLASS_NAME$
|
|
8357
|
+
var CLASS_NAME$7 = "Layer__SearchField";
|
|
8358
8358
|
function SearchField(_ref) {
|
|
8359
8359
|
let { slot = "search", className, label, isDisabled } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$79);
|
|
8360
8360
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(InputGroup$1, {
|
|
8361
8361
|
slot,
|
|
8362
|
-
className: (0, classnames.default)(CLASS_NAME$
|
|
8362
|
+
className: (0, classnames.default)(CLASS_NAME$7, className),
|
|
8363
8363
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
|
|
8364
8364
|
slot: "icon",
|
|
8365
8365
|
align: "center",
|
|
@@ -9705,7 +9705,7 @@ var _excluded$71 = [
|
|
|
9705
9705
|
"size",
|
|
9706
9706
|
"isIndeterminate"
|
|
9707
9707
|
], _excluded2$8 = ["tooltip"];
|
|
9708
|
-
var CLASS_NAME$
|
|
9708
|
+
var CLASS_NAME$6 = "Layer__Checkbox";
|
|
9709
9709
|
var CHECK_SIZE = {
|
|
9710
9710
|
sm: 12,
|
|
9711
9711
|
md: 14,
|
|
@@ -9723,7 +9723,7 @@ function Checkbox(_ref) {
|
|
|
9723
9723
|
variant
|
|
9724
9724
|
])), props), {}, {
|
|
9725
9725
|
isIndeterminate,
|
|
9726
|
-
className: (0, classnames.default)(CLASS_NAME$
|
|
9726
|
+
className: (0, classnames.default)(CLASS_NAME$6, className),
|
|
9727
9727
|
children: withRenderProp(children, (node) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9728
9728
|
slot: "checkbox",
|
|
9729
9729
|
children: isIndeterminate ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Minus, { size: CHECK_SIZE[size] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Check, { size: CHECK_SIZE[size] })
|
|
@@ -10049,7 +10049,7 @@ function ResponsivePopover({ children, triggerRef }) {
|
|
|
10049
10049
|
children
|
|
10050
10050
|
});
|
|
10051
10051
|
}
|
|
10052
|
-
const DatePicker = ({ label, showLabel =
|
|
10052
|
+
const DatePicker = ({ label, showLabel = false, date, minDate, maxDate, isInvalid, errorText, onBlur, onChange, isDisabled, isReadOnly, className, slotProps }) => {
|
|
10053
10053
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
10054
10054
|
const { value } = useSizeClass();
|
|
10055
10055
|
const [isPopoverOpen, setPopoverOpen] = (0, react.useState)(false);
|
|
@@ -11424,10 +11424,10 @@ const BankTransactionsHeaderMenu = ({ actions, isDisabled, isListView = false })
|
|
|
11424
11424
|
})
|
|
11425
11425
|
] });
|
|
11426
11426
|
};
|
|
11427
|
-
var CLASS_NAME$
|
|
11427
|
+
var CLASS_NAME$5 = "Layer__BankTransactionsActions";
|
|
11428
11428
|
function BankTransactionsActions({ children }) {
|
|
11429
11429
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
11430
|
-
className: CLASS_NAME$
|
|
11430
|
+
className: CLASS_NAME$5,
|
|
11431
11431
|
children
|
|
11432
11432
|
});
|
|
11433
11433
|
}
|
|
@@ -11603,7 +11603,7 @@ function MonthCalendar({ date, onChange, minDate, maxDate, variant }) {
|
|
|
11603
11603
|
}, m.key))
|
|
11604
11604
|
})] });
|
|
11605
11605
|
}
|
|
11606
|
-
const MonthPicker = ({ label, showLabel =
|
|
11606
|
+
const MonthPicker = ({ label, showLabel = false, date, onChange, minDate = null, maxDate = null, truncateMonth = false }) => {
|
|
11607
11607
|
const triggerRef = (0, react.useRef)(null);
|
|
11608
11608
|
const [isPopoverOpen, setPopoverOpen] = (0, react.useState)(false);
|
|
11609
11609
|
const { value } = useSizeClass();
|
|
@@ -11766,7 +11766,6 @@ const BankTransactionsHeader = ({ shiftStickyHeader, asWidget, tableContentMode,
|
|
|
11766
11766
|
})]
|
|
11767
11767
|
}), withDatePicker && monthPickerDate && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MonthPicker, {
|
|
11768
11768
|
label: "Select a month",
|
|
11769
|
-
showLabel: false,
|
|
11770
11769
|
date: monthPickerDate,
|
|
11771
11770
|
onChange: setDateRange,
|
|
11772
11771
|
minDate: activationDate ? convertDateToZonedDateTime(activationDate) : null,
|
|
@@ -15932,6 +15931,65 @@ const BankTransactionRow = ({ index, dateFormat, bankTransaction, initialLoad, s
|
|
|
15932
15931
|
})
|
|
15933
15932
|
}) })] });
|
|
15934
15933
|
};
|
|
15934
|
+
var _excluded$42 = ["size"];
|
|
15935
|
+
var Inbox = (_ref) => {
|
|
15936
|
+
let { size = 18 } = _ref;
|
|
15937
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
|
|
15938
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15939
|
+
viewBox: "0 0 18 18",
|
|
15940
|
+
fill: "none"
|
|
15941
|
+
}, _objectWithoutProperties(_ref, _excluded$42)), {}, {
|
|
15942
|
+
width: size,
|
|
15943
|
+
height: size,
|
|
15944
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
15945
|
+
d: "M16.5 9H12L10.5 11.25H7.5L6 9H1.5",
|
|
15946
|
+
stroke: "currentColor",
|
|
15947
|
+
strokeLinecap: "round",
|
|
15948
|
+
strokeLinejoin: "round"
|
|
15949
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
15950
|
+
d: "M4.0875 3.8325L1.5 9V13.5C1.5 13.8978 1.65804 14.2794 1.93934 14.5607C2.22064 14.842 2.60218 15 3 15H15C15.3978 15 15.7794 14.842 16.0607 14.5607C16.342 14.2794 16.5 13.8978 16.5 13.5V9L13.9125 3.8325C13.7883 3.58259 13.5969 3.37228 13.3597 3.22521C13.1226 3.07814 12.8491 3.00015 12.57 3H5.43C5.15094 3.00015 4.87745 3.07814 4.64028 3.22521C4.40312 3.37228 4.21168 3.58259 4.0875 3.8325Z",
|
|
15951
|
+
stroke: "currentColor",
|
|
15952
|
+
strokeLinecap: "round",
|
|
15953
|
+
strokeLinejoin: "round"
|
|
15954
|
+
})]
|
|
15955
|
+
}));
|
|
15956
|
+
};
|
|
15957
|
+
var Inbox_default = Inbox;
|
|
15958
|
+
var DataStateContainer = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15959
|
+
className: "Layer__table-state-container",
|
|
15960
|
+
children
|
|
15961
|
+
});
|
|
15962
|
+
const BankTransactionsTableEmptyState = () => {
|
|
15963
|
+
const { display } = useBankTransactionsContext();
|
|
15964
|
+
const { filters } = useBankTransactionsFiltersContext();
|
|
15965
|
+
const isCategorizationMode = display !== DisplayState.categorized;
|
|
15966
|
+
if (Boolean(filters === null || filters === void 0 ? void 0 : filters.query)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
15967
|
+
status: DataStateStatus.info,
|
|
15968
|
+
title: "No transactions found",
|
|
15969
|
+
description: "Try adjusting your search filters",
|
|
15970
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchX, {}),
|
|
15971
|
+
spacing: true
|
|
15972
|
+
}) });
|
|
15973
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
15974
|
+
status: DataStateStatus.allDone,
|
|
15975
|
+
title: isCategorizationMode ? "You are up to date with transactions!" : "You have no categorized transactions",
|
|
15976
|
+
description: isCategorizationMode ? "All uncategorized transactions will be displayed here" : "All transactions will be displayed here once reviewed",
|
|
15977
|
+
icon: isCategorizationMode ? void 0 : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Inbox_default, {}),
|
|
15978
|
+
spacing: true
|
|
15979
|
+
}) });
|
|
15980
|
+
};
|
|
15981
|
+
function BankTransactionsListWithEmptyStates({ isEmpty, slots }) {
|
|
15982
|
+
const { isLoading, isError } = useBankTransactionsContext();
|
|
15983
|
+
if (isError) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
15984
|
+
status: DataStateStatus.failed,
|
|
15985
|
+
title: "Something went wrong",
|
|
15986
|
+
description: "We couldn’t load your transactions",
|
|
15987
|
+
spacing: true
|
|
15988
|
+
}) });
|
|
15989
|
+
if (isLoading && slots.Loader) return slots.Loader;
|
|
15990
|
+
if (!isLoading && isEmpty) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionsTableEmptyState, {});
|
|
15991
|
+
return slots.List;
|
|
15992
|
+
}
|
|
15935
15993
|
const SkeletonTableLoader = ({ rows, cols, height = 20, width = 100 }) => {
|
|
15936
15994
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", {
|
|
15937
15995
|
className: "Layer__skeleton-table-body__loader",
|
|
@@ -15968,11 +16026,12 @@ const BankTransactionsLoader = () => {
|
|
|
15968
16026
|
});
|
|
15969
16027
|
};
|
|
15970
16028
|
const BankTransactionsTable = ({ isLoading, bankTransactions, showDescriptions, showReceiptUploads, showTooltips, stringOverrides, isSyncing = false, page, lastPage }) => {
|
|
15971
|
-
var _ref, _stringOverrides$tran, _stringOverrides$tran2, _stringOverrides$tran3, _stringOverrides$tran4, _stringOverrides$tran5, _stringOverrides$tran6;
|
|
16029
|
+
var _bankTransactions$len, _ref, _stringOverrides$tran, _stringOverrides$tran2, _stringOverrides$tran3, _stringOverrides$tran4, _stringOverrides$tran5, _stringOverrides$tran6;
|
|
15972
16030
|
const isCategorizationEnabled = useBankTransactionsIsCategorizationEnabledContext();
|
|
15973
16031
|
const { mutate, display } = useBankTransactionsContext();
|
|
15974
16032
|
const { isAllSelected, isPartiallySelected, onHeaderCheckboxChange } = useBankTransactionsTableCheckboxState({ bankTransactions });
|
|
15975
16033
|
useUpsertBankTransactionsDefaultCategories(bankTransactions);
|
|
16034
|
+
const isEmpty = ((_bankTransactions$len = bankTransactions === null || bankTransactions === void 0 ? void 0 : bankTransactions.length) !== null && _bankTransactions$len !== void 0 ? _bankTransactions$len : 0) === 0;
|
|
15976
16035
|
const showReceiptColumn = (_ref = showReceiptUploads && (bankTransactions === null || bankTransactions === void 0 ? void 0 : bankTransactions.some((transaction) => {
|
|
15977
16036
|
var _transaction$document;
|
|
15978
16037
|
return ((_transaction$document = transaction.document_ids) === null || _transaction$document === void 0 ? void 0 : _transaction$document.length) > 0;
|
|
@@ -16022,23 +16081,30 @@ const BankTransactionsTable = ({ isLoading, bankTransactions, showDescriptions,
|
|
|
16022
16081
|
})
|
|
16023
16082
|
] }) }),
|
|
16024
16083
|
isLoading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionsLoader, {}),
|
|
16025
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tbody", { children: [
|
|
16026
|
-
|
|
16027
|
-
|
|
16028
|
-
|
|
16029
|
-
|
|
16030
|
-
|
|
16031
|
-
|
|
16032
|
-
|
|
16033
|
-
|
|
16034
|
-
|
|
16035
|
-
|
|
16036
|
-
|
|
16037
|
-
|
|
16038
|
-
|
|
16039
|
-
|
|
16040
|
-
|
|
16041
|
-
|
|
16084
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tbody", { children: [
|
|
16085
|
+
!isLoading && isEmpty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
16086
|
+
colSpan: isCategorizationEnabled ? 7 : 6,
|
|
16087
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionsTableEmptyState, {})
|
|
16088
|
+
}) }),
|
|
16089
|
+
!isLoading && (bankTransactions === null || bankTransactions === void 0 ? void 0 : bankTransactions.map((bankTransaction, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionRow, {
|
|
16090
|
+
index,
|
|
16091
|
+
dateFormat: "LLL d, yyyy",
|
|
16092
|
+
bankTransaction,
|
|
16093
|
+
showDescriptions,
|
|
16094
|
+
showReceiptUploads,
|
|
16095
|
+
showReceiptUploadColumn: showReceiptColumn,
|
|
16096
|
+
showTooltips,
|
|
16097
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.bankTransactionCTAs
|
|
16098
|
+
}, bankTransaction.id))),
|
|
16099
|
+
isSyncing && (lastPage || isEmpty && page === 1) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tr", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
|
|
16100
|
+
colSpan: 3,
|
|
16101
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncingComponent, {
|
|
16102
|
+
title: "Syncing historical account data",
|
|
16103
|
+
timeSync: 5,
|
|
16104
|
+
onRefresh
|
|
16105
|
+
})
|
|
16106
|
+
}) }) : null
|
|
16107
|
+
] })
|
|
16042
16108
|
]
|
|
16043
16109
|
});
|
|
16044
16110
|
};
|
|
@@ -16190,14 +16256,14 @@ function useArchiveCategorizationRule() {
|
|
|
16190
16256
|
return Reflect.get(target, prop);
|
|
16191
16257
|
} });
|
|
16192
16258
|
}
|
|
16193
|
-
var _excluded$
|
|
16259
|
+
var _excluded$41 = ["size"];
|
|
16194
16260
|
var BackArrow = (_ref) => {
|
|
16195
16261
|
let { size = 18 } = _ref;
|
|
16196
16262
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", _objectSpread2(_objectSpread2({
|
|
16197
16263
|
viewBox: "0 0 12 12",
|
|
16198
16264
|
fill: "none",
|
|
16199
16265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
16200
|
-
}, _objectWithoutProperties(_ref, _excluded$
|
|
16266
|
+
}, _objectWithoutProperties(_ref, _excluded$41)), {}, {
|
|
16201
16267
|
width: size,
|
|
16202
16268
|
height: size,
|
|
16203
16269
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
@@ -16209,14 +16275,14 @@ var BackArrow = (_ref) => {
|
|
|
16209
16275
|
}));
|
|
16210
16276
|
};
|
|
16211
16277
|
var BackArrow_default = BackArrow;
|
|
16212
|
-
var CLASS_NAME$
|
|
16278
|
+
var CLASS_NAME$4 = "Layer__UI__ResponsiveComponent";
|
|
16213
16279
|
const ResponsiveComponent = ({ slots, resolveVariant: resolveVariant$2, className }) => {
|
|
16214
16280
|
const [currentVariant, setCurrentVariant] = (0, react.useState)(null);
|
|
16215
16281
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
16216
16282
|
ref: useElementSize((0, react.useCallback)((size) => {
|
|
16217
16283
|
setCurrentVariant(resolveVariant$2({ width: size.width }));
|
|
16218
16284
|
}, [resolveVariant$2])),
|
|
16219
|
-
className: (0, classnames.default)(CLASS_NAME$
|
|
16285
|
+
className: (0, classnames.default)(CLASS_NAME$4, className),
|
|
16220
16286
|
children: currentVariant !== null && slots[currentVariant]
|
|
16221
16287
|
});
|
|
16222
16288
|
};
|
|
@@ -16274,7 +16340,7 @@ const MobileListItem = ({ item, onClickItem, children }) => {
|
|
|
16274
16340
|
}), children$1] }))
|
|
16275
16341
|
}, item.id);
|
|
16276
16342
|
};
|
|
16277
|
-
var _excluded$
|
|
16343
|
+
var _excluded$40 = [
|
|
16278
16344
|
"ariaLabel",
|
|
16279
16345
|
"data",
|
|
16280
16346
|
"slots",
|
|
@@ -16288,7 +16354,7 @@ var isSelectionEnabled = (props) => {
|
|
|
16288
16354
|
return props.selectionMode !== "none" && props.enableSelection;
|
|
16289
16355
|
};
|
|
16290
16356
|
const MobileList = (props) => {
|
|
16291
|
-
const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$
|
|
16357
|
+
const { ariaLabel, data, slots, renderItem, onClickItem, isLoading, isError, selectionMode = "none" } = props, restSelectionProps = _objectWithoutProperties(props, _excluded$40);
|
|
16292
16358
|
const { EmptyState: EmptyState$4, ErrorState: ErrorState$3 } = slots;
|
|
16293
16359
|
const resolvedSelectionMode = isSelectionEnabled(props) ? selectionMode : "none";
|
|
16294
16360
|
const resolvedSelectionBehavior = resolvedSelectionMode === "none" ? "toggle" : void 0;
|
|
@@ -16336,9 +16402,9 @@ const usePaginationRange = ({ totalCount, pageSize, siblingCount = 1, currentPag
|
|
|
16336
16402
|
currentPage
|
|
16337
16403
|
]);
|
|
16338
16404
|
};
|
|
16339
|
-
var _excluded$
|
|
16405
|
+
var _excluded$39 = ["children", "isSelected"];
|
|
16340
16406
|
var PaginationButton = (_ref) => {
|
|
16341
|
-
let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$
|
|
16407
|
+
let { children, isSelected } = _ref, buttonProps = _objectWithoutProperties(_ref, _excluded$39);
|
|
16342
16408
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, _objectSpread2(_objectSpread2({
|
|
16343
16409
|
inset: true,
|
|
16344
16410
|
icon: true,
|
|
@@ -16399,11 +16465,11 @@ const Pagination = ({ onPageChange, totalCount, siblingCount = 1, currentPage, p
|
|
|
16399
16465
|
})
|
|
16400
16466
|
});
|
|
16401
16467
|
};
|
|
16402
|
-
var _excluded$
|
|
16468
|
+
var _excluded$38 = ["data", "paginationProps"];
|
|
16403
16469
|
var EMPTY_ARRAY$4 = [];
|
|
16404
16470
|
const PaginatedMobileList = (props) => {
|
|
16405
16471
|
var _data$length;
|
|
16406
|
-
const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$
|
|
16472
|
+
const { data, paginationProps } = props, listProps = _objectWithoutProperties(props, _excluded$38);
|
|
16407
16473
|
const { initialPage = 0, onSetPage, pageSize = 20, hasMore, fetchMore, autoResetPageIndexRef } = paginationProps;
|
|
16408
16474
|
const { pageItems, pageIndex, setPage } = usePaginatedList({
|
|
16409
16475
|
data: data !== null && data !== void 0 ? data : EMPTY_ARRAY$4,
|
|
@@ -16539,7 +16605,7 @@ const getColumnDefs = (columnConfig$1) => {
|
|
|
16539
16605
|
});
|
|
16540
16606
|
});
|
|
16541
16607
|
};
|
|
16542
|
-
var _excluded$
|
|
16608
|
+
var _excluded$37 = [
|
|
16543
16609
|
"children",
|
|
16544
16610
|
"className",
|
|
16545
16611
|
"nonAria",
|
|
@@ -16584,7 +16650,7 @@ var TableSubComponent = /* @__PURE__ */ function(TableSubComponent$1) {
|
|
|
16584
16650
|
var CSS_PREFIX$1 = "Layer__UI__Table";
|
|
16585
16651
|
var getClassName = (component, additionalClassNames, withHidden) => (0, classnames.default)(`${CSS_PREFIX$1}-${component}`, withHidden && `${CSS_PREFIX$1}-${component}--hidden`, additionalClassNames);
|
|
16586
16652
|
var Table = (0, react.forwardRef)((_ref, ref) => {
|
|
16587
|
-
let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$
|
|
16653
|
+
let { children, className, nonAria, slot } = _ref, restProps = _objectWithoutProperties(_ref, _excluded$37);
|
|
16588
16654
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(nonAria ? "table" : react_aria_components.Table, _objectSpread2(_objectSpread2({
|
|
16589
16655
|
className: getClassName(TableSubComponent.Table, className),
|
|
16590
16656
|
slot: slot !== null && slot !== void 0 ? slot : void 0
|
|
@@ -17392,7 +17458,7 @@ function RuleUpdatesReviewStep({ ruleSuggestion, isDrawer }) {
|
|
|
17392
17458
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ActionButtonsStack, {
|
|
17393
17459
|
gap: "xs",
|
|
17394
17460
|
justify: "end",
|
|
17395
|
-
|
|
17461
|
+
pbs: "md",
|
|
17396
17462
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Button, {
|
|
17397
17463
|
onClick: previous,
|
|
17398
17464
|
variant: "outlined",
|
|
@@ -17536,59 +17602,6 @@ function useTagDimensions({ isEnabled = true } = {}) {
|
|
|
17536
17602
|
function usePreloadTagDimensions(parameters) {
|
|
17537
17603
|
useTagDimensions(parameters);
|
|
17538
17604
|
}
|
|
17539
|
-
var _excluded$37 = ["size"];
|
|
17540
|
-
var Inbox = (_ref) => {
|
|
17541
|
-
let { size = 18 } = _ref;
|
|
17542
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", _objectSpread2(_objectSpread2({
|
|
17543
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
17544
|
-
viewBox: "0 0 18 18",
|
|
17545
|
-
fill: "none"
|
|
17546
|
-
}, _objectWithoutProperties(_ref, _excluded$37)), {}, {
|
|
17547
|
-
width: size,
|
|
17548
|
-
height: size,
|
|
17549
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
17550
|
-
d: "M16.5 9H12L10.5 11.25H7.5L6 9H1.5",
|
|
17551
|
-
stroke: "currentColor",
|
|
17552
|
-
strokeLinecap: "round",
|
|
17553
|
-
strokeLinejoin: "round"
|
|
17554
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
17555
|
-
d: "M4.0875 3.8325L1.5 9V13.5C1.5 13.8978 1.65804 14.2794 1.93934 14.5607C2.22064 14.842 2.60218 15 3 15H15C15.3978 15 15.7794 14.842 16.0607 14.5607C16.342 14.2794 16.5 13.8978 16.5 13.5V9L13.9125 3.8325C13.7883 3.58259 13.5969 3.37228 13.3597 3.22521C13.1226 3.07814 12.8491 3.00015 12.57 3H5.43C5.15094 3.00015 4.87745 3.07814 4.64028 3.22521C4.40312 3.37228 4.21168 3.58259 4.0875 3.8325Z",
|
|
17556
|
-
stroke: "currentColor",
|
|
17557
|
-
strokeLinecap: "round",
|
|
17558
|
-
strokeLinejoin: "round"
|
|
17559
|
-
})]
|
|
17560
|
-
}));
|
|
17561
|
-
};
|
|
17562
|
-
var Inbox_default = Inbox;
|
|
17563
|
-
var DataStateContainer = ({ children }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
17564
|
-
className: "Layer__table-state-container",
|
|
17565
|
-
children
|
|
17566
|
-
});
|
|
17567
|
-
function BankTransactionsListWithEmptyStates({ isEmpty, slots }) {
|
|
17568
|
-
const { isLoading, isError, display } = useBankTransactionsContext();
|
|
17569
|
-
const { filters } = useBankTransactionsFiltersContext();
|
|
17570
|
-
const isCategorizationMode = display !== DisplayState.categorized;
|
|
17571
|
-
const isFiltered = Boolean(filters === null || filters === void 0 ? void 0 : filters.query);
|
|
17572
|
-
if (isError) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
17573
|
-
status: DataStateStatus.failed,
|
|
17574
|
-
title: "Something went wrong",
|
|
17575
|
-
description: "We couldn’t load your transactions"
|
|
17576
|
-
}) });
|
|
17577
|
-
if (isLoading && slots.Loader) return slots.Loader;
|
|
17578
|
-
if (isEmpty && !isFiltered) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
17579
|
-
status: DataStateStatus.allDone,
|
|
17580
|
-
title: isCategorizationMode ? "You are up to date with transactions!" : "You have no categorized transactions",
|
|
17581
|
-
description: isCategorizationMode ? "All uncategorized transactions will be displayed here" : "All transactions will be displayed here once reviewed",
|
|
17582
|
-
icon: isCategorizationMode ? void 0 : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Inbox_default, {})
|
|
17583
|
-
}) });
|
|
17584
|
-
if (isEmpty && isFiltered) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataStateContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DataState, {
|
|
17585
|
-
status: DataStateStatus.info,
|
|
17586
|
-
title: "No transactions found",
|
|
17587
|
-
description: "Try adjusting your search filters",
|
|
17588
|
-
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.SearchX, {})
|
|
17589
|
-
}) });
|
|
17590
|
-
return slots.List;
|
|
17591
|
-
}
|
|
17592
17605
|
var _excluded$36 = [
|
|
17593
17606
|
"onError",
|
|
17594
17607
|
"showTags",
|
|
@@ -17772,6 +17785,7 @@ var BankTransactionsTableView = ({ asWidget = false, pageSize = 20, showDescript
|
|
|
17772
17785
|
BankTransactionsListLoader,
|
|
17773
17786
|
BankTransactionsMobileListView
|
|
17774
17787
|
]);
|
|
17788
|
+
const isEmpty = tableContentMode === BankTransactionsTableContent.Table ? false : ((_bankTransactions$len = bankTransactions === null || bankTransactions === void 0 ? void 0 : bankTransactions.length) !== null && _bankTransactions$len !== void 0 ? _bankTransactions$len : 0) === 0;
|
|
17775
17789
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Container, {
|
|
17776
17790
|
className: (0, classnames.default)("Layer__Public", display === DisplayState.review ? "Layer__bank-transactions--to-review" : "Layer__bank-transactions--categorized"),
|
|
17777
17791
|
transparentBg: listView && mobileComponent === "mobileList",
|
|
@@ -17791,7 +17805,7 @@ var BankTransactionsTableView = ({ asWidget = false, pageSize = 20, showDescript
|
|
|
17791
17805
|
showCategorizationRules
|
|
17792
17806
|
}),
|
|
17793
17807
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BankTransactionsListWithEmptyStates, {
|
|
17794
|
-
isEmpty
|
|
17808
|
+
isEmpty,
|
|
17795
17809
|
slots
|
|
17796
17810
|
}),
|
|
17797
17811
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SuggestedCategorizationRuleUpdatesDialog, {
|
|
@@ -18626,10 +18640,10 @@ var InstitutionIcon = (_ref) => {
|
|
|
18626
18640
|
}));
|
|
18627
18641
|
};
|
|
18628
18642
|
var InstitutionIcon_default = InstitutionIcon;
|
|
18629
|
-
var CLASS_NAME$
|
|
18643
|
+
var CLASS_NAME$3 = "Layer__BasicLinkedAccountContainer";
|
|
18630
18644
|
function BasicLinkedAccountContainer({ children, isSelected }) {
|
|
18631
18645
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", _objectSpread2(_objectSpread2({}, toDataProperties({ selected: isSelected })), {}, {
|
|
18632
|
-
className: CLASS_NAME$
|
|
18646
|
+
className: CLASS_NAME$3,
|
|
18633
18647
|
children
|
|
18634
18648
|
}));
|
|
18635
18649
|
}
|
|
@@ -19259,7 +19273,7 @@ const useDatePickerState = ({ date, setDate, minDate = null, maxDate = null }) =
|
|
|
19259
19273
|
minDateZdt
|
|
19260
19274
|
]);
|
|
19261
19275
|
};
|
|
19262
|
-
var CLASS_NAME$
|
|
19276
|
+
var CLASS_NAME$2 = "Layer__caobfb";
|
|
19263
19277
|
const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude = false, onChange, errors = [] }) => {
|
|
19264
19278
|
var _account$institution, _account$institution2, _account$institution3, _account$institution4;
|
|
19265
19279
|
const dataProps = (0, react.useMemo)(() => toDataProperties({
|
|
@@ -19283,10 +19297,10 @@ const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude
|
|
|
19283
19297
|
value
|
|
19284
19298
|
]);
|
|
19285
19299
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", _objectSpread2(_objectSpread2({}, dataProps), {}, {
|
|
19286
|
-
className: CLASS_NAME$
|
|
19300
|
+
className: CLASS_NAME$2,
|
|
19287
19301
|
children: [
|
|
19288
19302
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
19289
|
-
className: `${CLASS_NAME$
|
|
19303
|
+
className: `${CLASS_NAME$2}__icon-col`,
|
|
19290
19304
|
children: ((_account$institution = account.institution) === null || _account$institution === void 0 ? void 0 : _account$institution.logo) != void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", {
|
|
19291
19305
|
width: 32,
|
|
19292
19306
|
height: 32,
|
|
@@ -19295,18 +19309,18 @@ const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude
|
|
|
19295
19309
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InstitutionIcon_default, {})
|
|
19296
19310
|
}),
|
|
19297
19311
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19298
|
-
className: `${CLASS_NAME$
|
|
19312
|
+
className: `${CLASS_NAME$2}__details-col`,
|
|
19299
19313
|
children: [
|
|
19300
19314
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19301
|
-
className: `${CLASS_NAME$
|
|
19315
|
+
className: `${CLASS_NAME$2}__details-col__details`,
|
|
19302
19316
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19303
|
-
className: `${CLASS_NAME$
|
|
19317
|
+
className: `${CLASS_NAME$2}__details-col__name`,
|
|
19304
19318
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
|
|
19305
|
-
className: `${CLASS_NAME$
|
|
19319
|
+
className: `${CLASS_NAME$2}__details-col__name__institution-name`,
|
|
19306
19320
|
size: TextSize.sm,
|
|
19307
19321
|
children: (_account$institution4 = account.institution) === null || _account$institution4 === void 0 ? void 0 : _account$institution4.name
|
|
19308
19322
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Text, {
|
|
19309
|
-
className: `${CLASS_NAME$
|
|
19323
|
+
className: `${CLASS_NAME$2}__details-col__name__account-name`,
|
|
19310
19324
|
size: TextSize.sm,
|
|
19311
19325
|
children: account.external_account_name
|
|
19312
19326
|
})]
|
|
@@ -19316,12 +19330,11 @@ const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude
|
|
|
19316
19330
|
})]
|
|
19317
19331
|
}),
|
|
19318
19332
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
19319
|
-
className: `${CLASS_NAME$
|
|
19333
|
+
className: `${CLASS_NAME$2}__details-col__inputs`,
|
|
19320
19334
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(InputGroup, {
|
|
19321
19335
|
label: "Opening date",
|
|
19322
19336
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DatePicker, {
|
|
19323
19337
|
label: "Opening date",
|
|
19324
|
-
showLabel: false,
|
|
19325
19338
|
date,
|
|
19326
19339
|
onChange: onChangeDate,
|
|
19327
19340
|
onBlur: onBlurDate,
|
|
@@ -19346,7 +19359,7 @@ const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude
|
|
|
19346
19359
|
]
|
|
19347
19360
|
}),
|
|
19348
19361
|
!disableConfirmExclude && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
19349
|
-
className: `${CLASS_NAME$
|
|
19362
|
+
className: `${CLASS_NAME$2}__confirm-col`,
|
|
19350
19363
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Checkbox, {
|
|
19351
19364
|
size: "lg",
|
|
19352
19365
|
isSelected: value.isConfirmed,
|
|
@@ -19355,7 +19368,7 @@ const AccountFormBox = ({ account, value, isSaved = false, disableConfirmExclude
|
|
|
19355
19368
|
})
|
|
19356
19369
|
}),
|
|
19357
19370
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
19358
|
-
className: `${CLASS_NAME$
|
|
19371
|
+
className: `${CLASS_NAME$2}__success-banner`,
|
|
19359
19372
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckCircle_default, { size: 36 })
|
|
19360
19373
|
})
|
|
19361
19374
|
]
|
|
@@ -22145,7 +22158,7 @@ var dateSelectionOptionConfig = {
|
|
|
22145
22158
|
}
|
|
22146
22159
|
};
|
|
22147
22160
|
var options$4 = Object.values(dateSelectionOptionConfig).filter((opt) => opt.value !== DatePreset.Custom);
|
|
22148
|
-
const DateSelectionComboBox = () => {
|
|
22161
|
+
const DateSelectionComboBox = ({ showLabel = false }) => {
|
|
22149
22162
|
const [lastPreset, setLastPreset] = (0, react.useState)(null);
|
|
22150
22163
|
const { business } = useLayerContext();
|
|
22151
22164
|
const dateRange = useGlobalDateRange({ dateSelectionMode: "full" });
|
|
@@ -22160,21 +22173,22 @@ const DateSelectionComboBox = () => {
|
|
|
22160
22173
|
setDateRange(rangeForPreset(nextPreset));
|
|
22161
22174
|
}, [setDateRange]);
|
|
22162
22175
|
const inputId = (0, react.useId)();
|
|
22163
|
-
|
|
22176
|
+
const label = "Report period";
|
|
22177
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, { children: [showLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Label, {
|
|
22164
22178
|
pbe: "3xs",
|
|
22165
22179
|
size: "sm",
|
|
22166
22180
|
htmlFor: inputId,
|
|
22167
|
-
children:
|
|
22168
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComboBox, {
|
|
22181
|
+
children: label
|
|
22182
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComboBox, _objectSpread2({
|
|
22169
22183
|
options: options$4,
|
|
22170
22184
|
onSelectedValueChange,
|
|
22171
22185
|
selectedValue: selectedOption,
|
|
22172
22186
|
isSearchable: false,
|
|
22173
22187
|
isClearable: false,
|
|
22174
22188
|
inputId
|
|
22175
|
-
})] });
|
|
22189
|
+
}, !showLabel && { "aria-label": label }))] });
|
|
22176
22190
|
};
|
|
22177
|
-
const GlobalDateRangePicker = () => {
|
|
22191
|
+
const GlobalDateRangePicker = ({ showLabels = false }) => {
|
|
22178
22192
|
const { startDate: globalStartDate, endDate: globalEndDate } = useGlobalDateRange({ dateSelectionMode: "full" });
|
|
22179
22193
|
const { setDateRange: setGlobalDateRange } = useGlobalDateRangeActions();
|
|
22180
22194
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
@@ -22213,7 +22227,8 @@ const GlobalDateRangePicker = () => {
|
|
|
22213
22227
|
slotProps: { Label: {
|
|
22214
22228
|
size: "sm",
|
|
22215
22229
|
pbe: "3xs"
|
|
22216
|
-
} }
|
|
22230
|
+
} },
|
|
22231
|
+
showLabel: showLabels
|
|
22217
22232
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DatePicker, {
|
|
22218
22233
|
label: "End date",
|
|
22219
22234
|
date: localEndDate,
|
|
@@ -22226,19 +22241,20 @@ const GlobalDateRangePicker = () => {
|
|
|
22226
22241
|
slotProps: { Label: {
|
|
22227
22242
|
size: "sm",
|
|
22228
22243
|
pbe: "3xs"
|
|
22229
|
-
} }
|
|
22244
|
+
} },
|
|
22245
|
+
showLabel: showLabels
|
|
22230
22246
|
})] });
|
|
22231
22247
|
};
|
|
22232
|
-
const DateRangeSelection = () => {
|
|
22248
|
+
const DateRangeSelection = ({ showLabels = false }) => {
|
|
22233
22249
|
const { value } = useSizeClass();
|
|
22234
22250
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
22235
22251
|
className: (0, classnames.default)("Layer__DateRangeSelection", { "Layer__DateRangeSelection--mobile": value === "mobile" }),
|
|
22236
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelectionComboBox, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalDateRangePicker, {})]
|
|
22252
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelectionComboBox, { showLabel: showLabels }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalDateRangePicker, { showLabels })]
|
|
22237
22253
|
});
|
|
22238
22254
|
};
|
|
22239
|
-
const CombinedDateRangeSelection = ({ mode }) => {
|
|
22240
|
-
if (mode === "month") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { showLabel:
|
|
22241
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateRangeSelection, {});
|
|
22255
|
+
const CombinedDateRangeSelection = ({ mode, showLabels = true }) => {
|
|
22256
|
+
if (mode === "month") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { showLabel: showLabels });
|
|
22257
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateRangeSelection, { showLabels });
|
|
22242
22258
|
};
|
|
22243
22259
|
var getProfitAndLossDetailLinesExcel = (apiUrl, accessToken, params) => {
|
|
22244
22260
|
const { businessId, startDate, endDate, pnlStructureLineItemName, tagKey, tagValues, reportingBasis, pnlStructure } = params;
|
|
@@ -22427,7 +22443,10 @@ const ProfitAndLossHeader = ({ text, className, headingClassName, withDatePicker
|
|
|
22427
22443
|
]
|
|
22428
22444
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
22429
22445
|
gap: "xs",
|
|
22430
|
-
children: [withDatePicker && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateRangeSelection, {
|
|
22446
|
+
children: [withDatePicker && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CombinedDateRangeSelection, {
|
|
22447
|
+
mode: dateSelectionMode,
|
|
22448
|
+
showLabels: false
|
|
22449
|
+
}), withDownloadButton && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLossDownloadButton, { stringOverrides: stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.downloadButton })]
|
|
22431
22450
|
})]
|
|
22432
22451
|
});
|
|
22433
22452
|
};
|
|
@@ -23273,7 +23292,7 @@ function ProfitAndLossSummariesSummary({ label, amount, isLoading, percentChange
|
|
|
23273
23292
|
})]
|
|
23274
23293
|
});
|
|
23275
23294
|
}
|
|
23276
|
-
var CLASS_NAME$
|
|
23295
|
+
var CLASS_NAME$1 = "Layer__TransactionsToReview";
|
|
23277
23296
|
function TransactionsToReview({ onClick, tagFilter = void 0, variants: variants$1 }) {
|
|
23278
23297
|
var _tagFilter$values, _activeMonth$uncatego;
|
|
23279
23298
|
const { size = "sm" } = variants$1 !== null && variants$1 !== void 0 ? variants$1 : {};
|
|
@@ -23335,7 +23354,7 @@ function TransactionsToReview({ onClick, tagFilter = void 0, variants: variants$
|
|
|
23335
23354
|
}
|
|
23336
23355
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
23337
23356
|
onClick,
|
|
23338
|
-
className: CLASS_NAME$
|
|
23357
|
+
className: CLASS_NAME$1,
|
|
23339
23358
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
23340
23359
|
gap: verticalGap,
|
|
23341
23360
|
align: "start",
|
|
@@ -23713,7 +23732,7 @@ const BalanceSheetTable = ({ data, config, stringOverrides }) => {
|
|
|
23713
23732
|
}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBody$1, { children: config.map((row, idx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react.Fragment, { children: data[row.lineItem] && renderLineItem(data[row.lineItem], 0, row.lineItem, idx) }, row.lineItem)) })]
|
|
23714
23733
|
});
|
|
23715
23734
|
};
|
|
23716
|
-
const GlobalDatePicker = () => {
|
|
23735
|
+
const GlobalDatePicker = ({ showLabel = false }) => {
|
|
23717
23736
|
const { date } = useGlobalDate({ dateSelectionMode: "full" });
|
|
23718
23737
|
const { setDate: setGlobalDate } = useGlobalDateActions();
|
|
23719
23738
|
const { minDate, maxDate } = useGlobalDatePickerBounds();
|
|
@@ -23737,19 +23756,20 @@ const GlobalDatePicker = () => {
|
|
|
23737
23756
|
slotProps: { Label: {
|
|
23738
23757
|
size: "sm",
|
|
23739
23758
|
pbe: "3xs"
|
|
23740
|
-
} }
|
|
23759
|
+
} },
|
|
23760
|
+
showLabel
|
|
23741
23761
|
});
|
|
23742
23762
|
};
|
|
23743
|
-
const DateSelection = () => {
|
|
23763
|
+
const DateSelection = ({ showLabels = false }) => {
|
|
23744
23764
|
const { value } = useSizeClass();
|
|
23745
23765
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(HStack, {
|
|
23746
23766
|
className: (0, classnames.default)("Layer__DateSelection", { "Layer__DateSelection--mobile": value === "mobile" }),
|
|
23747
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelectionComboBox, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalDatePicker, {})]
|
|
23767
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelectionComboBox, { showLabel: showLabels }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalDatePicker, { showLabel: showLabels })]
|
|
23748
23768
|
});
|
|
23749
23769
|
};
|
|
23750
|
-
const CombinedDateSelection = ({ mode }) => {
|
|
23751
|
-
if (mode === "month") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { showLabel:
|
|
23752
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelection, {});
|
|
23770
|
+
const CombinedDateSelection = ({ mode, showLabels = true }) => {
|
|
23771
|
+
if (mode === "month") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { showLabel: showLabels });
|
|
23772
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DateSelection, { showLabels });
|
|
23753
23773
|
};
|
|
23754
23774
|
var COMPONENT_NAME$9 = "balance-sheet";
|
|
23755
23775
|
const BalanceSheet = (props) => {
|
|
@@ -27629,10 +27649,10 @@ var JournalTableView = ({ asWidget, stringOverrides }) => {
|
|
|
27629
27649
|
})
|
|
27630
27650
|
});
|
|
27631
27651
|
};
|
|
27632
|
-
var CLASS_NAME
|
|
27652
|
+
var CLASS_NAME = "Layer__TasksEmptyContainer";
|
|
27633
27653
|
function TasksEmptyContainer({ children }) {
|
|
27634
27654
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27635
|
-
className: CLASS_NAME
|
|
27655
|
+
className: CLASS_NAME,
|
|
27636
27656
|
children
|
|
27637
27657
|
});
|
|
27638
27658
|
}
|
|
@@ -37904,13 +37924,6 @@ const CallBooking = ({ callBooking, onBookCall }) => {
|
|
|
37904
37924
|
children: callBooking ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ScheduledCallState, { callBooking }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState$1, { onBookCall })
|
|
37905
37925
|
});
|
|
37906
37926
|
};
|
|
37907
|
-
var CLASS_NAME = "Layer__BookkeepingProfitAndLossSummariesContainer";
|
|
37908
|
-
function BookkeepingProfitAndLossSummariesContainer({ children }) {
|
|
37909
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
37910
|
-
className: CLASS_NAME,
|
|
37911
|
-
children
|
|
37912
|
-
});
|
|
37913
|
-
}
|
|
37914
37927
|
var TASKS_MOBILE_VIEWPORT_WIDTH = 1100;
|
|
37915
37928
|
const useKeepInMobileViewport = () => {
|
|
37916
37929
|
const upperContentRef = (0, react.useRef)(null);
|
|
@@ -37958,6 +37971,7 @@ const BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts
|
|
|
37958
37971
|
var _slotProps$profitAndL, _callBookings$0$data$, _callBookings$, _stringOverrides$prof, _stringOverrides$prof2, _stringOverrides$prof3, _stringOverrides$prof4, _stringOverrides$prof5, _stringOverrides$prof6;
|
|
37959
37972
|
const [pnlToggle, setPnlToggle] = (0, react.useState)("expenses");
|
|
37960
37973
|
const [width] = useWindowSize();
|
|
37974
|
+
const { value: sizeClass } = useSizeClass();
|
|
37961
37975
|
const { isCalendlyVisible, calendlyLink, calendlyRef, closeCalendly } = useCalendly();
|
|
37962
37976
|
const profitAndLossSummariesVariants = slotProps === null || slotProps === void 0 || (_slotProps$profitAndL = slotProps.profitAndLoss) === null || _slotProps$profitAndL === void 0 || (_slotProps$profitAndL = _slotProps$profitAndL.summaries) === null || _slotProps$profitAndL === void 0 ? void 0 : _slotProps$profitAndL.variants;
|
|
37963
37977
|
const { upperContentRef, targetElementRef, upperElementInFocus } = useKeepInMobileViewport();
|
|
@@ -37970,6 +37984,7 @@ const BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts
|
|
|
37970
37984
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(View, {
|
|
37971
37985
|
viewClassName: "Layer__bookkeeping-overview--view",
|
|
37972
37986
|
title: (stringOverrides === null || stringOverrides === void 0 ? void 0 : stringOverrides.title) || title || "Bookkeeping overview",
|
|
37987
|
+
header: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Header, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderRow, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(HeaderCol, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalMonthPicker, { truncateMonth: sizeClass === "mobile" }) }) }) }),
|
|
37973
37988
|
withSidebar: width > 1100,
|
|
37974
37989
|
sidebar: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(VStack, {
|
|
37975
37990
|
gap: "lg",
|
|
@@ -38011,14 +38026,17 @@ const BookkeepingOverview = ({ title, showTitle = true, onClickReconnectAccounts
|
|
|
38011
38026
|
children: [
|
|
38012
38027
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Header, {
|
|
38013
38028
|
text: (stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof = stringOverrides.profitAndLoss) === null || _stringOverrides$prof === void 0 ? void 0 : _stringOverrides$prof.header) || "Profit & Loss",
|
|
38014
|
-
|
|
38015
|
-
|
|
38016
|
-
|
|
38029
|
+
withStatus: true
|
|
38030
|
+
}),
|
|
38031
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(VStack, {
|
|
38032
|
+
pb: "md",
|
|
38033
|
+
pi: "md",
|
|
38034
|
+
fluid: true,
|
|
38035
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Summaries, {
|
|
38036
|
+
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof2 = stringOverrides.profitAndLoss) === null || _stringOverrides$prof2 === void 0 ? void 0 : _stringOverrides$prof2.summaries,
|
|
38037
|
+
variants: profitAndLossSummariesVariants
|
|
38038
|
+
})
|
|
38017
38039
|
}),
|
|
38018
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BookkeepingProfitAndLossSummariesContainer, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Summaries, {
|
|
38019
|
-
stringOverrides: stringOverrides === null || stringOverrides === void 0 || (_stringOverrides$prof2 = stringOverrides.profitAndLoss) === null || _stringOverrides$prof2 === void 0 ? void 0 : _stringOverrides$prof2.summaries,
|
|
38020
|
-
variants: profitAndLossSummariesVariants
|
|
38021
|
-
}) }),
|
|
38022
38040
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProfitAndLoss.Chart, {})
|
|
38023
38041
|
]
|
|
38024
38042
|
})
|