@mjhls/mjh-framework 1.0.443 → 1.0.445
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/{GridContent-25762807.js → GridContent-6a0216fb.js} +15 -16
- package/dist/cjs/GridContent.js +1 -1
- package/dist/cjs/QueueDeckExpanded.js +16 -19
- package/dist/cjs/index.js +8 -3
- package/dist/esm/{GridContent-93e5f16a.js → GridContent-7e11f013.js} +15 -16
- package/dist/esm/GridContent.js +1 -1
- package/dist/esm/QueueDeckExpanded.js +16 -19
- package/dist/esm/index.js +8 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,8 +78,7 @@ var GridContent = function (_React$Component) {
|
|
|
78
78
|
scrolling: true,
|
|
79
79
|
query: _this.query,
|
|
80
80
|
currentPage: _this.props.currentPage || 1,
|
|
81
|
-
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
|
|
82
|
-
desktopView: false
|
|
81
|
+
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
|
|
83
82
|
}, _this.loadMore = debounce.debounce_1(function () {
|
|
84
83
|
_this.setState(function (state) {
|
|
85
84
|
var page = state.page,
|
|
@@ -94,13 +93,6 @@ var GridContent = function (_React$Component) {
|
|
|
94
93
|
};
|
|
95
94
|
}, _this.loadData);
|
|
96
95
|
}, 0), _this.componentDidMount = function () {
|
|
97
|
-
if (_this.state.lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
98
|
-
_this.setState(function (state) {
|
|
99
|
-
return _extends._extends({}, state, {
|
|
100
|
-
desktopView: true
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
96
|
document.addEventListener('scroll', _this.trackScrolling);
|
|
105
97
|
}, _this.componentWillUnmount = function () {
|
|
106
98
|
document.removeEventListener('scroll', _this.trackScrolling);
|
|
@@ -271,7 +263,7 @@ var GridContent = function (_React$Component) {
|
|
|
271
263
|
|
|
272
264
|
inherits._createClass(GridContent, [{
|
|
273
265
|
key: 'cardLoader',
|
|
274
|
-
value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight,
|
|
266
|
+
value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, lgInfeedAd) {
|
|
275
267
|
var _this2 = this;
|
|
276
268
|
|
|
277
269
|
var lgVar = Math.floor(12 / columns);
|
|
@@ -361,11 +353,13 @@ var GridContent = function (_React$Component) {
|
|
|
361
353
|
return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
|
|
362
354
|
};
|
|
363
355
|
var posts = [];
|
|
364
|
-
if (brandInsight && (
|
|
356
|
+
if (brandInsight && (lgInfeedAd || showBI)) {
|
|
365
357
|
var firstThree = this.state.data.slice(0, 3);
|
|
366
358
|
var data = this.state.data.slice(3);
|
|
367
359
|
|
|
368
|
-
|
|
360
|
+
// Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
|
|
361
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
362
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
369
363
|
var lgInFeedAd = {
|
|
370
364
|
_type: 'lg-infeed',
|
|
371
365
|
adUnit: brandInsight.adUnit,
|
|
@@ -391,7 +385,8 @@ var GridContent = function (_React$Component) {
|
|
|
391
385
|
}
|
|
392
386
|
|
|
393
387
|
if (showBI) {
|
|
394
|
-
|
|
388
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
389
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
395
390
|
brandInsight.interval = 8;
|
|
396
391
|
} else {
|
|
397
392
|
brandInsight.interval = 5;
|
|
@@ -421,7 +416,11 @@ var GridContent = function (_React$Component) {
|
|
|
421
416
|
posts = firstThree.concat(posts);
|
|
422
417
|
posts = posts.map(function (ele, i) {
|
|
423
418
|
if (ele._type === 'lg-infeed') {
|
|
424
|
-
|
|
419
|
+
// Setting pos as top2 for the first occurence of large infeed ad
|
|
420
|
+
var _pos = posts.indexOf(posts.find(function (d) {
|
|
421
|
+
return d._type === 'lg-infeed';
|
|
422
|
+
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
423
|
+
return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: _pos }) });
|
|
425
424
|
} else {
|
|
426
425
|
return ele;
|
|
427
426
|
}
|
|
@@ -679,7 +678,7 @@ var GridContent = function (_React$Component) {
|
|
|
679
678
|
React__default['default'].createElement(
|
|
680
679
|
Container__default['default'],
|
|
681
680
|
null,
|
|
682
|
-
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.
|
|
681
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
|
|
683
682
|
)
|
|
684
683
|
) : React__default['default'].createElement(
|
|
685
684
|
React__default['default'].Fragment,
|
|
@@ -687,7 +686,7 @@ var GridContent = function (_React$Component) {
|
|
|
687
686
|
React__default['default'].createElement(
|
|
688
687
|
Container__default['default'],
|
|
689
688
|
null,
|
|
690
|
-
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.
|
|
689
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
|
|
691
690
|
),
|
|
692
691
|
React__default['default'].createElement(
|
|
693
692
|
'div',
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -33,7 +33,7 @@ require('./ADInfeed-ae1f348d.js');
|
|
|
33
33
|
require('./lodash-fc2922d0.js');
|
|
34
34
|
require('./ADlgInfeed-f4c4a1bf.js');
|
|
35
35
|
require('./get-7a75c563.js');
|
|
36
|
-
var GridContent = require('./GridContent-
|
|
36
|
+
var GridContent = require('./GridContent-6a0216fb.js');
|
|
37
37
|
require('./AuthorComponent-b44bb44e.js');
|
|
38
38
|
|
|
39
39
|
|
|
@@ -145,15 +145,16 @@ var checkExternalUrl = function checkExternalUrl(url) {
|
|
|
145
145
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
146
146
|
};
|
|
147
147
|
|
|
148
|
-
var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
148
|
+
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) {
|
|
149
149
|
var numberOfItemsBeforeAd = 6;
|
|
150
|
-
|
|
151
150
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
152
151
|
return [].concat(toConsumableArray._toConsumableArray(arr.slice(0, index)), [newElement], toConsumableArray._toConsumableArray(arr.slice(index)));
|
|
153
152
|
};
|
|
154
153
|
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
// Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
|
|
155
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
156
|
+
if (lgInfeedAd && brandInsightAd && window && window.innerWidth >= 1200) {
|
|
157
|
+
var lgInfeed = {
|
|
157
158
|
_type: 'lg-infeed',
|
|
158
159
|
adUnit: brandInsightAd.adUnit,
|
|
159
160
|
className: 'lg-infeed',
|
|
@@ -169,7 +170,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
169
170
|
var set = lodash.lodash.chunk(chunk, 2);
|
|
170
171
|
for (var i = 0; i < set.length; i++) {
|
|
171
172
|
if (i !== set.length - 1) {
|
|
172
|
-
set[i].push(
|
|
173
|
+
set[i].push(lgInfeed);
|
|
173
174
|
}
|
|
174
175
|
}
|
|
175
176
|
return lodash.lodash.flattenDeep(set);
|
|
@@ -178,7 +179,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
if (showBI && brandInsightAd) {
|
|
181
|
-
|
|
182
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
183
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) brandInsightAd.interval = 8;
|
|
182
184
|
var pos = 0;
|
|
183
185
|
for (var i = 1; pos < data.length; i++) {
|
|
184
186
|
var inFeedAd = {
|
|
@@ -201,14 +203,17 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
201
203
|
}
|
|
202
204
|
data = data.map(function (ele, i) {
|
|
203
205
|
if (ele._type === 'lg-infeed') {
|
|
204
|
-
|
|
206
|
+
// Setting pos as top2 for the first occurence of large infeed ad
|
|
207
|
+
var _pos = data.indexOf(data.find(function (d) {
|
|
208
|
+
return d._type === 'lg-infeed';
|
|
209
|
+
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
210
|
+
return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: _pos }) });
|
|
205
211
|
} else {
|
|
206
212
|
return ele;
|
|
207
213
|
}
|
|
208
214
|
});
|
|
209
215
|
|
|
210
216
|
var featureCount = 0;
|
|
211
|
-
|
|
212
217
|
return React__default['default'].createElement(
|
|
213
218
|
'div',
|
|
214
219
|
null,
|
|
@@ -644,16 +649,11 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
644
649
|
values = _useState10[0],
|
|
645
650
|
setValues = _useState10[1];
|
|
646
651
|
|
|
647
|
-
var _useState11 = React.useState(false),
|
|
648
|
-
_useState12 = slicedToArray._slicedToArray(_useState11, 2),
|
|
649
|
-
dektopView = _useState12[0],
|
|
650
|
-
setDesktopView = _useState12[1];
|
|
651
|
-
|
|
652
652
|
var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
|
|
653
653
|
|
|
654
654
|
var prevValues = usePrevious(values);
|
|
655
655
|
|
|
656
|
-
//check for change in filter parameters from client side and refresh the page
|
|
656
|
+
// check for change in filter parameters from client side and refresh the page
|
|
657
657
|
React.useEffect(function () {
|
|
658
658
|
if (initialData && data !== initialData && initialData.length >= 0) {
|
|
659
659
|
setData(initialData);
|
|
@@ -670,9 +670,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
670
670
|
}, [initialData]);
|
|
671
671
|
|
|
672
672
|
React.useEffect(function () {
|
|
673
|
-
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
674
|
-
setDesktopView(true);
|
|
675
|
-
}
|
|
676
673
|
if (prevValues) {
|
|
677
674
|
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
|
|
678
675
|
loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
|
|
@@ -709,7 +706,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
709
706
|
React__default['default'].createElement(
|
|
710
707
|
reactBootstrap.Container,
|
|
711
708
|
null,
|
|
712
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
709
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
713
710
|
)
|
|
714
711
|
),
|
|
715
712
|
React__default['default'].createElement(
|
|
@@ -723,7 +720,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
723
720
|
React__default['default'].createElement(
|
|
724
721
|
reactBootstrap.Container,
|
|
725
722
|
null,
|
|
726
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
723
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
727
724
|
),
|
|
728
725
|
React__default['default'].createElement(
|
|
729
726
|
'div',
|
package/dist/cjs/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var DeckContent = require('./DeckContent.js');
|
|
|
36
36
|
require('./lodash-fc2922d0.js');
|
|
37
37
|
require('./ADlgInfeed-f4c4a1bf.js');
|
|
38
38
|
var get$1 = require('./get-7a75c563.js');
|
|
39
|
-
var GridContent = require('./GridContent-
|
|
39
|
+
var GridContent = require('./GridContent-6a0216fb.js');
|
|
40
40
|
var AuthorComponent = require('./AuthorComponent-b44bb44e.js');
|
|
41
41
|
var DeckQueue = require('./DeckQueue.js');
|
|
42
42
|
require('react-bootstrap/Media');
|
|
@@ -15028,6 +15028,11 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
15028
15028
|
return React__default['default'].createElement(
|
|
15029
15029
|
'div',
|
|
15030
15030
|
{ id: 'publicationLanding' },
|
|
15031
|
+
React__default['default'].createElement(
|
|
15032
|
+
'style',
|
|
15033
|
+
{ jsx: true },
|
|
15034
|
+
'\n #pubYearFilter .dropdown-menu.show {\n max-height: 25vh;\n }\n '
|
|
15035
|
+
),
|
|
15031
15036
|
React__default['default'].createElement(
|
|
15032
15037
|
Row__default['default'],
|
|
15033
15038
|
{ style: { marginBottom: '1rem' } },
|
|
@@ -17315,10 +17320,10 @@ var Article = function Article(props) {
|
|
|
17315
17320
|
contextualAD: _extends$2._extends({}, payload.contextualAD, {
|
|
17316
17321
|
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
|
|
17317
17322
|
className: 'ADFluid',
|
|
17318
|
-
// Adding new ad size for large contextual ad for desktop
|
|
17323
|
+
// Adding new ad size for large contextual ad for desktop screen width >= 1400
|
|
17319
17324
|
sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
|
|
17320
17325
|
sizeMapping: lgContextAd ? [{
|
|
17321
|
-
viewport: [
|
|
17326
|
+
viewport: [1400, 0],
|
|
17322
17327
|
sizes: [[728, 90], 'fluid', [300, 100]]
|
|
17323
17328
|
}, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : ['fluid', [300, 100]]
|
|
17324
17329
|
})
|
|
@@ -68,8 +68,7 @@ var GridContent = function (_React$Component) {
|
|
|
68
68
|
scrolling: true,
|
|
69
69
|
query: _this.query,
|
|
70
70
|
currentPage: _this.props.currentPage || 1,
|
|
71
|
-
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
|
|
72
|
-
desktopView: false
|
|
71
|
+
lgInfeedAd: _this.props.lgInfeedAd ? _this.props.lgInfeedAd : false
|
|
73
72
|
}, _this.loadMore = debounce_1(function () {
|
|
74
73
|
_this.setState(function (state) {
|
|
75
74
|
var page = state.page,
|
|
@@ -84,13 +83,6 @@ var GridContent = function (_React$Component) {
|
|
|
84
83
|
};
|
|
85
84
|
}, _this.loadData);
|
|
86
85
|
}, 0), _this.componentDidMount = function () {
|
|
87
|
-
if (_this.state.lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
88
|
-
_this.setState(function (state) {
|
|
89
|
-
return _extends({}, state, {
|
|
90
|
-
desktopView: true
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
86
|
document.addEventListener('scroll', _this.trackScrolling);
|
|
95
87
|
}, _this.componentWillUnmount = function () {
|
|
96
88
|
document.removeEventListener('scroll', _this.trackScrolling);
|
|
@@ -261,7 +253,7 @@ var GridContent = function (_React$Component) {
|
|
|
261
253
|
|
|
262
254
|
_createClass(GridContent, [{
|
|
263
255
|
key: 'cardLoader',
|
|
264
|
-
value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight,
|
|
256
|
+
value: function cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, lgInfeedAd) {
|
|
265
257
|
var _this2 = this;
|
|
266
258
|
|
|
267
259
|
var lgVar = Math.floor(12 / columns);
|
|
@@ -351,11 +343,13 @@ var GridContent = function (_React$Component) {
|
|
|
351
343
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
352
344
|
};
|
|
353
345
|
var posts = [];
|
|
354
|
-
if (brandInsight && (
|
|
346
|
+
if (brandInsight && (lgInfeedAd || showBI)) {
|
|
355
347
|
var firstThree = this.state.data.slice(0, 3);
|
|
356
348
|
var data = this.state.data.slice(3);
|
|
357
349
|
|
|
358
|
-
|
|
350
|
+
// Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
|
|
351
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
352
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
359
353
|
var lgInFeedAd = {
|
|
360
354
|
_type: 'lg-infeed',
|
|
361
355
|
adUnit: brandInsight.adUnit,
|
|
@@ -381,7 +375,8 @@ var GridContent = function (_React$Component) {
|
|
|
381
375
|
}
|
|
382
376
|
|
|
383
377
|
if (showBI) {
|
|
384
|
-
|
|
378
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
379
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
385
380
|
brandInsight.interval = 8;
|
|
386
381
|
} else {
|
|
387
382
|
brandInsight.interval = 5;
|
|
@@ -411,7 +406,11 @@ var GridContent = function (_React$Component) {
|
|
|
411
406
|
posts = firstThree.concat(posts);
|
|
412
407
|
posts = posts.map(function (ele, i) {
|
|
413
408
|
if (ele._type === 'lg-infeed') {
|
|
414
|
-
|
|
409
|
+
// Setting pos as top2 for the first occurence of large infeed ad
|
|
410
|
+
var _pos = posts.indexOf(posts.find(function (d) {
|
|
411
|
+
return d._type === 'lg-infeed';
|
|
412
|
+
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
413
|
+
return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: _pos }) });
|
|
415
414
|
} else {
|
|
416
415
|
return ele;
|
|
417
416
|
}
|
|
@@ -669,7 +668,7 @@ var GridContent = function (_React$Component) {
|
|
|
669
668
|
React.createElement(
|
|
670
669
|
Container,
|
|
671
670
|
null,
|
|
672
|
-
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.
|
|
671
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
|
|
673
672
|
)
|
|
674
673
|
) : React.createElement(
|
|
675
674
|
React.Fragment,
|
|
@@ -677,7 +676,7 @@ var GridContent = function (_React$Component) {
|
|
|
677
676
|
React.createElement(
|
|
678
677
|
Container,
|
|
679
678
|
null,
|
|
680
|
-
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.
|
|
679
|
+
this.cardLoader(page, columns, variant, showVideo, VideoPlayer, showBI, brandInsight, this.state.lgInfeedAd)
|
|
681
680
|
),
|
|
682
681
|
React.createElement(
|
|
683
682
|
'div',
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -31,5 +31,5 @@ import './ADInfeed-dff74bbe.js';
|
|
|
31
31
|
import './lodash-17fdfebb.js';
|
|
32
32
|
import './ADlgInfeed-7b29db85.js';
|
|
33
33
|
import './get-bc6cf9fb.js';
|
|
34
|
-
export { G as default } from './GridContent-
|
|
34
|
+
export { G as default } from './GridContent-7e11f013.js';
|
|
35
35
|
import './AuthorComponent-4f5f15ed.js';
|
|
@@ -139,15 +139,16 @@ var checkExternalUrl = function checkExternalUrl(url) {
|
|
|
139
139
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
140
140
|
};
|
|
141
141
|
|
|
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,
|
|
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, lgInfeedAd) {
|
|
143
143
|
var numberOfItemsBeforeAd = 6;
|
|
144
|
-
|
|
145
144
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
146
145
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
147
146
|
};
|
|
148
147
|
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
// Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
|
|
149
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
150
|
+
if (lgInfeedAd && brandInsightAd && window && window.innerWidth >= 1200) {
|
|
151
|
+
var lgInfeed = {
|
|
151
152
|
_type: 'lg-infeed',
|
|
152
153
|
adUnit: brandInsightAd.adUnit,
|
|
153
154
|
className: 'lg-infeed',
|
|
@@ -163,7 +164,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
163
164
|
var set = lodash.chunk(chunk, 2);
|
|
164
165
|
for (var i = 0; i < set.length; i++) {
|
|
165
166
|
if (i !== set.length - 1) {
|
|
166
|
-
set[i].push(
|
|
167
|
+
set[i].push(lgInfeed);
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
return lodash.flattenDeep(set);
|
|
@@ -172,7 +173,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
if (showBI && brandInsightAd) {
|
|
175
|
-
|
|
176
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1200px ).
|
|
177
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) brandInsightAd.interval = 8;
|
|
176
178
|
var pos = 0;
|
|
177
179
|
for (var i = 1; pos < data.length; i++) {
|
|
178
180
|
var inFeedAd = {
|
|
@@ -195,14 +197,17 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
195
197
|
}
|
|
196
198
|
data = data.map(function (ele, i) {
|
|
197
199
|
if (ele._type === 'lg-infeed') {
|
|
198
|
-
|
|
200
|
+
// Setting pos as top2 for the first occurence of large infeed ad
|
|
201
|
+
var _pos = data.indexOf(data.find(function (d) {
|
|
202
|
+
return d._type === 'lg-infeed';
|
|
203
|
+
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
204
|
+
return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: _pos }) });
|
|
199
205
|
} else {
|
|
200
206
|
return ele;
|
|
201
207
|
}
|
|
202
208
|
});
|
|
203
209
|
|
|
204
210
|
var featureCount = 0;
|
|
205
|
-
|
|
206
211
|
return React.createElement(
|
|
207
212
|
'div',
|
|
208
213
|
null,
|
|
@@ -638,16 +643,11 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
638
643
|
values = _useState10[0],
|
|
639
644
|
setValues = _useState10[1];
|
|
640
645
|
|
|
641
|
-
var _useState11 = useState(false),
|
|
642
|
-
_useState12 = _slicedToArray(_useState11, 2),
|
|
643
|
-
dektopView = _useState12[0],
|
|
644
|
-
setDesktopView = _useState12[1];
|
|
645
|
-
|
|
646
646
|
var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
|
|
647
647
|
|
|
648
648
|
var prevValues = usePrevious(values);
|
|
649
649
|
|
|
650
|
-
//check for change in filter parameters from client side and refresh the page
|
|
650
|
+
// check for change in filter parameters from client side and refresh the page
|
|
651
651
|
useEffect(function () {
|
|
652
652
|
if (initialData && data !== initialData && initialData.length >= 0) {
|
|
653
653
|
setData(initialData);
|
|
@@ -664,9 +664,6 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
664
664
|
}, [initialData]);
|
|
665
665
|
|
|
666
666
|
useEffect(function () {
|
|
667
|
-
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
668
|
-
setDesktopView(true);
|
|
669
|
-
}
|
|
670
667
|
if (prevValues) {
|
|
671
668
|
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
|
|
672
669
|
loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
|
|
@@ -703,7 +700,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
703
700
|
React.createElement(
|
|
704
701
|
Container,
|
|
705
702
|
null,
|
|
706
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
703
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
707
704
|
)
|
|
708
705
|
),
|
|
709
706
|
React.createElement(
|
|
@@ -717,7 +714,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
717
714
|
React.createElement(
|
|
718
715
|
Container,
|
|
719
716
|
null,
|
|
720
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent,
|
|
717
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, lgInfeedAd)
|
|
721
718
|
),
|
|
722
719
|
React.createElement(
|
|
723
720
|
'div',
|
package/dist/esm/index.js
CHANGED
|
@@ -33,7 +33,7 @@ export { default as DeckContent } from './DeckContent.js';
|
|
|
33
33
|
import './lodash-17fdfebb.js';
|
|
34
34
|
import './ADlgInfeed-7b29db85.js';
|
|
35
35
|
import { i as isFunction_1, a as isArray_1, _ as _arrayMap } from './get-bc6cf9fb.js';
|
|
36
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
36
|
+
export { A as AD, G as GridContent } from './GridContent-7e11f013.js';
|
|
37
37
|
import { A as AuthorComponent } from './AuthorComponent-4f5f15ed.js';
|
|
38
38
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
39
39
|
import 'react-bootstrap/Media';
|
|
@@ -15004,6 +15004,11 @@ var PublicationLanding = function PublicationLanding(props) {
|
|
|
15004
15004
|
return React.createElement(
|
|
15005
15005
|
'div',
|
|
15006
15006
|
{ id: 'publicationLanding' },
|
|
15007
|
+
React.createElement(
|
|
15008
|
+
'style',
|
|
15009
|
+
{ jsx: true },
|
|
15010
|
+
'\n #pubYearFilter .dropdown-menu.show {\n max-height: 25vh;\n }\n '
|
|
15011
|
+
),
|
|
15007
15012
|
React.createElement(
|
|
15008
15013
|
Row,
|
|
15009
15014
|
{ style: { marginBottom: '1rem' } },
|
|
@@ -17291,10 +17296,10 @@ var Article = function Article(props) {
|
|
|
17291
17296
|
contextualAD: _extends$2({}, payload.contextualAD, {
|
|
17292
17297
|
slotId: (payload.contextualAD.slotId || 'contextual_ad') + '-' + payload._id,
|
|
17293
17298
|
className: 'ADFluid',
|
|
17294
|
-
// Adding new ad size for large contextual ad for desktop
|
|
17299
|
+
// Adding new ad size for large contextual ad for desktop screen width >= 1400
|
|
17295
17300
|
sizes: lgContextAd ? [[728, 90], 'fluid', [300, 100]] : ['fluid', [300, 100]],
|
|
17296
17301
|
sizeMapping: lgContextAd ? [{
|
|
17297
|
-
viewport: [
|
|
17302
|
+
viewport: [1400, 0],
|
|
17298
17303
|
sizes: [[728, 90], 'fluid', [300, 100]]
|
|
17299
17304
|
}, { viewport: [0, 0], sizes: ['fluid', [300, 100]] }] : ['fluid', [300, 100]]
|
|
17300
17305
|
})
|