@newskit-render/my-account 7.153.2-86789c10d.16 → 7.154.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.d.ts +1 -1
  2. package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js +1 -1
  3. package/dist/cjs/Components/Elements/ForwardButton/ForwardButton.js.map +1 -1
  4. package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.d.ts +1 -4
  5. package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.js +3 -28
  6. package/dist/cjs/Components/Elements/TimesLoading/TimesLoading.js.map +1 -1
  7. package/dist/cjs/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +2 -2
  8. package/dist/cjs/Components/Sections/CancellationDetails/types.d.ts +2 -2
  9. package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.d.ts +1 -1
  10. package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js +13 -54
  11. package/dist/cjs/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
  12. package/dist/cjs/Components/Sections/CancellationOffers/types.d.ts +4 -29
  13. package/dist/cjs/Components/Sections/CancellationReview/types.d.ts +2 -2
  14. package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +1 -1
  15. package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +7 -6
  16. package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
  17. package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +0 -2
  18. package/dist/cjs/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -1
  19. package/dist/cjs/Components/Sections/ContactSupport/types.d.ts +2 -2
  20. package/dist/cjs/Components/Sections/SectionContainer/types.d.ts +2 -2
  21. package/dist/cjs/Components/Templates/CancellationStepperRender.d.ts +5 -4
  22. package/dist/cjs/Components/Templates/CancellationStepperRender.js +7 -6
  23. package/dist/cjs/Components/Templates/CancellationStepperRender.js.map +1 -1
  24. package/dist/cjs/api/queryHandler.js +13 -24
  25. package/dist/cjs/api/queryHandler.js.map +1 -1
  26. package/dist/cjs/context/types.d.ts +3 -9
  27. package/dist/cjs/context/types.js.map +1 -1
  28. package/dist/cjs/helpers/apiHandlerUtils.js +0 -1
  29. package/dist/cjs/helpers/apiHandlerUtils.js.map +1 -1
  30. package/dist/cjs/helpers/cancellationUtils.d.ts +0 -20
  31. package/dist/cjs/helpers/cancellationUtils.js +1 -110
  32. package/dist/cjs/helpers/cancellationUtils.js.map +1 -1
  33. package/dist/cjs/helpers/getQuery.js +3 -2
  34. package/dist/cjs/helpers/getQuery.js.map +1 -1
  35. package/dist/cjs/helpers/index.d.ts +0 -1
  36. package/dist/cjs/helpers/index.js +2 -1
  37. package/dist/cjs/helpers/index.js.map +1 -1
  38. package/dist/cjs/helpers/subscriptionsUtils.d.ts +1 -2
  39. package/dist/cjs/helpers/subscriptionsUtils.js +2 -2
  40. package/dist/cjs/helpers/subscriptionsUtils.js.map +1 -1
  41. package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js +18 -90
  42. package/dist/cjs/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
  43. package/dist/cjs/queries/index.d.ts +0 -2
  44. package/dist/cjs/queries/index.js +0 -2
  45. package/dist/cjs/queries/index.js.map +1 -1
  46. package/dist/esm/Components/Elements/ForwardButton/ForwardButton.d.ts +1 -1
  47. package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js +1 -1
  48. package/dist/esm/Components/Elements/ForwardButton/ForwardButton.js.map +1 -1
  49. package/dist/esm/Components/Elements/TimesLoading/TimesLoading.d.ts +1 -4
  50. package/dist/esm/Components/Elements/TimesLoading/TimesLoading.js +3 -28
  51. package/dist/esm/Components/Elements/TimesLoading/TimesLoading.js.map +1 -1
  52. package/dist/esm/Components/Sections/CancelSubscriptionDowngrade/CancelSubscriptionDowngrade.d.ts +2 -2
  53. package/dist/esm/Components/Sections/CancellationDetails/types.d.ts +2 -2
  54. package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.d.ts +1 -1
  55. package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js +13 -54
  56. package/dist/esm/Components/Sections/CancellationOffers/CancellationOffers.js.map +1 -1
  57. package/dist/esm/Components/Sections/CancellationOffers/types.d.ts +4 -29
  58. package/dist/esm/Components/Sections/CancellationReview/types.d.ts +2 -2
  59. package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.d.ts +1 -1
  60. package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js +7 -6
  61. package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/ConfirmSubscriptionOffer.js.map +1 -1
  62. package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.d.ts +0 -2
  63. package/dist/esm/Components/Sections/ConfirmSubscriptionOffer/index.js.map +1 -1
  64. package/dist/esm/Components/Sections/ContactSupport/types.d.ts +2 -2
  65. package/dist/esm/Components/Sections/SectionContainer/types.d.ts +2 -2
  66. package/dist/esm/Components/Templates/CancellationStepperRender.d.ts +5 -4
  67. package/dist/esm/Components/Templates/CancellationStepperRender.js +8 -7
  68. package/dist/esm/Components/Templates/CancellationStepperRender.js.map +1 -1
  69. package/dist/esm/api/queryHandler.js +13 -24
  70. package/dist/esm/api/queryHandler.js.map +1 -1
  71. package/dist/esm/context/types.d.ts +3 -9
  72. package/dist/esm/context/types.js.map +1 -1
  73. package/dist/esm/helpers/apiHandlerUtils.js +1 -2
  74. package/dist/esm/helpers/apiHandlerUtils.js.map +1 -1
  75. package/dist/esm/helpers/cancellationUtils.d.ts +0 -20
  76. package/dist/esm/helpers/cancellationUtils.js +0 -106
  77. package/dist/esm/helpers/cancellationUtils.js.map +1 -1
  78. package/dist/esm/helpers/getQuery.js +4 -3
  79. package/dist/esm/helpers/getQuery.js.map +1 -1
  80. package/dist/esm/helpers/index.d.ts +0 -1
  81. package/dist/esm/helpers/index.js +2 -1
  82. package/dist/esm/helpers/index.js.map +1 -1
  83. package/dist/esm/helpers/subscriptionsUtils.d.ts +1 -2
  84. package/dist/esm/helpers/subscriptionsUtils.js +2 -2
  85. package/dist/esm/helpers/subscriptionsUtils.js.map +1 -1
  86. package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js +19 -91
  87. package/dist/esm/pages/CancellationStepper/CancellationStepperContext.js.map +1 -1
  88. package/dist/esm/queries/index.d.ts +0 -2
  89. package/dist/esm/queries/index.js +0 -2
  90. package/dist/esm/queries/index.js.map +1 -1
  91. package/package.json +3 -3
  92. package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.d.ts +0 -30
  93. package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js +0 -189
  94. package/dist/cjs/Components/Sections/OfferPreview/OfferPreview.js.map +0 -1
  95. package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.d.ts +0 -21
  96. package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js +0 -95
  97. package/dist/cjs/Components/Sections/OfferPreview/OfferSummary.js.map +0 -1
  98. package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.d.ts +0 -9
  99. package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js +0 -38
  100. package/dist/cjs/Components/Sections/OfferPreview/SummaryRow.js.map +0 -1
  101. package/dist/cjs/Components/Sections/OfferPreview/index.d.ts +0 -0
  102. package/dist/cjs/Components/Sections/OfferPreview/index.js +0 -2
  103. package/dist/cjs/Components/Sections/OfferPreview/index.js.map +0 -1
  104. package/dist/cjs/Components/Sections/OfferPreview/types.d.ts +0 -0
  105. package/dist/cjs/Components/Sections/OfferPreview/types.js +0 -2
  106. package/dist/cjs/Components/Sections/OfferPreview/types.js.map +0 -1
  107. package/dist/cjs/helpers/stringUtils.d.ts +0 -1
  108. package/dist/cjs/helpers/stringUtils.js +0 -9
  109. package/dist/cjs/helpers/stringUtils.js.map +0 -1
  110. package/dist/cjs/queries/getIncentivePreview.d.ts +0 -2
  111. package/dist/cjs/queries/getIncentivePreview.js +0 -11
  112. package/dist/cjs/queries/getIncentivePreview.js.map +0 -1
  113. package/dist/cjs/queries/mutateApplyIncentive.d.ts +0 -2
  114. package/dist/cjs/queries/mutateApplyIncentive.js +0 -11
  115. package/dist/cjs/queries/mutateApplyIncentive.js.map +0 -1
  116. package/dist/esm/Components/Sections/OfferPreview/OfferPreview.d.ts +0 -30
  117. package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js +0 -159
  118. package/dist/esm/Components/Sections/OfferPreview/OfferPreview.js.map +0 -1
  119. package/dist/esm/Components/Sections/OfferPreview/OfferSummary.d.ts +0 -21
  120. package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js +0 -88
  121. package/dist/esm/Components/Sections/OfferPreview/OfferSummary.js.map +0 -1
  122. package/dist/esm/Components/Sections/OfferPreview/SummaryRow.d.ts +0 -9
  123. package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js +0 -31
  124. package/dist/esm/Components/Sections/OfferPreview/SummaryRow.js.map +0 -1
  125. package/dist/esm/Components/Sections/OfferPreview/index.d.ts +0 -0
  126. package/dist/esm/Components/Sections/OfferPreview/index.js +0 -2
  127. package/dist/esm/Components/Sections/OfferPreview/index.js.map +0 -1
  128. package/dist/esm/Components/Sections/OfferPreview/types.d.ts +0 -0
  129. package/dist/esm/Components/Sections/OfferPreview/types.js +0 -2
  130. package/dist/esm/Components/Sections/OfferPreview/types.js.map +0 -1
  131. package/dist/esm/helpers/stringUtils.d.ts +0 -1
  132. package/dist/esm/helpers/stringUtils.js +0 -5
  133. package/dist/esm/helpers/stringUtils.js.map +0 -1
  134. package/dist/esm/queries/getIncentivePreview.d.ts +0 -2
  135. package/dist/esm/queries/getIncentivePreview.js +0 -8
  136. package/dist/esm/queries/getIncentivePreview.js.map +0 -1
  137. package/dist/esm/queries/mutateApplyIncentive.d.ts +0 -2
  138. package/dist/esm/queries/mutateApplyIncentive.js +0 -8
  139. package/dist/esm/queries/mutateApplyIncentive.js.map +0 -1
@@ -1,30 +0,0 @@
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>;
@@ -1,189 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- var desc = Object.getOwnPropertyDescriptor(m, k);
20
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
- desc = { enumerable: true, get: function() { return m[k]; } };
22
- }
23
- Object.defineProperty(o, k2, desc);
24
- }) : (function(o, m, k, k2) {
25
- if (k2 === undefined) k2 = k;
26
- o[k2] = m[k];
27
- }));
28
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
- Object.defineProperty(o, "default", { enumerable: true, value: v });
30
- }) : function(o, v) {
31
- o["default"] = v;
32
- });
33
- var __importStar = (this && this.__importStar) || function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
41
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
42
- return new (P || (P = Promise))(function (resolve, reject) {
43
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
44
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
45
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
46
- step((generator = generator.apply(thisArg, _arguments || [])).next());
47
- });
48
- };
49
- var __generator = (this && this.__generator) || function (thisArg, body) {
50
- 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);
51
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
52
- function verb(n) { return function (v) { return step([n, v]); }; }
53
- function step(op) {
54
- if (f) throw new TypeError("Generator is already executing.");
55
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
56
- 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;
57
- if (y = 0, t) op = [op[0] & 2, t.value];
58
- switch (op[0]) {
59
- case 0: case 1: t = op; break;
60
- case 4: _.label++; return { value: op[1], done: false };
61
- case 5: _.label++; y = op[1]; op = [0]; continue;
62
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
63
- default:
64
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
65
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
66
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
67
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
68
- if (t[2]) _.ops.pop();
69
- _.trys.pop(); continue;
70
- }
71
- op = body.call(thisArg, _);
72
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
73
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
74
- }
75
- };
76
- var __importDefault = (this && this.__importDefault) || function (mod) {
77
- return (mod && mod.__esModule) ? mod : { "default": mod };
78
- };
79
- Object.defineProperty(exports, "__esModule", { value: true });
80
- exports.OfferPreview = void 0;
81
- var react_1 = __importStar(require("react"));
82
- var shared_components_1 = require("@newskit-render/shared-components");
83
- var newskit_1 = require("newskit");
84
- var helpers_1 = require("../../../helpers");
85
- var OfferSummary_1 = require("./OfferSummary");
86
- var TimesLoading_1 = require("../../../Components/Elements/TimesLoading");
87
- var sendToast_1 = __importDefault(require("../../../Components/Elements/Toast/sendToast"));
88
- var StyledStack = (0, newskit_1.styled)(newskit_1.Stack)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid;\n height: auto;\n ", ";\n"], ["\n border: 1px solid;\n height: auto;\n ", ";\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'neutral030'));
89
- var StyledLoading = (0, newskit_1.styled)(newskit_1.Stack)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid;\n height: auto;\n ", ";\n"], ["\n border: 1px solid;\n height: auto;\n ", ";\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'neutral040'));
90
- var OfferPreview = function (_a) {
91
- var _b;
92
- var header = _a.header, subscriptionSummary = _a.subscriptionSummary, note = _a.note, paymentSummary = _a.paymentSummary, continueButton = _a.continueButton, user = _a.user, selectedOffer = _a.selectedOffer, onNextStep = _a.onNextStep, setIncentiveData = _a.setIncentiveData, incentiveData = _a.incentiveData;
93
- var _c = (0, react_1.useState)(true), loading = _c[0], setLoading = _c[1];
94
- var _d = (0, react_1.useState)(selectedOffer || ''), offerCode = _d[0], setOfferCode = _d[1];
95
- var enrichedSubscriptionSummary = (0, react_1.useMemo)(function () {
96
- if (incentiveData && user) {
97
- var components2 = (0, helpers_1.populateSubscriptionSummaryData)(incentiveData, subscriptionSummary, user);
98
- return components2;
99
- }
100
- return null;
101
- }, [subscriptionSummary, incentiveData, user]);
102
- var handleError = function (message) {
103
- (0, sendToast_1.default)('', 'error', undefined, undefined, message);
104
- };
105
- (0, react_1.useEffect)(function () {
106
- var fetchOfferPreviewData = function () { return __awaiter(void 0, void 0, void 0, function () {
107
- var incentiveCode, response, error_1;
108
- var _a, _b;
109
- return __generator(this, function (_c) {
110
- switch (_c.label) {
111
- case 0:
112
- _c.trys.push([0, 2, 3, 4]);
113
- incentiveCode = offerCode || sessionStorage.getItem('selectedOfferId') || '';
114
- setOfferCode(incentiveCode);
115
- if (!incentiveCode)
116
- throw new Error('No selected offer ID found');
117
- return [4 /*yield*/, (0, helpers_1.getOfferPreviewData)({
118
- subscriptionCode: (_b = (_a = user.subscriptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id,
119
- incentiveCode: incentiveCode,
120
- })];
121
- case 1:
122
- response = _c.sent();
123
- setIncentiveData(response.previewIncentive);
124
- return [3 /*break*/, 4];
125
- case 2:
126
- error_1 = _c.sent();
127
- handleError('There was an error loading the data. Please try again later.');
128
- return [3 /*break*/, 4];
129
- case 3:
130
- setLoading(false);
131
- return [7 /*endfinally*/];
132
- case 4: return [2 /*return*/];
133
- }
134
- });
135
- }); };
136
- fetchOfferPreviewData();
137
- }, []);
138
- var paymentExpDate = (0, helpers_1.getValueDescription)(user, 'payment', 'expiry date');
139
- var handleContinue = function (event) { return __awaiter(void 0, void 0, void 0, function () {
140
- var error_2;
141
- var _a, _b;
142
- return __generator(this, function (_c) {
143
- switch (_c.label) {
144
- case 0:
145
- _c.trys.push([0, 2, 3, 4]);
146
- setLoading(true);
147
- return [4 /*yield*/, (0, helpers_1.applyIncentive)(offerCode, ((_b = (_a = user.subscriptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || '')];
148
- case 1:
149
- _c.sent();
150
- onNextStep(event, continueButton.nextStep);
151
- return [3 /*break*/, 4];
152
- case 2:
153
- error_2 = _c.sent();
154
- handleError('There was an error applying the offer. Please try again later.');
155
- return [3 /*break*/, 4];
156
- case 3:
157
- setLoading(false);
158
- return [7 /*endfinally*/];
159
- case 4: return [2 /*return*/];
160
- }
161
- });
162
- }); };
163
- return (react_1.default.createElement(newskit_1.Block, null,
164
- header && react_1.default.createElement(shared_components_1.Header, __assign({}, header)),
165
- react_1.default.createElement(newskit_1.GridLayout, { rowGap: "space070", columns: "12fr", "data-testid": "offer-preview" },
166
- react_1.default.createElement(newskit_1.GridLayoutItem, null, enrichedSubscriptionSummary ? (react_1.default.createElement(react_1.default.Fragment, null,
167
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "offer-summary-title", paddingBlockEnd: "space030", typographyPreset: "utilitySubheading020" }, enrichedSubscriptionSummary.sectionTitle),
168
- react_1.default.createElement(OfferSummary_1.OfferSummary, __assign({}, enrichedSubscriptionSummary)))) : (react_1.default.createElement(StyledLoading, { flow: "horizontal-center", stackDistribution: "center", "data-testid": "loading-offer", paddingBlock: "space080" },
169
- react_1.default.createElement(TimesLoading_1.TimesLoading, { height: "auto", loadingText: "Loading payment information" })))),
170
- react_1.default.createElement(newskit_1.GridLayoutItem, null,
171
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "payment-summary-title", paddingBlockEnd: "space030", typographyPreset: "utilitySubheading020" }, paymentSummary.sectionTitle),
172
- react_1.default.createElement(StyledStack, { paddingBlock: "space040", paddingInline: "space040", flow: "horizontal-center", stackDistribution: "space-between" },
173
- (0, helpers_1.getDefaultItemValue)(user, 'payment', ''),
174
- react_1.default.createElement(newskit_1.TextBlock, { stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, paymentExpDate))),
175
- react_1.default.createElement(newskit_1.GridLayoutItem, null,
176
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "note-title", typographyPreset: "utilitySubheading020", paddingBlockEnd: "space030" }, note.title),
177
- react_1.default.createElement(newskit_1.TextBlock, { typographyPreset: "utilityBody010", stylePreset: "inkSubtle" }, note.description)),
178
- react_1.default.createElement(newskit_1.Stack, { flow: { md: 'horizontal-center', xs: 'vertical-center' }, stackDistribution: "flex-end", flowReverse: { xs: true, md: false } },
179
- continueButton.label,
180
- react_1.default.createElement(newskit_1.Button, { disabled: loading, onClick: handleContinue, eventContext: continueButton === null || continueButton === void 0 ? void 0 : continueButton.eventContext, overrides: __assign({ width: {
181
- xs: '100%',
182
- md: 'auto',
183
- }, marginInlineStart: {
184
- md: 'space050',
185
- }, marginBlockEnd: { xs: 'space040', md: 'space000' } }, continueButton === null || continueButton === void 0 ? void 0 : continueButton.buttonOverrides) }, (_b = continueButton === null || continueButton === void 0 ? void 0 : continueButton.button) === null || _b === void 0 ? void 0 : _b.text)))));
186
- };
187
- exports.OfferPreview = OfferPreview;
188
- var templateObject_1, templateObject_2;
189
- //# sourceMappingURL=OfferPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfferPreview.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/OfferPreview.tsx"],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,EAAC,UAAU,IAEzB,IAAI,CAAC,KAAK,CACD;gBACZ,8BAAC,mBAAS,IAAC,gBAAgB,EAAC,gBAAgB,EAAC,WAAW,EAAC,WAAW,IACjE,IAAI,CAAC,WAAW,CACP,CACG;YACjB,8BAAC,eAAK,IACJ,IAAI,EAAE,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,iBAAiB,EAAE,EACxD,iBAAiB,EAAC,UAAU,EAC5B,WAAW,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE;gBAEnC,cAAc,CAAC,KAAK;gBACrB,8BAAC,gBAAM,IACL,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,EAC1C,SAAS,aACP,KAAK,EAAE;4BACL,EAAE,EAAE,MAAM;4BACV,EAAE,EAAE,MAAM;yBACX,EACD,iBAAiB,EAAE;4BACjB,EAAE,EAAE,UAAU;yBACf,EACD,cAAc,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,IAC/C,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,eAAe,KAGnC,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,MAAM,0CAAE,IAAI,CACtB,CACH,CACG,CACP,CACT,CAAA;AACH,CAAC,CAAA;AAvKY,QAAA,YAAY,gBAuKxB"}
@@ -1,21 +0,0 @@
1
- import { FC } from 'react';
2
- import { SummaryRowProps } from './SummaryRow';
3
- export interface PaymentBreakdownProps {
4
- title: string;
5
- accountCreditRow: SummaryRowProps;
6
- discountedSubscriptionRow?: SummaryRowProps;
7
- offerSubscriptionRow?: SummaryRowProps;
8
- }
9
- export interface OfferSummaryProps {
10
- sectionTitle: string;
11
- offerTitle: string;
12
- discountName: string;
13
- discountPercentage: number;
14
- discountStartDate: string;
15
- fullPriceSubscriptionPrice: string;
16
- fullPriceSubscriptionStartDate: string;
17
- paymentBreakdown?: PaymentBreakdownProps;
18
- nextPaymentRow: SummaryRowProps;
19
- remainingCredit?: SummaryRowProps;
20
- }
21
- export declare const OfferSummary: FC<OfferSummaryProps>;
@@ -1,95 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- var __assign = (this && this.__assign) || function () {
7
- __assign = Object.assign || function(t) {
8
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9
- s = arguments[i];
10
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
- t[p] = s[p];
12
- }
13
- return t;
14
- };
15
- return __assign.apply(this, arguments);
16
- };
17
- var __importDefault = (this && this.__importDefault) || function (mod) {
18
- return (mod && mod.__esModule) ? mod : { "default": mod };
19
- };
20
- Object.defineProperty(exports, "__esModule", { value: true });
21
- exports.OfferSummary = void 0;
22
- var react_1 = __importDefault(require("react"));
23
- var newskit_1 = require("newskit");
24
- var SummaryRow_1 = require("./SummaryRow");
25
- var StyledGridLayout = (0, newskit_1.styled)(newskit_1.GridLayout)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
26
- var StyledSection = (0, newskit_1.styled)(newskit_1.GridLayout)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid;\n ", ";\n"], ["\n border: 1px solid;\n ", ";\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'neutral030'));
27
- var StylesBlock = (0, newskit_1.styled)(newskit_1.Block)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border: 1px solid;\n ", ";\n ", ";\n ", "\n ", "\n right: 0;\n position: absolute;\n"], ["\n border: 1px solid;\n ", ";\n ", ";\n ", "\n ", "\n right: 0;\n position: absolute;\n"])), (0, newskit_1.getColorCssFromTheme)('borderColor', 'teal040'), (0, newskit_1.getColorCssFromTheme)('backgroundColor', 'teal010'), (0, newskit_1.getBorderCssFromTheme)('borderRadius', 'borderRadiusRounded010'), (0, newskit_1.getSpacingCssFromTheme)('padding', 'space020'));
28
- var OfferSummary = function (_a) {
29
- var sectionTitle = _a.sectionTitle, offerTitle = _a.offerTitle, discountName = _a.discountName, discountPercentage = _a.discountPercentage, fullPriceSubscriptionPrice = _a.fullPriceSubscriptionPrice, fullPriceSubscriptionStartDate = _a.fullPriceSubscriptionStartDate, paymentBreakdown = _a.paymentBreakdown, nextPaymentRow = _a.nextPaymentRow, remainingCredit = _a.remainingCredit, discountStartDate = _a.discountStartDate;
30
- return (react_1.default.createElement(react_1.default.Fragment, null,
31
- react_1.default.createElement(StyledSection, { rowGap: "space040", columns: '12fr', overrides: {
32
- paddingBlock: 'space040',
33
- paddingInline: 'space040',
34
- } },
35
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "offer-title", typographyPreset: "editorialHeadline010" }, offerTitle),
36
- react_1.default.createElement(newskit_1.Divider, { overrides: {
37
- marginBlock: 'space010',
38
- } }),
39
- react_1.default.createElement(StyledGridLayout, { rowGap: "space030" },
40
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "discount-name", typographyPreset: "utilitySubheading020" }, discountName),
41
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "discount-start-date", stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, discountStartDate),
42
- react_1.default.createElement(StylesBlock, null,
43
- react_1.default.createElement(newskit_1.TextBlock, { typographyPreset: "utilityLabel010" },
44
- discountPercentage,
45
- "% off"))),
46
- react_1.default.createElement(newskit_1.GridLayout, { rowGap: "space030", overrides: {
47
- marginBlockStart: 'space020',
48
- } },
49
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "full-price-subscription-price", typographyPreset: "utilitySubheading020" }, fullPriceSubscriptionPrice),
50
- react_1.default.createElement(newskit_1.TextBlock, { "data-testid": "full-price-subscription-start-date", stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, fullPriceSubscriptionStartDate)),
51
- paymentBreakdown && (react_1.default.createElement(react_1.default.Fragment, null,
52
- react_1.default.createElement(newskit_1.Divider, { overrides: {
53
- marginBlock: 'space010',
54
- } }),
55
- react_1.default.createElement(newskit_1.TextBlock, { typographyPreset: "utilitySubheading020" }, paymentBreakdown.title),
56
- paymentBreakdown.offerSubscriptionRow && (react_1.default.createElement(SummaryRow_1.SummaryRow, __assign({}, paymentBreakdown.offerSubscriptionRow, { "data-testid": "offer-subscription-row", labelOverrides: {
57
- stylePreset: 'inkSubtle',
58
- typographyPreset: 'utilityBody010',
59
- }, valueOverrides: {
60
- stylePreset: 'inkSubtle',
61
- typographyPreset: 'utilityBody010',
62
- } }))),
63
- react_1.default.createElement(SummaryRow_1.SummaryRow, __assign({}, paymentBreakdown.accountCreditRow, { "data-testid": "account-credit-row", labelOverrides: {
64
- stylePreset: 'inkSubtle',
65
- typographyPreset: 'utilityBody010',
66
- }, valueOverrides: {
67
- stylePreset: 'inkSubtle',
68
- typographyPreset: 'utilityBody010',
69
- } })),
70
- paymentBreakdown.discountedSubscriptionRow && (react_1.default.createElement(SummaryRow_1.SummaryRow, __assign({}, paymentBreakdown.discountedSubscriptionRow, { "data-testid": "discounted-subscription-row", labelOverrides: {
71
- stylePreset: 'inkSubtle',
72
- typographyPreset: 'utilityBody010',
73
- }, valueOverrides: {
74
- stylePreset: 'inkSubtle',
75
- typographyPreset: 'utilityBody010',
76
- } }))))),
77
- react_1.default.createElement(newskit_1.Divider, { overrides: {
78
- marginBlock: 'space010',
79
- } }),
80
- react_1.default.createElement(SummaryRow_1.SummaryRow, __assign({}, nextPaymentRow, { "data-testid": "next-payment-row", labelOverrides: {
81
- typographyPreset: 'utilitySubheading030',
82
- }, valueOverrides: {
83
- typographyPreset: 'utilitySubheading030',
84
- } })),
85
- remainingCredit && (react_1.default.createElement(SummaryRow_1.SummaryRow, __assign({}, remainingCredit, { "data-testid": "remaining-credit-row", labelOverrides: {
86
- stylePreset: 'inkSubtle',
87
- typographyPreset: 'utilityBody010',
88
- }, valueOverrides: {
89
- stylePreset: 'inkSubtle',
90
- typographyPreset: 'utilityBody010',
91
- } }))))));
92
- };
93
- exports.OfferSummary = OfferSummary;
94
- var templateObject_1, templateObject_2, templateObject_3;
95
- //# sourceMappingURL=OfferSummary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfferSummary.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/OfferSummary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,gDAAiC;AACjC,mCASgB;AAChB,2CAA0D;AAE1D,IAAM,gBAAgB,GAAG,IAAA,gBAAM,EAAC,oBAAU,CAAC,8FAAA,2BAE1C,IAAA,CAAA;AACD,IAAM,aAAa,GAAG,IAAA,gBAAM,EAAC,oBAAU,CAAC,sGAAA,4BAEpC,EAAiD,KACpD,KADG,IAAA,8BAAoB,EAAC,aAAa,EAAE,YAAY,CAAC,CACpD,CAAA;AACD,IAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,eAAK,CAAC,mKAAA,4BAE7B,EAA8C,OAC9C,EAAkD,OAClD,EAA+D,MAC/D,EAA6C,wCAGhD,KANG,IAAA,8BAAoB,EAAC,aAAa,EAAE,SAAS,CAAC,EAC9C,IAAA,8BAAoB,EAAC,iBAAiB,EAAE,SAAS,CAAC,EAClD,IAAA,+BAAqB,EAAC,cAAc,EAAE,wBAAwB,CAAC,EAC/D,IAAA,gCAAsB,EAAC,SAAS,EAAE,UAAU,CAAC,CAGhD,CAAA;AAoBM,IAAM,YAAY,GAA0B,UAAC,EAWnD;QAVC,YAAY,kBAAA,EACZ,UAAU,gBAAA,EACV,YAAY,kBAAA,EACZ,kBAAkB,wBAAA,EAClB,0BAA0B,gCAAA,EAC1B,8BAA8B,oCAAA,EAC9B,gBAAgB,sBAAA,EAChB,cAAc,oBAAA,EACd,eAAe,qBAAA,EACf,iBAAiB,uBAAA;IAEjB,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
2
- import React from 'react';
3
- export interface SummaryRowProps {
4
- label: string;
5
- value: string;
6
- labelOverrides?: TextBlockProps;
7
- valueOverrides?: TextBlockProps;
8
- }
9
- export declare const SummaryRow: React.FC<SummaryRowProps>;
@@ -1,38 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __rest = (this && this.__rest) || function (s, e) {
14
- var t = {};
15
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
- t[p] = s[p];
17
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
- t[p[i]] = s[p[i]];
21
- }
22
- return t;
23
- };
24
- var __importDefault = (this && this.__importDefault) || function (mod) {
25
- return (mod && mod.__esModule) ? mod : { "default": mod };
26
- };
27
- Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.SummaryRow = void 0;
29
- var newskit_1 = require("newskit");
30
- var react_1 = __importDefault(require("react"));
31
- var SummaryRow = function (_a) {
32
- var label = _a.label, value = _a.value, labelOverrides = _a.labelOverrides, valueOverrides = _a.valueOverrides, rest = __rest(_a, ["label", "value", "labelOverrides", "valueOverrides"]);
33
- return (react_1.default.createElement(newskit_1.Stack, __assign({ flow: "horizontal-stretch", stackDistribution: "space-between" }, rest),
34
- react_1.default.createElement(newskit_1.TextBlock, __assign({}, labelOverrides), label),
35
- react_1.default.createElement(newskit_1.TextBlock, __assign({}, valueOverrides), value)));
36
- };
37
- exports.SummaryRow = SummaryRow;
38
- //# sourceMappingURL=SummaryRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SummaryRow.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/SummaryRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAA0D;AAC1D,gDAAyB;AAQlB,IAAM,UAAU,GAA8B,UAAC,EAMrD;IALC,IAAA,KAAK,WAAA,EACL,KAAK,WAAA,EACL,cAAc,oBAAA,EACd,cAAc,oBAAA,EACX,IAAI,cAL6C,sDAMrD,CADQ;IAEP,OAAO,CACL,8BAAC,eAAK,aACJ,IAAI,EAAC,oBAAoB,EACzB,iBAAiB,EAAC,eAAe,IAC7B,IAAI;QAER,8BAAC,mBAAS,eAAK,cAAc,GAAG,KAAK,CAAa;QAClD,8BAAC,mBAAS,eAAK,cAAc,GAAG,KAAK,CAAa,CAC5C,CACT,CAAA;AACH,CAAC,CAAA;AAjBY,QAAA,UAAU,cAiBtB"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/index.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/types.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare const replacePlaceholder: (targetString: string, replacementValue?: string) => string;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replacePlaceholder = void 0;
4
- var replacePlaceholder = function (targetString, replacementValue) {
5
- if (replacementValue === void 0) { replacementValue = ''; }
6
- return targetString.replace(/##.+##/gm, replacementValue);
7
- };
8
- exports.replacePlaceholder = replacePlaceholder;
9
- //# sourceMappingURL=stringUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stringUtils.js","sourceRoot":"","sources":["../../../src/helpers/stringUtils.ts"],"names":[],"mappings":";;;AAAO,IAAM,kBAAkB,GAAG,UAChC,YAAoB,EACpB,gBAA6B;IAA7B,iCAAA,EAAA,qBAA6B;IAE7B,OAAO,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAA;AAC3D,CAAC,CAAA;AALY,QAAA,kBAAkB,sBAK9B"}
@@ -1,2 +0,0 @@
1
- import { DocumentNode } from '@apollo/client';
2
- export declare const GET_INCENTIVE_PREVIEW: DocumentNode;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.GET_INCENTIVE_PREVIEW = void 0;
8
- var client_1 = require("@apollo/client");
9
- exports.GET_INCENTIVE_PREVIEW = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n query getPreviewIncentive(\n $subscriptionCode: String!\n $incentiveCode: String!\n ) {\n previewIncentive(\n subscriptionCode: $subscriptionCode\n incentiveCode: $incentiveCode\n ) {\n success\n errorCode\n errorMessage\n currentPropositionName\n incentiveName\n discountPercentage\n discountValue\n term\n billCycleDay\n serviceActivationDate\n invoiceSummary {\n invoiceMonthlySummaryBreakdown {\n fromDate\n toDate\n creditBalance {\n beforeApplyingSubscriptionCharges\n afterApplyingSubscriptionCharges\n }\n subscriptionCharges\n totalAmountToPay\n }\n }\n }\n }\n"], ["\n query getPreviewIncentive(\n $subscriptionCode: String!\n $incentiveCode: String!\n ) {\n previewIncentive(\n subscriptionCode: $subscriptionCode\n incentiveCode: $incentiveCode\n ) {\n success\n errorCode\n errorMessage\n currentPropositionName\n incentiveName\n discountPercentage\n discountValue\n term\n billCycleDay\n serviceActivationDate\n invoiceSummary {\n invoiceMonthlySummaryBreakdown {\n fromDate\n toDate\n creditBalance {\n beforeApplyingSubscriptionCharges\n afterApplyingSubscriptionCharges\n }\n subscriptionCharges\n totalAmountToPay\n }\n }\n }\n }\n"])));
10
- var templateObject_1;
11
- //# sourceMappingURL=getIncentivePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIncentivePreview.js","sourceRoot":"","sources":["../../../src/queries/getIncentivePreview.ts"],"names":[],"mappings":";;;;;;;AAAA,yCAAkD;AAErC,QAAA,qBAAqB,OAAiB,YAAG,qzBAAA,ivBAiCrD,KAAA"}
@@ -1,2 +0,0 @@
1
- import { DocumentNode } from '@apollo/client';
2
- export declare const mutateApplyIncentive: DocumentNode;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.mutateApplyIncentive = void 0;
8
- var client_1 = require("@apollo/client");
9
- exports.mutateApplyIncentive = (0, client_1.gql)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n mutation ApplyIncentive($input: ApplyIncentiveRequest!) {\n applyIncentive(input: $input) {\n success\n errorMessage\n errorCode\n order\n }\n }\n"], ["\n mutation ApplyIncentive($input: ApplyIncentiveRequest!) {\n applyIncentive(input: $input) {\n success\n errorMessage\n errorCode\n order\n }\n }\n"])));
10
- var templateObject_1;
11
- //# sourceMappingURL=mutateApplyIncentive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutateApplyIncentive.js","sourceRoot":"","sources":["../../../src/queries/mutateApplyIncentive.ts"],"names":[],"mappings":";;;;;;;AAAA,yCAAkD;AAErC,QAAA,oBAAoB,OAAiB,YAAG,uPAAA,mLASpD,KAAA"}
@@ -1,30 +0,0 @@
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>;