@mjhls/mjh-framework 1.0.636 → 1.0.638

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.636
2
+ # mjh-framework v. 1.0.638
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -45,7 +45,7 @@ require('./smoothscroll-95231a70.js');
45
45
  require('./GroupDeck.js');
46
46
  require('react-bootstrap');
47
47
  require('react-bootstrap/Button');
48
- var getSerializers = require('./index-87fd5322.js');
48
+ var getSerializers = require('./index-14a67033.js');
49
49
  require('./util-f2c1b65b.js');
50
50
  require('./brightcove-react-player-loader.es-156bd4d6.js');
51
51
  require('react-bootstrap/Pagination');
@@ -45,7 +45,7 @@ require('./GroupDeck.js');
45
45
  require('react-bootstrap');
46
46
  var Button = _interopDefault(require('react-bootstrap/Button'));
47
47
  var index$3 = require('./index-5be2866f.js');
48
- var getSerializers = require('./index-87fd5322.js');
48
+ var getSerializers = require('./index-14a67033.js');
49
49
  require('./util-f2c1b65b.js');
50
50
  require('./brightcove-react-player-loader.es-156bd4d6.js');
51
51
  require('react-bootstrap/Pagination');
@@ -51,7 +51,7 @@ require('./GroupDeck.js');
51
51
  require('react-bootstrap');
52
52
  var QueueDeckExpanded = require('./QueueDeckExpanded.js');
53
53
  require('react-bootstrap/Button');
54
- var getSerializers = require('./index-87fd5322.js');
54
+ var getSerializers = require('./index-14a67033.js');
55
55
  require('./util-f2c1b65b.js');
56
56
  require('./brightcove-react-player-loader.es-156bd4d6.js');
57
57
  require('react-bootstrap/Pagination');
@@ -511,10 +511,6 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
511
511
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
512
512
  return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
513
513
  }
514
- if (main.main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
515
- return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
516
- }
517
-
518
514
  if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
519
515
  return React__default.createElement(
520
516
  visibilitySensor.VisibilitySensor,
@@ -638,6 +634,11 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
638
634
  entities.clean_html_1(article.summary)
639
635
  )
640
636
  )
637
+ ),
638
+ React__default.createElement(
639
+ 'div',
640
+ null,
641
+ main.main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
641
642
  )
642
643
  )
643
644
  );
@@ -905,10 +906,6 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
905
906
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
906
907
  return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: article });
907
908
  }
908
- if (main.main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
909
- return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
910
- }
911
-
912
909
  if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
913
910
  return React__default.createElement(
914
911
  visibilitySensor.VisibilitySensor,
@@ -1032,6 +1029,11 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
1032
1029
  entities.clean_html_1(article.summary)
1033
1030
  )
1034
1031
  )
1032
+ ),
1033
+ React__default.createElement(
1034
+ 'div',
1035
+ null,
1036
+ main.main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
1035
1037
  )
1036
1038
  )
1037
1039
  );
package/dist/cjs/View.js CHANGED
@@ -45,7 +45,7 @@ require('./smoothscroll-95231a70.js');
45
45
  require('./GroupDeck.js');
46
46
  require('react-bootstrap');
47
47
  var Button = _interopDefault(require('react-bootstrap/Button'));
48
- var getSerializers = require('./index-87fd5322.js');
48
+ var getSerializers = require('./index-14a67033.js');
49
49
  require('./util-f2c1b65b.js');
50
50
  require('./brightcove-react-player-loader.es-156bd4d6.js');
51
51
  require('react-bootstrap/Pagination');
@@ -1324,8 +1324,21 @@ var View = function View(props) {
1324
1324
  return false;
1325
1325
  };
1326
1326
 
1327
+ var checkArticleSeries = function checkArticleSeries(article) {
1328
+ if (!article || !article.body) {
1329
+ return false;
1330
+ }
1331
+ for (var i = 0; i < article.body.length; i++) {
1332
+ if (article.body[i]._type === 'articleSeries') {
1333
+ return true;
1334
+ }
1335
+ }
1336
+ return false;
1337
+ };
1338
+
1327
1339
  var isVideoSeries = checkVideoSeries(props.article);
1328
- var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
1340
+ var isArticleSeries = checkArticleSeries(props.article);
1341
+ var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
1329
1342
 
1330
1343
  if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
1331
1344
  description = null;
@@ -40,7 +40,7 @@ require('./smoothscroll-95231a70.js');
40
40
  require('./GroupDeck.js');
41
41
  require('react-bootstrap');
42
42
  require('react-bootstrap/Button');
43
- var getSerializers = require('./index-87fd5322.js');
43
+ var getSerializers = require('./index-14a67033.js');
44
44
  require('./util-f2c1b65b.js');
45
45
  require('./brightcove-react-player-loader.es-156bd4d6.js');
46
46
  require('react-bootstrap/Pagination');
@@ -8027,8 +8027,9 @@ var ArticleSeries = function ArticleSeries(_ref) {
8027
8027
  var router = Router.useRouter();
8028
8028
 
8029
8029
  var refArray = React.useRef([]);
8030
+ var adRefArray = React.useRef([]);
8030
8031
 
8031
- var _useState = React.useState(77),
8032
+ var _useState = React.useState(100),
8032
8033
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
8033
8034
  NavoffsetTop = _useState2[0],
8034
8035
  setNavoffsetTop = _useState2[1];
@@ -8105,26 +8106,26 @@ var ArticleSeries = function ArticleSeries(_ref) {
8105
8106
  };
8106
8107
 
8107
8108
  React.useEffect(function () {
8108
- if (!firstLoad) {
8109
- scrollToArticle();
8110
- }
8111
8109
  try {
8112
- setNavoffsetTop(document.getElementById('navbar-ham').offsetHeight);
8110
+ setNavoffsetTop(document.getElementById('navbar-ham').offsetHeight - 15);
8113
8111
  } catch (e) {}
8114
8112
  }, []);
8115
8113
 
8116
8114
  var scrollToArticle = function scrollToArticle(id) {
8117
8115
  var localArticleID = id ? id : selectedArticle;
8118
8116
  var findArticle = function findArticle(ref) {
8119
- return ref.props.id === localArticleID;
8117
+ if (ref) {
8118
+ return ref.props.id === localArticleID;
8119
+ }
8120
+ return false;
8120
8121
  };
8121
8122
  var indexOfRef = refArray.current.findIndex(findArticle);
8122
8123
 
8123
8124
  if (indexOfRef >= 0) {
8124
- //console.log(refArray.current[indexOfRef].wraperRef.current)
8125
- refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth' });
8126
- window.scrollTo({ top: refArray.current[indexOfRef].wraperRef.current.offsetTop + NavoffsetTop, behavior: 'smooth' });
8125
+ //refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth' })
8126
+ window.scrollTo({ top: refArray.current[indexOfRef].wraperRef.current.offsetTop - NavoffsetTop, behavior: 'smooth' });
8127
8127
  }
8128
+ setFirstLoad(true);
8128
8129
  };
8129
8130
 
8130
8131
  var renderAuthorBiography = function renderAuthorBiography(biography) {
@@ -8139,10 +8140,10 @@ var ArticleSeries = function ArticleSeries(_ref) {
8139
8140
  // Change URL and do other changes
8140
8141
  var doChanges = function doChanges() {
8141
8142
  if (firstLoad) {
8142
- window.history.pushState({ page: path }, '', newPath);
8143
+ refreshAD();
8143
8144
  }
8145
+ window.history.pushState({ page: path }, '', newPath);
8144
8146
  document.title = title;
8145
- refreshAD();
8146
8147
  setFirstLoad(true);
8147
8148
  };
8148
8149
 
@@ -8182,6 +8183,26 @@ var ArticleSeries = function ArticleSeries(_ref) {
8182
8183
  };
8183
8184
  });
8184
8185
 
8186
+ React.useEffect(function () {
8187
+ if (!firstLoad) {
8188
+ if (main.main_39) {
8189
+ grabLoadedAds();
8190
+ }
8191
+ }
8192
+ }, []);
8193
+
8194
+ var grabLoadedAds = function grabLoadedAds() {
8195
+ console.dir(index.lib_3);
8196
+ index.lib_3.getGoogletag().then(function (googletag) {
8197
+ var checkIfReady = window.setInterval(function () {
8198
+ if (window.googletag && googletag.pubadsReady) {
8199
+ clearInterval(checkIfReady);
8200
+ scrollToArticle();
8201
+ }
8202
+ }, 1000);
8203
+ });
8204
+ };
8205
+
8185
8206
  var refreshAD = function refreshAD(path) {
8186
8207
  //const activeArticle = path
8187
8208
  //let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
@@ -8223,13 +8244,38 @@ var ArticleSeries = function ArticleSeries(_ref) {
8223
8244
  )
8224
8245
  ),
8225
8246
  React__default.createElement('hr', { className: 'article-seperater' }),
8247
+ React__default.createElement(
8248
+ 'div',
8249
+ { className: 'ad-box', style: { textAlign: 'center' } },
8250
+ main.main_39 && Ads.map(function (ad, index) {
8251
+ if (index === 0) {
8252
+ return React__default.createElement(
8253
+ 'div',
8254
+ {
8255
+ key: 'addid-1',
8256
+ id: 'addid-1',
8257
+ ref: function ref(ele) {
8258
+ return adRefArray.current[0] = ele;
8259
+ },
8260
+ style: {
8261
+ display: 'flex',
8262
+ flex: '1 0 auto',
8263
+ justifyContent: 'center',
8264
+ alignItems: 'center',
8265
+ textAlign: 'center'
8266
+ } },
8267
+ ad.component
8268
+ );
8269
+ }
8270
+ })
8271
+ ),
8226
8272
  React__default.createElement(
8227
8273
  'div',
8228
8274
  { className: 'article-container', style: { marginBottom: '2rem' } },
8229
8275
  nodes.articles.map(function (article, index) {
8230
8276
  return React__default.createElement(
8231
- React__default.Fragment,
8232
- null,
8277
+ 'div',
8278
+ { key: article.title },
8233
8279
  React__default.createElement(
8234
8280
  InscreenSensor,
8235
8281
  {
@@ -8299,13 +8345,16 @@ var ArticleSeries = function ArticleSeries(_ref) {
8299
8345
  React__default.createElement(
8300
8346
  'div',
8301
8347
  { className: 'ad-box', style: { textAlign: 'center' } },
8302
- main.main_39 && nodes.articles.length - 1 !== index && Ads.map(function (ad, index) {
8303
- if (index === 0) {
8348
+ main.main_39 && nodes.articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8349
+ if (innerIndex === 0) {
8304
8350
  return React__default.createElement(
8305
8351
  'div',
8306
8352
  {
8307
- key: index,
8308
- id: 'addid-' + index,
8353
+ key: 'addid-' + (index + 2),
8354
+ id: 'addid-' + (index + 2),
8355
+ ref: function ref(ele) {
8356
+ return adRefArray.current[index + 1] = ele;
8357
+ },
8309
8358
  style: {
8310
8359
  display: 'flex',
8311
8360
  flex: '1 0 auto',
package/dist/cjs/index.js CHANGED
@@ -77,7 +77,7 @@ require('./index-5be2866f.js');
77
77
  require('./js.cookie-a511c430.js');
78
78
  var EventsDeck = require('./EventsDeck.js');
79
79
  var CMEDeck = require('./CMEDeck.js');
80
- var getSerializers = require('./index-87fd5322.js');
80
+ var getSerializers = require('./index-14a67033.js');
81
81
  require('./util-f2c1b65b.js');
82
82
  require('./brightcove-react-player-loader.es-156bd4d6.js');
83
83
  require('react-bootstrap/Pagination');
@@ -40,7 +40,7 @@ import './smoothscroll-4b699764.js';
40
40
  import './GroupDeck.js';
41
41
  import 'react-bootstrap';
42
42
  import 'react-bootstrap/Button';
43
- import { I as InscreenSensor, g as getSerializers } from './index-539e2942.js';
43
+ import { I as InscreenSensor, g as getSerializers } from './index-e3b00de2.js';
44
44
  import './util-7700fc59.js';
45
45
  import './brightcove-react-player-loader.es-83f53e4e.js';
46
46
  import 'react-bootstrap/Pagination';
@@ -39,7 +39,7 @@ import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import Button from 'react-bootstrap/Button';
41
41
  import { m as momentTimezone } from './index-d2f90501.js';
42
- import { g as getSerializers } from './index-539e2942.js';
42
+ import { g as getSerializers } from './index-e3b00de2.js';
43
43
  import './util-7700fc59.js';
44
44
  import './brightcove-react-player-loader.es-83f53e4e.js';
45
45
  import 'react-bootstrap/Pagination';
@@ -46,7 +46,7 @@ import './GroupDeck.js';
46
46
  import 'react-bootstrap';
47
47
  import QueueDeckExpanded from './QueueDeckExpanded.js';
48
48
  import 'react-bootstrap/Button';
49
- import { g as getSerializers } from './index-539e2942.js';
49
+ import { g as getSerializers } from './index-e3b00de2.js';
50
50
  import './util-7700fc59.js';
51
51
  import './brightcove-react-player-loader.es-83f53e4e.js';
52
52
  import 'react-bootstrap/Pagination';
@@ -505,10 +505,6 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
505
505
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
506
506
  return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
507
507
  }
508
- if (main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
509
- return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
510
- }
511
-
512
508
  if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
513
509
  return React__default.createElement(
514
510
  VisibilitySensor,
@@ -632,6 +628,11 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
632
628
  clean_html_1(article.summary)
633
629
  )
634
630
  )
631
+ ),
632
+ React__default.createElement(
633
+ 'div',
634
+ null,
635
+ main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
635
636
  )
636
637
  )
637
638
  );
@@ -899,10 +900,6 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
899
900
  } else if (article._type === 'brandInsightAd' && article.adUnit) {
900
901
  return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
901
902
  }
902
- if (main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0) {
903
- return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
904
- }
905
-
906
903
  if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && (!article._type || !['lg-infeed', 'brandInsightAd'].includes(article._type))) {
907
904
  return React__default.createElement(
908
905
  VisibilitySensor,
@@ -1026,6 +1023,11 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
1026
1023
  clean_html_1(article.summary)
1027
1024
  )
1028
1025
  )
1026
+ ),
1027
+ React__default.createElement(
1028
+ 'div',
1029
+ null,
1030
+ main_39 && rightItems && (index + 1) % numberOfItemsBeforeAd === 0 && renderMobileAd(index, numberOfItemsBeforeAd, rightItems)
1029
1031
  )
1030
1032
  )
1031
1033
  );
package/dist/esm/View.js CHANGED
@@ -39,7 +39,7 @@ import './smoothscroll-4b699764.js';
39
39
  import './GroupDeck.js';
40
40
  import 'react-bootstrap';
41
41
  import Button from 'react-bootstrap/Button';
42
- import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-539e2942.js';
42
+ import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-e3b00de2.js';
43
43
  import './util-7700fc59.js';
44
44
  import './brightcove-react-player-loader.es-83f53e4e.js';
45
45
  import 'react-bootstrap/Pagination';
@@ -1318,8 +1318,21 @@ var View = function View(props) {
1318
1318
  return false;
1319
1319
  };
1320
1320
 
1321
+ var checkArticleSeries = function checkArticleSeries(article) {
1322
+ if (!article || !article.body) {
1323
+ return false;
1324
+ }
1325
+ for (var i = 0; i < article.body.length; i++) {
1326
+ if (article.body[i]._type === 'articleSeries') {
1327
+ return true;
1328
+ }
1329
+ }
1330
+ return false;
1331
+ };
1332
+
1321
1333
  var isVideoSeries = checkVideoSeries(props.article);
1322
- var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
1334
+ var isArticleSeries = checkArticleSeries(props.article);
1335
+ var needInfiniteScroll = ['Articles', 'Videos', 'Podcasts'].includes(article.category.name) && article.taxonomyMapping && article.passwordLock !== true && !isVideoSeries && !isArticleSeries && !article.ExcludeFromInfiniteScroll && !sponsoredFlag;
1323
1336
 
1324
1337
  if (['Articles', 'Videos', 'Podcasts'].includes(article.category.name)) {
1325
1338
  description = null;
@@ -38,7 +38,7 @@ import './smoothscroll-4b699764.js';
38
38
  import './GroupDeck.js';
39
39
  import 'react-bootstrap';
40
40
  import 'react-bootstrap/Button';
41
- export { g as default } from './index-539e2942.js';
41
+ export { g as default } from './index-e3b00de2.js';
42
42
  import './util-7700fc59.js';
43
43
  import './brightcove-react-player-loader.es-83f53e4e.js';
44
44
  import 'react-bootstrap/Pagination';
@@ -8020,8 +8020,9 @@ var ArticleSeries = function ArticleSeries(_ref) {
8020
8020
  var router = useRouter();
8021
8021
 
8022
8022
  var refArray = useRef([]);
8023
+ var adRefArray = useRef([]);
8023
8024
 
8024
- var _useState = useState(77),
8025
+ var _useState = useState(100),
8025
8026
  _useState2 = _slicedToArray(_useState, 2),
8026
8027
  NavoffsetTop = _useState2[0],
8027
8028
  setNavoffsetTop = _useState2[1];
@@ -8098,26 +8099,26 @@ var ArticleSeries = function ArticleSeries(_ref) {
8098
8099
  };
8099
8100
 
8100
8101
  useEffect(function () {
8101
- if (!firstLoad) {
8102
- scrollToArticle();
8103
- }
8104
8102
  try {
8105
- setNavoffsetTop(document.getElementById('navbar-ham').offsetHeight);
8103
+ setNavoffsetTop(document.getElementById('navbar-ham').offsetHeight - 15);
8106
8104
  } catch (e) {}
8107
8105
  }, []);
8108
8106
 
8109
8107
  var scrollToArticle = function scrollToArticle(id) {
8110
8108
  var localArticleID = id ? id : selectedArticle;
8111
8109
  var findArticle = function findArticle(ref) {
8112
- return ref.props.id === localArticleID;
8110
+ if (ref) {
8111
+ return ref.props.id === localArticleID;
8112
+ }
8113
+ return false;
8113
8114
  };
8114
8115
  var indexOfRef = refArray.current.findIndex(findArticle);
8115
8116
 
8116
8117
  if (indexOfRef >= 0) {
8117
- //console.log(refArray.current[indexOfRef].wraperRef.current)
8118
- refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth' });
8119
- window.scrollTo({ top: refArray.current[indexOfRef].wraperRef.current.offsetTop + NavoffsetTop, behavior: 'smooth' });
8118
+ //refArray.current[indexOfRef].wraperRef.current.scrollIntoView({ behavior: 'smooth' })
8119
+ window.scrollTo({ top: refArray.current[indexOfRef].wraperRef.current.offsetTop - NavoffsetTop, behavior: 'smooth' });
8120
8120
  }
8121
+ setFirstLoad(true);
8121
8122
  };
8122
8123
 
8123
8124
  var renderAuthorBiography = function renderAuthorBiography(biography) {
@@ -8132,10 +8133,10 @@ var ArticleSeries = function ArticleSeries(_ref) {
8132
8133
  // Change URL and do other changes
8133
8134
  var doChanges = function doChanges() {
8134
8135
  if (firstLoad) {
8135
- window.history.pushState({ page: path }, '', newPath);
8136
+ refreshAD();
8136
8137
  }
8138
+ window.history.pushState({ page: path }, '', newPath);
8137
8139
  document.title = title;
8138
- refreshAD();
8139
8140
  setFirstLoad(true);
8140
8141
  };
8141
8142
 
@@ -8175,6 +8176,26 @@ var ArticleSeries = function ArticleSeries(_ref) {
8175
8176
  };
8176
8177
  });
8177
8178
 
8179
+ useEffect(function () {
8180
+ if (!firstLoad) {
8181
+ if (main_39) {
8182
+ grabLoadedAds();
8183
+ }
8184
+ }
8185
+ }, []);
8186
+
8187
+ var grabLoadedAds = function grabLoadedAds() {
8188
+ console.dir(lib_3);
8189
+ lib_3.getGoogletag().then(function (googletag) {
8190
+ var checkIfReady = window.setInterval(function () {
8191
+ if (window.googletag && googletag.pubadsReady) {
8192
+ clearInterval(checkIfReady);
8193
+ scrollToArticle();
8194
+ }
8195
+ }, 1000);
8196
+ });
8197
+ };
8198
+
8178
8199
  var refreshAD = function refreshAD(path) {
8179
8200
  //const activeArticle = path
8180
8201
  //let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
@@ -8216,13 +8237,38 @@ var ArticleSeries = function ArticleSeries(_ref) {
8216
8237
  )
8217
8238
  ),
8218
8239
  React__default.createElement('hr', { className: 'article-seperater' }),
8240
+ React__default.createElement(
8241
+ 'div',
8242
+ { className: 'ad-box', style: { textAlign: 'center' } },
8243
+ main_39 && Ads.map(function (ad, index) {
8244
+ if (index === 0) {
8245
+ return React__default.createElement(
8246
+ 'div',
8247
+ {
8248
+ key: 'addid-1',
8249
+ id: 'addid-1',
8250
+ ref: function ref(ele) {
8251
+ return adRefArray.current[0] = ele;
8252
+ },
8253
+ style: {
8254
+ display: 'flex',
8255
+ flex: '1 0 auto',
8256
+ justifyContent: 'center',
8257
+ alignItems: 'center',
8258
+ textAlign: 'center'
8259
+ } },
8260
+ ad.component
8261
+ );
8262
+ }
8263
+ })
8264
+ ),
8219
8265
  React__default.createElement(
8220
8266
  'div',
8221
8267
  { className: 'article-container', style: { marginBottom: '2rem' } },
8222
8268
  nodes.articles.map(function (article, index) {
8223
8269
  return React__default.createElement(
8224
- React__default.Fragment,
8225
- null,
8270
+ 'div',
8271
+ { key: article.title },
8226
8272
  React__default.createElement(
8227
8273
  InscreenSensor,
8228
8274
  {
@@ -8292,13 +8338,16 @@ var ArticleSeries = function ArticleSeries(_ref) {
8292
8338
  React__default.createElement(
8293
8339
  'div',
8294
8340
  { className: 'ad-box', style: { textAlign: 'center' } },
8295
- main_39 && nodes.articles.length - 1 !== index && Ads.map(function (ad, index) {
8296
- if (index === 0) {
8341
+ main_39 && nodes.articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8342
+ if (innerIndex === 0) {
8297
8343
  return React__default.createElement(
8298
8344
  'div',
8299
8345
  {
8300
- key: index,
8301
- id: 'addid-' + index,
8346
+ key: 'addid-' + (index + 2),
8347
+ id: 'addid-' + (index + 2),
8348
+ ref: function ref(ele) {
8349
+ return adRefArray.current[index + 1] = ele;
8350
+ },
8302
8351
  style: {
8303
8352
  display: 'flex',
8304
8353
  flex: '1 0 auto',
package/dist/esm/index.js CHANGED
@@ -73,7 +73,7 @@ import './index-d2f90501.js';
73
73
  import './js.cookie-6874175c.js';
74
74
  export { default as EventsDeck } from './EventsDeck.js';
75
75
  export { default as CMEDeck } from './CMEDeck.js';
76
- export { g as getSerializers } from './index-539e2942.js';
76
+ export { g as getSerializers } from './index-e3b00de2.js';
77
77
  import './util-7700fc59.js';
78
78
  import './brightcove-react-player-loader.es-83f53e4e.js';
79
79
  import 'react-bootstrap/Pagination';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.636",
3
+ "version": "1.0.638",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",