@mx-cartographer/experiences 4.0.14 → 4.1.0-alpha.bb2

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 CHANGED
@@ -1,3 +1,7 @@
1
+ ## [4.1.0] - 02-04-2025
2
+
3
+ - **ADDED** - `GoalsWidget`
4
+
1
5
  ## [4.0.12] - 02-03-2025
2
6
 
3
7
  - **FIXED** - Projected income in budget widget
@@ -17,6 +17,7 @@ export declare const ApiEndpoints: {
17
17
  LOCALIZED_CONTENT: string;
18
18
  MEMBERS: string;
19
19
  MERCHANTS: string;
20
+ MONTHLY_CASH_FLOW_PROFILE: string;
20
21
  MONTHLY_CATEGORY_TOTALS: string;
21
22
  NOTIFICATIONS: string;
22
23
  RETIREMENT_GOALS: string;
@@ -8,8 +8,8 @@ export type Debt = {
8
8
  interest_rate?: number;
9
9
  is_paid_off: boolean;
10
10
  is_impossible: boolean;
11
- name: string;
12
11
  monthly_payment?: number;
12
+ name: string;
13
13
  payment_due_date: number;
14
14
  priority?: number | string;
15
15
  projected_payoff_date?: Date;
@@ -38,6 +38,19 @@ export interface RetirementGoalAccount {
38
38
  updated_at: number;
39
39
  user_guid: string;
40
40
  }
41
+ export interface MonthlyCashFlowProfile {
42
+ amount_allocated_for_debt_goals: number;
43
+ amount_allocated_for_retirement_goals: number;
44
+ amount_allocated_for_savings_goals: number;
45
+ budgeted_expenses: number;
46
+ budgeted_income: number;
47
+ estimated_goals_contribution: number;
48
+ extra_payment: number;
49
+ guid: string;
50
+ payoff_type: number;
51
+ user_guid: string;
52
+ uses_estimated_goals_contribution: boolean;
53
+ }
41
54
  export declare enum TrackType {
42
55
  DEBT_TRACK = 1,
43
56
  SAVINGS_TRACK = 2,
@@ -13,7 +13,7 @@ export type { Expense } from './Expense';
13
13
  export { ExpenseStatus, ScheduledPaymentTypes } from './Expense';
14
14
  export type { DynamicCopyElement, GlobalCopy } from './GlobalCopy';
15
15
  export { MetaType, TrackType } from './Goal';
16
- export type { Goal, RetirementGoalAccount } from './Goal';
16
+ export type { Goal, MonthlyCashFlowProfile, RetirementGoalAccount } from './Goal';
17
17
  export type { Debt } from './Debt';
18
18
  export type { Institution } from './Institution';
19
19
  export * from './localization';
@@ -8,12 +8,28 @@ export interface GoalsCopy {
8
8
  add_select_accounts: string;
9
9
  add_title: string;
10
10
  add_goal_title: string;
11
+ alert_account_added: string;
12
+ alert_account_changed: string;
13
+ alert_contribution_updated: string;
14
+ alert_goal_added: string;
15
+ alert_goal_completed: string;
16
+ alert_goal_deleted: string;
17
+ alert_goal_updated_amount: string;
18
+ alert_goal_updated_balance: string;
19
+ alert_goal_updated_birthday: string;
20
+ alert_goal_updated_interest_rate: string;
21
+ alert_goal_updated_name: string;
22
+ alert_goal_updated_payment: string;
23
+ alert_goal_updated_retirement_age: string;
24
+ alert_goals_reordered: string;
11
25
  complete_title: string;
12
26
  complete_label: string;
27
+ completed_label: string;
13
28
  connect_button: string;
14
29
  connect_description: string;
15
30
  connect_drawer_title: string;
16
31
  connect_title: string;
32
+ contribution_label: string;
17
33
  debt_goal_description: string;
18
34
  debt_goal_label: string;
19
35
  delete_description: string;
@@ -36,12 +52,25 @@ export interface GoalsCopy {
36
52
  details_title: string;
37
53
  goal_details: string;
38
54
  goal_percentage: string;
55
+ goal_priority: string;
39
56
  goal_projection: string;
40
57
  ongoing_title: string;
41
58
  projected_label: string;
59
+ manage_debt_description: string;
60
+ manage_debt_drawer_title: string;
42
61
  manage_debt_goals: string;
62
+ manage_debt_title: string;
63
+ manage_retirement_description: string;
64
+ manage_retirement_drawer_title: string;
43
65
  manage_retirement_goals: string;
66
+ manage_retirement_title: string;
67
+ manage_saving_description: string;
68
+ manage_saving_drawer_title: string;
44
69
  manage_saving_goals: string;
70
+ manage_saving_title: string;
71
+ mark_as_complete_button: string;
72
+ reorder_goals_title: string;
73
+ reorder_goals_description: string;
45
74
  retirement: string;
46
75
  retirement_goal_description: string;
47
76
  retirement_goal_label: string;
@@ -2,6 +2,8 @@ import { Debt } from '../../common';
2
2
  type DataPoint = {
3
3
  x: Date;
4
4
  y: number;
5
+ payment?: number;
6
+ extra?: number;
5
7
  };
6
8
  type Dataset = DataPoint[];
7
9
  export interface DebtChartData extends Debt {
@@ -1,4 +1,4 @@
1
- import { Fetch, Goal, RetirementGoalAccount } from '../../common';
1
+ import { Fetch, Goal, MonthlyCashFlowProfile, RetirementGoalAccount } from '../../common';
2
2
  export declare class GoalApi {
3
3
  fetchInstance: Fetch;
4
4
  constructor(endpoint: string, token: string);
@@ -7,11 +7,14 @@ export declare class GoalApi {
7
7
  addRetirementGoalAccount: (retirementAccount: RetirementGoalAccount) => Promise<any>;
8
8
  getGoalByGuid: (guid: string) => Promise<any>;
9
9
  getGoals: () => Promise<any>;
10
+ getMonthlyCashFlowProfile: () => Promise<any>;
10
11
  getRetirementGoals: () => Promise<any>;
11
12
  getRetirementGoalAccounts: () => Promise<any>;
12
13
  removeGoal: (guid: string) => Promise<any>;
13
14
  removeRetirementGoal: (guid: string) => Promise<any>;
14
15
  removeRetirementGoalAccount: (guid: string) => Promise<any>;
16
+ reorderGoals: (goals: Goal[]) => Promise<any>;
15
17
  updateGoal: (goal: Goal) => Promise<any>;
18
+ updateMonthlyCashFlowProfile: (profile: MonthlyCashFlowProfile) => Promise<any>;
16
19
  updateRetirementGoal: (goal: Goal) => Promise<any>;
17
20
  }
@@ -1,9 +1,8 @@
1
1
  import { TrackType } from '../../common';
2
2
  interface GoalListProps {
3
3
  trackType: TrackType;
4
- onManageClick: (trackType: TrackType) => void;
5
4
  }
6
- export declare const GoalList: (({ onManageClick, trackType }: GoalListProps) => import("react/jsx-runtime").JSX.Element) & {
5
+ export declare const GoalList: (({ trackType }: GoalListProps) => import("react/jsx-runtime").JSX.Element) & {
7
6
  displayName: string;
8
7
  };
9
8
  export {};
@@ -1,9 +1,10 @@
1
1
  import { Goal } from '../../common';
2
2
  interface GoalStatusCardProps {
3
3
  goal: Goal;
4
+ isInDrawer?: boolean;
4
5
  onClick?: () => void;
5
6
  }
6
- export declare const GoalStatusCard: (({ goal, onClick }: GoalStatusCardProps) => import("react/jsx-runtime").JSX.Element) & {
7
+ export declare const GoalStatusCard: (({ goal, isInDrawer, onClick }: GoalStatusCardProps) => import("react/jsx-runtime").JSX.Element) & {
7
8
  displayName: string;
8
9
  };
9
10
  export {};
@@ -0,0 +1,6 @@
1
+ import { TrackType } from '../../common';
2
+ interface ManageGoalProps {
3
+ trackType: TrackType;
4
+ }
5
+ export declare const ManageGoals: ({ trackType }: ManageGoalProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import { TrackType } from '../../../common';
2
+ interface ContributionActionProps {
3
+ trackType: TrackType;
4
+ }
5
+ export declare const ContributionAction: (({ trackType }: ContributionActionProps) => import("react/jsx-runtime").JSX.Element) & {
6
+ displayName: string;
7
+ };
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Goal } from '../../../common';
2
+ interface CompleteListItemProps {
3
+ goal: Goal;
4
+ }
5
+ export declare const CompleteListItem: ({ goal }: CompleteListItemProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Goal } from '../../../common';
2
+ interface OngoingListItemProps {
3
+ goal: Goal;
4
+ index: number;
5
+ }
6
+ export declare const OngoingListItem: ({ goal, index }: OngoingListItemProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Goal } from '../../../common';
2
+ interface RearrangeGoalsProps {
3
+ goals: Goal[];
4
+ }
5
+ export declare const ReorderGoals: ({ goals }: RearrangeGoalsProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,2 +1,3 @@
1
+ export { GoalApi } from './api/GoalApi';
1
2
  export { GoalsWidget } from './GoalsWidget';
2
3
  export { GoalStore } from './stores/GoalStore';
@@ -1,17 +1,18 @@
1
1
  import { GoalApi } from '../api/GoalApi';
2
- import { Goal, GlobalStore, RetirementGoalAccount } from '../../common';
2
+ import { Goal, GlobalStore, RetirementGoalAccount, MonthlyCashFlowProfile } from '../../common';
3
3
  export declare class GoalStore {
4
4
  api: GoalApi;
5
5
  globalStore: GlobalStore;
6
+ alert: string;
6
7
  goals: Goal[];
7
8
  retirementGoalAccounts: RetirementGoalAccount[];
8
9
  newRetirementGoalAccounts: RetirementGoalAccount[];
9
10
  selectedGoal: Goal | undefined;
11
+ monthlyCashFlowProfile: MonthlyCashFlowProfile | undefined;
10
12
  constructor(globalStore: GlobalStore);
11
13
  initialize: (endpoint: string, token: string) => Promise<void>;
14
+ get orderedGoals(): Goal[];
12
15
  get debtGoals(): Goal[];
13
- get retirementGoals(): Goal[];
14
- get savingsGoals(): Goal[];
15
16
  addGoal: (goal: Goal) => Promise<void>;
16
17
  addRetirementGoal: (goal: Goal) => Promise<void>;
17
18
  addRetirementGoalAccount: (account: RetirementGoalAccount) => Promise<void>;
@@ -19,7 +20,10 @@ export declare class GoalStore {
19
20
  deleteGoal: (guid: string) => Promise<void>;
20
21
  deleteRetirementGoal: (goal: Goal) => Promise<void>;
21
22
  deleteRetirementGoalAccount: (guid: string) => Promise<void>;
23
+ reorderGoals: (goals: Goal[]) => Promise<void>;
24
+ setAlert: (alert: string) => string;
22
25
  setNewRetirementGoalAccounts: (accounts: RetirementGoalAccount[]) => void;
23
26
  setSelectedGoal: (goal: Goal | undefined) => Goal | undefined;
24
27
  updateGoal: (goal: Goal) => Promise<void>;
28
+ updateMonthlyCashFlowProfile: (profile: MonthlyCashFlowProfile) => Promise<void>;
25
29
  }