@mychoice/mychoice-sdk-modules 2.1.60 → 2.1.61
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 +9 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/shared/sections/quotes/NoQuotesMessage/NoQuotesMessage.d.ts +1 -1
- package/dist/esm/index.js +9 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/shared/sections/quotes/NoQuotesMessage/NoQuotesMessage.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -180,6 +180,9 @@ const TEXT = {
|
|
|
180
180
|
life: 'Our apologies but unfortunately, we are unable to provide you with an life insurance rate in your home province at this current time however we are actively working on adding more partners to our platform who will be able to provide you with a rate in the near future! Please check back with us at a later date, in the meantime, stay safe!',
|
|
181
181
|
};
|
|
182
182
|
const NoQuotesMessage = ({ type }) => {
|
|
183
|
+
const { appConfigState: { appType }, } = useStoreAppConfig();
|
|
184
|
+
if (appType === AppTypes.TheBig)
|
|
185
|
+
return null;
|
|
183
186
|
return (jsxs("div", { className: "offer-section mychoice", children: [jsx("div", { style: { width: '100%' }, children: jsx("img", { src: logo, alt: "My Choice", style: { width: '120px' } }) }), jsx("p", { children: jsx("h3", { style: { whiteSpace: 'normal' }, children: TITLE[type] }) }), jsx("p", { style: { lineHeight: '1.25rem' }, children: TEXT[type] })] }));
|
|
184
187
|
};
|
|
185
188
|
|
|
@@ -1519,7 +1522,7 @@ const PageDriver = () => {
|
|
|
1519
1522
|
useEffect(() => {
|
|
1520
1523
|
setIsRender(true);
|
|
1521
1524
|
}, [isRender]);
|
|
1522
|
-
return (jsxs("div", { className: "form-container", children: [jsx(TabDriver, { createItem: createDriver }), jsxs("div", { className: "form-section-container", children: [isRender && (jsxs(Fragment, { children: [jsx(SectionDriverInfo, {}), jsx(SectionDriverLicence, {}), jsx(SectionDriverInsurancePolicy, {}), jsx(SectionDriverCancellation, {}), jsx(SectionDriverHistory, {}), jsx(HonestyMessage, {})] })), appType === AppTypes.TheBig ? (jsx(NavigationBottomTheBig, { createItem: createDriver, formSteps: formSteps[InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid })) : (jsx(NavigationBottom, { className: "mychoice", createItem: createDriver, formSteps: formSteps[InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))] }), localIndex !== defaultLocalIndex && (jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" }))] }));
|
|
1525
|
+
return (jsxs("div", { className: "form-container", children: [jsx(TabDriver, { createItem: createDriver }), jsxs("div", { className: "form-section-container", children: [isRender && (jsxs(Fragment, { children: [jsx(SectionDriverInfo, {}), jsx(SectionDriverLicence, {}), jsx(SectionDriverInsurancePolicy, {}), jsx(SectionDriverCancellation, {}), jsx(SectionDriverHistory, {}), appType === AppTypes.MyChoice && jsx(HonestyMessage, {})] })), appType === AppTypes.TheBig ? (jsx(NavigationBottomTheBig, { createItem: createDriver, formSteps: formSteps[InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid })) : (jsx(NavigationBottom, { className: "mychoice", createItem: createDriver, formSteps: formSteps[InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))] }), localIndex !== defaultLocalIndex && (jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" }))] }));
|
|
1523
1526
|
};
|
|
1524
1527
|
|
|
1525
1528
|
const BlockVehLinks = () => {
|
|
@@ -1945,7 +1948,7 @@ const SectionAddress = () => {
|
|
|
1945
1948
|
const { getPostal } = useHandlerPostal(insuranceType);
|
|
1946
1949
|
const { postalState: { item, inValidation }, dispatchPostalState, } = useStoreFormHomePostal();
|
|
1947
1950
|
const { dispatchApplicantBaseState } = useStoreFormHomeApplicantBase();
|
|
1948
|
-
const { streetAddress = '', postalCode = '', addressObject, errorMessage
|
|
1951
|
+
const { streetAddress = '', postalCode = '', addressObject, errorMessage } = item;
|
|
1949
1952
|
const navigate = useNavigate();
|
|
1950
1953
|
const asyncSelectRef = useRef(null);
|
|
1951
1954
|
const isMychoice = appType === AppTypes.MyChoice;
|
|
@@ -2046,7 +2049,7 @@ const SectionAddress = () => {
|
|
|
2046
2049
|
console.error(error);
|
|
2047
2050
|
});
|
|
2048
2051
|
};
|
|
2049
|
-
const handleOwnerTypeChange = ({ value: typeValue
|
|
2052
|
+
const handleOwnerTypeChange = ({ value: typeValue }) => {
|
|
2050
2053
|
dispatchDwellingState({
|
|
2051
2054
|
type: StoreFormHomeDwellingActionTypes.FormHomeDwellingClear,
|
|
2052
2055
|
payload: { type: typeValue },
|
|
@@ -2127,7 +2130,7 @@ const SectionAddress = () => {
|
|
|
2127
2130
|
const placeholderText = 'Type in Your Street Address';
|
|
2128
2131
|
return (jsxs("div", { className: `form-section ${mychoiceCls}`, children: [jsx("h2", { className: "section-title", children: " Where do you reside and thrive? " }), jsx(SelectFormBox, { options: homeOwnerTypeOptions, name: "ownerType", onChange: handleOwnerTypeChange, defaultValue: insuranceType, title: "Type of Insurance", placeholder: "Select Type of Insurance", error: !insuranceType && inValidation, errorMessage: getErrorMessage(insuranceType, inValidation) }), jsxs("div", { className: "input-form-box-container", children: [jsx(LabelFormBox, { name: "homeAddress", title: "Home Address", subTitle: "The address should contain Street Address (example: '123 Main St'), City, Province Code, Postal Code, Country", description: "For your convenience, suggestions for your address will be displayed as you start typing. Please select an option from the list to continue. If you can\u2019t find your address in the list, please click \u201CI can\u2019t find my address. Let me type it in.\u201D and you will be directed to a page which will let you enter your address manually." }), jsx(GooglePlacesAutocomplete, { autocompletionRequest: {
|
|
2129
2132
|
componentRestrictions: { country: 'ca' },
|
|
2130
|
-
}, apiKey:
|
|
2133
|
+
}, apiKey: process.env.REACT_APP_HOME_SEARCH_GOOGLE_API_KEY, selectProps: {
|
|
2131
2134
|
value: addressObject,
|
|
2132
2135
|
onChange: handleAddressChange,
|
|
2133
2136
|
placeholder: placeholderText,
|
|
@@ -2135,17 +2138,14 @@ const SectionAddress = () => {
|
|
|
2135
2138
|
styles: {
|
|
2136
2139
|
control: (baseStyles, state) => ({
|
|
2137
2140
|
...baseStyles,
|
|
2138
|
-
borderColor: getErrorMessage(streetAddress && postalCode, inValidation) ||
|
|
2139
|
-
errorMessage
|
|
2141
|
+
borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage
|
|
2140
2142
|
? 'red'
|
|
2141
2143
|
: getBorderColor(state.isFocused),
|
|
2142
2144
|
borderRadius: isMychoice ? '0.625rem' : '0.25rem',
|
|
2143
2145
|
boxShadow: 'none',
|
|
2144
2146
|
height: '3.75rem',
|
|
2145
2147
|
':hover': {
|
|
2146
|
-
borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage
|
|
2147
|
-
? 'red'
|
|
2148
|
-
: '#8ED6DC',
|
|
2148
|
+
borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage ? 'red' : '#8ED6DC',
|
|
2149
2149
|
borderWidth: '0.125rem',
|
|
2150
2150
|
cursor: 'pointer',
|
|
2151
2151
|
},
|