@mjhls/mjh-framework 1.0.944 → 1.0.945-nojs-pagination-v1
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 +131 -15
- package/dist/cjs/ArticleProgramLandingPage.js +2 -1
- package/dist/cjs/ArticleSeriesLandingPage.js +2 -1
- package/dist/cjs/AuthWrapper.js +1 -1
- package/dist/cjs/ConferenceArticleCard.js +15 -15
- package/dist/cjs/ContentCardPaginated.js +1 -2
- package/dist/cjs/DeckContent.js +30 -17
- package/dist/cjs/DeckQueue.js +29 -11
- package/dist/cjs/DeckQueuePaginated.js +1 -2
- package/dist/cjs/EventsDeck.js +17 -17
- package/dist/cjs/GridContent.js +26 -11
- package/dist/cjs/GridContentPaginated.js +1 -2
- 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 +17 -18
- package/dist/cjs/MasterDeckPaginated.js +9 -10
- package/dist/cjs/{MediaSeriesCard-acb4581d.js → MediaSeriesCard-543e905f.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +8 -7
- 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-42f92f7c.js +97 -0
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -2
- package/dist/cjs/PublicationLanding.js +26 -26
- package/dist/cjs/QueueDeckExpanded.js +3 -5
- package/dist/cjs/QueueDeckExpandedPaginated.js +1 -2
- 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-ba0c5d1a.js → SeriesSlider-de93a303.js} +4 -4
- package/dist/cjs/SideFooter.js +2 -2
- package/dist/cjs/VideoProgramLandingPage.js +2 -1
- package/dist/cjs/VideoSeriesCard.js +1 -1
- package/dist/cjs/VideoSeriesListing.js +17 -9
- package/dist/cjs/View.js +12 -8
- package/dist/cjs/YoutubeGroup.js +4 -4
- package/dist/cjs/{getTargeting-3c5754ac.js → getTargeting-dab97fe1.js} +9 -9
- package/dist/cjs/getTargeting.js +1 -1
- package/dist/cjs/index.js +2 -3
- package/dist/esm/AlgoliaSearch.js +132 -16
- package/dist/esm/ArticleProgramLandingPage.js +2 -1
- package/dist/esm/ArticleSeriesLandingPage.js +2 -1
- package/dist/esm/AuthWrapper.js +1 -1
- package/dist/esm/ConferenceArticleCard.js +15 -15
- package/dist/esm/ContentCardPaginated.js +1 -2
- package/dist/esm/DeckContent.js +30 -17
- package/dist/esm/DeckQueue.js +29 -11
- package/dist/esm/DeckQueuePaginated.js +1 -2
- package/dist/esm/EventsDeck.js +17 -17
- package/dist/esm/GridContent.js +26 -11
- package/dist/esm/GridContentPaginated.js +1 -2
- 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 +17 -18
- package/dist/esm/MasterDeckPaginated.js +9 -10
- package/dist/esm/{MediaSeriesCard-227aea3c.js → MediaSeriesCard-a525d485.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +8 -7
- 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-484b86c5.js +90 -0
- package/dist/esm/PartnerDetailListingPaginated.js +1 -2
- package/dist/esm/PublicationLanding.js +26 -26
- package/dist/esm/QueueDeckExpanded.js +3 -5
- package/dist/esm/QueueDeckExpandedPaginated.js +1 -2
- 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-45adb8dc.js → SeriesSlider-98ad6d97.js} +4 -4
- package/dist/esm/SideFooter.js +2 -2
- package/dist/esm/VideoProgramLandingPage.js +2 -1
- package/dist/esm/VideoSeriesCard.js +1 -1
- package/dist/esm/VideoSeriesListing.js +17 -9
- package/dist/esm/View.js +12 -7
- package/dist/esm/YoutubeGroup.js +4 -4
- package/dist/esm/{getTargeting-42f9b439.js → getTargeting-04d979c9.js} +9 -9
- package/dist/esm/getTargeting.js +1 -1
- package/dist/esm/index.js +2 -3
- package/package.json +115 -115
- package/dist/cjs/Pagination-885dcfbd.js +0 -90
- package/dist/esm/Pagination-59436882.js +0 -82
|
@@ -135,7 +135,8 @@ ArticleProgramLandingPage.getInitialData = function () {
|
|
|
135
135
|
start = (currentPage - 1) * itemsPerPage;
|
|
136
136
|
params = {
|
|
137
137
|
from: start,
|
|
138
|
-
to: start + itemsPerPage
|
|
138
|
+
to: start + itemsPerPage,
|
|
139
|
+
itemsPerPage: itemsPerPage
|
|
139
140
|
};
|
|
140
141
|
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n \'pageNumber\': ' + currentPage + '\n }';
|
|
141
142
|
postsPromise = client.fetch(query, params);
|
|
@@ -112,7 +112,8 @@ ArticleSeriesLandingPage.getInitialData = function () {
|
|
|
112
112
|
start = (currentPage - 1) * itemsPerPage;
|
|
113
113
|
params = {
|
|
114
114
|
from: start,
|
|
115
|
-
to: start + itemsPerPage
|
|
115
|
+
to: start + itemsPerPage,
|
|
116
|
+
itemsPerPage: itemsPerPage
|
|
116
117
|
};
|
|
117
118
|
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && url.current == \'' + seriesName + '\'\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n summary,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n }';
|
|
118
119
|
_context.next = 9;
|
package/dist/esm/AuthWrapper.js
CHANGED
|
@@ -1761,7 +1761,7 @@ client$1.Provider;
|
|
|
1761
1761
|
|
|
1762
1762
|
var client = client$1.default;
|
|
1763
1763
|
|
|
1764
|
-
var css = ".AuthWrapper-module_loginBox__3l-BE {\n margin-bottom: 2rem;\n width: 350px;\n max-width: 90vw;\n margin-left: auto;\n margin-right: auto;\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\n background: #fff;\n z-index: 1;\n}\n.AuthWrapper-module_loginBox_title__12rGD {\n margin-bottom: 2rem;\n text-align: center;\n}\n.AuthWrapper-module_bar__1dafn {\n background: #eee;\n margin-left: unset;\n margin-right: unset;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\n float: left;\n border-right: 1rem solid #fff;\n background: rgb(245, 245, 245);\n height: 10rem;\n width: 25%;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 2rem;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\n width: 97%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\n width: 96%;\n height: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\n width: 72%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\n width: 88%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n\n.AuthWrapper-module_iframe__2wDJW {\n margin-top: -3rem;\n border: none;\n width: 100%;\n height: 1900px;\n}";
|
|
1764
|
+
var css = ".AuthWrapper-module_loginBox__3l-BE {\r\n margin-bottom: 2rem;\r\n width: 350px;\r\n max-width: 90vw;\r\n margin-left: auto;\r\n margin-right: auto;\r\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\r\n background: #fff;\r\n z-index: 1;\r\n}\r\n.AuthWrapper-module_loginBox_title__12rGD {\r\n margin-bottom: 2rem;\r\n text-align: center;\r\n}\r\n.AuthWrapper-module_bar__1dafn {\r\n background: #eee;\r\n margin-left: unset;\r\n margin-right: unset;\r\n}\r\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\r\n float: left;\r\n border-right: 1rem solid #fff;\r\n background: rgb(245, 245, 245);\r\n height: 10rem;\r\n width: 25%;\r\n margin-left: auto;\r\n margin-right: auto;\r\n margin-bottom: 2rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\r\n width: 97%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\r\n width: 96%;\r\n height: 1.5rem;\r\n margin-bottom: 1.5rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\r\n width: 72%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\r\n width: 88%;\r\n height: 1.5rem;\r\n margin-bottom: 0.25rem;\r\n}\r\n\r\n.AuthWrapper-module_iframe__2wDJW {\r\n margin-top: -3rem;\r\n border: none;\r\n width: 100%;\r\n height: 1900px;\r\n}";
|
|
1765
1765
|
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn", "iframe": "AuthWrapper-module_iframe__2wDJW" };
|
|
1766
1766
|
styleInject(css);
|
|
1767
1767
|
|
|
@@ -7,21 +7,21 @@ import './web.dom.iterable-ab4dea5c.js';
|
|
|
7
7
|
import './core.get-iterator-method-ea258bb1.js';
|
|
8
8
|
import './index-3f5c03b2.js';
|
|
9
9
|
|
|
10
|
-
/*
|
|
11
|
-
Example usage - targetedonc.com/latest-conference
|
|
12
|
-
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
13
|
-
...,
|
|
14
|
-
title,
|
|
15
|
-
summary,
|
|
16
|
-
thumbnail,
|
|
17
|
-
url,
|
|
18
|
-
published,
|
|
19
|
-
documentGroup->,
|
|
20
|
-
contentCategory->,
|
|
21
|
-
'pageNumber': ${currentPage}
|
|
22
|
-
}`
|
|
23
|
-
|
|
24
|
-
const posts = await client.fetch(query, params)
|
|
10
|
+
/*
|
|
11
|
+
Example usage - targetedonc.com/latest-conference
|
|
12
|
+
const query = `*[!(_id in path("drafts.**")) && _type == "article" && defined(title) && is_visible == true && published <= '${today}' && references('b49d36b8-aa56-4183-a2bc-1568c229fb72') ] | order(published desc) [$from...$to] {
|
|
13
|
+
...,
|
|
14
|
+
title,
|
|
15
|
+
summary,
|
|
16
|
+
thumbnail,
|
|
17
|
+
url,
|
|
18
|
+
published,
|
|
19
|
+
documentGroup->,
|
|
20
|
+
contentCategory->,
|
|
21
|
+
'pageNumber': ${currentPage}
|
|
22
|
+
}`
|
|
23
|
+
|
|
24
|
+
const posts = await client.fetch(query, params)
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
27
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -15,7 +15,7 @@ import { L as LazyLoad } from './index-755f2cc2.js';
|
|
|
15
15
|
import { m as main_43 } from './main-1894c974.js';
|
|
16
16
|
import { c as clean_html_1 } from './entities-6d9154b4.js';
|
|
17
17
|
import { A as ADInfeed } from './ADInfeed-7af1f934.js';
|
|
18
|
-
import { P as Pagination } from './Pagination-
|
|
18
|
+
import { P as Pagination } from './Pagination-484b86c5.js';
|
|
19
19
|
import Spinner from 'react-bootstrap/Spinner';
|
|
20
20
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
21
21
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -39,7 +39,6 @@ import './toNumber-5aeba6e7.js';
|
|
|
39
39
|
import './Beam.js';
|
|
40
40
|
import './stringify-2b084bee.js';
|
|
41
41
|
import './Segment.js';
|
|
42
|
-
import 'react-paginate';
|
|
43
42
|
import 'react-bootstrap/Button';
|
|
44
43
|
import './index.esm-1bd8a0a8.js';
|
|
45
44
|
import './iconBase-ccc56b97.js';
|
package/dist/esm/DeckContent.js
CHANGED
|
@@ -64,7 +64,9 @@ var DeckContent = function (_React$Component) {
|
|
|
64
64
|
total_pages: null,
|
|
65
65
|
scrolling: true,
|
|
66
66
|
query: _this.query,
|
|
67
|
-
currentPage: _this.props.currentPage || 1
|
|
67
|
+
currentPage: _this.props.currentPage || 1,
|
|
68
|
+
lastDataSize: _this.data ? _this.data.length : 0,
|
|
69
|
+
itemsPerPage: _this.params.itemsPerPage || 3
|
|
68
70
|
}, _this.loadMore = debounce_1(function () {
|
|
69
71
|
_this.setState(function (state) {
|
|
70
72
|
var page = state.page,
|
|
@@ -106,18 +108,26 @@ var DeckContent = function (_React$Component) {
|
|
|
106
108
|
if (dataArr.length > 0) {
|
|
107
109
|
return {
|
|
108
110
|
data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
|
|
109
|
-
scrolling: true
|
|
111
|
+
scrolling: true,
|
|
112
|
+
lastDataSize: dataArr.length
|
|
110
113
|
};
|
|
111
114
|
} else {
|
|
112
115
|
return {
|
|
113
|
-
scrolling: false
|
|
116
|
+
scrolling: false,
|
|
117
|
+
lastDataSize: 0
|
|
114
118
|
};
|
|
115
119
|
}
|
|
116
120
|
});
|
|
117
121
|
});
|
|
118
122
|
}, _this.renderCardImage = function (row, page) {
|
|
119
123
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
120
|
-
var url = urlFor({
|
|
124
|
+
var url = urlFor({
|
|
125
|
+
client: _this.client,
|
|
126
|
+
source: row.thumbnail,
|
|
127
|
+
imageHeight: _this.props.imageHeight || null,
|
|
128
|
+
imageWidth: _this.props.imageWidth || null,
|
|
129
|
+
imageFit: _this.props.imageFit || null
|
|
130
|
+
});
|
|
121
131
|
return url;
|
|
122
132
|
} else {
|
|
123
133
|
return _this.defaultImage;
|
|
@@ -172,14 +182,14 @@ var DeckContent = function (_React$Component) {
|
|
|
172
182
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
173
183
|
|
|
174
184
|
// please leave this for later debug purpose : Yong Jun.
|
|
175
|
-
/* console.log('page change reported', {
|
|
176
|
-
currentPage: currentPage,
|
|
177
|
-
pageNumber: pageNumber,
|
|
178
|
-
pathname: pathname,
|
|
179
|
-
path: path,
|
|
180
|
-
newPath: newPath,
|
|
181
|
-
firstPage: pageNumber === 1,
|
|
182
|
-
queryString: queryString
|
|
185
|
+
/* console.log('page change reported', {
|
|
186
|
+
currentPage: currentPage,
|
|
187
|
+
pageNumber: pageNumber,
|
|
188
|
+
pathname: pathname,
|
|
189
|
+
path: path,
|
|
190
|
+
newPath: newPath,
|
|
191
|
+
firstPage: pageNumber === 1,
|
|
192
|
+
queryString: queryString
|
|
183
193
|
}) */
|
|
184
194
|
|
|
185
195
|
if (pageview) {
|
|
@@ -360,7 +370,8 @@ var DeckContent = function (_React$Component) {
|
|
|
360
370
|
{ md: 12, style: { display: 'flex', flex: '1 0 auto' } },
|
|
361
371
|
rightItems[i].component
|
|
362
372
|
);
|
|
363
|
-
}, _this.renderManualPagination = function () {
|
|
373
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
374
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
364
375
|
var currentPage = _this.state.currentPage;
|
|
365
376
|
|
|
366
377
|
return React__default.createElement(
|
|
@@ -371,7 +382,7 @@ var DeckContent = function (_React$Component) {
|
|
|
371
382
|
{ href: '?page=' + (currentPage - 1) },
|
|
372
383
|
'<< Previous'
|
|
373
384
|
),
|
|
374
|
-
React__default.createElement(
|
|
385
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
|
|
375
386
|
'a',
|
|
376
387
|
{ href: '?page=' + (currentPage + 1) },
|
|
377
388
|
'Next >>'
|
|
@@ -415,7 +426,9 @@ var DeckContent = function (_React$Component) {
|
|
|
415
426
|
page = _props.page,
|
|
416
427
|
showBI = _props.showBI,
|
|
417
428
|
brandInsight = _props.brandInsight,
|
|
418
|
-
biStart = _props.biStart
|
|
429
|
+
biStart = _props.biStart,
|
|
430
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
431
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
419
432
|
|
|
420
433
|
|
|
421
434
|
return React__default.createElement(
|
|
@@ -436,7 +449,7 @@ var DeckContent = function (_React$Component) {
|
|
|
436
449
|
React__default.createElement(
|
|
437
450
|
'noscript',
|
|
438
451
|
null,
|
|
439
|
-
this.renderManualPagination()
|
|
452
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
440
453
|
)
|
|
441
454
|
) : React__default.createElement(
|
|
442
455
|
React__default.Fragment,
|
|
@@ -470,7 +483,7 @@ var DeckContent = function (_React$Component) {
|
|
|
470
483
|
React__default.createElement(
|
|
471
484
|
'noscript',
|
|
472
485
|
null,
|
|
473
|
-
this.renderManualPagination()
|
|
486
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
474
487
|
)
|
|
475
488
|
)
|
|
476
489
|
);
|
package/dist/esm/DeckQueue.js
CHANGED
|
@@ -59,7 +59,8 @@ var DeckQueue = function (_React$Component) {
|
|
|
59
59
|
total_pages: null,
|
|
60
60
|
scrolling: true,
|
|
61
61
|
query: _this.query,
|
|
62
|
-
currentPage: _this.props.currentPage || 1
|
|
62
|
+
currentPage: _this.props.currentPage || 1,
|
|
63
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
63
64
|
}, _this.loadMore = debounce_1(function () {
|
|
64
65
|
_this.setState(function (state) {
|
|
65
66
|
var page = state.page,
|
|
@@ -99,11 +100,13 @@ var DeckQueue = function (_React$Component) {
|
|
|
99
100
|
if (dataArr.length > 0) {
|
|
100
101
|
return {
|
|
101
102
|
data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
|
|
103
|
+
lastDataSize: dataArr.length,
|
|
102
104
|
scrolling: true
|
|
103
105
|
};
|
|
104
106
|
} else {
|
|
105
107
|
return {
|
|
106
|
-
scrolling: false
|
|
108
|
+
scrolling: false,
|
|
109
|
+
lastDataSize: 0
|
|
107
110
|
};
|
|
108
111
|
}
|
|
109
112
|
});
|
|
@@ -189,8 +192,12 @@ var DeckQueue = function (_React$Component) {
|
|
|
189
192
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
190
193
|
rightItems[i].component
|
|
191
194
|
);
|
|
192
|
-
}, _this.renderManualPagination = function () {
|
|
193
|
-
var
|
|
195
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
196
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
197
|
+
var _this$state2 = _this.state,
|
|
198
|
+
currentPage = _this$state2.currentPage,
|
|
199
|
+
per = _this$state2.per,
|
|
200
|
+
lastDataSize = _this$state2.lastDataSize;
|
|
194
201
|
|
|
195
202
|
return React__default.createElement(
|
|
196
203
|
'div',
|
|
@@ -200,7 +207,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
200
207
|
{ href: '?page=' + (currentPage - 1) },
|
|
201
208
|
'<< Previous'
|
|
202
209
|
),
|
|
203
|
-
React__default.createElement(
|
|
210
|
+
!(lastDataSize < per) && nextPagePostsCount > 0 && React__default.createElement(
|
|
204
211
|
'a',
|
|
205
212
|
{ href: '?page=' + (currentPage + 1) },
|
|
206
213
|
'Next >>'
|
|
@@ -315,19 +322,30 @@ var DeckQueue = function (_React$Component) {
|
|
|
315
322
|
columns = _props.columns,
|
|
316
323
|
variant = _props.variant,
|
|
317
324
|
autoScroll = _props.autoScroll,
|
|
318
|
-
page = _props.page
|
|
325
|
+
page = _props.page,
|
|
326
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
327
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
319
328
|
|
|
320
329
|
|
|
321
330
|
return React__default.createElement(
|
|
322
331
|
'div',
|
|
323
332
|
{ className: 'contentDeck' },
|
|
324
333
|
autoScroll ? React__default.createElement(
|
|
325
|
-
|
|
326
|
-
|
|
334
|
+
React__default.Fragment,
|
|
335
|
+
null,
|
|
327
336
|
React__default.createElement(
|
|
328
|
-
|
|
337
|
+
InfiniteScroll,
|
|
338
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling },
|
|
339
|
+
React__default.createElement(
|
|
340
|
+
Container,
|
|
341
|
+
null,
|
|
342
|
+
this.cardLoader(page, columns, variant)
|
|
343
|
+
)
|
|
344
|
+
),
|
|
345
|
+
React__default.createElement(
|
|
346
|
+
'noscript',
|
|
329
347
|
null,
|
|
330
|
-
this.
|
|
348
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
331
349
|
)
|
|
332
350
|
) : React__default.createElement(
|
|
333
351
|
React__default.Fragment,
|
|
@@ -361,7 +379,7 @@ var DeckQueue = function (_React$Component) {
|
|
|
361
379
|
React__default.createElement(
|
|
362
380
|
'noscript',
|
|
363
381
|
null,
|
|
364
|
-
this.renderManualPagination()
|
|
382
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
365
383
|
)
|
|
366
384
|
)
|
|
367
385
|
);
|
|
@@ -16,7 +16,7 @@ import { g as get_1 } from './get-3c308da4.js';
|
|
|
16
16
|
import { m as main_43 } from './main-1894c974.js';
|
|
17
17
|
import urlFor from './urlFor.js';
|
|
18
18
|
import { c as clean_html_1 } from './entities-6d9154b4.js';
|
|
19
|
-
import { P as Pagination } from './Pagination-
|
|
19
|
+
import { P as Pagination } from './Pagination-484b86c5.js';
|
|
20
20
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
21
21
|
import './core.get-iterator-method-ea258bb1.js';
|
|
22
22
|
import './web.dom.iterable-ab4dea5c.js';
|
|
@@ -34,7 +34,6 @@ import './isSymbol-a7e9aafe.js';
|
|
|
34
34
|
import './eq-bdcbf886.js';
|
|
35
35
|
import './slicedToArray-6ebcbfea.js';
|
|
36
36
|
import './index-3f5c03b2.js';
|
|
37
|
-
import 'react-paginate';
|
|
38
37
|
import 'react-bootstrap/Button';
|
|
39
38
|
import './index.esm-1bd8a0a8.js';
|
|
40
39
|
import './iconBase-ccc56b97.js';
|
package/dist/esm/EventsDeck.js
CHANGED
|
@@ -243,23 +243,23 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
243
243
|
if (cventAccessToken && cventAccessToken !== 'undefined') {
|
|
244
244
|
setAccessToken(cventAccessToken);
|
|
245
245
|
} else {
|
|
246
|
-
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
247
|
-
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
248
|
-
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
249
|
-
fetch(url, {
|
|
250
|
-
headers: {
|
|
251
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
252
|
-
Authorization: `Basic ${encodedData}`
|
|
253
|
-
},
|
|
254
|
-
method: 'POST',
|
|
255
|
-
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
256
|
-
})
|
|
257
|
-
.then((response) => response.json())
|
|
258
|
-
.then((json) => {
|
|
259
|
-
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
260
|
-
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
261
|
-
setAccessToken(json.access_token)
|
|
262
|
-
})
|
|
246
|
+
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
247
|
+
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
248
|
+
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
249
|
+
fetch(url, {
|
|
250
|
+
headers: {
|
|
251
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
252
|
+
Authorization: `Basic ${encodedData}`
|
|
253
|
+
},
|
|
254
|
+
method: 'POST',
|
|
255
|
+
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
256
|
+
})
|
|
257
|
+
.then((response) => response.json())
|
|
258
|
+
.then((json) => {
|
|
259
|
+
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
260
|
+
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
261
|
+
setAccessToken(json.access_token)
|
|
262
|
+
})
|
|
263
263
|
.catch((e) => console.log(e))*/
|
|
264
264
|
// hello
|
|
265
265
|
var url = 'https://beam.mjhlifesciences.com/api/cvent/token';
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -75,7 +75,8 @@ var GridContent = function (_React$Component) {
|
|
|
75
75
|
currentPage: _this.props.currentPage || 1,
|
|
76
76
|
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
|
|
77
77
|
showCategory: _this.props.showCategory ? _this.props.showCategory : false,
|
|
78
|
-
contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : []
|
|
78
|
+
contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : [],
|
|
79
|
+
lastDataSize: _this.data ? _this.data.length : 0
|
|
79
80
|
}, _this.loadMore = debounce_1(function () {
|
|
80
81
|
_this.setState(function (state) {
|
|
81
82
|
var page = state.page,
|
|
@@ -130,11 +131,13 @@ var GridContent = function (_React$Component) {
|
|
|
130
131
|
if (dataArr.length > 0) {
|
|
131
132
|
return {
|
|
132
133
|
data: [].concat(_toConsumableArray(data), _toConsumableArray(dataArr)),
|
|
133
|
-
scrolling: true
|
|
134
|
+
scrolling: true,
|
|
135
|
+
lastDataSize: dataArr.length
|
|
134
136
|
};
|
|
135
137
|
} else {
|
|
136
138
|
return {
|
|
137
|
-
scrolling: false
|
|
139
|
+
scrolling: false,
|
|
140
|
+
lastDataSize: 0
|
|
138
141
|
};
|
|
139
142
|
}
|
|
140
143
|
});
|
|
@@ -226,7 +229,8 @@ var GridContent = function (_React$Component) {
|
|
|
226
229
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
227
230
|
rightItems[i].component
|
|
228
231
|
);
|
|
229
|
-
}, _this.renderManualPagination = function () {
|
|
232
|
+
}, _this.renderManualPagination = function (_ref2) {
|
|
233
|
+
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
230
234
|
var currentPage = _this.state.currentPage;
|
|
231
235
|
|
|
232
236
|
return React__default.createElement(
|
|
@@ -237,7 +241,7 @@ var GridContent = function (_React$Component) {
|
|
|
237
241
|
{ href: '?page=' + (currentPage - 1) },
|
|
238
242
|
'<< Previous'
|
|
239
243
|
),
|
|
240
|
-
React__default.createElement(
|
|
244
|
+
!(_this.state.lastDataSize < _this.state.itemsPerPage) && nextPagePostsCount > 0 && React__default.createElement(
|
|
241
245
|
'a',
|
|
242
246
|
{ href: '?page=' + (currentPage + 1) },
|
|
243
247
|
'Next >>'
|
|
@@ -729,19 +733,30 @@ var GridContent = function (_React$Component) {
|
|
|
729
733
|
showVideo = _props.showVideo,
|
|
730
734
|
VideoPlayer = _props.VideoPlayer,
|
|
731
735
|
showBI = _props.showBI,
|
|
732
|
-
brandInsight = _props.brandInsight
|
|
736
|
+
brandInsight = _props.brandInsight,
|
|
737
|
+
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
738
|
+
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
733
739
|
|
|
734
740
|
|
|
735
741
|
return React__default.createElement(
|
|
736
742
|
'div',
|
|
737
743
|
{ className: 'contentDeck' },
|
|
738
744
|
autoScroll ? React__default.createElement(
|
|
739
|
-
|
|
740
|
-
|
|
745
|
+
React__default.Fragment,
|
|
746
|
+
null,
|
|
741
747
|
React__default.createElement(
|
|
742
|
-
|
|
748
|
+
InfiniteScroll,
|
|
749
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
|
|
750
|
+
React__default.createElement(
|
|
751
|
+
Container,
|
|
752
|
+
null,
|
|
753
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd, this.state.contentCategoryMapping)
|
|
754
|
+
)
|
|
755
|
+
),
|
|
756
|
+
React__default.createElement(
|
|
757
|
+
'noscript',
|
|
743
758
|
null,
|
|
744
|
-
this.
|
|
759
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
745
760
|
)
|
|
746
761
|
) : React__default.createElement(
|
|
747
762
|
React__default.Fragment,
|
|
@@ -775,7 +790,7 @@ var GridContent = function (_React$Component) {
|
|
|
775
790
|
React__default.createElement(
|
|
776
791
|
'noscript',
|
|
777
792
|
null,
|
|
778
|
-
this.renderManualPagination()
|
|
793
|
+
this.renderManualPagination({ nextPagePostsCount: nextPagePostsCount })
|
|
779
794
|
)
|
|
780
795
|
)
|
|
781
796
|
);
|
|
@@ -22,7 +22,7 @@ import urlFor from './urlFor.js';
|
|
|
22
22
|
import { m as main_43 } from './main-1894c974.js';
|
|
23
23
|
import { A as AuthorComponent } from './AuthorComponent-11adff02.js';
|
|
24
24
|
import { P as PublicationFeature } from './PublicationFeature-d88e76b9.js';
|
|
25
|
-
import { P as Pagination } from './Pagination-
|
|
25
|
+
import { P as Pagination } from './Pagination-484b86c5.js';
|
|
26
26
|
import Spinner from 'react-bootstrap/Spinner';
|
|
27
27
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
28
28
|
import './core.get-iterator-method-ea258bb1.js';
|
|
@@ -47,7 +47,6 @@ import './Segment.js';
|
|
|
47
47
|
import './eq-bdcbf886.js';
|
|
48
48
|
import './index-3f5c03b2.js';
|
|
49
49
|
import 'react-bootstrap/Button';
|
|
50
|
-
import 'react-paginate';
|
|
51
50
|
import './index.esm-1bd8a0a8.js';
|
|
52
51
|
import './iconBase-ccc56b97.js';
|
|
53
52
|
|
package/dist/esm/HamMagazine.js
CHANGED
|
@@ -26,15 +26,15 @@ import './_library-528f1934.js';
|
|
|
26
26
|
import './_iter-detect-98db3b07.js';
|
|
27
27
|
|
|
28
28
|
var HamMagazine = function HamMagazine(props) {
|
|
29
|
-
/*
|
|
30
|
-
Example Nav with acceptable props
|
|
31
|
-
<MagazineNav
|
|
32
|
-
showLogin
|
|
33
|
-
logo={props.settings.logo}
|
|
34
|
-
dataObject={props.cache.mainNavCache}
|
|
35
|
-
website={website}
|
|
36
|
-
subNav={props.cache.subNavCache}
|
|
37
|
-
/>
|
|
29
|
+
/*
|
|
30
|
+
Example Nav with acceptable props
|
|
31
|
+
<MagazineNav
|
|
32
|
+
showLogin
|
|
33
|
+
logo={props.settings.logo}
|
|
34
|
+
dataObject={props.cache.mainNavCache}
|
|
35
|
+
website={website}
|
|
36
|
+
subNav={props.cache.subNavCache}
|
|
37
|
+
/>
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
40
|
// Setting 'socialIconVariant' as 'light' as default to make the social icons and search icon black
|
package/dist/esm/IssueLanding.js
CHANGED
|
@@ -70,35 +70,35 @@ import 'react-bootstrap/OverlayTrigger';
|
|
|
70
70
|
import 'react-bootstrap/Tooltip';
|
|
71
71
|
import 'react-bootstrap/Popover';
|
|
72
72
|
|
|
73
|
-
/* usage
|
|
74
|
-
import Settings, { Ads } from '../../../../settings'
|
|
75
|
-
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
76
|
-
import client from '../../../../client'
|
|
77
|
-
import moment from 'moment'
|
|
78
|
-
import Shell from '../../../../components/2.0/Shell'
|
|
79
|
-
import { pageview } from '../../../../utilities/gtag'
|
|
80
|
-
|
|
81
|
-
const Issue = (props) => {
|
|
82
|
-
const { pubIssue, cache } = props
|
|
83
|
-
const targeting = {
|
|
84
|
-
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
85
|
-
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
86
|
-
}
|
|
87
|
-
return (
|
|
88
|
-
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
89
|
-
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
90
|
-
</Shell>
|
|
91
|
-
)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
Issue.getInitialProps = async (ctx) => {
|
|
95
|
-
const { query } = ctx
|
|
96
|
-
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
97
|
-
)
|
|
98
|
-
return { pubIssue }
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
export default Issue
|
|
73
|
+
/* usage
|
|
74
|
+
import Settings, { Ads } from '../../../../settings'
|
|
75
|
+
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
76
|
+
import client from '../../../../client'
|
|
77
|
+
import moment from 'moment'
|
|
78
|
+
import Shell from '../../../../components/2.0/Shell'
|
|
79
|
+
import { pageview } from '../../../../utilities/gtag'
|
|
80
|
+
|
|
81
|
+
const Issue = (props) => {
|
|
82
|
+
const { pubIssue, cache } = props
|
|
83
|
+
const targeting = {
|
|
84
|
+
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
85
|
+
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
86
|
+
}
|
|
87
|
+
return (
|
|
88
|
+
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
89
|
+
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
90
|
+
</Shell>
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
Issue.getInitialProps = async (ctx) => {
|
|
95
|
+
const { query } = ctx
|
|
96
|
+
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
97
|
+
)
|
|
98
|
+
return { pubIssue }
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export default Issue
|
|
102
102
|
*/
|
|
103
103
|
|
|
104
104
|
var IssueLanding = function IssueLanding(props) {
|
package/dist/esm/KMTracker.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
var KMTracker = function KMTracker(props) {
|
|
2
|
-
|
|
2
|
+
var id = props.id;
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
if (document && id) {
|
|
5
5
|
(function () {
|
|
6
|
-
|
|
6
|
+
var ecnJquery = document.createElement('script');
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
ecnJquery.type = 'text/javascript';
|
|
9
|
+
ecnJquery.async = true;
|
|
10
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
var ecnScript = document.createElement('script');
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
ecnScript.type = 'text/javascript';
|
|
15
|
+
ecnScript.async = true;
|
|
16
|
+
ecnScript.id = 'km-tracker';
|
|
17
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
document.head.appendChild(ecnJquery);
|
|
20
|
+
document.head.appendChild(ecnScript);
|
|
21
|
+
})();
|
|
22
|
+
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
export default KMTracker;
|