@mjhls/mjh-framework 1.0.349 → 1.0.351

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.349
2
+ # mjh-framework v. 1.0.351
3
3
 
4
4
 
5
5
  > Foundation Framework
@@ -261,10 +261,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
261
261
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
262
262
  return renderAuthor(authorDetail, index, article.authorMapping.length);
263
263
  }),
264
- article.publicationSource && React__default.createElement(
264
+ article.source && React__default.createElement(
265
265
  'p',
266
266
  { className: 'p-0 mb-1' },
267
- article.publicationSource
267
+ article.source
268
268
  ),
269
269
  showCategory && article.contentCategory && React__default.createElement(
270
270
  'p',
@@ -341,10 +341,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
341
341
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
342
342
  return renderAuthor(authorDetail, index, article.authorMapping.length);
343
343
  }),
344
- article.publicationSource && React__default.createElement(
344
+ article.source && React__default.createElement(
345
345
  'p',
346
346
  { className: 'p-0 mb-1' },
347
- article.publicationSource
347
+ article.source
348
348
  ),
349
349
  showCategory && article.contentCategory && React__default.createElement(
350
350
  'p',
@@ -422,10 +422,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
422
422
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
423
423
  return renderAuthor(authorDetail, index, article.authorMapping.length);
424
424
  }),
425
- article.publicationSource && React__default.createElement(
425
+ article.source && React__default.createElement(
426
426
  'p',
427
427
  { className: 'p-0 mb-1' },
428
- article.publicationSource
428
+ article.source
429
429
  ),
430
430
  showCategory && article.contentCategory && React__default.createElement(
431
431
  'p',
@@ -1048,13 +1048,14 @@ var TaxonomyCard = function TaxonomyCard(props) {
1048
1048
  { className: 'details-field', href: field.value, key: index },
1049
1049
  field.value
1050
1050
  );
1051
- } else if (field.value && field.key === 'email') {
1052
- return React__default.createElement(
1053
- 'a',
1054
- { className: 'details-field', href: 'mailto:' + field.value, key: index },
1055
- field.value
1056
- );
1057
1051
  }
1052
+ // else if (field.value && field.key === 'email') {
1053
+ // return (
1054
+ // <a className='details-field' href={`mailto:${field.value}`} key={index}>
1055
+ // {field.value}
1056
+ // </a>
1057
+ // )
1058
+ // }
1058
1059
  })
1059
1060
  ),
1060
1061
  address && address.length > 0 && React__default.createElement(
@@ -12,7 +12,7 @@ require('react-bootstrap/Card');
12
12
  require('react-dom');
13
13
  require('./index-b5eb3ff8.js');
14
14
  require('./index-fa0fb52c.js');
15
- var TaxonomyCard = require('./TaxonomyCard-266e757b.js');
15
+ var TaxonomyCard = require('./TaxonomyCard-b51062ec.js');
16
16
  require('./react-social-icons-cd0d9d3b.js');
17
17
 
18
18
 
package/dist/cjs/index.js CHANGED
@@ -37,7 +37,7 @@ var GridContent = require('./GridContent-7a85d904.js');
37
37
  var DeckQueue = require('./DeckQueue.js');
38
38
  require('react-bootstrap/Media');
39
39
  var ThumbnailCard = require('./ThumbnailCard.js');
40
- var TaxonomyCard = require('./TaxonomyCard-266e757b.js');
40
+ var TaxonomyCard = require('./TaxonomyCard-b51062ec.js');
41
41
  require('./react-social-icons-cd0d9d3b.js');
42
42
  var smoothscroll = require('./smoothscroll-95231a70.js');
43
43
  var GroupDeck = require('./GroupDeck.js');
@@ -3208,7 +3208,9 @@ var ADWelcome = function ADWelcome(_ref) {
3208
3208
  };
3209
3209
 
3210
3210
  var ADSponsoredResources = function ADSponsoredResources(_ref) {
3211
- var sponsoredAd = _ref.sponsoredAd;
3211
+ var sponsoredAd = _ref.sponsoredAd,
3212
+ _ref$minScreenWidth = _ref.minScreenWidth,
3213
+ minScreenWidth = _ref$minScreenWidth === undefined ? 1200 : _ref$minScreenWidth;
3212
3214
  var className = sponsoredAd.className,
3213
3215
  slotId = sponsoredAd.slotId,
3214
3216
  adUnit = sponsoredAd.adUnit,
@@ -3231,6 +3233,17 @@ var ADSponsoredResources = function ADSponsoredResources(_ref) {
3231
3233
  publication_url: targeting.publication_url
3232
3234
  };
3233
3235
 
3236
+ var _useState = React.useState(false),
3237
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
3238
+ widthFlag = _useState2[0],
3239
+ setWidthFlag = _useState2[1];
3240
+
3241
+ React.useEffect(function () {
3242
+ if (window && window.innerWidth >= minScreenWidth) {
3243
+ setWidthFlag(true);
3244
+ }
3245
+ }, [minScreenWidth]);
3246
+
3234
3247
  var collapseAd = function collapseAd() {
3235
3248
  var parent = document.getElementById('sponsored-ad-wrapper');
3236
3249
  parent.style.height = '0%';
@@ -3246,29 +3259,30 @@ var ADSponsoredResources = function ADSponsoredResources(_ref) {
3246
3259
  collapseAd();
3247
3260
  }
3248
3261
  };
3249
-
3250
- return React__default.createElement(
3251
- React__default.Fragment,
3252
- null,
3253
- React__default.createElement(
3254
- 'div',
3255
- { id: 'sponsored-ad-wrapper', className: 'sponsored-ad-wrapper' },
3262
+ if (widthFlag) {
3263
+ return React__default.createElement(
3264
+ React__default.Fragment,
3265
+ null,
3256
3266
  React__default.createElement(
3257
3267
  'div',
3258
- { className: 'sponsored-ad' },
3259
- React__default.createElement(AdSlot.DFPAdSlot, {
3260
- className: className,
3261
- slotId: slotId,
3262
- networkID: networkID,
3263
- sizes: sizes,
3264
- adUnit: adUnit,
3265
- targeting: adTargeting,
3266
- refreshFlag: false,
3267
- checkIsAdFound: checkIsAdFound
3268
- })
3268
+ { id: 'sponsored-ad-wrapper', className: 'sponsored-ad-wrapper' },
3269
+ React__default.createElement(
3270
+ 'div',
3271
+ { className: 'sponsored-ad' },
3272
+ React__default.createElement(AdSlot.DFPAdSlot, {
3273
+ className: className,
3274
+ slotId: slotId,
3275
+ networkID: networkID,
3276
+ sizes: sizes,
3277
+ adUnit: adUnit,
3278
+ targeting: adTargeting,
3279
+ refreshFlag: false,
3280
+ checkIsAdFound: checkIsAdFound
3281
+ })
3282
+ )
3269
3283
  )
3270
- )
3271
- );
3284
+ );
3285
+ } else return null;
3272
3286
  };
3273
3287
 
3274
3288
  var urlFor$1 = function urlFor(source, builder) {
@@ -16371,6 +16385,7 @@ var Article = function Article(props) {
16371
16385
  } : _props$article$url;
16372
16386
  var url = _props$article$url.current,
16373
16387
  issue = _props$article.issue,
16388
+ source = _props$article.source,
16374
16389
  regionalPages = props.regionalPages,
16375
16390
  nationalPage = props.nationalPage,
16376
16391
  ISIContent = props.ISIContent,
@@ -16598,18 +16613,18 @@ var Article = function Article(props) {
16598
16613
  renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
16599
16614
  );
16600
16615
  }),
16601
- issue && React__default.createElement(
16616
+ React__default.createElement(
16602
16617
  'div',
16603
16618
  null,
16604
- React__default.createElement(
16605
- 'div',
16619
+ source && React__default.createElement(
16620
+ 'p',
16606
16621
  null,
16607
- issue.articleSource && React__default.createElement(
16608
- 'p',
16609
- null,
16610
- issue.articleSource
16611
- )
16612
- ),
16622
+ source
16623
+ )
16624
+ ),
16625
+ issue && React__default.createElement(
16626
+ 'div',
16627
+ null,
16613
16628
  React__default.createElement(
16614
16629
  'div',
16615
16630
  { className: 'volume-issue' },
@@ -255,10 +255,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
255
255
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
256
256
  return renderAuthor(authorDetail, index, article.authorMapping.length);
257
257
  }),
258
- article.publicationSource && React__default.createElement(
258
+ article.source && React__default.createElement(
259
259
  'p',
260
260
  { className: 'p-0 mb-1' },
261
- article.publicationSource
261
+ article.source
262
262
  ),
263
263
  showCategory && article.contentCategory && React__default.createElement(
264
264
  'p',
@@ -335,10 +335,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
335
335
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
336
336
  return renderAuthor(authorDetail, index, article.authorMapping.length);
337
337
  }),
338
- article.publicationSource && React__default.createElement(
338
+ article.source && React__default.createElement(
339
339
  'p',
340
340
  { className: 'p-0 mb-1' },
341
- article.publicationSource
341
+ article.source
342
342
  ),
343
343
  showCategory && article.contentCategory && React__default.createElement(
344
344
  'p',
@@ -416,10 +416,10 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
416
416
  showAuthor && article.authorMapping && article.authorMapping.length > 0 && article.authorMapping.map(function (authorDetail, index) {
417
417
  return renderAuthor(authorDetail, index, article.authorMapping.length);
418
418
  }),
419
- article.publicationSource && React__default.createElement(
419
+ article.source && React__default.createElement(
420
420
  'p',
421
421
  { className: 'p-0 mb-1' },
422
- article.publicationSource
422
+ article.source
423
423
  ),
424
424
  showCategory && article.contentCategory && React__default.createElement(
425
425
  'p',
@@ -1043,13 +1043,14 @@ var TaxonomyCard = function TaxonomyCard(props) {
1043
1043
  { className: 'details-field', href: field.value, key: index },
1044
1044
  field.value
1045
1045
  );
1046
- } else if (field.value && field.key === 'email') {
1047
- return React__default.createElement(
1048
- 'a',
1049
- { className: 'details-field', href: 'mailto:' + field.value, key: index },
1050
- field.value
1051
- );
1052
1046
  }
1047
+ // else if (field.value && field.key === 'email') {
1048
+ // return (
1049
+ // <a className='details-field' href={`mailto:${field.value}`} key={index}>
1050
+ // {field.value}
1051
+ // </a>
1052
+ // )
1053
+ // }
1053
1054
  })
1054
1055
  ),
1055
1056
  address && address.length > 0 && React__default.createElement(
@@ -10,5 +10,5 @@ import 'react-bootstrap/Card';
10
10
  import 'react-dom';
11
11
  import './index-51a80699.js';
12
12
  import './index-5f9f807a.js';
13
- export { T as default } from './TaxonomyCard-c1a1a544.js';
13
+ export { T as default } from './TaxonomyCard-f1f072ab.js';
14
14
  import './react-social-icons-a7d5c5c7.js';
package/dist/esm/index.js CHANGED
@@ -30,8 +30,8 @@ export { A as AD, G as GridContent } from './GridContent-e2b1de22.js';
30
30
  export { default as DeckQueue } from './DeckQueue.js';
31
31
  import 'react-bootstrap/Media';
32
32
  export { default as ThumbnailCard } from './ThumbnailCard.js';
33
- import { B as BlockContent } from './TaxonomyCard-c1a1a544.js';
34
- export { T as TaxonomyCard } from './TaxonomyCard-c1a1a544.js';
33
+ import { B as BlockContent } from './TaxonomyCard-f1f072ab.js';
34
+ export { T as TaxonomyCard } from './TaxonomyCard-f1f072ab.js';
35
35
  import './react-social-icons-a7d5c5c7.js';
36
36
  import { g as getYoutubeId } from './smoothscroll-4b699764.js';
37
37
  import GroupDeck from './GroupDeck.js';
@@ -3205,7 +3205,9 @@ var ADWelcome = function ADWelcome(_ref) {
3205
3205
  };
3206
3206
 
3207
3207
  var ADSponsoredResources = function ADSponsoredResources(_ref) {
3208
- var sponsoredAd = _ref.sponsoredAd;
3208
+ var sponsoredAd = _ref.sponsoredAd,
3209
+ _ref$minScreenWidth = _ref.minScreenWidth,
3210
+ minScreenWidth = _ref$minScreenWidth === undefined ? 1200 : _ref$minScreenWidth;
3209
3211
  var className = sponsoredAd.className,
3210
3212
  slotId = sponsoredAd.slotId,
3211
3213
  adUnit = sponsoredAd.adUnit,
@@ -3228,6 +3230,17 @@ var ADSponsoredResources = function ADSponsoredResources(_ref) {
3228
3230
  publication_url: targeting.publication_url
3229
3231
  };
3230
3232
 
3233
+ var _useState = useState(false),
3234
+ _useState2 = _slicedToArray(_useState, 2),
3235
+ widthFlag = _useState2[0],
3236
+ setWidthFlag = _useState2[1];
3237
+
3238
+ useEffect(function () {
3239
+ if (window && window.innerWidth >= minScreenWidth) {
3240
+ setWidthFlag(true);
3241
+ }
3242
+ }, [minScreenWidth]);
3243
+
3231
3244
  var collapseAd = function collapseAd() {
3232
3245
  var parent = document.getElementById('sponsored-ad-wrapper');
3233
3246
  parent.style.height = '0%';
@@ -3243,29 +3256,30 @@ var ADSponsoredResources = function ADSponsoredResources(_ref) {
3243
3256
  collapseAd();
3244
3257
  }
3245
3258
  };
3246
-
3247
- return React__default.createElement(
3248
- React__default.Fragment,
3249
- null,
3250
- React__default.createElement(
3251
- 'div',
3252
- { id: 'sponsored-ad-wrapper', className: 'sponsored-ad-wrapper' },
3259
+ if (widthFlag) {
3260
+ return React__default.createElement(
3261
+ React__default.Fragment,
3262
+ null,
3253
3263
  React__default.createElement(
3254
3264
  'div',
3255
- { className: 'sponsored-ad' },
3256
- React__default.createElement(DFPAdSlot, {
3257
- className: className,
3258
- slotId: slotId,
3259
- networkID: networkID,
3260
- sizes: sizes,
3261
- adUnit: adUnit,
3262
- targeting: adTargeting,
3263
- refreshFlag: false,
3264
- checkIsAdFound: checkIsAdFound
3265
- })
3265
+ { id: 'sponsored-ad-wrapper', className: 'sponsored-ad-wrapper' },
3266
+ React__default.createElement(
3267
+ 'div',
3268
+ { className: 'sponsored-ad' },
3269
+ React__default.createElement(DFPAdSlot, {
3270
+ className: className,
3271
+ slotId: slotId,
3272
+ networkID: networkID,
3273
+ sizes: sizes,
3274
+ adUnit: adUnit,
3275
+ targeting: adTargeting,
3276
+ refreshFlag: false,
3277
+ checkIsAdFound: checkIsAdFound
3278
+ })
3279
+ )
3266
3280
  )
3267
- )
3268
- );
3281
+ );
3282
+ } else return null;
3269
3283
  };
3270
3284
 
3271
3285
  var urlFor$1 = function urlFor(source, builder) {
@@ -16368,6 +16382,7 @@ var Article = function Article(props) {
16368
16382
  } : _props$article$url;
16369
16383
  var url = _props$article$url.current,
16370
16384
  issue = _props$article.issue,
16385
+ source = _props$article.source,
16371
16386
  regionalPages = props.regionalPages,
16372
16387
  nationalPage = props.nationalPage,
16373
16388
  ISIContent = props.ISIContent,
@@ -16595,18 +16610,18 @@ var Article = function Article(props) {
16595
16610
  renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length)
16596
16611
  );
16597
16612
  }),
16598
- issue && React__default.createElement(
16613
+ React__default.createElement(
16599
16614
  'div',
16600
16615
  null,
16601
- React__default.createElement(
16602
- 'div',
16616
+ source && React__default.createElement(
16617
+ 'p',
16603
16618
  null,
16604
- issue.articleSource && React__default.createElement(
16605
- 'p',
16606
- null,
16607
- issue.articleSource
16608
- )
16609
- ),
16619
+ source
16620
+ )
16621
+ ),
16622
+ issue && React__default.createElement(
16623
+ 'div',
16624
+ null,
16610
16625
  React__default.createElement(
16611
16626
  'div',
16612
16627
  { className: 'volume-issue' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.349",
3
+ "version": "1.0.351",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",