@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/cjs/index.js
CHANGED
|
@@ -910,7 +910,9 @@ const AccidentBenefitsModal = ({ selectedCoverages, onApply, onCancel, selectAll
|
|
|
910
910
|
setLocalSelected([...allValues]);
|
|
911
911
|
}
|
|
912
912
|
};
|
|
913
|
-
return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children:
|
|
913
|
+
return (jsxRuntime.jsx("div", { className: "ab-modal-overlay", onClick: onCancel, children: jsxRuntime.jsxs("div", { className: "ab-modal", onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: "ab-modal-header", children: [jsxRuntime.jsx("h3", { children: "Accident Benefits" }), jsxRuntime.jsx("p", { className: "ab-modal-subtitle", children: isMyChoice ? 'Standard Coverage + Optional Enhancements' : 'Standard Coverage + Self-Selected Optional Enhancements' }), jsxRuntime.jsx("p", { className: "ab-modal-body-text", children: isMyChoice
|
|
914
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
915
|
+
: 'Base coverage with flexibility to select additional benefits' })] }), jsxRuntime.jsxs("div", { className: "ab-modal-content", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-block ab-modal-standard-block--included", children: [jsxRuntime.jsxs("div", { className: "ab-modal-standard-included-header", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: true, disabled: true, readOnly: true, className: "ab-modal-standard-locked-checkbox" }), jsxRuntime.jsx("h4", { children: isMyChoice ? 'All Coverages Included by Default' : 'Standard Benefits — Included' })] }), !isMyChoice && (jsxRuntime.jsx("p", { className: "ab-modal-standard-subtitle", children: "Medical, Rehabilitation, and Attendant Care" })), jsxRuntime.jsx("p", { className: "ab-modal-standard-description", children: isMyChoice ? (jsxRuntime.jsxs(jsxRuntime.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.", jsxRuntime.jsx("br", {}), jsxRuntime.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.') })] }), jsxRuntime.jsxs("div", { className: "ab-modal-optional-block", children: [jsxRuntime.jsxs("label", { className: "ab-modal-select-all", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: allSelected, onChange: handleSelectAll }), jsxRuntime.jsx("span", { children: "Select All Additional Benefits" })] }), jsxRuntime.jsx("div", { className: "ab-modal-options", children: mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => (jsxRuntime.jsxs("label", { className: "ab-modal-option", children: [jsxRuntime.jsx("input", { type: "checkbox", checked: localSelected.includes(option.value), onChange: () => handleToggle(option.value) }), jsxRuntime.jsxs("div", { className: "ab-modal-option-text", children: [jsxRuntime.jsx("strong", { children: option.name }), jsxRuntime.jsx("span", { children: option.description })] })] }, option.value))) }), jsxRuntime.jsxs("div", { className: "ab-modal-minimum-notice", children: [jsxRuntime.jsx("strong", { children: "Minimum Limits Apply" }), jsxRuntime.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." })] })] })] }), jsxRuntime.jsxs("div", { className: "ab-modal-actions", children: [jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-cancel", onClick: onCancel, children: "Cancel" }), jsxRuntime.jsx("button", { type: "button", className: "ab-modal-btn ab-modal-btn-apply", onClick: () => onApply(localSelected), children: "Apply" })] })] }) }));
|
|
914
916
|
};
|
|
915
917
|
|
|
916
918
|
const allAccidentBenefitsCoverageValues = mychoiceSdkComponents.accidentBenefitsOptionalOptions.map((option) => option.value);
|
|
@@ -972,7 +974,13 @@ const VehicleSectionAccidentBenefits = () => {
|
|
|
972
974
|
setModalOpen(false);
|
|
973
975
|
};
|
|
974
976
|
const hasError = !accidentbenefits.abAcknowledged && vehicleState.inValidation;
|
|
975
|
-
return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children:
|
|
977
|
+
return (jsxRuntime.jsxs("div", { id: "abAcknowledged", className: `form-section ab-section ${mychoiceCls}`, children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: isMyChoice
|
|
978
|
+
? '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.'
|
|
979
|
+
: '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.' })] }), jsxRuntime.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: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: isMyChoice
|
|
980
|
+
? 'Standard Mandatory Accident Benefits + Optional Enhancements'
|
|
981
|
+
: 'Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements' }), jsxRuntime.jsx("p", { children: isMyChoice
|
|
982
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
983
|
+
: 'Base coverage with flexibility to select additional benefits' }), jsxRuntime.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." })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleApply, onCancel: () => setModalOpen(false), selectAllByDefault: isMyChoice }))] }));
|
|
976
984
|
};
|
|
977
985
|
|
|
978
986
|
const VehicleSectionCoverage = () => {
|
|
@@ -2175,7 +2183,13 @@ const SectionQuoteRecalc$1 = () => {
|
|
|
2175
2183
|
? 'Your premium has been recalculated. Your broker has been notified and will contact you to discuss your Accident Benefits selections.'
|
|
2176
2184
|
: 'Your premium has been recalculated.';
|
|
2177
2185
|
}
|
|
2178
|
-
return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits-recalc", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children:
|
|
2186
|
+
return (jsxRuntime.jsxs("div", { className: "form-container", children: [jsxRuntime.jsx(TabVehicle, { readOnly: true }), jsxRuntime.jsxs("div", { className: `form-section edit-recalc-container ${mychoiceCls}`, children: [jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "comprehensive-coverage", onChange: handleComprehensiveChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.coverageOptions, name: "collision-coverage", onChange: handleCollisionChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 }), jsxRuntime.jsx(SelectFormBox, { options: mychoiceSdkComponents.liabilityOptions, name: "liability-limit", onChange: handleLiabilityChange, defaultValue: getSelectedOption(mychoiceSdkComponents.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 && (jsxRuntime.jsxs("div", { className: "accident-benefits-container", children: [jsxRuntime.jsx(LabelFormBox, { name: "accident-benefits-recalc", title: "Accident Benefits" }), jsxRuntime.jsxs("div", { className: "ab-notice-banner", children: [jsxRuntime.jsx("strong", { children: "Changes to Your Accident Benefits Selections (Effective July 1, 2026)" }), jsxRuntime.jsx("p", { children: mychoiceCls === 'mychoice'
|
|
2187
|
+
? '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.'
|
|
2188
|
+
: '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.' })] }), jsxRuntime.jsxs("div", { className: "ab-option-selector", role: "button", tabIndex: 0, onClick: () => setModalOpen(true), onKeyDown: (event) => event.key === 'Enter' && setModalOpen(true), children: [jsxRuntime.jsxs("div", { className: "ab-option-selector-content", children: [jsxRuntime.jsx("strong", { children: mychoiceCls === 'mychoice'
|
|
2189
|
+
? 'Standard Mandatory Accident Benefits + Optional Enhancements'
|
|
2190
|
+
: 'Standard Mandatory Accident Benefits + Self-Selected Optional Enhancements' }), jsxRuntime.jsx("p", { children: mychoiceCls === 'mychoice'
|
|
2191
|
+
? 'Maximum coverage with flexibility to remove additional benefits.'
|
|
2192
|
+
: 'Base coverage with flexibility to select additional benefits' })] }), jsxRuntime.jsx("span", { className: "ab-option-selector-arrow", children: "\u203A" })] }), modalOpen && (jsxRuntime.jsx(AccidentBenefitsModal, { selectedCoverages: accidentbenefits.additionalCoverages, onApply: handleModalApply, onCancel: () => setModalOpen(false), selectAllByDefault: mychoiceCls === 'mychoice' }))] })), isAbReformActive && abPendingRecalc && !isRecalcSubmitted && (jsxRuntime.jsx("p", { className: "accident-benefits-recalc-pending", children: "Your Accident Benefits selections have been updated. Click Recalculate to update your premium." })), jsxRuntime.jsx(BlockSubmit$2, { className: `${isTheBig ? 'thebig-bold' : 'mychoice'} recalculate`, label: "Recalculate Quote", buttonSize: mychoiceSdkComponents.SizeTypes.Medium, isRecalc: true, onSubmitClick: () => {
|
|
2179
2193
|
recalcInitiatedRef.current = true;
|
|
2180
2194
|
setAbPendingRecalc(false);
|
|
2181
2195
|
emitAbPendingRecalc(false);
|