@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 CHANGED
@@ -190,6 +190,9 @@ const TEXT = {
190
190
  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!',
191
191
  };
192
192
  const NoQuotesMessage = ({ type }) => {
193
+ const { appConfigState: { appType }, } = mychoiceSdkStore.useStoreAppConfig();
194
+ if (appType === mychoiceSdkComponents.AppTypes.TheBig)
195
+ return null;
193
196
  return (jsxRuntime.jsxs("div", { className: "offer-section mychoice", children: [jsxRuntime.jsx("div", { style: { width: '100%' }, children: jsxRuntime.jsx("img", { src: logo, alt: "My Choice", style: { width: '120px' } }) }), jsxRuntime.jsx("p", { children: jsxRuntime.jsx("h3", { style: { whiteSpace: 'normal' }, children: TITLE[type] }) }), jsxRuntime.jsx("p", { style: { lineHeight: '1.25rem' }, children: TEXT[type] })] }));
194
197
  };
195
198
 
@@ -1529,7 +1532,7 @@ const PageDriver = () => {
1529
1532
  React.useEffect(() => {
1530
1533
  setIsRender(true);
1531
1534
  }, [isRender]);
1532
- return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabDriver, { createItem: createDriver }), jsxRuntime.jsxs("div", { className: "form-section-container", children: [isRender && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionDriverInfo, {}), jsxRuntime.jsx(SectionDriverLicence, {}), jsxRuntime.jsx(SectionDriverInsurancePolicy, {}), jsxRuntime.jsx(SectionDriverCancellation, {}), jsxRuntime.jsx(SectionDriverHistory, {}), jsxRuntime.jsx(HonestyMessage, {})] })), appType === mychoiceSdkComponents.AppTypes.TheBig ? (jsxRuntime.jsx(NavigationBottomTheBig, { createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid })) : (jsxRuntime.jsx(NavigationBottom, { className: "mychoice", createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))] }), localIndex !== mychoiceSdkComponents.defaultLocalIndex && (jsxRuntime.jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" }))] }));
1535
+ return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabDriver, { createItem: createDriver }), jsxRuntime.jsxs("div", { className: "form-section-container", children: [isRender && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SectionDriverInfo, {}), jsxRuntime.jsx(SectionDriverLicence, {}), jsxRuntime.jsx(SectionDriverInsurancePolicy, {}), jsxRuntime.jsx(SectionDriverCancellation, {}), jsxRuntime.jsx(SectionDriverHistory, {}), appType === mychoiceSdkComponents.AppTypes.MyChoice && jsxRuntime.jsx(HonestyMessage, {})] })), appType === mychoiceSdkComponents.AppTypes.TheBig ? (jsxRuntime.jsx(NavigationBottomTheBig, { createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid })) : (jsxRuntime.jsx(NavigationBottom, { className: "mychoice", createItem: createDriver, formSteps: formSteps[mychoiceSdkComponents.InsuranceTypes.Car], itemCount: items.length, validateForm: validateForm, formIsValid: driverFormIsValid }))] }), localIndex !== mychoiceSdkComponents.defaultLocalIndex && (jsxRuntime.jsx("img", { className: "logo-for-partner", src: myChoicePartnerLogo, alt: "partner logo" }))] }));
1533
1536
  };
1534
1537
 
1535
1538
  const BlockVehLinks = () => {
@@ -1955,7 +1958,7 @@ const SectionAddress = () => {
1955
1958
  const { getPostal } = mychoiceSdkStore.useHandlerPostal(insuranceType);
1956
1959
  const { postalState: { item, inValidation }, dispatchPostalState, } = mychoiceSdkStore.useStoreFormHomePostal();
1957
1960
  const { dispatchApplicantBaseState } = mychoiceSdkStore.useStoreFormHomeApplicantBase();
1958
- const { streetAddress = '', postalCode = '', addressObject, errorMessage, } = item;
1961
+ const { streetAddress = '', postalCode = '', addressObject, errorMessage } = item;
1959
1962
  const navigate = reactRouterDom.useNavigate();
1960
1963
  const asyncSelectRef = React.useRef(null);
1961
1964
  const isMychoice = appType === mychoiceSdkComponents.AppTypes.MyChoice;
@@ -2056,7 +2059,7 @@ const SectionAddress = () => {
2056
2059
  console.error(error);
2057
2060
  });
2058
2061
  };
2059
- const handleOwnerTypeChange = ({ value: typeValue, }) => {
2062
+ const handleOwnerTypeChange = ({ value: typeValue }) => {
2060
2063
  dispatchDwellingState({
2061
2064
  type: mychoiceSdkStore.StoreFormHomeDwellingActionTypes.FormHomeDwellingClear,
2062
2065
  payload: { type: typeValue },
@@ -2137,7 +2140,7 @@ const SectionAddress = () => {
2137
2140
  const placeholderText = 'Type in Your Street Address';
2138
2141
  return (jsxRuntime.jsxs("div", { className: `form-section ${mychoiceCls}`, children: [jsxRuntime.jsx("h2", { className: "section-title", children: " Where do you reside and thrive? " }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.homeOwnerTypeOptions, name: "ownerType", onChange: handleOwnerTypeChange, defaultValue: insuranceType, title: "Type of Insurance", placeholder: "Select Type of Insurance", error: !insuranceType && inValidation, errorMessage: getErrorMessage(insuranceType, inValidation) }), jsxRuntime.jsxs("div", { className: "input-form-box-container", children: [jsxRuntime.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." }), jsxRuntime.jsx(GooglePlacesAutocomplete__default["default"], { autocompletionRequest: {
2139
2142
  componentRestrictions: { country: 'ca' },
2140
- }, apiKey: "AIzaSyCzQKD3HwxCezMrPsS4q_xFQ3g3TS4u1nY", selectProps: {
2143
+ }, apiKey: process.env.REACT_APP_HOME_SEARCH_GOOGLE_API_KEY, selectProps: {
2141
2144
  value: addressObject,
2142
2145
  onChange: handleAddressChange,
2143
2146
  placeholder: placeholderText,
@@ -2145,17 +2148,14 @@ const SectionAddress = () => {
2145
2148
  styles: {
2146
2149
  control: (baseStyles, state) => ({
2147
2150
  ...baseStyles,
2148
- borderColor: getErrorMessage(streetAddress && postalCode, inValidation) ||
2149
- errorMessage
2151
+ borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage
2150
2152
  ? 'red'
2151
2153
  : getBorderColor(state.isFocused),
2152
2154
  borderRadius: isMychoice ? '0.625rem' : '0.25rem',
2153
2155
  boxShadow: 'none',
2154
2156
  height: '3.75rem',
2155
2157
  ':hover': {
2156
- borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage
2157
- ? 'red'
2158
- : '#8ED6DC',
2158
+ borderColor: getErrorMessage(streetAddress && postalCode, inValidation) || errorMessage ? 'red' : '#8ED6DC',
2159
2159
  borderWidth: '0.125rem',
2160
2160
  cursor: 'pointer',
2161
2161
  },