@mychoice/mychoice-sdk-modules 2.1.25 → 2.1.27
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 +5 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +5 -7
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/dist/esm/index.js
CHANGED
|
@@ -125,6 +125,7 @@ const SwitchButtonBox = (props) => {
|
|
|
125
125
|
};
|
|
126
126
|
const handleClick = useCallback((selectedItem) => () => {
|
|
127
127
|
setActiveId(selectedItem.value);
|
|
128
|
+
console.log(selectedItem.value, "value?");
|
|
128
129
|
if (onChange) {
|
|
129
130
|
onChange({
|
|
130
131
|
name,
|
|
@@ -158,7 +159,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
|
|
|
158
159
|
postRequestQuoteOnliaUrl(true, redirectUrl);
|
|
159
160
|
};
|
|
160
161
|
return (jsxs("div", { className: `offer-section ${mychoiceCls}`, children: [jsx(OfferHeader, { className: isTheBig ? 'thebig-bold' : '', companyName: offerCompany?.name, isBestOffer: isBestOffer }), jsx(OfferPrice, { className: isTheBig ? 'thebig' : '', companyLogo: offerCompany?.logo, price: offerPrice }), !isTheBig && offsiteUrl
|
|
161
|
-
? (jsxs("div", { className: "offer-phone", children: [jsx("h3", { children: "Click below to get this rate" }), jsx(ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy
|
|
162
|
+
? (jsxs("div", { className: "offer-phone", children: [jsx("h3", { children: "Click below to get this rate" }), jsx(ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy Online", type: ButtonTypes.Button, category: CategoryTypes.Filled, color: ColorTypes.Primary, variant: ButtonVariantTypes.Rectangle, size: SizeTypes.Medium, onClick: handleCTAClick })] })) : (jsxs("div", { className: "offer-phone", children: [jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: "Call now to get this rate" }), jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:${phoneNumber?.number}`, children: jsx(ButtonBase, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} offer-phone-number`, label: phoneNumber?.title, type: ButtonTypes.Button, category: CategoryTypes.Filled, color: ColorTypes.Primary, variant: ButtonVariantTypes.Rectangle, size: SizeTypes.Medium }) })] })), jsxs("button", { className: "dropdown", onClick: handleDropdownClick, children: [jsx("span", { children: detailsIsOpen ? 'Less Info' : 'More Info' }), jsx(IconDropdownArrow, { color: "grey", className: detailsIsOpen ? 'rotated' : '' })] }), detailsIsOpen && (jsxs("div", { className: "offer-details", children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: offerCompany?.name, companyType: CompanyRoleTypes.Offering, description: offerCompany?.description }), jsx("hr", {}), (isTheBig || !offsiteUrl)
|
|
162
163
|
&& (jsxs(Fragment, { children: [jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: CompanyRoleTypes.Broker, description: brokerCompany?.description }), jsx("hr", {})] })), jsx(OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", children: jsx(OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) })] }))] }));
|
|
163
164
|
};
|
|
164
165
|
OfferSection.defaultProps = {
|
|
@@ -421,17 +422,11 @@ const BlockCarInfo = () => {
|
|
|
421
422
|
const yearIsValid = !currentYear || Number(currentYear) > 1999;
|
|
422
423
|
const yearMessage = (jsxs(Fragment, { children: ["Please contact a licenced representative at Hagerty for classic car insurance:", ' ', jsx("a", { href: "tel:18335431540", children: "1-833-543-1540" })] }));
|
|
423
424
|
const handleVehicleYearChange = ({ value }) => {
|
|
424
|
-
console.log(value);
|
|
425
425
|
if (value) {
|
|
426
|
-
console.log(dispatchVehicleState({
|
|
427
|
-
type: StoreFormCarVehicleActionTypes.FormCarVehicleYearSet,
|
|
428
|
-
payload: { year: value },
|
|
429
|
-
}), 'hm');
|
|
430
426
|
dispatchVehicleState({
|
|
431
427
|
type: StoreFormCarVehicleActionTypes.FormCarVehicleYearSet,
|
|
432
428
|
payload: { year: value },
|
|
433
429
|
});
|
|
434
|
-
console.log(value, 'hmHm');
|
|
435
430
|
getVehicleMake(value);
|
|
436
431
|
}
|
|
437
432
|
};
|
|
@@ -3056,6 +3051,7 @@ const SectionApplicant = () => {
|
|
|
3056
3051
|
const handleEmailChange = ({ value }) => {
|
|
3057
3052
|
validateEmail(value);
|
|
3058
3053
|
};
|
|
3054
|
+
console.log(getSelectedOption(smokerOptions, smoker), "show me");
|
|
3059
3055
|
return (jsxs("div", { className: "form-section", children: [jsx("h2", { className: "section-title", style: { textAlign: 'center' }, children: "Just the basics about you." }), jsx(DateSelectFormBox, { name: "dateOfBirth", dateNames: ['birthYear', 'birthMonth', 'birthDay'], onDateChange: handleDateOfBirthChange, defaultValue: defaultDateOfBirth, title: "Date of birth", error: inValidation, errorMessage: getDateErrorMessage([birthDay || '', birthMonth || '', birthYear || ''], inValidation), maxDate: subYearsFromDate('', 14), isDay: true }), jsx(SelectFormBox, { options: genderOptions, name: "gender", onChange: handleGenderChange, defaultValue: getSelectedOption(genderOptions, gender), title: "Gender", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !gender && inValidation, errorMessage: getErrorMessage(`${gender}`.toString(), inValidation) }), jsx(SwitchButtonBox, { items: smokerOptions, onChange: handleSmokerChange, name: "smoker", defaultValue: getSelectedOption(smokerOptions, smoker), title: "Smoker" }), isTheBig
|
|
3060
3056
|
? (jsxs("div", { className: "input-form-box-container", children: [jsx(LabelFormBox, { title: "Complete this form to see all your personalized\n quotes on the next page, you will also be able to:" }), jsxs("ol", { className: "ordered-block", children: [jsx("li", { children: "See what rates insurance carriers are offering" }), jsx("li", { children: "Get in touch with us and secure your rate" }), jsx("li", { children: "Potentially save more by speaking with a broker" })] })] }))
|
|
3061
3057
|
: jsx("h2", { children: "Complete the form below to see which companies are offering your quotes." }), jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && inValidation, errorMessage: getErrorMessage(firstName, inValidation) }), jsx(InputFormBox, { name: "lastname", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && inValidation, errorMessage: getErrorMessage(lastName, inValidation) }), jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(855) 325-8444", error: !phone && inValidation, errorMessage: getErrorMessage(phone, inValidation) }), jsx(InputFormEmailBox, { validationStatus: emailStatus, name: "email", title: "Please provide your email address so we can send you a copy of your quotes", onChange: handleEmailChange, defaultValue: email, placeholder: "johnsmith@mychoice.ca", errorMessage: emailStatus === ValidationStatusTypes.Declined
|
|
@@ -3081,6 +3077,8 @@ const SectionQuoteEdit = () => {
|
|
|
3081
3077
|
const { applicantState } = useStoreFormLifeApplicant();
|
|
3082
3078
|
const { coverageState } = useStoreFormLifeCoverage();
|
|
3083
3079
|
const { smoker, quoterInfo } = applicantState;
|
|
3080
|
+
console.log(applicantState, "applicantState");
|
|
3081
|
+
console.log(smoker, "smoker app stat");
|
|
3084
3082
|
const navigate = useNavigate();
|
|
3085
3083
|
const coverageLabel = coverageOptions.find((item) => item.value.toString() === coverageState.coverage.toString())?.name || '';
|
|
3086
3084
|
const coverageTypeLabel = lifeInsuranceTypeOptions.find((item) => item.value.toString() === coverageState.type.toString())?.name || '';
|