@newskit-render/my-account 7.153.2-86789c10d.16 → 7.154.0
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 +1 -1
- package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js +1 -1
- package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js.map +1 -1
- package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.d.ts +1 -4
- package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.js +3 -28
- package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.js.map +1 -1
- package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +2 -2
- package/dist/cjs/Components/Sections/CancellationDetails/types.d.ts +2 -2
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.d.ts +1 -1
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js +13 -54
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/cjs/Components/Sections/CancellationOffers/types.d.ts +4 -29
- package/dist/cjs/Components/Sections/CancellationReview/types.d.ts +2 -2
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +1 -1
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +7 -6
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +0 -2
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -1
- package/dist/cjs/Components/Sections/ContactSupport/types.d.ts +2 -2
- package/dist/cjs/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +5 -4
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +7 -6
- package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/cjs/api/queryHandler.js +13 -24
- package/dist/cjs/api/queryHandler.js.map +1 -1
- package/dist/cjs/context/types.d.ts +3 -9
- package/dist/cjs/context/types.js.map +1 -1
- package/dist/cjs/helpers/apiHandlerUtils.js +0 -1
- package/dist/cjs/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/cjs/helpers/cancellationUtils.d.ts +0 -20
- package/dist/cjs/helpers/cancellationUtils.js +1 -110
- package/dist/cjs/helpers/cancellationUtils.js.map +1 -1
- package/dist/cjs/helpers/getQuery.js +3 -2
- package/dist/cjs/helpers/getQuery.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +0 -1
- package/dist/cjs/helpers/index.js +2 -1
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/subscriptionsUtils.d.ts +1 -2
- package/dist/cjs/helpers/subscriptionsUtils.js +2 -2
- package/dist/cjs/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +18 -90
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/cjs/queries/index.d.ts +0 -2
- package/dist/cjs/queries/index.js +0 -2
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.d.ts +1 -1
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js +1 -1
- package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js.map +1 -1
- package/dist/esm/Components/Elements/TimesLoading/TimesLoading.d.ts +1 -4
- package/dist/esm/Components/Elements/TimesLoading/TimesLoading.js +3 -28
- package/dist/esm/Components/Elements/TimesLoading/TimesLoading.js.map +1 -1
- package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +2 -2
- package/dist/esm/Components/Sections/CancellationDetails/types.d.ts +2 -2
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.d.ts +1 -1
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js +13 -54
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/esm/Components/Sections/CancellationOffers/types.d.ts +4 -29
- package/dist/esm/Components/Sections/CancellationReview/types.d.ts +2 -2
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +1 -1
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +7 -6
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +0 -2
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -1
- package/dist/esm/Components/Sections/ContactSupport/types.d.ts +2 -2
- package/dist/esm/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +5 -4
- package/dist/esm/Components/Templates/CancellationStepperRender.js +8 -7
- package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/esm/api/queryHandler.js +13 -24
- package/dist/esm/api/queryHandler.js.map +1 -1
- package/dist/esm/context/types.d.ts +3 -9
- package/dist/esm/context/types.js.map +1 -1
- package/dist/esm/helpers/apiHandlerUtils.js +1 -2
- package/dist/esm/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/esm/helpers/cancellationUtils.d.ts +0 -20
- package/dist/esm/helpers/cancellationUtils.js +0 -106
- package/dist/esm/helpers/cancellationUtils.js.map +1 -1
- package/dist/esm/helpers/getQuery.js +4 -3
- package/dist/esm/helpers/getQuery.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +0 -1
- package/dist/esm/helpers/index.js +2 -1
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/esm/helpers/subscriptionsUtils.d.ts +1 -2
- package/dist/esm/helpers/subscriptionsUtils.js +2 -2
- package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +19 -91
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/esm/queries/index.d.ts +0 -2
- package/dist/esm/queries/index.js +0 -2
- package/dist/esm/queries/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.d.ts +0 -30
- package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js +0 -189
- package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js.map +0 -1
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.d.ts +0 -21
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js +0 -95
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js.map +0 -1
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.d.ts +0 -9
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js +0 -38
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js.map +0 -1
- package/dist/cjs/Components/Sections/OfferPreview/index.d.ts +0 -0
- package/dist/cjs/Components/Sections/OfferPreview/index.js +0 -2
- package/dist/cjs/Components/Sections/OfferPreview/index.js.map +0 -1
- package/dist/cjs/Components/Sections/OfferPreview/types.d.ts +0 -0
- package/dist/cjs/Components/Sections/OfferPreview/types.js +0 -2
- package/dist/cjs/Components/Sections/OfferPreview/types.js.map +0 -1
- package/dist/cjs/helpers/stringUtils.d.ts +0 -1
- package/dist/cjs/helpers/stringUtils.js +0 -9
- package/dist/cjs/helpers/stringUtils.js.map +0 -1
- package/dist/cjs/queries/getIncentivePreview.d.ts +0 -2
- package/dist/cjs/queries/getIncentivePreview.js +0 -11
- package/dist/cjs/queries/getIncentivePreview.js.map +0 -1
- package/dist/cjs/queries/mutateApplyIncentive.d.ts +0 -2
- package/dist/cjs/queries/mutateApplyIncentive.js +0 -11
- package/dist/cjs/queries/mutateApplyIncentive.js.map +0 -1
- package/dist/esm/Components/Sections/OfferPreview/OfferPreview.d.ts +0 -30
- package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js +0 -159
- package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js.map +0 -1
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.d.ts +0 -21
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js +0 -88
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js.map +0 -1
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.d.ts +0 -9
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js +0 -31
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js.map +0 -1
- package/dist/esm/Components/Sections/OfferPreview/index.d.ts +0 -0
- package/dist/esm/Components/Sections/OfferPreview/index.js +0 -2
- package/dist/esm/Components/Sections/OfferPreview/index.js.map +0 -1
- package/dist/esm/Components/Sections/OfferPreview/types.d.ts +0 -0
- package/dist/esm/Components/Sections/OfferPreview/types.js +0 -2
- package/dist/esm/Components/Sections/OfferPreview/types.js.map +0 -1
- package/dist/esm/helpers/stringUtils.d.ts +0 -1
- package/dist/esm/helpers/stringUtils.js +0 -5
- package/dist/esm/helpers/stringUtils.js.map +0 -1
- package/dist/esm/queries/getIncentivePreview.d.ts +0 -2
- package/dist/esm/queries/getIncentivePreview.js +0 -8
- package/dist/esm/queries/getIncentivePreview.js.map +0 -1
- package/dist/esm/queries/mutateApplyIncentive.d.ts +0 -2
- package/dist/esm/queries/mutateApplyIncentive.js +0 -8
- package/dist/esm/queries/mutateApplyIncentive.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { TextBlockProps, DividerProps, GridLayoutItem } from 'newskit';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
import { TealiumEventContext, HeaderProps, ContentContainerProps as SharedContentContainerProps, BenefitsListItemContent } from '@newskit-render/shared-components';
|
|
4
|
-
import {
|
|
4
|
+
import { StepController } from '../../Templates/CancellationStepperRender';
|
|
5
5
|
import { ForwardButtonProps } from '../../Elements/ForwardButton/ForwardButton';
|
|
6
6
|
import { OfferProps } from '../../Elements/OfferGroup';
|
|
7
|
-
import { UserData } from 'pages/types';
|
|
8
7
|
export interface CancellationOffersContextProps {
|
|
9
8
|
tealiumContext?: TealiumEventContext;
|
|
10
9
|
showBackButton?: boolean;
|
|
@@ -21,29 +20,6 @@ export interface OffersSection {
|
|
|
21
20
|
titleOverrides?: TextBlockProps;
|
|
22
21
|
items?: OfferProps[];
|
|
23
22
|
}
|
|
24
|
-
export interface CreditBalanceProps {
|
|
25
|
-
beforeApplyingSubscriptionCharges: string;
|
|
26
|
-
afterApplyingSubscriptionCharges: string;
|
|
27
|
-
}
|
|
28
|
-
export interface InvoiceMonthlySummaryBreakdownProps {
|
|
29
|
-
fromDate: string;
|
|
30
|
-
toDate: string;
|
|
31
|
-
creditBalance: CreditBalanceProps;
|
|
32
|
-
subscriptionCharges: string;
|
|
33
|
-
totalAmountToPay: string;
|
|
34
|
-
}
|
|
35
|
-
export interface OfferPreviewDataProps {
|
|
36
|
-
currentPropositionName: string;
|
|
37
|
-
incentiveName: string;
|
|
38
|
-
discountPercentage: number;
|
|
39
|
-
discountValue: string | null;
|
|
40
|
-
term: number;
|
|
41
|
-
billCycleDay: number;
|
|
42
|
-
serviceActivationDate: string;
|
|
43
|
-
invoiceSummary: {
|
|
44
|
-
invoiceMonthlySummaryBreakdown: InvoiceMonthlySummaryBreakdownProps[];
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
23
|
export interface Benefits {
|
|
48
24
|
showBenefits?: boolean;
|
|
49
25
|
title?: string;
|
|
@@ -52,8 +28,7 @@ export interface Benefits {
|
|
|
52
28
|
items: BenefitsListItemContent[];
|
|
53
29
|
}
|
|
54
30
|
export interface CancellationOffersProps extends CancellationOffersContextProps {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onNextStep?: NextStepProps;
|
|
31
|
+
selectedOffer?: OfferProps;
|
|
32
|
+
onSelectOffer: (offer: OfferProps | undefined) => void;
|
|
33
|
+
onNextStep?: StepController;
|
|
59
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HeaderProps, TealiumEventContext, ContentContainerProps as SharedContentContainerProps, ListItemType, ButtonGroupProps } from '@newskit-render/shared-components';
|
|
2
2
|
import { UserData } from '../../../pages/types';
|
|
3
|
-
import {
|
|
3
|
+
import { SelectionData, StepController } from '../../Templates/CancellationStepperRender';
|
|
4
4
|
import { GenericMessageMap } from '../../Elements/Toast';
|
|
5
5
|
import { BaseFormActions } from '../../../context/types';
|
|
6
6
|
export interface CancellationReviewContextProps {
|
|
@@ -17,7 +17,7 @@ export interface CancellationReviewProps extends CancellationReviewContextProps
|
|
|
17
17
|
baseUrl?: string;
|
|
18
18
|
user: UserData;
|
|
19
19
|
selectedReason?: SelectionData | null;
|
|
20
|
-
onNextStep?:
|
|
20
|
+
onNextStep?: StepController;
|
|
21
21
|
setServiceCancellationDate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
22
22
|
handleError?: BaseFormActions['handleError'];
|
|
23
23
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ConfirmSubscriptionOfferProps } from './index';
|
|
2
|
-
export declare const ConfirmSubscriptionOffer: ({ header, user, subscriptionDetails, buttonText, buttonEventContext, buttonUrl, baseUrl, buttonOverrides,
|
|
2
|
+
export declare const ConfirmSubscriptionOffer: ({ header, user, subscriptionDetails, buttonText, buttonEventContext, buttonUrl, baseUrl, buttonOverrides, }: ConfirmSubscriptionOfferProps) => JSX.Element | null;
|
|
@@ -30,20 +30,21 @@ var ListItem = function (_a) {
|
|
|
30
30
|
};
|
|
31
31
|
export var ConfirmSubscriptionOffer = function (_a) {
|
|
32
32
|
var _b;
|
|
33
|
-
var header = _a.header, user = _a.user, subscriptionDetails = _a.subscriptionDetails, buttonText = _a.buttonText, buttonEventContext = _a.buttonEventContext, buttonUrl = _a.buttonUrl, _c = _a.baseUrl, baseUrl = _c === void 0 ? '' : _c, buttonOverrides = _a.buttonOverrides
|
|
33
|
+
var header = _a.header, user = _a.user, subscriptionDetails = _a.subscriptionDetails, buttonText = _a.buttonText, buttonEventContext = _a.buttonEventContext, buttonUrl = _a.buttonUrl, _c = _a.baseUrl, baseUrl = _c === void 0 ? '' : _c, buttonOverrides = _a.buttonOverrides;
|
|
34
34
|
var subscription = (_b = user === null || user === void 0 ? void 0 : user.subscriptions) === null || _b === void 0 ? void 0 : _b[0];
|
|
35
|
-
|
|
35
|
+
var grantedIncentives = subscription === null || subscription === void 0 ? void 0 : subscription.grantedIncentives;
|
|
36
|
+
if (!subscription || !grantedIncentives)
|
|
36
37
|
return null;
|
|
37
|
-
var latestIncentive = findLatestIncentiveStartDate(
|
|
38
|
+
var latestIncentive = findLatestIncentiveStartDate(grantedIncentives);
|
|
38
39
|
if (latestIncentive === null)
|
|
39
40
|
return null;
|
|
40
|
-
var discountPercentage =
|
|
41
|
+
var discountPercentage = latestIncentive.incentive.discountPercentage;
|
|
41
42
|
var price = subscription === null || subscription === void 0 ? void 0 : subscription.price;
|
|
42
43
|
var currency = subscription === null || subscription === void 0 ? void 0 : subscription.currency;
|
|
43
44
|
var initPrice = calculateDiscountedPrice(price, discountPercentage);
|
|
44
45
|
var updates = {
|
|
45
46
|
subscriptionType: subscription.type || '',
|
|
46
|
-
offerStartDate: format(latestIncentive.
|
|
47
|
+
offerStartDate: format(latestIncentive.expectedFulfilmentStartDate, 'dd MMM yyyy'),
|
|
47
48
|
initialPrice: "".concat(formatPrice(initPrice, currency), "/month"),
|
|
48
49
|
regularPrice: "".concat(formatPrice(price, currency), "/month"),
|
|
49
50
|
};
|
|
@@ -53,7 +54,7 @@ export var ConfirmSubscriptionOffer = function (_a) {
|
|
|
53
54
|
return __assign(__assign({}, item), { key: key, description: update !== null && update !== void 0 ? update : item.description });
|
|
54
55
|
});
|
|
55
56
|
var headerTitle = (header === null || header === void 0 ? void 0 : header.title)
|
|
56
|
-
? replaceDate(header.title, latestIncentive.
|
|
57
|
+
? replaceDate(header.title, latestIncentive.expectedFulfilmentStartDate)
|
|
57
58
|
: '';
|
|
58
59
|
return (React.createElement(Stack, { flow: "vertical-center" },
|
|
59
60
|
header && (React.createElement(GridLayoutItem, null,
|
package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmSubscriptionOffer.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,OAAO,EACL,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,KAAK,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,SAAS,GACV,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,qCAAqC,CAAA;AAK5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE9D,IAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,qGAAA,4BAE/C,EAAiD,IACpD,KADG,oBAAoB,CAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AAED,IAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,qJAAA,2EAIjC,EAAyC,KAC5C,KADG,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,CAC5C,CAAA;AAED,IAAM,QAAQ,GAAG,UAAC,EAMU;QAL1B,KAAK,WAAA,EACL,WAAW,iBAAA,EACX,aAAa,mBAAA,EACb,cAAc,oBAAA,EACd,oBAAoB,0BAAA;IACW,OAAA,CAC/B,oBAAC,eAAe,aACd,aAAa,EAAC,UAAU,EACxB,YAAY,EAAC,UAAU,IACnB,aAAa;QAEjB,oBAAC,SAAS,aAAC,gBAAgB,EAAC,mBAAmB,IAAK,cAAc,GAC/D,KAAK,CACI;QACZ,oBAAC,SAAS,aACR,WAAW,EAAC,SAAS,EACrB,gBAAgB,EAAC,gBAAgB,IAC7B,oBAAoB,GAEvB,WAAW,CACF,CACI,CACnB;AAjBgC,CAiBhC,CAAA;AAED,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"ConfirmSubscriptionOffer.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC1D,OAAO,EACL,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,KAAK,EACL,UAAU,EACV,cAAc,EACd,MAAM,EACN,SAAS,GACV,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,qCAAqC,CAAA;AAK5C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAE9D,IAAM,oBAAoB,GAAG,MAAM,CAAC,cAAc,CAAC,qGAAA,4BAE/C,EAAiD,IACpD,KADG,oBAAoB,CAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AAED,IAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,qJAAA,2EAIjC,EAAyC,KAC5C,KADG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ClB;QACD,oBAAC,oBAAoB,IACnB,OAAO,EAAE,IAAI,EACb,SAAS,EAAE;gBACT,cAAc,EAAE;oBACd,EAAE,EAAE,UAAU;oBACd,EAAE,EAAE,UAAU;iBACf;aACF,IAEA,YAAY,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,CAC1B,oBAAC,QAAQ,aAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAM,IAAI,EAAI,CACtC,EAF2B,CAE3B,CAAC,CACmB;QACvB,oBAAC,UAAU,IACT,SAAS,EAAE;gBACT,EAAE,EAAE,SAAS;gBACb,EAAE,EAAE,UAAU;aACf,EACD,WAAW,EAAE;gBACX,EAAE,EAAE,UAAU;gBACd,EAAE,EAAE,UAAU;aACf;YAED,oBAAC,MAAM,aACL,YAAY,EAAE,kBAAkB,EAChC,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,EAAE,EAAE,MAAM;wBACV,EAAE,EAAE,MAAM;qBACX;iBACF,IACG,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC/D,eAAe,GAElB,UAAU,CACJ,CACE,CACP,CACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EventContext, HeaderProps } from '@newskit-render/shared-components';
|
|
2
2
|
import { UserData } from '../../../pages/types';
|
|
3
3
|
import { BlockProps, ButtonProps, TextBlockProps } from 'newskit';
|
|
4
|
-
import { PreviewIncentiveProps } from '../../../helpers';
|
|
5
4
|
export * from './ConfirmSubscriptionOffer';
|
|
6
5
|
export interface ConfirmSubscriptionOfferProps {
|
|
7
6
|
header: HeaderProps;
|
|
@@ -17,7 +16,6 @@ export interface ConfirmSubscriptionOfferProps {
|
|
|
17
16
|
buttonUrl?: string;
|
|
18
17
|
baseUrl?: string;
|
|
19
18
|
buttonOverrides?: ButtonProps;
|
|
20
|
-
incentiveData: PreviewIncentiveProps | null;
|
|
21
19
|
}
|
|
22
20
|
export interface SubscriptionOfferListItem {
|
|
23
21
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmSubscriptionOffer/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmSubscriptionOffer/index.ts"],"names":[],"mappings":"AAIA,cAAc,4BAA4B,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { GridLayoutItem, ButtonProps } from 'newskit';
|
|
3
3
|
import { TealiumEventContext, HeaderProps, ContentContainerProps as SharedContentContainerProps, ListItemType } from '@newskit-render/shared-components';
|
|
4
|
-
import {
|
|
4
|
+
import { StepController } from '../../Templates/CancellationStepperRender';
|
|
5
5
|
export interface ContactMethodListItem extends Omit<ListItemType, 'default'> {
|
|
6
6
|
default: string | string[] | JSX.Element;
|
|
7
7
|
}
|
|
@@ -17,5 +17,5 @@ export interface ContactSupportContextProps {
|
|
|
17
17
|
continueButtonContainerOverrides?: ComponentProps<typeof GridLayoutItem>;
|
|
18
18
|
}
|
|
19
19
|
export interface ContactSupportProps extends ContactSupportContextProps {
|
|
20
|
-
onNextStep?:
|
|
20
|
+
onNextStep?: StepController;
|
|
21
21
|
}
|
|
@@ -2,7 +2,7 @@ import { InfoPanel, IntroductionProps, ModalProps, ListItemType, InvoiceAndNotic
|
|
|
2
2
|
import { StandaloneLinkPropsOverridable } from '../../Elements/StandaloneLinkComponent';
|
|
3
3
|
import { MQ, ImageProps } from 'newskit';
|
|
4
4
|
import { NewslettersGridOverrides, CancellationItem, CancellationSection } from '../../../context/types';
|
|
5
|
-
import { HandleCardClick,
|
|
5
|
+
import { HandleCardClick, StepController } from '../../Templates/CancellationStepperRender';
|
|
6
6
|
import { UserData } from '../../../pages/types';
|
|
7
7
|
export type BelowContentExtra = {
|
|
8
8
|
type: 'delivery-address' | 'cancel-subscription' | 'no-billing' | 'payment-history' | 'leave-family';
|
|
@@ -34,7 +34,7 @@ export interface BaseSectionProps extends CancellationSection, CancellationItem
|
|
|
34
34
|
}
|
|
35
35
|
export interface GridSectionProps extends CancellationSection {
|
|
36
36
|
baseUrl?: string;
|
|
37
|
-
onNextStep:
|
|
37
|
+
onNextStep: StepController;
|
|
38
38
|
handleCardClick: HandleCardClick;
|
|
39
39
|
eventContext?: EventContext;
|
|
40
40
|
user?: UserData;
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { EventContext } from '@newskit-render/shared-components';
|
|
3
3
|
export declare const componentMap: {
|
|
4
4
|
reason: ({ belowItemExtra, onNextStep, handleCardClick, items, ...props }: import("../Sections/SectionContainer").GridSectionProps) => JSX.Element;
|
|
5
|
+
downgrade: React.FC<import("../Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade").CancelSubscriptionDowngradeProps>;
|
|
5
6
|
preCancellation: ({ header, containerOverrides, user, subscriptionName, subscriptionEnd, selectedReason, defaultCancellationReason, dividerOverrides, continueButton, genericErrorMessage, setServiceCancellationDate, handleError, onNextStep, }: import("../Sections/CancellationDetails").CancellationDetailsProps) => JSX.Element;
|
|
6
7
|
confirmCancel: ({ featureFlags, ...rest }: import("../Sections/ConfirmCancellation").ConfirmCancellationStepProps) => React.CElement<{
|
|
7
8
|
image: {
|
|
@@ -58,18 +59,18 @@ export declare const componentMap: {
|
|
|
58
59
|
};
|
|
59
60
|
};
|
|
60
61
|
}, any, any>>;
|
|
61
|
-
offers: ({ baseUrl, header, offersSection, benefits, continueButton, continueButtonContainerOverrides,
|
|
62
|
-
|
|
62
|
+
offers: ({ baseUrl, header, offersSection, benefits, continueButton, continueButtonContainerOverrides, selectedOffer, onSelectOffer, onNextStep, }: import("../Sections/CancellationOffers").CancellationOffersProps) => JSX.Element;
|
|
63
|
+
discountPreview: React.FC<import("../Sections/SectionContainer").GridSectionProps>;
|
|
64
|
+
offerConfirmation: ({ header, user, subscriptionDetails, buttonText, buttonEventContext, buttonUrl, baseUrl, buttonOverrides, }: import("../Sections/ConfirmSubscriptionOffer").ConfirmSubscriptionOfferProps) => JSX.Element | null;
|
|
63
65
|
contactSupport: ({ header, contactMethods, continueButton, continueButtonContainerOverrides, onNextStep, }: import("../Sections/ContactSupport").ContactSupportProps) => JSX.Element;
|
|
64
66
|
reviewCancellation: ({ baseUrl, header, details, user, cancellationButtons, selectedReason, defaultCancellationReason, genericErrorMessage, setServiceCancellationDate, handleError, onNextStep, }: import("../Sections/CancellationReview").CancellationReviewProps) => JSX.Element;
|
|
65
|
-
offerPreview: React.FC<import("../Sections/OfferPreview/OfferPreview").OfferPreviewPops>;
|
|
66
67
|
};
|
|
67
68
|
export type SelectionData = {
|
|
68
69
|
id: string;
|
|
69
70
|
label?: string;
|
|
70
71
|
eventContext?: EventContext;
|
|
71
72
|
};
|
|
72
|
-
export type
|
|
73
|
+
export type StepController = (event: React.MouseEvent, override?: string | null, eventContext?: Record<string, string>) => void;
|
|
73
74
|
export type HandleCardClick = (event: React.MouseEvent, selectionData: SelectionData) => void;
|
|
74
75
|
declare const CancellationStepperRender: React.FC;
|
|
75
76
|
export default CancellationStepperRender;
|
|
@@ -25,24 +25,26 @@ import { ContextName, } from '../../context/types';
|
|
|
25
25
|
import { useRouter, useSearchParams } from 'next/navigation';
|
|
26
26
|
import { CancellationReasons } from '../Sections/CancellationReasons';
|
|
27
27
|
import { CancellationDetails } from '../Sections/CancellationDetails';
|
|
28
|
-
import { replaceBaseURL, trackEvent
|
|
28
|
+
import { replaceBaseURL, trackEvent } from '../../helpers';
|
|
29
|
+
import { CancelSubscriptionDowngrade } from '../Sections/CancelSubscriptionDowngrade';
|
|
30
|
+
import { CancellationOffers } from '../Sections/CancellationOffers';
|
|
29
31
|
import { ContactSupport } from '../Sections/ContactSupport';
|
|
30
32
|
import { CancellationReview } from '../Sections/CancellationReview';
|
|
31
33
|
import { EventTrigger, useInstrumentation } from 'newskit';
|
|
34
|
+
import { GridSection } from '../Sections/SectionContainer';
|
|
32
35
|
import { ConfirmCancellationRender } from '../Sections/ConfirmCancellation';
|
|
33
36
|
import { ConfirmSubscriptionOffer } from '../Sections/ConfirmSubscriptionOffer';
|
|
34
37
|
import { ACTIVE_SUBSCRIPTION } from '../../constants';
|
|
35
|
-
import { CancellationOffers } from '../Sections/CancellationOffers';
|
|
36
|
-
import { OfferPreview } from '../Sections/OfferPreview/OfferPreview';
|
|
37
38
|
export var componentMap = {
|
|
38
39
|
reason: CancellationReasons,
|
|
40
|
+
downgrade: CancelSubscriptionDowngrade,
|
|
39
41
|
preCancellation: CancellationDetails,
|
|
40
42
|
confirmCancel: ConfirmCancellationRender,
|
|
41
43
|
offers: CancellationOffers,
|
|
44
|
+
discountPreview: GridSection,
|
|
42
45
|
offerConfirmation: ConfirmSubscriptionOffer,
|
|
43
46
|
contactSupport: ContactSupport,
|
|
44
47
|
reviewCancellation: CancellationReview,
|
|
45
|
-
offerPreview: OfferPreview,
|
|
46
48
|
};
|
|
47
49
|
var CancellationStepperRender = function () {
|
|
48
50
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
@@ -67,7 +69,6 @@ var CancellationStepperRender = function () {
|
|
|
67
69
|
var _m = useState([]), filteredPages = _m[0], setFilteredPages = _m[1];
|
|
68
70
|
var _o = useState(((_d = (_c = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.serviceCancellationDate) || null), serviceCancellationDate = _o[0], setServiceCancellationDate = _o[1];
|
|
69
71
|
var _p = useState(), selectedOffer = _p[0], setSelectedOffer = _p[1];
|
|
70
|
-
var _q = useState(null), incentiveData = _q[0], setIncentiveData = _q[1];
|
|
71
72
|
var stepFromUrl = searchParams.get('step');
|
|
72
73
|
var returnUrl = searchParams.get('returnUrl');
|
|
73
74
|
var currentStepComponent = stepFromUrl || pagesInOrder[0];
|
|
@@ -164,7 +165,7 @@ var CancellationStepperRender = function () {
|
|
|
164
165
|
// track page view event via Optimizely
|
|
165
166
|
trackEvent({
|
|
166
167
|
eventName: "cancellation_".concat(stepFromUrl.toLocaleLowerCase()),
|
|
167
|
-
cpn:
|
|
168
|
+
cpn: userData === null || userData === void 0 ? void 0 : userData.cpn,
|
|
168
169
|
subscriptions: (userData === null || userData === void 0 ? void 0 : userData.subscriptions) || [],
|
|
169
170
|
tags: __assign(__assign({}, context), { page_name: context.page_name || "online cancellation: ".concat(stepFromUrl), cancellation_type: ((_b = selections === null || selections === void 0 ? void 0 : selections.eventContext) === null || _b === void 0 ? void 0 : _b.article_parent_name) || '', step: stepFromUrl }),
|
|
170
171
|
});
|
|
@@ -175,7 +176,7 @@ var CancellationStepperRender = function () {
|
|
|
175
176
|
var shouldShowBackButton = (_e = componentProps === null || componentProps === void 0 ? void 0 : componentProps.showBackButton) !== null && _e !== void 0 ? _e : showBackButton;
|
|
176
177
|
return (React.createElement(ContentContainer, __assign({ "data-testid": "section-container" }, componentProps === null || componentProps === void 0 ? void 0 : componentProps.contentContainerOverrides),
|
|
177
178
|
shouldShowBackButton && hederBackButtonProps && (React.createElement(BackButton, { backButton: __assign(__assign({}, hederBackButtonProps), { href: '' }), backButtonOverrides: header.backButtonOverrides, eventContext: __assign(__assign({}, hederBackButtonProps === null || hederBackButtonProps === void 0 ? void 0 : hederBackButtonProps.eventContext), { page_name: (_f = componentProps === null || componentProps === void 0 ? void 0 : componentProps.tealiumContext) === null || _f === void 0 ? void 0 : _f.context.page_name }), onClick: handleBackBtn })),
|
|
178
|
-
React.createElement(SectionComponent, __assign({}, componentProps, { baseUrl: baseUrl, onNextStep: stepController, handleCardClick: handleCardClick, user: userData, selectedReason: selections, handleError: handleError, serviceCancellationDate: serviceCancellationDate, setServiceCancellationDate: setServiceCancellationDate, subType: ((_h = (_g = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.type) || '', selectedOffer: selectedOffer,
|
|
179
|
+
React.createElement(SectionComponent, __assign({}, componentProps, { baseUrl: baseUrl, onNextStep: stepController, handleCardClick: handleCardClick, user: userData, selectedReason: selections, handleError: handleError, serviceCancellationDate: serviceCancellationDate, setServiceCancellationDate: setServiceCancellationDate, subType: ((_h = (_g = userData === null || userData === void 0 ? void 0 : userData.subscriptions) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.type) || '', selectedOffer: selectedOffer, onSelectOffer: setSelectedOffer, featureFlags: featureFlags }))));
|
|
179
180
|
};
|
|
180
181
|
export default CancellationStepperRender;
|
|
181
182
|
//# sourceMappingURL=CancellationStepperRender.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationStepperRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/CancellationStepperRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3D,OAAO,EACL,UAAU,EACV,gBAAgB,GAGjB,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EACL,WAAW,GAEZ,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AACrE,OAAO,
|
|
1
|
+
{"version":3,"file":"CancellationStepperRender.js","sourceRoot":"","sources":["../../../../src/Components/Templates/CancellationStepperRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,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AoB,IAAI,oBAAoB,IAAI,CAC/C,oBAAC,UAAU,IACT,UAAU,wBACL,oBAAoB,KACvB,IAAI,EAAE,EAAE,KAEV,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,EAC/C,YAAY,wBACP,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,YAAY,KACrC,SAAS,EAAE,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,cAAc,0CAAE,OAAO,CAAC,SAAS,KAE9D,OAAO,EAAE,aAAa,GACtB,CACH;QACD,oBAAC,gBAAgB,eACX,cAAc,IAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,cAAc,EAC1B,eAAe,EAAE,eAAe,EAChC,IAAI,EAAE,QAAQ,EACd,cAAc,EAAE,UAAU,EAC1B,WAAW,EAAE,WAAW,EACxB,uBAAuB,EAAE,uBAAuB,EAChD,0BAA0B,EAAE,0BAA0B,EACtD,OAAO,EAAE,CAAA,MAAA,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa,0CAAG,CAAC,CAAC,0CAAE,IAAI,KAAI,EAAE,EACjD,aAAa,EAAE,aAAa,EAC5B,aAAa,EAAE,gBAAgB,EAC/B,YAAY,EAAE,YAAY,IAC1B,CACe,CACpB,CAAA;AACH,CAAC,CAAA;AAED,eAAe,yBAAyB,CAAA"}
|
|
@@ -45,24 +45,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
49
|
-
var t = {};
|
|
50
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
51
|
-
t[p] = s[p];
|
|
52
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
53
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
54
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
55
|
-
t[p[i]] = s[p[i]];
|
|
56
|
-
}
|
|
57
|
-
return t;
|
|
58
|
-
};
|
|
59
48
|
import { createApolloClient, ClientTypes } from '@newskit-render/api';
|
|
60
49
|
import { getQuery, getQueryByFragment, handleNewRelicErrorLog, } from '../helpers';
|
|
61
|
-
import { safeJsonParse } from '@newskit-render/shared-components';
|
|
62
50
|
export var queryHandler = function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
63
|
-
var
|
|
64
|
-
return __generator(this, function (
|
|
65
|
-
switch (
|
|
51
|
+
var _a, queryFragment, pageSize, apolloClient, data, query, response, err_1;
|
|
52
|
+
return __generator(this, function (_b) {
|
|
53
|
+
switch (_b.label) {
|
|
66
54
|
case 0:
|
|
67
55
|
if (req.method !== 'POST') {
|
|
68
56
|
res.status(405);
|
|
@@ -70,25 +58,26 @@ export var queryHandler = function (req, res) { return __awaiter(void 0, void 0,
|
|
|
70
58
|
res.end();
|
|
71
59
|
return [2 /*return*/];
|
|
72
60
|
}
|
|
73
|
-
|
|
74
|
-
queryFragment = parsedData.queryFragment, pageSize = parsedData.pageSize, bodyProps = __rest(parsedData, ["queryFragment", "pageSize"]);
|
|
61
|
+
_a = req.body, queryFragment = _a.queryFragment, pageSize = _a.pageSize;
|
|
75
62
|
return [4 /*yield*/, createApolloClient(ClientTypes.main, req.headers.cookie)];
|
|
76
63
|
case 1:
|
|
77
|
-
apolloClient =
|
|
78
|
-
|
|
64
|
+
apolloClient = _b.sent();
|
|
65
|
+
_b.label = 2;
|
|
79
66
|
case 2:
|
|
80
|
-
|
|
67
|
+
_b.trys.push([2, 4, , 5]);
|
|
81
68
|
query = getQuery(getQueryByFragment(queryFragment), queryFragment, pageSize);
|
|
82
69
|
return [4 /*yield*/, apolloClient.query({
|
|
83
70
|
query: query,
|
|
84
|
-
variables:
|
|
71
|
+
variables: {
|
|
72
|
+
pageSize: pageSize,
|
|
73
|
+
},
|
|
85
74
|
})];
|
|
86
75
|
case 3:
|
|
87
|
-
response =
|
|
88
|
-
data = __assign({}, response.data);
|
|
76
|
+
response = _b.sent();
|
|
77
|
+
data = __assign({}, response.data.user);
|
|
89
78
|
return [3 /*break*/, 5];
|
|
90
79
|
case 4:
|
|
91
|
-
err_1 =
|
|
80
|
+
err_1 = _b.sent();
|
|
92
81
|
handleNewRelicErrorLog({
|
|
93
82
|
requestName: queryFragment,
|
|
94
83
|
reqError: err_1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryHandler.js","sourceRoot":"","sources":["../../../src/api/queryHandler.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"queryHandler.js","sourceRoot":"","sources":["../../../src/api/queryHandler.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACrE,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,YAAY,CAAA;AAEnB,MAAM,CAAC,IAAM,YAAY,GAAG,UAC1B,GAAmB,EACnB,GAAoB;;;;;gBAEpB,IAAI,GAAG,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;oBAC1B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;oBACf,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,kBAAW,GAAG,CAAC,MAAM,kBAAe,EAAE,CAAC,CAAA;oBAC3D,GAAG,CAAC,GAAG,EAAE,CAAA;oBACT,sBAAM;gBACR,CAAC;gBAEK,KAA8B,GAAG,CAAC,IAAI,EAApC,aAAa,mBAAA,EAAE,QAAQ,cAAA,CAAa;gBACvB,qBAAM,kBAAkB,CAC3C,WAAW,CAAC,IAAI,EAChB,GAAG,CAAC,OAAO,CAAC,MAAM,CACnB,EAAA;;gBAHK,YAAY,GAAG,SAGpB;;;;gBAIO,KAAK,GAAG,QAAQ,CACpB,kBAAkB,CAAC,aAAa,CAAC,EACjC,aAAa,EACb,QAAQ,CACT,CAAA;gBAEgB,qBAAM,YAAY,CAAC,KAAK,CAAC;wBACxC,KAAK,OAAA;wBACL,SAAS,EAAE;4BACT,QAAQ,UAAA;yBACT;qBACF,CAAC,EAAA;;gBALI,QAAQ,GAAG,SAKf;gBACF,IAAI,gBACC,QAAQ,CAAC,IAAI,CAAC,IAAI,CACtB,CAAA;;;;gBAED,sBAAsB,CAAC;oBACrB,WAAW,EAAE,aAAa;oBAC1B,QAAQ,EAAE,KAAG;iBACd,CAAC,CAAA;gBACF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBACf,GAAG,CAAC,GAAG,EAAE,CAAA;;;gBAGX,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;gBACf,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;;;;KAC9B,CAAA"}
|
|
@@ -20,7 +20,7 @@ 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,
|
|
23
|
+
import { HandleCardClick, StepController } from '../Components/Templates/CancellationStepperRender';
|
|
24
24
|
import { GridLayoutProps } from 'Components/SharedTypes/GridLayoutProps';
|
|
25
25
|
import { CancelSubscriptionDowngradeProps } from '../Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade';
|
|
26
26
|
import { ConfirmCancellationStepProps } from '../Components/Sections/ConfirmCancellation';
|
|
@@ -30,7 +30,6 @@ import { CancellationOffersContextProps } from '../Components/Sections/Cancellat
|
|
|
30
30
|
import { ConfirmSubscriptionOfferProps } from 'Components/Sections/ConfirmSubscriptionOffer';
|
|
31
31
|
import { ContactSupportContextProps } from '../Components/Sections/ContactSupport';
|
|
32
32
|
import { CancellationReviewContextProps } from '../Components/Sections/CancellationReview';
|
|
33
|
-
import { OfferPreviewContextProps } from 'Components/Sections/OfferPreview/OfferPreview';
|
|
34
33
|
interface InfoPanel extends InlineMessageProps {
|
|
35
34
|
infoPanelCells?: MQ<number>;
|
|
36
35
|
href?: boolean;
|
|
@@ -308,7 +307,7 @@ export interface BelowItemExtraProps {
|
|
|
308
307
|
};
|
|
309
308
|
baseUrl?: string;
|
|
310
309
|
eventContext?: EventContext;
|
|
311
|
-
onClick?:
|
|
310
|
+
onClick?: StepController;
|
|
312
311
|
buttonOverrides?: BaseFlagOverrides;
|
|
313
312
|
iconOverrides?: NewsKitIconProps['overrides'];
|
|
314
313
|
marginInline?: MQ<string>;
|
|
@@ -328,14 +327,9 @@ export interface ConfirmSubscriptionOfferContextProps extends ConfirmSubscriptio
|
|
|
328
327
|
showBackButton?: boolean;
|
|
329
328
|
tealiumContext?: TealiumEventContext;
|
|
330
329
|
}
|
|
331
|
-
export interface CancellationOfferPreviewContextProps extends OfferPreviewContextProps {
|
|
332
|
-
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
333
|
-
showBackButton?: boolean;
|
|
334
|
-
tealiumContext?: TealiumEventContext;
|
|
335
|
-
}
|
|
336
330
|
export interface CancellationStepperContextOptions extends Partial<InteractiveContextOptions>, Partial<NonInteractiveContextOptions> {
|
|
337
331
|
containerOverrides?: GridLayoutProps;
|
|
338
|
-
components: Record<string, CancellationSection | DowngradeContextProps | ConfirmCancellationContextProps | CancellationDetailsContextProps | CancellationOffersContextProps | ConfirmSubscriptionOfferContextProps | ContactSupportContextProps | CancellationReviewContextProps
|
|
332
|
+
components: Record<string, CancellationSection | DowngradeContextProps | ConfirmCancellationContextProps | CancellationDetailsContextProps | CancellationOffersContextProps | ConfirmSubscriptionOfferContextProps | ContactSupportContextProps | CancellationReviewContextProps>;
|
|
339
333
|
componentSequence: Record<string, string[]>;
|
|
340
334
|
showBackButton?: boolean;
|
|
341
335
|
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
@@ -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":"AAmNA,MAAM,CAAN,IAAY,WAqBX;AArBD,WAAY,WAAW;IACrB,kDAAqC,CAAA;IACrC,gEAAmD,CAAA;IACnD,0CAA6B,CAAA;IAC7B,4DAA+C,CAAA;IAC/C,kCAAqB,CAAA;IACrB,sCAAyB,CAAA;IACzB,oCAAuB,CAAA;IACvB,4CAA+B,CAAA;IAC/B,8BAAiB,CAAA;IACjB,gDAAmC,CAAA;IACnC,kDAAqC,CAAA;IACrC,gDAAmC,CAAA;IACnC,sCAAyB,CAAA;IACzB,0CAA6B,CAAA;IAC7B,kDAAqC,CAAA;IACrC,gEAAmD,CAAA;IACnD,gCAAmB,CAAA;IACnB,0CAA6B,CAAA;IAC7B,0DAA6C,CAAA;IAC7C,0DAA6C,CAAA;AAC/C,CAAC,EArBW,WAAW,KAAX,WAAW,QAqBtB;AAoOD,MAAM,CAAN,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;AACnB,CAAC,EAHW,YAAY,KAAZ,YAAY,QAGvB;AAED,MAAM,CAAN,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,gDAA4B,CAAA;IAC5B,yCAAqB,CAAA;IACrB,8CAA0B,CAAA;AAC5B,CAAC,EAJW,kBAAkB,KAAlB,kBAAkB,QAI7B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,6CAAyB,CAAA;AAC3B,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAyYD,MAAM,CAAN,IAAY,gBA2BX;AA3BD,WAAY,gBAAgB;IAC1B,kCAAgB,CAAA;IAChB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;IACjB,8BAAY,CAAA;IACZ,oCAAkB,CAAA;IAClB,yCAAuB,CAAA;IACvB,2CAAyB,CAAA;IACzB,oCAAkB,CAAA;IAClB,gCAAc,CAAA;IACd,iCAAe,CAAA;IACf,mCAAiB,CAAA;IACjB,oCAAkB,CAAA;IAClB,oCAAkB,CAAA;IAClB,iCAAe,CAAA;IACf,oCAAkB,CAAA;IAClB,mCAAiB,CAAA;IACjB,+BAAa,CAAA;IACb,uCAAqB,CAAA;IACrB,kCAAgB,CAAA;IAChB,kCAAgB,CAAA;IAChB,uCAAqB,CAAA;IACrB,mCAAiB,CAAA;IACjB,8BAAY,CAAA;IACZ,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,kCAAgB,CAAA;AAClB,CAAC,EA3BW,gBAAgB,KAAhB,gBAAgB,QA2B3B;AA+CD,MAAM,CAAN,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,kDAAyB,CAAA;AAC3B,CAAC,EAJW,uBAAuB,KAAvB,uBAAuB,QAIlC;AAqDD,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;IACnB,8BAAa,CAAA;IACb,4CAA2B,CAAA;AAC7B,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB"}
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { mutateCancellation, mutateDeleteHolidayStop, mutateDeliveryInstructions, mutateCreateHolidayStop, mutateUpdateHolidayStop, mutateOrderVoucherBooklet, mutateStripePaymentMethod, mutateZuoraPaymentMethod, mutateSubscribeForNewsletter, mutateUnsubscribeForNewsletter, mutateUpdateCommentingUser, mutateUser, mutateDeleteAccount, mutateRemoveGroupAccountMember, mutateSendFamilyMemberInviteV2, mutateUserBroadcasting, mutateCreateShareLink, mutateCancelSubscriptionV2,
|
|
12
|
+
import { mutateCancellation, mutateDeleteHolidayStop, mutateDeliveryInstructions, mutateCreateHolidayStop, mutateUpdateHolidayStop, mutateOrderVoucherBooklet, mutateStripePaymentMethod, mutateZuoraPaymentMethod, mutateSubscribeForNewsletter, mutateUnsubscribeForNewsletter, mutateUpdateCommentingUser, mutateUser, mutateDeleteAccount, mutateRemoveGroupAccountMember, mutateSendFamilyMemberInviteV2, mutateUserBroadcasting, mutateCreateShareLink, mutateCancelSubscriptionV2, } from './../queries';
|
|
13
13
|
import { publisher } from '../config';
|
|
14
14
|
var isBroadcasting = publisher === 'BROADCASTING';
|
|
15
15
|
var mutationsMap = {
|
|
@@ -21,7 +21,6 @@ var mutationsMap = {
|
|
|
21
21
|
email: isBroadcasting ? mutateUserBroadcasting : mutateUser,
|
|
22
22
|
address: mutateUser,
|
|
23
23
|
confirmCancellation: mutateCancellation,
|
|
24
|
-
applyIncentive: mutateApplyIncentive,
|
|
25
24
|
'delivery-instructions': mutateDeliveryInstructions,
|
|
26
25
|
'create-holiday-stop': mutateCreateHolidayStop,
|
|
27
26
|
'update-holiday-stop': mutateUpdateHolidayStop,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apiHandlerUtils.js","sourceRoot":"","sources":["../../../src/helpers/apiHandlerUtils.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,UAAU,EACV,mBAAmB,EACnB,8BAA8B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,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,sBAAsB,EAAE,CAAC;QACnD,OAAO;YACL,KAAK,EAAE;gBACL,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB;SACF,CAAA;IACH,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;AAED,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,GAAW;IACrC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAA;AAC1B,CAAC,CAAA"}
|
|
@@ -1,21 +1,4 @@
|
|
|
1
1
|
import { DateType, ReplaceDateOptions } from './dateUtils';
|
|
2
|
-
import { OfferPreviewDataProps } from '../Components/Sections/CancellationOffers';
|
|
3
|
-
import { UserData } from 'pages/types';
|
|
4
|
-
import { OfferSummaryProps } from 'Components/Sections/OfferPreview/OfferSummary';
|
|
5
|
-
export interface ResponseProps {
|
|
6
|
-
success: boolean;
|
|
7
|
-
errorCode: string | null;
|
|
8
|
-
errorMessage: string | null;
|
|
9
|
-
}
|
|
10
|
-
export interface PreviewIncentiveProps extends ResponseProps, OfferPreviewDataProps {
|
|
11
|
-
}
|
|
12
|
-
export interface OfferPreviewDataResponse {
|
|
13
|
-
previewIncentive: PreviewIncentiveProps;
|
|
14
|
-
}
|
|
15
|
-
export interface OfferPreviewBody {
|
|
16
|
-
incentiveCode: string;
|
|
17
|
-
subscriptionCode: string;
|
|
18
|
-
}
|
|
19
2
|
export type GetSubscriptionEndMessage = (messages: {
|
|
20
3
|
daysRemaining: string;
|
|
21
4
|
monthsRemaining: string;
|
|
@@ -24,6 +7,3 @@ export declare const getSubscriptionEndMessage: GetSubscriptionEndMessage;
|
|
|
24
7
|
export declare const replaceRemainingSubscriptionTime: (text: string, billCycleDate: DateType) => string;
|
|
25
8
|
export declare const replaceSubscriptionName: (text: string, subscriptionName: string) => string;
|
|
26
9
|
export declare const cancelSubscription: (subscriptionCode: string, reason: string) => Promise<Response>;
|
|
27
|
-
export declare const getOfferPreviewData: (body: OfferPreviewBody) => Promise<OfferPreviewDataResponse>;
|
|
28
|
-
export declare const populateSubscriptionSummaryData: (previewData: OfferPreviewDataProps, subscriptionSummaryContext: OfferSummaryProps, user: UserData) => OfferSummaryProps;
|
|
29
|
-
export declare const applyIncentive: (incentiveCode: string, subscriptionCode: string) => Promise<ResponseProps>;
|