back-testing-react 2.0.16 → 2.1.1
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/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/back-testing-hub/back-testing-hub.tsx +4 -8
- package/src/components/back-testing-stepper/steps/input-anemometer/input-anemometer.tsx +2 -1
- package/src/components/back-testing-stepper/steps/input-cias/input-cias.tsx +2 -1
- package/src/components/back-testing-stepper/steps/step.types.ts +1 -5
- package/src/components/back-testing-wizard/back-testing-wizard.stories.tsx +2 -2
- package/src/components/back-testing-wizard/index.ts +6 -2
package/package.json
CHANGED
|
@@ -119,10 +119,8 @@ function BackTestingHub(props: BackTestingHubProps){
|
|
|
119
119
|
setTimeout(function (){
|
|
120
120
|
const validNode : boolean = document.getRootNode().contains(mainPanelRef.current);
|
|
121
121
|
if(validNode){
|
|
122
|
-
if(!mapInstanceRef.current?.isMoving){
|
|
123
|
-
fetchWindstormPDFOutput();
|
|
124
|
-
} else {
|
|
125
|
-
mapInstanceRef.current.on("moveend",fetchWindstormPDFOutput)
|
|
122
|
+
if(!mapInstanceRef.current?.once("moveend",fetchWindstormPDFOutput).isMoving()){
|
|
123
|
+
fetchWindstormPDFOutput();
|
|
126
124
|
}
|
|
127
125
|
}
|
|
128
126
|
}, 750);
|
|
@@ -135,10 +133,8 @@ function BackTestingHub(props: BackTestingHubProps){
|
|
|
135
133
|
setTimeout(function (){
|
|
136
134
|
const validNode : boolean = document.getRootNode().contains(mainPanelRef.current);
|
|
137
135
|
if(validNode){
|
|
138
|
-
if(!mapInstanceRef
|
|
139
|
-
fetchEarthquakePDFOutput();
|
|
140
|
-
} else {
|
|
141
|
-
mapInstanceRef.current.on("moveend",fetchEarthquakePDFOutput)
|
|
136
|
+
if(!mapInstanceRef?.current?.once("moveend",fetchEarthquakePDFOutput).isMoving()){
|
|
137
|
+
fetchEarthquakePDFOutput();
|
|
142
138
|
}
|
|
143
139
|
}
|
|
144
140
|
}, 750);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { MediaType,
|
|
3
|
+
import { MediaType, PayoutWizardStepType, RadioChoice, WizardStep } from "../step.types";
|
|
4
4
|
import React, { forwardRef, useEffect, useImperativeHandle } from "react";
|
|
5
5
|
import { generateNewAnemometer, InputAnemometerStepProps, Anemometer } from "./input-anemometer.types";
|
|
6
6
|
import './input-anemometer.css'
|
|
@@ -16,6 +16,7 @@ import TextInput from "../../inputs/text-input/text-input";
|
|
|
16
16
|
import { useAppSelector, useAppDispatch } from "../../../../lib/hooks";
|
|
17
17
|
import { selectActiveStep, selectAnemometerPayoutOptions, selectAnemometers, selectDefaultAnemometerPayoutOption, setActiveStep, setAnemometers, setWizardStep } from "../../../../lib/features/wizard/wizardSlice";
|
|
18
18
|
import { cloneDeep } from "lodash";
|
|
19
|
+
import { Payout } from "../../../../lib/features/back-testing/backTestingAPISlice";
|
|
19
20
|
|
|
20
21
|
const addProxyButtonBase = '#FFF';
|
|
21
22
|
const addProxyButtonMain = alpha(addProxyButtonBase, 0.7);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
|
-
import { generateLocationOptions, LocationChoice, MediaType,
|
|
3
|
+
import { generateLocationOptions, LocationChoice, MediaType, PayoutWizardStepType, RadioChoice, WizardStep } from "../step.types";
|
|
4
4
|
import React, { forwardRef, useEffect, useImperativeHandle } from "react";
|
|
5
5
|
import { CIAS, generateNewCIAS, InputCIASStepProps } from "./input-cias.types";
|
|
6
6
|
import './input-cias.css'
|
|
@@ -19,6 +19,7 @@ import DeleteIcon from '@mui/icons-material/Delete';
|
|
|
19
19
|
import PlaceIcon from '@mui/icons-material/Place';
|
|
20
20
|
import { setAutoCalculatePayoutsEnabled } from "../../../../lib/features/back-testing/backTestingSlice";
|
|
21
21
|
import { cloneDeep } from "lodash";
|
|
22
|
+
import { Payout } from "../../../../lib/features/back-testing/backTestingAPISlice";
|
|
22
23
|
|
|
23
24
|
const addCIASButtonBase = '#FFF';
|
|
24
25
|
const addCIASButtonMain = alpha(addCIASButtonBase, 0.7);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Payout } from "../../../lib/features/back-testing/backTestingAPISlice";
|
|
1
2
|
import { RiskLocation } from "./input-location/input-location.types";
|
|
2
3
|
|
|
3
4
|
export interface WizardStep {
|
|
@@ -50,11 +51,6 @@ export interface PayoutOption {
|
|
|
50
51
|
refId: string
|
|
51
52
|
value: Payout[]
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
export interface Payout {
|
|
55
|
-
category: number,
|
|
56
|
-
payout: number
|
|
57
|
-
}
|
|
58
54
|
|
|
59
55
|
export function getConfiguredPayoutTable(index:number, options: Payout[][]) : Payout[] {
|
|
60
56
|
return options[index];
|
|
@@ -41,7 +41,7 @@ BackTestingWizardWindstormAutoDisplayTest.args = {
|
|
|
41
41
|
apiAccessToken:process.env.STORYBOOK_API_KEY,
|
|
42
42
|
env:process.env.STORYBOOK_ENV as "dev" | "uat" | "prod",
|
|
43
43
|
weatherEvent: WeatherEventOption.WINDSTORM,
|
|
44
|
-
displaySidebar:
|
|
44
|
+
displaySidebar:true,
|
|
45
45
|
displaySidepanel:false,
|
|
46
46
|
limit:1230000,
|
|
47
47
|
locations:[{addressString: "Kaseya Center", latitude:25.78141698,longitude:-80.18699518}],
|
|
@@ -91,7 +91,7 @@ BackTestingWizardEarthquakeAutoDisplayTest.args = {
|
|
|
91
91
|
mapAccessToken: process.env.STORYBOOK_MAP_ACCESS_TOKEN,
|
|
92
92
|
apiAccessToken:process.env.STORYBOOK_API_KEY,
|
|
93
93
|
env:process.env.STORYBOOK_ENV as "dev" | "uat" | "prod",
|
|
94
|
-
displaySidebar:
|
|
94
|
+
displaySidebar:true,
|
|
95
95
|
displaySidepanel:false,
|
|
96
96
|
limit: 1_000_000,
|
|
97
97
|
weatherEvent: WeatherEventOption.EARTHQUAKE,
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import BackTestingWizard from './back-testing-wizard';
|
|
2
|
-
import {ProxyRequest,AnemometerRequest,CIASRequest,StormPayout,WSPayoutRequest,WSPayoutResponse,PGADTO,EQPayoutDTO,EQPayoutsRequest,EQPayoutsResponse} from './../../lib/features/back-testing/backTestingAPISlice'
|
|
2
|
+
import {Payout,PayoutDetails,ProxyRequest,AnemometerRequest,CIASRequest,StormPayout,WSPayoutRequest,WSPayoutResponse,PGADTO,EQPayoutDTO,EQPayoutsRequest,EQPayoutsResponse} from './../../lib/features/back-testing/backTestingAPISlice'
|
|
3
|
+
import {CATCircle,CATCounty,CATPolygon,CATShape,CATShapeType} from './../back-testing-map/back-testing-map.types'
|
|
4
|
+
import { WizardAnemometer,WizardCIAS,WizardLocation,WizardPGA,WizardProxy,WizardView } from '../back-testing-hub/back-testing-hub.types';
|
|
5
|
+
import { PayoutWizardStepType } from '../back-testing-stepper/steps/step.types';
|
|
6
|
+
import { WeatherEventOption } from '../back-testing-sidebar/back-testing-sidebar.types';
|
|
3
7
|
export {BackTestingWizard}
|
|
4
|
-
export type {ProxyRequest,AnemometerRequest,CIASRequest,StormPayout,WSPayoutRequest,WSPayoutResponse,PGADTO,EQPayoutDTO,EQPayoutsRequest,EQPayoutsResponse}
|
|
8
|
+
export type {Payout,PayoutDetails,WeatherEventOption,ProxyRequest,AnemometerRequest,CIASRequest,StormPayout,WSPayoutRequest,WSPayoutResponse,PGADTO,EQPayoutDTO,EQPayoutsRequest,EQPayoutsResponse,CATShapeType,CATCircle,CATCounty,CATPolygon,CATShape,WizardView,PayoutWizardStepType,WizardAnemometer,WizardCIAS,WizardLocation,WizardPGA,WizardProxy}
|