@mx-cartographer/experiences 6.2.4 → 6.2.5

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.
@@ -1,2 +1,3 @@
1
- declare const Analysis: () => import("react/jsx-runtime").JSX.Element;
2
- export default Analysis;
1
+ import { default as React } from 'react';
2
+ declare const _default: React.FunctionComponent<{}>;
3
+ export default _default;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+ import { AnalysisType } from '../constants';
3
+ interface Copy {
4
+ bonds: string;
5
+ equities: string;
6
+ empty_data: string;
7
+ }
8
+ interface AnalysisDetailsProps {
9
+ analysisDetails: Record<string, number>;
10
+ analysisType: AnalysisType;
11
+ copy: Copy;
12
+ setAnalysisType: (type: AnalysisType) => void;
13
+ }
14
+ declare const AnalysisDetails: React.FC<AnalysisDetailsProps>;
15
+ export default AnalysisDetails;
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ interface InfoTooltipProps {
3
+ placement?: 'top' | 'bottom' | 'left' | 'right';
4
+ tooltip_info_body: string;
5
+ tooltip_info_title: string;
6
+ }
7
+ declare const InfoTooltip: React.FC<InfoTooltipProps>;
8
+ export default InfoTooltip;
@@ -0,0 +1,52 @@
1
+ export declare enum AnalysisType {
2
+ Stocks = "stocks",
3
+ Bonds = "bonds"
4
+ }
5
+ export declare const EquityClassificationTypes: {
6
+ UNKNOWN: number;
7
+ LARGE_VALUE: number;
8
+ LARGE_CORE: number;
9
+ LARGE_GROWTH: number;
10
+ MID_VALUE: number;
11
+ MID_CORE: number;
12
+ MID_GROWTH: number;
13
+ SMALL_VALUE: number;
14
+ SMALL_CORE: number;
15
+ SMALL_GROWTH: number;
16
+ };
17
+ export declare const EquityClassificationValues: {
18
+ 0: string;
19
+ 1: string;
20
+ 2: string;
21
+ 3: string;
22
+ 4: string;
23
+ 5: string;
24
+ 6: string;
25
+ 7: string;
26
+ 8: string;
27
+ 9: string;
28
+ };
29
+ export declare const FixedIncomeClassificationTypes: {
30
+ UNKNOWN: number;
31
+ HIGH_LIMITED: number;
32
+ HIGH_MODERATE: number;
33
+ HIGH_EXTENSIVE: number;
34
+ MEDIUM_LIMITED: number;
35
+ MEDIUM_MODERATE: number;
36
+ MEDIUM_EXTENSIVE: number;
37
+ LOW_LIMITED: number;
38
+ LOW_MODERATE: number;
39
+ LOW_EXTENSIVE: number;
40
+ };
41
+ export declare const FixedIncomeClassificationValues: {
42
+ 0: string;
43
+ 1: string;
44
+ 2: string;
45
+ 3: string;
46
+ 4: string;
47
+ 5: string;
48
+ 6: string;
49
+ 7: string;
50
+ 8: string;
51
+ 9: string;
52
+ };
@@ -1,11 +1,16 @@
1
- import { HoldingApi } from '../api/HoldingApi';
2
1
  import { Holding, GlobalStore } from '../../common';
2
+ import { HoldingApi } from '../api/HoldingApi';
3
+ import { AnalysisType } from '../constants';
3
4
  export declare class HoldingStore {
4
- globalStore: GlobalStore;
5
+ analysisChartData: string[][];
6
+ analysisDetails: Record<string, number>;
7
+ analysisType: AnalysisType;
5
8
  api: HoldingApi;
6
9
  holdings: Holding[];
7
10
  holdingsLoaded: boolean;
11
+ globalStore: GlobalStore;
8
12
  constructor(globalStore: GlobalStore);
9
13
  loadHoldings: () => Promise<void>;
14
+ setAnalysisType: (analysisType: AnalysisType) => void;
10
15
  updateHoldings: (holding: Holding) => Promise<void>;
11
16
  }
@@ -0,0 +1,29 @@
1
+ import { Holding } from '../../common';
2
+ import { AnalysisType } from '../constants';
3
+ type WeightMap = Record<string, number>;
4
+ export declare const createGroups: (classificationObj: Record<number, string>, groupSize?: number) => string[][];
5
+ export declare const bondGroups: string[][];
6
+ export declare const stockGroups: string[][];
7
+ export declare const analysisChartData: (holdings: Holding[]) => {
8
+ stocks: {
9
+ [k: string]: number;
10
+ };
11
+ bonds: {
12
+ [k: string]: number;
13
+ };
14
+ };
15
+ export declare const analysisDetailsData: (holdings: Holding[]) => {
16
+ stocks: WeightMap;
17
+ bonds: WeightMap;
18
+ };
19
+ export declare const calculateWeightedValue: (weights: WeightMap, value: number) => WeightMap;
20
+ export declare const extractBondWeight: (bond: Holding) => WeightMap;
21
+ export declare const extractStockWeight: (stock: Holding) => WeightMap;
22
+ export declare const extractValueFromWeight: (holding: Holding, extractWeightFn: (h: Holding) => WeightMap, classificationValues: Record<string, string>) => WeightMap;
23
+ export declare const formatKey: (key: string) => string;
24
+ export declare const formatPercent: (value: number) => string;
25
+ export declare const getHoldingValue: (holding: Holding) => number;
26
+ export declare const getValidHoldings: (holdings: Holding[], extractWeightFn: (holding: Holding) => WeightMap) => Holding[];
27
+ export declare const mapDataToPercentageGrid: (data: Record<AnalysisType, Record<string, number>>, analysisType: AnalysisType) => string[][];
28
+ export declare const sumValues: (obj: WeightMap) => number;
29
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "6.2.4",
3
+ "version": "6.2.5",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",