@mjhls/mjh-framework 1.0.309 → 1.0.311
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{YoutubeGroup-98ffbc57.js → YoutubeGroup-93aa7a6c.js} +14 -2
- package/dist/cjs/YoutubeGroup.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{YoutubeGroup-562ed456.js → YoutubeGroup-e7e16d0e.js} +15 -3
- package/dist/esm/YoutubeGroup.js +1 -1
- package/dist/esm/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ var Router = require('next/router');
|
|
|
18
18
|
var Router__default = _interopDefault(Router);
|
|
19
19
|
require('react-dom');
|
|
20
20
|
require('./index-fa0fb52c.js');
|
|
21
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
21
|
+
var YoutubeGroup = require('./YoutubeGroup-93aa7a6c.js');
|
|
22
22
|
var index_esm = require('./index.esm-340d3792.js');
|
|
23
23
|
|
|
24
24
|
var VideoSeriesListing = function (_React$Component) {
|
|
@@ -499,6 +499,7 @@ GROQ query -
|
|
|
499
499
|
*/
|
|
500
500
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
501
501
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
502
|
+
var innerSlider = React.useRef(null);
|
|
502
503
|
|
|
503
504
|
React.useEffect(function () {
|
|
504
505
|
//IE11 Polyfill
|
|
@@ -510,22 +511,33 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
510
511
|
function scrollSlider(e, direction) {
|
|
511
512
|
var slide = e.target.parentElement;
|
|
512
513
|
var scrollOffset = slide.scrollLeft;
|
|
513
|
-
var viewableWidth = slide.clientWidth
|
|
514
|
+
var viewableWidth = slide.clientWidth;
|
|
514
515
|
var scrollDirection = void 0;
|
|
516
|
+
|
|
515
517
|
if (direction === 'next') {
|
|
516
518
|
scrollDirection = scrollOffset + viewableWidth;
|
|
519
|
+
|
|
520
|
+
if (scrollDirection > innerSlider.current.offsetWidth) {
|
|
521
|
+
scrollDirection = 0;
|
|
522
|
+
}
|
|
517
523
|
}
|
|
518
524
|
if (direction === 'prev') {
|
|
519
525
|
scrollDirection = scrollOffset - viewableWidth;
|
|
526
|
+
|
|
527
|
+
if (scrollOffset === 0) {
|
|
528
|
+
scrollDirection = innerSlider.current.offsetWidth;
|
|
529
|
+
}
|
|
520
530
|
}
|
|
521
531
|
slide.scrollTo({
|
|
522
532
|
left: scrollDirection,
|
|
523
533
|
behavior: 'smooth'
|
|
524
534
|
});
|
|
525
535
|
}
|
|
536
|
+
|
|
526
537
|
function handleClick(url, vidIndex) {
|
|
527
538
|
props.setState(url, vidIndex);
|
|
528
539
|
}
|
|
540
|
+
|
|
529
541
|
var _props$current = props.current,
|
|
530
542
|
current = _props$current === undefined ? '' : _props$current;
|
|
531
543
|
|
|
@@ -552,7 +564,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
552
564
|
),
|
|
553
565
|
React__default.createElement(
|
|
554
566
|
'div',
|
|
555
|
-
{ className: 'row__inner' },
|
|
567
|
+
{ ref: innerSlider, className: 'row__inner' },
|
|
556
568
|
props.dataset && props.dataset.map(function (video, index) {
|
|
557
569
|
// If there is a current prop, means this will overlay a currently playing video
|
|
558
570
|
if (current !== '') {
|
package/dist/cjs/YoutubeGroup.js
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -41,7 +41,7 @@ var ThumbnailCard = require('./ThumbnailCard.js');
|
|
|
41
41
|
var TaxonomyCard = require('./TaxonomyCard-a8a64f98.js');
|
|
42
42
|
require('./react-social-icons-cd0d9d3b.js');
|
|
43
43
|
var GroupDeck = require('./GroupDeck.js');
|
|
44
|
-
var YoutubeGroup = require('./YoutubeGroup-
|
|
44
|
+
var YoutubeGroup = require('./YoutubeGroup-93aa7a6c.js');
|
|
45
45
|
var reactBootstrap = require('react-bootstrap');
|
|
46
46
|
var QueueDeckExpanded = require('./QueueDeckExpanded.js');
|
|
47
47
|
var index_esm = require('./index.esm-340d3792.js');
|
|
@@ -12,7 +12,7 @@ import 'next/link';
|
|
|
12
12
|
import { withRouter } from 'next/router';
|
|
13
13
|
import 'react-dom';
|
|
14
14
|
import './index-5f9f807a.js';
|
|
15
|
-
import { Y as YoutubeGroup } from './YoutubeGroup-
|
|
15
|
+
import { Y as YoutubeGroup } from './YoutubeGroup-e7e16d0e.js';
|
|
16
16
|
import { a as IoIosArrowForward } from './index.esm-536609db.js';
|
|
17
17
|
|
|
18
18
|
var VideoSeriesListing = function (_React$Component) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as createCommonjsModule, a as commonjsGlobal } from './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import React__default, { useEffect } from 'react';
|
|
2
|
+
import React__default, { useRef, useEffect } from 'react';
|
|
3
3
|
import 'next/link';
|
|
4
4
|
import { L as LazyLoad } from './index-5f9f807a.js';
|
|
5
5
|
|
|
@@ -494,6 +494,7 @@ GROQ query -
|
|
|
494
494
|
*/
|
|
495
495
|
var YoutubeGroup = function YoutubeGroup(props) {
|
|
496
496
|
// Props should be an array of objects containing Thumbnail, title, and URL
|
|
497
|
+
var innerSlider = useRef(null);
|
|
497
498
|
|
|
498
499
|
useEffect(function () {
|
|
499
500
|
//IE11 Polyfill
|
|
@@ -505,22 +506,33 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
505
506
|
function scrollSlider(e, direction) {
|
|
506
507
|
var slide = e.target.parentElement;
|
|
507
508
|
var scrollOffset = slide.scrollLeft;
|
|
508
|
-
var viewableWidth = slide.clientWidth
|
|
509
|
+
var viewableWidth = slide.clientWidth;
|
|
509
510
|
var scrollDirection = void 0;
|
|
511
|
+
|
|
510
512
|
if (direction === 'next') {
|
|
511
513
|
scrollDirection = scrollOffset + viewableWidth;
|
|
514
|
+
|
|
515
|
+
if (scrollDirection > innerSlider.current.offsetWidth) {
|
|
516
|
+
scrollDirection = 0;
|
|
517
|
+
}
|
|
512
518
|
}
|
|
513
519
|
if (direction === 'prev') {
|
|
514
520
|
scrollDirection = scrollOffset - viewableWidth;
|
|
521
|
+
|
|
522
|
+
if (scrollOffset === 0) {
|
|
523
|
+
scrollDirection = innerSlider.current.offsetWidth;
|
|
524
|
+
}
|
|
515
525
|
}
|
|
516
526
|
slide.scrollTo({
|
|
517
527
|
left: scrollDirection,
|
|
518
528
|
behavior: 'smooth'
|
|
519
529
|
});
|
|
520
530
|
}
|
|
531
|
+
|
|
521
532
|
function handleClick(url, vidIndex) {
|
|
522
533
|
props.setState(url, vidIndex);
|
|
523
534
|
}
|
|
535
|
+
|
|
524
536
|
var _props$current = props.current,
|
|
525
537
|
current = _props$current === undefined ? '' : _props$current;
|
|
526
538
|
|
|
@@ -547,7 +559,7 @@ var YoutubeGroup = function YoutubeGroup(props) {
|
|
|
547
559
|
),
|
|
548
560
|
React__default.createElement(
|
|
549
561
|
'div',
|
|
550
|
-
{ className: 'row__inner' },
|
|
562
|
+
{ ref: innerSlider, className: 'row__inner' },
|
|
551
563
|
props.dataset && props.dataset.map(function (video, index) {
|
|
552
564
|
// If there is a current prop, means this will overlay a currently playing video
|
|
553
565
|
if (current !== '') {
|
package/dist/esm/YoutubeGroup.js
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -36,8 +36,8 @@ export { T as TaxonomyCard } from './TaxonomyCard-ea494c28.js';
|
|
|
36
36
|
import './react-social-icons-a7d5c5c7.js';
|
|
37
37
|
import GroupDeck from './GroupDeck.js';
|
|
38
38
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
39
|
-
import { g as getYoutubeId } from './YoutubeGroup-
|
|
40
|
-
export { Y as YoutubeGroup } from './YoutubeGroup-
|
|
39
|
+
import { g as getYoutubeId } from './YoutubeGroup-e7e16d0e.js';
|
|
40
|
+
export { Y as YoutubeGroup } from './YoutubeGroup-e7e16d0e.js';
|
|
41
41
|
import { Spinner as Spinner$1, Container as Container$1, Row as Row$1, Col as Col$1, Carousel, Table, Figure as Figure$1, Button as Button$1, ProgressBar, Card, Form } from 'react-bootstrap';
|
|
42
42
|
export { default as QueueDeckExpanded } from './QueueDeckExpanded.js';
|
|
43
43
|
import { I as IoMdArrowDropdown } from './index.esm-536609db.js';
|