@mjhls/mjh-framework 1.0.420 → 1.0.422
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/index.js +82 -75
- package/dist/esm/index.js +83 -75
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -13636,6 +13636,20 @@ var Figure = dynamic(function () {
|
|
|
13636
13636
|
return Promise.resolve().then(function () { return require('./Figure-9e886c5b.js'); });
|
|
13637
13637
|
}, { ssr: false });
|
|
13638
13638
|
|
|
13639
|
+
var ScrollToElement = function ScrollToElement(elementId) {
|
|
13640
|
+
var element = document.getElementById(elementId);
|
|
13641
|
+
if (element) {
|
|
13642
|
+
var elDistanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
|
|
13643
|
+
var header = document.getElementsByTagName('header')[0];
|
|
13644
|
+
if (header) {
|
|
13645
|
+
var headerHeight = header.offsetHeight;
|
|
13646
|
+
window.scrollTo(0, elDistanceToTop - headerHeight);
|
|
13647
|
+
} else {
|
|
13648
|
+
window.scrollTo(0, elDistanceToTop);
|
|
13649
|
+
}
|
|
13650
|
+
}
|
|
13651
|
+
};
|
|
13652
|
+
|
|
13639
13653
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
13640
13654
|
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)/i.test(url)) {
|
|
13641
13655
|
return true;
|
|
@@ -13806,10 +13820,12 @@ var getSerializers = function getSerializers() {
|
|
|
13806
13820
|
|
|
13807
13821
|
if (href && href.charAt(0) === '#') {
|
|
13808
13822
|
var elementId = href.slice(1);
|
|
13809
|
-
|
|
13823
|
+
if (articleId) elementId = elementId + '-' + articleId;
|
|
13810
13824
|
return React__default.createElement(
|
|
13811
13825
|
'a',
|
|
13812
|
-
{
|
|
13826
|
+
{ onClick: function onClick() {
|
|
13827
|
+
return ScrollToElement(elementId);
|
|
13828
|
+
} },
|
|
13813
13829
|
children
|
|
13814
13830
|
);
|
|
13815
13831
|
}
|
|
@@ -14332,71 +14348,6 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14332
14348
|
}
|
|
14333
14349
|
};
|
|
14334
14350
|
|
|
14335
|
-
/*
|
|
14336
|
-
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14337
|
-
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14338
|
-
|
|
14339
|
-
- accepts any normal html arrtibute (style, id, class)
|
|
14340
|
-
|
|
14341
|
-
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14342
|
-
|
|
14343
|
-
'content_placement': taxonomyMapping[]-> {
|
|
14344
|
-
...,
|
|
14345
|
-
'ancestor': parent->parent->identifier,
|
|
14346
|
-
'parent': parent->identifier,
|
|
14347
|
-
'path': identifier
|
|
14348
|
-
},
|
|
14349
|
-
'document_group': documentGroup-> {
|
|
14350
|
-
name,
|
|
14351
|
-
'parent': parent->identifier,
|
|
14352
|
-
'path': identifier.current
|
|
14353
|
-
}
|
|
14354
|
-
*/
|
|
14355
|
-
|
|
14356
|
-
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
14357
|
-
var article = props.article,
|
|
14358
|
-
_props$exclude = props.exclude,
|
|
14359
|
-
exclude = _props$exclude === undefined ? [] : _props$exclude;
|
|
14360
|
-
|
|
14361
|
-
var _props = _extends$2._extends({}, props);
|
|
14362
|
-
delete _props.article;
|
|
14363
|
-
delete _props.exclude;
|
|
14364
|
-
return React__default.createElement(
|
|
14365
|
-
Dropdown,
|
|
14366
|
-
null,
|
|
14367
|
-
React__default.createElement(
|
|
14368
|
-
Dropdown.Toggle,
|
|
14369
|
-
_props,
|
|
14370
|
-
'Related Topics'
|
|
14371
|
-
),
|
|
14372
|
-
React__default.createElement(
|
|
14373
|
-
Dropdown.Menu,
|
|
14374
|
-
null,
|
|
14375
|
-
article.document_group && React__default.createElement(
|
|
14376
|
-
Dropdown.Item,
|
|
14377
|
-
{ href: '/' + article.document_group.parent.current + '/' + article.document_group.path },
|
|
14378
|
-
article.document_group.name
|
|
14379
|
-
),
|
|
14380
|
-
article.content_placement && article.content_placement.length > 0 && article.content_placement.map(function (cp, i) {
|
|
14381
|
-
if (exclude.includes(cp.name)) return;
|
|
14382
|
-
var href = '';
|
|
14383
|
-
if (cp.ancestor) {
|
|
14384
|
-
href = '/' + cp.ancestor + '/' + cp.identifier;
|
|
14385
|
-
} else if (cp.parent) {
|
|
14386
|
-
href = '/' + cp.parent + '/' + cp.identifier;
|
|
14387
|
-
} else {
|
|
14388
|
-
href = '/' + cp.identifier;
|
|
14389
|
-
}
|
|
14390
|
-
return React__default.createElement(
|
|
14391
|
-
Dropdown.Item,
|
|
14392
|
-
{ key: i, href: href },
|
|
14393
|
-
cp.name
|
|
14394
|
-
);
|
|
14395
|
-
})
|
|
14396
|
-
)
|
|
14397
|
-
);
|
|
14398
|
-
};
|
|
14399
|
-
|
|
14400
14351
|
var HighlightenVideo = function HighlightenVideo(_ref) {
|
|
14401
14352
|
var highlightVideoOptions = _ref.highlightVideoOptions;
|
|
14402
14353
|
var accountId = highlightVideoOptions.accountId,
|
|
@@ -21766,6 +21717,56 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
21766
21717
|
};
|
|
21767
21718
|
|
|
21768
21719
|
var Article$1 = function Article(props) {
|
|
21720
|
+
var onVote = function () {
|
|
21721
|
+
var _ref = AdSlot._asyncToGenerator( /*#__PURE__*/AdSlot.regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
21722
|
+
var response, result;
|
|
21723
|
+
return AdSlot.regenerator.wrap(function _callee$(_context) {
|
|
21724
|
+
while (1) {
|
|
21725
|
+
switch (_context.prev = _context.next) {
|
|
21726
|
+
case 0:
|
|
21727
|
+
_context.next = 2;
|
|
21728
|
+
return fetch('/api/polls/vote', {
|
|
21729
|
+
method: 'POST',
|
|
21730
|
+
headers: { 'Content-Type': 'application/json' },
|
|
21731
|
+
body: AdSlot._JSON$stringify({ articleId: props.article._id, nodeKey: nodeKey, selectedChoice: selectedChoice, body: articleBody })
|
|
21732
|
+
});
|
|
21733
|
+
|
|
21734
|
+
case 2:
|
|
21735
|
+
response = _context.sent;
|
|
21736
|
+
|
|
21737
|
+
if (!response.ok) {
|
|
21738
|
+
_context.next = 11;
|
|
21739
|
+
break;
|
|
21740
|
+
}
|
|
21741
|
+
|
|
21742
|
+
_context.next = 6;
|
|
21743
|
+
return response.json();
|
|
21744
|
+
|
|
21745
|
+
case 6:
|
|
21746
|
+
result = _context.sent;
|
|
21747
|
+
|
|
21748
|
+
setShowVotes(true);
|
|
21749
|
+
|
|
21750
|
+
console.log('Voted successfully');
|
|
21751
|
+
_context.next = 12;
|
|
21752
|
+
break;
|
|
21753
|
+
|
|
21754
|
+
case 11:
|
|
21755
|
+
console.log('Unable to vote!');
|
|
21756
|
+
|
|
21757
|
+
case 12:
|
|
21758
|
+
case 'end':
|
|
21759
|
+
return _context.stop();
|
|
21760
|
+
}
|
|
21761
|
+
}
|
|
21762
|
+
}, _callee, this);
|
|
21763
|
+
}));
|
|
21764
|
+
|
|
21765
|
+
return function onVote(_x, _x2) {
|
|
21766
|
+
return _ref.apply(this, arguments);
|
|
21767
|
+
};
|
|
21768
|
+
}();
|
|
21769
|
+
|
|
21769
21770
|
var article = props.article;
|
|
21770
21771
|
var client = props.client,
|
|
21771
21772
|
pageview = props.pageview,
|
|
@@ -21789,6 +21790,7 @@ var Article$1 = function Article(props) {
|
|
|
21789
21790
|
var url = _props$article$url.current,
|
|
21790
21791
|
issue = _props$article.issue,
|
|
21791
21792
|
source = _props$article.source,
|
|
21793
|
+
documentGroup = _props$article.documentGroup,
|
|
21792
21794
|
regionalPages = props.regionalPages,
|
|
21793
21795
|
nationalPage = props.nationalPage,
|
|
21794
21796
|
ISIContent = props.ISIContent,
|
|
@@ -21841,7 +21843,7 @@ var Article$1 = function Article(props) {
|
|
|
21841
21843
|
};
|
|
21842
21844
|
|
|
21843
21845
|
var renderRelevantTopicsDropdown = function renderRelevantTopicsDropdown() {
|
|
21844
|
-
if (content_placement && content_placement.length > 0) {
|
|
21846
|
+
if (content_placement && content_placement.length > 0 || documentGroup) {
|
|
21845
21847
|
return React__default.createElement(
|
|
21846
21848
|
Dropdown,
|
|
21847
21849
|
null,
|
|
@@ -21853,6 +21855,11 @@ var Article$1 = function Article(props) {
|
|
|
21853
21855
|
React__default.createElement(
|
|
21854
21856
|
Dropdown.Menu,
|
|
21855
21857
|
null,
|
|
21858
|
+
documentGroup && documentGroup.parent && React__default.createElement(
|
|
21859
|
+
Dropdown.Item,
|
|
21860
|
+
{ href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
21861
|
+
documentGroup.name
|
|
21862
|
+
),
|
|
21856
21863
|
content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
21857
21864
|
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
21858
21865
|
var href = '/' + cp_url;
|
|
@@ -21867,6 +21874,7 @@ var Article$1 = function Article(props) {
|
|
|
21867
21874
|
}
|
|
21868
21875
|
return null;
|
|
21869
21876
|
};
|
|
21877
|
+
|
|
21870
21878
|
var form = function form() {
|
|
21871
21879
|
return React__default.createElement(
|
|
21872
21880
|
React__default.Fragment,
|
|
@@ -21986,7 +21994,7 @@ var Article$1 = function Article(props) {
|
|
|
21986
21994
|
React__default.Fragment,
|
|
21987
21995
|
null,
|
|
21988
21996
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
21989
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
21997
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
21990
21998
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, selectedIndex))),
|
|
21991
21999
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
21992
22000
|
}, client.config())),
|
|
@@ -22003,7 +22011,7 @@ var Article$1 = function Article(props) {
|
|
|
22003
22011
|
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
22004
22012
|
),
|
|
22005
22013
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
22006
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22014
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22007
22015
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(selectedIndex))),
|
|
22008
22016
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22009
22017
|
}, client.config()))
|
|
@@ -22077,7 +22085,7 @@ var Article$1 = function Article(props) {
|
|
|
22077
22085
|
React__default.Fragment,
|
|
22078
22086
|
null,
|
|
22079
22087
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
22080
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22088
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
22081
22089
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(0, _selectedIndex2))),
|
|
22082
22090
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22083
22091
|
}, client.config())),
|
|
@@ -22088,14 +22096,14 @@ var Article$1 = function Article(props) {
|
|
|
22088
22096
|
React__default.createElement(AdSlot.DFPAdSlot, _extends$2._extends({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
22089
22097
|
),
|
|
22090
22098
|
React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
22091
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22099
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22092
22100
|
blocks: [].concat(toConsumableArray._toConsumableArray(body.slice(_selectedIndex2))),
|
|
22093
22101
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22094
22102
|
}, client.config()))
|
|
22095
22103
|
);
|
|
22096
22104
|
} else {
|
|
22097
22105
|
return React__default.createElement(TaxonomyCard.BlockContent, _extends$2._extends({
|
|
22098
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22106
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22099
22107
|
blocks: articleBody,
|
|
22100
22108
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22101
22109
|
}, client.config()));
|
|
@@ -22211,7 +22219,7 @@ var Article$1 = function Article(props) {
|
|
|
22211
22219
|
null,
|
|
22212
22220
|
source && React__default.createElement(
|
|
22213
22221
|
'p',
|
|
22214
|
-
|
|
22222
|
+
{ style: { display: 'inline-block', padding: '0 .25rem', color: 'var(--franchise-primary, #484848)', borderRadius: '2px', fontWeight: 'bold', border: '2px solid var(--franchise-primary, #484848)' }, className: 'source-label' },
|
|
22215
22223
|
source
|
|
22216
22224
|
)
|
|
22217
22225
|
),
|
|
@@ -22842,7 +22850,6 @@ exports.ADWelcome = ADWelcome;
|
|
|
22842
22850
|
exports.AccordionPanel = AccordionPanel;
|
|
22843
22851
|
exports.AdSlotsProvider = AdSlotsProvider;
|
|
22844
22852
|
exports.AlphabeticList = AlphabeticList;
|
|
22845
|
-
exports.ArticleDetailDropdown = ArticleDetailDropdown;
|
|
22846
22853
|
exports.ArticleQueue = ArticleQueue;
|
|
22847
22854
|
exports.Auth = auth;
|
|
22848
22855
|
exports.Breadcrumbs = Breadcrumbs$1;
|
package/dist/esm/index.js
CHANGED
|
@@ -13633,6 +13633,20 @@ var Figure = dynamic(function () {
|
|
|
13633
13633
|
return import('./Figure-cc1affbe.js');
|
|
13634
13634
|
}, { ssr: false });
|
|
13635
13635
|
|
|
13636
|
+
var ScrollToElement = function ScrollToElement(elementId) {
|
|
13637
|
+
var element = document.getElementById(elementId);
|
|
13638
|
+
if (element) {
|
|
13639
|
+
var elDistanceToTop = window.pageYOffset + element.getBoundingClientRect().top;
|
|
13640
|
+
var header = document.getElementsByTagName('header')[0];
|
|
13641
|
+
if (header) {
|
|
13642
|
+
var headerHeight = header.offsetHeight;
|
|
13643
|
+
window.scrollTo(0, elDistanceToTop - headerHeight);
|
|
13644
|
+
} else {
|
|
13645
|
+
window.scrollTo(0, elDistanceToTop);
|
|
13646
|
+
}
|
|
13647
|
+
}
|
|
13648
|
+
};
|
|
13649
|
+
|
|
13636
13650
|
var checkUrlIsExternal = function checkUrlIsExternal(url) {
|
|
13637
13651
|
if (/https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})|(^mailto)/i.test(url)) {
|
|
13638
13652
|
return true;
|
|
@@ -13803,10 +13817,12 @@ var getSerializers = function getSerializers() {
|
|
|
13803
13817
|
|
|
13804
13818
|
if (href && href.charAt(0) === '#') {
|
|
13805
13819
|
var elementId = href.slice(1);
|
|
13806
|
-
|
|
13820
|
+
if (articleId) elementId = elementId + '-' + articleId;
|
|
13807
13821
|
return React__default.createElement(
|
|
13808
13822
|
'a',
|
|
13809
|
-
{
|
|
13823
|
+
{ onClick: function onClick() {
|
|
13824
|
+
return ScrollToElement(elementId);
|
|
13825
|
+
} },
|
|
13810
13826
|
children
|
|
13811
13827
|
);
|
|
13812
13828
|
}
|
|
@@ -14329,71 +14345,6 @@ var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
|
14329
14345
|
}
|
|
14330
14346
|
};
|
|
14331
14347
|
|
|
14332
|
-
/*
|
|
14333
|
-
This dropdown is used inside Article body to display related content placement and document group pages
|
|
14334
|
-
sample usage: <ArticleDetailDropdown article={props.article} exclude={['News']} style={{ backgroundColor: 'var(--primary)', border: 0 }} />
|
|
14335
|
-
|
|
14336
|
-
- accepts any normal html arrtibute (style, id, class)
|
|
14337
|
-
|
|
14338
|
-
- in article query, need to add '...' to content_placement to retreive additional info needed, and document_group to retrieve group data if available
|
|
14339
|
-
|
|
14340
|
-
'content_placement': taxonomyMapping[]-> {
|
|
14341
|
-
...,
|
|
14342
|
-
'ancestor': parent->parent->identifier,
|
|
14343
|
-
'parent': parent->identifier,
|
|
14344
|
-
'path': identifier
|
|
14345
|
-
},
|
|
14346
|
-
'document_group': documentGroup-> {
|
|
14347
|
-
name,
|
|
14348
|
-
'parent': parent->identifier,
|
|
14349
|
-
'path': identifier.current
|
|
14350
|
-
}
|
|
14351
|
-
*/
|
|
14352
|
-
|
|
14353
|
-
var ArticleDetailDropdown = function ArticleDetailDropdown(props) {
|
|
14354
|
-
var article = props.article,
|
|
14355
|
-
_props$exclude = props.exclude,
|
|
14356
|
-
exclude = _props$exclude === undefined ? [] : _props$exclude;
|
|
14357
|
-
|
|
14358
|
-
var _props = _extends$2({}, props);
|
|
14359
|
-
delete _props.article;
|
|
14360
|
-
delete _props.exclude;
|
|
14361
|
-
return React__default.createElement(
|
|
14362
|
-
Dropdown,
|
|
14363
|
-
null,
|
|
14364
|
-
React__default.createElement(
|
|
14365
|
-
Dropdown.Toggle,
|
|
14366
|
-
_props,
|
|
14367
|
-
'Related Topics'
|
|
14368
|
-
),
|
|
14369
|
-
React__default.createElement(
|
|
14370
|
-
Dropdown.Menu,
|
|
14371
|
-
null,
|
|
14372
|
-
article.document_group && React__default.createElement(
|
|
14373
|
-
Dropdown.Item,
|
|
14374
|
-
{ href: '/' + article.document_group.parent.current + '/' + article.document_group.path },
|
|
14375
|
-
article.document_group.name
|
|
14376
|
-
),
|
|
14377
|
-
article.content_placement && article.content_placement.length > 0 && article.content_placement.map(function (cp, i) {
|
|
14378
|
-
if (exclude.includes(cp.name)) return;
|
|
14379
|
-
var href = '';
|
|
14380
|
-
if (cp.ancestor) {
|
|
14381
|
-
href = '/' + cp.ancestor + '/' + cp.identifier;
|
|
14382
|
-
} else if (cp.parent) {
|
|
14383
|
-
href = '/' + cp.parent + '/' + cp.identifier;
|
|
14384
|
-
} else {
|
|
14385
|
-
href = '/' + cp.identifier;
|
|
14386
|
-
}
|
|
14387
|
-
return React__default.createElement(
|
|
14388
|
-
Dropdown.Item,
|
|
14389
|
-
{ key: i, href: href },
|
|
14390
|
-
cp.name
|
|
14391
|
-
);
|
|
14392
|
-
})
|
|
14393
|
-
)
|
|
14394
|
-
);
|
|
14395
|
-
};
|
|
14396
|
-
|
|
14397
14348
|
var HighlightenVideo = function HighlightenVideo(_ref) {
|
|
14398
14349
|
var highlightVideoOptions = _ref.highlightVideoOptions;
|
|
14399
14350
|
var accountId = highlightVideoOptions.accountId,
|
|
@@ -21763,6 +21714,56 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
21763
21714
|
};
|
|
21764
21715
|
|
|
21765
21716
|
var Article$1 = function Article(props) {
|
|
21717
|
+
var onVote = function () {
|
|
21718
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(nodeKey, selectedChoice) {
|
|
21719
|
+
var response, result;
|
|
21720
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
21721
|
+
while (1) {
|
|
21722
|
+
switch (_context.prev = _context.next) {
|
|
21723
|
+
case 0:
|
|
21724
|
+
_context.next = 2;
|
|
21725
|
+
return fetch('/api/polls/vote', {
|
|
21726
|
+
method: 'POST',
|
|
21727
|
+
headers: { 'Content-Type': 'application/json' },
|
|
21728
|
+
body: _JSON$stringify({ articleId: props.article._id, nodeKey: nodeKey, selectedChoice: selectedChoice, body: articleBody })
|
|
21729
|
+
});
|
|
21730
|
+
|
|
21731
|
+
case 2:
|
|
21732
|
+
response = _context.sent;
|
|
21733
|
+
|
|
21734
|
+
if (!response.ok) {
|
|
21735
|
+
_context.next = 11;
|
|
21736
|
+
break;
|
|
21737
|
+
}
|
|
21738
|
+
|
|
21739
|
+
_context.next = 6;
|
|
21740
|
+
return response.json();
|
|
21741
|
+
|
|
21742
|
+
case 6:
|
|
21743
|
+
result = _context.sent;
|
|
21744
|
+
|
|
21745
|
+
setShowVotes(true);
|
|
21746
|
+
|
|
21747
|
+
console.log('Voted successfully');
|
|
21748
|
+
_context.next = 12;
|
|
21749
|
+
break;
|
|
21750
|
+
|
|
21751
|
+
case 11:
|
|
21752
|
+
console.log('Unable to vote!');
|
|
21753
|
+
|
|
21754
|
+
case 12:
|
|
21755
|
+
case 'end':
|
|
21756
|
+
return _context.stop();
|
|
21757
|
+
}
|
|
21758
|
+
}
|
|
21759
|
+
}, _callee, this);
|
|
21760
|
+
}));
|
|
21761
|
+
|
|
21762
|
+
return function onVote(_x, _x2) {
|
|
21763
|
+
return _ref.apply(this, arguments);
|
|
21764
|
+
};
|
|
21765
|
+
}();
|
|
21766
|
+
|
|
21766
21767
|
var article = props.article;
|
|
21767
21768
|
var client = props.client,
|
|
21768
21769
|
pageview = props.pageview,
|
|
@@ -21786,6 +21787,7 @@ var Article$1 = function Article(props) {
|
|
|
21786
21787
|
var url = _props$article$url.current,
|
|
21787
21788
|
issue = _props$article.issue,
|
|
21788
21789
|
source = _props$article.source,
|
|
21790
|
+
documentGroup = _props$article.documentGroup,
|
|
21789
21791
|
regionalPages = props.regionalPages,
|
|
21790
21792
|
nationalPage = props.nationalPage,
|
|
21791
21793
|
ISIContent = props.ISIContent,
|
|
@@ -21838,7 +21840,7 @@ var Article$1 = function Article(props) {
|
|
|
21838
21840
|
};
|
|
21839
21841
|
|
|
21840
21842
|
var renderRelevantTopicsDropdown = function renderRelevantTopicsDropdown() {
|
|
21841
|
-
if (content_placement && content_placement.length > 0) {
|
|
21843
|
+
if (content_placement && content_placement.length > 0 || documentGroup) {
|
|
21842
21844
|
return React__default.createElement(
|
|
21843
21845
|
Dropdown,
|
|
21844
21846
|
null,
|
|
@@ -21850,6 +21852,11 @@ var Article$1 = function Article(props) {
|
|
|
21850
21852
|
React__default.createElement(
|
|
21851
21853
|
Dropdown.Menu,
|
|
21852
21854
|
null,
|
|
21855
|
+
documentGroup && documentGroup.parent && React__default.createElement(
|
|
21856
|
+
Dropdown.Item,
|
|
21857
|
+
{ href: cpModificationRequired ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path },
|
|
21858
|
+
documentGroup.name
|
|
21859
|
+
),
|
|
21853
21860
|
content_placement.length > 0 ? content_placement.map(function (cp, index) {
|
|
21854
21861
|
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.path;
|
|
21855
21862
|
var href = '/' + cp_url;
|
|
@@ -21864,6 +21871,7 @@ var Article$1 = function Article(props) {
|
|
|
21864
21871
|
}
|
|
21865
21872
|
return null;
|
|
21866
21873
|
};
|
|
21874
|
+
|
|
21867
21875
|
var form = function form() {
|
|
21868
21876
|
return React__default.createElement(
|
|
21869
21877
|
React__default.Fragment,
|
|
@@ -21983,7 +21991,7 @@ var Article$1 = function Article(props) {
|
|
|
21983
21991
|
React__default.Fragment,
|
|
21984
21992
|
null,
|
|
21985
21993
|
React__default.createElement(BlockContent, _extends$2({
|
|
21986
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
21994
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
21987
21995
|
blocks: [].concat(_toConsumableArray(body.slice(0, selectedIndex))),
|
|
21988
21996
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
21989
21997
|
}, client.config())),
|
|
@@ -22000,7 +22008,7 @@ var Article$1 = function Article(props) {
|
|
|
22000
22008
|
React__default.createElement(DFPAdSlot, _extends$2({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: checkIsVideoAdFound }))
|
|
22001
22009
|
),
|
|
22002
22010
|
React__default.createElement(BlockContent, _extends$2({
|
|
22003
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22011
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22004
22012
|
blocks: [].concat(_toConsumableArray(body.slice(selectedIndex))),
|
|
22005
22013
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22006
22014
|
}, client.config()))
|
|
@@ -22074,7 +22082,7 @@ var Article$1 = function Article(props) {
|
|
|
22074
22082
|
React__default.Fragment,
|
|
22075
22083
|
null,
|
|
22076
22084
|
React__default.createElement(BlockContent, _extends$2({
|
|
22077
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22085
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false, contextualADFlag),
|
|
22078
22086
|
blocks: [].concat(_toConsumableArray(body.slice(0, _selectedIndex2))),
|
|
22079
22087
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22080
22088
|
}, client.config())),
|
|
@@ -22085,14 +22093,14 @@ var Article$1 = function Article(props) {
|
|
|
22085
22093
|
React__default.createElement(DFPAdSlot, _extends$2({}, payload.contextualVideoAD, { refreshFlag: false, checkIsAdFound: _checkIsAdFound2 }))
|
|
22086
22094
|
),
|
|
22087
22095
|
React__default.createElement(BlockContent, _extends$2({
|
|
22088
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22096
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22089
22097
|
blocks: [].concat(_toConsumableArray(body.slice(_selectedIndex2))),
|
|
22090
22098
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22091
22099
|
}, client.config()))
|
|
22092
22100
|
);
|
|
22093
22101
|
} else {
|
|
22094
22102
|
return React__default.createElement(BlockContent, _extends$2({
|
|
22095
|
-
serializers: getSerializers(client, pageview, videoAccountIDs,
|
|
22103
|
+
serializers: getSerializers(client, pageview, videoAccountIDs, onVote, showVotes, drupalLeadSettings, currentPage, false),
|
|
22096
22104
|
blocks: articleBody,
|
|
22097
22105
|
imageOptions: { w: 320, h: 240, fit: 'max' }
|
|
22098
22106
|
}, client.config()));
|
|
@@ -22208,7 +22216,7 @@ var Article$1 = function Article(props) {
|
|
|
22208
22216
|
null,
|
|
22209
22217
|
source && React__default.createElement(
|
|
22210
22218
|
'p',
|
|
22211
|
-
|
|
22219
|
+
{ style: { display: 'inline-block', padding: '0 .25rem', color: 'var(--franchise-primary, #484848)', borderRadius: '2px', fontWeight: 'bold', border: '2px solid var(--franchise-primary, #484848)' }, className: 'source-label' },
|
|
22212
22220
|
source
|
|
22213
22221
|
)
|
|
22214
22222
|
),
|
|
@@ -22797,4 +22805,4 @@ var getQuery = function getQuery(type) {
|
|
|
22797
22805
|
}
|
|
22798
22806
|
};
|
|
22799
22807
|
|
|
22800
|
-
export { AD300x250, AD300x250x600, ADFloatingFooter, ADFooter, ADGutter, ADWelcome, AccordionPanel, AdSlotsProvider, AlphabeticList,
|
|
22808
|
+
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 };
|