@newskit-render/my-account 7.151.0 → 7.151.1-cd5c2d6b0.4
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/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/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/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.d.ts +4 -0
- package/dist/cjs/Components/Sections/CancellationReview/CancellationReview.js +148 -0
- package/dist/cjs/Components/Sections/CancellationReview/CancellationReview.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationReview/index.d.ts +2 -0
- package/dist/cjs/Components/Sections/CancellationReview/index.js +19 -0
- package/dist/cjs/Components/Sections/CancellationReview/index.js.map +1 -0
- package/dist/cjs/Components/Sections/CancellationReview/types.d.ts +23 -0
- package/dist/cjs/Components/Sections/CancellationReview/types.js +3 -0
- package/dist/cjs/Components/Sections/CancellationReview/types.js.map +1 -0
- 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/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 +4 -7
- package/dist/cjs/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- 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/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 +7 -6
- package/dist/cjs/Components/Templates/CancellationStepperRender.js +58 -22
- 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 +16 -2
- package/dist/cjs/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/cjs/Components/index.d.ts +1 -0
- package/dist/cjs/api/queryHandler.js +29 -14
- package/dist/cjs/api/queryHandler.js.map +1 -1
- package/dist/cjs/context/types.d.ts +11 -3
- 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/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/dataUtils.d.ts +1 -0
- package/dist/cjs/helpers/dataUtils.js +42 -5
- package/dist/cjs/helpers/dataUtils.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/featureFlagUtils.js +2 -2
- package/dist/cjs/helpers/featureFlagUtils.js.map +1 -1
- package/dist/cjs/helpers/index.d.ts +2 -0
- package/dist/cjs/helpers/index.js +2 -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 +8 -4
- package/dist/cjs/helpers/subscriptionsUtils.js +15 -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 +5 -5
- package/dist/cjs/pages/CancellationStepper/CancellationStepper.js.map +1 -1
- package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +210 -12
- 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 +4 -0
- package/dist/cjs/queries/getContractPhases.js +1 -1
- package/dist/cjs/queries/getContractPhases.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/getUserSubscription.js +1 -1
- package/dist/cjs/queries/getUserSubscription.js.map +1 -1
- 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/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/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/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.d.ts +4 -0
- package/dist/esm/Components/Sections/CancellationReview/CancellationReview.js +120 -0
- package/dist/esm/Components/Sections/CancellationReview/CancellationReview.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationReview/index.d.ts +2 -0
- package/dist/esm/Components/Sections/CancellationReview/index.js +3 -0
- package/dist/esm/Components/Sections/CancellationReview/index.js.map +1 -0
- package/dist/esm/Components/Sections/CancellationReview/types.d.ts +23 -0
- package/dist/esm/Components/Sections/CancellationReview/types.js +2 -0
- package/dist/esm/Components/Sections/CancellationReview/types.js.map +1 -0
- 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/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 +5 -8
- package/dist/esm/Components/Sections/ContentContainer/ContentContainer.js.map +1 -1
- 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/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 +7 -6
- package/dist/esm/Components/Templates/CancellationStepperRender.js +59 -23
- 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 +16 -2
- package/dist/esm/Components/Templates/SubscriptionAndBillingRender.js.map +1 -1
- package/dist/esm/Components/index.d.ts +1 -0
- package/dist/esm/api/queryHandler.js +29 -14
- package/dist/esm/api/queryHandler.js.map +1 -1
- package/dist/esm/context/types.d.ts +11 -3
- 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/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/dataUtils.d.ts +1 -0
- package/dist/esm/helpers/dataUtils.js +17 -4
- package/dist/esm/helpers/dataUtils.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/featureFlagUtils.js +2 -2
- package/dist/esm/helpers/featureFlagUtils.js.map +1 -1
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +2 -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 +8 -4
- package/dist/esm/helpers/subscriptionsUtils.js +15 -8
- package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js +5 -5
- package/dist/esm/pages/CancellationStepper/CancellationStepper.js.map +1 -1
- package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +211 -13
- 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 +4 -0
- package/dist/esm/queries/getContractPhases.js +1 -1
- package/dist/esm/queries/getContractPhases.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/getUserSubscription.js +1 -1
- package/dist/esm/queries/getUserSubscription.js.map +1 -1
- 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
|
@@ -13,6 +13,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
};
|
|
14
14
|
return __assign.apply(this, arguments);
|
|
15
15
|
};
|
|
16
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
17
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
18
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
19
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
20
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
21
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
22
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
26
|
+
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);
|
|
27
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
28
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
29
|
+
function step(op) {
|
|
30
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
31
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
32
|
+
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;
|
|
33
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
34
|
+
switch (op[0]) {
|
|
35
|
+
case 0: case 1: t = op; break;
|
|
36
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
37
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
38
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
39
|
+
default:
|
|
40
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
41
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
42
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
43
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
44
|
+
if (t[2]) _.ops.pop();
|
|
45
|
+
_.trys.pop(); continue;
|
|
46
|
+
}
|
|
47
|
+
op = body.call(thisArg, _);
|
|
48
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
49
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
16
52
|
import React from 'react';
|
|
17
53
|
import { Button, GridLayout, GridLayoutItem, TextBlock, Divider, styled, getColorCssFromTheme, } from 'newskit';
|
|
18
54
|
import { BenefitsListItem, Header } from '@newskit-render/shared-components';
|
|
@@ -22,25 +58,30 @@ import { replaceBaseURL } from '../../../helpers';
|
|
|
22
58
|
var StyledGridLayout = styled(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"])), getColorCssFromTheme('borderColor', 'neutral030'));
|
|
23
59
|
export var CancellationOffers = function (_a) {
|
|
24
60
|
var _b;
|
|
25
|
-
var baseUrl = _a.baseUrl, header = _a.header, offersSection = _a.offersSection, benefits = _a.benefits, continueButton = _a.continueButton, continueButtonContainerOverrides = _a.continueButtonContainerOverrides,
|
|
61
|
+
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;
|
|
26
62
|
var router = useRouter();
|
|
27
63
|
var handleSelectOffer = function (offerId) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
onSelectOffer(offer);
|
|
31
|
-
};
|
|
32
|
-
var handleContinue = function (event) {
|
|
33
|
-
if ((selectedOffer === null || selectedOffer === void 0 ? void 0 : selectedOffer.nextStep) && onNextStep) {
|
|
34
|
-
onNextStep(event, selectedOffer.nextStep);
|
|
35
|
-
}
|
|
36
|
-
else if (selectedOffer === null || selectedOffer === void 0 ? void 0 : selectedOffer.href) {
|
|
37
|
-
router.push(replaceBaseURL(baseUrl || '', selectedOffer.href));
|
|
38
|
-
}
|
|
64
|
+
sessionStorage.setItem('selectedOfferId', offerId);
|
|
65
|
+
setSelectedOffer(offerId);
|
|
39
66
|
};
|
|
67
|
+
var handleContinue = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
68
|
+
var offer;
|
|
69
|
+
var _a;
|
|
70
|
+
return __generator(this, function (_b) {
|
|
71
|
+
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; });
|
|
72
|
+
if (offer === null || offer === void 0 ? void 0 : offer.href) {
|
|
73
|
+
router.push(replaceBaseURL(baseUrl || '', offer.href));
|
|
74
|
+
}
|
|
75
|
+
if ((offer === null || offer === void 0 ? void 0 : offer.nextStep) && onNextStep) {
|
|
76
|
+
onNextStep(event, offer.nextStep);
|
|
77
|
+
}
|
|
78
|
+
return [2 /*return*/];
|
|
79
|
+
});
|
|
80
|
+
}); };
|
|
40
81
|
return (React.createElement(GridLayout, null,
|
|
41
82
|
header && React.createElement(Header, __assign({}, header)),
|
|
42
83
|
(offersSection === null || offersSection === void 0 ? void 0 : offersSection.title) && (React.createElement(TextBlock, __assign({ typographyPreset: "editorialHeadline050", stylePreset: "inkContrast", marginBlockEnd: "space060" }, offersSection.titleOverrides), offersSection.title)),
|
|
43
|
-
React.createElement(OfferGroup, { offers: (offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) || [], selectedOfferId: selectedOffer
|
|
84
|
+
React.createElement(OfferGroup, { offers: (offersSection === null || offersSection === void 0 ? void 0 : offersSection.items) || [], selectedOfferId: selectedOffer, onSelect: handleSelectOffer }),
|
|
44
85
|
(benefits === null || benefits === void 0 ? void 0 : benefits.showBenefits) && (React.createElement(React.Fragment, null,
|
|
45
86
|
React.createElement(Divider, { overrides: __assign({ marginBlockStart: 'space040', marginBlockEnd: 'space060' }, benefits === null || benefits === void 0 ? void 0 : benefits.dividerOverrides) }),
|
|
46
87
|
(benefits === null || benefits === void 0 ? void 0 : benefits.title) && (React.createElement(React.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,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EACL,MAAM,EACN,UAAU,EACV,cAAc,EACd,SAAS,EACT,OAAO,EACP,MAAM,EACN,oBAAoB,GACrB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,UAAU,MAAM,2BAA2B,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAGjD,IAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,0LAAA,6CAGrC,EAAiD,wEAKtD,KALK,oBAAoB,CAAC,aAAa,EAAE,YAAY,CAAC,CAKtD,CAAA;AAED,MAAM,CAAC,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,SAAS,EAAE,CAAA;IAE1B,IAAM,iBAAiB,GAAG,UAAC,OAAe;QACxC,cAAc,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CA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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,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;
|
|
@@ -22,8 +22,16 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React from 'react';
|
|
24
24
|
import { GridSection } from '../SectionContainer';
|
|
25
|
+
import { useSearchParams } from 'next/navigation';
|
|
26
|
+
var RETURN_URL_PARAM = 'returnUrl';
|
|
27
|
+
export var appendReturnUrl = function (url, returnUrl) {
|
|
28
|
+
if (!url || !returnUrl || url.includes("&".concat(RETURN_URL_PARAM, "="))) {
|
|
29
|
+
return url;
|
|
30
|
+
}
|
|
31
|
+
return "".concat(url, "&").concat(RETURN_URL_PARAM, "=").concat(returnUrl);
|
|
32
|
+
};
|
|
25
33
|
export var CancellationReasons = function (_a) {
|
|
26
|
-
var belowItemExtra = _a.belowItemExtra, onNextStep = _a.onNextStep, handleCardClick = _a.handleCardClick, props = __rest(_a, ["belowItemExtra", "onNextStep", "handleCardClick"]);
|
|
34
|
+
var belowItemExtra = _a.belowItemExtra, onNextStep = _a.onNextStep, handleCardClick = _a.handleCardClick, items = _a.items, props = __rest(_a, ["belowItemExtra", "onNextStep", "handleCardClick", "items"]);
|
|
27
35
|
var onNextStepClick = function (event) {
|
|
28
36
|
var _a, _b;
|
|
29
37
|
// set selected cancellation reason when 'None of the above' button is clicked
|
|
@@ -32,6 +40,9 @@ export var CancellationReasons = function (_a) {
|
|
|
32
40
|
: {})));
|
|
33
41
|
onNextStep === null || onNextStep === void 0 ? void 0 : onNextStep(event);
|
|
34
42
|
};
|
|
35
|
-
|
|
43
|
+
var searchParams = useSearchParams();
|
|
44
|
+
var returnUrl = searchParams.get(RETURN_URL_PARAM);
|
|
45
|
+
var updatedItems = items === null || items === void 0 ? void 0 : items.map(function (item) { return (__assign(__assign({}, item), { href: appendReturnUrl(item.href, returnUrl) })); });
|
|
46
|
+
return (React.createElement(GridSection, __assign({}, props, { belowItemExtra: belowItemExtra, onNextStep: onNextStepClick, handleCardClick: handleCardClick, items: updatedItems })));
|
|
36
47
|
};
|
|
37
48
|
//# sourceMappingURL=CancellationReasons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CancellationReasons.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReasons/CancellationReasons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAoB,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"CancellationReasons.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReasons/CancellationReasons.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,WAAW,EAAoB,MAAM,qBAAqB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,IAAM,gBAAgB,GAAG,WAAW,CAAA;AAEpC,MAAM,CAAC,IAAM,eAAe,GAAG,UAC7B,GAAuB,EACvB,SAAwB;IAExB,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,IAAI,GAAG,CAAC,QAAQ,CAAC,WAAI,gBAAgB,MAAG,CAAC,EAAE,CAAC;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B,UAAU,EAAE,eAAe,EAC3B,eAAe,EAAE,eAAe,EAChC,KAAK,EAAE,YAAY,IACnB,CACH,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Subscriptions } from '../../../pages/types';
|
|
2
|
+
import { CancellationReviewProps } from './types';
|
|
3
|
+
export declare const getItemValue: (type: string | undefined, subscription: Subscriptions | undefined) => string;
|
|
4
|
+
export declare const CancellationReview: ({ baseUrl, header, details, user, cancellationButtons, selectedReason, defaultCancellationReason, genericErrorMessage, setServiceCancellationDate, handleError, onNextStep, }: CancellationReviewProps) => JSX.Element;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
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);
|
|
23
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
|
+
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;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import React, { useState } from 'react';
|
|
49
|
+
import { Block } from 'newskit';
|
|
50
|
+
import { Header, ContentListView, ListItem, } from '@newskit-render/shared-components';
|
|
51
|
+
import { formatDate } from '../../../helpers/dateUtils';
|
|
52
|
+
import { cancelSubscription } from '../../../helpers/cancellationUtils';
|
|
53
|
+
import { CancellationButtons } from '../../Elements/CancellationButtons';
|
|
54
|
+
export var getItemValue = function (type, subscription) {
|
|
55
|
+
var _a;
|
|
56
|
+
switch (type) {
|
|
57
|
+
case 'subscription':
|
|
58
|
+
return (subscription === null || subscription === void 0 ? void 0 : subscription.type) || '';
|
|
59
|
+
case 'subDate':
|
|
60
|
+
return ((_a = subscription === null || subscription === void 0 ? void 0 : subscription.previewCancellation) === null || _a === void 0 ? void 0 : _a.serviceCancellationDate)
|
|
61
|
+
? formatDate(subscription.previewCancellation.serviceCancellationDate)
|
|
62
|
+
: '';
|
|
63
|
+
default:
|
|
64
|
+
return '';
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export var CancellationReview = function (_a) {
|
|
68
|
+
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;
|
|
69
|
+
var _b = useState(false), isCancellingSubscription = _b[0], setIsCancellingSubscription = _b[1];
|
|
70
|
+
var subscription = user.subscriptions[0];
|
|
71
|
+
var showErrorToast = function () {
|
|
72
|
+
handleError === null || handleError === void 0 ? void 0 : handleError('cancellation', {}, genericErrorMessage, undefined, 4000);
|
|
73
|
+
};
|
|
74
|
+
var handleConfirmCancellationClick = function (event) { return __awaiter(void 0, void 0, void 0, function () {
|
|
75
|
+
var selectedCancellationReason, response, parsedResponse, _a;
|
|
76
|
+
var _b, _c;
|
|
77
|
+
return __generator(this, function (_d) {
|
|
78
|
+
switch (_d.label) {
|
|
79
|
+
case 0:
|
|
80
|
+
if (isCancellingSubscription) {
|
|
81
|
+
return [2 /*return*/];
|
|
82
|
+
}
|
|
83
|
+
selectedCancellationReason = (selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.label) || defaultCancellationReason;
|
|
84
|
+
setIsCancellingSubscription(true);
|
|
85
|
+
_d.label = 1;
|
|
86
|
+
case 1:
|
|
87
|
+
_d.trys.push([1, 6, 7, 8]);
|
|
88
|
+
return [4 /*yield*/, cancelSubscription(subscription.id, selectedCancellationReason)];
|
|
89
|
+
case 2:
|
|
90
|
+
response = _d.sent();
|
|
91
|
+
if (!!(response === null || response === void 0 ? void 0 : response.ok)) return [3 /*break*/, 3];
|
|
92
|
+
showErrorToast();
|
|
93
|
+
return [3 /*break*/, 5];
|
|
94
|
+
case 3: return [4 /*yield*/, response.json()];
|
|
95
|
+
case 4:
|
|
96
|
+
parsedResponse = _d.sent();
|
|
97
|
+
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);
|
|
98
|
+
onNextStep === null || onNextStep === void 0 ? void 0 : onNextStep(event);
|
|
99
|
+
_d.label = 5;
|
|
100
|
+
case 5: return [3 /*break*/, 8];
|
|
101
|
+
case 6:
|
|
102
|
+
_a = _d.sent();
|
|
103
|
+
showErrorToast();
|
|
104
|
+
return [3 /*break*/, 8];
|
|
105
|
+
case 7:
|
|
106
|
+
setIsCancellingSubscription(false);
|
|
107
|
+
return [7 /*endfinally*/];
|
|
108
|
+
case 8: return [2 /*return*/];
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}); };
|
|
112
|
+
return (React.createElement(Block, null,
|
|
113
|
+
header && React.createElement(Header, __assign({}, header)),
|
|
114
|
+
details && details.length > 0 && (React.createElement(ContentListView, null, details.map(function (item) { return (React.createElement(ListItem, { key: item.ariaLabel, item: item, listCellProps: {
|
|
115
|
+
itemValue: getItemValue(item.type, subscription),
|
|
116
|
+
description: item.valueDescription,
|
|
117
|
+
}, listItemProps: { overrides: { minHeight: 'sizing090' } } })); }))),
|
|
118
|
+
React.createElement(CancellationButtons, __assign({ baseUrl: baseUrl, onPrimaryButtonClick: handleConfirmCancellationClick }, cancellationButtons))));
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=CancellationReview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CancellationReview.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReview/CancellationReview.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,GACT,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAIxE,MAAM,CAAC,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,UAAU,CAAC,YAAY,CAAC,mBAAmB,CAAC,uBAAuB,CAAC;gBACtE,CAAC,CAAC,EAAE,CAAA;QACR;YACE,OAAO,EAAE,CAAA;IACb,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAA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UAAU,uBAAV,UAAU,CAAG,KAAK,CAAC,CAAA;;;;;oBAGrB,cAAc,EAAE,CAAA;;;oBAEhB,2BAA2B,CAAC,KAAK,CAAC,CAAA;;;;;SAErC,CAAA;IAED,OAAO,CACL,oBAAC,KAAK;QACH,MAAM,IAAI,oBAAC,MAAM,eAAK,MAAM,EAAI;QAChC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,CAChC,oBAAC,eAAe,QACb,OAAO,CAAC,GAAG,CAAC,UAAC,IAAI,IAAK,OAAA,CACrB,oBAAC,QAAQ,IACP,GAAG,EAAE,IAAI,CAAC,SAAS,EACnB,IAAI,EAAE,IAAI,EACV,aAAa,EAAE;gBACb,SAAS,EAAE,YAAY,CAAC,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,oBAAC,mBAAmB,aAClB,OAAO,EAAE,OAAO,EAChB,oBAAoB,EAAE,8BAA8B,IAChD,mBAAmB,EACvB,CACI,CACT,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReview/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HeaderProps, TealiumEventContext, ContentContainerProps as SharedContentContainerProps, ListItemType, ButtonGroupProps } from '@newskit-render/shared-components';
|
|
2
|
+
import { UserData } from '../../../pages/types';
|
|
3
|
+
import { NextStepProps, SelectionData } from '../../Templates/CancellationStepperRender';
|
|
4
|
+
import { GenericMessageMap } from '../../Elements/Toast';
|
|
5
|
+
import { BaseFormActions } from '../../../context/types';
|
|
6
|
+
export interface CancellationReviewContextProps {
|
|
7
|
+
tealiumContext?: TealiumEventContext;
|
|
8
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
9
|
+
showBackButton?: boolean;
|
|
10
|
+
header?: HeaderProps;
|
|
11
|
+
details?: ListItemType[];
|
|
12
|
+
cancellationButtons?: Partial<ButtonGroupProps>;
|
|
13
|
+
defaultCancellationReason: string;
|
|
14
|
+
genericErrorMessage?: GenericMessageMap;
|
|
15
|
+
}
|
|
16
|
+
export interface CancellationReviewProps extends CancellationReviewContextProps {
|
|
17
|
+
baseUrl?: string;
|
|
18
|
+
user: UserData;
|
|
19
|
+
selectedReason?: SelectionData | null;
|
|
20
|
+
onNextStep?: NextStepProps;
|
|
21
|
+
setServiceCancellationDate: React.Dispatch<React.SetStateAction<string | null>>;
|
|
22
|
+
handleError?: BaseFormActions['handleError'];
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/CancellationReview/types.ts"],"names":[],"mappings":""}
|
|
@@ -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;
|
|
@@ -30,21 +30,20 @@ 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, incentiveData = _a.incentiveData;
|
|
34
34
|
var subscription = (_b = user === null || user === void 0 ? void 0 : user.subscriptions) === null || _b === void 0 ? void 0 : _b[0];
|
|
35
|
-
|
|
36
|
-
if (!subscription || !grantedIncentives)
|
|
35
|
+
if (!subscription || !incentiveData)
|
|
37
36
|
return null;
|
|
38
|
-
var latestIncentive = findLatestIncentiveStartDate(
|
|
37
|
+
var latestIncentive = findLatestIncentiveStartDate(incentiveData.invoiceSummary.invoiceMonthlySummaryBreakdown);
|
|
39
38
|
if (latestIncentive === null)
|
|
40
39
|
return null;
|
|
41
|
-
var discountPercentage =
|
|
40
|
+
var discountPercentage = incentiveData.discountPercentage;
|
|
42
41
|
var price = subscription === null || subscription === void 0 ? void 0 : subscription.price;
|
|
43
42
|
var currency = subscription === null || subscription === void 0 ? void 0 : subscription.currency;
|
|
44
43
|
var initPrice = calculateDiscountedPrice(price, discountPercentage);
|
|
45
44
|
var updates = {
|
|
46
45
|
subscriptionType: subscription.type || '',
|
|
47
|
-
offerStartDate: format(latestIncentive.
|
|
46
|
+
offerStartDate: format(latestIncentive.fromDate, 'dd MMM yyyy'),
|
|
48
47
|
initialPrice: "".concat(formatPrice(initPrice, currency), "/month"),
|
|
49
48
|
regularPrice: "".concat(formatPrice(price, currency), "/month"),
|
|
50
49
|
};
|
|
@@ -54,7 +53,7 @@ export var ConfirmSubscriptionOffer = function (_a) {
|
|
|
54
53
|
return __assign(__assign({}, item), { key: key, description: update !== null && update !== void 0 ? update : item.description });
|
|
55
54
|
});
|
|
56
55
|
var headerTitle = (header === null || header === void 0 ? void 0 : header.title)
|
|
57
|
-
? replaceDate(header.title, latestIncentive.
|
|
56
|
+
? replaceDate(header.title, latestIncentive.fromDate)
|
|
58
57
|
: '';
|
|
59
58
|
return (React.createElement(Stack, { flow: "vertical-center" },
|
|
60
59
|
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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O,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,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,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import { Button, GridLayout, GridLayoutItem } from 'newskit';
|
|
14
|
+
import { Header, ContentListView, ListItem, } from '@newskit-render/shared-components';
|
|
15
|
+
export var ContactSupport = function (_a) {
|
|
16
|
+
var header = _a.header, contactMethods = _a.contactMethods, continueButton = _a.continueButton, continueButtonContainerOverrides = _a.continueButtonContainerOverrides, onNextStep = _a.onNextStep;
|
|
17
|
+
return (React.createElement(GridLayout, null,
|
|
18
|
+
header && React.createElement(Header, __assign({}, header)),
|
|
19
|
+
contactMethods && contactMethods.length > 0 && (React.createElement(ContentListView, null, contactMethods.map(function (contactMethod) { return (React.createElement(ListItem, { key: contactMethod.ariaLabel, item: contactMethod, listCellProps: {
|
|
20
|
+
itemValue: contactMethod.default,
|
|
21
|
+
description: contactMethod.valueDescription,
|
|
22
|
+
}, listItemProps: {
|
|
23
|
+
overrides: {
|
|
24
|
+
minHeight: 'sizing090',
|
|
25
|
+
},
|
|
26
|
+
} })); }))),
|
|
27
|
+
(continueButton === null || continueButton === void 0 ? void 0 : continueButton.text) && (React.createElement(GridLayoutItem, __assign({ column: "1 / -1", justifySelf: {
|
|
28
|
+
xs: 'stretch',
|
|
29
|
+
md: 'flex-end',
|
|
30
|
+
} }, continueButtonContainerOverrides),
|
|
31
|
+
React.createElement(Button, { onClick: onNextStep, eventContext: continueButton === null || continueButton === void 0 ? void 0 : continueButton.eventContext, overrides: __assign({ width: {
|
|
32
|
+
xs: '100%',
|
|
33
|
+
md: 'auto',
|
|
34
|
+
} }, continueButton === null || continueButton === void 0 ? void 0 : continueButton.overrides) }, continueButton.text)))));
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=ContactSupport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContactSupport.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ContactSupport/ContactSupport.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,EACL,MAAM,EACN,eAAe,EACf,QAAQ,GACT,MAAM,mCAAmC,CAAA;AAG1C,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,EAMT;QALpB,MAAM,YAAA,EACN,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,gCAAgC,sCAAA,EAChC,UAAU,gBAAA;IAEV,OAAO,CACL,oBAAC,UAAU;QACR,MAAM,IAAI,oBAAC,MAAM,eAAK,MAAM,EAAI;QAChC,cAAc,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9C,oBAAC,eAAe,QACb,cAAc,CAAC,GAAG,CAAC,UAAC,aAAa,IAAK,OAAA,CACrC,oBAAC,QAAQ,IACP,GAAG,EAAE,aAAa,CAAC,SAAS,EAC5B,IAAI,EAAE,aAAa,EACnB,aAAa,EAAE;gBACb,SAAS,EAAE,aAAa,CAAC,OAAO;gBAChC,WAAW,EAAE,aAAa,CAAC,gBAAgB;aAC5C,EACD,aAAa,EAAE;gBACb,SAAS,EAAE;oBACT,SAAS,EAAE,WAAW;iBACvB;aACF,GACD,CACH,EAdsC,CActC,CAAC,CACc,CACnB;QAEA,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,IAAI,KAAI,CACvB,oBAAC,cAAc,aACb,MAAM,EAAC,QAAQ,EACf,WAAW,EAAE;gBACX,EAAE,EAAE,SAAS;gBACb,EAAE,EAAE,UAAU;aACf,IACG,gCAAgC;YAEpC,oBAAC,MAAM,IACL,OAAO,EAAE,UAAU,EACnB,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,SAAS,KAG7B,cAAc,CAAC,IAAI,CACb,CACM,CAClB,CACU,CACd,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ContactSupport/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { GridLayoutItem, ButtonProps } from 'newskit';
|
|
3
|
+
import { TealiumEventContext, HeaderProps, ContentContainerProps as SharedContentContainerProps, ListItemType } from '@newskit-render/shared-components';
|
|
4
|
+
import { NextStepProps } from 'Components/Templates/CancellationStepperRender';
|
|
5
|
+
export interface ContactMethodListItem extends Omit<ListItemType, 'default'> {
|
|
6
|
+
default: string | string[] | JSX.Element;
|
|
7
|
+
}
|
|
8
|
+
export interface ContactSupportContextProps {
|
|
9
|
+
tealiumContext?: TealiumEventContext;
|
|
10
|
+
contentContainerOverrides?: Partial<SharedContentContainerProps>;
|
|
11
|
+
showBackButton?: boolean;
|
|
12
|
+
header?: HeaderProps;
|
|
13
|
+
contactMethods?: ContactMethodListItem[];
|
|
14
|
+
continueButton?: ButtonProps & {
|
|
15
|
+
text: string;
|
|
16
|
+
};
|
|
17
|
+
continueButtonContainerOverrides?: ComponentProps<typeof GridLayoutItem>;
|
|
18
|
+
}
|
|
19
|
+
export interface ContactSupportProps extends ContactSupportContextProps {
|
|
20
|
+
onNextStep?: NextStepProps;
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/ContactSupport/types.ts"],"names":[],"mappings":""}
|
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, { useState } from 'react';
|
|
12
|
+
import React, { useState, isValidElement } from 'react';
|
|
13
13
|
import { useInstrumentation } from 'newskit';
|
|
14
14
|
import { ContentListView, createClickEvent, ListItem, checkRequestHeaders, UserPlatform, } from '@newskit-render/shared-components';
|
|
15
15
|
import { useAccountContext, } from '../../../context';
|
|
@@ -111,7 +111,9 @@ export var ContentContainer = function (_a) {
|
|
|
111
111
|
var itemValue = getListItemValue(userData, item.type || '', item.default, item.path, {
|
|
112
112
|
publisher: PUBLISHER,
|
|
113
113
|
});
|
|
114
|
-
var description =
|
|
114
|
+
var description = isValidElement(item.valueDescription)
|
|
115
|
+
? item.valueDescription
|
|
116
|
+
: getValueDescription(userData, item.type || '', item.valueDescription || '');
|
|
115
117
|
var ItemProps = {
|
|
116
118
|
item: __assign(__assign({}, item), { href: getHref(baseUrl, userData, item.href, {
|
|
117
119
|
publisher: PUBLISHER || '',
|
|
@@ -155,12 +157,7 @@ export var ContentContainer = function (_a) {
|
|
|
155
157
|
}
|
|
156
158
|
if (item.type === 'reminderNotices') {
|
|
157
159
|
var notificationContentMap = getNotificationData(customerNotifications, item.type, currentNoticePageSize);
|
|
158
|
-
return notificationContentMap === null || notificationContentMap === void 0 ? void 0 : notificationContentMap.map(function (notification, idx) { return (React.createElement(ListItem, __assign({ key: "".concat(i, "-").concat(idx) }, ItemProps, {
|
|
159
|
-
/* istanbul ignore next */
|
|
160
|
-
isTNLMobileApp, function () {
|
|
161
|
-
return fireEvent(createClickEvent('content-list-view', 'cta : view notice', undefined, undefined, 'Subscriptions & Billing', 'navigation'));
|
|
162
|
-
}),
|
|
163
|
-
item: __assign(__assign({}, ItemProps.item), notification) }))); });
|
|
160
|
+
return notificationContentMap === null || notificationContentMap === void 0 ? void 0 : notificationContentMap.map(function (notification, idx) { return (React.createElement(ListItem, __assign({ key: "".concat(i, "-").concat(idx) }, ItemProps, { item: __assign(__assign({}, ItemProps.item), notification) }))); });
|
|
164
161
|
}
|
|
165
162
|
return React.createElement(ListItem, __assign({ key: i }, ItemProps));
|
|
166
163
|
};
|