@mjhls/mjh-framework 1.0.939-nojs-pagination-v5 → 1.0.939-segment-test-v2
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 +168 -168
- package/dist/cjs/AlgoliaSearch.js +15 -131
- package/dist/cjs/ArticleProgramLandingPage.js +1 -2
- package/dist/cjs/ArticleSeriesLandingPage.js +1 -2
- package/dist/cjs/AuthWrapper.js +1 -1
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/ContentCardPaginated.js +2 -1
- package/dist/cjs/DeckContent.js +17 -30
- package/dist/cjs/DeckQueuePaginated.js +2 -1
- package/dist/cjs/EventsDeck.js +17 -17
- package/dist/cjs/GridContent.js +11 -26
- package/dist/cjs/GridContentPaginated.js +2 -1
- package/dist/cjs/HamMagazine.js +9 -9
- package/dist/cjs/IssueLanding.js +29 -29
- package/dist/cjs/KMTracker.js +15 -15
- package/dist/cjs/MasterDeck.js +18 -17
- package/dist/cjs/MasterDeckPaginated.js +10 -9
- package/dist/cjs/{MediaSeriesCard-cc5aa886.js → MediaSeriesCard-659279e0.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +7 -8
- package/dist/cjs/MediaSeriesLandingPaginated.js +9 -9
- package/dist/cjs/NavMagazine.js +10 -10
- package/dist/cjs/NavNative.js +9 -9
- package/dist/cjs/Pagination-885dcfbd.js +90 -0
- package/dist/cjs/PartnerDetailListingPaginated.js +2 -1
- package/dist/cjs/PublicationLanding.js +26 -26
- package/dist/cjs/QueueDeckExpanded.js +5 -3
- package/dist/cjs/QueueDeckExpandedPaginated.js +2 -1
- package/dist/cjs/RelatedContent.js +28 -28
- package/dist/cjs/RelatedTopicsDropdown.js +10 -10
- package/dist/cjs/SeriesListingDeck.js +1 -1
- package/dist/cjs/{SeriesSlider-de93a303.js → SeriesSlider-ba0c5d1a.js} +4 -4
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/VideoProgramLandingPage.js +1 -2
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +9 -17
- package/dist/cjs/View.js +68 -37
- package/dist/cjs/YoutubeGroup.js +4 -4
- package/dist/cjs/{getTargeting-dab97fe1.js → getTargeting-3c5754ac.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +3 -2
- package/dist/esm/AlgoliaSearch.js +16 -132
- package/dist/esm/ArticleProgramLandingPage.js +1 -2
- package/dist/esm/ArticleSeriesLandingPage.js +1 -2
- package/dist/esm/AuthWrapper.js +1 -1
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/ContentCardPaginated.js +2 -1
- package/dist/esm/DeckContent.js +17 -30
- package/dist/esm/DeckQueuePaginated.js +2 -1
- package/dist/esm/EventsDeck.js +17 -17
- package/dist/esm/GridContent.js +11 -26
- package/dist/esm/GridContentPaginated.js +2 -1
- package/dist/esm/HamMagazine.js +9 -9
- package/dist/esm/IssueLanding.js +29 -29
- package/dist/esm/KMTracker.js +15 -15
- package/dist/esm/MasterDeck.js +18 -17
- package/dist/esm/MasterDeckPaginated.js +10 -9
- package/dist/esm/{MediaSeriesCard-2dc3c439.js → MediaSeriesCard-06c6251a.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +7 -8
- package/dist/esm/MediaSeriesLandingPaginated.js +9 -9
- package/dist/esm/NavMagazine.js +10 -10
- package/dist/esm/NavNative.js +9 -9
- package/dist/esm/Pagination-59436882.js +82 -0
- package/dist/esm/PartnerDetailListingPaginated.js +2 -1
- package/dist/esm/PublicationLanding.js +26 -26
- package/dist/esm/QueueDeckExpanded.js +5 -3
- package/dist/esm/QueueDeckExpandedPaginated.js +2 -1
- package/dist/esm/RelatedContent.js +28 -28
- package/dist/esm/RelatedTopicsDropdown.js +10 -10
- package/dist/esm/SeriesListingDeck.js +1 -1
- package/dist/esm/{SeriesSlider-98ad6d97.js → SeriesSlider-45adb8dc.js} +4 -4
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/VideoProgramLandingPage.js +1 -2
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +9 -17
- package/dist/esm/View.js +67 -37
- package/dist/esm/YoutubeGroup.js +4 -4
- package/dist/esm/{getTargeting-04d979c9.js → getTargeting-42f9b439.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +3 -2
- package/package.json +115 -115
- package/dist/cjs/Pagination-42f92f7c.js +0 -97
- package/dist/esm/Pagination-484b86c5.js +0 -90
|
@@ -9435,7 +9435,7 @@ var Tooltip = React__default['default'].forwardRef(function (_ref, ref) {
|
|
|
9435
9435
|
Tooltip.defaultProps = defaultProps;
|
|
9436
9436
|
Tooltip.displayName = 'Tooltip';
|
|
9437
9437
|
|
|
9438
|
-
var css = ".MediaSeriesCard-module_article__SAFYK {\
|
|
9438
|
+
var css = ".MediaSeriesCard-module_article__SAFYK {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.MediaSeriesCard-module_article__SAFYK a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.MediaSeriesCard-module_thumb__3jRAU {\n width: 25%;\n}\n.MediaSeriesCard-module_thumb__3jRAU img {\n width: 100%;\n height: auto;\n}\n.MediaSeriesCard-module_info__3L7_o {\n width: 75%;\n font-size: 1rem;\n}\n.MediaSeriesCard-module_info__3L7_o h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.MediaSeriesCard-module_published__E4oiz {\n color: #6d6d6d;\n margin: 0;\n}\n.MediaSeriesCard-module_summary__1xanh {\n margin: 0.5rem 0 0 0;\n}\n.MediaSeriesCard-module_author__e5fuR {\n margin: 0;\n}\n.MediaSeriesCard-module_author__e5fuR span {\n color: #6d6d6d;\n}\n.MediaSeriesCard-module_name__2m5KY {\n font-size: 1.3rem;\n font-weight: bold;\n}\n@media only screen and (max-width: 568px) {\n .MediaSeriesCard-module_article__SAFYK {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .MediaSeriesCard-module_article__SAFYK a {\n flex-direction: column;\n align-items: center;\n }\n .MediaSeriesCard-module_thumb__3jRAU {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .MediaSeriesCard-module_thumb__3jRAU img{\n border-radius: 10px 10px 0 0; \n }\n .MediaSeriesCard-module_thumb__3jRAU figure {\n margin: 0;\n }\n .MediaSeriesCard-module_info__3L7_o {\n width: 90%;\n padding: 0rem !important;\n }\n .MediaSeriesCard-module_info__3L7_o h2 {\n font-size: 1rem;\n }\n .MediaSeriesCard-module_name__2m5KY {\n font-size: 1rem;\n \n }\n}\n";
|
|
9439
9439
|
var styles = { "article": "MediaSeriesCard-module_article__SAFYK", "thumb": "MediaSeriesCard-module_thumb__3jRAU", "info": "MediaSeriesCard-module_info__3L7_o", "published": "MediaSeriesCard-module_published__E4oiz", "summary": "MediaSeriesCard-module_summary__1xanh", "author": "MediaSeriesCard-module_author__e5fuR", "name": "MediaSeriesCard-module_name__2m5KY" };
|
|
9440
9440
|
styleInject_es.styleInject(css);
|
|
9441
9441
|
|
|
@@ -5,7 +5,7 @@ var _typeof = require('./typeof-567e31ff.js');
|
|
|
5
5
|
var _extends = require('./extends-7c86182f.js');
|
|
6
6
|
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var MediaSeriesCard = require('./MediaSeriesCard-
|
|
8
|
+
var MediaSeriesCard = require('./MediaSeriesCard-659279e0.js');
|
|
9
9
|
require('./index-50be6759.js');
|
|
10
10
|
require('react-dom');
|
|
11
11
|
var Link = require('next/link');
|
|
@@ -99,11 +99,11 @@ var Filter = function Filter(_ref) {
|
|
|
99
99
|
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
100
100
|
grandChildData = _useState6[0],
|
|
101
101
|
setGrandChildData = _useState6[1];
|
|
102
|
-
/*
|
|
103
|
-
{parent: showAll,
|
|
104
|
-
chidlren: show selected from parent,
|
|
105
|
-
grandchildren: show selected from children
|
|
106
|
-
}
|
|
102
|
+
/*
|
|
103
|
+
{parent: showAll,
|
|
104
|
+
chidlren: show selected from parent,
|
|
105
|
+
grandchildren: show selected from children
|
|
106
|
+
}
|
|
107
107
|
*/
|
|
108
108
|
|
|
109
109
|
|
|
@@ -396,8 +396,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
396
396
|
count: itemsPerPage,
|
|
397
397
|
from: start,
|
|
398
398
|
to: start + itemsPerPage,
|
|
399
|
-
url: pathname
|
|
400
|
-
itemsPerPage: itemsPerPage
|
|
399
|
+
url: pathname
|
|
401
400
|
};
|
|
402
401
|
_context2.next = 9;
|
|
403
402
|
return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
|
|
@@ -5,7 +5,7 @@ var _typeof = require('./typeof-567e31ff.js');
|
|
|
5
5
|
var _extends = require('./extends-7c86182f.js');
|
|
6
6
|
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
7
7
|
var React = require('react');
|
|
8
|
-
var MediaSeriesCard = require('./MediaSeriesCard-
|
|
8
|
+
var MediaSeriesCard = require('./MediaSeriesCard-659279e0.js');
|
|
9
9
|
require('./index-50be6759.js');
|
|
10
10
|
require('react-dom');
|
|
11
11
|
var Link = require('next/link');
|
|
@@ -46,7 +46,8 @@ require('./toNumber-5e1fac58.js');
|
|
|
46
46
|
require('./Beam.js');
|
|
47
47
|
require('./Segment.js');
|
|
48
48
|
require('./ADInfeed-44d43b8a.js');
|
|
49
|
-
require('./Pagination-
|
|
49
|
+
require('./Pagination-885dcfbd.js');
|
|
50
|
+
require('react-paginate');
|
|
50
51
|
require('react-bootstrap/Button');
|
|
51
52
|
require('./index.esm-d51c9ac6.js');
|
|
52
53
|
require('./iconBase-be4097c0.js');
|
|
@@ -100,11 +101,11 @@ var Filter = function Filter(_ref) {
|
|
|
100
101
|
_useState6 = slicedToArray._slicedToArray(_useState5, 2),
|
|
101
102
|
grandChildData = _useState6[0],
|
|
102
103
|
setGrandChildData = _useState6[1];
|
|
103
|
-
/*
|
|
104
|
-
{parent: showAll,
|
|
105
|
-
chidlren: show selected from parent,
|
|
106
|
-
grandchildren: show selected from children
|
|
107
|
-
}
|
|
104
|
+
/*
|
|
105
|
+
{parent: showAll,
|
|
106
|
+
chidlren: show selected from parent,
|
|
107
|
+
grandchildren: show selected from children
|
|
108
|
+
}
|
|
108
109
|
*/
|
|
109
110
|
|
|
110
111
|
|
|
@@ -418,8 +419,7 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
418
419
|
count: itemsPerPage,
|
|
419
420
|
from: start,
|
|
420
421
|
to: start + itemsPerPage,
|
|
421
|
-
url: pathname
|
|
422
|
-
itemsPerPage: itemsPerPage
|
|
422
|
+
url: pathname
|
|
423
423
|
};
|
|
424
424
|
_context2.next = 9;
|
|
425
425
|
return client.fetch('*[_type == \'documentGroup\' && identifier.current == \'' + identifier + '\'][0]{\n _id, \n isGated,\n name,\n description\n }');
|
package/dist/cjs/NavMagazine.js
CHANGED
|
@@ -38,16 +38,16 @@ var Navbar__default = /*#__PURE__*/_interopDefaultLegacy(Navbar);
|
|
|
38
38
|
var NavDropdown__default = /*#__PURE__*/_interopDefaultLegacy(NavDropdown);
|
|
39
39
|
|
|
40
40
|
var NavMagazine = function NavMagazine(props) {
|
|
41
|
-
/*
|
|
42
|
-
Example Nav with acceptable props
|
|
43
|
-
<MagazineNav
|
|
44
|
-
showLogin
|
|
45
|
-
user={props.cache.user}
|
|
46
|
-
logo={props.settings.logo}
|
|
47
|
-
dataObject={props.cache.mainNavCache}
|
|
48
|
-
website={website}
|
|
49
|
-
subNav={props.cache.subNavCache}
|
|
50
|
-
/>
|
|
41
|
+
/*
|
|
42
|
+
Example Nav with acceptable props
|
|
43
|
+
<MagazineNav
|
|
44
|
+
showLogin
|
|
45
|
+
user={props.cache.user}
|
|
46
|
+
logo={props.settings.logo}
|
|
47
|
+
dataObject={props.cache.mainNavCache}
|
|
48
|
+
website={website}
|
|
49
|
+
subNav={props.cache.subNavCache}
|
|
50
|
+
/>
|
|
51
51
|
*/
|
|
52
52
|
|
|
53
53
|
// Setting 'socialIconVariant' as 'light' as default to make the social icons and search icon black
|
package/dist/cjs/NavNative.js
CHANGED
|
@@ -315,15 +315,15 @@ function chunk(array, size, guard) {
|
|
|
315
315
|
var chunk_1 = chunk;
|
|
316
316
|
|
|
317
317
|
var NavNative = function NavNative(props) {
|
|
318
|
-
/*
|
|
319
|
-
Example Nav with acceptable props
|
|
320
|
-
<MagazineNav
|
|
321
|
-
showLogin
|
|
322
|
-
logo={props.settings.logo}
|
|
323
|
-
dataObject={props.cache.mainNavCache}
|
|
324
|
-
website={website}
|
|
325
|
-
subNav={props.cache.subNavCache}
|
|
326
|
-
/>
|
|
318
|
+
/*
|
|
319
|
+
Example Nav with acceptable props
|
|
320
|
+
<MagazineNav
|
|
321
|
+
showLogin
|
|
322
|
+
logo={props.settings.logo}
|
|
323
|
+
dataObject={props.cache.mainNavCache}
|
|
324
|
+
website={website}
|
|
325
|
+
subNav={props.cache.subNavCache}
|
|
326
|
+
/>
|
|
327
327
|
*/
|
|
328
328
|
// Setting 'socialIconVariant' as 'dark' as default to make the social icons and search icon black
|
|
329
329
|
var logo = props.logo,
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var ReactPaginate = require('react-paginate');
|
|
5
|
+
var Button = require('react-bootstrap/Button');
|
|
6
|
+
var index_esm = require('./index.esm-d51c9ac6.js');
|
|
7
|
+
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
var ReactPaginate__default = /*#__PURE__*/_interopDefaultLegacy(ReactPaginate);
|
|
12
|
+
var Button__default = /*#__PURE__*/_interopDefaultLegacy(Button);
|
|
13
|
+
|
|
14
|
+
var Pagination = function Pagination(props) {
|
|
15
|
+
var pageCount = props.pageCount,
|
|
16
|
+
_props$marginPagesDis = props.marginPagesDisplayed,
|
|
17
|
+
marginPagesDisplayed = _props$marginPagesDis === undefined ? 1 : _props$marginPagesDis,
|
|
18
|
+
_props$pageRangeDispl = props.pageRangeDisplayed,
|
|
19
|
+
pageRangeDisplayed = _props$pageRangeDispl === undefined ? 5 : _props$pageRangeDispl,
|
|
20
|
+
_props$currentPage = props.currentPage,
|
|
21
|
+
currentPage = _props$currentPage === undefined ? 1 : _props$currentPage,
|
|
22
|
+
_onPageChange = props.onPageChange,
|
|
23
|
+
_props$needLargePagin = props.needLargePaginateButtons,
|
|
24
|
+
needLargePaginateButtons = _props$needLargePagin === undefined ? false : _props$needLargePagin;
|
|
25
|
+
|
|
26
|
+
if (!pageCount || pageCount <= 1) return null;
|
|
27
|
+
return React__default['default'].createElement(
|
|
28
|
+
React__default['default'].Fragment,
|
|
29
|
+
null,
|
|
30
|
+
needLargePaginateButtons && React__default['default'].createElement(
|
|
31
|
+
'div',
|
|
32
|
+
{ className: 'pagination-lg-btn-nxt' },
|
|
33
|
+
React__default['default'].createElement(
|
|
34
|
+
Button__default['default'],
|
|
35
|
+
{
|
|
36
|
+
onClick: function onClick(e) {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
_onPageChange(currentPage + 1);
|
|
39
|
+
},
|
|
40
|
+
disabled: currentPage === pageCount,
|
|
41
|
+
href: '?page=' + (currentPage + 1) },
|
|
42
|
+
'NEXT PAGE',
|
|
43
|
+
React__default['default'].createElement(index_esm.FaArrowRight, { className: 'fa-arrow-right' })
|
|
44
|
+
)
|
|
45
|
+
),
|
|
46
|
+
React__default['default'].createElement(ReactPaginate__default['default'], {
|
|
47
|
+
pageCount: pageCount,
|
|
48
|
+
marginPagesDisplayed: marginPagesDisplayed,
|
|
49
|
+
pageRangeDisplayed: pageRangeDisplayed,
|
|
50
|
+
forcePage: currentPage - 1,
|
|
51
|
+
onPageChange: function onPageChange(_ref) {
|
|
52
|
+
var selected = _ref.selected;
|
|
53
|
+
return _onPageChange(selected + 1);
|
|
54
|
+
},
|
|
55
|
+
hrefBuilder: function hrefBuilder(page) {
|
|
56
|
+
return '?page=' + page;
|
|
57
|
+
},
|
|
58
|
+
previousLabel: '<',
|
|
59
|
+
nextLabel: '>',
|
|
60
|
+
containerClassName: 'pagination-container',
|
|
61
|
+
previousLinkClassName: 'previous',
|
|
62
|
+
nextLinkClassName: 'next',
|
|
63
|
+
disabledClassName: 'disbaled',
|
|
64
|
+
activeClassName: 'active'
|
|
65
|
+
}),
|
|
66
|
+
needLargePaginateButtons && React__default['default'].createElement(
|
|
67
|
+
'div',
|
|
68
|
+
{ className: 'pagination-lg-btn-prv' },
|
|
69
|
+
React__default['default'].createElement(
|
|
70
|
+
Button__default['default'],
|
|
71
|
+
{
|
|
72
|
+
onClick: function onClick(e) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
_onPageChange(currentPage - 1);
|
|
75
|
+
},
|
|
76
|
+
disabled: currentPage === 1,
|
|
77
|
+
href: '?page=' + (currentPage - 1) },
|
|
78
|
+
React__default['default'].createElement(index_esm.FaArrowLeft, { className: 'fa-arrow-left' }),
|
|
79
|
+
'PREVIOUS PAGE'
|
|
80
|
+
)
|
|
81
|
+
),
|
|
82
|
+
React__default['default'].createElement(
|
|
83
|
+
'style',
|
|
84
|
+
{ jsx: 'true' },
|
|
85
|
+
'\n .pagination-container {\n list-style: none;\n padding: 10px 0;\n margin: 0;\n display: flex;\n overflow: auto;\n }\n .pagination-container::before,\n .pagination-container::after {\n content: \'\';\n margin: 0 auto;\n }\n .pagination-container a {\n padding: 10px;\n border: 1px solid #dee2e6;\n }\n .pagination-container a:hover {\n text-decoration: none;\n background-color: #e9ecef;\n border-color: #dee2e6;\n }\n .pagination-container .active a {\n color: #fff;\n background-color: #666;\n background-color: var(--primary);\n }\n .pagination-container li:first-child a {\n border-radius: 5px 0 0 5px;\n }\n .pagination-container li:last-child a {\n border-radius: 0 5px 5px 0;\n }\n .pagination-container .disbaled a {\n cursor: default;\n }\n .pagination-lg-btn-nxt,\n .pagination-lg-btn-prv {\n text-align: center;\n }\n .pagination-lg-btn-nxt .btn,\n .pagination-lg-btn-prv .btn {\n min-width: 80%;\n color: #000;\n color: var(--primary);\n background-color: transparent;\n border-color: #000;\n border-color: var(--primary);\n }\n .pagination-lg-btn-nxt {\n margin: 0 0 1.5rem;\n }\n .pagination-lg-btn-prv {\n margin: 1.5rem 0 0;\n }\n .pagination-lg-btn-nxt .btn:not(:disabled):not(.disabled).active,\n .pagination-lg-btn-prv .btn:not(:disabled):not(.disabled):active {\n color: #fff;\n background-color: #000;\n background-color: var(--primary);\n border-color: #000;\n border-color: var(--primary);\n }\n @media only screen and (min-width: 601px) {\n [class^=\'pagination-lg-btn\'] {\n display: none;\n }\n }\n .fa-arrow-left {\n margin-right: 0.5rem;\n }\n .fa-arrow-right {\n margin-left: 0.5rem;\n }\n .pagination-container::-webkit-scrollbar {\n height: 8px;\n }\n .pagination-container::-webkit-scrollbar-track,\n .pagination-container::-webkit-scrollbar-thumb {\n -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);\n border-radius: 4px;\n }\n .pagination-container::-webkit-scrollbar-track {\n background-color: rgba(0, 0, 0, 0.1);\n }\n .pagination-container::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.3);\n }\n '
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
exports.Pagination = Pagination;
|
|
@@ -46,7 +46,8 @@ require('./AuthorComponent-39b37d84.js');
|
|
|
46
46
|
require('./ADlgInfeed-24d739f6.js');
|
|
47
47
|
require('./getContentCategory-f38a4c00.js');
|
|
48
48
|
require('./timeDifferenceCalc.js');
|
|
49
|
-
require('./Pagination-
|
|
49
|
+
require('./Pagination-885dcfbd.js');
|
|
50
|
+
require('react-paginate');
|
|
50
51
|
require('react-bootstrap/Button');
|
|
51
52
|
require('./index.esm-d51c9ac6.js');
|
|
52
53
|
require('./iconBase-be4097c0.js');
|
|
@@ -386,32 +386,32 @@ module.exports = { "default": set$1, __esModule: true };
|
|
|
386
386
|
|
|
387
387
|
var _Set = _commonjsHelpers.unwrapExports(set);
|
|
388
388
|
|
|
389
|
-
/* usage & query
|
|
390
|
-
const Publication = (props) => {
|
|
391
|
-
const { cache, pub, year } = props
|
|
392
|
-
const targeting = {
|
|
393
|
-
content_placement: [`/journals/${pub.identifier.current}`],
|
|
394
|
-
document_url: [`/journals/${pub.identifier.current}`],
|
|
395
|
-
}
|
|
396
|
-
return (
|
|
397
|
-
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
398
|
-
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
399
|
-
</Shell>
|
|
400
|
-
)
|
|
401
|
-
}
|
|
402
|
-
Publication.getInitialProps = async (ctx) => {
|
|
403
|
-
const { query } = ctx
|
|
404
|
-
const {
|
|
405
|
-
query: { year },
|
|
406
|
-
} = ctx
|
|
407
|
-
const pub = await client.fetch(getQuery('publication'), query)
|
|
408
|
-
**import urlFor from framework**
|
|
409
|
-
pub.issues.map((issue) => {
|
|
410
|
-
issue.thumbnail = urlFor({client, source: issue.thumbnail})
|
|
411
|
-
})
|
|
412
|
-
return { pub, year }
|
|
413
|
-
}
|
|
414
|
-
export default Publication
|
|
389
|
+
/* usage & query
|
|
390
|
+
const Publication = (props) => {
|
|
391
|
+
const { cache, pub, year } = props
|
|
392
|
+
const targeting = {
|
|
393
|
+
content_placement: [`/journals/${pub.identifier.current}`],
|
|
394
|
+
document_url: [`/journals/${pub.identifier.current}`],
|
|
395
|
+
}
|
|
396
|
+
return (
|
|
397
|
+
<Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
|
|
398
|
+
<PublicationLanding publication={pub} year={year} href={'journals'} />
|
|
399
|
+
</Shell>
|
|
400
|
+
)
|
|
401
|
+
}
|
|
402
|
+
Publication.getInitialProps = async (ctx) => {
|
|
403
|
+
const { query } = ctx
|
|
404
|
+
const {
|
|
405
|
+
query: { year },
|
|
406
|
+
} = ctx
|
|
407
|
+
const pub = await client.fetch(getQuery('publication'), query)
|
|
408
|
+
**import urlFor from framework**
|
|
409
|
+
pub.issues.map((issue) => {
|
|
410
|
+
issue.thumbnail = urlFor({client, source: issue.thumbnail})
|
|
411
|
+
})
|
|
412
|
+
return { pub, year }
|
|
413
|
+
}
|
|
414
|
+
export default Publication
|
|
415
415
|
*/
|
|
416
416
|
|
|
417
417
|
var generateContentPlacements = function generateContentPlacements(issues) {
|
|
@@ -1367,8 +1367,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1367
1367
|
imageFit = props.imageFit,
|
|
1368
1368
|
rightItems = props.rightItems,
|
|
1369
1369
|
brandInsightAd = props.brandInsightAd,
|
|
1370
|
-
_props$nextPagePostsC = props.nextPagePostsCount,
|
|
1371
|
-
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC,
|
|
1372
1370
|
_props$showBI = props.showBI,
|
|
1373
1371
|
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
1374
1372
|
_props$heroContent = props.heroContent,
|
|
@@ -1422,6 +1420,10 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1422
1420
|
var prevValues = usePrevious(values);
|
|
1423
1421
|
|
|
1424
1422
|
var renderManualPagination = function renderManualPagination(currentPage) {
|
|
1423
|
+
if (lastDataSize < itemsPerPage) {
|
|
1424
|
+
return null;
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1425
1427
|
return React__default['default'].createElement(
|
|
1426
1428
|
'div',
|
|
1427
1429
|
{ className: 'd-flex justify-content-between' },
|
|
@@ -1430,7 +1432,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1430
1432
|
{ href: '?page=' + (currentPage - 1) },
|
|
1431
1433
|
'<< Previous'
|
|
1432
1434
|
),
|
|
1433
|
-
|
|
1435
|
+
React__default['default'].createElement(
|
|
1434
1436
|
'a',
|
|
1435
1437
|
{ href: '?page=' + (currentPage + 1) },
|
|
1436
1438
|
'Next >>'
|
|
@@ -19,7 +19,7 @@ var ADlgInfeed = require('./ADlgInfeed-24d739f6.js');
|
|
|
19
19
|
var getContentCategory = require('./getContentCategory-f38a4c00.js');
|
|
20
20
|
var timeDifferenceCalc = require('./timeDifferenceCalc.js');
|
|
21
21
|
var urlFor = require('./urlFor.js');
|
|
22
|
-
var Pagination = require('./Pagination-
|
|
22
|
+
var Pagination = require('./Pagination-885dcfbd.js');
|
|
23
23
|
require('./_commonjsHelpers-06173234.js');
|
|
24
24
|
require('./core.get-iterator-method-5643aa10.js');
|
|
25
25
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -38,6 +38,7 @@ require('./Beam.js');
|
|
|
38
38
|
require('./stringify-f7a37a8d.js');
|
|
39
39
|
require('./Segment.js');
|
|
40
40
|
require('./index-d48b231c.js');
|
|
41
|
+
require('react-paginate');
|
|
41
42
|
require('react-bootstrap/Button');
|
|
42
43
|
require('./index.esm-d51c9ac6.js');
|
|
43
44
|
require('./iconBase-be4097c0.js');
|
|
@@ -17,34 +17,34 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
|
|
18
18
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
19
19
|
|
|
20
|
-
/*
|
|
21
|
-
Sample query
|
|
22
|
-
let references = ''
|
|
23
|
-
if(article.taxonomyMapping.length > 0){
|
|
24
|
-
article.taxonomyMapping.forEach((ref, index) => {
|
|
25
|
-
references = references + `references('${ref._ref}') `
|
|
26
|
-
if(index+1 !== article.taxonomyMapping.length){
|
|
27
|
-
references = references + ` && `
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
33
|
-
...,
|
|
34
|
-
title,
|
|
35
|
-
summary,
|
|
36
|
-
thumbnail,
|
|
37
|
-
url,
|
|
38
|
-
published,
|
|
39
|
-
authorMapping[]->,
|
|
40
|
-
contentCategory->
|
|
41
|
-
}`
|
|
42
|
-
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
43
|
-
|
|
44
|
-
Sample usage
|
|
45
|
-
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
/*
|
|
21
|
+
Sample query
|
|
22
|
+
let references = ''
|
|
23
|
+
if(article.taxonomyMapping.length > 0){
|
|
24
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
25
|
+
references = references + `references('${ref._ref}') `
|
|
26
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
27
|
+
references = references + ` && `
|
|
28
|
+
}
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
33
|
+
...,
|
|
34
|
+
title,
|
|
35
|
+
summary,
|
|
36
|
+
thumbnail,
|
|
37
|
+
url,
|
|
38
|
+
published,
|
|
39
|
+
authorMapping[]->,
|
|
40
|
+
contentCategory->
|
|
41
|
+
}`
|
|
42
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
43
|
+
|
|
44
|
+
Sample usage
|
|
45
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
46
|
+
|
|
47
|
+
|
|
48
48
|
*/
|
|
49
49
|
var RelatedContent = function RelatedContent(props) {
|
|
50
50
|
var client = props.client,
|
|
@@ -22,16 +22,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
22
22
|
_ref$className = _ref.className,
|
|
23
23
|
className = _ref$className === undefined ? '' : _ref$className;
|
|
24
24
|
|
|
25
|
-
/*
|
|
26
|
-
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
27
|
-
example:
|
|
28
|
-
<RelatedTopicDropdown
|
|
29
|
-
page='/clinical'
|
|
30
|
-
exclude="clinical"
|
|
31
|
-
className='mb-3'
|
|
32
|
-
parentTaxonomy={props.parentTaxonomy}
|
|
33
|
-
subTaxonomies={props.subTaxonomies}
|
|
34
|
-
/>
|
|
25
|
+
/*
|
|
26
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
27
|
+
example:
|
|
28
|
+
<RelatedTopicDropdown
|
|
29
|
+
page='/clinical'
|
|
30
|
+
exclude="clinical"
|
|
31
|
+
className='mb-3'
|
|
32
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
33
|
+
subTaxonomies={props.subTaxonomies}
|
|
34
|
+
/>
|
|
35
35
|
*/
|
|
36
36
|
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
37
37
|
if (parentTaxonomy.identifier == exclude) {
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var Router = require('next/router');
|
|
8
8
|
var index = require('./index-fc2f1ca2.js');
|
|
9
9
|
var index_es = require('./index.es-f3e47207.js');
|
|
10
|
-
var SeriesSlider = require('./SeriesSlider-
|
|
10
|
+
var SeriesSlider = require('./SeriesSlider-ba0c5d1a.js');
|
|
11
11
|
var visibilitySensor = require('./visibility-sensor-eb2c5b69.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -12,10 +12,10 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
|
|
15
|
-
/*
|
|
16
|
-
GROQ query -
|
|
17
|
-
accepts an array of title, URL
|
|
18
|
-
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
15
|
+
/*
|
|
16
|
+
GROQ query -
|
|
17
|
+
accepts an array of title, URL
|
|
18
|
+
`https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
var SeriesSlider = function SeriesSlider(_ref) {
|
package/dist/cjs/SideFooter.js
CHANGED
|
@@ -38,8 +38,8 @@ var renderLink = function renderLink(row) {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
var SideFooter = function SideFooter(props) {
|
|
41
|
-
/*
|
|
42
|
-
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
41
|
+
/*
|
|
42
|
+
useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
|
|
43
43
|
*/
|
|
44
44
|
var _get = get.get_1(props, 'cache.siteSettingCache', {}),
|
|
45
45
|
socialLinks = _get.socialLinks,
|
|
@@ -233,8 +233,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
233
233
|
params = {
|
|
234
234
|
from: start,
|
|
235
235
|
to: start + itemsPerPage,
|
|
236
|
-
url: pathname
|
|
237
|
-
itemsPerPage: itemsPerPage
|
|
236
|
+
url: pathname
|
|
238
237
|
};
|
|
239
238
|
|
|
240
239
|
query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'' + taxonomyId + '\')\n ' + (topicId ? '&& references(\'' + topicId + '\')' : '') + '\n ] | order(published desc) [$from...$to]{\n \t\t...,\n \t\ttitle,\n \t\tsummary,\n \t\tpublished,\n \t\tthumbnail{ ..., asset->},\n \t\turl,\n \t\ttaxonomy,\n \t\tcontentCategory->,\n \t\tbody[_type == "youtubeGallery"]{\n ...,\n videos[]{\n ...,\n thumbnail{...,asset->}\n }\n },\n \t\t\'pageNumber\': ' + currentPage + '\n \t}';
|
|
@@ -21,7 +21,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
21
21
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
23
|
|
|
24
|
-
var css = ".VideoSeriesCard-module_article__Hlc3e {\
|
|
24
|
+
var css = ".VideoSeriesCard-module_article__Hlc3e {\n width: 100%;\n margin: 0 0 1rem 0;\n}\n.VideoSeriesCard-module_article__Hlc3e a {\n display: flex;\n width: 100%;\n color: #000000;\n}\n.VideoSeriesCard-module_thumb__3hGyJ {\n width: 25%;\n}\n.VideoSeriesCard-module_thumb__3hGyJ img {\n width: 100%;\n height: auto;\n}\n.VideoSeriesCard-module_info__2_i1N {\n width: 75%;\n font-size: 1rem;\n}\n.VideoSeriesCard-module_info__2_i1N h2 {\n font-weight: bold;\n font-size: 1.25rem;\n margin: 0;\n}\n.VideoSeriesCard-module_published__1fI0q {\n color: #6d6d6d;\n margin: 0;\n}\n.VideoSeriesCard-module_summary__3hWJT {\n margin: 0.5rem 0 0 0;\n}\n.VideoSeriesCard-module_author__aU35o {\n margin: 0;\n}\n.VideoSeriesCard-module_author__aU35o span {\n color: #6d6d6d;\n}\n@media only screen and (max-width: 568px) {\n .VideoSeriesCard-module_article__Hlc3e {\n margin: 1rem 0;\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\n }\n .VideoSeriesCard-module_article__Hlc3e a {\n flex-direction: column;\n align-items: center;\n }\n .VideoSeriesCard-module_thumb__3hGyJ {\n overflow: hidden;\n width: 100%;\n margin-bottom: 1rem;\n }\n .VideoSeriesCard-module_thumb__3hGyJ img{\n border-radius: 10px 10px 0 0; \n }\n .VideoSeriesCard-module_thumb__3hGyJ figure {\n margin: 0;\n }\n .VideoSeriesCard-module_info__2_i1N {\n width: 90%;\n padding: 1rem !important;\n }\n .VideoSeriesCard-module_info__2_i1N h2 {\n font-size: 1rem;\n }\n}\n";
|
|
25
25
|
var styles = { "article": "VideoSeriesCard-module_article__Hlc3e", "thumb": "VideoSeriesCard-module_thumb__3hGyJ", "info": "VideoSeriesCard-module_info__2_i1N", "published": "VideoSeriesCard-module_published__1fI0q", "summary": "VideoSeriesCard-module_summary__3hWJT", "author": "VideoSeriesCard-module_author__aU35o" };
|
|
26
26
|
styleInject_es.styleInject(css);
|
|
27
27
|
|
|
@@ -86,8 +86,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
86
86
|
total_pages: null,
|
|
87
87
|
scrolling: true,
|
|
88
88
|
query: _this.query,
|
|
89
|
-
currentPage: _this.props.currentPage || 1
|
|
90
|
-
lastDataSize: _this.data ? _this.data.length : 0
|
|
89
|
+
currentPage: _this.props.currentPage || 1
|
|
91
90
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
92
91
|
_this.setState(function (state) {
|
|
93
92
|
var page = state.page,
|
|
@@ -131,13 +130,11 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
131
130
|
newDataArr.push(dataArr);
|
|
132
131
|
return {
|
|
133
132
|
data: newDataArr,
|
|
134
|
-
scrolling: true
|
|
135
|
-
lastDataSize: dataArr.length
|
|
133
|
+
scrolling: true
|
|
136
134
|
};
|
|
137
135
|
} else {
|
|
138
136
|
return {
|
|
139
|
-
scrolling: false
|
|
140
|
-
lastDataSize: 0
|
|
137
|
+
scrolling: false
|
|
141
138
|
};
|
|
142
139
|
}
|
|
143
140
|
});
|
|
@@ -201,11 +198,9 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
201
198
|
});
|
|
202
199
|
}
|
|
203
200
|
}
|
|
204
|
-
}, _this.renderManualPagination = function (
|
|
205
|
-
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
201
|
+
}, _this.renderManualPagination = function () {
|
|
206
202
|
var currentPage = _this.state.currentPage;
|
|
207
203
|
|
|
208
|
-
|
|
209
204
|
return React__default['default'].createElement(
|
|
210
205
|
'div',
|
|
211
206
|
{ className: 'd-flex justify-content-between' },
|
|
@@ -214,7 +209,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
214
209
|
{ href: '?page=' + (currentPage - 1) },
|
|
215
210
|
'<< Previous'
|
|
216
211
|
),
|
|
217
|
-
|
|
212
|
+
React__default['default'].createElement(
|
|
218
213
|
'a',
|
|
219
214
|
{ href: '?page=' + (currentPage + 1) },
|
|
220
215
|
'Next >>'
|
|
@@ -273,11 +268,8 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
273
268
|
value: function render() {
|
|
274
269
|
var _this2 = this;
|
|
275
270
|
|
|
276
|
-
var _props = this.props,
|
|
277
|
-
_props$autoScroll
|
|
278
|
-
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll,
|
|
279
|
-
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
280
|
-
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
271
|
+
var _props$autoScroll = this.props.autoScroll,
|
|
272
|
+
autoScroll = _props$autoScroll === undefined ? true : _props$autoScroll;
|
|
281
273
|
|
|
282
274
|
|
|
283
275
|
if (autoScroll) {
|
|
@@ -316,7 +308,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
316
308
|
React__default['default'].createElement(
|
|
317
309
|
'noscript',
|
|
318
310
|
null,
|
|
319
|
-
this.renderManualPagination(
|
|
311
|
+
this.renderManualPagination()
|
|
320
312
|
)
|
|
321
313
|
)
|
|
322
314
|
) : React__default['default'].createElement(
|
|
@@ -393,7 +385,7 @@ var VideoSeriesListing = function (_React$Component) {
|
|
|
393
385
|
React__default['default'].createElement(
|
|
394
386
|
'noscript',
|
|
395
387
|
null,
|
|
396
|
-
_this2.renderManualPagination(
|
|
388
|
+
_this2.renderManualPagination()
|
|
397
389
|
)
|
|
398
390
|
);
|
|
399
391
|
})
|