@bento-core/about 1.0.1-CDS.8 → 1.0.1-CDS.9
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/aboutBodyView.js
CHANGED
|
@@ -68,11 +68,13 @@ const AboutBody = _ref => {
|
|
|
68
68
|
}, contentObj.paragraph.split('$$').map(splitedParagraph => {
|
|
69
69
|
// Checking for regex ()[] pattern
|
|
70
70
|
if (splitedParagraph != null && (/\[(.+)\]\((.+)\)/g.test(splitedParagraph) || /\((.+)\)\[(.+)\]/g.test(splitedParagraph))) {
|
|
71
|
-
const
|
|
71
|
+
const defaultTitle = splitedParagraph.match(/\[(.*)\]/).pop();
|
|
72
72
|
const linkAttrs = splitedParagraph.match(/\((.*)\)/).pop().split(' ');
|
|
73
|
+
const titleMatch = splitedParagraph.match(/title:\s*'([^']+)'/);
|
|
74
|
+
const title = titleMatch ? titleMatch[1].trim() : defaultTitle;
|
|
73
75
|
const target = linkAttrs.find(link => link.includes('target:'));
|
|
74
76
|
const url = linkAttrs.find(link => link.includes('url:'));
|
|
75
|
-
const href =
|
|
77
|
+
const href = linkAttrs[0];
|
|
76
78
|
const link = /*#__PURE__*/_react.default.createElement(_core.Link, {
|
|
77
79
|
title: title,
|
|
78
80
|
target: target ? target.replace('target:', '') : '_blank',
|
|
@@ -80,7 +82,7 @@ const AboutBody = _ref => {
|
|
|
80
82
|
href: url ? url.replace('url:', '') : href && href.includes('@') ? "mailto:".concat(href) : href,
|
|
81
83
|
color: "inherit",
|
|
82
84
|
className: classes.link
|
|
83
|
-
},
|
|
85
|
+
}, defaultTitle);
|
|
84
86
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, link, href.includes('@') || !href.includes('http') ? '' : /*#__PURE__*/_react.default.createElement("img", {
|
|
85
87
|
src: externalIconImage
|
|
86
88
|
// externalIconImage: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/common/images/logos/svgs/externalLinkIcon.svg',
|
package/dist/aboutHeaderView.js
CHANGED
|
@@ -24,7 +24,7 @@ const AboutHeader = _ref => {
|
|
|
24
24
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
25
|
id: "about_title",
|
|
26
26
|
className: classes.titleBody
|
|
27
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement("h1", {
|
|
28
28
|
className: classes.titleText
|
|
29
29
|
}, title))), /*#__PURE__*/_react.default.createElement("div", {
|
|
30
30
|
className: classes.whitePadding
|
|
@@ -50,7 +50,8 @@ const styles = () => ({
|
|
|
50
50
|
color: props.titleColor,
|
|
51
51
|
fontFamily: 'Lato',
|
|
52
52
|
fontSize: '35px',
|
|
53
|
-
fontWeight: 'bold'
|
|
53
|
+
fontWeight: 'bold',
|
|
54
|
+
display: 'inline'
|
|
54
55
|
})
|
|
55
56
|
});
|
|
56
57
|
AboutHeader.defaultProps = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/about",
|
|
3
|
-
"version": "1.0.1-CDS.
|
|
3
|
+
"version": "1.0.1-CDS.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
},
|
|
28
28
|
"author": "CTOS Bento Team",
|
|
29
29
|
"license": "ISC",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "61639923b9c77418e4b96267b0e4e430d0756b55"
|
|
31
31
|
}
|
package/src/aboutBodyView.js
CHANGED
|
@@ -70,11 +70,13 @@ const AboutBody = ({
|
|
|
70
70
|
{ contentObj.paragraph.split('$$').map((splitedParagraph) => {
|
|
71
71
|
// Checking for regex ()[] pattern
|
|
72
72
|
if (splitedParagraph != null && ((/\[(.+)\]\((.+)\)/g.test(splitedParagraph)) || (/\((.+)\)\[(.+)\]/g.test(splitedParagraph)))) {
|
|
73
|
-
const
|
|
73
|
+
const defaultTitle = splitedParagraph.match(/\[(.*)\]/).pop();
|
|
74
74
|
const linkAttrs = splitedParagraph.match(/\((.*)\)/).pop().split(' ');
|
|
75
|
+
const titleMatch = splitedParagraph.match(/title:\s*'([^']+)'/);
|
|
76
|
+
const title = titleMatch ? titleMatch[1].trim() : defaultTitle;
|
|
75
77
|
const target = linkAttrs.find((link) => link.includes('target:'));
|
|
76
78
|
const url = linkAttrs.find((link) => link.includes('url:'));
|
|
77
|
-
const href =
|
|
79
|
+
const href = linkAttrs[0];
|
|
78
80
|
|
|
79
81
|
const link = (
|
|
80
82
|
<Link
|
|
@@ -85,7 +87,7 @@ const AboutBody = ({
|
|
|
85
87
|
color="inherit"
|
|
86
88
|
className={classes.link}
|
|
87
89
|
>
|
|
88
|
-
{
|
|
90
|
+
{defaultTitle}
|
|
89
91
|
</Link>
|
|
90
92
|
);
|
|
91
93
|
|
package/src/aboutHeaderView.js
CHANGED
|
@@ -4,7 +4,7 @@ import { withStyles } from '@material-ui/core';
|
|
|
4
4
|
const AboutHeader = ({ classes, title }) => (
|
|
5
5
|
<div className={classes.container}>
|
|
6
6
|
<div className={classes.header}>
|
|
7
|
-
<div id="about_title" className={classes.titleBody}><
|
|
7
|
+
<div id="about_title" className={classes.titleBody}><h1 className={classes.titleText}>{title}</h1></div>
|
|
8
8
|
</div>
|
|
9
9
|
<div className={classes.whitePadding} />
|
|
10
10
|
</div>
|
|
@@ -33,6 +33,7 @@ const styles = () => ({
|
|
|
33
33
|
fontFamily: 'Lato',
|
|
34
34
|
fontSize: '35px',
|
|
35
35
|
fontWeight: 'bold',
|
|
36
|
+
display: 'inline',
|
|
36
37
|
}),
|
|
37
38
|
});
|
|
38
39
|
|