@mjhls/mjh-framework 1.0.543-canari-v4 → 1.0.544

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.543-canari-v4
2
+ # mjh-framework v. 1.0.544
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -57,7 +57,7 @@ var LeftNav = function LeftNav(props) {
57
57
  React.useEffect(function () {
58
58
  Segment.Segment.init(); // auto init if not done yet
59
59
 
60
- var segmentLinks = leftNavRef.current.querySelectorAll('a[needsegmentsupport="true"]');
60
+ var segmentLinks = leftNavRef.current.querySelectorAll('a[needSegmentSupport="true"]');
61
61
  for (var i = 0; i < segmentLinks.length; i++) {
62
62
  var link = segmentLinks[i];
63
63
  var href = link.getAttribute('href');
@@ -70,14 +70,14 @@ var LeftNav = function LeftNav(props) {
70
70
  if (checkUrlIsExternal(subRow.url)) {
71
71
  return React__default.createElement(
72
72
  'a',
73
- { target: subRow.blank ? '_blank' : '_self', needsegmentsupport: subRow.needSegmentSupport ? 'true' : '', href: subRow.url },
73
+ { target: subRow.blank ? '_blank' : '_self', needSegmentSupport: subRow.needSegmentSupport ? 'true' : '', href: subRow.url },
74
74
  subRow.name
75
75
  );
76
76
  }
77
77
 
78
78
  return React__default.createElement(
79
79
  'a',
80
- { href: subRow.url || '#', target: subRow.blank ? '_blank' : '_self', needsegmentsupport: subRow.needSegmentSupport ? 'true' : '' },
80
+ { href: subRow.url || '#', target: subRow.blank ? '_blank' : '_self', needSegmentSupport: subRow.needSegmentSupport ? 'true' : '' },
81
81
  subRow.name
82
82
  );
83
83
  };
@@ -39,7 +39,7 @@ var NavNormal = function NavNormal(props) {
39
39
 
40
40
  React.useEffect(function () {
41
41
  Segment.Segment.init(); // auto init if not done yet
42
- var segmentLinks = ref.current.querySelectorAll('a[needsegmentsupport="true"]');
42
+ var segmentLinks = ref.current.querySelectorAll('a[needSegmentSupport="true"]');
43
43
  for (var i = 0; i < segmentLinks.length; i++) {
44
44
  var link = segmentLinks[i];
45
45
  var href = link.getAttribute('href');
@@ -93,7 +93,7 @@ var NavNormal = function NavNormal(props) {
93
93
  } else {
94
94
  return React__default.createElement(
95
95
  NavDropdown.Item,
96
- { href: ddRow.url, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', target: ddRow.blank ? '_blank' : '_self' },
96
+ { href: ddRow.url, needSegmentSupport: ddRow.needSegmentSupport ? 'true' : '', target: ddRow.blank ? '_blank' : '_self' },
97
97
  ddRow.name
98
98
  );
99
99
  }
@@ -103,7 +103,7 @@ var NavNormal = function NavNormal(props) {
103
103
  // Link default
104
104
  return React__default.createElement(
105
105
  Nav.Link,
106
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '', target: row.blank ? '_blank' : '_self' },
106
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '', target: row.blank ? '_blank' : '_self' },
107
107
  row.name
108
108
  );
109
109
  }
@@ -26,13 +26,13 @@ var renderLink = function renderLink(row) {
26
26
  if (row.blank) {
27
27
  return React__default.createElement(
28
28
  'a',
29
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '', target: '_blank', rel: 'noopener noreferrer' },
29
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '', target: '_blank', rel: 'noopener noreferrer' },
30
30
  row.title
31
31
  );
32
32
  }
33
33
  return React__default.createElement(
34
34
  'a',
35
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '' },
35
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '' },
36
36
  row.title
37
37
  );
38
38
  };
@@ -55,7 +55,7 @@ var SideFooter = function SideFooter(props) {
55
55
  Segment.Segment.init(); // auto init if not done yet
56
56
  // this adds ?eKey=xxx or ?anonymousid=xxx for forms that's outside - eg) formstack forms
57
57
  // for tracking same user
58
- var segmentLinks = sfRef.current.querySelectorAll('a[needsegmentsupport="true"]');
58
+ var segmentLinks = sfRef.current.querySelectorAll('a[needSegmentSupport="true"]');
59
59
  for (var i = 0; i < segmentLinks.length; i++) {
60
60
  var link = segmentLinks[i];
61
61
  var href = link.getAttribute('href');
package/dist/cjs/View.js CHANGED
@@ -322,38 +322,22 @@ var Article = function Article(props) {
322
322
  visibleFlag = _useState4[0],
323
323
  setVisibleFlag = _useState4[1];
324
324
 
325
- var _useState5 = React.useState(false),
326
- _useState6 = slicedToArray._slicedToArray(_useState5, 2),
327
- adPageLoaded = _useState6[0],
328
- setAdPageLoaded = _useState6[1];
329
-
330
- var scrollCheck = function scrollCheck() {
331
- setAdPageLoaded(true);
332
- };
333
-
334
- React.useEffect(function () {
335
- window.addEventListener('scroll', scrollCheck);
336
- return function () {
337
- return window.removeEventListener('scroll', scrollCheck);
338
- };
339
- }, []);
340
-
341
325
  var summary = getArticleSummary(props.article);
342
326
 
343
- var _useState7 = React.useState(1),
327
+ var _useState5 = React.useState(1),
328
+ _useState6 = slicedToArray._slicedToArray(_useState5, 2),
329
+ auth = _useState6[0],
330
+ setAuth = _useState6[1];
331
+
332
+ var _useState7 = React.useState(''),
344
333
  _useState8 = slicedToArray._slicedToArray(_useState7, 2),
345
- auth = _useState8[0],
346
- setAuth = _useState8[1];
334
+ passwordKey = _useState8[0],
335
+ setPasswordKey = _useState8[1];
347
336
 
348
- var _useState9 = React.useState(''),
337
+ var _useState9 = React.useState(body),
349
338
  _useState10 = slicedToArray._slicedToArray(_useState9, 2),
350
- passwordKey = _useState10[0],
351
- setPasswordKey = _useState10[1];
352
-
353
- var _useState11 = React.useState(body),
354
- _useState12 = slicedToArray._slicedToArray(_useState11, 2),
355
- articleBody = _useState12[0],
356
- setArticleBody = _useState12[1];
339
+ articleBody = _useState10[0],
340
+ setArticleBody = _useState10[1];
357
341
 
358
342
  var isCutomPage = function isCutomPage(article) {
359
343
  var url = article.url.current;
@@ -793,6 +777,28 @@ var Article = function Article(props) {
793
777
  summary
794
778
  )
795
779
  ),
780
+ React__default.createElement(
781
+ 'div',
782
+ { className: 'ad-box', style: { textAlign: 'center' } },
783
+ main.main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
784
+ if (index === 0) {
785
+ return React__default.createElement(
786
+ 'div',
787
+ {
788
+ key: index,
789
+ id: 'addid-' + index,
790
+ style: {
791
+ display: 'flex',
792
+ flex: '1 0 auto',
793
+ justifyContent: 'center',
794
+ alignItems: 'center',
795
+ textAlign: 'center'
796
+ } },
797
+ ad.component
798
+ );
799
+ }
800
+ })
801
+ ),
796
802
  React__default.createElement(
797
803
  'div',
798
804
  { className: 'block-content mt-3' },
@@ -829,29 +835,7 @@ var Article = function Article(props) {
829
835
  renderIsiContent(props.article)
830
836
  )
831
837
  ),
832
- React__default.createElement(
833
- 'div',
834
- { className: 'ad-box', style: { textAlign: 'center' } },
835
- main.main_39 && adPageLoaded && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
836
- if (index === 0) {
837
- return React__default.createElement(
838
- 'div',
839
- {
840
- key: index,
841
- id: 'addid-' + index,
842
- style: {
843
- display: 'flex',
844
- flex: '1 0 auto',
845
- justifyContent: 'center',
846
- alignItems: 'center',
847
- textAlign: 'center'
848
- } },
849
- ad.component
850
- );
851
- }
852
- })
853
- ),
854
- main.main_39 && adPageLoaded && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
838
+ main.main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
855
839
  if (index > 0) {
856
840
  return React__default.createElement(
857
841
  'div',
@@ -12,9 +12,9 @@ var getQuery = function getQuery(type) {
12
12
 
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 <= now()\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 }';
15
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= now()\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 }';
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 \'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 }';
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 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':
@@ -50,7 +50,7 @@ var LeftNav = function LeftNav(props) {
50
50
  useEffect(function () {
51
51
  Segment.init(); // auto init if not done yet
52
52
 
53
- var segmentLinks = leftNavRef.current.querySelectorAll('a[needsegmentsupport="true"]');
53
+ var segmentLinks = leftNavRef.current.querySelectorAll('a[needSegmentSupport="true"]');
54
54
  for (var i = 0; i < segmentLinks.length; i++) {
55
55
  var link = segmentLinks[i];
56
56
  var href = link.getAttribute('href');
@@ -63,14 +63,14 @@ var LeftNav = function LeftNav(props) {
63
63
  if (checkUrlIsExternal(subRow.url)) {
64
64
  return React__default.createElement(
65
65
  'a',
66
- { target: subRow.blank ? '_blank' : '_self', needsegmentsupport: subRow.needSegmentSupport ? 'true' : '', href: subRow.url },
66
+ { target: subRow.blank ? '_blank' : '_self', needSegmentSupport: subRow.needSegmentSupport ? 'true' : '', href: subRow.url },
67
67
  subRow.name
68
68
  );
69
69
  }
70
70
 
71
71
  return React__default.createElement(
72
72
  'a',
73
- { href: subRow.url || '#', target: subRow.blank ? '_blank' : '_self', needsegmentsupport: subRow.needSegmentSupport ? 'true' : '' },
73
+ { href: subRow.url || '#', target: subRow.blank ? '_blank' : '_self', needSegmentSupport: subRow.needSegmentSupport ? 'true' : '' },
74
74
  subRow.name
75
75
  );
76
76
  };
@@ -32,7 +32,7 @@ var NavNormal = function NavNormal(props) {
32
32
 
33
33
  useEffect(function () {
34
34
  Segment.init(); // auto init if not done yet
35
- var segmentLinks = ref.current.querySelectorAll('a[needsegmentsupport="true"]');
35
+ var segmentLinks = ref.current.querySelectorAll('a[needSegmentSupport="true"]');
36
36
  for (var i = 0; i < segmentLinks.length; i++) {
37
37
  var link = segmentLinks[i];
38
38
  var href = link.getAttribute('href');
@@ -86,7 +86,7 @@ var NavNormal = function NavNormal(props) {
86
86
  } else {
87
87
  return React__default.createElement(
88
88
  NavDropdown.Item,
89
- { href: ddRow.url, needsegmentsupport: ddRow.needSegmentSupport ? 'true' : '', target: ddRow.blank ? '_blank' : '_self' },
89
+ { href: ddRow.url, needSegmentSupport: ddRow.needSegmentSupport ? 'true' : '', target: ddRow.blank ? '_blank' : '_self' },
90
90
  ddRow.name
91
91
  );
92
92
  }
@@ -96,7 +96,7 @@ var NavNormal = function NavNormal(props) {
96
96
  // Link default
97
97
  return React__default.createElement(
98
98
  Nav.Link,
99
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '', target: row.blank ? '_blank' : '_self' },
99
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '', target: row.blank ? '_blank' : '_self' },
100
100
  row.name
101
101
  );
102
102
  }
@@ -21,13 +21,13 @@ var renderLink = function renderLink(row) {
21
21
  if (row.blank) {
22
22
  return React__default.createElement(
23
23
  'a',
24
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '', target: '_blank', rel: 'noopener noreferrer' },
24
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '', target: '_blank', rel: 'noopener noreferrer' },
25
25
  row.title
26
26
  );
27
27
  }
28
28
  return React__default.createElement(
29
29
  'a',
30
- { href: row.url, needsegmentsupport: row.needSegmentSupport ? 'true' : '' },
30
+ { href: row.url, needSegmentSupport: row.needSegmentSupport ? 'true' : '' },
31
31
  row.title
32
32
  );
33
33
  };
@@ -50,7 +50,7 @@ var SideFooter = function SideFooter(props) {
50
50
  Segment.init(); // auto init if not done yet
51
51
  // this adds ?eKey=xxx or ?anonymousid=xxx for forms that's outside - eg) formstack forms
52
52
  // for tracking same user
53
- var segmentLinks = sfRef.current.querySelectorAll('a[needsegmentsupport="true"]');
53
+ var segmentLinks = sfRef.current.querySelectorAll('a[needSegmentSupport="true"]');
54
54
  for (var i = 0; i < segmentLinks.length; i++) {
55
55
  var link = segmentLinks[i];
56
56
  var href = link.getAttribute('href');
package/dist/esm/View.js CHANGED
@@ -316,38 +316,22 @@ var Article = function Article(props) {
316
316
  visibleFlag = _useState4[0],
317
317
  setVisibleFlag = _useState4[1];
318
318
 
319
- var _useState5 = useState(false),
320
- _useState6 = _slicedToArray(_useState5, 2),
321
- adPageLoaded = _useState6[0],
322
- setAdPageLoaded = _useState6[1];
323
-
324
- var scrollCheck = function scrollCheck() {
325
- setAdPageLoaded(true);
326
- };
327
-
328
- useEffect(function () {
329
- window.addEventListener('scroll', scrollCheck);
330
- return function () {
331
- return window.removeEventListener('scroll', scrollCheck);
332
- };
333
- }, []);
334
-
335
319
  var summary = getArticleSummary(props.article);
336
320
 
337
- var _useState7 = useState(1),
321
+ var _useState5 = useState(1),
322
+ _useState6 = _slicedToArray(_useState5, 2),
323
+ auth = _useState6[0],
324
+ setAuth = _useState6[1];
325
+
326
+ var _useState7 = useState(''),
338
327
  _useState8 = _slicedToArray(_useState7, 2),
339
- auth = _useState8[0],
340
- setAuth = _useState8[1];
328
+ passwordKey = _useState8[0],
329
+ setPasswordKey = _useState8[1];
341
330
 
342
- var _useState9 = useState(''),
331
+ var _useState9 = useState(body),
343
332
  _useState10 = _slicedToArray(_useState9, 2),
344
- passwordKey = _useState10[0],
345
- setPasswordKey = _useState10[1];
346
-
347
- var _useState11 = useState(body),
348
- _useState12 = _slicedToArray(_useState11, 2),
349
- articleBody = _useState12[0],
350
- setArticleBody = _useState12[1];
333
+ articleBody = _useState10[0],
334
+ setArticleBody = _useState10[1];
351
335
 
352
336
  var isCutomPage = function isCutomPage(article) {
353
337
  var url = article.url.current;
@@ -787,6 +771,28 @@ var Article = function Article(props) {
787
771
  summary
788
772
  )
789
773
  ),
774
+ React__default.createElement(
775
+ 'div',
776
+ { className: 'ad-box', style: { textAlign: 'center' } },
777
+ main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
778
+ if (index === 0) {
779
+ return React__default.createElement(
780
+ 'div',
781
+ {
782
+ key: index,
783
+ id: 'addid-' + index,
784
+ style: {
785
+ display: 'flex',
786
+ flex: '1 0 auto',
787
+ justifyContent: 'center',
788
+ alignItems: 'center',
789
+ textAlign: 'center'
790
+ } },
791
+ ad.component
792
+ );
793
+ }
794
+ })
795
+ ),
790
796
  React__default.createElement(
791
797
  'div',
792
798
  { className: 'block-content mt-3' },
@@ -823,29 +829,7 @@ var Article = function Article(props) {
823
829
  renderIsiContent(props.article)
824
830
  )
825
831
  ),
826
- React__default.createElement(
827
- 'div',
828
- { className: 'ad-box', style: { textAlign: 'center' } },
829
- main_39 && adPageLoaded && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
830
- if (index === 0) {
831
- return React__default.createElement(
832
- 'div',
833
- {
834
- key: index,
835
- id: 'addid-' + index,
836
- style: {
837
- display: 'flex',
838
- flex: '1 0 auto',
839
- justifyContent: 'center',
840
- alignItems: 'center',
841
- textAlign: 'center'
842
- } },
843
- ad.component
844
- );
845
- }
846
- })
847
- ),
848
- main_39 && adPageLoaded && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
832
+ main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
849
833
  if (index > 0) {
850
834
  return React__default.createElement(
851
835
  'div',
@@ -10,9 +10,9 @@ var getQuery = function getQuery(type) {
10
10
 
11
11
  switch (type) {
12
12
  case 'related':
13
- return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= now()\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 }';
13
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= now()\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 }';
14
14
  case 'article':
15
- 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 }';
15
+ 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 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 }';
16
16
  case 'publication':
17
17
  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 }';
18
18
  case 'issue':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.543-canari-v4",
3
+ "version": "1.0.544",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",