@mjhls/mjh-framework 1.0.564 → 1.0.566

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 CHANGED
@@ -1,5 +1,5 @@
1
1
 
2
- # mjh-framework v. 1.0.564
2
+ # mjh-framework v. 1.0.566
3
3
 
4
4
  > Foundation Framework
5
5
 
@@ -269,7 +269,7 @@ var MasterDeck = function (_React$Component) {
269
269
  sizes: brandInsightAd.sizes,
270
270
  slotId: brandInsightAd.slotId + '_' + i,
271
271
  targeting: {
272
- pos: 'article' + i,
272
+ pos: 'infeed',
273
273
  content_placement: brandInsightAd.targeting.content_placement,
274
274
  document_url: brandInsightAd.targeting.document_url
275
275
  },
@@ -285,10 +285,8 @@ var MasterDeck = function (_React$Component) {
285
285
  data = data.map(function (ele, i) {
286
286
  if (ele._type === 'lg-infeed') {
287
287
  // Setting pos as top2 for the first occurence of large infeed ad
288
- var _pos = data.indexOf(data.find(function (d) {
289
- return d._type === 'lg-infeed';
290
- })) === i ? 'top2' : 'lg-infeed_' + i;
291
- return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: _pos }) });
288
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
289
+ return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: 'lg-infeed' }) });
292
290
  } else {
293
291
  return ele;
294
292
  }
@@ -217,7 +217,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
217
217
  sizes: brandInsightAd.sizes,
218
218
  slotId: brandInsightAd.slotId + '_' + i,
219
219
  targeting: {
220
- pos: 'article' + i,
220
+ pos: 'infeed',
221
221
  content_placement: brandInsightAd.targeting.content_placement,
222
222
  document_url: brandInsightAd.targeting.document_url
223
223
  },
@@ -236,10 +236,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
236
236
  data = data.map(function (ele, i) {
237
237
  if (ele._type === 'lg-infeed') {
238
238
  // Setting pos as top2 for the first occurence of large infeed ad
239
- var _pos = data.indexOf(data.find(function (d) {
240
- return d._type === 'lg-infeed';
241
- })) === i ? 'top2' : 'lg-infeed_' + i;
242
- return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: _pos }) });
239
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
240
+ return _extends._extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends._extends({}, ele.targeting, { pos: 'lg-infeed' }) });
243
241
  } else if (ele._type === 'article') {
244
242
  // incrementing 'articleCount' for each article.
245
243
  ++articleCount;
package/dist/cjs/View.js CHANGED
@@ -825,7 +825,7 @@ var Article = function Article(props) {
825
825
  React__default.createElement(
826
826
  'div',
827
827
  { className: 'ad-box', style: { textAlign: 'center' } },
828
- main.main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
828
+ main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
829
829
  if (index === 0) {
830
830
  return React__default.createElement(
831
831
  'div',
@@ -880,7 +880,7 @@ var Article = function Article(props) {
880
880
  renderIsiContent(props.article)
881
881
  )
882
882
  ),
883
- main.main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
883
+ main.main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
884
884
  if (index > 0) {
885
885
  return React__default.createElement(
886
886
  'div',
@@ -263,7 +263,7 @@ var MasterDeck = function (_React$Component) {
263
263
  sizes: brandInsightAd.sizes,
264
264
  slotId: brandInsightAd.slotId + '_' + i,
265
265
  targeting: {
266
- pos: 'article' + i,
266
+ pos: 'infeed',
267
267
  content_placement: brandInsightAd.targeting.content_placement,
268
268
  document_url: brandInsightAd.targeting.document_url
269
269
  },
@@ -279,10 +279,8 @@ var MasterDeck = function (_React$Component) {
279
279
  data = data.map(function (ele, i) {
280
280
  if (ele._type === 'lg-infeed') {
281
281
  // Setting pos as top2 for the first occurence of large infeed ad
282
- var _pos = data.indexOf(data.find(function (d) {
283
- return d._type === 'lg-infeed';
284
- })) === i ? 'top2' : 'lg-infeed_' + i;
285
- return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: _pos }) });
282
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
283
+ return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: 'lg-infeed' }) });
286
284
  } else {
287
285
  return ele;
288
286
  }
@@ -211,7 +211,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
211
211
  sizes: brandInsightAd.sizes,
212
212
  slotId: brandInsightAd.slotId + '_' + i,
213
213
  targeting: {
214
- pos: 'article' + i,
214
+ pos: 'infeed',
215
215
  content_placement: brandInsightAd.targeting.content_placement,
216
216
  document_url: brandInsightAd.targeting.document_url
217
217
  },
@@ -230,10 +230,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
230
230
  data = data.map(function (ele, i) {
231
231
  if (ele._type === 'lg-infeed') {
232
232
  // Setting pos as top2 for the first occurence of large infeed ad
233
- var _pos = data.indexOf(data.find(function (d) {
234
- return d._type === 'lg-infeed';
235
- })) === i ? 'top2' : 'lg-infeed_' + i;
236
- return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: _pos }) });
233
+ // const pos = data.indexOf(data.find((d) => d._type === 'lg-infeed')) === i ? 'top2' : `lg-infeed_${i}`
234
+ return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: 'lg-infeed' }) });
237
235
  } else if (ele._type === 'article') {
238
236
  // incrementing 'articleCount' for each article.
239
237
  ++articleCount;
package/dist/esm/View.js CHANGED
@@ -819,7 +819,7 @@ var Article = function Article(props) {
819
819
  React__default.createElement(
820
820
  'div',
821
821
  { className: 'ad-box', style: { textAlign: 'center' } },
822
- main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
822
+ main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
823
823
  if (index === 0) {
824
824
  return React__default.createElement(
825
825
  'div',
@@ -874,7 +874,7 @@ var Article = function Article(props) {
874
874
  renderIsiContent(props.article)
875
875
  )
876
876
  ),
877
- main_39 && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
877
+ main_39 && !sponsoredFlag && props.article.Ads && props.article.Ads.length > 0 && props.article.Ads.map(function (ad, index) {
878
878
  if (index > 0) {
879
879
  return React__default.createElement(
880
880
  'div',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.564",
3
+ "version": "1.0.566",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",