@mjhls/mjh-framework 1.0.918 → 1.0.919-TEST

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-31e82b76.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-da44b1e7.js} +345 -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-3d6acf32.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-803278c4.js} +346 -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,229 @@ 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
+ multiChoiceRender && !textInputRender ? React__default.createElement(
2508
+ Button,
2509
+ {
2510
+ className: 'submitButton',
2511
+ type: 'submit',
2512
+ variant: 'success',
2513
+ disabled: !pollAnswer
2514
+ },
2515
+ 'Submit'
2516
+ ) : textInputRender && !multiChoiceRender ? React__default.createElement(
2517
+ Button,
2518
+ {
2519
+ className: 'submitButton',
2520
+ type: 'submit',
2521
+ variant: 'success',
2522
+ disabled: !textAnswer
2523
+ },
2524
+ 'Submit'
2525
+ ) : React__default.createElement(
2526
+ Button,
2527
+ {
2528
+ className: 'submitButton',
2529
+ type: 'submit',
2530
+ variant: 'success',
2531
+ disabled: !textAnswer || !pollAnswer
2532
+ },
2533
+ 'Submit'
2534
+ )
2535
+ )
2536
+ )
2537
+ )
2538
+ );
2539
+ };
2540
+
2315
2541
  var Video = function Video(_ref) {
2316
2542
  var node = _ref.node,
2317
2543
  accountIDs = _ref.accountIDs,
@@ -2328,14 +2554,57 @@ var Video = function Video(_ref) {
2328
2554
  playlistID = node.playlistID,
2329
2555
  experienceID = node.experienceID;
2330
2556
 
2557
+ var polls = void 0;
2558
+ if (node.polls) polls = node.polls;
2559
+
2331
2560
  var _useState = useState(false),
2332
2561
  _useState2 = _slicedToArray(_useState, 2),
2333
2562
  videoLoaded = _useState2[0],
2334
2563
  setVideoLoaded = _useState2[1];
2335
2564
 
2565
+ var _useState3 = useState(false),
2566
+ _useState4 = _slicedToArray(_useState3, 2),
2567
+ isPollingTime = _useState4[0],
2568
+ setIsPollingTime = _useState4[1];
2569
+
2570
+ var _useState5 = useState([]),
2571
+ _useState6 = _slicedToArray(_useState5, 2),
2572
+ pollItems = _useState6[0],
2573
+ setPollItems = _useState6[1];
2574
+
2575
+ var _useState7 = useState(''),
2576
+ _useState8 = _slicedToArray(_useState7, 2),
2577
+ pollUrl = _useState8[0],
2578
+ setPollUrl = _useState8[1];
2579
+
2580
+ var _useState9 = useState(),
2581
+ _useState10 = _slicedToArray(_useState9, 2),
2582
+ videoPlayer = _useState10[0],
2583
+ setVideoPlayer = _useState10[1];
2584
+
2585
+ var _useState11 = useState(0),
2586
+ _useState12 = _slicedToArray(_useState11, 2),
2587
+ currentPlayTime = _useState12[0],
2588
+ setCurrentPlayTime = _useState12[1];
2589
+
2590
+ var _useState13 = useState(false),
2591
+ _useState14 = _slicedToArray(_useState13, 2),
2592
+ multiChoiceRender = _useState14[0],
2593
+ setMultiChoiceRender = _useState14[1];
2594
+
2595
+ var _useState15 = useState(false),
2596
+ _useState16 = _slicedToArray(_useState15, 2),
2597
+ textInputRender = _useState16[0],
2598
+ setTextInputRender = _useState16[1];
2599
+
2600
+ var restartPlayer = function restartPlayer() {
2601
+ setIsPollingTime(false);
2602
+ videoPlayer.play();
2603
+ };
2604
+
2336
2605
  useEffect(function () {
2337
2606
  if (!videoLoaded && experienceID) {
2338
- //To load Experience Player JS
2607
+ // To load Experience Player JS
2339
2608
  var experiencePlayerScript = document.createElement('script');
2340
2609
  experiencePlayerScript.src = 'https://players.brightcove.net/' + accountIDs.brightcove.accountId + '/experience_' + experienceID + '/live.js';
2341
2610
  document.body.appendChild(experiencePlayerScript);
@@ -2348,8 +2617,9 @@ var Video = function Video(_ref) {
2348
2617
  };
2349
2618
 
2350
2619
  var onVideoSuccess = function onVideoSuccess(success) {
2351
- //console.log('success:', success.ref)
2620
+ // console.log('success:', success)
2352
2621
  var player = success.ref;
2622
+ setVideoPlayer(player);
2353
2623
  if (_typeof$1(player.ima3) === 'object' && player.ima3.settings && player.ima3.settings.serverUrl && targeting !== null) {
2354
2624
  player.ima3.settings.debug = true;
2355
2625
  if (targeting.content_placement && targeting.document_url) {
@@ -2360,7 +2630,7 @@ var Video = function Video(_ref) {
2360
2630
  player.on('loadedmetadata', function (evt) {
2361
2631
  var _this = this;
2362
2632
 
2363
- //console.log('loadedmetadata:', evt)
2633
+ // console.log('loadedmetadata:', evt)
2364
2634
  console.log('mediainfo:', player.mediainfo); // get the duration from here
2365
2635
  var duration = player.mediainfo.duration;
2366
2636
  var current = player.currentTime();
@@ -2404,17 +2674,50 @@ var Video = function Video(_ref) {
2404
2674
  autoPlayVideo();
2405
2675
  }
2406
2676
 
2407
- //Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2677
+ // Beam.report_beam_video('Ready', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2408
2678
  Segment.report_video_event('Video Ready', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2409
2679
  });
2410
-
2411
- // play
2680
+ var intId = void 0;
2681
+ var convertTime = function convertTime(timeStr) {
2682
+ var minutes = parseInt(timeStr.slice(0, 2));
2683
+ var seconds = parseInt(timeStr.slice(3));
2684
+ return minutes * 60 + seconds;
2685
+ };
2686
+ var modalTimes = [];
2687
+ polls.forEach(function (pollObj) {
2688
+ return modalTimes.push(convertTime(pollObj.timestamp));
2689
+ });
2690
+ console.log('last poll time', modalTimes[modalTimes.length - 1]);
2412
2691
  player.on('play', function (evt) {
2413
2692
  var duration = player.mediainfo.duration;
2414
2693
  var current = player.currentTime();
2415
2694
  var queue = Math.floor(duration / 10);
2416
2695
  var segment = Math.floor(current / queue);
2417
- //Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2696
+ if (polls) {
2697
+ var vidPlayer = this;
2698
+ intId = setInterval(function () {
2699
+ var ct = player.currentTime();
2700
+ console.log('ct', ct);
2701
+ setCurrentPlayTime(ct);
2702
+ console.log('currentPlayTime', currentPlayTime);
2703
+ console.log('intervaling');
2704
+ if (intId) console.log('interval ID is ' + intId);
2705
+ console.log('isPollingTime', isPollingTime);
2706
+ modalTimes.forEach(function (modalTime, ind) {
2707
+ if (Math.floor(ct) === modalTime) {
2708
+ setPollItems(polls[ind].pollItems);
2709
+ setPollUrl(targeting.document_url[0]);
2710
+ setIsPollingTime(true);
2711
+ polls[ind].pollItems.forEach(function (item) {
2712
+ if (item.format === 'multiChoice') setMultiChoiceRender(true);
2713
+ if (item.format === 'textInput') setTextInputRender(true);
2714
+ });
2715
+ vidPlayer.pause();
2716
+ }
2717
+ });
2718
+ }, 1000);
2719
+ }
2720
+ // Beam.report_beam_video('Play', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2418
2721
  Segment.report_video_event('Video Play', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2419
2722
  });
2420
2723
 
@@ -2424,7 +2727,9 @@ var Video = function Video(_ref) {
2424
2727
  var current = player.currentTime();
2425
2728
  var queue = Math.floor(duration / 10);
2426
2729
  var segment = Math.floor(current / queue);
2427
- //Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2730
+ clearInterval(intId);
2731
+ console.log('clearing interval ' + intId + ' in pause');
2732
+ // Beam.report_beam_video('Pause', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2428
2733
  Segment.report_video_event('Video Pause', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2429
2734
  });
2430
2735
 
@@ -2434,9 +2739,10 @@ var Video = function Video(_ref) {
2434
2739
  var current = player.currentTime();
2435
2740
  var queue = Math.floor(duration / 10);
2436
2741
  var segment = Math.floor(current / queue);
2437
- //Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2742
+ clearInterval(intId);
2743
+ // Beam.report_beam_video('End', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2438
2744
  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
2745
+ // This is for old series format
2440
2746
  autoplayNextVideo(evt);
2441
2747
  if (nextVideo) {
2442
2748
  window.location.href = '/view/' + nextVideo;
@@ -2450,7 +2756,7 @@ var Video = function Video(_ref) {
2450
2756
  var queue = Math.floor(duration / 10);
2451
2757
  var segment = Math.floor(current / queue);
2452
2758
  if (!queueProgress.includes(segment)) {
2453
- //Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2759
+ // Beam.report_beam_video('Segment', deviceType, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID)
2454
2760
  Segment.report_video_event('Video Segment', main_18, duration, current, segment, 'BrightCove', accountIDs.brightcove.playerId, accountIDs.brightcove.accountId, videoID);
2455
2761
  queueProgress.push(segment);
2456
2762
  }
@@ -2459,19 +2765,19 @@ var Video = function Video(_ref) {
2459
2765
  // ad impression
2460
2766
  player.on('ads-ad-started', function (evt) {
2461
2767
  var duration = player.ads.ad.duration;
2462
- player.ads.ad.id;
2768
+ // const id = player.ads.ad.id
2463
2769
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2464
2770
 
2465
- //Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2771
+ // Beam.report_beam_ad('AD Started', deviceType, '', '', '', '', '', adType, duration, id)
2466
2772
  Segment.report_ad_event('Video Ad Started', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2467
2773
  });
2468
2774
 
2469
2775
  // ad ended
2470
2776
  player.on('ads-ad-ended', function (evt) {
2471
2777
  var duration = player.ads.ad.duration;
2472
- player.ads.ad.id;
2778
+ // const id = player.ads.ad.id
2473
2779
  var adType = 'Bright Cove: ' + player.ads.ad.type;
2474
- //Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2780
+ // Beam.report_beam_ad('AD Ended', deviceType, '', '', '', '', '', adType, duration, id)
2475
2781
  Segment.report_ad_event('Video Ad Ended', main_18, duration, adType, accountIDs.brightcove.playerId, accountIDs.brightcove.accountId);
2476
2782
  });
2477
2783
  };
@@ -2481,6 +2787,20 @@ var Video = function Video(_ref) {
2481
2787
  return React__default.createElement(
2482
2788
  'div',
2483
2789
  null,
2790
+ isPollingTime ? React__default.createElement(PopupPollModal
2791
+ // eslint-disable-next-line react/jsx-indent-props
2792
+ , { pollItems: pollItems
2793
+ // eslint-disable-next-line react/jsx-indent-props
2794
+ , pollUrl: pollUrl
2795
+ // eslint-disable-next-line react/jsx-indent-props
2796
+ , isPollingTime: isPollingTime
2797
+ // eslint-disable-next-line react/jsx-indent-props
2798
+ , restartPlayer: restartPlayer
2799
+ // eslint-disable-next-line react/jsx-indent-props
2800
+ , textInputRender: textInputRender
2801
+ // eslint-disable-next-line react/jsx-indent-props
2802
+ , multiChoiceRender: multiChoiceRender
2803
+ }) : null,
2484
2804
  React__default.createElement(ReactPlayerLoader, {
2485
2805
  onSuccess: onVideoSuccess,
2486
2806
  onFailure: onVideoFailure,
@@ -2522,6 +2842,7 @@ var Video = function Video(_ref) {
2522
2842
  }
2523
2843
  return null;
2524
2844
  }
2845
+
2525
2846
  if (source === 'mp4') {
2526
2847
  return React__default.createElement(
2527
2848
  'div',
@@ -7629,7 +7950,7 @@ var Poll$1 = function Poll(_ref) {
7629
7950
  );
7630
7951
  }),
7631
7952
  React__default.createElement(
7632
- Button,
7953
+ Button$1,
7633
7954
  { disabled: !selectedChoice, type: 'submit' },
7634
7955
  'Vote'
7635
7956
  )
@@ -7806,7 +8127,7 @@ var Poll = function Poll(_ref) {
7806
8127
  );
7807
8128
  }),
7808
8129
  React__default.createElement(
7809
- Button,
8130
+ Button$1,
7810
8131
  { disabled: !selectedChoice, type: 'submit' },
7811
8132
  'Vote'
7812
8133
  )
@@ -8119,7 +8440,7 @@ var Quiz = function Quiz(_ref) {
8119
8440
  )
8120
8441
  ),
8121
8442
  !showAnswer && React__default.createElement(
8122
- Button$1,
8443
+ Button,
8123
8444
  { onClick: function onClick() {
8124
8445
  return checkAnswers();
8125
8446
  }, 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-803278c4.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",
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",