@mjhls/mjh-framework 1.0.203 → 1.0.205
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/AD-e2479b7c.js +31 -0
- package/dist/cjs/DeckContent.js +430 -0
- package/dist/cjs/DeckQueue.js +366 -0
- package/dist/cjs/Dfp-d94f7f73.js +97 -0
- package/dist/cjs/GridContent.js +613 -0
- package/dist/cjs/GroupDeck.js +156 -0
- package/dist/cjs/IssueContentDeck.js +81 -0
- package/dist/cjs/IssueDeck.js +144 -0
- package/dist/cjs/MasterDeck.js +340 -0
- package/dist/cjs/Normal-7dd8c339.js +2374 -0
- package/dist/cjs/PublicationDeck.js +81 -0
- package/dist/cjs/QueueDeckExpanded.js +559 -0
- package/dist/cjs/TaxonomyCard-7b5b4298.js +1045 -0
- package/dist/cjs/TaxonomyCard.js +18 -0
- package/dist/cjs/TemplateNormal.js +29 -0
- package/dist/cjs/ThumbnailCard.js +58 -0
- package/dist/cjs/Ustream-0d3dd953.js +122 -0
- package/dist/cjs/Ustream.js +10 -0
- package/dist/cjs/VideoSeriesListing.js +248 -0
- package/dist/cjs/YoutubeGroup-f7707ceb.js +228 -0
- package/dist/cjs/YoutubeGroup.js +13 -0
- package/dist/cjs/_babelHelpers-f321c258.js +119 -0
- package/dist/cjs/_commonjsHelpers-3fc1f64e.js +20 -0
- package/dist/cjs/debounce-286eb3fb.js +279 -0
- package/dist/cjs/entities-3e0b4a16.js +506 -0
- package/dist/cjs/get-06aac51b.js +992 -0
- package/dist/cjs/index-0d0efcfa.js +610 -0
- package/dist/cjs/index-a4c53ff4.js +551 -0
- package/dist/cjs/index.es-2289df51.js +5028 -0
- package/dist/cjs/index.esm-340d3792.js +113 -0
- package/dist/cjs/index.js +12044 -0
- package/dist/cjs/isSymbol-311eb805.js +209 -0
- package/dist/cjs/main-58839f4e.js +858 -0
- package/dist/cjs/visibility-sensor-5c5a7302.js +2251 -0
- package/dist/esm/AD-1b2a3dd3.js +26 -0
- package/dist/esm/DeckContent.js +424 -0
- package/dist/esm/DeckQueue.js +360 -0
- package/dist/esm/Dfp-ab7941d3.js +92 -0
- package/dist/esm/GridContent.js +607 -0
- package/dist/esm/GroupDeck.js +151 -0
- package/dist/esm/IssueContentDeck.js +76 -0
- package/dist/esm/IssueDeck.js +139 -0
- package/dist/esm/MasterDeck.js +334 -0
- package/dist/esm/Normal-403c5666.js +2354 -0
- package/dist/esm/PublicationDeck.js +76 -0
- package/dist/esm/QueueDeckExpanded.js +553 -0
- package/dist/esm/TaxonomyCard-f9c93953.js +1039 -0
- package/dist/esm/TaxonomyCard.js +12 -0
- package/dist/esm/TemplateNormal.js +23 -0
- package/dist/esm/ThumbnailCard.js +53 -0
- package/dist/esm/Ustream-6bb45fe7.js +116 -0
- package/dist/esm/Ustream.js +4 -0
- package/dist/esm/VideoSeriesListing.js +242 -0
- package/dist/esm/YoutubeGroup-06df4923.js +222 -0
- package/dist/esm/YoutubeGroup.js +7 -0
- package/dist/esm/_babelHelpers-67c05996.js +111 -0
- package/dist/esm/_commonjsHelpers-ae1b5db5.js +15 -0
- package/dist/esm/debounce-a0242b4a.js +277 -0
- package/dist/esm/entities-e85d3a4a.js +503 -0
- package/dist/esm/get-b684ff61.js +990 -0
- package/dist/esm/index-3c1ee9ab.js +605 -0
- package/dist/esm/index-ca4ff5cb.js +548 -0
- package/dist/esm/index.es-f369b3e8.js +5022 -0
- package/dist/esm/index.esm-536609db.js +103 -0
- package/dist/esm/index.js +11991 -0
- package/dist/esm/isSymbol-c2b7d05a.js +203 -0
- package/dist/esm/main-dea495b7.js +851 -0
- package/dist/esm/visibility-sensor-3cfe6713.js +2243 -0
- package/package.json +8 -7
- package/dist/index.es.js +0 -30213
- package/dist/index.es.js.map +0 -1
- package/dist/index.js +0 -30271
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import './_commonjsHelpers-ae1b5db5.js';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import 'react-bootstrap/Container';
|
|
5
|
+
import 'react-bootstrap/Row';
|
|
6
|
+
import 'react-bootstrap/Col';
|
|
7
|
+
import 'react-bootstrap/Card';
|
|
8
|
+
import 'react-dom';
|
|
9
|
+
import './index-ca4ff5cb.js';
|
|
10
|
+
import './index-3c1ee9ab.js';
|
|
11
|
+
import './_babelHelpers-67c05996.js';
|
|
12
|
+
export { T as default } from './TaxonomyCard-f9c93953.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import './_commonjsHelpers-ae1b5db5.js';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import 'react-bootstrap/Container';
|
|
5
|
+
import 'react-bootstrap/Row';
|
|
6
|
+
import 'react-bootstrap/Col';
|
|
7
|
+
import 'next/link';
|
|
8
|
+
import './isSymbol-c2b7d05a.js';
|
|
9
|
+
import './main-dea495b7.js';
|
|
10
|
+
import './_babelHelpers-67c05996.js';
|
|
11
|
+
import './get-b684ff61.js';
|
|
12
|
+
import './AD-1b2a3dd3.js';
|
|
13
|
+
import 'react-bootstrap';
|
|
14
|
+
import './index.esm-536609db.js';
|
|
15
|
+
import 'react-bootstrap/Button';
|
|
16
|
+
export { T as default } from './Normal-403c5666.js';
|
|
17
|
+
import 'react-bootstrap/ListGroup';
|
|
18
|
+
import 'next/head';
|
|
19
|
+
import 'react-bootstrap/Nav';
|
|
20
|
+
import 'react-bootstrap/Navbar';
|
|
21
|
+
import 'react-bootstrap/NavDropdown';
|
|
22
|
+
import 'react-bootstrap/Form';
|
|
23
|
+
import 'react-bootstrap/FormControl';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import './_commonjsHelpers-ae1b5db5.js';
|
|
3
|
+
import 'prop-types';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
6
|
+
import { L as LazyLoad } from './index-3c1ee9ab.js';
|
|
7
|
+
import { c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
8
|
+
import Media$1 from 'react-bootstrap/Media';
|
|
9
|
+
|
|
10
|
+
var ThumbnailCard = function ThumbnailCard(_ref) {
|
|
11
|
+
var size = _ref.size,
|
|
12
|
+
mediaData = _ref.mediaData,
|
|
13
|
+
client = _ref.client,
|
|
14
|
+
defaultImage = _ref.defaultImage;
|
|
15
|
+
|
|
16
|
+
var builder = imageUrlBuilder(client);
|
|
17
|
+
|
|
18
|
+
var urlFor = function urlFor(source) {
|
|
19
|
+
return builder.image(source).auto('format');
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return React__default.createElement(
|
|
23
|
+
'div',
|
|
24
|
+
null,
|
|
25
|
+
mediaData && mediaData.map(function (item, index) {
|
|
26
|
+
return React__default.createElement(
|
|
27
|
+
Media$1,
|
|
28
|
+
{ className: 'mb-3 thumbnail-card' },
|
|
29
|
+
React__default.createElement(
|
|
30
|
+
LazyLoad,
|
|
31
|
+
{ height: size },
|
|
32
|
+
React__default.createElement('img', { width: size, height: size, className: 'mr-3', src: item.thumbnail ? urlFor(item.thumbnail).url() : defaultImage, alt: 'Generic placeholder' })
|
|
33
|
+
),
|
|
34
|
+
React__default.createElement(
|
|
35
|
+
Media$1.Body,
|
|
36
|
+
null,
|
|
37
|
+
React__default.createElement(
|
|
38
|
+
'h5',
|
|
39
|
+
null,
|
|
40
|
+
item.title
|
|
41
|
+
),
|
|
42
|
+
React__default.createElement(
|
|
43
|
+
'p',
|
|
44
|
+
null,
|
|
45
|
+
clean_html_1(item.summary)
|
|
46
|
+
)
|
|
47
|
+
)
|
|
48
|
+
);
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default ThumbnailCard;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import React__default, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import { s as slicedToArray } from './_babelHelpers-67c05996.js';
|
|
3
|
+
import { G as GenIcon, d as IoIosOpen } from './index.esm-536609db.js';
|
|
4
|
+
|
|
5
|
+
// THIS FILE IS AUTO GENERATED
|
|
6
|
+
var FaLongArrowAltRight = function (props) {
|
|
7
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 448 512"},"child":[{"tag":"path","attr":{"d":"M313.941 216H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h301.941v46.059c0 21.382 25.851 32.09 40.971 16.971l86.059-86.059c9.373-9.373 9.373-24.569 0-33.941l-86.059-86.059c-15.119-15.119-40.971-4.411-40.971 16.971V216z"}}]})(props);
|
|
8
|
+
};
|
|
9
|
+
FaLongArrowAltRight.displayName = "FaLongArrowAltRight";
|
|
10
|
+
var FaRegWindowClose = function (props) {
|
|
11
|
+
return GenIcon({"tag":"svg","attr":{"viewBox":"0 0 512 512"},"child":[{"tag":"path","attr":{"d":"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z"}}]})(props);
|
|
12
|
+
};
|
|
13
|
+
FaRegWindowClose.displayName = "FaRegWindowClose";
|
|
14
|
+
|
|
15
|
+
// UStream Component
|
|
16
|
+
|
|
17
|
+
var Ustream = function Ustream(_ref) {
|
|
18
|
+
var _ref$width = _ref.width,
|
|
19
|
+
width = _ref$width === undefined ? '300px' : _ref$width,
|
|
20
|
+
_ref$height = _ref.height,
|
|
21
|
+
height = _ref$height === undefined ? '168px' : _ref$height,
|
|
22
|
+
_ref$close = _ref.close,
|
|
23
|
+
close = _ref$close === undefined ? false : _ref$close,
|
|
24
|
+
_ref$right = _ref.right,
|
|
25
|
+
right = _ref$right === undefined ? false : _ref$right,
|
|
26
|
+
_ref$src = _ref.src,
|
|
27
|
+
src = _ref$src === undefined ? 'https://video.ibm.com/embed/23627444?volume=0&autoplay=true' : _ref$src;
|
|
28
|
+
|
|
29
|
+
var _useState = useState(width),
|
|
30
|
+
_useState2 = slicedToArray(_useState, 2),
|
|
31
|
+
currentWidth = _useState2[0],
|
|
32
|
+
setWidth = _useState2[1];
|
|
33
|
+
|
|
34
|
+
var _useState3 = useState(height),
|
|
35
|
+
_useState4 = slicedToArray(_useState3, 2),
|
|
36
|
+
currentHeight = _useState4[0],
|
|
37
|
+
setHeight = _useState4[1];
|
|
38
|
+
|
|
39
|
+
var ustreamContainer = useRef(null);
|
|
40
|
+
|
|
41
|
+
useEffect(function () {
|
|
42
|
+
try {
|
|
43
|
+
var container = document.getElementById('ustream-container');
|
|
44
|
+
var ustream = document.getElementById('ustream-iframe');
|
|
45
|
+
ustream.setAttribute('src', src);
|
|
46
|
+
|
|
47
|
+
if (close) {
|
|
48
|
+
var closeBtn = document.querySelector('.ustream-close');
|
|
49
|
+
closeBtn.addEventListener('click', function () {
|
|
50
|
+
container.remove();
|
|
51
|
+
});
|
|
52
|
+
} else {
|
|
53
|
+
document.querySelector('.ustream-minimize').addEventListener('click', function (e) {
|
|
54
|
+
container.style.position = 'static';
|
|
55
|
+
container.style.padding = '0 1rem';
|
|
56
|
+
container.classList.add('closed');
|
|
57
|
+
setWidth('100%');
|
|
58
|
+
// aspect ratio
|
|
59
|
+
var newHeight = 9 / 16 * ustreamContainer.current.clientWidth;
|
|
60
|
+
console.log(newHeight);
|
|
61
|
+
console.log(ustreamContainer);
|
|
62
|
+
setHeight(newHeight);
|
|
63
|
+
document.querySelector('.ustream-minimize').remove();
|
|
64
|
+
var closeBtn = document.querySelector('.ustream-close');
|
|
65
|
+
closeBtn.style.display = 'block';
|
|
66
|
+
closeBtn.addEventListener('click', function () {
|
|
67
|
+
container.remove();
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
} catch (err) {}
|
|
72
|
+
}, []);
|
|
73
|
+
|
|
74
|
+
return React__default.createElement(
|
|
75
|
+
'div',
|
|
76
|
+
{ id: 'ustream-container', ref: ustreamContainer, style: { width: '' + currentWidth, marginBottom: '1rem' } },
|
|
77
|
+
React__default.createElement(
|
|
78
|
+
'div',
|
|
79
|
+
{ style: { position: 'relative' } },
|
|
80
|
+
close ? React__default.createElement(
|
|
81
|
+
'div',
|
|
82
|
+
{ className: 'ustream-close' },
|
|
83
|
+
React__default.createElement(FaRegWindowClose, { style: { color: '#fff', fontSize: '1.3rem' } })
|
|
84
|
+
) : React__default.createElement(
|
|
85
|
+
React__default.Fragment,
|
|
86
|
+
null,
|
|
87
|
+
React__default.createElement(
|
|
88
|
+
'div',
|
|
89
|
+
{ className: 'ustream-minimize' },
|
|
90
|
+
React__default.createElement(IoIosOpen, { style: right ? { color: '#fff', fontSize: '1.3rem', transform: 'rotateZ(-90deg)' } : { color: '#fff', fontSize: '1.3rem' } })
|
|
91
|
+
),
|
|
92
|
+
React__default.createElement(
|
|
93
|
+
'div',
|
|
94
|
+
{ className: 'ustream-close' },
|
|
95
|
+
React__default.createElement(FaRegWindowClose, { style: { color: '#fff', fontSize: '1rem' } })
|
|
96
|
+
)
|
|
97
|
+
),
|
|
98
|
+
React__default.createElement('iframe', {
|
|
99
|
+
id: 'ustream-iframe',
|
|
100
|
+
webkitallowfullscreen: 'true',
|
|
101
|
+
allowFullScreen: true,
|
|
102
|
+
frameBorder: 'no',
|
|
103
|
+
style: { maxWidth: '100%', height: currentHeight, width: currentWidth }
|
|
104
|
+
})
|
|
105
|
+
),
|
|
106
|
+
React__default.createElement(
|
|
107
|
+
'style',
|
|
108
|
+
{ jsx: 'true' },
|
|
109
|
+
'\n #ustream-container {\n position: fixed;\n bottom: 0;\n ' + (right ? 'right: 1rem;' : 'left: 1.5rem;') + '\n z-index: 999;\n max-width: 100%;\n }\n .ustream-minimize,\n .ustream-close {\n position: absolute;\n color: white;\n right: 0.5rem;\n top: 0.25rem;\n cursor: pointer;\n font-weight: bold;\n }\n .ustream-close {\n ' + (close ? 'display: block; right: .75rem; top: .5rem; ' : 'display: none; right: .5rem; top: .75rem;') + '\n }\n @media screen and (max-width: 768px) {\n #ustream-container:not(.closed) {\n width: 231px !important;\n height: 130px !important;\n }\n #ustream-container:not(.closed) iframe {\n height: 130px !important;\n }\n }\n '
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
var Ustream$1 = React__default.memo(Ustream);
|
|
115
|
+
|
|
116
|
+
export { FaLongArrowAltRight as F, Ustream$1 as U };
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import './_commonjsHelpers-ae1b5db5.js';
|
|
3
|
+
import { V as VisibilitySensor, l as lib_3 } from './visibility-sensor-3cfe6713.js';
|
|
4
|
+
import 'prop-types';
|
|
5
|
+
import Container from 'react-bootstrap/Container';
|
|
6
|
+
import { I as InfiniteScroll } from './index.es-f369b3e8.js';
|
|
7
|
+
import 'next/link';
|
|
8
|
+
import { withRouter } from 'next/router';
|
|
9
|
+
import './isSymbol-c2b7d05a.js';
|
|
10
|
+
import { d as debounce_1 } from './debounce-a0242b4a.js';
|
|
11
|
+
import 'react-dom';
|
|
12
|
+
import './index-3c1ee9ab.js';
|
|
13
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-67c05996.js';
|
|
14
|
+
import { Y as YoutubeGroup } from './YoutubeGroup-06df4923.js';
|
|
15
|
+
import { a as IoIosArrowForward } from './index.esm-536609db.js';
|
|
16
|
+
|
|
17
|
+
var VideoSeriesListing = function (_React$Component) {
|
|
18
|
+
inherits(VideoSeriesListing, _React$Component);
|
|
19
|
+
|
|
20
|
+
function VideoSeriesListing() {
|
|
21
|
+
var _ref;
|
|
22
|
+
|
|
23
|
+
var _temp, _this, _ret;
|
|
24
|
+
|
|
25
|
+
classCallCheck(this, VideoSeriesListing);
|
|
26
|
+
|
|
27
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
|
28
|
+
args[_key] = arguments[_key];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = VideoSeriesListing.__proto__ || Object.getPrototypeOf(VideoSeriesListing)).call.apply(_ref, [this].concat(args))), _this), _this.page = _this.props.page, _this.mapping = _this.props.mapping, _this.data = _this.props.dataRecord, _this.query = _this.props.query, _this.params = _this.props.params, _this.dataArr = [_this.data], _this.defaultImage = _this.props.defaultImage ? _this.props.defaultImage : '/placeholder.jpg', _this.state = {
|
|
32
|
+
data: _this.dataArr,
|
|
33
|
+
per: _this.params ? _this.params.to : 2,
|
|
34
|
+
page: _this.props.currentPage || 1,
|
|
35
|
+
from: _this.params ? _this.params.from : 0,
|
|
36
|
+
to: _this.params ? _this.params.to : 2,
|
|
37
|
+
total_pages: null,
|
|
38
|
+
scrolling: true,
|
|
39
|
+
query: _this.query,
|
|
40
|
+
currentPage: _this.props.currentPage || 1
|
|
41
|
+
}, _this.loadMore = debounce_1(function () {
|
|
42
|
+
_this.setState(function (state) {
|
|
43
|
+
var page = state.page,
|
|
44
|
+
from = state.from,
|
|
45
|
+
per = state.per,
|
|
46
|
+
to = state.to;
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
page: page + 1,
|
|
50
|
+
from: from + per,
|
|
51
|
+
to: to + per
|
|
52
|
+
};
|
|
53
|
+
}, _this.loadData);
|
|
54
|
+
}, 0), _this.loadData = function () {
|
|
55
|
+
var _this$state = _this.state,
|
|
56
|
+
from = _this$state.from,
|
|
57
|
+
to = _this$state.to,
|
|
58
|
+
data = _this$state.data,
|
|
59
|
+
query = _this$state.query,
|
|
60
|
+
page = _this$state.page;
|
|
61
|
+
var client = _this.props.client;
|
|
62
|
+
|
|
63
|
+
_this.changePageNumber(page);
|
|
64
|
+
var params = _extends({}, _this.params, { from: from, to: to
|
|
65
|
+
// const queryUpdated = query.replace('$from', params.from).replace('$to', params.to)
|
|
66
|
+
// const query = '*[_type == "article" && defined(title) && defined(thumbnail)][$from...$to] { title, summary, thumbnail { asset-> }, url }'
|
|
67
|
+
});client.fetch(query, params).then(function (dataArr) {
|
|
68
|
+
if (_this.pointer && _this.pointerArray) {
|
|
69
|
+
var pointer = _this.pointer;
|
|
70
|
+
dataArr = dataArr[_this.pointerArray][pointer];
|
|
71
|
+
}
|
|
72
|
+
dataArr = dataArr.map(function (item) {
|
|
73
|
+
return _extends({}, item, {
|
|
74
|
+
pageNumber: page
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
_this.setState(function () {
|
|
79
|
+
if (dataArr.length > 0) {
|
|
80
|
+
var newDataArr = _this.state.data;
|
|
81
|
+
newDataArr.push(dataArr);
|
|
82
|
+
return {
|
|
83
|
+
data: newDataArr,
|
|
84
|
+
scrolling: true
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
return {
|
|
88
|
+
scrolling: false
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
}, _this.changePageNumber = function (pageNumber) {
|
|
94
|
+
var _this$props = _this.props,
|
|
95
|
+
seoPaginate = _this$props.seoPaginate,
|
|
96
|
+
pageview = _this$props.pageview,
|
|
97
|
+
router = _this$props.router;
|
|
98
|
+
var currentPage = _this.state.currentPage;
|
|
99
|
+
|
|
100
|
+
if (seoPaginate) {
|
|
101
|
+
var path = router.asPath;
|
|
102
|
+
var qrIndex = path.indexOf('?');
|
|
103
|
+
var pathname = router.pathname;
|
|
104
|
+
var queryString = '';
|
|
105
|
+
|
|
106
|
+
if (qrIndex > 0) {
|
|
107
|
+
path = path.substring(1, qrIndex);
|
|
108
|
+
|
|
109
|
+
var partialQS = router.asPath.substring(qrIndex + 1);
|
|
110
|
+
var partialQSArr = partialQS.split('&');
|
|
111
|
+
|
|
112
|
+
// exclude page=xxx from query string
|
|
113
|
+
partialQSArr.map(function (item) {
|
|
114
|
+
var itemArr = item.split('=');
|
|
115
|
+
var key = itemArr[0];
|
|
116
|
+
var val = itemArr[1];
|
|
117
|
+
|
|
118
|
+
if (key !== 'page') {
|
|
119
|
+
queryString += (queryString.length === 0 ? '' : '&') + key + '=' + val;
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (queryString.length > 0) {
|
|
125
|
+
path += '?' + queryString;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
pageNumber = parseInt(pageNumber);
|
|
129
|
+
|
|
130
|
+
if (currentPage !== pageNumber) {
|
|
131
|
+
lib_3.refresh();
|
|
132
|
+
|
|
133
|
+
_this.setState({
|
|
134
|
+
currentPage: pageNumber
|
|
135
|
+
}, function () {
|
|
136
|
+
if (path[0] !== '/') {
|
|
137
|
+
path = '/' + path;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
var newPath = pageNumber === 1 ? '' + path : path + '?page=' + pageNumber;
|
|
141
|
+
|
|
142
|
+
if (pageview) {
|
|
143
|
+
pageview(newPath);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
router.push(pathname, newPath, {
|
|
147
|
+
shallow: true
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}, _this.renderManualPagination = function () {
|
|
153
|
+
var currentPage = _this.state.currentPage;
|
|
154
|
+
|
|
155
|
+
return React__default.createElement(
|
|
156
|
+
'div',
|
|
157
|
+
{ className: 'd-flex justify-content-between' },
|
|
158
|
+
currentPage && currentPage > 1 && React__default.createElement(
|
|
159
|
+
'a',
|
|
160
|
+
{ href: '?page=' + (currentPage - 1) },
|
|
161
|
+
'<< Previous'
|
|
162
|
+
),
|
|
163
|
+
React__default.createElement(
|
|
164
|
+
'a',
|
|
165
|
+
{ href: '?page=' + (currentPage + 1) },
|
|
166
|
+
'Next >>'
|
|
167
|
+
)
|
|
168
|
+
);
|
|
169
|
+
}, _this.renderSeries = function (seriesData) {
|
|
170
|
+
var itemCounter = 0;
|
|
171
|
+
|
|
172
|
+
return React__default.createElement(
|
|
173
|
+
'div',
|
|
174
|
+
null,
|
|
175
|
+
seriesData && seriesData.map(function (docSeries, index) {
|
|
176
|
+
docSeries.body[0].videos.map(function (singleVideo, indexInner) {
|
|
177
|
+
singleVideo.link = '/view/' + docSeries.url.current + '?seriesVid=' + (indexInner + 1);
|
|
178
|
+
});
|
|
179
|
+
return React__default.createElement(
|
|
180
|
+
'div',
|
|
181
|
+
{ key: index, counter: itemCounter++ },
|
|
182
|
+
React__default.createElement(
|
|
183
|
+
'h4',
|
|
184
|
+
{ className: 'video-title-banner', style: { fontWeight: 'bold', color: 'var(--primary)', padding: '.25rem 0', borderBottom: '2px solid var(--gold)' } },
|
|
185
|
+
React__default.createElement(
|
|
186
|
+
'a',
|
|
187
|
+
{ href: '/' + _this.props.page + '/' + docSeries.url.current },
|
|
188
|
+
docSeries.title,
|
|
189
|
+
React__default.createElement(
|
|
190
|
+
'span',
|
|
191
|
+
{ style: { fontSize: '.9rem', color: 'grey', marginLeft: '1rem', transform: 'translateY(-2px)' } },
|
|
192
|
+
React__default.createElement(IoIosArrowForward, null)
|
|
193
|
+
)
|
|
194
|
+
)
|
|
195
|
+
),
|
|
196
|
+
React__default.createElement(YoutubeGroup, _extends({ key: index, dataset: docSeries.body[0].videos }, _this.props))
|
|
197
|
+
);
|
|
198
|
+
})
|
|
199
|
+
);
|
|
200
|
+
}, _temp), possibleConstructorReturn(_this, _ret);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
createClass(VideoSeriesListing, [{
|
|
204
|
+
key: 'render',
|
|
205
|
+
value: function render() {
|
|
206
|
+
var _this2 = this;
|
|
207
|
+
|
|
208
|
+
return React__default.createElement(
|
|
209
|
+
InfiniteScroll,
|
|
210
|
+
{ dataLength: this.state.data.length, next: this.loadMore, hasMore: this.state.scrolling, scrollThreshold: 0.9 },
|
|
211
|
+
React__default.createElement(
|
|
212
|
+
Container,
|
|
213
|
+
null,
|
|
214
|
+
this.state.data && this.state.data.map(function (series, index) {
|
|
215
|
+
var page = series[0].pageNumber !== 1 ? series[0].pageNumber : index + 1;
|
|
216
|
+
|
|
217
|
+
return React__default.createElement(
|
|
218
|
+
VisibilitySensor,
|
|
219
|
+
{
|
|
220
|
+
partialVisibility: true,
|
|
221
|
+
offset: { bottom: 400, top: 200 },
|
|
222
|
+
key: index,
|
|
223
|
+
onChange: function onChange(isVisible) {
|
|
224
|
+
isVisible && _this2.changePageNumber(page);
|
|
225
|
+
} },
|
|
226
|
+
React__default.createElement(
|
|
227
|
+
'div',
|
|
228
|
+
null,
|
|
229
|
+
_this2.renderSeries(series)
|
|
230
|
+
)
|
|
231
|
+
);
|
|
232
|
+
})
|
|
233
|
+
)
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
}]);
|
|
237
|
+
return VideoSeriesListing;
|
|
238
|
+
}(React__default.Component);
|
|
239
|
+
|
|
240
|
+
var VideoSeriesListing$1 = withRouter(VideoSeriesListing);
|
|
241
|
+
|
|
242
|
+
export default VideoSeriesListing$1;
|