@mjhls/mjh-framework 1.0.431 → 1.0.433
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 +1 -1
- package/dist/cjs/QueueDeckExpanded.js +103 -45
- package/dist/cjs/index.js +78 -8
- package/dist/esm/QueueDeckExpanded.js +103 -45
- package/dist/esm/index.js +79 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -84,7 +84,6 @@ var loadData = function loadData(values, query, client, params, setData, setScro
|
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) {
|
|
87
|
-
|
|
88
87
|
if (seoPaginate) {
|
|
89
88
|
var path = router.asPath;
|
|
90
89
|
var qrIndex = path.indexOf('?');
|
|
@@ -233,23 +232,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
233
232
|
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
234
233
|
),
|
|
235
234
|
article.source && React__default.createElement(
|
|
236
|
-
'
|
|
237
|
-
{ className: '
|
|
235
|
+
'div',
|
|
236
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
238
237
|
article.source
|
|
239
238
|
),
|
|
240
|
-
|
|
241
|
-
'
|
|
242
|
-
{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
239
|
+
React__default.createElement(
|
|
240
|
+
'div',
|
|
241
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
242
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
243
|
+
'p',
|
|
244
|
+
{
|
|
245
|
+
className: 'article-category',
|
|
246
|
+
style: {
|
|
247
|
+
background: '#3FB618',
|
|
248
|
+
color: '#ffffff',
|
|
249
|
+
marginBottom: '.25rem',
|
|
250
|
+
display: 'inline-block',
|
|
251
|
+
padding: '0 .25rem',
|
|
252
|
+
fontSize: '.8rem'
|
|
253
|
+
} },
|
|
254
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
255
|
+
),
|
|
256
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
257
|
+
'p',
|
|
258
|
+
{
|
|
259
|
+
className: 'issueSection',
|
|
260
|
+
style: {
|
|
261
|
+
background: '#000000 !important',
|
|
262
|
+
color: '#ffffff',
|
|
263
|
+
marginBottom: '.25rem',
|
|
264
|
+
marginLeft: '.25rem',
|
|
265
|
+
display: 'inline-block',
|
|
266
|
+
padding: '0 .25rem',
|
|
267
|
+
fontSize: '.8rem'
|
|
268
|
+
} },
|
|
269
|
+
article.issueSection.name
|
|
270
|
+
)
|
|
253
271
|
),
|
|
254
272
|
article.summary && React__default.createElement(
|
|
255
273
|
'p',
|
|
@@ -310,22 +328,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
310
328
|
React__default.createElement(AuthorComponent.AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
311
329
|
),
|
|
312
330
|
article.source && React__default.createElement(
|
|
313
|
-
'
|
|
314
|
-
{ className: '
|
|
331
|
+
'div',
|
|
332
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
315
333
|
article.source
|
|
316
334
|
),
|
|
317
|
-
|
|
318
|
-
'
|
|
319
|
-
{
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
335
|
+
React__default.createElement(
|
|
336
|
+
'div',
|
|
337
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
338
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
339
|
+
'p',
|
|
340
|
+
{
|
|
341
|
+
className: 'article-category',
|
|
342
|
+
style: {
|
|
343
|
+
background: '#3FB618',
|
|
344
|
+
color: '#ffffff',
|
|
345
|
+
marginBottom: '.25rem',
|
|
346
|
+
display: 'inline-block',
|
|
347
|
+
padding: '0 .25rem',
|
|
348
|
+
fontSize: '.8rem'
|
|
349
|
+
} },
|
|
350
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
351
|
+
),
|
|
352
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
353
|
+
'p',
|
|
354
|
+
{
|
|
355
|
+
className: 'issueSection',
|
|
356
|
+
style: {
|
|
357
|
+
background: '#000000 !important',
|
|
358
|
+
color: '#ffffff',
|
|
359
|
+
marginBottom: '.25rem',
|
|
360
|
+
marginLeft: '.25rem',
|
|
361
|
+
display: 'inline-block',
|
|
362
|
+
padding: '0 .25rem',
|
|
363
|
+
fontSize: '.8rem'
|
|
364
|
+
} },
|
|
365
|
+
article.issueSection.name
|
|
366
|
+
)
|
|
329
367
|
),
|
|
330
368
|
article.summary && React__default.createElement(
|
|
331
369
|
'p',
|
|
@@ -396,22 +434,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
396
434
|
)
|
|
397
435
|
),
|
|
398
436
|
article.source && React__default.createElement(
|
|
399
|
-
'
|
|
400
|
-
{ className: '
|
|
437
|
+
'div',
|
|
438
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
401
439
|
article.source
|
|
402
440
|
),
|
|
403
|
-
|
|
404
|
-
'
|
|
405
|
-
{
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
441
|
+
React__default.createElement(
|
|
442
|
+
'div',
|
|
443
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
444
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
445
|
+
'p',
|
|
446
|
+
{
|
|
447
|
+
className: 'article-category',
|
|
448
|
+
style: {
|
|
449
|
+
background: '#3FB618',
|
|
450
|
+
color: '#ffffff',
|
|
451
|
+
marginBottom: '.25rem',
|
|
452
|
+
display: 'inline-block',
|
|
453
|
+
padding: '0 .25rem',
|
|
454
|
+
fontSize: '.8rem'
|
|
455
|
+
} },
|
|
456
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
457
|
+
),
|
|
458
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
459
|
+
'p',
|
|
460
|
+
{
|
|
461
|
+
className: 'issueSection',
|
|
462
|
+
style: {
|
|
463
|
+
background: '#000000 !important',
|
|
464
|
+
color: '#ffffff',
|
|
465
|
+
marginBottom: '.25rem',
|
|
466
|
+
marginLeft: '.25rem',
|
|
467
|
+
display: 'inline-block',
|
|
468
|
+
padding: '0 .25rem',
|
|
469
|
+
fontSize: '.8rem'
|
|
470
|
+
} },
|
|
471
|
+
article.issueSection.name
|
|
472
|
+
)
|
|
415
473
|
),
|
|
416
474
|
article.summary && React__default.createElement(
|
|
417
475
|
'p',
|
|
@@ -439,7 +497,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
439
497
|
React__default.createElement(
|
|
440
498
|
'style',
|
|
441
499
|
{ jsx: 'true' },
|
|
442
|
-
'\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
500
|
+
'\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
443
501
|
)
|
|
444
502
|
);
|
|
445
503
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -14972,6 +14972,72 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
14972
14972
|
);
|
|
14973
14973
|
};
|
|
14974
14974
|
|
|
14975
|
+
/* usage
|
|
14976
|
+
import Settings, { Ads } from '../../../../settings'
|
|
14977
|
+
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
14978
|
+
import client from '../../../../client'
|
|
14979
|
+
import moment from 'moment'
|
|
14980
|
+
import Shell from '../../../../components/2.0/Shell'
|
|
14981
|
+
import { pageview } from '../../../../utilities/gtag'
|
|
14982
|
+
|
|
14983
|
+
const Issue = (props) => {
|
|
14984
|
+
const { pubIssue, cache } = props
|
|
14985
|
+
const targeting = {
|
|
14986
|
+
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
14987
|
+
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
14988
|
+
}
|
|
14989
|
+
return (
|
|
14990
|
+
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
14991
|
+
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
14992
|
+
</Shell>
|
|
14993
|
+
)
|
|
14994
|
+
}
|
|
14995
|
+
|
|
14996
|
+
Issue.getInitialProps = async (ctx) => {
|
|
14997
|
+
const { query } = ctx
|
|
14998
|
+
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
14999
|
+
)
|
|
15000
|
+
return { pubIssue }
|
|
15001
|
+
}
|
|
15002
|
+
|
|
15003
|
+
export default Issue
|
|
15004
|
+
*/
|
|
15005
|
+
|
|
15006
|
+
var IssueLanding = function IssueLanding(props) {
|
|
15007
|
+
var pubIssue = props.pubIssue,
|
|
15008
|
+
client = props.client,
|
|
15009
|
+
settings = props.settings,
|
|
15010
|
+
pageview = props.pageview,
|
|
15011
|
+
rightItems = props.rightItems;
|
|
15012
|
+
|
|
15013
|
+
return React__default.createElement(
|
|
15014
|
+
'div',
|
|
15015
|
+
{ id: 'issueLanding' },
|
|
15016
|
+
React__default.createElement(Breadcrumbs$1, null),
|
|
15017
|
+
pubIssue.issue.displayLabel && React__default.createElement(
|
|
15018
|
+
'p',
|
|
15019
|
+
{ className: 'badge badge-primary' },
|
|
15020
|
+
pubIssue.issue.name
|
|
15021
|
+
),
|
|
15022
|
+
React__default.createElement(QueueDeckExpanded, {
|
|
15023
|
+
client: client,
|
|
15024
|
+
mapping: settings.mapping,
|
|
15025
|
+
dataRecord: pubIssue.issue.articles,
|
|
15026
|
+
seoPaginate: true,
|
|
15027
|
+
pageview: pageview,
|
|
15028
|
+
columns: 'rotate',
|
|
15029
|
+
variant: 'top',
|
|
15030
|
+
autoScroll: true,
|
|
15031
|
+
defaultImage: settings.logo,
|
|
15032
|
+
showPublished: true,
|
|
15033
|
+
showCategory: true,
|
|
15034
|
+
imageHeight: 270,
|
|
15035
|
+
imageWidth: 480,
|
|
15036
|
+
rightItems: rightItems
|
|
15037
|
+
})
|
|
15038
|
+
);
|
|
15039
|
+
};
|
|
15040
|
+
|
|
14975
15041
|
var PopUpModal = function PopUpModal(props) {
|
|
14976
15042
|
var _ref = props.ModalImage ? React.useState(true) : React.useState(false),
|
|
14977
15043
|
_ref2 = slicedToArray._slicedToArray(_ref, 2),
|
|
@@ -17269,14 +17335,10 @@ var Article = function Article(props) {
|
|
|
17269
17335
|
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix)
|
|
17270
17336
|
);
|
|
17271
17337
|
}),
|
|
17272
|
-
React__default.createElement(
|
|
17338
|
+
props.article.source && React__default.createElement(
|
|
17273
17339
|
'div',
|
|
17274
|
-
|
|
17275
|
-
source
|
|
17276
|
-
'p',
|
|
17277
|
-
null,
|
|
17278
|
-
source
|
|
17279
|
-
)
|
|
17340
|
+
{ className: 'sanityDisplayLabel' },
|
|
17341
|
+
props.article.source
|
|
17280
17342
|
),
|
|
17281
17343
|
issue && React__default.createElement(
|
|
17282
17344
|
'div',
|
|
@@ -17370,7 +17432,12 @@ var Article = function Article(props) {
|
|
|
17370
17432
|
}
|
|
17371
17433
|
}),
|
|
17372
17434
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
17373
|
-
React__default.createElement('hr', { className: 'article-seperater' })
|
|
17435
|
+
React__default.createElement('hr', { className: 'article-seperater' }),
|
|
17436
|
+
React__default.createElement(
|
|
17437
|
+
'style',
|
|
17438
|
+
{ jsx: 'true' },
|
|
17439
|
+
'\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
|
|
17440
|
+
)
|
|
17374
17441
|
);
|
|
17375
17442
|
};
|
|
17376
17443
|
|
|
@@ -22815,6 +22882,8 @@ var getQuery = function getQuery(type) {
|
|
|
22815
22882
|
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 }';
|
|
22816
22883
|
case 'publication':
|
|
22817
22884
|
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 }';
|
|
22885
|
+
case 'issue':
|
|
22886
|
+
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 }';
|
|
22818
22887
|
}
|
|
22819
22888
|
};
|
|
22820
22889
|
|
|
@@ -22872,6 +22941,7 @@ exports.GridHero = GridHero;
|
|
|
22872
22941
|
exports.Hero = Hero;
|
|
22873
22942
|
exports.HighlightenVideo = HighlightenVideo;
|
|
22874
22943
|
exports.HorizontalHero = HorizontalHero;
|
|
22944
|
+
exports.IssueLanding = IssueLanding;
|
|
22875
22945
|
exports.KMTracker = KMTracker;
|
|
22876
22946
|
exports.OncliveHero = OncliveHero;
|
|
22877
22947
|
exports.OncliveLargeHero = OncliveLargeHero;
|
|
@@ -78,7 +78,6 @@ var loadData = function loadData(values, query, client, params, setData, setScro
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
var changePageNumber = function changePageNumber(pageNumber, seoPaginate, pageview, router, currentPage, setCurrentPage, itemsPerPage, itemIndex) {
|
|
81
|
-
|
|
82
81
|
if (seoPaginate) {
|
|
83
82
|
var path = router.asPath;
|
|
84
83
|
var qrIndex = path.indexOf('?');
|
|
@@ -227,23 +226,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
227
226
|
React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
228
227
|
),
|
|
229
228
|
article.source && React__default.createElement(
|
|
230
|
-
'
|
|
231
|
-
{ className: '
|
|
229
|
+
'div',
|
|
230
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
232
231
|
article.source
|
|
233
232
|
),
|
|
234
|
-
|
|
235
|
-
'
|
|
236
|
-
{
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
233
|
+
React__default.createElement(
|
|
234
|
+
'div',
|
|
235
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
236
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
237
|
+
'p',
|
|
238
|
+
{
|
|
239
|
+
className: 'article-category',
|
|
240
|
+
style: {
|
|
241
|
+
background: '#3FB618',
|
|
242
|
+
color: '#ffffff',
|
|
243
|
+
marginBottom: '.25rem',
|
|
244
|
+
display: 'inline-block',
|
|
245
|
+
padding: '0 .25rem',
|
|
246
|
+
fontSize: '.8rem'
|
|
247
|
+
} },
|
|
248
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
249
|
+
),
|
|
250
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
251
|
+
'p',
|
|
252
|
+
{
|
|
253
|
+
className: 'issueSection',
|
|
254
|
+
style: {
|
|
255
|
+
background: '#000000 !important',
|
|
256
|
+
color: '#ffffff',
|
|
257
|
+
marginBottom: '.25rem',
|
|
258
|
+
marginLeft: '.25rem',
|
|
259
|
+
display: 'inline-block',
|
|
260
|
+
padding: '0 .25rem',
|
|
261
|
+
fontSize: '.8rem'
|
|
262
|
+
} },
|
|
263
|
+
article.issueSection.name
|
|
264
|
+
)
|
|
247
265
|
),
|
|
248
266
|
article.summary && React__default.createElement(
|
|
249
267
|
'p',
|
|
@@ -304,22 +322,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
304
322
|
React__default.createElement(AuthorComponent, { key: index.toString(), index: index, authors: article.authorMapping })
|
|
305
323
|
),
|
|
306
324
|
article.source && React__default.createElement(
|
|
307
|
-
'
|
|
308
|
-
{ className: '
|
|
325
|
+
'div',
|
|
326
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
309
327
|
article.source
|
|
310
328
|
),
|
|
311
|
-
|
|
312
|
-
'
|
|
313
|
-
{
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
329
|
+
React__default.createElement(
|
|
330
|
+
'div',
|
|
331
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
332
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
333
|
+
'p',
|
|
334
|
+
{
|
|
335
|
+
className: 'article-category',
|
|
336
|
+
style: {
|
|
337
|
+
background: '#3FB618',
|
|
338
|
+
color: '#ffffff',
|
|
339
|
+
marginBottom: '.25rem',
|
|
340
|
+
display: 'inline-block',
|
|
341
|
+
padding: '0 .25rem',
|
|
342
|
+
fontSize: '.8rem'
|
|
343
|
+
} },
|
|
344
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
345
|
+
),
|
|
346
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
347
|
+
'p',
|
|
348
|
+
{
|
|
349
|
+
className: 'issueSection',
|
|
350
|
+
style: {
|
|
351
|
+
background: '#000000 !important',
|
|
352
|
+
color: '#ffffff',
|
|
353
|
+
marginBottom: '.25rem',
|
|
354
|
+
marginLeft: '.25rem',
|
|
355
|
+
display: 'inline-block',
|
|
356
|
+
padding: '0 .25rem',
|
|
357
|
+
fontSize: '.8rem'
|
|
358
|
+
} },
|
|
359
|
+
article.issueSection.name
|
|
360
|
+
)
|
|
323
361
|
),
|
|
324
362
|
article.summary && React__default.createElement(
|
|
325
363
|
'p',
|
|
@@ -390,22 +428,42 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
390
428
|
)
|
|
391
429
|
),
|
|
392
430
|
article.source && React__default.createElement(
|
|
393
|
-
'
|
|
394
|
-
{ className: '
|
|
431
|
+
'div',
|
|
432
|
+
{ className: 'mb-1 sanityDisplayLabel' },
|
|
395
433
|
article.source
|
|
396
434
|
),
|
|
397
|
-
|
|
398
|
-
'
|
|
399
|
-
{
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
435
|
+
React__default.createElement(
|
|
436
|
+
'div',
|
|
437
|
+
{ style: { display: 'flex', alignItems: 'center', justifyContent: 'flex-start' } },
|
|
438
|
+
showCategory && article.contentCategory && React__default.createElement(
|
|
439
|
+
'p',
|
|
440
|
+
{
|
|
441
|
+
className: 'article-category',
|
|
442
|
+
style: {
|
|
443
|
+
background: '#3FB618',
|
|
444
|
+
color: '#ffffff',
|
|
445
|
+
marginBottom: '.25rem',
|
|
446
|
+
display: 'inline-block',
|
|
447
|
+
padding: '0 .25rem',
|
|
448
|
+
fontSize: '.8rem'
|
|
449
|
+
} },
|
|
450
|
+
article.contentCategory.name.slice(0, article.contentCategory.name.length - 1)
|
|
451
|
+
),
|
|
452
|
+
article.issueSection && article.issueSection.name && React__default.createElement(
|
|
453
|
+
'p',
|
|
454
|
+
{
|
|
455
|
+
className: 'issueSection',
|
|
456
|
+
style: {
|
|
457
|
+
background: '#000000 !important',
|
|
458
|
+
color: '#ffffff',
|
|
459
|
+
marginBottom: '.25rem',
|
|
460
|
+
marginLeft: '.25rem',
|
|
461
|
+
display: 'inline-block',
|
|
462
|
+
padding: '0 .25rem',
|
|
463
|
+
fontSize: '.8rem'
|
|
464
|
+
} },
|
|
465
|
+
article.issueSection.name
|
|
466
|
+
)
|
|
409
467
|
),
|
|
410
468
|
article.summary && React__default.createElement(
|
|
411
469
|
'p',
|
|
@@ -433,7 +491,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
433
491
|
React__default.createElement(
|
|
434
492
|
'style',
|
|
435
493
|
{ jsx: 'true' },
|
|
436
|
-
'\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
494
|
+
'\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
437
495
|
)
|
|
438
496
|
);
|
|
439
497
|
};
|
package/dist/esm/index.js
CHANGED
|
@@ -44,6 +44,7 @@ import GroupDeck from './GroupDeck.js';
|
|
|
44
44
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
45
45
|
export { default as YoutubeGroup } from './YoutubeGroup.js';
|
|
46
46
|
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Carousel, Table, Figure as Figure$1, Button as Button$1, ProgressBar, Card as Card$1, Form } from 'react-bootstrap';
|
|
47
|
+
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
47
48
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
48
49
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|
|
49
50
|
export { default as VideoSeriesListing } from './VideoSeriesListing.js';
|
|
@@ -14969,6 +14970,72 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
14969
14970
|
);
|
|
14970
14971
|
};
|
|
14971
14972
|
|
|
14973
|
+
/* usage
|
|
14974
|
+
import Settings, { Ads } from '../../../../settings'
|
|
14975
|
+
import { IssueLanding, getQuery } from '@mjhls/mjh-framework'
|
|
14976
|
+
import client from '../../../../client'
|
|
14977
|
+
import moment from 'moment'
|
|
14978
|
+
import Shell from '../../../../components/2.0/Shell'
|
|
14979
|
+
import { pageview } from '../../../../utilities/gtag'
|
|
14980
|
+
|
|
14981
|
+
const Issue = (props) => {
|
|
14982
|
+
const { pubIssue, cache } = props
|
|
14983
|
+
const targeting = {
|
|
14984
|
+
content_placement: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
14985
|
+
document_url: [`/publications/${pubIssue.identifier.current}/${pubIssue.issue.identifier.current}`],
|
|
14986
|
+
}
|
|
14987
|
+
return (
|
|
14988
|
+
<Shell cache={cache} settings={Settings} targeting={targeting} ads={Ads} layout='3' title={pubIssue.issue.name}>
|
|
14989
|
+
<IssueLanding pubIssue={pubIssue} client={client} settings={Settings} pageview={pageview} rightItems={Ads.getMobileAds(targeting)} />
|
|
14990
|
+
</Shell>
|
|
14991
|
+
)
|
|
14992
|
+
}
|
|
14993
|
+
|
|
14994
|
+
Issue.getInitialProps = async (ctx) => {
|
|
14995
|
+
const { query } = ctx
|
|
14996
|
+
const pubIssue = await client.fetch(getQuery('issue'), { ...query, currentDate: moment().utc().format() }
|
|
14997
|
+
)
|
|
14998
|
+
return { pubIssue }
|
|
14999
|
+
}
|
|
15000
|
+
|
|
15001
|
+
export default Issue
|
|
15002
|
+
*/
|
|
15003
|
+
|
|
15004
|
+
var IssueLanding = function IssueLanding(props) {
|
|
15005
|
+
var pubIssue = props.pubIssue,
|
|
15006
|
+
client = props.client,
|
|
15007
|
+
settings = props.settings,
|
|
15008
|
+
pageview = props.pageview,
|
|
15009
|
+
rightItems = props.rightItems;
|
|
15010
|
+
|
|
15011
|
+
return React__default.createElement(
|
|
15012
|
+
'div',
|
|
15013
|
+
{ id: 'issueLanding' },
|
|
15014
|
+
React__default.createElement(Breadcrumbs$1, null),
|
|
15015
|
+
pubIssue.issue.displayLabel && React__default.createElement(
|
|
15016
|
+
'p',
|
|
15017
|
+
{ className: 'badge badge-primary' },
|
|
15018
|
+
pubIssue.issue.name
|
|
15019
|
+
),
|
|
15020
|
+
React__default.createElement(QueueDeckExpanded, {
|
|
15021
|
+
client: client,
|
|
15022
|
+
mapping: settings.mapping,
|
|
15023
|
+
dataRecord: pubIssue.issue.articles,
|
|
15024
|
+
seoPaginate: true,
|
|
15025
|
+
pageview: pageview,
|
|
15026
|
+
columns: 'rotate',
|
|
15027
|
+
variant: 'top',
|
|
15028
|
+
autoScroll: true,
|
|
15029
|
+
defaultImage: settings.logo,
|
|
15030
|
+
showPublished: true,
|
|
15031
|
+
showCategory: true,
|
|
15032
|
+
imageHeight: 270,
|
|
15033
|
+
imageWidth: 480,
|
|
15034
|
+
rightItems: rightItems
|
|
15035
|
+
})
|
|
15036
|
+
);
|
|
15037
|
+
};
|
|
15038
|
+
|
|
14972
15039
|
var PopUpModal = function PopUpModal(props) {
|
|
14973
15040
|
var _ref = props.ModalImage ? useState(true) : useState(false),
|
|
14974
15041
|
_ref2 = _slicedToArray(_ref, 2),
|
|
@@ -17266,14 +17333,10 @@ var Article = function Article(props) {
|
|
|
17266
17333
|
renderAuthor(authorDetail.displayName, authorDetail.url, index, authorDetails.length, authorPrefix)
|
|
17267
17334
|
);
|
|
17268
17335
|
}),
|
|
17269
|
-
React__default.createElement(
|
|
17336
|
+
props.article.source && React__default.createElement(
|
|
17270
17337
|
'div',
|
|
17271
|
-
|
|
17272
|
-
source
|
|
17273
|
-
'p',
|
|
17274
|
-
null,
|
|
17275
|
-
source
|
|
17276
|
-
)
|
|
17338
|
+
{ className: 'sanityDisplayLabel' },
|
|
17339
|
+
props.article.source
|
|
17277
17340
|
),
|
|
17278
17341
|
issue && React__default.createElement(
|
|
17279
17342
|
'div',
|
|
@@ -17367,7 +17430,12 @@ var Article = function Article(props) {
|
|
|
17367
17430
|
}
|
|
17368
17431
|
}),
|
|
17369
17432
|
React__default.createElement('div', { className: 'clearfix', style: { minHeight: '1px' } }),
|
|
17370
|
-
React__default.createElement('hr', { className: 'article-seperater' })
|
|
17433
|
+
React__default.createElement('hr', { className: 'article-seperater' }),
|
|
17434
|
+
React__default.createElement(
|
|
17435
|
+
'style',
|
|
17436
|
+
{ jsx: 'true' },
|
|
17437
|
+
'\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n }\n '
|
|
17438
|
+
)
|
|
17371
17439
|
);
|
|
17372
17440
|
};
|
|
17373
17441
|
|
|
@@ -22812,7 +22880,9 @@ var getQuery = function getQuery(type) {
|
|
|
22812
22880
|
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 }';
|
|
22813
22881
|
case 'publication':
|
|
22814
22882
|
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 }';
|
|
22883
|
+
case 'issue':
|
|
22884
|
+
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 }';
|
|
22815
22885
|
}
|
|
22816
22886
|
};
|
|
22817
22887
|
|
|
22818
|
-
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, PopUpModal, PublicationLanding, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, View, YahooHero, getKeywords, getQuery, getSerializers, getSeriesDetail, getTargeting, urlFor$5 as urlFor };
|
|
22888
|
+
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList, ArticleQueue, auth as Auth, Breadcrumbs$1 as Breadcrumbs, CMEDeck, ConferenceArticleCard, EventsDeck, Feature, fbsHero as ForbesHero, GridHero, Hero, HighlightenVideo, HorizontalHero, IssueLanding, KMTracker, OncliveHero, OncliveLargeHero, PdfDownload, PopUpModal, PublicationLanding, RelatedContent, RelatedTopicsDropdown, SetCookie, SocialShare$1 as SocialShare, VerticalHero, View, YahooHero, getKeywords, getQuery, getSerializers, getSeriesDetail, getTargeting, urlFor$5 as urlFor };
|