@mx-cartographer/experiences 6.2.3-alpha.mega2 → 6.2.3-alpha.mega4

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