@mjhls/mjh-framework 1.0.1082-poll-test-2 → 1.0.1082-rl-v2
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/cjs/ArticleProgramLandingPage.js +1 -1
- package/dist/cjs/ExternalResources.js +1 -1
- package/dist/cjs/HorizontalArticleListing.js +1 -1
- package/dist/cjs/IssueLanding.js +1 -1
- package/dist/cjs/MediaSeriesCard.js +1 -1
- package/dist/cjs/MediaSeriesLanding.js +1 -1
- package/dist/cjs/MediaSeriesLandingPaginated.js +1 -1
- package/dist/cjs/PartnerDetailListing.js +1 -1
- package/dist/cjs/PartnerDetailListingPaginated.js +1 -1
- package/dist/cjs/PodcastsLanding.js +1 -1
- package/dist/cjs/TaxonomyDescription.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +1 -1
- package/dist/cjs/View.js +32 -13
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-8193e03a.js → index-171e9e82.js} +50 -90
- package/dist/cjs/index.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +1 -1
- package/dist/esm/ExternalResources.js +1 -1
- package/dist/esm/HorizontalArticleListing.js +1 -1
- package/dist/esm/IssueLanding.js +1 -1
- package/dist/esm/MediaSeriesCard.js +1 -1
- package/dist/esm/MediaSeriesLanding.js +1 -1
- package/dist/esm/MediaSeriesLandingPaginated.js +1 -1
- package/dist/esm/PartnerDetailListing.js +1 -1
- package/dist/esm/PartnerDetailListingPaginated.js +1 -1
- package/dist/esm/PodcastsLanding.js +1 -1
- package/dist/esm/TaxonomyDescription.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +1 -1
- package/dist/esm/View.js +32 -13
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-3069d37b.js → index-1d1bbc8c.js} +50 -90
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
|
5
5
|
var _extends = require('./extends-be0d85bc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
9
9
|
var ArticleSeriesListing = require('./ArticleSeriesListing.js');
|
|
10
10
|
require('./_commonjsHelpers-06173234.js');
|
|
11
11
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -4,7 +4,7 @@ var _extends = require('./extends-be0d85bc.js');
|
|
|
4
4
|
var slicedToArray = require('./slicedToArray-067dd3bc.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
7
|
-
var getSerializers = require('./index-
|
|
7
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
8
8
|
var index = require('./index-3177f564.js');
|
|
9
9
|
var Router = require('next/router');
|
|
10
10
|
var Button = require('react-bootstrap/Button');
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var ArticleCarousel = require('./ArticleCarousel.js');
|
|
6
6
|
var index_esm = require('./index.esm-d81454e7.js');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
9
9
|
require('./_commonjsHelpers-06173234.js');
|
|
10
10
|
require('./core.get-iterator-method-5643aa10.js');
|
|
11
11
|
require('./YoutubeGroup.js');
|
package/dist/cjs/IssueLanding.js
CHANGED
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
6
6
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
7
7
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
8
|
-
var getSerializers = require('./index-
|
|
8
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
9
9
|
var PixelTracking = require('./PixelTracking.js');
|
|
10
10
|
require('./_commonjsHelpers-06173234.js');
|
|
11
11
|
require('./core.get-iterator-method-5643aa10.js');
|
|
@@ -7,7 +7,7 @@ var urlFor = require('./urlFor.js');
|
|
|
7
7
|
var moment = require('./moment-f730814d.js');
|
|
8
8
|
var styleInject_es = require('./style-inject.es-dcee06b6.js');
|
|
9
9
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
11
11
|
require('./_commonjsHelpers-06173234.js');
|
|
12
12
|
require('./core.get-iterator-method-5643aa10.js');
|
|
13
13
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -12,7 +12,7 @@ var Link = require('next/link');
|
|
|
12
12
|
var MasterDeck = require('./MasterDeck.js');
|
|
13
13
|
var MediaSeriesCard = require('./MediaSeriesCard.js');
|
|
14
14
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
15
|
-
var getSerializers = require('./index-
|
|
15
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
16
16
|
require('./_commonjsHelpers-06173234.js');
|
|
17
17
|
require('./core.get-iterator-method-5643aa10.js');
|
|
18
18
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -12,7 +12,7 @@ var Link = require('next/link');
|
|
|
12
12
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
13
13
|
var MasterDeckPaginated = require('./MasterDeckPaginated.js');
|
|
14
14
|
var MediaSeriesCard = require('./MediaSeriesCard.js');
|
|
15
|
-
var getSerializers = require('./index-
|
|
15
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
16
16
|
require('./_commonjsHelpers-06173234.js');
|
|
17
17
|
require('./core.get-iterator-method-5643aa10.js');
|
|
18
18
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -13,7 +13,7 @@ var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
|
13
13
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
14
14
|
var Feature = require('./Feature.js');
|
|
15
15
|
var urlFor = require('./urlFor.js');
|
|
16
|
-
var getSerializers = require('./index-
|
|
16
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
17
17
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
18
18
|
var checkSisterSite = require('./checkSisterSite-c3a4ac98.js');
|
|
19
19
|
require('./_commonjsHelpers-06173234.js');
|
|
@@ -13,7 +13,7 @@ var QueueDeckExpandedPaginated = require('./QueueDeckExpandedPaginated.js');
|
|
|
13
13
|
var Breadcrumbs = require('./Breadcrumbs.js');
|
|
14
14
|
var Feature = require('./Feature.js');
|
|
15
15
|
var urlFor = require('./urlFor.js');
|
|
16
|
-
var getSerializers = require('./index-
|
|
16
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
17
17
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
18
18
|
var checkSisterSite = require('./checkSisterSite-c3a4ac98.js');
|
|
19
19
|
require('./_commonjsHelpers-06173234.js');
|
|
@@ -8,7 +8,7 @@ var Link = require('next/link');
|
|
|
8
8
|
var MasterDeck = require('./MasterDeck.js');
|
|
9
9
|
var MediaSeriesCard = require('./MediaSeriesCard.js');
|
|
10
10
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
11
|
-
var getSerializers = require('./index-
|
|
11
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
|
14
14
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -7,7 +7,7 @@ var React = require('react');
|
|
|
7
7
|
var Router = require('next/router');
|
|
8
8
|
var Head = require('next/head');
|
|
9
9
|
var BlockContent = require('./BlockContent-96b44364.js');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
11
11
|
require('./_commonjsHelpers-06173234.js');
|
|
12
12
|
require('./core.get-iterator-method-5643aa10.js');
|
|
13
13
|
require('./web.dom.iterable-d98303e0.js');
|
|
@@ -7,7 +7,7 @@ var BlockContent = require('./BlockContent-96b44364.js');
|
|
|
7
7
|
var Col = require('react-bootstrap/Col');
|
|
8
8
|
var Form = require('react-bootstrap/Form');
|
|
9
9
|
var Button = require('react-bootstrap/Button');
|
|
10
|
-
var getSerializers = require('./index-
|
|
10
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
11
11
|
var VideoSeriesListing = require('./VideoSeriesListing.js');
|
|
12
12
|
require('./_commonjsHelpers-06173234.js');
|
|
13
13
|
require('./core.get-iterator-method-5643aa10.js');
|
package/dist/cjs/View.js
CHANGED
|
@@ -17,7 +17,7 @@ var FormControl = require('react-bootstrap/FormControl');
|
|
|
17
17
|
var Button = require('react-bootstrap/Button');
|
|
18
18
|
var visibilitySensor = require('./visibility-sensor-56020df6.js');
|
|
19
19
|
var SocialShare = require('./SocialShare.js');
|
|
20
|
-
var getSerializers = require('./index-
|
|
20
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
21
21
|
var AdSlot = require('./AdSlot.js');
|
|
22
22
|
var SeriesSlider = require('./SeriesSlider-086a8319.js');
|
|
23
23
|
var getTargeting = require('./getTargeting-5b954783.js');
|
|
@@ -124,7 +124,8 @@ var getDocumentGroupUrl = function getDocumentGroupUrl(docGroup) {
|
|
|
124
124
|
if (typeof url !== 'undefined') {
|
|
125
125
|
url = url + '/' + docGroup.path;
|
|
126
126
|
} else {
|
|
127
|
-
url = '/' + docGroup.path
|
|
127
|
+
// url = '/' + docGroup.path
|
|
128
|
+
return null;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
return url;
|
|
@@ -147,7 +148,8 @@ var getDocumentGroupName = function getDocumentGroupName(docGroup) {
|
|
|
147
148
|
if (typeof name !== 'undefined') {
|
|
148
149
|
name = name + ' | <b>' + docGroup.name + '</b>';
|
|
149
150
|
} else {
|
|
150
|
-
name = '<b>' + docGroup.name + '</b>'
|
|
151
|
+
// name = '<b>' + docGroup.name + '</b>'
|
|
152
|
+
return null;
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
return name && typeof name != 'undefined' ? name : null;
|
|
@@ -189,6 +191,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
189
191
|
thumbnailUrl = urlFor({ client: client, source: mediaSeriesGroup.thumbnail });
|
|
190
192
|
}
|
|
191
193
|
var margin = article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'none' : '1rem';
|
|
194
|
+
console.log("check me", article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null);
|
|
192
195
|
return React__default["default"].createElement(
|
|
193
196
|
'div',
|
|
194
197
|
null,
|
|
@@ -197,7 +200,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
197
200
|
{ style: { textAlign: 'center', fontWeight: 600 } },
|
|
198
201
|
article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
|
|
199
202
|
),
|
|
200
|
-
React__default["default"].createElement(
|
|
203
|
+
url && name && React__default["default"].createElement(
|
|
201
204
|
'a',
|
|
202
205
|
{
|
|
203
206
|
href: url,
|
|
@@ -1271,12 +1274,24 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1271
1274
|
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
1272
1275
|
return null;
|
|
1273
1276
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1277
|
+
|
|
1278
|
+
var doc_url = cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.ancestor ? documentGroup.parent && !documentGroup.path.includes('/') ? '/' + documentGroup.ancestor + '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.ancestor + '/' + documentGroup.path : documentGroup.parent ? !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path : '/' + documentGroup.path;
|
|
1279
|
+
console.log("doc_url----------------", doc_url);
|
|
1280
|
+
var href = '' + doc_url;
|
|
1281
|
+
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
|
|
1282
|
+
// if (documentGroup.parent) {
|
|
1283
|
+
// relatedLinks = [
|
|
1284
|
+
// ...relatedLinks,
|
|
1285
|
+
// {
|
|
1286
|
+
// label: documentGroup.name,
|
|
1287
|
+
// href: cpModificationRequired
|
|
1288
|
+
// ? getDocumentGroupUrl(documentGroup)
|
|
1289
|
+
// : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
|
|
1290
|
+
// ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
|
|
1291
|
+
// : `/${documentGroup.path}`
|
|
1292
|
+
// }
|
|
1293
|
+
// ]
|
|
1294
|
+
// }
|
|
1280
1295
|
});
|
|
1281
1296
|
}
|
|
1282
1297
|
if (content_placement && content_placement.length > 0) {
|
|
@@ -1286,8 +1301,10 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1286
1301
|
if (cp.excludeRelatedContents) {
|
|
1287
1302
|
return null;
|
|
1288
1303
|
}
|
|
1289
|
-
|
|
1290
|
-
var
|
|
1304
|
+
|
|
1305
|
+
var cp_url = cpModificationRequired ? getTargeting.getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? '/' + cp.ancestor + '/' + cp.parent + '/' + cp.path : '/' + cp.ancestor + '/' + cp.path : cp.parent ? !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '/' + cp.path : '/' + cp.path;
|
|
1306
|
+
console.log("cp_url----------------------------", cp_url);
|
|
1307
|
+
var href = '' + cp_url;
|
|
1291
1308
|
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
1292
1309
|
});
|
|
1293
1310
|
}
|
|
@@ -1308,7 +1325,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1308
1325
|
{ key: index, className: 'related-link' },
|
|
1309
1326
|
React__default["default"].createElement(
|
|
1310
1327
|
'a',
|
|
1311
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
1328
|
+
{ className: 'related-links article', style: { color: 'blue' }, href: relatedLink.href },
|
|
1312
1329
|
relatedLink.label
|
|
1313
1330
|
),
|
|
1314
1331
|
React__default["default"].createElement(
|
|
@@ -2383,6 +2400,8 @@ var View = function View(props) {
|
|
|
2383
2400
|
var title = _props$article2.title,
|
|
2384
2401
|
seriesShareOptions = _props$article2.seriesShareOptions;
|
|
2385
2402
|
|
|
2403
|
+
console.log(props);
|
|
2404
|
+
|
|
2386
2405
|
var _useState = React.useState(0),
|
|
2387
2406
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
2388
2407
|
currentPage = _useState2[0],
|
|
@@ -8933,17 +8933,11 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8933
8933
|
showBorders = _useState6[0],
|
|
8934
8934
|
setShowBorders = _useState6[1];
|
|
8935
8935
|
|
|
8936
|
-
var _useState7 = React.useState(false),
|
|
8937
|
-
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8938
|
-
dateChecked = _useState8[0],
|
|
8939
|
-
setDateChecked = _useState8[1];
|
|
8940
|
-
|
|
8941
8936
|
var choices = node.choices,
|
|
8942
8937
|
question = node.question,
|
|
8943
8938
|
response = node.response,
|
|
8944
8939
|
_node$showResults = node.showResults,
|
|
8945
|
-
showResults = _node$showResults === undefined ? '' : _node$showResults
|
|
8946
|
-
resultsDate = node.resultsDate;
|
|
8940
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults;
|
|
8947
8941
|
|
|
8948
8942
|
var inputRef = React.useRef([]);
|
|
8949
8943
|
|
|
@@ -8951,15 +8945,6 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8951
8945
|
e.preventDefault();
|
|
8952
8946
|
onVote(node._key, selectedChoice);
|
|
8953
8947
|
};
|
|
8954
|
-
React.useEffect(function () {
|
|
8955
|
-
var dateForResults = new Date(resultsDate);
|
|
8956
|
-
var today = new Date();
|
|
8957
|
-
if (today.getTime() >= dateForResults.getTime()) {
|
|
8958
|
-
setShowAnswer(true);
|
|
8959
|
-
setDateChecked(true);
|
|
8960
|
-
}
|
|
8961
|
-
}, [resultsDate]);
|
|
8962
|
-
|
|
8963
8948
|
React.useEffect(function () {
|
|
8964
8949
|
if (showResults) {
|
|
8965
8950
|
setShowAnswer(true);
|
|
@@ -8998,10 +8983,44 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8998
8983
|
}
|
|
8999
8984
|
};
|
|
9000
8985
|
|
|
9001
|
-
|
|
9002
|
-
|
|
8986
|
+
return React__default["default"].createElement(
|
|
8987
|
+
'div',
|
|
8988
|
+
{ className: 'pollHolder mb-3' },
|
|
8989
|
+
question && React__default["default"].createElement(
|
|
8990
|
+
'p',
|
|
8991
|
+
{ className: 'font-weight-bold' },
|
|
8992
|
+
question
|
|
8993
|
+
),
|
|
8994
|
+
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8995
|
+
'form',
|
|
8996
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8997
|
+
return onSubmitPoll(e);
|
|
8998
|
+
} },
|
|
8999
|
+
choices && choices.map(function (choice, index) {
|
|
9000
|
+
return React__default["default"].createElement(
|
|
9001
|
+
'div',
|
|
9002
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
9003
|
+
return userChoiceSelection(e);
|
|
9004
|
+
} },
|
|
9005
|
+
React__default["default"].createElement(
|
|
9006
|
+
'label',
|
|
9007
|
+
{ className: 'pl-2' },
|
|
9008
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
9009
|
+
return inputRef.current[index] = el;
|
|
9010
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
9011
|
+
' ' + choice.choiceText
|
|
9012
|
+
)
|
|
9013
|
+
);
|
|
9014
|
+
}),
|
|
9015
|
+
React__default["default"].createElement(
|
|
9016
|
+
reactBootstrap.Button,
|
|
9017
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
9018
|
+
'Vote'
|
|
9019
|
+
)
|
|
9020
|
+
),
|
|
9021
|
+
showAnswer && React__default["default"].createElement(
|
|
9003
9022
|
'div',
|
|
9004
|
-
|
|
9023
|
+
{ className: 'progress-container mb-3' },
|
|
9005
9024
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
9006
9025
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
9007
9026
|
return React__default["default"].createElement(
|
|
@@ -9009,32 +9028,23 @@ var Poll$1 = function Poll(_ref) {
|
|
|
9009
9028
|
{
|
|
9010
9029
|
key: choice._key,
|
|
9011
9030
|
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
9012
|
-
className: 'mb-3'
|
|
9013
|
-
},
|
|
9031
|
+
className: 'mb-3' },
|
|
9014
9032
|
React__default["default"].createElement(
|
|
9015
9033
|
'div',
|
|
9016
9034
|
{ className: 'correct-answer' },
|
|
9035
|
+
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
9017
9036
|
React__default["default"].createElement(
|
|
9018
9037
|
'div',
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
React__default["default"].createElement(
|
|
9030
|
-
'div',
|
|
9031
|
-
{ className: 'pr-4 text-white' },
|
|
9032
|
-
percentage,
|
|
9033
|
-
'% (',
|
|
9034
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
9035
|
-
' Votes)'
|
|
9036
|
-
)
|
|
9037
|
-
)
|
|
9038
|
+
null,
|
|
9039
|
+
choice.choiceText
|
|
9040
|
+
),
|
|
9041
|
+
React__default["default"].createElement(
|
|
9042
|
+
'div',
|
|
9043
|
+
{ className: 'float-right' },
|
|
9044
|
+
percentage,
|
|
9045
|
+
'% (',
|
|
9046
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
9047
|
+
' Votes)'
|
|
9038
9048
|
)
|
|
9039
9049
|
)
|
|
9040
9050
|
);
|
|
@@ -9045,56 +9055,6 @@ var Poll$1 = function Poll(_ref) {
|
|
|
9045
9055
|
'Total Votes: ',
|
|
9046
9056
|
choicesTotalCount
|
|
9047
9057
|
)
|
|
9048
|
-
);
|
|
9049
|
-
};
|
|
9050
|
-
|
|
9051
|
-
return React__default["default"].createElement(
|
|
9052
|
-
'div',
|
|
9053
|
-
{ className: 'pollHolder mb-3' },
|
|
9054
|
-
!dateChecked && React__default["default"].createElement(
|
|
9055
|
-
'div',
|
|
9056
|
-
null,
|
|
9057
|
-
question && React__default["default"].createElement(
|
|
9058
|
-
'p',
|
|
9059
|
-
{ className: 'font-weight-bold' },
|
|
9060
|
-
question
|
|
9061
|
-
),
|
|
9062
|
-
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
9063
|
-
'form',
|
|
9064
|
-
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
9065
|
-
return onSubmitPoll(e);
|
|
9066
|
-
} },
|
|
9067
|
-
choices && choices.map(function (choice, index) {
|
|
9068
|
-
return React__default["default"].createElement(
|
|
9069
|
-
'div',
|
|
9070
|
-
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
9071
|
-
return userChoiceSelection(e);
|
|
9072
|
-
} },
|
|
9073
|
-
React__default["default"].createElement(
|
|
9074
|
-
'label',
|
|
9075
|
-
{ className: 'pl-2' },
|
|
9076
|
-
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
9077
|
-
return inputRef.current[index] = el;
|
|
9078
|
-
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
9079
|
-
' ' + choice.choiceText
|
|
9080
|
-
)
|
|
9081
|
-
);
|
|
9082
|
-
}),
|
|
9083
|
-
React__default["default"].createElement(
|
|
9084
|
-
reactBootstrap.Button,
|
|
9085
|
-
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
9086
|
-
'Vote'
|
|
9087
|
-
)
|
|
9088
|
-
)
|
|
9089
|
-
),
|
|
9090
|
-
showAnswer && dateChecked ? React__default["default"].createElement(
|
|
9091
|
-
'div',
|
|
9092
|
-
{ className: 'progress-container mb-3' },
|
|
9093
|
-
React__default["default"].createElement(Results, null)
|
|
9094
|
-
) : React__default["default"].createElement(
|
|
9095
|
-
'div',
|
|
9096
|
-
null,
|
|
9097
|
-
!resultsDate && React__default["default"].createElement(Results, null)
|
|
9098
9058
|
),
|
|
9099
9059
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
9100
9060
|
React__default["default"].createElement(
|
package/dist/cjs/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var VerticalHero = require('./VerticalHero.js');
|
|
|
91
91
|
var YahooHero = require('./YahooHero.js');
|
|
92
92
|
var GridHero = require('./GridHero.js');
|
|
93
93
|
var ConferenceArticleCard = require('./ConferenceArticleCard.js');
|
|
94
|
-
var getSerializers = require('./index-
|
|
94
|
+
var getSerializers = require('./index-171e9e82.js');
|
|
95
95
|
var Beam = require('./Beam.js');
|
|
96
96
|
var Segment = require('./Segment.js');
|
|
97
97
|
var KMTracker = require('./KMTracker.js');
|
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from './slicedToArray-72ed566b.js';
|
|
|
3
3
|
import { _ as _extends } from './extends-2f4448b8.js';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
7
7
|
import ArticleSeriesListing from './ArticleSeriesListing.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-95db387d.js';
|
|
@@ -2,7 +2,7 @@ import { _ as _extends } from './extends-2f4448b8.js';
|
|
|
2
2
|
import { _ as _slicedToArray } from './slicedToArray-72ed566b.js';
|
|
3
3
|
import React__default, { useState, useEffect } from 'react';
|
|
4
4
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
5
|
-
import { g as getSerializers } from './index-
|
|
5
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
6
6
|
import { m as momentTimezone } from './index-4550ef23.js';
|
|
7
7
|
import { useRouter } from 'next/router';
|
|
8
8
|
import Button from 'react-bootstrap/Button';
|
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import ArticleCarousel from './ArticleCarousel.js';
|
|
4
4
|
import { I as IoIosArrowForward } from './index.esm-eb1e8e80.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
7
7
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
8
8
|
import './core.get-iterator-method-95db387d.js';
|
|
9
9
|
import './YoutubeGroup.js';
|
package/dist/esm/IssueLanding.js
CHANGED
|
@@ -3,7 +3,7 @@ import React__default from 'react';
|
|
|
3
3
|
import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
4
4
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
5
5
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
6
|
-
import { g as getSerializers } from './index-
|
|
6
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
7
7
|
import { PixelTrackingLandingPages } from './PixelTracking.js';
|
|
8
8
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
9
9
|
import './core.get-iterator-method-95db387d.js';
|
|
@@ -5,7 +5,7 @@ import urlFor from './urlFor.js';
|
|
|
5
5
|
import { m as moment } from './moment-48faeb9c.js';
|
|
6
6
|
import { s as styleInject } from './style-inject.es-1f59c1d0.js';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
9
9
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
10
10
|
import './core.get-iterator-method-95db387d.js';
|
|
11
11
|
import './web.dom.iterable-3fffc027.js';
|
|
@@ -10,7 +10,7 @@ import Link from 'next/link';
|
|
|
10
10
|
import MasterDeck from './MasterDeck.js';
|
|
11
11
|
import MediaSeriesCard from './MediaSeriesCard.js';
|
|
12
12
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
13
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
14
14
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
15
|
import './core.get-iterator-method-95db387d.js';
|
|
16
16
|
import './web.dom.iterable-3fffc027.js';
|
|
@@ -10,7 +10,7 @@ import Link from 'next/link';
|
|
|
10
10
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
11
11
|
import MasterDeck from './MasterDeckPaginated.js';
|
|
12
12
|
import MediaSeriesCard from './MediaSeriesCard.js';
|
|
13
|
-
import { g as getSerializers } from './index-
|
|
13
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
14
14
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
15
15
|
import './core.get-iterator-method-95db387d.js';
|
|
16
16
|
import './web.dom.iterable-3fffc027.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpanded.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-a7218fda.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -11,7 +11,7 @@ import QueueDeckExpanded from './QueueDeckExpandedPaginated.js';
|
|
|
11
11
|
import Breadcrumbs from './Breadcrumbs.js';
|
|
12
12
|
import Feature from './Feature.js';
|
|
13
13
|
import urlFor from './urlFor.js';
|
|
14
|
-
import { g as getSerializers } from './index-
|
|
14
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
15
15
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
16
16
|
import { c as checkSisterSite } from './checkSisterSite-a7218fda.js';
|
|
17
17
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
@@ -6,7 +6,7 @@ import Link from 'next/link';
|
|
|
6
6
|
import MasterDeck from './MasterDeck.js';
|
|
7
7
|
import MediaSeriesCard from './MediaSeriesCard.js';
|
|
8
8
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
9
|
-
import { g as getSerializers } from './index-
|
|
9
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-95db387d.js';
|
|
12
12
|
import './web.dom.iterable-3fffc027.js';
|
|
@@ -5,7 +5,7 @@ import React__default, { useState, useEffect } from 'react';
|
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
6
|
import Head from 'next/head';
|
|
7
7
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
9
9
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
10
10
|
import './core.get-iterator-method-95db387d.js';
|
|
11
11
|
import './web.dom.iterable-3fffc027.js';
|
|
@@ -5,7 +5,7 @@ import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
|
5
5
|
import Col from 'react-bootstrap/Col';
|
|
6
6
|
import Form from 'react-bootstrap/Form';
|
|
7
7
|
import Button from 'react-bootstrap/Button';
|
|
8
|
-
import { g as getSerializers } from './index-
|
|
8
|
+
import { g as getSerializers } from './index-1d1bbc8c.js';
|
|
9
9
|
import VideoSeriesListing from './VideoSeriesListing.js';
|
|
10
10
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
11
11
|
import './core.get-iterator-method-95db387d.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -15,7 +15,7 @@ import FormControl from 'react-bootstrap/FormControl';
|
|
|
15
15
|
import Button from 'react-bootstrap/Button';
|
|
16
16
|
import { V as VisibilitySensor } from './visibility-sensor-72fd8f8b.js';
|
|
17
17
|
import SocialShare from './SocialShare.js';
|
|
18
|
-
import { r as renderAuthor, g as getSerializers } from './index-
|
|
18
|
+
import { r as renderAuthor, g as getSerializers } from './index-1d1bbc8c.js';
|
|
19
19
|
import DFPAdSlot from './AdSlot.js';
|
|
20
20
|
import { S as SeriesSlider } from './SeriesSlider-acbdf4c9.js';
|
|
21
21
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-b62a177c.js';
|
|
@@ -114,7 +114,8 @@ var getDocumentGroupUrl = function getDocumentGroupUrl(docGroup) {
|
|
|
114
114
|
if (typeof url !== 'undefined') {
|
|
115
115
|
url = url + '/' + docGroup.path;
|
|
116
116
|
} else {
|
|
117
|
-
url = '/' + docGroup.path
|
|
117
|
+
// url = '/' + docGroup.path
|
|
118
|
+
return null;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
return url;
|
|
@@ -137,7 +138,8 @@ var getDocumentGroupName = function getDocumentGroupName(docGroup) {
|
|
|
137
138
|
if (typeof name !== 'undefined') {
|
|
138
139
|
name = name + ' | <b>' + docGroup.name + '</b>';
|
|
139
140
|
} else {
|
|
140
|
-
name = '<b>' + docGroup.name + '</b>'
|
|
141
|
+
// name = '<b>' + docGroup.name + '</b>'
|
|
142
|
+
return null;
|
|
141
143
|
}
|
|
142
144
|
|
|
143
145
|
return name && typeof name != 'undefined' ? name : null;
|
|
@@ -179,6 +181,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
179
181
|
thumbnailUrl = urlFor({ client: client, source: mediaSeriesGroup.thumbnail });
|
|
180
182
|
}
|
|
181
183
|
var margin = article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText || article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? 'none' : '1rem';
|
|
184
|
+
console.log("check me", article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null);
|
|
182
185
|
return React__default.createElement(
|
|
183
186
|
'div',
|
|
184
187
|
null,
|
|
@@ -187,7 +190,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
187
190
|
{ style: { textAlign: 'center', fontWeight: 600 } },
|
|
188
191
|
article.documentGroupMapping && article.documentGroupMapping[0] && article.documentGroupMapping[0].parent && article.documentGroupMapping[0].parent.parent && article.documentGroupMapping[0].parent.parent.contextText ? article.documentGroupMapping[0].parent.parent.contextText : article.documentGroup && article.documentGroup.parent && article.documentGroup.parent.parent && article.documentGroup.parent.parent.contextText ? article.documentGroup.parent.parent.contextText : null
|
|
189
192
|
),
|
|
190
|
-
React__default.createElement(
|
|
193
|
+
url && name && React__default.createElement(
|
|
191
194
|
'a',
|
|
192
195
|
{
|
|
193
196
|
href: url,
|
|
@@ -1261,12 +1264,24 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1261
1264
|
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
1262
1265
|
return null;
|
|
1263
1266
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1267
|
+
|
|
1268
|
+
var doc_url = cpModificationRequired ? getDocumentGroupUrl(documentGroup) : documentGroup.ancestor ? documentGroup.parent && !documentGroup.path.includes('/') ? '/' + documentGroup.ancestor + '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.ancestor + '/' + documentGroup.path : documentGroup.parent ? !documentGroup.path.includes('/') ? '/' + documentGroup.parent.identifier.current + '/' + documentGroup.path : '/' + documentGroup.path : '/' + documentGroup.path;
|
|
1269
|
+
console.log("doc_url----------------", doc_url);
|
|
1270
|
+
var href = '' + doc_url;
|
|
1271
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
|
|
1272
|
+
// if (documentGroup.parent) {
|
|
1273
|
+
// relatedLinks = [
|
|
1274
|
+
// ...relatedLinks,
|
|
1275
|
+
// {
|
|
1276
|
+
// label: documentGroup.name,
|
|
1277
|
+
// href: cpModificationRequired
|
|
1278
|
+
// ? getDocumentGroupUrl(documentGroup)
|
|
1279
|
+
// : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
|
|
1280
|
+
// ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
|
|
1281
|
+
// : `/${documentGroup.path}`
|
|
1282
|
+
// }
|
|
1283
|
+
// ]
|
|
1284
|
+
// }
|
|
1270
1285
|
});
|
|
1271
1286
|
}
|
|
1272
1287
|
if (content_placement && content_placement.length > 0) {
|
|
@@ -1276,8 +1291,10 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1276
1291
|
if (cp.excludeRelatedContents) {
|
|
1277
1292
|
return null;
|
|
1278
1293
|
}
|
|
1279
|
-
|
|
1280
|
-
var
|
|
1294
|
+
|
|
1295
|
+
var cp_url = cpModificationRequired ? getContentPlacementUrl(cp) : cp.ancestor ? cp.parent && !cp.path.includes('/') ? '/' + cp.ancestor + '/' + cp.parent + '/' + cp.path : '/' + cp.ancestor + '/' + cp.path : cp.parent ? !cp.path.includes('/') ? '/' + cp.parent + '/' + cp.path : '/' + cp.path : '/' + cp.path;
|
|
1296
|
+
console.log("cp_url----------------------------", cp_url);
|
|
1297
|
+
var href = '' + cp_url;
|
|
1281
1298
|
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
1282
1299
|
});
|
|
1283
1300
|
}
|
|
@@ -1298,7 +1315,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1298
1315
|
{ key: index, className: 'related-link' },
|
|
1299
1316
|
React__default.createElement(
|
|
1300
1317
|
'a',
|
|
1301
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
1318
|
+
{ className: 'related-links article', style: { color: 'blue' }, href: relatedLink.href },
|
|
1302
1319
|
relatedLink.label
|
|
1303
1320
|
),
|
|
1304
1321
|
React__default.createElement(
|
|
@@ -2373,6 +2390,8 @@ var View = function View(props) {
|
|
|
2373
2390
|
var title = _props$article2.title,
|
|
2374
2391
|
seriesShareOptions = _props$article2.seriesShareOptions;
|
|
2375
2392
|
|
|
2393
|
+
console.log(props);
|
|
2394
|
+
|
|
2376
2395
|
var _useState = useState(0),
|
|
2377
2396
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2378
2397
|
currentPage = _useState2[0],
|
|
@@ -8913,17 +8913,11 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8913
8913
|
showBorders = _useState6[0],
|
|
8914
8914
|
setShowBorders = _useState6[1];
|
|
8915
8915
|
|
|
8916
|
-
var _useState7 = useState(false),
|
|
8917
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
8918
|
-
dateChecked = _useState8[0],
|
|
8919
|
-
setDateChecked = _useState8[1];
|
|
8920
|
-
|
|
8921
8916
|
var choices = node.choices,
|
|
8922
8917
|
question = node.question,
|
|
8923
8918
|
response = node.response,
|
|
8924
8919
|
_node$showResults = node.showResults,
|
|
8925
|
-
showResults = _node$showResults === undefined ? '' : _node$showResults
|
|
8926
|
-
resultsDate = node.resultsDate;
|
|
8920
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults;
|
|
8927
8921
|
|
|
8928
8922
|
var inputRef = useRef([]);
|
|
8929
8923
|
|
|
@@ -8931,15 +8925,6 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8931
8925
|
e.preventDefault();
|
|
8932
8926
|
onVote(node._key, selectedChoice);
|
|
8933
8927
|
};
|
|
8934
|
-
useEffect(function () {
|
|
8935
|
-
var dateForResults = new Date(resultsDate);
|
|
8936
|
-
var today = new Date();
|
|
8937
|
-
if (today.getTime() >= dateForResults.getTime()) {
|
|
8938
|
-
setShowAnswer(true);
|
|
8939
|
-
setDateChecked(true);
|
|
8940
|
-
}
|
|
8941
|
-
}, [resultsDate]);
|
|
8942
|
-
|
|
8943
8928
|
useEffect(function () {
|
|
8944
8929
|
if (showResults) {
|
|
8945
8930
|
setShowAnswer(true);
|
|
@@ -8978,10 +8963,44 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8978
8963
|
}
|
|
8979
8964
|
};
|
|
8980
8965
|
|
|
8981
|
-
|
|
8982
|
-
|
|
8966
|
+
return React__default.createElement(
|
|
8967
|
+
'div',
|
|
8968
|
+
{ className: 'pollHolder mb-3' },
|
|
8969
|
+
question && React__default.createElement(
|
|
8970
|
+
'p',
|
|
8971
|
+
{ className: 'font-weight-bold' },
|
|
8972
|
+
question
|
|
8973
|
+
),
|
|
8974
|
+
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
8975
|
+
'form',
|
|
8976
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8977
|
+
return onSubmitPoll(e);
|
|
8978
|
+
} },
|
|
8979
|
+
choices && choices.map(function (choice, index) {
|
|
8980
|
+
return React__default.createElement(
|
|
8981
|
+
'div',
|
|
8982
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8983
|
+
return userChoiceSelection(e);
|
|
8984
|
+
} },
|
|
8985
|
+
React__default.createElement(
|
|
8986
|
+
'label',
|
|
8987
|
+
{ className: 'pl-2' },
|
|
8988
|
+
React__default.createElement('input', { ref: function ref(el) {
|
|
8989
|
+
return inputRef.current[index] = el;
|
|
8990
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8991
|
+
' ' + choice.choiceText
|
|
8992
|
+
)
|
|
8993
|
+
);
|
|
8994
|
+
}),
|
|
8995
|
+
React__default.createElement(
|
|
8996
|
+
Button$1,
|
|
8997
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8998
|
+
'Vote'
|
|
8999
|
+
)
|
|
9000
|
+
),
|
|
9001
|
+
showAnswer && React__default.createElement(
|
|
8983
9002
|
'div',
|
|
8984
|
-
|
|
9003
|
+
{ className: 'progress-container mb-3' },
|
|
8985
9004
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8986
9005
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8987
9006
|
return React__default.createElement(
|
|
@@ -8989,32 +9008,23 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8989
9008
|
{
|
|
8990
9009
|
key: choice._key,
|
|
8991
9010
|
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8992
|
-
className: 'mb-3'
|
|
8993
|
-
},
|
|
9011
|
+
className: 'mb-3' },
|
|
8994
9012
|
React__default.createElement(
|
|
8995
9013
|
'div',
|
|
8996
9014
|
{ className: 'correct-answer' },
|
|
9015
|
+
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8997
9016
|
React__default.createElement(
|
|
8998
9017
|
'div',
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
React__default.createElement(
|
|
9010
|
-
'div',
|
|
9011
|
-
{ className: 'pr-4 text-white' },
|
|
9012
|
-
percentage,
|
|
9013
|
-
'% (',
|
|
9014
|
-
choice.choiceCount ? choice.choiceCount : 0,
|
|
9015
|
-
' Votes)'
|
|
9016
|
-
)
|
|
9017
|
-
)
|
|
9018
|
+
null,
|
|
9019
|
+
choice.choiceText
|
|
9020
|
+
),
|
|
9021
|
+
React__default.createElement(
|
|
9022
|
+
'div',
|
|
9023
|
+
{ className: 'float-right' },
|
|
9024
|
+
percentage,
|
|
9025
|
+
'% (',
|
|
9026
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
9027
|
+
' Votes)'
|
|
9018
9028
|
)
|
|
9019
9029
|
)
|
|
9020
9030
|
);
|
|
@@ -9025,56 +9035,6 @@ var Poll$1 = function Poll(_ref) {
|
|
|
9025
9035
|
'Total Votes: ',
|
|
9026
9036
|
choicesTotalCount
|
|
9027
9037
|
)
|
|
9028
|
-
);
|
|
9029
|
-
};
|
|
9030
|
-
|
|
9031
|
-
return React__default.createElement(
|
|
9032
|
-
'div',
|
|
9033
|
-
{ className: 'pollHolder mb-3' },
|
|
9034
|
-
!dateChecked && React__default.createElement(
|
|
9035
|
-
'div',
|
|
9036
|
-
null,
|
|
9037
|
-
question && React__default.createElement(
|
|
9038
|
-
'p',
|
|
9039
|
-
{ className: 'font-weight-bold' },
|
|
9040
|
-
question
|
|
9041
|
-
),
|
|
9042
|
-
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
9043
|
-
'form',
|
|
9044
|
-
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
9045
|
-
return onSubmitPoll(e);
|
|
9046
|
-
} },
|
|
9047
|
-
choices && choices.map(function (choice, index) {
|
|
9048
|
-
return React__default.createElement(
|
|
9049
|
-
'div',
|
|
9050
|
-
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
9051
|
-
return userChoiceSelection(e);
|
|
9052
|
-
} },
|
|
9053
|
-
React__default.createElement(
|
|
9054
|
-
'label',
|
|
9055
|
-
{ className: 'pl-2' },
|
|
9056
|
-
React__default.createElement('input', { ref: function ref(el) {
|
|
9057
|
-
return inputRef.current[index] = el;
|
|
9058
|
-
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
9059
|
-
' ' + choice.choiceText
|
|
9060
|
-
)
|
|
9061
|
-
);
|
|
9062
|
-
}),
|
|
9063
|
-
React__default.createElement(
|
|
9064
|
-
Button$1,
|
|
9065
|
-
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
9066
|
-
'Vote'
|
|
9067
|
-
)
|
|
9068
|
-
)
|
|
9069
|
-
),
|
|
9070
|
-
showAnswer && dateChecked ? React__default.createElement(
|
|
9071
|
-
'div',
|
|
9072
|
-
{ className: 'progress-container mb-3' },
|
|
9073
|
-
React__default.createElement(Results, null)
|
|
9074
|
-
) : React__default.createElement(
|
|
9075
|
-
'div',
|
|
9076
|
-
null,
|
|
9077
|
-
!resultsDate && React__default.createElement(Results, null)
|
|
9078
9038
|
),
|
|
9079
9039
|
showAnswer && response && React__default.createElement(BlockContent, { blocks: response, serializers: getSerializers }),
|
|
9080
9040
|
React__default.createElement(
|
package/dist/esm/index.js
CHANGED
|
@@ -88,7 +88,7 @@ export { default as VerticalHero } from './VerticalHero.js';
|
|
|
88
88
|
export { default as YahooHero } from './YahooHero.js';
|
|
89
89
|
export { default as GridHero } from './GridHero.js';
|
|
90
90
|
export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
|
|
91
|
-
export { g as getSerializers } from './index-
|
|
91
|
+
export { g as getSerializers } from './index-1d1bbc8c.js';
|
|
92
92
|
export { default as Beam } from './Beam.js';
|
|
93
93
|
export { default as Segment } from './Segment.js';
|
|
94
94
|
export { default as KMTracker } from './KMTracker.js';
|