@newskit-render/my-account 7.147.2-b0617f4c2.4 → 7.147.2-cea011b5a.16
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/Sections/CancelSubscription/CancelSubscription.d.ts +1 -1
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js +11 -17
- package/dist/cjs/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/cjs/Components/Sections/CancelSubscription/types.d.ts +2 -0
- 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/CancellationReview/CancellationReview.js +4 -10
- package/dist/cjs/Components/Sections/CancellationReview/CancellationReview.js.map +1 -1
- package/dist/cjs/Components/Sections/CancellationReview/types.d.ts +3 -3
- 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 +2 -0
- package/dist/cjs/Components/Sections/ContactSupport/ContactSupport.js +43 -0
- package/dist/cjs/Components/Sections/ContactSupport/ContactSupport.js.map +1 -0
- package/dist/cjs/Components/Sections/ContactSupport/index.d.ts +2 -0
- package/dist/cjs/Components/Sections/ContactSupport/index.js +19 -0
- package/dist/cjs/Components/Sections/ContactSupport/index.js.map +1 -0
- package/dist/cjs/Components/Sections/ContactSupport/types.d.ts +21 -0
- package/dist/cjs/Components/Sections/ContactSupport/types.js +3 -0
- package/dist/cjs/Components/Sections/ContactSupport/types.js.map +1 -0
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js +2 -6
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.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/utils.js +6 -7
- package/dist/cjs/Components/Sections/SectionContainer/utils.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js +1 -11
- package/dist/cjs/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.d.ts +1 -1
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.js +7 -24
- package/dist/cjs/Components/Sections/UserHub/SubscriptionDetailsSection.js.map +1 -1
- package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +58 -2
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +30 -14
- package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/cjs/Components/Templates/LayoutTemplate.js +29 -1
- package/dist/cjs/Components/Templates/LayoutTemplate.js.map +1 -1
- package/dist/cjs/Components/Templates/SubscriptionAndBillingRender.js +22 -0
- package/dist/cjs/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/cjs/Components/Templates/SunCancellationFlowRender.js +14 -1
- package/dist/cjs/Components/Templates/SunCancellationFlowRender.js.map +1 -1
- package/dist/cjs/Components/Templates/UserHubRender.js +16 -6
- package/dist/cjs/Components/Templates/UserHubRender.js.map +1 -1
- package/dist/cjs/Components/index.d.ts +1 -0
- package/dist/cjs/context/types.d.ts +15 -2
- package/dist/cjs/context/types.js +8 -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 +3 -0
- package/dist/cjs/helpers/dataUtils.js +7 -3
- package/dist/cjs/helpers/dataUtils.js.map +1 -1
- package/dist/cjs/helpers/dateUtils.d.ts +1 -2
- package/dist/cjs/helpers/dateUtils.js +8 -11
- package/dist/cjs/helpers/dateUtils.js.map +1 -1
- package/dist/cjs/helpers/dmccVariant.d.ts +2 -0
- package/dist/cjs/helpers/dmccVariant.js +81 -0
- package/dist/cjs/helpers/dmccVariant.js.map +1 -0
- 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 +3 -0
- package/dist/cjs/helpers/index.js +3 -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/index.d.ts +1 -0
- 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 +699 -539
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +3 -0
- package/dist/cjs/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -1
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +1 -0
- package/dist/cjs/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/cjs/pages/UserHub/UserHubContext.js +1 -0
- package/dist/cjs/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/cjs/pages/types.d.ts +9 -1
- 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/mutateSendFamilyMemberInvite.js +2 -1
- package/dist/cjs/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.d.ts +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js +11 -17
- package/dist/esm/Components/Sections/CancelSubscription/CancelSubscription.js.map +1 -1
- package/dist/esm/Components/Sections/CancelSubscription/types.d.ts +2 -0
- 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/CancellationReview/CancellationReview.js +4 -10
- package/dist/esm/Components/Sections/CancellationReview/CancellationReview.js.map +1 -1
- package/dist/esm/Components/Sections/CancellationReview/types.d.ts +3 -3
- 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 +2 -0
- package/dist/esm/Components/Sections/ContactSupport/ContactSupport.js +36 -0
- package/dist/esm/Components/Sections/ContactSupport/ContactSupport.js.map +1 -0
- package/dist/esm/Components/Sections/ContactSupport/index.d.ts +2 -0
- package/dist/esm/Components/Sections/ContactSupport/index.js +3 -0
- package/dist/esm/Components/Sections/ContactSupport/index.js.map +1 -0
- package/dist/esm/Components/Sections/ContactSupport/types.d.ts +21 -0
- package/dist/esm/Components/Sections/ContactSupport/types.js +2 -0
- package/dist/esm/Components/Sections/ContactSupport/types.js.map +1 -0
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js +2 -6
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.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/utils.js +6 -7
- package/dist/esm/Components/Sections/SectionContainer/utils.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/BaseSection.js +1 -11
- package/dist/esm/Components/Sections/UserHub/BaseSection.js.map +1 -1
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.d.ts +1 -1
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.js +9 -26
- package/dist/esm/Components/Sections/UserHub/SubscriptionDetailsSection.js.map +1 -1
- package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +58 -2
- package/dist/esm/Components/Templates/CancellationStepperRender.js +30 -14
- package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/esm/Components/Templates/LayoutTemplate.js +6 -1
- package/dist/esm/Components/Templates/LayoutTemplate.js.map +1 -1
- package/dist/esm/Components/Templates/SubscriptionAndBillingRender.js +22 -0
- package/dist/esm/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/esm/Components/Templates/SunCancellationFlowRender.js +15 -2
- package/dist/esm/Components/Templates/SunCancellationFlowRender.js.map +1 -1
- package/dist/esm/Components/Templates/UserHubRender.js +16 -6
- package/dist/esm/Components/Templates/UserHubRender.js.map +1 -1
- package/dist/esm/Components/index.d.ts +1 -0
- package/dist/esm/context/types.d.ts +15 -2
- package/dist/esm/context/types.js +7 -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 +3 -0
- package/dist/esm/helpers/dataUtils.js +5 -2
- package/dist/esm/helpers/dataUtils.js.map +1 -1
- package/dist/esm/helpers/dateUtils.d.ts +1 -2
- package/dist/esm/helpers/dateUtils.js +7 -9
- package/dist/esm/helpers/dateUtils.js.map +1 -1
- package/dist/esm/helpers/dmccVariant.d.ts +2 -0
- package/dist/esm/helpers/dmccVariant.js +76 -0
- package/dist/esm/helpers/dmccVariant.js.map +1 -0
- 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 +3 -0
- package/dist/esm/helpers/index.js +3 -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/index.d.ts +1 -0
- 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 +701 -541
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js +3 -0
- package/dist/esm/pages/SubscriptionAndBilling/Sections/CancelSubscriptionSectionContext.js.map +1 -1
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js +1 -0
- package/dist/esm/pages/SubscriptionAndBilling/SubscriptionAndBillingContext.js.map +1 -1
- package/dist/esm/pages/UserHub/UserHubContext.js +1 -0
- package/dist/esm/pages/UserHub/UserHubContext.js.map +1 -1
- package/dist/esm/pages/types.d.ts +9 -1
- 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/mutateSendFamilyMemberInvite.js +2 -1
- package/dist/esm/queries/mutateSendFamilyMemberInvite.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CancelSubscriptionProps } from './types';
|
|
2
|
-
export declare const CancelSubscription: ({
|
|
2
|
+
export declare const CancelSubscription: ({ primaryButton, secondaryButton, introductionProps, overrides, cpn, subscriptions, }: CancelSubscriptionProps) => JSX.Element;
|
|
@@ -19,26 +19,20 @@ var react_1 = __importDefault(require("react"));
|
|
|
19
19
|
var shared_components_1 = require("@newskit-render/shared-components");
|
|
20
20
|
var newskit_1 = require("newskit");
|
|
21
21
|
var ForwardButton_1 = require("../../Elements/ForwardButton/ForwardButton");
|
|
22
|
-
var helpers_1 = require("../../../helpers");
|
|
23
|
-
var
|
|
24
|
-
var hooks_1 = require("../../../hooks");
|
|
22
|
+
var helpers_1 = require("../../../helpers"); // trackEvent
|
|
23
|
+
var navigation_1 = require("next/navigation");
|
|
25
24
|
var CancelSubscription = function (_a) {
|
|
26
|
-
var _b, _c
|
|
27
|
-
var
|
|
28
|
-
var
|
|
25
|
+
var _b, _c;
|
|
26
|
+
var primaryButton = _a.primaryButton, secondaryButton = _a.secondaryButton, introductionProps = _a.introductionProps, overrides = _a.overrides, cpn = _a.cpn, subscriptions = _a.subscriptions;
|
|
27
|
+
var router = (0, navigation_1.useRouter)();
|
|
28
|
+
var handleCancelSubscriptionClick = function () {
|
|
29
|
+
var cancellationUrl = (0, helpers_1.replaceBaseURL)((secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.baseUrl) || '', secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.href);
|
|
30
|
+
router.push(cancellationUrl);
|
|
31
|
+
};
|
|
29
32
|
return (react_1.default.createElement(newskit_1.GridLayout, { "data-testid": "cancel-subscription-container", overrides: __assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.container), columnGap: { md: 'space030' }, alignItems: { xs: 'center', md: 'start' }, justifyContent: { xs: 'center', md: 'start' } },
|
|
30
|
-
react_1.default.createElement(shared_components_1.Introduction, { title: introductionProps === null || introductionProps === void 0 ? void 0 : introductionProps.title, description: introductionProps === null || introductionProps === void 0 ? void 0 : introductionProps.description, titleOverrides: __assign({ textAlign: { xs: 'center', md: 'left' } }, (
|
|
33
|
+
react_1.default.createElement(shared_components_1.Introduction, { title: introductionProps === null || introductionProps === void 0 ? void 0 : introductionProps.title, description: introductionProps === null || introductionProps === void 0 ? void 0 : introductionProps.description, titleOverrides: __assign({ textAlign: { xs: 'center', md: 'left' } }, (_b = overrides === null || overrides === void 0 ? void 0 : overrides.introduction) === null || _b === void 0 ? void 0 : _b.titleOverrides), descriptionOverrides: (_c = overrides === null || overrides === void 0 ? void 0 : overrides.introduction) === null || _c === void 0 ? void 0 : _c.descriptionOverrides }),
|
|
31
34
|
(primaryButton === null || primaryButton === void 0 ? void 0 : primaryButton.text) && (react_1.default.createElement(newskit_1.Button, __assign({ as: "a", overrides: __assign({}, overrides === null || overrides === void 0 ? void 0 : overrides.primaryButton), eventContext: primaryButton === null || primaryButton === void 0 ? void 0 : primaryButton.eventContext, href: primaryButton === null || primaryButton === void 0 ? void 0 : primaryButton.href, "data-testid": "cancel-subscription-primary-button" }, primaryButton.props), primaryButton === null || primaryButton === void 0 ? void 0 : primaryButton.text)),
|
|
32
|
-
react_1.default.createElement(ForwardButton_1.ForwardButton, { label: "or", paddingBlock: 'space060', buttonOverrides: __assign({ stylePreset: 'buttonMinimalPrimary' }, overrides === null || overrides === void 0 ? void 0 : overrides.secondaryButton), onClick:
|
|
33
|
-
(0, helpers_1.trackEvent)({
|
|
34
|
-
eventName: 'cancellation_modal_open',
|
|
35
|
-
cpn: cpn || '',
|
|
36
|
-
subscriptions: subscriptions || [],
|
|
37
|
-
tags: {},
|
|
38
|
-
});
|
|
39
|
-
setModalOpen(true);
|
|
40
|
-
}, eventContext: secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.eventContext, dataTestId: "cancel-subscription-secondary-button", button: { text: secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.text }, userTrackingData: { cpn: cpn, subscriptions: subscriptions } }),
|
|
41
|
-
modal && (react_1.default.createElement(CancelSubscriptionModal_1.CancelSubscriptionModal, { isOpen: modalOpen, onDismissModal: onDismissModal, modal: modal, featureFlags: featureFlags, cpn: cpn, subscriptions: subscriptions }))));
|
|
35
|
+
react_1.default.createElement(ForwardButton_1.ForwardButton, { label: "or", paddingBlock: 'space060', buttonOverrides: __assign({ stylePreset: 'buttonMinimalPrimary' }, overrides === null || overrides === void 0 ? void 0 : overrides.secondaryButton), onClick: handleCancelSubscriptionClick, eventContext: secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.eventContext, dataTestId: "cancel-subscription-secondary-button", button: { text: secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.text }, userTrackingData: { cpn: cpn, subscriptions: subscriptions } })));
|
|
42
36
|
};
|
|
43
37
|
exports.CancelSubscription = CancelSubscription;
|
|
44
38
|
//# sourceMappingURL=CancelSubscription.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancelSubscription.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancelSubscription/CancelSubscription.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAyB;AAEzB,uEAAgE;AAChE,mCAA4C;AAC5C,4EAA0E;AAC1E,
|
|
1
|
+
{"version":3,"file":"CancelSubscription.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancelSubscription/CancelSubscription.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAyB;AAEzB,uEAAgE;AAChE,mCAA4C;AAC5C,4EAA0E;AAC1E,4CAAiD,CAAC,aAAa;AAC/D,8CAA2C;AAEpC,IAAM,kBAAkB,GAAG,UAAC,EAOT;;QANxB,aAAa,mBAAA,EACb,eAAe,qBAAA,EACf,iBAAiB,uBAAA,EACjB,SAAS,eAAA,EACT,GAAG,SAAA,EACH,aAAa,mBAAA;IAEb,IAAM,MAAM,GAAG,IAAA,sBAAS,GAAE,CAAA;IAE1B,IAAM,6BAA6B,GAAG;QACpC,IAAM,eAAe,GAAG,IAAA,wBAAc,EACpC,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,OAAO,KAAI,EAAE,EAC9B,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,IAAI,CACtB,CAAA;QAED,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,OAAO,CACL,8BAAC,oBAAU,mBACG,+BAA+B,EAC3C,SAAS,eAAO,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,SAAS,GACpC,SAAS,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAC7B,UAAU,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EACzC,cAA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AAE,EAAE,GAAG,KAAA,EAAE,aAAa,eAAA,EAAE,GACxC,CACS,CACd,CAAA;AACH,CAAC,CAAA;AA/DY,QAAA,kBAAkB,sBA+D9B"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
2
6
|
var __assign = (this && this.__assign) || function () {
|
|
3
7
|
__assign = Object.assign || function(t) {
|
|
4
8
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -21,6 +25,7 @@ var shared_components_1 = require("@newskit-render/shared-components");
|
|
|
21
25
|
var OfferGroup_1 = __importDefault(require("../../Elements/OfferGroup"));
|
|
22
26
|
var router_1 = require("next/router");
|
|
23
27
|
var helpers_1 = require("../../../helpers");
|
|
28
|
+
var StyledGridLayout = (0, newskit_1.styled)(newskit_1.GridLayout)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n & > div {\n border: 1px solid;\n ", "\n &:not(:last-of-type) {\n border-bottom: none;\n }\n }\n"], ["\n & > div {\n border: 1px solid;\n ", "\n &:not(:last-of-type) {\n border-bottom: none;\n }\n }\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'neutral030'));
|
|
24
29
|
var CancellationOffers = function (_a) {
|
|
25
30
|
var _b;
|
|
26
31
|
var baseUrl = _a.baseUrl, header = _a.header, offersSection = _a.offersSection, benefits = _a.benefits, continueButton = _a.continueButton, continueButtonContainerOverrides = _a.continueButtonContainerOverrides, selectedOffer = _a.selectedOffer, onSelectOffer = _a.onSelectOffer, onNextStep = _a.onNextStep;
|
|
@@ -44,7 +49,9 @@ var CancellationOffers = function (_a) {
|
|
|
44
49
|
react_1.default.createElement(OfferGroup_1.default, { offers: (offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) || [], selectedOfferId: selectedOffer === null || selectedOffer === void 0 ? void 0 : selectedOffer.id, onSelect: handleSelectOffer }),
|
|
45
50
|
(benefits === null || benefits === void 0 ? void 0 : benefits.showBenefits) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
46
51
|
react_1.default.createElement(newskit_1.Divider, { overrides: __assign({ marginBlockStart: 'space040', marginBlockEnd: 'space060' }, benefits === null || benefits === void 0 ? void 0 : benefits.dividerOverrides) }),
|
|
47
|
-
(benefits === null || benefits === void 0 ? void 0 : benefits.title) && (react_1.default.createElement(
|
|
52
|
+
(benefits === null || benefits === void 0 ? void 0 : benefits.title) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
53
|
+
react_1.default.createElement(newskit_1.TextBlock, __assign({ typographyPreset: "editorialHeadline030", stylePreset: "inkContrast", marginBlockEnd: "space050" }, benefits === null || benefits === void 0 ? void 0 : benefits.titleOverrides), benefits.title),
|
|
54
|
+
react_1.default.createElement(StyledGridLayout, null, benefits.items.map(function (content) { return (react_1.default.createElement(shared_components_1.BenefitsListItem, __assign({ key: content.code }, content, { paddingBlock: "space050", paddingInline: "space050" }))); })))))),
|
|
48
55
|
((_b = continueButton === null || continueButton === void 0 ? void 0 : continueButton.button) === null || _b === void 0 ? void 0 : _b.text) && (react_1.default.createElement(newskit_1.GridLayoutItem, __assign({ column: "1 / -1", justifySelf: {
|
|
49
56
|
xs: 'stretch',
|
|
50
57
|
md: 'flex-end',
|
|
@@ -55,4 +62,5 @@ var CancellationOffers = function (_a) {
|
|
|
55
62
|
} }, continueButton === null || continueButton === void 0 ? void 0 : continueButton.buttonOverrides) }, continueButton.button.text)))));
|
|
56
63
|
};
|
|
57
64
|
exports.CancellationOffers = CancellationOffers;
|
|
65
|
+
var templateObject_1;
|
|
58
66
|
//# sourceMappingURL=CancellationOffers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationOffers.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationOffers/CancellationOffers.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CancellationOffers.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationOffers/CancellationOffers.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,mCAQgB;AAChB,uEAA4E;AAC5E,yEAAkD;AAClD,sCAAuC;AACvC,4CAAiD;AAGjD,IAAM,gBAAgB,GAAG,IAAA,gBAAM,EAAC,oBAAU,CAAC,0LAAA,6CAGrC,EAAiD,wEAKtD,KALK,IAAA,8BAAoB,EAAC,aAAa,EAAE,YAAY,CAAC,CAKtD,CAAA;AAEM,IAAM,kBAAkB,GAAG,UAAC,EAUT;;QATxB,OAAO,aAAA,EACP,MAAM,YAAA,EACN,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,cAAc,oBAAA,EACd,gCAAgC,sCAAA,EAChC,aAAa,mBAAA,EACb,aAAa,mBAAA,EACb,UAAU,gBAAA;IAEV,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAE1B,IAAM,iBAAiB,GAAG,UAAC,OAAe;;QACxC,IAAM,KAAK,GAAG,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,0CAAE,IAAI,CAAC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,EAAE,KAAK,OAAO,EAAnB,CAAmB,CAAC,CAAA;QACvE,aAAa,CAAC,KAAK,CAAC,CAAA;IACtB,CAAC,CAAA;IAED,IAAM,cAAc,GAAG,UAAC,KAA0C;QAChE,IAAI,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,KAAI,UAAU,EAAE,CAAC;YAC1C,UAAU,CAAC,KAAK,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAA;QAC3C,CAAC;aAAM,IAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,EAAE,CAAC;YAC/B,MAAM,CAAC,IAAI,CAAC,IAAA,wBAAc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ACvB,aAAa,EAAC,UAAU,IACxB,CACH,EAPgC,CAOhC,CAAC,CACe,CAClB,CACJ,CACA,CACJ;QAEA,CAAA,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,0CAAE,IAAI,KAAI,CAC/B,8BAAC,wBAAc,aACb,MAAM,EAAC,QAAQ,EACf,WAAW,EAAE;gBACX,EAAE,EAAE,SAAS;gBACb,EAAE,EAAE,UAAU;aACf,EACD,gBAAgB,EAAC,UAAU,IACvB,gCAAgC;YAEpC,8BAAC,gBAAM,IACL,QAAQ,EAAE,CAAC,aAAa,EACxB,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAC1C,SAAS,aACP,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM;wBACV,EAAE,EAAE,MAAM;qBACX,IACE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,eAAe,KAGnC,cAAc,CAAC,MAAM,CAAC,IAAI,CACpB,CACM,CAClB,CACU,CACd,CAAA;AACH,CAAC,CAAA;AA7GY,QAAA,kBAAkB,sBA6G9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextBlockProps, DividerProps, GridLayoutItem } from 'newskit';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
import { TealiumEventContext, HeaderProps, ContentContainerProps as SharedContentContainerProps } from '@newskit-render/shared-components';
|
|
3
|
+
import { TealiumEventContext, HeaderProps, ContentContainerProps as SharedContentContainerProps, BenefitsListItemContent } from '@newskit-render/shared-components';
|
|
4
4
|
import { StepController } from '../../Templates/CancellationStepperRender';
|
|
5
5
|
import { ForwardButtonProps } from '../../Elements/ForwardButton/ForwardButton';
|
|
6
6
|
import { OfferProps } from '../../Elements/OfferGroup';
|
|
@@ -25,6 +25,7 @@ export interface Benefits {
|
|
|
25
25
|
title?: string;
|
|
26
26
|
titleOverrides?: TextBlockProps;
|
|
27
27
|
dividerOverrides?: DividerProps;
|
|
28
|
+
items: BenefitsListItemContent[];
|
|
28
29
|
}
|
|
29
30
|
export interface CancellationOffersProps extends CancellationOffersContextProps {
|
|
30
31
|
selectedOffer?: OfferProps;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { GridSectionProps } from '../SectionContainer';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const appendReturnUrl: (url: string | undefined, returnUrl: string | null) => string | undefined;
|
|
3
|
+
export declare const CancellationReasons: ({ belowItemExtra, onNextStep, handleCardClick, items, ...props }: GridSectionProps) => JSX.Element;
|
|
@@ -25,11 +25,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.CancellationReasons = void 0;
|
|
28
|
+
exports.CancellationReasons = exports.appendReturnUrl = void 0;
|
|
29
29
|
var react_1 = __importDefault(require("react"));
|
|
30
30
|
var SectionContainer_1 = require("../SectionContainer");
|
|
31
|
+
var navigation_1 = require("next/navigation");
|
|
32
|
+
var RETURN_URL_PARAM = 'returnUrl';
|
|
33
|
+
var appendReturnUrl = function (url, returnUrl) {
|
|
34
|
+
if (!url || !returnUrl || url.includes("&".concat(RETURN_URL_PARAM, "="))) {
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
return "".concat(url, "&").concat(RETURN_URL_PARAM, "=").concat(returnUrl);
|
|
38
|
+
};
|
|
39
|
+
exports.appendReturnUrl = appendReturnUrl;
|
|
31
40
|
var CancellationReasons = function (_a) {
|
|
32
|
-
var belowItemExtra = _a.belowItemExtra, onNextStep = _a.onNextStep, handleCardClick = _a.handleCardClick, props = __rest(_a, ["belowItemExtra", "onNextStep", "handleCardClick"]);
|
|
41
|
+
var belowItemExtra = _a.belowItemExtra, onNextStep = _a.onNextStep, handleCardClick = _a.handleCardClick, items = _a.items, props = __rest(_a, ["belowItemExtra", "onNextStep", "handleCardClick", "items"]);
|
|
33
42
|
var onNextStepClick = function (event) {
|
|
34
43
|
var _a, _b;
|
|
35
44
|
// set selected cancellation reason when 'None of the above' button is clicked
|
|
@@ -38,7 +47,10 @@ var CancellationReasons = function (_a) {
|
|
|
38
47
|
: {})));
|
|
39
48
|
onNextStep === null || onNextStep === void 0 ? void 0 : onNextStep(event);
|
|
40
49
|
};
|
|
41
|
-
|
|
50
|
+
var searchParams = (0, navigation_1.useSearchParams)();
|
|
51
|
+
var returnUrl = searchParams.get(RETURN_URL_PARAM);
|
|
52
|
+
var updatedItems = items === null || items === void 0 ? void 0 : items.map(function (item) { return (__assign(__assign({}, item), { href: (0, exports.appendReturnUrl)(item.href, returnUrl) })); });
|
|
53
|
+
return (react_1.default.createElement(SectionContainer_1.GridSection, __assign({}, props, { belowItemExtra: belowItemExtra, onNextStep: onNextStepClick, handleCardClick: handleCardClick, items: updatedItems })));
|
|
42
54
|
};
|
|
43
55
|
exports.CancellationReasons = CancellationReasons;
|
|
44
56
|
//# sourceMappingURL=CancellationReasons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationReasons.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReasons/CancellationReasons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,wDAAmE;
|
|
1
|
+
{"version":3,"file":"CancellationReasons.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReasons/CancellationReasons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,wDAAmE;AACnE,8CAAiD;AAEjD,IAAM,gBAAgB,GAAG,WAAW,CAAA;AAE7B,IAAM,eAAe,GAAG,UAC7B,GAAuB,EACvB,SAAwB;IAExB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAI,gBAAgB,MAAG,CAAC,EA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,eACN,KAAK,IACT,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,eAAe,EAC3B,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,YAAY,IACnB,CACH,CAAA;AACH,CAAC,CAAA;AApCY,QAAA,mBAAmB,uBAoC/B"}
|
|
@@ -77,7 +77,6 @@ var shared_components_1 = require("@newskit-render/shared-components");
|
|
|
77
77
|
var dateUtils_1 = require("../../../helpers/dateUtils");
|
|
78
78
|
var cancellationUtils_1 = require("../../../helpers/cancellationUtils");
|
|
79
79
|
var CancellationButtons_1 = require("../../Elements/CancellationButtons");
|
|
80
|
-
var DATE_FORMAT = 'dd MMM, yyyy';
|
|
81
80
|
var getItemValue = function (type, subscription) {
|
|
82
81
|
var _a;
|
|
83
82
|
switch (type) {
|
|
@@ -85,7 +84,7 @@ var getItemValue = function (type, subscription) {
|
|
|
85
84
|
return (subscription === null || subscription === void 0 ? void 0 : subscription.type) || '';
|
|
86
85
|
case 'subDate':
|
|
87
86
|
return ((_a = subscription === null || subscription === void 0 ? void 0 : subscription.previewCancellation) === null || _a === void 0 ? void 0 : _a.serviceCancellationDate)
|
|
88
|
-
? (0, dateUtils_1.formatDate)(subscription.previewCancellation.serviceCancellationDate
|
|
87
|
+
? (0, dateUtils_1.formatDate)(subscription.previewCancellation.serviceCancellationDate)
|
|
89
88
|
: '';
|
|
90
89
|
default:
|
|
91
90
|
return '';
|
|
@@ -93,10 +92,9 @@ var getItemValue = function (type, subscription) {
|
|
|
93
92
|
};
|
|
94
93
|
exports.getItemValue = getItemValue;
|
|
95
94
|
var CancellationReview = function (_a) {
|
|
96
|
-
var _b;
|
|
97
95
|
var baseUrl = _a.baseUrl, header = _a.header, details = _a.details, user = _a.user, cancellationButtons = _a.cancellationButtons, selectedReason = _a.selectedReason, defaultCancellationReason = _a.defaultCancellationReason, genericErrorMessage = _a.genericErrorMessage, setServiceCancellationDate = _a.setServiceCancellationDate, handleError = _a.handleError, onNextStep = _a.onNextStep;
|
|
98
|
-
var
|
|
99
|
-
var subscription =
|
|
96
|
+
var _b = (0, react_1.useState)(false), isCancellingSubscription = _b[0], setIsCancellingSubscription = _b[1];
|
|
97
|
+
var subscription = user.subscriptions[0];
|
|
100
98
|
var showErrorToast = function () {
|
|
101
99
|
handleError === null || handleError === void 0 ? void 0 : handleError('cancellation', {}, genericErrorMessage, undefined, 4000);
|
|
102
100
|
};
|
|
@@ -110,10 +108,6 @@ var CancellationReview = function (_a) {
|
|
|
110
108
|
return [2 /*return*/];
|
|
111
109
|
}
|
|
112
110
|
selectedCancellationReason = (selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.label) || defaultCancellationReason;
|
|
113
|
-
if (!(subscription === null || subscription === void 0 ? void 0 : subscription.id) || !selectedCancellationReason) {
|
|
114
|
-
showErrorToast();
|
|
115
|
-
return [2 /*return*/];
|
|
116
|
-
}
|
|
117
111
|
setIsCancellingSubscription(true);
|
|
118
112
|
_d.label = 1;
|
|
119
113
|
case 1:
|
|
@@ -127,7 +121,7 @@ var CancellationReview = function (_a) {
|
|
|
127
121
|
case 3: return [4 /*yield*/, response.json()];
|
|
128
122
|
case 4:
|
|
129
123
|
parsedResponse = _d.sent();
|
|
130
|
-
setServiceCancellationDate
|
|
124
|
+
setServiceCancellationDate((_c = (_b = parsedResponse === null || parsedResponse === void 0 ? void 0 : parsedResponse.data) === null || _b === void 0 ? void 0 : _b.cancelSubscriptionV2) === null || _c === void 0 ? void 0 : _c.serviceCancellationDate);
|
|
131
125
|
onNextStep === null || onNextStep === void 0 ? void 0 : onNextStep(event);
|
|
132
126
|
_d.label = 5;
|
|
133
127
|
case 5: return [3 /*break*/, 8];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationReview.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReview/CancellationReview.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,mCAA+B;AAC/B,uEAI0C;AAC1C,wDAAuD;AACvD,wEAAuE;AACvE,0EAAwE;
|
|
1
|
+
{"version":3,"file":"CancellationReview.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReview/CancellationReview.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAuC;AACvC,mCAA+B;AAC/B,uEAI0C;AAC1C,wDAAuD;AACvD,wEAAuE;AACvE,0EAAwE;AAIjE,IAAM,YAAY,GAAG,UAC1B,IAAwB,EACxB,YAAuC;;IAEvC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,IAAI,KAAI,EAAE,CAAA;QACjC,KAAK,SAAS;YACZ,OAAO,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,mBAAmB,0CAAE,uBAAuB;gBAC/D,CAAC,CAAC,IAAA,sBAAU,EAAC,YAAY,CAAC,mBAAmB,CAAC,uBAAuB,CAAC;gBACtE,CAAC,CAAC,EAAE,CAAA;QACR;YACE,OAAO,EAAE,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAdY,QAAA,YAAY,gBAcxB;AAEM,IAAM,kBAAkB,GAAG,UAAC,EAYT;QAXxB,OAAO,aAAA,EACP,MAAM,YAAA,EACN,OAAO,aAAA,EACP,IAAI,UAAA,EACJ,mBAAmB,yBAAA,EACnB,cAAc,oBAAA,EACd,yBAAyB,+BAAA,EACzB,mBAAmB,yBAAA,EACnB,0BAA0B,gCAAA,EAC1B,WAAW,iBAAA,EACX,UAAU,gBAAA;IAEJ,IAAA,KACJ,IAAA,gBAAQ,EAAC,KAAK,CAAC,EADV,wBAAwB,QAAA,EAAE,2BAA2B,QAC3C,CAAA;IAEjB,IAAM,YAAY,GAAG,IAAI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ACP,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE;gBACb,SAAS,EAAE,IAAA,oBAAY,EAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC;gBAChD,WAAW,EAAE,IAAI,CAAC,gBAAgB;aACnC,EACD,aAAa,EAAE,EAAE,SAAS,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,GACxD,CACH,EAVsB,CAUtB,CAAC,CACc,CACnB;QACD,8BAAC,yCAAmB,aAClB,OAAO,EAAE,OAAO,EAChB,oBAAoB,EAAE,8BAA8B,IAChD,mBAAmB,EACvB,CACI,CACT,CAAA;AACH,CAAC,CAAA;AAjFY,QAAA,kBAAkB,sBAiF9B"}
|
|
@@ -10,14 +10,14 @@ export interface CancellationReviewContextProps {
|
|
|
10
10
|
header?: HeaderProps;
|
|
11
11
|
details?: ListItemType[];
|
|
12
12
|
cancellationButtons?: Partial<ButtonGroupProps>;
|
|
13
|
-
defaultCancellationReason
|
|
13
|
+
defaultCancellationReason: string;
|
|
14
14
|
genericErrorMessage?: GenericMessageMap;
|
|
15
15
|
}
|
|
16
16
|
export interface CancellationReviewProps extends CancellationReviewContextProps {
|
|
17
17
|
baseUrl?: string;
|
|
18
|
-
user
|
|
18
|
+
user: UserData;
|
|
19
19
|
selectedReason?: SelectionData | null;
|
|
20
20
|
onNextStep?: StepController;
|
|
21
|
-
setServiceCancellationDate
|
|
21
|
+
setServiceCancellationDate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
22
22
|
handleError?: BaseFormActions['handleError'];
|
|
23
23
|
}
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ButtonProps } from 'newskit';
|
|
3
|
-
export interface ConfirmCancellationStepProps {
|
|
4
|
-
image: {
|
|
5
|
-
src: string;
|
|
6
|
-
alt?: string;
|
|
7
|
-
loading?: 'eager' | 'lazy';
|
|
8
|
-
width?: string | number;
|
|
9
|
-
height?: string | number;
|
|
10
|
-
};
|
|
11
|
-
introduction: IntroductionProps;
|
|
12
|
-
buttonText: string;
|
|
13
|
-
buttonUrl: string;
|
|
14
|
-
buttonOverrides?: ButtonProps;
|
|
15
|
-
buttonEventContext?: EventContext;
|
|
16
|
-
baseUrl?: string;
|
|
17
|
-
serviceCancellationDate?: string | null;
|
|
18
|
-
}
|
|
1
|
+
import { ConfirmCancellationStepProps } from './index';
|
|
19
2
|
export declare const ConfirmCancellation: ({ image, buttonOverrides, buttonText, introduction, buttonEventContext, buttonUrl, baseUrl, serviceCancellationDate, }: ConfirmCancellationStepProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmCancellation.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmCancellation/ConfirmCancellation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ConfirmCancellation.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmCancellation/ConfirmCancellation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uEAAuE;AACvE,4CAAiD;AACjD,mCAAuC;AACvC,gDAAyB;AACzB,wDAAwD;AAGjD,IAAM,mBAAmB,GAAG,UAAC,EASL;QAR7B,KAAK,WAAA,EACL,eAAe,qBAAA,EACf,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,kBAAkB,wBAAA,EAClB,SAAS,eAAA,EACT,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,uBAAuB,6BAAA;IAEvB,IAAM,mBAAmB,GACvB,OAAO,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,CAAA,KAAK,QAAQ,IAAI,uBAAuB;QACtE,CAAC,CAAC,IAAA,uBAAW,EAAC,YAAY,CAAC,WAAW,EAAE,uBAAuB,CAAC;QAChE,CAAC,CAAC,EAAE,CAAA;IAER,IAAM,iBAAiB,yBAClB,YAAY,KACf,WAAW,EAAE,mBAAmB,GACjC,CAAA;IACD,OAAO,CACL,8BAAC,eAAK,IAAC,IAAI,EAAC,iBAAiB;QAC3B,8BAAC,yBAAK,aAAC,GAAG,EAAC,EAAE,IAAK,KAAK,EAAI;QAC3B,8BAAC,gCAAY,eACP,iBAAiB,IACrB,oBAAoB,sBAClB,SAAS,EAAE,QAAQ,EACnB,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE;oBAChB,EAAE,EAAE,uBAAuB;oBAC3B,EAAE,EAAE,uBAAuB;iBAC5B,IACE,YAAY,CAAC,oBAAoB,KACpC,YAAY,EAAE,UAAU,KAE1B,cAAc,aACZ,SAAS,EAAE,QAAQ,EACnB,WAAW,EAAE,aAAa,EAC1B,gBAAgB,EAAE;oBAChB,EAAE,EAAE,2BAA2B;oBAC/B,EAAE,EAAE,2BAA2B;iBAChC,EACD,iBAAiB,EAAE,UAAU,IAE1B,YAAY,CAAC,cAAc,KAEhC;QACF,8BAAC,gBAAM,aACL,SAAS,EAAE;gBACT,gBAAgB,EAAE,UAAU;aAC7B,EACD,YAAY,EAAE,kBAAkB,IAC5B,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC/D,eAAe,GAElB,UAAU,CACJ,CACH,CACT,CAAA;AACH,CAAC,CAAA;AA1DY,QAAA,mBAAmB,uBA0D/B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { ConfirmCancellationStepProps } from './index';
|
|
2
|
+
export declare const ConfirmCancellationExp2: ({ image, buttonOverrides, buttonText, introduction, buttonEventContext, buttonUrl, baseUrl, serviceCancellationDate, subType, subscriptionDetails, }: ConfirmCancellationStepProps) => JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.ConfirmCancellationExp2 = void 0;
|
|
22
|
+
var shared_components_1 = require("@newskit-render/shared-components");
|
|
23
|
+
var helpers_1 = require("../../../helpers");
|
|
24
|
+
var newskit_1 = require("newskit");
|
|
25
|
+
var react_1 = __importDefault(require("react"));
|
|
26
|
+
var dateUtils_1 = require("../../../helpers/dateUtils");
|
|
27
|
+
var StyledGridLayout = (0, newskit_1.styled)(newskit_1.GridLayout)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid;\n ", "\n"], ["\n border: 1px solid;\n ", "\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'neutral040'));
|
|
28
|
+
var StyledTextBlock = (0, newskit_1.styled)(newskit_1.TextBlock)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), (0, newskit_1.getSizingCssFromTheme)('line-height', 'sizing050'));
|
|
29
|
+
var ConfirmCancellationExp2 = function (_a) {
|
|
30
|
+
var image = _a.image, buttonOverrides = _a.buttonOverrides, buttonText = _a.buttonText, introduction = _a.introduction, buttonEventContext = _a.buttonEventContext, buttonUrl = _a.buttonUrl, _b = _a.baseUrl, baseUrl = _b === void 0 ? '' : _b, serviceCancellationDate = _a.serviceCancellationDate, subType = _a.subType, subscriptionDetails = _a.subscriptionDetails;
|
|
31
|
+
var cancellationDate = serviceCancellationDate
|
|
32
|
+
? (0, dateUtils_1.formatDate)(serviceCancellationDate)
|
|
33
|
+
: '';
|
|
34
|
+
return (react_1.default.createElement(newskit_1.Stack, { flow: "vertical-center" },
|
|
35
|
+
react_1.default.createElement(newskit_1.Stack, null,
|
|
36
|
+
react_1.default.createElement(shared_components_1.Introduction, __assign({}, introduction, { descriptionOverrides: __assign(__assign({ stylePreset: 'inkSubtle', typographyPreset: {
|
|
37
|
+
xs: 'editorialParagraph010',
|
|
38
|
+
md: 'editorialParagraph020',
|
|
39
|
+
} }, introduction === null || introduction === void 0 ? void 0 : introduction.descriptionOverrides), { paddingBlock: 'space020', marginBlockEnd: 'space070' }), titleOverrides: __assign({ typographyPreset: {
|
|
40
|
+
xs: 'editorialHeadline040',
|
|
41
|
+
md: 'editorialHeadline050',
|
|
42
|
+
}, paddingBlockStart: 'space090', marginBlockEnd: 'space060', textAlign: 'start' }, introduction === null || introduction === void 0 ? void 0 : introduction.titleOverrides) }))),
|
|
43
|
+
react_1.default.createElement(newskit_1.StackChild, { marginBlockEnd: 'space080' },
|
|
44
|
+
react_1.default.createElement(shared_components_1.Image, __assign({ alt: "" }, image))),
|
|
45
|
+
react_1.default.createElement(StyledGridLayout, { columns: "4fr 5fr", columnGap: '16px', overrides: __assign({ width: '100%', marginBlockEnd: 'space100' }, subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.containerOverrides) },
|
|
46
|
+
react_1.default.createElement(StyledTextBlock, __assign({}, subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.subscriptionType.overrides), subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.subscriptionType.label),
|
|
47
|
+
react_1.default.createElement(newskit_1.TextBlock, { paddingBlock: 'space050', paddingInlineEnd: 'space040' }, subType),
|
|
48
|
+
react_1.default.createElement(newskit_1.GridLayoutItem, { column: '1 / 3' },
|
|
49
|
+
react_1.default.createElement(newskit_1.Divider, null)),
|
|
50
|
+
react_1.default.createElement(StyledTextBlock, __assign({}, subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.endDate.overrides), subscriptionDetails === null || subscriptionDetails === void 0 ? void 0 : subscriptionDetails.endDate.label),
|
|
51
|
+
react_1.default.createElement(newskit_1.TextBlock, { paddingBlock: 'space050', paddingInlineEnd: 'space040' }, cancellationDate)),
|
|
52
|
+
react_1.default.createElement(newskit_1.StackChild, { alignSelf: "flex-end" },
|
|
53
|
+
react_1.default.createElement(newskit_1.Button, __assign({ overrides: {
|
|
54
|
+
marginBlockStart: 'space020',
|
|
55
|
+
}, eventContext: buttonEventContext }, (buttonUrl ? { href: (0, helpers_1.replaceBaseURL)(baseUrl, buttonUrl) } : {}), buttonOverrides), buttonText))));
|
|
56
|
+
};
|
|
57
|
+
exports.ConfirmCancellationExp2 = ConfirmCancellationExp2;
|
|
58
|
+
var templateObject_1, templateObject_2;
|
|
59
|
+
//# sourceMappingURL=ConfirmCancellationExp2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmCancellationExp2.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmCancellation/ConfirmCancellationExp2.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,uEAAuE;AACvE,4CAAiD;AACjD,mCAWgB;AAChB,gDAAyB;AACzB,wDAAuD;AAGvD,IAAM,gBAAgB,GAAG,IAAA,gBAAM,EAAC,oBAAU,CAAC,qGAAA,4BAEvC,EAAiD,IACpD,KADG,IAAA,8BAAoB,EAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AAED,IAAM,eAAe,GAAG,IAAA,gBAAM,EAAC,mBAAS,CAAC,+EAAA,MACrC,EAAiD,I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AAc,EAAE,UAAU,IACvB,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,kBAAkB;YAG5C,8BAAC,eAAe,eAAK,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,gBAAgB,CAAC,SAAS,GACjE,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,gBAAgB,CAAC,KAAK,CAC5B;YAClB,8BAAC,mBAAS,IAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,IAC9D,OAAO,CACE;YAEZ,8BAAC,wBAAc,IAAC,MAAM,EAAE,OAAO;gBAC7B,8BAAC,iBAAO,OAAG,CACI;YAEjB,8BAAC,eAAe,eAAK,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,OAAO,CAAC,SAAS,GACxD,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,OAAO,CAAC,KAAK,CACnB;YAClB,8BAAC,mBAAS,IAAC,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,IAC9D,gBAAgB,CACP,CACK;QAEnB,8BAAC,oBAAU,IAAC,SAAS,EAAC,UAAU;YAC9B,8BAAC,gBAAM,aACL,SAAS,EAAE;oBACT,gBAAgB,EAAE,UAAU;iBAC7B,EACD,YAAY,EAAE,kBAAkB,IAC5B,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC/D,eAAe,GAElB,UAAU,CACJ,CACE,CACP,CACT,CAAA;AACH,CAAC,CAAA;AAxFY,QAAA,uBAAuB,2BAwFnC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { DetailedFlags } from '@newskit-render/feature-flags';
|
|
2
|
+
import { EventContext, IntroductionProps } from '@newskit-render/shared-components';
|
|
3
|
+
import { GridLayoutProps } from 'Components/SharedTypes/GridLayoutProps';
|
|
4
|
+
import { ButtonProps, TextBlockProps } from 'newskit';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface ConfirmCancellationStepProps {
|
|
7
|
+
image: {
|
|
8
|
+
src: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
loading?: 'eager' | 'lazy';
|
|
11
|
+
width?: string | number;
|
|
12
|
+
height?: string | number;
|
|
13
|
+
};
|
|
14
|
+
introduction: IntroductionProps;
|
|
15
|
+
buttonText: string;
|
|
16
|
+
buttonUrl: string;
|
|
17
|
+
buttonOverrides?: ButtonProps;
|
|
18
|
+
buttonEventContext?: EventContext;
|
|
19
|
+
baseUrl?: string;
|
|
20
|
+
serviceCancellationDate?: string | null;
|
|
21
|
+
subType?: string;
|
|
22
|
+
featureFlags?: DetailedFlags;
|
|
23
|
+
subscriptionDetails?: {
|
|
24
|
+
containerOverrides?: GridLayoutProps['overrides'];
|
|
25
|
+
subscriptionType: {
|
|
26
|
+
label: string;
|
|
27
|
+
overrides?: TextBlockProps;
|
|
28
|
+
};
|
|
29
|
+
endDate: {
|
|
30
|
+
label: string;
|
|
31
|
+
overrides?: TextBlockProps;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export declare const ConfirmCancellationRender: ({ featureFlags, ...rest }: ConfirmCancellationStepProps) => React.CElement<{
|
|
36
|
+
image: {
|
|
37
|
+
src: string;
|
|
38
|
+
alt?: string;
|
|
39
|
+
loading?: "eager" | "lazy";
|
|
40
|
+
width?: string | number;
|
|
41
|
+
height?: string | number;
|
|
42
|
+
};
|
|
43
|
+
introduction: IntroductionProps;
|
|
44
|
+
buttonText: string;
|
|
45
|
+
buttonUrl: string;
|
|
46
|
+
buttonOverrides?: ButtonProps;
|
|
47
|
+
buttonEventContext?: EventContext;
|
|
48
|
+
baseUrl?: string;
|
|
49
|
+
serviceCancellationDate?: string | null;
|
|
50
|
+
subType?: string;
|
|
51
|
+
subscriptionDetails?: {
|
|
52
|
+
containerOverrides?: GridLayoutProps["overrides"];
|
|
53
|
+
subscriptionType: {
|
|
54
|
+
label: string;
|
|
55
|
+
overrides?: TextBlockProps;
|
|
56
|
+
};
|
|
57
|
+
endDate: {
|
|
58
|
+
label: string;
|
|
59
|
+
overrides?: TextBlockProps;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}, React.Component<{
|
|
63
|
+
image: {
|
|
64
|
+
src: string;
|
|
65
|
+
alt?: string;
|
|
66
|
+
loading?: "eager" | "lazy";
|
|
67
|
+
width?: string | number;
|
|
68
|
+
height?: string | number;
|
|
69
|
+
};
|
|
70
|
+
introduction: IntroductionProps;
|
|
71
|
+
buttonText: string;
|
|
72
|
+
buttonUrl: string;
|
|
73
|
+
buttonOverrides?: ButtonProps;
|
|
74
|
+
buttonEventContext?: EventContext;
|
|
75
|
+
baseUrl?: string;
|
|
76
|
+
serviceCancellationDate?: string | null;
|
|
77
|
+
subType?: string;
|
|
78
|
+
subscriptionDetails?: {
|
|
79
|
+
containerOverrides?: GridLayoutProps["overrides"];
|
|
80
|
+
subscriptionType: {
|
|
81
|
+
label: string;
|
|
82
|
+
overrides?: TextBlockProps;
|
|
83
|
+
};
|
|
84
|
+
endDate: {
|
|
85
|
+
label: string;
|
|
86
|
+
overrides?: TextBlockProps;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}, any, any>>;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
25
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
|
+
};
|
|
27
|
+
var _a;
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.ConfirmCancellationRender = void 0;
|
|
30
|
+
var react_1 = __importDefault(require("react"));
|
|
31
|
+
var constants_1 = require("../../../constants");
|
|
32
|
+
var ConfirmCancellation_1 = require("./ConfirmCancellation");
|
|
33
|
+
var ConfirmCancellationExp2_1 = require("./ConfirmCancellationExp2");
|
|
34
|
+
var componentMap = (_a = {},
|
|
35
|
+
_a[constants_1.CANCELLATION_EXPERIMENT.VARIANT_1_ON] = ConfirmCancellation_1.ConfirmCancellation,
|
|
36
|
+
_a[constants_1.CANCELLATION_EXPERIMENT.VARIANT_2_A] = ConfirmCancellationExp2_1.ConfirmCancellationExp2,
|
|
37
|
+
_a.default = ConfirmCancellation_1.ConfirmCancellation,
|
|
38
|
+
_a);
|
|
39
|
+
var ConfirmCancellationRender = function (_a) {
|
|
40
|
+
var _b;
|
|
41
|
+
var featureFlags = _a.featureFlags, rest = __rest(_a, ["featureFlags"]);
|
|
42
|
+
var experimentFlag = ((_b = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.enable_cancel_subscription) === null || _b === void 0 ? void 0 : _b.variationKey) || '';
|
|
43
|
+
var componentToRender = componentMap[experimentFlag] || componentMap.default;
|
|
44
|
+
return react_1.default.createElement(componentToRender, __assign({}, rest));
|
|
45
|
+
};
|
|
46
|
+
exports.ConfirmCancellationRender = ConfirmCancellationRender;
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmCancellation/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,gDAAyB;AACzB,gDAA4D;AAC5D,6DAA2D;AAC3D,qEAAmE;AAgCnE,IAAM,YAAY;IAChB,GAAC,mCAAuB,CAAC,YAAY,IAAG,yCAAmB;IAC3D,GAAC,mCAAuB,CAAC,WAAW,IAAG,iDAAuB;IAC9D,UAAO,GAAE,yCAAmB;OAC7B,CAAA;AAEM,IAAM,yBAAyB,GAAG,UAAC,EAGX;;IAF7B,IAAA,YAAY,kBAAA,EACT,IAAI,cAFiC,gBAGzC,CADQ;IAEP,IAAM,cAAc,GAClB,CAAA,MAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,0BAA0B,0CAAE,YAAY,KAAI,EAAE,CAAA;IAC9D,IAAM,iBAAiB,GAAG,YAAY,CAAC,cAAc,CAAC,IAAI,YAAY,CAAC,OAAO,CAAA;IAE9E,OAAO,eAAK,CAAC,aAAa,CAAC,iBAAiB,eAAO,IAAI,EAAG,CAAA;AAC5D,CAAC,CAAA;AATY,QAAA,yBAAyB,6BASrC"}
|