@mx-cartographer/experiences 6.2.3-alpha.mega4 → 6.2.4-alpha.mega1

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,7 +1,3 @@
1
1
  import { default as React } from 'react';
2
- export declare enum AnalysisType {
3
- Stocks = "stocks",
4
- Bonds = "bonds"
5
- }
6
2
  declare const _default: React.FunctionComponent<{}>;
7
3
  export default _default;
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { AnalysisType } from './Analysis';
2
+ import { AnalysisType } from '../constants';
3
3
  interface Copy {
4
4
  bonds: string;
5
5
  equities: string;
@@ -1,3 +1,7 @@
1
+ export declare enum AnalysisType {
2
+ Stocks = "stocks",
3
+ Bonds = "bonds"
4
+ }
1
5
  export declare const EquityClassificationTypes: {
2
6
  UNKNOWN: number;
3
7
  LARGE_VALUE: number;
@@ -1,27 +1,16 @@
1
1
  import { Holding, GlobalStore } from '../../common';
2
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
- 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
- };
25
13
  loadHoldings: () => Promise<void>;
14
+ setAnalysisType: (analysisType: AnalysisType) => void;
26
15
  updateHoldings: (holding: Holding) => Promise<void>;
27
16
  }
@@ -1,4 +1,5 @@
1
1
  import { Holding } from '../../common';
2
+ import { AnalysisType } from '../constants';
2
3
  type WeightMap = Record<string, number>;
3
4
  export declare const analysisChartData: (holdings: Holding[]) => {
4
5
  stocks: {
@@ -20,6 +21,6 @@ export declare const formatKey: (key: string) => string;
20
21
  export declare const formatPercent: (value: number) => string;
21
22
  export declare const getHoldingValue: (holding: Holding) => number;
22
23
  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 mapDataToPercentageGrid: (data: Record<AnalysisType, Record<string, number>>, analysisType: AnalysisType) => string[][];
24
25
  export declare const sumValues: (obj: WeightMap) => number;
25
26
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "6.2.3-alpha.mega4",
3
+ "version": "6.2.4-alpha.mega1",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",