@mjhls/mjh-framework 1.0.939-nojs-pagination-v5 → 1.0.939-segment-test
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 +63 -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 +62 -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
|
@@ -141,8 +141,7 @@ ArticleProgramLandingPage.getInitialData = function () {
|
|
|
141
141
|
start = (currentPage - 1) * itemsPerPage;
|
|
142
142
|
params = {
|
|
143
143
|
from: start,
|
|
144
|
-
to: start + itemsPerPage
|
|
145
|
-
itemsPerPage: itemsPerPage
|
|
144
|
+
to: start + itemsPerPage
|
|
146
145
|
};
|
|
147
146
|
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 }';
|
|
148
147
|
postsPromise = client.fetch(query, params);
|
|
@@ -118,8 +118,7 @@ ArticleSeriesLandingPage.getInitialData = function () {
|
|
|
118
118
|
start = (currentPage - 1) * itemsPerPage;
|
|
119
119
|
params = {
|
|
120
120
|
from: start,
|
|
121
|
-
to: start + itemsPerPage
|
|
122
|
-
itemsPerPage: itemsPerPage
|
|
121
|
+
to: start + itemsPerPage
|
|
123
122
|
};
|
|
124
123
|
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 }';
|
|
125
124
|
_context.next = 9;
|
package/dist/cjs/AuthWrapper.js
CHANGED
|
@@ -1767,7 +1767,7 @@ client$1.Provider;
|
|
|
1767
1767
|
|
|
1768
1768
|
var client = client$1.default;
|
|
1769
1769
|
|
|
1770
|
-
var css = ".AuthWrapper-module_loginBox__3l-BE {\
|
|
1770
|
+
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}";
|
|
1771
1771
|
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" };
|
|
1772
1772
|
styleInject_es.styleInject(css);
|
|
1773
1773
|
|
|
@@ -13,21 +13,21 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
Example usage - targetedonc.com/latest-conference
|
|
18
|
-
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] {
|
|
19
|
-
...,
|
|
20
|
-
title,
|
|
21
|
-
summary,
|
|
22
|
-
thumbnail,
|
|
23
|
-
url,
|
|
24
|
-
published,
|
|
25
|
-
documentGroup->,
|
|
26
|
-
contentCategory->,
|
|
27
|
-
'pageNumber': ${currentPage}
|
|
28
|
-
}`
|
|
29
|
-
|
|
30
|
-
const posts = await client.fetch(query, params)
|
|
16
|
+
/*
|
|
17
|
+
Example usage - targetedonc.com/latest-conference
|
|
18
|
+
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] {
|
|
19
|
+
...,
|
|
20
|
+
title,
|
|
21
|
+
summary,
|
|
22
|
+
thumbnail,
|
|
23
|
+
url,
|
|
24
|
+
published,
|
|
25
|
+
documentGroup->,
|
|
26
|
+
contentCategory->,
|
|
27
|
+
'pageNumber': ${currentPage}
|
|
28
|
+
}`
|
|
29
|
+
|
|
30
|
+
const posts = await client.fetch(query, params)
|
|
31
31
|
*/
|
|
32
32
|
|
|
33
33
|
var ConferenceArticleCard = function ConferenceArticleCard(props) {
|
|
@@ -17,7 +17,7 @@ var index$1 = require('./index-eadd5035.js');
|
|
|
17
17
|
var main = require('./main-f1c77adb.js');
|
|
18
18
|
var entities = require('./entities-df1aed86.js');
|
|
19
19
|
var ADInfeed = require('./ADInfeed-44d43b8a.js');
|
|
20
|
-
var Pagination = require('./Pagination-
|
|
20
|
+
var Pagination = require('./Pagination-885dcfbd.js');
|
|
21
21
|
var Spinner = require('react-bootstrap/Spinner');
|
|
22
22
|
require('./_commonjsHelpers-06173234.js');
|
|
23
23
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -41,6 +41,7 @@ require('./toNumber-5e1fac58.js');
|
|
|
41
41
|
require('./Beam.js');
|
|
42
42
|
require('./stringify-f7a37a8d.js');
|
|
43
43
|
require('./Segment.js');
|
|
44
|
+
require('react-paginate');
|
|
44
45
|
require('react-bootstrap/Button');
|
|
45
46
|
require('./index.esm-d51c9ac6.js');
|
|
46
47
|
require('./iconBase-be4097c0.js');
|
package/dist/cjs/DeckContent.js
CHANGED
|
@@ -74,9 +74,7 @@ var DeckContent = function (_React$Component) {
|
|
|
74
74
|
total_pages: null,
|
|
75
75
|
scrolling: true,
|
|
76
76
|
query: _this.query,
|
|
77
|
-
currentPage: _this.props.currentPage || 1
|
|
78
|
-
lastDataSize: _this.data ? _this.data.length : 0,
|
|
79
|
-
itemsPerPage: _this.params.itemsPerPage || 3
|
|
77
|
+
currentPage: _this.props.currentPage || 1
|
|
80
78
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
81
79
|
_this.setState(function (state) {
|
|
82
80
|
var page = state.page,
|
|
@@ -118,26 +116,18 @@ var DeckContent = function (_React$Component) {
|
|
|
118
116
|
if (dataArr.length > 0) {
|
|
119
117
|
return {
|
|
120
118
|
data: [].concat(toConsumableArray._toConsumableArray(data), toConsumableArray._toConsumableArray(dataArr)),
|
|
121
|
-
scrolling: true
|
|
122
|
-
lastDataSize: dataArr.length
|
|
119
|
+
scrolling: true
|
|
123
120
|
};
|
|
124
121
|
} else {
|
|
125
122
|
return {
|
|
126
|
-
scrolling: false
|
|
127
|
-
lastDataSize: 0
|
|
123
|
+
scrolling: false
|
|
128
124
|
};
|
|
129
125
|
}
|
|
130
126
|
});
|
|
131
127
|
});
|
|
132
128
|
}, _this.renderCardImage = function (row, page) {
|
|
133
129
|
if (row.thumbnail && row.thumbnail.asset) {
|
|
134
|
-
var url = urlFor({
|
|
135
|
-
client: _this.client,
|
|
136
|
-
source: row.thumbnail,
|
|
137
|
-
imageHeight: _this.props.imageHeight || null,
|
|
138
|
-
imageWidth: _this.props.imageWidth || null,
|
|
139
|
-
imageFit: _this.props.imageFit || null
|
|
140
|
-
});
|
|
130
|
+
var url = urlFor({ client: _this.client, source: row.thumbnail, imageHeight: _this.props.imageHeight || null, imageWidth: _this.props.imageWidth || null, imageFit: _this.props.imageFit || null });
|
|
141
131
|
return url;
|
|
142
132
|
} else {
|
|
143
133
|
return _this.defaultImage;
|
|
@@ -192,14 +182,14 @@ var DeckContent = function (_React$Component) {
|
|
|
192
182
|
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
193
183
|
|
|
194
184
|
// please leave this for later debug purpose : Yong Jun.
|
|
195
|
-
/* console.log('page change reported', {
|
|
196
|
-
currentPage: currentPage,
|
|
197
|
-
pageNumber: pageNumber,
|
|
198
|
-
pathname: pathname,
|
|
199
|
-
path: path,
|
|
200
|
-
newPath: newPath,
|
|
201
|
-
firstPage: pageNumber === 1,
|
|
202
|
-
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
|
|
203
193
|
}) */
|
|
204
194
|
|
|
205
195
|
if (pageview) {
|
|
@@ -380,8 +370,7 @@ var DeckContent = function (_React$Component) {
|
|
|
380
370
|
{ md: 12, style: { display: 'flex', flex: '1 0 auto' } },
|
|
381
371
|
rightItems[i].component
|
|
382
372
|
);
|
|
383
|
-
}, _this.renderManualPagination = function (
|
|
384
|
-
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
373
|
+
}, _this.renderManualPagination = function () {
|
|
385
374
|
var currentPage = _this.state.currentPage;
|
|
386
375
|
|
|
387
376
|
return React__default['default'].createElement(
|
|
@@ -392,7 +381,7 @@ var DeckContent = function (_React$Component) {
|
|
|
392
381
|
{ href: '?page=' + (currentPage - 1) },
|
|
393
382
|
'<< Previous'
|
|
394
383
|
),
|
|
395
|
-
|
|
384
|
+
React__default['default'].createElement(
|
|
396
385
|
'a',
|
|
397
386
|
{ href: '?page=' + (currentPage + 1) },
|
|
398
387
|
'Next >>'
|
|
@@ -436,9 +425,7 @@ var DeckContent = function (_React$Component) {
|
|
|
436
425
|
page = _props.page,
|
|
437
426
|
showBI = _props.showBI,
|
|
438
427
|
brandInsight = _props.brandInsight,
|
|
439
|
-
biStart = _props.biStart
|
|
440
|
-
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
441
|
-
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
428
|
+
biStart = _props.biStart;
|
|
442
429
|
|
|
443
430
|
|
|
444
431
|
return React__default['default'].createElement(
|
|
@@ -459,7 +446,7 @@ var DeckContent = function (_React$Component) {
|
|
|
459
446
|
React__default['default'].createElement(
|
|
460
447
|
'noscript',
|
|
461
448
|
null,
|
|
462
|
-
this.renderManualPagination(
|
|
449
|
+
this.renderManualPagination()
|
|
463
450
|
)
|
|
464
451
|
) : React__default['default'].createElement(
|
|
465
452
|
React__default['default'].Fragment,
|
|
@@ -493,7 +480,7 @@ var DeckContent = function (_React$Component) {
|
|
|
493
480
|
React__default['default'].createElement(
|
|
494
481
|
'noscript',
|
|
495
482
|
null,
|
|
496
|
-
this.renderManualPagination(
|
|
483
|
+
this.renderManualPagination()
|
|
497
484
|
)
|
|
498
485
|
)
|
|
499
486
|
);
|
|
@@ -18,7 +18,7 @@ var get = require('./get-5839e5b5.js');
|
|
|
18
18
|
var main = require('./main-f1c77adb.js');
|
|
19
19
|
var urlFor = require('./urlFor.js');
|
|
20
20
|
var entities = require('./entities-df1aed86.js');
|
|
21
|
-
var Pagination = require('./Pagination-
|
|
21
|
+
var Pagination = require('./Pagination-885dcfbd.js');
|
|
22
22
|
require('./_commonjsHelpers-06173234.js');
|
|
23
23
|
require('./core.get-iterator-method-5643aa10.js');
|
|
24
24
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -36,6 +36,7 @@ require('./isSymbol-03abbdf0.js');
|
|
|
36
36
|
require('./eq-5fc26c07.js');
|
|
37
37
|
require('./slicedToArray-067dd3bc.js');
|
|
38
38
|
require('./index-d48b231c.js');
|
|
39
|
+
require('react-paginate');
|
|
39
40
|
require('react-bootstrap/Button');
|
|
40
41
|
require('./index.esm-d51c9ac6.js');
|
|
41
42
|
require('./iconBase-be4097c0.js');
|
package/dist/cjs/EventsDeck.js
CHANGED
|
@@ -256,23 +256,23 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
256
256
|
if (cventAccessToken && cventAccessToken !== 'undefined') {
|
|
257
257
|
setAccessToken(cventAccessToken);
|
|
258
258
|
} else {
|
|
259
|
-
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
260
|
-
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
261
|
-
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
262
|
-
fetch(url, {
|
|
263
|
-
headers: {
|
|
264
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
265
|
-
Authorization: `Basic ${encodedData}`
|
|
266
|
-
},
|
|
267
|
-
method: 'POST',
|
|
268
|
-
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
269
|
-
})
|
|
270
|
-
.then((response) => response.json())
|
|
271
|
-
.then((json) => {
|
|
272
|
-
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
273
|
-
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
274
|
-
setAccessToken(json.access_token)
|
|
275
|
-
})
|
|
259
|
+
/*const encodedData = window.btoa(clientId + ':' + clientSecret)
|
|
260
|
+
//const url = `${corsProxy}https://api-platform.cvent.com/ea/oauth2/token`
|
|
261
|
+
const url = `https://api-platform.cvent.com/ea/oauth2/token`
|
|
262
|
+
fetch(url, {
|
|
263
|
+
headers: {
|
|
264
|
+
'Content-Type': 'application/x-www-form-urlencoded',
|
|
265
|
+
Authorization: `Basic ${encodedData}`
|
|
266
|
+
},
|
|
267
|
+
method: 'POST',
|
|
268
|
+
body: `grant_type=client_credentials&client_id=${clientId}`
|
|
269
|
+
})
|
|
270
|
+
.then((response) => response.json())
|
|
271
|
+
.then((json) => {
|
|
272
|
+
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000)
|
|
273
|
+
Cookies.set('cvent_access_token', json.access_token, { expires: inOneHour })
|
|
274
|
+
setAccessToken(json.access_token)
|
|
275
|
+
})
|
|
276
276
|
.catch((e) => console.log(e))*/
|
|
277
277
|
// hello
|
|
278
278
|
var url = 'https://beam.mjhlifesciences.com/api/cvent/token';
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -85,8 +85,7 @@ var GridContent = function (_React$Component) {
|
|
|
85
85
|
currentPage: _this.props.currentPage || 1,
|
|
86
86
|
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false,
|
|
87
87
|
showCategory: _this.props.showCategory ? _this.props.showCategory : false,
|
|
88
|
-
contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : []
|
|
89
|
-
lastDataSize: _this.data ? _this.data.length : 0
|
|
88
|
+
contentCategoryMapping: _this.props.contentCategoryMapping ? contentCategoryMapping : []
|
|
90
89
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
91
90
|
_this.setState(function (state) {
|
|
92
91
|
var page = state.page,
|
|
@@ -141,13 +140,11 @@ var GridContent = function (_React$Component) {
|
|
|
141
140
|
if (dataArr.length > 0) {
|
|
142
141
|
return {
|
|
143
142
|
data: [].concat(toConsumableArray._toConsumableArray(data), toConsumableArray._toConsumableArray(dataArr)),
|
|
144
|
-
scrolling: true
|
|
145
|
-
lastDataSize: dataArr.length
|
|
143
|
+
scrolling: true
|
|
146
144
|
};
|
|
147
145
|
} else {
|
|
148
146
|
return {
|
|
149
|
-
scrolling: false
|
|
150
|
-
lastDataSize: 0
|
|
147
|
+
scrolling: false
|
|
151
148
|
};
|
|
152
149
|
}
|
|
153
150
|
});
|
|
@@ -239,8 +236,7 @@ var GridContent = function (_React$Component) {
|
|
|
239
236
|
{ style: { display: 'flex', flex: '1 0 auto' } },
|
|
240
237
|
rightItems[i].component
|
|
241
238
|
);
|
|
242
|
-
}, _this.renderManualPagination = function (
|
|
243
|
-
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
239
|
+
}, _this.renderManualPagination = function () {
|
|
244
240
|
var currentPage = _this.state.currentPage;
|
|
245
241
|
|
|
246
242
|
return React__default['default'].createElement(
|
|
@@ -251,7 +247,7 @@ var GridContent = function (_React$Component) {
|
|
|
251
247
|
{ href: '?page=' + (currentPage - 1) },
|
|
252
248
|
'<< Previous'
|
|
253
249
|
),
|
|
254
|
-
|
|
250
|
+
React__default['default'].createElement(
|
|
255
251
|
'a',
|
|
256
252
|
{ href: '?page=' + (currentPage + 1) },
|
|
257
253
|
'Next >>'
|
|
@@ -743,30 +739,19 @@ var GridContent = function (_React$Component) {
|
|
|
743
739
|
showVideo = _props.showVideo,
|
|
744
740
|
VideoPlayer = _props.VideoPlayer,
|
|
745
741
|
showBI = _props.showBI,
|
|
746
|
-
brandInsight = _props.brandInsight
|
|
747
|
-
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
748
|
-
nextPagePostsCount = _props$nextPagePostsC === undefined ? 3 : _props$nextPagePostsC;
|
|
742
|
+
brandInsight = _props.brandInsight;
|
|
749
743
|
|
|
750
744
|
|
|
751
745
|
return React__default['default'].createElement(
|
|
752
746
|
'div',
|
|
753
747
|
{ className: 'contentDeck' },
|
|
754
748
|
autoScroll ? React__default['default'].createElement(
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
React__default['default'].createElement(
|
|
758
|
-
index_es.InfiniteScroll,
|
|
759
|
-
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
|
|
760
|
-
React__default['default'].createElement(
|
|
761
|
-
Container__default['default'],
|
|
762
|
-
null,
|
|
763
|
-
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd, this.state.contentCategoryMapping)
|
|
764
|
-
)
|
|
765
|
-
),
|
|
749
|
+
index_es.InfiniteScroll,
|
|
750
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling },
|
|
766
751
|
React__default['default'].createElement(
|
|
767
|
-
'
|
|
752
|
+
Container__default['default'],
|
|
768
753
|
null,
|
|
769
|
-
this.
|
|
754
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd, this.state.contentCategoryMapping)
|
|
770
755
|
)
|
|
771
756
|
) : React__default['default'].createElement(
|
|
772
757
|
React__default['default'].Fragment,
|
|
@@ -800,7 +785,7 @@ var GridContent = function (_React$Component) {
|
|
|
800
785
|
React__default['default'].createElement(
|
|
801
786
|
'noscript',
|
|
802
787
|
null,
|
|
803
|
-
this.renderManualPagination(
|
|
788
|
+
this.renderManualPagination()
|
|
804
789
|
)
|
|
805
790
|
)
|
|
806
791
|
);
|
|
@@ -24,7 +24,7 @@ var urlFor = require('./urlFor.js');
|
|
|
24
24
|
var main = require('./main-f1c77adb.js');
|
|
25
25
|
var AuthorComponent = require('./AuthorComponent-39b37d84.js');
|
|
26
26
|
var PublicationFeature = require('./PublicationFeature-5ccf9b13.js');
|
|
27
|
-
var Pagination = require('./Pagination-
|
|
27
|
+
var Pagination = require('./Pagination-885dcfbd.js');
|
|
28
28
|
var Spinner = require('react-bootstrap/Spinner');
|
|
29
29
|
require('./_commonjsHelpers-06173234.js');
|
|
30
30
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -49,6 +49,7 @@ require('./Segment.js');
|
|
|
49
49
|
require('./eq-5fc26c07.js');
|
|
50
50
|
require('./index-d48b231c.js');
|
|
51
51
|
require('react-bootstrap/Button');
|
|
52
|
+
require('react-paginate');
|
|
52
53
|
require('./index.esm-d51c9ac6.js');
|
|
53
54
|
require('./iconBase-be4097c0.js');
|
|
54
55
|
|
package/dist/cjs/HamMagazine.js
CHANGED
|
@@ -38,15 +38,15 @@ var Navbar__default = /*#__PURE__*/_interopDefaultLegacy(Navbar);
|
|
|
38
38
|
var NavDropdown__default = /*#__PURE__*/_interopDefaultLegacy(NavDropdown);
|
|
39
39
|
|
|
40
40
|
var HamMagazine = function HamMagazine(props) {
|
|
41
|
-
/*
|
|
42
|
-
Example Nav with acceptable props
|
|
43
|
-
<MagazineNav
|
|
44
|
-
showLogin
|
|
45
|
-
logo={props.settings.logo}
|
|
46
|
-
dataObject={props.cache.mainNavCache}
|
|
47
|
-
website={website}
|
|
48
|
-
subNav={props.cache.subNavCache}
|
|
49
|
-
/>
|
|
41
|
+
/*
|
|
42
|
+
Example Nav with acceptable props
|
|
43
|
+
<MagazineNav
|
|
44
|
+
showLogin
|
|
45
|
+
logo={props.settings.logo}
|
|
46
|
+
dataObject={props.cache.mainNavCache}
|
|
47
|
+
website={website}
|
|
48
|
+
subNav={props.cache.subNavCache}
|
|
49
|
+
/>
|
|
50
50
|
*/
|
|
51
51
|
|
|
52
52
|
// Setting 'socialIconVariant' as 'light' as default to make the social icons and search icon black
|
package/dist/cjs/IssueLanding.js
CHANGED
|
@@ -76,35 +76,35 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
76
76
|
|
|
77
77
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
78
78
|
|
|
79
|
-
/* usage
|
|
80
|
-
import Settings, { Ads } from '../../../../settings'
|
|
81
|
-
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
82
|
-
import client from '../../../../client'
|
|
83
|
-
import moment from 'moment'
|
|
84
|
-
import Shell from '../../../../components/2.0/Shell'
|
|
85
|
-
import { pageview } from '../../../../utilities/gtag'
|
|
86
|
-
|
|
87
|
-
const Issue = (props) => {
|
|
88
|
-
const { pubIssue, cache } = props
|
|
89
|
-
const targeting = {
|
|
90
|
-
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
91
|
-
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
92
|
-
}
|
|
93
|
-
return (
|
|
94
|
-
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
95
|
-
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
96
|
-
</Shell>
|
|
97
|
-
)
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
Issue.getInitialProps = async (ctx) => {
|
|
101
|
-
const { query } = ctx
|
|
102
|
-
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
103
|
-
)
|
|
104
|
-
return { pubIssue }
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
export default Issue
|
|
79
|
+
/* usage
|
|
80
|
+
import Settings, { Ads } from '../../../../settings'
|
|
81
|
+
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
82
|
+
import client from '../../../../client'
|
|
83
|
+
import moment from 'moment'
|
|
84
|
+
import Shell from '../../../../components/2.0/Shell'
|
|
85
|
+
import { pageview } from '../../../../utilities/gtag'
|
|
86
|
+
|
|
87
|
+
const Issue = (props) => {
|
|
88
|
+
const { pubIssue, cache } = props
|
|
89
|
+
const targeting = {
|
|
90
|
+
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
91
|
+
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
92
|
+
}
|
|
93
|
+
return (
|
|
94
|
+
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
95
|
+
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
96
|
+
</Shell>
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
Issue.getInitialProps = async (ctx) => {
|
|
101
|
+
const { query } = ctx
|
|
102
|
+
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
103
|
+
)
|
|
104
|
+
return { pubIssue }
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export default Issue
|
|
108
108
|
*/
|
|
109
109
|
|
|
110
110
|
var IssueLanding = function IssueLanding(props) {
|
package/dist/cjs/KMTracker.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var KMTracker = function KMTracker(props) {
|
|
4
|
-
|
|
4
|
+
var id = props.id;
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
if (document && id) {
|
|
7
7
|
(function () {
|
|
8
|
-
|
|
8
|
+
var ecnJquery = document.createElement('script');
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
ecnJquery.type = 'text/javascript';
|
|
11
|
+
ecnJquery.async = true;
|
|
12
|
+
ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
var ecnScript = document.createElement('script');
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
ecnScript.type = 'text/javascript';
|
|
17
|
+
ecnScript.async = true;
|
|
18
|
+
ecnScript.id = 'km-tracker';
|
|
19
|
+
ecnScript.src = 'https://apidt.ecn5.com/ECN_tracker_Secure.js?TrackerKey=' + id;
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
document.head.appendChild(ecnJquery);
|
|
22
|
+
document.head.appendChild(ecnScript);
|
|
23
|
+
})();
|
|
24
|
+
}
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
module.exports = KMTracker;
|
package/dist/cjs/MasterDeck.js
CHANGED
|
@@ -230,14 +230,14 @@ var MasterDeck = function (_React$Component) {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
// please leave this for later debug purpose : Yong Jun.
|
|
233
|
-
/* console.log('page change reported', {
|
|
234
|
-
currentPage: currentPage,
|
|
235
|
-
pageNumber: pageNumber,
|
|
236
|
-
pathname: pathname,
|
|
237
|
-
path: path,
|
|
238
|
-
newPath: newPath,
|
|
239
|
-
firstPage: pageNumber === 1,
|
|
240
|
-
queryString: queryString
|
|
233
|
+
/* console.log('page change reported', {
|
|
234
|
+
currentPage: currentPage,
|
|
235
|
+
pageNumber: pageNumber,
|
|
236
|
+
pathname: pathname,
|
|
237
|
+
path: path,
|
|
238
|
+
newPath: newPath,
|
|
239
|
+
firstPage: pageNumber === 1,
|
|
240
|
+
queryString: queryString
|
|
241
241
|
}) */
|
|
242
242
|
|
|
243
243
|
if (pageview) {
|
|
@@ -311,6 +311,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
311
311
|
document_url: brandInsightAd.targeting.document_url,
|
|
312
312
|
document_group: brandInsightAd.targeting.document_group,
|
|
313
313
|
rootDocumentGroup: brandInsightAd.targeting.rootDocumentGroup
|
|
314
|
+
|
|
314
315
|
},
|
|
315
316
|
_type: 'brandInsightAd',
|
|
316
317
|
/* Passing refresh flag */
|
|
@@ -403,8 +404,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
403
404
|
{ className: 'ad-container', style: { display: 'flex', flex: '1 0 auto', width: '100%', textAlign: 'center', marginBottom: '2rem' } },
|
|
404
405
|
rightItems[i].component
|
|
405
406
|
);
|
|
406
|
-
}, _this.renderManualPagination = function (
|
|
407
|
-
var nextPagePostsCount = _ref2.nextPagePostsCount;
|
|
407
|
+
}, _this.renderManualPagination = function () {
|
|
408
408
|
var _this$state3 = _this.state,
|
|
409
409
|
currentPage = _this$state3.currentPage,
|
|
410
410
|
itemsPerPage = _this$state3.itemsPerPage,
|
|
@@ -412,7 +412,10 @@ var MasterDeck = function (_React$Component) {
|
|
|
412
412
|
|
|
413
413
|
console.log('lastDataSize:', lastDataSize);
|
|
414
414
|
console.log('itemsPerPage:', itemsPerPage);
|
|
415
|
-
|
|
415
|
+
if (lastDataSize < itemsPerPage) {
|
|
416
|
+
return null;
|
|
417
|
+
}
|
|
418
|
+
|
|
416
419
|
return React__default['default'].createElement(
|
|
417
420
|
'div',
|
|
418
421
|
{ className: 'd-flex justify-content-between' },
|
|
@@ -421,7 +424,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
421
424
|
{ href: '?page=' + (currentPage - 1) },
|
|
422
425
|
'<< Previous'
|
|
423
426
|
),
|
|
424
|
-
|
|
427
|
+
React__default['default'].createElement(
|
|
425
428
|
'a',
|
|
426
429
|
{ href: '?page=' + (currentPage + 1) },
|
|
427
430
|
'Next >>'
|
|
@@ -483,9 +486,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
483
486
|
_props$showBI = _props.showBI,
|
|
484
487
|
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
485
488
|
_props$lgInfeedAd = _props.lgInfeedAd,
|
|
486
|
-
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd
|
|
487
|
-
_props$nextPagePostsC = _props.nextPagePostsCount,
|
|
488
|
-
nextPagePostsCount = _props$nextPagePostsC === undefined ? 2 : _props$nextPagePostsC;
|
|
489
|
+
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd;
|
|
489
490
|
|
|
490
491
|
return React__default['default'].createElement(
|
|
491
492
|
'div',
|
|
@@ -505,7 +506,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
505
506
|
React__default['default'].createElement(
|
|
506
507
|
'noscript',
|
|
507
508
|
null,
|
|
508
|
-
this.renderManualPagination(
|
|
509
|
+
this.renderManualPagination()
|
|
509
510
|
)
|
|
510
511
|
) : React__default['default'].createElement(
|
|
511
512
|
React__default['default'].Fragment,
|
|
@@ -541,7 +542,7 @@ var MasterDeck = function (_React$Component) {
|
|
|
541
542
|
React__default['default'].createElement(
|
|
542
543
|
'noscript',
|
|
543
544
|
null,
|
|
544
|
-
this.renderManualPagination(
|
|
545
|
+
this.renderManualPagination()
|
|
545
546
|
)
|
|
546
547
|
)
|
|
547
548
|
);
|
|
@@ -14,7 +14,7 @@ var lodash = require('./lodash-f0783643.js');
|
|
|
14
14
|
var main = require('./main-f1c77adb.js');
|
|
15
15
|
var ADlgInfeed = require('./ADlgInfeed-24d739f6.js');
|
|
16
16
|
var ADInfeed = require('./ADInfeed-44d43b8a.js');
|
|
17
|
-
var Pagination = require('./Pagination-
|
|
17
|
+
var Pagination = require('./Pagination-885dcfbd.js');
|
|
18
18
|
require('./_commonjsHelpers-06173234.js');
|
|
19
19
|
require('./core.get-iterator-method-5643aa10.js');
|
|
20
20
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -35,6 +35,7 @@ require('./isSymbol-03abbdf0.js');
|
|
|
35
35
|
require('./toNumber-5e1fac58.js');
|
|
36
36
|
require('./Beam.js');
|
|
37
37
|
require('./Segment.js');
|
|
38
|
+
require('react-paginate');
|
|
38
39
|
require('react-bootstrap/Button');
|
|
39
40
|
require('./index.esm-d51c9ac6.js');
|
|
40
41
|
require('./iconBase-be4097c0.js');
|
|
@@ -115,14 +116,14 @@ var MasterDeck = function (_React$Component) {
|
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
// please leave this for later debug purpose : Yong Jun.
|
|
118
|
-
/* console.log('page change reported', {
|
|
119
|
-
currentPage: currentPage,
|
|
120
|
-
pageNumber: pageNumber,
|
|
121
|
-
pathname: pathname,
|
|
122
|
-
path: path,
|
|
123
|
-
newPath: newPath,
|
|
124
|
-
firstPage: pageNumber === 1,
|
|
125
|
-
queryString: queryString
|
|
119
|
+
/* console.log('page change reported', {
|
|
120
|
+
currentPage: currentPage,
|
|
121
|
+
pageNumber: pageNumber,
|
|
122
|
+
pathname: pathname,
|
|
123
|
+
path: path,
|
|
124
|
+
newPath: newPath,
|
|
125
|
+
firstPage: pageNumber === 1,
|
|
126
|
+
queryString: queryString
|
|
126
127
|
}) */
|
|
127
128
|
|
|
128
129
|
if (pageview) {
|