@mjhls/mjh-framework 1.0.699 → 1.0.701

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/dist/esm/View.js CHANGED
@@ -42,7 +42,6 @@ import 'react-bootstrap';
42
42
  import './iconBase-602d52fe.js';
43
43
  import './index.esm-29e48d38.js';
44
44
  import Button from 'react-bootstrap/Button';
45
- import { _ as _defineProperty } from './defineProperty-b798470d.js';
46
45
  import Form from 'react-bootstrap/Form';
47
46
  import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-50d0fbc7.js';
48
47
  import './util-7700fc59.js';
@@ -249,7 +248,7 @@ var ISI = function ISI(props) {
249
248
  );
250
249
  };
251
250
 
252
- var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n width: 100%;\r\n height: auto;\r\n\r\n max-height: 175px;\r\n object-fit: contain;\r\n margin-bottom: 1rem;\r\n }\r\n}\r\n";
251
+ var css = ".RelatedArticles-module_mediaContainer__10h9k {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n margin: 0 -1rem;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn {\r\n margin: 0 1rem 1rem;\r\n width: calc(33% - 1rem);\r\n display: column;\r\n flex-direction: row;\r\n margin-bottom: 0.75rem;\r\n padding-bottom: 0.75rem;\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_mediaCard__3wQbn:last-child {\r\n border-bottom: none;\r\n}\r\n.RelatedArticles-module_cardTitle__3P-Ib {\r\n font-weight: bold;\r\n color: #252525;\r\n margin-bottom: 0.25rem;\r\n font-size: 15px;\r\n}\r\n.RelatedArticles-module_authorListing__1EFg4 span.RelatedArticles-module_text-muted__3b0zX {\r\n color: #000;\r\n font-weight: bold;\r\n}\r\n.RelatedArticles-module_cardDate__1wOR5 {\r\n color: var(--dark);\r\n display: block;\r\n background: #fff !important;\r\n margin-bottom: 0;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: block;\r\n text-align: center;\r\n margin-bottom: 0.5rem;\r\n}\r\n.RelatedArticles-module_imgWrapper__5Jx_4 img {\r\n height: 135px;\r\n width: 100%;\r\n object-fit: cover;\r\n object-position: center;\r\n}\r\n@media screen and (max-width: 1064px) {\r\n}\r\n@media screen and (max-width: 968px) {\r\n .RelatedArticles-module_mediaContainer__10h9k {\r\n flex-wrap: wrap;\r\n }\r\n .RelatedArticles-module_imgWrapper__5Jx_4 {\r\n display: none;\r\n }\r\n .RelatedArticles-module_mediaCard__3wQbn {\r\n width: 100%;\r\n margin-bottom: 0.5rem;\r\n padding: 0;\r\n }\r\n .RelatedArticles-module_cardTitle__3P-Ib {\r\n font-size: 0.75rem;\r\n margin-bottom: 0;\r\n }\r\n}\r\n";
253
252
  var styles = { "mediaContainer": "RelatedArticles-module_mediaContainer__10h9k", "mediaCard": "RelatedArticles-module_mediaCard__3wQbn", "cardTitle": "RelatedArticles-module_cardTitle__3P-Ib", "authorListing": "RelatedArticles-module_authorListing__1EFg4", "text-muted": "RelatedArticles-module_text-muted__3b0zX", "cardDate": "RelatedArticles-module_cardDate__1wOR5", "imgWrapper": "RelatedArticles-module_imgWrapper__5Jx_4" };
254
253
  styleInject(css);
255
254
 
@@ -377,6 +376,7 @@ var Article = function Article(props) {
377
376
  issue = _props$article.issue,
378
377
  source = _props$article.source,
379
378
  documentGroupMapping = _props$article.documentGroupMapping,
379
+ issueGroup = _props$article.issueGroup,
380
380
  showIsi = _props$article.showIsi,
381
381
  isi = _props$article.isi,
382
382
  regionalPages = props.regionalPages,
@@ -487,65 +487,76 @@ var Article = function Article(props) {
487
487
  };
488
488
 
489
489
  var RelevantTopics = function RelevantTopics() {
490
- if (content_placement && content_placement.length > 0 || documentGroupMapping) {
491
- return React__default.createElement(
492
- 'div',
493
- { style: { color: '#262626' } },
494
- React__default.createElement(
495
- 'p',
496
- { className: 'mb-0' },
497
- React__default.createElement(
498
- 'b',
499
- null,
500
- 'Related Content:'
501
- )
502
- ),
503
- documentGroupMapping && documentGroupMapping.map(function (documentGroup) {
504
- if (!documentGroup.parent) {
505
- return null;
490
+ if (content_placement && content_placement.length > 0 || documentGroupMapping && documentGroupMapping.length > 0) {
491
+ var relatedLinks = [];
492
+ if (documentGroupMapping && documentGroupMapping.length > 0) {
493
+ documentGroupMapping.forEach(function (documentGroup) {
494
+ if (documentGroup.parent) {
495
+ relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path }]);
506
496
  }
507
-
508
- return React__default.createElement(
509
- React__default.Fragment,
510
- null,
511
- React__default.createElement(
512
- 'span',
513
- { className: '' },
514
- React__default.createElement(
515
- 'a',
516
- {
517
- className: 'related-links',
518
- style: { color: 'blue' },
519
- href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
520
- documentGroup.name
521
- )
522
- ),
523
- content_placement && content_placement.length ? ' | ' : null
524
- );
525
- }),
526
- content_placement && content_placement.length > 0 ? content_placement.map(function (cp, index) {
497
+ });
498
+ }
499
+ if (content_placement && content_placement.length > 0) {
500
+ content_placement.filter(function (item) {
501
+ return item.path !== 'news';
502
+ }).forEach(function (cp) {
527
503
  var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
528
504
  var href = '/' + cp_url;
529
- return React__default.createElement(
530
- React__default.Fragment,
531
- { key: index },
532
- React__default.createElement(
505
+ relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
506
+ });
507
+ }
508
+ if (issueGroup && issueGroup.name && issueGroup.identifier && issueGroup.identifier.current && issueGroup.parent && issueGroup.parent.identifier && issueGroup.parent.identifier.current) {
509
+ relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: issueGroup.name, href: '/publications/' + issueGroup.parent.identifier.current + '/' + issueGroup.identifier.current }]);
510
+ }
511
+ if (relatedLinks && relatedLinks.length > 0) {
512
+ return React__default.createElement(
513
+ 'div',
514
+ null,
515
+ relatedLinks.map(function (relatedLink, index) {
516
+ return React__default.createElement(
533
517
  'span',
534
- null,
518
+ { key: index, className: 'related-link' },
535
519
  React__default.createElement(
536
520
  'a',
537
- { className: 'related-links', key: index, href: href, style: { color: 'blue' } },
538
- cp.name
521
+ { className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
522
+ relatedLink.label
523
+ ),
524
+ React__default.createElement(
525
+ 'style',
526
+ { jsx: 'true' },
527
+ '\n .related-link:not(:first-child):before {\n content: \' | \';\n }\n '
539
528
  )
540
- ),
541
- content_placement.length > index + 1 ? ' | ' : null
542
- );
543
- }) : null
544
- );
529
+ );
530
+ })
531
+ );
532
+ }
533
+ return null;
545
534
  }
546
535
  return null;
547
536
  };
548
537
 
538
+ var RelatedContent = function RelatedContent() {
539
+ return React__default.createElement(
540
+ 'section',
541
+ { id: 'related-content-section', className: 'my-1' },
542
+ React__default.createElement(
543
+ 'p',
544
+ { className: 'mb-0' },
545
+ React__default.createElement(
546
+ 'b',
547
+ null,
548
+ 'Related Content:'
549
+ )
550
+ ),
551
+ React__default.createElement(RelevantTopics, null),
552
+ React__default.createElement(
553
+ 'div',
554
+ { className: 'pt-2' },
555
+ React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
556
+ )
557
+ );
558
+ };
559
+
549
560
  var form = function form() {
550
561
  return React__default.createElement(
551
562
  React__default.Fragment,
@@ -1004,20 +1015,7 @@ var Article = function Article(props) {
1004
1015
  )
1005
1016
  ),
1006
1017
  React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
1007
- showRelatedArticles && !showIsi && React__default.createElement(
1008
- React__default.Fragment,
1009
- null,
1010
- React__default.createElement(
1011
- 'div',
1012
- null,
1013
- React__default.createElement(RelevantTopics, null)
1014
- ),
1015
- React__default.createElement(
1016
- 'div',
1017
- { className: 'pt-2' },
1018
- React__default.createElement(RelatedArticle, { articles: article.relatedArticle, client: client })
1019
- )
1020
- )
1018
+ showRelatedArticles && !showIsi && React__default.createElement(RelatedContent, null)
1021
1019
  ),
1022
1020
  renderIsiContent(props.article)
1023
1021
  ),
@@ -1182,50 +1180,77 @@ var ArticleQueue = function ArticleQueue(props) {
1182
1180
  }, 1000);
1183
1181
  }, [queueData.length]);
1184
1182
 
1185
- var loadmore = function loadmore() {
1186
- var query = props.relatedArticleQuery;
1187
- var params = props.params;
1188
- if (queueData && queueData.length < maxListLength) {
1189
- params.index = queueData.length - 1;
1190
- props.client.fetch(query, params).then(function () {
1191
- var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(article) {
1192
- var startingIndex, endingIndex, targeting;
1193
- return regenerator.wrap(function _callee$(_context) {
1194
- while (1) {
1195
- switch (_context.prev = _context.next) {
1196
- case 0:
1197
- if (!(article && article._id)) {
1198
- _context.next = 9;
1199
- break;
1200
- }
1201
-
1202
- //query next 4 related article without repeating previous 4 related articles
1203
- startingIndex = queueData.length + 1;
1204
- endingIndex = startingIndex + 2;
1205
- _context.next = 5;
1206
- return getRelatedArticle(null, props.client, article, prevUrl, startingIndex + '..' + endingIndex);
1207
-
1208
- case 5:
1209
- article.relatedArticle = _context.sent;
1210
- targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
1211
-
1212
- article.Ads = Ads.getRightItems(targeting);
1213
- setQueueData([].concat(_toConsumableArray(queueData), [article]));
1214
-
1215
- case 9:
1216
- case 'end':
1217
- return _context.stop();
1183
+ var loadmore = function () {
1184
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
1185
+ var index, article, startingIndex, endingIndex, targeting;
1186
+ return regenerator.wrap(function _callee$(_context) {
1187
+ while (1) {
1188
+ switch (_context.prev = _context.next) {
1189
+ case 0:
1190
+ if (!(queueData && queueData.length < maxListLength)) {
1191
+ _context.next = 27;
1192
+ break;
1218
1193
  }
1219
- }
1220
- }, _callee, _this);
1221
- }));
1222
1194
 
1223
- return function (_x) {
1224
- return _ref.apply(this, arguments);
1225
- };
1226
- }());
1227
- }
1228
- };
1195
+ index = queueData.length - 1;
1196
+ article = null;
1197
+ _context.prev = 3;
1198
+ _context.next = 6;
1199
+ return getRelatedArticle(null, props.client, props.article, prevUrl, index);
1200
+
1201
+ case 6:
1202
+ article = _context.sent;
1203
+ _context.next = 12;
1204
+ break;
1205
+
1206
+ case 9:
1207
+ _context.prev = 9;
1208
+ _context.t0 = _context['catch'](3);
1209
+
1210
+ console.error(_context.t0);
1211
+
1212
+ case 12:
1213
+ if (!(article && article._id)) {
1214
+ _context.next = 27;
1215
+ break;
1216
+ }
1217
+
1218
+ //query next 4 related article without repeating previous 4 related articles
1219
+ startingIndex = queueData.length + 1;
1220
+ endingIndex = startingIndex + 2;
1221
+ _context.prev = 15;
1222
+ _context.next = 18;
1223
+ return getRelatedArticle(null, props.client, props.article, prevUrl, startingIndex + '..' + endingIndex);
1224
+
1225
+ case 18:
1226
+ article.relatedArticle = _context.sent;
1227
+ _context.next = 24;
1228
+ break;
1229
+
1230
+ case 21:
1231
+ _context.prev = 21;
1232
+ _context.t1 = _context['catch'](15);
1233
+
1234
+ console.error(_context.t1);
1235
+
1236
+ case 24:
1237
+ targeting = getTargeting({ article: article, cpModificationRequired: cpModificationRequired, prevUrl: prevUrl });
1238
+
1239
+ article.Ads = Ads.getRightItems(targeting);
1240
+ setQueueData([].concat(_toConsumableArray(queueData), [article]));
1241
+
1242
+ case 27:
1243
+ case 'end':
1244
+ return _context.stop();
1245
+ }
1246
+ }
1247
+ }, _callee, _this, [[3, 9], [15, 21]]);
1248
+ }));
1249
+
1250
+ return function loadmore() {
1251
+ return _ref.apply(this, arguments);
1252
+ };
1253
+ }();
1229
1254
 
1230
1255
  var changeMeta = function changeMeta(meta) {
1231
1256
  document.title = meta.shareTitle;
@@ -1297,74 +1322,6 @@ var ArticleQueue = function ArticleQueue(props) {
1297
1322
  );
1298
1323
  };
1299
1324
 
1300
- var Articles = function Articles(props) {
1301
- var _extends2;
1302
-
1303
- var videoAccountIDs = props.videoAccountIDs,
1304
- Ads = props.Ads,
1305
- cpModificationRequired = props.cpModificationRequired,
1306
- Settings = props.Settings,
1307
- ISIContent = props.ISIContent,
1308
- prevUrl = props.prevUrl,
1309
- setActiveArticle = props.setActiveArticle,
1310
- article = props.article,
1311
- client = props.client,
1312
- relatedArticleQuery = props.relatedArticleQuery,
1313
- Website = props.Website,
1314
- pageview = props.pageview,
1315
- shareOptions = props.shareOptions,
1316
- WAds = props.WAds,
1317
- regionalPages = props.regionalPages,
1318
- nationalPage = props.nationalPage,
1319
- canonicalTag = props.canonicalTag;
1320
- var taxonomyMapping = article.taxonomyMapping,
1321
- _article$url = article.url;
1322
- _article$url = _article$url === undefined ? {
1323
- current: null
1324
- } : _article$url;
1325
- var url = _article$url.current,
1326
- content_placement = article.content_placement;
1327
-
1328
-
1329
- var taxonomy = [];
1330
- content_placement.forEach(function (_ref2) {
1331
- var path = _ref2.path,
1332
- _id = _ref2._id;
1333
-
1334
- var prev_url_to_check = prevUrl;
1335
- if (prev_url_to_check.includes('?')) {
1336
- prev_url_to_check = prev_url_to_check.split('?')[0];
1337
- }
1338
- if (prev_url_to_check.endsWith(path)) taxonomy.push(_id);
1339
- });
1340
-
1341
- if (taxonomy.length === 0) {
1342
- taxonomy = taxonomyMapping.map(function (_ref3) {
1343
- var _ref = _ref3._ref;
1344
- return _ref;
1345
- });
1346
- }
1347
-
1348
- var params = {
1349
- url: url,
1350
- taxonomy: taxonomy,
1351
- index: 0
1352
- };
1353
-
1354
- return React__default.createElement(ArticleQueue, _extends((_extends2 = {
1355
- client: client,
1356
- params: params,
1357
- relatedArticleQuery: relatedArticleQuery,
1358
- website: Website,
1359
- checkSponsered: true,
1360
- pageview: pageview,
1361
- shareOptions: shareOptions,
1362
- Ads: WAds,
1363
- regionalPages: regionalPages,
1364
- nationalPage: nationalPage
1365
- }, _defineProperty(_extends2, 'pageview', pageview), _defineProperty(_extends2, 'onVote', function onVote() {}), _defineProperty(_extends2, 'ISIContent', ISIContent), _defineProperty(_extends2, 'videoAccountIDs', videoAccountIDs), _defineProperty(_extends2, 'sponsoredTaxonomies', []), _defineProperty(_extends2, 'cpModificationRequired', cpModificationRequired), _defineProperty(_extends2, 'Settings', Settings), _defineProperty(_extends2, 'canonicalTag', canonicalTag), _extends2), props));
1366
- };
1367
-
1368
1325
  var _this$1 = undefined;
1369
1326
 
1370
1327
  var View = function View(props) {
@@ -1543,7 +1500,15 @@ var View = function View(props) {
1543
1500
  props.article.seriesDetail && props.article.seriesDetail.nextUrl && React__default.createElement('link', { rel: 'next', href: props.article.seriesDetail.nextUrl })
1544
1501
  )
1545
1502
  ),
1546
- !needInfiniteScroll ? React__default.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles }, props)) : React__default.createElement(Articles, _extends({ infiniteScroll: true, showRelatedArticles: showRelatedArticles, canonicalTag: canonicalTag }, props))
1503
+ !needInfiniteScroll ? React__default.createElement(Article, _extends({ infiniteScroll: false, showRelatedArticles: showRelatedArticles }, props)) : React__default.createElement(ArticleQueue, _extends({
1504
+ infiniteScroll: true,
1505
+ showRelatedArticles: showRelatedArticles,
1506
+ canonicalTag: canonicalTag,
1507
+ checkSponsered: true,
1508
+ Ads: props.WAds,
1509
+ onVote: function onVote() {},
1510
+ sponsoredTaxonomies: []
1511
+ }, props))
1547
1512
  );
1548
1513
  };
1549
1514
 
@@ -42,6 +42,9 @@ var YoutubeGroup = function YoutubeGroup(props) {
42
42
  scrollPosition = _useState6[0],
43
43
  setScrollPosition = _useState6[1];
44
44
 
45
+ var vidHolderWidth = props.vidHolderWidth ? props.vidHolderWidth : '805px';
46
+ var numOfTiles = props.numOfTiles ? props.numOfTiles : [3, 2, 1];
47
+
45
48
  var urlFor = function urlFor(source, client) {
46
49
  var builder = imageUrlBuilder(client);
47
50
  return builder.image(source).auto('format');
@@ -80,19 +83,19 @@ var YoutubeGroup = function YoutubeGroup(props) {
80
83
  var thumbSize = void 0;
81
84
  var scrollerVisible = false;
82
85
  if (window.innerWidth > 1399) {
83
- thumbSize = Math.floor(viewableWindow.current.clientWidth / 3 - 40);
86
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / numOfTiles[0] - 40);
84
87
  if (props.dataset.length > 3) {
85
88
  scrollerVisible = true;
86
89
  }
87
90
  }
88
91
  if (window.innerWidth < 1399 && window.innerWidth > 592) {
89
- thumbSize = Math.floor(viewableWindow.current.clientWidth / 2 - 48);
92
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / numOfTiles[1] - 48);
90
93
  if (props.dataset.length > 2) {
91
94
  scrollerVisible = true;
92
95
  }
93
96
  }
94
97
  if (window.innerWidth < 592) {
95
- thumbSize = Math.floor(viewableWindow.current.clientWidth / 1 - 64);
98
+ thumbSize = Math.floor(viewableWindow.current.clientWidth / numOfTiles[2] - 64);
96
99
  if (props.dataset.length > 1) {
97
100
  scrollerVisible = true;
98
101
  }
@@ -137,13 +140,13 @@ var YoutubeGroup = function YoutubeGroup(props) {
137
140
 
138
141
  if (scrollOffset === 0) {
139
142
  if (window.innerWidth > 1399) {
140
- scrollDirection = innerSlider.current.offsetWidth - tileSize * 3 - 70;
143
+ scrollDirection = innerSlider.current.offsetWidth - tileSize * numOfTiles[0] - 70;
141
144
  }
142
145
  if (window.innerWidth < 1399 && window.innerWidth > 592) {
143
- scrollDirection = innerSlider.current.offsetWidth - tileSize * 2 - 40;
146
+ scrollDirection = innerSlider.current.offsetWidth - tileSize * numOfTiles[1] - 40;
144
147
  }
145
148
  if (window.innerWidth < 592) {
146
- scrollDirection = innerSlider.current.offsetWidth - tileSize * 1 - 24;
149
+ scrollDirection = innerSlider.current.offsetWidth - tileSize * numOfTiles[3] - 24;
147
150
  }
148
151
  }
149
152
  }
@@ -351,7 +354,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
351
354
  React__default.createElement(
352
355
  'style',
353
356
  { jsx: 'true' },
354
- '\n #vid-slider * {\n box-sizing: border-box;\n -ms-overflow-style: none;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n padding: 0 1.5rem;\n margin-bottom: 2rem;\n }\n #vid-slider .now-playing {\n position: absolute;\n top: 0.5rem;\n left: 1rem;\n color: white;\n background: rgba(0, 0, 0, 0.75);\n }\n #vid-slider h1,\n #vid-slider p {\n text-align: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n }\n #vid-slider,\n #vidHolder {\n max-width: 805px;\n }\n #vid-slider a:link,\n #vid-slider a:hover,\n #vid-slider a:active,\n #vid-slider a:visited {\n transition: color 150ms;\n color: #95a5a6;\n text-decoration: none;\n }\n #vid-slider a:hover {\n color: #7f8c8d;\n text-decoration: underline;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow-x: hidden;\n width: 100%;\n -ms-overflow-style: none;\n overflow-y: hidden !important;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n width: 100%;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 0.9rem;\n font-weight: bold;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 25px 0 0 -0.25rem !important;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n height: 100%;\n\n margin: 0 12.5px;\n font-size: 20px;\n cursor: pointer;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n #vid-slider .tile:first-child {\n margin-left: 15px;\n }\n #vid-slider .tile__img {\n height: 135px;\n\n -o-object-fit: cover;\n object-fit: cover;\n object-position: center;\n }\n #vid-slider .tile__details {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n font-size: 10px;\n opacity: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n transition: 450ms opacity;\n }\n #vid-slider .tile__details:after,\n #vid-slider .tile__details:before {\n content: \'\';\n\n position: absolute;\n top: 50%;\n left: 50%;\n display: #000;\n }\n #vid-slider .tile__details:after {\n margin-top: -25px;\n margin-left: -25px;\n width: 50px;\n height: 50px;\n border: 3px solid #ecf0f1;\n line-height: 50px;\n text-align: center;\n border-radius: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1;\n }\n #vid-slider .tile__details:before {\n content: \'\';\n background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n no-repeat center center;\n left: 0;\n width: 100%;\n height: 3rem;\n font-size: 30px;\n margin-right: 12px;\n margin-top: -24px;\n text-align: center;\n z-index: 2;\n color: white;\n }\n\n #vid-slider .tile__title {\n position: absolute;\n bottom: 0;\n padding: 10px;\n max-width: 250px;\n }\n #vid-slider .tile__title_text {\n position: relative;\n left: 0;\n white-space: normal;\n }\n\n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -0.5rem;\n padding: 1rem;\n }\n #vid-slider .tile__slider-next {\n right: -0.5rem;\n padding: 1rem;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n padding-right: 0 1.2rem;\n }\n\n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n @media screen and (max-width: 1399px) {\n #vid-slider,\n #vidHolder {\n max-width: 620px;\n }\n #vid-slider .tile__img {\n height: 145px;\n }\n }\n @media screen and (max-width: 1200px) {\n #vid-slider,\n #vidHolder {\n max-width: 580px;\n }\n }\n @media screen and (max-width: 967px) {\n #vid-slider {\n max-width: 100%;\n }\n #vid-slider .tile__img {\n height: 175px;\n }\n }\n\n @media screen and (max-width: 768px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n\n #vid-slider .tile__img {\n height: 118px;\n }\n #vid-slider .row__inner {\n margin: 30px 0 60px;\n }\n }\n\n @media screen and (max-width: 590px) {\n #vid-slider .tile__img {\n height: 195px;\n }\n }\n '
357
+ '\n #vid-slider * {\n box-sizing: border-box;\n -ms-overflow-style: none;\n }\n #vid-slider::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar {\n display: none;\n }\n #vid-slider .row::-webkit-scrollbar-thumb {\n display: none;\n }\n #vid-slider {\n position: relative;\n -ms-overflow-style: none;\n padding: 0 1.5rem;\n margin-bottom: 2rem;\n }\n #vid-slider .now-playing {\n position: absolute;\n top: 0.5rem;\n left: 1rem;\n color: white;\n background: rgba(0, 0, 0, 0.75);\n }\n #vid-slider h1,\n #vid-slider p {\n text-align: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n }\n #vid-slider,\n #vidHolder {\n max-width: ' + vidHolderWidth + ';\n }\n #vid-slider a:link,\n #vid-slider a:hover,\n #vid-slider a:active,\n #vid-slider a:visited {\n transition: color 150ms;\n color: #95a5a6;\n text-decoration: none;\n }\n #vid-slider a:hover {\n color: #7f8c8d;\n text-decoration: underline;\n }\n #vid-slider .contain {\n width: 100%;\n }\n #vid-slider .row {\n overflow-x: hidden;\n width: 100%;\n -ms-overflow-style: none;\n overflow-y: hidden !important;\n }\n #vid-slider .tile__info {\n white-space: normal !important;\n position: absolute;\n width: 100%;\n text-align: center;\n color: ' + (props.dark ? 'white' : '#383838') + ';\n opacity: 1;\n font-size: 0.9rem;\n font-weight: bold;\n transition: opacity 0.25s;\n }\n #vid-slider .row__inner {\n transition: 450ms -webkit-transform;\n transition: 450ms transform;\n transition: 450ms transform, 450ms -webkit-transform;\n font-size: 0;\n white-space: nowrap;\n margin: 25px 0 0 -0.25rem !important;\n padding-bottom: 10px;\n padding-left: 0;\n }\n #vid-slider .tile {\n position: relative;\n display: inline-block;\n height: 100%;\n\n margin: 0 12.5px;\n font-size: 20px;\n cursor: pointer;\n transition: 450ms all;\n -webkit-transform-origin: center left;\n transform-origin: center left;\n }\n #vid-slider .tile:first-child {\n margin-left: 15px;\n }\n #vid-slider .tile__img {\n height: 135px;\n\n -o-object-fit: cover;\n object-fit: cover;\n object-position: center;\n }\n #vid-slider .tile__details {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n font-size: 10px;\n opacity: 0;\n background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);\n transition: 450ms opacity;\n }\n #vid-slider .tile__details:after,\n #vid-slider .tile__details:before {\n content: \'\';\n\n position: absolute;\n top: 50%;\n left: 50%;\n display: #000;\n }\n #vid-slider .tile__details:after {\n margin-top: -25px;\n margin-left: -25px;\n width: 50px;\n height: 50px;\n border: 3px solid #ecf0f1;\n line-height: 50px;\n text-align: center;\n border-radius: 100%;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1;\n }\n #vid-slider .tile__details:before {\n content: \'\';\n background: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 64 64\' width=\'64\' height=\'64\' fill=\'white\'><path d=\'M26 46 L46 32 L26 18 Z\'/></svg>")\n no-repeat center center;\n left: 0;\n width: 100%;\n height: 3rem;\n font-size: 30px;\n margin-right: 12px;\n margin-top: -24px;\n text-align: center;\n z-index: 2;\n color: white;\n }\n\n #vid-slider .tile__title {\n position: absolute;\n bottom: 0;\n padding: 10px;\n max-width: 250px;\n }\n #vid-slider .tile__title_text {\n position: relative;\n left: 0;\n white-space: normal;\n }\n\n #vid-slider .tile__slider-prev,\n #vid-slider .tile__slider-next {\n width: 30px;\n background: transparent;\n border: none;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n z-index: 99;\n cursor: pointer;\n color: ' + (props.dark ? 'white' : 'black') + ';\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 2rem;\n }\n #vid-slider .tile__slider-prev {\n left: -0.5rem;\n padding: 1rem;\n }\n #vid-slider .tile__slider-next {\n right: -0.5rem;\n padding: 1rem;\n }\n #vid-slider,\n #vid-slider .row {\n margin: 0;\n padding-right: 0 1.2rem;\n }\n\n #vid-slider .row::-webkit-scrollbar-thumb {\n background-color: transparent !important;\n }\n #vid-slider i {\n border: solid ' + (props.dark ? 'white' : 'black') + ';\n border-width: 0 4px 4px 0;\n display: inline-block;\n padding: 4px;\n pointer-events: none;\n }\n #vid-slider .right {\n transform: rotate(-45deg);\n -webkit-transform: rotate(-45deg);\n }\n #vid-slider .left {\n transform: rotate(135deg);\n -webkit-transform: rotate(135deg);\n }\n @media screen and (max-width: 1399px) {\n #vid-slider,\n #vidHolder {\n max-width: 620px;\n }\n #vid-slider .tile__img {\n height: 145px;\n }\n }\n @media screen and (max-width: 1200px) {\n #vid-slider,\n #vidHolder {\n max-width: 580px;\n }\n }\n @media screen and (max-width: 967px) {\n #vid-slider {\n max-width: 100%;\n }\n #vid-slider .tile__img {\n height: 175px;\n }\n }\n\n @media screen and (max-width: 768px) {\n #vidHolder {\n position: unset;\n width: 100%;\n }\n\n #vid-slider .tile__img {\n height: 118px;\n }\n #vid-slider .row__inner {\n margin: 30px 0 60px;\n }\n }\n\n @media screen and (max-width: 590px) {\n #vid-slider .tile__img {\n height: 195px;\n }\n }\n '
355
358
  )
356
359
  );
357
360
  };
@@ -8,9 +8,9 @@ var getQuery = function getQuery(type) {
8
8
 
9
9
  switch (type) {
10
10
  case 'related':
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 },\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 documentGroupMapping[]-> {\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
+ 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 },\n body[] {\n ...,\n upload_doc {\n _type,\n asset->\n },\n uploadAudio {\n _type,\n asset->\n }\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 },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\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[]{\n ...,\n upload_doc {\n _type,\n asset-> \n } \n },\n articles[]{\n ...,\n "authorDetails": authorMapping[]->{ displayName, url, profileImage, biography },\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 },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\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 }';
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 issueGroup-> { _id, name, identifier, parent-> },\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 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 },\n documentGroup-> {\n name,\n thumbnail,\n parent->{...,parent->},\n \'path\': identifier.current\n },\n documentGroupMapping[]-> {\n _id,\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':