@mx-cartographer/experiences 8.0.0-alpha.bb2 → 8.0.0-alpha.bb4
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/CHANGELOG.md +128 -1
- package/dist/{Account-Bxw0_4FU.mjs → Account-B4CDD-zq.mjs} +1 -1
- package/dist/AccountDetailsContent-adZTkM52.mjs +683 -0
- package/dist/AccountDetailsHeader-DRjFuyJT.mjs +87 -0
- package/dist/{AccountFields-C9FlatNb.mjs → AccountFields-Cl4KHoSj.mjs} +14 -12
- package/dist/AccountListItem-wgmlex-_.mjs +90 -0
- package/dist/{AccountStore-BgNOyMdp.mjs → AccountStore-HbVblv86.mjs} +19 -8
- package/dist/{Accounts-BRf_YeTf.mjs → Accounts-CRUehOiy.mjs} +1 -1
- package/dist/{BeatApi-DhJpgCLz.mjs → BeatApi-De2IaqH2.mjs} +1 -1
- package/dist/{BeatStore-IBnXd4YK.mjs → BeatStore-D_NYuBSz.mjs} +1 -1
- package/dist/{BudgetUtil-B2ZXyw-g.mjs → BudgetUtil-Jv8h9H9l.mjs} +33 -33
- package/dist/{CashflowStore-D9Dpuz7X.mjs → CashflowStore-CA190BPF.mjs} +18 -25
- package/dist/{Category-CevNQ03n.mjs → Category-Ccoew_sA.mjs} +2 -2
- package/dist/{CategorySelectorDrawer-DUe4lH5-.mjs → CategorySelectorDrawer-Dl006GKy.mjs} +43 -41
- package/dist/{CategoryStore-yHI0hWmK.mjs → CategoryStore-MUwRWH9e.mjs} +13 -11
- package/dist/{CategoryUtil-pZRIYOgN.mjs → CategoryUtil-DfVKKkRf.mjs} +4 -4
- package/dist/{ConnectDrawer-BQNs-hjk.mjs → ConnectDrawer-DVp54lUH.mjs} +49 -48
- package/dist/{ConnectionsDrawer-ByGQE7D5.mjs → ConnectionsDrawer-Dsc04-4Z.mjs} +3 -3
- package/dist/CurrencyInput-D1cjbdCI.mjs +85 -0
- package/dist/{CurrencyText-kyC1aseI.mjs → CurrencyText-Dr0EZ7bp.mjs} +1 -1
- package/dist/{DateUtil-BcuH7ErC.mjs → DateUtil-CDPZw_-m.mjs} +3 -3
- package/dist/{DebtsStore-C9bblOgW.mjs → DebtsStore-pL63fmdT.mjs} +3 -3
- package/dist/{Dialog-CWW597AF.mjs → Dialog-CDV0kKxj.mjs} +24 -24
- package/dist/{Donut-oaQFlbit.mjs → Donut-Dmy3JTWd.mjs} +12 -12
- package/dist/Drawer-BF40nbsH.mjs +163 -0
- package/dist/{EmptyState-DA_lfRBv.mjs → EmptyState-DoxNUae-.mjs} +24 -22
- package/dist/{ExportCsvAction-sX8Rg4Ov.mjs → ExportCsvAction-QhQK4_FU.mjs} +4 -4
- package/dist/{Fetch-87LIQbEA.mjs → Fetch-DecPFeGU.mjs} +24 -22
- package/dist/FinstrongStore-BGf36b0z.mjs +451 -0
- package/dist/{GoalStore-D-aB35SY.mjs → GoalStore-C1-w3Y1E.mjs} +7 -7
- package/dist/HeaderCell-P8w6CmfO.mjs +6 -0
- package/dist/{Help-B6dIcujh.mjs → Help-DBfsTkAi.mjs} +125 -146
- package/dist/{Help-DhcC-C05.mjs → Help-c-zHlDbv.mjs} +8 -8
- package/dist/{IconBacking-B9oC6uL2.mjs → IconBacking-DgT8DCeh.mjs} +11 -11
- package/dist/LineChart-C1PxNf7P.mjs +581 -0
- package/dist/{ListItemAction-DHa3KJPs.mjs → ListItemAction-BNCWQAN_.mjs} +10 -10
- package/dist/Loader-Ckqi9Rx6.mjs +21 -0
- package/dist/{ManageIncome-1s_q5W4X.mjs → ManageIncome-8EsStyIQ.mjs} +195 -192
- package/dist/{MerchantStore-DrFvsUyy.mjs → MerchantStore-WvZ4gnQe.mjs} +1 -1
- package/dist/MicroWidgetContainer-BGpNl5ZS.mjs +45 -0
- package/dist/MiniWidgetContainer-CKzf_Ira.mjs +56 -0
- package/dist/{NetWorthStore-DCsTZpuS.mjs → NetWorthStore-Bti6u-d9.mjs} +4 -4
- package/dist/{NotificationSettings-DqrkNMod.mjs → NotificationSettings-B74rQVYC.mjs} +276 -273
- package/dist/{NotificationStore-BxP_P2dA.mjs → NotificationStore-Ck2KdNmT.mjs} +10 -10
- package/dist/{NumberFormatting-Buh7u8Oi.mjs → NumberFormatting-DjTD0t3W.mjs} +9 -9
- package/dist/{OriginalBalanceAction-CWuVvRq9.mjs → OriginalBalanceAction-2Y_3U_mg.mjs} +10 -10
- package/dist/{RecurringSettings-A_rAGCTP.mjs → RecurringSettings-DAncu--R.mjs} +17 -17
- package/dist/{RecurringTransactions-DK8dWldr.mjs → RecurringTransactions-CxcSL1dY.mjs} +106 -105
- package/dist/{RecurringTransactionsStore-C4YOD7_D.mjs → RecurringTransactionsStore-CNFxyGB6.mjs} +80 -73
- package/dist/{ResponsiveButton-DZFp78fJ.mjs → ResponsiveButton-Cn6-R7ue.mjs} +10 -10
- package/dist/SearchBox-B7km148n.mjs +39 -0
- package/dist/{SettingsStore-BcgS_Ohv.mjs → SettingsStore-BASMQSIp.mjs} +3 -3
- package/dist/{SingleSegmentDonut-BgbLgwHi.mjs → SingleSegmentDonut-7Uy6VEld.mjs} +6 -6
- package/dist/SkeletonLoader-BaNboJjD.mjs +38 -0
- package/dist/{SpendingData-D5vsfYKo.mjs → SpendingData-DPQ96k3x.mjs} +19 -19
- package/dist/SpendingLegend-6FqtMcBV.mjs +193 -0
- package/dist/{StatusBar-BK_uYHAB.mjs → StatusBar-CPfSXe80.mjs} +6 -6
- package/dist/{TabContentContainer-j01JYR_7.mjs → TabContentContainer-CnMXkVqr.mjs} +8 -8
- package/dist/{ToggleListItem-r0Kx56wF.mjs → ToggleListItem-ciFTiqRS.mjs} +19 -14
- package/dist/TransactionApi-CjBoLleL.mjs +86 -0
- package/dist/TransactionDetails-Bn0qY5Hw.mjs +1336 -0
- package/dist/{TransactionStore-ai3uII_r.mjs → TransactionStore-DbwAutwC.mjs} +146 -165
- package/dist/TrendsStore-_mRaFUdf.mjs +182 -0
- package/dist/{User-BQUxBeZV.mjs → User-BklmOUSd.mjs} +107 -107
- package/dist/{ViewMoreMicroCard-SCn2wt4i.mjs → ViewMoreMicroCard-DAkyNRlD.mjs} +706 -729
- package/dist/{WidgetContainer-BHWANqT4.mjs → WidgetContainer-CDh9fjpR.mjs} +36 -36
- package/dist/accounts/components/AccountsListCompact.d.ts +10 -0
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsChart.d.ts +4 -1
- package/dist/accounts/components/detailsdrawer/Accounts/AccountDetailsHeader.d.ts +2 -1
- package/dist/accounts/index.es.js +228 -199
- package/dist/accounts/stores/AccountStore.d.ts +2 -0
- package/dist/analytics/index.es.js +27 -27
- package/dist/budgets/index.es.js +459 -462
- package/dist/cashflow/index.es.js +419 -428
- package/dist/categories/index.es.js +2 -2
- package/dist/categories/stores/CategoryStore.d.ts +1 -1
- package/dist/common/components/ErrorBoundary.d.ts +1 -1
- package/dist/common/components/Loader.d.ts +1 -2
- package/dist/common/components/Select.d.ts +4 -2
- package/dist/common/components/SkeletonLoader.d.ts +7 -0
- package/dist/common/components/accountfilter/AccountFilterOptions.d.ts +1 -1
- package/dist/common/components/charts/LineChart.d.ts +12 -2
- package/dist/common/components/charts/index.d.ts +0 -3
- package/dist/common/components/charts/linechart/CustomLegend.d.ts +3 -1
- package/dist/common/components/charts/linechart/CustomMark.d.ts +5 -1
- package/dist/common/components/drawer/Drawer.d.ts +3 -0
- package/dist/common/components/drawer/Footer.d.ts +17 -0
- package/dist/common/components/index.d.ts +0 -1
- package/dist/common/hooks/index.d.ts +0 -1
- package/dist/common/hooks/useAriaLive.d.ts +1 -1
- package/dist/common/index.es.js +413 -674
- package/dist/common/stores/GlobalStore.d.ts +7 -1
- package/dist/common/stores/GlobalUiStore.d.ts +3 -2
- package/dist/common/types/Finstrong.d.ts +54 -0
- package/dist/common/types/Global.d.ts +1 -0
- package/dist/common/types/Widgets.d.ts +1 -0
- package/dist/common/types/index.d.ts +1 -1
- package/dist/common/types/localization/FinstrongCopy.d.ts +105 -2
- package/dist/common/types/localization/GoalsCopy.d.ts +1 -0
- package/dist/common/utils/Theme.d.ts +1 -3
- package/dist/dashboard/index.es.js +21 -21
- package/dist/debts/components/DebtsChart.d.ts +1 -2
- package/dist/debts/index.es.js +673 -665
- package/dist/exportTransactionsToCSV-BgV_wTLT.mjs +48 -0
- package/dist/finstrong/FinstrongWidget.d.ts +1 -1
- package/dist/finstrong/api/FinstrongApi.d.ts +5 -0
- package/dist/finstrong/components/ConnectMoreAccountsCard.d.ts +3 -1
- package/dist/finstrong/components/CreditScore/CreditScoreContent.d.ts +4 -0
- package/dist/finstrong/components/CreditScore/CreditScoreHeader.d.ts +4 -0
- package/dist/finstrong/components/FinancialStrengthGraph.d.ts +7 -1
- package/dist/finstrong/components/HaveManageableDebt/DebtPaymentTabContent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtComponent.d.ts +3 -0
- package/dist/finstrong/components/HaveManageableDebt/HaveManageableDebtProgressBar.d.ts +4 -0
- package/dist/finstrong/components/HaveManageableDebt/IncomeTabContent.d.ts +3 -0
- package/dist/finstrong/components/KeyIndicatorsBorrowTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsDrawer.d.ts +4 -1
- package/dist/finstrong/components/KeyIndicatorsSaveTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsSpendTab.d.ts +2 -2
- package/dist/finstrong/components/KeyIndicatorsTabItem.d.ts +4 -3
- package/dist/finstrong/components/KeyIndicatorsTabItemDrawer.d.ts +10 -0
- package/dist/finstrong/components/KeyIndicatorsTabsWidget.d.ts +2 -2
- package/dist/finstrong/components/MaintainingEmergencySavings/EstimatedContributionCalculator.d.ts +6 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsContent.d.ts +4 -0
- package/dist/finstrong/components/MaintainingEmergencySavings/MaintainingEmergencySavingsSticky.d.ts +4 -0
- package/dist/finstrong/components/ProgressBar.d.ts +15 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/AvailableTabContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnDrawerContent.d.ts +3 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SaveEnoughToLiveOnProgressBar.d.ts +4 -0
- package/dist/finstrong/components/SaveEnoughToLiveOn/SpendingTabContent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeComponent.d.ts +3 -0
- package/dist/finstrong/components/SpendLessThanYouMake/SpendLessThanYouMakeProgressBar.d.ts +4 -0
- package/dist/finstrong/components/StatusChip.d.ts +5 -0
- package/dist/finstrong/components/onboarding/Onboarding.d.ts +2 -0
- package/dist/finstrong/components/onboarding/OnboardingAddMonthlyIncome.d.ts +17 -0
- package/dist/finstrong/components/onboarding/OnboardingBirthday.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingCreditScore.d.ts +8 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsDrawer.d.ts +14 -0
- package/dist/finstrong/components/onboarding/OnboardingStepsHeader.d.ts +8 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeDrawerComponent.d.ts +4 -0
- package/dist/finstrong/components/paybillsontime/PayBillsOnTimeStickyComponent.d.ts +4 -0
- package/dist/finstrong/components/shared/Accounts.d.ts +8 -0
- package/dist/finstrong/components/shared/CustomDoubleBarPlot.d.ts +25 -0
- package/dist/finstrong/components/shared/DialScoreCard.d.ts +7 -1
- package/dist/finstrong/components/shared/DoubleBarChart.d.ts +28 -0
- package/dist/finstrong/components/shared/LineGraph.d.ts +7 -0
- package/dist/finstrong/components/shared/TotalCard.d.ts +8 -0
- package/dist/finstrong/components/shared/Transactions.d.ts +11 -0
- package/dist/finstrong/constants/index.d.ts +9 -0
- package/dist/finstrong/index.es.js +3175 -1067
- package/dist/finstrong/stores/FinstrongStore.d.ts +25 -2
- package/dist/finstrong/util/finstrongUtils.d.ts +58 -1
- package/dist/goals/index.es.js +580 -570
- package/dist/help/components/content/BottomImageContent.d.ts +1 -1
- package/dist/help/components/content/LeftImageContent.d.ts +1 -1
- package/dist/help/components/content/RightImageContent.d.ts +1 -1
- package/dist/help/components/content/TopImageContent.d.ts +1 -1
- package/dist/help/index.es.js +6 -6
- package/dist/{hooks-D6XlXHf4.mjs → hooks-C41HAxM5.mjs} +3 -3
- package/dist/insights/index.es.js +1 -1
- package/dist/investments/index.es.js +537 -536
- package/dist/merchants/index.es.js +9 -9
- package/dist/microinsights/beaticons/BeatIcon.d.ts +2 -9
- package/dist/microinsights/beaticons/BeatMerchantLogo.d.ts +3 -2
- package/dist/microinsights/beaticons/MonthlySpendComparisonIcon.d.ts +2 -1
- package/dist/microinsights/cards/{MicroInsightCard.d.ts → BaseCard.d.ts} +1 -8
- package/dist/microinsights/cards/{BeatCard.d.ts → InsightCard.d.ts} +2 -2
- package/dist/microinsights/cards/NoRelevantInsightsCard.d.ts +2 -5
- package/dist/microinsights/cards/ZeroStateCard.d.ts +2 -5
- package/dist/microinsights/carousel/BeatList.d.ts +10 -0
- package/dist/microinsights/carousel/CarouselControls.d.ts +1 -3
- package/dist/microinsights/carousel/CarouselHeader.d.ts +1 -2
- package/dist/microinsights/constants/App.d.ts +0 -1
- package/dist/microinsights/index.d.ts +3 -3
- package/dist/microinsights/index.es.js +7 -7
- package/dist/microinsights/interfaces.d.ts +0 -6
- package/dist/networth/components/NetWorthChange.d.ts +3 -1
- package/dist/networth/index.es.js +262 -254
- package/dist/notifications/index.es.js +90 -91
- package/dist/recurringtransactions/components/MicroWidgetContent.d.ts +3 -0
- package/dist/recurringtransactions/index.es.js +586 -562
- package/dist/recurringtransactions/stores/RecurringTransactionsStore.d.ts +1 -0
- package/dist/settings/index.es.js +371 -365
- package/dist/spending/index.es.js +267 -419
- package/dist/spending/utils/SpendingData.d.ts +2 -1
- package/dist/transactions/components/shared/TransactionDetails.d.ts +1 -0
- package/dist/transactions/components/shared/TransactionList.d.ts +1 -0
- package/dist/transactions/index.es.js +231 -226
- package/dist/transactions/stores/TransactionStore.d.ts +1 -1
- package/dist/transactions/stores/UiStore.d.ts +0 -2
- package/dist/trends/index.es.js +988 -612
- package/dist/{useAccountDisplayName-BUAApBIb.mjs → useAccountDisplayName-CcIp09Xc.mjs} +2 -2
- package/dist/{useCombineEvents-BUDIR1ba.mjs → useCombineEvents-kNzLTWCp.mjs} +3 -3
- package/dist/{useInsightsEnabled-DBpwEq10.mjs → useInsightsEnabled-CNjP5cfR.mjs} +1 -1
- package/dist/{useScreenSize-B6JyS_Lj.mjs → useScreenSize-B5afALev.mjs} +1 -1
- package/package.json +51 -56
- package/dist/AccountDetailsContent-CAM9y39M.mjs +0 -679
- package/dist/AccountDetailsHeader-JtSX6Uf9.mjs +0 -120
- package/dist/AccountListItem-JFMZROh7.mjs +0 -90
- package/dist/CurrencyInput-DUsQbkXb.mjs +0 -85
- package/dist/Drawer-kEE73B87.mjs +0 -113
- package/dist/FinstrongStore-F2c607dj.mjs +0 -101
- package/dist/HeaderCell-DjuifqHJ.mjs +0 -6
- package/dist/LineChart-D4GI7nVh.mjs +0 -541
- package/dist/Loader-DUaFpDGv.mjs +0 -24
- package/dist/MicroWidgetContainer-DpeqN9n3.mjs +0 -45
- package/dist/MiniWidgetContainer-D0gfmbaF.mjs +0 -56
- package/dist/SearchBox-B2_zLv8-.mjs +0 -42
- package/dist/TransactionApi-B3Tksf7L.mjs +0 -86
- package/dist/TransactionDetails-oP1eSuiS.mjs +0 -1334
- package/dist/TrendsStore-DCYbpXPO.mjs +0 -559
- package/dist/accounts/components/AccountsWidgetContent.d.ts +0 -3
- package/dist/common/components/barchart/Bar.d.ts +0 -25
- package/dist/common/components/barchart/BarChart.d.ts +0 -34
- package/dist/common/components/barchart/BarColumn.d.ts +0 -37
- package/dist/common/components/barchart/Legend.d.ts +0 -8
- package/dist/common/components/barchart/Util.d.ts +0 -42
- package/dist/common/components/barchart/index.d.ts +0 -1
- package/dist/common/hooks/usePrevious.d.ts +0 -2
- package/dist/exportTransactionsToCSV-7bVS7KXf.mjs +0 -47
- package/dist/finstrong/utils/Finstrong.d.ts +0 -6
- package/dist/transactions/components/shared/transactionlist/DateRow.d.ts +0 -7
- package/dist/useAriaLive-B3_pRUio.mjs +0 -35
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import i from "react";
|
|
3
|
+
import { css as k } from "@mxenabled/cssinjs";
|
|
4
|
+
import { v4 as q } from "uuid";
|
|
5
|
+
import { TextField as B, P as _ } from "@mxenabled/mxui";
|
|
6
|
+
import { g as L, C as O, f as y, M as C } from "./NumberFormatting-DjTD0t3W.mjs";
|
|
7
|
+
import { u as W } from "./hooks-C41HAxM5.mjs";
|
|
8
|
+
import { b, g } from "./Localization-2MODESHW.mjs";
|
|
9
|
+
const J = ({
|
|
10
|
+
allowDecimals: s = !0,
|
|
11
|
+
ariaLabel: h,
|
|
12
|
+
amount: c,
|
|
13
|
+
amountIsRequired: M = !0,
|
|
14
|
+
copy: a,
|
|
15
|
+
customValidate: $ = () => !0,
|
|
16
|
+
errorText: S = "",
|
|
17
|
+
label: u,
|
|
18
|
+
minAmount: f = 1,
|
|
19
|
+
setAmount: x,
|
|
20
|
+
setHasValidInput: r,
|
|
21
|
+
...N
|
|
22
|
+
}) => {
|
|
23
|
+
const [l, t] = i.useState(""), { common: P } = W(), o = a || P.currency_input, R = j(), A = /^[0-9]*$/, E = /^(\d)*(\,)?([0-9]{1,2})?$/, T = /^(\d)*(\.)?([0-9]{1,2})?$/;
|
|
24
|
+
let n;
|
|
25
|
+
const d = i.useRef(q());
|
|
26
|
+
if (s)
|
|
27
|
+
switch (L()) {
|
|
28
|
+
case O.CAD:
|
|
29
|
+
n = E;
|
|
30
|
+
break;
|
|
31
|
+
default:
|
|
32
|
+
n = T;
|
|
33
|
+
break;
|
|
34
|
+
}
|
|
35
|
+
else
|
|
36
|
+
n = A;
|
|
37
|
+
i.useEffect(() => {
|
|
38
|
+
p(c);
|
|
39
|
+
}, [c]);
|
|
40
|
+
const p = (e) => {
|
|
41
|
+
!M && (e === "" || e === "." || e === ",") ? (t(""), r?.(!1)) : Number(e) < f ? (t(
|
|
42
|
+
b(
|
|
43
|
+
o.error_amount_must_be_equal_to,
|
|
44
|
+
y(f, "0")
|
|
45
|
+
)
|
|
46
|
+
), r?.(!1)) : Number(e) > C ? (t(
|
|
47
|
+
b(
|
|
48
|
+
o.error_amount_must_be_less_than_or_equal_to,
|
|
49
|
+
y(C, s ? "0,0.00" : "0,0", Math.floor)
|
|
50
|
+
)
|
|
51
|
+
), r?.(!1)) : e.toString().match(n) ? $() ? (t(""), r?.(!0)) : (t(S), r?.(!1)) : (t(o.error_amount_is_invalid), r?.(!1)), x(e.toString());
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ m(
|
|
54
|
+
B,
|
|
55
|
+
{
|
|
56
|
+
InputProps: {
|
|
57
|
+
endAdornment: g().includes("fr-ca") ? /* @__PURE__ */ m(_, { children: "$" }) : void 0,
|
|
58
|
+
startAdornment: g().includes("fr-ca") ? void 0 : /* @__PURE__ */ m(_, { children: "$" })
|
|
59
|
+
},
|
|
60
|
+
className: `mx-cmn-currency-input ${R}`,
|
|
61
|
+
error: !!l,
|
|
62
|
+
helperText: l,
|
|
63
|
+
hiddenLabel: !u,
|
|
64
|
+
id: `currency-input-${d.current}`,
|
|
65
|
+
inputMode: s ? "decimal" : "numeric",
|
|
66
|
+
inputProps: {
|
|
67
|
+
"aria-label": h || o.enter_amount,
|
|
68
|
+
noValidate: !0,
|
|
69
|
+
pattern: "[0-9]*"
|
|
70
|
+
},
|
|
71
|
+
label: u,
|
|
72
|
+
name: `currency-input-${d.current}`,
|
|
73
|
+
onChange: (e) => p(e.target.value),
|
|
74
|
+
value: c,
|
|
75
|
+
...N
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}, j = () => k({
|
|
79
|
+
"& .MuiInputBase-adornedStart > .p": {
|
|
80
|
+
marginRight: 4
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
export {
|
|
84
|
+
J as C
|
|
85
|
+
};
|
|
@@ -7,8 +7,8 @@ import { isBefore as n } from "date-fns/isBefore";
|
|
|
7
7
|
import { nextDay as c } from "date-fns/nextDay";
|
|
8
8
|
import { setDate as d } from "date-fns/setDate";
|
|
9
9
|
import { startOfToday as o } from "date-fns/startOfToday";
|
|
10
|
-
import { fromUnixTime as
|
|
11
|
-
import { f as
|
|
10
|
+
import { fromUnixTime as i } from "date-fns/fromUnixTime";
|
|
11
|
+
import { f as D, a as f } from "./Dialog-CDV0kKxj.mjs";
|
|
12
12
|
const x = (t) => {
|
|
13
13
|
const e = y(t);
|
|
14
14
|
let r = c(t, e);
|
|
@@ -34,7 +34,7 @@ const x = (t) => {
|
|
|
34
34
|
}, Q = (t) => {
|
|
35
35
|
const e = p(t);
|
|
36
36
|
return a(e, 1);
|
|
37
|
-
}, w = (t) => l(t, 1), F = (t) => i(
|
|
37
|
+
}, w = (t) => l(t, 1), F = (t) => D(i(t), f.DAY_OF_WEEK_MONTH_DAY), H = (t) => t ? D(i(t), f.MONTH_YEAR) : "";
|
|
38
38
|
export {
|
|
39
39
|
Q as a,
|
|
40
40
|
p as b,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { makeAutoObservable as l } from "mobx";
|
|
2
2
|
import { getDate as r, fromUnixTime as _, startOfMonth as m } from "date-fns";
|
|
3
|
-
import { A as p } from "./ConnectDrawer-
|
|
3
|
+
import { A as p } from "./ConnectDrawer-DVp54lUH.mjs";
|
|
4
4
|
const E = 12, T = 100;
|
|
5
5
|
var c = /* @__PURE__ */ ((a) => (a[a.FASTEST_PAYOFF_FIRST = 1] = "FASTEST_PAYOFF_FIRST", a[a.HIGHEST_INTEREST = 2] = "HIGHEST_INTEREST", a[a.LOWEST_BALANCE = 3] = "LOWEST_BALANCE", a[a.HIGHEST_BALANCE = 4] = "HIGHEST_BALANCE", a))(c || {});
|
|
6
6
|
const b = {
|
|
@@ -56,8 +56,8 @@ class A {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
export {
|
|
59
|
-
|
|
59
|
+
A as D,
|
|
60
60
|
T as I,
|
|
61
61
|
E as M,
|
|
62
|
-
|
|
62
|
+
c as a
|
|
63
63
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { intlFormat as
|
|
2
|
-
import { g } from "./Localization-2MODESHW.mjs";
|
|
3
|
-
import { jsx as a, jsxs as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { intlFormat as D } from "date-fns/intlFormat";
|
|
2
|
+
import { g as y } from "./Localization-2MODESHW.mjs";
|
|
3
|
+
import { jsx as a, jsxs as M } from "react/jsx-runtime";
|
|
4
|
+
import T from "@mui/material/Dialog";
|
|
5
|
+
import g from "@mui/material/DialogContent";
|
|
6
6
|
import { DialogHeader as u, DialogFooter as H } from "@mxenabled/mxui";
|
|
7
|
-
const
|
|
7
|
+
const F = "do", L = "MMM do, yyyy", S = {
|
|
8
8
|
TIME_STAMP_HOUR_MINUTE: {
|
|
9
9
|
hour: "numeric",
|
|
10
10
|
minute: "numeric"
|
|
@@ -60,14 +60,14 @@ const L = "do", S = "MMM do, yyyy", x = {
|
|
|
60
60
|
day: "numeric",
|
|
61
61
|
year: "numeric"
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, x = (i, o) => D(new Date(i), Object.assign(o), { locale: y() }), b = ({
|
|
64
64
|
className: i,
|
|
65
65
|
copy: o = {
|
|
66
66
|
title: "",
|
|
67
67
|
close_aria: "Close"
|
|
68
68
|
},
|
|
69
|
-
disablePrimaryButton:
|
|
70
|
-
isOpen:
|
|
69
|
+
disablePrimaryButton: e = !1,
|
|
70
|
+
isOpen: n = !1,
|
|
71
71
|
onClose: r,
|
|
72
72
|
onPrimaryAction: m,
|
|
73
73
|
primaryColor: c = "primary",
|
|
@@ -78,16 +78,16 @@ const L = "do", S = "MMM do, yyyy", x = {
|
|
|
78
78
|
children: A,
|
|
79
79
|
...d
|
|
80
80
|
}) => {
|
|
81
|
-
const
|
|
81
|
+
const O = () => {
|
|
82
82
|
m?.(), r();
|
|
83
|
-
},
|
|
83
|
+
}, h = () => {
|
|
84
84
|
t && t(), r();
|
|
85
85
|
};
|
|
86
|
-
return /* @__PURE__ */ a("div", { className: `mx-cmn-dialog ${i}`, children: /* @__PURE__ */
|
|
87
|
-
|
|
86
|
+
return /* @__PURE__ */ a("div", { className: `mx-cmn-dialog ${i}`, children: /* @__PURE__ */ M(
|
|
87
|
+
T,
|
|
88
88
|
{
|
|
89
89
|
onClose: r,
|
|
90
|
-
open:
|
|
90
|
+
open: n,
|
|
91
91
|
sx: {
|
|
92
92
|
"& .MuiDialog-paperScrollPaper": {
|
|
93
93
|
backgroundColor: "background.default"
|
|
@@ -97,13 +97,13 @@ const L = "do", S = "MMM do, yyyy", x = {
|
|
|
97
97
|
...d,
|
|
98
98
|
children: [
|
|
99
99
|
/* @__PURE__ */ a(u, { copy: { title: o.title, close_aria: o.close_aria }, onClose: r }),
|
|
100
|
-
/* @__PURE__ */ a(
|
|
100
|
+
/* @__PURE__ */ a(g, { sx: { lineHeight: 1.5 }, children: A }),
|
|
101
101
|
/* @__PURE__ */ a(
|
|
102
102
|
H,
|
|
103
103
|
{
|
|
104
|
-
isPrimaryDisabled:
|
|
105
|
-
onPrimaryAction:
|
|
106
|
-
onSecondaryAction:
|
|
104
|
+
isPrimaryDisabled: e,
|
|
105
|
+
onPrimaryAction: O,
|
|
106
|
+
onSecondaryAction: h,
|
|
107
107
|
primaryColor: c,
|
|
108
108
|
primaryText: _,
|
|
109
109
|
secondaryColor: l,
|
|
@@ -113,11 +113,11 @@ const L = "do", S = "MMM do, yyyy", x = {
|
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
) });
|
|
116
|
-
}
|
|
116
|
+
};
|
|
117
117
|
export {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
118
|
+
b as D,
|
|
119
|
+
F as O,
|
|
120
|
+
S as a,
|
|
121
|
+
L as b,
|
|
122
|
+
x as f
|
|
123
123
|
};
|
|
@@ -3,11 +3,11 @@ import b from "react";
|
|
|
3
3
|
import { selectAll as m, interpolateString as x, arc as I } from "d3";
|
|
4
4
|
import d from "@mui/material/Box";
|
|
5
5
|
import { useTheme as S } from "@mui/material/styles";
|
|
6
|
-
const k = 100, E = 140, v = 10,
|
|
6
|
+
const k = 100, E = 140, v = 10, j = ({
|
|
7
7
|
data: u,
|
|
8
8
|
hoveredId: h,
|
|
9
|
-
onClick:
|
|
10
|
-
onMouseEnter:
|
|
9
|
+
onClick: a,
|
|
10
|
+
onMouseEnter: s,
|
|
11
11
|
onMouseLeave: l,
|
|
12
12
|
selectedId: i,
|
|
13
13
|
size: t = 300,
|
|
@@ -16,10 +16,10 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
16
16
|
const f = S();
|
|
17
17
|
let r = 0;
|
|
18
18
|
const g = (o, n) => {
|
|
19
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(),
|
|
19
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), a?.(n));
|
|
20
20
|
}, y = (o) => {
|
|
21
|
-
|
|
22
|
-
},
|
|
21
|
+
s?.(o);
|
|
22
|
+
}, w = (o) => {
|
|
23
23
|
l?.(o);
|
|
24
24
|
};
|
|
25
25
|
return b.useEffect(() => {
|
|
@@ -45,11 +45,11 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
45
45
|
/* @__PURE__ */ e("g", { children: u.map((o) => {
|
|
46
46
|
const n = r;
|
|
47
47
|
r = r + 2 * Math.PI * (o.value / 100);
|
|
48
|
-
const
|
|
48
|
+
const D = r, R = I().cornerRadius(4)({
|
|
49
49
|
innerRadius: k,
|
|
50
50
|
outerRadius: E + (o.id === i || o.id === h ? v : 0),
|
|
51
51
|
startAngle: n,
|
|
52
|
-
endAngle:
|
|
52
|
+
endAngle: D,
|
|
53
53
|
padAngle: 0.025
|
|
54
54
|
});
|
|
55
55
|
return /* @__PURE__ */ e(
|
|
@@ -60,11 +60,11 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
60
60
|
className: "arc-outer",
|
|
61
61
|
d: R,
|
|
62
62
|
fill: o.color,
|
|
63
|
-
onBlur: () =>
|
|
64
|
-
onClick: () =>
|
|
63
|
+
onBlur: () => w(o.id),
|
|
64
|
+
onClick: () => a?.(o.id),
|
|
65
65
|
onFocus: () => y(o.id),
|
|
66
66
|
onKeyDown: (A) => g(A, o.id),
|
|
67
|
-
onMouseEnter: () =>
|
|
67
|
+
onMouseEnter: () => s?.(o.id),
|
|
68
68
|
onMouseLeave: () => l?.(o.id),
|
|
69
69
|
role: "button",
|
|
70
70
|
style: {
|
|
@@ -80,7 +80,7 @@ const k = 100, E = 140, v = 10, B = ({
|
|
|
80
80
|
}
|
|
81
81
|
)
|
|
82
82
|
] });
|
|
83
|
-
}
|
|
83
|
+
};
|
|
84
84
|
export {
|
|
85
85
|
j as D
|
|
86
86
|
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { jsxs as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import u from "@mui/material/Box";
|
|
3
|
+
import s from "@mui/material/Stack";
|
|
4
|
+
import { H2 as D, Drawer as v } from "@mxenabled/mxui";
|
|
5
|
+
import x from "@mui/material/Button";
|
|
6
|
+
import B from "@mui/material/IconButton";
|
|
7
|
+
import { ArrowBack as j } from "@mxenabled/mx-icons";
|
|
8
|
+
const F = ({
|
|
9
|
+
footerStyles: e = {},
|
|
10
|
+
hasSecondaryAction: a = !0,
|
|
11
|
+
isPrimaryDisabled: t,
|
|
12
|
+
onPrimaryAction: o,
|
|
13
|
+
onSecondaryAction: n,
|
|
14
|
+
primaryButtonProps: l = {},
|
|
15
|
+
primaryColor: c = "primary",
|
|
16
|
+
primaryText: i = "Save",
|
|
17
|
+
secondaryColor: d = "primary",
|
|
18
|
+
secondaryText: p = "Cancel"
|
|
19
|
+
}) => /* @__PURE__ */ h(
|
|
20
|
+
s,
|
|
21
|
+
{
|
|
22
|
+
sx: {
|
|
23
|
+
bgcolor: "background.paper",
|
|
24
|
+
flexDirection: "row",
|
|
25
|
+
gap: 16,
|
|
26
|
+
justifyContent: "flex-end",
|
|
27
|
+
p: 24,
|
|
28
|
+
...e
|
|
29
|
+
},
|
|
30
|
+
children: [
|
|
31
|
+
a && /* @__PURE__ */ r(
|
|
32
|
+
x,
|
|
33
|
+
{
|
|
34
|
+
color: d,
|
|
35
|
+
onClick: n,
|
|
36
|
+
variant: o ? "outlined" : "contained",
|
|
37
|
+
children: p
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
o && /* @__PURE__ */ r(
|
|
41
|
+
x,
|
|
42
|
+
{
|
|
43
|
+
...l,
|
|
44
|
+
color: c,
|
|
45
|
+
disabled: t,
|
|
46
|
+
onClick: o,
|
|
47
|
+
variant: "contained",
|
|
48
|
+
children: i
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
), H = ({
|
|
54
|
+
ariaLabelClose: e,
|
|
55
|
+
onClose: a,
|
|
56
|
+
shouldShowBorders: t,
|
|
57
|
+
shouldShowShadow: o,
|
|
58
|
+
title: n
|
|
59
|
+
}) => /* @__PURE__ */ h(
|
|
60
|
+
s,
|
|
61
|
+
{
|
|
62
|
+
"aria-level": 1,
|
|
63
|
+
direction: "row",
|
|
64
|
+
role: "heading",
|
|
65
|
+
sx: {
|
|
66
|
+
alignItems: "center",
|
|
67
|
+
backgroundColor: "background.paper",
|
|
68
|
+
...t && {
|
|
69
|
+
borderBottom: 1,
|
|
70
|
+
borderTop: 1,
|
|
71
|
+
borderColor: "neutral.light"
|
|
72
|
+
},
|
|
73
|
+
...o && {
|
|
74
|
+
boxShadow: "0px 2px 8px 0px #6A73811F"
|
|
75
|
+
},
|
|
76
|
+
padding: "8px 8px 8px 8px"
|
|
77
|
+
},
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ r(B, { "aria-label": e, color: "primary", onClick: a, children: /* @__PURE__ */ r(j, { color: "primary", sx: { fontSize: 22 } }) }),
|
|
80
|
+
/* @__PURE__ */ r(
|
|
81
|
+
u,
|
|
82
|
+
{
|
|
83
|
+
sx: {
|
|
84
|
+
flexGrow: 1,
|
|
85
|
+
margin: "auto",
|
|
86
|
+
textAlign: "center"
|
|
87
|
+
},
|
|
88
|
+
children: /* @__PURE__ */ r(D, { bold: !0, variant: "body1", children: n })
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ r(u, { width: "44px" })
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
), $ = ({
|
|
95
|
+
ariaLabelClose: e = "Close",
|
|
96
|
+
children: a,
|
|
97
|
+
footerStyles: t = {},
|
|
98
|
+
hasSecondaryAction: o = !0,
|
|
99
|
+
id: n,
|
|
100
|
+
isOpen: l,
|
|
101
|
+
isPrimaryDisabled: c,
|
|
102
|
+
onClose: i,
|
|
103
|
+
onPrimaryAction: d,
|
|
104
|
+
onSecondaryAction: p,
|
|
105
|
+
primaryButtonProps: b,
|
|
106
|
+
primaryColor: m = "primary",
|
|
107
|
+
primaryText: g,
|
|
108
|
+
secondaryColor: f = "secondary",
|
|
109
|
+
secondaryText: w,
|
|
110
|
+
shouldShowHeaderBorders: k = !0,
|
|
111
|
+
shouldShowHeaderShadow: C = !1,
|
|
112
|
+
title: S,
|
|
113
|
+
...y
|
|
114
|
+
}) => /* @__PURE__ */ r(
|
|
115
|
+
v,
|
|
116
|
+
{
|
|
117
|
+
id: n,
|
|
118
|
+
isOpen: l,
|
|
119
|
+
onClose: i,
|
|
120
|
+
sx: {
|
|
121
|
+
"& .MuiDrawer-paper": {
|
|
122
|
+
backgroundColor: "background.default",
|
|
123
|
+
borderRadius: 0
|
|
124
|
+
},
|
|
125
|
+
height: "100%",
|
|
126
|
+
"& .MuiToolbar-root": {
|
|
127
|
+
backgroundColor: "background.paper"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
...y,
|
|
131
|
+
children: /* @__PURE__ */ h(s, { height: "100%", justifyContent: "space-between", children: [
|
|
132
|
+
/* @__PURE__ */ r(
|
|
133
|
+
H,
|
|
134
|
+
{
|
|
135
|
+
ariaLabelClose: e,
|
|
136
|
+
onClose: i,
|
|
137
|
+
shouldShowBorders: k,
|
|
138
|
+
shouldShowShadow: C,
|
|
139
|
+
title: S
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ r(u, { height: "100%", overflow: "auto", children: a }),
|
|
143
|
+
d && /* @__PURE__ */ r(
|
|
144
|
+
F,
|
|
145
|
+
{
|
|
146
|
+
footerStyles: t,
|
|
147
|
+
hasSecondaryAction: o,
|
|
148
|
+
isPrimaryDisabled: c,
|
|
149
|
+
onPrimaryAction: d,
|
|
150
|
+
onSecondaryAction: p ?? i,
|
|
151
|
+
primaryButtonProps: b,
|
|
152
|
+
primaryColor: m,
|
|
153
|
+
primaryText: g,
|
|
154
|
+
secondaryColor: f,
|
|
155
|
+
secondaryText: w
|
|
156
|
+
}
|
|
157
|
+
)
|
|
158
|
+
] })
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
export {
|
|
162
|
+
$ as D
|
|
163
|
+
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as o, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { Text as
|
|
6
|
-
const
|
|
7
|
-
icon:
|
|
8
|
-
iconColor:
|
|
9
|
-
header:
|
|
10
|
-
onClick:
|
|
2
|
+
import s from "@mui/material/Button";
|
|
3
|
+
import i from "@mui/material/Stack";
|
|
4
|
+
import { Icon as x } from "@mxenabled/mx-icons";
|
|
5
|
+
import { Text as c } from "@mxenabled/mxui";
|
|
6
|
+
const y = ({
|
|
7
|
+
icon: p,
|
|
8
|
+
iconColor: m,
|
|
9
|
+
header: l,
|
|
10
|
+
onClick: a,
|
|
11
11
|
primaryButton: e,
|
|
12
|
-
primaryButtonStartIcon:
|
|
12
|
+
primaryButtonStartIcon: n,
|
|
13
13
|
secondaryButton: r,
|
|
14
14
|
subText: d,
|
|
15
15
|
sx: h,
|
|
16
16
|
variant: f = "buttons"
|
|
17
17
|
}) => /* @__PURE__ */ o(
|
|
18
|
-
|
|
18
|
+
i,
|
|
19
19
|
{
|
|
20
20
|
sx: {
|
|
21
21
|
alignItems: "center",
|
|
@@ -25,19 +25,21 @@ const j = ({
|
|
|
25
25
|
...h
|
|
26
26
|
},
|
|
27
27
|
children: [
|
|
28
|
-
/* @__PURE__ */ t(
|
|
28
|
+
/* @__PURE__ */ t(x, { name: p, size: 48, sx: { color: m } }),
|
|
29
29
|
/* @__PURE__ */ t(
|
|
30
|
-
|
|
30
|
+
c,
|
|
31
31
|
{
|
|
32
|
+
className: "empty-state-header",
|
|
32
33
|
color: "text.primary",
|
|
33
34
|
sx: { fontWeight: 600, mt: 16, textAlign: "center", textWrap: "wrap" },
|
|
34
35
|
variant: "body1",
|
|
35
|
-
children:
|
|
36
|
+
children: l
|
|
36
37
|
}
|
|
37
38
|
),
|
|
38
39
|
/* @__PURE__ */ t(
|
|
39
|
-
|
|
40
|
+
c,
|
|
40
41
|
{
|
|
42
|
+
className: "empty-state-subtext",
|
|
41
43
|
color: "text.secondary",
|
|
42
44
|
sx: { fontWeight: 400, textAlign: "center", textWrap: "wrap", width: "calc(100% - 8px)" },
|
|
43
45
|
variant: "subtitle2",
|
|
@@ -45,7 +47,7 @@ const j = ({
|
|
|
45
47
|
}
|
|
46
48
|
),
|
|
47
49
|
f === "buttons" && (e || r) && /* @__PURE__ */ o(
|
|
48
|
-
|
|
50
|
+
i,
|
|
49
51
|
{
|
|
50
52
|
className: "buttons-footer",
|
|
51
53
|
sx: {
|
|
@@ -54,19 +56,19 @@ const j = ({
|
|
|
54
56
|
},
|
|
55
57
|
children: [
|
|
56
58
|
e && /* @__PURE__ */ t(
|
|
57
|
-
|
|
59
|
+
s,
|
|
58
60
|
{
|
|
59
|
-
onClick: () =>
|
|
60
|
-
startIcon:
|
|
61
|
+
onClick: () => a?.("primary"),
|
|
62
|
+
startIcon: n ? /* @__PURE__ */ t(x, { name: n }) : void 0,
|
|
61
63
|
sx: { textWrap: "nowrap" },
|
|
62
64
|
variant: "contained",
|
|
63
65
|
children: e
|
|
64
66
|
}
|
|
65
67
|
),
|
|
66
68
|
r && /* @__PURE__ */ t(
|
|
67
|
-
|
|
69
|
+
s,
|
|
68
70
|
{
|
|
69
|
-
onClick: () =>
|
|
71
|
+
onClick: () => a?.("secondary"),
|
|
70
72
|
sx: { textWrap: "nowrap" },
|
|
71
73
|
variant: "text",
|
|
72
74
|
children: r
|
|
@@ -79,5 +81,5 @@ const j = ({
|
|
|
79
81
|
}
|
|
80
82
|
);
|
|
81
83
|
export {
|
|
82
|
-
|
|
84
|
+
y as E
|
|
83
85
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { observer as c } from "mobx-react-lite";
|
|
3
3
|
import { Icon as i } from "@mxenabled/mxui";
|
|
4
|
-
import { e as p } from "./exportTransactionsToCSV-
|
|
5
|
-
import { O as m } from "./User-
|
|
6
|
-
import { R as x } from "./ResponsiveButton-
|
|
7
|
-
import { g as _, h as C, u as l } from "./hooks-
|
|
4
|
+
import { e as p } from "./exportTransactionsToCSV-BgV_wTLT.mjs";
|
|
5
|
+
import { O as m } from "./User-BklmOUSd.mjs";
|
|
6
|
+
import { R as x } from "./ResponsiveButton-Cn6-R7ue.mjs";
|
|
7
|
+
import { g as _, h as C, u as l } from "./hooks-C41HAxM5.mjs";
|
|
8
8
|
const v = ({ filter: t }) => {
|
|
9
9
|
const { onEvent: r } = _(), { tags: e, sortedTransactions: s } = C(), { transactions: n } = l(), a = () => {
|
|
10
10
|
r(m.ON_TRANSACTION_EXPORT_CSV_CLICK), p(t ? s.filter(t) : s, e);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as
|
|
1
|
+
import { g as i } from "./Localization-2MODESHW.mjs";
|
|
2
2
|
const E = {
|
|
3
3
|
ACCOUNTS: "accounts",
|
|
4
4
|
ANALYTICS_EVENTS: "analytics_events",
|
|
@@ -46,26 +46,26 @@ const E = {
|
|
|
46
46
|
USER_PROFILES: "user_profiles",
|
|
47
47
|
WIDGET_URLS: "widget_urls"
|
|
48
48
|
};
|
|
49
|
-
class
|
|
49
|
+
class _ {
|
|
50
50
|
endpoint = "/";
|
|
51
51
|
headers;
|
|
52
52
|
onError;
|
|
53
|
-
constructor(
|
|
54
|
-
this.endpoint =
|
|
53
|
+
constructor(n, s, t, o) {
|
|
54
|
+
this.endpoint = n;
|
|
55
55
|
const e = {
|
|
56
56
|
Accept: "application/json",
|
|
57
|
-
"Accept-Language":
|
|
57
|
+
"Accept-Language": i(),
|
|
58
58
|
"Content-Type": "application/json",
|
|
59
|
-
"MD-Session-Token":
|
|
59
|
+
"MD-Session-Token": s
|
|
60
60
|
};
|
|
61
61
|
this.headers = t || e, this.onError = o;
|
|
62
62
|
}
|
|
63
|
-
get = async (
|
|
64
|
-
const
|
|
63
|
+
get = async (n) => {
|
|
64
|
+
const s = {
|
|
65
65
|
method: "GET",
|
|
66
66
|
headers: this.headers
|
|
67
67
|
};
|
|
68
|
-
return fetch(`${this.endpoint}${
|
|
68
|
+
return fetch(`${this.endpoint}${n}`, s).then((t) => {
|
|
69
69
|
if (t.ok)
|
|
70
70
|
return t.text();
|
|
71
71
|
throw t;
|
|
@@ -73,13 +73,13 @@ class S {
|
|
|
73
73
|
throw this.onError?.(t, void 0, "ApiGetRequestError"), t;
|
|
74
74
|
});
|
|
75
75
|
};
|
|
76
|
-
post = async (
|
|
77
|
-
const t =
|
|
76
|
+
post = async (n, s) => {
|
|
77
|
+
const t = s ? JSON.stringify(s) : void 0, o = {
|
|
78
78
|
method: "POST",
|
|
79
79
|
headers: this.headers,
|
|
80
80
|
body: t
|
|
81
81
|
};
|
|
82
|
-
return fetch(`${this.endpoint}${
|
|
82
|
+
return fetch(`${this.endpoint}${n}`, o).then((e) => {
|
|
83
83
|
if (!e.ok)
|
|
84
84
|
throw e;
|
|
85
85
|
return e.text();
|
|
@@ -87,24 +87,26 @@ class S {
|
|
|
87
87
|
throw e;
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
put = async (
|
|
91
|
-
const t = JSON.stringify(
|
|
90
|
+
put = async (n, s) => {
|
|
91
|
+
const t = JSON.stringify(s), o = {
|
|
92
92
|
method: "PUT",
|
|
93
93
|
headers: this.headers,
|
|
94
94
|
body: t
|
|
95
95
|
};
|
|
96
|
-
return fetch(`${this.endpoint}${
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
throw e;
|
|
96
|
+
return fetch(`${this.endpoint}${n}`, o).then((e) => {
|
|
97
|
+
if (e.ok)
|
|
98
|
+
return e.text();
|
|
99
|
+
throw new Error(`${e.status}`);
|
|
100
|
+
}).then((e) => e.length ? JSON.parse(e) : {}).then((e) => e).catch((e) => {
|
|
101
|
+
throw window?.app?.config?.type === "pulse" && this.onError?.(e.message), e.message;
|
|
100
102
|
});
|
|
101
103
|
};
|
|
102
|
-
delete = async (
|
|
103
|
-
const
|
|
104
|
+
delete = async (n) => {
|
|
105
|
+
const s = {
|
|
104
106
|
method: "DELETE",
|
|
105
107
|
headers: this.headers
|
|
106
108
|
};
|
|
107
|
-
return fetch(`${this.endpoint}${
|
|
109
|
+
return fetch(`${this.endpoint}${n}`, s).then((t) => t.ok ? t.text() : t.text().then((o) => {
|
|
108
110
|
throw new Error(o);
|
|
109
111
|
})).then((t) => t.length ? JSON.parse(t) : {}).then((t) => t).catch((t) => {
|
|
110
112
|
throw t;
|
|
@@ -113,5 +115,5 @@ class S {
|
|
|
113
115
|
}
|
|
114
116
|
export {
|
|
115
117
|
E as A,
|
|
116
|
-
|
|
118
|
+
_ as F
|
|
117
119
|
};
|