@mychoice/mychoice-sdk-modules 2.2.19 → 2.2.21
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 +17 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +17 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +4 -4
package/dist/esm/index.js
CHANGED
|
@@ -900,7 +900,9 @@ const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, selectAll
|
|
|
900
900
|
setLocalSelected([...allValues]);
|
|
901
901
|
}
|
|
902
902
|
};
|
|
903
|
-
return (jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxs("div", { className: "ab-modal-header", children: [jsx("h3", { children: "Accident Benefits" }), jsx("p", { className: "ab-modal-subtitle", children:
|
|
903
|
+
return (jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxs("div", { className: "ab-modal-header", children: [jsx("h3", { children: "Accident Benefits" }), jsx("p", { className: "ab-modal-subtitle", children: isMyChoice ? 'Standard Coverage + Optional Enhancements' : 'Standard Coverage + Self-Selected Optional Enhancements' }), jsx("p", { className: "ab-modal-body-text", children: isMyChoice
|
|
904
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
905
|
+
: 'Base coverage with flexibility to select additional benefits' })] }), jsxs("div", { className: "ab-modal-content", children: [jsxs("div", { className: "ab-modal-standard-block ab-modal-standard-block--included", children: [jsxs("div", { className: "ab-modal-standard-included-header", children: [jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, className: "ab-modal-standard-locked-checkbox" }), jsx("h4", { children: isMyChoice ? 'All Coverages Included by Default' : 'Standard Benefits — Included' })] }), !isMyChoice && (jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" })), jsx("p", { className: "ab-modal-standard-description", children: isMyChoice ? (jsxs(Fragment, { children: ["Our standard quote automatically includes all optional accident benefits at their minimum coverage limits. We strongly recommend keeping all coverages selected to ensure the most complete protection \u2014 opting out could leave you without critical support when you need it most. For example, deselecting Income Replacement means no weekly payments if an injury prevents you from working, and removing Caregiver Replacement leaves no financial support for dependents in your care.", jsx("br", {}), jsx("br", {}), "Please speak with a broker partner to discuss higher limits or learn more about how each benefit protects you."] })) : ('Covers medical expenses, therapy and personal care for injuries from an accident, including doctor visits and physiotherapy.') })] }), jsxs("div", { className: "ab-modal-optional-block", children: [jsxs("label", { className: "ab-modal-select-all", children: [jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsx("span", { children: "Select All Additional Benefits" })] }), jsx("div", { className: "ab-modal-options", children: accidentBenefitsOptionalOptions.map((option) => (jsxs("label", { className: "ab-modal-option", children: [jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxs("div", { className: "ab-modal-option-text", children: [jsx("strong", { children: option.name }), jsx("span", { children: option.description })] })] }, option.value))) }), jsxs("div", { className: "ab-modal-minimum-notice", children: [jsx("strong", { children: "Minimum Limits Apply" }), jsx("p", { children: "All optional benefits selected below will be quoted at their minimum coverage limits. Please speak with your broker if you wish to discuss higher limits." })] })] })] }), jsxs("div", { className: "ab-modal-actions", children: [jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
|
|
904
906
|
};
|
|
905
907
|
|
|
906
908
|
const allAccidentBenefitsCoverageValues = accidentBenefitsOptionalOptions.map((option) => option.value);
|
|
@@ -962,7 +964,13 @@ const VehicleSectionAccidentBenefits = () => {
|
|
|
962
964
|
setModalOpen(false);
|
|
963
965
|
};
|
|
964
966
|
const hasError = !accidentbenefits.abAcknowledged && vehicleState.inValidation;
|
|
965
|
-
return (jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsx(LabelFormBox, { name: "accident-benefits", title: "Accident Benefits" }), jsxs("div", { className: "ab-notice-banner", children: [jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsx("p", { children:
|
|
967
|
+
return (jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsx(LabelFormBox, { name: "accident-benefits", title: "Accident Benefits" }), jsxs("div", { className: "ab-notice-banner", children: [jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsx("p", { children: isMyChoice
|
|
968
|
+
? 'As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional. Our standard quote automatically includes all optional accident benefits at their minimum coverage limits.'
|
|
969
|
+
: 'As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs.' })] }), jsxs("div", { className: `ab-option-selector${hasError ? ' ab-option-selector--error' : ''}`, role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (e) => e.key === 'Enter' && setModalOpen(true), children: [jsxs("div", { className: "ab-option-selector-content", children: [jsx("strong", { children: isMyChoice
|
|
970
|
+
? 'Standard Mandatory Accident Benefits + Optional Enhancements'
|
|
971
|
+
: 'Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements' }), jsx("p", { children: isMyChoice
|
|
972
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
973
|
+
: 'Base coverage with flexibility to select additional benefits' }), jsx("p", { className: "ab-option-selector-hint", children: "Selecting this option will open a window displaying all available optional Accident Benefits, which you may individually select based on your needs. Each selected benefit will be quoted at its minimum limit." })] }), jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false), selectAllByDefault: isMyChoice }))] }));
|
|
966
974
|
};
|
|
967
975
|
|
|
968
976
|
const VehicleSectionCoverage = () => {
|
|
@@ -2165,7 +2173,13 @@ const SectionQuoteRecalc$1 = () => {
|
|
|
2165
2173
|
? 'Your premium has been recalculated. Your broker has been notified and will contact you to discuss your Accident Benefits selections.'
|
|
2166
2174
|
: 'Your premium has been recalculated.';
|
|
2167
2175
|
}
|
|
2168
|
-
return (jsxs("div", { className: "form-container", children: [jsx(TabVehicle, { readOnly: true }), jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsx(SelectFormBox, { options: coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "Comprehensive coverage", description: "This deductible is the amount of money that you will pay out of your own pocket if your vehicle is damaged in events not covered by collision coverage. This includes events such as falling or flying objects, vandalism, and theft. Your insurance company covers the cost of repair minus the deductible chosen.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsx(SelectFormBox, { options: coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(coverageOptions, collision.coverage ? collision.deductible : 0), title: "Collision coverage", description: "This deductible is the specific dollar amount you will pay out of your own pocket if your vehicle is damaged in an accident. Your insurance company covers the remaining amount.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsx(SelectFormBox, { options: liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "Third Party Liability", description: "This protects you from lawsuits resulting from accidents causing bodily injury or death to others or property damage.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), isAbReformActive && (jsxs("div", { className: "accident-benefits-container", children: [jsx(LabelFormBox, { name: "accident-benefits-recalc", title: "Accident Benefits" }), jsxs("div", { className: "ab-notice-banner", children: [jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsx("p", { children:
|
|
2176
|
+
return (jsxs("div", { className: "form-container", children: [jsx(TabVehicle, { readOnly: true }), jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsx(SelectFormBox, { options: coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(coverageOptions, comprehensive.coverage ? comprehensive.deductible : 0), title: "Comprehensive coverage", description: "This deductible is the amount of money that you will pay out of your own pocket if your vehicle is damaged in events not covered by collision coverage. This includes events such as falling or flying objects, vandalism, and theft. Your insurance company covers the cost of repair minus the deductible chosen.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsx(SelectFormBox, { options: coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(coverageOptions, collision.coverage ? collision.deductible : 0), title: "Collision coverage", description: "This deductible is the specific dollar amount you will pay out of your own pocket if your vehicle is damaged in an accident. Your insurance company covers the remaining amount.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), jsx(SelectFormBox, { options: liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(liabilityOptions, liability.coverage ? liability.limit : 1000000), title: "Third Party Liability", description: "This protects you from lawsuits resulting from accidents causing bodily injury or death to others or property damage.", placeholder: "Select from the list", autoSelectIfValueIsOutOfOptions: false }), isAbReformActive && (jsxs("div", { className: "accident-benefits-container", children: [jsx(LabelFormBox, { name: "accident-benefits-recalc", title: "Accident Benefits" }), jsxs("div", { className: "ab-notice-banner", children: [jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsx("p", { children: mychoiceCls === 'mychoice'
|
|
2177
|
+
? 'As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional. Our standard quote automatically includes all optional accident benefits at their minimum coverage limits.'
|
|
2178
|
+
: 'As of July 1, 2026, significant changes have been made to the Accident Benefits coverage in Ontario. Many benefits that were previously included are now optional and must be selected based on your individual needs.' })] }), jsxs("div", { className: "ab-option-selector", role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (event) => event.key === 'Enter' && setModalOpen(true), children: [jsxs("div", { className: "ab-option-selector-content", children: [jsx("strong", { children: mychoiceCls === 'mychoice'
|
|
2179
|
+
? 'Standard Mandatory Accident Benefits + Optional Enhancements'
|
|
2180
|
+
: 'Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements' }), jsx("p", { children: mychoiceCls === 'mychoice'
|
|
2181
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
2182
|
+
: 'Base coverage with flexibility to select additional benefits' })] }), jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false), selectAllByDefault: mychoiceCls === 'mychoice' }))] })), isAbReformActive && abPendingRecalc && !isRecalcSubmitted && (jsx("p", { className: "accident-benefits-recalc-pending", children: "Your Accident Benefits selections have been updated. Click Recalculate to update your premium." })), jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
|
|
2169
2183
|
recalcInitiatedRef.current = true;
|
|
2170
2184
|
setAbPendingRecalc(false);
|
|
2171
2185
|
emitAbPendingRecalc(false);
|