@ndlib/component-library 0.0.87 → 0.0.89
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.
|
@@ -13,13 +13,13 @@ export type StructuredDataProps = {
|
|
|
13
13
|
endDate: string;
|
|
14
14
|
slug: string;
|
|
15
15
|
shortDescription: string;
|
|
16
|
-
representationalImage
|
|
16
|
+
representationalImage?: {
|
|
17
17
|
url: string;
|
|
18
18
|
};
|
|
19
|
-
location
|
|
19
|
+
location?: {
|
|
20
20
|
address: string;
|
|
21
21
|
};
|
|
22
|
-
locationText
|
|
22
|
+
locationText?: {
|
|
23
23
|
name: string;
|
|
24
24
|
};
|
|
25
25
|
}[];
|
|
@@ -27,7 +27,7 @@ export type StructuredDataProps = {
|
|
|
27
27
|
title: string;
|
|
28
28
|
author: string;
|
|
29
29
|
shortDescription: string;
|
|
30
|
-
image
|
|
30
|
+
image?: {
|
|
31
31
|
url: string;
|
|
32
32
|
};
|
|
33
33
|
slug: string;
|
|
@@ -19,32 +19,34 @@ export const getStructuredDataSchemas = ({ title, pathname, description, nofollo
|
|
|
19
19
|
const schemas = [];
|
|
20
20
|
if (pathname !== '') {
|
|
21
21
|
schemas.push(stringifyWebpageSchema({
|
|
22
|
-
name: metadata.title,
|
|
23
|
-
description: metadata.description,
|
|
24
|
-
url: metadata.url,
|
|
25
|
-
lang: metadata.lang,
|
|
22
|
+
name: metadata === null || metadata === void 0 ? void 0 : metadata.title,
|
|
23
|
+
description: metadata === null || metadata === void 0 ? void 0 : metadata.description,
|
|
24
|
+
url: metadata === null || metadata === void 0 ? void 0 : metadata.url,
|
|
25
|
+
lang: metadata === null || metadata === void 0 ? void 0 : metadata.lang,
|
|
26
26
|
}));
|
|
27
27
|
events === null || events === void 0 ? void 0 : events.map((event) => {
|
|
28
|
+
var _a, _b, _c;
|
|
28
29
|
schemas.push(stringifyEventSchema({
|
|
29
|
-
title: event.title,
|
|
30
|
-
description: event.shortDescription,
|
|
31
|
-
image: event.representationalImage.url,
|
|
32
|
-
url: event.slug,
|
|
33
|
-
startDate: event.startDate,
|
|
34
|
-
endDate: event.endDate,
|
|
35
|
-
eventLocation: event.location.address,
|
|
36
|
-
eventLocationName: event.locationText.name,
|
|
30
|
+
title: event === null || event === void 0 ? void 0 : event.title,
|
|
31
|
+
description: event === null || event === void 0 ? void 0 : event.shortDescription,
|
|
32
|
+
image: (_a = event === null || event === void 0 ? void 0 : event.representationalImage) === null || _a === void 0 ? void 0 : _a.url,
|
|
33
|
+
url: event === null || event === void 0 ? void 0 : event.slug,
|
|
34
|
+
startDate: event === null || event === void 0 ? void 0 : event.startDate,
|
|
35
|
+
endDate: event === null || event === void 0 ? void 0 : event.endDate,
|
|
36
|
+
eventLocation: (_b = event === null || event === void 0 ? void 0 : event.location) === null || _b === void 0 ? void 0 : _b.address,
|
|
37
|
+
eventLocationName: (_c = event === null || event === void 0 ? void 0 : event.locationText) === null || _c === void 0 ? void 0 : _c.name,
|
|
37
38
|
siteUrl: siteUrl,
|
|
38
39
|
}));
|
|
39
40
|
});
|
|
40
41
|
news === null || news === void 0 ? void 0 : news.map((article) => {
|
|
42
|
+
var _a;
|
|
41
43
|
schemas.push(stringifyNewsSchema({
|
|
42
|
-
title: article.title,
|
|
43
|
-
abstract: article.shortDescription,
|
|
44
|
-
author: article.author,
|
|
45
|
-
image: article.image.url,
|
|
46
|
-
url: article.slug,
|
|
47
|
-
publishedDate: article.publishedDate,
|
|
44
|
+
title: article === null || article === void 0 ? void 0 : article.title,
|
|
45
|
+
abstract: article === null || article === void 0 ? void 0 : article.shortDescription,
|
|
46
|
+
author: article === null || article === void 0 ? void 0 : article.author,
|
|
47
|
+
image: (_a = article === null || article === void 0 ? void 0 : article.image) === null || _a === void 0 ? void 0 : _a.url,
|
|
48
|
+
url: article === null || article === void 0 ? void 0 : article.slug,
|
|
49
|
+
publishedDate: article === null || article === void 0 ? void 0 : article.publishedDate,
|
|
48
50
|
siteUrl: siteUrl,
|
|
49
51
|
}));
|
|
50
52
|
});
|
|
@@ -60,5 +60,14 @@ export const Alert = (_a) => {
|
|
|
60
60
|
[ALERT_TYPE.INFORMATIONAL_YELLOW]: InfoIcon,
|
|
61
61
|
[ALERT_TYPE.INFORMATIONAL]: InfoIcon,
|
|
62
62
|
}[type];
|
|
63
|
-
return (
|
|
63
|
+
return (_jsx(Row, Object.assign({ sx: Object.assign({}, style) }, rest, { centered: true }, { children: _jsxs(Row, Object.assign({ sx: {
|
|
64
|
+
boxSizing: 'border-box',
|
|
65
|
+
margin: '0 auto',
|
|
66
|
+
pl: '.5rem',
|
|
67
|
+
pr: '.5rem',
|
|
68
|
+
'@media screen and (min-width: 1212px)': {
|
|
69
|
+
maxWidth: '1200px',
|
|
70
|
+
padding: '0',
|
|
71
|
+
},
|
|
72
|
+
} }, { children: [icon && _jsx(Icon, { icon: icon, sx: { mr: 4 }, size: FONT_SIZE.LG }), _jsx(Markdown, { content: description, sx: { mt: 1, flexGrow: 1 } }), _jsx(Button, Object.assign({ type: BUTTON_TYPE.TEXT, onClick: dismiss, sx: { ml: 4 } }, { children: "Dismiss" }))] })) })));
|
|
64
73
|
};
|