@mjhls/mjh-framework 1.0.509 → 1.0.511

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 (51) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleQueue.js +512 -9
  3. package/dist/cjs/InscreenSensor-3aec8492.js +361 -0
  4. package/dist/cjs/NavNative.js +1 -1
  5. package/dist/cjs/View.js +64 -62
  6. package/dist/cjs/getQuery.js +2 -2
  7. package/dist/cjs/getRelatedArticle.js +16 -12
  8. package/dist/cjs/index.js +3 -3
  9. package/dist/esm/AD.js +1 -1
  10. package/dist/esm/AD300x250.js +2 -2
  11. package/dist/esm/AD300x250x600.js +2 -2
  12. package/dist/esm/AD728x90.js +2 -2
  13. package/dist/esm/ADFloatingFooter.js +2 -2
  14. package/dist/esm/ADGutter.js +2 -2
  15. package/dist/esm/ADSponsoredResources.js +2 -2
  16. package/dist/esm/ADWebcast.js +2 -2
  17. package/dist/esm/ADWelcome.js +2 -2
  18. package/dist/esm/AdSlot.js +2 -2
  19. package/dist/esm/ArticleQueue.js +507 -4
  20. package/dist/esm/CMEDeck.js +2 -2
  21. package/dist/esm/Column2.js +3 -3
  22. package/dist/esm/Column3.js +4 -4
  23. package/dist/esm/DeckContent.js +3 -3
  24. package/dist/esm/DeckQueue.js +4 -4
  25. package/dist/esm/{Dfp-58cfc45a.js → Dfp-81a052c2.js} +2 -2
  26. package/dist/esm/ExternalResources.js +2 -2
  27. package/dist/esm/GridContent.js +6 -6
  28. package/dist/esm/InscreenSensor-280b2b10.js +352 -0
  29. package/dist/esm/IssueLanding.js +4 -4
  30. package/dist/esm/LeftNav.js +2 -2
  31. package/dist/esm/MasterDeck.js +4 -4
  32. package/dist/esm/NavNative.js +1 -1
  33. package/dist/esm/PartnerDetailListing.js +4 -4
  34. package/dist/esm/QueueDeckExpanded.js +4 -4
  35. package/dist/esm/SideFooter.js +3 -3
  36. package/dist/esm/TemplateNormal.js +4 -4
  37. package/dist/esm/VideoSeriesListing.js +2 -2
  38. package/dist/esm/View.js +64 -62
  39. package/dist/esm/{_arrayMap-a8dd2b2c.js → _arrayMap-64cbe0e4.js} +2 -2
  40. package/dist/esm/{debounce-8cd9e09c.js → debounce-048d9cb6.js} +1 -1
  41. package/dist/esm/{get-ae817b75.js → get-0eb56363.js} +2 -2
  42. package/dist/esm/getQuery.js +2 -2
  43. package/dist/esm/getRelatedArticle.js +14 -10
  44. package/dist/esm/getSerializers.js +2 -2
  45. package/dist/esm/index.js +8 -8
  46. package/dist/esm/{isSymbol-c1b9be80.js → isSymbol-b7b7434f.js} +1 -1
  47. package/package.json +1 -1
  48. package/dist/cjs/InscreenSensor-f9989c04.js +0 -863
  49. package/dist/esm/InscreenSensor-67905ed5.js +0 -857
  50. /package/dist/esm/{ADInfeed-15266562.js → ADInfeed-cb0d3a09.js} +0 -0
  51. /package/dist/esm/{ADlgInfeed-64346b44.js → ADlgInfeed-353fb56a.js} +0 -0
@@ -12,9 +12,9 @@ var getQuery = function getQuery(type) {
12
12
  var today = moment.moment().utc().format();
13
13
  switch (type) {
14
14
  case 'related':
15
- return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= \'' + today + '\'\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
15
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= \'' + today + '\'\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && taxonomyMapping[].disableAds != \'true\'\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && contentCategory->.disableAds != \'true\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n \'showPublished\':select(contentCategory->name !=\'Webcasts\' => true,false),\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n }';
16
16
  case 'article':
17
- return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
17
+ return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n \'showPublished\':select(contentCategory->name !=\'Webcasts\' => true,false),\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n \'category\':contentCategory->{\n name,\n disableAds\n },\n \'issue\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.issueGroup._ref][0] {\n name,\n volume,\n \'issueNumber\': number,\n \'articleSource\': source,\n \'path\': identifier.current,\n \'publication\' : *[_type == \'publication\' && !(_id in path("drafts.**")) && is_visible == true && _id == ^.parent._ref][0] {\n name,\n \'path\': identifier.current\n },\n \'url\' : pdf.asset-> url\n }\n\n }';
18
18
  case 'publication':
19
19
  return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issues\': *[_type == \'publication\'\n && is_visible\n && references(^._id)\n && defined(identifier)] {\n ...,\n pdf{asset->}\n } | order(year desc, month desc)\n }';
20
20
  case 'issue':
@@ -33,19 +33,23 @@ var getRelatedArticle = function () {
33
33
  } : _article$url;
34
34
  url = _article$url.current, content_placement = article.content_placement;
35
35
  taxonomy = [];
36
+ //404 articles were throwing server error
37
+
38
+ if (content_placement) {
39
+ content_placement.forEach(function (_ref3) {
40
+ var path = _ref3.path,
41
+ _id = _ref3._id;
42
+
43
+ var prev_url_to_check = prevUrl;
44
+ if (prev_url_to_check.includes('?')) {
45
+ prev_url_to_check = prev_url_to_check.split('?')[0];
46
+ }
47
+ if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
48
+ });
49
+ }
36
50
 
37
- content_placement.forEach(function (_ref3) {
38
- var path = _ref3.path,
39
- _id = _ref3._id;
40
-
41
- var prev_url_to_check = prevUrl;
42
- if (prev_url_to_check.includes('?')) {
43
- prev_url_to_check = prev_url_to_check.split('?')[0];
44
- }
45
- if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
46
- });
47
-
48
- if (taxonomy.length === 0) {
51
+ //404 articles were throwing server error
52
+ if (taxonomy.length === 0 && taxonomyMapping) {
49
53
  taxonomy = taxonomyMapping.map(function (_ref4) {
50
54
  var _ref = _ref4._ref;
51
55
  return _ref;
package/dist/cjs/index.js CHANGED
@@ -140,9 +140,9 @@ var PublicationLanding = require('./PublicationLanding.js');
140
140
  var IssueLanding = require('./IssueLanding.js');
141
141
  require('react-bootstrap/Modal');
142
142
  var PopUpModal = require('./PopUpModal.js');
143
- require('./InscreenSensor-f9989c04.js');
144
- var getKeywords = require('./getKeywords.js');
145
143
  var ArticleQueue = require('./ArticleQueue.js');
144
+ require('./InscreenSensor-3aec8492.js');
145
+ var getKeywords = require('./getKeywords.js');
146
146
  var RelatedContent = require('./RelatedContent.js');
147
147
  var ForbesHero = require('./ForbesHero.js');
148
148
  var HorizontalHero = require('./HorizontalHero.js');
@@ -230,8 +230,8 @@ exports.HighlightenVideo = HighlightenVideo;
230
230
  exports.PublicationLanding = PublicationLanding;
231
231
  exports.IssueLanding = IssueLanding;
232
232
  exports.PopUpModal = PopUpModal;
233
- exports.getKeywords = getKeywords;
234
233
  exports.ArticleQueue = ArticleQueue;
234
+ exports.getKeywords = getKeywords;
235
235
  exports.RelatedContent = RelatedContent;
236
236
  exports.ForbesHero = ForbesHero;
237
237
  exports.HorizontalHero = HorizontalHero;
package/dist/esm/AD.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React__default, { Suspense } from 'react';
2
2
 
3
3
  var Dfp = React__default.lazy(function () {
4
- return import('./Dfp-58cfc45a.js');
4
+ return import('./Dfp-81a052c2.js');
5
5
  });
6
6
 
7
7
  var AD = function AD(props) {
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import { m as main_36 } from './main-adf6ec37.js';
13
13
  import './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import { m as main_36 } from './main-adf6ec37.js';
13
13
  import './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import { m as main_36 } from './main-adf6ec37.js';
13
13
  import './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import { _ as _JSON$stringify } from './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState, useEffect } from 'react';
8
8
  import './index-3f4dd6f2.js';
9
9
  import 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import './debounce-048d9cb6.js';
12
12
  import './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';
@@ -7,8 +7,8 @@ import './web.dom.iterable-46c95e52.js';
7
7
  import React__default, { useState } from 'react';
8
8
  import { a as lib_2 } from './index-3f4dd6f2.js';
9
9
  import PropTypes from 'prop-types';
10
- import './isSymbol-c1b9be80.js';
11
- import { d as debounce_1 } from './debounce-8cd9e09c.js';
10
+ import './isSymbol-b7b7434f.js';
11
+ import { d as debounce_1 } from './debounce-048d9cb6.js';
12
12
  import { b as main_16 } from './main-adf6ec37.js';
13
13
  import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
14
14
  import './stringify-e30bc114.js';