@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,159 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
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
- };
52
- import React, { useEffect, useMemo, useState } from 'react';
53
- import { Header } from '@newskit-render/shared-components';
54
- import { Block, Button, getColorCssFromTheme, GridLayout, GridLayoutItem, Stack, styled, TextBlock, } from 'newskit';
55
- import { applyIncentive, getDefaultItemValue, getOfferPreviewData, getValueDescription, populateSubscriptionSummaryData, } from '../../../helpers';
56
- import { OfferSummary } from './OfferSummary';
57
- import { TimesLoading } from '../../../Components/Elements/TimesLoading';
58
- import sendToast from '../../../Components/Elements/Toast/sendToast';
59
- var StyledStack = styled(Stack)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: 1px solid;\n height: auto;\n ", ";\n"], ["\n border: 1px solid;\n height: auto;\n ", ";\n"])), getColorCssFromTheme('borderColor', 'neutral030'));
60
- var StyledLoading = styled(Stack)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid;\n height: auto;\n ", ";\n"], ["\n border: 1px solid;\n height: auto;\n ", ";\n"])), getColorCssFromTheme('borderColor', 'neutral040'));
61
- export var OfferPreview = function (_a) {
62
- var _b;
63
- 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;
64
- var _c = useState(true), loading = _c[0], setLoading = _c[1];
65
- var _d = useState(selectedOffer || ''), offerCode = _d[0], setOfferCode = _d[1];
66
- var enrichedSubscriptionSummary = useMemo(function () {
67
- if (incentiveData && user) {
68
- var components2 = populateSubscriptionSummaryData(incentiveData, subscriptionSummary, user);
69
- return components2;
70
- }
71
- return null;
72
- }, [subscriptionSummary, incentiveData, user]);
73
- var handleError = function (message) {
74
- sendToast('', 'error', undefined, undefined, message);
75
- };
76
- useEffect(function () {
77
- var fetchOfferPreviewData = function () { return __awaiter(void 0, void 0, void 0, function () {
78
- var incentiveCode, response, error_1;
79
- var _a, _b;
80
- return __generator(this, function (_c) {
81
- switch (_c.label) {
82
- case 0:
83
- _c.trys.push([0, 2, 3, 4]);
84
- incentiveCode = offerCode || sessionStorage.getItem('selectedOfferId') || '';
85
- setOfferCode(incentiveCode);
86
- if (!incentiveCode)
87
- throw new Error('No selected offer ID found');
88
- return [4 /*yield*/, getOfferPreviewData({
89
- subscriptionCode: (_b = (_a = user.subscriptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id,
90
- incentiveCode: incentiveCode,
91
- })];
92
- case 1:
93
- response = _c.sent();
94
- setIncentiveData(response.previewIncentive);
95
- return [3 /*break*/, 4];
96
- case 2:
97
- error_1 = _c.sent();
98
- handleError('There was an error loading the data. Please try again later.');
99
- return [3 /*break*/, 4];
100
- case 3:
101
- setLoading(false);
102
- return [7 /*endfinally*/];
103
- case 4: return [2 /*return*/];
104
- }
105
- });
106
- }); };
107
- fetchOfferPreviewData();
108
- }, []);
109
- var paymentExpDate = getValueDescription(user, 'payment', 'expiry date');
110
- var handleContinue = function (event) { return __awaiter(void 0, void 0, void 0, function () {
111
- var error_2;
112
- var _a, _b;
113
- return __generator(this, function (_c) {
114
- switch (_c.label) {
115
- case 0:
116
- _c.trys.push([0, 2, 3, 4]);
117
- setLoading(true);
118
- return [4 /*yield*/, applyIncentive(offerCode, ((_b = (_a = user.subscriptions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || '')];
119
- case 1:
120
- _c.sent();
121
- onNextStep(event, continueButton.nextStep);
122
- return [3 /*break*/, 4];
123
- case 2:
124
- error_2 = _c.sent();
125
- handleError('There was an error applying the offer. Please try again later.');
126
- return [3 /*break*/, 4];
127
- case 3:
128
- setLoading(false);
129
- return [7 /*endfinally*/];
130
- case 4: return [2 /*return*/];
131
- }
132
- });
133
- }); };
134
- return (React.createElement(Block, null,
135
- header && React.createElement(Header, __assign({}, header)),
136
- React.createElement(GridLayout, { rowGap: "space070", columns: "12fr", "data-testid": "offer-preview" },
137
- React.createElement(GridLayoutItem, null, enrichedSubscriptionSummary ? (React.createElement(React.Fragment, null,
138
- React.createElement(TextBlock, { "data-testid": "offer-summary-title", paddingBlockEnd: "space030", typographyPreset: "utilitySubheading020" }, enrichedSubscriptionSummary.sectionTitle),
139
- React.createElement(OfferSummary, __assign({}, enrichedSubscriptionSummary)))) : (React.createElement(StyledLoading, { flow: "horizontal-center", stackDistribution: "center", "data-testid": "loading-offer", paddingBlock: "space080" },
140
- React.createElement(TimesLoading, { height: "auto", loadingText: "Loading payment information" })))),
141
- React.createElement(GridLayoutItem, null,
142
- React.createElement(TextBlock, { "data-testid": "payment-summary-title", paddingBlockEnd: "space030", typographyPreset: "utilitySubheading020" }, paymentSummary.sectionTitle),
143
- React.createElement(StyledStack, { paddingBlock: "space040", paddingInline: "space040", flow: "horizontal-center", stackDistribution: "space-between" },
144
- getDefaultItemValue(user, 'payment', ''),
145
- React.createElement(TextBlock, { stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, paymentExpDate))),
146
- React.createElement(GridLayoutItem, null,
147
- React.createElement(TextBlock, { "data-testid": "note-title", typographyPreset: "utilitySubheading020", paddingBlockEnd: "space030" }, note.title),
148
- React.createElement(TextBlock, { typographyPreset: "utilityBody010", stylePreset: "inkSubtle" }, note.description)),
149
- React.createElement(Stack, { flow: { md: 'horizontal-center', xs: 'vertical-center' }, stackDistribution: "flex-end", flowReverse: { xs: true, md: false } },
150
- continueButton.label,
151
- React.createElement(Button, { disabled: loading, onClick: handleContinue, eventContext: continueButton === null || continueButton === void 0 ? void 0 : continueButton.eventContext, overrides: __assign({ width: {
152
- xs: '100%',
153
- md: 'auto',
154
- }, marginInlineStart: {
155
- md: 'space050',
156
- }, 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)))));
157
- };
158
- var templateObject_1, templateObject_2;
159
- //# sourceMappingURL=OfferPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfferPreview.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/OfferPreview.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAM,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC/D,OAAO,EAAE,MAAM,EAAe,MAAM,mCAAmC,CAAA;AACvE,OAAO,EACL,KAAK,EACL,MAAM,EACN,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,KAAK,EACL,MAAM,EACN,SAAS,GACV,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,+BAA+B,GAEhC,MAAM,kBAAkB,CAAA;AAGzB,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAA;AA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E,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,oBAAC,MAAM,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"}
@@ -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,88 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- var __assign = (this && this.__assign) || function () {
6
- __assign = Object.assign || function(t) {
7
- for (var s, i = 1, n = arguments.length; i < n; i++) {
8
- s = arguments[i];
9
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
- t[p] = s[p];
11
- }
12
- return t;
13
- };
14
- return __assign.apply(this, arguments);
15
- };
16
- import React from 'react';
17
- import { Divider, GridLayout, styled, TextBlock, getColorCssFromTheme, Block, getBorderCssFromTheme, getSpacingCssFromTheme, } from 'newskit';
18
- import { SummaryRow } from './SummaryRow';
19
- var StyledGridLayout = styled(GridLayout)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
20
- var StyledSection = styled(GridLayout)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border: 1px solid;\n ", ";\n"], ["\n border: 1px solid;\n ", ";\n"])), getColorCssFromTheme('borderColor', 'neutral030'));
21
- var StylesBlock = styled(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"])), getColorCssFromTheme('borderColor', 'teal040'), getColorCssFromTheme('backgroundColor', 'teal010'), getBorderCssFromTheme('borderRadius', 'borderRadiusRounded010'), getSpacingCssFromTheme('padding', 'space020'));
22
- export var OfferSummary = function (_a) {
23
- 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;
24
- return (React.createElement(React.Fragment, null,
25
- React.createElement(StyledSection, { rowGap: "space040", columns: '12fr', overrides: {
26
- paddingBlock: 'space040',
27
- paddingInline: 'space040',
28
- } },
29
- React.createElement(TextBlock, { "data-testid": "offer-title", typographyPreset: "editorialHeadline010" }, offerTitle),
30
- React.createElement(Divider, { overrides: {
31
- marginBlock: 'space010',
32
- } }),
33
- React.createElement(StyledGridLayout, { rowGap: "space030" },
34
- React.createElement(TextBlock, { "data-testid": "discount-name", typographyPreset: "utilitySubheading020" }, discountName),
35
- React.createElement(TextBlock, { "data-testid": "discount-start-date", stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, discountStartDate),
36
- React.createElement(StylesBlock, null,
37
- React.createElement(TextBlock, { typographyPreset: "utilityLabel010" },
38
- discountPercentage,
39
- "% off"))),
40
- React.createElement(GridLayout, { rowGap: "space030", overrides: {
41
- marginBlockStart: 'space020',
42
- } },
43
- React.createElement(TextBlock, { "data-testid": "full-price-subscription-price", typographyPreset: "utilitySubheading020" }, fullPriceSubscriptionPrice),
44
- React.createElement(TextBlock, { "data-testid": "full-price-subscription-start-date", stylePreset: "inkSubtle", typographyPreset: "utilityBody010" }, fullPriceSubscriptionStartDate)),
45
- paymentBreakdown && (React.createElement(React.Fragment, null,
46
- React.createElement(Divider, { overrides: {
47
- marginBlock: 'space010',
48
- } }),
49
- React.createElement(TextBlock, { typographyPreset: "utilitySubheading020" }, paymentBreakdown.title),
50
- paymentBreakdown.offerSubscriptionRow && (React.createElement(SummaryRow, __assign({}, paymentBreakdown.offerSubscriptionRow, { "data-testid": "offer-subscription-row", labelOverrides: {
51
- stylePreset: 'inkSubtle',
52
- typographyPreset: 'utilityBody010',
53
- }, valueOverrides: {
54
- stylePreset: 'inkSubtle',
55
- typographyPreset: 'utilityBody010',
56
- } }))),
57
- React.createElement(SummaryRow, __assign({}, paymentBreakdown.accountCreditRow, { "data-testid": "account-credit-row", labelOverrides: {
58
- stylePreset: 'inkSubtle',
59
- typographyPreset: 'utilityBody010',
60
- }, valueOverrides: {
61
- stylePreset: 'inkSubtle',
62
- typographyPreset: 'utilityBody010',
63
- } })),
64
- paymentBreakdown.discountedSubscriptionRow && (React.createElement(SummaryRow, __assign({}, paymentBreakdown.discountedSubscriptionRow, { "data-testid": "discounted-subscription-row", labelOverrides: {
65
- stylePreset: 'inkSubtle',
66
- typographyPreset: 'utilityBody010',
67
- }, valueOverrides: {
68
- stylePreset: 'inkSubtle',
69
- typographyPreset: 'utilityBody010',
70
- } }))))),
71
- React.createElement(Divider, { overrides: {
72
- marginBlock: 'space010',
73
- } }),
74
- React.createElement(SummaryRow, __assign({}, nextPaymentRow, { "data-testid": "next-payment-row", labelOverrides: {
75
- typographyPreset: 'utilitySubheading030',
76
- }, valueOverrides: {
77
- typographyPreset: 'utilitySubheading030',
78
- } })),
79
- remainingCredit && (React.createElement(SummaryRow, __assign({}, remainingCredit, { "data-testid": "remaining-credit-row", labelOverrides: {
80
- stylePreset: 'inkSubtle',
81
- typographyPreset: 'utilityBody010',
82
- }, valueOverrides: {
83
- stylePreset: 'inkSubtle',
84
- typographyPreset: 'utilityBody010',
85
- } }))))));
86
- };
87
- var templateObject_1, templateObject_2, templateObject_3;
88
- //# sourceMappingURL=OfferSummary.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"OfferSummary.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/OfferSummary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAa,MAAM,OAAO,CAAA;AACjC,OAAO,EACL,OAAO,EACP,UAAU,EACV,MAAM,EACN,SAAS,EACT,oBAAoB,EACpB,KAAK,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,UAAU,EAAmB,MAAM,cAAc,CAAA;AAE1D,IAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,8FAAA,2BAE1C,IAAA,CAAA;AACD,IAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,sGAAA,4BAEpC,EAAiD,KACpD,KADG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,EAAE,gBAAgB;qBACnC,IACD,CACH,CACA,CACJ;YAED,oBAAC,OAAO,IACN,SAAS,EAAE;oBACT,WAAW,EAAE,UAAU;iBACxB,GACD;YACF,oBAAC,UAAU,eACL,cAAc,mBACN,kBAAkB,EAC9B,cAAc,EAAE;oBACd,gBAAgB,EAAE,sBAAsB;iBACzC,EACD,cAAc,EAAE;oBACd,gBAAgB,EAAE,sBAAsB;iBACzC,IACD;YACD,eAAe,IAAI,CAClB,oBAAC,UAAU,eACL,eAAe,mBACP,sBAAsB,EAClC,cAAc,EAAE;oBACd,WAAW,EAAE,WAAW;oBACxB,gBAAgB,EAAE,gBAAgB;iBACnC,EACD,cAAc,EAAE;oBACd,WAAW,EAAE,WAAW;oBACxB,gBAAgB,EAAE,gBAAgB;iBACnC,IACD,CACH,CACa,CACf,CACJ,CAAA;AACH,CAAC,CAAA"}
@@ -1,9 +0,0 @@
1
- import { TextBlockProps } from 'newskit';
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,31 +0,0 @@
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 __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { TextBlock, Stack } from 'newskit';
24
- import React from 'react';
25
- export var SummaryRow = function (_a) {
26
- var label = _a.label, value = _a.value, labelOverrides = _a.labelOverrides, valueOverrides = _a.valueOverrides, rest = __rest(_a, ["label", "value", "labelOverrides", "valueOverrides"]);
27
- return (React.createElement(Stack, __assign({ flow: "horizontal-stretch", stackDistribution: "space-between" }, rest),
28
- React.createElement(TextBlock, __assign({}, labelOverrides), label),
29
- React.createElement(TextBlock, __assign({}, valueOverrides), value)));
30
- };
31
- //# sourceMappingURL=SummaryRow.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SummaryRow.js","sourceRoot":"","sources":["../../../../../src/Components/Sections/OfferPreview/SummaryRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAkB,MAAM,SAAS,CAAA;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,MAAM,CAAC,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,oBAAC,KAAK,aACJ,IAAI,EAAC,oBAAoB,EACzB,iBAAiB,EAAC,eAAe,IAC7B,IAAI;QAER,oBAAC,SAAS,eAAK,cAAc,GAAG,KAAK,CAAa;QAClD,oBAAC,SAAS,eAAK,cAAc,GAAG,KAAK,CAAa,CAC5C,CACT,CAAA;AACH,CAAC,CAAA"}
@@ -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,5 +0,0 @@
1
- export var replacePlaceholder = function (targetString, replacementValue) {
2
- if (replacementValue === void 0) { replacementValue = ''; }
3
- return targetString.replace(/##.+##/gm, replacementValue);
4
- };
5
- //# sourceMappingURL=stringUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stringUtils.js","sourceRoot":"","sources":["../../../src/helpers/stringUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,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"}
@@ -1,2 +0,0 @@
1
- import { DocumentNode } from '@apollo/client';
2
- export declare const GET_INCENTIVE_PREVIEW: DocumentNode;
@@ -1,8 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { gql } from '@apollo/client';
6
- export var GET_INCENTIVE_PREVIEW = 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"])));
7
- var templateObject_1;
8
- //# sourceMappingURL=getIncentivePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIncentivePreview.js","sourceRoot":"","sources":["../../../src/queries/getIncentivePreview.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAgB,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,CAAC,IAAM,qBAAqB,GAAiB,GAAG,ozBAAA,ivBAiCrD,IAAA,CAAA"}
@@ -1,2 +0,0 @@
1
- import { DocumentNode } from '@apollo/client';
2
- export declare const mutateApplyIncentive: DocumentNode;
@@ -1,8 +0,0 @@
1
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
- return cooked;
4
- };
5
- import { gql } from '@apollo/client';
6
- export var mutateApplyIncentive = 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"])));
7
- var templateObject_1;
8
- //# sourceMappingURL=mutateApplyIncentive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mutateApplyIncentive.js","sourceRoot":"","sources":["../../../src/queries/mutateApplyIncentive.ts"],"names":[],"mappings":";;;;AAAA,OAAO,EAAgB,GAAG,EAAE,MAAM,gBAAgB,CAAA;AAElD,MAAM,CAAC,IAAM,oBAAoB,GAAiB,GAAG,sPAAA,mLASpD,IAAA,CAAA"}