@mjhls/mjh-framework 1.0.973-pratner-listing-nojs-v1 → 1.0.973-ptce-test-v2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (154) hide show
  1. package/README.md +168 -168
  2. package/dist/cjs/AD.js +1 -1
  3. package/dist/cjs/AD300x250.js +2 -1
  4. package/dist/cjs/AD300x250x600.js +2 -1
  5. package/dist/cjs/AD728x90.js +2 -1
  6. package/dist/cjs/ADFloatingFooter.js +2 -1
  7. package/dist/cjs/ADGutter.js +2 -1
  8. package/dist/cjs/ADSkyscraper.js +2 -1
  9. package/dist/cjs/ADSponsoredResources.js +2 -1
  10. package/dist/cjs/ADWebcast.js +2 -1
  11. package/dist/cjs/ADWelcome.js +2 -1
  12. package/dist/cjs/AdSlot.js +2 -1
  13. package/dist/cjs/AdSlotsProvider.js +2 -1
  14. package/dist/cjs/AlgoliaSearch.js +14164 -17
  15. package/dist/cjs/ArticleProgramLandingPage.js +3 -2
  16. package/dist/cjs/ArticleSeriesLandingPage.js +4 -3
  17. package/dist/cjs/ArticleSeriesListing.js +2 -1
  18. package/dist/cjs/AuthWrapper.js +3 -29
  19. package/dist/cjs/CMEDeck.js +2 -1
  20. package/dist/cjs/Column3.js +2 -1
  21. package/dist/cjs/ConferenceArticleCard.js +15 -15
  22. package/dist/cjs/ContentCardPaginated.js +5 -3
  23. package/dist/cjs/DeckContent.js +11 -10
  24. package/dist/cjs/DeckQueue.js +2 -1
  25. package/dist/cjs/DeckQueuePaginated.js +4 -2
  26. package/dist/cjs/{Dfp-94f8ccdf.js → Dfp-9be904d5.js} +2 -1
  27. package/dist/cjs/EventsDeck.js +17 -17
  28. package/dist/cjs/ExternalResources.js +3 -2
  29. package/dist/cjs/GridContent.js +4 -3
  30. package/dist/cjs/GridContentPaginated.js +6 -4
  31. package/dist/cjs/HamMagazine.js +9 -9
  32. package/dist/cjs/HealthCareProfessionalModal.js +1 -1
  33. package/dist/cjs/HorizontalArticleListing.js +3 -2
  34. package/dist/cjs/IssueLanding.js +34 -33
  35. package/dist/cjs/KMTracker.js +15 -15
  36. package/dist/cjs/LeftNav.js +2 -1
  37. package/dist/cjs/MasterDeck.js +12 -11
  38. package/dist/cjs/MasterDeckPaginated.js +14 -12
  39. package/dist/cjs/{MediaSeriesCard-1a62916a.js → MediaSeriesCard-5bf9813e.js} +288 -384
  40. package/dist/cjs/MediaSeriesLanding.js +12 -10
  41. package/dist/cjs/MediaSeriesLandingPaginated.js +14 -11
  42. package/dist/cjs/NavMagazine.js +10 -10
  43. package/dist/cjs/NavNative.js +9 -9
  44. package/dist/cjs/Pagination-1e0d5f1d.js +90 -0
  45. package/dist/cjs/PartnerDetailListing.js +29 -29
  46. package/dist/cjs/PartnerDetailListingPaginated.js +7 -5
  47. package/dist/cjs/PtceDeck.js +223 -0
  48. package/dist/cjs/PubSection.js +4 -3
  49. package/dist/cjs/PublicationLanding.js +26 -26
  50. package/dist/cjs/QueueDeckExpanded.js +4 -3
  51. package/dist/cjs/QueueDeckExpandedPaginated.js +6 -4
  52. package/dist/cjs/RelatedContent.js +28 -28
  53. package/dist/cjs/RelatedTopicsDropdown.js +10 -10
  54. package/dist/cjs/SeriesListingDeck.js +3 -2
  55. package/dist/cjs/{SeriesSlider-74546d19.js → SeriesSlider-594b19eb.js} +4 -4
  56. package/dist/cjs/SideFooter.js +2 -2
  57. package/dist/cjs/TaxonomyDescription.js +3 -2
  58. package/dist/cjs/TemplateNormal.js +2 -1
  59. package/dist/cjs/VideoProgramLandingPage.js +3 -2
  60. package/dist/cjs/VideoSeriesCard.js +1 -1
  61. package/dist/cjs/VideoSeriesLandingPage.js +4 -3
  62. package/dist/cjs/VideoSeriesListing.js +2 -1
  63. package/dist/cjs/View.js +12 -14
  64. package/dist/cjs/YoutubeGroup.js +4 -4
  65. package/dist/cjs/events-1b438fe7.js +469 -0
  66. package/dist/cjs/getPtceActivities.js +78 -0
  67. package/dist/cjs/getSerializers.js +7 -6
  68. package/dist/cjs/{getTargeting-dab97fe1.js → getTargeting-3c5754ac.js} +9 -9
  69. package/dist/cjs/getTargeting.js +1 -1
  70. package/dist/cjs/index-50be6759.js +105 -0
  71. package/dist/cjs/{index-bb00ade7.js → index-eb1c583d.js} +30 -73
  72. package/dist/cjs/{index-0e4427c8.js → index-fc2f1ca2.js} +2 -467
  73. package/dist/cjs/index.js +10 -7
  74. package/dist/cjs/typeof-1358762e.js +33 -0
  75. package/dist/esm/AD.js +1 -1
  76. package/dist/esm/AD300x250.js +2 -1
  77. package/dist/esm/AD300x250x600.js +2 -1
  78. package/dist/esm/AD728x90.js +2 -1
  79. package/dist/esm/ADFloatingFooter.js +2 -1
  80. package/dist/esm/ADGutter.js +2 -1
  81. package/dist/esm/ADSkyscraper.js +2 -1
  82. package/dist/esm/ADSponsoredResources.js +2 -1
  83. package/dist/esm/ADWebcast.js +2 -1
  84. package/dist/esm/ADWelcome.js +2 -1
  85. package/dist/esm/AdSlot.js +2 -1
  86. package/dist/esm/AdSlotsProvider.js +2 -1
  87. package/dist/esm/AlgoliaSearch.js +14158 -11
  88. package/dist/esm/ArticleProgramLandingPage.js +3 -2
  89. package/dist/esm/ArticleSeriesLandingPage.js +4 -3
  90. package/dist/esm/ArticleSeriesListing.js +2 -1
  91. package/dist/esm/AuthWrapper.js +2 -28
  92. package/dist/esm/CMEDeck.js +2 -1
  93. package/dist/esm/Column3.js +2 -1
  94. package/dist/esm/ConferenceArticleCard.js +15 -15
  95. package/dist/esm/ContentCardPaginated.js +5 -3
  96. package/dist/esm/DeckContent.js +11 -10
  97. package/dist/esm/DeckQueue.js +2 -1
  98. package/dist/esm/DeckQueuePaginated.js +4 -2
  99. package/dist/esm/{Dfp-cf85d203.js → Dfp-102f0beb.js} +2 -1
  100. package/dist/esm/EventsDeck.js +17 -17
  101. package/dist/esm/ExternalResources.js +3 -2
  102. package/dist/esm/GridContent.js +4 -3
  103. package/dist/esm/GridContentPaginated.js +6 -4
  104. package/dist/esm/HamMagazine.js +9 -9
  105. package/dist/esm/HealthCareProfessionalModal.js +1 -1
  106. package/dist/esm/HorizontalArticleListing.js +3 -2
  107. package/dist/esm/IssueLanding.js +34 -33
  108. package/dist/esm/KMTracker.js +15 -15
  109. package/dist/esm/LeftNav.js +2 -1
  110. package/dist/esm/MasterDeck.js +12 -11
  111. package/dist/esm/MasterDeckPaginated.js +14 -12
  112. package/dist/esm/{MediaSeriesCard-146e08c8.js → MediaSeriesCard-305a9cb3.js} +3 -99
  113. package/dist/esm/MediaSeriesLanding.js +12 -10
  114. package/dist/esm/MediaSeriesLandingPaginated.js +14 -11
  115. package/dist/esm/NavMagazine.js +10 -10
  116. package/dist/esm/NavNative.js +9 -9
  117. package/dist/esm/Pagination-cd21f8c2.js +82 -0
  118. package/dist/esm/PartnerDetailListing.js +29 -29
  119. package/dist/esm/PartnerDetailListingPaginated.js +7 -5
  120. package/dist/esm/PtceDeck.js +215 -0
  121. package/dist/esm/PubSection.js +4 -3
  122. package/dist/esm/PublicationLanding.js +26 -26
  123. package/dist/esm/QueueDeckExpanded.js +4 -3
  124. package/dist/esm/QueueDeckExpandedPaginated.js +6 -4
  125. package/dist/esm/RelatedContent.js +28 -28
  126. package/dist/esm/RelatedTopicsDropdown.js +10 -10
  127. package/dist/esm/SeriesListingDeck.js +3 -2
  128. package/dist/esm/{SeriesSlider-e495571f.js → SeriesSlider-f771e20d.js} +4 -4
  129. package/dist/esm/SideFooter.js +2 -2
  130. package/dist/esm/TaxonomyDescription.js +3 -2
  131. package/dist/esm/TemplateNormal.js +2 -1
  132. package/dist/esm/VideoProgramLandingPage.js +3 -2
  133. package/dist/esm/VideoSeriesCard.js +1 -1
  134. package/dist/esm/VideoSeriesLandingPage.js +4 -3
  135. package/dist/esm/VideoSeriesListing.js +2 -1
  136. package/dist/esm/View.js +11 -14
  137. package/dist/esm/YoutubeGroup.js +4 -4
  138. package/dist/esm/events-6c3a7a63.js +467 -0
  139. package/dist/esm/getPtceActivities.js +76 -0
  140. package/dist/esm/getSerializers.js +7 -6
  141. package/dist/esm/{getTargeting-04d979c9.js → getTargeting-42f9b439.js} +9 -9
  142. package/dist/esm/getTargeting.js +1 -1
  143. package/dist/esm/{index-e89d33c8.js → index-264bbd3c.js} +30 -73
  144. package/dist/esm/index-98ca9cec.js +100 -0
  145. package/dist/esm/{index-5cc7b406.js → index-f0fc23eb.js} +1 -466
  146. package/dist/esm/index.js +10 -7
  147. package/dist/esm/typeof-2f07d0e8.js +30 -0
  148. package/package.json +115 -115
  149. package/dist/cjs/Pagination-2a3d0103.js +0 -97
  150. package/dist/esm/Pagination-dc30727b.js +0 -90
  151. /package/dist/cjs/{ADInfeed-cf54cb8a.js → ADInfeed-81006615.js} +0 -0
  152. /package/dist/cjs/{ADlgInfeed-d06624d8.js → ADlgInfeed-0db07099.js} +0 -0
  153. /package/dist/esm/{ADInfeed-0852ff35.js → ADInfeed-6d1fc6bf.js} +0 -0
  154. /package/dist/esm/{ADlgInfeed-5fb3b724.js → ADlgInfeed-dc36c928.js} +0 -0
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
11
11
  import Breadcrumbs from './Breadcrumbs.js';
12
12
  import Feature from './Feature.js';
13
13
  import urlFor from './urlFor.js';
14
- import { g as getSerializers } from './index-e89d33c8.js';
14
+ import { g as getSerializers } from './index-264bbd3c.js';
15
15
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
16
16
  import './_commonjsHelpers-0c4b6f40.js';
17
17
  import './core.get-iterator-method-ea258bb1.js';
@@ -26,12 +26,13 @@ import 'react-bootstrap';
26
26
  import './index.es-a6137319.js';
27
27
  import './visibility-sensor-72fd8f8b.js';
28
28
  import 'react-dom';
29
- import './index-5cc7b406.js';
29
+ import './index-f0fc23eb.js';
30
+ import './events-6c3a7a63.js';
30
31
  import 'next/router';
31
32
  import './index-755f2cc2.js';
32
33
  import './main-1894c974.js';
33
34
  import './entities-6d9154b4.js';
34
- import './ADInfeed-0852ff35.js';
35
+ import './ADInfeed-6d1fc6bf.js';
35
36
  import 'react-bootstrap/Card';
36
37
  import './AdSlot.js';
37
38
  import './debounce-533d9748.js';
@@ -42,7 +43,7 @@ import './stringify-2b084bee.js';
42
43
  import './Segment.js';
43
44
  import './AuthorComponent-11adff02.js';
44
45
  import './lodash-f97fd99a.js';
45
- import './ADlgInfeed-5fb3b724.js';
46
+ import './ADlgInfeed-dc36c928.js';
46
47
  import './getContentCategory-15dcc413.js';
47
48
  import './timeDifferenceCalc.js';
48
49
  import './index-3f5c03b2.js';
@@ -169,9 +170,24 @@ var PartnerDetails = function PartnerDetails(_ref) {
169
170
  rel: 'noopener noreferrer',
170
171
  style: { height: 30, width: 30 }
171
172
  }),
172
- partnerDetails.youtube && partnerDetails.youtubeIcon && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.youtube, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }),
173
- partnerDetails.twitter && partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.twitter, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } }),
174
- partnerDetails.facebook && !partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, { url: partnerDetails.facebook, target: '_blank', rel: 'noopener noreferrer', style: { height: 30, width: 30, marginLeft: '0.25rem' } })
173
+ partnerDetails.youtube && partnerDetails.youtubeIcon && React__default.createElement(reactSocialIcons_1, {
174
+ url: partnerDetails.youtube,
175
+ target: '_blank',
176
+ rel: 'noopener noreferrer',
177
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
178
+ }),
179
+ partnerDetails.twitter && partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, {
180
+ url: partnerDetails.twitter,
181
+ target: '_blank',
182
+ rel: 'noopener noreferrer',
183
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
184
+ }),
185
+ partnerDetails.facebook && !partnerDetails.twitterIcon && React__default.createElement(reactSocialIcons_1, {
186
+ url: partnerDetails.facebook,
187
+ target: '_blank',
188
+ rel: 'noopener noreferrer',
189
+ style: { height: 30, width: 30, marginLeft: '0.25rem' }
190
+ })
175
191
  )
176
192
  )
177
193
  ),
@@ -228,8 +244,7 @@ var PartnerDetails = function PartnerDetails(_ref) {
228
244
  defaultImage: Settings.logo,
229
245
  showPublished: true,
230
246
  showCategory: true,
231
- pageview: pageview,
232
- nextPagePostsCount: props.nextPagePostsCount
247
+ pageview: pageview
233
248
  })
234
249
  )
235
250
  )
@@ -240,7 +255,7 @@ PartnerDetails.returnGetInitialProps = function () {
240
255
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(identifier, partnerPageUrl, partnerDocumentGroupID, params, currentPage, client) {
241
256
  var category = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
242
257
 
243
- var today, featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQuery, itemsPerPage, articles, nextPagePostsCount;
258
+ var today, featureQuery, partnerQuery, taxonomyQuery, _ref3, _ref4, features, partnerDetails, taxonomyDetails, articlesQuery, articles;
244
259
 
245
260
  return regenerator.wrap(function _callee$(_context) {
246
261
  while (1) {
@@ -273,17 +288,12 @@ PartnerDetails.returnGetInitialProps = function () {
273
288
  partnerDetails = _ref4[1];
274
289
  taxonomyDetails = _ref4[2];
275
290
  articlesQuery = '*[_type == \'article\' && !(_id in path("drafts.**")) && defined(title) && is_visible == true && defined(url) && dateTime(published) <= dateTime(\'' + today + '\') && passwordLocked != true && references(\'' + taxonomyDetails.id + '\')] | order(published desc)[$from...$to]{\n title,\n summary,\n thumbnail{ ..., asset-> },\n url,\n published,\n contentCategory->,\n \'pageNumber\': ' + currentPage + '\n }';
276
- itemsPerPage = params.itemsPerPage ? params.itemsPerPage : params.from && params.to ? parseInt(params.to) - parseInt(params.from) : 10;
277
- _context.next = 17;
291
+ _context.next = 16;
278
292
  return client.fetch(articlesQuery, params);
279
293
 
280
- case 17:
294
+ case 16:
281
295
  articles = _context.sent;
282
- _context.next = 20;
283
- return client.fetch('count(' + articlesQuery + ')', _extends({}, params, { from: params.to, to: params.to + itemsPerPage }));
284
296
 
285
- case 20:
286
- nextPagePostsCount = _context.sent;
287
297
 
288
298
  // need to exclude slideshows from body due to the affiliate slider
289
299
  if (partnerDetails && partnerDetails.description) {
@@ -292,19 +302,9 @@ PartnerDetails.returnGetInitialProps = function () {
292
302
  });
293
303
  }
294
304
 
295
- return _context.abrupt('return', {
296
- articles: articles,
297
- taxonomyDetails: taxonomyDetails,
298
- partnerDetails: category ? partnerDetails.partner : partnerDetails,
299
- features: features,
300
- featureQuery: featureQuery,
301
- partnerQuery: partnerQuery,
302
- taxonomyQuery: taxonomyQuery,
303
- articlesQuery: articlesQuery,
304
- nextPagePostsCount: nextPagePostsCount
305
- });
305
+ return _context.abrupt('return', { articles: articles, taxonomyDetails: taxonomyDetails, partnerDetails: category ? partnerDetails.partner : partnerDetails, features: features, featureQuery: featureQuery, partnerQuery: partnerQuery, taxonomyQuery: taxonomyQuery, articlesQuery: articlesQuery });
306
306
 
307
- case 23:
307
+ case 19:
308
308
  case 'end':
309
309
  return _context.stop();
310
310
  }
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
11
11
  import Breadcrumbs from './Breadcrumbs.js';
12
12
  import Feature from './Feature.js';
13
13
  import urlFor from './urlFor.js';
14
- import { g as getSerializers } from './index-e89d33c8.js';
14
+ import { g as getSerializers } from './index-264bbd3c.js';
15
15
  import { B as BlockContent } from './BlockContent-1e73bd2c.js';
16
16
  import './_commonjsHelpers-0c4b6f40.js';
17
17
  import './core.get-iterator-method-ea258bb1.js';
@@ -23,14 +23,15 @@ import 'prop-types';
23
23
  import './smoothscroll-fa4e3f8c.js';
24
24
  import './toConsumableArray-f7074d7c.js';
25
25
  import 'react-bootstrap';
26
- import './index-5cc7b406.js';
26
+ import './index-f0fc23eb.js';
27
+ import './events-6c3a7a63.js';
27
28
  import 'next/router';
28
29
  import './index-755f2cc2.js';
29
30
  import 'react-dom';
30
31
  import './lodash-f97fd99a.js';
31
32
  import './main-1894c974.js';
32
33
  import './entities-6d9154b4.js';
33
- import './ADInfeed-0852ff35.js';
34
+ import './ADInfeed-6d1fc6bf.js';
34
35
  import 'react-bootstrap/Card';
35
36
  import './AdSlot.js';
36
37
  import './debounce-533d9748.js';
@@ -40,10 +41,11 @@ import './Beam.js';
40
41
  import './stringify-2b084bee.js';
41
42
  import './Segment.js';
42
43
  import './AuthorComponent-11adff02.js';
43
- import './ADlgInfeed-5fb3b724.js';
44
+ import './ADlgInfeed-dc36c928.js';
44
45
  import './getContentCategory-15dcc413.js';
45
46
  import './timeDifferenceCalc.js';
46
- import './Pagination-dc30727b.js';
47
+ import './Pagination-cd21f8c2.js';
48
+ import 'react-paginate';
47
49
  import 'react-bootstrap/Button';
48
50
  import './index.esm-1bd8a0a8.js';
49
51
  import './iconBase-ccc56b97.js';
@@ -0,0 +1,215 @@
1
+ import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-958ef5fc.js';
2
+ import { _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
3
+ import { _ as _JSON$stringify } from './stringify-2b084bee.js';
4
+ import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
5
+ import { m as moment } from './moment-bc12cb97.js';
6
+ import React__default, { useState, useEffect } from 'react';
7
+ import { Col, Row } from 'react-bootstrap';
8
+ import './_commonjsHelpers-0c4b6f40.js';
9
+ import './core.get-iterator-method-ea258bb1.js';
10
+ import './web.dom.iterable-ab4dea5c.js';
11
+ import './_library-528f1934.js';
12
+ import './_iter-detect-98db3b07.js';
13
+
14
+ var _this2 = undefined;
15
+
16
+ function PtceDeck(props) {
17
+ var _this = this;
18
+
19
+ var initialData = props.initialData;
20
+
21
+ var _useState = useState(),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ cmeData = _useState2[0],
24
+ setCmeData = _useState2[1];
25
+
26
+ var _useState3 = useState(),
27
+ _useState4 = _slicedToArray(_useState3, 2),
28
+ hasMore = _useState4[0],
29
+ setHasMore = _useState4[1];
30
+
31
+ var _useState5 = useState(),
32
+ _useState6 = _slicedToArray(_useState5, 2),
33
+ paginatedPoint = _useState6[0],
34
+ setPaginatedPoint = _useState6[1];
35
+
36
+ useEffect(function () {
37
+ //set inital data
38
+
39
+ if (initialData && initialData.pageInfo) {
40
+ setHasMore(initialData.pageInfo.hasMore);
41
+ setPaginatedPoint(initialData.pageInfo.cursor);
42
+ setCmeData(initialData.contentItems);
43
+ }
44
+ //set hasMore and breakpoint
45
+ }, []);
46
+
47
+ var loadMore = function () {
48
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
49
+ var response, data;
50
+ return regenerator.wrap(function _callee$(_context) {
51
+ while (1) {
52
+ switch (_context.prev = _context.next) {
53
+ case 0:
54
+ _context.next = 2;
55
+ return fetch('/api/get_activities-CE', {
56
+ headers: {
57
+ 'Content-Type': 'application/json',
58
+ Accept: 'application/json'
59
+ },
60
+ method: 'post',
61
+ credentials: 'same-origin',
62
+ body: _JSON$stringify({ params: { paginatedPoint: paginatedPoint } })
63
+ });
64
+
65
+ case 2:
66
+ response = _context.sent;
67
+ _context.next = 5;
68
+ return response.json();
69
+
70
+ case 5:
71
+ data = _context.sent;
72
+
73
+
74
+ if (data.pageInfo) {
75
+ setHasMore(data.pageInfo.hasMore);
76
+ setPaginatedPoint(data.pageInfo.cursor);
77
+ setCmeData(function (prevState) {
78
+ return [].concat(_toConsumableArray(prevState), _toConsumableArray(data.contentItems));
79
+ });
80
+ }
81
+ console.log('data', data);
82
+
83
+ case 8:
84
+ case 'end':
85
+ return _context.stop();
86
+ }
87
+ }
88
+ }, _callee, _this);
89
+ }));
90
+
91
+ return function loadMore() {
92
+ return _ref.apply(this, arguments);
93
+ };
94
+ }();
95
+
96
+ return React__default.createElement(
97
+ 'div',
98
+ null,
99
+ cmeData && cmeData.map(function (activity) {
100
+
101
+ var href = activity.url ? activity.url : 'https://www.pharmacytimes.org/courses/' + activity.slug;
102
+
103
+ return React__default.createElement(
104
+ Col,
105
+ { xl: 12, style: { marginBottom: '1rem' } },
106
+ React__default.createElement(
107
+ Row,
108
+ null,
109
+ React__default.createElement(
110
+ Col,
111
+ { xs: 3, sm: 4, md: 4, lg: 4, xl: 4, style: { padding: '0' } },
112
+ React__default.createElement(
113
+ 'a',
114
+ { href: href, rel: 'noopener', target: '_blank' },
115
+ React__default.createElement('img', { style: { width: '100%', borderRadius: '0 0 0 10%', marginBottom: '20px', borderTop: '1px solid #EEE' }, src: activity.asset })
116
+ )
117
+ ),
118
+ React__default.createElement(
119
+ Col,
120
+ { xs: 9, sm: 8, md: 8, lg: 8, xl: 8, style: { paddingTop: '10px', marginBottom: '20px', borderTop: '1px solid #EEE' } },
121
+ React__default.createElement(
122
+ 'a',
123
+ { href: href, rel: 'noopener', target: '_blank' },
124
+ React__default.createElement('h4', { className: 'mb-1', style: { fontWeight: '500', fontSize: '22px' }, dangerouslySetInnerHTML: { __html: activity.title } }),
125
+ React__default.createElement(
126
+ 'p',
127
+ { className: 'mb-2' },
128
+ 'Expiration Date: ',
129
+ moment(activity.courseEndDate).format('MMM Do YYYY')
130
+ ),
131
+ React__default.createElement('p', { dangerouslySetInnerHTML: { __html: activity.description } })
132
+ )
133
+ )
134
+ )
135
+ );
136
+ }),
137
+ hasMore && React__default.createElement(
138
+ 'div',
139
+ { className: 'text-center my-5' },
140
+ React__default.createElement(
141
+ 'button',
142
+ { onClick: loadMore, className: 'btn btn-lg btn-primary' },
143
+ 'Load More'
144
+ )
145
+ )
146
+ );
147
+ }
148
+
149
+ var getPtceActivities = function () {
150
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(params) {
151
+ var hasMore, response, data;
152
+ return regenerator.wrap(function _callee2$(_context2) {
153
+ while (1) {
154
+ switch (_context2.prev = _context2.next) {
155
+ case 0:
156
+ _context2.prev = 0;
157
+ hasMore = '';
158
+
159
+
160
+ if (params.paginatedPoint && params.paginatedPoint !== '') {
161
+ hasMore = '&cursor=' + params.paginatedPoint;
162
+ }
163
+ console.log(hasMore, 'has More', params);
164
+ _context2.next = 6;
165
+ return fetch('https://www.pharmacytimes.org/incoming/v2/content?types[]=courses&sort=publishDate:desc&query=status:published&limit=25' + hasMore, {
166
+ method: 'GET',
167
+ headers: { Authorization: 'Bearer drnc4y57arj3f190cpvqiwxt3cxpbken' }
168
+ });
169
+
170
+ case 6:
171
+ response = _context2.sent;
172
+ _context2.next = 9;
173
+ return response.json();
174
+
175
+ case 9:
176
+ data = _context2.sent;
177
+
178
+
179
+ data.contentItems = data.contentItems.filter(function (course) {
180
+ if (course.tags && course.tags[0] && course.tags[0].label == 'Hidden') {
181
+ return false;
182
+ }
183
+ course.pType_id = '1';
184
+ // course.expirationDate = moment(course.courseEndDate).format('MMM Do YYYY')
185
+
186
+ var current_date = new Date();
187
+ var courseEndDate = new Date(course.courseEndDate);
188
+
189
+ return current_date.getTime() < courseEndDate.getTime();
190
+ });
191
+
192
+ return _context2.abrupt('return', data);
193
+
194
+ case 14:
195
+ _context2.prev = 14;
196
+ _context2.t0 = _context2['catch'](0);
197
+
198
+ console.log(_context2.t0);
199
+ return _context2.abrupt('return', []);
200
+
201
+ case 18:
202
+ case 'end':
203
+ return _context2.stop();
204
+ }
205
+ }
206
+ }, _callee2, _this2, [[0, 14]]);
207
+ }));
208
+
209
+ return function getPtceActivities(_x) {
210
+ return _ref2.apply(this, arguments);
211
+ };
212
+ }();
213
+
214
+ export default PtceDeck;
215
+ export { getPtceActivities };
@@ -17,13 +17,14 @@ import './index.es-a6137319.js';
17
17
  import './moment-bc12cb97.js';
18
18
  import './visibility-sensor-72fd8f8b.js';
19
19
  import 'react-dom';
20
- import './index-5cc7b406.js';
20
+ import './index-f0fc23eb.js';
21
+ import './events-6c3a7a63.js';
21
22
  import 'prop-types';
22
23
  import 'next/router';
23
24
  import './index-755f2cc2.js';
24
25
  import './main-1894c974.js';
25
26
  import './entities-6d9154b4.js';
26
- import './ADInfeed-0852ff35.js';
27
+ import './ADInfeed-6d1fc6bf.js';
27
28
  import 'react-bootstrap/Card';
28
29
  import './AdSlot.js';
29
30
  import './debounce-533d9748.js';
@@ -34,7 +35,7 @@ import './stringify-2b084bee.js';
34
35
  import './Segment.js';
35
36
  import './AuthorComponent-11adff02.js';
36
37
  import './lodash-f97fd99a.js';
37
- import './ADlgInfeed-5fb3b724.js';
38
+ import './ADlgInfeed-dc36c928.js';
38
39
  import './getContentCategory-15dcc413.js';
39
40
  import './timeDifferenceCalc.js';
40
41
 
@@ -376,32 +376,32 @@ module.exports = { "default": set$1, __esModule: true };
376
376
 
377
377
  var _Set = unwrapExports(set);
378
378
 
379
- /* usage & query
380
- const Publication = (props) => {
381
- const { cache, pub, year } = props
382
- const targeting = {
383
- content_placement: [`/journals/${pub.identifier.current}`],
384
- document_url: [`/journals/${pub.identifier.current}`],
385
- }
386
- return (
387
- <Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
388
- <PublicationLanding publication={pub} year={year} href={'journals'} />
389
- </Shell>
390
- )
391
- }
392
- Publication.getInitialProps = async (ctx) => {
393
- const { query } = ctx
394
- const {
395
- query: { year },
396
- } = ctx
397
- const pub = await client.fetch(getQuery('publication'), query)
398
- **import urlFor from framework**
399
- pub.issues.map((issue) => {
400
- issue.thumbnail = urlFor({client, source: issue.thumbnail})
401
- })
402
- return { pub, year }
403
- }
404
- export default Publication
379
+ /* usage & query
380
+ const Publication = (props) => {
381
+ const { cache, pub, year } = props
382
+ const targeting = {
383
+ content_placement: [`/journals/${pub.identifier.current}`],
384
+ document_url: [`/journals/${pub.identifier.current}`],
385
+ }
386
+ return (
387
+ <Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
388
+ <PublicationLanding publication={pub} year={year} href={'journals'} />
389
+ </Shell>
390
+ )
391
+ }
392
+ Publication.getInitialProps = async (ctx) => {
393
+ const { query } = ctx
394
+ const {
395
+ query: { year },
396
+ } = ctx
397
+ const pub = await client.fetch(getQuery('publication'), query)
398
+ **import urlFor from framework**
399
+ pub.issues.map((issue) => {
400
+ issue.thumbnail = urlFor({client, source: issue.thumbnail})
401
+ })
402
+ return { pub, year }
403
+ }
404
+ export default Publication
405
405
  */
406
406
 
407
407
  var generateContentPlacements = function generateContentPlacements(issues) {
@@ -7,15 +7,15 @@ import urlFor from './urlFor.js';
7
7
  import { I as InfiniteScroll } from './index.es-a6137319.js';
8
8
  import { m as moment } from './moment-bc12cb97.js';
9
9
  import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
10
- import { l as lib_3 } from './index-5cc7b406.js';
10
+ import { l as lib_3 } from './index-f0fc23eb.js';
11
11
  import { useRouter } from 'next/router';
12
12
  import { L as LazyLoad } from './index-755f2cc2.js';
13
13
  import { m as main_43 } from './main-1894c974.js';
14
14
  import { c as clean_html_1 } from './entities-6d9154b4.js';
15
- import { A as ADInfeed } from './ADInfeed-0852ff35.js';
15
+ import { A as ADInfeed } from './ADInfeed-6d1fc6bf.js';
16
16
  import { A as AuthorComponent } from './AuthorComponent-11adff02.js';
17
17
  import { l as lodash } from './lodash-f97fd99a.js';
18
- import { A as ADlgInfeed } from './ADlgInfeed-5fb3b724.js';
18
+ import { A as ADlgInfeed } from './ADlgInfeed-dc36c928.js';
19
19
  import { g as getContentCategory } from './getContentCategory-15dcc413.js';
20
20
  import timeDifferenceCalc from './timeDifferenceCalc.js';
21
21
  import './_commonjsHelpers-0c4b6f40.js';
@@ -25,6 +25,7 @@ import './_iter-detect-98db3b07.js';
25
25
  import './_object-pie-133f504a.js';
26
26
  import './index-3f5c03b2.js';
27
27
  import 'react-dom';
28
+ import './events-6c3a7a63.js';
28
29
  import 'prop-types';
29
30
  import 'react-bootstrap/Card';
30
31
  import './AdSlot.js';
@@ -5,25 +5,26 @@ import { _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
5
5
  import React__default, { useState, useEffect, useRef } from 'react';
6
6
  import { Spinner, Container, Media } from 'react-bootstrap';
7
7
  import { m as moment } from './moment-bc12cb97.js';
8
- import { l as lib_3 } from './index-5cc7b406.js';
8
+ import { l as lib_3 } from './index-f0fc23eb.js';
9
9
  import { useRouter } from 'next/router';
10
10
  import { L as LazyLoad } from './index-755f2cc2.js';
11
11
  import { l as lodash } from './lodash-f97fd99a.js';
12
12
  import { m as main_43 } from './main-1894c974.js';
13
13
  import { c as clean_html_1 } from './entities-6d9154b4.js';
14
- import { A as ADInfeed } from './ADInfeed-0852ff35.js';
14
+ import { A as ADInfeed } from './ADInfeed-6d1fc6bf.js';
15
15
  import { A as AuthorComponent } from './AuthorComponent-11adff02.js';
16
- import { A as ADlgInfeed } from './ADlgInfeed-5fb3b724.js';
16
+ import { A as ADlgInfeed } from './ADlgInfeed-dc36c928.js';
17
17
  import { g as getContentCategory } from './getContentCategory-15dcc413.js';
18
18
  import timeDifferenceCalc from './timeDifferenceCalc.js';
19
19
  import urlFor from './urlFor.js';
20
- import { P as Pagination } from './Pagination-dc30727b.js';
20
+ import { P as Pagination } from './Pagination-cd21f8c2.js';
21
21
  import './_commonjsHelpers-0c4b6f40.js';
22
22
  import './core.get-iterator-method-ea258bb1.js';
23
23
  import './web.dom.iterable-ab4dea5c.js';
24
24
  import './_library-528f1934.js';
25
25
  import './_iter-detect-98db3b07.js';
26
26
  import './_object-pie-133f504a.js';
27
+ import './events-6c3a7a63.js';
27
28
  import 'prop-types';
28
29
  import 'react-dom';
29
30
  import 'react-bootstrap/Card';
@@ -35,6 +36,7 @@ import './Beam.js';
35
36
  import './stringify-2b084bee.js';
36
37
  import './Segment.js';
37
38
  import './index-3f5c03b2.js';
39
+ import 'react-paginate';
38
40
  import 'react-bootstrap/Button';
39
41
  import './index.esm-1bd8a0a8.js';
40
42
  import './iconBase-ccc56b97.js';
@@ -11,34 +11,34 @@ import './index-3f5c03b2.js';
11
11
  import 'react-dom';
12
12
  import 'prop-types';
13
13
 
14
- /*
15
- Sample query
16
- let references = ''
17
- if(article.taxonomyMapping.length > 0){
18
- article.taxonomyMapping.forEach((ref, index) => {
19
- references = references + `references('${ref._ref}') `
20
- if(index+1 !== article.taxonomyMapping.length){
21
- references = references + ` && `
22
- }
23
- })
24
- }
25
-
26
- const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
27
- ...,
28
- title,
29
- summary,
30
- thumbnail,
31
- url,
32
- published,
33
- authorMapping[]->,
34
- contentCategory->
35
- }`
36
- const relatedArticles = await client.fetch(relatedArticlesQuery)
37
-
38
- Sample usage
39
- <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
40
-
41
-
14
+ /*
15
+ Sample query
16
+ let references = ''
17
+ if(article.taxonomyMapping.length > 0){
18
+ article.taxonomyMapping.forEach((ref, index) => {
19
+ references = references + `references('${ref._ref}') `
20
+ if(index+1 !== article.taxonomyMapping.length){
21
+ references = references + ` && `
22
+ }
23
+ })
24
+ }
25
+
26
+ const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
27
+ ...,
28
+ title,
29
+ summary,
30
+ thumbnail,
31
+ url,
32
+ published,
33
+ authorMapping[]->,
34
+ contentCategory->
35
+ }`
36
+ const relatedArticles = await client.fetch(relatedArticlesQuery)
37
+
38
+ Sample usage
39
+ <RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
40
+
41
+
42
42
  */
43
43
  var RelatedContent = function RelatedContent(props) {
44
44
  var client = props.client,
@@ -14,16 +14,16 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
14
14
  _ref$className = _ref.className,
15
15
  className = _ref$className === undefined ? '' : _ref$className;
16
16
 
17
- /*
18
- Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
19
- example:
20
- <RelatedTopicDropdown
21
- page='/clinical'
22
- exclude="clinical"
23
- className='mb-3'
24
- parentTaxonomy={props.parentTaxonomy}
25
- subTaxonomies={props.subTaxonomies}
26
- />
17
+ /*
18
+ Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
19
+ example:
20
+ <RelatedTopicDropdown
21
+ page='/clinical'
22
+ exclude="clinical"
23
+ className='mb-3'
24
+ parentTaxonomy={props.parentTaxonomy}
25
+ subTaxonomies={props.subTaxonomies}
26
+ />
27
27
  */
28
28
  if (subTaxonomies.length === 0 && parentTaxonomy) {
29
29
  if (parentTaxonomy.identifier == exclude) {
@@ -3,15 +3,16 @@ import { _ as _extends } from './extends-6d8e3924.js';
3
3
  import { _ as _slicedToArray } from './slicedToArray-6ebcbfea.js';
4
4
  import React__default, { useState, useEffect, useRef } from 'react';
5
5
  import { useRouter } from 'next/router';
6
- import { l as lib_3 } from './index-5cc7b406.js';
6
+ import { l as lib_3 } from './index-f0fc23eb.js';
7
7
  import { I as InfiniteScroll } from './index.es-a6137319.js';
8
- import { S as SeriesSlider } from './SeriesSlider-e495571f.js';
8
+ import { S as SeriesSlider } from './SeriesSlider-f771e20d.js';
9
9
  import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
10
10
  import './_commonjsHelpers-0c4b6f40.js';
11
11
  import './core.get-iterator-method-ea258bb1.js';
12
12
  import './_iter-detect-98db3b07.js';
13
13
  import './_object-pie-133f504a.js';
14
14
  import './web.dom.iterable-ab4dea5c.js';
15
+ import './events-6c3a7a63.js';
15
16
  import 'prop-types';
16
17
  import './index-c7e2ac95.js';
17
18
  import './index-755f2cc2.js';
@@ -6,10 +6,10 @@ import { s as smoothscroll } from './smoothscroll-fa4e3f8c.js';
6
6
  import urlFor from './urlFor.js';
7
7
  import { m as main_43, a as main_49, b as main_42 } from './main-1894c974.js';
8
8
 
9
- /*
10
- GROQ query -
11
- accepts an array of title, URL
12
- `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
9
+ /*
10
+ GROQ query -
11
+ accepts an array of title, URL
12
+ `https://img.youtube.com/vi/${getYouTubeId(vid.url)}/hqdefault.jpg`
13
13
  */
14
14
 
15
15
  var SeriesSlider = function SeriesSlider(_ref) {