@mjhls/mjh-framework 1.0.728 → 1.0.729
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,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.729
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -118,6 +118,7 @@ var ArticleProgramLandingPage = function ArticleProgramLandingPage(props) {
|
|
|
118
118
|
ArticleProgramLandingPage.getInitialData = function () {
|
|
119
119
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(context, client) {
|
|
120
120
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
121
|
+
var taxonomyId = arguments[3];
|
|
121
122
|
|
|
122
123
|
var pathname, urlQuery, url, page, currentPage, start, params, query, postsPromise, virtualBlockPromise, posts, virtualBlock, _ref2, _ref3;
|
|
123
124
|
|
|
@@ -134,7 +135,7 @@ ArticleProgramLandingPage.getInitialData = function () {
|
|
|
134
135
|
from: start,
|
|
135
136
|
to: start + itemsPerPage
|
|
136
137
|
};
|
|
137
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'
|
|
138
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n \'pageNumber\': ' + currentPage + '\n }';
|
|
138
139
|
postsPromise = client.fetch(query, params);
|
|
139
140
|
virtualBlockPromise = client.fetch('*[_type == \'virtualBlock\' && identifier == \'' + pathname + '\'][0]');
|
|
140
141
|
posts = void 0, virtualBlock = void 0;
|
|
@@ -106,6 +106,7 @@ var ArticleSeriesLandingPage = function ArticleSeriesLandingPage(props) {
|
|
|
106
106
|
ArticleSeriesLandingPage.getInitialData = function () {
|
|
107
107
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(context, client) {
|
|
108
108
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
109
|
+
var taxonomyId = arguments[3];
|
|
109
110
|
var urlQuery, seriesName, page, currentPage, start, params, query, posts, seriesTitle, summary, url;
|
|
110
111
|
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
111
112
|
while (1) {
|
|
@@ -120,7 +121,7 @@ ArticleSeriesLandingPage.getInitialData = function () {
|
|
|
120
121
|
from: start,
|
|
121
122
|
to: start + itemsPerPage
|
|
122
123
|
};
|
|
123
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'
|
|
124
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && url.current == \'' + seriesName + '\'\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n summary,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n }';
|
|
124
125
|
_context.next = 9;
|
|
125
126
|
return client.fetch(query, params);
|
|
126
127
|
|
|
@@ -112,6 +112,7 @@ var ArticleProgramLandingPage = function ArticleProgramLandingPage(props) {
|
|
|
112
112
|
ArticleProgramLandingPage.getInitialData = function () {
|
|
113
113
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
|
|
114
114
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
115
|
+
var taxonomyId = arguments[3];
|
|
115
116
|
|
|
116
117
|
var pathname, urlQuery, url, page, currentPage, start, params, query, postsPromise, virtualBlockPromise, posts, virtualBlock, _ref2, _ref3;
|
|
117
118
|
|
|
@@ -128,7 +129,7 @@ ArticleProgramLandingPage.getInitialData = function () {
|
|
|
128
129
|
from: start,
|
|
129
130
|
to: start + itemsPerPage
|
|
130
131
|
};
|
|
131
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'
|
|
132
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n \'pageNumber\': ' + currentPage + '\n }';
|
|
132
133
|
postsPromise = client.fetch(query, params);
|
|
133
134
|
virtualBlockPromise = client.fetch('*[_type == \'virtualBlock\' && identifier == \'' + pathname + '\'][0]');
|
|
134
135
|
posts = void 0, virtualBlock = void 0;
|
|
@@ -100,6 +100,7 @@ var ArticleSeriesLandingPage = function ArticleSeriesLandingPage(props) {
|
|
|
100
100
|
ArticleSeriesLandingPage.getInitialData = function () {
|
|
101
101
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
|
|
102
102
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
103
|
+
var taxonomyId = arguments[3];
|
|
103
104
|
var urlQuery, seriesName, page, currentPage, start, params, query, posts, seriesTitle, summary, url;
|
|
104
105
|
return regenerator.wrap(function _callee$(_context) {
|
|
105
106
|
while (1) {
|
|
@@ -114,7 +115,7 @@ ArticleSeriesLandingPage.getInitialData = function () {
|
|
|
114
115
|
from: start,
|
|
115
116
|
to: start + itemsPerPage
|
|
116
117
|
};
|
|
117
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'
|
|
118
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && references(\'' + taxonomyId + '\')\n && url.current == \'' + seriesName + '\'\n && is_visible == true\n && passwordLock != true \n && defined(published)\n && dateTime(published) <= dateTime(now())] | order(published desc)[$from...$to]{\n title,\n summary,\n published,\n thumbnail,\n url,\n taxonomy,\n body[_type == "articleSeries"]{\n ...\n },\n }';
|
|
118
119
|
_context.next = 9;
|
|
119
120
|
return client.fetch(query, params);
|
|
120
121
|
|