back-testing-react 2.1.6 → 2.1.7

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": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "type": "module",
5
5
  "description": "Parametric back testing application developed by NormanMax Insurance Solutions",
6
6
  "main": "dist/index.js",
@@ -178,7 +178,6 @@ const InputCIASStep = forwardRef<WizardStep, InputCIASStepProps>((props,ref) =>
178
178
 
179
179
  function generateShapeOptions() {
180
180
  let optionList = [];
181
- optionList.push({key:`County`, value: CATShapeType.COUNTY});
182
181
  optionList.push({key:`Polygon`, value: CATShapeType.POLYGON});
183
182
  optionList.push({key:`Circle`, value: CATShapeType.CIRCLE});
184
183
  return optionList;
@@ -92,9 +92,8 @@ const InputPGAStep = forwardRef<WizardStep, InputPGAStepProps>((props,ref) => {
92
92
  };
93
93
 
94
94
  function handleChoiceSelection(pga: PGA, shape:CATShape,e: RadioChoice){
95
- const clonedShape = cloneDeep(shape);
96
- clonedShape.ciasChoice = e
97
- updateShape(pga,clonedShape);
95
+ shape.ciasChoice = e
96
+ updateShape(pga,shape);
98
97
  }
99
98
 
100
99
  function handleCountyChoiceSelection(pga: PGA, county:CATCounty,e: RadioChoice){
@@ -106,13 +105,15 @@ const InputPGAStep = forwardRef<WizardStep, InputPGAStepProps>((props,ref) => {
106
105
  }
107
106
 
108
107
  function updatePayoutOption(pga: PGA,shape:CATShape,id: string| undefined){
109
- shape.payoutTableRefId = id;
108
+ const clonedPGA = cloneDeep(pga);
109
+ const clonedShape = cloneDeep(shape);
110
+ clonedShape.payoutTableRefId = id;
110
111
  if(id == MISSING_VALUE){
111
- shape.payoutTableRefId = undefined;
112
+ clonedShape.payoutTableRefId = undefined;
112
113
  } else {
113
- shape.payoutTableRefId = id;
114
+ clonedShape.payoutTableRefId = id;
114
115
  }
115
- updateShape(pga,shape);
116
+ updateShape(clonedPGA,clonedShape);
116
117
  }
117
118
 
118
119
  function updateCountyPayoutOption(pga: PGA,county:CATCounty,id: string| undefined){