@mjhls/mjh-framework 1.0.945 → 1.0.946-formassembly-fix-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.
Files changed (88) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AlgoliaSearch.js +131 -15
  3. package/dist/cjs/ArticleProgramLandingPage.js +1 -1
  4. package/dist/cjs/AuthWrapper.js +1 -1
  5. package/dist/cjs/ConferenceArticleCard.js +15 -15
  6. package/dist/cjs/ContentCardPaginated.js +1 -2
  7. package/dist/cjs/DeckContent.js +8 -8
  8. package/dist/cjs/DeckQueue.js +29 -11
  9. package/dist/cjs/DeckQueuePaginated.js +1 -2
  10. package/dist/cjs/EventsDeck.js +17 -17
  11. package/dist/cjs/ExternalResources.js +1 -1
  12. package/dist/cjs/GridContentPaginated.js +1 -2
  13. package/dist/cjs/HamMagazine.js +9 -9
  14. package/dist/cjs/HorizontalArticleListing.js +1 -1
  15. package/dist/cjs/IssueLanding.js +35 -32
  16. package/dist/cjs/KMTracker.js +15 -15
  17. package/dist/cjs/MasterDeck.js +8 -8
  18. package/dist/cjs/MasterDeckPaginated.js +9 -10
  19. package/dist/cjs/{MediaSeriesCard-acb4581d.js → MediaSeriesCard-cb9df4f8.js} +2 -2
  20. package/dist/cjs/MediaSeriesLanding.js +23 -15
  21. package/dist/cjs/MediaSeriesLandingPaginated.js +8 -9
  22. package/dist/cjs/NavMagazine.js +10 -10
  23. package/dist/cjs/NavNative.js +9 -9
  24. package/dist/cjs/Pagination-42f92f7c.js +97 -0
  25. package/dist/cjs/PartnerDetailListing.js +1 -1
  26. package/dist/cjs/PartnerDetailListingPaginated.js +2 -3
  27. package/dist/cjs/PublicationLanding.js +26 -26
  28. package/dist/cjs/QueueDeckExpandedPaginated.js +1 -2
  29. package/dist/cjs/RelatedContent.js +28 -28
  30. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  31. package/dist/cjs/SeriesListingDeck.js +1 -1
  32. package/dist/cjs/{SeriesSlider-ba0c5d1a.js → SeriesSlider-de93a303.js} +4 -4
  33. package/dist/cjs/SideFooter.js +2 -2
  34. package/dist/cjs/TaxonomyDescription.js +1 -1
  35. package/dist/cjs/VideoProgramLandingPage.js +1 -1
  36. package/dist/cjs/VideoSeriesCard.js +1 -1
  37. package/dist/cjs/View.js +13 -9
  38. package/dist/cjs/YoutubeGroup.js +4 -4
  39. package/dist/cjs/getSerializers.js +1 -1
  40. package/dist/cjs/{getTargeting-3c5754ac.js → getTargeting-dab97fe1.js} +9 -9
  41. package/dist/cjs/getTargeting.js +1 -1
  42. package/dist/cjs/{index-62c26edb.js → index-82cc25c0.js} +6 -2
  43. package/dist/cjs/index.js +3 -4
  44. package/dist/esm/AlgoliaSearch.js +132 -16
  45. package/dist/esm/ArticleProgramLandingPage.js +1 -1
  46. package/dist/esm/AuthWrapper.js +1 -1
  47. package/dist/esm/ConferenceArticleCard.js +15 -15
  48. package/dist/esm/ContentCardPaginated.js +1 -2
  49. package/dist/esm/DeckContent.js +8 -8
  50. package/dist/esm/DeckQueue.js +29 -11
  51. package/dist/esm/DeckQueuePaginated.js +1 -2
  52. package/dist/esm/EventsDeck.js +17 -17
  53. package/dist/esm/ExternalResources.js +1 -1
  54. package/dist/esm/GridContentPaginated.js +1 -2
  55. package/dist/esm/HamMagazine.js +9 -9
  56. package/dist/esm/HorizontalArticleListing.js +1 -1
  57. package/dist/esm/IssueLanding.js +35 -32
  58. package/dist/esm/KMTracker.js +15 -15
  59. package/dist/esm/MasterDeck.js +8 -8
  60. package/dist/esm/MasterDeckPaginated.js +9 -10
  61. package/dist/esm/{MediaSeriesCard-227aea3c.js → MediaSeriesCard-e76b2f8f.js} +2 -2
  62. package/dist/esm/MediaSeriesLanding.js +23 -15
  63. package/dist/esm/MediaSeriesLandingPaginated.js +8 -9
  64. package/dist/esm/NavMagazine.js +10 -10
  65. package/dist/esm/NavNative.js +9 -9
  66. package/dist/esm/Pagination-484b86c5.js +90 -0
  67. package/dist/esm/PartnerDetailListing.js +1 -1
  68. package/dist/esm/PartnerDetailListingPaginated.js +2 -3
  69. package/dist/esm/PublicationLanding.js +26 -26
  70. package/dist/esm/QueueDeckExpandedPaginated.js +1 -2
  71. package/dist/esm/RelatedContent.js +28 -28
  72. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  73. package/dist/esm/SeriesListingDeck.js +1 -1
  74. package/dist/esm/{SeriesSlider-45adb8dc.js → SeriesSlider-98ad6d97.js} +4 -4
  75. package/dist/esm/SideFooter.js +2 -2
  76. package/dist/esm/TaxonomyDescription.js +1 -1
  77. package/dist/esm/VideoProgramLandingPage.js +1 -1
  78. package/dist/esm/VideoSeriesCard.js +1 -1
  79. package/dist/esm/View.js +13 -8
  80. package/dist/esm/YoutubeGroup.js +4 -4
  81. package/dist/esm/getSerializers.js +1 -1
  82. package/dist/esm/{getTargeting-42f9b439.js → getTargeting-04d979c9.js} +9 -9
  83. package/dist/esm/getTargeting.js +1 -1
  84. package/dist/esm/{index-0009ea68.js → index-db6fa53f.js} +6 -2
  85. package/dist/esm/index.js +3 -4
  86. package/package.json +115 -115
  87. package/dist/cjs/Pagination-885dcfbd.js +0 -90
  88. package/dist/esm/Pagination-59436882.js +0 -82
@@ -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-59436882.js';
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';
@@ -182,14 +182,14 @@ var DeckContent = function (_React$Component) {
182
182
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
183
183
 
184
184
  // please leave this for later debug purpose : Yong Jun.
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
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
193
193
  }) */
194
194
 
195
195
  if (pageview) {
@@ -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 currentPage = _this.state.currentPage;
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
- InfiniteScroll,
326
- { dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling },
334
+ React__default.Fragment,
335
+ null,
327
336
  React__default.createElement(
328
- Container,
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.cardLoader(page, columns, variant)
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-59436882.js';
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';
@@ -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';
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-6d8e3924.js';
2
2
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
3
3
  import React__default, { useState, useEffect } from 'react';
4
4
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
5
- import { g as getSerializers } from './index-0009ea68.js';
5
+ import { g as getSerializers } from './index-db6fa53f.js';
6
6
  import { m as momentTimezone } from './index-79cfd25c.js';
7
7
  import { useRouter } from 'next/router';
8
8
  import Button from 'react-bootstrap/Button';
@@ -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-59436882.js';
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
 
@@ -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
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import ArticleCarousel from './ArticleCarousel.js';
4
4
  import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
5
5
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
6
- import { g as getSerializers } from './index-0009ea68.js';
6
+ import { g as getSerializers } from './index-db6fa53f.js';
7
7
  import './_commonjsHelpers-0c4b6f40.js';
8
8
  import './core.get-iterator-method-ea258bb1.js';
9
9
  import './_object-pie-133f504a.js';
@@ -3,7 +3,7 @@ import React__default from 'react';
3
3
  import QueueDeckExpanded from './QueueDeckExpanded.js';
4
4
  import Breadcrumbs from './Breadcrumbs.js';
5
5
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
6
- import { g as getSerializers } from './index-0009ea68.js';
6
+ import { g as getSerializers } from './index-db6fa53f.js';
7
7
  import './_commonjsHelpers-0c4b6f40.js';
8
8
  import './core.get-iterator-method-ea258bb1.js';
9
9
  import './_object-pie-133f504a.js';
@@ -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) {
@@ -122,7 +122,9 @@ var IssueLanding = function IssueLanding(props) {
122
122
  _props$imageHeight = props.imageHeight,
123
123
  imageHeight = _props$imageHeight === undefined ? 270 : _props$imageHeight,
124
124
  _props$imageWidth = props.imageWidth,
125
- imageWidth = _props$imageWidth === undefined ? 480 : _props$imageWidth;
125
+ imageWidth = _props$imageWidth === undefined ? 480 : _props$imageWidth,
126
+ _props$nextPagePostsC = props.nextPagePostsCount,
127
+ nextPagePostsCount = _props$nextPagePostsC === undefined ? 1 : _props$nextPagePostsC;
126
128
 
127
129
  return React__default.createElement(
128
130
  'div',
@@ -156,7 +158,8 @@ var IssueLanding = function IssueLanding(props) {
156
158
  showPubInfo: showPubInfo,
157
159
  columns: 'rotate',
158
160
  variant: 'top',
159
- contentCategoryMapping: settings.contentCategoryMapping ? settings.contentCategoryMapping : []
161
+ contentCategoryMapping: settings.contentCategoryMapping ? settings.contentCategoryMapping : [],
162
+ nextPagePostsCount: nextPagePostsCount
160
163
  })
161
164
  );
162
165
  };
@@ -1,25 +1,25 @@
1
1
  var KMTracker = function KMTracker(props) {
2
- var id = props.id;
2
+ var id = props.id;
3
3
 
4
- if (document && id) {
4
+ if (document && id) {
5
5
  (function () {
6
- var ecnJquery = document.createElement('script');
6
+ var ecnJquery = document.createElement('script');
7
7
 
8
- ecnJquery.type = 'text/javascript';
9
- ecnJquery.async = true;
10
- ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
8
+ ecnJquery.type = 'text/javascript';
9
+ ecnJquery.async = true;
10
+ ecnJquery.src = 'https://apidt.ecn5.com/ECN_jQuery.min.js';
11
11
 
12
- var ecnScript = document.createElement('script');
12
+ var ecnScript = document.createElement('script');
13
13
 
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;
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
- document.head.appendChild(ecnJquery);
20
- document.head.appendChild(ecnScript);
21
- })();
22
- }
19
+ document.head.appendChild(ecnJquery);
20
+ document.head.appendChild(ecnScript);
21
+ })();
22
+ }
23
23
  };
24
24
 
25
25
  export default KMTracker;
@@ -223,14 +223,14 @@ var MasterDeck = function (_React$Component) {
223
223
  }
224
224
 
225
225
  // please leave this for later debug purpose : Yong Jun.
226
- /* console.log('page change reported', {
227
- currentPage: currentPage,
228
- pageNumber: pageNumber,
229
- pathname: pathname,
230
- path: path,
231
- newPath: newPath,
232
- firstPage: pageNumber === 1,
233
- queryString: queryString
226
+ /* console.log('page change reported', {
227
+ currentPage: currentPage,
228
+ pageNumber: pageNumber,
229
+ pathname: pathname,
230
+ path: path,
231
+ newPath: newPath,
232
+ firstPage: pageNumber === 1,
233
+ queryString: queryString
234
234
  }) */
235
235
 
236
236
  if (pageview) {
@@ -12,7 +12,7 @@ import { l as lodash } from './lodash-f97fd99a.js';
12
12
  import { m as main_43 } from './main-1894c974.js';
13
13
  import { A as ADlgInfeed } from './ADlgInfeed-ebcafb85.js';
14
14
  import { A as ADInfeed } from './ADInfeed-7af1f934.js';
15
- import { P as Pagination } from './Pagination-59436882.js';
15
+ import { P as Pagination } from './Pagination-484b86c5.js';
16
16
  import './_commonjsHelpers-0c4b6f40.js';
17
17
  import './core.get-iterator-method-ea258bb1.js';
18
18
  import './web.dom.iterable-ab4dea5c.js';
@@ -33,7 +33,6 @@ import './isSymbol-a7e9aafe.js';
33
33
  import './toNumber-5aeba6e7.js';
34
34
  import './Beam.js';
35
35
  import './Segment.js';
36
- import 'react-paginate';
37
36
  import 'react-bootstrap/Button';
38
37
  import './index.esm-1bd8a0a8.js';
39
38
  import './iconBase-ccc56b97.js';
@@ -108,14 +107,14 @@ var MasterDeck = function (_React$Component) {
108
107
  }
109
108
 
110
109
  // please leave this for later debug purpose : Yong Jun.
111
- /* console.log('page change reported', {
112
- currentPage: currentPage,
113
- pageNumber: pageNumber,
114
- pathname: pathname,
115
- path: path,
116
- newPath: newPath,
117
- firstPage: pageNumber === 1,
118
- queryString: queryString
110
+ /* console.log('page change reported', {
111
+ currentPage: currentPage,
112
+ pageNumber: pageNumber,
113
+ pathname: pathname,
114
+ path: path,
115
+ newPath: newPath,
116
+ firstPage: pageNumber === 1,
117
+ queryString: queryString
119
118
  }) */
120
119
 
121
120
  if (pageview) {
@@ -9,7 +9,7 @@ import urlFor from './urlFor.js';
9
9
  import { m as moment } from './moment-bc12cb97.js';
10
10
  import { s as styleInject } from './style-inject.es-1f59c1d0.js';
11
11
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
12
- import { g as getSerializers } from './index-0009ea68.js';
12
+ import { g as getSerializers } from './index-db6fa53f.js';
13
13
 
14
14
  /**
15
15
  * Copyright (c) 2013-present, Facebook, Inc.
@@ -9427,7 +9427,7 @@ var Tooltip = React__default.forwardRef(function (_ref, ref) {
9427
9427
  Tooltip.defaultProps = defaultProps;
9428
9428
  Tooltip.displayName = 'Tooltip';
9429
9429
 
9430
- 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";
9430
+ var css = ".MediaSeriesCard-module_article__SAFYK {\r\n width: 100%;\r\n margin: 0 0 1rem 0;\r\n}\r\n.MediaSeriesCard-module_article__SAFYK a {\r\n display: flex;\r\n width: 100%;\r\n color: #000000;\r\n}\r\n.MediaSeriesCard-module_thumb__3jRAU {\r\n width: 25%;\r\n}\r\n.MediaSeriesCard-module_thumb__3jRAU img {\r\n width: 100%;\r\n height: auto;\r\n}\r\n.MediaSeriesCard-module_info__3L7_o {\r\n width: 75%;\r\n font-size: 1rem;\r\n}\r\n.MediaSeriesCard-module_info__3L7_o h2 {\r\n font-weight: bold;\r\n font-size: 1.25rem;\r\n margin: 0;\r\n}\r\n.MediaSeriesCard-module_published__E4oiz {\r\n color: #6d6d6d;\r\n margin: 0;\r\n}\r\n.MediaSeriesCard-module_summary__1xanh {\r\n margin: 0.5rem 0 0 0;\r\n}\r\n.MediaSeriesCard-module_author__e5fuR {\r\n margin: 0;\r\n}\r\n.MediaSeriesCard-module_author__e5fuR span {\r\n color: #6d6d6d;\r\n}\r\n.MediaSeriesCard-module_name__2m5KY {\r\n font-size: 1.3rem;\r\n font-weight: bold;\r\n}\r\n@media only screen and (max-width: 568px) {\r\n .MediaSeriesCard-module_article__SAFYK {\r\n margin: 1rem 0;\r\n box-shadow: 2px 4px 8px rgba(0,0,0,.2);\r\n }\r\n .MediaSeriesCard-module_article__SAFYK a {\r\n flex-direction: column;\r\n align-items: center;\r\n }\r\n .MediaSeriesCard-module_thumb__3jRAU {\r\n overflow: hidden;\r\n width: 100%;\r\n margin-bottom: 1rem;\r\n }\r\n .MediaSeriesCard-module_thumb__3jRAU img{\r\n border-radius: 10px 10px 0 0; \r\n }\r\n .MediaSeriesCard-module_thumb__3jRAU figure {\r\n margin: 0;\r\n }\r\n .MediaSeriesCard-module_info__3L7_o {\r\n width: 90%;\r\n padding: 0rem !important;\r\n }\r\n .MediaSeriesCard-module_info__3L7_o h2 {\r\n font-size: 1rem;\r\n }\r\n .MediaSeriesCard-module_name__2m5KY {\r\n font-size: 1rem;\r\n \r\n }\r\n}\r\n";
9431
9431
  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" };
9432
9432
  styleInject(css);
9433
9433
 
@@ -3,13 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
3
3
  import { _ as _extends } from './extends-6d8e3924.js';
4
4
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
5
5
  import React__default, { useState, useEffect } from 'react';
6
- import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-227aea3c.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-e76b2f8f.js';
7
7
  import './index-98ca9cec.js';
8
8
  import 'react-dom';
9
9
  import Link from 'next/link';
10
10
  import MasterDeck from './MasterDeck.js';
11
11
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
12
- import { g as getSerializers } from './index-0009ea68.js';
12
+ import { g as getSerializers } from './index-db6fa53f.js';
13
13
  import './_commonjsHelpers-0c4b6f40.js';
14
14
  import './core.get-iterator-method-ea258bb1.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
@@ -92,11 +92,11 @@ var Filter = function Filter(_ref) {
92
92
  _useState6 = _slicedToArray(_useState5, 2),
93
93
  grandChildData = _useState6[0],
94
94
  setGrandChildData = _useState6[1];
95
- /*
96
- {parent: showAll,
97
- chidlren: show selected from parent,
98
- grandchildren: show selected from children
99
- }
95
+ /*
96
+ {parent: showAll,
97
+ chidlren: show selected from parent,
98
+ grandchildren: show selected from children
99
+ }
100
100
  */
101
101
 
102
102
 
@@ -239,7 +239,8 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
239
239
  pageview = props.pageview,
240
240
  currentPage = props.currentPage,
241
241
  docGroupID = props.docGroupID,
242
- parentUrl = props.parentUrl;
242
+ parentUrl = props.parentUrl,
243
+ nextPagePostsCount = props.nextPagePostsCount;
243
244
 
244
245
  var _useState7 = useState(false),
245
246
  _useState8 = _slicedToArray(_useState7, 2),
@@ -367,14 +368,15 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
367
368
  currentPage: currentPage,
368
369
  pageview: pageview,
369
370
  autoScroll: true,
370
- seoPaginate: true
371
+ seoPaginate: true,
372
+ nextPagePostsCount: nextPagePostsCount
371
373
  })
372
374
  );
373
375
  };
374
376
 
375
377
  MediaSeriesLanding.getInitialData = function () {
376
378
  var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(ctx, client, cache) {
377
- var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
379
+ var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, nextPagePostsCount, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
378
380
  return regenerator.wrap(function _callee2$(_context2) {
379
381
  while (1) {
380
382
  switch (_context2.prev = _context2.next) {
@@ -404,9 +406,14 @@ MediaSeriesLanding.getInitialData = function () {
404
406
  case 13:
405
407
  seriesData = _context2.sent;
406
408
  _context2.next = 16;
407
- return client.fetch('*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] {\n topicMapping[]->\n }');
409
+ return client.fetch('count(' + seriesQuery + ')', _extends({}, params, { from: params.to, to: params.to + itemsPerPage }));
408
410
 
409
411
  case 16:
412
+ nextPagePostsCount = _context2.sent;
413
+ _context2.next = 19;
414
+ return client.fetch('*[_type == \'documentGroup\' && references(\'' + docGroupID._id + '\') && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now()) ] {\n topicMapping[]->\n }');
415
+
416
+ case 19:
410
417
  allSeries = _context2.sent;
411
418
 
412
419
  //Take all series topicMapping and put in an array
@@ -427,10 +434,10 @@ MediaSeriesLanding.getInitialData = function () {
427
434
  };
428
435
 
429
436
  usedTopics = buildUsedTopicsArray(allSeries);
430
- _context2.next = 21;
437
+ _context2.next = 24;
431
438
  return client.fetch('\n *[_type == \'taxonomy\' && !defined(parent) && isMainTopic] | order(name asc) {\n _id,\n identifier,\n name,\n "children": *[_type == \'taxonomy\' && references(^._id)] | order(name asc){\n _id,\n name,\n identifier,\n "grandchildren": *[_type == \'taxonomy\' && references(^._id)] | order(name asc) {...}\n }\t\n }');
432
439
 
433
- case 21:
440
+ case 24:
434
441
  taxonomyFilter = _context2.sent;
435
442
 
436
443
 
@@ -471,10 +478,11 @@ MediaSeriesLanding.getInitialData = function () {
471
478
  docGroupID: docGroupID._id,
472
479
  parentUrl: identifier,
473
480
  statusCode: statusCode,
474
- docGroup: docGroupID
481
+ docGroup: docGroupID,
482
+ nextPagePostsCount: nextPagePostsCount
475
483
  });
476
484
 
477
- case 25:
485
+ case 28:
478
486
  case 'end':
479
487
  return _context2.stop();
480
488
  }
@@ -3,13 +3,13 @@ import { _ as _typeof } from './typeof-e9fc0c5d.js';
3
3
  import { _ as _extends } from './extends-6d8e3924.js';
4
4
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
5
5
  import React__default, { useState, useEffect } from 'react';
6
- import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-227aea3c.js';
6
+ import { M as MediaSeriesCard, D as DropdownButton, a as Dropdown } from './MediaSeriesCard-e76b2f8f.js';
7
7
  import './index-98ca9cec.js';
8
8
  import 'react-dom';
9
9
  import Link from 'next/link';
10
10
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
11
11
  import MasterDeck from './MasterDeckPaginated.js';
12
- import { g as getSerializers } from './index-0009ea68.js';
12
+ import { g as getSerializers } from './index-db6fa53f.js';
13
13
  import './_commonjsHelpers-0c4b6f40.js';
14
14
  import './core.get-iterator-method-ea258bb1.js';
15
15
  import './web.dom.iterable-ab4dea5c.js';
@@ -44,8 +44,7 @@ import './toNumber-5aeba6e7.js';
44
44
  import './Beam.js';
45
45
  import './Segment.js';
46
46
  import './ADInfeed-7af1f934.js';
47
- import './Pagination-59436882.js';
48
- import 'react-paginate';
47
+ import './Pagination-484b86c5.js';
49
48
  import 'react-bootstrap/Button';
50
49
  import './index.esm-1bd8a0a8.js';
51
50
  import './iconBase-ccc56b97.js';
@@ -94,11 +93,11 @@ var Filter = function Filter(_ref) {
94
93
  _useState6 = _slicedToArray(_useState5, 2),
95
94
  grandChildData = _useState6[0],
96
95
  setGrandChildData = _useState6[1];
97
- /*
98
- {parent: showAll,
99
- chidlren: show selected from parent,
100
- grandchildren: show selected from children
101
- }
96
+ /*
97
+ {parent: showAll,
98
+ chidlren: show selected from parent,
99
+ grandchildren: show selected from children
100
+ }
102
101
  */
103
102
 
104
103