@mjhls/mjh-framework 1.0.609 → 1.0.611
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
package/dist/cjs/Feature.js
CHANGED
|
@@ -37,10 +37,10 @@ var Feature = function Feature(props) {
|
|
|
37
37
|
var builder = index$1.imageUrlBuilder(client);
|
|
38
38
|
return builder.image(source).auto('format');
|
|
39
39
|
};
|
|
40
|
-
//image width
|
|
41
|
-
var imageWidth =
|
|
40
|
+
//image width updated.
|
|
41
|
+
var imageWidth = 450;
|
|
42
42
|
if (main.main_39) {
|
|
43
|
-
imageWidth =
|
|
43
|
+
imageWidth = 225;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
var renderUrl = function renderUrl(feature_link, feature_title, feature_body) {
|
|
@@ -10,7 +10,6 @@ require('./_iter-detect-4d0352f8.js');
|
|
|
10
10
|
require('./web.dom.iterable-43c3e277.js');
|
|
11
11
|
var React = require('react');
|
|
12
12
|
var React__default = _interopDefault(React);
|
|
13
|
-
var moment = require('./moment-66a6a284.js');
|
|
14
13
|
var Router = require('next/router');
|
|
15
14
|
var Router__default = _interopDefault(Router);
|
|
16
15
|
var slicedToArray = require('./slicedToArray-8063ee51.js');
|
|
@@ -40,24 +39,23 @@ var VideoSeriesFilter = function VideoSeriesFilter(props) {
|
|
|
40
39
|
|
|
41
40
|
var filterList = function () {
|
|
42
41
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee() {
|
|
43
|
-
var
|
|
42
|
+
var query;
|
|
44
43
|
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
45
44
|
while (1) {
|
|
46
45
|
switch (_context.prev = _context.next) {
|
|
47
46
|
case 0:
|
|
48
47
|
loadingStatus && loadingStatus(true);
|
|
49
48
|
filteredList(null);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
_context.next = 6;
|
|
49
|
+
query = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url) ' + (filter.id ? ' && references(\'' + filter.id + '\')' : '') + '\n && references(\'' + taxonomyID + '\')\n && is_visible == true\n && published <= now()\n && passwordLock != true\n ] | order(published desc) [$from...$to]{\n ...,\n title,\n summary,\n published,\n thumbnail,\n url,\n taxonomy,\n contentCategory->,\n body[_type == "youtubeGallery"],\n \'pageNumber\': ' + currentPage + '\n }';
|
|
50
|
+
_context.next = 5;
|
|
53
51
|
return client.fetch(query, params).then(function (res) {
|
|
54
52
|
filteredList({ posts: res, query: query });
|
|
55
53
|
});
|
|
56
54
|
|
|
57
|
-
case
|
|
55
|
+
case 5:
|
|
58
56
|
loadingStatus && loadingStatus(false);
|
|
59
57
|
|
|
60
|
-
case
|
|
58
|
+
case 6:
|
|
61
59
|
case 'end':
|
|
62
60
|
return _context.stop();
|
|
63
61
|
}
|
package/dist/cjs/getQuery.js
CHANGED
|
@@ -12,11 +12,11 @@ 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 && 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)[' + (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 \'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 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 medias[]{
|
|
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, 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 }\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':
|
|
19
|
-
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && published <= $currentDate\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
|
|
19
|
+
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && published <= $currentDate\n && passwordLock != true\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
|
|
20
20
|
case 'externalResources':
|
|
21
21
|
return '{\n \'archived\': *[_type == "external" && archived && isVisible ' + conditions + '] | order(displayDate desc),\n \'recent\': *[_type == "external" && archived != true && isVisible ' + conditions + '] | order(displayDate asc)\n }';
|
|
22
22
|
}
|
package/dist/esm/Feature.js
CHANGED
|
@@ -32,10 +32,10 @@ var Feature = function Feature(props) {
|
|
|
32
32
|
var builder = imageUrlBuilder(client);
|
|
33
33
|
return builder.image(source).auto('format');
|
|
34
34
|
};
|
|
35
|
-
//image width
|
|
36
|
-
var imageWidth =
|
|
35
|
+
//image width updated.
|
|
36
|
+
var imageWidth = 450;
|
|
37
37
|
if (main_39) {
|
|
38
|
-
imageWidth =
|
|
38
|
+
imageWidth = 225;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
var renderUrl = function renderUrl(feature_link, feature_title, feature_body) {
|
|
@@ -5,7 +5,6 @@ import './_library-528f1934.js';
|
|
|
5
5
|
import './_iter-detect-70af34ea.js';
|
|
6
6
|
import './web.dom.iterable-5c830d3d.js';
|
|
7
7
|
import React__default, { useState, useEffect } from 'react';
|
|
8
|
-
import { m as moment } from './moment-12415288.js';
|
|
9
8
|
import { withRouter } from 'next/router';
|
|
10
9
|
import { _ as _slicedToArray } from './slicedToArray-a58d7edf.js';
|
|
11
10
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-d25aac66.js';
|
|
@@ -34,24 +33,23 @@ var VideoSeriesFilter = function VideoSeriesFilter(props) {
|
|
|
34
33
|
|
|
35
34
|
var filterList = function () {
|
|
36
35
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
37
|
-
var
|
|
36
|
+
var query;
|
|
38
37
|
return regenerator.wrap(function _callee$(_context) {
|
|
39
38
|
while (1) {
|
|
40
39
|
switch (_context.prev = _context.next) {
|
|
41
40
|
case 0:
|
|
42
41
|
loadingStatus && loadingStatus(true);
|
|
43
42
|
filteredList(null);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_context.next = 6;
|
|
43
|
+
query = '*[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url) ' + (filter.id ? ' && references(\'' + filter.id + '\')' : '') + '\n && references(\'' + taxonomyID + '\')\n && is_visible == true\n && published <= now()\n && passwordLock != true\n ] | order(published desc) [$from...$to]{\n ...,\n title,\n summary,\n published,\n thumbnail,\n url,\n taxonomy,\n contentCategory->,\n body[_type == "youtubeGallery"],\n \'pageNumber\': ' + currentPage + '\n }';
|
|
44
|
+
_context.next = 5;
|
|
47
45
|
return client.fetch(query, params).then(function (res) {
|
|
48
46
|
filteredList({ posts: res, query: query });
|
|
49
47
|
});
|
|
50
48
|
|
|
51
|
-
case
|
|
49
|
+
case 5:
|
|
52
50
|
loadingStatus && loadingStatus(false);
|
|
53
51
|
|
|
54
|
-
case
|
|
52
|
+
case 6:
|
|
55
53
|
case 'end':
|
|
56
54
|
return _context.stop();
|
|
57
55
|
}
|
package/dist/esm/getQuery.js
CHANGED
|
@@ -10,11 +10,11 @@ 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 && 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)[' + (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 \'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 }';
|
|
12
12
|
case 'article':
|
|
13
|
-
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, profileImage, biography },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n },\n medias[]{
|
|
13
|
+
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, 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 }\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 }';
|
|
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 pdf{asset->}\n } | order(year desc, month desc)\n }';
|
|
16
16
|
case 'issue':
|
|
17
|
-
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && published <= $currentDate\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
|
|
17
|
+
return '*[_type == \'publication\'\n && identifier.current == $publication\n ' + conditions + '][0] {\n ' + params + '\n ...,\n \'issue\': *[_type == \'publication\'\n && references(^._id)\n && identifier.current == $issue][0] {\n ...,\n \'articles\': *[_type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && is_visible\n && defined(url)\n && published <= $currentDate\n && passwordLock != true\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
|
|
18
18
|
case 'externalResources':
|
|
19
19
|
return '{\n \'archived\': *[_type == "external" && archived && isVisible ' + conditions + '] | order(displayDate desc),\n \'recent\': *[_type == "external" && archived != true && isVisible ' + conditions + '] | order(displayDate asc)\n }';
|
|
20
20
|
}
|