@mx-cartographer/experiences 6.27.0 → 6.27.1-alpha-ram1-debts-widget
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 +4 -0
- package/dist/common/types/localization/DebtsCopy.d.ts +1 -0
- package/dist/debts/constants/index.d.ts +7 -4
- package/dist/debts/store/DebtsUiStore.d.ts +3 -3
- package/dist/debts/utils/DebtsWidget.d.ts +2 -2
- package/dist/debts/utils/SnowballCard.d.ts +2 -2
- package/dist/debts/utils/shared.d.ts +11 -2
- package/dist/index.es.js +2303 -2248
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -23,6 +23,7 @@ export interface DebtsCopy {
|
|
23
23
|
paydown_drawer_subtitle: string;
|
24
24
|
paydown_drawer_title: string;
|
25
25
|
paydown_drawer_total_payment: string;
|
26
|
+
priority_sort_fastest_payoff: string;
|
26
27
|
priority_sort_highest_balance: string;
|
27
28
|
priority_sort_highest_interest: string;
|
28
29
|
priority_sort_lowest_balance: string;
|
@@ -1,5 +1,8 @@
|
|
1
|
-
export declare
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
export declare const MONTHS = 12;
|
2
|
+
export declare const INTEREST_TO_DECIMAL = 100;
|
3
|
+
export declare enum DebtPriority {
|
4
|
+
FASTEST_PAYOFF_FIRST = 1,
|
5
|
+
HIGHEST_INTEREST = 2,
|
6
|
+
LOWEST_BALANCE = 3,
|
7
|
+
HIGHEST_BALANCE = 4
|
5
8
|
}
|
@@ -1,13 +1,13 @@
|
|
1
|
-
import {
|
1
|
+
import { DebtPriority } from '../constants';
|
2
2
|
import { DebtChartData } from '../utils/DebtsWidget';
|
3
3
|
export declare class DebtsUiStore {
|
4
4
|
isLoading: boolean;
|
5
5
|
selectedDebtChartData: DebtChartData;
|
6
|
-
selectedDebtPriority:
|
6
|
+
selectedDebtPriority: DebtPriority;
|
7
7
|
constructor();
|
8
8
|
get showError(): boolean;
|
9
9
|
get showCompleted(): boolean;
|
10
10
|
setIsLoading: (isLoading: boolean) => boolean;
|
11
11
|
setSelectedDebtChartData: (data: DebtChartData) => DebtChartData;
|
12
|
-
setSelectedDebtPriority: (priority:
|
12
|
+
setSelectedDebtPriority: (priority: DebtPriority) => DebtPriority;
|
13
13
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Debt } from '../../common';
|
2
|
-
import {
|
2
|
+
import { DebtPriority } from '../constants';
|
3
3
|
type DataPoint = {
|
4
4
|
x: Date;
|
5
5
|
y: number;
|
@@ -10,5 +10,5 @@ type Dataset = DataPoint[];
|
|
10
10
|
export interface DebtChartData extends Debt {
|
11
11
|
dataset: Dataset;
|
12
12
|
}
|
13
|
-
export declare const transformDebtsChartData: (debts: Debt[], debtPriority:
|
13
|
+
export declare const transformDebtsChartData: (debts: Debt[], debtPriority: DebtPriority, extraPaydown?: number) => DebtChartData[];
|
14
14
|
export {};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import {
|
1
|
+
import { DebtPriority } from '../constants';
|
2
2
|
import { DebtChartData } from './DebtsWidget';
|
3
3
|
type PayoffProjection = {
|
4
4
|
payoffSavings: string;
|
5
5
|
payoffDate: string;
|
6
6
|
payoffDuration: string;
|
7
7
|
};
|
8
|
-
export declare function getPayoffProjection(debts: DebtChartData[], debtPriority:
|
8
|
+
export declare function getPayoffProjection(debts: DebtChartData[], debtPriority: DebtPriority, extraPaydown?: number): PayoffProjection;
|
9
9
|
export {};
|
@@ -1,3 +1,12 @@
|
|
1
1
|
import { Debt } from '../../common';
|
2
|
-
import {
|
3
|
-
|
2
|
+
import { DebtPriority } from '../constants';
|
3
|
+
interface MonthlyPayment {
|
4
|
+
balance: number;
|
5
|
+
interest: number;
|
6
|
+
payment: number;
|
7
|
+
principal: number;
|
8
|
+
timestamp: number;
|
9
|
+
}
|
10
|
+
export declare const calculateFinalPayment: (monthlyPayments: MonthlyPayment[]) => number;
|
11
|
+
export declare const sortDebtsByPrioriy: (debts: Debt[], debtPriority: DebtPriority) => void;
|
12
|
+
export {};
|