@mjhls/mjh-framework 1.0.379 → 1.0.381

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.379
2
+ # mjh-framework v. 1.0.381
3
3
 
4
4
 
5
5
  > Foundation Framework
@@ -34,7 +34,8 @@ var FigureComponent = function FigureComponent(props) {
34
34
  setOpenImgSrc = _useState4[1];
35
35
 
36
36
  var node = props.node,
37
- client = props.client;
37
+ client = props.client,
38
+ contextualADFlag = props.contextualADFlag;
38
39
  var caption = node.caption,
39
40
  alt = node.alt,
40
41
  blank = node.blank,
@@ -121,7 +122,7 @@ var FigureComponent = function FigureComponent(props) {
121
122
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
122
123
  )
123
124
  ),
124
- React__default.createElement('p', { className: 'clearfix' }),
125
+ contextualADFlag && React__default.createElement('p', { className: 'clearfix' }),
125
126
  React__default.createElement(
126
127
  'div',
127
128
  { className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
package/dist/cjs/index.js CHANGED
@@ -14400,7 +14400,7 @@ var NativeAd = function NativeAd(props) {
14400
14400
  };
14401
14401
 
14402
14402
  var Figure = dynamic(function () {
14403
- return Promise.resolve().then(function () { return require('./Figure-68977d29.js'); });
14403
+ return Promise.resolve().then(function () { return require('./Figure-04b8dbbe.js'); });
14404
14404
  }, { ssr: false });
14405
14405
 
14406
14406
  var checkUrlIsExternal = function checkUrlIsExternal(url) {
@@ -14439,7 +14439,9 @@ var getSerializers = function getSerializers() {
14439
14439
  drupalLeadSettings = props[5],
14440
14440
  currentPage = props[6],
14441
14441
  _props$ = props[7],
14442
- autoplay = _props$ === undefined ? false : _props$;
14442
+ autoplay = _props$ === undefined ? false : _props$,
14443
+ _props$2 = props[8],
14444
+ contextualADFlag = _props$2 === undefined ? false : _props$2;
14443
14445
 
14444
14446
  return {
14445
14447
  types: {
@@ -14461,7 +14463,7 @@ var getSerializers = function getSerializers() {
14461
14463
  figure: function figure(_ref3) {
14462
14464
  var node = _ref3.node;
14463
14465
 
14464
- return React__default.createElement(Figure, { node: node, client: client });
14466
+ return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag });
14465
14467
  },
14466
14468
  slideshow: function slideshow(_ref4) {
14467
14469
  var node = _ref4.node;
@@ -17087,6 +17089,10 @@ var Article = function Article(props) {
17087
17089
  shareOptions = props.shareOptions,
17088
17090
  cpModificationRequired = props.cpModificationRequired;
17089
17091
 
17092
+ var _useState = React.useState(null),
17093
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
17094
+ contextualADFlag = _useState2[0],
17095
+ setContextualADFlag = _useState2[1];
17090
17096
 
17091
17097
  var summary = getArticleSummary(props.article);
17092
17098
 
@@ -17195,6 +17201,11 @@ var Article = function Article(props) {
17195
17201
  parent.style.height = '0%';
17196
17202
  parent.style.width = '0%';
17197
17203
  parent.style.display = 'none';
17204
+ setContextualADFlag(false);
17205
+ } else {
17206
+ if (body && body[1] && body[1]._type === 'figure') {
17207
+ setContextualADFlag(true);
17208
+ }
17198
17209
  }
17199
17210
  };
17200
17211
 
@@ -17202,10 +17213,11 @@ var Article = function Article(props) {
17202
17213
  React__default.Fragment,
17203
17214
  null,
17204
17215
  React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
17205
- serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
17216
+ serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag),
17206
17217
  blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, selectedIndex))),
17207
17218
  imageOptions: { w: 320, h: 240, fit: 'max' }
17208
17219
  }, client.config())),
17220
+ React__default.createElement('span', { className: 'clearfix' }),
17209
17221
  React__default.createElement(
17210
17222
  'div',
17211
17223
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
@@ -17507,10 +17519,10 @@ var ArticleQueue = function ArticleQueue(props) {
17507
17519
  return article;
17508
17520
  };
17509
17521
 
17510
- var _useState = React.useState([firstArticle()]),
17511
- _useState2 = slicedToArray._slicedToArray(_useState, 2),
17512
- queueData = _useState2[0],
17513
- setQueueData = _useState2[1];
17522
+ var _useState3 = React.useState([firstArticle()]),
17523
+ _useState4 = slicedToArray._slicedToArray(_useState3, 2),
17524
+ queueData = _useState4[0],
17525
+ setQueueData = _useState4[1];
17514
17526
 
17515
17527
  var refreshAD = function refreshAD(path) {
17516
17528
  if (!main.main_39) {
@@ -29,7 +29,8 @@ var FigureComponent = function FigureComponent(props) {
29
29
  setOpenImgSrc = _useState4[1];
30
30
 
31
31
  var node = props.node,
32
- client = props.client;
32
+ client = props.client,
33
+ contextualADFlag = props.contextualADFlag;
33
34
  var caption = node.caption,
34
35
  alt = node.alt,
35
36
  blank = node.blank,
@@ -116,7 +117,7 @@ var FigureComponent = function FigureComponent(props) {
116
117
  caption && React__default.createElement('div', { dangerouslySetInnerHTML: { __html: '<span class=\'figure-caption\'>' + caption + '</span>' } })
117
118
  )
118
119
  ),
119
- React__default.createElement('p', { className: 'clearfix' }),
120
+ contextualADFlag && React__default.createElement('p', { className: 'clearfix' }),
120
121
  React__default.createElement(
121
122
  'div',
122
123
  { className: 'lightbox-target ' + (openImg ? 'open' : 'close') },
package/dist/esm/index.js CHANGED
@@ -14397,7 +14397,7 @@ var NativeAd = function NativeAd(props) {
14397
14397
  };
14398
14398
 
14399
14399
  var Figure = dynamic(function () {
14400
- return import('./Figure-d0930225.js');
14400
+ return import('./Figure-aa16a017.js');
14401
14401
  }, { ssr: false });
14402
14402
 
14403
14403
  var checkUrlIsExternal = function checkUrlIsExternal(url) {
@@ -14436,7 +14436,9 @@ var getSerializers = function getSerializers() {
14436
14436
  drupalLeadSettings = props[5],
14437
14437
  currentPage = props[6],
14438
14438
  _props$ = props[7],
14439
- autoplay = _props$ === undefined ? false : _props$;
14439
+ autoplay = _props$ === undefined ? false : _props$,
14440
+ _props$2 = props[8],
14441
+ contextualADFlag = _props$2 === undefined ? false : _props$2;
14440
14442
 
14441
14443
  return {
14442
14444
  types: {
@@ -14458,7 +14460,7 @@ var getSerializers = function getSerializers() {
14458
14460
  figure: function figure(_ref3) {
14459
14461
  var node = _ref3.node;
14460
14462
 
14461
- return React__default.createElement(Figure, { node: node, client: client });
14463
+ return React__default.createElement(Figure, { node: node, client: client, contextualADFlag: contextualADFlag });
14462
14464
  },
14463
14465
  slideshow: function slideshow(_ref4) {
14464
14466
  var node = _ref4.node;
@@ -17084,6 +17086,10 @@ var Article = function Article(props) {
17084
17086
  shareOptions = props.shareOptions,
17085
17087
  cpModificationRequired = props.cpModificationRequired;
17086
17088
 
17089
+ var _useState = useState(null),
17090
+ _useState2 = _slicedToArray(_useState, 2),
17091
+ contextualADFlag = _useState2[0],
17092
+ setContextualADFlag = _useState2[1];
17087
17093
 
17088
17094
  var summary = getArticleSummary(props.article);
17089
17095
 
@@ -17192,6 +17198,11 @@ var Article = function Article(props) {
17192
17198
  parent.style.height = '0%';
17193
17199
  parent.style.width = '0%';
17194
17200
  parent.style.display = 'none';
17201
+ setContextualADFlag(false);
17202
+ } else {
17203
+ if (body && body[1] && body[1]._type === 'figure') {
17204
+ setContextualADFlag(true);
17205
+ }
17195
17206
  }
17196
17207
  };
17197
17208
 
@@ -17199,10 +17210,11 @@ var Article = function Article(props) {
17199
17210
  React__default.Fragment,
17200
17211
  null,
17201
17212
  React__default.createElement(BlockContent, _extends$2({
17202
- serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false),
17213
+ serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings, currentPage, false, contextualADFlag),
17203
17214
  blocks: [].concat(_toConsumableArray(body.slice(0, selectedIndex))),
17204
17215
  imageOptions: { w: 320, h: 240, fit: 'max' }
17205
17216
  }, client.config())),
17217
+ React__default.createElement('span', { className: 'clearfix' }),
17206
17218
  React__default.createElement(
17207
17219
  'div',
17208
17220
  { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
@@ -17504,10 +17516,10 @@ var ArticleQueue = function ArticleQueue(props) {
17504
17516
  return article;
17505
17517
  };
17506
17518
 
17507
- var _useState = useState([firstArticle()]),
17508
- _useState2 = _slicedToArray(_useState, 2),
17509
- queueData = _useState2[0],
17510
- setQueueData = _useState2[1];
17519
+ var _useState3 = useState([firstArticle()]),
17520
+ _useState4 = _slicedToArray(_useState3, 2),
17521
+ queueData = _useState4[0],
17522
+ setQueueData = _useState4[1];
17511
17523
 
17512
17524
  var refreshAD = function refreshAD(path) {
17513
17525
  if (!main_39) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.379",
3
+ "version": "1.0.381",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",