@mjhls/mjh-framework 1.0.696-deck-ad-v1 → 1.0.696

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.
Files changed (147) hide show
  1. package/dist/cjs/AD.js +1 -1
  2. package/dist/cjs/AD300x250.js +3 -3
  3. package/dist/cjs/AD300x250x600.js +3 -3
  4. package/dist/cjs/AD728x90.js +4 -4
  5. package/dist/cjs/ADFloatingFooter.js +2 -2
  6. package/dist/cjs/ADGutter.js +2 -2
  7. package/dist/cjs/ADSkyscraper.js +2 -2
  8. package/dist/cjs/ADSponsoredResources.js +2 -2
  9. package/dist/cjs/ADWebcast.js +2 -2
  10. package/dist/cjs/ADWelcome.js +2 -2
  11. package/dist/cjs/AdSlot.js +2 -2
  12. package/dist/cjs/AdSlotsProvider.js +1 -1
  13. package/dist/cjs/ArticleCarousel.js +1 -1
  14. package/dist/cjs/ArticleSeriesListing.js +4 -4
  15. package/dist/cjs/Auth.js +300 -249
  16. package/dist/cjs/{BlockContent-80b15fac.js → BlockContent-88f69acd.js} +1 -1
  17. package/dist/cjs/BrowseVideosListing.js +1 -1
  18. package/dist/cjs/CMEDeck.js +5 -16
  19. package/dist/cjs/Column3.js +4 -4
  20. package/dist/cjs/ConferenceArticleCard.js +2 -2
  21. package/dist/cjs/DeckContent.js +8 -10
  22. package/dist/cjs/DeckQueue.js +7 -13
  23. package/dist/cjs/{Dfp-390337bf.js → Dfp-b2bc3b97.js} +1 -1
  24. package/dist/cjs/EventsDeck.js +4 -4
  25. package/dist/cjs/ExternalResources.js +7 -7
  26. package/dist/cjs/Feature.js +3 -3
  27. package/dist/cjs/ForbesHero.js +2 -2
  28. package/dist/cjs/GridContent.js +12 -14
  29. package/dist/cjs/GridHero.js +2 -2
  30. package/dist/cjs/GroupDeck.js +1 -1
  31. package/dist/cjs/HamMagazine.js +4 -4
  32. package/dist/cjs/Hero.js +1 -1
  33. package/dist/cjs/HorizontalHero.js +2 -2
  34. package/dist/cjs/IssueContentDeck.js +2 -2
  35. package/dist/cjs/IssueDeck.js +2 -2
  36. package/dist/cjs/IssueLanding.js +8 -8
  37. package/dist/cjs/LeftNav.js +2 -2
  38. package/dist/cjs/MasterDeck.js +8 -8
  39. package/dist/cjs/NavMagazine.js +4 -4
  40. package/dist/cjs/NavNative.js +3 -3
  41. package/dist/cjs/OncliveHero.js +2 -2
  42. package/dist/cjs/OncliveLargeHero.js +2 -2
  43. package/dist/cjs/PartnerDetailListing.js +10 -10
  44. package/dist/cjs/PublicationDeck.js +2 -2
  45. package/dist/cjs/QueueDeckExpanded.js +13 -24
  46. package/dist/cjs/RecentNews.js +2 -2
  47. package/dist/cjs/RelatedContent.js +2 -2
  48. package/dist/cjs/{SocialSearchComponent-9cd24578.js → SocialSearchComponent-6b5e5b47.js} +5 -5
  49. package/dist/cjs/TaxonomyCard.js +2 -2
  50. package/dist/cjs/TemplateNormal.js +3 -3
  51. package/dist/cjs/ThumbnailCard.js +1 -1
  52. package/dist/cjs/Ustream.js +2 -2
  53. package/dist/cjs/VerticalHero.js +2 -2
  54. package/dist/cjs/VideoSeriesCard.js +2 -2
  55. package/dist/cjs/VideoSeriesListing.js +4 -4
  56. package/dist/cjs/View.js +13 -13
  57. package/dist/cjs/YahooHero.js +2 -2
  58. package/dist/cjs/YoutubeGroup.js +1 -1
  59. package/dist/cjs/getRelatedArticle.js +124 -62
  60. package/dist/cjs/getSerializers.js +6 -6
  61. package/dist/cjs/{index-099d45ae.js → index-2d0a4911.js} +4 -6
  62. package/dist/cjs/{index-3294d3bc.js → index-5be2866f.js} +1 -1
  63. package/dist/cjs/{index-39beccb3.js → index-b5eb3ff8.js} +18 -18
  64. package/dist/cjs/{index-f1006c06.js → index-c0bfab13.js} +12 -12
  65. package/dist/cjs/{index.es-9110add6.js → index.es-ab3f2690.js} +3 -1
  66. package/dist/cjs/index.js +12 -12
  67. package/dist/cjs/{lodash-7fd85bcf.js → lodash-fc2922d0.js} +22 -71
  68. package/dist/cjs/{main-a4cb15bb.js → main-b6c96c8d.js} +67 -36
  69. package/dist/cjs/{moment-575fe24c.js → moment-66a6a284.js} +1 -1
  70. package/dist/cjs/timeDifferenceCalc.js +1 -1
  71. package/dist/cjs/urlFor.js +1 -1
  72. package/dist/esm/AD.js +1 -1
  73. package/dist/esm/AD300x250.js +3 -3
  74. package/dist/esm/AD300x250x600.js +3 -3
  75. package/dist/esm/AD728x90.js +4 -4
  76. package/dist/esm/ADFloatingFooter.js +2 -2
  77. package/dist/esm/ADGutter.js +2 -2
  78. package/dist/esm/ADSkyscraper.js +2 -2
  79. package/dist/esm/ADSponsoredResources.js +2 -2
  80. package/dist/esm/ADWebcast.js +2 -2
  81. package/dist/esm/ADWelcome.js +2 -2
  82. package/dist/esm/AdSlot.js +2 -2
  83. package/dist/esm/AdSlotsProvider.js +1 -1
  84. package/dist/esm/ArticleCarousel.js +1 -1
  85. package/dist/esm/ArticleSeriesListing.js +4 -4
  86. package/dist/esm/Auth.js +300 -249
  87. package/dist/esm/{BlockContent-c409aca5.js → BlockContent-a614acdf.js} +1 -1
  88. package/dist/esm/BrowseVideosListing.js +1 -1
  89. package/dist/esm/CMEDeck.js +5 -16
  90. package/dist/esm/Column3.js +4 -4
  91. package/dist/esm/ConferenceArticleCard.js +2 -2
  92. package/dist/esm/DeckContent.js +8 -10
  93. package/dist/esm/DeckQueue.js +7 -13
  94. package/dist/esm/{Dfp-741c01be.js → Dfp-8a8fca18.js} +1 -1
  95. package/dist/esm/EventsDeck.js +4 -4
  96. package/dist/esm/ExternalResources.js +7 -7
  97. package/dist/esm/Feature.js +3 -3
  98. package/dist/esm/ForbesHero.js +2 -2
  99. package/dist/esm/GridContent.js +12 -14
  100. package/dist/esm/GridHero.js +2 -2
  101. package/dist/esm/GroupDeck.js +1 -1
  102. package/dist/esm/HamMagazine.js +4 -4
  103. package/dist/esm/Hero.js +1 -1
  104. package/dist/esm/HorizontalHero.js +2 -2
  105. package/dist/esm/IssueContentDeck.js +2 -2
  106. package/dist/esm/IssueDeck.js +2 -2
  107. package/dist/esm/IssueLanding.js +8 -8
  108. package/dist/esm/LeftNav.js +2 -2
  109. package/dist/esm/MasterDeck.js +8 -8
  110. package/dist/esm/NavMagazine.js +4 -4
  111. package/dist/esm/NavNative.js +3 -3
  112. package/dist/esm/OncliveHero.js +2 -2
  113. package/dist/esm/OncliveLargeHero.js +2 -2
  114. package/dist/esm/PartnerDetailListing.js +10 -10
  115. package/dist/esm/PublicationDeck.js +2 -2
  116. package/dist/esm/QueueDeckExpanded.js +13 -24
  117. package/dist/esm/RecentNews.js +2 -2
  118. package/dist/esm/RelatedContent.js +2 -2
  119. package/dist/esm/{SocialSearchComponent-93233334.js → SocialSearchComponent-7f14e0f3.js} +5 -5
  120. package/dist/esm/TaxonomyCard.js +2 -2
  121. package/dist/esm/TemplateNormal.js +3 -3
  122. package/dist/esm/ThumbnailCard.js +1 -1
  123. package/dist/esm/Ustream.js +2 -2
  124. package/dist/esm/VerticalHero.js +2 -2
  125. package/dist/esm/VideoSeriesCard.js +2 -2
  126. package/dist/esm/VideoSeriesListing.js +4 -4
  127. package/dist/esm/View.js +13 -13
  128. package/dist/esm/YahooHero.js +2 -2
  129. package/dist/esm/YoutubeGroup.js +1 -1
  130. package/dist/esm/getRelatedArticle.js +124 -62
  131. package/dist/esm/getSerializers.js +6 -6
  132. package/dist/esm/{index-3849e3fe.js → index-51a80699.js} +18 -18
  133. package/dist/esm/{index-dd276ca9.js → index-754010eb.js} +12 -12
  134. package/dist/esm/{index-3f4dd6f2.js → index-93ec3c59.js} +4 -6
  135. package/dist/esm/{index-ef6d5dcf.js → index-d2f90501.js} +1 -1
  136. package/dist/esm/{index.es-29c1cef5.js → index.es-938a3a58.js} +3 -1
  137. package/dist/esm/index.js +12 -12
  138. package/dist/esm/{lodash-ec8c6b48.js → lodash-17fdfebb.js} +22 -71
  139. package/dist/esm/{main-5d1e4bd3.js → main-0465b2a0.js} +65 -34
  140. package/dist/esm/{moment-e2f9b20c.js → moment-12415288.js} +1 -1
  141. package/dist/esm/timeDifferenceCalc.js +1 -1
  142. package/dist/esm/urlFor.js +1 -1
  143. package/package.json +3 -3
  144. /package/dist/cjs/{ADInfeed-1959e5c2.js → ADInfeed-3410ab3c.js} +0 -0
  145. /package/dist/cjs/{ADlgInfeed-b0e018e0.js → ADlgInfeed-845aac15.js} +0 -0
  146. /package/dist/esm/{ADInfeed-37246853.js → ADInfeed-205cb7a9.js} +0 -0
  147. /package/dist/esm/{ADlgInfeed-ae537002.js → ADlgInfeed-e538f17a.js} +0 -0
@@ -32,9 +32,18 @@ function parseString(setCookieValue, options) {
32
32
  ? Object.assign({}, defaultParseOptions, options)
33
33
  : defaultParseOptions;
34
34
 
35
+ try {
36
+ value = options.decodeValues ? decodeURIComponent(value) : value; // decode cookie value
37
+ } catch (e) {
38
+ console.error(
39
+ `set-cookie-parser encountered an error while decoding a cookie with value '${value}'. Set options.decodeValues to false to disable this feature.`,
40
+ e
41
+ );
42
+ }
43
+
35
44
  var cookie = {
36
45
  name: name, // grab everything before the first =
37
- value: options.decodeValues ? decodeURIComponent(value) : value, // decode cookie value
46
+ value: value,
38
47
  };
39
48
 
40
49
  parts.forEach(function (part) {
@@ -205,7 +214,7 @@ setCookie.parse = parse_1;
205
214
  setCookie.parseString = parseString_1;
206
215
  setCookie.splitCookiesString = splitCookiesString_1;
207
216
 
208
- var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
217
+ var utils = _commonjsHelpers.createCommonjsModule(function (module, exports) {
209
218
  var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
210
219
  __assign = Object.assign || function(t) {
211
220
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -218,10 +227,33 @@ var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlob
218
227
  return __assign.apply(this, arguments);
219
228
  };
220
229
  Object.defineProperty(exports, "__esModule", { value: true });
221
- exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
222
-
223
-
224
- var isBrowser = function () { return typeof window !== 'undefined'; };
230
+ exports.areCookiesEqual = exports.hasSameProperties = exports.createCookie = exports.isBrowser = void 0;
231
+ /**
232
+ * Tells whether we are in a browser or server.
233
+ */
234
+ function isBrowser() {
235
+ return typeof window !== 'undefined';
236
+ }
237
+ exports.isBrowser = isBrowser;
238
+ /**
239
+ * Create an instance of the Cookie interface
240
+ */
241
+ function createCookie(name, value, options) {
242
+ var sameSite = options.sameSite;
243
+ if (sameSite === true) {
244
+ sameSite = 'strict';
245
+ }
246
+ if (sameSite === undefined || sameSite === false) {
247
+ sameSite = 'lax';
248
+ }
249
+ var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
250
+ delete cookieToSet.encode;
251
+ return __assign({ name: name, value: value }, cookieToSet);
252
+ }
253
+ exports.createCookie = createCookie;
254
+ /**
255
+ * Tells whether given objects have the same properties.
256
+ */
225
257
  function hasSameProperties(a, b) {
226
258
  var aProps = Object.getOwnPropertyNames(a);
227
259
  var bProps = Object.getOwnPropertyNames(b);
@@ -236,8 +268,9 @@ function hasSameProperties(a, b) {
236
268
  }
237
269
  return true;
238
270
  }
271
+ exports.hasSameProperties = hasSameProperties;
239
272
  /**
240
- * Compare the cookie and return true if the cookies has equivalent
273
+ * Compare the cookie and return true if the cookies have equivalent
241
274
  * options and the cookies would be overwritten in the browser storage.
242
275
  *
243
276
  * @param a first Cookie for comparison
@@ -250,71 +283,109 @@ function areCookiesEqual(a, b) {
250
283
  }
251
284
  return (hasSameProperties(__assign(__assign({}, a), { sameSite: undefined }), __assign(__assign({}, b), { sameSite: undefined })) && sameSiteSame);
252
285
  }
286
+ exports.areCookiesEqual = areCookiesEqual;
287
+ /* Functions */
288
+
289
+ });
290
+
291
+ _commonjsHelpers.unwrapExports(utils);
292
+ var utils_1 = utils.areCookiesEqual;
293
+ var utils_2 = utils.hasSameProperties;
294
+ var utils_3 = utils.createCookie;
295
+ var utils_4 = utils.isBrowser;
296
+
297
+ var dist = _commonjsHelpers.createCommonjsModule(function (module, exports) {
298
+ var __assign = (_commonjsHelpers.commonjsGlobal && _commonjsHelpers.commonjsGlobal.__assign) || function () {
299
+ __assign = Object.assign || function(t) {
300
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
301
+ s = arguments[i];
302
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
303
+ t[p] = s[p];
304
+ }
305
+ return t;
306
+ };
307
+ return __assign.apply(this, arguments);
308
+ };
309
+ Object.defineProperty(exports, "__esModule", { value: true });
310
+ exports.destroyCookie = exports.setCookie = exports.parseCookies = void 0;
311
+
312
+
313
+
253
314
  /**
254
- * Create an instance of the Cookie interface
255
- *
256
- * @param name name of the Cookie
257
- * @param value value of the Cookie
258
- * @param options Cookie options
259
- */
260
- function createCookie(name, value, options) {
261
- var sameSite = options.sameSite;
262
- if (sameSite === true) {
263
- sameSite = 'strict';
264
- }
265
- if (sameSite === undefined || sameSite === false) {
266
- sameSite = 'lax';
267
- }
268
- var cookieToSet = __assign(__assign({}, options), { sameSite: sameSite });
269
- delete cookieToSet.encode;
270
- return __assign({ name: name, value: value }, cookieToSet);
271
- }
272
- /**
273
- *
274
315
  * Parses cookies.
275
316
  *
276
- * @param ctx
277
- * @param options
317
+ * @param ctx NextJS page or API context, express context, null or undefined.
318
+ * @param options Options that we pass down to `cookie` library.
278
319
  */
279
320
  function parseCookies(ctx, options) {
280
- if (ctx && ctx.req && ctx.req.headers && ctx.req.headers.cookie) {
321
+ var _a, _b;
322
+ if ((_b = (_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.cookie) {
281
323
  return index$4.cookie.parse(ctx.req.headers.cookie, options);
282
324
  }
283
- if (isBrowser()) {
325
+ if (utils.isBrowser()) {
284
326
  return index$4.cookie.parse(document.cookie, options);
285
327
  }
286
328
  return {};
287
329
  }
288
330
  exports.parseCookies = parseCookies;
289
331
  /**
290
- *
291
332
  * Sets a cookie.
292
333
  *
293
- * @param ctx
294
- * @param name
295
- * @param value
296
- * @param options
334
+ * @param ctx NextJS page or API context, express context, null or undefined.
335
+ * @param name The name of your cookie.
336
+ * @param value The value of your cookie.
337
+ * @param options Options that we pass down to `cookie` library.
297
338
  */
298
339
  function setCookie$1(ctx, name, value, options) {
299
- if (ctx && ctx.res && ctx.res.getHeader && ctx.res.setHeader) {
340
+ var _a, _b;
341
+ if (options === void 0) { options = {}; }
342
+ // SSR
343
+ if (((_a = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _a === void 0 ? void 0 : _a.getHeader) && ctx.res.setHeader) {
344
+ // Check if response has finished and warn about it.
345
+ if ((_b = ctx === null || ctx === void 0 ? void 0 : ctx.res) === null || _b === void 0 ? void 0 : _b.finished) {
346
+ console.warn("Not setting \"" + name + "\" cookie. Response has finished.");
347
+ console.warn("You should set cookie before res.send()");
348
+ return {};
349
+ }
350
+ /**
351
+ * Load existing cookies from the header and parse them.
352
+ */
300
353
  var cookies = ctx.res.getHeader('Set-Cookie') || [];
301
354
  if (typeof cookies === 'string')
302
355
  cookies = [cookies];
303
356
  if (typeof cookies === 'number')
304
357
  cookies = [];
305
- var parsedCookies = setCookie.parse(cookies);
358
+ /**
359
+ * Parse cookies but ignore values - we've already encoded
360
+ * them in the previous call.
361
+ */
362
+ var parsedCookies = setCookie.parse(cookies, {
363
+ decodeValues: false,
364
+ });
365
+ /**
366
+ * We create the new cookie and make sure that none of
367
+ * the existing cookies match it.
368
+ */
369
+ var newCookie_1 = utils.createCookie(name, value, options);
306
370
  var cookiesToSet_1 = [];
307
371
  parsedCookies.forEach(function (parsedCookie) {
308
- if (!areCookiesEqual(parsedCookie, createCookie(name, value, options))) {
309
- cookiesToSet_1.push(index$4.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({ encode: function (val) { return val; } }, parsedCookie)));
372
+ if (!utils.areCookiesEqual(parsedCookie, newCookie_1)) {
373
+ /**
374
+ * We serialize the cookie back to the original format
375
+ * if it isn't the same as the new one.
376
+ */
377
+ var serializedCookie = index$4.cookie.serialize(parsedCookie.name, parsedCookie.value, __assign({
378
+ // we prevent reencoding by default, but you might override it
379
+ encode: function (val) { return val; } }, parsedCookie));
380
+ cookiesToSet_1.push(serializedCookie);
310
381
  }
311
382
  });
312
383
  cookiesToSet_1.push(index$4.cookie.serialize(name, value, options));
313
- if (!ctx.res.finished) {
314
- ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
315
- }
384
+ // Update the header.
385
+ ctx.res.setHeader('Set-Cookie', cookiesToSet_1);
316
386
  }
317
- if (isBrowser()) {
387
+ // Browser
388
+ if (utils.isBrowser()) {
318
389
  if (options && options.httpOnly) {
319
390
  throw new Error('Can not set a httpOnly cookie in the browser.');
320
391
  }
@@ -324,30 +395,21 @@ function setCookie$1(ctx, name, value, options) {
324
395
  }
325
396
  exports.setCookie = setCookie$1;
326
397
  /**
327
- *
328
398
  * Destroys a cookie with a particular name.
329
399
  *
330
- * @param ctx
331
- * @param name
332
- * @param options
400
+ * @param ctx NextJS page or API context, express context, null or undefined.
401
+ * @param name Cookie name.
402
+ * @param options Options that we pass down to `cookie` library.
333
403
  */
334
404
  function destroyCookie(ctx, name, options) {
335
- var opts = __assign(__assign({}, (options || {})), { maxAge: -1 });
336
- if (ctx && ctx.res && ctx.res.setHeader && ctx.res.getHeader) {
337
- var cookies = ctx.res.getHeader('Set-Cookie') || [];
338
- if (typeof cookies === 'string')
339
- cookies = [cookies];
340
- if (typeof cookies === 'number')
341
- cookies = [];
342
- cookies.push(index$4.cookie.serialize(name, '', opts));
343
- ctx.res.setHeader('Set-Cookie', cookies);
344
- }
345
- if (isBrowser()) {
346
- document.cookie = index$4.cookie.serialize(name, '', opts);
347
- }
348
- return {};
405
+ /**
406
+ * We forward the request destroy to setCookie function
407
+ * as it is the same function with modified maxAge value.
408
+ */
409
+ return setCookie$1(ctx, name, '', __assign(__assign({}, (options || {})), { maxAge: -1 }));
349
410
  }
350
411
  exports.destroyCookie = destroyCookie;
412
+ /* Utility Exports */
351
413
  exports.default = {
352
414
  set: setCookie$1,
353
415
  get: parseCookies,
@@ -16,18 +16,18 @@ require('./web.dom.iterable-a0e279c1.js');
16
16
  require('./typeof-725500bc.js');
17
17
  require('./_is-array-754e012d.js');
18
18
  require('react');
19
- require('./index-099d45ae.js');
19
+ require('./index-2d0a4911.js');
20
20
  require('prop-types');
21
21
  require('react-bootstrap/Row');
22
22
  require('react-bootstrap/Col');
23
- require('./moment-575fe24c.js');
23
+ require('./moment-66a6a284.js');
24
24
  require('next/router');
25
25
  require('./isSymbol-04666465.js');
26
26
  require('./debounce-eb287781.js');
27
27
  require('react-dom');
28
- require('./index-39beccb3.js');
28
+ require('./index-b5eb3ff8.js');
29
29
  require('./index-da796b8c.js');
30
- require('./main-a4cb15bb.js');
30
+ require('./main-b6c96c8d.js');
31
31
  require('./entities-310b46ee.js');
32
32
  require('./stringify-7c5aff47.js');
33
33
  require('./slicedToArray-8f385299.js');
@@ -36,14 +36,14 @@ require('./_set-species-f92c67c5.js');
36
36
  require('./Segment.js');
37
37
  require('./Beam.js');
38
38
  require('./AdSlot.js');
39
- require('./BlockContent-80b15fac.js');
39
+ require('./BlockContent-88f69acd.js');
40
40
  require('./smoothscroll-95231a70.js');
41
41
  require('./GroupDeck.js');
42
42
  require('react-bootstrap');
43
43
  require('./iconBase-68959171.js');
44
44
  require('./index.esm-90433435.js');
45
45
  require('react-bootstrap/Button');
46
- var getSerializers = require('./index-f1006c06.js');
46
+ var getSerializers = require('./index-c0bfab13.js');
47
47
  require('./util-f2c1b65b.js');
48
48
  require('./brightcove-react-player-loader.es-156bd4d6.js');
49
49
  require('react-bootstrap/Pagination');
@@ -827,15 +827,13 @@ var DFPManager = Object.assign(new EventEmitter.EventEmitter().setMaxListeners(0
827
827
  });
828
828
 
829
829
  if (_this5.lazyLoadIsEnabled()) {
830
- var args = [];
831
-
832
830
  var config = _this5.getLazyLoadConfig();
833
831
 
834
- if (config !== null) {
835
- args.push(config);
832
+ if (config) {
833
+ pubadsService.enableLazyLoad(config);
834
+ } else {
835
+ pubadsService.enableLazyLoad();
836
836
  }
837
-
838
- pubadsService.enableLazyLoad.call(args);
839
837
  }
840
838
 
841
839
  if (_this5.singleRequestIsEnabled()) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var _commonjsHelpers = require('./_commonjsHelpers-06173234.js');
4
- var moment = require('./moment-575fe24c.js');
4
+ var moment = require('./moment-66a6a284.js');
5
5
 
6
6
  var momentTimezone = _commonjsHelpers.createCommonjsModule(function (module) {
7
7
  //! moment-timezone.js
@@ -60,35 +60,35 @@ function parseSource(source) {
60
60
  if (typeof source === 'string' && isUrl(source)) {
61
61
  // Someone passed an existing image url?
62
62
  image = {
63
- asset: { _ref: urlToId(source) }
63
+ asset: { _ref: urlToId(source) },
64
64
  };
65
65
  }
66
66
  else if (typeof source === 'string') {
67
67
  // Just an asset id
68
68
  image = {
69
- asset: { _ref: source }
69
+ asset: { _ref: source },
70
70
  };
71
71
  }
72
72
  else if (isRef(source)) {
73
73
  // We just got passed an asset directly
74
74
  image = {
75
- asset: source
75
+ asset: source,
76
76
  };
77
77
  }
78
78
  else if (isAsset(source)) {
79
79
  // If we were passed an image asset document
80
80
  image = {
81
81
  asset: {
82
- _ref: source._id || ''
83
- }
82
+ _ref: source._id || '',
83
+ },
84
84
  };
85
85
  }
86
86
  else if (isAssetStub(source)) {
87
87
  // If we were passed a partial asset (`url`, but no `_id`)
88
88
  image = {
89
89
  asset: {
90
- _ref: urlToId(source.asset.url)
91
- }
90
+ _ref: urlToId(source.asset.url),
91
+ },
92
92
  };
93
93
  }
94
94
  else if (typeof source.asset === 'object') {
@@ -129,7 +129,7 @@ function applyDefaults(image) {
129
129
  left: 0,
130
130
  top: 0,
131
131
  bottom: 0,
132
- right: 0
132
+ right: 0,
133
133
  };
134
134
  }
135
135
  if (!result.hotspot) {
@@ -137,7 +137,7 @@ function applyDefaults(image) {
137
137
  x: 0.5,
138
138
  y: 0.5,
139
139
  height: 1.0,
140
- width: 1.0
140
+ width: 1.0,
141
141
  };
142
142
  }
143
143
  return result;
@@ -184,7 +184,7 @@ exports.SPEC_NAME_TO_URL_NAME_MAPPINGS = [
184
184
  ['crop', 'crop'],
185
185
  ['saturation', 'sat'],
186
186
  ['auto', 'auto'],
187
- ['dpr', 'dpr']
187
+ ['dpr', 'dpr'],
188
188
  ];
189
189
  function urlForImage(options) {
190
190
  var spec = __assign({}, (options || {}));
@@ -203,7 +203,7 @@ function urlForImage(options) {
203
203
  left: cropLeft,
204
204
  top: cropTop,
205
205
  width: Math.round(asset.width - image.crop.right * asset.width - cropLeft),
206
- height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop)
206
+ height: Math.round(asset.height - image.crop.bottom * asset.height - cropTop),
207
207
  };
208
208
  // Compute hot spot rect in terms of pixel coordinates
209
209
  var hotSpotVerticalRadius = (image.hotspot.height * asset.height) / 2;
@@ -214,7 +214,7 @@ function urlForImage(options) {
214
214
  left: hotSpotCenterX - hotSpotHorizontalRadius,
215
215
  top: hotSpotCenterY - hotSpotVerticalRadius,
216
216
  right: hotSpotCenterX + hotSpotHorizontalRadius,
217
- bottom: hotSpotCenterY + hotSpotVerticalRadius
217
+ bottom: hotSpotCenterY + hotSpotVerticalRadius,
218
218
  };
219
219
  // If irrelevant, or if we are requested to: don't perform crop/fit based on
220
220
  // the crop/hotspot.
@@ -296,7 +296,7 @@ function fit(source, spec) {
296
296
  left: Math.round(left),
297
297
  top: Math.round(top_2),
298
298
  width: Math.round(width),
299
- height: Math.round(height)
299
+ height: Math.round(height),
300
300
  };
301
301
  }
302
302
  else {
@@ -318,13 +318,13 @@ function fit(source, spec) {
318
318
  left: Math.max(0, Math.floor(left)),
319
319
  top: Math.max(0, Math.floor(top_3)),
320
320
  width: Math.round(width),
321
- height: Math.round(height)
321
+ height: Math.round(height),
322
322
  };
323
323
  }
324
324
  return {
325
325
  width: imgWidth,
326
326
  height: imgHeight,
327
- rect: cropRect
327
+ rect: cropRect,
328
328
  };
329
329
  }
330
330
 
@@ -382,7 +382,7 @@ function urlBuilder(options) {
382
382
  return new ImageUrlBuilder(null, {
383
383
  baseUrl: apiHost.replace(/^https:\/\/api\./, 'https://cdn.'),
384
384
  projectId: projectId,
385
- dataset: dataset
385
+ dataset: dataset,
386
386
  });
387
387
  }
388
388
  // Or just accept the options as given
@@ -395,7 +395,7 @@ var ImageUrlBuilder = /** @class */ (function () {
395
395
  ? __assign(__assign({}, (parent.options || {})), (options || {})) : __assign({}, (options || {})); // Copy options
396
396
  }
397
397
  ImageUrlBuilder.prototype.withOptions = function (options) {
398
- var baseUrl = options.baseUrl || '';
398
+ var baseUrl = options.baseUrl || this.options.baseUrl;
399
399
  var newOptions = { baseUrl: baseUrl };
400
400
  for (var key in options) {
401
401
  if (options.hasOwnProperty(key)) {
@@ -523,7 +523,7 @@ var ImageUrlBuilder = /** @class */ (function () {
523
523
  ImageUrlBuilder.prototype.url = function () {
524
524
  return urlForImage_1$1.default(this.options);
525
525
  };
526
- // Synonym for url()
526
+ // Alias for url()
527
527
  ImageUrlBuilder.prototype.toString = function () {
528
528
  return this.url();
529
529
  };
@@ -9,23 +9,23 @@ var inherits = require('./inherits-513d81cd.js');
9
9
  var _typeof$1 = require('./typeof-725500bc.js');
10
10
  var React = require('react');
11
11
  var React__default = _interopDefault(React);
12
- var index = require('./index-099d45ae.js');
12
+ var index = require('./index-2d0a4911.js');
13
13
  var PropTypes = require('prop-types');
14
14
  var PropTypes__default = _interopDefault(PropTypes);
15
15
  var Row = _interopDefault(require('react-bootstrap/Row'));
16
16
  var Col = _interopDefault(require('react-bootstrap/Col'));
17
- var moment = require('./moment-575fe24c.js');
17
+ var moment = require('./moment-66a6a284.js');
18
18
  var Router = require('next/router');
19
19
  var Router__default = _interopDefault(Router);
20
- var index$1 = require('./index-39beccb3.js');
20
+ var index$1 = require('./index-b5eb3ff8.js');
21
21
  var index$2 = require('./index-da796b8c.js');
22
- var main = require('./main-a4cb15bb.js');
22
+ var main = require('./main-b6c96c8d.js');
23
23
  var entities = require('./entities-310b46ee.js');
24
24
  var slicedToArray = require('./slicedToArray-8f385299.js');
25
25
  var Segment = require('./Segment.js');
26
26
  var Beam = require('./Beam.js');
27
27
  var AdSlot = require('./AdSlot.js');
28
- var BlockContent = require('./BlockContent-80b15fac.js');
28
+ var BlockContent = require('./BlockContent-88f69acd.js');
29
29
  var smoothscroll = require('./smoothscroll-95231a70.js');
30
30
  var GroupDeck = require('./GroupDeck.js');
31
31
  var reactBootstrap = require('react-bootstrap');
@@ -7514,7 +7514,7 @@ var Poll = function Poll(_ref) {
7514
7514
  );
7515
7515
  };
7516
7516
 
7517
- var numberOfPaginations = main.main_35 ? 4 : 10;
7517
+ var numberOfPaginations = main.main_38 ? 4 : 10;
7518
7518
 
7519
7519
  var Quiz = function Quiz(_ref) {
7520
7520
  var quizzes = _ref.quizzes,
@@ -7627,7 +7627,7 @@ var Quiz = function Quiz(_ref) {
7627
7627
  var renderPagination = function renderPagination() {
7628
7628
  return React__default.createElement(
7629
7629
  Pagination,
7630
- { className: 'p-0 m-0', size: main.main_35 && 'sm' },
7630
+ { className: 'p-0 m-0', size: main.main_38 && 'sm' },
7631
7631
  React__default.createElement(Pagination.First, { onClick: function onClick() {
7632
7632
  return changePage('first');
7633
7633
  }, disabled: currentPage === 1 }),
@@ -8250,7 +8250,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8250
8250
  React.useLayoutEffect(function () {
8251
8251
  //console.log('useLayoutEffect')
8252
8252
  if (!firstLoad) {
8253
- if (main.main_36) {
8253
+ if (main.main_39) {
8254
8254
  grabLoadedAds();
8255
8255
  } else {
8256
8256
  scrollToArticle();
@@ -8274,7 +8274,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8274
8274
  //let targeting = getTargeting({ article: activeArticle, cpModificationRequired, position: props.position, prevUrl })
8275
8275
  if (pageview) pageview(path);
8276
8276
 
8277
- if (!main.main_36) {
8277
+ if (!main.main_39) {
8278
8278
  index.lib_3.getGoogletag().then(function (googletag) {
8279
8279
  if (window.googletag && googletag.pubadsReady) {
8280
8280
  index.lib_3.refresh();
@@ -8282,7 +8282,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8282
8282
  });
8283
8283
  }
8284
8284
  //Refresh leaderboard ad on mobile
8285
- if (main.main_36) {
8285
+ if (main.main_39) {
8286
8286
  var leaderboardSlotId = '';
8287
8287
  index.lib_3.getGoogletag().then(function (googletag) {
8288
8288
  if (window.googletag && googletag.pubadsReady) {
@@ -8343,7 +8343,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8343
8343
  React__default.createElement(
8344
8344
  'div',
8345
8345
  { className: 'ad-box', style: { textAlign: 'center' } },
8346
- main.main_36 && Ads.map(function (ad, index) {
8346
+ main.main_39 && Ads.map(function (ad, index) {
8347
8347
  if (index === 0) {
8348
8348
  return React__default.createElement(
8349
8349
  'div',
@@ -8464,7 +8464,7 @@ var ArticleSeries = function ArticleSeries(_ref) {
8464
8464
  React__default.createElement(
8465
8465
  'div',
8466
8466
  { className: 'ad-box', style: { textAlign: 'center' } },
8467
- main.main_36 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8467
+ main.main_39 && Articles.length - 1 !== index && Ads.map(function (ad, innerIndex) {
8468
8468
  if (innerIndex === 0) {
8469
8469
  return React__default.createElement(
8470
8470
  'div',
@@ -268,6 +268,9 @@ var InfiniteScroll = /** @class */ (function (_super) {
268
268
  _this.dragging = false;
269
269
  if (_this.state.pullToRefreshThresholdBreached) {
270
270
  _this.props.refreshFunction && _this.props.refreshFunction();
271
+ _this.setState({
272
+ pullToRefreshThresholdBreached: false,
273
+ });
271
274
  }
272
275
  requestAnimationFrame(function () {
273
276
  // this._infScroll
@@ -374,7 +377,6 @@ var InfiniteScroll = /** @class */ (function (_super) {
374
377
  // update state when new data was sent in
375
378
  this.setState({
376
379
  showLoader: false,
377
- pullToRefreshThresholdBreached: false,
378
380
  });
379
381
  };
380
382
  InfiniteScroll.prototype.isElementAtBottom = function (target, scrollThreshold) {
package/dist/cjs/index.js CHANGED
@@ -18,22 +18,22 @@ require('./web.dom.iterable-a0e279c1.js');
18
18
  require('./typeof-725500bc.js');
19
19
  require('./_is-array-754e012d.js');
20
20
  require('react');
21
- require('./index-099d45ae.js');
21
+ require('./index-2d0a4911.js');
22
22
  require('prop-types');
23
23
  require('react-bootstrap/Container');
24
24
  require('react-bootstrap/Row');
25
25
  require('react-bootstrap/Col');
26
26
  require('react-bootstrap/Card');
27
- require('./moment-575fe24c.js');
27
+ require('./moment-66a6a284.js');
28
28
  require('next/router');
29
29
  require('./isSymbol-04666465.js');
30
30
  require('./debounce-eb287781.js');
31
- require('./index.es-9110add6.js');
31
+ require('./index.es-ab3f2690.js');
32
32
  require('react-dom');
33
33
  require('./visibility-sensor-0c45a583.js');
34
- require('./index-39beccb3.js');
34
+ require('./index-b5eb3ff8.js');
35
35
  require('./index-da796b8c.js');
36
- require('./main-a4cb15bb.js');
36
+ require('./main-b6c96c8d.js');
37
37
  require('./entities-310b46ee.js');
38
38
  require('./stringify-7c5aff47.js');
39
39
  require('./slicedToArray-8f385299.js');
@@ -42,10 +42,10 @@ require('./_set-species-f92c67c5.js');
42
42
  var Segment = require('./Segment.js');
43
43
  var Beam = require('./Beam.js');
44
44
  var AdSlot = require('./AdSlot.js');
45
- require('./ADInfeed-1959e5c2.js');
45
+ require('./ADInfeed-3410ab3c.js');
46
46
  var DeckContent = require('./DeckContent.js');
47
- require('./lodash-7fd85bcf.js');
48
- require('./ADlgInfeed-b0e018e0.js');
47
+ require('./lodash-fc2922d0.js');
48
+ require('./ADlgInfeed-845aac15.js');
49
49
  require('./getContentCategory-f38a4c00.js');
50
50
  require('./get-68c52cb1.js');
51
51
  var AD = require('./AD.js');
@@ -54,7 +54,7 @@ var GridContent = require('./GridContent.js');
54
54
  var DeckQueue = require('./DeckQueue.js');
55
55
  require('react-bootstrap/Media');
56
56
  var ThumbnailCard = require('./ThumbnailCard.js');
57
- require('./BlockContent-80b15fac.js');
57
+ require('./BlockContent-88f69acd.js');
58
58
  require('./react-social-icons-f7f48f71.js');
59
59
  var TaxonomyCard = require('./TaxonomyCard.js');
60
60
  var RolesDeck = require('./RolesDeck.js');
@@ -80,10 +80,10 @@ require('./defineProperty-55548b25.js');
80
80
  var EventsDeck = require('./EventsDeck.js');
81
81
  require('react-bootstrap/Spinner');
82
82
  require('react-bootstrap/Form');
83
- require('./index-3294d3bc.js');
83
+ require('./index-5be2866f.js');
84
84
  require('./js.cookie-a511c430.js');
85
85
  var CMEDeck = require('./CMEDeck.js');
86
- var getSerializers = require('./index-f1006c06.js');
86
+ var getSerializers = require('./index-c0bfab13.js');
87
87
  require('./util-f2c1b65b.js');
88
88
  require('./brightcove-react-player-loader.es-156bd4d6.js');
89
89
  require('react-bootstrap/Pagination');
@@ -114,7 +114,7 @@ require('./NavFooter-76c913e3.js');
114
114
  require('./index.esm-4d410430.js');
115
115
  var SocialIcons = require('./SocialIcons.js');
116
116
  require('react-bootstrap/FormControl');
117
- require('./SocialSearchComponent-9cd24578.js');
117
+ require('./SocialSearchComponent-6b5e5b47.js');
118
118
  var NavMagazine = require('./NavMagazine.js');
119
119
  var NavNative = require('./NavNative.js');
120
120
  var Search = require('./Search.js');