@mx-cartographer/experiences 3.1.0-alpha.sms5-await4 → 3.1.0-alpha.sms5-NOawait1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +255 -244
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
@@ -34,7 +34,7 @@ import { format as UA } from "date-fns/format";
|
|
34
34
|
import { isBefore as sA } from "date-fns/isBefore";
|
35
35
|
import { isSameMonth as Ji } from "date-fns/isSameMonth";
|
36
36
|
import { startOfMonth as vA } from "date-fns/startOfMonth";
|
37
|
-
import { startOfToday as
|
37
|
+
import { startOfToday as F } from "date-fns/startOfToday";
|
38
38
|
import { subMonths as xe } from "date-fns/subMonths";
|
39
39
|
import re from "@mui/material/Paper";
|
40
40
|
import Zi from "@mui/icons-material/KeyboardArrowLeftRounded";
|
@@ -66,7 +66,7 @@ import wo from "@mui/material/Radio";
|
|
66
66
|
import ge from "@mui/material/Avatar";
|
67
67
|
import TA from "@mui/material/ListItemAvatar";
|
68
68
|
import te from "@mui/material/ListItemIcon";
|
69
|
-
import { makeAutoObservable as yA, runInAction as
|
69
|
+
import { makeAutoObservable as yA, runInAction as V, reaction as Lo, observable as bo } from "mobx";
|
70
70
|
import { differenceInDays as To } from "date-fns/differenceInDays";
|
71
71
|
import { getMonth as Re } from "date-fns/getMonth";
|
72
72
|
import { useVirtualizer as yr } from "@tanstack/react-virtual";
|
@@ -1499,7 +1499,7 @@ const Ss = (A, e) => {
|
|
1499
1499
|
gap: 4
|
1500
1500
|
}
|
1501
1501
|
}), _s = ({ beginDate: A, date: e, endDate: n, isInMonth: a, onClick: r }) => {
|
1502
|
-
const i = aA(), o = fA(), s = Ks(o, i), c = A && n && Ke(e, { start: A, end: n }) && !DA(e, A) && !DA(e, n), d = A && n && DA(A, e) && !DA(A, n), u = n && A && DA(n, e) && !DA(A, n), h = A && DA(A, e) || n && DA(n, e), g = DA(e,
|
1502
|
+
const i = aA(), o = fA(), s = Ks(o, i), c = A && n && Ke(e, { start: A, end: n }) && !DA(e, A) && !DA(e, n), d = A && n && DA(A, e) && !DA(A, n), u = n && A && DA(n, e) && !DA(A, n), h = A && DA(A, e) || n && DA(n, e), g = DA(e, F());
|
1503
1503
|
return /* @__PURE__ */ t(
|
1504
1504
|
"div",
|
1505
1505
|
{
|
@@ -1591,7 +1591,7 @@ const Gs = ({
|
|
1591
1591
|
selectionType: i = "Single"
|
1592
1592
|
/* Single */
|
1593
1593
|
}) => {
|
1594
|
-
const o = fA(), s = Qs(o), [c, d] = C.useState(
|
1594
|
+
const o = fA(), s = Qs(o), [c, d] = C.useState(F), [u, h] = C.useState(e), [g, v] = C.useState(n);
|
1595
1595
|
C.useEffect(() => {
|
1596
1596
|
h(e), v(n), e && d(e);
|
1597
1597
|
}, [e, n]);
|
@@ -1613,7 +1613,7 @@ const Gs = ({
|
|
1613
1613
|
!u || g ? (h(L), v(void 0)) : sA(L, u) ? (v(u), h(L), r?.(L, u)) : (v(L), r?.(u, L));
|
1614
1614
|
}
|
1615
1615
|
}, E = () => {
|
1616
|
-
const L =
|
1616
|
+
const L = F();
|
1617
1617
|
d(L), i !== "None" && (h(L), i === "Single" ? a?.(L) : (v(L), r?.(L, L)));
|
1618
1618
|
}, b = () => {
|
1619
1619
|
d(QA(c, 1));
|
@@ -2061,7 +2061,7 @@ const Gs = ({
|
|
2061
2061
|
calendarActions: A,
|
2062
2062
|
color: e = "primary",
|
2063
2063
|
copy: n,
|
2064
|
-
range: a = [vA(
|
2064
|
+
range: a = [vA(F()), PA(ke())],
|
2065
2065
|
shouldShrinkToIcon: r = !0,
|
2066
2066
|
toolTipContent: i = "",
|
2067
2067
|
variant: o = "outlined"
|
@@ -2370,7 +2370,7 @@ const Gs = ({
|
|
2370
2370
|
if (!e)
|
2371
2371
|
throw new Error(`${A}() must be used within the GlobalDataContext`);
|
2372
2372
|
return e;
|
2373
|
-
}, zA = () => _A("useAccountStore").globalStore.accountStore, Xt = () => _A("useBudgetsStore").globalStore.budgetsStore, Xn = () => _A("useCashflowStore").globalStore.cashflowStore, LA = () => _A("useCategoryStore").globalStore.categoryStore, Fn = () => _A("useGlobalStore").globalStore, mA = () => _A("useGlobalUiStore").globalStore.globalUiStore, X = () => _A("globalCopyStore").globalStore.copyStore.copy, ec = () => _A("useMerchantStore").globalStore.merchantStore, jr = () => _A("useNotificationStore").globalStore.notificationStore, xA = () => _A("useRecurringActivityStore").globalStore.recurringActivityStore, nA = () => _A("useTransactionStore").globalStore.transactionStore, Ft = () => _A("useUserStore").globalStore.userStore,
|
2373
|
+
}, zA = () => _A("useAccountStore").globalStore.accountStore, Xt = () => _A("useBudgetsStore").globalStore.budgetsStore, Xn = () => _A("useCashflowStore").globalStore.cashflowStore, LA = () => _A("useCategoryStore").globalStore.categoryStore, Fn = () => _A("useGlobalStore").globalStore, mA = () => _A("useGlobalUiStore").globalStore.globalUiStore, X = () => _A("globalCopyStore").globalStore.copyStore.copy, ec = () => _A("useMerchantStore").globalStore.merchantStore, jr = () => _A("useNotificationStore").globalStore.notificationStore, xA = () => _A("useRecurringActivityStore").globalStore.recurringActivityStore, nA = () => _A("useTransactionStore").globalStore.transactionStore, Ft = () => _A("useUserStore").globalStore.userStore, j = () => ({ onEvent: _A().onEvent }), f7 = () => ({ onPageView: _A().onPageView }), tc = (A = "useWidgetContainerContext") => {
|
2374
2374
|
const e = C.useContext(Xr);
|
2375
2375
|
if (!e)
|
2376
2376
|
throw new Error(`${A}() must be used within the WidgetContainerContext`);
|
@@ -2873,7 +2873,7 @@ const Te = ({
|
|
2873
2873
|
onClick: n,
|
2874
2874
|
sx: a = {}
|
2875
2875
|
}) => {
|
2876
|
-
const { onEvent: r } =
|
2876
|
+
const { onEvent: r } = j();
|
2877
2877
|
return n ? /* @__PURE__ */ t(eA, { sx: { bgcolor: "background.paper", ...a }, children: /* @__PURE__ */ t(
|
2878
2878
|
iA,
|
2879
2879
|
{
|
@@ -2901,14 +2901,14 @@ class cc {
|
|
2901
2901
|
yA(this);
|
2902
2902
|
}
|
2903
2903
|
initialize = async (e, n) => {
|
2904
|
-
this.api = new xt(e, n), await this.getCopy(this.featureNamespace),
|
2904
|
+
this.api = new xt(e, n), await this.getCopy(this.featureNamespace), V(() => {
|
2905
2905
|
this.isInitialized = !0;
|
2906
2906
|
});
|
2907
2907
|
};
|
2908
2908
|
getCopy = async (e, n = "") => {
|
2909
2909
|
try {
|
2910
2910
|
const a = await this.api.getGlobalCopy(e, n);
|
2911
|
-
|
2911
|
+
V(() => {
|
2912
2912
|
this.copy = a[e];
|
2913
2913
|
});
|
2914
2914
|
} catch (a) {
|
@@ -2927,7 +2927,7 @@ class lc {
|
|
2927
2927
|
};
|
2928
2928
|
loadBeats = async () => {
|
2929
2929
|
const e = await this.api.getBeats();
|
2930
|
-
|
2930
|
+
V(() => {
|
2931
2931
|
this.beats = e;
|
2932
2932
|
});
|
2933
2933
|
};
|
@@ -2954,7 +2954,7 @@ class dc {
|
|
2954
2954
|
loadBudgets = async () => {
|
2955
2955
|
try {
|
2956
2956
|
const e = await this.api.getBudgets();
|
2957
|
-
|
2957
|
+
V(() => {
|
2958
2958
|
this.budgets = e.filter(
|
2959
2959
|
(n) => n.category_guid !== f.INCOME && n.category_guid !== f.TRANSFER
|
2960
2960
|
);
|
@@ -3266,7 +3266,7 @@ const Cc = [
|
|
3266
3266
|
tags: u
|
3267
3267
|
};
|
3268
3268
|
});
|
3269
|
-
},
|
3269
|
+
}, U = {
|
3270
3270
|
ADD: "Add",
|
3271
3271
|
ADD_CATEGORY: "Add Category",
|
3272
3272
|
CHANGE_CATEGORY: "Change Category",
|
@@ -3280,11 +3280,11 @@ const Cc = [
|
|
3280
3280
|
SELECT: "Select",
|
3281
3281
|
UNHIDE: "Unhide",
|
3282
3282
|
UNSPLIT: "Unsplit"
|
3283
|
-
},
|
3283
|
+
}, W = {
|
3284
3284
|
TRANSACTION_DETAILS: "Transaction Details",
|
3285
3285
|
TRANSACTIONS_LIST: "Transactions List",
|
3286
3286
|
TRANSACTIONS_WIDGET: "Transactions Widget"
|
3287
|
-
},
|
3287
|
+
}, Y = {
|
3288
3288
|
ADD_TRANSACTION: "Manual Transaction",
|
3289
3289
|
CATEGORY: "Category",
|
3290
3290
|
DATE: "Date",
|
@@ -3306,216 +3306,216 @@ const Cc = [
|
|
3306
3306
|
}, Ma = {
|
3307
3307
|
// splits
|
3308
3308
|
[D.ON_TRANSACTION_SPLIT_CLICK]: {
|
3309
|
-
action:
|
3310
|
-
category:
|
3311
|
-
label:
|
3309
|
+
action: U.SELECT,
|
3310
|
+
category: W.TRANSACTION_DETAILS,
|
3311
|
+
label: Y.SPLITS
|
3312
3312
|
},
|
3313
3313
|
[D.ON_TRANSACTION_SPLIT_CATEGORY_CLICK]: {
|
3314
|
-
action:
|
3315
|
-
category:
|
3316
|
-
label:
|
3314
|
+
action: U.ADD_CATEGORY,
|
3315
|
+
category: W.TRANSACTION_DETAILS,
|
3316
|
+
label: Y.SPLITS
|
3317
3317
|
},
|
3318
3318
|
[D.ON_TRANSACTION_SPLIT_DELETE_CLICK]: {
|
3319
|
-
action:
|
3320
|
-
category:
|
3321
|
-
label:
|
3319
|
+
action: U.DELETE,
|
3320
|
+
category: W.TRANSACTION_DETAILS,
|
3321
|
+
label: Y.SPLITS
|
3322
3322
|
},
|
3323
3323
|
[D.ON_TRANSACTION_SPLIT_SAVE_CLICK]: {
|
3324
|
-
action:
|
3325
|
-
category:
|
3326
|
-
label:
|
3324
|
+
action: U.SPLIT,
|
3325
|
+
category: W.TRANSACTION_DETAILS,
|
3326
|
+
label: Y.SPLITS
|
3327
3327
|
},
|
3328
3328
|
[D.ON_TRANSACTION_UNSPLIT]: {
|
3329
|
-
action:
|
3330
|
-
category:
|
3331
|
-
label:
|
3329
|
+
action: U.UNSPLIT,
|
3330
|
+
category: W.TRANSACTION_DETAILS,
|
3331
|
+
label: Y.SPLITS
|
3332
3332
|
},
|
3333
3333
|
// category
|
3334
3334
|
[D.ON_TRANSACTION_CATEGORY_CLICK]: {
|
3335
|
-
action:
|
3336
|
-
category:
|
3337
|
-
label:
|
3335
|
+
action: U.SELECT,
|
3336
|
+
category: W.TRANSACTIONS_LIST,
|
3337
|
+
label: Y.CATEGORY
|
3338
3338
|
},
|
3339
3339
|
[D.ON_TRANSACTION_CATEGORY_CHANGED]: {
|
3340
|
-
action:
|
3341
|
-
category:
|
3342
|
-
label:
|
3340
|
+
action: U.CHANGE_CATEGORY,
|
3341
|
+
category: W.TRANSACTION_DETAILS,
|
3342
|
+
label: Y.CATEGORY
|
3343
3343
|
},
|
3344
3344
|
// date
|
3345
3345
|
[D.ON_TRANSACTION_DATE_CHANGED]: {
|
3346
|
-
action:
|
3347
|
-
category:
|
3348
|
-
label:
|
3346
|
+
action: U.SAVE,
|
3347
|
+
category: W.TRANSACTION_DETAILS,
|
3348
|
+
label: Y.DATE
|
3349
3349
|
},
|
3350
3350
|
[D.ON_TRANSACTION_DATE_CLICK]: {
|
3351
|
-
action:
|
3352
|
-
category:
|
3353
|
-
label:
|
3351
|
+
action: U.SELECT,
|
3352
|
+
category: W.TRANSACTION_DETAILS,
|
3353
|
+
label: Y.DATE
|
3354
3354
|
},
|
3355
3355
|
// merchant logo
|
3356
3356
|
[D.ON_TRANSACTION_DELETE_LOGO_CANCEL]: {
|
3357
|
-
action:
|
3358
|
-
category:
|
3359
|
-
label:
|
3357
|
+
action: U.CLOSE,
|
3358
|
+
category: W.TRANSACTION_DETAILS,
|
3359
|
+
label: Y.DELETE_MERCHANT_LOGO
|
3360
3360
|
},
|
3361
3361
|
[D.ON_TRANSACTION_DELETE_LOGO_CLICK]: {
|
3362
|
-
action:
|
3363
|
-
category:
|
3364
|
-
label:
|
3362
|
+
action: U.SELECT,
|
3363
|
+
category: W.TRANSACTION_DETAILS,
|
3364
|
+
label: Y.DELETE_MERCHANT_LOGO
|
3365
3365
|
},
|
3366
3366
|
[D.ON_TRANSACTION_DELETE_LOGO_DELETED]: {
|
3367
|
-
action:
|
3368
|
-
category:
|
3369
|
-
label:
|
3367
|
+
action: U.DELETE,
|
3368
|
+
category: W.TRANSACTION_DETAILS,
|
3369
|
+
label: Y.DELETE_MERCHANT_LOGO
|
3370
3370
|
},
|
3371
3371
|
// description
|
3372
3372
|
[D.ON_TRANSACTION_DESCRIPTION_EDIT_CLICK]: {
|
3373
|
-
action:
|
3374
|
-
category:
|
3375
|
-
label:
|
3373
|
+
action: U.EDIT,
|
3374
|
+
category: W.TRANSACTION_DETAILS,
|
3375
|
+
label: Y.DESCRIPTION
|
3376
3376
|
},
|
3377
3377
|
[D.ON_TRANSACTION_DESCRIPTION_SAVE_CLICK]: {
|
3378
|
-
action:
|
3379
|
-
category:
|
3380
|
-
label:
|
3378
|
+
action: U.SAVE,
|
3379
|
+
category: W.TRANSACTION_DETAILS,
|
3380
|
+
label: Y.DESCRIPTION
|
3381
3381
|
},
|
3382
3382
|
// hide transactions
|
3383
3383
|
[D.ON_TRANSACTION_HIDDEN]: {
|
3384
|
-
action:
|
3385
|
-
category:
|
3386
|
-
label:
|
3384
|
+
action: U.SAVE,
|
3385
|
+
category: W.TRANSACTION_DETAILS,
|
3386
|
+
label: Y.HIDE_TRANSACTION
|
3387
3387
|
},
|
3388
3388
|
[D.ON_TRANSACTION_HIDE_CLICK]: {
|
3389
|
-
action:
|
3390
|
-
category:
|
3391
|
-
label:
|
3389
|
+
action: U.SELECT,
|
3390
|
+
category: W.TRANSACTION_DETAILS,
|
3391
|
+
label: Y.HIDE_TRANSACTION
|
3392
3392
|
},
|
3393
3393
|
[D.ON_TRANSACTION_HIDE_CANCEL_CLICK]: {
|
3394
|
-
action:
|
3395
|
-
category:
|
3396
|
-
label:
|
3394
|
+
action: U.CLOSE,
|
3395
|
+
category: W.TRANSACTION_DETAILS,
|
3396
|
+
label: Y.HIDE_TRANSACTION
|
3397
3397
|
},
|
3398
3398
|
// transaction list
|
3399
3399
|
[D.ON_TRANSACTION_LIST_ITEM_CLICK]: {
|
3400
|
-
action:
|
3401
|
-
category:
|
3402
|
-
label:
|
3400
|
+
action: U.SELECT,
|
3401
|
+
category: W.TRANSACTIONS_LIST,
|
3402
|
+
label: Y.TRANSACTION
|
3403
3403
|
},
|
3404
3404
|
// memo
|
3405
3405
|
[D.ON_TRANSACTION_MEMO_CHANGED]: {
|
3406
|
-
action:
|
3407
|
-
category:
|
3408
|
-
label:
|
3406
|
+
action: U.SAVE,
|
3407
|
+
category: W.TRANSACTION_DETAILS,
|
3408
|
+
label: Y.MEMO
|
3409
3409
|
},
|
3410
3410
|
[D.ON_TRANSACTION_MEMO_CLICK]: {
|
3411
|
-
action:
|
3412
|
-
category:
|
3413
|
-
label:
|
3411
|
+
action: U.SELECT,
|
3412
|
+
category: W.TRANSACTION_DETAILS,
|
3413
|
+
label: Y.MEMO
|
3414
3414
|
},
|
3415
3415
|
// tags
|
3416
3416
|
[D.ON_TRANSACTION_TAGS_CHANGED]: {
|
3417
|
-
action:
|
3418
|
-
category:
|
3419
|
-
label:
|
3417
|
+
action: U.SAVE,
|
3418
|
+
category: W.TRANSACTION_DETAILS,
|
3419
|
+
label: Y.TAGS
|
3420
3420
|
},
|
3421
3421
|
[D.ON_TRANSACTION_TAGS_CLICK]: {
|
3422
|
-
action:
|
3423
|
-
category:
|
3424
|
-
label:
|
3422
|
+
action: U.SELECT,
|
3423
|
+
category: W.TRANSACTION_DETAILS,
|
3424
|
+
label: Y.TAGS
|
3425
3425
|
},
|
3426
3426
|
[D.ON_TRANSACTION_TAGS_TAG_ADD_CANCEL_CLICK]: {
|
3427
|
-
action:
|
3428
|
-
category:
|
3429
|
-
label:
|
3427
|
+
action: U.CLOSE,
|
3428
|
+
category: W.TRANSACTION_DETAILS,
|
3429
|
+
label: Y.TAGS
|
3430
3430
|
},
|
3431
3431
|
[D.ON_TRANSACTION_TAGS_TAG_ADD_CLICK]: {
|
3432
|
-
action:
|
3433
|
-
category:
|
3434
|
-
label:
|
3432
|
+
action: U.ADD,
|
3433
|
+
category: W.TRANSACTION_DETAILS,
|
3434
|
+
label: Y.TAG_ADD
|
3435
3435
|
},
|
3436
3436
|
[D.ON_TRANSACTION_TAGS_TAG_ADDED]: {
|
3437
|
-
action:
|
3438
|
-
category:
|
3439
|
-
label:
|
3437
|
+
action: U.SAVE,
|
3438
|
+
category: W.TRANSACTION_DETAILS,
|
3439
|
+
label: Y.TAG_ADD
|
3440
3440
|
},
|
3441
3441
|
[D.ON_TRANSACTION_TAGS_TAG_DELETE_CLICK]: {
|
3442
|
-
action:
|
3443
|
-
category:
|
3444
|
-
label:
|
3442
|
+
action: U.SELECT,
|
3443
|
+
category: W.TRANSACTION_DETAILS,
|
3444
|
+
label: Y.TAG_DELETE
|
3445
3445
|
},
|
3446
3446
|
[D.ON_TRANSACTION_TAGS_TAG_DELETE_CANCEL_CLICK]: {
|
3447
|
-
action:
|
3448
|
-
category:
|
3449
|
-
label:
|
3447
|
+
action: U.CLOSE,
|
3448
|
+
category: W.TRANSACTION_DETAILS,
|
3449
|
+
label: Y.TAG_DELETE
|
3450
3450
|
},
|
3451
3451
|
[D.ON_TRANSACTION_TAGS_TAG_DELETED]: {
|
3452
|
-
action:
|
3453
|
-
category:
|
3454
|
-
label:
|
3452
|
+
action: U.SAVE,
|
3453
|
+
category: W.TRANSACTION_DETAILS,
|
3454
|
+
label: Y.TAG_DELETE
|
3455
3455
|
},
|
3456
3456
|
[D.ON_TRANSACTION_TAGS_TAG_EDIT_CLICK]: {
|
3457
|
-
action:
|
3458
|
-
category:
|
3459
|
-
label:
|
3457
|
+
action: U.EDIT,
|
3458
|
+
category: W.TRANSACTION_DETAILS,
|
3459
|
+
label: Y.TAG_EDIT
|
3460
3460
|
},
|
3461
3461
|
[D.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED]: {
|
3462
|
-
action:
|
3463
|
-
category:
|
3464
|
-
label:
|
3462
|
+
action: U.SAVE,
|
3463
|
+
category: W.TRANSACTION_DETAILS,
|
3464
|
+
label: Y.TAG_EDIT
|
3465
3465
|
},
|
3466
3466
|
// flag
|
3467
3467
|
[D.ON_TRANSACTION_TOGGLE_FLAG_CLICK]: {
|
3468
|
-
action:
|
3469
|
-
category:
|
3470
|
-
label:
|
3468
|
+
action: U.SELECT,
|
3469
|
+
category: W.TRANSACTION_DETAILS,
|
3470
|
+
label: Y.FLAG
|
3471
3471
|
},
|
3472
3472
|
// hide
|
3473
3473
|
[D.ON_TRANSACTION_UNHIDDEN]: {
|
3474
|
-
action:
|
3475
|
-
category:
|
3476
|
-
label:
|
3474
|
+
action: U.SAVE,
|
3475
|
+
category: W.TRANSACTION_DETAILS,
|
3476
|
+
label: Y.UNHIDE_TRANSACTION
|
3477
3477
|
},
|
3478
3478
|
[D.ON_TRANSACTION_UNHIDE_CLICK]: {
|
3479
|
-
action:
|
3480
|
-
category:
|
3481
|
-
label:
|
3479
|
+
action: U.SELECT,
|
3480
|
+
category: W.TRANSACTION_DETAILS,
|
3481
|
+
label: Y.UNHIDE_TRANSACTION
|
3482
3482
|
},
|
3483
3483
|
[D.ON_TRANSACTION_UNHIDE_CANCEL_CLICK]: {
|
3484
|
-
action:
|
3485
|
-
category:
|
3486
|
-
label:
|
3484
|
+
action: U.CLOSE,
|
3485
|
+
category: W.TRANSACTION_DETAILS,
|
3486
|
+
label: Y.UNHIDE_TRANSACTION
|
3487
3487
|
},
|
3488
3488
|
// export CSV
|
3489
3489
|
[D.ON_TRANSACTION_EXPORT_CSV_CLICK]: {
|
3490
|
-
action:
|
3491
|
-
category:
|
3492
|
-
label:
|
3490
|
+
action: U.SELECT,
|
3491
|
+
category: W.TRANSACTIONS_WIDGET,
|
3492
|
+
label: Y.EXPORT_CSV
|
3493
3493
|
},
|
3494
3494
|
// add transaction
|
3495
3495
|
[D.ON_TRANSACTION_MANUAL_ADD_CLICK]: {
|
3496
|
-
action:
|
3497
|
-
category:
|
3498
|
-
label:
|
3496
|
+
action: U.SELECT,
|
3497
|
+
category: W.TRANSACTIONS_WIDGET,
|
3498
|
+
label: Y.ADD_TRANSACTION
|
3499
3499
|
},
|
3500
3500
|
[D.ON_TRANSACTION_MANUAL_ADD_ADDED]: {
|
3501
|
-
action:
|
3502
|
-
category:
|
3503
|
-
label:
|
3501
|
+
action: U.ADD,
|
3502
|
+
category: W.TRANSACTIONS_WIDGET,
|
3503
|
+
label: Y.ADD_TRANSACTION
|
3504
3504
|
},
|
3505
3505
|
[D.ON_TRANSACTION_DELETE_CLICK]: {
|
3506
|
-
action:
|
3507
|
-
category:
|
3508
|
-
label:
|
3506
|
+
action: U.SELECT,
|
3507
|
+
category: W.TRANSACTIONS_WIDGET,
|
3508
|
+
label: Y.DELETE_TRANSACTION
|
3509
3509
|
},
|
3510
3510
|
[D.ON_TRANSACTION_DELETE_CANCEL]: {
|
3511
|
-
action:
|
3512
|
-
category:
|
3513
|
-
label:
|
3511
|
+
action: U.CLOSE,
|
3512
|
+
category: W.TRANSACTIONS_WIDGET,
|
3513
|
+
label: Y.DELETE_TRANSACTION
|
3514
3514
|
},
|
3515
3515
|
[D.ON_TRANSACTION_DELETE_DELETED]: {
|
3516
|
-
action:
|
3517
|
-
category:
|
3518
|
-
label:
|
3516
|
+
action: U.DELETE,
|
3517
|
+
category: W.TRANSACTIONS_WIDGET,
|
3518
|
+
label: Y.DELETE_TRANSACTION
|
3519
3519
|
}
|
3520
3520
|
}, pc = async (A, e) => !e || !Ma[A] ? null : await e.sendAnalyticEvent(Ma[A]), Tn = {
|
3521
3521
|
FLAG: "flag",
|
@@ -3533,7 +3533,7 @@ const Cc = [
|
|
3533
3533
|
}, Ec = (A, e, n) => {
|
3534
3534
|
const {
|
3535
3535
|
accounts: a = [],
|
3536
|
-
dateRange: r = { start: ee(
|
3536
|
+
dateRange: r = { start: ee(F(), 90), end: ke() },
|
3537
3537
|
custom: i = () => !0,
|
3538
3538
|
searchTerm: o = ""
|
3539
3539
|
} = A;
|
@@ -3634,7 +3634,7 @@ class Dc {
|
|
3634
3634
|
transactionRules = [];
|
3635
3635
|
transactions = [];
|
3636
3636
|
associatedBeats = [];
|
3637
|
-
cachedStartDate = ee(
|
3637
|
+
cachedStartDate = ee(F(), 90);
|
3638
3638
|
onAnalyticEvent = pc;
|
3639
3639
|
sortColumn = Tn.DATE;
|
3640
3640
|
sortDirection = Wr.DESC;
|
@@ -3687,7 +3687,7 @@ class Dc {
|
|
3687
3687
|
};
|
3688
3688
|
addTransaction = async (e) => {
|
3689
3689
|
const n = await this.api.addTransaction(e);
|
3690
|
-
n &&
|
3690
|
+
n && V(
|
3691
3691
|
() => this.transactions = this.augmentTransactions([n, ...this.transactions])
|
3692
3692
|
);
|
3693
3693
|
};
|
@@ -3699,19 +3699,19 @@ class Dc {
|
|
3699
3699
|
);
|
3700
3700
|
loadAssociatedBeats = async (e) => {
|
3701
3701
|
const n = e ? zn(e, { representation: "date" }) : void 0, a = await this.beatApi.getBeatsWithAssociatedTransaction(n);
|
3702
|
-
|
3702
|
+
V(() => this.associatedBeats = a);
|
3703
3703
|
};
|
3704
3704
|
loadTags = async () => {
|
3705
3705
|
const e = await this.api.getTags();
|
3706
|
-
|
3706
|
+
V(() => this.tags = e);
|
3707
3707
|
};
|
3708
3708
|
loadTaggings = async () => {
|
3709
3709
|
const e = await this.api.getTaggings();
|
3710
|
-
|
3710
|
+
V(() => this.taggings = e);
|
3711
3711
|
};
|
3712
3712
|
loadTransactionRules = async () => {
|
3713
3713
|
const e = await this.api.getTransactionRules();
|
3714
|
-
|
3714
|
+
V(() => this.transactionRules = e);
|
3715
3715
|
};
|
3716
3716
|
loadTransactions = async (e = this.cachedStartDate, n = ke()) => {
|
3717
3717
|
this.setIsLoading(!0), this.transactions = [];
|
@@ -3720,7 +3720,7 @@ class Dc {
|
|
3720
3720
|
cA(e),
|
3721
3721
|
cA(n)
|
3722
3722
|
);
|
3723
|
-
|
3723
|
+
V(() => {
|
3724
3724
|
this.transactions = this.augmentTransactions(a);
|
3725
3725
|
});
|
3726
3726
|
} catch (a) {
|
@@ -3746,7 +3746,7 @@ class Dc {
|
|
3746
3746
|
const n = this.transactions.findIndex((a) => a.guid === e);
|
3747
3747
|
if (n >= 0) {
|
3748
3748
|
const a = [...this.transactions];
|
3749
|
-
a.splice(n, 1),
|
3749
|
+
a.splice(n, 1), V(() => this.transactions = a);
|
3750
3750
|
}
|
3751
3751
|
};
|
3752
3752
|
setFilter = (e) => {
|
@@ -3765,7 +3765,7 @@ class Dc {
|
|
3765
3765
|
r.push(s);
|
3766
3766
|
}
|
3767
3767
|
const i = this.transactions.findIndex((o) => o.guid === e.guid);
|
3768
|
-
i >= 0 &&
|
3768
|
+
i >= 0 && V(
|
3769
3769
|
() => this.transactions = this.augmentTransactions([
|
3770
3770
|
...this.transactions.slice(0, i),
|
3771
3771
|
a,
|
@@ -3783,7 +3783,7 @@ class Dc {
|
|
3783
3783
|
s >= 0 && a.splice(s, 1);
|
3784
3784
|
});
|
3785
3785
|
const r = a.findIndex((o) => o.guid === e), i = a[r];
|
3786
|
-
i.has_been_split = !1, r >= 0 &&
|
3786
|
+
i.has_been_split = !1, r >= 0 && V(
|
3787
3787
|
() => this.transactions = [
|
3788
3788
|
...a.slice(0, r),
|
3789
3789
|
i,
|
@@ -3807,7 +3807,7 @@ class Dc {
|
|
3807
3807
|
};
|
3808
3808
|
updateTransaction = async (e) => {
|
3809
3809
|
const n = await this.api.updateTransaction(e), a = this.transactions.findIndex((r) => r.guid === e.guid);
|
3810
|
-
a >= 0 &&
|
3810
|
+
a >= 0 && V(
|
3811
3811
|
() => this.transactions = this.augmentTransactions([
|
3812
3812
|
...this.transactions.slice(0, a),
|
3813
3813
|
n,
|
@@ -3882,15 +3882,15 @@ const KA = () => {
|
|
3882
3882
|
}, Vn = (A) => {
|
3883
3883
|
const e = at(A);
|
3884
3884
|
let n = En(A, e);
|
3885
|
-
for (; sA(n,
|
3885
|
+
for (; sA(n, F()); )
|
3886
3886
|
n = qe(n, 1);
|
3887
3887
|
return n;
|
3888
3888
|
}, Mc = (A) => {
|
3889
3889
|
const e = Vn(A);
|
3890
3890
|
return qe(e, 1);
|
3891
3891
|
}, Ha = (A) => {
|
3892
|
-
let e = wn(
|
3893
|
-
for (; sA(e,
|
3892
|
+
let e = wn(F(), A.getDate());
|
3893
|
+
for (; sA(e, F()); )
|
3894
3894
|
e = QA(e, 1);
|
3895
3895
|
return e;
|
3896
3896
|
}, zc = (A) => {
|
@@ -3898,7 +3898,7 @@ const KA = () => {
|
|
3898
3898
|
return QA(e, 1);
|
3899
3899
|
}, Vr = (A) => {
|
3900
3900
|
let e = Oe(A, 1);
|
3901
|
-
for (; sA(e,
|
3901
|
+
for (; sA(e, F()); )
|
3902
3902
|
e = Oe(e, 1);
|
3903
3903
|
return e;
|
3904
3904
|
}, Hc = (A) => {
|
@@ -3917,7 +3917,7 @@ const KA = () => {
|
|
3917
3917
|
width: o = "100%",
|
3918
3918
|
zeroState: s = /* @__PURE__ */ t(xc, {})
|
3919
3919
|
}) => {
|
3920
|
-
const { isLoading: c, sortedTransactions: d } = nA(), { setShowInsights: u, toggleSplit: h } = KA(), { onEvent: g } =
|
3920
|
+
const { isLoading: c, sortedTransactions: d } = nA(), { setShowInsights: u, toggleSplit: h } = KA(), { onEvent: g } = j(), v = (E) => {
|
3921
3921
|
const b = d.find((S) => S.guid === E);
|
3922
3922
|
if (b?.has_been_split) {
|
3923
3923
|
h(b.guid);
|
@@ -4210,7 +4210,7 @@ const jc = ({
|
|
4210
4210
|
}
|
4211
4211
|
);
|
4212
4212
|
}, Jn = O(jc), Uc = ({ parentCategory: A }) => {
|
4213
|
-
const [e, n] = C.useState(!1), { addCategory: a } = LA(), { categories: r } = X(), { onEvent: i } =
|
4213
|
+
const [e, n] = C.useState(!1), { addCategory: a } = LA(), { categories: r } = X(), { onEvent: i } = j(), { setShouldDisableDrawerScroll: o } = Me(), s = async (u) => {
|
4214
4214
|
await a(u.trim(), A.guid), i(JA.ON_SUBCATEGORY_ADDED), n(!1);
|
4215
4215
|
}, c = async () => {
|
4216
4216
|
i(JA.ON_SUBCATEGORY_ADD_CLICK), o(!0), n(!0);
|
@@ -4240,7 +4240,7 @@ const jc = ({
|
|
4240
4240
|
subCategory: e,
|
4241
4241
|
showRename: n
|
4242
4242
|
}) => {
|
4243
|
-
const { updateCategory: a } = LA(), { onEvent: r } =
|
4243
|
+
const { updateCategory: a } = LA(), { onEvent: r } = j(), i = async (s) => {
|
4244
4244
|
await a({ ...e, name: s }), r(JA.ON_SUBCATEGORY_SAVED), A(!1);
|
4245
4245
|
}, o = () => {
|
4246
4246
|
A(!1), r(JA.ON_SUBCATEGORY_EDIT_CANCEL_CLICK);
|
@@ -4261,7 +4261,7 @@ const jc = ({
|
|
4261
4261
|
setShowDelete: n,
|
4262
4262
|
subCategory: a
|
4263
4263
|
}) => {
|
4264
|
-
const { onEvent: r } =
|
4264
|
+
const { onEvent: r } = j(), { removeCategory: i } = LA(), o = () => {
|
4265
4265
|
n(!1), r(JA.ON_SUBCATEGORY_DELETE_CLICK);
|
4266
4266
|
}, s = async () => {
|
4267
4267
|
r(JA.ON_SUBCATEGORY_DELETED), await i(a.guid), n(!1);
|
@@ -4285,7 +4285,7 @@ const jc = ({
|
|
4285
4285
|
showSelected: o,
|
4286
4286
|
unselectable: s,
|
4287
4287
|
unselectableText: c
|
4288
|
-
} = Me(), { categories: d } = X(), { onEvent: u } =
|
4288
|
+
} = Me(), { categories: d } = X(), { onEvent: u } = j(), [h, g] = C.useState(!1), [v, m] = C.useState(!1), p = !!e.revision, E = e.guid === a, b = !s.some((L) => L === e.guid);
|
4289
4289
|
return /* @__PURE__ */ l(
|
4290
4290
|
eA,
|
4291
4291
|
{
|
@@ -4386,7 +4386,7 @@ const jc = ({
|
|
4386
4386
|
}
|
4387
4387
|
);
|
4388
4388
|
}, tl = O(el), nl = ({ category: A, subCategories: e }) => {
|
4389
|
-
const { expandedGuid: n, searchValue: a, setExpandedGuid: r } = Me(), { onEvent: i } =
|
4389
|
+
const { expandedGuid: n, searchValue: a, setExpandedGuid: r } = Me(), { onEvent: i } = j(), o = A.guid === n, s = () => {
|
4390
4390
|
const c = A.guid !== n ? A.guid : null;
|
4391
4391
|
r(c), i(c ? JA.ON_CATEGORY_EXPANDED : JA.ON_CATEGORY_COLLAPSED);
|
4392
4392
|
};
|
@@ -4590,7 +4590,7 @@ class hl {
|
|
4590
4590
|
loadCategories = async () => {
|
4591
4591
|
try {
|
4592
4592
|
const e = await this.api.getCategories(), { default_categories: n } = this.globalStore.copyStore.copy.categories;
|
4593
|
-
|
4593
|
+
V(() => {
|
4594
4594
|
this.categories = e.map((a) => ({
|
4595
4595
|
...a,
|
4596
4596
|
name: n[a.guid] ? n[a.guid].replace(/&/g, "&") : a.name
|
@@ -4608,7 +4608,7 @@ class hl {
|
|
4608
4608
|
cA(a),
|
4609
4609
|
e
|
4610
4610
|
);
|
4611
|
-
|
4611
|
+
V(() => {
|
4612
4612
|
this.dateRangeCategoryTotals = r, this.detailedCategories = this.augmentCategories(), this.setIsLoadingCategoryTotals(!1);
|
4613
4613
|
});
|
4614
4614
|
} catch (r) {
|
@@ -4619,7 +4619,7 @@ class hl {
|
|
4619
4619
|
const n = cA(vA(xe(/* @__PURE__ */ new Date(), 5))), a = cA(PA(/* @__PURE__ */ new Date()));
|
4620
4620
|
try {
|
4621
4621
|
const r = await this.api.getMonthlyCategoryTotals(n, a, e);
|
4622
|
-
|
4622
|
+
V(() => {
|
4623
4623
|
this.monthlyCategoryTotals = r, this.detailedCategories = this.augmentCategories();
|
4624
4624
|
});
|
4625
4625
|
} catch (r) {
|
@@ -4645,7 +4645,7 @@ class hl {
|
|
4645
4645
|
};
|
4646
4646
|
}
|
4647
4647
|
const Jr = ({ transaction: A }) => {
|
4648
|
-
const { addOrUpdateTransactionRule: e, updateTransaction: n } = nA(), { categories: a } = LA(), { onEvent: r } =
|
4648
|
+
const { addOrUpdateTransactionRule: e, updateTransaction: n } = nA(), { categories: a } = LA(), { onEvent: r } = j(), { setShouldDisableDrawerScroll: i, updateManualTransaction: o } = KA(), { transactions: s } = X(), [c, d] = C.useState(!1), [u, h] = C.useState(""), g = async (E) => {
|
4649
4649
|
await n({ ...A, category_guid: u }), E && await e(u, A), h(""), r(D.ON_TRANSACTION_CATEGORY_CHANGED), r("transaction_details_click_category", { transaction_guid: A.guid });
|
4650
4650
|
}, v = (E) => {
|
4651
4651
|
if (A.is_manual && !A.guid) {
|
@@ -4728,7 +4728,7 @@ const Jr = ({ transaction: A }) => {
|
|
4728
4728
|
)
|
4729
4729
|
] });
|
4730
4730
|
}, Zr = ({ transaction: A }) => {
|
4731
|
-
const e = fA(), { onEvent: n } =
|
4731
|
+
const e = fA(), { onEvent: n } = j(), { updateTransaction: a } = nA(), { updateManualTransaction: r } = KA(), { common: i, transactions: o } = X(), [s, c] = C.useState(!1), [d, u] = C.useState(A.date), h = (v) => {
|
4732
4732
|
u(cA(v));
|
4733
4733
|
}, g = async () => {
|
4734
4734
|
if (A.is_manual && !A.guid) {
|
@@ -4785,7 +4785,7 @@ const Jr = ({ transaction: A }) => {
|
|
4785
4785
|
)
|
4786
4786
|
] });
|
4787
4787
|
}, gl = ({ transaction: A }) => {
|
4788
|
-
const { onEvent: e } =
|
4788
|
+
const { onEvent: e } = j(), { removeTransaction: n } = nA(), { setShouldDisableDrawerScroll: a } = KA(), { common: r, transactions: i } = X(), [o, s] = C.useState(!1), c = async () => {
|
4789
4789
|
await n(A.guid), e(D.ON_TRANSACTION_DELETE_DELETED);
|
4790
4790
|
};
|
4791
4791
|
return /* @__PURE__ */ l(T, { className: "mx-txn-delete", children: [
|
@@ -4825,7 +4825,7 @@ const Jr = ({ transaction: A }) => {
|
|
4825
4825
|
)
|
4826
4826
|
] });
|
4827
4827
|
}, Cl = ({ transaction: A }) => {
|
4828
|
-
const { onEvent: e } =
|
4828
|
+
const { onEvent: e } = j(), { updateTransaction: n } = nA(), { setShouldDisableDrawerScroll: a } = KA(), { common: r, transactions: i } = X(), [o, s] = C.useState(!1), c = async () => {
|
4829
4829
|
await n({ ...A, merchant_guid: "" }), e(D.ON_TRANSACTION_DELETE_LOGO_DELETED), e("transaction_details_click_delete_merchant_logo", {
|
4830
4830
|
transaction_guid: A.guid
|
4831
4831
|
});
|
@@ -4865,7 +4865,7 @@ const Jr = ({ transaction: A }) => {
|
|
4865
4865
|
)
|
4866
4866
|
] });
|
4867
4867
|
}, fl = ({ transaction: A }) => {
|
4868
|
-
const { onEvent: e } =
|
4868
|
+
const { onEvent: e } = j(), { updateTransaction: n } = nA(), { setShouldDisableDrawerScroll: a } = KA(), { common: r, transactions: i } = X(), [o, s] = C.useState(!1), c = A.is_hidden, d = async () => {
|
4869
4869
|
await n({ ...A, is_hidden: !A.is_hidden }), e(
|
4870
4870
|
c ? D.ON_TRANSACTION_UNHIDDEN : D.ON_TRANSACTION_HIDDEN
|
4871
4871
|
);
|
@@ -4954,7 +4954,7 @@ const Jr = ({ transaction: A }) => {
|
|
4954
4954
|
] })
|
4955
4955
|
] });
|
4956
4956
|
}, Ai = ({ transaction: A }) => {
|
4957
|
-
const { onEvent: e } =
|
4957
|
+
const { onEvent: e } = j(), { updateTransaction: n } = nA(), { updateManualTransaction: a } = KA(), { common: r, transactions: i } = X(), [o, s] = C.useState(!1), [c, d] = C.useState("");
|
4958
4958
|
C.useEffect(() => {
|
4959
4959
|
o && d(A.memo ? A.memo : "");
|
4960
4960
|
}, [o]);
|
@@ -5021,7 +5021,7 @@ const Jr = ({ transaction: A }) => {
|
|
5021
5021
|
onUpdateAmount: a,
|
5022
5022
|
split: r
|
5023
5023
|
}) => {
|
5024
|
-
const i = fA(), { onEvent: o } =
|
5024
|
+
const i = fA(), { onEvent: o } = j(), { transactions: s } = X(), [c, d] = C.useState(`${r.amount}`), [u, h] = C.useState(!1), g = A === 0, v = (m) => {
|
5025
5025
|
isNaN(Number(m)) || (d(m), a(A, Number(m)));
|
5026
5026
|
};
|
5027
5027
|
return /* @__PURE__ */ l(
|
@@ -5123,7 +5123,7 @@ const Jr = ({ transaction: A }) => {
|
|
5123
5123
|
splits: r,
|
5124
5124
|
transaction: i
|
5125
5125
|
}) => {
|
5126
|
-
const o = fA(), { transactions: s } = X(), { onEvent: c } =
|
5126
|
+
const o = fA(), { transactions: s } = X(), { onEvent: c } = j(), [d, u] = C.useState("");
|
5127
5127
|
return C.useEffect(() => {
|
5128
5128
|
u(r.length <= 1 ? s.split_transaction_errors_min_splits : ""), u(
|
5129
5129
|
r[0].amount < 0 ? R(
|
@@ -5168,7 +5168,7 @@ const Jr = ({ transaction: A }) => {
|
|
5168
5168
|
) })
|
5169
5169
|
] });
|
5170
5170
|
}, ml = ({ transaction: A }) => {
|
5171
|
-
const { onEvent: e } =
|
5171
|
+
const { onEvent: e } = j(), { splitTransaction: n, unSplitTransaction: a } = nA(), { common: r, transactions: i } = X(), { setShouldDisableDrawerScroll: o } = KA(), { categories: s } = LA(), c = {
|
5172
5172
|
...A,
|
5173
5173
|
amount: A.amount - 1,
|
5174
5174
|
guid: "",
|
@@ -5284,7 +5284,7 @@ const Jr = ({ transaction: A }) => {
|
|
5284
5284
|
)
|
5285
5285
|
] });
|
5286
5286
|
}, yl = () => {
|
5287
|
-
const A = aA(), { onEvent: e } =
|
5287
|
+
const A = aA(), { onEvent: e } = j(), { addTag: n } = nA(), { transactions: a } = X(), [r, i] = C.useState(!1), [o, s] = C.useState(""), [c, d] = C.useState(""), u = C.useRef(null);
|
5288
5288
|
C.useEffect(() => {
|
5289
5289
|
r && u?.current?.focus();
|
5290
5290
|
}, [r]);
|
@@ -5371,7 +5371,7 @@ const Jr = ({ transaction: A }) => {
|
|
5371
5371
|
}
|
5372
5372
|
) });
|
5373
5373
|
}, wl = ({ onTagChecked: A, selectedTags: e, tag: n }) => {
|
5374
|
-
const { onEvent: a } =
|
5374
|
+
const { onEvent: a } = j(), { removeTag: r, updateTag: i } = nA(), { common: o, transactions: s } = X(), [c, d] = C.useState(!1), [u, h] = C.useState(!1), [g, v] = C.useState(""), [m, p] = C.useState(""), E = async () => {
|
5375
5375
|
a(D.ON_TRANSACTION_TAGS_TAG_EDIT_SAVED), n && await i({ ...n, name: g }), d(!1);
|
5376
5376
|
}, b = async () => {
|
5377
5377
|
a(D.ON_TRANSACTION_TAGS_TAG_DELETED), await r(n.guid), h(!1);
|
@@ -5483,7 +5483,7 @@ const Jr = ({ transaction: A }) => {
|
|
5483
5483
|
] }, o.guid)) }) })
|
5484
5484
|
] });
|
5485
5485
|
}, bl = O(Ll), Tl = ({ transaction: A }) => {
|
5486
|
-
const { onEvent: e } =
|
5486
|
+
const { onEvent: e } = j(), { tags: n, updateTaggings: a, updateTransaction: r } = nA(), { common: i, transactions: o } = X(), { updateManualTransaction: s } = KA(), [c, d] = C.useState(!1), [u, h] = C.useState(A.tags);
|
5487
5487
|
C.useEffect(() => {
|
5488
5488
|
h(A.tags);
|
5489
5489
|
}, [c, A]);
|
@@ -5538,7 +5538,7 @@ const Jr = ({ transaction: A }) => {
|
|
5538
5538
|
)
|
5539
5539
|
] });
|
5540
5540
|
}, ei = O(Tl), Sl = ({ transaction: A }) => {
|
5541
|
-
const { updateTransaction: e } = nA(), { common: n, transactions: a } = X(), { onEvent: r } =
|
5541
|
+
const { updateTransaction: e } = nA(), { common: n, transactions: a } = X(), { onEvent: r } = j(), [i, o] = C.useState(!1), [s, c] = C.useState(""), d = C.useRef(null);
|
5542
5542
|
C.useEffect(() => {
|
5543
5543
|
i && (c(A.description), d?.current?.focus());
|
5544
5544
|
}, [i]);
|
@@ -5587,7 +5587,7 @@ const Jr = ({ transaction: A }) => {
|
|
5587
5587
|
)
|
5588
5588
|
] }) });
|
5589
5589
|
}, Il = ({ transaction: A }) => {
|
5590
|
-
const { updateTransaction: e } = nA(), { transactions: n } = X(), { onEvent: a } =
|
5590
|
+
const { updateTransaction: e } = nA(), { transactions: n } = X(), { onEvent: a } = j(), r = aA(), i = async () => {
|
5591
5591
|
a(D.ON_TRANSACTION_TOGGLE_FLAG_CLICK), a("transaction_details_click_flag_transaction", { transaction_guid: A.guid }), await e({ ...A, is_flagged: !A.is_flagged });
|
5592
5592
|
};
|
5593
5593
|
return /* @__PURE__ */ t("div", { className: "mx-txn-transaction-flag", children: /* @__PURE__ */ t(
|
@@ -5623,7 +5623,7 @@ const Jr = ({ transaction: A }) => {
|
|
5623
5623
|
topActions: e = Cc,
|
5624
5624
|
transaction: n
|
5625
5625
|
}) => {
|
5626
|
-
const a = fA(), r = n?.number && n.number.length > 4, { onEvent: i } =
|
5626
|
+
const a = fA(), r = n?.number && n.number.length > 4, { onEvent: i } = j();
|
5627
5627
|
return C.useEffect(() => i("transaction-details", { transaction_guid: n.guid }), []), /* @__PURE__ */ t(T, { className: "mx-txn-transaction-details", width: "100%", children: n && /* @__PURE__ */ l(w, { children: [
|
5628
5628
|
/* @__PURE__ */ l(w, { gap: a.Spacing.Small, p: a.Spacing.Large, children: [
|
5629
5629
|
/* @__PURE__ */ t(re, { elevation: 2, sx: { borderRadius: a.BorderRadius.Small, width: 64 }, children: /* @__PURE__ */ t(
|
@@ -5847,7 +5847,7 @@ const Jr = ({ transaction: A }) => {
|
|
5847
5847
|
setSearchValue: s,
|
5848
5848
|
setShowInsights: c,
|
5849
5849
|
updateManualTransaction: d
|
5850
|
-
} = KA(), { addTransaction: u, filter: h, setFilter: g, tags: v, transactions: m, updateTransaction: p } = nA(), { common: E, transactions: b } = X(), { userProfile: S } = Ft(), { onEvent: L } =
|
5850
|
+
} = KA(), { addTransaction: u, filter: h, setFilter: g, tags: v, transactions: m, updateTransaction: p } = nA(), { common: E, transactions: b } = X(), { userProfile: S } = Ft(), { onEvent: L } = j(), {
|
5851
5851
|
displayedDateRange: N,
|
5852
5852
|
isInitialized: x,
|
5853
5853
|
selectedAccountGuids: I,
|
@@ -5855,7 +5855,7 @@ const Jr = ({ transaction: A }) => {
|
|
5855
5855
|
setDisplayedDate: k
|
5856
5856
|
} = mA(), [_, B] = C.useState(""), [H, oA] = C.useState(""), [kA, GA] = C.useState(!1);
|
5857
5857
|
C.useEffect(() => {
|
5858
|
-
const EA = vA(
|
5858
|
+
const EA = vA(F()), oa = PA(F());
|
5859
5859
|
k(EA, oa), g({
|
5860
5860
|
dateRange: { start: EA, end: oa },
|
5861
5861
|
accounts: q.map((zi) => zi.guid)
|
@@ -5881,7 +5881,7 @@ const Jr = ({ transaction: A }) => {
|
|
5881
5881
|
}, tn = () => {
|
5882
5882
|
d({
|
5883
5883
|
...Yr,
|
5884
|
-
date: cA(
|
5884
|
+
date: cA(F()),
|
5885
5885
|
user_guid: S?.user_guid || ""
|
5886
5886
|
}), B(
|
5887
5887
|
"addTransaction"
|
@@ -6047,7 +6047,7 @@ const Jr = ({ transaction: A }) => {
|
|
6047
6047
|
frequency_every_year: "Yearly",
|
6048
6048
|
frequency_title: "Select payment frequency"
|
6049
6049
|
}, Bl = ({ activity: A }) => {
|
6050
|
-
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = xA(), { onEvent: i } =
|
6050
|
+
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = xA(), { onEvent: i } = j(), [o, s] = C.useState(!1), c = A.activityType === uA.Income, d = [
|
6051
6051
|
{ id: z.EveryWeek, label: ae.frequency_every_week },
|
6052
6052
|
{ id: z.EveryOtherWeek, label: ae.frequency_every_other_week },
|
6053
6053
|
{ id: z.EveryMonth, label: ae.frequency_every_month },
|
@@ -6116,7 +6116,7 @@ const Jr = ({ transaction: A }) => {
|
|
6116
6116
|
activity_payment_date: "Next payment date",
|
6117
6117
|
close_drawer_aria: "Close"
|
6118
6118
|
}, Kl = ({ activity: A }) => {
|
6119
|
-
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = xA(), { onEvent: i } =
|
6119
|
+
const { cashflowSequences: e, scheduledPayments: n, updateCashflowSequence: a, updateScheduledPayment: r } = xA(), { onEvent: i } = j(), [o, s] = C.useState(!1), [c, d] = C.useState(A.expectedDate), u = A.activityType === uA.Income, h = () => {
|
6120
6120
|
d(A.expectedDate), s(!0), i(
|
6121
6121
|
u ? "recurring_transactions_widget_income_details_click_next_payment_due" : "recurring_transactions_widget_expense_details_click_next_payment_due",
|
6122
6122
|
{
|
@@ -6155,7 +6155,7 @@ const Jr = ({ transaction: A }) => {
|
|
6155
6155
|
children: /* @__PURE__ */ t(qn, { dateAdapter: Qt, children: /* @__PURE__ */ t(
|
6156
6156
|
Rn,
|
6157
6157
|
{
|
6158
|
-
minDate:
|
6158
|
+
minDate: F(),
|
6159
6159
|
onChange: (v) => d(v),
|
6160
6160
|
value: c
|
6161
6161
|
}
|
@@ -6174,14 +6174,14 @@ const Jr = ({ transaction: A }) => {
|
|
6174
6174
|
close_drawer_aria: "Close",
|
6175
6175
|
transaction_details_drawer_title: "Transaction Details"
|
6176
6176
|
}, Gl = ({ activity: A, onDeleted: e }) => {
|
6177
|
-
const { categories: n } = LA(), { deleteCashflowSequence: a, deleteScheduledPayment: r, paidActivities: i } = xA(), { filter: o, setFilter: s, transactions: c } = nA(), { selectedAccountGuids: d } = mA(), { onEvent: u } =
|
6177
|
+
const { categories: n } = LA(), { deleteCashflowSequence: a, deleteScheduledPayment: r, paidActivities: i } = xA(), { filter: o, setFilter: s, transactions: c } = nA(), { selectedAccountGuids: d } = mA(), { onEvent: u } = j(), [h, g] = C.useState(!1), [v, m] = C.useState(""), p = n.find((x) => x.guid === A.categoryGuid), E = A.activityType === uA.Income, b = C.useMemo(
|
6178
6178
|
() => c.find((x) => x.guid === v),
|
6179
6179
|
[v]
|
6180
6180
|
);
|
6181
6181
|
C.useEffect(() => {
|
6182
6182
|
s({
|
6183
6183
|
accounts: d,
|
6184
|
-
dateRange: { start: ee(
|
6184
|
+
dateRange: { start: ee(F(), 90), end: PA(F()) }
|
6185
6185
|
});
|
6186
6186
|
}, []), C.useEffect(() => {
|
6187
6187
|
if (E && A.sequenceGuid) {
|
@@ -6754,7 +6754,7 @@ const Jr = ({ transaction: A }) => {
|
|
6754
6754
|
scheduledPaymentGuid: a.guid
|
6755
6755
|
};
|
6756
6756
|
}), Zl = () => {
|
6757
|
-
const { scheduledPayments: A } = xA(), { transactions: e } = nA(), { selectedAccounts: n } = mA(), { onEvent: a } =
|
6757
|
+
const { scheduledPayments: A } = xA(), { transactions: e } = nA(), { selectedAccounts: n } = mA(), { onEvent: a } = j(), r = Jl(n, A, e), i = (s) => {
|
6758
6758
|
a(" recurring_transactions_widget_manage_expenses_click_expense", {
|
6759
6759
|
transaction_guid: s.transactionGuid
|
6760
6760
|
});
|
@@ -6795,8 +6795,8 @@ const Jr = ({ transaction: A }) => {
|
|
6795
6795
|
};
|
6796
6796
|
}), s = a.filter(
|
6797
6797
|
(u) => Ke(wA(u.expected_date), {
|
6798
|
-
start: vA(
|
6799
|
-
end: ie(
|
6798
|
+
start: vA(F()),
|
6799
|
+
end: ie(F(), 30)
|
6800
6800
|
})
|
6801
6801
|
).filter((u) => r.find((g) => g.guid === u.cashflow_sequence_guid)?.end_date === null).map((u) => {
|
6802
6802
|
const h = r.find((p) => p.guid === u.cashflow_sequence_guid), g = e.find(
|
@@ -6840,7 +6840,7 @@ const Jr = ({ transaction: A }) => {
|
|
6840
6840
|
recurrenceDay: e.recurrence_day,
|
6841
6841
|
scheduledPaymentGuid: e.guid,
|
6842
6842
|
transactionGuid: ""
|
6843
|
-
}, c = e.recurrence_day, d =
|
6843
|
+
}, c = e.recurrence_day, d = F(), u = vA(F()), h = ie(F(), 30);
|
6844
6844
|
let g = u;
|
6845
6845
|
switch (e.recurrence_type) {
|
6846
6846
|
case z.EveryWeek:
|
@@ -6945,7 +6945,7 @@ const Jr = ({ transaction: A }) => {
|
|
6945
6945
|
sequenceGuid: i.guid
|
6946
6946
|
};
|
6947
6947
|
}), ad = () => {
|
6948
|
-
const { selectedAccounts: A } = mA(), { cashflowEvents: e, cashflowSequences: n, projectedEvents: a } = xA(), { transactions: r } = nA(), { onEvent: i } =
|
6948
|
+
const { selectedAccounts: A } = mA(), { cashflowEvents: e, cashflowSequences: n, projectedEvents: a } = xA(), { transactions: r } = nA(), { onEvent: i } = j(), o = nd(
|
6949
6949
|
A,
|
6950
6950
|
e,
|
6951
6951
|
a,
|
@@ -6966,7 +6966,7 @@ const Jr = ({ transaction: A }) => {
|
|
6966
6966
|
/* @__PURE__ */ t(ci, { isIncome: !0, label: td.manage_income_add, onAddActivity: c })
|
6967
6967
|
] });
|
6968
6968
|
}, li = O(ad), di = () => {
|
6969
|
-
const [A, e] = C.useState(0), { onEvent: n } =
|
6969
|
+
const [A, e] = C.useState(0), { onEvent: n } = j();
|
6970
6970
|
return /* @__PURE__ */ l(T, { bgcolor: "background.default", height: "100%", children: [
|
6971
6971
|
/* @__PURE__ */ l(
|
6972
6972
|
Fe,
|
@@ -6989,17 +6989,17 @@ const Jr = ({ transaction: A }) => {
|
|
6989
6989
|
A === 1 && /* @__PURE__ */ t(li, {})
|
6990
6990
|
] });
|
6991
6991
|
}, Ve = (A, e) => A + e.amount, cn = (A) => A.activityType === uA.Income && Ke(A.expectedDate, {
|
6992
|
-
start: vA(
|
6993
|
-
end: PA(
|
6992
|
+
start: vA(F()),
|
6993
|
+
end: PA(F())
|
6994
6994
|
}), mt = (A) => A.activityType === uA.Expense && Ke(A.expectedDate, {
|
6995
|
-
start: vA(
|
6996
|
-
end: PA(
|
6995
|
+
start: vA(F()),
|
6996
|
+
end: PA(F())
|
6997
6997
|
}), ln = (A) => A.occurredOnDate && Ke(A.occurredOnDate, {
|
6998
6998
|
start: vA(/* @__PURE__ */ new Date()),
|
6999
|
-
end: ie(
|
6999
|
+
end: ie(F(), 30)
|
7000
7000
|
}) || Ke(A.expectedDate, {
|
7001
7001
|
start: vA(/* @__PURE__ */ new Date()),
|
7002
|
-
end: ie(
|
7002
|
+
end: ie(F(), 30)
|
7003
7003
|
}), rd = ({ day: A, outsideCurrentMonth: e, ...n }) => {
|
7004
7004
|
const a = {
|
7005
7005
|
paid: "Paid",
|
@@ -7073,7 +7073,7 @@ const Jr = ({ transaction: A }) => {
|
|
7073
7073
|
]
|
7074
7074
|
}
|
7075
7075
|
), ka = 58, sd = () => {
|
7076
|
-
const A = aA(), { onEvent: e } =
|
7076
|
+
const A = aA(), { onEvent: e } = j(), { selectedDay: n } = xA(), [a, r] = C.useState(
|
7077
7077
|
va(/* @__PURE__ */ new Date()) * We + ka
|
7078
7078
|
), i = (s) => {
|
7079
7079
|
r(va(s) * We + ka), e("recurring_transactions_widget_click_calendar_right");
|
@@ -7212,7 +7212,7 @@ const Jr = ({ transaction: A }) => {
|
|
7212
7212
|
selectedDayActivities: i,
|
7213
7213
|
setSelectedDay: o,
|
7214
7214
|
upcomingActivities: s
|
7215
|
-
} = xA(), [c, d] = C.useState(0), { onEvent: u } =
|
7215
|
+
} = xA(), [c, d] = C.useState(0), { onEvent: u } = j(), h = e.filter(ln), g = a.filter(ln), v = n.filter(ln), m = h.filter(mt).reduce(Ve, 0), p = g.filter(mt).reduce(Ve, 0), E = v.filter(mt).reduce(Ve, 0), b = h.filter(mt).length, S = h.filter(cn).reduce(Ve, 0), L = g.filter(cn).reduce(Ve, 0), N = h.filter(cn).length, x = (k, _) => {
|
7216
7216
|
d(_);
|
7217
7217
|
}, I = (k) => {
|
7218
7218
|
u("recurring_transactions_widget_click_upcoming_transaction", {
|
@@ -7298,10 +7298,10 @@ const Jr = ({ transaction: A }) => {
|
|
7298
7298
|
recurring_activity_title: "Recurring Transactions",
|
7299
7299
|
recurring_activity_settings: "Settings"
|
7300
7300
|
}, dd = ({ sx: A = {} }) => {
|
7301
|
-
const { accounts: e } = zA(), { isInitialized: n, selectedAccountGuids: a } = mA(), { setFilter: r } = nA(), { isLoading: i } = xA(), { onEvent: o } =
|
7301
|
+
const { accounts: e } = zA(), { isInitialized: n, selectedAccountGuids: a } = mA(), { setFilter: r } = nA(), { isLoading: i } = xA(), { onEvent: o } = j();
|
7302
7302
|
C.useEffect(() => {
|
7303
7303
|
n && r({
|
7304
|
-
dateRange: { start: ee(
|
7304
|
+
dateRange: { start: ee(F(), 90), end: ke() },
|
7305
7305
|
accounts: a
|
7306
7306
|
});
|
7307
7307
|
}, [n, a]);
|
@@ -7371,7 +7371,7 @@ const Jr = ({ transaction: A }) => {
|
|
7371
7371
|
const { isInitialized: n, selectedAccountGuids: a } = mA(), { setFilter: r } = nA();
|
7372
7372
|
return C.useEffect(() => {
|
7373
7373
|
n && r({
|
7374
|
-
dateRange: { start: ee(
|
7374
|
+
dateRange: { start: ee(F(), 90), end: ke() },
|
7375
7375
|
accounts: a
|
7376
7376
|
});
|
7377
7377
|
}, [n, a]), /* @__PURE__ */ t(
|
@@ -7430,7 +7430,7 @@ class Cd {
|
|
7430
7430
|
return this.upcomingActivities.filter((e) => e.activityType === uA.Income);
|
7431
7431
|
}
|
7432
7432
|
get nextIncomeActivity() {
|
7433
|
-
return this.upcomingIncome.find((e) => rt(e.expectedDate,
|
7433
|
+
return this.upcomingIncome.find((e) => rt(e.expectedDate, F()));
|
7434
7434
|
}
|
7435
7435
|
get selectedDayActivities() {
|
7436
7436
|
return this.selectedDay && this.activities.filter(
|
@@ -7440,7 +7440,7 @@ class Cd {
|
|
7440
7440
|
addCashflowEvent = async (e) => {
|
7441
7441
|
try {
|
7442
7442
|
const n = await this.cashflowApi.addCashflowEvent(e);
|
7443
|
-
|
7443
|
+
V(() => {
|
7444
7444
|
this.cashflowEvents = [...this.cashflowEvents, n];
|
7445
7445
|
});
|
7446
7446
|
} catch (n) {
|
@@ -7461,7 +7461,7 @@ class Cd {
|
|
7461
7461
|
await this.globalStore.transactionStore.updateTransaction({
|
7462
7462
|
...n,
|
7463
7463
|
scheduled_payment_guid: a.guid
|
7464
|
-
}),
|
7464
|
+
}), V(() => {
|
7465
7465
|
this.scheduledPayments = [...this.scheduledPayments, a];
|
7466
7466
|
});
|
7467
7467
|
} catch (a) {
|
@@ -7477,7 +7477,7 @@ class Cd {
|
|
7477
7477
|
};
|
7478
7478
|
deleteScheduledPayment = async (e) => {
|
7479
7479
|
try {
|
7480
|
-
await this.api.deleteScheduledPayment(e),
|
7480
|
+
await this.api.deleteScheduledPayment(e), V(() => {
|
7481
7481
|
const n = this.scheduledPayments.findIndex((a) => a.guid === e);
|
7482
7482
|
n >= 0 && this.scheduledPayments.splice(n, 1);
|
7483
7483
|
});
|
@@ -7487,7 +7487,7 @@ class Cd {
|
|
7487
7487
|
};
|
7488
7488
|
loadActivity = () => {
|
7489
7489
|
this.isLoading = !0, Promise.all([this.loadExpenseActivity(), this.loadIncomeActivity()]).finally(
|
7490
|
-
() =>
|
7490
|
+
() => V(() => {
|
7491
7491
|
this.isLoading = !1;
|
7492
7492
|
})
|
7493
7493
|
);
|
@@ -7500,7 +7500,7 @@ class Cd {
|
|
7500
7500
|
};
|
7501
7501
|
loadCashflowSequences = async () => {
|
7502
7502
|
const e = await this.cashflowApi.getCashflowSequences();
|
7503
|
-
|
7503
|
+
V(() => {
|
7504
7504
|
this.cashflowSequences = e.filter(
|
7505
7505
|
(n) => n.transaction_type === qA.CREDIT
|
7506
7506
|
);
|
@@ -7509,10 +7509,10 @@ class Cd {
|
|
7509
7509
|
loadExpectedEvents = async () => {
|
7510
7510
|
try {
|
7511
7511
|
const e = await this.cashflowApi.getProjectedCashflowEvents(
|
7512
|
-
vA(
|
7513
|
-
ie(
|
7512
|
+
vA(F()),
|
7513
|
+
ie(F(), 30)
|
7514
7514
|
);
|
7515
|
-
|
7515
|
+
V(() => {
|
7516
7516
|
this.projectedEvents = e.filter(
|
7517
7517
|
(n) => n.transaction_type === qA.CREDIT
|
7518
7518
|
);
|
@@ -7524,10 +7524,10 @@ class Cd {
|
|
7524
7524
|
loadPaidEvents = async () => {
|
7525
7525
|
try {
|
7526
7526
|
const e = await this.cashflowApi.getCashflowEventsByDateRange(
|
7527
|
-
ee(
|
7528
|
-
PA(
|
7527
|
+
ee(F(), 90),
|
7528
|
+
PA(F())
|
7529
7529
|
);
|
7530
|
-
|
7530
|
+
V(() => {
|
7531
7531
|
this.cashflowEvents = e.filter(
|
7532
7532
|
(n) => n.transaction_type === qA.CREDIT
|
7533
7533
|
);
|
@@ -7539,7 +7539,7 @@ class Cd {
|
|
7539
7539
|
loadScheduledPayments = async () => {
|
7540
7540
|
try {
|
7541
7541
|
const e = await this.api.getScheduledPayments();
|
7542
|
-
|
7542
|
+
V(() => {
|
7543
7543
|
this.scheduledPayments = e;
|
7544
7544
|
});
|
7545
7545
|
} catch (e) {
|
@@ -7573,7 +7573,7 @@ class Cd {
|
|
7573
7573
|
try {
|
7574
7574
|
const n = await this.api.updateScheduledPayment(e), a = this.scheduledPayments.findIndex((r) => r.guid === e.guid);
|
7575
7575
|
if (a < 0) return;
|
7576
|
-
|
7576
|
+
V(() => {
|
7577
7577
|
this.scheduledPayments = [
|
7578
7578
|
...this.scheduledPayments.slice(0, a),
|
7579
7579
|
n,
|
@@ -8047,7 +8047,7 @@ const Id = ({ activity: A }) => {
|
|
8047
8047
|
}
|
8048
8048
|
);
|
8049
8049
|
}, Nd = O(xd), Md = () => {
|
8050
|
-
const { cashflow: A } = X(), { isDesktop: e } = ne(), { onEvent: n } =
|
8050
|
+
const { cashflow: A } = X(), { isDesktop: e } = ne(), { onEvent: n } = j(), [a, r] = C.useState(0), i = (o, s) => {
|
8051
8051
|
r(s);
|
8052
8052
|
};
|
8053
8053
|
return C.useEffect(() => {
|
@@ -8321,8 +8321,8 @@ const Id = ({ activity: A }) => {
|
|
8321
8321
|
), oA = !!n.length, kA = async () => {
|
8322
8322
|
I(2), c(
|
8323
8323
|
// Beginning of the month, 90 days before today
|
8324
|
-
vA(ee(
|
8325
|
-
|
8324
|
+
vA(ee(F(), 90)),
|
8325
|
+
F()
|
8326
8326
|
), u({ ...d, custom: ot }), I(3);
|
8327
8327
|
}, GA = async () => {
|
8328
8328
|
if (!(q.length < 1)) {
|
@@ -8488,7 +8488,7 @@ const Id = ({ activity: A }) => {
|
|
8488
8488
|
setSelectedAccounts: a,
|
8489
8489
|
shouldDisableNextDate: r,
|
8490
8490
|
shouldDisablePrevDate: i
|
8491
|
-
} = mA(), { onEvent: o } =
|
8491
|
+
} = mA(), { onEvent: o } = j(), { cashAccounts: s } = zA(), { setFilter: c } = nA(), { userProfile: d } = Ft(), { dateRange: u, setSelectedCashAccounts: h } = Ue(), { cashflow: g, common: v } = X(), [m, p] = C.useState(!1);
|
8492
8492
|
return C.useEffect(() => {
|
8493
8493
|
a(s);
|
8494
8494
|
}, []), C.useEffect(() => {
|
@@ -8568,7 +8568,7 @@ class Ya {
|
|
8568
8568
|
}
|
8569
8569
|
let Ud = class {
|
8570
8570
|
// Cashflow is hard-coded to display 30 days starting from today
|
8571
|
-
dateRange = { start:
|
8571
|
+
dateRange = { start: F(), end: ie(F(), 30) };
|
8572
8572
|
isDirty = !1;
|
8573
8573
|
nextIncome = void 0;
|
8574
8574
|
upcomingExpenses = [];
|
@@ -8578,7 +8578,7 @@ let Ud = class {
|
|
8578
8578
|
}
|
8579
8579
|
// Returns the number of days until the next income activity or 0 if there is no income activity
|
8580
8580
|
get daysUntilNextIncome() {
|
8581
|
-
return this.nextIncome ? Math.abs(To(
|
8581
|
+
return this.nextIncome ? Math.abs(To(F(), this.nextIncome.expectedDate)) : 0;
|
8582
8582
|
}
|
8583
8583
|
// Returns the expenses (Activities) until the next income activity or the end of the month
|
8584
8584
|
// if there is no income activity
|
@@ -8738,13 +8738,13 @@ class $d {
|
|
8738
8738
|
loadMerchants = async (e = "") => {
|
8739
8739
|
this.isLoading = !0;
|
8740
8740
|
const n = await this.api.getMerchants([e]);
|
8741
|
-
|
8741
|
+
V(() => {
|
8742
8742
|
this.merchants = n, this.isLoading = !1;
|
8743
8743
|
});
|
8744
8744
|
};
|
8745
8745
|
loadMerchantByGuid = async (e) => {
|
8746
8746
|
const n = await this.api.getMerchantByGuid(e);
|
8747
|
-
|
8747
|
+
V(() => this.merchant = n);
|
8748
8748
|
};
|
8749
8749
|
}
|
8750
8750
|
const I7 = (A) => {
|
@@ -8791,7 +8791,7 @@ class eu {
|
|
8791
8791
|
try {
|
8792
8792
|
this.isLoading = !0;
|
8793
8793
|
const e = await this.api.getNotifications();
|
8794
|
-
|
8794
|
+
V(() => {
|
8795
8795
|
this.notifications = e, this.recentNotifications = Au(e), this.isLoading = !1;
|
8796
8796
|
});
|
8797
8797
|
} catch (e) {
|
@@ -8888,7 +8888,7 @@ class su {
|
|
8888
8888
|
loadUserProfile = async () => {
|
8889
8889
|
try {
|
8890
8890
|
const e = await this.api.getUserProfile();
|
8891
|
-
|
8891
|
+
V(() => {
|
8892
8892
|
this.userProfile = e;
|
8893
8893
|
});
|
8894
8894
|
} catch (e) {
|
@@ -8898,7 +8898,7 @@ class su {
|
|
8898
8898
|
updateUserProfile = async (e) => {
|
8899
8899
|
try {
|
8900
8900
|
const n = await this.api.updateUserProfile(e);
|
8901
|
-
|
8901
|
+
V(() => {
|
8902
8902
|
this.userProfile = n;
|
8903
8903
|
});
|
8904
8904
|
} catch (n) {
|
@@ -8925,7 +8925,18 @@ class O7 {
|
|
8925
8925
|
}
|
8926
8926
|
initialize = async (e, n) => {
|
8927
8927
|
const a = Date.now();
|
8928
|
-
console.log("start awaits", a), await this.copyStore.initialize(e, n),
|
8928
|
+
console.log("start awaits", a), await this.copyStore.initialize(e, n), Promise.all([
|
8929
|
+
// this.copyStore.initialize(endpoint, token),
|
8930
|
+
this.accountStore.initialize(e, n),
|
8931
|
+
this.beatStore.initialize(e, n),
|
8932
|
+
this.merchantStore.initialize(e, n),
|
8933
|
+
this.userStore.initialize(e, n),
|
8934
|
+
this.categoryStore.initialize(e, n),
|
8935
|
+
this.transactionStore.initialize(e, n),
|
8936
|
+
this.recurringActivityStore.initialize(e, n),
|
8937
|
+
this.budgetsStore.initialize(e, n),
|
8938
|
+
this.notificationStore.initialize(e, n)
|
8939
|
+
]).then(() => {
|
8929
8940
|
const r = Date.now();
|
8930
8941
|
console.log("finish awaits", r), console.log(`Total time: ${r - a}`), this.isInitialized = !0, this.globalUiStore.setInitialized(!0), this.globalUiStore.setSelectedAccounts(this.accountStore.accounts);
|
8931
8942
|
});
|
@@ -8974,7 +8985,7 @@ const un = ({
|
|
8974
8985
|
this_will_set_the_balance_of_your_account: "This will set the balance of your _1{account_name} account to $0.00, and keep any past transaction history. This can be undone by marking the account as open.",
|
8975
8986
|
unhide_account: "Unhide Account"
|
8976
8987
|
}, lu = () => {
|
8977
|
-
const [A, e] = C.useState(!1), [n, a] = C.useState(!1), [r, i] = C.useState(!1), [o, s] = C.useState({}), { selectedAccount: c } = $A(), { mergeAccounts: d, updateAccount: u } = zA(), h = cu(), { onEvent: g } =
|
8988
|
+
const [A, e] = C.useState(!1), [n, a] = C.useState(!1), [r, i] = C.useState(!1), [o, s] = C.useState({}), { selectedAccount: c } = $A(), { mergeAccounts: d, updateAccount: u } = zA(), h = cu(), { onEvent: g } = j(), v = (p) => {
|
8978
8989
|
u({
|
8979
8990
|
...c,
|
8980
8991
|
...p
|
@@ -9475,7 +9486,7 @@ const un = ({
|
|
9475
9486
|
}
|
9476
9487
|
);
|
9477
9488
|
}, fu = O(Cu), vu = () => {
|
9478
|
-
const A = window.app?.config, { onEvent: e } =
|
9489
|
+
const A = window.app?.config, { onEvent: e } = j(), { selectedAccount: n } = $A(), a = Ld(n), r = n.member_is_managed_by_user || !n.member_is_managed_by_user && A.enable_renaming_home_accounts, [i, o] = C.useState(!1), [s, c] = C.useState(a[0]), d = a.filter(
|
9479
9490
|
(u) => r || n[u.name] || n[u.name] === 0
|
9480
9491
|
);
|
9481
9492
|
return /* @__PURE__ */ l(tA, { children: [
|
@@ -9517,7 +9528,7 @@ const un = ({
|
|
9517
9528
|
)
|
9518
9529
|
] });
|
9519
9530
|
}, pu = O(vu), mu = () => {
|
9520
|
-
const { onEvent: A } =
|
9531
|
+
const { onEvent: A } = j();
|
9521
9532
|
return C.useEffect(() => A("account_details"), []), /* @__PURE__ */ l(dA, { children: [
|
9522
9533
|
/* @__PURE__ */ t(pu, {}),
|
9523
9534
|
/* @__PURE__ */ t(gu, {}),
|
@@ -9582,7 +9593,7 @@ const un = ({
|
|
9582
9593
|
aria_close: "Close",
|
9583
9594
|
transaction_drawer_title: "Transaction Details"
|
9584
9595
|
}, bu = () => {
|
9585
|
-
const [A, e] = C.useState(""), { onEvent: n } =
|
9596
|
+
const [A, e] = C.useState(""), { onEvent: n } = j(), { selectedAccount: a } = $A(), { setFilter: r, sortedTransactions: i } = nA(), o = C.useMemo(() => i.find((s) => s.guid === A), [A]);
|
9586
9597
|
return C.useEffect(() => {
|
9587
9598
|
r({
|
9588
9599
|
dateRange: { start: Io(Do(), 90), end: Oo() },
|
@@ -9764,7 +9775,7 @@ const un = ({
|
|
9764
9775
|
}, Ku = (A) => ({
|
9765
9776
|
list_aria: `${A[0]} accounts`
|
9766
9777
|
}), ku = () => {
|
9767
|
-
const [A, e] = C.useState(""), { selectedAccounts: n } = mA(), { setSelectedAccount: a, setSelectedMember: r } = $A(), { members: i } = zA(), { onEvent: o } =
|
9778
|
+
const [A, e] = C.useState(""), { selectedAccounts: n } = mA(), { setSelectedAccount: a, setSelectedMember: r } = $A(), { members: i } = zA(), { onEvent: o } = j(), s = [...new Set(n.map((d) => d.account_type))], c = n.find((d) => A === d.guid);
|
9768
9779
|
return C.useEffect(() => {
|
9769
9780
|
if (c) {
|
9770
9781
|
a(c);
|
@@ -9885,7 +9896,7 @@ const un = ({
|
|
9885
9896
|
manage_connections: "Manage Connections",
|
9886
9897
|
sync_accounts: "Sync Accounts"
|
9887
9898
|
}, Fu = () => {
|
9888
|
-
const [A, e] = C.useState(!1), [n, a] = C.useState(!1), { accounts: r, refreshMembers: i } = zA(), { isDesktop: o } = ne(), { onEvent: s } =
|
9899
|
+
const [A, e] = C.useState(!1), [n, a] = C.useState(!1), { accounts: r, refreshMembers: i } = zA(), { isDesktop: o } = ne(), { onEvent: s } = j(), c = () => {
|
9889
9900
|
a(!0), i().finally(() => {
|
9890
9901
|
a(!1);
|
9891
9902
|
}), s("accounts_widget_click_sync");
|
@@ -10476,7 +10487,7 @@ class Yu {
|
|
10476
10487
|
addAccount = async (e) => {
|
10477
10488
|
try {
|
10478
10489
|
const n = await this.api.createAccount(e);
|
10479
|
-
|
10490
|
+
V(() => {
|
10480
10491
|
this.accounts = [...this.accounts, n];
|
10481
10492
|
});
|
10482
10493
|
} catch (n) {
|
@@ -10503,14 +10514,14 @@ class Yu {
|
|
10503
10514
|
loadAccounts = async () => {
|
10504
10515
|
await this.loadMembers();
|
10505
10516
|
const e = await this.api.getAccounts();
|
10506
|
-
|
10517
|
+
V(() => {
|
10507
10518
|
this.augmentAccounts(e);
|
10508
10519
|
});
|
10509
10520
|
};
|
10510
10521
|
loadInstitutions = async () => {
|
10511
10522
|
try {
|
10512
10523
|
const e = await this.api.getInstitutions();
|
10513
|
-
|
10524
|
+
V(() => {
|
10514
10525
|
this.institutions = e;
|
10515
10526
|
});
|
10516
10527
|
} catch (e) {
|
@@ -10520,7 +10531,7 @@ class Yu {
|
|
10520
10531
|
loadMembers = async () => {
|
10521
10532
|
try {
|
10522
10533
|
const e = await this.api.getMembers();
|
10523
|
-
|
10534
|
+
V(() => {
|
10524
10535
|
this.members = e;
|
10525
10536
|
});
|
10526
10537
|
} catch (e) {
|
@@ -10533,7 +10544,7 @@ class Yu {
|
|
10533
10544
|
mergeAccounts = async (e) => {
|
10534
10545
|
try {
|
10535
10546
|
const n = await this.api.mergeAccounts(e), a = n[Object.keys(n)[0]];
|
10536
|
-
|
10547
|
+
V(() => {
|
10537
10548
|
const r = this.accounts.findIndex((o) => o.guid === e[1]);
|
10538
10549
|
this.accounts.splice(r, 1);
|
10539
10550
|
const i = this.accounts.findIndex((o) => o.guid === e[0]);
|
@@ -10561,7 +10572,7 @@ class Yu {
|
|
10561
10572
|
};
|
10562
10573
|
removeAccount = async (e) => {
|
10563
10574
|
try {
|
10564
|
-
await this.api.deleteAccount(e),
|
10575
|
+
await this.api.deleteAccount(e), V(() => {
|
10565
10576
|
const n = this.accounts.findIndex((a) => a.guid === e);
|
10566
10577
|
this.accounts.splice(n, 1);
|
10567
10578
|
});
|
@@ -10572,7 +10583,7 @@ class Yu {
|
|
10572
10583
|
updateAccount = async (e) => {
|
10573
10584
|
try {
|
10574
10585
|
const n = await this.api.updateAccount(e);
|
10575
|
-
|
10586
|
+
V(() => {
|
10576
10587
|
const a = this.accounts.findIndex(
|
10577
10588
|
(r) => r.guid === n.guid
|
10578
10589
|
);
|
@@ -11449,7 +11460,7 @@ class O1 {
|
|
11449
11460
|
};
|
11450
11461
|
loadCopy = async () => {
|
11451
11462
|
const e = await this.copyApi.getGlobalCopy(this.namespace, this.translationKey);
|
11452
|
-
|
11463
|
+
V(() => {
|
11453
11464
|
this.copyObject = e[this.translationKey];
|
11454
11465
|
});
|
11455
11466
|
};
|
@@ -11630,7 +11641,7 @@ class R1 {
|
|
11630
11641
|
yA(this), this.copyStore = new O1(), this.insightsMicroWidgetStore = new H1();
|
11631
11642
|
}
|
11632
11643
|
initialize = async (e, n) => {
|
11633
|
-
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n), this.session = await ss(e, n, "1.0.0", "Micro Insights Carousel"),
|
11644
|
+
await this.copyStore.initialize(e, n), await this.insightsMicroWidgetStore.initialize(e, n), this.session = await ss(e, n, "1.0.0", "Micro Insights Carousel"), V(() => {
|
11634
11645
|
this.isInitialized = !0;
|
11635
11646
|
});
|
11636
11647
|
};
|
@@ -13710,9 +13721,9 @@ const ut = C.createContext(null), q1 = ({
|
|
13710
13721
|
}, y3 = O(m3), E3 = {
|
13711
13722
|
title: "Spending"
|
13712
13723
|
}, w3 = ({ sx: A = {} }) => {
|
13713
|
-
const { accounts: e } = zA(), { isInitialized: n, setDisplayedDate: a } = mA(), { onEvent: r } =
|
13724
|
+
const { accounts: e } = zA(), { isInitialized: n, setDisplayedDate: a } = mA(), { onEvent: r } = j(), [i, o] = C.useState(!1);
|
13714
13725
|
C.useEffect(() => {
|
13715
|
-
a(vA(
|
13726
|
+
a(vA(F()), PA(F())), o(!0), r("spending");
|
13716
13727
|
}, []);
|
13717
13728
|
const s = (c) => {
|
13718
13729
|
a(c[0], c[1]);
|
@@ -13937,7 +13948,7 @@ export {
|
|
13937
13948
|
Me as useCategoryUiStore,
|
13938
13949
|
Ss as useCombineEvents,
|
13939
13950
|
Is as useCombinePageviews,
|
13940
|
-
|
13951
|
+
j as useEvent,
|
13941
13952
|
cu as useGetMergeableAccounts,
|
13942
13953
|
X as useGlobalCopyStore,
|
13943
13954
|
Fn as useGlobalStore,
|