@newskit-render/checkout 0.0.0-cc29eac2
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/README.md +11 -0
- package/dist/cjs/Components/Icons/Paypal/index.d.ts +1 -0
- package/dist/cjs/Components/Icons/Paypal/index.js +25 -0
- package/dist/cjs/Components/Icons/Paypal/index.js.map +1 -0
- package/dist/cjs/Components/Templates/AccountCreationRender.d.ts +4 -0
- package/dist/cjs/Components/Templates/AccountCreationRender.js +110 -0
- package/dist/cjs/Components/Templates/AccountCreationRender.js.map +1 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/DateOfBirth.d.ts +3 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/DateOfBirth.js +43 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/DateOfBirth.js.map +1 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.d.ts +9 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.js +29 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.js.map +1 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/Title.d.ts +9 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/Title.js +31 -0
- package/dist/cjs/Components/Templates/AccountCreationTemplates/Title.js.map +1 -0
- package/dist/cjs/Components/Templates/LayoutTemplate.d.ts +4 -0
- package/dist/cjs/Components/Templates/LayoutTemplate.js +69 -0
- package/dist/cjs/Components/Templates/LayoutTemplate.js.map +1 -0
- package/dist/cjs/Components/Templates/PaymentDetailsRender.d.ts +2 -0
- package/dist/cjs/Components/Templates/PaymentDetailsRender.js +62 -0
- package/dist/cjs/Components/Templates/PaymentDetailsRender.js.map +1 -0
- package/dist/cjs/Components/Templates/__tests__/mocks/index.d.ts +2 -0
- package/dist/cjs/Components/Templates/__tests__/mocks/index.js +61 -0
- package/dist/cjs/Components/Templates/__tests__/mocks/index.js.map +1 -0
- package/dist/cjs/Components/Templates/index.d.ts +1 -0
- package/dist/cjs/Components/Templates/index.js +18 -0
- package/dist/cjs/Components/Templates/index.js.map +1 -0
- package/dist/cjs/Components/Templates/types.d.ts +11 -0
- package/dist/cjs/Components/Templates/types.js +3 -0
- package/dist/cjs/Components/Templates/types.js.map +1 -0
- package/dist/cjs/__tests__/index.tests.d.ts +1 -0
- package/dist/cjs/__tests__/index.tests.js +56 -0
- package/dist/cjs/__tests__/index.tests.js.map +1 -0
- package/dist/cjs/constants/index.d.ts +66 -0
- package/dist/cjs/constants/index.js +67 -0
- package/dist/cjs/constants/index.js.map +1 -0
- package/dist/cjs/context/baseContext.d.ts +2 -0
- package/dist/cjs/context/baseContext.js +289 -0
- package/dist/cjs/context/baseContext.js.map +1 -0
- package/dist/cjs/context/index.d.ts +8 -0
- package/dist/cjs/context/index.js +46 -0
- package/dist/cjs/context/index.js.map +1 -0
- package/dist/cjs/context/types.d.ts +83 -0
- package/dist/cjs/context/types.js +3 -0
- package/dist/cjs/context/types.js.map +1 -0
- package/dist/cjs/getProviderProps.d.ts +9 -0
- package/dist/cjs/getProviderProps.js +81 -0
- package/dist/cjs/getProviderProps.js.map +1 -0
- package/dist/cjs/helpers/setupTests.d.ts +1 -0
- package/dist/cjs/helpers/setupTests.js +4 -0
- package/dist/cjs/helpers/setupTests.js.map +1 -0
- package/dist/cjs/helpers/testHelpers.d.ts +10 -0
- package/dist/cjs/helpers/testHelpers.js +56 -0
- package/dist/cjs/helpers/testHelpers.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.js +20 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/pages/AccountCreation.d.ts +5 -0
- package/dist/cjs/pages/AccountCreation.js +37 -0
- package/dist/cjs/pages/AccountCreation.js.map +1 -0
- package/dist/cjs/pages/PaymentDetails.d.ts +5 -0
- package/dist/cjs/pages/PaymentDetails.js +187 -0
- package/dist/cjs/pages/PaymentDetails.js.map +1 -0
- package/dist/cjs/pages/types.d.ts +12 -0
- package/dist/cjs/pages/types.js +3 -0
- package/dist/cjs/pages/types.js.map +1 -0
- package/dist/cjs/types.d.ts +4 -0
- package/dist/cjs/types.js +3 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/Components/Icons/Paypal/index.d.ts +1 -0
- package/dist/esm/Components/Icons/Paypal/index.js +19 -0
- package/dist/esm/Components/Icons/Paypal/index.js.map +1 -0
- package/dist/esm/Components/Templates/AccountCreationRender.d.ts +4 -0
- package/dist/esm/Components/Templates/AccountCreationRender.js +80 -0
- package/dist/esm/Components/Templates/AccountCreationRender.js.map +1 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/DateOfBirth.d.ts +3 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/DateOfBirth.js +38 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/DateOfBirth.js.map +1 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.d.ts +9 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.js +24 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/RenderAgreementCheckboxes.js.map +1 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/Title.d.ts +9 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/Title.js +26 -0
- package/dist/esm/Components/Templates/AccountCreationTemplates/Title.js.map +1 -0
- package/dist/esm/Components/Templates/LayoutTemplate.d.ts +4 -0
- package/dist/esm/Components/Templates/LayoutTemplate.js +63 -0
- package/dist/esm/Components/Templates/LayoutTemplate.js.map +1 -0
- package/dist/esm/Components/Templates/PaymentDetailsRender.d.ts +2 -0
- package/dist/esm/Components/Templates/PaymentDetailsRender.js +55 -0
- package/dist/esm/Components/Templates/PaymentDetailsRender.js.map +1 -0
- package/dist/esm/Components/Templates/__tests__/mocks/index.d.ts +2 -0
- package/dist/esm/Components/Templates/__tests__/mocks/index.js +58 -0
- package/dist/esm/Components/Templates/__tests__/mocks/index.js.map +1 -0
- package/dist/esm/Components/Templates/index.d.ts +1 -0
- package/dist/esm/Components/Templates/index.js +2 -0
- package/dist/esm/Components/Templates/index.js.map +1 -0
- package/dist/esm/Components/Templates/types.d.ts +11 -0
- package/dist/esm/Components/Templates/types.js +2 -0
- package/dist/esm/Components/Templates/types.js.map +1 -0
- package/dist/esm/__tests__/index.tests.d.ts +1 -0
- package/dist/esm/__tests__/index.tests.js +54 -0
- package/dist/esm/__tests__/index.tests.js.map +1 -0
- package/dist/esm/constants/index.d.ts +66 -0
- package/dist/esm/constants/index.js +64 -0
- package/dist/esm/constants/index.js.map +1 -0
- package/dist/esm/context/baseContext.d.ts +2 -0
- package/dist/esm/context/baseContext.js +283 -0
- package/dist/esm/context/baseContext.js.map +1 -0
- package/dist/esm/context/index.d.ts +8 -0
- package/dist/esm/context/index.js +15 -0
- package/dist/esm/context/index.js.map +1 -0
- package/dist/esm/context/types.d.ts +83 -0
- package/dist/esm/context/types.js +2 -0
- package/dist/esm/context/types.js.map +1 -0
- package/dist/esm/getProviderProps.d.ts +9 -0
- package/dist/esm/getProviderProps.js +77 -0
- package/dist/esm/getProviderProps.js.map +1 -0
- package/dist/esm/helpers/setupTests.d.ts +1 -0
- package/dist/esm/helpers/setupTests.js +2 -0
- package/dist/esm/helpers/setupTests.js.map +1 -0
- package/dist/esm/helpers/testHelpers.d.ts +10 -0
- package/dist/esm/helpers/testHelpers.js +48 -0
- package/dist/esm/helpers/testHelpers.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/pages/AccountCreation.d.ts +5 -0
- package/dist/esm/pages/AccountCreation.js +30 -0
- package/dist/esm/pages/AccountCreation.js.map +1 -0
- package/dist/esm/pages/PaymentDetails.d.ts +5 -0
- package/dist/esm/pages/PaymentDetails.js +160 -0
- package/dist/esm/pages/PaymentDetails.js.map +1 -0
- package/dist/esm/pages/types.d.ts +12 -0
- package/dist/esm/pages/types.js +2 -0
- package/dist/esm/pages/types.js.map +1 -0
- package/dist/esm/types.d.ts +4 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/package.json +90 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
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;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var getProviderProps_1 = require("../getProviderProps");
|
|
40
|
+
describe('getProviderProps', function () {
|
|
41
|
+
it('should call getPriverPROPS', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
42
|
+
var result;
|
|
43
|
+
return __generator(this, function (_a) {
|
|
44
|
+
switch (_a.label) {
|
|
45
|
+
case 0:
|
|
46
|
+
expect.assertions(1);
|
|
47
|
+
return [4 /*yield*/, (0, getProviderProps_1.getProviderProps)({})];
|
|
48
|
+
case 1:
|
|
49
|
+
result = _a.sent();
|
|
50
|
+
expect(result).toEqual({ props: { field: 'field' } });
|
|
51
|
+
return [2 /*return*/];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}); });
|
|
55
|
+
});
|
|
56
|
+
//# sourceMappingURL=index.tests.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.tests.js","sourceRoot":"","sources":["../../../src/__tests__/index.tests.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAsD;AAGtD,QAAQ,CAAC,kBAAkB,EAAE;IAC3B,EAAE,CAAC,4BAA4B,EAAE;;;;;oBAC/B,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;oBACL,qBAAM,IAAA,mCAAgB,EAAC,EAA4B,CAAC,EAAA;;oBAA7D,MAAM,GAAG,SAAoD;oBACnE,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,CAAA;;;;SACtD,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const BASE_URL = "/checkout";
|
|
2
|
+
export declare const USER_TITLES: string[];
|
|
3
|
+
export declare const defaultAccountCreationPage: {
|
|
4
|
+
accountCreationPage: {
|
|
5
|
+
modalOverrides: {
|
|
6
|
+
closePosition: string;
|
|
7
|
+
open: boolean;
|
|
8
|
+
overrides: {
|
|
9
|
+
content: {
|
|
10
|
+
paddingInline: string;
|
|
11
|
+
paddingBlock: string;
|
|
12
|
+
};
|
|
13
|
+
panel: {
|
|
14
|
+
width: {
|
|
15
|
+
xs: string;
|
|
16
|
+
sm: string;
|
|
17
|
+
};
|
|
18
|
+
maxHeight: string;
|
|
19
|
+
height: {
|
|
20
|
+
xs: string;
|
|
21
|
+
sm: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
introduction: {
|
|
26
|
+
title: string;
|
|
27
|
+
titleOverrides: {
|
|
28
|
+
typographyPreset: {
|
|
29
|
+
xs: string;
|
|
30
|
+
md: string;
|
|
31
|
+
};
|
|
32
|
+
marginBlockEnd: {
|
|
33
|
+
xs: string;
|
|
34
|
+
md: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
description: string;
|
|
38
|
+
descriptionOverrides: {
|
|
39
|
+
typographyPreset: string;
|
|
40
|
+
removeLastMarginBlockEnd: boolean;
|
|
41
|
+
marginBlockEnd: {
|
|
42
|
+
xs: string;
|
|
43
|
+
md: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
buttonGroupProps: {
|
|
49
|
+
primaryButton: {
|
|
50
|
+
text: string;
|
|
51
|
+
size: string;
|
|
52
|
+
overrides: {
|
|
53
|
+
stylePreset: string;
|
|
54
|
+
minWidth: {
|
|
55
|
+
xs: string;
|
|
56
|
+
sm: string;
|
|
57
|
+
};
|
|
58
|
+
typographyPreset: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
userData: {
|
|
63
|
+
titleOptions: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.defaultAccountCreationPage = exports.USER_TITLES = exports.BASE_URL = void 0;
|
|
4
|
+
exports.BASE_URL = '/checkout';
|
|
5
|
+
exports.USER_TITLES = ['Mr.', 'Mrs.', 'Ms.', 'Miss', 'Other'];
|
|
6
|
+
exports.defaultAccountCreationPage = {
|
|
7
|
+
accountCreationPage: {
|
|
8
|
+
modalOverrides: {
|
|
9
|
+
closePosition: 'right',
|
|
10
|
+
open: false,
|
|
11
|
+
overrides: {
|
|
12
|
+
content: {
|
|
13
|
+
paddingInline: 'spaceInset050',
|
|
14
|
+
paddingBlock: 'spaceInset050',
|
|
15
|
+
},
|
|
16
|
+
panel: {
|
|
17
|
+
width: {
|
|
18
|
+
xs: '288px',
|
|
19
|
+
sm: '440px',
|
|
20
|
+
},
|
|
21
|
+
maxHeight: '95%',
|
|
22
|
+
height: {
|
|
23
|
+
xs: '436px',
|
|
24
|
+
sm: '360px',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
introduction: {
|
|
29
|
+
title: 'Terms and conditions',
|
|
30
|
+
titleOverrides: {
|
|
31
|
+
typographyPreset: {
|
|
32
|
+
xs: 'utilityHeading040',
|
|
33
|
+
md: 'utilityHeading050',
|
|
34
|
+
},
|
|
35
|
+
marginBlockEnd: {
|
|
36
|
+
xs: 'space040',
|
|
37
|
+
md: 'space050',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
description: "Welcome to our subscriber terms. \n Please read these terms carefully as they will set \n out the terms for your subscription with us. \n Where there are differences between our subscriptions for \n The Times or The Sunday Times in the UK and Ireland \n (for example, the price of your subscription or what it includes), \n we have set out these details below. Unless otherwise stated, \n any reference to a subscriber or a subscription shall include reference to all our subscribers.",
|
|
41
|
+
descriptionOverrides: {
|
|
42
|
+
typographyPreset: 'utilityBody020',
|
|
43
|
+
removeLastMarginBlockEnd: true,
|
|
44
|
+
marginBlockEnd: {
|
|
45
|
+
xs: 'space040',
|
|
46
|
+
md: 'space050',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
buttonGroupProps: {
|
|
52
|
+
primaryButton: {
|
|
53
|
+
text: 'Continue',
|
|
54
|
+
size: 'medium',
|
|
55
|
+
overrides: {
|
|
56
|
+
stylePreset: 'buttonSolidPrimary',
|
|
57
|
+
minWidth: { xs: '100%', sm: 'sizing110' },
|
|
58
|
+
typographyPreset: 'utilityButton020',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
userData: {
|
|
63
|
+
titleOptions: exports.USER_TITLES,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,Q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,EAAE,mBAAW;SAC1B;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.baseContext = void 0;
|
|
7
|
+
var constants_1 = require("../constants");
|
|
8
|
+
var newskit_1 = require("newskit");
|
|
9
|
+
var standalone_components_1 = require("@newskit-render/standalone-components");
|
|
10
|
+
var react_1 = __importDefault(require("react"));
|
|
11
|
+
var Chat_1 = require("@emotion-icons/material/Chat");
|
|
12
|
+
var IconFilledChat = (0, newskit_1.toNewsKitIcon)(Chat_1.Chat);
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
exports.baseContext = {
|
|
15
|
+
baseUrl: constants_1.BASE_URL,
|
|
16
|
+
header: {
|
|
17
|
+
overlineOverrides: {
|
|
18
|
+
typographyPreset: {
|
|
19
|
+
xs: 'utitityLabel020',
|
|
20
|
+
sm: 'utitityLabel030',
|
|
21
|
+
},
|
|
22
|
+
stylePreset: 'inkBrand010',
|
|
23
|
+
marginBlockEnd: 'space040',
|
|
24
|
+
},
|
|
25
|
+
title: '',
|
|
26
|
+
titleOverrides: {
|
|
27
|
+
typographyPreset: { xs: 'utilityHeading040', sm: 'utilityHeading050' },
|
|
28
|
+
stylePreset: 'inkContrast',
|
|
29
|
+
marginBlockEnd: {
|
|
30
|
+
xs: 'space040',
|
|
31
|
+
sm: 'space050',
|
|
32
|
+
},
|
|
33
|
+
as: 'h1',
|
|
34
|
+
},
|
|
35
|
+
description: '',
|
|
36
|
+
descriptionOverrides: {
|
|
37
|
+
typographyPreset: { xs: 'utilityBody020', sm: 'utilityBody030' },
|
|
38
|
+
stylePreset: 'inkBase',
|
|
39
|
+
marginBlockEnd: {
|
|
40
|
+
xs: 'space050',
|
|
41
|
+
sm: 'space060',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
marginBlockEnd: { xs: 'space050', sm: 'space060', md: 'space080' },
|
|
45
|
+
showDivider: false,
|
|
46
|
+
},
|
|
47
|
+
navigationPrimary: {
|
|
48
|
+
logoSrc: '/assets/primary-navigation-logo-white.svg',
|
|
49
|
+
},
|
|
50
|
+
paymentDetailsPage: {
|
|
51
|
+
subscriptionDetails: {
|
|
52
|
+
bannerOverrides: {
|
|
53
|
+
stylePreset: { xs: 'subscribtionDetails' },
|
|
54
|
+
paddingInline: { xs: 'spaceInset000' },
|
|
55
|
+
paddingBlock: { xs: 'spaceInset000' },
|
|
56
|
+
maxWidth: '100%',
|
|
57
|
+
minHeight: 'sizing000',
|
|
58
|
+
content: {
|
|
59
|
+
title: {
|
|
60
|
+
stylePreset: 'inkBase',
|
|
61
|
+
},
|
|
62
|
+
message: {
|
|
63
|
+
typographyPreset: 'utilityMeta010',
|
|
64
|
+
stylePreset: 'inkSubtle',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
containerOverrides: {
|
|
69
|
+
stylePreset: { xs: 'headerSubscriptionContainer' },
|
|
70
|
+
marginBlockEnd: { xs: 'space040' },
|
|
71
|
+
},
|
|
72
|
+
margin: {
|
|
73
|
+
xsMargin: 'space050',
|
|
74
|
+
smMargin: 'space060',
|
|
75
|
+
mdMargin: 'space000',
|
|
76
|
+
},
|
|
77
|
+
gutter: {
|
|
78
|
+
xsColumnGutter: 'space020',
|
|
79
|
+
smColumnGutter: 'space040',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
corePackageContent: {
|
|
83
|
+
titleBar: {
|
|
84
|
+
text: '',
|
|
85
|
+
marginBlockEnd: 'space040',
|
|
86
|
+
linkOverriders: {
|
|
87
|
+
iconSize: 'iconSize010',
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
benifitList: {
|
|
91
|
+
marginBlockEnd: 'space020',
|
|
92
|
+
markerAlign: 'start',
|
|
93
|
+
overrides: {
|
|
94
|
+
marginBlockEnd: { xs: 'space040' },
|
|
95
|
+
content: {
|
|
96
|
+
stylePreset: 'inkBase',
|
|
97
|
+
typographyPreset: 'utilityBody020',
|
|
98
|
+
},
|
|
99
|
+
marker: {
|
|
100
|
+
size: 'iconSize005',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
divider: {
|
|
105
|
+
marginBlockEnd: 'space050',
|
|
106
|
+
},
|
|
107
|
+
promo: '',
|
|
108
|
+
promoOverrides: {
|
|
109
|
+
marginBlockEnd: 'space020',
|
|
110
|
+
typographyPreset: 'utilityBody010',
|
|
111
|
+
stylePreset: 'inkPositive',
|
|
112
|
+
},
|
|
113
|
+
paymentKey: '',
|
|
114
|
+
paymentValue: '',
|
|
115
|
+
paymentOverrides: {
|
|
116
|
+
marginBlockEnd: 'space040',
|
|
117
|
+
typographyPreset: {
|
|
118
|
+
xs: 'utilityHeading020',
|
|
119
|
+
lg: 'utilityHeading040',
|
|
120
|
+
},
|
|
121
|
+
stylePreset: 'iinkContrast',
|
|
122
|
+
},
|
|
123
|
+
description: '',
|
|
124
|
+
descriptionOverrides: {
|
|
125
|
+
marginBlockEnd: 'space060',
|
|
126
|
+
typographyPreset: 'utilityMeta010',
|
|
127
|
+
stylePreset: 'inkSubtle',
|
|
128
|
+
},
|
|
129
|
+
billingDetails: '',
|
|
130
|
+
billingDetailsOverrides: {
|
|
131
|
+
marginBlockEnd: 'space040',
|
|
132
|
+
typographyPreset: 'utilityMeta010',
|
|
133
|
+
stylePreset: 'inkSubtle',
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
subscriptionDrawer: {
|
|
137
|
+
open: false,
|
|
138
|
+
closePosition: 'left',
|
|
139
|
+
size: '80%',
|
|
140
|
+
overrides: {
|
|
141
|
+
header: {
|
|
142
|
+
paddingInline: 'spaceInset000',
|
|
143
|
+
paddingBlock: 'spaceInset000',
|
|
144
|
+
},
|
|
145
|
+
content: {
|
|
146
|
+
paddingInline: 'spaceInsetStretch050',
|
|
147
|
+
paddingBlock: 'spaceInsetStretch050',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
titleBar: {
|
|
151
|
+
text: '',
|
|
152
|
+
marginBlockEnd: 'space040',
|
|
153
|
+
overrides: {
|
|
154
|
+
heading: {
|
|
155
|
+
typographyPreset: {
|
|
156
|
+
xs: 'utilityHeading010',
|
|
157
|
+
md: 'utilityHeading020',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
paddingInline: 'spaceInset000',
|
|
161
|
+
paddingBlock: 'spaceInset000',
|
|
162
|
+
},
|
|
163
|
+
linkOverriders: {
|
|
164
|
+
iconSize: 'iconSize010',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
benifitList: {
|
|
168
|
+
marginBlockEnd: 'space020',
|
|
169
|
+
markerAlign: 'start',
|
|
170
|
+
overrides: {
|
|
171
|
+
marginBlockEnd: { xs: 'space040' },
|
|
172
|
+
content: {
|
|
173
|
+
stylePreset: 'inkBase',
|
|
174
|
+
typographyPreset: 'utilityBody020',
|
|
175
|
+
},
|
|
176
|
+
marker: {
|
|
177
|
+
size: 'iconSize005',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
divider: {
|
|
182
|
+
marginBlockEnd: 'space050',
|
|
183
|
+
},
|
|
184
|
+
promo: '',
|
|
185
|
+
promoOverrides: {
|
|
186
|
+
marginBlockEnd: 'space020',
|
|
187
|
+
typographyPreset: 'utilityBody010',
|
|
188
|
+
stylePreset: 'inkPositive',
|
|
189
|
+
},
|
|
190
|
+
paymentKey: '',
|
|
191
|
+
paymentValue: '',
|
|
192
|
+
paymentOverrides: {
|
|
193
|
+
marginBlockEnd: 'space040',
|
|
194
|
+
typographyPreset: {
|
|
195
|
+
xs: 'utilityHeading020',
|
|
196
|
+
lg: 'utilityHeading040',
|
|
197
|
+
},
|
|
198
|
+
stylePreset: 'iinkContrast',
|
|
199
|
+
},
|
|
200
|
+
description: '',
|
|
201
|
+
descriptionOverrides: {
|
|
202
|
+
marginBlockEnd: 'space060',
|
|
203
|
+
typographyPreset: 'utilityMeta010',
|
|
204
|
+
stylePreset: 'inkSubtle',
|
|
205
|
+
},
|
|
206
|
+
billingDetails: '',
|
|
207
|
+
billingDetailsOverrides: {
|
|
208
|
+
marginBlockEnd: 'space040',
|
|
209
|
+
typographyPreset: 'utilityMeta010',
|
|
210
|
+
stylePreset: 'inkSubtle',
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
footer: {
|
|
215
|
+
helpChat: standalone_components_1.Help,
|
|
216
|
+
linksArray: [
|
|
217
|
+
{ text: 'About us', href: '/about-us', id: 1 },
|
|
218
|
+
{
|
|
219
|
+
text: 'Privacy & cookie policy',
|
|
220
|
+
href: 'http://www.newsprivacy.co.uk/',
|
|
221
|
+
id: 3,
|
|
222
|
+
},
|
|
223
|
+
{ text: 'Terms & conditions', href: '/terms-and-conditions', id: 4 },
|
|
224
|
+
],
|
|
225
|
+
legalText: "\u00A9 NewsKit Limited ".concat(new Date().getFullYear(), ".\n Registered in England No. 000000. Registered office: 1 London Bridge Street, SE1 9GF."),
|
|
226
|
+
},
|
|
227
|
+
footerOverrides: {
|
|
228
|
+
ariaLabel: 'Footer Menu',
|
|
229
|
+
footerStyleOverrides: {
|
|
230
|
+
stylePreset: 'footerContainerStylePreset',
|
|
231
|
+
},
|
|
232
|
+
footerAreaOverrides: {
|
|
233
|
+
paddingBlock: 'space050',
|
|
234
|
+
paddingInline: 'space050',
|
|
235
|
+
},
|
|
236
|
+
footerDividerOverrides: {
|
|
237
|
+
stylePreset: 'footerDividerStylePreset',
|
|
238
|
+
},
|
|
239
|
+
linksDividerOverrides: {
|
|
240
|
+
stylePreset: 'footerDividerStylePreset',
|
|
241
|
+
marginBlock: 'space040',
|
|
242
|
+
},
|
|
243
|
+
linkOverrides: {
|
|
244
|
+
typographyPreset: 'utilityButton020',
|
|
245
|
+
},
|
|
246
|
+
legalTextOverrides: {
|
|
247
|
+
stylePreset: 'footerLegalText',
|
|
248
|
+
typographyPreset: 'utilityMeta010',
|
|
249
|
+
},
|
|
250
|
+
chatHelpOverrides: {
|
|
251
|
+
icon: (react_1.default.createElement(IconFilledChat, { overrides: {
|
|
252
|
+
size: 'iconSize030',
|
|
253
|
+
stylePreset: 'chatIconStylePreset',
|
|
254
|
+
} })),
|
|
255
|
+
buttonOverrides: {
|
|
256
|
+
text: 'Chat now',
|
|
257
|
+
size: 'small',
|
|
258
|
+
stylePreset: 'buttonOutlinedSecondary',
|
|
259
|
+
minWidth: { xs: '100%', sm: 'sizing100' },
|
|
260
|
+
onClick: function () { return console.log('Chat with us'); },
|
|
261
|
+
},
|
|
262
|
+
helpSubheadline: {
|
|
263
|
+
text: 'Get a quick response from our team members',
|
|
264
|
+
overrides: {
|
|
265
|
+
typographyPreset: 'utilityBody030',
|
|
266
|
+
stylePreset: 'inkBase',
|
|
267
|
+
paddingInline: 'space050',
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
helpHeadline: {
|
|
271
|
+
text: 'Need help?',
|
|
272
|
+
overrides: {
|
|
273
|
+
typographyPreset: 'utilityHeading030',
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
gridLayoutOverrides: {
|
|
277
|
+
rowGap: 'space050',
|
|
278
|
+
justifyItems: 'center',
|
|
279
|
+
alignContent: 'start',
|
|
280
|
+
overrides: {
|
|
281
|
+
paddingBlock: 'space050',
|
|
282
|
+
paddingInline: 'space050',
|
|
283
|
+
width: '100%',
|
|
284
|
+
},
|
|
285
|
+
},
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
//# sourceMappingURL=baseContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"baseContext.js","sourceRoot":"","sources":["../../../src/context/baseContext.tsx"],"names":[],"mappings":";;;;;;AACA,0CAAuC;AACvC,mCAAuC;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AE;YACrB,WAAW,EAAE,0BAA0B;YACvC,WAAW,EAAE,UAAU;SACxB;QACD,aAAa,EAAE;YACb,gBAAgB,EAAE,kBAAkB;SACrC;QACD,kBAAkB,EAAE;YAClB,WAAW,EAAE,iBAAiB;YAC9B,gBAAgB,EAAE,gBAAgB;SACnC;QACD,iBAAiB,EAAE;YACjB,IAAI,EAAE,CACJ,8BAAC,cAAc,IACb,SAAS,EAAE;oBACT,IAAI,EAAE,aAAa;oBACnB,WAAW,EAAE,qBAAqB;iBACnC,GACD,CACH;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,yBAAyB;gBACtC,QAAQ,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE;gBACzC,OAAO,EAAE,cAAM,OAAA,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,EAA3B,CAA2B;aAC3C;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,4CAA4C;gBAClD,SAAS,EAAE;oBACT,gBAAgB,EAAE,gBAAgB;oBAClC,WAAW,EAAE,SAAS;oBACtB,aAAa,EAAE,UAAU;iBAC1B;aACF;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,YAAY;gBAClB,SAAS,EAAE;oBACT,gBAAgB,EAAE,mBAAmB;iBACtC;aACF;YACD,mBAAmB,EAAE;gBACnB,MAAM,EAAE,UAAU;gBAClB,YAAY,EAAE,QAAQ;gBACtB,YAAY,EAAE,OAAO;gBACrB,SAAS,EAAE;oBACT,YAAY,EAAE,UAAU;oBACxB,aAAa,EAAE,UAAU;oBACzB,KAAK,EAAE,MAAM;iBACd;aACF;SACF;KACF;CACF,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ContextOptions, ContextProviderProps } from './types';
|
|
3
|
+
import { baseContext } from './baseContext';
|
|
4
|
+
export declare const CheckoutContextProvider: React.FC<ContextProviderProps>;
|
|
5
|
+
export declare const CheckoutContextConsumer: React.Consumer<ContextOptions>;
|
|
6
|
+
export declare const useCheckoutContext: () => ContextOptions;
|
|
7
|
+
export { baseContext };
|
|
8
|
+
export type { ContextOptions };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.baseContext = exports.useCheckoutContext = exports.CheckoutContextConsumer = exports.CheckoutContextProvider = void 0;
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
31
|
+
var lodash_merge_1 = __importDefault(require("lodash.merge"));
|
|
32
|
+
var baseContext_1 = require("./baseContext");
|
|
33
|
+
Object.defineProperty(exports, "baseContext", { enumerable: true, get: function () { return baseContext_1.baseContext; } });
|
|
34
|
+
var CheckoutContext = (0, react_1.createContext)({});
|
|
35
|
+
var CheckoutContextProvider = function (_a) {
|
|
36
|
+
var context = _a.context, children = _a.children;
|
|
37
|
+
var c = (0, lodash_merge_1.default)({}, baseContext_1.baseContext, context);
|
|
38
|
+
return (react_1.default.createElement(CheckoutContext.Provider, { value: c }, children));
|
|
39
|
+
};
|
|
40
|
+
exports.CheckoutContextProvider = CheckoutContextProvider;
|
|
41
|
+
exports.CheckoutContextConsumer = CheckoutContext.Consumer;
|
|
42
|
+
var useCheckoutContext = function () {
|
|
43
|
+
return (0, react_1.useContext)(CheckoutContext);
|
|
44
|
+
};
|
|
45
|
+
exports.useCheckoutContext = useCheckoutContext;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAAwD;AACxD,8DAAgC;AAEhC,6CAA2C;AAmBlC,4FAnBA,yBAAW,OAmBA;AAjBpB,IAAM,eAAe,GAAG,IAAA,qBAAa,EAAiB,EAAE,CAAC,CAAA;AAElD,IAAM,uBAAuB,GAAmC,UAAC,EAGvE;QAFC,OAAO,aAAA,EACP,QAAQ,cAAA;IAER,IAAM,CAAC,GAAG,IAAA,sBAAK,EAAC,EAAE,EAAE,yBAAW,EAAE,OAAO,CAAC,CAAA;IACzC,OAAO,CACL,8BAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,CAAC,IAAG,QAAQ,CAA4B,CAC1E,CAAA;AACH,CAAC,CAAA;AARY,QAAA,uBAAuB,2BAQnC;AAEY,QAAA,uBAAuB,GAAG,eAAe,CAAC,QAAQ,CAAA;AAExD,IAAM,kBAAkB,GAAG;IAChC,OAAA,IAAA,kBAAU,EAAC,eAAe,CAAC;AAA3B,CAA2B,CAAA;AADhB,QAAA,kBAAkB,sBACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { HeaderProps, NavigationPrimaryProps, SubscriptionDetailsProps, CorePackageContentProps, SubscriptionDrawerProps, FooterContext, FooterContextOverrides, ButtonGroupProps } from '@newskit-render/shared-components';
|
|
3
|
+
import { MQ, InlineMessageProps, TabProps } from 'newskit';
|
|
4
|
+
interface InfoPanel extends InlineMessageProps {
|
|
5
|
+
marginBlockEnd?: MQ<string>;
|
|
6
|
+
}
|
|
7
|
+
interface SubscriptionMessage {
|
|
8
|
+
text: string | React.ReactElement;
|
|
9
|
+
marginBlockEnd?: MQ<string>;
|
|
10
|
+
}
|
|
11
|
+
interface PaymentDetailsPage {
|
|
12
|
+
infoPanel?: InfoPanel;
|
|
13
|
+
subscriptionDetails?: SubscriptionDetailsProps;
|
|
14
|
+
corePackageContent?: CorePackageContentProps;
|
|
15
|
+
subscriptionDrawer?: Partial<SubscriptionDrawerProps>;
|
|
16
|
+
subscriptionDrawerControl?: () => void;
|
|
17
|
+
subscriptionDrawerState?: boolean;
|
|
18
|
+
subscriptionMessage?: SubscriptionMessage;
|
|
19
|
+
subscriptionTabs?: {
|
|
20
|
+
tab1: Omit<TabProps, 'children'>;
|
|
21
|
+
tab2: Omit<TabProps, 'children'>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type ClosePosition = 'left' | 'right' | 'none';
|
|
25
|
+
export interface AccountCreationPageProps {
|
|
26
|
+
validation?: Record<string, any>;
|
|
27
|
+
modalOverrides: {
|
|
28
|
+
closePosition: ClosePosition;
|
|
29
|
+
open: boolean;
|
|
30
|
+
onDismiss?: () => void;
|
|
31
|
+
overrides: {
|
|
32
|
+
content: {
|
|
33
|
+
paddingInline?: MQ<string>;
|
|
34
|
+
paddingBlock?: MQ<string>;
|
|
35
|
+
};
|
|
36
|
+
panel: {
|
|
37
|
+
width: MQ<string>;
|
|
38
|
+
maxHeight: MQ<string>;
|
|
39
|
+
height: MQ<string>;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
introduction: {
|
|
43
|
+
title: string;
|
|
44
|
+
titleOverrides: {
|
|
45
|
+
typographyPreset: MQ<string>;
|
|
46
|
+
marginBlockEnd: MQ<string>;
|
|
47
|
+
};
|
|
48
|
+
description: string;
|
|
49
|
+
descriptionOverrides: {
|
|
50
|
+
typographyPreset: string;
|
|
51
|
+
removeLastMarginBlockEnd: boolean;
|
|
52
|
+
marginBlockEnd: MQ<string>;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
userData: {
|
|
57
|
+
titleOptions: string[];
|
|
58
|
+
};
|
|
59
|
+
buttonGroupProps: Partial<ButtonGroupProps>;
|
|
60
|
+
}
|
|
61
|
+
export interface ContextOptions {
|
|
62
|
+
baseUrl?: string;
|
|
63
|
+
env?: Record<string, unknown>;
|
|
64
|
+
data?: Record<string, unknown>;
|
|
65
|
+
siteTitle?: string;
|
|
66
|
+
siteDescription?: string;
|
|
67
|
+
url?: string;
|
|
68
|
+
siteHost?: string;
|
|
69
|
+
fbType?: string;
|
|
70
|
+
fbImageUrl?: string;
|
|
71
|
+
navigationPrimary?: Partial<NavigationPrimaryProps>;
|
|
72
|
+
header?: HeaderProps;
|
|
73
|
+
paymentDetailsPage?: PaymentDetailsPage;
|
|
74
|
+
buttonGroupProps?: Partial<ButtonGroupProps>;
|
|
75
|
+
footer?: FooterContext;
|
|
76
|
+
footerOverrides?: FooterContextOverrides;
|
|
77
|
+
accountCreationPage?: AccountCreationPageProps;
|
|
78
|
+
}
|
|
79
|
+
export interface ContextProviderProps {
|
|
80
|
+
children: ReactNode;
|
|
81
|
+
context: ContextOptions;
|
|
82
|
+
}
|
|
83
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/context/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GetServerSidePropsResult, GetServerSidePropsContext } from 'next';
|
|
2
|
+
type ServerSidePropsContext = GetServerSidePropsContext & {
|
|
3
|
+
provider: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const getProviderProps: (context: ServerSidePropsContext) => Promise<GetServerSidePropsResult<{
|
|
6
|
+
field: string;
|
|
7
|
+
url: string;
|
|
8
|
+
}>>;
|
|
9
|
+
export {};
|