@mjhls/mjh-framework 1.0.591 → 1.0.593
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.js +6 -8
- package/dist/esm/GridContent.js +6 -8
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/GridContent.js
CHANGED
|
@@ -389,7 +389,7 @@ var GridContent = function (_React$Component) {
|
|
|
389
389
|
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
390
390
|
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
391
391
|
brandInsight.interval = 8;
|
|
392
|
-
} else {
|
|
392
|
+
} else if (typeof window !== 'undefined' && window.innerWidth < 1400) {
|
|
393
393
|
brandInsight.interval = 5;
|
|
394
394
|
posts = data;
|
|
395
395
|
}
|
|
@@ -403,11 +403,11 @@ var GridContent = function (_React$Component) {
|
|
|
403
403
|
sizes: brandInsight.sizes,
|
|
404
404
|
slotId: brandInsight.slotId + '_' + i,
|
|
405
405
|
targeting: {
|
|
406
|
-
pos: '
|
|
406
|
+
pos: 'infeed',
|
|
407
407
|
content_placement: brandInsight.targeting.content_placement,
|
|
408
408
|
document_url: brandInsight.targeting.document_url
|
|
409
409
|
},
|
|
410
|
-
_type: '
|
|
410
|
+
_type: 'brandInsightAd'
|
|
411
411
|
};
|
|
412
412
|
|
|
413
413
|
posts = insert(posts, pos, inFeedAd);
|
|
@@ -426,10 +426,8 @@ var GridContent = function (_React$Component) {
|
|
|
426
426
|
posts = posts.map(function (ele, i) {
|
|
427
427
|
if (ele._type === 'lg-infeed') {
|
|
428
428
|
// Setting pos as top2 for the first occurence of large infeed ad
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
432
|
-
return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: _pos }) });
|
|
429
|
+
// const pos = posts.indexOf(posts.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
|
|
430
|
+
return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: 'lg-infeed' }) });
|
|
433
431
|
} else if (ele._type === 'article') {
|
|
434
432
|
// incrementing 'articleCount' for each article.
|
|
435
433
|
++articleCount;
|
|
@@ -582,7 +580,7 @@ var GridContent = function (_React$Component) {
|
|
|
582
580
|
}
|
|
583
581
|
} else if (row._type === 'lg-infeed' && row.adUnit) {
|
|
584
582
|
return React__default.createElement(ADlgInfeed.ADlgInfeed, _extends._extends({ index: index }, row));
|
|
585
|
-
} else if (row._type === '
|
|
583
|
+
} else if (row._type === 'brandInsightAd' && row.adUnit) {
|
|
586
584
|
return React__default.createElement(ADInfeed.ADInfeed, { index: index, infeedAd: row });
|
|
587
585
|
}
|
|
588
586
|
if (index + 1 > heroContent + featureCount && (!row._type || !['lg-infeed', 'brandInsightAd'].includes(row._type))) {
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -383,7 +383,7 @@ var GridContent = function (_React$Component) {
|
|
|
383
383
|
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
384
384
|
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
385
385
|
brandInsight.interval = 8;
|
|
386
|
-
} else {
|
|
386
|
+
} else if (typeof window !== 'undefined' && window.innerWidth < 1400) {
|
|
387
387
|
brandInsight.interval = 5;
|
|
388
388
|
posts = data;
|
|
389
389
|
}
|
|
@@ -397,11 +397,11 @@ var GridContent = function (_React$Component) {
|
|
|
397
397
|
sizes: brandInsight.sizes,
|
|
398
398
|
slotId: brandInsight.slotId + '_' + i,
|
|
399
399
|
targeting: {
|
|
400
|
-
pos: '
|
|
400
|
+
pos: 'infeed',
|
|
401
401
|
content_placement: brandInsight.targeting.content_placement,
|
|
402
402
|
document_url: brandInsight.targeting.document_url
|
|
403
403
|
},
|
|
404
|
-
_type: '
|
|
404
|
+
_type: 'brandInsightAd'
|
|
405
405
|
};
|
|
406
406
|
|
|
407
407
|
posts = insert(posts, pos, inFeedAd);
|
|
@@ -420,10 +420,8 @@ var GridContent = function (_React$Component) {
|
|
|
420
420
|
posts = posts.map(function (ele, i) {
|
|
421
421
|
if (ele._type === 'lg-infeed') {
|
|
422
422
|
// Setting pos as top2 for the first occurence of large infeed ad
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
})) === i ? 'top2' : 'lg-infeed_' + i;
|
|
426
|
-
return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: _pos }) });
|
|
423
|
+
// const pos = posts.indexOf(posts.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
|
|
424
|
+
return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: 'lg-infeed' }) });
|
|
427
425
|
} else if (ele._type === 'article') {
|
|
428
426
|
// incrementing 'articleCount' for each article.
|
|
429
427
|
++articleCount;
|
|
@@ -576,7 +574,7 @@ var GridContent = function (_React$Component) {
|
|
|
576
574
|
}
|
|
577
575
|
} else if (row._type === 'lg-infeed' && row.adUnit) {
|
|
578
576
|
return React__default.createElement(ADlgInfeed, _extends({ index: index }, row));
|
|
579
|
-
} else if (row._type === '
|
|
577
|
+
} else if (row._type === 'brandInsightAd' && row.adUnit) {
|
|
580
578
|
return React__default.createElement(ADInfeed, { index: index, infeedAd: row });
|
|
581
579
|
}
|
|
582
580
|
if (index + 1 > heroContent + featureCount && (!row._type || !['lg-infeed', 'brandInsightAd'].includes(row._type))) {
|