@mjhls/mjh-framework 1.0.804 → 1.0.806
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 +1 -1
- package/dist/cjs/AdSlotsProvider.js +23 -1
- package/dist/cjs/View.js +21 -3
- package/dist/cjs/getQuery.js +2 -2
- package/dist/cjs/index.js +1 -0
- package/dist/esm/AdSlotsProvider.js +22 -1
- package/dist/esm/View.js +21 -3
- package/dist/esm/getQuery.js +2 -2
- package/dist/esm/index.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# mjh-framework v. 1.0.
|
|
2
|
+
# mjh-framework v. 1.0.806
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var asyncToGenerator = require('./asyncToGenerator-58c289d9.js');
|
|
4
4
|
var toConsumableArray = require('./toConsumableArray-ddb70795.js');
|
|
5
5
|
var React = require('react');
|
|
6
|
+
var ReactGA = require('react-ga');
|
|
6
7
|
var index = require('./index-0e4427c8.js');
|
|
7
8
|
var main = require('./main-f1c77adb.js');
|
|
8
9
|
require('./_commonjsHelpers-06173234.js');
|
|
@@ -17,6 +18,7 @@ require('prop-types');
|
|
|
17
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
19
|
|
|
19
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
21
|
+
var ReactGA__default = /*#__PURE__*/_interopDefaultLegacy(ReactGA);
|
|
20
22
|
|
|
21
23
|
var _this = undefined;
|
|
22
24
|
|
|
@@ -34,6 +36,25 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
34
36
|
_ref$refreshInterval = _ref.refreshInterval,
|
|
35
37
|
refreshInterval = _ref$refreshInterval === undefined ? 60 : _ref$refreshInterval;
|
|
36
38
|
|
|
39
|
+
|
|
40
|
+
var logEvent = function logEvent(action, category, GA_TRACKING_ID) {
|
|
41
|
+
if (!GA_TRACKING_ID && typeof window !== 'undefined') GA_TRACKING_ID = sessionStorage.getItem('GA_TRACKING_ID');
|
|
42
|
+
|
|
43
|
+
if (GA_TRACKING_ID && GA_TRACKING_ID.includes(',')) {
|
|
44
|
+
ReactGA__default['default'].event({
|
|
45
|
+
category: category,
|
|
46
|
+
action: action
|
|
47
|
+
|
|
48
|
+
}, GA_TRACKING_ID.split(',').map(function (id, index) {
|
|
49
|
+
return 'ga_id_' + ++index;
|
|
50
|
+
}));
|
|
51
|
+
} else {
|
|
52
|
+
ReactGA__default['default'].event({
|
|
53
|
+
category: category,
|
|
54
|
+
action: action
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
37
58
|
React.useEffect(function () {
|
|
38
59
|
// Refresh ADs after every one minute if user didn't scroll.
|
|
39
60
|
// refreshInterval accepts time in seconds and default is 60 seconds
|
|
@@ -123,8 +144,9 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
123
144
|
|
|
124
145
|
case 12:
|
|
125
146
|
index.lib_3.refresh.apply(index.lib_3, toConsumableArray._toConsumableArray(ads));
|
|
147
|
+
logEvent('AD Refresh', 'AD');
|
|
126
148
|
|
|
127
|
-
case
|
|
149
|
+
case 14:
|
|
128
150
|
case 'end':
|
|
129
151
|
return _context2.stop();
|
|
130
152
|
}
|
package/dist/cjs/View.js
CHANGED
|
@@ -1525,6 +1525,24 @@ var View = function View(props) {
|
|
|
1525
1525
|
var title = _props$article2.title,
|
|
1526
1526
|
seriesShareOptions = _props$article2.seriesShareOptions;
|
|
1527
1527
|
|
|
1528
|
+
var showSocialShare = true;
|
|
1529
|
+
|
|
1530
|
+
if (props.article.documentGroup) {
|
|
1531
|
+
if (props.article.documentGroup.showSocialShare === false) {
|
|
1532
|
+
showSocialShare = false;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
if (props.content_placement) {
|
|
1536
|
+
if (props.content_placement.showSocialShare === false) {
|
|
1537
|
+
showSocialShare = false;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
if (props.authorDetails) {
|
|
1541
|
+
if (props.authorDetails.showSocialShare === false) {
|
|
1542
|
+
showSocialShare = false;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1528
1546
|
var _useState = React.useState(0),
|
|
1529
1547
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
1530
1548
|
currentPage = _useState2[0],
|
|
@@ -1548,7 +1566,7 @@ var View = function View(props) {
|
|
|
1548
1566
|
}
|
|
1549
1567
|
}, []);
|
|
1550
1568
|
|
|
1551
|
-
//disable infinite scroll
|
|
1569
|
+
// disable infinite scroll
|
|
1552
1570
|
var checkVideoSeries = function checkVideoSeries(article) {
|
|
1553
1571
|
if (!article || !article.body) {
|
|
1554
1572
|
return false;
|
|
@@ -1589,7 +1607,7 @@ var View = function View(props) {
|
|
|
1589
1607
|
if (!needInfiniteScroll && !title) {
|
|
1590
1608
|
title = props.article ? props.article.title : '';
|
|
1591
1609
|
}
|
|
1592
|
-
//add mobile ads to articles not using infinite scroll
|
|
1610
|
+
// add mobile ads to articles not using infinite scroll
|
|
1593
1611
|
if (!needInfiniteScroll) {
|
|
1594
1612
|
var targeting = getTargeting.getTargeting(props);
|
|
1595
1613
|
article.Ads = Ads.getRightItems(targeting);
|
|
@@ -1675,7 +1693,7 @@ var View = function View(props) {
|
|
|
1675
1693
|
props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default['default'].createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
|
|
1676
1694
|
)
|
|
1677
1695
|
),
|
|
1678
|
-
!needInfiniteScroll ? React__default['default'].createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props)) : React__default['default'].createElement(ArticleQueue, _extends._extends({
|
|
1696
|
+
!needInfiniteScroll ? React__default['default'].createElement(Article, _extends._extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props, { showSocialShare: showSocialShare })) : React__default['default'].createElement(ArticleQueue, _extends._extends({
|
|
1679
1697
|
infiniteScroll: true,
|
|
1680
1698
|
showRelatedArticles: showRelatedArticles,
|
|
1681
1699
|
canonicalTag: canonicalTag,
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -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 && defined(published) \n && dateTime(published) <= dateTime(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)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\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 isShow,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 && defined(published) \n && dateTime(published) <= dateTime(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)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare: showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\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 _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n showSocialShare: showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
18
18
|
case 'issue':
|
package/dist/cjs/index.js
CHANGED
|
@@ -171,6 +171,7 @@ require('./NavFooter-3dcd99a8.js');
|
|
|
171
171
|
require('./index.esm-2bb721c8.js');
|
|
172
172
|
require('./SocialSearchComponent-948138c7.js');
|
|
173
173
|
require('react-bootstrap/FormControl');
|
|
174
|
+
require('react-ga');
|
|
174
175
|
require('react-bootstrap/Carousel');
|
|
175
176
|
require('react-bootstrap/Breadcrumb');
|
|
176
177
|
require('./keys-7f2c2108.js');
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7f8f9219.js';
|
|
2
2
|
import { _ as _toConsumableArray } from './toConsumableArray-6d9a4616.js';
|
|
3
3
|
import React__default, { useEffect } from 'react';
|
|
4
|
+
import ReactGA from 'react-ga';
|
|
4
5
|
import { l as lib_3, b as lib_1 } from './index-5cc7b406.js';
|
|
5
6
|
import { e as main_24, m as main_43 } from './main-d4165069.js';
|
|
6
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -28,6 +29,25 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
28
29
|
_ref$refreshInterval = _ref.refreshInterval,
|
|
29
30
|
refreshInterval = _ref$refreshInterval === undefined ? 60 : _ref$refreshInterval;
|
|
30
31
|
|
|
32
|
+
|
|
33
|
+
var logEvent = function logEvent(action, category, GA_TRACKING_ID) {
|
|
34
|
+
if (!GA_TRACKING_ID && typeof window !== 'undefined') GA_TRACKING_ID = sessionStorage.getItem('GA_TRACKING_ID');
|
|
35
|
+
|
|
36
|
+
if (GA_TRACKING_ID && GA_TRACKING_ID.includes(',')) {
|
|
37
|
+
ReactGA.event({
|
|
38
|
+
category: category,
|
|
39
|
+
action: action
|
|
40
|
+
|
|
41
|
+
}, GA_TRACKING_ID.split(',').map(function (id, index) {
|
|
42
|
+
return 'ga_id_' + ++index;
|
|
43
|
+
}));
|
|
44
|
+
} else {
|
|
45
|
+
ReactGA.event({
|
|
46
|
+
category: category,
|
|
47
|
+
action: action
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
};
|
|
31
51
|
useEffect(function () {
|
|
32
52
|
// Refresh ADs after every one minute if user didn't scroll.
|
|
33
53
|
// refreshInterval accepts time in seconds and default is 60 seconds
|
|
@@ -117,8 +137,9 @@ var AdSlotsProvider = function AdSlotsProvider(_ref) {
|
|
|
117
137
|
|
|
118
138
|
case 12:
|
|
119
139
|
lib_3.refresh.apply(lib_3, _toConsumableArray(ads));
|
|
140
|
+
logEvent('AD Refresh', 'AD');
|
|
120
141
|
|
|
121
|
-
case
|
|
142
|
+
case 14:
|
|
122
143
|
case 'end':
|
|
123
144
|
return _context2.stop();
|
|
124
145
|
}
|
package/dist/esm/View.js
CHANGED
|
@@ -1515,6 +1515,24 @@ var View = function View(props) {
|
|
|
1515
1515
|
var title = _props$article2.title,
|
|
1516
1516
|
seriesShareOptions = _props$article2.seriesShareOptions;
|
|
1517
1517
|
|
|
1518
|
+
var showSocialShare = true;
|
|
1519
|
+
|
|
1520
|
+
if (props.article.documentGroup) {
|
|
1521
|
+
if (props.article.documentGroup.showSocialShare === false) {
|
|
1522
|
+
showSocialShare = false;
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
if (props.content_placement) {
|
|
1526
|
+
if (props.content_placement.showSocialShare === false) {
|
|
1527
|
+
showSocialShare = false;
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
if (props.authorDetails) {
|
|
1531
|
+
if (props.authorDetails.showSocialShare === false) {
|
|
1532
|
+
showSocialShare = false;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1518
1536
|
var _useState = useState(0),
|
|
1519
1537
|
_useState2 = _slicedToArray(_useState, 2),
|
|
1520
1538
|
currentPage = _useState2[0],
|
|
@@ -1538,7 +1556,7 @@ var View = function View(props) {
|
|
|
1538
1556
|
}
|
|
1539
1557
|
}, []);
|
|
1540
1558
|
|
|
1541
|
-
//disable infinite scroll
|
|
1559
|
+
// disable infinite scroll
|
|
1542
1560
|
var checkVideoSeries = function checkVideoSeries(article) {
|
|
1543
1561
|
if (!article || !article.body) {
|
|
1544
1562
|
return false;
|
|
@@ -1579,7 +1597,7 @@ var View = function View(props) {
|
|
|
1579
1597
|
if (!needInfiniteScroll && !title) {
|
|
1580
1598
|
title = props.article ? props.article.title : '';
|
|
1581
1599
|
}
|
|
1582
|
-
//add mobile ads to articles not using infinite scroll
|
|
1600
|
+
// add mobile ads to articles not using infinite scroll
|
|
1583
1601
|
if (!needInfiniteScroll) {
|
|
1584
1602
|
var targeting = getTargeting(props);
|
|
1585
1603
|
article.Ads = Ads.getRightItems(targeting);
|
|
@@ -1665,7 +1683,7 @@ var View = function View(props) {
|
|
|
1665
1683
|
props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
|
|
1666
1684
|
)
|
|
1667
1685
|
),
|
|
1668
|
-
!needInfiniteScroll ? React__default.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props)) : React__default.createElement(ArticleQueue, _extends({
|
|
1686
|
+
!needInfiniteScroll ? React__default.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles, showDisqus: showDisqus }, props, { showSocialShare: showSocialShare })) : React__default.createElement(ArticleQueue, _extends({
|
|
1669
1687
|
infiniteScroll: true,
|
|
1670
1688
|
showRelatedArticles: showRelatedArticles,
|
|
1671
1689
|
canonicalTag: canonicalTag,
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
|
|
|
8
8
|
|
|
9
9
|
switch (type) {
|
|
10
10
|
case 'related':
|
|
11
|
-
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(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)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\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 isShow,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 }';
|
|
11
|
+
return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && defined(published) \n && dateTime(published) <= dateTime(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)[' + (articleCount ? articleCount : '$index') + ']{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n _id,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier,\n disableAds,\n showSocialShare: showSocialShare\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 }';
|
|
12
12
|
case 'article':
|
|
13
|
-
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\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 _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 }';
|
|
13
|
+
return '*[\n _type == "article"\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible != false\n && url.current == $url\n ' + conditions + '\n ][0]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n issueGroup-> { _id, name, identifier, parent-> },\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography, showSocialShare },\n text[]{\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n }\n }\n },\n \'content_placement\': taxonomyMapping[]-> {\n ...,\n \'ancestor\': parent->parent->identifier,\n \'parent\': parent->identifier,\n \'name\': name,\n \'path\': identifier\n showSocialShare: showSocialShare\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\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 }';
|
|
14
14
|
case 'publication':
|
|
15
15
|
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 taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|
package/dist/esm/index.js
CHANGED
|
@@ -167,6 +167,7 @@ import './NavFooter-e27bd93b.js';
|
|
|
167
167
|
import './index.esm-37268dca.js';
|
|
168
168
|
import './SocialSearchComponent-db963c3e.js';
|
|
169
169
|
import 'react-bootstrap/FormControl';
|
|
170
|
+
import 'react-ga';
|
|
170
171
|
import 'react-bootstrap/Carousel';
|
|
171
172
|
import 'react-bootstrap/Breadcrumb';
|
|
172
173
|
import './keys-7a3adabf.js';
|