@mjhls/mjh-framework 1.0.457 → 1.0.459
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 -2
- package/dist/cjs/ArticleQueue.js +13 -2
- package/dist/cjs/GridContent.js +9 -4
- package/dist/cjs/QueueDeckExpanded.js +10 -5
- package/dist/cjs/View.js +8 -1
- package/dist/cjs/getKeywords.js +19 -4
- package/dist/cjs/index.js +2 -2
- package/dist/esm/ArticleQueue.js +13 -2
- package/dist/esm/GridContent.js +9 -4
- package/dist/esm/QueueDeckExpanded.js +10 -5
- package/dist/esm/View.js +8 -1
- package/dist/esm/getKeywords.js +19 -4
- package/dist/esm/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/cjs/ArticleQueue.js
CHANGED
|
@@ -55,6 +55,7 @@ var getSerializers = require('./getSerializers.js');
|
|
|
55
55
|
require('./util-f2c1b65b.js');
|
|
56
56
|
require('react-bootstrap/Pagination');
|
|
57
57
|
require('next/dynamic');
|
|
58
|
+
var getKeywords = require('./getKeywords.js');
|
|
58
59
|
|
|
59
60
|
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
60
61
|
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
@@ -140,6 +141,10 @@ var Article = function Article(props) {
|
|
|
140
141
|
var url = _props$article$url.current,
|
|
141
142
|
issue = _props$article.issue,
|
|
142
143
|
source = _props$article.source,
|
|
144
|
+
internalTag = _props$article.internalTag,
|
|
145
|
+
seoTag = _props$article.seoTag,
|
|
146
|
+
sponsoredTag = _props$article.sponsoredTag,
|
|
147
|
+
userDefinedTag = _props$article.userDefinedTag,
|
|
143
148
|
regionalPages = props.regionalPages,
|
|
144
149
|
nationalPage = props.nationalPage,
|
|
145
150
|
ISIContent = props.ISIContent,
|
|
@@ -436,6 +441,7 @@ var Article = function Article(props) {
|
|
|
436
441
|
var shareSummary = summary;
|
|
437
442
|
var shareImage = thumbnail && thumbnail.asset ? urlFor(thumbnail.asset).url() : shareImageDefault;
|
|
438
443
|
var siteName = props.website.title;
|
|
444
|
+
var shareKeywords = getKeywords(props.article).join(',');
|
|
439
445
|
|
|
440
446
|
var meta = {
|
|
441
447
|
shareTitle: shareTitle,
|
|
@@ -443,7 +449,8 @@ var Article = function Article(props) {
|
|
|
443
449
|
shareSummary: shareSummary,
|
|
444
450
|
shareUrl: shareUrl,
|
|
445
451
|
shareImage: shareImage,
|
|
446
|
-
shareVia: props.Settings.title
|
|
452
|
+
shareVia: props.Settings.title,
|
|
453
|
+
shareKeywords: shareKeywords
|
|
447
454
|
};
|
|
448
455
|
return React__default.createElement(
|
|
449
456
|
React__default.Fragment,
|
|
@@ -471,6 +478,7 @@ var Article = function Article(props) {
|
|
|
471
478
|
'' + shareTitle
|
|
472
479
|
),
|
|
473
480
|
React__default.createElement('meta', { name: 'description', key: 'description', content: shareSummary }),
|
|
481
|
+
React__default.createElement('meta', { name: 'keywords', key: 'keywords', content: shareKeywords }),
|
|
474
482
|
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
475
483
|
React__default.createElement('meta', { property: 'og:url', content: shareUrl, key: 'og:url' }),
|
|
476
484
|
React__default.createElement('meta', { property: 'og:title', content: shareTitle, key: 'og:title' }),
|
|
@@ -481,7 +489,8 @@ var Article = function Article(props) {
|
|
|
481
489
|
React__default.createElement('meta', { name: 'twitter:title', content: shareTitle, key: 'twitter:title' }),
|
|
482
490
|
React__default.createElement('meta', { name: 'twitter:image', content: shareImage, key: 'twitter:image' }),
|
|
483
491
|
React__default.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
484
|
-
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'twitter:description' })
|
|
492
|
+
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'twitter:description' }),
|
|
493
|
+
React__default.createElement('link', { rel: 'canonical', href: shareUrl, key: 'canonical' })
|
|
485
494
|
),
|
|
486
495
|
React__default.createElement(
|
|
487
496
|
'h1',
|
|
@@ -802,6 +811,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
802
811
|
var changeMeta = function changeMeta(meta) {
|
|
803
812
|
document.title = meta.shareTitle;
|
|
804
813
|
document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
|
|
814
|
+
document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
|
|
805
815
|
document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
|
|
806
816
|
document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
|
|
807
817
|
document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
|
|
@@ -810,6 +820,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
810
820
|
document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
|
|
811
821
|
document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
|
|
812
822
|
document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
|
|
823
|
+
document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
|
|
813
824
|
};
|
|
814
825
|
|
|
815
826
|
var onChangeArticle = function onChangeArticle(path, visibility, meta) {
|
package/dist/cjs/GridContent.js
CHANGED
|
@@ -356,14 +356,19 @@ var GridContent = function (_React$Component) {
|
|
|
356
356
|
var data = this.state.data.slice(3);
|
|
357
357
|
|
|
358
358
|
// Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
|
|
359
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
360
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
359
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
360
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
361
361
|
var lgInFeedAd = {
|
|
362
362
|
_type: 'lg-infeed',
|
|
363
363
|
adUnit: brandInsight.adUnit,
|
|
364
364
|
className: 'lg-infeed',
|
|
365
365
|
networkID: brandInsight.networkID,
|
|
366
366
|
sizes: [728, 90],
|
|
367
|
+
// Adding sizeMapping for showing ad above 1400px
|
|
368
|
+
sizeMapping: [{
|
|
369
|
+
viewport: [1400, 0],
|
|
370
|
+
sizes: [[728, 90]]
|
|
371
|
+
}, { viewport: [0, 0], sizes: [] }],
|
|
367
372
|
targeting: {
|
|
368
373
|
content_placement: brandInsight.targeting.content_placement,
|
|
369
374
|
document_url: brandInsight.targeting.document_url
|
|
@@ -383,8 +388,8 @@ var GridContent = function (_React$Component) {
|
|
|
383
388
|
}
|
|
384
389
|
|
|
385
390
|
if (showBI) {
|
|
386
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
387
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
391
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
392
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
388
393
|
brandInsight.interval = 8;
|
|
389
394
|
} else {
|
|
390
395
|
brandInsight.interval = 5;
|
|
@@ -161,14 +161,19 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
161
161
|
};
|
|
162
162
|
|
|
163
163
|
// Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
|
|
164
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
165
|
-
if (lgInfeedAd && brandInsightAd && window && window.innerWidth >=
|
|
164
|
+
// Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
165
|
+
if (lgInfeedAd && brandInsightAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
166
166
|
var lgInfeed = {
|
|
167
167
|
_type: 'lg-infeed',
|
|
168
168
|
adUnit: brandInsightAd.adUnit,
|
|
169
169
|
className: 'lg-infeed',
|
|
170
170
|
networkID: brandInsightAd.networkID,
|
|
171
171
|
sizes: [728, 90],
|
|
172
|
+
// Adding sizeMapping for showing ad above 1400px
|
|
173
|
+
sizeMapping: [{
|
|
174
|
+
viewport: [1400, 0],
|
|
175
|
+
sizes: [[728, 90]]
|
|
176
|
+
}, { viewport: [0, 0], sizes: [] }],
|
|
172
177
|
targeting: {
|
|
173
178
|
content_placement: brandInsightAd.targeting.content_placement,
|
|
174
179
|
document_url: brandInsightAd.targeting.document_url
|
|
@@ -188,8 +193,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
188
193
|
}
|
|
189
194
|
|
|
190
195
|
if (showBI && brandInsightAd) {
|
|
191
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
192
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
196
|
+
// Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
197
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) brandInsightAd.interval = 8;
|
|
193
198
|
var pos = 0;
|
|
194
199
|
for (var i = 1; pos < data.length; i++) {
|
|
195
200
|
var inFeedAd = {
|
|
@@ -564,7 +569,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
564
569
|
React__default.createElement(
|
|
565
570
|
'style',
|
|
566
571
|
{ jsx: 'true' },
|
|
567
|
-
'\n .displayLabelThumb{\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
572
|
+
'\n .displayLabelThumb {\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
568
573
|
)
|
|
569
574
|
);
|
|
570
575
|
};
|
package/dist/cjs/View.js
CHANGED
|
@@ -57,6 +57,7 @@ var getSerializers = require('./getSerializers.js');
|
|
|
57
57
|
require('./util-f2c1b65b.js');
|
|
58
58
|
require('react-bootstrap/Pagination');
|
|
59
59
|
require('next/dynamic');
|
|
60
|
+
var getKeywords = require('./getKeywords.js');
|
|
60
61
|
var getTargeting = require('./getTargeting-3ced038f.js');
|
|
61
62
|
var urlFor = require('./urlFor.js');
|
|
62
63
|
|
|
@@ -593,6 +594,7 @@ var Article = function Article(props) {
|
|
|
593
594
|
var shareSummary = article.summary;
|
|
594
595
|
var shareImage = thumbnail && thumbnail.asset ? urlFor(props.client, thumbnail.asset).url() : shareImageDefault;
|
|
595
596
|
var siteName = props.website && props.website.title ? props.website.title : '';
|
|
597
|
+
var shareKeywords = getKeywords(props.article).join(',');
|
|
596
598
|
|
|
597
599
|
var meta = {
|
|
598
600
|
shareTitle: shareTitle,
|
|
@@ -600,7 +602,8 @@ var Article = function Article(props) {
|
|
|
600
602
|
shareSummary: shareSummary,
|
|
601
603
|
shareUrl: shareUrl,
|
|
602
604
|
shareImage: shareImage,
|
|
603
|
-
shareVia: props.Settings.title
|
|
605
|
+
shareVia: props.Settings.title,
|
|
606
|
+
shareKeywords: shareKeywords
|
|
604
607
|
};
|
|
605
608
|
if (!props.infiniteScroll) {
|
|
606
609
|
onChangeArticle = function onChangeArticle() {
|
|
@@ -969,6 +972,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
969
972
|
var changeMeta = function changeMeta(meta) {
|
|
970
973
|
document.title = meta.shareTitle;
|
|
971
974
|
document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
|
|
975
|
+
document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
|
|
972
976
|
document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
|
|
973
977
|
document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
|
|
974
978
|
document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
|
|
@@ -977,6 +981,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
977
981
|
document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
|
|
978
982
|
document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
|
|
979
983
|
document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
|
|
984
|
+
document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
|
|
980
985
|
};
|
|
981
986
|
|
|
982
987
|
var onChangeArticle = function onChangeArticle(path, visibility, meta) {
|
|
@@ -1139,6 +1144,7 @@ var View = function View(props) {
|
|
|
1139
1144
|
article.title + ' | ' + props.cache.siteSettingCache.name
|
|
1140
1145
|
),
|
|
1141
1146
|
React__default.createElement('meta', { name: 'description', key: 'description', content: shareOptions.shareSummary }),
|
|
1147
|
+
React__default.createElement('meta', { name: 'keywords', content: getKeywords(article).join(','), key: 'keywords' }),
|
|
1142
1148
|
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
1143
1149
|
React__default.createElement('meta', { property: 'og:url', content: shareOptions.shareUrl, key: 'og:url' }),
|
|
1144
1150
|
React__default.createElement('meta', { property: 'og:title', content: shareOptions.shareTitle, key: 'og:title' }),
|
|
@@ -1150,6 +1156,7 @@ var View = function View(props) {
|
|
|
1150
1156
|
React__default.createElement('meta', { name: 'twitter:image', content: shareOptions.shareImage, key: 'twitter:image' }),
|
|
1151
1157
|
React__default.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
1152
1158
|
React__default.createElement('meta', { name: 'twitter:description', content: shareOptions.shareSummary, key: 'twitter:description' }),
|
|
1159
|
+
React__default.createElement('link', { rel: 'canonical', href: shareOptions.shareUrl, key: 'canonical' }),
|
|
1153
1160
|
React__default.createElement(
|
|
1154
1161
|
'noscript',
|
|
1155
1162
|
null,
|
package/dist/cjs/getKeywords.js
CHANGED
|
@@ -4,24 +4,39 @@ var getKeywords = function getKeywords(article) {
|
|
|
4
4
|
var keywords = [];
|
|
5
5
|
var internalTag = article.internalTag,
|
|
6
6
|
userDefinedTag = article.userDefinedTag,
|
|
7
|
-
SponsorshipTag = article.SponsorshipTag
|
|
7
|
+
SponsorshipTag = article.SponsorshipTag,
|
|
8
|
+
seoTag = article.seoTag;
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
if (internalTag) {
|
|
11
12
|
internalTag.map(function (item) {
|
|
12
|
-
keywords.
|
|
13
|
+
if (!keywords.includes(item)) {
|
|
14
|
+
keywords.push(item);
|
|
15
|
+
}
|
|
13
16
|
});
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
if (userDefinedTag) {
|
|
17
20
|
userDefinedTag.map(function (item) {
|
|
18
|
-
keywords.
|
|
21
|
+
if (!keywords.includes(item)) {
|
|
22
|
+
keywords.push(item);
|
|
23
|
+
}
|
|
19
24
|
});
|
|
20
25
|
}
|
|
21
26
|
|
|
22
27
|
if (SponsorshipTag) {
|
|
23
28
|
SponsorshipTag.map(function (item) {
|
|
24
|
-
keywords.
|
|
29
|
+
if (!keywords.includes(item)) {
|
|
30
|
+
keywords.push(item);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (seoTag) {
|
|
36
|
+
seoTag.map(function (item) {
|
|
37
|
+
if (!keywords.includes(item)) {
|
|
38
|
+
keywords.push(item);
|
|
39
|
+
}
|
|
25
40
|
});
|
|
26
41
|
}
|
|
27
42
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -140,6 +140,7 @@ var getSerializers = require('./getSerializers.js');
|
|
|
140
140
|
require('./util-f2c1b65b.js');
|
|
141
141
|
require('react-bootstrap/Pagination');
|
|
142
142
|
require('next/dynamic');
|
|
143
|
+
var getKeywords = require('./getKeywords.js');
|
|
143
144
|
var ArticleQueue = require('./ArticleQueue.js');
|
|
144
145
|
var RelatedContent = require('./RelatedContent.js');
|
|
145
146
|
var ForbesHero = require('./ForbesHero.js');
|
|
@@ -160,7 +161,6 @@ require('mysql');
|
|
|
160
161
|
var View = require('./View.js');
|
|
161
162
|
var getTargeting = require('./getTargeting-3ced038f.js');
|
|
162
163
|
var urlFor = require('./urlFor.js');
|
|
163
|
-
var getKeywords = require('./getKeywords.js');
|
|
164
164
|
var getQuery = require('./getQuery.js');
|
|
165
165
|
|
|
166
166
|
|
|
@@ -223,6 +223,7 @@ exports.PublicationLanding = PublicationLanding;
|
|
|
223
223
|
exports.IssueLanding = IssueLanding;
|
|
224
224
|
exports.PopUpModal = PopUpModal;
|
|
225
225
|
exports.getSerializers = getSerializers;
|
|
226
|
+
exports.getKeywords = getKeywords;
|
|
226
227
|
exports.ArticleQueue = ArticleQueue;
|
|
227
228
|
exports.RelatedContent = RelatedContent;
|
|
228
229
|
exports.ForbesHero = ForbesHero;
|
|
@@ -240,5 +241,4 @@ exports.Auth = Auth.default;
|
|
|
240
241
|
exports.View = View;
|
|
241
242
|
exports.getTargeting = getTargeting.getTargeting;
|
|
242
243
|
exports.urlFor = urlFor;
|
|
243
|
-
exports.getKeywords = getKeywords;
|
|
244
244
|
exports.getQuery = getQuery;
|
package/dist/esm/ArticleQueue.js
CHANGED
|
@@ -50,6 +50,7 @@ import getSerializers from './getSerializers.js';
|
|
|
50
50
|
import './util-7700fc59.js';
|
|
51
51
|
import 'react-bootstrap/Pagination';
|
|
52
52
|
import 'next/dynamic';
|
|
53
|
+
import getKeywords from './getKeywords.js';
|
|
53
54
|
|
|
54
55
|
var renderAuthor = function renderAuthor(authorName, authorURL, index, length) {
|
|
55
56
|
var defaultUrl = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'authors';
|
|
@@ -135,6 +136,10 @@ var Article = function Article(props) {
|
|
|
135
136
|
var url = _props$article$url.current,
|
|
136
137
|
issue = _props$article.issue,
|
|
137
138
|
source = _props$article.source,
|
|
139
|
+
internalTag = _props$article.internalTag,
|
|
140
|
+
seoTag = _props$article.seoTag,
|
|
141
|
+
sponsoredTag = _props$article.sponsoredTag,
|
|
142
|
+
userDefinedTag = _props$article.userDefinedTag,
|
|
138
143
|
regionalPages = props.regionalPages,
|
|
139
144
|
nationalPage = props.nationalPage,
|
|
140
145
|
ISIContent = props.ISIContent,
|
|
@@ -431,6 +436,7 @@ var Article = function Article(props) {
|
|
|
431
436
|
var shareSummary = summary;
|
|
432
437
|
var shareImage = thumbnail && thumbnail.asset ? urlFor(thumbnail.asset).url() : shareImageDefault;
|
|
433
438
|
var siteName = props.website.title;
|
|
439
|
+
var shareKeywords = getKeywords(props.article).join(',');
|
|
434
440
|
|
|
435
441
|
var meta = {
|
|
436
442
|
shareTitle: shareTitle,
|
|
@@ -438,7 +444,8 @@ var Article = function Article(props) {
|
|
|
438
444
|
shareSummary: shareSummary,
|
|
439
445
|
shareUrl: shareUrl,
|
|
440
446
|
shareImage: shareImage,
|
|
441
|
-
shareVia: props.Settings.title
|
|
447
|
+
shareVia: props.Settings.title,
|
|
448
|
+
shareKeywords: shareKeywords
|
|
442
449
|
};
|
|
443
450
|
return React__default.createElement(
|
|
444
451
|
React__default.Fragment,
|
|
@@ -466,6 +473,7 @@ var Article = function Article(props) {
|
|
|
466
473
|
'' + shareTitle
|
|
467
474
|
),
|
|
468
475
|
React__default.createElement('meta', { name: 'description', key: 'description', content: shareSummary }),
|
|
476
|
+
React__default.createElement('meta', { name: 'keywords', key: 'keywords', content: shareKeywords }),
|
|
469
477
|
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
470
478
|
React__default.createElement('meta', { property: 'og:url', content: shareUrl, key: 'og:url' }),
|
|
471
479
|
React__default.createElement('meta', { property: 'og:title', content: shareTitle, key: 'og:title' }),
|
|
@@ -476,7 +484,8 @@ var Article = function Article(props) {
|
|
|
476
484
|
React__default.createElement('meta', { name: 'twitter:title', content: shareTitle, key: 'twitter:title' }),
|
|
477
485
|
React__default.createElement('meta', { name: 'twitter:image', content: shareImage, key: 'twitter:image' }),
|
|
478
486
|
React__default.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
479
|
-
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'twitter:description' })
|
|
487
|
+
React__default.createElement('meta', { name: 'twitter:description', content: shareSummary, key: 'twitter:description' }),
|
|
488
|
+
React__default.createElement('link', { rel: 'canonical', href: shareUrl, key: 'canonical' })
|
|
480
489
|
),
|
|
481
490
|
React__default.createElement(
|
|
482
491
|
'h1',
|
|
@@ -797,6 +806,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
797
806
|
var changeMeta = function changeMeta(meta) {
|
|
798
807
|
document.title = meta.shareTitle;
|
|
799
808
|
document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
|
|
809
|
+
document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
|
|
800
810
|
document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
|
|
801
811
|
document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
|
|
802
812
|
document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
|
|
@@ -805,6 +815,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
805
815
|
document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
|
|
806
816
|
document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
|
|
807
817
|
document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
|
|
818
|
+
document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
|
|
808
819
|
};
|
|
809
820
|
|
|
810
821
|
var onChangeArticle = function onChangeArticle(path, visibility, meta) {
|
package/dist/esm/GridContent.js
CHANGED
|
@@ -350,14 +350,19 @@ var GridContent = function (_React$Component) {
|
|
|
350
350
|
var data = this.state.data.slice(3);
|
|
351
351
|
|
|
352
352
|
// Need to pass flag "lgInfeedAd={true}" along with brandInsight from site level for large infeed-ad to render
|
|
353
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
354
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
353
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
354
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
355
355
|
var lgInFeedAd = {
|
|
356
356
|
_type: 'lg-infeed',
|
|
357
357
|
adUnit: brandInsight.adUnit,
|
|
358
358
|
className: 'lg-infeed',
|
|
359
359
|
networkID: brandInsight.networkID,
|
|
360
360
|
sizes: [728, 90],
|
|
361
|
+
// Adding sizeMapping for showing ad above 1400px
|
|
362
|
+
sizeMapping: [{
|
|
363
|
+
viewport: [1400, 0],
|
|
364
|
+
sizes: [[728, 90]]
|
|
365
|
+
}, { viewport: [0, 0], sizes: [] }],
|
|
361
366
|
targeting: {
|
|
362
367
|
content_placement: brandInsight.targeting.content_placement,
|
|
363
368
|
document_url: brandInsight.targeting.document_url
|
|
@@ -377,8 +382,8 @@ var GridContent = function (_React$Component) {
|
|
|
377
382
|
}
|
|
378
383
|
|
|
379
384
|
if (showBI) {
|
|
380
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
381
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
385
|
+
// Checking lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
386
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
382
387
|
brandInsight.interval = 8;
|
|
383
388
|
} else {
|
|
384
389
|
brandInsight.interval = 5;
|
|
@@ -155,14 +155,19 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
// Need to pass flag "lgInfeedAd={true}" along with brandInsightAd from site level for large infeed-ad to render
|
|
158
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
159
|
-
if (lgInfeedAd && brandInsightAd && window && window.innerWidth >=
|
|
158
|
+
// Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
159
|
+
if (lgInfeedAd && brandInsightAd && typeof window !== 'undefined' && window.innerWidth >= 1400) {
|
|
160
160
|
var lgInfeed = {
|
|
161
161
|
_type: 'lg-infeed',
|
|
162
162
|
adUnit: brandInsightAd.adUnit,
|
|
163
163
|
className: 'lg-infeed',
|
|
164
164
|
networkID: brandInsightAd.networkID,
|
|
165
165
|
sizes: [728, 90],
|
|
166
|
+
// Adding sizeMapping for showing ad above 1400px
|
|
167
|
+
sizeMapping: [{
|
|
168
|
+
viewport: [1400, 0],
|
|
169
|
+
sizes: [[728, 90]]
|
|
170
|
+
}, { viewport: [0, 0], sizes: [] }],
|
|
166
171
|
targeting: {
|
|
167
172
|
content_placement: brandInsightAd.targeting.content_placement,
|
|
168
173
|
document_url: brandInsightAd.targeting.document_url
|
|
@@ -182,8 +187,8 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
182
187
|
}
|
|
183
188
|
|
|
184
189
|
if (showBI && brandInsightAd) {
|
|
185
|
-
// Checking lgInfeedAd flag in desktop view ( window >=
|
|
186
|
-
if (lgInfeedAd && window && window.innerWidth >=
|
|
190
|
+
// Checking window and lgInfeedAd flag in desktop view ( window >= 1400px ).
|
|
191
|
+
if (lgInfeedAd && typeof window !== 'undefined' && window.innerWidth >= 1400) brandInsightAd.interval = 8;
|
|
187
192
|
var pos = 0;
|
|
188
193
|
for (var i = 1; pos < data.length; i++) {
|
|
189
194
|
var inFeedAd = {
|
|
@@ -558,7 +563,7 @@ var cardLoader = function cardLoader(data, builder, mapping, values, seoPaginate
|
|
|
558
563
|
React__default.createElement(
|
|
559
564
|
'style',
|
|
560
565
|
{ jsx: 'true' },
|
|
561
|
-
'\n .displayLabelThumb{\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
566
|
+
'\n .displayLabelThumb {\n margin: 0 auto;\n margin-top: -1.25rem;\n background-color: white;\n position: relative;\n }\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 1px solid black;\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n .feature-media > .media-body {\n -webkit-box-flex: none;\n -ms-flex: none;\n flex: none;\n }\n .img-wrapper img {\n max-height: 240px;\n height: auto;\n width: 100%;\n object-fit: contain;\n }\n .feature-wrapper {\n height: 100%;\n width: 100%;\n }\n .feature-wrapper img {\n width: 100%;\n margin-bottom: 1em;\n }\n @media only screen and (min-width: 768px) {\n .img-wrapper > img {\n padding-right: 1em;\n }\n }\n @media only screen and (max-width: 767px) {\n .img-wrapper {\n width: 100%;\n }\n .img-wrapper img {\n padding-bottom: 1em;\n }\n .media {\n flex-direction: column !important;\n }\n }\n '
|
|
562
567
|
)
|
|
563
568
|
);
|
|
564
569
|
};
|
package/dist/esm/View.js
CHANGED
|
@@ -52,6 +52,7 @@ import getSerializers from './getSerializers.js';
|
|
|
52
52
|
import './util-7700fc59.js';
|
|
53
53
|
import 'react-bootstrap/Pagination';
|
|
54
54
|
import 'next/dynamic';
|
|
55
|
+
import getKeywords from './getKeywords.js';
|
|
55
56
|
import { a as getContentPlacementUrl, g as getTargeting } from './getTargeting-8f4bd5db.js';
|
|
56
57
|
import urlFor from './urlFor.js';
|
|
57
58
|
|
|
@@ -588,6 +589,7 @@ var Article = function Article(props) {
|
|
|
588
589
|
var shareSummary = article.summary;
|
|
589
590
|
var shareImage = thumbnail && thumbnail.asset ? urlFor(props.client, thumbnail.asset).url() : shareImageDefault;
|
|
590
591
|
var siteName = props.website && props.website.title ? props.website.title : '';
|
|
592
|
+
var shareKeywords = getKeywords(props.article).join(',');
|
|
591
593
|
|
|
592
594
|
var meta = {
|
|
593
595
|
shareTitle: shareTitle,
|
|
@@ -595,7 +597,8 @@ var Article = function Article(props) {
|
|
|
595
597
|
shareSummary: shareSummary,
|
|
596
598
|
shareUrl: shareUrl,
|
|
597
599
|
shareImage: shareImage,
|
|
598
|
-
shareVia: props.Settings.title
|
|
600
|
+
shareVia: props.Settings.title,
|
|
601
|
+
shareKeywords: shareKeywords
|
|
599
602
|
};
|
|
600
603
|
if (!props.infiniteScroll) {
|
|
601
604
|
onChangeArticle = function onChangeArticle() {
|
|
@@ -964,6 +967,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
964
967
|
var changeMeta = function changeMeta(meta) {
|
|
965
968
|
document.title = meta.shareTitle;
|
|
966
969
|
document.querySelector('meta[name="description"]').setAttribute('content', meta.shareSummary);
|
|
970
|
+
document.querySelector('meta[name="keywords"]').setAttribute('content', meta.shareKeywords);
|
|
967
971
|
document.querySelector('meta[property="og:url"]').setAttribute('content', meta.shareUrl);
|
|
968
972
|
document.querySelector('meta[property="og:title"]').setAttribute('content', meta.shareTitle);
|
|
969
973
|
document.querySelector('meta[property="og:site_name"]').setAttribute('content', meta.shareVia);
|
|
@@ -972,6 +976,7 @@ var ArticleQueue = function ArticleQueue(props) {
|
|
|
972
976
|
document.querySelector('meta[name="twitter:image"]').setAttribute('content', meta.shareImage);
|
|
973
977
|
document.querySelector('meta[name="twitter:site"]').setAttribute('content', meta.shareVia);
|
|
974
978
|
document.querySelector('meta[name="twitter:description"]').setAttribute('content', meta.shareSummary);
|
|
979
|
+
document.querySelector('link[rel="canonical"]').setAttribute('href', meta.shareUrl);
|
|
975
980
|
};
|
|
976
981
|
|
|
977
982
|
var onChangeArticle = function onChangeArticle(path, visibility, meta) {
|
|
@@ -1134,6 +1139,7 @@ var View = function View(props) {
|
|
|
1134
1139
|
article.title + ' | ' + props.cache.siteSettingCache.name
|
|
1135
1140
|
),
|
|
1136
1141
|
React__default.createElement('meta', { name: 'description', key: 'description', content: shareOptions.shareSummary }),
|
|
1142
|
+
React__default.createElement('meta', { name: 'keywords', content: getKeywords(article).join(','), key: 'keywords' }),
|
|
1137
1143
|
passwordLock && React__default.createElement('meta', { name: 'robots', content: 'noindex, nofollow' }),
|
|
1138
1144
|
React__default.createElement('meta', { property: 'og:url', content: shareOptions.shareUrl, key: 'og:url' }),
|
|
1139
1145
|
React__default.createElement('meta', { property: 'og:title', content: shareOptions.shareTitle, key: 'og:title' }),
|
|
@@ -1145,6 +1151,7 @@ var View = function View(props) {
|
|
|
1145
1151
|
React__default.createElement('meta', { name: 'twitter:image', content: shareOptions.shareImage, key: 'twitter:image' }),
|
|
1146
1152
|
React__default.createElement('meta', { name: 'twitter:site', content: '@' + props.Settings.title, key: 'twitter:site' }),
|
|
1147
1153
|
React__default.createElement('meta', { name: 'twitter:description', content: shareOptions.shareSummary, key: 'twitter:description' }),
|
|
1154
|
+
React__default.createElement('link', { rel: 'canonical', href: shareOptions.shareUrl, key: 'canonical' }),
|
|
1148
1155
|
React__default.createElement(
|
|
1149
1156
|
'noscript',
|
|
1150
1157
|
null,
|
package/dist/esm/getKeywords.js
CHANGED
|
@@ -2,24 +2,39 @@ var getKeywords = function getKeywords(article) {
|
|
|
2
2
|
var keywords = [];
|
|
3
3
|
var internalTag = article.internalTag,
|
|
4
4
|
userDefinedTag = article.userDefinedTag,
|
|
5
|
-
SponsorshipTag = article.SponsorshipTag
|
|
5
|
+
SponsorshipTag = article.SponsorshipTag,
|
|
6
|
+
seoTag = article.seoTag;
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
if (internalTag) {
|
|
9
10
|
internalTag.map(function (item) {
|
|
10
|
-
keywords.
|
|
11
|
+
if (!keywords.includes(item)) {
|
|
12
|
+
keywords.push(item);
|
|
13
|
+
}
|
|
11
14
|
});
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
if (userDefinedTag) {
|
|
15
18
|
userDefinedTag.map(function (item) {
|
|
16
|
-
keywords.
|
|
19
|
+
if (!keywords.includes(item)) {
|
|
20
|
+
keywords.push(item);
|
|
21
|
+
}
|
|
17
22
|
});
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
if (SponsorshipTag) {
|
|
21
26
|
SponsorshipTag.map(function (item) {
|
|
22
|
-
keywords.
|
|
27
|
+
if (!keywords.includes(item)) {
|
|
28
|
+
keywords.push(item);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (seoTag) {
|
|
34
|
+
seoTag.map(function (item) {
|
|
35
|
+
if (!keywords.includes(item)) {
|
|
36
|
+
keywords.push(item);
|
|
37
|
+
}
|
|
23
38
|
});
|
|
24
39
|
}
|
|
25
40
|
|
package/dist/esm/index.js
CHANGED
|
@@ -136,6 +136,7 @@ export { default as getSerializers } from './getSerializers.js';
|
|
|
136
136
|
import './util-7700fc59.js';
|
|
137
137
|
import 'react-bootstrap/Pagination';
|
|
138
138
|
import 'next/dynamic';
|
|
139
|
+
export { default as getKeywords } from './getKeywords.js';
|
|
139
140
|
export { default as ArticleQueue } from './ArticleQueue.js';
|
|
140
141
|
export { default as RelatedContent } from './RelatedContent.js';
|
|
141
142
|
export { default as ForbesHero } from './ForbesHero.js';
|
|
@@ -156,5 +157,4 @@ import 'mysql';
|
|
|
156
157
|
export { default as View } from './View.js';
|
|
157
158
|
export { g as getTargeting } from './getTargeting-8f4bd5db.js';
|
|
158
159
|
export { default as urlFor } from './urlFor.js';
|
|
159
|
-
export { default as getKeywords } from './getKeywords.js';
|
|
160
160
|
export { default as getQuery } from './getQuery.js';
|