@mjhls/mjh-framework 1.0.685 → 1.0.687
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/AD300x250.js +2 -1
- package/dist/cjs/AD300x250x600.js +2 -1
- package/dist/cjs/AD728x90.js +2 -1
- package/dist/cjs/ADFloatingFooter.js +2 -1
- package/dist/cjs/ADGutter.js +2 -1
- package/dist/cjs/ADSkyscraper.js +2 -1
- package/dist/cjs/ADSponsoredResources.js +2 -1
- package/dist/cjs/ADWebcast.js +2 -1
- package/dist/cjs/ADWelcome.js +2 -1
- package/dist/cjs/AdSlot.js +6 -5
- package/dist/cjs/Beam.js +340 -4
- package/dist/cjs/Column2.js +1 -2
- package/dist/cjs/Column3.js +2 -1
- package/dist/cjs/DeckContent.js +3 -2
- package/dist/cjs/ExternalResources.js +3 -2
- package/dist/cjs/GridContent.js +4 -3
- package/dist/cjs/HamMagazine.js +7 -8
- package/dist/cjs/IssueLanding.js +4 -3
- package/dist/cjs/LeftNav.js +3 -4
- package/dist/cjs/MasterDeck.js +4 -3
- package/dist/cjs/NavDvm.js +5 -6
- package/dist/cjs/NavMagazine.js +7 -8
- package/dist/cjs/NavNative.js +7 -8
- package/dist/cjs/NavNormal.js +2 -4
- package/dist/cjs/PartnerDetailListing.js +5 -4
- package/dist/cjs/QueueDeckExpanded.js +15 -12
- package/dist/cjs/Segment.js +346 -4
- package/dist/cjs/SideFooter.js +2 -4
- package/dist/cjs/TemplateNormal.js +2 -1
- package/dist/cjs/View.js +3 -2
- package/dist/cjs/getSerializers.js +3 -2
- package/dist/cjs/{index-8c9e8ca7.js → index-a1090dcd.js} +47 -47
- package/dist/cjs/index.js +7 -6
- package/dist/esm/AD300x250.js +2 -1
- package/dist/esm/AD300x250x600.js +2 -1
- package/dist/esm/AD728x90.js +2 -1
- package/dist/esm/ADFloatingFooter.js +2 -1
- package/dist/esm/ADGutter.js +2 -1
- package/dist/esm/ADSkyscraper.js +2 -1
- package/dist/esm/ADSponsoredResources.js +2 -1
- package/dist/esm/ADWebcast.js +2 -1
- package/dist/esm/ADWelcome.js +2 -1
- package/dist/esm/AdSlot.js +2 -1
- package/dist/esm/Beam.js +343 -3
- package/dist/esm/Column2.js +1 -2
- package/dist/esm/Column3.js +2 -1
- package/dist/esm/DeckContent.js +3 -2
- package/dist/esm/ExternalResources.js +3 -2
- package/dist/esm/GridContent.js +4 -3
- package/dist/esm/HamMagazine.js +1 -2
- package/dist/esm/IssueLanding.js +4 -3
- package/dist/esm/LeftNav.js +2 -3
- package/dist/esm/MasterDeck.js +4 -3
- package/dist/esm/NavDvm.js +1 -2
- package/dist/esm/NavMagazine.js +1 -2
- package/dist/esm/NavNative.js +1 -2
- package/dist/esm/NavNormal.js +1 -3
- package/dist/esm/PartnerDetailListing.js +5 -4
- package/dist/esm/QueueDeckExpanded.js +15 -12
- package/dist/esm/Segment.js +349 -3
- package/dist/esm/SideFooter.js +1 -3
- package/dist/esm/TemplateNormal.js +2 -1
- package/dist/esm/View.js +3 -2
- package/dist/esm/getSerializers.js +3 -2
- package/dist/esm/{index-5505d4f9.js → index-a3da0503.js} +2 -2
- package/dist/esm/index.js +5 -4
- package/package.json +1 -1
- package/dist/cjs/beam-7217b7e7.js +0 -733
- package/dist/esm/beam-681a9749.js +0 -730
- /package/dist/cjs/{ADInfeed-c676389b.js → ADInfeed-cf81b7aa.js} +0 -0
- /package/dist/cjs/{ADlgInfeed-57d63c87.js → ADlgInfeed-ebc1bf56.js} +0 -0
- /package/dist/esm/{ADInfeed-97b8cea7.js → ADInfeed-898b9c8f.js} +0 -0
- /package/dist/esm/{ADlgInfeed-3ab91c75.js → ADlgInfeed-a747451b.js} +0 -0
|
@@ -27,11 +27,12 @@ import './stringify-008c8802.js';
|
|
|
27
27
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
28
28
|
import './asyncToGenerator-7c654f36.js';
|
|
29
29
|
import './_set-species-cede29f8.js';
|
|
30
|
-
import './
|
|
30
|
+
import './Segment.js';
|
|
31
|
+
import './Beam.js';
|
|
31
32
|
import './AdSlot.js';
|
|
32
|
-
import { A as ADInfeed } from './ADInfeed-
|
|
33
|
+
import { A as ADInfeed } from './ADInfeed-898b9c8f.js';
|
|
33
34
|
import { l as lodash } from './lodash-17fdfebb.js';
|
|
34
|
-
import { A as ADlgInfeed } from './ADlgInfeed-
|
|
35
|
+
import { A as ADlgInfeed } from './ADlgInfeed-a747451b.js';
|
|
35
36
|
import { g as getContentCategory } from './getContentCategory-15dcc413.js';
|
|
36
37
|
import { A as AuthorComponent } from './AuthorComponent-00f13201.js';
|
|
37
38
|
import { Container, Media } from 'react-bootstrap';
|
|
@@ -150,7 +151,7 @@ var checkExternalUrl = function checkExternalUrl(url) {
|
|
|
150
151
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
151
152
|
};
|
|
152
153
|
|
|
153
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies) {
|
|
154
|
+
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro) {
|
|
154
155
|
var numberOfItemsBeforeAd = 6;
|
|
155
156
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
156
157
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
@@ -406,7 +407,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
406
407
|
article.issue
|
|
407
408
|
)
|
|
408
409
|
),
|
|
409
|
-
article.summary && React__default.createElement(
|
|
410
|
+
showIntro && article.summary && React__default.createElement(
|
|
410
411
|
'p',
|
|
411
412
|
{ className: 'pt-2 card-text' },
|
|
412
413
|
clean_html_1(article.summary)
|
|
@@ -577,7 +578,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
577
578
|
article.issue
|
|
578
579
|
)
|
|
579
580
|
),
|
|
580
|
-
article.summary && React__default.createElement(
|
|
581
|
+
showIntro && article.summary && React__default.createElement(
|
|
581
582
|
'p',
|
|
582
583
|
{ className: 'pt-2 card-text' },
|
|
583
584
|
clean_html_1(article.summary)
|
|
@@ -746,7 +747,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
746
747
|
article.issue
|
|
747
748
|
)
|
|
748
749
|
),
|
|
749
|
-
article.summary && React__default.createElement(
|
|
750
|
+
showIntro && article.summary && React__default.createElement(
|
|
750
751
|
'p',
|
|
751
752
|
{ className: 'pt-2 card-text' },
|
|
752
753
|
clean_html_1(article.summary)
|
|
@@ -923,7 +924,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
923
924
|
article.issue
|
|
924
925
|
)
|
|
925
926
|
),
|
|
926
|
-
article.summary && React__default.createElement(
|
|
927
|
+
showIntro && article.summary && React__default.createElement(
|
|
927
928
|
'p',
|
|
928
929
|
{ className: 'pt-2 card-text' },
|
|
929
930
|
clean_html_1(article.summary)
|
|
@@ -1083,7 +1084,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
1083
1084
|
article.issue
|
|
1084
1085
|
)
|
|
1085
1086
|
),
|
|
1086
|
-
article.summary && React__default.createElement(
|
|
1087
|
+
showIntro && article.summary && React__default.createElement(
|
|
1087
1088
|
'p',
|
|
1088
1089
|
{ className: 'pt-2 card-text' },
|
|
1089
1090
|
clean_html_1(article.summary)
|
|
@@ -1252,7 +1253,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
1252
1253
|
article.issue
|
|
1253
1254
|
)
|
|
1254
1255
|
),
|
|
1255
|
-
article.summary && React__default.createElement(
|
|
1256
|
+
showIntro && article.summary && React__default.createElement(
|
|
1256
1257
|
'p',
|
|
1257
1258
|
{ className: 'pt-2 card-text' },
|
|
1258
1259
|
clean_html_1(article.summary)
|
|
@@ -1362,6 +1363,8 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1362
1363
|
showTimeDiff = _props$showTimeDiff === undefined ? false : _props$showTimeDiff,
|
|
1363
1364
|
_props$showTaxonomies = props.showTaxonomies,
|
|
1364
1365
|
showTaxonomies = _props$showTaxonomies === undefined ? false : _props$showTaxonomies,
|
|
1366
|
+
_props$showIntro = props.showIntro,
|
|
1367
|
+
showIntro = _props$showIntro === undefined ? true : _props$showIntro,
|
|
1365
1368
|
_props$contentCategor = props.contentCategoryMapping,
|
|
1366
1369
|
contentCategoryMapping = _props$contentCategor === undefined ? [] : _props$contentCategor;
|
|
1367
1370
|
var initialCurrentPage = props.currentPage,
|
|
@@ -1480,7 +1483,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1480
1483
|
React__default.createElement(
|
|
1481
1484
|
Container,
|
|
1482
1485
|
null,
|
|
1483
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies)
|
|
1486
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
|
|
1484
1487
|
)
|
|
1485
1488
|
),
|
|
1486
1489
|
React__default.createElement(
|
|
@@ -1494,7 +1497,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
1494
1497
|
React__default.createElement(
|
|
1495
1498
|
Container,
|
|
1496
1499
|
null,
|
|
1497
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies)
|
|
1500
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd, showPubInfo, contentCategoryMapping, showTimeDiff, showTaxonomies, showIntro)
|
|
1498
1501
|
),
|
|
1499
1502
|
React__default.createElement(
|
|
1500
1503
|
'div',
|
package/dist/esm/Segment.js
CHANGED
|
@@ -5,7 +5,353 @@ import './_library-528f1934.js';
|
|
|
5
5
|
import './_iter-detect-59409a32.js';
|
|
6
6
|
import './core.get-iterator-method-54d2e411.js';
|
|
7
7
|
import './web.dom.iterable-8956f9a5.js';
|
|
8
|
-
import './
|
|
9
|
-
import './asyncToGenerator-7c654f36.js';
|
|
8
|
+
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
|
|
10
9
|
import './_set-species-cede29f8.js';
|
|
11
|
-
|
|
10
|
+
|
|
11
|
+
require("babel-polyfill");
|
|
12
|
+
|
|
13
|
+
var Segment = {
|
|
14
|
+
identify: function identify(eKey) {
|
|
15
|
+
if (!eKey) {
|
|
16
|
+
throw new Error('eKey is not present');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (typeof analytics === 'undefined') {
|
|
20
|
+
console.error('Segment not initialized', analytics);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var buff = Buffer.from(eKey, 'base64');
|
|
25
|
+
var email = buff.toString('ascii');
|
|
26
|
+
|
|
27
|
+
analytics.identify(eKey, {
|
|
28
|
+
email: email
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
getURL: function getURL(url) {
|
|
32
|
+
var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
33
|
+
|
|
34
|
+
if (!data || !data.needSegmentSupport) {
|
|
35
|
+
return url;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (typeof analytics === 'undefined') {
|
|
39
|
+
console.error('segment not defined');
|
|
40
|
+
return url;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var user = analytics.user();
|
|
44
|
+
if (!user) {
|
|
45
|
+
console.log('segment user not defined');
|
|
46
|
+
return url;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
var anonymouseId = user.anonymousId();
|
|
50
|
+
//const eKey = Beam.proc_eKey(Beam.proc_url())
|
|
51
|
+
var eKey = user._getId();
|
|
52
|
+
if (eKey) {
|
|
53
|
+
url += (url.includes('?') ? '&' : '?') + 'ekey=' + eKey;
|
|
54
|
+
} else {
|
|
55
|
+
url += (url.includes('?') ? '&' : '?') + 'anonymousid=' + anonymouseId;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return url;
|
|
59
|
+
},
|
|
60
|
+
getIDs: function getIDs() {
|
|
61
|
+
var _this = this;
|
|
62
|
+
|
|
63
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
64
|
+
var res, json;
|
|
65
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
66
|
+
while (1) {
|
|
67
|
+
switch (_context.prev = _context.next) {
|
|
68
|
+
case 0:
|
|
69
|
+
_context.next = 2;
|
|
70
|
+
return fetch('https://beam.mjhlifesciences.com/api/beam/id', {
|
|
71
|
+
headers: {
|
|
72
|
+
'Content-Type': 'application/json',
|
|
73
|
+
Accept: 'application/json'
|
|
74
|
+
},
|
|
75
|
+
method: 'post',
|
|
76
|
+
credentials: 'include'
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
case 2:
|
|
80
|
+
res = _context.sent;
|
|
81
|
+
_context.next = 5;
|
|
82
|
+
return res.json();
|
|
83
|
+
|
|
84
|
+
case 5:
|
|
85
|
+
json = _context.sent;
|
|
86
|
+
return _context.abrupt('return', json);
|
|
87
|
+
|
|
88
|
+
case 7:
|
|
89
|
+
case 'end':
|
|
90
|
+
return _context.stop();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}, _callee, _this);
|
|
94
|
+
}))();
|
|
95
|
+
},
|
|
96
|
+
pageview: function pageview(domain) {
|
|
97
|
+
var _this2 = this;
|
|
98
|
+
|
|
99
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
100
|
+
var result, beam_id, session_id;
|
|
101
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
102
|
+
while (1) {
|
|
103
|
+
switch (_context2.prev = _context2.next) {
|
|
104
|
+
case 0:
|
|
105
|
+
if (!(typeof analytics === 'undefined')) {
|
|
106
|
+
_context2.next = 3;
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
console.error('Segment not initialized', window);
|
|
111
|
+
return _context2.abrupt('return');
|
|
112
|
+
|
|
113
|
+
case 3:
|
|
114
|
+
_context2.next = 5;
|
|
115
|
+
return _this2.getIDs();
|
|
116
|
+
|
|
117
|
+
case 5:
|
|
118
|
+
result = _context2.sent;
|
|
119
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
120
|
+
session_id = result.session_id ? result.session_id : '';
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
analytics.track('pageviews', {
|
|
124
|
+
beamid: beam_id,
|
|
125
|
+
sessionid: session_id,
|
|
126
|
+
category: '',
|
|
127
|
+
domain: domain
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
case 9:
|
|
131
|
+
case 'end':
|
|
132
|
+
return _context2.stop();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}, _callee2, _this2);
|
|
136
|
+
}))();
|
|
137
|
+
},
|
|
138
|
+
report_video_event: function report_video_event(action, deviceType, duration, current, segmentData) {
|
|
139
|
+
var videoType = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'Youtube';
|
|
140
|
+
var brightCovePlayerID = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';
|
|
141
|
+
|
|
142
|
+
var _this3 = this;
|
|
143
|
+
|
|
144
|
+
var brightCoveAccountID = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : '';
|
|
145
|
+
var brightCoveVideoID = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : '';
|
|
146
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3() {
|
|
147
|
+
var result, beam_id, session_id, domain, data;
|
|
148
|
+
return regenerator.wrap(function _callee3$(_context3) {
|
|
149
|
+
while (1) {
|
|
150
|
+
switch (_context3.prev = _context3.next) {
|
|
151
|
+
case 0:
|
|
152
|
+
if (!(typeof analytics === 'undefined')) {
|
|
153
|
+
_context3.next = 3;
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
console.error('Segment not initialized');
|
|
158
|
+
return _context3.abrupt('return');
|
|
159
|
+
|
|
160
|
+
case 3:
|
|
161
|
+
_context3.next = 5;
|
|
162
|
+
return _this3.getIDs();
|
|
163
|
+
|
|
164
|
+
case 5:
|
|
165
|
+
result = _context3.sent;
|
|
166
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
167
|
+
session_id = result.session_id ? result.session_id : '';
|
|
168
|
+
domain = typeof window !== 'undefined' && window.location ? window.location.hostname : '';
|
|
169
|
+
data = {
|
|
170
|
+
beamid: beam_id,
|
|
171
|
+
sessionid: session_id,
|
|
172
|
+
domain: domain,
|
|
173
|
+
Devicetype: deviceType,
|
|
174
|
+
videoid: brightCoveVideoID,
|
|
175
|
+
title: '',
|
|
176
|
+
category: '',
|
|
177
|
+
videoplayer: videoType,
|
|
178
|
+
totalduration: duration,
|
|
179
|
+
currentduration: current,
|
|
180
|
+
segment: segmentData,
|
|
181
|
+
queue: Math.floor(duration / 10),
|
|
182
|
+
brightCovePlayerID: brightCovePlayerID,
|
|
183
|
+
brightCoveAccountID: brightCoveAccountID
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
console.log('Segment ' + videoType, action, data);
|
|
188
|
+
|
|
189
|
+
analytics.track(action, data);
|
|
190
|
+
|
|
191
|
+
case 12:
|
|
192
|
+
case 'end':
|
|
193
|
+
return _context3.stop();
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}, _callee3, _this3);
|
|
197
|
+
}))();
|
|
198
|
+
},
|
|
199
|
+
report_ad_event: function report_ad_event(action, deviceType, duration) {
|
|
200
|
+
var adType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'brightcove';
|
|
201
|
+
var adId = arguments[4];
|
|
202
|
+
|
|
203
|
+
var _this4 = this;
|
|
204
|
+
|
|
205
|
+
var brightCovePlayerID = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '';
|
|
206
|
+
var brightCoveAccountID = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';
|
|
207
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4() {
|
|
208
|
+
var result, beam_id, session_id, domain, data;
|
|
209
|
+
return regenerator.wrap(function _callee4$(_context4) {
|
|
210
|
+
while (1) {
|
|
211
|
+
switch (_context4.prev = _context4.next) {
|
|
212
|
+
case 0:
|
|
213
|
+
if (!(typeof analytics === 'undefined')) {
|
|
214
|
+
_context4.next = 3;
|
|
215
|
+
break;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
console.error('Segment not initialized');
|
|
219
|
+
return _context4.abrupt('return');
|
|
220
|
+
|
|
221
|
+
case 3:
|
|
222
|
+
_context4.next = 5;
|
|
223
|
+
return _this4.getIDs();
|
|
224
|
+
|
|
225
|
+
case 5:
|
|
226
|
+
result = _context4.sent;
|
|
227
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
228
|
+
session_id = result.session_id ? result.session_id : '';
|
|
229
|
+
domain = typeof window !== 'undefined' && window.location ? window.location.hostname : '';
|
|
230
|
+
data = {
|
|
231
|
+
beamid: beam_id,
|
|
232
|
+
sessionid: session_id,
|
|
233
|
+
domain: domain,
|
|
234
|
+
Devicetype: deviceType,
|
|
235
|
+
title: '',
|
|
236
|
+
category: '',
|
|
237
|
+
adType: adType,
|
|
238
|
+
totalduration: duration,
|
|
239
|
+
adId: adId,
|
|
240
|
+
brightCovePlayerID: brightCovePlayerID,
|
|
241
|
+
brightCoveAccountID: brightCoveAccountID
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
console.log('Segment ' + adType, action, data);
|
|
246
|
+
|
|
247
|
+
analytics.track(action, data);
|
|
248
|
+
|
|
249
|
+
case 12:
|
|
250
|
+
case 'end':
|
|
251
|
+
return _context4.stop();
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}, _callee4, _this4);
|
|
255
|
+
}))();
|
|
256
|
+
},
|
|
257
|
+
adClicked: function adClicked(domain, advertiserid, campaignid, creativeid, itemid, size, isemptyline, sourceAgnosticCreativeId, sourceAgnosticlineId) {
|
|
258
|
+
var _this5 = this;
|
|
259
|
+
|
|
260
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee5() {
|
|
261
|
+
var result, beam_id, session_id;
|
|
262
|
+
return regenerator.wrap(function _callee5$(_context5) {
|
|
263
|
+
while (1) {
|
|
264
|
+
switch (_context5.prev = _context5.next) {
|
|
265
|
+
case 0:
|
|
266
|
+
if (!(typeof analytics === 'undefined')) {
|
|
267
|
+
_context5.next = 3;
|
|
268
|
+
break;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
console.error('Segment not initialized');
|
|
272
|
+
return _context5.abrupt('return');
|
|
273
|
+
|
|
274
|
+
case 3:
|
|
275
|
+
_context5.next = 5;
|
|
276
|
+
return _this5.getIDs();
|
|
277
|
+
|
|
278
|
+
case 5:
|
|
279
|
+
result = _context5.sent;
|
|
280
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
281
|
+
session_id = result.session_id ? result.session_id : '';
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
analytics.track('Ad Clicked', {
|
|
285
|
+
beamid: beam_id,
|
|
286
|
+
sessionid: session_id,
|
|
287
|
+
advertiserid: advertiserid,
|
|
288
|
+
campaignid: campaignid,
|
|
289
|
+
creativeid: creativeid,
|
|
290
|
+
itemid: itemid,
|
|
291
|
+
size: size,
|
|
292
|
+
isemptyline: isemptyline,
|
|
293
|
+
sourceAgnosticCreativeId: sourceAgnosticCreativeId,
|
|
294
|
+
sourceAgnosticlineId: sourceAgnosticlineId,
|
|
295
|
+
domain: domain
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
case 9:
|
|
299
|
+
case 'end':
|
|
300
|
+
return _context5.stop();
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}, _callee5, _this5);
|
|
304
|
+
}))();
|
|
305
|
+
},
|
|
306
|
+
adViewed: function adViewed(domain, advertiserid, campaignid, creativeid, itemid, size, isemptyline, sourceAgnosticCreativeId, sourceAgnosticlineId) {
|
|
307
|
+
var _this6 = this;
|
|
308
|
+
|
|
309
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee6() {
|
|
310
|
+
var result, beam_id, session_id;
|
|
311
|
+
return regenerator.wrap(function _callee6$(_context6) {
|
|
312
|
+
while (1) {
|
|
313
|
+
switch (_context6.prev = _context6.next) {
|
|
314
|
+
case 0:
|
|
315
|
+
if (!(typeof analytics === 'undefined')) {
|
|
316
|
+
_context6.next = 3;
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
console.error('Segment not initialized');
|
|
321
|
+
return _context6.abrupt('return');
|
|
322
|
+
|
|
323
|
+
case 3:
|
|
324
|
+
_context6.next = 5;
|
|
325
|
+
return _this6.getIDs();
|
|
326
|
+
|
|
327
|
+
case 5:
|
|
328
|
+
result = _context6.sent;
|
|
329
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
330
|
+
session_id = result.session_id ? result.session_id : '';
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
analytics.track('Impression Viewed', {
|
|
334
|
+
beamid: beam_id,
|
|
335
|
+
sessionid: session_id,
|
|
336
|
+
advertiserid: advertiserid,
|
|
337
|
+
campaignid: campaignid,
|
|
338
|
+
creativeid: creativeid,
|
|
339
|
+
itemid: itemid,
|
|
340
|
+
size: size,
|
|
341
|
+
isemptyline: isemptyline,
|
|
342
|
+
sourceAgnosticCreativeId: sourceAgnosticCreativeId,
|
|
343
|
+
sourceAgnosticlineId: sourceAgnosticlineId,
|
|
344
|
+
domain: domain
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
case 9:
|
|
348
|
+
case 'end':
|
|
349
|
+
return _context6.stop();
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}, _callee6, _this6);
|
|
353
|
+
}))();
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export default Segment;
|
package/dist/esm/SideFooter.js
CHANGED
|
@@ -9,10 +9,9 @@ import './web.dom.iterable-8956f9a5.js';
|
|
|
9
9
|
import React__default, { useRef, useEffect } from 'react';
|
|
10
10
|
import 'prop-types';
|
|
11
11
|
import './isSymbol-807e927e.js';
|
|
12
|
-
import './stringify-008c8802.js';
|
|
13
12
|
import './asyncToGenerator-7c654f36.js';
|
|
14
13
|
import './_set-species-cede29f8.js';
|
|
15
|
-
import
|
|
14
|
+
import Segment from './Segment.js';
|
|
16
15
|
import { g as get_1 } from './get-5ee14cda.js';
|
|
17
16
|
import { r as reactSocialIcons_1 } from './react-social-icons-a7d5c5c7.js';
|
|
18
17
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
@@ -53,7 +52,6 @@ var SideFooter = function SideFooter(props) {
|
|
|
53
52
|
var sfRef = useRef(null);
|
|
54
53
|
|
|
55
54
|
useEffect(function () {
|
|
56
|
-
Segment.init(); // auto init if not done yet
|
|
57
55
|
// this adds ?eKey=xxx or ?anonymousid=xxx for forms that's outside - eg) formstack forms
|
|
58
56
|
// for tracking same user
|
|
59
57
|
var segmentLinks = sfRef.current.querySelectorAll('a[needsegmentsupport="true"]');
|
|
@@ -20,7 +20,8 @@ import './stringify-008c8802.js';
|
|
|
20
20
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
21
21
|
import './asyncToGenerator-7c654f36.js';
|
|
22
22
|
import './_set-species-cede29f8.js';
|
|
23
|
-
import './
|
|
23
|
+
import './Segment.js';
|
|
24
|
+
import './Beam.js';
|
|
24
25
|
import './AdSlot.js';
|
|
25
26
|
import './get-5ee14cda.js';
|
|
26
27
|
import './react-social-icons-a7d5c5c7.js';
|
package/dist/esm/View.js
CHANGED
|
@@ -32,7 +32,8 @@ import { _ as _JSON$stringify } from './stringify-008c8802.js';
|
|
|
32
32
|
import { a as _getIterator, _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
33
33
|
import { a as _asyncToGenerator, r as regenerator } from './asyncToGenerator-7c654f36.js';
|
|
34
34
|
import './_set-species-cede29f8.js';
|
|
35
|
-
import './
|
|
35
|
+
import './Segment.js';
|
|
36
|
+
import './Beam.js';
|
|
36
37
|
import DFPAdSlot from './AdSlot.js';
|
|
37
38
|
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
38
39
|
import './smoothscroll-4b699764.js';
|
|
@@ -42,7 +43,7 @@ import './iconBase-602d52fe.js';
|
|
|
42
43
|
import Button from 'react-bootstrap/Button';
|
|
43
44
|
import { _ as _defineProperty } from './defineProperty-b798470d.js';
|
|
44
45
|
import Form from 'react-bootstrap/Form';
|
|
45
|
-
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-
|
|
46
|
+
import { I as InscreenSensor, r as renderAuthor, g as getSerializers } from './index-a3da0503.js';
|
|
46
47
|
import './util-7700fc59.js';
|
|
47
48
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
48
49
|
import 'react-bootstrap/Pagination';
|
|
@@ -31,14 +31,15 @@ import './stringify-008c8802.js';
|
|
|
31
31
|
import './slicedToArray-7021e5df.js';
|
|
32
32
|
import './asyncToGenerator-7c654f36.js';
|
|
33
33
|
import './_set-species-cede29f8.js';
|
|
34
|
-
import './
|
|
34
|
+
import './Segment.js';
|
|
35
|
+
import './Beam.js';
|
|
35
36
|
import './AdSlot.js';
|
|
36
37
|
import './BlockContent-a614acdf.js';
|
|
37
38
|
import './smoothscroll-4b699764.js';
|
|
38
39
|
import './GroupDeck.js';
|
|
39
40
|
import 'react-bootstrap';
|
|
40
41
|
import 'react-bootstrap/Button';
|
|
41
|
-
export { g as default } from './index-
|
|
42
|
+
export { g as default } from './index-a3da0503.js';
|
|
42
43
|
import './util-7700fc59.js';
|
|
43
44
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
44
45
|
import 'react-bootstrap/Pagination';
|
|
@@ -15,7 +15,8 @@ import { L as LazyLoad } from './index-5f9f807a.js';
|
|
|
15
15
|
import { b as main_16, c as main_38, m as main_39 } from './main-0465b2a0.js';
|
|
16
16
|
import { h as html_decode_1 } from './entities-7cc3bf45.js';
|
|
17
17
|
import { _ as _slicedToArray } from './slicedToArray-7021e5df.js';
|
|
18
|
-
import
|
|
18
|
+
import Segment from './Segment.js';
|
|
19
|
+
import Beam from './Beam.js';
|
|
19
20
|
import DFPAdSlot from './AdSlot.js';
|
|
20
21
|
import { B as BlockContent } from './BlockContent-a614acdf.js';
|
|
21
22
|
import { g as getYoutubeId } from './smoothscroll-4b699764.js';
|
|
@@ -7796,7 +7797,6 @@ var Formstack = function Formstack(_ref) {
|
|
|
7796
7797
|
|
|
7797
7798
|
var formstackRef = useRef(null);
|
|
7798
7799
|
useEffect(function () {
|
|
7799
|
-
Segment.init();
|
|
7800
7800
|
var newSrc = Segment.getURL('https://mjhlifesciences.formstack.com/forms/js.php/' + FormID, { needSegmentSupport: true });
|
|
7801
7801
|
var scriptTag = formstackRef.current.querySelector('script[needsegmentsupport="true"]');
|
|
7802
7802
|
scriptTag && newSrc && scriptTag.setAttribute('src', newSrc);
|
package/dist/esm/index.js
CHANGED
|
@@ -35,12 +35,13 @@ import './stringify-008c8802.js';
|
|
|
35
35
|
import './slicedToArray-7021e5df.js';
|
|
36
36
|
import './asyncToGenerator-7c654f36.js';
|
|
37
37
|
import './_set-species-cede29f8.js';
|
|
38
|
-
export {
|
|
38
|
+
export { default as Segment } from './Segment.js';
|
|
39
|
+
export { default as Beam } from './Beam.js';
|
|
39
40
|
export { default as AdSlot } from './AdSlot.js';
|
|
40
|
-
import './ADInfeed-
|
|
41
|
+
import './ADInfeed-898b9c8f.js';
|
|
41
42
|
export { default as DeckContent } from './DeckContent.js';
|
|
42
43
|
import './lodash-17fdfebb.js';
|
|
43
|
-
import './ADlgInfeed-
|
|
44
|
+
import './ADlgInfeed-a747451b.js';
|
|
44
45
|
import './getContentCategory-15dcc413.js';
|
|
45
46
|
import './get-5ee14cda.js';
|
|
46
47
|
export { default as AD } from './AD.js';
|
|
@@ -78,7 +79,7 @@ import 'react-bootstrap/Form';
|
|
|
78
79
|
import './index-d2f90501.js';
|
|
79
80
|
import './js.cookie-6874175c.js';
|
|
80
81
|
export { default as CMEDeck } from './CMEDeck.js';
|
|
81
|
-
export { g as getSerializers } from './index-
|
|
82
|
+
export { g as getSerializers } from './index-a3da0503.js';
|
|
82
83
|
import './util-7700fc59.js';
|
|
83
84
|
import './brightcove-react-player-loader.es-83f53e4e.js';
|
|
84
85
|
import 'react-bootstrap/Pagination';
|