@mjhls/mjh-framework 1.0.445 → 1.0.447

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 (238) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/AD.js +32 -0
  3. package/dist/cjs/AD300x250.js +60 -0
  4. package/dist/cjs/AD300x250x600.js +60 -0
  5. package/dist/cjs/AD728x90.js +106 -0
  6. package/dist/cjs/ADFloatingFooter.js +139 -0
  7. package/dist/cjs/ADFooter.js +45 -0
  8. package/dist/cjs/ADGutter.js +88 -0
  9. package/dist/cjs/{ADInfeed-ae1f348d.js → ADInfeed-7609d929.js} +2 -2
  10. package/dist/cjs/ADSponsoredResources.js +106 -0
  11. package/dist/cjs/ADWelcome.js +150 -0
  12. package/dist/cjs/{ADlgInfeed-f4c4a1bf.js → ADlgInfeed-700551ef.js} +2 -2
  13. package/dist/cjs/AccordionPanel.js +95 -0
  14. package/dist/cjs/AdSlot.js +166 -0
  15. package/dist/cjs/AdSlotsProvider.js +31 -0
  16. package/dist/cjs/AlphabeticList.js +137 -0
  17. package/dist/cjs/ArticleQueue.js +863 -0
  18. package/dist/cjs/Auth.js +3950 -0
  19. package/dist/cjs/{AuthorComponent-b44bb44e.js → AuthorComponent-5bb8f868.js} +1 -1
  20. package/dist/cjs/Beam.js +347 -0
  21. package/dist/cjs/{TaxonomyCard-fa09aac1.js → BlockContent-80608595.js} +0 -236
  22. package/dist/cjs/Breadcrumbs.js +108 -0
  23. package/dist/cjs/CMEDeck.js +454 -0
  24. package/dist/cjs/Column1.js +39 -0
  25. package/dist/cjs/Column2.js +67 -0
  26. package/dist/cjs/Column3.js +141 -0
  27. package/dist/cjs/ConferenceArticleCard.js +91 -0
  28. package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
  29. package/dist/cjs/DeckContent.js +24 -13
  30. package/dist/cjs/DeckQueue.js +17 -10
  31. package/dist/cjs/{Dfp-d7639f4c.js → Dfp-19f10ad4.js} +8 -5
  32. package/dist/cjs/EventsDeck.js +1999 -0
  33. package/dist/cjs/Feature.js +120 -0
  34. package/dist/cjs/{Figure-cc919c38.js → Figure-ce37247b.js} +3 -2
  35. package/dist/cjs/ForbesHero.js +140 -0
  36. package/dist/cjs/GridContent.js +721 -33
  37. package/dist/cjs/GridHero.js +145 -0
  38. package/dist/cjs/GroupDeck.js +5 -3
  39. package/dist/cjs/HamMagazine.js +477 -0
  40. package/dist/cjs/Header.js +37 -0
  41. package/dist/cjs/Hero.js +56 -0
  42. package/dist/cjs/HighlightenVideo.js +69 -0
  43. package/dist/cjs/HorizontalHero.js +109 -0
  44. package/dist/cjs/InscreenSensor-04a70c60.js +864 -0
  45. package/dist/cjs/IssueContentDeck.js +4 -3
  46. package/dist/cjs/IssueDeck.js +6 -4
  47. package/dist/cjs/IssueLanding.js +115 -0
  48. package/dist/cjs/KMTracker.js +27 -0
  49. package/dist/cjs/LeftNav.js +99 -0
  50. package/dist/cjs/MasterDeck.js +15 -8
  51. package/dist/cjs/NavDvm.js +223 -0
  52. package/dist/cjs/NavFooter-3dcd99a8.js +66 -0
  53. package/dist/cjs/NavMagazine.js +436 -0
  54. package/dist/cjs/NavNative.js +278 -0
  55. package/dist/cjs/NavNormal.js +109 -0
  56. package/dist/cjs/OncliveHero.js +78 -0
  57. package/dist/cjs/OncliveLargeHero.js +243 -0
  58. package/dist/cjs/PageFilter.js +73 -0
  59. package/dist/cjs/PdfDownload.js +28 -0
  60. package/dist/cjs/PopUpModal.js +59 -0
  61. package/dist/cjs/PublicationLanding.js +556 -0
  62. package/dist/cjs/QueueDeckExpanded.js +20 -11
  63. package/dist/cjs/RelatedContent.js +107 -0
  64. package/dist/cjs/RelatedTopicsDropdown.js +90 -0
  65. package/dist/cjs/Search.js +67 -0
  66. package/dist/cjs/Segment.js +225 -0
  67. package/dist/cjs/SetCookie.js +10 -0
  68. package/dist/cjs/SideFooter.js +103 -0
  69. package/dist/cjs/SocialNavFooter-d9ab4d17.js +83 -0
  70. package/dist/cjs/SocialShare.js +72 -0
  71. package/dist/cjs/TaxonomyCard.js +241 -11
  72. package/dist/cjs/TemplateNormal.js +175 -13
  73. package/dist/cjs/Ustream.js +107 -6
  74. package/dist/cjs/VerticalHero.js +75 -0
  75. package/dist/cjs/VideoSeriesFilter.js +133 -0
  76. package/dist/cjs/VideoSeriesListing.js +13 -7
  77. package/dist/cjs/View.js +1156 -0
  78. package/dist/cjs/YahooHero.js +129 -0
  79. package/dist/cjs/YoutubeGroup.js +5 -3
  80. package/dist/cjs/_arrayMap-3b4a0f75.js +91 -0
  81. package/dist/cjs/_is-array-754e012d.js +74 -0
  82. package/dist/cjs/{_iter-detect-234453c3.js → _iter-detect-4d0352f8.js} +4 -4
  83. package/dist/cjs/_object-sap-5e74ba08.js +16 -0
  84. package/dist/cjs/_set-species-4458e975.js +56 -0
  85. package/dist/cjs/{AdSlot-257d8d4e.js → asyncToGenerator-db08763c.js} +1 -710
  86. package/dist/cjs/brightcove-react-player-loader.es-4ba0d3d5.js +2231 -0
  87. package/dist/cjs/{web.dom.iterable-5c889cf1.js → core.get-iterator-method-41e87ec1.js} +0 -46
  88. package/dist/cjs/debounce-32e57002.js +280 -0
  89. package/dist/cjs/{toConsumableArray-25d0e2a3.js → from-ea347372.js} +4 -29
  90. package/dist/cjs/{get-7a75c563.js → get-5dfcdc33.js} +14 -100
  91. package/dist/cjs/getKeywords.js +31 -0
  92. package/dist/cjs/getQuery.js +20 -0
  93. package/dist/cjs/getSerializers.js +8032 -0
  94. package/dist/cjs/getSeriesDetail.js +38 -0
  95. package/dist/cjs/getTargeting-3ced038f.js +108 -0
  96. package/dist/cjs/getTargeting.js +15 -0
  97. package/dist/cjs/iconBase-637d3f1e.js +83 -0
  98. package/dist/cjs/{debounce-420ff8a8.js → index-b2448ff6.js} +0 -483
  99. package/dist/cjs/index.esm-25423c2f.js +16 -0
  100. package/dist/cjs/index.esm-c0d8b44b.js +21 -0
  101. package/dist/cjs/index.esm-fcdbd2c6.js +31 -0
  102. package/dist/cjs/index.js +190 -23088
  103. package/dist/cjs/{inherits-b4036c94.js → inherits-4a2f1cc3.js} +6 -17
  104. package/dist/cjs/isSymbol-488934a7.js +211 -0
  105. package/dist/cjs/js.cookie-a511c430.js +160 -0
  106. package/dist/cjs/keys-a586b7a0.js +25 -0
  107. package/dist/cjs/{promise-0a493c7a.js → promise-074978a7.js} +15 -62
  108. package/dist/cjs/{slicedToArray-419d467a.js → slicedToArray-8063ee51.js} +5 -4
  109. package/dist/cjs/stringify-7c5aff47.js +17 -0
  110. package/dist/cjs/toConsumableArray-ca04303b.js +31 -0
  111. package/dist/cjs/{typeof-0d86b91c.js → typeof-583cdc4b.js} +20 -87
  112. package/dist/cjs/urlFor.js +10 -0
  113. package/dist/cjs/util-f2c1b65b.js +576 -0
  114. package/dist/cjs/web.dom.iterable-43c3e277.js +51 -0
  115. package/dist/esm/AD.js +26 -0
  116. package/dist/esm/AD300x250.js +54 -0
  117. package/dist/esm/AD300x250x600.js +54 -0
  118. package/dist/esm/AD728x90.js +100 -0
  119. package/dist/esm/ADFloatingFooter.js +133 -0
  120. package/dist/esm/ADFooter.js +39 -0
  121. package/dist/esm/ADGutter.js +82 -0
  122. package/dist/esm/{ADInfeed-dff74bbe.js → ADInfeed-1c17dc0e.js} +1 -1
  123. package/dist/esm/ADSponsoredResources.js +100 -0
  124. package/dist/esm/ADWelcome.js +144 -0
  125. package/dist/esm/{ADlgInfeed-7b29db85.js → ADlgInfeed-94d7f5dd.js} +1 -1
  126. package/dist/esm/AccordionPanel.js +88 -0
  127. package/dist/esm/AdSlot.js +159 -0
  128. package/dist/esm/AdSlotsProvider.js +25 -0
  129. package/dist/esm/AlphabeticList.js +131 -0
  130. package/dist/esm/ArticleQueue.js +855 -0
  131. package/dist/esm/Auth.js +3930 -0
  132. package/dist/esm/{AuthorComponent-4f5f15ed.js → AuthorComponent-f67cb027.js} +1 -1
  133. package/dist/esm/Beam.js +345 -0
  134. package/dist/esm/{TaxonomyCard-b22a742f.js → BlockContent-4af2feb9.js} +2 -233
  135. package/dist/esm/Breadcrumbs.js +101 -0
  136. package/dist/esm/CMEDeck.js +448 -0
  137. package/dist/esm/Column1.js +29 -0
  138. package/dist/esm/Column2.js +57 -0
  139. package/dist/esm/Column3.js +131 -0
  140. package/dist/esm/ConferenceArticleCard.js +85 -0
  141. package/dist/esm/ConferenceBanner-9162d0ca.js +18 -0
  142. package/dist/esm/DeckContent.js +24 -13
  143. package/dist/esm/DeckQueue.js +17 -10
  144. package/dist/esm/{Dfp-994cd0ab.js → Dfp-7addbfb1.js} +7 -4
  145. package/dist/esm/EventsDeck.js +1987 -0
  146. package/dist/esm/Feature.js +113 -0
  147. package/dist/esm/{Figure-1c55ebf0.js → Figure-408929f3.js} +4 -3
  148. package/dist/esm/ForbesHero.js +134 -0
  149. package/dist/esm/GridContent.js +714 -30
  150. package/dist/esm/GridHero.js +139 -0
  151. package/dist/esm/GroupDeck.js +6 -4
  152. package/dist/esm/HamMagazine.js +465 -0
  153. package/dist/esm/Header.js +28 -0
  154. package/dist/esm/Hero.js +50 -0
  155. package/dist/esm/HighlightenVideo.js +63 -0
  156. package/dist/esm/HorizontalHero.js +103 -0
  157. package/dist/esm/InscreenSensor-b7f931bf.js +857 -0
  158. package/dist/esm/IssueContentDeck.js +5 -4
  159. package/dist/esm/IssueDeck.js +8 -6
  160. package/dist/esm/IssueLanding.js +109 -0
  161. package/dist/esm/KMTracker.js +25 -0
  162. package/dist/esm/LeftNav.js +90 -0
  163. package/dist/esm/MasterDeck.js +17 -10
  164. package/dist/esm/NavDvm.js +211 -0
  165. package/dist/esm/NavFooter-c29526b7.js +60 -0
  166. package/dist/esm/NavMagazine.js +424 -0
  167. package/dist/esm/NavNative.js +266 -0
  168. package/dist/esm/NavNormal.js +97 -0
  169. package/dist/esm/OncliveHero.js +72 -0
  170. package/dist/esm/OncliveLargeHero.js +237 -0
  171. package/dist/esm/PageFilter.js +67 -0
  172. package/dist/esm/PdfDownload.js +22 -0
  173. package/dist/esm/PopUpModal.js +52 -0
  174. package/dist/esm/PublicationLanding.js +546 -0
  175. package/dist/esm/QueueDeckExpanded.js +22 -13
  176. package/dist/esm/RelatedContent.js +101 -0
  177. package/dist/esm/RelatedTopicsDropdown.js +82 -0
  178. package/dist/esm/Search.js +58 -0
  179. package/dist/esm/Segment.js +223 -0
  180. package/dist/esm/SetCookie.js +8 -0
  181. package/dist/esm/SideFooter.js +97 -0
  182. package/dist/esm/SocialNavFooter-1a531144.js +77 -0
  183. package/dist/esm/SocialShare.js +65 -0
  184. package/dist/esm/TaxonomyCard.js +237 -11
  185. package/dist/esm/TemplateNormal.js +175 -14
  186. package/dist/esm/Ustream.js +107 -6
  187. package/dist/esm/VerticalHero.js +69 -0
  188. package/dist/esm/VideoSeriesFilter.js +127 -0
  189. package/dist/esm/VideoSeriesListing.js +14 -8
  190. package/dist/esm/View.js +1145 -0
  191. package/dist/esm/YahooHero.js +123 -0
  192. package/dist/esm/YoutubeGroup.js +6 -4
  193. package/dist/esm/_arrayMap-a8dd2b2c.js +87 -0
  194. package/dist/esm/_is-array-dd5523d6.js +71 -0
  195. package/dist/esm/{_iter-detect-7c281f0a.js → _iter-detect-6e099a34.js} +2 -2
  196. package/dist/esm/_object-sap-56bb8073.js +14 -0
  197. package/dist/esm/_set-species-6f64f1c1.js +51 -0
  198. package/dist/esm/{_to-object-1b1f7766.js → _to-object-16fd8b46.js} +1 -1
  199. package/dist/esm/{AdSlot-362a1c30.js → asyncToGenerator-204b5a5c.js} +3 -703
  200. package/dist/esm/brightcove-react-player-loader.es-e1c6b0f2.js +2225 -0
  201. package/dist/esm/{web.dom.iterable-e6bf2bf6.js → core.get-iterator-method-f5c0d66a.js} +2 -47
  202. package/dist/esm/debounce-8cd9e09c.js +277 -0
  203. package/dist/esm/{extends-92072fff.js → extends-6e00b262.js} +1 -1
  204. package/dist/esm/{toConsumableArray-c5e2fde8.js → from-2c0a5f49.js} +4 -29
  205. package/dist/esm/{get-bc6cf9fb.js → get-ae817b75.js} +3 -86
  206. package/dist/esm/getKeywords.js +29 -0
  207. package/dist/esm/getQuery.js +18 -0
  208. package/dist/esm/getSerializers.js +8021 -0
  209. package/dist/esm/getSeriesDetail.js +36 -0
  210. package/dist/esm/getTargeting-8f4bd5db.js +105 -0
  211. package/dist/esm/getTargeting.js +9 -0
  212. package/dist/esm/iconBase-6ee2f2fb.js +81 -0
  213. package/dist/esm/{debounce-42a7f724.js → index-fb49124c.js} +2 -476
  214. package/dist/esm/index.esm-9d6faf80.js +17 -0
  215. package/dist/esm/index.esm-a7ad65ba.js +13 -0
  216. package/dist/esm/{index.esm-536609db.js → index.esm-b97cf389.js} +2 -80
  217. package/dist/esm/index.js +137 -23019
  218. package/dist/esm/{inherits-bbec2f34.js → inherits-2758cc14.js} +5 -15
  219. package/dist/esm/isSymbol-c1b9be80.js +203 -0
  220. package/dist/esm/js.cookie-6874175c.js +158 -0
  221. package/dist/esm/keys-04cdec91.js +23 -0
  222. package/dist/esm/{main-cf4930f0.js → main-8c8784b8.js} +1 -1
  223. package/dist/esm/{promise-2592a80a.js → promise-53143c9a.js} +6 -49
  224. package/dist/esm/{slicedToArray-04e02710.js → slicedToArray-f1e40361.js} +3 -2
  225. package/dist/esm/stringify-e30bc114.js +15 -0
  226. package/dist/esm/toConsumableArray-8712d678.js +29 -0
  227. package/dist/esm/{typeof-09bf9211.js → typeof-7e72fee0.js} +5 -70
  228. package/dist/esm/urlFor.js +8 -0
  229. package/dist/esm/util-7700fc59.js +574 -0
  230. package/dist/esm/web.dom.iterable-46c95e52.js +49 -0
  231. package/package.json +1 -1
  232. package/dist/cjs/GridContent-6a0216fb.js +0 -728
  233. package/dist/cjs/Normal-430e8e61.js +0 -2315
  234. package/dist/cjs/Ustream-46288bdf.js +0 -119
  235. package/dist/cjs/index.esm-340d3792.js +0 -110
  236. package/dist/esm/GridContent-7e11f013.js +0 -717
  237. package/dist/esm/Normal-6efd92da.js +0 -2282
  238. package/dist/esm/Ustream-c4f281a3.js +0 -112
@@ -0,0 +1,67 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import './_to-object-16fd8b46.js';
3
+ import './core.get-iterator-method-f5c0d66a.js';
4
+ import './web.dom.iterable-46c95e52.js';
5
+ import React, { useState, useEffect, useRef } from 'react';
6
+ import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
7
+ import { Dropdown } from 'react-bootstrap';
8
+
9
+ var PageFilter = function PageFilter(props) {
10
+ var getParams = props.getParams,
11
+ filters = props.filters,
12
+ defaultFilter = props.defaultFilter;
13
+
14
+ var _useState = useState(''),
15
+ _useState2 = _slicedToArray(_useState, 2),
16
+ filter = _useState2[0],
17
+ setFilter = _useState2[1];
18
+
19
+ var usePrevious = function usePrevious(value) {
20
+ var ref = useRef();
21
+ useEffect(function () {
22
+ ref.current = value;
23
+ });
24
+ return ref.current;
25
+ };
26
+
27
+ var sortAttr = usePrevious({ filter: filter });
28
+
29
+ useEffect(function () {
30
+ if (sortAttr && sortAttr.filter !== filter) {
31
+ getParams(filter);
32
+ }
33
+ }, [filter, sortAttr, getParams]);
34
+
35
+ if (filters.length) {
36
+ return React.createElement(
37
+ Dropdown,
38
+ { alignRight: true },
39
+ React.createElement(
40
+ Dropdown.Toggle,
41
+ { className: 'filter-dropdown', id: 'filter-dropdown' },
42
+ filter || defaultFilter
43
+ ),
44
+ React.createElement(
45
+ Dropdown.Menu,
46
+ { className: 'select-dropdown' },
47
+ filters.map(function (filter, index) {
48
+ return React.createElement(
49
+ Dropdown.Item,
50
+ { key: index, onClick: function onClick() {
51
+ return setFilter(filter);
52
+ } },
53
+ filter
54
+ );
55
+ })
56
+ ),
57
+ React.createElement(
58
+ 'style',
59
+ { jsx: 'true' },
60
+ '\n .filter-dropdown {\n float: right;\n }\n .select-dropdown > a {\n color: #8e8c84;\n }\n '
61
+ )
62
+ );
63
+ }
64
+ return null;
65
+ };
66
+
67
+ export default PageFilter;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import './iconBase-6ee2f2fb.js';
3
+ import { b as MdPictureAsPdf } from './index.esm-9d6faf80.js';
4
+
5
+ var PdfDownload = function PdfDownload(props) {
6
+ return React.createElement(
7
+ 'div',
8
+ { className: 'pdf-download', style: { textAlign: 'center', padding: '1rem 0', borderTop: '1px solid #eee', marginTop: '1rem' } },
9
+ React.createElement(
10
+ 'a',
11
+ { href: props.issueInfo.asset.url, target: '_blank' },
12
+ React.createElement(MdPictureAsPdf, { style: { fontSize: '65px', color: '#ff0000' } }),
13
+ React.createElement(
14
+ 'span',
15
+ null,
16
+ 'Click to download this publication issue.'
17
+ )
18
+ )
19
+ );
20
+ };
21
+
22
+ export default PdfDownload;
@@ -0,0 +1,52 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import './_to-object-16fd8b46.js';
3
+ import './core.get-iterator-method-f5c0d66a.js';
4
+ import './web.dom.iterable-46c95e52.js';
5
+ import React, { useState } from 'react';
6
+ import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
7
+ import Modal from 'react-bootstrap/Modal';
8
+
9
+ var PopUpModal = function PopUpModal(props) {
10
+ var _ref = props.ModalImage ? useState(true) : useState(false),
11
+ _ref2 = _slicedToArray(_ref, 2),
12
+ show = _ref2[0],
13
+ setShow = _ref2[1];
14
+
15
+ var launchModalButton = function launchModalButton(e) {
16
+ window.open(props.landingURL, '_blank');
17
+ setShow(false);
18
+ };
19
+
20
+ return React.createElement(
21
+ Modal,
22
+ { show: show, onHide: function onHide() {
23
+ return setShow(false);
24
+ }, 'aria-labelledby': 'Popup-Modal' },
25
+ React.createElement(Modal.Title, null),
26
+ React.createElement(
27
+ Modal.Body,
28
+ null,
29
+ React.createElement(
30
+ 'div',
31
+ { className: 'modalImageHolder' },
32
+ React.createElement('img', { className: 'modalImage', src: props.ModalImage, onClick: function onClick() {
33
+ return launchModalButton();
34
+ } }),
35
+ React.createElement(
36
+ 'div',
37
+ { className: 'modalClose', onClick: function onClick() {
38
+ return setShow(false);
39
+ } },
40
+ 'X'
41
+ )
42
+ )
43
+ ),
44
+ React.createElement(
45
+ 'style',
46
+ { jsx: 'true' },
47
+ '\n .modalImageHolder {\n display: flex;\n justify-content: center;\n }\n .modalClose {\n display: flex;\n justify-content: center;\n width: 25px;\n height: 25px;\n font-size: 1.25rem;\n color: #fff;\n cursor: pointer;\n }\n .modalImage {\n cursor: pointer;\n }\n '
48
+ )
49
+ );
50
+ };
51
+
52
+ export default PopUpModal;
@@ -0,0 +1,546 @@
1
+ import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
+ import { _ as _isObject, a as _ctx, b as _descriptors, c as _objectDp, d as _toObject, e as _iobject, f as _toLength, g as _global, h as _fails, i as _hide, j as _export, k as _aFunction, l as _core } from './_to-object-16fd8b46.js';
3
+ import { _ as _objectCreate, a as _iterDefine, b as _wks, c as _setToStringTag, d as _classof } from './core.get-iterator-method-f5c0d66a.js';
4
+ import './_iter-detect-6e099a34.js';
5
+ import './from-2c0a5f49.js';
6
+ import { _ as _toConsumableArray } from './toConsumableArray-8712d678.js';
7
+ import { _ as _iterStep } from './web.dom.iterable-46c95e52.js';
8
+ import { _ as _meta, a as _isArray } from './_is-array-dd5523d6.js';
9
+ import React, { useState, useEffect } from 'react';
10
+ import Row from 'react-bootstrap/Row';
11
+ import Col from 'react-bootstrap/Col';
12
+ import Card from 'react-bootstrap/Card';
13
+ import { useRouter } from 'next/router';
14
+ import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
15
+ import { _ as _anInstance, a as _forOf, b as _redefineAll, c as _setSpecies } from './_set-species-6f64f1c1.js';
16
+ import Dropdown from 'react-bootstrap/Dropdown';
17
+
18
+ var _validateCollection = function (it, TYPE) {
19
+ if (!_isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
20
+ return it;
21
+ };
22
+
23
+ var dP = _objectDp.f;
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+ var fastKey = _meta.fastKey;
34
+
35
+ var SIZE = _descriptors ? '_s' : 'size';
36
+
37
+ var getEntry = function (that, key) {
38
+ // fast case
39
+ var index = fastKey(key);
40
+ var entry;
41
+ if (index !== 'F') return that._i[index];
42
+ // frozen object case
43
+ for (entry = that._f; entry; entry = entry.n) {
44
+ if (entry.k == key) return entry;
45
+ }
46
+ };
47
+
48
+ var _collectionStrong = {
49
+ getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
50
+ var C = wrapper(function (that, iterable) {
51
+ _anInstance(that, C, NAME, '_i');
52
+ that._t = NAME; // collection type
53
+ that._i = _objectCreate(null); // index
54
+ that._f = undefined; // first entry
55
+ that._l = undefined; // last entry
56
+ that[SIZE] = 0; // size
57
+ if (iterable != undefined) _forOf(iterable, IS_MAP, that[ADDER], that);
58
+ });
59
+ _redefineAll(C.prototype, {
60
+ // 23.1.3.1 Map.prototype.clear()
61
+ // 23.2.3.2 Set.prototype.clear()
62
+ clear: function clear() {
63
+ for (var that = _validateCollection(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
64
+ entry.r = true;
65
+ if (entry.p) entry.p = entry.p.n = undefined;
66
+ delete data[entry.i];
67
+ }
68
+ that._f = that._l = undefined;
69
+ that[SIZE] = 0;
70
+ },
71
+ // 23.1.3.3 Map.prototype.delete(key)
72
+ // 23.2.3.4 Set.prototype.delete(value)
73
+ 'delete': function (key) {
74
+ var that = _validateCollection(this, NAME);
75
+ var entry = getEntry(that, key);
76
+ if (entry) {
77
+ var next = entry.n;
78
+ var prev = entry.p;
79
+ delete that._i[entry.i];
80
+ entry.r = true;
81
+ if (prev) prev.n = next;
82
+ if (next) next.p = prev;
83
+ if (that._f == entry) that._f = next;
84
+ if (that._l == entry) that._l = prev;
85
+ that[SIZE]--;
86
+ } return !!entry;
87
+ },
88
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
89
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
90
+ forEach: function forEach(callbackfn /* , that = undefined */) {
91
+ _validateCollection(this, NAME);
92
+ var f = _ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
93
+ var entry;
94
+ while (entry = entry ? entry.n : this._f) {
95
+ f(entry.v, entry.k, this);
96
+ // revert to the last existing entry
97
+ while (entry && entry.r) entry = entry.p;
98
+ }
99
+ },
100
+ // 23.1.3.7 Map.prototype.has(key)
101
+ // 23.2.3.7 Set.prototype.has(value)
102
+ has: function has(key) {
103
+ return !!getEntry(_validateCollection(this, NAME), key);
104
+ }
105
+ });
106
+ if (_descriptors) dP(C.prototype, 'size', {
107
+ get: function () {
108
+ return _validateCollection(this, NAME)[SIZE];
109
+ }
110
+ });
111
+ return C;
112
+ },
113
+ def: function (that, key, value) {
114
+ var entry = getEntry(that, key);
115
+ var prev, index;
116
+ // change existing entry
117
+ if (entry) {
118
+ entry.v = value;
119
+ // create new entry
120
+ } else {
121
+ that._l = entry = {
122
+ i: index = fastKey(key, true), // <- index
123
+ k: key, // <- key
124
+ v: value, // <- value
125
+ p: prev = that._l, // <- previous entry
126
+ n: undefined, // <- next entry
127
+ r: false // <- removed
128
+ };
129
+ if (!that._f) that._f = entry;
130
+ if (prev) prev.n = entry;
131
+ that[SIZE]++;
132
+ // add to index
133
+ if (index !== 'F') that._i[index] = entry;
134
+ } return that;
135
+ },
136
+ getEntry: getEntry,
137
+ setStrong: function (C, NAME, IS_MAP) {
138
+ // add .keys, .values, .entries, [@@iterator]
139
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
140
+ _iterDefine(C, NAME, function (iterated, kind) {
141
+ this._t = _validateCollection(iterated, NAME); // target
142
+ this._k = kind; // kind
143
+ this._l = undefined; // previous
144
+ }, function () {
145
+ var that = this;
146
+ var kind = that._k;
147
+ var entry = that._l;
148
+ // revert to the last existing entry
149
+ while (entry && entry.r) entry = entry.p;
150
+ // get next entry
151
+ if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
152
+ // or finish the iteration
153
+ that._t = undefined;
154
+ return _iterStep(1);
155
+ }
156
+ // return step by kind
157
+ if (kind == 'keys') return _iterStep(0, entry.k);
158
+ if (kind == 'values') return _iterStep(0, entry.v);
159
+ return _iterStep(0, [entry.k, entry.v]);
160
+ }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
161
+
162
+ // add [@@species], 23.1.2.2, 23.2.2.2
163
+ _setSpecies(NAME);
164
+ }
165
+ };
166
+
167
+ var SPECIES = _wks('species');
168
+
169
+ var _arraySpeciesConstructor = function (original) {
170
+ var C;
171
+ if (_isArray(original)) {
172
+ C = original.constructor;
173
+ // cross-realm fallback
174
+ if (typeof C == 'function' && (C === Array || _isArray(C.prototype))) C = undefined;
175
+ if (_isObject(C)) {
176
+ C = C[SPECIES];
177
+ if (C === null) C = undefined;
178
+ }
179
+ } return C === undefined ? Array : C;
180
+ };
181
+
182
+ // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
183
+
184
+
185
+ var _arraySpeciesCreate = function (original, length) {
186
+ return new (_arraySpeciesConstructor(original))(length);
187
+ };
188
+
189
+ // 0 -> Array#forEach
190
+ // 1 -> Array#map
191
+ // 2 -> Array#filter
192
+ // 3 -> Array#some
193
+ // 4 -> Array#every
194
+ // 5 -> Array#find
195
+ // 6 -> Array#findIndex
196
+
197
+
198
+
199
+
200
+
201
+ var _arrayMethods = function (TYPE, $create) {
202
+ var IS_MAP = TYPE == 1;
203
+ var IS_FILTER = TYPE == 2;
204
+ var IS_SOME = TYPE == 3;
205
+ var IS_EVERY = TYPE == 4;
206
+ var IS_FIND_INDEX = TYPE == 6;
207
+ var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
208
+ var create = $create || _arraySpeciesCreate;
209
+ return function ($this, callbackfn, that) {
210
+ var O = _toObject($this);
211
+ var self = _iobject(O);
212
+ var f = _ctx(callbackfn, that, 3);
213
+ var length = _toLength(self.length);
214
+ var index = 0;
215
+ var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
216
+ var val, res;
217
+ for (;length > index; index++) if (NO_HOLES || index in self) {
218
+ val = self[index];
219
+ res = f(val, index, O);
220
+ if (TYPE) {
221
+ if (IS_MAP) result[index] = res; // map
222
+ else if (res) switch (TYPE) {
223
+ case 3: return true; // some
224
+ case 5: return val; // find
225
+ case 6: return index; // findIndex
226
+ case 2: result.push(val); // filter
227
+ } else if (IS_EVERY) return false; // every
228
+ }
229
+ }
230
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
231
+ };
232
+ };
233
+
234
+ var dP$1 = _objectDp.f;
235
+ var each = _arrayMethods(0);
236
+
237
+
238
+ var _collection = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
239
+ var Base = _global[NAME];
240
+ var C = Base;
241
+ var ADDER = IS_MAP ? 'set' : 'add';
242
+ var proto = C && C.prototype;
243
+ var O = {};
244
+ if (!_descriptors || typeof C != 'function' || !(IS_WEAK || proto.forEach && !_fails(function () {
245
+ new C().entries().next();
246
+ }))) {
247
+ // create collection constructor
248
+ C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
249
+ _redefineAll(C.prototype, methods);
250
+ _meta.NEED = true;
251
+ } else {
252
+ C = wrapper(function (target, iterable) {
253
+ _anInstance(target, C, NAME, '_c');
254
+ target._c = new Base();
255
+ if (iterable != undefined) _forOf(iterable, IS_MAP, target[ADDER], target);
256
+ });
257
+ each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','), function (KEY) {
258
+ var IS_ADDER = KEY == 'add' || KEY == 'set';
259
+ if (KEY in proto && !(IS_WEAK && KEY == 'clear')) _hide(C.prototype, KEY, function (a, b) {
260
+ _anInstance(this, C, KEY);
261
+ if (!IS_ADDER && IS_WEAK && !_isObject(a)) return KEY == 'get' ? undefined : false;
262
+ var result = this._c[KEY](a === 0 ? 0 : a, b);
263
+ return IS_ADDER ? this : result;
264
+ });
265
+ });
266
+ IS_WEAK || dP$1(C.prototype, 'size', {
267
+ get: function () {
268
+ return this._c.size;
269
+ }
270
+ });
271
+ }
272
+
273
+ _setToStringTag(C, NAME);
274
+
275
+ O[NAME] = C;
276
+ _export(_export.G + _export.W + _export.F, O);
277
+
278
+ if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
279
+
280
+ return C;
281
+ };
282
+
283
+ var SET = 'Set';
284
+
285
+ // 23.2 Set Objects
286
+ var es6_set = _collection(SET, function (get) {
287
+ return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
288
+ }, {
289
+ // 23.2.3.1 Set.prototype.add(value)
290
+ add: function add(value) {
291
+ return _collectionStrong.def(_validateCollection(this, SET), value = value === 0 ? 0 : value, value);
292
+ }
293
+ }, _collectionStrong);
294
+
295
+ var _arrayFromIterable = function (iter, ITERATOR) {
296
+ var result = [];
297
+ _forOf(iter, false, result.push, result, ITERATOR);
298
+ return result;
299
+ };
300
+
301
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
302
+
303
+
304
+ var _collectionToJson = function (NAME) {
305
+ return function toJSON() {
306
+ if (_classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
307
+ return _arrayFromIterable(this);
308
+ };
309
+ };
310
+
311
+ // https://github.com/DavidBruant/Map-Set.prototype.toJSON
312
+
313
+
314
+ _export(_export.P + _export.R, 'Set', { toJSON: _collectionToJson('Set') });
315
+
316
+ // https://tc39.github.io/proposal-setmap-offrom/
317
+
318
+
319
+ var _setCollectionOf = function (COLLECTION) {
320
+ _export(_export.S, COLLECTION, { of: function of() {
321
+ var length = arguments.length;
322
+ var A = new Array(length);
323
+ while (length--) A[length] = arguments[length];
324
+ return new this(A);
325
+ } });
326
+ };
327
+
328
+ // https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
329
+ _setCollectionOf('Set');
330
+
331
+ // https://tc39.github.io/proposal-setmap-offrom/
332
+
333
+
334
+
335
+
336
+
337
+ var _setCollectionFrom = function (COLLECTION) {
338
+ _export(_export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
339
+ var mapFn = arguments[1];
340
+ var mapping, A, n, cb;
341
+ _aFunction(this);
342
+ mapping = mapFn !== undefined;
343
+ if (mapping) _aFunction(mapFn);
344
+ if (source == undefined) return new this();
345
+ A = [];
346
+ if (mapping) {
347
+ n = 0;
348
+ cb = _ctx(mapFn, arguments[2], 2);
349
+ _forOf(source, false, function (nextItem) {
350
+ A.push(cb(nextItem, n++));
351
+ });
352
+ } else {
353
+ _forOf(source, false, A.push, A);
354
+ }
355
+ return new this(A);
356
+ } });
357
+ };
358
+
359
+ // https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
360
+ _setCollectionFrom('Set');
361
+
362
+ var set = _core.Set;
363
+
364
+ var set$1 = createCommonjsModule(function (module) {
365
+ module.exports = { "default": set, __esModule: true };
366
+ });
367
+
368
+ var _Set = unwrapExports(set$1);
369
+
370
+ /* usage & query
371
+ const Publication = (props) => {
372
+ const { cache, pub, year } = props
373
+
374
+ const targeting = {
375
+ content_placement: [`/journals/${pub.identifier.current}`],
376
+ document_url: [`/journals/${pub.identifier.current}`],
377
+ }
378
+
379
+ return (
380
+ <Shell title={pub.name} cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3'>
381
+ <PublicationLanding publication={pub} year={year} href={'journals'} />
382
+ </Shell>
383
+ )
384
+ }
385
+
386
+ Publication.getInitialProps = async (ctx) => {
387
+ const { query } = ctx
388
+ const {
389
+ query: { year },
390
+ } = ctx
391
+ const pub = await client.fetch(getQuery('publication'), query)
392
+ const builder = imageUrlBuilder(client)
393
+ const urlFor = (source) => {
394
+ return builder.image(source)
395
+ }
396
+ pub.issues.map((issue) => {
397
+ issue.thumbnail = urlFor(issue.thumbnail).url()
398
+ })
399
+ return { pub, year }
400
+ }
401
+
402
+ export default Publication
403
+ */
404
+
405
+ var PublicationLanding = function PublicationLanding(props) {
406
+ var publication = props.publication,
407
+ year = props.year,
408
+ href = props.href,
409
+ pdf = props.pdf;
410
+
411
+
412
+ var router = useRouter();
413
+ var years = [].concat(_toConsumableArray(new _Set(publication.issues.map(function (issue) {
414
+ return issue.year;
415
+ })))).sort().reverse();
416
+
417
+ var _useState = useState(publication.issues),
418
+ _useState2 = _slicedToArray(_useState, 2),
419
+ issueData = _useState2[0],
420
+ setIssueData = _useState2[1];
421
+
422
+ var _useState3 = useState(year ? year : years[0]),
423
+ _useState4 = _slicedToArray(_useState3, 2),
424
+ activeYear = _useState4[0],
425
+ setActiveYear = _useState4[1];
426
+
427
+ useEffect(function () {
428
+ router.push(router.pathname, '/' + (href ? href : 'publications') + '/' + publication.identifier.current + '?year=' + activeYear, { shallow: true });
429
+ setIssueData(function () {
430
+ return publication.issues.filter(function (issue) {
431
+ return issue.year === activeYear;
432
+ });
433
+ });
434
+ }, [activeYear]);
435
+
436
+ return React.createElement(
437
+ 'div',
438
+ { id: 'publicationLanding' },
439
+ React.createElement(
440
+ 'style',
441
+ { jsx: true },
442
+ '\n #pubYearFilter .dropdown-menu.show {\n max-height: 25vh;\n }\n '
443
+ ),
444
+ React.createElement(
445
+ Row,
446
+ { style: { marginBottom: '1rem' } },
447
+ React.createElement(
448
+ Col,
449
+ null,
450
+ React.createElement(
451
+ Dropdown,
452
+ { id: 'pubYearFilter' },
453
+ React.createElement(
454
+ Dropdown.Toggle,
455
+ null,
456
+ activeYear
457
+ ),
458
+ React.createElement(
459
+ Dropdown.Menu,
460
+ null,
461
+ years.map(function (yr, key) {
462
+ return React.createElement(
463
+ Dropdown.Item,
464
+ { key: key, onClick: function onClick() {
465
+ return setActiveYear(yr);
466
+ } },
467
+ yr
468
+ );
469
+ })
470
+ )
471
+ )
472
+ )
473
+ ),
474
+ issueData && issueData.length > 0 ? issueData.map(function (issue, key) {
475
+ return React.createElement(
476
+ Card,
477
+ { key: key, className: 'issueCard' },
478
+ React.createElement(
479
+ Row,
480
+ null,
481
+ React.createElement(
482
+ Col,
483
+ { md: 3, id: 'issueThumbnail' },
484
+ React.createElement(Card.Img, { src: issue.thumbnail })
485
+ ),
486
+ React.createElement(
487
+ Col,
488
+ { md: 9, id: 'issueDetail' },
489
+ React.createElement(
490
+ Card.Body,
491
+ null,
492
+ React.createElement(
493
+ Card.Title,
494
+ null,
495
+ issue.name
496
+ ),
497
+ issue.displayLabel && React.createElement(
498
+ 'p',
499
+ { className: 'badge badge-primary' },
500
+ issue.displayLabel
501
+ ),
502
+ issue.volume && issue.number && React.createElement(
503
+ 'p',
504
+ null,
505
+ 'Volume: ',
506
+ issue.volume,
507
+ React.createElement('br', null),
508
+ 'Issue: ',
509
+ issue.number
510
+ ),
511
+ React.createElement(
512
+ 'a',
513
+ { href: publication.identifier.current + '/' + issue.identifier.current, className: 'btn btn-primary', style: { marginTop: '20px', marginLeft: '1rem' } },
514
+ 'View Issue'
515
+ ),
516
+ issue.pdf && issue.pdf.asset && issue.pdf.asset.url && React.createElement(
517
+ 'a',
518
+ { href: issue.pdf.asset.url, target: '_blank', className: 'btn btn-primary', style: { marginTop: '20px', marginLeft: '1rem' } },
519
+ 'Download Issue'
520
+ )
521
+ )
522
+ )
523
+ )
524
+ );
525
+ }) : React.createElement(
526
+ 'div',
527
+ null,
528
+ React.createElement(
529
+ 'h5',
530
+ null,
531
+ React.createElement(
532
+ 'em',
533
+ { className: 'pl-3' },
534
+ 'New content coming soon, please check back later.'
535
+ )
536
+ )
537
+ ),
538
+ React.createElement(
539
+ 'style',
540
+ { jsx: 'true' },
541
+ '\n .issueCard.card:hover {\n cursor: default;\n }\n '
542
+ )
543
+ );
544
+ };
545
+
546
+ export default PublicationLanding;