@mjhls/mjh-framework 1.0.473 → 1.0.475

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,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.473
2
+ # mjh-framework v. 1.0.475
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -130,6 +130,8 @@ var Article = function Article(props) {
130
130
  authorDetails = _props$article.authorDetails,
131
131
  pageNumber = _props$article.pageNumber,
132
132
  published = _props$article.published,
133
+ _props$article$showPu = _props$article.showPublished,
134
+ showPublished = _props$article$showPu === undefined ? true : _props$article$showPu,
133
135
  articleBody = _props$article.body,
134
136
  thumbnail = _props$article.thumbnail,
135
137
  content_placement = _props$article.content_placement,
@@ -512,11 +514,13 @@ var Article = function Article(props) {
512
514
  React__default.createElement(
513
515
  'div',
514
516
  { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) ? '150px' : 0 } },
515
- React__default.createElement(
517
+ showPublished && React__default.createElement(
516
518
  'div',
517
519
  null,
518
520
  moment.moment(published).format('LL')
519
- ),
521
+ )
522
+ /* Show Published date */
523
+ ,
520
524
  React__default.createElement(
521
525
  'div',
522
526
  { className: 'mb-3' },
@@ -92,18 +92,12 @@ var Ustream = function Ustream(_ref) {
92
92
  React__default.createElement(index_esm$2.FaRegWindowClose, { style: { color: '#fff', fontSize: '1rem' } })
93
93
  )
94
94
  ),
95
- React__default.createElement('iframe', {
96
- id: 'ustream-iframe',
97
- webkitallowfullscreen: 'true',
98
- allowFullScreen: true,
99
- frameBorder: 'no',
100
- style: { maxWidth: '100%', height: currentHeight, width: currentWidth }
101
- })
95
+ React__default.createElement('iframe', { id: 'ustream-iframe', webkitallowfullscreen: 'true', allowFullScreen: true, frameBorder: 'no', style: { maxWidth: '100%', height: currentHeight, width: currentWidth } })
102
96
  ),
103
97
  React__default.createElement(
104
98
  'style',
105
99
  { jsx: 'true' },
106
- '\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n z-index: 999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
100
+ '\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n // Updating z-index to fix gutter ad over ustream\n z-index: 999999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
107
101
  )
108
102
  );
109
103
  };
package/dist/cjs/View.js CHANGED
@@ -284,6 +284,8 @@ var Article = function Article(props) {
284
284
  authorDetails = _props$article.authorDetails,
285
285
  pageNumber = _props$article.pageNumber,
286
286
  published = _props$article.published,
287
+ _props$article$showPu = _props$article.showPublished,
288
+ showPublished = _props$article$showPu === undefined ? true : _props$article$showPu,
287
289
  articleBody = _props$article.body,
288
290
  thumbnail = _props$article.thumbnail,
289
291
  content_placement = _props$article.content_placement,
@@ -667,11 +669,13 @@ var Article = function Article(props) {
667
669
  React__default.createElement(
668
670
  'div',
669
671
  { className: 'left-wrap' },
670
- React__default.createElement(
672
+ showPublished && React__default.createElement(
671
673
  'div',
672
674
  null,
673
675
  moment.moment(published).format('LL')
674
- ),
676
+ )
677
+ /* Show Published date */
678
+ ,
675
679
  React__default.createElement(
676
680
  'div',
677
681
  { className: 'mb-3' },
@@ -4,16 +4,21 @@ require('./_commonjsHelpers-06173234.js');
4
4
  var moment = require('./moment-66a6a284.js');
5
5
 
6
6
  var getQuery = function getQuery(type) {
7
+ var conditions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
8
+ var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
9
+
10
+ //Added feature to include additional conditions and parameters for site level operations
11
+ //Site level conditions should start with && (logical AND), and site level params should end with , (comma) in order to execute query
7
12
  var today = moment.moment().utc().format();
8
13
  switch (type) {
9
14
  case 'related':
10
- return '*[\n _type == "article" \n && defined(title) \n && defined(url) \n && !(_id in path("drafts.**")) \n && is_visible == true \n && published <= \'' + today + '\' \n && passwordLock!=true \n && taxonomyMapping[]._ref in $taxonomy \n && contentCategory->.name != \'Poll\' \n && contentCategory->.name != \'Slideshows\'\n && ExcludeFromInfiniteScroll !=true \n && url.current != $url \n && !defined(body[].videos)\n ]| order(published desc)[$index]{\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\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 },\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 }';
15
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= \'' + today + '\'\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\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 },\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 }';
11
16
  case 'article':
12
- return '*[\n _type == "article" \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && url.current == $url \n ][0]{\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\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 },\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 \n }';
17
+ 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 },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\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 },\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\n }';
13
18
  case 'publication':
14
- return '*[_type == \'publication\'\n && identifier.current == $publication][0] {\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 }';
19
+ 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 }';
15
20
  case 'issue':
16
- return '*[_type == \'publication\' \n && identifier.current == $publication][0] {\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 && dateTime(published) <= dateTime($currentDate) \n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
21
+ 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 && dateTime(published) <= dateTime($currentDate)\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
17
22
  }
18
23
  };
19
24
 
@@ -125,6 +125,8 @@ var Article = function Article(props) {
125
125
  authorDetails = _props$article.authorDetails,
126
126
  pageNumber = _props$article.pageNumber,
127
127
  published = _props$article.published,
128
+ _props$article$showPu = _props$article.showPublished,
129
+ showPublished = _props$article$showPu === undefined ? true : _props$article$showPu,
128
130
  articleBody = _props$article.body,
129
131
  thumbnail = _props$article.thumbnail,
130
132
  content_placement = _props$article.content_placement,
@@ -507,11 +509,13 @@ var Article = function Article(props) {
507
509
  React__default.createElement(
508
510
  'div',
509
511
  { className: 'video-detail', style: { marginBottom: isCutomPage(props.article) ? '150px' : 0 } },
510
- React__default.createElement(
512
+ showPublished && React__default.createElement(
511
513
  'div',
512
514
  null,
513
515
  moment(published).format('LL')
514
- ),
516
+ )
517
+ /* Show Published date */
518
+ ,
515
519
  React__default.createElement(
516
520
  'div',
517
521
  { className: 'mb-3' },
@@ -87,18 +87,12 @@ var Ustream = function Ustream(_ref) {
87
87
  React__default.createElement(FaRegWindowClose, { style: { color: '#fff', fontSize: '1rem' } })
88
88
  )
89
89
  ),
90
- React__default.createElement('iframe', {
91
- id: 'ustream-iframe',
92
- webkitallowfullscreen: 'true',
93
- allowFullScreen: true,
94
- frameBorder: 'no',
95
- style: { maxWidth: '100%', height: currentHeight, width: currentWidth }
96
- })
90
+ React__default.createElement('iframe', { id: 'ustream-iframe', webkitallowfullscreen: 'true', allowFullScreen: true, frameBorder: 'no', style: { maxWidth: '100%', height: currentHeight, width: currentWidth } })
97
91
  ),
98
92
  React__default.createElement(
99
93
  'style',
100
94
  { jsx: 'true' },
101
- '\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n z-index: 999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
95
+ '\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n // Updating z-index to fix gutter ad over ustream\n z-index: 999999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
102
96
  )
103
97
  );
104
98
  };
package/dist/esm/View.js CHANGED
@@ -279,6 +279,8 @@ var Article = function Article(props) {
279
279
  authorDetails = _props$article.authorDetails,
280
280
  pageNumber = _props$article.pageNumber,
281
281
  published = _props$article.published,
282
+ _props$article$showPu = _props$article.showPublished,
283
+ showPublished = _props$article$showPu === undefined ? true : _props$article$showPu,
282
284
  articleBody = _props$article.body,
283
285
  thumbnail = _props$article.thumbnail,
284
286
  content_placement = _props$article.content_placement,
@@ -662,11 +664,13 @@ var Article = function Article(props) {
662
664
  React__default.createElement(
663
665
  'div',
664
666
  { className: 'left-wrap' },
665
- React__default.createElement(
667
+ showPublished && React__default.createElement(
666
668
  'div',
667
669
  null,
668
670
  moment(published).format('LL')
669
- ),
671
+ )
672
+ /* Show Published date */
673
+ ,
670
674
  React__default.createElement(
671
675
  'div',
672
676
  { className: 'mb-3' },
@@ -2,16 +2,21 @@ import './_commonjsHelpers-0c4b6f40.js';
2
2
  import { m as moment } from './moment-12415288.js';
3
3
 
4
4
  var getQuery = function getQuery(type) {
5
+ var conditions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
6
+ var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
7
+
8
+ //Added feature to include additional conditions and parameters for site level operations
9
+ //Site level conditions should start with && (logical AND), and site level params should end with , (comma) in order to execute query
5
10
  var today = moment().utc().format();
6
11
  switch (type) {
7
12
  case 'related':
8
- return '*[\n _type == "article" \n && defined(title) \n && defined(url) \n && !(_id in path("drafts.**")) \n && is_visible == true \n && published <= \'' + today + '\' \n && passwordLock!=true \n && taxonomyMapping[]._ref in $taxonomy \n && contentCategory->.name != \'Poll\' \n && contentCategory->.name != \'Slideshows\'\n && ExcludeFromInfiniteScroll !=true \n && url.current != $url \n && !defined(body[].videos)\n ]| order(published desc)[$index]{\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\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 },\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 }';
13
+ return '*[\n _type == "article"\n && defined(title)\n && defined(url)\n && !(_id in path("drafts.**"))\n && is_visible == true\n && published <= \'' + today + '\'\n && passwordLock!=true\n && taxonomyMapping[]._ref in $taxonomy\n && contentCategory->.name != \'Poll\'\n && contentCategory->.name != \'Slideshows\'\n && ExcludeFromInfiniteScroll !=true\n && url.current != $url\n && !defined(body[].videos)\n ' + conditions + '\n ]| order(published desc)[$index]{\n ' + params + '\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\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 },\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 }';
9
14
  case 'article':
10
- return '*[\n _type == "article" \n && !(_id in path("drafts.**")) \n && defined(title) \n && defined(url) \n && url.current == $url \n ][0]{\n title,\n published,\n summary,\n thumbnail,\n ...,\n passwordLock,\n password,\n "authorDetails": authorMapping[]->{ displayName, url },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\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 },\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 \n }';
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 },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\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 },\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\n }';
11
16
  case 'publication':
12
- return '*[_type == \'publication\'\n && identifier.current == $publication][0] {\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 }';
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 }';
13
18
  case 'issue':
14
- return '*[_type == \'publication\' \n && identifier.current == $publication][0] {\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 && dateTime(published) <= dateTime($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 && dateTime(published) <= dateTime($currentDate)\n && references(^._id)] {\n ...,\n authorMapping[0]->,\n contentCategory->,\n issueSection-> {\n name\n }\n }\n }\n }';
15
20
  }
16
21
  };
17
22
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.473",
3
+ "version": "1.0.475",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",