@mjhls/mjh-framework 1.0.715 → 1.0.716

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.
Files changed (106) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/EventsDeck.js +3 -21
  3. package/dist/cjs/ExternalResources.js +2 -1
  4. package/dist/cjs/PartnerDetailListing.js +2 -1
  5. package/dist/cjs/TaxonomyDescription.js +2 -1
  6. package/dist/cjs/VideoProgramLandingPage.js +2 -1
  7. package/dist/cjs/View.js +2 -1
  8. package/dist/cjs/_object-to-array-bec5fcf2.js +25 -0
  9. package/dist/cjs/getSerializers.js +2 -1
  10. package/dist/cjs/{index-27f9e7ef.js → index-7d880c49.js} +347 -28
  11. package/dist/cjs/index.js +2 -1
  12. package/dist/esm/AD.js +1 -1
  13. package/dist/esm/AD300x250.js +11 -11
  14. package/dist/esm/AD300x250x600.js +11 -11
  15. package/dist/esm/AD728x90.js +11 -11
  16. package/dist/esm/ADFloatingFooter.js +11 -11
  17. package/dist/esm/ADFooter.js +5 -5
  18. package/dist/esm/ADGutter.js +11 -11
  19. package/dist/esm/{ADInfeed-a9a35a5c.js → ADInfeed-3ee501b9.js} +2 -2
  20. package/dist/esm/ADSkyscraper.js +11 -11
  21. package/dist/esm/ADSponsoredResources.js +11 -11
  22. package/dist/esm/ADWebcast.js +11 -11
  23. package/dist/esm/ADWelcome.js +11 -11
  24. package/dist/esm/{ADlgInfeed-ce2e0e3a.js → ADlgInfeed-0bf06b17.js} +2 -2
  25. package/dist/esm/AccordionPanel.js +5 -5
  26. package/dist/esm/AdSlot.js +11 -11
  27. package/dist/esm/AdSlotsProvider.js +8 -8
  28. package/dist/esm/AlphabeticList.js +9 -9
  29. package/dist/esm/ArticleCarousel.js +9 -9
  30. package/dist/esm/ArticleSeriesListing.js +12 -12
  31. package/dist/esm/Auth.js +11 -11
  32. package/dist/esm/{AuthorComponent-c29a0075.js → AuthorComponent-c7ff069f.js} +1 -1
  33. package/dist/esm/Beam.js +8 -8
  34. package/dist/esm/Breadcrumbs.js +5 -5
  35. package/dist/esm/BrowseVideosListing.js +9 -9
  36. package/dist/esm/CMEDeck.js +10 -10
  37. package/dist/esm/Column2.js +9 -9
  38. package/dist/esm/Column3.js +13 -13
  39. package/dist/esm/DeckContent.js +18 -18
  40. package/dist/esm/DeckQueue.js +13 -13
  41. package/dist/esm/{Dfp-db06d7dc.js → Dfp-5d779279.js} +5 -5
  42. package/dist/esm/EventsDeck.js +13 -31
  43. package/dist/esm/ExternalResources.js +19 -18
  44. package/dist/esm/ForbesHero.js +6 -6
  45. package/dist/esm/GridContent.js +20 -20
  46. package/dist/esm/GridHero.js +6 -6
  47. package/dist/esm/GroupDeck.js +8 -8
  48. package/dist/esm/HamMagazine.js +9 -9
  49. package/dist/esm/IssueContentDeck.js +6 -6
  50. package/dist/esm/IssueDeck.js +9 -9
  51. package/dist/esm/IssueLanding.js +15 -15
  52. package/dist/esm/LeftNav.js +11 -11
  53. package/dist/esm/MasterDeck.js +19 -19
  54. package/dist/esm/NavDvm.js +8 -8
  55. package/dist/esm/NavMagazine.js +9 -9
  56. package/dist/esm/NavNative.js +8 -8
  57. package/dist/esm/NavNormal.js +8 -8
  58. package/dist/esm/OncliveLargeHero.js +6 -6
  59. package/dist/esm/PageFilter.js +5 -5
  60. package/dist/esm/PartnerDetailListing.js +22 -21
  61. package/dist/esm/PopUpModal.js +5 -5
  62. package/dist/esm/PublicationLanding.js +9 -9
  63. package/dist/esm/QueueDeckExpanded.js +15 -15
  64. package/dist/esm/Search.js +5 -5
  65. package/dist/esm/Segment.js +7 -7
  66. package/dist/esm/SideFooter.js +9 -9
  67. package/dist/esm/{SocialSearchComponent-fab3e851.js → SocialSearchComponent-c3216d1a.js} +1 -1
  68. package/dist/esm/TaxonomyCard.js +3 -3
  69. package/dist/esm/TaxonomyDescription.js +19 -18
  70. package/dist/esm/TemplateNormal.js +14 -14
  71. package/dist/esm/Ustream.js +5 -5
  72. package/dist/esm/VideoProgramLandingPage.js +19 -18
  73. package/dist/esm/VideoSeriesCard.js +6 -6
  74. package/dist/esm/VideoSeriesFilter.js +8 -8
  75. package/dist/esm/VideoSeriesLandingPage.js +19 -19
  76. package/dist/esm/VideoSeriesListing.js +12 -12
  77. package/dist/esm/View.js +21 -20
  78. package/dist/esm/YahooHero.js +6 -6
  79. package/dist/esm/YoutubeGroup.js +8 -8
  80. package/dist/esm/{_is-array-9383b394.js → _is-array-674f71ec.js} +1 -1
  81. package/dist/esm/{_iter-detect-d4d262ee.js → _iter-detect-48516cd3.js} +2 -2
  82. package/dist/esm/{_object-pie-71ac75a4.js → _object-pie-33c40e79.js} +1 -1
  83. package/dist/esm/{_object-sap-6a003379.js → _object-sap-fd3054d0.js} +1 -1
  84. package/dist/esm/_object-to-array-8f409e54.js +23 -0
  85. package/dist/esm/{_set-species-0b056cff.js → _set-species-494ed292.js} +4 -4
  86. package/dist/esm/{_to-object-9bef3b62.js → _to-object-97770c52.js} +1 -1
  87. package/dist/esm/{asyncToGenerator-acd1cc47.js → asyncToGenerator-2bd4099a.js} +6 -6
  88. package/dist/esm/{core.get-iterator-method-1b116089.js → core.get-iterator-method-d1d5ed02.js} +2 -2
  89. package/dist/esm/{define-property-9a008401.js → define-property-ec6d528d.js} +1 -1
  90. package/dist/esm/{defineProperty-ddd52c29.js → defineProperty-ea516b15.js} +1 -1
  91. package/dist/esm/{es6.string.iterator-b24a54f2.js → es6.string.iterator-aa6068a3.js} +1 -1
  92. package/dist/esm/{extends-c2b1c9d7.js → extends-31d65aba.js} +2 -2
  93. package/dist/esm/getRelatedArticle.js +7 -7
  94. package/dist/esm/getSerializers.js +19 -18
  95. package/dist/esm/{getTargeting-b1a7be54.js → getTargeting-2d402d66.js} +2 -2
  96. package/dist/esm/getTargeting.js +8 -8
  97. package/dist/esm/{index-db270302.js → index-998e7b12.js} +352 -33
  98. package/dist/esm/index.js +26 -25
  99. package/dist/esm/{inherits-18d4a779.js → inherits-5906fbea.js} +5 -5
  100. package/dist/esm/{keys-9bb7939c.js → keys-a0b0c7a4.js} +2 -2
  101. package/dist/esm/{slicedToArray-34468155.js → slicedToArray-cdeaee08.js} +4 -4
  102. package/dist/esm/{stringify-8a4f19f7.js → stringify-d4839bab.js} +1 -1
  103. package/dist/esm/{toConsumableArray-5212fee7.js → toConsumableArray-fa2dcda7.js} +4 -4
  104. package/dist/esm/{typeof-64422756.js → typeof-e9cea9e8.js} +5 -5
  105. package/dist/esm/{web.dom.iterable-ca37144a.js → web.dom.iterable-035980f3.js} +2 -2
  106. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { z as _defined, A as _toInteger, m as _hide, b as _descriptors, p as _anObject, a as _objectKeys, g as _objectDp, k as _global, B as _sharedKey, y as _domCreate, r as _enumBugKeys, v as _shared, w as _uid, u as _has, o as _propertyDesc, h as _toObject, c as _export } from './_to-object-9bef3b62.js';
1
+ import { z as _defined, A as _toInteger, k as _hide, d as _descriptors, o as _anObject, n as _objectKeys, e as _objectDp, i as _global, B as _sharedKey, y as _domCreate, q as _enumBugKeys, v as _shared, w as _uid, u as _has, m as _propertyDesc, f as _toObject, _ as _export } from './_to-object-97770c52.js';
2
2
  import { c as createCommonjsModule } from './_commonjsHelpers-0c4b6f40.js';
3
3
 
4
4
  // true -> String#at
@@ -1,6 +1,6 @@
1
1
  import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelpers-0c4b6f40.js';
2
- import { l as _fails, h as _toObject, i as _iobject, a as _objectKeys, b as _descriptors, c as _export, d as _core } from './_to-object-9bef3b62.js';
3
- import { a as _objectGops, _ as _objectPie } from './_object-pie-71ac75a4.js';
2
+ import { j as _fails, f as _toObject, g as _iobject, n as _objectKeys, d as _descriptors, _ as _export, a as _core } from './_to-object-97770c52.js';
3
+ import { _ as _objectGops, a as _objectPie } from './_object-pie-33c40e79.js';
4
4
 
5
5
  // 19.1.2.1 Object.assign(target, source, ...)
6
6
 
@@ -1,14 +1,14 @@
1
- import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-acd1cc47.js';
1
+ import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-2bd4099a.js';
2
2
  import { c as createCommonjsModule, u as unwrapExports, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
3
3
  import { c as cookie } from './index-db3bb315.js';
4
4
  import getQuery from './getQuery.js';
5
- import './es6.string.iterator-b24a54f2.js';
6
- import './_to-object-9bef3b62.js';
7
- import './web.dom.iterable-ca37144a.js';
5
+ import './es6.string.iterator-aa6068a3.js';
6
+ import './_to-object-97770c52.js';
7
+ import './web.dom.iterable-035980f3.js';
8
8
  import './_library-528f1934.js';
9
- import './core.get-iterator-method-1b116089.js';
10
- import './_set-species-0b056cff.js';
11
- import './_iter-detect-d4d262ee.js';
9
+ import './core.get-iterator-method-d1d5ed02.js';
10
+ import './_set-species-494ed292.js';
11
+ import './_iter-detect-48516cd3.js';
12
12
 
13
13
  var defaultParseOptions = {
14
14
  decodeValues: true,
@@ -1,13 +1,13 @@
1
1
  import 'react';
2
- export { g as default } from './index-db270302.js';
2
+ export { g as default } from './index-998e7b12.js';
3
3
  import './BlockContent-d8cd739c.js';
4
4
  import './entities-932b50cf.js';
5
- import './slicedToArray-34468155.js';
5
+ import './slicedToArray-cdeaee08.js';
6
6
  import './_commonjsHelpers-0c4b6f40.js';
7
- import './web.dom.iterable-ca37144a.js';
8
- import './es6.string.iterator-b24a54f2.js';
9
- import './_to-object-9bef3b62.js';
10
- import './core.get-iterator-method-1b116089.js';
7
+ import './web.dom.iterable-035980f3.js';
8
+ import './es6.string.iterator-aa6068a3.js';
9
+ import './_to-object-97770c52.js';
10
+ import './core.get-iterator-method-d1d5ed02.js';
11
11
  import 'react-bootstrap';
12
12
  import './index-3f5c03b2.js';
13
13
  import './index-669ff425.js';
@@ -16,24 +16,25 @@ import 'next/router';
16
16
  import './index-c7e2ac95.js';
17
17
  import './util-3ab476bf.js';
18
18
  import './Beam.js';
19
- import './stringify-8a4f19f7.js';
20
- import './asyncToGenerator-acd1cc47.js';
19
+ import './stringify-d4839bab.js';
20
+ import './asyncToGenerator-2bd4099a.js';
21
21
  import './_library-528f1934.js';
22
- import './_set-species-0b056cff.js';
23
- import './_iter-detect-d4d262ee.js';
22
+ import './_set-species-494ed292.js';
23
+ import './_iter-detect-48516cd3.js';
24
24
  import './Segment.js';
25
25
  import './main-1450d277.js';
26
- import './extends-c2b1c9d7.js';
27
- import './_object-pie-71ac75a4.js';
26
+ import './extends-31d65aba.js';
27
+ import './_object-pie-33c40e79.js';
28
28
  import './index-752d1dae.js';
29
29
  import 'react-dom';
30
- import './typeof-64422756.js';
31
- import './_is-array-9383b394.js';
30
+ import './typeof-e9cea9e8.js';
31
+ import './_is-array-674f71ec.js';
32
32
  import './brightcove-react-player-loader.es-b43c695a.js';
33
33
  import './GroupDeck.js';
34
34
  import './smoothscroll-fa4e3f8c.js';
35
35
  import './moment-bc12cb97.js';
36
- import './toConsumableArray-5212fee7.js';
36
+ import './_object-to-array-8f409e54.js';
37
+ import './toConsumableArray-fa2dcda7.js';
37
38
  import 'react-bootstrap/Pagination';
38
39
  import 'react-bootstrap/Button';
39
40
  import './AdSlot.js';
@@ -42,9 +43,9 @@ import './isSymbol-807e927e.js';
42
43
  import 'react-bootstrap/Row';
43
44
  import 'react-bootstrap/Col';
44
45
  import 'next/head';
45
- import './inherits-18d4a779.js';
46
- import './_object-sap-6a003379.js';
47
- import './define-property-9a008401.js';
46
+ import './inherits-5906fbea.js';
47
+ import './_object-sap-fd3054d0.js';
48
+ import './define-property-ec6d528d.js';
48
49
  import './index.esm-3fdda599.js';
49
50
  import './iconBase-602d52fe.js';
50
51
  import 'react-bootstrap/Figure';
@@ -1,5 +1,5 @@
1
- import { _ as _extends } from './extends-c2b1c9d7.js';
2
- import { _ as _toConsumableArray } from './toConsumableArray-5212fee7.js';
1
+ import { _ as _extends } from './extends-31d65aba.js';
2
+ import { _ as _toConsumableArray } from './toConsumableArray-fa2dcda7.js';
3
3
 
4
4
  var getContentPlacementUrl = function getContentPlacementUrl(cp) {
5
5
  var cp_url = '';
@@ -1,9 +1,9 @@
1
- import './extends-c2b1c9d7.js';
2
- import './toConsumableArray-5212fee7.js';
3
- export { g as default } from './getTargeting-b1a7be54.js';
1
+ import './extends-31d65aba.js';
2
+ import './toConsumableArray-fa2dcda7.js';
3
+ export { g as default } from './getTargeting-2d402d66.js';
4
4
  import './_commonjsHelpers-0c4b6f40.js';
5
- import './_to-object-9bef3b62.js';
6
- import './_object-pie-71ac75a4.js';
7
- import './es6.string.iterator-b24a54f2.js';
8
- import './_iter-detect-d4d262ee.js';
9
- import './core.get-iterator-method-1b116089.js';
5
+ import './_to-object-97770c52.js';
6
+ import './_object-pie-33c40e79.js';
7
+ import './es6.string.iterator-aa6068a3.js';
8
+ import './_iter-detect-48516cd3.js';
9
+ import './core.get-iterator-method-d1d5ed02.js';
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
2
- import { _ as _slicedToArray } from './slicedToArray-34468155.js';
2
+ import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-cdeaee08.js';
3
3
  import { Carousel, Table, Figure as Figure$1, Button, ProgressBar, Card, Row as Row$1, Col as Col$1 } from 'react-bootstrap';
4
4
  import { i as imageUrlBuilder } from './index-3f5c03b2.js';
5
5
  import { l as lib_3 } from './index-669ff425.js';
@@ -12,13 +12,15 @@ import Beam from './Beam.js';
12
12
  import Segment from './Segment.js';
13
13
  import { d as main_16, b as main_39, m as main_40 } from './main-1450d277.js';
14
14
  import { B as BlockContent } from './BlockContent-d8cd739c.js';
15
- import { _ as _extends } from './extends-c2b1c9d7.js';
15
+ import { _ as _extends } from './extends-31d65aba.js';
16
16
  import { L as LazyLoad } from './index-752d1dae.js';
17
- import { _ as _typeof$1 } from './typeof-64422756.js';
17
+ import { _ as _typeof$1 } from './typeof-e9cea9e8.js';
18
18
  import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-b43c695a.js';
19
19
  import GroupDeck from './GroupDeck.js';
20
20
  import { m as moment } from './moment-bc12cb97.js';
21
- import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-5212fee7.js';
21
+ import { _ as _export, a as _core } from './_to-object-97770c52.js';
22
+ import { _ as _objectToArray } from './_object-to-array-8f409e54.js';
23
+ import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-fa2dcda7.js';
22
24
  import Pagination from 'react-bootstrap/Pagination';
23
25
  import Button$1 from 'react-bootstrap/Button';
24
26
  import { h as html_decode_1 } from './entities-932b50cf.js';
@@ -26,7 +28,7 @@ import DFPAdSlot from './AdSlot.js';
26
28
  import Row from 'react-bootstrap/Row';
27
29
  import Col from 'react-bootstrap/Col';
28
30
  import Head from 'next/head';
29
- import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-18d4a779.js';
31
+ import { _ as _inherits$1, a as _classCallCheck$1, b as _possibleConstructorReturn$1, c as _Object$getPrototypeOf, d as _createClass$1 } from './inherits-5906fbea.js';
30
32
  import { d as IoIosArrowDropupCircle } from './index.esm-3fdda599.js';
31
33
  import Figure$2 from 'react-bootstrap/Figure';
32
34
 
@@ -7481,10 +7483,200 @@ var Poll = function Poll(_ref) {
7481
7483
  return React.createElement(
7482
7484
  'div',
7483
7485
  { key: choice._key, className: 'mb-3' },
7486
+ React.createElement(
7487
+ 'div',
7488
+ { className: 'correct-answer' },
7489
+ React.createElement(
7490
+ 'div',
7491
+ null,
7492
+ choice.choiceText
7493
+ ),
7494
+ choice.choiceAnswer === true && React.createElement(
7495
+ 'div',
7496
+ null,
7497
+ React.createElement(
7498
+ 'span',
7499
+ { style: { color: 'limegreen' } },
7500
+ 'Correct!'
7501
+ )
7502
+ )
7503
+ ),
7504
+ React.createElement(ProgressBar, { now: percentage }),
7484
7505
  React.createElement(
7485
7506
  'span',
7486
- null,
7487
- choice.choiceText
7507
+ { className: 'float-right' },
7508
+ percentage,
7509
+ '% (',
7510
+ choice.choiceCount ? choice.choiceCount : 0,
7511
+ ' Votes)'
7512
+ )
7513
+ );
7514
+ })
7515
+ ),
7516
+ showAnswer && React.createElement(
7517
+ 'h4',
7518
+ { className: 'text-center small p-3' },
7519
+ 'Total Votes: ',
7520
+ choicesTotalCount
7521
+ ),
7522
+ showAnswer && response && React.createElement(BlockContent, { blocks: response, serializers: getSerializers }),
7523
+ React.createElement(
7524
+ 'style',
7525
+ { jsx: 'true' },
7526
+ '\n .correct-answer {\n display: flex;\n justify-content: space-between;\n }\n .progress-bar {\n color: #fff;\n }\n '
7527
+ )
7528
+ );
7529
+ };
7530
+
7531
+ // https://github.com/tc39/proposal-object-values-entries
7532
+
7533
+ var $values = _objectToArray(false);
7534
+
7535
+ _export(_export.S, 'Object', {
7536
+ values: function values(it) {
7537
+ return $values(it);
7538
+ }
7539
+ });
7540
+
7541
+ var values = _core.Object.values;
7542
+
7543
+ var values$1 = createCommonjsModule(function (module) {
7544
+ module.exports = { "default": values, __esModule: true };
7545
+ });
7546
+
7547
+ var _Object$values = unwrapExports(values$1);
7548
+
7549
+ var Poll$1 = function Poll(_ref) {
7550
+ var node = _ref.node;
7551
+ _ref.client;
7552
+ _ref.pageview;
7553
+ _ref.videoAccountIDs;
7554
+ var onVote = _ref.onVote;
7555
+ _ref.showVotes;
7556
+ var getSerializers = _ref.getSerializers;
7557
+
7558
+ var _useState = useState(null),
7559
+ _useState2 = _slicedToArray(_useState, 2),
7560
+ selectedChoice = _useState2[0],
7561
+ setSelectedChoice = _useState2[1];
7562
+
7563
+ var _useState3 = useState(false),
7564
+ _useState4 = _slicedToArray(_useState3, 2),
7565
+ showAnswer = _useState4[0],
7566
+ setShowAnswer = _useState4[1];
7567
+
7568
+ var choices = node.choices,
7569
+ question = node.question,
7570
+ response = node.response,
7571
+ _node$showResults = node.showResults,
7572
+ showResults = _node$showResults === undefined ? false : _node$showResults;
7573
+
7574
+
7575
+ var onSubmitPoll = function onSubmitPoll(e, setShowAnswer) {
7576
+ e.preventDefault();
7577
+ var selections = [];
7578
+ var _iteratorNormalCompletion = true;
7579
+ var _didIteratorError = false;
7580
+ var _iteratorError = undefined;
7581
+
7582
+ try {
7583
+ for (var _iterator = _getIterator(_Object$values(e.currentTarget)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
7584
+ var input = _step.value;
7585
+
7586
+ if (input.nodeName === 'INPUT' && input.checked) {
7587
+ selections.push(input.value);
7588
+ }
7589
+ }
7590
+ } catch (err) {
7591
+ _didIteratorError = true;
7592
+ _iteratorError = err;
7593
+ } finally {
7594
+ try {
7595
+ if (!_iteratorNormalCompletion && _iterator.return) {
7596
+ _iterator.return();
7597
+ }
7598
+ } finally {
7599
+ if (_didIteratorError) {
7600
+ throw _iteratorError;
7601
+ }
7602
+ }
7603
+ }
7604
+
7605
+ onVote(node._key, selections.join(','));
7606
+ //setShowAnswer(true)
7607
+ };
7608
+ useEffect(function () {
7609
+ if (showResults) {
7610
+ setShowAnswer(showResults);
7611
+ }
7612
+ }, [showResults]);
7613
+
7614
+ var choicesTotalCount = choices && choices.reduce(function (acc, choice) {
7615
+ if (choice.choiceCount) {
7616
+ acc = acc + parseInt(choice.choiceCount);
7617
+ return acc;
7618
+ } else {
7619
+ return acc;
7620
+ }
7621
+ }, 0);
7622
+ return React.createElement(
7623
+ React.Fragment,
7624
+ null,
7625
+ question && React.createElement(
7626
+ 'p',
7627
+ { className: 'font-weight-bold' },
7628
+ question
7629
+ ),
7630
+ !showAnswer && choices && choices.length > 0 && React.createElement(
7631
+ 'form',
7632
+ { onSubmit: function onSubmit(e) {
7633
+ return onSubmitPoll(e);
7634
+ } },
7635
+ choices && choices.map(function (choice) {
7636
+ return React.createElement(
7637
+ 'div',
7638
+ { key: choice._key },
7639
+ React.createElement(
7640
+ 'label',
7641
+ { className: 'pl-2' },
7642
+ React.createElement('input', { type: 'checkbox', id: 'male', name: choice._type, value: choice._key, onChange: function onChange(e) {
7643
+ return setSelectedChoice(e.target.value);
7644
+ } }),
7645
+ ' ' + choice.choiceText
7646
+ )
7647
+ );
7648
+ }),
7649
+ React.createElement(
7650
+ Button,
7651
+ { disabled: !selectedChoice, type: 'submit' },
7652
+ 'Vote'
7653
+ )
7654
+ ),
7655
+ React.createElement(
7656
+ 'div',
7657
+ { className: 'progress-container' },
7658
+ showAnswer && choices && choices.length > 0 && choices.map(function (choice) {
7659
+ var percentage = choicesTotalCount && choicesTotalCount > 0 ? choice.choiceCount ? Math.floor(choice.choiceCount * 100 / choicesTotalCount) : 0 : 0;
7660
+ return React.createElement(
7661
+ 'div',
7662
+ { key: choice._key, className: 'mb-3' },
7663
+ React.createElement(
7664
+ 'div',
7665
+ { className: 'correct-answer' },
7666
+ React.createElement(
7667
+ 'div',
7668
+ null,
7669
+ choice.choiceText
7670
+ ),
7671
+ choice.choiceAnswer === true && React.createElement(
7672
+ 'div',
7673
+ null,
7674
+ React.createElement(
7675
+ 'span',
7676
+ { style: { color: 'limegreen' } },
7677
+ 'Correct!'
7678
+ )
7679
+ )
7488
7680
  ),
7489
7681
  React.createElement(ProgressBar, { now: percentage }),
7490
7682
  React.createElement(
@@ -7508,7 +7700,7 @@ var Poll = function Poll(_ref) {
7508
7700
  React.createElement(
7509
7701
  'style',
7510
7702
  { jsx: 'true' },
7511
- '\n .progress-bar {\n color: #fff;\n }\n '
7703
+ '\n .correct-answer {\n width: 100%;\n display: flex;\n justify-content: space-between;\n padding: 0 0.5rem;\n }\n .progress-bar {\n color: #fff;\n }\n '
7512
7704
  )
7513
7705
  );
7514
7706
  };
@@ -7548,6 +7740,13 @@ var Quiz = function Quiz(_ref) {
7548
7740
  pages = _useState10[0],
7549
7741
  setPages = _useState10[1];
7550
7742
 
7743
+ var answersRef = useRef(null);
7744
+
7745
+ var _useState11 = useState(false),
7746
+ _useState12 = _slicedToArray(_useState11, 2),
7747
+ isDisabled = _useState12[0],
7748
+ setIsDisabled = _useState12[1];
7749
+
7551
7750
  useEffect(function () {
7552
7751
  var totalPages = _Array$from({ length: pageCount }, function (v, k) {
7553
7752
  return k + 1;
@@ -7657,14 +7856,113 @@ var Quiz = function Quiz(_ref) {
7657
7856
  );
7658
7857
  };
7659
7858
 
7859
+ var checkAnswers = function checkAnswers(e) {
7860
+ if (!quizzes[currentPage - 1].quizAnswers) {
7861
+ setShowAnswer(true);
7862
+ return;
7863
+ }
7864
+
7865
+ var correctAnswers = [];
7866
+
7867
+ var _iteratorNormalCompletion = true;
7868
+ var _didIteratorError = false;
7869
+ var _iteratorError = undefined;
7870
+
7871
+ try {
7872
+ for (var _iterator = _getIterator(quizzes[currentPage - 1].quizAnswers), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
7873
+ var answer = _step.value;
7874
+
7875
+ if (answer.correctAnswer === true) {
7876
+ correctAnswers.push(answer._key);
7877
+ }
7878
+ }
7879
+ } catch (err) {
7880
+ _didIteratorError = true;
7881
+ _iteratorError = err;
7882
+ } finally {
7883
+ try {
7884
+ if (!_iteratorNormalCompletion && _iterator.return) {
7885
+ _iterator.return();
7886
+ }
7887
+ } finally {
7888
+ if (_didIteratorError) {
7889
+ throw _iteratorError;
7890
+ }
7891
+ }
7892
+ }
7893
+
7894
+ var _loop = function _loop(input) {
7895
+ var isCorrect = correctAnswers.findIndex(function (value) {
7896
+ return value === input.value;
7897
+ });
7898
+ if (input.nodeName === 'INPUT' && input.checked) {
7899
+ if (isCorrect < 0) {
7900
+ input.parentElement.style.color = '#ea1e1e';
7901
+ }
7902
+ setShowAnswer(true);
7903
+ }
7904
+ if (isCorrect >= 0) {
7905
+ input.parentElement.style.color = 'limegreen';
7906
+ }
7907
+ setIsDisabled(true);
7908
+ };
7909
+
7910
+ var _iteratorNormalCompletion2 = true;
7911
+ var _didIteratorError2 = false;
7912
+ var _iteratorError2 = undefined;
7913
+
7914
+ try {
7915
+ for (var _iterator2 = _getIterator(_Object$values(answersRef.current)), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
7916
+ var input = _step2.value;
7917
+
7918
+ _loop(input);
7919
+ }
7920
+ } catch (err) {
7921
+ _didIteratorError2 = true;
7922
+ _iteratorError2 = err;
7923
+ } finally {
7924
+ try {
7925
+ if (!_iteratorNormalCompletion2 && _iterator2.return) {
7926
+ _iterator2.return();
7927
+ }
7928
+ } finally {
7929
+ if (_didIteratorError2) {
7930
+ throw _iteratorError2;
7931
+ }
7932
+ }
7933
+ }
7934
+ };
7935
+
7660
7936
  return React.createElement(
7661
7937
  React.Fragment,
7662
7938
  null,
7663
- quizzes[currentPage - 1] && React.createElement(BlockContent, { blocks: quizzes[currentPage - 1].question, serializers: getSerializers }),
7939
+ quizzes[currentPage - 1] && React.createElement(
7940
+ React.Fragment,
7941
+ null,
7942
+ React.createElement(BlockContent, { blocks: quizzes[currentPage - 1].question, serializers: getSerializers }),
7943
+ quizzes[currentPage - 1].quizAnswers && quizzes[currentPage - 1].quizAnswers.length > 0 && React.createElement(
7944
+ 'form',
7945
+ { ref: answersRef, onSubmit: function onSubmit(e) {
7946
+ return e.preventDefault();
7947
+ } },
7948
+ quizzes[currentPage - 1].quizAnswers.map(function (answer, index) {
7949
+ return React.createElement(
7950
+ 'div',
7951
+ { key: answer._key },
7952
+ React.createElement(
7953
+ 'label',
7954
+ { className: 'pl-2' },
7955
+ quizzes[currentPage - 1].multiAnswer ? React.createElement('input', { type: 'checkbox', id: 'male', disabled: isDisabled, name: answer._type, value: answer._key }) : React.createElement('input', { type: 'radio', id: 'male', name: answer._type, value: answer._key }),
7956
+ ' ' + answer.answerText
7957
+ )
7958
+ );
7959
+ })
7960
+ )
7961
+ ),
7664
7962
  !showAnswer && React.createElement(
7665
7963
  Button$1,
7666
7964
  { onClick: function onClick() {
7667
- return setShowAnswer(true);
7965
+ return checkAnswers();
7668
7966
  }, variant: 'info', block: true },
7669
7967
  'Please click here for answer'
7670
7968
  ),
@@ -7676,7 +7974,7 @@ var Quiz = function Quiz(_ref) {
7676
7974
  null,
7677
7975
  'Answer:'
7678
7976
  ),
7679
- React.createElement(BlockContent, { blocks: quizzes[currentPage - 1].answer, serializers: getSerializers })
7977
+ quizzes[currentPage - 1].answer && React.createElement(BlockContent, { blocks: quizzes[currentPage - 1].answer, serializers: getSerializers })
7680
7978
  ),
7681
7979
  React.createElement('br', null),
7682
7980
  pageCount > 1 && React.createElement(
@@ -8946,7 +9244,15 @@ var getSerializers = function getSerializers() {
8946
9244
  articleSeries: function articleSeries(_ref3) {
8947
9245
  var node = _ref3.node;
8948
9246
 
8949
- return React.createElement(ArticleSeries, { nodes: node, accountIDs: videoAccountIDs || {}, pageview: pageview, client: client, getSerializers: getSerializers.apply(undefined, props), Ads: Ads || null, rootArticle: article || null });
9247
+ return React.createElement(ArticleSeries, {
9248
+ nodes: node,
9249
+ accountIDs: videoAccountIDs || {},
9250
+ pageview: pageview,
9251
+ client: client,
9252
+ getSerializers: getSerializers.apply(undefined, props),
9253
+ Ads: Ads || null,
9254
+ rootArticle: article || null
9255
+ });
8950
9256
  },
8951
9257
  figure: function figure(_ref4) {
8952
9258
  var node = _ref4.node;
@@ -9002,31 +9308,44 @@ var getSerializers = function getSerializers() {
9002
9308
 
9003
9309
  return React.createElement(Poll, { node: node, client: client, pageview: pageview, videoAccountIDs: videoAccountIDs, showVotes: showVotes, onVote: onVote, getSerializers: getSerializers(props) });
9004
9310
  },
9005
- quiz: function quiz(_ref14) {
9311
+ pollMultiChoice: function pollMultiChoice(_ref14) {
9006
9312
  var node = _ref14.node;
9313
+
9314
+ return React.createElement(Poll$1, {
9315
+ node: node,
9316
+ client: client,
9317
+ pageview: pageview,
9318
+ videoAccountIDs: videoAccountIDs,
9319
+ showVotes: showVotes,
9320
+ onVote: onVote,
9321
+ getSerializers: getSerializers(props)
9322
+ });
9323
+ },
9324
+ quiz: function quiz(_ref15) {
9325
+ var node = _ref15.node;
9007
9326
  var quizzes = node.quizzes;
9008
9327
 
9009
9328
  return React.createElement(Quiz, { quizzes: quizzes, getSerializers: getSerializers(props), pageview: pageview, currentPage: currentPage });
9010
9329
  },
9011
- leads: function leads(_ref15) {
9012
- var node = _ref15.node;
9330
+ leads: function leads(_ref16) {
9331
+ var node = _ref16.node;
9013
9332
  var leadID = node.leadID;
9014
9333
 
9015
9334
  var url = '' + drupalLeadSettings.baseUrl + leadID;
9016
9335
  return React.createElement(Leads, { url: url });
9017
9336
  },
9018
- slideshows: function slideshows(_ref16) {
9019
- var node = _ref16.node;
9337
+ slideshows: function slideshows(_ref17) {
9338
+ var node = _ref17.node;
9020
9339
 
9021
9340
  return React.createElement(Slideshow$1, { node: node, client: client, pageview: pageview, getSerializers: getSerializers(props) });
9022
9341
  },
9023
- nativeAd: function nativeAd(_ref17) {
9024
- var node = _ref17.node;
9342
+ nativeAd: function nativeAd(_ref18) {
9343
+ var node = _ref18.node;
9025
9344
 
9026
9345
  return React.createElement(NativeAd, { node: node });
9027
9346
  },
9028
- html_anchor_links: function html_anchor_links(_ref18) {
9029
- var node = _ref18.node;
9347
+ html_anchor_links: function html_anchor_links(_ref19) {
9348
+ var node = _ref19.node;
9030
9349
 
9031
9350
  return React.createElement(AnchorLinkElement, { node: node, getSerializers: getSerializers.apply(undefined, props), articleId: articleId });
9032
9351
  },
@@ -9036,15 +9355,15 @@ var getSerializers = function getSerializers() {
9036
9355
  brtag: function brtag() {
9037
9356
  return React.createElement('br', { className: 'line-break' });
9038
9357
  },
9039
- formstack: function formstack(_ref19) {
9040
- var node = _ref19.node;
9358
+ formstack: function formstack(_ref20) {
9359
+ var node = _ref20.node;
9041
9360
  var FormID = node.FormID,
9042
9361
  Caption = node.Caption;
9043
9362
 
9044
9363
  return React.createElement(Formstack, { FormID: FormID, Caption: Caption });
9045
9364
  },
9046
- multimedia: function multimedia(_ref20) {
9047
- var node = _ref20.node;
9365
+ multimedia: function multimedia(_ref21) {
9366
+ var node = _ref21.node;
9048
9367
 
9049
9368
  return React.createElement(MultiMedia, { node: node, client: client });
9050
9369
  }
@@ -9090,32 +9409,32 @@ var getSerializers = function getSerializers() {
9090
9409
  children
9091
9410
  );
9092
9411
  },
9093
- alignleft: function alignleft(_ref21) {
9094
- var children = _ref21.children;
9412
+ alignleft: function alignleft(_ref22) {
9413
+ var children = _ref22.children;
9095
9414
  return React.createElement(
9096
9415
  'div',
9097
9416
  { style: { textAlign: 'left' } },
9098
9417
  children
9099
9418
  );
9100
9419
  },
9101
- alignright: function alignright(_ref22) {
9102
- var children = _ref22.children;
9420
+ alignright: function alignright(_ref23) {
9421
+ var children = _ref23.children;
9103
9422
  return React.createElement(
9104
9423
  'div',
9105
9424
  { style: { textAlign: 'right' } },
9106
9425
  children
9107
9426
  );
9108
9427
  },
9109
- aligncenter: function aligncenter(_ref23) {
9110
- var children = _ref23.children;
9428
+ aligncenter: function aligncenter(_ref24) {
9429
+ var children = _ref24.children;
9111
9430
  return React.createElement(
9112
9431
  'div',
9113
9432
  { style: { textAlign: 'center' } },
9114
9433
  children
9115
9434
  );
9116
9435
  },
9117
- alignjustify: function alignjustify(_ref24) {
9118
- var children = _ref24.children;
9436
+ alignjustify: function alignjustify(_ref25) {
9437
+ var children = _ref25.children;
9119
9438
  return React.createElement(
9120
9439
  'div',
9121
9440
  { style: { textAlign: 'justify' } },