@mjhls/mjh-framework 1.0.909 → 1.0.910-exclude-test
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/MediaSeriesLanding.js +14 -6
- package/dist/cjs/View.js +6 -0
- package/dist/cjs/getQuery.js +1 -1
- package/dist/esm/MediaSeriesLanding.js +14 -6
- package/dist/esm/View.js +6 -0
- package/dist/esm/getQuery.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.910
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var defineProperty = require('./defineProperty-9673846a.js');
|
|
4
3
|
var asyncToGenerator = require('./asyncToGenerator-77821af0.js');
|
|
5
4
|
var _typeof = require('./typeof-567e31ff.js');
|
|
6
5
|
var _extends = require('./extends-7c86182f.js');
|
|
@@ -14,7 +13,6 @@ var MasterDeck = require('./MasterDeck.js');
|
|
|
14
13
|
var BlockContent = require('./BlockContent-9ebd251f.js');
|
|
15
14
|
var getSerializers = require('./index-5ce5e821.js');
|
|
16
15
|
require('./_commonjsHelpers-06173234.js');
|
|
17
|
-
require('./define-property-e8404b64.js');
|
|
18
16
|
require('./core.get-iterator-method-5643aa10.js');
|
|
19
17
|
require('./web.dom.iterable-d98303e0.js');
|
|
20
18
|
require('./_library-dd23b178.js');
|
|
@@ -30,6 +28,7 @@ require('./style-inject.es-dcee06b6.js');
|
|
|
30
28
|
require('./toConsumableArray-d7797c2b.js');
|
|
31
29
|
require('./inherits-de66ea16.js');
|
|
32
30
|
require('./_object-sap-d1978572.js');
|
|
31
|
+
require('./define-property-e8404b64.js');
|
|
33
32
|
require('./index-fc2f1ca2.js');
|
|
34
33
|
require('./events-1b438fe7.js');
|
|
35
34
|
require('react-bootstrap/Container');
|
|
@@ -296,7 +295,7 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
296
295
|
filterQuery = filterTopicID !== 'all' ? ' && references(\'' + filterTopicID + '\')' : '';
|
|
297
296
|
}
|
|
298
297
|
|
|
299
|
-
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
298
|
+
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail{..., asset-> },\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
300
299
|
_context.next = 6;
|
|
301
300
|
return client.fetch(seriesQuery, newParams);
|
|
302
301
|
|
|
@@ -379,8 +378,6 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
379
378
|
|
|
380
379
|
MediaSeriesLanding.getInitialData = function () {
|
|
381
380
|
var _ref3 = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee2(ctx, client, cache) {
|
|
382
|
-
var _ref4;
|
|
383
|
-
|
|
384
381
|
var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
|
|
385
382
|
return asyncToGenerator.regenerator.wrap(function _callee2$(_context2) {
|
|
386
383
|
while (1) {
|
|
@@ -465,7 +462,18 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
465
462
|
statusCode = 404;
|
|
466
463
|
}
|
|
467
464
|
|
|
468
|
-
return _context2.abrupt('return',
|
|
465
|
+
return _context2.abrupt('return', {
|
|
466
|
+
seriesData: seriesData,
|
|
467
|
+
query: seriesQuery,
|
|
468
|
+
params: params,
|
|
469
|
+
currentPage: currentPage,
|
|
470
|
+
taxonomyFilter: taxonomyFilter,
|
|
471
|
+
identifier: identifier,
|
|
472
|
+
docGroupID: docGroupID._id,
|
|
473
|
+
parentUrl: identifier,
|
|
474
|
+
statusCode: statusCode,
|
|
475
|
+
docGroup: docGroupID
|
|
476
|
+
});
|
|
469
477
|
|
|
470
478
|
case 25:
|
|
471
479
|
case 'end':
|
package/dist/cjs/View.js
CHANGED
|
@@ -672,6 +672,9 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
672
672
|
var relatedLinks = [];
|
|
673
673
|
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
674
674
|
documentGroupMapping.forEach(function (documentGroup) {
|
|
675
|
+
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
676
|
+
return null;
|
|
677
|
+
}
|
|
675
678
|
if (documentGroup.parent) {
|
|
676
679
|
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{
|
|
677
680
|
label: documentGroup.name,
|
|
@@ -684,6 +687,9 @@ var Article = React.forwardRef(function (props, ref) {
|
|
|
684
687
|
content_placement.filter(function (item) {
|
|
685
688
|
return item.path !== 'news';
|
|
686
689
|
}).forEach(function (cp) {
|
|
690
|
+
if (cp.excludeRelatedContents) {
|
|
691
|
+
return null;
|
|
692
|
+
}
|
|
687
693
|
var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.path;
|
|
688
694
|
var href = '/' + cp_url;
|
|
689
695
|
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -12,7 +12,7 @@ var getQuery = function getQuery(type) {
|
|
|
12
12
|
case 'related':
|
|
13
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 asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\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\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\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, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\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 poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \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\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\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 asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\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 poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \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\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\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 thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
18
18
|
case 'issue':
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from './defineProperty-8c30428f.js';
|
|
2
1
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-5ef104a7.js';
|
|
3
2
|
import { _ as _typeof } from './typeof-e9fc0c5d.js';
|
|
4
3
|
import { _ as _extends } from './extends-6d8e3924.js';
|
|
@@ -12,7 +11,6 @@ import MasterDeck from './MasterDeck.js';
|
|
|
12
11
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
13
12
|
import { g as getSerializers } from './index-490f4f21.js';
|
|
14
13
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
|
-
import './define-property-5f1bda73.js';
|
|
16
14
|
import './core.get-iterator-method-ea258bb1.js';
|
|
17
15
|
import './web.dom.iterable-ab4dea5c.js';
|
|
18
16
|
import './_library-528f1934.js';
|
|
@@ -28,6 +26,7 @@ import './style-inject.es-1f59c1d0.js';
|
|
|
28
26
|
import './toConsumableArray-f7074d7c.js';
|
|
29
27
|
import './inherits-a6ba2ec4.js';
|
|
30
28
|
import './_object-sap-7cee6f84.js';
|
|
29
|
+
import './define-property-5f1bda73.js';
|
|
31
30
|
import './index-f0fc23eb.js';
|
|
32
31
|
import './events-6c3a7a63.js';
|
|
33
32
|
import 'react-bootstrap/Container';
|
|
@@ -289,7 +288,7 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
289
288
|
filterQuery = filterTopicID !== 'all' ? ' && references(\'' + filterTopicID + '\')' : '';
|
|
290
289
|
}
|
|
291
290
|
|
|
292
|
-
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail,\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
291
|
+
seriesQuery = '*[_type == \'documentGroup\' && references(\'' + docGroupID + '\') ' + filterQuery + ' && isSeries != false && isShow != false && defined(published) && dateTime(published) <= dateTime(now())] | order(published desc) [$from...$to] {\n _id,\n name,\n identifier,\n published,\n thumbnail{..., asset-> },\n description,\n topicMapping[]->,\n \'pageNumber\': ' + currentPage + ',\n \'parentUrl\': \'' + parentUrl + '\'\n }';
|
|
293
292
|
_context.next = 6;
|
|
294
293
|
return client.fetch(seriesQuery, newParams);
|
|
295
294
|
|
|
@@ -372,8 +371,6 @@ var MediaSeriesLanding = function MediaSeriesLanding(props) {
|
|
|
372
371
|
|
|
373
372
|
MediaSeriesLanding.getInitialData = function () {
|
|
374
373
|
var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(ctx, client, cache) {
|
|
375
|
-
var _ref4;
|
|
376
|
-
|
|
377
374
|
var urlQuery, pathname, identifier, itemsPerPage, currentPage, start, statusCode, params, docGroupID, seriesQuery, seriesData, allSeries, buildUsedTopicsArray, usedTopics, taxonomyFilter;
|
|
378
375
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
379
376
|
while (1) {
|
|
@@ -458,7 +455,18 @@ MediaSeriesLanding.getInitialData = function () {
|
|
|
458
455
|
statusCode = 404;
|
|
459
456
|
}
|
|
460
457
|
|
|
461
|
-
return _context2.abrupt('return',
|
|
458
|
+
return _context2.abrupt('return', {
|
|
459
|
+
seriesData: seriesData,
|
|
460
|
+
query: seriesQuery,
|
|
461
|
+
params: params,
|
|
462
|
+
currentPage: currentPage,
|
|
463
|
+
taxonomyFilter: taxonomyFilter,
|
|
464
|
+
identifier: identifier,
|
|
465
|
+
docGroupID: docGroupID._id,
|
|
466
|
+
parentUrl: identifier,
|
|
467
|
+
statusCode: statusCode,
|
|
468
|
+
docGroup: docGroupID
|
|
469
|
+
});
|
|
462
470
|
|
|
463
471
|
case 25:
|
|
464
472
|
case 'end':
|
package/dist/esm/View.js
CHANGED
|
@@ -662,6 +662,9 @@ var Article = forwardRef(function (props, ref) {
|
|
|
662
662
|
var relatedLinks = [];
|
|
663
663
|
if (documentGroupMapping && documentGroupMapping.length > 0) {
|
|
664
664
|
documentGroupMapping.forEach(function (documentGroup) {
|
|
665
|
+
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
666
|
+
return null;
|
|
667
|
+
}
|
|
665
668
|
if (documentGroup.parent) {
|
|
666
669
|
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{
|
|
667
670
|
label: documentGroup.name,
|
|
@@ -674,6 +677,9 @@ var Article = forwardRef(function (props, ref) {
|
|
|
674
677
|
content_placement.filter(function (item) {
|
|
675
678
|
return item.path !== 'news';
|
|
676
679
|
}).forEach(function (cp) {
|
|
680
|
+
if (cp.excludeRelatedContents) {
|
|
681
|
+
return null;
|
|
682
|
+
}
|
|
677
683
|
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
678
684
|
var href = '/' + cp_url;
|
|
679
685
|
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -10,7 +10,7 @@ var getQuery = function getQuery(type) {
|
|
|
10
10
|
case 'related':
|
|
11
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 asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\n },\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\n },\n \'category\':contentCategory->{\n name,\n disableAds\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\n },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\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, showSocialShare },\n body[] {\n ...,\n asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\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 poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \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\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\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 asset->,\n images[]{\n ...,\n asset->\n },\n content[]{\n ...,\n asset->\n },\n videos[]{\n ...,\n thumbnail{\n _type,\n asset->\n }\n },\n response[]{\n ...,\n asset->\n },\n quizzes[]{\n ...,\n answer[]{\n ...,\n asset->\n },\n question[]{\n ...,\n asset->\n }\n },\n poster {\n _type,\n asset->\n },\n slides[]{\n ...,\n slideshowImage{\n ...,\n asset->\n }\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 poster {\n _type,\n asset-> \n }\n },\n articles[]{\n ...,\n thumbnail{\n ...,\n asset-> \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\n },\n documentGroup-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n isSeries,\n excludeRelatedContents,\n showSocialShare,\n \'path\': identifier.current,\n adTargetingURL\n },\n documentGroupMapping[]-> {\n _id,\n name,\n thumbnail,\n parent->{...,parent->},\n isShow,\n showSocialShare,\n excludeRelatedContents,\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 thumbnail{ ..., asset-> },\n taxonomyMapping[]->,\n pdf{asset->},\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|