@mjhls/mjh-framework 1.0.444 → 1.0.446
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.js +32 -0
- package/dist/cjs/AD300x250.js +60 -0
- package/dist/cjs/AD300x250x600.js +60 -0
- package/dist/cjs/AD728x90.js +134 -0
- package/dist/cjs/ADFloatingFooter.js +139 -0
- package/dist/cjs/ADFooter.js +45 -0
- package/dist/cjs/ADGutter.js +88 -0
- package/dist/cjs/{ADInfeed-ae1f348d.js → ADInfeed-7609d929.js} +2 -2
- package/dist/cjs/ADSponsoredResources.js +106 -0
- package/dist/cjs/ADWelcome.js +150 -0
- package/dist/cjs/{ADlgInfeed-f4c4a1bf.js → ADlgInfeed-700551ef.js} +2 -2
- package/dist/cjs/AccordionPanel.js +95 -0
- package/dist/cjs/AdSlot.js +166 -0
- package/dist/cjs/AdSlotsProvider.js +31 -0
- package/dist/cjs/AlphabeticList.js +137 -0
- package/dist/cjs/ArticleQueue.js +863 -0
- package/dist/cjs/Auth.js +3950 -0
- package/dist/cjs/{AuthorComponent-b44bb44e.js → AuthorComponent-5bb8f868.js} +1 -1
- package/dist/cjs/Beam.js +347 -0
- package/dist/cjs/{TaxonomyCard-fa09aac1.js → BlockContent-80608595.js} +0 -236
- package/dist/cjs/Breadcrumbs.js +108 -0
- package/dist/cjs/CMEDeck.js +454 -0
- package/dist/cjs/Column1.js +39 -0
- package/dist/cjs/Column2.js +67 -0
- package/dist/cjs/Column3.js +141 -0
- package/dist/cjs/ConferenceArticleCard.js +91 -0
- package/dist/cjs/ConferenceBanner-6c9e718a.js +24 -0
- package/dist/cjs/DeckContent.js +24 -13
- package/dist/cjs/DeckQueue.js +17 -10
- package/dist/cjs/{Dfp-d7639f4c.js → Dfp-19f10ad4.js} +8 -5
- package/dist/cjs/EventsDeck.js +1999 -0
- package/dist/cjs/Feature.js +120 -0
- package/dist/cjs/{Figure-cc919c38.js → Figure-ce37247b.js} +3 -2
- package/dist/cjs/ForbesHero.js +140 -0
- package/dist/cjs/GridContent.js +721 -33
- package/dist/cjs/GridHero.js +145 -0
- package/dist/cjs/GroupDeck.js +5 -3
- package/dist/cjs/HamMagazine.js +477 -0
- package/dist/cjs/Header.js +37 -0
- package/dist/cjs/Hero.js +56 -0
- package/dist/cjs/HighlightenVideo.js +69 -0
- package/dist/cjs/HorizontalHero.js +109 -0
- package/dist/cjs/InscreenSensor-04a70c60.js +864 -0
- package/dist/cjs/IssueContentDeck.js +4 -3
- package/dist/cjs/IssueDeck.js +6 -4
- package/dist/cjs/IssueLanding.js +115 -0
- package/dist/cjs/KMTracker.js +27 -0
- package/dist/cjs/LeftNav.js +99 -0
- package/dist/cjs/MasterDeck.js +15 -8
- package/dist/cjs/NavDvm.js +223 -0
- package/dist/cjs/NavFooter-3dcd99a8.js +66 -0
- package/dist/cjs/NavMagazine.js +436 -0
- package/dist/cjs/NavNative.js +278 -0
- package/dist/cjs/NavNormal.js +109 -0
- package/dist/cjs/OncliveHero.js +78 -0
- package/dist/cjs/OncliveLargeHero.js +243 -0
- package/dist/cjs/PageFilter.js +73 -0
- package/dist/cjs/PdfDownload.js +28 -0
- package/dist/cjs/PopUpModal.js +59 -0
- package/dist/cjs/PublicationLanding.js +556 -0
- package/dist/cjs/QueueDeckExpanded.js +29 -28
- package/dist/cjs/RelatedContent.js +107 -0
- package/dist/cjs/RelatedTopicsDropdown.js +90 -0
- package/dist/cjs/Search.js +67 -0
- package/dist/cjs/Segment.js +225 -0
- package/dist/cjs/SetCookie.js +10 -0
- package/dist/cjs/SideFooter.js +103 -0
- package/dist/cjs/SocialNavFooter-d9ab4d17.js +83 -0
- package/dist/cjs/SocialShare.js +72 -0
- package/dist/cjs/TaxonomyCard.js +241 -11
- package/dist/cjs/TemplateNormal.js +175 -13
- package/dist/cjs/Ustream.js +107 -6
- package/dist/cjs/VerticalHero.js +75 -0
- package/dist/cjs/VideoSeriesFilter.js +133 -0
- package/dist/cjs/VideoSeriesListing.js +13 -7
- package/dist/cjs/View.js +1156 -0
- package/dist/cjs/YahooHero.js +129 -0
- package/dist/cjs/YoutubeGroup.js +5 -3
- package/dist/cjs/_arrayMap-3b4a0f75.js +91 -0
- package/dist/cjs/_is-array-754e012d.js +74 -0
- package/dist/cjs/{_iter-detect-234453c3.js → _iter-detect-4d0352f8.js} +4 -4
- package/dist/cjs/_object-sap-5e74ba08.js +16 -0
- package/dist/cjs/_set-species-4458e975.js +56 -0
- package/dist/cjs/{AdSlot-257d8d4e.js → asyncToGenerator-db08763c.js} +1 -710
- package/dist/cjs/brightcove-react-player-loader.es-4ba0d3d5.js +2231 -0
- package/dist/cjs/{web.dom.iterable-5c889cf1.js → core.get-iterator-method-41e87ec1.js} +0 -46
- package/dist/cjs/debounce-32e57002.js +280 -0
- package/dist/cjs/{toConsumableArray-25d0e2a3.js → from-ea347372.js} +4 -29
- package/dist/cjs/{get-7a75c563.js → get-5dfcdc33.js} +14 -100
- package/dist/cjs/getKeywords.js +31 -0
- package/dist/cjs/getQuery.js +20 -0
- package/dist/cjs/getSerializers.js +8032 -0
- package/dist/cjs/getSeriesDetail.js +38 -0
- package/dist/cjs/getTargeting-3ced038f.js +108 -0
- package/dist/cjs/getTargeting.js +15 -0
- package/dist/cjs/iconBase-637d3f1e.js +83 -0
- package/dist/cjs/{debounce-420ff8a8.js → index-b2448ff6.js} +0 -483
- package/dist/cjs/index.esm-25423c2f.js +16 -0
- package/dist/cjs/index.esm-c0d8b44b.js +21 -0
- package/dist/cjs/index.esm-fcdbd2c6.js +31 -0
- package/dist/cjs/index.js +190 -23083
- package/dist/cjs/{inherits-b4036c94.js → inherits-4a2f1cc3.js} +6 -17
- package/dist/cjs/isSymbol-488934a7.js +211 -0
- package/dist/cjs/js.cookie-a511c430.js +160 -0
- package/dist/cjs/keys-a586b7a0.js +25 -0
- package/dist/cjs/{promise-0a493c7a.js → promise-074978a7.js} +15 -62
- package/dist/cjs/{slicedToArray-419d467a.js → slicedToArray-8063ee51.js} +5 -4
- package/dist/cjs/stringify-7c5aff47.js +17 -0
- package/dist/cjs/toConsumableArray-ca04303b.js +31 -0
- package/dist/cjs/{typeof-0d86b91c.js → typeof-583cdc4b.js} +20 -87
- package/dist/cjs/urlFor.js +10 -0
- package/dist/cjs/util-f2c1b65b.js +576 -0
- package/dist/cjs/web.dom.iterable-43c3e277.js +51 -0
- package/dist/esm/AD.js +26 -0
- package/dist/esm/AD300x250.js +54 -0
- package/dist/esm/AD300x250x600.js +54 -0
- package/dist/esm/AD728x90.js +128 -0
- package/dist/esm/ADFloatingFooter.js +133 -0
- package/dist/esm/ADFooter.js +39 -0
- package/dist/esm/ADGutter.js +82 -0
- package/dist/esm/{ADInfeed-dff74bbe.js → ADInfeed-1c17dc0e.js} +1 -1
- package/dist/esm/ADSponsoredResources.js +100 -0
- package/dist/esm/ADWelcome.js +144 -0
- package/dist/esm/{ADlgInfeed-7b29db85.js → ADlgInfeed-94d7f5dd.js} +1 -1
- package/dist/esm/AccordionPanel.js +88 -0
- package/dist/esm/AdSlot.js +159 -0
- package/dist/esm/AdSlotsProvider.js +25 -0
- package/dist/esm/AlphabeticList.js +131 -0
- package/dist/esm/ArticleQueue.js +855 -0
- package/dist/esm/Auth.js +3930 -0
- package/dist/esm/{AuthorComponent-4f5f15ed.js → AuthorComponent-f67cb027.js} +1 -1
- package/dist/esm/Beam.js +345 -0
- package/dist/esm/{TaxonomyCard-b22a742f.js → BlockContent-4af2feb9.js} +2 -233
- package/dist/esm/Breadcrumbs.js +101 -0
- package/dist/esm/CMEDeck.js +448 -0
- package/dist/esm/Column1.js +29 -0
- package/dist/esm/Column2.js +57 -0
- package/dist/esm/Column3.js +131 -0
- package/dist/esm/ConferenceArticleCard.js +85 -0
- package/dist/esm/ConferenceBanner-9162d0ca.js +18 -0
- package/dist/esm/DeckContent.js +24 -13
- package/dist/esm/DeckQueue.js +17 -10
- package/dist/esm/{Dfp-994cd0ab.js → Dfp-7addbfb1.js} +7 -4
- package/dist/esm/EventsDeck.js +1987 -0
- package/dist/esm/Feature.js +113 -0
- package/dist/esm/{Figure-1c55ebf0.js → Figure-408929f3.js} +4 -3
- package/dist/esm/ForbesHero.js +134 -0
- package/dist/esm/GridContent.js +714 -30
- package/dist/esm/GridHero.js +139 -0
- package/dist/esm/GroupDeck.js +6 -4
- package/dist/esm/HamMagazine.js +465 -0
- package/dist/esm/Header.js +28 -0
- package/dist/esm/Hero.js +50 -0
- package/dist/esm/HighlightenVideo.js +63 -0
- package/dist/esm/HorizontalHero.js +103 -0
- package/dist/esm/InscreenSensor-b7f931bf.js +857 -0
- package/dist/esm/IssueContentDeck.js +5 -4
- package/dist/esm/IssueDeck.js +8 -6
- package/dist/esm/IssueLanding.js +109 -0
- package/dist/esm/KMTracker.js +25 -0
- package/dist/esm/LeftNav.js +90 -0
- package/dist/esm/MasterDeck.js +17 -10
- package/dist/esm/NavDvm.js +211 -0
- package/dist/esm/NavFooter-c29526b7.js +60 -0
- package/dist/esm/NavMagazine.js +424 -0
- package/dist/esm/NavNative.js +266 -0
- package/dist/esm/NavNormal.js +97 -0
- package/dist/esm/OncliveHero.js +72 -0
- package/dist/esm/OncliveLargeHero.js +237 -0
- package/dist/esm/PageFilter.js +67 -0
- package/dist/esm/PdfDownload.js +22 -0
- package/dist/esm/PopUpModal.js +52 -0
- package/dist/esm/PublicationLanding.js +546 -0
- package/dist/esm/QueueDeckExpanded.js +31 -30
- package/dist/esm/RelatedContent.js +101 -0
- package/dist/esm/RelatedTopicsDropdown.js +82 -0
- package/dist/esm/Search.js +58 -0
- package/dist/esm/Segment.js +223 -0
- package/dist/esm/SetCookie.js +8 -0
- package/dist/esm/SideFooter.js +97 -0
- package/dist/esm/SocialNavFooter-1a531144.js +77 -0
- package/dist/esm/SocialShare.js +65 -0
- package/dist/esm/TaxonomyCard.js +237 -11
- package/dist/esm/TemplateNormal.js +175 -14
- package/dist/esm/Ustream.js +107 -6
- package/dist/esm/VerticalHero.js +69 -0
- package/dist/esm/VideoSeriesFilter.js +127 -0
- package/dist/esm/VideoSeriesListing.js +14 -8
- package/dist/esm/View.js +1145 -0
- package/dist/esm/YahooHero.js +123 -0
- package/dist/esm/YoutubeGroup.js +6 -4
- package/dist/esm/_arrayMap-a8dd2b2c.js +87 -0
- package/dist/esm/_is-array-dd5523d6.js +71 -0
- package/dist/esm/{_iter-detect-7c281f0a.js → _iter-detect-6e099a34.js} +2 -2
- package/dist/esm/_object-sap-56bb8073.js +14 -0
- package/dist/esm/_set-species-6f64f1c1.js +51 -0
- package/dist/esm/{_to-object-1b1f7766.js → _to-object-16fd8b46.js} +1 -1
- package/dist/esm/{AdSlot-362a1c30.js → asyncToGenerator-204b5a5c.js} +3 -703
- package/dist/esm/brightcove-react-player-loader.es-e1c6b0f2.js +2225 -0
- package/dist/esm/{web.dom.iterable-e6bf2bf6.js → core.get-iterator-method-f5c0d66a.js} +2 -47
- package/dist/esm/debounce-8cd9e09c.js +277 -0
- package/dist/esm/{extends-92072fff.js → extends-6e00b262.js} +1 -1
- package/dist/esm/{toConsumableArray-c5e2fde8.js → from-2c0a5f49.js} +4 -29
- package/dist/esm/{get-bc6cf9fb.js → get-ae817b75.js} +3 -86
- package/dist/esm/getKeywords.js +29 -0
- package/dist/esm/getQuery.js +18 -0
- package/dist/esm/getSerializers.js +8021 -0
- package/dist/esm/getSeriesDetail.js +36 -0
- package/dist/esm/getTargeting-8f4bd5db.js +105 -0
- package/dist/esm/getTargeting.js +9 -0
- package/dist/esm/iconBase-6ee2f2fb.js +81 -0
- package/dist/esm/{debounce-42a7f724.js → index-fb49124c.js} +2 -476
- package/dist/esm/index.esm-9d6faf80.js +17 -0
- package/dist/esm/index.esm-a7ad65ba.js +13 -0
- package/dist/esm/{index.esm-536609db.js → index.esm-b97cf389.js} +2 -80
- package/dist/esm/index.js +137 -23014
- package/dist/esm/{inherits-bbec2f34.js → inherits-2758cc14.js} +5 -15
- package/dist/esm/isSymbol-c1b9be80.js +203 -0
- package/dist/esm/js.cookie-6874175c.js +158 -0
- package/dist/esm/keys-04cdec91.js +23 -0
- package/dist/esm/{main-cf4930f0.js → main-8c8784b8.js} +1 -1
- package/dist/esm/{promise-2592a80a.js → promise-53143c9a.js} +6 -49
- package/dist/esm/{slicedToArray-04e02710.js → slicedToArray-f1e40361.js} +3 -2
- package/dist/esm/stringify-e30bc114.js +15 -0
- package/dist/esm/toConsumableArray-8712d678.js +29 -0
- package/dist/esm/{typeof-09bf9211.js → typeof-7e72fee0.js} +5 -70
- package/dist/esm/urlFor.js +8 -0
- package/dist/esm/util-7700fc59.js +574 -0
- package/dist/esm/web.dom.iterable-46c95e52.js +49 -0
- package/package.json +1 -1
- package/dist/cjs/GridContent-0df16724.js +0 -735
- package/dist/cjs/Normal-430e8e61.js +0 -2315
- package/dist/cjs/Ustream-46288bdf.js +0 -119
- package/dist/cjs/index.esm-340d3792.js +0 -110
- package/dist/esm/GridContent-2173a84c.js +0 -724
- package/dist/esm/Normal-6efd92da.js +0 -2282
- package/dist/esm/Ustream-c4f281a3.js +0 -112
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
-
import './_to-object-
|
|
3
|
-
import './
|
|
2
|
+
import './_to-object-16fd8b46.js';
|
|
3
|
+
import './core.get-iterator-method-f5c0d66a.js';
|
|
4
4
|
import './_library-528f1934.js';
|
|
5
|
-
import './_iter-detect-
|
|
6
|
-
import
|
|
5
|
+
import './_iter-detect-6e099a34.js';
|
|
6
|
+
import './from-2c0a5f49.js';
|
|
7
|
+
import { _ as _toConsumableArray } from './toConsumableArray-8712d678.js';
|
|
7
8
|
import './_object-pie-33c40e79.js';
|
|
8
|
-
import { _ as _extends } from './extends-
|
|
9
|
+
import { _ as _extends } from './extends-6e00b262.js';
|
|
10
|
+
import './web.dom.iterable-46c95e52.js';
|
|
9
11
|
import React, { useEffect, useState, useRef } from 'react';
|
|
10
|
-
import { l as lib_3 } from './
|
|
12
|
+
import { l as lib_3 } from './index-fb49124c.js';
|
|
11
13
|
import 'prop-types';
|
|
12
14
|
import 'react-bootstrap/Card';
|
|
13
15
|
import { m as moment } from './moment-12415288.js';
|
|
14
16
|
import { useRouter } from 'next/router';
|
|
17
|
+
import './isSymbol-c1b9be80.js';
|
|
18
|
+
import './debounce-8cd9e09c.js';
|
|
15
19
|
import { I as InfiniteScroll } from './index.es-27d0bae9.js';
|
|
16
20
|
import 'react-dom';
|
|
17
21
|
import { V as VisibilitySensor } from './visibility-sensor-87d6b78c.js';
|
|
18
22
|
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
19
23
|
import { L as LazyLoad } from './index-c5fd0af5.js';
|
|
20
|
-
import { m as main_36 } from './main-
|
|
24
|
+
import { m as main_36 } from './main-8c8784b8.js';
|
|
21
25
|
import { c as clean_html_1 } from './entities-7cc3bf45.js';
|
|
22
|
-
import { _ as _slicedToArray } from './slicedToArray-
|
|
23
|
-
import './
|
|
24
|
-
import './
|
|
25
|
-
import
|
|
26
|
+
import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
|
|
27
|
+
import './stringify-e30bc114.js';
|
|
28
|
+
import './asyncToGenerator-204b5a5c.js';
|
|
29
|
+
import './_set-species-6f64f1c1.js';
|
|
30
|
+
import './promise-53143c9a.js';
|
|
31
|
+
import './Beam.js';
|
|
32
|
+
import './Segment.js';
|
|
33
|
+
import './AdSlot.js';
|
|
34
|
+
import { A as ADInfeed } from './ADInfeed-1c17dc0e.js';
|
|
26
35
|
import { l as lodash } from './lodash-17fdfebb.js';
|
|
27
|
-
import { A as ADlgInfeed } from './ADlgInfeed-
|
|
28
|
-
import { A as AuthorComponent } from './AuthorComponent-
|
|
36
|
+
import { A as ADlgInfeed } from './ADlgInfeed-94d7f5dd.js';
|
|
37
|
+
import { A as AuthorComponent } from './AuthorComponent-f67cb027.js';
|
|
29
38
|
import { Container, Media } from 'react-bootstrap';
|
|
30
39
|
|
|
31
40
|
var urlFor = function urlFor(source, builder) {
|
|
@@ -139,16 +148,16 @@ var checkExternalUrl = function checkExternalUrl(url) {
|
|
|
139
148
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
140
149
|
};
|
|
141
150
|
|
|
142
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
151
|
+
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) {
|
|
143
152
|
var numberOfItemsBeforeAd = 6;
|
|
144
|
-
|
|
145
153
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
146
154
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
147
155
|
};
|
|
148
156
|
|
|
149
157
|
// Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
|
|
150
|
-
|
|
151
|
-
|
|
158
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
159
|
+
if (lgInfeedAd && brandInsightAd && window && window.innerWidth >= 1200) {
|
|
160
|
+
var lgInfeed = {
|
|
152
161
|
_type: 'lg-infeed',
|
|
153
162
|
adUnit: brandInsightAd.adUnit,
|
|
154
163
|
className: 'lg-infeed',
|
|
@@ -164,7 +173,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
164
173
|
var set = lodash.chunk(chunk, 2);
|
|
165
174
|
for (var i = 0; i < set.length; i++) {
|
|
166
175
|
if (i !== set.length - 1) {
|
|
167
|
-
set[i].push(
|
|
176
|
+
set[i].push(lgInfeed);
|
|
168
177
|
}
|
|
169
178
|
}
|
|
170
179
|
return lodash.flattenDeep(set);
|
|
@@ -173,7 +182,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
173
182
|
}
|
|
174
183
|
|
|
175
184
|
if (showBI && brandInsightAd) {
|
|
176
|
-
|
|
185
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
186
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) brandInsightAd.interval = 8;
|
|
177
187
|
var pos = 0;
|
|
178
188
|
for (var i = 1; pos < data.length; i++) {
|
|
179
189
|
var inFeedAd = {
|
|
@@ -642,11 +652,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
642
652
|
values = _useState10[0],
|
|
643
653
|
setValues = _useState10[1];
|
|
644
654
|
|
|
645
|
-
var _useState11 = useState(false),
|
|
646
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
647
|
-
desktopView = _useState12[0],
|
|
648
|
-
setDesktopView = _useState12[1];
|
|
649
|
-
|
|
650
655
|
var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
|
|
651
656
|
|
|
652
657
|
var prevValues = usePrevious(values);
|
|
@@ -668,10 +673,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
668
673
|
}, [initialData]);
|
|
669
674
|
|
|
670
675
|
useEffect(function () {
|
|
671
|
-
// Setting DesktopView flag to show large infeed ad by checking lgInfeedAd flag in desktop view( window >= 1200px ).
|
|
672
|
-
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
673
|
-
setDesktopView(true);
|
|
674
|
-
}
|
|
675
676
|
if (prevValues) {
|
|
676
677
|
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
|
|
677
678
|
loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
|
|
@@ -708,7 +709,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
708
709
|
React.createElement(
|
|
709
710
|
Container,
|
|
710
711
|
null,
|
|
711
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
712
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
712
713
|
)
|
|
713
714
|
),
|
|
714
715
|
React.createElement(
|
|
@@ -722,7 +723,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
722
723
|
React.createElement(
|
|
723
724
|
Container,
|
|
724
725
|
null,
|
|
725
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
726
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
726
727
|
),
|
|
727
728
|
React.createElement(
|
|
728
729
|
'div',
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { m as moment } from './moment-12415288.js';
|
|
4
|
+
import { i as imageUrlBuilder } from './index-73819142.js';
|
|
5
|
+
import 'react-bootstrap/Media';
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Sample query
|
|
9
|
+
let references = ''
|
|
10
|
+
if(article.taxonomyMapping.length > 0){
|
|
11
|
+
article.taxonomyMapping.forEach((ref, index) => {
|
|
12
|
+
references = references + `references('${ref._ref}') `
|
|
13
|
+
if(index+1 !== article.taxonomyMapping.length){
|
|
14
|
+
references = references + ` && `
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const relatedArticlesQuery = `*[!(_id in path("drafts.**")) && _type == "article" && title !='${article.title}' && defined(title) && is_visible == true && ( references('article.documentGroup._id') || ${references} ) && published <= '${today}'] | order(published desc) [0...4] {
|
|
20
|
+
...,
|
|
21
|
+
title,
|
|
22
|
+
summary,
|
|
23
|
+
thumbnail,
|
|
24
|
+
url,
|
|
25
|
+
published,
|
|
26
|
+
authorMapping[]->,
|
|
27
|
+
contentCategory->
|
|
28
|
+
}`
|
|
29
|
+
const relatedArticles = await client.fetch(relatedArticlesQuery)
|
|
30
|
+
|
|
31
|
+
Sample usage
|
|
32
|
+
<RelatedContent dataRecord={props.relatedArticles} client={client} showAuthor showPublished reverse/>
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
*/
|
|
36
|
+
var RelatedContent = function RelatedContent(props) {
|
|
37
|
+
var client = props.client,
|
|
38
|
+
dataRecord = props.dataRecord,
|
|
39
|
+
_props$defaultImage = props.defaultImage,
|
|
40
|
+
defaultImage = _props$defaultImage === undefined ? '' : _props$defaultImage;
|
|
41
|
+
|
|
42
|
+
var builder = imageUrlBuilder(client);
|
|
43
|
+
function urlFor(source) {
|
|
44
|
+
return builder.image(source);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return React.createElement(
|
|
48
|
+
'div',
|
|
49
|
+
null,
|
|
50
|
+
React.createElement(
|
|
51
|
+
'h1',
|
|
52
|
+
{ className: 'mb-4 pb-2', style: { borderBottom: '1px solid #ccc', fontSize: '1.2rem', fontWeight: 'bold', color: '#252525' } },
|
|
53
|
+
'Related Content'
|
|
54
|
+
),
|
|
55
|
+
React.createElement(
|
|
56
|
+
'div',
|
|
57
|
+
{ className: 'related-articles-container' },
|
|
58
|
+
dataRecord.map(function (article, index) {
|
|
59
|
+
return React.createElement(
|
|
60
|
+
'a',
|
|
61
|
+
{ key: index, href: '/view/' + article.url.current, className: 'related-article' },
|
|
62
|
+
React.createElement(
|
|
63
|
+
'figure',
|
|
64
|
+
null,
|
|
65
|
+
React.createElement('img', {
|
|
66
|
+
src: article.thumbnail ? urlFor(article.thumbnail.asset).width(500).url() : defaultImage,
|
|
67
|
+
alt: article.title
|
|
68
|
+
})
|
|
69
|
+
),
|
|
70
|
+
React.createElement(
|
|
71
|
+
'div',
|
|
72
|
+
{ className: 'related-article-body' },
|
|
73
|
+
React.createElement('h4', { dangerouslySetInnerHTML: { __html: article.title } }),
|
|
74
|
+
props.showPublished && React.createElement(
|
|
75
|
+
'p',
|
|
76
|
+
{ className: 'pb-0 mb-0' },
|
|
77
|
+
moment(article.published).format('MMMM DD, YYYY hh:mma')
|
|
78
|
+
),
|
|
79
|
+
props.showAuthor && article.authorMapping && article.authorMapping[0] && React.createElement(
|
|
80
|
+
'p',
|
|
81
|
+
null,
|
|
82
|
+
'By ',
|
|
83
|
+
React.createElement(
|
|
84
|
+
'b',
|
|
85
|
+
null,
|
|
86
|
+
article.authorMapping[0].displayName
|
|
87
|
+
)
|
|
88
|
+
)
|
|
89
|
+
)
|
|
90
|
+
);
|
|
91
|
+
}),
|
|
92
|
+
React.createElement(
|
|
93
|
+
'style',
|
|
94
|
+
{ jsx: 'true' },
|
|
95
|
+
'\n .related-article {\n width: 100%;\n display: flex;\n flex-direction: ' + (props.reverse ? 'row-reverse' : 'row') + ';\n margin-bottom: 1rem;\n }\n .related-article figure {\n width: 165px;\n height: 110px;\n min-width: 165px;\n }\n .related-article figure img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .related-article-body {\n flex: 1 1 auto;\n padding: 0 1rem;\n }\n .related-article-body h4 {\n font-weight: bold;\n font-size: 1.1rem;\n margin-bottom: 0.25rem;\n line-height: 1.3;\n }\n @media screen and (max-width: 430px) {\n .related-article {\n flex-direction: column;\n }\n .related-article figure {\n width: 80%;\n height: auto;\n min-width: 80%;\n margin: 0 auto;\n }\n .related-article figure img {\n width: 100%;\n height: auto;\n object-fit: cover;\n }\n }\n '
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export default RelatedContent;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import DropdownButton from 'react-bootstrap/DropdownButton';
|
|
3
|
+
import Dropdown from 'react-bootstrap/Dropdown';
|
|
4
|
+
|
|
5
|
+
var RelatedTopicsDropdown = function RelatedTopicsDropdown(_ref) {
|
|
6
|
+
var parentTaxonomy = _ref.parentTaxonomy,
|
|
7
|
+
subTaxonomies = _ref.subTaxonomies,
|
|
8
|
+
_ref$page = _ref.page,
|
|
9
|
+
page = _ref$page === undefined ? '/' : _ref$page,
|
|
10
|
+
_ref$exclude = _ref.exclude,
|
|
11
|
+
exclude = _ref$exclude === undefined ? 'clinical' : _ref$exclude,
|
|
12
|
+
_ref$variant = _ref.variant,
|
|
13
|
+
variant = _ref$variant === undefined ? 'primary' : _ref$variant,
|
|
14
|
+
_ref$className = _ref.className,
|
|
15
|
+
className = _ref$className === undefined ? '' : _ref$className;
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
Props accepted - parentTaxonomy(required, object), subTaxonomy(required, array), page(optional), exclude(optional), variant(optional), className(optional)
|
|
19
|
+
example:
|
|
20
|
+
<RelatedTopicDropdown
|
|
21
|
+
page='/clinical'
|
|
22
|
+
exclude="clinical"
|
|
23
|
+
className='mb-3'
|
|
24
|
+
parentTaxonomy={props.parentTaxonomy}
|
|
25
|
+
subTaxonomies={props.subTaxonomies}
|
|
26
|
+
/>
|
|
27
|
+
*/
|
|
28
|
+
if (subTaxonomies.length === 0 && parentTaxonomy) {
|
|
29
|
+
if (parentTaxonomy.identifier == exclude) {
|
|
30
|
+
return '';
|
|
31
|
+
}
|
|
32
|
+
return React.createElement(
|
|
33
|
+
'div',
|
|
34
|
+
null,
|
|
35
|
+
React.createElement(
|
|
36
|
+
'style',
|
|
37
|
+
{ jsx: true },
|
|
38
|
+
'\n #related_dropdown > .dropdown > .dropdown-menu.show {\n position: absolute;\n top: auto !important;\n max-height: 50vh !important;\n box-shadow: 0px 0px 25px #ccc;\n z-index: 9999;\n transform: none !important;\n }\n @media only screen and (max-width: 720px) {\n #related_dropdown > .dropdown > .dropdown-menu.show {\n position: absolute;\n max-height: 30vh !important;\n max-width: 95vw;\n box-shadow: 0px 0px 25px #ccc;\n z-index: 9999;\n font-size: 0.85em;\n }\n }\n '
|
|
39
|
+
),
|
|
40
|
+
React.createElement(
|
|
41
|
+
'div',
|
|
42
|
+
{ id: 'related_dropdown', className: className },
|
|
43
|
+
React.createElement(
|
|
44
|
+
DropdownButton,
|
|
45
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
46
|
+
React.createElement(
|
|
47
|
+
Dropdown.Item,
|
|
48
|
+
{ href: parentTaxonomy.identifier },
|
|
49
|
+
parentTaxonomy.name
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
} else {
|
|
55
|
+
return React.createElement(
|
|
56
|
+
'div',
|
|
57
|
+
null,
|
|
58
|
+
React.createElement(
|
|
59
|
+
'style',
|
|
60
|
+
{ jsx: true },
|
|
61
|
+
'\n #related_dropdown > .dropdown > .dropdown-menu.show {\n position: absolute;\n top: auto !important;\n max-height: 40vh !important;\n z-index: 9999;\n transform: none !important;\n }\n @media only screen and (max-width: 720px) {\n #related_dropdown > .dropdown > .dropdown-menu.show {\n position: absolute;\n max-height: 30vh !important;\n max-width: 95vw;\n z-index: 9999;\n font-size: 0.85em;\n }\n }\n '
|
|
62
|
+
),
|
|
63
|
+
React.createElement(
|
|
64
|
+
'div',
|
|
65
|
+
{ id: 'related_dropdown', className: className },
|
|
66
|
+
React.createElement(
|
|
67
|
+
DropdownButton,
|
|
68
|
+
{ id: 'related_button', variant: variant, title: 'Related Topics' },
|
|
69
|
+
subTaxonomies.length > 0 && subTaxonomies.map(function (taxonomy, index) {
|
|
70
|
+
return React.createElement(
|
|
71
|
+
Dropdown.Item,
|
|
72
|
+
{ key: index, href: page + '/' + taxonomy.identifier },
|
|
73
|
+
taxonomy.name
|
|
74
|
+
);
|
|
75
|
+
})
|
|
76
|
+
)
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default RelatedTopicsDropdown;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import './_to-object-16fd8b46.js';
|
|
3
|
+
import './core.get-iterator-method-f5c0d66a.js';
|
|
4
|
+
import './web.dom.iterable-46c95e52.js';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { _ as _slicedToArray } from './slicedToArray-f1e40361.js';
|
|
7
|
+
import Button from 'react-bootstrap/Button';
|
|
8
|
+
import Form from 'react-bootstrap/Form';
|
|
9
|
+
import FormControl from 'react-bootstrap/FormControl';
|
|
10
|
+
|
|
11
|
+
var Search = function Search(props) {
|
|
12
|
+
var _props$placeholder = props.placeholder,
|
|
13
|
+
placeholder = _props$placeholder === undefined ? 'Search' : _props$placeholder,
|
|
14
|
+
_props$btnText = props.btnText,
|
|
15
|
+
btnText = _props$btnText === undefined ? 'Search' : _props$btnText,
|
|
16
|
+
_props$device = props.device,
|
|
17
|
+
device = _props$device === undefined ? 'desktop' : _props$device;
|
|
18
|
+
|
|
19
|
+
var _useState = useState(''),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
searchKey = _useState2[0],
|
|
22
|
+
setSearchKey = _useState2[1];
|
|
23
|
+
|
|
24
|
+
var submitSearch = function submitSearch(e) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
window.location.href = '/search?searchTerm=' + searchKey;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
return React.createElement(
|
|
30
|
+
Form,
|
|
31
|
+
{ inline: true, onSubmit: function onSubmit(e) {
|
|
32
|
+
return submitSearch(e);
|
|
33
|
+
} },
|
|
34
|
+
React.createElement(FormControl, {
|
|
35
|
+
className: device === 'mobile' ? 'mobile-search mr-sm-2' : 'mr-sm-2',
|
|
36
|
+
type: 'text',
|
|
37
|
+
placeholder: placeholder,
|
|
38
|
+
value: searchKey,
|
|
39
|
+
onChange: function onChange(e) {
|
|
40
|
+
return setSearchKey(e.target.value);
|
|
41
|
+
}
|
|
42
|
+
}),
|
|
43
|
+
React.createElement(
|
|
44
|
+
Button,
|
|
45
|
+
{ variant: 'secondary', onClick: function onClick(e) {
|
|
46
|
+
return submitSearch(e);
|
|
47
|
+
} },
|
|
48
|
+
btnText
|
|
49
|
+
),
|
|
50
|
+
React.createElement(
|
|
51
|
+
'style',
|
|
52
|
+
{ jsx: 'true' },
|
|
53
|
+
'\n .mobile-search {\n width: 75%;\n margin-right: 15px;\n }\n '
|
|
54
|
+
)
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default Search;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import './_commonjsHelpers-0c4b6f40.js';
|
|
2
|
+
import './_to-object-16fd8b46.js';
|
|
3
|
+
import './core.get-iterator-method-f5c0d66a.js';
|
|
4
|
+
import './_library-528f1934.js';
|
|
5
|
+
import './_iter-detect-6e099a34.js';
|
|
6
|
+
import './web.dom.iterable-46c95e52.js';
|
|
7
|
+
import { _ as _asyncToGenerator, r as regenerator } from './asyncToGenerator-204b5a5c.js';
|
|
8
|
+
import './_set-species-6f64f1c1.js';
|
|
9
|
+
import './promise-53143c9a.js';
|
|
10
|
+
|
|
11
|
+
require("babel-polyfill");
|
|
12
|
+
|
|
13
|
+
var Segment = {
|
|
14
|
+
// onclive default
|
|
15
|
+
init: function init() {
|
|
16
|
+
var apiKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'BBbKMoOjmhsxPnbd2nO6osz3zq67DzuN';
|
|
17
|
+
|
|
18
|
+
if (typeof window === 'undefined') {
|
|
19
|
+
throw new Error('window object is not defined');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var Analytics = require('@segment/analytics.js-core/build/analytics');
|
|
23
|
+
var SegmentIntegration = require('@segment/analytics.js-integration-segmentio');
|
|
24
|
+
|
|
25
|
+
var analytics = new Analytics();
|
|
26
|
+
analytics.use(SegmentIntegration);
|
|
27
|
+
|
|
28
|
+
var integrationSettings = {
|
|
29
|
+
"Segment.io": {
|
|
30
|
+
apiKey: apiKey,
|
|
31
|
+
retryQueue: true,
|
|
32
|
+
addBundledMetadata: true
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
analytics.initialize(integrationSettings);
|
|
37
|
+
window.$segment = analytics;
|
|
38
|
+
},
|
|
39
|
+
getIDs: function getIDs() {
|
|
40
|
+
var _this = this;
|
|
41
|
+
|
|
42
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
|
|
43
|
+
var res, json;
|
|
44
|
+
return regenerator.wrap(function _callee$(_context) {
|
|
45
|
+
while (1) {
|
|
46
|
+
switch (_context.prev = _context.next) {
|
|
47
|
+
case 0:
|
|
48
|
+
_context.next = 2;
|
|
49
|
+
return fetch('https://beam.mjhlifesciences.com/api/beam/id', {
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json',
|
|
52
|
+
Accept: 'application/json'
|
|
53
|
+
},
|
|
54
|
+
method: 'post',
|
|
55
|
+
credentials: 'include'
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
case 2:
|
|
59
|
+
res = _context.sent;
|
|
60
|
+
_context.next = 5;
|
|
61
|
+
return res.json();
|
|
62
|
+
|
|
63
|
+
case 5:
|
|
64
|
+
json = _context.sent;
|
|
65
|
+
return _context.abrupt('return', json);
|
|
66
|
+
|
|
67
|
+
case 7:
|
|
68
|
+
case 'end':
|
|
69
|
+
return _context.stop();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}, _callee, _this);
|
|
73
|
+
}))();
|
|
74
|
+
},
|
|
75
|
+
pageview: function pageview(domain) {
|
|
76
|
+
var _this2 = this;
|
|
77
|
+
|
|
78
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
|
|
79
|
+
var segment, result, beam_id, session_id;
|
|
80
|
+
return regenerator.wrap(function _callee2$(_context2) {
|
|
81
|
+
while (1) {
|
|
82
|
+
switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
segment = window.$segment;
|
|
85
|
+
|
|
86
|
+
if (segment) {
|
|
87
|
+
_context2.next = 4;
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
console.error('Segment not initialized', window);
|
|
92
|
+
return _context2.abrupt('return');
|
|
93
|
+
|
|
94
|
+
case 4:
|
|
95
|
+
_context2.next = 6;
|
|
96
|
+
return _this2.getIDs();
|
|
97
|
+
|
|
98
|
+
case 6:
|
|
99
|
+
result = _context2.sent;
|
|
100
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
101
|
+
session_id = result.session_id ? result.session_id : '';
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
segment.track('pageviews', {
|
|
105
|
+
beamid: beam_id,
|
|
106
|
+
sessionid: session_id,
|
|
107
|
+
category: '',
|
|
108
|
+
domain: domain
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
case 10:
|
|
112
|
+
case 'end':
|
|
113
|
+
return _context2.stop();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}, _callee2, _this2);
|
|
117
|
+
}))();
|
|
118
|
+
},
|
|
119
|
+
adClicked: function adClicked(domain, advertiserid, campaignid, creativeid, itemid, size, isemptyline, sourceAgnosticCreativeId, sourceAgnosticlineId) {
|
|
120
|
+
var _this3 = this;
|
|
121
|
+
|
|
122
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3() {
|
|
123
|
+
var segment, result, beam_id, session_id;
|
|
124
|
+
return regenerator.wrap(function _callee3$(_context3) {
|
|
125
|
+
while (1) {
|
|
126
|
+
switch (_context3.prev = _context3.next) {
|
|
127
|
+
case 0:
|
|
128
|
+
segment = window.$segment;
|
|
129
|
+
|
|
130
|
+
if (segment) {
|
|
131
|
+
_context3.next = 4;
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
console.error('Segment not initialized');
|
|
136
|
+
return _context3.abrupt('return');
|
|
137
|
+
|
|
138
|
+
case 4:
|
|
139
|
+
_context3.next = 6;
|
|
140
|
+
return _this3.getIDs();
|
|
141
|
+
|
|
142
|
+
case 6:
|
|
143
|
+
result = _context3.sent;
|
|
144
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
145
|
+
session_id = result.session_id ? result.session_id : '';
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
segment.track('Ad Clicked', {
|
|
149
|
+
beamid: beam_id,
|
|
150
|
+
sessionid: session_id,
|
|
151
|
+
advertiserid: advertiserid,
|
|
152
|
+
campaignid: campaignid,
|
|
153
|
+
creativeid: creativeid,
|
|
154
|
+
itemid: itemid,
|
|
155
|
+
size: size,
|
|
156
|
+
isemptyline: isemptyline,
|
|
157
|
+
sourceAgnosticCreativeId: sourceAgnosticCreativeId,
|
|
158
|
+
sourceAgnosticlineId: sourceAgnosticlineId,
|
|
159
|
+
domain: domain
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
case 10:
|
|
163
|
+
case 'end':
|
|
164
|
+
return _context3.stop();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}, _callee3, _this3);
|
|
168
|
+
}))();
|
|
169
|
+
},
|
|
170
|
+
adViewed: function adViewed(domain, advertiserid, campaignid, creativeid, itemid, size, isemptyline, sourceAgnosticCreativeId, sourceAgnosticlineId) {
|
|
171
|
+
var _this4 = this;
|
|
172
|
+
|
|
173
|
+
return _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4() {
|
|
174
|
+
var segment, result, beam_id, session_id;
|
|
175
|
+
return regenerator.wrap(function _callee4$(_context4) {
|
|
176
|
+
while (1) {
|
|
177
|
+
switch (_context4.prev = _context4.next) {
|
|
178
|
+
case 0:
|
|
179
|
+
segment = window.$segment;
|
|
180
|
+
|
|
181
|
+
if (segment) {
|
|
182
|
+
_context4.next = 4;
|
|
183
|
+
break;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
console.error('Segment not initialized');
|
|
187
|
+
return _context4.abrupt('return');
|
|
188
|
+
|
|
189
|
+
case 4:
|
|
190
|
+
_context4.next = 6;
|
|
191
|
+
return _this4.getIDs();
|
|
192
|
+
|
|
193
|
+
case 6:
|
|
194
|
+
result = _context4.sent;
|
|
195
|
+
beam_id = result.beam_id ? result.beam_id : '';
|
|
196
|
+
session_id = result.session_id ? result.session_id : '';
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
segment.track('Impression Viewed', {
|
|
200
|
+
beamid: beam_id,
|
|
201
|
+
sessionid: session_id,
|
|
202
|
+
advertiserid: advertiserid,
|
|
203
|
+
campaignid: campaignid,
|
|
204
|
+
creativeid: creativeid,
|
|
205
|
+
itemid: itemid,
|
|
206
|
+
size: size,
|
|
207
|
+
isemptyline: isemptyline,
|
|
208
|
+
sourceAgnosticCreativeId: sourceAgnosticCreativeId,
|
|
209
|
+
sourceAgnosticlineId: sourceAgnosticlineId,
|
|
210
|
+
domain: domain
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
case 10:
|
|
214
|
+
case 'end':
|
|
215
|
+
return _context4.stop();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}, _callee4, _this4);
|
|
219
|
+
}))();
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
export default Segment;
|