@newskit-render/my-account 0.89.0 → 0.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.90.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/my-account@0.89.0...@newskit-render/my-account@0.90.0) (2021-09-30)
7
+
8
+
9
+ ### Features
10
+
11
+ * **PPDSR-450:** Basic cancel page structure added ([#457](https://github.com/newscorp-ghfb/ncu-newskit-render/issues/457)) ([8f21f30](https://github.com/newscorp-ghfb/ncu-newskit-render/commit/8f21f30183c53134227f4e1b88847ddea53d380c))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.89.0](https://github.com/newscorp-ghfb/ncu-newskit-render/compare/@newskit-render/my-account@0.88.2...@newskit-render/my-account@0.89.0) (2021-09-29)
7
18
 
8
19
 
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const componentMap: {
3
+ reason: () => JSX.Element;
4
+ };
5
+ declare const CancellationRender: React.FC;
6
+ export default CancellationRender;
@@ -0,0 +1,35 @@
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 __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.componentMap = void 0;
18
+ var react_1 = __importDefault(require("react"));
19
+ var Header_1 = require("../Sections/Header");
20
+ var context_1 = require("../../context");
21
+ exports.componentMap = {
22
+ reason: function () { return react_1.default.createElement("h2", null, "Cancellation"); },
23
+ };
24
+ var CancellationRender = function () {
25
+ var _a;
26
+ var _b = context_1.useAccountContext(), header = _b.header, cancellation = _b.cancellation;
27
+ // TODO add logic to choose cancellation page
28
+ var SectionComponent = exports.componentMap['reason'];
29
+ var pageHeader = cancellation && ((_a = cancellation['reason']) === null || _a === void 0 ? void 0 : _a.header);
30
+ return (react_1.default.createElement(react_1.default.Fragment, null,
31
+ react_1.default.createElement(Header_1.Header, __assign({}, header, pageHeader)),
32
+ react_1.default.createElement(SectionComponent, null)));
33
+ };
34
+ exports.default = CancellationRender;
35
+ //# sourceMappingURL=CancellationRender.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CancellationRender.js","sourceRoot":"","sources":["../../../src/Components/Templates/CancellationRender.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,6CAA2C;AAC3C,yCAAiD;AAEpC,QAAA,YAAY,GAAG;IAC1B,MAAM,EAAE,cAAM,OAAA,yDAAqB,EAArB,CAAqB;CAEpC,CAAA;AAED,IAAM,kBAAkB,GAAa;;IAC7B,IAAA,KAA2B,2BAAiB,EAAE,EAA5C,MAAM,YAAA,EAAE,YAAY,kBAAwB,CAAA;IACpD,6CAA6C;IAC7C,IAAM,gBAAgB,GAAG,oBAAY,CAAC,QAAQ,CAAC,CAAA;IAC/C,IAAM,UAAU,GAAG,YAAY,WAAI,YAAY,CAAC,QAAQ,CAAC,0CAAE,MAAM,CAAA,CAAA;IAEjE,OAAO,CACL;QACE,8BAAC,eAAM,eAAK,MAAM,EAAM,UAAU,EAAI;QACtC,8BAAC,gBAAgB,OAAG,CACnB,CACJ,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,kBAAkB,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import Layout from './LayoutTemplate';
2
2
  import DisplayRenderer from './DisplayRenderer';
3
3
  import EditRenderer, { componentMap } from './EditRenderer';
4
+ import CancellationRender from './CancellationRender';
4
5
  export * from './types';
5
- export { DisplayRenderer, EditRenderer, componentMap };
6
+ export { DisplayRenderer, EditRenderer, componentMap, CancellationRender };
6
7
  export default Layout;
@@ -25,13 +25,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
25
25
  return (mod && mod.__esModule) ? mod : { "default": mod };
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
- exports.componentMap = exports.EditRenderer = exports.DisplayRenderer = void 0;
28
+ exports.CancellationRender = exports.componentMap = exports.EditRenderer = exports.DisplayRenderer = void 0;
29
29
  var LayoutTemplate_1 = __importDefault(require("./LayoutTemplate"));
30
30
  var DisplayRenderer_1 = __importDefault(require("./DisplayRenderer"));
31
31
  exports.DisplayRenderer = DisplayRenderer_1.default;
32
32
  var EditRenderer_1 = __importStar(require("./EditRenderer"));
33
33
  exports.EditRenderer = EditRenderer_1.default;
34
34
  Object.defineProperty(exports, "componentMap", { enumerable: true, get: function () { return EditRenderer_1.componentMap; } });
35
+ var CancellationRender_1 = __importDefault(require("./CancellationRender"));
36
+ exports.CancellationRender = CancellationRender_1.default;
35
37
  __exportStar(require("./types"), exports);
36
38
  exports.default = LayoutTemplate_1.default;
37
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Components/Templates/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAqC;AACrC,sEAA+C;AAItC,0BAJF,yBAAe,CAIE;AAHxB,6DAA2D;AAGjC,uBAHnB,sBAAY,CAGmB;AAAE,6FAHjB,2BAAY,OAGiB;AADpD,0CAAuB;AAEvB,kBAAe,wBAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Components/Templates/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAAqC;AACrC,sEAA+C;AAKtC,0BALF,yBAAe,CAKE;AAJxB,6DAA2D;AAIjC,uBAJnB,sBAAY,CAImB;AAAE,6FAJjB,2BAAY,OAIiB;AAHpD,4EAAqD;AAGC,6BAH/C,4BAAkB,CAG+C;AADxE,0CAAuB;AAEvB,kBAAe,wBAAM,CAAA"}
@@ -45,6 +45,9 @@ interface AddressFormContext {
45
45
  countryInput?: InputText;
46
46
  };
47
47
  }
48
+ interface CancellationContext {
49
+ header?: HeaderProps;
50
+ }
48
51
  interface CommentingNotificationsContext {
49
52
  header?: HeaderProps;
50
53
  props?: CommentingNotificationsProps;
@@ -97,6 +100,10 @@ export interface ContextOptions {
97
100
  address?: AddressFormContext;
98
101
  'commenting-notifications'?: CommentingNotificationsContext;
99
102
  };
103
+ cancellation?: {
104
+ reason?: CancellationContext;
105
+ confirm?: CancellationContext;
106
+ };
100
107
  footer?: FooterContext;
101
108
  footerOverrides?: FooterContextOverrides;
102
109
  errorMessages?: {
@@ -65,6 +65,9 @@ var getProviderProps = function (context) { return __awaiter(void 0, void 0, voi
65
65
  PersonalDetails: personalDetailsProvider_1.personalDetailsProvider,
66
66
  SubscriptionAndBilling: subscriptionAndBillingProvider_1.subscriptionAndBillingProvider,
67
67
  NewslettersAndAlerts: newslettersAndAlertsProvider_1.newslettersAndAlertsProvider,
68
+ Cancellation: function () {
69
+ return { data: {} };
70
+ },
68
71
  };
69
72
  session = helpers_1.sessionParser(context.req.headers.cookie);
70
73
  return [4 /*yield*/, helpers_1.getHeaders(session)];
@@ -1 +1 @@
1
- {"version":3,"file":"getProviderProps.js","sourceRoot":"","sources":["../src/getProviderProps.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qCAMkB;AAElB,+EAA6E;AAC7E,mEAAiE;AACjE,6FAA2F;AAC3F,yFAAuF;AAOhF,IAAM,gBAAgB,GAAG,UAC9B,OAA+B;;;;;;gBAEvB,QAAQ,GAAK,OAAO,SAAZ,CAAY;gBAEtB,mBAAmB,GAAG;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EAAA;;gBANI,iBAAiB,GAAG,SAMxB;gBAEkB,qBAAM,mBAAmB,CAAC,QAAQ,CAAC,CAAC;wBACtD,gBAAgB,kBAAA;wBAChB,iBAAiB,mBAAA;wBACjB,OAAO,SAAA;qBACR,CAAC,EAAA;;gBAJE,aAAa,GAAG,SAIlB;gBAEI,IAAI,GAAG,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,EAC9B,CAAC,uBACM,aAAa,CAAC,IAAI,KACrB,WAAW,EACT,OAAA,aAAa,CAAC,IAAI,CAAC,WAAW,0CAAE,MAAM,CAAC,6BAAmB,MAAK,IAAI,IAEzE,CAAC,CAAC,IAAI,CAAA;gBAER,aAAa,yBACR,aAAa,KAChB,IAAI,MAAA,GACL,CAAA;gBAED,sBAAO;wBACL,KAAK,wBACA,aAAa,KAChB,GAAG,EAAE;gCACH,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,cAAc,IAAI,EAAE;6BACjD,GACF;qBACF,EAAA;;;KACF,CAAA;AA1DY,QAAA,gBAAgB,oBA0D5B"}
package/dist/index.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './pages/SubscriptionAndBilling';
5
5
  export * from './pages/NewslettersAndAlerts';
6
6
  export * from './pages/Error';
7
7
  export * from './api';
8
+ export * from './pages/Cancellation';
8
9
  export { accountTheme } from './theme';
9
10
  export { ContextOptions } from './context';
10
11
  export { componentMap } from './Components/Templates';
package/dist/index.js CHANGED
@@ -18,6 +18,7 @@ __exportStar(require("./pages/SubscriptionAndBilling"), exports);
18
18
  __exportStar(require("./pages/NewslettersAndAlerts"), exports);
19
19
  __exportStar(require("./pages/Error"), exports);
20
20
  __exportStar(require("./api"), exports);
21
+ __exportStar(require("./pages/Cancellation"), exports);
21
22
  var theme_1 = require("./theme");
22
23
  Object.defineProperty(exports, "accountTheme", { enumerable: true, get: function () { return theme_1.accountTheme; } });
23
24
  var Templates_1 = require("./Components/Templates");
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0DAAuC;AACvC,oDAAiC;AACjC,qDAAkC;AAClC,iEAA8C;AAC9C,+DAA4C;AAC5C,gDAA6B;AAC7B,wCAAqB;AACrB,iCAAsC;AAA7B,qGAAA,YAAY,OAAA;AAErB,oDAAqD;AAA5C,yGAAA,YAAY,OAAA;AACrB,2CAAoD;AAA3C,mHAAA,qBAAqB,OAAA;AAC9B,qCAA8D;AAArD,wGAAA,aAAa,OAAA;AAAE,8GAAA,mBAAmB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,0DAAuC;AACvC,oDAAiC;AACjC,qDAAkC;AAClC,iEAA8C;AAC9C,+DAA4C;AAC5C,gDAA6B;AAC7B,wCAAqB;AACrB,uDAAoC;AACpC,iCAAsC;AAA7B,qGAAA,YAAY,OAAA;AAErB,oDAAqD;AAA5C,yGAAA,YAAY,OAAA;AACrB,2CAAoD;AAA3C,mHAAA,qBAAqB,OAAA;AAC9B,qCAA8D;AAArD,wGAAA,aAAa,OAAA;AAAE,8GAAA,mBAAmB,OAAA"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { CancellationProps } from './types';
3
+ import { ContextOptions } from '../context';
4
+ export declare const cancellationContext: ContextOptions;
5
+ export declare const Cancellation: React.FC<CancellationProps>;
@@ -0,0 +1,62 @@
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 __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
16
+ }) : (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ o[k2] = m[k];
19
+ }));
20
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
21
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
22
+ }) : function(o, v) {
23
+ o["default"] = v;
24
+ });
25
+ var __importStar = (this && this.__importStar) || function (mod) {
26
+ if (mod && mod.__esModule) return mod;
27
+ var result = {};
28
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
29
+ __setModuleDefault(result, mod);
30
+ return result;
31
+ };
32
+ var __importDefault = (this && this.__importDefault) || function (mod) {
33
+ return (mod && mod.__esModule) ? mod : { "default": mod };
34
+ };
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.Cancellation = exports.cancellationContext = void 0;
37
+ var react_1 = __importDefault(require("react"));
38
+ var Templates_1 = __importStar(require("../Components/Templates"));
39
+ exports.cancellationContext = {
40
+ head: {
41
+ pageTitle: 'Cancellation',
42
+ },
43
+ header: {
44
+ showDivider: true,
45
+ },
46
+ cancellation: {
47
+ reason: {
48
+ header: {
49
+ title: 'Please tell us why you want to cancel',
50
+ description: 'We value your opinion and this information will help us understand how we can improve our product and the services we provide.',
51
+ },
52
+ },
53
+ },
54
+ };
55
+ var Cancellation = function (_a) {
56
+ var data = _a.data, customTheme = _a.customTheme, context = _a.context, env = _a.env;
57
+ var c = __assign(__assign({}, (context || __assign({}, exports.cancellationContext))), { env: env });
58
+ return (react_1.default.createElement(Templates_1.default, { context: c, customTheme: customTheme },
59
+ react_1.default.createElement(Templates_1.CancellationRender, null)));
60
+ };
61
+ exports.Cancellation = Cancellation;
62
+ //# sourceMappingURL=Cancellation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Cancellation.js","sourceRoot":"","sources":["../../src/pages/Cancellation.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAyB;AACzB,mEAAoE;AAIvD,QAAA,mBAAmB,GAAmB;IACjD,IAAI,EAAE;QACJ,SAAS,EAAE,cAAc;KAC1B;IACD,MAAM,EAAE;QACN,WAAW,EAAE,IAAI;KAClB;IACD,YAAY,EAAE;QACZ,MAAM,EAAE;YACN,MAAM,EAAE;gBACN,KAAK,EAAE,uCAAuC;gBAC9C,WAAW,EACT,gIAAgI;aACnI;SACF;KACF;CACF,CAAA;AAEM,IAAM,YAAY,GAAgC,UAAC,EAKzD;QAJC,IAAI,UAAA,EACJ,WAAW,iBAAA,EACX,OAAO,aAAA,EACP,GAAG,SAAA;IAEH,IAAM,CAAC,yBACF,CAAC,OAAO,iBAAS,2BAAmB,CAAE,CAAC,KAC1C,GAAG,KAAA,GACJ,CAAA;IAED,OAAO,CACL,8BAAC,mBAAM,IAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,WAAW;QAC1C,8BAAC,8BAAkB,OAAG,CACf,CACV,CAAA;AACH,CAAC,CAAA;AAhBY,QAAA,YAAY,gBAgBxB"}
@@ -97,3 +97,6 @@ export interface EditFieldProps extends BasePageProps {
97
97
  data: DataProps;
98
98
  validation?: Record<string, any>;
99
99
  }
100
+ export interface CancellationProps extends BasePageProps {
101
+ data: DataProps;
102
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newskit-render/my-account",
3
- "version": "0.89.0",
3
+ "version": "0.90.0",
4
4
  "description": "Newskit Render",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",