@newskit-render/my-account 7.143.1-766ef5871.1 → 7.143.1-a2a4fe282.15
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/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.d.ts +6 -0
- package/dist/cjs/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.js +66 -0
- package/dist/cjs/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.js.map +1 -0
- package/dist/cjs/Components/Elements/CancelSubscriptionModal/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/CancelSubscriptionModal/index.js +18 -0
- package/dist/cjs/Components/Elements/CancelSubscriptionModal/index.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationButtons/CancellationButtons.d.ts +7 -0
- package/dist/cjs/Components/Elements/CancellationButtons/CancellationButtons.js +43 -0
- package/dist/cjs/Components/Elements/CancellationButtons/CancellationButtons.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationButtons/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/CancellationButtons/index.js +18 -0
- package/dist/cjs/Components/Elements/CancellationButtons/index.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/CancellationPolicy.d.ts +13 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/CancellationPolicy.js +36 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/CancellationPolicy.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/index.js +6 -0
- package/dist/cjs/Components/Elements/CancellationPolicy/index.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.d.ts +19 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.js +42 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.js.map +1 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/index.js +6 -0
- package/dist/cjs/Components/Elements/CancellationReasonSelector/index.js.map +1 -0
- package/dist/cjs/Components/Elements/NewsletterCard/NewsletterCard.js +1 -1
- package/dist/cjs/Components/Elements/NewsletterCard/NewsletterCard.js.map +1 -1
- package/dist/cjs/Components/Elements/SectionListItem/SectionListItem.js +6 -5
- package/dist/cjs/Components/Elements/SectionListItem/SectionListItem.js.map +1 -1
- package/dist/cjs/Components/Elements/SectionListItem/types.d.ts +2 -0
- package/dist/cjs/Components/Elements/SunArticleCard/SunArticleCard.d.ts +23 -0
- package/dist/cjs/Components/Elements/SunArticleCard/SunArticleCard.js +39 -0
- package/dist/cjs/Components/Elements/SunArticleCard/SunArticleCard.js.map +1 -0
- package/dist/cjs/Components/Elements/SunArticleCard/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/SunArticleCard/index.js +6 -0
- package/dist/cjs/Components/Elements/SunArticleCard/index.js.map +1 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/SunArticleGrid.d.ts +12 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/SunArticleGrid.js +27 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/SunArticleGrid.js.map +1 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/index.js +6 -0
- package/dist/cjs/Components/Elements/SunArticleGrid/index.js.map +1 -0
- package/dist/cjs/Components/Elements/SunOfferCard/SunOfferCard.d.ts +21 -0
- package/dist/cjs/Components/Elements/SunOfferCard/SunOfferCard.js +38 -0
- package/dist/cjs/Components/Elements/SunOfferCard/SunOfferCard.js.map +1 -0
- package/dist/cjs/Components/Elements/SunOfferCard/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/SunOfferCard/index.js +6 -0
- package/dist/cjs/Components/Elements/SunOfferCard/index.js.map +1 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/SunOfferGrid.d.ts +12 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/SunOfferGrid.js +27 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/SunOfferGrid.js.map +1 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/index.d.ts +1 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/index.js +6 -0
- package/dist/cjs/Components/Elements/SunOfferGrid/index.js.map +1 -0
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js +1 -5
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/cjs/Components/Sections/CancelSubscription/types.d.ts +0 -1
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js +9 -1
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/cjs/Components/Sections/CancellationOffers/types.d.ts +2 -1
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.d.ts +2 -1
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.js +15 -3
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.js.map +1 -1
- package/dist/cjs/Components/Sections/CardContentContainer/CardContentContainer.js +1 -1
- package/dist/cjs/Components/Sections/CardContentContainer/CardContentContainer.js.map +1 -1
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellation.d.ts +1 -18
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellation.js.map +1 -1
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.d.ts +2 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.js +59 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.js.map +1 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/index.d.ts +89 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/index.js +47 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/index.js.map +1 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +2 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +95 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +26 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.js +18 -0
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -0
- package/dist/cjs/Components/Sections/ContactSupport/ContactSupport.d.ts +1 -1
- package/dist/cjs/Components/Sections/ContactSupport/ContactSupport.js +4 -4
- package/dist/cjs/Components/Sections/ContactSupport/ContactSupport.js.map +1 -1
- package/dist/cjs/Components/Sections/ContactSupport/types.d.ts +2 -2
- package/dist/cjs/Components/Sections/ContentContainer/BelowContentExtra.js +1 -1
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js +99 -55
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- package/dist/cjs/Components/Sections/ContentContainer/PaginationButton.d.ts +11 -0
- package/dist/cjs/Components/Sections/ContentContainer/{InvoiceHistoryButton.js → PaginationButton.js} +13 -16
- package/dist/cjs/Components/Sections/ContentContainer/PaginationButton.js.map +1 -0
- package/dist/cjs/Components/Sections/ContentContainer/types.d.ts +4 -3
- package/dist/cjs/Components/Sections/Form/Vouchers/Vouchers.js +1 -1
- package/dist/cjs/Components/Sections/Form/Vouchers/Vouchers.js.map +1 -1
- package/dist/cjs/Components/Sections/NavigationSecondary/NavigationSecondary.js +1 -0
- package/dist/cjs/Components/Sections/NavigationSecondary/NavigationSecondary.js.map +1 -1
- package/dist/cjs/Components/Sections/SectionContainer/ListSection.js +1 -11
- package/dist/cjs/Components/Sections/SectionContainer/ListSection.js.map +1 -1
- package/dist/cjs/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/cjs/Components/Sections/SectionContainer/utils.js +6 -7
- package/dist/cjs/Components/Sections/SectionContainer/utils.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/BaseSection.d.ts +3 -0
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js +3 -13
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/NewslettersSection.js +1 -1
- package/dist/cjs/Components/Sections/UserHub/NewslettersSection.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.d.ts +6 -0
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.js +54 -0
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.js.map +1 -0
- package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +58 -3
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +14 -12
- package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/cjs/Components/Templates/DisplayRenderer.js +1 -1
- package/dist/cjs/Components/Templates/DisplayRenderer.js.map +1 -1
- package/dist/cjs/Components/Templates/SubscriptionAndBillingRender.js +9 -1
- package/dist/cjs/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/cjs/Components/Templates/SunCancellationFlowRender.d.ts +3 -0
- package/dist/cjs/Components/Templates/SunCancellationFlowRender.js +124 -0
- package/dist/cjs/Components/Templates/SunCancellationFlowRender.js.map +1 -0
- package/dist/cjs/Components/Templates/UserHubRender.js +17 -5
- package/dist/cjs/Components/Templates/UserHubRender.js.map +1 -1
- package/dist/cjs/Components/index.d.ts +1 -0
- package/dist/cjs/context/index.d.ts +3 -2
- package/dist/cjs/context/index.js +1 -0
- package/dist/cjs/context/index.js.map +1 -1
- package/dist/cjs/context/types.d.ts +30 -4
- package/dist/cjs/context/types.js +9 -1
- package/dist/cjs/context/types.js.map +1 -1
- package/dist/cjs/getProviderPropsTimes.js +13 -13
- package/dist/cjs/getProviderPropsTimes.js.map +1 -1
- package/dist/cjs/helpers/cancellationUtils.js +2 -1
- package/dist/cjs/helpers/cancellationUtils.js.map +1 -1
- package/dist/cjs/helpers/dataUtils.d.ts +5 -2
- package/dist/cjs/helpers/dataUtils.js +22 -13
- package/dist/cjs/helpers/dataUtils.js.map +1 -1
- package/dist/cjs/helpers/dateUtils.d.ts +1 -1
- package/dist/cjs/helpers/dateUtils.js +11 -8
- package/dist/cjs/helpers/dateUtils.js.map +1 -1
- package/dist/cjs/helpers/entitlementUtils.d.ts +2 -2
- package/dist/cjs/helpers/entitlementUtils.js +7 -4
- package/dist/cjs/helpers/entitlementUtils.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +2 -0
- package/dist/cjs/helpers/index.js +2 -0
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/providerUtilsTimes.js +2 -3
- package/dist/cjs/helpers/providerUtilsTimes.js.map +1 -1
- package/dist/cjs/helpers/randomizeReasons.d.ts +2 -0
- package/dist/cjs/helpers/randomizeReasons.js +37 -0
- package/dist/cjs/helpers/randomizeReasons.js.map +1 -0
- package/dist/cjs/helpers/subscriptionsUtils.d.ts +4 -1
- package/dist/cjs/helpers/subscriptionsUtils.js +29 -8
- package/dist/cjs/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/cjs/hooks/index.d.ts +1 -0
- package/dist/cjs/hooks/index.js +1 -0
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useCancelSubscriptionModal.d.ts +6 -0
- package/dist/cjs/hooks/useCancelSubscriptionModal.js +31 -0
- package/dist/cjs/hooks/useCancelSubscriptionModal.js.map +1 -0
- package/dist/cjs/index.d.ts +7 -2
- package/dist/cjs/index.js +5 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.js +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +653 -569
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/cjs/pages/HolidayStop/HolidayStopContext.js +1 -1
- package/dist/cjs/pages/HolidayStop/HolidayStopContext.js.map +1 -1
- package/dist/cjs/pages/HolidayStopList/HolidayStopListContext.js +1 -1
- package/dist/cjs/pages/HolidayStopList/HolidayStopListContext.js.map +1 -1
- package/dist/cjs/pages/Newsletters/NewslettersContext.js +3 -3
- package/dist/cjs/pages/Newsletters/NewslettersContext.js.map +1 -1
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +14 -2
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -1
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +46 -0
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlow.d.ts +7 -0
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlow.js +34 -0
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlow.js.map +1 -0
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlowContext.d.ts +215 -0
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlowContext.js +259 -0
- package/dist/cjs/pages/SunCancellationFlow/SunCancellationFlowContext.js.map +1 -0
- package/dist/cjs/pages/SunCancellationFlow/index.d.ts +2 -0
- package/dist/cjs/pages/SunCancellationFlow/index.js +19 -0
- package/dist/cjs/pages/SunCancellationFlow/index.js.map +1 -0
- package/dist/cjs/pages/UserHub/UserHubContext.js +65 -0
- package/dist/cjs/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/cjs/pages/types.d.ts +19 -1
- package/dist/cjs/providers/index.d.ts +1 -0
- package/dist/cjs/providers/index.js +1 -0
- package/dist/cjs/providers/index.js.map +1 -1
- package/dist/cjs/providers/sunCancellationProvider.d.ts +1 -0
- package/dist/cjs/providers/sunCancellationProvider.js +6 -0
- package/dist/cjs/providers/sunCancellationProvider.js.map +1 -0
- package/dist/cjs/queries/getContractPhases.d.ts +1 -0
- package/dist/cjs/queries/getContractPhases.js +11 -0
- package/dist/cjs/queries/getContractPhases.js.map +1 -0
- package/dist/cjs/queries/getPropositionFeatures.d.ts +1 -0
- package/dist/cjs/queries/getPropositionFeatures.js +11 -0
- package/dist/cjs/queries/getPropositionFeatures.js.map +1 -0
- package/dist/cjs/queries/getUserGroupAccounts.js +1 -1
- package/dist/cjs/queries/getUserGroupAccounts.js.map +1 -1
- package/dist/cjs/queries/getUserIncentives.js +1 -1
- package/dist/cjs/queries/getUserIncentives.js.map +1 -1
- package/dist/cjs/queries/getUserSubscription.js +3 -1
- package/dist/cjs/queries/getUserSubscription.js.map +1 -1
- package/dist/cjs/queries/getUserWithNewsletters.js +4 -1
- package/dist/cjs/queries/getUserWithNewsletters.js.map +1 -1
- package/dist/cjs/queries/mutateSendFamilyMemberInvite.js +2 -1
- package/dist/cjs/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/dist/esm/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.d.ts +6 -0
- package/dist/esm/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.js +59 -0
- package/dist/esm/Components/Elements/CancelSubscriptionModal/CancelSubscriptionModal.js.map +1 -0
- package/dist/esm/Components/Elements/CancelSubscriptionModal/index.d.ts +1 -0
- package/dist/esm/Components/Elements/CancelSubscriptionModal/index.js +2 -0
- package/dist/esm/Components/Elements/CancelSubscriptionModal/index.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationButtons/CancellationButtons.d.ts +7 -0
- package/dist/esm/Components/Elements/CancellationButtons/CancellationButtons.js +36 -0
- package/dist/esm/Components/Elements/CancellationButtons/CancellationButtons.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationButtons/index.d.ts +1 -0
- package/dist/esm/Components/Elements/CancellationButtons/index.js +2 -0
- package/dist/esm/Components/Elements/CancellationButtons/index.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationPolicy/CancellationPolicy.d.ts +13 -0
- package/dist/esm/Components/Elements/CancellationPolicy/CancellationPolicy.js +29 -0
- package/dist/esm/Components/Elements/CancellationPolicy/CancellationPolicy.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationPolicy/index.d.ts +1 -0
- package/dist/esm/Components/Elements/CancellationPolicy/index.js +2 -0
- package/dist/esm/Components/Elements/CancellationPolicy/index.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.d.ts +19 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.js +35 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/CancellationReasonSelector.js.map +1 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/index.d.ts +1 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/index.js +2 -0
- package/dist/esm/Components/Elements/CancellationReasonSelector/index.js.map +1 -0
- package/dist/esm/Components/Elements/NewsletterCard/NewsletterCard.js +1 -1
- package/dist/esm/Components/Elements/NewsletterCard/NewsletterCard.js.map +1 -1
- package/dist/esm/Components/Elements/SectionListItem/SectionListItem.js +6 -5
- package/dist/esm/Components/Elements/SectionListItem/SectionListItem.js.map +1 -1
- package/dist/esm/Components/Elements/SectionListItem/types.d.ts +2 -0
- package/dist/esm/Components/Elements/SunArticleCard/SunArticleCard.d.ts +23 -0
- package/dist/esm/Components/Elements/SunArticleCard/SunArticleCard.js +32 -0
- package/dist/esm/Components/Elements/SunArticleCard/SunArticleCard.js.map +1 -0
- package/dist/esm/Components/Elements/SunArticleCard/index.d.ts +1 -0
- package/dist/esm/Components/Elements/SunArticleCard/index.js +2 -0
- package/dist/esm/Components/Elements/SunArticleCard/index.js.map +1 -0
- package/dist/esm/Components/Elements/SunArticleGrid/SunArticleGrid.d.ts +12 -0
- package/dist/esm/Components/Elements/SunArticleGrid/SunArticleGrid.js +20 -0
- package/dist/esm/Components/Elements/SunArticleGrid/SunArticleGrid.js.map +1 -0
- package/dist/esm/Components/Elements/SunArticleGrid/index.d.ts +1 -0
- package/dist/esm/Components/Elements/SunArticleGrid/index.js +2 -0
- package/dist/esm/Components/Elements/SunArticleGrid/index.js.map +1 -0
- package/dist/esm/Components/Elements/SunOfferCard/SunOfferCard.d.ts +21 -0
- package/dist/esm/Components/Elements/SunOfferCard/SunOfferCard.js +31 -0
- package/dist/esm/Components/Elements/SunOfferCard/SunOfferCard.js.map +1 -0
- package/dist/esm/Components/Elements/SunOfferCard/index.d.ts +1 -0
- package/dist/esm/Components/Elements/SunOfferCard/index.js +2 -0
- package/dist/esm/Components/Elements/SunOfferCard/index.js.map +1 -0
- package/dist/esm/Components/Elements/SunOfferGrid/SunOfferGrid.d.ts +12 -0
- package/dist/esm/Components/Elements/SunOfferGrid/SunOfferGrid.js +20 -0
- package/dist/esm/Components/Elements/SunOfferGrid/SunOfferGrid.js.map +1 -0
- package/dist/esm/Components/Elements/SunOfferGrid/index.d.ts +1 -0
- package/dist/esm/Components/Elements/SunOfferGrid/index.js +2 -0
- package/dist/esm/Components/Elements/SunOfferGrid/index.js.map +1 -0
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js +1 -5
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/types.d.ts +0 -1
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js +11 -3
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/esm/Components/Sections/CancellationOffers/types.d.ts +2 -1
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.d.ts +2 -1
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.js +13 -2
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.js.map +1 -1
- package/dist/esm/Components/Sections/CardContentContainer/CardContentContainer.js +2 -2
- package/dist/esm/Components/Sections/CardContentContainer/CardContentContainer.js.map +1 -1
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.d.ts +1 -18
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.js +1 -1
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.js.map +1 -1
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.d.ts +2 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.js +52 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.js.map +1 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/index.d.ts +89 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/index.js +40 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/index.js.map +1 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +2 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +88 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +26 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.js +2 -0
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -0
- package/dist/esm/Components/Sections/ContactSupport/ContactSupport.d.ts +1 -1
- package/dist/esm/Components/Sections/ContactSupport/ContactSupport.js +4 -4
- package/dist/esm/Components/Sections/ContactSupport/ContactSupport.js.map +1 -1
- package/dist/esm/Components/Sections/ContactSupport/types.d.ts +2 -2
- package/dist/esm/Components/Sections/ContentContainer/BelowContentExtra.js +1 -1
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js +100 -56
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- package/dist/esm/Components/Sections/ContentContainer/PaginationButton.d.ts +11 -0
- package/dist/esm/Components/Sections/ContentContainer/PaginationButton.js +37 -0
- package/dist/esm/Components/Sections/ContentContainer/PaginationButton.js.map +1 -0
- package/dist/esm/Components/Sections/ContentContainer/types.d.ts +4 -3
- package/dist/esm/Components/Sections/Form/Vouchers/Vouchers.js +2 -2
- package/dist/esm/Components/Sections/Form/Vouchers/Vouchers.js.map +1 -1
- package/dist/esm/Components/Sections/NavigationSecondary/NavigationSecondary.js +1 -0
- package/dist/esm/Components/Sections/NavigationSecondary/NavigationSecondary.js.map +1 -1
- package/dist/esm/Components/Sections/SectionContainer/ListSection.js +2 -12
- package/dist/esm/Components/Sections/SectionContainer/ListSection.js.map +1 -1
- package/dist/esm/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/esm/Components/Sections/SectionContainer/utils.js +6 -7
- package/dist/esm/Components/Sections/SectionContainer/utils.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/BaseSection.d.ts +3 -0
- package/dist/esm/Components/Sections/UserHub/BaseSection.js +2 -12
- package/dist/esm/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/NewslettersSection.js +1 -1
- package/dist/esm/Components/Sections/UserHub/NewslettersSection.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.d.ts +6 -0
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.js +47 -0
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.js.map +1 -0
- package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +58 -3
- package/dist/esm/Components/Templates/CancellationStepperRender.js +14 -12
- package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/esm/Components/Templates/DisplayRenderer.js +1 -1
- package/dist/esm/Components/Templates/DisplayRenderer.js.map +1 -1
- package/dist/esm/Components/Templates/SubscriptionAndBillingRender.js +10 -2
- package/dist/esm/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/esm/Components/Templates/SunCancellationFlowRender.d.ts +3 -0
- package/dist/esm/Components/Templates/SunCancellationFlowRender.js +99 -0
- package/dist/esm/Components/Templates/SunCancellationFlowRender.js.map +1 -0
- package/dist/esm/Components/Templates/UserHubRender.js +17 -5
- package/dist/esm/Components/Templates/UserHubRender.js.map +1 -1
- package/dist/esm/Components/index.d.ts +1 -0
- package/dist/esm/context/index.d.ts +3 -2
- package/dist/esm/context/index.js +1 -0
- package/dist/esm/context/index.js.map +1 -1
- package/dist/esm/context/types.d.ts +30 -4
- package/dist/esm/context/types.js +8 -0
- package/dist/esm/context/types.js.map +1 -1
- package/dist/esm/getProviderPropsTimes.js +13 -13
- package/dist/esm/getProviderPropsTimes.js.map +1 -1
- package/dist/esm/helpers/cancellationUtils.js +2 -1
- package/dist/esm/helpers/cancellationUtils.js.map +1 -1
- package/dist/esm/helpers/dataUtils.d.ts +5 -2
- package/dist/esm/helpers/dataUtils.js +16 -8
- package/dist/esm/helpers/dataUtils.js.map +1 -1
- package/dist/esm/helpers/dateUtils.d.ts +1 -1
- package/dist/esm/helpers/dateUtils.js +9 -6
- package/dist/esm/helpers/dateUtils.js.map +1 -1
- package/dist/esm/helpers/entitlementUtils.d.ts +2 -2
- package/dist/esm/helpers/entitlementUtils.js +7 -4
- package/dist/esm/helpers/entitlementUtils.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +2 -0
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/esm/helpers/providerUtilsTimes.js +2 -3
- package/dist/esm/helpers/providerUtilsTimes.js.map +1 -1
- package/dist/esm/helpers/randomizeReasons.d.ts +2 -0
- package/dist/esm/helpers/randomizeReasons.js +33 -0
- package/dist/esm/helpers/randomizeReasons.js.map +1 -0
- package/dist/esm/helpers/subscriptionsUtils.d.ts +4 -1
- package/dist/esm/helpers/subscriptionsUtils.js +26 -7
- package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/esm/hooks/index.d.ts +1 -0
- package/dist/esm/hooks/index.js +1 -0
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useCancelSubscriptionModal.d.ts +6 -0
- package/dist/esm/hooks/useCancelSubscriptionModal.js +27 -0
- package/dist/esm/hooks/useCancelSubscriptionModal.js.map +1 -0
- package/dist/esm/index.d.ts +7 -2
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +654 -570
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/esm/pages/HolidayStop/HolidayStopContext.js +1 -1
- package/dist/esm/pages/HolidayStop/HolidayStopContext.js.map +1 -1
- package/dist/esm/pages/HolidayStopList/HolidayStopListContext.js +1 -1
- package/dist/esm/pages/HolidayStopList/HolidayStopListContext.js.map +1 -1
- package/dist/esm/pages/Newsletters/NewslettersContext.js +3 -3
- package/dist/esm/pages/Newsletters/NewslettersContext.js.map +1 -1
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +14 -2
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -1
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +46 -0
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlow.d.ts +7 -0
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlow.js +27 -0
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlow.js.map +1 -0
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlowContext.d.ts +215 -0
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlowContext.js +256 -0
- package/dist/esm/pages/SunCancellationFlow/SunCancellationFlowContext.js.map +1 -0
- package/dist/esm/pages/SunCancellationFlow/index.d.ts +2 -0
- package/dist/esm/pages/SunCancellationFlow/index.js +3 -0
- package/dist/esm/pages/SunCancellationFlow/index.js.map +1 -0
- package/dist/esm/pages/UserHub/UserHubContext.js +65 -0
- package/dist/esm/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/esm/pages/types.d.ts +19 -1
- package/dist/esm/providers/index.d.ts +1 -0
- package/dist/esm/providers/index.js +1 -0
- package/dist/esm/providers/index.js.map +1 -1
- package/dist/esm/providers/sunCancellationProvider.d.ts +1 -0
- package/dist/esm/providers/sunCancellationProvider.js +2 -0
- package/dist/esm/providers/sunCancellationProvider.js.map +1 -0
- package/dist/esm/queries/getContractPhases.d.ts +1 -0
- package/dist/esm/queries/getContractPhases.js +8 -0
- package/dist/esm/queries/getContractPhases.js.map +1 -0
- package/dist/esm/queries/getPropositionFeatures.d.ts +1 -0
- package/dist/esm/queries/getPropositionFeatures.js +8 -0
- package/dist/esm/queries/getPropositionFeatures.js.map +1 -0
- package/dist/esm/queries/getUserGroupAccounts.js +1 -1
- package/dist/esm/queries/getUserGroupAccounts.js.map +1 -1
- package/dist/esm/queries/getUserIncentives.js +1 -1
- package/dist/esm/queries/getUserIncentives.js.map +1 -1
- package/dist/esm/queries/getUserSubscription.js +3 -1
- package/dist/esm/queries/getUserSubscription.js.map +1 -1
- package/dist/esm/queries/getUserWithNewsletters.js +4 -1
- package/dist/esm/queries/getUserWithNewsletters.js.map +1 -1
- package/dist/esm/queries/mutateSendFamilyMemberInvite.js +2 -1
- package/dist/esm/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/Components/Sections/ContentContainer/InvoiceHistoryButton.d.ts +0 -10
- package/dist/cjs/Components/Sections/ContentContainer/InvoiceHistoryButton.js.map +0 -1
- package/dist/esm/Components/Sections/ContentContainer/InvoiceHistoryButton.d.ts +0 -10
- package/dist/esm/Components/Sections/ContentContainer/InvoiceHistoryButton.js +0 -40
- package/dist/esm/Components/Sections/ContentContainer/InvoiceHistoryButton.js.map +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
var react_1 = __importStar(require("react"));
|
|
38
|
+
var shared_components_1 = require("@newskit-render/shared-components");
|
|
39
|
+
var context_1 = require("../../context");
|
|
40
|
+
var randomizeReasons_1 = require("../../helpers/randomizeReasons");
|
|
41
|
+
var types_1 = require("../../context/types");
|
|
42
|
+
var router_1 = require("next/router");
|
|
43
|
+
var newskit_1 = require("newskit");
|
|
44
|
+
var helpers_1 = require("../../helpers");
|
|
45
|
+
var CancellationReasonSelector_1 = require("../Elements/CancellationReasonSelector");
|
|
46
|
+
var CancellationPolicy_1 = require("../Elements/CancellationPolicy");
|
|
47
|
+
var SunOfferGrid_1 = require("../Elements/SunOfferGrid");
|
|
48
|
+
var SunArticleGrid_1 = require("../Elements/SunArticleGrid");
|
|
49
|
+
var SunCancellationFlowRender = function () {
|
|
50
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
51
|
+
var contextName = types_1.ContextName.SunCancellationFlow;
|
|
52
|
+
var _u = (0, context_1.useAccountContext)(contextName), header = _u.header, components = _u.components, componentSequence = _u.componentSequence, showBackButton = _u.showBackButton, userData = _u.userData, baseUrl = _u.baseUrl;
|
|
53
|
+
var router = (0, router_1.useRouter)();
|
|
54
|
+
var backButtonHref = (_a = header === null || header === void 0 ? void 0 : header.backButton) === null || _a === void 0 ? void 0 : _a.href;
|
|
55
|
+
var headerBackButtonProps = header === null || header === void 0 ? void 0 : header.backButton;
|
|
56
|
+
var type = ((_c = (_b = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.type) || 'Digital';
|
|
57
|
+
if (!type || !componentSequence[type])
|
|
58
|
+
return null;
|
|
59
|
+
var pagesInOrder = componentSequence[type];
|
|
60
|
+
var _v = (0, react_1.useState)(0), currentStepIndex = _v[0], setCurrentStepIndex = _v[1];
|
|
61
|
+
var _w = (0, react_1.useState)(''), selectedReasonId = _w[0], setSelectedReasonId = _w[1];
|
|
62
|
+
var daysUntilBilling = ((_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.billingDetails) === null || _f === void 0 ? void 0 : _f.nextBillCycleDate)
|
|
63
|
+
? Math.ceil((new Date(userData.subscriptions[0].billingDetails.nextBillCycleDate).getTime() -
|
|
64
|
+
new Date().getTime()) /
|
|
65
|
+
(1000 * 60 * 60 * 24))
|
|
66
|
+
: undefined;
|
|
67
|
+
var currentStepKey = pagesInOrder[currentStepIndex];
|
|
68
|
+
var componentProps = components[currentStepKey];
|
|
69
|
+
var originalReasons = (0, react_1.useMemo)(function () {
|
|
70
|
+
var _a;
|
|
71
|
+
var selectReasonComponent = (_a = componentProps === null || componentProps === void 0 ? void 0 : componentProps.childComponents) === null || _a === void 0 ? void 0 : _a.find(function (child) { return child.type === 'reasonSelector'; });
|
|
72
|
+
return (selectReasonComponent === null || selectReasonComponent === void 0 ? void 0 : selectReasonComponent.reasons) || [];
|
|
73
|
+
}, [componentProps]);
|
|
74
|
+
var _x = (0, react_1.useState)(originalReasons), randomizedReasons = _x[0], setRandomizedReasons = _x[1];
|
|
75
|
+
// Randomize only on client side after hydration otherwise SSR will mismatch and cause errors
|
|
76
|
+
(0, react_1.useEffect)(function () {
|
|
77
|
+
if (originalReasons.length > 0) {
|
|
78
|
+
setRandomizedReasons((0, randomizeReasons_1.randomizeCancellationReasons)(originalReasons));
|
|
79
|
+
}
|
|
80
|
+
}, [originalReasons]);
|
|
81
|
+
var handleBackBtn = function (event) {
|
|
82
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
83
|
+
if (currentStepIndex <= 0) {
|
|
84
|
+
router.push((0, helpers_1.replaceBaseURL)(baseUrl || '', backButtonHref));
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
setCurrentStepIndex(currentStepIndex - 1);
|
|
88
|
+
};
|
|
89
|
+
var handleNextStep = function () {
|
|
90
|
+
var nextIndex = currentStepIndex + 1;
|
|
91
|
+
if (nextIndex < pagesInOrder.length) {
|
|
92
|
+
setCurrentStepIndex(nextIndex);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
var shouldShowBackButton = (_g = componentProps === null || componentProps === void 0 ? void 0 : componentProps.showBackButton) !== null && _g !== void 0 ? _g : showBackButton;
|
|
96
|
+
return (react_1.default.createElement(react_1.default.Fragment, { "data-testid": "sun-cancellation-flow-container" },
|
|
97
|
+
shouldShowBackButton && headerBackButtonProps && (react_1.default.createElement(shared_components_1.BackButton, { backButton: __assign(__assign({}, headerBackButtonProps), { href: '' }), backButtonOverrides: header.backButtonOverrides, eventContext: __assign(__assign({}, headerBackButtonProps === null || headerBackButtonProps === void 0 ? void 0 : headerBackButtonProps.eventContext), { page_name: (_j = (_h = componentProps === null || componentProps === void 0 ? void 0 : componentProps.tealiumContext) === null || _h === void 0 ? void 0 : _h.context) === null || _j === void 0 ? void 0 : _j.page_name }), onClick: handleBackBtn })),
|
|
98
|
+
react_1.default.createElement(newskit_1.Stack, { flow: "vertical-stretch", stackDistribution: "flex-start", spaceStack: "space060" },
|
|
99
|
+
(componentProps === null || componentProps === void 0 ? void 0 : componentProps.header) && react_1.default.createElement(shared_components_1.Header, __assign({}, componentProps.header)),
|
|
100
|
+
(componentProps === null || componentProps === void 0 ? void 0 : componentProps.stepText) && (react_1.default.createElement(newskit_1.TextBlock, __assign({}, componentProps === null || componentProps === void 0 ? void 0 : componentProps.stepTextOverrides), componentProps.stepText)), (_k = componentProps === null || componentProps === void 0 ? void 0 : componentProps.childComponents) === null || _k === void 0 ? void 0 :
|
|
101
|
+
_k.map(function (child, index) {
|
|
102
|
+
if (child.type === 'reasonSelector' && child.reasons) {
|
|
103
|
+
return (react_1.default.createElement(CancellationReasonSelector_1.CancellationReasonSelector, { key: index, reasons: randomizedReasons, selectedReasonId: selectedReasonId, onSelect: setSelectedReasonId }));
|
|
104
|
+
}
|
|
105
|
+
if (child.type === 'policy') {
|
|
106
|
+
return (react_1.default.createElement(CancellationPolicy_1.CancellationPolicy, { key: index, title: child.policyTitle, message: child.policyMessage, daysUntilBilling: daysUntilBilling }));
|
|
107
|
+
}
|
|
108
|
+
if (child.type === 'offers' && child.offers) {
|
|
109
|
+
return react_1.default.createElement(SunOfferGrid_1.SunOfferGrid, { key: index, offers: child.offers });
|
|
110
|
+
}
|
|
111
|
+
if (child.type === 'articles' && child.articles) {
|
|
112
|
+
return react_1.default.createElement(SunArticleGrid_1.SunArticleGrid, { key: index, articles: child.articles });
|
|
113
|
+
}
|
|
114
|
+
return null;
|
|
115
|
+
}),
|
|
116
|
+
react_1.default.createElement(newskit_1.GridLayout, { columns: "1fr 1fr", columnGap: "space040", overrides: { marginBlockStart: 'space040', width: '100%' } },
|
|
117
|
+
react_1.default.createElement(newskit_1.Button, { size: ((_l = componentProps === null || componentProps === void 0 ? void 0 : componentProps.secondaryButton) === null || _l === void 0 ? void 0 : _l.size) || 'medium', href: ((_m = componentProps === null || componentProps === void 0 ? void 0 : componentProps.secondaryButton) === null || _m === void 0 ? void 0 : _m.href) || '', eventContext: (_o = componentProps === null || componentProps === void 0 ? void 0 : componentProps.secondaryButton) === null || _o === void 0 ? void 0 : _o.eventContext, eventOriginator: "secondary-button", overrides: { width: '100%' } }, (_p = componentProps === null || componentProps === void 0 ? void 0 : componentProps.secondaryButton) === null || _p === void 0 ? void 0 : _p.text),
|
|
118
|
+
react_1.default.createElement(newskit_1.Button, { size: ((_q = componentProps === null || componentProps === void 0 ? void 0 : componentProps.primaryButton) === null || _q === void 0 ? void 0 : _q.size) || 'medium', onClick: handleNextStep, eventContext: (_r = componentProps === null || componentProps === void 0 ? void 0 : componentProps.primaryButton) === null || _r === void 0 ? void 0 : _r.eventContext, eventOriginator: "primary-button", disabled: ((_s = componentProps === null || componentProps === void 0 ? void 0 : componentProps.childComponents) === null || _s === void 0 ? void 0 : _s.some(function (child) { return child.type === 'reasonSelector'; })) && !selectedReasonId, overrides: {
|
|
119
|
+
width: '100%',
|
|
120
|
+
stylePreset: 'buttonOutlinedPrimary',
|
|
121
|
+
} }, (_t = componentProps === null || componentProps === void 0 ? void 0 : componentProps.primaryButton) === null || _t === void 0 ? void 0 : _t.text)))));
|
|
122
|
+
};
|
|
123
|
+
exports.default = SunCancellationFlowRender;
|
|
124
|
+
//# sourceMappingURL=SunCancellationFlowRender.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SunCancellationFlowRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/SunCancellationFlowRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA2D;AAC3D,uEAAsE;AACtE,yCAAiD;AACjD,mEAA6E;AAC7E,6CAAqE;AACrE,sCAAuC;AACvC,mCAA8D;AAC9D,yCAA8C;AAE9C,qFAG+C;AAC/C,qEAAmE;AACnE,yDAAuD;AACvD,6DAA2D;AAI3D,IAAM,yBAAyB,GAAa;;IAC1C,IAAM,WAAW,GAAG,mBAAW,CAAC,mBAAmB,CAAA;IAE7C,IAAA,KAOF,IAAA,2BAAiB,EAAC,WAAW,CA0ChC,EAhDC,MAAM,YAAA,EACN,UAAU,gBAAA,EACV,iBAAiB,uBAAA,EACjB,cAAc,oBAAA,EACd,QAAQ,cAAA,EACR,OAAO,aA2CR,CAAA;IAED,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAC1B,IAAM,cAAc,GAAG,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,0CAAE,IAAI,CAAA;IAC/C,IAAM,qBAAqB,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,CAAA;IAEhD,IAAM,IAAI,GAAG,CAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,0CAAG,CAAC,CAAC,0CAAE,IAAI,KAAI,SAAS,CAAA;IAE5D,IAAI,CAAC,IAAI,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAA;IAElD,IAAM,YAAY,GAAG,iBAAiB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BAAgB,EAExB,SAAS,EAAE;wBACT,KAAK,EAAE,MAAM;wBACb,WAAW,EAAE,uBAAuB;qBACrC,IAEA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,aAAa,0CAAE,IAAI,CAC7B,CACE,CACP,CACO,CAClB,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,yBAAyB,CAAA"}
|
|
@@ -26,16 +26,28 @@ var newskit_1 = require("newskit");
|
|
|
26
26
|
var BaseSection_1 = require("../Sections/UserHub/BaseSection");
|
|
27
27
|
var NewslettersSection_1 = require("../../Components/Sections/UserHub/NewslettersSection");
|
|
28
28
|
var UpgradeSection_1 = require("../../Components/Sections/UserHub/UpgradeSection");
|
|
29
|
+
var SubscriptionDetailsSection_1 = require("../../Components/Sections/UserHub/SubscriptionDetailsSection");
|
|
30
|
+
var constants_1 = require("../../constants");
|
|
31
|
+
var helpers_1 = require("../../helpers");
|
|
32
|
+
var utils_1 = require("../../Components/Sections/SectionContainer/utils");
|
|
29
33
|
var StyledStackContainer = (0, newskit_1.styled)(newskit_1.Stack)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n ", ";\n\n ", " {\n ", ";\n }\n"], ["\n width: 100%;\n ", ";\n\n ", " {\n ", ";\n }\n"])), (0, newskit_1.getSpacingCssFromTheme)('gap', 'space060'), (0, newskit_1.getMediaQueryFromTheme)('sm'), (0, newskit_1.getSpacingCssFromTheme)('gap', 'space090'));
|
|
30
34
|
var UserHubRender = function () {
|
|
31
|
-
var _a;
|
|
35
|
+
var _a, _b, _c;
|
|
32
36
|
var contextName = types_1.ContextName.userHubPage;
|
|
33
|
-
var
|
|
34
|
-
var quickLinks = sections.quickLinks, helpAndSupport = sections.helpAndSupport, newslettersSection = sections.newsletters, upgradeSection = sections.upgrade;
|
|
37
|
+
var _d = (0, context_1.useAccountContext)(contextName), userData = _d.userData, baseUrl = _d.baseUrl, sections = _d.sections, featureFlags = _d.featureFlags;
|
|
38
|
+
var quickLinks = sections.quickLinks, helpAndSupport = sections.helpAndSupport, newslettersSection = sections.newsletters, upgradeSection = sections.upgrade, subscriptionDetails = sections.subscriptionDetails;
|
|
39
|
+
var showUserPayment = (0, helpers_1.hasPaymentData)(userData.subscriptions, featureFlags);
|
|
40
|
+
var isRegisteredUser = ((userData === null || userData === void 0 ? void 0 : userData.userCapabilities) || {}).isRegisteredUser;
|
|
41
|
+
var itemsToRender = (0, utils_1.filterList)((quickLinks === null || quickLinks === void 0 ? void 0 : quickLinks.items) || [], {
|
|
42
|
+
hasPaymentData: showUserPayment,
|
|
43
|
+
isRegisteredUser: isRegisteredUser,
|
|
44
|
+
});
|
|
45
|
+
var isActiveSubscription = ((_b = (_a = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.status) === constants_1.ACTIVE_SUBSCRIPTION;
|
|
35
46
|
return (react_1.default.createElement(StyledStackContainer, { flow: "vertical-stretch" },
|
|
36
|
-
quickLinks && react_1.default.createElement(BaseSection_1.BaseSection, __assign({}, quickLinks, { baseUrl: baseUrl })),
|
|
47
|
+
quickLinks && itemsToRender && (react_1.default.createElement(BaseSection_1.BaseSection, __assign({}, quickLinks, { items: itemsToRender, baseUrl: baseUrl }))),
|
|
48
|
+
(subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.showSection) && isActiveSubscription && (react_1.default.createElement(SubscriptionDetailsSection_1.SubscriptionDetailsSection, __assign({}, subscriptionDetails, { user: userData }))),
|
|
37
49
|
helpAndSupport && react_1.default.createElement(BaseSection_1.BaseSection, __assign({}, helpAndSupport, { baseUrl: baseUrl })),
|
|
38
|
-
newslettersSection && ((
|
|
50
|
+
newslettersSection && ((_c = userData === null || userData === void 0 ? void 0 : userData.newsletters) === null || _c === void 0 ? void 0 : _c.length) && (react_1.default.createElement(NewslettersSection_1.NewslettersSection, __assign({ newsletters: userData.newsletters, capabilities: userData.userCapabilities }, ((upgradeSection === null || upgradeSection === void 0 ? void 0 : upgradeSection.showUpgradeSection)
|
|
39
51
|
? { newslettersListOverrides: { marginBlockEnd: 'space000' } }
|
|
40
52
|
: {}), newslettersSection))),
|
|
41
53
|
(upgradeSection === null || upgradeSection === void 0 ? void 0 : upgradeSection.showUpgradeSection) && (react_1.default.createElement(UpgradeSection_1.UpgradeSection, __assign({}, upgradeSection)))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserHubRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/UserHubRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,yCAAwE;AACxE,6CAAiD;AACjD,mCAKgB;AAChB,+DAA6D;AAC7D,2FAAyF;AACzF,mFAAiF;
|
|
1
|
+
{"version":3,"file":"UserHubRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/UserHubRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,yCAAwE;AACxE,6CAAiD;AACjD,mCAKgB;AAChB,+DAA6D;AAC7D,2FAAyF;AACzF,mFAAiF;AACjF,2GAAyG;AACzG,6CAAqD;AACrD,yCAA8C;AAC9C,0EAA6E;AAE7E,IAAM,oBAAoB,GAAG,IAAA,gBAAM,EAAC,eAAK,CAAC,4HAAA,sBAEtC,EAAyC,SAEzC,EAA4B,UAC1B,EAAyC,UAE9C,KALG,IAAA,gCAAsB,EAAC,KAAK,EAAE,UAAU,CAAC,EAEzC,IAAA,gCAAsB,EAAC,IAAI,CAAC,EAC1B,IAAA,gCAAsB,EAAC,KAAK,EAAE,UAAU,CAAC,CAE9C,CAAA;AACM,IAAM,aAAa,GAAa;;IACrC,IAAM,WAAW,GAAG,mBAAW,CAAC,WAAW,CAAA;IACrC,IAAA,KAAgD,IAAA,2BAAiB,EACrE,WAAW,CACa,EAFlB,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,YAAY,kBAEvB,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BAAC,uCAAkB,aACjB,WAAW,EAAE,QAAQ,CAAC,WAAW,EACjC,YAAY,EAAE,QAAQ,CAAC,gBAAgB,IACnC,CAAC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,kBAAkB;YACrC,CAAC,CAAC,EAAE,wBAAwB,EAAE,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE;YAC9D,CAAC,CAAC,EAAE,CAAC,EACH,kBAAkB,EACtB,CACH;QACA,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,kBAAkB,KAAI,CACrC,8BAAC,+BAAc,eAAK,cAAc,EAAI,CACvC,CACoB,CACxB,CAAA;AACH,CAAC,CAAA;AAjDY,QAAA,aAAa,iBAiDzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentPageContextOptions, AccountLandingPageContextOptions, ContextProviderProps, EditFieldContextOptions, ContextOptions, BaseContextOptions, CancellationContextOptions, CancellationStepperContextOptions, ContextName, SubscriptionAndBillingContextOptions, HolidayStopContextOptions, AddFieldContextOption, PaymentMethodsContextOptions, NewslettersContextOptions, AccountDeletionContextOptions, ConfirmAccountDeletionContextOptions, FamilyContextOptions, UserHubContextOptions, BaseFormActions, UserHubSection, CancellationItem, UserHubUpgradeSection } from './types';
|
|
2
|
+
import { PaymentPageContextOptions, AccountLandingPageContextOptions, ContextProviderProps, EditFieldContextOptions, ContextOptions, BaseContextOptions, CancellationContextOptions, CancellationStepperContextOptions, ContextName, SubscriptionAndBillingContextOptions, HolidayStopContextOptions, AddFieldContextOption, PaymentMethodsContextOptions, NewslettersContextOptions, AccountDeletionContextOptions, ConfirmAccountDeletionContextOptions, FamilyContextOptions, UserHubContextOptions, BaseFormActions, UserHubSection, CancellationItem, UserHubUpgradeSection, UserHubSubscriptionDetailsSection } from './types';
|
|
3
3
|
import { baseContext, footer, navigationPrimary, sideNav } from './baseContext';
|
|
4
4
|
declare const contextMap: {
|
|
5
5
|
personalDetails: React.Context<AccountLandingPageContextOptions | null>;
|
|
@@ -21,8 +21,9 @@ declare const contextMap: {
|
|
|
21
21
|
confirmAccountDeletion: React.Context<ConfirmAccountDeletionContextOptions | null>;
|
|
22
22
|
family: React.Context<FamilyContextOptions | null>;
|
|
23
23
|
userHubPage: React.Context<UserHubContextOptions | null>;
|
|
24
|
+
SunCancellationFlow: React.Context<BaseContextOptions | null>;
|
|
24
25
|
};
|
|
25
26
|
type ContextOptionsUnion = typeof contextMap;
|
|
26
27
|
export declare const AccountContextProvider: React.FC<ContextProviderProps>;
|
|
27
28
|
export declare const useAccountContext: (contextName: ContextName) => ContextOptions;
|
|
28
|
-
export { type PaymentPageContextOptions, type EditFieldContextOptions, type BaseContextOptions, type AccountLandingPageContextOptions, type SubscriptionAndBillingContextOptions, type CancellationContextOptions, type CancellationStepperContextOptions, baseContext, footer, navigationPrimary, sideNav, type ContextOptions, type AddFieldContextOption, type PaymentMethodsContextOptions, type NewslettersContextOptions, type AccountDeletionContextOptions, type ConfirmAccountDeletionContextOptions, type FamilyContextOptions, type UserHubContextOptions, type BaseFormActions, type UserHubSection, type ContextOptionsUnion, type CancellationItem, type UserHubUpgradeSection, };
|
|
29
|
+
export { type PaymentPageContextOptions, type EditFieldContextOptions, type BaseContextOptions, type AccountLandingPageContextOptions, type SubscriptionAndBillingContextOptions, type CancellationContextOptions, type CancellationStepperContextOptions, baseContext, footer, navigationPrimary, sideNav, type ContextOptions, type AddFieldContextOption, type PaymentMethodsContextOptions, type NewslettersContextOptions, type AccountDeletionContextOptions, type ConfirmAccountDeletionContextOptions, type FamilyContextOptions, type UserHubContextOptions, type BaseFormActions, type UserHubSection, type ContextOptionsUnion, type CancellationItem, type UserHubUpgradeSection, type UserHubSubscriptionDetailsSection, };
|
|
@@ -56,6 +56,7 @@ var contextMap = (_a = {},
|
|
|
56
56
|
_a[types_1.ContextName.confirmAccountDeletion] = (0, react_1.createContext)(null),
|
|
57
57
|
_a[types_1.ContextName.family] = (0, react_1.createContext)(null),
|
|
58
58
|
_a[types_1.ContextName.userHubPage] = (0, react_1.createContext)(null),
|
|
59
|
+
_a[types_1.ContextName.SunCancellationFlow] = (0, react_1.createContext)(null),
|
|
59
60
|
_a);
|
|
60
61
|
var AccountContextProvider = function (_a) {
|
|
61
62
|
var context = _a.context, children = _a.children, contextName = _a.contextName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAiE;AACjE,8DAAgC;AAChC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAiE;AACjE,8DAAgC;AAChC,iCAwBgB;AAChB,6CAA+E;AAoE7E,4FApEO,yBAAW,OAoEP;AACX,uFArEoB,oBAAM,OAqEpB;AACN,kGAtE4B,+BAAiB,OAsE5B;AACjB,wFAvE+C,qBAAO,OAuE/C;AArET,IAAM,UAAU;IACd,GAAC,mBAAW,CAAC,eAAe,IAC1B,IAAA,qBAAa,EAA0C,IAAI,CAAC;IAC9D,GAAC,mBAAW,CAAC,sBAAsB,IACjC,IAAA,qBAAa,EAA8C,IAAI,CAAC;IAClE,GAAC,mBAAW,CAAC,WAAW,IAAG,IAAA,qBAAa,EACtC,IAAI,CACL;IACD,GAAC,mBAAW,CAAC,oBAAoB,IAC/B,IAAA,qBAAa,EAA0C,IAAI,CAAC;IAC9D,GAAC,mBAAW,CAAC,SAAS,IACpB,IAAA,qBAAa,EAA0C,IAAI,CAAC;IAC9D,GAAC,mBAAW,CAAC,OAAO,IAAG,IAAA,qBAAa,EAAmC,IAAI,CAAC;IAC5E,GAAC,mBAAW,CAAC,SAAS,IAAG,IAAA,qBAAa,EAAiC,IAAI,CAAC;IAC5E,GAAC,mBAAW,CAAC,YAAY,IAAG,IAAA,qBA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ATY,QAAA,sBAAsB,0BASlC;AAEM,IAAM,iBAAiB,GAAG,UAAC,WAAwB;IACxD,OAAA,IAAA,kBAAU,EAAC,UAAU,CAAC,WAAW,CAA4B,CAAC;AAA9D,CAA8D,CAAA;AADnD,QAAA,iBAAiB,qBACkC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { NavigationSecondaryInterface, NavigationSecondarySelected, NavigationSecondaryOverrides } from '../Components/Sections/NavigationSecondary';
|
|
3
3
|
import { ContentContainerProps } from '../Components/Sections/ContentContainer';
|
|
4
|
-
import { As, ListItemType, ListCellProps, ListItemProps, RequestHeaders, PastDueBannerType, TitleOverrides, DescriptionOverrides, FooterContext, FooterContextOverrides, HeaderProps, InputText, NavigationPrimaryProps, ButtonGroupProps, ModalProps, TealiumEventContext, EventContext, ContentContainerProps as SharedContentContainerProps, HolidayStopSubscriptionPolicyContent } from '@newskit-render/shared-components';
|
|
4
|
+
import { As, ListItemType, ListCellProps, ListItemProps, RequestHeaders, PastDueBannerType, TitleOverrides, DescriptionOverrides, FooterContext, FooterContextOverrides, HeaderProps, InputText, NavigationPrimaryProps, ButtonGroupProps, ModalProps, TealiumEventContext, EventContext, ContentContainerProps as SharedContentContainerProps, HolidayStopSubscriptionPolicyContent, BenefitsListItemProps } from '@newskit-render/shared-components';
|
|
5
5
|
import { MQ, InlineMessageProps, NewsKitIcon, InstrumentationEvent, StackProps, BaseFlagOverrides, NewsKitIconProps, TextBlockProps, ButtonLinkProps } from 'newskit';
|
|
6
6
|
import { HeadProps } from '../Components/Elements/Head';
|
|
7
7
|
import { UserData, Data } from '../pages/types';
|
|
@@ -23,10 +23,11 @@ import { CancelSubscriptionProps } from 'Components/Sections/CancelSubscription'
|
|
|
23
23
|
import { HandleCardClick, StepController } from '../Components/Templates/CancellationStepperRender';
|
|
24
24
|
import { GridLayoutProps } from 'Components/SharedTypes/GridLayoutProps';
|
|
25
25
|
import { CancelSubscriptionDowngradeProps } from '../Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade';
|
|
26
|
-
import { ConfirmCancellationStepProps } from '../Components/Sections/ConfirmCancellation
|
|
26
|
+
import { ConfirmCancellationStepProps } from '../Components/Sections/ConfirmCancellation';
|
|
27
27
|
import { CancellationDetailsContextProps } from '../Components/Sections/CancellationDetails';
|
|
28
28
|
import { DetailedFlags } from '@newskit-render/feature-flags';
|
|
29
29
|
import { CancellationOffersContextProps } from '../Components/Sections/CancellationOffers';
|
|
30
|
+
import { ConfirmSubscriptionOfferProps } from 'Components/Sections/ConfirmSubscriptionOffer';
|
|
30
31
|
import { ContactSupportContextProps } from '../Components/Sections/ContactSupport';
|
|
31
32
|
interface InfoPanel extends InlineMessageProps {
|
|
32
33
|
infoPanelCells?: MQ<number>;
|
|
@@ -164,7 +165,8 @@ export declare enum ContextName {
|
|
|
164
165
|
'confirmAccountDeletion' = "confirmAccountDeletion",
|
|
165
166
|
'family' = "family",
|
|
166
167
|
'userHubPage' = "userHubPage",
|
|
167
|
-
'CancellationStepper' = "CancellationStepper"
|
|
168
|
+
'CancellationStepper' = "CancellationStepper",
|
|
169
|
+
'SunCancellationFlow' = "SunCancellationFlow"
|
|
168
170
|
}
|
|
169
171
|
export interface BaseContextOptions {
|
|
170
172
|
navigationPrimary: NavigationPrimaryProps;
|
|
@@ -319,9 +321,14 @@ export interface ConfirmCancellationContextProps extends ConfirmCancellationStep
|
|
|
319
321
|
showBackButton?: boolean;
|
|
320
322
|
tealiumContext?: TealiumEventContext;
|
|
321
323
|
}
|
|
324
|
+
export interface ConfirmSubscriptionOfferContextProps extends ConfirmSubscriptionOfferProps {
|
|
325
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
326
|
+
showBackButton?: boolean;
|
|
327
|
+
tealiumContext?: TealiumEventContext;
|
|
328
|
+
}
|
|
322
329
|
export interface CancellationStepperContextOptions extends Partial<InteractiveContextOptions>, Partial<NonInteractiveContextOptions> {
|
|
323
330
|
containerOverrides?: GridLayoutProps;
|
|
324
|
-
components: Record<string, CancellationSection | DowngradeContextProps | ConfirmCancellationContextProps | CancellationDetailsContextProps | CancellationOffersContextProps | ContactSupportContextProps>;
|
|
331
|
+
components: Record<string, CancellationSection | DowngradeContextProps | ConfirmCancellationContextProps | CancellationDetailsContextProps | CancellationOffersContextProps | ConfirmSubscriptionOfferContextProps | ContactSupportContextProps>;
|
|
325
332
|
componentSequence: Record<string, string[]>;
|
|
326
333
|
showBackButton?: boolean;
|
|
327
334
|
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
@@ -768,6 +775,18 @@ export interface UserHubUpgradeSection {
|
|
|
768
775
|
};
|
|
769
776
|
button?: ButtonLinkProps;
|
|
770
777
|
}
|
|
778
|
+
export interface UserHubSubscriptionDetailsSection {
|
|
779
|
+
showSection: boolean;
|
|
780
|
+
header: HeaderProps;
|
|
781
|
+
containerOverrides?: GridLayoutProps;
|
|
782
|
+
cancelSubscriptionModal?: CancelSubscriptionProps['modal'];
|
|
783
|
+
benefits: {
|
|
784
|
+
showBenefits: boolean;
|
|
785
|
+
title: string;
|
|
786
|
+
items?: BenefitsListItemProps[];
|
|
787
|
+
};
|
|
788
|
+
cancelSubscription?: UserHubItemProps;
|
|
789
|
+
}
|
|
771
790
|
export interface UserHubContextOptions extends NonInteractiveContextOptions {
|
|
772
791
|
tealiumContext?: TealiumEventContext;
|
|
773
792
|
sections: {
|
|
@@ -775,6 +794,7 @@ export interface UserHubContextOptions extends NonInteractiveContextOptions {
|
|
|
775
794
|
helpAndSupport?: UserHubSection;
|
|
776
795
|
newsletters?: UserHubNewslettersSection;
|
|
777
796
|
upgrade?: UserHubUpgradeSection;
|
|
797
|
+
subscriptionDetails?: UserHubSubscriptionDetailsSection;
|
|
778
798
|
};
|
|
779
799
|
genericErrorMessage?: GenericMessageMap;
|
|
780
800
|
errorMessages?: MessageMap;
|
|
@@ -818,4 +838,10 @@ export type ContextNameProps = {
|
|
|
818
838
|
contextName: ContextName;
|
|
819
839
|
};
|
|
820
840
|
export type ContextOptions = HolidayStopContextOptions | PaymentPageContextOptions | AccountLandingPageContextOptions | CancellationContextOptions | EditFieldContextOptions | SubscriptionAndBillingContextOptions | BaseContextOptions | AddFieldContextOption | AccountDeletionContextOptions | ConfirmAccountDeletionContextOptions | CancellationStepperContextOptions;
|
|
841
|
+
export declare enum IncentiveType {
|
|
842
|
+
DISCOUNT = "Discount",
|
|
843
|
+
VOUCHER = "Voucher",
|
|
844
|
+
GIFT = "Gift",
|
|
845
|
+
NEW_PRODUCT = "New Product"
|
|
846
|
+
}
|
|
821
847
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FamilyMemberStatusTypes = exports.NewsletterNameId = exports.SubscriptionType = exports.SectionBillingType = exports.SectionTypes = exports.ContextName = void 0;
|
|
3
|
+
exports.IncentiveType = exports.FamilyMemberStatusTypes = exports.NewsletterNameId = exports.SubscriptionType = exports.SectionBillingType = exports.SectionTypes = exports.ContextName = void 0;
|
|
4
4
|
var ContextName;
|
|
5
5
|
(function (ContextName) {
|
|
6
6
|
ContextName["personalDetails"] = "personalDetails";
|
|
@@ -22,6 +22,7 @@ var ContextName;
|
|
|
22
22
|
ContextName["family"] = "family";
|
|
23
23
|
ContextName["userHubPage"] = "userHubPage";
|
|
24
24
|
ContextName["CancellationStepper"] = "CancellationStepper";
|
|
25
|
+
ContextName["SunCancellationFlow"] = "SunCancellationFlow";
|
|
25
26
|
})(ContextName || (exports.ContextName = ContextName = {}));
|
|
26
27
|
var SectionTypes;
|
|
27
28
|
(function (SectionTypes) {
|
|
@@ -75,4 +76,11 @@ var FamilyMemberStatusTypes;
|
|
|
75
76
|
FamilyMemberStatusTypes["ACTIVE"] = "ACTIVE";
|
|
76
77
|
FamilyMemberStatusTypes["AVAILABLE"] = "AVAILABLE";
|
|
77
78
|
})(FamilyMemberStatusTypes || (exports.FamilyMemberStatusTypes = FamilyMemberStatusTypes = {}));
|
|
79
|
+
var IncentiveType;
|
|
80
|
+
(function (IncentiveType) {
|
|
81
|
+
IncentiveType["DISCOUNT"] = "Discount";
|
|
82
|
+
IncentiveType["VOUCHER"] = "Voucher";
|
|
83
|
+
IncentiveType["GIFT"] = "Gift";
|
|
84
|
+
IncentiveType["NEW_PRODUCT"] = "New Product";
|
|
85
|
+
})(IncentiveType || (exports.IncentiveType = IncentiveType = {}));
|
|
78
86
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/context/types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/context/types.ts"],"names":[],"mappings":";;;AAkNA,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,kDAAqC,CAAA;IACrC,gEAAmD,CAAA;IACnD,0CAA6B,CAAA;IAC7B,4DAA+C,CAAA;IAC/C,kCAAqB,CAAA;IACrB,sCAAyB,CAAA;IACzB,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,8BAAiB,CAAA;IACjB,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,gDAAmC,CAAA;IACnC,sCAAyB,CAAA;IACzB,0CAA6B,CAAA;IAC7B,kDAAqC,CAAA;IACrC,gEAAmD,CAAA;IACnD,gCAAmB,CAAA;IACnB,0CAA6B,CAAA;IAC7B,0DAA6C,CAAA;IAC7C,0DAA6C,CAAA;AAC/C,CAAC,EArBW,WAAW,2BAAX,WAAW,QAqBtB;AAmOD,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,gDAA4B,CAAA;IAC5B,yCAAqB,CAAA;IACrB,8CAA0B,CAAA;AAC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66
|
var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
|
-
var provider, apolloClient, providerResponse, pageProvider, err_1, userData,
|
|
67
|
+
var provider, apolloClient, providerResponse, pageProvider, err_1, userData, featureFlags, optimizelyData, err_2, subscriptions, isEligible, handleMfaError, isStepUpMfaEnabled, cookie, stepUpMfaToken, isTNLMobileApp, apolloMfaClient, stepUpProvider, err_3;
|
|
68
68
|
var _c, _d, _e, _f;
|
|
69
69
|
var context = _b.context, props = _b.props, options = _b.options, _g = _b.enableStepUpMfa, enableStepUpMfa = _g === void 0 ? false : _g;
|
|
70
70
|
return __generator(this, function (_h) {
|
|
@@ -97,18 +97,6 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
97
97
|
return [2 /*return*/, (0, providerUtilsTimes_1.handleProviderPropsError)(err_1, context, props)];
|
|
98
98
|
case 5:
|
|
99
99
|
userData = (0, providerUtilsTimes_1.handleProviderPropsUserDataResponse)(providerResponse, context, options);
|
|
100
|
-
if (props === null || props === void 0 ? void 0 : props.notEligibleForPaymentPagesRedirectUrl) {
|
|
101
|
-
subscriptions = ((_d = userData.user) === null || _d === void 0 ? void 0 : _d.subscriptions) || [];
|
|
102
|
-
isEligible = (0, helpers_1.isUserPaymentTypeEligibleForZuoraPage)(subscriptions[0]);
|
|
103
|
-
if (!isEligible) {
|
|
104
|
-
return [2 /*return*/, {
|
|
105
|
-
redirect: {
|
|
106
|
-
permanent: false,
|
|
107
|
-
destination: props.notEligibleForPaymentPagesRedirectUrl,
|
|
108
|
-
},
|
|
109
|
-
}];
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
100
|
featureFlags = {};
|
|
113
101
|
_h.label = 6;
|
|
114
102
|
case 6:
|
|
@@ -132,6 +120,18 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
132
120
|
});
|
|
133
121
|
return [2 /*return*/, (0, providerUtilsTimes_1.handleProviderPropsError)(err_2, context, props)];
|
|
134
122
|
case 9:
|
|
123
|
+
if (props === null || props === void 0 ? void 0 : props.notEligibleForPaymentPagesRedirectUrl) {
|
|
124
|
+
subscriptions = ((_d = userData.user) === null || _d === void 0 ? void 0 : _d.subscriptions) || [];
|
|
125
|
+
isEligible = (0, helpers_1.isUserPaymentTypeEligibleForZuoraPage)(subscriptions[0], featureFlags);
|
|
126
|
+
if (!isEligible) {
|
|
127
|
+
return [2 /*return*/, {
|
|
128
|
+
redirect: {
|
|
129
|
+
permanent: false,
|
|
130
|
+
destination: props.notEligibleForPaymentPagesRedirectUrl,
|
|
131
|
+
},
|
|
132
|
+
}];
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
135
|
handleMfaError = function (errorCode) {
|
|
136
136
|
context.res.setHeader('Set-Cookie', "stepup_access_token=; path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT");
|
|
137
137
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getProviderPropsTimes.js","sourceRoot":"","sources":["../../src/getProviderPropsTimes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAqE;AAGrE,mDAMyB;AACzB,gDAO+B;AAE/B,qCAKkB;AAElB,mEAIqC;AACrC,yCAA+C;AAC/C,+DAGsC;AACtC,+DAGmC;AAEnC,uEAG0C;AAE1C,IAAM,mBAAmB,GAAG;IAC1B,QAAQ,EAAE,iCAAgB;IAC1B,SAAS,EAAE,kCAAiB;IAC5B,oBAAoB,EAAE,6CAA4B;IAClD,OAAO,EAAE,gCAAe;CACzB,CAAA;AASM,IAAM,qBAAqB,GAAG,iEAEnC,EAK2B;;;QAJ3B,OAAO,aAAA,EACP,KAAK,WAAA,EACL,OAAO,aAAA,EACP,uBAAuB,EAAvB,eAAe,mBAAG,KAAK,KAAA;;;;gBAIf,QAAQ,GAAK,OAAO,SAAZ,CAAY;gBAEP,qBAAM,IAAA,wBAAkB,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EAAE,GAAG;yBACjB;qBACF,EAAA;qBAKP,sBAAO;oBACL,KAAK,iCACA,KAAK,GACL,QAAQ,KACX,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,EACnC,GAAG,EAAE,yCAAoB,EACzB,YAAY,cAAA,GACb;iBACF,EAAA;;;KACF,CAAA;AA1KY,QAAA,qBAAqB,yBA0KjC"}
|
|
@@ -43,6 +43,7 @@ exports.cancelSubscription = exports.replaceSubscriptionName = exports.replaceRe
|
|
|
43
43
|
var cookie_1 = __importDefault(require("cookie"));
|
|
44
44
|
var api_1 = require("@newskit-render/api");
|
|
45
45
|
var dateUtils_1 = require("./dateUtils");
|
|
46
|
+
var shared_components_1 = require("@newskit-render/shared-components");
|
|
46
47
|
var getSubscriptionEndMessage = function (messages, billCycleDate, options) {
|
|
47
48
|
if (options === void 0) { options = {}; }
|
|
48
49
|
var dateNow = new Date();
|
|
@@ -53,7 +54,7 @@ var getSubscriptionEndMessage = function (messages, billCycleDate, options) {
|
|
|
53
54
|
exports.getSubscriptionEndMessage = getSubscriptionEndMessage;
|
|
54
55
|
var replaceRemainingSubscriptionTime = function (text, billCycleDate) {
|
|
55
56
|
var dateNow = new Date();
|
|
56
|
-
var remainingDays = (0,
|
|
57
|
+
var remainingDays = (0, shared_components_1.differenceInDays)(dateNow, billCycleDate);
|
|
57
58
|
if (remainingDays === 0) {
|
|
58
59
|
// if the user cancels on the billing date the subscription will be cancelled after 1 month
|
|
59
60
|
var timeRemaining = '1';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cancellationUtils.js","sourceRoot":"","sources":["../../../src/helpers/cancellationUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;AAC3B,2CAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"cancellationUtils.js","sourceRoot":"","sources":["../../../src/helpers/cancellationUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;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IAAY,EACZ,gBAAwB,IACrB,OAAA,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,EAAvD,CAAuD,CAAA;AAH/C,QAAA,uBAAuB,2BAGwB;AAErD,IAAM,kBAAkB,GAAG,UAChC,gBAAwB,EACxB,MAAc;;;QAER,OAAO,GAAG,gBAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QACvC,yBAAyB,GAAG,IAAA,oBAAc,EAAC,OAAO,CAAC,CAAA;QAEzD,sBAAO,KAAK,CAAC,qBAAqB,EAAE;gBAClC,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,QAAQ;gBAClB,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,GAAG,EAAE,gBAAM,CAAC,SAAS,CACnB,yBAAyB,EACzB,OAAO,CAAC,yBAAyB,CAAC,CACnC;iBACF;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;oBACnB,gBAAgB,kBAAA;oBAChB,MAAM,QAAA;oBACN,mBAAmB,EAAE,sBAAsB;iBAC5C,CAAC;aACH,CAAC,EAAA;;KACH,CAAA;AAvBY,QAAA,kBAAkB,sBAuB9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Data, UserData } from '../pages/types';
|
|
1
|
+
import { Notification, Data, UserData } from '../pages/types';
|
|
2
2
|
import { EditFieldType, ButtonGroupProps, ListItemType } from '@newskit-render/shared-components';
|
|
3
|
-
|
|
3
|
+
import { DetailedFlags } from '@newskit-render/feature-flags';
|
|
4
4
|
export declare const calculateCells: (item: ListItemType) => Record<string, number>;
|
|
5
5
|
export declare const getDefaultItemValue: (data: UserData, type: string, placeholder: string | string[], context?: {
|
|
6
6
|
publisher?: string;
|
|
@@ -13,6 +13,7 @@ export declare const replaceBaseURL: (baseUrl: string, href: string | undefined,
|
|
|
13
13
|
export declare const getHref: (baseUrl: string, data: Partial<UserData> | undefined, href: string | undefined, options?: {
|
|
14
14
|
publisher?: string;
|
|
15
15
|
type?: string;
|
|
16
|
+
featureFlags?: DetailedFlags;
|
|
16
17
|
}) => string;
|
|
17
18
|
export declare const formateString: (field: string) => string;
|
|
18
19
|
export declare const getDefaultTitle: (field: string) => string;
|
|
@@ -34,3 +35,5 @@ export declare const getSanitizedObject: (obj: {
|
|
|
34
35
|
[x: string]: any;
|
|
35
36
|
};
|
|
36
37
|
export declare const getInvoiceData: (data: UserData, itemType: string | undefined, pageSize: number) => any;
|
|
38
|
+
export declare const getNotificationData: (customerNotifications: Notification[] | undefined, itemType: string | undefined, pageSize: number) => any;
|
|
39
|
+
export declare const formatPrice: (price?: number | string, currency?: string) => string;
|
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getInvoiceData = exports.getSanitizedObject = exports.mergeButtonGroupProps = exports.getListItemAriaDescribedby = exports.getListItemArialLabel = exports.getEditField = exports.styleToString = exports.getErrorName = exports.getEditTitle = exports.getDefaultTitle = exports.formateString = exports.getHref = exports.replaceBaseURL = exports.getValueDescription = exports.getListItemValue = exports.getDefaultItemValue = exports.calculateCells =
|
|
17
|
+
exports.formatPrice = exports.getNotificationData = exports.getInvoiceData = exports.getSanitizedObject = exports.mergeButtonGroupProps = exports.getListItemAriaDescribedby = exports.getListItemArialLabel = exports.getEditField = exports.styleToString = exports.getErrorName = exports.getEditTitle = exports.getDefaultTitle = exports.formateString = exports.getHref = exports.replaceBaseURL = exports.getValueDescription = exports.getListItemValue = exports.getDefaultItemValue = exports.calculateCells = void 0;
|
|
18
18
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
19
19
|
var PaymentItem_1 = __importDefault(require("../Components/Elements/PaymentItem"));
|
|
20
20
|
var lodash_get_1 = __importDefault(require("lodash.get"));
|
|
@@ -43,12 +43,6 @@ var listItemPaths = {
|
|
|
43
43
|
deliveryInstructions: 'subscriptions[0].deliveryInformation',
|
|
44
44
|
gender: 'gender',
|
|
45
45
|
};
|
|
46
|
-
var formateDate = function (date, options) {
|
|
47
|
-
if (options === void 0) { options = {}; }
|
|
48
|
-
var formattedDate = new Date(date);
|
|
49
|
-
return formattedDate.toLocaleDateString('en-GB', options);
|
|
50
|
-
};
|
|
51
|
-
exports.formateDate = formateDate;
|
|
52
46
|
var calculateCells = function (item) {
|
|
53
47
|
if (item.default) {
|
|
54
48
|
return { xs: 10, md: 3 };
|
|
@@ -147,12 +141,12 @@ var getDefaultItemValue = function (data, type, placeholder, context) {
|
|
|
147
141
|
}
|
|
148
142
|
case 'subDate': {
|
|
149
143
|
var date = (0, lodash_get_1.default)(data, 'subscriptions[0].startDate');
|
|
150
|
-
return date ? (0,
|
|
144
|
+
return date ? (0, shared_components_1.formateDate)(date) : placeholder;
|
|
151
145
|
}
|
|
152
146
|
case 'dob': {
|
|
153
147
|
var date = (0, lodash_get_1.default)(data, listItemPaths[type]);
|
|
154
148
|
return date
|
|
155
|
-
? (0,
|
|
149
|
+
? (0, shared_components_1.formateDate)(date, (context === null || context === void 0 ? void 0 : context.publisher) === 'BROADCASTING' ? { year: 'numeric' } : {})
|
|
156
150
|
: placeholder;
|
|
157
151
|
}
|
|
158
152
|
case 'gender': {
|
|
@@ -175,7 +169,7 @@ var getDefaultItemValue = function (data, type, placeholder, context) {
|
|
|
175
169
|
case 'vouchersStartDate': {
|
|
176
170
|
var nextVoucherBookletDueDate = (0, lodash_get_1.default)(data, 'subscriptions[0].fulfilmentPeriodStartDate');
|
|
177
171
|
var formattedVoucherBookletDate = nextVoucherBookletDueDate &&
|
|
178
|
-
(0,
|
|
172
|
+
(0, shared_components_1.formateDate)(nextVoucherBookletDueDate, {
|
|
179
173
|
day: 'numeric',
|
|
180
174
|
month: 'numeric',
|
|
181
175
|
year: '2-digit',
|
|
@@ -246,12 +240,14 @@ var replaceBaseURL = function (baseUrl, href, defaultValue) {
|
|
|
246
240
|
};
|
|
247
241
|
exports.replaceBaseURL = replaceBaseURL;
|
|
248
242
|
var getHref = function (baseUrl, data, href, options) {
|
|
243
|
+
var _a, _b;
|
|
249
244
|
if (options === void 0) { options = {}; }
|
|
250
245
|
if ((options === null || options === void 0 ? void 0 : options.type) === 'payment') {
|
|
251
246
|
var payment = (0, lodash_get_1.default)(data, 'subscriptions[0].billingDetails.paymentMethod.type') || '';
|
|
252
247
|
var paymentType = payment.toLowerCase();
|
|
253
|
-
if (
|
|
254
|
-
paymentType === types_1.PaymentTypes.
|
|
248
|
+
if (!((_b = (_a = options.featureFlags) === null || _a === void 0 ? void 0 : _a.enable_payment_method_edit) === null || _b === void 0 ? void 0 : _b.enabled) &&
|
|
249
|
+
(paymentType === types_1.PaymentTypes.creditcardreferencetransaction ||
|
|
250
|
+
paymentType === types_1.PaymentTypes.paypal)) {
|
|
255
251
|
return '';
|
|
256
252
|
}
|
|
257
253
|
}
|
|
@@ -407,7 +403,7 @@ var getInvoiceData = function (data, itemType, pageSize) {
|
|
|
407
403
|
return {
|
|
408
404
|
invoiceId: invoice.invoiceId,
|
|
409
405
|
billStatus: invoice.status,
|
|
410
|
-
billDate: (0,
|
|
406
|
+
billDate: (0, shared_components_1.formateDate)(invoice.invoiceDate, {
|
|
411
407
|
day: '2-digit',
|
|
412
408
|
month: 'short',
|
|
413
409
|
year: 'numeric',
|
|
@@ -419,4 +415,17 @@ var getInvoiceData = function (data, itemType, pageSize) {
|
|
|
419
415
|
return invoiceContentMap;
|
|
420
416
|
};
|
|
421
417
|
exports.getInvoiceData = getInvoiceData;
|
|
418
|
+
var getNotificationData = function (customerNotifications, itemType, pageSize) {
|
|
419
|
+
if (itemType !== 'reminderNotices')
|
|
420
|
+
return [];
|
|
421
|
+
var notificationContentMap = customerNotifications === null || customerNotifications === void 0 ? void 0 : customerNotifications.map(function (notification, idx) {
|
|
422
|
+
if (idx >= pageSize)
|
|
423
|
+
return;
|
|
424
|
+
return __assign({ default: 'Renewal Reminder', label: 'Renewal Reminder' }, notification);
|
|
425
|
+
}).filter(function (notification) { return notification; });
|
|
426
|
+
return notificationContentMap;
|
|
427
|
+
};
|
|
428
|
+
exports.getNotificationData = getNotificationData;
|
|
429
|
+
var formatPrice = function (price, currency) { var _a; return price && currency ? "".concat((_a = constants_1.CURRENCY_MAP[currency]) !== null && _a !== void 0 ? _a : '').concat(price) : ''; };
|
|
430
|
+
exports.formatPrice = formatPrice;
|
|
422
431
|
//# sourceMappingURL=dataUtils.js.map
|