@mjhls/mjh-framework 1.0.1082 → 1.0.1084
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/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 +26 -12
- package/dist/cjs/getSerializers.js +1 -1
- package/dist/cjs/{index-4fdedd6a.js → index-c8823aa4.js} +90 -50
- 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 +26 -12
- package/dist/esm/getSerializers.js +1 -1
- package/dist/esm/{index-de2bb37c.js → index-be51248f.js} +90 -50
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# mjh-framework v. 1.0.
|
|
1
|
+
# mjh-framework v. 1.0.1084
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/mjh-framework) [](https://standardjs.com)
|
|
4
4
|
|
|
@@ -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-c8823aa4.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-c8823aa4.js');
|
|
8
8
|
var index = require('./index-96c331fd.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-c8823aa4.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-c8823aa4.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-aca40de1.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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-c8823aa4.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;
|
|
@@ -197,7 +199,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
197
199
|
{ style: { textAlign: 'center', fontWeight: 600 } },
|
|
198
200
|
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
201
|
),
|
|
200
|
-
React__default["default"].createElement(
|
|
202
|
+
url && name && React__default["default"].createElement(
|
|
201
203
|
'a',
|
|
202
204
|
{
|
|
203
205
|
href: url,
|
|
@@ -1271,12 +1273,23 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1271
1273
|
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
1272
1274
|
return null;
|
|
1273
1275
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1276
|
+
|
|
1277
|
+
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;
|
|
1278
|
+
var href = '' + doc_url;
|
|
1279
|
+
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
|
|
1280
|
+
// if (documentGroup.parent) {
|
|
1281
|
+
// relatedLinks = [
|
|
1282
|
+
// ...relatedLinks,
|
|
1283
|
+
// {
|
|
1284
|
+
// label: documentGroup.name,
|
|
1285
|
+
// href: cpModificationRequired
|
|
1286
|
+
// ? getDocumentGroupUrl(documentGroup)
|
|
1287
|
+
// : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
|
|
1288
|
+
// ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
|
|
1289
|
+
// : `/${documentGroup.path}`
|
|
1290
|
+
// }
|
|
1291
|
+
// ]
|
|
1292
|
+
// }
|
|
1280
1293
|
});
|
|
1281
1294
|
}
|
|
1282
1295
|
if (content_placement && content_placement.length > 0) {
|
|
@@ -1286,7 +1299,8 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1286
1299
|
if (cp.excludeRelatedContents) {
|
|
1287
1300
|
return null;
|
|
1288
1301
|
}
|
|
1289
|
-
|
|
1302
|
+
|
|
1303
|
+
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;
|
|
1290
1304
|
var href = '/' + cp_url;
|
|
1291
1305
|
relatedLinks = [].concat(toConsumableArray._toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
1292
1306
|
});
|
|
@@ -1308,7 +1322,7 @@ var Article = React__default["default"].memo(React.forwardRef(function (props, r
|
|
|
1308
1322
|
{ key: index, className: 'related-link' },
|
|
1309
1323
|
React__default["default"].createElement(
|
|
1310
1324
|
'a',
|
|
1311
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
1325
|
+
{ className: 'related-links article', style: { color: 'blue' }, href: relatedLink.href },
|
|
1312
1326
|
relatedLink.label
|
|
1313
1327
|
),
|
|
1314
1328
|
React__default["default"].createElement(
|
|
@@ -8714,11 +8714,17 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8714
8714
|
showBorders = _useState6[0],
|
|
8715
8715
|
setShowBorders = _useState6[1];
|
|
8716
8716
|
|
|
8717
|
+
var _useState7 = React.useState(false),
|
|
8718
|
+
_useState8 = slicedToArray._slicedToArray(_useState7, 2),
|
|
8719
|
+
dateChecked = _useState8[0],
|
|
8720
|
+
setDateChecked = _useState8[1];
|
|
8721
|
+
|
|
8717
8722
|
var choices = node.choices,
|
|
8718
8723
|
question = node.question,
|
|
8719
8724
|
response = node.response,
|
|
8720
8725
|
_node$showResults = node.showResults,
|
|
8721
|
-
showResults = _node$showResults === undefined ? '' : _node$showResults
|
|
8726
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults,
|
|
8727
|
+
resultsDate = node.resultsDate;
|
|
8722
8728
|
|
|
8723
8729
|
var inputRef = React.useRef([]);
|
|
8724
8730
|
|
|
@@ -8726,6 +8732,15 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8726
8732
|
e.preventDefault();
|
|
8727
8733
|
onVote(node._key, selectedChoice);
|
|
8728
8734
|
};
|
|
8735
|
+
React.useEffect(function () {
|
|
8736
|
+
var dateForResults = new Date(resultsDate);
|
|
8737
|
+
var today = new Date();
|
|
8738
|
+
if (today.getTime() >= dateForResults.getTime()) {
|
|
8739
|
+
setShowAnswer(true);
|
|
8740
|
+
setDateChecked(true);
|
|
8741
|
+
}
|
|
8742
|
+
}, [resultsDate]);
|
|
8743
|
+
|
|
8729
8744
|
React.useEffect(function () {
|
|
8730
8745
|
if (showResults) {
|
|
8731
8746
|
setShowAnswer(true);
|
|
@@ -8764,44 +8779,10 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8764
8779
|
}
|
|
8765
8780
|
};
|
|
8766
8781
|
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
{ className: 'pollHolder mb-3' },
|
|
8770
|
-
question && React__default["default"].createElement(
|
|
8771
|
-
'p',
|
|
8772
|
-
{ className: 'font-weight-bold' },
|
|
8773
|
-
question
|
|
8774
|
-
),
|
|
8775
|
-
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8776
|
-
'form',
|
|
8777
|
-
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8778
|
-
return onSubmitPoll(e);
|
|
8779
|
-
} },
|
|
8780
|
-
choices && choices.map(function (choice, index) {
|
|
8781
|
-
return React__default["default"].createElement(
|
|
8782
|
-
'div',
|
|
8783
|
-
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8784
|
-
return userChoiceSelection(e);
|
|
8785
|
-
} },
|
|
8786
|
-
React__default["default"].createElement(
|
|
8787
|
-
'label',
|
|
8788
|
-
{ className: 'pl-2' },
|
|
8789
|
-
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8790
|
-
return inputRef.current[index] = el;
|
|
8791
|
-
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8792
|
-
' ' + choice.choiceText
|
|
8793
|
-
)
|
|
8794
|
-
);
|
|
8795
|
-
}),
|
|
8796
|
-
React__default["default"].createElement(
|
|
8797
|
-
reactBootstrap.Button,
|
|
8798
|
-
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8799
|
-
'Vote'
|
|
8800
|
-
)
|
|
8801
|
-
),
|
|
8802
|
-
showAnswer && React__default["default"].createElement(
|
|
8782
|
+
var Results = function Results() {
|
|
8783
|
+
return React__default["default"].createElement(
|
|
8803
8784
|
'div',
|
|
8804
|
-
|
|
8785
|
+
null,
|
|
8805
8786
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8806
8787
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8807
8788
|
return React__default["default"].createElement(
|
|
@@ -8809,23 +8790,32 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8809
8790
|
{
|
|
8810
8791
|
key: choice._key,
|
|
8811
8792
|
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8812
|
-
className: 'mb-3'
|
|
8793
|
+
className: 'mb-3'
|
|
8794
|
+
},
|
|
8813
8795
|
React__default["default"].createElement(
|
|
8814
8796
|
'div',
|
|
8815
8797
|
{ className: 'correct-answer' },
|
|
8816
|
-
React__default["default"].createElement(reactBootstrap.ProgressBar, { now: percentage }),
|
|
8817
8798
|
React__default["default"].createElement(
|
|
8818
8799
|
'div',
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
8826
|
-
|
|
8827
|
-
|
|
8828
|
-
|
|
8800
|
+
{ className: 'relative w-full h-6 bg-gray-600/50 mx-auto rounded-lg overflow-hidden border border-gray-300' },
|
|
8801
|
+
React__default["default"].createElement('div', { style: { width: percentage + '%' }, className: 'top-0 absolute h-full bg-primary relative' }),
|
|
8802
|
+
React__default["default"].createElement(
|
|
8803
|
+
'div',
|
|
8804
|
+
{ className: 'bottom-0 absolute h-full m-auto font-bold text-sm align-center flex justify-between w-full' },
|
|
8805
|
+
React__default["default"].createElement(
|
|
8806
|
+
'div',
|
|
8807
|
+
{ className: 'text-white pl-2 max-w-[75%]' },
|
|
8808
|
+
choice.choiceText
|
|
8809
|
+
),
|
|
8810
|
+
React__default["default"].createElement(
|
|
8811
|
+
'div',
|
|
8812
|
+
{ className: 'pr-4 text-white' },
|
|
8813
|
+
percentage,
|
|
8814
|
+
'% (',
|
|
8815
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8816
|
+
' Votes)'
|
|
8817
|
+
)
|
|
8818
|
+
)
|
|
8829
8819
|
)
|
|
8830
8820
|
)
|
|
8831
8821
|
);
|
|
@@ -8836,6 +8826,56 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8836
8826
|
'Total Votes: ',
|
|
8837
8827
|
choicesTotalCount
|
|
8838
8828
|
)
|
|
8829
|
+
);
|
|
8830
|
+
};
|
|
8831
|
+
|
|
8832
|
+
return React__default["default"].createElement(
|
|
8833
|
+
'div',
|
|
8834
|
+
{ className: 'pollHolder mb-3' },
|
|
8835
|
+
!dateChecked && React__default["default"].createElement(
|
|
8836
|
+
'div',
|
|
8837
|
+
null,
|
|
8838
|
+
question && React__default["default"].createElement(
|
|
8839
|
+
'p',
|
|
8840
|
+
{ className: 'font-weight-bold' },
|
|
8841
|
+
question
|
|
8842
|
+
),
|
|
8843
|
+
!showAnswer && choices && choices.length > 0 && React__default["default"].createElement(
|
|
8844
|
+
'form',
|
|
8845
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8846
|
+
return onSubmitPoll(e);
|
|
8847
|
+
} },
|
|
8848
|
+
choices && choices.map(function (choice, index) {
|
|
8849
|
+
return React__default["default"].createElement(
|
|
8850
|
+
'div',
|
|
8851
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8852
|
+
return userChoiceSelection(e);
|
|
8853
|
+
} },
|
|
8854
|
+
React__default["default"].createElement(
|
|
8855
|
+
'label',
|
|
8856
|
+
{ className: 'pl-2' },
|
|
8857
|
+
React__default["default"].createElement('input', { ref: function ref(el) {
|
|
8858
|
+
return inputRef.current[index] = el;
|
|
8859
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8860
|
+
' ' + choice.choiceText
|
|
8861
|
+
)
|
|
8862
|
+
);
|
|
8863
|
+
}),
|
|
8864
|
+
React__default["default"].createElement(
|
|
8865
|
+
reactBootstrap.Button,
|
|
8866
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8867
|
+
'Vote'
|
|
8868
|
+
)
|
|
8869
|
+
)
|
|
8870
|
+
),
|
|
8871
|
+
showAnswer && dateChecked ? React__default["default"].createElement(
|
|
8872
|
+
'div',
|
|
8873
|
+
{ className: 'progress-container mb-3' },
|
|
8874
|
+
React__default["default"].createElement(Results, null)
|
|
8875
|
+
) : React__default["default"].createElement(
|
|
8876
|
+
'div',
|
|
8877
|
+
null,
|
|
8878
|
+
!resultsDate && React__default["default"].createElement(Results, null)
|
|
8839
8879
|
),
|
|
8840
8880
|
showAnswer && response && React__default["default"].createElement(BlockContent.BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8841
8881
|
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-c8823aa4.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-be51248f.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-be51248f.js';
|
|
6
6
|
import { m as momentTimezone } from './index-30a6257d.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-be51248f.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-be51248f.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-bc12cb97.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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-be51248f.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;
|
|
@@ -187,7 +189,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
|
|
|
187
189
|
{ style: { textAlign: 'center', fontWeight: 600 } },
|
|
188
190
|
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
191
|
),
|
|
190
|
-
React__default.createElement(
|
|
192
|
+
url && name && React__default.createElement(
|
|
191
193
|
'a',
|
|
192
194
|
{
|
|
193
195
|
href: url,
|
|
@@ -1261,12 +1263,23 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1261
1263
|
if (documentGroup.isShow === false || documentGroup.excludeRelatedContents) {
|
|
1262
1264
|
return null;
|
|
1263
1265
|
}
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1266
|
+
|
|
1267
|
+
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;
|
|
1268
|
+
var href = '' + doc_url;
|
|
1269
|
+
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: documentGroup.name, href: href }]);
|
|
1270
|
+
// if (documentGroup.parent) {
|
|
1271
|
+
// relatedLinks = [
|
|
1272
|
+
// ...relatedLinks,
|
|
1273
|
+
// {
|
|
1274
|
+
// label: documentGroup.name,
|
|
1275
|
+
// href: cpModificationRequired
|
|
1276
|
+
// ? getDocumentGroupUrl(documentGroup)
|
|
1277
|
+
// : documentGroup.parent.identifier && documentGroup.parent.identifier.current && !documentGroup.path.includes('/')
|
|
1278
|
+
// ? `/${documentGroup.parent.identifier.current}/${documentGroup.path}`
|
|
1279
|
+
// : `/${documentGroup.path}`
|
|
1280
|
+
// }
|
|
1281
|
+
// ]
|
|
1282
|
+
// }
|
|
1270
1283
|
});
|
|
1271
1284
|
}
|
|
1272
1285
|
if (content_placement && content_placement.length > 0) {
|
|
@@ -1276,7 +1289,8 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1276
1289
|
if (cp.excludeRelatedContents) {
|
|
1277
1290
|
return null;
|
|
1278
1291
|
}
|
|
1279
|
-
|
|
1292
|
+
|
|
1293
|
+
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;
|
|
1280
1294
|
var href = '/' + cp_url;
|
|
1281
1295
|
relatedLinks = [].concat(_toConsumableArray(relatedLinks), [{ label: cp.name, href: href }]);
|
|
1282
1296
|
});
|
|
@@ -1298,7 +1312,7 @@ var Article = React__default.memo(forwardRef(function (props, ref) {
|
|
|
1298
1312
|
{ key: index, className: 'related-link' },
|
|
1299
1313
|
React__default.createElement(
|
|
1300
1314
|
'a',
|
|
1301
|
-
{ className: 'related-links', style: { color: 'blue' }, href: relatedLink.href },
|
|
1315
|
+
{ className: 'related-links article', style: { color: 'blue' }, href: relatedLink.href },
|
|
1302
1316
|
relatedLink.label
|
|
1303
1317
|
),
|
|
1304
1318
|
React__default.createElement(
|
|
@@ -8694,11 +8694,17 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8694
8694
|
showBorders = _useState6[0],
|
|
8695
8695
|
setShowBorders = _useState6[1];
|
|
8696
8696
|
|
|
8697
|
+
var _useState7 = useState(false),
|
|
8698
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
8699
|
+
dateChecked = _useState8[0],
|
|
8700
|
+
setDateChecked = _useState8[1];
|
|
8701
|
+
|
|
8697
8702
|
var choices = node.choices,
|
|
8698
8703
|
question = node.question,
|
|
8699
8704
|
response = node.response,
|
|
8700
8705
|
_node$showResults = node.showResults,
|
|
8701
|
-
showResults = _node$showResults === undefined ? '' : _node$showResults
|
|
8706
|
+
showResults = _node$showResults === undefined ? '' : _node$showResults,
|
|
8707
|
+
resultsDate = node.resultsDate;
|
|
8702
8708
|
|
|
8703
8709
|
var inputRef = useRef([]);
|
|
8704
8710
|
|
|
@@ -8706,6 +8712,15 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8706
8712
|
e.preventDefault();
|
|
8707
8713
|
onVote(node._key, selectedChoice);
|
|
8708
8714
|
};
|
|
8715
|
+
useEffect(function () {
|
|
8716
|
+
var dateForResults = new Date(resultsDate);
|
|
8717
|
+
var today = new Date();
|
|
8718
|
+
if (today.getTime() >= dateForResults.getTime()) {
|
|
8719
|
+
setShowAnswer(true);
|
|
8720
|
+
setDateChecked(true);
|
|
8721
|
+
}
|
|
8722
|
+
}, [resultsDate]);
|
|
8723
|
+
|
|
8709
8724
|
useEffect(function () {
|
|
8710
8725
|
if (showResults) {
|
|
8711
8726
|
setShowAnswer(true);
|
|
@@ -8744,44 +8759,10 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8744
8759
|
}
|
|
8745
8760
|
};
|
|
8746
8761
|
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
{ className: 'pollHolder mb-3' },
|
|
8750
|
-
question && React__default.createElement(
|
|
8751
|
-
'p',
|
|
8752
|
-
{ className: 'font-weight-bold' },
|
|
8753
|
-
question
|
|
8754
|
-
),
|
|
8755
|
-
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
8756
|
-
'form',
|
|
8757
|
-
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8758
|
-
return onSubmitPoll(e);
|
|
8759
|
-
} },
|
|
8760
|
-
choices && choices.map(function (choice, index) {
|
|
8761
|
-
return React__default.createElement(
|
|
8762
|
-
'div',
|
|
8763
|
-
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8764
|
-
return userChoiceSelection(e);
|
|
8765
|
-
} },
|
|
8766
|
-
React__default.createElement(
|
|
8767
|
-
'label',
|
|
8768
|
-
{ className: 'pl-2' },
|
|
8769
|
-
React__default.createElement('input', { ref: function ref(el) {
|
|
8770
|
-
return inputRef.current[index] = el;
|
|
8771
|
-
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8772
|
-
' ' + choice.choiceText
|
|
8773
|
-
)
|
|
8774
|
-
);
|
|
8775
|
-
}),
|
|
8776
|
-
React__default.createElement(
|
|
8777
|
-
Button$1,
|
|
8778
|
-
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8779
|
-
'Vote'
|
|
8780
|
-
)
|
|
8781
|
-
),
|
|
8782
|
-
showAnswer && React__default.createElement(
|
|
8762
|
+
var Results = function Results() {
|
|
8763
|
+
return React__default.createElement(
|
|
8783
8764
|
'div',
|
|
8784
|
-
|
|
8765
|
+
null,
|
|
8785
8766
|
showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
|
|
8786
8767
|
var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
|
|
8787
8768
|
return React__default.createElement(
|
|
@@ -8789,23 +8770,32 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8789
8770
|
{
|
|
8790
8771
|
key: choice._key,
|
|
8791
8772
|
style: { border: showBorders ? choice.choiceAnswer === true ? '2px solid limegreen' : checkChoice(choice._key) ? '2px solid red' : '' : '' },
|
|
8792
|
-
className: 'mb-3'
|
|
8773
|
+
className: 'mb-3'
|
|
8774
|
+
},
|
|
8793
8775
|
React__default.createElement(
|
|
8794
8776
|
'div',
|
|
8795
8777
|
{ className: 'correct-answer' },
|
|
8796
|
-
React__default.createElement(ProgressBar, { now: percentage }),
|
|
8797
8778
|
React__default.createElement(
|
|
8798
8779
|
'div',
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
8803
|
-
|
|
8804
|
-
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8780
|
+
{ className: 'relative w-full h-6 bg-gray-600/50 mx-auto rounded-lg overflow-hidden border border-gray-300' },
|
|
8781
|
+
React__default.createElement('div', { style: { width: percentage + '%' }, className: 'top-0 absolute h-full bg-primary relative' }),
|
|
8782
|
+
React__default.createElement(
|
|
8783
|
+
'div',
|
|
8784
|
+
{ className: 'bottom-0 absolute h-full m-auto font-bold text-sm align-center flex justify-between w-full' },
|
|
8785
|
+
React__default.createElement(
|
|
8786
|
+
'div',
|
|
8787
|
+
{ className: 'text-white pl-2 max-w-[75%]' },
|
|
8788
|
+
choice.choiceText
|
|
8789
|
+
),
|
|
8790
|
+
React__default.createElement(
|
|
8791
|
+
'div',
|
|
8792
|
+
{ className: 'pr-4 text-white' },
|
|
8793
|
+
percentage,
|
|
8794
|
+
'% (',
|
|
8795
|
+
choice.choiceCount ? choice.choiceCount : 0,
|
|
8796
|
+
' Votes)'
|
|
8797
|
+
)
|
|
8798
|
+
)
|
|
8809
8799
|
)
|
|
8810
8800
|
)
|
|
8811
8801
|
);
|
|
@@ -8816,6 +8806,56 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8816
8806
|
'Total Votes: ',
|
|
8817
8807
|
choicesTotalCount
|
|
8818
8808
|
)
|
|
8809
|
+
);
|
|
8810
|
+
};
|
|
8811
|
+
|
|
8812
|
+
return React__default.createElement(
|
|
8813
|
+
'div',
|
|
8814
|
+
{ className: 'pollHolder mb-3' },
|
|
8815
|
+
!dateChecked && React__default.createElement(
|
|
8816
|
+
'div',
|
|
8817
|
+
null,
|
|
8818
|
+
question && React__default.createElement(
|
|
8819
|
+
'p',
|
|
8820
|
+
{ className: 'font-weight-bold' },
|
|
8821
|
+
question
|
|
8822
|
+
),
|
|
8823
|
+
!showAnswer && choices && choices.length > 0 && React__default.createElement(
|
|
8824
|
+
'form',
|
|
8825
|
+
{ className: 'formPoll', onSubmit: function onSubmit(e) {
|
|
8826
|
+
return onSubmitPoll(e);
|
|
8827
|
+
} },
|
|
8828
|
+
choices && choices.map(function (choice, index) {
|
|
8829
|
+
return React__default.createElement(
|
|
8830
|
+
'div',
|
|
8831
|
+
{ key: choice._key, 'data-index': index, onClick: function onClick(e) {
|
|
8832
|
+
return userChoiceSelection(e);
|
|
8833
|
+
} },
|
|
8834
|
+
React__default.createElement(
|
|
8835
|
+
'label',
|
|
8836
|
+
{ className: 'pl-2' },
|
|
8837
|
+
React__default.createElement('input', { ref: function ref(el) {
|
|
8838
|
+
return inputRef.current[index] = el;
|
|
8839
|
+
}, type: 'radio', id: 'male', name: choice._type, value: choice._key }),
|
|
8840
|
+
' ' + choice.choiceText
|
|
8841
|
+
)
|
|
8842
|
+
);
|
|
8843
|
+
}),
|
|
8844
|
+
React__default.createElement(
|
|
8845
|
+
Button$1,
|
|
8846
|
+
{ disabled: !selectedChoice, style: { width: '100%', borderRadius: '5px', fontWeight: 'bold ' }, className: 'mt-3', type: 'submit' },
|
|
8847
|
+
'Vote'
|
|
8848
|
+
)
|
|
8849
|
+
)
|
|
8850
|
+
),
|
|
8851
|
+
showAnswer && dateChecked ? React__default.createElement(
|
|
8852
|
+
'div',
|
|
8853
|
+
{ className: 'progress-container mb-3' },
|
|
8854
|
+
React__default.createElement(Results, null)
|
|
8855
|
+
) : React__default.createElement(
|
|
8856
|
+
'div',
|
|
8857
|
+
null,
|
|
8858
|
+
!resultsDate && React__default.createElement(Results, null)
|
|
8819
8859
|
),
|
|
8820
8860
|
showAnswer && response && React__default.createElement(BlockContent, { blocks: response, serializers: getSerializers }),
|
|
8821
8861
|
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-be51248f.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';
|