@mjhls/mjh-framework 1.0.459 → 1.0.461

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,4 +1,4 @@
1
- # mjh-framework v. 1.0.459
1
+ # mjh-framework v. 1.0.461
2
2
 
3
3
  > Foundation Framework
4
4
 
@@ -35,8 +35,6 @@ var ADWebcast = function ADWebcast(_ref) {
35
35
  adUnit = webcastAd.adUnit,
36
36
  _webcastAd$targeting = webcastAd.targeting,
37
37
  targeting = _webcastAd$targeting === undefined ? {} : _webcastAd$targeting,
38
- _webcastAd$position = webcastAd.position,
39
- position = _webcastAd$position === undefined ? '' : _webcastAd$position,
40
38
  networkID = webcastAd.networkID,
41
39
  _webcastAd$sizes = webcastAd.sizes,
42
40
  sizes = _webcastAd$sizes === undefined ? [[200, 100]] : _webcastAd$sizes;
@@ -48,7 +46,8 @@ var ADWebcast = function ADWebcast(_ref) {
48
46
  tags: targeting.tags,
49
47
  document_group: targeting.document_group,
50
48
  document_url: targeting.document_url,
51
- pos: position,
49
+ // setting pos for webcast ad.
50
+ pos: 'smrec1',
52
51
  campaign_id: targeting.campaign_id,
53
52
  issue_url: targeting.issue_url,
54
53
  publication_url: targeting.publication_url
@@ -91,7 +90,7 @@ var ADWebcast = function ADWebcast(_ref) {
91
90
  { id: 'webcast-ad-wrapper', className: 'webcast-ad-wrapper' },
92
91
  React__default.createElement(
93
92
  'div',
94
- { className: 'webcast-ad' },
93
+ { className: 'webcast-ad', style: { paddingBottom: '15px' } },
95
94
  React__default.createElement(AdSlot, {
96
95
  className: className,
97
96
  slotId: slotId,
@@ -222,7 +222,7 @@ var Article = function Article(props) {
222
222
 
223
223
  var findIndex = function findIndex(arr) {
224
224
  var indexes = [];
225
- if ((typeof arr === 'undefined' ? 'undefined' : _typeof._typeof(arr)) == 'object') {
225
+ if ((typeof arr === 'undefined' ? 'undefined' : _typeof._typeof(arr)) === 'object') {
226
226
  var _iteratorNormalCompletion = true;
227
227
  var _didIteratorError = false;
228
228
  var _iteratorError = undefined;
@@ -233,7 +233,9 @@ var Article = function Article(props) {
233
233
 
234
234
  if (ele['_type'] === 'block' && ele.children.some(function (child) {
235
235
  return child.text.trim().length > 0;
236
- }) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
236
+ }) && ele['listItem'] !== 'bullet' &&
237
+ // To skip li tags when setting contextual native ads
238
+ ele['listItem'] !== 'number' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
237
239
  indexes.push(arr.indexOf(ele));
238
240
  }
239
241
  }
@@ -629,7 +631,7 @@ var Article = function Article(props) {
629
631
  React__default.createElement(
630
632
  'style',
631
633
  { jsx: 'true' },
632
- '\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 2px solid var(--franchise-primary, #484848);\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n '
634
+ '\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 2px solid var(--franchise-primary, #484848);\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n '
633
635
  )
634
636
  );
635
637
  };
package/dist/cjs/View.js CHANGED
@@ -186,7 +186,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
186
186
 
187
187
  var findIndex = function findIndex(arr) {
188
188
  var indexes = [];
189
- if ((typeof arr === 'undefined' ? 'undefined' : _typeof$1._typeof(arr)) == 'object') {
189
+ if ((typeof arr === 'undefined' ? 'undefined' : _typeof$1._typeof(arr)) === 'object') {
190
190
  var _iteratorNormalCompletion = true;
191
191
  var _didIteratorError = false;
192
192
  var _iteratorError = undefined;
@@ -197,7 +197,9 @@ var findIndex = function findIndex(arr) {
197
197
 
198
198
  if (ele['_type'] === 'block' && ele.children.some(function (child) {
199
199
  return child.text.trim().length > 0;
200
- }) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
200
+ }) && ele['listItem'] !== 'bullet' &&
201
+ // To skip li tags when setting contextual native ads
202
+ ele['listItem'] !== 'number' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
201
203
  indexes.push(arr.indexOf(ele));
202
204
  }
203
205
  }
@@ -7072,6 +7072,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
7072
7072
  var get1 = router && router.asPath ? router.asPath.split('/')[0] : '';
7073
7073
  var get2 = router && router.asPath ? router.asPath.split('/')[1] : '';
7074
7074
  var get3 = router && router.asPath ? router.asPath.split('/')[2].split('?')[0] : '';
7075
+
7075
7076
  // Once component mounts, set the variables
7076
7077
  React.useEffect(function () {
7077
7078
  var params = new URL(document.location).searchParams;
@@ -7116,7 +7117,13 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
7116
7117
 
7117
7118
  React.useEffect(function () {
7118
7119
  if (vidLoaded == true) {
7119
- document.title = nodes.videos[series - 1].title;
7120
+ var params = new URL(document.location).searchParams;
7121
+ var seriesVid = params.get('seriesVid');
7122
+ var vidTitle = nodes.videos[series - 1].title;
7123
+ var originalTitle = document.title;
7124
+ if (seriesVid) {
7125
+ document.title = vidTitle + ' | ' + originalTitle;
7126
+ }
7120
7127
  }
7121
7128
  }, [vidLoaded]);
7122
7129
 
@@ -30,8 +30,6 @@ var ADWebcast = function ADWebcast(_ref) {
30
30
  adUnit = webcastAd.adUnit,
31
31
  _webcastAd$targeting = webcastAd.targeting,
32
32
  targeting = _webcastAd$targeting === undefined ? {} : _webcastAd$targeting,
33
- _webcastAd$position = webcastAd.position,
34
- position = _webcastAd$position === undefined ? '' : _webcastAd$position,
35
33
  networkID = webcastAd.networkID,
36
34
  _webcastAd$sizes = webcastAd.sizes,
37
35
  sizes = _webcastAd$sizes === undefined ? [[200, 100]] : _webcastAd$sizes;
@@ -43,7 +41,8 @@ var ADWebcast = function ADWebcast(_ref) {
43
41
  tags: targeting.tags,
44
42
  document_group: targeting.document_group,
45
43
  document_url: targeting.document_url,
46
- pos: position,
44
+ // setting pos for webcast ad.
45
+ pos: 'smrec1',
47
46
  campaign_id: targeting.campaign_id,
48
47
  issue_url: targeting.issue_url,
49
48
  publication_url: targeting.publication_url
@@ -86,7 +85,7 @@ var ADWebcast = function ADWebcast(_ref) {
86
85
  { id: 'webcast-ad-wrapper', className: 'webcast-ad-wrapper' },
87
86
  React__default.createElement(
88
87
  'div',
89
- { className: 'webcast-ad' },
88
+ { className: 'webcast-ad', style: { paddingBottom: '15px' } },
90
89
  React__default.createElement(DFPAdSlot, {
91
90
  className: className,
92
91
  slotId: slotId,
@@ -217,7 +217,7 @@ var Article = function Article(props) {
217
217
 
218
218
  var findIndex = function findIndex(arr) {
219
219
  var indexes = [];
220
- if ((typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) == 'object') {
220
+ if ((typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object') {
221
221
  var _iteratorNormalCompletion = true;
222
222
  var _didIteratorError = false;
223
223
  var _iteratorError = undefined;
@@ -228,7 +228,9 @@ var Article = function Article(props) {
228
228
 
229
229
  if (ele['_type'] === 'block' && ele.children.some(function (child) {
230
230
  return child.text.trim().length > 0;
231
- }) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
231
+ }) && ele['listItem'] !== 'bullet' &&
232
+ // To skip li tags when setting contextual native ads
233
+ ele['listItem'] !== 'number' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
232
234
  indexes.push(arr.indexOf(ele));
233
235
  }
234
236
  }
@@ -624,7 +626,7 @@ var Article = function Article(props) {
624
626
  React__default.createElement(
625
627
  'style',
626
628
  { jsx: 'true' },
627
- '\n .sanityDisplayLabel {\n margin: .5rem 0;\n border: 2px solid var(--franchise-primary, #484848);\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n '
629
+ '\n .sanityDisplayLabel {\n margin: 0.5rem 0;\n border: 2px solid var(--franchise-primary, #484848);\n width: fit-content;\n padding: 5px;\n color: var(--franchise-primary, #484848);\n border-radius: 2px;\n }\n '
628
630
  )
629
631
  );
630
632
  };
package/dist/esm/View.js CHANGED
@@ -181,7 +181,7 @@ var DocumentGroup = function DocumentGroup(_ref) {
181
181
 
182
182
  var findIndex = function findIndex(arr) {
183
183
  var indexes = [];
184
- if ((typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) == 'object') {
184
+ if ((typeof arr === 'undefined' ? 'undefined' : _typeof(arr)) === 'object') {
185
185
  var _iteratorNormalCompletion = true;
186
186
  var _didIteratorError = false;
187
187
  var _iteratorError = undefined;
@@ -192,7 +192,9 @@ var findIndex = function findIndex(arr) {
192
192
 
193
193
  if (ele['_type'] === 'block' && ele.children.some(function (child) {
194
194
  return child.text.trim().length > 0;
195
- }) && ele['listItem'] !== 'bullet' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
195
+ }) && ele['listItem'] !== 'bullet' &&
196
+ // To skip li tags when setting contextual native ads
197
+ ele['listItem'] !== 'number' && ele['style'] === 'normal' || ele['_type'] === 'figure') {
196
198
  indexes.push(arr.indexOf(ele));
197
199
  }
198
200
  }
@@ -7066,6 +7066,7 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
7066
7066
  var get1 = router && router.asPath ? router.asPath.split('/')[0] : '';
7067
7067
  var get2 = router && router.asPath ? router.asPath.split('/')[1] : '';
7068
7068
  var get3 = router && router.asPath ? router.asPath.split('/')[2].split('?')[0] : '';
7069
+
7069
7070
  // Once component mounts, set the variables
7070
7071
  useEffect(function () {
7071
7072
  var params = new URL(document.location).searchParams;
@@ -7110,7 +7111,13 @@ var YouTubeGallery = function YouTubeGallery(_ref) {
7110
7111
 
7111
7112
  useEffect(function () {
7112
7113
  if (vidLoaded == true) {
7113
- document.title = nodes.videos[series - 1].title;
7114
+ var params = new URL(document.location).searchParams;
7115
+ var seriesVid = params.get('seriesVid');
7116
+ var vidTitle = nodes.videos[series - 1].title;
7117
+ var originalTitle = document.title;
7118
+ if (seriesVid) {
7119
+ document.title = vidTitle + ' | ' + originalTitle;
7120
+ }
7114
7121
  }
7115
7122
  }, [vidLoaded]);
7116
7123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mjhls/mjh-framework",
3
- "version": "1.0.459",
3
+ "version": "1.0.461",
4
4
  "description": "Foundation Framework",
5
5
  "author": "mjh-framework",
6
6
  "license": "MIT",