@layerfi/components 0.1.103 → 0.1.104-alpha
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 +269 -91
- package/dist/esm/index.mjs +340 -162
- package/dist/index.css +138 -139
- package/dist/index.d.ts +94 -16
- package/package.json +1 -1
package/dist/cjs/index.cjs
CHANGED
|
@@ -5602,7 +5602,7 @@ var import_react12 = require("react");
|
|
|
5602
5602
|
var import_react10 = require("react");
|
|
5603
5603
|
|
|
5604
5604
|
// package.json
|
|
5605
|
-
var version = "0.1.
|
|
5605
|
+
var version = "0.1.104-alpha";
|
|
5606
5606
|
|
|
5607
5607
|
// src/models/APIError.ts
|
|
5608
5608
|
var APIError = class _APIError extends Error {
|
|
@@ -5787,9 +5787,9 @@ var getBankTransactions = get(
|
|
|
5787
5787
|
businessId,
|
|
5788
5788
|
cursor,
|
|
5789
5789
|
categorized,
|
|
5790
|
-
descriptionFilter,
|
|
5791
5790
|
direction,
|
|
5792
5791
|
limit,
|
|
5792
|
+
query,
|
|
5793
5793
|
startDate,
|
|
5794
5794
|
endDate,
|
|
5795
5795
|
sortBy = "date",
|
|
@@ -5799,8 +5799,8 @@ var getBankTransactions = get(
|
|
|
5799
5799
|
const parameters = toDefinedSearchParameters({
|
|
5800
5800
|
cursor,
|
|
5801
5801
|
categorized,
|
|
5802
|
-
descriptionFilter,
|
|
5803
5802
|
direction,
|
|
5803
|
+
q: query,
|
|
5804
5804
|
startDate,
|
|
5805
5805
|
endDate,
|
|
5806
5806
|
sortBy,
|
|
@@ -5819,8 +5819,8 @@ var matchBankTransaction = put(
|
|
|
5819
5819
|
var getBankTransactionsExcel = get(({
|
|
5820
5820
|
businessId,
|
|
5821
5821
|
categorized,
|
|
5822
|
-
descriptionFilter,
|
|
5823
5822
|
direction,
|
|
5823
|
+
query,
|
|
5824
5824
|
startDate,
|
|
5825
5825
|
endDate,
|
|
5826
5826
|
sortBy = "date",
|
|
@@ -5828,8 +5828,8 @@ var getBankTransactionsExcel = get(({
|
|
|
5828
5828
|
}) => {
|
|
5829
5829
|
const parameters = toDefinedSearchParameters({
|
|
5830
5830
|
categorized,
|
|
5831
|
-
descriptionFilter,
|
|
5832
5831
|
direction,
|
|
5832
|
+
q: query,
|
|
5833
5833
|
startDate,
|
|
5834
5834
|
endDate,
|
|
5835
5835
|
sortBy,
|
|
@@ -8047,8 +8047,8 @@ function keyLoader(previousPageData, {
|
|
|
8047
8047
|
apiUrl,
|
|
8048
8048
|
businessId,
|
|
8049
8049
|
categorized,
|
|
8050
|
-
descriptionFilter,
|
|
8051
8050
|
direction,
|
|
8051
|
+
query,
|
|
8052
8052
|
startDate,
|
|
8053
8053
|
endDate,
|
|
8054
8054
|
tagFilterQueryString
|
|
@@ -8060,8 +8060,8 @@ function keyLoader(previousPageData, {
|
|
|
8060
8060
|
businessId,
|
|
8061
8061
|
categorized,
|
|
8062
8062
|
cursor: previousPageData ? previousPageData.meta.pagination.cursor : void 0,
|
|
8063
|
-
descriptionFilter,
|
|
8064
8063
|
direction,
|
|
8064
|
+
query,
|
|
8065
8065
|
startDate,
|
|
8066
8066
|
endDate,
|
|
8067
8067
|
tagFilterQueryString,
|
|
@@ -8071,8 +8071,8 @@ function keyLoader(previousPageData, {
|
|
|
8071
8071
|
}
|
|
8072
8072
|
function useBankTransactions({
|
|
8073
8073
|
categorized,
|
|
8074
|
-
descriptionFilter,
|
|
8075
8074
|
direction,
|
|
8075
|
+
query,
|
|
8076
8076
|
startDate,
|
|
8077
8077
|
endDate,
|
|
8078
8078
|
tagFilterQueryString
|
|
@@ -8085,8 +8085,8 @@ function useBankTransactions({
|
|
|
8085
8085
|
__spreadProps(__spreadValues({}, data), {
|
|
8086
8086
|
businessId,
|
|
8087
8087
|
categorized,
|
|
8088
|
-
descriptionFilter,
|
|
8089
8088
|
direction,
|
|
8089
|
+
query,
|
|
8090
8090
|
startDate,
|
|
8091
8091
|
endDate,
|
|
8092
8092
|
tagFilterQueryString
|
|
@@ -8099,7 +8099,7 @@ function useBankTransactions({
|
|
|
8099
8099
|
categorized: categorized2,
|
|
8100
8100
|
cursor,
|
|
8101
8101
|
direction: direction2,
|
|
8102
|
-
|
|
8102
|
+
query: query2,
|
|
8103
8103
|
startDate: startDate2,
|
|
8104
8104
|
endDate: endDate2,
|
|
8105
8105
|
tagFilterQueryString: tagFilterQueryString2
|
|
@@ -8112,9 +8112,9 @@ function useBankTransactions({
|
|
|
8112
8112
|
businessId: businessId2,
|
|
8113
8113
|
categorized: categorized2,
|
|
8114
8114
|
cursor,
|
|
8115
|
-
limit: 200,
|
|
8116
|
-
descriptionFilter: descriptionFilter2,
|
|
8117
8115
|
direction: direction2,
|
|
8116
|
+
limit: 200,
|
|
8117
|
+
query: query2,
|
|
8118
8118
|
startDate: startDate2,
|
|
8119
8119
|
endDate: endDate2,
|
|
8120
8120
|
tagFilterQueryString: tagFilterQueryString2
|
|
@@ -8423,8 +8423,8 @@ function bankTransactionFiltersToHookOptions(filters) {
|
|
|
8423
8423
|
var _a, _b, _c;
|
|
8424
8424
|
return {
|
|
8425
8425
|
categorized: (filters == null ? void 0 : filters.categorizationStatus) ? filters.categorizationStatus !== "all" /* all */ ? filters.categorizationStatus === "categorized" /* categorized */ : void 0 : void 0,
|
|
8426
|
-
descriptionFilter: filters == null ? void 0 : filters.descriptionFilter,
|
|
8427
8426
|
direction: ((_a = filters == null ? void 0 : filters.direction) == null ? void 0 : _a.length) === 1 ? filters.direction[0] === "CREDIT" /* CREDIT */ ? "INFLOW" : "OUTFLOW" : void 0,
|
|
8427
|
+
query: filters == null ? void 0 : filters.query,
|
|
8428
8428
|
startDate: (_b = filters == null ? void 0 : filters.dateRange) == null ? void 0 : _b.startDate,
|
|
8429
8429
|
endDate: (_c = filters == null ? void 0 : filters.dateRange) == null ? void 0 : _c.endDate,
|
|
8430
8430
|
tagFilterQueryString: (filters == null ? void 0 : filters.tagFilter) ? tagFilterToQueryString(filters.tagFilter) : void 0
|
|
@@ -11110,6 +11110,9 @@ var formatter = new Intl.NumberFormat("en-US", {
|
|
|
11110
11110
|
maximumFractionDigits: 2
|
|
11111
11111
|
});
|
|
11112
11112
|
var centsToDollars = (cents = NaN) => isNaN(cents) ? "-.--" : formatter.format(cents / 100);
|
|
11113
|
+
function centsToDollarsWithoutCommas(cents = 0) {
|
|
11114
|
+
return centsToDollars(cents).replaceAll(",", "");
|
|
11115
|
+
}
|
|
11113
11116
|
var dollarsToCents = (dollars = "") => Math.round(parseFloat(dollars) * 100);
|
|
11114
11117
|
|
|
11115
11118
|
// src/components/LinkedAccountThumb/LinkedAccountThumb.tsx
|
|
@@ -20377,7 +20380,7 @@ var import_react115 = require("react");
|
|
|
20377
20380
|
var import_classnames57 = __toESM(require("classnames"));
|
|
20378
20381
|
var import_date_fns21 = require("date-fns");
|
|
20379
20382
|
|
|
20380
|
-
// src/components/
|
|
20383
|
+
// src/components/SearchField/SearchField.tsx
|
|
20381
20384
|
var import_react_aria_components17 = require("react-aria-components");
|
|
20382
20385
|
var import_lucide_react8 = require("lucide-react");
|
|
20383
20386
|
|
|
@@ -20397,19 +20400,18 @@ function MinimalSearchField(_a) {
|
|
|
20397
20400
|
] }));
|
|
20398
20401
|
}
|
|
20399
20402
|
|
|
20400
|
-
// src/components/
|
|
20403
|
+
// src/components/SearchField/SearchField.tsx
|
|
20401
20404
|
var import_jsx_runtime160 = require("react/jsx-runtime");
|
|
20402
|
-
var CLASS_NAME9 = "
|
|
20403
|
-
function
|
|
20404
|
-
var _b = _a, { slot } = _b, restProps = __objRest(_b, ["slot"]);
|
|
20405
|
+
var CLASS_NAME9 = "Layer__SearchField Layer__InputGroup";
|
|
20406
|
+
function SearchField(_a) {
|
|
20407
|
+
var _b = _a, { slot = "search", label } = _b, restProps = __objRest(_b, ["slot", "label"]);
|
|
20405
20408
|
return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(import_react_aria_components17.Group, { slot, className: CLASS_NAME9, children: [
|
|
20406
20409
|
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(VStack, { slot: "icon", align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(import_lucide_react8.Search, { size: 14 }) }),
|
|
20407
20410
|
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
20408
20411
|
MinimalSearchField,
|
|
20409
20412
|
__spreadProps(__spreadValues({}, restProps), {
|
|
20410
|
-
|
|
20411
|
-
|
|
20412
|
-
"aria-label": "Search transactions"
|
|
20413
|
+
placeholder: label,
|
|
20414
|
+
"aria-label": label
|
|
20413
20415
|
})
|
|
20414
20416
|
)
|
|
20415
20417
|
] });
|
|
@@ -20453,7 +20455,7 @@ function useBankTransactionsDownload() {
|
|
|
20453
20455
|
arg: {
|
|
20454
20456
|
categorized,
|
|
20455
20457
|
direction,
|
|
20456
|
-
|
|
20458
|
+
query,
|
|
20457
20459
|
startDate,
|
|
20458
20460
|
endDate,
|
|
20459
20461
|
tagFilterQueryString
|
|
@@ -20466,7 +20468,7 @@ function useBankTransactionsDownload() {
|
|
|
20466
20468
|
params: {
|
|
20467
20469
|
businessId: businessId2,
|
|
20468
20470
|
categorized,
|
|
20469
|
-
|
|
20471
|
+
query,
|
|
20470
20472
|
direction,
|
|
20471
20473
|
startDate,
|
|
20472
20474
|
endDate,
|
|
@@ -21852,19 +21854,20 @@ function TransactionsSearch({ slot }) {
|
|
|
21852
21854
|
const { filters, setFilters } = useBankTransactionsContext();
|
|
21853
21855
|
const [localSearch, setLocalSearch] = (0, import_react115.useState)(() => {
|
|
21854
21856
|
var _a;
|
|
21855
|
-
return (_a = filters == null ? void 0 : filters.
|
|
21857
|
+
return (_a = filters == null ? void 0 : filters.query) != null ? _a : "";
|
|
21856
21858
|
});
|
|
21857
21859
|
const debouncedSetDescription = useDebounce((value) => {
|
|
21858
|
-
setFilters({
|
|
21860
|
+
setFilters({ query: value });
|
|
21859
21861
|
});
|
|
21860
21862
|
const handleSearch = (0, import_react115.useCallback)((value) => {
|
|
21861
21863
|
setLocalSearch(value);
|
|
21862
21864
|
void debouncedSetDescription(value);
|
|
21863
21865
|
}, [debouncedSetDescription]);
|
|
21864
21866
|
return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
|
|
21865
|
-
|
|
21867
|
+
SearchField,
|
|
21866
21868
|
{
|
|
21867
21869
|
slot,
|
|
21870
|
+
label: "Search transactions",
|
|
21868
21871
|
value: localSearch,
|
|
21869
21872
|
onChange: handleSearch
|
|
21870
21873
|
}
|
|
@@ -22316,7 +22319,7 @@ var BankTransactionsContent = ({
|
|
|
22316
22319
|
hasVisibleTransactions: ((_a = bankTransactions == null ? void 0 : bankTransactions.length) != null ? _a : 0) > 0,
|
|
22317
22320
|
isCategorizationMode: editable,
|
|
22318
22321
|
isError: Boolean(error),
|
|
22319
|
-
isFiltered: Boolean(filters == null ? void 0 : filters.
|
|
22322
|
+
isFiltered: Boolean(filters == null ? void 0 : filters.query),
|
|
22320
22323
|
isLoadingWithoutData
|
|
22321
22324
|
}
|
|
22322
22325
|
) : null,
|
|
@@ -28421,12 +28424,172 @@ var Edit2_default = Edit2;
|
|
|
28421
28424
|
|
|
28422
28425
|
// src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
|
|
28423
28426
|
var import_lucide_react16 = require("lucide-react");
|
|
28427
|
+
|
|
28428
|
+
// src/components/ChartOfAccountsTable/utils/types.ts
|
|
28429
|
+
var LedgerAccountTypeOrderEnum = /* @__PURE__ */ ((LedgerAccountTypeOrderEnum2) => {
|
|
28430
|
+
LedgerAccountTypeOrderEnum2[LedgerAccountTypeOrderEnum2["ASSET"] = 0] = "ASSET";
|
|
28431
|
+
LedgerAccountTypeOrderEnum2[LedgerAccountTypeOrderEnum2["LIABILITY"] = 1] = "LIABILITY";
|
|
28432
|
+
LedgerAccountTypeOrderEnum2[LedgerAccountTypeOrderEnum2["EQUITY"] = 2] = "EQUITY";
|
|
28433
|
+
LedgerAccountTypeOrderEnum2[LedgerAccountTypeOrderEnum2["REVENUE"] = 3] = "REVENUE";
|
|
28434
|
+
LedgerAccountTypeOrderEnum2[LedgerAccountTypeOrderEnum2["EXPENSES"] = 4] = "EXPENSES";
|
|
28435
|
+
return LedgerAccountTypeOrderEnum2;
|
|
28436
|
+
})(LedgerAccountTypeOrderEnum || {});
|
|
28437
|
+
var LedgerAccountSubtypeOrderEnum = /* @__PURE__ */ ((LedgerAccountSubtypeOrderEnum2) => {
|
|
28438
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["BANK_ACCOUNTS"] = 0] = "BANK_ACCOUNTS";
|
|
28439
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["CASH"] = 1] = "CASH";
|
|
28440
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["UNDEPOSITED_FUNDS"] = 2] = "UNDEPOSITED_FUNDS";
|
|
28441
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["PAYMENT_PROCESSOR_CLEARING_ACCOUNT"] = 3] = "PAYMENT_PROCESSOR_CLEARING_ACCOUNT";
|
|
28442
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["INBOUND_PAYMENT_METHOD_CLEARING"] = 4] = "INBOUND_PAYMENT_METHOD_CLEARING";
|
|
28443
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["ACCOUNTS_RECEIVABLE"] = 5] = "ACCOUNTS_RECEIVABLE";
|
|
28444
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["INVENTORY"] = 6] = "INVENTORY";
|
|
28445
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["CURRENT_ASSET"] = 7] = "CURRENT_ASSET";
|
|
28446
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["FIXED_ASSET"] = 8] = "FIXED_ASSET";
|
|
28447
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["INTANGIBLE_ASSET"] = 9] = "INTANGIBLE_ASSET";
|
|
28448
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["PREPAID_EXPENSES"] = 10] = "PREPAID_EXPENSES";
|
|
28449
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["DEVELOPMENT_COSTS"] = 11] = "DEVELOPMENT_COSTS";
|
|
28450
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["CREDIT_CARD"] = 12] = "CREDIT_CARD";
|
|
28451
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["ACCOUNTS_PAYABLE"] = 13] = "ACCOUNTS_PAYABLE";
|
|
28452
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["LINE_OF_CREDIT"] = 14] = "LINE_OF_CREDIT";
|
|
28453
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["REFUND_LIABILITIES"] = 15] = "REFUND_LIABILITIES";
|
|
28454
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["PAYROLL_LIABILITY"] = 16] = "PAYROLL_LIABILITY";
|
|
28455
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["SALES_TAXES_PAYABLE"] = 17] = "SALES_TAXES_PAYABLE";
|
|
28456
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OTHER_TAXES_PAYABLE"] = 18] = "OTHER_TAXES_PAYABLE";
|
|
28457
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["TIPS"] = 19] = "TIPS";
|
|
28458
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["UNEARNED_REVENUE"] = 20] = "UNEARNED_REVENUE";
|
|
28459
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["UNDEPOSITED_OUTFLOWS"] = 21] = "UNDEPOSITED_OUTFLOWS";
|
|
28460
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OUTGOING_PAYMENT_CLEARING_ACCOUNT"] = 22] = "OUTGOING_PAYMENT_CLEARING_ACCOUNT";
|
|
28461
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OTHER_CURRENT_LIABILITY"] = 23] = "OTHER_CURRENT_LIABILITY";
|
|
28462
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["SHAREHOLDER_LOAN"] = 24] = "SHAREHOLDER_LOAN";
|
|
28463
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["NOTES_PAYABLE"] = 25] = "NOTES_PAYABLE";
|
|
28464
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OTHER_LONG_TERM_LIABILITIES"] = 26] = "OTHER_LONG_TERM_LIABILITIES";
|
|
28465
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["CONTRIBUTIONS"] = 27] = "CONTRIBUTIONS";
|
|
28466
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["DISTRIBUTIONS"] = 28] = "DISTRIBUTIONS";
|
|
28467
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["COMMON_STOCK"] = 29] = "COMMON_STOCK";
|
|
28468
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["ADDITIONAL_PAID_IN_CAPITAL"] = 30] = "ADDITIONAL_PAID_IN_CAPITAL";
|
|
28469
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["RETAINED_EARNINGS"] = 31] = "RETAINED_EARNINGS";
|
|
28470
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["ACCUMULATED_ADJUSTMENTS"] = 32] = "ACCUMULATED_ADJUSTMENTS";
|
|
28471
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OPENING_BALANCE_EQUITY"] = 33] = "OPENING_BALANCE_EQUITY";
|
|
28472
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OTHER_EQUITY"] = 34] = "OTHER_EQUITY";
|
|
28473
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["SALES"] = 35] = "SALES";
|
|
28474
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["REVENUE"] = 36] = "REVENUE";
|
|
28475
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["UNCATEGORIZED_REVENUE"] = 37] = "UNCATEGORIZED_REVENUE";
|
|
28476
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["RETURNS_ALLOWANCES"] = 38] = "RETURNS_ALLOWANCES";
|
|
28477
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OTHER_INCOME"] = 39] = "OTHER_INCOME";
|
|
28478
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["COGS"] = 40] = "COGS";
|
|
28479
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["OPERATING_EXPENSES"] = 41] = "OPERATING_EXPENSES";
|
|
28480
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["PAYROLL"] = 42] = "PAYROLL";
|
|
28481
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["INTEREST_EXPENSES"] = 43] = "INTEREST_EXPENSES";
|
|
28482
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["TAXES_LICENSES"] = 44] = "TAXES_LICENSES";
|
|
28483
|
+
LedgerAccountSubtypeOrderEnum2[LedgerAccountSubtypeOrderEnum2["UNCATEGORIZED_EXPENSE"] = 45] = "UNCATEGORIZED_EXPENSE";
|
|
28484
|
+
return LedgerAccountSubtypeOrderEnum2;
|
|
28485
|
+
})(LedgerAccountSubtypeOrderEnum || {});
|
|
28486
|
+
|
|
28487
|
+
// src/components/ChartOfAccountsTable/utils/utils.ts
|
|
28488
|
+
var compareByEnum = (a, b, enumMap) => {
|
|
28489
|
+
const aVal = a !== void 0 ? enumMap[a] : void 0;
|
|
28490
|
+
const bVal = b !== void 0 ? enumMap[b] : void 0;
|
|
28491
|
+
if (aVal !== void 0 && bVal !== void 0) return aVal - bVal;
|
|
28492
|
+
if (aVal === void 0 && bVal !== void 0) return 1;
|
|
28493
|
+
if (aVal !== void 0 && bVal === void 0) return -1;
|
|
28494
|
+
return 0;
|
|
28495
|
+
};
|
|
28496
|
+
var compareAccounts = (a, b) => {
|
|
28497
|
+
var _a, _b, _c, _d, _e, _f;
|
|
28498
|
+
const typeComparison = compareByEnum(
|
|
28499
|
+
a.account_type.value,
|
|
28500
|
+
b.account_type.value,
|
|
28501
|
+
LedgerAccountTypeOrderEnum
|
|
28502
|
+
);
|
|
28503
|
+
if (typeComparison !== 0) return typeComparison;
|
|
28504
|
+
const subtypeComparison = compareByEnum(
|
|
28505
|
+
(_a = a.account_subtype) == null ? void 0 : _a.value,
|
|
28506
|
+
(_b = b.account_subtype) == null ? void 0 : _b.value,
|
|
28507
|
+
LedgerAccountSubtypeOrderEnum
|
|
28508
|
+
);
|
|
28509
|
+
if (subtypeComparison !== 0) return subtypeComparison;
|
|
28510
|
+
const subtypeNameCompare = ((_d = (_c = a.account_subtype) == null ? void 0 : _c.display_name) != null ? _d : "").localeCompare((_f = (_e = b.account_subtype) == null ? void 0 : _e.display_name) != null ? _f : "");
|
|
28511
|
+
if (subtypeNameCompare !== 0) return subtypeNameCompare;
|
|
28512
|
+
return a.name.localeCompare(b.name);
|
|
28513
|
+
};
|
|
28514
|
+
var sortAccountsRecursive = (accounts) => {
|
|
28515
|
+
return accounts.map((account) => __spreadProps(__spreadValues({}, account), {
|
|
28516
|
+
sub_accounts: account.sub_accounts ? sortAccountsRecursive(account.sub_accounts) : []
|
|
28517
|
+
})).sort(compareAccounts);
|
|
28518
|
+
};
|
|
28519
|
+
var accountMatchesQuery = (account, query) => {
|
|
28520
|
+
var _a;
|
|
28521
|
+
return [
|
|
28522
|
+
account.name,
|
|
28523
|
+
account.account_type.display_name,
|
|
28524
|
+
((_a = account.account_subtype) == null ? void 0 : _a.display_name) || "",
|
|
28525
|
+
centsToDollars(account.balance),
|
|
28526
|
+
centsToDollarsWithoutCommas(account.balance),
|
|
28527
|
+
convertCentsToCurrency(account.balance) || ""
|
|
28528
|
+
].some((field) => field.toLowerCase().includes(query));
|
|
28529
|
+
};
|
|
28530
|
+
var filterAccounts = (accounts, query) => {
|
|
28531
|
+
return accounts.flatMap((account) => {
|
|
28532
|
+
const isMatching = accountMatchesQuery(account, query);
|
|
28533
|
+
const matchingChildren = filterAccounts(account.sub_accounts, query);
|
|
28534
|
+
if (matchingChildren.length > 0) {
|
|
28535
|
+
return [__spreadProps(__spreadValues({}, account), { sub_accounts: matchingChildren, isMatching: true })];
|
|
28536
|
+
}
|
|
28537
|
+
if (isMatching) {
|
|
28538
|
+
return [__spreadProps(__spreadValues({}, account), { isMatching: true })];
|
|
28539
|
+
}
|
|
28540
|
+
return [];
|
|
28541
|
+
});
|
|
28542
|
+
};
|
|
28543
|
+
var skippedChars = ["$", ","];
|
|
28544
|
+
var getMatchedTextIndices = ({
|
|
28545
|
+
text,
|
|
28546
|
+
query,
|
|
28547
|
+
isMatching
|
|
28548
|
+
}) => {
|
|
28549
|
+
if (!query || !isMatching) return null;
|
|
28550
|
+
const normalize = (s) => s.replace(/[$,]/g, "").toLowerCase();
|
|
28551
|
+
const normalizedText = normalize(text);
|
|
28552
|
+
const normalizedQuery = normalize(query);
|
|
28553
|
+
const normalizedMatchStartIdx = normalizedText.indexOf(normalizedQuery);
|
|
28554
|
+
if (normalizedMatchStartIdx === -1) return null;
|
|
28555
|
+
let positionInNormalizedText = 0, matchStartIdx = 0;
|
|
28556
|
+
while (positionInNormalizedText < normalizedMatchStartIdx && matchStartIdx < text.length) {
|
|
28557
|
+
if (!skippedChars.includes(text[matchStartIdx])) positionInNormalizedText++;
|
|
28558
|
+
matchStartIdx++;
|
|
28559
|
+
}
|
|
28560
|
+
if (skippedChars.includes(text[matchStartIdx]) && query[0] !== text[matchStartIdx]) {
|
|
28561
|
+
matchStartIdx++;
|
|
28562
|
+
}
|
|
28563
|
+
let charsMatched = 0, matchEndIdx = matchStartIdx;
|
|
28564
|
+
while (charsMatched < normalizedQuery.length && matchEndIdx < text.length) {
|
|
28565
|
+
if (!skippedChars.includes(text[matchEndIdx])) charsMatched++;
|
|
28566
|
+
matchEndIdx++;
|
|
28567
|
+
}
|
|
28568
|
+
if (skippedChars.includes(text[matchEndIdx]) && query[query.length - 1] === text[matchEndIdx]) {
|
|
28569
|
+
matchEndIdx++;
|
|
28570
|
+
}
|
|
28571
|
+
return { startIdx: matchStartIdx, endIdx: matchEndIdx };
|
|
28572
|
+
};
|
|
28573
|
+
|
|
28574
|
+
// src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
|
|
28424
28575
|
var import_jsx_runtime247 = require("react/jsx-runtime");
|
|
28425
|
-
var
|
|
28576
|
+
var highlightMatch = ({ text, query, isMatching }) => {
|
|
28577
|
+
const matchedTextIndices = getMatchedTextIndices({ text, query, isMatching });
|
|
28578
|
+
if (matchedTextIndices === null) {
|
|
28579
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Span, { ellipsis: true, children: text });
|
|
28580
|
+
}
|
|
28581
|
+
const { startIdx, endIdx } = matchedTextIndices;
|
|
28582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(Span, { ellipsis: true, children: [
|
|
28583
|
+
text.slice(0, startIdx),
|
|
28584
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)("mark", { className: "Layer__mark", children: text.slice(startIdx, endIdx) }),
|
|
28585
|
+
text.slice(endIdx)
|
|
28586
|
+
] });
|
|
28587
|
+
};
|
|
28426
28588
|
var ChartOfAccountsTable = ({
|
|
28427
28589
|
view,
|
|
28428
28590
|
stringOverrides,
|
|
28429
28591
|
data,
|
|
28592
|
+
searchQuery,
|
|
28430
28593
|
error,
|
|
28431
28594
|
expandAll,
|
|
28432
28595
|
templateAccountsEditable = true
|
|
@@ -28435,6 +28598,7 @@ var ChartOfAccountsTable = ({
|
|
|
28435
28598
|
{
|
|
28436
28599
|
view,
|
|
28437
28600
|
data,
|
|
28601
|
+
searchQuery,
|
|
28438
28602
|
stringOverrides,
|
|
28439
28603
|
error,
|
|
28440
28604
|
expandAll,
|
|
@@ -28444,61 +28608,57 @@ var ChartOfAccountsTable = ({
|
|
|
28444
28608
|
var ChartOfAccountsTableContent = ({
|
|
28445
28609
|
stringOverrides,
|
|
28446
28610
|
data,
|
|
28611
|
+
searchQuery,
|
|
28447
28612
|
error,
|
|
28448
28613
|
expandAll,
|
|
28449
28614
|
templateAccountsEditable
|
|
28450
28615
|
}) => {
|
|
28451
|
-
const hasMountedRef = (0, import_react165.useRef)(false);
|
|
28452
28616
|
const { setAccountId } = (0, import_react165.useContext)(LedgerAccountsContext);
|
|
28453
28617
|
const { editAccount } = (0, import_react165.useContext)(ChartOfAccountsContext);
|
|
28454
|
-
const
|
|
28455
|
-
const sortedAccounts = (0, import_react165.useMemo)(() =>
|
|
28456
|
-
|
|
28457
|
-
const indexA = SORTED_STABLE_NAMES.indexOf(a.stable_name);
|
|
28458
|
-
const indexB = SORTED_STABLE_NAMES.indexOf(b.stable_name);
|
|
28459
|
-
if (indexA === -1 && indexB === -1) return 0;
|
|
28460
|
-
if (indexA === -1) return 1;
|
|
28461
|
-
if (indexB === -1) return -1;
|
|
28462
|
-
return indexA - indexB;
|
|
28463
|
-
});
|
|
28464
|
-
}, [data.accounts]);
|
|
28465
|
-
const expandableRowKeys = (0, import_react165.useMemo)(() => {
|
|
28618
|
+
const [toggledKeys, setToggledKeys] = (0, import_react165.useState)({});
|
|
28619
|
+
const sortedAccounts = (0, import_react165.useMemo)(() => sortAccountsRecursive(data.accounts), [data.accounts]);
|
|
28620
|
+
const allRowKeys = (0, import_react165.useMemo)(() => {
|
|
28466
28621
|
const keys = [];
|
|
28467
|
-
const collect = (accounts
|
|
28622
|
+
const collect = (accounts) => {
|
|
28468
28623
|
for (const account of accounts) {
|
|
28469
|
-
const key =
|
|
28624
|
+
const key = `coa-row-${account.id}`;
|
|
28470
28625
|
if (account.sub_accounts.length > 0) {
|
|
28471
28626
|
keys.push(key);
|
|
28472
|
-
collect(account.sub_accounts
|
|
28627
|
+
collect(account.sub_accounts);
|
|
28473
28628
|
}
|
|
28474
28629
|
}
|
|
28475
28630
|
};
|
|
28476
|
-
collect(data.accounts
|
|
28631
|
+
collect(data.accounts);
|
|
28477
28632
|
return keys;
|
|
28478
28633
|
}, [data.accounts]);
|
|
28479
|
-
(0, import_react165.useLayoutEffect)(() => {
|
|
28480
|
-
if (hasMountedRef.current) return;
|
|
28481
|
-
const defaultExpanded = data.accounts.map(
|
|
28482
|
-
(account) => "coa-row-" + account.id
|
|
28483
|
-
);
|
|
28484
|
-
setIsOpen(defaultExpanded);
|
|
28485
|
-
hasMountedRef.current = true;
|
|
28486
|
-
}, []);
|
|
28487
28634
|
(0, import_react165.useEffect)(() => {
|
|
28488
|
-
if (expandAll ===
|
|
28489
|
-
|
|
28490
|
-
|
|
28491
|
-
|
|
28492
|
-
|
|
28635
|
+
if (expandAll === void 0) return;
|
|
28636
|
+
setToggledKeys(
|
|
28637
|
+
Object.fromEntries(
|
|
28638
|
+
allRowKeys.map((key) => [key, expandAll === "expanded"])
|
|
28639
|
+
)
|
|
28640
|
+
);
|
|
28493
28641
|
}, [expandAll]);
|
|
28494
|
-
|
|
28642
|
+
(0, import_react165.useEffect)(() => {
|
|
28643
|
+
setToggledKeys({});
|
|
28644
|
+
}, [searchQuery]);
|
|
28645
|
+
const filteredAccounts = (0, import_react165.useMemo)(() => {
|
|
28646
|
+
if (!searchQuery) return sortedAccounts;
|
|
28647
|
+
return filterAccounts(sortedAccounts, searchQuery.toLowerCase());
|
|
28648
|
+
}, [searchQuery, sortedAccounts]);
|
|
28649
|
+
const renderChartOfAccountsDesktopRow = ({ account, index, depth, searchQuery: searchQuery2 }) => {
|
|
28495
28650
|
var _a, _b;
|
|
28651
|
+
const rowKey = `coa-row-${account.id}`;
|
|
28496
28652
|
const hasSubAccounts = !!account.sub_accounts && account.sub_accounts.length > 0;
|
|
28497
|
-
const
|
|
28653
|
+
const manuallyToggled = toggledKeys[rowKey];
|
|
28654
|
+
const isExpanded = !hasSubAccounts || manuallyToggled === true || manuallyToggled !== false && (account.isMatching || depth === 0);
|
|
28498
28655
|
const isNonEditable = !templateAccountsEditable && !!account.stable_name;
|
|
28499
28656
|
const onClickRow = (e) => {
|
|
28500
28657
|
e.stopPropagation();
|
|
28501
|
-
if (hasSubAccounts)
|
|
28658
|
+
if (!hasSubAccounts) return;
|
|
28659
|
+
setToggledKeys((prev) => __spreadProps(__spreadValues({}, prev), {
|
|
28660
|
+
[rowKey]: !isExpanded
|
|
28661
|
+
}));
|
|
28502
28662
|
};
|
|
28503
28663
|
const onClickAccountName = (e) => {
|
|
28504
28664
|
e.stopPropagation();
|
|
@@ -28529,12 +28689,28 @@ var ChartOfAccountsTableContent = ({
|
|
|
28529
28689
|
TableCell,
|
|
28530
28690
|
{
|
|
28531
28691
|
withExpandIcon: hasSubAccounts,
|
|
28532
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(HStack, __spreadProps(__spreadValues({}, !hasSubAccounts && { pis: "lg" }), { overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Button2, { variant: "text", ellipsis: true, onClick: onClickAccountName, children:
|
|
28692
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(HStack, __spreadProps(__spreadValues({}, !hasSubAccounts && { pis: "lg" }), { overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(Button2, { variant: "text", ellipsis: true, onClick: onClickAccountName, children: highlightMatch({
|
|
28693
|
+
text: account.name,
|
|
28694
|
+
query: searchQuery2,
|
|
28695
|
+
isMatching: account.isMatching
|
|
28696
|
+
}) }) }))
|
|
28533
28697
|
}
|
|
28534
28698
|
),
|
|
28535
|
-
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { children: depth != 0 && (
|
|
28536
|
-
|
|
28537
|
-
|
|
28699
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { children: depth != 0 && highlightMatch({
|
|
28700
|
+
text: ((_a = account.account_type) == null ? void 0 : _a.display_name) || "",
|
|
28701
|
+
query: searchQuery2,
|
|
28702
|
+
isMatching: account.isMatching
|
|
28703
|
+
}) }),
|
|
28704
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { children: depth != 0 && highlightMatch({
|
|
28705
|
+
text: ((_b = account.account_subtype) == null ? void 0 : _b.display_name) || "",
|
|
28706
|
+
query: searchQuery2,
|
|
28707
|
+
isMatching: account.isMatching
|
|
28708
|
+
}) }),
|
|
28709
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { children: highlightMatch({
|
|
28710
|
+
text: convertCentsToCurrency(account.balance) || "",
|
|
28711
|
+
query: searchQuery2,
|
|
28712
|
+
isMatching: account.isMatching
|
|
28713
|
+
}) }),
|
|
28538
28714
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { align: "right" /* RIGHT */, children: /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(HStack, { className: "Layer__coa__actions", gap: "xs", children: [
|
|
28539
28715
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
28540
28716
|
Button,
|
|
@@ -28563,16 +28739,25 @@ var ChartOfAccountsTableContent = ({
|
|
|
28563
28739
|
}
|
|
28564
28740
|
),
|
|
28565
28741
|
hasSubAccounts && isExpanded && account.sub_accounts.map((subItem, subIdx) => {
|
|
28566
|
-
|
|
28567
|
-
|
|
28568
|
-
|
|
28569
|
-
|
|
28570
|
-
|
|
28571
|
-
|
|
28572
|
-
);
|
|
28742
|
+
return renderChartOfAccountsDesktopRow({
|
|
28743
|
+
account: subItem,
|
|
28744
|
+
index: subIdx,
|
|
28745
|
+
depth: depth + 1,
|
|
28746
|
+
searchQuery: searchQuery2
|
|
28747
|
+
});
|
|
28573
28748
|
})
|
|
28574
28749
|
] }, rowKey + "-" + index);
|
|
28575
28750
|
};
|
|
28751
|
+
if (filteredAccounts.length === 0) {
|
|
28752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime247.jsx)("div", { className: "Layer__table-state-container", children: /* @__PURE__ */ (0, import_jsx_runtime247.jsx)(
|
|
28753
|
+
DataState,
|
|
28754
|
+
{
|
|
28755
|
+
status: "info" /* info */,
|
|
28756
|
+
title: "No accounts found",
|
|
28757
|
+
description: 'No accounts match the current filters. Click "Add Account" to create a new one.'
|
|
28758
|
+
}
|
|
28759
|
+
) });
|
|
28760
|
+
}
|
|
28576
28761
|
return /* @__PURE__ */ (0, import_jsx_runtime247.jsxs)(Table, { componentName: "chart-of-accounts", children: [
|
|
28577
28762
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsxs)("colgroup", { children: [
|
|
28578
28763
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)("col", { className: "Layer__chart-of-accounts--name" }),
|
|
@@ -28588,13 +28773,13 @@ var ChartOfAccountsTableContent = ({
|
|
|
28588
28773
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { isHeaderCell: true, children: (stringOverrides == null ? void 0 : stringOverrides.balanceColumnHeader) || "Balance" }),
|
|
28589
28774
|
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableCell, { isHeaderCell: true })
|
|
28590
28775
|
] }) }),
|
|
28591
|
-
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableBody, { children: !error &&
|
|
28592
|
-
(account,
|
|
28776
|
+
/* @__PURE__ */ (0, import_jsx_runtime247.jsx)(TableBody, { children: !error && filteredAccounts.map(
|
|
28777
|
+
(account, index) => renderChartOfAccountsDesktopRow({
|
|
28593
28778
|
account,
|
|
28594
|
-
|
|
28595
|
-
|
|
28596
|
-
|
|
28597
|
-
)
|
|
28779
|
+
index,
|
|
28780
|
+
depth: 0,
|
|
28781
|
+
searchQuery
|
|
28782
|
+
})
|
|
28598
28783
|
) })
|
|
28599
28784
|
] });
|
|
28600
28785
|
};
|
|
@@ -28700,6 +28885,7 @@ var ChartOfAccountsTableWithPanel = ({
|
|
|
28700
28885
|
}) => {
|
|
28701
28886
|
const { data, isLoading, addAccount, error, isValidating, refetch, form } = (0, import_react166.useContext)(ChartOfAccountsContext);
|
|
28702
28887
|
const [expandAll, setExpandAll] = (0, import_react166.useState)();
|
|
28888
|
+
const { inputValue, searchQuery, handleInputChange } = useDebouncedSearchInput({ initialInputState: "" });
|
|
28703
28889
|
return /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(
|
|
28704
28890
|
Panel,
|
|
28705
28891
|
{
|
|
@@ -28727,7 +28913,7 @@ var ChartOfAccountsTableWithPanel = ({
|
|
|
28727
28913
|
{
|
|
28728
28914
|
size: "secondary" /* secondary */,
|
|
28729
28915
|
className: `Layer__${COMPONENT_NAME6}__subtitle`,
|
|
28730
|
-
children: withDateControl || withExpandAllButton ? /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(
|
|
28916
|
+
children: withDateControl || withExpandAllButton ? /* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(HStack, { align: "center", gap: "xs", children: [
|
|
28731
28917
|
withDateControl && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(ChartOfAccountsDatePicker, {}),
|
|
28732
28918
|
withExpandAllButton && /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
28733
28919
|
ExpandCollapseButton,
|
|
@@ -28743,7 +28929,8 @@ var ChartOfAccountsTableWithPanel = ({
|
|
|
28743
28929
|
] }) : null
|
|
28744
28930
|
}
|
|
28745
28931
|
) }),
|
|
28746
|
-
/* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(HeaderCol, { children: [
|
|
28932
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsxs)(HeaderCol, { className: "Layer__chart-of-accounts__actions", children: [
|
|
28933
|
+
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(SearchField, { label: "Search accounts", value: inputValue, onChange: handleInputChange }),
|
|
28747
28934
|
/* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
28748
28935
|
AccountBalancesDownloadButton,
|
|
28749
28936
|
{
|
|
@@ -28766,6 +28953,7 @@ var ChartOfAccountsTableWithPanel = ({
|
|
|
28766
28953
|
{
|
|
28767
28954
|
view,
|
|
28768
28955
|
data,
|
|
28956
|
+
searchQuery,
|
|
28769
28957
|
error,
|
|
28770
28958
|
stringOverrides,
|
|
28771
28959
|
expandAll,
|
|
@@ -28782,17 +28970,7 @@ var ChartOfAccountsTableWithPanel = ({
|
|
|
28782
28970
|
isLoading: isValidating || isLoading
|
|
28783
28971
|
}
|
|
28784
28972
|
) }) : null,
|
|
28785
|
-
(!data || isLoading) && !error ? /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: `Layer__${COMPONENT_NAME6}__loader-container`, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(Loader2, {}) }) : null
|
|
28786
|
-
!isLoading && !error && (data == null ? void 0 : data.accounts.length) === 0 ? /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: "Layer__table-state-container", children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(
|
|
28787
|
-
DataState,
|
|
28788
|
-
{
|
|
28789
|
-
status: "info" /* info */,
|
|
28790
|
-
title: "Accounts were not found",
|
|
28791
|
-
description: 'New account can be created with "Add Account".',
|
|
28792
|
-
onRefresh: () => refetch(),
|
|
28793
|
-
isLoading: isValidating
|
|
28794
|
-
}
|
|
28795
|
-
) }) : null
|
|
28973
|
+
(!data || isLoading) && !error ? /* @__PURE__ */ (0, import_jsx_runtime249.jsx)("div", { className: `Layer__${COMPONENT_NAME6}__loader-container`, children: /* @__PURE__ */ (0, import_jsx_runtime249.jsx)(Loader2, {}) }) : null
|
|
28796
28974
|
]
|
|
28797
28975
|
}
|
|
28798
28976
|
);
|