@mjhls/mjh-framework 1.0.594 → 1.0.596

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleQueue.js +286 -16
  3. package/dist/cjs/{AuthorComponent-cb8b8128.js → AuthorComponent-3c79e1ab.js} +2 -2
  4. package/dist/cjs/ForbesHero.js +1 -1
  5. package/dist/cjs/GridContent.js +1 -1
  6. package/dist/cjs/GridHero.js +1 -1
  7. package/dist/cjs/InscreenSensor-e45e95e3.js +85 -0
  8. package/dist/cjs/IssueContentDeck.js +1 -1
  9. package/dist/cjs/IssueLanding.js +1 -1
  10. package/dist/cjs/OncliveLargeHero.js +1 -1
  11. package/dist/cjs/PartnerDetailListing.js +1 -1
  12. package/dist/cjs/QueueDeckExpanded.js +1 -1
  13. package/dist/cjs/RecentNews.js +93 -0
  14. package/dist/cjs/View.js +219 -48
  15. package/dist/cjs/YahooHero.js +1 -1
  16. package/dist/cjs/getQuery.js +2 -4
  17. package/dist/cjs/getRelatedArticle.js +4 -6
  18. package/dist/cjs/index.js +2 -2
  19. package/dist/esm/AD.js +1 -1
  20. package/dist/esm/AD300x250.js +2 -2
  21. package/dist/esm/AD300x250x600.js +2 -2
  22. package/dist/esm/AD728x90.js +2 -2
  23. package/dist/esm/ADFloatingFooter.js +2 -2
  24. package/dist/esm/ADGutter.js +2 -2
  25. package/dist/esm/ADSkyscraper.js +2 -2
  26. package/dist/esm/ADSponsoredResources.js +2 -2
  27. package/dist/esm/ADWebcast.js +2 -2
  28. package/dist/esm/ADWelcome.js +2 -2
  29. package/dist/esm/AdSlot.js +2 -2
  30. package/dist/esm/ArticleQueue.js +286 -16
  31. package/dist/esm/{AuthorComponent-158226c9.js → AuthorComponent-357dbee9.js} +2 -2
  32. package/dist/esm/CMEDeck.js +2 -2
  33. package/dist/esm/Column2.js +3 -3
  34. package/dist/esm/Column3.js +4 -4
  35. package/dist/esm/DeckContent.js +3 -3
  36. package/dist/esm/DeckQueue.js +4 -4
  37. package/dist/esm/{Dfp-ae9336e2.js → Dfp-56444b73.js} +2 -2
  38. package/dist/esm/ExternalResources.js +3 -3
  39. package/dist/esm/ForbesHero.js +1 -1
  40. package/dist/esm/GridContent.js +7 -7
  41. package/dist/esm/GridHero.js +1 -1
  42. package/dist/esm/InscreenSensor-beb2ec79.js +80 -0
  43. package/dist/esm/IssueContentDeck.js +1 -1
  44. package/dist/esm/IssueLanding.js +5 -5
  45. package/dist/esm/LeftNav.js +2 -2
  46. package/dist/esm/MasterDeck.js +4 -4
  47. package/dist/esm/OncliveLargeHero.js +1 -1
  48. package/dist/esm/PartnerDetailListing.js +6 -6
  49. package/dist/esm/QueueDeckExpanded.js +5 -5
  50. package/dist/esm/RecentNews.js +88 -0
  51. package/dist/esm/SideFooter.js +3 -3
  52. package/dist/esm/TemplateNormal.js +4 -4
  53. package/dist/esm/VideoSeriesListing.js +2 -2
  54. package/dist/esm/View.js +222 -51
  55. package/dist/esm/YahooHero.js +1 -1
  56. package/dist/esm/{_arrayMap-64cbe0e4.js → _arrayMap-818441dd.js} +1 -1
  57. package/dist/esm/{debounce-048d9cb6.js → debounce-a0d9abca.js} +1 -1
  58. package/dist/esm/{get-0eb56363.js → get-58d2f7cc.js} +2 -2
  59. package/dist/esm/getQuery.js +2 -4
  60. package/dist/esm/getRelatedArticle.js +4 -6
  61. package/dist/esm/getSerializers.js +3 -3
  62. package/dist/esm/index.js +9 -9
  63. package/dist/esm/{isSymbol-b7b7434f.js → isSymbol-47f5ff3b.js} +1 -1
  64. package/package.json +1 -1
  65. package/dist/cjs/InscreenSensor-e7f3579f.js +0 -361
  66. package/dist/esm/InscreenSensor-280b2b10.js +0 -352
  67. /package/dist/esm/{ADInfeed-c7dba95f.js → ADInfeed-cecd42e8.js} +0 -0
  68. /package/dist/esm/{ADlgInfeed-8bfd6d58.js → ADlgInfeed-234ba767.js} +0 -0
  69. /package/dist/esm/{index-80cb5ee6.js → index-91506c27.js} +0 -0
@@ -0,0 +1,80 @@
1
+ import { _ as _inherits, a as _classCallCheck, b as _possibleConstructorReturn, c as _Object$getPrototypeOf, d as _createClass } from './inherits-b8e4c697.js';
2
+ import React__default from 'react';
3
+
4
+ var InscreenSensor = function (_React$Component) {
5
+ _inherits(InscreenSensor, _React$Component);
6
+
7
+ function InscreenSensor(props) {
8
+ _classCallCheck(this, InscreenSensor);
9
+
10
+ var _this = _possibleConstructorReturn(this, (InscreenSensor.__proto__ || _Object$getPrototypeOf(InscreenSensor)).call(this, props));
11
+
12
+ _this.scrollHandler = function () {
13
+ var visible = _this.checkInside();
14
+ if (visible !== _this.visible) {
15
+ _this.visible = visible;
16
+ _this.props.onChange(visible);
17
+ }
18
+ };
19
+
20
+ _this.checkInside = function () {
21
+ var rect = _this.wraperRef.current.getBoundingClientRect();
22
+ var _this$props$offSetTop = _this.props.offSetTop,
23
+ offSetTop = _this$props$offSetTop === undefined ? 0 : _this$props$offSetTop;
24
+ var top = rect.top,
25
+ bottom = rect.bottom;
26
+
27
+ var viewHeight = window.innerHeight;
28
+ var wrpElem = document.getElementsByClassName('inscreen-wrapper');
29
+
30
+ if (top > 0 && top <= offSetTop) {
31
+ if (wrpElem.length > 1 && top <= viewHeight && bottom > viewHeight) {
32
+ return 'top';
33
+ } else if (wrpElem.length > 1 && bottom < viewHeight) {
34
+ return 'small-top';
35
+ }
36
+ } else if (wrpElem.length > 1 && top < offSetTop && bottom + offSetTop >= viewHeight) {
37
+ return 'bottom';
38
+ }
39
+ };
40
+
41
+ _this.wraperRef = React__default.createRef();
42
+ _this.visible = false;
43
+ return _this;
44
+ }
45
+
46
+ _createClass(InscreenSensor, [{
47
+ key: 'componentDidMount',
48
+ value: function componentDidMount() {
49
+ this.visible = this.checkInside();
50
+ this.props.onChange(this.visible);
51
+ window.addEventListener('scroll', this.scrollHandler);
52
+ }
53
+ }, {
54
+ key: 'componentWillUnmount',
55
+ value: function componentWillUnmount() {
56
+ window.removeEventListener('scroll', this.scrollHandler);
57
+ }
58
+ }, {
59
+ key: 'render',
60
+ value: function render() {
61
+ var _props = this.props,
62
+ _props$className = _props.className,
63
+ className = _props$className === undefined ? '' : _props$className,
64
+ _props$style = _props.style,
65
+ style = _props$style === undefined ? {} : _props$style,
66
+ _props$id = _props.id,
67
+ id = _props$id === undefined ? '' : _props$id;
68
+
69
+ return React__default.createElement(
70
+ 'div',
71
+ { ref: this.wraperRef, className: className, style: style, id: id },
72
+ this.props.children
73
+ );
74
+ }
75
+ }]);
76
+
77
+ return InscreenSensor;
78
+ }(React__default.Component);
79
+
80
+ export { InscreenSensor as I };
@@ -12,7 +12,7 @@ import 'react-dom';
12
12
  import { i as imageUrlBuilder } from './index-51a80699.js';
13
13
  import { L as LazyLoad } from './index-5f9f807a.js';
14
14
  import './slicedToArray-f1e40361.js';
15
- import { A as AuthorComponent } from './AuthorComponent-158226c9.js';
15
+ import { A as AuthorComponent } from './AuthorComponent-357dbee9.js';
16
16
  import Badge from 'react-bootstrap/Badge';
17
17
 
18
18
  var urlFor = function urlFor(source, client) {
@@ -14,8 +14,8 @@ import 'prop-types';
14
14
  import 'react-bootstrap/Card';
15
15
  import './moment-12415288.js';
16
16
  import 'next/router';
17
- import './isSymbol-b7b7434f.js';
18
- import './debounce-048d9cb6.js';
17
+ import './isSymbol-47f5ff3b.js';
18
+ import './debounce-a0d9abca.js';
19
19
  import './index.es-938a3a58.js';
20
20
  import 'react-dom';
21
21
  import './visibility-sensor-0baa4eea.js';
@@ -29,10 +29,10 @@ import './asyncToGenerator-0379e924.js';
29
29
  import './_set-species-6f64f1c1.js';
30
30
  import './beam-a25bd8fd.js';
31
31
  import './AdSlot.js';
32
- import './ADInfeed-c7dba95f.js';
32
+ import './ADInfeed-cecd42e8.js';
33
33
  import './lodash-17fdfebb.js';
34
- import './ADlgInfeed-8bfd6d58.js';
35
- import './AuthorComponent-158226c9.js';
34
+ import './ADlgInfeed-234ba767.js';
35
+ import './AuthorComponent-357dbee9.js';
36
36
  import 'react-bootstrap';
37
37
  import QueueDeckExpanded from './QueueDeckExpanded.js';
38
38
  import 'react-bootstrap/Breadcrumb';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useRef, useEffect } from 'react';
8
8
  import './index-93ec3c59.js';
9
9
  import 'prop-types';
10
- import './isSymbol-b7b7434f.js';
11
- import './debounce-048d9cb6.js';
10
+ import './isSymbol-47f5ff3b.js';
11
+ import './debounce-a0d9abca.js';
12
12
  import './main-7255814e.js';
13
13
  import './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -21,8 +21,8 @@ import 'react-bootstrap/Col';
21
21
  import 'react-bootstrap/Card';
22
22
  import './moment-12415288.js';
23
23
  import { withRouter } from 'next/router';
24
- import './isSymbol-b7b7434f.js';
25
- import { d as debounce_1 } from './debounce-048d9cb6.js';
24
+ import './isSymbol-47f5ff3b.js';
25
+ import { d as debounce_1 } from './debounce-a0d9abca.js';
26
26
  import { I as InfiniteScroll } from './index.es-938a3a58.js';
27
27
  import 'react-dom';
28
28
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
@@ -34,9 +34,9 @@ import { _ as _Promise } from './asyncToGenerator-0379e924.js';
34
34
  import './_set-species-6f64f1c1.js';
35
35
  import './beam-a25bd8fd.js';
36
36
  import './AdSlot.js';
37
- import { A as ADInfeed } from './ADInfeed-c7dba95f.js';
37
+ import { A as ADInfeed } from './ADInfeed-cecd42e8.js';
38
38
  import { l as lodash } from './lodash-17fdfebb.js';
39
- import { A as ADlgInfeed } from './ADlgInfeed-8bfd6d58.js';
39
+ import { A as ADlgInfeed } from './ADlgInfeed-234ba767.js';
40
40
 
41
41
  var MasterDeck = function (_React$Component) {
42
42
  _inherits(MasterDeck, _React$Component);
@@ -10,7 +10,7 @@ import { i as imageUrlBuilder } from './index-51a80699.js';
10
10
  import { L as LazyLoad } from './index-5f9f807a.js';
11
11
  import { c as clean_html_1 } from './entities-7cc3bf45.js';
12
12
  import './slicedToArray-f1e40361.js';
13
- import { A as AuthorComponent } from './AuthorComponent-158226c9.js';
13
+ import { A as AuthorComponent } from './AuthorComponent-357dbee9.js';
14
14
 
15
15
  var OncliveLargeHero = function OncliveLargeHero(props) {
16
16
  var removeTimeStamp = props.removeTimeStamp;
@@ -18,8 +18,8 @@ import 'react-bootstrap/Col';
18
18
  import 'react-bootstrap/Card';
19
19
  import { m as moment } from './moment-12415288.js';
20
20
  import 'next/router';
21
- import './isSymbol-b7b7434f.js';
22
- import './debounce-048d9cb6.js';
21
+ import './isSymbol-47f5ff3b.js';
22
+ import './debounce-a0d9abca.js';
23
23
  import './index.es-938a3a58.js';
24
24
  import 'react-dom';
25
25
  import './visibility-sensor-0baa4eea.js';
@@ -33,17 +33,17 @@ import { a as _asyncToGenerator, r as regenerator, _ as _Promise } from './async
33
33
  import './_set-species-6f64f1c1.js';
34
34
  import './beam-a25bd8fd.js';
35
35
  import './AdSlot.js';
36
- import './ADInfeed-c7dba95f.js';
36
+ import './ADInfeed-cecd42e8.js';
37
37
  import './lodash-17fdfebb.js';
38
- import './ADlgInfeed-8bfd6d58.js';
39
- import './AuthorComponent-158226c9.js';
38
+ import './ADlgInfeed-234ba767.js';
39
+ import './AuthorComponent-357dbee9.js';
40
40
  import { B as BlockContent } from './BlockContent-a614acdf.js';
41
41
  import './smoothscroll-4b699764.js';
42
42
  import './GroupDeck.js';
43
43
  import 'react-bootstrap';
44
44
  import QueueDeckExpanded from './QueueDeckExpanded.js';
45
45
  import 'react-bootstrap/Button';
46
- import { g as getSerializers } from './index-80cb5ee6.js';
46
+ import { g as getSerializers } from './index-91506c27.js';
47
47
  import './util-7700fc59.js';
48
48
  import './brightcove-react-player-loader.es-83f53e4e.js';
49
49
  import 'react-bootstrap/Pagination';
@@ -14,8 +14,8 @@ import 'prop-types';
14
14
  import 'react-bootstrap/Card';
15
15
  import { m as moment } from './moment-12415288.js';
16
16
  import { useRouter } from 'next/router';
17
- import './isSymbol-b7b7434f.js';
18
- import './debounce-048d9cb6.js';
17
+ import './isSymbol-47f5ff3b.js';
18
+ import './debounce-a0d9abca.js';
19
19
  import { I as InfiniteScroll } from './index.es-938a3a58.js';
20
20
  import 'react-dom';
21
21
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';
@@ -29,10 +29,10 @@ import './asyncToGenerator-0379e924.js';
29
29
  import './_set-species-6f64f1c1.js';
30
30
  import './beam-a25bd8fd.js';
31
31
  import './AdSlot.js';
32
- import { A as ADInfeed } from './ADInfeed-c7dba95f.js';
32
+ import { A as ADInfeed } from './ADInfeed-cecd42e8.js';
33
33
  import { l as lodash } from './lodash-17fdfebb.js';
34
- import { A as ADlgInfeed } from './ADlgInfeed-8bfd6d58.js';
35
- import { A as AuthorComponent } from './AuthorComponent-158226c9.js';
34
+ import { A as ADlgInfeed } from './ADlgInfeed-234ba767.js';
35
+ import { A as AuthorComponent } from './AuthorComponent-357dbee9.js';
36
36
  import { Container, Media } from 'react-bootstrap';
37
37
 
38
38
  var urlFor = function urlFor(source, builder) {
@@ -0,0 +1,88 @@
1
+ import './_commonjsHelpers-0c4b6f40.js';
2
+ import React__default from 'react';
3
+ import './moment-12415288.js';
4
+ import { i as imageUrlBuilder } from './index-51a80699.js';
5
+ import './iconBase-602d52fe.js';
6
+ import { a as FaLongArrowAltRight } from './index.esm-9a4c8813.js';
7
+
8
+ var RecentNews = function RecentNews(_ref) {
9
+ var client = _ref.client,
10
+ _ref$dataRecord = _ref.dataRecord,
11
+ dataRecord = _ref$dataRecord === undefined ? [] : _ref$dataRecord,
12
+ _ref$linkTo = _ref.linkTo,
13
+ linkTo = _ref$linkTo === undefined ? '/news' : _ref$linkTo,
14
+ _ref$borderColor = _ref.borderColor,
15
+ borderColor = _ref$borderColor === undefined ? 'var(--primary)' : _ref$borderColor,
16
+ _ref$heroTitle = _ref.heroTitle,
17
+ heroTitle = _ref$heroTitle === undefined ? 'Latest News' : _ref$heroTitle,
18
+ _ref$linkTitle = _ref.linkTitle,
19
+ linkTitle = _ref$linkTitle === undefined ? 'View More ' : _ref$linkTitle;
20
+
21
+ var builder = imageUrlBuilder(client);
22
+ var topArticle = dataRecord[0];
23
+ var subArticles = dataRecord.slice(1, dataRecord.length);
24
+
25
+ return React__default.createElement(
26
+ 'div',
27
+ { className: 'recent-news-container', style: { border: '3px solid ' + borderColor } },
28
+ React__default.createElement(
29
+ 'div',
30
+ { className: 'recent-news-title' },
31
+ React__default.createElement(
32
+ 'h2',
33
+ null,
34
+ heroTitle
35
+ ),
36
+ React__default.createElement('div', null)
37
+ ),
38
+ React__default.createElement(
39
+ 'div',
40
+ { className: 'recent-news-inner' },
41
+ React__default.createElement(
42
+ 'div',
43
+ { className: 'recent-article-wrap', style: { flexBasis: '100%' } },
44
+ React__default.createElement(
45
+ 'a',
46
+ { href: '/view/' + topArticle.url.current, className: 'recent-article' },
47
+ React__default.createElement(
48
+ 'p',
49
+ null,
50
+ topArticle.title
51
+ )
52
+ ),
53
+ subArticles.map(function (article, index) {
54
+ return React__default.createElement(
55
+ 'a',
56
+ { key: index, href: '/view/' + article.url.current, className: 'recent-article' },
57
+ React__default.createElement(
58
+ 'p',
59
+ null,
60
+ article.title
61
+ )
62
+ );
63
+ })
64
+ )
65
+ ),
66
+ linkTo && React__default.createElement(
67
+ 'div',
68
+ { className: 'recent-view-more' },
69
+ React__default.createElement(
70
+ 'a',
71
+ { href: linkTo },
72
+ linkTitle,
73
+ React__default.createElement(
74
+ 'span',
75
+ null,
76
+ React__default.createElement(FaLongArrowAltRight, { color: 'var(--primary)' })
77
+ )
78
+ )
79
+ ),
80
+ React__default.createElement(
81
+ 'style',
82
+ { jsx: 'true' },
83
+ '\n .recent-news-container {\n margin-bottom: 1.7rem;\n margin-top: 1rem;\n position: relative;\n }\n .recent-news-title {\n position: absolute;\n top: -10px;\n background: white;\n z-index: 2;\n left: 10px;\n padding-right: 0.25rem;\n padding-left: 0.25rem;\n font-weight: bold;\n }\n .recent-news-title h2 {\n font-size: 0.9rem;\n font-weight: bold;\n }\n .recent-news-inner {\n display: flex;\n flex-direction: row;\n padding-top: 0.75rem;\n margin-top: 0.75rem;\n }\n .recent-article-wrap {\n padding: 0 0.5rem;\n }\n \n .recent-article {\n border-bottom: 1px solid #ccc;\n display: block;\n margin-bottom: 0.5rem;\n }\n .recent-article:last-child {\n border-bottom: none;\n }\n .recent-article:hover {\n background: #eee;\n }\n .recent-article p {\n font-size: 0.7rem;\n margin-bottom: 0.5rem;\n color: #252525;\n }\n .recent-view-more {\n position: absolute;\n right: 0;\n margin-top: 0.25rem;\n font-size: 0.7rem;\n font-weight: bold;\n }\n .recent-view-more span {\n display: inline-block;\n color: rgb(81, 116, 153);\n font-size: 0.7rem;\n }\n @media screen and (max-width: 1191px){\n \n .recent-article > p {\n font-size: 0.7rem;\n }\n }\n }\n @media screen and (max-width: 495px) {\n \n .recent-article > p {\n font-size: 0.7rem;\n }\n }\n '
84
+ )
85
+ );
86
+ };
87
+
88
+ export default RecentNews;
@@ -6,13 +6,13 @@ import './_iter-detect-6e099a34.js';
6
6
  import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useRef, useEffect } from 'react';
8
8
  import 'prop-types';
9
- import './isSymbol-b7b7434f.js';
9
+ import './isSymbol-47f5ff3b.js';
10
10
  import './stringify-e30bc114.js';
11
11
  import './asyncToGenerator-0379e924.js';
12
12
  import './_set-species-6f64f1c1.js';
13
13
  import { S as Segment } from './beam-a25bd8fd.js';
14
- import './_arrayMap-64cbe0e4.js';
15
- import { g as get_1 } from './get-0eb56363.js';
14
+ import './_arrayMap-818441dd.js';
15
+ import { g as get_1 } from './get-58d2f7cc.js';
16
16
  import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
17
17
 
18
18
  var year = new Date().getFullYear();
@@ -11,8 +11,8 @@ import Container from 'react-bootstrap/Container';
11
11
  import 'react-bootstrap/Row';
12
12
  import 'react-bootstrap/Col';
13
13
  import { useRouter } from 'next/router';
14
- import './isSymbol-b7b7434f.js';
15
- import './debounce-048d9cb6.js';
14
+ import './isSymbol-47f5ff3b.js';
15
+ import './debounce-a0d9abca.js';
16
16
  import './main-7255814e.js';
17
17
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
18
18
  import './stringify-e30bc114.js';
@@ -20,8 +20,8 @@ import './asyncToGenerator-0379e924.js';
20
20
  import './_set-species-6f64f1c1.js';
21
21
  import './beam-a25bd8fd.js';
22
22
  import './AdSlot.js';
23
- import './_arrayMap-64cbe0e4.js';
24
- import './get-0eb56363.js';
23
+ import './_arrayMap-818441dd.js';
24
+ import './get-58d2f7cc.js';
25
25
  import './react-social-icons-a7d5c5c7.js';
26
26
  import 'react-bootstrap';
27
27
  import './iconBase-602d52fe.js';
@@ -15,8 +15,8 @@ import 'prop-types';
15
15
  import Container from 'react-bootstrap/Container';
16
16
  import './moment-12415288.js';
17
17
  import { withRouter } from 'next/router';
18
- import './isSymbol-b7b7434f.js';
19
- import { d as debounce_1 } from './debounce-048d9cb6.js';
18
+ import './isSymbol-47f5ff3b.js';
19
+ import { d as debounce_1 } from './debounce-a0d9abca.js';
20
20
  import { I as InfiniteScroll } from './index.es-938a3a58.js';
21
21
  import 'react-dom';
22
22
  import { V as VisibilitySensor } from './visibility-sensor-0baa4eea.js';