@newskit-render/my-account 0.0.0-e8d83dca6 → 0.0.0-eb86c5943
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/ForwardButton/ForwardButton.d.ts +17 -0
- package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js +43 -0
- package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js.map +1 -0
- package/dist/cjs/Components/Elements/Head/Head.js +1 -1
- package/dist/cjs/Components/Elements/Head/Head.js.map +1 -1
- package/dist/cjs/Components/Elements/ListItemComponents/ItemFooter.d.ts +15 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemFooter.js +27 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemFooter.js.map +1 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemIconLabel.d.ts +5 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemIconLabel.js +16 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemIconLabel.js.map +1 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemSubtitle.d.ts +7 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemSubtitle.js +51 -0
- package/dist/cjs/Components/Elements/ListItemComponents/ItemSubtitle.js.map +1 -0
- package/dist/cjs/Components/Elements/ListItemComponents/index.d.ts +3 -0
- package/dist/cjs/Components/Elements/ListItemComponents/index.js +20 -0
- package/dist/cjs/Components/Elements/ListItemComponents/index.js.map +1 -0
- package/dist/cjs/Components/Elements/OfferCard/OfferCard.d.ts +3 -0
- package/dist/cjs/Components/Elements/OfferCard/OfferCard.js +55 -0
- package/dist/cjs/Components/Elements/OfferCard/OfferCard.js.map +1 -0
- package/dist/cjs/Components/Elements/OfferCard/index.d.ts +2 -0
- package/dist/cjs/Components/Elements/OfferCard/index.js +5 -0
- package/dist/cjs/Components/Elements/OfferCard/index.js.map +1 -0
- package/dist/cjs/Components/Elements/OfferCard/styled.d.ts +43 -0
- package/dist/cjs/Components/Elements/OfferCard/styled.js +22 -0
- package/dist/cjs/Components/Elements/OfferCard/styled.js.map +1 -0
- package/dist/cjs/Components/Elements/OfferCard/types.d.ts +25 -0
- package/dist/cjs/Components/Elements/OfferCard/types.js +3 -0
- package/dist/cjs/Components/Elements/OfferCard/types.js.map +1 -0
- package/dist/cjs/Components/Elements/SectionListItem/GridListItem.d.ts +3 -0
- package/dist/cjs/Components/Elements/SectionListItem/GridListItem.js +77 -0
- package/dist/cjs/Components/Elements/SectionListItem/GridListItem.js.map +1 -0
- package/dist/cjs/Components/Elements/SectionListItem/SectionListItem.d.ts +3 -0
- package/dist/cjs/Components/Elements/SectionListItem/SectionListItem.js +76 -0
- package/dist/cjs/Components/Elements/SectionListItem/SectionListItem.js.map +1 -0
- package/dist/cjs/Components/Elements/SectionListItem/index.d.ts +3 -0
- package/dist/cjs/Components/Elements/SectionListItem/index.js +20 -0
- package/dist/cjs/Components/Elements/SectionListItem/index.js.map +1 -0
- package/dist/cjs/Components/Elements/SectionListItem/types.d.ts +37 -0
- package/dist/cjs/Components/Elements/SectionListItem/types.js +3 -0
- package/dist/cjs/Components/Elements/SectionListItem/types.js.map +1 -0
- package/dist/cjs/Components/Elements/StandaloneLinkComponent/StandaloneLinkComponent.js +4 -15
- package/dist/cjs/Components/Elements/StandaloneLinkComponent/StandaloneLinkComponent.js.map +1 -1
- package/dist/cjs/Components/Elements/UserHubListItem/UserHubListItem.js +3 -4
- package/dist/cjs/Components/Elements/UserHubListItem/UserHubListItem.js.map +1 -1
- package/dist/cjs/Components/Elements/UserHubListItem/types.d.ts +5 -2
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.d.ts +1 -1
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js +38 -12
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/cjs/Components/Sections/CancelSubscription/types.d.ts +20 -7
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +19 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.js +43 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.js.map +1 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/index.d.ts +1 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/index.js +6 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/index.js.map +1 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/type.d.ts +0 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/type.js +2 -0
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/type.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationDetails/CancellationDetails.d.ts +2 -0
- package/dist/cjs/Components/Sections/CancellationDetails/CancellationDetails.js +170 -0
- package/dist/cjs/Components/Sections/CancellationDetails/CancellationDetails.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationDetails/index.d.ts +2 -0
- package/dist/cjs/Components/Sections/CancellationDetails/index.js +19 -0
- package/dist/cjs/Components/Sections/CancellationDetails/index.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationDetails/types.d.ts +36 -0
- package/dist/cjs/Components/Sections/CancellationDetails/types.js +3 -0
- package/dist/cjs/Components/Sections/CancellationDetails/types.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.d.ts +2 -0
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.js +44 -0
- package/dist/cjs/Components/Sections/CancellationReasons/CancellationReasons.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationReasons/index.d.ts +1 -0
- package/dist/cjs/Components/Sections/CancellationReasons/index.js +18 -0
- package/dist/cjs/Components/Sections/CancellationReasons/index.js.map +1 -0
- package/dist/cjs/Components/Sections/CardContentContainer/CardContentContainer.js +2 -0
- package/dist/cjs/Components/Sections/CardContentContainer/CardContentContainer.js.map +1 -1
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellation.d.ts +19 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellation.js +43 -0
- package/dist/cjs/Components/Sections/ConfirmCancellation/ConfirmCancellation.js.map +1 -0
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js +3 -2
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- package/dist/cjs/Components/Sections/Form/InviteFamilyMember/InviteFamilyMember.js +2 -0
- package/dist/cjs/Components/Sections/Form/InviteFamilyMember/InviteFamilyMember.js.map +1 -1
- package/dist/cjs/Components/Sections/LayoutContentContainer/LayoutContentContainer.js +3 -3
- package/dist/cjs/Components/Sections/LayoutContentContainer/LayoutContentContainer.js.map +1 -1
- package/dist/cjs/Components/Sections/SectionContainer/GridSection.d.ts +3 -0
- package/dist/cjs/Components/Sections/SectionContainer/GridSection.js +46 -0
- package/dist/cjs/Components/Sections/SectionContainer/GridSection.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/ListSection.d.ts +2 -0
- package/dist/cjs/Components/Sections/SectionContainer/ListSection.js +61 -0
- package/dist/cjs/Components/Sections/SectionContainer/ListSection.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/SectionContainer.d.ts +11 -0
- package/dist/cjs/Components/Sections/SectionContainer/SectionContainer.js +49 -0
- package/dist/cjs/Components/Sections/SectionContainer/SectionContainer.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/index.d.ts +4 -0
- package/dist/cjs/Components/Sections/SectionContainer/index.js +20 -0
- package/dist/cjs/Components/Sections/SectionContainer/index.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/types.d.ts +39 -0
- package/dist/cjs/Components/Sections/SectionContainer/types.js +3 -0
- package/dist/cjs/Components/Sections/SectionContainer/types.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/utils.d.ts +8 -0
- package/dist/cjs/Components/Sections/SectionContainer/utils.js +29 -0
- package/dist/cjs/Components/Sections/SectionContainer/utils.js.map +1 -0
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js +5 -7
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/NewslettersSection.js +1 -3
- package/dist/cjs/Components/Sections/UserHub/NewslettersSection.js.map +1 -1
- package/dist/cjs/Components/SharedTypes/GridLayoutProps.d.ts +37 -0
- package/dist/cjs/Components/SharedTypes/GridLayoutProps.js +3 -0
- package/dist/cjs/Components/SharedTypes/GridLayoutProps.js.map +1 -0
- package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +17 -0
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +155 -0
- package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -0
- package/dist/cjs/Components/Templates/DisplayRenderer.js +8 -5
- package/dist/cjs/Components/Templates/DisplayRenderer.js.map +1 -1
- package/dist/cjs/Components/Templates/SectionRender.d.ts +7 -0
- package/dist/cjs/Components/Templates/SectionRender.js +50 -0
- package/dist/cjs/Components/Templates/SectionRender.js.map +1 -0
- package/dist/cjs/Components/Templates/index.d.ts +2 -1
- package/dist/cjs/Components/Templates/index.js +3 -1
- package/dist/cjs/Components/Templates/index.js.map +1 -1
- package/dist/cjs/api/authorization.d.ts +2 -1
- package/dist/cjs/api/authorization.js +9 -14
- package/dist/cjs/api/authorization.js.map +1 -1
- package/dist/cjs/api/index.d.ts +1 -0
- package/dist/cjs/api/index.js +1 -0
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/mutateHandler.js +11 -3
- package/dist/cjs/api/mutateHandler.js.map +1 -1
- package/dist/cjs/api/mutateHandlerHelpers.js +5 -0
- package/dist/cjs/api/mutateHandlerHelpers.js.map +1 -1
- package/dist/cjs/api/trackEvent.d.ts +2 -0
- package/dist/cjs/api/trackEvent.js +83 -0
- package/dist/cjs/api/trackEvent.js.map +1 -0
- package/dist/cjs/context/index.d.ts +24 -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 +100 -21
- package/dist/cjs/context/types.js +1 -1
- package/dist/cjs/context/types.js.map +1 -1
- package/dist/cjs/getProviderPropsTimes.js +28 -22
- package/dist/cjs/getProviderPropsTimes.js.map +1 -1
- package/dist/cjs/helpers/apiHandlerUtils.js +1 -0
- package/dist/cjs/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/cjs/helpers/cancellationUtils.d.ts +9 -0
- package/dist/cjs/helpers/cancellationUtils.js +96 -0
- package/dist/cjs/helpers/cancellationUtils.js.map +1 -0
- package/dist/cjs/helpers/dateUtils.d.ts +8 -0
- package/dist/cjs/helpers/dateUtils.js +43 -0
- package/dist/cjs/helpers/dateUtils.js.map +1 -0
- package/dist/cjs/helpers/featureFlagUtils.d.ts +25 -3
- package/dist/cjs/helpers/featureFlagUtils.js +82 -6
- package/dist/cjs/helpers/featureFlagUtils.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 +1 -0
- package/dist/cjs/helpers/providerUtilsTimes.js.map +1 -1
- package/dist/cjs/helpers/subscriptionsUtils.d.ts +2 -0
- package/dist/cjs/helpers/subscriptionsUtils.js +6 -1
- package/dist/cjs/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.d.ts +3 -0
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.js +55 -0
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.js.map +1 -0
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.d.ts +2 -0
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +511 -0
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -0
- package/dist/cjs/pages/CancellationStepper/index.d.ts +2 -0
- package/dist/cjs/pages/CancellationStepper/index.js +19 -0
- package/dist/cjs/pages/CancellationStepper/index.js.map +1 -0
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.d.ts +2 -0
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +158 -0
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -0
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +0 -87
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingSunContext.js +1 -0
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingSunContext.js.map +1 -1
- package/dist/cjs/pages/UserHub/UserHubContext.js +10 -4
- package/dist/cjs/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/cjs/pages/types.d.ts +6 -0
- package/dist/cjs/providers/types.d.ts +4 -2
- package/dist/cjs/providersTimes/types.d.ts +0 -8
- package/dist/cjs/providersTimes/types.js.map +1 -1
- package/dist/cjs/queries/getAuthorizeUriInput.js +1 -1
- package/dist/cjs/queries/getAuthorizeUriInput.js.map +1 -1
- package/dist/cjs/queries/getPaymentInfoAndAccountType.js +1 -1
- package/dist/cjs/queries/getPaymentInfoAndAccountType.js.map +1 -1
- package/dist/cjs/queries/getUserEntitlements.js +1 -1
- package/dist/cjs/queries/getUserEntitlements.js.map +1 -1
- package/dist/cjs/queries/getUserSubscription.js +1 -1
- package/dist/cjs/queries/getUserSubscription.js.map +1 -1
- package/dist/cjs/queries/mutateCancellation.js +1 -1
- package/dist/cjs/queries/mutateCancellation.js.map +1 -1
- package/dist/cjs/queries/mutateSendFamilyMemberInvite.js +1 -0
- package/dist/cjs/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.d.ts +17 -0
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js +36 -0
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js.map +1 -0
- package/dist/esm/Components/Elements/Head/Head.js +1 -1
- package/dist/esm/Components/Elements/Head/Head.js.map +1 -1
- package/dist/esm/Components/Elements/ListItemComponents/ItemFooter.d.ts +15 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemFooter.js +20 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemFooter.js.map +1 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemIconLabel.d.ts +5 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemIconLabel.js +9 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemIconLabel.js.map +1 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemSubtitle.d.ts +7 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemSubtitle.js +24 -0
- package/dist/esm/Components/Elements/ListItemComponents/ItemSubtitle.js.map +1 -0
- package/dist/esm/Components/Elements/ListItemComponents/index.d.ts +3 -0
- package/dist/esm/Components/Elements/ListItemComponents/index.js +4 -0
- package/dist/esm/Components/Elements/ListItemComponents/index.js.map +1 -0
- package/dist/esm/Components/Elements/OfferCard/OfferCard.d.ts +3 -0
- package/dist/esm/Components/Elements/OfferCard/OfferCard.js +48 -0
- package/dist/esm/Components/Elements/OfferCard/OfferCard.js.map +1 -0
- package/dist/esm/Components/Elements/OfferCard/index.d.ts +2 -0
- package/dist/esm/Components/Elements/OfferCard/index.js +3 -0
- package/dist/esm/Components/Elements/OfferCard/index.js.map +1 -0
- package/dist/esm/Components/Elements/OfferCard/styled.d.ts +43 -0
- package/dist/esm/Components/Elements/OfferCard/styled.js +19 -0
- package/dist/esm/Components/Elements/OfferCard/styled.js.map +1 -0
- package/dist/esm/Components/Elements/OfferCard/types.d.ts +25 -0
- package/dist/esm/Components/Elements/OfferCard/types.js +2 -0
- package/dist/esm/Components/Elements/OfferCard/types.js.map +1 -0
- package/dist/esm/Components/Elements/SectionListItem/GridListItem.d.ts +3 -0
- package/dist/esm/Components/Elements/SectionListItem/GridListItem.js +70 -0
- package/dist/esm/Components/Elements/SectionListItem/GridListItem.js.map +1 -0
- package/dist/esm/Components/Elements/SectionListItem/SectionListItem.d.ts +3 -0
- package/dist/esm/Components/Elements/SectionListItem/SectionListItem.js +69 -0
- package/dist/esm/Components/Elements/SectionListItem/SectionListItem.js.map +1 -0
- package/dist/esm/Components/Elements/SectionListItem/index.d.ts +3 -0
- package/dist/esm/Components/Elements/SectionListItem/index.js +4 -0
- package/dist/esm/Components/Elements/SectionListItem/index.js.map +1 -0
- package/dist/esm/Components/Elements/SectionListItem/types.d.ts +37 -0
- package/dist/esm/Components/Elements/SectionListItem/types.js +2 -0
- package/dist/esm/Components/Elements/SectionListItem/types.js.map +1 -0
- package/dist/esm/Components/Elements/StandaloneLinkComponent/StandaloneLinkComponent.js +4 -15
- package/dist/esm/Components/Elements/StandaloneLinkComponent/StandaloneLinkComponent.js.map +1 -1
- package/dist/esm/Components/Elements/UserHubListItem/UserHubListItem.js +3 -4
- package/dist/esm/Components/Elements/UserHubListItem/UserHubListItem.js.map +1 -1
- package/dist/esm/Components/Elements/UserHubListItem/types.d.ts +5 -2
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.d.ts +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js +40 -14
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/types.d.ts +20 -7
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +19 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.js +36 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.js.map +1 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/index.d.ts +1 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/index.js +2 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/index.js.map +1 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/type.d.ts +0 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/type.js +2 -0
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/type.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationDetails/CancellationDetails.d.ts +2 -0
- package/dist/esm/Components/Sections/CancellationDetails/CancellationDetails.js +143 -0
- package/dist/esm/Components/Sections/CancellationDetails/CancellationDetails.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationDetails/index.d.ts +2 -0
- package/dist/esm/Components/Sections/CancellationDetails/index.js +3 -0
- package/dist/esm/Components/Sections/CancellationDetails/index.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationDetails/types.d.ts +36 -0
- package/dist/esm/Components/Sections/CancellationDetails/types.js +2 -0
- package/dist/esm/Components/Sections/CancellationDetails/types.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.d.ts +2 -0
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.js +37 -0
- package/dist/esm/Components/Sections/CancellationReasons/CancellationReasons.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationReasons/index.d.ts +1 -0
- package/dist/esm/Components/Sections/CancellationReasons/index.js +2 -0
- package/dist/esm/Components/Sections/CancellationReasons/index.js.map +1 -0
- package/dist/esm/Components/Sections/CardContentContainer/CardContentContainer.js +2 -0
- package/dist/esm/Components/Sections/CardContentContainer/CardContentContainer.js.map +1 -1
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.d.ts +19 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.js +36 -0
- package/dist/esm/Components/Sections/ConfirmCancellation/ConfirmCancellation.js.map +1 -0
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js +3 -2
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- package/dist/esm/Components/Sections/Form/InviteFamilyMember/InviteFamilyMember.js +2 -0
- package/dist/esm/Components/Sections/Form/InviteFamilyMember/InviteFamilyMember.js.map +1 -1
- package/dist/esm/Components/Sections/LayoutContentContainer/LayoutContentContainer.js +3 -3
- package/dist/esm/Components/Sections/LayoutContentContainer/LayoutContentContainer.js.map +1 -1
- package/dist/esm/Components/Sections/SectionContainer/GridSection.d.ts +3 -0
- package/dist/esm/Components/Sections/SectionContainer/GridSection.js +39 -0
- package/dist/esm/Components/Sections/SectionContainer/GridSection.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/ListSection.d.ts +2 -0
- package/dist/esm/Components/Sections/SectionContainer/ListSection.js +54 -0
- package/dist/esm/Components/Sections/SectionContainer/ListSection.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/SectionContainer.d.ts +11 -0
- package/dist/esm/Components/Sections/SectionContainer/SectionContainer.js +41 -0
- package/dist/esm/Components/Sections/SectionContainer/SectionContainer.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/index.d.ts +4 -0
- package/dist/esm/Components/Sections/SectionContainer/index.js +4 -0
- package/dist/esm/Components/Sections/SectionContainer/index.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/types.d.ts +39 -0
- package/dist/esm/Components/Sections/SectionContainer/types.js +2 -0
- package/dist/esm/Components/Sections/SectionContainer/types.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/utils.d.ts +8 -0
- package/dist/esm/Components/Sections/SectionContainer/utils.js +24 -0
- package/dist/esm/Components/Sections/SectionContainer/utils.js.map +1 -0
- package/dist/esm/Components/Sections/UserHub/BaseSection.js +5 -7
- package/dist/esm/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/NewslettersSection.js +1 -3
- package/dist/esm/Components/Sections/UserHub/NewslettersSection.js.map +1 -1
- package/dist/esm/Components/SharedTypes/GridLayoutProps.d.ts +37 -0
- package/dist/esm/Components/SharedTypes/GridLayoutProps.js +2 -0
- package/dist/esm/Components/SharedTypes/GridLayoutProps.js.map +1 -0
- package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +17 -0
- package/dist/esm/Components/Templates/CancellationStepperRender.js +129 -0
- package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -0
- package/dist/esm/Components/Templates/DisplayRenderer.js +8 -5
- package/dist/esm/Components/Templates/DisplayRenderer.js.map +1 -1
- package/dist/esm/Components/Templates/SectionRender.d.ts +7 -0
- package/dist/esm/Components/Templates/SectionRender.js +45 -0
- package/dist/esm/Components/Templates/SectionRender.js.map +1 -0
- package/dist/esm/Components/Templates/index.d.ts +2 -1
- package/dist/esm/Components/Templates/index.js +2 -1
- package/dist/esm/Components/Templates/index.js.map +1 -1
- package/dist/esm/api/authorization.d.ts +2 -1
- package/dist/esm/api/authorization.js +7 -12
- package/dist/esm/api/authorization.js.map +1 -1
- package/dist/esm/api/index.d.ts +1 -0
- package/dist/esm/api/index.js +1 -0
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/mutateHandler.js +12 -4
- package/dist/esm/api/mutateHandler.js.map +1 -1
- package/dist/esm/api/mutateHandlerHelpers.js +5 -0
- package/dist/esm/api/mutateHandlerHelpers.js.map +1 -1
- package/dist/esm/api/trackEvent.d.ts +2 -0
- package/dist/esm/api/trackEvent.js +79 -0
- package/dist/esm/api/trackEvent.js.map +1 -0
- package/dist/esm/context/index.d.ts +24 -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 +100 -21
- package/dist/esm/context/types.js +1 -1
- package/dist/esm/context/types.js.map +1 -1
- package/dist/esm/getProviderPropsTimes.js +28 -22
- package/dist/esm/getProviderPropsTimes.js.map +1 -1
- package/dist/esm/helpers/apiHandlerUtils.js +1 -0
- package/dist/esm/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/esm/helpers/cancellationUtils.d.ts +9 -0
- package/dist/esm/helpers/cancellationUtils.js +86 -0
- package/dist/esm/helpers/cancellationUtils.js.map +1 -0
- package/dist/esm/helpers/dateUtils.d.ts +8 -0
- package/dist/esm/helpers/dateUtils.js +37 -0
- package/dist/esm/helpers/dateUtils.js.map +1 -0
- package/dist/esm/helpers/featureFlagUtils.d.ts +25 -3
- package/dist/esm/helpers/featureFlagUtils.js +80 -5
- package/dist/esm/helpers/featureFlagUtils.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 +1 -0
- package/dist/esm/helpers/providerUtilsTimes.js.map +1 -1
- package/dist/esm/helpers/subscriptionsUtils.d.ts +2 -0
- package/dist/esm/helpers/subscriptionsUtils.js +4 -0
- package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepper.d.ts +3 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js +25 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js.map +1 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.d.ts +2 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +505 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -0
- package/dist/esm/pages/CancellationStepper/index.d.ts +2 -0
- package/dist/esm/pages/CancellationStepper/index.js +3 -0
- package/dist/esm/pages/CancellationStepper/index.js.map +1 -0
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.d.ts +2 -0
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +151 -0
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -0
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +2 -92
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingSunContext.js +1 -0
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingSunContext.js.map +1 -1
- package/dist/esm/pages/UserHub/UserHubContext.js +10 -4
- package/dist/esm/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/esm/pages/types.d.ts +6 -0
- package/dist/esm/providers/types.d.ts +4 -2
- package/dist/esm/providersTimes/types.d.ts +0 -8
- package/dist/esm/providersTimes/types.js.map +1 -1
- package/dist/esm/queries/getAuthorizeUriInput.js +1 -1
- package/dist/esm/queries/getAuthorizeUriInput.js.map +1 -1
- package/dist/esm/queries/getPaymentInfoAndAccountType.js +1 -1
- package/dist/esm/queries/getPaymentInfoAndAccountType.js.map +1 -1
- package/dist/esm/queries/getUserEntitlements.js +1 -1
- package/dist/esm/queries/getUserEntitlements.js.map +1 -1
- package/dist/esm/queries/getUserSubscription.js +1 -1
- package/dist/esm/queries/getUserSubscription.js.map +1 -1
- package/dist/esm/queries/mutateCancellation.js +1 -1
- package/dist/esm/queries/mutateCancellation.js.map +1 -1
- package/dist/esm/queries/mutateSendFamilyMemberInvite.js +1 -0
- package/dist/esm/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/package.json +7 -5
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { PaymentPageContextOptions, AccountLandingPageContextOptions, ContextProviderProps, EditFieldContextOptions, ContextOptions, BaseContextOptions, CancellationContextOptions, ContextName, SubscriptionAndBillingContextOptions, AddFieldContextOption, PaymentMethodsContextOptions, NewslettersContextOptions, AccountDeletionContextOptions, ConfirmAccountDeletionContextOptions, FamilyContextOptions, UserHubContextOptions, BaseFormActions, UserHubSection } 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 } from './types';
|
|
3
3
|
import { baseContext, footer, navigationPrimary, sideNav } from './baseContext';
|
|
4
|
+
declare const contextMap: {
|
|
5
|
+
personalDetails: React.Context<AccountLandingPageContextOptions | null>;
|
|
6
|
+
subscriptionAndBilling: React.Context<SubscriptionAndBillingContextOptions | null>;
|
|
7
|
+
holidayStop: React.Context<HolidayStopContextOptions | null>;
|
|
8
|
+
newslettersAndAlerts: React.Context<AccountLandingPageContextOptions | null>;
|
|
9
|
+
dreamTeam: React.Context<AccountLandingPageContextOptions | null>;
|
|
10
|
+
payment: React.Context<PaymentPageContextOptions | null>;
|
|
11
|
+
editField: React.Context<EditFieldContextOptions | null>;
|
|
12
|
+
cancellation: React.Context<CancellationContextOptions | null>;
|
|
13
|
+
CancellationStepper: React.Context<CancellationStepperContextOptions | null>;
|
|
14
|
+
error: React.Context<BaseContextOptions | null>;
|
|
15
|
+
addField: React.Context<AddFieldContextOption | null>;
|
|
16
|
+
paymentMethods: React.Context<PaymentMethodsContextOptions | null>;
|
|
17
|
+
paymentDirectDebit: React.Context<PaymentPageContextOptions | null>;
|
|
18
|
+
paymentCreditCard: React.Context<PaymentPageContextOptions | null>;
|
|
19
|
+
newsletters: React.Context<NewslettersContextOptions | null>;
|
|
20
|
+
accountDeletion: React.Context<AccountDeletionContextOptions | null>;
|
|
21
|
+
confirmAccountDeletion: React.Context<ConfirmAccountDeletionContextOptions | null>;
|
|
22
|
+
family: React.Context<FamilyContextOptions | null>;
|
|
23
|
+
userHubPage: React.Context<UserHubContextOptions | null>;
|
|
24
|
+
};
|
|
25
|
+
type ContextOptionsUnion = typeof contextMap;
|
|
4
26
|
export declare const AccountContextProvider: React.FC<ContextProviderProps>;
|
|
5
27
|
export declare const useAccountContext: (contextName: ContextName) => ContextOptions;
|
|
6
|
-
export { type PaymentPageContextOptions, type EditFieldContextOptions, type BaseContextOptions, type AccountLandingPageContextOptions, type SubscriptionAndBillingContextOptions, type CancellationContextOptions, baseContext, footer, navigationPrimary, sideNav, type ContextOptions, type AddFieldContextOption, type PaymentMethodsContextOptions, type NewslettersContextOptions, type AccountDeletionContextOptions, type ConfirmAccountDeletionContextOptions, type FamilyContextOptions, type UserHubContextOptions, type BaseFormActions, type UserHubSection, };
|
|
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, };
|
|
@@ -45,6 +45,7 @@ var contextMap = (_a = {},
|
|
|
45
45
|
_a[types_1.ContextName.payment] = (0, react_1.createContext)(null),
|
|
46
46
|
_a[types_1.ContextName.editField] = (0, react_1.createContext)(null),
|
|
47
47
|
_a[types_1.ContextName.cancellation] = (0, react_1.createContext)(null),
|
|
48
|
+
_a[types_1.ContextName.CancellationStepper] = (0, react_1.createContext)(null),
|
|
48
49
|
_a[types_1.ContextName.error] = (0, react_1.createContext)(null),
|
|
49
50
|
_a[types_1.ContextName.addField] = (0, react_1.createContext)(null),
|
|
50
51
|
_a[types_1.ContextName.paymentMethods] = (0, react_1.createContext)(null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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IAC1B,IAAA,qBAAa,EAAmC,IAAI,CAAC;IACvD,GAAC,mBAAW,CAAC,aAAa,CAAC,IAAG,IAAA,qBAAa,EACzC,IAAI,CACL;IACD,GAAC,mBAAW,CAAC,WAAW,IAAG,IAAA,qBAAa,EACtC,IAAI,CACL;IACD,GAAC,mBAAW,CAAC,eAAe,IAC1B,IAAA,qBAAa,EAAuC,IAAI,CAAC;IAC3D,GAAC,mBAAW,CAAC,sBAAsB,IACjC,IAAA,qBAAa,EAA8C,IAAI,CAAC;IAClE,GAAC,mBAAW,CAAC,MAAM,IAAG,IAAA,qBAAa,EAA8B,IAAI,CAAC;IACtE,GAAC,mBAAW,CAAC,WAAW,IAAG,IAAA,qBAAa,EAA+B,IAAI,CAAC;OAC7E,CAAA;AAIM,IAAM,sBAAsB,GAAmC,UAAC,EAItE;QAHC,OAAO,aAAA,EACP,QAAQ,cAAA,EACR,WAAW,iBAAA;IAEX,IAAM,CAAC,GAAG,IAAA,sBAAK,EAAC,EAAE,EAAE,yBAAW,EAAE,OAAO,CAAC,CAAA;IACzC,IAAM,cAAc,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAE9C,OAAO,8BAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,IAAG,QAAQ,CAA2B,CAAA;AAChF,CAAC,CAAA;AATY,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,8 +1,8 @@
|
|
|
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 as
|
|
5
|
-
import { MQ, InlineMessageProps, NewsKitIcon, InstrumentationEvent,
|
|
4
|
+
import { As, ListItemType, ListCellProps, ListItemProps, RequestHeaders, PastDueBannerType, TitleOverrides, DescriptionOverrides, FooterContext, FooterContextOverrides, HeaderProps, InputText, NavigationPrimaryProps, ButtonGroupProps, ModalProps, TealiumEventContext, EventContext, ContentContainerProps as SharedContentContainerProps } from '@newskit-render/shared-components';
|
|
5
|
+
import { MQ, InlineMessageProps, NewsKitIcon, InstrumentationEvent, StackProps, BaseFlagOverrides, NewsKitIconProps } from 'newskit';
|
|
6
6
|
import { HeadProps } from '../Components/Elements/Head';
|
|
7
7
|
import { UserData, Data } from '../pages/types';
|
|
8
8
|
import { PaymentProvider, ZuoraCustomErrorMessages, ZuoraPaymentPageData } from '../Components/Sections/Form/Payment';
|
|
@@ -20,6 +20,11 @@ import { FamilyMemberProps } from '../Components/Sections/Form/InviteFamilyMembe
|
|
|
20
20
|
import { PaymentMethodsMap } from 'Components/Templates';
|
|
21
21
|
import { UserHubItemProps } from '../Components/Elements/UserHubListItem';
|
|
22
22
|
import { CancelSubscriptionProps } from 'Components/Sections/CancelSubscription';
|
|
23
|
+
import { HandleCardClick, StepController } from '../Components/Templates/CancellationStepperRender';
|
|
24
|
+
import { GridLayoutProps } from 'Components/SharedTypes/GridLayoutProps';
|
|
25
|
+
import { CancelSubscriptionDowngradeProps } from '../Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade';
|
|
26
|
+
import { ConfirmCancellationStepProps } from '../Components/Sections/ConfirmCancellation/ConfirmCancellation';
|
|
27
|
+
import { CancellationDetailsContextProps } from '../Components/Sections/CancellationDetails';
|
|
23
28
|
interface InfoPanel extends InlineMessageProps {
|
|
24
29
|
infoPanelCells?: MQ<number>;
|
|
25
30
|
href?: boolean;
|
|
@@ -155,7 +160,8 @@ export declare enum ContextName {
|
|
|
155
160
|
'accountDeletion' = "accountDeletion",
|
|
156
161
|
'confirmAccountDeletion' = "confirmAccountDeletion",
|
|
157
162
|
'family' = "family",
|
|
158
|
-
'userHubPage' = "userHubPage"
|
|
163
|
+
'userHubPage' = "userHubPage",
|
|
164
|
+
'CancellationStepper' = "CancellationStepper"
|
|
159
165
|
}
|
|
160
166
|
export interface BaseContextOptions {
|
|
161
167
|
navigationPrimary: NavigationPrimaryProps;
|
|
@@ -186,6 +192,7 @@ interface LayoutMainContentOverrides {
|
|
|
186
192
|
width?: MQ<string>;
|
|
187
193
|
paddingInline?: MQ<string>;
|
|
188
194
|
paddingBlockStart?: MQ<string>;
|
|
195
|
+
justifyContent?: MQ<string>;
|
|
189
196
|
}
|
|
190
197
|
interface InteractiveContextOptions extends BaseContextOptionsWithUserData {
|
|
191
198
|
validation: Record<string, any>;
|
|
@@ -240,16 +247,95 @@ export interface CancellationContextOptions extends InteractiveContextOptions {
|
|
|
240
247
|
confirm: Partial<CancellationContext>;
|
|
241
248
|
};
|
|
242
249
|
}
|
|
250
|
+
export interface CancellationItem {
|
|
251
|
+
id?: string;
|
|
252
|
+
componentType?: string;
|
|
253
|
+
label?: string;
|
|
254
|
+
labelOverrides?: {
|
|
255
|
+
typographyPreset: MQ<string>;
|
|
256
|
+
stylePreset?: MQ<string>;
|
|
257
|
+
};
|
|
258
|
+
subtitleOverrides?: {
|
|
259
|
+
typographyPreset: MQ<string>;
|
|
260
|
+
stylePreset?: MQ<string>;
|
|
261
|
+
};
|
|
262
|
+
subtitle?: string;
|
|
263
|
+
href?: string;
|
|
264
|
+
linkText?: string;
|
|
265
|
+
icon?: NewsKitIcon | string;
|
|
266
|
+
overrideNextStep?: string;
|
|
267
|
+
containerOverrides?: GridLayoutProps;
|
|
268
|
+
ariaLabel?: string;
|
|
269
|
+
handleClick?: HandleCardClick;
|
|
270
|
+
image?: string;
|
|
271
|
+
baseUrl?: string;
|
|
272
|
+
eventContext?: EventContext;
|
|
273
|
+
}
|
|
274
|
+
export interface CancellationSection {
|
|
275
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
276
|
+
containerOverrides?: GridLayoutProps;
|
|
277
|
+
itemContainerOverrides?: GridLayoutProps;
|
|
278
|
+
itemHeaderOverrides?: StackProps & {
|
|
279
|
+
imageVisible?: boolean;
|
|
280
|
+
};
|
|
281
|
+
itemImageOverrides?: {
|
|
282
|
+
width?: number;
|
|
283
|
+
height?: number;
|
|
284
|
+
fill?: boolean;
|
|
285
|
+
};
|
|
286
|
+
header: HeaderProps;
|
|
287
|
+
layoutType?: string;
|
|
288
|
+
items: CancellationItem[];
|
|
289
|
+
primaryButton?: ButtonProps;
|
|
290
|
+
belowItemExtra?: BelowItemExtraProps;
|
|
291
|
+
showBackButton?: boolean;
|
|
292
|
+
tealiumContext?: TealiumEventContext;
|
|
293
|
+
}
|
|
294
|
+
export interface BelowItemExtraProps {
|
|
295
|
+
containerOverrides?: Partial<GridLayoutProps>;
|
|
296
|
+
label: string;
|
|
297
|
+
button: {
|
|
298
|
+
text: string;
|
|
299
|
+
href?: string;
|
|
300
|
+
id?: string;
|
|
301
|
+
};
|
|
302
|
+
baseUrl?: string;
|
|
303
|
+
eventContext?: EventContext;
|
|
304
|
+
onClick?: StepController;
|
|
305
|
+
buttonOverrides?: BaseFlagOverrides;
|
|
306
|
+
iconOverrides?: NewsKitIconProps['overrides'];
|
|
307
|
+
marginInline?: MQ<string>;
|
|
308
|
+
}
|
|
309
|
+
export interface DowngradeContextProps extends CancelSubscriptionDowngradeProps {
|
|
310
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
311
|
+
showBackButton?: boolean;
|
|
312
|
+
tealiumContext?: TealiumEventContext;
|
|
313
|
+
}
|
|
314
|
+
export interface ConfirmCancellationContextProps extends ConfirmCancellationStepProps {
|
|
315
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
316
|
+
showBackButton?: boolean;
|
|
317
|
+
tealiumContext?: TealiumEventContext;
|
|
318
|
+
}
|
|
319
|
+
export interface CancellationStepperContextOptions extends Partial<InteractiveContextOptions>, Partial<NonInteractiveContextOptions> {
|
|
320
|
+
containerOverrides?: GridLayoutProps;
|
|
321
|
+
components: Record<string, CancellationSection | DowngradeContextProps | ConfirmCancellationContextProps | CancellationDetailsContextProps>;
|
|
322
|
+
componentSequence: Record<string, string[]>;
|
|
323
|
+
showBackButton?: boolean;
|
|
324
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
325
|
+
}
|
|
326
|
+
export interface SectionListItemProps {
|
|
327
|
+
type: string;
|
|
328
|
+
}
|
|
243
329
|
export interface AccountLandingPageSection {
|
|
244
330
|
type: SectionTypes;
|
|
245
331
|
billingType?: SectionBillingType;
|
|
246
|
-
componentType
|
|
332
|
+
componentType?: string;
|
|
333
|
+
layoutType?: string;
|
|
247
334
|
props?: ContentContainerProps | CardContentContainerProps | CancelSubscriptionProps;
|
|
248
335
|
}
|
|
249
336
|
export declare enum SectionTypes {
|
|
250
337
|
'Digital' = "digital",
|
|
251
|
-
'Print' = "print"
|
|
252
|
-
'all' = "all"
|
|
338
|
+
'Print' = "print"
|
|
253
339
|
}
|
|
254
340
|
export declare enum SectionBillingType {
|
|
255
341
|
'AllBilling' = "all_billing",
|
|
@@ -282,7 +368,7 @@ export interface PaymentPageContextOptions extends BaseContextOptionsWithUserDat
|
|
|
282
368
|
paymentType?: string;
|
|
283
369
|
infoPanel: InfoPanel;
|
|
284
370
|
cancelButton?: ButtonProps & {
|
|
285
|
-
eventContext:
|
|
371
|
+
eventContext: EventContext;
|
|
286
372
|
};
|
|
287
373
|
tealiumContext?: TealiumEventContext;
|
|
288
374
|
paymentMethodsMap?: PaymentMethodsMap;
|
|
@@ -555,7 +641,7 @@ export interface FamilyContextOptions extends NonInteractiveContextOptions {
|
|
|
555
641
|
cancelTextVariantB: string;
|
|
556
642
|
eventNavigationNameCancel: string;
|
|
557
643
|
eventNavigationNameRemove: string;
|
|
558
|
-
eventContext: EventContext
|
|
644
|
+
eventContext: Omit<EventContext, 'event_navigation_name'>;
|
|
559
645
|
};
|
|
560
646
|
memberNameOverrides: {
|
|
561
647
|
stylePreset: MQ<string>;
|
|
@@ -633,21 +719,14 @@ export interface FamilyContextOptions extends NonInteractiveContextOptions {
|
|
|
633
719
|
eventContext: EventContext;
|
|
634
720
|
};
|
|
635
721
|
}
|
|
636
|
-
export interface UserHubContainerOverrides {
|
|
637
|
-
rows: MQ<string>;
|
|
638
|
-
columns?: MQ<string>;
|
|
639
|
-
justifyContent: MQ<string>;
|
|
640
|
-
overrides: {
|
|
641
|
-
paddingBlock: MQ<string>;
|
|
642
|
-
paddingInline: MQ<string>;
|
|
643
|
-
minWidth: MQ<string>;
|
|
644
|
-
};
|
|
645
|
-
}
|
|
646
722
|
export interface UserHubSection {
|
|
647
723
|
header: HeaderProps;
|
|
648
|
-
containerOverrides?:
|
|
724
|
+
containerOverrides?: GridLayoutProps;
|
|
649
725
|
items: UserHubItemProps[];
|
|
650
726
|
dataTestId: string;
|
|
727
|
+
contextName?: ContextName;
|
|
728
|
+
componentType?: string;
|
|
729
|
+
layoutType?: string;
|
|
651
730
|
}
|
|
652
731
|
export declare enum NewsletterNameId {
|
|
653
732
|
'Times+' = "147",
|
|
@@ -688,7 +767,7 @@ export interface UserHubNewslettersSection {
|
|
|
688
767
|
header: HeaderProps;
|
|
689
768
|
'data-testid'?: string;
|
|
690
769
|
newslettersListProps: NewslettersListProps;
|
|
691
|
-
containerOverrides?:
|
|
770
|
+
containerOverrides?: GridLayoutProps;
|
|
692
771
|
}
|
|
693
772
|
export interface UserHubContextOptions extends NonInteractiveContextOptions {
|
|
694
773
|
tealiumContext?: TealiumEventContext;
|
|
@@ -738,5 +817,5 @@ export interface ConfirmAccountDeletionContextOptions extends AccountDeletionCon
|
|
|
738
817
|
export type ContextNameProps = {
|
|
739
818
|
contextName: ContextName;
|
|
740
819
|
};
|
|
741
|
-
export type ContextOptions = HolidayStopContextOptions | PaymentPageContextOptions | AccountLandingPageContextOptions | CancellationContextOptions | EditFieldContextOptions | SubscriptionAndBillingContextOptions | BaseContextOptions | AddFieldContextOption | AccountDeletionContextOptions | ConfirmAccountDeletionContextOptions;
|
|
820
|
+
export type ContextOptions = HolidayStopContextOptions | PaymentPageContextOptions | AccountLandingPageContextOptions | CancellationContextOptions | EditFieldContextOptions | SubscriptionAndBillingContextOptions | BaseContextOptions | AddFieldContextOption | AccountDeletionContextOptions | ConfirmAccountDeletionContextOptions | CancellationStepperContextOptions;
|
|
742
821
|
export {};
|
|
@@ -21,12 +21,12 @@ var ContextName;
|
|
|
21
21
|
ContextName["confirmAccountDeletion"] = "confirmAccountDeletion";
|
|
22
22
|
ContextName["family"] = "family";
|
|
23
23
|
ContextName["userHubPage"] = "userHubPage";
|
|
24
|
+
ContextName["CancellationStepper"] = "CancellationStepper";
|
|
24
25
|
})(ContextName || (exports.ContextName = ContextName = {}));
|
|
25
26
|
var SectionTypes;
|
|
26
27
|
(function (SectionTypes) {
|
|
27
28
|
SectionTypes["Digital"] = "digital";
|
|
28
29
|
SectionTypes["Print"] = "print";
|
|
29
|
-
SectionTypes["all"] = "all";
|
|
30
30
|
})(SectionTypes || (exports.SectionTypes = SectionTypes = {}));
|
|
31
31
|
var SectionBillingType;
|
|
32
32
|
(function (SectionBillingType) {
|
|
@@ -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":";;;AA0MA,IAAY,WAoBX;AApBD,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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AA;IACnB,qCAAmB,CAAA;IACnB,kCAAgB,CAAA;AAClB,CAAC,EA3BW,gBAAgB,gCAAhB,gBAAgB,QA2B3B;AA4BD,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;AAC3B,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC"}
|
|
@@ -65,20 +65,20 @@ var pageProvidersMapper = {
|
|
|
65
65
|
};
|
|
66
66
|
var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
67
67
|
var provider, apolloClient, providerResponse, pageProvider, err_1, userData, subscriptions, isEligible, featureFlags, optimizelyData, err_2, handleMfaError, isStepUpMfaEnabled, cookie, stepUpMfaToken, isTNLMobileApp, apolloMfaClient, stepUpProvider, err_3;
|
|
68
|
-
var _c, _d, _e;
|
|
69
|
-
var context = _b.context, props = _b.props, options = _b.options,
|
|
70
|
-
return __generator(this, function (
|
|
71
|
-
switch (
|
|
68
|
+
var _c, _d, _e, _f;
|
|
69
|
+
var context = _b.context, props = _b.props, options = _b.options, _g = _b.enableStepUpMfa, enableStepUpMfa = _g === void 0 ? false : _g;
|
|
70
|
+
return __generator(this, function (_h) {
|
|
71
|
+
switch (_h.label) {
|
|
72
72
|
case 0:
|
|
73
73
|
provider = context.provider;
|
|
74
74
|
return [4 /*yield*/, (0, api_1.createApolloClient)(api_1.ClientTypes.main, ((_c = context.req.headers) === null || _c === void 0 ? void 0 : _c.cookie) || '', undefined, undefined, undefined, { enableStepUpMfa: false })];
|
|
75
75
|
case 1:
|
|
76
|
-
apolloClient =
|
|
76
|
+
apolloClient = _h.sent();
|
|
77
77
|
providerResponse = {};
|
|
78
78
|
pageProvider = pageProvidersMapper[provider] || providersTimes_1.genericPageProvider;
|
|
79
|
-
|
|
79
|
+
_h.label = 2;
|
|
80
80
|
case 2:
|
|
81
|
-
|
|
81
|
+
_h.trys.push([2, 4, , 5]);
|
|
82
82
|
return [4 /*yield*/, pageProvider({
|
|
83
83
|
apolloClient: apolloClient,
|
|
84
84
|
context: context,
|
|
@@ -86,10 +86,10 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
86
86
|
provider: provider || types_1.ProviderTypes.PersonalDetails,
|
|
87
87
|
})];
|
|
88
88
|
case 3:
|
|
89
|
-
providerResponse =
|
|
89
|
+
providerResponse = _h.sent();
|
|
90
90
|
return [3 /*break*/, 5];
|
|
91
91
|
case 4:
|
|
92
|
-
err_1 =
|
|
92
|
+
err_1 = _h.sent();
|
|
93
93
|
(0, helpers_1.handleNewRelicErrorLog)({
|
|
94
94
|
requestName: "getProviderPropsTimes - ".concat(provider),
|
|
95
95
|
reqError: err_1,
|
|
@@ -110,16 +110,22 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
featureFlags = {};
|
|
113
|
-
|
|
113
|
+
_h.label = 6;
|
|
114
114
|
case 6:
|
|
115
|
-
|
|
116
|
-
optimizelyData = (0, featureFlagUtils_1.prepareOptimizelyData)(
|
|
117
|
-
|
|
115
|
+
_h.trys.push([6, 8, , 9]);
|
|
116
|
+
optimizelyData = (0, featureFlagUtils_1.prepareOptimizelyData)(userData, {
|
|
117
|
+
cookies: context.req.cookies,
|
|
118
|
+
});
|
|
119
|
+
return [4 /*yield*/, (0, feature_flags_1.getAllFeatureFlags)((0, featureFlagUtils_1.getUserAttributes)({
|
|
120
|
+
headers: context.req.headers,
|
|
121
|
+
cookies: context.req.cookies,
|
|
122
|
+
query: context.query,
|
|
123
|
+
}, optimizelyData))];
|
|
118
124
|
case 7:
|
|
119
|
-
featureFlags = (
|
|
125
|
+
featureFlags = (_h.sent());
|
|
120
126
|
return [3 /*break*/, 9];
|
|
121
127
|
case 8:
|
|
122
|
-
err_2 =
|
|
128
|
+
err_2 = _h.sent();
|
|
123
129
|
(0, helpers_1.handleNewRelicErrorLog)({
|
|
124
130
|
requestName: 'getProviderPropsTimes - getAllFeatureFlags',
|
|
125
131
|
reqError: err_2,
|
|
@@ -129,9 +135,9 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
129
135
|
handleMfaError = function (errorCode) {
|
|
130
136
|
context.res.setHeader('Set-Cookie', "stepup_access_token=; path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT");
|
|
131
137
|
};
|
|
132
|
-
isStepUpMfaEnabled = enableStepUpMfa && featureFlags.enable_mfa;
|
|
138
|
+
isStepUpMfaEnabled = enableStepUpMfa && featureFlags.enable_mfa && ((_e = userData === null || userData === void 0 ? void 0 : userData.user) === null || _e === void 0 ? void 0 : _e.email);
|
|
133
139
|
if (!isStepUpMfaEnabled) return [3 /*break*/, 14];
|
|
134
|
-
cookie = ((
|
|
140
|
+
cookie = ((_f = context.req.headers) === null || _f === void 0 ? void 0 : _f.cookie)
|
|
135
141
|
? "".concat(context.req.headers.cookie, ";stepup_access_token=").concat(context.req.headers.stepup_access_token || '')
|
|
136
142
|
: '';
|
|
137
143
|
stepUpMfaToken = (0, helpers_1.getStepUpMfaToken)(context.req.headers);
|
|
@@ -145,21 +151,21 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
145
151
|
},
|
|
146
152
|
}];
|
|
147
153
|
}
|
|
148
|
-
|
|
154
|
+
_h.label = 10;
|
|
149
155
|
case 10:
|
|
150
|
-
|
|
156
|
+
_h.trys.push([10, 13, , 14]);
|
|
151
157
|
return [4 /*yield*/, (0, api_1.createApolloClient)(api_1.ClientTypes.main, cookie, undefined, undefined, undefined, {
|
|
152
158
|
enableStepUpMfa: true,
|
|
153
159
|
handleMfaError: handleMfaError,
|
|
154
160
|
})];
|
|
155
161
|
case 11:
|
|
156
|
-
apolloMfaClient =
|
|
162
|
+
apolloMfaClient = _h.sent();
|
|
157
163
|
return [4 /*yield*/, (0, providers_1.stepUpMfaProvider)({
|
|
158
164
|
apolloClient: apolloMfaClient,
|
|
159
165
|
options: options,
|
|
160
166
|
})];
|
|
161
167
|
case 12:
|
|
162
|
-
stepUpProvider =
|
|
168
|
+
stepUpProvider = _h.sent();
|
|
163
169
|
if (stepUpProvider.data.authorizeUri.mfaUri) {
|
|
164
170
|
return [2 /*return*/, {
|
|
165
171
|
redirect: {
|
|
@@ -170,7 +176,7 @@ var getProviderPropsTimes = function (_a) { return __awaiter(void 0, [_a], void
|
|
|
170
176
|
}
|
|
171
177
|
return [3 /*break*/, 14];
|
|
172
178
|
case 13:
|
|
173
|
-
err_3 =
|
|
179
|
+
err_3 = _h.sent();
|
|
174
180
|
console.error('Error setting up stepup mfa');
|
|
175
181
|
handleMfaError();
|
|
176
182
|
return [2 /*return*/, {
|
|
@@ -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,+DAAgF;AAChF,+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,EAC3C,iBAAW,CAAC,IAAI,EAChB,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,OAAO,0CAAE,MAAM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GrB;gBAEF,IAAI,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;oBAC5C,sBAAO;4BACL,QAAQ,EAAE;gCACR,WAAW,EAAE,cAAc,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM;gCACpD,SAAS,EAAE,IAAI;6BAChB;yBACF,EAAA;gBACH,CAAC;;;;gBAED,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAA;gBAC5C,cAAc,EAAE,CAAA;gBAEhB,sBAAO;wBACL,QAAQ,EAAE;4BACR,SAAS,EAAE,IAAI;4BACf,WAAW,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;AAvKY,QAAA,qBAAqB,yBAuKjC"}
|
|
@@ -39,6 +39,7 @@ var mutationsMap = {
|
|
|
39
39
|
inviteFamilyLink: queries_1.mutateCreateShareLink,
|
|
40
40
|
dob: queries_1.mutateUserBroadcasting,
|
|
41
41
|
gender: queries_1.mutateUserBroadcasting,
|
|
42
|
+
cancelSubscription: queries_1.mutateCancellation,
|
|
42
43
|
};
|
|
43
44
|
var getMutationVariables = function (
|
|
44
45
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiHandlerUtils.js","sourceRoot":"","sources":["../../../src/helpers/apiHandlerUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wCAkBqB;AACrB,oCAAqC;AAErC,IAAM,cAAc,GAAG,kBAAS,KAAK,cAAc,CAAA;AAEnD,IAAM,YAAY,GAAG;IACnB,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,gCAAsB,CAAC,CAAC,CAAC,oBAAU;IAC1D,WAAW,EAAE,oBAAU;I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,OAAA;gBACL,aAAa,EAAE,aAAa,IAAI,KAAK;gBACrC,WAAW,EAAE;oBACX,KAAK,OAAA;oBACL,QAAQ,UAAA;oBACR,OAAO,SAAA;iBACR;aACF;SACF,CAAA;IACH,CAAC;IAED,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO;YACL,KAAK,EAAE;gBACL,OAAO,wBAAO,KAAK,KAAE,OAAO,EAAE,EAAE,cAAc,EAAE,KAAK,CAAC,OAAO,EAAE,GAAE;aAClE;SACF,CAAA;IACH,CAAC;IAED,IAAI,mBAAmB,KAAK,qBAAqB,EAAE,CAAC;QAClD,IAAM,iBAAiB,GAAG;YACxB,KAAK,EAAE;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,MAAM,EAAE,KAAK,CAAC,kBAAkB;aACjC;SACF,CAAA;QACD,OAAO,iBAAiB,CAAA;IAC1B,CAAC;IAED,IAAI,mBAAmB,KAAK,oBAAoB,EAAE,CAAC;QACjD,OAAO;YACL,KAAK,wBACA,KAAK,KACR,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,SAAS,CAAC,EACtC,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,GACrC;SACF,CAAA;IACH,CAAC;IACD,OAAO,EAAE,KAAK,OAAA,EAAE,CAAA;AAClB,CAAC,CAAA;AA3EY,QAAA,oBAAoB,wBA2EhC;AAEM,IAAM,WAAW,GAAG,UAAC,GAAW;IACrC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA;AAFY,QAAA,WAAW,eAEvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateType, ReplaceDateOptions } from './dateUtils';
|
|
2
|
+
export type GetSubscriptionEndMessage = (messages: {
|
|
3
|
+
daysRemaining: string;
|
|
4
|
+
monthsRemaining: string;
|
|
5
|
+
}, date: DateType, options?: Partial<ReplaceDateOptions>) => string;
|
|
6
|
+
export declare const getSubscriptionEndMessage: GetSubscriptionEndMessage;
|
|
7
|
+
export declare const replaceRemainingSubscriptionTime: (text: string, billCycleDate: DateType) => string;
|
|
8
|
+
export declare const replaceSubscriptionName: (text: string, subscriptionName: string) => string;
|
|
9
|
+
export declare const cancelSubscription: (subscriptionId: string, reason: string) => Promise<Response>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
+
};
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.cancelSubscription = exports.replaceSubscriptionName = exports.replaceRemainingSubscriptionTime = exports.getSubscriptionEndMessage = void 0;
|
|
43
|
+
var cookie_1 = __importDefault(require("cookie"));
|
|
44
|
+
var api_1 = require("@newskit-render/api");
|
|
45
|
+
var dateUtils_1 = require("./dateUtils");
|
|
46
|
+
var getSubscriptionEndMessage = function (messages, billCycleDate, options) {
|
|
47
|
+
if (options === void 0) { options = {}; }
|
|
48
|
+
var dateNow = new Date();
|
|
49
|
+
return (0, dateUtils_1.isSameDate)(billCycleDate, dateNow)
|
|
50
|
+
? messages.monthsRemaining
|
|
51
|
+
: (0, dateUtils_1.replaceDate)(messages.daysRemaining, billCycleDate, options);
|
|
52
|
+
};
|
|
53
|
+
exports.getSubscriptionEndMessage = getSubscriptionEndMessage;
|
|
54
|
+
var replaceRemainingSubscriptionTime = function (text, billCycleDate) {
|
|
55
|
+
var dateNow = new Date();
|
|
56
|
+
var remainingDays = (0, dateUtils_1.differenceInDays)(dateNow, billCycleDate);
|
|
57
|
+
if (remainingDays === 0) {
|
|
58
|
+
// if the user cancels on the billing date the subscription will be cancelled after 1 month
|
|
59
|
+
var timeRemaining = '1';
|
|
60
|
+
var timePeriod = 'month';
|
|
61
|
+
return text
|
|
62
|
+
.replace('##TIME_REMAINING##', timeRemaining)
|
|
63
|
+
.replace('##TIME_PERIOD##', timePeriod);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
var timePeriod = remainingDays === 1 ? 'day' : 'days';
|
|
67
|
+
return text
|
|
68
|
+
.replace('##TIME_REMAINING##', remainingDays.toString())
|
|
69
|
+
.replace('##TIME_PERIOD##', timePeriod);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.replaceRemainingSubscriptionTime = replaceRemainingSubscriptionTime;
|
|
73
|
+
var replaceSubscriptionName = function (text, subscriptionName) { return text.replace('##SUBSCRIPTION_NAME##', subscriptionName); };
|
|
74
|
+
exports.replaceSubscriptionName = replaceSubscriptionName;
|
|
75
|
+
var cancelSubscription = function (subscriptionId, reason) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
|
+
var cookies, accountProviderCookieName;
|
|
77
|
+
return __generator(this, function (_a) {
|
|
78
|
+
cookies = cookie_1.default.parse(document.cookie);
|
|
79
|
+
accountProviderCookieName = (0, api_1.findCookieName)(cookies);
|
|
80
|
+
return [2 /*return*/, fetch('/api/account/mutate', {
|
|
81
|
+
method: 'POST',
|
|
82
|
+
redirect: 'follow',
|
|
83
|
+
headers: {
|
|
84
|
+
'Content-Type': 'application/json',
|
|
85
|
+
acs: cookie_1.default.serialize(accountProviderCookieName, cookies[accountProviderCookieName]),
|
|
86
|
+
},
|
|
87
|
+
body: JSON.stringify({
|
|
88
|
+
code: subscriptionId,
|
|
89
|
+
reason: reason,
|
|
90
|
+
validationSchemaKey: 'cancelSubscription',
|
|
91
|
+
}),
|
|
92
|
+
})];
|
|
93
|
+
});
|
|
94
|
+
}); };
|
|
95
|
+
exports.cancelSubscription = cancelSubscription;
|
|
96
|
+
//# sourceMappingURL=cancellationUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellationUtils.js","sourceRoot":"","sources":["../../../src/helpers/cancellationUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA2B;AAC3B,2CAAoD;AACpD,yCAMoB;AAWb,IAAM,yBAAyB,GAA8B,UAClE,QAAQ,EACR,aAAa,EACb,OAAY;IAAZ,wBAAA,EAAA,YAAY;IAEZ,IAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAA;IAC1B,OAAO,IAAA,sBAAU,EAAC,aAAa,EAAE,OAAO,CAAC;QACvC,CAAC,CAAC,QAAQ,CAAC,eAAe;QAC1B,CAAC,CAAC,IAAA,uBAAW,EAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,EAAE,OAAO,CAAC,CAAA;AACjE,CAAC,CAAA;AATY,QAAA,yBAAyB,6BASrC;AAEM,IAAM,gCAAgC,GAAG,UAC9C,IAAY,EACZ,aAAuB;IAEvB,IAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAA;IAC1B,IAAM,aAAa,GAAG,IAAA,4BAAgB,EAAC,OAAO,EAAE,aAAa,CAAC,CAAA;IAE9D,IAAI,aAAa,KAAK,CAAC,EAAE,CAAC;QACxB,2FAA2F;QAC3F,IAAM,aAAa,GAAG,GAAG,CAAA;QACzB,IAAM,UAAU,GAAG,OAAO,CAAA;QAE1B,OAAO,IAAI;aACR,OAAO,CAAC,oBAAoB,EAAE,aAAa,CAAC;aAC5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
3
|
+
dateFormat: string;
|
|
4
|
+
placeholder: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const isSameDate: (dateA: DateType, dateB: DateType) => boolean;
|
|
7
|
+
export declare const differenceInDays: (dateA: DateType, dateB: DateType) => number;
|
|
8
|
+
export declare const replaceDate: (text: string, date: DateType, replaceOptions?: Partial<ReplaceDateOptions>) => string;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.replaceDate = exports.differenceInDays = exports.isSameDate = void 0;
|
|
15
|
+
var isSameDay_1 = require("date-fns/isSameDay");
|
|
16
|
+
var differenceInCalendarDays_1 = require("date-fns/differenceInCalendarDays");
|
|
17
|
+
var format_1 = require("date-fns/format");
|
|
18
|
+
var utc_1 = require("@date-fns/utc");
|
|
19
|
+
var isSameDate = function (dateA, dateB) {
|
|
20
|
+
return (0, isSameDay_1.isSameDay)(dateA, dateB, {
|
|
21
|
+
in: utc_1.utc,
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.isSameDate = isSameDate;
|
|
25
|
+
var differenceInDays = function (dateA, dateB) {
|
|
26
|
+
return Math.abs((0, differenceInCalendarDays_1.differenceInCalendarDays)(dateA, dateB, {
|
|
27
|
+
in: utc_1.utc,
|
|
28
|
+
}));
|
|
29
|
+
};
|
|
30
|
+
exports.differenceInDays = differenceInDays;
|
|
31
|
+
var replaceDate = function (text, date, replaceOptions) {
|
|
32
|
+
if (replaceOptions === void 0) { replaceOptions = {}; }
|
|
33
|
+
var defaultOptions = {
|
|
34
|
+
dateFormat: 'dd MMMM yyyy',
|
|
35
|
+
placeholder: '##DATE##',
|
|
36
|
+
};
|
|
37
|
+
var options = __assign(__assign({}, defaultOptions), replaceOptions);
|
|
38
|
+
var parsedDate = new utc_1.UTCDate(date);
|
|
39
|
+
var formattedDate = (0, format_1.format)(parsedDate, options.dateFormat);
|
|
40
|
+
return text.replace(options.placeholder, formattedDate);
|
|
41
|
+
};
|
|
42
|
+
exports.replaceDate = replaceDate;
|
|
43
|
+
//# sourceMappingURL=dateUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateUtils.js","sourceRoot":"","sources":["../../../src/helpers/dateUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAA8C;AAC9C,8EAA4E;AAC5E,0CAAwC;AACxC,qCAA4C;AASrC,IAAM,UAAU,GAAG,UAAC,KAAe,EAAE,KAAe;IACzD,OAAA,IAAA,qBAAS,EAAC,KAAK,EAAE,KAAK,EAAE;QACtB,EAAE,EAAE,SAAG;KACR,CAAC;AAFF,CAEE,CAAA;AAHS,QAAA,UAAU,cAGnB;AAEG,IAAM,gBAAgB,GAAG,UAAC,KAAe,EAAE,KAAe;IAC/D,OAAA,IAAI,CAAC,GAAG,CACN,IAAA,mDAAwB,EAAC,KAAK,EAAE,KAAK,EAAE;QACrC,EAAE,EAAE,SAAG;KACR,CAAC,CACH;AAJD,CAIC,CAAA;AALU,QAAA,gBAAgB,oBAK1B;AAEI,IAAM,WAAW,GAAG,UACzB,IAAY,EACZ,IAAc,EACd,cAAgD;IAAhD,+BAAA,EAAA,mBAAgD;IAEhD,IAAM,cAAc,GAAG;QACrB,UAAU,EAAE,cAAc;QAC1B,WAAW,EAAE,UAAU;KACxB,CAAA;IACD,IAAM,OAAO,yBAAQ,cAAc,GAAK,cAAc,CAAE,CAAA;IAExD,IAAM,UAAU,GAAG,IAAI,aAAO,CAAC,IAAI,CAAC,CAAA;IACpC,IAAM,aAAa,GAAG,IAAA,eAAM,EAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;IAE5D,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,aAAa,CAAC,CAAA;AACzD,CAAC,CAAA;AAfY,QAAA,WAAW,eAevB"}
|