@mychoice/mychoice-sdk-store 2.2.11 → 2.2.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 +20 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +20 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -6924,6 +6924,9 @@ const useAutofillCarForm = (options) => {
|
|
|
6924
6924
|
const { dispatchDriverCancellationState } = useStoreFormCarDriverCancellation();
|
|
6925
6925
|
const { dispatchDriverAccidentState } = useStoreFormCarDriverAccident();
|
|
6926
6926
|
const { dispatchDriverTicketState } = useStoreFormCarDriverTicket();
|
|
6927
|
+
const { dispatchDriverBaseState } = useStoreFormCarDriverBase();
|
|
6928
|
+
const { dispatchDiscountState } = useStoreFormCarDiscount();
|
|
6929
|
+
const { dispatchQuoteState } = useStoreFormCarQuote();
|
|
6927
6930
|
const { getVehicleMake } = useHandlerCarMake();
|
|
6928
6931
|
const { getVehicleModel } = useHandlerCarModel();
|
|
6929
6932
|
const { dispatchAppModalState } = useStoreAppModal();
|
|
@@ -6941,6 +6944,13 @@ const useAutofillCarForm = (options) => {
|
|
|
6941
6944
|
}
|
|
6942
6945
|
// Parse the autofill data
|
|
6943
6946
|
const autofillData = parseAutofillParam(autofillParam);
|
|
6947
|
+
// Clear all existing car form state before applying autofill data
|
|
6948
|
+
dispatchPostalState({ type: exports.StoreFormCarPostalActionTypes.FormCarPostalClear });
|
|
6949
|
+
dispatchVehicleState({ type: exports.StoreFormCarVehicleActionTypes.FormCarVehicleClear });
|
|
6950
|
+
dispatchConfigState({ type: exports.StoreFormCarConfigActionTypes.FormCarConfigClear, payload: { province: '' } });
|
|
6951
|
+
dispatchDriverBaseState({ type: exports.StoreFormCarDriverBaseActionTypes.FormCarDriverClear });
|
|
6952
|
+
dispatchDiscountState({ type: exports.StoreFormCarDiscountActionTypes.FormCarDiscountClear });
|
|
6953
|
+
dispatchQuoteState({ type: exports.StoreFormCarQuoteActionTypes.FormCarQuoteClear });
|
|
6944
6954
|
// Dispatch postal state
|
|
6945
6955
|
const postalData = mapToPostalState(autofillData);
|
|
6946
6956
|
dispatchPostalState({
|
|
@@ -7248,6 +7258,9 @@ const useAutofillCarForm = (options) => {
|
|
|
7248
7258
|
dispatchDriverCancellationState,
|
|
7249
7259
|
dispatchDriverAccidentState,
|
|
7250
7260
|
dispatchDriverTicketState,
|
|
7261
|
+
dispatchDriverBaseState,
|
|
7262
|
+
dispatchDiscountState,
|
|
7263
|
+
dispatchQuoteState,
|
|
7251
7264
|
dispatchAppModalState,
|
|
7252
7265
|
getVehicleMake,
|
|
7253
7266
|
getVehicleModel,
|
|
@@ -7261,6 +7274,7 @@ const useAutofillLifeForm = (options) => {
|
|
|
7261
7274
|
const { dispatchPostalState } = useStoreFormLifePostal();
|
|
7262
7275
|
const { dispatchCoverageState } = useStoreFormLifeCoverage();
|
|
7263
7276
|
const { dispatchApplicantState } = useStoreFormLifeApplicant();
|
|
7277
|
+
const { dispatchQuoteState } = useStoreFormLifeQuote();
|
|
7264
7278
|
const { dispatchAppModalState } = useStoreAppModal();
|
|
7265
7279
|
const autofillProcessedRef = react.useRef(false);
|
|
7266
7280
|
react.useEffect(() => {
|
|
@@ -7276,6 +7290,11 @@ const useAutofillLifeForm = (options) => {
|
|
|
7276
7290
|
}
|
|
7277
7291
|
// Parse the autofill data
|
|
7278
7292
|
const autofillData = parseLifeAutofillParam(autofillParam);
|
|
7293
|
+
// Clear all existing life form state before applying autofill data
|
|
7294
|
+
dispatchPostalState({ type: exports.StoreFormLifePostalActionTypes.FormLifePostalClear });
|
|
7295
|
+
dispatchCoverageState({ type: exports.StoreFormLifeCoverageActionTypes.FormLifeCoverageClear });
|
|
7296
|
+
dispatchApplicantState({ type: exports.StoreFormLifeApplicantActionTypes.FormLifeApplicantClear });
|
|
7297
|
+
dispatchQuoteState({ type: exports.StoreFormLifeQuoteActionTypes.FormLifeQuoteClear });
|
|
7279
7298
|
// Map and dispatch postal state
|
|
7280
7299
|
const postalData = mapToLifePostalState(autofillData);
|
|
7281
7300
|
dispatchPostalState({
|
|
@@ -7426,7 +7445,7 @@ const useAutofillLifeForm = (options) => {
|
|
|
7426
7445
|
// Silently fail - let the app continue with normal flow
|
|
7427
7446
|
console.error('Life autofill initialization error:', error);
|
|
7428
7447
|
}
|
|
7429
|
-
}, [dispatchPostalState, dispatchCoverageState, dispatchApplicantState, dispatchAppModalState]);
|
|
7448
|
+
}, [dispatchPostalState, dispatchCoverageState, dispatchApplicantState, dispatchQuoteState, dispatchAppModalState]);
|
|
7430
7449
|
};
|
|
7431
7450
|
|
|
7432
7451
|
exports.CarQuoteDataHandler = CarQuoteDataHandler;
|