@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/cjs/index.js
CHANGED
|
@@ -135,6 +135,7 @@ const SwitchButtonBox = (props) => {
|
|
|
135
135
|
};
|
|
136
136
|
const handleClick = React.useCallback((selectedItem) => () => {
|
|
137
137
|
setActiveId(selectedItem.value);
|
|
138
|
+
console.log(selectedItem.value, "value?");
|
|
138
139
|
if (onChange) {
|
|
139
140
|
onChange({
|
|
140
141
|
name,
|
|
@@ -168,7 +169,7 @@ const OfferSection = ({ offerCompany, brokerCompany, offerPrice, phoneNumber, is
|
|
|
168
169
|
postRequestQuoteOnliaUrl(true, redirectUrl);
|
|
169
170
|
};
|
|
170
171
|
return (jsxRuntime.jsxs("div", { className: `offer-section ${mychoiceCls}`, children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferHeader, { className: isTheBig ? 'thebig-bold' : '', companyName: offerCompany?.name, isBestOffer: isBestOffer }), jsxRuntime.jsx(mychoiceSdkComponents.OfferPrice, { className: isTheBig ? 'thebig' : '', companyLogo: offerCompany?.logo, price: offerPrice }), !isTheBig && offsiteUrl
|
|
171
|
-
? (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: "Click below to get this rate" }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy
|
|
172
|
+
? (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { children: "Click below to get this rate" }), jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `offer-phone-number ${mychoiceCls}`, label: "Buy Online", type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium, onClick: handleCTAClick })] })) : (jsxRuntime.jsxs("div", { className: "offer-phone", children: [jsxRuntime.jsx("h3", { className: isTheBig ? 'thebig-bold' : '', children: "Call now to get this rate" }), jsxRuntime.jsx("a", { target: "_blank", rel: "noreferrer noopener", href: `tel:${phoneNumber?.number}`, children: jsxRuntime.jsx(mychoiceSdkComponents.ButtonBase, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} offer-phone-number`, label: phoneNumber?.title, type: mychoiceSdkComponents.ButtonTypes.Button, category: mychoiceSdkComponents.CategoryTypes.Filled, color: mychoiceSdkComponents.ColorTypes.Primary, variant: mychoiceSdkComponents.ButtonVariantTypes.Rectangle, size: mychoiceSdkComponents.SizeTypes.Medium }) })] })), jsxRuntime.jsxs("button", { className: "dropdown", onClick: handleDropdownClick, children: [jsxRuntime.jsx("span", { children: detailsIsOpen ? 'Less Info' : 'More Info' }), jsxRuntime.jsx(mychoiceSdkComponents.IconDropdownArrow, { color: "grey", className: detailsIsOpen ? 'rotated' : '' })] }), detailsIsOpen && (jsxRuntime.jsxs("div", { className: "offer-details", children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: offerCompany?.name, companyType: mychoiceSdkComponents.CompanyRoleTypes.Offering, description: offerCompany?.description }), jsxRuntime.jsx("hr", {}), (isTheBig || !offsiteUrl)
|
|
172
173
|
&& (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', logo: brokerCompany?.logo, name: brokerCompany?.title, companyType: mychoiceSdkComponents.CompanyRoleTypes.Broker, description: brokerCompany?.description }), jsxRuntime.jsx("hr", {})] })), jsxRuntime.jsx(mychoiceSdkComponents.OfferDetail, { className: isTheBig ? 'thebig-bold' : '', name: "Hours of Operation", children: jsxRuntime.jsx(mychoiceSdkComponents.OperationHoursInfo, { weekdayHours: weekdayHours, saturdayHours: saturdayHours, sundayHours: sundayHours }) })] }))] }));
|
|
173
174
|
};
|
|
174
175
|
OfferSection.defaultProps = {
|
|
@@ -431,17 +432,11 @@ const BlockCarInfo = () => {
|
|
|
431
432
|
const yearIsValid = !currentYear || Number(currentYear) > 1999;
|
|
432
433
|
const yearMessage = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: ["Please contact a licenced representative at Hagerty for classic car insurance:", ' ', jsxRuntime.jsx("a", { href: "tel:18335431540", children: "1-833-543-1540" })] }));
|
|
433
434
|
const handleVehicleYearChange = ({ value }) => {
|
|
434
|
-
console.log(value);
|
|
435
435
|
if (value) {
|
|
436
|
-
console.log(dispatchVehicleState({
|
|
437
|
-
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleYearSet,
|
|
438
|
-
payload: { year: value },
|
|
439
|
-
}), 'hm');
|
|
440
436
|
dispatchVehicleState({
|
|
441
437
|
type: mychoiceSdkStore.StoreFormCarVehicleActionTypes.FormCarVehicleYearSet,
|
|
442
438
|
payload: { year: value },
|
|
443
439
|
});
|
|
444
|
-
console.log(value, 'hmHm');
|
|
445
440
|
getVehicleMake(value);
|
|
446
441
|
}
|
|
447
442
|
};
|
|
@@ -3066,6 +3061,7 @@ const SectionApplicant = () => {
|
|
|
3066
3061
|
const handleEmailChange = ({ value }) => {
|
|
3067
3062
|
validateEmail(value);
|
|
3068
3063
|
};
|
|
3064
|
+
console.log(getSelectedOption(mychoiceSdkComponents.smokerOptions, smoker), "show me");
|
|
3069
3065
|
return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { className: "section-title", style: { textAlign: 'center' }, children: "Just the basics about you." }), jsxRuntime.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: mychoiceSdkComponents.subYearsFromDate('', 14), isDay: true }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.genderOptions, name: "gender", onChange: handleGenderChange, defaultValue: getSelectedOption(mychoiceSdkComponents.genderOptions, gender), title: "Gender", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !gender && inValidation, errorMessage: getErrorMessage(`${gender}`.toString(), inValidation) }), jsxRuntime.jsx(SwitchButtonBox, { items: mychoiceSdkComponents.smokerOptions, onChange: handleSmokerChange, name: "smoker", defaultValue: getSelectedOption(mychoiceSdkComponents.smokerOptions, smoker), title: "Smoker" }), isTheBig
|
|
3070
3066
|
? (jsxRuntime.jsxs("div", { className: "input-form-box-container", children: [jsxRuntime.jsx(LabelFormBox, { title: "Complete this form to see all your personalized\n quotes on the next page, you will also be able to:" }), jsxRuntime.jsxs("ol", { className: "ordered-block", children: [jsxRuntime.jsx("li", { children: "See what rates insurance carriers are offering" }), jsxRuntime.jsx("li", { children: "Get in touch with us and secure your rate" }), jsxRuntime.jsx("li", { children: "Potentially save more by speaking with a broker" })] })] }))
|
|
3071
3067
|
: jsxRuntime.jsx("h2", { children: "Complete the form below to see which companies are offering your quotes." }), jsxRuntime.jsx(InputFormBox, { name: "firstName", title: "First Name", onChange: handleFirstNameChange, defaultValue: firstName, placeholder: "Your First Name", error: !firstName && inValidation, errorMessage: getErrorMessage(firstName, inValidation) }), jsxRuntime.jsx(InputFormBox, { name: "lastname", title: "Last Name", onChange: handleLastNameChange, defaultValue: lastName, placeholder: "Your Last Name", error: !lastName && inValidation, errorMessage: getErrorMessage(lastName, inValidation) }), jsxRuntime.jsx(InputFormPhoneBox, { name: "phone", onChange: handlePhoneNumberChange, defaultValue: phone, title: "Phone Number", placeholder: "(855) 325-8444", error: !phone && inValidation, errorMessage: getErrorMessage(phone, inValidation) }), jsxRuntime.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 === mychoiceSdkComponents.ValidationStatusTypes.Declined
|
|
@@ -3091,6 +3087,8 @@ const SectionQuoteEdit = () => {
|
|
|
3091
3087
|
const { applicantState } = mychoiceSdkStore.useStoreFormLifeApplicant();
|
|
3092
3088
|
const { coverageState } = mychoiceSdkStore.useStoreFormLifeCoverage();
|
|
3093
3089
|
const { smoker, quoterInfo } = applicantState;
|
|
3090
|
+
console.log(applicantState, "applicantState");
|
|
3091
|
+
console.log(smoker, "smoker app stat");
|
|
3094
3092
|
const navigate = reactRouterDom.useNavigate();
|
|
3095
3093
|
const coverageLabel = mychoiceSdkComponents.coverageOptions.find((item) => item.value.toString() === coverageState.coverage.toString())?.name || '';
|
|
3096
3094
|
const coverageTypeLabel = mychoiceSdkComponents.lifeInsuranceTypeOptions.find((item) => item.value.toString() === coverageState.type.toString())?.name || '';
|