@mjhls/mjh-framework 1.0.128 → 1.0.130
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 +2 -1
- package/dist/index.es.js +89 -47
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +89 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,6 +31,8 @@ var NavDropdown = _interopDefault(require('react-bootstrap/NavDropdown'));
|
|
|
31
31
|
var Pagination = _interopDefault(require('react-bootstrap/Pagination'));
|
|
32
32
|
var Carousel = _interopDefault(require('react-bootstrap/Carousel'));
|
|
33
33
|
var Breadcrumb = _interopDefault(require('react-bootstrap/Breadcrumb'));
|
|
34
|
+
var DropdownButton = _interopDefault(require('react-bootstrap/DropdownButton'));
|
|
35
|
+
var Dropdown = _interopDefault(require('react-bootstrap/Dropdown'));
|
|
34
36
|
|
|
35
37
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
36
38
|
|
|
@@ -12169,7 +12171,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
12169
12171
|
}),
|
|
12170
12172
|
React__default.createElement(
|
|
12171
12173
|
'style',
|
|
12172
|
-
{ jsx: true },
|
|
12174
|
+
{ jsx: 'true' },
|
|
12173
12175
|
'\n .img-wrapper img {\n max-height: 200px;\n width: 100%;\n object-fit: cover;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper {\n width: 42%;\n }\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column;\n }\n }\n '
|
|
12174
12176
|
)
|
|
12175
12177
|
);
|
|
@@ -18446,11 +18448,12 @@ var TableShow = function TableShow(_ref) {
|
|
|
18446
18448
|
};
|
|
18447
18449
|
|
|
18448
18450
|
var Media$1 = function Media$$1(_ref) {
|
|
18449
|
-
var
|
|
18450
|
-
|
|
18451
|
-
|
|
18452
|
-
|
|
18453
|
-
|
|
18451
|
+
var node$$1 = _ref.node,
|
|
18452
|
+
client = _ref.client;
|
|
18453
|
+
var uploadDoc = node$$1.upload_doc,
|
|
18454
|
+
poster = node$$1.poster,
|
|
18455
|
+
blank = node$$1.blank,
|
|
18456
|
+
caption = node$$1.caption;
|
|
18454
18457
|
|
|
18455
18458
|
var builder = imageUrlBuilder(client);
|
|
18456
18459
|
|
|
@@ -18459,49 +18462,33 @@ var Media$1 = function Media$$1(_ref) {
|
|
|
18459
18462
|
};
|
|
18460
18463
|
|
|
18461
18464
|
var renderFigure = function renderFigure(uploadDoc, poster, blank, caption) {
|
|
18462
|
-
if (uploadDoc && uploadDoc.asset
|
|
18463
|
-
|
|
18464
|
-
|
|
18465
|
-
|
|
18466
|
-
|
|
18467
|
-
|
|
18468
|
-
|
|
18469
|
-
|
|
18470
|
-
src: urlFor(poster
|
|
18471
|
-
fluid: true
|
|
18472
|
-
}),
|
|
18473
|
-
caption && React__default.createElement(
|
|
18474
|
-
reactBootstrap.Figure.Caption,
|
|
18475
|
-
null,
|
|
18476
|
-
caption
|
|
18465
|
+
if (uploadDoc && uploadDoc.asset) {
|
|
18466
|
+
if (poster && poster.asset) {
|
|
18467
|
+
return React__default.createElement(
|
|
18468
|
+
reactBootstrap.Figure,
|
|
18469
|
+
{ className: 'mb-3' },
|
|
18470
|
+
React__default.createElement(
|
|
18471
|
+
'a',
|
|
18472
|
+
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
18473
|
+
React__default.createElement(reactBootstrap.Figure.Image, { src: urlFor(poster).url(), fluid: true })
|
|
18477
18474
|
)
|
|
18478
|
-
)
|
|
18479
|
-
)
|
|
18480
|
-
|
|
18481
|
-
|
|
18482
|
-
|
|
18483
|
-
{ className: 'd-block text-center mb-3' },
|
|
18484
|
-
React__default.createElement(reactBootstrap.Figure.Image, {
|
|
18485
|
-
src: urlFor(poster.asset).url()
|
|
18486
|
-
}),
|
|
18487
|
-
caption && React__default.createElement(
|
|
18488
|
-
reactBootstrap.Figure.Caption,
|
|
18489
|
-
null,
|
|
18475
|
+
);
|
|
18476
|
+
} else if (caption && caption !== '') {
|
|
18477
|
+
return React__default.createElement(
|
|
18478
|
+
'a',
|
|
18479
|
+
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self', className: 'd-block text-center' },
|
|
18490
18480
|
caption
|
|
18491
|
-
)
|
|
18492
|
-
|
|
18481
|
+
);
|
|
18482
|
+
}
|
|
18483
|
+
return null;
|
|
18493
18484
|
}
|
|
18485
|
+
return null;
|
|
18494
18486
|
};
|
|
18495
18487
|
|
|
18496
18488
|
return React__default.createElement(
|
|
18497
18489
|
React__default.Fragment,
|
|
18498
18490
|
null,
|
|
18499
|
-
renderFigure(uploadDoc, poster, blank, caption)
|
|
18500
|
-
!poster && uploadDoc && uploadDoc.asset && React__default.createElement(
|
|
18501
|
-
'a',
|
|
18502
|
-
{ href: uploadDoc.asset.url, target: blank ? '_blank' : '_self' },
|
|
18503
|
-
caption
|
|
18504
|
-
)
|
|
18491
|
+
renderFigure(uploadDoc, poster, blank, caption)
|
|
18505
18492
|
);
|
|
18506
18493
|
};
|
|
18507
18494
|
|
|
@@ -25949,12 +25936,8 @@ var getSerializers$1 = function getSerializers(client, pageview, videoAccountIDs
|
|
|
25949
25936
|
},
|
|
25950
25937
|
media: function media(_ref7) {
|
|
25951
25938
|
var node = _ref7.node;
|
|
25952
|
-
var upload_doc = node.upload_doc,
|
|
25953
|
-
poster = node.poster,
|
|
25954
|
-
caption = node.caption,
|
|
25955
|
-
blank = node.blank;
|
|
25956
25939
|
|
|
25957
|
-
return React__default.createElement(Media$1, {
|
|
25940
|
+
return React__default.createElement(Media$1, { node: node, client: client });
|
|
25958
25941
|
},
|
|
25959
25942
|
iframe: function iframe(_ref8) {
|
|
25960
25943
|
var node = _ref8.node;
|
|
@@ -26567,6 +26550,65 @@ var PdfDownload = function PdfDownload(props) {
|
|
|
26567
26550
|
);
|
|
26568
26551
|
};
|
|
26569
26552
|
|
|
26553
|
+
var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
26554
|
+
var parentTaxonomy = _ref.parentTaxonomy,
|
|
26555
|
+
subTaxonomies = _ref.subTaxonomies,
|
|
26556
|
+
_ref$page = _ref.page,
|
|
26557
|
+
page = _ref$page === undefined ? '/' : _ref$page,
|
|
26558
|
+
_ref$exclude = _ref.exclude,
|
|
26559
|
+
exclude = _ref$exclude === undefined ? 'clinical' : _ref$exclude,
|
|
26560
|
+
_ref$variant = _ref.variant,
|
|
26561
|
+
variant = _ref$variant === undefined ? 'primary' : _ref$variant,
|
|
26562
|
+
_ref$className = _ref.className,
|
|
26563
|
+
className = _ref$className === undefined ? '' : _ref$className;
|
|
26564
|
+
|
|
26565
|
+
/*
|
|
26566
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
26567
|
+
example:
|
|
26568
|
+
<RelatedTopicDropdown
|
|
26569
|
+
page='/clinical'
|
|
26570
|
+
exclude="clinical"
|
|
26571
|
+
className='mb-3'
|
|
26572
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
26573
|
+
subTaxonomies={props.subTaxonomies}
|
|
26574
|
+
/>
|
|
26575
|
+
*/
|
|
26576
|
+
if (subTaxonomies.length === 0) {
|
|
26577
|
+
if (parentTaxonomy.identifier == exclude) {
|
|
26578
|
+
return '';
|
|
26579
|
+
}
|
|
26580
|
+
return React__default.createElement(
|
|
26581
|
+
'div',
|
|
26582
|
+
{ id: 'related_dropdown', className: className },
|
|
26583
|
+
React__default.createElement(
|
|
26584
|
+
DropdownButton,
|
|
26585
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
26586
|
+
React__default.createElement(
|
|
26587
|
+
Dropdown.Item,
|
|
26588
|
+
{ href: parentTaxonomy.identifier },
|
|
26589
|
+
parentTaxonomy.name
|
|
26590
|
+
)
|
|
26591
|
+
)
|
|
26592
|
+
);
|
|
26593
|
+
} else {
|
|
26594
|
+
return React__default.createElement(
|
|
26595
|
+
'div',
|
|
26596
|
+
{ id: 'related_dropdown', className: className },
|
|
26597
|
+
React__default.createElement(
|
|
26598
|
+
DropdownButton,
|
|
26599
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
26600
|
+
subTaxonomies.length > 0 && subTaxonomies.map(function (taxonomy, index) {
|
|
26601
|
+
return React__default.createElement(
|
|
26602
|
+
Dropdown.Item,
|
|
26603
|
+
{ key: index, href: page + '/' + taxonomy.identifier },
|
|
26604
|
+
taxonomy.name
|
|
26605
|
+
);
|
|
26606
|
+
})
|
|
26607
|
+
)
|
|
26608
|
+
);
|
|
26609
|
+
}
|
|
26610
|
+
};
|
|
26611
|
+
|
|
26570
26612
|
exports.DeckContent = ContentCard;
|
|
26571
26613
|
exports.GridContent = GridContent$1;
|
|
26572
26614
|
exports.DeckQueue = Queue;
|
|
@@ -26606,4 +26648,5 @@ exports.SetCookie = SetCookie;
|
|
|
26606
26648
|
exports.Hero = Hero;
|
|
26607
26649
|
exports.AlphabeticList = AlphabeticList;
|
|
26608
26650
|
exports.PdfDownload = PdfDownload;
|
|
26651
|
+
exports.RelatedTopicsDropdown = RelatedTopicsDropdown;
|
|
26609
26652
|
//# sourceMappingURL=index.js.map
|