@layerfi/components 0.1.12 → 0.1.13
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/esm/index.js +377 -91
- package/dist/esm/index.js.map +4 -4
- package/dist/index.d.ts +19 -5
- package/dist/index.js +381 -95
- package/dist/index.js.map +4 -4
- package/dist/styles/index.css +3 -0
- package/dist/styles/index.css.map +2 -2
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -780,7 +780,6 @@ var debounce = (fnc, timeout = 300) => {
|
|
|
780
780
|
}, timeout);
|
|
781
781
|
};
|
|
782
782
|
};
|
|
783
|
-
var convertToStableName = (name) => name.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/gi, "").replace(/\W+/g, " ").split(/ |\B(?=[A-Z])/).map((word) => word.toLowerCase()).join("_");
|
|
784
783
|
|
|
785
784
|
// src/components/BankTransactionListItem/BankTransactionListItem.tsx
|
|
786
785
|
import React48, { useEffect as useEffect6, useRef as useRef11, useState as useState9 } from "react";
|
|
@@ -2210,6 +2209,7 @@ import React37 from "react";
|
|
|
2210
2209
|
import ReactSelect, {
|
|
2211
2210
|
components as components2
|
|
2212
2211
|
} from "react-select";
|
|
2212
|
+
import classNames14 from "classnames";
|
|
2213
2213
|
var DropdownIndicator2 = (props) => {
|
|
2214
2214
|
return /* @__PURE__ */ React37.createElement(components2.DropdownIndicator, { ...props }, /* @__PURE__ */ React37.createElement(ChevronDownFill_default, null));
|
|
2215
2215
|
};
|
|
@@ -2221,13 +2221,20 @@ var Select2 = ({
|
|
|
2221
2221
|
value,
|
|
2222
2222
|
onChange,
|
|
2223
2223
|
disabled,
|
|
2224
|
-
placeholder
|
|
2224
|
+
placeholder,
|
|
2225
|
+
isInvalid,
|
|
2226
|
+
errorMessage
|
|
2225
2227
|
}) => {
|
|
2226
|
-
|
|
2228
|
+
const baseClassName = classNames14(
|
|
2229
|
+
"Layer__select",
|
|
2230
|
+
isInvalid ? "Layer__select--error" : "",
|
|
2231
|
+
className
|
|
2232
|
+
);
|
|
2233
|
+
return /* @__PURE__ */ React37.createElement(Tooltip, { disabled: !isInvalid || !errorMessage }, /* @__PURE__ */ React37.createElement(TooltipTrigger, { className: "Layer__input-tooltip" }, /* @__PURE__ */ React37.createElement(
|
|
2227
2234
|
ReactSelect,
|
|
2228
2235
|
{
|
|
2229
2236
|
name,
|
|
2230
|
-
className:
|
|
2237
|
+
className: baseClassName,
|
|
2231
2238
|
classNamePrefix,
|
|
2232
2239
|
placeholder: placeholder ?? "Select...",
|
|
2233
2240
|
options,
|
|
@@ -2238,7 +2245,7 @@ var Select2 = ({
|
|
|
2238
2245
|
components: { DropdownIndicator: DropdownIndicator2 },
|
|
2239
2246
|
isDisabled: disabled
|
|
2240
2247
|
}
|
|
2241
|
-
);
|
|
2248
|
+
)), /* @__PURE__ */ React37.createElement(TooltipContent, { className: "Layer__tooltip" }, errorMessage));
|
|
2242
2249
|
};
|
|
2243
2250
|
|
|
2244
2251
|
// src/components/MatchForm/MatchForm.tsx
|
|
@@ -2268,7 +2275,7 @@ var MatchBadge = ({
|
|
|
2268
2275
|
};
|
|
2269
2276
|
|
|
2270
2277
|
// src/components/MatchForm/MatchForm.tsx
|
|
2271
|
-
import
|
|
2278
|
+
import classNames15 from "classnames";
|
|
2272
2279
|
import { parseISO as parseISO4, format as formatTime3 } from "date-fns";
|
|
2273
2280
|
var MatchForm = ({
|
|
2274
2281
|
classNamePrefix,
|
|
@@ -2287,7 +2294,7 @@ var MatchForm = ({
|
|
|
2287
2294
|
"div",
|
|
2288
2295
|
{
|
|
2289
2296
|
key: idx,
|
|
2290
|
-
className:
|
|
2297
|
+
className: classNames15(
|
|
2291
2298
|
`${classNamePrefix}__match-row`,
|
|
2292
2299
|
match.id === selectedMatchId ? `${classNamePrefix}__match-row--selected` : ""
|
|
2293
2300
|
),
|
|
@@ -2346,12 +2353,12 @@ var MatchForm = ({
|
|
|
2346
2353
|
|
|
2347
2354
|
// src/components/Textarea/Textarea.tsx
|
|
2348
2355
|
import React40 from "react";
|
|
2349
|
-
import
|
|
2356
|
+
import classNames16 from "classnames";
|
|
2350
2357
|
var Textarea = ({
|
|
2351
2358
|
className,
|
|
2352
2359
|
...props
|
|
2353
2360
|
}) => {
|
|
2354
|
-
const baseClassName =
|
|
2361
|
+
const baseClassName = classNames16("Layer__textarea", className);
|
|
2355
2362
|
return /* @__PURE__ */ React40.createElement("textarea", { ...props, className: baseClassName });
|
|
2356
2363
|
};
|
|
2357
2364
|
|
|
@@ -2360,7 +2367,7 @@ import React41, {
|
|
|
2360
2367
|
useEffect as useEffect2,
|
|
2361
2368
|
useState as useState5
|
|
2362
2369
|
} from "react";
|
|
2363
|
-
import
|
|
2370
|
+
import classNames17 from "classnames";
|
|
2364
2371
|
var Toggle = ({
|
|
2365
2372
|
name,
|
|
2366
2373
|
options,
|
|
@@ -2377,7 +2384,7 @@ var Toggle = ({
|
|
|
2377
2384
|
}
|
|
2378
2385
|
});
|
|
2379
2386
|
const selectedValue = selected || options[0].value;
|
|
2380
|
-
const baseClassName =
|
|
2387
|
+
const baseClassName = classNames17(
|
|
2381
2388
|
"Layer__toggle",
|
|
2382
2389
|
`Layer__toggle--${size}`,
|
|
2383
2390
|
initialized ? "Layer__toggle--initialized" : ""
|
|
@@ -2628,7 +2635,7 @@ var Notification = ({
|
|
|
2628
2635
|
};
|
|
2629
2636
|
|
|
2630
2637
|
// src/components/ExpandedBankTransactionRow/ExpandedBankTransactionRow.tsx
|
|
2631
|
-
import
|
|
2638
|
+
import classNames18 from "classnames";
|
|
2632
2639
|
var hasMatch = (bankTransaction) => {
|
|
2633
2640
|
return Boolean(
|
|
2634
2641
|
bankTransaction?.suggested_matches && bankTransaction?.suggested_matches?.length > 0 || bankTransaction?.match
|
|
@@ -2881,7 +2888,7 @@ var ExpandedBankTransactionRow = forwardRef2(
|
|
|
2881
2888
|
/* @__PURE__ */ React44.createElement("div", { className: `${className}__content-panels` }, /* @__PURE__ */ React44.createElement(
|
|
2882
2889
|
"div",
|
|
2883
2890
|
{
|
|
2884
|
-
className:
|
|
2891
|
+
className: classNames18(
|
|
2885
2892
|
`${className}__match`,
|
|
2886
2893
|
`${className}__content-panel`,
|
|
2887
2894
|
purpose === "match" /* match */ ? `${className}__content-panel--active` : ""
|
|
@@ -2903,7 +2910,7 @@ var ExpandedBankTransactionRow = forwardRef2(
|
|
|
2903
2910
|
), /* @__PURE__ */ React44.createElement(
|
|
2904
2911
|
"div",
|
|
2905
2912
|
{
|
|
2906
|
-
className:
|
|
2913
|
+
className: classNames18(
|
|
2907
2914
|
`${className}__splits`,
|
|
2908
2915
|
`${className}__content-panel`,
|
|
2909
2916
|
purpose === "categorize" /* categorize */ ? `${className}__content-panel--active` : ""
|
|
@@ -3042,7 +3049,7 @@ var SplitTooltipDetails = ({
|
|
|
3042
3049
|
};
|
|
3043
3050
|
|
|
3044
3051
|
// src/components/BankTransactionRow/BankTransactionRow.tsx
|
|
3045
|
-
import
|
|
3052
|
+
import classNames19 from "classnames";
|
|
3046
3053
|
import { parseISO as parseISO5, format as formatTime4 } from "date-fns";
|
|
3047
3054
|
var isCredit = ({ direction }) => direction === "CREDIT" /* CREDIT */;
|
|
3048
3055
|
var extractDescriptionForSplit = (category) => {
|
|
@@ -3141,7 +3148,7 @@ var BankTransactionRow = ({
|
|
|
3141
3148
|
}
|
|
3142
3149
|
const className = "Layer__bank-transaction-row";
|
|
3143
3150
|
const openClassName = open ? `${className}--expanded` : "";
|
|
3144
|
-
const rowClassName =
|
|
3151
|
+
const rowClassName = classNames19(
|
|
3145
3152
|
className,
|
|
3146
3153
|
bankTransaction.recently_categorized && editable ? "Layer__bank-transaction-row--removing" : "",
|
|
3147
3154
|
open ? openClassName : "",
|
|
@@ -3215,7 +3222,7 @@ var BankTransactionRow = ({
|
|
|
3215
3222
|
/* @__PURE__ */ React46.createElement(
|
|
3216
3223
|
"td",
|
|
3217
3224
|
{
|
|
3218
|
-
className:
|
|
3225
|
+
className: classNames19(
|
|
3219
3226
|
"Layer__table-cell",
|
|
3220
3227
|
"Layer__table-cell__category-col",
|
|
3221
3228
|
`${className}__actions-cell`,
|
|
@@ -3370,7 +3377,7 @@ var Assignment = ({ bankTransaction }) => {
|
|
|
3370
3377
|
};
|
|
3371
3378
|
|
|
3372
3379
|
// src/components/BankTransactionListItem/BankTransactionListItem.tsx
|
|
3373
|
-
import
|
|
3380
|
+
import classNames20 from "classnames";
|
|
3374
3381
|
import { parseISO as parseISO7, format as formatTime6 } from "date-fns";
|
|
3375
3382
|
var isCredit2 = ({ direction }) => direction === "CREDIT" /* CREDIT */;
|
|
3376
3383
|
var BankTransactionListItem = ({
|
|
@@ -3429,7 +3436,7 @@ var BankTransactionListItem = ({
|
|
|
3429
3436
|
}
|
|
3430
3437
|
const className = "Layer__bank-transaction-list-item";
|
|
3431
3438
|
const openClassName = open ? `${className}--expanded` : "";
|
|
3432
|
-
const rowClassName =
|
|
3439
|
+
const rowClassName = classNames20(
|
|
3433
3440
|
className,
|
|
3434
3441
|
bankTransaction.recently_categorized ? "Layer__bank-transaction-row--removing" : "",
|
|
3435
3442
|
open ? openClassName : "",
|
|
@@ -3736,10 +3743,10 @@ var hslToHex = (hsl) => {
|
|
|
3736
3743
|
};
|
|
3737
3744
|
|
|
3738
3745
|
// src/components/Container/Container.tsx
|
|
3739
|
-
import
|
|
3746
|
+
import classNames21 from "classnames";
|
|
3740
3747
|
var Container = forwardRef3(
|
|
3741
3748
|
({ name, className, children, asWidget, elevated = false }, ref) => {
|
|
3742
|
-
const baseClassName =
|
|
3749
|
+
const baseClassName = classNames21(
|
|
3743
3750
|
"Layer__component Layer__component-container",
|
|
3744
3751
|
`Layer__${name}`,
|
|
3745
3752
|
elevated && "Layer__component--elevated",
|
|
@@ -3754,10 +3761,10 @@ var Container = forwardRef3(
|
|
|
3754
3761
|
|
|
3755
3762
|
// src/components/Container/Header.tsx
|
|
3756
3763
|
import React50, { forwardRef as forwardRef4 } from "react";
|
|
3757
|
-
import
|
|
3764
|
+
import classNames22 from "classnames";
|
|
3758
3765
|
var Header = forwardRef4(
|
|
3759
3766
|
({ className, children, style }, ref) => {
|
|
3760
|
-
const baseClassName =
|
|
3767
|
+
const baseClassName = classNames22("Layer__component-header", className);
|
|
3761
3768
|
return /* @__PURE__ */ React50.createElement("header", { ref, className: baseClassName, style }, children);
|
|
3762
3769
|
}
|
|
3763
3770
|
);
|
|
@@ -4467,7 +4474,7 @@ var MoreVertical_default = MoreVertical;
|
|
|
4467
4474
|
|
|
4468
4475
|
// src/components/HoverMenu/HoverMenu.tsx
|
|
4469
4476
|
import React60, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
|
|
4470
|
-
import
|
|
4477
|
+
import classNames23 from "classnames";
|
|
4471
4478
|
var HoverMenu = ({
|
|
4472
4479
|
children,
|
|
4473
4480
|
config,
|
|
@@ -4476,7 +4483,7 @@ var HoverMenu = ({
|
|
|
4476
4483
|
}) => {
|
|
4477
4484
|
const [openMenu, setOpenMenu] = useState12(false);
|
|
4478
4485
|
const hoverMenuRef = useRef12(null);
|
|
4479
|
-
const hoverMenuClassName =
|
|
4486
|
+
const hoverMenuClassName = classNames23(
|
|
4480
4487
|
"Layer__hover-menu",
|
|
4481
4488
|
openMenu && "Layer__hover-menu--open"
|
|
4482
4489
|
);
|
|
@@ -4839,13 +4846,13 @@ var InstitutionIcon = ({ size = 18, ...props }) => /* @__PURE__ */ React62.creat
|
|
|
4839
4846
|
var InstitutionIcon_default = InstitutionIcon;
|
|
4840
4847
|
|
|
4841
4848
|
// src/components/LinkedAccountThumb/LinkedAccountThumb.tsx
|
|
4842
|
-
import
|
|
4849
|
+
import classNames24 from "classnames";
|
|
4843
4850
|
var AccountNumber = ({ accountNumber }) => /* @__PURE__ */ React63.createElement("div", { className: "account-number" }, /* @__PURE__ */ React63.createElement(Text, { size: "sm" }, "\u2022\u2022\u2022 ", accountNumber));
|
|
4844
4851
|
var LinkedAccountThumb = ({
|
|
4845
4852
|
account,
|
|
4846
4853
|
asWidget
|
|
4847
4854
|
}) => {
|
|
4848
|
-
const linkedAccountThumbClassName =
|
|
4855
|
+
const linkedAccountThumbClassName = classNames24(
|
|
4849
4856
|
"Layer__linked-account-thumb",
|
|
4850
4857
|
asWidget && "--as-widget"
|
|
4851
4858
|
);
|
|
@@ -4890,7 +4897,7 @@ var LinkedAccountThumb = ({
|
|
|
4890
4897
|
};
|
|
4891
4898
|
|
|
4892
4899
|
// src/components/LinkedAccounts/LinkedAccounts.tsx
|
|
4893
|
-
import
|
|
4900
|
+
import classNames25 from "classnames";
|
|
4894
4901
|
var COMPONENT_NAME2 = "linked-accounts";
|
|
4895
4902
|
var LinkedAccounts = ({ asWidget, elevated }) => {
|
|
4896
4903
|
const {
|
|
@@ -4907,7 +4914,7 @@ var LinkedAccounts = ({ asWidget, elevated }) => {
|
|
|
4907
4914
|
{ name: "Renew link", action: renewLinkAccount },
|
|
4908
4915
|
{ name: "Unlink", action: unlinkAccount }
|
|
4909
4916
|
];
|
|
4910
|
-
const linkedAccountsNewAccountClassName =
|
|
4917
|
+
const linkedAccountsNewAccountClassName = classNames25(
|
|
4911
4918
|
"Layer__linked-accounts__new-account",
|
|
4912
4919
|
asWidget && "--as-widget"
|
|
4913
4920
|
);
|
|
@@ -6084,7 +6091,7 @@ var SortArrows = ({ size = 13, ...props }) => /* @__PURE__ */ React70.createElem
|
|
|
6084
6091
|
var SortArrows_default = SortArrows;
|
|
6085
6092
|
|
|
6086
6093
|
// src/components/ProfitAndLossDetailedCharts/DetailedTable.tsx
|
|
6087
|
-
import
|
|
6094
|
+
import classNames26 from "classnames";
|
|
6088
6095
|
var DetailedTable = ({
|
|
6089
6096
|
filteredData,
|
|
6090
6097
|
sidebarScope,
|
|
@@ -6094,7 +6101,7 @@ var DetailedTable = ({
|
|
|
6094
6101
|
setHoveredItem
|
|
6095
6102
|
}) => {
|
|
6096
6103
|
const buildColClass = (column) => {
|
|
6097
|
-
return
|
|
6104
|
+
return classNames26(
|
|
6098
6105
|
"Layer__sortable-col",
|
|
6099
6106
|
sidebarScope && filters[sidebarScope]?.sortBy === column ? `sort--${(sidebarScope && filters[sidebarScope]?.sortDirection) ?? "desc"}` : ""
|
|
6100
6107
|
);
|
|
@@ -6129,7 +6136,7 @@ var DetailedTable = ({
|
|
|
6129
6136
|
"tr",
|
|
6130
6137
|
{
|
|
6131
6138
|
key: `pl-side-table-item-${idx}`,
|
|
6132
|
-
className:
|
|
6139
|
+
className: classNames26(
|
|
6133
6140
|
"Layer__profit-and-loss-detailed-table__row",
|
|
6134
6141
|
hoveredItem && hoveredItem === item.display_name ? "active" : ""
|
|
6135
6142
|
),
|
|
@@ -6260,13 +6267,13 @@ import React76, { useContext as useContext5, useMemo as useMemo6 } from "react";
|
|
|
6260
6267
|
|
|
6261
6268
|
// src/components/SkeletonLoader/SkeletonLoader.tsx
|
|
6262
6269
|
import React74 from "react";
|
|
6263
|
-
import
|
|
6270
|
+
import classNames27 from "classnames";
|
|
6264
6271
|
var SkeletonLoader = ({
|
|
6265
6272
|
height,
|
|
6266
6273
|
width,
|
|
6267
6274
|
className
|
|
6268
6275
|
}) => {
|
|
6269
|
-
const baseClassName =
|
|
6276
|
+
const baseClassName = classNames27(
|
|
6270
6277
|
"Layer__skeleton-loader Layer__anim--skeleton-loading",
|
|
6271
6278
|
className
|
|
6272
6279
|
);
|
|
@@ -6310,7 +6317,7 @@ var MiniChart = ({ data }) => {
|
|
|
6310
6317
|
};
|
|
6311
6318
|
|
|
6312
6319
|
// src/components/ProfitAndLossSummaries/ProfitAndLossSummaries.tsx
|
|
6313
|
-
import
|
|
6320
|
+
import classNames28 from "classnames";
|
|
6314
6321
|
var CHART_PLACEHOLDER = [
|
|
6315
6322
|
{
|
|
6316
6323
|
name: "placeholder",
|
|
@@ -6366,7 +6373,7 @@ var ProfitAndLossSummaries = ({
|
|
|
6366
6373
|
/* @__PURE__ */ React76.createElement(
|
|
6367
6374
|
"div",
|
|
6368
6375
|
{
|
|
6369
|
-
className:
|
|
6376
|
+
className: classNames28(
|
|
6370
6377
|
"Layer__profit-and-loss-summaries__summary",
|
|
6371
6378
|
actionable && "Layer__actionable",
|
|
6372
6379
|
"Layer__profit-and-loss-summaries__summary--income",
|
|
@@ -6388,7 +6395,7 @@ var ProfitAndLossSummaries = ({
|
|
|
6388
6395
|
/* @__PURE__ */ React76.createElement(
|
|
6389
6396
|
"div",
|
|
6390
6397
|
{
|
|
6391
|
-
className:
|
|
6398
|
+
className: classNames28(
|
|
6392
6399
|
"Layer__profit-and-loss-summaries__summary",
|
|
6393
6400
|
actionable && "Layer__actionable",
|
|
6394
6401
|
"Layer__profit-and-loss-summaries__summary--expenses",
|
|
@@ -6412,7 +6419,7 @@ var ProfitAndLossSummaries = ({
|
|
|
6412
6419
|
/* @__PURE__ */ React76.createElement(
|
|
6413
6420
|
"div",
|
|
6414
6421
|
{
|
|
6415
|
-
className:
|
|
6422
|
+
className: classNames28(
|
|
6416
6423
|
"Layer__profit-and-loss-summaries__summary net-profit Layer__profit-and-loss-summaries__summary--net-profit",
|
|
6417
6424
|
actionable && "Layer__actionable"
|
|
6418
6425
|
)
|
|
@@ -6603,7 +6610,7 @@ var empty_profit_and_loss_report_default = {
|
|
|
6603
6610
|
};
|
|
6604
6611
|
|
|
6605
6612
|
// src/components/ProfitAndLossTable/ProfitAndLossTable.tsx
|
|
6606
|
-
import
|
|
6613
|
+
import classNames29 from "classnames";
|
|
6607
6614
|
var ProfitAndLossTable = ({ lockExpanded, asContainer }) => {
|
|
6608
6615
|
const {
|
|
6609
6616
|
data: actualData,
|
|
@@ -6615,7 +6622,7 @@ var ProfitAndLossTable = ({ lockExpanded, asContainer }) => {
|
|
|
6615
6622
|
return /* @__PURE__ */ React79.createElement(
|
|
6616
6623
|
"div",
|
|
6617
6624
|
{
|
|
6618
|
-
className:
|
|
6625
|
+
className: classNames29(
|
|
6619
6626
|
"Layer__profit-and-loss-table__loader-container",
|
|
6620
6627
|
asContainer && "Layer__component-container"
|
|
6621
6628
|
)
|
|
@@ -6626,7 +6633,7 @@ var ProfitAndLossTable = ({ lockExpanded, asContainer }) => {
|
|
|
6626
6633
|
return /* @__PURE__ */ React79.createElement(React79.Fragment, null, /* @__PURE__ */ React79.createElement(
|
|
6627
6634
|
"div",
|
|
6628
6635
|
{
|
|
6629
|
-
className:
|
|
6636
|
+
className: classNames29(
|
|
6630
6637
|
"Layer__profit-and-loss-table Layer__profit-and-loss-table--main",
|
|
6631
6638
|
asContainer && "Layer__component-container"
|
|
6632
6639
|
)
|
|
@@ -6780,7 +6787,7 @@ import React82, { useContext as useContext7, useRef as useRef14 } from "react";
|
|
|
6780
6787
|
|
|
6781
6788
|
// src/components/Panel/Panel.tsx
|
|
6782
6789
|
import React81, { useEffect as useEffect12, useState as useState18 } from "react";
|
|
6783
|
-
import
|
|
6790
|
+
import classNames30 from "classnames";
|
|
6784
6791
|
var Panel = ({
|
|
6785
6792
|
children,
|
|
6786
6793
|
className,
|
|
@@ -6798,7 +6805,7 @@ var Panel = ({
|
|
|
6798
6805
|
return /* @__PURE__ */ React81.createElement(
|
|
6799
6806
|
"div",
|
|
6800
6807
|
{
|
|
6801
|
-
className:
|
|
6808
|
+
className: classNames30(
|
|
6802
6809
|
"Layer__panel",
|
|
6803
6810
|
className,
|
|
6804
6811
|
sidebarIsOpen && "Layer__panel--open"
|
|
@@ -6880,6 +6887,209 @@ import React96, { createContext as createContext3, useContext as useContext14, u
|
|
|
6880
6887
|
|
|
6881
6888
|
// src/hooks/useChartOfAccounts/useChartOfAccounts.tsx
|
|
6882
6889
|
import { useState as useState19 } from "react";
|
|
6890
|
+
|
|
6891
|
+
// src/components/ChartOfAccountsForm/constants.ts
|
|
6892
|
+
var LEDGER_ACCOUNT_TYPES = [
|
|
6893
|
+
{
|
|
6894
|
+
value: "ASSET",
|
|
6895
|
+
label: "Assets"
|
|
6896
|
+
},
|
|
6897
|
+
{
|
|
6898
|
+
value: "LIABILITY",
|
|
6899
|
+
label: "Liabilities"
|
|
6900
|
+
},
|
|
6901
|
+
{
|
|
6902
|
+
value: "EQUITY",
|
|
6903
|
+
label: "Equities"
|
|
6904
|
+
},
|
|
6905
|
+
{
|
|
6906
|
+
value: "REVENUE",
|
|
6907
|
+
label: "Revenue"
|
|
6908
|
+
},
|
|
6909
|
+
{
|
|
6910
|
+
value: "EXPENSE",
|
|
6911
|
+
label: "Expenses"
|
|
6912
|
+
}
|
|
6913
|
+
];
|
|
6914
|
+
var DEFAULT_ACCOUNT_TYPE_DIRECTION = {
|
|
6915
|
+
ASSET: "DEBIT" /* DEBIT */,
|
|
6916
|
+
LIABILITY: "CREDIT" /* CREDIT */,
|
|
6917
|
+
EQUITY: "CREDIT" /* CREDIT */,
|
|
6918
|
+
REVENUE: "CREDIT" /* CREDIT */,
|
|
6919
|
+
EXPENSE: "DEBIT" /* DEBIT */
|
|
6920
|
+
};
|
|
6921
|
+
var NORMALITY_OPTIONS = [
|
|
6922
|
+
{
|
|
6923
|
+
value: "DEBIT" /* DEBIT */,
|
|
6924
|
+
label: "Debit"
|
|
6925
|
+
},
|
|
6926
|
+
{
|
|
6927
|
+
value: "CREDIT" /* CREDIT */,
|
|
6928
|
+
label: "Credit"
|
|
6929
|
+
}
|
|
6930
|
+
];
|
|
6931
|
+
var ASSET_LEDGER_ACCOUNT_SUBTYPES = [
|
|
6932
|
+
{
|
|
6933
|
+
value: "BANK_ACCOUNTS",
|
|
6934
|
+
label: "Bank Accounts"
|
|
6935
|
+
},
|
|
6936
|
+
{
|
|
6937
|
+
value: "ACCOUNTS_RECEIVABLE",
|
|
6938
|
+
label: "Accounts Receivable"
|
|
6939
|
+
},
|
|
6940
|
+
{
|
|
6941
|
+
value: "INVENTORY",
|
|
6942
|
+
label: "Inventory"
|
|
6943
|
+
},
|
|
6944
|
+
{
|
|
6945
|
+
value: "PAYMENT_PROCESSOR_CLEARING_ACCOUNT",
|
|
6946
|
+
label: "Payment Processor Clearing Accounts"
|
|
6947
|
+
},
|
|
6948
|
+
{
|
|
6949
|
+
value: "FIXED_ASSET",
|
|
6950
|
+
label: "Fixed Assets"
|
|
6951
|
+
},
|
|
6952
|
+
{
|
|
6953
|
+
value: "CASH",
|
|
6954
|
+
label: "Cash"
|
|
6955
|
+
},
|
|
6956
|
+
{
|
|
6957
|
+
value: "UNDEPOSITED_FUNDS",
|
|
6958
|
+
label: "Undeposited Funds"
|
|
6959
|
+
}
|
|
6960
|
+
];
|
|
6961
|
+
var LIABILITY_LEDGER_ACCOUNT_SUBTYPES = [
|
|
6962
|
+
{
|
|
6963
|
+
value: "LIABILITY",
|
|
6964
|
+
label: "Liabilities"
|
|
6965
|
+
},
|
|
6966
|
+
{
|
|
6967
|
+
value: "ACCOUNTS_PAYABLE",
|
|
6968
|
+
label: "Accounts Payable"
|
|
6969
|
+
},
|
|
6970
|
+
{
|
|
6971
|
+
value: "CREDIT_CARD",
|
|
6972
|
+
label: "Credit Cards"
|
|
6973
|
+
},
|
|
6974
|
+
{
|
|
6975
|
+
value: "SHAREHOLDER_LOAN",
|
|
6976
|
+
label: "Shareholder Loans"
|
|
6977
|
+
},
|
|
6978
|
+
{
|
|
6979
|
+
value: "PAYROLL_LIABILITY",
|
|
6980
|
+
label: "Payroll Liabilities"
|
|
6981
|
+
},
|
|
6982
|
+
{
|
|
6983
|
+
value: "SALES_TAXES_PAYABLE",
|
|
6984
|
+
label: "Sales Taxes Payable"
|
|
6985
|
+
},
|
|
6986
|
+
{
|
|
6987
|
+
value: "LINE_OF_CREDIT",
|
|
6988
|
+
label: "Lines of Credit"
|
|
6989
|
+
},
|
|
6990
|
+
{
|
|
6991
|
+
value: "NOTES_PAYABLE",
|
|
6992
|
+
label: "Notes Payable"
|
|
6993
|
+
},
|
|
6994
|
+
{
|
|
6995
|
+
value: "TIPS",
|
|
6996
|
+
label: "Tips"
|
|
6997
|
+
},
|
|
6998
|
+
{
|
|
6999
|
+
value: "UNEARNED_REVENUE",
|
|
7000
|
+
label: "Unearned Revenue"
|
|
7001
|
+
},
|
|
7002
|
+
{
|
|
7003
|
+
value: "UNDEPOSITED_OUTFLOWS",
|
|
7004
|
+
label: "Undeposited Outflows"
|
|
7005
|
+
}
|
|
7006
|
+
];
|
|
7007
|
+
var EQUITY_LEDGER_ACCOUNT_SUBTYPES = [
|
|
7008
|
+
{
|
|
7009
|
+
value: "CONTRIBUTIONS",
|
|
7010
|
+
label: "Contributions"
|
|
7011
|
+
},
|
|
7012
|
+
{
|
|
7013
|
+
value: "DISTRIBUTIONS",
|
|
7014
|
+
label: "Distributions"
|
|
7015
|
+
},
|
|
7016
|
+
{
|
|
7017
|
+
value: "COMMON_STOCK",
|
|
7018
|
+
label: "Common Stock"
|
|
7019
|
+
},
|
|
7020
|
+
{
|
|
7021
|
+
value: "ADDITIONAL_PAID_IN_CAPITAL",
|
|
7022
|
+
label: "Additional Paid In Capital"
|
|
7023
|
+
},
|
|
7024
|
+
{
|
|
7025
|
+
value: "RETAINED_EARNINGS",
|
|
7026
|
+
label: "Retained Earnings"
|
|
7027
|
+
},
|
|
7028
|
+
{
|
|
7029
|
+
value: "ACCUMULATED_ADJUSTMENTS",
|
|
7030
|
+
label: "Accumulated Adjustments"
|
|
7031
|
+
},
|
|
7032
|
+
{
|
|
7033
|
+
value: "OPENING_BALANCE_EQUITY",
|
|
7034
|
+
label: "Opening Balance Equity"
|
|
7035
|
+
}
|
|
7036
|
+
];
|
|
7037
|
+
var REVENUE_LEDGER_ACCOUNT_SUBTYPES = [
|
|
7038
|
+
{
|
|
7039
|
+
value: "SALES",
|
|
7040
|
+
label: "Sales"
|
|
7041
|
+
},
|
|
7042
|
+
{
|
|
7043
|
+
value: "UNCATEGORIZED_REVENUE",
|
|
7044
|
+
label: "Uncategorized Revenue"
|
|
7045
|
+
},
|
|
7046
|
+
{
|
|
7047
|
+
value: "RETURNS_ALLOWANCES",
|
|
7048
|
+
label: "Returns & Allowances"
|
|
7049
|
+
}
|
|
7050
|
+
];
|
|
7051
|
+
var EXPENSE_LEDGER_ACCOUNT_SUBTYPES = [
|
|
7052
|
+
{
|
|
7053
|
+
value: "COGS",
|
|
7054
|
+
label: "COGS"
|
|
7055
|
+
},
|
|
7056
|
+
{
|
|
7057
|
+
value: "OPERATING_EXPENSES",
|
|
7058
|
+
label: "Operating Expenses"
|
|
7059
|
+
},
|
|
7060
|
+
{
|
|
7061
|
+
value: "PAYROLL",
|
|
7062
|
+
label: "Payroll"
|
|
7063
|
+
},
|
|
7064
|
+
{
|
|
7065
|
+
value: "TAXES_LICENSES",
|
|
7066
|
+
label: "Taxes & Licenses"
|
|
7067
|
+
},
|
|
7068
|
+
{
|
|
7069
|
+
value: "BAD_DEBT",
|
|
7070
|
+
label: "Bad Debt"
|
|
7071
|
+
},
|
|
7072
|
+
{
|
|
7073
|
+
value: "CHARITABLE_CONTRIBUTIONS",
|
|
7074
|
+
label: "Charitable Contributions"
|
|
7075
|
+
}
|
|
7076
|
+
];
|
|
7077
|
+
var LEDGER_ACCOUNT_SUBTYPES = [
|
|
7078
|
+
...ASSET_LEDGER_ACCOUNT_SUBTYPES,
|
|
7079
|
+
...LIABILITY_LEDGER_ACCOUNT_SUBTYPES,
|
|
7080
|
+
...EQUITY_LEDGER_ACCOUNT_SUBTYPES,
|
|
7081
|
+
...REVENUE_LEDGER_ACCOUNT_SUBTYPES,
|
|
7082
|
+
...EXPENSE_LEDGER_ACCOUNT_SUBTYPES
|
|
7083
|
+
];
|
|
7084
|
+
var LEDGER_ACCOUNT_SUBTYPES_FOR_TYPE = {
|
|
7085
|
+
ASSET: ASSET_LEDGER_ACCOUNT_SUBTYPES,
|
|
7086
|
+
LIABILITY: LIABILITY_LEDGER_ACCOUNT_SUBTYPES,
|
|
7087
|
+
EQUITY: EQUITY_LEDGER_ACCOUNT_SUBTYPES,
|
|
7088
|
+
REVENUE: REVENUE_LEDGER_ACCOUNT_SUBTYPES,
|
|
7089
|
+
EXPENSE: EXPENSE_LEDGER_ACCOUNT_SUBTYPES
|
|
7090
|
+
};
|
|
7091
|
+
|
|
7092
|
+
// src/hooks/useChartOfAccounts/useChartOfAccounts.tsx
|
|
6883
7093
|
import useSWR6 from "swr";
|
|
6884
7094
|
var validate = (formData) => {
|
|
6885
7095
|
const errors = [];
|
|
@@ -6887,6 +7097,14 @@ var validate = (formData) => {
|
|
|
6887
7097
|
if (nameError) {
|
|
6888
7098
|
errors.push(nameError);
|
|
6889
7099
|
}
|
|
7100
|
+
const normalityError = validateNormality(formData);
|
|
7101
|
+
if (normalityError) {
|
|
7102
|
+
errors.push(normalityError);
|
|
7103
|
+
}
|
|
7104
|
+
const typeError = validateType(formData);
|
|
7105
|
+
if (typeError) {
|
|
7106
|
+
errors.push(typeError);
|
|
7107
|
+
}
|
|
6890
7108
|
return errors;
|
|
6891
7109
|
};
|
|
6892
7110
|
var revalidateField = (fieldName, formData) => {
|
|
@@ -6898,10 +7116,48 @@ var revalidateField = (fieldName, formData) => {
|
|
|
6898
7116
|
}
|
|
6899
7117
|
return (formData?.errors || []).filter((x) => x.field !== fieldName);
|
|
6900
7118
|
}
|
|
7119
|
+
case "normality": {
|
|
7120
|
+
const normalityError = validateNormality(formData);
|
|
7121
|
+
if (normalityError) {
|
|
7122
|
+
return (formData?.errors || []).filter((x) => x.field !== fieldName).concat([normalityError]);
|
|
7123
|
+
}
|
|
7124
|
+
return (formData?.errors || []).filter((x) => x.field !== fieldName);
|
|
7125
|
+
}
|
|
7126
|
+
case "type": {
|
|
7127
|
+
const typeError = validateType(formData);
|
|
7128
|
+
if (typeError) {
|
|
7129
|
+
return (formData?.errors || []).filter((x) => x.field !== fieldName).concat([typeError]);
|
|
7130
|
+
}
|
|
7131
|
+
return (formData?.errors || []).filter((x) => x.field !== fieldName);
|
|
7132
|
+
}
|
|
6901
7133
|
default:
|
|
6902
7134
|
return formData?.errors;
|
|
6903
7135
|
}
|
|
6904
7136
|
};
|
|
7137
|
+
var validateType = (formData) => {
|
|
7138
|
+
if (!formData?.data.type?.value) {
|
|
7139
|
+
return {
|
|
7140
|
+
field: "type",
|
|
7141
|
+
message: "Must be selected"
|
|
7142
|
+
};
|
|
7143
|
+
}
|
|
7144
|
+
return;
|
|
7145
|
+
};
|
|
7146
|
+
var validateNormality = (formData) => {
|
|
7147
|
+
const stringValueNormality = formData?.data.normality?.value?.toString();
|
|
7148
|
+
if (stringValueNormality === void 0) {
|
|
7149
|
+
return {
|
|
7150
|
+
field: "normality",
|
|
7151
|
+
message: "Must be selected"
|
|
7152
|
+
};
|
|
7153
|
+
} else if (!["DEBIT", "CREDIT"].includes(stringValueNormality)) {
|
|
7154
|
+
return {
|
|
7155
|
+
field: "normality",
|
|
7156
|
+
message: "Must be selected"
|
|
7157
|
+
};
|
|
7158
|
+
}
|
|
7159
|
+
return;
|
|
7160
|
+
};
|
|
6905
7161
|
var validateName = (formData) => {
|
|
6906
7162
|
if (!formData?.data.name?.trim()) {
|
|
6907
7163
|
return {
|
|
@@ -6942,14 +7198,8 @@ var useChartOfAccounts = () => {
|
|
|
6942
7198
|
const update = async (accountData, accountId) => {
|
|
6943
7199
|
setSendingForm(true);
|
|
6944
7200
|
setApiError(void 0);
|
|
6945
|
-
const stable_name = convertToStableName(accountData.name);
|
|
6946
7201
|
const newAccountData = {
|
|
6947
|
-
...accountData
|
|
6948
|
-
stable_name,
|
|
6949
|
-
pnl_category: "INCOME",
|
|
6950
|
-
//this field will be deprecated soon, but is still required
|
|
6951
|
-
always_show_in_pnl: false
|
|
6952
|
-
//this field will be deprecated soon, but is still required
|
|
7202
|
+
...accountData
|
|
6953
7203
|
};
|
|
6954
7204
|
try {
|
|
6955
7205
|
await Layer.updateAccount(apiUrl, auth?.access_token, {
|
|
@@ -6978,13 +7228,14 @@ var useChartOfAccounts = () => {
|
|
|
6978
7228
|
}
|
|
6979
7229
|
const data2 = {
|
|
6980
7230
|
name: form.data.name ?? "",
|
|
6981
|
-
|
|
7231
|
+
stable_name: form.data.stable_name,
|
|
6982
7232
|
parent_id: form.data.parent ? {
|
|
6983
7233
|
type: "AccountId",
|
|
6984
7234
|
id: form.data.parent.value
|
|
6985
7235
|
} : void 0,
|
|
6986
7236
|
account_type: form.data.type.value.toString(),
|
|
6987
|
-
account_subtype: form.data.subType?.value.toString()
|
|
7237
|
+
account_subtype: form.data.subType?.value.toString(),
|
|
7238
|
+
normality: form.data.normality?.value
|
|
6988
7239
|
};
|
|
6989
7240
|
if (form.action === "new") {
|
|
6990
7241
|
create(data2);
|
|
@@ -7001,10 +7252,8 @@ var useChartOfAccounts = () => {
|
|
|
7001
7252
|
data: {
|
|
7002
7253
|
parent: void 0,
|
|
7003
7254
|
name: void 0,
|
|
7004
|
-
type:
|
|
7005
|
-
|
|
7006
|
-
label: "Assets"
|
|
7007
|
-
},
|
|
7255
|
+
type: void 0,
|
|
7256
|
+
normality: void 0,
|
|
7008
7257
|
subType: void 0
|
|
7009
7258
|
}
|
|
7010
7259
|
});
|
|
@@ -7025,12 +7274,19 @@ var useChartOfAccounts = () => {
|
|
|
7025
7274
|
value: parent.id,
|
|
7026
7275
|
label: parent.name
|
|
7027
7276
|
} : void 0,
|
|
7277
|
+
stable_name: found.stable_name,
|
|
7028
7278
|
name: found.name,
|
|
7029
7279
|
type: {
|
|
7030
|
-
value:
|
|
7031
|
-
label:
|
|
7280
|
+
value: found.account_type.value,
|
|
7281
|
+
label: found.account_type.display_name
|
|
7032
7282
|
},
|
|
7033
|
-
subType:
|
|
7283
|
+
subType: found.account_subtype ? {
|
|
7284
|
+
value: found.account_subtype?.value,
|
|
7285
|
+
label: found.account_subtype?.display_name
|
|
7286
|
+
} : void 0,
|
|
7287
|
+
normality: NORMALITY_OPTIONS.find(
|
|
7288
|
+
(normalityOption) => normalityOption.value == found.normality
|
|
7289
|
+
)
|
|
7034
7290
|
}
|
|
7035
7291
|
});
|
|
7036
7292
|
};
|
|
@@ -7039,13 +7295,41 @@ var useChartOfAccounts = () => {
|
|
|
7039
7295
|
if (!form) {
|
|
7040
7296
|
return;
|
|
7041
7297
|
}
|
|
7042
|
-
|
|
7298
|
+
let newFormData = {
|
|
7043
7299
|
...form,
|
|
7044
7300
|
data: {
|
|
7045
7301
|
...form.data,
|
|
7046
7302
|
[fieldName]: value
|
|
7047
7303
|
}
|
|
7048
7304
|
};
|
|
7305
|
+
if (fieldName === "parent") {
|
|
7306
|
+
const allAccounts = flattenAccounts(data?.data?.accounts || []);
|
|
7307
|
+
const foundParent = allAccounts?.find(
|
|
7308
|
+
(x) => x.id === value.value
|
|
7309
|
+
);
|
|
7310
|
+
if (foundParent) {
|
|
7311
|
+
newFormData = {
|
|
7312
|
+
...newFormData,
|
|
7313
|
+
data: {
|
|
7314
|
+
...newFormData.data,
|
|
7315
|
+
/* Inherit the parent's type */
|
|
7316
|
+
type: {
|
|
7317
|
+
value: foundParent.account_type.value,
|
|
7318
|
+
label: foundParent.account_type.display_name
|
|
7319
|
+
},
|
|
7320
|
+
/* If the parent has a subtype, inherit it */
|
|
7321
|
+
subType: foundParent.account_subtype ? {
|
|
7322
|
+
value: foundParent.account_subtype?.value,
|
|
7323
|
+
label: foundParent.account_subtype?.display_name
|
|
7324
|
+
} : void 0,
|
|
7325
|
+
/* Inherit the parent's normality */
|
|
7326
|
+
normality: NORMALITY_OPTIONS.find(
|
|
7327
|
+
(normalityOption) => normalityOption.value == foundParent.normality
|
|
7328
|
+
)
|
|
7329
|
+
}
|
|
7330
|
+
};
|
|
7331
|
+
}
|
|
7332
|
+
}
|
|
7049
7333
|
const errors = revalidateField(fieldName, newFormData);
|
|
7050
7334
|
setForm({
|
|
7051
7335
|
...newFormData,
|
|
@@ -7150,7 +7434,7 @@ var Edit2 = ({ size = 18, ...props }) => /* @__PURE__ */ React83.createElement(
|
|
|
7150
7434
|
var Edit2_default = Edit2;
|
|
7151
7435
|
|
|
7152
7436
|
// src/components/ChartOfAccountsRow/ChartOfAccountsRow.tsx
|
|
7153
|
-
import
|
|
7437
|
+
import classNames31 from "classnames";
|
|
7154
7438
|
var INDENTATION = 24;
|
|
7155
7439
|
var MOBILE_INDENTATION = 12;
|
|
7156
7440
|
var EXPANDED_STYLE = {
|
|
@@ -7199,7 +7483,7 @@ var ChartOfAccountsRow = ({
|
|
|
7199
7483
|
}, cumulativeIndex * 50);
|
|
7200
7484
|
return () => clearTimeout(timeoutId);
|
|
7201
7485
|
}, []);
|
|
7202
|
-
const baseClass =
|
|
7486
|
+
const baseClass = classNames31(
|
|
7203
7487
|
"Layer__table-row",
|
|
7204
7488
|
isOpen ? "Layer__table-row--expanded" : "Layer__table-row--collapsed",
|
|
7205
7489
|
!expanded && "Layer__table-row--hidden",
|
|
@@ -7207,11 +7491,11 @@ var ChartOfAccountsRow = ({
|
|
|
7207
7491
|
form?.accountId === account.id && "Layer__table-row--active",
|
|
7208
7492
|
!showComponent && "Layer__table-row--anim-starting-state"
|
|
7209
7493
|
);
|
|
7210
|
-
const desktopRowClass =
|
|
7494
|
+
const desktopRowClass = classNames31(
|
|
7211
7495
|
baseClass,
|
|
7212
7496
|
"Layer__chart-of-accounts__row---desktop"
|
|
7213
7497
|
);
|
|
7214
|
-
const mobileRowClass =
|
|
7498
|
+
const mobileRowClass = classNames31(
|
|
7215
7499
|
baseClass,
|
|
7216
7500
|
"Layer__chart-of-accounts__row---mobile"
|
|
7217
7501
|
);
|
|
@@ -7371,18 +7655,6 @@ import React87 from "react";
|
|
|
7371
7655
|
// src/components/ChartOfAccountsForm/ChartOfAccountsForm.tsx
|
|
7372
7656
|
import React86, { useContext as useContext9, useMemo as useMemo8 } from "react";
|
|
7373
7657
|
|
|
7374
|
-
// src/components/ChartOfAccountsForm/constants.ts
|
|
7375
|
-
var SUB_TYPE_OPTIONS = [
|
|
7376
|
-
{
|
|
7377
|
-
value: "DEBIT" /* DEBIT */,
|
|
7378
|
-
label: "Debit"
|
|
7379
|
-
},
|
|
7380
|
-
{
|
|
7381
|
-
value: "CREDIT" /* CREDIT */,
|
|
7382
|
-
label: "Credit"
|
|
7383
|
-
}
|
|
7384
|
-
];
|
|
7385
|
-
|
|
7386
7658
|
// src/components/ChartOfAccountsForm/useParentOptions.ts
|
|
7387
7659
|
import { useMemo as useMemo7 } from "react";
|
|
7388
7660
|
var useParentOptions = (data) => useMemo7(
|
|
@@ -7486,19 +7758,33 @@ var ChartOfAccountsForm = () => {
|
|
|
7486
7758
|
)), /* @__PURE__ */ React86.createElement(InputGroup, { name: "type", label: "Type", inline: true }, /* @__PURE__ */ React86.createElement(
|
|
7487
7759
|
Select2,
|
|
7488
7760
|
{
|
|
7489
|
-
options:
|
|
7490
|
-
disabled: true,
|
|
7761
|
+
options: LEDGER_ACCOUNT_TYPES,
|
|
7491
7762
|
value: form?.data.type,
|
|
7492
|
-
onChange: (sel) => changeFormData("type", sel)
|
|
7763
|
+
onChange: (sel) => changeFormData("type", sel),
|
|
7764
|
+
isInvalid: Boolean(form?.errors?.find((x) => x.field === "type")),
|
|
7765
|
+
errorMessage: form?.errors?.find((x) => x.field === "type")?.message,
|
|
7766
|
+
disabled: sendingForm || form.action === "edit" || form.data.parent !== void 0
|
|
7493
7767
|
}
|
|
7494
7768
|
)), /* @__PURE__ */ React86.createElement(InputGroup, { name: "subType", label: "Sub-Type", inline: true }, /* @__PURE__ */ React86.createElement(
|
|
7495
7769
|
Select2,
|
|
7496
7770
|
{
|
|
7497
|
-
options:
|
|
7771
|
+
options: form?.data.type?.value !== void 0 ? LEDGER_ACCOUNT_SUBTYPES_FOR_TYPE[form?.data.type?.value] : LEDGER_ACCOUNT_SUBTYPES,
|
|
7498
7772
|
value: form?.data.subType,
|
|
7499
7773
|
onChange: (sel) => changeFormData("subType", sel),
|
|
7500
7774
|
disabled: sendingForm
|
|
7501
7775
|
}
|
|
7776
|
+
)), /* @__PURE__ */ React86.createElement(InputGroup, { name: "normality", label: "Normality", inline: true }, /* @__PURE__ */ React86.createElement(
|
|
7777
|
+
Select2,
|
|
7778
|
+
{
|
|
7779
|
+
options: NORMALITY_OPTIONS,
|
|
7780
|
+
value: form?.data.normality,
|
|
7781
|
+
isInvalid: Boolean(
|
|
7782
|
+
form?.errors?.find((x) => x.field === "normality")
|
|
7783
|
+
),
|
|
7784
|
+
errorMessage: form?.errors?.find((x) => x.field === "normality")?.message,
|
|
7785
|
+
onChange: (sel) => changeFormData("normality", sel),
|
|
7786
|
+
disabled: sendingForm
|
|
7787
|
+
}
|
|
7502
7788
|
)))
|
|
7503
7789
|
);
|
|
7504
7790
|
};
|
|
@@ -7590,9 +7876,9 @@ import React93, { useContext as useContext11, useMemo as useMemo9 } from "react"
|
|
|
7590
7876
|
|
|
7591
7877
|
// src/components/Card/Card.tsx
|
|
7592
7878
|
import React89 from "react";
|
|
7593
|
-
import
|
|
7879
|
+
import classNames32 from "classnames";
|
|
7594
7880
|
var Card = ({ children, className }) => {
|
|
7595
|
-
return /* @__PURE__ */ React89.createElement("div", { className:
|
|
7881
|
+
return /* @__PURE__ */ React89.createElement("div", { className: classNames32("Layer__card", className) }, children);
|
|
7596
7882
|
};
|
|
7597
7883
|
|
|
7598
7884
|
// src/components/DateTime/DateTime.tsx
|
|
@@ -7634,14 +7920,14 @@ var DateTime = ({
|
|
|
7634
7920
|
|
|
7635
7921
|
// src/components/DetailsList/DetailsList.tsx
|
|
7636
7922
|
import React91 from "react";
|
|
7637
|
-
import
|
|
7923
|
+
import classNames33 from "classnames";
|
|
7638
7924
|
var DetailsList = ({
|
|
7639
7925
|
title,
|
|
7640
7926
|
children,
|
|
7641
7927
|
className,
|
|
7642
7928
|
actions
|
|
7643
7929
|
}) => {
|
|
7644
|
-
return /* @__PURE__ */ React91.createElement("div", { className:
|
|
7930
|
+
return /* @__PURE__ */ React91.createElement("div", { className: classNames33("Layer__details-list", className) }, title && /* @__PURE__ */ React91.createElement(Header, null, /* @__PURE__ */ React91.createElement(Heading, { size: "secondary" /* secondary */ }, title), actions && /* @__PURE__ */ React91.createElement("div", { className: "Layer__details-list__actions" }, actions)), /* @__PURE__ */ React91.createElement("ul", { className: "Layer__details-list__list" }, children));
|
|
7645
7931
|
};
|
|
7646
7932
|
|
|
7647
7933
|
// src/components/DetailsList/DetailsListItem.tsx
|
|
@@ -7722,7 +8008,7 @@ var LedgerAccountEntryDetails = () => {
|
|
|
7722
8008
|
}
|
|
7723
8009
|
)
|
|
7724
8010
|
},
|
|
7725
|
-
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React93.createElement(Badge, null, entryData?.source?.
|
|
8011
|
+
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React93.createElement(Badge, null, entryData?.source?.entity_name)),
|
|
7726
8012
|
entryData?.source?.display_description && /* @__PURE__ */ React93.createElement(SourceDetailView, { source: entryData?.source })
|
|
7727
8013
|
), /* @__PURE__ */ React93.createElement(
|
|
7728
8014
|
DetailsList,
|
|
@@ -7739,7 +8025,7 @@ var LedgerAccountEntryDetails = () => {
|
|
|
7739
8025
|
|
|
7740
8026
|
// src/components/LedgerAccount/LedgerAccountRow.tsx
|
|
7741
8027
|
import React94, { useContext as useContext12, useEffect as useEffect14, useState as useState22 } from "react";
|
|
7742
|
-
import
|
|
8028
|
+
import classNames34 from "classnames";
|
|
7743
8029
|
import { parseISO as parseISO10, format as formatTime8 } from "date-fns";
|
|
7744
8030
|
var LedgerAccountRow = ({
|
|
7745
8031
|
row,
|
|
@@ -7763,7 +8049,7 @@ var LedgerAccountRow = ({
|
|
|
7763
8049
|
return /* @__PURE__ */ React94.createElement(
|
|
7764
8050
|
"tr",
|
|
7765
8051
|
{
|
|
7766
|
-
className:
|
|
8052
|
+
className: classNames34(
|
|
7767
8053
|
"Layer__table-row",
|
|
7768
8054
|
row.entry_id === selectedEntryId && "Layer__table-row--active",
|
|
7769
8055
|
initialLoad && "initial-load",
|
|
@@ -7796,7 +8082,7 @@ var LedgerAccountRow = ({
|
|
|
7796
8082
|
return /* @__PURE__ */ React94.createElement(
|
|
7797
8083
|
"tr",
|
|
7798
8084
|
{
|
|
7799
|
-
className:
|
|
8085
|
+
className: classNames34(
|
|
7800
8086
|
"Layer__table-row",
|
|
7801
8087
|
row.entry_id === selectedEntryId && "Layer__table-row--active",
|
|
7802
8088
|
initialLoad && "initial-load",
|
|
@@ -7825,7 +8111,7 @@ var LedgerAccountRow = ({
|
|
|
7825
8111
|
return /* @__PURE__ */ React94.createElement(
|
|
7826
8112
|
"tr",
|
|
7827
8113
|
{
|
|
7828
|
-
className:
|
|
8114
|
+
className: classNames34(
|
|
7829
8115
|
"Layer__table-row",
|
|
7830
8116
|
row.entry_id === selectedEntryId && "Layer__table-row--active",
|
|
7831
8117
|
initialLoad && "initial-load",
|
|
@@ -7851,7 +8137,7 @@ var LedgerAccountRow = ({
|
|
|
7851
8137
|
};
|
|
7852
8138
|
|
|
7853
8139
|
// src/components/LedgerAccount/LedgerAccountIndex.tsx
|
|
7854
|
-
import
|
|
8140
|
+
import classNames35 from "classnames";
|
|
7855
8141
|
var LedgerAccount = ({
|
|
7856
8142
|
containerRef,
|
|
7857
8143
|
pageSize = 15,
|
|
@@ -7879,7 +8165,7 @@ var LedgerAccount = ({
|
|
|
7879
8165
|
return () => clearTimeout(timeoutLoad);
|
|
7880
8166
|
}
|
|
7881
8167
|
}, [isLoading]);
|
|
7882
|
-
const baseClassName =
|
|
8168
|
+
const baseClassName = classNames35(
|
|
7883
8169
|
"Layer__ledger-account__index",
|
|
7884
8170
|
accountId && "open"
|
|
7885
8171
|
);
|