back-testing-react 1.0.10 → 1.0.12
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/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/back-testing-payout-info/back-testing-payout-info.css +5 -2
- package/src/components/back-testing-payout-info/back-testing-payout-info.tsx +7 -7
- package/src/components/back-testing-stepper/back-testing-stepper.tsx +1 -1
- package/src/components/back-testing-wizard/back-testing-wizard.stories.tsx +2 -2
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
.payout-info-container {
|
|
2
|
+
--container-offset:10px;
|
|
2
3
|
padding:0;
|
|
4
|
+
height:calc(100% - var(--container-offset));
|
|
3
5
|
font-family: system-ui, sans-serif;
|
|
4
6
|
}
|
|
5
7
|
|
|
@@ -96,11 +98,12 @@
|
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
.payout-info-container .scroll-container{
|
|
99
|
-
|
|
101
|
+
|
|
102
|
+
height: calc(100% - 2.5em - var(--container-offset));
|
|
100
103
|
overflow-y:hidden;
|
|
101
104
|
scrollbar-gutter: stable;
|
|
102
105
|
position: relative;
|
|
103
|
-
top:
|
|
106
|
+
top: var(--container-offset);
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
.payout-info-container .scroll-container:hover{
|
|
@@ -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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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) => {
|
|
@@ -264,7 +264,7 @@ const BackTestingStepper = (props: BackTestingStepperProps) => {
|
|
|
264
264
|
|
|
265
265
|
return(
|
|
266
266
|
<div className="stepper-container">
|
|
267
|
-
<Box sx={{ maxWidth: 400 }}>
|
|
267
|
+
<Box sx={{ maxWidth: 400, height: 'calc(100% - 1em)' }}>
|
|
268
268
|
{wizardStep !== PayoutWizardStepType.DISPLAY_PAYOUTS && <Stepper activeStep={activeStep} orientation="vertical">
|
|
269
269
|
{steps.map((step, index) => (
|
|
270
270
|
<Step key={step.label}>
|
|
@@ -10,8 +10,8 @@ const Template: StoryFn<typeof BackTestingWizard> = (args) => <div style={{width
|
|
|
10
10
|
|
|
11
11
|
export const BackTestingWizardTest = Template.bind({});
|
|
12
12
|
BackTestingWizardTest.args = {
|
|
13
|
-
mapAccessToken:
|
|
14
|
-
apiAccessToken:
|
|
13
|
+
mapAccessToken:"pk.eyJ1IjoiYWR1YnUwMDEiLCJhIjoiY20ydHlsaWtnMDhpazJpcHl4eXJ6aGlsaSJ9.lYnnDc62JXIV-1-im9NJfg",
|
|
14
|
+
apiAccessToken:"oIYWjLN76C1MAx8G10yWp9j1GnO2UDaB1PP0tber",
|
|
15
15
|
env:'uat',
|
|
16
16
|
selectedProxyPayoutOptionIndex:0,
|
|
17
17
|
proxyPayoutOptions: [
|