@mychoice/mychoice-sdk-store 2.2.24 → 2.2.25

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.
Files changed (28) hide show
  1. package/dist/cjs/handlers/dataHandlers/QuoterPhoneDataHandler/QuoterPhoneDataHandler.d.ts +4 -0
  2. package/dist/cjs/handlers/dataHandlers/QuoterPhoneDataHandler/index.d.ts +1 -0
  3. package/dist/cjs/handlers/dataHandlers/QuoterPhoneDataHandler/interfaces.d.ts +4 -0
  4. package/dist/cjs/handlers/dataHandlers/index.d.ts +1 -0
  5. package/dist/cjs/index.js +274 -29
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/states/reducers/states/formStates/FormCarState/DiscountState/actions.d.ts +1 -0
  8. package/dist/cjs/states/reducers/states/formStates/FormCarState/DiscountState/interfaces.d.ts +8 -0
  9. package/dist/cjs/states/reducers/states/formStates/FormCarState/VehicleState/interfaces.d.ts +1 -1
  10. package/dist/cjs/states/reducers/states/formStates/FormHomeState/DiscountState/actions.d.ts +1 -0
  11. package/dist/cjs/states/reducers/states/formStates/FormHomeState/DiscountState/interfaces.d.ts +8 -0
  12. package/dist/cjs/states/reducers/states/formStates/FormLifeState/ApplicantState/actions.d.ts +1 -0
  13. package/dist/cjs/states/reducers/states/formStates/FormLifeState/ApplicantState/interfaces.d.ts +8 -0
  14. package/dist/esm/handlers/dataHandlers/QuoterPhoneDataHandler/QuoterPhoneDataHandler.d.ts +4 -0
  15. package/dist/esm/handlers/dataHandlers/QuoterPhoneDataHandler/index.d.ts +1 -0
  16. package/dist/esm/handlers/dataHandlers/QuoterPhoneDataHandler/interfaces.d.ts +4 -0
  17. package/dist/esm/handlers/dataHandlers/index.d.ts +1 -0
  18. package/dist/esm/index.js +273 -31
  19. package/dist/esm/index.js.map +1 -1
  20. package/dist/esm/states/reducers/states/formStates/FormCarState/DiscountState/actions.d.ts +1 -0
  21. package/dist/esm/states/reducers/states/formStates/FormCarState/DiscountState/interfaces.d.ts +8 -0
  22. package/dist/esm/states/reducers/states/formStates/FormCarState/VehicleState/interfaces.d.ts +1 -1
  23. package/dist/esm/states/reducers/states/formStates/FormHomeState/DiscountState/actions.d.ts +1 -0
  24. package/dist/esm/states/reducers/states/formStates/FormHomeState/DiscountState/interfaces.d.ts +8 -0
  25. package/dist/esm/states/reducers/states/formStates/FormLifeState/ApplicantState/actions.d.ts +1 -0
  26. package/dist/esm/states/reducers/states/formStates/FormLifeState/ApplicantState/interfaces.d.ts +8 -0
  27. package/dist/index.d.ts +38 -3
  28. package/package.json +3 -3
@@ -10,6 +10,7 @@ export declare enum StoreFormCarDiscountActionTypes {
10
10
  FormCarDiscountQuoterFirstNameSet = "FormCarDiscountQuoterFirstNameSet",
11
11
  FormCarDiscountQuoterLastNameSet = "FormCarDiscountQuoterLastNameSet",
12
12
  FormCarDiscountQuoterPhoneSet = "FormCarDiscountQuoterPhoneSet",
13
+ FormCarDiscountQuoterPhoneStatusSet = "FormCarDiscountQuoterPhoneStatusSet",
13
14
  FormCarDiscountVehlinkAdd = "FormCarDiscountVehlinkAdd",
14
15
  FormCarDiscountVehlinkSelect = "FormCarDiscountVehlinkSelect",
15
16
  FormCarDiscountVehlinkByVehicleDelete = "FormCarDiscountVehlinkByVehicleDelete",
@@ -5,6 +5,7 @@ export interface DiscountQuoterInfoInterface {
5
5
  firstName: string;
6
6
  lastName: string;
7
7
  phone: string;
8
+ phoneStatus: ValidationStatusTypes;
8
9
  recalculate: boolean;
9
10
  accidentBenefitsChanged?: boolean;
10
11
  utmSource?: string;
@@ -125,6 +126,13 @@ export type FormCarDiscountStateActionType = {
125
126
  phone: string;
126
127
  };
127
128
  localIndex?: string;
129
+ } | {
130
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet;
131
+ payload: {
132
+ phone: string;
133
+ phoneStatus: ValidationStatusTypes;
134
+ };
135
+ localIndex?: string;
128
136
  } | {
129
137
  type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterBrokerInfoSet;
130
138
  payload: {
@@ -42,7 +42,7 @@ export interface VehicleItemInterface {
42
42
  winterTires: boolean;
43
43
  parkingLocation: string;
44
44
  primaryUse: string;
45
- distanceDaily: number;
45
+ distanceDaily: number | undefined;
46
46
  distanceBusiness?: number;
47
47
  businessUsePercent?: string;
48
48
  distanceYearly: number;
@@ -13,6 +13,7 @@ export declare enum StoreFormHomeDiscountActionTypes {
13
13
  FormHomeQuoterFirstNameSet = "FormHomeQuoterFirstNameSet",
14
14
  FormHomeQuoterLastNameSet = "FormHomeQuoterLastNameSet",
15
15
  FormHomeQuoterPhoneSet = "FormHomeQuoterPhoneSet",
16
+ FormHomeQuoterPhoneStatusSet = "FormHomeQuoterPhoneStatusSet",
16
17
  FormHomeUtmCampaignSet = "FormHomeUtmCampaignSet",
17
18
  FormHomeUtmSourceSet = "FormHomeUtmSourceSet",
18
19
  FormHomeUtmProducerSet = "FormHomeUtmProducerSet",
@@ -5,6 +5,7 @@ export interface QuoterInfoInterface {
5
5
  firstName: string;
6
6
  lastName: string;
7
7
  phone: string;
8
+ phoneStatus: ValidationStatusTypes;
8
9
  recalculate: boolean;
9
10
  utmSource?: string;
10
11
  utmCampaign?: string;
@@ -74,6 +75,13 @@ export type FormHomeDiscountStateActionType = {
74
75
  phone: string;
75
76
  };
76
77
  localIndex?: string;
78
+ } | {
79
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet;
80
+ payload: {
81
+ phone: string;
82
+ phoneStatus: ValidationStatusTypes;
83
+ };
84
+ localIndex?: string;
77
85
  } | {
78
86
  type: StoreFormHomeDiscountActionTypes.FormHomeUtmCampaignSet;
79
87
  payload: {
@@ -13,6 +13,7 @@ export declare enum StoreFormLifeApplicantActionTypes {
13
13
  FormLifeQuoterFirstNameSet = "FormLifeQuoterFirstNameSet",
14
14
  FormLifeQuoterLastNameSet = "FormLifeQuoterLastNameSet",
15
15
  FormLifeQuoterPhoneSet = "FormLifeQuoterPhoneSet",
16
+ FormLifeQuoterPhoneStatusSet = "FormLifeQuoterPhoneStatusSet",
16
17
  FormLifeUtmCampaignSet = "FormLifeUtmCampaignSet",
17
18
  FormLifeUtmSourceSet = "FormLifeUtmSourceSet",
18
19
  FormLifeUtmProducerSet = "FormLifeUtmProducerSet"
@@ -15,6 +15,7 @@ export interface FormLifeApplicantStateInterface extends StateBaseInterface {
15
15
  firstName: string;
16
16
  lastName: string;
17
17
  phone: string;
18
+ phoneStatus: ValidationStatusTypes;
18
19
  recalculate: boolean;
19
20
  utmSource?: string;
20
21
  utmCampaign?: string;
@@ -91,6 +92,13 @@ export type FormLifeApplicantStateActionType = {
91
92
  phone: string;
92
93
  };
93
94
  localIndex?: string;
95
+ } | {
96
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet;
97
+ payload: {
98
+ phone: string;
99
+ phoneStatus: ValidationStatusTypes;
100
+ };
101
+ localIndex?: string;
94
102
  } | {
95
103
  type: StoreFormLifeApplicantActionTypes.FormLifeUtmCampaignSet;
96
104
  payload: {
@@ -0,0 +1,4 @@
1
+ import { UseHandlerQuoterPhoneInterface } from './interfaces';
2
+ export declare const useHandlerCarQuoterPhone: () => UseHandlerQuoterPhoneInterface;
3
+ export declare const useHandlerHomeQuoterPhone: () => UseHandlerQuoterPhoneInterface;
4
+ export declare const useHandlerLifeQuoterPhone: () => UseHandlerQuoterPhoneInterface;
@@ -0,0 +1 @@
1
+ export { useHandlerCarQuoterPhone, useHandlerHomeQuoterPhone, useHandlerLifeQuoterPhone } from './QuoterPhoneDataHandler';
@@ -0,0 +1,4 @@
1
+ import { DataHandlerRequestState } from '../shared';
2
+ export type UseHandlerQuoterPhoneInterface = DataHandlerRequestState & {
3
+ validatePhone: (phone: string) => void;
4
+ };
@@ -4,4 +4,5 @@ export * from './PartnerDataHandler';
4
4
  export * from './PostalDataHandler';
5
5
  export * from './VehicleDataHandlers';
6
6
  export * from './QuoterEmailDataHandler';
7
+ export * from './QuoterPhoneDataHandler';
7
8
  export * from './QuoteDataHandler';
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import axios from 'axios';
2
- import { defaultLocalIndex, HttpRequestHeaderTypes, RequestTypes, ModalTypes, DeviceTypes, ScreenBPTypes, DeviceTypeWidthList, ScreenBPList, AppTypes, InsuranceTypes, VehicleConditionTypes, VehiclePrimaryUseTypes, deepClone, CoverageTypes, getFormattedDate, GenderTypes, OccupationTypes, addDaysToDate, compareDates, DriverLicenceTypes, DateTypes, getLicenceMinDate, addYearsToDate, subMonthsFromDate, getDifferenceInYears, DriverListTypes, addMonthsToDate, ValidationStatusTypes, DriverPriorityTypes, defaultBrokerPhone, subYearsFromDate, ApplicantListTypes, useEffectOnce, getInsuranceType as getInsuranceType$2, API_AUTH, RequestStatusTypes, PROFILE_API, getDaysOfMonth, getDifferenceInHours, MAX_LOCAL_STORAGE_HOURS_THEBIG, MAX_LOCAL_STORAGE_HOURS, API_APP, API_FORM_CAR, supportedProvinceCodes, API_FORM_HOME, API_FORM_LIFE, isMyChoiceLike, getDifferenceInMonths } from '@mychoice/mychoice-sdk-components';
2
+ import { defaultLocalIndex, HttpRequestHeaderTypes, RequestTypes, ModalTypes, DeviceTypes, ScreenBPTypes, DeviceTypeWidthList, ScreenBPList, AppTypes, InsuranceTypes, VehicleConditionTypes, VehiclePrimaryUseTypes, deepClone, CoverageTypes, getFormattedDate, GenderTypes, OccupationTypes, addDaysToDate, compareDates, DriverLicenceTypes, DateTypes, getLicenceMinDate, addYearsToDate, subMonthsFromDate, getDifferenceInYears, DriverListTypes, addMonthsToDate, ValidationStatusTypes, defaultBrokerPhone, DriverPriorityTypes, subYearsFromDate, ApplicantListTypes, useEffectOnce, getInsuranceType as getInsuranceType$2, API_AUTH, RequestStatusTypes, PROFILE_API, getDaysOfMonth, getDifferenceInHours, MAX_LOCAL_STORAGE_HOURS_THEBIG, MAX_LOCAL_STORAGE_HOURS, API_APP, API_FORM_CAR, supportedProvinceCodes, API_FORM_HOME, API_FORM_LIFE, isMyChoiceLike, getDifferenceInMonths } from '@mychoice/mychoice-sdk-components';
3
3
  import { useMemo, useReducer, useState, useRef, useEffect } from 'react';
4
4
  import { jsx } from 'react/jsx-runtime';
5
5
  import { Provider, useSelector, useDispatch } from 'react-redux';
@@ -465,7 +465,7 @@ const vehicleItemInitialState = {
465
465
  winterTires: true,
466
466
  parkingLocation: 'garage',
467
467
  primaryUse: VehiclePrimaryUseTypes.Personal,
468
- distanceDaily: 0,
468
+ distanceDaily: undefined,
469
469
  distanceBusiness: 0,
470
470
  distanceYearly: 0,
471
471
  comprehensive: { ...vehicleComprehensiveInitialState },
@@ -910,6 +910,10 @@ const driverItemInitialState = {
910
910
  listedMonth: '',
911
911
  insured: true,
912
912
  insuredDate: '',
913
+ notCurrentlyInsured: false,
914
+ lastPolicyEndYear: '',
915
+ lastPolicyEndMonth: '',
916
+ lastPolicyCancelReason: '',
913
917
  insuranceCancellation: false,
914
918
  insuranceCancellationList: [{ ...driverCancellationItemInitialState }],
915
919
  licenceSuspension: false,
@@ -1869,6 +1873,7 @@ const discountQuoterInfoInitialState = {
1869
1873
  firstName: '',
1870
1874
  lastName: '',
1871
1875
  phone: '',
1876
+ phoneStatus: ValidationStatusTypes.Initial,
1872
1877
  recalculate: false,
1873
1878
  utmSource: '',
1874
1879
  utmCampaign: '',
@@ -1917,6 +1922,7 @@ var StoreFormCarDiscountActionTypes;
1917
1922
  StoreFormCarDiscountActionTypes["FormCarDiscountQuoterFirstNameSet"] = "FormCarDiscountQuoterFirstNameSet";
1918
1923
  StoreFormCarDiscountActionTypes["FormCarDiscountQuoterLastNameSet"] = "FormCarDiscountQuoterLastNameSet";
1919
1924
  StoreFormCarDiscountActionTypes["FormCarDiscountQuoterPhoneSet"] = "FormCarDiscountQuoterPhoneSet";
1925
+ StoreFormCarDiscountActionTypes["FormCarDiscountQuoterPhoneStatusSet"] = "FormCarDiscountQuoterPhoneStatusSet";
1920
1926
  StoreFormCarDiscountActionTypes["FormCarDiscountVehlinkAdd"] = "FormCarDiscountVehlinkAdd";
1921
1927
  StoreFormCarDiscountActionTypes["FormCarDiscountVehlinkSelect"] = "FormCarDiscountVehlinkSelect";
1922
1928
  StoreFormCarDiscountActionTypes["FormCarDiscountVehlinkByVehicleDelete"] = "FormCarDiscountVehlinkByVehicleDelete";
@@ -2067,6 +2073,10 @@ const formCarDiscountStateReducer = (state = { ...formCarDiscountStateInitialSta
2067
2073
  return setLocalDiscounts$1(action.localIndex, setDiscountQuoterProperty(state, 'lastName', action.payload.lastName));
2068
2074
  case StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneSet:
2069
2075
  return setLocalDiscounts$1(action.localIndex, setDiscountQuoterProperty(state, 'phone', action.payload.phone));
2076
+ case StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet: {
2077
+ const phoneState = setDiscountQuoterProperty(state, 'phone', action.payload.phone);
2078
+ return setLocalDiscounts$1(action.localIndex, setDiscountQuoterProperty(phoneState, 'phoneStatus', action.payload.phoneStatus));
2079
+ }
2070
2080
  case StoreFormCarDiscountActionTypes.FormCarDiscountQuoterUtmSourceSet:
2071
2081
  return setLocalDiscounts$1(action.localIndex, setDiscountQuoterProperty(state, 'utmSource', action.payload.utmSource));
2072
2082
  case StoreFormCarDiscountActionTypes.FormCarDiscountQuoterUtmCampaignSet:
@@ -2881,6 +2891,7 @@ const formHomeDiscountStateInitialState = {
2881
2891
  firstName: '',
2882
2892
  lastName: '',
2883
2893
  phone: '',
2894
+ phoneStatus: ValidationStatusTypes.Initial,
2884
2895
  recalculate: false,
2885
2896
  utmCampaign: '',
2886
2897
  utmSource: '',
@@ -2916,6 +2927,7 @@ var StoreFormHomeDiscountActionTypes;
2916
2927
  StoreFormHomeDiscountActionTypes["FormHomeQuoterFirstNameSet"] = "FormHomeQuoterFirstNameSet";
2917
2928
  StoreFormHomeDiscountActionTypes["FormHomeQuoterLastNameSet"] = "FormHomeQuoterLastNameSet";
2918
2929
  StoreFormHomeDiscountActionTypes["FormHomeQuoterPhoneSet"] = "FormHomeQuoterPhoneSet";
2930
+ StoreFormHomeDiscountActionTypes["FormHomeQuoterPhoneStatusSet"] = "FormHomeQuoterPhoneStatusSet";
2919
2931
  StoreFormHomeDiscountActionTypes["FormHomeUtmCampaignSet"] = "FormHomeUtmCampaignSet";
2920
2932
  StoreFormHomeDiscountActionTypes["FormHomeUtmSourceSet"] = "FormHomeUtmSourceSet";
2921
2933
  StoreFormHomeDiscountActionTypes["FormHomeUtmProducerSet"] = "FormHomeUtmProducerSet";
@@ -2976,6 +2988,11 @@ const formHomeDiscountStateReducer = (state = { ...formHomeDiscountStateInitialS
2976
2988
  return setLocalDiscounts(action.localIndex, setStateProperty(state, 'lastName', action.payload.lastName, 'quoterInfo'));
2977
2989
  case StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneSet:
2978
2990
  return setLocalDiscounts(action.localIndex, setStateProperty(state, 'phone', action.payload.phone, 'quoterInfo'));
2991
+ case StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet:
2992
+ return setLocalDiscounts(action.localIndex, {
2993
+ ...state,
2994
+ quoterInfo: { ...state.quoterInfo, ...{ phone: action.payload.phone, phoneStatus: action.payload.phoneStatus } },
2995
+ });
2979
2996
  case StoreFormHomeDiscountActionTypes.FormHomeUtmSourceSet:
2980
2997
  return setLocalDiscounts(action.localIndex, setStateProperty(state, 'utmSource', action.payload.utmSource, 'quoterInfo'));
2981
2998
  case StoreFormHomeDiscountActionTypes.FormHomeUtmCampaignSet:
@@ -3132,6 +3149,7 @@ const lifeFormApplicantInitialState = {
3132
3149
  firstName: '',
3133
3150
  lastName: '',
3134
3151
  phone: '',
3152
+ phoneStatus: ValidationStatusTypes.Initial,
3135
3153
  recalculate: false,
3136
3154
  utmCampaign: '',
3137
3155
  utmSource: '',
@@ -3167,6 +3185,7 @@ var StoreFormLifeApplicantActionTypes;
3167
3185
  StoreFormLifeApplicantActionTypes["FormLifeQuoterFirstNameSet"] = "FormLifeQuoterFirstNameSet";
3168
3186
  StoreFormLifeApplicantActionTypes["FormLifeQuoterLastNameSet"] = "FormLifeQuoterLastNameSet";
3169
3187
  StoreFormLifeApplicantActionTypes["FormLifeQuoterPhoneSet"] = "FormLifeQuoterPhoneSet";
3188
+ StoreFormLifeApplicantActionTypes["FormLifeQuoterPhoneStatusSet"] = "FormLifeQuoterPhoneStatusSet";
3170
3189
  StoreFormLifeApplicantActionTypes["FormLifeUtmCampaignSet"] = "FormLifeUtmCampaignSet";
3171
3190
  StoreFormLifeApplicantActionTypes["FormLifeUtmSourceSet"] = "FormLifeUtmSourceSet";
3172
3191
  StoreFormLifeApplicantActionTypes["FormLifeUtmProducerSet"] = "FormLifeUtmProducerSet";
@@ -3203,6 +3222,11 @@ const formLifeApplicantStateReducer = (state = { ...lifeFormApplicantInitialStat
3203
3222
  return setLocalApplicant(action?.localIndex, setStateProperty(state, 'lastName', action.payload.lastName, 'quoterInfo'));
3204
3223
  case StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneSet:
3205
3224
  return setLocalApplicant(action?.localIndex, setStateProperty(state, 'phone', action.payload.phone, 'quoterInfo'));
3225
+ case StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet:
3226
+ return setLocalApplicant(action?.localIndex, {
3227
+ ...state,
3228
+ quoterInfo: { ...state.quoterInfo, ...{ phone: action.payload.phone, phoneStatus: action.payload.phoneStatus } },
3229
+ });
3206
3230
  case StoreFormLifeApplicantActionTypes.FormLifeUtmSourceSet:
3207
3231
  return setLocalApplicant(action?.localIndex, setStateProperty(state, 'utmSource', action.payload.utmSource, 'quoterInfo'));
3208
3232
  case StoreFormLifeApplicantActionTypes.FormLifeUtmCampaignSet:
@@ -5080,6 +5104,190 @@ const useHandlerLifeQuoterEmail = () => {
5080
5104
  };
5081
5105
  };
5082
5106
 
5107
+ const useHandlerCarQuoterPhone = () => {
5108
+ const [requestState, setRequestState] = useReducer(dataHandlerReducer, {
5109
+ ...initialHandlerRequestState,
5110
+ });
5111
+ const { dispatchDiscountState } = useStoreFormCarDiscount();
5112
+ const { cancelToken } = useCancelToken();
5113
+ const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
5114
+ const validatePhone = async (phone) => {
5115
+ dispatchDiscountState({
5116
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet,
5117
+ payload: {
5118
+ phone,
5119
+ phoneStatus: ValidationStatusTypes.Loading,
5120
+ },
5121
+ });
5122
+ if (phone) {
5123
+ try {
5124
+ const response = await httpRequest({
5125
+ url: `${API_AUTH.GET_PHONE_VALIDATION}?phone=${encodeURIComponent(phone)}`,
5126
+ method: RequestTypes.Get,
5127
+ withoutToken: true,
5128
+ cancelToken,
5129
+ });
5130
+ if (response.data.valid) {
5131
+ dispatchDiscountState({
5132
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet,
5133
+ payload: {
5134
+ phone,
5135
+ phoneStatus: ValidationStatusTypes.Approved,
5136
+ },
5137
+ });
5138
+ }
5139
+ else {
5140
+ dispatchDiscountState({
5141
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet,
5142
+ payload: {
5143
+ phone,
5144
+ phoneStatus: ValidationStatusTypes.Declined,
5145
+ },
5146
+ });
5147
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5148
+ }
5149
+ }
5150
+ catch (error) {
5151
+ dispatchDiscountState({
5152
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet,
5153
+ payload: {
5154
+ phone,
5155
+ phoneStatus: ValidationStatusTypes.Declined,
5156
+ },
5157
+ });
5158
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5159
+ }
5160
+ }
5161
+ else {
5162
+ dispatchDiscountState({
5163
+ type: StoreFormCarDiscountActionTypes.FormCarDiscountQuoterPhoneStatusSet,
5164
+ payload: {
5165
+ phone,
5166
+ phoneStatus: ValidationStatusTypes.Declined,
5167
+ },
5168
+ });
5169
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'This field may not be blank.' });
5170
+ }
5171
+ };
5172
+ return {
5173
+ status,
5174
+ validatePhone,
5175
+ successMessage,
5176
+ responseData,
5177
+ errorMessage,
5178
+ isFirstRequest,
5179
+ responseError,
5180
+ };
5181
+ };
5182
+ const useHandlerHomeQuoterPhone = () => {
5183
+ const [requestState, setRequestState] = useReducer(dataHandlerReducer, {
5184
+ ...initialHandlerRequestState,
5185
+ });
5186
+ const { dispatchDiscountState } = useStoreFormHomeDiscount();
5187
+ const { cancelToken } = useCancelToken();
5188
+ const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
5189
+ const validatePhone = async (phone) => {
5190
+ dispatchDiscountState({
5191
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet,
5192
+ payload: { phone, phoneStatus: ValidationStatusTypes.Loading },
5193
+ });
5194
+ if (phone) {
5195
+ try {
5196
+ const response = await httpRequest({
5197
+ url: `${API_AUTH.GET_PHONE_VALIDATION}?phone=${encodeURIComponent(phone)}`,
5198
+ method: RequestTypes.Get,
5199
+ withoutToken: true,
5200
+ cancelToken,
5201
+ });
5202
+ if (response.data.valid) {
5203
+ dispatchDiscountState({
5204
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet,
5205
+ payload: { phone, phoneStatus: ValidationStatusTypes.Approved },
5206
+ });
5207
+ }
5208
+ else {
5209
+ dispatchDiscountState({
5210
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet,
5211
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5212
+ });
5213
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5214
+ }
5215
+ }
5216
+ catch (error) {
5217
+ dispatchDiscountState({
5218
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet,
5219
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5220
+ });
5221
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5222
+ }
5223
+ }
5224
+ else {
5225
+ dispatchDiscountState({
5226
+ type: StoreFormHomeDiscountActionTypes.FormHomeQuoterPhoneStatusSet,
5227
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5228
+ });
5229
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'This field may not be blank.' });
5230
+ }
5231
+ };
5232
+ return {
5233
+ status, validatePhone, successMessage, responseData, errorMessage, isFirstRequest, responseError,
5234
+ };
5235
+ };
5236
+ const useHandlerLifeQuoterPhone = () => {
5237
+ const [requestState, setRequestState] = useReducer(dataHandlerReducer, {
5238
+ ...initialHandlerRequestState,
5239
+ });
5240
+ const { dispatchApplicantState } = useStoreFormLifeApplicant();
5241
+ const { cancelToken } = useCancelToken();
5242
+ const { status, successMessage, responseData, errorMessage, isFirstRequest, responseError, } = requestState;
5243
+ const validatePhone = async (phone) => {
5244
+ dispatchApplicantState({
5245
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
5246
+ payload: { phone, phoneStatus: ValidationStatusTypes.Loading },
5247
+ });
5248
+ if (phone) {
5249
+ try {
5250
+ const response = await httpRequest({
5251
+ url: `${API_AUTH.GET_PHONE_VALIDATION}?phone=${encodeURIComponent(phone)}`,
5252
+ method: RequestTypes.Get,
5253
+ withoutToken: true,
5254
+ cancelToken,
5255
+ });
5256
+ if (response.data.valid) {
5257
+ dispatchApplicantState({
5258
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
5259
+ payload: { phone, phoneStatus: ValidationStatusTypes.Approved },
5260
+ });
5261
+ }
5262
+ else {
5263
+ dispatchApplicantState({
5264
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
5265
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5266
+ });
5267
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5268
+ }
5269
+ }
5270
+ catch (error) {
5271
+ dispatchApplicantState({
5272
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
5273
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5274
+ });
5275
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'Enter a valid phone number.' });
5276
+ }
5277
+ }
5278
+ else {
5279
+ dispatchApplicantState({
5280
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
5281
+ payload: { phone, phoneStatus: ValidationStatusTypes.Declined },
5282
+ });
5283
+ setRequestState({ type: DataHandlerActionTypes.SetError, payload: 'This field may not be blank.' });
5284
+ }
5285
+ };
5286
+ return {
5287
+ status, validatePhone, successMessage, responseData, errorMessage, isFirstRequest, responseError,
5288
+ };
5289
+ };
5290
+
5083
5291
  const CarQuoteDataHandler = () => {
5084
5292
  const { configState } = useStoreFormCarConfig();
5085
5293
  const { vehicleState } = useStoreFormCarVehicle();
@@ -5228,6 +5436,18 @@ const CarQuoteDataHandler = () => {
5228
5436
  delete driver.insuredYear;
5229
5437
  delete driver.insuredDate;
5230
5438
  }
5439
+ // "Not currently insured": build the open-ended lapse incident.
5440
+ // IncidentDate uses the selected month/year with the day defaulted to the 1st (History 1-4).
5441
+ if (driver.notCurrentlyInsured && driver.lastPolicyEndYear && driver.lastPolicyEndMonth) {
5442
+ driver.lastPolicyEndDate = addDayToDate(`${driver.lastPolicyEndYear}-${driver.lastPolicyEndMonth}`, 1);
5443
+ }
5444
+ else {
5445
+ driver.notCurrentlyInsured = false;
5446
+ delete driver.lastPolicyEndDate;
5447
+ delete driver.lastPolicyCancelReason;
5448
+ }
5449
+ delete driver.lastPolicyEndYear;
5450
+ delete driver.lastPolicyEndMonth;
5231
5451
  const defaultMinDate = driver.dateOfBirth && driver.licenceInfo.firstLicenceAge
5232
5452
  ? addYearsToDate(driver.dateOfBirth, +driver.licenceInfo.firstLicenceAge) : '';
5233
5453
  const isOnlyG = compareDates(defaultMinDate, configState.minDates.g.specialDate) < 0;
@@ -5424,7 +5644,6 @@ const CarQuoteDataHandler = () => {
5424
5644
  driver.ticketList = driver.ticketList?.map((listItem) => ({
5425
5645
  reason: listItem.ticketReason,
5426
5646
  ticketDate: addDayToDate(`${listItem.ticketYear}-${listItem.ticketMonth}`, +birthDay + 1),
5427
- ...(listItem.speed !== undefined ? { speed: listItem.speed } : {}),
5428
5647
  }));
5429
5648
  }
5430
5649
  return driver;
@@ -5456,7 +5675,7 @@ const CarQuoteDataHandler = () => {
5456
5675
  }
5457
5676
  else {
5458
5677
  // g-k) Use user-selected vehicle for extra drivers; skip if they are primary on another vehicle
5459
- const isPrimaryElsewhere = requestBody.vehlinks.some((l) => l.driverIndex === driverIndex && l.vehicleIndex !== vehicleIndex);
5678
+ const isPrimaryElsewhere = requestBody.vehlinks.some((l) => l.driverIndex === driverIndex + 1 && l.vehicleIndex !== vehicleIndex);
5460
5679
  if (isPrimaryElsewhere)
5461
5680
  continue;
5462
5681
  const occAssignment = discount.occVehlinks?.find((l) => l.driverIndex === driverIndex);
@@ -5484,7 +5703,12 @@ const CarQuoteDataHandler = () => {
5484
5703
  delete vehicle.purchaseYear;
5485
5704
  delete vehicle.purchaseMonth;
5486
5705
  delete vehicle.purchaseDay;
5487
- if (vehicle.primaryUse === VehiclePrimaryUseTypes.Personal || vehicle.businessUsePercent) {
5706
+ if (vehicle.primaryUse === VehiclePrimaryUseTypes.Personal) {
5707
+ delete vehicle.distanceBusiness;
5708
+ delete vehicle.businessUsePercent;
5709
+ }
5710
+ else if (vehicle.businessUsePercent) {
5711
+ // Send business_use_percent to the API; backend computes distance_business
5488
5712
  delete vehicle.distanceBusiness;
5489
5713
  }
5490
5714
  if (!vehicle.collision.coverage) {
@@ -6108,6 +6332,7 @@ const useValidationVehicle = () => {
6108
6332
  'distanceDaily',
6109
6333
  'distanceBusiness',
6110
6334
  'distanceYearly',
6335
+ 'businessUsePercent',
6111
6336
  'purchaseYear',
6112
6337
  'purchaseMonth',
6113
6338
  ];
@@ -6118,8 +6343,10 @@ const useValidationVehicle = () => {
6118
6343
  });
6119
6344
  vehicleState.items.forEach((item) => {
6120
6345
  Object.keys(item).map((key) => {
6121
- if (checkableKeys.includes(key) && !item[key]) {
6122
- if (!(key === 'distanceBusiness' && (item.primaryUse === VehiclePrimaryUseTypes.Personal || item.businessUsePercent))) {
6346
+ const isEmpty = key === 'distanceDaily' ? item[key] === undefined || item[key] === null : !item[key];
6347
+ if (checkableKeys.includes(key) && isEmpty) {
6348
+ if (!(key === 'distanceBusiness' && (item.primaryUse === VehiclePrimaryUseTypes.Personal || item.businessUsePercent))
6349
+ && !(key === 'businessUsePercent' && item.primaryUse !== VehiclePrimaryUseTypes.Business)) {
6123
6350
  errors.push(key);
6124
6351
  }
6125
6352
  }
@@ -6178,6 +6405,7 @@ const useValidationDriver = () => {
6178
6405
  const { discountState } = useStoreFormCarDiscount();
6179
6406
  const { inValidation: driverFormIsInValidation = false, isValid: driverFormIsValid = false, } = driverState;
6180
6407
  const { appConfigState } = useStoreAppConfig();
6408
+ const { appType } = appConfigState;
6181
6409
  const { dispatchAppModalState } = useStoreAppModal();
6182
6410
  const navigate = useNavigate();
6183
6411
  const driverFormValidate = (isRedirect = true) => {
@@ -6192,6 +6420,9 @@ const useValidationDriver = () => {
6192
6420
  'listedYear',
6193
6421
  'listedMonth',
6194
6422
  'insuredDate',
6423
+ 'lastPolicyEndYear',
6424
+ 'lastPolicyEndMonth',
6425
+ 'lastPolicyCancelReason',
6195
6426
  // 'insuredYear',
6196
6427
  // 'insuredMonth',
6197
6428
  ];
@@ -6224,30 +6455,32 @@ const useValidationDriver = () => {
6224
6455
  type: StoreFormCarDriverBaseActionTypes.FormCarDriverValidate,
6225
6456
  payload: { inValidation: true },
6226
6457
  });
6227
- Object.keys(discountState).forEach((key) => {
6228
- // checking errors in discountState
6229
- if (discountKeys.includes(key) && !discountState[key]) {
6230
- errors.push(key);
6458
+ const showPolicyStart = appType !== AppTypes.TheBig && !isMyChoiceLike(appType);
6459
+ if (showPolicyStart) {
6460
+ Object.keys(discountState).forEach((key) => {
6461
+ // checking errors in discountState
6462
+ if (discountKeys.includes(key) && !discountState[key]) {
6463
+ errors.push(key);
6464
+ }
6465
+ });
6466
+ const { policyStartYear = 0, policyStartMonth = 0, policyStartDay = 0 } = discountState;
6467
+ const policyDate = `${policyStartYear}-${policyStartMonth}-${policyStartDay}`;
6468
+ const currentDate = getFormattedDate('', 'yyyy-MM-dd');
6469
+ if (compareDates(currentDate, policyDate) >= 0) {
6470
+ errors.push('policyStartYear');
6471
+ errors.push('policyStartMonth');
6472
+ errors.push('policyStartDay');
6231
6473
  }
6232
- });
6233
- const { policyStartYear = 0, policyStartMonth = 0, policyStartDay = 0 } = discountState;
6234
- const policyDate = `${policyStartYear}-${policyStartMonth}-${policyStartDay}`;
6235
- // const currentDay = new Date().getUTCDate();
6236
- // const currentMonth = new Date().getUTCMonth();
6237
- // const currentYear = new Date().getUTCFullYear();
6238
- const currentDate = getFormattedDate('', 'yyyy-MM-dd');
6239
- if (compareDates(currentDate, policyDate) >= 0) {
6240
- errors.push('policyStartYear');
6241
- errors.push('policyStartMonth');
6242
- errors.push('policyStartDay');
6243
6474
  }
6244
6475
  driverState.items.forEach((item, index) => {
6245
6476
  Object.keys(item).forEach((key) => {
6246
6477
  // checking errors in driverState
6247
6478
  if (keys.includes(key) && !item[key]) {
6248
6479
  if ((!item.listed
6249
- && (key === 'listedYear' || key === 'listedMonth' || key === 'insuredDate'))
6480
+ && (key === 'listedYear' || key === 'listedMonth' || key === 'insuredDate'
6481
+ || key === 'lastPolicyEndYear' || key === 'lastPolicyEndMonth' || key === 'lastPolicyCancelReason'))
6250
6482
  || (!item.insured && item.listed && (key === 'insuredDate'))
6483
+ || (item.insured && (key === 'lastPolicyEndYear' || key === 'lastPolicyEndMonth' || key === 'lastPolicyCancelReason'))
6251
6484
  || (index === 0 && key === 'applicantRelationship')) {
6252
6485
  return;
6253
6486
  }
@@ -6335,6 +6568,7 @@ const useValidationCarDiscount = () => {
6335
6568
  'phone',
6336
6569
  'email',
6337
6570
  'emailStatus',
6571
+ 'phoneStatus',
6338
6572
  ];
6339
6573
  const errors = [];
6340
6574
  dispatchDiscountState({
@@ -6348,11 +6582,14 @@ const useValidationCarDiscount = () => {
6348
6582
  errors.push(objectKey);
6349
6583
  }
6350
6584
  });
6351
- if (discountState.emailTo.emailStatus !== ValidationStatusTypes.Approved) {
6352
- errors.push('email');
6353
- }
6354
6585
  }
6355
6586
  });
6587
+ if (discountState.emailTo.emailStatus !== ValidationStatusTypes.Approved) {
6588
+ errors.push('email');
6589
+ }
6590
+ if (discountState.quoterInfo.phoneStatus !== ValidationStatusTypes.Approved) {
6591
+ errors.push('phone');
6592
+ }
6356
6593
  if (!errors.length) {
6357
6594
  dispatchDiscountState({
6358
6595
  type: StoreFormCarDiscountActionTypes.FormCarDiscountValidate,
@@ -6753,7 +6990,6 @@ const useValidationHomeDiscount = () => {
6753
6990
  const discountKeys = [
6754
6991
  'firstName',
6755
6992
  'lastName',
6756
- 'phone',
6757
6993
  ];
6758
6994
  const errors = [];
6759
6995
  dispatchDiscountState({
@@ -6776,6 +7012,9 @@ const useValidationHomeDiscount = () => {
6776
7012
  if (discountState.emailTo.emailStatus !== ValidationStatusTypes.Approved) {
6777
7013
  errors.push('email');
6778
7014
  }
7015
+ if (quoterInfo?.phoneStatus !== ValidationStatusTypes.Approved) {
7016
+ errors.push('phone');
7017
+ }
6779
7018
  if (!errors.length) {
6780
7019
  dispatchDiscountState({
6781
7020
  type: StoreFormHomeDiscountActionTypes.FormHomeDiscountValidate,
@@ -6893,7 +7132,6 @@ const useValidationLifeApplicant = () => {
6893
7132
  const quoterInfoKeys = [
6894
7133
  'firstName',
6895
7134
  'lastName',
6896
- 'phone',
6897
7135
  ];
6898
7136
  const errors = [];
6899
7137
  dispatchApplicantState({
@@ -6908,6 +7146,9 @@ const useValidationLifeApplicant = () => {
6908
7146
  if (applicantState.emailTo.emailStatus !== ValidationStatusTypes.Approved) {
6909
7147
  errors.push('email');
6910
7148
  }
7149
+ if (quoterInfo?.phoneStatus !== ValidationStatusTypes.Approved) {
7150
+ errors.push('phone');
7151
+ }
6911
7152
  if (quoterInfo) {
6912
7153
  Object.keys(quoterInfo).forEach((key) => {
6913
7154
  if (quoterInfoKeys.includes(key) && !quoterInfo?.[key]) {
@@ -7652,12 +7893,13 @@ const useAutofillLifeForm = (options) => {
7652
7893
  },
7653
7894
  });
7654
7895
  }
7655
- // Dispatch quoter info - phone
7896
+ // Dispatch quoter info - phone (pre-approved since it comes from a trusted autofill source)
7656
7897
  if (applicantData.quoterInfo.phone) {
7657
7898
  dispatchApplicantState({
7658
- type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneSet,
7899
+ type: StoreFormLifeApplicantActionTypes.FormLifeQuoterPhoneStatusSet,
7659
7900
  payload: {
7660
7901
  phone: applicantData.quoterInfo.phone,
7902
+ phoneStatus: ValidationStatusTypes.Approved,
7661
7903
  },
7662
7904
  });
7663
7905
  }
@@ -7691,5 +7933,5 @@ const useAutofillLifeForm = (options) => {
7691
7933
  }, [dispatchPostalState, dispatchCoverageState, dispatchApplicantState, dispatchQuoteState, dispatchAppModalState]);
7692
7934
  };
7693
7935
 
7694
- export { CarBrokerTypeEnum, CarQuoteDataHandler, ClearFormDataHandler, HomeBrokerTypeEnum, HomeQuoteDataHandler, LifeQuoteDataHandler, StoreClientActionTypes, StoreConfigAppConfigActionTypes, StoreConfigAppDeviceActionTypes, StoreConfigAppLoaderActionTypes, StoreConfigAppModalActionTypes, StoreFormCarConfigActionTypes, StoreFormCarDiscountActionTypes, StoreFormCarDriverAccidentActionTypes, StoreFormCarDriverBaseActionTypes, StoreFormCarDriverCancellationActionTypes, StoreFormCarDriverInfoActionTypes, StoreFormCarDriverInsuranceActionTypes, StoreFormCarDriverLicenceActionTypes, StoreFormCarDriverSuspensionActionTypes, StoreFormCarDriverTicketActionTypes, StoreFormCarPostalActionTypes, StoreFormCarQuoteActionTypes, StoreFormCarVehicleActionTypes, StoreFormHomeApplicantBaseActionTypes, StoreFormHomeApplicantCancellationActionTypes, StoreFormHomeApplicantClaimActionTypes, StoreFormHomeApplicantInfoActionTypes, StoreFormHomeApplicantInsuranceActionTypes, StoreFormHomeDiscountActionTypes, StoreFormHomeDwellingActionTypes, StoreFormHomePostalActionTypes, StoreFormHomeQuoteActionTypes, StoreFormLifeApplicantActionTypes, StoreFormLifeCoverageActionTypes, StoreFormLifePostalActionTypes, StoreFormLifeQuoteActionTypes, StorePartnerActionTypes, StoreProvider, addDayToDate, configStateReducer, differenceInHoursFromNow, formCarReducer, formCondoDwellingInitialState, formHomeDwellingInitialState, formHomeReducer, formLifeReducer, formTenantDwellingInitialState, getDwellingInitialState, getProvinceCodeFromState, getProvinceName, globalStateReducer, initHttpResponse, mapToConfigState, mapToDriverState, mapToLifeApplicantState, mapToLifeCoverageState, mapToLifePostalState, mapToPostalState, mapToVehicleState, parseAutofillParam, parseLifeAutofillParam, reducers, default_1 as token, useAbReform, useAutofillCarForm, useAutofillLifeForm, useHandlerAuth, useHandlerCarMake, useHandlerCarModel, useHandlerCarQuoterEmail, useHandlerHomeQuoterEmail, useHandlerLifeQuoterEmail, useHandlerPartner, useHandlerPostal, useProvince, useStoreAppConfig, useStoreAppDevice, useStoreAppLoader, useStoreAppModal, useStoreClient, useStoreClientLoggedIn, useStoreClientProfile, useStoreClientToken, useStoreDeviceBP, useStoreDeviceType, useStoreFormCarConfig, useStoreFormCarDiscount, useStoreFormCarDriverAccident, useStoreFormCarDriverBase, useStoreFormCarDriverCancellation, useStoreFormCarDriverInfo, useStoreFormCarDriverInsurance, useStoreFormCarDriverLicence, useStoreFormCarDriverSuspension, useStoreFormCarDriverTicket, useStoreFormCarPostal, useStoreFormCarQuote, useStoreFormCarVehicle, useStoreFormHomeApplicantBase, useStoreFormHomeApplicantCancellation, useStoreFormHomeApplicantClaim, useStoreFormHomeApplicantInfo, useStoreFormHomeApplicantInsurance, useStoreFormHomeDiscount, useStoreFormHomeDwelling, useStoreFormHomePostal, useStoreFormHomeQuote, useStoreFormLifeApplicant, useStoreFormLifeCoverage, useStoreFormLifePostal, useStoreFormLifeQuote, useStorePartner, useValidationAddress, useValidationApplicant, useValidationCarDiscount, useValidationCoverage, useValidationDriver, useValidationDwelling, useValidationHomeDiscount, useValidationLifeApplicant, useValidationVehicle };
7936
+ export { CarBrokerTypeEnum, CarQuoteDataHandler, ClearFormDataHandler, HomeBrokerTypeEnum, HomeQuoteDataHandler, LifeQuoteDataHandler, StoreClientActionTypes, StoreConfigAppConfigActionTypes, StoreConfigAppDeviceActionTypes, StoreConfigAppLoaderActionTypes, StoreConfigAppModalActionTypes, StoreFormCarConfigActionTypes, StoreFormCarDiscountActionTypes, StoreFormCarDriverAccidentActionTypes, StoreFormCarDriverBaseActionTypes, StoreFormCarDriverCancellationActionTypes, StoreFormCarDriverInfoActionTypes, StoreFormCarDriverInsuranceActionTypes, StoreFormCarDriverLicenceActionTypes, StoreFormCarDriverSuspensionActionTypes, StoreFormCarDriverTicketActionTypes, StoreFormCarPostalActionTypes, StoreFormCarQuoteActionTypes, StoreFormCarVehicleActionTypes, StoreFormHomeApplicantBaseActionTypes, StoreFormHomeApplicantCancellationActionTypes, StoreFormHomeApplicantClaimActionTypes, StoreFormHomeApplicantInfoActionTypes, StoreFormHomeApplicantInsuranceActionTypes, StoreFormHomeDiscountActionTypes, StoreFormHomeDwellingActionTypes, StoreFormHomePostalActionTypes, StoreFormHomeQuoteActionTypes, StoreFormLifeApplicantActionTypes, StoreFormLifeCoverageActionTypes, StoreFormLifePostalActionTypes, StoreFormLifeQuoteActionTypes, StorePartnerActionTypes, StoreProvider, addDayToDate, configStateReducer, differenceInHoursFromNow, formCarReducer, formCondoDwellingInitialState, formHomeDwellingInitialState, formHomeReducer, formLifeReducer, formTenantDwellingInitialState, getDwellingInitialState, getProvinceCodeFromState, getProvinceName, globalStateReducer, initHttpResponse, mapToConfigState, mapToDriverState, mapToLifeApplicantState, mapToLifeCoverageState, mapToLifePostalState, mapToPostalState, mapToVehicleState, parseAutofillParam, parseLifeAutofillParam, reducers, default_1 as token, useAbReform, useAutofillCarForm, useAutofillLifeForm, useHandlerAuth, useHandlerCarMake, useHandlerCarModel, useHandlerCarQuoterEmail, useHandlerCarQuoterPhone, useHandlerHomeQuoterEmail, useHandlerHomeQuoterPhone, useHandlerLifeQuoterEmail, useHandlerLifeQuoterPhone, useHandlerPartner, useHandlerPostal, useProvince, useStoreAppConfig, useStoreAppDevice, useStoreAppLoader, useStoreAppModal, useStoreClient, useStoreClientLoggedIn, useStoreClientProfile, useStoreClientToken, useStoreDeviceBP, useStoreDeviceType, useStoreFormCarConfig, useStoreFormCarDiscount, useStoreFormCarDriverAccident, useStoreFormCarDriverBase, useStoreFormCarDriverCancellation, useStoreFormCarDriverInfo, useStoreFormCarDriverInsurance, useStoreFormCarDriverLicence, useStoreFormCarDriverSuspension, useStoreFormCarDriverTicket, useStoreFormCarPostal, useStoreFormCarQuote, useStoreFormCarVehicle, useStoreFormHomeApplicantBase, useStoreFormHomeApplicantCancellation, useStoreFormHomeApplicantClaim, useStoreFormHomeApplicantInfo, useStoreFormHomeApplicantInsurance, useStoreFormHomeDiscount, useStoreFormHomeDwelling, useStoreFormHomePostal, useStoreFormHomeQuote, useStoreFormLifeApplicant, useStoreFormLifeCoverage, useStoreFormLifePostal, useStoreFormLifeQuote, useStorePartner, useValidationAddress, useValidationApplicant, useValidationCarDiscount, useValidationCoverage, useValidationDriver, useValidationDwelling, useValidationHomeDiscount, useValidationLifeApplicant, useValidationVehicle };
7695
7937
  //# sourceMappingURL=index.js.map