@mjhls/mjh-framework 1.0.723 → 1.0.724
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.724
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -164,6 +164,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
164
164
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(context, client) {
|
|
165
165
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 6;
|
|
166
166
|
var topicId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
167
|
+
var taxonomyId = arguments[4];
|
|
167
168
|
var pathname, virtualBlock, query, taxonomy_ids_res, taxonomy_ids, i, res, j, topics, urlQuery, currentPage, start, params, posts;
|
|
168
169
|
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
169
170
|
while (1) {
|
|
@@ -190,7 +191,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
190
191
|
break;
|
|
191
192
|
|
|
192
193
|
case 8:
|
|
193
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url)\n && references(\'
|
|
194
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url)\n && references(\'' + taxonomyId + '\') \n && is_visible == true \n && dateTime(published) <= dateTime(now())\n ]{\n \'taxonomy_id\': taxonomyMapping[]->_id\n }';
|
|
194
195
|
_context.next = 11;
|
|
195
196
|
return client.fetch(query);
|
|
196
197
|
|
|
@@ -228,7 +229,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
228
229
|
url: pathname
|
|
229
230
|
};
|
|
230
231
|
|
|
231
|
-
query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'
|
|
232
|
+
query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'' + taxonomyId + '\')\n ' + (topicId ? '&& references(\'' + topicId + '\')' : '') + '\n ] | order(published desc) [$from...$to]{\n \t\t...,\n \t\ttitle,\n \t\tsummary,\n \t\tpublished,\n \t\tthumbnail,\n \t\turl,\n \t\ttaxonomy,\n \t\tcontentCategory->,\n \t\tbody[_type == "youtubeGallery"],\n \t\t\'pageNumber\': ' + currentPage + '\n \t}';
|
|
232
233
|
_context.next = 26;
|
|
233
234
|
return client.fetch(query, params);
|
|
234
235
|
|
|
@@ -110,6 +110,7 @@ var VideoSeriesLandingPage = function VideoSeriesLandingPage(props) {
|
|
|
110
110
|
VideoSeriesLandingPage.getInitialData = function () {
|
|
111
111
|
var _ref = asyncToGenerator._asyncToGenerator( /*#__PURE__*/asyncToGenerator.regenerator.mark(function _callee(context, client) {
|
|
112
112
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
113
|
+
var taxonomyId = arguments[3];
|
|
113
114
|
var today, urlQuery, seriesName, currentPage, start, params, query, posts, seriesTitle, summary, url;
|
|
114
115
|
return asyncToGenerator.regenerator.wrap(function _callee$(_context) {
|
|
115
116
|
while (1) {
|
|
@@ -125,7 +126,7 @@ VideoSeriesLandingPage.getInitialData = function () {
|
|
|
125
126
|
to: start + itemsPerPage,
|
|
126
127
|
itemsPerPage: itemsPerPage
|
|
127
128
|
};
|
|
128
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && dateTime(published) <= dateTime(now()) \n && references(\'
|
|
129
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && dateTime(published) <= dateTime(now()) \n && references(\'' + taxonomyId + '\') \n && is_visible == true \n && url.current == \'' + seriesName + '\'\n ][$from...$to] | order(published desc) {\n\t\ttitle,\n\t\tsummary,\n\t\tpublished,\n\t\tthumbnail,\n\t\turl,\n\t\ttaxonomy,\n\t\tbody[_type == "youtubeGallery"]\n\t}';
|
|
129
130
|
_context.next = 9;
|
|
130
131
|
return client.fetch(query, params);
|
|
131
132
|
|
|
@@ -155,6 +155,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
155
155
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
|
|
156
156
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 6;
|
|
157
157
|
var topicId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
|
|
158
|
+
var taxonomyId = arguments[4];
|
|
158
159
|
var pathname, virtualBlock, query, taxonomy_ids_res, taxonomy_ids, i, res, j, topics, urlQuery, currentPage, start, params, posts;
|
|
159
160
|
return regenerator.wrap(function _callee$(_context) {
|
|
160
161
|
while (1) {
|
|
@@ -181,7 +182,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
181
182
|
break;
|
|
182
183
|
|
|
183
184
|
case 8:
|
|
184
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url)\n && references(\'
|
|
185
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url)\n && references(\'' + taxonomyId + '\') \n && is_visible == true \n && dateTime(published) <= dateTime(now())\n ]{\n \'taxonomy_id\': taxonomyMapping[]->_id\n }';
|
|
185
186
|
_context.next = 11;
|
|
186
187
|
return client.fetch(query);
|
|
187
188
|
|
|
@@ -219,7 +220,7 @@ VideoProgramLandingPage.getInitialData = function () {
|
|
|
219
220
|
url: pathname
|
|
220
221
|
};
|
|
221
222
|
|
|
222
|
-
query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'
|
|
223
|
+
query = '*[\n _type == \'article\'\n && !(_id in path("drafts.**"))\n && defined(title)\n && defined(url)\n && is_visible == true\n && dateTime(published) <= dateTime(now())\n && references(\'' + taxonomyId + '\')\n ' + (topicId ? '&& references(\'' + topicId + '\')' : '') + '\n ] | order(published desc) [$from...$to]{\n \t\t...,\n \t\ttitle,\n \t\tsummary,\n \t\tpublished,\n \t\tthumbnail,\n \t\turl,\n \t\ttaxonomy,\n \t\tcontentCategory->,\n \t\tbody[_type == "youtubeGallery"],\n \t\t\'pageNumber\': ' + currentPage + '\n \t}';
|
|
223
224
|
_context.next = 26;
|
|
224
225
|
return client.fetch(query, params);
|
|
225
226
|
|
|
@@ -104,6 +104,7 @@ var VideoSeriesLandingPage = function VideoSeriesLandingPage(props) {
|
|
|
104
104
|
VideoSeriesLandingPage.getInitialData = function () {
|
|
105
105
|
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(context, client) {
|
|
106
106
|
var itemsPerPage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
|
|
107
|
+
var taxonomyId = arguments[3];
|
|
107
108
|
var today, urlQuery, seriesName, currentPage, start, params, query, posts, seriesTitle, summary, url;
|
|
108
109
|
return regenerator.wrap(function _callee$(_context) {
|
|
109
110
|
while (1) {
|
|
@@ -119,7 +120,7 @@ VideoSeriesLandingPage.getInitialData = function () {
|
|
|
119
120
|
to: start + itemsPerPage,
|
|
120
121
|
itemsPerPage: itemsPerPage
|
|
121
122
|
};
|
|
122
|
-
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && dateTime(published) <= dateTime(now()) \n && references(\'
|
|
123
|
+
query = '*[\n _type == \'article\' \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && dateTime(published) <= dateTime(now()) \n && references(\'' + taxonomyId + '\') \n && is_visible == true \n && url.current == \'' + seriesName + '\'\n ][$from...$to] | order(published desc) {\n\t\ttitle,\n\t\tsummary,\n\t\tpublished,\n\t\tthumbnail,\n\t\turl,\n\t\ttaxonomy,\n\t\tbody[_type == "youtubeGallery"]\n\t}';
|
|
123
124
|
_context.next = 9;
|
|
124
125
|
return client.fetch(query, params);
|
|
125
126
|
|