@mjhls/mjh-framework 1.0.271 → 1.0.272

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 (44) hide show
  1. package/README.md +171 -171
  2. package/dist/cjs/{ADInfeed-0da6acd4.js → ADInfeed-f560c2f9.js} +1 -1
  3. package/dist/cjs/{AdSlot-93d892f5.js → AdSlot-f69a31ec.js} +1 -1
  4. package/dist/cjs/DeckContent.js +11 -11
  5. package/dist/cjs/DeckQueue.js +1 -1
  6. package/dist/cjs/{GridContent-524f2ad8.js → GridContent-df5951a1.js} +3 -3
  7. package/dist/cjs/GridContent.js +4 -4
  8. package/dist/cjs/IssueContentDeck.js +1 -1
  9. package/dist/cjs/IssueDeck.js +1 -1
  10. package/dist/cjs/MasterDeck.js +9 -9
  11. package/dist/cjs/{Normal-2eec2d56.js → Normal-47f04b2b.js} +70 -49
  12. package/dist/cjs/PublicationDeck.js +1 -1
  13. package/dist/cjs/QueueDeckExpanded.js +1 -1
  14. package/dist/cjs/{TaxonomyCard-b5074d6e.js → TaxonomyCard-e3566492.js} +1 -1
  15. package/dist/cjs/TaxonomyCard.js +2 -2
  16. package/dist/cjs/TemplateNormal.js +2 -2
  17. package/dist/cjs/ThumbnailCard.js +1 -1
  18. package/dist/cjs/VideoSeriesListing.js +1 -2
  19. package/dist/cjs/{YoutubeGroup-78e6bcc3.js → YoutubeGroup-94e6efea.js} +437 -5
  20. package/dist/cjs/YoutubeGroup.js +1 -2
  21. package/dist/cjs/{index-39beccb3.js → index-be0c82be.js} +1 -2
  22. package/dist/cjs/index.js +531 -544
  23. package/dist/esm/{ADInfeed-e546ea87.js → ADInfeed-a77b2850.js} +1 -1
  24. package/dist/esm/{AdSlot-9b4ae186.js → AdSlot-69bf3195.js} +1 -1
  25. package/dist/esm/DeckContent.js +11 -11
  26. package/dist/esm/DeckQueue.js +1 -1
  27. package/dist/esm/{GridContent-f4fd38a7.js → GridContent-8479e775.js} +2 -2
  28. package/dist/esm/GridContent.js +4 -4
  29. package/dist/esm/IssueContentDeck.js +1 -1
  30. package/dist/esm/IssueDeck.js +1 -1
  31. package/dist/esm/MasterDeck.js +9 -9
  32. package/dist/esm/{Normal-f90f9ca7.js → Normal-3e5ad3d1.js} +70 -49
  33. package/dist/esm/PublicationDeck.js +1 -1
  34. package/dist/esm/QueueDeckExpanded.js +1 -1
  35. package/dist/esm/{TaxonomyCard-ee1a22ae.js → TaxonomyCard-2d0ab635.js} +1 -1
  36. package/dist/esm/TaxonomyCard.js +2 -2
  37. package/dist/esm/TemplateNormal.js +2 -2
  38. package/dist/esm/ThumbnailCard.js +1 -1
  39. package/dist/esm/VideoSeriesListing.js +1 -2
  40. package/dist/esm/{YoutubeGroup-a87b8967.js → YoutubeGroup-f59297bb.js} +437 -5
  41. package/dist/esm/YoutubeGroup.js +1 -2
  42. package/dist/esm/{index-3849e3fe.js → index-73819142.js} +1 -2
  43. package/dist/esm/index.js +535 -548
  44. package/package.json +103 -103
@@ -1,7 +1,7 @@
1
1
  import React__default, { useState } from 'react';
2
2
  import Card from 'react-bootstrap/Card';
3
3
  import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
4
- import { D as DFPAdSlot } from './AdSlot-9b4ae186.js';
4
+ import { D as DFPAdSlot } from './AdSlot-69bf3195.js';
5
5
 
6
6
  var ADInfeed = function ADInfeed(_ref) {
7
7
  var index = _ref.index,
@@ -1109,7 +1109,7 @@ var DFPAdSlot = function DFPAdSlot(_ref) {
1109
1109
  }, 500);
1110
1110
 
1111
1111
  var matchAd = function matchAd(element) {
1112
- return slotId.includes(element);
1112
+ return slotId && slotId.includes(element);
1113
1113
  };
1114
1114
 
1115
1115
  return React__default.createElement(
@@ -18,13 +18,13 @@ import { V as VisibilitySensor, m as moment, I as InfiniteScroll } from './visib
18
18
  import 'next/link';
19
19
  import { withRouter } from 'next/router';
20
20
  import 'react-dom';
21
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
21
+ import { i as imageUrlBuilder } from './index-73819142.js';
22
22
  import { L as LazyLoad } from './index-5f9f807a.js';
23
23
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
24
24
  import './slicedToArray-d0a9593a.js';
25
- import './AdSlot-9b4ae186.js';
25
+ import './AdSlot-69bf3195.js';
26
26
  import './promise-683a9c54.js';
27
- import { A as ADInfeed } from './ADInfeed-e546ea87.js';
27
+ import { A as ADInfeed } from './ADInfeed-a77b2850.js';
28
28
 
29
29
  var DeckContent = function (_React$Component) {
30
30
  _inherits(DeckContent, _React$Component);
@@ -165,14 +165,14 @@ var DeckContent = function (_React$Component) {
165
165
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
166
166
 
167
167
  // please leave this for later debug purpose : Yong Jun.
168
- /* console.log('page change reported', {
169
- currentPage: currentPage,
170
- pageNumber: pageNumber,
171
- pathname: pathname,
172
- path: path,
173
- newPath: newPath,
174
- firstPage: pageNumber === 1,
175
- queryString: queryString
168
+ /* console.log('page change reported', {
169
+ currentPage: currentPage,
170
+ pageNumber: pageNumber,
171
+ pathname: pathname,
172
+ path: path,
173
+ newPath: newPath,
174
+ firstPage: pageNumber === 1,
175
+ queryString: queryString
176
176
  }) */
177
177
 
178
178
  if (pageview) {
@@ -18,7 +18,7 @@ import { V as VisibilitySensor, m as moment, I as InfiniteScroll } from './visib
18
18
  import 'next/link';
19
19
  import { withRouter } from 'next/router';
20
20
  import 'react-dom';
21
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
21
+ import { i as imageUrlBuilder } from './index-73819142.js';
22
22
  import { L as LazyLoad } from './index-5f9f807a.js';
23
23
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
24
24
  import { g as get_1 } from './get-b2201dc8.js';
@@ -12,10 +12,10 @@ import Card from 'react-bootstrap/Card';
12
12
  import { m as moment, V as VisibilitySensor, I as InfiniteScroll } from './visibility-sensor-336093e1.js';
13
13
  import 'next/link';
14
14
  import { withRouter } from 'next/router';
15
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
15
+ import { i as imageUrlBuilder } from './index-73819142.js';
16
16
  import { L as LazyLoad } from './index-5f9f807a.js';
17
17
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
18
- import { A as ADInfeed } from './ADInfeed-e546ea87.js';
18
+ import { A as ADInfeed } from './ADInfeed-a77b2850.js';
19
19
  import { g as get_1 } from './get-b2201dc8.js';
20
20
 
21
21
  var Dfp = React__default.lazy(function () {
@@ -18,12 +18,12 @@ import './visibility-sensor-336093e1.js';
18
18
  import 'next/link';
19
19
  import 'next/router';
20
20
  import 'react-dom';
21
- import './index-3849e3fe.js';
21
+ import './index-73819142.js';
22
22
  import './index-5f9f807a.js';
23
23
  import './entities-7cc3bf45.js';
24
24
  import './slicedToArray-d0a9593a.js';
25
- import './AdSlot-9b4ae186.js';
25
+ import './AdSlot-69bf3195.js';
26
26
  import './promise-683a9c54.js';
27
- import './ADInfeed-e546ea87.js';
27
+ import './ADInfeed-a77b2850.js';
28
28
  import './get-b2201dc8.js';
29
- export { G as default } from './GridContent-f4fd38a7.js';
29
+ export { G as default } from './GridContent-8479e775.js';
@@ -6,7 +6,7 @@ import Col from 'react-bootstrap/Col';
6
6
  import Card from 'react-bootstrap/Card';
7
7
  import 'next/link';
8
8
  import 'react-dom';
9
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
9
+ import { i as imageUrlBuilder } from './index-73819142.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
11
11
  import Badge from 'react-bootstrap/Badge';
12
12
 
@@ -6,7 +6,7 @@ import Col from 'react-bootstrap/Col';
6
6
  import Card from 'react-bootstrap/Card';
7
7
  import 'next/link';
8
8
  import 'react-dom';
9
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
9
+ import { i as imageUrlBuilder } from './index-73819142.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
11
11
  import Button from 'react-bootstrap/Button';
12
12
 
@@ -18,7 +18,7 @@ import { V as VisibilitySensor, I as InfiniteScroll } from './visibility-sensor-
18
18
  import 'next/link';
19
19
  import { withRouter } from 'next/router';
20
20
  import 'react-dom';
21
- import './index-3849e3fe.js';
21
+ import './index-73819142.js';
22
22
  import { _ as _Promise } from './promise-683a9c54.js';
23
23
 
24
24
  var MasterDeck = function (_React$Component) {
@@ -164,14 +164,14 @@ var MasterDeck = function (_React$Component) {
164
164
  var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
165
165
 
166
166
  // please leave this for later debug purpose : Yong Jun.
167
- /* console.log('page change reported', {
168
- currentPage: currentPage,
169
- pageNumber: pageNumber,
170
- pathname: pathname,
171
- path: path,
172
- newPath: newPath,
173
- firstPage: pageNumber === 1,
174
- queryString: queryString
167
+ /* console.log('page change reported', {
168
+ currentPage: currentPage,
169
+ pageNumber: pageNumber,
170
+ pathname: pathname,
171
+ path: path,
172
+ newPath: newPath,
173
+ firstPage: pageNumber === 1,
174
+ queryString: queryString
175
175
  }) */
176
176
 
177
177
  if (pageview) {
@@ -8,7 +8,7 @@ import Row from 'react-bootstrap/Row';
8
8
  import Col from 'react-bootstrap/Col';
9
9
  import Link from 'next/link';
10
10
  import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
11
- import { D as DFPAdSlot } from './AdSlot-9b4ae186.js';
11
+ import { D as DFPAdSlot } from './AdSlot-69bf3195.js';
12
12
  import { g as get_1 } from './get-b2201dc8.js';
13
13
  import { Dropdown } from 'react-bootstrap';
14
14
  import { G as GenIcon, b as IoMdLogIn, c as IoIosHome } from './index.esm-536609db.js';
@@ -670,8 +670,8 @@ var renderLink = function renderLink(row) {
670
670
  };
671
671
 
672
672
  var SideFooter = function SideFooter(props) {
673
- /*
674
- useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
673
+ /*
674
+ useage example: <SideFooter cache={props.cache} logo='https://mjh-web.s3.amazonaws.com/_media/an_mjhls_brand_logo.png' />
675
675
  */
676
676
  var _get = get_1(props, 'cache.siteSettingCache', {}),
677
677
  socialLinks = _get.socialLinks,
@@ -1244,15 +1244,15 @@ var SocialNavFooter = function SocialNavFooter(props) {
1244
1244
  };
1245
1245
 
1246
1246
  var NavMagazine = function NavMagazine(props) {
1247
- /*
1248
- Example Nav with acceptable props
1249
- <MagazineNav
1250
- showLogin
1251
- logo={props.settings.logo}
1252
- dataObject={props.cache.mainNavCache}
1253
- website={website}
1254
- subNav={props.cache.subNavCache}
1255
- />
1247
+ /*
1248
+ Example Nav with acceptable props
1249
+ <MagazineNav
1250
+ showLogin
1251
+ logo={props.settings.logo}
1252
+ dataObject={props.cache.mainNavCache}
1253
+ website={website}
1254
+ subNav={props.cache.subNavCache}
1255
+ />
1256
1256
  */
1257
1257
 
1258
1258
  var logo = props.logo,
@@ -1292,7 +1292,6 @@ var NavMagazine = function NavMagazine(props) {
1292
1292
 
1293
1293
  useEffect(function () {
1294
1294
  var navOffsetTop = navRef.current.getBoundingClientRect().top;
1295
- var navOffsetHeight = navRef.current.getBoundingClientRect().height;
1296
1295
  var adSection = document.querySelector('.AD728x90');
1297
1296
  var stickyNav = window.addEventListener('scroll', function () {
1298
1297
  if (window.pageYOffset > navOffsetTop) {
@@ -1301,7 +1300,6 @@ var NavMagazine = function NavMagazine(props) {
1301
1300
  navRef.current.style.top = 0;
1302
1301
  navRef.current.style.width = '100%';
1303
1302
  navRef.current.style.zIndex = '9999';
1304
- adSection.style.marginTop = navOffsetHeight + 'px';
1305
1303
  }
1306
1304
  } else {
1307
1305
  if (navRef.current && navRef.current.style) {
@@ -1566,15 +1564,15 @@ var NavMagazine = function NavMagazine(props) {
1566
1564
  var MagazineNav = React__default.memo(NavMagazine);
1567
1565
 
1568
1566
  var NavNative = function NavNative(props) {
1569
- /*
1570
- Example Nav with acceptable props
1571
- <MagazineNav
1572
- showLogin
1573
- logo={props.settings.logo}
1574
- dataObject={props.cache.mainNavCache}
1575
- website={website}
1576
- subNav={props.cache.subNavCache}
1577
- />
1567
+ /*
1568
+ Example Nav with acceptable props
1569
+ <MagazineNav
1570
+ showLogin
1571
+ logo={props.settings.logo}
1572
+ dataObject={props.cache.mainNavCache}
1573
+ website={website}
1574
+ subNav={props.cache.subNavCache}
1575
+ />
1578
1576
  */
1579
1577
 
1580
1578
  var logo = props.logo,
@@ -1968,15 +1966,15 @@ var NavDvm = function NavDvm(props) {
1968
1966
  };
1969
1967
 
1970
1968
  var HamMagazine = function HamMagazine(props) {
1971
- /*
1972
- Example Nav with acceptable props
1973
- <MagazineNav
1974
- showLogin
1975
- logo={props.settings.logo}
1976
- dataObject={props.cache.mainNavCache}
1977
- website={website}
1978
- subNav={props.cache.subNavCache}
1979
- />
1969
+ /*
1970
+ Example Nav with acceptable props
1971
+ <MagazineNav
1972
+ showLogin
1973
+ logo={props.settings.logo}
1974
+ dataObject={props.cache.mainNavCache}
1975
+ website={website}
1976
+ subNav={props.cache.subNavCache}
1977
+ />
1980
1978
  */
1981
1979
 
1982
1980
  var logo = props.logo,
@@ -2066,7 +2064,6 @@ var HamMagazine = function HamMagazine(props) {
2066
2064
 
2067
2065
  useEffect(function () {
2068
2066
  var navOffsetTop = navRef.current.getBoundingClientRect().top;
2069
- var navOffsetHeight = navRef.current.getBoundingClientRect().height;
2070
2067
  var adSection = document.querySelector('.AD728x90');
2071
2068
  var stickyNav = window.addEventListener('scroll', function () {
2072
2069
  if (window.pageYOffset > navOffsetTop) {
@@ -2075,7 +2072,6 @@ var HamMagazine = function HamMagazine(props) {
2075
2072
  navRef.current.style.top = 0;
2076
2073
  navRef.current.style.width = '100%';
2077
2074
  navRef.current.style.zIndex = '9999';
2078
- adSection.style.marginTop = navOffsetHeight + 'px';
2079
2075
  }
2080
2076
  } else {
2081
2077
  if (navRef.current && navRef.current.style) {
@@ -2366,8 +2362,29 @@ var AD728x90 = function AD728x90(_ref) {
2366
2362
  adTargeting = _useState4[0],
2367
2363
  setTargeting = _useState4[1];
2368
2364
 
2365
+ var adRef = useRef(null);
2366
+
2369
2367
  useEffect(function () {
2370
2368
  if (window && window.innerWidth && window.innerWidth < 768) {
2369
+ var navbar = document.querySelector('.navbar');
2370
+ var AdOffsetTop = adRef.current.getBoundingClientRect().top;
2371
+ window.addEventListener('scroll', function () {
2372
+ if (window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
2373
+ if (adRef.current && adRef.current.style) {
2374
+ adRef.current.style.position = 'fixed';
2375
+ adRef.current.style.top = '60px';
2376
+ adRef.current.style.left = '0px';
2377
+ adRef.current.style.zIndex = '9999';
2378
+ adRef.current.style.width = '100%';
2379
+ adRef.current.style.marginTop = '2px';
2380
+ }
2381
+ } else {
2382
+ if (adRef.current && adRef.current.style) {
2383
+ adRef.current.style.position = 'relative';
2384
+ adRef.current.style.top = '';
2385
+ }
2386
+ }
2387
+ });
2371
2388
  setMobileView(true);
2372
2389
  adTargeting['pos'] = pos && pos.length ? pos : 'top-mobile';
2373
2390
  } else {
@@ -2379,21 +2396,25 @@ var AD728x90 = function AD728x90(_ref) {
2379
2396
  var browserSizes = [[728, 90], [970, 90], [320, 50], [300, 50]];
2380
2397
  var mobileSizes = [[320, 50], [300, 50]];
2381
2398
 
2382
- return React__default.createElement(DFPAdSlot, {
2383
- slotId: slotId,
2384
- networkID: networkID,
2385
- adUnit: adUnit,
2386
- targeting: adTargeting,
2387
- className: 'AD728x90',
2388
- sizes: mobileView ? mobileSizes : browserSizes,
2389
- sizeMapping: [{
2390
- viewport: [768, 1],
2391
- sizes: [[728, 90], [970, 90]]
2392
- }, {
2393
- viewport: [1, 1],
2394
- sizes: [[320, 50], [300, 50]]
2395
- }]
2396
- });
2399
+ return React__default.createElement(
2400
+ 'div',
2401
+ { className: 'leaderboard-ad-wrapper', ref: adRef, style: { backgroundColor: '#fff' } },
2402
+ React__default.createElement(DFPAdSlot, {
2403
+ slotId: slotId,
2404
+ networkID: networkID,
2405
+ adUnit: adUnit,
2406
+ targeting: adTargeting,
2407
+ className: 'AD728x90',
2408
+ sizes: mobileView ? mobileSizes : browserSizes,
2409
+ sizeMapping: [{
2410
+ viewport: [768, 1],
2411
+ sizes: [[728, 90], [970, 90]]
2412
+ }, {
2413
+ viewport: [1, 1],
2414
+ sizes: [[320, 50], [300, 50]]
2415
+ }]
2416
+ })
2417
+ );
2397
2418
  };
2398
2419
 
2399
2420
  // Main
@@ -6,7 +6,7 @@ import Col from 'react-bootstrap/Col';
6
6
  import Card from 'react-bootstrap/Card';
7
7
  import 'next/link';
8
8
  import 'react-dom';
9
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
9
+ import { i as imageUrlBuilder } from './index-73819142.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
11
11
  import Button from 'react-bootstrap/Button';
12
12
 
@@ -12,7 +12,7 @@ import { I as InfiniteScroll, V as VisibilitySensor, m as moment } from './visib
12
12
  import 'next/link';
13
13
  import { useRouter } from 'next/router';
14
14
  import 'react-dom';
15
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
15
+ import { i as imageUrlBuilder } from './index-73819142.js';
16
16
  import { L as LazyLoad } from './index-5f9f807a.js';
17
17
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
18
18
  import { _ as _slicedToArray } from './slicedToArray-d0a9593a.js';
@@ -5,7 +5,7 @@ import Container from 'react-bootstrap/Container';
5
5
  import Row from 'react-bootstrap/Row';
6
6
  import Col from 'react-bootstrap/Col';
7
7
  import Card from 'react-bootstrap/Card';
8
- import { n as node, i as imageUrlBuilder } from './index-3849e3fe.js';
8
+ import { n as node, i as imageUrlBuilder } from './index-73819142.js';
9
9
  import { L as LazyLoad } from './index-5f9f807a.js';
10
10
 
11
11
  /*
@@ -8,6 +8,6 @@ import 'react-bootstrap/Row';
8
8
  import 'react-bootstrap/Col';
9
9
  import 'react-bootstrap/Card';
10
10
  import 'react-dom';
11
- import './index-3849e3fe.js';
11
+ import './index-73819142.js';
12
12
  import './index-5f9f807a.js';
13
- export { T as default } from './TaxonomyCard-ee1a22ae.js';
13
+ export { T as default } from './TaxonomyCard-2d0ab635.js';
@@ -13,13 +13,13 @@ import 'react-bootstrap/Row';
13
13
  import 'react-bootstrap/Col';
14
14
  import 'next/link';
15
15
  import './slicedToArray-d0a9593a.js';
16
- import './AdSlot-9b4ae186.js';
16
+ import './AdSlot-69bf3195.js';
17
17
  import './promise-683a9c54.js';
18
18
  import './get-b2201dc8.js';
19
19
  import 'react-bootstrap';
20
20
  import './index.esm-536609db.js';
21
21
  import 'react-bootstrap/Button';
22
- export { T as default } from './Normal-f90f9ca7.js';
22
+ export { T as default } from './Normal-3e5ad3d1.js';
23
23
  import 'react-bootstrap/ListGroup';
24
24
  import 'next/head';
25
25
  import 'react-bootstrap/Nav';
@@ -2,7 +2,7 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import React__default from 'react';
3
3
  import 'prop-types';
4
4
  import 'react-dom';
5
- import { i as imageUrlBuilder } from './index-3849e3fe.js';
5
+ import { i as imageUrlBuilder } from './index-73819142.js';
6
6
  import { L as LazyLoad } from './index-5f9f807a.js';
7
7
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
8
8
  import Media$1 from 'react-bootstrap/Media';
@@ -13,8 +13,7 @@ import 'next/link';
13
13
  import { withRouter } from 'next/router';
14
14
  import 'react-dom';
15
15
  import './index-5f9f807a.js';
16
- import { Y as YoutubeGroup } from './YoutubeGroup-a87b8967.js';
17
- import 'smoothscroll-polyfill';
16
+ import { Y as YoutubeGroup } from './YoutubeGroup-f59297bb.js';
18
17
  import { a as IoIosArrowForward } from './index.esm-536609db.js';
19
18
 
20
19
  var VideoSeriesListing = function (_React$Component) {