@layerfi/components 0.1.102-alpha.5 → 0.1.102
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 +140 -84
- package/dist/esm/index.mjs +122 -66
- package/dist/index.css +65 -16
- package/dist/index.d.ts +13 -10
- package/package.json +3 -3
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.102
|
|
5605
|
+
var version = "0.1.102";
|
|
5606
5606
|
|
|
5607
5607
|
// src/models/APIError.ts
|
|
5608
5608
|
var APIError = class _APIError extends Error {
|
|
@@ -11437,9 +11437,10 @@ function Modal({
|
|
|
11437
11437
|
flexBlock,
|
|
11438
11438
|
onOpenChange,
|
|
11439
11439
|
children,
|
|
11440
|
+
"aria-label": ariaLabel,
|
|
11440
11441
|
role
|
|
11441
11442
|
}) {
|
|
11442
|
-
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalOverlay, { isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InternalModal, { flexBlock, size, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Dialog, { role: role != null ? role : "dialog", children }) }) });
|
|
11443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(ModalOverlay, { isOpen, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(InternalModal, { flexBlock, size, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Dialog, { role: role != null ? role : "dialog", "aria-label": ariaLabel, children }) }) });
|
|
11443
11444
|
}
|
|
11444
11445
|
|
|
11445
11446
|
// src/components/ui/Modal/ModalSlots.tsx
|
|
@@ -11478,23 +11479,20 @@ var Button2 = (0, import_react39.forwardRef)((_a, ref) => {
|
|
|
11478
11479
|
icon,
|
|
11479
11480
|
inset,
|
|
11480
11481
|
size = "md",
|
|
11481
|
-
variant = "solid"
|
|
11482
|
-
persistentBorder
|
|
11482
|
+
variant = "solid"
|
|
11483
11483
|
} = _b, restProps = __objRest(_b, [
|
|
11484
11484
|
"children",
|
|
11485
11485
|
"icon",
|
|
11486
11486
|
"inset",
|
|
11487
11487
|
"size",
|
|
11488
|
-
"variant"
|
|
11489
|
-
"persistentBorder"
|
|
11488
|
+
"variant"
|
|
11490
11489
|
]);
|
|
11491
11490
|
const { isPending = false } = restProps;
|
|
11492
11491
|
const dataProperties = toDataProperties({
|
|
11493
11492
|
icon,
|
|
11494
11493
|
inset,
|
|
11495
11494
|
size,
|
|
11496
|
-
variant
|
|
11497
|
-
"persistent-border": persistentBorder
|
|
11495
|
+
variant
|
|
11498
11496
|
});
|
|
11499
11497
|
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
11500
11498
|
import_react_aria_components6.Button,
|
|
@@ -11521,8 +11519,8 @@ var import_react_aria_components7 = require("react-aria-components");
|
|
|
11521
11519
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
11522
11520
|
var HEADING_CLASS_NAME = "Layer__UI__Heading";
|
|
11523
11521
|
var Heading2 = (0, import_react40.forwardRef)((_a, ref) => {
|
|
11524
|
-
var _b = _a, { align, pbe, size, variant, weight } = _b, restProps = __objRest(_b, ["align", "pbe", "size", "variant", "weight"]);
|
|
11525
|
-
const dataProperties = toDataProperties({ pbe, size, align, variant, weight });
|
|
11522
|
+
var _b = _a, { align, pie, pbe, size, variant, weight } = _b, restProps = __objRest(_b, ["align", "pie", "pbe", "size", "variant", "weight"]);
|
|
11523
|
+
const dataProperties = toDataProperties({ pbe, pie, size, align, variant, weight });
|
|
11526
11524
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
11527
11525
|
import_react_aria_components7.Heading,
|
|
11528
11526
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
@@ -15978,9 +15976,13 @@ function keyLoader2(previousPageData, {
|
|
|
15978
15976
|
access_token: accessToken,
|
|
15979
15977
|
apiUrl,
|
|
15980
15978
|
businessId,
|
|
15981
|
-
query
|
|
15979
|
+
query,
|
|
15980
|
+
isEnabled
|
|
15982
15981
|
}) {
|
|
15983
15982
|
var _a;
|
|
15983
|
+
if (!isEnabled) {
|
|
15984
|
+
return;
|
|
15985
|
+
}
|
|
15984
15986
|
if (accessToken && apiUrl) {
|
|
15985
15987
|
return {
|
|
15986
15988
|
accessToken,
|
|
@@ -16010,7 +16012,7 @@ var ListCustomersSWRResponse = class {
|
|
|
16010
16012
|
return this.swrResponse.error !== void 0;
|
|
16011
16013
|
}
|
|
16012
16014
|
};
|
|
16013
|
-
function useListCustomers({ query }) {
|
|
16015
|
+
function useListCustomers({ query, isEnabled = true } = {}) {
|
|
16014
16016
|
const { data } = useAuth();
|
|
16015
16017
|
const { businessId } = useLayerContext();
|
|
16016
16018
|
const swrResponse = (0, import_infinite2.default)(
|
|
@@ -16018,7 +16020,8 @@ function useListCustomers({ query }) {
|
|
|
16018
16020
|
previousPageData,
|
|
16019
16021
|
__spreadProps(__spreadValues({}, data), {
|
|
16020
16022
|
businessId,
|
|
16021
|
-
query
|
|
16023
|
+
query,
|
|
16024
|
+
isEnabled
|
|
16022
16025
|
})
|
|
16023
16026
|
),
|
|
16024
16027
|
({
|
|
@@ -16047,6 +16050,9 @@ function useListCustomers({ query }) {
|
|
|
16047
16050
|
);
|
|
16048
16051
|
return new ListCustomersSWRResponse(swrResponse);
|
|
16049
16052
|
}
|
|
16053
|
+
function usePreloadCustomers(parameters) {
|
|
16054
|
+
useListCustomers(parameters);
|
|
16055
|
+
}
|
|
16050
16056
|
|
|
16051
16057
|
// src/features/vendors/api/useListVendors.ts
|
|
16052
16058
|
var import_infinite3 = __toESM(require("swr/infinite"));
|
|
@@ -16134,9 +16140,13 @@ function keyLoader3(previousPageData, {
|
|
|
16134
16140
|
access_token: accessToken,
|
|
16135
16141
|
apiUrl,
|
|
16136
16142
|
businessId,
|
|
16137
|
-
query
|
|
16143
|
+
query,
|
|
16144
|
+
isEnabled
|
|
16138
16145
|
}) {
|
|
16139
16146
|
var _a;
|
|
16147
|
+
if (!isEnabled) {
|
|
16148
|
+
return;
|
|
16149
|
+
}
|
|
16140
16150
|
if (accessToken && apiUrl) {
|
|
16141
16151
|
return {
|
|
16142
16152
|
accessToken,
|
|
@@ -16166,7 +16176,7 @@ var ListVendorsSWRResponse = class {
|
|
|
16166
16176
|
return this.swrResponse.error !== void 0;
|
|
16167
16177
|
}
|
|
16168
16178
|
};
|
|
16169
|
-
function useListVendors({ query }) {
|
|
16179
|
+
function useListVendors({ query, isEnabled = true } = {}) {
|
|
16170
16180
|
const { data } = useAuth();
|
|
16171
16181
|
const { businessId } = useLayerContext();
|
|
16172
16182
|
const swrResponse = (0, import_infinite3.default)(
|
|
@@ -16174,7 +16184,8 @@ function useListVendors({ query }) {
|
|
|
16174
16184
|
previousPageData,
|
|
16175
16185
|
__spreadProps(__spreadValues({}, data), {
|
|
16176
16186
|
businessId,
|
|
16177
|
-
query
|
|
16187
|
+
query,
|
|
16188
|
+
isEnabled
|
|
16178
16189
|
})
|
|
16179
16190
|
),
|
|
16180
16191
|
({
|
|
@@ -16203,6 +16214,9 @@ function useListVendors({ query }) {
|
|
|
16203
16214
|
);
|
|
16204
16215
|
return new ListVendorsSWRResponse(swrResponse);
|
|
16205
16216
|
}
|
|
16217
|
+
function usePreloadVendors(parameters) {
|
|
16218
|
+
useListVendors(parameters);
|
|
16219
|
+
}
|
|
16206
16220
|
|
|
16207
16221
|
// src/components/ui/Input/Input.tsx
|
|
16208
16222
|
var import_react69 = require("react");
|
|
@@ -17073,9 +17087,11 @@ var Square = (0, import_react82.forwardRef)(
|
|
|
17073
17087
|
);
|
|
17074
17088
|
|
|
17075
17089
|
// src/features/tags/components/TagSelector.tsx
|
|
17090
|
+
var import_lucide_react7 = require("lucide-react");
|
|
17076
17091
|
var import_jsx_runtime127 = require("react/jsx-runtime");
|
|
17077
17092
|
var TAG_SELECTOR_CLASS_NAMES = {
|
|
17078
|
-
LAYOUT_GROUP: "Layer__TagSelectorLayoutGroup"
|
|
17093
|
+
LAYOUT_GROUP: "Layer__TagSelectorLayoutGroup",
|
|
17094
|
+
CHECK_ICON: "Layer__TagSelectorCheckIcon"
|
|
17079
17095
|
};
|
|
17080
17096
|
function TagSelectorLayoutGroup({ children }) {
|
|
17081
17097
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_react_aria_components15.Group, { className: TAG_SELECTOR_CLASS_NAMES.LAYOUT_GROUP, children });
|
|
@@ -17154,9 +17170,7 @@ function TagSelectorSelection({
|
|
|
17154
17170
|
Span,
|
|
17155
17171
|
{
|
|
17156
17172
|
slot: "value",
|
|
17157
|
-
weight: "bold",
|
|
17158
17173
|
ellipsis: true,
|
|
17159
|
-
size: "lg",
|
|
17160
17174
|
nonAria: true,
|
|
17161
17175
|
children: valueLabel
|
|
17162
17176
|
}
|
|
@@ -17327,7 +17341,10 @@ function TagSelector({
|
|
|
17327
17341
|
{
|
|
17328
17342
|
id: valueId,
|
|
17329
17343
|
textValue: `${definitionLabel} ${valueLabel}`,
|
|
17330
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime127.
|
|
17344
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(HStack, { gap: "2xs", children: [
|
|
17345
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react7.Check, { size: 16, className: TAG_SELECTOR_CLASS_NAMES.CHECK_ICON }),
|
|
17346
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(Span, { slot: "label", weight: "bold", children: valueLabel })
|
|
17347
|
+
] })
|
|
17331
17348
|
},
|
|
17332
17349
|
valueId
|
|
17333
17350
|
) })
|
|
@@ -20356,7 +20373,7 @@ var import_date_fns21 = require("date-fns");
|
|
|
20356
20373
|
|
|
20357
20374
|
// src/components/domain/transactions/searchField/TransactionsSearchField.tsx
|
|
20358
20375
|
var import_react_aria_components17 = require("react-aria-components");
|
|
20359
|
-
var
|
|
20376
|
+
var import_lucide_react8 = require("lucide-react");
|
|
20360
20377
|
|
|
20361
20378
|
// src/components/ui/SearchField/MinimalSearchField.tsx
|
|
20362
20379
|
var import_react_aria_components16 = require("react-aria-components");
|
|
@@ -20380,7 +20397,7 @@ var CLASS_NAME9 = "Layer__TransactionsSearchField";
|
|
|
20380
20397
|
function TransactionsSearchField(_a) {
|
|
20381
20398
|
var _b = _a, { slot } = _b, restProps = __objRest(_b, ["slot"]);
|
|
20382
20399
|
return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(import_react_aria_components17.Group, { slot, className: CLASS_NAME9, children: [
|
|
20383
|
-
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(VStack, { slot: "icon", align: "center", justify: "center", children: /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
20400
|
+
/* @__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 }) }),
|
|
20384
20401
|
/* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
|
|
20385
20402
|
MinimalSearchField,
|
|
20386
20403
|
__spreadProps(__spreadValues({}, restProps), {
|
|
@@ -20521,7 +20538,7 @@ var DropdownMenu = ({ children, ariaLabel, slots, slotProps }) => {
|
|
|
20521
20538
|
};
|
|
20522
20539
|
|
|
20523
20540
|
// src/components/BankTransactions/BankTransactionsUploadMenu.tsx
|
|
20524
|
-
var
|
|
20541
|
+
var import_lucide_react13 = require("lucide-react");
|
|
20525
20542
|
|
|
20526
20543
|
// src/components/UploadTransactions/UploadTransactions.tsx
|
|
20527
20544
|
var import_react113 = require("react");
|
|
@@ -20968,7 +20985,7 @@ var CustomAccountForm = ({ initialAccountName, onCancel, onSuccess }) => {
|
|
|
20968
20985
|
var import_react108 = require("react");
|
|
20969
20986
|
var import_react_dropzone = require("react-dropzone");
|
|
20970
20987
|
var import_classnames53 = __toESM(require("classnames"));
|
|
20971
|
-
var
|
|
20988
|
+
var import_lucide_react9 = require("lucide-react");
|
|
20972
20989
|
var import_jsx_runtime167 = require("react/jsx-runtime");
|
|
20973
20990
|
var VALID_EXTENSIONS = [".csv"];
|
|
20974
20991
|
var VALID_FILE_TYPES = ["text/csv", "text/plain", "application/vnd.ms-excel"];
|
|
@@ -20993,19 +21010,19 @@ var FileRow = ({ file, onClearFile, asDropTarget }) => {
|
|
|
20993
21010
|
return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(VStack, { className: "Layer__csv-upload__file-row Layer__csv-upload__file-row--drop-target", children: [
|
|
20994
21011
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(HStack, { children: [
|
|
20995
21012
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Spacer, {}),
|
|
20996
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
21013
|
+
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Button2, { variant: "ghost", inset: true, icon: true, onClick: onClearFile, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(CloseIcon_default, { size: 16 }) })
|
|
20997
21014
|
] }),
|
|
20998
21015
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(HStack, { align: "center", justify: "center", gap: "xs", children: [
|
|
20999
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
21016
|
+
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_lucide_react9.FileSpreadsheet, { size: 24 }),
|
|
21000
21017
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(P, { size: "md", children: file.name })
|
|
21001
21018
|
] })
|
|
21002
21019
|
] });
|
|
21003
21020
|
}
|
|
21004
21021
|
return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(HStack, { align: "center", gap: "xs", className: "Layer__csv-upload__file-row", children: [
|
|
21005
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
21022
|
+
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_lucide_react9.FileSpreadsheet, { size: 24 }),
|
|
21006
21023
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(P, { size: "md", children: file.name }),
|
|
21007
21024
|
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Spacer, {}),
|
|
21008
|
-
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
|
|
21025
|
+
/* @__PURE__ */ (0, import_jsx_runtime167.jsx)(Button2, { variant: "ghost", inset: true, icon: true, onClick: onClearFile, children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(CloseIcon_default, { size: 16 }) })
|
|
21009
21026
|
] });
|
|
21010
21027
|
};
|
|
21011
21028
|
var CsvUpload = ({ file, onFileSelected, replaceDropTarget = false }) => {
|
|
@@ -21106,7 +21123,7 @@ var Separator = ({ mbs, mbe }) => {
|
|
|
21106
21123
|
};
|
|
21107
21124
|
|
|
21108
21125
|
// src/components/CsvUpload/DownloadCsvTemplateButton.tsx
|
|
21109
|
-
var
|
|
21126
|
+
var import_lucide_react10 = require("lucide-react");
|
|
21110
21127
|
var import_jsx_runtime169 = require("react/jsx-runtime");
|
|
21111
21128
|
var DownloadCsvTemplateButton = ({ children, className, csvProps, fileName = "template.csv" }) => {
|
|
21112
21129
|
const { headers, rows = [] } = csvProps;
|
|
@@ -21133,7 +21150,7 @@ var DownloadCsvTemplateButton = ({ children, className, csvProps, fileName = "te
|
|
|
21133
21150
|
{
|
|
21134
21151
|
className,
|
|
21135
21152
|
variant: "secondary" /* secondary */,
|
|
21136
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
|
|
21153
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(import_lucide_react10.FileDownIcon, { size: 12 }),
|
|
21137
21154
|
onClick: handleDownload,
|
|
21138
21155
|
tooltip: "Need help? Download an example CSV",
|
|
21139
21156
|
children
|
|
@@ -21142,7 +21159,7 @@ var DownloadCsvTemplateButton = ({ children, className, csvProps, fileName = "te
|
|
|
21142
21159
|
};
|
|
21143
21160
|
|
|
21144
21161
|
// src/components/CsvUpload/CopyTemplateHeadersButtonGroup.tsx
|
|
21145
|
-
var
|
|
21162
|
+
var import_lucide_react11 = require("lucide-react");
|
|
21146
21163
|
var import_classnames54 = __toESM(require("classnames"));
|
|
21147
21164
|
var import_jsx_runtime170 = require("react/jsx-runtime");
|
|
21148
21165
|
var copyTextToClipboard = (text) => {
|
|
@@ -21154,7 +21171,7 @@ var CopyTemplateHeadersButtonGroup = ({ headers, className }) => {
|
|
|
21154
21171
|
Button,
|
|
21155
21172
|
{
|
|
21156
21173
|
onClick: () => copyTextToClipboard(headers[key]),
|
|
21157
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
|
|
21174
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_lucide_react11.CopyIcon, { strokeWidth: 1, size: 12 }),
|
|
21158
21175
|
variant: "secondary" /* secondary */,
|
|
21159
21176
|
children: headers[key]
|
|
21160
21177
|
},
|
|
@@ -21385,7 +21402,7 @@ function UploadTransactionsUploadCsvStep({ selectedAccount, onSelectAccount, sel
|
|
|
21385
21402
|
|
|
21386
21403
|
// src/components/UploadTransactions/UploadTransactionsValidateCsvStep.tsx
|
|
21387
21404
|
var import_react111 = require("react");
|
|
21388
|
-
var
|
|
21405
|
+
var import_lucide_react12 = require("lucide-react");
|
|
21389
21406
|
|
|
21390
21407
|
// src/hooks/customAccounts/useCreateCustomAccountTransactions.ts
|
|
21391
21408
|
var import_mutation12 = __toESM(require("swr/mutation"));
|
|
@@ -21645,7 +21662,7 @@ function UploadTransactionsValidateCsvStep({ parseCsvResponse, selectedAccountId
|
|
|
21645
21662
|
Button,
|
|
21646
21663
|
{
|
|
21647
21664
|
onClick: onClickReupload,
|
|
21648
|
-
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
|
|
21665
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(import_lucide_react12.RefreshCcw, { size: 12 }),
|
|
21649
21666
|
variant: "primary" /* primary */,
|
|
21650
21667
|
children: "Reupload"
|
|
21651
21668
|
}
|
|
@@ -21675,12 +21692,29 @@ function UploadTransactionsConfirmationStep({ onRestartFlow, uploadedTransaction
|
|
|
21675
21692
|
}
|
|
21676
21693
|
),
|
|
21677
21694
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Separator, {}),
|
|
21678
|
-
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(HStack, { gap: "xs", children: [
|
|
21695
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(HStack, { gap: "xs", className: "Layer__upload-transactions__confirmation-step__button-row", children: [
|
|
21679
21696
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(Spacer, {}),
|
|
21680
|
-
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
|
|
21697
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
21698
|
+
Button,
|
|
21699
|
+
{
|
|
21700
|
+
onClick: goRestartFlow,
|
|
21701
|
+
variant: "secondary" /* secondary */,
|
|
21702
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(UploadCloud_default, { size: 12 }),
|
|
21703
|
+
className: "Layer__upload-transactions__confirmation-step__button-row-item",
|
|
21704
|
+
children: "Upload another file"
|
|
21705
|
+
}
|
|
21706
|
+
),
|
|
21707
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
21708
|
+
Button,
|
|
21709
|
+
{
|
|
21710
|
+
onClick: () => {
|
|
21711
|
+
void next();
|
|
21712
|
+
},
|
|
21713
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ChevronRight_default, {}),
|
|
21714
|
+
className: "Layer__upload-transactions__confirmation-step__button-row-item",
|
|
21715
|
+
children: "I\u2019m done uploading transactions"
|
|
21716
|
+
}
|
|
21717
|
+
)
|
|
21684
21718
|
] })
|
|
21685
21719
|
] });
|
|
21686
21720
|
}
|
|
@@ -21690,11 +21724,11 @@ var import_jsx_runtime175 = require("react/jsx-runtime");
|
|
|
21690
21724
|
function UploadTransactionsHeader({ currentStep, isValid: isValid2 }) {
|
|
21691
21725
|
if (currentStep === 2 /* Confirmation */) return null;
|
|
21692
21726
|
return /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(VStack, { gap: "xs", children: [
|
|
21693
|
-
/* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Heading2, { level: 1, children: [
|
|
21727
|
+
/* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Heading2, { level: 1, size: "xl", pie: "2xl", children: [
|
|
21694
21728
|
currentStep === 0 /* UploadCsv */ && "Upload transactions",
|
|
21695
21729
|
currentStep === 1 /* ValidateCsv */ && (isValid2 ? "Review transactions" : "Some transactions couldn't be parsed")
|
|
21696
21730
|
] }),
|
|
21697
|
-
/* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Heading2, { level: 2, pbe: "xl", size: "
|
|
21731
|
+
/* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(Heading2, { level: 2, pbe: "xl", size: "xs", variant: "subtle", weight: "normal", children: [
|
|
21698
21732
|
currentStep === 0 /* UploadCsv */ && "Import a file of transactions from your bank account or credit card",
|
|
21699
21733
|
currentStep === 1 /* ValidateCsv */ && (isValid2 ? "All transactions were parsed successfully. Click \u201CUpload transactions\u201D to finalize the import." : "We found formatting errors in some transactions. Please correct the highlighted rows in your file and reupload it.")
|
|
21700
21734
|
] })
|
|
@@ -21774,7 +21808,7 @@ function BankTransactionsUploadModalContent({ onClose }) {
|
|
|
21774
21808
|
] });
|
|
21775
21809
|
}
|
|
21776
21810
|
function BankTransactionsUploadModal({ isOpen, onOpenChange }) {
|
|
21777
|
-
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Modal, { flexBlock: true, isOpen, onOpenChange, size: "lg", children: ({ close: close2 }) => /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(BankTransactionsUploadModalContent, { onClose: close2 }) });
|
|
21811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(Modal, { flexBlock: true, isOpen, onOpenChange, size: "lg", "aria-label": "Upload transactions", children: ({ close: close2 }) => /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(BankTransactionsUploadModalContent, { onClose: close2 }) });
|
|
21778
21812
|
}
|
|
21779
21813
|
|
|
21780
21814
|
// src/components/BankTransactions/BankTransactionsUploadMenu.tsx
|
|
@@ -21797,7 +21831,7 @@ var BankTransactionsUploadMenu = () => {
|
|
|
21797
21831
|
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(VStack, { className: "Layer__bank-transactions__header-menu__upload-transactions-icon", children: /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(UploadCloud_default, { size: 16 }) }),
|
|
21798
21832
|
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Text, { size: "sm" /* sm */, children: "Upload transactions manually" }),
|
|
21799
21833
|
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Spacer, {}),
|
|
21800
|
-
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
|
|
21834
|
+
/* @__PURE__ */ (0, import_jsx_runtime177.jsx)(import_lucide_react13.ChevronRight, { size: 12 })
|
|
21801
21835
|
] }, "upload-txns") })
|
|
21802
21836
|
]
|
|
21803
21837
|
}
|
|
@@ -21995,7 +22029,7 @@ var Inbox = (_a) => {
|
|
|
21995
22029
|
var Inbox_default = Inbox;
|
|
21996
22030
|
|
|
21997
22031
|
// src/components/BankTransactions/BankTransactionsTableEmptyState.tsx
|
|
21998
|
-
var
|
|
22032
|
+
var import_lucide_react14 = require("lucide-react");
|
|
21999
22033
|
var import_jsx_runtime180 = require("react/jsx-runtime");
|
|
22000
22034
|
function BankTransactionsTableEmptyStates({
|
|
22001
22035
|
hasVisibleTransactions,
|
|
@@ -22036,7 +22070,7 @@ function BankTransactionsTableEmptyStates({
|
|
|
22036
22070
|
status: "info" /* info */,
|
|
22037
22071
|
title: "No transactions found",
|
|
22038
22072
|
description: "Try adjusting your search filters",
|
|
22039
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
|
|
22073
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_lucide_react14.SearchX, {})
|
|
22040
22074
|
}
|
|
22041
22075
|
);
|
|
22042
22076
|
}
|
|
@@ -22057,17 +22091,17 @@ var BankTransactions = (_a) => {
|
|
|
22057
22091
|
var _b = _a, {
|
|
22058
22092
|
onError,
|
|
22059
22093
|
showTags = false,
|
|
22060
|
-
showCustomerVendor = false,
|
|
22061
22094
|
mode
|
|
22062
22095
|
} = _b, props = __objRest(_b, [
|
|
22063
22096
|
"onError",
|
|
22064
22097
|
"showTags",
|
|
22065
|
-
"showCustomerVendor",
|
|
22066
22098
|
"mode"
|
|
22067
22099
|
]);
|
|
22068
22100
|
usePreloadTagDimensions({ isEnabled: showTags });
|
|
22101
|
+
usePreloadCustomers({ isEnabled: false });
|
|
22102
|
+
usePreloadVendors({ isEnabled: false });
|
|
22069
22103
|
const contextData = useAugmentedBankTransactions({ monthlyView: props.monthlyView });
|
|
22070
|
-
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionsContext.Provider, { value: contextData, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(LegacyModeProvider, { overrideMode: mode, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionTagVisibilityProvider, { showTags, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionCustomerVendorVisibilityProvider, { showCustomerVendor, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionsContent, __spreadValues({}, props)) }) }) }) }) });
|
|
22104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(ErrorBoundary, { onError, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionsContext.Provider, { value: contextData, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(LegacyModeProvider, { overrideMode: mode, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionTagVisibilityProvider, { showTags, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionCustomerVendorVisibilityProvider, { showCustomerVendor: false, children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(BankTransactionsContent, __spreadValues({}, props)) }) }) }) }) });
|
|
22071
22105
|
};
|
|
22072
22106
|
var BankTransactionsContent = ({
|
|
22073
22107
|
asWidget = false,
|
|
@@ -22473,7 +22507,7 @@ var IntegrationsQuickbooksItemThumbFooter = ({ quickbooksUiState }) => {
|
|
|
22473
22507
|
};
|
|
22474
22508
|
|
|
22475
22509
|
// src/components/Integrations/IntegrationsQuickbooksItemThumb/IntegrationsQuickbooksItemThumb.tsx
|
|
22476
|
-
var
|
|
22510
|
+
var import_lucide_react15 = require("lucide-react");
|
|
22477
22511
|
|
|
22478
22512
|
// src/components/Integrations/IntegrationsQuickbooksItemThumb/IntegrationsQuickbooksUnlinkConfirmationModal.tsx
|
|
22479
22513
|
var import_react120 = require("react");
|
|
@@ -22509,7 +22543,7 @@ var getBadgeConfig = (quickbooksUiState, hasSynced) => {
|
|
|
22509
22543
|
return {
|
|
22510
22544
|
variant: "error" /* ERROR */,
|
|
22511
22545
|
text: "Retry Sync",
|
|
22512
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
22546
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_lucide_react15.AlertCircle, { size: 12 })
|
|
22513
22547
|
};
|
|
22514
22548
|
}
|
|
22515
22549
|
case "Connected" /* Connected */:
|
|
@@ -22517,7 +22551,7 @@ var getBadgeConfig = (quickbooksUiState, hasSynced) => {
|
|
|
22517
22551
|
return {
|
|
22518
22552
|
variant: "success" /* SUCCESS */,
|
|
22519
22553
|
text: "Synced",
|
|
22520
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(
|
|
22554
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime188.jsx)(import_lucide_react15.CheckIcon, { size: 12 })
|
|
22521
22555
|
};
|
|
22522
22556
|
}
|
|
22523
22557
|
default:
|
|
@@ -28482,6 +28516,7 @@ var Edit2 = (_a) => {
|
|
|
28482
28516
|
var Edit2_default = Edit2;
|
|
28483
28517
|
|
|
28484
28518
|
// src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
|
|
28519
|
+
var import_lucide_react16 = require("lucide-react");
|
|
28485
28520
|
var import_jsx_runtime248 = require("react/jsx-runtime");
|
|
28486
28521
|
var ChartOfAccountsTable = ({
|
|
28487
28522
|
view,
|
|
@@ -28540,55 +28575,78 @@ var ChartOfAccountsTableContent = ({
|
|
|
28540
28575
|
}, []);
|
|
28541
28576
|
const renderChartOfAccountsDesktopRow = (account, index, rowKey, depth) => {
|
|
28542
28577
|
var _a, _b;
|
|
28543
|
-
const
|
|
28544
|
-
const
|
|
28578
|
+
const hasSubAccounts = !!account.sub_accounts && account.sub_accounts.length > 0;
|
|
28579
|
+
const isExpanded = hasSubAccounts ? isOpen(rowKey) : true;
|
|
28580
|
+
const isNonEditable = !templateAccountsEditable && !!account.stable_name;
|
|
28581
|
+
const onClickRow = (e) => {
|
|
28582
|
+
e.stopPropagation();
|
|
28583
|
+
if (hasSubAccounts) setIsOpen(rowKey);
|
|
28584
|
+
};
|
|
28585
|
+
const onClickAccountName = (e) => {
|
|
28586
|
+
e.stopPropagation();
|
|
28587
|
+
setAccountId(account.id);
|
|
28588
|
+
};
|
|
28589
|
+
const onClickEdit = (e) => {
|
|
28590
|
+
e.preventDefault();
|
|
28591
|
+
e.stopPropagation();
|
|
28592
|
+
editAccount(account.id);
|
|
28593
|
+
};
|
|
28594
|
+
const onClickView = (e) => {
|
|
28595
|
+
e.preventDefault();
|
|
28596
|
+
e.stopPropagation();
|
|
28597
|
+
setAccountId(account.id);
|
|
28598
|
+
};
|
|
28545
28599
|
return /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(import_react166.Fragment, { children: [
|
|
28546
28600
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(
|
|
28547
28601
|
TableRow,
|
|
28548
28602
|
{
|
|
28549
28603
|
rowKey: rowKey + "-" + index,
|
|
28550
|
-
expandable,
|
|
28551
|
-
isExpanded
|
|
28552
|
-
onClick:
|
|
28553
|
-
e.stopPropagation();
|
|
28554
|
-
setAccountId(account.id);
|
|
28555
|
-
},
|
|
28604
|
+
expandable: hasSubAccounts,
|
|
28605
|
+
isExpanded,
|
|
28606
|
+
onClick: onClickRow,
|
|
28556
28607
|
depth,
|
|
28557
28608
|
children: [
|
|
28558
28609
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
28559
28610
|
TableCell,
|
|
28560
28611
|
{
|
|
28561
|
-
withExpandIcon:
|
|
28562
|
-
|
|
28563
|
-
|
|
28564
|
-
|
|
28565
|
-
}
|
|
28566
|
-
children: account.name
|
|
28612
|
+
withExpandIcon: hasSubAccounts,
|
|
28613
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(HStack, { gap: "lg", children: [
|
|
28614
|
+
!hasSubAccounts && /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Spacer, {}),
|
|
28615
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Button2, { variant: "text", onClick: onClickAccountName, children: account.name })
|
|
28616
|
+
] })
|
|
28567
28617
|
}
|
|
28568
28618
|
),
|
|
28569
28619
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableCell, { children: (_a = account.account_type) == null ? void 0 : _a.display_name }),
|
|
28570
28620
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableCell, { children: (_b = account.account_subtype) == null ? void 0 : _b.display_name }),
|
|
28571
28621
|
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableCell, { isCurrency: true, children: account.balance }),
|
|
28572
|
-
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime248.
|
|
28573
|
-
|
|
28574
|
-
|
|
28575
|
-
|
|
28576
|
-
|
|
28577
|
-
|
|
28578
|
-
|
|
28579
|
-
|
|
28580
|
-
|
|
28581
|
-
|
|
28582
|
-
|
|
28583
|
-
}
|
|
28584
|
-
|
|
28585
|
-
|
|
28586
|
-
|
|
28587
|
-
|
|
28622
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(TableCell, { align: "right" /* RIGHT */, children: /* @__PURE__ */ (0, import_jsx_runtime248.jsxs)(HStack, { className: "Layer__coa__actions", gap: "xs", children: [
|
|
28623
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
28624
|
+
Button,
|
|
28625
|
+
{
|
|
28626
|
+
variant: "secondary" /* secondary */,
|
|
28627
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(Edit2_default, { size: 14 }),
|
|
28628
|
+
iconOnly: true,
|
|
28629
|
+
disabled: isNonEditable,
|
|
28630
|
+
onClick: onClickEdit,
|
|
28631
|
+
tooltip: isNonEditable ? "This account cannot be modified" : void 0,
|
|
28632
|
+
children: "Edit"
|
|
28633
|
+
}
|
|
28634
|
+
),
|
|
28635
|
+
/* @__PURE__ */ (0, import_jsx_runtime248.jsx)(
|
|
28636
|
+
Button,
|
|
28637
|
+
{
|
|
28638
|
+
variant: "secondary" /* secondary */,
|
|
28639
|
+
rightIcon: /* @__PURE__ */ (0, import_jsx_runtime248.jsx)(import_lucide_react16.List, { size: 14 }),
|
|
28640
|
+
iconOnly: true,
|
|
28641
|
+
onClick: onClickView,
|
|
28642
|
+
children: "View"
|
|
28643
|
+
}
|
|
28644
|
+
)
|
|
28645
|
+
] }) })
|
|
28588
28646
|
]
|
|
28589
28647
|
}
|
|
28590
28648
|
),
|
|
28591
|
-
|
|
28649
|
+
hasSubAccounts && isExpanded && account.sub_accounts.map((subItem, subIdx) => {
|
|
28592
28650
|
const subRowKey = `${rowKey}-${subItem.id}`;
|
|
28593
28651
|
return renderChartOfAccountsDesktopRow(
|
|
28594
28652
|
subItem,
|
|
@@ -34018,7 +34076,6 @@ var BankTransactionsWithLinkedAccounts = ({
|
|
|
34018
34076
|
showDescriptions = true,
|
|
34019
34077
|
showLedgerBalance = true,
|
|
34020
34078
|
showReceiptUploads = true,
|
|
34021
|
-
showCustomerVendor = false,
|
|
34022
34079
|
showTags = false,
|
|
34023
34080
|
showTooltips = false,
|
|
34024
34081
|
showUnlinkItem = false,
|
|
@@ -34048,7 +34105,6 @@ var BankTransactionsWithLinkedAccounts = ({
|
|
|
34048
34105
|
asWidget: true,
|
|
34049
34106
|
showDescriptions,
|
|
34050
34107
|
showReceiptUploads,
|
|
34051
|
-
showCustomerVendor,
|
|
34052
34108
|
showTags,
|
|
34053
34109
|
showTooltips,
|
|
34054
34110
|
showUploadOptions,
|
package/dist/esm/index.mjs
CHANGED
|
@@ -5570,7 +5570,7 @@ import { useState as useState5 } from "react";
|
|
|
5570
5570
|
import { useReducer, useEffect as useEffect2 } from "react";
|
|
5571
5571
|
|
|
5572
5572
|
// package.json
|
|
5573
|
-
var version = "0.1.102
|
|
5573
|
+
var version = "0.1.102";
|
|
5574
5574
|
|
|
5575
5575
|
// src/models/APIError.ts
|
|
5576
5576
|
var APIError = class _APIError extends Error {
|
|
@@ -11448,9 +11448,10 @@ function Modal({
|
|
|
11448
11448
|
flexBlock,
|
|
11449
11449
|
onOpenChange,
|
|
11450
11450
|
children,
|
|
11451
|
+
"aria-label": ariaLabel,
|
|
11451
11452
|
role
|
|
11452
11453
|
}) {
|
|
11453
|
-
return /* @__PURE__ */ jsx64(ModalOverlay, { isOpen, onOpenChange, children: /* @__PURE__ */ jsx64(InternalModal, { flexBlock, size, children: /* @__PURE__ */ jsx64(Dialog, { role: role != null ? role : "dialog", children }) }) });
|
|
11454
|
+
return /* @__PURE__ */ jsx64(ModalOverlay, { isOpen, onOpenChange, children: /* @__PURE__ */ jsx64(InternalModal, { flexBlock, size, children: /* @__PURE__ */ jsx64(Dialog, { role: role != null ? role : "dialog", "aria-label": ariaLabel, children }) }) });
|
|
11454
11455
|
}
|
|
11455
11456
|
|
|
11456
11457
|
// src/components/ui/Modal/ModalSlots.tsx
|
|
@@ -11489,23 +11490,20 @@ var Button2 = forwardRef8((_a, ref) => {
|
|
|
11489
11490
|
icon,
|
|
11490
11491
|
inset,
|
|
11491
11492
|
size = "md",
|
|
11492
|
-
variant = "solid"
|
|
11493
|
-
persistentBorder
|
|
11493
|
+
variant = "solid"
|
|
11494
11494
|
} = _b, restProps = __objRest(_b, [
|
|
11495
11495
|
"children",
|
|
11496
11496
|
"icon",
|
|
11497
11497
|
"inset",
|
|
11498
11498
|
"size",
|
|
11499
|
-
"variant"
|
|
11500
|
-
"persistentBorder"
|
|
11499
|
+
"variant"
|
|
11501
11500
|
]);
|
|
11502
11501
|
const { isPending = false } = restProps;
|
|
11503
11502
|
const dataProperties = toDataProperties({
|
|
11504
11503
|
icon,
|
|
11505
11504
|
inset,
|
|
11506
11505
|
size,
|
|
11507
|
-
variant
|
|
11508
|
-
"persistent-border": persistentBorder
|
|
11506
|
+
variant
|
|
11509
11507
|
});
|
|
11510
11508
|
return /* @__PURE__ */ jsx66(
|
|
11511
11509
|
ReactAriaButton2,
|
|
@@ -11532,8 +11530,8 @@ import { Heading as ReactAriaHeading } from "react-aria-components";
|
|
|
11532
11530
|
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
11533
11531
|
var HEADING_CLASS_NAME = "Layer__UI__Heading";
|
|
11534
11532
|
var Heading2 = forwardRef9((_a, ref) => {
|
|
11535
|
-
var _b = _a, { align, pbe, size, variant, weight } = _b, restProps = __objRest(_b, ["align", "pbe", "size", "variant", "weight"]);
|
|
11536
|
-
const dataProperties = toDataProperties({ pbe, size, align, variant, weight });
|
|
11533
|
+
var _b = _a, { align, pie, pbe, size, variant, weight } = _b, restProps = __objRest(_b, ["align", "pie", "pbe", "size", "variant", "weight"]);
|
|
11534
|
+
const dataProperties = toDataProperties({ pbe, pie, size, align, variant, weight });
|
|
11537
11535
|
return /* @__PURE__ */ jsx67(
|
|
11538
11536
|
ReactAriaHeading,
|
|
11539
11537
|
__spreadProps(__spreadValues(__spreadValues({}, restProps), dataProperties), {
|
|
@@ -16014,9 +16012,13 @@ function keyLoader2(previousPageData, {
|
|
|
16014
16012
|
access_token: accessToken,
|
|
16015
16013
|
apiUrl,
|
|
16016
16014
|
businessId,
|
|
16017
|
-
query
|
|
16015
|
+
query,
|
|
16016
|
+
isEnabled
|
|
16018
16017
|
}) {
|
|
16019
16018
|
var _a;
|
|
16019
|
+
if (!isEnabled) {
|
|
16020
|
+
return;
|
|
16021
|
+
}
|
|
16020
16022
|
if (accessToken && apiUrl) {
|
|
16021
16023
|
return {
|
|
16022
16024
|
accessToken,
|
|
@@ -16046,7 +16048,7 @@ var ListCustomersSWRResponse = class {
|
|
|
16046
16048
|
return this.swrResponse.error !== void 0;
|
|
16047
16049
|
}
|
|
16048
16050
|
};
|
|
16049
|
-
function useListCustomers({ query }) {
|
|
16051
|
+
function useListCustomers({ query, isEnabled = true } = {}) {
|
|
16050
16052
|
const { data } = useAuth();
|
|
16051
16053
|
const { businessId } = useLayerContext();
|
|
16052
16054
|
const swrResponse = useSWRInfinite2(
|
|
@@ -16054,7 +16056,8 @@ function useListCustomers({ query }) {
|
|
|
16054
16056
|
previousPageData,
|
|
16055
16057
|
__spreadProps(__spreadValues({}, data), {
|
|
16056
16058
|
businessId,
|
|
16057
|
-
query
|
|
16059
|
+
query,
|
|
16060
|
+
isEnabled
|
|
16058
16061
|
})
|
|
16059
16062
|
),
|
|
16060
16063
|
({
|
|
@@ -16083,6 +16086,9 @@ function useListCustomers({ query }) {
|
|
|
16083
16086
|
);
|
|
16084
16087
|
return new ListCustomersSWRResponse(swrResponse);
|
|
16085
16088
|
}
|
|
16089
|
+
function usePreloadCustomers(parameters) {
|
|
16090
|
+
useListCustomers(parameters);
|
|
16091
|
+
}
|
|
16086
16092
|
|
|
16087
16093
|
// src/features/vendors/api/useListVendors.ts
|
|
16088
16094
|
import useSWRInfinite3 from "swr/infinite";
|
|
@@ -16170,9 +16176,13 @@ function keyLoader3(previousPageData, {
|
|
|
16170
16176
|
access_token: accessToken,
|
|
16171
16177
|
apiUrl,
|
|
16172
16178
|
businessId,
|
|
16173
|
-
query
|
|
16179
|
+
query,
|
|
16180
|
+
isEnabled
|
|
16174
16181
|
}) {
|
|
16175
16182
|
var _a;
|
|
16183
|
+
if (!isEnabled) {
|
|
16184
|
+
return;
|
|
16185
|
+
}
|
|
16176
16186
|
if (accessToken && apiUrl) {
|
|
16177
16187
|
return {
|
|
16178
16188
|
accessToken,
|
|
@@ -16202,7 +16212,7 @@ var ListVendorsSWRResponse = class {
|
|
|
16202
16212
|
return this.swrResponse.error !== void 0;
|
|
16203
16213
|
}
|
|
16204
16214
|
};
|
|
16205
|
-
function useListVendors({ query }) {
|
|
16215
|
+
function useListVendors({ query, isEnabled = true } = {}) {
|
|
16206
16216
|
const { data } = useAuth();
|
|
16207
16217
|
const { businessId } = useLayerContext();
|
|
16208
16218
|
const swrResponse = useSWRInfinite3(
|
|
@@ -16210,7 +16220,8 @@ function useListVendors({ query }) {
|
|
|
16210
16220
|
previousPageData,
|
|
16211
16221
|
__spreadProps(__spreadValues({}, data), {
|
|
16212
16222
|
businessId,
|
|
16213
|
-
query
|
|
16223
|
+
query,
|
|
16224
|
+
isEnabled
|
|
16214
16225
|
})
|
|
16215
16226
|
),
|
|
16216
16227
|
({
|
|
@@ -16239,6 +16250,9 @@ function useListVendors({ query }) {
|
|
|
16239
16250
|
);
|
|
16240
16251
|
return new ListVendorsSWRResponse(swrResponse);
|
|
16241
16252
|
}
|
|
16253
|
+
function usePreloadVendors(parameters) {
|
|
16254
|
+
useListVendors(parameters);
|
|
16255
|
+
}
|
|
16242
16256
|
|
|
16243
16257
|
// src/components/ui/Input/Input.tsx
|
|
16244
16258
|
import { forwardRef as forwardRef13 } from "react";
|
|
@@ -17130,9 +17144,11 @@ var Square = forwardRef18(
|
|
|
17130
17144
|
);
|
|
17131
17145
|
|
|
17132
17146
|
// src/features/tags/components/TagSelector.tsx
|
|
17147
|
+
import { Check as Check3 } from "lucide-react";
|
|
17133
17148
|
import { jsx as jsx127, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
17134
17149
|
var TAG_SELECTOR_CLASS_NAMES = {
|
|
17135
|
-
LAYOUT_GROUP: "Layer__TagSelectorLayoutGroup"
|
|
17150
|
+
LAYOUT_GROUP: "Layer__TagSelectorLayoutGroup",
|
|
17151
|
+
CHECK_ICON: "Layer__TagSelectorCheckIcon"
|
|
17136
17152
|
};
|
|
17137
17153
|
function TagSelectorLayoutGroup({ children }) {
|
|
17138
17154
|
return /* @__PURE__ */ jsx127(Group, { className: TAG_SELECTOR_CLASS_NAMES.LAYOUT_GROUP, children });
|
|
@@ -17211,9 +17227,7 @@ function TagSelectorSelection({
|
|
|
17211
17227
|
Span,
|
|
17212
17228
|
{
|
|
17213
17229
|
slot: "value",
|
|
17214
|
-
weight: "bold",
|
|
17215
17230
|
ellipsis: true,
|
|
17216
|
-
size: "lg",
|
|
17217
17231
|
nonAria: true,
|
|
17218
17232
|
children: valueLabel
|
|
17219
17233
|
}
|
|
@@ -17384,7 +17398,10 @@ function TagSelector({
|
|
|
17384
17398
|
{
|
|
17385
17399
|
id: valueId,
|
|
17386
17400
|
textValue: `${definitionLabel} ${valueLabel}`,
|
|
17387
|
-
children: /* @__PURE__ */
|
|
17401
|
+
children: /* @__PURE__ */ jsxs77(HStack, { gap: "2xs", children: [
|
|
17402
|
+
/* @__PURE__ */ jsx127(Check3, { size: 16, className: TAG_SELECTOR_CLASS_NAMES.CHECK_ICON }),
|
|
17403
|
+
/* @__PURE__ */ jsx127(Span, { slot: "label", weight: "bold", children: valueLabel })
|
|
17404
|
+
] })
|
|
17388
17405
|
},
|
|
17389
17406
|
valueId
|
|
17390
17407
|
) })
|
|
@@ -21066,7 +21083,7 @@ var FileRow = ({ file, onClearFile, asDropTarget }) => {
|
|
|
21066
21083
|
return /* @__PURE__ */ jsxs103(VStack, { className: "Layer__csv-upload__file-row Layer__csv-upload__file-row--drop-target", children: [
|
|
21067
21084
|
/* @__PURE__ */ jsxs103(HStack, { children: [
|
|
21068
21085
|
/* @__PURE__ */ jsx166(Spacer, {}),
|
|
21069
|
-
/* @__PURE__ */ jsx166(
|
|
21086
|
+
/* @__PURE__ */ jsx166(Button2, { variant: "ghost", inset: true, icon: true, onClick: onClearFile, children: /* @__PURE__ */ jsx166(CloseIcon_default, { size: 16 }) })
|
|
21070
21087
|
] }),
|
|
21071
21088
|
/* @__PURE__ */ jsxs103(HStack, { align: "center", justify: "center", gap: "xs", children: [
|
|
21072
21089
|
/* @__PURE__ */ jsx166(FileSpreadsheet, { size: 24 }),
|
|
@@ -21078,7 +21095,7 @@ var FileRow = ({ file, onClearFile, asDropTarget }) => {
|
|
|
21078
21095
|
/* @__PURE__ */ jsx166(FileSpreadsheet, { size: 24 }),
|
|
21079
21096
|
/* @__PURE__ */ jsx166(P, { size: "md", children: file.name }),
|
|
21080
21097
|
/* @__PURE__ */ jsx166(Spacer, {}),
|
|
21081
|
-
/* @__PURE__ */ jsx166(
|
|
21098
|
+
/* @__PURE__ */ jsx166(Button2, { variant: "ghost", inset: true, icon: true, onClick: onClearFile, children: /* @__PURE__ */ jsx166(CloseIcon_default, { size: 16 }) })
|
|
21082
21099
|
] });
|
|
21083
21100
|
};
|
|
21084
21101
|
var CsvUpload = ({ file, onFileSelected, replaceDropTarget = false }) => {
|
|
@@ -21753,12 +21770,29 @@ function UploadTransactionsConfirmationStep({ onRestartFlow, uploadedTransaction
|
|
|
21753
21770
|
}
|
|
21754
21771
|
),
|
|
21755
21772
|
/* @__PURE__ */ jsx173(Separator, {}),
|
|
21756
|
-
/* @__PURE__ */ jsxs107(HStack, { gap: "xs", children: [
|
|
21773
|
+
/* @__PURE__ */ jsxs107(HStack, { gap: "xs", className: "Layer__upload-transactions__confirmation-step__button-row", children: [
|
|
21757
21774
|
/* @__PURE__ */ jsx173(Spacer, {}),
|
|
21758
|
-
/* @__PURE__ */ jsx173(
|
|
21759
|
-
|
|
21760
|
-
|
|
21761
|
-
|
|
21775
|
+
/* @__PURE__ */ jsx173(
|
|
21776
|
+
Button,
|
|
21777
|
+
{
|
|
21778
|
+
onClick: goRestartFlow,
|
|
21779
|
+
variant: "secondary" /* secondary */,
|
|
21780
|
+
rightIcon: /* @__PURE__ */ jsx173(UploadCloud_default, { size: 12 }),
|
|
21781
|
+
className: "Layer__upload-transactions__confirmation-step__button-row-item",
|
|
21782
|
+
children: "Upload another file"
|
|
21783
|
+
}
|
|
21784
|
+
),
|
|
21785
|
+
/* @__PURE__ */ jsx173(
|
|
21786
|
+
Button,
|
|
21787
|
+
{
|
|
21788
|
+
onClick: () => {
|
|
21789
|
+
void next();
|
|
21790
|
+
},
|
|
21791
|
+
rightIcon: /* @__PURE__ */ jsx173(ChevronRight_default, {}),
|
|
21792
|
+
className: "Layer__upload-transactions__confirmation-step__button-row-item",
|
|
21793
|
+
children: "I\u2019m done uploading transactions"
|
|
21794
|
+
}
|
|
21795
|
+
)
|
|
21762
21796
|
] })
|
|
21763
21797
|
] });
|
|
21764
21798
|
}
|
|
@@ -21768,11 +21802,11 @@ import { jsx as jsx174, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
|
21768
21802
|
function UploadTransactionsHeader({ currentStep, isValid: isValid2 }) {
|
|
21769
21803
|
if (currentStep === 2 /* Confirmation */) return null;
|
|
21770
21804
|
return /* @__PURE__ */ jsxs108(VStack, { gap: "xs", children: [
|
|
21771
|
-
/* @__PURE__ */ jsxs108(Heading2, { level: 1, children: [
|
|
21805
|
+
/* @__PURE__ */ jsxs108(Heading2, { level: 1, size: "xl", pie: "2xl", children: [
|
|
21772
21806
|
currentStep === 0 /* UploadCsv */ && "Upload transactions",
|
|
21773
21807
|
currentStep === 1 /* ValidateCsv */ && (isValid2 ? "Review transactions" : "Some transactions couldn't be parsed")
|
|
21774
21808
|
] }),
|
|
21775
|
-
/* @__PURE__ */ jsxs108(Heading2, { level: 2, pbe: "xl", size: "
|
|
21809
|
+
/* @__PURE__ */ jsxs108(Heading2, { level: 2, pbe: "xl", size: "xs", variant: "subtle", weight: "normal", children: [
|
|
21776
21810
|
currentStep === 0 /* UploadCsv */ && "Import a file of transactions from your bank account or credit card",
|
|
21777
21811
|
currentStep === 1 /* ValidateCsv */ && (isValid2 ? "All transactions were parsed successfully. Click \u201CUpload transactions\u201D to finalize the import." : "We found formatting errors in some transactions. Please correct the highlighted rows in your file and reupload it.")
|
|
21778
21812
|
] })
|
|
@@ -21852,7 +21886,7 @@ function BankTransactionsUploadModalContent({ onClose }) {
|
|
|
21852
21886
|
] });
|
|
21853
21887
|
}
|
|
21854
21888
|
function BankTransactionsUploadModal({ isOpen, onOpenChange }) {
|
|
21855
|
-
return /* @__PURE__ */ jsx175(Modal, { flexBlock: true, isOpen, onOpenChange, size: "lg", children: ({ close: close2 }) => /* @__PURE__ */ jsx175(BankTransactionsUploadModalContent, { onClose: close2 }) });
|
|
21889
|
+
return /* @__PURE__ */ jsx175(Modal, { flexBlock: true, isOpen, onOpenChange, size: "lg", "aria-label": "Upload transactions", children: ({ close: close2 }) => /* @__PURE__ */ jsx175(BankTransactionsUploadModalContent, { onClose: close2 }) });
|
|
21856
21890
|
}
|
|
21857
21891
|
|
|
21858
21892
|
// src/components/BankTransactions/BankTransactionsUploadMenu.tsx
|
|
@@ -22135,17 +22169,17 @@ var BankTransactions = (_a) => {
|
|
|
22135
22169
|
var _b = _a, {
|
|
22136
22170
|
onError,
|
|
22137
22171
|
showTags = false,
|
|
22138
|
-
showCustomerVendor = false,
|
|
22139
22172
|
mode
|
|
22140
22173
|
} = _b, props = __objRest(_b, [
|
|
22141
22174
|
"onError",
|
|
22142
22175
|
"showTags",
|
|
22143
|
-
"showCustomerVendor",
|
|
22144
22176
|
"mode"
|
|
22145
22177
|
]);
|
|
22146
22178
|
usePreloadTagDimensions({ isEnabled: showTags });
|
|
22179
|
+
usePreloadCustomers({ isEnabled: false });
|
|
22180
|
+
usePreloadVendors({ isEnabled: false });
|
|
22147
22181
|
const contextData = useAugmentedBankTransactions({ monthlyView: props.monthlyView });
|
|
22148
|
-
return /* @__PURE__ */ jsx180(ErrorBoundary, { onError, children: /* @__PURE__ */ jsx180(BankTransactionsContext.Provider, { value: contextData, children: /* @__PURE__ */ jsx180(LegacyModeProvider, { overrideMode: mode, children: /* @__PURE__ */ jsx180(BankTransactionTagVisibilityProvider, { showTags, children: /* @__PURE__ */ jsx180(BankTransactionCustomerVendorVisibilityProvider, { showCustomerVendor, children: /* @__PURE__ */ jsx180(BankTransactionsContent, __spreadValues({}, props)) }) }) }) }) });
|
|
22182
|
+
return /* @__PURE__ */ jsx180(ErrorBoundary, { onError, children: /* @__PURE__ */ jsx180(BankTransactionsContext.Provider, { value: contextData, children: /* @__PURE__ */ jsx180(LegacyModeProvider, { overrideMode: mode, children: /* @__PURE__ */ jsx180(BankTransactionTagVisibilityProvider, { showTags, children: /* @__PURE__ */ jsx180(BankTransactionCustomerVendorVisibilityProvider, { showCustomerVendor: false, children: /* @__PURE__ */ jsx180(BankTransactionsContent, __spreadValues({}, props)) }) }) }) }) });
|
|
22149
22183
|
};
|
|
22150
22184
|
var BankTransactionsContent = ({
|
|
22151
22185
|
asWidget = false,
|
|
@@ -28590,6 +28624,7 @@ var Edit2 = (_a) => {
|
|
|
28590
28624
|
var Edit2_default = Edit2;
|
|
28591
28625
|
|
|
28592
28626
|
// src/components/ChartOfAccountsTable/ChartOfAccountsTable.tsx
|
|
28627
|
+
import { List } from "lucide-react";
|
|
28593
28628
|
import { jsx as jsx247, jsxs as jsxs152 } from "react/jsx-runtime";
|
|
28594
28629
|
var ChartOfAccountsTable = ({
|
|
28595
28630
|
view,
|
|
@@ -28648,55 +28683,78 @@ var ChartOfAccountsTableContent = ({
|
|
|
28648
28683
|
}, []);
|
|
28649
28684
|
const renderChartOfAccountsDesktopRow = (account, index, rowKey, depth) => {
|
|
28650
28685
|
var _a, _b;
|
|
28651
|
-
const
|
|
28652
|
-
const
|
|
28686
|
+
const hasSubAccounts = !!account.sub_accounts && account.sub_accounts.length > 0;
|
|
28687
|
+
const isExpanded = hasSubAccounts ? isOpen(rowKey) : true;
|
|
28688
|
+
const isNonEditable = !templateAccountsEditable && !!account.stable_name;
|
|
28689
|
+
const onClickRow = (e) => {
|
|
28690
|
+
e.stopPropagation();
|
|
28691
|
+
if (hasSubAccounts) setIsOpen(rowKey);
|
|
28692
|
+
};
|
|
28693
|
+
const onClickAccountName = (e) => {
|
|
28694
|
+
e.stopPropagation();
|
|
28695
|
+
setAccountId(account.id);
|
|
28696
|
+
};
|
|
28697
|
+
const onClickEdit = (e) => {
|
|
28698
|
+
e.preventDefault();
|
|
28699
|
+
e.stopPropagation();
|
|
28700
|
+
editAccount(account.id);
|
|
28701
|
+
};
|
|
28702
|
+
const onClickView = (e) => {
|
|
28703
|
+
e.preventDefault();
|
|
28704
|
+
e.stopPropagation();
|
|
28705
|
+
setAccountId(account.id);
|
|
28706
|
+
};
|
|
28653
28707
|
return /* @__PURE__ */ jsxs152(Fragment34, { children: [
|
|
28654
28708
|
/* @__PURE__ */ jsxs152(
|
|
28655
28709
|
TableRow,
|
|
28656
28710
|
{
|
|
28657
28711
|
rowKey: rowKey + "-" + index,
|
|
28658
|
-
expandable,
|
|
28659
|
-
isExpanded
|
|
28660
|
-
onClick:
|
|
28661
|
-
e.stopPropagation();
|
|
28662
|
-
setAccountId(account.id);
|
|
28663
|
-
},
|
|
28712
|
+
expandable: hasSubAccounts,
|
|
28713
|
+
isExpanded,
|
|
28714
|
+
onClick: onClickRow,
|
|
28664
28715
|
depth,
|
|
28665
28716
|
children: [
|
|
28666
28717
|
/* @__PURE__ */ jsx247(
|
|
28667
28718
|
TableCell,
|
|
28668
28719
|
{
|
|
28669
|
-
withExpandIcon:
|
|
28670
|
-
|
|
28671
|
-
|
|
28672
|
-
|
|
28673
|
-
}
|
|
28674
|
-
children: account.name
|
|
28720
|
+
withExpandIcon: hasSubAccounts,
|
|
28721
|
+
children: /* @__PURE__ */ jsxs152(HStack, { gap: "lg", children: [
|
|
28722
|
+
!hasSubAccounts && /* @__PURE__ */ jsx247(Spacer, {}),
|
|
28723
|
+
/* @__PURE__ */ jsx247(Button2, { variant: "text", onClick: onClickAccountName, children: account.name })
|
|
28724
|
+
] })
|
|
28675
28725
|
}
|
|
28676
28726
|
),
|
|
28677
28727
|
/* @__PURE__ */ jsx247(TableCell, { children: (_a = account.account_type) == null ? void 0 : _a.display_name }),
|
|
28678
28728
|
/* @__PURE__ */ jsx247(TableCell, { children: (_b = account.account_subtype) == null ? void 0 : _b.display_name }),
|
|
28679
28729
|
/* @__PURE__ */ jsx247(TableCell, { isCurrency: true, children: account.balance }),
|
|
28680
|
-
/* @__PURE__ */ jsx247(TableCell, { children: /* @__PURE__ */
|
|
28681
|
-
|
|
28682
|
-
|
|
28683
|
-
|
|
28684
|
-
|
|
28685
|
-
|
|
28686
|
-
|
|
28687
|
-
|
|
28688
|
-
|
|
28689
|
-
|
|
28690
|
-
|
|
28691
|
-
}
|
|
28692
|
-
|
|
28693
|
-
|
|
28694
|
-
|
|
28695
|
-
|
|
28730
|
+
/* @__PURE__ */ jsx247(TableCell, { align: "right" /* RIGHT */, children: /* @__PURE__ */ jsxs152(HStack, { className: "Layer__coa__actions", gap: "xs", children: [
|
|
28731
|
+
/* @__PURE__ */ jsx247(
|
|
28732
|
+
Button,
|
|
28733
|
+
{
|
|
28734
|
+
variant: "secondary" /* secondary */,
|
|
28735
|
+
rightIcon: /* @__PURE__ */ jsx247(Edit2_default, { size: 14 }),
|
|
28736
|
+
iconOnly: true,
|
|
28737
|
+
disabled: isNonEditable,
|
|
28738
|
+
onClick: onClickEdit,
|
|
28739
|
+
tooltip: isNonEditable ? "This account cannot be modified" : void 0,
|
|
28740
|
+
children: "Edit"
|
|
28741
|
+
}
|
|
28742
|
+
),
|
|
28743
|
+
/* @__PURE__ */ jsx247(
|
|
28744
|
+
Button,
|
|
28745
|
+
{
|
|
28746
|
+
variant: "secondary" /* secondary */,
|
|
28747
|
+
rightIcon: /* @__PURE__ */ jsx247(List, { size: 14 }),
|
|
28748
|
+
iconOnly: true,
|
|
28749
|
+
onClick: onClickView,
|
|
28750
|
+
children: "View"
|
|
28751
|
+
}
|
|
28752
|
+
)
|
|
28753
|
+
] }) })
|
|
28696
28754
|
]
|
|
28697
28755
|
}
|
|
28698
28756
|
),
|
|
28699
|
-
|
|
28757
|
+
hasSubAccounts && isExpanded && account.sub_accounts.map((subItem, subIdx) => {
|
|
28700
28758
|
const subRowKey = `${rowKey}-${subItem.id}`;
|
|
28701
28759
|
return renderChartOfAccountsDesktopRow(
|
|
28702
28760
|
subItem,
|
|
@@ -34131,7 +34189,6 @@ var BankTransactionsWithLinkedAccounts = ({
|
|
|
34131
34189
|
showDescriptions = true,
|
|
34132
34190
|
showLedgerBalance = true,
|
|
34133
34191
|
showReceiptUploads = true,
|
|
34134
|
-
showCustomerVendor = false,
|
|
34135
34192
|
showTags = false,
|
|
34136
34193
|
showTooltips = false,
|
|
34137
34194
|
showUnlinkItem = false,
|
|
@@ -34161,7 +34218,6 @@ var BankTransactionsWithLinkedAccounts = ({
|
|
|
34161
34218
|
asWidget: true,
|
|
34162
34219
|
showDescriptions,
|
|
34163
34220
|
showReceiptUploads,
|
|
34164
|
-
showCustomerVendor,
|
|
34165
34221
|
showTags,
|
|
34166
34222
|
showTooltips,
|
|
34167
34223
|
showUploadOptions,
|
package/dist/index.css
CHANGED
|
@@ -186,10 +186,10 @@
|
|
|
186
186
|
--outline-default: var(--color-base-300);
|
|
187
187
|
--outline-active: var(--color-base-500);
|
|
188
188
|
--button-bg-default: var(--color-base-1000);
|
|
189
|
-
--button-
|
|
189
|
+
--button-bg-disabled: var(--color-base-200);
|
|
190
190
|
--button-bg-active: var(--color-base-800);
|
|
191
|
+
--button-fg-default: var(--color-base-0);
|
|
191
192
|
--button-fg-disabled: var(--color-base-500);
|
|
192
|
-
--button-bg-disabled: var(--color-base-200);
|
|
193
193
|
--button-fg-ghost: var(--color-base-800);
|
|
194
194
|
--button-border-color-ghost: var(--color-base-300);
|
|
195
195
|
--button-border-color-ghost-active: var(--color-base-800);
|
|
@@ -4432,6 +4432,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4432
4432
|
border-top-right-radius: var(--border-radius-2xs);
|
|
4433
4433
|
}
|
|
4434
4434
|
.Layer__UI__Button {
|
|
4435
|
+
all: unset;
|
|
4435
4436
|
display: inline-grid;
|
|
4436
4437
|
grid-template-rows: minmax(0, 1fr);
|
|
4437
4438
|
grid-auto-columns: auto;
|
|
@@ -4497,9 +4498,6 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4497
4498
|
background-color: transparent;
|
|
4498
4499
|
color: var(--button-fg-disabled);
|
|
4499
4500
|
}
|
|
4500
|
-
.Layer__UI__Button[data-variant=outlined][data-hovered]:not([data-pressed]) {
|
|
4501
|
-
border-color: var(--button-border-color-ghost-active);
|
|
4502
|
-
}
|
|
4503
4501
|
.Layer__UI__Button[data-variant=outlined][data-pressed]:not([data-focus-visible]) {
|
|
4504
4502
|
border-color: var(--button-border-color-ghost-active);
|
|
4505
4503
|
outline: 2px solid var(--outline-default);
|
|
@@ -4520,6 +4518,19 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4520
4518
|
outline: 2px solid var(--outline-default);
|
|
4521
4519
|
background-color: var(--button-bg-active);
|
|
4522
4520
|
}
|
|
4521
|
+
.Layer__UI__Button[data-variant=text] {
|
|
4522
|
+
--size: 1.75rem;
|
|
4523
|
+
padding-inline: var(--spacing-xs);
|
|
4524
|
+
border: none;
|
|
4525
|
+
background-color: transparent;
|
|
4526
|
+
}
|
|
4527
|
+
.Layer__UI__Button[data-variant=text][data-hovered]:not([data-disabled], [data-pressed]) {
|
|
4528
|
+
outline: none;
|
|
4529
|
+
text-decoration: underline;
|
|
4530
|
+
}
|
|
4531
|
+
.Layer__UI__Button[data-variant=text][data-pressed]:not([data-focus-visible]) {
|
|
4532
|
+
text-decoration: none;
|
|
4533
|
+
}
|
|
4523
4534
|
.Layer__ButtonTransparentContent {
|
|
4524
4535
|
opacity: 0;
|
|
4525
4536
|
grid-row: 1/-1;
|
|
@@ -4770,8 +4781,6 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4770
4781
|
z-index: 100;
|
|
4771
4782
|
inset: 0;
|
|
4772
4783
|
display: grid;
|
|
4773
|
-
max-block-size: 100lvh;
|
|
4774
|
-
max-inline-size: 100lvi;
|
|
4775
4784
|
background: rgba(0, 0, 0, 0.5);
|
|
4776
4785
|
place-items: center;
|
|
4777
4786
|
}
|
|
@@ -4782,10 +4791,8 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4782
4791
|
animation-duration: 150ms;
|
|
4783
4792
|
}
|
|
4784
4793
|
.Layer__Modal {
|
|
4785
|
-
block-size: min(42rem,
|
|
4786
|
-
|
|
4787
|
-
inline-size: min(36rem, 90svi);
|
|
4788
|
-
max-inline-size: 90svi;
|
|
4794
|
+
block-size: min(42rem, 90%);
|
|
4795
|
+
inline-size: min(36rem, 90%);
|
|
4789
4796
|
}
|
|
4790
4797
|
.Layer__Modal[data-entering] {
|
|
4791
4798
|
animation-duration: 300ms;
|
|
@@ -4797,7 +4804,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
4797
4804
|
block-size: auto;
|
|
4798
4805
|
}
|
|
4799
4806
|
.Layer__Modal[data-size=lg] {
|
|
4800
|
-
inline-size: min(42rem,
|
|
4807
|
+
inline-size: min(42rem, 90%);
|
|
4801
4808
|
}
|
|
4802
4809
|
.Layer__Dialog {
|
|
4803
4810
|
display: flex;
|
|
@@ -5213,33 +5220,63 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
5213
5220
|
.Layer__UI__Heading[data-pbe="3xs"] {
|
|
5214
5221
|
padding-block-end: var(--spacing-3xs);
|
|
5215
5222
|
}
|
|
5223
|
+
.Layer__UI__Heading[data-pie="3xs"] {
|
|
5224
|
+
padding-inline-end: var(--spacing-3xs);
|
|
5225
|
+
}
|
|
5216
5226
|
.Layer__UI__Heading[data-pbe="2xs"] {
|
|
5217
5227
|
padding-block-end: var(--spacing-2xs);
|
|
5218
5228
|
}
|
|
5229
|
+
.Layer__UI__Heading[data-pie="2xs"] {
|
|
5230
|
+
padding-inline-end: var(--spacing-2xs);
|
|
5231
|
+
}
|
|
5219
5232
|
.Layer__UI__Heading[data-pbe=xs] {
|
|
5220
5233
|
padding-block-end: var(--spacing-xs);
|
|
5221
5234
|
}
|
|
5235
|
+
.Layer__UI__Heading[data-pie=xs] {
|
|
5236
|
+
padding-inline-end: var(--spacing-xs);
|
|
5237
|
+
}
|
|
5222
5238
|
.Layer__UI__Heading[data-pbe=sm] {
|
|
5223
5239
|
padding-block-end: var(--spacing-sm);
|
|
5224
5240
|
}
|
|
5241
|
+
.Layer__UI__Heading[data-pie=sm] {
|
|
5242
|
+
padding-inline-end: var(--spacing-sm);
|
|
5243
|
+
}
|
|
5225
5244
|
.Layer__UI__Heading[data-pbe=md] {
|
|
5226
5245
|
padding-block-end: var(--spacing-md);
|
|
5227
5246
|
}
|
|
5247
|
+
.Layer__UI__Heading[data-pie=md] {
|
|
5248
|
+
padding-inline-end: var(--spacing-md);
|
|
5249
|
+
}
|
|
5228
5250
|
.Layer__UI__Heading[data-pbe=lg] {
|
|
5229
5251
|
padding-block-end: var(--spacing-lg);
|
|
5230
5252
|
}
|
|
5253
|
+
.Layer__UI__Heading[data-pie=lg] {
|
|
5254
|
+
padding-inline-end: var(--spacing-lg);
|
|
5255
|
+
}
|
|
5231
5256
|
.Layer__UI__Heading[data-pbe=xl] {
|
|
5232
5257
|
padding-block-end: var(--spacing-xl);
|
|
5233
5258
|
}
|
|
5259
|
+
.Layer__UI__Heading[data-pie=xl] {
|
|
5260
|
+
padding-inline-end: var(--spacing-xl);
|
|
5261
|
+
}
|
|
5234
5262
|
.Layer__UI__Heading[data-pbe="2xl"] {
|
|
5235
5263
|
padding-block-end: var(--spacing-2xl);
|
|
5236
5264
|
}
|
|
5265
|
+
.Layer__UI__Heading[data-pie="2xl"] {
|
|
5266
|
+
padding-inline-end: var(--spacing-2xl);
|
|
5267
|
+
}
|
|
5237
5268
|
.Layer__UI__Heading[data-pbe="3xl"] {
|
|
5238
5269
|
padding-block-end: var(--spacing-3xl);
|
|
5239
5270
|
}
|
|
5271
|
+
.Layer__UI__Heading[data-pie="3xl"] {
|
|
5272
|
+
padding-inline-end: var(--spacing-3xl);
|
|
5273
|
+
}
|
|
5240
5274
|
.Layer__UI__Heading[data-pbe="5xl"] {
|
|
5241
5275
|
padding-block-end: var(--spacing-5xl);
|
|
5242
5276
|
}
|
|
5277
|
+
.Layer__UI__Heading[data-pie="5xl"] {
|
|
5278
|
+
padding-inline-end: var(--spacing-5xl);
|
|
5279
|
+
}
|
|
5243
5280
|
.Layer__UI__Heading[data-size="2xs"] {
|
|
5244
5281
|
font-size: var(--text-heading-2xs);
|
|
5245
5282
|
}
|
|
@@ -7459,7 +7496,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
7459
7496
|
flex: auto;
|
|
7460
7497
|
}
|
|
7461
7498
|
.Layer__upload-transactions .Layer__upload-transactions__select-account-name-input .Layer__select__control {
|
|
7462
|
-
width: 24rem;
|
|
7499
|
+
max-width: 24rem;
|
|
7463
7500
|
}
|
|
7464
7501
|
.Layer__upload-transactions .Layer__upload-transactions__select-account-name-input--error .Layer__select__control {
|
|
7465
7502
|
box-shadow: 0 0 0 1px var(--color-base-300), 0 0 0 2px var(--color-danger);
|
|
@@ -7484,7 +7521,7 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
7484
7521
|
display: flex;
|
|
7485
7522
|
justify-content: space-between;
|
|
7486
7523
|
}
|
|
7487
|
-
@container (max-width:
|
|
7524
|
+
@container (max-width: 36rem) {
|
|
7488
7525
|
.Layer__upload-transactions .Layer__upload-transactions__template-section__button-row {
|
|
7489
7526
|
flex-direction: column;
|
|
7490
7527
|
}
|
|
@@ -7492,16 +7529,24 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
7492
7529
|
width: 100%;
|
|
7493
7530
|
}
|
|
7494
7531
|
}
|
|
7532
|
+
@container (max-width: 30rem) {
|
|
7533
|
+
.Layer__upload-transactions .Layer__upload-transactions__confirmation-step__button-row {
|
|
7534
|
+
flex-direction: column;
|
|
7535
|
+
}
|
|
7536
|
+
.Layer__upload-transactions .Layer__upload-transactions__confirmation-step__button-row > .Layer__upload-transactions__confirmation-step__button-row-item {
|
|
7537
|
+
width: 100%;
|
|
7538
|
+
}
|
|
7539
|
+
}
|
|
7495
7540
|
.Layer__upload-transactions .Layer__upload-transactions__confirmation-step__data-state .Layer__data-state__description {
|
|
7496
7541
|
margin-bottom: 0;
|
|
7497
7542
|
}
|
|
7498
7543
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--date,
|
|
7499
7544
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--date {
|
|
7500
|
-
min-width:
|
|
7545
|
+
min-width: 7.5rem;
|
|
7501
7546
|
}
|
|
7502
7547
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--amount,
|
|
7503
7548
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--amount {
|
|
7504
|
-
min-width:
|
|
7549
|
+
min-width: 7.5rem;
|
|
7505
7550
|
}
|
|
7506
7551
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--amount .Layer__csv-upload__validate-csv-table__header-cell-content,
|
|
7507
7552
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--amount .Layer__csv-upload__validate-csv-table__header-cell-content {
|
|
@@ -7514,12 +7559,16 @@ tbody .Layer__table__empty-row:first-child {
|
|
|
7514
7559
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__cell--description,
|
|
7515
7560
|
.Layer__upload-transactions .Layer__upload-transactions__preview_table .Layer__csv-upload__validate-csv-table__header-cell--description {
|
|
7516
7561
|
flex: 3 1 0;
|
|
7562
|
+
min-width: 12rem;
|
|
7517
7563
|
}
|
|
7518
7564
|
.Layer__TagSelectorLayoutGroup {
|
|
7519
7565
|
display: grid;
|
|
7520
7566
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
7521
7567
|
gap: var(--spacing-xs);
|
|
7522
7568
|
}
|
|
7569
|
+
.Layer__ListBoxItem:not([data-disabled]) .Layer__TagSelectorCheckIcon {
|
|
7570
|
+
visibility: hidden;
|
|
7571
|
+
}
|
|
7523
7572
|
.Layer__Public,
|
|
7524
7573
|
.Layer__Public::before,
|
|
7525
7574
|
.Layer__Public::after,
|
package/dist/index.d.ts
CHANGED
|
@@ -1567,9 +1567,8 @@ declare module '@layerfi/components/components/BankTransactions/BankTransactions
|
|
|
1567
1567
|
export interface BankTransactionsWithErrorProps extends BankTransactionsProps {
|
|
1568
1568
|
onError?: (error: LayerError) => void;
|
|
1569
1569
|
showTags?: boolean;
|
|
1570
|
-
showCustomerVendor?: boolean;
|
|
1571
1570
|
}
|
|
1572
|
-
export const BankTransactions: ({ onError, showTags,
|
|
1571
|
+
export const BankTransactions: ({ onError, showTags, mode, ...props }: BankTransactionsWithErrorProps) => import("react/jsx-runtime").JSX.Element;
|
|
1573
1572
|
|
|
1574
1573
|
}
|
|
1575
1574
|
declare module '@layerfi/components/components/BankTransactions/BankTransactionsHeader' {
|
|
@@ -5007,14 +5006,13 @@ declare module '@layerfi/components/components/domain/transactions/searchField/T
|
|
|
5007
5006
|
}
|
|
5008
5007
|
declare module '@layerfi/components/components/ui/Button/Button' {
|
|
5009
5008
|
import { type ButtonProps } from 'react-aria-components';
|
|
5010
|
-
type ButtonVariant = 'solid' | 'ghost' | 'outlined';
|
|
5009
|
+
type ButtonVariant = 'solid' | 'ghost' | 'outlined' | 'text';
|
|
5011
5010
|
type ButtonSize = 'md';
|
|
5012
5011
|
const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "className"> & {
|
|
5013
5012
|
icon?: true;
|
|
5014
5013
|
inset?: true;
|
|
5015
5014
|
size?: ButtonSize;
|
|
5016
5015
|
variant?: ButtonVariant;
|
|
5017
|
-
persistentBorder?: boolean;
|
|
5018
5016
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5019
5017
|
export { Button };
|
|
5020
5018
|
|
|
@@ -5148,9 +5146,9 @@ declare module '@layerfi/components/components/ui/Modal/Modal' {
|
|
|
5148
5146
|
const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogProps, "className"> & import("react").RefAttributes<HTMLElement>>;
|
|
5149
5147
|
type AllowedModalOverlayProps = Pick<ComponentProps<typeof ModalOverlay>, 'isOpen' | 'onOpenChange'>;
|
|
5150
5148
|
type AllowedInternalModalProps = Pick<ComponentProps<typeof InternalModal>, 'flexBlock' | 'size'>;
|
|
5151
|
-
type AllowedDialogProps = Pick<ComponentProps<typeof Dialog>, 'children' | 'role'>;
|
|
5149
|
+
type AllowedDialogProps = Pick<ComponentProps<typeof Dialog>, 'children' | 'role' | 'aria-label'>;
|
|
5152
5150
|
export type ModalProps = AllowedModalOverlayProps & AllowedInternalModalProps & AllowedDialogProps;
|
|
5153
|
-
export function Modal({ isOpen, size, flexBlock, onOpenChange, children, role, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
5151
|
+
export function Modal({ isOpen, size, flexBlock, onOpenChange, children, 'aria-label': ariaLabel, role, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
5154
5152
|
export {};
|
|
5155
5153
|
|
|
5156
5154
|
}
|
|
@@ -5169,6 +5167,7 @@ declare module '@layerfi/components/components/ui/Modal/ModalSlots' {
|
|
|
5169
5167
|
export const ModalHeading: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react-aria-components").HeadingProps & import("react").RefAttributes<HTMLHeadingElement>, "className"> & {
|
|
5170
5168
|
align?: "center";
|
|
5171
5169
|
pbe?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
|
|
5170
|
+
pie?: import("@layerfi/components/components/ui/sharedUITypes").Spacing;
|
|
5172
5171
|
size?: "2xs" | "xs" | "sm" | "lg" | "xl";
|
|
5173
5172
|
variant?: "subtle";
|
|
5174
5173
|
weight?: "normal" | "bold";
|
|
@@ -5303,6 +5302,7 @@ declare module '@layerfi/components/components/ui/Typography/Heading' {
|
|
|
5303
5302
|
type HeadingDataProps = {
|
|
5304
5303
|
align?: 'center';
|
|
5305
5304
|
pbe?: Spacing;
|
|
5305
|
+
pie?: Spacing;
|
|
5306
5306
|
size?: '2xs' | 'xs' | 'sm' | 'lg' | 'xl';
|
|
5307
5307
|
variant?: 'subtle';
|
|
5308
5308
|
weight?: 'normal' | 'bold';
|
|
@@ -6194,8 +6194,10 @@ declare module '@layerfi/components/features/customers/api/useListCustomers' {
|
|
|
6194
6194
|
}
|
|
6195
6195
|
type UseListCustomersParams = {
|
|
6196
6196
|
query?: string;
|
|
6197
|
+
isEnabled?: boolean;
|
|
6197
6198
|
};
|
|
6198
|
-
export function useListCustomers({ query }
|
|
6199
|
+
export function useListCustomers({ query, isEnabled }?: UseListCustomersParams): ListCustomersSWRResponse;
|
|
6200
|
+
export function usePreloadCustomers(parameters?: UseListCustomersParams): void;
|
|
6199
6201
|
export {};
|
|
6200
6202
|
|
|
6201
6203
|
}
|
|
@@ -6515,8 +6517,10 @@ declare module '@layerfi/components/features/vendors/api/useListVendors' {
|
|
|
6515
6517
|
}
|
|
6516
6518
|
type UseListVendorsParameters = {
|
|
6517
6519
|
query?: string;
|
|
6520
|
+
isEnabled?: boolean;
|
|
6518
6521
|
};
|
|
6519
|
-
export function useListVendors({ query }
|
|
6522
|
+
export function useListVendors({ query, isEnabled }?: UseListVendorsParameters): ListVendorsSWRResponse;
|
|
6523
|
+
export function usePreloadVendors(parameters?: UseListVendorsParameters): void;
|
|
6520
6524
|
export {};
|
|
6521
6525
|
|
|
6522
6526
|
}
|
|
@@ -10219,7 +10223,6 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
|
|
|
10219
10223
|
showDescriptions?: boolean;
|
|
10220
10224
|
showLedgerBalance?: boolean;
|
|
10221
10225
|
showReceiptUploads?: boolean;
|
|
10222
|
-
showCustomerVendor?: boolean;
|
|
10223
10226
|
showTags?: boolean;
|
|
10224
10227
|
showTooltips?: boolean;
|
|
10225
10228
|
showUnlinkItem?: boolean;
|
|
@@ -10231,7 +10234,7 @@ declare module '@layerfi/components/views/BankTransactionsWithLinkedAccounts/Ban
|
|
|
10231
10234
|
mobileComponent?: MobileComponentType;
|
|
10232
10235
|
stringOverrides?: BankTransactionsWithLinkedAccountsStringOverrides;
|
|
10233
10236
|
}
|
|
10234
|
-
export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, mode, showBreakConnection, showDescriptions, showLedgerBalance, showReceiptUploads,
|
|
10237
|
+
export const BankTransactionsWithLinkedAccounts: ({ title, showTitle, elevatedLinkedAccounts, mode, showBreakConnection, showDescriptions, showLedgerBalance, showReceiptUploads, showTags, showTooltips, showUnlinkItem, showUploadOptions, mobileComponent, stringOverrides, }: BankTransactionsWithLinkedAccountsProps) => import("react/jsx-runtime").JSX.Element;
|
|
10235
10238
|
export {};
|
|
10236
10239
|
|
|
10237
10240
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerfi/components",
|
|
3
|
-
"version": "0.1.102
|
|
3
|
+
"version": "0.1.102",
|
|
4
4
|
"description": "Layer React Components",
|
|
5
5
|
"main": "dist/cjs/index.cjs",
|
|
6
6
|
"module": "dist/esm/index.mjs",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"npm-dts": "^1.3.13",
|
|
67
67
|
"react": "^18.2.0",
|
|
68
68
|
"react-dom": "^18.2.0",
|
|
69
|
-
"stylelint": "^16.
|
|
69
|
+
"stylelint": "^16.21.0",
|
|
70
70
|
"stylelint-config-standard": "^38.0.0",
|
|
71
|
-
"stylelint-config-standard-scss": "^15.0.
|
|
71
|
+
"stylelint-config-standard-scss": "^15.0.1",
|
|
72
72
|
"stylelint-order": "^7.0.0",
|
|
73
73
|
"typescript": "^5.8.3",
|
|
74
74
|
"typescript-eslint": "^8.32.0"
|