@mjhls/mjh-framework 1.0.235 → 1.0.236
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/AdSlot-983cfe5f.js +515 -0
- package/dist/cjs/DeckContent.js +3 -3
- package/dist/cjs/DeckQueue.js +2 -2
- package/dist/cjs/{Dfp-f62b16e1.js → Dfp-f16a4421.js} +1 -1
- package/dist/cjs/{GridContent-6dae5d6a.js → GridContent-3f7dc5ac.js} +4 -4
- package/dist/cjs/GridContent.js +4 -4
- package/dist/cjs/MasterDeck.js +2 -2
- package/dist/cjs/{Normal-821546cd.js → Normal-815c5ad0.js} +3 -3
- package/dist/cjs/QueueDeckExpanded.js +2 -2
- package/dist/cjs/{TaxonomyCard-d97685e2.js → TaxonomyCard-0d4ec68b.js} +1 -1
- package/dist/cjs/TaxonomyCard.js +2 -2
- package/dist/cjs/TemplateNormal.js +4 -4
- package/dist/cjs/{Ustream-0d3dd953.js → Ustream-5f595d09.js} +1 -1
- package/dist/cjs/Ustream.js +2 -2
- package/dist/cjs/VideoSeriesListing.js +1 -1
- package/dist/cjs/{_babelHelpers-f321c258.js → _babelHelpers-4a69caad.js} +30 -0
- package/dist/cjs/index.js +79 -8
- package/dist/cjs/{main-58839f4e.js → main-becc38ae.js} +1 -0
- package/dist/esm/AdSlot-c40f4438.js +509 -0
- package/dist/esm/DeckContent.js +3 -3
- package/dist/esm/DeckQueue.js +2 -2
- package/dist/esm/{Dfp-f026ab16.js → Dfp-0567f8a3.js} +1 -1
- package/dist/esm/{GridContent-7990f509.js → GridContent-e61fff04.js} +4 -4
- package/dist/esm/GridContent.js +4 -4
- package/dist/esm/MasterDeck.js +2 -2
- package/dist/esm/{Normal-20ff5bf5.js → Normal-ebb02255.js} +3 -3
- package/dist/esm/QueueDeckExpanded.js +2 -2
- package/dist/esm/{TaxonomyCard-f9c93953.js → TaxonomyCard-92f9e327.js} +1 -1
- package/dist/esm/TaxonomyCard.js +2 -2
- package/dist/esm/TemplateNormal.js +4 -4
- package/dist/esm/{Ustream-6bb45fe7.js → Ustream-2bfb1813.js} +1 -1
- package/dist/esm/Ustream.js +2 -2
- package/dist/esm/VideoSeriesListing.js +1 -1
- package/dist/esm/{_babelHelpers-67c05996.js → _babelHelpers-c212c59c.js} +30 -1
- package/dist/esm/index.js +82 -12
- package/dist/esm/{main-cd81c243.js → main-e84e7749.js} +1 -1
- package/package.json +3 -1
- package/dist/cjs/AdSlot-d87cef08.js +0 -69
- package/dist/esm/AdSlot-0ea49f7e.js +0 -64
|
@@ -9,7 +9,7 @@ import { withRouter } from 'next/router';
|
|
|
9
9
|
import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
10
10
|
import 'react-dom';
|
|
11
11
|
import './index-3c1ee9ab.js';
|
|
12
|
-
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-
|
|
12
|
+
import { i as inherits, c as createClass, a as classCallCheck, p as possibleConstructorReturn, _ as _extends } from './_babelHelpers-c212c59c.js';
|
|
13
13
|
import { Y as YoutubeGroup } from './YoutubeGroup-1368335c.js';
|
|
14
14
|
import { a as IoIosArrowForward } from './index.esm-536609db.js';
|
|
15
15
|
|
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
var asyncToGenerator = function (fn) {
|
|
2
|
+
return function () {
|
|
3
|
+
var gen = fn.apply(this, arguments);
|
|
4
|
+
return new Promise(function (resolve, reject) {
|
|
5
|
+
function step(key, arg) {
|
|
6
|
+
try {
|
|
7
|
+
var info = gen[key](arg);
|
|
8
|
+
var value = info.value;
|
|
9
|
+
} catch (error) {
|
|
10
|
+
reject(error);
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (info.done) {
|
|
15
|
+
resolve(value);
|
|
16
|
+
} else {
|
|
17
|
+
return Promise.resolve(value).then(function (value) {
|
|
18
|
+
step("next", value);
|
|
19
|
+
}, function (err) {
|
|
20
|
+
step("throw", err);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return step("next");
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
1
30
|
var classCallCheck = function (instance, Constructor) {
|
|
2
31
|
if (!(instance instanceof Constructor)) {
|
|
3
32
|
throw new TypeError("Cannot call a class as a function");
|
|
@@ -108,4 +137,4 @@ var toConsumableArray = function (arr) {
|
|
|
108
137
|
}
|
|
109
138
|
};
|
|
110
139
|
|
|
111
|
-
export { _extends as _, classCallCheck as a, createClass as c, inherits as i, possibleConstructorReturn as p, slicedToArray as s, toConsumableArray as t };
|
|
140
|
+
export { _extends as _, classCallCheck as a, asyncToGenerator as b, createClass as c, inherits as i, possibleConstructorReturn as p, slicedToArray as s, toConsumableArray as t };
|
package/dist/esm/index.js
CHANGED
|
@@ -13,19 +13,19 @@ import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
|
13
13
|
import 'react-dom';
|
|
14
14
|
import { i as imageUrlBuilder } from './index-ca4ff5cb.js';
|
|
15
15
|
import './index-3c1ee9ab.js';
|
|
16
|
-
import { m as main_36, a as main_35 } from './main-
|
|
16
|
+
import { m as main_36, a as main_16, b as main_35 } from './main-e84e7749.js';
|
|
17
17
|
import { h as html_decode_1, c as clean_html_1 } from './entities-e85d3a4a.js';
|
|
18
|
-
import { s as slicedToArray, _ as _extends$2, t as toConsumableArray, i as inherits$2, c as createClass, a as classCallCheck, p as possibleConstructorReturn } from './_babelHelpers-
|
|
19
|
-
import { D as DFPAdSlot } from './AdSlot-
|
|
20
|
-
export { D as AdSlot } from './AdSlot-
|
|
18
|
+
import { s as slicedToArray, _ as _extends$2, t as toConsumableArray, i as inherits$2, c as createClass, a as classCallCheck, p as possibleConstructorReturn } from './_babelHelpers-c212c59c.js';
|
|
19
|
+
import { D as DFPAdSlot, B as Beam } from './AdSlot-c40f4438.js';
|
|
20
|
+
export { D as AdSlot, B as Beam } from './AdSlot-c40f4438.js';
|
|
21
21
|
export { default as DeckContent } from './DeckContent.js';
|
|
22
22
|
import './get-b074314b.js';
|
|
23
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
23
|
+
export { A as AD, G as GridContent } from './GridContent-e61fff04.js';
|
|
24
24
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
25
25
|
import 'react-bootstrap/Media';
|
|
26
26
|
export { default as ThumbnailCard } from './ThumbnailCard.js';
|
|
27
|
-
import { B as BlockContent } from './TaxonomyCard-
|
|
28
|
-
export { T as TaxonomyCard } from './TaxonomyCard-
|
|
27
|
+
import { B as BlockContent } from './TaxonomyCard-92f9e327.js';
|
|
28
|
+
export { T as TaxonomyCard } from './TaxonomyCard-92f9e327.js';
|
|
29
29
|
import GroupDeck from './GroupDeck.js';
|
|
30
30
|
export { default as GroupDeck } from './GroupDeck.js';
|
|
31
31
|
import { g as getYoutubeId } from './YoutubeGroup-1368335c.js';
|
|
@@ -41,8 +41,8 @@ export { default as IssueDeck } from './IssueDeck.js';
|
|
|
41
41
|
import 'react-bootstrap/Badge';
|
|
42
42
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
43
43
|
import Spinner from 'react-bootstrap/Spinner';
|
|
44
|
-
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-
|
|
45
|
-
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-
|
|
44
|
+
import { M as MdPictureAsPdf, T as TemplateNormal } from './Normal-ebb02255.js';
|
|
45
|
+
export { A as AD728x90, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, g as SideFooter, T as TemplateNormal } from './Normal-ebb02255.js';
|
|
46
46
|
import 'react-bootstrap/ListGroup';
|
|
47
47
|
import Head from 'next/head';
|
|
48
48
|
import Accordion from 'react-bootstrap/Accordion';
|
|
@@ -58,8 +58,8 @@ import Carousel$1 from 'react-bootstrap/Carousel';
|
|
|
58
58
|
import Breadcrumb from 'react-bootstrap/Breadcrumb';
|
|
59
59
|
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
60
60
|
import Dropdown from 'react-bootstrap/Dropdown';
|
|
61
|
-
import { F as FaLongArrowAltRight } from './Ustream-
|
|
62
|
-
export { U as Ustream } from './Ustream-
|
|
61
|
+
import { F as FaLongArrowAltRight } from './Ustream-2bfb1813.js';
|
|
62
|
+
export { U as Ustream } from './Ustream-2bfb1813.js';
|
|
63
63
|
|
|
64
64
|
var clientId = process.env.CVENT_CLIENT_ID;
|
|
65
65
|
var clientSecret = process.env.CVENT_CLIENT_SECRET;
|
|
@@ -3277,6 +3277,26 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
3277
3277
|
|
|
3278
3278
|
var id = getYoutubeId(url);
|
|
3279
3279
|
|
|
3280
|
+
var _useState = useState(false),
|
|
3281
|
+
_useState2 = slicedToArray(_useState, 2),
|
|
3282
|
+
playReported = _useState2[0],
|
|
3283
|
+
setPlayReported = _useState2[1];
|
|
3284
|
+
|
|
3285
|
+
var _useState3 = useState(false),
|
|
3286
|
+
_useState4 = slicedToArray(_useState3, 2),
|
|
3287
|
+
endReported = _useState4[0],
|
|
3288
|
+
setEndReported = _useState4[1];
|
|
3289
|
+
|
|
3290
|
+
var _useState5 = useState(null),
|
|
3291
|
+
_useState6 = slicedToArray(_useState5, 2),
|
|
3292
|
+
intervalID = _useState6[0],
|
|
3293
|
+
setIntervalID = _useState6[1];
|
|
3294
|
+
|
|
3295
|
+
var _useState7 = useState(0),
|
|
3296
|
+
_useState8 = slicedToArray(_useState7, 2),
|
|
3297
|
+
prevPercent = _useState8[0],
|
|
3298
|
+
setPrevPercent = _useState8[1];
|
|
3299
|
+
|
|
3280
3300
|
var opts = {
|
|
3281
3301
|
width: '100%',
|
|
3282
3302
|
playerVars: {
|
|
@@ -3284,7 +3304,57 @@ var YouTubePlayer = function YouTubePlayer(_ref) {
|
|
|
3284
3304
|
}
|
|
3285
3305
|
};
|
|
3286
3306
|
|
|
3287
|
-
|
|
3307
|
+
useEffect(function () {
|
|
3308
|
+
console.log('Video ' + prevPercent);
|
|
3309
|
+
Beam.report_beam_event('Video ' + prevPercent, main_16);
|
|
3310
|
+
}, [prevPercent]);
|
|
3311
|
+
|
|
3312
|
+
var handlePlayPercent = function handlePlayPercent(player) {
|
|
3313
|
+
var time = player.getCurrentTime() * 100;
|
|
3314
|
+
var duration = player.getDuration();
|
|
3315
|
+
var ratio = Math.round(time / duration);
|
|
3316
|
+
var percent = 0;
|
|
3317
|
+
|
|
3318
|
+
if (ratio > 10) percent = 10;
|
|
3319
|
+
if (ratio > 20) percent = 20;
|
|
3320
|
+
if (ratio > 30) percent = 30;
|
|
3321
|
+
if (ratio > 40) percent = 40;
|
|
3322
|
+
if (ratio > 50) percent = 50;
|
|
3323
|
+
if (ratio > 60) percent = 60;
|
|
3324
|
+
if (ratio > 70) percent = 70;
|
|
3325
|
+
if (ratio > 80) percent = 80;
|
|
3326
|
+
if (ratio > 90) percent = 90;
|
|
3327
|
+
if (ratio > 95) percent = 95;
|
|
3328
|
+
|
|
3329
|
+
if (parseInt(prevPercent) != parseInt(percent)) {
|
|
3330
|
+
setPrevPercent(percent);
|
|
3331
|
+
}
|
|
3332
|
+
};
|
|
3333
|
+
|
|
3334
|
+
var handleOnPlay = function handleOnPlay(event) {
|
|
3335
|
+
// report play
|
|
3336
|
+
if (!playReported) {
|
|
3337
|
+
console.log('Video Played');
|
|
3338
|
+
|
|
3339
|
+
Beam.report_beam_event('Video Played', main_16);
|
|
3340
|
+
setPlayReported(true);
|
|
3341
|
+
var _intervalID = setInterval(function () {
|
|
3342
|
+
handlePlayPercent(event.target);
|
|
3343
|
+
}, 1000);
|
|
3344
|
+
setIntervalID(_intervalID);
|
|
3345
|
+
}
|
|
3346
|
+
};
|
|
3347
|
+
|
|
3348
|
+
var handleOnEnd = function handleOnEnd(event) {
|
|
3349
|
+
if (!endReported) {
|
|
3350
|
+
console.log('Video 100');
|
|
3351
|
+
Beam.report_beam_event('Video 100', main_16);
|
|
3352
|
+
setEndReported(true);
|
|
3353
|
+
clearInterval(intervalID);
|
|
3354
|
+
}
|
|
3355
|
+
};
|
|
3356
|
+
|
|
3357
|
+
return React__default.createElement(YouTube, { videoId: id, opts: opts, onPlay: handleOnPlay, onEnd: handleOnEnd });
|
|
3288
3358
|
};
|
|
3289
3359
|
|
|
3290
3360
|
var Sidebar = function Sidebar(_ref) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mjhls/mjh-framework",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.236",
|
|
4
4
|
"description": "Foundation Framework",
|
|
5
5
|
"author": "mjh-framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -86,9 +86,11 @@
|
|
|
86
86
|
"dist"
|
|
87
87
|
],
|
|
88
88
|
"dependencies": {
|
|
89
|
+
"cookie": "^0.4.1",
|
|
89
90
|
"downloadjs": "^1.4.7",
|
|
90
91
|
"faunadb": "^2.14.1",
|
|
91
92
|
"js-cookie": "^2.2.1",
|
|
93
|
+
"next-cookies": "^2.0.3",
|
|
92
94
|
"react-cookies": "^0.1.1",
|
|
93
95
|
"shortid": "^2.2.15",
|
|
94
96
|
"striptags": "^3.1.1"
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
var React__default = _interopDefault(React);
|
|
7
|
-
var index = require('./index-0322e486.js');
|
|
8
|
-
var PropTypes = _interopDefault(require('prop-types'));
|
|
9
|
-
var debounce = require('./debounce-a963b136.js');
|
|
10
|
-
var _babelHelpers = require('./_babelHelpers-f321c258.js');
|
|
11
|
-
|
|
12
|
-
var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
13
|
-
var adUnit = _ref.adUnit,
|
|
14
|
-
sizeMapping = _ref.sizeMapping,
|
|
15
|
-
className = _ref.className,
|
|
16
|
-
slotId = _ref.slotId,
|
|
17
|
-
sizes = _ref.sizes,
|
|
18
|
-
_ref$targeting = _ref.targeting,
|
|
19
|
-
targeting = _ref$targeting === undefined ? {} : _ref$targeting;
|
|
20
|
-
|
|
21
|
-
var _useState = React.useState(false),
|
|
22
|
-
_useState2 = _babelHelpers.slicedToArray(_useState, 2),
|
|
23
|
-
adRendered = _useState2[0],
|
|
24
|
-
setAdRendered = _useState2[1];
|
|
25
|
-
|
|
26
|
-
var _useState3 = React.useState(false),
|
|
27
|
-
_useState4 = _babelHelpers.slicedToArray(_useState3, 2),
|
|
28
|
-
adRefreshable = _useState4[0],
|
|
29
|
-
setAdRefreshable = _useState4[1];
|
|
30
|
-
|
|
31
|
-
var handleVisibilityChange = debounce.debounce_1(function (_ref2) {
|
|
32
|
-
var event = _ref2.event;
|
|
33
|
-
|
|
34
|
-
if (event.inViewPercentage <= 0) {
|
|
35
|
-
setAdRefreshable(false);
|
|
36
|
-
} else {
|
|
37
|
-
setAdRefreshable(true);
|
|
38
|
-
}
|
|
39
|
-
}, 500);
|
|
40
|
-
|
|
41
|
-
return React__default.createElement(
|
|
42
|
-
'div',
|
|
43
|
-
{ className: className },
|
|
44
|
-
React__default.createElement(index.lib_2, {
|
|
45
|
-
slotId: slotId,
|
|
46
|
-
sizes: sizes,
|
|
47
|
-
adUnit: adUnit,
|
|
48
|
-
sizeMapping: sizeMapping,
|
|
49
|
-
targetingArguments: targeting,
|
|
50
|
-
onSlotRender: function onSlotRender(eventData) {
|
|
51
|
-
setAdRendered(true);
|
|
52
|
-
},
|
|
53
|
-
onSlotVisibilityChanged: handleVisibilityChange,
|
|
54
|
-
shouldRefresh: function shouldRefresh() {
|
|
55
|
-
if (adRendered && adRefreshable) return true;else return false;
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
DFPAdSlot.propTypes = {
|
|
62
|
-
adUnit: PropTypes.string.isRequired,
|
|
63
|
-
slotId: PropTypes.string,
|
|
64
|
-
className: PropTypes.string,
|
|
65
|
-
sizeMapping: PropTypes.array,
|
|
66
|
-
sizes: PropTypes.array
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
exports.DFPAdSlot = DFPAdSlot;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import React__default, { useState } from 'react';
|
|
2
|
-
import { b as lib_2 } from './index-70f7c966.js';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { d as debounce_1 } from './debounce-dc0c02e5.js';
|
|
5
|
-
import { s as slicedToArray } from './_babelHelpers-67c05996.js';
|
|
6
|
-
|
|
7
|
-
var DFPAdSlot = function DFPAdSlot(_ref) {
|
|
8
|
-
var adUnit = _ref.adUnit,
|
|
9
|
-
sizeMapping = _ref.sizeMapping,
|
|
10
|
-
className = _ref.className,
|
|
11
|
-
slotId = _ref.slotId,
|
|
12
|
-
sizes = _ref.sizes,
|
|
13
|
-
_ref$targeting = _ref.targeting,
|
|
14
|
-
targeting = _ref$targeting === undefined ? {} : _ref$targeting;
|
|
15
|
-
|
|
16
|
-
var _useState = useState(false),
|
|
17
|
-
_useState2 = slicedToArray(_useState, 2),
|
|
18
|
-
adRendered = _useState2[0],
|
|
19
|
-
setAdRendered = _useState2[1];
|
|
20
|
-
|
|
21
|
-
var _useState3 = useState(false),
|
|
22
|
-
_useState4 = slicedToArray(_useState3, 2),
|
|
23
|
-
adRefreshable = _useState4[0],
|
|
24
|
-
setAdRefreshable = _useState4[1];
|
|
25
|
-
|
|
26
|
-
var handleVisibilityChange = debounce_1(function (_ref2) {
|
|
27
|
-
var event = _ref2.event;
|
|
28
|
-
|
|
29
|
-
if (event.inViewPercentage <= 0) {
|
|
30
|
-
setAdRefreshable(false);
|
|
31
|
-
} else {
|
|
32
|
-
setAdRefreshable(true);
|
|
33
|
-
}
|
|
34
|
-
}, 500);
|
|
35
|
-
|
|
36
|
-
return React__default.createElement(
|
|
37
|
-
'div',
|
|
38
|
-
{ className: className },
|
|
39
|
-
React__default.createElement(lib_2, {
|
|
40
|
-
slotId: slotId,
|
|
41
|
-
sizes: sizes,
|
|
42
|
-
adUnit: adUnit,
|
|
43
|
-
sizeMapping: sizeMapping,
|
|
44
|
-
targetingArguments: targeting,
|
|
45
|
-
onSlotRender: function onSlotRender(eventData) {
|
|
46
|
-
setAdRendered(true);
|
|
47
|
-
},
|
|
48
|
-
onSlotVisibilityChanged: handleVisibilityChange,
|
|
49
|
-
shouldRefresh: function shouldRefresh() {
|
|
50
|
-
if (adRendered && adRefreshable) return true;else return false;
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
DFPAdSlot.propTypes = {
|
|
57
|
-
adUnit: PropTypes.string.isRequired,
|
|
58
|
-
slotId: PropTypes.string,
|
|
59
|
-
className: PropTypes.string,
|
|
60
|
-
sizeMapping: PropTypes.array,
|
|
61
|
-
sizes: PropTypes.array
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { DFPAdSlot as D };
|