@mjhls/mjh-framework 1.0.495 → 1.0.497
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/AD728x90.js +22 -60
- package/dist/cjs/EventsDeck.js +4 -2
- package/dist/esm/AD728x90.js +23 -61
- package/dist/esm/EventsDeck.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/AD728x90.js
CHANGED
|
@@ -15,7 +15,7 @@ require('prop-types');
|
|
|
15
15
|
require('./isSymbol-488934a7.js');
|
|
16
16
|
require('./debounce-32e57002.js');
|
|
17
17
|
var main = require('./main-bc4db521.js');
|
|
18
|
-
|
|
18
|
+
require('./slicedToArray-8063ee51.js');
|
|
19
19
|
require('./stringify-7c5aff47.js');
|
|
20
20
|
require('./asyncToGenerator-8e707718.js');
|
|
21
21
|
require('./_set-species-4458e975.js');
|
|
@@ -37,12 +37,6 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
37
37
|
pos = 'top-mobile';
|
|
38
38
|
mobileView = true;
|
|
39
39
|
}
|
|
40
|
-
//If ad rendered, should turn this to true and enable sticky position
|
|
41
|
-
|
|
42
|
-
var _useState = React.useState(true),
|
|
43
|
-
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
44
|
-
stickyAd = _useState2[0],
|
|
45
|
-
setStickyAd = _useState2[1];
|
|
46
40
|
|
|
47
41
|
var adTargeting = {
|
|
48
42
|
content_placement: targeting.content_placement,
|
|
@@ -55,68 +49,36 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
55
49
|
publication_url: targeting.publication_url
|
|
56
50
|
};
|
|
57
51
|
|
|
58
|
-
var adRef = React.useRef(null);
|
|
59
|
-
|
|
60
|
-
//removed this from event listener and made into its own function
|
|
61
|
-
var applySticky = function applySticky() {
|
|
62
|
-
var navbar = document.querySelector('.navbar');
|
|
63
|
-
var AdOffsetTop = adRef.current.getBoundingClientRect().top;
|
|
64
|
-
if (stickyAd && window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
|
|
65
|
-
if (adRef.current && adRef.current.style) {
|
|
66
|
-
adRef.current.style.position = 'fixed';
|
|
67
|
-
adRef.current.style.bottom = '0';
|
|
68
|
-
adRef.current.style.left = '0px';
|
|
69
|
-
adRef.current.style.zIndex = '9999';
|
|
70
|
-
adRef.current.style.width = '100%';
|
|
71
|
-
adRef.current.style.marginTop = '2px';
|
|
72
|
-
}
|
|
73
|
-
} else {
|
|
74
|
-
if (adRef.current && adRef.current.style) {
|
|
75
|
-
adRef.current.style.position = 'relative';
|
|
76
|
-
adRef.current.style.top = '';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
//Need to reapply event listener once 'stickyAd' is toggled, will only make leaderboard ad sticky if ad is rendered
|
|
82
|
-
|
|
83
|
-
React.useEffect(function () {
|
|
84
|
-
if (stickyAd && window && window.innerWidth && window.innerWidth < 768) {
|
|
85
|
-
window.addEventListener('scroll', applySticky);
|
|
86
|
-
}
|
|
87
|
-
}, [stickyAd]);
|
|
88
|
-
|
|
89
52
|
var browserSizes = [[728, 90], [970, 90], [320, 50], [300, 50]];
|
|
90
53
|
var mobileSizes = [[320, 50], [300, 50]];
|
|
91
54
|
|
|
92
55
|
return React__default.createElement(
|
|
93
56
|
'div',
|
|
94
|
-
{ className: 'leaderboard-ad-wrapper'
|
|
57
|
+
{ className: 'leaderboard-ad-wrapper' },
|
|
58
|
+
React__default.createElement(AdSlot, {
|
|
59
|
+
slotId: slotId,
|
|
60
|
+
networkID: networkID,
|
|
61
|
+
adUnit: adUnit,
|
|
62
|
+
targeting: adTargeting,
|
|
63
|
+
className: 'AD728x90',
|
|
64
|
+
sizes: mobileView ? mobileSizes : browserSizes,
|
|
65
|
+
sizeMapping: [{
|
|
66
|
+
viewport: [768, 1],
|
|
67
|
+
sizes: [[728, 90], [970, 90]]
|
|
68
|
+
}, {
|
|
69
|
+
viewport: [1, 1],
|
|
70
|
+
sizes: [[320, 50], [300, 50]]
|
|
71
|
+
}]
|
|
72
|
+
}),
|
|
95
73
|
React__default.createElement(
|
|
96
|
-
'
|
|
97
|
-
{
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
setStickyAd: setStickyAd,
|
|
101
|
-
slotId: slotId,
|
|
102
|
-
networkID: networkID,
|
|
103
|
-
adUnit: adUnit,
|
|
104
|
-
targeting: adTargeting,
|
|
105
|
-
className: 'AD728x90',
|
|
106
|
-
sizes: mobileView ? mobileSizes : browserSizes,
|
|
107
|
-
sizeMapping: [{
|
|
108
|
-
viewport: [768, 1],
|
|
109
|
-
sizes: [[728, 90], [970, 90]]
|
|
110
|
-
}, {
|
|
111
|
-
viewport: [1, 1],
|
|
112
|
-
sizes: [[320, 50], [300, 50]]
|
|
113
|
-
}]
|
|
114
|
-
})
|
|
74
|
+
'style',
|
|
75
|
+
{ jsx: 'true' },
|
|
76
|
+
'\n .leaderboard-ad-wrapper {\n min-height: 90px;\n background: #fff;\n }\n '
|
|
115
77
|
),
|
|
116
|
-
React__default.createElement(
|
|
78
|
+
main.main_39 && React__default.createElement(
|
|
117
79
|
'style',
|
|
118
80
|
{ jsx: 'true' },
|
|
119
|
-
'\n
|
|
81
|
+
'\n @media screen and (max-width: 768px) {\n .leaderboard-ad-wrapper {\n min-height: 0px;\n position: fixed;\n background: transparent;\n background-color: transparent;\n bottom: 0px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9999;\n \n }\n .leaderboard-ad-wrapper .AD728x90 div[id*=\'google_ads_iframe\']:empty {\n height: 0!important;\n }\n }\n '
|
|
120
82
|
)
|
|
121
83
|
);
|
|
122
84
|
};
|
package/dist/cjs/EventsDeck.js
CHANGED
|
@@ -35,7 +35,9 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
35
35
|
_ref$filter = _ref.filter,
|
|
36
36
|
filter = _ref$filter === undefined ? 'start gt \'' + currentTime + '\' and status eq \'Active\'' : _ref$filter,
|
|
37
37
|
_ref$hardCodedEvents = _ref.hardCodedEvents,
|
|
38
|
-
hardCodedEvents = _ref$hardCodedEvents === undefined ? null : _ref$hardCodedEvents
|
|
38
|
+
hardCodedEvents = _ref$hardCodedEvents === undefined ? null : _ref$hardCodedEvents,
|
|
39
|
+
_ref$cta = _ref.cta,
|
|
40
|
+
cta = _ref$cta === undefined ? 'Register Now' : _ref$cta;
|
|
39
41
|
|
|
40
42
|
var _useState = React.useState(true),
|
|
41
43
|
_useState2 = slicedToArray._slicedToArray(_useState, 2),
|
|
@@ -200,7 +202,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
200
202
|
React__default.createElement(
|
|
201
203
|
Button,
|
|
202
204
|
{ size: 'sm', className: 'registration-button', style: { borderRadius: '8px' } },
|
|
203
|
-
|
|
205
|
+
cta
|
|
204
206
|
)
|
|
205
207
|
);
|
|
206
208
|
};
|
package/dist/esm/AD728x90.js
CHANGED
|
@@ -4,13 +4,13 @@ import './core.get-iterator-method-f5c0d66a.js';
|
|
|
4
4
|
import './_library-528f1934.js';
|
|
5
5
|
import './_iter-detect-6e099a34.js';
|
|
6
6
|
import './web.dom.iterable-46c95e52.js';
|
|
7
|
-
import React__default
|
|
7
|
+
import React__default from 'react';
|
|
8
8
|
import './index-93ec3c59.js';
|
|
9
9
|
import 'prop-types';
|
|
10
10
|
import './isSymbol-c1b9be80.js';
|
|
11
11
|
import './debounce-8cd9e09c.js';
|
|
12
12
|
import { m as main_39 } from './main-7255814e.js';
|
|
13
|
-
import
|
|
13
|
+
import './slicedToArray-f1e40361.js';
|
|
14
14
|
import './stringify-e30bc114.js';
|
|
15
15
|
import './asyncToGenerator-0379e924.js';
|
|
16
16
|
import './_set-species-6f64f1c1.js';
|
|
@@ -32,12 +32,6 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
32
32
|
pos = 'top-mobile';
|
|
33
33
|
mobileView = true;
|
|
34
34
|
}
|
|
35
|
-
//If ad rendered, should turn this to true and enable sticky position
|
|
36
|
-
|
|
37
|
-
var _useState = useState(true),
|
|
38
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
-
stickyAd = _useState2[0],
|
|
40
|
-
setStickyAd = _useState2[1];
|
|
41
35
|
|
|
42
36
|
var adTargeting = {
|
|
43
37
|
content_placement: targeting.content_placement,
|
|
@@ -50,68 +44,36 @@ var AD728x90 = function AD728x90(_ref) {
|
|
|
50
44
|
publication_url: targeting.publication_url
|
|
51
45
|
};
|
|
52
46
|
|
|
53
|
-
var adRef = useRef(null);
|
|
54
|
-
|
|
55
|
-
//removed this from event listener and made into its own function
|
|
56
|
-
var applySticky = function applySticky() {
|
|
57
|
-
var navbar = document.querySelector('.navbar');
|
|
58
|
-
var AdOffsetTop = adRef.current.getBoundingClientRect().top;
|
|
59
|
-
if (stickyAd && window.pageYOffset + (AdOffsetTop - navbar.offsetHeight) > AdOffsetTop) {
|
|
60
|
-
if (adRef.current && adRef.current.style) {
|
|
61
|
-
adRef.current.style.position = 'fixed';
|
|
62
|
-
adRef.current.style.bottom = '0';
|
|
63
|
-
adRef.current.style.left = '0px';
|
|
64
|
-
adRef.current.style.zIndex = '9999';
|
|
65
|
-
adRef.current.style.width = '100%';
|
|
66
|
-
adRef.current.style.marginTop = '2px';
|
|
67
|
-
}
|
|
68
|
-
} else {
|
|
69
|
-
if (adRef.current && adRef.current.style) {
|
|
70
|
-
adRef.current.style.position = 'relative';
|
|
71
|
-
adRef.current.style.top = '';
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
//Need to reapply event listener once 'stickyAd' is toggled, will only make leaderboard ad sticky if ad is rendered
|
|
77
|
-
|
|
78
|
-
useEffect(function () {
|
|
79
|
-
if (stickyAd && window && window.innerWidth && window.innerWidth < 768) {
|
|
80
|
-
window.addEventListener('scroll', applySticky);
|
|
81
|
-
}
|
|
82
|
-
}, [stickyAd]);
|
|
83
|
-
|
|
84
47
|
var browserSizes = [[728, 90], [970, 90], [320, 50], [300, 50]];
|
|
85
48
|
var mobileSizes = [[320, 50], [300, 50]];
|
|
86
49
|
|
|
87
50
|
return React__default.createElement(
|
|
88
51
|
'div',
|
|
89
|
-
{ className: 'leaderboard-ad-wrapper'
|
|
52
|
+
{ className: 'leaderboard-ad-wrapper' },
|
|
53
|
+
React__default.createElement(DFPAdSlot, {
|
|
54
|
+
slotId: slotId,
|
|
55
|
+
networkID: networkID,
|
|
56
|
+
adUnit: adUnit,
|
|
57
|
+
targeting: adTargeting,
|
|
58
|
+
className: 'AD728x90',
|
|
59
|
+
sizes: mobileView ? mobileSizes : browserSizes,
|
|
60
|
+
sizeMapping: [{
|
|
61
|
+
viewport: [768, 1],
|
|
62
|
+
sizes: [[728, 90], [970, 90]]
|
|
63
|
+
}, {
|
|
64
|
+
viewport: [1, 1],
|
|
65
|
+
sizes: [[320, 50], [300, 50]]
|
|
66
|
+
}]
|
|
67
|
+
}),
|
|
90
68
|
React__default.createElement(
|
|
91
|
-
'
|
|
92
|
-
{
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
setStickyAd: setStickyAd,
|
|
96
|
-
slotId: slotId,
|
|
97
|
-
networkID: networkID,
|
|
98
|
-
adUnit: adUnit,
|
|
99
|
-
targeting: adTargeting,
|
|
100
|
-
className: 'AD728x90',
|
|
101
|
-
sizes: mobileView ? mobileSizes : browserSizes,
|
|
102
|
-
sizeMapping: [{
|
|
103
|
-
viewport: [768, 1],
|
|
104
|
-
sizes: [[728, 90], [970, 90]]
|
|
105
|
-
}, {
|
|
106
|
-
viewport: [1, 1],
|
|
107
|
-
sizes: [[320, 50], [300, 50]]
|
|
108
|
-
}]
|
|
109
|
-
})
|
|
69
|
+
'style',
|
|
70
|
+
{ jsx: 'true' },
|
|
71
|
+
'\n .leaderboard-ad-wrapper {\n min-height: 90px;\n background: #fff;\n }\n '
|
|
110
72
|
),
|
|
111
|
-
React__default.createElement(
|
|
73
|
+
main_39 && React__default.createElement(
|
|
112
74
|
'style',
|
|
113
75
|
{ jsx: 'true' },
|
|
114
|
-
'\n
|
|
76
|
+
'\n @media screen and (max-width: 768px) {\n .leaderboard-ad-wrapper {\n min-height: 0px;\n position: fixed;\n background: transparent;\n background-color: transparent;\n bottom: 0px;\n left: 50%;\n transform: translateX(-50%);\n z-index: 9999;\n \n }\n .leaderboard-ad-wrapper .AD728x90 div[id*=\'google_ads_iframe\']:empty {\n height: 0!important;\n }\n }\n '
|
|
115
77
|
)
|
|
116
78
|
);
|
|
117
79
|
};
|
package/dist/esm/EventsDeck.js
CHANGED
|
@@ -30,7 +30,9 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
30
30
|
_ref$filter = _ref.filter,
|
|
31
31
|
filter = _ref$filter === undefined ? 'start gt \'' + currentTime + '\' and status eq \'Active\'' : _ref$filter,
|
|
32
32
|
_ref$hardCodedEvents = _ref.hardCodedEvents,
|
|
33
|
-
hardCodedEvents = _ref$hardCodedEvents === undefined ? null : _ref$hardCodedEvents
|
|
33
|
+
hardCodedEvents = _ref$hardCodedEvents === undefined ? null : _ref$hardCodedEvents,
|
|
34
|
+
_ref$cta = _ref.cta,
|
|
35
|
+
cta = _ref$cta === undefined ? 'Register Now' : _ref$cta;
|
|
34
36
|
|
|
35
37
|
var _useState = useState(true),
|
|
36
38
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -195,7 +197,7 @@ var EventsDeck = function EventsDeck(_ref) {
|
|
|
195
197
|
React__default.createElement(
|
|
196
198
|
Button,
|
|
197
199
|
{ size: 'sm', className: 'registration-button', style: { borderRadius: '8px' } },
|
|
198
|
-
|
|
200
|
+
cta
|
|
199
201
|
)
|
|
200
202
|
);
|
|
201
203
|
};
|