@mjhls/mjh-framework 1.0.436 → 1.0.437
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/ADlgInfeed-be0e0bde.js +48 -0
- package/dist/cjs/{GridContent-f401c40f.js → GridContent-068c0b1c.js} +75 -20
- package/dist/cjs/GridContent.js +3 -1
- package/dist/cjs/{Normal-54dd4121.js → Normal-62915103.js} +0 -1
- package/dist/cjs/PublicationDeck.js +4 -17096
- package/dist/cjs/QueueDeckExpanded.js +53 -6
- package/dist/cjs/TemplateNormal.js +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/lodash-fc2922d0.js +17098 -0
- package/dist/esm/ADlgInfeed-51a2801a.js +43 -0
- package/dist/esm/{GridContent-e3224519.js → GridContent-90c0f8b5.js} +75 -20
- package/dist/esm/GridContent.js +3 -1
- package/dist/esm/{Normal-0095df68.js → Normal-6eba8168.js} +0 -1
- package/dist/esm/PublicationDeck.js +2 -17094
- package/dist/esm/QueueDeckExpanded.js +53 -6
- package/dist/esm/TemplateNormal.js +1 -1
- package/dist/esm/index.js +5 -3
- package/dist/esm/lodash-17fdfebb.js +17096 -0
- package/package.json +1 -1
|
@@ -23,6 +23,8 @@ import { _ as _slicedToArray } from './slicedToArray-04e02710.js';
|
|
|
23
23
|
import './AdSlot-78e48a2c.js';
|
|
24
24
|
import './promise-2592a80a.js';
|
|
25
25
|
import { A as ADInfeed } from './ADInfeed-e5cefea5.js';
|
|
26
|
+
import { l as lodash } from './lodash-17fdfebb.js';
|
|
27
|
+
import { A as ADlgInfeed } from './ADlgInfeed-51a2801a.js';
|
|
26
28
|
import { A as AuthorComponent } from './AuthorComponent-c9e46673.js';
|
|
27
29
|
import { Container, Media } from 'react-bootstrap';
|
|
28
30
|
|
|
@@ -137,13 +139,40 @@ var checkExternalUrl = function checkExternalUrl(url) {
|
|
|
137
139
|
return new RegExp(['http', 'https'].join('|')).test(url);
|
|
138
140
|
};
|
|
139
141
|
|
|
140
|
-
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, dektopView) {
|
|
141
143
|
var numberOfItemsBeforeAd = 6;
|
|
142
144
|
|
|
143
145
|
var insertBrandInsightAd = function insertBrandInsightAd(arr, index, newElement) {
|
|
144
146
|
return [].concat(_toConsumableArray(arr.slice(0, index)), [newElement], _toConsumableArray(arr.slice(index)));
|
|
145
147
|
};
|
|
148
|
+
|
|
149
|
+
if (dektopView && brandInsightAd) {
|
|
150
|
+
var lgInfeedAd = {
|
|
151
|
+
_type: 'lg-infeed',
|
|
152
|
+
adUnit: brandInsightAd.adUnit,
|
|
153
|
+
className: 'lg-infeed',
|
|
154
|
+
networkID: brandInsightAd.networkID,
|
|
155
|
+
sizes: [728, 90],
|
|
156
|
+
targeting: {
|
|
157
|
+
content_placement: brandInsightAd.targeting.content_placement,
|
|
158
|
+
document_url: brandInsightAd.targeting.document_url
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var chunks = lodash.chunk(data, 6).map(function (chunk) {
|
|
163
|
+
var set = lodash.chunk(chunk, 2);
|
|
164
|
+
for (var i = 0; i < set.length; i++) {
|
|
165
|
+
if (i !== set.length - 1) {
|
|
166
|
+
set[i].push(lgInfeedAd);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
return lodash.flattenDeep(set);
|
|
170
|
+
});
|
|
171
|
+
data = lodash.flatten(chunks);
|
|
172
|
+
}
|
|
173
|
+
|
|
146
174
|
if (showBI && brandInsightAd) {
|
|
175
|
+
if (dektopView) brandInsightAd.interval = 8;
|
|
147
176
|
var pos = 0;
|
|
148
177
|
for (var i = 1; pos < data.length; i++) {
|
|
149
178
|
var inFeedAd = {
|
|
@@ -164,6 +193,13 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
164
193
|
pos += brandInsightAd.interval + 1;
|
|
165
194
|
}
|
|
166
195
|
}
|
|
196
|
+
data = data.map(function (ele, i) {
|
|
197
|
+
if (ele._type === 'lg-infeed') {
|
|
198
|
+
return _extends({}, ele, { slotId: 'lg-infeed_' + i, targeting: _extends({}, ele.targeting, { pos: 'lg-infeed_' + i }) });
|
|
199
|
+
} else {
|
|
200
|
+
return ele;
|
|
201
|
+
}
|
|
202
|
+
});
|
|
167
203
|
|
|
168
204
|
var featureCount = 0;
|
|
169
205
|
|
|
@@ -369,6 +405,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
369
405
|
)
|
|
370
406
|
);
|
|
371
407
|
}
|
|
408
|
+
} else if (article._type === 'lg-infeed' && article.adUnit) {
|
|
409
|
+
return React__default.createElement(ADlgInfeed, _extends({ index: index }, article));
|
|
372
410
|
} else if (article._type === 'brandInsightAd' && article.adUnit) {
|
|
373
411
|
return React__default.createElement(ADInfeed, { index: index, infeedAd: article });
|
|
374
412
|
}
|
|
@@ -376,7 +414,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
376
414
|
return renderMobileAd(index, numberOfItemsBeforeAd, rightItems);
|
|
377
415
|
}
|
|
378
416
|
|
|
379
|
-
if (brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) {
|
|
417
|
+
if ((brandInsightAd ? index > heroContent + featureCount : index + 1 > heroContent + featureCount) && article._type && !['lg-infeed', 'brandInsightAd'].includes(article._type)) {
|
|
380
418
|
return React__default.createElement(
|
|
381
419
|
VisibilitySensor,
|
|
382
420
|
{
|
|
@@ -552,7 +590,9 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
552
590
|
_props$showBI = props.showBI,
|
|
553
591
|
showBI = _props$showBI === undefined ? false : _props$showBI,
|
|
554
592
|
_props$heroContent = props.heroContent,
|
|
555
|
-
heroContent = _props$heroContent === undefined ? 0 : _props$heroContent
|
|
593
|
+
heroContent = _props$heroContent === undefined ? 0 : _props$heroContent,
|
|
594
|
+
_props$lgInfeedAd = props.lgInfeedAd,
|
|
595
|
+
lgInfeedAd = _props$lgInfeedAd === undefined ? false : _props$lgInfeedAd;
|
|
556
596
|
var initialCurrentPage = props.currentPage,
|
|
557
597
|
showPublished = props.showPublished;
|
|
558
598
|
|
|
@@ -586,11 +626,18 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
586
626
|
values = _useState10[0],
|
|
587
627
|
setValues = _useState10[1];
|
|
588
628
|
|
|
629
|
+
var _useState11 = useState(false),
|
|
630
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
631
|
+
dektopView = _useState12[0],
|
|
632
|
+
setDesktopView = _useState12[1];
|
|
633
|
+
|
|
589
634
|
var itemsPerPage = params && params.itemsPerPage ? params.itemsPerPage : 10;
|
|
590
635
|
|
|
591
636
|
var prevValues = usePrevious(values);
|
|
592
|
-
|
|
593
637
|
useEffect(function () {
|
|
638
|
+
if (lgInfeedAd && window && window.innerWidth >= 1200) {
|
|
639
|
+
setDesktopView(true);
|
|
640
|
+
}
|
|
594
641
|
if (prevValues) {
|
|
595
642
|
if (values.page !== prevValues.page && values.from !== prevValues.from && values.to !== prevValues.from) {
|
|
596
643
|
loadData(values, query, client, params, setData, setScrolling, pointer, pointerArray);
|
|
@@ -627,7 +674,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
627
674
|
React__default.createElement(
|
|
628
675
|
Container,
|
|
629
676
|
null,
|
|
630
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent)
|
|
677
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, imageHeight, imageWidth, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, dektopView)
|
|
631
678
|
)
|
|
632
679
|
),
|
|
633
680
|
React__default.createElement(
|
|
@@ -641,7 +688,7 @@ var QueueDeckExpanded = function QueueDeckExpanded(props) {
|
|
|
641
688
|
React__default.createElement(
|
|
642
689
|
Container,
|
|
643
690
|
null,
|
|
644
|
-
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent)
|
|
691
|
+
cardLoader(data, builder, mapping, values, seoPaginate, pageview, router, currentPage, setCurrentPage, showPublished, defaultImage, showAuthor, showCategory, rightItems, brandInsightAd, showBI, itemsPerPage, heroContent, dektopView)
|
|
645
692
|
),
|
|
646
693
|
React__default.createElement(
|
|
647
694
|
'div',
|
|
@@ -19,7 +19,7 @@ import './react-social-icons-a7d5c5c7.js';
|
|
|
19
19
|
import 'react-bootstrap';
|
|
20
20
|
import './index.esm-536609db.js';
|
|
21
21
|
import 'react-bootstrap/Button';
|
|
22
|
-
export { T as default } from './Normal-
|
|
22
|
+
export { T as default } from './Normal-6eba8168.js';
|
|
23
23
|
import 'react-bootstrap/ListGroup';
|
|
24
24
|
import 'next/head';
|
|
25
25
|
import 'react-bootstrap/Nav';
|
package/dist/esm/index.js
CHANGED
|
@@ -30,8 +30,10 @@ export { D as AdSlot, B as Beam } from './AdSlot-78e48a2c.js';
|
|
|
30
30
|
import { _ as _anInstance, a as _forOf, b as _redefineAll, c as _setSpecies } from './promise-2592a80a.js';
|
|
31
31
|
import './ADInfeed-e5cefea5.js';
|
|
32
32
|
export { default as DeckContent } from './DeckContent.js';
|
|
33
|
+
import './lodash-17fdfebb.js';
|
|
34
|
+
import './ADlgInfeed-51a2801a.js';
|
|
33
35
|
import { i as isFunction_1, a as isArray_1, _ as _arrayMap } from './get-53653403.js';
|
|
34
|
-
export { A as AD, G as GridContent } from './GridContent-
|
|
36
|
+
export { A as AD, G as GridContent } from './GridContent-90c0f8b5.js';
|
|
35
37
|
import { A as AuthorComponent } from './AuthorComponent-c9e46673.js';
|
|
36
38
|
export { default as DeckQueue } from './DeckQueue.js';
|
|
37
39
|
import 'react-bootstrap/Media';
|
|
@@ -55,8 +57,8 @@ export { default as IssueDeck } from './IssueDeck.js';
|
|
|
55
57
|
import 'react-bootstrap/Badge';
|
|
56
58
|
export { default as IssueContentDeck } from './IssueContentDeck.js';
|
|
57
59
|
import Spinner from 'react-bootstrap/Spinner';
|
|
58
|
-
import { M as MdPictureAsPdf } from './Normal-
|
|
59
|
-
export { A as AD728x90, g as ADSponsoredResources, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, h as SideFooter, T as TemplateNormal } from './Normal-
|
|
60
|
+
import { M as MdPictureAsPdf } from './Normal-6eba8168.js';
|
|
61
|
+
export { A as AD728x90, g as ADSponsoredResources, C as Column1, a as Column2, b as Column3, f as HamMagazine, H as Header, L as LeftNav, e as NavDvm, c as NavMagazine, N as NavNative, d as NavNormal, P as PageFilter, S as Search, h as SideFooter, T as TemplateNormal } from './Normal-6eba8168.js';
|
|
60
62
|
import 'react-bootstrap/ListGroup';
|
|
61
63
|
import Head from 'next/head';
|
|
62
64
|
import Accordion from 'react-bootstrap/Accordion';
|