@newskit-render/shared-components 3.6.1 → 3.7.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/NavigationFooter/NavigationFooter.d.ts +1 -1
- package/dist/cjs/NavigationFooter/NavigationFooter.js +12 -34
- package/dist/cjs/NavigationFooter/NavigationFooter.js.map +1 -1
- package/dist/cjs/NavigationFooter/components/FooterLinks.d.ts +2 -0
- package/dist/cjs/NavigationFooter/components/FooterLinks.js +30 -0
- package/dist/cjs/NavigationFooter/components/FooterLinks.js.map +1 -0
- package/dist/cjs/NavigationFooter/stories/Help.d.ts +8 -0
- package/dist/cjs/NavigationFooter/stories/Help.js +22 -9
- package/dist/cjs/NavigationFooter/stories/Help.js.map +1 -1
- package/dist/cjs/NavigationFooter/stories/MySimpleComponent.d.ts +1 -3
- package/dist/cjs/NavigationFooter/stories/MySimpleComponent.js +4 -3
- package/dist/cjs/NavigationFooter/stories/MySimpleComponent.js.map +1 -1
- package/dist/cjs/NavigationFooter/stories/NavigationFooter.stories.d.ts +3 -3
- package/dist/cjs/NavigationFooter/stories/NavigationFooter.stories.js +25 -33
- package/dist/cjs/NavigationFooter/stories/NavigationFooter.stories.js.map +1 -1
- package/dist/cjs/NavigationFooter/style-presets.d.ts +17 -0
- package/dist/cjs/NavigationFooter/style-presets.js +17 -0
- package/dist/cjs/NavigationFooter/style-presets.js.map +1 -1
- package/dist/cjs/NavigationFooter/types.d.ts +19 -31
- package/dist/cjs/NavigationPrimary/NavigationPrimary.js +2 -4
- package/dist/cjs/NavigationPrimary/NavigationPrimary.js.map +1 -1
- package/dist/cjs/helpers/baseContext.d.ts +20 -17
- package/dist/cjs/helpers/baseContext.js +23 -16
- package/dist/cjs/helpers/baseContext.js.map +1 -1
- package/dist/esm/NavigationFooter/NavigationFooter.d.ts +1 -1
- package/dist/esm/NavigationFooter/NavigationFooter.js +13 -35
- package/dist/esm/NavigationFooter/NavigationFooter.js.map +1 -1
- package/dist/esm/NavigationFooter/components/FooterLinks.d.ts +2 -0
- package/dist/esm/NavigationFooter/components/FooterLinks.js +23 -0
- package/dist/esm/NavigationFooter/components/FooterLinks.js.map +1 -0
- package/dist/esm/NavigationFooter/stories/Help.d.ts +8 -0
- package/dist/esm/NavigationFooter/stories/Help.js +22 -9
- package/dist/esm/NavigationFooter/stories/Help.js.map +1 -1
- package/dist/esm/NavigationFooter/stories/MySimpleComponent.d.ts +1 -3
- package/dist/esm/NavigationFooter/stories/MySimpleComponent.js +4 -3
- package/dist/esm/NavigationFooter/stories/MySimpleComponent.js.map +1 -1
- package/dist/esm/NavigationFooter/stories/NavigationFooter.stories.d.ts +3 -3
- package/dist/esm/NavigationFooter/stories/NavigationFooter.stories.js +21 -29
- package/dist/esm/NavigationFooter/stories/NavigationFooter.stories.js.map +1 -1
- package/dist/esm/NavigationFooter/style-presets.d.ts +17 -0
- package/dist/esm/NavigationFooter/style-presets.js +17 -0
- package/dist/esm/NavigationFooter/style-presets.js.map +1 -1
- package/dist/esm/NavigationFooter/types.d.ts +19 -31
- package/dist/esm/NavigationPrimary/NavigationPrimary.js +2 -4
- package/dist/esm/NavigationPrimary/NavigationPrimary.js.map +1 -1
- package/dist/esm/helpers/baseContext.d.ts +20 -17
- package/dist/esm/helpers/baseContext.js +23 -16
- package/dist/esm/helpers/baseContext.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/AccountDropdown/AccountDropdown.d.ts +0 -3
- package/dist/cjs/AccountDropdown/AccountDropdown.js +0 -121
- package/dist/cjs/AccountDropdown/AccountDropdown.js.map +0 -1
- package/dist/cjs/AccountDropdown/accounts.d.ts +0 -37
- package/dist/cjs/AccountDropdown/accounts.js +0 -42
- package/dist/cjs/AccountDropdown/accounts.js.map +0 -1
- package/dist/cjs/AccountDropdown/index.d.ts +0 -2
- package/dist/cjs/AccountDropdown/index.js +0 -19
- package/dist/cjs/AccountDropdown/index.js.map +0 -1
- package/dist/cjs/AccountDropdown/types.d.ts +0 -4
- package/dist/cjs/AccountDropdown/types.js +0 -3
- package/dist/cjs/AccountDropdown/types.js.map +0 -1
- package/dist/cjs/AccountDropdown/utils.d.ts +0 -2
- package/dist/cjs/AccountDropdown/utils.js +0 -22
- package/dist/cjs/AccountDropdown/utils.js.map +0 -1
- package/dist/cjs/NavigationFooter/components/Container.d.ts +0 -7
- package/dist/cjs/NavigationFooter/components/Container.js +0 -14
- package/dist/cjs/NavigationFooter/components/Container.js.map +0 -1
- package/dist/cjs/NavigationFooter/components/FooterMenu.d.ts +0 -3
- package/dist/cjs/NavigationFooter/components/FooterMenu.js +0 -61
- package/dist/cjs/NavigationFooter/components/FooterMenu.js.map +0 -1
- package/dist/esm/AccountDropdown/AccountDropdown.d.ts +0 -3
- package/dist/esm/AccountDropdown/AccountDropdown.js +0 -91
- package/dist/esm/AccountDropdown/AccountDropdown.js.map +0 -1
- package/dist/esm/AccountDropdown/accounts.d.ts +0 -37
- package/dist/esm/AccountDropdown/accounts.js +0 -38
- package/dist/esm/AccountDropdown/accounts.js.map +0 -1
- package/dist/esm/AccountDropdown/index.d.ts +0 -2
- package/dist/esm/AccountDropdown/index.js +0 -3
- package/dist/esm/AccountDropdown/index.js.map +0 -1
- package/dist/esm/AccountDropdown/types.d.ts +0 -4
- package/dist/esm/AccountDropdown/types.js +0 -2
- package/dist/esm/AccountDropdown/types.js.map +0 -1
- package/dist/esm/AccountDropdown/utils.d.ts +0 -2
- package/dist/esm/AccountDropdown/utils.js +0 -17
- package/dist/esm/AccountDropdown/utils.js.map +0 -1
- package/dist/esm/NavigationFooter/components/Container.d.ts +0 -7
- package/dist/esm/NavigationFooter/components/Container.js +0 -9
- package/dist/esm/NavigationFooter/components/Container.js.map +0 -1
- package/dist/esm/NavigationFooter/components/FooterMenu.d.ts +0 -3
- package/dist/esm/NavigationFooter/components/FooterMenu.js +0 -33
- package/dist/esm/NavigationFooter/components/FooterMenu.js.map +0 -1
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
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;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import React, { useEffect, useState } from 'react';
|
|
38
|
-
import { useRouter } from 'next/router';
|
|
39
|
-
import fetch from 'cross-fetch';
|
|
40
|
-
import { setCookie, deleteCookie } from './utils';
|
|
41
|
-
import { getAccounts } from './accounts';
|
|
42
|
-
export var AccountDropdown = function (_a) {
|
|
43
|
-
var tmAccountsPassword = _a.tmAccountsPassword, ngnAccountsPassword = _a.ngnAccountsPassword;
|
|
44
|
-
var _b = useState(false), isOpen = _b[0], setIsOpen = _b[1];
|
|
45
|
-
var options = getAccounts(ngnAccountsPassword, tmAccountsPassword);
|
|
46
|
-
var router = useRouter();
|
|
47
|
-
var dropdownOpenHandler = function (e) {
|
|
48
|
-
if (e.code === 'NumpadSubtract' || e.code === 'Backquote') {
|
|
49
|
-
setIsOpen(function (currentState) {
|
|
50
|
-
var updatedState = !currentState;
|
|
51
|
-
return updatedState;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var handleChange = function (e) { return __awaiter(void 0, void 0, void 0, function () {
|
|
56
|
-
var selectedOption, result, data;
|
|
57
|
-
return __generator(this, function (_a) {
|
|
58
|
-
switch (_a.label) {
|
|
59
|
-
case 0:
|
|
60
|
-
selectedOption = options[e.target.value];
|
|
61
|
-
return [4 /*yield*/, fetch('/api/account/get-session', {
|
|
62
|
-
method: 'post',
|
|
63
|
-
body: JSON.stringify(selectedOption),
|
|
64
|
-
})];
|
|
65
|
-
case 1:
|
|
66
|
-
result = _a.sent();
|
|
67
|
-
return [4 /*yield*/, result.json()];
|
|
68
|
-
case 2:
|
|
69
|
-
data = _a.sent();
|
|
70
|
-
deleteCookie('acs_ngn', '/', null);
|
|
71
|
-
deleteCookie('acs_tnl', '/', null);
|
|
72
|
-
setCookie(data.accountProviderCookieName, data.value, new Date(2032, 1, 1), '/', null, true);
|
|
73
|
-
router.reload();
|
|
74
|
-
return [2 /*return*/];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); };
|
|
78
|
-
useEffect(function () {
|
|
79
|
-
window.addEventListener('keyup', dropdownOpenHandler);
|
|
80
|
-
return function () { return window.removeEventListener('keyup', dropdownOpenHandler); };
|
|
81
|
-
}, []);
|
|
82
|
-
return isOpen ? (React.createElement("select", { onChange: handleChange, "data-testid": "account-switcher", style: {
|
|
83
|
-
position: 'fixed',
|
|
84
|
-
top: '8%',
|
|
85
|
-
right: '10px',
|
|
86
|
-
maxWidth: '150px',
|
|
87
|
-
} },
|
|
88
|
-
React.createElement("option", null, "Select subscription"),
|
|
89
|
-
Object.keys(options).map(function (option) { return (React.createElement("option", { key: option, value: option }, option)); }))) : null;
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=AccountDropdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccountDropdown.js","sourceRoot":"","sources":["../../../src/AccountDropdown/AccountDropdown.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,MAAM,aAAa,CAAA;AAC/B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;A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IAAI,EACJ,IAAI,CACL,CAAA;oBACD,MAAM,CAAC,MAAM,EAAE,CAAA;;;;SAChB,CAAA;IAED,SAAS,CAAC;QACR,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAA;QACrD,OAAO,cAAM,OAAA,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAxD,CAAwD,CAAA;IACvE,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO,MAAM,CAAC,CAAC,CAAC,CACd,gCACE,QAAQ,EAAE,YAAY,iBACV,kBAAkB,EAC9B,KAAK,EAAE;YACL,QAAQ,EAAE,OAAO;YACjB,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,OAAO;SAClB;QAED,0DAAoC;QACnC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAC,MAAM,IAAK,OAAA,CACpC,gCAAQ,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAC/B,MAAM,CACA,CACV,EAJqC,CAIrC,CAAC,CACK,CACV,CAAC,CAAC,CAAC,IAAI,CAAA;AACV,CAAC,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export declare const getAccounts: (sunPassword: any, timesPassword: any) => {
|
|
2
|
-
'Sun with subscription': {
|
|
3
|
-
username: string;
|
|
4
|
-
password: any;
|
|
5
|
-
tenant: string;
|
|
6
|
-
};
|
|
7
|
-
'Times voucher subscription credit card': {
|
|
8
|
-
username: string;
|
|
9
|
-
password: any;
|
|
10
|
-
tenant: string;
|
|
11
|
-
};
|
|
12
|
-
'Times voucher subscription direct debit': {
|
|
13
|
-
username: string;
|
|
14
|
-
password: any;
|
|
15
|
-
tenant: string;
|
|
16
|
-
};
|
|
17
|
-
'Times voucher subscription paypal': {
|
|
18
|
-
username: string;
|
|
19
|
-
password: any;
|
|
20
|
-
tenant: string;
|
|
21
|
-
};
|
|
22
|
-
'Time DTC print credit card': {
|
|
23
|
-
username: string;
|
|
24
|
-
password: any;
|
|
25
|
-
tenant: string;
|
|
26
|
-
};
|
|
27
|
-
'Time Digital subscription credit card': {
|
|
28
|
-
username: string;
|
|
29
|
-
password: any;
|
|
30
|
-
tenant: string;
|
|
31
|
-
};
|
|
32
|
-
'Time DigiPrint subscription credit card': {
|
|
33
|
-
username: string;
|
|
34
|
-
password: any;
|
|
35
|
-
tenant: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export var getAccounts = function (sunPassword, timesPassword) { return ({
|
|
2
|
-
'Sun with subscription': {
|
|
3
|
-
username: 'render-e2e-subscription@yopmail.com',
|
|
4
|
-
password: sunPassword,
|
|
5
|
-
tenant: 'SUN',
|
|
6
|
-
},
|
|
7
|
-
'Times voucher subscription credit card': {
|
|
8
|
-
username: 'cmp-test-card-20-09-2022@yopmail.com',
|
|
9
|
-
password: timesPassword,
|
|
10
|
-
tenant: 'TIMES',
|
|
11
|
-
},
|
|
12
|
-
'Times voucher subscription direct debit': {
|
|
13
|
-
username: 'cmp-test-direct-20-09-22@yopmail.com',
|
|
14
|
-
password: timesPassword,
|
|
15
|
-
tenant: 'TIMES',
|
|
16
|
-
},
|
|
17
|
-
'Times voucher subscription paypal': {
|
|
18
|
-
username: 'cmp-test-paypal-20-09-22@yopmail.com',
|
|
19
|
-
password: timesPassword,
|
|
20
|
-
tenant: 'TIMES',
|
|
21
|
-
},
|
|
22
|
-
'Time DTC print credit card': {
|
|
23
|
-
username: 'cmp-dtc-card-20-09-22@yopmail.com',
|
|
24
|
-
password: timesPassword,
|
|
25
|
-
tenant: 'TIMES',
|
|
26
|
-
},
|
|
27
|
-
'Time Digital subscription credit card': {
|
|
28
|
-
username: 'cmp-digi-card-20-09-22@yopmail.com',
|
|
29
|
-
password: timesPassword,
|
|
30
|
-
tenant: 'TIMES',
|
|
31
|
-
},
|
|
32
|
-
'Time DigiPrint subscription credit card': {
|
|
33
|
-
username: 'digi-print-card-15-11-22@yopmail.com',
|
|
34
|
-
password: timesPassword,
|
|
35
|
-
tenant: 'TIMES',
|
|
36
|
-
},
|
|
37
|
-
}); };
|
|
38
|
-
//# sourceMappingURL=accounts.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/AccountDropdown/accounts.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,WAAW,GAAG,UAAC,WAAW,EAAE,aAAa,IAAK,OAAA,CAAC;IAC1D,uBAAuB,EAAE;QACvB,QAAQ,EAAE,qCAAqC;QAC/C,QAAQ,EAAE,WAAW;QACrB,MAAM,EAAE,KAAK;KACd;IACD,wCAAwC,EAAE;QACxC,QAAQ,EAAE,sCAAsC;QAChD,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;IACD,yCAAyC,EAAE;QACzC,QAAQ,EAAE,sCAAsC;QAChD,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;IACD,mCAAmC,EAAE;QACnC,QAAQ,EAAE,sCAAsC;QAChD,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;IACD,4BAA4B,EAAE;QAC5B,QAAQ,EAAE,mCAAmC;QAC7C,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;IACD,uCAAuC,EAAE;QACvC,QAAQ,EAAE,oCAAoC;QAC9C,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;IACD,yCAAyC,EAAE;QACzC,QAAQ,EAAE,sCAAsC;QAChD,QAAQ,EAAE,aAAa;QACvB,MAAM,EAAE,OAAO;KAChB;CACF,CAAC,EApCyD,CAoCzD,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/AccountDropdown/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,SAAS,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/AccountDropdown/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export var deleteCookie = function (name, path, domain) {
|
|
2
|
-
setCookie(name, '', new Date(0), path, domain, false);
|
|
3
|
-
};
|
|
4
|
-
export var setCookie = function (name, value, expires, path, domain, secure) {
|
|
5
|
-
var cookie = encodeURIComponent(name) + '=' + encodeURIComponent(value);
|
|
6
|
-
if (expires) {
|
|
7
|
-
cookie += '; expires=' + expires.toUTCString();
|
|
8
|
-
}
|
|
9
|
-
if (path) {
|
|
10
|
-
cookie += '; path=' + path;
|
|
11
|
-
}
|
|
12
|
-
if (secure) {
|
|
13
|
-
cookie += '; secure';
|
|
14
|
-
}
|
|
15
|
-
document.cookie = cookie;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/AccountDropdown/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,YAAY,GAAG,UAAC,IAAI,EAAE,IAAI,EAAE,MAAM;IAC7C,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;AACvD,CAAC,CAAA;AAED,MAAM,CAAC,IAAM,SAAS,GAAG,UAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM;IAClE,IAAI,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAA;IAEvE,IAAI,OAAO,EAAE;QACX,MAAM,IAAI,YAAY,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;KAC/C;IAED,IAAI,IAAI,EAAE;QACR,MAAM,IAAI,SAAS,GAAG,IAAI,CAAA;KAC3B;IAED,IAAI,MAAM,EAAE;QACV,MAAM,IAAI,UAAU,CAAA;KACrB;IAED,QAAQ,CAAC,MAAM,GAAG,MAAM,CAAA;AAC1B,CAAC,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Stack, Block } from 'newskit';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
var Container = function (_a) {
|
|
4
|
-
var children = _a.children, marginBlockEnd = _a.marginBlockEnd;
|
|
5
|
-
return (React.createElement(Stack, { flow: "horizontal-center", stackDistribution: "center", wrap: "nowrap", marginBlockEnd: marginBlockEnd },
|
|
6
|
-
React.createElement(Block, null, children)));
|
|
7
|
-
};
|
|
8
|
-
export default Container;
|
|
9
|
-
//# sourceMappingURL=Container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Container.js","sourceRoot":"","sources":["../../../../src/NavigationFooter/components/Container.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAM,KAAK,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,IAAM,SAAS,GAGV,UAAC,EAA4B;QAA1B,QAAQ,cAAA,EAAE,cAAc,oBAAA;IAAO,OAAA,CACrC,oBAAC,KAAK,IACJ,IAAI,EAAC,mBAAmB,EACxB,iBAAiB,EAAC,QAAQ,EAC1B,IAAI,EAAC,QAAQ,EACb,cAAc,EAAE,cAAc;QAE9B,oBAAC,KAAK,QAAE,QAAQ,CAAS,CACnB,CACT;AATsC,CAStC,CAAA;AAED,eAAe,SAAS,CAAA"}
|
|
@@ -1,33 +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
|
-
import { Menu, MenuGroup, MenuItem, useBreakpointKey, useInstrumentation, } from 'newskit';
|
|
13
|
-
import React, { useEffect, useState } from 'react';
|
|
14
|
-
import Container from './Container';
|
|
15
|
-
import { createClickEvent } from '../../utils';
|
|
16
|
-
var FooterMenu = function (_a) {
|
|
17
|
-
var _b;
|
|
18
|
-
var footer = _a.footer, footerOverrides = _a.footerOverrides;
|
|
19
|
-
var breakpoint = useBreakpointKey();
|
|
20
|
-
var _c = useState(false), isSmall = _c[0], setIsSmall = _c[1];
|
|
21
|
-
useEffect(function () {
|
|
22
|
-
setIsSmall(breakpoint === 'sm' || breakpoint === 'xs');
|
|
23
|
-
}, [breakpoint]);
|
|
24
|
-
var fireEvent = useInstrumentation().fireEvent;
|
|
25
|
-
return (React.createElement(Container, { marginBlockEnd: (_b = footerOverrides === null || footerOverrides === void 0 ? void 0 : footerOverrides.menuOverrides) === null || _b === void 0 ? void 0 : _b.marginBlockEnd },
|
|
26
|
-
React.createElement(Menu, { vertical: isSmall, "aria-label": footerOverrides === null || footerOverrides === void 0 ? void 0 : footerOverrides.ariaLabel, align: "center" },
|
|
27
|
-
React.createElement(MenuGroup, null, footer === null || footer === void 0 ? void 0 : footer.menuItemArray.map(function (_a) {
|
|
28
|
-
var id = _a.id, href = _a.href, text = _a.text;
|
|
29
|
-
return (React.createElement(MenuItem, { href: href, key: id, overrides: __assign({}, footerOverrides === null || footerOverrides === void 0 ? void 0 : footerOverrides.menuItemOverrides), onClick: function () { return fireEvent(createClickEvent('footer-menu', text)); } }, text));
|
|
30
|
-
})))));
|
|
31
|
-
};
|
|
32
|
-
export default FooterMenu;
|
|
33
|
-
//# sourceMappingURL=FooterMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
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