@mjhls/mjh-framework 1.0.1001-popup-polls → 1.0.1001
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/AD.js +1 -1
- package/dist/cjs/AD300x250.js +2 -3
- package/dist/cjs/AD300x250x600.js +2 -3
- package/dist/cjs/AD728x90.js +2 -3
- package/dist/cjs/ADFloatingFooter.js +2 -3
- package/dist/cjs/ADGutter.js +2 -3
- package/dist/cjs/ADSkyscraper.js +2 -3
- package/dist/cjs/ADSponsoredResources.js +2 -3
- package/dist/cjs/ADWebcast.js +2 -3
- package/dist/cjs/ADWelcome.js +2 -3
- package/dist/cjs/AdSlot.js +2 -3
- package/dist/cjs/AdSlotsProvider.js +2 -3
- package/dist/cjs/AlgoliaSearch.js +1068 -521
- package/dist/cjs/ArticleCarousel.js +1 -1
- package/dist/cjs/ArticleProgramLandingPage.js +5 -7
- package/dist/cjs/ArticleSeriesLandingPage.js +4 -5
- package/dist/cjs/ArticleSeriesListing.js +2 -3
- package/dist/cjs/Auth.js +40 -11
- package/dist/cjs/AuthWrapper.js +89 -19
- package/dist/cjs/CMEDeck.js +2 -3
- package/dist/cjs/Column3.js +2 -3
- package/dist/cjs/ContentCardPaginated.js +4 -5
- package/dist/cjs/DeckContent.js +3 -4
- package/dist/cjs/DeckQueue.js +2 -3
- package/dist/cjs/DeckQueuePaginated.js +3 -4
- package/dist/cjs/{Dfp-c313a700.js → Dfp-67646058.js} +1 -2
- package/dist/cjs/EventsDeck.js +2 -2
- package/dist/cjs/ExternalResources.js +6 -8
- package/dist/cjs/Feature.js +1 -1
- package/dist/cjs/GridContent.js +4 -5
- package/dist/cjs/GridContentPaginated.js +5 -6
- package/dist/cjs/HamMagazine.js +2 -2
- package/dist/cjs/HorizontalArticleListing.js +5 -7
- package/dist/cjs/{ImageSlider-17fdaf3b.js → ImageSlider-1ec0408b.js} +156 -116
- package/dist/cjs/IssueLanding.js +7 -9
- package/dist/cjs/LeftNav.js +2 -3
- package/dist/cjs/MasterDeck.js +4 -5
- package/dist/cjs/MasterDeckPaginated.js +5 -6
- package/dist/cjs/{MediaSeriesCard-eacea66a.js → MediaSeriesCard-78f709ca.js} +1 -1
- package/dist/cjs/MediaSeriesLanding.js +9 -11
- package/dist/cjs/MediaSeriesLandingPaginated.js +10 -12
- package/dist/cjs/NavMagazine.js +2 -2
- package/dist/cjs/NavNative.js +1 -1
- package/dist/cjs/{Pagination-842c556f.js → Pagination-6359861a.js} +1 -1
- package/dist/cjs/PartnerDetailListing.js +8 -11
- package/dist/cjs/PartnerDetailListingPaginated.js +9 -12
- package/dist/cjs/PodcastsLanding.js +7 -9
- package/dist/cjs/PubSection.js +4 -5
- package/dist/cjs/QueueDeckExpanded.js +4 -5
- package/dist/cjs/QueueDeckExpandedPaginated.js +5 -6
- package/dist/cjs/SeriesListingDeck.js +3 -4
- package/dist/cjs/{SeriesSlider-3d57985d.js → SeriesSlider-18fc6e71.js} +1 -1
- package/dist/cjs/{SocialSearchComponent-62bceb87.js → SocialSearchComponent-ca9c0c45.js} +1 -1
- package/dist/cjs/TaxonomyDescription.js +5 -7
- package/dist/cjs/TemplateNormal.js +3 -4
- package/dist/cjs/{Tooltip-4cb8849a.js → Tooltip-71754b2a.js} +355 -272
- package/dist/cjs/Ustream.js +1 -1
- package/dist/cjs/VideoProgramLandingPage.js +5 -7
- package/dist/cjs/VideoSeriesLandingPage.js +4 -5
- package/dist/cjs/VideoSeriesListing.js +2 -3
- package/dist/cjs/View.js +5 -6
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/getSerializers.js +5 -7
- package/dist/cjs/{index-d2a6ef75.js → index-7435b964.js} +467 -2
- package/dist/cjs/{index-f86bb269.js → index-96c331fd.js} +53 -52
- package/dist/cjs/index-b95410f0.js +54 -0
- package/dist/cjs/{index-19fbbcea.js → index-e4f1fe32.js} +99 -161
- package/dist/cjs/index.js +10 -13
- package/dist/cjs/{main-3643d499.js → main-6054981e.js} +4 -9
- package/dist/esm/AD.js +1 -1
- package/dist/esm/AD300x250.js +2 -3
- package/dist/esm/AD300x250x600.js +2 -3
- package/dist/esm/AD728x90.js +2 -3
- package/dist/esm/ADFloatingFooter.js +2 -3
- package/dist/esm/ADGutter.js +2 -3
- package/dist/esm/ADSkyscraper.js +2 -3
- package/dist/esm/ADSponsoredResources.js +2 -3
- package/dist/esm/ADWebcast.js +2 -3
- package/dist/esm/ADWelcome.js +2 -3
- package/dist/esm/AdSlot.js +2 -3
- package/dist/esm/AdSlotsProvider.js +2 -3
- package/dist/esm/AlgoliaSearch.js +1065 -518
- package/dist/esm/ArticleCarousel.js +1 -1
- package/dist/esm/ArticleProgramLandingPage.js +5 -7
- package/dist/esm/ArticleSeriesLandingPage.js +4 -5
- package/dist/esm/ArticleSeriesListing.js +2 -3
- package/dist/esm/Auth.js +40 -11
- package/dist/esm/AuthWrapper.js +86 -16
- package/dist/esm/CMEDeck.js +2 -3
- package/dist/esm/Column3.js +2 -3
- package/dist/esm/ContentCardPaginated.js +4 -5
- package/dist/esm/DeckContent.js +3 -4
- package/dist/esm/DeckQueue.js +2 -3
- package/dist/esm/DeckQueuePaginated.js +3 -4
- package/dist/esm/{Dfp-102f0beb.js → Dfp-cf85d203.js} +1 -2
- package/dist/esm/EventsDeck.js +2 -2
- package/dist/esm/ExternalResources.js +6 -8
- package/dist/esm/Feature.js +1 -1
- package/dist/esm/GridContent.js +4 -5
- package/dist/esm/GridContentPaginated.js +5 -6
- package/dist/esm/HamMagazine.js +2 -2
- package/dist/esm/HorizontalArticleListing.js +5 -7
- package/dist/esm/{ImageSlider-f84174cb.js → ImageSlider-83913c4c.js} +157 -117
- package/dist/esm/IssueLanding.js +7 -9
- package/dist/esm/LeftNav.js +2 -3
- package/dist/esm/MasterDeck.js +4 -5
- package/dist/esm/MasterDeckPaginated.js +5 -6
- package/dist/esm/{MediaSeriesCard-f56c8274.js → MediaSeriesCard-db0176b5.js} +1 -1
- package/dist/esm/MediaSeriesLanding.js +9 -11
- package/dist/esm/MediaSeriesLandingPaginated.js +10 -12
- package/dist/esm/NavMagazine.js +2 -2
- package/dist/esm/NavNative.js +1 -1
- package/dist/esm/{Pagination-dc30727b.js → Pagination-9fe9f61d.js} +1 -1
- package/dist/esm/PartnerDetailListing.js +8 -11
- package/dist/esm/PartnerDetailListingPaginated.js +9 -12
- package/dist/esm/PodcastsLanding.js +7 -9
- package/dist/esm/PubSection.js +4 -5
- package/dist/esm/QueueDeckExpanded.js +4 -5
- package/dist/esm/QueueDeckExpandedPaginated.js +5 -6
- package/dist/esm/SeriesListingDeck.js +3 -4
- package/dist/esm/{SeriesSlider-f771e20d.js → SeriesSlider-5728e349.js} +1 -1
- package/dist/esm/{SocialSearchComponent-165b4ae7.js → SocialSearchComponent-68d948b9.js} +1 -1
- package/dist/esm/TaxonomyDescription.js +5 -7
- package/dist/esm/TemplateNormal.js +3 -4
- package/dist/esm/{Tooltip-95655b44.js → Tooltip-8307d9d1.js} +150 -67
- package/dist/esm/Ustream.js +1 -1
- package/dist/esm/VideoProgramLandingPage.js +5 -7
- package/dist/esm/VideoSeriesLandingPage.js +4 -5
- package/dist/esm/VideoSeriesListing.js +2 -3
- package/dist/esm/View.js +5 -6
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/getSerializers.js +5 -7
- package/dist/esm/index-174b5baf.js +52 -0
- package/dist/esm/{index-79cfd25c.js → index-30a6257d.js} +53 -52
- package/dist/esm/{index-5d8b0a9d.js → index-3bb56969.js} +99 -161
- package/dist/esm/{index-f0fc23eb.js → index-5cc7b406.js} +466 -1
- package/dist/esm/index.js +10 -13
- package/dist/esm/{main-1894c974.js → main-9f6806ea.js} +4 -9
- package/package.json +1 -1
- package/dist/cjs/defineProperty-e0fb52c5.js +0 -73
- package/dist/cjs/events-1b438fe7.js +0 -469
- package/dist/cjs/index-50be6759.js +0 -105
- package/dist/cjs/typeof-1358762e.js +0 -33
- package/dist/esm/defineProperty-23a8f8cd.js +0 -68
- package/dist/esm/events-6c3a7a63.js +0 -467
- package/dist/esm/index-98ca9cec.js +0 -100
- package/dist/esm/typeof-2f07d0e8.js +0 -30
- /package/dist/cjs/{ADInfeed-0394f391.js → ADInfeed-ef933a08.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-759969d6.js → ADlgInfeed-0e931f24.js} +0 -0
- /package/dist/esm/{ADInfeed-5765a73a.js → ADInfeed-f946441a.js} +0 -0
- /package/dist/esm/{ADlgInfeed-5e36f317.js → ADlgInfeed-012e6f16.js} +0 -0
|
@@ -2,7 +2,7 @@ import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallba
|
|
|
2
2
|
import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-6ebcbfea.js';
|
|
3
3
|
import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button as Button$1, ProgressBar } from 'react-bootstrap';
|
|
4
4
|
import urlFor from './urlFor.js';
|
|
5
|
-
import { l as lib_3 } from './index-
|
|
5
|
+
import { l as lib_3 } from './index-5cc7b406.js';
|
|
6
6
|
import Router, { useRouter } from 'next/router';
|
|
7
7
|
import { g as getYoutubeId } from './index-c7e2ac95.js';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
@@ -10,7 +10,7 @@ import { c as createCommonjsModule, u as unwrapExports } from './_commonjsHelper
|
|
|
10
10
|
import { u as util } from './util-8ed16d48.js';
|
|
11
11
|
import './Beam.js';
|
|
12
12
|
import Segment from './Segment.js';
|
|
13
|
-
import { e as main_18, b as main_42, m as main_43 } from './main-
|
|
13
|
+
import { e as main_18, b as main_42, m as main_43 } from './main-9f6806ea.js';
|
|
14
14
|
import { B as BlockContent } from './BlockContent-1e73bd2c.js';
|
|
15
15
|
import { _ as _extends, b as _extends$1 } from './extends-6d8e3924.js';
|
|
16
16
|
import { u as urlForFile } from './urlForFile-b69adffc.js';
|
|
@@ -19,9 +19,6 @@ import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-958
|
|
|
19
19
|
import { _ as _typeof$1 } from './typeof-e9fc0c5d.js';
|
|
20
20
|
import { R as ReactPlayerLoader } from './brightcove-react-player-loader.es-57a70a56.js';
|
|
21
21
|
import { _ as _JSON$stringify } from './stringify-2b084bee.js';
|
|
22
|
-
import { _ as _export, a as _core } from './core.get-iterator-method-ea258bb1.js';
|
|
23
|
-
import { _ as _objectToArray } from './_object-to-array-2300e51b.js';
|
|
24
|
-
import { _ as _Object$keys } from './keys-31dcdb31.js';
|
|
25
22
|
import Modal from 'react-bootstrap/Modal';
|
|
26
23
|
import Button from 'react-bootstrap/Button';
|
|
27
24
|
import Form from 'react-bootstrap/Form';
|
|
@@ -29,6 +26,8 @@ import ReactGA from 'react-ga';
|
|
|
29
26
|
import GroupDeck from './GroupDeck.js';
|
|
30
27
|
import { m as moment } from './moment-bc12cb97.js';
|
|
31
28
|
import SocialShare from './SocialShare.js';
|
|
29
|
+
import { _ as _export, a as _core } from './core.get-iterator-method-ea258bb1.js';
|
|
30
|
+
import { _ as _objectToArray } from './_object-to-array-2300e51b.js';
|
|
32
31
|
import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
|
|
33
32
|
import Pagination from 'react-bootstrap/Pagination';
|
|
34
33
|
import { h as html_decode_1 } from './entities-6d9154b4.js';
|
|
@@ -1629,13 +1628,11 @@ function shouldUpdateVideo(prevProps, props) {
|
|
|
1629
1628
|
|
|
1630
1629
|
function filterResetOptions(opts) {
|
|
1631
1630
|
return _objectSpread(_objectSpread({}, opts), {}, {
|
|
1632
|
-
|
|
1633
|
-
width: 0,
|
|
1634
|
-
playerVars: _objectSpread(_objectSpread({}, opts.playerVars), {}, {
|
|
1631
|
+
playerVars: _objectSpread({
|
|
1635
1632
|
autoplay: 0,
|
|
1636
1633
|
start: 0,
|
|
1637
1634
|
end: 0
|
|
1638
|
-
})
|
|
1635
|
+
}, opts.playerVars)
|
|
1639
1636
|
});
|
|
1640
1637
|
}
|
|
1641
1638
|
/**
|
|
@@ -1650,7 +1647,7 @@ function filterResetOptions(opts) {
|
|
|
1650
1647
|
|
|
1651
1648
|
|
|
1652
1649
|
function shouldResetPlayer(prevProps, props) {
|
|
1653
|
-
return
|
|
1650
|
+
return !fastDeepEqual(filterResetOptions(prevProps.opts), filterResetOptions(props.opts));
|
|
1654
1651
|
}
|
|
1655
1652
|
/**
|
|
1656
1653
|
* Check whether a props change should result in an id or className update.
|
|
@@ -1661,7 +1658,7 @@ function shouldResetPlayer(prevProps, props) {
|
|
|
1661
1658
|
|
|
1662
1659
|
|
|
1663
1660
|
function shouldUpdatePlayer(prevProps, props) {
|
|
1664
|
-
return prevProps.id !== props.id || prevProps.className !== props.className
|
|
1661
|
+
return prevProps.id !== props.id || prevProps.className !== props.className;
|
|
1665
1662
|
}
|
|
1666
1663
|
|
|
1667
1664
|
var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
@@ -1748,9 +1745,6 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1748
1745
|
_this.internalPlayer.getIframe().then(function (iframe) {
|
|
1749
1746
|
if (_this.props.id) iframe.setAttribute('id', _this.props.id);else iframe.removeAttribute('id');
|
|
1750
1747
|
if (_this.props.className) iframe.setAttribute('class', _this.props.className);else iframe.removeAttribute('class');
|
|
1751
|
-
if (_this.props.opts && _this.props.opts.width) iframe.setAttribute('width', _this.props.opts.width);else iframe.removeAttribute('width');
|
|
1752
|
-
if (_this.props.opts && _this.props.opts.height) iframe.setAttribute('height', _this.props.opts.height);else iframe.removeAttribute('height');
|
|
1753
|
-
if (typeof _this.props.title === 'string') iframe.setAttribute('title', _this.props.title);else iframe.setAttribute('title', 'YouTube video player');
|
|
1754
1748
|
});
|
|
1755
1749
|
});
|
|
1756
1750
|
|
|
@@ -1849,8 +1843,7 @@ var YouTube = /*#__PURE__*/function (_React$Component) {
|
|
|
1849
1843
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
1850
1844
|
id: this.props.id,
|
|
1851
1845
|
className: this.props.className,
|
|
1852
|
-
ref: this.refContainer
|
|
1853
|
-
loading: this.props.loading
|
|
1846
|
+
ref: this.refContainer
|
|
1854
1847
|
}));
|
|
1855
1848
|
}
|
|
1856
1849
|
}]);
|
|
@@ -1875,10 +1868,6 @@ YouTube.propTypes = {
|
|
|
1875
1868
|
className: PropTypes.string,
|
|
1876
1869
|
// custom class name for player container element
|
|
1877
1870
|
containerClassName: PropTypes.string,
|
|
1878
|
-
// custom title for the iFrame, see https://www.w3.org/TR/WCAG20-TECHS/H64.html
|
|
1879
|
-
title: PropTypes.string,
|
|
1880
|
-
// custom loading for player element
|
|
1881
|
-
loading: PropTypes.oneOf(['lazy', 'eager', 'auto']),
|
|
1882
1871
|
// https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
|
|
1883
1872
|
opts: PropTypes.objectOf(PropTypes.any),
|
|
1884
1873
|
// event subscriptions
|
|
@@ -1895,7 +1884,6 @@ YouTube.defaultProps = {
|
|
|
1895
1884
|
videoId: null,
|
|
1896
1885
|
id: null,
|
|
1897
1886
|
className: null,
|
|
1898
|
-
loading: null,
|
|
1899
1887
|
opts: {},
|
|
1900
1888
|
containerClassName: '',
|
|
1901
1889
|
onReady: function onReady() {},
|
|
@@ -1905,8 +1893,7 @@ YouTube.defaultProps = {
|
|
|
1905
1893
|
onEnd: function onEnd() {},
|
|
1906
1894
|
onStateChange: function onStateChange() {},
|
|
1907
1895
|
onPlaybackRateChange: function onPlaybackRateChange() {},
|
|
1908
|
-
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1909
|
-
title: null
|
|
1896
|
+
onPlaybackQualityChange: function onPlaybackQualityChange() {}
|
|
1910
1897
|
};
|
|
1911
1898
|
|
|
1912
1899
|
var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
@@ -2212,24 +2199,6 @@ var IFrame = function IFrame(_ref) {
|
|
|
2212
2199
|
);
|
|
2213
2200
|
};
|
|
2214
2201
|
|
|
2215
|
-
// https://github.com/tc39/proposal-object-values-entries
|
|
2216
|
-
|
|
2217
|
-
var $values = _objectToArray(false);
|
|
2218
|
-
|
|
2219
|
-
_export(_export.S, 'Object', {
|
|
2220
|
-
values: function values(it) {
|
|
2221
|
-
return $values(it);
|
|
2222
|
-
}
|
|
2223
|
-
});
|
|
2224
|
-
|
|
2225
|
-
var values$1 = _core.Object.values;
|
|
2226
|
-
|
|
2227
|
-
var values = createCommonjsModule(function (module) {
|
|
2228
|
-
module.exports = { "default": values$1, __esModule: true };
|
|
2229
|
-
});
|
|
2230
|
-
|
|
2231
|
-
var _Object$values = unwrapExports(values);
|
|
2232
|
-
|
|
2233
2202
|
var PopupMultiChoice = function PopupMultiChoice(_ref) {
|
|
2234
2203
|
var question = _ref.question,
|
|
2235
2204
|
choices = _ref.choices,
|
|
@@ -2240,7 +2209,7 @@ var PopupMultiChoice = function PopupMultiChoice(_ref) {
|
|
|
2240
2209
|
inline: true,
|
|
2241
2210
|
label: choice.choiceText,
|
|
2242
2211
|
value: choice.choiceText,
|
|
2243
|
-
name:
|
|
2212
|
+
name: 'radioButton',
|
|
2244
2213
|
type: 'radio',
|
|
2245
2214
|
className: 'radioButton',
|
|
2246
2215
|
onClick: handlePollAnswer
|
|
@@ -2310,15 +2279,10 @@ var PopupPollModal = function PopupPollModal(props) {
|
|
|
2310
2279
|
pollAnswer = _useState2[0],
|
|
2311
2280
|
setPollAnswer = _useState2[1];
|
|
2312
2281
|
|
|
2313
|
-
var _useState3 = useState(
|
|
2282
|
+
var _useState3 = useState(''),
|
|
2314
2283
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
var _useState5 = useState(''),
|
|
2319
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
2320
|
-
textAnswer = _useState6[0],
|
|
2321
|
-
setTextAnswer = _useState6[1];
|
|
2284
|
+
textAnswer = _useState4[0],
|
|
2285
|
+
setTextAnswer = _useState4[1];
|
|
2322
2286
|
|
|
2323
2287
|
useEffect(function () {
|
|
2324
2288
|
var modal = document.getElementById('modalDiv');
|
|
@@ -2333,98 +2297,77 @@ var PopupPollModal = function PopupPollModal(props) {
|
|
|
2333
2297
|
setPollAnswer(e.target.value);
|
|
2334
2298
|
};
|
|
2335
2299
|
|
|
2336
|
-
var handleMultiItemPollAnswers = function handleMultiItemPollAnswers(e) {
|
|
2337
|
-
var question = e.target.name;
|
|
2338
|
-
var answer = e.target.value;
|
|
2339
|
-
var tempObj = {};
|
|
2340
|
-
tempObj[question] = answer;
|
|
2341
|
-
setMultiItemPollAnswers(function (prev) {
|
|
2342
|
-
return _extends({}, prev, tempObj);
|
|
2343
|
-
});
|
|
2344
|
-
};
|
|
2345
|
-
|
|
2346
2300
|
var handleSubmit = function handleSubmit(e) {
|
|
2347
2301
|
var currentDate = new Date(Date.now()).toUTCString();
|
|
2348
2302
|
// eslint-disable-next-line no-undef
|
|
2349
2303
|
var anonymousID = typeof analytics !== 'undefined' && typeof analytics.user === 'function' && analytics.user() && analytics.user().anonymousId();
|
|
2350
|
-
var formData = {};
|
|
2351
|
-
|
|
2352
2304
|
pollItems.forEach(function (item) {
|
|
2353
|
-
|
|
2305
|
+
var submitAnswer = void 0;
|
|
2306
|
+
if (item.format === 'multiChoice') submitAnswer = pollAnswer;
|
|
2307
|
+
if (item.format === 'textInput') submitAnswer = textAnswer;
|
|
2308
|
+
var formData = {
|
|
2354
2309
|
uuid: anonymousID,
|
|
2355
2310
|
url: pollUrl,
|
|
2356
2311
|
date: currentDate,
|
|
2357
|
-
|
|
2358
|
-
|
|
2312
|
+
question: item.question,
|
|
2313
|
+
answer: submitAnswer
|
|
2359
2314
|
};
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
case 8:
|
|
2394
|
-
case 'end':
|
|
2395
|
-
return _context.stop();
|
|
2315
|
+
var requestOptions = {
|
|
2316
|
+
method: 'POST',
|
|
2317
|
+
headers: { 'content-type': 'application/json' },
|
|
2318
|
+
body: _JSON$stringify({ data: formData })
|
|
2319
|
+
};
|
|
2320
|
+
var insertData = function () {
|
|
2321
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
2322
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
2323
|
+
while (1) {
|
|
2324
|
+
switch (_context.prev = _context.next) {
|
|
2325
|
+
case 0:
|
|
2326
|
+
_context.prev = 0;
|
|
2327
|
+
_context.next = 3;
|
|
2328
|
+
return fetch('/api/popup_polls', requestOptions).then(function (res) {
|
|
2329
|
+
return res.json();
|
|
2330
|
+
}).then(function (res) {
|
|
2331
|
+
return console.log(res);
|
|
2332
|
+
});
|
|
2333
|
+
|
|
2334
|
+
case 3:
|
|
2335
|
+
_context.next = 8;
|
|
2336
|
+
break;
|
|
2337
|
+
|
|
2338
|
+
case 5:
|
|
2339
|
+
_context.prev = 5;
|
|
2340
|
+
_context.t0 = _context['catch'](0);
|
|
2341
|
+
|
|
2342
|
+
if (_context.t0) console.log('There was an error in insertData in PopupPollModal.js: ' + _context.t0);
|
|
2343
|
+
|
|
2344
|
+
case 8:
|
|
2345
|
+
case 'end':
|
|
2346
|
+
return _context.stop();
|
|
2347
|
+
}
|
|
2396
2348
|
}
|
|
2397
|
-
}
|
|
2398
|
-
}
|
|
2399
|
-
}));
|
|
2349
|
+
}, _callee, _this, [[0, 5]]);
|
|
2350
|
+
}));
|
|
2400
2351
|
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2352
|
+
return function insertData() {
|
|
2353
|
+
return _ref.apply(this, arguments);
|
|
2354
|
+
};
|
|
2355
|
+
}();
|
|
2356
|
+
console.log('formData', formData);
|
|
2357
|
+
insertData();
|
|
2358
|
+
});
|
|
2407
2359
|
restartPlayer();
|
|
2360
|
+
// setIsPollingTime(false)
|
|
2408
2361
|
e.preventDefault();
|
|
2409
2362
|
};
|
|
2410
2363
|
|
|
2411
2364
|
var pollArray = [];
|
|
2412
|
-
|
|
2413
2365
|
pollItems.forEach(function (item, ind) {
|
|
2414
|
-
if (
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
pollArray.push(React__default.createElement(PopupPollTextInput, { textInputQuestion: item.question, textanswer: textAnswer, handleTextAnswer: handleTextAnswer, key: ind }));
|
|
2420
|
-
}
|
|
2421
|
-
} else {
|
|
2422
|
-
if (item.pollItems[0] && item.pollItems[0].format === 'multiChoice') {
|
|
2423
|
-
pollArray.push(React__default.createElement(PopupMultiChoice, { question: item.pollItems[0].question, choices: item.pollItems[0].choices, handlePollAnswer: handleMultiItemPollAnswers, key: ind }));
|
|
2424
|
-
}
|
|
2425
|
-
if (item.pollItems[0] && item.pollItems[0].format === 'textInput') {
|
|
2426
|
-
pollArray.push(React__default.createElement(PopupPollTextInput, { textInputQuestion: item.pollItems[0].question, textanswer: textAnswer, handleTextAnswer: handleTextAnswer, key: ind }));
|
|
2427
|
-
}
|
|
2366
|
+
if (item.format === 'multiChoice') {
|
|
2367
|
+
pollArray.push(React__default.createElement(PopupMultiChoice, { question: item.question, choices: item.choices, handlePollAnswer: handlePollAnswer, key: ind }));
|
|
2368
|
+
}
|
|
2369
|
+
if (item.format === 'textInput') {
|
|
2370
|
+
pollArray.push(React__default.createElement(PopupPollTextInput, { textInputQuestion: item.question, textanswer: textAnswer, handleTextAnswer: handleTextAnswer, key: ind }));
|
|
2428
2371
|
}
|
|
2429
2372
|
});
|
|
2430
2373
|
|
|
@@ -2433,10 +2376,7 @@ var PopupPollModal = function PopupPollModal(props) {
|
|
|
2433
2376
|
{ className: 'modalDiv', id: 'modalDiv' },
|
|
2434
2377
|
React__default.createElement(
|
|
2435
2378
|
Modal.Dialog,
|
|
2436
|
-
|
|
2437
|
-
props.closeable && React__default.createElement(Modal.Header, { closeButton: true, onClick: function onClick() {
|
|
2438
|
-
return restartPlayer();
|
|
2439
|
-
} }),
|
|
2379
|
+
null,
|
|
2440
2380
|
React__default.createElement(
|
|
2441
2381
|
Modal.Body,
|
|
2442
2382
|
null,
|
|
@@ -2448,13 +2388,9 @@ var PopupPollModal = function PopupPollModal(props) {
|
|
|
2448
2388
|
Button,
|
|
2449
2389
|
{ className: 'submitButton', type: 'submit', variant: 'success', disabled: !textAnswer },
|
|
2450
2390
|
'Submit'
|
|
2451
|
-
) : !textInputRender && multiChoiceRender ? React__default.createElement(
|
|
2452
|
-
Button,
|
|
2453
|
-
{ className: 'submitButton', type: 'submit', variant: 'success', disabled: !pollAnswer },
|
|
2454
|
-
'Submit'
|
|
2455
2391
|
) : React__default.createElement(
|
|
2456
2392
|
Button,
|
|
2457
|
-
{ className: 'submitButton', type: 'submit', variant: 'success' },
|
|
2393
|
+
{ className: 'submitButton', type: 'submit', variant: 'success', disabled: !pollAnswer },
|
|
2458
2394
|
'Submit'
|
|
2459
2395
|
)
|
|
2460
2396
|
)
|
|
@@ -2674,7 +2610,6 @@ var Video = function Video(_ref) {
|
|
|
2674
2610
|
experienceID = node.experienceID;
|
|
2675
2611
|
|
|
2676
2612
|
var polls = void 0;
|
|
2677
|
-
|
|
2678
2613
|
if (node.polls) polls = node.polls;
|
|
2679
2614
|
|
|
2680
2615
|
var _useState = useState(false),
|
|
@@ -2719,16 +2654,10 @@ var Video = function Video(_ref) {
|
|
|
2719
2654
|
return minutes * 60 + seconds;
|
|
2720
2655
|
};
|
|
2721
2656
|
var modalTimes = [];
|
|
2722
|
-
var initPolls = [];
|
|
2723
|
-
var nonInitPolls = [];
|
|
2724
2657
|
if (polls) {
|
|
2725
2658
|
polls.forEach(function (pollObj) {
|
|
2726
|
-
return
|
|
2659
|
+
return modalTimes.push(convertTime(pollObj.timestamp));
|
|
2727
2660
|
});
|
|
2728
|
-
polls.forEach(function (pollObj) {
|
|
2729
|
-
return pollObj.atStart ? initPolls.push(pollObj) : nonInitPolls.push(pollObj);
|
|
2730
|
-
});
|
|
2731
|
-
if (nonInitPolls.length > 0) polls = nonInitPolls;
|
|
2732
2661
|
}
|
|
2733
2662
|
|
|
2734
2663
|
var restartPlayer = function restartPlayer() {
|
|
@@ -2803,14 +2732,7 @@ var Video = function Video(_ref) {
|
|
|
2803
2732
|
return _ref2.apply(this, arguments);
|
|
2804
2733
|
};
|
|
2805
2734
|
}();
|
|
2806
|
-
|
|
2807
|
-
if (initPolls.length > 0) {
|
|
2808
|
-
player.pause();
|
|
2809
|
-
setPollItems(initPolls);
|
|
2810
|
-
setPollUrl(targeting.document_url[0]);
|
|
2811
|
-
setIsPollingTime(true);
|
|
2812
|
-
initPolls = [];
|
|
2813
|
-
}
|
|
2735
|
+
|
|
2814
2736
|
if (autoplay) {
|
|
2815
2737
|
autoPlayVideo();
|
|
2816
2738
|
}
|
|
@@ -2818,15 +2740,20 @@ var Video = function Video(_ref) {
|
|
|
2818
2740
|
// Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
|
|
2819
2741
|
Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
|
|
2820
2742
|
});
|
|
2821
|
-
|
|
2743
|
+
// let intId
|
|
2744
|
+
// const convertTime = (timeStr) => {
|
|
2745
|
+
// const minutes = parseInt(timeStr.slice(0, 2))
|
|
2746
|
+
// const seconds = parseInt(timeStr.slice(3))
|
|
2747
|
+
// return minutes * 60 + seconds
|
|
2748
|
+
// }
|
|
2749
|
+
// const modalTimes = []
|
|
2750
|
+
// polls.forEach(pollObj => modalTimes.push(convertTime(pollObj.timestamp)))
|
|
2822
2751
|
player.on('play', function (evt) {
|
|
2823
|
-
console.log('in player.on');
|
|
2824
2752
|
var duration = player.mediainfo.duration;
|
|
2825
2753
|
var current = player.currentTime();
|
|
2826
2754
|
var queue = Math.floor(duration / 10);
|
|
2827
2755
|
var segment = Math.floor(current / queue);
|
|
2828
|
-
|
|
2829
|
-
if (polls && initPolls.length === 0) {
|
|
2756
|
+
if (polls) {
|
|
2830
2757
|
var vidPlayer = this;
|
|
2831
2758
|
intId = setInterval(function () {
|
|
2832
2759
|
var ct = player.currentTime();
|
|
@@ -2927,8 +2854,6 @@ var Video = function Video(_ref) {
|
|
|
2927
2854
|
, textInputRender: textInputRender
|
|
2928
2855
|
// eslint-disable-next-line react/jsx-indent-props
|
|
2929
2856
|
, multiChoiceRender: multiChoiceRender
|
|
2930
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2931
|
-
, closeable: node.polls && node.polls[0] ? node.polls[0].closeable : null
|
|
2932
2857
|
}) : null,
|
|
2933
2858
|
React__default.createElement(ReactPlayerLoader, {
|
|
2934
2859
|
onSuccess: onVideoSuccess,
|
|
@@ -2961,8 +2886,6 @@ var Video = function Video(_ref) {
|
|
|
2961
2886
|
, textInputRender: textInputRender
|
|
2962
2887
|
// eslint-disable-next-line react/jsx-indent-props
|
|
2963
2888
|
, multiChoiceRender: multiChoiceRender
|
|
2964
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
2965
|
-
, closeable: node.polls && node.polls[0] ? node.polls[0].closeable : null
|
|
2966
2889
|
}) : null,
|
|
2967
2890
|
React__default.createElement(ReactPlayerLoader, {
|
|
2968
2891
|
accountId: accountIDs.brightcove.accountId,
|
|
@@ -2996,9 +2919,6 @@ var Video = function Video(_ref) {
|
|
|
2996
2919
|
, textInputRender: textInputRender
|
|
2997
2920
|
// eslint-disable-next-line react/jsx-indent-props
|
|
2998
2921
|
, multiChoiceRender: multiChoiceRender
|
|
2999
|
-
// eslint-disable-next-line react/jsx-indent-props
|
|
3000
|
-
, closeable: node.polls && node.polls[0] ? node.polls[0].closeable : null
|
|
3001
|
-
|
|
3002
2922
|
}) : null
|
|
3003
2923
|
);
|
|
3004
2924
|
}
|
|
@@ -8215,6 +8135,24 @@ var Poll$1 = function Poll(_ref) {
|
|
|
8215
8135
|
);
|
|
8216
8136
|
};
|
|
8217
8137
|
|
|
8138
|
+
// https://github.com/tc39/proposal-object-values-entries
|
|
8139
|
+
|
|
8140
|
+
var $values = _objectToArray(false);
|
|
8141
|
+
|
|
8142
|
+
_export(_export.S, 'Object', {
|
|
8143
|
+
values: function values(it) {
|
|
8144
|
+
return $values(it);
|
|
8145
|
+
}
|
|
8146
|
+
});
|
|
8147
|
+
|
|
8148
|
+
var values$1 = _core.Object.values;
|
|
8149
|
+
|
|
8150
|
+
var values = createCommonjsModule(function (module) {
|
|
8151
|
+
module.exports = { "default": values$1, __esModule: true };
|
|
8152
|
+
});
|
|
8153
|
+
|
|
8154
|
+
var _Object$values = unwrapExports(values);
|
|
8155
|
+
|
|
8218
8156
|
var Poll = function Poll(_ref) {
|
|
8219
8157
|
var node = _ref.node;
|
|
8220
8158
|
_ref.client;
|