@newskit-render/my-account 7.154.0 → 7.155.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 +4 -1
- package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.js +28 -3
- 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 +54 -13
- package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/cjs/Components/Sections/CancellationOffers/types.d.ts +29 -4
- 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 +6 -7
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
- package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +2 -0
- 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/OfferPreview/OfferPreview.d.ts +30 -0
- package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js +189 -0
- package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js.map +1 -0
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.d.ts +21 -0
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js +95 -0
- package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js.map +1 -0
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.d.ts +9 -0
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js +38 -0
- package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js.map +1 -0
- package/dist/cjs/Components/Sections/OfferPreview/index.d.ts +0 -0
- package/dist/cjs/Components/Sections/OfferPreview/index.js +2 -0
- package/dist/cjs/Components/Sections/OfferPreview/index.js.map +1 -0
- package/dist/cjs/Components/Sections/OfferPreview/types.d.ts +0 -0
- package/dist/cjs/Components/Sections/OfferPreview/types.js +2 -0
- package/dist/cjs/Components/Sections/OfferPreview/types.js.map +1 -0
- package/dist/cjs/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +4 -5
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +6 -8
- package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/cjs/api/queryHandler.js +29 -14
- package/dist/cjs/api/queryHandler.js.map +1 -1
- package/dist/cjs/context/types.d.ts +9 -3
- package/dist/cjs/context/types.js.map +1 -1
- package/dist/cjs/helpers/apiHandlerUtils.js +1 -0
- package/dist/cjs/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/cjs/helpers/cancellationUtils.d.ts +20 -0
- package/dist/cjs/helpers/cancellationUtils.js +110 -1
- package/dist/cjs/helpers/cancellationUtils.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +1 -0
- package/dist/cjs/helpers/index.js +1 -2
- package/dist/cjs/helpers/index.js.map +1 -1
- package/dist/cjs/helpers/stringUtils.d.ts +1 -0
- package/dist/cjs/helpers/stringUtils.js +9 -0
- package/dist/cjs/helpers/stringUtils.js.map +1 -0
- package/dist/cjs/helpers/subscriptionsUtils.d.ts +2 -1
- package/dist/cjs/helpers/subscriptionsUtils.js +2 -2
- package/dist/cjs/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +90 -18
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/cjs/queries/getIncentivePreview.d.ts +2 -0
- package/dist/cjs/queries/getIncentivePreview.js +11 -0
- package/dist/cjs/queries/getIncentivePreview.js.map +1 -0
- package/dist/cjs/queries/index.d.ts +2 -0
- package/dist/cjs/queries/index.js +2 -0
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/cjs/queries/mutateApplyIncentive.d.ts +2 -0
- package/dist/cjs/queries/mutateApplyIncentive.js +11 -0
- package/dist/cjs/queries/mutateApplyIncentive.js.map +1 -0
- 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 +4 -1
- package/dist/esm/Components/Elements/TimesLoading/TimesLoading.js +28 -3
- 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 +54 -13
- package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
- package/dist/esm/Components/Sections/CancellationOffers/types.d.ts +29 -4
- 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 +6 -7
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
- package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +2 -0
- 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/OfferPreview/OfferPreview.d.ts +30 -0
- package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js +159 -0
- package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js.map +1 -0
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.d.ts +21 -0
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js +88 -0
- package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js.map +1 -0
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.d.ts +9 -0
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js +31 -0
- package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js.map +1 -0
- package/dist/esm/Components/Sections/OfferPreview/index.d.ts +0 -0
- package/dist/esm/Components/Sections/OfferPreview/index.js +2 -0
- package/dist/esm/Components/Sections/OfferPreview/index.js.map +1 -0
- package/dist/esm/Components/Sections/OfferPreview/types.d.ts +0 -0
- package/dist/esm/Components/Sections/OfferPreview/types.js +2 -0
- package/dist/esm/Components/Sections/OfferPreview/types.js.map +1 -0
- package/dist/esm/Components/Sections/SectionContainer/types.d.ts +2 -2
- package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +4 -5
- package/dist/esm/Components/Templates/CancellationStepperRender.js +7 -9
- package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -1
- package/dist/esm/api/queryHandler.js +29 -14
- package/dist/esm/api/queryHandler.js.map +1 -1
- package/dist/esm/context/types.d.ts +9 -3
- package/dist/esm/context/types.js.map +1 -1
- package/dist/esm/helpers/apiHandlerUtils.js +2 -1
- package/dist/esm/helpers/apiHandlerUtils.js.map +1 -1
- package/dist/esm/helpers/cancellationUtils.d.ts +20 -0
- package/dist/esm/helpers/cancellationUtils.js +106 -0
- package/dist/esm/helpers/cancellationUtils.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +1 -2
- package/dist/esm/helpers/index.js.map +1 -1
- package/dist/esm/helpers/stringUtils.d.ts +1 -0
- package/dist/esm/helpers/stringUtils.js +5 -0
- package/dist/esm/helpers/stringUtils.js.map +1 -0
- package/dist/esm/helpers/subscriptionsUtils.d.ts +2 -1
- package/dist/esm/helpers/subscriptionsUtils.js +2 -2
- package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +91 -19
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
- package/dist/esm/queries/getIncentivePreview.d.ts +2 -0
- package/dist/esm/queries/getIncentivePreview.js +8 -0
- package/dist/esm/queries/getIncentivePreview.js.map +1 -0
- package/dist/esm/queries/index.d.ts +2 -0
- package/dist/esm/queries/index.js +2 -0
- package/dist/esm/queries/index.js.map +1 -1
- package/dist/esm/queries/mutateApplyIncentive.d.ts +2 -0
- package/dist/esm/queries/mutateApplyIncentive.js +8 -0
- package/dist/esm/queries/mutateApplyIncentive.js.map +1 -0
- package/package.json +4 -4
|
@@ -3,7 +3,7 @@ import { BlockProps, ButtonOverrides } from 'newskit';
|
|
|
3
3
|
import { EventContext } from '@newskit-render/shared-components';
|
|
4
4
|
import { Subscriptions } from '../../../pages/types';
|
|
5
5
|
export interface ForwardButtonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
label
|
|
6
|
+
label?: React.ReactNode;
|
|
7
7
|
button?: {
|
|
8
8
|
text?: string;
|
|
9
9
|
href?: string;
|
|
@@ -32,7 +32,7 @@ var material_1 = require("@emotion-icons/material");
|
|
|
32
32
|
var helpers_1 = require("../../../helpers");
|
|
33
33
|
var IconFilledKeyboardArrowRight = (0, newskit_1.toNewsKitIcon)(material_1.KeyboardArrowRight);
|
|
34
34
|
var ForwardButton = function (_a) {
|
|
35
|
-
var
|
|
35
|
+
var _b = _a.label, label = _b === void 0 ? '' : _b, icon = _a.icon, _c = _a.button, _d = _c === void 0 ? {} : _c, text = _d.text, href = _d.href, _e = _a.baseUrl, baseUrl = _e === void 0 ? '' : _e, buttonOverrides = _a.buttonOverrides, eventContext = _a.eventContext, _f = _a.dataTestId, dataTestId = _f === void 0 ? 'forward-button' : _f, onClick = _a.onClick, userTrackingData = _a.userTrackingData, rest = __rest(_a, ["label", "icon", "button", "baseUrl", "buttonOverrides", "eventContext", "dataTestId", "onClick", "userTrackingData"]);
|
|
36
36
|
return (react_1.default.createElement(newskit_1.Block, __assign({}, rest),
|
|
37
37
|
react_1.default.createElement(newskit_1.TextBlock, { as: "span", stylePreset: "inkBase" }, label),
|
|
38
38
|
text && (react_1.default.createElement(newskit_1.Button, __assign({ "data-testid": dataTestId, overrides: __assign({ stylePreset: 'buttonMinimalPrimary', paddingInline: 'space010' }, buttonOverrides), eventContext: eventContext }, (href ? { href: (0, helpers_1.replaceBaseURL)(baseUrl, href) } : {}), { onClick: function (e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ForwardButton.js","sourceRoot":"","sources":["../../../../../src/Components/Elements/ForwardButton/ForwardButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAiC;AACjC,mCAOgB;AAChB,oDAA4D;AAE5D,4CAA6D;AAG7D,IAAM,4BAA4B,GAAG,IAAA,uBAAa,EAAC,6BAAkB,CAAC,CAAA;AAqB/D,IAAM,aAAa,GAAwC,UAAC,EAWlE;IAVC,IAAA,KAAK,
|
|
1
|
+
{"version":3,"file":"ForwardButton.js","sourceRoot":"","sources":["../../../../../src/Components/Elements/ForwardButton/ForwardButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,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,gBAAgB,uBAAhB,gBAAgB,CAAE,aAAa,KAAI,EAAE;oBACpD,IAAI,EAAE,EAAE;iBACT,CAAC,CAAA;gBACF,IAAI,OAAO;oBAAE,OAAO,CAAC,CAAC,CAAC,CAAA;YACzB,CAAC;YAEA,IAAI;YACJ,IAAI,IAAI,CACP,8BAAC,4BAA4B,IAC3B,SAAS,EAAE;oBACT,WAAW,EAAE,sBAAsB;iBACpC,GACD,CACH,CACM,CACV,CACK,CACT,CAAA;AACH,CAAC,CAAA;AApDY,QAAA,aAAa,iBAoDzB"}
|
|
@@ -1,4 +1,26 @@
|
|
|
1
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
|
+
};
|
|
2
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
26
|
};
|
|
@@ -7,8 +29,11 @@ exports.TimesLoading = void 0;
|
|
|
7
29
|
var react_1 = __importDefault(require("react"));
|
|
8
30
|
var newskit_1 = require("newskit");
|
|
9
31
|
var TimesLoadingSpinner_1 = require("../TimesLoadingSpinner");
|
|
10
|
-
var TimesLoading = function () {
|
|
11
|
-
|
|
12
|
-
react_1.default.createElement(newskit_1.
|
|
32
|
+
var TimesLoading = function (_a) {
|
|
33
|
+
var loadingText = _a.loadingText, props = __rest(_a, ["loadingText"]);
|
|
34
|
+
return (react_1.default.createElement(newskit_1.Stack, __assign({ flow: "vertical-center", stackDistribution: "center", height: "100vh" }, props, { "data-testid": "times-loading-container" }),
|
|
35
|
+
react_1.default.createElement(TimesLoadingSpinner_1.TimesLoadingSpinner, null),
|
|
36
|
+
react_1.default.createElement(newskit_1.TextBlock, { marginBlockStart: "space050", stylePreset: "inkDark010", typographyPreset: "utilityBody020" }, loadingText || 'Loading')));
|
|
37
|
+
};
|
|
13
38
|
exports.TimesLoading = TimesLoading;
|
|
14
39
|
//# sourceMappingURL=TimesLoading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimesLoading.js","sourceRoot":"","sources":["../../../../../src/Components/Elements/TimesLoading/TimesLoading.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimesLoading.js","sourceRoot":"","sources":["../../../../../src/Components/Elements/TimesLoading/TimesLoading.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,mCAAsD;AACtD,8DAA4D;AAErD,IAAM,YAAY,GAAoD,UAAC,EAG7E;IAFC,IAAA,WAAW,iBAAA,EACR,KAAK,cAFoE,eAG7E,CADS;IACJ,OAAA,CACJ,8BAAC,eAAK,aACJ,IAAI,EAAC,iBAAiB,EACtB,iBAAiB,EAAC,QAAQ,EAC1B,MAAM,EAAC,OAAO,IACV,KAAK,mBACG,yBAAyB;QAErC,8BAAC,yCAAmB,OAAG;QACvB,8BAAC,mBAAS,IACR,gBAAgB,EAAC,UAAU,EAC3B,WAAW,EAAC,YAAY,EACxB,gBAAgB,EAAC,gBAAgB,IAEhC,WAAW,IAAI,SAAS,CACf,CACN,CACT,CAAA;CAAA,CAAA;AApBY,QAAA,YAAY,gBAoBxB"}
|
package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { OfferCardProps } from '../../Elements/OfferCard/types';
|
|
3
3
|
import { HeaderProps } from '@newskit-render/shared-components';
|
|
4
4
|
import { ForwardButtonProps } from '../../Elements/ForwardButton/ForwardButton';
|
|
5
|
-
import {
|
|
5
|
+
import { NextStepProps } from '../../Templates/CancellationStepperRender';
|
|
6
6
|
export interface CancelSubscriptionDowngradeProps {
|
|
7
7
|
offers: OfferCardProps[];
|
|
8
8
|
header?: HeaderProps;
|
|
@@ -14,6 +14,6 @@ export interface CancelSubscriptionDowngradeProps {
|
|
|
14
14
|
};
|
|
15
15
|
continueButton?: ForwardButtonProps;
|
|
16
16
|
serviceCancellationDate?: string | null;
|
|
17
|
-
onNextStep?:
|
|
17
|
+
onNextStep?: NextStepProps;
|
|
18
18
|
}
|
|
19
19
|
export declare const CancelSubscriptionDowngrade: FC<CancelSubscriptionDowngradeProps>;
|
|
@@ -2,7 +2,7 @@ import { BlockProps, DividerProps, TextBlockProps } from 'newskit';
|
|
|
2
2
|
import { HeaderProps, ContentContainerProps as SharedContentContainerProps, TealiumEventContext } from '@newskit-render/shared-components';
|
|
3
3
|
import { BaseFormActions } from '../../../context/types';
|
|
4
4
|
import { UserData } from '../../../pages/types';
|
|
5
|
-
import { SelectionData,
|
|
5
|
+
import { SelectionData, NextStepProps, HandleCardClick } from '../../Templates/CancellationStepperRender';
|
|
6
6
|
import { ForwardButtonProps } from '../../Elements/ForwardButton/ForwardButton';
|
|
7
7
|
import { GenericMessageMap } from '../../Elements/Toast';
|
|
8
8
|
export interface SubscriptionEnd {
|
|
@@ -30,7 +30,7 @@ export interface CancellationDetailsProps {
|
|
|
30
30
|
user?: UserData;
|
|
31
31
|
selectedReason?: SelectionData | null;
|
|
32
32
|
defaultCancellationReason?: string;
|
|
33
|
-
onNextStep?:
|
|
33
|
+
onNextStep?: NextStepProps;
|
|
34
34
|
handleCardClick?: HandleCardClick;
|
|
35
35
|
handleError?: BaseFormActions['handleError'];
|
|
36
36
|
setServiceCancellationDate?: React.Dispatch<React.SetStateAction<string | null>>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CancellationOffersProps } from './types';
|
|
2
|
-
export declare const CancellationOffers: ({ baseUrl, header, offersSection, benefits, continueButton, continueButtonContainerOverrides,
|
|
2
|
+
export declare const CancellationOffers: ({ baseUrl, header, offersSection, benefits, continueButton, continueButtonContainerOverrides, setSelectedOffer, selectedOffer, onNextStep, }: CancellationOffersProps) => JSX.Element;
|
|
@@ -14,6 +14,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
28
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
17
53
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
54
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
55
|
};
|
|
@@ -28,25 +64,30 @@ var helpers_1 = require("../../../helpers");
|
|
|
28
64
|
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'));
|
|
29
65
|
var CancellationOffers = function (_a) {
|
|
30
66
|
var _b;
|
|
31
|
-
var baseUrl = _a.baseUrl, header = _a.header, offersSection = _a.offersSection, benefits = _a.benefits, continueButton = _a.continueButton, continueButtonContainerOverrides = _a.continueButtonContainerOverrides,
|
|
67
|
+
var baseUrl = _a.baseUrl, header = _a.header, offersSection = _a.offersSection, benefits = _a.benefits, continueButton = _a.continueButton, continueButtonContainerOverrides = _a.continueButtonContainerOverrides, setSelectedOffer = _a.setSelectedOffer, selectedOffer = _a.selectedOffer, onNextStep = _a.onNextStep;
|
|
32
68
|
var router = (0, router_1.useRouter)();
|
|
33
69
|
var handleSelectOffer = function (offerId) {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onSelectOffer(offer);
|
|
37
|
-
};
|
|
38
|
-
var handleContinue = function (event) {
|
|
39
|
-
if ((selectedOffer === null || selectedOffer === void 0 ? void 0 : selectedOffer.nextStep) && onNextStep) {
|
|
40
|
-
onNextStep(event, selectedOffer.nextStep);
|
|
41
|
-
}
|
|
42
|
-
else if (selectedOffer === null || selectedOffer === void 0 ? void 0 : selectedOffer.href) {
|
|
43
|
-
router.push((0, helpers_1.replaceBaseURL)(baseUrl || '', selectedOffer.href));
|
|
44
|
-
}
|
|
70
|
+
sessionStorage.setItem('selectedOfferId', offerId);
|
|
71
|
+
setSelectedOffer(offerId);
|
|
45
72
|
};
|
|
73
|
+
var handleContinue = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
74
|
+
var offer;
|
|
75
|
+
var _a;
|
|
76
|
+
return __generator(this, function (_b) {
|
|
77
|
+
offer = (_a = offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) === null || _a === void 0 ? void 0 : _a.find(function (item) { return item.id === selectedOffer; });
|
|
78
|
+
if (offer === null || offer === void 0 ? void 0 : offer.href) {
|
|
79
|
+
router.push((0, helpers_1.replaceBaseURL)(baseUrl || '', offer.href));
|
|
80
|
+
}
|
|
81
|
+
if ((offer === null || offer === void 0 ? void 0 : offer.nextStep) && onNextStep) {
|
|
82
|
+
onNextStep(event, offer.nextStep);
|
|
83
|
+
}
|
|
84
|
+
return [2 /*return*/];
|
|
85
|
+
});
|
|
86
|
+
}); };
|
|
46
87
|
return (react_1.default.createElement(newskit_1.GridLayout, null,
|
|
47
88
|
header && react_1.default.createElement(shared_components_1.Header, __assign({}, header)),
|
|
48
89
|
(offersSection === null || offersSection === void 0 ? void 0 : offersSection.title) && (react_1.default.createElement(newskit_1.TextBlock, __assign({ typographyPreset: "editorialHeadline050", stylePreset: "inkContrast", marginBlockEnd: "space060" }, offersSection.titleOverrides), offersSection.title)),
|
|
49
|
-
react_1.default.createElement(OfferGroup_1.default, { offers: (offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) || [], selectedOfferId: selectedOffer
|
|
90
|
+
react_1.default.createElement(OfferGroup_1.default, { offers: (offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) || [], selectedOfferId: selectedOffer, onSelect: handleSelectOffer }),
|
|
50
91
|
(benefits === null || benefits === void 0 ? void 0 : benefits.showBenefits) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
51
92
|
react_1.default.createElement(newskit_1.Divider, { overrides: __assign({ marginBlockStart: 'space040', marginBlockEnd: 'space060' }, benefits === null || benefits === void 0 ? void 0 : benefits.dividerOverrides) }),
|
|
52
93
|
(benefits === null || benefits === void 0 ? void 0 : benefits.title) && (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -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,gBAAgB,sBAAA,EAChB,aAAa,mBAAA,EACb,UAAU,gBAAA;IAEV,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAA;IAE1B,IAAM,iBAAiB,GAAG,UAAC,OAAe;QACxC,cAAc,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAA;QAClD,gBAAgB,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC,CAAA;IAED,IAAM,cAAc,GAAG,UAAO,KAA0C;;;;YAChE,KAAK,GAAG,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,KAAK,0CAAE,IAAI,CACtC,UAAC,IAAI,IAAK,OAAA,IAAI,CAAC,EAAE,KAAK,aAAa,EAAzB,CAAyB,CACpC,CAAA;YACD,IAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAE,CAAC;gBAChB,MAAM,CAAC,IAAI,CAAC,IAAA,wB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,CAAC,UAAC,OAAO,IAAK,OAAA,CAC/B,8BAAC,oCAAgB,aACf,GAAG,EAAE,OAAO,CAAC,IAAI,IACb,OAAO,IACX,YAAY,EAAC,UAAU,EACvB,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;AAlHY,QAAA,kBAAkB,sBAkH9B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
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 { NextStepProps } from '../../Templates/CancellationStepperRender';
|
|
5
5
|
import { ForwardButtonProps } from '../../Elements/ForwardButton/ForwardButton';
|
|
6
6
|
import { OfferProps } from '../../Elements/OfferGroup';
|
|
7
|
+
import { UserData } from 'pages/types';
|
|
7
8
|
export interface CancellationOffersContextProps {
|
|
8
9
|
tealiumContext?: TealiumEventContext;
|
|
9
10
|
showBackButton?: boolean;
|
|
@@ -20,6 +21,29 @@ export interface OffersSection {
|
|
|
20
21
|
titleOverrides?: TextBlockProps;
|
|
21
22
|
items?: OfferProps[];
|
|
22
23
|
}
|
|
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
|
+
}
|
|
23
47
|
export interface Benefits {
|
|
24
48
|
showBenefits?: boolean;
|
|
25
49
|
title?: string;
|
|
@@ -28,7 +52,8 @@ export interface Benefits {
|
|
|
28
52
|
items: BenefitsListItemContent[];
|
|
29
53
|
}
|
|
30
54
|
export interface CancellationOffersProps extends CancellationOffersContextProps {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
user: UserData;
|
|
56
|
+
selectedOffer?: string;
|
|
57
|
+
setSelectedOffer: (offer: string) => void;
|
|
58
|
+
onNextStep?: NextStepProps;
|
|
34
59
|
}
|
|
@@ -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 { NextStepProps, SelectionData } 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?: NextStepProps;
|
|
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, }: ConfirmSubscriptionOfferProps) => JSX.Element | null;
|
|
2
|
+
export declare const ConfirmSubscriptionOffer: ({ header, user, subscriptionDetails, buttonText, buttonEventContext, buttonUrl, baseUrl, buttonOverrides, incentiveData, }: ConfirmSubscriptionOfferProps) => JSX.Element | null;
|
|
@@ -36,21 +36,20 @@ var ListItem = function (_a) {
|
|
|
36
36
|
};
|
|
37
37
|
var ConfirmSubscriptionOffer = function (_a) {
|
|
38
38
|
var _b;
|
|
39
|
-
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;
|
|
39
|
+
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, incentiveData = _a.incentiveData;
|
|
40
40
|
var subscription = (_b = user === null || user === void 0 ? void 0 : user.subscriptions) === null || _b === void 0 ? void 0 : _b[0];
|
|
41
|
-
|
|
42
|
-
if (!subscription || !grantedIncentives)
|
|
41
|
+
if (!subscription || !incentiveData)
|
|
43
42
|
return null;
|
|
44
|
-
var latestIncentive = (0, subscriptionsUtils_1.findLatestIncentiveStartDate)(
|
|
43
|
+
var latestIncentive = (0, subscriptionsUtils_1.findLatestIncentiveStartDate)(incentiveData.invoiceSummary.invoiceMonthlySummaryBreakdown);
|
|
45
44
|
if (latestIncentive === null)
|
|
46
45
|
return null;
|
|
47
|
-
var discountPercentage =
|
|
46
|
+
var discountPercentage = incentiveData.discountPercentage;
|
|
48
47
|
var price = subscription === null || subscription === void 0 ? void 0 : subscription.price;
|
|
49
48
|
var currency = subscription === null || subscription === void 0 ? void 0 : subscription.currency;
|
|
50
49
|
var initPrice = (0, subscriptionsUtils_1.calculateDiscountedPrice)(price, discountPercentage);
|
|
51
50
|
var updates = {
|
|
52
51
|
subscriptionType: subscription.type || '',
|
|
53
|
-
offerStartDate: (0, format_1.format)(latestIncentive.
|
|
52
|
+
offerStartDate: (0, format_1.format)(latestIncentive.fromDate, 'dd MMM yyyy'),
|
|
54
53
|
initialPrice: "".concat((0, helpers_1.formatPrice)(initPrice, currency), "/month"),
|
|
55
54
|
regularPrice: "".concat((0, helpers_1.formatPrice)(price, currency), "/month"),
|
|
56
55
|
};
|
|
@@ -60,7 +59,7 @@ var ConfirmSubscriptionOffer = function (_a) {
|
|
|
60
59
|
return __assign(__assign({}, item), { key: key, description: update !== null && update !== void 0 ? update : item.description });
|
|
61
60
|
});
|
|
62
61
|
var headerTitle = (header === null || header === void 0 ? void 0 : header.title)
|
|
63
|
-
? (0, dateUtils_1.replaceDate)(header.title, latestIncentive.
|
|
62
|
+
? (0, dateUtils_1.replaceDate)(header.title, latestIncentive.fromDate)
|
|
64
63
|
: '';
|
|
65
64
|
return (react_1.default.createElement(newskit_1.Stack, { flow: "vertical-center" },
|
|
66
65
|
header && (react_1.default.createElement(newskit_1.GridLayoutItem, null,
|
package/dist/cjs/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,gDAAyB;AACzB,uEAA0D;AAC1D,mCAWgB;AAChB,0CAAwC;AACxC,wDAAwD;AACxD,0EAG4C;AAK5C,4CAA8D;AAE9D,IAAM,oBAAoB,GAAG,IAAA,gBAAM,EAAC,wBAAc,CAAC,qGAAA,4BAE/C,EAAiD,IACpD,KADG,IAAA,8BAAoB,EAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AAED,IAAM,eAAe,GAAG,IAAA,gBAAM,EAAC,eAAK,CAAC,qJAAA,2EAIjC,EAAyC,KAC5C,KADG,IAAA,gCAAsB,EAAC,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,8BAAC,eAAe,aACd,aAAa,EAAC,UAAU,EACxB,YAAY,EAAC,UAAU,IACnB,aAAa;QAEjB,8BAAC,mBAAS,aAAC,gBAAgB,EAAC,mBAAmB,IAAK,cAAc,GAC/D,KAAK,CACI;QACZ,8BAAC,mBAAS,aACR,WAAW,EAAC,SAAS,EACrB,gBAAgB,EAAC,gBAAgB,IAC7B,oBAAoB,GAEvB,WAAW,CACF,CACI,CACnB;AAjBgC,CAiBhC,CAAA;AAEM,IAAM,wBAAwB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"ConfirmSubscriptionOffer.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,uEAA0D;AAC1D,mCAWgB;AAChB,0CAAwC;AACxC,wDAAwD;AACxD,0EAG4C;AAK5C,4CAA8D;AAE9D,IAAM,oBAAoB,GAAG,IAAA,gBAAM,EAAC,wBAAc,CAAC,qGAAA,4BAE/C,EAAiD,IACpD,KADG,IAAA,8BAAoB,EAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AAED,IAAM,eAAe,GAAG,IAAA,gBAAM,EAAC,eAAK,CAAC,qJAAA,2EAIjC,EAAyC,KAC5C,KADG,IAAA,gCAAsB,EAAC,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,8BAAC,eAAe,aACd,aAAa,EAAC,UAAU,EACxB,YAAY,EAAC,UAAU,IACnB,aAAa;QAEjB,8BAAC,mBAAS,aAAC,gBAAgB,EAAC,mBAAmB,IAAK,cAAc,GAC/D,KAAK,CACI;QACZ,8BAAC,mBAAS,aACR,WAAW,EAAC,SAAS,EACrB,gBAAgB,EAAC,gBAAgB,IAC7B,oBAAoB,GAEvB,WAAW,CACF,CACI,CACnB;AAjBgC,CAiBhC,CAAA;AAEM,IAAM,wBAAwB,GAAG,UAAC,EAUT;;QAT9B,MAAM,YAAA,EACN,IAAI,UAAA,EACJ,mBAAmB,yBAAA,EACnB,UAAU,gBAAA,EACV,kBAAkB,wBAAA,EAClB,SAAS,eAAA,EAC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,EAAC,OAAO,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC/D,eAAe,GAElB,UAAU,CACJ,CACE,CACP,CACT,CAAA;AACH,CAAC,CAAA;AArGY,QAAA,wBAAwB,4BAqGpC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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';
|
|
4
5
|
export * from './ConfirmSubscriptionOffer';
|
|
5
6
|
export interface ConfirmSubscriptionOfferProps {
|
|
6
7
|
header: HeaderProps;
|
|
@@ -16,6 +17,7 @@ export interface ConfirmSubscriptionOfferProps {
|
|
|
16
17
|
buttonUrl?: string;
|
|
17
18
|
baseUrl?: string;
|
|
18
19
|
buttonOverrides?: ButtonProps;
|
|
20
|
+
incentiveData: PreviewIncentiveProps | null;
|
|
19
21
|
}
|
|
20
22
|
export interface SubscriptionOfferListItem {
|
|
21
23
|
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":";;;;;;;;;;;;;;;;AAKA,6DAA0C"}
|
|
@@ -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 { NextStepProps } from 'Components/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?: NextStepProps;
|
|
21
21
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { HeaderProps } from '@newskit-render/shared-components';
|
|
3
|
+
import { PreviewIncentiveProps } from '../../../helpers';
|
|
4
|
+
import { UserData } from '../../../pages/types';
|
|
5
|
+
import { ForwardButtonProps } from '../../../Components/Elements/ForwardButton/ForwardButton';
|
|
6
|
+
import { OfferSummaryProps } from './OfferSummary';
|
|
7
|
+
import { NextStepProps } from '../../../Components/Templates/CancellationStepperRender';
|
|
8
|
+
export interface OfferPreviewContextProps {
|
|
9
|
+
header?: HeaderProps;
|
|
10
|
+
subscriptionSummary: OfferSummaryProps;
|
|
11
|
+
paymentSummary: {
|
|
12
|
+
sectionTitle: string;
|
|
13
|
+
};
|
|
14
|
+
note: {
|
|
15
|
+
title: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
continueButton: ForwardButtonProps & {
|
|
19
|
+
nextStep: string;
|
|
20
|
+
};
|
|
21
|
+
user: UserData;
|
|
22
|
+
}
|
|
23
|
+
export interface OfferPreviewPops extends OfferPreviewContextProps {
|
|
24
|
+
selectedOffer?: string;
|
|
25
|
+
baseUrl?: string;
|
|
26
|
+
onNextStep: NextStepProps;
|
|
27
|
+
setIncentiveData: React.Dispatch<React.SetStateAction<PreviewIncentiveProps | null>>;
|
|
28
|
+
incentiveData?: PreviewIncentiveProps | null;
|
|
29
|
+
}
|
|
30
|
+
export declare const OfferPreview: FC<OfferPreviewPops>;
|