@layerfi/components 0.1.108-alpha.1 → 0.1.108
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 +243 -242
- package/dist/esm/index.mjs +506 -505
- package/dist/index.css +40 -29
- package/dist/index.d.ts +14 -5
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -5603,7 +5603,7 @@ var import_react12 = require("react");
|
|
|
5603
5603
|
var import_react10 = require("react");
|
|
5604
5604
|
|
|
5605
5605
|
// package.json
|
|
5606
|
-
var version = "0.1.108
|
|
5606
|
+
var version = "0.1.108";
|
|
5607
5607
|
|
|
5608
5608
|
// src/models/APIError.ts
|
|
5609
5609
|
var APIError = class _APIError extends Error {
|
|
@@ -8895,13 +8895,9 @@ var getEffectiveDateRangeForMode = (mode, { start, end }) => {
|
|
|
8895
8895
|
};
|
|
8896
8896
|
function useGlobalDateRange({ displayMode = "monthPicker" }) {
|
|
8897
8897
|
const store = (0, import_react11.useContext)(GlobalDateStoreContext);
|
|
8898
|
-
const rawStart = useStoreWithDateSelected(store, ({ start
|
|
8899
|
-
const rawEnd = useStoreWithDateSelected(store, ({ end
|
|
8900
|
-
|
|
8901
|
-
return {
|
|
8902
|
-
start,
|
|
8903
|
-
end
|
|
8904
|
-
};
|
|
8898
|
+
const rawStart = useStoreWithDateSelected(store, ({ start }) => start);
|
|
8899
|
+
const rawEnd = useStoreWithDateSelected(store, ({ end }) => end);
|
|
8900
|
+
return (0, import_react11.useMemo)(() => getEffectiveDateRangeForMode(displayMode, { start: rawStart, end: rawEnd }), [displayMode, rawEnd, rawStart]);
|
|
8905
8901
|
}
|
|
8906
8902
|
function useGlobalDateRangeActions() {
|
|
8907
8903
|
const store = (0, import_react11.useContext)(GlobalDateStoreContext);
|
|
@@ -13229,15 +13225,16 @@ Button2.displayName = "Button";
|
|
|
13229
13225
|
// src/components/ui/Typography/Heading.tsx
|
|
13230
13226
|
var import_react40 = require("react");
|
|
13231
13227
|
var import_react_aria_components7 = require("react-aria-components");
|
|
13228
|
+
var import_classnames22 = __toESM(require("classnames"));
|
|
13232
13229
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
13233
13230
|
var HEADING_CLASS_NAME = "Layer__UI__Heading";
|
|
13234
13231
|
var Heading2 = (0, import_react40.forwardRef)((_a, ref) => {
|
|
13235
|
-
var _b = _a, { align, pie, pbe, size, variant, weight } = _b, restProps = __objRest(_b, ["align", "pie", "pbe", "size", "variant", "weight"]);
|
|
13236
|
-
const dataProperties = toDataProperties({ pbe, pie, size, align, variant, weight });
|
|
13232
|
+
var _b = _a, { align, pie, pbe, size, variant, weight, ellipsis, className } = _b, restProps = __objRest(_b, ["align", "pie", "pbe", "size", "variant", "weight", "ellipsis", "className"]);
|
|
13233
|
+
const dataProperties = toDataProperties({ pbe, pie, size, align, variant, weight, ellipsis });
|
|
13237
13234
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
13238
13235
|
import_react_aria_components7.Heading,
|
|
13239
13236
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
13240
|
-
className: HEADING_CLASS_NAME,
|
|
13237
|
+
className: (0, import_classnames22.default)(HEADING_CLASS_NAME, className),
|
|
13241
13238
|
ref
|
|
13242
13239
|
})
|
|
13243
13240
|
);
|
|
@@ -13245,13 +13242,13 @@ var Heading2 = (0, import_react40.forwardRef)((_a, ref) => {
|
|
|
13245
13242
|
Heading2.displayName = "Heading";
|
|
13246
13243
|
|
|
13247
13244
|
// src/components/ui/Modal/ModalSlots.tsx
|
|
13248
|
-
var
|
|
13245
|
+
var import_classnames23 = __toESM(require("classnames"));
|
|
13249
13246
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
13250
13247
|
var MODAL_CLOSE_BUTTON_CLASS_NAME = "Layer__ModalCloseButton";
|
|
13251
13248
|
var ModalCloseButton = ({ onClose, positionAbsolute = false }) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
13252
13249
|
"div",
|
|
13253
13250
|
{
|
|
13254
|
-
className: (0,
|
|
13251
|
+
className: (0, import_classnames23.default)(
|
|
13255
13252
|
MODAL_CLOSE_BUTTON_CLASS_NAME,
|
|
13256
13253
|
positionAbsolute && `${MODAL_CLOSE_BUTTON_CLASS_NAME}--position-absolute`
|
|
13257
13254
|
),
|
|
@@ -13323,7 +13320,7 @@ function ModalActions({ children }) {
|
|
|
13323
13320
|
|
|
13324
13321
|
// src/components/ui/Stack/Stack.tsx
|
|
13325
13322
|
var import_react42 = require("react");
|
|
13326
|
-
var
|
|
13323
|
+
var import_classnames24 = __toESM(require("classnames"));
|
|
13327
13324
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
13328
13325
|
var CLASS_NAME2 = "Layer__Stack";
|
|
13329
13326
|
var Stack = (0, import_react42.forwardRef)(
|
|
@@ -13378,7 +13375,7 @@ var Stack = (0, import_react42.forwardRef)(
|
|
|
13378
13375
|
__spreadProps(__spreadValues(__spreadValues({
|
|
13379
13376
|
ref
|
|
13380
13377
|
}, restProps), dataProperties), {
|
|
13381
|
-
className: (0,
|
|
13378
|
+
className: (0, import_classnames24.default)(CLASS_NAME2, className),
|
|
13382
13379
|
children
|
|
13383
13380
|
})
|
|
13384
13381
|
);
|
|
@@ -13652,7 +13649,7 @@ var LinkedAccountItemThumb = ({
|
|
|
13652
13649
|
};
|
|
13653
13650
|
|
|
13654
13651
|
// src/components/LinkedAccounts/LinkedAccountsContent.tsx
|
|
13655
|
-
var
|
|
13652
|
+
var import_classnames26 = __toESM(require("classnames"));
|
|
13656
13653
|
|
|
13657
13654
|
// src/components/LinkedAccounts/ConfirmationModal/LinkedAccountsConfirmationModal.tsx
|
|
13658
13655
|
var import_react47 = require("react");
|
|
@@ -13686,7 +13683,7 @@ function ConditionalList({
|
|
|
13686
13683
|
var import_lucide_react4 = require("lucide-react");
|
|
13687
13684
|
var import_react46 = require("react");
|
|
13688
13685
|
var import_react_aria_components8 = require("react-aria-components");
|
|
13689
|
-
var
|
|
13686
|
+
var import_classnames25 = __toESM(require("classnames"));
|
|
13690
13687
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
13691
13688
|
var CLASS_NAME3 = "Layer__Checkbox";
|
|
13692
13689
|
function Checkbox(_a) {
|
|
@@ -13699,7 +13696,7 @@ function Checkbox(_a) {
|
|
|
13699
13696
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
13700
13697
|
import_react_aria_components8.Checkbox,
|
|
13701
13698
|
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), props), {
|
|
13702
|
-
className: (0,
|
|
13699
|
+
className: (0, import_classnames25.default)(CLASS_NAME3, className),
|
|
13703
13700
|
children: withRenderProp(children, (node) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
13704
13701
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { slot: "checkbox", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_lucide_react4.Check, { size: size === "lg" ? 16 : 12 }) }),
|
|
13705
13702
|
node
|
|
@@ -14001,7 +13998,7 @@ var LinkedAccountsContent = ({
|
|
|
14001
13998
|
showBreakConnection
|
|
14002
13999
|
}) => {
|
|
14003
14000
|
const { data, addConnection } = (0, import_react48.useContext)(LinkedAccountsContext);
|
|
14004
|
-
const linkedAccountsNewAccountClassName = (0,
|
|
14001
|
+
const linkedAccountsNewAccountClassName = (0, import_classnames26.default)(
|
|
14005
14002
|
"Layer__linked-accounts__new-account",
|
|
14006
14003
|
asWidget && "--as-widget",
|
|
14007
14004
|
showLedgerBalance && "--show-ledger-balance",
|
|
@@ -14077,7 +14074,7 @@ var isDateAllowedToBrowse = (date, business) => {
|
|
|
14077
14074
|
var import_react54 = require("react");
|
|
14078
14075
|
|
|
14079
14076
|
// src/components/Input/Input.tsx
|
|
14080
|
-
var
|
|
14077
|
+
var import_classnames27 = __toESM(require("classnames"));
|
|
14081
14078
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
14082
14079
|
var Input = (_a) => {
|
|
14083
14080
|
var _b = _a, {
|
|
@@ -14091,7 +14088,7 @@ var Input = (_a) => {
|
|
|
14091
14088
|
"errorMessage",
|
|
14092
14089
|
"leftText"
|
|
14093
14090
|
]);
|
|
14094
|
-
const baseClassName = (0,
|
|
14091
|
+
const baseClassName = (0, import_classnames27.default)(
|
|
14095
14092
|
"Layer__input",
|
|
14096
14093
|
isInvalid ? "Layer__input--error" : "",
|
|
14097
14094
|
leftText ? "Layer__input--with-left-text" : "",
|
|
@@ -14107,7 +14104,7 @@ var Input = (_a) => {
|
|
|
14107
14104
|
};
|
|
14108
14105
|
|
|
14109
14106
|
// src/components/Input/InputGroup.tsx
|
|
14110
|
-
var
|
|
14107
|
+
var import_classnames28 = __toESM(require("classnames"));
|
|
14111
14108
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
14112
14109
|
var InputGroup = ({
|
|
14113
14110
|
label,
|
|
@@ -14116,7 +14113,7 @@ var InputGroup = ({
|
|
|
14116
14113
|
inline,
|
|
14117
14114
|
children
|
|
14118
14115
|
}) => {
|
|
14119
|
-
const baseClassName = (0,
|
|
14116
|
+
const baseClassName = (0, import_classnames28.default)(
|
|
14120
14117
|
"Layer__input-group",
|
|
14121
14118
|
className,
|
|
14122
14119
|
inline && "Layer__input-group--inline"
|
|
@@ -14293,7 +14290,7 @@ var ChevronDownFill = (_a) => {
|
|
|
14293
14290
|
var ChevronDownFill_default = ChevronDownFill;
|
|
14294
14291
|
|
|
14295
14292
|
// src/components/Input/Select.tsx
|
|
14296
|
-
var
|
|
14293
|
+
var import_classnames29 = __toESM(require("classnames"));
|
|
14297
14294
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
14298
14295
|
var Select = ({
|
|
14299
14296
|
name,
|
|
@@ -14310,7 +14307,7 @@ var Select = ({
|
|
|
14310
14307
|
isLoading,
|
|
14311
14308
|
formatOptionLabel: formatOptionLabel2
|
|
14312
14309
|
}) => {
|
|
14313
|
-
const baseClassName = (0,
|
|
14310
|
+
const baseClassName = (0, import_classnames29.default)(
|
|
14314
14311
|
"Layer__select",
|
|
14315
14312
|
isInvalid ? "Layer__select--error" : "",
|
|
14316
14313
|
className
|
|
@@ -14341,13 +14338,13 @@ var Select = ({
|
|
|
14341
14338
|
};
|
|
14342
14339
|
|
|
14343
14340
|
// src/components/Input/InputWithBadge.tsx
|
|
14344
|
-
var
|
|
14341
|
+
var import_classnames30 = __toESM(require("classnames"));
|
|
14345
14342
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
14346
14343
|
|
|
14347
14344
|
// src/components/Input/MultiSelect.tsx
|
|
14348
14345
|
var import_react51 = require("react");
|
|
14349
14346
|
var import_react_select2 = __toESM(require("react-select"));
|
|
14350
|
-
var
|
|
14347
|
+
var import_classnames31 = __toESM(require("classnames"));
|
|
14351
14348
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
14352
14349
|
var MultiSelect = ({
|
|
14353
14350
|
name,
|
|
@@ -14365,7 +14362,7 @@ var MultiSelect = ({
|
|
|
14365
14362
|
inputId,
|
|
14366
14363
|
isLoading
|
|
14367
14364
|
}) => {
|
|
14368
|
-
const baseClassName = (0,
|
|
14365
|
+
const baseClassName = (0, import_classnames31.default)(
|
|
14369
14366
|
"Layer__select",
|
|
14370
14367
|
isInvalid ? "Layer__select--error" : "",
|
|
14371
14368
|
className
|
|
@@ -14399,7 +14396,7 @@ var MultiSelect = ({
|
|
|
14399
14396
|
};
|
|
14400
14397
|
|
|
14401
14398
|
// src/components/Input/AmountInput.tsx
|
|
14402
|
-
var
|
|
14399
|
+
var import_classnames32 = __toESM(require("classnames"));
|
|
14403
14400
|
var import_react_currency_input_field = __toESM(require("react-currency-input-field"));
|
|
14404
14401
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
14405
14402
|
var transformCurrencyValue = (rawValue) => {
|
|
@@ -14430,7 +14427,7 @@ var AmountInput = (_a) => {
|
|
|
14430
14427
|
"badge",
|
|
14431
14428
|
"placeholder"
|
|
14432
14429
|
]);
|
|
14433
|
-
const baseClassName = (0,
|
|
14430
|
+
const baseClassName = (0, import_classnames32.default)(
|
|
14434
14431
|
"Layer__input Layer__amount-input",
|
|
14435
14432
|
badge ? "Layer__amount-input--align-left" : "Layer__amount-input--align-right",
|
|
14436
14433
|
isInvalid ? "Layer__input--error" : "",
|
|
@@ -14604,7 +14601,7 @@ var DatePickerOptions = ({
|
|
|
14604
14601
|
};
|
|
14605
14602
|
|
|
14606
14603
|
// src/components/DatePicker/DatePicker.tsx
|
|
14607
|
-
var
|
|
14604
|
+
var import_classnames33 = __toESM(require("classnames"));
|
|
14608
14605
|
var import_date_fns8 = require("date-fns");
|
|
14609
14606
|
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
14610
14607
|
var ReactDatePicker = RDP.default.default || RDP.default || RDP;
|
|
@@ -14729,21 +14726,21 @@ var DatePicker = (_a) => {
|
|
|
14729
14726
|
return [selected[0], null];
|
|
14730
14727
|
}, [selected, displayMode]);
|
|
14731
14728
|
const { isDesktop } = useSizeClass();
|
|
14732
|
-
const wrapperClassNames = (0,
|
|
14729
|
+
const wrapperClassNames = (0, import_classnames33.default)(
|
|
14733
14730
|
"Layer__datepicker__wrapper",
|
|
14734
14731
|
displayMode === "timePicker" && "Layer__datepicker__time__wrapper",
|
|
14735
14732
|
showNavigationArrows(navigateArrows, isDesktop) && "Layer__datepicker__wrapper--arrows"
|
|
14736
14733
|
);
|
|
14737
|
-
const datePickerWrapperClassNames = (0,
|
|
14734
|
+
const datePickerWrapperClassNames = (0, import_classnames33.default)(
|
|
14738
14735
|
"Layer__datepicker",
|
|
14739
14736
|
displayMode === "timePicker" && "Layer__datepicker__time",
|
|
14740
14737
|
wrapperClassName
|
|
14741
14738
|
);
|
|
14742
|
-
const calendarClassNames = (0,
|
|
14739
|
+
const calendarClassNames = (0, import_classnames33.default)(
|
|
14743
14740
|
"Layer__datepicker__calendar",
|
|
14744
14741
|
calendarClassName
|
|
14745
14742
|
);
|
|
14746
|
-
const popperClassNames = (0,
|
|
14743
|
+
const popperClassNames = (0, import_classnames33.default)(
|
|
14747
14744
|
"Layer__datepicker__popper",
|
|
14748
14745
|
displayMode === "timePicker" && "Layer__datepicker__time__popper",
|
|
14749
14746
|
popperClassName
|
|
@@ -14913,7 +14910,7 @@ var DatePicker = (_a) => {
|
|
|
14913
14910
|
Button,
|
|
14914
14911
|
{
|
|
14915
14912
|
"aria-label": "Previous Date",
|
|
14916
|
-
className: (0,
|
|
14913
|
+
className: (0, import_classnames33.default)(
|
|
14917
14914
|
"Layer__datepicker__prev-button",
|
|
14918
14915
|
isBeforeMinDate && "Layer__datepicker__button--disabled"
|
|
14919
14916
|
),
|
|
@@ -14935,7 +14932,7 @@ var DatePicker = (_a) => {
|
|
|
14935
14932
|
{
|
|
14936
14933
|
"aria-label": "Next Date",
|
|
14937
14934
|
variant: "secondary" /* secondary */,
|
|
14938
|
-
className: (0,
|
|
14935
|
+
className: (0, import_classnames33.default)(
|
|
14939
14936
|
"Layer__datepicker__next-button",
|
|
14940
14937
|
isTodayOrAfter ? "Layer__datepicker__button--disabled" : void 0
|
|
14941
14938
|
),
|
|
@@ -15898,7 +15895,7 @@ var MinimizeTwo = (_a) => {
|
|
|
15898
15895
|
var MinimizeTwo_default = MinimizeTwo;
|
|
15899
15896
|
|
|
15900
15897
|
// src/components/CategorySelect/CategorySelect.tsx
|
|
15901
|
-
var
|
|
15898
|
+
var import_classnames35 = __toESM(require("classnames"));
|
|
15902
15899
|
var import_date_fns12 = require("date-fns");
|
|
15903
15900
|
|
|
15904
15901
|
// src/hooks/categories/useCategories.ts
|
|
@@ -15945,7 +15942,7 @@ function useCategories({ mode } = {}) {
|
|
|
15945
15942
|
var import_react60 = require("react");
|
|
15946
15943
|
|
|
15947
15944
|
// src/components/ActionableList/ActionableList.tsx
|
|
15948
|
-
var
|
|
15945
|
+
var import_classnames34 = __toESM(require("classnames"));
|
|
15949
15946
|
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
15950
15947
|
var ActionableList = ({
|
|
15951
15948
|
options: options3,
|
|
@@ -15954,12 +15951,12 @@ var ActionableList = ({
|
|
|
15954
15951
|
showDescriptions = false,
|
|
15955
15952
|
className
|
|
15956
15953
|
}) => {
|
|
15957
|
-
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("ul", { className: (0,
|
|
15954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("ul", { className: (0, import_classnames34.default)("Layer__actionable-list", className), children: options3.map((x, idx) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
15958
15955
|
"li",
|
|
15959
15956
|
{
|
|
15960
15957
|
role: "button",
|
|
15961
15958
|
onClick: () => onClick(x),
|
|
15962
|
-
className: (0,
|
|
15959
|
+
className: (0, import_classnames34.default)(
|
|
15963
15960
|
x.secondary && "Layer__actionable-list-item--secondary",
|
|
15964
15961
|
x.asLink && "Layer__actionable-list-item--as-link",
|
|
15965
15962
|
selectedId === x.id && "Layer__actionable-list__item--selected"
|
|
@@ -16495,7 +16492,7 @@ var GroupHeading = (props) => {
|
|
|
16495
16492
|
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
16496
16493
|
import_react_select3.components.GroupHeading,
|
|
16497
16494
|
__spreadValues({
|
|
16498
|
-
className: (0,
|
|
16495
|
+
className: (0, import_classnames35.default)(
|
|
16499
16496
|
props.className,
|
|
16500
16497
|
props.children === "Match" || props.children === "All categories" ? "Layer__select__group-heading--main" : ""
|
|
16501
16498
|
)
|
|
@@ -16648,7 +16645,7 @@ var CategorySelect = ({
|
|
|
16648
16645
|
"button",
|
|
16649
16646
|
{
|
|
16650
16647
|
"aria-label": "Select category",
|
|
16651
|
-
className: (0,
|
|
16648
|
+
className: (0, import_classnames35.default)(
|
|
16652
16649
|
"Layer__category-menu__drawer-btn",
|
|
16653
16650
|
selected && "Layer__category-menu__drawer-btn--selected"
|
|
16654
16651
|
),
|
|
@@ -17044,7 +17041,7 @@ var Eye = (_a) => {
|
|
|
17044
17041
|
var Eye_default = Eye;
|
|
17045
17042
|
|
|
17046
17043
|
// src/components/FileThumb/FileThumb.tsx
|
|
17047
|
-
var
|
|
17044
|
+
var import_classnames36 = __toESM(require("classnames"));
|
|
17048
17045
|
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
17049
17046
|
var FileThumb = ({
|
|
17050
17047
|
url,
|
|
@@ -17063,7 +17060,7 @@ var FileThumb = ({
|
|
|
17063
17060
|
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
17064
17061
|
"div",
|
|
17065
17062
|
{
|
|
17066
|
-
className: (0,
|
|
17063
|
+
className: (0, import_classnames36.default)(
|
|
17067
17064
|
"Layer__file-thumb",
|
|
17068
17065
|
floatingActions && "Layer__file-thumb--floating"
|
|
17069
17066
|
),
|
|
@@ -17096,7 +17093,7 @@ var FileThumb = ({
|
|
|
17096
17093
|
enableOpen || enableDownload || onDelete ? /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
17097
17094
|
"div",
|
|
17098
17095
|
{
|
|
17099
|
-
className: (0,
|
|
17096
|
+
className: (0, import_classnames36.default)(
|
|
17100
17097
|
"Layer__file-thumb__actions",
|
|
17101
17098
|
floatingActions && "Layer__file-thumb__actions--floating"
|
|
17102
17099
|
),
|
|
@@ -17358,7 +17355,7 @@ var MatchBadge = ({
|
|
|
17358
17355
|
};
|
|
17359
17356
|
|
|
17360
17357
|
// src/components/MatchForm/MatchForm.tsx
|
|
17361
|
-
var
|
|
17358
|
+
var import_classnames37 = __toESM(require("classnames"));
|
|
17362
17359
|
var import_date_fns15 = require("date-fns");
|
|
17363
17360
|
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
17364
17361
|
var MatchForm = ({
|
|
@@ -17395,7 +17392,7 @@ var MatchForm = ({
|
|
|
17395
17392
|
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
17396
17393
|
"div",
|
|
17397
17394
|
{
|
|
17398
|
-
className: (0,
|
|
17395
|
+
className: (0, import_classnames37.default)(
|
|
17399
17396
|
`${classNamePrefix}__match-row`,
|
|
17400
17397
|
suggestedMatch.id === selectedMatchId ? `${classNamePrefix}__match-row--selected` : ""
|
|
17401
17398
|
),
|
|
@@ -17450,7 +17447,7 @@ var MatchForm = ({
|
|
|
17450
17447
|
};
|
|
17451
17448
|
|
|
17452
17449
|
// src/components/MatchForm/MatchFormMobile.tsx
|
|
17453
|
-
var
|
|
17450
|
+
var import_classnames38 = __toESM(require("classnames"));
|
|
17454
17451
|
var import_date_fns16 = require("date-fns");
|
|
17455
17452
|
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
17456
17453
|
var MatchFormMobile = ({
|
|
@@ -17469,7 +17466,7 @@ var MatchFormMobile = ({
|
|
|
17469
17466
|
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
17470
17467
|
"div",
|
|
17471
17468
|
{
|
|
17472
|
-
className: (0,
|
|
17469
|
+
className: (0, import_classnames38.default)(
|
|
17473
17470
|
`${classNamePrefix}__match-item`,
|
|
17474
17471
|
match.id === selectedMatchId ? `${classNamePrefix}__match-item--selected` : ""
|
|
17475
17472
|
),
|
|
@@ -17537,7 +17534,7 @@ var MatchFormMobile = ({
|
|
|
17537
17534
|
|
|
17538
17535
|
// src/components/Toggle/Toggle.tsx
|
|
17539
17536
|
var import_react66 = require("react");
|
|
17540
|
-
var
|
|
17537
|
+
var import_classnames39 = __toESM(require("classnames"));
|
|
17541
17538
|
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
17542
17539
|
var import_react67 = require("react");
|
|
17543
17540
|
var Toggle = ({
|
|
@@ -17558,7 +17555,7 @@ var Toggle = ({
|
|
|
17558
17555
|
setCurrentWidth(c.width);
|
|
17559
17556
|
}
|
|
17560
17557
|
});
|
|
17561
|
-
const baseClassName = (0,
|
|
17558
|
+
const baseClassName = (0, import_classnames39.default)(
|
|
17562
17559
|
"Layer__toggle",
|
|
17563
17560
|
`Layer__toggle--${size}`,
|
|
17564
17561
|
initialized ? "Layer__toggle--initialized" : ""
|
|
@@ -17643,7 +17640,7 @@ var ToggleOption = ({
|
|
|
17643
17640
|
style,
|
|
17644
17641
|
index
|
|
17645
17642
|
}) => {
|
|
17646
|
-
const optionClassName = (0,
|
|
17643
|
+
const optionClassName = (0, import_classnames39.default)("Layer__toggle-option", {
|
|
17647
17644
|
"Layer__toggle-option--active": checked
|
|
17648
17645
|
});
|
|
17649
17646
|
if (disabled) {
|
|
@@ -17808,10 +17805,10 @@ var Notification = ({
|
|
|
17808
17805
|
};
|
|
17809
17806
|
|
|
17810
17807
|
// src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
|
|
17811
|
-
var
|
|
17808
|
+
var import_classnames42 = __toESM(require("classnames"));
|
|
17812
17809
|
|
|
17813
17810
|
// src/components/Textarea/Textarea.tsx
|
|
17814
|
-
var
|
|
17811
|
+
var import_classnames40 = __toESM(require("classnames"));
|
|
17815
17812
|
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
17816
17813
|
var Textarea = (_a) => {
|
|
17817
17814
|
var _b = _a, {
|
|
@@ -17823,7 +17820,7 @@ var Textarea = (_a) => {
|
|
|
17823
17820
|
"isInvalid",
|
|
17824
17821
|
"errorMessage"
|
|
17825
17822
|
]);
|
|
17826
|
-
const baseClassName = (0,
|
|
17823
|
+
const baseClassName = (0, import_classnames40.default)(
|
|
17827
17824
|
"Layer__textarea",
|
|
17828
17825
|
isInvalid ? "Layer__textarea--error" : "",
|
|
17829
17826
|
className
|
|
@@ -18285,7 +18282,7 @@ function useDebouncedSearchInput({
|
|
|
18285
18282
|
// src/components/ui/ComboBox/ComboBox.tsx
|
|
18286
18283
|
var import_react_select4 = __toESM(require("react-select"));
|
|
18287
18284
|
var import_react72 = require("react");
|
|
18288
|
-
var
|
|
18285
|
+
var import_classnames41 = __toESM(require("classnames"));
|
|
18289
18286
|
|
|
18290
18287
|
// src/components/ui/Portal/Portal.tsx
|
|
18291
18288
|
var PORTAL_CLASS_NAME = "Layer__Portal";
|
|
@@ -18299,7 +18296,7 @@ var COMBO_BOX_CLASS_NAMES = {
|
|
|
18299
18296
|
VALUE_CONTAINER: "Layer__ComboBoxValueContainer",
|
|
18300
18297
|
PLACEHOLDER: "Layer__ComboBoxPlaceholder",
|
|
18301
18298
|
INDICATORS_CONTAINER: "Layer__ComboBoxIndicatorsContainer",
|
|
18302
|
-
MENU: (0,
|
|
18299
|
+
MENU: (0, import_classnames41.default)(
|
|
18303
18300
|
PORTAL_CLASS_NAME,
|
|
18304
18301
|
"Layer__ComboBoxMenu"
|
|
18305
18302
|
),
|
|
@@ -18343,7 +18340,7 @@ function buildCustomComboBoxOption({
|
|
|
18343
18340
|
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
18344
18341
|
import_react_select4.components.Option,
|
|
18345
18342
|
__spreadProps(__spreadValues({}, restProps), {
|
|
18346
|
-
className: (0,
|
|
18343
|
+
className: (0, import_classnames41.default)(
|
|
18347
18344
|
COMBO_BOX_CLASS_NAMES.OPTION,
|
|
18348
18345
|
isFocused ? `${COMBO_BOX_CLASS_NAMES.OPTION}--focused` : void 0,
|
|
18349
18346
|
effectiveIsSelected ? `${COMBO_BOX_CLASS_NAMES.OPTION}--selected` : void 0,
|
|
@@ -18521,7 +18518,7 @@ function ComboBox(_a) {
|
|
|
18521
18518
|
className,
|
|
18522
18519
|
classNames: {
|
|
18523
18520
|
container: () => COMBO_BOX_CLASS_NAMES.CONTAINER,
|
|
18524
|
-
control: ({ isFocused, isDisabled: isDisabled2 }) => (0,
|
|
18521
|
+
control: ({ isFocused, isDisabled: isDisabled2 }) => (0, import_classnames41.default)(
|
|
18525
18522
|
COMBO_BOX_CLASS_NAMES.CONTROL,
|
|
18526
18523
|
isFocused && `${COMBO_BOX_CLASS_NAMES.CONTROL}--focused`,
|
|
18527
18524
|
isDisabled2 && `${COMBO_BOX_CLASS_NAMES.CONTROL}--disabled`,
|
|
@@ -18529,7 +18526,7 @@ function ComboBox(_a) {
|
|
|
18529
18526
|
),
|
|
18530
18527
|
valueContainer: () => COMBO_BOX_CLASS_NAMES.VALUE_CONTAINER,
|
|
18531
18528
|
placeholder: () => COMBO_BOX_CLASS_NAMES.PLACEHOLDER,
|
|
18532
|
-
indicatorsContainer: () => (0,
|
|
18529
|
+
indicatorsContainer: () => (0, import_classnames41.default)(
|
|
18533
18530
|
COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER,
|
|
18534
18531
|
isReadOnly && `${COMBO_BOX_CLASS_NAMES.INDICATORS_CONTAINER}--readonly`
|
|
18535
18532
|
),
|
|
@@ -19973,7 +19970,7 @@ var ExpandedBankTransactionRow = (0, import_react86.forwardRef)(
|
|
|
19973
19970
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
19974
19971
|
"div",
|
|
19975
19972
|
{
|
|
19976
|
-
className: (0,
|
|
19973
|
+
className: (0, import_classnames42.default)(
|
|
19977
19974
|
`${className}__match`,
|
|
19978
19975
|
`${className}__content-panel`,
|
|
19979
19976
|
purpose === "match" /* match */ ? `${className}__content-panel--active` : ""
|
|
@@ -19997,7 +19994,7 @@ var ExpandedBankTransactionRow = (0, import_react86.forwardRef)(
|
|
|
19997
19994
|
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
19998
19995
|
"div",
|
|
19999
19996
|
{
|
|
20000
|
-
className: (0,
|
|
19997
|
+
className: (0, import_classnames42.default)(
|
|
20001
19998
|
`${className}__splits`,
|
|
20002
19999
|
`${className}__content-panel`,
|
|
20003
20000
|
purpose === "categorize" /* categorize */ ? `${className}__content-panel--active` : ""
|
|
@@ -20180,7 +20177,7 @@ var SplitTooltipDetails = ({
|
|
|
20180
20177
|
};
|
|
20181
20178
|
|
|
20182
20179
|
// src/components/BankTransactionRow/BankTransactionRow.tsx
|
|
20183
|
-
var
|
|
20180
|
+
var import_classnames43 = __toESM(require("classnames"));
|
|
20184
20181
|
var import_date_fns17 = require("date-fns");
|
|
20185
20182
|
|
|
20186
20183
|
// src/hooks/bookkeeping/periods/useBookkeepingPeriods.ts
|
|
@@ -20554,7 +20551,7 @@ var BankTransactionRow = ({
|
|
|
20554
20551
|
const { isVisible } = useDelayedVisibility({ delay: index * 20, initialVisibility: Boolean(initialLoad) });
|
|
20555
20552
|
const className = "Layer__bank-transaction-row";
|
|
20556
20553
|
const openClassName = open ? `${className}--expanded` : "";
|
|
20557
|
-
const rowClassName = (0,
|
|
20554
|
+
const rowClassName = (0, import_classnames43.default)(
|
|
20558
20555
|
className,
|
|
20559
20556
|
bankTransaction.recently_categorized && editable && shouldHideAfterCategorize() ? "Layer__bank-transaction-row--removing" : "",
|
|
20560
20557
|
open ? openClassName : "",
|
|
@@ -20632,7 +20629,7 @@ var BankTransactionRow = ({
|
|
|
20632
20629
|
/* @__PURE__ */ (0, import_jsx_runtime137.jsx)(
|
|
20633
20630
|
"td",
|
|
20634
20631
|
{
|
|
20635
|
-
className: (0,
|
|
20632
|
+
className: (0, import_classnames43.default)(
|
|
20636
20633
|
"Layer__table-cell",
|
|
20637
20634
|
"Layer__table-cell__category-col",
|
|
20638
20635
|
`${className}__actions-cell`,
|
|
@@ -20815,7 +20812,7 @@ var Assignment = ({ bankTransaction }) => {
|
|
|
20815
20812
|
};
|
|
20816
20813
|
|
|
20817
20814
|
// src/components/BankTransactionList/BankTransactionListItem.tsx
|
|
20818
|
-
var
|
|
20815
|
+
var import_classnames44 = __toESM(require("classnames"));
|
|
20819
20816
|
var import_date_fns19 = require("date-fns");
|
|
20820
20817
|
var import_jsx_runtime139 = require("react/jsx-runtime");
|
|
20821
20818
|
var BankTransactionListItem = ({
|
|
@@ -20882,7 +20879,7 @@ var BankTransactionListItem = ({
|
|
|
20882
20879
|
const categorized = isCategorized(bankTransaction);
|
|
20883
20880
|
const className = "Layer__bank-transaction-list-item";
|
|
20884
20881
|
const openClassName = open ? `${className}--expanded` : "";
|
|
20885
|
-
const rowClassName = (0,
|
|
20882
|
+
const rowClassName = (0, import_classnames44.default)(
|
|
20886
20883
|
className,
|
|
20887
20884
|
bankTransaction.recently_categorized && editable && shouldHideAfterCategorize() ? "Layer__bank-transaction-row--removing" : "",
|
|
20888
20885
|
open ? openClassName : "",
|
|
@@ -21055,7 +21052,7 @@ var Paperclip = (_a) => {
|
|
|
21055
21052
|
var Paperclip_default = Paperclip;
|
|
21056
21053
|
|
|
21057
21054
|
// src/components/BankTransactionMobileList/BusinessForm.tsx
|
|
21058
|
-
var
|
|
21055
|
+
var import_classnames45 = __toESM(require("classnames"));
|
|
21059
21056
|
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
21060
21057
|
var BusinessForm = ({
|
|
21061
21058
|
bankTransaction,
|
|
@@ -21151,7 +21148,7 @@ var BusinessForm = ({
|
|
|
21151
21148
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
21152
21149
|
"div",
|
|
21153
21150
|
{
|
|
21154
|
-
className: (0,
|
|
21151
|
+
className: (0, import_classnames45.default)(
|
|
21155
21152
|
"Layer__bank-transaction-mobile-list-item__receipts",
|
|
21156
21153
|
hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
|
|
21157
21154
|
),
|
|
@@ -21226,7 +21223,7 @@ var PersonalCategories = /* @__PURE__ */ ((PersonalCategories2) => {
|
|
|
21226
21223
|
})(PersonalCategories || {});
|
|
21227
21224
|
|
|
21228
21225
|
// src/components/BankTransactionMobileList/PersonalForm.tsx
|
|
21229
|
-
var
|
|
21226
|
+
var import_classnames46 = __toESM(require("classnames"));
|
|
21230
21227
|
var import_jsx_runtime143 = require("react/jsx-runtime");
|
|
21231
21228
|
var isAlreadyAssigned = (bankTransaction) => {
|
|
21232
21229
|
if (bankTransaction.categorization_status === "MATCHED" /* MATCHED */ || (bankTransaction == null ? void 0 : bankTransaction.categorization_status) === "SPLIT" /* SPLIT */) {
|
|
@@ -21280,7 +21277,7 @@ var PersonalForm = ({
|
|
|
21280
21277
|
/* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
|
|
21281
21278
|
"div",
|
|
21282
21279
|
{
|
|
21283
|
-
className: (0,
|
|
21280
|
+
className: (0, import_classnames46.default)(
|
|
21284
21281
|
"Layer__bank-transaction-mobile-list-item__receipts",
|
|
21285
21282
|
hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
|
|
21286
21283
|
),
|
|
@@ -21327,7 +21324,7 @@ var import_react94 = require("react");
|
|
|
21327
21324
|
|
|
21328
21325
|
// src/components/BankTransactionMobileList/MatchForm.tsx
|
|
21329
21326
|
var import_react92 = require("react");
|
|
21330
|
-
var
|
|
21327
|
+
var import_classnames47 = __toESM(require("classnames"));
|
|
21331
21328
|
var import_jsx_runtime144 = require("react/jsx-runtime");
|
|
21332
21329
|
var MatchForm2 = ({
|
|
21333
21330
|
bankTransaction,
|
|
@@ -21389,7 +21386,7 @@ var MatchForm2 = ({
|
|
|
21389
21386
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
21390
21387
|
"div",
|
|
21391
21388
|
{
|
|
21392
|
-
className: (0,
|
|
21389
|
+
className: (0, import_classnames47.default)(
|
|
21393
21390
|
"Layer__bank-transaction-mobile-list-item__receipts",
|
|
21394
21391
|
hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
|
|
21395
21392
|
),
|
|
@@ -21434,7 +21431,7 @@ var MatchForm2 = ({
|
|
|
21434
21431
|
|
|
21435
21432
|
// src/components/BankTransactionMobileList/SplitForm.tsx
|
|
21436
21433
|
var import_react93 = require("react");
|
|
21437
|
-
var
|
|
21434
|
+
var import_classnames48 = __toESM(require("classnames"));
|
|
21438
21435
|
var import_jsx_runtime145 = require("react/jsx-runtime");
|
|
21439
21436
|
var SplitForm = ({
|
|
21440
21437
|
bankTransaction,
|
|
@@ -21607,7 +21604,7 @@ var SplitForm = ({
|
|
|
21607
21604
|
{
|
|
21608
21605
|
type: "text",
|
|
21609
21606
|
name: `split-${index}`,
|
|
21610
|
-
className: (0,
|
|
21607
|
+
className: (0, import_classnames48.default)(
|
|
21611
21608
|
"Layer__split-amount-input",
|
|
21612
21609
|
index === 0 && "Layer__split-amount-input--first"
|
|
21613
21610
|
),
|
|
@@ -21655,7 +21652,7 @@ var SplitForm = ({
|
|
|
21655
21652
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
21656
21653
|
"div",
|
|
21657
21654
|
{
|
|
21658
|
-
className: (0,
|
|
21655
|
+
className: (0, import_classnames48.default)(
|
|
21659
21656
|
"Layer__bank-transaction-mobile-list-item__receipts",
|
|
21660
21657
|
hasReceipts(bankTransaction) ? "Layer__bank-transaction-mobile-list-item__actions--with-receipts" : void 0
|
|
21661
21658
|
),
|
|
@@ -21806,7 +21803,7 @@ var TransactionToOpenContext = (0, import_react95.createContext)({
|
|
|
21806
21803
|
});
|
|
21807
21804
|
|
|
21808
21805
|
// src/components/BankTransactionMobileList/BankTransactionMobileListItem.tsx
|
|
21809
|
-
var
|
|
21806
|
+
var import_classnames49 = __toESM(require("classnames"));
|
|
21810
21807
|
var import_date_fns20 = require("date-fns");
|
|
21811
21808
|
var import_jsx_runtime148 = require("react/jsx-runtime");
|
|
21812
21809
|
var DATE_FORMAT2 = "LLL d";
|
|
@@ -21911,7 +21908,7 @@ var BankTransactionMobileListItem = ({
|
|
|
21911
21908
|
const { isVisible } = useDelayedVisibility({ delay: index * 20, initialVisibility: Boolean(initialLoad) });
|
|
21912
21909
|
const className = "Layer__bank-transaction-mobile-list-item";
|
|
21913
21910
|
const openClassName = open ? `${className}--expanded` : "";
|
|
21914
|
-
const rowClassName = (0,
|
|
21911
|
+
const rowClassName = (0, import_classnames49.default)(
|
|
21915
21912
|
className,
|
|
21916
21913
|
removeAnim ? "Layer__bank-transaction-row--removing" : "",
|
|
21917
21914
|
open ? openClassName : "",
|
|
@@ -22047,14 +22044,14 @@ var BankTransactionMobileList = ({
|
|
|
22047
22044
|
var import_react97 = require("react");
|
|
22048
22045
|
|
|
22049
22046
|
// src/components/SkeletonLoader/SkeletonLoader.tsx
|
|
22050
|
-
var
|
|
22047
|
+
var import_classnames50 = __toESM(require("classnames"));
|
|
22051
22048
|
var import_jsx_runtime150 = require("react/jsx-runtime");
|
|
22052
22049
|
var SkeletonLoader = ({
|
|
22053
22050
|
height,
|
|
22054
22051
|
width,
|
|
22055
22052
|
className
|
|
22056
22053
|
}) => {
|
|
22057
|
-
const baseClassName = (0,
|
|
22054
|
+
const baseClassName = (0, import_classnames50.default)(
|
|
22058
22055
|
"Layer__skeleton-loader Layer__anim--skeleton-loading",
|
|
22059
22056
|
className
|
|
22060
22057
|
);
|
|
@@ -22067,7 +22064,7 @@ var FallbackWithSkeletonLoader = ({
|
|
|
22067
22064
|
children,
|
|
22068
22065
|
className
|
|
22069
22066
|
}) => {
|
|
22070
|
-
const baseClassName = (0,
|
|
22067
|
+
const baseClassName = (0, import_classnames50.default)(
|
|
22071
22068
|
"Layer__skeleton-loader Layer__anim--skeleton-loading",
|
|
22072
22069
|
className
|
|
22073
22070
|
);
|
|
@@ -22170,7 +22167,7 @@ var BankTransactionsLoader = ({
|
|
|
22170
22167
|
};
|
|
22171
22168
|
|
|
22172
22169
|
// src/components/SyncingComponent/SyncingComponent.tsx
|
|
22173
|
-
var
|
|
22170
|
+
var import_classnames51 = __toESM(require("classnames"));
|
|
22174
22171
|
var import_jsx_runtime153 = require("react/jsx-runtime");
|
|
22175
22172
|
var SyncingComponent = ({
|
|
22176
22173
|
title = "Syncing account data",
|
|
@@ -22192,7 +22189,7 @@ var SyncingComponent = ({
|
|
|
22192
22189
|
return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)(
|
|
22193
22190
|
"div",
|
|
22194
22191
|
{
|
|
22195
|
-
className: (0,
|
|
22192
|
+
className: (0, import_classnames51.default)(
|
|
22196
22193
|
"Layer__syncing-component",
|
|
22197
22194
|
inProgress ? "Layer__syncing-component--with-border" : ""
|
|
22198
22195
|
),
|
|
@@ -22340,7 +22337,7 @@ var ErrorBoundary = class extends import_react98.Component {
|
|
|
22340
22337
|
};
|
|
22341
22338
|
|
|
22342
22339
|
// src/components/Pagination/Pagination.tsx
|
|
22343
|
-
var
|
|
22340
|
+
var import_classnames52 = __toESM(require("classnames"));
|
|
22344
22341
|
|
|
22345
22342
|
// src/hooks/usePaginationRange/usePaginationRange.ts
|
|
22346
22343
|
var import_react99 = require("react");
|
|
@@ -22408,7 +22405,7 @@ var Pagination = ({
|
|
|
22408
22405
|
return null;
|
|
22409
22406
|
}
|
|
22410
22407
|
const lastPage = paginationRange[paginationRange.length - 1];
|
|
22411
|
-
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(VStack, { className: (0,
|
|
22408
|
+
return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(VStack, { className: (0, import_classnames52.default)("Layer__pagination-container", className), fluid: true, children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("nav", { "aria-label": "Pagination", className: "Layer__pagination-nav", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("ul", { className: "Layer__pagination", role: "list", children: [
|
|
22412
22409
|
/* @__PURE__ */ (0, import_jsx_runtime157.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
|
|
22413
22410
|
PaginationButton,
|
|
22414
22411
|
{
|
|
@@ -22461,7 +22458,7 @@ var Pagination = ({
|
|
|
22461
22458
|
|
|
22462
22459
|
// src/components/BankTransactions/BankTransactionsHeader.tsx
|
|
22463
22460
|
var import_react123 = require("react");
|
|
22464
|
-
var
|
|
22461
|
+
var import_classnames61 = __toESM(require("classnames"));
|
|
22465
22462
|
var import_date_fns21 = require("date-fns");
|
|
22466
22463
|
|
|
22467
22464
|
// src/components/domain/transactions/actions/TransactionsActions.tsx
|
|
@@ -22756,7 +22753,7 @@ function useCustomAccounts({ userCreated } = {}) {
|
|
|
22756
22753
|
var import_react103 = require("react");
|
|
22757
22754
|
var import_react_select5 = require("react-select");
|
|
22758
22755
|
var import_creatable = __toESM(require("react-select/creatable"));
|
|
22759
|
-
var
|
|
22756
|
+
var import_classnames53 = __toESM(require("classnames"));
|
|
22760
22757
|
var import_jsx_runtime162 = require("react/jsx-runtime");
|
|
22761
22758
|
var CreatableSelect = ({
|
|
22762
22759
|
name,
|
|
@@ -22778,7 +22775,7 @@ var CreatableSelect = ({
|
|
|
22778
22775
|
isClearable,
|
|
22779
22776
|
createOptionPosition = "first"
|
|
22780
22777
|
}) => {
|
|
22781
|
-
const baseClassName = (0,
|
|
22778
|
+
const baseClassName = (0, import_classnames53.default)(
|
|
22782
22779
|
"Layer__select",
|
|
22783
22780
|
isInvalid ? "Layer__select--error" : "",
|
|
22784
22781
|
className
|
|
@@ -22850,13 +22847,13 @@ var import_react_form2 = require("@tanstack/react-form");
|
|
|
22850
22847
|
// src/components/ui/Form/Form.tsx
|
|
22851
22848
|
var import_react104 = require("react");
|
|
22852
22849
|
var import_react_aria_components14 = require("react-aria-components");
|
|
22853
|
-
var
|
|
22850
|
+
var import_classnames54 = __toESM(require("classnames"));
|
|
22854
22851
|
var import_jsx_runtime163 = require("react/jsx-runtime");
|
|
22855
22852
|
var FORM_CLASS_NAME = "Layer__UI__Form";
|
|
22856
22853
|
var Form = (0, import_react104.forwardRef)(
|
|
22857
22854
|
function Form2(_a, ref) {
|
|
22858
22855
|
var _b = _a, { children, className } = _b, restProps = __objRest(_b, ["children", "className"]);
|
|
22859
|
-
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_aria_components14.Form, __spreadProps(__spreadValues({}, restProps), { className: (0,
|
|
22856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_aria_components14.Form, __spreadProps(__spreadValues({}, restProps), { className: (0, import_classnames54.default)(FORM_CLASS_NAME, className), ref, children }));
|
|
22860
22857
|
}
|
|
22861
22858
|
);
|
|
22862
22859
|
var TEXT_FIELD_CLASS_NAME = "Layer__UI__TextField";
|
|
@@ -22864,7 +22861,7 @@ var TextField = (0, import_react104.forwardRef)(
|
|
|
22864
22861
|
function TextField2(_a, ref) {
|
|
22865
22862
|
var _b = _a, { children, inline, textarea, className } = _b, restProps = __objRest(_b, ["children", "inline", "textarea", "className"]);
|
|
22866
22863
|
const dataProperties = toDataProperties({ inline, textarea });
|
|
22867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_aria_components14.TextField, __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: (0,
|
|
22864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(import_react_aria_components14.TextField, __spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), { className: (0, import_classnames54.default)(TEXT_FIELD_CLASS_NAME, className), ref, children: withRenderProp(children, (node) => node) }));
|
|
22868
22865
|
}
|
|
22869
22866
|
);
|
|
22870
22867
|
var FIELD_ERROR_CLASS_NAME = "Layer__UI__FieldError";
|
|
@@ -23129,7 +23126,7 @@ function FormBigDecimalField(_a) {
|
|
|
23129
23126
|
}
|
|
23130
23127
|
|
|
23131
23128
|
// src/features/forms/components/FormCheckboxField.tsx
|
|
23132
|
-
var
|
|
23129
|
+
var import_classnames55 = __toESM(require("classnames"));
|
|
23133
23130
|
var import_jsx_runtime168 = require("react/jsx-runtime");
|
|
23134
23131
|
var FORM_CHECKBOX_FIELD_CLASSNAME = "Layer__FormCheckboxField";
|
|
23135
23132
|
function FormCheckboxField({
|
|
@@ -23147,7 +23144,7 @@ function FormCheckboxField({
|
|
|
23147
23144
|
const errorMessage = errors.length !== 0 ? errors[0] : void 0;
|
|
23148
23145
|
const tooltipProps = showFieldError ? { tooltip: errorMessage } : {};
|
|
23149
23146
|
const additionalAriaProps = !showLabel && { "aria-label": label };
|
|
23150
|
-
const checkboxClassNames = (0,
|
|
23147
|
+
const checkboxClassNames = (0, import_classnames55.default)(
|
|
23151
23148
|
FORM_CHECKBOX_FIELD_CLASSNAME,
|
|
23152
23149
|
inline && `${FORM_CHECKBOX_FIELD_CLASSNAME}--inline`,
|
|
23153
23150
|
className
|
|
@@ -23175,7 +23172,7 @@ var import_react109 = require("react");
|
|
|
23175
23172
|
|
|
23176
23173
|
// src/components/ui/Date/Date.tsx
|
|
23177
23174
|
var import_react108 = require("react");
|
|
23178
|
-
var
|
|
23175
|
+
var import_classnames56 = __toESM(require("classnames"));
|
|
23179
23176
|
var import_react_aria_components17 = require("react-aria-components");
|
|
23180
23177
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
23181
23178
|
var DATE_FIELD_CLASS_NAME = "Layer__UI__DateField";
|
|
@@ -23187,7 +23184,7 @@ var DateField = (0, import_react108.forwardRef)(
|
|
|
23187
23184
|
import_react_aria_components17.DateField,
|
|
23188
23185
|
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
23189
23186
|
isReadOnly,
|
|
23190
|
-
className: (0,
|
|
23187
|
+
className: (0, import_classnames56.default)(DATE_FIELD_CLASS_NAME, className),
|
|
23191
23188
|
ref
|
|
23192
23189
|
})
|
|
23193
23190
|
);
|
|
@@ -23201,7 +23198,7 @@ var DateInput = (0, import_react108.forwardRef)(
|
|
|
23201
23198
|
return /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
23202
23199
|
import_react_aria_components17.DateInput,
|
|
23203
23200
|
__spreadProps(__spreadValues(__spreadValues({}, dataProperties), restProps), {
|
|
23204
|
-
className: (0,
|
|
23201
|
+
className: (0, import_classnames56.default)(DATE_INPUT_CLASS_NAME),
|
|
23205
23202
|
ref
|
|
23206
23203
|
})
|
|
23207
23204
|
);
|
|
@@ -23594,7 +23591,7 @@ var CustomAccountForm = ({ initialAccountName, onCancel, onSuccess }) => {
|
|
|
23594
23591
|
// src/components/CsvUpload/CsvUpload.tsx
|
|
23595
23592
|
var import_react116 = require("react");
|
|
23596
23593
|
var import_react_dropzone = require("react-dropzone");
|
|
23597
|
-
var
|
|
23594
|
+
var import_classnames57 = __toESM(require("classnames"));
|
|
23598
23595
|
var import_lucide_react9 = require("lucide-react");
|
|
23599
23596
|
var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
23600
23597
|
var VALID_EXTENSIONS = [".csv"];
|
|
@@ -23686,7 +23683,7 @@ var CsvUpload = ({ file, onFileSelected, replaceDropTarget = false }) => {
|
|
|
23686
23683
|
/* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(
|
|
23687
23684
|
VStack,
|
|
23688
23685
|
__spreadProps(__spreadValues({
|
|
23689
|
-
className: (0,
|
|
23686
|
+
className: (0, import_classnames57.default)(
|
|
23690
23687
|
"Layer__csv-upload",
|
|
23691
23688
|
{ "Layer__csv-upload--drag-active": isDragActive }
|
|
23692
23689
|
),
|
|
@@ -23723,7 +23720,7 @@ var CsvUpload = ({ file, onFileSelected, replaceDropTarget = false }) => {
|
|
|
23723
23720
|
};
|
|
23724
23721
|
|
|
23725
23722
|
// src/components/UploadTransactions/UploadTransactionsUploadCsvStep.tsx
|
|
23726
|
-
var
|
|
23723
|
+
var import_classnames59 = __toESM(require("classnames"));
|
|
23727
23724
|
|
|
23728
23725
|
// src/components/Separator/Separator.tsx
|
|
23729
23726
|
var import_jsx_runtime176 = require("react/jsx-runtime");
|
|
@@ -23770,14 +23767,14 @@ var DownloadCsvTemplateButton = ({ children, className, csvProps, fileName = "te
|
|
|
23770
23767
|
|
|
23771
23768
|
// src/components/CsvUpload/CopyTemplateHeadersButtonGroup.tsx
|
|
23772
23769
|
var import_lucide_react11 = require("lucide-react");
|
|
23773
|
-
var
|
|
23770
|
+
var import_classnames58 = __toESM(require("classnames"));
|
|
23774
23771
|
var import_jsx_runtime178 = require("react/jsx-runtime");
|
|
23775
23772
|
var copyTextToClipboard = (text) => {
|
|
23776
23773
|
navigator.clipboard.writeText(text).catch(() => {
|
|
23777
23774
|
});
|
|
23778
23775
|
};
|
|
23779
23776
|
var CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
|
|
23780
|
-
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(HStack, { gap: "3xs", className: (0,
|
|
23777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(HStack, { gap: "3xs", className: (0, import_classnames58.default)("Layer__csv-upload__copy-template-headers-button-group", className), children: Object.keys(headers).map((key) => /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
23781
23778
|
Button,
|
|
23782
23779
|
{
|
|
23783
23780
|
onClick: () => copyTextToClipboard(headers[key]),
|
|
@@ -23938,7 +23935,7 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
|
|
|
23938
23935
|
setHasParseCsvError(true);
|
|
23939
23936
|
});
|
|
23940
23937
|
}, [selectedAccount, isCreatingNewAccount, selectedFile, parseCsv2, onParseCsv, next]);
|
|
23941
|
-
const inputClassName = (0,
|
|
23938
|
+
const inputClassName = (0, import_classnames59.default)(
|
|
23942
23939
|
"Layer__upload-transactions__select-account-name-input",
|
|
23943
23940
|
!!customAccountsError && "Layer__upload-transactions__select-account-name-input--error"
|
|
23944
23941
|
);
|
|
@@ -24067,7 +24064,7 @@ function useCreateCustomAccountTransactions() {
|
|
|
24067
24064
|
|
|
24068
24065
|
// src/components/CsvUpload/ValidateCsvTable.tsx
|
|
24069
24066
|
var import_react118 = require("react");
|
|
24070
|
-
var
|
|
24067
|
+
var import_classnames60 = __toESM(require("classnames"));
|
|
24071
24068
|
var import_react_table = require("@tanstack/react-table");
|
|
24072
24069
|
var import_react_virtual = require("@tanstack/react-virtual");
|
|
24073
24070
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
@@ -24105,7 +24102,7 @@ function ValidateCsvTable({
|
|
|
24105
24102
|
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
24106
24103
|
"span",
|
|
24107
24104
|
{
|
|
24108
|
-
className: (0,
|
|
24105
|
+
className: (0, import_classnames60.default)(
|
|
24109
24106
|
"Layer__table-cell-content",
|
|
24110
24107
|
`${CSS_PREFIX}__cell-content`,
|
|
24111
24108
|
!isValid2 && `${CSS_PREFIX}__cell-content--error`
|
|
@@ -24156,7 +24153,7 @@ function ValidateCsvTable({
|
|
|
24156
24153
|
(header) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
24157
24154
|
"th",
|
|
24158
24155
|
{
|
|
24159
|
-
className: (0,
|
|
24156
|
+
className: (0, import_classnames60.default)(
|
|
24160
24157
|
"Layer__table-header",
|
|
24161
24158
|
`${CSS_PREFIX}__header-cell`,
|
|
24162
24159
|
`${CSS_PREFIX}__header-cell--${header.id}`
|
|
@@ -24170,7 +24167,7 @@ function ValidateCsvTable({
|
|
|
24170
24167
|
/* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
24171
24168
|
"tr",
|
|
24172
24169
|
{
|
|
24173
|
-
className: (0,
|
|
24170
|
+
className: (0, import_classnames60.default)(
|
|
24174
24171
|
"Layer__table-row",
|
|
24175
24172
|
`${CSS_PREFIX}__row`,
|
|
24176
24173
|
rows.length < MAX_NUM_ROWS && `${CSS_PREFIX}__row--bottom-border`
|
|
@@ -24192,7 +24189,7 @@ var ValidateCsvTableRow = ({
|
|
|
24192
24189
|
}) => /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
24193
24190
|
"tr",
|
|
24194
24191
|
{
|
|
24195
|
-
className: (0,
|
|
24192
|
+
className: (0, import_classnames60.default)(
|
|
24196
24193
|
"Layer__table-row",
|
|
24197
24194
|
`${CSS_PREFIX}__row`,
|
|
24198
24195
|
!row.getValue("is_valid") && `${CSS_PREFIX}__row--error`
|
|
@@ -24204,7 +24201,7 @@ var ValidateCsvTableRow = ({
|
|
|
24204
24201
|
return /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
24205
24202
|
"td",
|
|
24206
24203
|
{
|
|
24207
|
-
className: (0,
|
|
24204
|
+
className: (0, import_classnames60.default)(
|
|
24208
24205
|
"Layer__table-cell",
|
|
24209
24206
|
`${CSS_PREFIX}__cell`,
|
|
24210
24207
|
`${CSS_PREFIX}__cell--${cell.column.columnDef.id}`
|
|
@@ -24564,7 +24561,7 @@ var BankTransactionsHeader = ({
|
|
|
24564
24561
|
return /* @__PURE__ */ (0, import_jsx_runtime186.jsxs)(
|
|
24565
24562
|
Header,
|
|
24566
24563
|
{
|
|
24567
|
-
className: (0,
|
|
24564
|
+
className: (0, import_classnames61.default)(
|
|
24568
24565
|
"Layer__bank-transactions__header",
|
|
24569
24566
|
withDatePicker && "Layer__bank-transactions__header--with-date-picker",
|
|
24570
24567
|
mobileComponent && listView ? "Layer__bank-transactions__header--mobile" : void 0
|
|
@@ -24734,7 +24731,7 @@ function BankTransactionsTableEmptyStates({
|
|
|
24734
24731
|
}
|
|
24735
24732
|
|
|
24736
24733
|
// src/components/BankTransactions/BankTransactions.tsx
|
|
24737
|
-
var
|
|
24734
|
+
var import_classnames62 = __toESM(require("classnames"));
|
|
24738
24735
|
var import_jsx_runtime189 = require("react/jsx-runtime");
|
|
24739
24736
|
var COMPONENT_NAME2 = "bank-transactions";
|
|
24740
24737
|
var BankTransactions = (_a) => {
|
|
@@ -24880,7 +24877,7 @@ var BankTransactionsContent = ({
|
|
|
24880
24877
|
return /* @__PURE__ */ (0, import_jsx_runtime189.jsxs)(
|
|
24881
24878
|
Container,
|
|
24882
24879
|
{
|
|
24883
|
-
className: (0,
|
|
24880
|
+
className: (0, import_classnames62.default)(
|
|
24884
24881
|
"Layer__Public",
|
|
24885
24882
|
display === "review" /* review */ ? "Layer__bank-transactions--to-review" : "Layer__bank-transactions--categorized"
|
|
24886
24883
|
),
|
|
@@ -25025,10 +25022,10 @@ var BadgeLoader = ({ children, showLoading, variant = "default" }) => {
|
|
|
25025
25022
|
};
|
|
25026
25023
|
|
|
25027
25024
|
// src/components/Card/Card.tsx
|
|
25028
|
-
var
|
|
25025
|
+
var import_classnames63 = __toESM(require("classnames"));
|
|
25029
25026
|
var import_jsx_runtime192 = require("react/jsx-runtime");
|
|
25030
25027
|
var Card = ({ children, className }) => {
|
|
25031
|
-
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: (0,
|
|
25028
|
+
return /* @__PURE__ */ (0, import_jsx_runtime192.jsx)("div", { className: (0, import_classnames63.default)("Layer__card", className), children });
|
|
25032
25029
|
};
|
|
25033
25030
|
|
|
25034
25031
|
// src/contexts/QuickbooksContext/QuickbooksContext.tsx
|
|
@@ -25588,9 +25585,7 @@ var useProfitAndLoss = ({
|
|
|
25588
25585
|
const revenueTypeFilters = (_a2 = filters["revenue"]) == null ? void 0 : _a2.types;
|
|
25589
25586
|
const filtered = items.map((x) => {
|
|
25590
25587
|
if (revenueTypeFilters && revenueTypeFilters.length > 0 && !revenueTypeFilters.includes(x.type)) {
|
|
25591
|
-
return __spreadProps(__spreadValues({}, x), {
|
|
25592
|
-
hidden: true
|
|
25593
|
-
});
|
|
25588
|
+
return __spreadProps(__spreadValues({}, x), { isHidden: true });
|
|
25594
25589
|
}
|
|
25595
25590
|
return x;
|
|
25596
25591
|
});
|
|
@@ -25627,9 +25622,7 @@ var useProfitAndLoss = ({
|
|
|
25627
25622
|
const expenseTypeFilters = (_a2 = filters["expenses"]) == null ? void 0 : _a2.types;
|
|
25628
25623
|
const filtered = items.map((x) => {
|
|
25629
25624
|
if (expenseTypeFilters && expenseTypeFilters.length > 0 && !expenseTypeFilters.includes(x.type)) {
|
|
25630
|
-
return __spreadProps(__spreadValues({}, x), {
|
|
25631
|
-
hidden: true
|
|
25632
|
-
});
|
|
25625
|
+
return __spreadProps(__spreadValues({}, x), { isHidden: true });
|
|
25633
25626
|
}
|
|
25634
25627
|
return x;
|
|
25635
25628
|
});
|
|
@@ -26118,7 +26111,7 @@ var Indicator = ({
|
|
|
26118
26111
|
};
|
|
26119
26112
|
|
|
26120
26113
|
// src/components/ProfitAndLossChart/ProfitAndLossChart.tsx
|
|
26121
|
-
var
|
|
26114
|
+
var import_classnames64 = __toESM(require("classnames"));
|
|
26122
26115
|
var import_date_fns26 = require("date-fns");
|
|
26123
26116
|
var import_recharts = require("recharts");
|
|
26124
26117
|
var import_jsx_runtime205 = require("react/jsx-runtime");
|
|
@@ -26518,7 +26511,7 @@ var ProfitAndLossChart = ({
|
|
|
26518
26511
|
/* @__PURE__ */ (0, import_jsx_runtime205.jsx)(
|
|
26519
26512
|
import_recharts.ResponsiveContainer,
|
|
26520
26513
|
{
|
|
26521
|
-
className: (0,
|
|
26514
|
+
className: (0, import_classnames64.default)(
|
|
26522
26515
|
"Layer__chart-container",
|
|
26523
26516
|
!hasLoadedData && "Layer__chart-container--loading"
|
|
26524
26517
|
),
|
|
@@ -26638,7 +26631,7 @@ var ProfitAndLossChart = ({
|
|
|
26638
26631
|
isAnimationActive: barAnimActive,
|
|
26639
26632
|
animationDuration: 100,
|
|
26640
26633
|
radius: [2, 2, 0, 0],
|
|
26641
|
-
className: (0,
|
|
26634
|
+
className: (0, import_classnames64.default)(
|
|
26642
26635
|
"Layer__profit-and-loss-chart__bar--loading",
|
|
26643
26636
|
!hasLoadedData && "Layer__profit-and-loss-chart__bar--loading-anim"
|
|
26644
26637
|
),
|
|
@@ -26654,7 +26647,7 @@ var ProfitAndLossChart = ({
|
|
|
26654
26647
|
isAnimationActive: barAnimActive,
|
|
26655
26648
|
animationDuration: 100,
|
|
26656
26649
|
radius: [2, 2, 0, 0],
|
|
26657
|
-
className: (0,
|
|
26650
|
+
className: (0, import_classnames64.default)(
|
|
26658
26651
|
"Layer__profit-and-loss-chart__bar--loading",
|
|
26659
26652
|
!hasLoadedData && "Layer__profit-and-loss-chart__bar--loading-anim"
|
|
26660
26653
|
),
|
|
@@ -27152,7 +27145,7 @@ var SortArrows = (_a) => {
|
|
|
27152
27145
|
var SortArrows_default = SortArrows;
|
|
27153
27146
|
|
|
27154
27147
|
// src/components/ProfitAndLossDetailedCharts/DetailedTable.tsx
|
|
27155
|
-
var
|
|
27148
|
+
var import_classnames65 = __toESM(require("classnames"));
|
|
27156
27149
|
|
|
27157
27150
|
// src/components/ui/Typography/MoneyText.tsx
|
|
27158
27151
|
var import_react144 = require("react");
|
|
@@ -27268,7 +27261,7 @@ var DetailedTable = ({
|
|
|
27268
27261
|
}) => {
|
|
27269
27262
|
const buildColClass = (column) => {
|
|
27270
27263
|
var _a, _b, _c;
|
|
27271
|
-
return (0,
|
|
27264
|
+
return (0, import_classnames65.default)(
|
|
27272
27265
|
"Layer__sortable-col",
|
|
27273
27266
|
sidebarScope && ((_a = filters[sidebarScope]) == null ? void 0 : _a.sortBy) === column ? `sort--${(_c = sidebarScope && ((_b = filters[sidebarScope]) == null ? void 0 : _b.sortDirection)) != null ? _c : "desc"}` : ""
|
|
27274
27267
|
);
|
|
@@ -27320,7 +27313,7 @@ var DetailedTable = ({
|
|
|
27320
27313
|
return /* @__PURE__ */ (0, import_jsx_runtime211.jsxs)(
|
|
27321
27314
|
"tr",
|
|
27322
27315
|
{
|
|
27323
|
-
className: (0,
|
|
27316
|
+
className: (0, import_classnames65.default)(
|
|
27324
27317
|
"Layer__profit-and-loss-detailed-table__row",
|
|
27325
27318
|
hoveredItem && hoveredItem === item.displayName ? "active" : ""
|
|
27326
27319
|
),
|
|
@@ -27358,7 +27351,7 @@ var DetailedTable = ({
|
|
|
27358
27351
|
};
|
|
27359
27352
|
|
|
27360
27353
|
// src/components/ProfitAndLossDetailedCharts/DetailedChart.tsx
|
|
27361
|
-
var
|
|
27354
|
+
var import_classnames66 = __toESM(require("classnames"));
|
|
27362
27355
|
var import_recharts2 = require("recharts");
|
|
27363
27356
|
var import_jsx_runtime212 = require("react/jsx-runtime");
|
|
27364
27357
|
var DetailedChart = ({
|
|
@@ -27448,7 +27441,7 @@ var DetailedChart = ({
|
|
|
27448
27441
|
return /* @__PURE__ */ (0, import_jsx_runtime212.jsx)(
|
|
27449
27442
|
import_recharts2.Cell,
|
|
27450
27443
|
{
|
|
27451
|
-
className: (0,
|
|
27444
|
+
className: (0, import_classnames66.default)(
|
|
27452
27445
|
"Layer__profit-and-loss-detailed-charts__pie",
|
|
27453
27446
|
hoveredItem && active ? "active" : "inactive",
|
|
27454
27447
|
entry.type === "Uncategorized" && "Layer__profit-and-loss-detailed-charts__pie--border"
|
|
@@ -27800,7 +27793,7 @@ var DateTime = ({
|
|
|
27800
27793
|
};
|
|
27801
27794
|
|
|
27802
27795
|
// src/components/DetailsList/DetailsList.tsx
|
|
27803
|
-
var
|
|
27796
|
+
var import_classnames67 = __toESM(require("classnames"));
|
|
27804
27797
|
var import_jsx_runtime215 = require("react/jsx-runtime");
|
|
27805
27798
|
var DetailsList = ({
|
|
27806
27799
|
title,
|
|
@@ -27809,7 +27802,7 @@ var DetailsList = ({
|
|
|
27809
27802
|
titleClassName,
|
|
27810
27803
|
actions
|
|
27811
27804
|
}) => {
|
|
27812
|
-
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: (0,
|
|
27805
|
+
return /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)("div", { className: (0, import_classnames67.default)("Layer__details-list", className), children: [
|
|
27813
27806
|
title && /* @__PURE__ */ (0, import_jsx_runtime215.jsxs)(Header, { className: titleClassName, children: [
|
|
27814
27807
|
/* @__PURE__ */ (0, import_jsx_runtime215.jsx)(Heading, { size: "secondary" /* secondary */, children: title }),
|
|
27815
27808
|
actions && /* @__PURE__ */ (0, import_jsx_runtime215.jsx)("div", { className: "Layer__details-list__actions", children: actions })
|
|
@@ -27839,11 +27832,11 @@ var DetailsListItem = ({
|
|
|
27839
27832
|
|
|
27840
27833
|
// src/components/Header/Header.tsx
|
|
27841
27834
|
var import_react147 = require("react");
|
|
27842
|
-
var
|
|
27835
|
+
var import_classnames68 = __toESM(require("classnames"));
|
|
27843
27836
|
var import_jsx_runtime217 = require("react/jsx-runtime");
|
|
27844
27837
|
var Header4 = (0, import_react147.forwardRef)(
|
|
27845
27838
|
({ className, children, style, sticky, asHeader, rounded }, ref) => {
|
|
27846
|
-
const baseClassName = (0,
|
|
27839
|
+
const baseClassName = (0, import_classnames68.default)(
|
|
27847
27840
|
"Layer__header",
|
|
27848
27841
|
sticky && "Layer__header--sticky",
|
|
27849
27842
|
rounded && "Layer__header--top-rounded",
|
|
@@ -27866,19 +27859,19 @@ var Header4 = (0, import_react147.forwardRef)(
|
|
|
27866
27859
|
Header4.displayName = "Header";
|
|
27867
27860
|
|
|
27868
27861
|
// src/components/Header/HeaderRow.tsx
|
|
27869
|
-
var
|
|
27862
|
+
var import_classnames69 = __toESM(require("classnames"));
|
|
27870
27863
|
var import_jsx_runtime218 = require("react/jsx-runtime");
|
|
27871
27864
|
var HeaderRow = ({ className, children, direction, style }) => {
|
|
27872
27865
|
const dataProps = toDataProperties({ direction });
|
|
27873
|
-
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", __spreadProps(__spreadValues({}, dataProps), { className: (0,
|
|
27866
|
+
return /* @__PURE__ */ (0, import_jsx_runtime218.jsx)("div", __spreadProps(__spreadValues({}, dataProps), { className: (0, import_classnames69.default)("Layer__header__row", className), style, children }));
|
|
27874
27867
|
};
|
|
27875
27868
|
|
|
27876
27869
|
// src/components/Header/HeaderCol.tsx
|
|
27877
|
-
var
|
|
27870
|
+
var import_classnames70 = __toESM(require("classnames"));
|
|
27878
27871
|
var import_jsx_runtime219 = require("react/jsx-runtime");
|
|
27879
27872
|
var HeaderCol = ({ className, children, style, noPadding = false }) => {
|
|
27880
27873
|
const dataProperties = toDataProperties({ "no-padding": noPadding });
|
|
27881
|
-
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", __spreadProps(__spreadValues({}, dataProperties), { className: (0,
|
|
27874
|
+
return /* @__PURE__ */ (0, import_jsx_runtime219.jsx)("div", __spreadProps(__spreadValues({}, dataProperties), { className: (0, import_classnames70.default)("Layer__header__col", className), style, children }));
|
|
27882
27875
|
};
|
|
27883
27876
|
|
|
27884
27877
|
// src/components/TableBody/TableBody.tsx
|
|
@@ -27888,7 +27881,7 @@ var TableBody = ({ children }) => {
|
|
|
27888
27881
|
};
|
|
27889
27882
|
|
|
27890
27883
|
// src/components/TableCell/TableCell.tsx
|
|
27891
|
-
var
|
|
27884
|
+
var import_classnames71 = __toESM(require("classnames"));
|
|
27892
27885
|
var import_jsx_runtime221 = require("react/jsx-runtime");
|
|
27893
27886
|
var TableCell = ({
|
|
27894
27887
|
children,
|
|
@@ -27908,7 +27901,7 @@ var TableCell = ({
|
|
|
27908
27901
|
const amount = typeof children === "number" ? children : 0;
|
|
27909
27902
|
const isPositive = amount >= 0;
|
|
27910
27903
|
const amountString = centsToDollars(Math.abs(amount));
|
|
27911
|
-
const cellClassNames = (0,
|
|
27904
|
+
const cellClassNames = (0, import_classnames71.default)(
|
|
27912
27905
|
"Layer__table-cell",
|
|
27913
27906
|
(primary || isHeaderCell) && "Layer__table-cell--primary",
|
|
27914
27907
|
isHeaderCell && "Layer__table-header",
|
|
@@ -27951,7 +27944,7 @@ var TableHead = ({ children }) => {
|
|
|
27951
27944
|
};
|
|
27952
27945
|
|
|
27953
27946
|
// src/components/TableRow/TableRow.tsx
|
|
27954
|
-
var
|
|
27947
|
+
var import_classnames72 = __toESM(require("classnames"));
|
|
27955
27948
|
var import_jsx_runtime223 = require("react/jsx-runtime");
|
|
27956
27949
|
var TableRow = ({
|
|
27957
27950
|
rowKey,
|
|
@@ -27975,7 +27968,7 @@ var TableRow = ({
|
|
|
27975
27968
|
handleExpand && handleExpand();
|
|
27976
27969
|
}
|
|
27977
27970
|
};
|
|
27978
|
-
const rowClassNames = (0,
|
|
27971
|
+
const rowClassNames = (0, import_classnames72.default)([
|
|
27979
27972
|
"Layer__table-row",
|
|
27980
27973
|
!isHeadRow && `Layer__table-row--depth-${depth}`,
|
|
27981
27974
|
!isHeadRow && `Layer__table-row--variant-${variant}`,
|
|
@@ -27998,7 +27991,7 @@ var TableRow = ({
|
|
|
27998
27991
|
};
|
|
27999
27992
|
|
|
28000
27993
|
// src/components/Table/Table.tsx
|
|
28001
|
-
var
|
|
27994
|
+
var import_classnames73 = __toESM(require("classnames"));
|
|
28002
27995
|
var import_jsx_runtime224 = require("react/jsx-runtime");
|
|
28003
27996
|
var Table = ({
|
|
28004
27997
|
componentName,
|
|
@@ -28006,11 +27999,11 @@ var Table = ({
|
|
|
28006
27999
|
borderCollapse = "separate",
|
|
28007
28000
|
bottomSpacing = true
|
|
28008
28001
|
}) => {
|
|
28009
|
-
const tableWrapperClassNames = (0,
|
|
28002
|
+
const tableWrapperClassNames = (0, import_classnames73.default)(
|
|
28010
28003
|
"Layer__table-wrapper",
|
|
28011
28004
|
bottomSpacing && "Layer__table-wrapper--bottom-spacing"
|
|
28012
28005
|
);
|
|
28013
|
-
const tableClassNames = (0,
|
|
28006
|
+
const tableClassNames = (0, import_classnames73.default)(
|
|
28014
28007
|
"Layer__table",
|
|
28015
28008
|
componentName && `Layer__${componentName}__table`,
|
|
28016
28009
|
borderCollapse && `Layer__table__${borderCollapse}-rows`
|
|
@@ -28400,17 +28393,17 @@ var LedgerAccountEntryDetails = ({
|
|
|
28400
28393
|
|
|
28401
28394
|
// src/components/VirtualizedDataTable/VirtualizedDataTable.tsx
|
|
28402
28395
|
var import_react150 = require("react");
|
|
28403
|
-
var
|
|
28396
|
+
var import_classnames75 = __toESM(require("classnames"));
|
|
28404
28397
|
var import_react_virtual2 = require("@tanstack/react-virtual");
|
|
28405
28398
|
var import_react_table2 = require("@tanstack/react-table");
|
|
28406
28399
|
|
|
28407
28400
|
// src/components/ui/Table/Table.tsx
|
|
28408
28401
|
var import_react149 = require("react");
|
|
28409
28402
|
var import_react_aria_components19 = require("react-aria-components");
|
|
28410
|
-
var
|
|
28403
|
+
var import_classnames74 = __toESM(require("classnames"));
|
|
28411
28404
|
var import_jsx_runtime226 = require("react/jsx-runtime");
|
|
28412
28405
|
var CSS_PREFIX2 = "Layer__UI__Table";
|
|
28413
|
-
var getClassName = (component, additionalClassNames) => (0,
|
|
28406
|
+
var getClassName = (component, additionalClassNames) => (0, import_classnames74.default)(`${CSS_PREFIX2}-${component}`, additionalClassNames);
|
|
28414
28407
|
var Table2 = (0, import_react149.forwardRef)(
|
|
28415
28408
|
(_a, ref) => {
|
|
28416
28409
|
var _b = _a, { children, className } = _b, restProps = __objRest(_b, ["children", "className"]);
|
|
@@ -28572,7 +28565,7 @@ var VirtualizedDataTable = ({
|
|
|
28572
28565
|
}
|
|
28573
28566
|
const virtualItems = rowVirtualizer.getVirtualItems();
|
|
28574
28567
|
const totalSize = rowVirtualizer.getTotalSize();
|
|
28575
|
-
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { className: `${CSS_PREFIX3}__container`, ref: containerRef, style: { height: renderedTableHeight }, "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(Table2, { className: (0,
|
|
28568
|
+
return /* @__PURE__ */ (0, import_jsx_runtime227.jsx)("div", { className: `${CSS_PREFIX3}__container`, ref: containerRef, style: { height: renderedTableHeight }, "aria-label": ariaLabel, children: /* @__PURE__ */ (0, import_jsx_runtime227.jsxs)(Table2, { className: (0, import_classnames75.default)(CSS_PREFIX3, `Layer__UI__Table__${componentName}`), "aria-label": ariaLabel, children: [
|
|
28576
28569
|
/* @__PURE__ */ (0, import_jsx_runtime227.jsx)(TableHeader, { className: `${CSS_PREFIX3}__header`, style: { height: HEADER_HEIGHT2 }, children: table2.getFlatHeaders().map(
|
|
28577
28570
|
(header) => {
|
|
28578
28571
|
var _a;
|
|
@@ -28580,7 +28573,7 @@ var VirtualizedDataTable = ({
|
|
|
28580
28573
|
Column,
|
|
28581
28574
|
{
|
|
28582
28575
|
isRowHeader: (_a = header.column.columnDef.meta) == null ? void 0 : _a.isRowHeader,
|
|
28583
|
-
className: (0,
|
|
28576
|
+
className: (0, import_classnames75.default)(
|
|
28584
28577
|
`${CSS_PREFIX3}__header-cell`,
|
|
28585
28578
|
`Layer__UI__Table-Column__${componentName}--${header.id}`
|
|
28586
28579
|
),
|
|
@@ -28602,7 +28595,7 @@ var VirtualizedDataTable = ({
|
|
|
28602
28595
|
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime227.jsx)(
|
|
28603
28596
|
Cell3,
|
|
28604
28597
|
{
|
|
28605
|
-
className: (0,
|
|
28598
|
+
className: (0, import_classnames75.default)(
|
|
28606
28599
|
`${CSS_PREFIX3}__cell`,
|
|
28607
28600
|
`Layer__UI__Table-Cell__${componentName}--${cell.column.id}`
|
|
28608
28601
|
),
|
|
@@ -28767,7 +28760,15 @@ var ProfitAndLossDetailReport = ({
|
|
|
28767
28760
|
["Account" /* Account */]: {
|
|
28768
28761
|
id: "Account" /* Account */,
|
|
28769
28762
|
header: (stringOverrides == null ? void 0 : stringOverrides.accountColumnHeader) || "Account",
|
|
28770
|
-
cell: (row) =>
|
|
28763
|
+
cell: (row) => /* @__PURE__ */ (0, import_jsx_runtime230.jsx)(
|
|
28764
|
+
Text,
|
|
28765
|
+
{
|
|
28766
|
+
as: "span",
|
|
28767
|
+
withTooltip: "whenTruncated" /* whenTruncated */,
|
|
28768
|
+
ellipsis: true,
|
|
28769
|
+
children: row.account.name || "-"
|
|
28770
|
+
}
|
|
28771
|
+
)
|
|
28771
28772
|
},
|
|
28772
28773
|
["Description" /* Description */]: {
|
|
28773
28774
|
id: "Description" /* Description */,
|
|
@@ -29256,10 +29257,10 @@ function ProfitAndLossDetailLinesDownloadButton({
|
|
|
29256
29257
|
var import_react158 = require("react");
|
|
29257
29258
|
|
|
29258
29259
|
// src/components/ViewHeader/ViewHeader.tsx
|
|
29259
|
-
var
|
|
29260
|
+
var import_classnames76 = __toESM(require("classnames"));
|
|
29260
29261
|
var import_jsx_runtime237 = require("react/jsx-runtime");
|
|
29261
29262
|
var ViewHeader = ({ title, className, children }) => {
|
|
29262
|
-
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { className: (0,
|
|
29263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { className: (0, import_classnames76.default)("Layer__view-header", className), children: /* @__PURE__ */ (0, import_jsx_runtime237.jsxs)("div", { className: "Layer__view-header__content", children: [
|
|
29263
29264
|
title && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)(Heading, { className: "Layer__view-header__title", children: title }),
|
|
29264
29265
|
children && /* @__PURE__ */ (0, import_jsx_runtime237.jsx)("div", { className: "Layer__view-header__children", children })
|
|
29265
29266
|
] }) });
|
|
@@ -29267,7 +29268,7 @@ var ViewHeader = ({ title, className, children }) => {
|
|
|
29267
29268
|
|
|
29268
29269
|
// src/components/Panel/Panel.tsx
|
|
29269
29270
|
var import_react157 = require("react");
|
|
29270
|
-
var
|
|
29271
|
+
var import_classnames77 = __toESM(require("classnames"));
|
|
29271
29272
|
var import_jsx_runtime238 = require("react/jsx-runtime");
|
|
29272
29273
|
var Panel = ({
|
|
29273
29274
|
children,
|
|
@@ -29287,7 +29288,7 @@ var Panel = ({
|
|
|
29287
29288
|
setSidebarHeight((_b = parentRef == null ? void 0 : parentRef.current) == null ? void 0 : _b.offsetHeight);
|
|
29288
29289
|
}
|
|
29289
29290
|
}, [parentRef, (_a = parentRef == null ? void 0 : parentRef.current) == null ? void 0 : _a.offsetHeight, sidebarIsOpen]);
|
|
29290
|
-
const sidebarClass = (0,
|
|
29291
|
+
const sidebarClass = (0, import_classnames77.default)(
|
|
29291
29292
|
"Layer__panel__sidebar",
|
|
29292
29293
|
defaultSidebarHeight && "Layer__panel__sidebar--default",
|
|
29293
29294
|
floating && "Layer__panel__sidebar--floating"
|
|
@@ -29295,7 +29296,7 @@ var Panel = ({
|
|
|
29295
29296
|
return /* @__PURE__ */ (0, import_jsx_runtime238.jsxs)(
|
|
29296
29297
|
"div",
|
|
29297
29298
|
{
|
|
29298
|
-
className: (0,
|
|
29299
|
+
className: (0, import_classnames77.default)(
|
|
29299
29300
|
"Layer__panel",
|
|
29300
29301
|
className,
|
|
29301
29302
|
sidebarIsOpen && "Layer__panel--open"
|
|
@@ -29321,7 +29322,7 @@ var Panel = ({
|
|
|
29321
29322
|
};
|
|
29322
29323
|
|
|
29323
29324
|
// src/components/View/View.tsx
|
|
29324
|
-
var
|
|
29325
|
+
var import_classnames78 = __toESM(require("classnames"));
|
|
29325
29326
|
var import_jsx_runtime239 = require("react/jsx-runtime");
|
|
29326
29327
|
var View = (0, import_react158.forwardRef)(
|
|
29327
29328
|
({
|
|
@@ -29338,7 +29339,7 @@ var View = (0, import_react158.forwardRef)(
|
|
|
29338
29339
|
}, ref) => {
|
|
29339
29340
|
const { theme } = useLayerContext();
|
|
29340
29341
|
const styles = parseStylesFromThemeConfig(theme);
|
|
29341
|
-
const viewClassNames = (0,
|
|
29342
|
+
const viewClassNames = (0, import_classnames78.default)(
|
|
29342
29343
|
"Layer__view",
|
|
29343
29344
|
type === "panel" && "Layer__view--panel",
|
|
29344
29345
|
viewClassName
|
|
@@ -29349,7 +29350,7 @@ var View = (0, import_react158.forwardRef)(
|
|
|
29349
29350
|
ViewHeader,
|
|
29350
29351
|
{
|
|
29351
29352
|
title,
|
|
29352
|
-
className: (0,
|
|
29353
|
+
className: (0, import_classnames78.default)(
|
|
29353
29354
|
headerControls ? "Layer__view-header--paddings" : void 0
|
|
29354
29355
|
),
|
|
29355
29356
|
children: header != null ? header : headerControls
|
|
@@ -29399,6 +29400,7 @@ var ProfitAndLossReport = ({
|
|
|
29399
29400
|
const handleCloseDetailReport = (0, import_react159.useCallback)(() => {
|
|
29400
29401
|
setSelectedLineItem(null);
|
|
29401
29402
|
}, []);
|
|
29403
|
+
const useComparisonPnl = !!comparisonConfig;
|
|
29402
29404
|
return /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(InAppLinkProvider, { renderInAppLink, children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
29403
29405
|
View,
|
|
29404
29406
|
{
|
|
@@ -29415,7 +29417,7 @@ var ProfitAndLossReport = ({
|
|
|
29415
29417
|
customDateRanges
|
|
29416
29418
|
}
|
|
29417
29419
|
),
|
|
29418
|
-
view === "desktop"
|
|
29420
|
+
view === "desktop" && useComparisonPnl && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ProfitAndLoss2.CompareOptions, {})
|
|
29419
29421
|
] }) }),
|
|
29420
29422
|
/* @__PURE__ */ (0, import_jsx_runtime240.jsx)(HeaderCol, { children: selectedLineItem ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
29421
29423
|
ProfitAndLossDetailLinesDownloadButton,
|
|
@@ -29427,13 +29429,13 @@ var ProfitAndLossReport = ({
|
|
|
29427
29429
|
ProfitAndLoss2.DownloadButton,
|
|
29428
29430
|
{
|
|
29429
29431
|
stringOverrides: stringOverrides == null ? void 0 : stringOverrides.downloadButton,
|
|
29430
|
-
useComparisonPnl
|
|
29432
|
+
useComparisonPnl,
|
|
29431
29433
|
moneyFormat: csvMoneyFormat,
|
|
29432
29434
|
view
|
|
29433
29435
|
}
|
|
29434
29436
|
) })
|
|
29435
29437
|
] }),
|
|
29436
|
-
view !== "desktop"
|
|
29438
|
+
view !== "desktop" && useComparisonPnl && /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(HeaderRow, { children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(HeaderCol, { children: /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(ProfitAndLoss2.CompareOptions, {}) }) })
|
|
29437
29439
|
] }),
|
|
29438
29440
|
children: selectedLineItem ? /* @__PURE__ */ (0, import_jsx_runtime240.jsx)(
|
|
29439
29441
|
ProfitAndLossDetailReport,
|
|
@@ -29613,23 +29615,29 @@ function TransactionsToReview({
|
|
|
29613
29615
|
tagFilter = void 0,
|
|
29614
29616
|
variants
|
|
29615
29617
|
}) {
|
|
29618
|
+
var _a;
|
|
29616
29619
|
const { size = "sm" } = variants != null ? variants : {};
|
|
29617
29620
|
const { dateRange: contextDateRange } = (0, import_react161.useContext)(ProfitAndLoss2.Context);
|
|
29618
29621
|
const dateRange = usePnlDateRange ? contextDateRange : void 0;
|
|
29619
|
-
const
|
|
29620
|
-
|
|
29622
|
+
const currentDate = (0, import_react161.useMemo)(() => dateRange ? dateRange.startDate : (0, import_date_fns30.startOfMonth)(/* @__PURE__ */ new Date()), [dateRange]);
|
|
29623
|
+
const { data, isLoading, isError, refetch, setDate } = useProfitAndLossLTM({
|
|
29624
|
+
currentDate,
|
|
29621
29625
|
tagFilter
|
|
29622
29626
|
});
|
|
29623
|
-
const
|
|
29624
|
-
if (!data || !dateRange) return 0;
|
|
29627
|
+
const activeMonth = (0, import_react161.useMemo)(() => {
|
|
29628
|
+
if (!data || !dateRange) return void 0;
|
|
29625
29629
|
const { startDate } = dateRange;
|
|
29626
|
-
|
|
29630
|
+
return data.find(
|
|
29627
29631
|
(summary) => summary.month - 1 === (0, import_date_fns30.getMonth)(startDate) && summary.year === (0, import_date_fns30.getYear)(startDate)
|
|
29628
29632
|
);
|
|
29629
|
-
if (!activeMonth) return 0;
|
|
29630
|
-
return activeMonth.uncategorizedTransactions;
|
|
29631
29633
|
}, [data, dateRange]);
|
|
29632
|
-
|
|
29634
|
+
(0, import_react161.useEffect)(() => {
|
|
29635
|
+
if (!activeMonth) {
|
|
29636
|
+
setDate(currentDate);
|
|
29637
|
+
}
|
|
29638
|
+
}, [activeMonth, currentDate, setDate]);
|
|
29639
|
+
const hasLoadedData = !isLoading && activeMonth;
|
|
29640
|
+
const numTransactionsToReview = (_a = activeMonth == null ? void 0 : activeMonth.uncategorizedTransactions) != null ? _a : 0;
|
|
29633
29641
|
const transactionsToReviewBadge = (0, import_react161.useMemo)(() => {
|
|
29634
29642
|
if (!hasLoadedData) {
|
|
29635
29643
|
return /* @__PURE__ */ (0, import_jsx_runtime245.jsx)(BadgeLoader, {});
|
|
@@ -29970,7 +29978,7 @@ var mergeComparisonLineItemsAtDepth = (lineItems) => {
|
|
|
29970
29978
|
};
|
|
29971
29979
|
|
|
29972
29980
|
// src/components/ProfitAndLossTable/ProfitAndLossCompareTable.tsx
|
|
29973
|
-
var
|
|
29981
|
+
var import_classnames79 = __toESM(require("classnames"));
|
|
29974
29982
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
29975
29983
|
var ProfitAndLossCompareTable = ({
|
|
29976
29984
|
stringOverrides
|
|
@@ -29993,7 +30001,7 @@ var ProfitAndLossCompareTable = ({
|
|
|
29993
30001
|
return /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
29994
30002
|
"div",
|
|
29995
30003
|
{
|
|
29996
|
-
className: (0,
|
|
30004
|
+
className: (0, import_classnames79.default)("Layer__profit-and-loss-table__loader-container"),
|
|
29997
30005
|
children: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Loader2, {})
|
|
29998
30006
|
}
|
|
29999
30007
|
);
|
|
@@ -30113,7 +30121,7 @@ var ProfitAndLossCompareTable = ({
|
|
|
30113
30121
|
|
|
30114
30122
|
// src/components/ProfitAndLossTable/ProfitAndLossTableComponent.tsx
|
|
30115
30123
|
var import_react166 = require("react");
|
|
30116
|
-
var
|
|
30124
|
+
var import_classnames80 = __toESM(require("classnames"));
|
|
30117
30125
|
var import_jsx_runtime249 = require("react/jsx-runtime");
|
|
30118
30126
|
var ProfitAndLossTableComponent = ({
|
|
30119
30127
|
asContainer,
|
|
@@ -30129,7 +30137,7 @@ var ProfitAndLossTableComponent = ({
|
|
|
30129
30137
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
30130
30138
|
"div",
|
|
30131
30139
|
{
|
|
30132
|
-
className: (0,
|
|
30140
|
+
className: (0, import_classnames80.default)(
|
|
30133
30141
|
"Layer__profit-and-loss-table__loader-container",
|
|
30134
30142
|
asContainer && "Layer__component-container"
|
|
30135
30143
|
),
|
|
@@ -33011,7 +33019,7 @@ var import_react184 = require("react");
|
|
|
33011
33019
|
|
|
33012
33020
|
// src/components/LedgerAccount/LedgerAccountRow.tsx
|
|
33013
33021
|
var import_react183 = require("react");
|
|
33014
|
-
var
|
|
33022
|
+
var import_classnames81 = __toESM(require("classnames"));
|
|
33015
33023
|
var import_date_fns38 = require("date-fns");
|
|
33016
33024
|
var import_jsx_runtime269 = require("react/jsx-runtime");
|
|
33017
33025
|
var LedgerAccountRow = ({
|
|
@@ -33029,7 +33037,7 @@ var LedgerAccountRow = ({
|
|
|
33029
33037
|
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
|
|
33030
33038
|
"tr",
|
|
33031
33039
|
{
|
|
33032
|
-
className: (0,
|
|
33040
|
+
className: (0, import_classnames81.default)(
|
|
33033
33041
|
"Layer__table-row",
|
|
33034
33042
|
row.entry_id === selectedEntryId && "Layer__table-row--active"
|
|
33035
33043
|
),
|
|
@@ -33068,7 +33076,7 @@ var LedgerAccountRow = ({
|
|
|
33068
33076
|
return /* @__PURE__ */ (0, import_jsx_runtime269.jsx)(
|
|
33069
33077
|
"tr",
|
|
33070
33078
|
{
|
|
33071
|
-
className: (0,
|
|
33079
|
+
className: (0, import_classnames81.default)(
|
|
33072
33080
|
"Layer__table-row",
|
|
33073
33081
|
row.entry_id === selectedEntryId && "Layer__table-row--active"
|
|
33074
33082
|
),
|
|
@@ -33118,7 +33126,7 @@ var LedgerAccountRow = ({
|
|
|
33118
33126
|
return /* @__PURE__ */ (0, import_jsx_runtime269.jsxs)(
|
|
33119
33127
|
"tr",
|
|
33120
33128
|
{
|
|
33121
|
-
className: (0,
|
|
33129
|
+
className: (0, import_classnames81.default)(
|
|
33122
33130
|
"Layer__table-row",
|
|
33123
33131
|
row.entry_id === selectedEntryId && "Layer__table-row--active"
|
|
33124
33132
|
),
|
|
@@ -33144,7 +33152,7 @@ var LedgerAccountRow = ({
|
|
|
33144
33152
|
};
|
|
33145
33153
|
|
|
33146
33154
|
// src/components/LedgerAccount/LedgerAccountIndex.tsx
|
|
33147
|
-
var
|
|
33155
|
+
var import_classnames82 = __toESM(require("classnames"));
|
|
33148
33156
|
var import_jsx_runtime270 = require("react/jsx-runtime");
|
|
33149
33157
|
var LedgerAccount = ({
|
|
33150
33158
|
containerRef,
|
|
@@ -33167,7 +33175,7 @@ var LedgerAccount = ({
|
|
|
33167
33175
|
hasMore,
|
|
33168
33176
|
fetchMore
|
|
33169
33177
|
} = (0, import_react184.useContext)(LedgerAccountsContext);
|
|
33170
|
-
const baseClassName = (0,
|
|
33178
|
+
const baseClassName = (0, import_classnames82.default)(
|
|
33171
33179
|
"Layer__ledger-account__index",
|
|
33172
33180
|
selectedAccount && "open"
|
|
33173
33181
|
);
|
|
@@ -34805,7 +34813,7 @@ var SmileIcon_default = SmileIcon;
|
|
|
34805
34813
|
|
|
34806
34814
|
// src/components/Tasks/TasksListItem.tsx
|
|
34807
34815
|
var import_react199 = require("react");
|
|
34808
|
-
var
|
|
34816
|
+
var import_classnames83 = __toESM(require("classnames"));
|
|
34809
34817
|
|
|
34810
34818
|
// src/utils/bookkeeping/tasks/getBookkeepingTaskStatusIcon.tsx
|
|
34811
34819
|
var import_jsx_runtime282 = require("react/jsx-runtime");
|
|
@@ -35136,16 +35144,16 @@ var TasksListItem = (0, import_react199.forwardRef)(({ task, defaultOpen, onExpa
|
|
|
35136
35144
|
const { trigger: handleUploadDocumentsForTask } = useUploadDocumentsForTask();
|
|
35137
35145
|
const { trigger: handleDeleteUploadsOnTask } = useDeleteUploadsOnTask();
|
|
35138
35146
|
const { trigger: handleUpdateTaskUploadDescription } = useUpdateTaskUploadDescription();
|
|
35139
|
-
const taskBodyClassName = (0,
|
|
35147
|
+
const taskBodyClassName = (0, import_classnames83.default)(
|
|
35140
35148
|
"Layer__tasks-list-item__body",
|
|
35141
35149
|
isOpen && "Layer__tasks-list-item__body--expanded",
|
|
35142
35150
|
isCompletedTask(task) && "Layer__tasks-list-item--completed"
|
|
35143
35151
|
);
|
|
35144
|
-
const taskHeadClassName = (0,
|
|
35152
|
+
const taskHeadClassName = (0, import_classnames83.default)(
|
|
35145
35153
|
"Layer__tasks-list-item__head-info",
|
|
35146
35154
|
isCompletedTask(task) ? "Layer__tasks-list-item--completed" : "Layer__tasks-list-item--pending"
|
|
35147
35155
|
);
|
|
35148
|
-
const taskItemClassName = (0,
|
|
35156
|
+
const taskItemClassName = (0, import_classnames83.default)(
|
|
35149
35157
|
"Layer__tasks-list-item",
|
|
35150
35158
|
isOpen && "Layer__tasks-list-item__expanded"
|
|
35151
35159
|
);
|
|
@@ -35296,13 +35304,13 @@ var TasksListItem = (0, import_react199.forwardRef)(({ task, defaultOpen, onExpa
|
|
|
35296
35304
|
TasksListItem.displayName = "TasksListItem";
|
|
35297
35305
|
|
|
35298
35306
|
// src/components/MobilePanel/MobilePanel.tsx
|
|
35299
|
-
var
|
|
35307
|
+
var import_classnames84 = __toESM(require("classnames"));
|
|
35300
35308
|
var import_react_dom = require("react-dom");
|
|
35301
35309
|
var import_jsx_runtime284 = require("react/jsx-runtime");
|
|
35302
35310
|
var MobilePanel = ({ header, children, open, onClose, className }) => {
|
|
35303
35311
|
const dataProperties = toDataProperties({ open });
|
|
35304
35312
|
return (0, import_react_dom.createPortal)(
|
|
35305
|
-
/* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", __spreadProps(__spreadValues({ className: (0,
|
|
35313
|
+
/* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", __spreadProps(__spreadValues({ className: (0, import_classnames84.default)("Layer__Portal Layer__mobile-panel", className) }, dataProperties), { children: [
|
|
35306
35314
|
/* @__PURE__ */ (0, import_jsx_runtime284.jsxs)("div", { className: "Layer__mobile-panel__header", children: [
|
|
35307
35315
|
/* @__PURE__ */ (0, import_jsx_runtime284.jsx)(BackButton, { onClick: onClose }),
|
|
35308
35316
|
header && /* @__PURE__ */ (0, import_jsx_runtime284.jsx)("div", { className: "Layer__mobile-panel__header__content", children: header })
|
|
@@ -35503,7 +35511,7 @@ var TasksList = ({ pageSize = 8, mobile }) => {
|
|
|
35503
35511
|
// src/components/Tasks/TasksPending.tsx
|
|
35504
35512
|
var import_recharts4 = require("recharts");
|
|
35505
35513
|
var import_date_fns40 = require("date-fns");
|
|
35506
|
-
var
|
|
35514
|
+
var import_classnames85 = __toESM(require("classnames"));
|
|
35507
35515
|
|
|
35508
35516
|
// src/components/BookkeepingStatus/BookkeepingStatusDescription.tsx
|
|
35509
35517
|
var import_jsx_runtime287 = require("react/jsx-runtime");
|
|
@@ -35534,7 +35542,7 @@ var TasksPending = () => {
|
|
|
35534
35542
|
value: incompleteTaskCount
|
|
35535
35543
|
}
|
|
35536
35544
|
];
|
|
35537
|
-
const taskStatusClassName = (0,
|
|
35545
|
+
const taskStatusClassName = (0, import_classnames85.default)(
|
|
35538
35546
|
completedTaskCount > 0 ? "Layer__tasks-pending-bar__status--done" : "Layer__tasks-pending-bar__status--pending"
|
|
35539
35547
|
);
|
|
35540
35548
|
return /* @__PURE__ */ (0, import_jsx_runtime288.jsxs)("div", { className: "Layer__tasks-pending", children: [
|
|
@@ -35982,7 +35990,7 @@ var Tab = ({
|
|
|
35982
35990
|
};
|
|
35983
35991
|
|
|
35984
35992
|
// src/components/Tabs/Tabs.tsx
|
|
35985
|
-
var
|
|
35993
|
+
var import_classnames86 = __toESM(require("classnames"));
|
|
35986
35994
|
var import_jsx_runtime295 = require("react/jsx-runtime");
|
|
35987
35995
|
var import_react206 = require("react");
|
|
35988
35996
|
var STARTING_PADDING = 12;
|
|
@@ -35991,7 +35999,7 @@ var Tabs = ({ name, options: options3, selected, onChange }) => {
|
|
|
35991
35999
|
const [thumbPos, setThumbPos] = (0, import_react205.useState)({ left: 0, width: 0 });
|
|
35992
36000
|
const [currentWidth, setCurrentWidth] = (0, import_react205.useState)(0);
|
|
35993
36001
|
const selectedValue = selected || options3[0].value;
|
|
35994
|
-
const baseClassName = (0,
|
|
36002
|
+
const baseClassName = (0, import_classnames86.default)(
|
|
35995
36003
|
"Layer__tabs",
|
|
35996
36004
|
initialized && "Layer__tabs--initialized"
|
|
35997
36005
|
);
|
|
@@ -37582,7 +37590,7 @@ function BookkeepingProfitAndLossSummariesContainer({
|
|
|
37582
37590
|
}
|
|
37583
37591
|
|
|
37584
37592
|
// src/views/BookkeepingOverview/BookkeepingOverview.tsx
|
|
37585
|
-
var
|
|
37593
|
+
var import_classnames87 = __toESM(require("classnames"));
|
|
37586
37594
|
|
|
37587
37595
|
// src/views/BookkeepingOverview/useKeepInMobileViewport.tsx
|
|
37588
37596
|
var import_react216 = require("react");
|
|
@@ -37742,7 +37750,7 @@ var BookkeepingOverview = ({
|
|
|
37742
37750
|
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
37743
37751
|
Container,
|
|
37744
37752
|
{
|
|
37745
|
-
name: (0,
|
|
37753
|
+
name: (0, import_classnames87.default)(
|
|
37746
37754
|
"bookkeeping-overview-profit-and-loss-chart",
|
|
37747
37755
|
pnlToggle !== "revenue" && "bookkeeping-overview-profit-and-loss-chart--hidden"
|
|
37748
37756
|
),
|
|
@@ -37759,7 +37767,7 @@ var BookkeepingOverview = ({
|
|
|
37759
37767
|
/* @__PURE__ */ (0, import_jsx_runtime318.jsx)(
|
|
37760
37768
|
Container,
|
|
37761
37769
|
{
|
|
37762
|
-
name: (0,
|
|
37770
|
+
name: (0, import_classnames87.default)(
|
|
37763
37771
|
"bookkeeping-overview-profit-and-loss-chart",
|
|
37764
37772
|
pnlToggle !== "expenses" && "bookkeeping-overview-profit-and-loss-chart--hidden"
|
|
37765
37773
|
),
|
|
@@ -37781,7 +37789,7 @@ var BookkeepingOverview = ({
|
|
|
37781
37789
|
|
|
37782
37790
|
// src/views/AccountingOverview/AccountingOverview.tsx
|
|
37783
37791
|
var import_react218 = require("react");
|
|
37784
|
-
var
|
|
37792
|
+
var import_classnames88 = __toESM(require("classnames"));
|
|
37785
37793
|
var import_jsx_runtime319 = require("react/jsx-runtime");
|
|
37786
37794
|
var AccountingOverview = ({
|
|
37787
37795
|
title = "Accounting overview",
|
|
@@ -37870,7 +37878,7 @@ var AccountingOverview = ({
|
|
|
37870
37878
|
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
37871
37879
|
Container,
|
|
37872
37880
|
{
|
|
37873
|
-
name: (0,
|
|
37881
|
+
name: (0, import_classnames88.default)(
|
|
37874
37882
|
"accounting-overview-profit-and-loss-chart",
|
|
37875
37883
|
pnlToggle !== "revenue" && "accounting-overview-profit-and-loss-chart--hidden"
|
|
37876
37884
|
),
|
|
@@ -37888,7 +37896,7 @@ var AccountingOverview = ({
|
|
|
37888
37896
|
/* @__PURE__ */ (0, import_jsx_runtime319.jsx)(
|
|
37889
37897
|
Container,
|
|
37890
37898
|
{
|
|
37891
|
-
name: (0,
|
|
37899
|
+
name: (0, import_classnames88.default)(
|
|
37892
37900
|
"accounting-overview-profit-and-loss-chart",
|
|
37893
37901
|
pnlToggle !== "expenses" && "accounting-overview-profit-and-loss-chart--hidden"
|
|
37894
37902
|
),
|
|
@@ -38723,14 +38731,14 @@ var import_date_fns48 = require("date-fns");
|
|
|
38723
38731
|
var import_react225 = require("react");
|
|
38724
38732
|
|
|
38725
38733
|
// src/components/Input/StaticValue.tsx
|
|
38726
|
-
var
|
|
38734
|
+
var import_classnames89 = __toESM(require("classnames"));
|
|
38727
38735
|
var import_jsx_runtime324 = require("react/jsx-runtime");
|
|
38728
38736
|
var StaticValue = (props) => {
|
|
38729
38737
|
var _a;
|
|
38730
38738
|
return /* @__PURE__ */ (0, import_jsx_runtime324.jsx)(
|
|
38731
38739
|
Text,
|
|
38732
38740
|
__spreadValues({
|
|
38733
|
-
className: (0,
|
|
38741
|
+
className: (0, import_classnames89.default)(
|
|
38734
38742
|
"Layer__input--static-value",
|
|
38735
38743
|
(_a = props.className) != null ? _a : ""
|
|
38736
38744
|
)
|
|
@@ -39757,7 +39765,7 @@ var DueStatus = ({ dueDate, paidAt, size = "md" }) => {
|
|
|
39757
39765
|
};
|
|
39758
39766
|
|
|
39759
39767
|
// src/components/Bills/BillsTable.tsx
|
|
39760
|
-
var
|
|
39768
|
+
var import_classnames90 = __toESM(require("classnames"));
|
|
39761
39769
|
|
|
39762
39770
|
// src/components/Bills/BillsTableLoader.tsx
|
|
39763
39771
|
var import_jsx_runtime335 = require("react/jsx-runtime");
|
|
@@ -39819,7 +39827,7 @@ var BillsTableContent = ({
|
|
|
39819
39827
|
addBill(entry);
|
|
39820
39828
|
setShowRecordPaymentForm(true);
|
|
39821
39829
|
};
|
|
39822
|
-
const actionsColClassName = (0,
|
|
39830
|
+
const actionsColClassName = (0, import_classnames90.default)(
|
|
39823
39831
|
"Layer__bills-table__actions-col",
|
|
39824
39832
|
status === "PAID" ? "Layer__bills-table__actions-col--narrow" : ""
|
|
39825
39833
|
);
|
|
@@ -39889,7 +39897,7 @@ var BillsTableContent = ({
|
|
|
39889
39897
|
};
|
|
39890
39898
|
|
|
39891
39899
|
// src/components/Bills/BillsList.tsx
|
|
39892
|
-
var
|
|
39900
|
+
var import_classnames91 = __toESM(require("classnames"));
|
|
39893
39901
|
var import_jsx_runtime337 = require("react/jsx-runtime");
|
|
39894
39902
|
var BillsList = ({
|
|
39895
39903
|
stringOverrides
|
|
@@ -39943,7 +39951,7 @@ var BillsListItem = ({
|
|
|
39943
39951
|
}
|
|
39944
39952
|
removeBill(bill);
|
|
39945
39953
|
};
|
|
39946
|
-
const liClassName = (0,
|
|
39954
|
+
const liClassName = (0, import_classnames91.default)(
|
|
39947
39955
|
"Layer__bills-list-item",
|
|
39948
39956
|
showComponent ? "Layer__bills-list-item--show" : ""
|
|
39949
39957
|
);
|
|
@@ -41036,13 +41044,13 @@ var DataTable = ({
|
|
|
41036
41044
|
const isEmptyTable = (data == null ? void 0 : data.length) === 0;
|
|
41037
41045
|
const renderTableBody = (0, import_react236.useMemo)(() => {
|
|
41038
41046
|
if (isError) {
|
|
41039
|
-
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(ErrorState2, {}) }) });
|
|
41047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { className: "Layer__DataTable__EmptyState__Row", children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { className: "Layer__DataTable__EmptyState__Cell", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(ErrorState2, {}) }) });
|
|
41040
41048
|
}
|
|
41041
41049
|
if (isLoading) {
|
|
41042
|
-
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Loader2, {}) }) });
|
|
41050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { className: "Layer__DataTable__EmptyState__Row", children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { className: "Layer__DataTable__EmptyState__Cell", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Loader2, {}) }) });
|
|
41043
41051
|
}
|
|
41044
41052
|
if (isEmptyTable) {
|
|
41045
|
-
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(EmptyState2, {}) }) });
|
|
41053
|
+
return /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { className: "Layer__DataTable__EmptyState__Row", children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Cell3, { className: "Layer__DataTable__EmptyState__Cell", colSpan: columns.length, children: /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(EmptyState2, {}) }) });
|
|
41046
41054
|
}
|
|
41047
41055
|
const RowRenderer = (row) => /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Row2, { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(
|
|
41048
41056
|
Cell3,
|
|
@@ -41261,6 +41269,12 @@ var InvoiceStatusCell = ({ invoice, inline = false }) => {
|
|
|
41261
41269
|
] });
|
|
41262
41270
|
};
|
|
41263
41271
|
|
|
41272
|
+
// src/features/customers/util.ts
|
|
41273
|
+
function getCustomerName(customer) {
|
|
41274
|
+
var _a, _b;
|
|
41275
|
+
return (_b = (_a = customer == null ? void 0 : customer.individualName) != null ? _a : customer == null ? void 0 : customer.companyName) != null ? _b : "Unknown Customer";
|
|
41276
|
+
}
|
|
41277
|
+
|
|
41264
41278
|
// src/components/Invoices/InvoiceTable/InvoiceTable.tsx
|
|
41265
41279
|
var import_jsx_runtime350 = require("react/jsx-runtime");
|
|
41266
41280
|
var COMPONENT_NAME11 = "InvoiceTable";
|
|
@@ -41285,7 +41299,7 @@ var AmountCell = ({ invoice }) => {
|
|
|
41285
41299
|
case "VOIDED" /* Voided */:
|
|
41286
41300
|
case "REFUNDED" /* Refunded */:
|
|
41287
41301
|
case "SENT" /* Sent */: {
|
|
41288
|
-
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(
|
|
41302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Span, { align: "right", children: totalAmount });
|
|
41289
41303
|
}
|
|
41290
41304
|
case "PARTIALLY_PAID" /* PartiallyPaid */: {
|
|
41291
41305
|
return /* @__PURE__ */ (0, import_jsx_runtime350.jsxs)(VStack, { children: [
|
|
@@ -41305,10 +41319,6 @@ var AmountCell = ({ invoice }) => {
|
|
|
41305
41319
|
}
|
|
41306
41320
|
}
|
|
41307
41321
|
};
|
|
41308
|
-
var getCustomerName = (invoice) => {
|
|
41309
|
-
const { recipientName, customer } = invoice;
|
|
41310
|
-
return (customer == null ? void 0 : customer.individualName) || (customer == null ? void 0 : customer.companyName) || recipientName;
|
|
41311
|
-
};
|
|
41312
41322
|
var getColumnConfig = (onSelectInvoice) => ({
|
|
41313
41323
|
["SentAt" /* SentAt */]: {
|
|
41314
41324
|
id: "SentAt" /* SentAt */,
|
|
@@ -41318,13 +41328,13 @@ var getColumnConfig = (onSelectInvoice) => ({
|
|
|
41318
41328
|
["InvoiceNo" /* InvoiceNo */]: {
|
|
41319
41329
|
id: "InvoiceNo" /* InvoiceNo */,
|
|
41320
41330
|
header: "No.",
|
|
41321
|
-
cell: (row) => row.invoiceNumber,
|
|
41331
|
+
cell: (row) => /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Span, { ellipsis: true, children: row.invoiceNumber }),
|
|
41322
41332
|
isRowHeader: true
|
|
41323
41333
|
},
|
|
41324
41334
|
["Customer" /* Customer */]: {
|
|
41325
41335
|
id: "Customer" /* Customer */,
|
|
41326
41336
|
header: "Customer",
|
|
41327
|
-
cell: (row) => getCustomerName(row)
|
|
41337
|
+
cell: (row) => /* @__PURE__ */ (0, import_jsx_runtime350.jsx)(Span, { ellipsis: true, children: getCustomerName(row.customer) })
|
|
41328
41338
|
},
|
|
41329
41339
|
["Total" /* Total */]: {
|
|
41330
41340
|
id: "Total" /* Total */,
|
|
@@ -41769,7 +41779,7 @@ var import_react260 = require("react");
|
|
|
41769
41779
|
|
|
41770
41780
|
// src/components/Invoices/InvoiceForm/InvoiceForm.tsx
|
|
41771
41781
|
var import_react244 = require("react");
|
|
41772
|
-
var
|
|
41782
|
+
var import_classnames93 = __toESM(require("classnames"));
|
|
41773
41783
|
|
|
41774
41784
|
// src/components/Invoices/InvoiceForm/useInvoiceForm.ts
|
|
41775
41785
|
var import_react242 = require("react");
|
|
@@ -41948,19 +41958,14 @@ var convertInvoiceFormToParams = (form) => {
|
|
|
41948
41958
|
unitPrice: convertBigDecimalToCents(item.unitPrice),
|
|
41949
41959
|
quantity: item.quantity
|
|
41950
41960
|
};
|
|
41951
|
-
|
|
41952
|
-
|
|
41953
|
-
|
|
41954
|
-
|
|
41955
|
-
import_effect27.BigDecimal.multiply(item.amount, form.taxRate)
|
|
41956
|
-
)
|
|
41957
|
-
}
|
|
41958
|
-
]
|
|
41959
|
-
}) : baseLineItem;
|
|
41961
|
+
if (!item.isTaxable || import_effect27.BigDecimal.equals(form.taxRate, BIG_DECIMAL_ZERO)) return baseLineItem;
|
|
41962
|
+
const itemTaxableSubtotal = computeTaxableSubtotal({ rawTaxableSubtotal: item.amount, discountRate: form.discountRate });
|
|
41963
|
+
const itemTaxes = computeTaxes({ taxableSubtotal: itemTaxableSubtotal, taxRate: form.taxRate });
|
|
41964
|
+
return __spreadProps(__spreadValues({}, baseLineItem), { salesTaxes: [{ amount: convertBigDecimalToCents(itemTaxes) }] });
|
|
41960
41965
|
})
|
|
41961
41966
|
}, !import_effect27.BigDecimal.equals(form.discountRate, BIG_DECIMAL_ZERO) && {
|
|
41962
41967
|
additionalDiscount: convertBigDecimalToCents(
|
|
41963
|
-
|
|
41968
|
+
computeAdditionalDiscount({ subtotal: computeSubtotal(form.lineItems), discountRate: form.discountRate })
|
|
41964
41969
|
)
|
|
41965
41970
|
});
|
|
41966
41971
|
};
|
|
@@ -42053,12 +42058,8 @@ var import_effect29 = require("effect");
|
|
|
42053
42058
|
|
|
42054
42059
|
// src/features/customers/components/CustomerSelector.tsx
|
|
42055
42060
|
var import_react243 = require("react");
|
|
42056
|
-
var
|
|
42061
|
+
var import_classnames92 = __toESM(require("classnames"));
|
|
42057
42062
|
var import_jsx_runtime352 = require("react/jsx-runtime");
|
|
42058
|
-
function getCustomerName2(customer) {
|
|
42059
|
-
var _a, _b, _c;
|
|
42060
|
-
return (_c = (_b = (_a = customer.individualName) != null ? _a : customer.companyName) != null ? _b : customer.externalId) != null ? _c : "Unknown Customer";
|
|
42061
|
-
}
|
|
42062
42063
|
var CustomerAsOption = class {
|
|
42063
42064
|
constructor(customer) {
|
|
42064
42065
|
__publicField(this, "internalCustomer");
|
|
@@ -42068,7 +42069,7 @@ var CustomerAsOption = class {
|
|
|
42068
42069
|
return this.internalCustomer;
|
|
42069
42070
|
}
|
|
42070
42071
|
get label() {
|
|
42071
|
-
return
|
|
42072
|
+
return getCustomerName(this.internalCustomer);
|
|
42072
42073
|
}
|
|
42073
42074
|
get id() {
|
|
42074
42075
|
return this.internalCustomer.id;
|
|
@@ -42085,7 +42086,7 @@ function CustomerSelector({
|
|
|
42085
42086
|
inline,
|
|
42086
42087
|
className
|
|
42087
42088
|
}) {
|
|
42088
|
-
const combinedClassName = (0,
|
|
42089
|
+
const combinedClassName = (0, import_classnames92.default)(
|
|
42089
42090
|
"Layer__CustomerSelector",
|
|
42090
42091
|
inline && "Layer__CustomerSelector--inline",
|
|
42091
42092
|
className
|
|
@@ -42127,7 +42128,7 @@ function CustomerSelector({
|
|
|
42127
42128
|
return null;
|
|
42128
42129
|
}
|
|
42129
42130
|
return {
|
|
42130
|
-
label:
|
|
42131
|
+
label: getCustomerName(selectedCustomer),
|
|
42131
42132
|
value: selectedCustomer.id
|
|
42132
42133
|
};
|
|
42133
42134
|
},
|
|
@@ -42180,7 +42181,7 @@ var INVOICE_FORM_CSS_PREFIX = "Layer__InvoiceForm";
|
|
|
42180
42181
|
var INVOICE_FORM_FIELD_CSS_PREFIX = `${INVOICE_FORM_CSS_PREFIX}__Field`;
|
|
42181
42182
|
var getDueAtChanged = (dueAt, previousDueAt) => dueAt === null && previousDueAt !== null || dueAt !== null && previousDueAt === null || dueAt !== null && previousDueAt !== null && (0, import_date5.toCalendarDate)(dueAt).compare((0, import_date5.toCalendarDate)(previousDueAt)) !== 0;
|
|
42182
42183
|
var InvoiceFormTotalRow = ({ label, value, children }) => {
|
|
42183
|
-
const className = (0,
|
|
42184
|
+
const className = (0, import_classnames93.default)(
|
|
42184
42185
|
`${INVOICE_FORM_CSS_PREFIX}__TotalRow`,
|
|
42185
42186
|
children && `${INVOICE_FORM_CSS_PREFIX}__TotalRow--withField`
|
|
42186
42187
|
);
|
|
@@ -42338,7 +42339,7 @@ var InvoiceForm = (0, import_react244.forwardRef)((props, ref) => {
|
|
|
42338
42339
|
{
|
|
42339
42340
|
gap: "xs",
|
|
42340
42341
|
align: "end",
|
|
42341
|
-
className: (0,
|
|
42342
|
+
className: (0, import_classnames93.default)(`${INVOICE_FORM_CSS_PREFIX}__LineItem`, isReadOnly && `${INVOICE_FORM_CSS_PREFIX}__LineItem--readonly`),
|
|
42342
42343
|
children: [
|
|
42343
42344
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(form.AppField, { name: `lineItems[${index}].product`, children: (innerField) => /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(innerField.FormTextField, { label: "Product/Service", showLabel: index === 0, isReadOnly }) }),
|
|
42344
42345
|
/* @__PURE__ */ (0, import_jsx_runtime353.jsx)(form.AppField, { name: `lineItems[${index}].description`, children: (innerField) => /* @__PURE__ */ (0, import_jsx_runtime353.jsx)(innerField.FormTextField, { label: "Description", showLabel: index === 0, isReadOnly }) }),
|
|
@@ -42666,7 +42667,7 @@ var useInvoicePaymentForm = (props) => {
|
|
|
42666
42667
|
|
|
42667
42668
|
// src/components/PaymentMethod/PaymentMethodComboBox.tsx
|
|
42668
42669
|
var import_react247 = require("react");
|
|
42669
|
-
var
|
|
42670
|
+
var import_classnames94 = __toESM(require("classnames"));
|
|
42670
42671
|
var import_jsx_runtime355 = require("react/jsx-runtime");
|
|
42671
42672
|
var PaymentMethodOptionConfig = {
|
|
42672
42673
|
["CASH" /* Cash */]: { label: "Cash", value: "CASH" /* Cash */ },
|
|
@@ -42677,7 +42678,7 @@ var PaymentMethodOptionConfig = {
|
|
|
42677
42678
|
};
|
|
42678
42679
|
var options2 = Object.values(PaymentMethodOptionConfig);
|
|
42679
42680
|
var PaymentMethodComboBox = ({ value, onValueChange, isReadOnly, className, inline }) => {
|
|
42680
|
-
const combinedClassName = (0,
|
|
42681
|
+
const combinedClassName = (0, import_classnames94.default)(
|
|
42681
42682
|
"Layer__PaymentMethodComboBox",
|
|
42682
42683
|
inline && "Layer__PaymentMethodComboBox--inline",
|
|
42683
42684
|
className
|
|
@@ -42736,7 +42737,7 @@ var InvoicePaymentForm = (props) => {
|
|
|
42736
42737
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(VStack, { className: `${INVOICE_PAYMENT_FORM_CSS_PREFIX}__Section`, gap: "sm", children: [
|
|
42737
42738
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(HStack, { className: `${INVOICE_PAYMENT_FORM_FIELD_CSS_PREFIX}__InvoiceNo`, gap: "xs", align: "center", children: [
|
|
42738
42739
|
/* @__PURE__ */ (0, import_jsx_runtime356.jsx)(Span, { size: "sm", children: "Invoice" }),
|
|
42739
|
-
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Span, { size: "md", weight: "bold", children: [
|
|
42740
|
+
/* @__PURE__ */ (0, import_jsx_runtime356.jsxs)(Span, { size: "md", weight: "bold", ellipsis: true, children: [
|
|
42740
42741
|
"#",
|
|
42741
42742
|
invoice.invoiceNumber
|
|
42742
42743
|
] })
|
|
@@ -43458,7 +43459,7 @@ var InvoiceRefundForm = (0, import_react257.forwardRef)(({ onSuccess, invoice },
|
|
|
43458
43459
|
/* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(VStack, { className: `${INVOICE_REFUND_FORM_CSS_PREFIX}__Section`, gap: "sm", children: [
|
|
43459
43460
|
/* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(HStack, { className: `${INVOICE_REFUND_FORM_FIELD_CSS_PREFIX}__InvoiceNo`, gap: "xs", align: "center", children: [
|
|
43460
43461
|
/* @__PURE__ */ (0, import_jsx_runtime360.jsx)(Span, { size: "sm", children: "Invoice" }),
|
|
43461
|
-
/* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(Span, { size: "md", weight: "bold", children: [
|
|
43462
|
+
/* @__PURE__ */ (0, import_jsx_runtime360.jsxs)(Span, { size: "md", weight: "bold", ellipsis: true, children: [
|
|
43462
43463
|
"#",
|
|
43463
43464
|
invoice.invoiceNumber
|
|
43464
43465
|
] })
|
|
@@ -43664,7 +43665,7 @@ var InvoiceDetail = () => {
|
|
|
43664
43665
|
}
|
|
43665
43666
|
}, [hasChanges, toInvoiceTable]);
|
|
43666
43667
|
return /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(import_jsx_runtime363.Fragment, { children: [
|
|
43667
|
-
/* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(BaseDetailView, { slots: { Header: Header5, BackIcon: hasChanges ? X_default : BackArrow_default }, name: "
|
|
43668
|
+
/* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(BaseDetailView, { slots: { Header: Header5, BackIcon: hasChanges ? X_default : BackArrow_default }, name: "InvoiceDetail", onGoBack, children: [
|
|
43668
43669
|
viewState.mode === "Update" /* Update */ && /* @__PURE__ */ (0, import_jsx_runtime363.jsx)(InvoiceDetailSubHeader, { invoice: viewState.invoice }),
|
|
43669
43670
|
/* @__PURE__ */ (0, import_jsx_runtime363.jsx)(
|
|
43670
43671
|
InvoiceForm,
|
|
@@ -43730,7 +43731,7 @@ var InvoiceDetailHeader = ({ onSubmit, formState, isReadOnly, setIsReadOnly, ope
|
|
|
43730
43731
|
const headingContent = isReadOnly ? invoiceNumber ? `Invoice #${invoiceNumber}` : "View Invoice" : invoiceNumber ? `Editing Invoice #${invoiceNumber}` : "Editing Invoice";
|
|
43731
43732
|
const canMarkAsPaid = viewState.mode === "Update" /* Update */ && (viewState.invoice.status === "SENT" /* Sent */ || viewState.invoice.status === "PARTIALLY_PAID" /* PartiallyPaid */);
|
|
43732
43733
|
return /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(HStack, { justify: "space-between", align: "center", fluid: true, pie: "md", children: [
|
|
43733
|
-
/* @__PURE__ */ (0, import_jsx_runtime363.jsx)(Heading2, { children: headingContent }),
|
|
43734
|
+
/* @__PURE__ */ (0, import_jsx_runtime363.jsx)(Heading2, { className: "Layer__InvoiceDetail__Heading", ellipsis: true, children: headingContent }),
|
|
43734
43735
|
isReadOnly ? /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(HStack, { gap: "xs", children: [
|
|
43735
43736
|
canMarkAsPaid && /* @__PURE__ */ (0, import_jsx_runtime363.jsxs)(Button2, { onPress: openInvoicePaymentDrawer, children: [
|
|
43736
43737
|
"Mark as paid",
|
|
@@ -43752,16 +43753,16 @@ var InvoiceDetailSubHeader = ({ invoice }) => {
|
|
|
43752
43753
|
// src/components/ui/Meter/Meter.tsx
|
|
43753
43754
|
var import_react261 = require("react");
|
|
43754
43755
|
var import_react_aria_components20 = require("react-aria-components");
|
|
43755
|
-
var
|
|
43756
|
+
var import_classnames95 = __toESM(require("classnames"));
|
|
43756
43757
|
var import_jsx_runtime364 = require("react/jsx-runtime");
|
|
43757
43758
|
var getClassnameForSubComponent = (className, suffix) => {
|
|
43758
|
-
return (0,
|
|
43759
|
+
return (0, import_classnames95.default)(`${METER_CLASS_NAME}__${suffix}`, className && `${className}__${suffix}`);
|
|
43759
43760
|
};
|
|
43760
43761
|
var METER_CLASS_NAME = "Layer__Meter";
|
|
43761
43762
|
var Meter = (0, import_react261.forwardRef)(
|
|
43762
43763
|
function Meter2(_a, ref) {
|
|
43763
43764
|
var _b = _a, { className, label, meterOnly } = _b, restProps = __objRest(_b, ["className", "label", "meterOnly"]);
|
|
43764
|
-
return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_react_aria_components20.Meter, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, restProps), { className: (0,
|
|
43765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime364.jsx)(import_react_aria_components20.Meter, __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, restProps), { className: (0, import_classnames95.default)(METER_CLASS_NAME, className), ref }), meterOnly && { "aria-label": label }), { children: ({ percentage, valueText }) => /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(VStack, { gap: "3xs", fluid: true, children: [
|
|
43765
43766
|
!meterOnly && /* @__PURE__ */ (0, import_jsx_runtime364.jsxs)(HStack, { justify: "space-between", children: [
|
|
43766
43767
|
/* @__PURE__ */ (0, import_jsx_runtime364.jsx)(Label, { slot: "label", children: label }),
|
|
43767
43768
|
/* @__PURE__ */ (0, import_jsx_runtime364.jsx)(Span, { slot: "value", children: valueText })
|