@mjhls/mjh-framework 1.0.340 → 1.0.342

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.340
2
+ # mjh-framework v. 1.0.341
3
3
 
4
4
 
5
5
  > Foundation Framework
@@ -49,11 +49,11 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
49
49
  imageWidth = props.imageWidth,
50
50
  client = props.client,
51
51
  Settings = props.Settings,
52
- key = props.key;
52
+ index = props.index;
53
53
 
54
54
  return React__default.createElement(
55
55
  Col,
56
- { md: 12, lg: 12, style: { display: 'flex', flex: '1 0 auto' }, key: key },
56
+ { md: 12, lg: 12, style: { display: 'flex', flex: '1 0 auto' }, key: index },
57
57
  React__default.createElement(
58
58
  Card,
59
59
  { style: { boxShadow: 'none', borderBottom: '1px solid #aaa', paddingBottom: '1rem' } },
@@ -123,11 +123,11 @@ var PublicationDeckBlock = function PublicationDeckBlock(props) {
123
123
  imageWidth = props.imageWidth,
124
124
  client = props.client,
125
125
  Settings = props.Settings,
126
- key = props.key;
126
+ index = props.index;
127
127
 
128
128
  return React__default.createElement(
129
129
  Col,
130
- { md: 12, lg: 6, style: { display: 'flex', flex: '1 0 auto' }, key: key },
130
+ { md: 12, lg: 6, style: { display: 'flex', flex: '1 0 auto' }, key: index },
131
131
  React__default.createElement(
132
132
  Card,
133
133
  null,
@@ -173,7 +173,7 @@ var IssueContentDeck = function IssueContentDeck(props) {
173
173
  data && data.length ? data.map(function (row, index) {
174
174
  if (variant === 'stack') {
175
175
  return row.url && row.url.current && React__default.createElement(PublicationDeckStack, {
176
- key: index,
176
+ index: index,
177
177
  title: row.title,
178
178
  coverImage: row.thumbnail,
179
179
  link: row.url.current,
@@ -183,12 +183,12 @@ var IssueContentDeck = function IssueContentDeck(props) {
183
183
  imageWidth: imageWidth,
184
184
  client: client,
185
185
  published: row.published,
186
- author: row.authorMapping.displayName || '',
186
+ author: row.authorMapping && row.authorMapping.displayName ? row.authorMapping.displayName : '',
187
187
  summary: row.summary
188
188
  });
189
189
  }
190
190
  return React__default.createElement(PublicationDeckBlock, {
191
- key: index,
191
+ index: index,
192
192
  title: row.title,
193
193
  coverImage: row.thumbnail,
194
194
  link: row.url.current,
package/dist/cjs/index.js CHANGED
@@ -2836,7 +2836,7 @@ var AD300x250 = function AD300x250(_ref) {
2836
2836
 
2837
2837
  var mobileView = false;
2838
2838
  if (main.main_39) {
2839
- pos = 'rect1-mobile';
2839
+ pos = 'rec1-mobile';
2840
2840
  mobileView = true;
2841
2841
  }
2842
2842
 
@@ -2868,7 +2868,7 @@ var AD300x250x600 = function AD300x250x600(_ref) {
2868
2868
 
2869
2869
  var mobileView = false;
2870
2870
  if (main.main_39) {
2871
- pos = 'rect2-mobile';
2871
+ pos = 'rec2-mobile';
2872
2872
  mobileView = true;
2873
2873
  }
2874
2874
 
@@ -16446,6 +16446,16 @@ var Article = function Article(props) {
16446
16446
  })
16447
16447
  });
16448
16448
  var selectedIndex = indexes[1] + 1;
16449
+
16450
+ var checkIsAdFound = function checkIsAdFound(isFound) {
16451
+ if (!isFound) {
16452
+ var parent = document.getElementById('contextual-native-ad-' + payload._id);
16453
+ parent.style.height = '0%';
16454
+ parent.style.width = '0%';
16455
+ parent.style.display = 'none';
16456
+ }
16457
+ };
16458
+
16449
16459
  return React__default.createElement(
16450
16460
  React__default.Fragment,
16451
16461
  null,
@@ -16456,8 +16466,8 @@ var Article = function Article(props) {
16456
16466
  }, client.config())),
16457
16467
  React__default.createElement(
16458
16468
  'div',
16459
- { className: 'contextual-native-ad' },
16460
- React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualAD, { refreshFlag: false }))
16469
+ { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
16470
+ React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: checkIsAdFound }))
16461
16471
  ),
16462
16472
  React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
16463
16473
  serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings),
@@ -16833,15 +16843,15 @@ var ArticleQueue = function ArticleQueue(props) {
16833
16843
 
16834
16844
  var changeMeta = function changeMeta(meta) {
16835
16845
  document.title = meta.shareTitle;
16836
- document.querySelector('meta[name="description"]').setAttribute("content", meta.shareSummary);
16837
- document.querySelector('meta[property="og:url"]').setAttribute("content", meta.shareUrl);
16838
- document.querySelector('meta[property="og:title"]').setAttribute("content", meta.shareTitle);
16839
- document.querySelector('meta[property="og:site_name"]').setAttribute("content", meta.shareVia);
16840
- document.querySelector('meta[property="og:description"]').setAttribute("content", meta.shareSummary);
16841
- document.querySelector('meta[name="twitter:title"]').setAttribute("content", meta.shareTitle);
16842
- document.querySelector('meta[name="twitter:image"]').setAttribute("content", meta.shareImage);
16843
- document.querySelector('meta[name="twitter:site"]').setAttribute("content", meta.shareVia);
16844
- document.querySelector('meta[name="twitter:description"]').setAttribute("content", meta.shareSummary);
16846
+ document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
16847
+ document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
16848
+ document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
16849
+ document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
16850
+ document.querySelector('meta[property="og:description"]').setAttribute('content', meta.shareSummary);
16851
+ document.querySelector('meta[name="twitter:title"]').setAttribute('content', meta.shareTitle);
16852
+ document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
16853
+ document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
16854
+ document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
16845
16855
  };
16846
16856
 
16847
16857
  var changeUrl = function changeUrl(path, visibility, meta) {
@@ -44,11 +44,11 @@ var PublicationDeckStack = function PublicationDeckStack(props) {
44
44
  imageWidth = props.imageWidth,
45
45
  client = props.client,
46
46
  Settings = props.Settings,
47
- key = props.key;
47
+ index = props.index;
48
48
 
49
49
  return React__default.createElement(
50
50
  Col,
51
- { md: 12, lg: 12, style: { display: 'flex', flex: '1 0 auto' }, key: key },
51
+ { md: 12, lg: 12, style: { display: 'flex', flex: '1 0 auto' }, key: index },
52
52
  React__default.createElement(
53
53
  Card,
54
54
  { style: { boxShadow: 'none', borderBottom: '1px solid #aaa', paddingBottom: '1rem' } },
@@ -118,11 +118,11 @@ var PublicationDeckBlock = function PublicationDeckBlock(props) {
118
118
  imageWidth = props.imageWidth,
119
119
  client = props.client,
120
120
  Settings = props.Settings,
121
- key = props.key;
121
+ index = props.index;
122
122
 
123
123
  return React__default.createElement(
124
124
  Col,
125
- { md: 12, lg: 6, style: { display: 'flex', flex: '1 0 auto' }, key: key },
125
+ { md: 12, lg: 6, style: { display: 'flex', flex: '1 0 auto' }, key: index },
126
126
  React__default.createElement(
127
127
  Card,
128
128
  null,
@@ -168,7 +168,7 @@ var IssueContentDeck = function IssueContentDeck(props) {
168
168
  data && data.length ? data.map(function (row, index) {
169
169
  if (variant === 'stack') {
170
170
  return row.url && row.url.current && React__default.createElement(PublicationDeckStack, {
171
- key: index,
171
+ index: index,
172
172
  title: row.title,
173
173
  coverImage: row.thumbnail,
174
174
  link: row.url.current,
@@ -178,12 +178,12 @@ var IssueContentDeck = function IssueContentDeck(props) {
178
178
  imageWidth: imageWidth,
179
179
  client: client,
180
180
  published: row.published,
181
- author: row.authorMapping.displayName || '',
181
+ author: row.authorMapping && row.authorMapping.displayName ? row.authorMapping.displayName : '',
182
182
  summary: row.summary
183
183
  });
184
184
  }
185
185
  return React__default.createElement(PublicationDeckBlock, {
186
- key: index,
186
+ index: index,
187
187
  title: row.title,
188
188
  coverImage: row.thumbnail,
189
189
  link: row.url.current,
package/dist/esm/index.js CHANGED
@@ -2833,7 +2833,7 @@ var AD300x250 = function AD300x250(_ref) {
2833
2833
 
2834
2834
  var mobileView = false;
2835
2835
  if (main_39) {
2836
- pos = 'rect1-mobile';
2836
+ pos = 'rec1-mobile';
2837
2837
  mobileView = true;
2838
2838
  }
2839
2839
 
@@ -2865,7 +2865,7 @@ var AD300x250x600 = function AD300x250x600(_ref) {
2865
2865
 
2866
2866
  var mobileView = false;
2867
2867
  if (main_39) {
2868
- pos = 'rect2-mobile';
2868
+ pos = 'rec2-mobile';
2869
2869
  mobileView = true;
2870
2870
  }
2871
2871
 
@@ -16443,6 +16443,16 @@ var Article = function Article(props) {
16443
16443
  })
16444
16444
  });
16445
16445
  var selectedIndex = indexes[1] + 1;
16446
+
16447
+ var checkIsAdFound = function checkIsAdFound(isFound) {
16448
+ if (!isFound) {
16449
+ var parent = document.getElementById('contextual-native-ad-' + payload._id);
16450
+ parent.style.height = '0%';
16451
+ parent.style.width = '0%';
16452
+ parent.style.display = 'none';
16453
+ }
16454
+ };
16455
+
16446
16456
  return React__default.createElement(
16447
16457
  React__default.Fragment,
16448
16458
  null,
@@ -16453,8 +16463,8 @@ var Article = function Article(props) {
16453
16463
  }, client.config())),
16454
16464
  React__default.createElement(
16455
16465
  'div',
16456
- { className: 'contextual-native-ad' },
16457
- React__default.createElement(DFPAdSlot, _extends$2({}, payload.contextualAD, { refreshFlag: false }))
16466
+ { id: 'contextual-native-ad-' + payload._id, className: 'contextual-native-ad' },
16467
+ React__default.createElement(DFPAdSlot, _extends$2({}, payload.contextualAD, { refreshFlag: false, checkIsAdFound: checkIsAdFound }))
16458
16468
  ),
16459
16469
  React__default.createElement(BlockContent, _extends$2({
16460
16470
  serializers: getSerializers(client, pageview, videoAccountIDs, function () {}, true, drupalLeadSettings),
@@ -16830,15 +16840,15 @@ var ArticleQueue = function ArticleQueue(props) {
16830
16840
 
16831
16841
  var changeMeta = function changeMeta(meta) {
16832
16842
  document.title = meta.shareTitle;
16833
- document.querySelector('meta[name="description"]').setAttribute("content", meta.shareSummary);
16834
- document.querySelector('meta[property="og:url"]').setAttribute("content", meta.shareUrl);
16835
- document.querySelector('meta[property="og:title"]').setAttribute("content", meta.shareTitle);
16836
- document.querySelector('meta[property="og:site_name"]').setAttribute("content", meta.shareVia);
16837
- document.querySelector('meta[property="og:description"]').setAttribute("content", meta.shareSummary);
16838
- document.querySelector('meta[name="twitter:title"]').setAttribute("content", meta.shareTitle);
16839
- document.querySelector('meta[name="twitter:image"]').setAttribute("content", meta.shareImage);
16840
- document.querySelector('meta[name="twitter:site"]').setAttribute("content", meta.shareVia);
16841
- document.querySelector('meta[name="twitter:description"]').setAttribute("content", meta.shareSummary);
16843
+ document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
16844
+ document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
16845
+ document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
16846
+ document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
16847
+ document.querySelector('meta[property="og:description"]').setAttribute('content', meta.shareSummary);
16848
+ document.querySelector('meta[name="twitter:title"]').setAttribute('content', meta.shareTitle);
16849
+ document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
16850
+ document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
16851
+ document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
16842
16852
  };
16843
16853
 
16844
16854
  var changeUrl = function changeUrl(path, visibility, meta) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.340",
3
+ "version": "1.0.342",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",