@layerfi/components 0.1.22 → 0.1.23
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/.idea/layer-react.iml +9 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/dist/esm/index.js +104 -65
- package/dist/esm/index.js.map +3 -3
- package/dist/index.d.ts +28 -4
- package/dist/index.js +104 -65
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="JAVA_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
+
<exclude-output />
|
|
5
|
+
<content url="file://$MODULE_DIR$" />
|
|
6
|
+
<orderEntry type="inheritedJdk" />
|
|
7
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
8
|
+
</component>
|
|
9
|
+
</module>
|
package/.idea/misc.xml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" default="true" project-jdk-name="corretto-19" project-jdk-type="JavaSDK">
|
|
4
|
+
<output url="file://$PROJECT_DIR$/out" />
|
|
5
|
+
</component>
|
|
6
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/layer-react.iml" filepath="$PROJECT_DIR$/.idea/layer-react.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/vcs.xml
ADDED
package/dist/esm/index.js
CHANGED
|
@@ -295,6 +295,9 @@ var createJournalEntries = post(
|
|
|
295
295
|
|
|
296
296
|
// src/api/layer/linked_accounts.ts
|
|
297
297
|
var syncConnection = post(({ businessId }) => `/v1/businesses/${businessId}/sync`);
|
|
298
|
+
var updateConnectionStatus = post(
|
|
299
|
+
({ businessId }) => `/v1/businesses/${businessId}/external-accounts/update-connection-status`
|
|
300
|
+
);
|
|
298
301
|
var getLinkedAccounts = get(({ businessId }) => `/v1/businesses/${businessId}/external-accounts`);
|
|
299
302
|
var confirmConnection = post(
|
|
300
303
|
({ businessId, accountId }) => `/v1/businesses/${businessId}/external-accounts/${accountId}/confirm`
|
|
@@ -376,7 +379,8 @@ var Layer = {
|
|
|
376
379
|
getTasks,
|
|
377
380
|
submitResponseToTask,
|
|
378
381
|
breakPlaidItemConnection,
|
|
379
|
-
syncConnection
|
|
382
|
+
syncConnection,
|
|
383
|
+
updateConnectionStatus
|
|
380
384
|
};
|
|
381
385
|
|
|
382
386
|
// src/hooks/useLayerContext/useLayerContext.tsx
|
|
@@ -837,7 +841,7 @@ function hasSuggestions(categorization) {
|
|
|
837
841
|
|
|
838
842
|
// src/utils/helpers.ts
|
|
839
843
|
var range = (start, end) => {
|
|
840
|
-
|
|
844
|
+
const length = end - start + 1;
|
|
841
845
|
return Array.from({ length }, (_, idx) => idx + start);
|
|
842
846
|
};
|
|
843
847
|
var debounce = (fnc, timeout = 300) => {
|
|
@@ -2606,7 +2610,7 @@ var Toggle = ({
|
|
|
2606
2610
|
updateThumbPosition(selectedIndex);
|
|
2607
2611
|
}, [currentWidth]);
|
|
2608
2612
|
const getSelectedIndex = () => {
|
|
2609
|
-
|
|
2613
|
+
const selectedIndex = options.findIndex(
|
|
2610
2614
|
(option) => option.value === selectedValue
|
|
2611
2615
|
);
|
|
2612
2616
|
if (selectedIndex === -1) {
|
|
@@ -2642,7 +2646,7 @@ var ToggleOption = ({
|
|
|
2642
2646
|
index
|
|
2643
2647
|
}) => {
|
|
2644
2648
|
if (disabled) {
|
|
2645
|
-
return /* @__PURE__ */ React45.createElement(Tooltip, null, /* @__PURE__ */ React45.createElement(TooltipTrigger, null, /* @__PURE__ */ React45.createElement("label", { className:
|
|
2649
|
+
return /* @__PURE__ */ React45.createElement(Tooltip, null, /* @__PURE__ */ React45.createElement(TooltipTrigger, null, /* @__PURE__ */ React45.createElement("label", { className: "Layer__toggle-option", "data-checked": checked }, /* @__PURE__ */ React45.createElement(
|
|
2646
2650
|
"input",
|
|
2647
2651
|
{
|
|
2648
2652
|
type: "radio",
|
|
@@ -2655,7 +2659,7 @@ var ToggleOption = ({
|
|
|
2655
2659
|
}
|
|
2656
2660
|
), /* @__PURE__ */ React45.createElement("span", { className: "Layer__toggle-option-content" }, leftIcon && /* @__PURE__ */ React45.createElement("span", { className: "Layer__toggle-option__icon" }, leftIcon), /* @__PURE__ */ React45.createElement("span", null, label)))), /* @__PURE__ */ React45.createElement(TooltipContent, { className: "Layer__tooltip" }, disabledMessage));
|
|
2657
2661
|
}
|
|
2658
|
-
return /* @__PURE__ */ React45.createElement("label", { className:
|
|
2662
|
+
return /* @__PURE__ */ React45.createElement("label", { className: "Layer__toggle-option", "data-checked": checked }, /* @__PURE__ */ React45.createElement(
|
|
2659
2663
|
"input",
|
|
2660
2664
|
{
|
|
2661
2665
|
type: "radio",
|
|
@@ -2851,7 +2855,9 @@ var ExpandedBankTransactionRow = forwardRef2(
|
|
|
2851
2855
|
editable,
|
|
2852
2856
|
asListItem = false,
|
|
2853
2857
|
submitBtnText = "Save",
|
|
2854
|
-
containerWidth
|
|
2858
|
+
containerWidth,
|
|
2859
|
+
showDescriptions,
|
|
2860
|
+
showReceiptUploads
|
|
2855
2861
|
}, ref) => {
|
|
2856
2862
|
const {
|
|
2857
2863
|
categorize: categorizeBankTransaction2,
|
|
@@ -3174,7 +3180,7 @@ var ExpandedBankTransactionRow = forwardRef2(
|
|
|
3174
3180
|
"Split"
|
|
3175
3181
|
))))
|
|
3176
3182
|
)),
|
|
3177
|
-
/* @__PURE__ */ React48.createElement(
|
|
3183
|
+
showDescriptions && /* @__PURE__ */ React48.createElement(
|
|
3178
3184
|
InputGroup,
|
|
3179
3185
|
{
|
|
3180
3186
|
className: `${className}__description`,
|
|
@@ -3182,7 +3188,7 @@ var ExpandedBankTransactionRow = forwardRef2(
|
|
|
3182
3188
|
},
|
|
3183
3189
|
/* @__PURE__ */ React48.createElement(Textarea, { name: "description", placeholder: "Add description" })
|
|
3184
3190
|
),
|
|
3185
|
-
/* @__PURE__ */ React48.createElement("div", { className: `${className}__file-upload` }, /* @__PURE__ */ React48.createElement(FileInput, { text: "Upload receipt" })),
|
|
3191
|
+
showReceiptUploads && /* @__PURE__ */ React48.createElement("div", { className: `${className}__file-upload` }, /* @__PURE__ */ React48.createElement(FileInput, { text: "Upload receipt" })),
|
|
3186
3192
|
asListItem ? /* @__PURE__ */ React48.createElement("div", { className: `${className}__submit-btn` }, bankTransaction.error ? /* @__PURE__ */ React48.createElement(
|
|
3187
3193
|
Text,
|
|
3188
3194
|
{
|
|
@@ -3259,7 +3265,9 @@ var BankTransactionRow = ({
|
|
|
3259
3265
|
editable,
|
|
3260
3266
|
removeTransaction,
|
|
3261
3267
|
containerWidth,
|
|
3262
|
-
initialLoad
|
|
3268
|
+
initialLoad,
|
|
3269
|
+
showDescriptions,
|
|
3270
|
+
showReceiptUploads
|
|
3263
3271
|
}) => {
|
|
3264
3272
|
const expandedRowRef = useRef10(null);
|
|
3265
3273
|
const [showRetry, setShowRetry] = useState9(false);
|
|
@@ -3516,7 +3524,9 @@ var BankTransactionRow = ({
|
|
|
3516
3524
|
isOpen: open,
|
|
3517
3525
|
close: () => setOpen(false),
|
|
3518
3526
|
containerWidth,
|
|
3519
|
-
editable
|
|
3527
|
+
editable,
|
|
3528
|
+
showDescriptions,
|
|
3529
|
+
showReceiptUploads
|
|
3520
3530
|
}
|
|
3521
3531
|
))));
|
|
3522
3532
|
};
|
|
@@ -3567,6 +3577,8 @@ var BankTransactionListItem = ({
|
|
|
3567
3577
|
dateFormat,
|
|
3568
3578
|
bankTransaction,
|
|
3569
3579
|
editable,
|
|
3580
|
+
showDescriptions,
|
|
3581
|
+
showReceiptUploads,
|
|
3570
3582
|
containerWidth
|
|
3571
3583
|
}) => {
|
|
3572
3584
|
const expandedRowRef = useRef11(null);
|
|
@@ -3653,7 +3665,9 @@ var BankTransactionListItem = ({
|
|
|
3653
3665
|
editable,
|
|
3654
3666
|
asListItem: true,
|
|
3655
3667
|
submitBtnText: editable ? "Approve" : "Update",
|
|
3656
|
-
containerWidth
|
|
3668
|
+
containerWidth,
|
|
3669
|
+
showDescriptions,
|
|
3670
|
+
showReceiptUploads
|
|
3657
3671
|
}
|
|
3658
3672
|
)), /* @__PURE__ */ React52.createElement("span", { className: `${className}__base-row` }, editable ? /* @__PURE__ */ React52.createElement(
|
|
3659
3673
|
CategorySelect,
|
|
@@ -3895,8 +3909,8 @@ var hueToRgb = (p, q, t) => {
|
|
|
3895
3909
|
};
|
|
3896
3910
|
var hslToRgb = (hsl) => {
|
|
3897
3911
|
let r, g, b;
|
|
3898
|
-
|
|
3899
|
-
|
|
3912
|
+
const l = hsl.l / 100;
|
|
3913
|
+
const s = hsl.s / 100;
|
|
3900
3914
|
if (hsl.s === 0) {
|
|
3901
3915
|
r = g = b = l;
|
|
3902
3916
|
} else {
|
|
@@ -4040,20 +4054,20 @@ var usePagination = ({
|
|
|
4040
4054
|
const firstPageIndex = 1;
|
|
4041
4055
|
const lastPageIndex = totalPageCount;
|
|
4042
4056
|
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
4043
|
-
|
|
4044
|
-
|
|
4057
|
+
const leftItemCount = 3 + 2 * siblingCount;
|
|
4058
|
+
const leftRange = range(1, leftItemCount);
|
|
4045
4059
|
return [...leftRange, DOTS, totalPageCount];
|
|
4046
4060
|
}
|
|
4047
4061
|
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
4048
|
-
|
|
4049
|
-
|
|
4062
|
+
const rightItemCount = 3 + 2 * siblingCount;
|
|
4063
|
+
const rightRange = range(
|
|
4050
4064
|
totalPageCount - rightItemCount + 1,
|
|
4051
4065
|
totalPageCount
|
|
4052
4066
|
);
|
|
4053
4067
|
return [firstPageIndex, DOTS, ...rightRange];
|
|
4054
4068
|
}
|
|
4055
4069
|
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
4056
|
-
|
|
4070
|
+
const middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
4057
4071
|
return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
|
|
4058
4072
|
}
|
|
4059
4073
|
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
@@ -4129,11 +4143,11 @@ var Pagination = ({
|
|
|
4129
4143
|
if (currentPage === 0 || paginationRange.length < 2) {
|
|
4130
4144
|
return;
|
|
4131
4145
|
}
|
|
4132
|
-
|
|
4146
|
+
const lastPage = paginationRange[paginationRange.length - 1];
|
|
4133
4147
|
return /* @__PURE__ */ React59.createElement("ul", { className: "Layer__pagination" }, /* @__PURE__ */ React59.createElement(
|
|
4134
4148
|
"li",
|
|
4135
4149
|
{
|
|
4136
|
-
key:
|
|
4150
|
+
key: "page-prev",
|
|
4137
4151
|
className: classnames(
|
|
4138
4152
|
"Layer__pagination-item Layer__pagination-arrow Layer__pagination-arrow--previous",
|
|
4139
4153
|
{
|
|
@@ -4172,7 +4186,7 @@ var Pagination = ({
|
|
|
4172
4186
|
}), /* @__PURE__ */ React59.createElement(
|
|
4173
4187
|
"li",
|
|
4174
4188
|
{
|
|
4175
|
-
key:
|
|
4189
|
+
key: "page-last",
|
|
4176
4190
|
className: classnames(
|
|
4177
4191
|
"Layer__pagination-item Layer__pagination-arrow Layer__pagination-arrow--next",
|
|
4178
4192
|
{
|
|
@@ -4207,7 +4221,9 @@ var filterVisibility = (display, bankTransaction) => {
|
|
|
4207
4221
|
var BankTransactions = ({
|
|
4208
4222
|
asWidget = false,
|
|
4209
4223
|
pageSize = 15,
|
|
4210
|
-
categorizedOnly = false
|
|
4224
|
+
categorizedOnly = false,
|
|
4225
|
+
showDescriptions = false,
|
|
4226
|
+
showReceiptUploads = false
|
|
4211
4227
|
}) => {
|
|
4212
4228
|
const [display, setDisplay] = useState11(
|
|
4213
4229
|
categorizedOnly ? "categorized" /* categorized */ : "review" /* review */
|
|
@@ -4318,7 +4334,9 @@ var BankTransactions = ({
|
|
|
4318
4334
|
bankTransaction,
|
|
4319
4335
|
editable,
|
|
4320
4336
|
removeTransaction,
|
|
4321
|
-
containerWidth
|
|
4337
|
+
containerWidth,
|
|
4338
|
+
showDescriptions,
|
|
4339
|
+
showReceiptUploads
|
|
4322
4340
|
}
|
|
4323
4341
|
)
|
|
4324
4342
|
))
|
|
@@ -4334,7 +4352,9 @@ var BankTransactions = ({
|
|
|
4334
4352
|
bankTransaction,
|
|
4335
4353
|
editable,
|
|
4336
4354
|
removeTransaction,
|
|
4337
|
-
containerWidth
|
|
4355
|
+
containerWidth,
|
|
4356
|
+
showDescriptions,
|
|
4357
|
+
showReceiptUploads
|
|
4338
4358
|
}
|
|
4339
4359
|
)
|
|
4340
4360
|
)) : null,
|
|
@@ -4394,6 +4414,8 @@ var LinkedAccountsContext = createContext2({
|
|
|
4394
4414
|
loadingStatus: "initial",
|
|
4395
4415
|
isValidating: false,
|
|
4396
4416
|
error: void 0,
|
|
4417
|
+
updateConnectionStatus: () => {
|
|
4418
|
+
},
|
|
4397
4419
|
addConnection: () => {
|
|
4398
4420
|
},
|
|
4399
4421
|
removeConnection: () => {
|
|
@@ -4586,7 +4608,7 @@ var useLinkedAccounts = () => {
|
|
|
4586
4608
|
if (linkMode == "add") {
|
|
4587
4609
|
exchangePlaidPublicToken2(publicToken, metadata);
|
|
4588
4610
|
} else {
|
|
4589
|
-
await
|
|
4611
|
+
await updateConnectionStatus2();
|
|
4590
4612
|
refetchAccounts();
|
|
4591
4613
|
setLinkMode("add");
|
|
4592
4614
|
}
|
|
@@ -4654,7 +4676,6 @@ var useLinkedAccounts = () => {
|
|
|
4654
4676
|
accountId
|
|
4655
4677
|
}
|
|
4656
4678
|
});
|
|
4657
|
-
syncAccounts();
|
|
4658
4679
|
await refetchAccounts();
|
|
4659
4680
|
} else {
|
|
4660
4681
|
console.error(
|
|
@@ -4704,6 +4725,12 @@ var useLinkedAccounts = () => {
|
|
|
4704
4725
|
params: { businessId }
|
|
4705
4726
|
});
|
|
4706
4727
|
};
|
|
4728
|
+
const updateConnectionStatus2 = async () => {
|
|
4729
|
+
DEBUG && console.log("updating connection status...");
|
|
4730
|
+
await Layer.updateConnectionStatus(apiUrl, auth?.access_token, {
|
|
4731
|
+
params: { businessId }
|
|
4732
|
+
});
|
|
4733
|
+
};
|
|
4707
4734
|
const unlinkPlaidItem2 = async (plaidItemPlaidId) => {
|
|
4708
4735
|
DEBUG && console.log("unlinking plaid item");
|
|
4709
4736
|
await Layer.unlinkPlaidItem(apiUrl, auth?.access_token, {
|
|
@@ -4725,7 +4752,8 @@ var useLinkedAccounts = () => {
|
|
|
4725
4752
|
confirmAccount,
|
|
4726
4753
|
denyAccount,
|
|
4727
4754
|
breakConnection,
|
|
4728
|
-
syncAccounts
|
|
4755
|
+
syncAccounts,
|
|
4756
|
+
updateConnectionStatus: updateConnectionStatus2
|
|
4729
4757
|
};
|
|
4730
4758
|
};
|
|
4731
4759
|
|
|
@@ -4899,7 +4927,7 @@ var LinkedAccountOptions = ({
|
|
|
4899
4927
|
"Layer__linked-accounts__options",
|
|
4900
4928
|
showLedgerBalance == false && "--hide-ledger-balance"
|
|
4901
4929
|
);
|
|
4902
|
-
return /* @__PURE__ */ React66.createElement("div", { className: linkedAccountOptionsClassName }, /* @__PURE__ */ React66.createElement("div", { className: "Layer__linked-accounts__options-overlay" }, /* @__PURE__ */ React66.createElement("div", { className: "Layer__linked-accounts__options-overlay-button" }, /* @__PURE__ */ React66.createElement(HoverMenu, { config }, /* @__PURE__ */ React66.createElement(MoreVertical_default, { size: 16 })))), children);
|
|
4930
|
+
return /* @__PURE__ */ React66.createElement("div", { className: linkedAccountOptionsClassName }, /* @__PURE__ */ React66.createElement("div", { className: "Layer__linked-accounts__options-overlay" }, config.length ? /* @__PURE__ */ React66.createElement("div", { className: "Layer__linked-accounts__options-overlay-button" }, /* @__PURE__ */ React66.createElement(HoverMenu, { config }, /* @__PURE__ */ React66.createElement(MoreVertical_default, { size: 16 }))) : null), children);
|
|
4903
4931
|
};
|
|
4904
4932
|
|
|
4905
4933
|
// src/components/LinkedAccountThumb/LinkedAccountThumb.tsx
|
|
@@ -5335,36 +5363,38 @@ var LinkedAccountsContent = ({
|
|
|
5335
5363
|
{
|
|
5336
5364
|
key: `linked-acc-${index}`,
|
|
5337
5365
|
config: [
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5366
|
+
...account.external_account_source === "PLAID" ? [
|
|
5367
|
+
{
|
|
5368
|
+
name: "Unlink account",
|
|
5369
|
+
action: async () => {
|
|
5370
|
+
if (!confirm(
|
|
5371
|
+
"Please confirm you wish to remove this financial account"
|
|
5372
|
+
)) {
|
|
5373
|
+
return;
|
|
5374
|
+
}
|
|
5375
|
+
await unlinkAccount2(
|
|
5376
|
+
account.external_account_source,
|
|
5377
|
+
account.id
|
|
5378
|
+
);
|
|
5345
5379
|
}
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
)
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5380
|
+
},
|
|
5381
|
+
{
|
|
5382
|
+
name: `Unlink all accounts under this ${account.institution?.name} connection`,
|
|
5383
|
+
action: async () => {
|
|
5384
|
+
if (!account.connection_external_id || !confirm(
|
|
5385
|
+
`Please confirm you wish to remove all accounts belonging to ${account.institution?.name || "this institution"}`
|
|
5386
|
+
)) {
|
|
5387
|
+
return;
|
|
5388
|
+
}
|
|
5389
|
+
await removeConnection(
|
|
5390
|
+
account.external_account_source,
|
|
5391
|
+
account.connection_external_id
|
|
5392
|
+
);
|
|
5359
5393
|
}
|
|
5360
|
-
await removeConnection(
|
|
5361
|
-
account.external_account_source,
|
|
5362
|
-
account.connection_external_id
|
|
5363
|
-
);
|
|
5364
5394
|
}
|
|
5365
|
-
|
|
5395
|
+
] : [],
|
|
5366
5396
|
...pillConfig ? pillConfig.config : [],
|
|
5367
|
-
...environment === "staging" && !account.connection_needs_repair_as_of ? [
|
|
5397
|
+
...environment === "staging" && !account.connection_needs_repair_as_of && account.external_account_source === "PLAID" ? [
|
|
5368
5398
|
{
|
|
5369
5399
|
name: "Break connection (test utility)",
|
|
5370
5400
|
action: async () => {
|
|
@@ -5854,7 +5884,7 @@ var humanizeEnum = (text) => {
|
|
|
5854
5884
|
var convertNumberToCurrency = (amount) => {
|
|
5855
5885
|
if (!amount)
|
|
5856
5886
|
return "";
|
|
5857
|
-
|
|
5887
|
+
const formattedValue = amount.toLocaleString("en-US");
|
|
5858
5888
|
return formattedValue.length > 0 ? `$${formattedValue}` : "";
|
|
5859
5889
|
};
|
|
5860
5890
|
var convertCurrencyToNumber = (amount) => {
|
|
@@ -6235,7 +6265,7 @@ var ProfitAndLossChart = () => {
|
|
|
6235
6265
|
patternUnits: "userSpaceOnUse"
|
|
6236
6266
|
},
|
|
6237
6267
|
/* @__PURE__ */ React74.createElement("rect", { width: "4", height: "4", opacity: 0.16 }),
|
|
6238
|
-
/* @__PURE__ */ React74.createElement("line", { x1: "0", y: "0", x2: "0", y2: "4",
|
|
6268
|
+
/* @__PURE__ */ React74.createElement("line", { x1: "0", y: "0", x2: "0", y2: "4", strokeWidth: "2" })
|
|
6239
6269
|
), /* @__PURE__ */ React74.createElement(
|
|
6240
6270
|
"pattern",
|
|
6241
6271
|
{
|
|
@@ -6248,7 +6278,7 @@ var ProfitAndLossChart = () => {
|
|
|
6248
6278
|
patternUnits: "userSpaceOnUse"
|
|
6249
6279
|
},
|
|
6250
6280
|
/* @__PURE__ */ React74.createElement("rect", { width: "4", height: "4", opacity: 0.16 }),
|
|
6251
|
-
/* @__PURE__ */ React74.createElement("line", { x1: "0", y: "0", x2: "0", y2: "4",
|
|
6281
|
+
/* @__PURE__ */ React74.createElement("line", { x1: "0", y: "0", x2: "0", y2: "4", strokeWidth: "2" })
|
|
6252
6282
|
)),
|
|
6253
6283
|
/* @__PURE__ */ React74.createElement(
|
|
6254
6284
|
Tooltip2,
|
|
@@ -7266,7 +7296,7 @@ var MiniChart = ({ data }) => {
|
|
|
7266
7296
|
Cell3,
|
|
7267
7297
|
{
|
|
7268
7298
|
key: `cell-${index}`,
|
|
7269
|
-
className:
|
|
7299
|
+
className: "Layer__profit-and-loss-detailed-charts__pie",
|
|
7270
7300
|
fill: entry.name === "placeholder" ? "#e6e6e6" : colorConfig.color,
|
|
7271
7301
|
opacity: colorConfig.opacity
|
|
7272
7302
|
}
|
|
@@ -9338,7 +9368,7 @@ var LedgerAccount = ({
|
|
|
9338
9368
|
onRefresh: () => refetch(),
|
|
9339
9369
|
isLoading: isValidating || isLoading
|
|
9340
9370
|
}
|
|
9341
|
-
)) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React105.createElement("div", { className:
|
|
9371
|
+
)) : null, (!data || isLoading) && !error ? /* @__PURE__ */ React105.createElement("div", { className: "Layer__ledger-account__loader-container" }, /* @__PURE__ */ React105.createElement(Loader2, null)) : null, !isLoading && !error && data?.length === 0 ? /* @__PURE__ */ React105.createElement("div", { className: "Layer__table-state-container" }, /* @__PURE__ */ React105.createElement(
|
|
9342
9372
|
DataState,
|
|
9343
9373
|
{
|
|
9344
9374
|
status: "info" /* info */,
|
|
@@ -9707,7 +9737,7 @@ var useJournal = () => {
|
|
|
9707
9737
|
(x) => x.id === value.value
|
|
9708
9738
|
);
|
|
9709
9739
|
if (foundParent) {
|
|
9710
|
-
|
|
9740
|
+
const newLineItem = {
|
|
9711
9741
|
...lineItem,
|
|
9712
9742
|
account_identifier: {
|
|
9713
9743
|
id: foundParent.id,
|
|
@@ -9723,7 +9753,7 @@ var useJournal = () => {
|
|
|
9723
9753
|
lineItems[lineItemIndex] = newLineItem;
|
|
9724
9754
|
}
|
|
9725
9755
|
} else {
|
|
9726
|
-
|
|
9756
|
+
const newLineItem = {
|
|
9727
9757
|
...lineItem,
|
|
9728
9758
|
[fieldName]: value
|
|
9729
9759
|
};
|
|
@@ -11114,7 +11144,7 @@ var TasksPending = () => {
|
|
|
11114
11144
|
Cell4,
|
|
11115
11145
|
{
|
|
11116
11146
|
key: `cell-${index}`,
|
|
11117
|
-
className:
|
|
11147
|
+
className: "Layer__profit-and-loss-detailed-charts__pie",
|
|
11118
11148
|
fill: TASKS_CHARTS_COLORS[task.name]
|
|
11119
11149
|
}
|
|
11120
11150
|
);
|
|
@@ -11129,7 +11159,7 @@ var Tasks = () => {
|
|
|
11129
11159
|
};
|
|
11130
11160
|
var TasksComponent = () => {
|
|
11131
11161
|
const { isLoading, data } = useContext30(TasksContext);
|
|
11132
|
-
return /* @__PURE__ */ React129.createElement(Container, { name: "tasks-component" }, /* @__PURE__ */ React129.createElement(TasksHeader, null), isLoading || !data ? /* @__PURE__ */ React129.createElement("div", { className:
|
|
11162
|
+
return /* @__PURE__ */ React129.createElement(Container, { name: "tasks-component" }, /* @__PURE__ */ React129.createElement(TasksHeader, null), isLoading || !data ? /* @__PURE__ */ React129.createElement("div", { className: "Layer__tasks__loader-container" }, /* @__PURE__ */ React129.createElement(Loader2, null)) : /* @__PURE__ */ React129.createElement(React129.Fragment, null, data.length > 0 && /* @__PURE__ */ React129.createElement(TasksPending, null), /* @__PURE__ */ React129.createElement(TasksList, null)));
|
|
11133
11163
|
};
|
|
11134
11164
|
|
|
11135
11165
|
// src/views/AccountingOverview/AccountingOverview.tsx
|
|
@@ -11340,7 +11370,9 @@ import React137 from "react";
|
|
|
11340
11370
|
var BankTransactionsWithLinkedAccounts = ({
|
|
11341
11371
|
title = "Bank transactions",
|
|
11342
11372
|
elevatedLinkedAccounts = true,
|
|
11343
|
-
showLedgerBalance = true
|
|
11373
|
+
showLedgerBalance = true,
|
|
11374
|
+
showDescriptions,
|
|
11375
|
+
showReceiptUploads
|
|
11344
11376
|
}) => {
|
|
11345
11377
|
return /* @__PURE__ */ React137.createElement(View3, { title }, /* @__PURE__ */ React137.createElement(
|
|
11346
11378
|
LinkedAccounts,
|
|
@@ -11348,7 +11380,14 @@ var BankTransactionsWithLinkedAccounts = ({
|
|
|
11348
11380
|
elevated: elevatedLinkedAccounts,
|
|
11349
11381
|
showLedgerBalance
|
|
11350
11382
|
}
|
|
11351
|
-
), /* @__PURE__ */ React137.createElement(
|
|
11383
|
+
), /* @__PURE__ */ React137.createElement(
|
|
11384
|
+
BankTransactions,
|
|
11385
|
+
{
|
|
11386
|
+
asWidget: true,
|
|
11387
|
+
showDescriptions,
|
|
11388
|
+
showReceiptUploads
|
|
11389
|
+
}
|
|
11390
|
+
));
|
|
11352
11391
|
};
|
|
11353
11392
|
|
|
11354
11393
|
// src/views/Reports/Reports.tsx
|