@bento-core/about 1.0.1-CDS.10 → 1.0.1-CDS.12

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.
@@ -64,11 +64,13 @@ const AboutBody = _ref => {
64
64
  const parts = listObj.split('$$').map(splitedItem => {
65
65
  // Check for links using regex pattern: [title](url) or (url)[title]
66
66
  if (splitedItem != null && (/\[(.+)\]\((.+)\)/g.test(splitedItem) || /\((.+)\)\[(.+)\]/g.test(splitedItem))) {
67
- const title = splitedItem.match(/\[(.*)\]/).pop();
67
+ const defaultTitle = splitedItem.match(/\[(.*)\]/).pop();
68
68
  const linkAttrs = splitedItem.match(/\((.*)\)/).pop().split(' ');
69
+ const titleMatch = splitedItem.match(/title:\s*'([^']+)'/);
70
+ const title = titleMatch ? titleMatch[1].trim() : defaultTitle;
69
71
  const target = linkAttrs.find(link => link.includes('target:'));
70
72
  const url = linkAttrs.find(link => link.includes('url:'));
71
- const href = splitedItem.match(/\((.*)\)/).pop();
73
+ const href = linkAttrs[0];
72
74
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Link, {
73
75
  title: title,
74
76
  target: target ? target.replace('target:', '') : '_blank',
@@ -76,7 +78,7 @@ const AboutBody = _ref => {
76
78
  href: url ? url.replace('url:', '') : href && href.includes('@') ? "mailto:".concat(href) : href,
77
79
  color: "inherit",
78
80
  className: classes.link
79
- }, title), href.includes('@') || !href.includes('http') ? '' : /*#__PURE__*/_react.default.createElement("img", {
81
+ }, defaultTitle), href.includes('@') || !href.includes('http') ? '' : /*#__PURE__*/_react.default.createElement("img", {
80
82
  src: externalIconImage
81
83
  // externalIconImage: 'https://raw.githubusercontent.com/CBIIT/datacommons-assets/main/common/images/logos/svgs/externalLinkIcon.svg',
82
84
  ,
@@ -293,7 +295,7 @@ const AboutBody = _ref => {
293
295
  component: _reactRouterDom.Link,
294
296
  to: data.actionLink
295
297
  }, {
296
- title: data.actionButtonLabel,
298
+ title: data.actionButtonTitle || "Visit ".concat(data.actionButtonLabel),
297
299
  color: "inherit",
298
300
  underline: "none",
299
301
  className: classes.actionLink
@@ -308,14 +310,14 @@ const styles = () => ({
308
310
  fontFamily: props => props.data.fontFamily ? props.data.fontFamily : 'Nunito',
309
311
  fontSize: '15px',
310
312
  lineHeight: '22px',
311
- maxWidth: '1440px'
313
+ maxWidth: '1400px'
312
314
  },
313
315
  tabbedParag: {
314
316
  paddingLeft: '40px'
315
317
  },
316
318
  maxWidthContainer: {
317
319
  margin: '0px auto 0px auto',
318
- maxWidth: '1440px'
320
+ maxWidth: '1400px'
319
321
  },
320
322
  secondayTitle: {
321
323
  display: 'block',
@@ -364,7 +366,7 @@ const styles = () => ({
364
366
  marginTop: '19px'
365
367
  },
366
368
  actionTitle: {
367
- color: '#7A9BB1',
369
+ color: '#51718A',
368
370
  textAlign: 'center',
369
371
  fontFamily: 'Lato',
370
372
  fontSize: '19px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/about",
3
- "version": "1.0.1-CDS.10",
3
+ "version": "1.0.1-CDS.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -13,7 +13,7 @@
13
13
  "access": "public"
14
14
  },
15
15
  "dependencies": {
16
- "@bento-core/facet-filter": "^1.0.1-CDS.5",
16
+ "@bento-core/facet-filter": "^1.0.1-CDS.6",
17
17
  "lodash": "^4.17.20",
18
18
  "react-zoom-pan-pinch": "*"
19
19
  },
@@ -27,5 +27,5 @@
27
27
  },
28
28
  "author": "CTOS Bento Team",
29
29
  "license": "ISC",
30
- "gitHead": "37d12f5fc76bbc0e20d841fa0b8b4a908e39e6ed"
30
+ "gitHead": "3a79fe0c15ab525a2e1c97c6c52f22f9dc743b25"
31
31
  }
@@ -55,11 +55,13 @@ const AboutBody = ({
55
55
  const parts = listObj.split('$$').map((splitedItem) => {
56
56
  // Check for links using regex pattern: [title](url) or (url)[title]
57
57
  if (splitedItem != null && (/\[(.+)\]\((.+)\)/g.test(splitedItem) || /\((.+)\)\[(.+)\]/g.test(splitedItem))) {
58
- const title = splitedItem.match(/\[(.*)\]/).pop();
58
+ const defaultTitle = splitedItem.match(/\[(.*)\]/).pop();
59
59
  const linkAttrs = splitedItem.match(/\((.*)\)/).pop().split(' ');
60
+ const titleMatch = splitedItem.match(/title:\s*'([^']+)'/);
61
+ const title = titleMatch ? titleMatch[1].trim() : defaultTitle;
60
62
  const target = linkAttrs.find((link) => link.includes('target:'));
61
63
  const url = linkAttrs.find((link) => link.includes('url:'));
62
- const href = splitedItem.match(/\((.*)\)/).pop();
64
+ const href = linkAttrs[0];
63
65
 
64
66
  return (
65
67
  <>
@@ -71,7 +73,7 @@ const AboutBody = ({
71
73
  color="inherit"
72
74
  className={classes.link}
73
75
  >
74
- {title}
76
+ {defaultTitle}
75
77
  </Link>
76
78
  {href.includes('@') || !href.includes('http') ? '' : (
77
79
  <img
@@ -367,7 +369,7 @@ const AboutBody = ({
367
369
  {...(data.actionLink && data.actionLink.includes('http')
368
370
  ? { href: data.actionLink, target: '_blank', rel: 'noreferrer' }
369
371
  : { component: RouterLink, to: data.actionLink })}
370
- title={data.actionButtonLabel}
372
+ title={data.actionButtonTitle || `Visit ${data.actionButtonLabel}`}
371
373
  color="inherit"
372
374
  underline="none"
373
375
  className={classes.actionLink}
@@ -394,14 +396,14 @@ const styles = () => ({
394
396
  fontFamily: (props) => (props.data.fontFamily ? props.data.fontFamily : 'Nunito'),
395
397
  fontSize: '15px',
396
398
  lineHeight: '22px',
397
- maxWidth: '1440px',
399
+ maxWidth: '1400px',
398
400
  },
399
401
  tabbedParag: {
400
402
  paddingLeft: '40px',
401
403
  },
402
404
  maxWidthContainer: {
403
405
  margin: '0px auto 0px auto',
404
- maxWidth: '1440px',
406
+ maxWidth: '1400px',
405
407
  },
406
408
  secondayTitle: {
407
409
  display: 'block',
@@ -451,7 +453,7 @@ const styles = () => ({
451
453
  marginTop: '19px',
452
454
  },
453
455
  actionTitle: {
454
- color: '#7A9BB1',
456
+ color: '#51718A',
455
457
  textAlign: 'center',
456
458
  fontFamily: 'Lato',
457
459
  fontSize: '19px',