@mychoice/mychoice-sdk-modules 2.1.43 → 2.1.45

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
@@ -251,8 +251,7 @@ HeaderMyChoiceMobile.defaultProps = {
251
251
  const LoaderVid = () => {
252
252
  const { appDeviceType } = mychoiceSdkStore.useStoreDeviceType();
253
253
  const isMobile = appDeviceType === mychoiceSdkComponents.DeviceTypes.Mobile;
254
- return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMobile ? jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp4", autoPlay: true, loop: true, muted: true, preload: "auto", style: { maxHeight: '300px' } })
255
- : jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp4", autoPlay: true, loop: true, muted: true, preload: "auto", style: { maxHeight: '400px' } }) }));
254
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: isMobile ? (jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp4", playsInline: true, autoPlay: true, loop: true, muted: true, preload: "auto", style: { maxHeight: '300px' } })) : (jsxRuntime.jsx("video", { src: "https://mychoice.ca/wp-content/uploads/2023/05/Pig-Video.mp4", playsInline: true, autoPlay: true, loop: true, muted: true, preload: "auto", style: { maxHeight: '400px' } })) }));
256
255
  };
257
256
 
258
257
  const LoaderPrimary = () => {
@@ -2938,10 +2937,11 @@ const PageHomeQuote = () => {
2938
2937
  }, phoneNumber: formatPhoneObject(brokerProfile.phone), redirectUrl: brokerProfile.redirectUrl || '', fulfillmentUrl: fulfillmentUrl })) }, index))) }))] })) }));
2939
2938
  };
2940
2939
 
2941
- const Description = () => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: jsxRuntime.jsx("p", { children: "There are two primary categories of life insurance policies: term life insurance and permanent life insurance." }) }), jsxRuntime.jsx("h4", { children: "Term Life Insurance Options" }), jsxRuntime.jsx("h5", { children: "Options include 10, 15, 20, 30-year plans" }), jsxRuntime.jsx("p", { children: "These policies provide coverage for a specific term of either 10, 15, 20, or 30 years. The premiums are consistent throughout the term. At the end of the term, policyholders have the choice to renew or convert their policy." }), jsxRuntime.jsx("h5", { children: "Coverage Until Ages 65, 70, 75" }), jsxRuntime.jsx("p", { children: "These are term life policies that extend coverage until the policyholder reaches the age of 65, 70, or 75. Premiums are consistent for the entirety of the policy's duration. However, renewal options are not available after reaching the specified age." }), jsxRuntime.jsx("h5", { children: "Coverage Until Age 100" }), jsxRuntime.jsx("p", { children: "Although it's sometimes categorized as a permanent life insurance plan, the Term to 100 plan is, in fact, a term life policy. This plan offers coverage until the policyholder reaches the age of 100 and cannot be renewed." }), jsxRuntime.jsx("h4", { children: "Permanent Life Insurance Options" }), jsxRuntime.jsx("h5", { children: "Universal Life Insurance" }), jsxRuntime.jsx("p", { children: "This policy is valid for the entirety of the policyholder's life and includes a cash value component. The premium can be modified by reducing the death benefit or utilizing the cash value within the plan. The premiums for this type of plan are typically higher than those for term life insurance." }), jsxRuntime.jsx("h5", { children: "Whole Life Insurance" }), jsxRuntime.jsx("p", { children: "This is a lifetime policy where the premiums are fixed and never increase (without exception). The policy also has a cash value feature, which the policyholder can borrow against in a tax-free manner. Similar to universal life insurance, the premiums for whole life insurance are generally higher than those for term life insurance." })] }));
2940
+ const Description = () => (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { children: jsxRuntime.jsx("p", { children: "There are two primary categories of life insurance policies: term life insurance and permanent life insurance." }) }), jsxRuntime.jsx("h4", { children: "Term Life Insurance Options" }), jsxRuntime.jsx("h5", { children: "Options include 15 - 40-year plans" }), jsxRuntime.jsx("p", { children: "These policies provide coverage for a specific term of either 15, 20, 25, 30, 35 or 40 years. The premiums are consistent throughout the term. At the end of the term, policyholders have the choice to renew or convert their policy." }), jsxRuntime.jsx("h5", { children: "Level Term Until Ages 65 - 80" }), jsxRuntime.jsx("p", { children: "These are term life policies that extend coverage until the policyholder reaches the age of 65, 70, 75 or 80. Premiums are consistent for the entirety of the policy's duration. However, renewal options are not available after reaching the specified age." }), jsxRuntime.jsx("h5", { children: "Term Until Age 100" }), jsxRuntime.jsx("p", { children: "Although it's sometimes categorized as a permanent life insurance plan, the Term to 100 plan is, in fact, a term life policy. This plan offers coverage until the policyholder reaches the age of 100 and cannot be renewed. For Guaranteed Life Pay premiums are guaranteed to remain level until age 100, providing lifelong coverage. 20 Pay is similar but you pay premiums for only 20 years. After 20 years, the policy is paid in full, and coverage continues until age 100." }), jsxRuntime.jsx("h4", { children: "Permanent Life Insurance Options" }), jsxRuntime.jsx("h5", { children: "Whole Life Insurance" }), jsxRuntime.jsx("p", { children: "This is a lifetime policy where the premiums are fixed and never increase (without exception). The policy also has a cash value feature, which the policyholder can borrow against in a tax-free manner. The premiums for this type of plan are typically higher than those for term life insurance." }), jsxRuntime.jsx("h5", { children: "Whole Life Guaranteed 10 - 25 Pay" }), jsxRuntime.jsx("p", { children: "Premiums are paid for a set period (10, 15, 20, or 25 years). After the payment period, the policy is paid in full, and coverage continues for life. This provides the advantage of shorter premium payment terms." }), jsxRuntime.jsx("h5", { children: "Whole Life Guaranteed Pay to 65" }), jsxRuntime.jsx("p", { children: "Premiums are paid until you reach age 65. After that, the policy is paid in full, and coverage continues for life." }), jsxRuntime.jsx("h5", { children: "Whole Life Guaranteed Life Pay" }), jsxRuntime.jsx("p", { children: "Premiums are paid for your entire life, offering consistent coverage and premium payments." }), jsxRuntime.jsx("h5", { children: "Universal Life Insurance" }), jsxRuntime.jsx("p", { children: "This policy is valid for the entirety of the policyholder's life and includes a cash value component. The premium can be modified by reducing the death benefit or utilizing the cash value within the plan. Similar to whole life insurance, the premiums for universal life insurance are generally higher than those for term life insurance." }), jsxRuntime.jsx("h5", { children: "T100 Minimum Premium" }), jsxRuntime.jsx("p", { children: "This refers to a Universal Life Insurance policy designed to have the lowest possible premium payment to keep the policy in force until age 100." }), jsxRuntime.jsx("h5", { children: "T100 Minimum Premium Pay to 65" }), jsxRuntime.jsx("p", { children: "Similar to \"T100 Minimum Premium\" but structured to have the minimum premium payments until age 65." }), jsxRuntime.jsx("h5", { children: "T100 Minimum Premium 10 - 20 Pay" }), jsxRuntime.jsx("p", { children: "Similar to above, but premiums are paid for a shorter period (10, 15 or 20 years) with the goal of keeping the policy in force until age 100. This option requires larger premium payments during the initial term." })] }));
2942
2941
  const SectionCoverage = () => {
2943
2942
  const { coverageState: { type, coverage, province, inValidation }, dispatchCoverageState, } = mychoiceSdkStore.useStoreFormLifeCoverage();
2944
2943
  const { appConfigState: { appType }, } = mychoiceSdkStore.useStoreAppConfig();
2944
+ const isMychoice = appType === mychoiceSdkComponents.AppTypes.MyChoice;
2945
2945
  const handleProvinceChange = ({ value }) => {
2946
2946
  dispatchCoverageState({
2947
2947
  type: mychoiceSdkStore.StoreFormLifeCoverageActionTypes.FormLifeProvinceSelect,
@@ -2960,8 +2960,13 @@ const SectionCoverage = () => {
2960
2960
  payload: { coverage: value },
2961
2961
  });
2962
2962
  };
2963
- const newLifeOptions = mychoiceSdkComponents.lifeInsuranceTypeOptions.filter((option) => option.name.includes('Year Level'));
2964
- const isMychoice = appType === mychoiceSdkComponents.AppTypes.MyChoice;
2963
+ const newLifeOptions = React.useMemo(() => {
2964
+ // Use different options for Ontario
2965
+ if (province === '9') {
2966
+ return mychoiceSdkComponents.lifeInsuranceOntarioTypeOptions;
2967
+ }
2968
+ return mychoiceSdkComponents.lifeInsuranceTypeOptions.filter((option) => option.name.includes('Year Level'));
2969
+ }, [isMychoice, province]);
2965
2970
  return (jsxRuntime.jsxs("div", { className: "form-section", children: [jsxRuntime.jsx("h2", { className: "section-title", style: { textAlign: 'center' }, children: "Get the coverage you need" }), jsxRuntime.jsx(SelectFormBox, { options: isMychoice ? mychoiceSdkComponents.lifeProvinceOptionsMC : mychoiceSdkComponents.lifeProvinceOptions, name: "province", onChange: handleProvinceChange, defaultValue: province, title: "Province", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !province && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: newLifeOptions, name: "type", onChange: handleLifeInsuranceTypeChange, defaultValue: type, title: "Type of Insurance", description: jsxRuntime.jsx(Description, {}), placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !type && inValidation, errorMessage: getErrorMessage(type, inValidation) }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.lifeCoverageOptions, name: "coverage", onChange: handleCoverageChange, defaultValue: coverage, title: "Required coverage", description: "The extent of coverage you need is determined by several factors,\n including your expenditure patterns, anticipated future expenses, yearly earnings,\n and so forth. Generally, individuals opt for a coverage amount that equals five\n times their current annual income before taxes. On an average,\n it is observed that Canadians choose a coverage amount of around $500,000.", placeholder: "Select", autoSelectIfValueIsOutOfOptions: false, error: !coverage && inValidation, errorMessage: getErrorMessage(coverage, inValidation) })] }));
2966
2971
  };
2967
2972