back-testing-react 1.0.9 → 1.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "back-testing-react",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "Parametric back testing application developed by NormanMax Insurance Solutions",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -24,7 +24,7 @@ import { Geometry, GeoJsonProperties, Feature, FeatureCollection } from "geojson
24
24
  import { RadioButtonChecked, RadioButtonUncheckedOutlined } from "@mui/icons-material";
25
25
  import { BackTestingPayoutInfoProps } from "./back-testing-payout-info.types";
26
26
  import { StormPayout } from "../back-testing-map/back-testing-map.service";
27
- import { TROPICAL_STORM_LAYER, TROPICAL_STORM_TRACK_LAYER } from "../back-testing-map/back-testing-map.types";
27
+ import { TROPICAL_STORM_LAYER, TROPICAL_STORM_SOURCE, TROPICAL_STORM_TRACK_LAYER, TROPICAL_STORM_TRACK_SOURCE } from "../back-testing-map/back-testing-map.types";
28
28
 
29
29
  interface ExpandMoreProps extends IconButtonProps {
30
30
  expand: boolean;
@@ -123,7 +123,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
123
123
 
124
124
  const unfocusStormTracks = () => {
125
125
  if(props.mapInstanceRef && props.mapInstanceRef.current){
126
- const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_LAYER)
126
+ const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_SOURCE)
127
127
  if (circleSource){
128
128
  let features = (((circleSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
129
129
  let newData = features.map((feature) => {
@@ -146,7 +146,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
146
146
  }) as Feature<Geometry, GeoJsonProperties>[]
147
147
  (circleSource as GeoJSONSource).setData({type: 'FeatureCollection', features: newData})
148
148
  }
149
- const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_LAYER)
149
+ const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_SOURCE)
150
150
  if (lineSource){
151
151
  let features = (((lineSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
152
152
  let newData = features.map((feature) => {
@@ -169,7 +169,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
169
169
 
170
170
  const toggleStormTrack = (storm: string, year:number, checked: boolean) => {
171
171
  if(props.mapInstanceRef && props.mapInstanceRef.current){
172
- const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_LAYER)
172
+ const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_SOURCE)
173
173
  if (circleSource){
174
174
  let features = (((circleSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
175
175
  let newData = features.map((feature) => {
@@ -192,7 +192,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
192
192
  }) as Feature<Geometry, GeoJsonProperties>[]
193
193
  (circleSource as GeoJSONSource).setData({type: 'FeatureCollection', features: newData})
194
194
  }
195
- const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_LAYER)
195
+ const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_SOURCE)
196
196
  if (lineSource){
197
197
  let features = (((lineSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
198
198
  let newData = features.map((feature) => {
@@ -215,7 +215,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
215
215
 
216
216
  const focusOnStormTrack = (storm: string, year:number) => {
217
217
  if(props.mapInstanceRef && props.mapInstanceRef.current){
218
- const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_LAYER)
218
+ const circleSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_SOURCE)
219
219
  if (circleSource){
220
220
  let features = (((circleSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
221
221
  let newData = features.map((feature) => {
@@ -238,7 +238,7 @@ function BackTestingPayoutInfo(props: BackTestingPayoutInfoProps){
238
238
  }) as Feature<Geometry, GeoJsonProperties>[]
239
239
  (circleSource as GeoJSONSource).setData({type: 'FeatureCollection', features: newData})
240
240
  }
241
- const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_LAYER)
241
+ const lineSource = (props.mapInstanceRef.current as mapboxgl.Map).getSource(TROPICAL_STORM_TRACK_SOURCE)
242
242
  if (lineSource){
243
243
  let features = (((lineSource as GeoJSONSource)._data as unknown) as FeatureCollection).features;
244
244
  let newData = features.map((feature) => {
@@ -3,7 +3,7 @@
3
3
  padding: 20px;
4
4
  padding-right: 10px;
5
5
  overflow-y:auto;
6
- height: 100%;
6
+ height: calc(100% - 40px);
7
7
  }
8
8
 
9
9
  .stepper-container .MuiStepConnector-line.MuiStepConnector-lineVertical {
@@ -6,7 +6,7 @@ export default {
6
6
  component: BackTestingWizard,
7
7
  } as Meta<typeof BackTestingWizard>;
8
8
 
9
- const Template: StoryFn<typeof BackTestingWizard> = (args) => <div style={{width:'100%', height:'calc(100vh - 32px)', overflowY:'hidden'}}><BackTestingWizard {...args} /></div>;
9
+ const Template: StoryFn<typeof BackTestingWizard> = (args) => <div style={{width:'100%', height:'calc(100vh - 32px)'}}><BackTestingWizard {...args} /></div>;
10
10
 
11
11
  export const BackTestingWizardTest = Template.bind({});
12
12
  BackTestingWizardTest.args = {