@mjhls/mjh-framework 1.0.918 → 1.0.919-TEST-V2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/ArticleProgramLandingPage.js +4 -2
  3. package/dist/cjs/ExternalResources.js +3 -1
  4. package/dist/cjs/HorizontalArticleListing.js +4 -2
  5. package/dist/cjs/IssueLanding.js +4 -2
  6. package/dist/cjs/{MediaSeriesCard-34235827.js → MediaSeriesCard-7e1ebe32.js} +1 -1
  7. package/dist/cjs/MediaSeriesLanding.js +5 -3
  8. package/dist/cjs/MediaSeriesLandingPaginated.js +4 -2
  9. package/dist/cjs/PartnerDetailListing.js +4 -2
  10. package/dist/cjs/PartnerDetailListingPaginated.js +3 -1
  11. package/dist/cjs/TaxonomyDescription.js +4 -2
  12. package/dist/cjs/VideoProgramLandingPage.js +2 -1
  13. package/dist/cjs/View.js +8 -1
  14. package/dist/cjs/getSerializers.js +4 -2
  15. package/dist/cjs/{index-f9f5f7c0.js → index-619b5600.js} +327 -22
  16. package/dist/cjs/index.js +1 -1
  17. package/dist/esm/ArticleProgramLandingPage.js +4 -2
  18. package/dist/esm/ExternalResources.js +3 -1
  19. package/dist/esm/HorizontalArticleListing.js +4 -2
  20. package/dist/esm/IssueLanding.js +4 -2
  21. package/dist/esm/{MediaSeriesCard-8a9b91e6.js → MediaSeriesCard-ca3c348f.js} +1 -1
  22. package/dist/esm/MediaSeriesLanding.js +5 -3
  23. package/dist/esm/MediaSeriesLandingPaginated.js +4 -2
  24. package/dist/esm/PartnerDetailListing.js +4 -2
  25. package/dist/esm/PartnerDetailListingPaginated.js +3 -1
  26. package/dist/esm/TaxonomyDescription.js +4 -2
  27. package/dist/esm/VideoProgramLandingPage.js +2 -1
  28. package/dist/esm/View.js +8 -1
  29. package/dist/esm/getSerializers.js +4 -2
  30. package/dist/esm/{index-4d8a8743.js → index-47a80fcc.js} +328 -25
  31. package/dist/esm/index.js +1 -1
  32. package/package.json +2 -1
@@ -1,7 +1,7 @@
1
1
  import { _ as _extends, b as _extends$1 } from './extends-6d8e3924.js';
2
2
  import React__default, { useState, useEffect, useRef, useLayoutEffect, useCallback } from 'react';
3
3
  import { _ as _slicedToArray, a as _getIterator } from './slicedToArray-6ebcbfea.js';
4
- import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button, ProgressBar } from 'react-bootstrap';
4
+ import { Carousel, Table, Figure as Figure$1, Card, Row, Col, Button as Button$1, ProgressBar } from 'react-bootstrap';
5
5
  import urlFor from './urlFor.js';
6
6
  import { l as lib_3 } from './index-f0fc23eb.js';
7
7
  import Router, { useRouter } from 'next/router';
@@ -18,6 +18,10 @@ import { L as LazyLoad } from './index-755f2cc2.js';
18
18
  import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-5ef104a7.js';
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
+ import { _ as _JSON$stringify } from './stringify-2b084bee.js';
22
+ import Modal from 'react-bootstrap/Modal';
23
+ import Button from 'react-bootstrap/Button';
24
+ import Form from 'react-bootstrap/Form';
21
25
  import GroupDeck from './GroupDeck.js';
22
26
  import { m as moment } from './moment-bc12cb97.js';
23
27
  import SocialShare from './SocialShare.js';
@@ -25,7 +29,6 @@ import { _ as _export, a as _core } from './core.get-iterator-method-ea258bb1.js
25
29
  import { _ as _objectToArray } from './_object-to-array-2300e51b.js';
26
30
  import { a as _Array$from, _ as _toConsumableArray } from './toConsumableArray-f7074d7c.js';
27
31
  import Pagination from 'react-bootstrap/Pagination';
28
- import Button$1 from 'react-bootstrap/Button';
29
32
  import { h as html_decode_1 } from './entities-6d9154b4.js';
30
33
  import DFPAdSlot from './AdSlot.js';
31
34
  import Row$1 from 'react-bootstrap/Row';
@@ -2224,7 +2227,7 @@ var VideoMp4 = function VideoMp4(_ref) {
2224
2227
  var duration = player.duration;
2225
2228
  var queue = Math.floor(duration / 10);
2226
2229
  var segment = Math.floor(current / queue);
2227
- //Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
2230
+ // Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'MP4')
2228
2231
  Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'MP4');
2229
2232
  };
2230
2233
 
@@ -2234,7 +2237,7 @@ var VideoMp4 = function VideoMp4(_ref) {
2234
2237
  var queue = Math.floor(duration / 10);
2235
2238
  var segment = Math.floor(current / queue);
2236
2239
  if (!queueProgress.includes(segment)) {
2237
- //Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
2240
+ // Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'MP4')
2238
2241
  Segment.report_video_event('Video Segment', main_18, duration, current, segment, 'MP4');
2239
2242
  queueProgress.push(segment);
2240
2243
  }
@@ -2247,7 +2250,7 @@ var VideoMp4 = function VideoMp4(_ref) {
2247
2250
  var duration = player.duration;
2248
2251
  var queue = Math.floor(duration / 10);
2249
2252
  var segment = Math.floor(current / queue);
2250
- //Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
2253
+ // Beam.report_beam_video('Play', deviceType, duration, current, segment, 'MP4')
2251
2254
  Segment.report_video_event('Video Play', main_18, duration, current, segment, 'MP4');
2252
2255
 
2253
2256
  if (!playReported) {
@@ -2268,7 +2271,7 @@ var VideoMp4 = function VideoMp4(_ref) {
2268
2271
  var queue = Math.floor(duration / 10);
2269
2272
  var segment = Math.floor(current / queue);
2270
2273
 
2271
- //Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
2274
+ // Beam.report_beam_video('End', deviceType, duration, current, segment, 'MP4')
2272
2275
  Segment.report_video_event('Video End', main_18, duration, current, segment, 'MP4');
2273
2276
  setEndReported(true);
2274
2277
  clearInterval(intervalID);
@@ -2281,7 +2284,7 @@ var VideoMp4 = function VideoMp4(_ref) {
2281
2284
  var duration = player.duration - current;
2282
2285
  var queue = Math.floor(duration / 10);
2283
2286
  var segment = Math.floor(current / queue);
2284
- //Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
2287
+ // Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'MP4')
2285
2288
  Segment.report_video_event('Video Pause', main_18, duration, current, segment, 'MP4');
2286
2289
  };
2287
2290
 
@@ -2312,6 +2315,220 @@ var VideoMp4 = function VideoMp4(_ref) {
2312
2315
  );
2313
2316
  };
2314
2317
 
2318
+ var PopupMultiChoice = function PopupMultiChoice(_ref) {
2319
+ var question = _ref.question,
2320
+ choices = _ref.choices,
2321
+ handlePollAnswer = _ref.handlePollAnswer;
2322
+
2323
+ var choiceArray = choices.map(function (choice) {
2324
+ return React__default.createElement(Form.Check, {
2325
+ inline: true,
2326
+ label: choice.choiceText,
2327
+ value: choice.choiceText,
2328
+ name: 'radioButton',
2329
+ type: 'radio',
2330
+ className: 'radioButton',
2331
+ onClick: handlePollAnswer
2332
+ });
2333
+ });
2334
+ return React__default.createElement(
2335
+ 'div',
2336
+ {
2337
+ key: 'inline-radio',
2338
+ className: 'mb-3' },
2339
+ React__default.createElement(
2340
+ 'h2',
2341
+ {
2342
+ className: 'radioLabelText'
2343
+ },
2344
+ question
2345
+ ),
2346
+ React__default.createElement(
2347
+ 'div',
2348
+ {
2349
+ className: 'multiChoiceDiv'
2350
+ },
2351
+ choiceArray
2352
+ )
2353
+ );
2354
+ };
2355
+
2356
+ var PopupPollTextInput = function PopupPollTextInput(_ref) {
2357
+ var textInputQuestion = _ref.textInputQuestion,
2358
+ textAnswer = _ref.textAnswer,
2359
+ handleTextAnswer = _ref.handleTextAnswer;
2360
+
2361
+ return React__default.createElement(
2362
+ 'div',
2363
+ {
2364
+ className: 'textInputDiv'
2365
+ },
2366
+ React__default.createElement(
2367
+ 'h2',
2368
+ {
2369
+ className: 'textInputQuestion'
2370
+ },
2371
+ textInputQuestion
2372
+ ),
2373
+ React__default.createElement(Form.Control, {
2374
+ type: 'text',
2375
+ className: 'textInput',
2376
+ value: textAnswer,
2377
+ placeholder: 'Your response',
2378
+ onChange: handleTextAnswer
2379
+ })
2380
+ );
2381
+ };
2382
+
2383
+ var _this = undefined;
2384
+ var fetch = require('node-fetch');
2385
+
2386
+ var PopupPollModal = function PopupPollModal(props) {
2387
+ var pollItems = props.pollItems,
2388
+ pollUrl = props.pollUrl,
2389
+ restartPlayer = props.restartPlayer,
2390
+ multiChoiceRender = props.multiChoiceRender,
2391
+ textInputRender = props.textInputRender;
2392
+
2393
+ var _useState = useState(''),
2394
+ _useState2 = _slicedToArray(_useState, 2),
2395
+ pollAnswer = _useState2[0],
2396
+ setPollAnswer = _useState2[1];
2397
+
2398
+ var _useState3 = useState(''),
2399
+ _useState4 = _slicedToArray(_useState3, 2),
2400
+ textAnswer = _useState4[0],
2401
+ setTextAnswer = _useState4[1];
2402
+
2403
+ useEffect(function () {
2404
+ var modal = document.getElementById('modalDiv');
2405
+ modal.style.visibility = 'visible';
2406
+ }, []);
2407
+
2408
+ var handleTextAnswer = function handleTextAnswer(e) {
2409
+ setTextAnswer(e.target.value);
2410
+ };
2411
+
2412
+ var handlePollAnswer = function handlePollAnswer(e) {
2413
+ setPollAnswer(e.target.value);
2414
+ };
2415
+
2416
+ var handleSubmit = function handleSubmit(e) {
2417
+ var currentDate = new Date(Date.now()).toUTCString();
2418
+ // eslint-disable-next-line no-undef
2419
+ var anonymousID = typeof analytics !== 'undefined' && typeof analytics.user === 'function' && analytics.user() && analytics.user().anonymousId();
2420
+ pollItems.forEach(function (item) {
2421
+ var submitAnswer = void 0;
2422
+ if (item.format === 'multiChoice') submitAnswer = pollAnswer;
2423
+ if (item.format === 'textInput') submitAnswer = textAnswer;
2424
+ var formData = {
2425
+ uuid: anonymousID,
2426
+ url: pollUrl,
2427
+ date: currentDate,
2428
+ question: item.question,
2429
+ answer: submitAnswer
2430
+ };
2431
+ var requestOptions = {
2432
+ method: 'POST',
2433
+ headers: { 'content-type': 'application/json' },
2434
+ body: _JSON$stringify({ data: formData })
2435
+ };
2436
+ var insertData = function () {
2437
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
2438
+ return regenerator.wrap(function _callee$(_context) {
2439
+ while (1) {
2440
+ switch (_context.prev = _context.next) {
2441
+ case 0:
2442
+ _context.next = 2;
2443
+ return fetch('/api/popup_polls', requestOptions).then(function (res) {
2444
+ return res.json();
2445
+ }).then(function (res) {
2446
+ return console.log(res);
2447
+ });
2448
+
2449
+ case 2:
2450
+ case 'end':
2451
+ return _context.stop();
2452
+ }
2453
+ }
2454
+ }, _callee, _this);
2455
+ }));
2456
+
2457
+ return function insertData() {
2458
+ return _ref.apply(this, arguments);
2459
+ };
2460
+ }();
2461
+ console.log('formData', formData);
2462
+ insertData();
2463
+ });
2464
+ restartPlayer();
2465
+ e.preventDefault();
2466
+ };
2467
+
2468
+ var pollArray = [];
2469
+ pollItems.forEach(function (item, ind) {
2470
+ if (item.format === 'multiChoice') {
2471
+ pollArray.push(React__default.createElement(PopupMultiChoice, {
2472
+ question: item.question,
2473
+ choices: item.choices,
2474
+ handlePollAnswer: handlePollAnswer,
2475
+ key: ind
2476
+ }));
2477
+ }
2478
+ if (item.format === 'textInput') {
2479
+ pollArray.push(React__default.createElement(PopupPollTextInput, {
2480
+ textInputQuestion: item.question,
2481
+ textanswer: textAnswer,
2482
+ handleTextAnswer: handleTextAnswer,
2483
+ key: ind
2484
+ }));
2485
+ }
2486
+ });
2487
+
2488
+ return React__default.createElement(
2489
+ 'div',
2490
+ {
2491
+ className: 'modalDiv',
2492
+ id: 'modalDiv'
2493
+ },
2494
+ React__default.createElement(
2495
+ Modal.Dialog,
2496
+ null,
2497
+ React__default.createElement(
2498
+ Modal.Body,
2499
+ null,
2500
+ React__default.createElement(
2501
+ Form,
2502
+ {
2503
+ onSubmit: handleSubmit,
2504
+ className: 'modalForm'
2505
+ },
2506
+ pollArray,
2507
+ textInputRender && !multiChoiceRender ? React__default.createElement(
2508
+ Button,
2509
+ {
2510
+ className: 'submitButton',
2511
+ type: 'submit',
2512
+ variant: 'success',
2513
+ disabled: !textAnswer
2514
+ },
2515
+ 'Submit'
2516
+ ) : React__default.createElement(
2517
+ Button,
2518
+ {
2519
+ className: 'submitButton',
2520
+ type: 'submit',
2521
+ variant: 'success',
2522
+ disabled: !pollAnswer
2523
+ },
2524
+ 'Submit'
2525
+ )
2526
+ )
2527
+ )
2528
+ )
2529
+ );
2530
+ };
2531
+
2315
2532
  var Video = function Video(_ref) {
2316
2533
  var node = _ref.node,
2317
2534
  accountIDs = _ref.accountIDs,
@@ -2328,14 +2545,52 @@ var Video = function Video(_ref) {
2328
2545
  playlistID = node.playlistID,
2329
2546
  experienceID = node.experienceID;
2330
2547
 
2548
+ var polls = void 0;
2549
+ if (node.polls) polls = node.polls;
2550
+
2331
2551
  var _useState = useState(false),
2332
2552
  _useState2 = _slicedToArray(_useState, 2),
2333
2553
  videoLoaded = _useState2[0],
2334
2554
  setVideoLoaded = _useState2[1];
2335
2555
 
2556
+ var _useState3 = useState(false),
2557
+ _useState4 = _slicedToArray(_useState3, 2),
2558
+ isPollingTime = _useState4[0],
2559
+ setIsPollingTime = _useState4[1];
2560
+
2561
+ var _useState5 = useState([]),
2562
+ _useState6 = _slicedToArray(_useState5, 2),
2563
+ pollItems = _useState6[0],
2564
+ setPollItems = _useState6[1];
2565
+
2566
+ var _useState7 = useState(''),
2567
+ _useState8 = _slicedToArray(_useState7, 2),
2568
+ pollUrl = _useState8[0],
2569
+ setPollUrl = _useState8[1];
2570
+
2571
+ var _useState9 = useState(),
2572
+ _useState10 = _slicedToArray(_useState9, 2),
2573
+ videoPlayer = _useState10[0],
2574
+ setVideoPlayer = _useState10[1];
2575
+
2576
+ var _useState11 = useState(false),
2577
+ _useState12 = _slicedToArray(_useState11, 2),
2578
+ multiChoiceRender = _useState12[0],
2579
+ setMultiChoiceRender = _useState12[1];
2580
+
2581
+ var _useState13 = useState(false),
2582
+ _useState14 = _slicedToArray(_useState13, 2),
2583
+ textInputRender = _useState14[0],
2584
+ setTextInputRender = _useState14[1];
2585
+
2586
+ var restartPlayer = function restartPlayer() {
2587
+ setIsPollingTime(false);
2588
+ videoPlayer.play();
2589
+ };
2590
+
2336
2591
  useEffect(function () {
2337
2592
  if (!videoLoaded && experienceID) {
2338
- //To load Experience Player JS
2593
+ // To load Experience Player JS
2339
2594
  var experiencePlayerScript = document.createElement('script');
2340
2595
  experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
2341
2596
  document.body.appendChild(experiencePlayerScript);
@@ -2348,8 +2603,9 @@ var Video = function Video(_ref) {
2348
2603
  };
2349
2604
 
2350
2605
  var onVideoSuccess = function onVideoSuccess(success) {
2351
- //console.log('success:', success.ref)
2606
+ // console.log('success:', success)
2352
2607
  var player = success.ref;
2608
+ setVideoPlayer(player);
2353
2609
  if (_typeof$1(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
2354
2610
  player.ima3.settings.debug = true;
2355
2611
  if (targeting.content_placement && targeting.document_url) {
@@ -2360,7 +2616,7 @@ var Video = function Video(_ref) {
2360
2616
  player.on('loadedmetadata', function (evt) {
2361
2617
  var _this = this;
2362
2618
 
2363
- //console.log('loadedmetadata:', evt)
2619
+ // console.log('loadedmetadata:', evt)
2364
2620
  console.log('mediainfo:', player.mediainfo); // get the duration from here
2365
2621
  var duration = player.mediainfo.duration;
2366
2622
  var current = player.currentTime();
@@ -2404,17 +2660,46 @@ var Video = function Video(_ref) {
2404
2660
  autoPlayVideo();
2405
2661
  }
2406
2662
 
2407
- //Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2663
+ // Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2408
2664
  Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2409
2665
  });
2410
-
2411
- // play
2666
+ var intId = void 0;
2667
+ var convertTime = function convertTime(timeStr) {
2668
+ var minutes = parseInt(timeStr.slice(0, 2));
2669
+ var seconds = parseInt(timeStr.slice(3));
2670
+ return minutes * 60 + seconds;
2671
+ };
2672
+ var modalTimes = [];
2673
+ polls.forEach(function (pollObj) {
2674
+ return modalTimes.push(convertTime(pollObj.timestamp));
2675
+ });
2676
+ // console.log('last poll time', modalTimes[modalTimes.length - 1])
2412
2677
  player.on('play', function (evt) {
2413
2678
  var duration = player.mediainfo.duration;
2414
2679
  var current = player.currentTime();
2415
2680
  var queue = Math.floor(duration / 10);
2416
2681
  var segment = Math.floor(current / queue);
2417
- //Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2682
+ if (polls) {
2683
+ var vidPlayer = this;
2684
+ intId = setInterval(function () {
2685
+ var ct = player.currentTime();
2686
+ // if (intId) console.log(`interval ID is ${intId}`)
2687
+ // console.log('isPollingTime', isPollingTime)
2688
+ modalTimes.forEach(function (modalTime, ind) {
2689
+ if (Math.floor(ct) === modalTime) {
2690
+ setPollItems(polls[ind].pollItems);
2691
+ setPollUrl(targeting.document_url[0]);
2692
+ setIsPollingTime(true);
2693
+ polls[ind].pollItems.forEach(function (item) {
2694
+ if (item.format === 'multiChoice') setMultiChoiceRender(true);
2695
+ if (item.format === 'textInput') setTextInputRender(true);
2696
+ });
2697
+ vidPlayer.pause();
2698
+ }
2699
+ });
2700
+ }, 1000);
2701
+ }
2702
+ // Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2418
2703
  Segment.report_video_event('Video Play', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2419
2704
  });
2420
2705
 
@@ -2424,7 +2709,9 @@ var Video = function Video(_ref) {
2424
2709
  var current = player.currentTime();
2425
2710
  var queue = Math.floor(duration / 10);
2426
2711
  var segment = Math.floor(current / queue);
2427
- //Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2712
+ clearInterval(intId);
2713
+ console.log('clearing interval ' + intId + ' in pause');
2714
+ // Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2428
2715
  Segment.report_video_event('Video Pause', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2429
2716
  });
2430
2717
 
@@ -2434,9 +2721,10 @@ var Video = function Video(_ref) {
2434
2721
  var current = player.currentTime();
2435
2722
  var queue = Math.floor(duration / 10);
2436
2723
  var segment = Math.floor(current / queue);
2437
- //Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2724
+ clearInterval(intId);
2725
+ // Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2438
2726
  Segment.report_video_event('Video End', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2439
- //This is for old series format
2727
+ // This is for old series format
2440
2728
  autoplayNextVideo(evt);
2441
2729
  if (nextVideo) {
2442
2730
  window.location.href = '/view/' + nextVideo;
@@ -2450,7 +2738,7 @@ var Video = function Video(_ref) {
2450
2738
  var queue = Math.floor(duration / 10);
2451
2739
  var segment = Math.floor(current / queue);
2452
2740
  if (!queueProgress.includes(segment)) {
2453
- //Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2741
+ // Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2454
2742
  Segment.report_video_event('Video Segment', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2455
2743
  queueProgress.push(segment);
2456
2744
  }
@@ -2459,19 +2747,19 @@ var Video = function Video(_ref) {
2459
2747
  // ad impression
2460
2748
  player.on('ads-ad-started', function (evt) {
2461
2749
  var duration = player.ads.ad.duration;
2462
- player.ads.ad.id;
2750
+ // const id = player.ads.ad.id
2463
2751
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2464
2752
 
2465
- //Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2753
+ // Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2466
2754
  Segment.report_ad_event('Video Ad Started', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2467
2755
  });
2468
2756
 
2469
2757
  // ad ended
2470
2758
  player.on('ads-ad-ended', function (evt) {
2471
2759
  var duration = player.ads.ad.duration;
2472
- player.ads.ad.id;
2760
+ // const id = player.ads.ad.id
2473
2761
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2474
- //Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2762
+ // Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2475
2763
  Segment.report_ad_event('Video Ad Ended', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2476
2764
  });
2477
2765
  };
@@ -2481,6 +2769,20 @@ var Video = function Video(_ref) {
2481
2769
  return React__default.createElement(
2482
2770
  'div',
2483
2771
  null,
2772
+ isPollingTime ? React__default.createElement(PopupPollModal
2773
+ // eslint-disable-next-line react/jsx-indent-props
2774
+ , { pollItems: pollItems
2775
+ // eslint-disable-next-line react/jsx-indent-props
2776
+ , pollUrl: pollUrl
2777
+ // eslint-disable-next-line react/jsx-indent-props
2778
+ , isPollingTime: isPollingTime
2779
+ // eslint-disable-next-line react/jsx-indent-props
2780
+ , restartPlayer: restartPlayer
2781
+ // eslint-disable-next-line react/jsx-indent-props
2782
+ , textInputRender: textInputRender
2783
+ // eslint-disable-next-line react/jsx-indent-props
2784
+ , multiChoiceRender: multiChoiceRender
2785
+ }) : null,
2484
2786
  React__default.createElement(ReactPlayerLoader, {
2485
2787
  onSuccess: onVideoSuccess,
2486
2788
  onFailure: onVideoFailure,
@@ -2522,6 +2824,7 @@ var Video = function Video(_ref) {
2522
2824
  }
2523
2825
  return null;
2524
2826
  }
2827
+
2525
2828
  if (source === 'mp4') {
2526
2829
  return React__default.createElement(
2527
2830
  'div',
@@ -7629,7 +7932,7 @@ var Poll$1 = function Poll(_ref) {
7629
7932
  );
7630
7933
  }),
7631
7934
  React__default.createElement(
7632
- Button,
7935
+ Button$1,
7633
7936
  { disabled: !selectedChoice, type: 'submit' },
7634
7937
  'Vote'
7635
7938
  )
@@ -7806,7 +8109,7 @@ var Poll = function Poll(_ref) {
7806
8109
  );
7807
8110
  }),
7808
8111
  React__default.createElement(
7809
- Button,
8112
+ Button$1,
7810
8113
  { disabled: !selectedChoice, type: 'submit' },
7811
8114
  'Vote'
7812
8115
  )
@@ -8119,7 +8422,7 @@ var Quiz = function Quiz(_ref) {
8119
8422
  )
8120
8423
  ),
8121
8424
  !showAnswer && React__default.createElement(
8122
- Button$1,
8425
+ Button,
8123
8426
  { onClick: function onClick() {
8124
8427
  return checkAnswers();
8125
8428
  }, variant: 'info', block: true },
package/dist/esm/index.js CHANGED
@@ -79,7 +79,7 @@ export { default as VerticalHero } from './VerticalHero.js';
79
79
  export { default as YahooHero } from './YahooHero.js';
80
80
  export { default as GridHero } from './GridHero.js';
81
81
  export { default as ConferenceArticleCard } from './ConferenceArticleCard.js';
82
- export { g as getSerializers } from './index-4d8a8743.js';
82
+ export { g as getSerializers } from './index-47a80fcc.js';
83
83
  export { default as Beam } from './Beam.js';
84
84
  export { default as Segment } from './Segment.js';
85
85
  export { default as KMTracker } from './KMTracker.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.918",
3
+ "version": "1.0.919-TEST-V2",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",
@@ -99,6 +99,7 @@
99
99
  "js-cookie": "^2.2.1",
100
100
  "next-auth": "^3.2.0",
101
101
  "next-cookies": "^2.0.3",
102
+ "node-fetch": "^2.6.1",
102
103
  "nookies": "^2.4.0",
103
104
  "react-cookies": "^0.1.1",
104
105
  "react-facebook": "^8.1.4",