@mychoice/mychoice-sdk-store 2.1.86 → 2.2.0

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 CHANGED
@@ -5445,7 +5445,7 @@ const HomeQuoteDataHandler = () => {
5445
5445
  const navigate = reactRouterDom.useNavigate();
5446
5446
  const { checkIsExpired, checkIsExpiredWithModal } = ClearFormDataHandler();
5447
5447
  const [requestState, setRequestState] = react.useReducer(dataHandlerReducer, { ...initialHandlerRequestState });
5448
- const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
5448
+ const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError } = requestState;
5449
5449
  const { cancelToken } = useCancelToken();
5450
5450
  const openLoader = (loaderDescription = '') => {
5451
5451
  dispatchAppLoaderState({
@@ -5461,8 +5461,8 @@ const HomeQuoteDataHandler = () => {
5461
5461
  const dwelling = mychoiceSdkComponents.deepClone(dwellingState);
5462
5462
  const discount = mychoiceSdkComponents.deepClone(discountState);
5463
5463
  const { policyStartYear, policyStartMonth, policyStartDay } = discountState;
5464
- const { builtYear, roofReplacedYear, occupiedYear, } = dwellingState;
5465
- const { insured: { dateInsuredCurrent, dateInsuredSince, birthMonth, birthDay, birthYear, nonsmoker, }, insuranceClaimList, insuranceCancellationList, } = applicant;
5464
+ const { builtYear, roofReplacedYear, occupiedYear } = dwellingState;
5465
+ const { insured: { dateInsuredCurrent, dateInsuredSince, birthMonth, birthDay, birthYear, nonsmoker }, insuranceClaimList, insuranceCancellationList, } = applicant;
5466
5466
  const lists = {
5467
5467
  claims: insuranceClaimList?.map((item) => ({
5468
5468
  date: addDayToDate(`${item.claimYear}-${item.claimMonth}`, 1),
@@ -5495,7 +5495,7 @@ const HomeQuoteDataHandler = () => {
5495
5495
  dwelling.liability = Number(dwelling.liability);
5496
5496
  dwelling.fireHydrantDistance = Number(dwelling.fireHydrantDistance);
5497
5497
  dwelling.fireHallDistance = Number(dwelling.fireHallDistance);
5498
- if ((insuranceType !== mychoiceSdkComponents.InsuranceTypes.Home) && dwelling.pp) {
5498
+ if (insuranceType !== mychoiceSdkComponents.InsuranceTypes.Home && dwelling.pp) {
5499
5499
  dwelling.replacementCost = Number(dwelling.pp);
5500
5500
  }
5501
5501
  const heatingExpectedDate = mychoiceSdkComponents.subYearsFromDate('', 20);
@@ -5537,14 +5537,16 @@ const HomeQuoteDataHandler = () => {
5537
5537
  delete discount.policyStartDay;
5538
5538
  }
5539
5539
  const requestBody = {
5540
- dwellings: [{
5540
+ dwellings: [
5541
+ {
5541
5542
  ...dwelling,
5542
5543
  postalCode: postal.postalCode,
5543
5544
  locationIndex: postal.locationIndex,
5544
5545
  city: postal.city,
5545
5546
  streetAddress: postal.streetAddress,
5546
5547
  ...lists,
5547
- }],
5548
+ },
5549
+ ],
5548
5550
  ...discount,
5549
5551
  insured: {
5550
5552
  dateOfBirth: `${birthYear}-${birthMonth}-${birthDay}`,
@@ -5680,7 +5682,7 @@ const HomeQuoteDataHandler = () => {
5680
5682
  }
5681
5683
  }
5682
5684
  };
5683
- return ({
5685
+ return {
5684
5686
  status,
5685
5687
  successMessage,
5686
5688
  responseData,
@@ -5689,7 +5691,7 @@ const HomeQuoteDataHandler = () => {
5689
5691
  responseError,
5690
5692
  postRequestQuoteOnliaUrl,
5691
5693
  postRequestQuote,
5692
- });
5694
+ };
5693
5695
  };
5694
5696
 
5695
5697
  const LifeQuoteDataHandler = () => {